@crouton-kit/crouter 0.3.33 → 0.3.34
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 +422 -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 +826 -754
- 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 +1 -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 +1 -1
- 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 +2 -2
- 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 +10 -10
- package/dist/core/__tests__/live-mutation.test.js +8 -8
- 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 -0
- package/dist/core/hearth/guest-env.d.ts +7 -0
- package/dist/core/hearth/guest-env.js +17 -1
- package/dist/core/hearth/model-auth-guest.d.ts +8 -0
- package/dist/core/hearth/model-auth-guest.js +435 -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/registry.js +2 -1
- package/dist/core/hearth/types.d.ts +35 -0
- 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/control-plane/relay.js +642 -0
- 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/hearth/wake-proxy/__tests__/guest-source.test.js +2 -2
- package/dist/hearth/wake-proxy/home.d.ts +2 -8
- package/dist/hearth/wake-proxy/home.js +48 -12
- 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-D36PNBj4.js → index-BRKxe-hy.js} +2 -2
- package/dist/web-client/index.html +1 -1
- package/package.json +12 -8
- 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.js +0 -26
- 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/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/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/{core/__tests__/editor-label.test.d.ts → hearth/control-plane/main.d.ts} +0 -0
- /package/dist/{core/__tests__/fault-marker.test.d.ts → hearth/control-plane/types.js} +0 -0
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
import { defineLeaf } from '../../core/command.js';
|
|
2
|
+
import { getMarkdownTheme, getSelectListTheme, getSettingsListTheme } from '@earendil-works/pi-coding-agent';
|
|
3
|
+
import { TUI, ProcessTerminal, Input, matchesKey, truncateToWidth, visibleWidth } from '@earendil-works/pi-tui';
|
|
4
|
+
import { applyTheme } from '../../clients/attach/config-load.js';
|
|
5
|
+
const ANSI_GREEN = (s) => `\x1b[32m${s}\x1b[39m`;
|
|
6
|
+
const ANSI_YELLOW = (s) => `\x1b[33m${s}\x1b[39m`;
|
|
7
|
+
const theme = {
|
|
8
|
+
fg(role, text) {
|
|
9
|
+
switch (role) {
|
|
10
|
+
case 'border':
|
|
11
|
+
return getMarkdownTheme().hr(text);
|
|
12
|
+
case 'accent':
|
|
13
|
+
return getMarkdownTheme().heading(text);
|
|
14
|
+
case 'dim':
|
|
15
|
+
return getSettingsListTheme().description(text);
|
|
16
|
+
case 'muted':
|
|
17
|
+
return getSelectListTheme().description(text);
|
|
18
|
+
case 'mdLink':
|
|
19
|
+
return getMarkdownTheme().link(text);
|
|
20
|
+
case 'mdLinkUrl':
|
|
21
|
+
return getMarkdownTheme().linkUrl(text);
|
|
22
|
+
case 'success':
|
|
23
|
+
return ANSI_GREEN(text);
|
|
24
|
+
case 'warning':
|
|
25
|
+
return ANSI_YELLOW(text);
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
bg(_role, text) {
|
|
29
|
+
return text;
|
|
30
|
+
},
|
|
31
|
+
bold(text) {
|
|
32
|
+
return getMarkdownTheme().bold(text);
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
import { buildSetupInitialState, executeSetupSubmission, formatSetupExecutionSummary, renderSetupStaticInstructions, resolveExaKeyPath, } from './setup-core.js';
|
|
36
|
+
function wrapText(text, width) {
|
|
37
|
+
const clean = text.trim();
|
|
38
|
+
if (clean === '')
|
|
39
|
+
return [''];
|
|
40
|
+
if (width <= 1)
|
|
41
|
+
return [truncateToWidth(clean, width)];
|
|
42
|
+
const words = clean.split(/\s+/);
|
|
43
|
+
const lines = [];
|
|
44
|
+
let current = '';
|
|
45
|
+
for (const word of words) {
|
|
46
|
+
if (current === '') {
|
|
47
|
+
current = word;
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
const next = `${current} ${word}`;
|
|
51
|
+
if (truncateToWidth(next, width) === next) {
|
|
52
|
+
current = next;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
lines.push(truncateToWidth(current, width));
|
|
56
|
+
current = word;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (current !== '')
|
|
60
|
+
lines.push(truncateToWidth(current, width));
|
|
61
|
+
return lines.length > 0 ? lines : [''];
|
|
62
|
+
}
|
|
63
|
+
function currentWidth() {
|
|
64
|
+
return Math.max(1, process.stdout.columns ?? 80);
|
|
65
|
+
}
|
|
66
|
+
function toolLabel(tool) {
|
|
67
|
+
return tool === 'nvim' ? 'nvim' : 'tmux';
|
|
68
|
+
}
|
|
69
|
+
function renderRows(lines, width) {
|
|
70
|
+
return lines.map((line) => truncateToWidth(line, width));
|
|
71
|
+
}
|
|
72
|
+
function padAnsi(text, width) {
|
|
73
|
+
const used = visibleWidth(text);
|
|
74
|
+
if (used >= width)
|
|
75
|
+
return truncateToWidth(text, width);
|
|
76
|
+
return `${text}${' '.repeat(width - used)}`;
|
|
77
|
+
}
|
|
78
|
+
function rule(width) {
|
|
79
|
+
return theme.fg('border', '─'.repeat(Math.max(0, width)));
|
|
80
|
+
}
|
|
81
|
+
function tabPill(label, active) {
|
|
82
|
+
return active
|
|
83
|
+
? theme.bg('selectedBg', theme.fg('accent', theme.bold(` ${label} `)))
|
|
84
|
+
: theme.fg('dim', ` ${label} `);
|
|
85
|
+
}
|
|
86
|
+
function framed(lines, width) {
|
|
87
|
+
if (width < 4)
|
|
88
|
+
return lines.map((line) => truncateToWidth(line, width));
|
|
89
|
+
const innerWidth = width - 4;
|
|
90
|
+
const border = theme.fg('border', '│');
|
|
91
|
+
const top = theme.fg('border', `┌${'─'.repeat(width - 2)}┐`);
|
|
92
|
+
const bottom = theme.fg('border', `└${'─'.repeat(width - 2)}┘`);
|
|
93
|
+
const body = lines.map((line) => {
|
|
94
|
+
const content = padAnsi(truncateToWidth(line, innerWidth), innerWidth);
|
|
95
|
+
return `${border} ${content} ${border}`;
|
|
96
|
+
});
|
|
97
|
+
return [top, ...body, bottom];
|
|
98
|
+
}
|
|
99
|
+
class SetupWizard {
|
|
100
|
+
manifest;
|
|
101
|
+
installedPackageIds;
|
|
102
|
+
systemTools;
|
|
103
|
+
exaInput = new Input();
|
|
104
|
+
selectedPackageIds = new Set();
|
|
105
|
+
selectedSystemTools = new Set();
|
|
106
|
+
activeTab = 0;
|
|
107
|
+
pluginIndex = 0;
|
|
108
|
+
systemIndex = 0;
|
|
109
|
+
expandedPluginId = null;
|
|
110
|
+
confirming = false;
|
|
111
|
+
cachedWidth;
|
|
112
|
+
cachedLines;
|
|
113
|
+
_focused = false;
|
|
114
|
+
onSubmit;
|
|
115
|
+
onCancel;
|
|
116
|
+
constructor(manifest, installedPackageIds, systemTools) {
|
|
117
|
+
this.manifest = manifest;
|
|
118
|
+
this.installedPackageIds = installedPackageIds;
|
|
119
|
+
this.systemTools = systemTools;
|
|
120
|
+
for (const entry of this.manifest)
|
|
121
|
+
this.selectedPackageIds.add(entry.id);
|
|
122
|
+
for (const tool of this.systemTools) {
|
|
123
|
+
if (tool.plan.checked)
|
|
124
|
+
this.selectedSystemTools.add(tool.tool);
|
|
125
|
+
}
|
|
126
|
+
const firstMissingSystem = this.systemTools.findIndex((tool) => !tool.installed);
|
|
127
|
+
this.systemIndex = firstMissingSystem >= 0 ? firstMissingSystem : 0;
|
|
128
|
+
this.exaInput.onSubmit = () => this.finalize();
|
|
129
|
+
this.exaInput.onEscape = () => this.cancel();
|
|
130
|
+
}
|
|
131
|
+
set focused(value) {
|
|
132
|
+
this._focused = value;
|
|
133
|
+
this.exaInput.focused = value && this.activeTab === 2 && !this.confirming;
|
|
134
|
+
}
|
|
135
|
+
get focused() {
|
|
136
|
+
return this._focused;
|
|
137
|
+
}
|
|
138
|
+
invalidate() {
|
|
139
|
+
this.cachedWidth = undefined;
|
|
140
|
+
this.cachedLines = undefined;
|
|
141
|
+
}
|
|
142
|
+
setTab(next) {
|
|
143
|
+
this.activeTab = next;
|
|
144
|
+
this.exaInput.focused = this.focused && next === 2 && !this.confirming;
|
|
145
|
+
this.invalidate();
|
|
146
|
+
}
|
|
147
|
+
moveTab(delta) {
|
|
148
|
+
const next = ((this.activeTab + delta + 3) % 3);
|
|
149
|
+
this.setTab(next);
|
|
150
|
+
}
|
|
151
|
+
cancel() {
|
|
152
|
+
if (this.confirming) {
|
|
153
|
+
this.confirming = false;
|
|
154
|
+
this.invalidate();
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
this.onCancel?.();
|
|
158
|
+
}
|
|
159
|
+
handleGlobalTabSwitch(data) {
|
|
160
|
+
if (matchesKey(data, 'tab') || matchesKey(data, 'right')) {
|
|
161
|
+
this.moveTab(1);
|
|
162
|
+
return true;
|
|
163
|
+
}
|
|
164
|
+
if (matchesKey(data, 'shift+tab') || matchesKey(data, 'left')) {
|
|
165
|
+
this.moveTab(-1);
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
selectedPackage() {
|
|
171
|
+
return this.manifest[this.pluginIndex];
|
|
172
|
+
}
|
|
173
|
+
selectedSystem() {
|
|
174
|
+
return this.systemTools[this.systemIndex];
|
|
175
|
+
}
|
|
176
|
+
movePlugin(delta) {
|
|
177
|
+
if (this.manifest.length === 0)
|
|
178
|
+
return;
|
|
179
|
+
this.pluginIndex = (this.pluginIndex + delta + this.manifest.length) % this.manifest.length;
|
|
180
|
+
this.invalidate();
|
|
181
|
+
}
|
|
182
|
+
moveSystem(delta) {
|
|
183
|
+
const interactives = this.systemTools
|
|
184
|
+
.map((tool, index) => ({ tool, index }))
|
|
185
|
+
.filter(({ tool }) => !tool.installed);
|
|
186
|
+
if (interactives.length === 0)
|
|
187
|
+
return;
|
|
188
|
+
const currentIndex = interactives.findIndex(({ index }) => index === this.systemIndex);
|
|
189
|
+
const nextPos = ((currentIndex >= 0 ? currentIndex : 0) + delta + interactives.length) % interactives.length;
|
|
190
|
+
this.systemIndex = interactives[nextPos].index;
|
|
191
|
+
this.invalidate();
|
|
192
|
+
}
|
|
193
|
+
togglePackage() {
|
|
194
|
+
const entry = this.selectedPackage();
|
|
195
|
+
if (!entry)
|
|
196
|
+
return;
|
|
197
|
+
if (this.selectedPackageIds.has(entry.id))
|
|
198
|
+
this.selectedPackageIds.delete(entry.id);
|
|
199
|
+
else
|
|
200
|
+
this.selectedPackageIds.add(entry.id);
|
|
201
|
+
this.invalidate();
|
|
202
|
+
}
|
|
203
|
+
toggleSystem() {
|
|
204
|
+
const tool = this.selectedSystem();
|
|
205
|
+
if (!tool || tool.installed)
|
|
206
|
+
return;
|
|
207
|
+
if (this.selectedSystemTools.has(tool.tool))
|
|
208
|
+
this.selectedSystemTools.delete(tool.tool);
|
|
209
|
+
else
|
|
210
|
+
this.selectedSystemTools.add(tool.tool);
|
|
211
|
+
this.invalidate();
|
|
212
|
+
}
|
|
213
|
+
toggleDetails() {
|
|
214
|
+
const entry = this.selectedPackage();
|
|
215
|
+
if (!entry)
|
|
216
|
+
return;
|
|
217
|
+
this.expandedPluginId = this.expandedPluginId === entry.id ? null : entry.id;
|
|
218
|
+
this.invalidate();
|
|
219
|
+
}
|
|
220
|
+
hasPendingInstalls() {
|
|
221
|
+
const packages = this.manifest.some((entry) => this.selectedPackageIds.has(entry.id) && !this.installedPackageIds.has(entry.id));
|
|
222
|
+
const system = this.systemTools.some((tool) => !tool.installed && this.selectedSystemTools.has(tool.tool));
|
|
223
|
+
return packages || system;
|
|
224
|
+
}
|
|
225
|
+
buildSubmission() {
|
|
226
|
+
return {
|
|
227
|
+
packages: this.manifest.filter((entry) => this.selectedPackageIds.has(entry.id)),
|
|
228
|
+
installedPackageIds: new Set(this.installedPackageIds),
|
|
229
|
+
systemDeps: this.systemTools.filter((tool) => !tool.installed && this.selectedSystemTools.has(tool.tool)).map((tool) => tool.plan),
|
|
230
|
+
exaKey: this.exaInput.getValue().trim(),
|
|
231
|
+
exaKeyPath: resolveExaKeyPath(),
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
finalize() {
|
|
235
|
+
if (this.confirming) {
|
|
236
|
+
this.onSubmit?.(this.buildSubmission());
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
if (this.hasPendingInstalls()) {
|
|
240
|
+
this.confirming = true;
|
|
241
|
+
this.invalidate();
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
this.onSubmit?.(this.buildSubmission());
|
|
245
|
+
}
|
|
246
|
+
handleInput(data) {
|
|
247
|
+
if (this.confirming) {
|
|
248
|
+
if (matchesKey(data, 'enter') || matchesKey(data, 'y')) {
|
|
249
|
+
this.onSubmit?.(this.buildSubmission());
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
if (matchesKey(data, 'n') || matchesKey(data, 'escape') || matchesKey(data, 'q')) {
|
|
253
|
+
this.confirming = false;
|
|
254
|
+
this.invalidate();
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
if (matchesKey(data, 'ctrl+c') || matchesKey(data, 'ctrl+d') || matchesKey(data, 'q')) {
|
|
260
|
+
this.cancel();
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
if (this.handleGlobalTabSwitch(data))
|
|
264
|
+
return;
|
|
265
|
+
if (this.activeTab === 0) {
|
|
266
|
+
if (matchesKey(data, 'j') || matchesKey(data, 'down')) {
|
|
267
|
+
this.movePlugin(1);
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
if (matchesKey(data, 'k') || matchesKey(data, 'up')) {
|
|
271
|
+
this.movePlugin(-1);
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
if (matchesKey(data, 'space')) {
|
|
275
|
+
this.togglePackage();
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
if (matchesKey(data, '?')) {
|
|
279
|
+
this.toggleDetails();
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
if (matchesKey(data, 'enter')) {
|
|
283
|
+
this.moveTab(1);
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
if (this.activeTab === 1) {
|
|
289
|
+
if (matchesKey(data, 'j') || matchesKey(data, 'down')) {
|
|
290
|
+
this.moveSystem(1);
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
if (matchesKey(data, 'k') || matchesKey(data, 'up')) {
|
|
294
|
+
this.moveSystem(-1);
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
if (matchesKey(data, 'space')) {
|
|
298
|
+
this.toggleSystem();
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
if (matchesKey(data, 'enter')) {
|
|
302
|
+
this.moveTab(1);
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
this.exaInput.handleInput(data);
|
|
308
|
+
}
|
|
309
|
+
renderHeader(width) {
|
|
310
|
+
const tabs = ['Plugins', 'System deps', 'Exa key'];
|
|
311
|
+
const tabLine = tabs
|
|
312
|
+
.map((label, index) => tabPill(`${index + 1}. ${label}`, index === this.activeTab))
|
|
313
|
+
.join(theme.fg('dim', ' · '));
|
|
314
|
+
return [
|
|
315
|
+
truncateToWidth(theme.fg('accent', theme.bold('crtr sys setup')), width),
|
|
316
|
+
truncateToWidth(tabLine, width),
|
|
317
|
+
truncateToWidth(rule(width), width),
|
|
318
|
+
];
|
|
319
|
+
}
|
|
320
|
+
renderFooter(width) {
|
|
321
|
+
const line = this.confirming
|
|
322
|
+
? 'y/enter confirm · n/esc go back · q cancel'
|
|
323
|
+
: this.activeTab === 0
|
|
324
|
+
? 'j/k or ↑/↓ move · space toggle · ? details · enter/Tab advance · ←/→ switch tabs · q cancel'
|
|
325
|
+
: this.activeTab === 1
|
|
326
|
+
? 'j/k or ↑/↓ move · space toggle · enter/Tab advance · ←/→ switch tabs · q cancel'
|
|
327
|
+
: 'type EXA_API_KEY · enter finish · Tab/Shift-Tab or ←/→ switch tabs · q cancel';
|
|
328
|
+
return [truncateToWidth(theme.fg('dim', line), width)];
|
|
329
|
+
}
|
|
330
|
+
renderPlugins(width) {
|
|
331
|
+
const out = [];
|
|
332
|
+
out.push(truncateToWidth(`${theme.fg('accent', theme.bold('Plugins'))}${theme.fg('dim', ' default ON')}`, width));
|
|
333
|
+
for (const [index, entry] of this.manifest.entries()) {
|
|
334
|
+
const selected = index === this.pluginIndex;
|
|
335
|
+
const checked = this.selectedPackageIds.has(entry.id) ? theme.fg('success', '[x]') : theme.fg('dim', '[ ]');
|
|
336
|
+
const marker = selected ? theme.fg('accent', '▶') : theme.fg('dim', ' ');
|
|
337
|
+
const name = selected ? theme.fg('accent', entry.name) : entry.name;
|
|
338
|
+
const status = this.installedPackageIds.has(entry.id)
|
|
339
|
+
? theme.fg('success', '✓ installed')
|
|
340
|
+
: theme.fg('warning', 'not installed');
|
|
341
|
+
const line = `${marker} ${checked} ${name} ${theme.fg('dim', '—')} ${theme.fg('muted', entry.shortDescription)} ${status}`;
|
|
342
|
+
out.push(truncateToWidth(line, width));
|
|
343
|
+
if (this.expandedPluginId === entry.id) {
|
|
344
|
+
for (const line of wrapText(entry.longDescription, Math.max(1, width - 4))) {
|
|
345
|
+
out.push(truncateToWidth(theme.fg('dim', ` ${line}`), width));
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
return out;
|
|
350
|
+
}
|
|
351
|
+
renderSystems(width) {
|
|
352
|
+
const out = [];
|
|
353
|
+
out.push(truncateToWidth(`${theme.fg('accent', theme.bold('System deps'))}${theme.fg('dim', ' tmux + nvim check')}`, width));
|
|
354
|
+
for (const [index, tool] of this.systemTools.entries()) {
|
|
355
|
+
const selected = index === this.systemIndex;
|
|
356
|
+
const marker = selected ? theme.fg('accent', '▶') : theme.fg('dim', ' ');
|
|
357
|
+
if (tool.installed) {
|
|
358
|
+
const line = `${marker} ${theme.fg('success', '✓ installed')} ${theme.fg('muted', toolLabel(tool.tool))}`;
|
|
359
|
+
out.push(truncateToWidth(line, width));
|
|
360
|
+
continue;
|
|
361
|
+
}
|
|
362
|
+
const checked = this.selectedSystemTools.has(tool.tool) ? theme.fg('success', '[x]') : theme.fg('dim', '[ ]');
|
|
363
|
+
const label = tool.plan.command ?? tool.plan.hint;
|
|
364
|
+
const name = selected ? theme.fg('accent', `Install ${toolLabel(tool.tool)}`) : `Install ${toolLabel(tool.tool)}`;
|
|
365
|
+
const line = `${marker} ${checked} ${name} ${theme.fg('dim', '—')} ${theme.fg('muted', label)} ${theme.fg('warning', 'not installed')}`;
|
|
366
|
+
out.push(truncateToWidth(line, width));
|
|
367
|
+
}
|
|
368
|
+
return out;
|
|
369
|
+
}
|
|
370
|
+
renderExa(width) {
|
|
371
|
+
const out = [];
|
|
372
|
+
out.push(truncateToWidth(`${theme.fg('accent', theme.bold('Exa key'))}${theme.fg('dim', ' optional')}`, width));
|
|
373
|
+
out.push(truncateToWidth(`${theme.fg('mdLink', 'Create a key: ')}${theme.fg('mdLinkUrl', 'https://dashboard.exa.ai/api-keys')}`, width));
|
|
374
|
+
out.push(truncateToWidth(theme.fg('dim', `Will write to: ${resolveExaKeyPath()}`), width));
|
|
375
|
+
out.push(...framed([
|
|
376
|
+
theme.fg('accent', theme.bold('Paste EXA_API_KEY here')),
|
|
377
|
+
theme.fg('dim', 'Leave blank to skip.'),
|
|
378
|
+
...this.exaInput.render(Math.max(1, width - 4)),
|
|
379
|
+
], width));
|
|
380
|
+
return out;
|
|
381
|
+
}
|
|
382
|
+
renderConfirm(width) {
|
|
383
|
+
const out = [truncateToWidth(theme.fg('warning', theme.bold('Confirm installs')), width)];
|
|
384
|
+
const submission = this.buildSubmission();
|
|
385
|
+
if (submission.packages.length === 0 && submission.systemDeps.length === 0 && submission.exaKey === '') {
|
|
386
|
+
out.push(truncateToWidth(theme.fg('success', 'Nothing to install; press enter to finish.'), width));
|
|
387
|
+
return out;
|
|
388
|
+
}
|
|
389
|
+
if (submission.packages.length > 0) {
|
|
390
|
+
out.push(truncateToWidth(theme.fg('accent', 'Packages'), width));
|
|
391
|
+
for (const entry of submission.packages) {
|
|
392
|
+
const action = this.installedPackageIds.has(entry.id)
|
|
393
|
+
? theme.fg('success', 'skip (already installed)')
|
|
394
|
+
: theme.fg('muted', `pi install ${entry.installSource}`);
|
|
395
|
+
out.push(truncateToWidth(` • ${entry.name} ${theme.fg('dim', '→')} ${action}`, width));
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
if (submission.systemDeps.length > 0) {
|
|
399
|
+
out.push(truncateToWidth(theme.fg('accent', 'System deps'), width));
|
|
400
|
+
for (const plan of submission.systemDeps) {
|
|
401
|
+
out.push(truncateToWidth(` • ${plan.tool} ${theme.fg('dim', '→')} ${theme.fg('muted', plan.command ?? plan.hint)}`, width));
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
if (submission.exaKey !== '') {
|
|
405
|
+
out.push(truncateToWidth(`${theme.fg('accent', 'Exa key')} ${theme.fg('dim', '→')} ${theme.fg('warning', `write ${submission.exaKeyPath}`)}`, width));
|
|
406
|
+
}
|
|
407
|
+
out.push(truncateToWidth(theme.fg('dim', 'y/enter confirm · n/esc go back'), width));
|
|
408
|
+
return out;
|
|
409
|
+
}
|
|
410
|
+
render(width) {
|
|
411
|
+
if (this.cachedLines && this.cachedWidth === width)
|
|
412
|
+
return this.cachedLines;
|
|
413
|
+
const lines = [
|
|
414
|
+
...this.renderHeader(width),
|
|
415
|
+
'',
|
|
416
|
+
...(this.confirming ? this.renderConfirm(width) : this.activeTab === 0 ? this.renderPlugins(width) : this.activeTab === 1 ? this.renderSystems(width) : this.renderExa(width)),
|
|
417
|
+
'',
|
|
418
|
+
...this.renderFooter(width),
|
|
419
|
+
];
|
|
420
|
+
this.cachedWidth = width;
|
|
421
|
+
this.cachedLines = renderRows(lines, width);
|
|
422
|
+
return this.cachedLines;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
async function runSetup() {
|
|
426
|
+
const state = buildSetupInitialState();
|
|
427
|
+
if (!process.stdout.isTTY) {
|
|
428
|
+
process.stdout.write(renderSetupStaticInstructions(state));
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
applyTheme({ cwd: process.cwd() });
|
|
432
|
+
const terminal = new ProcessTerminal();
|
|
433
|
+
const tui = new TUI(terminal, true);
|
|
434
|
+
const wizard = new SetupWizard(state.manifest, state.installedPackageIds, state.systemTools);
|
|
435
|
+
tui.addChild(wizard);
|
|
436
|
+
tui.setFocus(wizard);
|
|
437
|
+
await new Promise((resolve, reject) => {
|
|
438
|
+
let restored = false;
|
|
439
|
+
const restore = () => {
|
|
440
|
+
if (restored)
|
|
441
|
+
return;
|
|
442
|
+
restored = true;
|
|
443
|
+
try {
|
|
444
|
+
tui.stop();
|
|
445
|
+
}
|
|
446
|
+
catch {
|
|
447
|
+
/* best-effort terminal restore */
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
let done = false;
|
|
451
|
+
const finish = () => {
|
|
452
|
+
if (done)
|
|
453
|
+
return;
|
|
454
|
+
done = true;
|
|
455
|
+
restore();
|
|
456
|
+
resolve();
|
|
457
|
+
};
|
|
458
|
+
const fail = (error) => {
|
|
459
|
+
if (done)
|
|
460
|
+
return;
|
|
461
|
+
done = true;
|
|
462
|
+
restore();
|
|
463
|
+
reject(error);
|
|
464
|
+
};
|
|
465
|
+
const onSignal = () => finish();
|
|
466
|
+
process.once('exit', restore);
|
|
467
|
+
process.once('SIGTERM', onSignal);
|
|
468
|
+
process.once('SIGHUP', onSignal);
|
|
469
|
+
process.once('SIGINT', onSignal);
|
|
470
|
+
wizard.onCancel = finish;
|
|
471
|
+
wizard.onSubmit = (submission) => {
|
|
472
|
+
restore();
|
|
473
|
+
void executeSetupSubmission(submission)
|
|
474
|
+
.then((summary) => {
|
|
475
|
+
if (done)
|
|
476
|
+
return;
|
|
477
|
+
done = true;
|
|
478
|
+
process.stdout.write(formatSetupExecutionSummary(summary));
|
|
479
|
+
resolve();
|
|
480
|
+
}, fail);
|
|
481
|
+
};
|
|
482
|
+
tui.addInputListener((data) => {
|
|
483
|
+
if (matchesKey(data, 'ctrl+c') || matchesKey(data, 'ctrl+d')) {
|
|
484
|
+
finish();
|
|
485
|
+
return { consume: true };
|
|
486
|
+
}
|
|
487
|
+
return undefined;
|
|
488
|
+
});
|
|
489
|
+
try {
|
|
490
|
+
tui.start();
|
|
491
|
+
}
|
|
492
|
+
catch (error) {
|
|
493
|
+
fail(error);
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
export const sysSetupLeaf = defineLeaf({
|
|
498
|
+
name: 'setup',
|
|
499
|
+
description: 'install the bundled pi plugins, system deps, and Exa key setup',
|
|
500
|
+
whenToUse: 'you want to bootstrap this machine for crtr in one pass: install the vendored pi plugins, confirm tmux and nvim, and save your Exa API key.',
|
|
501
|
+
help: {
|
|
502
|
+
name: 'sys setup',
|
|
503
|
+
summary: 'open the multi-tab setup wizard for bundled pi plugins, system deps, and Exa key',
|
|
504
|
+
inputNote: 'No input parameters.',
|
|
505
|
+
output: [],
|
|
506
|
+
outputKind: 'object',
|
|
507
|
+
effects: [
|
|
508
|
+
'Opens a pi-tui wizard that collects companion package installs, system dependency installs, and an Exa API key.',
|
|
509
|
+
'Runs pi installs for the selected bundled packages, writes EXA_API_KEY to ~/.crouter/exa.key when provided, and prints a summary.',
|
|
510
|
+
],
|
|
511
|
+
},
|
|
512
|
+
run: async () => {
|
|
513
|
+
await runSetup();
|
|
514
|
+
},
|
|
515
|
+
render: () => '',
|
|
516
|
+
});
|
|
@@ -29,6 +29,9 @@ export const sysSyspromptLeaf = defineLeaf({
|
|
|
29
29
|
],
|
|
30
30
|
outputKind: 'object',
|
|
31
31
|
effects: ['Read-only: reads the node\'s job/system-prompt.md artifact, or opens it in a tmux window.'],
|
|
32
|
+
// Giant prompt dump / machine payload for an agent to inspect deliberately,
|
|
33
|
+
// not to glance at inline — collapse it in the attach viewer by default.
|
|
34
|
+
preview: { suppressOutput: true },
|
|
32
35
|
},
|
|
33
36
|
run: async (input) => {
|
|
34
37
|
const nodeId = input['node']?.trim() || process.env['CRTR_NODE_ID'];
|
package/dist/commands/sys.js
CHANGED
|
@@ -5,6 +5,7 @@ import { configBranch } from './sys/config.js';
|
|
|
5
5
|
import { sysDoctorLeaf } from './sys/doctor.js';
|
|
6
6
|
import { sysFeedbackLeaf } from './sys/feedback.js';
|
|
7
7
|
import { sysSettingsLeaf } from './sys/settings.js';
|
|
8
|
+
import { sysSetupLeaf } from './sys/setup.js';
|
|
8
9
|
import { sysSyspromptLeaf } from './sys/sysprompt.js';
|
|
9
10
|
import { promptReviewLeaf } from './sys/prompt-review.js';
|
|
10
11
|
import { sysPromptStudioLeaf } from './sys/promptstudio.js';
|
|
@@ -15,13 +16,13 @@ export function registerSys() {
|
|
|
15
16
|
name: 'sys',
|
|
16
17
|
rootEntry: {
|
|
17
18
|
concept: 'crtr configuration, diagnostics, and self-management',
|
|
18
|
-
desc: 'config, settings, doctor, sysprompt, prompt-review, promptstudio, sync, update, version, feedback',
|
|
19
|
+
desc: 'config, settings, setup, doctor, sysprompt, prompt-review, promptstudio, sync, update, version, feedback',
|
|
19
20
|
useWhen: 'managing the crtr installation or opening built-in system views',
|
|
20
21
|
},
|
|
21
22
|
help: {
|
|
22
23
|
name: 'sys',
|
|
23
24
|
summary: 'crtr system configuration, settings, diagnostics, and self-management',
|
|
24
25
|
},
|
|
25
|
-
children: [configBranch, sysSettingsLeaf, sysDoctorLeaf, sysSyspromptLeaf, promptReviewLeaf, sysPromptStudioLeaf, sysFeedbackLeaf, sysUpdateLeaf, sysVersionLeaf, sysSyncLeaf],
|
|
26
|
+
children: [configBranch, sysSettingsLeaf, sysSetupLeaf, sysDoctorLeaf, sysSyspromptLeaf, promptReviewLeaf, sysPromptStudioLeaf, sysFeedbackLeaf, sysUpdateLeaf, sysVersionLeaf, sysSyncLeaf],
|
|
26
27
|
});
|
|
27
28
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// `crtr view cycle
|
|
1
|
+
// `crtr surface view cycle` — switch the view hosted in a monitor pane to the
|
|
2
2
|
// next/prev available view, in place. Backs the Alt+V then ] (next) / Alt+V
|
|
3
3
|
// then [ (prev) chord installed by installViewNavBindings, mirroring how
|
|
4
4
|
// `node cycle` backs Alt+] / Alt+[ for the node graph (view = the bracket
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// A view monitor pane is self-identifying: `view run` tags it with the tmux
|
|
8
8
|
// pane option @crtr_view=<id>. Cycle reads that tag, computes the next/prev id
|
|
9
9
|
// in `listViews()` order (the SAME set `view list` enumerates), and respawns
|
|
10
|
-
// the pane on
|
|
10
|
+
// the pane on the surface-view run command — `respawn-pane -k` kills the current
|
|
11
11
|
// view process and re-execs in the SAME pane (cycle itself runs in tmux's
|
|
12
12
|
// run-shell context, NOT inside the pane, so the kill never targets the caller).
|
|
13
13
|
// The respawned run re-tags the pane, so a rapid re-cycle reads the right id.
|
|
@@ -22,7 +22,7 @@ import { inTmux, currentTmux, getPaneOption, setPaneOption, paneCurrentPath, res
|
|
|
22
22
|
export const viewCycleLeaf = defineLeaf({
|
|
23
23
|
name: 'cycle',
|
|
24
24
|
description: 'switch the monitor pane to the next/prev view in place',
|
|
25
|
-
whenToUse: 'flipping a view monitor to the next
|
|
25
|
+
whenToUse: 'flipping a view monitor to the next or previous available view without re-running a command (bound to Alt+V then ] forward / Alt+V then [ back). The pane must already be hosting a view and the view list must contain a different target. Use run to open a specific view, or list to see the cycle order',
|
|
26
26
|
help: {
|
|
27
27
|
name: 'view cycle',
|
|
28
28
|
summary: 'switch the view hosted in a monitor pane to the next/previous available view, in place — the views walked one monitor at a time, in `view list` order (bound to Alt+V then ] forward / Alt+V then [ back)',
|
|
@@ -37,7 +37,7 @@ export const viewCycleLeaf = defineLeaf({
|
|
|
37
37
|
],
|
|
38
38
|
outputKind: 'object',
|
|
39
39
|
effects: [
|
|
40
|
-
'Respawns the target pane
|
|
40
|
+
'Respawns the target pane in place running the next view; the prior view process is replaced.',
|
|
41
41
|
'Re-tags the pane @crtr_view=<next-id>. No-op outside tmux or when the pane is not a view monitor.',
|
|
42
42
|
],
|
|
43
43
|
},
|
|
@@ -96,7 +96,7 @@ export const viewCycleLeaf = defineLeaf({
|
|
|
96
96
|
// the MONITOR (pane), not the view, and are harmless to views that ignore them.
|
|
97
97
|
const keepPort = getPaneOption(pane, '@crtr_view_port');
|
|
98
98
|
const keepTarget = getPaneOption(pane, '@crtr_view_target');
|
|
99
|
-
const argv = ['view', 'run', targetId];
|
|
99
|
+
const argv = ['surface', 'view', 'run', targetId];
|
|
100
100
|
if (keepPort !== undefined && keepPort !== '')
|
|
101
101
|
argv.push('--port', keepPort);
|
|
102
102
|
if (keepTarget !== undefined && keepTarget !== '')
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// `crtr view list` — enumerate every resolvable view across scopes.
|
|
1
|
+
// `crtr surface view list` — enumerate every resolvable view across scopes.
|
|
2
2
|
//
|
|
3
3
|
// Lists id · title · description · scope. Loads each view's core.mjs to read its
|
|
4
4
|
// manifest title/description; a malformed view is shown with an error marker (it
|
|
@@ -9,7 +9,7 @@ import { listViews, loadCore } from '../core/view/loader.js';
|
|
|
9
9
|
export const viewListLeaf = defineLeaf({
|
|
10
10
|
name: 'list',
|
|
11
11
|
description: 'enumerate available views (id · title · description · scope)',
|
|
12
|
-
whenToUse: 'you want to see which views exist before running one — a flat roster across project, user, and builtin scopes. Pipeable plain text; pass --json for the raw array. Use
|
|
12
|
+
whenToUse: 'you want to see which views exist before running one — a flat roster across project, user, and builtin scopes. Pipeable plain text; pass --json for the raw array. Use run to open one and new to scaffold one',
|
|
13
13
|
help: {
|
|
14
14
|
name: 'view list',
|
|
15
15
|
summary: 'list every resolvable view (id, title, description, scope); pipeable plain text',
|
|
@@ -48,7 +48,7 @@ export const viewListLeaf = defineLeaf({
|
|
|
48
48
|
render: (result) => {
|
|
49
49
|
const rows = result['views'] ?? [];
|
|
50
50
|
if (rows.length === 0) {
|
|
51
|
-
return 'No views found. Scaffold one with
|
|
51
|
+
return 'No views found. Scaffold one with the view new leaf.';
|
|
52
52
|
}
|
|
53
53
|
const idW = Math.max(...rows.map((r) => r.id.length), 2);
|
|
54
54
|
const titleW = Math.max(...rows.map((r) => r.title.length), 5);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// `crtr view new
|
|
1
|
+
// `crtr surface view new` — scaffold a runnable dual-target view into a scope dir.
|
|
2
2
|
//
|
|
3
3
|
// Writes the four contract files (core.mjs + tui.mjs + web.jsx + text.mjs) under
|
|
4
4
|
// <viewsDir(scope)>/<name>/ from the stubs in prompts/view.ts (mkdir -p first).
|
|
5
5
|
// Refuses if a view of that name already resolves. The scaffold runs as-is via
|
|
6
|
-
//
|
|
6
|
+
// the surface view host (TUI/static) and the surface web server. Mirrors the
|
|
7
7
|
// scope → ensure dir → write → point-at-run shape of other authoring commands.
|
|
8
8
|
import { mkdirSync, existsSync } from 'node:fs';
|
|
9
9
|
import { writeFileSync } from 'node:fs';
|
|
@@ -16,7 +16,7 @@ import { viewScaffold } from '../prompts/view.js';
|
|
|
16
16
|
export const viewNewLeaf = defineLeaf({
|
|
17
17
|
name: 'new',
|
|
18
18
|
description: 'scaffold a runnable dual-target view directory into a scope dir',
|
|
19
|
-
whenToUse: 'you want to author a new view — this writes the four contract files (core.mjs + tui.mjs + web.jsx + text.mjs, with the contract documented inline) into the user or project scope, ready to open
|
|
19
|
+
whenToUse: 'you want to author a new view — this writes the four contract files (core.mjs + tui.mjs + web.jsx + text.mjs, with the contract documented inline) into the user or project scope, ready to open in either host and to edit from there. Reach for it to start a new view rather than hand-writing the directory',
|
|
20
20
|
help: {
|
|
21
21
|
name: 'view new',
|
|
22
22
|
summary: 'scaffold <viewsDir(scope)>/<name>/{core,tui,text}.mjs + web.jsx from the stubs; refuses if the name already resolves',
|
|
@@ -24,7 +24,7 @@ export const viewNewLeaf = defineLeaf({
|
|
|
24
24
|
{ kind: 'positional', name: 'name', required: true, constraint: 'View id / directory name. Must not already resolve as a view.' },
|
|
25
25
|
{ kind: 'flag', name: 'scope', type: 'enum', choices: ['user', 'project'], required: false, constraint: 'Where to scaffold. Default: project if available, else user.' },
|
|
26
26
|
{ kind: 'flag', name: 'title', type: 'string', required: false, constraint: 'Manifest title (header + picker). Default: the name.' },
|
|
27
|
-
{ kind: 'flag', name: 'description', type: 'string', required: false, constraint: 'Manifest description (picker
|
|
27
|
+
{ kind: 'flag', name: 'description', type: 'string', required: false, constraint: 'Manifest description (picker and list). Default: empty.' },
|
|
28
28
|
],
|
|
29
29
|
output: [
|
|
30
30
|
{ name: 'path', type: 'string', required: true, constraint: 'Absolute path to the scaffolded view directory.' },
|
|
@@ -69,6 +69,6 @@ export const viewNewLeaf = defineLeaf({
|
|
|
69
69
|
for (const [filename, content] of Object.entries(files)) {
|
|
70
70
|
writeFileSync(join(dir, filename), content, 'utf8');
|
|
71
71
|
}
|
|
72
|
-
return { path: dir, files: Object.keys(files), scope, run: `crtr view run ${name}` };
|
|
72
|
+
return { path: dir, files: Object.keys(files), scope, run: `crtr surface view run ${name}` };
|
|
73
73
|
},
|
|
74
74
|
});
|