@crouton-kit/crouter 0.3.33 → 0.3.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/build-root.js +3 -6
- package/dist/builtin-memory/crouter-development/marketplaces.md +6 -6
- package/dist/builtin-memory/crouter-development/plugins.md +13 -13
- package/dist/builtin-memory/internal/examples/imessage-assistant.md +3 -3
- package/dist/builtin-memory/internal/nodes-and-canvas.md +4 -4
- package/dist/builtin-personas/developer/PERSONA.md +1 -1
- package/dist/builtin-personas/orchestration-kernel.md +1 -1
- package/dist/builtin-personas/waiting.md +1 -1
- package/dist/builtin-pi-packages/pi-crtr-extensions/README.md +71 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/__tests__/crtr-help-gate.test.ts +41 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/__tests__/provider-rotation.test.ts +663 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/__tests__/statusline.test.ts +52 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/claude-plugin-commands.ts +418 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/crouter-help.ts +87 -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 +174 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/crtr-help-gate.ts +408 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/frontmatter-rules/index.ts +442 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/frontmatter-rules/test.ts +119 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/nested-context.ts +327 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/provider-rotation.ts +574 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/statusline.ts +260 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/strip-skills-docs.ts +40 -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 +479 -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 +3385 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/package.json +25 -0
- package/dist/builtin-pi-packages/pi-mode-switch/README.md +64 -0
- package/dist/builtin-pi-packages/pi-mode-switch/bin/mode +40 -0
- package/dist/builtin-pi-packages/pi-mode-switch/extensions/index.ts +427 -0
- package/dist/builtin-pi-packages/pi-mode-switch/package.json +13 -0
- package/dist/clients/attach/__tests__/crtr-output-coverage.test.js +55 -0
- package/dist/clients/attach/__tests__/crtr-output-render.test.js +2340 -0
- package/dist/clients/attach/attach-cmd.js +843 -743
- package/dist/clients/attach/auth-pickers.js +2 -2
- package/dist/clients/attach/canvas-panels.js +1 -1
- package/dist/clients/attach/chat-view.d.ts +3 -2
- package/dist/clients/attach/chat-view.js +30 -10
- package/dist/clients/attach/clipboard-image.js +1 -1
- package/dist/clients/attach/clipboard-text.js +1 -1
- package/dist/clients/attach/config-load.js +1 -1
- package/dist/clients/attach/crtr-output-render.d.ts +48 -0
- package/dist/clients/attach/crtr-output-render.js +646 -0
- package/dist/clients/attach/extension-dialogs.js +1 -1
- package/dist/clients/attach/graph-overlay.js +3 -3
- package/dist/clients/attach/input-controller.js +1 -1
- package/dist/clients/attach/pickers.js +1 -1
- package/dist/clients/attach/slash-commands.js +5 -6
- package/dist/clients/attach/titled-editor.d.ts +4 -0
- package/dist/clients/attach/titled-editor.js +13 -1
- package/dist/clients/attach/view-socket.js +1 -1
- package/dist/clients/web/__tests__/source-cache.test.js +5 -5
- package/dist/clients/web/server.js +29 -5
- package/dist/clients/web/source-cache.js +3 -3
- package/dist/clients/web/web-cmd.js +7 -7
- package/dist/commands/canvas-issue.js +1 -1
- package/dist/commands/canvas-prune.js +24 -2
- package/dist/commands/canvas-snapshot.js +3 -0
- package/dist/commands/canvas-tmux-spread.js +3 -3
- package/dist/commands/human.js +1 -1
- package/dist/commands/memory/lint.js +15 -8
- package/dist/commands/memory/origin.d.ts +1 -0
- package/dist/commands/memory/origin.js +88 -0
- package/dist/commands/memory/shared.d.ts +8 -0
- package/dist/commands/memory/shared.js +22 -1
- package/dist/commands/memory/write.js +17 -12
- package/dist/commands/memory.js +4 -3
- package/dist/commands/node-context.js +4 -4
- package/dist/commands/node-snapshot.js +4 -1
- package/dist/commands/node.d.ts +2 -2
- package/dist/commands/node.js +814 -606
- package/dist/commands/pkg/market-inspect.d.ts +2 -1
- package/dist/commands/pkg/market-inspect.js +14 -32
- package/dist/commands/pkg/market-manage.d.ts +3 -1
- package/dist/commands/pkg/market-manage.js +58 -154
- package/dist/commands/pkg/market.js +7 -7
- package/dist/commands/pkg/plugin-inspect.d.ts +2 -1
- package/dist/commands/pkg/plugin-inspect.js +8 -24
- package/dist/commands/pkg/plugin-manage.d.ts +5 -1
- package/dist/commands/pkg/plugin-manage.js +245 -171
- package/dist/commands/pkg/plugin.js +6 -6
- package/dist/commands/pkg.js +5 -5
- package/dist/commands/revive.js +5 -3
- package/dist/commands/search/answer.js +1 -1
- package/dist/commands/search/contents.js +1 -1
- package/dist/commands/search/web.js +2 -2
- package/dist/commands/search.js +1 -1
- package/dist/commands/surface.d.ts +2 -0
- package/dist/commands/surface.js +43 -0
- package/dist/commands/sys/promptstudio.js +1 -1
- package/dist/commands/sys/settings.js +2 -2
- package/dist/commands/sys/setup-core.d.ts +88 -0
- package/dist/commands/sys/setup-core.js +352 -0
- package/dist/commands/sys/setup.d.ts +2 -0
- package/dist/commands/sys/setup.js +516 -0
- package/dist/commands/sys/sysprompt.js +3 -0
- package/dist/commands/sys.js +3 -2
- package/dist/commands/view-cycle.js +5 -5
- package/dist/commands/view-list.js +3 -3
- package/dist/commands/view-new.js +5 -5
- package/dist/commands/view-pick.js +6 -6
- package/dist/commands/view-run.js +14 -14
- package/dist/commands/view.js +3 -3
- package/dist/commands/workspace.js +10 -10
- package/dist/core/__tests__/boot.test.js +140 -0
- package/dist/core/__tests__/broker-sdk-wiring.test.js +6 -27
- package/dist/core/__tests__/daemon-boot.test.js +22 -0
- package/dist/core/__tests__/fixtures/fake-engine.js +19 -9
- package/dist/core/__tests__/flagship-lifecycle.test.js +4 -1
- package/dist/core/__tests__/full/broker-attach-limits.test.js +1 -1
- package/dist/core/__tests__/full/broker-attach-stream.test.js +1 -1
- package/dist/core/__tests__/full/broker-crash-teardown.test.js +10 -5
- package/dist/core/__tests__/full/broker-model-changed-broadcast.test.js +1 -1
- package/dist/core/__tests__/full/broker-navigate-tree-rewelcome.test.js +2 -2
- package/dist/core/__tests__/full/broker-pane-resolution.test.js +1 -1
- package/dist/core/__tests__/full/cascade-close.test.js +31 -18
- package/dist/core/__tests__/full/detach-focus.test.js +17 -3
- package/dist/core/__tests__/hearth-bootstrap.test.js +136 -0
- package/dist/core/__tests__/helpers/harness.js +1 -1
- package/dist/core/__tests__/live-mutation-verbs.test.js +17 -11
- package/dist/core/__tests__/live-mutation.test.js +15 -10
- package/dist/core/__tests__/migration.test.js +124 -0
- package/dist/core/__tests__/on-read-dedup-resume.test.js +40 -0
- package/dist/core/__tests__/preview-registry-sync.test.js +36 -0
- package/dist/core/__tests__/prune-to-limit.test.js +91 -0
- package/dist/core/__tests__/revive.test.js +64 -21
- package/dist/core/__tests__/trigger-migration.test.js +48 -0
- package/dist/core/__tests__/wake-bearings.test.js +23 -21
- package/dist/core/__tests__/wake-origin.test.js +36 -33
- package/dist/core/canvas/boot.d.ts +48 -0
- package/dist/core/canvas/boot.js +157 -0
- package/dist/core/canvas/canvas.d.ts +27 -1
- package/dist/core/canvas/canvas.js +86 -5
- package/dist/core/canvas/db.js +86 -1
- package/dist/core/canvas/index.d.ts +1 -1
- package/dist/core/canvas/index.js +1 -1
- package/dist/core/canvas/nav-model.js +1 -1
- package/dist/core/canvas/pid.d.ts +6 -0
- package/dist/core/canvas/pid.js +13 -0
- package/dist/core/canvas/triggers.d.ts +108 -0
- package/dist/core/canvas/triggers.js +320 -0
- package/dist/core/canvas/types.d.ts +128 -46
- package/dist/core/command.js +13 -4
- package/dist/core/hearth/__tests__/model-auth-guest.test.js +151 -0
- package/dist/core/hearth/config.d.ts +1 -0
- package/dist/core/hearth/config.js +36 -3
- package/dist/core/hearth/guest-env.d.ts +7 -0
- package/dist/core/hearth/guest-env.js +17 -1
- package/dist/core/hearth/index.d.ts +0 -1
- package/dist/core/hearth/index.js +0 -1
- package/dist/core/hearth/model-auth-guest.d.ts +8 -0
- package/dist/core/hearth/model-auth-guest.js +430 -0
- package/dist/core/hearth/provider.d.ts +13 -6
- package/dist/core/hearth/providers/blaxel-bootstrap.d.ts +2 -0
- package/dist/core/hearth/providers/blaxel-bootstrap.js +127 -19
- package/dist/core/hearth/providers/blaxel-home.d.ts +8 -4
- package/dist/core/hearth/providers/blaxel-home.js +85 -75
- package/dist/core/hearth/providers/blaxel.d.ts +5 -0
- package/dist/core/hearth/providers/blaxel.js +86 -12
- package/dist/core/hearth/providers/types.d.ts +6 -1
- package/dist/core/hearth/types.d.ts +35 -1
- package/dist/core/help.d.ts +16 -0
- package/dist/core/help.js +2 -0
- package/dist/core/memory-resolver.d.ts +8 -8
- package/dist/core/memory-resolver.js +58 -26
- package/dist/core/preview-registry.d.ts +25 -0
- package/dist/core/preview-registry.js +2047 -0
- package/dist/core/resolver.d.ts +1 -0
- package/dist/core/resolver.js +23 -16
- package/dist/core/runtime/bearings.d.ts +11 -10
- package/dist/core/runtime/bearings.js +8 -8
- package/dist/core/runtime/broker-protocol.d.ts +2 -2
- package/dist/core/runtime/broker-protocol.js +2 -2
- package/dist/core/runtime/close.js +2 -2
- package/dist/core/runtime/kickoff.js +1 -1
- package/dist/core/runtime/launch.d.ts +9 -3
- package/dist/core/runtime/launch.js +17 -9
- package/dist/core/runtime/lifecycle.js +7 -7
- package/dist/core/runtime/model-swap.js +1 -1
- package/dist/core/runtime/placement.d.ts +5 -5
- package/dist/core/runtime/placement.js +10 -10
- package/dist/core/runtime/recycle.js +7 -7
- package/dist/core/runtime/reset.d.ts +1 -1
- package/dist/core/runtime/reset.js +3 -3
- package/dist/core/runtime/revive-all.d.ts +5 -2
- package/dist/core/runtime/revive-all.js +5 -2
- package/dist/core/runtime/revive.d.ts +15 -8
- package/dist/core/runtime/revive.js +52 -16
- package/dist/core/runtime/spawn.d.ts +1 -1
- package/dist/core/runtime/spawn.js +7 -7
- package/dist/core/runtime/stop-guard.js +5 -5
- package/dist/core/runtime/surface-bg.js +1 -1
- package/dist/core/runtime/tmux.d.ts +1 -1
- package/dist/core/runtime/tmux.js +4 -4
- package/dist/core/scope.d.ts +9 -0
- package/dist/core/scope.js +37 -15
- package/dist/core/substrate/on-read.js +23 -21
- package/dist/core/substrate/render.js +3 -3
- package/dist/core/view/loader.js +2 -2
- package/dist/core/wake.d.ts +2 -2
- package/dist/core/wake.js +7 -7
- package/dist/daemon/__tests__/predicate-eval.test.js +109 -0
- package/dist/daemon/crtrd.js +222 -103
- package/dist/daemon/predicate-eval.d.ts +52 -0
- package/dist/daemon/predicate-eval.js +248 -0
- package/dist/hearth/control-plane/__tests__/node-message.test.js +60 -0
- package/dist/hearth/control-plane/__tests__/rate-limit-recurrence.test.js +49 -0
- package/dist/hearth/control-plane/__tests__/relay-security.test.js +314 -0
- package/dist/hearth/control-plane/__tests__/scheduler-scan-loop.test.js +133 -0
- package/dist/hearth/control-plane/__tests__/trigger-delivery.test.js +170 -0
- package/dist/hearth/control-plane/__tests__/webhook-ingress.test.js +167 -0
- package/dist/hearth/control-plane/config.d.ts +21 -0
- package/dist/hearth/control-plane/config.js +77 -0
- package/dist/hearth/control-plane/db.d.ts +30 -0
- package/dist/hearth/control-plane/db.js +534 -0
- package/dist/hearth/control-plane/ingress/rate-limit.d.ts +24 -0
- package/dist/hearth/control-plane/ingress/rate-limit.js +100 -0
- package/dist/hearth/control-plane/ingress/route-store.d.ts +31 -0
- package/dist/hearth/control-plane/ingress/route-store.js +61 -0
- package/dist/hearth/control-plane/ingress/webhook-delivery-store.d.ts +41 -0
- package/dist/hearth/control-plane/ingress/webhook-delivery-store.js +69 -0
- package/dist/hearth/control-plane/ingress/webhook-route.d.ts +55 -0
- package/dist/hearth/control-plane/ingress/webhook-route.js +285 -0
- package/dist/hearth/control-plane/main.js +88 -0
- package/dist/hearth/control-plane/node-message.d.ts +31 -0
- package/dist/hearth/control-plane/node-message.js +98 -0
- package/dist/hearth/control-plane/register.d.ts +15 -0
- package/dist/hearth/control-plane/register.js +34 -0
- package/dist/hearth/control-plane/registry.d.ts +17 -0
- package/dist/hearth/control-plane/registry.js +161 -0
- package/dist/hearth/control-plane/relay.d.ts +40 -0
- package/dist/hearth/{wake-proxy/proxy.js → control-plane/relay.js} +201 -275
- package/dist/hearth/control-plane/scheduler/fire-store.d.ts +36 -0
- package/dist/hearth/control-plane/scheduler/fire-store.js +73 -0
- package/dist/hearth/control-plane/scheduler/recurrence.d.ts +7 -0
- package/dist/hearth/control-plane/scheduler/recurrence.js +58 -0
- package/dist/hearth/control-plane/scheduler/scan-loop.d.ts +38 -0
- package/dist/hearth/control-plane/scheduler/scan-loop.js +138 -0
- package/dist/hearth/control-plane/scheduler/schedule-store.d.ts +32 -0
- package/dist/hearth/control-plane/scheduler/schedule-store.js +66 -0
- package/dist/hearth/control-plane/secrets.d.ts +17 -0
- package/dist/hearth/control-plane/secrets.js +113 -0
- package/dist/hearth/control-plane/server.d.ts +27 -0
- package/dist/hearth/control-plane/server.js +346 -0
- package/dist/hearth/control-plane/session.d.ts +68 -0
- package/dist/hearth/control-plane/session.js +273 -0
- package/dist/hearth/control-plane/triggers/acl.d.ts +14 -0
- package/dist/hearth/control-plane/triggers/acl.js +52 -0
- package/dist/hearth/control-plane/triggers/audit-store.d.ts +38 -0
- package/dist/hearth/control-plane/triggers/audit-store.js +79 -0
- package/dist/hearth/control-plane/triggers/deliver.d.ts +43 -0
- package/dist/hearth/control-plane/triggers/deliver.js +76 -0
- package/dist/hearth/control-plane/triggers/envelope.d.ts +29 -0
- package/dist/hearth/control-plane/triggers/envelope.js +38 -0
- package/dist/hearth/control-plane/types.d.ts +66 -0
- package/dist/hearth/control-plane/wake.d.ts +80 -0
- package/dist/hearth/control-plane/wake.js +312 -0
- package/dist/pi-extensions/canvas-doc-substrate.js +28 -2
- package/dist/pi-extensions/canvas-nav.js +1 -1
- package/dist/prompts/view.js +7 -8
- package/dist/types.js +4 -4
- package/dist/web-client/assets/index-DUThOUzU.css +2 -0
- package/dist/web-client/assets/index-IAJVtuVe.js +80 -0
- package/dist/web-client/index.html +2 -2
- package/package.json +12 -9
- package/scripts/postinstall.mjs +8 -0
- package/dist/clients/attach/__tests__/action-parity.test.js +0 -48
- package/dist/clients/attach/__tests__/autocomplete-and-bash-mode.test.js +0 -96
- package/dist/clients/attach/__tests__/bash-bang-routing.test.js +0 -58
- package/dist/clients/attach/__tests__/bundle-pi-tui-dedup.test.js +0 -56
- package/dist/clients/attach/__tests__/clipboard-image.test.js +0 -76
- package/dist/clients/attach/__tests__/editor-newline.test.js +0 -82
- package/dist/clients/attach/__tests__/git-info.test.js +0 -31
- package/dist/clients/attach/__tests__/onrequest-wired.test.js +0 -20
- package/dist/clients/attach/__tests__/reconnect-giveup.test.js +0 -30
- package/dist/clients/attach/__tests__/slash-quit-copy.test.js +0 -42
- package/dist/clients/attach/__tests__/titled-editor.test.js +0 -60
- package/dist/commands/memory/__tests__/lint-schema.test.js +0 -52
- package/dist/core/__tests__/argv-parser.test.js +0 -217
- package/dist/core/__tests__/artifact-paths.test.js +0 -44
- package/dist/core/__tests__/draw-style.test.js +0 -258
- package/dist/core/__tests__/editor-label.test.d.ts +0 -1
- package/dist/core/__tests__/editor-label.test.js +0 -26
- package/dist/core/__tests__/fault-marker.test.d.ts +0 -1
- package/dist/core/__tests__/fault-marker.test.js +0 -112
- package/dist/core/__tests__/fault-retry-rewind.test.d.ts +0 -1
- package/dist/core/__tests__/fault-retry-rewind.test.js +0 -123
- package/dist/core/__tests__/frame-decoder-perf.test.d.ts +0 -1
- package/dist/core/__tests__/frame-decoder-perf.test.js +0 -224
- package/dist/core/__tests__/keystone.test.d.ts +0 -1
- package/dist/core/__tests__/keystone.test.js +0 -185
- package/dist/core/__tests__/listing-completeness.test.d.ts +0 -1
- package/dist/core/__tests__/listing-completeness.test.js +0 -31
- package/dist/core/__tests__/memory-resolver.test.d.ts +0 -1
- package/dist/core/__tests__/memory-resolver.test.js +0 -119
- package/dist/core/__tests__/memory.test.d.ts +0 -1
- package/dist/core/__tests__/memory.test.js +0 -60
- package/dist/core/__tests__/model-ladders.test.d.ts +0 -1
- package/dist/core/__tests__/model-ladders.test.js +0 -160
- package/dist/core/__tests__/node-env.test.d.ts +0 -1
- package/dist/core/__tests__/node-env.test.js +0 -26
- package/dist/core/__tests__/pane-column.test.d.ts +0 -1
- package/dist/core/__tests__/pane-column.test.js +0 -153
- package/dist/core/__tests__/persona-compose.test.d.ts +0 -1
- package/dist/core/__tests__/persona-compose.test.js +0 -53
- package/dist/core/__tests__/persona-subkind.test.d.ts +0 -1
- package/dist/core/__tests__/persona-subkind.test.js +0 -65
- package/dist/core/__tests__/persona.test.d.ts +0 -1
- package/dist/core/__tests__/persona.test.js +0 -107
- package/dist/core/__tests__/unknown-path.test.d.ts +0 -1
- package/dist/core/__tests__/unknown-path.test.js +0 -58
- package/dist/core/canvas/wakeups.d.ts +0 -76
- package/dist/core/canvas/wakeups.js +0 -185
- package/dist/core/hearth/registry.d.ts +0 -15
- package/dist/core/hearth/registry.js +0 -179
- package/dist/hearth/wake-proxy/__tests__/anthropic-oauth.test.d.ts +0 -1
- package/dist/hearth/wake-proxy/__tests__/anthropic-oauth.test.js +0 -289
- package/dist/hearth/wake-proxy/__tests__/config-timeout.test.d.ts +0 -1
- package/dist/hearth/wake-proxy/__tests__/config-timeout.test.js +0 -34
- package/dist/hearth/wake-proxy/__tests__/guest-source.test.d.ts +0 -1
- package/dist/hearth/wake-proxy/__tests__/guest-source.test.js +0 -203
- package/dist/hearth/wake-proxy/__tests__/hardening.test.d.ts +0 -1
- package/dist/hearth/wake-proxy/__tests__/hardening.test.js +0 -59
- package/dist/hearth/wake-proxy/__tests__/hearth-status-route.test.d.ts +0 -1
- package/dist/hearth/wake-proxy/__tests__/hearth-status-route.test.js +0 -372
- package/dist/hearth/wake-proxy/__tests__/http-running-route-fast-path.test.d.ts +0 -1
- package/dist/hearth/wake-proxy/__tests__/http-running-route-fast-path.test.js +0 -258
- package/dist/hearth/wake-proxy/__tests__/model-auth-routes.test.d.ts +0 -1
- package/dist/hearth/wake-proxy/__tests__/model-auth-routes.test.js +0 -437
- package/dist/hearth/wake-proxy/__tests__/source-bridge-gate.test.d.ts +0 -1
- package/dist/hearth/wake-proxy/__tests__/source-bridge-gate.test.js +0 -455
- package/dist/hearth/wake-proxy/__tests__/static-asset-allowlist.test.d.ts +0 -1
- package/dist/hearth/wake-proxy/__tests__/static-asset-allowlist.test.js +0 -15
- package/dist/hearth/wake-proxy/__tests__/warm-path-concurrency.test.d.ts +0 -1
- package/dist/hearth/wake-proxy/__tests__/warm-path-concurrency.test.js +0 -141
- package/dist/hearth/wake-proxy/__tests__/ws-teardown-accounting.test.d.ts +0 -1
- package/dist/hearth/wake-proxy/__tests__/ws-teardown-accounting.test.js +0 -143
- package/dist/hearth/wake-proxy/anthropic-oauth.d.ts +0 -58
- package/dist/hearth/wake-proxy/anthropic-oauth.js +0 -189
- package/dist/hearth/wake-proxy/auth.d.ts +0 -22
- package/dist/hearth/wake-proxy/auth.js +0 -128
- package/dist/hearth/wake-proxy/config.d.ts +0 -2
- package/dist/hearth/wake-proxy/config.js +0 -151
- package/dist/hearth/wake-proxy/guest-source.d.ts +0 -14
- package/dist/hearth/wake-proxy/guest-source.js +0 -130
- package/dist/hearth/wake-proxy/hearth-status.d.ts +0 -44
- package/dist/hearth/wake-proxy/hearth-status.js +0 -267
- package/dist/hearth/wake-proxy/home.d.ts +0 -67
- package/dist/hearth/wake-proxy/home.js +0 -297
- package/dist/hearth/wake-proxy/main.js +0 -134
- package/dist/hearth/wake-proxy/model-auth.d.ts +0 -13
- package/dist/hearth/wake-proxy/model-auth.js +0 -345
- package/dist/hearth/wake-proxy/proxy.d.ts +0 -35
- package/dist/hearth/wake-proxy/public-source-gate.d.ts +0 -9
- package/dist/hearth/wake-proxy/public-source-gate.js +0 -409
- package/dist/hearth/wake-proxy/redact.d.ts +0 -1
- package/dist/hearth/wake-proxy/redact.js +0 -17
- package/dist/hearth/wake-proxy/server.d.ts +0 -11
- package/dist/hearth/wake-proxy/server.js +0 -142
- package/dist/hearth/wake-proxy/state.d.ts +0 -18
- package/dist/hearth/wake-proxy/state.js +0 -342
- package/dist/hearth/wake-proxy/types.d.ts +0 -76
- package/dist/web-client/assets/index-BZUxTkv5.css +0 -2
- package/dist/web-client/assets/index-D36PNBj4.js +0 -80
- /package/dist/clients/attach/__tests__/{action-parity.test.d.ts → crtr-output-coverage.test.d.ts} +0 -0
- /package/dist/clients/attach/__tests__/{autocomplete-and-bash-mode.test.d.ts → crtr-output-render.test.d.ts} +0 -0
- /package/dist/{clients/attach/__tests__/bash-bang-routing.test.d.ts → core/__tests__/boot.test.d.ts} +0 -0
- /package/dist/{clients/attach/__tests__/bundle-pi-tui-dedup.test.d.ts → core/__tests__/hearth-bootstrap.test.d.ts} +0 -0
- /package/dist/{clients/attach/__tests__/clipboard-image.test.d.ts → core/__tests__/preview-registry-sync.test.d.ts} +0 -0
- /package/dist/{clients/attach/__tests__/editor-newline.test.d.ts → core/__tests__/prune-to-limit.test.d.ts} +0 -0
- /package/dist/{clients/attach/__tests__/git-info.test.d.ts → core/__tests__/trigger-migration.test.d.ts} +0 -0
- /package/dist/{clients/attach/__tests__/onrequest-wired.test.d.ts → core/hearth/__tests__/model-auth-guest.test.d.ts} +0 -0
- /package/dist/{clients/attach/__tests__/reconnect-giveup.test.d.ts → daemon/__tests__/predicate-eval.test.d.ts} +0 -0
- /package/dist/{clients/attach/__tests__/slash-quit-copy.test.d.ts → hearth/control-plane/__tests__/node-message.test.d.ts} +0 -0
- /package/dist/{clients/attach/__tests__/titled-editor.test.d.ts → hearth/control-plane/__tests__/rate-limit-recurrence.test.d.ts} +0 -0
- /package/dist/{commands/memory/__tests__/lint-schema.test.d.ts → hearth/control-plane/__tests__/relay-security.test.d.ts} +0 -0
- /package/dist/{core/__tests__/argv-parser.test.d.ts → hearth/control-plane/__tests__/scheduler-scan-loop.test.d.ts} +0 -0
- /package/dist/{core/__tests__/artifact-paths.test.d.ts → hearth/control-plane/__tests__/trigger-delivery.test.d.ts} +0 -0
- /package/dist/{core/__tests__/draw-style.test.d.ts → hearth/control-plane/__tests__/webhook-ingress.test.d.ts} +0 -0
- /package/dist/hearth/{wake-proxy → control-plane}/main.d.ts +0 -0
- /package/dist/hearth/{wake-proxy → control-plane}/types.js +0 -0
package/dist/core/resolver.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { InstalledMarketplace, InstalledPlugin, Scope } from '../types.js';
|
|
2
|
+
export declare function listInstalledPluginsInRoot(scope: Scope, scopeRootPath: string): InstalledPlugin[];
|
|
2
3
|
export declare function listInstalledPlugins(scope: Scope): InstalledPlugin[];
|
|
3
4
|
export declare function listAllPlugins(): InstalledPlugin[];
|
|
4
5
|
export declare function findPluginByName(name: string, scope?: Scope): InstalledPlugin | null;
|
package/dist/core/resolver.js
CHANGED
|
@@ -1,40 +1,47 @@
|
|
|
1
1
|
import { join } from 'node:path';
|
|
2
|
+
import { CONFIG_FILE } from '../types.js';
|
|
2
3
|
import { readConfig } from './config.js';
|
|
3
|
-
import { listDirs, pathExists } from './fs-utils.js';
|
|
4
|
+
import { listDirs, pathExists, readJsonIfExists } from './fs-utils.js';
|
|
4
5
|
import { readMarketplaceManifest, readPluginManifest } from './manifest.js';
|
|
5
6
|
import { InputError } from './io.js';
|
|
6
|
-
import { marketplacesDir,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
import { marketplacesDir, projectScopeRoot, scopeRoot, userScopeRoot, } from './scope.js';
|
|
8
|
+
function pluginConfigForRoot(root) {
|
|
9
|
+
const cfg = readJsonIfExists(join(root, CONFIG_FILE));
|
|
10
|
+
return cfg && cfg.plugins && typeof cfg.plugins === 'object' ? cfg.plugins : {};
|
|
11
|
+
}
|
|
12
|
+
export function listInstalledPluginsInRoot(scope, scopeRootPath) {
|
|
13
|
+
const dir = join(scopeRootPath, 'plugins');
|
|
14
|
+
if (!pathExists(dir))
|
|
12
15
|
return [];
|
|
13
|
-
const cfg =
|
|
16
|
+
const cfg = pluginConfigForRoot(scopeRootPath);
|
|
14
17
|
const out = [];
|
|
15
18
|
for (const name of listDirs(dir)) {
|
|
16
19
|
const root = join(dir, name);
|
|
17
20
|
const manifest = readPluginManifest(root);
|
|
18
21
|
if (!manifest)
|
|
19
22
|
continue;
|
|
20
|
-
const entry = cfg
|
|
21
|
-
|
|
22
|
-
if (entry && entry.version !== undefined)
|
|
23
|
-
version = entry.version;
|
|
24
|
-
else if (manifest.version !== undefined)
|
|
25
|
-
version = manifest.version;
|
|
23
|
+
const entry = cfg[name];
|
|
24
|
+
const version = typeof entry?.version === 'string' ? entry.version : manifest.version;
|
|
26
25
|
out.push({
|
|
27
26
|
name,
|
|
28
27
|
scope,
|
|
29
28
|
root,
|
|
30
29
|
manifest,
|
|
31
|
-
enabled: entry ? entry.enabled : true,
|
|
32
|
-
sourceMarketplace: entry ? entry.source_marketplace : undefined,
|
|
30
|
+
enabled: typeof entry?.enabled === 'boolean' ? entry.enabled : true,
|
|
31
|
+
sourceMarketplace: typeof entry?.source_marketplace === 'string' ? entry.source_marketplace : undefined,
|
|
33
32
|
version,
|
|
34
33
|
});
|
|
35
34
|
}
|
|
36
35
|
return out;
|
|
37
36
|
}
|
|
37
|
+
export function listInstalledPlugins(scope) {
|
|
38
|
+
// The builtin scope has no scopeRoot, so this returns [] — builtin content is
|
|
39
|
+
// the memory substrate, not plugins.
|
|
40
|
+
const root = scopeRoot(scope);
|
|
41
|
+
if (!root)
|
|
42
|
+
return [];
|
|
43
|
+
return listInstalledPluginsInRoot(scope, root);
|
|
44
|
+
}
|
|
38
45
|
export function listAllPlugins() {
|
|
39
46
|
const scopes = [];
|
|
40
47
|
if (projectScopeRoot())
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Trigger } from '../canvas/index.js';
|
|
2
2
|
/** The `<project_context>` block for the files discovered from `cwd`, plus the
|
|
3
3
|
* cwd/git environment snapshot that now rides at the end of the wrapper.
|
|
4
4
|
* Always emits the wrapper because the environment snapshot is always present
|
|
@@ -32,26 +32,27 @@ export declare function buildGraphMap(nodeId: string): string;
|
|
|
32
32
|
* contradiction with no referent). Also prepended to a fork's kickoff prompt in
|
|
33
33
|
* spawn.ts. Exported for testing. */
|
|
34
34
|
export declare function buildIdentityAssertion(nodeId: string): string;
|
|
35
|
-
/** Why a node woke or was born, as carried from the fired
|
|
35
|
+
/** Why a node woke or was born, as carried from the fired trigger row to the
|
|
36
36
|
* injection seam. `ownerName` is the armer's resolved display name when it
|
|
37
37
|
* still exists (a reaped cron's armer renders as a bare id, never crashes). */
|
|
38
38
|
export interface WakeOrigin {
|
|
39
|
-
/**
|
|
40
|
-
*
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
/** Which enactment birthed/woke the node — the only two action_modes that
|
|
40
|
+
* ever route through this provenance block; inbox_message/deadline_message
|
|
41
|
+
* self-mark via their inbox label at the message seam instead. */
|
|
42
|
+
kind: 'fresh_revive' | 'node_birth';
|
|
43
|
+
/** The armer node id (triggers.owner_id), or null if somehow absent. */
|
|
43
44
|
ownerId: string | null;
|
|
44
45
|
/** The armer's display name, resolved if it still exists. */
|
|
45
46
|
ownerName?: string;
|
|
46
|
-
/**
|
|
47
|
+
/** triggers.created — when the trigger was armed (ISO). */
|
|
47
48
|
armedAt: string;
|
|
48
|
-
/**
|
|
49
|
+
/** triggers.recur JSON when recurring, else null/undefined for a one-shot. */
|
|
49
50
|
recur?: string | null;
|
|
50
51
|
}
|
|
51
|
-
/** Build a WakeOrigin from a fired
|
|
52
|
+
/** Build a WakeOrigin from a fired trigger row, resolving the armer's display
|
|
52
53
|
* name if the node still exists. The daemon calls this at fire time for the
|
|
53
54
|
* bare-revive and spawn-birth seams. */
|
|
54
|
-
export declare function wakeOriginFrom(
|
|
55
|
+
export declare function wakeOriginFrom(t: Trigger): WakeOrigin;
|
|
55
56
|
/** The <crtr-wake> provenance block — load-bearing agent-facing prose read by
|
|
56
57
|
* every wake-born or wake-woken node. Decision-first: it leads with the fact a
|
|
57
58
|
* TIMER (not a message/event) caused this turn, names the wake kind, surfaces
|
|
@@ -332,17 +332,17 @@ export function buildIdentityAssertion(nodeId) {
|
|
|
332
332
|
}
|
|
333
333
|
return lines.join('\n');
|
|
334
334
|
}
|
|
335
|
-
/** Build a WakeOrigin from a fired
|
|
335
|
+
/** Build a WakeOrigin from a fired trigger row, resolving the armer's display
|
|
336
336
|
* name if the node still exists. The daemon calls this at fire time for the
|
|
337
337
|
* bare-revive and spawn-birth seams. */
|
|
338
|
-
export function wakeOriginFrom(
|
|
339
|
-
const owner =
|
|
338
|
+
export function wakeOriginFrom(t) {
|
|
339
|
+
const owner = t.owner_id != null ? getNode(t.owner_id) : null;
|
|
340
340
|
return {
|
|
341
|
-
kind:
|
|
342
|
-
ownerId:
|
|
341
|
+
kind: t.action_mode === 'node_birth' ? 'node_birth' : 'fresh_revive',
|
|
342
|
+
ownerId: t.owner_id ?? null,
|
|
343
343
|
ownerName: owner !== null ? fullName(owner) : undefined,
|
|
344
|
-
armedAt:
|
|
345
|
-
recur:
|
|
344
|
+
armedAt: t.created,
|
|
345
|
+
recur: t.recur,
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
348
|
/** The armer rendered for prose, ROLE-explicit so a newborn never mistakes the
|
|
@@ -372,7 +372,7 @@ export function buildWakeBearings(origin) {
|
|
|
372
372
|
const recurring = origin.recur !== null && origin.recur !== undefined && origin.recur !== '';
|
|
373
373
|
const cadence = recurring ? cadenceDisplay(origin.recur) : null;
|
|
374
374
|
let body;
|
|
375
|
-
if (origin.kind === '
|
|
375
|
+
if (origin.kind === 'node_birth') {
|
|
376
376
|
const armer = armerPhrase(origin);
|
|
377
377
|
body = recurring
|
|
378
378
|
? `You were BORN by a scheduled wake, not spawned on demand — a recurring spawn-cron armed by ` +
|
|
@@ -315,7 +315,7 @@ export interface WelcomeFrame {
|
|
|
315
315
|
pending_dialog?: RpcExtensionUIRequest | null;
|
|
316
316
|
/** The pi agent dir (`~/.pi/agent`) from the broker's process — so the viewer
|
|
317
317
|
* can construct an AuthStorage/ModelRegistry pointing at the SAME auth.json.
|
|
318
|
-
* crtr attach is tmux-local only: broker + viewer share a filesystem. */
|
|
318
|
+
* crtr surface attach is tmux-local only: broker + viewer share a filesystem. */
|
|
319
319
|
agentDir?: string;
|
|
320
320
|
}
|
|
321
321
|
export interface ControlChangedFrame {
|
|
@@ -552,7 +552,7 @@ export declare const BROKER_READ_CAPS: FrameDecoderCaps;
|
|
|
552
552
|
* arriving in ~64 KiB socket chunks costs O(frame) total instead of O(frame ×
|
|
553
553
|
* chunks). The old `buf += chunk; buf.indexOf('\n')` shape flattened + re-walked
|
|
554
554
|
* the whole carry per chunk: a 16 MiB welcome snapshot cost ~250 ms of
|
|
555
|
-
* event-loop stall in `crtr attach` (typing lag) and the same again in the
|
|
555
|
+
* event-loop stall in `crtr surface attach` (typing lag) and the same again in the
|
|
556
556
|
* broker; this shape decodes it in ~13 ms.
|
|
557
557
|
*
|
|
558
558
|
* A `StringDecoder` decodes incoming Buffer chunks: an incomplete trailing
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// broker-protocol.ts — the client↔broker wire protocol for the headless node
|
|
2
2
|
// Surface (design §5.2). Pure types + a newline-delimited JSON codec; no I/O, no
|
|
3
3
|
// SDK construction. Consumed by the broker (src/core/runtime/broker.ts) and, in
|
|
4
|
-
// Phase 4, by the `crtr attach` terminal client and the
|
|
4
|
+
// Phase 4, by the `crtr surface attach` terminal client and the surface web bridge.
|
|
5
5
|
//
|
|
6
6
|
// The transport is one unix socket per node (`nodeDir(id)/view.sock`) speaking
|
|
7
7
|
// newline-delimited JSON frames. Live engine events are relayed VERBATIM — the
|
|
@@ -88,7 +88,7 @@ export const BROKER_READ_CAPS = {
|
|
|
88
88
|
* arriving in ~64 KiB socket chunks costs O(frame) total instead of O(frame ×
|
|
89
89
|
* chunks). The old `buf += chunk; buf.indexOf('\n')` shape flattened + re-walked
|
|
90
90
|
* the whole carry per chunk: a 16 MiB welcome snapshot cost ~250 ms of
|
|
91
|
-
* event-loop stall in `crtr attach` (typing lag) and the same again in the
|
|
91
|
+
* event-loop stall in `crtr surface attach` (typing lag) and the same again in the
|
|
92
92
|
* broker; this shape decodes it in ~13 ms.
|
|
93
93
|
*
|
|
94
94
|
* A `StringDecoder` decodes incoming Buffer chunks: an incomplete trailing
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// close.ts — the "close this node + its subtree" action behind `crtr node close`.
|
|
1
|
+
// close.ts — the "close this node + its subtree" action behind `crtr node lifecycle close`.
|
|
2
2
|
//
|
|
3
3
|
// Closing a node tears down the focused node and every descendant it
|
|
4
4
|
// EXCLUSIVELY owns, walking DOWN the subscribes_to spine (subscriptionsOf = a
|
|
@@ -177,7 +177,7 @@ export function closeNode(rootId, opts = {}) {
|
|
|
177
177
|
}
|
|
178
178
|
// 4) Wake any SURVIVING manager subscribed to this node — the doctrine wake.
|
|
179
179
|
// A node going dormant trusts the runtime to wake it on a child's
|
|
180
|
-
// terminal outcome; D-1 found that `node close` notified ONLY the closed
|
|
180
|
+
// terminal outcome; D-1 found that `node lifecycle close` notified ONLY the closed
|
|
181
181
|
// node itself, never its subscribers, so a parent that delegated then
|
|
182
182
|
// just stopped hangs forever when its child is closed out from under it.
|
|
183
183
|
// Only the close ROOT can have a surviving subscriber (closingSet adds a
|
|
@@ -268,7 +268,7 @@ export function buildReviveKickoff(meta, bearings, wakeReason) {
|
|
|
268
268
|
'directly with the user, so stay available and continue the conversation when they ' +
|
|
269
269
|
'write back.');
|
|
270
270
|
// Persona-transition catch-up. If the node's mode/lifecycle was changed
|
|
271
|
-
// EXTERNALLY while it was dormant (e.g. a human ran `crtr node lifecycle` /
|
|
271
|
+
// EXTERNALLY while it was dormant (e.g. a human ran `crtr node config --lifecycle` /
|
|
272
272
|
// `node promote --node` on it), it never saw the turn_end injector. drainBearings
|
|
273
273
|
// captured the guidance for its new persona and committed the ack (the second
|
|
274
274
|
// and only other delivery site); we just surface it. A clean fresh revive has
|
|
@@ -77,8 +77,12 @@ export interface PiInvocation {
|
|
|
77
77
|
* — pi COPIES that conversation into a NEW session for this node, then `prompt`
|
|
78
78
|
* is delivered as the next message. One-shot at birth: the node thereafter
|
|
79
79
|
* captures its OWN pi_session_file and revives by `--session` like any other.
|
|
80
|
-
* - revive idle/done: pass `resumeSessionPath` (absolute .jsonl path
|
|
81
|
-
*
|
|
80
|
+
* - revive idle/done: pass `resumeSessionPath` (absolute .jsonl path) to
|
|
81
|
+
* `--session` (keeps conversation). `resumeSessionId` (a bare uuid) is
|
|
82
|
+
* accepted here too, but revive.ts's `resumeArgs` never produces one —
|
|
83
|
+
* `headlessBrokerHost`'s preflight (host.ts) fatally rejects a bare
|
|
84
|
+
* `--session` id before ever spawning the broker, so a real revive only
|
|
85
|
+
* ever resumes by path (or falls through to fresh when no path exists).
|
|
82
86
|
* - refresh-yield: fresh again (no resume) — the node re-reads its roadmap. */
|
|
83
87
|
export declare function buildPiArgv(meta: NodeMeta, opts?: {
|
|
84
88
|
prompt?: string;
|
|
@@ -104,7 +108,9 @@ export interface BrokerSdkConfig {
|
|
|
104
108
|
forkFrom?: string;
|
|
105
109
|
/** Resume by absolute `.jsonl` path (preferred — `SessionManager.open`). */
|
|
106
110
|
resumeSessionPath?: string;
|
|
107
|
-
/** Resume by bare session uuid
|
|
111
|
+
/** Resume by bare session uuid. Accepted by the generic builder, but no live
|
|
112
|
+
* caller sets it — revive resumes by absolute path only, and the broker
|
|
113
|
+
* preflight rejects a bare `--session`. */
|
|
108
114
|
resumeSessionId?: string;
|
|
109
115
|
/** Model spec, e.g. `anthropic/sonnet` (`--model`). */
|
|
110
116
|
model?: string;
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
//
|
|
3
3
|
// pi-only. No claude branch — we are a super-opinionated system. A node's
|
|
4
4
|
// LaunchSpec (persisted in meta.json) is the canonical recipe the daemon
|
|
5
|
-
// replays to revive it faithfully: `--session <
|
|
6
|
-
//
|
|
5
|
+
// replays to revive it faithfully: `--session <path>` (the saved conversation's
|
|
6
|
+
// absolute .jsonl) to wake a done/idle node, or fresh (against the context dir)
|
|
7
|
+
// for a refresh-yield.
|
|
7
8
|
// The spec is rewritten on every polymorph (base→orchestrator) so a node
|
|
8
9
|
// always comes back as its *current* self.
|
|
9
10
|
import { existsSync, mkdirSync, statSync, writeFileSync } from 'node:fs';
|
|
@@ -249,8 +250,12 @@ function writeSystemPromptFile(nodeId, prompt) {
|
|
|
249
250
|
* — pi COPIES that conversation into a NEW session for this node, then `prompt`
|
|
250
251
|
* is delivered as the next message. One-shot at birth: the node thereafter
|
|
251
252
|
* captures its OWN pi_session_file and revives by `--session` like any other.
|
|
252
|
-
* - revive idle/done: pass `resumeSessionPath` (absolute .jsonl path
|
|
253
|
-
*
|
|
253
|
+
* - revive idle/done: pass `resumeSessionPath` (absolute .jsonl path) to
|
|
254
|
+
* `--session` (keeps conversation). `resumeSessionId` (a bare uuid) is
|
|
255
|
+
* accepted here too, but revive.ts's `resumeArgs` never produces one —
|
|
256
|
+
* `headlessBrokerHost`'s preflight (host.ts) fatally rejects a bare
|
|
257
|
+
* `--session` id before ever spawning the broker, so a real revive only
|
|
258
|
+
* ever resumes by path (or falls through to fresh when no path exists).
|
|
254
259
|
* - refresh-yield: fresh again (no resume) — the node re-reads its roadmap. */
|
|
255
260
|
export function buildPiArgv(meta, opts = {}) {
|
|
256
261
|
const spec = meta.launch;
|
|
@@ -264,8 +269,10 @@ export function buildPiArgv(meta, opts = {}) {
|
|
|
264
269
|
// absolute FILE path when present: pi resolves a bare id cwd-relative first
|
|
265
270
|
// and shows a cross-project "Fork? [y/N]" prompt when the revive cwd differs
|
|
266
271
|
// from the session's creation cwd, whereas a path (contains `/` or ends
|
|
267
|
-
// `.jsonl`) is opened directly — immune to any cwd discrepancy.
|
|
268
|
-
//
|
|
272
|
+
// `.jsonl`) is opened directly — immune to any cwd discrepancy. In practice
|
|
273
|
+
// revive always passes the absolute path: a resume happens only when the saved
|
|
274
|
+
// `.jsonl` exists (resumeArgs), and the broker preflight rejects a bare id
|
|
275
|
+
// outright, so `resumeSessionId` is a generic builder param no live caller sets.
|
|
269
276
|
// `--fork <path|id>` is the spawn-time branch: pi copies the source session
|
|
270
277
|
// into a fresh one for this node (the source is untouched), then delivers the
|
|
271
278
|
// kickoff prompt as the next message. Mutually exclusive with `--session`
|
|
@@ -328,9 +335,10 @@ export function piInvocationToSdkConfig(inv) {
|
|
|
328
335
|
break;
|
|
329
336
|
case '--session': {
|
|
330
337
|
const v = argv[++i];
|
|
331
|
-
// A path (contains `/` or ends `.jsonl`) resumes via SessionManager.open
|
|
332
|
-
//
|
|
333
|
-
//
|
|
338
|
+
// A path (contains `/` or ends `.jsonl`) resumes via SessionManager.open.
|
|
339
|
+
// A bare uuid is classified here for completeness but is rejected by the
|
|
340
|
+
// broker preflight and never produced by revive — the live path is always
|
|
341
|
+
// the absolute path. Same classification buildPiArgv documents.
|
|
334
342
|
if (v.includes('/') || v.endsWith('.jsonl'))
|
|
335
343
|
cfg.resumeSessionPath = v;
|
|
336
344
|
else
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
// row UPDATE directly via openDb — the one sanctioned exception to "only
|
|
36
36
|
// canvas.ts touches the db" (see canvas/CLAUDE.md), exactly as db.ts's backfill
|
|
37
37
|
// is the sanctioned exception for a data migration.
|
|
38
|
-
import { openDb, getNode,
|
|
38
|
+
import { openDb, getNode, cancelTriggersFor, cancelSelfAlarms } from '../canvas/index.js';
|
|
39
39
|
const ANY = '*';
|
|
40
40
|
/** The supervised statuses — a live node the daemon watches. */
|
|
41
41
|
const LIVE = ['active', 'idle'];
|
|
@@ -88,19 +88,19 @@ export function transition(nodeId, event) {
|
|
|
88
88
|
else if (writeIntent) {
|
|
89
89
|
db.prepare('UPDATE nodes SET intent = ? WHERE node_id = ?').run(spec.intent ?? null, nodeId);
|
|
90
90
|
}
|
|
91
|
-
//
|
|
91
|
+
// Triggers cleanup — writes a DIFFERENT table (triggers) AFTER the atomic
|
|
92
92
|
// status/intent write above, so the single-(status,intent)-writer rule holds.
|
|
93
|
-
// Event-gated; exactly ONE delegated
|
|
94
|
-
//
|
|
95
|
-
// cancel →
|
|
96
|
-
//
|
|
93
|
+
// Event-gated; exactly ONE delegated triggers helper per event, never inline
|
|
94
|
+
// triggers SQL here (design §6.7 / D2 / D6, Q1/Q2):
|
|
95
|
+
// cancel → cancelTriggersFor: reap node-anchored AND owner-armed detached
|
|
96
|
+
// triggers this node armed (ruling A) — covers both cancel sites
|
|
97
97
|
// uniformly (close cascade · reapDescendants).
|
|
98
98
|
// finalize → cancelSelfAlarms: clear this node's one-shot self-alarms only;
|
|
99
99
|
// node-anchored declarative crons SURVIVE a finishing instance (Q1).
|
|
100
100
|
// crash → NOTHING. A fault is not a deliberate end-of-waiting; self-alarms
|
|
101
101
|
// and crons MUST survive instance death (D2 / Invariant E / AC-R3).
|
|
102
102
|
if (event === 'cancel')
|
|
103
|
-
|
|
103
|
+
cancelTriggersFor(nodeId);
|
|
104
104
|
else if (event === 'finalize')
|
|
105
105
|
cancelSelfAlarms(nodeId);
|
|
106
106
|
return getNode(nodeId);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// model-swap.ts — the engine behind `crtr node
|
|
1
|
+
// model-swap.ts — the engine behind `crtr node config`: swap a node's model
|
|
2
2
|
// (and thus its provider) WITHOUT attaching a viewer, persisting the choice so
|
|
3
3
|
// it survives revives. Two paths, chosen on broker liveness:
|
|
4
4
|
//
|
|
@@ -51,21 +51,21 @@ export interface FocusResult {
|
|
|
51
51
|
inPlace: boolean;
|
|
52
52
|
revived: boolean;
|
|
53
53
|
}
|
|
54
|
-
/** Env for a `crtr attach` VIEWER pane (the focus split, the spawn viewer
|
|
54
|
+
/** Env for a `crtr surface attach` VIEWER pane (the focus split, the spawn viewer
|
|
55
55
|
* window, AND recycle's re-attach respawn): propagate CRTR_HOME so the viewer
|
|
56
56
|
* resolves the SAME canvas home — and thus the right view.sock — under a
|
|
57
57
|
* non-default override; otherwise an empty env (the pane inherits the tmux
|
|
58
58
|
* server env, like every other crtr chrome pane). One helper so the viewer-pane
|
|
59
59
|
* sites can't drift. */
|
|
60
60
|
export declare function viewerSplitEnv(): Record<string, string>;
|
|
61
|
-
/** Register a `crtr attach` VIEWER pane as the node's one viewer focus row.
|
|
61
|
+
/** Register a `crtr surface attach` VIEWER pane as the node's one viewer focus row.
|
|
62
62
|
* UNIQUE(node_id) ⇒ one viewer per node: returns
|
|
63
63
|
* the existing row (no insert) when the pane or the node is already registered.
|
|
64
64
|
* `window` is accepted for the call contract (spawn passes it) but not stored —
|
|
65
65
|
* the focuses table keys on pane + session only. The attach client self-tags the
|
|
66
66
|
* pane `@crtr_node` on connect, so `nodeInPane` resolves it either way. */
|
|
67
67
|
export declare function registerViewerFocus(nodeId: string, pane: string, session: string | null, window: string | null): FocusRow | null;
|
|
68
|
-
/** Open a
|
|
68
|
+
/** Open a surface-attach viewer for `nodeId` and register its viewer focus row —
|
|
69
69
|
* the shared opener used by `focus` (a split beside the caller) and by a --root
|
|
70
70
|
* spawn (a fresh window in the caller's current session). Wraps `ensureSession`
|
|
71
71
|
* + `openNodeWindow`/`splitWindow` + `registerViewerFocus`. The attach client
|
|
@@ -92,9 +92,9 @@ export declare function focus(nodeId: string, opts: {
|
|
|
92
92
|
* and drop its registry row. Best-effort tmux; the DB write always lands. No-op
|
|
93
93
|
* when the node has no viewer. */
|
|
94
94
|
export declare function tearDownNode(nodeId: string): void;
|
|
95
|
-
/** Detach a node from the foreground (the `node lifecycle --detach` / Alt+C → D
|
|
95
|
+
/** Detach a node from the foreground (the `node lifecycle demote --detach` / Alt+C → D
|
|
96
96
|
* half). Every node is a headless broker — the only thing on screen is its
|
|
97
|
-
*
|
|
97
|
+
* surface-attach viewer pane — so "detach" means STOP FOREGROUNDING it: close the
|
|
98
98
|
* viewer pane (and drop its row) and leave the broker engine running untouched,
|
|
99
99
|
* reconnectable by a later `focus`. `pane` is the authoritative pane the caller
|
|
100
100
|
* acts on (the Alt+C menu's `#{pane_id}`); falls back to the node's registered
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
//
|
|
3
3
|
// After the broker-is-the-host cut the engine NEVER lives in a tmux pane: every
|
|
4
4
|
// node is a detached `headlessBrokerHost` process that binds `view.sock`. A tmux
|
|
5
|
-
// pane is only a
|
|
5
|
+
// pane is only a surface-attach viewer of that broker, exactly like a web tab. So
|
|
6
6
|
// the whole engine-in-pane placement machinery (hot-swap, resume-into-focus,
|
|
7
7
|
// backstage relocation, remain-on-exit freeze, spread, node-row reconcile) is
|
|
8
8
|
// gone. What remains is:
|
|
@@ -40,7 +40,7 @@ import { isPidAlive } from '../canvas/pid.js';
|
|
|
40
40
|
// `selectLayout` are FRESH minimal viewer-chrome helpers (not the deleted
|
|
41
41
|
// engine-in-pane `breakPaneToSession`): `canvas tmux-spread` breaks the caller's
|
|
42
42
|
// viewer pane into its own window and tiles sibling viewers beside it.
|
|
43
|
-
// `piCommand` + `paneCurrentPath` are KEPT: the sessionless
|
|
43
|
+
// `piCommand` + `paneCurrentPath` are KEPT: the sessionless surface-view system
|
|
44
44
|
// (view-cycle.ts / view-run.ts) builds its pane commands with them, and the §5.1
|
|
45
45
|
// import-lint forbids those commands importing tmux.ts directly — they must reach
|
|
46
46
|
// the driver through placement. (They are NOT engine-in-pane; the design's
|
|
@@ -185,7 +185,7 @@ export async function waitForBrokerViewSocket(nodeId, exited) {
|
|
|
185
185
|
function newFocusId() {
|
|
186
186
|
return `f-${newNodeId()}`;
|
|
187
187
|
}
|
|
188
|
-
/** Env for a `crtr attach` VIEWER pane (the focus split, the spawn viewer
|
|
188
|
+
/** Env for a `crtr surface attach` VIEWER pane (the focus split, the spawn viewer
|
|
189
189
|
* window, AND recycle's re-attach respawn): propagate CRTR_HOME so the viewer
|
|
190
190
|
* resolves the SAME canvas home — and thus the right view.sock — under a
|
|
191
191
|
* non-default override; otherwise an empty env (the pane inherits the tmux
|
|
@@ -195,7 +195,7 @@ export function viewerSplitEnv() {
|
|
|
195
195
|
const crtrHome = process.env['CRTR_HOME'];
|
|
196
196
|
return crtrHome !== undefined ? { CRTR_HOME: crtrHome } : {};
|
|
197
197
|
}
|
|
198
|
-
/** Register a `crtr attach` VIEWER pane as the node's one viewer focus row.
|
|
198
|
+
/** Register a `crtr surface attach` VIEWER pane as the node's one viewer focus row.
|
|
199
199
|
* UNIQUE(node_id) ⇒ one viewer per node: returns
|
|
200
200
|
* the existing row (no insert) when the pane or the node is already registered.
|
|
201
201
|
* `window` is accepted for the call contract (spawn passes it) but not stored —
|
|
@@ -213,7 +213,7 @@ export function registerViewerFocus(nodeId, pane, session, window) {
|
|
|
213
213
|
openFocusRow(focusId, pane, session, nodeId);
|
|
214
214
|
return getFocusById(focusId);
|
|
215
215
|
}
|
|
216
|
-
/** Open a
|
|
216
|
+
/** Open a surface-attach viewer for `nodeId` and register its viewer focus row —
|
|
217
217
|
* the shared opener used by `focus` (a split beside the caller) and by a --root
|
|
218
218
|
* spawn (a fresh window in the caller's current session). Wraps `ensureSession`
|
|
219
219
|
* + `openNodeWindow`/`splitWindow` + `registerViewerFocus`. The attach client
|
|
@@ -225,7 +225,7 @@ export function registerViewerFocus(nodeId, pane, session, window) {
|
|
|
225
225
|
* - `besidePane` → a SPLIT beside that pane in its own session (the focus
|
|
226
226
|
* open-beside-the-caller path); `session` is then only a fallback. */
|
|
227
227
|
export function openViewerWindow(nodeId, session, opts = {}) {
|
|
228
|
-
const command = `crtr attach to ${nodeId}`;
|
|
228
|
+
const command = `crtr surface attach to ${nodeId}`;
|
|
229
229
|
const env = viewerSplitEnv();
|
|
230
230
|
const cwd = opts.cwd ?? process.cwd();
|
|
231
231
|
let pane;
|
|
@@ -255,7 +255,7 @@ export function openViewerWindow(nodeId, session, opts = {}) {
|
|
|
255
255
|
// ---------------------------------------------------------------------------
|
|
256
256
|
/** Bring a node's ONE viewer pane forefront (§A.4). Every node is a detached
|
|
257
257
|
* broker, so there is no engine pane to swap into the caller's viewport — focus
|
|
258
|
-
* instead ensures the node's single
|
|
258
|
+
* instead ensures the node's single surface-attach viewer is on screen beside (or
|
|
259
259
|
* navigated to) the caller:
|
|
260
260
|
* (a) ensure the broker ENGINE is alive (idempotent injected reviver) and its
|
|
261
261
|
* view.sock is ACCEPTING (closes the cold-start race against attach's
|
|
@@ -324,7 +324,7 @@ export async function focus(nodeId, opts) {
|
|
|
324
324
|
// (c) Reuse / move the node's one live viewer — but ONLY a pane that still
|
|
325
325
|
// carries THIS node's `@crtr_node` tag. `paneExists` is not enough: the
|
|
326
326
|
// front-door root registers the user's own terminal as its viewer pane and
|
|
327
|
-
// runs `crtr attach` inline; on a clean detach the pane returns to the
|
|
327
|
+
// runs `crtr surface attach` inline; on a clean detach the pane returns to the
|
|
328
328
|
// user's shell (attach clears the tag) yet the pane — and the row — survive,
|
|
329
329
|
// and a reused pane carries some OTHER node's tag. Navigating to / closing
|
|
330
330
|
// such a pane would strand the user on (or kill) their shell. So verify the
|
|
@@ -379,9 +379,9 @@ export function tearDownNode(nodeId) {
|
|
|
379
379
|
closePane(f.pane);
|
|
380
380
|
closeFocusRow(f.focus_id);
|
|
381
381
|
}
|
|
382
|
-
/** Detach a node from the foreground (the `node lifecycle --detach` / Alt+C → D
|
|
382
|
+
/** Detach a node from the foreground (the `node lifecycle demote --detach` / Alt+C → D
|
|
383
383
|
* half). Every node is a headless broker — the only thing on screen is its
|
|
384
|
-
*
|
|
384
|
+
* surface-attach viewer pane — so "detach" means STOP FOREGROUNDING it: close the
|
|
385
385
|
* viewer pane (and drop its row) and leave the broker engine running untouched,
|
|
386
386
|
* reconnectable by a later `focus`. `pane` is the authoritative pane the caller
|
|
387
387
|
* acts on (the Alt+C menu's `#{pane_id}`); falls back to the node's registered
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// recycle.ts — the "finalize + reboot this pane" action behind `crtr node recycle`.
|
|
1
|
+
// recycle.ts — the "finalize + reboot this pane" action behind `crtr node lifecycle recycle`.
|
|
2
2
|
//
|
|
3
3
|
// Recycle FINALIZES the agent occupying a tmux pane and recycles that pane for
|
|
4
4
|
// fresh work, in three steps:
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// 2. Close — tear the agent's broker engine down (the pane is only a viewer).
|
|
9
9
|
// 3. Recycle — boot a fresh resident broker root the pane re-attaches to.
|
|
10
10
|
//
|
|
11
|
-
// NOT to be confused with `node demote` (flip-to-terminal IN PLACE, which keeps
|
|
11
|
+
// NOT to be confused with `node lifecycle demote` (flip-to-terminal IN PLACE, which keeps
|
|
12
12
|
// the agent focused and running): recycle ENDS this agent and boots a brand-new
|
|
13
13
|
// resident root here.
|
|
14
14
|
//
|
|
@@ -73,7 +73,7 @@ export async function recycleNode(nodeId, callerPane) {
|
|
|
73
73
|
finalized = true;
|
|
74
74
|
}
|
|
75
75
|
catch { /* recycle the pane even if the report failed */ }
|
|
76
|
-
// The node's pane is a VIEWER (`crtr attach`), not its engine: the engine is
|
|
76
|
+
// The node's pane is a VIEWER (`crtr surface attach`), not its engine: the engine is
|
|
77
77
|
// the detached broker process, so respawn-pane -k below would only kill the
|
|
78
78
|
// viewer, never the engine. Tear the broker PROCESS down so it exits and
|
|
79
79
|
// releases the sole .jsonl writer. Status is already flipped done by pushFinal
|
|
@@ -127,7 +127,7 @@ export async function recycleNode(nodeId, callerPane) {
|
|
|
127
127
|
* engine runs in a DETACHED broker, not the pane. Birth-launch that broker via
|
|
128
128
|
* the Host seam (mirrors spawnChild's birth path — the host records its pid),
|
|
129
129
|
* wait for its view.sock to accept, then respawn the pane in place to the VIEWER
|
|
130
|
-
* `crtr attach to <root>`. The pane stays a viewer (attach self-tags it
|
|
130
|
+
* `crtr surface attach to <root>`. The pane stays a viewer (attach self-tags it
|
|
131
131
|
* `@crtr_node`); it never hosts the engine. Returns false (recycle reports the
|
|
132
132
|
* pane was not respawned) when the broker never serves — the fresh root row
|
|
133
133
|
* still exists, broker-hosted, for the daemon to revive. */
|
|
@@ -138,15 +138,15 @@ async function recycleBrokerViewer(fresh, pane, inv) {
|
|
|
138
138
|
if (!(await waitForBrokerViewSocket(fresh.node_id, placed.exited)))
|
|
139
139
|
return false;
|
|
140
140
|
// Clear the finalized node's stale `@crtr_node` tag before respawn so the tag
|
|
141
|
-
// never names a done node during the gap before the new `crtr attach` re-tags
|
|
141
|
+
// never names a done node during the gap before the new `crtr surface attach` re-tags
|
|
142
142
|
// on connect. Node ids are shell-safe identifiers; no quoting needed.
|
|
143
143
|
try {
|
|
144
144
|
setPaneOption(pane, '@crtr_node', '');
|
|
145
145
|
}
|
|
146
146
|
catch { /* best-effort */ }
|
|
147
147
|
// SYNC respawn: the recycle command runs as a SEPARATE CLI process (the viewer
|
|
148
|
-
// runs `crtr attach`, a TUI — it never execs recycle), so we are NOT respawning
|
|
148
|
+
// runs `crtr surface attach`, a TUI — it never execs recycle), so we are NOT respawning
|
|
149
149
|
// our own pane and can confirm the respawn actually landed (the honest exit
|
|
150
150
|
// status), unlike the tmux path which often recycles the caller's own pane.
|
|
151
|
-
return respawnPaneSync({ pane, cwd: fresh.cwd, env: viewerSplitEnv(), command: `crtr attach to ${fresh.node_id}` });
|
|
151
|
+
return respawnPaneSync({ pane, cwd: fresh.cwd, env: viewerSplitEnv(), command: `crtr surface attach to ${fresh.node_id}` });
|
|
152
152
|
}
|
|
@@ -6,7 +6,7 @@ import { respawnPaneSync } from './placement.js';
|
|
|
6
6
|
* keep parent=rootId. No wipe. Returns the reaped ids.
|
|
7
7
|
*
|
|
8
8
|
* Why `canceled` (A5, human-confirmed 2026-06-06): an externally-reaped node —
|
|
9
|
-
* whether via `node close` OR a root reset — did not finish its OWN work, so it
|
|
9
|
+
* whether via `node lifecycle close` OR a root reset — did not finish its OWN work, so it
|
|
10
10
|
* unifies on `canceled`; `done` is reserved for finalize. Why marking is STILL
|
|
11
11
|
* explicit: an abrupt broker teardown fires NO clean `session_shutdown`, so the
|
|
12
12
|
* general quit→done rule does NOT auto-resolve a force-killed descendant — we
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// termination.
|
|
3
3
|
//
|
|
4
4
|
// A node's engine is a detached broker process bound to one CRTR_NODE_ID, and
|
|
5
|
-
// its on-screen viewer is a SEPARATE `crtr attach` pane. `/new` splits by who
|
|
5
|
+
// its on-screen viewer is a SEPARATE `crtr surface attach` pane. `/new` splits by who
|
|
6
6
|
// ran it:
|
|
7
7
|
//
|
|
8
8
|
// • relaunchRoot — a `/new` on a ROOT starts a genuinely new node: the old
|
|
@@ -35,7 +35,7 @@ import { spawnNode, rootOfSpine } from './nodes.js';
|
|
|
35
35
|
* keep parent=rootId. No wipe. Returns the reaped ids.
|
|
36
36
|
*
|
|
37
37
|
* Why `canceled` (A5, human-confirmed 2026-06-06): an externally-reaped node —
|
|
38
|
-
* whether via `node close` OR a root reset — did not finish its OWN work, so it
|
|
38
|
+
* whether via `node lifecycle close` OR a root reset — did not finish its OWN work, so it
|
|
39
39
|
* unifies on `canceled`; `done` is reserved for finalize. Why marking is STILL
|
|
40
40
|
* explicit: an abrupt broker teardown fires NO clean `session_shutdown`, so the
|
|
41
41
|
* general quit→done rule does NOT auto-resolve a force-killed descendant — we
|
|
@@ -129,7 +129,7 @@ export async function relaunchRoot(oldId, deps = {}) {
|
|
|
129
129
|
pane: oldFocus.pane,
|
|
130
130
|
cwd: old.cwd,
|
|
131
131
|
env: viewerSplitEnv(),
|
|
132
|
-
command: `crtr attach to ${newMeta.node_id}`,
|
|
132
|
+
command: `crtr surface attach to ${newMeta.node_id}`,
|
|
133
133
|
});
|
|
134
134
|
const window = windowOfPane(oldFocus.pane);
|
|
135
135
|
if (window !== null)
|
|
@@ -11,8 +11,11 @@ export declare const TERMINAL_BY_CHOICE: readonly NodeStatus[];
|
|
|
11
11
|
* — the precise "disconnected" predicate (gh #9).
|
|
12
12
|
*
|
|
13
13
|
* - engine not running: no live `pi_pid` (a dead/absent broker pid).
|
|
14
|
-
* -
|
|
15
|
-
* without one there is nothing to
|
|
14
|
+
* - reconnectable: a captured pi session marker (`pi_session_file` or
|
|
15
|
+
* `pi_session_id`) — without one there is nothing to reopen. reviveNode
|
|
16
|
+
* resumes by the `.jsonl` path when it still exists, else relaunches fresh (a
|
|
17
|
+
* bare `pi_session_id` alone no longer resumes — the broker preflight rejects
|
|
18
|
+
* it — so such a node comes back fresh).
|
|
16
19
|
* - `human`-kind rows are the `crtr human` bridge, never a pi engine, so they
|
|
17
20
|
* are never "disconnected" (mirrors the daemon's superviseTick carve-out).
|
|
18
21
|
* - terminal-by-choice (`done`/`canceled`) is always excluded.
|
|
@@ -27,8 +27,11 @@ export const TERMINAL_BY_CHOICE = ['done', 'canceled'];
|
|
|
27
27
|
* — the precise "disconnected" predicate (gh #9).
|
|
28
28
|
*
|
|
29
29
|
* - engine not running: no live `pi_pid` (a dead/absent broker pid).
|
|
30
|
-
* -
|
|
31
|
-
* without one there is nothing to
|
|
30
|
+
* - reconnectable: a captured pi session marker (`pi_session_file` or
|
|
31
|
+
* `pi_session_id`) — without one there is nothing to reopen. reviveNode
|
|
32
|
+
* resumes by the `.jsonl` path when it still exists, else relaunches fresh (a
|
|
33
|
+
* bare `pi_session_id` alone no longer resumes — the broker preflight rejects
|
|
34
|
+
* it — so such a node comes back fresh).
|
|
32
35
|
* - `human`-kind rows are the `crtr human` bridge, never a pi engine, so they
|
|
33
36
|
* are never "disconnected" (mirrors the daemon's superviseTick carve-out).
|
|
34
37
|
* - terminal-by-choice (`done`/`canceled`) is always excluded.
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import { type NodeMeta } from '../canvas/index.js';
|
|
2
2
|
import type { WakeOrigin } from './bearings.js';
|
|
3
3
|
import { headlessBrokerHost } from './host.js';
|
|
4
|
-
/** Pick the `--session` source for a revive. resume=true
|
|
5
|
-
* session-file path (immune to cwd; pi opens it directly)
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
4
|
+
/** Pick the `--session` source for a revive. resume=true resumes by the
|
|
5
|
+
* absolute session-file path (immune to cwd; pi opens it directly) — but ONLY
|
|
6
|
+
* when that file actually exists on disk. A node's `pi_session_file` can be
|
|
7
|
+
* recorded in meta with nothing ever written there (e.g. its first-boot engine
|
|
8
|
+
* died before session_start ever ran), and `headlessBrokerHost.launch`'s
|
|
9
|
+
* preflight (host.ts) fatally rejects handing pi a `--session` for a missing
|
|
10
|
+
* path OR a bare id — either would crash the revive and strand the node dead
|
|
11
|
+
* with nothing to recover it. So when there is no real `.jsonl` to resume,
|
|
12
|
+
* this selects NEITHER source: the caller then falls through to a fresh
|
|
13
|
+
* (`--fresh`-equivalent) launch, which is always safe. resume=false (a
|
|
14
|
+
* refresh-yield) also selects neither — the node re-reads its roadmap fresh.
|
|
15
|
+
* Pure so the decision is unit-testable without tmux or a real filesystem
|
|
16
|
+
* fixture beyond a temp file. */
|
|
10
17
|
export declare function resumeArgs(meta: NodeMeta, resume: boolean): {
|
|
11
|
-
resumeSessionId?: string;
|
|
12
18
|
resumeSessionPath?: string;
|
|
13
19
|
};
|
|
14
20
|
export interface ReviveResult {
|
|
@@ -18,7 +24,8 @@ export interface ReviveResult {
|
|
|
18
24
|
/** The node's last live LOCATION session, or null — the broker engine has no
|
|
19
25
|
* tmux session of its own (it opens no viewer). Kept for caller back-compat. */
|
|
20
26
|
session: string | null;
|
|
21
|
-
/** True when pi was instructed to resume its saved conversation
|
|
27
|
+
/** True when pi was instructed to resume its saved conversation by its
|
|
28
|
+
* absolute session-file path (`--session <path>`). */
|
|
22
29
|
resumed: boolean;
|
|
23
30
|
/** Launch handle for the detached broker, so callers can fail fast on its real
|
|
24
31
|
* exit before the socket appears. */
|