@emiliosp/pi-maestro 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +91 -2
- package/agents/builder.md +40 -0
- package/agents/verifier.md +31 -0
- package/docs/configuration.md +109 -0
- package/docs/maestro.png +0 -0
- package/docs/subagent-integration.md +53 -0
- package/docs/workflow.md +260 -0
- package/extensions/maestro-subagent.ts +88 -0
- package/extensions/maestro.ts +123 -0
- package/node_modules/@js-temporal/polyfill/CHANGELOG.md +453 -0
- package/node_modules/@js-temporal/polyfill/LICENSE +13 -0
- package/node_modules/@js-temporal/polyfill/README.md +90 -0
- package/node_modules/@js-temporal/polyfill/dist/index.cjs +2 -0
- package/node_modules/@js-temporal/polyfill/dist/index.cjs.map +1 -0
- package/node_modules/@js-temporal/polyfill/dist/index.esm.js +2 -0
- package/node_modules/@js-temporal/polyfill/dist/index.esm.js.map +1 -0
- package/node_modules/@js-temporal/polyfill/dist/index.umd.js +2 -0
- package/node_modules/@js-temporal/polyfill/dist/index.umd.js.map +1 -0
- package/node_modules/@js-temporal/polyfill/index.d.cts +1215 -0
- package/node_modules/@js-temporal/polyfill/index.d.ts +1215 -0
- package/node_modules/@js-temporal/polyfill/lib/assert.ts +8 -0
- package/node_modules/@js-temporal/polyfill/lib/bigintmath.ts +39 -0
- package/node_modules/@js-temporal/polyfill/lib/calendar.ts +2424 -0
- package/node_modules/@js-temporal/polyfill/lib/debug.ts +7 -0
- package/node_modules/@js-temporal/polyfill/lib/duration.ts +438 -0
- package/node_modules/@js-temporal/polyfill/lib/durationformat.d.ts +93 -0
- package/node_modules/@js-temporal/polyfill/lib/ecmascript.ts +4973 -0
- package/node_modules/@js-temporal/polyfill/lib/index.ts +34 -0
- package/node_modules/@js-temporal/polyfill/lib/init.ts +43 -0
- package/node_modules/@js-temporal/polyfill/lib/instant.ts +138 -0
- package/node_modules/@js-temporal/polyfill/lib/internaltypes.d.ts +242 -0
- package/node_modules/@js-temporal/polyfill/lib/intl.ts +758 -0
- package/node_modules/@js-temporal/polyfill/lib/intrinsicclass.ts +162 -0
- package/node_modules/@js-temporal/polyfill/lib/legacydate.ts +17 -0
- package/node_modules/@js-temporal/polyfill/lib/math.ts +96 -0
- package/node_modules/@js-temporal/polyfill/lib/now.ts +48 -0
- package/node_modules/@js-temporal/polyfill/lib/plaindate.ts +212 -0
- package/node_modules/@js-temporal/polyfill/lib/plaindatetime.ts +274 -0
- package/node_modules/@js-temporal/polyfill/lib/plainmonthday.ts +110 -0
- package/node_modules/@js-temporal/polyfill/lib/plaintime.ts +154 -0
- package/node_modules/@js-temporal/polyfill/lib/plainyearmonth.ts +157 -0
- package/node_modules/@js-temporal/polyfill/lib/regex.ts +59 -0
- package/node_modules/@js-temporal/polyfill/lib/slots.ts +341 -0
- package/node_modules/@js-temporal/polyfill/lib/temporal.ts +10 -0
- package/node_modules/@js-temporal/polyfill/lib/timeduration.ts +149 -0
- package/node_modules/@js-temporal/polyfill/lib/zoneddatetime.ts +492 -0
- package/node_modules/@js-temporal/polyfill/package.json +143 -0
- package/node_modules/acorn/CHANGELOG.md +998 -0
- package/node_modules/acorn/LICENSE +21 -0
- package/node_modules/acorn/README.md +309 -0
- package/node_modules/acorn/bin/acorn +4 -0
- package/node_modules/acorn/dist/acorn.d.mts +897 -0
- package/node_modules/acorn/dist/acorn.d.ts +897 -0
- package/node_modules/acorn/dist/acorn.js +6342 -0
- package/node_modules/acorn/dist/acorn.mjs +6313 -0
- package/node_modules/acorn/dist/bin.js +90 -0
- package/node_modules/acorn/package.json +50 -0
- package/node_modules/jiti/LICENSE +21 -0
- package/node_modules/jiti/README.md +258 -0
- package/node_modules/jiti/dist/babel.cjs +257 -0
- package/node_modules/jiti/dist/jiti.cjs +1 -0
- package/node_modules/jiti/lib/jiti-cli.mjs +34 -0
- package/node_modules/jiti/lib/jiti-hooks.mjs +124 -0
- package/node_modules/jiti/lib/jiti-native.mjs +121 -0
- package/node_modules/jiti/lib/jiti-register.d.mts +1 -0
- package/node_modules/jiti/lib/jiti-register.mjs +4 -0
- package/node_modules/jiti/lib/jiti-static.mjs +23 -0
- package/node_modules/jiti/lib/jiti.cjs +30 -0
- package/node_modules/jiti/lib/jiti.d.cts +8 -0
- package/node_modules/jiti/lib/jiti.d.mts +8 -0
- package/node_modules/jiti/lib/jiti.mjs +29 -0
- package/node_modules/jiti/lib/types.d.ts +420 -0
- package/node_modules/jiti/package.json +146 -0
- package/node_modules/jsbi/LICENSE +176 -0
- package/node_modules/jsbi/README.md +173 -0
- package/node_modules/jsbi/dist/jsbi-cjs.js +2 -0
- package/node_modules/jsbi/dist/jsbi-cjs.js.map +1 -0
- package/node_modules/jsbi/dist/jsbi-umd.js +2 -0
- package/node_modules/jsbi/dist/jsbi-umd.js.map +1 -0
- package/node_modules/jsbi/dist/jsbi.mjs +2 -0
- package/node_modules/jsbi/dist/jsbi.mjs.map +1 -0
- package/node_modules/jsbi/jsbi.d.ts +43 -0
- package/node_modules/jsbi/package.json +35 -0
- package/node_modules/pi-subagents/CHANGELOG.md +2941 -0
- package/node_modules/pi-subagents/LICENSE +21 -0
- package/node_modules/pi-subagents/README.md +129 -0
- package/node_modules/pi-subagents/agents/claude-code-writer.md +16 -0
- package/node_modules/pi-subagents/agents/claude-code.md +15 -0
- package/node_modules/pi-subagents/agents/codex-exec-writer.md +16 -0
- package/node_modules/pi-subagents/agents/codex-exec.md +15 -0
- package/node_modules/pi-subagents/agents/cursor-agent-writer.md +15 -0
- package/node_modules/pi-subagents/agents/cursor-agent.md +14 -0
- package/node_modules/pi-subagents/agents/delegate.md +14 -0
- package/node_modules/pi-subagents/agents/evidence-auditor.md +34 -0
- package/node_modules/pi-subagents/agents/oracle.md +78 -0
- package/node_modules/pi-subagents/agents/researcher.md +62 -0
- package/node_modules/pi-subagents/agents/reviewer.md +91 -0
- package/node_modules/pi-subagents/agents/scout.md +50 -0
- package/node_modules/pi-subagents/agents/worker.md +60 -0
- package/node_modules/pi-subagents/async-retention-discovery-worker.mjs +180 -0
- package/node_modules/pi-subagents/docs/agents.md +560 -0
- package/node_modules/pi-subagents/docs/configuration.md +691 -0
- package/node_modules/pi-subagents/docs/extension-api.md +632 -0
- package/node_modules/pi-subagents/docs/missions.md +155 -0
- package/node_modules/pi-subagents/docs/models.md +253 -0
- package/node_modules/pi-subagents/docs/observability.md +328 -0
- package/node_modules/pi-subagents/docs/standalone-background.md +59 -0
- package/node_modules/pi-subagents/docs/tool-reference.md +540 -0
- package/node_modules/pi-subagents/docs/watchdog.md +185 -0
- package/node_modules/pi-subagents/docs/workflows.md +568 -0
- package/node_modules/pi-subagents/index.d.ts +3 -0
- package/node_modules/pi-subagents/index.d.ts.map +1 -0
- package/node_modules/pi-subagents/index.js +10 -0
- package/node_modules/pi-subagents/index.js.map +1 -0
- package/node_modules/pi-subagents/inspector-runner.mjs +11 -0
- package/node_modules/pi-subagents/install.mjs +93 -0
- package/node_modules/pi-subagents/node_modules/yaml/LICENSE +13 -0
- package/node_modules/pi-subagents/node_modules/yaml/README.md +172 -0
- package/node_modules/pi-subagents/node_modules/yaml/bin.mjs +11 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/compose-node.js +109 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/composer.js +217 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +223 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/doc/Document.js +335 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/doc/directives.js +176 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/errors.js +57 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/index.js +17 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/log.js +11 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/Alias.js +114 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/parse/cst.js +98 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/parse/lexer.js +717 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/parse/parser.js +967 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/public-api.js +102 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/tags.js +96 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +64 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +153 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +24 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/util.js +11 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/visit.js +233 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/index.js +5 -0
- package/node_modules/pi-subagents/node_modules/yaml/browser/package.json +3 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/cli.d.ts +8 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/cli.mjs +201 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/compose-collection.js +90 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/compose-doc.js +45 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/compose-node.js +112 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/composer.d.ts +63 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/composer.js +222 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-end.js +39 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-flow-scalar.js +225 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-props.js +148 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/Document.d.ts +141 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/Document.js +337 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/anchors.js +76 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/applyReviver.js +57 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/createNode.js +90 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/directives.d.ts +49 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/directives.js +178 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/errors.d.ts +21 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/errors.js +62 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/index.d.ts +25 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/index.js +50 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/log.d.ts +3 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/log.js +19 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Alias.js +116 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Collection.js +151 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Node.js +40 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Pair.js +39 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Scalar.d.ts +43 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Scalar.js +27 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/identity.js +53 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/toJS.js +39 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/options.d.ts +350 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/cst-visit.js +99 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/cst.d.ts +109 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/cst.js +112 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/lexer.js +719 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/line-counter.js +41 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/parser.d.ts +84 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/parser.js +972 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/public-api.d.ts +44 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/public-api.js +107 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/Schema.js +39 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/common/map.js +19 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/common/null.js +17 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/common/seq.js +19 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/common/string.js +16 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/core/bool.js +21 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/core/float.js +47 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/core/int.js +42 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/core/schema.js +25 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/json/schema.js +64 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/tags.d.ts +48 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/tags.js +99 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/types.d.ts +92 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/merge.js +68 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringify.js +132 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyNumber.js +26 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/test-events.d.ts +4 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/test-events.js +134 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/util.d.ts +16 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/util.js +28 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/visit.d.ts +102 -0
- package/node_modules/pi-subagents/node_modules/yaml/dist/visit.js +236 -0
- package/node_modules/pi-subagents/node_modules/yaml/package.json +97 -0
- package/node_modules/pi-subagents/node_modules/yaml/util.js +2 -0
- package/node_modules/pi-subagents/package.json +137 -0
- package/node_modules/pi-subagents/prompts/council.md +63 -0
- package/node_modules/pi-subagents/prompts/gather-context-and-clarify.md +13 -0
- package/node_modules/pi-subagents/prompts/parallel-cleanup.md +59 -0
- package/node_modules/pi-subagents/prompts/parallel-research.md +50 -0
- package/node_modules/pi-subagents/prompts/parallel-review.md +58 -0
- package/node_modules/pi-subagents/prompts/review-loop.md +47 -0
- package/node_modules/pi-subagents/runner-peer-loader.mjs +21 -0
- package/node_modules/pi-subagents/runner-peer-preload.mjs +30 -0
- package/node_modules/pi-subagents/skills/council-mode/SKILL.md +59 -0
- package/node_modules/pi-subagents/skills/council-mode/references/pass-contracts.md +150 -0
- package/node_modules/pi-subagents/skills/pi-subagents/SKILL.md +123 -0
- package/node_modules/pi-subagents/skills/pi-subagents/references/constraints-and-recipes.md +74 -0
- package/node_modules/pi-subagents/skills/pi-subagents/references/execution-controls.md +561 -0
- package/node_modules/pi-subagents/skills/pi-subagents/references/management-authoring-rpc.md +161 -0
- package/node_modules/pi-subagents/skills/pi-subagents/references/multi-lane-orchestration.md +61 -0
- package/node_modules/pi-subagents/skills/pi-subagents/references/prompting-and-roles.md +297 -0
- package/node_modules/pi-subagents/skills/pi-subagents/references/review-and-validation.md +73 -0
- package/node_modules/pi-subagents/src/agents/advertised-agent-prompt.d.ts +10 -0
- package/node_modules/pi-subagents/src/agents/advertised-agent-prompt.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/agents/advertised-agent-prompt.js +63 -0
- package/node_modules/pi-subagents/src/agents/advertised-agent-prompt.js.map +1 -0
- package/node_modules/pi-subagents/src/agents/agent-management.d.ts +28 -0
- package/node_modules/pi-subagents/src/agents/agent-management.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/agents/agent-management.js +1517 -0
- package/node_modules/pi-subagents/src/agents/agent-management.js.map +1 -0
- package/node_modules/pi-subagents/src/agents/agent-memory.d.ts +49 -0
- package/node_modules/pi-subagents/src/agents/agent-memory.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/agents/agent-memory.js +349 -0
- package/node_modules/pi-subagents/src/agents/agent-memory.js.map +1 -0
- package/node_modules/pi-subagents/src/agents/agent-refinements.d.ts +100 -0
- package/node_modules/pi-subagents/src/agents/agent-refinements.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/agents/agent-refinements.js +569 -0
- package/node_modules/pi-subagents/src/agents/agent-refinements.js.map +1 -0
- package/node_modules/pi-subagents/src/agents/agent-scope.d.ts +3 -0
- package/node_modules/pi-subagents/src/agents/agent-scope.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/agents/agent-scope.js +6 -0
- package/node_modules/pi-subagents/src/agents/agent-scope.js.map +1 -0
- package/node_modules/pi-subagents/src/agents/agent-selection.d.ts +3 -0
- package/node_modules/pi-subagents/src/agents/agent-selection.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/agents/agent-selection.js +23 -0
- package/node_modules/pi-subagents/src/agents/agent-selection.js.map +1 -0
- package/node_modules/pi-subagents/src/agents/agent-serializer.d.ts +8 -0
- package/node_modules/pi-subagents/src/agents/agent-serializer.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/agents/agent-serializer.js +203 -0
- package/node_modules/pi-subagents/src/agents/agent-serializer.js.map +1 -0
- package/node_modules/pi-subagents/src/agents/agents.d.ts +332 -0
- package/node_modules/pi-subagents/src/agents/agents.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/agents/agents.js +2690 -0
- package/node_modules/pi-subagents/src/agents/agents.js.map +1 -0
- package/node_modules/pi-subagents/src/agents/builtin-names.d.ts +2 -0
- package/node_modules/pi-subagents/src/agents/builtin-names.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/agents/builtin-names.js +17 -0
- package/node_modules/pi-subagents/src/agents/builtin-names.js.map +1 -0
- package/node_modules/pi-subagents/src/agents/chain-serializer.d.ts +7 -0
- package/node_modules/pi-subagents/src/agents/chain-serializer.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/agents/chain-serializer.js +319 -0
- package/node_modules/pi-subagents/src/agents/chain-serializer.js.map +1 -0
- package/node_modules/pi-subagents/src/agents/frontmatter.d.ts +16 -0
- package/node_modules/pi-subagents/src/agents/frontmatter.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/agents/frontmatter.js +142 -0
- package/node_modules/pi-subagents/src/agents/frontmatter.js.map +1 -0
- package/node_modules/pi-subagents/src/agents/global-npm-root.d.ts +7 -0
- package/node_modules/pi-subagents/src/agents/global-npm-root.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/agents/global-npm-root.js +58 -0
- package/node_modules/pi-subagents/src/agents/global-npm-root.js.map +1 -0
- package/node_modules/pi-subagents/src/agents/identity.d.ts +8 -0
- package/node_modules/pi-subagents/src/agents/identity.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/agents/identity.js +30 -0
- package/node_modules/pi-subagents/src/agents/identity.js.map +1 -0
- package/node_modules/pi-subagents/src/agents/proactive-skills.d.ts +36 -0
- package/node_modules/pi-subagents/src/agents/proactive-skills.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/agents/proactive-skills.js +156 -0
- package/node_modules/pi-subagents/src/agents/proactive-skills.js.map +1 -0
- package/node_modules/pi-subagents/src/agents/runtime-agent-events.d.ts +27 -0
- package/node_modules/pi-subagents/src/agents/runtime-agent-events.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/agents/runtime-agent-events.js +53 -0
- package/node_modules/pi-subagents/src/agents/runtime-agent-events.js.map +1 -0
- package/node_modules/pi-subagents/src/agents/runtime-agent-registry.d.ts +64 -0
- package/node_modules/pi-subagents/src/agents/runtime-agent-registry.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/agents/runtime-agent-registry.js +395 -0
- package/node_modules/pi-subagents/src/agents/runtime-agent-registry.js.map +1 -0
- package/node_modules/pi-subagents/src/agents/skills.d.ts +35 -0
- package/node_modules/pi-subagents/src/agents/skills.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/agents/skills.js +718 -0
- package/node_modules/pi-subagents/src/agents/skills.js.map +1 -0
- package/node_modules/pi-subagents/src/api/agents.d.ts +5 -0
- package/node_modules/pi-subagents/src/api/agents.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/api/agents.js +3 -0
- package/node_modules/pi-subagents/src/api/agents.js.map +1 -0
- package/node_modules/pi-subagents/src/api/background-work.d.ts +39 -0
- package/node_modules/pi-subagents/src/api/background-work.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/api/background-work.js +165 -0
- package/node_modules/pi-subagents/src/api/background-work.js.map +1 -0
- package/node_modules/pi-subagents/src/api/capability-ceiling.d.ts +2 -0
- package/node_modules/pi-subagents/src/api/capability-ceiling.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/api/capability-ceiling.js +2 -0
- package/node_modules/pi-subagents/src/api/capability-ceiling.js.map +1 -0
- package/node_modules/pi-subagents/src/api/child-tool-plan.d.ts +2 -0
- package/node_modules/pi-subagents/src/api/child-tool-plan.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/api/child-tool-plan.js +2 -0
- package/node_modules/pi-subagents/src/api/child-tool-plan.js.map +1 -0
- package/node_modules/pi-subagents/src/api/control-channel.d.ts +2 -0
- package/node_modules/pi-subagents/src/api/control-channel.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/api/control-channel.js +2 -0
- package/node_modules/pi-subagents/src/api/control-channel.js.map +1 -0
- package/node_modules/pi-subagents/src/api/delegation.d.ts +113 -0
- package/node_modules/pi-subagents/src/api/delegation.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/api/delegation.js +9 -0
- package/node_modules/pi-subagents/src/api/delegation.js.map +1 -0
- package/node_modules/pi-subagents/src/api/external-job-provider.d.ts +58 -0
- package/node_modules/pi-subagents/src/api/external-job-provider.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/api/external-job-provider.js +140 -0
- package/node_modules/pi-subagents/src/api/external-job-provider.js.map +1 -0
- package/node_modules/pi-subagents/src/api/external-runs.d.ts +48 -0
- package/node_modules/pi-subagents/src/api/external-runs.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/api/external-runs.js +245 -0
- package/node_modules/pi-subagents/src/api/external-runs.js.map +1 -0
- package/node_modules/pi-subagents/src/api/inspectors.d.ts +21 -0
- package/node_modules/pi-subagents/src/api/inspectors.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/api/inspectors.js +12 -0
- package/node_modules/pi-subagents/src/api/inspectors.js.map +1 -0
- package/node_modules/pi-subagents/src/api/intercom-bridge.d.ts +2 -0
- package/node_modules/pi-subagents/src/api/intercom-bridge.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/api/intercom-bridge.js +2 -0
- package/node_modules/pi-subagents/src/api/intercom-bridge.js.map +1 -0
- package/node_modules/pi-subagents/src/api/preflight.d.ts +177 -0
- package/node_modules/pi-subagents/src/api/preflight.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/api/preflight.js +406 -0
- package/node_modules/pi-subagents/src/api/preflight.js.map +1 -0
- package/node_modules/pi-subagents/src/api/project-panes.d.ts +8 -0
- package/node_modules/pi-subagents/src/api/project-panes.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/api/project-panes.js +8 -0
- package/node_modules/pi-subagents/src/api/project-panes.js.map +1 -0
- package/node_modules/pi-subagents/src/api/required-child-extensions.d.ts +2 -0
- package/node_modules/pi-subagents/src/api/required-child-extensions.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/api/required-child-extensions.js +2 -0
- package/node_modules/pi-subagents/src/api/required-child-extensions.js.map +1 -0
- package/node_modules/pi-subagents/src/api/shared-types.d.ts +2 -0
- package/node_modules/pi-subagents/src/api/shared-types.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/api/shared-types.js +2 -0
- package/node_modules/pi-subagents/src/api/shared-types.js.map +1 -0
- package/node_modules/pi-subagents/src/api/workflow-resources.d.ts +3 -0
- package/node_modules/pi-subagents/src/api/workflow-resources.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/api/workflow-resources.js +2 -0
- package/node_modules/pi-subagents/src/api/workflow-resources.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/config.d.ts +8 -0
- package/node_modules/pi-subagents/src/extension/config.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/config.js +256 -0
- package/node_modules/pi-subagents/src/extension/config.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/control-notices.d.ts +21 -0
- package/node_modules/pi-subagents/src/extension/control-notices.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/control-notices.js +36 -0
- package/node_modules/pi-subagents/src/extension/control-notices.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/doctor.d.ts +33 -0
- package/node_modules/pi-subagents/src/extension/doctor.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/doctor.js +232 -0
- package/node_modules/pi-subagents/src/extension/doctor.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/fanout-child.d.ts +7 -0
- package/node_modules/pi-subagents/src/extension/fanout-child.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/fanout-child.js +280 -0
- package/node_modules/pi-subagents/src/extension/fanout-child.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/herdr-pi-bridge.d.ts +17 -0
- package/node_modules/pi-subagents/src/extension/herdr-pi-bridge.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/herdr-pi-bridge.js +245 -0
- package/node_modules/pi-subagents/src/extension/herdr-pi-bridge.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/index.d.ts +20 -0
- package/node_modules/pi-subagents/src/extension/index.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/index.js +1099 -0
- package/node_modules/pi-subagents/src/extension/index.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/public-execution.d.ts +71 -0
- package/node_modules/pi-subagents/src/extension/public-execution.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/public-execution.js +212 -0
- package/node_modules/pi-subagents/src/extension/public-execution.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/reply-workflow-script.d.ts +12 -0
- package/node_modules/pi-subagents/src/extension/reply-workflow-script.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/reply-workflow-script.js +70 -0
- package/node_modules/pi-subagents/src/extension/reply-workflow-script.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/rpc.d.ts +85 -0
- package/node_modules/pi-subagents/src/extension/rpc.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/rpc.js +720 -0
- package/node_modules/pi-subagents/src/extension/rpc.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/schemas.d.ts +139 -0
- package/node_modules/pi-subagents/src/extension/schemas.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/schemas.js +311 -0
- package/node_modules/pi-subagents/src/extension/schemas.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/steering-notices.d.ts +15 -0
- package/node_modules/pi-subagents/src/extension/steering-notices.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/steering-notices.js +23 -0
- package/node_modules/pi-subagents/src/extension/steering-notices.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/subagent-guide.d.ts +4 -0
- package/node_modules/pi-subagents/src/extension/subagent-guide.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/subagent-guide.js +42 -0
- package/node_modules/pi-subagents/src/extension/subagent-guide.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/tool-activation.d.ts +7 -0
- package/node_modules/pi-subagents/src/extension/tool-activation.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/tool-activation.js +132 -0
- package/node_modules/pi-subagents/src/extension/tool-activation.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/tool-description.d.ts +23 -0
- package/node_modules/pi-subagents/src/extension/tool-description.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/tool-description.js +184 -0
- package/node_modules/pi-subagents/src/extension/tool-description.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/tool-result.d.ts +10 -0
- package/node_modules/pi-subagents/src/extension/tool-result.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/tool-result.js +17 -0
- package/node_modules/pi-subagents/src/extension/tool-result.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/upgrade-notice.d.ts +7 -0
- package/node_modules/pi-subagents/src/extension/upgrade-notice.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/upgrade-notice.js +37 -0
- package/node_modules/pi-subagents/src/extension/upgrade-notice.js.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/actions.d.ts +23 -0
- package/node_modules/pi-subagents/src/inspectors/actions.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/actions.js +155 -0
- package/node_modules/pi-subagents/src/inspectors/actions.js.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/ghostty/actions.d.ts +12 -0
- package/node_modules/pi-subagents/src/inspectors/ghostty/actions.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/ghostty/actions.js +63 -0
- package/node_modules/pi-subagents/src/inspectors/ghostty/actions.js.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/ghostty/plugin.d.ts +8 -0
- package/node_modules/pi-subagents/src/inspectors/ghostty/plugin.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/ghostty/plugin.js +24 -0
- package/node_modules/pi-subagents/src/inspectors/ghostty/plugin.js.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/actions.d.ts +26 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/actions.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/actions.js +134 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/actions.js.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/client.d.ts +42 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/client.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/client.js +130 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/client.js.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/focus.d.ts +25 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/focus.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/focus.js +50 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/focus.js.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/plugin.d.ts +7 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/plugin.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/plugin.js +15 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/plugin.js.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/project-panes.d.ts +137 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/project-panes.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/project-panes.js +608 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/project-panes.js.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/inspector-runner.d.ts +24 -0
- package/node_modules/pi-subagents/src/inspectors/inspector-runner.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/inspector-runner.js +162 -0
- package/node_modules/pi-subagents/src/inspectors/inspector-runner.js.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/plugins.d.ts +9 -0
- package/node_modules/pi-subagents/src/inspectors/plugins.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/plugins.js +82 -0
- package/node_modules/pi-subagents/src/inspectors/plugins.js.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/session-roots-codec.d.ts +16 -0
- package/node_modules/pi-subagents/src/inspectors/session-roots-codec.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/session-roots-codec.js +33 -0
- package/node_modules/pi-subagents/src/inspectors/session-roots-codec.js.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/shell-command.d.ts +2 -0
- package/node_modules/pi-subagents/src/inspectors/shell-command.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/shell-command.js +17 -0
- package/node_modules/pi-subagents/src/inspectors/shell-command.js.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/types.d.ts +49 -0
- package/node_modules/pi-subagents/src/inspectors/types.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/types.js +2 -0
- package/node_modules/pi-subagents/src/inspectors/types.js.map +1 -0
- package/node_modules/pi-subagents/src/integrations/herdr-status.d.ts +49 -0
- package/node_modules/pi-subagents/src/integrations/herdr-status.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/integrations/herdr-status.js +385 -0
- package/node_modules/pi-subagents/src/integrations/herdr-status.js.map +1 -0
- package/node_modules/pi-subagents/src/integrations/pi-web-session-liveness.d.ts +20 -0
- package/node_modules/pi-subagents/src/integrations/pi-web-session-liveness.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/integrations/pi-web-session-liveness.js +54 -0
- package/node_modules/pi-subagents/src/integrations/pi-web-session-liveness.js.map +1 -0
- package/node_modules/pi-subagents/src/intercom/intercom-bridge.d.ts +59 -0
- package/node_modules/pi-subagents/src/intercom/intercom-bridge.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/intercom/intercom-bridge.js +194 -0
- package/node_modules/pi-subagents/src/intercom/intercom-bridge.js.map +1 -0
- package/node_modules/pi-subagents/src/intercom/native-supervisor-channel.d.ts +64 -0
- package/node_modules/pi-subagents/src/intercom/native-supervisor-channel.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/intercom/native-supervisor-channel.js +899 -0
- package/node_modules/pi-subagents/src/intercom/native-supervisor-channel.js.map +1 -0
- package/node_modules/pi-subagents/src/intercom/result-intercom.d.ts +36 -0
- package/node_modules/pi-subagents/src/intercom/result-intercom.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/intercom/result-intercom.js +373 -0
- package/node_modules/pi-subagents/src/intercom/result-intercom.js.map +1 -0
- package/node_modules/pi-subagents/src/intercom/supervisor-ui.d.ts +40 -0
- package/node_modules/pi-subagents/src/intercom/supervisor-ui.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/intercom/supervisor-ui.js +202 -0
- package/node_modules/pi-subagents/src/intercom/supervisor-ui.js.map +1 -0
- package/node_modules/pi-subagents/src/missions/actions.d.ts +55 -0
- package/node_modules/pi-subagents/src/missions/actions.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/missions/actions.js +396 -0
- package/node_modules/pi-subagents/src/missions/actions.js.map +1 -0
- package/node_modules/pi-subagents/src/missions/goal-driver.d.ts +17 -0
- package/node_modules/pi-subagents/src/missions/goal-driver.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/missions/goal-driver.js +172 -0
- package/node_modules/pi-subagents/src/missions/goal-driver.js.map +1 -0
- package/node_modules/pi-subagents/src/missions/lifecycle.d.ts +40 -0
- package/node_modules/pi-subagents/src/missions/lifecycle.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/missions/lifecycle.js +352 -0
- package/node_modules/pi-subagents/src/missions/lifecycle.js.map +1 -0
- package/node_modules/pi-subagents/src/missions/store.d.ts +22 -0
- package/node_modules/pi-subagents/src/missions/store.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/missions/store.js +583 -0
- package/node_modules/pi-subagents/src/missions/store.js.map +1 -0
- package/node_modules/pi-subagents/src/missions/types.d.ts +168 -0
- package/node_modules/pi-subagents/src/missions/types.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/missions/types.js +10 -0
- package/node_modules/pi-subagents/src/missions/types.js.map +1 -0
- package/node_modules/pi-subagents/src/missions/workflow-state.d.ts +15 -0
- package/node_modules/pi-subagents/src/missions/workflow-state.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/missions/workflow-state.js +274 -0
- package/node_modules/pi-subagents/src/missions/workflow-state.js.map +1 -0
- package/node_modules/pi-subagents/src/policy/authority.d.ts +10 -0
- package/node_modules/pi-subagents/src/policy/authority.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/policy/authority.js +42 -0
- package/node_modules/pi-subagents/src/policy/authority.js.map +1 -0
- package/node_modules/pi-subagents/src/profiles/profiles.d.ts +135 -0
- package/node_modules/pi-subagents/src/profiles/profiles.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/profiles/profiles.js +527 -0
- package/node_modules/pi-subagents/src/profiles/profiles.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/active-async-capacity.d.ts +114 -0
- package/node_modules/pi-subagents/src/runs/background/active-async-capacity.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/active-async-capacity.js +508 -0
- package/node_modules/pi-subagents/src/runs/background/active-async-capacity.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/active-run-index.d.ts +13 -0
- package/node_modules/pi-subagents/src/runs/background/active-run-index.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/active-run-index.js +158 -0
- package/node_modules/pi-subagents/src/runs/background/active-run-index.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/async-execution.d.ts +290 -0
- package/node_modules/pi-subagents/src/runs/background/async-execution.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/async-execution.js +2016 -0
- package/node_modules/pi-subagents/src/runs/background/async-execution.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/async-job-tracker.d.ts +30 -0
- package/node_modules/pi-subagents/src/runs/background/async-job-tracker.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/async-job-tracker.js +907 -0
- package/node_modules/pi-subagents/src/runs/background/async-job-tracker.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/async-resume.d.ts +59 -0
- package/node_modules/pi-subagents/src/runs/background/async-resume.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/async-resume.js +672 -0
- package/node_modules/pi-subagents/src/runs/background/async-resume.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/async-retention.d.ts +45 -0
- package/node_modules/pi-subagents/src/runs/background/async-retention.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/async-retention.js +916 -0
- package/node_modules/pi-subagents/src/runs/background/async-retention.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/async-status-snapshot.d.ts +10 -0
- package/node_modules/pi-subagents/src/runs/background/async-status-snapshot.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/async-status-snapshot.js +25 -0
- package/node_modules/pi-subagents/src/runs/background/async-status-snapshot.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/async-status.d.ts +170 -0
- package/node_modules/pi-subagents/src/runs/background/async-status.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/async-status.js +674 -0
- package/node_modules/pi-subagents/src/runs/background/async-status.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/auto-drain.d.ts +17 -0
- package/node_modules/pi-subagents/src/runs/background/auto-drain.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/auto-drain.js +73 -0
- package/node_modules/pi-subagents/src/runs/background/auto-drain.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/await-async-run.d.ts +23 -0
- package/node_modules/pi-subagents/src/runs/background/await-async-run.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/await-async-run.js +82 -0
- package/node_modules/pi-subagents/src/runs/background/await-async-run.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/binary-bootstrap.d.ts +9 -0
- package/node_modules/pi-subagents/src/runs/background/binary-bootstrap.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/binary-bootstrap.js +69 -0
- package/node_modules/pi-subagents/src/runs/background/binary-bootstrap.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/calendar-schedule.d.ts +27 -0
- package/node_modules/pi-subagents/src/runs/background/calendar-schedule.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/calendar-schedule.js +94 -0
- package/node_modules/pi-subagents/src/runs/background/calendar-schedule.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/chain-append.d.ts +35 -0
- package/node_modules/pi-subagents/src/runs/background/chain-append.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/chain-append.js +300 -0
- package/node_modules/pi-subagents/src/runs/background/chain-append.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/chain-root-attachment.d.ts +50 -0
- package/node_modules/pi-subagents/src/runs/background/chain-root-attachment.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/chain-root-attachment.js +184 -0
- package/node_modules/pi-subagents/src/runs/background/chain-root-attachment.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/completion-batcher.d.ts +52 -0
- package/node_modules/pi-subagents/src/runs/background/completion-batcher.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/completion-batcher.js +120 -0
- package/node_modules/pi-subagents/src/runs/background/completion-batcher.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/completion-dedupe.d.ts +14 -0
- package/node_modules/pi-subagents/src/runs/background/completion-dedupe.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/completion-dedupe.js +49 -0
- package/node_modules/pi-subagents/src/runs/background/completion-dedupe.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/completion-replay.d.ts +48 -0
- package/node_modules/pi-subagents/src/runs/background/completion-replay.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/completion-replay.js +267 -0
- package/node_modules/pi-subagents/src/runs/background/completion-replay.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/control-channel.d.ts +170 -0
- package/node_modules/pi-subagents/src/runs/background/control-channel.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/control-channel.js +587 -0
- package/node_modules/pi-subagents/src/runs/background/control-channel.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/fleet-view.d.ts +64 -0
- package/node_modules/pi-subagents/src/runs/background/fleet-view.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/fleet-view.js +667 -0
- package/node_modules/pi-subagents/src/runs/background/fleet-view.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/index-segment.d.ts +16 -0
- package/node_modules/pi-subagents/src/runs/background/index-segment.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/index-segment.js +59 -0
- package/node_modules/pi-subagents/src/runs/background/index-segment.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/inspect-rpc.d.ts +60 -0
- package/node_modules/pi-subagents/src/runs/background/inspect-rpc.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/inspect-rpc.js +406 -0
- package/node_modules/pi-subagents/src/runs/background/inspect-rpc.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/notify.d.ts +182 -0
- package/node_modules/pi-subagents/src/runs/background/notify.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/notify.js +758 -0
- package/node_modules/pi-subagents/src/runs/background/notify.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/owned-process-tree.d.ts +11 -0
- package/node_modules/pi-subagents/src/runs/background/owned-process-tree.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/owned-process-tree.js +117 -0
- package/node_modules/pi-subagents/src/runs/background/owned-process-tree.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/parallel-groups.d.ts +4 -0
- package/node_modules/pi-subagents/src/runs/background/parallel-groups.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/parallel-groups.js +47 -0
- package/node_modules/pi-subagents/src/runs/background/parallel-groups.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/pid-namespace.d.ts +3 -0
- package/node_modules/pi-subagents/src/runs/background/pid-namespace.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/pid-namespace.js +20 -0
- package/node_modules/pi-subagents/src/runs/background/pid-namespace.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/process-terminal-candidate.d.ts +18 -0
- package/node_modules/pi-subagents/src/runs/background/process-terminal-candidate.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/process-terminal-candidate.js +97 -0
- package/node_modules/pi-subagents/src/runs/background/process-terminal-candidate.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/process-terminal.d.ts +22 -0
- package/node_modules/pi-subagents/src/runs/background/process-terminal.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/process-terminal.js +228 -0
- package/node_modules/pi-subagents/src/runs/background/process-terminal.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/result-delivery-ownership.d.ts +11 -0
- package/node_modules/pi-subagents/src/runs/background/result-delivery-ownership.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/result-delivery-ownership.js +37 -0
- package/node_modules/pi-subagents/src/runs/background/result-delivery-ownership.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/result-files.d.ts +33 -0
- package/node_modules/pi-subagents/src/runs/background/result-files.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/result-files.js +528 -0
- package/node_modules/pi-subagents/src/runs/background/result-files.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/result-watcher.d.ts +91 -0
- package/node_modules/pi-subagents/src/runs/background/result-watcher.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/result-watcher.js +801 -0
- package/node_modules/pi-subagents/src/runs/background/result-watcher.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/resume-guidance.d.ts +5 -0
- package/node_modules/pi-subagents/src/runs/background/resume-guidance.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/resume-guidance.js +57 -0
- package/node_modules/pi-subagents/src/runs/background/resume-guidance.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/retained-children.d.ts +25 -0
- package/node_modules/pi-subagents/src/runs/background/retained-children.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/retained-children.js +129 -0
- package/node_modules/pi-subagents/src/runs/background/retained-children.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/retained-nested-route-tracker.d.ts +13 -0
- package/node_modules/pi-subagents/src/runs/background/retained-nested-route-tracker.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/retained-nested-route-tracker.js +91 -0
- package/node_modules/pi-subagents/src/runs/background/retained-nested-route-tracker.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/run-child-session.d.ts +127 -0
- package/node_modules/pi-subagents/src/runs/background/run-child-session.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/run-child-session.js +632 -0
- package/node_modules/pi-subagents/src/runs/background/run-child-session.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/run-id-query.d.ts +4 -0
- package/node_modules/pi-subagents/src/runs/background/run-id-query.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/run-id-query.js +7 -0
- package/node_modules/pi-subagents/src/runs/background/run-id-query.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/run-id-resolver.d.ts +23 -0
- package/node_modules/pi-subagents/src/runs/background/run-id-resolver.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/run-id-resolver.js +170 -0
- package/node_modules/pi-subagents/src/runs/background/run-id-resolver.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/run-status.d.ts +26 -0
- package/node_modules/pi-subagents/src/runs/background/run-status.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/run-status.js +839 -0
- package/node_modules/pi-subagents/src/runs/background/run-status.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/runner-aliases.d.ts +18 -0
- package/node_modules/pi-subagents/src/runs/background/runner-aliases.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/runner-aliases.js +157 -0
- package/node_modules/pi-subagents/src/runs/background/runner-aliases.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/runner-child-launch.d.ts +25 -0
- package/node_modules/pi-subagents/src/runs/background/runner-child-launch.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/runner-child-launch.js +70 -0
- package/node_modules/pi-subagents/src/runs/background/runner-child-launch.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/runner-child-sessions.d.ts +7 -0
- package/node_modules/pi-subagents/src/runs/background/runner-child-sessions.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/runner-child-sessions.js +35 -0
- package/node_modules/pi-subagents/src/runs/background/runner-child-sessions.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/runner-http-dispatcher.d.ts +43 -0
- package/node_modules/pi-subagents/src/runs/background/runner-http-dispatcher.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/runner-http-dispatcher.js +114 -0
- package/node_modules/pi-subagents/src/runs/background/runner-http-dispatcher.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/runner-startup-failure.d.ts +14 -0
- package/node_modules/pi-subagents/src/runs/background/runner-startup-failure.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/runner-startup-failure.js +47 -0
- package/node_modules/pi-subagents/src/runs/background/runner-startup-failure.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/scheduled-runs.d.ts +119 -0
- package/node_modules/pi-subagents/src/runs/background/scheduled-runs.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/scheduled-runs.js +1178 -0
- package/node_modules/pi-subagents/src/runs/background/scheduled-runs.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/stale-run-reconciler.d.ts +38 -0
- package/node_modules/pi-subagents/src/runs/background/stale-run-reconciler.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/stale-run-reconciler.js +421 -0
- package/node_modules/pi-subagents/src/runs/background/stale-run-reconciler.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/steering.d.ts +52 -0
- package/node_modules/pi-subagents/src/runs/background/steering.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/steering.js +247 -0
- package/node_modules/pi-subagents/src/runs/background/steering.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/subagent-runner-bootstrap.d.ts +14 -0
- package/node_modules/pi-subagents/src/runs/background/subagent-runner-bootstrap.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/subagent-runner-bootstrap.js +277 -0
- package/node_modules/pi-subagents/src/runs/background/subagent-runner-bootstrap.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/subagent-runner.d.ts +203 -0
- package/node_modules/pi-subagents/src/runs/background/subagent-runner.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/subagent-runner.js +4991 -0
- package/node_modules/pi-subagents/src/runs/background/subagent-runner.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/subagent-wait.d.ts +122 -0
- package/node_modules/pi-subagents/src/runs/background/subagent-wait.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/subagent-wait.js +735 -0
- package/node_modules/pi-subagents/src/runs/background/subagent-wait.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/terminal-run-index.d.ts +8 -0
- package/node_modules/pi-subagents/src/runs/background/terminal-run-index.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/terminal-run-index.js +123 -0
- package/node_modules/pi-subagents/src/runs/background/terminal-run-index.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/top-level-async.d.ts +8 -0
- package/node_modules/pi-subagents/src/runs/background/top-level-async.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/top-level-async.js +6 -0
- package/node_modules/pi-subagents/src/runs/background/top-level-async.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/wait-completions.d.ts +29 -0
- package/node_modules/pi-subagents/src/runs/background/wait-completions.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/wait-completions.js +265 -0
- package/node_modules/pi-subagents/src/runs/background/wait-completions.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/wait-config.d.ts +9 -0
- package/node_modules/pi-subagents/src/runs/background/wait-config.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/wait-config.js +47 -0
- package/node_modules/pi-subagents/src/runs/background/wait-config.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/wait-subscriptions.d.ts +27 -0
- package/node_modules/pi-subagents/src/runs/background/wait-subscriptions.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/wait-subscriptions.js +337 -0
- package/node_modules/pi-subagents/src/runs/background/wait-subscriptions.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/wait-tool.d.ts +7 -0
- package/node_modules/pi-subagents/src/runs/background/wait-tool.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/wait-tool.js +36 -0
- package/node_modules/pi-subagents/src/runs/background/wait-tool.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/workflow-terminal-proof.d.ts +31 -0
- package/node_modules/pi-subagents/src/runs/background/workflow-terminal-proof.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/background/workflow-terminal-proof.js +81 -0
- package/node_modules/pi-subagents/src/runs/background/workflow-terminal-proof.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/async-dismiss-action.d.ts +7 -0
- package/node_modules/pi-subagents/src/runs/foreground/async-dismiss-action.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/async-dismiss-action.js +82 -0
- package/node_modules/pi-subagents/src/runs/foreground/async-dismiss-action.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/async-steering-action.d.ts +32 -0
- package/node_modules/pi-subagents/src/runs/foreground/async-steering-action.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/async-steering-action.js +270 -0
- package/node_modules/pi-subagents/src/runs/foreground/async-steering-action.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/async-stop-action.d.ts +7 -0
- package/node_modules/pi-subagents/src/runs/foreground/async-stop-action.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/async-stop-action.js +187 -0
- package/node_modules/pi-subagents/src/runs/foreground/async-stop-action.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/command-action.d.ts +13 -0
- package/node_modules/pi-subagents/src/runs/foreground/command-action.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/command-action.js +38 -0
- package/node_modules/pi-subagents/src/runs/foreground/command-action.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/execution.d.ts +11 -0
- package/node_modules/pi-subagents/src/runs/foreground/execution.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/execution.js +2159 -0
- package/node_modules/pi-subagents/src/runs/foreground/execution.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/foreground-control.d.ts +25 -0
- package/node_modules/pi-subagents/src/runs/foreground/foreground-control.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/foreground-control.js +139 -0
- package/node_modules/pi-subagents/src/runs/foreground/foreground-control.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/foreground-history.d.ts +12 -0
- package/node_modules/pi-subagents/src/runs/foreground/foreground-history.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/foreground-history.js +166 -0
- package/node_modules/pi-subagents/src/runs/foreground/foreground-history.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/prompt-audit.d.ts +33 -0
- package/node_modules/pi-subagents/src/runs/foreground/prompt-audit.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/prompt-audit.js +139 -0
- package/node_modules/pi-subagents/src/runs/foreground/prompt-audit.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/subagent-executor.d.ts +299 -0
- package/node_modules/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/subagent-executor.js +7529 -0
- package/node_modules/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/workflow-detach-reconcile.d.ts +16 -0
- package/node_modules/pi-subagents/src/runs/foreground/workflow-detach-reconcile.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/workflow-detach-reconcile.js +284 -0
- package/node_modules/pi-subagents/src/runs/foreground/workflow-detach-reconcile.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/workflow-foreground-steering.d.ts +44 -0
- package/node_modules/pi-subagents/src/runs/foreground/workflow-foreground-steering.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/foreground/workflow-foreground-steering.js +149 -0
- package/node_modules/pi-subagents/src/runs/foreground/workflow-foreground-steering.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/abort-recovery.d.ts +27 -0
- package/node_modules/pi-subagents/src/runs/shared/abort-recovery.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/abort-recovery.js +109 -0
- package/node_modules/pi-subagents/src/runs/shared/abort-recovery.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/acceptance.d.ts +145 -0
- package/node_modules/pi-subagents/src/runs/shared/acceptance.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/acceptance.js +1617 -0
- package/node_modules/pi-subagents/src/runs/shared/acceptance.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/agent-contract.d.ts +6 -0
- package/node_modules/pi-subagents/src/runs/shared/agent-contract.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/agent-contract.js +36 -0
- package/node_modules/pi-subagents/src/runs/shared/agent-contract.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/async-status-projection.d.ts +97 -0
- package/node_modules/pi-subagents/src/runs/shared/async-status-projection.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/async-status-projection.js +545 -0
- package/node_modules/pi-subagents/src/runs/shared/async-status-projection.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/background-process-options.d.ts +5 -0
- package/node_modules/pi-subagents/src/runs/shared/background-process-options.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/background-process-options.js +7 -0
- package/node_modules/pi-subagents/src/runs/shared/background-process-options.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/capability-ceiling.d.ts +58 -0
- package/node_modules/pi-subagents/src/runs/shared/capability-ceiling.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/capability-ceiling.js +179 -0
- package/node_modules/pi-subagents/src/runs/shared/capability-ceiling.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/chain-outputs.d.ts +19 -0
- package/node_modules/pi-subagents/src/runs/shared/chain-outputs.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/chain-outputs.js +105 -0
- package/node_modules/pi-subagents/src/runs/shared/chain-outputs.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-commands.d.ts +28 -0
- package/node_modules/pi-subagents/src/runs/shared/child-commands.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-commands.js +250 -0
- package/node_modules/pi-subagents/src/runs/shared/child-commands.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-hooks.d.ts +32 -0
- package/node_modules/pi-subagents/src/runs/shared/child-hooks.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-hooks.js +173 -0
- package/node_modules/pi-subagents/src/runs/shared/child-hooks.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-identity.d.ts +24 -0
- package/node_modules/pi-subagents/src/runs/shared/child-identity.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-identity.js +41 -0
- package/node_modules/pi-subagents/src/runs/shared/child-identity.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-launch-plan.d.ts +71 -0
- package/node_modules/pi-subagents/src/runs/shared/child-launch-plan.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-launch-plan.js +89 -0
- package/node_modules/pi-subagents/src/runs/shared/child-launch-plan.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-launch.d.ts +116 -0
- package/node_modules/pi-subagents/src/runs/shared/child-launch.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-launch.js +247 -0
- package/node_modules/pi-subagents/src/runs/shared/child-launch.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-lifecycle.d.ts +14 -0
- package/node_modules/pi-subagents/src/runs/shared/child-lifecycle.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-lifecycle.js +23 -0
- package/node_modules/pi-subagents/src/runs/shared/child-lifecycle.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-runtime-config.d.ts +106 -0
- package/node_modules/pi-subagents/src/runs/shared/child-runtime-config.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-runtime-config.js +39 -0
- package/node_modules/pi-subagents/src/runs/shared/child-runtime-config.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-session.d.ts +168 -0
- package/node_modules/pi-subagents/src/runs/shared/child-session.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-session.js +584 -0
- package/node_modules/pi-subagents/src/runs/shared/child-session.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-tool-plan.d.ts +77 -0
- package/node_modules/pi-subagents/src/runs/shared/child-tool-plan.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-tool-plan.js +385 -0
- package/node_modules/pi-subagents/src/runs/shared/child-tool-plan.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/claude-code-adapter.d.ts +81 -0
- package/node_modules/pi-subagents/src/runs/shared/claude-code-adapter.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/claude-code-adapter.js +256 -0
- package/node_modules/pi-subagents/src/runs/shared/claude-code-adapter.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/codex-exec-adapter.d.ts +26 -0
- package/node_modules/pi-subagents/src/runs/shared/codex-exec-adapter.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/codex-exec-adapter.js +128 -0
- package/node_modules/pi-subagents/src/runs/shared/codex-exec-adapter.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/context-mode.d.ts +13 -0
- package/node_modules/pi-subagents/src/runs/shared/context-mode.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/context-mode.js +39 -0
- package/node_modules/pi-subagents/src/runs/shared/context-mode.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/cursor-agent-adapter.d.ts +27 -0
- package/node_modules/pi-subagents/src/runs/shared/cursor-agent-adapter.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/cursor-agent-adapter.js +100 -0
- package/node_modules/pi-subagents/src/runs/shared/cursor-agent-adapter.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/dynamic-fanout.d.ts +50 -0
- package/node_modules/pi-subagents/src/runs/shared/dynamic-fanout.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/dynamic-fanout.js +274 -0
- package/node_modules/pi-subagents/src/runs/shared/dynamic-fanout.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/effective-system-prompt.d.ts +18 -0
- package/node_modules/pi-subagents/src/runs/shared/effective-system-prompt.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/effective-system-prompt.js +23 -0
- package/node_modules/pi-subagents/src/runs/shared/effective-system-prompt.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/extension-bindings.d.ts +17 -0
- package/node_modules/pi-subagents/src/runs/shared/extension-bindings.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/extension-bindings.js +83 -0
- package/node_modules/pi-subagents/src/runs/shared/extension-bindings.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/external-cli-contract.d.ts +30 -0
- package/node_modules/pi-subagents/src/runs/shared/external-cli-contract.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/external-cli-contract.js +146 -0
- package/node_modules/pi-subagents/src/runs/shared/external-cli-contract.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/external-cli-preflight.d.ts +42 -0
- package/node_modules/pi-subagents/src/runs/shared/external-cli-preflight.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/external-cli-preflight.js +160 -0
- package/node_modules/pi-subagents/src/runs/shared/external-cli-preflight.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/external-cli-runner.d.ts +66 -0
- package/node_modules/pi-subagents/src/runs/shared/external-cli-runner.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/external-cli-runner.js +425 -0
- package/node_modules/pi-subagents/src/runs/shared/external-cli-runner.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/external-job-bridge.d.ts +25 -0
- package/node_modules/pi-subagents/src/runs/shared/external-job-bridge.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/external-job-bridge.js +487 -0
- package/node_modules/pi-subagents/src/runs/shared/external-job-bridge.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/external-job-runner.d.ts +45 -0
- package/node_modules/pi-subagents/src/runs/shared/external-job-runner.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/external-job-runner.js +353 -0
- package/node_modules/pi-subagents/src/runs/shared/external-job-runner.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/fast-mode-extension.d.ts +4 -0
- package/node_modules/pi-subagents/src/runs/shared/fast-mode-extension.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/fast-mode-extension.js +9 -0
- package/node_modules/pi-subagents/src/runs/shared/fast-mode-extension.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/git-environment.d.ts +3 -0
- package/node_modules/pi-subagents/src/runs/shared/git-environment.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/git-environment.js +28 -0
- package/node_modules/pi-subagents/src/runs/shared/git-environment.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-connection.d.ts +71 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-connection.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-connection.js +258 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-connection.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-external-adapters.d.ts +148 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-external-adapters.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-external-adapters.js +405 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-external-adapters.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-machine.d.ts +48 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-machine.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-machine.js +247 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-machine.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-pi-protocol.d.ts +22 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-pi-protocol.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-pi-protocol.js +58 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-pi-protocol.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-placed-run.d.ts +267 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-placed-run.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-placed-run.js +716 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-placed-run.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/host-step-status.d.ts +34 -0
- package/node_modules/pi-subagents/src/runs/shared/host-step-status.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/host-step-status.js +245 -0
- package/node_modules/pi-subagents/src/runs/shared/host-step-status.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/lane-metadata.d.ts +24 -0
- package/node_modules/pi-subagents/src/runs/shared/lane-metadata.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/lane-metadata.js +127 -0
- package/node_modules/pi-subagents/src/runs/shared/lane-metadata.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/launch-cwd.d.ts +2 -0
- package/node_modules/pi-subagents/src/runs/shared/launch-cwd.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/launch-cwd.js +17 -0
- package/node_modules/pi-subagents/src/runs/shared/launch-cwd.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/long-running-guard.d.ts +33 -0
- package/node_modules/pi-subagents/src/runs/shared/long-running-guard.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/long-running-guard.js +199 -0
- package/node_modules/pi-subagents/src/runs/shared/long-running-guard.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/mcp-config-sources.d.ts +34 -0
- package/node_modules/pi-subagents/src/runs/shared/mcp-config-sources.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/mcp-config-sources.js +419 -0
- package/node_modules/pi-subagents/src/runs/shared/mcp-config-sources.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/mcp-direct-tool-allowlist.d.ts +87 -0
- package/node_modules/pi-subagents/src/runs/shared/mcp-direct-tool-allowlist.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/mcp-direct-tool-allowlist.js +478 -0
- package/node_modules/pi-subagents/src/runs/shared/mcp-direct-tool-allowlist.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/mcp-direct-tool-grant.d.ts +43 -0
- package/node_modules/pi-subagents/src/runs/shared/mcp-direct-tool-grant.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/mcp-direct-tool-grant.js +160 -0
- package/node_modules/pi-subagents/src/runs/shared/mcp-direct-tool-grant.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/model-resolution-diagnostic.d.ts +22 -0
- package/node_modules/pi-subagents/src/runs/shared/model-resolution-diagnostic.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/model-resolution-diagnostic.js +65 -0
- package/node_modules/pi-subagents/src/runs/shared/model-resolution-diagnostic.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/model-resolution.d.ts +106 -0
- package/node_modules/pi-subagents/src/runs/shared/model-resolution.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/model-resolution.js +377 -0
- package/node_modules/pi-subagents/src/runs/shared/model-resolution.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/model-scope.d.ts +69 -0
- package/node_modules/pi-subagents/src/runs/shared/model-scope.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/model-scope.js +172 -0
- package/node_modules/pi-subagents/src/runs/shared/model-scope.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/mutation-evidence.d.ts +19 -0
- package/node_modules/pi-subagents/src/runs/shared/mutation-evidence.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/mutation-evidence.js +199 -0
- package/node_modules/pi-subagents/src/runs/shared/mutation-evidence.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/nested-events.d.ts +134 -0
- package/node_modules/pi-subagents/src/runs/shared/nested-events.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/nested-events.js +1056 -0
- package/node_modules/pi-subagents/src/runs/shared/nested-events.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/nested-path.d.ts +9 -0
- package/node_modules/pi-subagents/src/runs/shared/nested-path.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/nested-path.js +35 -0
- package/node_modules/pi-subagents/src/runs/shared/nested-path.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/nested-render.d.ts +21 -0
- package/node_modules/pi-subagents/src/runs/shared/nested-render.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/nested-render.js +116 -0
- package/node_modules/pi-subagents/src/runs/shared/nested-render.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/orca-progress-tabs.d.ts +33 -0
- package/node_modules/pi-subagents/src/runs/shared/orca-progress-tabs.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/orca-progress-tabs.js +527 -0
- package/node_modules/pi-subagents/src/runs/shared/orca-progress-tabs.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/parallel-handoff.d.ts +79 -0
- package/node_modules/pi-subagents/src/runs/shared/parallel-handoff.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/parallel-handoff.js +780 -0
- package/node_modules/pi-subagents/src/runs/shared/parallel-handoff.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/parallel-utils.d.ts +168 -0
- package/node_modules/pi-subagents/src/runs/shared/parallel-utils.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/parallel-utils.js +126 -0
- package/node_modules/pi-subagents/src/runs/shared/parallel-utils.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/partial-output.d.ts +18 -0
- package/node_modules/pi-subagents/src/runs/shared/partial-output.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/partial-output.js +29 -0
- package/node_modules/pi-subagents/src/runs/shared/partial-output.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/permissions.d.ts +13 -0
- package/node_modules/pi-subagents/src/runs/shared/permissions.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/permissions.js +93 -0
- package/node_modules/pi-subagents/src/runs/shared/permissions.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/pi-spawn.d.ts +28 -0
- package/node_modules/pi-subagents/src/runs/shared/pi-spawn.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/pi-spawn.js +156 -0
- package/node_modules/pi-subagents/src/runs/shared/pi-spawn.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/process-signal.d.ts +16 -0
- package/node_modules/pi-subagents/src/runs/shared/process-signal.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/process-signal.js +22 -0
- package/node_modules/pi-subagents/src/runs/shared/process-signal.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/readonly-drain-observation.d.ts +26 -0
- package/node_modules/pi-subagents/src/runs/shared/readonly-drain-observation.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/readonly-drain-observation.js +51 -0
- package/node_modules/pi-subagents/src/runs/shared/readonly-drain-observation.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/run-fanout-budget.d.ts +15 -0
- package/node_modules/pi-subagents/src/runs/shared/run-fanout-budget.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/run-fanout-budget.js +259 -0
- package/node_modules/pi-subagents/src/runs/shared/run-fanout-budget.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/run-history.d.ts +67 -0
- package/node_modules/pi-subagents/src/runs/shared/run-history.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/run-history.js +270 -0
- package/node_modules/pi-subagents/src/runs/shared/run-history.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/runtime-acknowledged-extensions.d.ts +8 -0
- package/node_modules/pi-subagents/src/runs/shared/runtime-acknowledged-extensions.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/runtime-acknowledged-extensions.js +45 -0
- package/node_modules/pi-subagents/src/runs/shared/runtime-acknowledged-extensions.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/session-lease.d.ts +70 -0
- package/node_modules/pi-subagents/src/runs/shared/session-lease.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/session-lease.js +251 -0
- package/node_modules/pi-subagents/src/runs/shared/session-lease.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/single-output.d.ts +61 -0
- package/node_modules/pi-subagents/src/runs/shared/single-output.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/single-output.js +271 -0
- package/node_modules/pi-subagents/src/runs/shared/single-output.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/spawn-budget.d.ts +21 -0
- package/node_modules/pi-subagents/src/runs/shared/spawn-budget.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/spawn-budget.js +94 -0
- package/node_modules/pi-subagents/src/runs/shared/spawn-budget.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/structured-output.d.ts +64 -0
- package/node_modules/pi-subagents/src/runs/shared/structured-output.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/structured-output.js +465 -0
- package/node_modules/pi-subagents/src/runs/shared/structured-output.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/subagent-control.d.ts +50 -0
- package/node_modules/pi-subagents/src/runs/shared/subagent-control.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/subagent-control.js +247 -0
- package/node_modules/pi-subagents/src/runs/shared/subagent-control.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/subagent-prompt-runtime.d.ts +29 -0
- package/node_modules/pi-subagents/src/runs/shared/subagent-prompt-runtime.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/subagent-prompt-runtime.js +573 -0
- package/node_modules/pi-subagents/src/runs/shared/subagent-prompt-runtime.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/tool-availability.d.ts +17 -0
- package/node_modules/pi-subagents/src/runs/shared/tool-availability.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/tool-availability.js +30 -0
- package/node_modules/pi-subagents/src/runs/shared/tool-availability.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/tool-budget.d.ts +22 -0
- package/node_modules/pi-subagents/src/runs/shared/tool-budget.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/tool-budget.js +79 -0
- package/node_modules/pi-subagents/src/runs/shared/tool-budget.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/tool-timeout.d.ts +32 -0
- package/node_modules/pi-subagents/src/runs/shared/tool-timeout.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/tool-timeout.js +74 -0
- package/node_modules/pi-subagents/src/runs/shared/tool-timeout.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/usage-budget.d.ts +8 -0
- package/node_modules/pi-subagents/src/runs/shared/usage-budget.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/usage-budget.js +75 -0
- package/node_modules/pi-subagents/src/runs/shared/usage-budget.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/usage-reconciliation.d.ts +9 -0
- package/node_modules/pi-subagents/src/runs/shared/usage-reconciliation.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/usage-reconciliation.js +72 -0
- package/node_modules/pi-subagents/src/runs/shared/usage-reconciliation.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/workflow-async-child-guidance.d.ts +4 -0
- package/node_modules/pi-subagents/src/runs/shared/workflow-async-child-guidance.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/workflow-async-child-guidance.js +18 -0
- package/node_modules/pi-subagents/src/runs/shared/workflow-async-child-guidance.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/workflow-graph.d.ts +32 -0
- package/node_modules/pi-subagents/src/runs/shared/workflow-graph.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/workflow-graph.js +222 -0
- package/node_modules/pi-subagents/src/runs/shared/workflow-graph.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-apply.d.ts +37 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-apply.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-apply.js +179 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-apply.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-plan.d.ts +85 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-plan.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-plan.js +804 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-plan.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree-lock.d.ts +6 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree-lock.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree-lock.js +41 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree-lock.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree-setup-command.d.ts +39 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree-setup-command.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree-setup-command.js +201 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree-setup-command.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree.d.ts +182 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree.js +1347 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/accessible-dir.d.ts +12 -0
- package/node_modules/pi-subagents/src/shared/accessible-dir.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/accessible-dir.js +37 -0
- package/node_modules/pi-subagents/src/shared/accessible-dir.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/agent-stream-options.d.ts +6 -0
- package/node_modules/pi-subagents/src/shared/agent-stream-options.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/agent-stream-options.js +4 -0
- package/node_modules/pi-subagents/src/shared/agent-stream-options.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/artifacts.d.ts +23 -0
- package/node_modules/pi-subagents/src/shared/artifacts.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/artifacts.js +273 -0
- package/node_modules/pi-subagents/src/shared/artifacts.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/atomic-json.d.ts +19 -0
- package/node_modules/pi-subagents/src/shared/atomic-json.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/atomic-json.js +60 -0
- package/node_modules/pi-subagents/src/shared/atomic-json.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/capacity-resilient-json.d.ts +27 -0
- package/node_modules/pi-subagents/src/shared/capacity-resilient-json.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/capacity-resilient-json.js +87 -0
- package/node_modules/pi-subagents/src/shared/capacity-resilient-json.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/child-cache-retention.d.ts +30 -0
- package/node_modules/pi-subagents/src/shared/child-cache-retention.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/child-cache-retention.js +41 -0
- package/node_modules/pi-subagents/src/shared/child-cache-retention.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/child-session-name.d.ts +9 -0
- package/node_modules/pi-subagents/src/shared/child-session-name.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/child-session-name.js +41 -0
- package/node_modules/pi-subagents/src/shared/child-session-name.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/child-transcript.d.ts +38 -0
- package/node_modules/pi-subagents/src/shared/child-transcript.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/child-transcript.js +226 -0
- package/node_modules/pi-subagents/src/shared/child-transcript.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/completion-owner.d.ts +3 -0
- package/node_modules/pi-subagents/src/shared/completion-owner.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/completion-owner.js +9 -0
- package/node_modules/pi-subagents/src/shared/completion-owner.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/disabled-features.d.ts +92 -0
- package/node_modules/pi-subagents/src/shared/disabled-features.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/disabled-features.js +113 -0
- package/node_modules/pi-subagents/src/shared/disabled-features.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/display-text.d.ts +6 -0
- package/node_modules/pi-subagents/src/shared/display-text.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/display-text.js +155 -0
- package/node_modules/pi-subagents/src/shared/display-text.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/extension-context.d.ts +17 -0
- package/node_modules/pi-subagents/src/shared/extension-context.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/extension-context.js +33 -0
- package/node_modules/pi-subagents/src/shared/extension-context.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/file-coalescer.d.ts +12 -0
- package/node_modules/pi-subagents/src/shared/file-coalescer.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/file-coalescer.js +35 -0
- package/node_modules/pi-subagents/src/shared/file-coalescer.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/file-lease.d.ts +5 -0
- package/node_modules/pi-subagents/src/shared/file-lease.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/file-lease.js +101 -0
- package/node_modules/pi-subagents/src/shared/file-lease.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/file-system-retry.d.ts +32 -0
- package/node_modules/pi-subagents/src/shared/file-system-retry.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/file-system-retry.js +85 -0
- package/node_modules/pi-subagents/src/shared/file-system-retry.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/fork-context.d.ts +63 -0
- package/node_modules/pi-subagents/src/shared/fork-context.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/fork-context.js +176 -0
- package/node_modules/pi-subagents/src/shared/fork-context.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/fork-session-cwd.d.ts +3 -0
- package/node_modules/pi-subagents/src/shared/fork-session-cwd.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/fork-session-cwd.js +24 -0
- package/node_modules/pi-subagents/src/shared/fork-session-cwd.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/formatters.d.ts +36 -0
- package/node_modules/pi-subagents/src/shared/formatters.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/formatters.js +143 -0
- package/node_modules/pi-subagents/src/shared/formatters.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/jsonl-writer.d.ts +21 -0
- package/node_modules/pi-subagents/src/shared/jsonl-writer.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/jsonl-writer.js +68 -0
- package/node_modules/pi-subagents/src/shared/jsonl-writer.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/launch-contract.d.ts +64 -0
- package/node_modules/pi-subagents/src/shared/launch-contract.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/launch-contract.js +140 -0
- package/node_modules/pi-subagents/src/shared/launch-contract.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/model-info.d.ts +48 -0
- package/node_modules/pi-subagents/src/shared/model-info.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/model-info.js +82 -0
- package/node_modules/pi-subagents/src/shared/model-info.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/model-response-aliases.d.ts +2 -0
- package/node_modules/pi-subagents/src/shared/model-response-aliases.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/model-response-aliases.js +16 -0
- package/node_modules/pi-subagents/src/shared/model-response-aliases.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/node-executable.d.ts +2 -0
- package/node_modules/pi-subagents/src/shared/node-executable.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/node-executable.js +21 -0
- package/node_modules/pi-subagents/src/shared/node-executable.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/opencode-session-headers.d.ts +13 -0
- package/node_modules/pi-subagents/src/shared/opencode-session-headers.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/opencode-session-headers.js +27 -0
- package/node_modules/pi-subagents/src/shared/opencode-session-headers.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/prompt-resources.d.ts +6 -0
- package/node_modules/pi-subagents/src/shared/prompt-resources.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/prompt-resources.js +11 -0
- package/node_modules/pi-subagents/src/shared/prompt-resources.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/pruned-fork.d.ts +35 -0
- package/node_modules/pi-subagents/src/shared/pruned-fork.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/pruned-fork.js +429 -0
- package/node_modules/pi-subagents/src/shared/pruned-fork.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/required-child-extensions.d.ts +35 -0
- package/node_modules/pi-subagents/src/shared/required-child-extensions.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/required-child-extensions.js +106 -0
- package/node_modules/pi-subagents/src/shared/required-child-extensions.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/session-file-trust.d.ts +2 -0
- package/node_modules/pi-subagents/src/shared/session-file-trust.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/session-file-trust.js +21 -0
- package/node_modules/pi-subagents/src/shared/session-file-trust.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/session-identity.d.ts +7 -0
- package/node_modules/pi-subagents/src/shared/session-identity.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/session-identity.js +7 -0
- package/node_modules/pi-subagents/src/shared/session-identity.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/session-tokens.d.ts +3 -0
- package/node_modules/pi-subagents/src/shared/session-tokens.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/session-tokens.js +59 -0
- package/node_modules/pi-subagents/src/shared/session-tokens.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/settings-file-lease.d.ts +5 -0
- package/node_modules/pi-subagents/src/shared/settings-file-lease.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/settings-file-lease.js +39 -0
- package/node_modules/pi-subagents/src/shared/settings-file-lease.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/settings.d.ts +147 -0
- package/node_modules/pi-subagents/src/shared/settings.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/settings.js +248 -0
- package/node_modules/pi-subagents/src/shared/settings.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/shortcuts.d.ts +2 -0
- package/node_modules/pi-subagents/src/shared/shortcuts.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/shortcuts.js +18 -0
- package/node_modules/pi-subagents/src/shared/shortcuts.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/status-format.d.ts +10 -0
- package/node_modules/pi-subagents/src/shared/status-format.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/status-format.js +61 -0
- package/node_modules/pi-subagents/src/shared/status-format.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/thinking-ceiling.d.ts +14 -0
- package/node_modules/pi-subagents/src/shared/thinking-ceiling.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/thinking-ceiling.js +38 -0
- package/node_modules/pi-subagents/src/shared/thinking-ceiling.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/types.d.ts +2725 -0
- package/node_modules/pi-subagents/src/shared/types.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/types.js +267 -0
- package/node_modules/pi-subagents/src/shared/types.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/utf8.d.ts +6 -0
- package/node_modules/pi-subagents/src/shared/utf8.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/utf8.js +13 -0
- package/node_modules/pi-subagents/src/shared/utf8.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/utils.d.ts +71 -0
- package/node_modules/pi-subagents/src/shared/utils.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/utils.js +593 -0
- package/node_modules/pi-subagents/src/shared/utils.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/watch-strategy.d.ts +3 -0
- package/node_modules/pi-subagents/src/shared/watch-strategy.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/watch-strategy.js +6 -0
- package/node_modules/pi-subagents/src/shared/watch-strategy.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/workflow-child-permit.d.ts +59 -0
- package/node_modules/pi-subagents/src/shared/workflow-child-permit.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/workflow-child-permit.js +160 -0
- package/node_modules/pi-subagents/src/shared/workflow-child-permit.js.map +1 -0
- package/node_modules/pi-subagents/src/slash/delegation-adapters.d.ts +153 -0
- package/node_modules/pi-subagents/src/slash/delegation-adapters.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/slash/delegation-adapters.js +310 -0
- package/node_modules/pi-subagents/src/slash/delegation-adapters.js.map +1 -0
- package/node_modules/pi-subagents/src/slash/delegation-json.d.ts +11 -0
- package/node_modules/pi-subagents/src/slash/delegation-json.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/slash/delegation-json.js +118 -0
- package/node_modules/pi-subagents/src/slash/delegation-json.js.map +1 -0
- package/node_modules/pi-subagents/src/slash/delegation-request.d.ts +13 -0
- package/node_modules/pi-subagents/src/slash/delegation-request.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/slash/delegation-request.js +175 -0
- package/node_modules/pi-subagents/src/slash/delegation-request.js.map +1 -0
- package/node_modules/pi-subagents/src/slash/prompt-template-bridge.d.ts +27 -0
- package/node_modules/pi-subagents/src/slash/prompt-template-bridge.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/slash/prompt-template-bridge.js +393 -0
- package/node_modules/pi-subagents/src/slash/prompt-template-bridge.js.map +1 -0
- package/node_modules/pi-subagents/src/slash/prompt-workflows.d.ts +22 -0
- package/node_modules/pi-subagents/src/slash/prompt-workflows.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/slash/prompt-workflows.js +275 -0
- package/node_modules/pi-subagents/src/slash/prompt-workflows.js.map +1 -0
- package/node_modules/pi-subagents/src/slash/selector.d.ts +48 -0
- package/node_modules/pi-subagents/src/slash/selector.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/slash/selector.js +118 -0
- package/node_modules/pi-subagents/src/slash/selector.js.map +1 -0
- package/node_modules/pi-subagents/src/slash/slash-bridge.d.ts +31 -0
- package/node_modules/pi-subagents/src/slash/slash-bridge.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/slash/slash-bridge.js +133 -0
- package/node_modules/pi-subagents/src/slash/slash-bridge.js.map +1 -0
- package/node_modules/pi-subagents/src/slash/slash-commands.d.ts +11 -0
- package/node_modules/pi-subagents/src/slash/slash-commands.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/slash/slash-commands.js +1049 -0
- package/node_modules/pi-subagents/src/slash/slash-commands.js.map +1 -0
- package/node_modules/pi-subagents/src/slash/slash-live-state.d.ts +22 -0
- package/node_modules/pi-subagents/src/slash/slash-live-state.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/slash/slash-live-state.js +264 -0
- package/node_modules/pi-subagents/src/slash/slash-live-state.js.map +1 -0
- package/node_modules/pi-subagents/src/slash/subagent-cost.d.ts +30 -0
- package/node_modules/pi-subagents/src/slash/subagent-cost.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/slash/subagent-cost.js +311 -0
- package/node_modules/pi-subagents/src/slash/subagent-cost.js.map +1 -0
- package/node_modules/pi-subagents/src/slash/subagents-admin.d.ts +3 -0
- package/node_modules/pi-subagents/src/slash/subagents-admin.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/slash/subagents-admin.js +453 -0
- package/node_modules/pi-subagents/src/slash/subagents-admin.js.map +1 -0
- package/node_modules/pi-subagents/src/tui/fleet-status.d.ts +88 -0
- package/node_modules/pi-subagents/src/tui/fleet-status.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/tui/fleet-status.js +1112 -0
- package/node_modules/pi-subagents/src/tui/fleet-status.js.map +1 -0
- package/node_modules/pi-subagents/src/tui/fleet-transcript.d.ts +50 -0
- package/node_modules/pi-subagents/src/tui/fleet-transcript.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/tui/fleet-transcript.js +497 -0
- package/node_modules/pi-subagents/src/tui/fleet-transcript.js.map +1 -0
- package/node_modules/pi-subagents/src/tui/fleet.d.ts +169 -0
- package/node_modules/pi-subagents/src/tui/fleet.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/tui/fleet.js +1427 -0
- package/node_modules/pi-subagents/src/tui/fleet.js.map +1 -0
- package/node_modules/pi-subagents/src/tui/render-helpers.d.ts +24 -0
- package/node_modules/pi-subagents/src/tui/render-helpers.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/tui/render-helpers.js +101 -0
- package/node_modules/pi-subagents/src/tui/render-helpers.js.map +1 -0
- package/node_modules/pi-subagents/src/tui/render.d.ts +61 -0
- package/node_modules/pi-subagents/src/tui/render.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/tui/render.js +3675 -0
- package/node_modules/pi-subagents/src/tui/render.js.map +1 -0
- package/node_modules/pi-subagents/src/tui/running-tone.d.ts +11 -0
- package/node_modules/pi-subagents/src/tui/running-tone.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/tui/running-tone.js +23 -0
- package/node_modules/pi-subagents/src/tui/running-tone.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/change-signature.d.ts +8 -0
- package/node_modules/pi-subagents/src/watchdog/change-signature.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/change-signature.js +246 -0
- package/node_modules/pi-subagents/src/watchdog/change-signature.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/child-status.d.ts +54 -0
- package/node_modules/pi-subagents/src/watchdog/child-status.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/child-status.js +188 -0
- package/node_modules/pi-subagents/src/watchdog/child-status.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/diff-tool.d.ts +26 -0
- package/node_modules/pi-subagents/src/watchdog/diff-tool.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/diff-tool.js +99 -0
- package/node_modules/pi-subagents/src/watchdog/diff-tool.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/emission-guard.d.ts +37 -0
- package/node_modules/pi-subagents/src/watchdog/emission-guard.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/emission-guard.js +98 -0
- package/node_modules/pi-subagents/src/watchdog/emission-guard.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/guidance.d.ts +4 -0
- package/node_modules/pi-subagents/src/watchdog/guidance.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/guidance.js +20 -0
- package/node_modules/pi-subagents/src/watchdog/guidance.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/lsp-diagnostics.d.ts +18 -0
- package/node_modules/pi-subagents/src/watchdog/lsp-diagnostics.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/lsp-diagnostics.js +490 -0
- package/node_modules/pi-subagents/src/watchdog/lsp-diagnostics.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/model-selection.d.ts +25 -0
- package/node_modules/pi-subagents/src/watchdog/model-selection.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/model-selection.js +168 -0
- package/node_modules/pi-subagents/src/watchdog/model-selection.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/permission-arbiter.d.ts +21 -0
- package/node_modules/pi-subagents/src/watchdog/permission-arbiter.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/permission-arbiter.js +136 -0
- package/node_modules/pi-subagents/src/watchdog/permission-arbiter.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/register-child.d.ts +14 -0
- package/node_modules/pi-subagents/src/watchdog/register-child.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/register-child.js +129 -0
- package/node_modules/pi-subagents/src/watchdog/register-child.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/register-main.d.ts +10 -0
- package/node_modules/pi-subagents/src/watchdog/register-main.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/register-main.js +418 -0
- package/node_modules/pi-subagents/src/watchdog/register-main.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/render.d.ts +12 -0
- package/node_modules/pi-subagents/src/watchdog/render.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/render.js +52 -0
- package/node_modules/pi-subagents/src/watchdog/render.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/review.d.ts +37 -0
- package/node_modules/pi-subagents/src/watchdog/review.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/review.js +320 -0
- package/node_modules/pi-subagents/src/watchdog/review.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/rules.d.ts +22 -0
- package/node_modules/pi-subagents/src/watchdog/rules.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/rules.js +59 -0
- package/node_modules/pi-subagents/src/watchdog/rules.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/runtime.d.ts +196 -0
- package/node_modules/pi-subagents/src/watchdog/runtime.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/runtime.js +867 -0
- package/node_modules/pi-subagents/src/watchdog/runtime.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/scope.d.ts +15 -0
- package/node_modules/pi-subagents/src/watchdog/scope.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/scope.js +45 -0
- package/node_modules/pi-subagents/src/watchdog/scope.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/settings.d.ts +30 -0
- package/node_modules/pi-subagents/src/watchdog/settings.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/settings.js +481 -0
- package/node_modules/pi-subagents/src/watchdog/settings.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/tool-actions.d.ts +18 -0
- package/node_modules/pi-subagents/src/watchdog/tool-actions.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/tool-actions.js +151 -0
- package/node_modules/pi-subagents/src/watchdog/tool-actions.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/turn-delta.d.ts +16 -0
- package/node_modules/pi-subagents/src/watchdog/turn-delta.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/turn-delta.js +189 -0
- package/node_modules/pi-subagents/src/watchdog/turn-delta.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/types.d.ts +142 -0
- package/node_modules/pi-subagents/src/watchdog/types.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/types.js +28 -0
- package/node_modules/pi-subagents/src/watchdog/types.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/warning-format.d.ts +8 -0
- package/node_modules/pi-subagents/src/watchdog/warning-format.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/warning-format.js +60 -0
- package/node_modules/pi-subagents/src/watchdog/warning-format.js.map +1 -0
- package/node_modules/pi-subagents/src/workflows/chat-progress.d.ts +38 -0
- package/node_modules/pi-subagents/src/workflows/chat-progress.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/workflows/chat-progress.js +130 -0
- package/node_modules/pi-subagents/src/workflows/chat-progress.js.map +1 -0
- package/node_modules/pi-subagents/src/workflows/host-command.d.ts +31 -0
- package/node_modules/pi-subagents/src/workflows/host-command.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/workflows/host-command.js +228 -0
- package/node_modules/pi-subagents/src/workflows/host-command.js.map +1 -0
- package/node_modules/pi-subagents/src/workflows/scripted-workflow.d.ts +205 -0
- package/node_modules/pi-subagents/src/workflows/scripted-workflow.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/workflows/scripted-workflow.js +2707 -0
- package/node_modules/pi-subagents/src/workflows/scripted-workflow.js.map +1 -0
- package/node_modules/pi-subagents/src/workflows/structured-workflow-scripts.d.ts +10 -0
- package/node_modules/pi-subagents/src/workflows/structured-workflow-scripts.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/workflows/structured-workflow-scripts.js +166 -0
- package/node_modules/pi-subagents/src/workflows/structured-workflow-scripts.js.map +1 -0
- package/node_modules/pi-subagents/src/workflows/workflow-checklist.d.ts +128 -0
- package/node_modules/pi-subagents/src/workflows/workflow-checklist.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/workflows/workflow-checklist.js +315 -0
- package/node_modules/pi-subagents/src/workflows/workflow-checklist.js.map +1 -0
- package/node_modules/pi-subagents/src/workflows/workflow-child-summary.d.ts +20 -0
- package/node_modules/pi-subagents/src/workflows/workflow-child-summary.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/workflows/workflow-child-summary.js +179 -0
- package/node_modules/pi-subagents/src/workflows/workflow-child-summary.js.map +1 -0
- package/node_modules/pi-subagents/src/workflows/workflow-preflight.d.ts +59 -0
- package/node_modules/pi-subagents/src/workflows/workflow-preflight.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/workflows/workflow-preflight.js +289 -0
- package/node_modules/pi-subagents/src/workflows/workflow-preflight.js.map +1 -0
- package/node_modules/pi-subagents/src/workflows/workflow-receipt.d.ts +35 -0
- package/node_modules/pi-subagents/src/workflows/workflow-receipt.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/workflows/workflow-receipt.js +455 -0
- package/node_modules/pi-subagents/src/workflows/workflow-receipt.js.map +1 -0
- package/node_modules/pi-subagents/src/workflows/workflow-resources.d.ts +56 -0
- package/node_modules/pi-subagents/src/workflows/workflow-resources.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/workflows/workflow-resources.js +260 -0
- package/node_modules/pi-subagents/src/workflows/workflow-resources.js.map +1 -0
- package/node_modules/pi-subagents/src/workflows/workflow-reuse.d.ts +51 -0
- package/node_modules/pi-subagents/src/workflows/workflow-reuse.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/workflows/workflow-reuse.js +103 -0
- package/node_modules/pi-subagents/src/workflows/workflow-reuse.js.map +1 -0
- package/node_modules/pi-subagents/src/workflows/workflow-revival.d.ts +32 -0
- package/node_modules/pi-subagents/src/workflows/workflow-revival.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/workflows/workflow-revival.js +111 -0
- package/node_modules/pi-subagents/src/workflows/workflow-revival.js.map +1 -0
- package/node_modules/pi-subagents/src/workflows/workflow-settlement.d.ts +85 -0
- package/node_modules/pi-subagents/src/workflows/workflow-settlement.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/workflows/workflow-settlement.js +204 -0
- package/node_modules/pi-subagents/src/workflows/workflow-settlement.js.map +1 -0
- package/node_modules/undici/LICENSE +21 -0
- package/node_modules/undici/README.md +797 -0
- package/node_modules/undici/docs/docs/api/Agent.md +291 -0
- package/node_modules/undici/docs/docs/api/BalancedPool.md +297 -0
- package/node_modules/undici/docs/docs/api/CacheStorage.md +188 -0
- package/node_modules/undici/docs/docs/api/CacheStore.md +360 -0
- package/node_modules/undici/docs/docs/api/Client.md +533 -0
- package/node_modules/undici/docs/docs/api/ClientStats.md +93 -0
- package/node_modules/undici/docs/docs/api/Connector.md +198 -0
- package/node_modules/undici/docs/docs/api/ContentType.md +97 -0
- package/node_modules/undici/docs/docs/api/Cookies.md +179 -0
- package/node_modules/undici/docs/docs/api/Debug.md +78 -0
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +515 -0
- package/node_modules/undici/docs/docs/api/Dispatcher.md +827 -0
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +171 -0
- package/node_modules/undici/docs/docs/api/Errors.md +524 -0
- package/node_modules/undici/docs/docs/api/EventSource.md +358 -0
- package/node_modules/undici/docs/docs/api/Fetch.md +711 -0
- package/node_modules/undici/docs/docs/api/GlobalInstallation.md +121 -0
- package/node_modules/undici/docs/docs/api/H2CClient.md +385 -0
- package/node_modules/undici/docs/docs/api/Interceptors.md +418 -0
- package/node_modules/undici/docs/docs/api/MockAgent.md +622 -0
- package/node_modules/undici/docs/docs/api/MockCallHistory.md +371 -0
- package/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +206 -0
- package/node_modules/undici/docs/docs/api/MockClient.md +199 -0
- package/node_modules/undici/docs/docs/api/MockErrors.md +63 -0
- package/node_modules/undici/docs/docs/api/MockPool.md +618 -0
- package/node_modules/undici/docs/docs/api/Pool.md +279 -0
- package/node_modules/undici/docs/docs/api/PoolStats.md +141 -0
- package/node_modules/undici/docs/docs/api/ProxyAgent.md +248 -0
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +276 -0
- package/node_modules/undici/docs/docs/api/RetryAgent.md +136 -0
- package/node_modules/undici/docs/docs/api/RetryHandler.md +200 -0
- package/node_modules/undici/docs/docs/api/RoundRobinPool.md +239 -0
- package/node_modules/undici/docs/docs/api/SnapshotAgent.md +361 -0
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +256 -0
- package/node_modules/undici/docs/docs/api/Util.md +82 -0
- package/node_modules/undici/docs/docs/api/WebSocket.md +536 -0
- package/node_modules/undici/docs/docs/api/api-lifecycle.md +159 -0
- package/node_modules/undici/docs/docs/best-practices/client-certificate.md +66 -0
- package/node_modules/undici/docs/docs/best-practices/crawling.md +60 -0
- package/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +233 -0
- package/node_modules/undici/docs/docs/best-practices/mocking-request.md +192 -0
- package/node_modules/undici/docs/docs/best-practices/proxy.md +129 -0
- package/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +226 -0
- package/node_modules/undici/docs/docs/best-practices/writing-tests.md +65 -0
- package/node_modules/undici/docs/docs/getting-started.md +281 -0
- package/node_modules/undici/docs/docs/index.md +784 -0
- package/node_modules/undici/docs/docs/site.json +125 -0
- package/node_modules/undici/docs/docs/type-map.json +79 -0
- package/node_modules/undici/index-fetch.js +65 -0
- package/node_modules/undici/index.d.ts +3 -0
- package/node_modules/undici/index.js +236 -0
- package/node_modules/undici/lib/api/abort-signal.js +59 -0
- package/node_modules/undici/lib/api/api-connect.js +112 -0
- package/node_modules/undici/lib/api/api-pipeline.js +265 -0
- package/node_modules/undici/lib/api/api-request.js +244 -0
- package/node_modules/undici/lib/api/api-stream.js +270 -0
- package/node_modules/undici/lib/api/api-upgrade.js +121 -0
- package/node_modules/undici/lib/api/index.js +7 -0
- package/node_modules/undici/lib/api/readable.js +616 -0
- package/node_modules/undici/lib/cache/memory-cache-store.js +279 -0
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +469 -0
- package/node_modules/undici/lib/core/connect.js +192 -0
- package/node_modules/undici/lib/core/constants.js +120 -0
- package/node_modules/undici/lib/core/diagnostics.js +227 -0
- package/node_modules/undici/lib/core/errors.js +497 -0
- package/node_modules/undici/lib/core/request.js +546 -0
- package/node_modules/undici/lib/core/socks5-client.js +422 -0
- package/node_modules/undici/lib/core/socks5-utils.js +212 -0
- package/node_modules/undici/lib/core/symbols.js +79 -0
- package/node_modules/undici/lib/core/tree.js +160 -0
- package/node_modules/undici/lib/core/util.js +1049 -0
- package/node_modules/undici/lib/dispatcher/agent.js +177 -0
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +217 -0
- package/node_modules/undici/lib/dispatcher/client-h1.js +1801 -0
- package/node_modules/undici/lib/dispatcher/client-h2.js +1781 -0
- package/node_modules/undici/lib/dispatcher/client.js +741 -0
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +197 -0
- package/node_modules/undici/lib/dispatcher/dispatcher.js +58 -0
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +110 -0
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +175 -0
- package/node_modules/undici/lib/dispatcher/fixed-queue.js +135 -0
- package/node_modules/undici/lib/dispatcher/h2c-client.js +51 -0
- package/node_modules/undici/lib/dispatcher/pool-base.js +232 -0
- package/node_modules/undici/lib/dispatcher/pool.js +143 -0
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +395 -0
- package/node_modules/undici/lib/dispatcher/retry-agent.js +38 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +159 -0
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +350 -0
- package/node_modules/undici/lib/encoding/index.js +33 -0
- package/node_modules/undici/lib/global.js +82 -0
- package/node_modules/undici/lib/handler/cache-handler.js +818 -0
- package/node_modules/undici/lib/handler/cache-revalidation-handler.js +134 -0
- package/node_modules/undici/lib/handler/decorator-handler.js +72 -0
- package/node_modules/undici/lib/handler/deduplication-handler.js +466 -0
- package/node_modules/undici/lib/handler/redirect-handler.js +238 -0
- package/node_modules/undici/lib/handler/retry-handler.js +594 -0
- package/node_modules/undici/lib/interceptor/cache.js +671 -0
- package/node_modules/undici/lib/interceptor/decompress.js +394 -0
- package/node_modules/undici/lib/interceptor/deduplicate.js +118 -0
- package/node_modules/undici/lib/interceptor/dns.js +582 -0
- package/node_modules/undici/lib/interceptor/dump.js +99 -0
- package/node_modules/undici/lib/interceptor/redirect.js +21 -0
- package/node_modules/undici/lib/interceptor/response-error.js +95 -0
- package/node_modules/undici/lib/interceptor/retry.js +19 -0
- package/node_modules/undici/lib/llhttp/constants.d.ts +195 -0
- package/node_modules/undici/lib/llhttp/constants.js +531 -0
- package/node_modules/undici/lib/llhttp/llhttp-wasm.js +15 -0
- package/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +15 -0
- package/node_modules/undici/lib/llhttp/utils.d.ts +2 -0
- package/node_modules/undici/lib/llhttp/utils.js +12 -0
- package/node_modules/undici/lib/mock/mock-agent.js +244 -0
- package/node_modules/undici/lib/mock/mock-call-history.js +248 -0
- package/node_modules/undici/lib/mock/mock-client.js +68 -0
- package/node_modules/undici/lib/mock/mock-errors.js +29 -0
- package/node_modules/undici/lib/mock/mock-interceptor.js +227 -0
- package/node_modules/undici/lib/mock/mock-pool.js +68 -0
- package/node_modules/undici/lib/mock/mock-symbols.js +32 -0
- package/node_modules/undici/lib/mock/mock-utils.js +720 -0
- package/node_modules/undici/lib/mock/pending-interceptors-formatter.js +43 -0
- package/node_modules/undici/lib/mock/snapshot-agent.js +371 -0
- package/node_modules/undici/lib/mock/snapshot-recorder.js +623 -0
- package/node_modules/undici/lib/mock/snapshot-utils.js +158 -0
- package/node_modules/undici/lib/util/cache.js +758 -0
- package/node_modules/undici/lib/util/date.js +670 -0
- package/node_modules/undici/lib/util/runtime-features.js +93 -0
- package/node_modules/undici/lib/util/stats.js +32 -0
- package/node_modules/undici/lib/util/timers.js +425 -0
- package/node_modules/undici/lib/web/cache/cache.js +862 -0
- package/node_modules/undici/lib/web/cache/cachestorage.js +152 -0
- package/node_modules/undici/lib/web/cache/util.js +45 -0
- package/node_modules/undici/lib/web/cookies/constants.js +12 -0
- package/node_modules/undici/lib/web/cookies/index.js +199 -0
- package/node_modules/undici/lib/web/cookies/parse.js +318 -0
- package/node_modules/undici/lib/web/cookies/util.js +352 -0
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +521 -0
- package/node_modules/undici/lib/web/eventsource/eventsource.js +500 -0
- package/node_modules/undici/lib/web/eventsource/util.js +60 -0
- package/node_modules/undici/lib/web/fetch/LICENSE +21 -0
- package/node_modules/undici/lib/web/fetch/body.js +547 -0
- package/node_modules/undici/lib/web/fetch/constants.js +131 -0
- package/node_modules/undici/lib/web/fetch/data-url.js +596 -0
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +586 -0
- package/node_modules/undici/lib/web/fetch/formdata.js +278 -0
- package/node_modules/undici/lib/web/fetch/global.js +40 -0
- package/node_modules/undici/lib/web/fetch/headers.js +719 -0
- package/node_modules/undici/lib/web/fetch/index.js +2432 -0
- package/node_modules/undici/lib/web/fetch/request.js +1144 -0
- package/node_modules/undici/lib/web/fetch/response.js +639 -0
- package/node_modules/undici/lib/web/fetch/util.js +1530 -0
- package/node_modules/undici/lib/web/infra/index.js +229 -0
- package/node_modules/undici/lib/web/subresource-integrity/Readme.md +9 -0
- package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +307 -0
- package/node_modules/undici/lib/web/webidl/index.js +1004 -0
- package/node_modules/undici/lib/web/websocket/connection.js +329 -0
- package/node_modules/undici/lib/web/websocket/constants.js +126 -0
- package/node_modules/undici/lib/web/websocket/events.js +331 -0
- package/node_modules/undici/lib/web/websocket/frame.js +127 -0
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +105 -0
- package/node_modules/undici/lib/web/websocket/receiver.js +507 -0
- package/node_modules/undici/lib/web/websocket/sender.js +109 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketerror.js +104 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +496 -0
- package/node_modules/undici/lib/web/websocket/util.js +347 -0
- package/node_modules/undici/lib/web/websocket/websocket.js +780 -0
- package/node_modules/undici/package.json +152 -0
- package/node_modules/undici/scripts/strip-comments.js +10 -0
- package/node_modules/undici/types/README.md +6 -0
- package/node_modules/undici/types/agent.d.ts +30 -0
- package/node_modules/undici/types/api.d.ts +43 -0
- package/node_modules/undici/types/balanced-pool.d.ts +30 -0
- package/node_modules/undici/types/cache-interceptor.d.ts +179 -0
- package/node_modules/undici/types/cache.d.ts +36 -0
- package/node_modules/undici/types/client-stats.d.ts +15 -0
- package/node_modules/undici/types/client.d.ts +184 -0
- package/node_modules/undici/types/connector.d.ts +37 -0
- package/node_modules/undici/types/content-type.d.ts +21 -0
- package/node_modules/undici/types/cookies.d.ts +30 -0
- package/node_modules/undici/types/diagnostics-channel.d.ts +74 -0
- package/node_modules/undici/types/dispatcher.d.ts +253 -0
- package/node_modules/undici/types/dispatcher1-wrapper.d.ts +7 -0
- package/node_modules/undici/types/env-http-proxy-agent.d.ts +22 -0
- package/node_modules/undici/types/errors.d.ts +187 -0
- package/node_modules/undici/types/eventsource.d.ts +66 -0
- package/node_modules/undici/types/fetch.d.ts +235 -0
- package/node_modules/undici/types/formdata.d.ts +108 -0
- package/node_modules/undici/types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici/types/global-origin.d.ts +7 -0
- package/node_modules/undici/types/h2c-client.d.ts +73 -0
- package/node_modules/undici/types/handlers.d.ts +16 -0
- package/node_modules/undici/types/header.d.ts +165 -0
- package/node_modules/undici/types/index.d.ts +93 -0
- package/node_modules/undici/types/interceptors.d.ts +82 -0
- package/node_modules/undici/types/mock-agent.d.ts +69 -0
- package/node_modules/undici/types/mock-call-history.d.ts +111 -0
- package/node_modules/undici/types/mock-client.d.ts +27 -0
- package/node_modules/undici/types/mock-errors.d.ts +12 -0
- package/node_modules/undici/types/mock-interceptor.d.ts +98 -0
- package/node_modules/undici/types/mock-pool.d.ts +27 -0
- package/node_modules/undici/types/patch.d.ts +29 -0
- package/node_modules/undici/types/pool-stats.d.ts +19 -0
- package/node_modules/undici/types/pool.d.ts +39 -0
- package/node_modules/undici/types/proxy-agent.d.ts +36 -0
- package/node_modules/undici/types/readable.d.ts +68 -0
- package/node_modules/undici/types/retry-agent.d.ts +8 -0
- package/node_modules/undici/types/retry-handler.d.ts +125 -0
- package/node_modules/undici/types/round-robin-pool.d.ts +39 -0
- package/node_modules/undici/types/snapshot-agent.d.ts +113 -0
- package/node_modules/undici/types/socks5-proxy-agent.d.ts +27 -0
- package/node_modules/undici/types/util.d.ts +18 -0
- package/node_modules/undici/types/utility.d.ts +7 -0
- package/node_modules/undici/types/webidl.d.ts +346 -0
- package/node_modules/undici/types/websocket.d.ts +188 -0
- package/package.json +99 -4
- package/src/MaestroPaths.ts +206 -0
- package/src/artifacts/builder-handoff/assertBuilderHandoff.ts +111 -0
- package/src/artifacts/builder-handoff/readBuilderHandoff.ts +30 -0
- package/src/artifacts/builder-handoff/schema.ts +137 -0
- package/src/artifacts/builder-handoff/writeBuilderHandoff.ts +24 -0
- package/src/artifacts/escalation/assertEscalation.ts +66 -0
- package/src/artifacts/escalation/createEscalation.ts +52 -0
- package/src/artifacts/escalation/getNextEscalationId.ts +26 -0
- package/src/artifacts/escalation/readEscalation.ts +50 -0
- package/src/artifacts/escalation/readEscalationHistory.ts +47 -0
- package/src/artifacts/escalation/resolveEscalation.ts +53 -0
- package/src/artifacts/escalation/schema.ts +74 -0
- package/src/artifacts/verifier-handoff/assertVerifierHandoff.ts +109 -0
- package/src/artifacts/verifier-handoff/readVerifierHandoff.ts +30 -0
- package/src/artifacts/verifier-handoff/rejectVerifierFinding.ts +54 -0
- package/src/artifacts/verifier-handoff/schema.ts +71 -0
- package/src/artifacts/verifier-handoff/writeVerifierHandoff.ts +31 -0
- package/src/config/assertConfiguration.ts +101 -0
- package/src/config/defaults.ts +45 -0
- package/src/config/loadConfiguration.ts +198 -0
- package/src/config/schema.ts +92 -0
- package/src/git/command.ts +172 -0
- package/src/git/commits/createCommit.ts +76 -0
- package/src/git/commits/createWorkflowCheckpointCommit.ts +24 -0
- package/src/git/commits/findCommitByMessage.ts +39 -0
- package/src/git/commits/getStagedPaths.ts +23 -0
- package/src/git/history/getParentCommit.ts +25 -0
- package/src/git/repository/assertRepositoryTrusted.ts +16 -0
- package/src/git/repository/findRepositoryRoot.ts +19 -0
- package/src/git/repository/getCurrentBranch.ts +18 -0
- package/src/git/repository/getHeadCommit.ts +18 -0
- package/src/git/repository/getRepositoryStatus.ts +74 -0
- package/src/git/utils/hasGitExitCode.ts +19 -0
- package/src/ids/createSpecId.ts +45 -0
- package/src/ids/isValidSpecId.ts +41 -0
- package/src/maestro/checks/assertEnvironment.ts +99 -0
- package/src/maestro/instructions/getMaestroInstructions.ts +28 -0
- package/src/maestro/session/MaestroSessionState.ts +54 -0
- package/src/maestro/status/formatMaestroStatus.ts +44 -0
- package/src/maestro/status/refreshMaestroStatus.ts +50 -0
- package/src/specs/create.ts +109 -0
- package/src/specs/template.ts +26 -0
- package/src/tools/child/open-escalation.ts +72 -0
- package/src/tools/child/record-builder-handoff.ts +85 -0
- package/src/tools/child/record-verifier-handoff.ts +139 -0
- package/src/tools/child/utils/isProtectedSpecPath.ts +61 -0
- package/src/tools/child/utils/resolveWorkflowContext.ts +25 -0
- package/src/tools/main/create-spec.ts +54 -0
- package/src/tools/main/launch-builder.ts +266 -0
- package/src/tools/main/launch-verifier.ts +270 -0
- package/src/tools/main/mark-spec-ready.ts +53 -0
- package/src/tools/main/resolve-escalation.ts +67 -0
- package/src/tools/main/resolve-findings.ts +123 -0
- package/src/tools/utils/pi-subagent-delegation.ts +127 -0
- package/src/tools/utils/resolveToolLaunchContext.ts +28 -0
- package/src/utils/getFileSha256.ts +13 -0
- package/src/utils/is-errno-exception.ts +9 -0
- package/src/utils/path-exists.ts +21 -0
- package/src/utils/path-strictly-within.ts +19 -0
- package/src/utils/path-within-or-equal.ts +25 -0
- package/src/utils/read-json.ts +26 -0
- package/src/utils/write-atomically.ts +41 -0
- package/src/utils/write-json-atomically.ts +28 -0
- package/src/workflow/builder/assertBuilderProtocolUnchanged.ts +31 -0
- package/src/workflow/builder/completeBuilderPass.ts +137 -0
- package/src/workflow/builder/prepareBuilderLauncher.ts +114 -0
- package/src/workflow/escalation/openBuilderEscalation.ts +93 -0
- package/src/workflow/escalation/resolveBuilderEscalation.ts +123 -0
- package/src/workflow/findings/resolveFindings.ts +267 -0
- package/src/workflow/roles.ts +11 -0
- package/src/workflow/spec/markSpecReady.ts +61 -0
- package/src/workflow/state/readWorkflowState.ts +19 -0
- package/src/workflow/state/schema.ts +91 -0
- package/src/workflow/state/writeWorkflowState.ts +82 -0
- package/src/workflow/transitions.ts +103 -0
- package/src/workflow/utils/getAgentRole.ts +33 -0
- package/src/workflow/verifier/completeVerifierPass.ts +128 -0
- package/src/workflow/verifier/hasProductChanges.ts +68 -0
- package/src/workflow/verifier/prepareVerifierLaunch.ts +108 -0
- package/templates/spec.md +103 -0
|
@@ -0,0 +1,1517 @@
|
|
|
1
|
+
import * as fs from "node:fs";
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
import { defaultInheritProjectContext, defaultInheritSkills, defaultSystemPromptMode, discoverAgentsAll, buildRuntimeName, findBlockingAgentDiagnostic, frontmatterNameForConfig, parsePackageName, mergeBuiltinAgentOverride, removeBuiltinAgentOverride, removeBuiltinAgentOverrideFields, resolveAgentName, } from "./agents.js";
|
|
4
|
+
import { serializeAgent } from "./agent-serializer.js";
|
|
5
|
+
import { mergeAgentsForScope } from "./agent-selection.js";
|
|
6
|
+
import { discoverAvailableSkills, resolveSkills } from "./skills.js";
|
|
7
|
+
import { buildProactiveSkillSubagentRecommendationLines, } from "./proactive-skills.js";
|
|
8
|
+
import { parseFrontmatter, parseFrontmatterList } from "./frontmatter.js";
|
|
9
|
+
import { resolveEffectiveThinking, toModelInfo } from "../shared/model-info.js";
|
|
10
|
+
import { resolveSubagentModelOverride } from "../runs/shared/model-resolution.js";
|
|
11
|
+
import { validateToolBudgetConfig } from "../runs/shared/tool-budget.js";
|
|
12
|
+
import { formatReviewGateLabel, validateAcceptanceInput } from "../runs/shared/acceptance.js";
|
|
13
|
+
import { CODE_OWNED_EXTERNAL_CLI_ADAPTER_LABEL, isCodeOwnedExternalCliAdapterId, resolveExternalCliRunnerStatus, validateCodeOwnedProfileRunner } from "../runs/shared/external-cli-contract.js";
|
|
14
|
+
import { resolveExternalCliBinaryAvailability } from "../runs/shared/external-cli-preflight.js";
|
|
15
|
+
import { getProjectConfigDir } from "../shared/utils.js";
|
|
16
|
+
import { previewDisplayText } from "../shared/display-text.js";
|
|
17
|
+
import { capabilityCeilingAgentRestrictionSources, isAgentAllowedByCapabilityCeiling, resolveCurrentSubagentCapabilityCeiling } from "../runs/shared/capability-ceiling.js";
|
|
18
|
+
import { mergeRuntimeAgents } from "./runtime-agent-registry.js";
|
|
19
|
+
import { listExternalJobProviders } from "../api/external-job-provider.js";
|
|
20
|
+
function discoverCatalog(ctx, cwd = ctx.cwd, provider) {
|
|
21
|
+
return (ctx.discoverAgentsAll ?? discoverAgentsAll)(cwd, provider);
|
|
22
|
+
}
|
|
23
|
+
function result(text, isError = false, details) {
|
|
24
|
+
return { content: [{ type: "text", text }], isError, details: { mode: "management", results: [], ...details } };
|
|
25
|
+
}
|
|
26
|
+
function jsonDetails(value) {
|
|
27
|
+
return JSON.parse(JSON.stringify(value));
|
|
28
|
+
}
|
|
29
|
+
function presentDetails(value) {
|
|
30
|
+
const cleaned = jsonDetails(value);
|
|
31
|
+
return Object.keys(cleaned).length > 0 ? cleaned : undefined;
|
|
32
|
+
}
|
|
33
|
+
function parseCsv(value) {
|
|
34
|
+
return [...new Set(value.split(",").map((v) => v.trim()).filter(Boolean))];
|
|
35
|
+
}
|
|
36
|
+
function configObject(config) {
|
|
37
|
+
let val = config;
|
|
38
|
+
if (typeof val === "string") {
|
|
39
|
+
try {
|
|
40
|
+
val = JSON.parse(val);
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
44
|
+
return { status: "error", message: `config must be valid JSON: ${message}` };
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (!val || typeof val !== "object" || Array.isArray(val))
|
|
48
|
+
return { status: "missing" };
|
|
49
|
+
return { status: "ok", value: val };
|
|
50
|
+
}
|
|
51
|
+
function hasKey(obj, key) {
|
|
52
|
+
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
53
|
+
}
|
|
54
|
+
function isJsonSerializable(value) {
|
|
55
|
+
if (value === null || typeof value === "string" || typeof value === "boolean")
|
|
56
|
+
return true;
|
|
57
|
+
if (typeof value === "number")
|
|
58
|
+
return Number.isFinite(value);
|
|
59
|
+
if (Array.isArray(value))
|
|
60
|
+
return value.every(isJsonSerializable);
|
|
61
|
+
if (value && typeof value === "object")
|
|
62
|
+
return Object.values(value).every(isJsonSerializable);
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
function asDisambiguationScope(scope) {
|
|
66
|
+
if (scope === "user" || scope === "project")
|
|
67
|
+
return scope;
|
|
68
|
+
return undefined;
|
|
69
|
+
}
|
|
70
|
+
function actionScope(scope, action) {
|
|
71
|
+
if (scope === undefined)
|
|
72
|
+
return { scope: "user" };
|
|
73
|
+
const parsed = asDisambiguationScope(scope);
|
|
74
|
+
return parsed ? { scope: parsed } : { error: result(`agentScope must be 'user' or 'project' for ${action}.`, true) };
|
|
75
|
+
}
|
|
76
|
+
function normalizeListScope(scope) {
|
|
77
|
+
if (scope === undefined)
|
|
78
|
+
return "both";
|
|
79
|
+
if (scope === "user" || scope === "project" || scope === "both")
|
|
80
|
+
return scope;
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
function sanitizeName(name) {
|
|
84
|
+
return name.toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
|
|
85
|
+
}
|
|
86
|
+
function parsePackageConfig(value) {
|
|
87
|
+
return parsePackageName(value, "config.package");
|
|
88
|
+
}
|
|
89
|
+
function allAgents(d) {
|
|
90
|
+
return [...d.builtin, ...d.package, ...d.user, ...d.project];
|
|
91
|
+
}
|
|
92
|
+
function effectiveAgentsForScope(scope, d, runtimeAgentOwner, preferredModelProvider) {
|
|
93
|
+
let agents = mergeAgentsForScope(scope, d.user, d.project, d.builtin, d.package);
|
|
94
|
+
if (runtimeAgentOwner) {
|
|
95
|
+
agents = mergeRuntimeAgents(runtimeAgentOwner, { agents }, allAgents(d), { cwd: d.cwd, scope, preferredModelProvider }).agents;
|
|
96
|
+
}
|
|
97
|
+
return agents;
|
|
98
|
+
}
|
|
99
|
+
function availableAgentNamesFromDiscovery(d, runtimeAgentOwner, preferredModelProvider) {
|
|
100
|
+
const agents = runtimeAgentOwner ? effectiveAgentsForScope("both", d, runtimeAgentOwner, preferredModelProvider) : allAgents(d);
|
|
101
|
+
return [...new Set(agents.map((agent) => agent.name))].sort((a, b) => a.localeCompare(b));
|
|
102
|
+
}
|
|
103
|
+
function availableAgentNames(ctx, cwd = ctx.cwd) {
|
|
104
|
+
return availableAgentNamesFromDiscovery(discoverCatalog(ctx, cwd));
|
|
105
|
+
}
|
|
106
|
+
function findAgentsInDiscovery(name, d, scope = "both", runtimeAgentOwner, preferredModelProvider) {
|
|
107
|
+
const raw = name.trim();
|
|
108
|
+
const sanitized = sanitizeName(raw);
|
|
109
|
+
const scoped = effectiveAgentsForScope(scope, d, runtimeAgentOwner, preferredModelProvider);
|
|
110
|
+
let resolved = resolveAgentName(raw, scoped);
|
|
111
|
+
if (!resolved.agent && !resolved.error && sanitized !== raw)
|
|
112
|
+
resolved = resolveAgentName(sanitized, scoped);
|
|
113
|
+
if (resolved.agent)
|
|
114
|
+
return scoped.filter((agent) => agent.name === resolved.agent.name).sort((a, b) => a.source.localeCompare(b.source));
|
|
115
|
+
return scoped
|
|
116
|
+
.filter((agent) => Boolean(resolveAgentName(raw, [agent]).agent)
|
|
117
|
+
|| (sanitized !== raw && Boolean(resolveAgentName(sanitized, [agent]).agent)))
|
|
118
|
+
.sort((a, b) => a.source.localeCompare(b.source));
|
|
119
|
+
}
|
|
120
|
+
function findAgents(name, ctx, scope = "both") {
|
|
121
|
+
return findAgentsInDiscovery(name, discoverCatalog(ctx), scope);
|
|
122
|
+
}
|
|
123
|
+
function diagnosticsForScope(diagnostics, scope) {
|
|
124
|
+
if (scope === "both")
|
|
125
|
+
return diagnostics;
|
|
126
|
+
const excludedSource = scope === "user" ? "project" : "user";
|
|
127
|
+
return diagnostics?.filter((diagnostic) => diagnostic.source !== excludedSource);
|
|
128
|
+
}
|
|
129
|
+
const AGENT_SOURCE_PRECEDENCE = { builtin: 0, package: 1, user: 2, project: 3, runtime: 4 };
|
|
130
|
+
// Returns the highest-precedence definition for a resolved canonical name (project > user > package > builtin),
|
|
131
|
+
// matching mergeAgentsForScope for "both", including disabled agents so disable/enable can locate hidden targets.
|
|
132
|
+
function resolveEffectiveAgent(d, name) {
|
|
133
|
+
const raw = name.trim();
|
|
134
|
+
const candidates = allAgents(d);
|
|
135
|
+
let resolved = resolveAgentName(raw, candidates);
|
|
136
|
+
if (!resolved.agent && !resolved.error) {
|
|
137
|
+
const sanitized = sanitizeName(raw);
|
|
138
|
+
if (sanitized !== raw)
|
|
139
|
+
resolved = resolveAgentName(sanitized, candidates);
|
|
140
|
+
}
|
|
141
|
+
if (resolved.error)
|
|
142
|
+
return { error: resolved.error };
|
|
143
|
+
if (!resolved.agent)
|
|
144
|
+
return {};
|
|
145
|
+
const matches = candidates.filter((agent) => agent.name === resolved.agent.name);
|
|
146
|
+
return { agent: matches.reduce((best, agent) => (AGENT_SOURCE_PRECEDENCE[agent.source] > AGENT_SOURCE_PRECEDENCE[best.source] ? agent : best)) };
|
|
147
|
+
}
|
|
148
|
+
function nameExistsInScope(ctx, scope, name, excludePath) {
|
|
149
|
+
const d = discoverCatalog(ctx);
|
|
150
|
+
for (const a of scope === "user" ? d.user : d.project) {
|
|
151
|
+
if (a.name === name && a.filePath !== excludePath)
|
|
152
|
+
return true;
|
|
153
|
+
}
|
|
154
|
+
return false;
|
|
155
|
+
}
|
|
156
|
+
function isMutableSource(source) {
|
|
157
|
+
return source === "user" || source === "project";
|
|
158
|
+
}
|
|
159
|
+
function modelWarning(ctx, model) {
|
|
160
|
+
if (!model)
|
|
161
|
+
return undefined;
|
|
162
|
+
const found = ctx.modelRegistry.getAvailable().some((m) => `${m.provider}/${m.id}` === model || m.id === model);
|
|
163
|
+
if (found)
|
|
164
|
+
return undefined;
|
|
165
|
+
return `Warning: model '${model}' is not in the current model registry. Run subagent({ action: "models" }) to list valid provider/id selectors, then use the exact provider/id form (bare ids resolve only when unique).`;
|
|
166
|
+
}
|
|
167
|
+
function skillsWarning(cwd, agent) {
|
|
168
|
+
if (!agent.skills?.length)
|
|
169
|
+
return undefined;
|
|
170
|
+
const { missing } = resolveSkills(agent.skills, cwd, agent.skillPath, agent.filePath ? path.dirname(agent.filePath) : cwd);
|
|
171
|
+
return missing.length ? `Warning: skills not found: ${missing.join(", ")}.` : undefined;
|
|
172
|
+
}
|
|
173
|
+
function withDeclaredExtensionPaths(config, filePath) {
|
|
174
|
+
const { frontmatter } = parseFrontmatter(fs.readFileSync(filePath, "utf-8"));
|
|
175
|
+
const { extensions: _extensions, subagentOnlyExtensions: _subagentOnlyExtensions, ...withoutResolvedExtensions } = config;
|
|
176
|
+
return {
|
|
177
|
+
...withoutResolvedExtensions,
|
|
178
|
+
...(frontmatter.extensions !== undefined ? { extensions: parseFrontmatterList(frontmatter.extensions) } : {}),
|
|
179
|
+
...(frontmatter.subagentOnlyExtensions !== undefined
|
|
180
|
+
? { subagentOnlyExtensions: parseFrontmatterList(frontmatter.subagentOnlyExtensions) }
|
|
181
|
+
: {}),
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
export function editableAgentConfig(agent) {
|
|
185
|
+
const { extensions: _extensions, ...withoutExtensions } = agent;
|
|
186
|
+
const base = agent.override?.base;
|
|
187
|
+
const description = base?.description ?? agent.description;
|
|
188
|
+
const frontmatterFields = agent.source === "builtin" || agent.source === "runtime" ? undefined : readAgentFrontmatterFields(agent.filePath);
|
|
189
|
+
const hasDeclaredField = (...fields) => frontmatterFields === undefined || fields.some((field) => frontmatterFields.has(field));
|
|
190
|
+
const withoutSettingsDefaults = (config) => {
|
|
191
|
+
if (!frontmatterFields)
|
|
192
|
+
return config;
|
|
193
|
+
const next = { ...config };
|
|
194
|
+
if (!hasDeclaredField("model"))
|
|
195
|
+
delete next.model;
|
|
196
|
+
if (!hasDeclaredField("thinking"))
|
|
197
|
+
delete next.thinking;
|
|
198
|
+
return next;
|
|
199
|
+
};
|
|
200
|
+
const { override: _override, description: _description, output: _output, outputMode: _outputMode, defaultReads: _defaultReads, model: _model, fast: _fast, thinking: _thinking, systemPromptMode: _systemPromptMode, inheritProjectContext: _inheritProjectContext, inheritGlobalContext: _inheritGlobalContext, inheritSkills: _inheritSkills, defaultContext: _defaultContext, acceptanceRole: _acceptanceRole, disabled: _disabled, systemPrompt: _systemPrompt, skills: _skills, skillPath: _skillPath, tools: _tools, excludeTools: _excludeTools, mcpDirectTools: _mcpDirectTools, allowNestedSubagents: _allowNestedSubagents, allowedAgents: _allowedAgents, subagentOnlyExtensions: _subagentOnlyExtensions, mutationTools: _mutationTools, toolBudget: _toolBudget, ...editable } = withoutExtensions;
|
|
201
|
+
if (!base) {
|
|
202
|
+
return withDeclaredExtensionPaths(withoutSettingsDefaults({
|
|
203
|
+
...withoutExtensions,
|
|
204
|
+
...(agent.extensionsFromDefault ? {} : agent.extensions !== undefined ? { extensions: [...agent.extensions] } : {}),
|
|
205
|
+
}), agent.filePath);
|
|
206
|
+
}
|
|
207
|
+
return withDeclaredExtensionPaths({
|
|
208
|
+
...editable,
|
|
209
|
+
description,
|
|
210
|
+
...(base.output !== undefined ? { output: base.output } : {}),
|
|
211
|
+
...(base.outputMode !== undefined ? { outputMode: base.outputMode } : {}),
|
|
212
|
+
...(base.defaultReads !== undefined ? { defaultReads: [...base.defaultReads] } : {}),
|
|
213
|
+
...(base.model !== undefined && hasDeclaredField("model") ? { model: base.model } : {}),
|
|
214
|
+
...(base.fast !== undefined ? { fast: base.fast } : {}),
|
|
215
|
+
...(base.thinking !== undefined && hasDeclaredField("thinking") ? { thinking: base.thinking } : {}),
|
|
216
|
+
systemPromptMode: base.systemPromptMode,
|
|
217
|
+
inheritProjectContext: base.inheritProjectContext,
|
|
218
|
+
inheritGlobalContext: base.inheritGlobalContext,
|
|
219
|
+
inheritSkills: base.inheritSkills,
|
|
220
|
+
...(base.defaultContext !== undefined ? { defaultContext: base.defaultContext } : {}),
|
|
221
|
+
...(base.acceptanceRole !== undefined ? { acceptanceRole: base.acceptanceRole } : {}),
|
|
222
|
+
...(base.disabled !== undefined ? { disabled: base.disabled } : {}),
|
|
223
|
+
systemPrompt: base.systemPrompt,
|
|
224
|
+
...(base.skills !== undefined ? { skills: [...base.skills] } : {}),
|
|
225
|
+
...(base.skillPath !== undefined ? { skillPath: [...base.skillPath] } : {}),
|
|
226
|
+
...(base.tools !== undefined ? { tools: [...base.tools] } : {}),
|
|
227
|
+
...(base.excludeTools !== undefined ? { excludeTools: [...base.excludeTools] } : {}),
|
|
228
|
+
...(base.mcpDirectTools !== undefined ? { mcpDirectTools: [...base.mcpDirectTools] } : {}),
|
|
229
|
+
...(base.allowNestedSubagents !== undefined ? { allowNestedSubagents: base.allowNestedSubagents } : {}),
|
|
230
|
+
...(base.allowedAgents !== undefined ? { allowedAgents: [...base.allowedAgents] } : {}),
|
|
231
|
+
...(base.extensions !== undefined ? { extensions: [...base.extensions] } : {}),
|
|
232
|
+
...(base.subagentOnlyExtensions !== undefined ? { subagentOnlyExtensions: [...base.subagentOnlyExtensions] } : {}),
|
|
233
|
+
...(base.mutationTools !== undefined ? { mutationTools: [...base.mutationTools] } : {}),
|
|
234
|
+
...(base.toolBudget !== undefined ? { toolBudget: base.toolBudget } : {}),
|
|
235
|
+
}, agent.filePath);
|
|
236
|
+
}
|
|
237
|
+
function readAgentFrontmatterFields(filePath) {
|
|
238
|
+
try {
|
|
239
|
+
const { frontmatter } = parseFrontmatter(fs.readFileSync(filePath, "utf-8"));
|
|
240
|
+
return new Set(Object.keys(frontmatter));
|
|
241
|
+
}
|
|
242
|
+
catch {
|
|
243
|
+
return new Set();
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
export function preservedAgentFrontmatterFields(agent, cfg) {
|
|
247
|
+
const fields = readAgentFrontmatterFields(agent.filePath);
|
|
248
|
+
const changed = (...names) => {
|
|
249
|
+
for (const name of names)
|
|
250
|
+
fields.delete(name);
|
|
251
|
+
};
|
|
252
|
+
if (hasKey(cfg, "name"))
|
|
253
|
+
changed("name");
|
|
254
|
+
if (hasKey(cfg, "package"))
|
|
255
|
+
changed("package");
|
|
256
|
+
if (hasKey(cfg, "description"))
|
|
257
|
+
changed("description");
|
|
258
|
+
if (hasKey(cfg, "advertise"))
|
|
259
|
+
changed("advertise");
|
|
260
|
+
if (hasKey(cfg, "aliases"))
|
|
261
|
+
changed("alias", "aliases");
|
|
262
|
+
if (hasKey(cfg, "systemPrompt"))
|
|
263
|
+
changed("systemPrompt");
|
|
264
|
+
if (hasKey(cfg, "runner"))
|
|
265
|
+
changed("runner");
|
|
266
|
+
if (hasKey(cfg, "model"))
|
|
267
|
+
changed("model");
|
|
268
|
+
if (hasKey(cfg, "tools"))
|
|
269
|
+
changed("tools");
|
|
270
|
+
if (hasKey(cfg, "excludeTools"))
|
|
271
|
+
changed("excludeTools");
|
|
272
|
+
if (hasKey(cfg, "skills"))
|
|
273
|
+
changed("skill", "skills");
|
|
274
|
+
if (hasKey(cfg, "skillPath"))
|
|
275
|
+
changed("skillPath");
|
|
276
|
+
if (hasKey(cfg, "extensions"))
|
|
277
|
+
changed("extensions");
|
|
278
|
+
if (hasKey(cfg, "subagentOnlyExtensions"))
|
|
279
|
+
changed("subagentOnlyExtensions");
|
|
280
|
+
if (hasKey(cfg, "mutationTools"))
|
|
281
|
+
changed("mutationTools");
|
|
282
|
+
if (hasKey(cfg, "thinking")) {
|
|
283
|
+
changed("thinking");
|
|
284
|
+
if (cfg.thinking === "off")
|
|
285
|
+
fields.add("thinking");
|
|
286
|
+
}
|
|
287
|
+
if (hasKey(cfg, "systemPromptMode")) {
|
|
288
|
+
changed("systemPromptMode");
|
|
289
|
+
fields.add("systemPromptMode");
|
|
290
|
+
}
|
|
291
|
+
if (hasKey(cfg, "inheritProjectContext")) {
|
|
292
|
+
changed("inheritProjectContext");
|
|
293
|
+
fields.add("inheritProjectContext");
|
|
294
|
+
}
|
|
295
|
+
if (hasKey(cfg, "inheritGlobalContext")) {
|
|
296
|
+
changed("inheritGlobalContext");
|
|
297
|
+
fields.add("inheritGlobalContext");
|
|
298
|
+
}
|
|
299
|
+
if (hasKey(cfg, "inheritSkills")) {
|
|
300
|
+
changed("inheritSkills");
|
|
301
|
+
fields.add("inheritSkills");
|
|
302
|
+
}
|
|
303
|
+
if (hasKey(cfg, "defaultContext"))
|
|
304
|
+
changed("defaultContext");
|
|
305
|
+
if (hasKey(cfg, "async"))
|
|
306
|
+
changed("async");
|
|
307
|
+
if (hasKey(cfg, "timeoutMs"))
|
|
308
|
+
changed("timeoutMs");
|
|
309
|
+
if (hasKey(cfg, "acceptance"))
|
|
310
|
+
changed("acceptance");
|
|
311
|
+
if (hasKey(cfg, "acceptanceRole"))
|
|
312
|
+
changed("acceptanceRole");
|
|
313
|
+
if (hasKey(cfg, "output"))
|
|
314
|
+
changed("output");
|
|
315
|
+
if (hasKey(cfg, "outputMode"))
|
|
316
|
+
changed("outputMode");
|
|
317
|
+
if (hasKey(cfg, "reads"))
|
|
318
|
+
changed("defaultReads");
|
|
319
|
+
if (hasKey(cfg, "progress"))
|
|
320
|
+
changed("defaultProgress");
|
|
321
|
+
if (hasKey(cfg, "maxSubagentDepth"))
|
|
322
|
+
changed("maxSubagentDepth");
|
|
323
|
+
if (hasKey(cfg, "toolBudget"))
|
|
324
|
+
changed("toolBudget");
|
|
325
|
+
return fields;
|
|
326
|
+
}
|
|
327
|
+
function parseTools(raw) {
|
|
328
|
+
const tools = [];
|
|
329
|
+
const mcpDirectTools = [];
|
|
330
|
+
for (const item of parseCsv(raw)) {
|
|
331
|
+
if (item.startsWith("mcp:")) {
|
|
332
|
+
const direct = item.slice(4).trim();
|
|
333
|
+
if (direct)
|
|
334
|
+
mcpDirectTools.push(direct);
|
|
335
|
+
}
|
|
336
|
+
else
|
|
337
|
+
tools.push(item);
|
|
338
|
+
}
|
|
339
|
+
return {
|
|
340
|
+
...(tools.length ? { tools } : {}),
|
|
341
|
+
...(mcpDirectTools.length ? { mcpDirectTools } : {}),
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
function applyAgentConfig(target, cfg) {
|
|
345
|
+
if (hasKey(cfg, "advertise")) {
|
|
346
|
+
if (cfg.advertise === "")
|
|
347
|
+
delete target.advertise;
|
|
348
|
+
else if (typeof cfg.advertise === "boolean")
|
|
349
|
+
target.advertise = cfg.advertise;
|
|
350
|
+
else
|
|
351
|
+
return "config.advertise must be a boolean or empty string when provided.";
|
|
352
|
+
}
|
|
353
|
+
if (hasKey(cfg, "aliases")) {
|
|
354
|
+
if (cfg.aliases === false || cfg.aliases === "")
|
|
355
|
+
delete target.aliases;
|
|
356
|
+
else if (typeof cfg.aliases === "string") {
|
|
357
|
+
const aliases = parseCsv(cfg.aliases).filter((alias) => alias !== target.name);
|
|
358
|
+
if (aliases.length)
|
|
359
|
+
target.aliases = aliases;
|
|
360
|
+
else
|
|
361
|
+
delete target.aliases;
|
|
362
|
+
}
|
|
363
|
+
else if (Array.isArray(cfg.aliases) && cfg.aliases.every((entry) => typeof entry === "string")) {
|
|
364
|
+
const aliases = [...new Set(cfg.aliases.map((entry) => entry.trim()).filter(Boolean).filter((alias) => alias !== target.name))];
|
|
365
|
+
if (aliases.length)
|
|
366
|
+
target.aliases = aliases;
|
|
367
|
+
else
|
|
368
|
+
delete target.aliases;
|
|
369
|
+
}
|
|
370
|
+
else
|
|
371
|
+
return "config.aliases must be a comma-separated string, string array, or false when provided.";
|
|
372
|
+
}
|
|
373
|
+
if (hasKey(cfg, "systemPrompt")) {
|
|
374
|
+
if (cfg.systemPrompt === false || cfg.systemPrompt === "")
|
|
375
|
+
target.systemPrompt = "";
|
|
376
|
+
else if (typeof cfg.systemPrompt === "string")
|
|
377
|
+
target.systemPrompt = cfg.systemPrompt;
|
|
378
|
+
else
|
|
379
|
+
return "config.systemPrompt must be a string or false when provided.";
|
|
380
|
+
}
|
|
381
|
+
if (hasKey(cfg, "runner")) {
|
|
382
|
+
if (cfg.runner === false || cfg.runner === "")
|
|
383
|
+
delete target.runner;
|
|
384
|
+
else if (cfg.runner && typeof cfg.runner === "object" && !Array.isArray(cfg.runner)) {
|
|
385
|
+
const runner = cfg.runner;
|
|
386
|
+
if (runner.type === "pi" && Object.keys(runner).every((key) => key === "type"))
|
|
387
|
+
target.runner = { type: "pi" };
|
|
388
|
+
else if (runner.type === "external-cli" && typeof runner.command === "string" && runner.command.trim()
|
|
389
|
+
&& (runner.args === undefined || (Array.isArray(runner.args) && runner.args.every((arg) => typeof arg === "string")))
|
|
390
|
+
&& (runner.adapter === undefined || isCodeOwnedExternalCliAdapterId(runner.adapter))
|
|
391
|
+
&& (runner.adapter === undefined || runner.args === undefined || runner.args.length === 0)
|
|
392
|
+
&& (runner.promptDelivery === undefined || runner.promptDelivery === "stdin")
|
|
393
|
+
&& Object.keys(runner).every((key) => ["type", "adapter", "command", "args", "promptDelivery"].includes(key))) {
|
|
394
|
+
const runnerArgs = Array.isArray(runner.args) ? runner.args.filter((arg) => typeof arg === "string") : undefined;
|
|
395
|
+
target.runner = { type: "external-cli", ...(isCodeOwnedExternalCliAdapterId(runner.adapter) ? { adapter: runner.adapter } : {}), command: runner.command.trim(), ...(runnerArgs?.length ? { args: runnerArgs } : {}), ...(runner.promptDelivery ? { promptDelivery: "stdin" } : {}) };
|
|
396
|
+
}
|
|
397
|
+
else if (runner.type === "external-job" && typeof runner.provider === "string" && runner.provider.trim() === runner.provider && runner.provider
|
|
398
|
+
&& (runner.options === undefined || (runner.options && typeof runner.options === "object" && !Array.isArray(runner.options) && isJsonSerializable(runner.options)))
|
|
399
|
+
&& Object.keys(runner).every((key) => ["type", "provider", "options"].includes(key))) {
|
|
400
|
+
target.runner = { type: "external-job", provider: runner.provider, ...(runner.options ? { options: runner.options } : {}) };
|
|
401
|
+
}
|
|
402
|
+
else
|
|
403
|
+
return `config.runner must be { type: 'pi' }, { type: 'external-cli', adapter?: ${CODE_OWNED_EXTERNAL_CLI_ADAPTER_LABEL}, command: string, args?: string[], promptDelivery?: 'stdin' }, or { type: 'external-job', provider: string, options?: object }.`;
|
|
404
|
+
}
|
|
405
|
+
else
|
|
406
|
+
return "config.runner must be an object, false, or empty string when provided.";
|
|
407
|
+
}
|
|
408
|
+
if (hasKey(cfg, "model")) {
|
|
409
|
+
if (cfg.model === false || cfg.model === "")
|
|
410
|
+
delete target.model;
|
|
411
|
+
else if (typeof cfg.model === "string") {
|
|
412
|
+
const model = cfg.model.trim();
|
|
413
|
+
if (model)
|
|
414
|
+
target.model = model;
|
|
415
|
+
else
|
|
416
|
+
delete target.model;
|
|
417
|
+
}
|
|
418
|
+
else
|
|
419
|
+
return "config.model must be a string or false when provided.";
|
|
420
|
+
}
|
|
421
|
+
if (hasKey(cfg, "fallbackModels"))
|
|
422
|
+
return "config.fallbackModels was removed; configure one model instead.";
|
|
423
|
+
if (hasKey(cfg, "tools")) {
|
|
424
|
+
if (cfg.tools === false || cfg.tools === "") {
|
|
425
|
+
delete target.tools;
|
|
426
|
+
delete target.mcpDirectTools;
|
|
427
|
+
}
|
|
428
|
+
else if (typeof cfg.tools === "string") {
|
|
429
|
+
const parsed = parseTools(cfg.tools);
|
|
430
|
+
if (parsed.tools)
|
|
431
|
+
target.tools = parsed.tools;
|
|
432
|
+
else
|
|
433
|
+
delete target.tools;
|
|
434
|
+
if (parsed.mcpDirectTools)
|
|
435
|
+
target.mcpDirectTools = parsed.mcpDirectTools;
|
|
436
|
+
else
|
|
437
|
+
delete target.mcpDirectTools;
|
|
438
|
+
}
|
|
439
|
+
else
|
|
440
|
+
return "config.tools must be a comma-separated string or false when provided.";
|
|
441
|
+
}
|
|
442
|
+
if (hasKey(cfg, "excludeTools")) {
|
|
443
|
+
if (cfg.excludeTools === false || cfg.excludeTools === "")
|
|
444
|
+
delete target.excludeTools;
|
|
445
|
+
else if (typeof cfg.excludeTools === "string") {
|
|
446
|
+
const excludeTools = parseCsv(cfg.excludeTools);
|
|
447
|
+
if (excludeTools.length)
|
|
448
|
+
target.excludeTools = [...new Set(excludeTools)];
|
|
449
|
+
else
|
|
450
|
+
delete target.excludeTools;
|
|
451
|
+
}
|
|
452
|
+
else if (Array.isArray(cfg.excludeTools) && cfg.excludeTools.every((entry) => typeof entry === "string")) {
|
|
453
|
+
const excludeTools = [...new Set(cfg.excludeTools.map((entry) => entry.trim()).filter(Boolean))];
|
|
454
|
+
if (excludeTools.length)
|
|
455
|
+
target.excludeTools = excludeTools;
|
|
456
|
+
else
|
|
457
|
+
delete target.excludeTools;
|
|
458
|
+
}
|
|
459
|
+
else
|
|
460
|
+
return "config.excludeTools must be a comma-separated string, string array, or false when provided.";
|
|
461
|
+
}
|
|
462
|
+
if (hasKey(cfg, "skills")) {
|
|
463
|
+
if (cfg.skills === false || cfg.skills === "")
|
|
464
|
+
delete target.skills;
|
|
465
|
+
else if (typeof cfg.skills === "string") {
|
|
466
|
+
const skills = parseCsv(cfg.skills);
|
|
467
|
+
if (skills.length)
|
|
468
|
+
target.skills = skills;
|
|
469
|
+
else
|
|
470
|
+
delete target.skills;
|
|
471
|
+
}
|
|
472
|
+
else
|
|
473
|
+
return "config.skills must be a comma-separated string or false when provided.";
|
|
474
|
+
}
|
|
475
|
+
if (hasKey(cfg, "skillPath")) {
|
|
476
|
+
if (cfg.skillPath === false || cfg.skillPath === "")
|
|
477
|
+
delete target.skillPath;
|
|
478
|
+
else if (typeof cfg.skillPath === "string") {
|
|
479
|
+
const skillPath = parseCsv(cfg.skillPath);
|
|
480
|
+
if (skillPath.length)
|
|
481
|
+
target.skillPath = skillPath;
|
|
482
|
+
else
|
|
483
|
+
delete target.skillPath;
|
|
484
|
+
}
|
|
485
|
+
else if (Array.isArray(cfg.skillPath) && cfg.skillPath.every((entry) => typeof entry === "string")) {
|
|
486
|
+
const skillPath = [...new Set(cfg.skillPath.map((entry) => entry.trim()).filter(Boolean))];
|
|
487
|
+
if (skillPath.length)
|
|
488
|
+
target.skillPath = skillPath;
|
|
489
|
+
else
|
|
490
|
+
delete target.skillPath;
|
|
491
|
+
}
|
|
492
|
+
else
|
|
493
|
+
return "config.skillPath must be a comma-separated string, string array, or false when provided.";
|
|
494
|
+
}
|
|
495
|
+
if (hasKey(cfg, "extensions")) {
|
|
496
|
+
if (cfg.extensions === false)
|
|
497
|
+
delete target.extensions;
|
|
498
|
+
else if (cfg.extensions === "")
|
|
499
|
+
target.extensions = [];
|
|
500
|
+
else if (typeof cfg.extensions === "string")
|
|
501
|
+
target.extensions = parseCsv(cfg.extensions);
|
|
502
|
+
else
|
|
503
|
+
return "config.extensions must be a comma-separated string, empty string, or false when provided.";
|
|
504
|
+
}
|
|
505
|
+
if (hasKey(cfg, "subagentOnlyExtensions")) {
|
|
506
|
+
if (cfg.subagentOnlyExtensions === false)
|
|
507
|
+
delete target.subagentOnlyExtensions;
|
|
508
|
+
else if (cfg.subagentOnlyExtensions === "")
|
|
509
|
+
target.subagentOnlyExtensions = [];
|
|
510
|
+
else if (typeof cfg.subagentOnlyExtensions === "string")
|
|
511
|
+
target.subagentOnlyExtensions = parseCsv(cfg.subagentOnlyExtensions);
|
|
512
|
+
else
|
|
513
|
+
return "config.subagentOnlyExtensions must be a comma-separated string, empty string, or false when provided.";
|
|
514
|
+
}
|
|
515
|
+
if (hasKey(cfg, "mutationTools")) {
|
|
516
|
+
if (cfg.mutationTools === false)
|
|
517
|
+
delete target.mutationTools;
|
|
518
|
+
else if (cfg.mutationTools === "")
|
|
519
|
+
target.mutationTools = [];
|
|
520
|
+
else if (typeof cfg.mutationTools === "string")
|
|
521
|
+
target.mutationTools = parseCsv(cfg.mutationTools);
|
|
522
|
+
else
|
|
523
|
+
return "config.mutationTools must be a comma-separated string, empty string, or false when provided.";
|
|
524
|
+
}
|
|
525
|
+
if (hasKey(cfg, "thinking")) {
|
|
526
|
+
if (cfg.thinking === false || cfg.thinking === "")
|
|
527
|
+
delete target.thinking;
|
|
528
|
+
else if (typeof cfg.thinking === "string") {
|
|
529
|
+
const thinking = cfg.thinking.trim();
|
|
530
|
+
if (thinking)
|
|
531
|
+
target.thinking = thinking;
|
|
532
|
+
else
|
|
533
|
+
delete target.thinking;
|
|
534
|
+
}
|
|
535
|
+
else
|
|
536
|
+
return "config.thinking must be a string or false when provided.";
|
|
537
|
+
}
|
|
538
|
+
if (hasKey(cfg, "systemPromptMode")) {
|
|
539
|
+
if (cfg.systemPromptMode === "append" || cfg.systemPromptMode === "replace")
|
|
540
|
+
target.systemPromptMode = cfg.systemPromptMode;
|
|
541
|
+
else
|
|
542
|
+
return "config.systemPromptMode must be 'append' or 'replace' when provided.";
|
|
543
|
+
}
|
|
544
|
+
if (hasKey(cfg, "inheritProjectContext")) {
|
|
545
|
+
if (typeof cfg.inheritProjectContext !== "boolean")
|
|
546
|
+
return "config.inheritProjectContext must be a boolean when provided.";
|
|
547
|
+
target.inheritProjectContext = cfg.inheritProjectContext;
|
|
548
|
+
}
|
|
549
|
+
if (hasKey(cfg, "inheritGlobalContext")) {
|
|
550
|
+
if (typeof cfg.inheritGlobalContext !== "boolean")
|
|
551
|
+
return "config.inheritGlobalContext must be a boolean when provided.";
|
|
552
|
+
target.inheritGlobalContext = cfg.inheritGlobalContext;
|
|
553
|
+
}
|
|
554
|
+
if (hasKey(cfg, "inheritSkills")) {
|
|
555
|
+
if (typeof cfg.inheritSkills !== "boolean")
|
|
556
|
+
return "config.inheritSkills must be a boolean when provided.";
|
|
557
|
+
target.inheritSkills = cfg.inheritSkills;
|
|
558
|
+
}
|
|
559
|
+
if (hasKey(cfg, "defaultContext")) {
|
|
560
|
+
if (cfg.defaultContext === false || cfg.defaultContext === "")
|
|
561
|
+
delete target.defaultContext;
|
|
562
|
+
else if (cfg.defaultContext === "fresh" || cfg.defaultContext === "fork")
|
|
563
|
+
target.defaultContext = cfg.defaultContext;
|
|
564
|
+
else
|
|
565
|
+
return "config.defaultContext must be 'fresh', 'fork', or false when provided.";
|
|
566
|
+
}
|
|
567
|
+
if (hasKey(cfg, "async")) {
|
|
568
|
+
if (cfg.async === "")
|
|
569
|
+
delete target.defaultAsync;
|
|
570
|
+
else if (typeof cfg.async === "boolean")
|
|
571
|
+
target.defaultAsync = cfg.async;
|
|
572
|
+
else
|
|
573
|
+
return "config.async must be a boolean or empty string when provided.";
|
|
574
|
+
}
|
|
575
|
+
if (hasKey(cfg, "timeoutMs")) {
|
|
576
|
+
if (cfg.timeoutMs === false || cfg.timeoutMs === "")
|
|
577
|
+
delete target.defaultTimeoutMs;
|
|
578
|
+
else if (typeof cfg.timeoutMs === "number" && Number.isInteger(cfg.timeoutMs) && cfg.timeoutMs > 0)
|
|
579
|
+
target.defaultTimeoutMs = cfg.timeoutMs;
|
|
580
|
+
else
|
|
581
|
+
return "config.timeoutMs must be a positive integer or false when provided.";
|
|
582
|
+
}
|
|
583
|
+
if (hasKey(cfg, "acceptance")) {
|
|
584
|
+
if (cfg.acceptance === "")
|
|
585
|
+
delete target.defaultAcceptance;
|
|
586
|
+
else {
|
|
587
|
+
const errors = validateAcceptanceInput(cfg.acceptance, "config.acceptance");
|
|
588
|
+
if (errors.length > 0)
|
|
589
|
+
return errors.join(" ");
|
|
590
|
+
target.defaultAcceptance = cfg.acceptance;
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
if (hasKey(cfg, "acceptanceRole")) {
|
|
594
|
+
if (cfg.acceptanceRole === false || cfg.acceptanceRole === "")
|
|
595
|
+
delete target.acceptanceRole;
|
|
596
|
+
else if (cfg.acceptanceRole === "read-only" || cfg.acceptanceRole === "writer")
|
|
597
|
+
target.acceptanceRole = cfg.acceptanceRole;
|
|
598
|
+
else
|
|
599
|
+
return "config.acceptanceRole must be 'read-only', 'writer', or false when provided.";
|
|
600
|
+
}
|
|
601
|
+
if (hasKey(cfg, "output")) {
|
|
602
|
+
if (cfg.output === false || cfg.output === "")
|
|
603
|
+
delete target.output;
|
|
604
|
+
else if (typeof cfg.output === "string")
|
|
605
|
+
target.output = cfg.output;
|
|
606
|
+
else
|
|
607
|
+
return "config.output must be a string or false when provided.";
|
|
608
|
+
}
|
|
609
|
+
if (hasKey(cfg, "outputMode")) {
|
|
610
|
+
if (cfg.outputMode === "inline" || cfg.outputMode === "file-only")
|
|
611
|
+
target.outputMode = cfg.outputMode;
|
|
612
|
+
else
|
|
613
|
+
return "config.outputMode must be 'inline' or 'file-only' when provided.";
|
|
614
|
+
}
|
|
615
|
+
if (hasKey(cfg, "reads")) {
|
|
616
|
+
if (cfg.reads === false || cfg.reads === "")
|
|
617
|
+
delete target.defaultReads;
|
|
618
|
+
else if (typeof cfg.reads === "string") {
|
|
619
|
+
const reads = parseCsv(cfg.reads);
|
|
620
|
+
if (reads.length)
|
|
621
|
+
target.defaultReads = reads;
|
|
622
|
+
else
|
|
623
|
+
delete target.defaultReads;
|
|
624
|
+
}
|
|
625
|
+
else
|
|
626
|
+
return "config.reads must be a comma-separated string or false when provided.";
|
|
627
|
+
}
|
|
628
|
+
if (hasKey(cfg, "progress")) {
|
|
629
|
+
if (typeof cfg.progress !== "boolean")
|
|
630
|
+
return "config.progress must be a boolean when provided.";
|
|
631
|
+
target.defaultProgress = cfg.progress;
|
|
632
|
+
}
|
|
633
|
+
if (hasKey(cfg, "maxSubagentDepth")) {
|
|
634
|
+
if (cfg.maxSubagentDepth === false || cfg.maxSubagentDepth === "")
|
|
635
|
+
delete target.maxSubagentDepth;
|
|
636
|
+
else if (typeof cfg.maxSubagentDepth === "number" && Number.isInteger(cfg.maxSubagentDepth) && cfg.maxSubagentDepth >= 0) {
|
|
637
|
+
target.maxSubagentDepth = cfg.maxSubagentDepth;
|
|
638
|
+
}
|
|
639
|
+
else
|
|
640
|
+
return "config.maxSubagentDepth must be an integer >= 0 or false when provided.";
|
|
641
|
+
}
|
|
642
|
+
if (hasKey(cfg, "toolBudget")) {
|
|
643
|
+
if (cfg.toolBudget === false || cfg.toolBudget === "")
|
|
644
|
+
delete target.toolBudget;
|
|
645
|
+
else {
|
|
646
|
+
const validation = validateToolBudgetConfig(cfg.toolBudget, "config.toolBudget");
|
|
647
|
+
if (validation.error)
|
|
648
|
+
return validation.error;
|
|
649
|
+
target.toolBudget = cfg.toolBudget;
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
if (target.runner?.type === "external-cli" || target.runner?.type === "external-job") {
|
|
653
|
+
const unsupported = [
|
|
654
|
+
target.tools?.length || target.mcpDirectTools?.length ? "tools" : undefined,
|
|
655
|
+
target.excludeTools?.length ? "excludeTools" : undefined,
|
|
656
|
+
target.model ? "model" : undefined,
|
|
657
|
+
target.thinking ? "thinking" : undefined,
|
|
658
|
+
target.extensions?.length ? "extensions" : undefined,
|
|
659
|
+
target.subagentOnlyExtensions?.length ? "subagentOnlyExtensions" : undefined,
|
|
660
|
+
target.mutationTools?.length ? "mutationTools" : undefined,
|
|
661
|
+
target.skills?.length || target.skillPath?.length ? "skills" : undefined,
|
|
662
|
+
target.maxSubagentDepth !== undefined ? "maxSubagentDepth" : undefined,
|
|
663
|
+
target.toolBudget ? "toolBudget" : undefined,
|
|
664
|
+
].filter((field) => Boolean(field));
|
|
665
|
+
if (unsupported.length > 0)
|
|
666
|
+
return `config.runner type '${target.runner.type}' does not support Pi-only fields: ${unsupported.join(", ")}.`;
|
|
667
|
+
}
|
|
668
|
+
return undefined;
|
|
669
|
+
}
|
|
670
|
+
function resolveTarget(name, matches, cwd, ctx, scopeHint) {
|
|
671
|
+
const distinctNames = [...new Set(matches.map((match) => match.name))];
|
|
672
|
+
if (distinctNames.length > 1)
|
|
673
|
+
return result(`Ambiguous agent alias or name '${name}': ${distinctNames.sort((a, b) => a.localeCompare(b)).join(", ")}`, true);
|
|
674
|
+
const mutable = matches.filter((match) => isMutableSource(match.source));
|
|
675
|
+
if (mutable.length === 0) {
|
|
676
|
+
if (matches.length > 0)
|
|
677
|
+
return result(`Agent '${name}' is read-only and cannot be modified. Create a same-named agent in user or project scope to override it.`, true);
|
|
678
|
+
return result(`Agent '${name}' not found. Available: ${availableAgentNames(ctx, cwd).join(", ") || "none"}.`, true);
|
|
679
|
+
}
|
|
680
|
+
if (mutable.length === 1)
|
|
681
|
+
return mutable[0];
|
|
682
|
+
const scope = asDisambiguationScope(scopeHint);
|
|
683
|
+
if (!scope) {
|
|
684
|
+
const paths = mutable.map((match) => `${match.source}: ${match.filePath}`).join("\n");
|
|
685
|
+
return result(`Agent '${name}' exists in both scopes. Specify agentScope: 'user' or 'project'.\n${paths}`, true);
|
|
686
|
+
}
|
|
687
|
+
const scoped = mutable.filter((match) => match.source === scope);
|
|
688
|
+
if (scoped.length === 0)
|
|
689
|
+
return result(`Agent '${name}' not found in scope '${scope}'.`, true);
|
|
690
|
+
if (scoped.length > 1)
|
|
691
|
+
return result(`Multiple agents named '${name}' found in scope '${scope}': ${scoped.map((match) => match.filePath).join(", ")}`, true);
|
|
692
|
+
return scoped[0];
|
|
693
|
+
}
|
|
694
|
+
function renamePath(currentPath, newName, scope, ctx) {
|
|
695
|
+
if (nameExistsInScope(ctx, scope, newName, currentPath))
|
|
696
|
+
return { error: `Name '${newName}' already exists in ${scope} scope.` };
|
|
697
|
+
const filePath = path.join(path.dirname(currentPath), `${newName}.md`);
|
|
698
|
+
if (fs.existsSync(filePath) && filePath !== currentPath)
|
|
699
|
+
return { error: `File already exists at ${filePath} but is not a valid agent definition. Remove or rename it first.` };
|
|
700
|
+
fs.renameSync(currentPath, filePath);
|
|
701
|
+
return { filePath };
|
|
702
|
+
}
|
|
703
|
+
function packageSourceLabel(agent) {
|
|
704
|
+
if (!agent.packageSourceName)
|
|
705
|
+
return agent.source;
|
|
706
|
+
return agent.packageSourceVersion ? `${agent.packageSourceName}@${agent.packageSourceVersion}` : agent.packageSourceName;
|
|
707
|
+
}
|
|
708
|
+
function errorMessage(error) {
|
|
709
|
+
return error instanceof Error ? error.message : String(error);
|
|
710
|
+
}
|
|
711
|
+
function registeredExternalJobProviderStatus() {
|
|
712
|
+
try {
|
|
713
|
+
return { ok: true, names: new Set(listExternalJobProviders().map((provider) => provider.name)) };
|
|
714
|
+
}
|
|
715
|
+
catch (error) {
|
|
716
|
+
return { ok: false, error: errorMessage(error) };
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
function externalJobProviderSuffix(provider, names) {
|
|
720
|
+
if (!names)
|
|
721
|
+
return "?";
|
|
722
|
+
return names.has(provider) ? "✓" : "missing";
|
|
723
|
+
}
|
|
724
|
+
/** A placed agent checks only local ssh; machine catalog and remote CLI validation happen at launch. */
|
|
725
|
+
function externalCliAvailabilityKey(command, machine) {
|
|
726
|
+
return machine ? `ssh@${machine}` : command;
|
|
727
|
+
}
|
|
728
|
+
function externalCliAvailabilityForAgents(agents) {
|
|
729
|
+
const availability = new Map();
|
|
730
|
+
for (const agent of agents) {
|
|
731
|
+
const runner = agent.runner;
|
|
732
|
+
if (runner?.type !== "external-cli")
|
|
733
|
+
continue;
|
|
734
|
+
const key = externalCliAvailabilityKey(runner.command, agent.machine);
|
|
735
|
+
if (availability.has(key))
|
|
736
|
+
continue;
|
|
737
|
+
availability.set(key, resolveExternalCliBinaryAvailability(agent.machine ? "ssh" : runner.command, process.env));
|
|
738
|
+
}
|
|
739
|
+
return availability;
|
|
740
|
+
}
|
|
741
|
+
function runnerListBadge(agent, providerNames, externalCliAvailability) {
|
|
742
|
+
if (agent.runner?.type === "external-job")
|
|
743
|
+
return `external-job:${agent.runner.provider} ${externalJobProviderSuffix(agent.runner.provider, providerNames)}`;
|
|
744
|
+
if (agent.runner?.type === "external-cli") {
|
|
745
|
+
const placed = agent.machine ? `${agent.runner.command} @ ${agent.machine}` : agent.runner.command;
|
|
746
|
+
const availability = externalCliAvailability?.get(externalCliAvailabilityKey(agent.runner.command, agent.machine));
|
|
747
|
+
if (!availability)
|
|
748
|
+
return `external-cli:${placed}`;
|
|
749
|
+
if (agent.machine)
|
|
750
|
+
return `external-cli:${placed} saved Herdr placement; transport ${availability.available ? "✓" : "missing"}; machine not preflighted`;
|
|
751
|
+
return `external-cli:${placed} ${availability.available ? "✓" : "missing"}`;
|
|
752
|
+
}
|
|
753
|
+
if (agent.machine)
|
|
754
|
+
return `machine: ${agent.machine} (saved Herdr placement)`;
|
|
755
|
+
return undefined;
|
|
756
|
+
}
|
|
757
|
+
function agentListMetadata(agent, providerNames, externalCliAvailability) {
|
|
758
|
+
const source = agent.source === "package" ? packageSourceLabel(agent) : agent.source;
|
|
759
|
+
return [
|
|
760
|
+
source,
|
|
761
|
+
runnerListBadge(agent, providerNames, externalCliAvailability),
|
|
762
|
+
agent.defaultContext ? `context: ${agent.defaultContext}` : undefined,
|
|
763
|
+
agent.aliases?.length ? `aliases: ${agent.aliases.join(", ")}` : undefined,
|
|
764
|
+
].filter((part) => Boolean(part)).join(", ");
|
|
765
|
+
}
|
|
766
|
+
function formatAgentListLine(agent, providerNames) {
|
|
767
|
+
return `- ${agent.name} (${agentListMetadata(agent, providerNames)}): ${agent.description}`;
|
|
768
|
+
}
|
|
769
|
+
function formatAgentCapabilitiesLine(agent, providerNames, externalCliAvailability) {
|
|
770
|
+
const declaredTools = [
|
|
771
|
+
...(agent.tools ?? []),
|
|
772
|
+
...(agent.mcpDirectTools ?? []).map((tool) => `mcp:${tool}`),
|
|
773
|
+
];
|
|
774
|
+
let tools = "none";
|
|
775
|
+
if (agent.tools === undefined && agent.mcpDirectTools === undefined) {
|
|
776
|
+
tools = "default/ambient";
|
|
777
|
+
}
|
|
778
|
+
else if (declaredTools.length > 0) {
|
|
779
|
+
tools = declaredTools.join(", ");
|
|
780
|
+
}
|
|
781
|
+
if (agent.excludeTools?.length)
|
|
782
|
+
tools = `${tools}; excludes: ${agent.excludeTools.join(", ")}`;
|
|
783
|
+
let model = "inherits current session";
|
|
784
|
+
if (agent.model !== undefined) {
|
|
785
|
+
model = agent.model;
|
|
786
|
+
if (agent.modelProvider && !agent.model.includes("/"))
|
|
787
|
+
model = `${agent.modelProvider}/${agent.model}`;
|
|
788
|
+
}
|
|
789
|
+
const thinking = agent.thinking === false ? "off" : agent.thinking ?? "default";
|
|
790
|
+
const machine = agent.machine ? `; Machine: ${agent.machine} (saved Herdr placement)` : "";
|
|
791
|
+
const acceptance = formatAcceptanceSummary(agent);
|
|
792
|
+
return `- ${agent.name} (${agentListMetadata(agent, providerNames, externalCliAvailability)}): Description: ${previewDisplayText(agent.description, 240)}; Tools: ${tools}; Model: ${model}; Thinking: ${thinking}${machine}${acceptance ? `; ${acceptance}` : ""}`;
|
|
793
|
+
}
|
|
794
|
+
function formatAcceptanceSummary(agent) {
|
|
795
|
+
const policy = agent.defaultAcceptance;
|
|
796
|
+
const summary = [];
|
|
797
|
+
if (policy === false)
|
|
798
|
+
summary.push("Acceptance: disabled");
|
|
799
|
+
else if (typeof policy === "string")
|
|
800
|
+
summary.push(`Acceptance: ${policy}`);
|
|
801
|
+
else if (policy) {
|
|
802
|
+
const modifiers = [
|
|
803
|
+
...(policy.evidence ?? []),
|
|
804
|
+
...(policy.verify ?? []).map((command) => `verify: ${formatAcceptanceDisplayLabel(command.id)}`),
|
|
805
|
+
...(policy.criteria?.length ? [`criteria: ${policy.criteria.length}`] : []),
|
|
806
|
+
...(policy.stopRules?.length ? [`stopRules: ${policy.stopRules.length}`] : []),
|
|
807
|
+
];
|
|
808
|
+
if (policy.review === false)
|
|
809
|
+
modifiers.push("review: off");
|
|
810
|
+
else if (policy.review) {
|
|
811
|
+
const displayReview = policy.review.agent
|
|
812
|
+
? { ...policy.review, agent: formatAcceptanceDisplayLabel(policy.review.agent) }
|
|
813
|
+
: policy.review;
|
|
814
|
+
modifiers.push(`review: ${formatReviewGateLabel(displayReview)}`);
|
|
815
|
+
}
|
|
816
|
+
if (policy.report)
|
|
817
|
+
modifiers.push(`report: ${policy.report}`);
|
|
818
|
+
summary.push(`Acceptance: ${policy.level ?? "auto"}${modifiers.length > 0 ? ` (${modifiers.join(", ")})` : ""}`);
|
|
819
|
+
}
|
|
820
|
+
if (agent.acceptanceRole)
|
|
821
|
+
summary.push(`Acceptance role: ${agent.acceptanceRole}`);
|
|
822
|
+
return summary.length > 0 ? summary.join("; ") : undefined;
|
|
823
|
+
}
|
|
824
|
+
function formatAcceptanceDisplayLabel(value) {
|
|
825
|
+
return JSON.stringify(previewDisplayText(value, 80));
|
|
826
|
+
}
|
|
827
|
+
const EXTERNAL_JOB_CAPABILITIES = { stop: false, steer: false, resume: false, structuredOutput: false, toolEvents: false };
|
|
828
|
+
const PI_AGENT_RUNNER = { type: "pi" };
|
|
829
|
+
function listOrEmpty(values) {
|
|
830
|
+
return values ?? [];
|
|
831
|
+
}
|
|
832
|
+
function agentCapabilityRunner(agent, providerNames, externalCliAvailability) {
|
|
833
|
+
const runner = agent.runner;
|
|
834
|
+
if (!runner || runner.type === "pi")
|
|
835
|
+
return PI_AGENT_RUNNER;
|
|
836
|
+
if (runner.type === "external-cli") {
|
|
837
|
+
const availability = externalCliAvailability.get(externalCliAvailabilityKey(runner.command, agent.machine));
|
|
838
|
+
return {
|
|
839
|
+
type: "external-cli",
|
|
840
|
+
adapter: runner.adapter,
|
|
841
|
+
command: runner.command,
|
|
842
|
+
...(agent.machine ? { machine: agent.machine } : {}),
|
|
843
|
+
...availability,
|
|
844
|
+
capabilities: resolveExternalCliRunnerStatus(runner).capabilities,
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
return { type: "external-job", provider: runner.provider, available: providerNames?.has(runner.provider), capabilities: EXTERNAL_JOB_CAPABILITIES };
|
|
848
|
+
}
|
|
849
|
+
function agentCapabilityTools(agent) {
|
|
850
|
+
return {
|
|
851
|
+
ambient: agent.tools === undefined && agent.mcpDirectTools === undefined,
|
|
852
|
+
names: listOrEmpty(agent.tools),
|
|
853
|
+
...(agent.excludeTools !== undefined ? { excludeTools: [...agent.excludeTools] } : {}),
|
|
854
|
+
mcpDirectTools: listOrEmpty(agent.mcpDirectTools),
|
|
855
|
+
mutationTools: agent.mutationTools,
|
|
856
|
+
};
|
|
857
|
+
}
|
|
858
|
+
function agentCapabilityRow(agent, options) {
|
|
859
|
+
return {
|
|
860
|
+
name: agent.name,
|
|
861
|
+
description: previewDisplayText(agent.description, 1000),
|
|
862
|
+
source: agent.source,
|
|
863
|
+
executable: options.executable,
|
|
864
|
+
restrictionSources: options.executable ? undefined : options.restrictionSources ?? [],
|
|
865
|
+
aliases: agent.aliases ? [...agent.aliases] : undefined,
|
|
866
|
+
runner: agentCapabilityRunner(agent, options.providerNames, options.externalCliAvailability),
|
|
867
|
+
tools: agentCapabilityTools(agent),
|
|
868
|
+
model: presentDetails({ value: agent.model, thinking: agent.thinking }),
|
|
869
|
+
execution: presentDetails({ defaultAsync: agent.defaultAsync, timeoutMs: agent.defaultTimeoutMs }),
|
|
870
|
+
acceptance: presentDetails({ policy: agent.defaultAcceptance, role: agent.acceptanceRole }),
|
|
871
|
+
output: presentDetails({ path: agent.output, mode: agent.outputMode }),
|
|
872
|
+
extensions: presentDetails({ names: agent.extensions, subagentOnly: agent.subagentOnlyExtensions, skills: agent.skills }),
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
function agentCapabilitiesSnapshot(input) {
|
|
876
|
+
return {
|
|
877
|
+
agents: [
|
|
878
|
+
...input.agents.map((agent) => agentCapabilityRow(agent, { executable: true, providerNames: input.providerNames, externalCliAvailability: input.externalCliAvailability })),
|
|
879
|
+
...input.restrictedAgents.map((agent) => agentCapabilityRow(agent, { executable: false, providerNames: input.providerNames, externalCliAvailability: input.externalCliAvailability, restrictionSources: input.restrictedSources })),
|
|
880
|
+
],
|
|
881
|
+
restrictedCount: input.restrictedAgents.length,
|
|
882
|
+
...(input.restrictedSources?.length ? { capabilityCeilingSources: [...input.restrictedSources] } : {}),
|
|
883
|
+
};
|
|
884
|
+
}
|
|
885
|
+
function providerNames(status) {
|
|
886
|
+
return status.ok ? status.names : undefined;
|
|
887
|
+
}
|
|
888
|
+
function appendRestrictedAgentLines(input) {
|
|
889
|
+
if (input.agents.length === 0)
|
|
890
|
+
return;
|
|
891
|
+
input.lines.push("", `Restricted agents (not executable in this session${input.sources?.length ? `; capability ceiling: ${input.sources.join(", ")}` : ""}):`, ...input.agents.map((agent) => input.formatLine(agent, input.providerNames)));
|
|
892
|
+
}
|
|
893
|
+
function appendExternalJobRegistryLine(lines, agents, status) {
|
|
894
|
+
if (status.ok || !agents.some((agent) => agent.runner?.type === "external-job"))
|
|
895
|
+
return;
|
|
896
|
+
lines.push("", `External-job provider registry unavailable: ${status.error}`);
|
|
897
|
+
}
|
|
898
|
+
function appendAgentDiagnosticLines(lines, diagnostics) {
|
|
899
|
+
if (!diagnostics?.length)
|
|
900
|
+
return;
|
|
901
|
+
lines.push("", "Invalid agent definitions:", ...diagnostics.map((diagnostic) => `- ${diagnostic.name ?? diagnostic.filePath} (${diagnostic.source}): ${diagnostic.error}`));
|
|
902
|
+
}
|
|
903
|
+
function agentCapabilityDetails(input) {
|
|
904
|
+
if (!input.capabilityMode)
|
|
905
|
+
return undefined;
|
|
906
|
+
return {
|
|
907
|
+
agentCapabilities: jsonDetails(agentCapabilitiesSnapshot({
|
|
908
|
+
agents: input.agents,
|
|
909
|
+
restrictedAgents: input.restrictedAgents,
|
|
910
|
+
providerNames: input.providerNames,
|
|
911
|
+
externalCliAvailability: input.externalCliAvailability,
|
|
912
|
+
restrictedSources: input.restrictedSources,
|
|
913
|
+
})),
|
|
914
|
+
};
|
|
915
|
+
}
|
|
916
|
+
function formatAgentListSections(agents, providerNames, formatLine = formatAgentListLine) {
|
|
917
|
+
if (agents.length === 0)
|
|
918
|
+
return ["- (none)"];
|
|
919
|
+
const sections = [
|
|
920
|
+
["package", "Package agents"],
|
|
921
|
+
["user", "User agents"],
|
|
922
|
+
["project", "Project agents"],
|
|
923
|
+
["runtime", "Runtime agents"],
|
|
924
|
+
["builtin", "Builtin agents"],
|
|
925
|
+
];
|
|
926
|
+
const lines = [];
|
|
927
|
+
for (const [source, label] of sections) {
|
|
928
|
+
const matches = agents.filter((agent) => agent.source === source);
|
|
929
|
+
if (matches.length === 0)
|
|
930
|
+
continue;
|
|
931
|
+
if (lines.length > 0)
|
|
932
|
+
lines.push("");
|
|
933
|
+
lines.push(label, ...matches.map((agent) => formatLine(agent, providerNames)));
|
|
934
|
+
}
|
|
935
|
+
return lines;
|
|
936
|
+
}
|
|
937
|
+
function formatRunnerDetail(agent, providerNames) {
|
|
938
|
+
if (!agent.runner)
|
|
939
|
+
return undefined;
|
|
940
|
+
if (agent.runner.type === "external-job")
|
|
941
|
+
return `Runner: external-job via ${agent.runner.provider} ${externalJobProviderSuffix(agent.runner.provider, providerNames)}`;
|
|
942
|
+
if (agent.runner.type === "external-cli")
|
|
943
|
+
return `Runner: external-cli ${agent.runner.command}`;
|
|
944
|
+
return `Runner: ${JSON.stringify(agent.runner)}`;
|
|
945
|
+
}
|
|
946
|
+
function formatAgentDetail(agent) {
|
|
947
|
+
const tools = [...(agent.tools ?? []), ...(agent.mcpDirectTools ?? []).map((t) => `mcp:${t}`)];
|
|
948
|
+
const providerStatus = registeredExternalJobProviderStatus();
|
|
949
|
+
const lines = [`Agent: ${agent.name} (${agent.source})`, `Path: ${agent.filePath}`, `Description: ${agent.description}`];
|
|
950
|
+
if (agent.source === "package" && agent.packageSourceName) {
|
|
951
|
+
lines.push(`Source package: ${packageSourceLabel(agent)}`);
|
|
952
|
+
if (agent.packageSourceRoot)
|
|
953
|
+
lines.push(`Package root: ${agent.packageSourceRoot}`);
|
|
954
|
+
}
|
|
955
|
+
if (agent.packageName) {
|
|
956
|
+
lines.push(`Local name: ${frontmatterNameForConfig(agent)}`);
|
|
957
|
+
lines.push(`Package: ${agent.packageName}`);
|
|
958
|
+
}
|
|
959
|
+
if (agent.aliases?.length)
|
|
960
|
+
lines.push(`Aliases: ${agent.aliases.join(", ")}`);
|
|
961
|
+
if (agent.model)
|
|
962
|
+
lines.push(`Model: ${agent.model}`);
|
|
963
|
+
if (tools.length)
|
|
964
|
+
lines.push(`Tools: ${tools.join(", ")}`);
|
|
965
|
+
if (agent.excludeTools?.length)
|
|
966
|
+
lines.push(`Excluded tools: ${agent.excludeTools.join(", ")}`);
|
|
967
|
+
if (agent.skills?.length)
|
|
968
|
+
lines.push(`Skills: ${agent.skills.join(", ")}`);
|
|
969
|
+
if (agent.skillPath?.length)
|
|
970
|
+
lines.push(`Skill paths: ${agent.skillPath.join(", ")}`);
|
|
971
|
+
lines.push(`System prompt mode: ${agent.systemPromptMode}`);
|
|
972
|
+
const runnerDetail = formatRunnerDetail(agent, providerStatus.ok ? providerStatus.names : undefined);
|
|
973
|
+
if (runnerDetail) {
|
|
974
|
+
lines.push(runnerDetail);
|
|
975
|
+
if (agent.runner?.type === "external-job" && !providerStatus.ok)
|
|
976
|
+
lines.push(`External-job provider registry unavailable: ${providerStatus.error}`);
|
|
977
|
+
if (agent.runner?.type === "external-job" && agent.runner.options)
|
|
978
|
+
lines.push(`Runner options: ${JSON.stringify(agent.runner.options)}`);
|
|
979
|
+
}
|
|
980
|
+
lines.push(`Inherit project context: ${agent.inheritProjectContext ? "true" : "false"}`);
|
|
981
|
+
lines.push(`Inherit global context: ${agent.inheritGlobalContext ? "true" : "false"}`);
|
|
982
|
+
lines.push(`Inherit skills: ${agent.inheritSkills ? "true" : "false"}`);
|
|
983
|
+
if (agent.defaultContext)
|
|
984
|
+
lines.push(`Default context: ${agent.defaultContext}`);
|
|
985
|
+
if (agent.defaultAsync !== undefined)
|
|
986
|
+
lines.push(`Async: ${agent.defaultAsync ? "true" : "false"}`);
|
|
987
|
+
if (agent.defaultTimeoutMs !== undefined)
|
|
988
|
+
lines.push(`Timeout: ${agent.defaultTimeoutMs}ms`);
|
|
989
|
+
if (agent.defaultAcceptance !== undefined)
|
|
990
|
+
lines.push(`Acceptance: ${typeof agent.defaultAcceptance === "object" ? JSON.stringify(agent.defaultAcceptance) : String(agent.defaultAcceptance)}`);
|
|
991
|
+
if (agent.acceptanceRole)
|
|
992
|
+
lines.push(`Acceptance role: ${agent.acceptanceRole}`);
|
|
993
|
+
if (agent.source === "builtin")
|
|
994
|
+
lines.push(`Disabled: ${agent.disabled ? "true" : "false"}`);
|
|
995
|
+
if (agent.extensions !== undefined)
|
|
996
|
+
lines.push(`Extensions: ${agent.extensions.length ? agent.extensions.join(", ") : "(none)"}`);
|
|
997
|
+
if (agent.subagentOnlyExtensions !== undefined)
|
|
998
|
+
lines.push(`Subagent-only extensions: ${agent.subagentOnlyExtensions.length ? agent.subagentOnlyExtensions.join(", ") : "(none)"}`);
|
|
999
|
+
if (agent.mutationTools !== undefined)
|
|
1000
|
+
lines.push(`Mutation tools: ${agent.mutationTools.length ? agent.mutationTools.join(", ") : "(none)"}`);
|
|
1001
|
+
if (agent.thinking)
|
|
1002
|
+
lines.push(`Thinking: ${agent.thinking}`);
|
|
1003
|
+
if (agent.output)
|
|
1004
|
+
lines.push(`Output: ${agent.output}`);
|
|
1005
|
+
if (agent.outputMode)
|
|
1006
|
+
lines.push(`Output mode: ${agent.outputMode}`);
|
|
1007
|
+
if (agent.defaultReads?.length)
|
|
1008
|
+
lines.push(`Reads: ${agent.defaultReads.join(", ")}`);
|
|
1009
|
+
if (agent.defaultProgress)
|
|
1010
|
+
lines.push("Progress: true");
|
|
1011
|
+
if (agent.maxSubagentDepth !== undefined)
|
|
1012
|
+
lines.push(`Max subagent depth: ${agent.maxSubagentDepth}`);
|
|
1013
|
+
if (agent.toolBudget)
|
|
1014
|
+
lines.push(`Tool budget: ${JSON.stringify(agent.toolBudget)}`);
|
|
1015
|
+
if (agent.memory)
|
|
1016
|
+
lines.push(`Memory: ${agent.memory.scope} scope, path: ${agent.memory.path}`);
|
|
1017
|
+
if (agent.systemPrompt.trim())
|
|
1018
|
+
lines.push("", "System Prompt:", agent.systemPrompt);
|
|
1019
|
+
return lines.join("\n");
|
|
1020
|
+
}
|
|
1021
|
+
export function handleList(params, ctx) {
|
|
1022
|
+
const scope = normalizeListScope(params.agentScope) ?? "both";
|
|
1023
|
+
const d = discoverCatalog(ctx, ctx.cwd, ctx.model?.provider);
|
|
1024
|
+
let scopedAgents = effectiveAgentsForScope(scope, d, ctx.runtimeAgentOwner, ctx.model?.provider);
|
|
1025
|
+
scopedAgents = scopedAgents
|
|
1026
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
1027
|
+
const capabilityCeiling = resolveCurrentSubagentCapabilityCeiling(ctx.currentSessionId);
|
|
1028
|
+
const visibleAgents = scopedAgents.filter((a) => !a.disabled);
|
|
1029
|
+
const agents = visibleAgents.filter((a) => isAgentAllowedByCapabilityCeiling(a.name, capabilityCeiling));
|
|
1030
|
+
const restrictedAgents = visibleAgents.filter((a) => !isAgentAllowedByCapabilityCeiling(a.name, capabilityCeiling));
|
|
1031
|
+
const restrictedSources = capabilityCeilingAgentRestrictionSources(capabilityCeiling);
|
|
1032
|
+
const proactiveSuggestions = buildProactiveSkillSubagentRecommendationLines({
|
|
1033
|
+
agents,
|
|
1034
|
+
...(ctx.config?.proactiveSkillSubagents !== undefined ? { config: ctx.config.proactiveSkillSubagents } : {}),
|
|
1035
|
+
discoverAvailableSkills: () => discoverAvailableSkills(ctx.cwd),
|
|
1036
|
+
});
|
|
1037
|
+
const providerStatus = registeredExternalJobProviderStatus();
|
|
1038
|
+
const providerNameSet = providerNames(providerStatus);
|
|
1039
|
+
const capabilityMode = params.capabilities === true;
|
|
1040
|
+
const externalCliAvailability = capabilityMode ? externalCliAvailabilityForAgents([...agents, ...restrictedAgents]) : undefined;
|
|
1041
|
+
const formatLine = capabilityMode
|
|
1042
|
+
? (agent, names) => formatAgentCapabilitiesLine(agent, names, externalCliAvailability)
|
|
1043
|
+
: formatAgentListLine;
|
|
1044
|
+
const lines = [
|
|
1045
|
+
capabilityMode ? "Executable agents (capabilities):" : "Executable agents:",
|
|
1046
|
+
...formatAgentListSections(agents, providerNameSet, formatLine),
|
|
1047
|
+
];
|
|
1048
|
+
appendRestrictedAgentLines({ lines, agents: restrictedAgents, sources: restrictedSources, providerNames: providerNameSet, formatLine });
|
|
1049
|
+
appendExternalJobRegistryLine(lines, [...agents, ...restrictedAgents], providerStatus);
|
|
1050
|
+
appendAgentDiagnosticLines(lines, d.agentDiagnostics);
|
|
1051
|
+
if (proactiveSuggestions.length)
|
|
1052
|
+
lines.push("", ...proactiveSuggestions);
|
|
1053
|
+
return result(lines.join("\n"), false, agentCapabilityDetails({
|
|
1054
|
+
capabilityMode,
|
|
1055
|
+
agents,
|
|
1056
|
+
restrictedAgents,
|
|
1057
|
+
providerNames: providerNameSet,
|
|
1058
|
+
externalCliAvailability: externalCliAvailability ?? new Map(),
|
|
1059
|
+
restrictedSources,
|
|
1060
|
+
}));
|
|
1061
|
+
}
|
|
1062
|
+
function formatModelSource(agent, currentModel) {
|
|
1063
|
+
if (agent.override && agent.model !== agent.override.base.model) {
|
|
1064
|
+
return `${agent.override.scope} override`;
|
|
1065
|
+
}
|
|
1066
|
+
if (agent.modelSource?.type === "subagents.defaultModel" && agent.model === agent.modelSource.model) {
|
|
1067
|
+
return `${agent.modelSource.scope} defaultModel`;
|
|
1068
|
+
}
|
|
1069
|
+
if (agent.model)
|
|
1070
|
+
return `${agent.source} agent config`;
|
|
1071
|
+
if (currentModel)
|
|
1072
|
+
return "inherits current session model";
|
|
1073
|
+
return "inherit requested, but no current session model is available";
|
|
1074
|
+
}
|
|
1075
|
+
function handleModels(params, ctx) {
|
|
1076
|
+
const requestedAgent = params.agent?.trim();
|
|
1077
|
+
const scope = normalizeListScope(params.agentScope);
|
|
1078
|
+
if (!scope)
|
|
1079
|
+
return result("agentScope must be 'user', 'project', or 'both' for models.", true);
|
|
1080
|
+
const discovered = discoverCatalog(ctx, ctx.cwd, ctx.model?.provider);
|
|
1081
|
+
const effectiveAgents = effectiveAgentsForScope(scope, discovered, ctx.runtimeAgentOwner, ctx.model?.provider)
|
|
1082
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
1083
|
+
const availableModels = ctx.modelRegistry.getAvailable().map(toModelInfo);
|
|
1084
|
+
const currentModel = ctx.model ? { provider: ctx.model.provider, id: ctx.model.id } : undefined;
|
|
1085
|
+
const preferredProvider = ctx.model?.provider;
|
|
1086
|
+
const capabilityCeiling = resolveCurrentSubagentCapabilityCeiling(ctx.currentSessionId);
|
|
1087
|
+
let selectedAgents = effectiveAgents;
|
|
1088
|
+
if (requestedAgent) {
|
|
1089
|
+
const matches = findAgentsInDiscovery(requestedAgent, discovered, scope, ctx.runtimeAgentOwner, ctx.model?.provider);
|
|
1090
|
+
const diagnostics = diagnosticsForScope(discovered.agentDiagnostics, scope);
|
|
1091
|
+
const normalizedName = sanitizeName(requestedAgent);
|
|
1092
|
+
const diagnostic = findBlockingAgentDiagnostic(requestedAgent, matches, diagnostics)
|
|
1093
|
+
?? (normalizedName !== requestedAgent ? findBlockingAgentDiagnostic(normalizedName, matches, diagnostics) : undefined);
|
|
1094
|
+
if (diagnostic)
|
|
1095
|
+
return result(`Agent '${params.agent}' has invalid configuration: ${diagnostic.error}`, true);
|
|
1096
|
+
const distinctNames = [...new Set(matches.map((agent) => agent.name))];
|
|
1097
|
+
if (distinctNames.length > 1)
|
|
1098
|
+
return result(`Ambiguous agent alias or name '${params.agent}': ${distinctNames.sort((a, b) => a.localeCompare(b)).join(", ")}`, true);
|
|
1099
|
+
if (!matches.length) {
|
|
1100
|
+
return result(`Agent '${params.agent}' not found. Available: ${availableAgentNamesFromDiscovery(discovered, ctx.runtimeAgentOwner, ctx.model?.provider).join(", ") || "none"}.`, true);
|
|
1101
|
+
}
|
|
1102
|
+
selectedAgents = [matches[0]];
|
|
1103
|
+
}
|
|
1104
|
+
const lines = [
|
|
1105
|
+
requestedAgent ? "Subagent model" : "Subagent models",
|
|
1106
|
+
"",
|
|
1107
|
+
...(requestedAgent ? [] : [
|
|
1108
|
+
"Current session model:",
|
|
1109
|
+
` ${currentModel ? `${currentModel.provider}/${currentModel.id}` : "(unavailable)"}`,
|
|
1110
|
+
"",
|
|
1111
|
+
]),
|
|
1112
|
+
];
|
|
1113
|
+
const modelEntries = selectedAgents.flatMap((agent) => requestedAgent
|
|
1114
|
+
? [{ agent, name: requestedAgent }]
|
|
1115
|
+
: [{ agent, name: agent.name }, ...(agent.aliases ?? []).map((name) => ({ agent, name }))]);
|
|
1116
|
+
for (const { agent, name } of modelEntries) {
|
|
1117
|
+
const resolvedModel = resolveSubagentModelOverride(agent.model, currentModel, availableModels, agent.modelProvider ?? preferredProvider);
|
|
1118
|
+
const effectiveThinking = resolveEffectiveThinking(resolvedModel, agent.thinking)
|
|
1119
|
+
?? (agent.thinking === false ? "off" : undefined);
|
|
1120
|
+
const source = `${formatModelSource(agent, currentModel)}${agent.disabled ? "; disabled" : ""}${isAgentAllowedByCapabilityCeiling(agent.name, capabilityCeiling) ? "" : "; restricted"}`;
|
|
1121
|
+
if (requestedAgent) {
|
|
1122
|
+
lines.push(`Agent: ${requestedAgent}`);
|
|
1123
|
+
lines.push("Effective model:");
|
|
1124
|
+
lines.push(` ${resolvedModel ?? "(unresolved)"}`);
|
|
1125
|
+
lines.push(`Source: ${source}`);
|
|
1126
|
+
lines.push(`Thinking: ${effectiveThinking ?? "default"}`);
|
|
1127
|
+
if (agent.override) {
|
|
1128
|
+
lines.push("Override file:");
|
|
1129
|
+
lines.push(` ${agent.override.path}`);
|
|
1130
|
+
}
|
|
1131
|
+
if (agent.model && resolvedModel && agent.model !== resolvedModel) {
|
|
1132
|
+
lines.push("Requested model setting:");
|
|
1133
|
+
lines.push(` ${agent.model}`);
|
|
1134
|
+
}
|
|
1135
|
+
if (agent.disabled)
|
|
1136
|
+
lines.push("Disabled: true");
|
|
1137
|
+
if (!isAgentAllowedByCapabilityCeiling(agent.name, capabilityCeiling))
|
|
1138
|
+
lines.push("Restricted: true");
|
|
1139
|
+
lines.push("Current session model:");
|
|
1140
|
+
lines.push(` ${currentModel ? `${currentModel.provider}/${currentModel.id}` : "(unavailable)"}`);
|
|
1141
|
+
break;
|
|
1142
|
+
}
|
|
1143
|
+
lines.push(name);
|
|
1144
|
+
lines.push(" model:");
|
|
1145
|
+
lines.push(` ${resolvedModel ?? "(unresolved)"}`);
|
|
1146
|
+
lines.push(` source: ${source}`);
|
|
1147
|
+
lines.push(` thinking: ${effectiveThinking ?? "default"}`);
|
|
1148
|
+
if (agent.override) {
|
|
1149
|
+
lines.push(" override file:");
|
|
1150
|
+
lines.push(` ${agent.override.path}`);
|
|
1151
|
+
}
|
|
1152
|
+
if (agent.model && resolvedModel && agent.model !== resolvedModel) {
|
|
1153
|
+
lines.push(" requested model setting:");
|
|
1154
|
+
lines.push(` ${agent.model}`);
|
|
1155
|
+
}
|
|
1156
|
+
lines.push("");
|
|
1157
|
+
}
|
|
1158
|
+
const availableFullIds = availableModels.map((m) => m.fullId).sort();
|
|
1159
|
+
if (!requestedAgent && availableFullIds.length > 0) {
|
|
1160
|
+
lines.push("Available models in this session's registry (copy an exact provider/id when passing model):");
|
|
1161
|
+
lines.push("");
|
|
1162
|
+
const shown = availableFullIds.slice(0, 80);
|
|
1163
|
+
for (const fullId of shown)
|
|
1164
|
+
lines.push(` ${fullId}`);
|
|
1165
|
+
if (availableFullIds.length > shown.length)
|
|
1166
|
+
lines.push(` ... and ${availableFullIds.length - shown.length} more`);
|
|
1167
|
+
lines.push("");
|
|
1168
|
+
lines.push("Use an exact provider/id from this list when you pass model; bare ids resolve only when unique in the registry.");
|
|
1169
|
+
}
|
|
1170
|
+
if (!requestedAgent)
|
|
1171
|
+
appendAgentDiagnosticLines(lines, diagnosticsForScope(discovered.agentDiagnostics, scope));
|
|
1172
|
+
return result(lines.join("\n"));
|
|
1173
|
+
}
|
|
1174
|
+
function handleGet(params, ctx) {
|
|
1175
|
+
if (!params.agent)
|
|
1176
|
+
return result("Specify 'agent' for get.", true);
|
|
1177
|
+
const scope = normalizeListScope(params.agentScope);
|
|
1178
|
+
if (!scope)
|
|
1179
|
+
return result("agentScope must be 'user', 'project', or 'both' for get.", true);
|
|
1180
|
+
const discovered = discoverCatalog(ctx, ctx.cwd, ctx.model?.provider);
|
|
1181
|
+
const matches = findAgentsInDiscovery(params.agent, discovered, scope);
|
|
1182
|
+
const diagnostics = diagnosticsForScope(discovered.agentDiagnostics, scope);
|
|
1183
|
+
const rawName = params.agent.trim();
|
|
1184
|
+
const normalizedName = sanitizeName(rawName);
|
|
1185
|
+
const diagnostic = findBlockingAgentDiagnostic(rawName, matches, diagnostics)
|
|
1186
|
+
?? (normalizedName !== rawName ? findBlockingAgentDiagnostic(normalizedName, matches, diagnostics) : undefined);
|
|
1187
|
+
if (diagnostic)
|
|
1188
|
+
return result(`Agent '${params.agent}' has invalid configuration: ${diagnostic.error}`, true);
|
|
1189
|
+
const distinctNames = [...new Set(matches.map((agent) => agent.name))];
|
|
1190
|
+
if (distinctNames.length > 1)
|
|
1191
|
+
return result(`Ambiguous agent alias or name '${params.agent}': ${distinctNames.sort((a, b) => a.localeCompare(b)).join(", ")}`, true);
|
|
1192
|
+
if (!matches.length) {
|
|
1193
|
+
return result(`Agent '${params.agent}' not found. Available: ${availableAgentNamesFromDiscovery(discovered).join(", ") || "none"}.`, true);
|
|
1194
|
+
}
|
|
1195
|
+
return result(matches.map(formatAgentDetail).join("\n\n"));
|
|
1196
|
+
}
|
|
1197
|
+
export function handleCreate(params, ctx) {
|
|
1198
|
+
const parsedConfig = configObject(params.config);
|
|
1199
|
+
if (parsedConfig.status === "error")
|
|
1200
|
+
return result(parsedConfig.message, true);
|
|
1201
|
+
if (parsedConfig.status === "missing")
|
|
1202
|
+
return result("config required for create.", true);
|
|
1203
|
+
const cfg = parsedConfig.value;
|
|
1204
|
+
if (typeof cfg.name !== "string" || !cfg.name.trim())
|
|
1205
|
+
return result("config.name is required and must be a non-empty string.", true);
|
|
1206
|
+
if (typeof cfg.description !== "string" || !cfg.description.trim())
|
|
1207
|
+
return result("config.description is required and must be a non-empty string.", true);
|
|
1208
|
+
const name = sanitizeName(cfg.name);
|
|
1209
|
+
if (!name)
|
|
1210
|
+
return result("config.name is invalid after sanitization. Use letters, numbers, spaces, or hyphens.", true);
|
|
1211
|
+
const parsedPackage = parsePackageConfig(cfg.package);
|
|
1212
|
+
if (parsedPackage.error)
|
|
1213
|
+
return result(parsedPackage.error, true);
|
|
1214
|
+
const runtimeName = buildRuntimeName(name, parsedPackage.packageName);
|
|
1215
|
+
const scopeRaw = cfg.scope ?? "user";
|
|
1216
|
+
if (scopeRaw !== "user" && scopeRaw !== "project")
|
|
1217
|
+
return result("config.scope must be 'user' or 'project'.", true);
|
|
1218
|
+
const scope = scopeRaw;
|
|
1219
|
+
if (hasKey(cfg, "steps"))
|
|
1220
|
+
return result("Durable chain definitions were removed; use a workflow script or /prompt-workflow for repeatable workflows.", true);
|
|
1221
|
+
const d = discoverCatalog(ctx);
|
|
1222
|
+
const projectConfigDir = getProjectConfigDir(ctx.cwd);
|
|
1223
|
+
const targetDir = scope === "user" ? d.userDir : d.projectDir ?? path.join(projectConfigDir, "agents");
|
|
1224
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
1225
|
+
if (nameExistsInScope(ctx, scope, runtimeName))
|
|
1226
|
+
return result(`Name '${runtimeName}' already exists in ${scope} scope. Use update instead.`, true);
|
|
1227
|
+
const targetPath = path.join(targetDir, `${runtimeName}.md`);
|
|
1228
|
+
if (fs.existsSync(targetPath))
|
|
1229
|
+
return result(`File already exists at ${targetPath} but is not a valid agent definition. Remove or rename it first.`, true);
|
|
1230
|
+
const warnings = [];
|
|
1231
|
+
if (d.builtin.some((a) => a.name === runtimeName))
|
|
1232
|
+
warnings.push(`Note: this shadows the builtin agent '${runtimeName}'.`);
|
|
1233
|
+
const agent = {
|
|
1234
|
+
name: runtimeName,
|
|
1235
|
+
localName: name,
|
|
1236
|
+
...(parsedPackage.packageName !== undefined ? { packageName: parsedPackage.packageName } : {}),
|
|
1237
|
+
description: cfg.description.trim(),
|
|
1238
|
+
source: scope,
|
|
1239
|
+
filePath: targetPath,
|
|
1240
|
+
systemPrompt: "",
|
|
1241
|
+
systemPromptMode: defaultSystemPromptMode(name),
|
|
1242
|
+
inheritProjectContext: defaultInheritProjectContext(name),
|
|
1243
|
+
inheritGlobalContext: false,
|
|
1244
|
+
inheritSkills: defaultInheritSkills(),
|
|
1245
|
+
};
|
|
1246
|
+
const applyError = applyAgentConfig(agent, cfg);
|
|
1247
|
+
if (applyError)
|
|
1248
|
+
return result(applyError, true);
|
|
1249
|
+
const profileError = validateCodeOwnedProfileRunner(agent);
|
|
1250
|
+
if (profileError)
|
|
1251
|
+
return result(profileError, true);
|
|
1252
|
+
const mw = modelWarning(ctx, agent.model);
|
|
1253
|
+
if (mw)
|
|
1254
|
+
warnings.push(mw);
|
|
1255
|
+
const sw = skillsWarning(ctx.cwd, agent);
|
|
1256
|
+
if (sw)
|
|
1257
|
+
warnings.push(sw);
|
|
1258
|
+
fs.writeFileSync(targetPath, serializeAgent(agent), "utf-8");
|
|
1259
|
+
ctx.onAgentsChanged?.();
|
|
1260
|
+
return result([`Created agent '${runtimeName}' at ${targetPath}.`, ...warnings].join("\n"));
|
|
1261
|
+
}
|
|
1262
|
+
export function handleUpdate(params, ctx) {
|
|
1263
|
+
if (!params.agent)
|
|
1264
|
+
return result("Specify 'agent' for update.", true);
|
|
1265
|
+
const parsedConfig = configObject(params.config);
|
|
1266
|
+
if (parsedConfig.status === "error")
|
|
1267
|
+
return result(parsedConfig.message, true);
|
|
1268
|
+
if (parsedConfig.status === "missing")
|
|
1269
|
+
return result("config required for update.", true);
|
|
1270
|
+
const cfg = parsedConfig.value;
|
|
1271
|
+
if (hasKey(cfg, "steps"))
|
|
1272
|
+
return result("Durable chain definitions were removed; use a workflow script or /prompt-workflow for repeatable workflows.", true);
|
|
1273
|
+
const warnings = [];
|
|
1274
|
+
const scopeHint = asDisambiguationScope(params.agentScope);
|
|
1275
|
+
const targetOrError = resolveTarget(params.agent, findAgents(params.agent, ctx, scopeHint ?? "both"), ctx.cwd, ctx, scopeHint);
|
|
1276
|
+
if ("content" in targetOrError)
|
|
1277
|
+
return targetOrError;
|
|
1278
|
+
const target = targetOrError;
|
|
1279
|
+
if (target.source !== "user" && target.source !== "project")
|
|
1280
|
+
return result(`Cannot update ${target.source} agent '${target.name}'. Eject it to user or project scope first.`, true);
|
|
1281
|
+
let updated;
|
|
1282
|
+
try {
|
|
1283
|
+
updated = editableAgentConfig(target);
|
|
1284
|
+
}
|
|
1285
|
+
catch (error) {
|
|
1286
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
1287
|
+
return result(`Could not reread agent definition ${target.filePath} before updating '${target.name}': ${message}`, true);
|
|
1288
|
+
}
|
|
1289
|
+
const oldName = target.name;
|
|
1290
|
+
if (hasKey(cfg, "name") && (typeof cfg.name !== "string" || !cfg.name.trim()))
|
|
1291
|
+
return result("config.name must be a non-empty string when provided.", true);
|
|
1292
|
+
if (hasKey(cfg, "description") && (typeof cfg.description !== "string" || !cfg.description.trim()))
|
|
1293
|
+
return result("config.description must be a non-empty string when provided.", true);
|
|
1294
|
+
let newLocalName = target.localName ?? frontmatterNameForConfig(target);
|
|
1295
|
+
if (hasKey(cfg, "name")) {
|
|
1296
|
+
newLocalName = sanitizeName(cfg.name);
|
|
1297
|
+
if (!newLocalName)
|
|
1298
|
+
return result("config.name is invalid after sanitization.", true);
|
|
1299
|
+
}
|
|
1300
|
+
let newPackageName = target.packageName;
|
|
1301
|
+
if (hasKey(cfg, "package")) {
|
|
1302
|
+
const parsedPackage = parsePackageConfig(cfg.package);
|
|
1303
|
+
if (parsedPackage.error)
|
|
1304
|
+
return result(parsedPackage.error, true);
|
|
1305
|
+
newPackageName = parsedPackage.packageName;
|
|
1306
|
+
}
|
|
1307
|
+
const applyError = applyAgentConfig(updated, cfg);
|
|
1308
|
+
if (applyError)
|
|
1309
|
+
return result(applyError, true);
|
|
1310
|
+
const preserveFrontmatterFields = preservedAgentFrontmatterFields(target, cfg);
|
|
1311
|
+
updated.localName = newLocalName;
|
|
1312
|
+
if (newPackageName !== undefined)
|
|
1313
|
+
updated.packageName = newPackageName;
|
|
1314
|
+
else
|
|
1315
|
+
delete updated.packageName;
|
|
1316
|
+
updated.name = buildRuntimeName(newLocalName, newPackageName);
|
|
1317
|
+
const profileError = validateCodeOwnedProfileRunner(updated);
|
|
1318
|
+
if (profileError)
|
|
1319
|
+
return result(profileError, true);
|
|
1320
|
+
if (hasKey(cfg, "description"))
|
|
1321
|
+
updated.description = cfg.description.trim();
|
|
1322
|
+
if (hasKey(cfg, "model")) {
|
|
1323
|
+
const mw = modelWarning(ctx, updated.model);
|
|
1324
|
+
if (mw)
|
|
1325
|
+
warnings.push(mw);
|
|
1326
|
+
}
|
|
1327
|
+
if (hasKey(cfg, "skills") || hasKey(cfg, "skillPath")) {
|
|
1328
|
+
const sw = skillsWarning(ctx.cwd, updated);
|
|
1329
|
+
if (sw)
|
|
1330
|
+
warnings.push(sw);
|
|
1331
|
+
}
|
|
1332
|
+
if (updated.name !== oldName) {
|
|
1333
|
+
const renamed = renamePath(target.filePath, updated.name, target.source, ctx);
|
|
1334
|
+
if (renamed.error)
|
|
1335
|
+
return result(renamed.error, true);
|
|
1336
|
+
updated.filePath = renamed.filePath;
|
|
1337
|
+
}
|
|
1338
|
+
fs.writeFileSync(updated.filePath, serializeAgent(updated, { preserveFrontmatterFields }), "utf-8");
|
|
1339
|
+
ctx.onAgentsChanged?.();
|
|
1340
|
+
const headline = updated.name === oldName
|
|
1341
|
+
? `Updated agent '${updated.name}' at ${updated.filePath}.`
|
|
1342
|
+
: `Updated agent '${oldName}' to '${updated.name}' at ${updated.filePath}.`;
|
|
1343
|
+
return result([headline, ...warnings].join("\n"));
|
|
1344
|
+
}
|
|
1345
|
+
function handleDelete(params, ctx) {
|
|
1346
|
+
if (!params.agent)
|
|
1347
|
+
return result("Specify 'agent' for delete.", true);
|
|
1348
|
+
const scopeHint = asDisambiguationScope(params.agentScope);
|
|
1349
|
+
const targetOrError = resolveTarget(params.agent, findAgents(params.agent, ctx, scopeHint ?? "both"), ctx.cwd, ctx, scopeHint);
|
|
1350
|
+
if ("content" in targetOrError)
|
|
1351
|
+
return targetOrError;
|
|
1352
|
+
const target = targetOrError;
|
|
1353
|
+
fs.unlinkSync(target.filePath);
|
|
1354
|
+
ctx.onAgentsChanged?.();
|
|
1355
|
+
return result(`Deleted agent '${target.name}' at ${target.filePath}.`);
|
|
1356
|
+
}
|
|
1357
|
+
function handleEject(params, ctx) {
|
|
1358
|
+
if (!params.agent)
|
|
1359
|
+
return result("Specify 'agent' for eject.", true);
|
|
1360
|
+
const raw = params.agent.trim();
|
|
1361
|
+
const sanitized = sanitizeName(raw);
|
|
1362
|
+
const parsedScope = actionScope(params.agentScope, "eject");
|
|
1363
|
+
if (parsedScope.error)
|
|
1364
|
+
return parsedScope.error;
|
|
1365
|
+
const scope = parsedScope.scope;
|
|
1366
|
+
const d = discoverCatalog(ctx);
|
|
1367
|
+
const source = [...d.package, ...d.builtin].find((a) => a.name === raw || a.name === sanitized);
|
|
1368
|
+
if (!source) {
|
|
1369
|
+
return result(`Agent '${raw}' not found or is not a bundled/package agent. eject copies a builtin or package agent to ${scope} scope so it can be customized. Available: ${availableAgentNames(ctx).join(", ") || "none"}.`, true);
|
|
1370
|
+
}
|
|
1371
|
+
const runtimeName = source.name;
|
|
1372
|
+
const existingCustom = (scope === "user" ? d.user : d.project).find((a) => a.name === runtimeName);
|
|
1373
|
+
if (existingCustom) {
|
|
1374
|
+
return result(`Agent '${runtimeName}' is already a custom ${scope} agent at ${existingCustom.filePath}. Edit it with { action: "update", agent: "${runtimeName}" } or delete it first.`, true);
|
|
1375
|
+
}
|
|
1376
|
+
if (nameExistsInScope(ctx, scope, runtimeName)) {
|
|
1377
|
+
return result(`An agent named '${runtimeName}' already exists in ${scope} scope. Remove or rename it first.`, true);
|
|
1378
|
+
}
|
|
1379
|
+
const projectConfigDir = getProjectConfigDir(ctx.cwd);
|
|
1380
|
+
const targetDir = scope === "user" ? d.userDir : d.projectDir ?? path.join(projectConfigDir, "agents");
|
|
1381
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
1382
|
+
const targetPath = path.join(targetDir, `${runtimeName}.md`);
|
|
1383
|
+
if (fs.existsSync(targetPath)) {
|
|
1384
|
+
return result(`File already exists at ${targetPath} but is not a valid agent definition. Remove or rename it first.`, true);
|
|
1385
|
+
}
|
|
1386
|
+
let content;
|
|
1387
|
+
try {
|
|
1388
|
+
content = fs.readFileSync(source.filePath, "utf-8");
|
|
1389
|
+
}
|
|
1390
|
+
catch (error) {
|
|
1391
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
1392
|
+
return result(`Failed to read source agent at ${source.filePath}: ${message}`, true);
|
|
1393
|
+
}
|
|
1394
|
+
fs.writeFileSync(targetPath, content, "utf-8");
|
|
1395
|
+
ctx.onAgentsChanged?.();
|
|
1396
|
+
return result(`Ejected agent '${runtimeName}' from ${source.source} to ${scope} scope at ${targetPath}. Edit it there to customize; it shadows the bundled ${source.source} agent of the same name.`);
|
|
1397
|
+
}
|
|
1398
|
+
function handleDisable(params, ctx) {
|
|
1399
|
+
if (!params.agent)
|
|
1400
|
+
return result("Specify 'agent' for disable.", true);
|
|
1401
|
+
const raw = params.agent.trim();
|
|
1402
|
+
const parsedScope = actionScope(params.agentScope, "disable");
|
|
1403
|
+
if (parsedScope.error)
|
|
1404
|
+
return parsedScope.error;
|
|
1405
|
+
const scope = parsedScope.scope;
|
|
1406
|
+
const d = discoverCatalog(ctx);
|
|
1407
|
+
if (scope === "project" && d.projectSettingsPath === null) {
|
|
1408
|
+
return result("Project override is not available here: no project config root (.pi or .agents) was found above the cwd. Use agentScope: 'user' or run from inside a project.", true);
|
|
1409
|
+
}
|
|
1410
|
+
const effective = resolveEffectiveAgent(d, raw);
|
|
1411
|
+
if (effective.error)
|
|
1412
|
+
return result(effective.error, true);
|
|
1413
|
+
if (!effective.agent) {
|
|
1414
|
+
return result(`Agent '${raw}' not found. Available: ${availableAgentNames(ctx).join(", ") || "none"}.`, true);
|
|
1415
|
+
}
|
|
1416
|
+
const runtimeName = effective.agent.name;
|
|
1417
|
+
const settingsPath = mergeBuiltinAgentOverride(ctx.cwd, runtimeName, scope, { disabled: true });
|
|
1418
|
+
const after = resolveEffectiveAgent(discoverCatalog(ctx), raw).agent;
|
|
1419
|
+
if (after?.disabled === true) {
|
|
1420
|
+
ctx.onAgentsChanged?.();
|
|
1421
|
+
return result(`Disabled agent '${runtimeName}' via ${scope} settings override at ${settingsPath}. It is now hidden from runtime discovery and { action: "list" }.`);
|
|
1422
|
+
}
|
|
1423
|
+
return result(`Wrote a disabled override for '${runtimeName}' at ${settingsPath}, but the agent is still enabled. A higher-precedence ${after?.override?.scope ?? "project"} override is likely winning. Try agentScope: '${after?.override?.scope ?? "project"}'.`, true);
|
|
1424
|
+
}
|
|
1425
|
+
function handleEnable(params, ctx) {
|
|
1426
|
+
if (!params.agent)
|
|
1427
|
+
return result("Specify 'agent' for enable.", true);
|
|
1428
|
+
const raw = params.agent.trim();
|
|
1429
|
+
const parsedScope = actionScope(params.agentScope, "enable");
|
|
1430
|
+
if (parsedScope.error)
|
|
1431
|
+
return parsedScope.error;
|
|
1432
|
+
const scope = parsedScope.scope;
|
|
1433
|
+
const d = discoverCatalog(ctx);
|
|
1434
|
+
if (scope === "project" && d.projectSettingsPath === null) {
|
|
1435
|
+
return result("Project override is not available here: no project config root (.pi or .agents) was found above the cwd. Use agentScope: 'user' or run from inside a project.", true);
|
|
1436
|
+
}
|
|
1437
|
+
const effective = resolveEffectiveAgent(d, raw);
|
|
1438
|
+
if (effective.error)
|
|
1439
|
+
return result(effective.error, true);
|
|
1440
|
+
if (!effective.agent) {
|
|
1441
|
+
return result(`Agent '${raw}' not found. Available: ${availableAgentNames(ctx).join(", ") || "none"}.`, true);
|
|
1442
|
+
}
|
|
1443
|
+
const runtimeName = effective.agent.name;
|
|
1444
|
+
const { path: settingsPath, removed } = removeBuiltinAgentOverrideFields(ctx.cwd, runtimeName, scope, ["disabled"]);
|
|
1445
|
+
const after = resolveEffectiveAgent(discoverCatalog(ctx), raw).agent;
|
|
1446
|
+
if (after && after.disabled !== true) {
|
|
1447
|
+
if (removed)
|
|
1448
|
+
ctx.onAgentsChanged?.();
|
|
1449
|
+
if (removed)
|
|
1450
|
+
return result(`Enabled agent '${runtimeName}' (removed disabled override at ${settingsPath}).`);
|
|
1451
|
+
return result(`Agent '${runtimeName}' is already enabled.`);
|
|
1452
|
+
}
|
|
1453
|
+
if (after?.override?.scope && after.override.scope !== scope) {
|
|
1454
|
+
return result(`Agent '${runtimeName}' is still disabled via a ${after.override.scope} scope override at ${after.override.path}. Specify agentScope: '${after.override.scope}' to enable it.`, true);
|
|
1455
|
+
}
|
|
1456
|
+
return result(`Agent '${runtimeName}' is still disabled after removing the ${scope} disabled override. It may be hidden via subagents.disableBuiltins in ${after?.override?.scope ?? scope} settings at ${after?.override?.path ?? settingsPath}.`, true);
|
|
1457
|
+
}
|
|
1458
|
+
function handleReset(params, ctx) {
|
|
1459
|
+
if (!params.agent)
|
|
1460
|
+
return result("Specify 'agent' for reset.", true);
|
|
1461
|
+
const raw = params.agent.trim();
|
|
1462
|
+
const sanitized = sanitizeName(raw);
|
|
1463
|
+
const parsedScope = actionScope(params.agentScope, "reset");
|
|
1464
|
+
if (parsedScope.error)
|
|
1465
|
+
return parsedScope.error;
|
|
1466
|
+
const scope = parsedScope.scope;
|
|
1467
|
+
const d = discoverCatalog(ctx);
|
|
1468
|
+
if (scope === "project" && d.projectSettingsPath === null) {
|
|
1469
|
+
return result("Project override is not available here: no project config root (.pi or .agents) was found above the cwd. Use agentScope: 'user' or run from inside a project.", true);
|
|
1470
|
+
}
|
|
1471
|
+
const bundled = [...d.package, ...d.builtin].find((a) => a.name === raw || a.name === sanitized);
|
|
1472
|
+
if (!bundled) {
|
|
1473
|
+
const custom = [...d.user, ...d.project].find((a) => a.name === raw || a.name === sanitized);
|
|
1474
|
+
if (custom) {
|
|
1475
|
+
return result(`Agent '${raw}' has no bundled default to reset to. Use { action: "delete", agent: "${custom.name}" } to remove the custom ${custom.source} agent.`, true);
|
|
1476
|
+
}
|
|
1477
|
+
return result(`Agent '${raw}' not found. Available: ${availableAgentNames(ctx).join(", ") || "none"}.`, true);
|
|
1478
|
+
}
|
|
1479
|
+
const runtimeName = bundled.name;
|
|
1480
|
+
const custom = (scope === "user" ? d.user : d.project).find((a) => a.name === raw || a.name === sanitized);
|
|
1481
|
+
const lines = [];
|
|
1482
|
+
if (custom) {
|
|
1483
|
+
fs.unlinkSync(custom.filePath);
|
|
1484
|
+
lines.push(`Deleted custom ${scope} agent file at ${custom.filePath}.`);
|
|
1485
|
+
}
|
|
1486
|
+
const overrideRemoval = removeBuiltinAgentOverride(ctx.cwd, runtimeName, scope, { preserveMachine: true });
|
|
1487
|
+
if (overrideRemoval.removed)
|
|
1488
|
+
lines.push(`${overrideRemoval.machinePreserved ? "Cleared customization in" : "Removed"} ${scope} settings override at ${overrideRemoval.path}.${overrideRemoval.machinePreserved ? " Retained machine placement." : ""}`);
|
|
1489
|
+
if (lines.length === 0) {
|
|
1490
|
+
const otherScope = scope === "user" ? "project" : "user";
|
|
1491
|
+
const otherCustom = (otherScope === "user" ? d.user : d.project).find((a) => a.name === raw || a.name === sanitized);
|
|
1492
|
+
const hasOtherOverride = bundled.override?.scope === otherScope;
|
|
1493
|
+
const note = (otherCustom || hasOtherOverride)
|
|
1494
|
+
? ` Customization exists in ${otherScope} scope; specify agentScope: '${otherScope}' to reset it.`
|
|
1495
|
+
: "";
|
|
1496
|
+
return result(`Agent '${runtimeName}' has no ${scope} customization to reset.${note} It is at its bundled ${bundled.source} default.`);
|
|
1497
|
+
}
|
|
1498
|
+
lines.push(`Reset agent '${runtimeName}' to its bundled ${bundled.source} default.`);
|
|
1499
|
+
ctx.onAgentsChanged?.();
|
|
1500
|
+
return result(lines.join("\n"));
|
|
1501
|
+
}
|
|
1502
|
+
export function handleManagementAction(action, params, ctx) {
|
|
1503
|
+
switch (action) {
|
|
1504
|
+
case "list": return handleList(params, ctx);
|
|
1505
|
+
case "get": return handleGet(params, ctx);
|
|
1506
|
+
case "models": return handleModels(params, ctx);
|
|
1507
|
+
case "create": return handleCreate(params, ctx);
|
|
1508
|
+
case "update": return handleUpdate(params, ctx);
|
|
1509
|
+
case "delete": return handleDelete(params, ctx);
|
|
1510
|
+
case "eject": return handleEject(params, ctx);
|
|
1511
|
+
case "disable": return handleDisable(params, ctx);
|
|
1512
|
+
case "enable": return handleEnable(params, ctx);
|
|
1513
|
+
case "reset": return handleReset(params, ctx);
|
|
1514
|
+
default: return result(`Unknown action: ${action}`, true);
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
//# sourceMappingURL=agent-management.js.map
|