> For the complete documentation index, see [llms.txt](https://dsg-3.gitbook.io/dsg-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dsg-3.gitbook.io/dsg-docs/control-plane/command-center-and-browser-agent.md).

# Command Center & Browser Agent — ฟังก์ชันและประสิทธิภาพที่พิสูจน์แล้ว

ฟังก์ชันจริงของ Command Center และ Browser Agent พร้อมผลทดสอบ ขอบเขต และตัวชี้วัดที่ยังไม่พิสูจน์

> **สถานะรวม: REVIEW.** โค้ดและ QA ของหน้าจอใหม่ผ่านใน working branch แต่ยังไม่ถูก push, merge หรือ deploy จึงยังไม่ใช่หลักฐานว่า production ใช้ฟังก์ชันใหม่นี้แล้ว

*ตรวจล่าสุด: 2026-08-13 UTC*

## ผู้ใช้เริ่มตรงไหน

เมื่อ branch นี้ถูก merge และ deploy แล้ว:

1. เปิด `/dashboard/command-center`
2. อ่าน **Current Truth** เพื่อดูสถานะ GitHub, revenue readiness, entitlement, plan และ activation proof
3. พิมพ์เป้าหมายหนึ่งครั้งใน **Typed Browser Agent** แล้วกด Enter
4. ดู plan, tool events, ผลลัพธ์ และเหตุผลที่หยุดในแผงเดียวกัน
5. เปิด **View technical evidence** เพื่อไปที่ `/evidence-pack`
6. หากต้องการ Pro Verification ให้กด **Start Pro verification — $99/month**; ระบบต้องตรวจ session ก่อนสร้าง Stripe Checkout

## ฟังก์ชันที่ตรวจจากโค้ดจริง

| ฟังก์ชัน                  | สถานะ                                   | หลักฐานในระบบ                                                                                                                  | ผู้ใช้ได้อะไร                                                                           |
| ------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |
| Current Truth             | **IMPLEMENTED — DEPLOY REVIEW**         | UI เรียก `/api/revenue-readiness`, `/api/github/revenue-autopilot-status`, `/api/billing/activation-proof` และ `/api/capacity` | เห็นสถานะในหน้าเดียว ไม่ต้องค้น log เอง                                                 |
| Typed goal                | **IMPLEMENTED — DEPLOY REVIEW**         | UI ส่ง goal ไป `/api/agent-chat` และอ่าน SSE แบบต่อเนื่อง                                                                      | พิมพ์เป้าหมายครั้งเดียวแล้วดู plan/ผลในจุดเดิม                                          |
| Governed tool execution   | **CODE VERIFIED / AUTH RUNTIME REVIEW** | `agentPreflight` → `planGoal`/model router → `executeToolSafely` → DSG tool                                                    | read tools ที่รองรับเดินต่อได้; write/critical ใช้สิทธิ์และ approval ตามระดับความเสี่ยง |
| Browser open/read         | **SUPPORTED IN CODE / RUNTIME REVIEW**  | tool `browser_navigate`; ใช้ Browserbase เมื่อมี config หรือ HTTP read fallback                                                | เปิดและอ่านข้อความจาก URL แบบ read-only                                                 |
| Browser click/type/submit | **UNSUPPORTED**                         | ไม่มี mutation tool ใน `DSG_TOOLS`; UI ระบุขอบเขตตรง ๆ                                                                         | ป้องกันไม่ให้ผู้ใช้เข้าใจผิดว่า Agent กดเว็บทั่วไปได้แล้ว                               |
| Stripe Checkout           | **CODE VERIFIED / E2E REVIEW**          | POST `/api/billing/checkout` หลังตรวจ auth; ราคาอ่านจาก shared pricing catalog                                                 | เส้นทางซื้อจริง ไม่ใช้ปุ่มจำลอง                                                         |
| Evidence/ROI metrics      | **NOT MEASURED**                        | UI แสดง `Not measured` จนมี production event                                                                                   | ไม่มีตัวเลข ROI, latency หรือผลสำเร็จที่สร้างขึ้นเอง                                    |

## ผลตรวจประสิทธิภาพที่มีหลักฐาน

| รายการ                    | ผลที่สังเกตได้        | ขอบเขตของผล                                                                                               |
| ------------------------- | --------------------- | --------------------------------------------------------------------------------------------------------- |
| Playwright interaction QA | **8/8 ผ่าน**          | ตรวจ route, cockpit, empty guard, typed goal, auth boundary, evidence link, refresh และ checkout boundary |
| Uncaught page exception   | **0**                 | จาก QA run ที่ viewport 1536×1093, DPR 1                                                                  |
| TypeScript                | **ผ่าน**              | `tsc --noEmit -p tsconfig.typecheck.json`                                                                 |
| ESLint                    | **ผ่าน**              | ตรวจ `app/`, `lib/`, `components/`                                                                        |
| Targeted tests            | **11/11 ผ่าน**        | Command Center capability, GitHub workflow status และ readiness route                                     |
| Next.js production build  | **ผ่าน**              | สร้าง static pages 195 หน้า                                                                               |
| Build compile time        | **19.6 วินาที**       | local QA environment หนึ่งครั้ง; ไม่ใช่ production SLA                                                    |
| Build TypeScript stage    | **27.7 วินาที**       | local QA environment หนึ่งครั้ง; ไม่ใช่ user request latency                                              |
| Static page generation    | **195 หน้าใน 720 ms** | build-time observation เท่านั้น                                                                           |

## ตัวเลขที่ยังห้ามอ้าง

รายการต่อไปนี้ยังไม่มี raw benchmark artifact ที่ผูกกับ commit และ environment ของหน้าจอใหม่นี้:

* Current Truth p50/p95/p99
* Agent time-to-first-token และเวลาจบแต่ละ tool
* Browser task success rate
* Stripe Checkout creation latency และ conversion rate
* Replay match rate, invalid-action rejection accuracy, time saved และ cost/action
* Revenue หรือ ROI ที่เกิดจาก Command Center

ดังนั้นตัวเลขเหล่านี้ต้องอยู่ในสถานะ **NOT MEASURED** จนกว่าจะมีการรัน production จริง

## ขอบเขตและสิ่งที่ต้องแก้

* Local production QA ได้ `429` ที่ checkout เพราะไม่มี distributed rate limiter; production ต้องยืนยัน `UPSTASH_REDIS_REST_URL`/`UPSTASH_REDIS_REST_TOKEN` หรือ `REDIS_URL` ก่อนเปิดขาย
* GitHub upstream อาจคืน `502`; endpoint มี timeout 8 วินาทีและ UI ต้องแสดง unavailable แทนการเดาสถานะ
* Resource ที่ต้องมี workspace session คืน `401` ตามจริงเมื่อยังไม่ sign in
* Revenue readiness สามารถคืน `503` เมื่อ dependency หรือ environment ยังไม่พร้อม
* Browser mutation ยังไม่มี executor จึงไม่ควรโฆษณาว่า Agent click/type/submit เว็บทั่วไปได้
* Turbopack ยังมี NFT tracing warning ใน Hermes execution import path; build ผ่าน แต่ warning ยังไม่ได้แก้ในงานนี้

## หลักฐานถัดไปที่ต้องเก็บ

1. Push branch, เปิด PR, merge และ deploy revision ที่แน่นอน
2. ยืนยัน distributed Redis และ revenue environment ใน deployment จริง
3. รัน operator workspace แบบ authenticated และเก็บ request/correlation ID, plan, tool events, audit row และ evidence ID
4. รัน benchmark อย่างน้อย 30 รอบต่อเส้นทาง แล้วรายงาน sample size, commit, provider, region, p50/p95/p99 และ failure count
5. หากเพิ่ม browser mutation ให้ผูกทุก click/type/submit กับ user-approved plan, permission, precondition, postcondition และ replayable evidence

ดูวิธีรัน benchmark เพิ่มเติมที่ [DSG Benchmarks](/dsg-docs/control-plane/dsg-benchmarks.md) และสถานะ deployment ปัจจุบันที่ [DSG ONE Control Plane — Current State](/dsg-docs/control-plane/dsg-one-control-plane-current-aws-state.md).
