@north-light/cli 0.0.0 → 0.3.413
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/LICENSE +18 -0
- package/README.md +182 -2
- package/bin/crouter +4 -0
- package/bin/crtr +4 -0
- package/bin/crtr-launcher +4 -0
- package/bin/crtrd +4 -0
- package/bin/progress-painter.mjs +89 -0
- package/bin/runtime-generation-manifest.mjs +286 -0
- package/bin/runtime-selector.mjs +510 -0
- package/dist/api/client.d.ts +501 -0
- package/dist/api/client.js +3 -0
- package/dist/api/command-manifest/index.d.ts +3 -0
- package/dist/api/command-manifest/index.js +1 -0
- package/dist/api/command-manifest/manifest.d.ts +51 -0
- package/dist/api/command-manifest/manifest.js +1 -0
- package/dist/api/command-manifest/result.d.ts +25 -0
- package/dist/api/command-manifest/result.js +1 -0
- package/dist/api/command-manifest/schema.d.ts +28 -0
- package/dist/api/command-manifest/schema.js +1 -0
- package/dist/api/dto/analytics.d.ts +184 -0
- package/dist/api/dto/analytics.js +0 -0
- package/dist/api/dto/attach.d.ts +22 -0
- package/dist/api/dto/attach.js +0 -0
- package/dist/api/dto/bash-jobs.d.ts +24 -0
- package/dist/api/dto/bash-jobs.js +1 -0
- package/dist/api/dto/bash.d.ts +17 -0
- package/dist/api/dto/bash.js +0 -0
- package/dist/api/dto/broker-ops.d.ts +187 -0
- package/dist/api/dto/broker-ops.js +0 -0
- package/dist/api/dto/broker-signals.d.ts +25 -0
- package/dist/api/dto/broker-signals.js +0 -0
- package/dist/api/dto/broker.d.ts +86 -0
- package/dist/api/dto/broker.js +0 -0
- package/dist/api/dto/canvas.d.ts +359 -0
- package/dist/api/dto/canvas.js +0 -0
- package/dist/api/dto/chat-inventory.d.ts +56 -0
- package/dist/api/dto/chat-inventory.js +0 -0
- package/dist/api/dto/common.d.ts +29 -0
- package/dist/api/dto/common.js +1 -0
- package/dist/api/dto/config.d.ts +46 -0
- package/dist/api/dto/config.js +0 -0
- package/dist/api/dto/crons.d.ts +158 -0
- package/dist/api/dto/crons.js +1 -0
- package/dist/api/dto/custom-objects.d.ts +66 -0
- package/dist/api/dto/custom-objects.js +0 -0
- package/dist/api/dto/delivery.d.ts +71 -0
- package/dist/api/dto/delivery.js +0 -0
- package/dist/api/dto/docs.d.ts +135 -0
- package/dist/api/dto/docs.js +1 -0
- package/dist/api/dto/files.d.ts +21 -0
- package/dist/api/dto/files.js +0 -0
- package/dist/api/dto/focus.d.ts +24 -0
- package/dist/api/dto/focus.js +0 -0
- package/dist/api/dto/grants.d.ts +28 -0
- package/dist/api/dto/grants.js +0 -0
- package/dist/api/dto/health.d.ts +116 -0
- package/dist/api/dto/health.js +0 -0
- package/dist/api/dto/human-requests.d.ts +113 -0
- package/dist/api/dto/human-requests.js +0 -0
- package/dist/api/dto/human.d.ts +28 -0
- package/dist/api/dto/human.js +0 -0
- package/dist/api/dto/inbox.d.ts +273 -0
- package/dist/api/dto/inbox.js +0 -0
- package/dist/api/dto/lifecycle.d.ts +88 -0
- package/dist/api/dto/lifecycle.js +0 -0
- package/dist/api/dto/limits.d.ts +29 -0
- package/dist/api/dto/limits.js +0 -0
- package/dist/api/dto/mail.d.ts +44 -0
- package/dist/api/dto/mail.js +0 -0
- package/dist/api/dto/messages.d.ts +104 -0
- package/dist/api/dto/messages.js +0 -0
- package/dist/api/dto/model-config.d.ts +25 -0
- package/dist/api/dto/model-config.js +0 -0
- package/dist/api/dto/modelauth.d.ts +132 -0
- package/dist/api/dto/modelauth.js +0 -0
- package/dist/api/dto/node-events.d.ts +65 -0
- package/dist/api/dto/node-events.js +0 -0
- package/dist/api/dto/node-outcomes.d.ts +88 -0
- package/dist/api/dto/node-outcomes.js +0 -0
- package/dist/api/dto/node-records.d.ts +35 -0
- package/dist/api/dto/node-records.js +0 -0
- package/dist/api/dto/nodes.d.ts +371 -0
- package/dist/api/dto/nodes.js +0 -0
- package/dist/api/dto/objects.d.ts +172 -0
- package/dist/api/dto/objects.js +1 -0
- package/dist/api/dto/profiles.d.ts +117 -0
- package/dist/api/dto/profiles.js +1 -0
- package/dist/api/dto/recovery.d.ts +104 -0
- package/dist/api/dto/recovery.js +0 -0
- package/dist/api/dto/reports.d.ts +95 -0
- package/dist/api/dto/reports.js +0 -0
- package/dist/api/dto/review-comments.d.ts +146 -0
- package/dist/api/dto/review-comments.js +0 -0
- package/dist/api/dto/reviews.d.ts +113 -0
- package/dist/api/dto/reviews.js +0 -0
- package/dist/api/dto/run-events.d.ts +295 -0
- package/dist/api/dto/run-events.js +0 -0
- package/dist/api/dto/structured-requests.d.ts +64 -0
- package/dist/api/dto/structured-requests.js +1 -0
- package/dist/api/dto/subscriptions.d.ts +14 -0
- package/dist/api/dto/subscriptions.js +0 -0
- package/dist/api/dto/worktree.d.ts +55 -0
- package/dist/api/dto/worktree.js +0 -0
- package/dist/api/error-codes.d.ts +259 -0
- package/dist/api/error-codes.js +1 -0
- package/dist/api/errors.d.ts +47 -0
- package/dist/api/errors.js +1 -0
- package/dist/api/index.d.ts +48 -0
- package/dist/api/index.js +1 -0
- package/dist/api/long-poll.d.ts +59 -0
- package/dist/api/long-poll.js +1 -0
- package/dist/api/node-transport.d.ts +18 -0
- package/dist/api/node-transport.js +1 -0
- package/dist/api/plugin-manifest-schema.d.ts +233 -0
- package/dist/api/plugin-manifest-schema.js +0 -0
- package/dist/api/routes.d.ts +164 -0
- package/dist/api/routes.js +1 -0
- package/dist/api/runtime-version.d.ts +31 -0
- package/dist/api/runtime-version.js +1 -0
- package/dist/build-root.d.ts +58 -0
- package/dist/build-root.js +1 -0
- package/dist/builtin-memory/00-runtime-base/00-authoring.md +46 -0
- package/dist/builtin-memory/00-runtime-base/01-escalation-unattended.md +15 -0
- package/dist/builtin-memory/00-runtime-base/01-escalation.md +15 -0
- package/dist/builtin-memory/00-runtime-base/02-insight-capture.md +11 -0
- package/dist/builtin-memory/01-spine/00-has-manager.md +14 -0
- package/dist/builtin-memory/02-turn-lifecycle/00-ending-a-turn.md +28 -0
- package/dist/builtin-memory/02-turn-lifecycle/01-terminal-user.md +11 -0
- package/dist/builtin-memory/02-turn-lifecycle/01-terminal.md +13 -0
- package/dist/builtin-memory/02-turn-lifecycle/02-resident.md +19 -0
- package/dist/builtin-memory/04-base-worker-exploring.md +13 -0
- package/dist/builtin-memory/04-base-worker.md +15 -0
- package/dist/builtin-memory/04-orchestration-kernel.md +62 -0
- package/dist/builtin-memory/05-kinds/advisor/01-orchestrator.md +17 -0
- package/dist/builtin-memory/05-kinds/advisor/advice-contract.md +15 -0
- package/dist/builtin-memory/05-kinds/explore/00-base.md +19 -0
- package/dist/builtin-memory/05-kinds/explore/01-orchestrator.md +17 -0
- package/dist/builtin-memory/05-kinds/general/00-base.md +15 -0
- package/dist/builtin-memory/05-kinds/review/00-base.md +17 -0
- package/dist/builtin-memory/05-kinds/review/01-orchestrator.md +20 -0
- package/dist/builtin-memory/05-kinds/review/companion/00-base.md +21 -0
- package/dist/builtin-memory/05-kinds/review/security-findings.md +13 -0
- package/dist/builtin-memory/advisor/council.md +33 -0
- package/dist/builtin-memory/crouter-concepts/INDEX.md +15 -0
- package/dist/builtin-memory/crouter-concepts/README.md +19 -0
- package/dist/builtin-memory/crouter-concepts/documents.md +54 -0
- package/dist/builtin-memory/crouter-concepts/lifecycle-and-wakes.md +28 -0
- package/dist/builtin-memory/crouter-concepts/nodes-and-the-canvas.md +31 -0
- package/dist/builtin-memory/crouter-concepts/profiles-kinds-and-modes.md +33 -0
- package/dist/builtin-memory/crouter-concepts/scopes-and-trust.md +41 -0
- package/dist/builtin-memory/crouter-concepts/why-a-daemon.md +31 -0
- package/dist/builtin-memory/crouter-plugin/INDEX.md +12 -0
- package/dist/builtin-memory/crouter-plugin/README.md +22 -0
- package/dist/builtin-memory/crouter-plugin/bundles-and-memory.md +30 -0
- package/dist/builtin-memory/crouter-plugin/commands.md +24 -0
- package/dist/builtin-memory/crouter-plugin/deploying.md +36 -0
- package/dist/builtin-memory/crouter-plugin/errors.md +41 -0
- package/dist/builtin-memory/crouter-plugin/getting-started.md +25 -0
- package/dist/builtin-memory/crouter-plugin/output.md +52 -0
- package/dist/builtin-memory/crouter-plugin/parameters.md +31 -0
- package/dist/builtin-memory/crouter-sdk/INDEX.md +13 -0
- package/dist/builtin-memory/crouter-sdk/README.md +92 -0
- package/dist/builtin-memory/crouter-sdk/bash.md +40 -0
- package/dist/builtin-memory/crouter-sdk/client.md +299 -0
- package/dist/builtin-memory/crouter-sdk/docker.md +70 -0
- package/dist/builtin-memory/crouter-sdk/error-envelope.md +38 -0
- package/dist/builtin-memory/crouter-sdk/errors.md +113 -0
- package/dist/builtin-memory/crouter-sdk/files.md +50 -0
- package/dist/builtin-memory/crouter-sdk/getting-started.md +226 -0
- package/dist/builtin-memory/crouter-sdk/guides/README.md +20 -0
- package/dist/builtin-memory/crouter-sdk/guides/apps-on-crouter-cloud.md +117 -0
- package/dist/builtin-memory/crouter-sdk/guides/apps-with-many-users.md +61 -0
- package/dist/builtin-memory/crouter-sdk/guides/event-driven-assistant.md +91 -0
- package/dist/builtin-memory/crouter-sdk/guides/fan-out-pipeline.md +57 -0
- package/dist/builtin-memory/crouter-sdk/guides/human-approval.md +79 -0
- package/dist/builtin-memory/crouter-sdk/guides/typed-extraction.md +55 -0
- package/dist/builtin-memory/crouter-sdk/memory.md +49 -0
- package/dist/builtin-memory/crouter-sdk/nodes.md +195 -0
- package/dist/builtin-memory/crouter-sdk/release-notes.md +209 -0
- package/dist/builtin-memory/crouter-sdk/resources.md +101 -0
- package/dist/builtin-memory/crouter-sdk/streaming.md +218 -0
- package/dist/builtin-memory/crouter-sdk/testing.md +165 -0
- package/dist/builtin-memory/explore/exploration-doc.md +27 -0
- package/dist/builtin-memory/insights/capture.md +49 -0
- package/dist/builtin-memory/insights/init.md +88 -0
- package/dist/builtin-memory/internal/INDEX.md +40 -0
- package/dist/builtin-memory/internal/agent-shaping.md +80 -0
- package/dist/builtin-memory/internal/examples/INDEX.md +16 -0
- package/dist/builtin-memory/internal/examples/imessage-assistant.md +101 -0
- package/dist/builtin-memory/internal/marketplaces.md +160 -0
- package/dist/builtin-memory/internal/memory-loading.md +68 -0
- package/dist/builtin-memory/internal/nodes-and-canvas.md +60 -0
- package/dist/builtin-memory/internal/plugins.md +457 -0
- package/dist/builtin-memory/internal/storage-tiers.md +51 -0
- package/dist/builtin-memory/memory-read-orientation.md +13 -0
- package/dist/builtin-memory/wedged-child-on-runaway-bash.md +21 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/README.md +49 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/claude-plugin-commands.ts +440 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/crtr-commands/filters.json +7 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/crtr-commands/index.ts +214 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/frontmatter-rules/index.ts +421 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/memory-slash-commands.ts +145 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/pi-shell-runner.ts +34 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/provider-rotation.d.ts +78 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/provider-rotation.js +1181 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/provider-rotation.ts +1409 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/sysprompt-window.ts +19 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/lib/package.json +3 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/lib/subscription-state.js +1 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/lib/subscription-state.ts +2 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/LICENSE +13 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/README.md +172 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/bin.mjs +11 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/compose/compose-node.js +109 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/compose/composer.js +219 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +225 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/doc/Document.js +335 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/doc/directives.js +176 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/errors.js +57 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/index.js +17 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/log.js +11 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/nodes/Alias.js +116 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/parse/cst.js +98 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/parse/lexer.js +721 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/parse/parser.js +975 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/public-api.js +102 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/tags.js +96 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +67 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +153 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +25 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/util.js +11 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/dist/visit.js +233 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/index.js +5 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/browser/package.json +3 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/cli.d.ts +8 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/cli.mjs +201 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/compose-collection.js +90 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/compose-doc.js +45 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/compose-node.js +112 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/composer.d.ts +63 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/composer.js +224 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/resolve-end.js +39 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/resolve-flow-scalar.js +227 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/resolve-props.js +148 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/doc/Document.d.ts +141 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/doc/Document.js +337 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/doc/anchors.js +76 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/doc/applyReviver.js +57 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/doc/createNode.js +90 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/doc/directives.d.ts +49 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/doc/directives.js +178 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/errors.d.ts +21 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/errors.js +62 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/index.d.ts +25 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/index.js +50 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/log.d.ts +3 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/log.js +19 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/Alias.js +118 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/Collection.js +151 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/Node.js +40 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/Pair.js +39 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/Scalar.d.ts +47 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/Scalar.js +27 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/identity.js +53 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/nodes/toJS.js +39 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/options.d.ts +350 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/parse/cst-visit.js +99 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/parse/cst.d.ts +109 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/parse/cst.js +112 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/parse/lexer.js +723 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/parse/line-counter.js +41 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/parse/parser.d.ts +84 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/parse/parser.js +980 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/public-api.d.ts +44 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/public-api.js +107 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/Schema.js +39 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/common/map.js +19 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/common/null.js +17 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/common/seq.js +19 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/common/string.js +16 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/core/bool.js +21 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/core/float.js +47 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/core/int.js +42 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/core/schema.js +25 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/json/schema.js +64 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/tags.d.ts +48 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/tags.js +99 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/types.d.ts +92 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/merge.js +71 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/stringify/stringify.js +132 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/stringify/stringifyNumber.js +27 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/test-events.d.ts +4 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/test-events.js +134 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/util.d.ts +16 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/util.js +28 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/visit.d.ts +102 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/dist/visit.js +236 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/package.json +97 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/node_modules/yaml/util.js +2 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/package-lock.json +3857 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/package.json +25 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/tsconfig.json +10 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +11 -0
- package/dist/clients/attach/ansi-cells.d.ts +44 -0
- package/dist/clients/attach/ansi-cells.js +1 -0
- package/dist/clients/attach/assets/README.md +7 -0
- package/dist/clients/attach/assets/whip-06.mp3 +0 -0
- package/dist/clients/attach/assets/whip-crack.mp3 +0 -0
- package/dist/clients/attach/assets/whip-snap.mp3 +0 -0
- package/dist/clients/attach/chrome/bash-jobs.d.ts +6 -0
- package/dist/clients/attach/chrome/bash-jobs.js +1 -0
- package/dist/clients/attach/chrome/canvas-panels.d.ts +38 -0
- package/dist/clients/attach/chrome/canvas-panels.js +1 -0
- package/dist/clients/attach/chrome/completion-bell.d.ts +10 -0
- package/dist/clients/attach/chrome/completion-bell.js +1 -0
- package/dist/clients/attach/chrome/cron-wait.d.ts +3 -0
- package/dist/clients/attach/chrome/cron-wait.js +1 -0
- package/dist/clients/attach/chrome/git-info.d.ts +20 -0
- package/dist/clients/attach/chrome/git-info.js +2 -0
- package/dist/clients/attach/chrome/header.d.ts +10 -0
- package/dist/clients/attach/chrome/header.js +1 -0
- package/dist/clients/attach/chrome/inbox-strip.d.ts +31 -0
- package/dist/clients/attach/chrome/inbox-strip.js +1 -0
- package/dist/clients/attach/chrome/key-hint.d.ts +9 -0
- package/dist/clients/attach/chrome/key-hint.js +1 -0
- package/dist/clients/attach/chrome/recap.d.ts +7 -0
- package/dist/clients/attach/chrome/recap.js +1 -0
- package/dist/clients/attach/chrome/review-wait.d.ts +6 -0
- package/dist/clients/attach/chrome/review-wait.js +1 -0
- package/dist/clients/attach/chrome/roster.d.ts +36 -0
- package/dist/clients/attach/chrome/roster.js +4 -0
- package/dist/clients/attach/chrome/status-line.d.ts +38 -0
- package/dist/clients/attach/chrome/status-line.js +1 -0
- package/dist/clients/attach/chrome/ticket-panel.d.ts +29 -0
- package/dist/clients/attach/chrome/ticket-panel.js +1 -0
- package/dist/clients/attach/chrome/widgets.d.ts +9 -0
- package/dist/clients/attach/chrome/widgets.js +1 -0
- package/dist/clients/attach/command.d.ts +3 -0
- package/dist/clients/attach/command.js +1 -0
- package/dist/clients/attach/config.d.ts +95 -0
- package/dist/clients/attach/config.js +1 -0
- package/dist/clients/attach/input/capabilities.d.ts +30 -0
- package/dist/clients/attach/input/capabilities.js +1 -0
- package/dist/clients/attach/input/clipboard-image.d.ts +55 -0
- package/dist/clients/attach/input/clipboard-image.js +20 -0
- package/dist/clients/attach/input/completion-frecency.d.ts +45 -0
- package/dist/clients/attach/input/completion-frecency.js +1 -0
- package/dist/clients/attach/input/controller.d.ts +91 -0
- package/dist/clients/attach/input/controller.js +7 -0
- package/dist/clients/attach/input/overlay-owner.d.ts +41 -0
- package/dist/clients/attach/input/overlay-owner.js +1 -0
- package/dist/clients/attach/input/ref-autocomplete.d.ts +77 -0
- package/dist/clients/attach/input/ref-autocomplete.js +2 -0
- package/dist/clients/attach/input/titled-editor.d.ts +225 -0
- package/dist/clients/attach/input/titled-editor.js +4 -0
- package/dist/clients/attach/overlays/auth.d.ts +13 -0
- package/dist/clients/attach/overlays/auth.js +2 -0
- package/dist/clients/attach/overlays/dialogs.d.ts +27 -0
- package/dist/clients/attach/overlays/dialogs.js +2 -0
- package/dist/clients/attach/overlays/file-review.d.ts +10 -0
- package/dist/clients/attach/overlays/file-review.js +2 -0
- package/dist/clients/attach/overlays/graph.d.ts +83 -0
- package/dist/clients/attach/overlays/graph.js +1 -0
- package/dist/clients/attach/overlays/help.d.ts +33 -0
- package/dist/clients/attach/overlays/help.js +1 -0
- package/dist/clients/attach/overlays/mcp.d.ts +32 -0
- package/dist/clients/attach/overlays/mcp.js +1 -0
- package/dist/clients/attach/overlays/pickers.d.ts +56 -0
- package/dist/clients/attach/overlays/pickers.js +1 -0
- package/dist/clients/attach/photon_rs_bg.wasm +0 -0
- package/dist/clients/attach/render/activity-slot.d.ts +4 -0
- package/dist/clients/attach/render/activity-slot.js +1 -0
- package/dist/clients/attach/render/assistant-message.d.ts +13 -0
- package/dist/clients/attach/render/assistant-message.js +1 -0
- package/dist/clients/attach/render/card-presentation.d.ts +36 -0
- package/dist/clients/attach/render/card-presentation.js +5 -0
- package/dist/clients/attach/render/chat-view.d.ts +356 -0
- package/dist/clients/attach/render/chat-view.js +5 -0
- package/dist/clients/attach/render/condensed-history.d.ts +21 -0
- package/dist/clients/attach/render/condensed-history.js +1 -0
- package/dist/clients/attach/render/context-message.d.ts +22 -0
- package/dist/clients/attach/render/context-message.js +1 -0
- package/dist/clients/attach/render/crtr-output.d.ts +52 -0
- package/dist/clients/attach/render/crtr-output.js +17 -0
- package/dist/clients/attach/render/diagram.d.ts +4 -0
- package/dist/clients/attach/render/diagram.js +7 -0
- package/dist/clients/attach/render/doc-links.d.ts +34 -0
- package/dist/clients/attach/render/doc-links.js +1 -0
- package/dist/clients/attach/render/edit-diff.d.ts +12 -0
- package/dist/clients/attach/render/edit-diff.js +5 -0
- package/dist/clients/attach/render/glyph-codepoints.d.ts +3 -0
- package/dist/clients/attach/render/glyph-codepoints.js +1 -0
- package/dist/clients/attach/render/group-activity.d.ts +84 -0
- package/dist/clients/attach/render/group-activity.js +2 -0
- package/dist/clients/attach/render/group-recap.d.ts +13 -0
- package/dist/clients/attach/render/group-recap.js +1 -0
- package/dist/clients/attach/render/markdown-source.d.ts +16 -0
- package/dist/clients/attach/render/markdown-source.js +5 -0
- package/dist/clients/attach/render/measured-container.d.ts +96 -0
- package/dist/clients/attach/render/measured-container.js +1 -0
- package/dist/clients/attach/render/page-block.d.ts +37 -0
- package/dist/clients/attach/render/page-block.js +1 -0
- package/dist/clients/attach/render/scroll-animation.d.ts +8 -0
- package/dist/clients/attach/render/scroll-animation.js +1 -0
- package/dist/clients/attach/render/tool-calls.d.ts +53 -0
- package/dist/clients/attach/render/tool-calls.js +3 -0
- package/dist/clients/attach/render/transcript-copy.d.ts +9 -0
- package/dist/clients/attach/render/transcript-copy.js +2 -0
- package/dist/clients/attach/render/transcript-search.d.ts +28 -0
- package/dist/clients/attach/render/transcript-search.js +1 -0
- package/dist/clients/attach/render/viewport.d.ts +38 -0
- package/dist/clients/attach/render/viewport.js +1 -0
- package/dist/clients/attach/session/banner.d.ts +13 -0
- package/dist/clients/attach/session/banner.js +1 -0
- package/dist/clients/attach/session/bindings.d.ts +20 -0
- package/dist/clients/attach/session/bindings.js +1 -0
- package/dist/clients/attach/session/chrome-refresh.d.ts +40 -0
- package/dist/clients/attach/session/chrome-refresh.js +1 -0
- package/dist/clients/attach/session/connection.d.ts +53 -0
- package/dist/clients/attach/session/connection.js +1 -0
- package/dist/clients/attach/session/context.d.ts +59 -0
- package/dist/clients/attach/session/context.js +0 -0
- package/dist/clients/attach/session/doc-materialize.d.ts +53 -0
- package/dist/clients/attach/session/doc-materialize.js +3 -0
- package/dist/clients/attach/session/document-links.d.ts +21 -0
- package/dist/clients/attach/session/document-links.js +1 -0
- package/dist/clients/attach/session/editor-frame.d.ts +47 -0
- package/dist/clients/attach/session/editor-frame.js +1 -0
- package/dist/clients/attach/session/editor-inventory.d.ts +63 -0
- package/dist/clients/attach/session/editor-inventory.js +6 -0
- package/dist/clients/attach/session/file-links.d.ts +24 -0
- package/dist/clients/attach/session/file-links.js +1 -0
- package/dist/clients/attach/session/focus-events.d.ts +4 -0
- package/dist/clients/attach/session/focus-events.js +1 -0
- package/dist/clients/attach/session/frame.d.ts +46 -0
- package/dist/clients/attach/session/frame.js +1 -0
- package/dist/clients/attach/session/frames.d.ts +49 -0
- package/dist/clients/attach/session/frames.js +1 -0
- package/dist/clients/attach/session/identity.d.ts +16 -0
- package/dist/clients/attach/session/identity.js +1 -0
- package/dist/clients/attach/session/input-wiring.d.ts +50 -0
- package/dist/clients/attach/session/input-wiring.js +1 -0
- package/dist/clients/attach/session/invariant.d.ts +9 -0
- package/dist/clients/attach/session/invariant.js +1 -0
- package/dist/clients/attach/session/keys.d.ts +46 -0
- package/dist/clients/attach/session/keys.js +1 -0
- package/dist/clients/attach/session/layout.d.ts +22 -0
- package/dist/clients/attach/session/layout.js +1 -0
- package/dist/clients/attach/session/mouse.d.ts +27 -0
- package/dist/clients/attach/session/mouse.js +1 -0
- package/dist/clients/attach/session/pane-focus.d.ts +8 -0
- package/dist/clients/attach/session/pane-focus.js +1 -0
- package/dist/clients/attach/session/pane-tag.d.ts +44 -0
- package/dist/clients/attach/session/pane-tag.js +1 -0
- package/dist/clients/attach/session/pi-assets.d.ts +1 -0
- package/dist/clients/attach/session/pi-assets.js +1 -0
- package/dist/clients/attach/session/pi-oauth-flows.d.ts +1 -0
- package/dist/clients/attach/session/pi-oauth-flows.js +1 -0
- package/dist/clients/attach/session/profile-files.d.ts +17 -0
- package/dist/clients/attach/session/profile-files.js +1 -0
- package/dist/clients/attach/session/reconnect.d.ts +44 -0
- package/dist/clients/attach/session/reconnect.js +1 -0
- package/dist/clients/attach/session/selection.d.ts +28 -0
- package/dist/clients/attach/session/selection.js +3 -0
- package/dist/clients/attach/session/state-sync.d.ts +38 -0
- package/dist/clients/attach/session/state-sync.js +1 -0
- package/dist/clients/attach/session/surface-frame.d.ts +20 -0
- package/dist/clients/attach/session/surface-frame.js +1 -0
- package/dist/clients/attach/session/surface-host.d.ts +65 -0
- package/dist/clients/attach/session/surface-host.js +1 -0
- package/dist/clients/attach/session/teardown.d.ts +30 -0
- package/dist/clients/attach/session/teardown.js +5 -0
- package/dist/clients/attach/session/transcript-search.d.ts +20 -0
- package/dist/clients/attach/session/transcript-search.js +3 -0
- package/dist/clients/attach/session/whip-achievements.d.ts +4 -0
- package/dist/clients/attach/session/whip-achievements.js +2 -0
- package/dist/clients/attach/session/whip.d.ts +20 -0
- package/dist/clients/attach/session/whip.js +1 -0
- package/dist/clients/attach/slash/dispatch.d.ts +116 -0
- package/dist/clients/attach/slash/dispatch.js +2 -0
- package/dist/clients/attach/slash/prompt-preview.d.ts +30 -0
- package/dist/clients/attach/slash/prompt-preview.js +1 -0
- package/dist/clients/attach/viewer.d.ts +8 -0
- package/dist/clients/attach/viewer.js +1946 -0
- package/dist/clients/conversation/projection.d.ts +79 -0
- package/dist/clients/conversation/projection.js +1 -0
- package/dist/clients/conversation/submit.d.ts +38 -0
- package/dist/clients/conversation/submit.js +1 -0
- package/dist/clients/inbox/controller.d.ts +174 -0
- package/dist/clients/inbox/controller.js +1 -0
- package/dist/clients/inbox/dto-adapt.d.ts +28 -0
- package/dist/clients/inbox/dto-adapt.js +1 -0
- package/dist/clients/inbox/layout.d.ts +8 -0
- package/dist/clients/inbox/layout.js +1 -0
- package/dist/clients/inbox/page-adapter.d.ts +33 -0
- package/dist/clients/inbox/page-adapter.js +1 -0
- package/dist/clients/inbox/resolve.d.ts +16 -0
- package/dist/clients/inbox/resolve.js +1 -0
- package/dist/clients/inbox/review/anchors.d.ts +41 -0
- package/dist/clients/inbox/review/anchors.js +1 -0
- package/dist/clients/inbox/review/comments-client.d.ts +74 -0
- package/dist/clients/inbox/review/comments-client.js +1 -0
- package/dist/clients/inbox/review/companion-pane.d.ts +47 -0
- package/dist/clients/inbox/review/companion-pane.js +1 -0
- package/dist/clients/inbox/review/document-surface.d.ts +212 -0
- package/dist/clients/inbox/review/document-surface.js +2 -0
- package/dist/clients/inbox/review/frame.d.ts +57 -0
- package/dist/clients/inbox/review/frame.js +1 -0
- package/dist/clients/inbox/review/keys.d.ts +69 -0
- package/dist/clients/inbox/review/keys.js +1 -0
- package/dist/clients/inbox/review/launch.d.ts +16 -0
- package/dist/clients/inbox/review/launch.js +1 -0
- package/dist/clients/inbox/review/live-source.d.ts +24 -0
- package/dist/clients/inbox/review/live-source.js +1 -0
- package/dist/clients/inbox/review/nvim.d.ts +15 -0
- package/dist/clients/inbox/review/nvim.js +1 -0
- package/dist/clients/inbox/review/remap.d.ts +51 -0
- package/dist/clients/inbox/review/remap.js +1 -0
- package/dist/clients/inbox/review/review-client.d.ts +43 -0
- package/dist/clients/inbox/review/review-client.js +1 -0
- package/dist/clients/inbox/review/roundtrip.d.ts +5 -0
- package/dist/clients/inbox/review/roundtrip.js +3 -0
- package/dist/clients/inbox/review/state.d.ts +153 -0
- package/dist/clients/inbox/review/state.js +4 -0
- package/dist/clients/inbox/review-adapter.d.ts +17 -0
- package/dist/clients/inbox/review-adapter.js +1 -0
- package/dist/clients/inbox/surface.d.ts +25 -0
- package/dist/clients/inbox/surface.js +1 -0
- package/dist/clients/inbox/tui/ansi.d.ts +68 -0
- package/dist/clients/inbox/tui/ansi.js +3 -0
- package/dist/clients/inbox/tui/input.d.ts +5 -0
- package/dist/clients/inbox/tui/input.js +5 -0
- package/dist/clients/inbox/tui/keys.d.ts +28 -0
- package/dist/clients/inbox/tui/keys.js +1 -0
- package/dist/clients/inbox/tui/page-body.d.ts +10 -0
- package/dist/clients/inbox/tui/page-body.js +1 -0
- package/dist/clients/inbox/tui/panel.d.ts +4 -0
- package/dist/clients/inbox/tui/panel.js +1 -0
- package/dist/clients/inbox/tui/render.d.ts +23 -0
- package/dist/clients/inbox/tui/render.js +2 -0
- package/dist/clients/inbox/tui/slots.d.ts +33 -0
- package/dist/clients/inbox/tui/slots.js +3 -0
- package/dist/clients/inbox/tui/types.d.ts +73 -0
- package/dist/clients/inbox/tui/types.js +0 -0
- package/dist/clients/inbox/tui.d.ts +17 -0
- package/dist/clients/inbox/tui.js +1 -0
- package/dist/clients/surfaces/host.d.ts +74 -0
- package/dist/clients/surfaces/host.js +0 -0
- package/dist/commands/api-client.d.ts +104 -0
- package/dist/commands/api-client.js +4 -0
- package/dist/commands/attention.d.ts +2 -0
- package/dist/commands/attention.js +1 -0
- package/dist/commands/canvas/edges.d.ts +2 -0
- package/dist/commands/canvas/edges.js +2 -0
- package/dist/commands/canvas/list.d.ts +4 -0
- package/dist/commands/canvas/list.js +3 -0
- package/dist/commands/canvas/read.d.ts +14 -0
- package/dist/commands/canvas/read.js +10 -0
- package/dist/commands/canvas/search.d.ts +2 -0
- package/dist/commands/canvas/search.js +3 -0
- package/dist/commands/canvas/unwatch.d.ts +2 -0
- package/dist/commands/canvas/unwatch.js +1 -0
- package/dist/commands/canvas/watch.d.ts +3 -0
- package/dist/commands/canvas/watch.js +1 -0
- package/dist/commands/canvas-analytics/chart.d.ts +52 -0
- package/dist/commands/canvas-analytics/chart.js +1 -0
- package/dist/commands/canvas-analytics/drilldown.d.ts +34 -0
- package/dist/commands/canvas-analytics/drilldown.js +1 -0
- package/dist/commands/canvas-analytics/format.d.ts +29 -0
- package/dist/commands/canvas-analytics/format.js +1 -0
- package/dist/commands/canvas-analytics/graph-detail.d.ts +2 -0
- package/dist/commands/canvas-analytics/graph-detail.js +2 -0
- package/dist/commands/canvas-analytics/graphs.d.ts +9 -0
- package/dist/commands/canvas-analytics/graphs.js +1 -0
- package/dist/commands/canvas-analytics/memory.d.ts +2 -0
- package/dist/commands/canvas-analytics/memory.js +1 -0
- package/dist/commands/canvas-analytics/overview.d.ts +2 -0
- package/dist/commands/canvas-analytics/overview.js +1 -0
- package/dist/commands/canvas-analytics/shell.d.ts +60 -0
- package/dist/commands/canvas-analytics/shell.js +2 -0
- package/dist/commands/canvas-analytics/time.d.ts +2 -0
- package/dist/commands/canvas-analytics/time.js +1 -0
- package/dist/commands/canvas-analytics/usage.d.ts +2 -0
- package/dist/commands/canvas-analytics/usage.js +1 -0
- package/dist/commands/canvas-analytics/view.d.ts +85 -0
- package/dist/commands/canvas-analytics/view.js +1 -0
- package/dist/commands/canvas-analytics.d.ts +2 -0
- package/dist/commands/canvas-analytics.js +1 -0
- package/dist/commands/canvas-browse.d.ts +2 -0
- package/dist/commands/canvas-browse.js +1 -0
- package/dist/commands/canvas-config.d.ts +2 -0
- package/dist/commands/canvas-config.js +2 -0
- package/dist/commands/canvas-history/grep.d.ts +1 -0
- package/dist/commands/canvas-history/grep.js +7 -0
- package/dist/commands/canvas-history/read.d.ts +1 -0
- package/dist/commands/canvas-history/read.js +3 -0
- package/dist/commands/canvas-history/search.d.ts +1 -0
- package/dist/commands/canvas-history/search.js +10 -0
- package/dist/commands/canvas-history/shared.d.ts +34 -0
- package/dist/commands/canvas-history/shared.js +1 -0
- package/dist/commands/canvas-history/stats.d.ts +1 -0
- package/dist/commands/canvas-history/stats.js +6 -0
- package/dist/commands/canvas-history.d.ts +2 -0
- package/dist/commands/canvas-history.js +1 -0
- package/dist/commands/canvas-issue.d.ts +2 -0
- package/dist/commands/canvas-issue.js +14 -0
- package/dist/commands/canvas-prune.d.ts +2 -0
- package/dist/commands/canvas-prune.js +1 -0
- package/dist/commands/canvas-roster.d.ts +2 -0
- package/dist/commands/canvas-roster.js +1 -0
- package/dist/commands/canvas-snapshot.d.ts +2 -0
- package/dist/commands/canvas-snapshot.js +1 -0
- package/dist/commands/canvas-use.d.ts +1 -0
- package/dist/commands/canvas-use.js +1 -0
- package/dist/commands/canvas.d.ts +3 -0
- package/dist/commands/canvas.js +1 -0
- package/dist/commands/chord.d.ts +2 -0
- package/dist/commands/chord.js +1 -0
- package/dist/commands/cron.d.ts +2 -0
- package/dist/commands/cron.js +11 -0
- package/dist/commands/custom-object/ack.d.ts +2 -0
- package/dist/commands/custom-object/ack.js +3 -0
- package/dist/commands/custom-object/publish.d.ts +2 -0
- package/dist/commands/custom-object/publish.js +1 -0
- package/dist/commands/custom-object/receive.d.ts +2 -0
- package/dist/commands/custom-object/receive.js +2 -0
- package/dist/commands/custom-object/register.d.ts +2 -0
- package/dist/commands/custom-object/register.js +3 -0
- package/dist/commands/custom-object/shared.d.ts +5 -0
- package/dist/commands/custom-object/shared.js +1 -0
- package/dist/commands/custom-object/unregister.d.ts +2 -0
- package/dist/commands/custom-object/unregister.js +1 -0
- package/dist/commands/custom-object.d.ts +2 -0
- package/dist/commands/custom-object.js +1 -0
- package/dist/commands/dashboard.d.ts +2 -0
- package/dist/commands/dashboard.js +1 -0
- package/dist/commands/doc/delete.d.ts +2 -0
- package/dist/commands/doc/delete.js +1 -0
- package/dist/commands/doc/edit.d.ts +2 -0
- package/dist/commands/doc/edit.js +1 -0
- package/dist/commands/doc/history.d.ts +2 -0
- package/dist/commands/doc/history.js +2 -0
- package/dist/commands/doc/lint.d.ts +2 -0
- package/dist/commands/doc/lint.js +2 -0
- package/dist/commands/doc/list.d.ts +2 -0
- package/dist/commands/doc/list.js +1 -0
- package/dist/commands/doc/move.d.ts +2 -0
- package/dist/commands/doc/move.js +1 -0
- package/dist/commands/doc/read.d.ts +2 -0
- package/dist/commands/doc/read.js +1 -0
- package/dist/commands/doc/replace-blocks.d.ts +6 -0
- package/dist/commands/doc/replace-blocks.js +4 -0
- package/dist/commands/doc/shared.d.ts +25 -0
- package/dist/commands/doc/shared.js +2 -0
- package/dist/commands/doc/write.d.ts +2 -0
- package/dist/commands/doc/write.js +1 -0
- package/dist/commands/doc.d.ts +2 -0
- package/dist/commands/doc.js +1 -0
- package/dist/commands/human/components.d.ts +4 -0
- package/dist/commands/human/components.js +3 -0
- package/dist/commands/human/feedback.d.ts +2 -0
- package/dist/commands/human/feedback.js +1 -0
- package/dist/commands/human/prompts.d.ts +21 -0
- package/dist/commands/human/prompts.js +1 -0
- package/dist/commands/human/queue.d.ts +3 -0
- package/dist/commands/human/queue.js +1 -0
- package/dist/commands/human/request.d.ts +2 -0
- package/dist/commands/human/request.js +1 -0
- package/dist/commands/human/review.d.ts +2 -0
- package/dist/commands/human/review.js +1 -0
- package/dist/commands/human/shared.d.ts +16 -0
- package/dist/commands/human/shared.js +1 -0
- package/dist/commands/human.d.ts +2 -0
- package/dist/commands/human.js +4 -0
- package/dist/commands/node/bash.d.ts +1 -0
- package/dist/commands/node/bash.js +5 -0
- package/dist/commands/node/create.d.ts +6 -0
- package/dist/commands/node/create.js +2 -0
- package/dist/commands/node/inspect.d.ts +2 -0
- package/dist/commands/node/inspect.js +12 -0
- package/dist/commands/node/lifecycle.d.ts +4 -0
- package/dist/commands/node/lifecycle.js +4 -0
- package/dist/commands/node/message.d.ts +1 -0
- package/dist/commands/node/message.js +1 -0
- package/dist/commands/node/outcome.d.ts +2 -0
- package/dist/commands/node/outcome.js +4 -0
- package/dist/commands/node/pyramid.d.ts +2 -0
- package/dist/commands/node/pyramid.js +2 -0
- package/dist/commands/node/subscription.d.ts +1 -0
- package/dist/commands/node/subscription.js +1 -0
- package/dist/commands/node/wait.d.ts +1 -0
- package/dist/commands/node/wait.js +7 -0
- package/dist/commands/node-context.d.ts +2 -0
- package/dist/commands/node-context.js +2 -0
- package/dist/commands/node-lifecycle-revive.d.ts +12 -0
- package/dist/commands/node-lifecycle-revive.js +1 -0
- package/dist/commands/node-snapshot.d.ts +2 -0
- package/dist/commands/node-snapshot.js +1 -0
- package/dist/commands/node-transcript.d.ts +2 -0
- package/dist/commands/node-transcript.js +1 -0
- package/dist/commands/node-worktree.d.ts +2 -0
- package/dist/commands/node-worktree.js +1 -0
- package/dist/commands/node.d.ts +2 -0
- package/dist/commands/node.js +1 -0
- package/dist/commands/pkg/browse/actions.d.ts +7 -0
- package/dist/commands/pkg/browse/actions.js +1 -0
- package/dist/commands/pkg/browse/catalog.d.ts +9 -0
- package/dist/commands/pkg/browse/catalog.js +1 -0
- package/dist/commands/pkg/browse/command-view.d.ts +3 -0
- package/dist/commands/pkg/browse/command-view.js +1 -0
- package/dist/commands/pkg/browse/detail-panel.d.ts +66 -0
- package/dist/commands/pkg/browse/detail-panel.js +1 -0
- package/dist/commands/pkg/browse/doc-view.d.ts +3 -0
- package/dist/commands/pkg/browse/doc-view.js +1 -0
- package/dist/commands/pkg/browse/list-panel.d.ts +28 -0
- package/dist/commands/pkg/browse/list-panel.js +2 -0
- package/dist/commands/pkg/browse/model.d.ts +223 -0
- package/dist/commands/pkg/browse/model.js +1 -0
- package/dist/commands/pkg/browse/shell.d.ts +93 -0
- package/dist/commands/pkg/browse/shell.js +1 -0
- package/dist/commands/pkg/browse.d.ts +2 -0
- package/dist/commands/pkg/browse.js +1 -0
- package/dist/commands/pkg/market-inspect.d.ts +2 -0
- package/dist/commands/pkg/market-inspect.js +1 -0
- package/dist/commands/pkg/market-manage.d.ts +16 -0
- package/dist/commands/pkg/market-manage.js +1 -0
- package/dist/commands/pkg/market.d.ts +1 -0
- package/dist/commands/pkg/market.js +1 -0
- package/dist/commands/pkg/plugin-env.d.ts +3 -0
- package/dist/commands/pkg/plugin-env.js +4 -0
- package/dist/commands/pkg/plugin-inspect.d.ts +2 -0
- package/dist/commands/pkg/plugin-inspect.js +1 -0
- package/dist/commands/pkg/plugin-manage.d.ts +94 -0
- package/dist/commands/pkg/plugin-manage.js +17 -0
- package/dist/commands/pkg/plugin.d.ts +1 -0
- package/dist/commands/pkg/plugin.js +1 -0
- package/dist/commands/pkg/shared.d.ts +13 -0
- package/dist/commands/pkg/shared.js +1 -0
- package/dist/commands/pkg.d.ts +2 -0
- package/dist/commands/pkg.js +1 -0
- package/dist/commands/profile/daemon-profiles.d.ts +13 -0
- package/dist/commands/profile/daemon-profiles.js +4 -0
- package/dist/commands/profile/default.d.ts +2 -0
- package/dist/commands/profile/default.js +2 -0
- package/dist/commands/profile/delete.d.ts +1 -0
- package/dist/commands/profile/delete.js +1 -0
- package/dist/commands/profile/env.d.ts +8 -0
- package/dist/commands/profile/env.js +3 -0
- package/dist/commands/profile/kind.d.ts +1 -0
- package/dist/commands/profile/kind.js +1 -0
- package/dist/commands/profile/list.d.ts +1 -0
- package/dist/commands/profile/list.js +1 -0
- package/dist/commands/profile/meta.d.ts +4 -0
- package/dist/commands/profile/meta.js +1 -0
- package/dist/commands/profile/new.d.ts +1 -0
- package/dist/commands/profile/new.js +1 -0
- package/dist/commands/profile/pause.d.ts +2 -0
- package/dist/commands/profile/pause.js +1 -0
- package/dist/commands/profile/project.d.ts +2 -0
- package/dist/commands/profile/project.js +1 -0
- package/dist/commands/profile/rename.d.ts +1 -0
- package/dist/commands/profile/rename.js +1 -0
- package/dist/commands/profile/show.d.ts +1 -0
- package/dist/commands/profile/show.js +1 -0
- package/dist/commands/profile.d.ts +2 -0
- package/dist/commands/profile.js +1 -0
- package/dist/commands/push.d.ts +2 -0
- package/dist/commands/push.js +9 -0
- package/dist/commands/revive.d.ts +2 -0
- package/dist/commands/revive.js +10 -0
- package/dist/commands/surface/node/cycle.d.ts +1 -0
- package/dist/commands/surface/node/cycle.js +1 -0
- package/dist/commands/surface/node/focus.d.ts +1 -0
- package/dist/commands/surface/node/focus.js +1 -0
- package/dist/commands/surface/node/id.d.ts +1 -0
- package/dist/commands/surface/node/id.js +1 -0
- package/dist/commands/surface/node/pin.d.ts +1 -0
- package/dist/commands/surface/node/pin.js +1 -0
- package/dist/commands/surface/node/placement.d.ts +30 -0
- package/dist/commands/surface/node/placement.js +1 -0
- package/dist/commands/surface-edit.d.ts +2 -0
- package/dist/commands/surface-edit.js +1 -0
- package/dist/commands/surface-inbox.d.ts +2 -0
- package/dist/commands/surface-inbox.js +1 -0
- package/dist/commands/surface-inspect.d.ts +2 -0
- package/dist/commands/surface-inspect.js +1 -0
- package/dist/commands/surface-node.d.ts +2 -0
- package/dist/commands/surface-node.js +1 -0
- package/dist/commands/surface-reload.d.ts +7 -0
- package/dist/commands/surface-reload.js +1 -0
- package/dist/commands/surface-tmux-spread.d.ts +2 -0
- package/dist/commands/surface-tmux-spread.js +1 -0
- package/dist/commands/surface.d.ts +2 -0
- package/dist/commands/surface.js +1 -0
- package/dist/commands/sys/branch.d.ts +2 -0
- package/dist/commands/sys/branch.js +1 -0
- package/dist/commands/sys/config.d.ts +1 -0
- package/dist/commands/sys/config.js +1 -0
- package/dist/commands/sys/connect.d.ts +1 -0
- package/dist/commands/sys/connect.js +3 -0
- package/dist/commands/sys/context/admin/actions.d.ts +23 -0
- package/dist/commands/sys/context/admin/actions.js +1 -0
- package/dist/commands/sys/context/admin/detail-panel.d.ts +73 -0
- package/dist/commands/sys/context/admin/detail-panel.js +2 -0
- package/dist/commands/sys/context/admin/docs-panel.d.ts +63 -0
- package/dist/commands/sys/context/admin/docs-panel.js +1 -0
- package/dist/commands/sys/context/admin/list-view.d.ts +62 -0
- package/dist/commands/sys/context/admin/list-view.js +1 -0
- package/dist/commands/sys/context/admin/model.d.ts +123 -0
- package/dist/commands/sys/context/admin/model.js +1 -0
- package/dist/commands/sys/context/admin/rail-panel.d.ts +84 -0
- package/dist/commands/sys/context/admin/rail-panel.js +1 -0
- package/dist/commands/sys/context/admin/read-view.d.ts +27 -0
- package/dist/commands/sys/context/admin/read-view.js +1 -0
- package/dist/commands/sys/context/admin/shell.d.ts +125 -0
- package/dist/commands/sys/context/admin/shell.js +1 -0
- package/dist/commands/sys/context/admin.d.ts +1 -0
- package/dist/commands/sys/context/admin.js +2 -0
- package/dist/commands/sys/context/doc.d.ts +1 -0
- package/dist/commands/sys/context/doc.js +2 -0
- package/dist/commands/sys/context/expose.d.ts +1 -0
- package/dist/commands/sys/context/expose.js +2 -0
- package/dist/commands/sys/context/prompt-review.d.ts +1 -0
- package/dist/commands/sys/context/prompt-review.js +11 -0
- package/dist/commands/sys/context/resolve.d.ts +115 -0
- package/dist/commands/sys/context/resolve.js +8 -0
- package/dist/commands/sys/context/sysprompt.d.ts +1 -0
- package/dist/commands/sys/context/sysprompt.js +5 -0
- package/dist/commands/sys/context.d.ts +2 -0
- package/dist/commands/sys/context.js +1 -0
- package/dist/commands/sys/daemon.d.ts +4 -0
- package/dist/commands/sys/daemon.js +1 -0
- package/dist/commands/sys/doctor.d.ts +36 -0
- package/dist/commands/sys/doctor.js +1 -0
- package/dist/commands/sys/env.d.ts +1 -0
- package/dist/commands/sys/env.js +1 -0
- package/dist/commands/sys/feedback.d.ts +1 -0
- package/dist/commands/sys/feedback.js +7 -0
- package/dist/commands/sys/join.d.ts +1 -0
- package/dist/commands/sys/join.js +1 -0
- package/dist/commands/sys/limits.d.ts +1 -0
- package/dist/commands/sys/limits.js +3 -0
- package/dist/commands/sys/logs.d.ts +1 -0
- package/dist/commands/sys/logs.js +3 -0
- package/dist/commands/sys/migrate.d.ts +1 -0
- package/dist/commands/sys/migrate.js +1 -0
- package/dist/commands/sys/panels/broker-limits-panel.d.ts +17 -0
- package/dist/commands/sys/panels/broker-limits-panel.js +2 -0
- package/dist/commands/sys/panels/dependencies-panel.d.ts +14 -0
- package/dist/commands/sys/panels/dependencies-panel.js +1 -0
- package/dist/commands/sys/panels/keybindings-panel.d.ts +56 -0
- package/dist/commands/sys/panels/keybindings-panel.js +1 -0
- package/dist/commands/sys/panels/models-panel.d.ts +100 -0
- package/dist/commands/sys/panels/models-panel.js +1 -0
- package/dist/commands/sys/panels/plugin-env-panel.d.ts +19 -0
- package/dist/commands/sys/panels/plugin-env-panel.js +2 -0
- package/dist/commands/sys/panels/plugins-panel.d.ts +16 -0
- package/dist/commands/sys/panels/plugins-panel.js +1 -0
- package/dist/commands/sys/panels/prefs-panel.d.ts +21 -0
- package/dist/commands/sys/panels/prefs-panel.js +1 -0
- package/dist/commands/sys/panels/profiles-panel.d.ts +70 -0
- package/dist/commands/sys/panels/profiles-panel.js +1 -0
- package/dist/commands/sys/panels/provider-panel.d.ts +68 -0
- package/dist/commands/sys/panels/provider-panel.js +1 -0
- package/dist/commands/sys/panels/terminal-panel.d.ts +19 -0
- package/dist/commands/sys/panels/terminal-panel.js +1 -0
- package/dist/commands/sys/provider-login.d.ts +8 -0
- package/dist/commands/sys/provider-login.js +9 -0
- package/dist/commands/sys/retry-delivery.d.ts +1 -0
- package/dist/commands/sys/retry-delivery.js +1 -0
- package/dist/commands/sys/settings-shell.d.ts +54 -0
- package/dist/commands/sys/settings-shell.js +1 -0
- package/dist/commands/sys/settings.d.ts +2 -0
- package/dist/commands/sys/settings.js +1 -0
- package/dist/commands/sys/setup-core.d.ts +121 -0
- package/dist/commands/sys/setup-core.js +9 -0
- package/dist/commands/sys/setup-settings-runner.d.ts +13 -0
- package/dist/commands/sys/setup-settings-runner.js +1 -0
- package/dist/commands/sys/setup-wizard.d.ts +52 -0
- package/dist/commands/sys/setup-wizard.js +1 -0
- package/dist/commands/sys/setup.d.ts +6 -0
- package/dist/commands/sys/setup.js +1 -0
- package/dist/commands/sys/shared.d.ts +51 -0
- package/dist/commands/sys/shared.js +1 -0
- package/dist/commands/sys/spaces.d.ts +1 -0
- package/dist/commands/sys/spaces.js +2 -0
- package/dist/commands/sys/support/prepare.d.ts +13 -0
- package/dist/commands/sys/support/prepare.js +3 -0
- package/dist/commands/sys/support/submit.d.ts +19 -0
- package/dist/commands/sys/support/submit.js +6 -0
- package/dist/commands/sys/support.d.ts +2 -0
- package/dist/commands/sys/support.js +1 -0
- package/dist/commands/sys/sync-deps.d.ts +16 -0
- package/dist/commands/sys/sync-deps.js +14 -0
- package/dist/commands/sys/sync-project-guidance.d.ts +1 -0
- package/dist/commands/sys/sync-project-guidance.js +5 -0
- package/dist/commands/sys/sync-shared.d.ts +44 -0
- package/dist/commands/sys/sync-shared.js +1 -0
- package/dist/commands/sys/sync-skills.d.ts +1 -0
- package/dist/commands/sys/sync-skills.js +2 -0
- package/dist/commands/sys/sync.d.ts +2 -0
- package/dist/commands/sys/sync.js +1 -0
- package/dist/commands/sys/terminal-option.d.ts +112 -0
- package/dist/commands/sys/terminal-option.js +15 -0
- package/dist/commands/sys/tutorial/branch.d.ts +1 -0
- package/dist/commands/sys/tutorial/branch.js +1 -0
- package/dist/commands/sys/tutorial/lessons.d.ts +5 -0
- package/dist/commands/sys/tutorial/lessons.js +8 -0
- package/dist/commands/sys/tutorial/scenario.d.ts +1 -0
- package/dist/commands/sys/tutorial/scenario.js +3 -0
- package/dist/commands/sys/tutorial/tracks.d.ts +1 -0
- package/dist/commands/sys/tutorial/tracks.js +4 -0
- package/dist/commands/sys/update.d.ts +2 -0
- package/dist/commands/sys/update.js +1 -0
- package/dist/commands/sys/worktrees.d.ts +2 -0
- package/dist/commands/sys/worktrees.js +5 -0
- package/dist/commands/sys.d.ts +2 -0
- package/dist/commands/sys.js +1 -0
- package/dist/core/activity-signal.d.ts +7 -0
- package/dist/core/activity-signal.js +2 -0
- package/dist/core/asset-root.d.ts +7 -0
- package/dist/core/asset-root.js +1 -0
- package/dist/core/auth-file.d.ts +41 -0
- package/dist/core/auth-file.js +2 -0
- package/dist/core/auth-interaction.d.ts +19 -0
- package/dist/core/auth-interaction.js +3 -0
- package/dist/core/auto-update.d.ts +1 -0
- package/dist/core/auto-update.js +4 -0
- package/dist/core/bash-guard.d.ts +6 -0
- package/dist/core/bash-guard.js +11 -0
- package/dist/core/bash-job-supervisor.d.ts +5 -0
- package/dist/core/bash-job-supervisor.js +4 -0
- package/dist/core/bash-jobs.d.ts +180 -0
- package/dist/core/bash-jobs.js +8 -0
- package/dist/core/bootstrap.d.ts +1 -0
- package/dist/core/bootstrap.js +2 -0
- package/dist/core/broker-client/client.d.ts +89 -0
- package/dist/core/broker-client/client.js +1 -0
- package/dist/core/broker-client/index.d.ts +1 -0
- package/dist/core/broker-client/index.js +1 -0
- package/dist/core/broker-client/transport-relay.d.ts +47 -0
- package/dist/core/broker-client/transport-relay.js +1 -0
- package/dist/core/broker-client/transport-socket.d.ts +35 -0
- package/dist/core/broker-client/transport-socket.js +1 -0
- package/dist/core/broker-client/transport.d.ts +36 -0
- package/dist/core/broker-client/transport.js +1 -0
- package/dist/core/canvas/app-run.d.ts +3 -0
- package/dist/core/canvas/app-run.js +1 -0
- package/dist/core/canvas/attention.d.ts +18 -0
- package/dist/core/canvas/attention.js +1 -0
- package/dist/core/canvas/boot-id.d.ts +6 -0
- package/dist/core/canvas/boot-id.js +1 -0
- package/dist/core/canvas/boot.d.ts +92 -0
- package/dist/core/canvas/boot.js +1 -0
- package/dist/core/canvas/browse/app.d.ts +26 -0
- package/dist/core/canvas/browse/app.js +3 -0
- package/dist/core/canvas/browse/model.d.ts +172 -0
- package/dist/core/canvas/browse/model.js +1 -0
- package/dist/core/canvas/browse/pins.d.ts +4 -0
- package/dist/core/canvas/browse/pins.js +1 -0
- package/dist/core/canvas/browse/render.d.ts +98 -0
- package/dist/core/canvas/browse/render.js +3 -0
- package/dist/core/canvas/canvas.d.ts +397 -0
- package/dist/core/canvas/canvas.js +65 -0
- package/dist/core/canvas/context-strip.d.ts +20 -0
- package/dist/core/canvas/context-strip.js +5 -0
- package/dist/core/canvas/crons.d.ts +298 -0
- package/dist/core/canvas/crons.js +36 -0
- package/dist/core/canvas/daemon-actions.d.ts +45 -0
- package/dist/core/canvas/daemon-actions.js +28 -0
- package/dist/core/canvas/daemon-owner.d.ts +67 -0
- package/dist/core/canvas/daemon-owner.js +6 -0
- package/dist/core/canvas/db.d.ts +33 -0
- package/dist/core/canvas/db.js +2 -0
- package/dist/core/canvas/deliveries.d.ts +120 -0
- package/dist/core/canvas/deliveries.js +102 -0
- package/dist/core/canvas/delivery-contract.d.ts +37 -0
- package/dist/core/canvas/delivery-contract.js +1 -0
- package/dist/core/canvas/executions.d.ts +29 -0
- package/dist/core/canvas/executions.js +1 -0
- package/dist/core/canvas/extensions.d.ts +9 -0
- package/dist/core/canvas/extensions.js +1 -0
- package/dist/core/canvas/focuses.d.ts +22 -0
- package/dist/core/canvas/focuses.js +1 -0
- package/dist/core/canvas/history.d.ts +104 -0
- package/dist/core/canvas/history.js +14 -0
- package/dist/core/canvas/index.d.ts +14 -0
- package/dist/core/canvas/index.js +1 -0
- package/dist/core/canvas/install-id.d.ts +9 -0
- package/dist/core/canvas/install-id.js +1 -0
- package/dist/core/canvas/labels.d.ts +30 -0
- package/dist/core/canvas/labels.js +1 -0
- package/dist/core/canvas/managed-worktree-sweep-candidates.d.ts +4 -0
- package/dist/core/canvas/managed-worktree-sweep-candidates.js +12 -0
- package/dist/core/canvas/memory-reads.d.ts +24 -0
- package/dist/core/canvas/memory-reads.js +1 -0
- package/dist/core/canvas/meta-file.d.ts +20 -0
- package/dist/core/canvas/meta-file.js +1 -0
- package/dist/core/canvas/migrations.d.ts +16 -0
- package/dist/core/canvas/migrations.js +989 -0
- package/dist/core/canvas/nav-model.d.ts +44 -0
- package/dist/core/canvas/nav-model.js +1 -0
- package/dist/core/canvas/nav-render.d.ts +136 -0
- package/dist/core/canvas/nav-render.js +1 -0
- package/dist/core/canvas/node-agent-paths.d.ts +8 -0
- package/dist/core/canvas/node-agent-paths.js +1 -0
- package/dist/core/canvas/node-order.d.ts +24 -0
- package/dist/core/canvas/node-order.js +1 -0
- package/dist/core/canvas/node-recap.d.ts +23 -0
- package/dist/core/canvas/node-recap.js +2 -0
- package/dist/core/canvas/node-sql-migration.d.ts +4 -0
- package/dist/core/canvas/node-sql-migration.js +80 -0
- package/dist/core/canvas/node-tokens.d.ts +24 -0
- package/dist/core/canvas/node-tokens.js +5 -0
- package/dist/core/canvas/outcome-actions.d.ts +23 -0
- package/dist/core/canvas/outcome-actions.js +6 -0
- package/dist/core/canvas/paths.d.ts +72 -0
- package/dist/core/canvas/paths.js +1 -0
- package/dist/core/canvas/pid.d.ts +391 -0
- package/dist/core/canvas/pid.js +5 -0
- package/dist/core/canvas/recovery.d.ts +90 -0
- package/dist/core/canvas/recovery.js +26 -0
- package/dist/core/canvas/remote-canvas-source.d.ts +70 -0
- package/dist/core/canvas/remote-canvas-source.js +1 -0
- package/dist/core/canvas/remote-transport.d.ts +7 -0
- package/dist/core/canvas/remote-transport.js +1 -0
- package/dist/core/canvas/render-source.d.ts +193 -0
- package/dist/core/canvas/render-source.js +7 -0
- package/dist/core/canvas/sessions.d.ts +57 -0
- package/dist/core/canvas/sessions.js +4 -0
- package/dist/core/canvas/source.d.ts +48 -0
- package/dist/core/canvas/source.js +1 -0
- package/dist/core/canvas/status-glyph.d.ts +52 -0
- package/dist/core/canvas/status-glyph.js +1 -0
- package/dist/core/canvas/structured-requests.d.ts +69 -0
- package/dist/core/canvas/structured-requests.js +15 -0
- package/dist/core/canvas/telemetry.d.ts +14 -0
- package/dist/core/canvas/telemetry.js +1 -0
- package/dist/core/canvas/tree.d.ts +29 -0
- package/dist/core/canvas/tree.js +12 -0
- package/dist/core/canvas/types.d.ts +454 -0
- package/dist/core/canvas/types.js +1 -0
- package/dist/core/canvas/waits.d.ts +18 -0
- package/dist/core/canvas/waits.js +6 -0
- package/dist/core/canvas/worktrees.d.ts +41 -0
- package/dist/core/canvas/worktrees.js +1 -0
- package/dist/core/clipboard-text.d.ts +11 -0
- package/dist/core/clipboard-text.js +1 -0
- package/dist/core/command-hooks/artifact.d.ts +16 -0
- package/dist/core/command-hooks/artifact.js +1 -0
- package/dist/core/command-hooks/catalog.d.ts +14 -0
- package/dist/core/command-hooks/catalog.js +1 -0
- package/dist/core/command-hooks/compose.d.ts +15 -0
- package/dist/core/command-hooks/compose.js +1 -0
- package/dist/core/command-hooks/discovery.d.ts +133 -0
- package/dist/core/command-hooks/discovery.js +1 -0
- package/dist/core/command-hooks/help.d.ts +5 -0
- package/dist/core/command-hooks/help.js +1 -0
- package/dist/core/command-hooks/index.d.ts +7 -0
- package/dist/core/command-hooks/index.js +1 -0
- package/dist/core/command-hooks/lifecycle-catalog.d.ts +21 -0
- package/dist/core/command-hooks/lifecycle-catalog.js +1 -0
- package/dist/core/command-hooks/lifecycle-create.d.ts +4 -0
- package/dist/core/command-hooks/lifecycle-create.js +1 -0
- package/dist/core/command-hooks/report.d.ts +32 -0
- package/dist/core/command-hooks/report.js +1 -0
- package/dist/core/command-hooks/schema.d.ts +42 -0
- package/dist/core/command-hooks/schema.js +1 -0
- package/dist/core/command-hooks/transport/exec-invoke.d.ts +24 -0
- package/dist/core/command-hooks/transport/exec-invoke.js +1 -0
- package/dist/core/command-hooks/transport/exec-lifecycle.d.ts +23 -0
- package/dist/core/command-hooks/transport/exec-lifecycle.js +1 -0
- package/dist/core/command-hooks/transport/plan.d.ts +3 -0
- package/dist/core/command-hooks/transport/plan.js +1 -0
- package/dist/core/command-manifests/registry.d.ts +67 -0
- package/dist/core/command-manifests/registry.js +1 -0
- package/dist/core/command-plugins/bundle.d.ts +149 -0
- package/dist/core/command-plugins/bundle.js +1 -0
- package/dist/core/command-plugins/compose.d.ts +11 -0
- package/dist/core/command-plugins/compose.js +1 -0
- package/dist/core/command-plugins/discovery.d.ts +50 -0
- package/dist/core/command-plugins/discovery.js +1 -0
- package/dist/core/command-plugins/endpoint.d.ts +24 -0
- package/dist/core/command-plugins/endpoint.js +1 -0
- package/dist/core/command-plugins/extensions.d.ts +20 -0
- package/dist/core/command-plugins/extensions.js +1 -0
- package/dist/core/command-plugins/help-addenda.d.ts +25 -0
- package/dist/core/command-plugins/help-addenda.js +1 -0
- package/dist/core/command-plugins/presence.d.ts +2 -0
- package/dist/core/command-plugins/presence.js +1 -0
- package/dist/core/command-plugins/revalidate.d.ts +18 -0
- package/dist/core/command-plugins/revalidate.js +2 -0
- package/dist/core/command-plugins/transport/exec-invoke.d.ts +28 -0
- package/dist/core/command-plugins/transport/exec-invoke.js +1 -0
- package/dist/core/command-plugins/transport/http-fetch.d.ts +41 -0
- package/dist/core/command-plugins/transport/http-fetch.js +1 -0
- package/dist/core/command-plugins/transport/http-invoke.d.ts +15 -0
- package/dist/core/command-plugins/transport/http-invoke.js +3 -0
- package/dist/core/command-plugins/transport/http-plan.d.ts +68 -0
- package/dist/core/command-plugins/transport/http-plan.js +1 -0
- package/dist/core/command.d.ts +210 -0
- package/dist/core/command.js +10 -0
- package/dist/core/config.d.ts +233 -0
- package/dist/core/config.js +1 -0
- package/dist/core/conversation-store/client-worker.d.ts +1 -0
- package/dist/core/conversation-store/client-worker.js +1 -0
- package/dist/core/conversation-store/client.d.ts +2 -0
- package/dist/core/conversation-store/client.js +2 -0
- package/dist/core/conversation-store/file-store.d.ts +37 -0
- package/dist/core/conversation-store/file-store.js +9 -0
- package/dist/core/conversation-store/index.d.ts +60 -0
- package/dist/core/conversation-store/index.js +1 -0
- package/dist/core/conversation-store/listener.d.ts +4 -0
- package/dist/core/conversation-store/listener.js +8 -0
- package/dist/core/conversation-store/patch.d.ts +1 -0
- package/dist/core/conversation-store/patch.js +1 -0
- package/dist/core/directory/join.d.ts +27 -0
- package/dist/core/directory/join.js +1 -0
- package/dist/core/disk-usage.d.ts +4 -0
- package/dist/core/disk-usage.js +1 -0
- package/dist/core/document-lines.d.ts +4 -0
- package/dist/core/document-lines.js +3 -0
- package/dist/core/editor-resolver.d.ts +28 -0
- package/dist/core/editor-resolver.js +4 -0
- package/dist/core/env-name.d.ts +6 -0
- package/dist/core/env-name.js +1 -0
- package/dist/core/errors.d.ts +38 -0
- package/dist/core/errors.js +1 -0
- package/dist/core/events/emit.d.ts +6 -0
- package/dist/core/events/emit.js +3 -0
- package/dist/core/events/envelope.d.ts +2 -0
- package/dist/core/events/envelope.js +1 -0
- package/dist/core/events/errors.d.ts +4 -0
- package/dist/core/events/errors.js +1 -0
- package/dist/core/events/index.d.ts +5 -0
- package/dist/core/events/index.js +1 -0
- package/dist/core/events/operation-id.d.ts +4 -0
- package/dist/core/events/operation-id.js +1 -0
- package/dist/core/events/read.d.ts +40 -0
- package/dist/core/events/read.js +1 -0
- package/dist/core/events/serialize.d.ts +4 -0
- package/dist/core/events/serialize.js +1 -0
- package/dist/core/events/source.d.ts +16 -0
- package/dist/core/events/source.js +1 -0
- package/dist/core/events/types.d.ts +68 -0
- package/dist/core/events/types.js +1 -0
- package/dist/core/exclusive-lock.d.ts +34 -0
- package/dist/core/exclusive-lock.js +1 -0
- package/dist/core/fault-classifier.d.ts +34 -0
- package/dist/core/fault-classifier.js +1 -0
- package/dist/core/feed/feed.d.ts +63 -0
- package/dist/core/feed/feed.js +4 -0
- package/dist/core/feed/inbox-migrate.d.ts +11 -0
- package/dist/core/feed/inbox-migrate.js +3 -0
- package/dist/core/feed/inbox.d.ts +34 -0
- package/dist/core/feed/inbox.js +1 -0
- package/dist/core/feed/messages.d.ts +83 -0
- package/dist/core/feed/messages.js +8 -0
- package/dist/core/feed/reports.d.ts +10 -0
- package/dist/core/feed/reports.js +2 -0
- package/dist/core/frontmatter.d.ts +8 -0
- package/dist/core/frontmatter.js +1 -0
- package/dist/core/fs-utils.d.ts +44 -0
- package/dist/core/fs-utils.js +3 -0
- package/dist/core/git.d.ts +28 -0
- package/dist/core/git.js +2 -0
- package/dist/core/grants/local.d.ts +4 -0
- package/dist/core/grants/local.js +1 -0
- package/dist/core/grants/mirror.d.ts +76 -0
- package/dist/core/grants/mirror.js +4 -0
- package/dist/core/grants/on-sync.d.ts +22 -0
- package/dist/core/grants/on-sync.js +1 -0
- package/dist/core/grants/remove.d.ts +7 -0
- package/dist/core/grants/remove.js +1 -0
- package/dist/core/grants/sandboxes.d.ts +7 -0
- package/dist/core/grants/sandboxes.js +1 -0
- package/dist/core/grants/sync.d.ts +40 -0
- package/dist/core/grants/sync.js +1 -0
- package/dist/core/grants/watch.d.ts +14 -0
- package/dist/core/grants/watch.js +1 -0
- package/dist/core/graph/access.d.ts +28 -0
- package/dist/core/graph/access.js +8 -0
- package/dist/core/graph/bodies.d.ts +6 -0
- package/dist/core/graph/bodies.js +1 -0
- package/dist/core/graph/custom.d.ts +74 -0
- package/dist/core/graph/custom.js +11 -0
- package/dist/core/graph/deletion.d.ts +17 -0
- package/dist/core/graph/deletion.js +6 -0
- package/dist/core/graph/diff.d.ts +4 -0
- package/dist/core/graph/diff.js +4 -0
- package/dist/core/graph/documents.d.ts +167 -0
- package/dist/core/graph/documents.js +10 -0
- package/dist/core/graph/edges.d.ts +25 -0
- package/dist/core/graph/edges.js +1 -0
- package/dist/core/graph/events.d.ts +50 -0
- package/dist/core/graph/events.js +11 -0
- package/dist/core/graph/exposures.d.ts +53 -0
- package/dist/core/graph/exposures.js +4 -0
- package/dist/core/graph/jobs.d.ts +31 -0
- package/dist/core/graph/jobs.js +2 -0
- package/dist/core/graph/kinds/action.d.ts +3 -0
- package/dist/core/graph/kinds/action.js +1 -0
- package/dist/core/graph/kinds/custom.d.ts +7 -0
- package/dist/core/graph/kinds/custom.js +7 -0
- package/dist/core/graph/kinds/document.d.ts +19 -0
- package/dist/core/graph/kinds/document.js +5 -0
- package/dist/core/graph/kinds/dto.d.ts +5 -0
- package/dist/core/graph/kinds/dto.js +1 -0
- package/dist/core/graph/kinds/job.d.ts +2 -0
- package/dist/core/graph/kinds/job.js +2 -0
- package/dist/core/graph/kinds/kind.d.ts +66 -0
- package/dist/core/graph/kinds/kind.js +1 -0
- package/dist/core/graph/kinds/node.d.ts +12 -0
- package/dist/core/graph/kinds/node.js +5 -0
- package/dist/core/graph/kinds/owner.d.ts +2 -0
- package/dist/core/graph/kinds/owner.js +2 -0
- package/dist/core/graph/kinds/registry.d.ts +13 -0
- package/dist/core/graph/kinds/registry.js +1 -0
- package/dist/core/graph/kinds/render.d.ts +9 -0
- package/dist/core/graph/kinds/render.js +1 -0
- package/dist/core/graph/names.d.ts +35 -0
- package/dist/core/graph/names.js +3 -0
- package/dist/core/graph/objects.d.ts +62 -0
- package/dist/core/graph/objects.js +11 -0
- package/dist/core/graph/package-docs.d.ts +32 -0
- package/dist/core/graph/package-docs.js +5 -0
- package/dist/core/graph/package-files.d.ts +20 -0
- package/dist/core/graph/package-files.js +2 -0
- package/dist/core/graph/reader.d.ts +30 -0
- package/dist/core/graph/reader.js +3 -0
- package/dist/core/graph/receiver-url.d.ts +11 -0
- package/dist/core/graph/receiver-url.js +1 -0
- package/dist/core/graph/receivers.d.ts +26 -0
- package/dist/core/graph/receivers.js +7 -0
- package/dist/core/graph/repo-sync/exchange.d.ts +34 -0
- package/dist/core/graph/repo-sync/exchange.js +2 -0
- package/dist/core/graph/repo-sync/identity.d.ts +30 -0
- package/dist/core/graph/repo-sync/identity.js +1 -0
- package/dist/core/graph/repo-sync/index.d.ts +4 -0
- package/dist/core/graph/repo-sync/index.js +1 -0
- package/dist/core/graph/repo-sync/mirror.d.ts +30 -0
- package/dist/core/graph/repo-sync/mirror.js +6 -0
- package/dist/core/graph/repo-sync/ref-format.d.ts +76 -0
- package/dist/core/graph/repo-sync/ref-format.js +2 -0
- package/dist/core/graph/repo-sync/repos.d.ts +19 -0
- package/dist/core/graph/repo-sync/repos.js +3 -0
- package/dist/core/graph/repo-sync/sync.d.ts +42 -0
- package/dist/core/graph/repo-sync/sync.js +2 -0
- package/dist/core/graph/rules.d.ts +26 -0
- package/dist/core/graph/rules.js +3 -0
- package/dist/core/graph/spaces/app.d.ts +3 -0
- package/dist/core/graph/spaces/app.js +1 -0
- package/dist/core/graph/spaces/index.d.ts +19 -0
- package/dist/core/graph/spaces/index.js +1 -0
- package/dist/core/graph/spaces/person.d.ts +5 -0
- package/dist/core/graph/spaces/person.js +3 -0
- package/dist/core/graph/spaces/repo.d.ts +13 -0
- package/dist/core/graph/spaces/repo.js +1 -0
- package/dist/core/graph/types.d.ts +94 -0
- package/dist/core/graph/types.js +1 -0
- package/dist/core/graph/watches.d.ts +62 -0
- package/dist/core/graph/watches.js +18 -0
- package/dist/core/help.d.ts +309 -0
- package/dist/core/help.js +9 -0
- package/dist/core/host-exports/builtins.d.ts +50 -0
- package/dist/core/host-exports/builtins.js +9 -0
- package/dist/core/host-exports/export.d.ts +31 -0
- package/dist/core/host-exports/export.js +3 -0
- package/dist/core/human/action-binding.d.ts +23 -0
- package/dist/core/human/action-binding.js +1 -0
- package/dist/core/human/answer-text.d.ts +5 -0
- package/dist/core/human/answer-text.js +5 -0
- package/dist/core/human/answer.d.ts +53 -0
- package/dist/core/human/answer.js +1 -0
- package/dist/core/human/claim.d.ts +23 -0
- package/dist/core/human/claim.js +3 -0
- package/dist/core/human/completion.d.ts +38 -0
- package/dist/core/human/completion.js +1 -0
- package/dist/core/human/component-docs.d.ts +18 -0
- package/dist/core/human/component-docs.js +248 -0
- package/dist/core/human/convention.d.ts +31 -0
- package/dist/core/human/convention.js +2 -0
- package/dist/core/human/feedback-companion.d.ts +19 -0
- package/dist/core/human/feedback-companion.js +1 -0
- package/dist/core/human/feedback.d.ts +62 -0
- package/dist/core/human/feedback.js +1 -0
- package/dist/core/human/page-authoring.d.ts +30 -0
- package/dist/core/human/page-authoring.js +1 -0
- package/dist/core/human/page-catalog.d.ts +57 -0
- package/dist/core/human/page-catalog.js +1 -0
- package/dist/core/human/page-errors.d.ts +4 -0
- package/dist/core/human/page-errors.js +1 -0
- package/dist/core/human/page-eval.d.ts +25 -0
- package/dist/core/human/page-eval.js +1 -0
- package/dist/core/human/page-html-markdown.d.ts +8 -0
- package/dist/core/human/page-html-markdown.js +8 -0
- package/dist/core/human/page-markdown.d.ts +3 -0
- package/dist/core/human/page-markdown.js +17 -0
- package/dist/core/human/page-schema.d.ts +289 -0
- package/dist/core/human/page-schema.js +1 -0
- package/dist/core/human/page-synth.d.ts +7 -0
- package/dist/core/human/page-synth.js +11 -0
- package/dist/core/human/page.d.ts +16 -0
- package/dist/core/human/page.js +1 -0
- package/dist/core/human/requests.d.ts +146 -0
- package/dist/core/human/requests.js +82 -0
- package/dist/core/human/review-schema.d.ts +20 -0
- package/dist/core/human/review-schema.js +1 -0
- package/dist/core/human/root.d.ts +4 -0
- package/dist/core/human/root.js +1 -0
- package/dist/core/human/scan.d.ts +6 -0
- package/dist/core/human/scan.js +1 -0
- package/dist/core/human/summary.d.ts +3 -0
- package/dist/core/human/summary.js +1 -0
- package/dist/core/human/tickets.d.ts +68 -0
- package/dist/core/human/tickets.js +1 -0
- package/dist/core/human/types.d.ts +118 -0
- package/dist/core/human/types.js +0 -0
- package/dist/core/human/visible-paths.d.ts +9 -0
- package/dist/core/human/visible-paths.js +1 -0
- package/dist/core/human-actions.d.ts +25 -0
- package/dist/core/human-actions.js +1 -0
- package/dist/core/inspector/chrome.d.ts +6 -0
- package/dist/core/inspector/chrome.js +1 -0
- package/dist/core/inspector/contract.d.ts +105 -0
- package/dist/core/inspector/contract.js +0 -0
- package/dist/core/inspector/core.d.ts +39 -0
- package/dist/core/inspector/core.js +2 -0
- package/dist/core/inspector/host.d.ts +46 -0
- package/dist/core/inspector/host.js +4 -0
- package/dist/core/inspector/model.d.ts +88 -0
- package/dist/core/inspector/model.js +2 -0
- package/dist/core/inspector/text.d.ts +5 -0
- package/dist/core/inspector/text.js +6 -0
- package/dist/core/inspector/transport.d.ts +6 -0
- package/dist/core/inspector/transport.js +1 -0
- package/dist/core/inspector/tui.d.ts +3 -0
- package/dist/core/inspector/tui.js +2 -0
- package/dist/core/installed-plugins.d.ts +2 -0
- package/dist/core/installed-plugins.js +1 -0
- package/dist/core/io.d.ts +122 -0
- package/dist/core/io.js +7 -0
- package/dist/core/keybindings/attach-control.d.ts +49 -0
- package/dist/core/keybindings/attach-control.js +1 -0
- package/dist/core/keybindings/background-bash.d.ts +13 -0
- package/dist/core/keybindings/background-bash.js +1 -0
- package/dist/core/keybindings/catalog.d.ts +18 -0
- package/dist/core/keybindings/catalog.js +1 -0
- package/dist/core/keybindings/inbox.d.ts +18 -0
- package/dist/core/keybindings/inbox.js +1 -0
- package/dist/core/keybindings/index.d.ts +8 -0
- package/dist/core/keybindings/index.js +1 -0
- package/dist/core/keybindings/match.d.ts +44 -0
- package/dist/core/keybindings/match.js +1 -0
- package/dist/core/keybindings/persistence.d.ts +18 -0
- package/dist/core/keybindings/persistence.js +1 -0
- package/dist/core/keybindings/resolve.d.ts +28 -0
- package/dist/core/keybindings/resolve.js +1 -0
- package/dist/core/keybindings/types.d.ts +42 -0
- package/dist/core/keybindings/types.js +0 -0
- package/dist/core/layout-migrate/index.d.ts +38 -0
- package/dist/core/layout-migrate/index.js +4 -0
- package/dist/core/layout-migrate/loose-keys.d.ts +2 -0
- package/dist/core/layout-migrate/loose-keys.js +1 -0
- package/dist/core/layout-migrate/paths.d.ts +30 -0
- package/dist/core/layout-migrate/paths.js +1 -0
- package/dist/core/layout-migrate/stored-paths.d.ts +9 -0
- package/dist/core/layout-migrate/stored-paths.js +11 -0
- package/dist/core/layout-migrate/stores.d.ts +30 -0
- package/dist/core/layout-migrate/stores.js +3 -0
- package/dist/core/layout.d.ts +34 -0
- package/dist/core/layout.js +2 -0
- package/dist/core/llm/body-limits.d.ts +7 -0
- package/dist/core/llm/body-limits.js +1 -0
- package/dist/core/llm/refusal.d.ts +13 -0
- package/dist/core/llm/refusal.js +1 -0
- package/dist/core/llm/run.d.ts +60 -0
- package/dist/core/llm/run.js +4 -0
- package/dist/core/locked-file.d.ts +27 -0
- package/dist/core/locked-file.js +1 -0
- package/dist/core/log.d.ts +9 -0
- package/dist/core/log.js +5 -0
- package/dist/core/manifest-recovery.d.ts +15 -0
- package/dist/core/manifest-recovery.js +1 -0
- package/dist/core/manifest-stale.d.ts +18 -0
- package/dist/core/manifest-stale.js +1 -0
- package/dist/core/manifest.d.ts +5 -0
- package/dist/core/manifest.js +1 -0
- package/dist/core/model-auth/daemon-login.d.ts +13 -0
- package/dist/core/model-auth/daemon-login.js +1 -0
- package/dist/core/model-auth/flows.d.ts +50 -0
- package/dist/core/model-auth/flows.js +1 -0
- package/dist/core/model-auth/handoff-jti.d.ts +4 -0
- package/dist/core/model-auth/handoff-jti.js +1 -0
- package/dist/core/model-config.d.ts +20 -0
- package/dist/core/model-config.js +1 -0
- package/dist/core/model-routes.d.ts +90 -0
- package/dist/core/model-routes.js +1 -0
- package/dist/core/nvim-launch.d.ts +7 -0
- package/dist/core/nvim-launch.js +1 -0
- package/dist/core/output.d.ts +35 -0
- package/dist/core/output.js +7 -0
- package/dist/core/pagination.d.ts +35 -0
- package/dist/core/pagination.js +1 -0
- package/dist/core/plugin-env.d.ts +8 -0
- package/dist/core/plugin-env.js +1 -0
- package/dist/core/plugin-extensions.d.ts +29 -0
- package/dist/core/plugin-extensions.js +1 -0
- package/dist/core/plugin-swap-lock.d.ts +9 -0
- package/dist/core/plugin-swap-lock.js +1 -0
- package/dist/core/pool-credential-store.d.ts +34 -0
- package/dist/core/pool-credential-store.js +1 -0
- package/dist/core/predicate.d.ts +65 -0
- package/dist/core/predicate.js +1 -0
- package/dist/core/preview-registry.d.ts +59 -0
- package/dist/core/preview-registry.js +3 -0
- package/dist/core/preview-result-path.d.ts +4 -0
- package/dist/core/preview-result-path.js +1 -0
- package/dist/core/profiles/app-env-store.d.ts +4 -0
- package/dist/core/profiles/app-env-store.js +2 -0
- package/dist/core/profiles/default-binding.d.ts +15 -0
- package/dist/core/profiles/default-binding.js +1 -0
- package/dist/core/profiles/deletion-reservation.d.ts +12 -0
- package/dist/core/profiles/deletion-reservation.js +1 -0
- package/dist/core/profiles/env-store.d.ts +22 -0
- package/dist/core/profiles/env-store.js +2 -0
- package/dist/core/profiles/fuzzy-match.d.ts +19 -0
- package/dist/core/profiles/fuzzy-match.js +1 -0
- package/dist/core/profiles/manifest.d.ts +120 -0
- package/dist/core/profiles/manifest.js +1 -0
- package/dist/core/profiles/select.d.ts +46 -0
- package/dist/core/profiles/select.js +35 -0
- package/dist/core/provider-credential.d.ts +6 -0
- package/dist/core/provider-credential.js +1 -0
- package/dist/core/provider-error-recognition.d.ts +27 -0
- package/dist/core/provider-error-recognition.js +1 -0
- package/dist/core/provider-failure.d.ts +42 -0
- package/dist/core/provider-failure.js +1 -0
- package/dist/core/provider-management.d.ts +12 -0
- package/dist/core/provider-management.js +1 -0
- package/dist/core/providers/approval.d.ts +23 -0
- package/dist/core/providers/approval.js +3 -0
- package/dist/core/providers/audit.d.ts +28 -0
- package/dist/core/providers/audit.js +4 -0
- package/dist/core/providers/bundles.d.ts +68 -0
- package/dist/core/providers/bundles.js +2 -0
- package/dist/core/providers/call.d.ts +62 -0
- package/dist/core/providers/call.js +1 -0
- package/dist/core/providers/errors.d.ts +97 -0
- package/dist/core/providers/errors.js +1 -0
- package/dist/core/providers/files.d.ts +89 -0
- package/dist/core/providers/files.js +1 -0
- package/dist/core/providers/inflight.d.ts +13 -0
- package/dist/core/providers/inflight.js +1 -0
- package/dist/core/providers/mint.d.ts +27 -0
- package/dist/core/providers/mint.js +1 -0
- package/dist/core/providers/receipts.d.ts +9 -0
- package/dist/core/providers/receipts.js +3 -0
- package/dist/core/providers/request.d.ts +27 -0
- package/dist/core/providers/request.js +1 -0
- package/dist/core/providers/token-cache.d.ts +44 -0
- package/dist/core/providers/token-cache.js +1 -0
- package/dist/core/rate-limit-scope.d.ts +25 -0
- package/dist/core/rate-limit-scope.js +1 -0
- package/dist/core/remote-canvas-target.d.ts +4 -0
- package/dist/core/remote-canvas-target.js +1 -0
- package/dist/core/render.d.ts +12 -0
- package/dist/core/render.js +18 -0
- package/dist/core/resolver.d.ts +14 -0
- package/dist/core/resolver.js +1 -0
- package/dist/core/review/birth.d.ts +7 -0
- package/dist/core/review/birth.js +1 -0
- package/dist/core/review/comments.d.ts +69 -0
- package/dist/core/review/comments.js +21 -0
- package/dist/core/review/companion.d.ts +33 -0
- package/dist/core/review/companion.js +1 -0
- package/dist/core/review/document.d.ts +27 -0
- package/dist/core/review/document.js +2 -0
- package/dist/core/review/fork.d.ts +8 -0
- package/dist/core/review/fork.js +5 -0
- package/dist/core/review/project.d.ts +17 -0
- package/dist/core/review/project.js +1 -0
- package/dist/core/review/realize.d.ts +3 -0
- package/dist/core/review/realize.js +1 -0
- package/dist/core/review/remap.d.ts +24 -0
- package/dist/core/review/remap.js +19 -0
- package/dist/core/review/signal.d.ts +5 -0
- package/dist/core/review/signal.js +1 -0
- package/dist/core/review/stage.d.ts +38 -0
- package/dist/core/review/stage.js +1 -0
- package/dist/core/review/store.d.ts +44 -0
- package/dist/core/review/store.js +1 -0
- package/dist/core/review/types.d.ts +139 -0
- package/dist/core/review/types.js +1 -0
- package/dist/core/runs/activity.d.ts +11 -0
- package/dist/core/runs/activity.js +6 -0
- package/dist/core/runs/confinement.d.ts +23 -0
- package/dist/core/runs/confinement.js +2 -0
- package/dist/core/runs/events.d.ts +41 -0
- package/dist/core/runs/events.js +7 -0
- package/dist/core/runs/operations.d.ts +75 -0
- package/dist/core/runs/operations.js +12 -0
- package/dist/core/runs/questions.d.ts +73 -0
- package/dist/core/runs/questions.js +4 -0
- package/dist/core/runtime/advertised-command-invocation.d.ts +20 -0
- package/dist/core/runtime/advertised-command-invocation.js +1 -0
- package/dist/core/runtime/auth-reload.d.ts +7 -0
- package/dist/core/runtime/auth-reload.js +1 -0
- package/dist/core/runtime/banner.d.ts +15 -0
- package/dist/core/runtime/banner.js +1 -0
- package/dist/core/runtime/bearings-render.d.ts +62 -0
- package/dist/core/runtime/bearings-render.js +18 -0
- package/dist/core/runtime/bearings.d.ts +56 -0
- package/dist/core/runtime/bearings.js +7 -0
- package/dist/core/runtime/bin-contributions.d.ts +44 -0
- package/dist/core/runtime/bin-contributions.js +2 -0
- package/dist/core/runtime/boot-root.d.ts +34 -0
- package/dist/core/runtime/boot-root.js +5 -0
- package/dist/core/runtime/branded-host.d.ts +55 -0
- package/dist/core/runtime/branded-host.js +2 -0
- package/dist/core/runtime/broker/cli-relay.d.ts +5 -0
- package/dist/core/runtime/broker/cli-relay.js +1 -0
- package/dist/core/runtime/broker/client-registry.d.ts +36 -0
- package/dist/core/runtime/broker/client-registry.js +1 -0
- package/dist/core/runtime/broker/daemon-ops.d.ts +65 -0
- package/dist/core/runtime/broker/daemon-ops.js +1 -0
- package/dist/core/runtime/broker/engine-drive.d.ts +37 -0
- package/dist/core/runtime/broker/engine-drive.js +1 -0
- package/dist/core/runtime/broker/engine-routing.d.ts +143 -0
- package/dist/core/runtime/broker/engine-routing.js +1 -0
- package/dist/core/runtime/broker/event-projection.d.ts +43 -0
- package/dist/core/runtime/broker/event-projection.js +1 -0
- package/dist/core/runtime/broker/extension-abort.d.ts +15 -0
- package/dist/core/runtime/broker/extension-abort.js +1 -0
- package/dist/core/runtime/broker/fault-retry.d.ts +127 -0
- package/dist/core/runtime/broker/fault-retry.js +1 -0
- package/dist/core/runtime/broker/frame-client.d.ts +38 -0
- package/dist/core/runtime/broker/frame-client.js +1 -0
- package/dist/core/runtime/broker/frame-dispatch.d.ts +64 -0
- package/dist/core/runtime/broker/frame-dispatch.js +1 -0
- package/dist/core/runtime/broker/frame-engine-control.d.ts +21 -0
- package/dist/core/runtime/broker/frame-engine-control.js +1 -0
- package/dist/core/runtime/broker/frame-memory-refs.d.ts +25 -0
- package/dist/core/runtime/broker/frame-memory-refs.js +1 -0
- package/dist/core/runtime/broker/frame-model-query.d.ts +13 -0
- package/dist/core/runtime/broker/frame-model-query.js +1 -0
- package/dist/core/runtime/broker/frame-read.d.ts +19 -0
- package/dist/core/runtime/broker/frame-read.js +1 -0
- package/dist/core/runtime/broker/frame-replies.d.ts +24 -0
- package/dist/core/runtime/broker/frame-replies.js +1 -0
- package/dist/core/runtime/broker/frame-session.d.ts +34 -0
- package/dist/core/runtime/broker/frame-session.js +4 -0
- package/dist/core/runtime/broker/held-deferred-inbox.d.ts +15 -0
- package/dist/core/runtime/broker/held-deferred-inbox.js +1 -0
- package/dist/core/runtime/broker/inbox.d.ts +22 -0
- package/dist/core/runtime/broker/inbox.js +1 -0
- package/dist/core/runtime/broker/model-adapter.d.ts +24 -0
- package/dist/core/runtime/broker/model-adapter.js +2 -0
- package/dist/core/runtime/broker/node-named.d.ts +15 -0
- package/dist/core/runtime/broker/node-named.js +1 -0
- package/dist/core/runtime/broker/node-token.d.ts +3 -0
- package/dist/core/runtime/broker/node-token.js +1 -0
- package/dist/core/runtime/broker/read-ops.d.ts +27 -0
- package/dist/core/runtime/broker/read-ops.js +1 -0
- package/dist/core/runtime/broker/rebind.d.ts +78 -0
- package/dist/core/runtime/broker/rebind.js +1 -0
- package/dist/core/runtime/broker/retry-card-elision.d.ts +7 -0
- package/dist/core/runtime/broker/retry-card-elision.js +1 -0
- package/dist/core/runtime/broker/run-deferred-mail.d.ts +8 -0
- package/dist/core/runtime/broker/run-deferred-mail.js +1 -0
- package/dist/core/runtime/broker/run-turn-end.d.ts +38 -0
- package/dist/core/runtime/broker/run-turn-end.js +1 -0
- package/dist/core/runtime/broker/run-turn-queue.d.ts +48 -0
- package/dist/core/runtime/broker/run-turn-queue.js +1 -0
- package/dist/core/runtime/broker/signal-stream.d.ts +30 -0
- package/dist/core/runtime/broker/signal-stream.js +1 -0
- package/dist/core/runtime/broker/tool-groups.d.ts +39 -0
- package/dist/core/runtime/broker/tool-groups.js +1 -0
- package/dist/core/runtime/broker/turn-admission.d.ts +11 -0
- package/dist/core/runtime/broker/turn-admission.js +1 -0
- package/dist/core/runtime/broker/turn-ignition.d.ts +49 -0
- package/dist/core/runtime/broker/turn-ignition.js +1 -0
- package/dist/core/runtime/broker-cli.d.ts +1 -0
- package/dist/core/runtime/broker-cli.js +3 -0
- package/dist/core/runtime/broker-extension-render.d.ts +3 -0
- package/dist/core/runtime/broker-extension-render.js +3 -0
- package/dist/core/runtime/broker-inventory.d.ts +4 -0
- package/dist/core/runtime/broker-inventory.js +1 -0
- package/dist/core/runtime/broker-persona-guidance.d.ts +27 -0
- package/dist/core/runtime/broker-persona-guidance.js +4 -0
- package/dist/core/runtime/broker-protocol.d.ts +716 -0
- package/dist/core/runtime/broker-protocol.js +3 -0
- package/dist/core/runtime/broker-request.d.ts +37 -0
- package/dist/core/runtime/broker-request.js +1 -0
- package/dist/core/runtime/broker-sdk.d.ts +36 -0
- package/dist/core/runtime/broker-sdk.js +1 -0
- package/dist/core/runtime/broker.d.ts +73 -0
- package/dist/core/runtime/broker.js +1 -0
- package/dist/core/runtime/canvas-extensions.d.ts +34 -0
- package/dist/core/runtime/canvas-extensions.js +1 -0
- package/dist/core/runtime/chat-inventory-rows.d.ts +8 -0
- package/dist/core/runtime/chat-inventory-rows.js +1 -0
- package/dist/core/runtime/close.d.ts +46 -0
- package/dist/core/runtime/close.js +1 -0
- package/dist/core/runtime/come-back-note.d.ts +5 -0
- package/dist/core/runtime/come-back-note.js +3 -0
- package/dist/core/runtime/command-expansion.d.ts +19 -0
- package/dist/core/runtime/command-expansion.js +9 -0
- package/dist/core/runtime/command-surface.d.ts +38 -0
- package/dist/core/runtime/command-surface.js +1 -0
- package/dist/core/runtime/connectivity.d.ts +12 -0
- package/dist/core/runtime/connectivity.js +1 -0
- package/dist/core/runtime/crtr-theme.d.ts +12 -0
- package/dist/core/runtime/crtr-theme.js +1 -0
- package/dist/core/runtime/deliver-live.d.ts +38 -0
- package/dist/core/runtime/deliver-live.js +1 -0
- package/dist/core/runtime/fault-recovery.d.ts +23 -0
- package/dist/core/runtime/fault-recovery.js +1 -0
- package/dist/core/runtime/fault.d.ts +6 -0
- package/dist/core/runtime/fault.js +1 -0
- package/dist/core/runtime/first-run-offer.d.ts +11 -0
- package/dist/core/runtime/first-run-offer.js +5 -0
- package/dist/core/runtime/fleet.d.ts +93 -0
- package/dist/core/runtime/fleet.js +1 -0
- package/dist/core/runtime/focus-viewer.d.ts +39 -0
- package/dist/core/runtime/focus-viewer.js +1 -0
- package/dist/core/runtime/front-door-env.d.ts +5 -0
- package/dist/core/runtime/front-door-env.js +1 -0
- package/dist/core/runtime/front-door-login.d.ts +2 -0
- package/dist/core/runtime/front-door-login.js +1 -0
- package/dist/core/runtime/front-door.d.ts +26 -0
- package/dist/core/runtime/front-door.js +11 -0
- package/dist/core/runtime/headless-pi.d.ts +37 -0
- package/dist/core/runtime/headless-pi.js +1 -0
- package/dist/core/runtime/host.d.ts +59 -0
- package/dist/core/runtime/host.js +3 -0
- package/dist/core/runtime/interactive-deliver.d.ts +22 -0
- package/dist/core/runtime/interactive-deliver.js +1 -0
- package/dist/core/runtime/invocation.d.ts +9 -0
- package/dist/core/runtime/invocation.js +0 -0
- package/dist/core/runtime/kickoff.d.ts +49 -0
- package/dist/core/runtime/kickoff.js +28 -0
- package/dist/core/runtime/launch-config-worker.d.ts +1 -0
- package/dist/core/runtime/launch-config-worker.js +1 -0
- package/dist/core/runtime/launch-prompt.d.ts +8 -0
- package/dist/core/runtime/launch-prompt.js +4 -0
- package/dist/core/runtime/launch-target.d.ts +34 -0
- package/dist/core/runtime/launch-target.js +1 -0
- package/dist/core/runtime/launch.d.ts +194 -0
- package/dist/core/runtime/launch.js +3 -0
- package/dist/core/runtime/ledger.d.ts +10 -0
- package/dist/core/runtime/ledger.js +3 -0
- package/dist/core/runtime/lifecycle.d.ts +34 -0
- package/dist/core/runtime/lifecycle.js +2 -0
- package/dist/core/runtime/managed-provider-cooling.d.ts +24 -0
- package/dist/core/runtime/managed-provider-cooling.js +1 -0
- package/dist/core/runtime/model-registry.d.ts +3 -0
- package/dist/core/runtime/model-registry.js +1 -0
- package/dist/core/runtime/model-selection.d.ts +54 -0
- package/dist/core/runtime/model-selection.js +1 -0
- package/dist/core/runtime/model-swap.d.ts +26 -0
- package/dist/core/runtime/model-swap.js +1 -0
- package/dist/core/runtime/naming.d.ts +69 -0
- package/dist/core/runtime/naming.js +14 -0
- package/dist/core/runtime/nerd-font.d.ts +46 -0
- package/dist/core/runtime/nerd-font.js +2 -0
- package/dist/core/runtime/node-id-token.d.ts +6 -0
- package/dist/core/runtime/node-id-token.js +1 -0
- package/dist/core/runtime/node-read.d.ts +51 -0
- package/dist/core/runtime/node-read.js +3 -0
- package/dist/core/runtime/nodes.d.ts +138 -0
- package/dist/core/runtime/nodes.js +1 -0
- package/dist/core/runtime/outcome-document.d.ts +59 -0
- package/dist/core/runtime/outcome-document.js +1 -0
- package/dist/core/runtime/package-health.d.ts +34 -0
- package/dist/core/runtime/package-health.js +4 -0
- package/dist/core/runtime/persona.d.ts +21 -0
- package/dist/core/runtime/persona.js +2 -0
- package/dist/core/runtime/pi-cli.d.ts +8 -0
- package/dist/core/runtime/pi-cli.js +1 -0
- package/dist/core/runtime/pi-vendored.d.ts +28 -0
- package/dist/core/runtime/pi-vendored.js +1 -0
- package/dist/core/runtime/placement-tmux.d.ts +32 -0
- package/dist/core/runtime/placement-tmux.js +1 -0
- package/dist/core/runtime/placement.d.ts +100 -0
- package/dist/core/runtime/placement.js +1 -0
- package/dist/core/runtime/progress-bar.d.ts +13 -0
- package/dist/core/runtime/progress-bar.js +2 -0
- package/dist/core/runtime/promote.d.ts +76 -0
- package/dist/core/runtime/promote.js +1 -0
- package/dist/core/runtime/prospective-inventory-cli.d.ts +1 -0
- package/dist/core/runtime/prospective-inventory-cli.js +3 -0
- package/dist/core/runtime/prospective-inventory.d.ts +10 -0
- package/dist/core/runtime/prospective-inventory.js +2 -0
- package/dist/core/runtime/provider-credential-gate.d.ts +4 -0
- package/dist/core/runtime/provider-credential-gate.js +2 -0
- package/dist/core/runtime/recap.d.ts +3 -0
- package/dist/core/runtime/recap.js +27 -0
- package/dist/core/runtime/recovery-hold.d.ts +2 -0
- package/dist/core/runtime/recovery-hold.js +1 -0
- package/dist/core/runtime/recycle.d.ts +14 -0
- package/dist/core/runtime/recycle.js +1 -0
- package/dist/core/runtime/reopen.d.ts +38 -0
- package/dist/core/runtime/reopen.js +1 -0
- package/dist/core/runtime/reset.d.ts +68 -0
- package/dist/core/runtime/reset.js +1 -0
- package/dist/core/runtime/resume-root.d.ts +34 -0
- package/dist/core/runtime/resume-root.js +11 -0
- package/dist/core/runtime/revive-all.d.ts +57 -0
- package/dist/core/runtime/revive-all.js +1 -0
- package/dist/core/runtime/revive.d.ts +105 -0
- package/dist/core/runtime/revive.js +3 -0
- package/dist/core/runtime/roadmap.d.ts +24 -0
- package/dist/core/runtime/roadmap.js +15 -0
- package/dist/core/runtime/run-command.d.ts +36 -0
- package/dist/core/runtime/run-command.js +1 -0
- package/dist/core/runtime/session-branch.d.ts +7 -0
- package/dist/core/runtime/session-branch.js +1 -0
- package/dist/core/runtime/session-cycles.d.ts +45 -0
- package/dist/core/runtime/session-cycles.js +1 -0
- package/dist/core/runtime/session-list-cache.d.ts +37 -0
- package/dist/core/runtime/session-list-cache.js +1 -0
- package/dist/core/runtime/session-visibility.d.ts +37 -0
- package/dist/core/runtime/session-visibility.js +1 -0
- package/dist/core/runtime/setup-marker.d.ts +8 -0
- package/dist/core/runtime/setup-marker.js +1 -0
- package/dist/core/runtime/shell-expansion.d.ts +32 -0
- package/dist/core/runtime/shell-expansion.js +9 -0
- package/dist/core/runtime/situational-context.d.ts +19 -0
- package/dist/core/runtime/situational-context.js +2 -0
- package/dist/core/runtime/situational-live.d.ts +9 -0
- package/dist/core/runtime/situational-live.js +1 -0
- package/dist/core/runtime/spawn-env.d.ts +54 -0
- package/dist/core/runtime/spawn-env.js +1 -0
- package/dist/core/runtime/spawn.d.ts +155 -0
- package/dist/core/runtime/spawn.js +3 -0
- package/dist/core/runtime/stamp/channel.d.ts +20 -0
- package/dist/core/runtime/stamp/channel.js +1 -0
- package/dist/core/runtime/stamp/protocol.d.ts +90 -0
- package/dist/core/runtime/stamp/protocol.js +1 -0
- package/dist/core/runtime/stop-guard.d.ts +31 -0
- package/dist/core/runtime/stop-guard.js +8 -0
- package/dist/core/runtime/stop-signals.d.ts +16 -0
- package/dist/core/runtime/stop-signals.js +1 -0
- package/dist/core/runtime/stream-watchdog.d.ts +54 -0
- package/dist/core/runtime/stream-watchdog.js +1 -0
- package/dist/core/runtime/structured-output.d.ts +91 -0
- package/dist/core/runtime/structured-output.js +5 -0
- package/dist/core/runtime/surface-bg.d.ts +13 -0
- package/dist/core/runtime/surface-bg.js +1 -0
- package/dist/core/runtime/tmux-bindings.d.ts +30 -0
- package/dist/core/runtime/tmux-bindings.js +4 -0
- package/dist/core/runtime/tmux-chrome.d.ts +2 -0
- package/dist/core/runtime/tmux-chrome.js +1 -0
- package/dist/core/runtime/tmux-driver.d.ts +314 -0
- package/dist/core/runtime/tmux-driver.js +6 -0
- package/dist/core/runtime/tmux-handoff.d.ts +36 -0
- package/dist/core/runtime/tmux-handoff.js +10 -0
- package/dist/core/runtime/tool-group-summary.d.ts +19 -0
- package/dist/core/runtime/tool-group-summary.js +6 -0
- package/dist/core/runtime/turn-visibility.d.ts +10 -0
- package/dist/core/runtime/turn-visibility.js +1 -0
- package/dist/core/runtime/view-socket.d.ts +21 -0
- package/dist/core/runtime/view-socket.js +1 -0
- package/dist/core/runtime/warm-pool.d.ts +65 -0
- package/dist/core/runtime/warm-pool.js +1 -0
- package/dist/core/scope.d.ts +32 -0
- package/dist/core/scope.js +1 -0
- package/dist/core/scoped-state/db.d.ts +17 -0
- package/dist/core/scoped-state/db.js +2 -0
- package/dist/core/scoped-state/migrate.d.ts +8 -0
- package/dist/core/scoped-state/migrate.js +3 -0
- package/dist/core/scoped-state/paths.d.ts +9 -0
- package/dist/core/scoped-state/paths.js +1 -0
- package/dist/core/scoped-state/profiles.d.ts +27 -0
- package/dist/core/scoped-state/profiles.js +1 -0
- package/dist/core/scoped-state/providers.d.ts +24 -0
- package/dist/core/scoped-state/providers.js +1 -0
- package/dist/core/scoped-state/schema.d.ts +6 -0
- package/dist/core/scoped-state/schema.js +16 -0
- package/dist/core/scoped-state/settings.d.ts +28 -0
- package/dist/core/scoped-state/settings.js +1 -0
- package/dist/core/scopes.d.ts +17 -0
- package/dist/core/scopes.js +1 -0
- package/dist/core/secrets.d.ts +40 -0
- package/dist/core/secrets.js +2 -0
- package/dist/core/self-update.d.ts +27 -0
- package/dist/core/self-update.js +1 -0
- package/dist/core/session-model/session-state.d.ts +53 -0
- package/dist/core/session-model/session-state.js +1 -0
- package/dist/core/shell-segments.d.ts +42 -0
- package/dist/core/shell-segments.js +4 -0
- package/dist/core/spaces/cache-env.d.ts +2 -0
- package/dist/core/spaces/cache-env.js +1 -0
- package/dist/core/spaces/file-root.d.ts +23 -0
- package/dist/core/spaces/file-root.js +1 -0
- package/dist/core/spaces/mounts.d.ts +34 -0
- package/dist/core/spaces/mounts.js +1 -0
- package/dist/core/spaces/open-beneath.d.ts +71 -0
- package/dist/core/spaces/open-beneath.js +1 -0
- package/dist/core/spaces/permissions.d.ts +19 -0
- package/dist/core/spaces/permissions.js +1 -0
- package/dist/core/spaces/process.d.ts +41 -0
- package/dist/core/spaces/process.js +1 -0
- package/dist/core/spaces/runtime-home.d.ts +5 -0
- package/dist/core/spaces/runtime-home.js +1 -0
- package/dist/core/spaces/space.d.ts +8 -0
- package/dist/core/spaces/space.js +2 -0
- package/dist/core/spaces/stop.d.ts +21 -0
- package/dist/core/spaces/stop.js +2 -0
- package/dist/core/spaces/users.d.ts +19 -0
- package/dist/core/spaces/users.js +1 -0
- package/dist/core/spawn.d.ts +15 -0
- package/dist/core/spawn.js +1 -0
- package/dist/core/sqlite-statements.d.ts +4 -0
- package/dist/core/sqlite-statements.js +1 -0
- package/dist/core/stdout-errors.d.ts +3 -0
- package/dist/core/stdout-errors.js +1 -0
- package/dist/core/storage/attachments.d.ts +33 -0
- package/dist/core/storage/attachments.js +1 -0
- package/dist/core/storage/client.d.ts +109 -0
- package/dist/core/storage/client.js +3 -0
- package/dist/core/storage/download.d.ts +24 -0
- package/dist/core/storage/download.js +1 -0
- package/dist/core/storage/shares.d.ts +32 -0
- package/dist/core/storage/shares.js +1 -0
- package/dist/core/storage/tables.d.ts +63 -0
- package/dist/core/storage/tables.js +3 -0
- package/dist/core/subscription-state.d.ts +121 -0
- package/dist/core/subscription-state.js +4 -0
- package/dist/core/substrate/delivery/corpus.d.ts +27 -0
- package/dist/core/substrate/delivery/corpus.js +3 -0
- package/dist/core/substrate/delivery/deliver.d.ts +76 -0
- package/dist/core/substrate/delivery/deliver.js +6 -0
- package/dist/core/substrate/delivery/listings.d.ts +30 -0
- package/dist/core/substrate/delivery/listings.js +7 -0
- package/dist/core/substrate/delivery/match.d.ts +28 -0
- package/dist/core/substrate/delivery/match.js +1 -0
- package/dist/core/substrate/delivery/plan.d.ts +67 -0
- package/dist/core/substrate/delivery/plan.js +3 -0
- package/dist/core/substrate/delivery/render-boot.d.ts +20 -0
- package/dist/core/substrate/delivery/render-boot.js +54 -0
- package/dist/core/substrate/delivery/render-event.d.ts +54 -0
- package/dist/core/substrate/delivery/render-event.js +8 -0
- package/dist/core/substrate/delivery/sub-persona-menu.d.ts +2 -0
- package/dist/core/substrate/delivery/sub-persona-menu.js +6 -0
- package/dist/core/substrate/delivery/types.d.ts +30 -0
- package/dist/core/substrate/delivery/types.js +0 -0
- package/dist/core/substrate/gate-explain.d.ts +35 -0
- package/dist/core/substrate/gate-explain.js +1 -0
- package/dist/core/substrate/schema.d.ts +29 -0
- package/dist/core/substrate/schema.js +1 -0
- package/dist/core/substrate/subject-fields.d.ts +48 -0
- package/dist/core/substrate/subject-fields.js +1 -0
- package/dist/core/substrate/subject.d.ts +13 -0
- package/dist/core/substrate/subject.js +1 -0
- package/dist/core/termrender/code-doc.d.ts +12 -0
- package/dist/core/termrender/code-doc.js +5 -0
- package/dist/core/termrender/display.d.ts +16 -0
- package/dist/core/termrender/display.js +2 -0
- package/dist/core/termrender/termrender.d.ts +71 -0
- package/dist/core/termrender/termrender.js +14 -0
- package/dist/core/termrender/version.d.ts +1 -0
- package/dist/core/termrender/version.js +1 -0
- package/dist/core/timing.d.ts +11 -0
- package/dist/core/timing.js +2 -0
- package/dist/core/tui/draw.d.ts +103 -0
- package/dist/core/tui/draw.js +2 -0
- package/dist/core/tui/fuzzy.d.ts +9 -0
- package/dist/core/tui/fuzzy.js +1 -0
- package/dist/core/tui/markdown.d.ts +17 -0
- package/dist/core/tui/markdown.js +3 -0
- package/dist/core/tui/page-host.d.ts +31 -0
- package/dist/core/tui/page-host.js +1 -0
- package/dist/core/tui/panel.d.ts +45 -0
- package/dist/core/tui/panel.js +1 -0
- package/dist/core/tui/terminal.d.ts +23 -0
- package/dist/core/tui/terminal.js +2 -0
- package/dist/core/user-settings.d.ts +377 -0
- package/dist/core/user-settings.js +1 -0
- package/dist/core/wake.d.ts +89 -0
- package/dist/core/wake.js +1 -0
- package/dist/core/worktree-close.d.ts +4 -0
- package/dist/core/worktree-close.js +6 -0
- package/dist/core/worktree-containment.d.ts +14 -0
- package/dist/core/worktree-containment.js +3 -0
- package/dist/core/worktree-landing.d.ts +44 -0
- package/dist/core/worktree-landing.js +4 -0
- package/dist/core/worktree-mutation-async.d.ts +13 -0
- package/dist/core/worktree-mutation-async.js +10 -0
- package/dist/core/worktree-quarantine.d.ts +19 -0
- package/dist/core/worktree-quarantine.js +1 -0
- package/dist/core/worktree-remove.d.ts +15 -0
- package/dist/core/worktree-remove.js +1 -0
- package/dist/core/worktree-sweep.d.ts +60 -0
- package/dist/core/worktree-sweep.js +6 -0
- package/dist/core/worktree.d.ts +120 -0
- package/dist/core/worktree.js +18 -0
- package/dist/daemon/analytics/compute.d.ts +37 -0
- package/dist/daemon/analytics/compute.js +1 -0
- package/dist/daemon/analytics/scan-worker.d.ts +1 -0
- package/dist/daemon/analytics/scan-worker.js +2 -0
- package/dist/daemon/analytics/scan.d.ts +37 -0
- package/dist/daemon/analytics/scan.js +1 -0
- package/dist/daemon/api/app-listener.d.ts +22 -0
- package/dist/daemon/api/app-listener.js +24 -0
- package/dist/daemon/api/bridge.d.ts +63 -0
- package/dist/daemon/api/bridge.js +8 -0
- package/dist/daemon/api/deferred-head.d.ts +14 -0
- package/dist/daemon/api/deferred-head.js +4 -0
- package/dist/daemon/api/handlers/analytics.d.ts +2 -0
- package/dist/daemon/api/handlers/analytics.js +1 -0
- package/dist/daemon/api/handlers/app-profiles.d.ts +17 -0
- package/dist/daemon/api/handlers/app-profiles.js +1 -0
- package/dist/daemon/api/handlers/attach.d.ts +2 -0
- package/dist/daemon/api/handlers/attach.js +1 -0
- package/dist/daemon/api/handlers/bash-jobs.d.ts +2 -0
- package/dist/daemon/api/handlers/bash-jobs.js +1 -0
- package/dist/daemon/api/handlers/bash.d.ts +2 -0
- package/dist/daemon/api/handlers/bash.js +1 -0
- package/dist/daemon/api/handlers/broker-ops.d.ts +5 -0
- package/dist/daemon/api/handlers/broker-ops.js +1 -0
- package/dist/daemon/api/handlers/broker-recovery.d.ts +4 -0
- package/dist/daemon/api/handlers/broker-recovery.js +1 -0
- package/dist/daemon/api/handlers/broker-signals.d.ts +19 -0
- package/dist/daemon/api/handlers/broker-signals.js +2 -0
- package/dist/daemon/api/handlers/canvas.d.ts +7 -0
- package/dist/daemon/api/handlers/canvas.js +6 -0
- package/dist/daemon/api/handlers/chat-inventory.d.ts +2 -0
- package/dist/daemon/api/handlers/chat-inventory.js +1 -0
- package/dist/daemon/api/handlers/crons.d.ts +2 -0
- package/dist/daemon/api/handlers/crons.js +1 -0
- package/dist/daemon/api/handlers/custom-objects.d.ts +10 -0
- package/dist/daemon/api/handlers/custom-objects.js +3 -0
- package/dist/daemon/api/handlers/daemon.d.ts +2 -0
- package/dist/daemon/api/handlers/daemon.js +1 -0
- package/dist/daemon/api/handlers/delivery-retry.d.ts +2 -0
- package/dist/daemon/api/handlers/delivery-retry.js +1 -0
- package/dist/daemon/api/handlers/delivery.d.ts +2 -0
- package/dist/daemon/api/handlers/delivery.js +1 -0
- package/dist/daemon/api/handlers/docs.d.ts +2 -0
- package/dist/daemon/api/handlers/docs.js +1 -0
- package/dist/daemon/api/handlers/feedback-comments.d.ts +2 -0
- package/dist/daemon/api/handlers/feedback-comments.js +3 -0
- package/dist/daemon/api/handlers/files.d.ts +2 -0
- package/dist/daemon/api/handlers/files.js +1 -0
- package/dist/daemon/api/handlers/focus.d.ts +2 -0
- package/dist/daemon/api/handlers/focus.js +1 -0
- package/dist/daemon/api/handlers/health.d.ts +2 -0
- package/dist/daemon/api/handlers/health.js +14 -0
- package/dist/daemon/api/handlers/hook-exec.d.ts +2 -0
- package/dist/daemon/api/handlers/hook-exec.js +1 -0
- package/dist/daemon/api/handlers/human-requests.d.ts +2 -0
- package/dist/daemon/api/handlers/human-requests.js +1 -0
- package/dist/daemon/api/handlers/human.d.ts +2 -0
- package/dist/daemon/api/handlers/human.js +1 -0
- package/dist/daemon/api/handlers/inbox-page.d.ts +4 -0
- package/dist/daemon/api/handlers/inbox-page.js +1 -0
- package/dist/daemon/api/handlers/inbox.d.ts +12 -0
- package/dist/daemon/api/handlers/inbox.js +1 -0
- package/dist/daemon/api/handlers/limits.d.ts +2 -0
- package/dist/daemon/api/handlers/limits.js +1 -0
- package/dist/daemon/api/handlers/llm.d.ts +2 -0
- package/dist/daemon/api/handlers/llm.js +3 -0
- package/dist/daemon/api/handlers/memory-reads.d.ts +4 -0
- package/dist/daemon/api/handlers/memory-reads.js +1 -0
- package/dist/daemon/api/handlers/memory.d.ts +38 -0
- package/dist/daemon/api/handlers/memory.js +8 -0
- package/dist/daemon/api/handlers/messages.d.ts +4 -0
- package/dist/daemon/api/handlers/messages.js +2 -0
- package/dist/daemon/api/handlers/model-config.d.ts +2 -0
- package/dist/daemon/api/handlers/model-config.js +1 -0
- package/dist/daemon/api/handlers/modelauth.d.ts +5 -0
- package/dist/daemon/api/handlers/modelauth.js +1 -0
- package/dist/daemon/api/handlers/node-events.d.ts +44 -0
- package/dist/daemon/api/handlers/node-events.js +6 -0
- package/dist/daemon/api/handlers/node-outcomes.d.ts +2 -0
- package/dist/daemon/api/handlers/node-outcomes.js +1 -0
- package/dist/daemon/api/handlers/node-records.d.ts +2 -0
- package/dist/daemon/api/handlers/node-records.js +3 -0
- package/dist/daemon/api/handlers/nodes.d.ts +17 -0
- package/dist/daemon/api/handlers/nodes.js +1 -0
- package/dist/daemon/api/handlers/objects.d.ts +2 -0
- package/dist/daemon/api/handlers/objects.js +2 -0
- package/dist/daemon/api/handlers/package-docs.d.ts +2 -0
- package/dist/daemon/api/handlers/package-docs.js +1 -0
- package/dist/daemon/api/handlers/profiles.d.ts +11 -0
- package/dist/daemon/api/handlers/profiles.js +1 -0
- package/dist/daemon/api/handlers/prospective-chat-inventory.d.ts +2 -0
- package/dist/daemon/api/handlers/prospective-chat-inventory.js +1 -0
- package/dist/daemon/api/handlers/providers.d.ts +70 -0
- package/dist/daemon/api/handlers/providers.js +1 -0
- package/dist/daemon/api/handlers/questions.d.ts +7 -0
- package/dist/daemon/api/handlers/questions.js +1 -0
- package/dist/daemon/api/handlers/reports.d.ts +6 -0
- package/dist/daemon/api/handlers/reports.js +18 -0
- package/dist/daemon/api/handlers/review-comments.d.ts +2 -0
- package/dist/daemon/api/handlers/review-comments.js +1 -0
- package/dist/daemon/api/handlers/reviews.d.ts +5 -0
- package/dist/daemon/api/handlers/reviews.js +1 -0
- package/dist/daemon/api/handlers/run-routes.d.ts +2 -0
- package/dist/daemon/api/handlers/run-routes.js +1 -0
- package/dist/daemon/api/handlers/runs.d.ts +9 -0
- package/dist/daemon/api/handlers/runs.js +1 -0
- package/dist/daemon/api/handlers/structured-requests.d.ts +2 -0
- package/dist/daemon/api/handlers/structured-requests.js +1 -0
- package/dist/daemon/api/handlers/subscriptions.d.ts +2 -0
- package/dist/daemon/api/handlers/subscriptions.js +1 -0
- package/dist/daemon/api/handlers/telemetry-record.d.ts +4 -0
- package/dist/daemon/api/handlers/telemetry-record.js +1 -0
- package/dist/daemon/api/handlers/transfer.d.ts +15 -0
- package/dist/daemon/api/handlers/transfer.js +1 -0
- package/dist/daemon/api/handlers/validate.d.ts +23 -0
- package/dist/daemon/api/handlers/validate.js +1 -0
- package/dist/daemon/api/handlers/vendor-status.d.ts +8 -0
- package/dist/daemon/api/handlers/vendor-status.js +1 -0
- package/dist/daemon/api/handlers/worktree.d.ts +2 -0
- package/dist/daemon/api/handlers/worktree.js +1 -0
- package/dist/daemon/api/long-poll-wait.d.ts +3 -0
- package/dist/daemon/api/long-poll-wait.js +1 -0
- package/dist/daemon/api/map.d.ts +167 -0
- package/dist/daemon/api/map.js +2 -0
- package/dist/daemon/api/operations.d.ts +18 -0
- package/dist/daemon/api/operations.js +1 -0
- package/dist/daemon/api/principal.d.ts +71 -0
- package/dist/daemon/api/principal.js +1 -0
- package/dist/daemon/api/reader.d.ts +17 -0
- package/dist/daemon/api/reader.js +1 -0
- package/dist/daemon/api/router.d.ts +123 -0
- package/dist/daemon/api/router.js +1 -0
- package/dist/daemon/api/server.d.ts +28 -0
- package/dist/daemon/api/server.js +1 -0
- package/dist/daemon/api/vendor-signin.d.ts +7 -0
- package/dist/daemon/api/vendor-signin.js +77 -0
- package/dist/daemon/api/viewer-presence.d.ts +3 -0
- package/dist/daemon/api/viewer-presence.js +1 -0
- package/dist/daemon/boot-migrations.d.ts +14 -0
- package/dist/daemon/boot-migrations.js +1 -0
- package/dist/daemon/broker-signals/bus.d.ts +30 -0
- package/dist/daemon/broker-signals/bus.js +10 -0
- package/dist/daemon/companion-retire.d.ts +4 -0
- package/dist/daemon/companion-retire.js +1 -0
- package/dist/daemon/control.d.ts +40 -0
- package/dist/daemon/control.js +1 -0
- package/dist/daemon/cron/armed-context.d.ts +25 -0
- package/dist/daemon/cron/armed-context.js +1 -0
- package/dist/daemon/cron/capture.d.ts +22 -0
- package/dist/daemon/cron/capture.js +2 -0
- package/dist/daemon/cron/disposition.d.ts +21 -0
- package/dist/daemon/cron/disposition.js +1 -0
- package/dist/daemon/cron/escalation.d.ts +12 -0
- package/dist/daemon/cron/escalation.js +3 -0
- package/dist/daemon/cron/held.d.ts +4 -0
- package/dist/daemon/cron/held.js +1 -0
- package/dist/daemon/cron/lease-recovery.d.ts +3 -0
- package/dist/daemon/cron/lease-recovery.js +1 -0
- package/dist/daemon/cron/live-runs.d.ts +11 -0
- package/dist/daemon/cron/live-runs.js +1 -0
- package/dist/daemon/cron/passes.d.ts +6 -0
- package/dist/daemon/cron/passes.js +1 -0
- package/dist/daemon/cron/settle.d.ts +28 -0
- package/dist/daemon/cron/settle.js +1 -0
- package/dist/daemon/cron/sinks.d.ts +19 -0
- package/dist/daemon/cron/sinks.js +2 -0
- package/dist/daemon/cron-run.d.ts +31 -0
- package/dist/daemon/cron-run.js +1 -0
- package/dist/daemon/crtrd-cli.d.ts +1 -0
- package/dist/daemon/crtrd-cli.js +1 -0
- package/dist/daemon/crtrd.d.ts +28 -0
- package/dist/daemon/crtrd.js +12 -0
- package/dist/daemon/delivery/run-delivery.d.ts +34 -0
- package/dist/daemon/delivery/run-delivery.js +1 -0
- package/dist/daemon/due-sources.d.ts +15 -0
- package/dist/daemon/due-sources.js +1 -0
- package/dist/daemon/due.d.ts +14 -0
- package/dist/daemon/due.js +11 -0
- package/dist/daemon/fleet.d.ts +79 -0
- package/dist/daemon/fleet.js +19 -0
- package/dist/daemon/http-dispatcher.d.ts +1 -0
- package/dist/daemon/http-dispatcher.js +1 -0
- package/dist/daemon/human/finish.d.ts +24 -0
- package/dist/daemon/human/finish.js +10 -0
- package/dist/daemon/human/settle.d.ts +44 -0
- package/dist/daemon/human/settle.js +1 -0
- package/dist/daemon/human/sweep.d.ts +21 -0
- package/dist/daemon/human/sweep.js +1 -0
- package/dist/daemon/joined-owner.d.ts +5 -0
- package/dist/daemon/joined-owner.js +1 -0
- package/dist/daemon/launcher-events.d.ts +2 -0
- package/dist/daemon/launcher-events.js +1 -0
- package/dist/daemon/manage.d.ts +176 -0
- package/dist/daemon/manage.js +2 -0
- package/dist/daemon/messaging/node-message.d.ts +27 -0
- package/dist/daemon/messaging/node-message.js +1 -0
- package/dist/daemon/park-activity.d.ts +9 -0
- package/dist/daemon/park-activity.js +1 -0
- package/dist/daemon/park-pending.d.ts +18 -0
- package/dist/daemon/park-pending.js +1 -0
- package/dist/daemon/pidfile.d.ts +8 -0
- package/dist/daemon/pidfile.js +1 -0
- package/dist/daemon/profile-delete.d.ts +7 -0
- package/dist/daemon/profile-delete.js +1 -0
- package/dist/daemon/reconcilers/action-lane.d.ts +8 -0
- package/dist/daemon/reconcilers/action-lane.js +1 -0
- package/dist/daemon/reconcilers/bash-deadline.d.ts +27 -0
- package/dist/daemon/reconcilers/bash-deadline.js +2 -0
- package/dist/daemon/reconcilers/broker-supervision.d.ts +88 -0
- package/dist/daemon/reconcilers/broker-supervision.js +4 -0
- package/dist/daemon/reconcilers/controller-death.d.ts +7 -0
- package/dist/daemon/reconcilers/controller-death.js +1 -0
- package/dist/daemon/reconcilers/cron-lane.d.ts +7 -0
- package/dist/daemon/reconcilers/cron-lane.js +1 -0
- package/dist/daemon/reconcilers/delivery-lane.d.ts +9 -0
- package/dist/daemon/reconcilers/delivery-lane.js +8 -0
- package/dist/daemon/reconcilers/fault-retry-backstop.d.ts +41 -0
- package/dist/daemon/reconcilers/fault-retry-backstop.js +1 -0
- package/dist/daemon/reconcilers/grove-instance-sweep.d.ts +36 -0
- package/dist/daemon/reconcilers/grove-instance-sweep.js +1 -0
- package/dist/daemon/reconcilers/live-obligation.d.ts +65 -0
- package/dist/daemon/reconcilers/live-obligation.js +1 -0
- package/dist/daemon/reconcilers/managed-worktree-sweep.d.ts +24 -0
- package/dist/daemon/reconcilers/managed-worktree-sweep.js +1 -0
- package/dist/daemon/reconcilers/node-deadline.d.ts +7 -0
- package/dist/daemon/reconcilers/node-deadline.js +1 -0
- package/dist/daemon/reconcilers/node-lifecycle/freeze-lane.d.ts +48 -0
- package/dist/daemon/reconcilers/node-lifecycle/freeze-lane.js +1 -0
- package/dist/daemon/reconcilers/node-lifecycle/respawn-policy.d.ts +30 -0
- package/dist/daemon/reconcilers/node-lifecycle/respawn-policy.js +1 -0
- package/dist/daemon/reconcilers/node-lifecycle/terminating.d.ts +5 -0
- package/dist/daemon/reconcilers/node-lifecycle/terminating.js +1 -0
- package/dist/daemon/reconcilers/node-lifecycle/tick.d.ts +20 -0
- package/dist/daemon/reconcilers/node-lifecycle/tick.js +1 -0
- package/dist/daemon/reconcilers/node-lifecycle/wants-execution.d.ts +8 -0
- package/dist/daemon/reconcilers/node-lifecycle/wants-execution.js +1 -0
- package/dist/daemon/reconcilers/pending-review-submit.d.ts +7 -0
- package/dist/daemon/reconcilers/pending-review-submit.js +1 -0
- package/dist/daemon/reconcilers/storage-due-work.d.ts +32 -0
- package/dist/daemon/reconcilers/storage-due-work.js +1 -0
- package/dist/daemon/reconcilers/storage-maintenance.d.ts +69 -0
- package/dist/daemon/reconcilers/storage-maintenance.js +8 -0
- package/dist/daemon/reconcilers/structured-request-lane.d.ts +4 -0
- package/dist/daemon/reconcilers/structured-request-lane.js +1 -0
- package/dist/daemon/resume-detector.d.ts +12 -0
- package/dist/daemon/resume-detector.js +1 -0
- package/dist/daemon/review/comment-notify.d.ts +27 -0
- package/dist/daemon/review/comment-notify.js +2 -0
- package/dist/daemon/review/companion.d.ts +8 -0
- package/dist/daemon/review/companion.js +1 -0
- package/dist/daemon/review/deliver.d.ts +5 -0
- package/dist/daemon/review/deliver.js +3 -0
- package/dist/daemon/review/finish.d.ts +27 -0
- package/dist/daemon/review/finish.js +1 -0
- package/dist/daemon/review/sweep.d.ts +4 -0
- package/dist/daemon/review/sweep.js +1 -0
- package/dist/daemon/run-notices.d.ts +49 -0
- package/dist/daemon/run-notices.js +1 -0
- package/dist/daemon/runs/append-section.d.ts +6 -0
- package/dist/daemon/runs/append-section.js +2 -0
- package/dist/daemon/runs/observer.d.ts +14 -0
- package/dist/daemon/runs/observer.js +4 -0
- package/dist/daemon/startup-policy.d.ts +1 -0
- package/dist/daemon/startup-policy.js +1 -0
- package/dist/daemon/structured-requests/boot.d.ts +2 -0
- package/dist/daemon/structured-requests/boot.js +1 -0
- package/dist/daemon/structured-requests/effects.d.ts +4 -0
- package/dist/daemon/structured-requests/effects.js +1 -0
- package/dist/daemon/structured-requests/notifier.d.ts +2 -0
- package/dist/daemon/structured-requests/notifier.js +1 -0
- package/dist/daemon/structured-requests/sidecar.d.ts +3 -0
- package/dist/daemon/structured-requests/sidecar.js +1 -0
- package/dist/daemon/supervise-cadence.d.ts +1 -0
- package/dist/daemon/supervise-cadence.js +1 -0
- package/dist/hook-authoring.d.ts +130 -0
- package/dist/hook-authoring.js +5 -0
- package/dist/hook-process.d.ts +7 -0
- package/dist/hook-process.js +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +1 -0
- package/dist/launcher/bwrap.d.ts +13 -0
- package/dist/launcher/bwrap.js +2 -0
- package/dist/launcher/client.d.ts +4 -0
- package/dist/launcher/client.js +3 -0
- package/dist/launcher/limits/cgroup.d.ts +28 -0
- package/dist/launcher/limits/cgroup.js +2 -0
- package/dist/launcher/limits/log.d.ts +3 -0
- package/dist/launcher/limits/log.js +1 -0
- package/dist/launcher/limits/manager.d.ts +82 -0
- package/dist/launcher/limits/manager.js +1 -0
- package/dist/launcher/limits/policy.d.ts +98 -0
- package/dist/launcher/limits/policy.js +1 -0
- package/dist/launcher/limits/purge-worker.d.ts +8 -0
- package/dist/launcher/limits/purge-worker.js +2 -0
- package/dist/launcher/limits/quota.d.ts +48 -0
- package/dist/launcher/limits/quota.js +4 -0
- package/dist/launcher/limits/settings.d.ts +19 -0
- package/dist/launcher/limits/settings.js +2 -0
- package/dist/launcher/main.d.ts +1 -0
- package/dist/launcher/main.js +3 -0
- package/dist/launcher/netrule.d.ts +1 -0
- package/dist/launcher/netrule.js +1 -0
- package/dist/launcher/scope-directories.d.ts +4 -0
- package/dist/launcher/scope-directories.js +1 -0
- package/dist/launcher/seccomp.d.ts +1 -0
- package/dist/launcher/seccomp.js +1 -0
- package/dist/launcher/spec.d.ts +149 -0
- package/dist/launcher/spec.js +1 -0
- package/dist/launcher/users.d.ts +23 -0
- package/dist/launcher/users.js +7 -0
- package/dist/launcher/validate.d.ts +22 -0
- package/dist/launcher/validate.js +1 -0
- package/dist/migrations/004-canvas-documents/apply.d.ts +10 -0
- package/dist/migrations/004-canvas-documents/apply.js +1 -0
- package/dist/migrations/004-canvas-documents/fields.d.ts +24 -0
- package/dist/migrations/004-canvas-documents/fields.js +2 -0
- package/dist/migrations/004-canvas-documents/index.d.ts +16 -0
- package/dist/migrations/004-canvas-documents/index.js +2 -0
- package/dist/migrations/004-canvas-documents/legacy/discover.d.ts +16 -0
- package/dist/migrations/004-canvas-documents/legacy/discover.js +1 -0
- package/dist/migrations/004-canvas-documents/legacy/history.d.ts +5 -0
- package/dist/migrations/004-canvas-documents/legacy/history.js +2 -0
- package/dist/migrations/004-canvas-documents/legacy/nested.d.ts +7 -0
- package/dist/migrations/004-canvas-documents/legacy/nested.js +1 -0
- package/dist/migrations/004-canvas-documents/legacy/parse.d.ts +14 -0
- package/dist/migrations/004-canvas-documents/legacy/parse.js +1 -0
- package/dist/migrations/004-canvas-documents/legacy/types.d.ts +91 -0
- package/dist/migrations/004-canvas-documents/legacy/types.js +0 -0
- package/dist/migrations/004-canvas-documents/legacy-edges.d.ts +6 -0
- package/dist/migrations/004-canvas-documents/legacy-edges.js +18 -0
- package/dist/migrations/004-canvas-documents/plan.d.ts +102 -0
- package/dist/migrations/004-canvas-documents/plan.js +3 -0
- package/dist/migrations/004-canvas-documents/pointers.d.ts +23 -0
- package/dist/migrations/004-canvas-documents/pointers.js +4 -0
- package/dist/migrations/activation.d.ts +17 -0
- package/dist/migrations/activation.js +2 -0
- package/dist/native/linux/arm64/addon.node +0 -0
- package/dist/native/linux/x64/addon.node +0 -0
- package/dist/native/linux.d.ts +29 -0
- package/dist/native/linux.js +1 -0
- package/dist/pi-extensions/broker-local.d.ts +19 -0
- package/dist/pi-extensions/broker-local.js +2 -0
- package/dist/pi-extensions/canvas-bash-valve.d.ts +23 -0
- package/dist/pi-extensions/canvas-bash-valve.js +7 -0
- package/dist/pi-extensions/canvas-context-intro.d.ts +55 -0
- package/dist/pi-extensions/canvas-context-intro.js +2 -0
- package/dist/pi-extensions/canvas-doc-substrate.d.ts +51 -0
- package/dist/pi-extensions/canvas-doc-substrate.js +9 -0
- package/dist/pi-extensions/canvas-elapsed.d.ts +21 -0
- package/dist/pi-extensions/canvas-elapsed.js +2 -0
- package/dist/pi-extensions/canvas-goal-capture.d.ts +21 -0
- package/dist/pi-extensions/canvas-goal-capture.js +1 -0
- package/dist/pi-extensions/canvas-inbox-watcher.d.ts +26 -0
- package/dist/pi-extensions/canvas-inbox-watcher.js +2 -0
- package/dist/pi-extensions/canvas-passive-context.d.ts +38 -0
- package/dist/pi-extensions/canvas-passive-context.js +14 -0
- package/dist/pi-extensions/canvas-preview-result.d.ts +22 -0
- package/dist/pi-extensions/canvas-preview-result.js +4 -0
- package/dist/pi-extensions/canvas-prompt-scrub.d.ts +13 -0
- package/dist/pi-extensions/canvas-prompt-scrub.js +2 -0
- package/dist/pi-extensions/canvas-recap.d.ts +54 -0
- package/dist/pi-extensions/canvas-recap.js +11 -0
- package/dist/pi-extensions/canvas-review-boundary.d.ts +42 -0
- package/dist/pi-extensions/canvas-review-boundary.js +3 -0
- package/dist/pi-extensions/canvas-stamp.d.ts +14 -0
- package/dist/pi-extensions/canvas-stamp.js +2 -0
- package/dist/pi-extensions/canvas-stophook.d.ts +48 -0
- package/dist/pi-extensions/canvas-stophook.js +1 -0
- package/dist/pi-extensions/canvas-structured-output.d.ts +49 -0
- package/dist/pi-extensions/canvas-structured-output.js +19 -0
- package/dist/pi-extensions/canvas-tool-guide.d.ts +14 -0
- package/dist/pi-extensions/canvas-tool-guide.js +9 -0
- package/dist/pi-extensions/envelope-merge.d.ts +13 -0
- package/dist/pi-extensions/envelope-merge.js +8 -0
- package/dist/pi-extensions/system-prompt-entry.d.ts +15 -0
- package/dist/pi-extensions/system-prompt-entry.js +1 -0
- package/dist/prompts/review.d.ts +2 -0
- package/dist/prompts/review.js +110 -0
- package/dist/shared/crtr-version.d.ts +2 -0
- package/dist/shared/crtr-version.js +1 -0
- package/dist/shared/env.d.ts +116 -0
- package/dist/shared/env.js +2 -0
- package/dist/shared/generated-context.d.ts +83 -0
- package/dist/shared/generated-context.js +8 -0
- package/dist/shared/inbox-entry-body.d.ts +22 -0
- package/dist/shared/inbox-entry-body.js +10 -0
- package/dist/shared/inline-ref-grammar.d.ts +53 -0
- package/dist/shared/inline-ref-grammar.js +1 -0
- package/dist/shared/inline-ref-guidance.d.ts +8 -0
- package/dist/shared/inline-ref-guidance.js +2 -0
- package/dist/shared/predicates.d.ts +2 -0
- package/dist/shared/predicates.js +1 -0
- package/dist/shared/shell-quote.d.ts +3 -0
- package/dist/shared/shell-quote.js +1 -0
- package/dist/shared/strip-cd-prefix.d.ts +1 -0
- package/dist/shared/strip-cd-prefix.js +1 -0
- package/dist/shared/tool-groups.d.ts +26 -0
- package/dist/shared/tool-groups.js +1 -0
- package/dist/shared/working-activity.d.ts +9 -0
- package/dist/shared/working-activity.js +1 -0
- package/dist/suppress-experimental-warnings.d.ts +1 -0
- package/dist/suppress-experimental-warnings.js +1 -0
- package/dist/types.d.ts +562 -0
- package/dist/types.js +1 -0
- package/docs/cli/README.md +17 -0
- package/docs/cli/canvas-and-dashboard.md +56 -0
- package/docs/cli/documents-and-preferences.md +52 -0
- package/docs/cli/first-session.md +76 -0
- package/docs/cli/human-inbox.md +34 -0
- package/docs/cli/official-marketplace.md +75 -0
- package/docs/cli/the-viewer.md +80 -0
- package/docs/concepts/README.md +17 -0
- package/docs/concepts/documents.md +52 -0
- package/docs/concepts/lifecycle-and-wakes.md +26 -0
- package/docs/concepts/nodes-and-the-canvas.md +29 -0
- package/docs/concepts/profiles-kinds-and-modes.md +31 -0
- package/docs/concepts/scopes-and-trust.md +39 -0
- package/docs/concepts/why-a-daemon.md +29 -0
- package/docs/plugin/README.md +20 -0
- package/docs/plugin/bundles-and-memory.md +28 -0
- package/docs/plugin/commands.md +22 -0
- package/docs/plugin/deploying.md +34 -0
- package/docs/plugin/errors.md +39 -0
- package/docs/plugin/getting-started.md +23 -0
- package/docs/plugin/output.md +51 -0
- package/docs/plugin/parameters.md +29 -0
- package/docs/public-api.md +75 -0
- package/docs/release-local.md +8 -0
- package/docs/sdk/README.md +90 -0
- package/docs/sdk/bash.md +39 -0
- package/docs/sdk/client.md +297 -0
- package/docs/sdk/docker.md +68 -0
- package/docs/sdk/error-envelope.md +36 -0
- package/docs/sdk/errors.md +111 -0
- package/docs/sdk/files.md +49 -0
- package/docs/sdk/getting-started.md +224 -0
- package/docs/sdk/guides/README.md +19 -0
- package/docs/sdk/guides/apps-on-crouter-cloud.md +115 -0
- package/docs/sdk/guides/apps-with-many-users.md +59 -0
- package/docs/sdk/guides/event-driven-assistant.md +24 -0
- package/docs/sdk/guides/fan-out-pipeline.md +24 -0
- package/docs/sdk/guides/human-approval.md +24 -0
- package/docs/sdk/guides/typed-extraction.md +24 -0
- package/docs/sdk/memory.md +47 -0
- package/docs/sdk/nodes.md +194 -0
- package/docs/sdk/release-notes.md +207 -0
- package/docs/sdk/resources.md +99 -0
- package/docs/sdk/streaming.md +216 -0
- package/docs/sdk/testing.md +163 -0
- package/package.json +158 -4
- package/packages/crouter-identity/dist/index.d.ts +107 -0
- package/packages/crouter-identity/dist/index.js +226 -0
- package/packages/crouter-identity/package.json +33 -0
- package/runtime.lock.json +13864 -0
- package/scripts/build-native-linux.mjs +35 -0
- package/scripts/ensure-native-linux.mjs +72 -0
- package/scripts/install-runtime.mjs +614 -0
- package/scripts/lib/isolation-env.mjs +48 -0
- package/scripts/lib/pack-args.mjs +19 -0
- package/scripts/lib/runtime-deps-key.mjs +50 -0
- package/scripts/lib/update-target.mjs +78 -0
- package/scripts/pack-minify.mjs +114 -0
- package/scripts/patch-pi-tree-root-ordering.mjs +57 -0
- package/scripts/postinstall.mjs +55 -0
- package/scripts/runtime-lock.mjs +26 -0
- package/scripts/runtime-smoke.mjs +54 -0
- package/scripts/self-update.mjs +45 -0
- package/src/native/linux/addon.c +255 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { AnalyticsDTO } from '../../api/dto/analytics.js';
|
|
2
|
+
export interface ResponseRecord {
|
|
3
|
+
node_id: string;
|
|
4
|
+
at_ms: number;
|
|
5
|
+
provider: string;
|
|
6
|
+
model: string;
|
|
7
|
+
input: number;
|
|
8
|
+
output: number;
|
|
9
|
+
cache_read: number;
|
|
10
|
+
cache_write: number;
|
|
11
|
+
cost: number;
|
|
12
|
+
}
|
|
13
|
+
export interface ScanInput {
|
|
14
|
+
nodes: Array<{
|
|
15
|
+
node_id: string;
|
|
16
|
+
created: string;
|
|
17
|
+
transcripts: string[];
|
|
18
|
+
}>;
|
|
19
|
+
windowStartMs: number;
|
|
20
|
+
asOfMs: number;
|
|
21
|
+
}
|
|
22
|
+
/** `unknown_at` lists each response with no model or usage (still a model response: it makes its agent active). */
|
|
23
|
+
export interface ScanResult {
|
|
24
|
+
responses: ResponseRecord[];
|
|
25
|
+
transcripts: AnalyticsDTO['transcripts'];
|
|
26
|
+
unknown: number;
|
|
27
|
+
unknown_at: Array<{
|
|
28
|
+
node_id: string;
|
|
29
|
+
at_ms: number;
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Reads every transcript in one worker thread so the daemon's event loop never parses JSONL. At most MAX_WORKERS run
|
|
34
|
+
* daemon-wide; the rest queue. Aborting `signal` drops a queued scan or terminates its worker. Rejects when the worker
|
|
35
|
+
* fails or the scan is aborted.
|
|
36
|
+
*/
|
|
37
|
+
export declare function scanResponses(input: ScanInput, signal?: AbortSignal): Promise<ScanResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var b=Object.defineProperty;var t=(u,e)=>b(u,"name",{value:e,configurable:!0});import{Worker as v}from"node:worker_threads";const E=4;let c=0;const a=[];function k(){c--,a.shift()?.()}t(k,"release");function L(u,e){return new Promise((p,n)=>{const i=t(()=>new Error("transcript scan aborted: the analytics request was closed"),"aborted");if(e?.aborted){n(i());return}const d=t(()=>{if(e?.aborted){n(i());return}c++;const o=new v(new URL(import.meta.url.endsWith(".ts")?"./scan-worker.ts":"./scan-worker.js",import.meta.url),{workerData:u});let r=!1;const m=t(()=>{r||(r=!0,n(i()),o.terminate())},"onAbort");e?.addEventListener("abort",m,{once:!0}),o.once("message",s=>{r||(r=!0,p(s))}),o.once("error",s=>{r||(r=!0,n(s))}),o.once("exit",s=>{e?.removeEventListener("abort",m),k(),r||(r=!0,n(new Error(`transcript scan worker exited with ${s} before replying`)))})},"start");if(c<E){d();return}const f=t(()=>{e?.removeEventListener("abort",w),d()},"queued"),w=t(()=>{const o=a.indexOf(f);o>=0&&a.splice(o,1),n(i())},"dropQueued");e?.addEventListener("abort",w,{once:!0}),a.push(f)})}t(L,"scanResponses");export{L as scanResponses};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type IncomingMessage, type ServerResponse } from 'node:http';
|
|
2
|
+
import { type RequestPrincipal } from './router.js';
|
|
3
|
+
import { type DeferHeadOptions } from './deferred-head.js';
|
|
4
|
+
import type { AppPrincipal } from './principal.js';
|
|
5
|
+
import type { ScopeConfig } from '../../types.js';
|
|
6
|
+
import type { GrantSync } from '../../core/grants/sync.js';
|
|
7
|
+
export declare function cursor(req: IncomingMessage, query: URLSearchParams): number;
|
|
8
|
+
/** A run's SSE stream ends with `event: idle` after this long with no running turn and no new event. */
|
|
9
|
+
export declare const RUN_STREAM_IDLE_MS = 60000;
|
|
10
|
+
export interface RunStreamOptions {
|
|
11
|
+
idleMs?: number;
|
|
12
|
+
idleCheckMs?: number;
|
|
13
|
+
isRunning?: (runId: string) => boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function streamRunEvents(req: IncomingMessage, res: ServerResponse, id: string, principal: AppPrincipal | RequestPrincipal, after: number, requestId: string, framing: 'sse' | 'ndjson', options?: RunStreamOptions): Promise<void>;
|
|
16
|
+
export declare function createAppListener(config: NonNullable<ScopeConfig['runtime']>, grantsReady: () => boolean, syncGrants: GrantSync, listenerOptions?: {
|
|
17
|
+
deferHead?: DeferHeadOptions;
|
|
18
|
+
stream?: RunStreamOptions;
|
|
19
|
+
}): {
|
|
20
|
+
ready: Promise<void>;
|
|
21
|
+
close: () => Promise<void>;
|
|
22
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var B=Object.defineProperty;var s=(e,n)=>B(e,"name",{value:n,configurable:!0});import{randomUUID as L}from"node:crypto";import{createServer as $}from"node:http";import{Router as j}from"./router.js";import{OPERATIONS as V}from"./operations.js";import{errorCodes as D}from"../../api/error-codes.js";import{MINIMUM_RUNTIME_VERSION_HEADER as G,RUNTIME_VERSION_HEADER as Y,minimumRuntimeRefusal as z}from"../../api/runtime-version.js";import{crtrVersion as x}from"../../shared/crtr-version.js";import{AppPrincipalResolver as F}from"./principal.js";import{handleRunOperation as Q,integer as W}from"./handlers/runs.js";import{parseLlmRequest as K,runLlm as Z}from"../../core/llm/run.js";import{CONTROL_BODY_MAX_BYTES as ee,MODEL_CONTEXT_BODY_MAX_BYTES as te}from"../../core/llm/body-limits.js";import{RunError as d,runIsRunning as ne}from"../../core/runs/operations.js";import{requireRun as P}from"./router.js";import{deferHead as re}from"./deferred-head.js";import{readRunEvents as J,registerGrantStream as ae,subscribeRunEvents as oe}from"../../core/runs/events.js";import{activeGrant as se}from"../../core/grants/mirror.js";import{releaseGrantWaiters as ie}from"../../core/grants/watch.js";import{emitEvent as ue}from"../../core/events/emit.js";import{runNotices as le}from"../run-notices.js";import{handleVendorSignIn as de,isVendorSignInPath as ce}from"./vendor-signin.js";import{listAppProfiles as fe}from"./handlers/app-profiles.js";import{handleTransferDownload as me,handleTransferOperation as pe,TRANSFER_OPERATIONS as he}from"./handlers/transfer.js";import{handleQuestionOperation as ye,QUESTION_OPERATIONS as _e}from"./handlers/questions.js";import{vendorStatus as we}from"./handlers/vendor-status.js";import{handleMemoryOperation as ve,MEMORY_OPERATIONS as Oe}from"./handlers/memory.js";import{abortOnClose as Re,callerFromApp as ge,handleProviderOperation as Se,PROVIDER_OPERATIONS as be,providerFailure as Ee}from"./handlers/providers.js";function Ne(e){return Object.prototype.hasOwnProperty.call(D,e)?D[e]:void 0}s(Ne,"fixedRow");function Te(e){const n=Ne(e);return n?n.type:e==="stream_gap"||e==="provider_error"||e==="runtime_version_unsupported"?"invalid_request_error":"server_error"}s(Te,"errorType");function Ae(e){if(!e||typeof e!="object"||Array.isArray(e)||!("rate_limit"in e))return e;const{rate_limit:n,...a}=e;return a}s(Ae,"appDetails");function A(e,n,a){const u=Ae(e.details);return{error:{code:e.code,message:e.message,...u===void 0?{}:{details:u},type:Te(e.code),...e.param?{param:e.param}:{},origin:"runtime",retryable:e.retryable||e.code==="stream_dropped",request_id:n,...a?{run_id:a}:{},...e.scope?{scope:e.scope}:{},...e.code==="unauthorized"?{user_action:"reconnect"}:{},...e.code==="all_routes_exhausted"?{retry_after_s:e.details.retry_after_s}:{}}}}s(A,"envelope");function Ie(e,n,a,u){const i=n instanceof d?n:new d(500,"server_failure","runtime request failed");if(n instanceof d||console.error("[app-listener]",n),e.headersSent&&!String(e.getHeader("Content-Type")??"").startsWith("text/event-stream")){e.destroy();return}if(e.headersSent){e.end(`event: error
|
|
2
|
+
data: ${JSON.stringify(A(i,a,u))}
|
|
3
|
+
|
|
4
|
+
`);return}e.writeHead(i.status,{"Content-Type":"application/json; charset=utf-8","Request-Id":a,"X-Content-Type-Options":"nosniff",...i.code==="all_routes_exhausted"?{"Retry-After":String(i.details.retry_after_s)}:{}}),e.end(JSON.stringify(A(i,a,u)))}s(Ie,"fail");function Pe(e){return Array.isArray(e)?e[0]:e}s(Pe,"headerValue");function R(e,n,a){e.writeHead(n,{"Content-Type":"application/json; charset=utf-8"}),e.end(JSON.stringify(a))}s(R,"json");async function T(e,n=ee){const a=[];let u=0;for await(const i of e){if(u+=i.length,u>n)throw new d(400,"invalid_request","request body too large");a.push(i)}if(u)try{return JSON.parse(Buffer.concat(a).toString("utf8"))}catch{throw new d(400,"invalid_request","invalid JSON body")}}s(T,"bodyOf");function Ce(e,n){const a=e.headers["last-event-id"]??n.get("after");if(Array.isArray(a))throw new d(400,"invalid_request","invalid cursor","after");return W(a??null,"after",0,Number.MAX_SAFE_INTEGER,0)}s(Ce,"cursor");function Me(e){return`id: ${e.sequence_number}
|
|
5
|
+
event: ${e.type}
|
|
6
|
+
data: ${JSON.stringify(e)}
|
|
7
|
+
|
|
8
|
+
`}s(Me,"frame");const He=6e4;function ke(e,n,a,u,i,N,w,v={}){P(u,a);let y=J(a,i);if(i>y.latest_sequence)throw new d(400,"invalid_request","cursor is beyond the run","after");if(i<y.latest_sequence&&(y.earliest_sequence===null||i<y.earliest_sequence-1))throw new d(409,"stream_gap","events have expired",void 0,{earliest_sequence:y.earliest_sequence,latest_sequence:y.latest_sequence});if(n.destroyed||e.destroyed)return n.destroy(),Promise.resolve();n.writeHead(200,{"Content-Type":w==="sse"?"text/event-stream":"application/x-ndjson","Cache-Control":"no-cache","X-Accel-Buffering":"no"}),w==="sse"?n.write(`: connected
|
|
9
|
+
|
|
10
|
+
`):n.flushHeaders();let r=i;const t=le().streamOpened(a);let c=!1,_=!1,f=!1,p;const g=new Promise(m=>{p=m}),o=s(()=>{c||(c=!0,t(r),clearInterval(q),clearInterval(H),b(),I(),n.off("close",o),n.off("drain",h),n.end(),p())},"end"),h=s(()=>{f=!1,l()},"onDrain"),E=s(m=>{c||n.write(w==="sse"?`event: error
|
|
11
|
+
data: ${JSON.stringify(A(m,N,a))}
|
|
12
|
+
|
|
13
|
+
`:`${JSON.stringify({type:"error",...A(m,N,a)})}
|
|
14
|
+
`),o()},"error"),l=s(()=>{if(!(c||_)){_=!0;try{if(!O()){S();return}if(P(u,a),y=J(a,r),y.backlog_count>1e3||y.backlog_bytes>32*1024*1024){E(new d(503,"stream_dropped","stream reader fell behind",void 0,{last_sequence:r}));return}for(const m of y.events){if(f)break;f=!n.write(w==="sse"?Me(m):`${JSON.stringify(m)}
|
|
15
|
+
`),r=m.sequence_number}}catch(m){E(m instanceof d?m:new d(500,"server_failure","stream failed"))}finally{_=!1}}},"flush"),S=s(()=>E(new d(401,"grant_revoked","grant is not active")),"revoked"),O=s(()=>"class"in u||se(u.grant)!==null,"grantActive"),b=oe(a,l),I="class"in u?()=>{}:ae(u.grant,S),q=setInterval(()=>{!c&&!f&&w==="sse"&&n.write(`: keepalive
|
|
16
|
+
|
|
17
|
+
`)},15e3),U=v.idleMs??He,X=v.isRunning??ne;let C=Date.now(),M=r;const H=setInterval(()=>{if(c||w!=="sse")return;const m=Date.now();let k=!0;try{k=X(a)}catch{}if(k||r!==M){C=m,M=r;return}m-C<U||f||(n.write(`event: idle
|
|
18
|
+
data: {}
|
|
19
|
+
|
|
20
|
+
`),o())},v.idleCheckMs??1e3);return H.unref(),n.on("drain",h),n.on("close",o),l(),g}s(ke,"streamRunEvents");function ut(e,n,a,u={}){if(!e.issuer||!e.audience||!e.listener?.address||!Number.isInteger(e.listener.port)||e.listener.port<1||e.listener.port>65535)throw new Error("runtime issuer, audience and listener address/port are required");if(["0.0.0.0","::","[::]"].includes(e.listener.address))throw new Error("runtime listener must bind a specific address");const i=new F(e.issuer,e.audience,a,e.jwksUrl),N=new j,w=new Map;for(const r of V.filter(t=>t.stage!==void 0)){const t=s(()=>({status:500}),"handler");N.register({method:r.method,pattern:r.path,handler:t}),w.set(t,r)}const v=$((r,t)=>{(async()=>{re(r,t,u.deferHead);const c=L();t.setHeader("Request-Id",c),t.setHeader(Y,x());let _;try{const f=z(Pe(r.headers[G.toLowerCase()]),x());if(f!==null)throw f.status===400?new d(400,f.code,f.message,f.param):new d(426,f.code,f.message,void 0,f.details);const p=new URL(r.url??"/","http://runtime.local");if(ce(p.pathname)){await de(r,t,p,i);return}if((r.method!=="GET"||p.pathname!=="/v1/health")&&(!i.isReady()||!n()))throw new d(503,"runtime_starting","runtime_starting");const g=N.match(r.method??"GET",p.pathname);if(!g)throw new d(404,"not_found","unknown operation");const o=w.get(g.handler);if(!o)throw new d(404,"not_found","unknown operation");if(_=g.params.run_id,o.name==="health"){R(t,200,{status:"ok",api_version:"2026-09-23"});return}if(o.name==="runtime.sync-notice"){if(!await i.verifySyncNotice(r.headers.authorization)){t.writeHead(204),t.end();return}ue({level:"info",event:"daemon.grants.sync_notice",fields:{request_id:c}});try{await a({fresh:!0})}catch{throw new d(503,"service_unavailable","grant sync failed")}t.writeHead(204),t.end();return}if(o.name==="runtime.vendor-status"){await i.verifyDirectoryRead(r.headers.authorization,"vendor_status"),R(t,200,we());return}const h=await i.resolve(r.headers.authorization,o.scope);if(t.setHeader("Request-Id",c),_&&P(h,_,["run.message","run.interrupt","run.cancel","run.rename","run.delete"].includes(o.name),o.name==="run.delete"),o.stream==="bytes"){await me(r,t,h,p.searchParams);return}if(o.stream){ke(r,t,_,h,Ce(r,p.searchParams),c,"sse",u.stream);return}if(o.name==="llm"){const l=K(await T(r,te)),S=new AbortController,O=s(()=>S.abort(),"abort");t.on("close",O);try{const b=await Z(l,S.signal,l.stream?I=>{t.headersSent||t.writeHead(200,{"Content-Type":"text/event-stream","Cache-Control":"no-cache","X-Accel-Buffering":"no"}),t.write(`data: ${JSON.stringify(I)}
|
|
21
|
+
|
|
22
|
+
`)}:void 0);l.stream?(t.headersSent||t.writeHead(200,{"Content-Type":"text/event-stream","Cache-Control":"no-cache","X-Accel-Buffering":"no"}),t.end(`data: [DONE]
|
|
23
|
+
|
|
24
|
+
`)):R(t,200,b.completion)}finally{t.off("close",O)}return}if(o.name==="profile.list"){R(t,200,fe(h));return}if(_e.has(o.name)){const l=await ye(o.name,h,g.params.question_id,o.method==="POST"?await T(r):void 0);R(t,l.status,l.body);return}if(be.has(o.name)){const{signal:l,release:S}=Re(t);try{const O=await Se(o.name,ge(h),{params:g.params,body:o.method==="POST"?await T(r):void 0,query:p.searchParams},{requestId:c,signal:l});R(t,O.status,O.body)}catch(O){const b=Ee(O,c,!0);t.writeHead(b.status,{"Content-Type":"application/json; charset=utf-8","X-Content-Type-Options":"nosniff",...b.headers}),t.end(JSON.stringify(b.body))}finally{S()}return}if(Oe.has(o.name)){const l=ve(o.name,{class:"app",app:h.grantee,scopes:h.resolved},p.searchParams);R(t,l.status,l.body);return}if(he.has(o.name)){const l=await pe(o,h,g.params,p.searchParams,await T(r));R(t,l.status,l.body);return}const E=await Q(o,h,_,p.searchParams,await T(r),r.headers["idempotency-key"]);R(t,E.status,E.body)}catch(f){Ie(t,f,c,_)}})()});return{ready:new Promise((r,t)=>{v.once("error",t),v.listen(e.listener.port,e.listener.address,()=>{v.off("error",t),r()})}),close:s(async()=>{i.close(),ie(),v.closeAllConnections(),await new Promise((r,t)=>v.close(c=>c?t(c):r()))},"close")}}s(ut,"createAppListener");export{He as RUN_STREAM_IDLE_MS,ut as createAppListener,Ce as cursor,ke as streamRunEvents};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { IncomingMessage } from 'node:http';
|
|
2
|
+
import type { Duplex } from 'node:stream';
|
|
3
|
+
import { type WebSocket } from 'ws';
|
|
4
|
+
/** Keep a RELAYING connection alive across a gap between frames, through common
|
|
5
|
+
* 60s proxy idle limits. A viewer only observes a broker, so a missed heartbeat
|
|
6
|
+
* may close this socket but must never affect the broker or its in-flight work. */
|
|
7
|
+
export declare const REMOTE_ATTACH_HEARTBEAT_MS = 25000;
|
|
8
|
+
/** How long after the last relayed frame the heartbeat keeps pinging. Past this,
|
|
9
|
+
* the attach is carrying nothing — no viewer output, no streaming node — and the
|
|
10
|
+
* heartbeat goes silent so the network path underneath can reap the connection.
|
|
11
|
+
*
|
|
12
|
+
* This matters far beyond a socket: on a hosted guest (Blaxel) a connection that
|
|
13
|
+
* is pinged every 25s is never idle, so the host never suspends the sandbox. An
|
|
14
|
+
* unconditional heartbeat held whole fleets awake for 15h at a time. A drop on a
|
|
15
|
+
* quiet attach is a normal close the remote peer re-attaches from, and real work
|
|
16
|
+
* is anchored by its own keep-alive, not by this ping.
|
|
17
|
+
*
|
|
18
|
+
* The clock starts when the attach OPENS, not at its first relayed frame: a
|
|
19
|
+
* never-relaying attach still gets pings until this window elapses. The welcome
|
|
20
|
+
* frame lands in milliseconds, so this only pads the tail of the very first
|
|
21
|
+
* window.
|
|
22
|
+
*
|
|
23
|
+
* ROLLOUT ORDER — this half is only half the answer, and shipping it FIRST is
|
|
24
|
+
* strictly worse than shipping nothing. The host that owns the attach must also
|
|
25
|
+
* let go of a quiet one; crouter cloud does that at its own 60s quiesce
|
|
26
|
+
* (`CROUTER_FOLLOW_QUIESCE_MS`). Against a host that holds the attach forever,
|
|
27
|
+
* going quiet here only moves the drop to the network path, the host reports a
|
|
28
|
+
* detach, its client reconnects, and the box wakes again — the same pin, now
|
|
29
|
+
* with a full re-snapshot every couple of minutes. Ship the host's quiesce
|
|
30
|
+
* first, then roll the guest image. */
|
|
31
|
+
export declare const REMOTE_ATTACH_QUIET_MS = 60000;
|
|
32
|
+
export interface RemoteAttachHeartbeat {
|
|
33
|
+
/** Stop the heartbeat permanently (teardown). Idempotent. */
|
|
34
|
+
stop: () => void;
|
|
35
|
+
/** Record a relayed frame in either direction — this is what keeps the
|
|
36
|
+
* heartbeat armed, and what re-arms it after a quiet stretch. */
|
|
37
|
+
noteActivity: () => void;
|
|
38
|
+
}
|
|
39
|
+
export declare function startRemoteAttachHeartbeat(ws: WebSocket, intervalMs?: number, quietMs?: number): RemoteAttachHeartbeat;
|
|
40
|
+
/** Refuse an upgrade PRE-handshake: write a plain HTTP error (uniform API
|
|
41
|
+
* `ErrorBody`, spec §8) to the raw socket and destroy it. Never throws — a
|
|
42
|
+
* reset peer is swallowed. Shared with server.ts's auth and startup gates. */
|
|
43
|
+
export declare function refuseUpgrade(socket: Duplex, status: number, statusText: string, code: string, message: string): void;
|
|
44
|
+
/** Handle the HTTP upgrade for `GET /v1/nodes/{id}/attach`. A-9 matches the
|
|
45
|
+
* route, extracts `{id}`, and calls this with the raw upgrade triplet; this
|
|
46
|
+
* owns the WS handshake (its own noServer `wss` above) AND the spec §5.3
|
|
47
|
+
* attach-implies-revive semantics. Never throws — every failure path either
|
|
48
|
+
* refuses the upgrade (plain HTTP error + socket destroy) or, post-handshake,
|
|
49
|
+
* closes the WS with a code. So A-9's upgrade router needs no try/catch around
|
|
50
|
+
* this call beyond its own top-level safety net.
|
|
51
|
+
*
|
|
52
|
+
* Flow:
|
|
53
|
+
* 1. Guard `isSafeNodeId` (→ 400) and existence (→ 404) BEFORE building any
|
|
54
|
+
* fs path or reviving — an unsafe id must never reach `viewSocketPath`.
|
|
55
|
+
* 2. Unless revive is opted out (`?revive=0` / `X-Crtr-Attach-Revive: 0`):
|
|
56
|
+
* `decideAttachRevive(id, { resume:true }, wakeParked)` then
|
|
57
|
+
* `waitForBrokerViewSocket` (bounded). Revive throw OR socket-not-listenable
|
|
58
|
+
* → refuse 409, WS never opens. Without `?wakeParked=1` an exact parked
|
|
59
|
+
* resident is left parked and refused 409 `node_dormant` — see the call site.
|
|
60
|
+
* 3. Revive opted out: a single connect probe. Dormant (socket refuses) →
|
|
61
|
+
* refuse 409 (spec §5.3 asymmetry: a dead broker can't stream over WS).
|
|
62
|
+
* 4. Only then upgrade and hand the live WS to {@link bridgeConnection}. */
|
|
63
|
+
export declare function handleAttachUpgrade(req: IncomingMessage, socket: Duplex, head: Buffer, nodeId: string): Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var E=Object.defineProperty;var s=(t,e)=>E(t,"name",{value:e,configurable:!0});import{WebSocketServer as $}from"ws";import{isSafeNodeId as A}from"../../core/canvas/paths.js";import{getNode as S}from"../../core/canvas/index.js";import{BROKER_READ_CAPS as R,CLIENT_READ_CAPS as T,FrameDecoder as B,FrameOverflowError as x}from"../../core/runtime/broker-protocol.js";import{classify as k}from"../../core/fault-classifier.js";import{clearFault as p,recordFault as g}from"../../core/canvas/recovery.js";import{decideAttachRevive as C}from"../../core/runtime/revive.js";import{connectViewSocket as N,probeViewSocket as O,waitForBrokerViewSocket as P}from"../../core/runtime/view-socket.js";import{isBeneathRefusal as F}from"../../core/spaces/open-beneath.js";import{attachViewer as _,detachViewer as U}from"./viewer-presence.js";const D=new $({noServer:!0,maxPayload:R.maxLineBytes}),L=25e3,H=6e4;function V(t,e=L,i=H){let o=!0,n=!1,a=Date.now();const f=s(()=>{o=!0},"acknowledge"),m=s(()=>{n||(n=!0,clearInterval(h),t.off("pong",f))},"stop");t.on("pong",f);const h=setInterval(()=>{if(Date.now()-a>i){o=!0;return}if(!o){m(),t.terminate();return}o=!1;try{t.ping()}catch{m(),t.terminate()}},e);return h.unref(),{stop:m,noteActivity:s(()=>{a=Date.now()},"noteActivity")}}s(V,"startRemoteAttachHeartbeat");function b(t){const e=Buffer.from(t,"utf8");return e.byteLength<=123?t:e.subarray(0,123).toString("utf8")}s(b,"clampReason");function u(t,e,i,o,n){const a=JSON.stringify({error:{code:o,message:n}}),f=`HTTP/1.1 ${e} ${i}\r
|
|
2
|
+
content-type: application/json; charset=utf-8\r
|
|
3
|
+
content-length: ${Buffer.byteLength(a)}\r
|
|
4
|
+
connection: close\r
|
|
5
|
+
\r
|
|
6
|
+
`+a;try{t.end(f)}catch{try{t.destroy()}catch{}}}s(u,"refuseUpgrade");function M(t){if(new URL(t.url??"/","http://127.0.0.1").searchParams.get("revive")==="0")return!0;const i=t.headers["x-crtr-attach-revive"];return(Array.isArray(i)?i[0]:i)==="0"}s(M,"reviveOptedOut");function J(t){return new URL(t.url??"/","http://127.0.0.1").searchParams.get("wakeParked")==="1"}s(J,"wakeParkedRequested");function W(t,e){if(!A(e)){try{t.close(1008,b(`invalid node id: ${e}`))}catch{}return}if(S(e)===null){try{t.close(1011,b(`no node ${e}`))}catch{}return}p(e,{link:"viewer\u2194crtrd"});const i=N(e),o=new B(T);let n=!1,a=!1,f,m=!1,h=!1,v=!1;i.on("connect",()=>{m=!0,!n&&v&&_(e,t),p(e,{link:"relay\u2194broker"})});const y=s((r,l)=>{if(!n){if(n=!0,U(e,t),f?.stop(),!i.destroyed)try{i.destroy()}catch{}try{t.close(r,b(l))}catch{}}},"teardown");f=V(t),i.on("data",r=>{f?.noteActivity();let l;try{l=o.push(r)}catch(c){const d=c instanceof x?`broker sent an oversized frame (${c.message})`:`failed to decode a broker frame for ${e}`;y(1009,d);return}for(const c of l)t.readyState===t.OPEN&&t.send(JSON.stringify(c))}),i.on("error",r=>{const l=k("relay\u2194broker",r);g(e,{link:"relay\u2194broker",op:"bridge socket",kind:l.kind,retry:{disposition:"manual"},message:r.message});const c=r.code==="ECONNREFUSED"||r.code==="ENOENT"?`no running broker for ${e}`:`view socket error for ${e}: ${r.message}`;y(1011,c)}),i.on("close",r=>{n||r||(p(e,{link:"relay\u2194broker"}),y(1e3,"broker socket closed"))}),t.on("close",(r,l)=>{const c=l.toString("utf8");if(n){r===1e3&&p(e,{link:"viewer\u2194crtrd"});return}if(r===1e3)p(e,{link:"viewer\u2194crtrd"});else if(!a){a=!0;const d=k("viewer\u2194crtrd",{code:r,reason:c});g(e,{link:"viewer\u2194crtrd",op:"remote attach websocket",kind:d.kind,retry:{disposition:"auto"},message:c||`remote attach closed (${r})`})}y(r,c||`remote attach closed (${r})`)}),t.on("error",()=>{if(!a){a=!0;const r=k("viewer\u2194crtrd",{code:1006,reason:"remote attach websocket error"});g(e,{link:"viewer\u2194crtrd",op:"remote attach websocket",kind:r.kind,retry:{disposition:"auto"},message:"remote attach websocket error"})}y(1011,"remote attach websocket error")}),t.on("message",r=>{if(n||i.destroyed)return;f?.noteActivity();const c=(Array.isArray(r)?Buffer.concat(r):Buffer.isBuffer(r)?r:Buffer.from(new Uint8Array(r))).toString("utf8");if(!h)try{const w=JSON.parse(c);w?.type==="hello"&&(h=!0,v=w.attends!==!1,v&&m&&_(e,t))}catch{}const d=c.endsWith(`
|
|
7
|
+
`)?c:c+`
|
|
8
|
+
`;try{i.write(d)}catch{}})}s(W,"bridgeConnection");async function te(t,e,i,o){e.on("error",()=>{});try{if(!A(o)){u(e,400,"Bad Request","invalid_node_id",`invalid node id: ${o}`);return}if(S(o)===null){u(e,404,"Not Found","node_not_found",`no node ${o}`);return}if(M(t)){if(!await O(o,250)){u(e,409,"Conflict","node_dormant",`node ${o} is dormant and revive was opted out (?revive=0)`);return}}else{let n;try{const a=await C(o,{resume:!0,capacity:"refuse"},J(t));if(a.parked){u(e,409,"Conflict","node_dormant",`node ${o} is parked; attach with ?wakeParked=1 to wake it`);return}n=a.result.launch?.exited}catch(a){const f=a instanceof Error?a.message:String(a);u(e,409,"Conflict","attach_revive_failed",`attach revive failed: ${f}`);return}if(!await P(o,n)){u(e,409,"Conflict","broker_not_ready",`broker view socket for ${o} did not become listenable after revive`);return}}if(e.destroyed)return;D.handleUpgrade(t,e,i,n=>W(n,o))}catch(n){const a=n instanceof Error?n.message:String(n);if(F(n)){u(e,400,"Bad Request","invalid_request",a);return}u(e,500,"Internal Server Error","internal",`attach upgrade failed: ${a}`)}}s(te,"handleAttachUpgrade");export{L as REMOTE_ATTACH_HEARTBEAT_MS,H as REMOTE_ATTACH_QUIET_MS,te as handleAttachUpgrade,u as refuseUpgrade,V as startRemoteAttachHeartbeat};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
+
export declare const DEFER_HEAD_REQUEST_HEADER = "crtr-defer-head";
|
|
3
|
+
export declare const DEFERRED_HEAD_CONTENT_TYPE = "application/vnd.crtr.deferred-head";
|
|
4
|
+
export declare const DEFERRED_HEAD_MAGIC = "crtr-deferred-head/1\n";
|
|
5
|
+
export declare const DEFER_HEAD_AFTER_MS = 40000;
|
|
6
|
+
export declare const DEFER_HEAD_KEEPALIVE_MS = 15000;
|
|
7
|
+
export interface DeferHeadOptions {
|
|
8
|
+
afterMs?: number;
|
|
9
|
+
keepaliveMs?: number;
|
|
10
|
+
}
|
|
11
|
+
/** Whether this request asked for a deferred head. */
|
|
12
|
+
export declare function wantsDeferredHead(req: IncomingMessage): boolean;
|
|
13
|
+
/** Arm the wrapper on `res`. A no-op unless the request carries `Crtr-Defer-Head: 1`. */
|
|
14
|
+
export declare function deferHead(req: IncomingMessage, res: ServerResponse, options?: DeferHeadOptions): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var m=Object.defineProperty;var a=(s,e)=>m(s,"name",{value:e,configurable:!0});const h="crtr-defer-head",v="application/vnd.crtr.deferred-head",y=`crtr-deferred-head/1
|
|
2
|
+
`,b=4e4,M=15e3;function C(s){const e=s.headers[h];return(Array.isArray(e)?e[0]:e)?.trim()==="1"}a(C,"wantsDeferredHead");function R(s){const e={};for(const[l,c]of s)c!==void 0&&(e[l]=Array.isArray(c)?c.map(String):String(c));return e}a(R,"stringified");function F(s,e,l={}){if(!C(s))return;const c=l.afterMs??4e4,p=l.keepaliveMs??15e3,u={writeHead:e.writeHead.bind(e),write:e.write.bind(e),end:e.end.bind(e)};let r=null,H=!1,i;const w=a(()=>{clearTimeout(A),i!==void 0&&clearInterval(i),i=void 0},"stop"),A=setTimeout(()=>{e.headersSent||e.writableEnded||e.destroyed||D()},c);e.once("close",w),e.once("finish",w);function D(){const n=e.statusCode,t=new Map;for(const[o,f]of Object.entries(e.getHeaders()))f!==void 0&&t.set(o,f);for(const o of["content-length","transfer-encoding","content-type","content-encoding"])e.removeHeader(o);u.writeHead(200,{"Content-Type":v}),u.write(y),e.statusCode=n,r=t,i=setInterval(()=>{!H&&!e.destroyed&&u.write(`
|
|
3
|
+
`)},p),i.unref(),g()}a(D,"commit");function g(){const n=e;Object.defineProperty(e,"headersSent",{configurable:!0,get:a(()=>H,"get")}),n.setHeader=(t,o)=>(r.set(t.toLowerCase(),o),e),n.getHeader=t=>r.get(t.toLowerCase()),n.getHeaders=()=>Object.fromEntries(r),n.getHeaderNames=()=>[...r.keys()],n.hasHeader=t=>r.has(t.toLowerCase()),n.removeHeader=t=>{r.delete(t.toLowerCase())},n.flushHeaders=()=>{},n.writeHead=(t,...o)=>{const f=o.find(d=>d!==null&&typeof d=="object");if(Array.isArray(f)){const d=f;for(let E=0;E+1<d.length;E+=2)r.set(String(d[E]).toLowerCase(),d[E+1])}else if(f)for(const[d,E]of Object.entries(f))r.set(d.toLowerCase(),E);return e.statusCode=t,_(),e},n.write=(t,...o)=>(_(),u.write(t,...o)),n.end=(...t)=>(_(),u.end(...t))}a(g,"present");function _(){H||(H=!0,i!==void 0&&clearInterval(i),i=void 0,u.write(`${JSON.stringify({status:e.statusCode,headers:R(r)})}
|
|
4
|
+
`))}a(_,"sendHead")}a(F,"deferHead");export{v as DEFERRED_HEAD_CONTENT_TYPE,y as DEFERRED_HEAD_MAGIC,b as DEFER_HEAD_AFTER_MS,M as DEFER_HEAD_KEEPALIVE_MS,h as DEFER_HEAD_REQUEST_HEADER,F as deferHead,C as wantsDeferredHead};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var y=Object.defineProperty;var n=(e,o)=>y(e,"name",{value:o,configurable:!0});import{prepared as l}from"../../../core/sqlite-statements.js";import{listNodes as h}from"../../../core/canvas/canvas.js";import{openDb as m}from"../../../core/canvas/db.js";import{listMemoryReads as g,memoryReadsStartedAt as b}from"../../../core/canvas/memory-reads.js";import{usage as a}from"../../../core/errors.js";import{computeAnalytics as R,WINDOW_MS as S}from"../../analytics/compute.js";import{scanResponses as O}from"../../analytics/scan.js";import{canReadNode as E}from"../router.js";const M=new Set(["as_of","window","project"]);async function N(e){for(const[t]of e.query)if(!M.has(t))throw a(`unknown analytics query parameter: ${t}`);const o=e.query.get("as_of")??"",i=Date.parse(o);if(!Number.isFinite(i))throw a(`as_of must be an ISO 8601 time, got "${o}"`);const r=e.query.get("window")??"";if(!Object.hasOwn(S,r))throw a(`window must be 24h or 7d, got "${r}"`);const d=e.query.get("project");if(d==="")throw a("project must be a non-empty directory path when given");const s=new Map,f=l(m(),"SELECT node_id, transcript_path FROM sessions WHERE transcript_path IS NOT NULL").all();for(const t of f)s.set(t.node_id,(s.get(t.node_id)??new Set).add(t.transcript_path));const w=new Map(l(m(),"SELECT node_id, title FROM node_rows WHERE title IS NOT NULL").all().map(t=>[t.node_id,t.title])),c=e.principal,u=h().filter(t=>t.kind!=="human"&&(c.class==="person"||E(c,t.grantee??"app:terminal",t.node_id))).map(t=>({node_id:t.node_id,name:t.name,title:w.get(t.node_id)??null,kind:t.kind,parent:t.parent??null,cwd:t.cwd,created:t.created,finalized_at:t.finalized_at??null,final_report:t.final_report??null,lifecycle:t.lifecycle,transcripts:[...s.get(t.node_id)??[]]})),p=new AbortController;return e.res.once("close",()=>p.abort()),{status:200,body:await R({asOfMs:i,window:r,project:d??null,agents:u,scan:n(t=>O(t,p.signal),"scan"),memory:n((t,_)=>({rows:g(t,_),startedAt:b()}),"memory")})}}n(N,"handleAnalytics");const D=[{method:"GET",pattern:"/v1/canvas/analytics",handler:N}];export{D as analyticsRoutes};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AppPrincipal } from '../principal.js';
|
|
2
|
+
/** `profile.list` for an app caller (daemon-operations §profile.list): the
|
|
3
|
+
* caller's app's profiles, and each profile of another app B that its resolved
|
|
4
|
+
* scope set covers with `crtr:memory:rw:app:<B>:profile:<id>` (which
|
|
5
|
+
* `crtr:memory:rw:app:<B>` covers) — the visibility of the owner socket's
|
|
6
|
+
* `GET /v1/profiles` for an app. `default` marks the caller's own default
|
|
7
|
+
* profile. Creates, changes, and selects nothing beyond that default profile,
|
|
8
|
+
* which `run.start` without `profile` would create the same way. */
|
|
9
|
+
export declare function listAppProfiles(caller: AppPrincipal): {
|
|
10
|
+
profiles: Array<{
|
|
11
|
+
profile_id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
grantee: string;
|
|
14
|
+
default_kind: string;
|
|
15
|
+
default: boolean;
|
|
16
|
+
}>;
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var s=Object.defineProperty;var t=(r,o)=>s(r,"name",{value:o,configurable:!0});import{covers as m}from"@north-light/identity";import{ensureAppProfile as a,listProfiles as l}from"../../../core/profiles/manifest.js";import{resolveRunKind as d}from"../../../core/runtime/launch-target.js";function P(r){const o=a(r.grantee).profileId;return{profiles:l().filter(({profileId:e,manifest:p})=>{const i=p.grantee??"app:terminal";if(i===r.grantee)return!0;const n=`crtr:memory:rw:${i}:profile:${e}`;return r.resolved.some(f=>m(f,n))}).map(e=>({profile_id:e.profileId,name:e.manifest.name,grantee:e.manifest.grantee??"app:terminal",default_kind:d(e),default:e.profileId===o}))}}t(P,"listAppProfiles");export{P as listAppProfiles};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var c=Object.defineProperty;var i=(t,e)=>c(t,"name",{value:e,configurable:!0});import{getNode as m}from"../../../core/canvas/canvas.js";import{decideAttachRevive as k}from"../../../core/runtime/revive.js";import{viewSocketPath as l}from"../../../core/canvas/paths.js";import{waitForBrokerViewSocket as v}from"../../../core/runtime/placement-tmux.js";import{notFound as p,usage as n}from"../../../core/errors.js";import{ownerOnly as w}from"../router.js";function h(t){if(t==null)return{resume:!0,revive:!0,wakeParked:!0};if(typeof t!="object")throw n("attach body must be a JSON object { resume?, revive?, wakeParked? }");const e=t.resume,r=t.revive,o=t.wakeParked;if(e!==void 0&&typeof e!="boolean")throw n("resume must be a boolean");if(r!==void 0&&typeof r!="boolean")throw n("revive must be a boolean");if(o!==void 0&&typeof o!="boolean")throw n("wakeParked must be a boolean");return{resume:e??!0,revive:r??!0,wakeParked:o??!0}}i(h,"parseAttachBody");async function b(t){const e=t.params.id;if(m(e)===null)throw p(`unknown node: ${e}`,{received:e});const{resume:r,revive:o,wakeParked:f}=h(t.body);let u=!1,d=!1,s=!1;if(o){const a=await k(e,{resume:r,capacity:"refuse"},f);s=a.parked,a.parked||(u=a.result.launch!==void 0,d=a.result.resumed,await v(e))}return{status:200,body:{node_id:e,socket_path:l(e),revived:u,resumed:d,parked:s}}}i(b,"handleAttach");const F=w([{method:"POST",pattern:"/v1/nodes/:id/attach",handler:b}]);export{F as attachRoutes};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var S=Object.defineProperty;var h=(e,o)=>S(e,"name",{value:o,configurable:!0});import{killBashJobObject as B,recordBashJobObject as E}from"../../../core/spaces/stop.js";import{readerFor as J}from"../reader.js";import{join as P}from"node:path";import{createFileBeneath as m,existsBeneath as w,unlinkBeneath as $}from"../../../core/spaces/open-beneath.js";import{launchAppProcess as A,appProcessSandboxed as q}from"../../../core/spaces/process.js";import{BASH_JOB_SUPERVISOR_SCRIPT as O}from"../../../core/bash-job-supervisor.js";import{resolveAdmittedHostCommand as N}from"../../../core/runtime/spawn-env.js";import{requireCurrentExecution as _}from"./broker-recovery.js";import{isSafeNodeId as L}from"../../../core/canvas/paths.js";import{contextDir as y}from"../../../core/canvas/node-agent-paths.js";import{getNode as j}from"../../../core/canvas/canvas.js";import{isBrokerLive as T}from"../../../core/runtime/model-swap.js";import{assertNotFinalized as D}from"../../../core/runtime/reopen.js";import{reviveNode as R}from"../../../core/runtime/revive.js";import{activeBackgroundBashJobs as C,bashJobPaths as v,isBashJobProcessGroupAlive as z,readJobPgid as F,readJobPgidIdentity as M,isSafeBashJobId as I,readBashNiceness as G,stopBackgroundBashJob as H}from"../../../core/bash-jobs.js";import{ApiError as i}from"../../../api/index.js";import{notFound as Z}from"../../../core/errors.js";import{freshChildNodeExecPath as U}from"../../../core/runtime/branded-host.js";function f(e){const o=e.params.id;if(o===void 0||!L(o))throw new i(400,"invalid_node_id",`invalid node id: ${JSON.stringify(o)}`);if(j(o)===null)throw Z(`unknown node: ${o}`,{received:o});const d=e.params.jobId;if(d!==void 0){if(!I(d))throw new i(400,"invalid_job_id",`invalid background job id: ${JSON.stringify(d)}`);return{nodeId:o,jobId:d,dir:y(o)}}return{nodeId:o,dir:y(o)}}h(f,"requireTarget");async function V(e){const{nodeId:o,dir:t}=f(e);if(e.principal.class!=="broker"||e.principal.node!==o)throw new i(403,"permission_error","only this node\u2019s broker may start a job");const d=e.body;if(!d||typeof d!="object"||Array.isArray(d))throw new i(400,"invalid_request","job.start requires a JSON body");const s=d;_(o,s.expected_execution_id);const r=s.job_id,a=s.cwd,u=s.env;if(typeof r!="string"||!I(r)||typeof a!="string"||!u||typeof u!="object"||Array.isArray(u)||Object.entries(u).some(([c,b])=>!/^[A-Za-z_][A-Za-z0-9_]*$/.test(c)||typeof b!="string"))throw new i(400,"invalid_request","invalid job id, cwd or environment");if(!q())throw new i(400,"invalid_request","job.start is only used with the root launcher");const n=v(t,r);if(![n.jobRun,n.cmdSh,n.jobLog].every(c=>w(n.root,c)))throw new i(404,"job_not_found","job was not prepared by this node");const p=P(n.dir,"job.starting");try{m(n.root,p,"")}catch(c){throw c.code==="EEXIST"?new i(409,"job_already_started","job was already started"):c}let l;try{const c=u,b=N("bash",c,a),g=j(o),k=await U();return l=await A({nodeId:o,app:g.grantee??"app:terminal",isolated:g.isolated,cwd:a,env:c,capture:!1,command:[b,"-c",O,"--",n.cmdSh,n.jobLog,n.jobExit,n.jobRun,n.jobDone,b,String(G(t)),k]}),m(n.root,n.jobPgid,String(l.pid),384),m(n.root,n.jobPgidIdentity,`launcher:${l.pid}`,384),{status:201,body:{pid:l.pid}}}catch(c){if(l!==void 0)try{await l.stop()}catch(b){throw new AggregateError([c,b],`job ${r} launched but could not be recorded or stopped`)}try{$(n.root,p)}catch(b){if(b.code!=="ENOENT")throw b}throw c}}h(V,"handleStart");function X(e){const{nodeId:o,dir:t}=f(e),d=Date.now();return{status:200,body:C(t).map(r=>{const a=F(t,r.jobId)??null;return{job_id:r.jobId,command:r.command,purpose:r.purpose,started_at:new Date(r.startedAtMs).toISOString(),elapsed_ms:Math.max(0,d-r.startedAtMs),pgid:a,pgid_alive:a!==null&&z(a,M(t,r.jobId))}})}}h(X,"handleList");async function x(e){const{nodeId:o,jobId:t,dir:d}=f(e);if(t===void 0)throw new i(400,"invalid_request","a job id is required");const s=e.query.get("foreground")==="1";if(s){if(e.principal.class!=="broker"||e.principal.node!==o)throw new i(403,"permission_error","only this node\u2019s broker may abort its foreground job");_(o,e.body?.expected_execution_id)}const r=await H(d,t,s,o);if(r.kind==="missing")throw new i(404,"job_not_found",`no background job ${t} for ${o}`);if(r.kind==="retired")throw new i(404,"job_not_found",`background job ${t} for ${o} is no longer running`,{log_path:r.logPath});if(r.kind==="not-stoppable")throw new i(409,"job_not_stoppable",`job ${t} recorded no trusted process identity`,{log_path:r.logPath});if(s)return{status:200,body:{node_id:o,job_id:t,signaled:r.signaled}};D(o),B(t,n=>{const p=J(n,e);return p.class==="person"?p.person:p.class==="app"?p.app:p.node});const a=j(o);if(a!==null&&!T(a))try{await R(o,{resume:!0,capacity:"freeze"})}catch{}return{status:200,body:{node_id:o,job_id:t,signaled:r.signaled}}}h(x,"handleStop");function K(e){const{nodeId:o,jobId:t,dir:d}=f(e);if(t===void 0)throw new i(400,"invalid_request","a job id is required");if(e.principal.class!=="broker"||e.principal.node!==o)throw new i(403,"permission_error","only this node\u2019s broker may record its job");const s=e.body,r=v(d,t);if(typeof s?.command!="string"||s.job_dir!==r.dir||s.log_path!==r.jobLog)throw new i(400,"invalid_request",`job.background requires command, job_dir ${r.dir} and log_path ${r.jobLog}`);if(!w(r.root,r.jobBg))throw new i(404,"job_not_found",`job ${t} of ${o} is not backgrounded`);const a=s.command;return{status:201,body:{id:E(o,t,{command:a,jobDir:r.dir,logPath:r.jobLog}).id}}}h(K,"handleBackground");const jo=[{method:"POST",pattern:"/v1/nodes/:id/jobs/:jobId/background",handler:K},{method:"POST",pattern:"/v1/nodes/:id/jobs/start",handler:V},{method:"GET",pattern:"/v1/nodes/:id/jobs",handler:X},{method:"DELETE",pattern:"/v1/nodes/:id/jobs/:jobId",handler:x}];export{jo as bashJobRoutes};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var m=Object.defineProperty;var p=(o,t)=>m(o,"name",{value:t,configurable:!0});import{statSync as u}from"node:fs";import{isAbsolute as l}from"node:path";import{ApiError as d}from"../../../api/index.js";import{buildOperationalEnvBase as f}from"../../../core/runtime/spawn-env.js";import{runAppCommand as w}from"../../../core/runtime/run-command.js";import{getNode as _}from"../../../core/canvas/canvas.js";import{readProfileEnvVars as b}from"../../../core/profiles/env-store.js";import{readAppEnvVars as y}from"../../../core/profiles/app-env-store.js";import{usage as i}from"../../../core/errors.js";const h=60,c=600,T=256*1024;function E(o){if(typeof o!="object"||o===null||Array.isArray(o))throw i("bash requires an object body");const t=o;if(typeof t.command!="string"||t.command==="")throw i("bash requires a non-empty `command`");if(typeof t.cwd!="string"||!l(t.cwd))throw new d(404,"cwd_not_found","cwd must name an absolute directory");try{if(!u(t.cwd).isDirectory())throw new Error("not a directory")}catch{throw new d(404,"cwd_not_found",`cwd not found: ${t.cwd}`)}const r=t.timeout_s??h;if(typeof r!="number"||!Number.isFinite(r)||r<=0||r>c)throw new d(422,"invalid_timeout",`timeout_s must be greater than 0 and at most ${c}`);if(t.profile!==void 0&&typeof t.profile!="string")throw i("profile must be a string");let n;if(t.env!==void 0){if(typeof t.env!="object"||t.env===null||Array.isArray(t.env))throw i("env must be an object of string values");n={};for(const[s,a]of Object.entries(t.env)){if(typeof a!="string")throw i("env must be an object of string values");n[s]=a}}return{command:t.command,cwd:t.cwd,timeout_s:r,env:n,profile:t.profile}}p(E,"parseRequest");async function A(o){const t=E(o.body),r=o.principal.class==="person"?"app:terminal":o.principal.app;if(r!=="app:terminal"&&t.profile!==void 0)throw new d(403,"permission_error","app bash cannot select an owner profile");const n=r==="app:terminal"?t.profile??null:null,s=f({targetCwd:t.cwd,targetProfileId:n,skipSpawnAllow:r!=="app:terminal"}),a={...s,...y(r),...r==="app:terminal"?b(n):{},...t.env,...n===null?{}:{CRTR_PROFILE_ID:n},CRTR_ADMITTED_HOST_PATH:s.CRTR_ADMITTED_HOST_PATH},e=await(await w({app:r,...o.principal.class==="broker"?{nodeId:o.principal.node,isolated:_(o.principal.node)?.isolated===!0}:{},command:t.command,cwd:t.cwd,env:a,timeoutMs:t.timeout_s*1e3,headBytes:T})).completion;if(e.processError!==null)throw e.processError;return{status:200,body:{exit_code:e.timedOut?null:e.exitCode,signal:e.signal,stdout:e.stdout,stdout_truncated:e.stdoutTruncated,stderr:e.stderr,stderr_truncated:e.stderrTruncated,timed_out:e.timedOut,duration_ms:e.durationMs}}}p(A,"handleBash");const H=[{method:"POST",pattern:"/v1/bash",scope:"crtr:act",handler:A}];export{H as bashRoutes};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BrokerExtensionNodeDTO } from '../../../api/dto/broker-ops.js';
|
|
2
|
+
import { getNode } from '../../../core/canvas/canvas.js';
|
|
3
|
+
import { type RouteTable } from '../router.js';
|
|
4
|
+
export declare function extensionNode(node: NonNullable<ReturnType<typeof getNode>>): BrokerExtensionNodeDTO;
|
|
5
|
+
export declare const brokerOperationRoutes: RouteTable;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var A=Object.defineProperty;var i=(e,t)=>A(e,"name",{value:t,configurable:!0});import{canonicalSessionFile as F,findNodeBySessionFile as O,getNode as y,isWarmSpare as R,listNodeIdentities as T,recordRespawnAttempt as I,recordSettledTurn as $,setPresence as b,subscriptionsOf as j,updateNode as g,updateNodeTelemetry as C}from"../../../core/canvas/canvas.js";import{recordExecutionPid as q}from"../../../core/canvas/executions.js";import{bindSession as E,readLiveSession as M,transferSession as L}from"../../../core/canvas/sessions.js";import{isSafeNodeId as D}from"../../../core/canvas/paths.js";import{appForNode as G}from"../../../core/canvas/node-agent-paths.js";import{isPidAlive as J}from"../../../core/canvas/pid.js";import{editorLabel as P}from"../../../core/canvas/labels.js";import{assembleNodeSubject as W}from"../../../core/substrate/subject.js";import{withCanvasWrite as l}from"../../../core/canvas/db.js";import{notFound as v,usage as a}from"../../../core/errors.js";import{hasUnseenWakeMail as N}from"../../../core/canvas/deliveries.js";import{clearYieldMessage as U}from"../../../core/runtime/kickoff.js";import{readRoadmap as V}from"../../../core/runtime/roadmap.js";import{forkSourceNode as Y}from"../../../core/runtime/nodes.js";import{transition as _}from"../../../core/runtime/lifecycle.js";import{focusOf as k,tearDownNode as x}from"../../../core/runtime/placement.js";import{hasAttachedBrokerViewers as z}from"../viewer-presence.js";import{evaluateStop as H}from"../../../core/runtime/stop-guard.js";import{clearFault as h,recordFault as K}from"../../../core/canvas/recovery.js";import{updateModelRecipe as Q}from"../../../core/runtime/model-swap.js";import{completeCompanionRequestedSubmit as X}from"../../review/finish.js";import{emitEvent as Z}from"../../../core/events/emit.js";import{consumePendingPark as ee,recordPendingParkActivity as te}from"../../park-pending.js";import{shouldParkAfterSummary as ne}from"../../park-activity.js";import{ownerOnly as oe}from"../router.js";import{requireCurrentExecution as m}from"./broker-recovery.js";import{ensureRunObserver as re}from"../../runs/observer.js";import{parseNodeTelemetryRecord as ie,writeNodeTelemetryRecord as se}from"./telemetry-record.js";function p(e,t){if(typeof e!="object"||e===null||Array.isArray(e))throw a(`${t} requires a JSON body`);return e}i(p,"objectBody");function ae(e){const t=p(e,"broker session-bound");if(typeof t.executionId!="string"||t.executionId==="")throw a("executionId must be a non-empty string");if(typeof t.piSessionId!="string"||t.piSessionId==="")throw a("piSessionId must be a non-empty string");if(t.sessionFile!==null&&typeof t.sessionFile!="string")throw a("sessionFile must be a string or null");if(!Number.isSafeInteger(t.pid)||t.pid<=0)throw a("pid must be a positive safe integer");if(t.reason!==null&&typeof t.reason!="string")throw a("reason must be a string or null");if(!Array.isArray(t.reviewBoundaryIds)||!t.reviewBoundaryIds.every(n=>typeof n=="string"))throw a("reviewBoundaryIds must be an array of strings");return t}i(ae,"parseSessionBoundBody");function de(e){const t=p(e,"broker settle");if(typeof t.stopReason!="string")throw a("stopReason must be a string");for(const n of["backgroundJobsRunning","pushedFinal"])if(typeof t[n]!="boolean")throw a(`${n} must be a boolean`);return t}i(de,"parseSettleBody");function ue(e){const t=p(e,"broker park-complete");if(t.outcome!=="completed"&&t.outcome!=="failed")throw a("outcome must be completed or failed");return t}i(ue,"parseParkCompleteBody");function ce(e){const t=p(e,"broker telemetry");if(typeof t.expected_execution_id!="string"||t.expected_execution_id==="")throw a("expected_execution_id must be a non-empty string");const n=ie(t);return{...n,expected_execution_id:t.expected_execution_id,updated_at:new Date(n.updated_at).toISOString()}}i(ce,"parseTelemetryBody");function le(e){const t=p(e,"broker model");if(typeof t.spec!="string"||t.spec.trim()==="")throw a("spec must be a non-empty string");const n=t.intent;if(n!==void 0){const r=n!==null&&typeof n=="object"?n:void 0;if(r===void 0||typeof r.family!="string"||r.family===""||!["ultra","strong","medium","light"].includes(r.strength))throw a("intent must be { family, strength } with strength ultra|strong|medium|light when present")}if(typeof t.userSelected!="boolean")throw a("userSelected must be a boolean");return t}i(le,"parseModelCommitBody");function f(e){const t=y(e);if(t===null)throw v(`unknown node: ${e}`,{received:e});return t}i(f,"requireNode");function w(e){return{node_id:e.node_id,grantee:G(e.node_id),name:e.name,...e.description===void 0?{}:{description:e.description},...e.title===void 0?{}:{title:e.title},...e.icon===void 0?{}:{icon:e.icon},kind:e.kind,mode:e.mode,lifecycle:e.lifecycle,status:e.status,cwd:e.cwd,parent:e.parent??null,fork_from:e.fork_from??null,profile_id:e.profile_id??null,...e.managed_worktree===void 0?{}:{managed_worktree:e.managed_worktree===null?null:{state:e.managed_worktree.state,...e.managed_worktree.cleanup===void 0?{}:{cleanup:e.managed_worktree.cleanup},path:e.managed_worktree.path,branch:e.managed_worktree.branch,base_ref:e.managed_worktree.base_ref,base_sha:e.managed_worktree.base_sha}},...e.review_binding===void 0?{}:{review_binding:e.review_binding??null},intent:e.intent??null,...e.persona_ack===void 0?{}:{persona_ack:e.persona_ack},created:e.created}}i(w,"extensionNode");function pe(e){const t=f(e),n=[],r=new Set([e]);let o=t.parent??null;for(;o!==null&&o!==""&&!r.has(o);){r.add(o);const c=y(o);if(c===null)break;n.unshift(w(c)),o=c.parent??null}const s=j(e).map(c=>y(c.node_id)).filter(c=>c!==null&&c.kind!=="human").sort((c,S)=>c.status===S.status?0:c.status==="active"?-1:S.status==="active"?1:0).map(w),u=typeof t.fork_source_file=="string"?Y(t.fork_source_file):null,d=W(e);if(d===null)throw v(`unknown node: ${e}`,{received:e});return{node:w(t),warm_spare:R(e),ancestors:n,children:s,fork_source:u===null?null:w(u),subject:d,report_nodes:T(),roadmap:V(e)}}i(pe,"extensionState");function B(e,t){return e?.kind===t.kind&&e?.mode===t.mode&&e?.lifecycle===t.lifecycle}i(B,"samePersona");function me(e){const t=p(e,"broker generated-name");if(t.kind!=="initial"&&t.kind!=="recap")throw a("kind must be initial or recap");if(typeof t.description!="string"||typeof t.title!="string"||typeof t.icon!="string")throw a("description, title, and icon must be strings");if(t.kind==="initial")return t;const n=t.expected;if(typeof n!="object"||n===null||Array.isArray(n)||["name","description","title","icon","kind"].some(r=>typeof n[r]!="string"))throw a("recap expected must contain name, description, title, icon, and kind strings");return t}i(me,"parseGeneratedNameBody");function fe(e){const t=p(e,"broker persona-ack"),n=i(r=>{const o=t[r];if(typeof o!="object"||o===null||Array.isArray(o)||typeof o.kind!="string"||o.mode!=="base"&&o.mode!=="orchestrator"||o.lifecycle!=="terminal"&&o.lifecycle!=="resident")throw a(`${r} must be a persona state`);return o},"parse");return{expected_execution_id:t.expected_execution_id,from:n("from"),to:n("to")}}i(fe,"parsePersonaAckBody");function he(e){const t=e.params.id,n=ae(e.body),r=n.sessionFile===null?null:F(n.sessionFile);return{status:200,body:l(()=>{const s=f(t);if(q(n.executionId,t,n.pid)==="shutdown")return{action:"shutdown"};const u=s.review_binding?.review_id;if(u!==void 0&&!n.reviewBoundaryIds.includes(u))return{action:"shutdown"};if(n.reason==="new"&&s.parent==null)return{action:"relaunch_root"};if(n.reason!=="new"&&s.fork_from!=null&&s.pi_session_id==null&&r===null)return{action:"shutdown"};const d=r===null?null:O(r);if(d!==null&&d.node_id!==t){if(J(d.pi_pid))return K(t,{link:"daemon\u2192node",op:"session-file-ownership",kind:"protocol",retry:{disposition:"fatal"},message:`refusing to bind ${r}: it is owned by live node ${d.node_id}`}),{action:"shutdown"};const c=M(d.node_id);if(c===null||L({fromNodeId:d.node_id,fromBindingId:c.bindingId,toNodeId:t,executionId:n.executionId,sessionId:n.piSessionId,transcriptPath:r})!=="transferred")return{action:"shutdown"}}else if(E(t,{executionId:n.executionId,sessionId:n.piSessionId,transcriptPath:r})==="shutdown")return{action:"shutdown"};return n.reason!=="new"&&(U(t),s.intent==="refresh"&&_(t,"revive")),{action:"none"}})}}i(he,"handleSessionBound");function ye(e,t){const n=y(e);if(n===null){if(t.pushedFinal)return{action:"shutdown"};throw v(`unknown node: ${e}`,{received:e})}if($(e,new Date().toISOString()),(t.stopReason==="stop"||t.stopReason==="length")&&I(e,{failures:0,notBefore:null}),t.stopReason==="quit")return(n.status==="active"||n.status==="idle")&&n.intent===null&&(_(e,"finish"),h(e),k(e)!==null&&x(e),b(e,{pane:null,tmux_session:null,window:null})),{action:"shutdown"};if(t.stopReason!=="stop"&&t.stopReason!=="length")return h(e,{link:"daemon\u2192node"}),n.intent==="refresh"?{action:"shutdown"}:{action:"stay_dormant"};const r={pushedFinal:t.pushedFinal};if(r.pushedFinal||n.status==="done")return h(e),k(e)!==null&&x(e),b(e,{pane:null,tmux_session:null,window:null}),{action:"shutdown"};if(n.intent==="refresh")return h(e),{action:"shutdown"};const o=H(e,r,t.backgroundJobsRunning);return h(e),o.action==="reprompt"?{action:"reprompt",prompt:o.message}:o.reason==="finished"?N(e)?{action:"stay_dormant"}:{action:"shutdown"}:o.reason!=="awaiting"&&o.reason!=="scheduled"?{action:"stay_dormant"}:k(e)!==null||z(e)||N(e)?{action:"stay_dormant"}:(_(e,"release"),{action:"shutdown"})}i(ye,"settleBroker");function _e(e){const t=e.params.id,n=de(e.body);m(t,n.expected_execution_id);const r=l(()=>ye(t,n));return r.action!=="reprompt"&&X(t),{status:200,body:r}}i(_e,"handleSettle");function ke(e){const t=e.params.id,n=ue(e.body);return m(t,n.expected_execution_id),{status:200,body:l(()=>{const o=ee(t);if(o===void 0)return{action:"stay_dormant"};const s=f(t);return ne(t,s,o)?(h(t),_(t,"park"),k(t)!==null&&x(t),b(t,{pane:null,tmux_session:null,window:null}),Z({level:n.outcome==="completed"?"info":"warn",event:"broker.park.complete",...D(t)?{node_id:t}:{},outcome:n.outcome==="completed"?"succeeded":"failed"}),{action:"shutdown"}):{action:"stay_dormant"}})}}i(ke,"handleParkComplete");function we(e){const t=e.params.id;return m(t,p(e.body,"broker park-activity").expected_execution_id),{status:200,body:l(()=>({activity:te(t)?"recorded":"none"}))}}i(we,"handleParkActivity");function be(e){const t=e.params.id,n=ce(e.body);return m(t,n.expected_execution_id),l(()=>{C(t,{tokensIn:n.tokens_in,contextTokens:n.context_tokens,lastActivity:n.last_activity,updatedAt:n.updated_at}),se(t,n)}),{status:204}}i(be,"handleTelemetry");function ge(e){const t=e.params.id,n=le(e.body);return m(t,n.expected_execution_id),{status:200,body:{modelOverride:l(()=>Q(f(t),n.spec,n.intent,n.userSelected)).model_override}}}i(ge,"handleModelCommit");function ve(e){const t=e.params.id,n=f(t);return n.run_id&&re(t,n.run_id),{status:200,body:pe(t)}}i(ve,"handleExtensionState");function xe(e){const t=e.params.id,n=me(e.body);return m(t,n.expected_execution_id),{status:200,body:l(()=>{const o=f(t);if(n.kind==="initial"){if((o.description??"").trim()!=="")return{applied:!1};const d=g(t,{description:n.description,...n.title.trim()===""?{}:{title:n.title},...n.icon.trim()===""?{}:{icon:n.icon}});return{applied:!0,editorLabel:P(d),description:d.description??"",title:d.title??"",icon:d.icon??""}}const s=n.expected;if(o.name!==s.name||(o.description??"")!==s.description||(o.title??"")!==s.title||(o.icon??"")!==s.icon||o.kind!==s.kind)return{applied:!1};const u=g(t,{description:n.description,title:n.title.trim()===""?void 0:n.title,icon:n.icon.trim()===""?void 0:n.icon});return{applied:!0,editorLabel:P(u),description:u.description??"",title:u.title??"",icon:u.icon??""}})}}i(xe,"handleGeneratedName");function Se(e){const t=e.params.id,n=fe(e.body);return m(t,n.expected_execution_id),{status:200,body:l(()=>{const o=f(t),s={kind:o.kind,mode:o.mode,lifecycle:o.lifecycle},u=o.persona_ack,d=u===void 0?s:{kind:u.kind??o.kind,mode:u.mode,lifecycle:u.lifecycle};return!B(s,n.to)||!B(d,n.from)?{applied:!1}:(g(t,{persona_ack:n.to}),{applied:!0})})}}i(Se,"handlePersonaAck");const et=oe([{method:"POST",pattern:"/v1/nodes/:id/broker/session-bound",handler:he},{method:"POST",pattern:"/v1/nodes/:id/broker/settle",handler:_e},{method:"POST",pattern:"/v1/nodes/:id/broker/park-complete",handler:ke},{method:"POST",pattern:"/v1/nodes/:id/broker/park-activity",handler:we},{method:"POST",pattern:"/v1/nodes/:id/broker/telemetry",handler:be},{method:"POST",pattern:"/v1/nodes/:id/broker/model",handler:ge},{method:"GET",pattern:"/v1/nodes/:id/broker/extension-state",handler:ve},{method:"POST",pattern:"/v1/nodes/:id/broker/generated-name",handler:xe},{method:"POST",pattern:"/v1/nodes/:id/broker/persona-ack",handler:Se}]);export{et as brokerOperationRoutes,w as extensionNode};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var w=Object.defineProperty;var i=(r,e)=>w(r,"name",{value:e,configurable:!0});import{ApiError as E}from"../../../api/errors.js";import{getNode as I}from"../../../core/canvas/canvas.js";import{liveExecutionForNode as S}from"../../../core/canvas/executions.js";import{admitEpisode as T,clearEpisode as q,clearFault as h,closeTurn as R,invalidateEpisode as F,openTurn as v,parseProviderError as A,readEpisode as N,readFault as l,recordFault as b,recordPendingEpisode as P,recordTransportPoisonVerdict as O,recordTurnProgress as j,reopenEpisode as L}from"../../../core/canvas/recovery.js";import{notFound as D,usage as n}from"../../../core/errors.js";import{ownerOnly as g}from"../router.js";const f=new Set(["pi\u2192provider","viewer\u2194broker","relay\u2194broker","viewer\u2194crtrd","daemon\u2192node","crtr\u2192pi"]),B=new Set(["rate-limit","overloaded","connection","auth","protocol","context-overflow","other","wedged","model-not-found"]),$=new Set(["auto","manual","fatal"]),C=new Set(["sdk","daemon","client"]);function d(r,e){if(typeof r!="object"||r===null||Array.isArray(r))throw n(`${e} requires a JSON object`);return r}i(d,"objectBody");function a(r){if(I(r)===null)throw D(`unknown node: ${r}`,{received:r})}i(a,"requireNode");function u(r,e){if(typeof e!="string"||e==="")throw n("expected_execution_id must be a non-empty string");const t=S(r);if(t===null||t.executionId!==e)throw new E(409,"stale_execution","broker execution is no longer current")}i(u,"requireCurrentExecution");function x(r){if(typeof r!="object"||r===null||Array.isArray(r))throw n("retry must be an object");const e=r;if(!$.has(e.disposition))throw n("retry.disposition must be auto, manual, or fatal");if(e.by!==void 0&&!C.has(e.by))throw n("retry.by must be sdk, daemon, or client");for(const t of["attempt","max"])if(e[t]!==void 0&&(!Number.isSafeInteger(e[t])||e[t]<0))throw n(`retry.${t} must be a non-negative safe integer`);if(e.nextAt!==void 0&&typeof e.nextAt!="string")throw n("retry.nextAt must be a string");return e}i(x,"parseRetry");function _(r){const e=d(r,"fault input");if(!f.has(e.link))throw n("fault link is invalid");if(typeof e.op!="string"||e.op==="")throw n("fault op must be a non-empty string");if(!B.has(e.kind))throw n("fault kind is invalid");if(typeof e.message!="string")throw n("fault message must be a string");if(e.operation_id!==void 0&&(typeof e.operation_id!="string"||e.operation_id===""))throw n("operation_id must be a non-empty string");if(e.since!==void 0&&typeof e.since!="string")throw n("since must be a string");if(e.anchor_entry_id!==void 0&&(typeof e.anchor_entry_id!="string"||e.anchor_entry_id===""))throw n("anchor_entry_id must be a non-empty string");const t=e.provider_error===void 0?void 0:A(e.provider_error);if(e.provider_error!==void 0&&t===void 0)throw n("provider_error is invalid");return{...e,...t===void 0?{}:{provider_error:t},retry:x(e.retry)}}i(_,"parseFaultInput");function y(r){return{link:r.link,op:r.op,kind:r.kind,retry:r.retry,message:r.message,...r.operation_id===void 0?{}:{operation_id:r.operation_id},...r.since===void 0?{}:{since:r.since},...r.anchor_entry_id===void 0?{}:{anchorEntryId:r.anchor_entry_id},...r.provider_error===void 0?{}:{providerError:r.provider_error}}}i(y,"faultInput");function c(r){return{fault_id:r.faultId,link:r.link,op:r.op,kind:r.kind,retry:r.retry,message:r.message,since:r.since,operation_id:r.operation_id,...r.anchorEntryId===void 0?{}:{anchor_entry_id:r.anchorEntryId},...r.providerError===void 0?{}:{provider_error:r.providerError}}}i(c,"faultDto");function k(r){const e=l(r),t=N(r);return{fault:e===null?null:c(e),episode:t===null?null:{state:t.state,session_id:t.sessionId,fault:c(t.fault)}}}i(k,"recoveryState");function K(r){const e=d(r,"broker turn"),t=e.event;if(t!=="started"&&t!=="progress"&&t!=="closed"&&t!=="interrupted"&&t!=="exit-diagnostic")throw n("event is invalid");if(typeof e.expected_execution_id!="string"||e.expected_execution_id==="")throw n("expected_execution_id must be a non-empty string");if(t==="closed"){if(e.end_reason!=="settled"&&e.end_reason!=="teardown-aborted")throw n("closed turn requires end_reason settled or teardown-aborted")}else if(e.end_reason!==void 0)throw n("end_reason is valid only for closed turns");if(t==="exit-diagnostic"){const o=d(e.exit_diagnostic,"exit_diagnostic"),s=d(o.transport_poison,"exit_diagnostic.transport_poison");if(o.schema!=="crtr.execution-exit-diagnostic/v1"||!Number.isSafeInteger(s.consecutive_passes)||s.consecutive_passes<1||!Array.isArray(s.routes)||s.routes.length===0||!s.routes.every(p=>typeof p=="string"&&p!==""))throw n("exit_diagnostic is invalid")}else if(e.exit_diagnostic!==void 0)throw n("exit_diagnostic is valid only for exit-diagnostic turns");return e}i(K,"parseTurn");function U(r){const e=r.params.id;a(e);const t=K(r.body);u(e,t.expected_execution_id);let o;switch(t.event){case"started":o=v(t.expected_execution_id,{reason:"agent-start"});break;case"interrupted":o=v(t.expected_execution_id,{reason:"prompt-unsettled"});break;case"progress":o=j(t.expected_execution_id);break;case"closed":o=R(t.expected_execution_id,{endReason:t.end_reason});break;case"exit-diagnostic":{const m=t.exit_diagnostic.transport_poison;o=O(t.expected_execution_id,{consecutivePasses:m.consecutive_passes,routes:m.routes});break}}const s=l(e)?.link;return{status:200,body:{applied:o,fault_link:s==="daemon\u2192node"||s==="pi\u2192provider"?s:null}}}i(U,"handleTurn");function Y(r){const e=d(r,"provider retry");if(typeof e.expected_execution_id!="string"||e.expected_execution_id==="")throw n("expected_execution_id must be a non-empty string");if(!["record-pending","admit","reopen","invalidate","clear"].includes(e.op))throw n("provider retry op is invalid");if(typeof e.session_id!="string"||e.session_id==="")throw n("session_id must be a non-empty string");if(e.op==="record-pending"&&(e.input=_(e.input)),e.op==="admit"){if(typeof e.fault_id!="string"||e.fault_id==="")throw n("admit requires fault_id");e.retry=x(e.retry)}return e}i(Y,"parseProviderRetry");function G(r){const e=r.params.id;a(e);const t=Y(r.body);u(e,t.expected_execution_id);let o;switch(t.op){case"record-pending":o=P(e,{sessionId:t.session_id,input:y(t.input)})!==null;break;case"admit":o=T(e,{sessionId:t.session_id,faultId:t.fault_id,retry:t.retry});break;case"reopen":o=L(e,{sessionId:t.session_id});break;case"invalidate":o=F(e,{sessionId:t.session_id});break;case"clear":o=q(e,{sessionId:t.session_id});break}return{status:200,body:{applied:o,episode:k(e).episode}}}i(G,"handleProviderRetry");function J(r){const e=d(r,"broker fault");if(typeof e.expected_execution_id!="string"||e.expected_execution_id==="")throw n("expected_execution_id must be a non-empty string");if(e.op!=="record"&&e.op!=="clear")throw n("fault op must be record or clear");if(e.op==="record"&&(e.input=_(e.input)),e.op==="clear"&&e.link!==void 0&&!f.has(e.link))throw n("fault link is invalid");if(e.preserve_episode!==void 0&&typeof e.preserve_episode!="boolean")throw n("preserve_episode must be boolean");return e}i(J,"parseBrokerFault");function V(r){const e=r.params.id;a(e);const t=J(r.body);u(e,t.expected_execution_id);const o=t.op==="record"?b(e,y(t.input)):(h(e,{...t.link===void 0?{}:{link:t.link},...t.preserve_episode===void 0?{}:{preserveEpisode:t.preserve_episode}}),l(e));return{status:200,body:{fault:o===null?null:c(o)}}}i(V,"handleBrokerFault");function W(r){const e=r.params.id;return a(e),u(e,r.query.get("expected_execution_id")),{status:200,body:k(e)}}i(W,"handleRecovery");function z(r){const e=r.params.id;a(e);const t=b(e,y(_(r.body)));return{status:200,body:{fault:t===null?null:c(t)}}}i(z,"handleNodeFaultRecord");function H(r){const e=r.params.id;a(e);const t=r.query.get("link");if(t!==null&&!f.has(t))throw n("fault link is invalid");const o=r.query.get("preserve_episode");if(o!==null&&o!=="true"&&o!=="false")throw n("preserve_episode must be true or false");return{status:200,body:{cleared:h(e,{...t===null?{}:{link:t},...o===null?{}:{preserveEpisode:o==="true"}})}}}i(H,"handleNodeFaultClear");const ne=g([{method:"POST",pattern:"/v1/broker/:id/turn",handler:U},{method:"POST",pattern:"/v1/broker/:id/provider-retry",handler:G},{method:"POST",pattern:"/v1/broker/:id/fault",handler:V},{method:"GET",pattern:"/v1/broker/:id/recovery",handler:W}]),oe=g([{method:"POST",pattern:"/v1/nodes/:id/fault",handler:z},{method:"DELETE",pattern:"/v1/nodes/:id/fault",handler:H}]);export{ne as brokerRecoveryRoutes,oe as nodeFaultRoutes,u as requireCurrentExecution};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ServerResponse } from 'node:http';
|
|
2
|
+
import type { BrokerSignalLineDTO } from '../../../api/dto/broker-signals.js';
|
|
3
|
+
import type { RequestContext, RouteTable } from '../router.js';
|
|
4
|
+
/** One admitted connection per node; no delivery data or unbounded write queue. */
|
|
5
|
+
export declare class BrokerSignalStreams {
|
|
6
|
+
private readonly timing;
|
|
7
|
+
private readonly streams;
|
|
8
|
+
constructor(timing?: {
|
|
9
|
+
pingMs: number;
|
|
10
|
+
blockedMs: number;
|
|
11
|
+
});
|
|
12
|
+
open(nodeId: string, res: ServerResponse, hello: BrokerSignalLineDTO, req: RequestContext['req']): void;
|
|
13
|
+
/** Hint the node's broker to re-run its retry scheduling. False when no
|
|
14
|
+
* broker stream is open (it resyncs on reconnect instead). */
|
|
15
|
+
nudgeFaultRetry(nodeId: string): boolean;
|
|
16
|
+
close(): void;
|
|
17
|
+
}
|
|
18
|
+
export declare const brokerSignalStreams: BrokerSignalStreams;
|
|
19
|
+
export declare const brokerSignalRoutes: RouteTable;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var D=Object.defineProperty;var r=(l,e)=>D(l,"name",{value:e,configurable:!0});import{ApiError as M}from"../../../api/errors.js";import{getNode as b}from"../../../core/canvas/canvas.js";import{brokerSignalBus as E}from"../../broker-signals/bus.js";import{boundDaemonControl as T}from"../../control.js";import{requireCurrentExecution as v}from"./broker-recovery.js";import{extensionNode as _}from"./broker-ops.js";const R=15e3,C=3e4;class N{static{r(this,"BrokerSignalStreams")}timing;streams=new Map;constructor(e={pingMs:R,blockedMs:C}){this.timing=e}open(e,t,u,d){this.streams.get(e)?.close();let n=!1,s=!1,h=!1,g=!1,y=!1,a,m,w;const o=r((i=!1)=>{n||(n=!0,m!==void 0&&clearInterval(m),a!==void 0&&clearTimeout(a),t.off("drain",k),t.off("close",c),t.off("error",c),d.off("aborted",c),w?.(),this.streams.get(e)===S&&this.streams.delete(e),i?t.destroy():t.writableEnded||t.end())},"close"),f=r(i=>{n||s||t.write(`${JSON.stringify(i)}
|
|
2
|
+
`)||(s=!0,a=setTimeout(()=>o(!0),this.timing.blockedMs),a.unref())},"send"),p=r(()=>{if(!(n||s)&&(h&&(h=!1,f({type:"mail",channel:"wake",at:Date.now()})),y&&!s&&(y=!1,f({type:"fault-retry",at:Date.now()})),g&&!s)){g=!1;const i=b(e);i!==null&&f({type:"node",node:_(i),at:Date.now()})}},"flush"),k=r(()=>{s=!1,a!==void 0&&clearTimeout(a),a=void 0;try{p()}catch{o()}},"drain"),c=r(()=>o(),"onClosed"),S={close:o,nudgeFaultRetry:r(()=>{if(!n){y=!0;try{p()}catch{o()}}},"nudgeFaultRetry")};this.streams.set(e,S),t.on("drain",k),t.once("close",c),t.once("error",c),w=E.subscribe((i,x)=>{if(!(i!==e||n)){x==="mail"?h=!0:g=!0;try{p()}catch{o()}}}),m=setInterval(()=>{if(!(s||n))try{f({type:"ping",at:Date.now()})}catch{o()}},this.timing.pingMs),m.unref(),d.once("aborted",c);try{f(u),p()}catch{o()}}nudgeFaultRetry(e){const t=this.streams.get(e);return t===void 0?!1:(t.nudgeFaultRetry(),!0)}close(){for(const e of[...this.streams.values()])e.close()}}const B=new N;function F(l){const e=l.params.id??"",t=b(e);if(t===null)throw new M(404,"node_not_found",`no node ${e}`);const u=l.query.get("execution_id");v(e,u);const{req:d,res:n}=l;n.writeHead(200,{"content-type":"application/x-ndjson; charset=utf-8","cache-control":"no-cache",connection:"keep-alive"});try{B.open(e,n,{type:"hello",epoch:T()?.epoch??"",execution_id:u,node:_(b(e)??t),at:Date.now()},d)}catch{n.writableEnded||n.end()}return{status:200}}r(F,"handleSignals");const J=[{method:"GET",pattern:"/v1/nodes/:id/broker/signals",handler:F}];export{N as BrokerSignalStreams,J as brokerSignalRoutes,B as brokerSignalStreams};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type HandlerResult, type RequestContext, type RouteTable } from '../router.js';
|
|
2
|
+
/** One small compressed snapshot for browse's first frame. Gzip is explicit
|
|
3
|
+
* application/gzip, not HTTP content-encoding: the local socket fetch returns a
|
|
4
|
+
* byte stream without automatic decompression. Build from selected columns so
|
|
5
|
+
* the daemon does not materialize or serialize outcome/activity/placement. */
|
|
6
|
+
export declare function handleBrowse(ctx: RequestContext): HandlerResult;
|
|
7
|
+
export declare const canvasRoutes: RouteTable;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
var x=Object.defineProperty;var l=(t,e)=>x(t,"name",{value:e,configurable:!0});import{gzipSync as z}from"node:zlib";import{browseNodes as J,graphNodes as q,listNodes as B,pruneNodes as K,pruneToLimit as Q,rosterEdges as k,rosterNodes as U}from"../../../core/canvas/canvas.js";import{activeBackgroundBashJobs as Y}from"../../../core/bash-jobs.js";import{contextDir as V}from"../../../core/canvas/node-agent-paths.js";import{nowIso as C}from"../../../core/fs-utils.js";import{isPidPresent as W}from"../../../core/canvas/pid.js";import{dashboardRowsAllFromSource as X,enrichRowsFromSource as Z}from"../../../core/canvas/render-source.js";import{localCanvasSource as j}from"../../../core/canvas/source.js";import{ticketCountsForNodes as O,ticketsAcrossCanvas as ee}from"../../../core/canvas/attention.js";import{buildCorpus as te,groupCorpus as ne,resolveRef as oe}from"../../../core/canvas/history.js";import{listFocuses as L,reapEmptyNodes as se}from"../../../core/runtime/placement.js";import{boundFleet as re}from"../../../core/runtime/fleet.js";import{retentionHold as ie}from"../../reconcilers/live-obligation.js";import{notFound as ae,usage as p}from"../../../core/errors.js";import{toGraphNodeDTO as de}from"../map.js";import{canReadNode as R,canReadRun as le}from"../router.js";import{ApiError as ce}from"../../../api/errors.js";function g(t){return t.principal.class==="person"?null:new Set(B().filter(e=>R(t.principal,e.grantee??"app:terminal",e.node_id)).map(e=>e.node_id))}l(g,"visibleNodes");function T(t){return t.principal.class==="person"?null:new Set(B().filter(e=>e.run_id?le(t.principal,e.grantee??"app:terminal",e.node_id):R(t.principal,e.grantee??"app:terminal",e.node_id)).map(e=>e.node_id))}l(T,"visibleHistoryNodes");function ue(t){const e=g(t);return{status:200,body:{items:ee().filter(o=>e===null||e.has(o.node_id)).map(o=>({node_id:o.node_id,name:o.name,cwd:o.cwd,count:o.count,subjects:o.subjects}))}}}l(ue,"handleAttention");function fe(t){const e=t.body;if(e===null||typeof e!="object"||!Array.isArray(e.node_ids))throw p("attention count request requires node_ids: string[]");const n=e.node_ids;if(!n.every(s=>typeof s=="string"))throw p("attention count request node_ids must contain only strings");const o=g(t);return{status:200,body:{counts:O(n.filter(s=>o===null||o.has(s)))}}}l(fe,"handleAttentionCounts");function E(t){return Buffer.from(String(t),"utf8").toString("base64")}l(E,"encodeCursor");function G(t){const e=Number(Buffer.from(t,"base64").toString("utf8"));if(!Number.isInteger(e)||e<0)throw p(`invalid cursor: ${t}`);return e}l(G,"decodeCursor");function pe(t,e,n){const i=t.loadBody().split(`
|
|
2
|
+
`);if(e.length>0){const d=i.findIndex(u=>{const c=u.toLowerCase();return e.some(m=>c.includes(m))});if(d!==-1)return i.slice(d,d+n).map(u=>u.trim()).filter(u=>u!=="").join(" \u23CE ")}const s=i.map(d=>d.trim()).filter(d=>d!=="").slice(0,n).join(" \u23CE ");return s!==""?s:t.title}l(pe,"snippet");function me(t,e,n){const o=[...t];return e==="relevance"&&n!==void 0?o.sort((i,s)=>(n.get(s.ref)??0)-(n.get(i.ref)??0)||s.tsMs-i.tsMs||i.ref.localeCompare(s.ref)):e==="oldest"?o.sort((i,s)=>i.tsMs-s.tsMs||i.ref.localeCompare(s.ref)):o.sort((i,s)=>s.tsMs-i.tsMs||i.ref.localeCompare(s.ref)),o}l(me,"sortArtifacts");function he(t){if(t==null)return{};if(typeof t!="object")throw p("history search body must be a JSON object");return t}l(he,"parseSearchBody");function ye(t){if(t===null||typeof t!="object")throw p("history grep body must be a JSON object");const e=t;if(typeof e.pattern!="string"||e.pattern==="")throw p("history grep body requires a non-empty pattern");return e}l(ye,"parseGrepBody");function $(t,e){const n={cwd:t.cwd,allCwds:t.all_cwds===!0,under:t.under,nodes:t.nodes},o={types:t.types,kinds:t.kinds,statuses:t.statuses,sinceMs:t.since_ms,untilMs:t.until_ms,origins:t.origins,roles:t.roles,from:t.from},i=T(e);return te(n,o).filter(s=>i===null||i.has(s.nodeId))}l($,"buildCorpusFromQuery");function _e(t){if(t==null)return{};if(typeof t!="object")throw p("history stats body must be a JSON object");return t}l(_e,"parseStatsBody");const I=["origin","node","kind","day","type","role"];function be(t){const e=_e(t.body),n=e.group_by??"type";if(!I.includes(n))throw p(`--group-by must be one of: ${I.join(", ")}; received: ${String(e.group_by)}`);const o=$(e,t),i=ne(o,n);return{status:200,body:{group_by:n,groups:i,total:i.reduce((d,u)=>d+u.count,0),scanned:o.length}}}l(be,"handleHistoryStats");function ge(t){const e=ye(t.body),n=Math.min(100,Math.max(1,e.limit??20)),o=$(e,t),i=e.cursor!==void 0?G(e.cursor):0;let s;try{s=new RegExp(e.pattern,"i")}catch{throw p(`invalid regex pattern: ${e.pattern}`)}const d=[];for(const r of o)r.loadBody().split(`
|
|
3
|
+
`).forEach((y,b)=>{s.test(y)&&d.push({ref:r.ref,node:`${r.nodeName} (${r.nodeId})`,ts:r.ts,line:b+1,text:y.trim()})});d.sort((r,a)=>r.ref.localeCompare(a.ref)||r.line-a.line);const u=d.slice(i,i+n),c=i+n<d.length?E(i+n):null;return{status:200,body:{hits:u,next_cursor:c,total:d.length}}}l(ge,"handleHistoryGrep");function ve(t){const e=he(t.body),n=(e.query??"").trim(),o=e.weigh_body===!0,i=e.full===!0,s=Math.max(1,e.snippet_lines??1),d=Math.min(100,Math.max(1,e.limit??20)),u=$(e,t),c=e.cursor!==void 0?G(e.cursor):0,m=n.toLowerCase().split(/\s+/).filter(f=>f.length>0);let r=u,a;const y=e.sort??(m.length>0?"relevance":"recency");if(m.length>0&&y==="relevance"){a=new Map;const f=[];for(const h of u){const N=h.title.toLowerCase(),D=h.nodeName.toLowerCase(),H=h.nodeDesc.toLowerCase(),M=o?h.loadBody().toLowerCase():null;let _=0;for(const S of m)N.includes(S)&&(_+=10),D.includes(S)&&(_+=5),H.includes(S)&&(_+=3),M!==null&&M.includes(S)&&(_+=1);_>0&&(a.set(h.ref,_),f.push(h))}r=f}else m.length>0&&(r=u.filter(f=>{const h=`${f.title}
|
|
4
|
+
${f.nodeName}
|
|
5
|
+
${f.nodeDesc}${o?`
|
|
6
|
+
`+f.loadBody():""}`.toLowerCase();return m.some(N=>h.includes(N))}));const b=me(r,y,a),P=b.slice(c,c+d),A=c+d<b.length?E(c+d):null;return{status:200,body:{hits:P.map(f=>{const h={ref:f.ref,node:`${f.nodeName} (${f.nodeId})`,kind:f.nodeKind,source:f.source,ts:f.ts};return y==="relevance"&&a!==void 0&&(h.score=a.get(f.ref)??0),i?h.body=f.loadBody():h.snippet=pe(f,m,s),h}),next_cursor:A,total:b.length}}}l(ve,"handleHistorySearch");function Se(t){const e=(t.query.get("ref")??"").trim();if(!e.includes(":"))throw p(`ref must be <node-id>:inbox/<n>, <node-id>:session, or <node-id>:session/<n>; received: ${e}`,{received:e,next:"Get a valid ref from `crtr canvas history search`. Reports and documents are `crtr canvas read <name>`."});const n=oe(e);if(n===null)throw ae(`no inbox entry or message for ref: ${e}`,{ref:e,next:"Re-run `crtr canvas history search` for a current ref. Reports and documents are `crtr canvas read <name>`."});if(T(t)?.has(n.nodeId)===!1)throw new ce(404,"not_found","artifact not found");const o=n.source,s=t.query.get("format")==="raw"&&n.raw!==null?n.raw:n.body;return{status:200,body:{ref:e,node:`${n.nodeName} (${n.nodeId})`,source:o,ts:n.ts,content:s}}}l(Se,"handleHistoryRead");function ke(t){for(const[o]of t.query)if(o!=="live")throw p(`unknown snapshot query parameter: ${o}`);const e=t.query.getAll("live");if(e.length>1)throw p("live must appear at most once");const n=e[0];if(n===void 0||n==="false"||n==="0")return!1;if(n==="true"||n==="1")return!0;throw p("live must be true or false")}l(ke,"snapshotLiveOnly");async function we(t){const e=new Set(L().map(r=>r.node_id)),n=g(t),o=(await X(j,e,ke(t))).filter(r=>n===null||n.has(r.node_id)),i=O(o.map(r=>r.node_id));await Z(j,o,i);const s=o.map(r=>{const a=r.srcRow,y=a?.host_kind??"tmux";return{node_id:r.node_id,name:r.name,title:r.handle??r.name,description:r.description??null,kind:r.kind,mode:r.mode,lifecycle:r.lifecycle??a?.lifecycle,status:r.status,cwd:r.cwd,profile_id:r.profile_id??null,parent:a?.parent??null,created:r.created,host_kind:y,enterable:y==="broker",attention_count:r.asks,...a?.cycles!=null?{cycles:a.cycles}:{},...r.mtimeMs!==void 0?{last_activity:new Date(r.mtimeMs).toISOString()}:{},ctx_tokens:r.ctx_tokens,streaming:r.streaming??!1,jobs_active:a!==void 0&&W(a.pi_pid)?Y(V(r.node_id)).length:0,waiting_for:a?.waiting_for??null,hanging:r.hanging??null,viewed:r.viewed??!1,final_report:a?.final_report??null,finalized_at:a?.finalized_at??null}}),d=new Map;for(const r of k()){const a=d.get(r.from_id);a===void 0?d.set(r.from_id,[r.to_id]):a.push(r.to_id)}const u=new Set(o.map(r=>r.node_id)),c=Object.fromEntries(o.map(r=>[r.node_id,(d.get(r.node_id)??[]).filter(a=>u.has(a))]));return{status:200,body:{generated_at:C(),nodes:s,subscriptions:c}}}l(we,"handleSnapshot");function F(){const t=U().map(n=>{const o=n.host_kind??"tmux";return{node_id:n.node_id,name:n.name,kind:n.kind,mode:n.mode,lifecycle:n.lifecycle,status:n.status,cwd:n.cwd,host_kind:o,enterable:o==="broker",parent:n.parent,created:n.created}}),e=k().map(n=>({from_id:n.from_id,to_id:n.to_id,active:n.active,created:n.created}));return{generated_at:C(),nodes:t,edges:e}}l(F,"buildRoster");let v=null,w=null;function Ne(){return v===null?(v=Promise.resolve().then(()=>F()).finally(()=>{v=null}),v):(w===null&&(w=v.then(()=>F()).finally(()=>{w=null})),w)}l(Ne,"rosterCoalesced");async function Ce(t){const e=await Ne(),n=g(t);return n===null?{status:200,body:e}:{status:200,body:{...e,nodes:e.nodes.filter(o=>n.has(o.node_id)),edges:e.edges.filter(o=>n.has(o.from_id)&&n.has(o.to_id))}}}l(Ce,"handleRoster");function Re(t){const e=J().filter(s=>t.principal.class==="person"||R(t.principal,s.grantee??"app:terminal",s.node_id)).map(s=>({node_id:s.node_id,name:s.name,description:s.description,kind:s.kind,mode:s.mode,lifecycle:s.lifecycle,status:s.status,cwd:s.cwd,profile_id:s.profile_id,grantee:s.grantee??"app:terminal",parent:s.parent,created:s.created,frozen_at:s.frozen_at??null,terminal_reason:s.terminal_reason??null,final_report:s.final_report??null,telemetry_tokens_in:s.telemetry_tokens_in??null,telemetry_updated_at:s.telemetry_updated_at??null,fault:s.fault&&s.fault.link!=="broker\u2194crtrd"?{...s.fault,link:s.fault.link}:null,streaming:s.streaming??!1})),n=new Set(e.map(s=>s.node_id)),o=k().filter(s=>n.has(s.from_id)&&n.has(s.to_id));return{status:200,rawBody:z(JSON.stringify({nodes:e,edges:o}),{level:1}),headers:{"content-type":"application/gzip"}}}l(Re,"handleBrowse");function $e(t){const e=g(t);return{status:200,body:{generated_at:C(),nodes:q().filter(o=>e===null||e.has(o.node_id)).map(de),edges:k().filter(o=>e===null||e.has(o.from_id)&&e.has(o.to_id)).map(o=>({from_id:o.from_id,to_id:o.to_id,active:o.active,created:o.created})),focused_node_ids:L().map(o=>o.node_id).filter(o=>e===null||e.has(o))}}}l($e,"handleGraph");function Me(t){if(t==null)return{};if(typeof t!="object")throw p("prune body must be a JSON object");const e=t,n=l(r=>{const a=e[r];if(a!==void 0){if(typeof a!="number"||!Number.isFinite(a))throw p(`${r} must be a number`);return a}},"num"),o=l(r=>{const a=e[r];if(a!==void 0){if(typeof a!="boolean")throw p(`${r} must be a boolean`);return a}},"bool"),i={},s=n("limit");s!==void 0&&(i.limit=s);const d=n("ttl_days");d!==void 0&&(i.ttl_days=d);const u=o("include_stale");u!==void 0&&(i.include_stale=u);const c=o("empty");c!==void 0&&(i.empty=c);const m=o("dry_run");return m!==void 0&&(i.dry_run=m),i}l(Me,"parsePruneBody");function Be(t){const e=Me(t.body),n=e.ttl_days??14,o=e.dry_run??!1,i=ie(re());let s;return e.limit!==void 0?s=Q({maxNodes:e.limit,held:i,dryRun:o}).pruned.map(c=>({node_id:c.node_id,status:c.status,created:c.created})):e.empty===!0?s=se({dryRun:o}).map(c=>({node_id:c,status:"empty",created:""})):s=K({ttlDays:n,held:i,dryRun:o,includeStale:e.include_stale??!1}).pruned.map(c=>({node_id:c.node_id,status:c.status,created:c.created})),{status:200,body:{pruned:s,dry_run:o,ttl_days:n}}}l(Be,"handlePrune");const Ve=[{method:"GET",pattern:"/v1/canvas/attention",handler:ue},{method:"POST",pattern:"/v1/canvas/attention/counts",handler:fe},{method:"POST",pattern:"/v1/canvas/history/search",handler:ve},{method:"POST",pattern:"/v1/canvas/history/grep",handler:ge},{method:"GET",pattern:"/v1/canvas/history/read",handler:Se},{method:"POST",pattern:"/v1/canvas/history/stats",handler:be},{method:"GET",pattern:"/v1/canvas/snapshot",handler:we},{method:"GET",pattern:"/v1/canvas/roster",handler:Ce},{method:"GET",pattern:"/v1/canvas/browse",handler:Re},{method:"GET",pattern:"/v1/canvas/graph",handler:$e},{method:"POST",pattern:"/v1/canvas/prune",ownerOnly:!0,handler:Be}];export{Ve as canvasRoutes,Re as handleBrowse};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=Object.defineProperty;var e=(t,o)=>n(t,"name",{value:o,configurable:!0});import{getNode as r}from"../../../core/canvas/canvas.js";import{isSafeNodeId as d}from"../../../core/canvas/paths.js";import{notFound as i,usage as a}from"../../../core/errors.js";import{readChatInventory as m}from"../../../core/runtime/broker-inventory.js";async function s(t){const o=t.params.id;if(!d(o))throw a(`invalid node id: ${o}`,{received:o});if(r(o)===null)throw i(`unknown node: ${o}`,{received:o});return{status:200,body:await m(o)}}e(s,"handleGet");const v=[{method:"GET",pattern:"/v1/nodes/:id/chat-inventory",handler:s}];export{v as chatInventoryRoutes};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var K=Object.defineProperty;var o=(n,e)=>K(n,"name",{value:e,configurable:!0});import{randomUUID as Q}from"node:crypto";import{relative as V,resolve as R,sep as D}from"node:path";import{ApiError as i}from"../../../api/errors.js";import{armCron as X,cancelCron as ee,getCron as _,listCrons as N,listCronRuns as W,pokeHeldCrons as ne,setCronState as z}from"../../../core/canvas/crons.js";import{getNode as f}from"../../../core/canvas/canvas.js";import{nodeAgentDir as re}from"../../../core/canvas/node-agent-paths.js";import{appSpace as oe}from"../../../core/layout.js";import{appProcessesSandboxed as te,cwdIsMounted as se}from"../../../core/spaces/process.js";import{assertScope as B}from"../../../core/scopes.js";import{InputError as s}from"../../../core/io.js";import{nextSlotAfter as ie}from"../../../core/wake.js";import{executeCron as ae,markSelfCanceledCronRun as ce}from"../../cron-run.js";import{toCronDTO as w,toCronRunDTO as G}from"../map.js";import{assertCeiling as le,canReadNode as de}from"../router.js";import{requireUsableProfile as ue}from"./profiles.js";function j(n,e){const r=n[e];if(typeof r!="string"||r.trim()==="")throw new s({error:"missing_field",message:`cron arm request requires a non-empty "${e}"`,field:e,next:`Send a non-empty string "${e}".`});return r}o(j,"requireString");function k(n,e,r,t){if(n==null)return t;if(typeof n=="string"&&r.includes(n))return n;throw new s({error:`bad_${e}`,message:`"${String(n)}" is not a valid ${e}`,field:e,next:`Use one of: ${r.join(", ")}.`})}o(k,"requireEnum");function pe(n){if(n==="human")return JSON.stringify({human:!0});if(n.startsWith("node:")){const e=n.slice(5).trim();if(e==="")throw new s({error:"bad_sink",message:"node sink requires a node id",field:"sink",next:'Use sink "node:<node-id>".'});if(f(e)===null)throw new s({error:"sink_node_not_found",message:`sink node ${e} does not exist on the canvas`,field:"sink",next:"Name a live node id, or use spawn:<kind> for a delivery that outlives any one node."});return JSON.stringify({node:e})}if(n.startsWith("spawn:")){const e=n.slice(6).trim();if(e==="")throw new s({error:"bad_sink",message:"spawn sink requires a node kind",field:"sink",next:'Use sink "spawn:<kind>" (e.g. spawn:general).'});return JSON.stringify({spawn:e})}throw new s({error:"bad_sink",message:`"${n}" is not a valid sink`,field:"sink",next:"Use node:<node-id>, spawn:<kind>, or human."})}o(pe,"parseSinkSpec");const fe=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z$/;function L(n,e){if(!fe.test(n)||Number.isNaN(Date.parse(n)))throw new s({error:`bad_${e}`,message:`"${n}" is not a UTC ISO instant`,field:e,next:'Send a resolved UTC instant like "2026-06-07T09:00:00.000Z" (the client resolves the time grammar).'});return n}o(L,"requireUtcIso");function he(n){try{ie(n,new Date)}catch(e){throw new s({error:"bad_recur",message:`recur is not advanceable: ${e instanceof Error?e.message:String(e)}`,field:"recur",next:'Send recur JSON the daemon can advance: {"every":"6h"} or {"cron":"0 9 * * *","tz":"America/New_York"}.'})}return n}o(he,"requireRecur");function me(n){let e;try{e=JSON.parse(n)}catch{throw new s({error:"bad_env_json",message:"env_json is not valid JSON",field:"env_json",next:'Send a JSON object of string values, e.g. {"API_BASE":"https://x"}.'})}if(typeof e!="object"||e===null||Array.isArray(e))throw new s({error:"bad_env_json",message:"env_json must be a JSON object",field:"env_json",next:'Send a JSON object of string values, e.g. {"API_BASE":"https://x"}.'});for(const[r,t]of Object.entries(e))if(typeof t!="string")throw new s({error:"bad_env_json",message:`env_json value for "${r}" is not a string`,field:"env_json",next:"Every env value must be a string."});return n}o(me,"requireEnvJson");function x(n){const e=n.query.get("profile");return e!==null&&e.trim()!==""?e.trim():null}o(x,"callerProfile");function Z(n,e){return e===null||n.scope==="global"||n.profile===e}o(Z,"inScope");function H(n){return n.principal.class==="person"?null:n.principal.app}o(H,"callerApp");function T(n,e){return de(n.principal,e.grantee,e.created_by??void 0)}o(T,"visibleTo");function _e(n){return typeof n.anchor_node=="string"&&n.anchor_node!==""?n.anchor_node:null}o(_e,"anchorNodeOf");function we(n,e,r,t,d){const c=typeof n.cwd=="string"&&n.cwd.trim()!==""?R(n.cwd):null;if(!te()){if(c===null)throw new s({error:"missing_field",message:'cron arm request requires a non-empty "cwd"',field:"cwd",next:'Send a non-empty string "cwd".'});return c}const O=t!==null&&f(t)!==null?t:void 0,g=o(C=>se(e,C,O,d),"reaches");if(c!==null&&g(c))return c;const a=oe(e).files;if(c!==null&&n.cwd_is_default!==!0)throw new i(400,"invalid_request",`cwd ${c} is not inside a directory this app's cron runs can see, so every run would fail to start; use a directory under ${a}`,{cwd:c,default:a},void 0,{param:"cwd"});const l=r===null?null:f(r)?.cwd??null;return l!==null&&g(l)?l:a}o(we,"resolveArmedCwd");function ge(n){const e=n.body??{},r=j(e,"name"),t=j(e,"command"),d=L(j(e,"fire_at"),"fire_at"),c=typeof e.recur=="string"&&e.recur!==""?he(e.recur):null,O=typeof e.expires_at=="string"&&e.expires_at!==""?L(e.expires_at,"expires_at"):null,g=typeof e.env_json=="string"&&e.env_json!==""?me(e.env_json):null,a=typeof e.sink=="string"&&e.sink.trim()!==""?e.sink.trim():null,l=k(e.on_output,"on_output",["silent","on-failure","always","on-change"],a?.startsWith("node:")?"on-change":"on-failure"),C=k(e.overlap,"overlap",["skip","queue","replace"],"skip"),M=k(e.tier,"tier",["normal","urgent","critical"],"normal"),P=l==="always"||l==="on-change";if(P&&a===null)throw new s({error:"sink_required",message:`on_output "${l}" delivers stdout every qualifying run \u2014 it needs a sink`,field:"sink",next:"Pass sink node:<node-id> (a living node's inbox), spawn:<kind> (birth a fresh node per delivery), or human (the humanloop inbox)."});if(!P&&a!==null)throw new s({error:"sink_unused",message:`on_output "${l}" never delivers stdout \u2014 a sink would be dead config`,field:"sink",next:'Drop the sink, or use on_output "always"/"on-change" if delivery is the point.'});const Y=a!==null?pe(a):"{}";a?.startsWith("spawn:")&&le(n.ceiling,"crtr:act");const m=n.principal.class==="person"?"app:terminal":n.principal.app,h=n.principal.class==="broker"?n.principal.node:typeof e.created_by=="string"&&e.created_by!==""?e.created_by:null;if(n.principal.class==="broker"&&e.created_by!=null&&e.created_by!==h)throw new i(403,"permission_error","a broker may only arm a cron as its own node");const p=h===null?null:f(h);if(p!==null){if(p.grantee!==m)throw new s({error:"creator_app_mismatch",message:"creator node belongs to another app",field:"created_by",next:"Use a node of the calling app."});B(p,"crtr:schedule"),a?.startsWith("spawn:")&&B(p,"crtr:act")}if(e.isolated!==void 0&&typeof e.isolated!="boolean")throw new i(400,"invalid_request","isolated must be a boolean");if(p?.isolated&&e.isolated===!1)throw new i(403,"isolated_run","a cron created by an isolated node cannot escape isolation");const y=p?.isolated===!0||e.isolated===!0;if(y&&p===null)throw new i(400,"invalid_request","an isolated cron requires an existing creator node");const v=y?re(h,m):null;if(v!==null){const I=V(v,typeof e.cwd=="string"&&e.cwd.trim()!==""?R(e.cwd):v);if(I===".."||I.startsWith(`..${D}`)||I.startsWith(D))throw new i(400,"invalid_request","an isolated cron must run in its creating node folder",{param:"cwd"})}const F=v??we(e,m,h,_e(e),y),u=typeof e.anchor_node=="string"&&e.anchor_node!==""?e.anchor_node:null;if(u!==null&&f(u)!==null&&f(u).grantee!==m)throw new s({error:"anchor_app_mismatch",message:"anchor node belongs to another app",field:"anchor_node",next:"Use an anchor of the calling app."});if(u!==null&&f(u)===null)throw new s({error:"anchor_not_found",message:`anchor node ${u} does not exist on the canvas`,field:"anchor_node",next:"Name a live node id, or drop the anchor \u2014 an unanchored cron outlives every node."});const E=e.cancel_on_wake===!0;if(E&&u===null)throw new s({error:"cancel_on_wake_needs_anchor",message:"cancel_on_wake couples the cron to a node's dormancy \u2014 it requires an anchor node",field:"anchor_node",next:"Pass anchor_node with the node whose wake should cancel this cron."});const b=e.run_timeout_s??300;if(typeof b!="number"||!Number.isInteger(b)||b<=0)throw new s({error:"bad_run_timeout",message:`run_timeout_s must be a positive integer (got ${String(e.run_timeout_s)})`,field:"run_timeout_s",next:"Send the timeout in whole seconds, e.g. 300."});const q=typeof e.profile=="string"&&e.profile!==""?ue(n,e.profile).profileId:null,U=k(e.scope,"scope",["profile","global"],q!==null?"profile":"global");if(U==="profile"&&q===null)throw new s({error:"scope_needs_profile",message:'scope "profile" names the profile the cron lists and cancels within \u2014 it requires a profile',field:"profile",next:'Send a profile, or use scope "global" for a canvas-home-wide cron.'});const J=Q();return X({cron_id:J,name:r,created_by:h,grantee:m,isolated:y,command:t,fire_at:d,recur:c,tz:typeof e.tz=="string"?e.tz:null,expires_at:O,anchor_node:u,cancel_on_wake:E,cwd:F,env_json:g,profile:q,scope:U,run_timeout_s:b,overlap:C,on_output:l,sink:Y,tier:M}),{status:201,body:w(_(J),null)}}o(ge,"handleArm");function ye(n){const e=x(n);return{status:200,body:(e===null?N({all:!0}):[...N({profile:e}),...N({global:!0})].sort((t,d)=>t.fire_at<d.fire_at?-1:t.fire_at>d.fire_at?1:0)).filter(t=>T(n,t)).map(t=>w(t,A(t)))}}o(ye,"handleList");function A(n){return W(n.cron_id)[0]??null}o(A,"lastRunOf");function S(n){const e=n.params.cronId,r=_(e);if(r===null||!T(n,r))throw new i(404,"cron_not_found",`no cron ${e}`);if(!Z(r,x(n)))throw new i(404,"cron_not_found",`no cron ${e} in this profile \u2014 it is scoped to another profile`);return r}o(S,"requireCron");function $(n,e){const r=H(n);if(r!==null&&e.grantee!==r)throw new i(403,"other_app_run",`cron ${e.cron_id} belongs to another app`);return e}o($,"requireOwnCron");function ve(n){const e=S(n),r=W(e.cron_id);return{status:200,body:{cron:w(e,r[0]??null),runs:r.map(G)}}}o(ve,"handleShow");function be(n){const e=$(n,S(n));z(e.cron_id,"paused");const r=_(e.cron_id);return{status:200,body:w(r,A(r))}}o(be,"handlePause");function ke(n){const e=$(n,S(n));z(e.cron_id,"active");const r=_(e.cron_id);return{status:200,body:w(r,A(r))}}o(ke,"handleResume");async function Se(n){const e=$(n,S(n));if(e.run_state==="running")throw new i(409,"cron_running",`cron ${e.cron_id} has a run in flight \u2014 wait for it to settle`);const r=await ae(e,{outOfBand:!0});if(r===null)throw new i(409,"cron_running",`cron ${e.cron_id} was claimed by a concurrent run \u2014 check \`cron show\` for its result`);return{status:200,body:G(r)}}o(Se,"handleRun");function $e(n){const e=new Date().toISOString();return{status:200,body:{unparked:ne(e,H(n)),at:e}}}o($e,"handlePoke");function Oe(n){const e=n.params.cronId,r=_(e);if(r!==null&&!T(n,r))throw new i(404,"cron_not_found",`no cron ${e}`);if(r!==null&&!Z(r,x(n)))throw new i(404,"cron_not_found",`no cron ${e} in this profile \u2014 it is scoped to another profile`);r!==null&&$(n,r);const t=n.query.get("run_id"),d=t!==null&&ce(e,t);return ee(e,{preserveRunningProcess:d}),{status:204}}o(Oe,"handleCancel");const Be=[{method:"POST",pattern:"/v1/crons",scope:"crtr:schedule",handler:ge},{method:"GET",pattern:"/v1/crons",handler:ye},{method:"GET",pattern:"/v1/crons/:cronId",handler:ve},{method:"POST",pattern:"/v1/crons/:cronId/pause",scope:"crtr:schedule",handler:be},{method:"POST",pattern:"/v1/crons/:cronId/resume",scope:"crtr:schedule",handler:ke},{method:"POST",pattern:"/v1/crons/poke",scope:"crtr:schedule",handler:$e},{method:"POST",pattern:"/v1/crons/:cronId/run",scope:"crtr:schedule",handler:Se},{method:"DELETE",pattern:"/v1/crons/:cronId",scope:"crtr:schedule",handler:Oe}];export{Be as cronRoutes};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
+
import type { ObjectRow } from '../../../core/graph/types.js';
|
|
3
|
+
import type { RequestContext, RouteTable } from '../router.js';
|
|
4
|
+
/** A token cannot read the graph. Resolve only identity here; authorization follows before any response. */
|
|
5
|
+
export declare function customObjectRef(db: DatabaseSync, raw: string): ObjectRow;
|
|
6
|
+
/** An argv object runs host commands: only a person or node principal may change it or what it watches — never an app or publish token. */
|
|
7
|
+
export declare function fenceArgv(db: DatabaseSync, ctx: RequestContext, object: ObjectRow): void;
|
|
8
|
+
/** A valid object bearer grants only this object; an ordinary principal must act as its owner. */
|
|
9
|
+
export declare function authorizeCustom(db: DatabaseSync, ctx: RequestContext, object: ObjectRow, concealed?: boolean): ObjectRow | null;
|
|
10
|
+
export declare const customObjectRoutes: RouteTable;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var C=Object.defineProperty;var s=(r,e)=>C(r,"name",{value:e,configurable:!0});import{prepared as b}from"../../../core/sqlite-statements.js";import{ApiError as a}from"../../../api/errors.js";import{openDb as F,withCanvasWrite as p}from"../../../core/canvas/db.js";import{registerCustomObject as L,publishCustom as H,unregisterCustomObject as I,pendingFor as N,acknowledge as P,verifyPublishToken as j,mayActAs as _,onQueueSignal as W,customReachable as k}from"../../../core/graph/custom.js";import{getById as E,getByRowid as R}from"../../../core/graph/objects.js";import{readerFor as $}from"../../../core/graph/reader.js";import{resolveName as M}from"../../../core/graph/names.js";import{receiverForObject as z}from"../../../core/graph/receivers.js";import{readerFor as w,resolveRef as B}from"../reader.js";import{isRecord as l}from"./validate.js";import{receiverEndpoint as D,resolveReceiverAddress as Q}from"../../../core/graph/receiver-url.js";const d=s(r=>{throw new a(400,"invalid_request",`invalid ${r}`)},"bad"),f=s(()=>{throw new a(404,"not_found","custom object not found")},"missing");function m(r,e){const n=E(r,e)??(()=>{const o=$(r,{class:"person"},()=>[]),i=M(r,o,e);return"object"in i?i.object:null})();return!n||!n.type.includes(".")||n.deleted_at!==null?f():n}s(m,"customObjectRef");function G(r,e,t){if(z(r,t)==="argv"&&(e.publishToken||e.principal.class!=="person"&&e.principal.class!=="broker"))throw new a(403,"argv_forbidden","argv object requires a person or node principal")}s(G,"fenceArgv");function v(r,e,t,n=!1){if(e.publishToken){if(j(r,t,e.publishToken))return t;if(n)return f();throw new a(401,"invalid_publish_token","invalid publish token")}if(e.principal.class==="anonymous")return f();const o=w(r,e),i=t.owner===null?null:R(r,t.owner);return!i||!_(r,o,i)||!k(r,o,t)?f():o.class==="person"?o.person:o.class==="app"?o.app:o.class==="node"?o.node:o.object}s(v,"authorizeCustom");async function J(r){const e=r.body;if((!l(e)||typeof e.kind!="string"||typeof e.name!="string"||typeof e.description!="string"||!l(e.events)||e.owner!==void 0&&typeof e.owner!="string"||e.rotate_token!==void 0&&typeof e.rotate_token!="boolean")&&d("register request"),l(e.receiver)&&"url"in e.receiver&&typeof e.receiver.url=="string")try{await Q(D(e.receiver.url))}catch(t){throw new a(400,"invalid_receiver",`invalid receiver URL: ${String(t)}`)}return p(t=>{const n=w(t,r),o=e.owner===void 0?n.class==="person"?n.person:n.app:(()=>{const u=B(t,n,e.owner);return"deleted"in u||"remote"in u?f():u})();["person","app","repo","profile"].includes(o.type)||d("owner");const i=L(t,n,{kind:e.kind,name:e.name,owner:o,description:e.description,events:e.events,...e.receiver===void 0?{}:{receiver:e.receiver},rotateToken:e.rotate_token});return{id:i.object.id,name:i.object.name,...i.token?{token:i.token}:{}}})}s(J,"register");function U(r){const e=r.body;return(!l(e)||typeof e.event!="string"||typeof e.summary!="string"||e.cause!==void 0&&typeof e.cause!="string")&&d("publish request"),p(t=>{const n=m(t,r.params.ref),o=v(t,r,n);return H(t,n,o,e)})}s(U,"publish");function K(r){p(e=>{const t=m(e,r.params.ref),n=v(e,r,t);G(e,r,t),I(e,t,n)})}s(K,"unregister");function V(r){const e=r.body;return(!l(e)||!Array.isArray(e.delivery_ids)||e.delivery_ids.some(t=>typeof t!="string"))&&d("delivery_ids"),p(t=>{const n=m(t,r.params.ref);return v(t,r,n,!0),T(t,n),P(t,n,e.delivery_ids)})}s(V,"ack");function T(r,e){if(b(r,"SELECT receiver_json FROM custom_objects WHERE object = ?").get(e.rowid)?.receiver_json!=='"queue"')throw new a(409,"not_a_queue","object does not have a queue receiver")}s(T,"requireQueue");function X(r){const e=r.query.get("after");e!==null&&(!/^\d+$/.test(e)||!Number.isSafeInteger(Number(e)))&&d("after");const t=F(),n=m(t,r.params.ref);v(t,r,n,!0),T(t,n);const o=r.res;o.writeHead(200,{"content-type":"application/x-ndjson; charset=utf-8","cache-control":"no-cache","x-accel-buffering":"no"});let i=-1;const u=s(()=>{const c=E(t,n.id);if(!c||c.deleted_at!==null)return!1;if(r.publishToken)return j(t,c,r.publishToken)&&b(t,"SELECT receiver_json FROM custom_objects WHERE object = ?").get(c.rowid)?.receiver_json==='"queue"';if(r.principal.class==="anonymous")return!1;const y=c.owner===null?null:R(t,c.owner),g=w(t,r);return y!==null&&_(t,g,y)&&k(t,g,c)&&b(t,"SELECT receiver_json FROM custom_objects WHERE object = ?").get(c.rowid)?.receiver_json==='"queue"'},"authorized"),h=s(()=>{if(!(o.destroyed||o.writableEnded)){if(!u()){o.end();return}for(const c of N(t,n,i))o.write(`${JSON.stringify(c)}
|
|
2
|
+
`),i=c.seq}},"flush"),O=W(n.id,h),S=setInterval(()=>{h(),!o.destroyed&&!o.writableEnded&&o.write(`
|
|
3
|
+
`)},15e3),A=s(()=>{clearInterval(S),O()},"close");return o.once("close",A),h(),{status:200}}s(X,"stream");const q=s(r=>e=>({status:200,body:r(e)}),"ok"),ue=[{method:"POST",pattern:"/v1/custom-objects",handler:s(async r=>({status:200,body:await J(r)}),"handler")},{method:"POST",pattern:"/v1/custom-objects/:ref/events",handler:q(U)},{method:"DELETE",pattern:"/v1/custom-objects/:ref",handler:s(r=>(K(r),{status:204}),"handler")},{method:"GET",pattern:"/v1/custom-objects/:ref/deliveries",handler:X},{method:"POST",pattern:"/v1/custom-objects/:ref/deliveries/ack",handler:q(V)}];export{v as authorizeCustom,m as customObjectRef,ue as customObjectRoutes,G as fenceArgv};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var i=Object.defineProperty;var r=(e,t)=>i(e,"name",{value:t,configurable:!0});import{toMigrateStateDTO as u}from"../map.js";import{migrateLooseKeys as m}from"../../../core/layout-migrate/loose-keys.js";import{boundDaemonControl as s}from"../../control.js";import{ownerOnly as c}from"../router.js";function l(){const e=s();if(e===null)throw{status:503,code:"daemon_control_unavailable",message:"this API server is not hosted by a live daemon and cannot hand over"};const{graceMs:t}=e.requestHandover();return{status:202,body:{accepted:!0,predecessor_pid:process.pid,predecessor_epoch:e.epoch,grace_ms:t}}}r(l,"handleRestart");async function y(e){if(e.body!==void 0)throw{status:400,code:"invalid_request",message:"admission request must not include a body"};const t=s();if(t===null)throw{status:503,code:"daemon_control_unavailable",message:"this API server is not hosted by a live daemon and cannot admit normal work"};return{status:200,body:await t.admitStartup()}}r(y,"handleAdmit");async function h(e){const t=s();if(t===null)throw{status:503,code:"daemon_control_unavailable",message:"this API server is not hosted by a live daemon and cannot run the canvas import"};const o=e.body;if(o!==void 0&&(typeof o!="object"||o===null||Array.isArray(o)))throw{status:400,code:"invalid_request",message:"migration request body must be an object"};const n=o??{};if(n.dry_run!==void 0&&typeof n.dry_run!="boolean")throw{status:400,code:"invalid_request",message:"dry_run must be a boolean"};const d=m(n.dry_run===!0),a=await t.repairMigrations({dryRun:n.dry_run===!0});return{status:200,body:{...u(a.result,{resumed:a.resumed,resumeError:a.resumeError}),loose_keys:d}}}r(h,"handleMigrate");const g=c([{method:"POST",pattern:"/v1/daemon/restart",handler:r(e=>l(),"handler")},{method:"POST",pattern:"/v1/daemon/migrate",handler:h},{method:"POST",pattern:"/v1/daemon/admit",handler:y}]);export{g as daemonRoutes};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var d=Object.defineProperty;var t=(r,e)=>d(r,"name",{value:e,configurable:!0});import{ApiError as i}from"../../../api/errors.js";import{retryFailedDaemonAction as o}from"../../../core/canvas/daemon-actions.js";import{retryFailedDelivery as n}from"../../../core/canvas/deliveries.js";const a=/^[0-9a-f]{32}$/;function l(r){const e=r.params.delivery_id??"";if(!a.test(e))throw new i(400,"invalid_request","delivery_id must be the 32-character id of a delivery");if(!n(e)&&!o(e))throw new i(404,"delivery_not_failed",`no failed delivery ${e} to retry (it does not exist, is not permanently failed, or was canceled)`);return{status:200,body:{delivery_id:e,state:"pending"}}}t(l,"handleRetry");const m=[{method:"POST",pattern:"/v1/deliveries/:delivery_id/retry",handler:l}];export{m as deliveryRetryRoutes};
|