agentroam-runtime-darwin-arm64 0.2.0-preview.48 → 0.2.0-preview.53
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/manifest.json +5 -2
- package/package.json +1 -1
- package/runtime/.next/BUILD_ID +1 -1
- package/runtime/.next/app-build-manifest.json +13 -13
- package/runtime/.next/app-path-routes-manifest.json +1 -1
- package/runtime/.next/build-manifest.json +6 -6
- package/runtime/.next/prerender-manifest.json +1 -1
- package/runtime/.next/react-loadable-manifest.json +1 -1
- package/runtime/.next/required-server-files.json +1 -1
- package/runtime/.next/server/app/_not-found/page.js +1 -1
- package/runtime/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/runtime/.next/server/app/_not-found.html +1 -1
- package/runtime/.next/server/app/_not-found.rsc +1 -1
- package/runtime/.next/server/app/api/agent/abort/route.js +1 -1
- package/runtime/.next/server/app/api/agent/answer/route.js +1 -1
- package/runtime/.next/server/app/api/agent/codex-sharing/route.js +1 -1
- package/runtime/.next/server/app/api/agent/harness/status/route.js +1 -1
- package/runtime/.next/server/app/api/agent/model/route.js +1 -1
- package/runtime/.next/server/app/api/agent/models/route.js +1 -1
- package/runtime/.next/server/app/api/agent/run/route.js +2 -2
- package/runtime/.next/server/app/api/agent/runtime-health/route.js +1 -1
- package/runtime/.next/server/app/api/agent/steer/route.js +1 -1
- package/runtime/.next/server/app/api/agent/stream/route.js +3 -3
- package/runtime/.next/server/app/api/agent-workspaces/[workspaceId]/sessions/route.js +1 -1
- package/runtime/.next/server/app/api/agent-workspaces/route.js +1 -1
- package/runtime/.next/server/app/api/auth/verify/route.js +1 -1
- package/runtime/.next/server/app/api/business/route.js +1 -1
- package/runtime/.next/server/app/api/client-logs/route.js +1 -1
- package/runtime/.next/server/app/api/collaboration/route.js +1 -1
- package/runtime/.next/server/app/api/flow/v1/catalog/route.js +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/[runId]/cancel/route.js +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/[runId]/events/route.js +2 -2
- package/runtime/.next/server/app/api/flow/v1/runs/route.js +1 -1
- package/runtime/.next/server/app/api/flow-studio/config/route.js +1 -1
- package/runtime/.next/server/app/api/mcp/connect/route.js +1 -1
- package/runtime/.next/server/app/api/mcp/disconnect/route.js +1 -1
- package/runtime/.next/server/app/api/mcp/servers/route.js +1 -1
- package/runtime/.next/server/app/api/memory/[key]/route.js +1 -1
- package/runtime/.next/server/app/api/memory/route.js +1 -1
- package/runtime/.next/server/app/api/plugins/load/route.js +1 -1
- package/runtime/.next/server/app/api/projects/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/projects/check/route.js +1 -1
- package/runtime/.next/server/app/api/projects/directories/route.js +1 -1
- package/runtime/.next/server/app/api/projects/roots/route.js +1 -1
- package/runtime/.next/server/app/api/projects/route.js +1 -1
- package/runtime/.next/server/app/api/push/subscribe/route.js +2 -2
- package/runtime/.next/server/app/api/push/unsubscribe/route.js +2 -2
- package/runtime/.next/server/app/api/push/vapid/route.js +2 -2
- package/runtime/.next/server/app/api/push/vapid.body +1 -1
- package/runtime/.next/server/app/api/remote-tools/register/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/changes/route.js +2 -2
- package/runtime/.next/server/app/api/sessions/[id]/fork/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/fork-at/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/goals/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/handoff/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/native-goal/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/query-index/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/release/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/thread-goal/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/tool-result/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/route.js +1 -1
- package/runtime/.next/server/app/api/settings/route.js +1 -1
- package/runtime/.next/server/app/api/skills/route.js +1 -1
- package/runtime/.next/server/app/api/tool-policies/[policyId]/route.js +1 -1
- package/runtime/.next/server/app/api/tool-policies/route.js +1 -1
- package/runtime/.next/server/app/api/tools/route.js +1 -1
- package/runtime/.next/server/app/api/update/check/route.js +1 -1
- package/runtime/.next/server/app/api/update/install/route.js +1 -1
- package/runtime/.next/server/app/api/update/status/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/login/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/logout/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/revoke-all/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/setup/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/status/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/bootstrap/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/computer-settings/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/computers/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/device-state/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/history/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/preferences/route.js +1 -1
- package/runtime/.next/server/app/web/page.js +47 -47
- package/runtime/.next/server/app/web/page_client-reference-manifest.js +1 -1
- package/runtime/.next/server/app-paths-manifest.json +31 -31
- package/runtime/.next/server/chunks/1322.js +12 -12
- package/runtime/.next/server/chunks/1773.js +45 -45
- package/runtime/.next/server/chunks/5303.js +2 -2
- package/runtime/.next/server/chunks/6244.js +1 -1
- package/runtime/.next/server/chunks/6703.js +2 -2
- package/runtime/.next/server/middleware-build-manifest.js +1 -1
- package/runtime/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/runtime/.next/server/pages/404.html +1 -1
- package/runtime/.next/server/pages/500.html +1 -1
- package/runtime/.next/server/server-reference-manifest.json +1 -1
- package/runtime/.next/static/chunks/326.46c95c57319be857.js +1 -0
- package/runtime/.next/static/chunks/app/web/error-bb3ae59f01cd6334.js +1 -0
- package/runtime/.next/static/chunks/app/web/{layout-6382c87cac6de8d3.js → layout-0645ff361837020f.js} +1 -1
- package/runtime/.next/static/chunks/app/web/page-37a417fa210a5072.js +1 -0
- package/runtime/.next/static/chunks/{main-app-03cbfb0621bc469a.js → main-app-f508b4b3ab30eea6.js} +1 -1
- package/runtime/.next/static/chunks/{webpack-d331689549804d1b.js → webpack-df5191d21627ba96.js} +1 -1
- package/runtime/lib/device-pairing-gateway.mjs +23 -3
- package/runtime/lib/device-pairing-store.mjs +14 -3
- package/runtime/lib/file-preview-service.mjs +18 -3
- package/runtime/lib/remote-control/helper-manager.mjs +4 -1
- package/runtime/lib/remote-control/remote-authorization.mjs +1 -0
- package/runtime/native/AgentRoam Remote Desktop.app/Contents/MacOS/agentroam-remote-desktop +0 -0
- package/runtime/node_modules/.package-lock.json +126 -126
- package/runtime/node_modules/@agent/core/dist/index.js +3 -3
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/bridge.mjs +48 -48
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/browser-sdk.js +41 -41
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-6z7brxfa.mjs +52 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-x118ntbh.mjs +35 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core.mjs +18 -18
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.json +19 -19
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.zst.json +23 -23
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/package.json +12 -12
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs +73 -73
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.cjs +84 -27
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.cjs +9 -9
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.mjs +9 -9
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.mjs +84 -27
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.node.cjs +84 -27
- package/runtime/node_modules/mediabunny/dist/modules/src/conversion.js +29 -12
- package/runtime/node_modules/mediabunny/dist/modules/src/encode.js +5 -2
- package/runtime/node_modules/mediabunny/dist/modules/src/hls/hls-segmented-input.js +1 -1
- package/runtime/node_modules/mediabunny/dist/modules/src/input.js +4 -0
- package/runtime/node_modules/mediabunny/dist/modules/src/media-sink.js +24 -12
- package/runtime/node_modules/mediabunny/dist/modules/src/sample.js +9 -1
- package/runtime/node_modules/mediabunny/dist/modules/src/segmented-input.js +3 -1
- package/runtime/node_modules/mediabunny/dist/modules/src/source.js +2 -1
- package/runtime/node_modules/mediabunny/dist/modules/src/tsconfig.tsbuildinfo +1 -1
- package/runtime/node_modules/mediabunny/dist/modules/src/version.js +1 -1
- package/runtime/node_modules/mediabunny/package.json +1 -1
- package/runtime/node_modules/mediabunny/src/conversion.ts +33 -12
- package/runtime/node_modules/mediabunny/src/encode.ts +5 -2
- package/runtime/node_modules/mediabunny/src/hls/hls-segmented-input.ts +1 -1
- package/runtime/node_modules/mediabunny/src/input.ts +5 -0
- package/runtime/node_modules/mediabunny/src/media-sink.ts +26 -13
- package/runtime/node_modules/mediabunny/src/sample.ts +10 -1
- package/runtime/node_modules/mediabunny/src/segmented-input.ts +3 -1
- package/runtime/node_modules/mediabunny/src/source.ts +2 -1
- package/runtime/node_modules/mediabunny/src/version.ts +1 -1
- package/runtime/package-lock.json +159 -159
- package/runtime/server.js +1 -1
- package/runtime/webapp/dist/assets/AiHubPane-28mWQJ4O.js +6 -0
- package/runtime/webapp/dist/assets/{App-iUeP1CBo.css → App-CMOzoP5A.css} +1 -1
- package/runtime/webapp/dist/assets/App-ekMWYwJF.js +169 -0
- package/runtime/webapp/dist/assets/BrowserLivePanel-jpMOjMFS.js +76 -0
- package/runtime/webapp/dist/assets/CollaborationDashboard-DWlttP3f.js +6 -0
- package/runtime/webapp/dist/assets/CollaborationPage-CsXdyER9.js +16 -0
- package/runtime/webapp/dist/assets/CollaborationTabBridge-Dqnn1SXm.js +1 -0
- package/runtime/webapp/dist/assets/FilePreview-C8hi9jdd.js +24 -0
- package/runtime/webapp/dist/assets/FilePreview-Zls_kcY7.css +1 -0
- package/runtime/webapp/dist/assets/FileTree-Bl3OeqMa.js +11 -0
- package/runtime/webapp/dist/assets/FlowStudioPane-B2Crgund.js +5 -0
- package/runtime/webapp/dist/assets/RemoteDesktopPage-BuGJBiP2.js +1 -0
- package/runtime/webapp/dist/assets/RemoteDesktopTabBridge-Cp9mLtcY.js +1 -0
- package/runtime/webapp/dist/assets/TerminalPane-6GBZ9nXN.css +32 -0
- package/runtime/webapp/dist/assets/TerminalPane-JNs8BUgC.js +39 -0
- package/runtime/webapp/dist/assets/{abnfDiagram-VCTEODGH-CB1fNkHO.js → abnfDiagram-VCTEODGH-Da5MSN2N.js} +1 -1
- package/runtime/webapp/dist/assets/arc-CJB563ao.js +1 -0
- package/runtime/webapp/dist/assets/architectureDiagram-5GKGNRK7-DHyh6h-n.js +36 -0
- package/runtime/webapp/dist/assets/artifact-links-CPifzsfG.js +7 -0
- package/runtime/webapp/dist/assets/{blockDiagram-I7D4REHJ-BdsljUN8.js → blockDiagram-I7D4REHJ-Cuk8q0Bq.js} +1 -1
- package/runtime/webapp/dist/assets/{c4Diagram-7LVT6UL2-BNQhbN8R.js → c4Diagram-7LVT6UL2-BCPECNbi.js} +1 -1
- package/runtime/webapp/dist/assets/channel-C5zXYGqL.js +1 -0
- package/runtime/webapp/dist/assets/{chunk-2Q5K7J3B-CIB6uwBd.js → chunk-2Q5K7J3B-B1J-5flF.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-5VM5RSS4-DG-dAGBX.js → chunk-5VM5RSS4-CaM_vBe1.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-F27PBJKO-Cz4FYtWI.js → chunk-F27PBJKO-BDwB4XD_.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-IMKFNOWR-Bk387_M1.js → chunk-IMKFNOWR-N5RKmqRM.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-JWPE2WC7-D1buI7qd.js → chunk-JWPE2WC7-B1hPaIN0.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-POPQ4Y6H-l81_q9Km.js → chunk-POPQ4Y6H-DtWE5sgA.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-SVP7TREG-2n3fQ3px.js → chunk-SVP7TREG-5FC9DbzN.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-TICWLB2K-NC_W5srW.js → chunk-TICWLB2K-CpXAEy0r.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-XXDRQBXY-Bn5fCkOc.js → chunk-XXDRQBXY-b8vc4bP6.js} +1 -1
- package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-LwOeM-av.js +1 -0
- package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-LwOeM-av.js +1 -0
- package/runtime/webapp/dist/assets/clipboard-3WFkCzei.js +6 -0
- package/runtime/webapp/dist/assets/{codeSyntax-D9B2mCsG.js → codeSyntax-DS1_JVNX.js} +3 -3
- package/runtime/webapp/dist/assets/{collaboration-C85istc_.css → collaboration-CXGccxVl.css} +1 -1
- package/runtime/webapp/dist/assets/collaboration-D-rkE6BZ.js +11 -0
- package/runtime/webapp/dist/assets/{cose-bilkent-JH36ORCC-BczBbE9_.js → cose-bilkent-JH36ORCC-KBhpU3xZ.js} +1 -1
- package/runtime/webapp/dist/assets/{cynefin-OW5HDTMX-BtTRes43.js → cynefin-OW5HDTMX-DcTIXxSW.js} +1 -1
- package/runtime/webapp/dist/assets/{cynefinDiagram-5FMLGOSQ-DZPPcnLM.js → cynefinDiagram-5FMLGOSQ-BDw54V_6.js} +1 -1
- package/runtime/webapp/dist/assets/{dagre-GXQ25YYZ-D4Q4z3Tp.js → dagre-GXQ25YYZ-BH9md9Zn.js} +2 -2
- package/runtime/webapp/dist/assets/{diagram-S7CK7UJ4-Dq_78DD9.js → diagram-S7CK7UJ4-D_g32W87.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-UQ7AKVKN-Df0rXRcJ.js → diagram-UQ7AKVKN-CS8ZEPA3.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-VSXAHHWV-Dm580wSN.js → diagram-VSXAHHWV-VvEP2JUb.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-VX7I27RA-RE2fdUPo.js → diagram-VX7I27RA-BfoXLyAq.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-Z3DM3KII-DJaYB2on.js → diagram-Z3DM3KII-BpzHahJO.js} +1 -1
- package/runtime/webapp/dist/assets/{ebnfDiagram-PWID7BFC-4yKff59X.js → ebnfDiagram-PWID7BFC-CAGXPKzY.js} +1 -1
- package/runtime/webapp/dist/assets/{erDiagram-RLTQ6QDP-7Yc4S5JM.js → erDiagram-RLTQ6QDP-DXgIcNCs.js} +1 -1
- package/runtime/webapp/dist/assets/file-types-BzGqzhLB.js +76 -0
- package/runtime/webapp/dist/assets/{flowDiagram-HODETNUW-ArlsM9r6.js → flowDiagram-HODETNUW-CflNqqOn.js} +1 -1
- package/runtime/webapp/dist/assets/{ganttDiagram-EL5Y4UJY-Dvvo__aq.js → ganttDiagram-EL5Y4UJY-BXuekM-f.js} +1 -1
- package/runtime/webapp/dist/assets/{gitGraphDiagram-WWUBYQGX-DKj9atxo.js → gitGraphDiagram-WWUBYQGX-bYPad77G.js} +1 -1
- package/runtime/webapp/dist/assets/index-Br90NYRo.js +480 -0
- package/runtime/webapp/dist/assets/index-JtFzay7w.css +1 -0
- package/runtime/webapp/dist/assets/{infoDiagram-27XIBGKW-DA1CNgP1.js → infoDiagram-27XIBGKW-CQPIcUL0.js} +1 -1
- package/runtime/webapp/dist/assets/{ishikawaDiagram-5VMMS53U-Bzz8x4Zy.js → ishikawaDiagram-5VMMS53U-DEq3JCpB.js} +1 -1
- package/runtime/webapp/dist/assets/{journeyDiagram-3NMN7TZE-Y3BH_n1g.js → journeyDiagram-3NMN7TZE-BOsgjYtC.js} +1 -1
- package/runtime/webapp/dist/assets/{kanban-definition-UXKFOSKX-DS1Ve58t.js → kanban-definition-UXKFOSKX-DQoyHlvK.js} +7 -7
- package/runtime/webapp/dist/assets/{layout-CfOWc3sQ.js → layout-Dvzdsu8z.js} +1 -1
- package/runtime/webapp/dist/assets/{linear-DkUd48rz.js → linear-CZ1jj4Qd.js} +1 -1
- package/runtime/webapp/dist/assets/{loader-circle-dsSVZMYq.js → loader-circle-QarW4WFo.js} +1 -1
- package/runtime/webapp/dist/assets/{mermaid.core-CddJhkVB.js → mermaid.core-KMEOhVvg.js} +6 -6
- package/runtime/webapp/dist/assets/{mindmap-definition-YA3MSWOX-DXx99HkU.js → mindmap-definition-YA3MSWOX-D9I0keet.js} +2 -2
- package/runtime/webapp/dist/assets/page-AR_mj5nj.js +96 -0
- package/runtime/webapp/dist/assets/{pegDiagram-XKGWAZYB-BwMLZ0tL.js → pegDiagram-XKGWAZYB-DDAP2JW5.js} +1 -1
- package/runtime/webapp/dist/assets/{pieDiagram-E7YTZNPT-C8gUFc23.js → pieDiagram-E7YTZNPT-IH7ebgtF.js} +1 -1
- package/runtime/webapp/dist/assets/{quadrantDiagram-AXDQQJYC-C-PtyMFL.js → quadrantDiagram-AXDQQJYC-DPPZl9Er.js} +1 -1
- package/runtime/webapp/dist/assets/{railroadDiagram-O6MQD6OU-nslThfxz.js → railroadDiagram-O6MQD6OU-DNvgDa9Z.js} +1 -1
- package/runtime/webapp/dist/assets/{requirementDiagram-BXWQKSXE-if0DUYf7.js → requirementDiagram-BXWQKSXE-BnwKpB1I.js} +1 -1
- package/runtime/webapp/dist/assets/rotate-ccw-DpluTZOU.js +6 -0
- package/runtime/webapp/dist/assets/rotate-cw-7IpfF4VS.js +6 -0
- package/runtime/webapp/dist/assets/{sankeyDiagram-P5KCCOFB-CPb4_ZHM.js → sankeyDiagram-P5KCCOFB-6DPBxCTG.js} +1 -1
- package/runtime/webapp/dist/assets/send-zD9gXsHU.js +6 -0
- package/runtime/webapp/dist/assets/{sequenceDiagram-WJ2MYXX4-Dn-9ZqfF.js → sequenceDiagram-WJ2MYXX4-9tGhIDjG.js} +1 -1
- package/runtime/webapp/dist/assets/{sizeCapture-INFHLROL-CjHPSk27.js → sizeCapture-INFHLROL-DOG6MmJx.js} +1 -1
- package/runtime/webapp/dist/assets/smartphone-CMucPYln.js +31 -0
- package/runtime/webapp/dist/assets/{stateDiagram-D77RDMKH-BL3baCEN.js → stateDiagram-D77RDMKH-BH_8rviv.js} +1 -1
- package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-a8sCg_CM.js +1 -0
- package/runtime/webapp/dist/assets/{swimlanes-42K2YHIH-BN09MBkx.js → swimlanes-42K2YHIH-C1OBfphK.js} +1 -1
- package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-JsP2CwDv.js +8 -0
- package/runtime/webapp/dist/assets/{timeline-definition-24CTP7MA-CgKAJKgu.js → timeline-definition-24CTP7MA-C7NbwS8G.js} +3 -3
- package/runtime/webapp/dist/assets/trash-2-CzmPRys1.js +21 -0
- package/runtime/webapp/dist/assets/{vennDiagram-4TSXK5OY-DeEP3v2F.js → vennDiagram-4TSXK5OY-BAv8h8Fn.js} +5 -5
- package/runtime/webapp/dist/assets/{wardleyDiagram-VM6X3IG4-rTyuh5Av.js → wardleyDiagram-VM6X3IG4-DwXhvlJe.js} +1 -1
- package/runtime/webapp/dist/assets/{web-Cei097ms.js → web-BIr9lkvO.js} +1 -1
- package/runtime/webapp/dist/assets/{web-DG60RxuA.js → web-C9euibRI.js} +1 -1
- package/runtime/webapp/dist/assets/{chevron-down-CysQ4M-3.js → x-rqFWnP_p.js} +2 -2
- package/runtime/webapp/dist/assets/{xychartDiagram-S5SC5T6Z-CjF5xx6A.js → xychartDiagram-S5SC5T6Z-CRXqCYvA.js} +1 -1
- package/runtime/webapp/dist/index.html +2 -2
- package/runtime/ws-server.mjs +7 -3
- package/runtime/.next/static/chunks/326.567dcaf52a3fbf80.js +0 -1
- package/runtime/.next/static/chunks/app/web/error-c66f2c3664e334c6.js +0 -1
- package/runtime/.next/static/chunks/app/web/page-3c2c3c087cadf41d.js +0 -1
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-3fs8zete.mjs +0 -35
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-5kpyasem.mjs +0 -52
- package/runtime/webapp/dist/assets/App-w6e9nZ-Q.js +0 -266
- package/runtime/webapp/dist/assets/BrowserLivePanel-DEuXJ4vq.js +0 -91
- package/runtime/webapp/dist/assets/CollaborationDashboard-CijhO-vK.js +0 -111
- package/runtime/webapp/dist/assets/CollaborationPage-Bg8j3u9c.js +0 -31
- package/runtime/webapp/dist/assets/RemoteDesktopPage-Cq9ApzsP.js +0 -1
- package/runtime/webapp/dist/assets/arc-DZuN4ixE.js +0 -1
- package/runtime/webapp/dist/assets/architectureDiagram-5GKGNRK7-Csigcp2o.js +0 -36
- package/runtime/webapp/dist/assets/channel-DwbF84Ym.js +0 -1
- package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-DgDtTQpP.js +0 -1
- package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-DgDtTQpP.js +0 -1
- package/runtime/webapp/dist/assets/collaboration-D6LevPPr.js +0 -16
- package/runtime/webapp/dist/assets/index-CbdPFz5M.css +0 -1
- package/runtime/webapp/dist/assets/index-FmZ6gYce.js +0 -90
- package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-DOnqeVU9.js +0 -1
- package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-TqEoufoH.js +0 -8
- package/runtime/webapp/dist/assets/x-Brs7xU6O.js +0 -26
- /package/runtime/.next/static/{i1_xTY2YavI2psYlT44Ps → gT1sVPKvoSQGi2K39GoT_}/_buildManifest.js +0 -0
- /package/runtime/.next/static/{i1_xTY2YavI2psYlT44Ps → gT1sVPKvoSQGi2K39GoT_}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=820,e.ids=[820],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},
|
|
1
|
+
"use strict";(()=>{var e={};e.id=820,e.ids=[820],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},5881:e=>{e.exports=require("node:util")},3088:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>g,patchFetch:()=>v,requestAsyncStorage:()=>h,routeModule:()=>p,serverHooks:()=>f,staticGenerationAsyncStorage:()=>m});var n={};r.r(n),r.d(n,{GET:()=>c});var i=r(7786),s=r(5042),a=r(2184),o=r(7519),u=r(1614),l=r(1079);async function c(e){(0,l.j)();let t=new URL(e.url).searchParams.get("sessionId");if(!t)return new Response("sessionId is required",{status:400});if((0,u.V_)(t))return d(e,t);let r=!1,n=null,i=null;return new Response(new ReadableStream({start(s){let a=new TextEncoder,u=()=>{if(!r){r=!0,n?.(),n=null,i&&e.signal.removeEventListener("abort",i);try{s.close()}catch{}}},l=e=>{if(r)return!1;try{return s.enqueue(a.encode(e)),!0}catch{return u(),!1}};if(!l(": connected\n\n"))return;let c=Number.parseInt(e.headers.get("last-event-id")??"",10),d=Number.parseInt(new URL(e.url).searchParams.get("afterEventId")??"",10),p=Number.isSafeInteger(c)?c:Number.isSafeInteger(d)?d:o.agentHost.isSessionRunning(t)?0:o.agentHost.getLatestEventId(t);n=o.agentHost.subscribe(t,(e,t)=>{l(`id: ${t}
|
|
2
2
|
data: ${JSON.stringify(e)}
|
|
3
3
|
|
|
4
4
|
`)&&("done"===e.type||"error"===e.type)&&u()},p),i=u,e.signal.aborted?u():e.signal.addEventListener("abort",i,{once:!0})},cancel(){r=!0,n?.(),n=null,i&&e.signal.removeEventListener("abort",i)}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}async function d(e,t){let r=!1,n=null,i=null,s=(0,u.NL)(),a=new URL(e.url),o=Number.parseInt(a.searchParams.get("afterSequence")??"",10),l=a.searchParams.get("afterRunId"),c=e.headers.get("last-event-id");return new Response(new ReadableStream({async start(a){let u=new TextEncoder,d=()=>{if(!r){r=!0,n?.(),n=null,i&&e.signal.removeEventListener("abort",i);try{a.close()}catch{}}},p=e=>{if(r)return!1;try{return a.enqueue(u.encode(e)),!0}catch{return d(),!1}};if(p(": connected\n\n"))try{let r=await s.snapshot(t),a=function(e){if(!e)return null;let t=e.lastIndexOf(":");if(t<0){let t=Number.parseInt(e,10);return Number.isSafeInteger(t)?{runId:null,sequence:t}:null}let r=e.slice(0,t),n=Number.parseInt(e.slice(t+1),10);return r&&Number.isSafeInteger(n)?{runId:r,sequence:n}:null}(c),u=Number.isSafeInteger(o)?{runId:l,sequence:o}:null,h=a??u,m=h?h.runId&&h.runId!==r.runId?0:h.sequence:r.snapshotRevision;n=await s.subscribe(t,m,({runId:e,sequence:t,event:r})=>{let n={...r,_nativeRunId:e,_nativeSequence:t};p(`id: ${e}:${t}
|
|
@@ -7,7 +7,7 @@ data: ${JSON.stringify(n)}
|
|
|
7
7
|
`)&&("done"===r.type||"error"===r.type)&&d()}),i=d,e.signal.aborted?d():e.signal.addEventListener("abort",i,{once:!0})}catch(e){p(`event: error
|
|
8
8
|
data: ${JSON.stringify({type:"error",message:e instanceof Error?e.message:"Native stream failed"})}
|
|
9
9
|
|
|
10
|
-
`),d()}},cancel(){r=!0,n?.(),n=null,i&&e.signal.removeEventListener("abort",i)}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}let p=new i.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/api/agent/stream/route",pathname:"/api/agent/stream",filename:"route",bundlePath:"app/api/agent/stream/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release48-WLi1lw/repository/packages/server/app/api/agent/stream/route.ts",nextConfigOutput:"standalone",userland:n}),{requestAsyncStorage:h,staticGenerationAsyncStorage:m,serverHooks:f}=p,g="/api/agent/stream/route";function v(){return(0,a.patchFetch)({serverHooks:f,staticGenerationAsyncStorage:m})}},7786:(e,t,r)=>{e.exports=r(517)},1614:(e,t,r)=>{r.d(t,{NL:()=>E,V_:()=>w,WW:()=>y});var n=r(7561),i=r(612),s=r(9411),a=r(7718),o=r(1322);function u(e){if(!e.trim())return!1;try{return(0,n.accessSync)(e,n.constants.X_OK),!0}catch{return!1}}function l(e){try{return(0,o.wyD)((0,a.execFileSync)(e,["--version"],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]}))}catch{return}}function c(e){let t=[],r=process.env[e.environmentVariable]?.trim();if(r){let n=u(r);t.push({source:"pin",path:r,executable:n,version:n?l(r):void 0,error:n?void 0:`${e.environmentVariable} "${r}" is not executable`})}let n=function(e){for(let t of(process.env.PATH??"").split(s.delimiter).filter(Boolean)){let r=(0,s.resolve)(t,e);if(u(r))return r}}(e.name);return n&&n!==r&&t.push({source:"path",path:n,executable:!0,version:l(n)}),(0,o.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var d=r(535),p=r(6279),h=r(785);let m=globalThis;class f{constructor(e,t=async()=>[],r=process.platform){this.runtime=e,this.listProjects=t,this.platform=r,this.pendingCreations=new Map}health(){return this.runtime.health()}listModels(e){return this.runtime.listModels(e)}listWorkspaces(e,t){return this.runtime.listWorkspaces(e,t)}importWorkspace(e,t,r){if(!this.runtime.importWorkspace)throw new p.no("Native workspace import is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.importWorkspace(e,t,r)}async listWorkspaceSessions(e,t,r){let n=await this.runtime.listWorkspaceSessions(e,t,r);if(r?.cursor)return n;let i=new Set(n.data.map(e=>e.id)),s=n.data.map(e=>{let t=this.pendingCreations.get(e.id);return t?(this.pendingCreations.delete(e.id),g(e,t)):e});for(let r of this.pendingCreations.values())r.agentType!==e||r.projectId!==t||i.has(r.id)||s.unshift(r);return{...n,data:s}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return T(this.withPendingCreations(t).map(e=>N(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return T(this.withPendingCreations(t).map(e=>N(e,r,this.platform)),e)}async create(e){let t=N(await this.runtime.create(e),await this.listProjects(),this.platform),r=e.projectId?{...t,projectId:e.projectId}:t;return this.pendingCreations.set(r.id,r),r}async fork(e,t){if(!w(e))throw new p.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let r=N(t?await this.runtime.fork(e,t):await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(r.id,r),r}async delete(e){await this.runtime.delete(e),this.pendingCreations.delete(e)}async get(e,t){let r;try{r=await this.runtime.get(e,t)}catch(n){let r=this.pendingCreations.get(e);if(!r)throw n;return t?{...r,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...r,messages:[],events:[]}}return N(r,await this.listProjects(),this.platform)}async getQueryIndex(e){if(this.runtime.getQueryIndex)return this.runtime.getQueryIndex(e);let t=await this.runtime.get(e),{buildSessionQueryIndex:n}=await Promise.resolve().then(r.bind(r,1322));return n(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,r,n,i){return this.runtime.run(e,t,r,n,i)}steer(e,t){return this.runtime.steer(e,t)}abort(e){return this.runtime.abort(e)}async release(e){if(!this.runtime.release)throw new p.no("Native runtime release is unavailable","RUNTIME_UNAVAILABLE");await this.runtime.release(e)}answerQuestion(e,t){return this.runtime.answerQuestion(e,t)}async startRun(e,t,r,n="web",i){if(!this.runtime.startRun)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,n,i)}async subscribe(e,t,r){if(!this.runtime.subscribe)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.subscribe(e,t,r)}async snapshot(e,t=0){if(!this.runtime.snapshot)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.snapshot(e,t)}async setPermissionMode(e,t){if(!this.runtime.setPermissionMode)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.setPermissionMode(e,t)}async setNativeMode(e,t){if(!this.runtime.setNativeMode)throw new p.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativeMode(e,t)}async setNativePermissionPreset(e,t){if(!this.runtime.setNativePermissionPreset)throw new p.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativePermissionPreset(e,t)}async getNativeGoal(e){if(!this.runtime.getNativeGoal)throw new p.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.getNativeGoal(e)}async mutateNativeGoal(e,t){if(!this.runtime.mutateNativeGoal)throw new p.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.mutateNativeGoal(e,t)}async handoff(e,t){if(!this.runtime.handoff)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.handoff(e,t)}async getGoals(e,t="web"){if(!this.runtime.getGoals)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.getGoals(e,t)}async enqueueGoal(e,t,r,n="web"){if(!this.runtime.enqueueGoal)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,r,n)}async reorderGoals(e,t){if(!this.runtime.reorderGoals)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderGoals(e,t)}async cancelGoal(e,t){if(!this.runtime.cancelGoal)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelGoal(e,t,"web")}async enqueueMessage(e,t,r="web"){if(!this.runtime.enqueueMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueMessage(e,t,r)}async reorderMessages(e,t){if(!this.runtime.reorderMessages)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderMessages(e,t)}async updateMessage(e,t,r,n){if(!this.runtime.updateMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,r,n)}async cancelMessage(e,t){if(!this.runtime.cancelMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelMessage(e,t)}async steerMessage(e,t){if(!this.runtime.steerMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.steerMessage(e,t)}withPendingCreations(e){let t=new Set,r=e.map(e=>{t.add(e.id);let r=this.pendingCreations.get(e.id);return this.pendingCreations.delete(e.id),r?g(e,r):e});return[...[...this.pendingCreations.values()].filter(e=>!t.has(e.id)).sort((e,t)=>t.updated.localeCompare(e.updated)),...r]}}function g(e,t){return{...e,cwd:e.cwd||t.cwd,projectId:e.projectId??t.projectId}}function v(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function E(){if(!m.__nativeRuntimeService){!function(){let e=[(0,s.join)((0,i.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(s.delimiter),r=e.filter(e=>(0,n.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(s.delimiter))}();let e=new o.XWE((0,h.kO)());m.__nativeRuntimeService=new f((0,p.v6)({runtimeFactory:e=>{let t=c({name:"codex",environmentVariable:"AGENT_CODEX_BIN",minimumVersion:o.hix}),r=c({name:"opencode",environmentVariable:"AGENT_OPENCODE_BIN"});return process.pid,v("AGENT_CODEX_RUNTIME_ERROR",t),v("AGENT_OPENCODE_RUNTIME_ERROR",r),(0,d.L)().info("native runtime host elected",{pid:process.pid,codex:t.executable??null,codexSource:t.source??null,codexDetail:t.detail,opencode:r.executable??null,opencodeDetail:r.detail}),(0,p.WH)(t.executable??"codex",e,r.executable??"opencode")}}),()=>e.list())}return m.__nativeRuntimeService}function N(e,t,r=process.platform){let{projectId:n,...i}=e;if(!e.cwd)return i;let a=b(e.cwd,r),o="win32"===r?s.win32.sep:s.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:b(e.description,r)})).filter(({path:e})=>a===e||a.startsWith(`${e}${o}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...i,projectId:u.project.id}:i}function b(e,t=process.platform){if("win32"!==t)return(0,s.resolve)(e);let r=s.win32.resolve(e),n=s.win32.parse(r).root;return(r.length>n.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function T(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function w(e){try{return"customer-agent"!==(0,p.Vu)(e).agentType}catch{return!1}}function y(e){if(e instanceof p.no)switch(e.code){case"SESSION_NOT_FOUND":return 404;case"SESSION_OCCUPIED":case"SESSION_ALREADY_RUNNING":case"APPROVAL_EXPIRED":case"CODEX_SESSION_VERSION_INCOMPATIBLE":case"STALE_SESSION_ANCHOR":case"NATIVE_GOAL_CONFLICT":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}},1079:(e,t,r)=>{r.d(t,{j:()=>c});var n=r(7519),i=r(3931),s=r(535),a=r(1322),o=r(1982);let u=!1,l=new a.sSf;function c(){u||(u=!0,n.agentHost.setGlobalEventObserver((e,t,r)=>{try{if("ask_user"===t.type){(0,i.i)().notifySession({notificationId:`${e}:${t.questionId}:approval`,sessionId:e,kind:"approval",title:"需要你的审批",body:"string"==typeof t.question&&t.question.trim()?t.question.trim().slice(0,160):"会话正在等待确认",url:"/app/"});return}if("done"===t.type){if("goal"===r.source)return;let n=(0,a.mDL)((0,o.dp)().read().taskNotifications),s=r.runId?(0,a.DXW)({sessionId:e,runId:r.runId,title:"任务已完成",finalText:t.finalText,outcome:"completed",source:"user"},n):null;s&&l.accept(s.notificationId)&&(0,i.i)().notifySession({...s,url:`/app/?session=${encodeURIComponent(e)}`});return}if("goal_updated"===t.type&&"complete"===t.goal.status){let r=(0,a.mDL)((0,o.dp)().read().taskNotifications),n=(0,a.DXW)({sessionId:e,runId:`goal:${t.goal.createdAt}`,title:"目标已完成",finalText:t.goal.objective,outcome:"completed",source:"goal",goalFinished:!0},r);n&&l.accept(n.notificationId)&&(0,i.i)().notifySession({...n,url:`/app/?session=${encodeURIComponent(e)}`});return}"error"===t.type&&(0,i.i)().notifySession({notificationId:`${e}:${r.runId??"unknown"}:error`,sessionId:e,kind:"error",title:"会话出错",body:"string"==typeof t.message&&t.message.trim()?t.message.trim().slice(0,160):"运行失败",url:"/app/"})}catch(t){(0,s.L)().warn("web push notify failed",{sessionId:e,error:t instanceof Error?t.message:String(t)})}}))}},1489:(e,t,r)=>{r.d(t,{N:()=>u});var n=r(1322),i=r(6279),s=r(785);class a{constructor(){this.tasks=new n.vo4((0,s.kO)()),this.scheduler=new i.ST(this.tasks,e=>{this.fire(e).catch(e=>console.error("Scheduled Customer Agent run failed",e))},()=>{}),this.scheduler.start()}async fire(e){let{agentHost:t}=await r.e(7519).then(r.bind(r,7519)),{getCustomerGoalCoordinator:n}=await Promise.all([r.e(7519),r.e(732)]).then(r.bind(r,732)),i=e.sessionId;i&&await t.getSessionStore().get(i)||(i=(await t.createSession(e.label||"定时任务")).id,this.tasks.update(e.id,{sessionId:i})),await n().enqueue(i,e.prompt)}call(e,t){let r=String(t[0]||"");switch(e){case"cronList":return this.tasks.list();case"cronCreate":{if("string"!=typeof t[0]||"string"!=typeof t[1]||!t[1].trim())throw Error("cron and prompt required");let e=t[2]&&"object"==typeof t[2]?t[2]:{};return this.tasks.create({cron:t[0],prompt:t[1],recurring:!1!==e.recurring,enabled:!0,durable:!0,..."string"==typeof e.sessionId?{sessionId:e.sessionId}:{},..."string"==typeof e.label?{label:e.label}:{}})}case"cronPause":return this.tasks.pause(r);case"cronResume":return this.tasks.resume(r);case"cronDelete":return this.tasks.delete(r);case"cronDeleteAll":return this.tasks.deleteAll(),{ok:!0};default:throw Error("Unsupported schedule operation")}}}let o=globalThis;function u(){return o.__sharedCronService??=new a}},3931:(e,t,r)=>{r.d(t,{i:()=>p});var n=r(6005),i=r(7561),s=r(9411),a=r(5890);let o=require("web-push"),u=e=>JSON.stringify(e??null);class l{constructor(e,t=Date.now){this.now=t;let r=(0,s.resolve)(e,".agentroam-auth");(0,i.mkdirSync)(r,{recursive:!0,mode:448});let n=(0,s.join)(r,"push.sqlite");this.db=new a(n),(0,i.chmodSync)(n,384),this.db.pragma("busy_timeout = 5000"),this.db.exec(`
|
|
10
|
+
`),d()}},cancel(){r=!0,n?.(),n=null,i&&e.signal.removeEventListener("abort",i)}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}let p=new i.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/api/agent/stream/route",pathname:"/api/agent/stream",filename:"route",bundlePath:"app/api/agent/stream/route"},resolvedPagePath:"/private/tmp/agentroam-npm-preview49.GAVmnh/source/packages/server/app/api/agent/stream/route.ts",nextConfigOutput:"standalone",userland:n}),{requestAsyncStorage:h,staticGenerationAsyncStorage:m,serverHooks:f}=p,g="/api/agent/stream/route";function v(){return(0,a.patchFetch)({serverHooks:f,staticGenerationAsyncStorage:m})}},7786:(e,t,r)=>{e.exports=r(517)},1614:(e,t,r)=>{r.d(t,{NL:()=>E,V_:()=>w,WW:()=>y});var n=r(7561),i=r(612),s=r(9411),a=r(7718),o=r(1322);function u(e){if(!e.trim())return!1;try{return(0,n.accessSync)(e,n.constants.X_OK),!0}catch{return!1}}function l(e){try{return(0,o.wyD)((0,a.execFileSync)(e,["--version"],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]}))}catch{return}}function c(e){let t=[],r=process.env[e.environmentVariable]?.trim();if(r){let n=u(r);t.push({source:"pin",path:r,executable:n,version:n?l(r):void 0,error:n?void 0:`${e.environmentVariable} "${r}" is not executable`})}let n=function(e){for(let t of(process.env.PATH??"").split(s.delimiter).filter(Boolean)){let r=(0,s.resolve)(t,e);if(u(r))return r}}(e.name);return n&&n!==r&&t.push({source:"path",path:n,executable:!0,version:l(n)}),(0,o.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var d=r(535),p=r(6279),h=r(785);let m=globalThis;class f{constructor(e,t=async()=>[],r=process.platform){this.runtime=e,this.listProjects=t,this.platform=r,this.pendingCreations=new Map}health(){return this.runtime.health()}listModels(e){return this.runtime.listModels(e)}listWorkspaces(e,t){return this.runtime.listWorkspaces(e,t)}importWorkspace(e,t,r){if(!this.runtime.importWorkspace)throw new p.no("Native workspace import is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.importWorkspace(e,t,r)}async listWorkspaceSessions(e,t,r){let n=await this.runtime.listWorkspaceSessions(e,t,r);if(r?.cursor)return n;let i=new Set(n.data.map(e=>e.id)),s=n.data.map(e=>{let t=this.pendingCreations.get(e.id);return t?(this.pendingCreations.delete(e.id),g(e,t)):e});for(let r of this.pendingCreations.values())r.agentType!==e||r.projectId!==t||i.has(r.id)||s.unshift(r);return{...n,data:s}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return b(this.withPendingCreations(t).map(e=>N(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return b(this.withPendingCreations(t).map(e=>N(e,r,this.platform)),e)}async create(e){let t=N(await this.runtime.create(e),await this.listProjects(),this.platform),r=e.projectId?{...t,projectId:e.projectId}:t;return this.pendingCreations.set(r.id,r),r}async fork(e,t){if(!w(e))throw new p.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let r=N(t?await this.runtime.fork(e,t):await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(r.id,r),r}async delete(e){await this.runtime.delete(e),this.pendingCreations.delete(e)}async get(e,t){let r;try{r=await this.runtime.get(e,t)}catch(n){let r=this.pendingCreations.get(e);if(!r)throw n;return t?{...r,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...r,messages:[],events:[]}}return N(r,await this.listProjects(),this.platform)}async getQueryIndex(e){if(this.runtime.getQueryIndex)return this.runtime.getQueryIndex(e);let t=await this.runtime.get(e),{buildSessionQueryIndex:n}=await Promise.resolve().then(r.bind(r,1322));return n(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,r,n,i){return this.runtime.run(e,t,r,n,i)}steer(e,t){return this.runtime.steer(e,t)}abort(e){return this.runtime.abort(e)}async release(e){if(!this.runtime.release)throw new p.no("Native runtime release is unavailable","RUNTIME_UNAVAILABLE");await this.runtime.release(e)}answerQuestion(e,t){return this.runtime.answerQuestion(e,t)}async startRun(e,t,r,n="web",i){if(!this.runtime.startRun)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,n,i)}async subscribe(e,t,r){if(!this.runtime.subscribe)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.subscribe(e,t,r)}async snapshot(e,t=0){if(!this.runtime.snapshot)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.snapshot(e,t)}async setPermissionMode(e,t){if(!this.runtime.setPermissionMode)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.setPermissionMode(e,t)}async setNativeMode(e,t){if(!this.runtime.setNativeMode)throw new p.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativeMode(e,t)}async setNativePermissionPreset(e,t){if(!this.runtime.setNativePermissionPreset)throw new p.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativePermissionPreset(e,t)}async getNativeGoal(e){if(!this.runtime.getNativeGoal)throw new p.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.getNativeGoal(e)}async mutateNativeGoal(e,t){if(!this.runtime.mutateNativeGoal)throw new p.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.mutateNativeGoal(e,t)}async handoff(e,t){if(!this.runtime.handoff)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.handoff(e,t)}async getGoals(e,t="web"){if(!this.runtime.getGoals)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.getGoals(e,t)}async enqueueGoal(e,t,r,n="web"){if(!this.runtime.enqueueGoal)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,r,n)}async reorderGoals(e,t){if(!this.runtime.reorderGoals)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderGoals(e,t)}async cancelGoal(e,t){if(!this.runtime.cancelGoal)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelGoal(e,t,"web")}async enqueueMessage(e,t,r="web"){if(!this.runtime.enqueueMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueMessage(e,t,r)}async reorderMessages(e,t){if(!this.runtime.reorderMessages)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderMessages(e,t)}async updateMessage(e,t,r,n){if(!this.runtime.updateMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,r,n)}async cancelMessage(e,t){if(!this.runtime.cancelMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelMessage(e,t)}async steerMessage(e,t){if(!this.runtime.steerMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.steerMessage(e,t)}withPendingCreations(e){let t=new Set,r=e.map(e=>{t.add(e.id);let r=this.pendingCreations.get(e.id);return this.pendingCreations.delete(e.id),r?g(e,r):e});return[...[...this.pendingCreations.values()].filter(e=>!t.has(e.id)).sort((e,t)=>t.updated.localeCompare(e.updated)),...r]}}function g(e,t){return{...e,cwd:e.cwd||t.cwd,projectId:e.projectId??t.projectId}}function v(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function E(){if(!m.__nativeRuntimeService){!function(){let e=[(0,s.join)((0,i.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(s.delimiter),r=e.filter(e=>(0,n.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(s.delimiter))}();let e=new o.XWE((0,h.kO)());m.__nativeRuntimeService=new f((0,p.v6)({runtimeFactory:e=>{let t=c({name:"codex",environmentVariable:"AGENT_CODEX_BIN",minimumVersion:o.hix}),r=c({name:"opencode",environmentVariable:"AGENT_OPENCODE_BIN"});return process.pid,v("AGENT_CODEX_RUNTIME_ERROR",t),v("AGENT_OPENCODE_RUNTIME_ERROR",r),(0,d.L)().info("native runtime host elected",{pid:process.pid,codex:t.executable??null,codexSource:t.source??null,codexDetail:t.detail,opencode:r.executable??null,opencodeDetail:r.detail}),(0,p.WH)(t.executable??"codex",e,r.executable??"opencode")}}),()=>e.list())}return m.__nativeRuntimeService}function N(e,t,r=process.platform){let{projectId:n,...i}=e;if(!e.cwd)return i;let a=T(e.cwd,r),o="win32"===r?s.win32.sep:s.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:T(e.description,r)})).filter(({path:e})=>a===e||a.startsWith(`${e}${o}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...i,projectId:u.project.id}:i}function T(e,t=process.platform){if("win32"!==t)return(0,s.resolve)(e);let r=s.win32.resolve(e),n=s.win32.parse(r).root;return(r.length>n.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function b(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function w(e){try{return"customer-agent"!==(0,p.Vu)(e).agentType}catch{return!1}}function y(e){if(e instanceof p.no)switch(e.code){case"SESSION_NOT_FOUND":return 404;case"SESSION_OCCUPIED":case"SESSION_ALREADY_RUNNING":case"APPROVAL_EXPIRED":case"CODEX_SESSION_VERSION_INCOMPATIBLE":case"STALE_SESSION_ANCHOR":case"NATIVE_GOAL_CONFLICT":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}},1079:(e,t,r)=>{r.d(t,{j:()=>c});var n=r(7519),i=r(3931),s=r(535),a=r(1322),o=r(1982);let u=!1,l=new a.sSf;function c(){u||(u=!0,n.agentHost.setGlobalEventObserver((e,t,r)=>{try{if("ask_user"===t.type){(0,i.i)().notifySession({notificationId:`${e}:${t.questionId}:approval`,sessionId:e,kind:"approval",title:"需要你的审批",body:"string"==typeof t.question&&t.question.trim()?t.question.trim().slice(0,160):"会话正在等待确认",url:"/app/"});return}if("done"===t.type){if("goal"===r.source)return;let n=(0,a.mDL)((0,o.dp)().read().taskNotifications),s=r.runId?(0,a.DXW)({sessionId:e,runId:r.runId,title:"任务已完成",finalText:t.finalText,outcome:"completed",source:"user"},n):null;s&&l.accept(s.notificationId)&&(0,i.i)().notifySession({...s,url:`/app/?session=${encodeURIComponent(e)}`});return}if("goal_updated"===t.type&&"complete"===t.goal.status){let r=(0,a.mDL)((0,o.dp)().read().taskNotifications),n=(0,a.DXW)({sessionId:e,runId:`goal:${t.goal.createdAt}`,title:"目标已完成",finalText:t.goal.objective,outcome:"completed",source:"goal",goalFinished:!0},r);n&&l.accept(n.notificationId)&&(0,i.i)().notifySession({...n,url:`/app/?session=${encodeURIComponent(e)}`});return}"error"===t.type&&(0,i.i)().notifySession({notificationId:`${e}:${r.runId??"unknown"}:error`,sessionId:e,kind:"error",title:"会话出错",body:"string"==typeof t.message&&t.message.trim()?t.message.trim().slice(0,160):"运行失败",url:"/app/"})}catch(t){(0,s.L)().warn("web push notify failed",{sessionId:e,error:t instanceof Error?t.message:String(t)})}}))}},1489:(e,t,r)=>{r.d(t,{N:()=>u});var n=r(1322),i=r(6279),s=r(785);class a{constructor(){this.tasks=new n.vo4((0,s.kO)()),this.scheduler=new i.ST(this.tasks,e=>{this.fire(e).catch(e=>console.error("Scheduled Customer Agent run failed",e))},()=>{}),this.scheduler.start()}async fire(e){let{agentHost:t}=await r.e(7519).then(r.bind(r,7519)),{getCustomerGoalCoordinator:n}=await Promise.all([r.e(7519),r.e(732)]).then(r.bind(r,732)),i=e.sessionId;i&&await t.getSessionStore().get(i)||(i=(await t.createSession(e.label||"定时任务")).id,this.tasks.update(e.id,{sessionId:i})),await n().enqueue(i,e.prompt)}call(e,t){let r=String(t[0]||"");switch(e){case"cronList":return this.tasks.list();case"cronCreate":{if("string"!=typeof t[0]||"string"!=typeof t[1]||!t[1].trim())throw Error("cron and prompt required");let e=t[2]&&"object"==typeof t[2]?t[2]:{};return this.tasks.create({cron:t[0],prompt:t[1],recurring:!1!==e.recurring,enabled:!0,durable:!0,..."string"==typeof e.sessionId?{sessionId:e.sessionId}:{},..."string"==typeof e.label?{label:e.label}:{}})}case"cronPause":return this.tasks.pause(r);case"cronResume":return this.tasks.resume(r);case"cronDelete":return this.tasks.delete(r);case"cronDeleteAll":return this.tasks.deleteAll(),{ok:!0};default:throw Error("Unsupported schedule operation")}}}let o=globalThis;function u(){return o.__sharedCronService??=new a}},3931:(e,t,r)=>{r.d(t,{i:()=>p});var n=r(6005),i=r(7561),s=r(9411),a=r(5890);let o=require("web-push"),u=e=>JSON.stringify(e??null);class l{constructor(e,t=Date.now){this.now=t;let r=(0,s.resolve)(e,".agentroam-auth");(0,i.mkdirSync)(r,{recursive:!0,mode:448});let n=(0,s.join)(r,"push.sqlite");this.db=new a(n),(0,i.chmodSync)(n,384),this.db.pragma("busy_timeout = 5000"),this.db.exec(`
|
|
11
11
|
CREATE TABLE IF NOT EXISTS push_keys (id INTEGER PRIMARY KEY CHECK(id=1), public_key TEXT NOT NULL, private_key TEXT NOT NULL);
|
|
12
12
|
CREATE TABLE IF NOT EXISTS push_subscriptions (
|
|
13
13
|
endpoint_hash TEXT PRIMARY KEY,
|
|
@@ -21,4 +21,4 @@ data: ${JSON.stringify({type:"error",message:e instanceof Error?e.message:"Nativ
|
|
|
21
21
|
INSERT INTO push_subscriptions (endpoint_hash, endpoint, p256dh, auth, device_id, created)
|
|
22
22
|
VALUES (?, ?, ?, ?, ?, ?)
|
|
23
23
|
ON CONFLICT(endpoint_hash) DO UPDATE SET p256dh=excluded.p256dh, auth=excluded.auth, device_id=excluded.device_id
|
|
24
|
-
`).run(c(r),r,n,i,"string"==typeof e?e:null,this.now()),{ok:!0}}deleteSubscription(e){if("string"!=typeof e||!e)throw Object.assign(Error("Endpoint required"),{status:400});return this.db.prepare("DELETE FROM push_subscriptions WHERE endpoint_hash=?").run(c(e)),{ok:!0}}listSubscriptions(){return this.db.prepare("SELECT endpoint, p256dh, auth, device_id FROM push_subscriptions").all().map(e=>({endpoint:e.endpoint,keys:{p256dh:e.p256dh,auth:e.auth},deviceId:e.device_id}))}notifySession({notificationId:e,sessionId:t,title:r,body:n,url:i}){let s=e||`${t}:notification`;if(!this.delivered.has(s)){for(this.delivered.add(s);this.delivered.size>500;)this.delivered.delete(this.delivered.values().next().value);this.sendToAll({notificationId:s,sessionId:t,title:r,body:n,tag:s,url:i})}}async sendToAll(e){let t=this.listSubscriptions();await Promise.allSettled(t.map(t=>this.send(t,e)))}async send(e,t){try{o.setVapidDetails("mailto:agentroam@localhost",this.keys.publicKey,this.keys.privateKey),await o.sendNotification(e,u(t),{TTL:3600})}catch(r){let t=r?.statusCode;(404===t||410===t)&&this.db.prepare("DELETE FROM push_subscriptions WHERE endpoint_hash=?").run(c(e.endpoint))}}close(){this.db.close()}}function c(e){return(0,n.createHash)("sha256").update(e).digest("hex")}let d=null;function p(e=process.env.AGENT_DATA_DIR?.trim()||process.cwd()){return d??=new l(e)}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),n=t.X(0,[8375,6244,1322,1773,4621,7519],()=>r(
|
|
24
|
+
`).run(c(r),r,n,i,"string"==typeof e?e:null,this.now()),{ok:!0}}deleteSubscription(e){if("string"!=typeof e||!e)throw Object.assign(Error("Endpoint required"),{status:400});return this.db.prepare("DELETE FROM push_subscriptions WHERE endpoint_hash=?").run(c(e)),{ok:!0}}listSubscriptions(){return this.db.prepare("SELECT endpoint, p256dh, auth, device_id FROM push_subscriptions").all().map(e=>({endpoint:e.endpoint,keys:{p256dh:e.p256dh,auth:e.auth},deviceId:e.device_id}))}notifySession({notificationId:e,sessionId:t,title:r,body:n,url:i}){let s=e||`${t}:notification`;if(!this.delivered.has(s)){for(this.delivered.add(s);this.delivered.size>500;)this.delivered.delete(this.delivered.values().next().value);this.sendToAll({notificationId:s,sessionId:t,title:r,body:n,tag:s,url:i})}}async sendToAll(e){let t=this.listSubscriptions();await Promise.allSettled(t.map(t=>this.send(t,e)))}async send(e,t){try{o.setVapidDetails("mailto:agentroam@localhost",this.keys.publicKey,this.keys.privateKey),await o.sendNotification(e,u(t),{TTL:3600})}catch(r){let t=r?.statusCode;(404===t||410===t)&&this.db.prepare("DELETE FROM push_subscriptions WHERE endpoint_hash=?").run(c(e.endpoint))}}close(){this.db.close()}}function c(e){return(0,n.createHash)("sha256").update(e).digest("hex")}let d=null;function p(e=process.env.AGENT_DATA_DIR?.trim()||process.cwd()){return d??=new l(e)}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),n=t.X(0,[8375,6244,1322,1773,4621,7519],()=>r(3088));module.exports=n})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=4612,e.ids=[4612],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},
|
|
1
|
+
"use strict";(()=>{var e={};e.id=4612,e.ids=[4612],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},5881:e=>{e.exports=require("node:util")},6733:(e,r,s)=>{s.r(r),s.d(r,{originalPathname:()=>h,patchFetch:()=>k,requestAsyncStorage:()=>q,routeModule:()=>x,serverHooks:()=>f,staticGenerationAsyncStorage:()=>w});var t={};s.r(t),s.d(t,{GET:()=>g});var o=s(7786),a=s(5042),n=s(2184),i=s(1890),p=s(1322),u=s(6279),d=s(7519),c=s(1614),l=s(355),m=s(6405);async function g(e,r){let s;let t=new URL(e.url),o=(0,m.ql)(t.searchParams.get("agentType"));if(!o)return i.NextResponse.json({error:"A valid agentType is required"},{status:400});try{let e=(0,m.MT)(t);s={cursor:e.cursor,limit:e.limit,refresh:e.refresh}}catch(e){return i.NextResponse.json({error:e instanceof Error?e.message:"Invalid query"},{status:400})}try{let e;if("customer-agent"!==o){let e=await (0,c.NL)().listWorkspaceSessions(o,r.params.workspaceId,s),t=(0,l.v)();return i.NextResponse.json({...e,data:e.data.filter(e=>!t.has(e.id))})}let t="",a=null;if(r.params.workspaceId===m.rK){let[r,s]=await Promise.all([d.agentHost.getProjectStore().list(),d.agentHost.getSessionStore().list()]),t=new Set(r.filter(e=>e.description.trim().length>0).map(e=>e.id));e=s.filter(e=>!t.has(e.projectId))}else{let s=await d.agentHost.getProjectStore().get(r.params.workspaceId);if(!s)return i.NextResponse.json({error:"Workspace not found"},{status:404});if(!s.description.trim())return i.NextResponse.json({error:"该项目没有宿主机目录",code:"PROJECT_PATH_REQUIRED"},{status:400});t=s.description,a=s.updated,e=await d.agentHost.getSessionStore().list(s.id)}let n=e.filter(e=>!e.metadata.collaborationGroupId).map(({messages:e,events:s,...o})=>({...o,projectId:r.params.workspaceId,agentType:"customer-agent",nativeSessionId:o.id,cwd:t,occupancy:d.agentHost.isSessionRunning(o.id)?"owned-by-customer-agent":"available",sourceLabel:"Customer Agent",canResume:!0,canDelete:!d.agentHost.isSessionRunning(o.id),permissionMode:(0,p.NyU)(o.metadata.permissionMode)})).sort((e,r)=>r.updated.localeCompare(e.updated));return i.NextResponse.json((0,u.L)(n,s,n[0]?.updated??a))}catch(e){return i.NextResponse.json({error:e instanceof Error?e.message:"Workspace sessions failed"},{status:(0,c.WW)(e)})}}let x=new o.AppRouteRouteModule({definition:{kind:a.x.APP_ROUTE,page:"/api/agent-workspaces/[workspaceId]/sessions/route",pathname:"/api/agent-workspaces/[workspaceId]/sessions",filename:"route",bundlePath:"app/api/agent-workspaces/[workspaceId]/sessions/route"},resolvedPagePath:"/private/tmp/agentroam-npm-preview49.GAVmnh/source/packages/server/app/api/agent-workspaces/[workspaceId]/sessions/route.ts",nextConfigOutput:"standalone",userland:t}),{requestAsyncStorage:q,staticGenerationAsyncStorage:w,serverHooks:f}=x,h="/api/agent-workspaces/[workspaceId]/sessions/route";function k(){return(0,n.patchFetch)({serverHooks:f,staticGenerationAsyncStorage:w})}},355:(e,r,s)=>{s.d(r,{v:()=>a});var t=s(1322),o=s(785);function a(){return new t.BYZ((0,o.kO)()).memberSessionIds()}}};var r=require("../../../../../webpack-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[8375,6703,6244,1322,1773,4621,7519,2293],()=>s(6733));module.exports=t})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=8593,e.ids=[8593],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},
|
|
1
|
+
"use strict";(()=>{var e={};e.id=8593,e.ids=[8593],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},5881:e=>{e.exports=require("node:util")},4750:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>j,patchFetch:()=>O,requestAsyncStorage:()=>E,routeModule:()=>T,serverHooks:()=>R,staticGenerationAsyncStorage:()=>N});var s={};r.r(s),r.d(s,{DELETE:()=>q,GET:()=>v,POST:()=>k});var o=r(7786),a=r(5042),n=r(2184),i=r(1890),c=r(6279),p=r(7519),u=r(1614),d=r(9142),l=r(6005),h=r(7561),m=r(9411),y=r(785);class g{constructor(e){this.filePath=e}read(){try{return JSON.parse((0,h.readFileSync)(this.filePath,"utf8"))}catch(e){if("ENOENT"===e.code)return[];throw e}}write(e){(0,h.mkdirSync)((0,m.dirname)(this.filePath),{recursive:!0});let t=`${this.filePath}.${(0,l.randomUUID)()}.tmp`;(0,h.writeFileSync)(t,JSON.stringify(e),{mode:384}),(0,h.renameSync)(t,this.filePath)}visible(e){let t=this.read();return e.filter(e=>!t.some(t=>t.agentType===e.agentType&&t.workspaceId===e.workspaceId&&t.roots.length===e.roots.length&&t.roots.every(t=>e.roots.includes(t))))}remove(e){if(0===e.roots.length||e.roots.some(e=>{try{return(0,h.statSync)(e).isDirectory()}catch(t){let e=t.code;if("ENOENT"===e||"ENOTDIR"===e)return!1;throw t}}))throw Object.assign(Error("目录仍然有效,请刷新目录列表"),{status:409});let t=this.read().filter(t=>t.agentType!==e.agentType||t.workspaceId!==e.workspaceId);t.push({agentType:e.agentType,workspaceId:e.workspaceId,roots:e.roots}),this.write(t)}restore(e,t){let r=this.read(),s=r.filter(r=>r.agentType!==e||!r.roots.includes(t));s.length!==r.length&&this.write(s)}}function f(){return new g((0,m.join)((0,y.kO)(),".agent-data","removed-workspaces.json"))}var w=r(6405);async function x(e,t){if("customer-agent"!==e)return(0,u.NL)().listWorkspaces(e,t);let r=(await p.agentHost.getProjectStore().list()).filter(e=>e.description.trim().length>0&&!e.id.startsWith("collaboration-")),s=[{agentType:e,workspaceId:w.rK,name:"最近",roots:[],order:-1,source:"derived",canCreateSession:!1},...r.map((t,r)=>({agentType:e,workspaceId:t.id,name:t.name,roots:t.description?[t.description]:[],order:r,updatedAt:t.updated,source:"native"}))];return(0,c.L)(s,t,r[0]?.updated??null)}async function v(e){let t;let r=new URL(e.url),s=(0,w.ql)(r.searchParams.get("agentType"));if(!s)return i.NextResponse.json({error:"A valid agentType is required"},{status:400});try{t=(0,w.MT)(r)}catch(e){return i.NextResponse.json({error:e instanceof Error?e.message:"Invalid query"},{status:400})}try{let e=await x(s,t);return i.NextResponse.json({...e,data:f().visible(e.data)})}catch(e){return i.NextResponse.json({error:e instanceof Error?e.message:"Workspace discovery failed"},{status:(0,u.WW)(e)})}}async function q(e){let t=new URL(e.url),r=(0,w.ql)(t.searchParams.get("agentType")),s=t.searchParams.get("workspaceId");if(!r||!s)return i.NextResponse.json({error:"A valid agentType and workspaceId are required"},{status:400});try{let e=null;do{let t=await x(r,{cursor:e,limit:200,refresh:!0}),o=t.data.find(e=>e.workspaceId===s);if(o)return f().remove(o),i.NextResponse.json({removed:!0,workspaceId:s});e=t.nextCursor}while(e);return i.NextResponse.json({error:"目录不存在,请刷新目录列表"},{status:404})}catch(e){return i.NextResponse.json({error:e instanceof Error?e.message:"目录删除失败"},{status:e.status??(0,u.WW)(e)})}}async function k(e){let t;try{t=await e.json()}catch{return i.NextResponse.json({error:"A JSON body is required"},{status:400})}let r=(0,w.ql)(t.agentType??null);if(!r||!t.path?.trim())return i.NextResponse.json({error:"A valid agentType and path are required"},{status:400});try{let e=d.a.canonicalDirectory(t.path);if("customer-agent"!==r){let s=await (0,u.NL)().importWorkspace(r,e,t.name);return f().restore(r,e),i.NextResponse.json(s,{status:201})}let s=await d.a.list(),o=await d.a.create(e,t.name);return f().restore(r,e),i.NextResponse.json({workspace:{agentType:r,workspaceId:o.id,name:o.name,roots:o.description?[o.description]:[],order:Math.max(0,s.findIndex(e=>e.id===o.id)),updatedAt:o.updated,source:"native"},existing:s.some(e=>e.id===o.id)},{status:201})}catch(t){let e=(0,d.r)(t);if(500!==e.status)return i.NextResponse.json(e.body,{status:e.status});return i.NextResponse.json({error:t instanceof Error?t.message:"Workspace import failed"},{status:(0,u.WW)(t)})}}let T=new o.AppRouteRouteModule({definition:{kind:a.x.APP_ROUTE,page:"/api/agent-workspaces/route",pathname:"/api/agent-workspaces",filename:"route",bundlePath:"app/api/agent-workspaces/route"},resolvedPagePath:"/private/tmp/agentroam-npm-preview49.GAVmnh/source/packages/server/app/api/agent-workspaces/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:E,staticGenerationAsyncStorage:N,serverHooks:R}=T,j="/api/agent-workspaces/route";function O(){return(0,n.patchFetch)({serverHooks:R,staticGenerationAsyncStorage:N})}},9142:(e,t,r)=>{r.d(t,{r:()=>l,a:()=>d});var s=r(612),o=r(1322),a=r(785),n=r(7561),i=r(9411),c=r(6005);class p extends Error{constructor(e,t,r){super(e),this.code=t,this.status=r,this.name="WebProjectError"}}class u{constructor(e,t,r=t.roots[0]){this.store=e,this.paths=t,this.installationDirectory=r}list(){return this.store.list()}async get(e){let t=await this.store.get(e);if(!t)throw new p("项目不存在","PROJECT_NOT_FOUND",404);return t}async create(e,t){let r=this.paths.assertDirectory(e);for(let e of(await this.store.list()))if(!e.id.startsWith("collaboration-"))try{if(this.paths.assertDirectory(e.description)===r)return e}catch{}let s=new Date().toISOString();return this.store.create({id:(0,c.randomUUID)(),name:t?.trim()||(0,i.basename)(r)||r,description:r,created:s,updated:s})}async rename(e,t){await this.get(e);let r=t.trim();if(!r)throw new p("项目名称不能为空","PROJECT_NAME_REQUIRED",400);return this.store.update(e,{name:r})}async delete(e){await this.get(e),await this.store.delete(e)}roots(){return this.paths.roots}pickerLocation(){return{roots:this.paths.roots,initialPath:this.paths.assertDirectory(this.installationDirectory)}}directories(e){return this.paths.listDirectories(e)}check(e){try{return this.paths.assertDirectory(e),!0}catch{return!1}}canonicalDirectory(e){return this.paths.assertDirectory(e)}}let d=new u(new o.XWE((0,a.kO)()),o.Tpv.fromEnvironment(process.env.AGENT_WEB_ROOTS,(0,s.homedir)()),function(e,t=process.env,r=(0,s.homedir)()){let o=t.AGENTROAM_DATA_DIR?.trim();if(o)return(0,i.resolve)(o);let a=(0,i.join)(r,".agentroam");try{if((0,n.statSync)(a).isDirectory())return a}catch{}return(0,i.resolve)(e)}((0,a.kO)()));function l(e){return e instanceof p?{status:e.status,body:{error:e.message,code:e.code}}:e instanceof o.TLe?{status:400,body:{error:e.message,code:e.code}}:{status:500,body:{error:e instanceof Error?e.message:"项目操作失败",code:"PROJECT_OPERATION_FAILED"}}}}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[8375,6703,6244,1322,1773,4621,7519,2293],()=>r(4750));module.exports=s})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=571,e.ids=[571],e.modules={399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},
|
|
1
|
+
"use strict";(()=>{var e={};e.id=571,e.ids=[571],e.modules={399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},6659:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>l,patchFetch:()=>h,requestAsyncStorage:()=>d,routeModule:()=>u,serverHooks:()=>c,staticGenerationAsyncStorage:()=>v});var a={};r.r(a),r.d(a,{GET:()=>p});var o=r(7786),n=r(5042),s=r(2184),i=r(1890);async function p(e){let t=e.headers.get("Authorization"),r=t?.replace("Bearer ",""),a=new URL(e.url).searchParams.get("token"),o=process.env.AGENT_SDK_TOKEN;return o?(r||a)===o?i.NextResponse.json({valid:!0,project:"default"}):i.NextResponse.json({valid:!1},{status:401}):i.NextResponse.json({valid:!0,project:"dev"})}let u=new o.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/auth/verify/route",pathname:"/api/auth/verify",filename:"route",bundlePath:"app/api/auth/verify/route"},resolvedPagePath:"/private/tmp/agentroam-npm-preview49.GAVmnh/source/packages/server/app/api/auth/verify/route.ts",nextConfigOutput:"standalone",userland:a}),{requestAsyncStorage:d,staticGenerationAsyncStorage:v,serverHooks:c}=u,l="/api/auth/verify/route";function h(){return(0,s.patchFetch)({serverHooks:c,staticGenerationAsyncStorage:v})}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[8375,6703],()=>r(6659));module.exports=a})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=7462,e.ids=[7462],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},
|
|
1
|
+
"use strict";(()=>{var e={};e.id=7462,e.ids=[7462],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},5881:e=>{e.exports=require("node:util")},7854:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>f,patchFetch:()=>m,requestAsyncStorage:()=>h,routeModule:()=>c,serverHooks:()=>g,staticGenerationAsyncStorage:()=>x});var s={};t.r(s),t.d(s,{POST:()=>l,dynamic:()=>d});var o=t(7786),n=t(5042),i=t(2184),a=t(1489),u=t(4621),p=t(9001);let d="force-dynamic";async function l(e){let r=(0,p.o)(e);if(r)return r;try{let{method:r,args:t}=await e.json();if("string"!=typeof r||!Array.isArray(t)||t.length>10)return Response.json({error:"Invalid operation"},{status:400});return Response.json(r.startsWith("cron")?(0,a.N)().call(r,t):await (0,u.i)().call(r,t),{headers:{"cache-control":"no-store"}})}catch(e){return Response.json({error:e instanceof Error?e.message:"Operation failed"},{status:400})}}let c=new o.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/business/route",pathname:"/api/business",filename:"route",bundlePath:"app/api/business/route"},resolvedPagePath:"/private/tmp/agentroam-npm-preview49.GAVmnh/source/packages/server/app/api/business/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:h,staticGenerationAsyncStorage:x,serverHooks:g}=c,f="/api/business/route";function m(){return(0,i.patchFetch)({serverHooks:g,staticGenerationAsyncStorage:x})}},7786:(e,r,t)=>{e.exports=t(517)},1489:(e,r,t)=>{t.d(r,{N:()=>u});var s=t(1322),o=t(6279),n=t(785);class i{constructor(){this.tasks=new s.vo4((0,n.kO)()),this.scheduler=new o.ST(this.tasks,e=>{this.fire(e).catch(e=>console.error("Scheduled Customer Agent run failed",e))},()=>{}),this.scheduler.start()}async fire(e){let{agentHost:r}=await t.e(7519).then(t.bind(t,7519)),{getCustomerGoalCoordinator:s}=await Promise.all([t.e(7519),t.e(732)]).then(t.bind(t,732)),o=e.sessionId;o&&await r.getSessionStore().get(o)||(o=(await r.createSession(e.label||"定时任务")).id,this.tasks.update(e.id,{sessionId:o})),await s().enqueue(o,e.prompt)}call(e,r){let t=String(r[0]||"");switch(e){case"cronList":return this.tasks.list();case"cronCreate":{if("string"!=typeof r[0]||"string"!=typeof r[1]||!r[1].trim())throw Error("cron and prompt required");let e=r[2]&&"object"==typeof r[2]?r[2]:{};return this.tasks.create({cron:r[0],prompt:r[1],recurring:!1!==e.recurring,enabled:!0,durable:!0,..."string"==typeof e.sessionId?{sessionId:e.sessionId}:{},..."string"==typeof e.label?{label:e.label}:{}})}case"cronPause":return this.tasks.pause(t);case"cronResume":return this.tasks.resume(t);case"cronDelete":return this.tasks.delete(t);case"cronDeleteAll":return this.tasks.deleteAll(),{ok:!0};default:throw Error("Unsupported schedule operation")}}}let a=globalThis;function u(){return a.__sharedCronService??=new i}},9001:(e,r,t)=>{t.d(r,{o:()=>o});let s=new Set(["capacitor://localhost","ionic://localhost"]);function o(e){if(!e.headers.get("content-type")?.toLowerCase().startsWith("application/json"))return Response.json({error:"JSON required"},{status:415});let r=e.headers.get("origin");if(!r||s.has(r))return null;let t=new URL(e.url),o="1"===process.env.AGENT_TRUST_TUNNEL_PROXY,n=o?e.headers.get("x-forwarded-host")?.split(",")[0].trim()||e.headers.get("host")||t.host:e.headers.get("host")||t.host,i=o&&e.headers.get("x-forwarded-proto")?.split(",")[0].trim()||t.protocol.slice(0,-1);return r!==`${i}://${n}`?Response.json({error:"Cross-origin write denied"},{status:403}):null}}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[8375,6244,1322,1773,4621],()=>t(7854));module.exports=s})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=9015,e.ids=[9015],e.modules={5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},9801:e=>{e.exports=require("os")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},1041:e=>{e.exports=require("node:url")},
|
|
1
|
+
"use strict";(()=>{var e={};e.id=9015,e.ids=[9015],e.modules={5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},9801:e=>{e.exports=require("os")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},1041:e=>{e.exports=require("node:url")},6597:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>m,patchFetch:()=>x,requestAsyncStorage:()=>f,routeModule:()=>d,serverHooks:()=>g,staticGenerationAsyncStorage:()=>v});var o={};t.r(o),t.d(o,{POST:()=>c,dynamic:()=>u});var n=t(7786),s=t(5042),i=t(2184),a=t(535);let u="force-dynamic",l=new Map;function p(e,r){if("string"==typeof e&&0!==e.length)return e.length>r?e.slice(0,r):e}async function c(e){let r;let t=Date.now(),o=function(e){let r=e.headers.get("x-forwarded-for");return r?r.split(",")[0].trim():e.headers.get("x-real-ip")??"unknown"}(e);if(!function(e,r){let t=(l.get(e)??[]).filter(e=>r-e<6e4);if(t.length>=60)return l.set(e,t),!1;if(t.push(r),l.set(e,t),l.size>1e4){for(let[e,t]of l)if(t.every(e=>r-e>=6e4)&&l.delete(e),l.size<=5e3)break}return!0}(o,t))return Response.json({error:"rate limited"},{status:429});try{r=await e.json()}catch{return Response.json({error:"invalid JSON body"},{status:400})}let n=Array.isArray(r?.entries)?r.entries.slice(0,20):[r],s=(0,a.L)(),i=0;for(let e of n){let r;let t=p(e.message,4e3);if(!t)continue;let n="string"==typeof e.level?e.level:"error",a="fatal"===n||"warn"===n?n:"error",u=p(e.source,40),l=e.error,c=l&&"object"==typeof l?{name:p(l.name,200)??"Error",message:p(l.message,4e3)??"",stack:p(l.stack,8e3)}:void 0;if(void 0!==e.data)try{let t=JSON.stringify(e.data);t&&t.length<=2e3&&(r=JSON.parse(t))}catch{r=void 0}s.log(a,t,c,{clientIp:o,clientSource:u??"webapp",data:r}),i++}return Response.json({accepted:i},{headers:{"cache-control":"no-store"}})}let d=new n.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/api/client-logs/route",pathname:"/api/client-logs",filename:"route",bundlePath:"app/api/client-logs/route"},resolvedPagePath:"/private/tmp/agentroam-npm-preview49.GAVmnh/source/packages/server/app/api/client-logs/route.ts",nextConfigOutput:"standalone",userland:o}),{requestAsyncStorage:f,staticGenerationAsyncStorage:v,serverHooks:g}=d,m="/api/client-logs/route";function x(){return(0,i.patchFetch)({serverHooks:g,staticGenerationAsyncStorage:v})}},7786:(e,r,t)=>{e.exports=t(517)},535:(e,r,t)=>{t.d(r,{L:()=>i});var o=t(1322),n=t(785);let s=!1;function i(){let e=(0,o.Qfc)();if(e)return e;let r=(0,o.qZ_)({dir:(0,n.ME)(),source:"server",minLevel:"info",handlers:{exitOnUncaughtException:!1}});return s||(s=!0,r.info("server logger attached",{dir:r.dir,pid:process.pid})),r}},785:(e,r,t)=>{t.d(r,{ME:()=>a,kO:()=>i,sr:()=>u});var o=t(9411);let n=function(){let e=process.argv[1];if(e){let r=(0,o.dirname)((0,o.resolve)(e)),t=`${o.sep}node_modules${o.sep}.bin`;return r.endsWith(t)?(0,o.resolve)(r,"..",".."):r}return(0,o.resolve)(process.cwd())}();function s(e=process.env,r=n){return(0,o.resolve)(e.AGENT_DATA_DIR?.trim()||r)}function i(){return s()}function a(e=process.env,r=s(e)){let t=e.AGENT_LOG_DIR?.trim();if(t)return(0,o.resolve)(t);let n=e.AGENTROAM_DATA_DIR?.trim();return n?(0,o.resolve)(n,"logs"):(0,o.join)(r,".agent-data","logs")}function u(){return function(e=process.env,r=n){return(0,o.resolve)(e.AGENT_WORKING_DIRECTORY?.trim()||r)}(process.env,i())}}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),o=r.X(0,[8375,1322],()=>t(6597));module.exports=o})();
|