agentroam-runtime-darwin-arm64 0.2.0-preview.34 → 0.2.0-preview.36
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 +1 -1
- package/package.json +1 -1
- package/runtime/.next/BUILD_ID +1 -1
- package/runtime/.next/app-build-manifest.json +8 -8
- package/runtime/.next/app-path-routes-manifest.json +1 -1
- package/runtime/.next/build-manifest.json +3 -3
- package/runtime/.next/prerender-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/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/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]/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]/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/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 +2 -2
- package/runtime/.next/server/app/web/page_client-reference-manifest.js +1 -1
- package/runtime/.next/server/app-paths-manifest.json +18 -18
- package/runtime/.next/server/chunks/1322.js +10 -10
- package/runtime/.next/server/chunks/1773.js +27 -24
- package/runtime/.next/server/chunks/5303.js +1 -1
- package/runtime/.next/server/middleware-build-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/app/web/error-0cf00c6ec0e3f847.js +1 -0
- package/runtime/.next/static/chunks/app/web/layout-254f1e1625f0afd8.js +1 -0
- package/runtime/.next/static/chunks/app/web/{page-9b7006bdf9c4ffd3.js → page-163fe828e62ec579.js} +1 -1
- package/runtime/.next/static/chunks/{main-app-03913d9edbfef6cc.js → main-app-7ac263971d522dfc.js} +1 -1
- package/runtime/lib/browser-live/viewer-frame-flow.mjs +7 -3
- package/runtime/lib/remote-control/application/remote-video-session.mjs +87 -6
- package/runtime/lib/remote-control/remote-authorization.mjs +19 -3
- package/runtime/lib/remote-control/remote-video-signal.mjs +6 -1
- package/runtime/lib/remote-control/webrtc-video.mjs +7 -2
- package/runtime/node_modules/.package-lock.json +169 -141
- package/runtime/node_modules/@agent/core/dist/index.js +34 -1
- package/runtime/node_modules/@agent/native-runtime/dist/index.js +258 -54
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/bridge.mjs +102 -110
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/browser-sdk.js +95 -95
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-reghh1vn.mjs +33 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-tm6xdb2r.mjs +40 -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 +23 -28
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.zst.json +27 -32
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/package.json +12 -12
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs +87 -95
- package/runtime/node_modules/caniuse-lite/data/agents.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/browserVersions.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/aac.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/abortcontroller.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ac3-ec3.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/accelerometer.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/addeventlistener.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/alternate-stylesheet.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ambient-light.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/apng.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/array-find-index.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/array-find.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/array-flat.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/array-includes.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/arrow-functions.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/asmjs.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/async-clipboard.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/async-functions.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/atob-btoa.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/audio-api.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/audio.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/audiotracks.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/autofocus.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/auxclick.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/av1.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/avif.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/background-attachment.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/background-clip-text.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/background-img-opts.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/background-position-x-y.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/background-repeat-round-space.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/background-sync.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/battery-status.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/beacon.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/beforeafterprint.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/bigint.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/blobbuilder.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/bloburls.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/border-image.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/border-radius.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/broadcastchannel.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/brotli.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/calc.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/canvas-blending.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/canvas-text.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/canvas.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ch-unit.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/chacha20-poly1305.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/channel-messaging.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/childnode-remove.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/classlist.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/client-hints-dpr-width-viewport.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/clipboard.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/colr-v1.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/colr.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/comparedocumentposition.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/console-basic.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/console-time.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/const.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/constraint-validation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/contenteditable.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/contentsecuritypolicy.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/contentsecuritypolicy2.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/cookie-store-api.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/cors.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/createimagebitmap.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/credential-management.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/cross-document-view-transitions.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/cryptography.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-all.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-anchor-positioning.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-animation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-any-link.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-appearance.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-at-counter-style.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-autofill.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-backdrop-filter.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-background-offsets.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-backgroundblendmode.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-boxdecorationbreak.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-boxshadow.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-canvas.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-caret-color.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-cascade-layers.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-cascade-scope.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-case-insensitive.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-clip-path.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-color-adjust.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-color-function.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-conic-gradients.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-container-queries-style.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-container-queries.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-container-query-units.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-containment.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-content-visibility.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-counters.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-crisp-edges.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-cross-fade.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-default-pseudo.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-descendant-gtgt.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-deviceadaptation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-dir-pseudo.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-display-contents.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-element-function.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-env-function.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-exclusions.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-featurequeries.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-file-selector-button.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-filter-function.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-filters.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-first-letter.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-first-line.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-fixed.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-focus-visible.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-focus-within.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-font-palette.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-font-rendering-controls.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-font-stretch.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-gencontent.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-gradients.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-grid-animation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-grid-lanes.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-grid.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-hanging-punctuation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-has.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-hyphens.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-if.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-image-orientation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-image-set.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-in-out-of-range.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-indeterminate-pseudo.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-initial-letter.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-initial-value.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-lch-lab.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-letter-spacing.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-line-clamp.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-logical-props.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-marker-pseudo.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-masks.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-matches-pseudo.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-math-functions.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-media-interaction.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-media-range-syntax.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-media-resolution.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-media-scripting.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-mediaqueries.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-mixblendmode.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-module-scripts.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-motion-paths.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-namespaces.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-nesting.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-not-sel-list.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-nth-child-of.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-opacity.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-optional-pseudo.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-overflow-anchor.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-overflow-overlay.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-overflow.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-overscroll-behavior.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-page-break.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-paged-media.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-paint-api.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-placeholder-shown.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-placeholder.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-print-color-adjust.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-read-only-write.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-rebeccapurple.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-reflections.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-regions.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-relative-colors.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-repeating-gradients.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-resize.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-revert-value.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-rrggbbaa.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-scroll-behavior.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-scrollbar.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-sel2.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-sel3.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-selection.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-shapes.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-snappoints.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-sticky.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-subgrid.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-supports-api.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-table.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-text-align-last.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-text-box-trim.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-text-indent.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-text-justify.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-text-orientation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-text-spacing.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-text-wrap-balance.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-textshadow.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-touch-action.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-transitions.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-unicode-bidi.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-unset-value.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-variables.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-when-else.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-widows-orphans.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-width-stretch.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-writing-mode.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-zoom.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css3-attr.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css3-boxsizing.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css3-colors.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css3-cursors-grab.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css3-cursors-newer.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css3-cursors.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css3-tabsize.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/currentcolor.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/custom-elements.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/custom-elementsv1.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/customevent.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/customizable-select.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/datalist.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/dataset.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/datauri.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/date-tolocaledatestring.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/declarative-shadow-dom.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/decorators.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/details.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/deviceorientation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/devicepixelratio.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/dialog.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/dispatchevent.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/dnssec.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/do-not-track.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/document-currentscript.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/document-evaluate-xpath.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/document-execcommand.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/document-policy.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/document-scrollingelement.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/documenthead.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/dom-manip-convenience.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/dom-range.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/domcontentloaded.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/dommatrix.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/download.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/dragndrop.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/element-closest.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/element-from-point.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/element-scroll-methods.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/eme.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/eot.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/es5.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/es6-class.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/es6-generators.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/es6-module-dynamic-import.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/es6-module.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/es6-number.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/es6-string-includes.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/es6.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/eventsource.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/extended-system-fonts.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/feature-policy.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/fetch.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/fieldset-disabled.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/fileapi.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/filereader.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/filereadersync.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/filesystem.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/flac.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/flexbox-gap.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/flexbox.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/flow-root.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/focusin-focusout-events.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/font-family-system-ui.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/font-feature.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/font-kerning.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/font-loading.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/font-size-adjust.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/font-smooth.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/font-unicode-range.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/font-variant-alternates.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/font-variant-numeric.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/fontface.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/form-attribute.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/form-submit-attributes.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/form-validation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/forms.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/fullscreen.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/gamepad.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/geolocation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/getboundingclientrect.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/getcomputedstyle.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/getelementsbyclassname.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/getrandomvalues.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/gyroscope.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/hardwareconcurrency.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/hashchange.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/heif.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/hevc.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/hidden.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/high-resolution-time.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/history.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/html-media-capture.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/html5semantic.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/http-live-streaming.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/http2.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/http3.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/iframe-sandbox.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/iframe-seamless.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/iframe-srcdoc.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/imagecapture.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ime.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/img-naturalwidth-naturalheight.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/import-maps.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/imports.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/indeterminate-checkbox.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/indexeddb.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/indexeddb2.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/inline-block.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/innertext.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-autocomplete-onoff.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-color.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-datetime.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-email-tel-url.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-event.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-file-accept.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-file-directory.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-file-multiple.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-inputmode.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-minlength.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-number.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-pattern.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-placeholder.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-range.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-search.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-selection.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/insert-adjacent.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/insertadjacenthtml.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/internationalization.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/intersectionobserver-v2.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/intersectionobserver.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/intl-pluralrules.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/intrinsic-width.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/jpeg2000.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/jpegxl.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/jpegxr.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/js-regexp-lookbehind.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/json.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/justify-content-space-evenly.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/kerning-pairs-ligatures.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/keyboardevent-charcode.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/keyboardevent-code.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/keyboardevent-getmodifierstate.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/keyboardevent-key.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/keyboardevent-location.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/keyboardevent-which.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/lazyload.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/let.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/link-icon-png.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/link-icon-svg.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/link-rel-dns-prefetch.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/link-rel-modulepreload.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/link-rel-preconnect.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/link-rel-prefetch.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/link-rel-preload.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/link-rel-prerender.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/loading-lazy-attr.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/loading-lazy-media.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/localecompare.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/magnetometer.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/matchesselector.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/matchmedia.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mathml.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/maxlength.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mdn-css-backdrop-pseudo-element.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mdn-text-decoration-color.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mdn-text-decoration-line.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mdn-text-decoration-shorthand.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mdn-text-decoration-style.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/media-fragments.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mediacapture-fromelement.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mediarecorder.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mediasource.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/menu.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/meta-theme-color.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/meter.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/midi.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/minmaxwh.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mp3.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mpeg-dash.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mpeg4.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/multibackgrounds.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/multicolumn.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mutation-events.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mutationobserver.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/namevalue-storage.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/native-filesystem-api.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/nav-timing.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/netinfo.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/notifications.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/object-entries.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/object-fit.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/object-observe.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/object-values.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/objectrtc.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/offline-apps.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/offscreencanvas.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ogg-vorbis.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ogv.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ol-reversed.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/once-event-listener.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/online-status.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/opus.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/orientation-sensor.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/outline.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/pad-start-end.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/page-transition-events.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/pagevisibility.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/passive-event-listener.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/passkeys.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/passwordrules.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/path2d.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/payment-request.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/pdf-viewer.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/permissions-api.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/permissions-policy.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/picture-in-picture.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/picture.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ping.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/png-alpha.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/pointer-events.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/pointer.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/pointerlock.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/portals.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/prefers-color-scheme.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/prefers-reduced-motion.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/progress.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/promise-finally.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/promises.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/proximity.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/proxy.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/publickeypinning.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/push-api.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/queryselector.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/readonly-attr.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/referrer-policy.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/registerprotocolhandler.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/rel-noopener.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/rel-noreferrer.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/rellist.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/rem.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/requestanimationframe.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/requestidlecallback.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/resizeobserver.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/resource-timing.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/rest-parameters.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/rtcpeerconnection.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ruby.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/run-in.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/same-site-cookie-attribute.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/screen-orientation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/script-async.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/script-defer.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/scrollintoview.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/scrollintoviewifneeded.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/sdch.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/selection-api.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/server-timing.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/serviceworkers.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/setimmediate.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/shadowdom.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/shadowdomv1.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/sharedarraybuffer.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/sharedworkers.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/sni.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/spdy.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/speech-recognition.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/speech-synthesis.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/spellcheck-attribute.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/sql-storage.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/srcset.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/stream.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/streams.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/stricttransportsecurity.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/style-scoped.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/subresource-bundling.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/subresource-integrity.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/svg-css.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/svg-filters.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/svg-fonts.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/svg-fragment.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/svg-html.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/svg-html5.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/svg-img.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/svg-smil.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/svg.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/sxg.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/tabindex-attr.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/template-literals.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/template.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/temporal.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/testfeat.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/text-decoration.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/text-emphasis.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/text-overflow.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/text-size-adjust.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/text-stroke.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/textcontent.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/textencoder.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/tls1-1.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/tls1-2.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/tls1-3.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/touch.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/transforms2d.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/transforms3d.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/trusted-types.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ttf.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/typedarrays.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/u2f.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/unhandledrejection.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/upgradeinsecurerequests.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/url-scroll-to-text-fragment.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/url.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/urlsearchparams.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/use-strict.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/user-select-none.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/user-timing.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/variable-fonts.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/vector-effect.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/vibration.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/video.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/videotracks.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/view-transitions.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/viewport-unit-variants.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/viewport-units.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wai-aria.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wake-lock.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-bigint.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-bulk-memory.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-extended-const.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-gc.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-multi-memory.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-multi-value.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-mutable-globals.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-nontrapping-fptoint.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-reference-types.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-relaxed-simd.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-signext.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-simd.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-tail-calls.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-threads.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wav.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wbr-element.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/web-animation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/web-app-manifest.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/web-bluetooth.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/web-serial.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/web-share.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webauthn.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webcodecs.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webgl.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webgl2.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webgpu.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webhid.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webkit-user-drag.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webm.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webnfc.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webp.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/websockets.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webtransport.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webusb.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webvr.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webvtt.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webworkers.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webxr.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/will-change.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/woff.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/woff2.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/word-break.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wordwrap.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/x-doc-messaging.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/x-frame-options.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/xhr2.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/xhtml.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/xhtmlsmil.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/xml-serializer.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/zstd.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AD.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AF.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AL.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AS.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AU.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AW.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AX.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BB.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BD.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BF.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BH.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BJ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BS.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BW.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BY.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CD.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CF.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CH.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CK.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CL.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CU.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CV.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CX.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CY.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/DE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/DJ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/DK.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/DM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/DO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/DZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/EC.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/EE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/EG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ER.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ES.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ET.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/FI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/FJ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/FK.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/FM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/FO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/FR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GB.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GD.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GF.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GH.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GL.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GP.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GQ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GU.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GW.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GY.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/HK.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/HN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/HR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/HT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/HU.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ID.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/IE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/IL.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/IM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/IN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/IQ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/IR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/IS.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/IT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/JE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/JM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/JO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/JP.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KH.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KP.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KW.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KY.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LB.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LC.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LK.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LS.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LU.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LV.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LY.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MC.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MD.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ME.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MH.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MK.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ML.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MP.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MQ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MS.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MU.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MV.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MW.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MX.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MY.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NC.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NF.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NL.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NP.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NU.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/OM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PF.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PH.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PK.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PL.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PS.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PW.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PY.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/QA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/RE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/RO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/RS.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/RU.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/RW.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SB.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SC.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SD.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SH.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SK.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SL.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ST.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SV.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SY.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TC.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TD.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TH.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TJ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TL.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TV.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TW.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/UA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/UG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/US.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/UY.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/UZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/VA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/VC.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/VE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/VG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/VI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/VN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/VU.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/WF.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/WS.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/YE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/YT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ZA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ZM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ZW.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/alt-af.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/alt-an.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/alt-as.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/alt-eu.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/alt-na.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/alt-oc.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/alt-sa.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/alt-ww.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/versionGroups.js +1 -1
- package/runtime/node_modules/caniuse-lite/package.json +1 -1
- package/runtime/node_modules/launder/CHANGELOG.md +7 -0
- package/runtime/node_modules/launder/LICENSE.md +7 -0
- package/runtime/node_modules/launder/eslint.config.js +1 -1
- package/runtime/node_modules/launder/package.json +12 -12
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.cjs +506 -197
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.cjs +12 -12
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.mjs +12 -12
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.mjs +506 -197
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.node.cjs +506 -197
- package/runtime/node_modules/mediabunny/dist/modules/src/codec-data.js +2 -2
- package/runtime/node_modules/mediabunny/dist/modules/src/codec.js +18 -6
- package/runtime/node_modules/mediabunny/dist/modules/src/hls/hls-demuxer.js +13 -6
- package/runtime/node_modules/mediabunny/dist/modules/src/hls/hls-misc.js +97 -9
- package/runtime/node_modules/mediabunny/dist/modules/src/hls/hls-segmented-input.js +8 -4
- package/runtime/node_modules/mediabunny/dist/modules/src/isobmff/isobmff-boxes.js +4 -3
- package/runtime/node_modules/mediabunny/dist/modules/src/isobmff/isobmff-demuxer.js +39 -8
- package/runtime/node_modules/mediabunny/dist/modules/src/matroska/matroska-muxer.js +3 -3
- package/runtime/node_modules/mediabunny/dist/modules/src/media-sink.js +28 -2
- package/runtime/node_modules/mediabunny/dist/modules/src/media-source.js +195 -119
- package/runtime/node_modules/mediabunny/dist/modules/src/misc.js +25 -0
- package/runtime/node_modules/mediabunny/dist/modules/src/mp3/mp3-muxer.js +35 -31
- package/runtime/node_modules/mediabunny/dist/modules/src/mpeg-ts/mpeg-ts-demuxer.js +13 -11
- package/runtime/node_modules/mediabunny/dist/modules/src/ogg/ogg-demuxer.js +65 -12
- package/runtime/node_modules/mediabunny/dist/modules/src/ogg/ogg-muxer.js +37 -3
- package/runtime/node_modules/mediabunny/dist/modules/src/output-format.js +2 -2
- package/runtime/node_modules/mediabunny/dist/modules/src/target.js +1 -0
- package/runtime/node_modules/mediabunny/dist/modules/src/tsconfig.tsbuildinfo +1 -1
- package/runtime/node_modules/mediabunny/dist/modules/src/version.js +10 -0
- package/runtime/node_modules/mediabunny/package.json +5 -5
- package/runtime/node_modules/mediabunny/src/codec-data.ts +2 -2
- package/runtime/node_modules/mediabunny/src/codec.ts +17 -5
- package/runtime/node_modules/mediabunny/src/hls/hls-demuxer.ts +13 -5
- package/runtime/node_modules/mediabunny/src/hls/hls-misc.ts +117 -10
- package/runtime/node_modules/mediabunny/src/hls/hls-segmented-input.ts +11 -3
- package/runtime/node_modules/mediabunny/src/isobmff/isobmff-boxes.ts +4 -3
- package/runtime/node_modules/mediabunny/src/isobmff/isobmff-demuxer.ts +49 -6
- package/runtime/node_modules/mediabunny/src/matroska/matroska-muxer.ts +3 -3
- package/runtime/node_modules/mediabunny/src/media-sink.ts +31 -2
- package/runtime/node_modules/mediabunny/src/media-source.ts +239 -143
- package/runtime/node_modules/mediabunny/src/misc.ts +31 -0
- package/runtime/node_modules/mediabunny/src/mp3/mp3-muxer.ts +40 -35
- package/runtime/node_modules/mediabunny/src/mpeg-ts/mpeg-ts-demuxer.ts +20 -14
- package/runtime/node_modules/mediabunny/src/ogg/ogg-demuxer.ts +82 -13
- package/runtime/node_modules/mediabunny/src/ogg/ogg-muxer.ts +47 -2
- package/runtime/node_modules/mediabunny/src/output-format.ts +2 -2
- package/runtime/node_modules/mediabunny/src/target.ts +1 -0
- package/runtime/node_modules/mediabunny/src/version.ts +13 -0
- package/runtime/node_modules/nanoid/async/index.d.cts +56 -0
- package/runtime/node_modules/nanoid/package.json +3 -3
- package/runtime/node_modules/sanitize-html/README.md +14 -0
- package/runtime/node_modules/sanitize-html/index.js +195 -7
- package/runtime/node_modules/sanitize-html/node_modules/postcss/LICENSE +20 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/README.md +27 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/at-rule.js +25 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/comment.js +13 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/container.js +494 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/css-syntax-error.js +133 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/declaration.js +24 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/document.js +33 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/fromJSON.js +107 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/input.js +282 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/lazy-result.js +626 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/list.js +79 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/map-generator.js +383 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/no-work-result.js +137 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/node.js +494 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/parse.js +42 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/parser.js +626 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/postcss.d.mts +66 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/postcss.js +101 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/postcss.mjs +30 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/previous-map.js +176 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/processor.js +67 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/result.js +42 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/root.js +76 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/rule.js +27 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/stringifier.js +457 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/stringify.js +69 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/symbols.js +5 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/terminal-highlight.js +70 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/tokenize.js +270 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/warn-once.js +13 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/lib/warning.js +47 -0
- package/runtime/node_modules/sanitize-html/node_modules/postcss/package.json +88 -0
- package/runtime/node_modules/sanitize-html/package.json +14 -14
- package/runtime/node_modules/source-map-js/lib/quick-sort.js +10 -1
- package/runtime/node_modules/source-map-js/lib/source-map-consumer.js +51 -3
- package/runtime/node_modules/source-map-js/lib/source-map-generator.js +6 -4
- package/runtime/node_modules/source-map-js/lib/source-node.js +7 -0
- package/runtime/node_modules/source-map-js/package.json +1 -1
- package/runtime/package-lock.json +202 -174
- package/runtime/server.js +1 -1
- package/runtime/webapp/dist/assets/App-DQ5fJODJ.js +476 -0
- package/runtime/webapp/dist/assets/{abnfDiagram-VCTEODGH-CrqxcWkH.js → abnfDiagram-VCTEODGH-CEAlrV9-.js} +1 -1
- package/runtime/webapp/dist/assets/{arc-BP_Bzri0.js → arc-CGetF_lO.js} +1 -1
- package/runtime/webapp/dist/assets/{architectureDiagram-5GKGNRK7-C3aHO9D0.js → architectureDiagram-5GKGNRK7-BVksDtm9.js} +1 -1
- package/runtime/webapp/dist/assets/{blockDiagram-I7D4REHJ-Csfj1lZP.js → blockDiagram-I7D4REHJ-BvCo3epW.js} +1 -1
- package/runtime/webapp/dist/assets/{c4Diagram-7LVT6UL2-C1YfwYJL.js → c4Diagram-7LVT6UL2-DwUEj82r.js} +1 -1
- package/runtime/webapp/dist/assets/channel-BjAaNinW.js +1 -0
- package/runtime/webapp/dist/assets/{chunk-2Q5K7J3B-D2ebqxoT.js → chunk-2Q5K7J3B-BQmtZUl-.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-5VM5RSS4-C7nYBU14.js → chunk-5VM5RSS4-BXDY0cCC.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-F27PBJKO-BB7Yw7px.js → chunk-F27PBJKO-BPhfHsOp.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-IMKFNOWR-ZMuIUwkx.js → chunk-IMKFNOWR-Dw-LyvaC.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-JWPE2WC7-DoRtV01_.js → chunk-JWPE2WC7-Cdi61XTf.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-POPQ4Y6H-Bll_vKqy.js → chunk-POPQ4Y6H-eqgC5BfH.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-SVP7TREG-C6APkibm.js → chunk-SVP7TREG-Dyzqf0xA.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-TICWLB2K-BkkRQNhj.js → chunk-TICWLB2K-DMy_FAyQ.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-XXDRQBXY-C0PWBuhp.js → chunk-XXDRQBXY-Dc3ya8KM.js} +1 -1
- package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-BA6foNu5.js +1 -0
- package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-BA6foNu5.js +1 -0
- package/runtime/webapp/dist/assets/{cose-bilkent-JH36ORCC-CePA-uJR.js → cose-bilkent-JH36ORCC-8SpbJGQ_.js} +1 -1
- package/runtime/webapp/dist/assets/{cynefin-OW5HDTMX-CYSEN_Q2.js → cynefin-OW5HDTMX-DZ8NcP4L.js} +1 -1
- package/runtime/webapp/dist/assets/{cynefinDiagram-5FMLGOSQ-DYBqchWy.js → cynefinDiagram-5FMLGOSQ-C-g805uS.js} +1 -1
- package/runtime/webapp/dist/assets/{dagre-GXQ25YYZ-UfHckfRC.js → dagre-GXQ25YYZ-Cr8OiP_4.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-S7CK7UJ4-JxSLfKX8.js → diagram-S7CK7UJ4-Be71Foqh.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-UQ7AKVKN-BmNuopVu.js → diagram-UQ7AKVKN-CeDsu1RS.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-VSXAHHWV-B30GdjwV.js → diagram-VSXAHHWV-CObfkAwP.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-VX7I27RA-D7IDRmTU.js → diagram-VX7I27RA-B6lAuke7.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-Z3DM3KII-4_UdZ6g8.js → diagram-Z3DM3KII-8oGhKMeq.js} +1 -1
- package/runtime/webapp/dist/assets/{ebnfDiagram-PWID7BFC-D3x_86st.js → ebnfDiagram-PWID7BFC-DmiqrULj.js} +1 -1
- package/runtime/webapp/dist/assets/{erDiagram-RLTQ6QDP-CQvSi1J2.js → erDiagram-RLTQ6QDP-BB_7Zdd4.js} +1 -1
- package/runtime/webapp/dist/assets/{flowDiagram-HODETNUW-BPBRzVds.js → flowDiagram-HODETNUW-DbuKFxoO.js} +1 -1
- package/runtime/webapp/dist/assets/{ganttDiagram-EL5Y4UJY-Bf8dIsfn.js → ganttDiagram-EL5Y4UJY-DAM3Gwd_.js} +1 -1
- package/runtime/webapp/dist/assets/{gitGraphDiagram-WWUBYQGX-BCyjeBRo.js → gitGraphDiagram-WWUBYQGX-Ci91dL5m.js} +1 -1
- package/runtime/webapp/dist/assets/{index-CYpEZ3ou.css → index-NmsboYZi.css} +1 -1
- package/runtime/webapp/dist/assets/index-ZpxfzUdy.js +90 -0
- package/runtime/webapp/dist/assets/{infoDiagram-27XIBGKW-D5VMBdHT.js → infoDiagram-27XIBGKW-D717Ys7n.js} +1 -1
- package/runtime/webapp/dist/assets/{ishikawaDiagram-5VMMS53U-Dlx_ctl4.js → ishikawaDiagram-5VMMS53U-BF6gmyPX.js} +1 -1
- package/runtime/webapp/dist/assets/{journeyDiagram-3NMN7TZE-omVDzXFI.js → journeyDiagram-3NMN7TZE-B6ZY-IXx.js} +1 -1
- package/runtime/webapp/dist/assets/{kanban-definition-UXKFOSKX-MMAXT9mx.js → kanban-definition-UXKFOSKX-DH3FR2sI.js} +1 -1
- package/runtime/webapp/dist/assets/{layout-CeasDbDO.js → layout-BOnxGXiM.js} +1 -1
- package/runtime/webapp/dist/assets/{linear-BHxTJCWU.js → linear-M6pkDoQ3.js} +1 -1
- package/runtime/webapp/dist/assets/{mermaid.core-BQvE8IBF.js → mermaid.core-DxK9Epxh.js} +5 -5
- package/runtime/webapp/dist/assets/{mindmap-definition-YA3MSWOX-CMdBE-J_.js → mindmap-definition-YA3MSWOX-DpZ-X_Vf.js} +1 -1
- package/runtime/webapp/dist/assets/{pegDiagram-XKGWAZYB-D4QTBriw.js → pegDiagram-XKGWAZYB-ZxLpbtO1.js} +1 -1
- package/runtime/webapp/dist/assets/{pieDiagram-E7YTZNPT-Bmxqx7qh.js → pieDiagram-E7YTZNPT-B26_pDmg.js} +1 -1
- package/runtime/webapp/dist/assets/{quadrantDiagram-AXDQQJYC-Cmn2JRpV.js → quadrantDiagram-AXDQQJYC-C-qB9cbX.js} +1 -1
- package/runtime/webapp/dist/assets/{railroadDiagram-O6MQD6OU-DgfuLkXN.js → railroadDiagram-O6MQD6OU-C54V-8Ku.js} +1 -1
- package/runtime/webapp/dist/assets/{requirementDiagram-BXWQKSXE-WehOP6ke.js → requirementDiagram-BXWQKSXE-CaMYVKMk.js} +1 -1
- package/runtime/webapp/dist/assets/{sankeyDiagram-P5KCCOFB-DIDFtcG6.js → sankeyDiagram-P5KCCOFB-DsrVKW_h.js} +1 -1
- package/runtime/webapp/dist/assets/{sequenceDiagram-WJ2MYXX4-C7JhOtgi.js → sequenceDiagram-WJ2MYXX4-C5ImABz1.js} +1 -1
- package/runtime/webapp/dist/assets/{sizeCapture-INFHLROL-n4GkDTaS.js → sizeCapture-INFHLROL-wM9HJhkr.js} +1 -1
- package/runtime/webapp/dist/assets/{stateDiagram-D77RDMKH-OfqZO_Om.js → stateDiagram-D77RDMKH-BY8hQ5ro.js} +1 -1
- package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-D7wp4Sey.js +1 -0
- package/runtime/webapp/dist/assets/{swimlanes-42K2YHIH-DkLZi8pI.js → swimlanes-42K2YHIH-OsTKRKJW.js} +1 -1
- package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-Dq79H5La.js +8 -0
- package/runtime/webapp/dist/assets/{timeline-definition-24CTP7MA-BFb9833W.js → timeline-definition-24CTP7MA-DqyQVkVW.js} +1 -1
- package/runtime/webapp/dist/assets/{vennDiagram-4TSXK5OY-CRcUj5r_.js → vennDiagram-4TSXK5OY-Di3KXYdD.js} +1 -1
- package/runtime/webapp/dist/assets/{wardleyDiagram-VM6X3IG4-BV6n-_PY.js → wardleyDiagram-VM6X3IG4-CnJpZdMd.js} +1 -1
- package/runtime/webapp/dist/assets/{web-CJwomhak.js → web-BMb61xwV.js} +1 -1
- package/runtime/webapp/dist/assets/{web-BNjNBBoq.js → web-eq1eso0Y.js} +1 -1
- package/runtime/webapp/dist/assets/{xychartDiagram-S5SC5T6Z-CYgjhfmo.js → xychartDiagram-S5SC5T6Z-frC_Dy5B.js} +1 -1
- package/runtime/webapp/dist/index.html +2 -2
- package/runtime/ws-server.mjs +77 -10
- package/runtime/.next/static/chunks/app/web/error-745aed8f32a3f09e.js +0 -1
- package/runtime/.next/static/chunks/app/web/layout-d09294275b0a809c.js +0 -1
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-3mr1yqt9.mjs +0 -31
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-rg0sgcv0.mjs +0 -38
- package/runtime/node_modules/better-sqlite3/deps/common.gypi +0 -68
- package/runtime/node_modules/better-sqlite3/deps/copy.js +0 -31
- package/runtime/node_modules/better-sqlite3/deps/defines.gypi +0 -42
- package/runtime/node_modules/better-sqlite3/deps/download.sh +0 -123
- package/runtime/node_modules/better-sqlite3/deps/patches/1208.patch +0 -15
- package/runtime/node_modules/better-sqlite3/deps/sqlite3/sqlite3.c +0 -269668
- package/runtime/node_modules/better-sqlite3/deps/sqlite3/sqlite3.h +0 -14349
- package/runtime/node_modules/better-sqlite3/deps/sqlite3/sqlite3ext.h +0 -739
- package/runtime/node_modules/better-sqlite3/deps/sqlite3.gyp +0 -80
- package/runtime/node_modules/better-sqlite3/deps/test_extension.c +0 -21
- package/runtime/node_modules/better-sqlite3/src/addon.cpp +0 -59
- package/runtime/node_modules/better-sqlite3/src/better_sqlite3.cpp +0 -73
- package/runtime/node_modules/better-sqlite3/src/objects/backup.cpp +0 -121
- package/runtime/node_modules/better-sqlite3/src/objects/backup.hpp +0 -32
- package/runtime/node_modules/better-sqlite3/src/objects/database.cpp +0 -432
- package/runtime/node_modules/better-sqlite3/src/objects/database.hpp +0 -100
- package/runtime/node_modules/better-sqlite3/src/objects/statement-iterator.cpp +0 -119
- package/runtime/node_modules/better-sqlite3/src/objects/statement-iterator.hpp +0 -71
- package/runtime/node_modules/better-sqlite3/src/objects/statement.cpp +0 -380
- package/runtime/node_modules/better-sqlite3/src/objects/statement.hpp +0 -65
- package/runtime/node_modules/better-sqlite3/src/util/bind-map.cpp +0 -73
- package/runtime/node_modules/better-sqlite3/src/util/binder.cpp +0 -210
- package/runtime/node_modules/better-sqlite3/src/util/constants.cpp +0 -172
- package/runtime/node_modules/better-sqlite3/src/util/custom-aggregate.cpp +0 -121
- package/runtime/node_modules/better-sqlite3/src/util/custom-function.cpp +0 -59
- package/runtime/node_modules/better-sqlite3/src/util/custom-table.cpp +0 -406
- package/runtime/node_modules/better-sqlite3/src/util/data-converter.cpp +0 -17
- package/runtime/node_modules/better-sqlite3/src/util/data.cpp +0 -134
- package/runtime/node_modules/better-sqlite3/src/util/helpers.cpp +0 -190
- package/runtime/node_modules/better-sqlite3/src/util/macros.cpp +0 -74
- package/runtime/node_modules/better-sqlite3/src/util/query-macros.cpp +0 -71
- package/runtime/node_modules/better-sqlite3/src/util/row-builder.cpp +0 -53
- package/runtime/node_modules/better-sqlite3/src/util/row-builder.hpp +0 -22
- package/runtime/webapp/dist/assets/App-CZIfM4ga.js +0 -476
- package/runtime/webapp/dist/assets/channel-dBfr1u63.js +0 -1
- package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-vIVD_XRw.js +0 -1
- package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-vIVD_XRw.js +0 -1
- package/runtime/webapp/dist/assets/index-Q3PSDwl8.js +0 -90
- package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-BcsZtA99.js +0 -1
- package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-DKFBVkpu.js +0 -8
- /package/runtime/.next/static/{VjF1ivYYR4g1y_PDu06re → Vg6CVUXLWab351g9fpURC}/_buildManifest.js +0 -0
- /package/runtime/.next/static/{VjF1ivYYR4g1y_PDu06re → Vg6CVUXLWab351g9fpURC}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=7927,e.ids=[7927],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")},1831:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>g,patchFetch:()=>w,requestAsyncStorage:()=>h,routeModule:()=>p,serverHooks:()=>f,staticGenerationAsyncStorage:()=>m});var n={};r.r(n),r.d(n,{GET:()=>d,dynamic:()=>c});var i=r(7786),s=r(5042),o=r(2184),a=r(1890),u=r(6279),l=r(1614);let c="force-dynamic";async function d(e){let t=new URL(e.url).searchParams.get("agentType");if("codex"!==t&&"claude-code"!==t&&"opencode"!==t)return a.NextResponse.json({error:"agentType must be codex, claude-code or opencode"},{status:400});try{let e=await (0,l.NL)().listModels(t);return a.NextResponse.json({agentType:t,models:e})}catch(e){if(e instanceof u.no&&"OPERATION_NOT_SUPPORTED"===e.code)return a.NextResponse.json({agentType:t,models:[],supported:!1});return a.NextResponse.json({error:e instanceof Error?e.message:"Failed to list models"},{status:(0,l.WW)(e)})}}let p=new i.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/api/agent/models/route",pathname:"/api/agent/models",filename:"route",bundlePath:"app/api/agent/models/route"},resolvedPagePath:"/Users/caoqu/.codex/worktrees/npm-preview-34/customer-agent/packages/server/app/api/agent/models/route.ts",nextConfigOutput:"standalone",userland:n}),{requestAsyncStorage:h,staticGenerationAsyncStorage:m,serverHooks:f}=p,g="/api/agent/models/route";function w(){return(0,o.patchFetch)({serverHooks:f,staticGenerationAsyncStorage:m})}},535:(e,t,r)=>{r.d(t,{L:()=>o});var n=r(1322),i=r(785);let s=!1;function o(){let e=(0,n.Qfc)();if(e)return e;let t=(0,n.qZ_)({dir:(0,i.ME)(),source:"server",minLevel:"info",handlers:{exitOnUncaughtException:!1}});return s||(s=!0,t.info("server logger attached",{dir:t.dir,pid:process.pid})),t}},1614:(e,t,r)=>{r.d(t,{NL:()=>O,V_:()=>P,WW:()=>T});var n=r(7561),i=r(612),s=r(9411),o=r(7718),a=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,a.wyD)((0,o.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,a.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 E(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 E(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){if(!P(e))throw new p.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let t=N(await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(t.id,t),t}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 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 w(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function O(){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 a.XWE((0,h.kO)());m.__nativeRuntimeService=new f((0,p.v6)({runtimeFactory:e=>{let t=c({name:"codex",environmentVariable:"AGENT_CODEX_BIN",minimumVersion:a.hix}),r=c({name:"opencode",environmentVariable:"AGENT_OPENCODE_BIN"});return process.pid,w("AGENT_CODEX_RUNTIME_ERROR",t),w("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 o=v(e.cwd,r),a="win32"===r?s.win32.sep:s.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:v(e.description,r)})).filter(({path:e})=>o===e||o.startsWith(`${e}${a}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...i,projectId:u.project.id}:i}function v(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 E(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function P(e){try{return"customer-agent"!==(0,p.Vu)(e).agentType}catch{return!1}}function T(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":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),n=t.X(0,[8375,6703,6244,1322,1773],()=>r(1831));module.exports=n})();
|
|
1
|
+
"use strict";(()=>{var e={};e.id=7927,e.ids=[7927],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")},6671:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>g,patchFetch:()=>w,requestAsyncStorage:()=>h,routeModule:()=>p,serverHooks:()=>f,staticGenerationAsyncStorage:()=>m});var n={};r.r(n),r.d(n,{GET:()=>d,dynamic:()=>c});var i=r(7786),s=r(5042),o=r(2184),a=r(1890),u=r(6279),l=r(1614);let c="force-dynamic";async function d(e){let t=new URL(e.url).searchParams.get("agentType");if("codex"!==t&&"claude-code"!==t&&"opencode"!==t)return a.NextResponse.json({error:"agentType must be codex, claude-code or opencode"},{status:400});try{let e=await (0,l.NL)().listModels(t);return a.NextResponse.json({agentType:t,models:e})}catch(e){if(e instanceof u.no&&"OPERATION_NOT_SUPPORTED"===e.code)return a.NextResponse.json({agentType:t,models:[],supported:!1});return a.NextResponse.json({error:e instanceof Error?e.message:"Failed to list models"},{status:(0,l.WW)(e)})}}let p=new i.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/api/agent/models/route",pathname:"/api/agent/models",filename:"route",bundlePath:"app/api/agent/models/route"},resolvedPagePath:"/Users/caoqu/.codex/worktrees/npm-preview-36/customer-agent/packages/server/app/api/agent/models/route.ts",nextConfigOutput:"standalone",userland:n}),{requestAsyncStorage:h,staticGenerationAsyncStorage:m,serverHooks:f}=p,g="/api/agent/models/route";function w(){return(0,o.patchFetch)({serverHooks:f,staticGenerationAsyncStorage:m})}},535:(e,t,r)=>{r.d(t,{L:()=>o});var n=r(1322),i=r(785);let s=!1;function o(){let e=(0,n.Qfc)();if(e)return e;let t=(0,n.qZ_)({dir:(0,i.ME)(),source:"server",minLevel:"info",handlers:{exitOnUncaughtException:!1}});return s||(s=!0,t.info("server logger attached",{dir:t.dir,pid:process.pid})),t}},1614:(e,t,r)=>{r.d(t,{NL:()=>O,V_:()=>P,WW:()=>T});var n=r(7561),i=r(612),s=r(9411),o=r(7718),a=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,a.wyD)((0,o.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,a.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 E(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 E(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){if(!P(e))throw new p.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let t=N(await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(t.id,t),t}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 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 w(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function O(){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 a.XWE((0,h.kO)());m.__nativeRuntimeService=new f((0,p.v6)({runtimeFactory:e=>{let t=c({name:"codex",environmentVariable:"AGENT_CODEX_BIN",minimumVersion:a.hix}),r=c({name:"opencode",environmentVariable:"AGENT_OPENCODE_BIN"});return process.pid,w("AGENT_CODEX_RUNTIME_ERROR",t),w("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 o=v(e.cwd,r),a="win32"===r?s.win32.sep:s.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:v(e.description,r)})).filter(({path:e})=>o===e||o.startsWith(`${e}${a}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...i,projectId:u.project.id}:i}function v(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 E(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function P(e){try{return"customer-agent"!==(0,p.Vu)(e).agentType}catch{return!1}}function T(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":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),n=t.X(0,[8375,6703,6244,1322,1773],()=>r(6671));module.exports=n})();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=2616,e.ids=[2616],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")},1922:(e,t,s)=>{s.r(t),s.d(t,{originalPathname:()=>w,patchFetch:()=>N,requestAsyncStorage:()=>v,routeModule:()=>E,serverHooks:()=>T,staticGenerationAsyncStorage:()=>y});var r={};s.r(r),s.d(r,{POST:()=>I});var n=s(7786),i=s(5042),o=s(2184),a=s(1890),u=s(1322),l=s(6279),d=s(7519),c=s(1614),p=s(535),h=s(1079),m=s(4621),g=s(1982),f=s(8615);async function I(e){try{var t,s;(0,h.j)();let r=await e.json();if(!r.input)return a.NextResponse.json({error:"input is required"},{status:400});if(void 0!==r.agentIds&&(!Array.isArray(r.agentIds)||r.agentIds.length>20||r.agentIds.some(e=>"string"!=typeof e||!e.trim())))return a.NextResponse.json({error:"agentIds must contain at most 20 non-empty IDs"},{status:400});if(void 0!==r.agentId&&void 0!==r.agentIds)return a.NextResponse.json({error:"agentId and agentIds are mutually exclusive"},{status:400});if(void 0!==r.profileId&&("string"!=typeof r.profileId||!r.profileId.trim()||r.profileId.length>200))return a.NextResponse.json({error:"profileId must be a non-empty string"},{status:400});if(r.sessionId&&(0,c.V_)(r.sessionId)){let e=r.sessionId,t=(0,c.NL)(),s=await t.startRun(e,r.input,r.images,"web",{...r.nativeModel?.id?{model:r.nativeModel}:{},...r.nativeReasoningEffort?{reasoningEffort:r.nativeReasoningEffort}:{}});d.agentHost.resetExternalStream(e),d.agentHost.publishExternal(e,{type:"run_admitted",_nativeRunId:s.runId,_nativeSequence:s.snapshotRevision});let n=null,i=!1;return t.subscribe(e,0,({event:t})=>{d.agentHost.publishExternal(e,t),("done"===t.type||"error"===t.type)&&(i=!0,n?.())}).then(e=>{n=e,i&&e()}).catch(t=>{let s=t instanceof l.no?t.code:void 0;(0,p.L)().error("native run subscription failed",t,{sessionId:e,code:s}),d.agentHost.publishExternal(e,{type:"error",message:t instanceof Error?t.message:"Native run subscription failed",...s?{code:s}:{}})}),a.NextResponse.json({sessionId:e,streamUrl:`/api/agent/stream?sessionId=${e}`,runId:s.runId,snapshotRevision:s.snapshotRevision})}let n=d.agentHost.getSessionStore(),i={maxIterations:"number"!=typeof(t=r.maxIterations)||!Number.isFinite(t)||t<0?10:Math.trunc(t),maxTokens:"number"==typeof(s=r.maxTokens)&&Number.isFinite(s)?Math.min(2e6,Math.max(8e3,Math.trunc(s))):1e5},o=r.agentId??(r.agentIds?.length===1?r.agentIds[0]:void 0),I=(0,m.i)(),E=new u.R0$(n,{getAgent:e=>I.agents.get(e),getSkill:async e=>I.skills.get(e)??(await I.call("listSkills",[])).find(t=>t.name===e)??null,hasModelProfile:e=>(0,g.dp)().read().profiles.some(t=>t.id===e),getToolExecutionPolicy:e=>(0,f.cm)().get(e)},{assertAvailable:e=>{if(d.agentHost.isSessionRunning(e))throw new d.A(e)},start:e=>{let t=d.agentHost.startRun(e.message,e.sessionId,e.images,{...r.model?{model:r.model}:{},...e.modelProfileId?{profileId:e.modelProfileId}:{},...r.reasoningEffort?{reasoningEffort:r.reasoningEffort}:{},...void 0===r.maxIterations?{}:{maxIterations:i.maxIterations},...void 0===r.maxTokens?{}:{maxTokens:i.maxTokens},...r.agentIds?{agentIds:r.agentIds}:e.agent?{agentIds:[e.agent.id]}:{},...e.skill?{activatedSkills:[e.skill.name]}:{},...Object.keys(e.context).length?{context:e.context}:{},toolExecutionPolicy:e.toolExecutionPolicy});return t.completion.catch(t=>{(0,p.L)().error("agent run error",t,{sessionId:e.sessionId}),console.error("Agent run error:",t)}),{sessionId:e.sessionId,runId:t.runId,streamRef:`/api/agent/stream?sessionId=${e.sessionId}`}}}),v=await E.execute({message:r.input,...r.sessionId?{sessionId:r.sessionId}:{},...o?{agentId:o}:{},...r.skillName?{skillName:r.skillName}:{},...r.profileId?{modelProfileId:r.profileId}:{},...r.images?.length?{images:r.images}:{},...r.context?{context:r.context}:{},...r.toolPolicyId?{capabilities:{toolPolicyId:r.toolPolicyId}}:{},session:{...r.projectId?{projectId:r.projectId}:{},...r.title?{title:r.title}:{},...r.metadata?{metadata:r.metadata}:{}},source:r.source??"webapp"});return a.NextResponse.json({sessionId:v.sessionId,streamUrl:v.streamRef,runId:v.runId})}catch(i){(0,p.L)().error("agent run request failed",i,{status:i instanceof l.no?i.code:void 0});let e=i instanceof l.no?i.code:void 0,t=i instanceof d.A?i.code:void 0,s=i instanceof u.KZx?i.code:void 0,r=e??t??s,n="SESSION_OCCUPIED"===r||"SESSION_ALREADY_RUNNING"===r;return a.NextResponse.json({error:i instanceof Error?i.message:"Internal error",...r?{code:r}:{}},{status:n?409:("AGENT_NOT_FOUND"===s||"SKILL_NOT_FOUND"===s||"MODEL_PROFILE_NOT_FOUND"===s||"TOOL_POLICY_NOT_FOUND"===s?404:"SKILL_NOT_ALLOWED"===s||"TOOL_POLICY_DISABLED"===s?422:s?400:void 0)??500})}}let E=new n.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/agent/run/route",pathname:"/api/agent/run",filename:"route",bundlePath:"app/api/agent/run/route"},resolvedPagePath:"/Users/caoqu/.codex/worktrees/npm-preview-34/customer-agent/packages/server/app/api/agent/run/route.ts",nextConfigOutput:"standalone",userland:r}),{requestAsyncStorage:v,staticGenerationAsyncStorage:y,serverHooks:T}=E,w="/api/agent/run/route";function N(){return(0,o.patchFetch)({serverHooks:T,staticGenerationAsyncStorage:y})}},1614:(e,t,s)=>{s.d(t,{NL:()=>E,V_:()=>w,WW:()=>N});var r=s(7561),n=s(612),i=s(9411),o=s(7718),a=s(1322);function u(e){if(!e.trim())return!1;try{return(0,r.accessSync)(e,r.constants.X_OK),!0}catch{return!1}}function l(e){try{return(0,a.wyD)((0,o.execFileSync)(e,["--version"],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]}))}catch{return}}function d(e){let t=[],s=process.env[e.environmentVariable]?.trim();if(s){let r=u(s);t.push({source:"pin",path:s,executable:r,version:r?l(s):void 0,error:r?void 0:`${e.environmentVariable} "${s}" is not executable`})}let r=function(e){for(let t of(process.env.PATH??"").split(i.delimiter).filter(Boolean)){let s=(0,i.resolve)(t,e);if(u(s))return s}}(e.name);return r&&r!==s&&t.push({source:"path",path:r,executable:!0,version:l(r)}),(0,a.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var c=s(535),p=s(6279),h=s(785);let m=globalThis;class g{constructor(e,t=async()=>[],s=process.platform){this.runtime=e,this.listProjects=t,this.platform=s,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,s){if(!this.runtime.importWorkspace)throw new p.no("Native workspace import is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.importWorkspace(e,t,s)}async listWorkspaceSessions(e,t,s){let r=await this.runtime.listWorkspaceSessions(e,t,s);if(s?.cursor)return r;let n=new Set(r.data.map(e=>e.id)),i=r.data.map(e=>{let t=this.pendingCreations.get(e.id);return t?(this.pendingCreations.delete(e.id),f(e,t)):e});for(let s of this.pendingCreations.values())s.agentType!==e||s.projectId!==t||n.has(s.id)||i.unshift(s);return{...r,data:i}}async list(e){let[t,s]=await Promise.all([this.runtime.list(),this.listProjects()]);return T(this.withPendingCreations(t).map(e=>v(e,s,this.platform)),e)}async refresh(e){let[t,s]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return T(this.withPendingCreations(t).map(e=>v(e,s,this.platform)),e)}async create(e){let t=v(await this.runtime.create(e),await this.listProjects(),this.platform),s=e.projectId?{...t,projectId:e.projectId}:t;return this.pendingCreations.set(s.id,s),s}async fork(e){if(!w(e))throw new p.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let t=v(await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(t.id,t),t}async delete(e){await this.runtime.delete(e),this.pendingCreations.delete(e)}async get(e,t){let s;try{s=await this.runtime.get(e,t)}catch(r){let s=this.pendingCreations.get(e);if(!s)throw r;return t?{...s,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...s,messages:[],events:[]}}return v(s,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:r}=await Promise.resolve().then(s.bind(s,1322));return r(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,s,r,n){return this.runtime.run(e,t,s,r,n)}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,s,r="web",n){if(!this.runtime.startRun)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,s,r,n)}async subscribe(e,t,s){if(!this.runtime.subscribe)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.subscribe(e,t,s)}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 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,s,r="web"){if(!this.runtime.enqueueGoal)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,s,r)}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,s="web"){if(!this.runtime.enqueueMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueMessage(e,t,s)}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,s,r){if(!this.runtime.updateMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,s,r)}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,s=e.map(e=>{t.add(e.id);let s=this.pendingCreations.get(e.id);return this.pendingCreations.delete(e.id),s?f(e,s):e});return[...[...this.pendingCreations.values()].filter(e=>!t.has(e.id)).sort((e,t)=>t.updated.localeCompare(e.updated)),...s]}}function f(e,t){return{...e,cwd:e.cwd||t.cwd,projectId:e.projectId??t.projectId}}function I(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function E(){if(!m.__nativeRuntimeService){!function(){let e=[(0,i.join)((0,n.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(i.delimiter),s=e.filter(e=>(0,r.existsSync)(e)&&!t.includes(e));s.length>0&&(process.env.PATH=[...t,...s].join(i.delimiter))}();let e=new a.XWE((0,h.kO)());m.__nativeRuntimeService=new g((0,p.v6)({runtimeFactory:e=>{let t=d({name:"codex",environmentVariable:"AGENT_CODEX_BIN",minimumVersion:a.hix}),s=d({name:"opencode",environmentVariable:"AGENT_OPENCODE_BIN"});return process.pid,I("AGENT_CODEX_RUNTIME_ERROR",t),I("AGENT_OPENCODE_RUNTIME_ERROR",s),(0,c.L)().info("native runtime host elected",{pid:process.pid,codex:t.executable??null,codexSource:t.source??null,codexDetail:t.detail,opencode:s.executable??null,opencodeDetail:s.detail}),(0,p.WH)(t.executable??"codex",e,s.executable??"opencode")}}),()=>e.list())}return m.__nativeRuntimeService}function v(e,t,s=process.platform){let{projectId:r,...n}=e;if(!e.cwd)return n;let o=y(e.cwd,s),a="win32"===s?i.win32.sep:i.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:y(e.description,s)})).filter(({path:e})=>o===e||o.startsWith(`${e}${a}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...n,projectId:u.project.id}:n}function y(e,t=process.platform){if("win32"!==t)return(0,i.resolve)(e);let s=i.win32.resolve(e),r=i.win32.parse(s).root;return(s.length>r.length?s.replace(/[\\/]+$/,""):s).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 N(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":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}},1079:(e,t,s)=>{s.d(t,{j:()=>d});var r=s(7519),n=s(3931),i=s(535),o=s(1322),a=s(1982);let u=!1,l=new o.sSf;function d(){u||(u=!0,r.agentHost.setGlobalEventObserver((e,t,s)=>{try{if("ask_user"===t.type){(0,n.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"===s.source)return;let r=(0,o.mDL)((0,a.dp)().read().taskNotifications),i=s.runId?(0,o.DXW)({sessionId:e,runId:s.runId,title:"任务已完成",finalText:t.finalText,outcome:"completed",source:"user"},r):null;i&&l.accept(i.notificationId)&&(0,n.i)().notifySession({...i,url:`/app/?session=${encodeURIComponent(e)}`});return}if("goal_updated"===t.type&&"complete"===t.goal.status){let s=(0,o.mDL)((0,a.dp)().read().taskNotifications),r=(0,o.DXW)({sessionId:e,runId:`goal:${t.goal.createdAt}`,title:"目标已完成",finalText:t.goal.objective,outcome:"completed",source:"goal",goalFinished:!0},s);r&&l.accept(r.notificationId)&&(0,n.i)().notifySession({...r,url:`/app/?session=${encodeURIComponent(e)}`});return}"error"===t.type&&(0,n.i)().notifySession({notificationId:`${e}:${s.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,i.L)().warn("web push notify failed",{sessionId:e,error:t instanceof Error?t.message:String(t)})}}))}},6361:(e,t,s)=>{s.d(t,{Q:()=>o,e:()=>i});var r=s(1322),n=s(7519);function i(){let e=new r.S3T;(0,r._5y)(e);let t=new r.OqQ;for(let s of(e.register(new r.Q8u(t,null)),e.register(new r.URd(t,null)),n.agentHost.getBuilder().getToolRegistry().getAll()))e.register(s);return e.register(new r.gBG(async()=>({status:"failed",agentName:"",subSessionId:"",error:"catalog listing only; dispatch runs inside a Customer Agent session"}))),e.register(new r.sBJ(async()=>({status:"failed",agentName:"",subSessionId:"",error:"catalog listing only; spawning runs inside a dynamic Customer Agent session"}))),e.register(new r.HbQ(async()=>({status:"failed",agentName:"",subSessionId:"",error:"catalog listing only; dispatch runs inside a Customer Agent session"}))),e}function o(){return i().getAll().map(e=>e.name).sort()}},1489:(e,t,s)=>{s.d(t,{N:()=>u});var r=s(1322),n=s(6279),i=s(785);class o{constructor(){this.tasks=new r.vo4((0,i.kO)()),this.scheduler=new n.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 s.e(7519).then(s.bind(s,7519)),{getCustomerGoalCoordinator:r}=await Promise.all([s.e(7519),s.e(732)]).then(s.bind(s,732)),n=e.sessionId;n&&await t.getSessionStore().get(n)||(n=(await t.createSession(e.label||"定时任务")).id,this.tasks.update(e.id,{sessionId:n})),await r().enqueue(n,e.prompt)}call(e,t){let s=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(s);case"cronResume":return this.tasks.resume(s);case"cronDelete":return this.tasks.delete(s);case"cronDeleteAll":return this.tasks.deleteAll(),{ok:!0};default:throw Error("Unsupported schedule operation")}}}let a=globalThis;function u(){return a.__sharedCronService??=new o}},8615:(e,t,s)=>{let r;s.d(t,{H5:()=>d,cm:()=>u,jw:()=>l});var n=s(1322),i=s(785),o=s(6361);class a{constructor(e=(0,i.kO)()){this.store=new n.RQW(e)}list(){return this.store.list()}get(e){return this.store.get(e)}async summaries(){return(await this.store.list()).filter(e=>e.enabled).map(n._0R)}save(e,t){let s=(0,n.IJh)(e,{knownTools:t,requireExecutables:!0});return this.store.save(s)}delete(e){return this.store.delete(e)}}function u(){return r??=new a}function l(){return(0,o.Q)()}function d(e){let t=e instanceof n.DlR?422:400;return Response.json({error:e instanceof Error?e.message:"Tool policy request failed",code:e instanceof n.DlR?e.code:"INVALID_TOOL_POLICY"},{status:t})}},3931:(e,t,s)=>{s.d(t,{i:()=>p});var r=s(6005),n=s(7561),i=s(9411),o=s(5890);let a=require("web-push"),u=e=>JSON.stringify(e??null);class l{constructor(e,t=Date.now){this.now=t;let s=(0,i.resolve)(e,".agentroam-auth");(0,n.mkdirSync)(s,{recursive:!0,mode:448});let r=(0,i.join)(s,"push.sqlite");this.db=new o(r),(0,n.chmodSync)(r,384),this.db.pragma("busy_timeout = 5000"),this.db.exec(`
|
|
1
|
+
"use strict";(()=>{var e={};e.id=2616,e.ids=[2616],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")},2801:(e,t,s)=>{s.r(t),s.d(t,{originalPathname:()=>w,patchFetch:()=>N,requestAsyncStorage:()=>v,routeModule:()=>E,serverHooks:()=>T,staticGenerationAsyncStorage:()=>y});var r={};s.r(r),s.d(r,{POST:()=>I});var n=s(7786),i=s(5042),o=s(2184),a=s(1890),u=s(1322),l=s(6279),d=s(7519),c=s(1614),p=s(535),h=s(1079),m=s(4621),g=s(1982),f=s(8615);async function I(e){try{var t,s;(0,h.j)();let r=await e.json();if(!r.input)return a.NextResponse.json({error:"input is required"},{status:400});if(void 0!==r.agentIds&&(!Array.isArray(r.agentIds)||r.agentIds.length>20||r.agentIds.some(e=>"string"!=typeof e||!e.trim())))return a.NextResponse.json({error:"agentIds must contain at most 20 non-empty IDs"},{status:400});if(void 0!==r.agentId&&void 0!==r.agentIds)return a.NextResponse.json({error:"agentId and agentIds are mutually exclusive"},{status:400});if(void 0!==r.profileId&&("string"!=typeof r.profileId||!r.profileId.trim()||r.profileId.length>200))return a.NextResponse.json({error:"profileId must be a non-empty string"},{status:400});if(r.sessionId&&(0,c.V_)(r.sessionId)){let e=r.sessionId,t=(0,c.NL)(),s=await t.startRun(e,r.input,r.images,"web",{...r.nativeModel?.id?{model:r.nativeModel}:{},...r.nativeReasoningEffort?{reasoningEffort:r.nativeReasoningEffort}:{}});d.agentHost.resetExternalStream(e),d.agentHost.publishExternal(e,{type:"run_admitted",_nativeRunId:s.runId,_nativeSequence:s.snapshotRevision});let n=null,i=!1;return t.subscribe(e,0,({event:t})=>{d.agentHost.publishExternal(e,t),("done"===t.type||"error"===t.type)&&(i=!0,n?.())}).then(e=>{n=e,i&&e()}).catch(t=>{let s=t instanceof l.no?t.code:void 0;(0,p.L)().error("native run subscription failed",t,{sessionId:e,code:s}),d.agentHost.publishExternal(e,{type:"error",message:t instanceof Error?t.message:"Native run subscription failed",...s?{code:s}:{}})}),a.NextResponse.json({sessionId:e,streamUrl:`/api/agent/stream?sessionId=${e}`,runId:s.runId,snapshotRevision:s.snapshotRevision})}let n=d.agentHost.getSessionStore(),i={maxIterations:"number"!=typeof(t=r.maxIterations)||!Number.isFinite(t)||t<0?10:Math.trunc(t),maxTokens:"number"==typeof(s=r.maxTokens)&&Number.isFinite(s)?Math.min(2e6,Math.max(8e3,Math.trunc(s))):1e5},o=r.agentId??(r.agentIds?.length===1?r.agentIds[0]:void 0),I=(0,m.i)(),E=new u.R0$(n,{getAgent:e=>I.agents.get(e),getSkill:async e=>I.skills.get(e)??(await I.call("listSkills",[])).find(t=>t.name===e)??null,hasModelProfile:e=>(0,g.dp)().read().profiles.some(t=>t.id===e),getToolExecutionPolicy:e=>(0,f.cm)().get(e)},{assertAvailable:e=>{if(d.agentHost.isSessionRunning(e))throw new d.A(e)},start:e=>{let t=d.agentHost.startRun(e.message,e.sessionId,e.images,{...r.model?{model:r.model}:{},...e.modelProfileId?{profileId:e.modelProfileId}:{},...r.reasoningEffort?{reasoningEffort:r.reasoningEffort}:{},...void 0===r.maxIterations?{}:{maxIterations:i.maxIterations},...void 0===r.maxTokens?{}:{maxTokens:i.maxTokens},...r.agentIds?{agentIds:r.agentIds}:e.agent?{agentIds:[e.agent.id]}:{},...e.skill?{activatedSkills:[e.skill.name]}:{},...Object.keys(e.context).length?{context:e.context}:{},toolExecutionPolicy:e.toolExecutionPolicy});return t.completion.catch(t=>{(0,p.L)().error("agent run error",t,{sessionId:e.sessionId}),console.error("Agent run error:",t)}),{sessionId:e.sessionId,runId:t.runId,streamRef:`/api/agent/stream?sessionId=${e.sessionId}`}}}),v=await E.execute({message:r.input,...r.sessionId?{sessionId:r.sessionId}:{},...o?{agentId:o}:{},...r.skillName?{skillName:r.skillName}:{},...r.profileId?{modelProfileId:r.profileId}:{},...r.images?.length?{images:r.images}:{},...r.context?{context:r.context}:{},...r.toolPolicyId?{capabilities:{toolPolicyId:r.toolPolicyId}}:{},session:{...r.projectId?{projectId:r.projectId}:{},...r.title?{title:r.title}:{},...r.metadata?{metadata:r.metadata}:{}},source:r.source??"webapp"});return a.NextResponse.json({sessionId:v.sessionId,streamUrl:v.streamRef,runId:v.runId})}catch(i){(0,p.L)().error("agent run request failed",i,{status:i instanceof l.no?i.code:void 0});let e=i instanceof l.no?i.code:void 0,t=i instanceof d.A?i.code:void 0,s=i instanceof u.KZx?i.code:void 0,r=e??t??s,n="SESSION_OCCUPIED"===r||"SESSION_ALREADY_RUNNING"===r;return a.NextResponse.json({error:i instanceof Error?i.message:"Internal error",...r?{code:r}:{}},{status:n?409:("AGENT_NOT_FOUND"===s||"SKILL_NOT_FOUND"===s||"MODEL_PROFILE_NOT_FOUND"===s||"TOOL_POLICY_NOT_FOUND"===s?404:"SKILL_NOT_ALLOWED"===s||"TOOL_POLICY_DISABLED"===s?422:s?400:void 0)??500})}}let E=new n.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/agent/run/route",pathname:"/api/agent/run",filename:"route",bundlePath:"app/api/agent/run/route"},resolvedPagePath:"/Users/caoqu/.codex/worktrees/npm-preview-36/customer-agent/packages/server/app/api/agent/run/route.ts",nextConfigOutput:"standalone",userland:r}),{requestAsyncStorage:v,staticGenerationAsyncStorage:y,serverHooks:T}=E,w="/api/agent/run/route";function N(){return(0,o.patchFetch)({serverHooks:T,staticGenerationAsyncStorage:y})}},1614:(e,t,s)=>{s.d(t,{NL:()=>E,V_:()=>w,WW:()=>N});var r=s(7561),n=s(612),i=s(9411),o=s(7718),a=s(1322);function u(e){if(!e.trim())return!1;try{return(0,r.accessSync)(e,r.constants.X_OK),!0}catch{return!1}}function l(e){try{return(0,a.wyD)((0,o.execFileSync)(e,["--version"],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]}))}catch{return}}function d(e){let t=[],s=process.env[e.environmentVariable]?.trim();if(s){let r=u(s);t.push({source:"pin",path:s,executable:r,version:r?l(s):void 0,error:r?void 0:`${e.environmentVariable} "${s}" is not executable`})}let r=function(e){for(let t of(process.env.PATH??"").split(i.delimiter).filter(Boolean)){let s=(0,i.resolve)(t,e);if(u(s))return s}}(e.name);return r&&r!==s&&t.push({source:"path",path:r,executable:!0,version:l(r)}),(0,a.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var c=s(535),p=s(6279),h=s(785);let m=globalThis;class g{constructor(e,t=async()=>[],s=process.platform){this.runtime=e,this.listProjects=t,this.platform=s,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,s){if(!this.runtime.importWorkspace)throw new p.no("Native workspace import is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.importWorkspace(e,t,s)}async listWorkspaceSessions(e,t,s){let r=await this.runtime.listWorkspaceSessions(e,t,s);if(s?.cursor)return r;let n=new Set(r.data.map(e=>e.id)),i=r.data.map(e=>{let t=this.pendingCreations.get(e.id);return t?(this.pendingCreations.delete(e.id),f(e,t)):e});for(let s of this.pendingCreations.values())s.agentType!==e||s.projectId!==t||n.has(s.id)||i.unshift(s);return{...r,data:i}}async list(e){let[t,s]=await Promise.all([this.runtime.list(),this.listProjects()]);return T(this.withPendingCreations(t).map(e=>v(e,s,this.platform)),e)}async refresh(e){let[t,s]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return T(this.withPendingCreations(t).map(e=>v(e,s,this.platform)),e)}async create(e){let t=v(await this.runtime.create(e),await this.listProjects(),this.platform),s=e.projectId?{...t,projectId:e.projectId}:t;return this.pendingCreations.set(s.id,s),s}async fork(e){if(!w(e))throw new p.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let t=v(await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(t.id,t),t}async delete(e){await this.runtime.delete(e),this.pendingCreations.delete(e)}async get(e,t){let s;try{s=await this.runtime.get(e,t)}catch(r){let s=this.pendingCreations.get(e);if(!s)throw r;return t?{...s,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...s,messages:[],events:[]}}return v(s,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:r}=await Promise.resolve().then(s.bind(s,1322));return r(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,s,r,n){return this.runtime.run(e,t,s,r,n)}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,s,r="web",n){if(!this.runtime.startRun)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,s,r,n)}async subscribe(e,t,s){if(!this.runtime.subscribe)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.subscribe(e,t,s)}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 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,s,r="web"){if(!this.runtime.enqueueGoal)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,s,r)}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,s="web"){if(!this.runtime.enqueueMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueMessage(e,t,s)}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,s,r){if(!this.runtime.updateMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,s,r)}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,s=e.map(e=>{t.add(e.id);let s=this.pendingCreations.get(e.id);return this.pendingCreations.delete(e.id),s?f(e,s):e});return[...[...this.pendingCreations.values()].filter(e=>!t.has(e.id)).sort((e,t)=>t.updated.localeCompare(e.updated)),...s]}}function f(e,t){return{...e,cwd:e.cwd||t.cwd,projectId:e.projectId??t.projectId}}function I(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function E(){if(!m.__nativeRuntimeService){!function(){let e=[(0,i.join)((0,n.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(i.delimiter),s=e.filter(e=>(0,r.existsSync)(e)&&!t.includes(e));s.length>0&&(process.env.PATH=[...t,...s].join(i.delimiter))}();let e=new a.XWE((0,h.kO)());m.__nativeRuntimeService=new g((0,p.v6)({runtimeFactory:e=>{let t=d({name:"codex",environmentVariable:"AGENT_CODEX_BIN",minimumVersion:a.hix}),s=d({name:"opencode",environmentVariable:"AGENT_OPENCODE_BIN"});return process.pid,I("AGENT_CODEX_RUNTIME_ERROR",t),I("AGENT_OPENCODE_RUNTIME_ERROR",s),(0,c.L)().info("native runtime host elected",{pid:process.pid,codex:t.executable??null,codexSource:t.source??null,codexDetail:t.detail,opencode:s.executable??null,opencodeDetail:s.detail}),(0,p.WH)(t.executable??"codex",e,s.executable??"opencode")}}),()=>e.list())}return m.__nativeRuntimeService}function v(e,t,s=process.platform){let{projectId:r,...n}=e;if(!e.cwd)return n;let o=y(e.cwd,s),a="win32"===s?i.win32.sep:i.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:y(e.description,s)})).filter(({path:e})=>o===e||o.startsWith(`${e}${a}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...n,projectId:u.project.id}:n}function y(e,t=process.platform){if("win32"!==t)return(0,i.resolve)(e);let s=i.win32.resolve(e),r=i.win32.parse(s).root;return(s.length>r.length?s.replace(/[\\/]+$/,""):s).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 N(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":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}},1079:(e,t,s)=>{s.d(t,{j:()=>d});var r=s(7519),n=s(3931),i=s(535),o=s(1322),a=s(1982);let u=!1,l=new o.sSf;function d(){u||(u=!0,r.agentHost.setGlobalEventObserver((e,t,s)=>{try{if("ask_user"===t.type){(0,n.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"===s.source)return;let r=(0,o.mDL)((0,a.dp)().read().taskNotifications),i=s.runId?(0,o.DXW)({sessionId:e,runId:s.runId,title:"任务已完成",finalText:t.finalText,outcome:"completed",source:"user"},r):null;i&&l.accept(i.notificationId)&&(0,n.i)().notifySession({...i,url:`/app/?session=${encodeURIComponent(e)}`});return}if("goal_updated"===t.type&&"complete"===t.goal.status){let s=(0,o.mDL)((0,a.dp)().read().taskNotifications),r=(0,o.DXW)({sessionId:e,runId:`goal:${t.goal.createdAt}`,title:"目标已完成",finalText:t.goal.objective,outcome:"completed",source:"goal",goalFinished:!0},s);r&&l.accept(r.notificationId)&&(0,n.i)().notifySession({...r,url:`/app/?session=${encodeURIComponent(e)}`});return}"error"===t.type&&(0,n.i)().notifySession({notificationId:`${e}:${s.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,i.L)().warn("web push notify failed",{sessionId:e,error:t instanceof Error?t.message:String(t)})}}))}},6361:(e,t,s)=>{s.d(t,{Q:()=>o,e:()=>i});var r=s(1322),n=s(7519);function i(){let e=new r.S3T;(0,r._5y)(e);let t=new r.OqQ;for(let s of(e.register(new r.Q8u(t,null)),e.register(new r.URd(t,null)),n.agentHost.getBuilder().getToolRegistry().getAll()))e.register(s);return e.register(new r.gBG(async()=>({status:"failed",agentName:"",subSessionId:"",error:"catalog listing only; dispatch runs inside a Customer Agent session"}))),e.register(new r.sBJ(async()=>({status:"failed",agentName:"",subSessionId:"",error:"catalog listing only; spawning runs inside a dynamic Customer Agent session"}))),e.register(new r.HbQ(async()=>({status:"failed",agentName:"",subSessionId:"",error:"catalog listing only; dispatch runs inside a Customer Agent session"}))),e}function o(){return i().getAll().map(e=>e.name).sort()}},1489:(e,t,s)=>{s.d(t,{N:()=>u});var r=s(1322),n=s(6279),i=s(785);class o{constructor(){this.tasks=new r.vo4((0,i.kO)()),this.scheduler=new n.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 s.e(7519).then(s.bind(s,7519)),{getCustomerGoalCoordinator:r}=await Promise.all([s.e(7519),s.e(732)]).then(s.bind(s,732)),n=e.sessionId;n&&await t.getSessionStore().get(n)||(n=(await t.createSession(e.label||"定时任务")).id,this.tasks.update(e.id,{sessionId:n})),await r().enqueue(n,e.prompt)}call(e,t){let s=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(s);case"cronResume":return this.tasks.resume(s);case"cronDelete":return this.tasks.delete(s);case"cronDeleteAll":return this.tasks.deleteAll(),{ok:!0};default:throw Error("Unsupported schedule operation")}}}let a=globalThis;function u(){return a.__sharedCronService??=new o}},8615:(e,t,s)=>{let r;s.d(t,{H5:()=>d,cm:()=>u,jw:()=>l});var n=s(1322),i=s(785),o=s(6361);class a{constructor(e=(0,i.kO)()){this.store=new n.RQW(e)}list(){return this.store.list()}get(e){return this.store.get(e)}async summaries(){return(await this.store.list()).filter(e=>e.enabled).map(n._0R)}save(e,t){let s=(0,n.IJh)(e,{knownTools:t,requireExecutables:!0});return this.store.save(s)}delete(e){return this.store.delete(e)}}function u(){return r??=new a}function l(){return(0,o.Q)()}function d(e){let t=e instanceof n.DlR?422:400;return Response.json({error:e instanceof Error?e.message:"Tool policy request failed",code:e instanceof n.DlR?e.code:"INVALID_TOOL_POLICY"},{status:t})}},3931:(e,t,s)=>{s.d(t,{i:()=>p});var r=s(6005),n=s(7561),i=s(9411),o=s(5890);let a=require("web-push"),u=e=>JSON.stringify(e??null);class l{constructor(e,t=Date.now){this.now=t;let s=(0,i.resolve)(e,".agentroam-auth");(0,n.mkdirSync)(s,{recursive:!0,mode:448});let r=(0,i.join)(s,"push.sqlite");this.db=new o(r),(0,n.chmodSync)(r,384),this.db.pragma("busy_timeout = 5000"),this.db.exec(`
|
|
2
2
|
CREATE TABLE IF NOT EXISTS push_keys (id INTEGER PRIMARY KEY CHECK(id=1), public_key TEXT NOT NULL, private_key TEXT NOT NULL);
|
|
3
3
|
CREATE TABLE IF NOT EXISTS push_subscriptions (
|
|
4
4
|
endpoint_hash TEXT PRIMARY KEY,
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
INSERT INTO push_subscriptions (endpoint_hash, endpoint, p256dh, auth, device_id, created)
|
|
13
13
|
VALUES (?, ?, ?, ?, ?, ?)
|
|
14
14
|
ON CONFLICT(endpoint_hash) DO UPDATE SET p256dh=excluded.p256dh, auth=excluded.auth, device_id=excluded.device_id
|
|
15
|
-
`).run(d(s),s,r,n,"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(d(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:s,body:r,url:n}){let i=e||`${t}:notification`;if(!this.delivered.has(i)){for(this.delivered.add(i);this.delivered.size>500;)this.delivered.delete(this.delivered.values().next().value);this.sendToAll({notificationId:i,sessionId:t,title:s,body:r,tag:i,url:n})}}async sendToAll(e){let t=this.listSubscriptions();await Promise.allSettled(t.map(t=>this.send(t,e)))}async send(e,t){try{a.setVapidDetails("mailto:agentroam@localhost",this.keys.publicKey,this.keys.privateKey),await a.sendNotification(e,u(t),{TTL:3600})}catch(s){let t=s?.statusCode;(404===t||410===t)&&this.db.prepare("DELETE FROM push_subscriptions WHERE endpoint_hash=?").run(d(e.endpoint))}}close(){this.db.close()}}function d(e){return(0,r.createHash)("sha256").update(e).digest("hex")}let c=null;function p(e=process.env.AGENT_DATA_DIR?.trim()||process.cwd()){return c??=new l(e)}}};var t=require("../../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[8375,6703,6244,1322,1773,4621,7519],()=>s(
|
|
15
|
+
`).run(d(s),s,r,n,"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(d(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:s,body:r,url:n}){let i=e||`${t}:notification`;if(!this.delivered.has(i)){for(this.delivered.add(i);this.delivered.size>500;)this.delivered.delete(this.delivered.values().next().value);this.sendToAll({notificationId:i,sessionId:t,title:s,body:r,tag:i,url:n})}}async sendToAll(e){let t=this.listSubscriptions();await Promise.allSettled(t.map(t=>this.send(t,e)))}async send(e,t){try{a.setVapidDetails("mailto:agentroam@localhost",this.keys.publicKey,this.keys.privateKey),await a.sendNotification(e,u(t),{TTL:3600})}catch(s){let t=s?.statusCode;(404===t||410===t)&&this.db.prepare("DELETE FROM push_subscriptions WHERE endpoint_hash=?").run(d(e.endpoint))}}close(){this.db.close()}}function d(e){return(0,r.createHash)("sha256").update(e).digest("hex")}let c=null;function p(e=process.env.AGENT_DATA_DIR?.trim()||process.cwd()){return c??=new l(e)}}};var t=require("../../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[8375,6703,6244,1322,1773,4621,7519],()=>s(2801));module.exports=r})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=5352,e.ids=[5352],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")},1828:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>f,patchFetch:()=>g,requestAsyncStorage:()=>p,routeModule:()=>h,serverHooks:()=>m,staticGenerationAsyncStorage:()=>d});var i={};r.r(i),r.d(i,{GET:()=>c,dynamic:()=>l});var n=r(7786),s=r(5042),a=r(2184),o=r(1890),u=r(1614);let l="force-dynamic";async function c(){let e=await (0,u.NL)().health();return o.NextResponse.json([{agentType:"customer-agent",available:!0,label:"Customer Agent"},...e])}let h=new n.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/api/agent/runtime-health/route",pathname:"/api/agent/runtime-health",filename:"route",bundlePath:"app/api/agent/runtime-health/route"},resolvedPagePath:"/Users/caoqu/.codex/worktrees/npm-preview-34/customer-agent/packages/server/app/api/agent/runtime-health/route.ts",nextConfigOutput:"standalone",userland:i}),{requestAsyncStorage:p,staticGenerationAsyncStorage:d,serverHooks:m}=h,f="/api/agent/runtime-health/route";function g(){return(0,a.patchFetch)({serverHooks:m,staticGenerationAsyncStorage:d})}},535:(e,t,r)=>{r.d(t,{L:()=>a});var i=r(1322),n=r(785);let s=!1;function a(){let e=(0,i.Qfc)();if(e)return e;let t=(0,i.qZ_)({dir:(0,n.ME)(),source:"server",minLevel:"info",handlers:{exitOnUncaughtException:!1}});return s||(s=!0,t.info("server logger attached",{dir:t.dir,pid:process.pid})),t}},1614:(e,t,r)=>{r.d(t,{NL:()=>v,V_:()=>P,WW:()=>_});var i=r(7561),n=r(612),s=r(9411),a=r(7718),o=r(1322);function u(e){if(!e.trim())return!1;try{return(0,i.accessSync)(e,i.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 i=u(r);t.push({source:"pin",path:r,executable:i,version:i?l(r):void 0,error:i?void 0:`${e.environmentVariable} "${r}" is not executable`})}let i=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 i&&i!==r&&t.push({source:"path",path:i,executable:!0,version:l(i)}),(0,o.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var h=r(535),p=r(6279),d=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 i=await this.runtime.listWorkspaceSessions(e,t,r);if(r?.cursor)return i;let n=new Set(i.data.map(e=>e.id)),s=i.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||n.has(r.id)||s.unshift(r);return{...i,data:s}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return E(this.withPendingCreations(t).map(e=>O(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return E(this.withPendingCreations(t).map(e=>O(e,r,this.platform)),e)}async create(e){let t=O(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){if(!P(e))throw new p.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let t=O(await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(t.id,t),t}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(i){let r=this.pendingCreations.get(e);if(!r)throw i;return t?{...r,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...r,messages:[],events:[]}}return O(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:i}=await Promise.resolve().then(r.bind(r,1322));return i(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,r,i,n){return this.runtime.run(e,t,r,i,n)}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,i="web",n){if(!this.runtime.startRun)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,i,n)}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 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,i="web"){if(!this.runtime.enqueueGoal)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,r,i)}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,i){if(!this.runtime.updateMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,r,i)}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 w(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function v(){if(!m.__nativeRuntimeService){!function(){let e=[(0,s.join)((0,n.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(s.delimiter),r=e.filter(e=>(0,i.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(s.delimiter))}();let e=new o.XWE((0,d.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,w("AGENT_CODEX_RUNTIME_ERROR",t),w("AGENT_OPENCODE_RUNTIME_ERROR",r),(0,h.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 O(e,t,r=process.platform){let{projectId:i,...n}=e;if(!e.cwd)return n;let a=N(e.cwd,r),o="win32"===r?s.win32.sep:s.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:N(e.description,r)})).filter(({path:e})=>a===e||a.startsWith(`${e}${o}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...n,projectId:u.project.id}:n}function N(e,t=process.platform){if("win32"!==t)return(0,s.resolve)(e);let r=s.win32.resolve(e),i=s.win32.parse(r).root;return(r.length>i.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function E(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function P(e){try{return"customer-agent"!==(0,p.Vu)(e).agentType}catch{return!1}}function _(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":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),i=t.X(0,[8375,6703,6244,1322,1773],()=>r(1828));module.exports=i})();
|
|
1
|
+
"use strict";(()=>{var e={};e.id=5352,e.ids=[5352],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")},132:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>f,patchFetch:()=>g,requestAsyncStorage:()=>p,routeModule:()=>h,serverHooks:()=>m,staticGenerationAsyncStorage:()=>d});var i={};r.r(i),r.d(i,{GET:()=>c,dynamic:()=>l});var n=r(7786),s=r(5042),a=r(2184),o=r(1890),u=r(1614);let l="force-dynamic";async function c(){let e=await (0,u.NL)().health();return o.NextResponse.json([{agentType:"customer-agent",available:!0,label:"Customer Agent"},...e])}let h=new n.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/api/agent/runtime-health/route",pathname:"/api/agent/runtime-health",filename:"route",bundlePath:"app/api/agent/runtime-health/route"},resolvedPagePath:"/Users/caoqu/.codex/worktrees/npm-preview-36/customer-agent/packages/server/app/api/agent/runtime-health/route.ts",nextConfigOutput:"standalone",userland:i}),{requestAsyncStorage:p,staticGenerationAsyncStorage:d,serverHooks:m}=h,f="/api/agent/runtime-health/route";function g(){return(0,a.patchFetch)({serverHooks:m,staticGenerationAsyncStorage:d})}},535:(e,t,r)=>{r.d(t,{L:()=>a});var i=r(1322),n=r(785);let s=!1;function a(){let e=(0,i.Qfc)();if(e)return e;let t=(0,i.qZ_)({dir:(0,n.ME)(),source:"server",minLevel:"info",handlers:{exitOnUncaughtException:!1}});return s||(s=!0,t.info("server logger attached",{dir:t.dir,pid:process.pid})),t}},1614:(e,t,r)=>{r.d(t,{NL:()=>v,V_:()=>P,WW:()=>_});var i=r(7561),n=r(612),s=r(9411),a=r(7718),o=r(1322);function u(e){if(!e.trim())return!1;try{return(0,i.accessSync)(e,i.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 i=u(r);t.push({source:"pin",path:r,executable:i,version:i?l(r):void 0,error:i?void 0:`${e.environmentVariable} "${r}" is not executable`})}let i=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 i&&i!==r&&t.push({source:"path",path:i,executable:!0,version:l(i)}),(0,o.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var h=r(535),p=r(6279),d=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 i=await this.runtime.listWorkspaceSessions(e,t,r);if(r?.cursor)return i;let n=new Set(i.data.map(e=>e.id)),s=i.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||n.has(r.id)||s.unshift(r);return{...i,data:s}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return E(this.withPendingCreations(t).map(e=>O(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return E(this.withPendingCreations(t).map(e=>O(e,r,this.platform)),e)}async create(e){let t=O(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){if(!P(e))throw new p.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let t=O(await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(t.id,t),t}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(i){let r=this.pendingCreations.get(e);if(!r)throw i;return t?{...r,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...r,messages:[],events:[]}}return O(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:i}=await Promise.resolve().then(r.bind(r,1322));return i(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,r,i,n){return this.runtime.run(e,t,r,i,n)}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,i="web",n){if(!this.runtime.startRun)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,i,n)}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 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,i="web"){if(!this.runtime.enqueueGoal)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,r,i)}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,i){if(!this.runtime.updateMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,r,i)}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 w(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function v(){if(!m.__nativeRuntimeService){!function(){let e=[(0,s.join)((0,n.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(s.delimiter),r=e.filter(e=>(0,i.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(s.delimiter))}();let e=new o.XWE((0,d.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,w("AGENT_CODEX_RUNTIME_ERROR",t),w("AGENT_OPENCODE_RUNTIME_ERROR",r),(0,h.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 O(e,t,r=process.platform){let{projectId:i,...n}=e;if(!e.cwd)return n;let a=N(e.cwd,r),o="win32"===r?s.win32.sep:s.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:N(e.description,r)})).filter(({path:e})=>a===e||a.startsWith(`${e}${o}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...n,projectId:u.project.id}:n}function N(e,t=process.platform){if("win32"!==t)return(0,s.resolve)(e);let r=s.win32.resolve(e),i=s.win32.parse(r).root;return(r.length>i.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function E(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function P(e){try{return"customer-agent"!==(0,p.Vu)(e).agentType}catch{return!1}}function _(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":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),i=t.X(0,[8375,6703,6244,1322,1773],()=>r(132));module.exports=i})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=5369,e.ids=[5369,732],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")},5682:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>w,patchFetch:()=>f,requestAsyncStorage:()=>p,routeModule:()=>h,serverHooks:()=>g,staticGenerationAsyncStorage:()=>m});var s={};r.r(s),r.d(s,{POST:()=>d});var i=r(7786),n=r(5042),a=r(2184),o=r(732),u=r(1890),l=r(7519),c=r(1614);async function d(e){try{let t=await e.json();if(!t.sessionId||!t.input&&!t.messageId)return u.NextResponse.json({error:"sessionId and input or messageId are required"},{status:400});if((0,c.V_)(t.sessionId)){if(t.messageId)return u.NextResponse.json(await (0,c.NL)().steerMessage(t.sessionId,t.messageId));if(!t.input)return u.NextResponse.json({error:"input is required"},{status:400});let e=await (0,c.NL)().steer(t.sessionId,t.input);return u.NextResponse.json({steered:e})}if(t.messageId)return u.NextResponse.json({steered:!0,state:await (0,o.getCustomerGoalCoordinator)().steer(t.sessionId,t.messageId)});if(!t.input)return u.NextResponse.json({error:"input is required"},{status:400});let r=await l.agentHost.steer(t.input,t.sessionId);return u.NextResponse.json({steered:r})}catch(e){return u.NextResponse.json({error:e instanceof Error?e.message:"Internal error"},{status:(0,c.WW)(e)})}}let h=new i.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/agent/steer/route",pathname:"/api/agent/steer",filename:"route",bundlePath:"app/api/agent/steer/route"},resolvedPagePath:"/Users/caoqu/.codex/worktrees/npm-preview-34/customer-agent/packages/server/app/api/agent/steer/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:p,staticGenerationAsyncStorage:m,serverHooks:g}=h,w="/api/agent/steer/route";function f(){return(0,a.patchFetch)({serverHooks:g,staticGenerationAsyncStorage:m})}},732:(e,t,r)=>{r.d(t,{getCustomerGoalCoordinator:()=>l,U:()=>c});var s=r(1322),i=r(7519);class n{constructor(e,t,r,s,i,n){this.store=e,this.busy=t,this.run=r,this.abort=s,this.steerRun=i,this.persist=n,this.tails=new Map,this.draining=new Set}async get(e,t=!0){let r=(0,s.E0T)((await this.require(e)).metadata);return t&&this.resume(e),r}async enqueue(e,t,r){let i=await this.mutate(e,i=>(0,s.WfK)(i,{id:crypto.randomUUID(),sessionId:e,objective:t,sourceMessageId:r,now:Date.now()}));return this.resume(e),i}async enqueueMessage(e,t,r,i){let n=await this.mutate(e,n=>[n.active,...n.queued,...n.history].some(e=>e?.sourceMessageId===r)?n:(0,s.InG)(n,{id:crypto.randomUUID(),sessionId:e,objective:t,sourceMessageId:r,messagePayload:i,now:Date.now(),activate:!1}));return this.resume(e),n}reorder(e,t,r=!1){return this.mutate(e,e=>r?(0,s.h1F)(e,t):(0,s.ZC9)(e,t))}updateMessage(e,t,r,i){return this.mutate(e,e=>(0,s.Wog)(e,t,r,i))}async cancel(e,t){let r=await this.mutate(e,r=>(r.active?.id===t&&this.draining.has(e)&&this.abort(e),(0,s.LJm)(r,t,Date.now())));return this.resume(e),r}async steer(e,t){return this.mutate(e,async r=>{let i=r.queued.find(e=>e.id===t&&"message"===e.kind);if(!i||!this.busy(e))throw Error("没有可引导的运行或排队消息");if(!await this.steerRun(e,i.objective))throw Error("运行已结束,请继续排队");return(0,s.LJm)(r,t,Date.now())})}resume(e){this.draining.has(e)||(this.draining.add(e),this.drain(e).catch(e=>console.error("Customer queue failed",e)).finally(()=>this.draining.delete(e)))}async drain(e){for(;;){let t;let r=await this.get(e,!1);if(!r.active&&!r.queued.length)return;if(this.busy(e)){await new Promise(e=>setTimeout(e,100));continue}let i=(await this.mutate(e,e=>(0,s.s_d)(e,Date.now()))).active;if(!i)continue;let n="failed";try{n=await this.run(e,i)}catch(e){if(e?.code==="SESSION_ALREADY_RUNNING")continue;t=e instanceof Error?e.message:String(e)}await this.mutate(e,e=>e.active?.id===i.id?(0,s.JXc)(e,n,Date.now(),t):e)}}async require(e){let t=await this.store.get(e);if(!t)throw Error("Session not found");return t}async mutate(e,t){let r=(this.tails.get(e)??Promise.resolve()).catch(()=>{}).then(async()=>{let r=await this.require(e),i=await t((0,s.E0T)(r.metadata));if(this.persist)this.persist(e,i);else{let t=await this.require(e);await this.store.update(e,{metadata:(0,s.eC7)(t.metadata,i)})}return i});this.tails.set(e,r);try{return await r}finally{this.tails.get(e)===r&&this.tails.delete(e)}}}var a=r(785);let o=globalThis,u=new Set;function l(){return o.__sharedCustomerQueue??=new n(i.agentHost.getSessionStore(),e=>i.agentHost.isSessionRunning(e),async(e,t)=>{u.add(e);try{return await i.agentHost.startRun(t.objective,e,t.messagePayload?.images,{agentIds:t.messagePayload?.agentIds}).completion,(await i.agentHost.getSessionStore().get(e))?.status==="completed"?"completed":"failed"}finally{u.delete(e)}},e=>{u.has(e)&&i.agentHost.abort(e)},(e,t)=>i.agentHost.steer(t,e),(e,t)=>{(0,s.N8n)((0,a.kO)()).db.prepare("UPDATE sessions SET metadata = json_set(metadata, '$.goalState', json(?)), updated = ? WHERE id = ?").run(JSON.stringify(t),new Date().toISOString(),e)})}function c(){for(let e of(0,s.N8n)((0,a.kO)()).db.prepare("SELECT id FROM sessions WHERE json_extract(metadata, '$.goalState.active') IS NOT NULL OR json_array_length(metadata, '$.goalState.queued') > 0").all())l().resume(e.id)}},1614:(e,t,r)=>{r.d(t,{NL:()=>N,V_:()=>O,WW:()=>y});var s=r(7561),i=r(612),n=r(9411),a=r(7718),o=r(1322);function u(e){if(!e.trim())return!1;try{return(0,s.accessSync)(e,s.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 s=u(r);t.push({source:"pin",path:r,executable:s,version:s?l(r):void 0,error:s?void 0:`${e.environmentVariable} "${r}" is not executable`})}let s=function(e){for(let t of(process.env.PATH??"").split(n.delimiter).filter(Boolean)){let r=(0,n.resolve)(t,e);if(u(r))return r}}(e.name);return s&&s!==r&&t.push({source:"path",path:s,executable:!0,version:l(s)}),(0,o.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var d=r(535),h=r(6279),p=r(785);let m=globalThis;class g{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 h.no("Native workspace import is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.importWorkspace(e,t,r)}async listWorkspaceSessions(e,t,r){let s=await this.runtime.listWorkspaceSessions(e,t,r);if(r?.cursor)return s;let i=new Set(s.data.map(e=>e.id)),n=s.data.map(e=>{let t=this.pendingCreations.get(e.id);return t?(this.pendingCreations.delete(e.id),w(e,t)):e});for(let r of this.pendingCreations.values())r.agentType!==e||r.projectId!==t||i.has(r.id)||n.unshift(r);return{...s,data:n}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return I(this.withPendingCreations(t).map(e=>E(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return I(this.withPendingCreations(t).map(e=>E(e,r,this.platform)),e)}async create(e){let t=E(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){if(!O(e))throw new h.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let t=E(await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(t.id,t),t}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(s){let r=this.pendingCreations.get(e);if(!r)throw s;return t?{...r,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...r,messages:[],events:[]}}return E(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:s}=await Promise.resolve().then(r.bind(r,1322));return s(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,r,s,i){return this.runtime.run(e,t,r,s,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 h.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,s="web",i){if(!this.runtime.startRun)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,s,i)}async subscribe(e,t,r){if(!this.runtime.subscribe)throw new h.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 h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.snapshot(e,t)}async setPermissionMode(e,t){if(!this.runtime.setPermissionMode)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.setPermissionMode(e,t)}async handoff(e,t){if(!this.runtime.handoff)throw new h.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 h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.getGoals(e,t)}async enqueueGoal(e,t,r,s="web"){if(!this.runtime.enqueueGoal)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,r,s)}async reorderGoals(e,t){if(!this.runtime.reorderGoals)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderGoals(e,t)}async cancelGoal(e,t){if(!this.runtime.cancelGoal)throw new h.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 h.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 h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderMessages(e,t)}async updateMessage(e,t,r,s){if(!this.runtime.updateMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,r,s)}async cancelMessage(e,t){if(!this.runtime.cancelMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelMessage(e,t)}async steerMessage(e,t){if(!this.runtime.steerMessage)throw new h.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?w(e,r):e});return[...[...this.pendingCreations.values()].filter(e=>!t.has(e.id)).sort((e,t)=>t.updated.localeCompare(e.updated)),...r]}}function w(e,t){return{...e,cwd:e.cwd||t.cwd,projectId:e.projectId??t.projectId}}function f(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function N(){if(!m.__nativeRuntimeService){!function(){let e=[(0,n.join)((0,i.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(n.delimiter),r=e.filter(e=>(0,s.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(n.delimiter))}();let e=new o.XWE((0,p.kO)());m.__nativeRuntimeService=new g((0,h.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,f("AGENT_CODEX_RUNTIME_ERROR",t),f("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,h.WH)(t.executable??"codex",e,r.executable??"opencode")}}),()=>e.list())}return m.__nativeRuntimeService}function E(e,t,r=process.platform){let{projectId:s,...i}=e;if(!e.cwd)return i;let a=v(e.cwd,r),o="win32"===r?n.win32.sep:n.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:v(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 v(e,t=process.platform){if("win32"!==t)return(0,n.resolve)(e);let r=n.win32.resolve(e),s=n.win32.parse(r).root;return(r.length>s.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function I(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function O(e){try{return"customer-agent"!==(0,h.Vu)(e).agentType}catch{return!1}}function y(e){if(e instanceof h.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":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}},1489:(e,t,r)=>{r.d(t,{N:()=>u});var s=r(1322),i=r(6279),n=r(785);class a{constructor(){this.tasks=new s.vo4((0,n.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:s}=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 s().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}}};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],()=>r(5682));module.exports=s})();
|
|
1
|
+
"use strict";(()=>{var e={};e.id=5369,e.ids=[5369,732],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")},2947:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>w,patchFetch:()=>f,requestAsyncStorage:()=>p,routeModule:()=>h,serverHooks:()=>g,staticGenerationAsyncStorage:()=>m});var s={};r.r(s),r.d(s,{POST:()=>d});var i=r(7786),n=r(5042),a=r(2184),o=r(732),u=r(1890),l=r(7519),c=r(1614);async function d(e){try{let t=await e.json();if(!t.sessionId||!t.input&&!t.messageId)return u.NextResponse.json({error:"sessionId and input or messageId are required"},{status:400});if((0,c.V_)(t.sessionId)){if(t.messageId)return u.NextResponse.json(await (0,c.NL)().steerMessage(t.sessionId,t.messageId));if(!t.input)return u.NextResponse.json({error:"input is required"},{status:400});let e=await (0,c.NL)().steer(t.sessionId,t.input);return u.NextResponse.json({steered:e})}if(t.messageId)return u.NextResponse.json({steered:!0,state:await (0,o.getCustomerGoalCoordinator)().steer(t.sessionId,t.messageId)});if(!t.input)return u.NextResponse.json({error:"input is required"},{status:400});let r=await l.agentHost.steer(t.input,t.sessionId);return u.NextResponse.json({steered:r})}catch(e){return u.NextResponse.json({error:e instanceof Error?e.message:"Internal error"},{status:(0,c.WW)(e)})}}let h=new i.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/agent/steer/route",pathname:"/api/agent/steer",filename:"route",bundlePath:"app/api/agent/steer/route"},resolvedPagePath:"/Users/caoqu/.codex/worktrees/npm-preview-36/customer-agent/packages/server/app/api/agent/steer/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:p,staticGenerationAsyncStorage:m,serverHooks:g}=h,w="/api/agent/steer/route";function f(){return(0,a.patchFetch)({serverHooks:g,staticGenerationAsyncStorage:m})}},732:(e,t,r)=>{r.d(t,{getCustomerGoalCoordinator:()=>l,U:()=>c});var s=r(1322),i=r(7519);class n{constructor(e,t,r,s,i,n){this.store=e,this.busy=t,this.run=r,this.abort=s,this.steerRun=i,this.persist=n,this.tails=new Map,this.draining=new Set}async get(e,t=!0){let r=(0,s.E0T)((await this.require(e)).metadata);return t&&this.resume(e),r}async enqueue(e,t,r){let i=await this.mutate(e,i=>(0,s.WfK)(i,{id:crypto.randomUUID(),sessionId:e,objective:t,sourceMessageId:r,now:Date.now()}));return this.resume(e),i}async enqueueMessage(e,t,r,i){let n=await this.mutate(e,n=>[n.active,...n.queued,...n.history].some(e=>e?.sourceMessageId===r)?n:(0,s.InG)(n,{id:crypto.randomUUID(),sessionId:e,objective:t,sourceMessageId:r,messagePayload:i,now:Date.now(),activate:!1}));return this.resume(e),n}reorder(e,t,r=!1){return this.mutate(e,e=>r?(0,s.h1F)(e,t):(0,s.ZC9)(e,t))}updateMessage(e,t,r,i){return this.mutate(e,e=>(0,s.Wog)(e,t,r,i))}async cancel(e,t){let r=await this.mutate(e,r=>(r.active?.id===t&&this.draining.has(e)&&this.abort(e),(0,s.LJm)(r,t,Date.now())));return this.resume(e),r}async steer(e,t){return this.mutate(e,async r=>{let i=r.queued.find(e=>e.id===t&&"message"===e.kind);if(!i||!this.busy(e))throw Error("没有可引导的运行或排队消息");if(!await this.steerRun(e,i.objective))throw Error("运行已结束,请继续排队");return(0,s.LJm)(r,t,Date.now())})}resume(e){this.draining.has(e)||(this.draining.add(e),this.drain(e).catch(e=>console.error("Customer queue failed",e)).finally(()=>this.draining.delete(e)))}async drain(e){for(;;){let t;let r=await this.get(e,!1);if(!r.active&&!r.queued.length)return;if(this.busy(e)){await new Promise(e=>setTimeout(e,100));continue}let i=(await this.mutate(e,e=>(0,s.s_d)(e,Date.now()))).active;if(!i)continue;let n="failed";try{n=await this.run(e,i)}catch(e){if(e?.code==="SESSION_ALREADY_RUNNING")continue;t=e instanceof Error?e.message:String(e)}await this.mutate(e,e=>e.active?.id===i.id?(0,s.JXc)(e,n,Date.now(),t):e)}}async require(e){let t=await this.store.get(e);if(!t)throw Error("Session not found");return t}async mutate(e,t){let r=(this.tails.get(e)??Promise.resolve()).catch(()=>{}).then(async()=>{let r=await this.require(e),i=await t((0,s.E0T)(r.metadata));if(this.persist)this.persist(e,i);else{let t=await this.require(e);await this.store.update(e,{metadata:(0,s.eC7)(t.metadata,i)})}return i});this.tails.set(e,r);try{return await r}finally{this.tails.get(e)===r&&this.tails.delete(e)}}}var a=r(785);let o=globalThis,u=new Set;function l(){return o.__sharedCustomerQueue??=new n(i.agentHost.getSessionStore(),e=>i.agentHost.isSessionRunning(e),async(e,t)=>{u.add(e);try{return await i.agentHost.startRun(t.objective,e,t.messagePayload?.images,{agentIds:t.messagePayload?.agentIds}).completion,(await i.agentHost.getSessionStore().get(e))?.status==="completed"?"completed":"failed"}finally{u.delete(e)}},e=>{u.has(e)&&i.agentHost.abort(e)},(e,t)=>i.agentHost.steer(t,e),(e,t)=>{(0,s.N8n)((0,a.kO)()).db.prepare("UPDATE sessions SET metadata = json_set(metadata, '$.goalState', json(?)), updated = ? WHERE id = ?").run(JSON.stringify(t),new Date().toISOString(),e)})}function c(){for(let e of(0,s.N8n)((0,a.kO)()).db.prepare("SELECT id FROM sessions WHERE json_extract(metadata, '$.goalState.active') IS NOT NULL OR json_array_length(metadata, '$.goalState.queued') > 0").all())l().resume(e.id)}},1614:(e,t,r)=>{r.d(t,{NL:()=>N,V_:()=>O,WW:()=>y});var s=r(7561),i=r(612),n=r(9411),a=r(7718),o=r(1322);function u(e){if(!e.trim())return!1;try{return(0,s.accessSync)(e,s.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 s=u(r);t.push({source:"pin",path:r,executable:s,version:s?l(r):void 0,error:s?void 0:`${e.environmentVariable} "${r}" is not executable`})}let s=function(e){for(let t of(process.env.PATH??"").split(n.delimiter).filter(Boolean)){let r=(0,n.resolve)(t,e);if(u(r))return r}}(e.name);return s&&s!==r&&t.push({source:"path",path:s,executable:!0,version:l(s)}),(0,o.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var d=r(535),h=r(6279),p=r(785);let m=globalThis;class g{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 h.no("Native workspace import is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.importWorkspace(e,t,r)}async listWorkspaceSessions(e,t,r){let s=await this.runtime.listWorkspaceSessions(e,t,r);if(r?.cursor)return s;let i=new Set(s.data.map(e=>e.id)),n=s.data.map(e=>{let t=this.pendingCreations.get(e.id);return t?(this.pendingCreations.delete(e.id),w(e,t)):e});for(let r of this.pendingCreations.values())r.agentType!==e||r.projectId!==t||i.has(r.id)||n.unshift(r);return{...s,data:n}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return I(this.withPendingCreations(t).map(e=>E(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return I(this.withPendingCreations(t).map(e=>E(e,r,this.platform)),e)}async create(e){let t=E(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){if(!O(e))throw new h.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let t=E(await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(t.id,t),t}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(s){let r=this.pendingCreations.get(e);if(!r)throw s;return t?{...r,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...r,messages:[],events:[]}}return E(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:s}=await Promise.resolve().then(r.bind(r,1322));return s(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,r,s,i){return this.runtime.run(e,t,r,s,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 h.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,s="web",i){if(!this.runtime.startRun)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,s,i)}async subscribe(e,t,r){if(!this.runtime.subscribe)throw new h.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 h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.snapshot(e,t)}async setPermissionMode(e,t){if(!this.runtime.setPermissionMode)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.setPermissionMode(e,t)}async handoff(e,t){if(!this.runtime.handoff)throw new h.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 h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.getGoals(e,t)}async enqueueGoal(e,t,r,s="web"){if(!this.runtime.enqueueGoal)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,r,s)}async reorderGoals(e,t){if(!this.runtime.reorderGoals)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderGoals(e,t)}async cancelGoal(e,t){if(!this.runtime.cancelGoal)throw new h.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 h.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 h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderMessages(e,t)}async updateMessage(e,t,r,s){if(!this.runtime.updateMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,r,s)}async cancelMessage(e,t){if(!this.runtime.cancelMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelMessage(e,t)}async steerMessage(e,t){if(!this.runtime.steerMessage)throw new h.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?w(e,r):e});return[...[...this.pendingCreations.values()].filter(e=>!t.has(e.id)).sort((e,t)=>t.updated.localeCompare(e.updated)),...r]}}function w(e,t){return{...e,cwd:e.cwd||t.cwd,projectId:e.projectId??t.projectId}}function f(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function N(){if(!m.__nativeRuntimeService){!function(){let e=[(0,n.join)((0,i.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(n.delimiter),r=e.filter(e=>(0,s.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(n.delimiter))}();let e=new o.XWE((0,p.kO)());m.__nativeRuntimeService=new g((0,h.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,f("AGENT_CODEX_RUNTIME_ERROR",t),f("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,h.WH)(t.executable??"codex",e,r.executable??"opencode")}}),()=>e.list())}return m.__nativeRuntimeService}function E(e,t,r=process.platform){let{projectId:s,...i}=e;if(!e.cwd)return i;let a=v(e.cwd,r),o="win32"===r?n.win32.sep:n.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:v(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 v(e,t=process.platform){if("win32"!==t)return(0,n.resolve)(e);let r=n.win32.resolve(e),s=n.win32.parse(r).root;return(r.length>s.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function I(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function O(e){try{return"customer-agent"!==(0,h.Vu)(e).agentType}catch{return!1}}function y(e){if(e instanceof h.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":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}},1489:(e,t,r)=>{r.d(t,{N:()=>u});var s=r(1322),i=r(6279),n=r(785);class a{constructor(){this.tasks=new s.vo4((0,n.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:s}=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 s().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}}};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],()=>r(2947));module.exports=s})();
|
|
@@ -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")},5881:e=>{e.exports=require("node:util")},
|
|
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")},2246:(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 s=r(7786),i=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,s=null;return new Response(new ReadableStream({start(i){let a=new TextEncoder,u=()=>{if(!r){r=!0,n?.(),n=null,s&&e.signal.removeEventListener("abort",s);try{i.close()}catch{}}},l=e=>{if(r)return!1;try{return i.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),s=u,e.signal.aborted?u():e.signal.addEventListener("abort",s,{once:!0})},cancel(){r=!0,n?.(),n=null,s&&e.signal.removeEventListener("abort",s)}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}async function d(e,t){let r=!1,n=null,s=null,i=(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,s&&e.signal.removeEventListener("abort",s);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 i.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 i.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()}),s=d,e.signal.aborted?d():e.signal.addEventListener("abort",s,{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,s&&e.signal.removeEventListener("abort",s)}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}let p=new s.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/agent/stream/route",pathname:"/api/agent/stream",filename:"route",bundlePath:"app/api/agent/stream/route"},resolvedPagePath:"/Users/caoqu/.codex/worktrees/npm-preview-34/customer-agent/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_:()=>T,WW:()=>N});var n=r(7561),s=r(612),i=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(i.delimiter).filter(Boolean)){let r=(0,i.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 s=new Set(n.data.map(e=>e.id)),i=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||s.has(r.id)||i.unshift(r);return{...n,data:i}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return w(this.withPendingCreations(t).map(e=>b(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return w(this.withPendingCreations(t).map(e=>b(e,r,this.platform)),e)}async create(e){let t=b(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){if(!T(e))throw new p.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let t=b(await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(t.id,t),t}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 b(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,s){return this.runtime.run(e,t,r,n,s)}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",s){if(!this.runtime.startRun)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,n,s)}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 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,i.join)((0,s.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(i.delimiter),r=e.filter(e=>(0,n.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(i.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 b(e,t,r=process.platform){let{projectId:n,...s}=e;if(!e.cwd)return s;let a=y(e.cwd,r),o="win32"===r?i.win32.sep:i.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:y(e.description,r)})).filter(({path:e})=>a===e||a.startsWith(`${e}${o}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...s,projectId:u.project.id}:s}function y(e,t=process.platform){if("win32"!==t)return(0,i.resolve)(e);let r=i.win32.resolve(e),n=i.win32.parse(r).root;return(r.length>n.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function w(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function T(e){try{return"customer-agent"!==(0,p.Vu)(e).agentType}catch{return!1}}function N(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":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),s=r(3931),i=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,s.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),i=r.runId?(0,a.DXW)({sessionId:e,runId:r.runId,title:"任务已完成",finalText:t.finalText,outcome:"completed",source:"user"},n):null;i&&l.accept(i.notificationId)&&(0,s.i)().notifySession({...i,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,s.i)().notifySession({...n,url:`/app/?session=${encodeURIComponent(e)}`});return}"error"===t.type&&(0,s.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,i.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),s=r(6279),i=r(785);class a{constructor(){this.tasks=new n.vo4((0,i.kO)()),this.scheduler=new s.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)),s=e.sessionId;s&&await t.getSessionStore().get(s)||(s=(await t.createSession(e.label||"定时任务")).id,this.tasks.update(e.id,{sessionId:s})),await n().enqueue(s,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),s=r(7561),i=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,i.resolve)(e,".agentroam-auth");(0,s.mkdirSync)(r,{recursive:!0,mode:448});let n=(0,i.join)(r,"push.sqlite");this.db=new a(n),(0,s.chmodSync)(n,384),this.db.pragma("busy_timeout = 5000"),this.db.exec(`
|
|
10
|
+
`),d()}},cancel(){r=!0,n?.(),n=null,s&&e.signal.removeEventListener("abort",s)}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}let p=new s.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/agent/stream/route",pathname:"/api/agent/stream",filename:"route",bundlePath:"app/api/agent/stream/route"},resolvedPagePath:"/Users/caoqu/.codex/worktrees/npm-preview-36/customer-agent/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_:()=>T,WW:()=>N});var n=r(7561),s=r(612),i=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(i.delimiter).filter(Boolean)){let r=(0,i.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 s=new Set(n.data.map(e=>e.id)),i=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||s.has(r.id)||i.unshift(r);return{...n,data:i}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return w(this.withPendingCreations(t).map(e=>b(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return w(this.withPendingCreations(t).map(e=>b(e,r,this.platform)),e)}async create(e){let t=b(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){if(!T(e))throw new p.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let t=b(await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(t.id,t),t}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 b(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,s){return this.runtime.run(e,t,r,n,s)}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",s){if(!this.runtime.startRun)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,n,s)}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 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,i.join)((0,s.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(i.delimiter),r=e.filter(e=>(0,n.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(i.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 b(e,t,r=process.platform){let{projectId:n,...s}=e;if(!e.cwd)return s;let a=y(e.cwd,r),o="win32"===r?i.win32.sep:i.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:y(e.description,r)})).filter(({path:e})=>a===e||a.startsWith(`${e}${o}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...s,projectId:u.project.id}:s}function y(e,t=process.platform){if("win32"!==t)return(0,i.resolve)(e);let r=i.win32.resolve(e),n=i.win32.parse(r).root;return(r.length>n.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function w(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function T(e){try{return"customer-agent"!==(0,p.Vu)(e).agentType}catch{return!1}}function N(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":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),s=r(3931),i=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,s.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),i=r.runId?(0,a.DXW)({sessionId:e,runId:r.runId,title:"任务已完成",finalText:t.finalText,outcome:"completed",source:"user"},n):null;i&&l.accept(i.notificationId)&&(0,s.i)().notifySession({...i,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,s.i)().notifySession({...n,url:`/app/?session=${encodeURIComponent(e)}`});return}"error"===t.type&&(0,s.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,i.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),s=r(6279),i=r(785);class a{constructor(){this.tasks=new n.vo4((0,i.kO)()),this.scheduler=new s.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)),s=e.sessionId;s&&await t.getSessionStore().get(s)||(s=(await t.createSession(e.label||"定时任务")).id,this.tasks.update(e.id,{sessionId:s})),await n().enqueue(s,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),s=r(7561),i=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,i.resolve)(e,".agentroam-auth");(0,s.mkdirSync)(r,{recursive:!0,mode:448});let n=(0,i.join)(r,"push.sqlite");this.db=new a(n),(0,s.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,s,"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:s}){let i=e||`${t}:notification`;if(!this.delivered.has(i)){for(this.delivered.add(i);this.delivered.size>500;)this.delivered.delete(this.delivered.values().next().value);this.sendToAll({notificationId:i,sessionId:t,title:r,body:n,tag:i,url:s})}}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,s,"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:s}){let i=e||`${t}:notification`;if(!this.delivered.has(i)){for(this.delivered.add(i);this.delivered.size>500;)this.delivered.delete(this.delivered.values().next().value);this.sendToAll({notificationId:i,sessionId:t,title:r,body:n,tag:i,url:s})}}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(2246));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")},5881:e=>{e.exports=require("node:util")},
|
|
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")},6971:(e,r,s)=>{s.r(r),s.d(r,{originalPathname:()=>k,patchFetch:()=>h,requestAsyncStorage:()=>x,routeModule:()=>m,serverHooks:()=>w,staticGenerationAsyncStorage:()=>q});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(6405);async function g(e,r){let s;let t=new URL(e.url),o=(0,l.ql)(t.searchParams.get("agentType"));if(!o)return i.NextResponse.json({error:"A valid agentType is required"},{status:400});try{let e=(0,l.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)return i.NextResponse.json(await (0,c.NL)().listWorkspaceSessions(o,r.params.workspaceId,s));let t="",a=null;if(r.params.workspaceId===l.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.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 m=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:"/Users/caoqu/.codex/worktrees/npm-preview-36/customer-agent/packages/server/app/api/agent-workspaces/[workspaceId]/sessions/route.ts",nextConfigOutput:"standalone",userland:t}),{requestAsyncStorage:x,staticGenerationAsyncStorage:q,serverHooks:w}=m,k="/api/agent-workspaces/[workspaceId]/sessions/route";function h(){return(0,n.patchFetch)({serverHooks:w,staticGenerationAsyncStorage:q})}}};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(6971));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")},5881:e=>{e.exports=require("node:util")},
|
|
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")},346:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>y,patchFetch:()=>f,requestAsyncStorage:()=>g,routeModule:()=>x,serverHooks:()=>w,staticGenerationAsyncStorage:()=>q});var s={};t.r(s),t.d(s,{GET:()=>h,POST:()=>m});var o=t(7786),a=t(5042),n=t(2184),i=t(1890),p=t(6279),u=t(7519),c=t(1614),d=t(556),l=t(6405);async function h(e){let r;let t=new URL(e.url),s=(0,l.ql)(t.searchParams.get("agentType"));if(!s)return i.NextResponse.json({error:"A valid agentType is required"},{status:400});try{r=(0,l.MT)(t)}catch(e){return i.NextResponse.json({error:e instanceof Error?e.message:"Invalid query"},{status:400})}try{if("customer-agent"!==s)return i.NextResponse.json(await (0,c.NL)().listWorkspaces(s,r));let e=(await u.agentHost.getProjectStore().list()).filter(e=>e.description.trim().length>0),t=[{agentType:s,workspaceId:l.rK,name:"最近",roots:[],order:-1,source:"derived",canCreateSession:!1},...e.map((e,r)=>({agentType:s,workspaceId:e.id,name:e.name,roots:e.description?[e.description]:[],order:r,updatedAt:e.updated,source:"native"}))];return i.NextResponse.json((0,p.L)(t,r,e[0]?.updated??null))}catch(e){return i.NextResponse.json({error:e instanceof Error?e.message:"Workspace discovery failed"},{status:(0,c.WW)(e)})}}async function m(e){let r;try{r=await e.json()}catch{return i.NextResponse.json({error:"A JSON body is required"},{status:400})}let t=(0,l.ql)(r.agentType??null);if(!t||!r.path?.trim())return i.NextResponse.json({error:"A valid agentType and path are required"},{status:400});try{let e=d.a.canonicalDirectory(r.path);if("customer-agent"!==t)return i.NextResponse.json(await (0,c.NL)().importWorkspace(t,e,r.name),{status:201});let s=await d.a.list(),o=await d.a.create(e,r.name);return i.NextResponse.json({workspace:{agentType:t,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(r){let e=(0,d.r)(r);if(500!==e.status)return i.NextResponse.json(e.body,{status:e.status});return i.NextResponse.json({error:r instanceof Error?r.message:"Workspace import failed"},{status:(0,c.WW)(r)})}}let x=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:"/Users/caoqu/.codex/worktrees/npm-preview-36/customer-agent/packages/server/app/api/agent-workspaces/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:g,staticGenerationAsyncStorage:q,serverHooks:w}=x,y="/api/agent-workspaces/route";function f(){return(0,n.patchFetch)({serverHooks:w,staticGenerationAsyncStorage:q})}},556:(e,r,t)=>{t.d(r,{r:()=>d,a:()=>c});var s=t(612),o=t(1322),a=t(785),n=t(6005),i=t(9411);class p extends Error{constructor(e,r,t){super(e),this.code=r,this.status=t,this.name="WebProjectError"}}class u{constructor(e,r){this.store=e,this.paths=r}list(){return this.store.list()}async get(e){let r=await this.store.get(e);if(!r)throw new p("项目不存在","PROJECT_NOT_FOUND",404);return r}async create(e,r){let t=this.paths.assertDirectory(e);for(let e of(await this.store.list()))try{if(this.paths.assertDirectory(e.description)===t)return e}catch{}let s=new Date().toISOString();return this.store.create({id:(0,n.randomUUID)(),name:r?.trim()||(0,i.basename)(t)||t,description:t,created:s,updated:s})}async rename(e,r){await this.get(e);let t=r.trim();if(!t)throw new p("项目名称不能为空","PROJECT_NAME_REQUIRED",400);return this.store.update(e,{name:t})}async delete(e){await this.get(e),await this.store.delete(e)}roots(){return this.paths.roots}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 c=new u(new o.XWE((0,a.kO)()),o.Tpv.fromEnvironment(process.env.AGENT_WEB_ROOTS,(0,s.homedir)()));function d(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 r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[8375,6703,6244,1322,1773,4621,7519,2293],()=>t(346));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")},1407:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>l,patchFetch:()=>h,requestAsyncStorage:()=>d,routeModule:()=>p,serverHooks:()=>v,staticGenerationAsyncStorage:()=>c});var a={};r.r(a),r.d(a,{GET:()=>u});var o=r(7786),s=r(5042),n=r(2184),i=r(1890);async function u(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 p=new o.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/api/auth/verify/route",pathname:"/api/auth/verify",filename:"route",bundlePath:"app/api/auth/verify/route"},resolvedPagePath:"/Users/caoqu/.codex/worktrees/npm-preview-36/customer-agent/packages/server/app/api/auth/verify/route.ts",nextConfigOutput:"standalone",userland:a}),{requestAsyncStorage:d,staticGenerationAsyncStorage:c,serverHooks:v}=p,l="/api/auth/verify/route";function h(){return(0,n.patchFetch)({serverHooks:v,staticGenerationAsyncStorage:c})}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[8375,6703],()=>r(1407));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")},5881:e=>{e.exports=require("node:util")},
|
|
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")},9354:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>q,patchFetch:()=>f,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:"/Users/caoqu/.codex/worktrees/npm-preview-36/customer-agent/packages/server/app/api/business/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:h,staticGenerationAsyncStorage:x,serverHooks:g}=c,q="/api/business/route";function f(){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(9354));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")},1490:(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:"/Users/caoqu/.codex/worktrees/npm-preview-36/customer-agent/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(1490));module.exports=o})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=2549,e.ids=[2549],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")},
|
|
1
|
+
"use strict";(()=>{var e={};e.id=2549,e.ids=[2549],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")},2078:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>q,patchFetch:()=>h,requestAsyncStorage:()=>c,routeModule:()=>d,serverHooks:()=>x,staticGenerationAsyncStorage:()=>l});var o={};t.r(o),t.d(o,{GET:()=>u,dynamic:()=>n});var s=t(7786),a=t(5042),i=t(2184),p=t(6089);let n="force-dynamic";async function u(e){try{return(0,p.Pj)(e),Response.json(await (0,p.Wt)(),{headers:{"cache-control":"no-store"}})}catch(e){return(0,p.u4)(e)}}let d=new s.AppRouteRouteModule({definition:{kind:a.x.APP_ROUTE,page:"/api/flow/v1/catalog/route",pathname:"/api/flow/v1/catalog",filename:"route",bundlePath:"app/api/flow/v1/catalog/route"},resolvedPagePath:"/Users/caoqu/.codex/worktrees/npm-preview-36/customer-agent/packages/server/app/api/flow/v1/catalog/route.ts",nextConfigOutput:"standalone",userland:o}),{requestAsyncStorage:c,staticGenerationAsyncStorage:l,serverHooks:x}=d,q="/api/flow/v1/catalog/route";function h(){return(0,i.patchFetch)({serverHooks:x,staticGenerationAsyncStorage:l})}}};var r=require("../../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),o=r.X(0,[8375,6244,1322,1773,4621,7519,7788],()=>t(2078));module.exports=o})();
|