agent-log-viewer 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -21
- package/bin/cli.mjs +212 -12
- package/bin/server-runtime.mjs +51 -0
- package/bin/server-runtime.test.ts +190 -0
- package/dist/mcp-server.mjs +58 -25
- package/dist/runtime-host.mjs +40301 -0
- package/dist/standalone/.next/BUILD_ID +1 -1
- package/dist/standalone/.next/app-path-routes-manifest.json +13 -13
- package/dist/standalone/.next/build-manifest.json +2 -2
- package/dist/standalone/.next/prerender-manifest.json +3 -3
- package/dist/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/standalone/.next/server/app/_global-error.html +1 -1
- package/dist/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/standalone/.next/server/app/_not-found.rsc +1 -1
- package/dist/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/standalone/.next/server/app/api/accounts/claude/[id]/status/route.js +3 -3
- package/dist/standalone/.next/server/app/api/accounts/claude/login/[operationId]/input/route.js +3 -3
- package/dist/standalone/.next/server/app/api/accounts/claude/login/[operationId]/route.js +3 -3
- package/dist/standalone/.next/server/app/api/accounts/claude/terminal/route.js +3 -3
- package/dist/standalone/.next/server/app/api/accounts/codex/terminal/route.js +3 -3
- package/dist/standalone/.next/server/app/api/limits/history/route.js +3 -3
- package/dist/standalone/.next/server/app/api/limits/route.js +3 -3
- package/dist/standalone/.next/server/app/api/orchestrator/seat/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/deployments/[deploymentId]/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/deployments/capabilities/v1/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/deployments/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/operations/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/snapshot/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/stream/route.js +1 -1
- package/dist/standalone/.next/server/app/api/spawn/policy/route.js +3 -3
- package/dist/standalone/.next/server/app/api/tasks/route.js +2 -2
- package/dist/standalone/.next/server/app/index.html +1 -1
- package/dist/standalone/.next/server/app/index.rsc +2 -2
- package/dist/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/dist/standalone/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/dist/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/dist/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/standalone/.next/server/app/page.js +15 -12
- package/dist/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/standalone/.next/server/app-paths-manifest.json +13 -13
- package/dist/standalone/.next/server/chunks/2338.js +4 -1
- package/dist/standalone/.next/server/chunks/2904.js +3 -3
- package/dist/standalone/.next/server/chunks/3740.js +7 -7
- package/dist/standalone/.next/server/chunks/4012.js +3 -3
- package/dist/standalone/.next/server/chunks/4972.js +1 -1
- package/dist/standalone/.next/server/chunks/5689.js +2 -2
- package/dist/standalone/.next/server/chunks/7471.js +6 -6
- package/dist/standalone/.next/server/chunks/7733.js +3 -3
- package/dist/standalone/.next/server/chunks/8797.js +1 -1
- package/dist/standalone/.next/server/chunks/8817.js +1 -1
- package/dist/standalone/.next/server/chunks/9364.js +11 -11
- package/dist/standalone/.next/server/chunks/9411.js +2 -2
- package/dist/standalone/.next/server/chunks/9733.js +3 -3
- package/dist/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/standalone/.next/server/pages/404.html +1 -1
- package/dist/standalone/.next/server/pages/500.html +1 -1
- package/dist/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/standalone/.next/static/chunks/app/{page-ac9463b910bf83fe.js → page-7ba2538fa87e3d62.js} +17 -14
- package/dist/standalone/package.json +1 -1
- package/package.json +1 -1
- /package/dist/standalone/.next/static/{kt9OPe8iwfpNcdOX9ygvb → 2ybXlxpylgBaGz43zp2fM}/_buildManifest.js +0 -0
- /package/dist/standalone/.next/static/{kt9OPe8iwfpNcdOX9ygvb → 2ybXlxpylgBaGz43zp2fM}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"484":{"*":{"id":"70664","name":"*","chunks":[],"async":false}},"754":{"*":{"id":"42289","name":"*","chunks":[],"async":false}},"1304":{"*":{"id":"60440","name":"*","chunks":[],"async":false}},"4581":{"*":{"id":"61335","name":"*","chunks":[],"async":false}},"4777":{"*":{"id":"82265","name":"*","chunks":[],"async":false}},"6869":{"*":{"id":"74661","name":"*","chunks":[],"async":false}},"7121":{"*":{"id":"35421","name":"*","chunks":[],"async":false}},"7123":{"*":{"id":"81921","name":"*","chunks":[],"async":false}},"8616":{"*":{"id":"84342","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/client/components/builtin/global-error.js":{"id":7123,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":7123,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/client/components/client-page.js":{"id":1304,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/esm/client/components/client-page.js":{"id":1304,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/client/components/client-segment.js":{"id":8616,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/esm/client/components/client-segment.js":{"id":8616,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":4777,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":4777,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/client/components/layout-router.js":{"id":7121,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/esm/client/components/layout-router.js":{"id":7121,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/client/components/render-from-template-context.js":{"id":4581,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":4581,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/lib/framework/boundary-components.js":{"id":484,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":484,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":6869,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":6869,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/src/app/globals.css":{"id":1743,"name":"*","chunks":["7177","static/chunks/app/layout-c8390ace9b222dd6.js"],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/src/components/Viewer.tsx":{"id":754,"name":"*","chunks":["9178","static/chunks/9178-e32f088e89b55503.js","8974","static/chunks/app/page-
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"484":{"*":{"id":"70664","name":"*","chunks":[],"async":false}},"754":{"*":{"id":"42289","name":"*","chunks":[],"async":false}},"1304":{"*":{"id":"60440","name":"*","chunks":[],"async":false}},"4581":{"*":{"id":"61335","name":"*","chunks":[],"async":false}},"4777":{"*":{"id":"82265","name":"*","chunks":[],"async":false}},"6869":{"*":{"id":"74661","name":"*","chunks":[],"async":false}},"7121":{"*":{"id":"35421","name":"*","chunks":[],"async":false}},"7123":{"*":{"id":"81921","name":"*","chunks":[],"async":false}},"8616":{"*":{"id":"84342","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/client/components/builtin/global-error.js":{"id":7123,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":7123,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/client/components/client-page.js":{"id":1304,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/esm/client/components/client-page.js":{"id":1304,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/client/components/client-segment.js":{"id":8616,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/esm/client/components/client-segment.js":{"id":8616,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":4777,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":4777,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/client/components/layout-router.js":{"id":7121,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/esm/client/components/layout-router.js":{"id":7121,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/client/components/render-from-template-context.js":{"id":4581,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":4581,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/lib/framework/boundary-components.js":{"id":484,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":484,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":6869,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":6869,"name":"*","chunks":[],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/src/app/globals.css":{"id":1743,"name":"*","chunks":["7177","static/chunks/app/layout-c8390ace9b222dd6.js"],"async":false},"/home/runner/work/live-log-viewer-next/live-log-viewer-next/src/components/Viewer.tsx":{"id":754,"name":"*","chunks":["9178","static/chunks/9178-e32f088e89b55503.js","8974","static/chunks/app/page-7ba2538fa87e3d62.js"],"async":false}},"entryCSSFiles":{"/home/runner/work/live-log-viewer-next/live-log-viewer-next/src/":[],"/home/runner/work/live-log-viewer-next/live-log-viewer-next/src/app/layout":[{"inlined":false,"path":"static/css/498f12ddef7ecb0e.css"}],"/home/runner/work/live-log-viewer-next/live-log-viewer-next/src/app/page":[]},"rscModuleMapping":{"484":{"*":{"id":"98562","name":"*","chunks":[],"async":false}},"754":{"*":{"id":"27074","name":"*","chunks":[],"async":false}},"1304":{"*":{"id":"15098","name":"*","chunks":[],"async":false}},"1743":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"4581":{"*":{"id":"16237","name":"*","chunks":[],"async":false}},"4777":{"*":{"id":"33859","name":"*","chunks":[],"async":false}},"6869":{"*":{"id":"36675","name":"*","chunks":[],"async":false}},"7121":{"*":{"id":"98099","name":"*","chunks":[],"async":false}},"7123":{"*":{"id":"95547","name":"*","chunks":[],"async":false}},"8616":{"*":{"id":"47644","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}};
|
|
@@ -5,54 +5,54 @@
|
|
|
5
5
|
"/api/access/route": "app/api/access/route.js",
|
|
6
6
|
"/api/account-migrations/[intentId]/route": "app/api/account-migrations/[intentId]/route.js",
|
|
7
7
|
"/api/accounts/claude/login/[operationId]/input/route": "app/api/accounts/claude/login/[operationId]/input/route.js",
|
|
8
|
+
"/api/accounts/claude/login/[operationId]/route": "app/api/accounts/claude/login/[operationId]/route.js",
|
|
8
9
|
"/api/accounts/claude/[id]/status/route": "app/api/accounts/claude/[id]/status/route.js",
|
|
9
10
|
"/api/accounts/claude/active/route": "app/api/accounts/claude/active/route.js",
|
|
10
|
-
"/api/accounts/claude/login/[operationId]/route": "app/api/accounts/claude/login/[operationId]/route.js",
|
|
11
11
|
"/api/accounts/claude/policy/route": "app/api/accounts/claude/policy/route.js",
|
|
12
12
|
"/api/accounts/claude/terminal/route": "app/api/accounts/claude/terminal/route.js",
|
|
13
13
|
"/api/accounts/codex/active/route": "app/api/accounts/codex/active/route.js",
|
|
14
14
|
"/api/accounts/codex/policy/route": "app/api/accounts/codex/policy/route.js",
|
|
15
15
|
"/api/accounts/claude/route": "app/api/accounts/claude/route.js",
|
|
16
16
|
"/api/accounts/codex/terminal/route": "app/api/accounts/codex/terminal/route.js",
|
|
17
|
-
"/api/agent/route": "app/api/agent/route.js",
|
|
18
17
|
"/api/accounts/codex/route": "app/api/accounts/codex/route.js",
|
|
18
|
+
"/api/agent/route": "app/api/agent/route.js",
|
|
19
19
|
"/api/agent/snapshot/route": "app/api/agent/snapshot/route.js",
|
|
20
20
|
"/api/accounts/route": "app/api/accounts/route.js",
|
|
21
21
|
"/api/answer/route": "app/api/answer/route.js",
|
|
22
22
|
"/api/attention/[id]/route": "app/api/attention/[id]/route.js",
|
|
23
23
|
"/api/attention/route": "app/api/attention/route.js",
|
|
24
|
-
"/api/artifact/route": "app/api/artifact/route.js",
|
|
25
24
|
"/api/attach-command/route": "app/api/attach-command/route.js",
|
|
25
|
+
"/api/artifact/route": "app/api/artifact/route.js",
|
|
26
26
|
"/api/board/route": "app/api/board/route.js",
|
|
27
27
|
"/api/conversations/[conversationId]/migration/route": "app/api/conversations/[conversationId]/migration/route.js",
|
|
28
28
|
"/api/bridge/route": "app/api/bridge/route.js",
|
|
29
29
|
"/api/conversations/route": "app/api/conversations/route.js",
|
|
30
30
|
"/api/flows/[id]/route": "app/api/flows/[id]/route.js",
|
|
31
31
|
"/api/flows/route": "app/api/flows/route.js",
|
|
32
|
-
"/api/inbox/route": "app/api/inbox/route.js",
|
|
33
32
|
"/api/image/route": "app/api/image/route.js",
|
|
34
33
|
"/api/lifecycle/reaper/route": "app/api/lifecycle/reaper/route.js",
|
|
34
|
+
"/api/inbox/route": "app/api/inbox/route.js",
|
|
35
35
|
"/api/limits/history/route": "app/api/limits/history/route.js",
|
|
36
36
|
"/api/limits/route": "app/api/limits/route.js",
|
|
37
37
|
"/api/log/preflight/route": "app/api/log/preflight/route.js",
|
|
38
|
+
"/api/log/provenance/route": "app/api/log/provenance/route.js",
|
|
38
39
|
"/api/files/route": "app/api/files/route.js",
|
|
39
40
|
"/api/log/project-delete/route": "app/api/log/project-delete/route.js",
|
|
40
|
-
"/api/log/provenance/route": "app/api/log/provenance/route.js",
|
|
41
41
|
"/api/logs/stream/route": "app/api/logs/stream/route.js",
|
|
42
42
|
"/api/logs/route": "app/api/logs/route.js",
|
|
43
43
|
"/api/log/route": "app/api/log/route.js",
|
|
44
44
|
"/api/monitor/lock/route": "app/api/monitor/lock/route.js",
|
|
45
45
|
"/api/orchestrator/rotate/route": "app/api/orchestrator/rotate/route.js",
|
|
46
46
|
"/api/monitor/runs/route": "app/api/monitor/runs/route.js",
|
|
47
|
-
"/api/orchestrator/seat/route": "app/api/orchestrator/seat/route.js",
|
|
48
47
|
"/api/orchestrator/seat/status/route": "app/api/orchestrator/seat/status/route.js",
|
|
48
|
+
"/api/orchestrator/seat/route": "app/api/orchestrator/seat/route.js",
|
|
49
49
|
"/api/pipelines/[id]/route": "app/api/pipelines/[id]/route.js",
|
|
50
50
|
"/api/pipelines/preflight/route": "app/api/pipelines/preflight/route.js",
|
|
51
51
|
"/api/pipelines/tick/route": "app/api/pipelines/tick/route.js",
|
|
52
52
|
"/api/pipelines/route": "app/api/pipelines/route.js",
|
|
53
53
|
"/api/proc/route": "app/api/proc/route.js",
|
|
54
|
-
"/api/projects/create/route": "app/api/projects/create/route.js",
|
|
55
54
|
"/api/projects/crown/route": "app/api/projects/crown/route.js",
|
|
55
|
+
"/api/projects/create/route": "app/api/projects/create/route.js",
|
|
56
56
|
"/api/push/route": "app/api/push/route.js",
|
|
57
57
|
"/api/resources/route": "app/api/resources/route.js",
|
|
58
58
|
"/api/roles/route": "app/api/roles/route.js",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"/api/runtime/deployments/route": "app/api/runtime/deployments/route.js",
|
|
64
64
|
"/api/runtime/operations/[operationId]/route": "app/api/runtime/operations/[operationId]/route.js",
|
|
65
65
|
"/api/runtime/operations/route": "app/api/runtime/operations/route.js",
|
|
66
|
-
"/api/runtime/realtime/route": "app/api/runtime/realtime/route.js",
|
|
67
66
|
"/api/runtime/send/route": "app/api/runtime/send/route.js",
|
|
68
|
-
"/api/runtime/
|
|
67
|
+
"/api/runtime/realtime/route": "app/api/runtime/realtime/route.js",
|
|
69
68
|
"/api/runtime/spawn/route": "app/api/runtime/spawn/route.js",
|
|
69
|
+
"/api/runtime/snapshot/route": "app/api/runtime/snapshot/route.js",
|
|
70
70
|
"/api/runtime/steer/route": "app/api/runtime/steer/route.js",
|
|
71
71
|
"/api/runtime/stream/route": "app/api/runtime/stream/route.js",
|
|
72
72
|
"/api/search/transcripts/route": "app/api/search/transcripts/route.js",
|
|
@@ -82,19 +82,19 @@
|
|
|
82
82
|
"/api/tasks/[id]/send/route": "app/api/tasks/[id]/send/route.js",
|
|
83
83
|
"/api/tasks/curator/route": "app/api/tasks/curator/route.js",
|
|
84
84
|
"/api/tasks/route": "app/api/tasks/route.js",
|
|
85
|
-
"/api/telegram/reports/route": "app/api/telegram/reports/route.js",
|
|
86
85
|
"/api/timeline/route": "app/api/timeline/route.js",
|
|
87
|
-
"/api/telegram/route": "app/api/telegram/route.js",
|
|
86
|
+
"/api/telegram/reports/route": "app/api/telegram/reports/route.js",
|
|
88
87
|
"/api/tmux/targets/route": "app/api/tmux/targets/route.js",
|
|
89
88
|
"/api/transcribe/backend/route": "app/api/transcribe/backend/route.js",
|
|
90
89
|
"/api/tasks/[id]/spawn/route": "app/api/tasks/[id]/spawn/route.js",
|
|
91
90
|
"/api/transcribe/route": "app/api/transcribe/route.js",
|
|
92
|
-
"/api/tts/backend/route": "app/api/tts/backend/route.js",
|
|
93
91
|
"/api/tmux/route": "app/api/tmux/route.js",
|
|
94
|
-
"/api/view/presence/route": "app/api/view/presence/route.js",
|
|
95
92
|
"/api/transcribe/token/route": "app/api/transcribe/token/route.js",
|
|
93
|
+
"/api/tts/backend/route": "app/api/tts/backend/route.js",
|
|
94
|
+
"/api/view/presence/route": "app/api/view/presence/route.js",
|
|
96
95
|
"/api/workflows/[id]/route": "app/api/workflows/[id]/route.js",
|
|
97
96
|
"/api/workflows/route": "app/api/workflows/route.js",
|
|
97
|
+
"/api/telegram/route": "app/api/telegram/route.js",
|
|
98
98
|
"/api/tts/route": "app/api/tts/route.js",
|
|
99
99
|
"/page": "app/page.js"
|
|
100
100
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use strict";exports.id=2338,exports.ids=[2318,2338,9937],exports.modules={72338:(a,b,c)=>{c.d(b,{ip:()=>A,CX:()=>z});var d=c(73024),e=c.n(d),f=c(74382),g=c(29733),h=c(4837),i=c(89937),j=c(4012),k=c(10167),l=c(50201),m=c(70107),n=c(99411),o=c(21153);let p=`## Initial visible status
|
|
2
|
-
Your first turn after receiving this mandate must produce a visible assistant status in this conversation.
|
|
2
|
+
Your first turn after receiving this mandate must produce a visible assistant status in this conversation. For a FRESH seat with no missions, greet in exactly two lines:
|
|
3
|
+
Ready in {project}.
|
|
4
|
+
Tell me what to ship — I open lanes, spawn implementers and reviewers, and merge on APPROVE. Nothing starts until you ask.
|
|
5
|
+
Use the actual project name in place of {project}. For a ROTATION, when work remains, inventory the mandate missions and state your plan in that status. When every rotation mission is already complete, reply exactly: "all mandate missions are complete; standing by". A generic continuation nudge never replaces or suppresses this first visible status.`;function q(a){return a.includes(p)?a:`${a}
|
|
3
6
|
|
|
4
7
|
${p}`}var r=c(15408);let s={spawn:async function(a){let{executeSpawnRequest:b}=await c.e(7722).then(c.bind(c,67722)),d={headers:new Headers({host:"127.0.0.1",[j.VIEWER_SPAWN_CAPABILITY_HEADER]:(0,i.ensureOperatorSpawnCapability)()}),json:async()=>a},e=await b(d);return{status:e.status,body:await e.json()}},deliver:async function(a){if((0,l.cM)()){let{enqueueStructuredMessage:b}=await Promise.resolve().then(c.bind(c,2592)),d=await b({path:a.path??"",conversationId:a.conversationId,clientMessageId:a.clientMessageId,text:a.text,images:[]});if(d)return d.ok?{ok:!0,outcome:"outcome"in d&&"string"==typeof d.outcome?d.outcome:"delivered"}:{ok:!1,error:d.error}}let b=await (0,k.Ku)({pid:null,path:a.path??"",conversationId:a.conversationId,clientMessageId:a.clientMessageId,text:a.text,images:[]});return b.ok?{ok:!0,outcome:b.outcome??"delivered"}:{ok:!1,error:b.error}},conversationTarget:a=>{let b=(0,g.agentRegistry)().conversation(a);if(!b)return null;if(b.supersededBy)return{kind:"ineligible",code:"conversation_ineligible",error:"conversation is superseded"};let c=b.generations.at(-1),d=c?.path?.trim();if(!d||!e().existsSync(d))return{kind:"ineligible",code:"missing_transcript",error:"conversation transcript is unavailable"};let f=c?.launchProfile?.cwd?.trim();if(!f||!e().existsSync(f)||!e().statSync(f).isDirectory())return{kind:"ineligible",code:"invalid_cwd",error:"conversation cwd is unavailable"};let h=b.projectOwnership?.project??(0,m.hY)(f);return h?{kind:"eligible",conversationId:b.id,path:d,cwd:f,project:(0,r.ut)(h)}:{kind:"ineligible",code:"missing_project",error:"conversation project is unavailable"}},projectTasks:a=>(0,o.h6)().filter(b=>b.project===a&&"done"!==b.status).map(a=>({id:a.id,status:a.status,text:a.text})),launchSettlement:({launchId:a,clientRequestId:b})=>{let c=(0,g.agentRegistry)().spawnReceiptForClientAttempt(b);return!c||a&&c.launchId!==a?{kind:"unknown"}:c.rejection||"failed"===c.state||"conflicted"===c.state?{kind:"failed",error:c.error??c.rejection?.guidance??`spawn receipt is terminally ${c.state}`}:{kind:"settled",conversationId:c.conversationId,path:"materialized"===c.artifactLifecycle?c.artifactPath:null,launchId:c.launchId}},now:()=>new Date().toISOString()},t=/^[A-Za-z0-9_-]{8,128}$/;function u(a){return"string"==typeof a?a.trim():""}function v(a){let b=null===a.path&&null!==a.intent.launchId;return{status:200,body:{ok:!0,replayed:!0,state:a.path?"settled":b?"accepted":"starting",accepted:b,conversationId:a.conversationId,path:a.path,launchId:a.intent.launchId,seat:a}}}function w(a){return{status:409,body:{error:"an orchestrator seat transition is already in progress for this project",code:"seat_intent_in_progress",seat:a}}}async function x(a,b){let c=(0,r.ho)({project:a.project,clientRequestId:a.clientRequestId,conversationId:a.conversationId,path:a.path,launchId:a.launchId,now:b.now()});return"missing"===c.kind?null:{seat:c.seat}}function y(a,b){let c=(0,r.HS)(a).pending;if(!c||"spawn"!==c.intent.mode||null!==c.intent.error)return null;let d=b.launchSettlement({launchId:c.intent.launchId,clientRequestId:c.intent.clientRequestId});return"settled"===d.kind?x({project:a,clientRequestId:c.intent.clientRequestId,conversationId:d.conversationId,path:d.path,launchId:d.launchId??c.intent.launchId},b):("failed"===d.kind&&(0,r.Cp)(a,c.intent.clientRequestId,d.error),null)}async function z(a,b=s){let c="string"==typeof a.project?(0,f.QK)(a.project):null;if(!c)return{status:400,body:{error:"project must be a valid project key"}};let d=(0,r.ut)(c),i="string"==typeof a.mandate?a.mandate:"";if(!i.trim())return{status:400,body:{error:"mandate is required"}};if(Buffer.byteLength(i,"utf8")>64e3)return{status:413,body:{error:"mandate is too large"}};let j=u(a.clientRequestId);if(!t.test(j))return{status:400,body:{error:"clientRequestId must be 8-128 URL-safe characters"}};let k=u(a.conversationId);if(k&&!k.startsWith("conversation_"))return{status:400,body:{error:"conversationId is invalid"}};let l="number"==typeof a.promptVersion&&Number.isInteger(a.promptVersion)?a.promptVersion:null,m=y(d,b);if(m&&await m,k){let a=b.conversationTarget(k);if(!a)return{status:404,body:{error:"conversation is unknown to the registry"}};if("ineligible"===a.kind)return{status:409,body:{error:a.error,code:a.code}};if(a.project!==d)return{status:409,body:{error:"conversation belongs to a different project",code:"project_mismatch"}};let c=(0,r.$p)({project:d,mandate:i,clientRequestId:j,mode:"existing",conversationId:a.conversationId,promptVersion:l,now:b.now()});if("completed"===c.kind)return v(c.seat);if("in_progress"===c.kind)return w(c.seat);let e="replay"===c.kind?b.conversationTarget(c.seat.conversationId??""):a;if(!e||"ineligible"===e.kind||e.project!==d){let a="the pending adoption target is no longer eligible";return(0,r.Cp)(d,j,a),{status:409,body:{error:a,code:"adoption_target_unavailable",seat:(0,r.HS)(d).pending}}}let f=await b.deliver({conversationId:e.conversationId,path:e.path,clientMessageId:`orchmandate_${j}`,text:q("replay"===c.kind?c.seat.mandate:i)});if(!f.ok){let a=f.error??"mandate delivery failed";return(0,r.Cp)(d,j,a),{status:502,body:{error:a,code:"mandate_delivery_failed",seat:(0,r.HS)(d).pending}}}let g=await x({project:d,clientRequestId:j,conversationId:e.conversationId,path:e.path},b);return g?{status:200,body:{ok:!0,state:"settled",conversationId:e.conversationId,path:e.path,delivery:f.outcome??"delivered",seat:g.seat}}:{status:409,body:{error:"seat intent was superseded by a newer designation"}}}let o=(0,r.HS)(d).active;if(o&&o.intent.clientRequestId!==j&&!0!==a.replaceIncumbent)return{status:409,body:{error:`an orchestrator is already designated for ${d}; use rotate_orchestrator for an explicit handoff, or pass replaceIncumbent: true to replace deliberately`,code:"already_designated",incumbentSeatEpoch:o.seatEpoch}};let p=function(a){let b=u(a.model);if(!b)return null;let c=(0,n.s8)({role:"orchestrator",roleParams:a.roleParams??{mode:"standard"}}),d=null;if("claude"===a.engine||"codex"===a.engine?d=a.engine:c.ok&&c.value&&(d=c.value.config.engine),!d)return null;let e=(0,h.RC)(d,b);return"error"in e?e.error:null}(a);if(p)return{status:400,body:{error:p}};let A=(0,r.$p)({project:d,mandate:i,clientRequestId:j,mode:"spawn",promptVersion:l,now:b.now()});if("completed"===A.kind)return v(A.seat);if("in_progress"===A.kind)return w(A.seat);let B=q("replay"===A.kind?A.seat.mandate:i),C=function(a,b){if("string"==typeof b&&b.trim())return b.trim();let c=process.env.LLV_ORCHESTRATOR_CWD?.trim();if(c)return c;let d=a=>{if(!a)return!1;try{return e().statSync(a).isDirectory()}catch{return!1}};for(let b of Object.values((0,g.agentRegistry)().readOnlySnapshot().conversations).filter(b=>b.projectOwnership?.project===a||b.generations.some(b=>b.launchProfile?.project===a)).sort((a,b)=>(b.updatedAt??"").localeCompare(a.updatedAt??"")))for(let a=b.generations.length-1;a>=0;a-=1){let c=b.generations[a]?.launchProfile?.cwd;if(d(c))return c}return null}(d,a.cwd);if(!C)return(0,r.Cp)(d,j,"orchestrator cwd could not be resolved"),{status:400,body:{error:"orchestrator cwd could not be resolved — pass cwd explicitly or set LLV_ORCHESTRATOR_CWD",code:"cwd_unresolved",seat:(0,r.HS)(d).pending}};let D={...Object.fromEntries(["engine","model","cwd","effort","fast","accountId","images","roleParams","allowSubagents"].flatMap(b=>void 0===a[b]?[]:[[b,a[b]]])),role:"orchestrator",roleParams:a.roleParams??{mode:"standard"},project:d,cwd:C,prompt:B,clientAttemptId:j},E=await b.spawn(D),F=u(E.body.conversationId),G=E.status>=200&&E.status<300&&!1!==E.body.ok,H=u(E.body.launchId),I=G&&202===E.status&&!!F&&!!H;if(!(G&&!1!==E.body.launched&&F)&&!I){let a=u(E.body.error)||(G?F?"spawn did not report an accepted launch":"spawn response omitted conversationId":`spawn was rejected with HTTP status ${E.status}`);return(0,r.Cp)(d,j,a),{status:E.status,body:{...E.body,seat:(0,r.HS)(d).pending}}}let J=await x({project:d,clientRequestId:j,conversationId:F,path:"string"==typeof E.body.path?E.body.path:null,launchId:H||null},b);return J?{status:E.status,body:{...E.body,...I?{accepted:!0,state:"accepted"}:{},seat:J.seat}}:{status:409,body:{error:"seat intent was superseded by a newer designation"}}}async function A(a,b=s){let c="string"==typeof a.project?(0,f.QK)(a.project):null;if(!c)return{status:400,body:{error:"project must be a valid project key"}};let d=(0,r.ut)(c),e=u(a.clientRequestId);if(!t.test(e))return{status:400,body:{error:"clientRequestId must be 8-128 URL-safe characters"}};let g=y(d,b);g&&await g;let h=(0,r.HS)(d).active;if(!h?.conversationId)return{status:409,body:{error:"no orchestrator is designated for this project — use create_orchestrator instead of rotating",code:"no_incumbent"}};let i=b.conversationTarget(h.conversationId),j=i?.kind==="eligible"?i:null,k=b.projectTasks(d).slice(0,12),l=u(a.handoffNotes).slice(0,2e3),m=["## Handoff from your predecessor (rotation)",`You are replacing orchestrator conversation ${h.conversationId} for project ${d}. Its manager authority is revoked; its session and card remain on the board, linked to yours.`,j?.path??h.path?`Your predecessor's full transcript — decisions, blockers, in-flight work — is at: ${j?.path??h.path}. Review its recent turns before acting.`:"Your predecessor's transcript path is not recorded; reconstruct state from the board before acting.",k.length?`Open board tasks for this project:
|
|
5
8
|
${k.map(a=>`- [${a.status}] ${a.text.slice(0,140)} (${a.id})`).join("\n")}`:"No open board tasks are recorded for this project.",...l?[`Notes from the caller:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";exports.id=2904,exports.ids=[2904,7733],exports.modules={7733:(a,b,c)=>{c.r(b),c.d(b,{CODEX_VIEWER_SPAWN_FEATURES:()=>v,NATIVE_MULTI_AGENT_HOOK_MATCHER:()=>p,NATIVE_MULTI_AGENT_TOOLS:()=>o,NATIVE_SUBAGENT_DENY_MESSAGE:()=>t,VIEWER_SPAWN_CAPABILITY_ENV:()=>r,VIEWER_SPAWN_CAPABILITY_HEADER:()=>k,VIEWER_SPAWN_ENDPOINT:()=>q,VIEWER_SPAWN_PROMPT_FENCE:()=>u,applyClaudeSpawnPolicy:()=>
|
|
2
|
-
printf '%s\\n' ${
|
|
1
|
+
"use strict";exports.id=2904,exports.ids=[2904,7733],exports.modules={7733:(a,b,c)=>{c.r(b),c.d(b,{CODEX_VIEWER_SPAWN_FEATURES:()=>v,NATIVE_MULTI_AGENT_HOOK_MATCHER:()=>p,NATIVE_MULTI_AGENT_TOOLS:()=>o,NATIVE_SUBAGENT_DENY_MESSAGE:()=>t,VIEWER_SPAWN_CAPABILITY_ENV:()=>r,VIEWER_SPAWN_CAPABILITY_HEADER:()=>k,VIEWER_SPAWN_ENDPOINT:()=>q,VIEWER_SPAWN_PROMPT_FENCE:()=>u,applyClaudeSpawnPolicy:()=>H,claudeSpawnPolicyPaths:()=>x,fenceViewerSpawnPrompt:()=>I,prepareManagedClaudeSpawnHome:()=>G,resolveClaudeMcpServers:()=>E,viewerMcpRegistered:()=>F,viewerMcpServerEntry:()=>w});var d=c(73024),e=c.n(d),f=c(76760),g=c.n(f),h=c(77598),i=c.n(h),j=c(23953);let k="x-llv-spawn-capability",l="LLV_MANAGED_NATIVE_SUBAGENT_DENY=1 ",m=".llv",n=["enableAllProjectMcpServers","enabledMcpjsonServers","disabledMcpjsonServers"],o=Object.freeze(["Task","Agent","Workflow","TeamCreate","TeamDelete","SendMessage"]),p=o.join("|"),q="http://127.0.0.1:8898/api/spawn",r="LLV_SPAWN_CAPABILITY",s=`Send header ${k}: $${r}.`,t=`Sub-agents are disabled on this surface. Spawn через POST ${q} with {engine, model, cwd, prompt, src: <your transcript path>, role, reviews?} and ${s} The worker then appears on the board with correct lineage.`,u=`Viewer spawn policy: avoid native sub-agent, collaboration, and background-agent features. Spawn every helper through POST ${q} with {engine, model, cwd, prompt, src: <your transcript path>, role, reviews?}. ${s} The worker appears on the board with correct lineage.`,v={plugins:!1,apps:!1,multi_agent:!1};function w(a=process.cwd()){let b=[g().resolve(a,"bin","mcp-server.mjs"),g().resolve(a,"..","..","bin","mcp-server.mjs")].find(a=>e().existsSync(a));if(!b)throw Error(`Viewer MCP launcher could not be resolved from package cwd: ${a}`);return{command:"bun",args:[b]}}function x(a,b){if(!/^[A-Za-z0-9_-]{1,128}$/.test(b))throw Error("Claude spawn policy profile id is invalid");let c=g().join(a,m,"hooks","deny-native-subagents.sh");return{settingsPath:g().join(a,m,"spawn-settings",`${b}.json`),mcpConfigPath:g().join(a,m,"spawn-mcp",`${b}.json`),hookPath:c,command:`${l}${z(c)}`}}function y(a){return a&&"object"==typeof a&&!Array.isArray(a)?a:null}function z(a){return"'"+a.replace(/'/g,"'\\''")+"'"}function A(a,b,c){e().mkdirSync(g().dirname(a),{recursive:!0,mode:448});let d=g().join(g().dirname(a),`.${g().basename(a)}.${process.pid}.${i().randomUUID()}.tmp`);try{e().writeFileSync(d,b,{mode:c}),e().chmodSync(d,c),e().renameSync(d,a)}finally{e().rmSync(d,{force:!0})}}function B(a){let b;if(!e().existsSync(a))return{};try{b=JSON.parse(e().readFileSync(a,"utf8"))}catch{throw Error(`Claude settings are invalid JSON: ${a}`)}let c=y(b);if(!c)throw Error(`Claude settings must contain a JSON object: ${a}`);return c}function C(a){return Array.isArray(a)?a.filter(a=>"string"==typeof a):[]}function D(a){if(!a)return{};let b=g().resolve(a),c=b;for(let a=b;;a=g().dirname(a)){if(e().existsSync(g().join(a,".git"))){c=a;break}if(g().dirname(a)===a)break}let d=g().join(c,".mcp.json");return e().existsSync(d)?y(B(d).mcpServers)??{}:{}}function E(a,b,c=g().join(a,".claude.json")){let d=e().existsSync(c)?B(c):{},f=y(d.mcpServers)??{},h=y(d.projects),i=b&&h?y(h[b]):null,j=D(b),k=y(i?.mcpServers)??{};return{...f,...j,...k}}function F(a,b,c){return null!==y(E(a,b,c).viewer)}function G(a,b){let c=g().join(a,".claude.json");try{let a=e().lstatSync(c);if(a.isSymbolicLink()||!a.isFile())throw Error(`Claude state path is unsafe: ${c}`)}catch(a){if("ENOENT"!==a.code)throw a}let d={};if(e().existsSync(c)){let a;try{a=JSON.parse(e().readFileSync(c,"utf8"))}catch{throw Error(`Claude state is invalid JSON: ${c}`)}let b=y(a);if(!b)throw Error(`Claude state must contain a JSON object: ${c}`);d=b}let f=void 0===d.projects?{}:y(d.projects);if(!f)throw Error(`Claude state projects must contain a JSON object: ${c}`);let h=void 0===f[b]?{}:y(f[b]);if(!h)throw Error(`Claude project state must contain a JSON object: ${b}`);A(c,JSON.stringify({...d,hasCompletedOnboarding:!0,bypassPermissionsModeAccepted:!0,projects:{...f,[b]:{...h,hasTrustDialogAccepted:!0,hasCompletedProjectOnboarding:!0}}},null,2)+"\n",384)}function H(a,b={}){var c,d;let f,h=g().join(a,"settings.json"),k=x(a,b.profileId??i().randomUUID()),m=e().existsSync(h),o=m?B(h):b.baseSettingsPath?B(b.baseSettingsPath):{},q=m?{}:o;if(!b.allowSubagents&&!0===o.disableAllHooks)throw Error("Claude settings disableAllHooks prevents the Viewer spawn policy from enforcing native sub-agent denial");if(!b.allowSubagents&&!0===o.allowManagedHooksOnly)throw Error("Claude settings allowManagedHooksOnly prevents the Viewer spawn policy from enforcing native sub-agent denial");let r=void 0===o.hooks?{}:y(o.hooks);if(!r)throw Error("Claude settings hooks must contain a JSON object");let s=function(a){if(void 0===a)return[];if(!Array.isArray(a))throw Error("Claude settings hooks.PreToolUse must be an array");return a.flatMap(a=>{let b=y(a);if(!b||!Array.isArray(b.hooks))return[a];let c=b.hooks.filter(a=>{var b;return!("string"==typeof(b=y(a)?.command)&&b.startsWith(l))});return c.length?[{...b,hooks:c}]:[]})}(r.PreToolUse);if(!b.allowSubagents){let a=`#!/bin/sh
|
|
2
|
+
printf '%s\\n' ${z(t)} >&2
|
|
3
3
|
exit 2
|
|
4
|
-
`;
|
|
4
|
+
`;A(k.hookPath,a,448),s.push({matcher:p,hooks:[{type:"command",command:k.command}]})}let u=b.allowSubagents?q:{...q,disableAllHooks:!1,allowManagedHooksOnly:!1},v=(c=b.cwd,d=b.mcpServers,f=E(a,c,b.mcpStatePath),Object.fromEntries((0,j.c1)(d).flatMap(a=>{let b=y(f[a])??("viewer"===a?{type:"stdio",...w()}:null);return b?[[a,b]]:[]}))),F=new Set(Object.keys(v)),G=Object.keys(D(b.cwd)).filter(a=>!F.has(a)),I=Object.fromEntries(Object.entries(u).filter(([a])=>"mcpServers"!==a)),J=Object.fromEntries(n.flatMap(a=>void 0===o[a]?[]:[[a,o[a]]]));void 0!==o.enabledMcpjsonServers&&(J.enabledMcpjsonServers=C(o.enabledMcpjsonServers).filter(a=>F.has(a)));let K=[...new Set([...C(o.disabledMcpjsonServers),...G])];return K.length>0&&(J.disabledMcpjsonServers=K),A(k.settingsPath,JSON.stringify({...I,...J,hooks:{...r,PreToolUse:s}},null,2)+"\n",384),A(k.mcpConfigPath,JSON.stringify({mcpServers:v},null,2)+"\n",384),k}function I(a,b){return"codex"!==a?b:[b.trim(),u].filter(Boolean).join("\n\n")}},12904:(a,b,c)=>{c.d(b,{ph:()=>ab,Ou:()=>af,fr:()=>J,agentRegistry:()=>a8,oP:()=>aR});var d=c(77598),e=c.n(d),f=c(73024),g=c.n(f),h=c(76760),i=c.n(h),j=c(57975),k=c(27146),l=c(52e3),m=c(63685),n=c(58577),o=c(82093),p=c(23953),q=c(65972),r=c(60546),s=c(88623);let t="LLV_AGENT_REGISTRY_SQLITE";class u extends Error{constructor(...a){super(...a),this.name="RegistryBackendIdentityError"}}let v={readText(a){try{return g().readFileSync(a,"utf8")}catch(b){if("ENOENT"===b.code)return null;throw new u(`${i().basename(a)} is unreadable: ${b.code??"unknown error"}`)}},exists:a=>g().existsSync(a),writeText(a,b){g().mkdirSync(i().dirname(a),{recursive:!0,mode:448});let c=`${a}.${process.pid}.${(0,d.randomUUID)()}.tmp`,e=g().openSync(c,"wx",384);try{g().writeFileSync(e,b),g().fsyncSync(e)}finally{g().closeSync(e)}g().renameSync(c,a)}};function w(a){let b=i().basename(a).replace(/\.json$/,"");return i().join(i().dirname(a),`${b}.backend.json`)}function x(a){return a.endsWith(".json")?`${a.slice(0,-5)}.sqlite`:`${a}.sqlite`}function y(a){return"off"===a||"dual-write"===a||"read"===a||"sqlite"===a}function z(a=process.env){let b=a[t]??"off";if(y(b))return b;throw Error(`${t} must be off, dual-write, read, or sqlite`)}function A(a,b){let c;try{c=JSON.parse(a)}catch{throw new u(`${b} is not valid JSON`)}if(!c||"object"!=typeof c||Array.isArray(c))throw new u(`${b} is not an object`);let d=c;if(1!==d.schemaVersion)throw new u(`${b} declares schema version ${String(d.schemaVersion)}, but this build understands 1`);if(!y(d.mode))throw new u(`${b} declares an unknown backend mode`);let e=d.sqliteFile;if(null!==e&&"string"!=typeof e)throw new u(`${b} declares an invalid store filename`);if("string"==typeof e&&(""===e||e!==i().basename(e)))throw new u(`${b} must name its store as a bare filename`);if("off"!==d.mode&&null===e)throw new u(`${b} declares the ${d.mode} backend but names no store`);return{schemaVersion:1,mode:d.mode,sqliteFile:e??null,publishedAt:"string"==typeof d.publishedAt?d.publishedAt:""}}let B=new Set(["entries","receipts","conversations","lineageEdges"]),C=["entries","receipts","lineageEdges","memberships","conversations","conversationAliases","migrationIntents","heldDeliveries","deliveryOperationOwners","pendingSuccessorCleanups","pendingSupersedence"],D=["importedResumePanes","legacyResumePanes","conversationRevision","engineRouting","autoBalance","quotaObservations"];function E(a,b,c){if(null===a||"object"!=typeof a)return a;let d=c.get(a);if(d)return d;let e=new Proxy(a,{get:(a,d,e)=>E(Reflect.get(a,d,e),b,c),set:(a,c,d)=>(b(),Reflect.set(a,c,d)),deleteProperty:(a,c)=>(b(),Reflect.deleteProperty(a,c)),defineProperty:(a,c,d)=>(b(),Reflect.defineProperty(a,c,d))});return c.set(a,e),e}class F{markDecided(a){return this.decidedFiles.add(a),a}decideAssembled(a){return(0,p.$q)(a,this.mcpGrantPolicy),this.markDecided(a)}assertDecided(a){if(!this.decidedFiles.has(a))throw Error("agent registry rows cannot be persisted before the MCP grant decision has run (#739)")}constructor(a,b){this.filename=a,this.rowCache=new Map,this.revisionCache=null,this.readOnlyCache=null,this.decidedFiles=new WeakSet,g().mkdirSync(i().dirname(a),{recursive:!0,mode:448});const c=process.getBuiltinModule?.("bun:sqlite");if(!c)throw Error("SQLite registry modes require the Bun runtime");const{Database:d}=c;this.db=new d(a,{create:!0,strict:!0}),this.normalize=b.normalize,this.onWriterWait=b.onWriterWait,this.onSnapshotLoad=b.onSnapshotLoad,this.onRowPayloadRead=b.onRowPayloadRead,this.onRowPayloadParse=b.onRowPayloadParse,this.onRevisionQuery=b.onRevisionQuery,this.mcpGrantPolicy=b.mcpGrantPolicy,this.db.exec("PRAGMA busy_timeout = 5000; PRAGMA journal_mode = WAL; PRAGMA synchronous = FULL; PRAGMA foreign_keys = ON; PRAGMA auto_vacuum = INCREMENTAL;"),this.db.exec(`
|
|
5
5
|
CREATE TABLE IF NOT EXISTS registry_meta (
|
|
6
6
|
key TEXT PRIMARY KEY,
|
|
7
7
|
value TEXT NOT NULL
|