@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,1178 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
2
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
3
|
+
import * as fs from "node:fs";
|
|
4
|
+
import * as path from "node:path";
|
|
5
|
+
import { getProjectSubagentsDir } from "../../shared/artifacts.js";
|
|
6
|
+
import { writePrivateAtomicJson } from "../../shared/atomic-json.js";
|
|
7
|
+
import { withFileLease } from "../../shared/file-lease.js";
|
|
8
|
+
import { shortenPath } from "../../shared/formatters.js";
|
|
9
|
+
import { validateExecutionAcceptance } from "../shared/acceptance.js";
|
|
10
|
+
import { previewSimpleWorkflowRun } from "../../workflows/scripted-workflow.js";
|
|
11
|
+
import { resolveGitRepositoryIdentity } from "../../workflows/chat-progress.js";
|
|
12
|
+
import { getConfigDirName } from "../../shared/utils.js";
|
|
13
|
+
import { normalizeWorktreeBaseRef } from "../shared/worktree.js";
|
|
14
|
+
import { deepFreezeWorkflowArgs, normalizeWorkflowArgs } from "../../workflows/workflow-resources.js";
|
|
15
|
+
import { readMission, resolveMissionStoreLocation, validateMissionId } from "../../missions/store.js";
|
|
16
|
+
import { calendarDateAfter, latestCalendarOccurrence, nextCalendarOccurrence, normalizeCalendarRule, restoreCalendarTrigger } from "./calendar-schedule.js";
|
|
17
|
+
export const SCHEDULED_RUN_ACTIONS = [
|
|
18
|
+
"schedule.create",
|
|
19
|
+
"schedule.list",
|
|
20
|
+
"schedule.show",
|
|
21
|
+
"schedule.history",
|
|
22
|
+
"schedule.pause",
|
|
23
|
+
"schedule.resume",
|
|
24
|
+
"schedule.run",
|
|
25
|
+
"schedule.run-due",
|
|
26
|
+
"schedule.delete",
|
|
27
|
+
];
|
|
28
|
+
const MAX_TIMER_DELAY_MS = 2_147_483_647;
|
|
29
|
+
const DEFAULT_MAX_PENDING = 20;
|
|
30
|
+
const MAX_HISTORY = 100;
|
|
31
|
+
const STALE_LAUNCH_CLAIM_MS = 5 * 60_000;
|
|
32
|
+
const SCHEDULE_ID = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;
|
|
33
|
+
export function isScheduledRunAction(action) {
|
|
34
|
+
return typeof action === "string" && SCHEDULED_RUN_ACTIONS.includes(action);
|
|
35
|
+
}
|
|
36
|
+
export function scheduledRunsEnabled(config) {
|
|
37
|
+
return config.scheduledRuns?.enabled !== false;
|
|
38
|
+
}
|
|
39
|
+
export function scheduledRunStorePath(cwd, _sessionId, root) {
|
|
40
|
+
if (!root)
|
|
41
|
+
return path.join(getProjectSubagentsDir(path.resolve(cwd)), "schedules");
|
|
42
|
+
const projectKey = createHash("sha256").update(path.resolve(cwd)).digest("hex").slice(0, 20);
|
|
43
|
+
return path.join(root, projectKey);
|
|
44
|
+
}
|
|
45
|
+
export function parseScheduledRunTime(at, now = Date.now()) {
|
|
46
|
+
const trimmed = at.trim();
|
|
47
|
+
const relative = trimmed.match(/^\+(\d+)(s|m|h|d)$/);
|
|
48
|
+
if (relative) {
|
|
49
|
+
const amount = Number(relative[1]);
|
|
50
|
+
if (!Number.isSafeInteger(amount) || amount < 1)
|
|
51
|
+
throw new Error(`Invalid at value "${at}". Relative delays must be positive, such as "+10m".`);
|
|
52
|
+
const unitMs = { s: 1_000, m: 60_000, h: 3_600_000, d: 86_400_000 }[relative[2]];
|
|
53
|
+
const result = now + amount * unitMs;
|
|
54
|
+
if (!Number.isSafeInteger(result))
|
|
55
|
+
throw new Error(`Invalid at value "${at}". Relative delay is too large.`);
|
|
56
|
+
return result;
|
|
57
|
+
}
|
|
58
|
+
const iso = trimmed.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d{1,3})?)?(Z|[+-]\d{2}:\d{2})$/);
|
|
59
|
+
if (!iso)
|
|
60
|
+
throw new Error(`Invalid at value "${at}". Use a one-shot delay such as "+10m" or an ISO timestamp with timezone.`);
|
|
61
|
+
const year = Number(iso[1]);
|
|
62
|
+
const month = Number(iso[2]);
|
|
63
|
+
const day = Number(iso[3]);
|
|
64
|
+
const hour = Number(iso[4]);
|
|
65
|
+
const minute = Number(iso[5]);
|
|
66
|
+
const second = iso[6] === undefined ? 0 : Number(iso[6]);
|
|
67
|
+
const zone = iso[7];
|
|
68
|
+
const offsetHour = zone === "Z" ? 0 : Number(zone.slice(1, 3));
|
|
69
|
+
const offsetMinute = zone === "Z" ? 0 : Number(zone.slice(4, 6));
|
|
70
|
+
const daysInMonth = month >= 1 && month <= 12 ? new Date(Date.UTC(year, month, 0)).getUTCDate() : 0;
|
|
71
|
+
const parsed = Date.parse(trimmed);
|
|
72
|
+
if (month < 1 || month > 12 || day < 1 || day > daysInMonth || hour > 23 || minute > 59 || second > 59 || offsetHour > 23 || offsetMinute > 59 || !Number.isFinite(parsed))
|
|
73
|
+
throw new Error(`Invalid at value "${at}". Use a valid ISO timestamp.`);
|
|
74
|
+
if (parsed <= now)
|
|
75
|
+
throw new Error(`Scheduled time ${new Date(parsed).toISOString()} is in the past.`);
|
|
76
|
+
return parsed;
|
|
77
|
+
}
|
|
78
|
+
export function parseScheduleInterval(every) {
|
|
79
|
+
const match = every.trim().match(/^(\d+)(m|h|d|w)$/);
|
|
80
|
+
if (!match)
|
|
81
|
+
throw new Error(`Invalid every value "${every}". This first recurring slice supports fixed intervals such as "30m", "6h", "2d", or "2w".`);
|
|
82
|
+
const amount = Number(match[1]);
|
|
83
|
+
if (!Number.isSafeInteger(amount) || amount < 1)
|
|
84
|
+
throw new Error(`Invalid every value "${every}". Interval must be positive.`);
|
|
85
|
+
const unitMs = { m: 60_000, h: 3_600_000, d: 86_400_000, w: 604_800_000 }[match[2]];
|
|
86
|
+
const result = amount * unitMs;
|
|
87
|
+
if (!Number.isSafeInteger(result))
|
|
88
|
+
throw new Error(`Invalid every value "${every}". Interval is too large.`);
|
|
89
|
+
return result;
|
|
90
|
+
}
|
|
91
|
+
function timestamp(value) {
|
|
92
|
+
return new Date(value).toISOString();
|
|
93
|
+
}
|
|
94
|
+
function validateScheduleId(id) {
|
|
95
|
+
if (!SCHEDULE_ID.test(id))
|
|
96
|
+
throw new Error("Schedule id must be 1-64 characters and contain only letters, numbers, '.', '_', or '-'.");
|
|
97
|
+
return id;
|
|
98
|
+
}
|
|
99
|
+
function normalizedComparisonPath(value) {
|
|
100
|
+
const absolute = path.resolve(value);
|
|
101
|
+
if (process.platform !== "win32")
|
|
102
|
+
return absolute;
|
|
103
|
+
let normalized = absolute;
|
|
104
|
+
try {
|
|
105
|
+
normalized = fs.realpathSync.native(absolute);
|
|
106
|
+
}
|
|
107
|
+
catch { }
|
|
108
|
+
normalized = normalized.replaceAll("/", "\\");
|
|
109
|
+
if (normalized.startsWith("\\\\?\\UNC\\"))
|
|
110
|
+
normalized = `\\\\${normalized.slice(8)}`;
|
|
111
|
+
else if (normalized.startsWith("\\\\?\\"))
|
|
112
|
+
normalized = normalized.slice(4);
|
|
113
|
+
normalized = path.win32.normalize(normalized).toLowerCase();
|
|
114
|
+
if (normalized.length > 3)
|
|
115
|
+
normalized = normalized.replace(/[\\]+$/, "");
|
|
116
|
+
return normalized;
|
|
117
|
+
}
|
|
118
|
+
function pathWithin(root, candidate) {
|
|
119
|
+
const relative = path.relative(normalizedComparisonPath(root), normalizedComparisonPath(candidate));
|
|
120
|
+
return relative === "" || (relative !== ".." && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative));
|
|
121
|
+
}
|
|
122
|
+
function resolveGitCommonDirForCheckout(checkoutRoot) {
|
|
123
|
+
const gitPath = path.join(checkoutRoot, ".git");
|
|
124
|
+
try {
|
|
125
|
+
const stat = fs.statSync(gitPath);
|
|
126
|
+
if (stat.isDirectory())
|
|
127
|
+
return fs.realpathSync.native(gitPath);
|
|
128
|
+
if (!stat.isFile())
|
|
129
|
+
return undefined;
|
|
130
|
+
const match = /^gitdir:[ \t]*([^\r\n]+)$/i.exec(fs.readFileSync(gitPath, "utf-8").trim());
|
|
131
|
+
return match?.[1] ? fs.realpathSync.native(path.resolve(checkoutRoot, match[1])) : undefined;
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
function samePath(left, right) {
|
|
138
|
+
return normalizedComparisonPath(left) === normalizedComparisonPath(right);
|
|
139
|
+
}
|
|
140
|
+
function resolveTrustedGitConfigRoot(checkoutRoot, commonDir) {
|
|
141
|
+
const resolvedCommonDir = resolveGitCommonDirForCheckout(checkoutRoot);
|
|
142
|
+
if (!resolvedCommonDir || !samePath(resolvedCommonDir, commonDir))
|
|
143
|
+
return undefined;
|
|
144
|
+
const configRoot = path.join(checkoutRoot, getConfigDirName());
|
|
145
|
+
try {
|
|
146
|
+
const resolved = fs.realpathSync.native(configRoot);
|
|
147
|
+
return fs.statSync(resolved).isDirectory() && pathWithin(checkoutRoot, resolved) ? resolved : undefined;
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
return undefined;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
function registeredGitWorktreeRoots(projectCwd) {
|
|
154
|
+
const result = spawnSync("git", ["-C", projectCwd, "worktree", "list", "--porcelain"], { encoding: "utf-8", windowsHide: true });
|
|
155
|
+
if (result.status !== 0 || typeof result.stdout !== "string")
|
|
156
|
+
return [];
|
|
157
|
+
const roots = [];
|
|
158
|
+
for (const line of result.stdout.split(/\r?\n/)) {
|
|
159
|
+
if (!line.startsWith("worktree "))
|
|
160
|
+
continue;
|
|
161
|
+
try {
|
|
162
|
+
roots.push(fs.realpathSync.native(line.slice("worktree ".length).trim()));
|
|
163
|
+
}
|
|
164
|
+
catch { }
|
|
165
|
+
}
|
|
166
|
+
return roots;
|
|
167
|
+
}
|
|
168
|
+
function resolveSharedGitConfigRoot(projectCwd) {
|
|
169
|
+
const repository = resolveGitRepositoryIdentity(projectCwd);
|
|
170
|
+
if (!repository)
|
|
171
|
+
return undefined;
|
|
172
|
+
let projectConfigRoot;
|
|
173
|
+
try {
|
|
174
|
+
projectConfigRoot = fs.realpathSync.native(path.join(projectCwd, getConfigDirName()));
|
|
175
|
+
}
|
|
176
|
+
catch {
|
|
177
|
+
return undefined;
|
|
178
|
+
}
|
|
179
|
+
// Git may report a separate-git-dir primary checkout as its common git
|
|
180
|
+
// directory, not as the checkout root. Without a registered checkout root,
|
|
181
|
+
// do not infer a shared config path from that unprovable layout.
|
|
182
|
+
for (const checkoutRoot of new Set(registeredGitWorktreeRoots(projectCwd))) {
|
|
183
|
+
const resolved = resolveTrustedGitConfigRoot(checkoutRoot, repository.commonDir);
|
|
184
|
+
if (resolved && samePath(resolved, projectConfigRoot))
|
|
185
|
+
return resolved;
|
|
186
|
+
}
|
|
187
|
+
return undefined;
|
|
188
|
+
}
|
|
189
|
+
function assertScheduleRoot(root, projectCwd, create) {
|
|
190
|
+
if (!projectCwd) {
|
|
191
|
+
if (create)
|
|
192
|
+
fs.mkdirSync(root, { recursive: true, mode: 0o700 });
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
let projectPath;
|
|
196
|
+
try {
|
|
197
|
+
projectPath = fs.realpathSync.native(projectCwd);
|
|
198
|
+
}
|
|
199
|
+
catch (error) {
|
|
200
|
+
if (!create && error.code === "ENOENT")
|
|
201
|
+
return;
|
|
202
|
+
throw error;
|
|
203
|
+
}
|
|
204
|
+
let existing = root;
|
|
205
|
+
while (!fs.existsSync(existing)) {
|
|
206
|
+
const parent = path.dirname(existing);
|
|
207
|
+
if (parent === existing)
|
|
208
|
+
break;
|
|
209
|
+
existing = parent;
|
|
210
|
+
}
|
|
211
|
+
const existingPath = fs.realpathSync.native(existing);
|
|
212
|
+
const sharedGitConfigRoot = pathWithin(projectPath, existingPath) ? undefined : resolveSharedGitConfigRoot(projectCwd);
|
|
213
|
+
const isTrustedPath = (candidate) => pathWithin(projectPath, candidate)
|
|
214
|
+
|| (sharedGitConfigRoot !== undefined && pathWithin(sharedGitConfigRoot, candidate));
|
|
215
|
+
if (!isTrustedPath(existingPath))
|
|
216
|
+
throw new Error(`Project schedule root '${root}' resolves outside the real project.`);
|
|
217
|
+
if (!create)
|
|
218
|
+
return;
|
|
219
|
+
fs.mkdirSync(root, { recursive: true, mode: 0o700 });
|
|
220
|
+
if (!isTrustedPath(fs.realpathSync.native(root)))
|
|
221
|
+
throw new Error(`Project schedule root '${root}' resolves outside the real project.`);
|
|
222
|
+
}
|
|
223
|
+
function scheduleDir(root, id, create = false, projectCwd) {
|
|
224
|
+
assertScheduleRoot(root, projectCwd, create);
|
|
225
|
+
const dir = path.join(root, validateScheduleId(id));
|
|
226
|
+
try {
|
|
227
|
+
const stat = fs.lstatSync(dir);
|
|
228
|
+
if (stat.isSymbolicLink() || !stat.isDirectory())
|
|
229
|
+
throw new Error(`Schedule path '${dir}' must be a real directory.`);
|
|
230
|
+
}
|
|
231
|
+
catch (error) {
|
|
232
|
+
if (error.code !== "ENOENT")
|
|
233
|
+
throw error;
|
|
234
|
+
if (!create)
|
|
235
|
+
return dir;
|
|
236
|
+
fs.mkdirSync(dir, { mode: 0o700 });
|
|
237
|
+
}
|
|
238
|
+
const rootPath = fs.realpathSync.native(root);
|
|
239
|
+
const dirPath = fs.realpathSync.native(dir);
|
|
240
|
+
if (!samePath(dirPath, path.join(rootPath, id)))
|
|
241
|
+
throw new Error(`Schedule path '${dir}' escapes the project schedule root.`);
|
|
242
|
+
return dir;
|
|
243
|
+
}
|
|
244
|
+
function readJson(file, label) {
|
|
245
|
+
try {
|
|
246
|
+
return JSON.parse(fs.readFileSync(file, "utf-8"));
|
|
247
|
+
}
|
|
248
|
+
catch (error) {
|
|
249
|
+
throw new Error(`Failed to read ${label} '${file}': ${error instanceof Error ? error.message : String(error)}`, { cause: error instanceof Error ? error : undefined });
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
function parseScheduleTarget(value, file) {
|
|
253
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
254
|
+
throw new Error(`Schedule record '${file}' has invalid trigger or target.`);
|
|
255
|
+
const target = value;
|
|
256
|
+
if (typeof target.workflowScript === "string" && target.workflowScript.trim()) {
|
|
257
|
+
let baseRef;
|
|
258
|
+
let missionId;
|
|
259
|
+
try {
|
|
260
|
+
baseRef = normalizeWorktreeBaseRef(target.baseRef);
|
|
261
|
+
}
|
|
262
|
+
catch (error) {
|
|
263
|
+
throw new Error(`Schedule record '${file}' has an invalid baseRef: ${error instanceof Error ? error.message : String(error)}`);
|
|
264
|
+
}
|
|
265
|
+
try {
|
|
266
|
+
missionId = target.missionId === undefined ? undefined : validateMissionId(target.missionId);
|
|
267
|
+
}
|
|
268
|
+
catch (error) {
|
|
269
|
+
throw new Error(`Schedule record '${file}' has an invalid missionId: ${error instanceof Error ? error.message : String(error)}`);
|
|
270
|
+
}
|
|
271
|
+
const normalizedArgs = normalizeWorkflowArgs(target.args);
|
|
272
|
+
if ("error" in normalizedArgs)
|
|
273
|
+
throw new Error(`Schedule record '${file}' has invalid args: ${normalizedArgs.error}`);
|
|
274
|
+
return { workflowScript: target.workflowScript.trim(), args: deepFreezeWorkflowArgs(normalizedArgs.args), ...(baseRef === undefined ? {} : { baseRef }), ...(missionId === undefined ? {} : { missionId }) };
|
|
275
|
+
}
|
|
276
|
+
if (target.agent !== undefined || target.task !== undefined)
|
|
277
|
+
throw new Error(`Schedule record '${file}' uses a removed legacy agent target; recreate it with schedule.create and workflow: true or a workflow script path.`);
|
|
278
|
+
throw new Error(`Schedule record '${file}' requires a workflowScript target.`);
|
|
279
|
+
}
|
|
280
|
+
function parseSchedule(value, file) {
|
|
281
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
282
|
+
throw new Error(`Schedule record '${file}' must be a JSON object.`);
|
|
283
|
+
const record = value;
|
|
284
|
+
if ((record.schemaVersion !== 1 && record.schemaVersion !== 2) || typeof record.id !== "string" || typeof record.name !== "string" || typeof record.cwd !== "string" || typeof record.createdAt !== "string" || typeof record.updatedAt !== "string" || typeof record.paused !== "boolean")
|
|
285
|
+
throw new Error(`Schedule record '${file}' has invalid required fields.`);
|
|
286
|
+
validateScheduleId(record.id);
|
|
287
|
+
if (!record.trigger || typeof record.trigger !== "object" || !record.target || typeof record.target !== "object")
|
|
288
|
+
throw new Error(`Schedule record '${file}' has invalid trigger or target.`);
|
|
289
|
+
if (record.overlap !== "skip" || (record.catchUp !== "none" && record.catchUp !== "latest"))
|
|
290
|
+
throw new Error(`Schedule record '${file}' has unsupported policy fields.`);
|
|
291
|
+
if (record.trigger.kind === "once") {
|
|
292
|
+
if (typeof record.trigger.at !== "string" || (record.trigger.nextRunAt !== undefined && typeof record.trigger.nextRunAt !== "string"))
|
|
293
|
+
throw new Error(`Schedule record '${file}' has an invalid one-shot trigger.`);
|
|
294
|
+
}
|
|
295
|
+
else if (record.trigger.kind === "interval") {
|
|
296
|
+
if (typeof record.trigger.every !== "string" || typeof record.trigger.everyMs !== "number" || typeof record.trigger.anchorAt !== "string" || typeof record.trigger.nextRunAt !== "string")
|
|
297
|
+
throw new Error(`Schedule record '${file}' has an invalid interval trigger.`);
|
|
298
|
+
}
|
|
299
|
+
else if (record.trigger.kind === "calendar") {
|
|
300
|
+
restoreCalendarTrigger(record.trigger); // Validate without rewriting during read-only list/show.
|
|
301
|
+
}
|
|
302
|
+
else
|
|
303
|
+
throw new Error(`Schedule record '${file}' has an unsupported trigger.`);
|
|
304
|
+
if (record.sessionOnly !== undefined && typeof record.sessionOnly !== "boolean")
|
|
305
|
+
throw new Error(`Schedule record '${file}' has invalid sessionOnly.`);
|
|
306
|
+
if (record.quiet !== undefined && typeof record.quiet !== "boolean")
|
|
307
|
+
throw new Error(`Schedule record '${file}' has invalid quiet.`);
|
|
308
|
+
if (record.sessionOnly === true && (typeof record.ownerSessionFile !== "string" || !record.ownerSessionFile.trim()))
|
|
309
|
+
throw new Error(`Schedule record '${file}' is session-only but has no owner session file.`);
|
|
310
|
+
const target = parseScheduleTarget(record.target, file);
|
|
311
|
+
if ((record.schemaVersion === 2) !== (target.missionId !== undefined))
|
|
312
|
+
throw new Error(`Schedule record '${file}' requires schemaVersion 2 exactly when missionId is present.`);
|
|
313
|
+
return { ...record, target };
|
|
314
|
+
}
|
|
315
|
+
class ScheduleStore {
|
|
316
|
+
root;
|
|
317
|
+
projectCwd;
|
|
318
|
+
constructor(root, projectCwd) {
|
|
319
|
+
this.root = root;
|
|
320
|
+
this.projectCwd = projectCwd;
|
|
321
|
+
}
|
|
322
|
+
directory(id, create = false) {
|
|
323
|
+
return scheduleDir(this.root, id, create, this.projectCwd);
|
|
324
|
+
}
|
|
325
|
+
ids() {
|
|
326
|
+
assertScheduleRoot(this.root, this.projectCwd, false);
|
|
327
|
+
if (!fs.existsSync(this.root))
|
|
328
|
+
return [];
|
|
329
|
+
return fs.readdirSync(this.root, { withFileTypes: true })
|
|
330
|
+
.filter((entry) => entry.isDirectory() && SCHEDULE_ID.test(entry.name))
|
|
331
|
+
.map((entry) => entry.name);
|
|
332
|
+
}
|
|
333
|
+
list() {
|
|
334
|
+
return this.ids().map((id) => this.find(id)).filter((record) => record !== undefined);
|
|
335
|
+
}
|
|
336
|
+
get(id) {
|
|
337
|
+
const record = this.find(id);
|
|
338
|
+
if (!record)
|
|
339
|
+
throw new Error(`Schedule '${id}' not found.`);
|
|
340
|
+
return record;
|
|
341
|
+
}
|
|
342
|
+
/** Like {@link get}, but returns undefined when the schedule no longer exists. */
|
|
343
|
+
find(id) {
|
|
344
|
+
const file = path.join(scheduleDir(this.root, id, false, this.projectCwd), "schedule.json");
|
|
345
|
+
if (!fs.existsSync(file))
|
|
346
|
+
return undefined;
|
|
347
|
+
return parseSchedule(readJson(file, "schedule record"), file);
|
|
348
|
+
}
|
|
349
|
+
write(record) {
|
|
350
|
+
writePrivateAtomicJson(path.join(scheduleDir(this.root, record.id, true, this.projectCwd), "schedule.json"), record);
|
|
351
|
+
}
|
|
352
|
+
delete(id) {
|
|
353
|
+
fs.rmSync(scheduleDir(this.root, id, false, this.projectCwd), { recursive: true, force: true });
|
|
354
|
+
}
|
|
355
|
+
history(id) {
|
|
356
|
+
const file = path.join(scheduleDir(this.root, id, false, this.projectCwd), "history.json");
|
|
357
|
+
if (!fs.existsSync(file))
|
|
358
|
+
return [];
|
|
359
|
+
const value = readJson(file, "schedule history");
|
|
360
|
+
if (value?.schemaVersion !== 1 || !Array.isArray(value.runs))
|
|
361
|
+
throw new Error(`Schedule history '${file}' has invalid fields.`);
|
|
362
|
+
return value.runs;
|
|
363
|
+
}
|
|
364
|
+
/** The run's own receipt; it is written before history.json and is never trimmed. */
|
|
365
|
+
getRun(id, runId) {
|
|
366
|
+
if (!SCHEDULE_ID.test(runId))
|
|
367
|
+
throw new Error(`Invalid schedule run id '${runId}'.`);
|
|
368
|
+
const file = path.join(scheduleDir(this.root, id, false, this.projectCwd), "runs", `${runId}.json`);
|
|
369
|
+
if (!fs.existsSync(file))
|
|
370
|
+
return undefined;
|
|
371
|
+
const run = readJson(file, "schedule run");
|
|
372
|
+
if (run?.id !== runId || run.scheduleId !== id)
|
|
373
|
+
throw new Error(`Schedule run '${file}' has invalid fields.`);
|
|
374
|
+
return run;
|
|
375
|
+
}
|
|
376
|
+
writeRun(schedule, run, event) {
|
|
377
|
+
const dir = scheduleDir(this.root, schedule.id, true, this.projectCwd);
|
|
378
|
+
writePrivateAtomicJson(path.join(dir, "runs", `${run.id}.json`), run);
|
|
379
|
+
// Sessions sharing this project update history.json from their own snapshots.
|
|
380
|
+
withFileLease(path.join(dir, "history.json"), () => {
|
|
381
|
+
// An earlier update may have timed out; a run's own receipt is newer than a "running" entry.
|
|
382
|
+
const earlier = this.history(schedule.id).filter((item) => item.id !== run.id)
|
|
383
|
+
.map((item) => item.state === "running" ? this.getRun(schedule.id, item.id) ?? item : item);
|
|
384
|
+
const runs = [run, ...earlier].slice(0, MAX_HISTORY);
|
|
385
|
+
writePrivateAtomicJson(path.join(dir, "history.json"), { schemaVersion: 1, runs });
|
|
386
|
+
fs.appendFileSync(path.join(dir, "events.jsonl"), `${JSON.stringify({ schemaVersion: 1, timestamp: new Date().toISOString(), event, scheduleId: schedule.id, runId: run.id, state: run.state })}\n`, { encoding: "utf-8", mode: 0o600 });
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
appendEvent(schedule, event) {
|
|
390
|
+
const dir = scheduleDir(this.root, schedule.id, true, this.projectCwd);
|
|
391
|
+
fs.mkdirSync(dir, { recursive: true, mode: 0o700 });
|
|
392
|
+
fs.appendFileSync(path.join(dir, "events.jsonl"), `${JSON.stringify({ schemaVersion: 1, timestamp: new Date().toISOString(), event, scheduleId: schedule.id })}\n`, { encoding: "utf-8", mode: 0o600 });
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
function resolveMaxPending(config) {
|
|
396
|
+
const value = config.scheduledRuns?.maxPending;
|
|
397
|
+
return typeof value === "number" && Number.isInteger(value) && value >= 1 ? value : DEFAULT_MAX_PENDING;
|
|
398
|
+
}
|
|
399
|
+
function hasPendingScheduleWork(schedule) {
|
|
400
|
+
return schedule.activeRunId !== undefined || schedule.trigger.nextRunAt !== undefined;
|
|
401
|
+
}
|
|
402
|
+
function nextAfter(trigger, plannedAt, now) {
|
|
403
|
+
if (trigger.kind === "once")
|
|
404
|
+
return { ...trigger, nextRunAt: undefined };
|
|
405
|
+
if (trigger.kind === "calendar")
|
|
406
|
+
return {
|
|
407
|
+
...trigger,
|
|
408
|
+
...nextCalendarOccurrence(trigger, Math.max(plannedAt, now), calendarDateAfter(trigger, plannedAt, trigger.nextLocalDate)),
|
|
409
|
+
};
|
|
410
|
+
const next = plannedAt + (Math.floor(Math.max(0, now - plannedAt) / trigger.everyMs) + 1) * trigger.everyMs;
|
|
411
|
+
return { ...trigger, nextRunAt: timestamp(next) };
|
|
412
|
+
}
|
|
413
|
+
function nextRunAt(schedule) {
|
|
414
|
+
const value = schedule.trigger.nextRunAt;
|
|
415
|
+
if (!value)
|
|
416
|
+
return undefined;
|
|
417
|
+
const parsed = Date.parse(value);
|
|
418
|
+
if (!Number.isFinite(parsed))
|
|
419
|
+
throw new Error(`Schedule '${schedule.id}' has invalid nextRunAt.`);
|
|
420
|
+
return parsed;
|
|
421
|
+
}
|
|
422
|
+
function duePlannedAt(schedule, now) {
|
|
423
|
+
const next = nextRunAt(schedule);
|
|
424
|
+
if (next === undefined || next > now || schedule.catchUp !== "latest")
|
|
425
|
+
return next;
|
|
426
|
+
if (schedule.trigger.kind === "calendar")
|
|
427
|
+
return Date.parse(latestCalendarOccurrence(schedule.trigger, now, schedule.trigger.nextLocalDate).nextRunAt);
|
|
428
|
+
if (schedule.trigger.kind === "interval")
|
|
429
|
+
return next + Math.floor((now - next) / schedule.trigger.everyMs) * schedule.trigger.everyMs;
|
|
430
|
+
return next;
|
|
431
|
+
}
|
|
432
|
+
function triggerLabel(trigger) {
|
|
433
|
+
if (trigger.kind === "calendar")
|
|
434
|
+
return `every ${trigger.every}${trigger.on ? ` (${trigger.on.join(", ")})` : ""} at ${trigger.at} ${trigger.timezone}`;
|
|
435
|
+
return trigger.kind === "once" ? `at ${trigger.at}` : `every ${trigger.every}`;
|
|
436
|
+
}
|
|
437
|
+
function textResult(text, schedules, runs, isError = false) {
|
|
438
|
+
const publicSchedules = schedules?.map(publicScheduleRecord);
|
|
439
|
+
return {
|
|
440
|
+
content: [{ type: "text", text }],
|
|
441
|
+
...(isError ? { isError: true } : {}),
|
|
442
|
+
details: { mode: "management", results: [], schedules: { ...(publicSchedules ? { records: publicSchedules } : {}), ...(runs ? { runs } : {}) } },
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
function publicScheduleRecord(schedule) {
|
|
446
|
+
const { ownerSessionFile: _ownerSessionFile, ...rest } = schedule;
|
|
447
|
+
return rest;
|
|
448
|
+
}
|
|
449
|
+
function targetLabel(target) {
|
|
450
|
+
const preview = previewSimpleWorkflowRun(target.workflowScript);
|
|
451
|
+
return preview?.agent ? `workflow -> agent ${preview.agent}` : "workflow (dynamic)";
|
|
452
|
+
}
|
|
453
|
+
function sanitizeTarget(params) {
|
|
454
|
+
if (params.tasks || params.chain)
|
|
455
|
+
return { error: "Recurring schedules require a workflow script; legacy tasks and chain inputs are unsupported." };
|
|
456
|
+
if (params.agent !== undefined || params.task !== undefined)
|
|
457
|
+
return { error: "schedule.create requires workflow: true or a workflow script path, e.g. a ```js workflow block containing return runs.run('main', { agent, task })." };
|
|
458
|
+
if (typeof params.workflowScript !== "string" || !params.workflowScript.trim())
|
|
459
|
+
return { error: "schedule.create requires workflow: true or a workflow script path." };
|
|
460
|
+
if (params.context === "fork")
|
|
461
|
+
return { error: "Scheduled runs require fresh context." };
|
|
462
|
+
if (params.async === false)
|
|
463
|
+
return { error: "Scheduled runs are always async." };
|
|
464
|
+
let baseRef;
|
|
465
|
+
let missionId;
|
|
466
|
+
try {
|
|
467
|
+
baseRef = normalizeWorktreeBaseRef(params.baseRef);
|
|
468
|
+
missionId = params.missionId === undefined ? undefined : validateMissionId(params.missionId);
|
|
469
|
+
}
|
|
470
|
+
catch (error) {
|
|
471
|
+
return { error: error instanceof Error ? error.message : String(error) };
|
|
472
|
+
}
|
|
473
|
+
const acceptanceErrors = validateExecutionAcceptance(params);
|
|
474
|
+
if (acceptanceErrors.length)
|
|
475
|
+
return { error: acceptanceErrors.join(" ") };
|
|
476
|
+
const normalizedArgs = normalizeWorkflowArgs(params.args);
|
|
477
|
+
if ("error" in normalizedArgs)
|
|
478
|
+
return { error: normalizedArgs.error };
|
|
479
|
+
return { target: { workflowScript: params.workflowScript.trim(), args: deepFreezeWorkflowArgs(normalizedArgs.args), ...(baseRef === undefined ? {} : { baseRef }), ...(missionId === undefined ? {} : { missionId }) } };
|
|
480
|
+
}
|
|
481
|
+
function executionParams(schedule, quiet = false) {
|
|
482
|
+
return {
|
|
483
|
+
...schedule.target,
|
|
484
|
+
async: true,
|
|
485
|
+
context: "fresh",
|
|
486
|
+
cwd: schedule.cwd,
|
|
487
|
+
...(schedule.target.missionId === undefined ? { mission: false } : {}),
|
|
488
|
+
// Scheduled fires have no operator watching, so completions must name the origin.
|
|
489
|
+
scheduleOrigin: { id: schedule.id, ...(schedule.name ? { name: schedule.name } : {}), ...(quiet ? { quiet: true } : {}) },
|
|
490
|
+
...(schedule.timeoutMs === undefined ? {} : { timeoutMs: schedule.timeoutMs }),
|
|
491
|
+
};
|
|
492
|
+
}
|
|
493
|
+
function snapshotContext(ctx, cwd) {
|
|
494
|
+
const source = ctx.sessionManager;
|
|
495
|
+
const sessionId = source.getSessionId();
|
|
496
|
+
const sessionFile = source.getSessionFile();
|
|
497
|
+
const sessionManager = new Proxy(source, {
|
|
498
|
+
get(target, property) {
|
|
499
|
+
if (property === "getSessionId")
|
|
500
|
+
return () => sessionId;
|
|
501
|
+
if (property === "getSessionFile")
|
|
502
|
+
return () => sessionFile;
|
|
503
|
+
const value = Reflect.get(target, property, target);
|
|
504
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
505
|
+
},
|
|
506
|
+
});
|
|
507
|
+
return { ...ctx, cwd, sessionManager };
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* 规范化会话文件路径, 兼容 Windows 路径大小写差异.
|
|
511
|
+
*
|
|
512
|
+
* @param value 会话文件路径
|
|
513
|
+
* @returns 规范化后的路径, 空值时返回 undefined
|
|
514
|
+
*/
|
|
515
|
+
function normalizedSessionFile(value) {
|
|
516
|
+
if (!value || !value.trim())
|
|
517
|
+
return undefined;
|
|
518
|
+
const normalized = path.normalize(path.resolve(value));
|
|
519
|
+
return process.platform === "win32" ? normalized.toLowerCase() : normalized;
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* 判断 Schedule 是否属于当前 Pi 会话.
|
|
523
|
+
*
|
|
524
|
+
* @param schedule Schedule 记录
|
|
525
|
+
* @param ctx 当前 Pi 会话上下文
|
|
526
|
+
* @returns 是否允许当前会话执行该 Schedule
|
|
527
|
+
*/
|
|
528
|
+
function scheduleBelongsToSession(schedule, ctx) {
|
|
529
|
+
if (schedule.sessionOnly !== true)
|
|
530
|
+
return true;
|
|
531
|
+
const ownerSessionFile = normalizedSessionFile(schedule.ownerSessionFile);
|
|
532
|
+
const currentSessionFile = normalizedSessionFile(ctx.sessionManager.getSessionFile());
|
|
533
|
+
return ownerSessionFile !== undefined && ownerSessionFile === currentSessionFile;
|
|
534
|
+
}
|
|
535
|
+
export function listScheduledRunSummaries(cwd, root) {
|
|
536
|
+
return new ScheduleStore(scheduledRunStorePath(cwd, undefined, root), root === undefined ? path.resolve(cwd) : undefined).list();
|
|
537
|
+
}
|
|
538
|
+
export class ScheduledRunManager {
|
|
539
|
+
store;
|
|
540
|
+
stores = new Map();
|
|
541
|
+
contexts = new Map();
|
|
542
|
+
timers = new Map();
|
|
543
|
+
observedAsyncIds = new Set();
|
|
544
|
+
now;
|
|
545
|
+
randomId;
|
|
546
|
+
timersApi;
|
|
547
|
+
deps;
|
|
548
|
+
constructor(deps) {
|
|
549
|
+
this.deps = deps;
|
|
550
|
+
this.now = deps.now ?? Date.now;
|
|
551
|
+
this.randomId = deps.randomId ?? (() => randomUUID().slice(0, 8));
|
|
552
|
+
this.timersApi = deps.timers ?? globalThis;
|
|
553
|
+
}
|
|
554
|
+
bindSession(ctx) {
|
|
555
|
+
if (!scheduledRunsEnabled(this.deps.config))
|
|
556
|
+
return;
|
|
557
|
+
this.selectProject(ctx.cwd, ctx);
|
|
558
|
+
}
|
|
559
|
+
stop() {
|
|
560
|
+
this.stopTimers();
|
|
561
|
+
this.store = undefined;
|
|
562
|
+
this.stores.clear();
|
|
563
|
+
this.contexts.clear();
|
|
564
|
+
this.observedAsyncIds.clear();
|
|
565
|
+
}
|
|
566
|
+
async handleToolCall(params, ctx) {
|
|
567
|
+
try {
|
|
568
|
+
if (!scheduledRunsEnabled(this.deps.config))
|
|
569
|
+
return textResult("Scheduled runs are disabled by scheduledRuns.enabled=false.", undefined, undefined, true);
|
|
570
|
+
this.selectProject(params.cwd ?? ctx.cwd, ctx);
|
|
571
|
+
switch (params.action) {
|
|
572
|
+
case "schedule.create": return this.create(params, ctx);
|
|
573
|
+
case "schedule.list": return this.list();
|
|
574
|
+
case "schedule.show": return this.show(params);
|
|
575
|
+
case "schedule.history": return this.history(params);
|
|
576
|
+
case "schedule.pause": return this.pause(params, true);
|
|
577
|
+
case "schedule.resume": return this.pause(params, false);
|
|
578
|
+
case "schedule.run": return await this.runManual(params);
|
|
579
|
+
case "schedule.run-due": return await this.runDue();
|
|
580
|
+
case "schedule.delete": return this.remove(params);
|
|
581
|
+
default: return textResult(`Unknown schedule action: ${params.action}`, undefined, undefined, true);
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
catch (error) {
|
|
585
|
+
return textResult(error instanceof Error ? error.message : String(error), undefined, undefined, true);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
observedCompletionRunIds() {
|
|
589
|
+
return new Set(this.observedAsyncIds);
|
|
590
|
+
}
|
|
591
|
+
referencedAsyncRunIds() {
|
|
592
|
+
const runIds = new Set(this.observedAsyncIds);
|
|
593
|
+
for (const store of this.stores.values()) {
|
|
594
|
+
for (const scheduleId of store.ids()) {
|
|
595
|
+
for (const run of store.history(scheduleId)) {
|
|
596
|
+
if (run.asyncId)
|
|
597
|
+
runIds.add(run.asyncId);
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
return runIds;
|
|
602
|
+
}
|
|
603
|
+
handleAsyncCompletion(payload) {
|
|
604
|
+
if (!payload || typeof payload !== "object")
|
|
605
|
+
return;
|
|
606
|
+
const data = payload;
|
|
607
|
+
const asyncId = typeof data.runId === "string" ? data.runId : typeof data.id === "string" ? data.id : undefined;
|
|
608
|
+
if (!asyncId)
|
|
609
|
+
return;
|
|
610
|
+
for (const store of this.stores.values()) {
|
|
611
|
+
let ids;
|
|
612
|
+
try {
|
|
613
|
+
ids = store.ids();
|
|
614
|
+
}
|
|
615
|
+
catch (error) {
|
|
616
|
+
console.error(`Failed to inspect schedule store '${store.root}' during async completion:`, error);
|
|
617
|
+
continue;
|
|
618
|
+
}
|
|
619
|
+
for (const id of ids) {
|
|
620
|
+
try {
|
|
621
|
+
const schedule = store.get(id);
|
|
622
|
+
const listed = store.history(id).find((item) => item.asyncId === asyncId) ?? this.activeRun(store, schedule);
|
|
623
|
+
// history.json can lag the run's receipt when its update timed out.
|
|
624
|
+
const run = listed && (store.getRun(id, listed.id) ?? listed);
|
|
625
|
+
if (run?.asyncId !== asyncId || run.state !== "running")
|
|
626
|
+
continue;
|
|
627
|
+
this.finishRun(store, schedule, run, data.success === true, typeof data.summary === "string" ? data.summary : undefined);
|
|
628
|
+
return;
|
|
629
|
+
}
|
|
630
|
+
catch (error) {
|
|
631
|
+
console.error(`Failed to inspect schedule '${id}' in '${store.root}' during async completion:`, error);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
create(params, ctx) {
|
|
637
|
+
const store = this.requireStore();
|
|
638
|
+
const target = sanitizeTarget(params);
|
|
639
|
+
if (target.error)
|
|
640
|
+
return textResult(target.error, undefined, undefined, true);
|
|
641
|
+
const at = params.at?.trim();
|
|
642
|
+
const every = params.every?.trim();
|
|
643
|
+
const calendar = every === "day" || every === "week";
|
|
644
|
+
if (!calendar && Boolean(at) === Boolean(every))
|
|
645
|
+
return textResult("schedule.create requires exactly one trigger: at or every.", undefined, undefined, true);
|
|
646
|
+
if (params.overlap !== undefined && params.overlap !== "skip")
|
|
647
|
+
return textResult("This first recurring slice supports overlap='skip' only.", undefined, undefined, true);
|
|
648
|
+
if (params.catchUp !== undefined && params.catchUp !== "none" && params.catchUp !== "latest")
|
|
649
|
+
return textResult("catchUp must be 'none' or 'latest'.", undefined, undefined, true);
|
|
650
|
+
if (params.mission !== undefined || params.missionUpdate !== undefined || params.missionStatus !== undefined || params.missionScope !== undefined)
|
|
651
|
+
return textResult("Schedules accept only an existing missionId; mission creation and updates are unsupported.", undefined, undefined, true);
|
|
652
|
+
if (!calendar && (params.on !== undefined || params.timezone !== undefined))
|
|
653
|
+
return textResult("on and timezone require every:'day' or every:'week'.", undefined, undefined, true);
|
|
654
|
+
if (params.quiet !== undefined && typeof params.quiet !== "boolean")
|
|
655
|
+
return textResult("quiet must be a boolean.", undefined, undefined, true);
|
|
656
|
+
if (!calendar && at && params.quiet === true)
|
|
657
|
+
return textResult("quiet is only supported for recurring schedules.", undefined, undefined, true);
|
|
658
|
+
const sessionOnly = params.sessionOnly === true;
|
|
659
|
+
if (sessionOnly && params.cwd !== undefined && !samePath(params.cwd, ctx.cwd))
|
|
660
|
+
return textResult("sessionOnly schedules cannot use an explicit cross-project cwd.", undefined, undefined, true);
|
|
661
|
+
const ownerSessionFile = sessionOnly ? ctx.sessionManager.getSessionFile() : undefined;
|
|
662
|
+
if (sessionOnly && !ownerSessionFile)
|
|
663
|
+
return textResult("sessionOnly schedules require a persisted current session.", undefined, undefined, true);
|
|
664
|
+
if (target.target.missionId !== undefined) {
|
|
665
|
+
readMission(resolveMissionStoreLocation({ projectRoot: path.resolve(params.cwd ?? ctx.cwd), ...(this.deps.config.missions ? { config: this.deps.config.missions } : {}) }), target.target.missionId);
|
|
666
|
+
}
|
|
667
|
+
const sessionId = ctx.sessionManager.getSessionId() ?? "unknown";
|
|
668
|
+
if (this.deps.resolveCapabilityCeiling?.(sessionId))
|
|
669
|
+
return textResult("Cannot persist a schedule while a capability ceiling is active.", undefined, undefined, true);
|
|
670
|
+
const pendingCount = store.list().filter(hasPendingScheduleWork).length;
|
|
671
|
+
const maxPending = resolveMaxPending(this.deps.config);
|
|
672
|
+
if (pendingCount >= maxPending)
|
|
673
|
+
return textResult(`Schedule limit reached (${maxPending}).`, undefined, undefined, true);
|
|
674
|
+
const id = validateScheduleId((params.id?.trim() || this.randomId()));
|
|
675
|
+
if (store.ids().includes(id))
|
|
676
|
+
return textResult(`Schedule '${id}' already exists.`, undefined, undefined, true);
|
|
677
|
+
const now = this.now();
|
|
678
|
+
let trigger;
|
|
679
|
+
if (calendar) {
|
|
680
|
+
const rule = normalizeCalendarRule({ every, at, on: params.on, timezone: params.timezone });
|
|
681
|
+
trigger = { kind: "calendar", ...rule, ...nextCalendarOccurrence(rule, now) };
|
|
682
|
+
}
|
|
683
|
+
else if (at) {
|
|
684
|
+
const planned = parseScheduledRunTime(at, now);
|
|
685
|
+
trigger = { kind: "once", at, nextRunAt: timestamp(planned) };
|
|
686
|
+
}
|
|
687
|
+
else {
|
|
688
|
+
const everyMs = parseScheduleInterval(every);
|
|
689
|
+
trigger = { kind: "interval", every: every, everyMs, anchorAt: timestamp(now), nextRunAt: timestamp(now + everyMs) };
|
|
690
|
+
}
|
|
691
|
+
const schedule = {
|
|
692
|
+
// Older readers ignore unknown target fields; they must reject mission-bound definitions.
|
|
693
|
+
schemaVersion: target.target.missionId === undefined ? 1 : 2,
|
|
694
|
+
id,
|
|
695
|
+
name: params.name?.trim() || targetLabel(target.target),
|
|
696
|
+
cwd: path.resolve(params.cwd ?? ctx.cwd),
|
|
697
|
+
trigger,
|
|
698
|
+
target: target.target,
|
|
699
|
+
overlap: "skip",
|
|
700
|
+
catchUp: params.catchUp ?? "latest",
|
|
701
|
+
...(params.timeoutMs === undefined ? {} : { timeoutMs: params.timeoutMs }),
|
|
702
|
+
paused: false,
|
|
703
|
+
...(sessionOnly ? { sessionOnly: true, ownerSessionFile: path.resolve(ownerSessionFile) } : {}),
|
|
704
|
+
...(trigger.kind !== "once" && params.quiet === true ? { quiet: true } : {}),
|
|
705
|
+
createdAt: timestamp(now),
|
|
706
|
+
updatedAt: timestamp(now),
|
|
707
|
+
};
|
|
708
|
+
store.write(schedule);
|
|
709
|
+
store.appendEvent(schedule, "schedule.created");
|
|
710
|
+
this.arm(schedule, store);
|
|
711
|
+
return textResult(`Created schedule ${id}.\nName: ${schedule.name}\nTrigger: ${triggerLabel(trigger)}\nSession only: ${schedule.sessionOnly === true ? "yes" : "no"}\nQuiet: ${schedule.quiet === true ? "yes" : "no"}\nNext: ${schedule.trigger.nextRunAt}\nTarget: ${targetLabel(schedule.target)}${schedule.target.missionId === undefined ? "" : `\nMission: ${schedule.target.missionId}`}`, [schedule]);
|
|
712
|
+
}
|
|
713
|
+
list() {
|
|
714
|
+
const schedules = this.requireStore().list().sort((a, b) => (a.trigger.nextRunAt ?? "").localeCompare(b.trigger.nextRunAt ?? ""));
|
|
715
|
+
if (!schedules.length)
|
|
716
|
+
return textResult("No project schedules.", []);
|
|
717
|
+
return textResult([`Project schedules: ${schedules.length}`, ...schedules.map((item) => `- ${item.id} | ${item.paused ? "paused" : item.activeRunId ? "running" : "scheduled"} | ${item.trigger.nextRunAt ?? "no next run"} | ${item.sessionOnly === true ? "session-only" : "project"} | ${item.name}${item.target.missionId === undefined ? "" : ` | mission ${item.target.missionId}`}`)].join("\n"), schedules);
|
|
718
|
+
}
|
|
719
|
+
show(params) {
|
|
720
|
+
const schedule = this.resolve(params);
|
|
721
|
+
return textResult([`Schedule: ${schedule.id}`, `Name: ${schedule.name}`, `State: ${schedule.paused ? "paused" : schedule.activeRunId ? "running" : "scheduled"}`, `Session only: ${schedule.sessionOnly === true ? "yes" : "no"}`, `Quiet: ${schedule.quiet === true ? "yes" : "no"}`, `Target: ${targetLabel(schedule.target)}`, schedule.target.missionId === undefined ? undefined : `Mission: ${schedule.target.missionId}`, `CWD: ${shortenPath(schedule.cwd)}`, `Trigger: ${triggerLabel(schedule.trigger)}`, `Next: ${schedule.trigger.nextRunAt ?? "none"}`, `Catch up: ${schedule.catchUp}`, schedule.activeRunId ? `Active run: ${schedule.activeRunId}` : undefined].filter(Boolean).join("\n"), [schedule]);
|
|
722
|
+
}
|
|
723
|
+
history(params) {
|
|
724
|
+
const schedule = this.resolve(params);
|
|
725
|
+
const runs = this.requireStore().history(schedule.id);
|
|
726
|
+
return textResult(runs.length ? [`Schedule history: ${schedule.id}`, ...runs.map((run) => `- ${run.id} | ${run.state} | ${run.plannedAt}${run.asyncId ? ` | async ${run.asyncId}` : ""}`)].join("\n") : `No runs recorded for schedule ${schedule.id}.`, [schedule], runs);
|
|
727
|
+
}
|
|
728
|
+
pause(params, paused) {
|
|
729
|
+
const schedule = this.resolve(params);
|
|
730
|
+
if (schedule.paused === paused)
|
|
731
|
+
return textResult(`Schedule ${schedule.id} is already ${paused ? "paused" : "active"}.`, [schedule]);
|
|
732
|
+
schedule.paused = paused;
|
|
733
|
+
schedule.updatedAt = timestamp(this.now());
|
|
734
|
+
this.requireStore().write(schedule);
|
|
735
|
+
this.requireStore().appendEvent(schedule, paused ? "schedule.paused" : "schedule.resumed");
|
|
736
|
+
const store = this.requireStore();
|
|
737
|
+
if (paused)
|
|
738
|
+
this.clearTimer(store, schedule.id);
|
|
739
|
+
else
|
|
740
|
+
this.restoreOne(store, schedule);
|
|
741
|
+
return textResult(`${paused ? "Paused" : "Resumed"} schedule ${schedule.id}.`, [schedule]);
|
|
742
|
+
}
|
|
743
|
+
async runManual(params) {
|
|
744
|
+
const store = this.requireStore();
|
|
745
|
+
const schedule = this.resolve(params);
|
|
746
|
+
const context = this.requireContext(store);
|
|
747
|
+
if (!scheduleBelongsToSession(schedule, context)) {
|
|
748
|
+
return textResult(`Skipped schedule ${schedule.id}: current session is not its owner.`, [schedule]);
|
|
749
|
+
}
|
|
750
|
+
if (params.quiet !== undefined && typeof params.quiet !== "boolean")
|
|
751
|
+
return textResult("quiet must be a boolean.", undefined, undefined, true);
|
|
752
|
+
const manualTrigger = schedule.trigger;
|
|
753
|
+
const run = await this.launch(store, schedule, this.now(), "manual", false, params.quiet === true);
|
|
754
|
+
const updated = store.get(schedule.id);
|
|
755
|
+
if (run.state === "running") {
|
|
756
|
+
const now = this.now();
|
|
757
|
+
if (updated.trigger.kind === "calendar") {
|
|
758
|
+
if (manualTrigger.kind !== "calendar")
|
|
759
|
+
throw new Error("Schedule trigger changed during manual launch.");
|
|
760
|
+
const consumed = latestCalendarOccurrence(manualTrigger, now, manualTrigger.nextLocalDate)?.nextRunAt ?? manualTrigger.nextRunAt;
|
|
761
|
+
const advanced = nextAfter(manualTrigger, Date.parse(consumed), now);
|
|
762
|
+
if (advanced.nextLocalDate > updated.trigger.nextLocalDate)
|
|
763
|
+
updated.trigger = advanced;
|
|
764
|
+
}
|
|
765
|
+
else if (updated.trigger.kind === "interval")
|
|
766
|
+
updated.trigger.nextRunAt = timestamp(now + updated.trigger.everyMs);
|
|
767
|
+
else
|
|
768
|
+
updated.trigger.nextRunAt = undefined;
|
|
769
|
+
updated.updatedAt = timestamp(now);
|
|
770
|
+
store.write(updated);
|
|
771
|
+
store.appendEvent(updated, "schedule.manual_satisfied");
|
|
772
|
+
this.arm(updated, store);
|
|
773
|
+
}
|
|
774
|
+
return textResult(`Manual schedule run ${run.id}: ${run.state}${run.asyncId ? ` (async ${run.asyncId})` : ""}.`, [store.get(schedule.id)], [run], run.state === "failed_launch");
|
|
775
|
+
}
|
|
776
|
+
async runDue() {
|
|
777
|
+
const store = this.requireStore();
|
|
778
|
+
const context = this.requireContext(store);
|
|
779
|
+
const due = store.list().filter((schedule) => scheduleBelongsToSession(schedule, context) && !schedule.paused && nextRunAt(schedule) !== undefined && nextRunAt(schedule) <= this.now());
|
|
780
|
+
const runs = [];
|
|
781
|
+
for (const schedule of due) {
|
|
782
|
+
const planned = duePlannedAt(schedule, this.now());
|
|
783
|
+
if (!schedule.activeRunId && schedule.catchUp === "none" && planned < this.now())
|
|
784
|
+
runs.push(this.recordMissed(store, schedule, planned, "run-due"));
|
|
785
|
+
else
|
|
786
|
+
runs.push(await this.launch(store, schedule, planned, "run-due", true));
|
|
787
|
+
}
|
|
788
|
+
return textResult(runs.length ? `Processed ${runs.length} due schedule(s).` : "No schedules are due.", store.list(), runs);
|
|
789
|
+
}
|
|
790
|
+
remove(params) {
|
|
791
|
+
const schedule = this.resolve(params);
|
|
792
|
+
const store = this.requireStore();
|
|
793
|
+
if (schedule.activeRunId) {
|
|
794
|
+
const run = this.activeRun(store, schedule);
|
|
795
|
+
let terminal = false;
|
|
796
|
+
if (run?.scheduleId === schedule.id && run.state === "running" && run.asyncId && run.asyncDir) {
|
|
797
|
+
const status = readJson(path.join(run.asyncDir, "status.json"), "async status");
|
|
798
|
+
terminal = status.runId === run.asyncId && typeof status.state === "string" && ["complete", "failed", "stopped", "rejected"].includes(status.state);
|
|
799
|
+
}
|
|
800
|
+
if (!terminal)
|
|
801
|
+
return textResult(`Schedule ${schedule.id} has active run ${schedule.activeRunId}; stop that run before deleting the schedule.`, [schedule], undefined, true);
|
|
802
|
+
}
|
|
803
|
+
this.clearTimer(store, schedule.id);
|
|
804
|
+
store.appendEvent(schedule, "schedule.deleted");
|
|
805
|
+
store.delete(schedule.id);
|
|
806
|
+
return textResult(`Deleted schedule ${schedule.id}.`);
|
|
807
|
+
}
|
|
808
|
+
restore(store) {
|
|
809
|
+
for (const schedule of store.list())
|
|
810
|
+
this.restoreOne(store, schedule);
|
|
811
|
+
}
|
|
812
|
+
restoreOne(store, schedule, notBefore, rearm = true) {
|
|
813
|
+
if (!scheduleBelongsToSession(schedule, this.requireContext(store)))
|
|
814
|
+
return;
|
|
815
|
+
if (schedule.trigger.kind === "calendar") {
|
|
816
|
+
const refreshed = restoreCalendarTrigger(schedule.trigger);
|
|
817
|
+
if (JSON.stringify(refreshed) !== JSON.stringify(schedule.trigger)) {
|
|
818
|
+
schedule.trigger = refreshed;
|
|
819
|
+
schedule.updatedAt = timestamp(this.now());
|
|
820
|
+
store.write(schedule);
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
if (schedule.activeRunId) {
|
|
824
|
+
const run = this.activeRun(store, schedule);
|
|
825
|
+
if (run?.state === "running" && run.asyncId)
|
|
826
|
+
this.observedAsyncIds.add(run.asyncId);
|
|
827
|
+
const startedAt = run?.startedAt ? Date.parse(run.startedAt) : Number.NaN;
|
|
828
|
+
if (run?.state === "running" && run.asyncDir) {
|
|
829
|
+
try {
|
|
830
|
+
const status = readJson(path.join(run.asyncDir, "status.json"), "async status");
|
|
831
|
+
if (["complete", "failed", "stopped", "rejected"].includes(String(status.state)))
|
|
832
|
+
this.finishRun(store, schedule, run, status.state === "complete", typeof status.error === "string" ? status.error : undefined);
|
|
833
|
+
}
|
|
834
|
+
catch (error) {
|
|
835
|
+
if (error.code !== "ENOENT" && !(error instanceof Error && /ENOENT/.test(error.message)))
|
|
836
|
+
throw error;
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
if (schedule.activeRunId && (!run || run.state !== "running" || (!run.asyncId && Number.isFinite(startedAt) && startedAt + STALE_LAUNCH_CLAIM_MS <= this.now()))) {
|
|
840
|
+
if (run?.state === "running") {
|
|
841
|
+
run.state = "failed_launch";
|
|
842
|
+
run.completedAt = timestamp(this.now());
|
|
843
|
+
run.error = "Recovered a stale launch claim before an async run was attached.";
|
|
844
|
+
store.writeRun(schedule, run, "schedule.run.failed");
|
|
845
|
+
}
|
|
846
|
+
schedule.activeRunId = undefined;
|
|
847
|
+
schedule.updatedAt = timestamp(this.now());
|
|
848
|
+
store.write(schedule);
|
|
849
|
+
fs.rmSync(path.join(store.directory(schedule.id), "active.lock"), { force: true });
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
if (!rearm || schedule.paused)
|
|
853
|
+
return;
|
|
854
|
+
const next = nextRunAt(schedule);
|
|
855
|
+
if (next === undefined)
|
|
856
|
+
return;
|
|
857
|
+
if (!schedule.activeRunId && next < this.now() && schedule.catchUp === "none") {
|
|
858
|
+
try {
|
|
859
|
+
this.recordMissed(store, schedule, next, "timer");
|
|
860
|
+
}
|
|
861
|
+
catch (error) {
|
|
862
|
+
if (notBefore !== undefined)
|
|
863
|
+
this.arm(schedule, store, notBefore);
|
|
864
|
+
throw error;
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
this.arm(schedule, store, notBefore);
|
|
868
|
+
}
|
|
869
|
+
arm(schedule, store, notBefore) {
|
|
870
|
+
this.clearTimer(store, schedule.id);
|
|
871
|
+
if (schedule.paused)
|
|
872
|
+
return;
|
|
873
|
+
const next = nextRunAt(schedule);
|
|
874
|
+
if (next === undefined)
|
|
875
|
+
return;
|
|
876
|
+
const timer = this.timersApi.setTimeout(() => {
|
|
877
|
+
// A timer callback is outside every caller's try/catch, so an escaping
|
|
878
|
+
// rejection here reaches the process as an uncaught exception and exits
|
|
879
|
+
// Pi. Contain every failure to this one schedule.
|
|
880
|
+
void this.fire(store, schedule.id).catch((error) => {
|
|
881
|
+
console.warn(`[pi-subagents] Scheduled run '${schedule.id}' failed to fire: ${error instanceof Error ? error.message : String(error)}`);
|
|
882
|
+
this.restoreAfterFireError(store, schedule.id);
|
|
883
|
+
});
|
|
884
|
+
}, Math.min(Math.max(0, next - this.now(), (notBefore ?? 0) - this.now()), MAX_TIMER_DELAY_MS));
|
|
885
|
+
timer.unref?.();
|
|
886
|
+
this.timers.set(this.timerKey(store, schedule.id), timer);
|
|
887
|
+
}
|
|
888
|
+
restoreAfterFireError(store, id) {
|
|
889
|
+
try {
|
|
890
|
+
const schedule = store.find(id);
|
|
891
|
+
if (!schedule)
|
|
892
|
+
return;
|
|
893
|
+
const now = this.now();
|
|
894
|
+
const planned = schedule.trigger.kind !== "once" ? duePlannedAt(schedule, now) : undefined;
|
|
895
|
+
const notBefore = planned !== undefined && planned <= now ? Date.parse(nextAfter(schedule.trigger, planned, now).nextRunAt) : undefined;
|
|
896
|
+
this.restoreOne(store, schedule, notBefore, schedule.trigger.kind !== "once");
|
|
897
|
+
}
|
|
898
|
+
catch (error) {
|
|
899
|
+
console.warn(`[pi-subagents] Scheduled run '${id}' could not be restored after fire failure: ${error instanceof Error ? error.message : String(error)}`);
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
async fire(store, id) {
|
|
903
|
+
this.clearTimer(store, id);
|
|
904
|
+
// Schedules are project-scoped and shared, and `delete` only clears the
|
|
905
|
+
// timer inside the deleting process. Another session can therefore remove
|
|
906
|
+
// a schedule while this process still holds an armed timer for it; there
|
|
907
|
+
// is then nothing to run and nothing to re-arm.
|
|
908
|
+
const schedule = store.find(id);
|
|
909
|
+
if (!schedule)
|
|
910
|
+
return;
|
|
911
|
+
if (!scheduleBelongsToSession(schedule, this.requireContext(store)))
|
|
912
|
+
return;
|
|
913
|
+
const planned = duePlannedAt(schedule, this.now());
|
|
914
|
+
if (planned === undefined || schedule.paused)
|
|
915
|
+
return;
|
|
916
|
+
if (planned > this.now())
|
|
917
|
+
return this.arm(schedule, store);
|
|
918
|
+
await this.launch(store, schedule, planned, "timer", true);
|
|
919
|
+
}
|
|
920
|
+
async launch(store, schedule, planned, dueReason, advance, quiet) {
|
|
921
|
+
const now = this.now();
|
|
922
|
+
const nextRunAtBeforeClaim = schedule.trigger.nextRunAt;
|
|
923
|
+
const nextLocalDateBeforeClaim = schedule.trigger.kind === "calendar" ? schedule.trigger.nextLocalDate : undefined;
|
|
924
|
+
const run = { schemaVersion: 1, id: this.randomId(), scheduleId: schedule.id, plannedAt: timestamp(planned), dueReason, state: "running", startedAt: timestamp(now) };
|
|
925
|
+
if (schedule.activeRunId) {
|
|
926
|
+
run.state = "skipped";
|
|
927
|
+
run.completedAt = timestamp(now);
|
|
928
|
+
if (advance) {
|
|
929
|
+
schedule.trigger = nextAfter(schedule.trigger, planned, now);
|
|
930
|
+
schedule.updatedAt = timestamp(now);
|
|
931
|
+
store.write(schedule);
|
|
932
|
+
}
|
|
933
|
+
store.writeRun(schedule, run, "schedule.skipped_overlap");
|
|
934
|
+
this.arm(schedule, store);
|
|
935
|
+
return run;
|
|
936
|
+
}
|
|
937
|
+
const lockPath = path.join(store.directory(schedule.id, true), "active.lock");
|
|
938
|
+
fs.mkdirSync(path.dirname(lockPath), { recursive: true, mode: 0o700 });
|
|
939
|
+
let lock;
|
|
940
|
+
try {
|
|
941
|
+
lock = fs.openSync(lockPath, "wx", 0o600);
|
|
942
|
+
fs.writeFileSync(lock, run.id, "utf-8");
|
|
943
|
+
fs.closeSync(lock);
|
|
944
|
+
}
|
|
945
|
+
catch (error) {
|
|
946
|
+
if (lock !== undefined) {
|
|
947
|
+
// An empty or partial claim would make every later launch skip. Keep the
|
|
948
|
+
// descriptor open until the inode check so a replacement owner's lock survives.
|
|
949
|
+
try {
|
|
950
|
+
// Bigint stats: Windows file ids exceed 2^53, so number inodes of nearby files can compare equal.
|
|
951
|
+
const owned = fs.fstatSync(lock, { bigint: true });
|
|
952
|
+
const current = fs.lstatSync(lockPath, { bigint: true });
|
|
953
|
+
if (owned.ino !== 0n && owned.dev === current.dev && owned.ino === current.ino)
|
|
954
|
+
fs.rmSync(lockPath);
|
|
955
|
+
}
|
|
956
|
+
catch { /* Preserve the original error. */ }
|
|
957
|
+
try {
|
|
958
|
+
fs.closeSync(lock);
|
|
959
|
+
}
|
|
960
|
+
catch { /* Preserve the original error. */ }
|
|
961
|
+
throw error;
|
|
962
|
+
}
|
|
963
|
+
if (error.code !== "EEXIST")
|
|
964
|
+
throw error;
|
|
965
|
+
run.state = "skipped";
|
|
966
|
+
run.completedAt = timestamp(now);
|
|
967
|
+
// Losing the claim gives this snapshot no authority to change the owner.
|
|
968
|
+
const latest = store.find(schedule.id);
|
|
969
|
+
if (!latest) {
|
|
970
|
+
this.clearTimer(store, schedule.id);
|
|
971
|
+
return run;
|
|
972
|
+
}
|
|
973
|
+
store.writeRun(latest, run, "schedule.skipped_overlap");
|
|
974
|
+
if (latest.trigger.kind === "once") {
|
|
975
|
+
this.clearTimer(store, latest.id);
|
|
976
|
+
}
|
|
977
|
+
else {
|
|
978
|
+
// The owner may hold the lock before persisting its cursor. Back off
|
|
979
|
+
// locally without consuming that pending occurrence on disk.
|
|
980
|
+
const next = nextRunAt(latest);
|
|
981
|
+
const notBefore = next !== undefined && next <= now
|
|
982
|
+
? Date.parse(nextAfter(latest.trigger, duePlannedAt(latest, now) ?? planned, now).nextRunAt)
|
|
983
|
+
: undefined;
|
|
984
|
+
this.arm(latest, store, notBefore);
|
|
985
|
+
}
|
|
986
|
+
return run;
|
|
987
|
+
}
|
|
988
|
+
schedule.activeRunId = run.id;
|
|
989
|
+
schedule.lastRunId = run.id;
|
|
990
|
+
if (advance)
|
|
991
|
+
schedule.trigger = nextAfter(schedule.trigger, planned, now);
|
|
992
|
+
schedule.updatedAt = timestamp(now);
|
|
993
|
+
try {
|
|
994
|
+
store.write(schedule);
|
|
995
|
+
store.writeRun(schedule, run, "schedule.run.started");
|
|
996
|
+
}
|
|
997
|
+
catch (error) {
|
|
998
|
+
// No child has launched: release this run's claim, then report the original error.
|
|
999
|
+
// Another session may already have recovered the claim and launched its own run.
|
|
1000
|
+
try {
|
|
1001
|
+
const latest = store.find(schedule.id);
|
|
1002
|
+
if (latest?.activeRunId === run.id) {
|
|
1003
|
+
latest.activeRunId = undefined;
|
|
1004
|
+
latest.updatedAt = timestamp(this.now());
|
|
1005
|
+
store.write(latest);
|
|
1006
|
+
}
|
|
1007
|
+
if (fs.readFileSync(lockPath, "utf-8") === run.id)
|
|
1008
|
+
fs.rmSync(lockPath);
|
|
1009
|
+
}
|
|
1010
|
+
catch (cleanupError) {
|
|
1011
|
+
console.warn(`[pi-subagents] Could not release schedule claim '${run.id}': ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}`);
|
|
1012
|
+
}
|
|
1013
|
+
throw error;
|
|
1014
|
+
}
|
|
1015
|
+
try {
|
|
1016
|
+
const result = await this.deps.launch(executionParams(schedule, dueReason === "manual" ? quiet === true : schedule.quiet === true), this.requireContext(store), new AbortController().signal);
|
|
1017
|
+
const asyncId = result.details?.asyncId ?? result.details?.runId;
|
|
1018
|
+
if (result.isError || !asyncId)
|
|
1019
|
+
throw new Error(result.content.find((item) => item.type === "text")?.text ?? "Scheduled launch failed.");
|
|
1020
|
+
run.asyncId = asyncId;
|
|
1021
|
+
run.asyncDir = result.details?.asyncDir;
|
|
1022
|
+
this.observedAsyncIds.add(asyncId);
|
|
1023
|
+
store.writeRun(schedule, run, "schedule.run.attached_async");
|
|
1024
|
+
this.arm(schedule, store);
|
|
1025
|
+
return run;
|
|
1026
|
+
}
|
|
1027
|
+
catch (error) {
|
|
1028
|
+
// The child is running, so its claim stays until completion.
|
|
1029
|
+
if (run.asyncId)
|
|
1030
|
+
throw new Error(`Scheduled run '${run.id}' attached to async run '${run.asyncId}', but recording it failed: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
1031
|
+
run.state = "failed_launch";
|
|
1032
|
+
run.completedAt = timestamp(this.now());
|
|
1033
|
+
run.error = error instanceof Error ? error.message : String(error);
|
|
1034
|
+
const latest = store.get(schedule.id);
|
|
1035
|
+
latest.activeRunId = undefined;
|
|
1036
|
+
if (!advance && nextRunAtBeforeClaim) {
|
|
1037
|
+
if (latest.trigger.kind === "calendar") {
|
|
1038
|
+
// An overlapping timer may have advanced both cursor fields while
|
|
1039
|
+
// this manual attachment was pending. Failure satisfies neither.
|
|
1040
|
+
if (nextLocalDateBeforeClaim !== undefined) {
|
|
1041
|
+
latest.trigger.nextLocalDate = nextLocalDateBeforeClaim;
|
|
1042
|
+
latest.trigger.nextRunAt = nextRunAtBeforeClaim;
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
else
|
|
1046
|
+
latest.trigger.nextRunAt = nextRunAtBeforeClaim;
|
|
1047
|
+
}
|
|
1048
|
+
latest.updatedAt = timestamp(this.now());
|
|
1049
|
+
store.write(latest);
|
|
1050
|
+
fs.rmSync(lockPath, { force: true });
|
|
1051
|
+
try {
|
|
1052
|
+
store.writeRun(latest, run, "schedule.run.failed");
|
|
1053
|
+
}
|
|
1054
|
+
finally {
|
|
1055
|
+
this.arm(latest, store);
|
|
1056
|
+
}
|
|
1057
|
+
return run;
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
finishRun(store, schedule, run, success, error) {
|
|
1061
|
+
const now = this.now();
|
|
1062
|
+
const next = nextRunAt(schedule);
|
|
1063
|
+
let skipped;
|
|
1064
|
+
if (next !== undefined && next <= now) {
|
|
1065
|
+
const planned = duePlannedAt(schedule, now);
|
|
1066
|
+
skipped = {
|
|
1067
|
+
schemaVersion: 1,
|
|
1068
|
+
id: this.randomId(),
|
|
1069
|
+
scheduleId: schedule.id,
|
|
1070
|
+
plannedAt: timestamp(planned),
|
|
1071
|
+
dueReason: "timer",
|
|
1072
|
+
state: "skipped",
|
|
1073
|
+
completedAt: timestamp(now),
|
|
1074
|
+
};
|
|
1075
|
+
schedule.trigger = nextAfter(schedule.trigger, planned, now);
|
|
1076
|
+
}
|
|
1077
|
+
if (run.asyncId)
|
|
1078
|
+
this.observedAsyncIds.delete(run.asyncId);
|
|
1079
|
+
run.state = success ? "completed" : "failed_run";
|
|
1080
|
+
run.completedAt = timestamp(now);
|
|
1081
|
+
if (!success && error)
|
|
1082
|
+
run.error = error;
|
|
1083
|
+
schedule.activeRunId = undefined;
|
|
1084
|
+
schedule.updatedAt = timestamp(now);
|
|
1085
|
+
store.write(schedule);
|
|
1086
|
+
fs.rmSync(path.join(store.directory(schedule.id), "active.lock"), { force: true });
|
|
1087
|
+
// The schedule is already released; a history.json timeout must not leave it unarmed.
|
|
1088
|
+
try {
|
|
1089
|
+
store.writeRun(schedule, run, success ? "schedule.run.completed" : "schedule.run.failed");
|
|
1090
|
+
if (skipped)
|
|
1091
|
+
store.writeRun(schedule, skipped, "schedule.skipped_overlap");
|
|
1092
|
+
}
|
|
1093
|
+
finally {
|
|
1094
|
+
this.arm(schedule, store);
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
recordMissed(store, schedule, planned, dueReason) {
|
|
1098
|
+
const run = {
|
|
1099
|
+
schemaVersion: 1,
|
|
1100
|
+
id: this.randomId(),
|
|
1101
|
+
scheduleId: schedule.id,
|
|
1102
|
+
plannedAt: timestamp(planned),
|
|
1103
|
+
dueReason,
|
|
1104
|
+
state: "missed",
|
|
1105
|
+
completedAt: timestamp(this.now()),
|
|
1106
|
+
};
|
|
1107
|
+
schedule.trigger = nextAfter(schedule.trigger, planned, this.now());
|
|
1108
|
+
schedule.updatedAt = timestamp(this.now());
|
|
1109
|
+
store.write(schedule);
|
|
1110
|
+
store.writeRun(schedule, run, "schedule.missed");
|
|
1111
|
+
return run;
|
|
1112
|
+
}
|
|
1113
|
+
selectProject(cwd, ctx) {
|
|
1114
|
+
const projectCwd = path.resolve(cwd);
|
|
1115
|
+
const root = scheduledRunStorePath(projectCwd, undefined, this.deps.storeRoot);
|
|
1116
|
+
const isBoundContext = path.resolve(ctx.cwd) === projectCwd;
|
|
1117
|
+
const previousContext = this.contexts.get(root);
|
|
1118
|
+
const contextChanged = isBoundContext
|
|
1119
|
+
&& previousContext !== undefined
|
|
1120
|
+
&& normalizedSessionFile(previousContext.sessionManager.getSessionFile()) !== normalizedSessionFile(ctx.sessionManager.getSessionFile());
|
|
1121
|
+
if (isBoundContext)
|
|
1122
|
+
this.contexts.set(root, snapshotContext(ctx, projectCwd));
|
|
1123
|
+
else if (!this.contexts.has(root))
|
|
1124
|
+
throw new Error(`Cannot use project '${projectCwd}' until that project has been opened in this runtime.`);
|
|
1125
|
+
let store = this.stores.get(root);
|
|
1126
|
+
if (!store) {
|
|
1127
|
+
store = new ScheduleStore(root, this.deps.storeRoot === undefined ? projectCwd : undefined);
|
|
1128
|
+
this.stores.set(root, store);
|
|
1129
|
+
this.restore(store);
|
|
1130
|
+
}
|
|
1131
|
+
else if (contextChanged) {
|
|
1132
|
+
this.restore(store);
|
|
1133
|
+
}
|
|
1134
|
+
this.store = store;
|
|
1135
|
+
}
|
|
1136
|
+
resolve(params) {
|
|
1137
|
+
const id = params.id?.trim();
|
|
1138
|
+
if (!id)
|
|
1139
|
+
throw new Error(`${params.action} requires id.`);
|
|
1140
|
+
return this.requireStore().get(id);
|
|
1141
|
+
}
|
|
1142
|
+
requireStore() {
|
|
1143
|
+
if (!this.store)
|
|
1144
|
+
throw new Error("Schedule store is unavailable.");
|
|
1145
|
+
return this.store;
|
|
1146
|
+
}
|
|
1147
|
+
requireContext(store) {
|
|
1148
|
+
const ctx = this.contexts.get(store.root);
|
|
1149
|
+
if (!ctx)
|
|
1150
|
+
throw new Error("Schedule runtime context is unavailable.");
|
|
1151
|
+
return ctx;
|
|
1152
|
+
}
|
|
1153
|
+
activeRun(store, schedule) {
|
|
1154
|
+
if (!schedule.activeRunId)
|
|
1155
|
+
return undefined;
|
|
1156
|
+
return store.getRun(schedule.id, schedule.activeRunId) ?? store.history(schedule.id).find((run) => run.id === schedule.activeRunId);
|
|
1157
|
+
}
|
|
1158
|
+
timerKey(store, id) {
|
|
1159
|
+
return `${store.root}\0${id}`;
|
|
1160
|
+
}
|
|
1161
|
+
clearTimer(store, id) {
|
|
1162
|
+
const key = this.timerKey(store, id);
|
|
1163
|
+
const timer = this.timers.get(key);
|
|
1164
|
+
if (!timer)
|
|
1165
|
+
return;
|
|
1166
|
+
this.timersApi.clearTimeout(timer);
|
|
1167
|
+
this.timers.delete(key);
|
|
1168
|
+
}
|
|
1169
|
+
stopTimers() {
|
|
1170
|
+
for (const timer of this.timers.values())
|
|
1171
|
+
this.timersApi.clearTimeout(timer);
|
|
1172
|
+
this.timers.clear();
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
export function createScheduledRunManager(deps) {
|
|
1176
|
+
return new ScheduledRunManager(deps);
|
|
1177
|
+
}
|
|
1178
|
+
//# sourceMappingURL=scheduled-runs.js.map
|