@emiliosp/pi-maestro 0.17.0 → 0.18.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/ADR.md +6 -4
- package/CHANGELOG.md +7 -0
- package/README.md +12 -8
- package/ROADMAP.md +175 -162
- package/TECH_STACK.md +1 -2
- package/agents/builder.md +0 -11
- package/agents/simplifier.md +0 -11
- package/agents/verifier.md +0 -11
- package/docs/configuration.md +9 -10
- package/docs/subagent-integration.md +28 -27
- package/docs/workflow.md +8 -4
- package/extensions/maestro.ts +1 -1
- package/package.json +8 -16
- package/src/config/schema.ts +0 -6
- package/src/delegation/{SubSession.ts → SubSessionManager.ts} +5 -5
- package/src/delegation/executeTask.ts +27 -9
- package/src/maestro/checks/assertEnvironment.ts +6 -113
- package/src/maestro/instructions/getMaestroInstructions.ts +2 -1
- package/src/tools/child/record-builder-handoff.ts +28 -30
- package/src/tools/child/record-simplifier-handoff.ts +33 -35
- package/src/tools/child/record-verifier-handoff.ts +37 -39
- package/src/tools/main/run-builder.ts +9 -28
- package/src/tools/main/run-simplifier.ts +8 -26
- package/src/tools/main/run-verifier.ts +9 -27
- package/src/tools/utils/executeRoleTask.ts +57 -0
- package/extensions/maestro-subagent.ts +0 -16
- package/node_modules/@js-temporal/polyfill/CHANGELOG.md +0 -453
- package/node_modules/@js-temporal/polyfill/LICENSE +0 -13
- package/node_modules/@js-temporal/polyfill/README.md +0 -90
- package/node_modules/@js-temporal/polyfill/dist/index.cjs +0 -2
- package/node_modules/@js-temporal/polyfill/dist/index.cjs.map +0 -1
- package/node_modules/@js-temporal/polyfill/dist/index.esm.js +0 -2
- package/node_modules/@js-temporal/polyfill/dist/index.esm.js.map +0 -1
- package/node_modules/@js-temporal/polyfill/dist/index.umd.js +0 -2
- package/node_modules/@js-temporal/polyfill/dist/index.umd.js.map +0 -1
- package/node_modules/@js-temporal/polyfill/index.d.cts +0 -1215
- package/node_modules/@js-temporal/polyfill/index.d.ts +0 -1215
- package/node_modules/@js-temporal/polyfill/lib/assert.ts +0 -8
- package/node_modules/@js-temporal/polyfill/lib/bigintmath.ts +0 -39
- package/node_modules/@js-temporal/polyfill/lib/calendar.ts +0 -2424
- package/node_modules/@js-temporal/polyfill/lib/debug.ts +0 -7
- package/node_modules/@js-temporal/polyfill/lib/duration.ts +0 -438
- package/node_modules/@js-temporal/polyfill/lib/durationformat.d.ts +0 -93
- package/node_modules/@js-temporal/polyfill/lib/ecmascript.ts +0 -4973
- package/node_modules/@js-temporal/polyfill/lib/index.ts +0 -34
- package/node_modules/@js-temporal/polyfill/lib/init.ts +0 -43
- package/node_modules/@js-temporal/polyfill/lib/instant.ts +0 -138
- package/node_modules/@js-temporal/polyfill/lib/internaltypes.d.ts +0 -242
- package/node_modules/@js-temporal/polyfill/lib/intl.ts +0 -758
- package/node_modules/@js-temporal/polyfill/lib/intrinsicclass.ts +0 -162
- package/node_modules/@js-temporal/polyfill/lib/legacydate.ts +0 -17
- package/node_modules/@js-temporal/polyfill/lib/math.ts +0 -96
- package/node_modules/@js-temporal/polyfill/lib/now.ts +0 -48
- package/node_modules/@js-temporal/polyfill/lib/plaindate.ts +0 -212
- package/node_modules/@js-temporal/polyfill/lib/plaindatetime.ts +0 -274
- package/node_modules/@js-temporal/polyfill/lib/plainmonthday.ts +0 -110
- package/node_modules/@js-temporal/polyfill/lib/plaintime.ts +0 -154
- package/node_modules/@js-temporal/polyfill/lib/plainyearmonth.ts +0 -157
- package/node_modules/@js-temporal/polyfill/lib/regex.ts +0 -59
- package/node_modules/@js-temporal/polyfill/lib/slots.ts +0 -341
- package/node_modules/@js-temporal/polyfill/lib/temporal.ts +0 -10
- package/node_modules/@js-temporal/polyfill/lib/timeduration.ts +0 -149
- package/node_modules/@js-temporal/polyfill/lib/zoneddatetime.ts +0 -492
- package/node_modules/@js-temporal/polyfill/package.json +0 -143
- package/node_modules/acorn/CHANGELOG.md +0 -998
- package/node_modules/acorn/LICENSE +0 -21
- package/node_modules/acorn/README.md +0 -309
- package/node_modules/acorn/bin/acorn +0 -4
- package/node_modules/acorn/dist/acorn.d.mts +0 -897
- package/node_modules/acorn/dist/acorn.d.ts +0 -897
- package/node_modules/acorn/dist/acorn.js +0 -6342
- package/node_modules/acorn/dist/acorn.mjs +0 -6313
- package/node_modules/acorn/dist/bin.js +0 -90
- package/node_modules/acorn/package.json +0 -50
- package/node_modules/jiti/LICENSE +0 -21
- package/node_modules/jiti/README.md +0 -258
- package/node_modules/jiti/dist/babel.cjs +0 -257
- package/node_modules/jiti/dist/jiti.cjs +0 -1
- package/node_modules/jiti/lib/jiti-cli.mjs +0 -34
- package/node_modules/jiti/lib/jiti-hooks.mjs +0 -124
- package/node_modules/jiti/lib/jiti-native.mjs +0 -121
- package/node_modules/jiti/lib/jiti-register.d.mts +0 -1
- package/node_modules/jiti/lib/jiti-register.mjs +0 -4
- package/node_modules/jiti/lib/jiti-static.mjs +0 -23
- package/node_modules/jiti/lib/jiti.cjs +0 -30
- package/node_modules/jiti/lib/jiti.d.cts +0 -8
- package/node_modules/jiti/lib/jiti.d.mts +0 -8
- package/node_modules/jiti/lib/jiti.mjs +0 -29
- package/node_modules/jiti/lib/types.d.ts +0 -420
- package/node_modules/jiti/package.json +0 -146
- package/node_modules/jsbi/LICENSE +0 -176
- package/node_modules/jsbi/README.md +0 -173
- package/node_modules/jsbi/dist/jsbi-cjs.js +0 -2
- package/node_modules/jsbi/dist/jsbi-cjs.js.map +0 -1
- package/node_modules/jsbi/dist/jsbi-umd.js +0 -2
- package/node_modules/jsbi/dist/jsbi-umd.js.map +0 -1
- package/node_modules/jsbi/dist/jsbi.mjs +0 -2
- package/node_modules/jsbi/dist/jsbi.mjs.map +0 -1
- package/node_modules/jsbi/jsbi.d.ts +0 -43
- package/node_modules/jsbi/package.json +0 -35
- package/node_modules/pi-subagents/CHANGELOG.md +0 -3081
- package/node_modules/pi-subagents/LICENSE +0 -21
- package/node_modules/pi-subagents/README.md +0 -129
- package/node_modules/pi-subagents/agents/claude-code-writer.md +0 -16
- package/node_modules/pi-subagents/agents/claude-code.md +0 -15
- package/node_modules/pi-subagents/agents/codex-exec-writer.md +0 -16
- package/node_modules/pi-subagents/agents/codex-exec.md +0 -15
- package/node_modules/pi-subagents/agents/cursor-agent-writer.md +0 -15
- package/node_modules/pi-subagents/agents/cursor-agent.md +0 -14
- package/node_modules/pi-subagents/agents/delegate.md +0 -14
- package/node_modules/pi-subagents/agents/evidence-auditor.md +0 -35
- package/node_modules/pi-subagents/agents/oracle.md +0 -68
- package/node_modules/pi-subagents/agents/researcher.md +0 -59
- package/node_modules/pi-subagents/agents/reviewer.md +0 -48
- package/node_modules/pi-subagents/agents/scout.md +0 -47
- package/node_modules/pi-subagents/agents/worker.md +0 -43
- package/node_modules/pi-subagents/async-retention-discovery-worker.mjs +0 -180
- package/node_modules/pi-subagents/docs/agents.md +0 -627
- package/node_modules/pi-subagents/docs/configuration.md +0 -756
- package/node_modules/pi-subagents/docs/extension-api.md +0 -661
- package/node_modules/pi-subagents/docs/missions.md +0 -162
- package/node_modules/pi-subagents/docs/models.md +0 -253
- package/node_modules/pi-subagents/docs/observability.md +0 -335
- package/node_modules/pi-subagents/docs/standalone-background.md +0 -59
- package/node_modules/pi-subagents/docs/tool-reference.md +0 -558
- package/node_modules/pi-subagents/docs/watchdog.md +0 -187
- package/node_modules/pi-subagents/docs/workflows.md +0 -577
- package/node_modules/pi-subagents/index.d.ts +0 -3
- package/node_modules/pi-subagents/index.d.ts.map +0 -1
- package/node_modules/pi-subagents/index.js +0 -15
- package/node_modules/pi-subagents/index.js.map +0 -1
- package/node_modules/pi-subagents/inspector-runner.mjs +0 -11
- package/node_modules/pi-subagents/install.mjs +0 -93
- package/node_modules/pi-subagents/node_modules/yaml/LICENSE +0 -13
- package/node_modules/pi-subagents/node_modules/yaml/README.md +0 -172
- package/node_modules/pi-subagents/node_modules/yaml/bin.mjs +0 -11
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/compose-collection.js +0 -88
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/compose-doc.js +0 -43
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/compose-node.js +0 -109
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/compose-scalar.js +0 -86
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/composer.js +0 -217
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/resolve-block-map.js +0 -115
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +0 -198
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +0 -49
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/resolve-end.js +0 -37
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +0 -207
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +0 -223
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/resolve-props.js +0 -146
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/util-contains-newline.js +0 -34
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +0 -26
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +0 -15
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/compose/util-map-includes.js +0 -13
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/doc/Document.js +0 -335
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/doc/anchors.js +0 -71
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/doc/applyReviver.js +0 -55
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/doc/createNode.js +0 -88
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/doc/directives.js +0 -176
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/errors.js +0 -57
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/index.js +0 -17
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/log.js +0 -11
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/Alias.js +0 -114
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/Collection.js +0 -147
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/Node.js +0 -38
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/Pair.js +0 -36
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/Scalar.js +0 -24
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/YAMLMap.js +0 -144
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +0 -113
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +0 -63
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/identity.js +0 -36
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/nodes/toJS.js +0 -37
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/parse/cst-scalar.js +0 -214
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/parse/cst-stringify.js +0 -61
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/parse/cst-visit.js +0 -97
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/parse/cst.js +0 -98
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/parse/lexer.js +0 -717
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/parse/line-counter.js +0 -39
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/parse/parser.js +0 -967
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/public-api.js +0 -102
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/Schema.js +0 -37
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/common/map.js +0 -17
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/common/null.js +0 -15
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/common/seq.js +0 -17
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/common/string.js +0 -14
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/core/bool.js +0 -19
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/core/float.js +0 -43
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/core/int.js +0 -38
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/core/schema.js +0 -23
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/json/schema.js +0 -62
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/tags.js +0 -96
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +0 -58
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +0 -26
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +0 -46
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +0 -71
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +0 -64
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +0 -74
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +0 -78
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +0 -39
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +0 -93
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +0 -101
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +0 -146
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/stringify/stringify.js +0 -129
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +0 -153
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/stringify/stringifyComment.js +0 -20
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +0 -85
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +0 -24
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/stringify/stringifyPair.js +0 -150
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/stringify/stringifyString.js +0 -336
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/util.js +0 -11
- package/node_modules/pi-subagents/node_modules/yaml/browser/dist/visit.js +0 -233
- package/node_modules/pi-subagents/node_modules/yaml/browser/index.js +0 -5
- package/node_modules/pi-subagents/node_modules/yaml/browser/package.json +0 -3
- package/node_modules/pi-subagents/node_modules/yaml/dist/cli.d.ts +0 -8
- package/node_modules/pi-subagents/node_modules/yaml/dist/cli.mjs +0 -201
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/compose-collection.d.ts +0 -11
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/compose-collection.js +0 -90
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/compose-doc.d.ts +0 -7
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/compose-doc.js +0 -45
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/compose-node.d.ts +0 -29
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/compose-node.js +0 -112
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/compose-scalar.d.ts +0 -5
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/compose-scalar.js +0 -88
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/composer.d.ts +0 -63
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/composer.js +0 -222
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-block-map.d.ts +0 -6
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-block-map.js +0 -117
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +0 -11
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-block-scalar.js +0 -200
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +0 -6
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-block-seq.js +0 -51
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-end.d.ts +0 -6
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-end.js +0 -39
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +0 -7
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-flow-collection.js +0 -209
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +0 -10
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-flow-scalar.js +0 -225
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-props.d.ts +0 -23
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/resolve-props.js +0 -148
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/util-contains-newline.d.ts +0 -2
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/util-contains-newline.js +0 -36
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +0 -2
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/util-empty-scalar-position.js +0 -28
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +0 -3
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/util-flow-indent-check.js +0 -17
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/util-map-includes.d.ts +0 -4
- package/node_modules/pi-subagents/node_modules/yaml/dist/compose/util-map-includes.js +0 -15
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/Document.d.ts +0 -141
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/Document.js +0 -337
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/anchors.d.ts +0 -24
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/anchors.js +0 -76
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/applyReviver.d.ts +0 -9
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/applyReviver.js +0 -57
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/createNode.d.ts +0 -17
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/createNode.js +0 -90
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/directives.d.ts +0 -49
- package/node_modules/pi-subagents/node_modules/yaml/dist/doc/directives.js +0 -178
- package/node_modules/pi-subagents/node_modules/yaml/dist/errors.d.ts +0 -21
- package/node_modules/pi-subagents/node_modules/yaml/dist/errors.js +0 -62
- package/node_modules/pi-subagents/node_modules/yaml/dist/index.d.ts +0 -25
- package/node_modules/pi-subagents/node_modules/yaml/dist/index.js +0 -50
- package/node_modules/pi-subagents/node_modules/yaml/dist/log.d.ts +0 -3
- package/node_modules/pi-subagents/node_modules/yaml/dist/log.js +0 -19
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Alias.d.ts +0 -29
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Alias.js +0 -116
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Collection.d.ts +0 -73
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Collection.js +0 -151
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Node.d.ts +0 -53
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Node.js +0 -40
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Pair.d.ts +0 -22
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Pair.js +0 -39
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Scalar.d.ts +0 -43
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/Scalar.js +0 -27
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/YAMLMap.d.ts +0 -53
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/YAMLMap.js +0 -147
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +0 -60
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/YAMLSeq.js +0 -115
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +0 -4
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/addPairToJSMap.js +0 -65
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/identity.d.ts +0 -23
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/identity.js +0 -53
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/toJS.d.ts +0 -29
- package/node_modules/pi-subagents/node_modules/yaml/dist/nodes/toJS.js +0 -39
- package/node_modules/pi-subagents/node_modules/yaml/dist/options.d.ts +0 -350
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/cst-scalar.d.ts +0 -64
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/cst-scalar.js +0 -218
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/cst-stringify.d.ts +0 -8
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/cst-stringify.js +0 -63
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/cst-visit.d.ts +0 -39
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/cst-visit.js +0 -99
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/cst.d.ts +0 -109
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/cst.js +0 -112
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/lexer.d.ts +0 -87
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/lexer.js +0 -719
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/line-counter.d.ts +0 -22
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/line-counter.js +0 -41
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/parser.d.ts +0 -84
- package/node_modules/pi-subagents/node_modules/yaml/dist/parse/parser.js +0 -972
- package/node_modules/pi-subagents/node_modules/yaml/dist/public-api.d.ts +0 -44
- package/node_modules/pi-subagents/node_modules/yaml/dist/public-api.js +0 -107
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/Schema.d.ts +0 -17
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/Schema.js +0 -39
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/common/map.d.ts +0 -2
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/common/map.js +0 -19
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/common/null.d.ts +0 -4
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/common/null.js +0 -17
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/common/seq.d.ts +0 -2
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/common/seq.js +0 -19
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/common/string.d.ts +0 -2
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/common/string.js +0 -16
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/core/bool.d.ts +0 -4
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/core/bool.js +0 -21
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/core/float.d.ts +0 -4
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/core/float.js +0 -47
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/core/int.d.ts +0 -4
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/core/int.js +0 -42
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/core/schema.d.ts +0 -1
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/core/schema.js +0 -25
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/json/schema.d.ts +0 -2
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/json/schema.js +0 -64
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/json-schema.d.ts +0 -69
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/tags.d.ts +0 -48
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/tags.js +0 -99
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/types.d.ts +0 -92
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +0 -2
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/binary.js +0 -70
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +0 -7
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/bool.js +0 -29
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +0 -4
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/float.js +0 -50
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +0 -5
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/int.js +0 -76
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +0 -9
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/merge.js +0 -68
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +0 -22
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/omap.js +0 -77
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +0 -10
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +0 -82
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +0 -1
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/schema.js +0 -41
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +0 -28
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/set.js +0 -96
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +0 -6
- package/node_modules/pi-subagents/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +0 -105
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +0 -34
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/foldFlowLines.js +0 -151
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringify.d.ts +0 -21
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringify.js +0 -132
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +0 -17
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyCollection.js +0 -155
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyComment.d.ts +0 -10
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyComment.js +0 -24
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +0 -4
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyDocument.js +0 -87
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +0 -2
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyNumber.js +0 -26
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyPair.d.ts +0 -3
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyPair.js +0 -152
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyString.d.ts +0 -9
- package/node_modules/pi-subagents/node_modules/yaml/dist/stringify/stringifyString.js +0 -338
- package/node_modules/pi-subagents/node_modules/yaml/dist/test-events.d.ts +0 -4
- package/node_modules/pi-subagents/node_modules/yaml/dist/test-events.js +0 -134
- package/node_modules/pi-subagents/node_modules/yaml/dist/util.d.ts +0 -16
- package/node_modules/pi-subagents/node_modules/yaml/dist/util.js +0 -28
- package/node_modules/pi-subagents/node_modules/yaml/dist/visit.d.ts +0 -102
- package/node_modules/pi-subagents/node_modules/yaml/dist/visit.js +0 -236
- package/node_modules/pi-subagents/node_modules/yaml/package.json +0 -97
- package/node_modules/pi-subagents/node_modules/yaml/util.js +0 -2
- package/node_modules/pi-subagents/package.json +0 -138
- package/node_modules/pi-subagents/prompts/council.md +0 -63
- package/node_modules/pi-subagents/prompts/gather-context-and-clarify.md +0 -13
- package/node_modules/pi-subagents/prompts/parallel-cleanup.md +0 -59
- package/node_modules/pi-subagents/prompts/parallel-research.md +0 -50
- package/node_modules/pi-subagents/prompts/parallel-review.md +0 -58
- package/node_modules/pi-subagents/prompts/review-loop.md +0 -47
- package/node_modules/pi-subagents/runner-peer-loader.mjs +0 -21
- package/node_modules/pi-subagents/runner-peer-preload.mjs +0 -30
- package/node_modules/pi-subagents/skills/council-mode/SKILL.md +0 -59
- package/node_modules/pi-subagents/skills/council-mode/references/pass-contracts.md +0 -150
- package/node_modules/pi-subagents/skills/pi-subagents/SKILL.md +0 -123
- package/node_modules/pi-subagents/skills/pi-subagents/references/constraints-and-recipes.md +0 -74
- package/node_modules/pi-subagents/skills/pi-subagents/references/execution-controls.md +0 -561
- package/node_modules/pi-subagents/skills/pi-subagents/references/management-authoring-rpc.md +0 -165
- package/node_modules/pi-subagents/skills/pi-subagents/references/multi-lane-orchestration.md +0 -61
- package/node_modules/pi-subagents/skills/pi-subagents/references/prompting-and-roles.md +0 -297
- package/node_modules/pi-subagents/skills/pi-subagents/references/review-and-validation.md +0 -73
- package/node_modules/pi-subagents/src/agents/advertised-agent-prompt.d.ts +0 -14
- package/node_modules/pi-subagents/src/agents/advertised-agent-prompt.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/agents/advertised-agent-prompt.js +0 -69
- package/node_modules/pi-subagents/src/agents/advertised-agent-prompt.js.map +0 -1
- package/node_modules/pi-subagents/src/agents/agent-management.d.ts +0 -28
- package/node_modules/pi-subagents/src/agents/agent-management.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/agents/agent-management.js +0 -1522
- package/node_modules/pi-subagents/src/agents/agent-management.js.map +0 -1
- package/node_modules/pi-subagents/src/agents/agent-memory.d.ts +0 -49
- package/node_modules/pi-subagents/src/agents/agent-memory.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/agents/agent-memory.js +0 -349
- package/node_modules/pi-subagents/src/agents/agent-memory.js.map +0 -1
- package/node_modules/pi-subagents/src/agents/agent-refinements.d.ts +0 -100
- package/node_modules/pi-subagents/src/agents/agent-refinements.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/agents/agent-refinements.js +0 -569
- package/node_modules/pi-subagents/src/agents/agent-refinements.js.map +0 -1
- package/node_modules/pi-subagents/src/agents/agent-scope.d.ts +0 -4
- package/node_modules/pi-subagents/src/agents/agent-scope.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/agents/agent-scope.js +0 -9
- package/node_modules/pi-subagents/src/agents/agent-scope.js.map +0 -1
- package/node_modules/pi-subagents/src/agents/agent-selection.d.ts +0 -3
- package/node_modules/pi-subagents/src/agents/agent-selection.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/agents/agent-selection.js +0 -23
- package/node_modules/pi-subagents/src/agents/agent-selection.js.map +0 -1
- package/node_modules/pi-subagents/src/agents/agent-serializer.d.ts +0 -8
- package/node_modules/pi-subagents/src/agents/agent-serializer.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/agents/agent-serializer.js +0 -206
- package/node_modules/pi-subagents/src/agents/agent-serializer.js.map +0 -1
- package/node_modules/pi-subagents/src/agents/agents.d.ts +0 -344
- package/node_modules/pi-subagents/src/agents/agents.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/agents/agents.js +0 -2748
- package/node_modules/pi-subagents/src/agents/agents.js.map +0 -1
- package/node_modules/pi-subagents/src/agents/builtin-names.d.ts +0 -2
- package/node_modules/pi-subagents/src/agents/builtin-names.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/agents/builtin-names.js +0 -17
- package/node_modules/pi-subagents/src/agents/builtin-names.js.map +0 -1
- package/node_modules/pi-subagents/src/agents/chain-serializer.d.ts +0 -7
- package/node_modules/pi-subagents/src/agents/chain-serializer.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/agents/chain-serializer.js +0 -319
- package/node_modules/pi-subagents/src/agents/chain-serializer.js.map +0 -1
- package/node_modules/pi-subagents/src/agents/frontmatter.d.ts +0 -16
- package/node_modules/pi-subagents/src/agents/frontmatter.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/agents/frontmatter.js +0 -142
- package/node_modules/pi-subagents/src/agents/frontmatter.js.map +0 -1
- package/node_modules/pi-subagents/src/agents/global-npm-root.d.ts +0 -7
- package/node_modules/pi-subagents/src/agents/global-npm-root.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/agents/global-npm-root.js +0 -58
- package/node_modules/pi-subagents/src/agents/global-npm-root.js.map +0 -1
- package/node_modules/pi-subagents/src/agents/identity.d.ts +0 -8
- package/node_modules/pi-subagents/src/agents/identity.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/agents/identity.js +0 -30
- package/node_modules/pi-subagents/src/agents/identity.js.map +0 -1
- package/node_modules/pi-subagents/src/agents/proactive-skills.d.ts +0 -36
- package/node_modules/pi-subagents/src/agents/proactive-skills.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/agents/proactive-skills.js +0 -156
- package/node_modules/pi-subagents/src/agents/proactive-skills.js.map +0 -1
- package/node_modules/pi-subagents/src/agents/runtime-agent-events.d.ts +0 -27
- package/node_modules/pi-subagents/src/agents/runtime-agent-events.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/agents/runtime-agent-events.js +0 -53
- package/node_modules/pi-subagents/src/agents/runtime-agent-events.js.map +0 -1
- package/node_modules/pi-subagents/src/agents/runtime-agent-registry.d.ts +0 -64
- package/node_modules/pi-subagents/src/agents/runtime-agent-registry.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/agents/runtime-agent-registry.js +0 -395
- package/node_modules/pi-subagents/src/agents/runtime-agent-registry.js.map +0 -1
- package/node_modules/pi-subagents/src/agents/skills.d.ts +0 -35
- package/node_modules/pi-subagents/src/agents/skills.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/agents/skills.js +0 -718
- package/node_modules/pi-subagents/src/agents/skills.js.map +0 -1
- package/node_modules/pi-subagents/src/api/agents.d.ts +0 -5
- package/node_modules/pi-subagents/src/api/agents.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/api/agents.js +0 -3
- package/node_modules/pi-subagents/src/api/agents.js.map +0 -1
- package/node_modules/pi-subagents/src/api/background-work.d.ts +0 -39
- package/node_modules/pi-subagents/src/api/background-work.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/api/background-work.js +0 -165
- package/node_modules/pi-subagents/src/api/background-work.js.map +0 -1
- package/node_modules/pi-subagents/src/api/capability-ceiling.d.ts +0 -2
- package/node_modules/pi-subagents/src/api/capability-ceiling.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/api/capability-ceiling.js +0 -2
- package/node_modules/pi-subagents/src/api/capability-ceiling.js.map +0 -1
- package/node_modules/pi-subagents/src/api/child-tool-plan.d.ts +0 -2
- package/node_modules/pi-subagents/src/api/child-tool-plan.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/api/child-tool-plan.js +0 -2
- package/node_modules/pi-subagents/src/api/child-tool-plan.js.map +0 -1
- package/node_modules/pi-subagents/src/api/control-channel.d.ts +0 -2
- package/node_modules/pi-subagents/src/api/control-channel.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/api/control-channel.js +0 -2
- package/node_modules/pi-subagents/src/api/control-channel.js.map +0 -1
- package/node_modules/pi-subagents/src/api/delegation.d.ts +0 -113
- package/node_modules/pi-subagents/src/api/delegation.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/api/delegation.js +0 -9
- package/node_modules/pi-subagents/src/api/delegation.js.map +0 -1
- package/node_modules/pi-subagents/src/api/external-job-provider.d.ts +0 -58
- package/node_modules/pi-subagents/src/api/external-job-provider.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/api/external-job-provider.js +0 -140
- package/node_modules/pi-subagents/src/api/external-job-provider.js.map +0 -1
- package/node_modules/pi-subagents/src/api/external-runs.d.ts +0 -48
- package/node_modules/pi-subagents/src/api/external-runs.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/api/external-runs.js +0 -246
- package/node_modules/pi-subagents/src/api/external-runs.js.map +0 -1
- package/node_modules/pi-subagents/src/api/inspectors.d.ts +0 -21
- package/node_modules/pi-subagents/src/api/inspectors.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/api/inspectors.js +0 -12
- package/node_modules/pi-subagents/src/api/inspectors.js.map +0 -1
- package/node_modules/pi-subagents/src/api/intercom-bridge.d.ts +0 -2
- package/node_modules/pi-subagents/src/api/intercom-bridge.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/api/intercom-bridge.js +0 -2
- package/node_modules/pi-subagents/src/api/intercom-bridge.js.map +0 -1
- package/node_modules/pi-subagents/src/api/preflight.d.ts +0 -179
- package/node_modules/pi-subagents/src/api/preflight.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/api/preflight.js +0 -410
- package/node_modules/pi-subagents/src/api/preflight.js.map +0 -1
- package/node_modules/pi-subagents/src/api/project-panes.d.ts +0 -8
- package/node_modules/pi-subagents/src/api/project-panes.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/api/project-panes.js +0 -8
- package/node_modules/pi-subagents/src/api/project-panes.js.map +0 -1
- package/node_modules/pi-subagents/src/api/required-child-extensions.d.ts +0 -2
- package/node_modules/pi-subagents/src/api/required-child-extensions.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/api/required-child-extensions.js +0 -2
- package/node_modules/pi-subagents/src/api/required-child-extensions.js.map +0 -1
- package/node_modules/pi-subagents/src/api/shared-types.d.ts +0 -2
- package/node_modules/pi-subagents/src/api/shared-types.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/api/shared-types.js +0 -2
- package/node_modules/pi-subagents/src/api/shared-types.js.map +0 -1
- package/node_modules/pi-subagents/src/api/workflow-resources.d.ts +0 -3
- package/node_modules/pi-subagents/src/api/workflow-resources.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/api/workflow-resources.js +0 -2
- package/node_modules/pi-subagents/src/api/workflow-resources.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/active-runs-prompt.d.ts +0 -8
- package/node_modules/pi-subagents/src/extension/active-runs-prompt.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/active-runs-prompt.js +0 -30
- package/node_modules/pi-subagents/src/extension/active-runs-prompt.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/config.d.ts +0 -8
- package/node_modules/pi-subagents/src/extension/config.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/config.js +0 -283
- package/node_modules/pi-subagents/src/extension/config.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/control-notices.d.ts +0 -19
- package/node_modules/pi-subagents/src/extension/control-notices.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/control-notices.js +0 -30
- package/node_modules/pi-subagents/src/extension/control-notices.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/declaration-pinning.d.ts +0 -19
- package/node_modules/pi-subagents/src/extension/declaration-pinning.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/declaration-pinning.js +0 -154
- package/node_modules/pi-subagents/src/extension/declaration-pinning.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/doctor.d.ts +0 -35
- package/node_modules/pi-subagents/src/extension/doctor.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/doctor.js +0 -226
- package/node_modules/pi-subagents/src/extension/doctor.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/fanout-child.d.ts +0 -7
- package/node_modules/pi-subagents/src/extension/fanout-child.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/fanout-child.js +0 -278
- package/node_modules/pi-subagents/src/extension/fanout-child.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/herdr-pi-bridge.d.ts +0 -17
- package/node_modules/pi-subagents/src/extension/herdr-pi-bridge.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/herdr-pi-bridge.js +0 -245
- package/node_modules/pi-subagents/src/extension/herdr-pi-bridge.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/index.d.ts +0 -19
- package/node_modules/pi-subagents/src/extension/index.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/index.js +0 -1093
- package/node_modules/pi-subagents/src/extension/index.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/public-execution.d.ts +0 -71
- package/node_modules/pi-subagents/src/extension/public-execution.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/public-execution.js +0 -212
- package/node_modules/pi-subagents/src/extension/public-execution.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/reply-workflow-script.d.ts +0 -12
- package/node_modules/pi-subagents/src/extension/reply-workflow-script.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/reply-workflow-script.js +0 -70
- package/node_modules/pi-subagents/src/extension/reply-workflow-script.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/rpc.d.ts +0 -85
- package/node_modules/pi-subagents/src/extension/rpc.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/rpc.js +0 -726
- package/node_modules/pi-subagents/src/extension/rpc.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/schemas.d.ts +0 -275
- package/node_modules/pi-subagents/src/extension/schemas.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/schemas.js +0 -311
- package/node_modules/pi-subagents/src/extension/schemas.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/steering-notices.d.ts +0 -15
- package/node_modules/pi-subagents/src/extension/steering-notices.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/steering-notices.js +0 -23
- package/node_modules/pi-subagents/src/extension/steering-notices.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/subagent-guide.d.ts +0 -5
- package/node_modules/pi-subagents/src/extension/subagent-guide.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/subagent-guide.js +0 -116
- package/node_modules/pi-subagents/src/extension/subagent-guide.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/subagent-options.d.ts +0 -8
- package/node_modules/pi-subagents/src/extension/subagent-options.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/subagent-options.js +0 -52
- package/node_modules/pi-subagents/src/extension/subagent-options.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/tool-activation.d.ts +0 -7
- package/node_modules/pi-subagents/src/extension/tool-activation.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/tool-activation.js +0 -135
- package/node_modules/pi-subagents/src/extension/tool-activation.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/tool-description.d.ts +0 -20
- package/node_modules/pi-subagents/src/extension/tool-description.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/tool-description.js +0 -170
- package/node_modules/pi-subagents/src/extension/tool-description.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/tool-result.d.ts +0 -10
- package/node_modules/pi-subagents/src/extension/tool-result.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/tool-result.js +0 -17
- package/node_modules/pi-subagents/src/extension/tool-result.js.map +0 -1
- package/node_modules/pi-subagents/src/extension/upgrade-notice.d.ts +0 -7
- package/node_modules/pi-subagents/src/extension/upgrade-notice.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/extension/upgrade-notice.js +0 -37
- package/node_modules/pi-subagents/src/extension/upgrade-notice.js.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/actions.d.ts +0 -25
- package/node_modules/pi-subagents/src/inspectors/actions.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/actions.js +0 -183
- package/node_modules/pi-subagents/src/inspectors/actions.js.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/ghostty/actions.d.ts +0 -12
- package/node_modules/pi-subagents/src/inspectors/ghostty/actions.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/ghostty/actions.js +0 -63
- package/node_modules/pi-subagents/src/inspectors/ghostty/actions.js.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/ghostty/plugin.d.ts +0 -8
- package/node_modules/pi-subagents/src/inspectors/ghostty/plugin.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/ghostty/plugin.js +0 -24
- package/node_modules/pi-subagents/src/inspectors/ghostty/plugin.js.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/herdr/actions.d.ts +0 -26
- package/node_modules/pi-subagents/src/inspectors/herdr/actions.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/herdr/actions.js +0 -134
- package/node_modules/pi-subagents/src/inspectors/herdr/actions.js.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/herdr/client.d.ts +0 -42
- package/node_modules/pi-subagents/src/inspectors/herdr/client.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/herdr/client.js +0 -130
- package/node_modules/pi-subagents/src/inspectors/herdr/client.js.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/herdr/focus.d.ts +0 -25
- package/node_modules/pi-subagents/src/inspectors/herdr/focus.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/herdr/focus.js +0 -50
- package/node_modules/pi-subagents/src/inspectors/herdr/focus.js.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/herdr/plugin.d.ts +0 -7
- package/node_modules/pi-subagents/src/inspectors/herdr/plugin.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/herdr/plugin.js +0 -15
- package/node_modules/pi-subagents/src/inspectors/herdr/plugin.js.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/herdr/project-panes.d.ts +0 -137
- package/node_modules/pi-subagents/src/inspectors/herdr/project-panes.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/herdr/project-panes.js +0 -608
- package/node_modules/pi-subagents/src/inspectors/herdr/project-panes.js.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/inspector-runner.d.ts +0 -24
- package/node_modules/pi-subagents/src/inspectors/inspector-runner.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/inspector-runner.js +0 -162
- package/node_modules/pi-subagents/src/inspectors/inspector-runner.js.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/plugins.d.ts +0 -9
- package/node_modules/pi-subagents/src/inspectors/plugins.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/plugins.js +0 -83
- package/node_modules/pi-subagents/src/inspectors/plugins.js.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/session-roots-codec.d.ts +0 -16
- package/node_modules/pi-subagents/src/inspectors/session-roots-codec.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/session-roots-codec.js +0 -33
- package/node_modules/pi-subagents/src/inspectors/session-roots-codec.js.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/shell-command.d.ts +0 -2
- package/node_modules/pi-subagents/src/inspectors/shell-command.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/shell-command.js +0 -17
- package/node_modules/pi-subagents/src/inspectors/shell-command.js.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/tmux/actions.d.ts +0 -26
- package/node_modules/pi-subagents/src/inspectors/tmux/actions.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/tmux/actions.js +0 -182
- package/node_modules/pi-subagents/src/inspectors/tmux/actions.js.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/tmux/client.d.ts +0 -28
- package/node_modules/pi-subagents/src/inspectors/tmux/client.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/tmux/client.js +0 -65
- package/node_modules/pi-subagents/src/inspectors/tmux/client.js.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/tmux/plugin.d.ts +0 -8
- package/node_modules/pi-subagents/src/inspectors/tmux/plugin.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/tmux/plugin.js +0 -15
- package/node_modules/pi-subagents/src/inspectors/tmux/plugin.js.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/types.d.ts +0 -49
- package/node_modules/pi-subagents/src/inspectors/types.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/inspectors/types.js +0 -2
- package/node_modules/pi-subagents/src/inspectors/types.js.map +0 -1
- package/node_modules/pi-subagents/src/integrations/herdr-status.d.ts +0 -48
- package/node_modules/pi-subagents/src/integrations/herdr-status.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/integrations/herdr-status.js +0 -351
- package/node_modules/pi-subagents/src/integrations/herdr-status.js.map +0 -1
- package/node_modules/pi-subagents/src/integrations/pi-web-session-liveness.d.ts +0 -20
- package/node_modules/pi-subagents/src/integrations/pi-web-session-liveness.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/integrations/pi-web-session-liveness.js +0 -54
- package/node_modules/pi-subagents/src/integrations/pi-web-session-liveness.js.map +0 -1
- package/node_modules/pi-subagents/src/integrations/program-status.d.ts +0 -31
- package/node_modules/pi-subagents/src/integrations/program-status.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/integrations/program-status.js +0 -189
- package/node_modules/pi-subagents/src/integrations/program-status.js.map +0 -1
- package/node_modules/pi-subagents/src/intercom/intercom-bridge.d.ts +0 -59
- package/node_modules/pi-subagents/src/intercom/intercom-bridge.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/intercom/intercom-bridge.js +0 -194
- package/node_modules/pi-subagents/src/intercom/intercom-bridge.js.map +0 -1
- package/node_modules/pi-subagents/src/intercom/native-supervisor-channel.d.ts +0 -80
- package/node_modules/pi-subagents/src/intercom/native-supervisor-channel.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/intercom/native-supervisor-channel.js +0 -992
- package/node_modules/pi-subagents/src/intercom/native-supervisor-channel.js.map +0 -1
- package/node_modules/pi-subagents/src/intercom/result-intercom.d.ts +0 -36
- package/node_modules/pi-subagents/src/intercom/result-intercom.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/intercom/result-intercom.js +0 -373
- package/node_modules/pi-subagents/src/intercom/result-intercom.js.map +0 -1
- package/node_modules/pi-subagents/src/intercom/supervisor-ui.d.ts +0 -30
- package/node_modules/pi-subagents/src/intercom/supervisor-ui.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/intercom/supervisor-ui.js +0 -50
- package/node_modules/pi-subagents/src/intercom/supervisor-ui.js.map +0 -1
- package/node_modules/pi-subagents/src/missions/actions.d.ts +0 -55
- package/node_modules/pi-subagents/src/missions/actions.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/missions/actions.js +0 -396
- package/node_modules/pi-subagents/src/missions/actions.js.map +0 -1
- package/node_modules/pi-subagents/src/missions/goal-driver.d.ts +0 -17
- package/node_modules/pi-subagents/src/missions/goal-driver.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/missions/goal-driver.js +0 -172
- package/node_modules/pi-subagents/src/missions/goal-driver.js.map +0 -1
- package/node_modules/pi-subagents/src/missions/lifecycle.d.ts +0 -40
- package/node_modules/pi-subagents/src/missions/lifecycle.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/missions/lifecycle.js +0 -352
- package/node_modules/pi-subagents/src/missions/lifecycle.js.map +0 -1
- package/node_modules/pi-subagents/src/missions/store.d.ts +0 -22
- package/node_modules/pi-subagents/src/missions/store.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/missions/store.js +0 -605
- package/node_modules/pi-subagents/src/missions/store.js.map +0 -1
- package/node_modules/pi-subagents/src/missions/types.d.ts +0 -168
- package/node_modules/pi-subagents/src/missions/types.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/missions/types.js +0 -10
- package/node_modules/pi-subagents/src/missions/types.js.map +0 -1
- package/node_modules/pi-subagents/src/missions/workflow-state.d.ts +0 -15
- package/node_modules/pi-subagents/src/missions/workflow-state.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/missions/workflow-state.js +0 -274
- package/node_modules/pi-subagents/src/missions/workflow-state.js.map +0 -1
- package/node_modules/pi-subagents/src/policy/authority.d.ts +0 -10
- package/node_modules/pi-subagents/src/policy/authority.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/policy/authority.js +0 -42
- package/node_modules/pi-subagents/src/policy/authority.js.map +0 -1
- package/node_modules/pi-subagents/src/profiles/profiles.d.ts +0 -135
- package/node_modules/pi-subagents/src/profiles/profiles.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/profiles/profiles.js +0 -527
- package/node_modules/pi-subagents/src/profiles/profiles.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/active-async-capacity.d.ts +0 -115
- package/node_modules/pi-subagents/src/runs/background/active-async-capacity.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/active-async-capacity.js +0 -512
- package/node_modules/pi-subagents/src/runs/background/active-async-capacity.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/active-run-index.d.ts +0 -13
- package/node_modules/pi-subagents/src/runs/background/active-run-index.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/active-run-index.js +0 -158
- package/node_modules/pi-subagents/src/runs/background/active-run-index.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/async-execution.d.ts +0 -298
- package/node_modules/pi-subagents/src/runs/background/async-execution.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/async-execution.js +0 -2125
- package/node_modules/pi-subagents/src/runs/background/async-execution.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/async-job-tracker.d.ts +0 -33
- package/node_modules/pi-subagents/src/runs/background/async-job-tracker.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/async-job-tracker.js +0 -908
- package/node_modules/pi-subagents/src/runs/background/async-job-tracker.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/async-resume.d.ts +0 -59
- package/node_modules/pi-subagents/src/runs/background/async-resume.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/async-resume.js +0 -678
- package/node_modules/pi-subagents/src/runs/background/async-resume.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/async-retention.d.ts +0 -45
- package/node_modules/pi-subagents/src/runs/background/async-retention.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/async-retention.js +0 -916
- package/node_modules/pi-subagents/src/runs/background/async-retention.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/async-status-snapshot.d.ts +0 -10
- package/node_modules/pi-subagents/src/runs/background/async-status-snapshot.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/async-status-snapshot.js +0 -25
- package/node_modules/pi-subagents/src/runs/background/async-status-snapshot.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/async-status.d.ts +0 -170
- package/node_modules/pi-subagents/src/runs/background/async-status.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/async-status.js +0 -674
- package/node_modules/pi-subagents/src/runs/background/async-status.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/auto-drain.d.ts +0 -17
- package/node_modules/pi-subagents/src/runs/background/auto-drain.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/auto-drain.js +0 -73
- package/node_modules/pi-subagents/src/runs/background/auto-drain.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/await-async-run.d.ts +0 -27
- package/node_modules/pi-subagents/src/runs/background/await-async-run.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/await-async-run.js +0 -88
- package/node_modules/pi-subagents/src/runs/background/await-async-run.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/binary-bootstrap.d.ts +0 -9
- package/node_modules/pi-subagents/src/runs/background/binary-bootstrap.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/binary-bootstrap.js +0 -70
- package/node_modules/pi-subagents/src/runs/background/binary-bootstrap.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/calendar-schedule.d.ts +0 -27
- package/node_modules/pi-subagents/src/runs/background/calendar-schedule.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/calendar-schedule.js +0 -94
- package/node_modules/pi-subagents/src/runs/background/calendar-schedule.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/chain-append.d.ts +0 -35
- package/node_modules/pi-subagents/src/runs/background/chain-append.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/chain-append.js +0 -300
- package/node_modules/pi-subagents/src/runs/background/chain-append.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/chain-root-attachment.d.ts +0 -52
- package/node_modules/pi-subagents/src/runs/background/chain-root-attachment.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/chain-root-attachment.js +0 -187
- package/node_modules/pi-subagents/src/runs/background/chain-root-attachment.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/completion-batcher.d.ts +0 -52
- package/node_modules/pi-subagents/src/runs/background/completion-batcher.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/completion-batcher.js +0 -120
- package/node_modules/pi-subagents/src/runs/background/completion-batcher.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/completion-dedupe.d.ts +0 -14
- package/node_modules/pi-subagents/src/runs/background/completion-dedupe.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/completion-dedupe.js +0 -49
- package/node_modules/pi-subagents/src/runs/background/completion-dedupe.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/completion-replay.d.ts +0 -48
- package/node_modules/pi-subagents/src/runs/background/completion-replay.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/completion-replay.js +0 -267
- package/node_modules/pi-subagents/src/runs/background/completion-replay.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/control-channel.d.ts +0 -171
- package/node_modules/pi-subagents/src/runs/background/control-channel.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/control-channel.js +0 -611
- package/node_modules/pi-subagents/src/runs/background/control-channel.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/fleet-view.d.ts +0 -64
- package/node_modules/pi-subagents/src/runs/background/fleet-view.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/fleet-view.js +0 -667
- package/node_modules/pi-subagents/src/runs/background/fleet-view.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/index-segment.d.ts +0 -16
- package/node_modules/pi-subagents/src/runs/background/index-segment.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/index-segment.js +0 -59
- package/node_modules/pi-subagents/src/runs/background/index-segment.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/inspect-rpc.d.ts +0 -60
- package/node_modules/pi-subagents/src/runs/background/inspect-rpc.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/inspect-rpc.js +0 -406
- package/node_modules/pi-subagents/src/runs/background/inspect-rpc.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/notify.d.ts +0 -192
- package/node_modules/pi-subagents/src/runs/background/notify.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/notify.js +0 -897
- package/node_modules/pi-subagents/src/runs/background/notify.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/owned-process-tree.d.ts +0 -11
- package/node_modules/pi-subagents/src/runs/background/owned-process-tree.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/owned-process-tree.js +0 -117
- package/node_modules/pi-subagents/src/runs/background/owned-process-tree.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/parallel-groups.d.ts +0 -4
- package/node_modules/pi-subagents/src/runs/background/parallel-groups.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/parallel-groups.js +0 -47
- package/node_modules/pi-subagents/src/runs/background/parallel-groups.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/pid-namespace.d.ts +0 -3
- package/node_modules/pi-subagents/src/runs/background/pid-namespace.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/pid-namespace.js +0 -20
- package/node_modules/pi-subagents/src/runs/background/pid-namespace.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/process-terminal-candidate.d.ts +0 -18
- package/node_modules/pi-subagents/src/runs/background/process-terminal-candidate.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/process-terminal-candidate.js +0 -97
- package/node_modules/pi-subagents/src/runs/background/process-terminal-candidate.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/process-terminal.d.ts +0 -22
- package/node_modules/pi-subagents/src/runs/background/process-terminal.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/process-terminal.js +0 -228
- package/node_modules/pi-subagents/src/runs/background/process-terminal.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/result-delivery-ownership.d.ts +0 -11
- package/node_modules/pi-subagents/src/runs/background/result-delivery-ownership.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/result-delivery-ownership.js +0 -37
- package/node_modules/pi-subagents/src/runs/background/result-delivery-ownership.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/result-files.d.ts +0 -62
- package/node_modules/pi-subagents/src/runs/background/result-files.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/result-files.js +0 -626
- package/node_modules/pi-subagents/src/runs/background/result-files.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/result-watcher.d.ts +0 -91
- package/node_modules/pi-subagents/src/runs/background/result-watcher.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/result-watcher.js +0 -797
- package/node_modules/pi-subagents/src/runs/background/result-watcher.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/resume-guidance.d.ts +0 -5
- package/node_modules/pi-subagents/src/runs/background/resume-guidance.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/resume-guidance.js +0 -57
- package/node_modules/pi-subagents/src/runs/background/resume-guidance.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/retained-children.d.ts +0 -25
- package/node_modules/pi-subagents/src/runs/background/retained-children.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/retained-children.js +0 -129
- package/node_modules/pi-subagents/src/runs/background/retained-children.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/retained-nested-route-tracker.d.ts +0 -13
- package/node_modules/pi-subagents/src/runs/background/retained-nested-route-tracker.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/retained-nested-route-tracker.js +0 -91
- package/node_modules/pi-subagents/src/runs/background/retained-nested-route-tracker.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/run-child-session.d.ts +0 -127
- package/node_modules/pi-subagents/src/runs/background/run-child-session.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/run-child-session.js +0 -626
- package/node_modules/pi-subagents/src/runs/background/run-child-session.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/run-id-query.d.ts +0 -4
- package/node_modules/pi-subagents/src/runs/background/run-id-query.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/run-id-query.js +0 -7
- package/node_modules/pi-subagents/src/runs/background/run-id-query.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/run-id-resolver.d.ts +0 -23
- package/node_modules/pi-subagents/src/runs/background/run-id-resolver.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/run-id-resolver.js +0 -173
- package/node_modules/pi-subagents/src/runs/background/run-id-resolver.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/run-status.d.ts +0 -26
- package/node_modules/pi-subagents/src/runs/background/run-status.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/run-status.js +0 -843
- package/node_modules/pi-subagents/src/runs/background/run-status.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/runner-aliases.d.ts +0 -18
- package/node_modules/pi-subagents/src/runs/background/runner-aliases.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/runner-aliases.js +0 -160
- package/node_modules/pi-subagents/src/runs/background/runner-aliases.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/runner-child-launch.d.ts +0 -25
- package/node_modules/pi-subagents/src/runs/background/runner-child-launch.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/runner-child-launch.js +0 -71
- package/node_modules/pi-subagents/src/runs/background/runner-child-launch.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/runner-child-sessions.d.ts +0 -7
- package/node_modules/pi-subagents/src/runs/background/runner-child-sessions.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/runner-child-sessions.js +0 -35
- package/node_modules/pi-subagents/src/runs/background/runner-child-sessions.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/runner-http-dispatcher.d.ts +0 -46
- package/node_modules/pi-subagents/src/runs/background/runner-http-dispatcher.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/runner-http-dispatcher.js +0 -116
- package/node_modules/pi-subagents/src/runs/background/runner-http-dispatcher.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/runner-startup-failure.d.ts +0 -14
- package/node_modules/pi-subagents/src/runs/background/runner-startup-failure.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/runner-startup-failure.js +0 -47
- package/node_modules/pi-subagents/src/runs/background/runner-startup-failure.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/scheduled-runs.d.ts +0 -128
- package/node_modules/pi-subagents/src/runs/background/scheduled-runs.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/scheduled-runs.js +0 -1266
- package/node_modules/pi-subagents/src/runs/background/scheduled-runs.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/stale-run-reconciler.d.ts +0 -38
- package/node_modules/pi-subagents/src/runs/background/stale-run-reconciler.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/stale-run-reconciler.js +0 -421
- package/node_modules/pi-subagents/src/runs/background/stale-run-reconciler.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/steering.d.ts +0 -52
- package/node_modules/pi-subagents/src/runs/background/steering.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/steering.js +0 -247
- package/node_modules/pi-subagents/src/runs/background/steering.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/subagent-runner-bootstrap.d.ts +0 -14
- package/node_modules/pi-subagents/src/runs/background/subagent-runner-bootstrap.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/subagent-runner-bootstrap.js +0 -281
- package/node_modules/pi-subagents/src/runs/background/subagent-runner-bootstrap.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/subagent-runner.d.ts +0 -205
- package/node_modules/pi-subagents/src/runs/background/subagent-runner.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/subagent-runner.js +0 -4919
- package/node_modules/pi-subagents/src/runs/background/subagent-runner.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/subagent-wait.d.ts +0 -124
- package/node_modules/pi-subagents/src/runs/background/subagent-wait.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/subagent-wait.js +0 -749
- package/node_modules/pi-subagents/src/runs/background/subagent-wait.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/terminal-run-index.d.ts +0 -9
- package/node_modules/pi-subagents/src/runs/background/terminal-run-index.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/terminal-run-index.js +0 -169
- package/node_modules/pi-subagents/src/runs/background/terminal-run-index.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/top-level-async.d.ts +0 -8
- package/node_modules/pi-subagents/src/runs/background/top-level-async.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/top-level-async.js +0 -6
- package/node_modules/pi-subagents/src/runs/background/top-level-async.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/wait-completions.d.ts +0 -29
- package/node_modules/pi-subagents/src/runs/background/wait-completions.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/wait-completions.js +0 -265
- package/node_modules/pi-subagents/src/runs/background/wait-completions.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/wait-config.d.ts +0 -9
- package/node_modules/pi-subagents/src/runs/background/wait-config.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/wait-config.js +0 -47
- package/node_modules/pi-subagents/src/runs/background/wait-config.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/wait-subscriptions.d.ts +0 -27
- package/node_modules/pi-subagents/src/runs/background/wait-subscriptions.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/wait-subscriptions.js +0 -337
- package/node_modules/pi-subagents/src/runs/background/wait-subscriptions.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/wait-tool.d.ts +0 -7
- package/node_modules/pi-subagents/src/runs/background/wait-tool.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/wait-tool.js +0 -49
- package/node_modules/pi-subagents/src/runs/background/wait-tool.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/workflow-terminal-proof.d.ts +0 -31
- package/node_modules/pi-subagents/src/runs/background/workflow-terminal-proof.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/background/workflow-terminal-proof.js +0 -90
- package/node_modules/pi-subagents/src/runs/background/workflow-terminal-proof.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/async-dismiss-action.d.ts +0 -7
- package/node_modules/pi-subagents/src/runs/foreground/async-dismiss-action.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/async-dismiss-action.js +0 -82
- package/node_modules/pi-subagents/src/runs/foreground/async-dismiss-action.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/async-steering-action.d.ts +0 -32
- package/node_modules/pi-subagents/src/runs/foreground/async-steering-action.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/async-steering-action.js +0 -270
- package/node_modules/pi-subagents/src/runs/foreground/async-steering-action.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/async-stop-action.d.ts +0 -13
- package/node_modules/pi-subagents/src/runs/foreground/async-stop-action.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/async-stop-action.js +0 -210
- package/node_modules/pi-subagents/src/runs/foreground/async-stop-action.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/command-action.d.ts +0 -13
- package/node_modules/pi-subagents/src/runs/foreground/command-action.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/command-action.js +0 -38
- package/node_modules/pi-subagents/src/runs/foreground/command-action.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/execution.d.ts +0 -11
- package/node_modules/pi-subagents/src/runs/foreground/execution.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/execution.js +0 -2181
- package/node_modules/pi-subagents/src/runs/foreground/execution.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/foreground-control.d.ts +0 -25
- package/node_modules/pi-subagents/src/runs/foreground/foreground-control.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/foreground-control.js +0 -139
- package/node_modules/pi-subagents/src/runs/foreground/foreground-control.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/foreground-history.d.ts +0 -12
- package/node_modules/pi-subagents/src/runs/foreground/foreground-history.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/foreground-history.js +0 -166
- package/node_modules/pi-subagents/src/runs/foreground/foreground-history.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/prompt-audit.d.ts +0 -33
- package/node_modules/pi-subagents/src/runs/foreground/prompt-audit.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/prompt-audit.js +0 -139
- package/node_modules/pi-subagents/src/runs/foreground/prompt-audit.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/subagent-executor.d.ts +0 -303
- package/node_modules/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/subagent-executor.js +0 -7629
- package/node_modules/pi-subagents/src/runs/foreground/subagent-executor.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/workflow-detach-reconcile.d.ts +0 -16
- package/node_modules/pi-subagents/src/runs/foreground/workflow-detach-reconcile.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/workflow-detach-reconcile.js +0 -284
- package/node_modules/pi-subagents/src/runs/foreground/workflow-detach-reconcile.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/workflow-foreground-steering.d.ts +0 -44
- package/node_modules/pi-subagents/src/runs/foreground/workflow-foreground-steering.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/foreground/workflow-foreground-steering.js +0 -149
- package/node_modules/pi-subagents/src/runs/foreground/workflow-foreground-steering.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/abort-recovery.d.ts +0 -27
- package/node_modules/pi-subagents/src/runs/shared/abort-recovery.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/abort-recovery.js +0 -109
- package/node_modules/pi-subagents/src/runs/shared/abort-recovery.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/acceptance.d.ts +0 -145
- package/node_modules/pi-subagents/src/runs/shared/acceptance.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/acceptance.js +0 -1617
- package/node_modules/pi-subagents/src/runs/shared/acceptance.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/agent-contract.d.ts +0 -6
- package/node_modules/pi-subagents/src/runs/shared/agent-contract.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/agent-contract.js +0 -36
- package/node_modules/pi-subagents/src/runs/shared/agent-contract.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/async-status-projection.d.ts +0 -97
- package/node_modules/pi-subagents/src/runs/shared/async-status-projection.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/async-status-projection.js +0 -545
- package/node_modules/pi-subagents/src/runs/shared/async-status-projection.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/background-process-options.d.ts +0 -5
- package/node_modules/pi-subagents/src/runs/shared/background-process-options.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/background-process-options.js +0 -7
- package/node_modules/pi-subagents/src/runs/shared/background-process-options.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/capability-ceiling.d.ts +0 -58
- package/node_modules/pi-subagents/src/runs/shared/capability-ceiling.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/capability-ceiling.js +0 -179
- package/node_modules/pi-subagents/src/runs/shared/capability-ceiling.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/chain-outputs.d.ts +0 -19
- package/node_modules/pi-subagents/src/runs/shared/chain-outputs.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/chain-outputs.js +0 -105
- package/node_modules/pi-subagents/src/runs/shared/chain-outputs.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/child-commands.d.ts +0 -28
- package/node_modules/pi-subagents/src/runs/shared/child-commands.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/child-commands.js +0 -250
- package/node_modules/pi-subagents/src/runs/shared/child-commands.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/child-hooks.d.ts +0 -32
- package/node_modules/pi-subagents/src/runs/shared/child-hooks.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/child-hooks.js +0 -174
- package/node_modules/pi-subagents/src/runs/shared/child-hooks.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/child-identity.d.ts +0 -24
- package/node_modules/pi-subagents/src/runs/shared/child-identity.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/child-identity.js +0 -41
- package/node_modules/pi-subagents/src/runs/shared/child-identity.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/child-launch-plan.d.ts +0 -71
- package/node_modules/pi-subagents/src/runs/shared/child-launch-plan.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/child-launch-plan.js +0 -89
- package/node_modules/pi-subagents/src/runs/shared/child-launch-plan.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/child-launch.d.ts +0 -118
- package/node_modules/pi-subagents/src/runs/shared/child-launch.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/child-launch.js +0 -248
- package/node_modules/pi-subagents/src/runs/shared/child-launch.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/child-lifecycle.d.ts +0 -14
- package/node_modules/pi-subagents/src/runs/shared/child-lifecycle.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/child-lifecycle.js +0 -23
- package/node_modules/pi-subagents/src/runs/shared/child-lifecycle.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/child-runtime-config.d.ts +0 -106
- package/node_modules/pi-subagents/src/runs/shared/child-runtime-config.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/child-runtime-config.js +0 -39
- package/node_modules/pi-subagents/src/runs/shared/child-runtime-config.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/child-session.d.ts +0 -172
- package/node_modules/pi-subagents/src/runs/shared/child-session.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/child-session.js +0 -589
- package/node_modules/pi-subagents/src/runs/shared/child-session.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/child-tool-plan.d.ts +0 -77
- package/node_modules/pi-subagents/src/runs/shared/child-tool-plan.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/child-tool-plan.js +0 -386
- package/node_modules/pi-subagents/src/runs/shared/child-tool-plan.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/claude-code-adapter.d.ts +0 -81
- package/node_modules/pi-subagents/src/runs/shared/claude-code-adapter.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/claude-code-adapter.js +0 -256
- package/node_modules/pi-subagents/src/runs/shared/claude-code-adapter.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/codex-exec-adapter.d.ts +0 -26
- package/node_modules/pi-subagents/src/runs/shared/codex-exec-adapter.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/codex-exec-adapter.js +0 -128
- package/node_modules/pi-subagents/src/runs/shared/codex-exec-adapter.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/context-mode.d.ts +0 -13
- package/node_modules/pi-subagents/src/runs/shared/context-mode.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/context-mode.js +0 -39
- package/node_modules/pi-subagents/src/runs/shared/context-mode.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/cursor-agent-adapter.d.ts +0 -27
- package/node_modules/pi-subagents/src/runs/shared/cursor-agent-adapter.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/cursor-agent-adapter.js +0 -100
- package/node_modules/pi-subagents/src/runs/shared/cursor-agent-adapter.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/dynamic-fanout.d.ts +0 -50
- package/node_modules/pi-subagents/src/runs/shared/dynamic-fanout.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/dynamic-fanout.js +0 -274
- package/node_modules/pi-subagents/src/runs/shared/dynamic-fanout.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/effective-system-prompt.d.ts +0 -18
- package/node_modules/pi-subagents/src/runs/shared/effective-system-prompt.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/effective-system-prompt.js +0 -24
- package/node_modules/pi-subagents/src/runs/shared/effective-system-prompt.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/extension-bindings.d.ts +0 -17
- package/node_modules/pi-subagents/src/runs/shared/extension-bindings.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/extension-bindings.js +0 -83
- package/node_modules/pi-subagents/src/runs/shared/extension-bindings.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/external-cli-contract.d.ts +0 -30
- package/node_modules/pi-subagents/src/runs/shared/external-cli-contract.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/external-cli-contract.js +0 -146
- package/node_modules/pi-subagents/src/runs/shared/external-cli-contract.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/external-cli-preflight.d.ts +0 -42
- package/node_modules/pi-subagents/src/runs/shared/external-cli-preflight.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/external-cli-preflight.js +0 -160
- package/node_modules/pi-subagents/src/runs/shared/external-cli-preflight.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/external-cli-runner.d.ts +0 -66
- package/node_modules/pi-subagents/src/runs/shared/external-cli-runner.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/external-cli-runner.js +0 -426
- package/node_modules/pi-subagents/src/runs/shared/external-cli-runner.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/external-job-bridge.d.ts +0 -25
- package/node_modules/pi-subagents/src/runs/shared/external-job-bridge.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/external-job-bridge.js +0 -487
- package/node_modules/pi-subagents/src/runs/shared/external-job-bridge.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/external-job-runner.d.ts +0 -45
- package/node_modules/pi-subagents/src/runs/shared/external-job-runner.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/external-job-runner.js +0 -353
- package/node_modules/pi-subagents/src/runs/shared/external-job-runner.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/fast-mode-extension.d.ts +0 -4
- package/node_modules/pi-subagents/src/runs/shared/fast-mode-extension.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/fast-mode-extension.js +0 -9
- package/node_modules/pi-subagents/src/runs/shared/fast-mode-extension.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/git-environment.d.ts +0 -3
- package/node_modules/pi-subagents/src/runs/shared/git-environment.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/git-environment.js +0 -28
- package/node_modules/pi-subagents/src/runs/shared/git-environment.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/herdr-connection.d.ts +0 -71
- package/node_modules/pi-subagents/src/runs/shared/herdr-connection.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/herdr-connection.js +0 -258
- package/node_modules/pi-subagents/src/runs/shared/herdr-connection.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/herdr-external-adapters.d.ts +0 -148
- package/node_modules/pi-subagents/src/runs/shared/herdr-external-adapters.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/herdr-external-adapters.js +0 -405
- package/node_modules/pi-subagents/src/runs/shared/herdr-external-adapters.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/herdr-machine.d.ts +0 -48
- package/node_modules/pi-subagents/src/runs/shared/herdr-machine.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/herdr-machine.js +0 -247
- package/node_modules/pi-subagents/src/runs/shared/herdr-machine.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/herdr-pi-protocol.d.ts +0 -22
- package/node_modules/pi-subagents/src/runs/shared/herdr-pi-protocol.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/herdr-pi-protocol.js +0 -58
- package/node_modules/pi-subagents/src/runs/shared/herdr-pi-protocol.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/herdr-placed-run.d.ts +0 -268
- package/node_modules/pi-subagents/src/runs/shared/herdr-placed-run.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/herdr-placed-run.js +0 -720
- package/node_modules/pi-subagents/src/runs/shared/herdr-placed-run.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/host-step-status.d.ts +0 -34
- package/node_modules/pi-subagents/src/runs/shared/host-step-status.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/host-step-status.js +0 -245
- package/node_modules/pi-subagents/src/runs/shared/host-step-status.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/lane-metadata.d.ts +0 -24
- package/node_modules/pi-subagents/src/runs/shared/lane-metadata.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/lane-metadata.js +0 -127
- package/node_modules/pi-subagents/src/runs/shared/lane-metadata.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/launch-cwd.d.ts +0 -2
- package/node_modules/pi-subagents/src/runs/shared/launch-cwd.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/launch-cwd.js +0 -17
- package/node_modules/pi-subagents/src/runs/shared/launch-cwd.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/long-running-guard.d.ts +0 -33
- package/node_modules/pi-subagents/src/runs/shared/long-running-guard.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/long-running-guard.js +0 -199
- package/node_modules/pi-subagents/src/runs/shared/long-running-guard.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/mcp-config-sources.d.ts +0 -34
- package/node_modules/pi-subagents/src/runs/shared/mcp-config-sources.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/mcp-config-sources.js +0 -419
- package/node_modules/pi-subagents/src/runs/shared/mcp-config-sources.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/mcp-direct-tool-allowlist.d.ts +0 -87
- package/node_modules/pi-subagents/src/runs/shared/mcp-direct-tool-allowlist.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/mcp-direct-tool-allowlist.js +0 -478
- package/node_modules/pi-subagents/src/runs/shared/mcp-direct-tool-allowlist.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/mcp-direct-tool-grant.d.ts +0 -43
- package/node_modules/pi-subagents/src/runs/shared/mcp-direct-tool-grant.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/mcp-direct-tool-grant.js +0 -160
- package/node_modules/pi-subagents/src/runs/shared/mcp-direct-tool-grant.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/model-resolution-diagnostic.d.ts +0 -34
- package/node_modules/pi-subagents/src/runs/shared/model-resolution-diagnostic.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/model-resolution-diagnostic.js +0 -92
- package/node_modules/pi-subagents/src/runs/shared/model-resolution-diagnostic.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/model-resolution.d.ts +0 -106
- package/node_modules/pi-subagents/src/runs/shared/model-resolution.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/model-resolution.js +0 -405
- package/node_modules/pi-subagents/src/runs/shared/model-resolution.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/model-scope.d.ts +0 -69
- package/node_modules/pi-subagents/src/runs/shared/model-scope.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/model-scope.js +0 -172
- package/node_modules/pi-subagents/src/runs/shared/model-scope.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/mutation-evidence.d.ts +0 -19
- package/node_modules/pi-subagents/src/runs/shared/mutation-evidence.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/mutation-evidence.js +0 -199
- package/node_modules/pi-subagents/src/runs/shared/mutation-evidence.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/nested-events.d.ts +0 -136
- package/node_modules/pi-subagents/src/runs/shared/nested-events.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/nested-events.js +0 -1060
- package/node_modules/pi-subagents/src/runs/shared/nested-events.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/nested-path.d.ts +0 -9
- package/node_modules/pi-subagents/src/runs/shared/nested-path.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/nested-path.js +0 -35
- package/node_modules/pi-subagents/src/runs/shared/nested-path.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/nested-render.d.ts +0 -21
- package/node_modules/pi-subagents/src/runs/shared/nested-render.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/nested-render.js +0 -116
- package/node_modules/pi-subagents/src/runs/shared/nested-render.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/orca-progress-tabs.d.ts +0 -33
- package/node_modules/pi-subagents/src/runs/shared/orca-progress-tabs.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/orca-progress-tabs.js +0 -527
- package/node_modules/pi-subagents/src/runs/shared/orca-progress-tabs.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/parallel-handoff.d.ts +0 -79
- package/node_modules/pi-subagents/src/runs/shared/parallel-handoff.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/parallel-handoff.js +0 -780
- package/node_modules/pi-subagents/src/runs/shared/parallel-handoff.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/parallel-utils.d.ts +0 -170
- package/node_modules/pi-subagents/src/runs/shared/parallel-utils.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/parallel-utils.js +0 -126
- package/node_modules/pi-subagents/src/runs/shared/parallel-utils.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/partial-output.d.ts +0 -25
- package/node_modules/pi-subagents/src/runs/shared/partial-output.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/partial-output.js +0 -36
- package/node_modules/pi-subagents/src/runs/shared/partial-output.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/permissions.d.ts +0 -13
- package/node_modules/pi-subagents/src/runs/shared/permissions.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/permissions.js +0 -93
- package/node_modules/pi-subagents/src/runs/shared/permissions.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/pi-spawn.d.ts +0 -28
- package/node_modules/pi-subagents/src/runs/shared/pi-spawn.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/pi-spawn.js +0 -156
- package/node_modules/pi-subagents/src/runs/shared/pi-spawn.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/process-signal.d.ts +0 -16
- package/node_modules/pi-subagents/src/runs/shared/process-signal.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/process-signal.js +0 -22
- package/node_modules/pi-subagents/src/runs/shared/process-signal.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/readonly-drain-observation.d.ts +0 -26
- package/node_modules/pi-subagents/src/runs/shared/readonly-drain-observation.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/readonly-drain-observation.js +0 -51
- package/node_modules/pi-subagents/src/runs/shared/readonly-drain-observation.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/run-fanout-budget.d.ts +0 -15
- package/node_modules/pi-subagents/src/runs/shared/run-fanout-budget.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/run-fanout-budget.js +0 -259
- package/node_modules/pi-subagents/src/runs/shared/run-fanout-budget.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/runner-launcher.d.ts +0 -12
- package/node_modules/pi-subagents/src/runs/shared/runner-launcher.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/runner-launcher.js +0 -25
- package/node_modules/pi-subagents/src/runs/shared/runner-launcher.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/runtime-acknowledged-extensions.d.ts +0 -8
- package/node_modules/pi-subagents/src/runs/shared/runtime-acknowledged-extensions.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/runtime-acknowledged-extensions.js +0 -45
- package/node_modules/pi-subagents/src/runs/shared/runtime-acknowledged-extensions.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/session-lease.d.ts +0 -70
- package/node_modules/pi-subagents/src/runs/shared/session-lease.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/session-lease.js +0 -251
- package/node_modules/pi-subagents/src/runs/shared/session-lease.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/single-output.d.ts +0 -91
- package/node_modules/pi-subagents/src/runs/shared/single-output.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/single-output.js +0 -350
- package/node_modules/pi-subagents/src/runs/shared/single-output.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/spawn-budget.d.ts +0 -21
- package/node_modules/pi-subagents/src/runs/shared/spawn-budget.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/spawn-budget.js +0 -94
- package/node_modules/pi-subagents/src/runs/shared/spawn-budget.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/structured-output.d.ts +0 -66
- package/node_modules/pi-subagents/src/runs/shared/structured-output.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/structured-output.js +0 -483
- package/node_modules/pi-subagents/src/runs/shared/structured-output.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/subagent-control.d.ts +0 -50
- package/node_modules/pi-subagents/src/runs/shared/subagent-control.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/subagent-control.js +0 -247
- package/node_modules/pi-subagents/src/runs/shared/subagent-control.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/subagent-prompt-runtime.d.ts +0 -64
- package/node_modules/pi-subagents/src/runs/shared/subagent-prompt-runtime.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/subagent-prompt-runtime.js +0 -681
- package/node_modules/pi-subagents/src/runs/shared/subagent-prompt-runtime.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/tool-availability.d.ts +0 -17
- package/node_modules/pi-subagents/src/runs/shared/tool-availability.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/tool-availability.js +0 -30
- package/node_modules/pi-subagents/src/runs/shared/tool-availability.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/tool-budget.d.ts +0 -22
- package/node_modules/pi-subagents/src/runs/shared/tool-budget.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/tool-budget.js +0 -79
- package/node_modules/pi-subagents/src/runs/shared/tool-budget.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/tool-timeout.d.ts +0 -32
- package/node_modules/pi-subagents/src/runs/shared/tool-timeout.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/tool-timeout.js +0 -74
- package/node_modules/pi-subagents/src/runs/shared/tool-timeout.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/usage-budget.d.ts +0 -8
- package/node_modules/pi-subagents/src/runs/shared/usage-budget.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/usage-budget.js +0 -75
- package/node_modules/pi-subagents/src/runs/shared/usage-budget.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/usage-reconciliation.d.ts +0 -9
- package/node_modules/pi-subagents/src/runs/shared/usage-reconciliation.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/usage-reconciliation.js +0 -72
- package/node_modules/pi-subagents/src/runs/shared/usage-reconciliation.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/workflow-async-child-guidance.d.ts +0 -4
- package/node_modules/pi-subagents/src/runs/shared/workflow-async-child-guidance.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/workflow-async-child-guidance.js +0 -18
- package/node_modules/pi-subagents/src/runs/shared/workflow-async-child-guidance.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/workflow-graph.d.ts +0 -32
- package/node_modules/pi-subagents/src/runs/shared/workflow-graph.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/workflow-graph.js +0 -222
- package/node_modules/pi-subagents/src/runs/shared/workflow-graph.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-apply.d.ts +0 -37
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-apply.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-apply.js +0 -179
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-apply.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-plan.d.ts +0 -85
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-plan.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-plan.js +0 -804
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-plan.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/worktree-lock.d.ts +0 -6
- package/node_modules/pi-subagents/src/runs/shared/worktree-lock.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/worktree-lock.js +0 -41
- package/node_modules/pi-subagents/src/runs/shared/worktree-lock.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/worktree-setup-command.d.ts +0 -39
- package/node_modules/pi-subagents/src/runs/shared/worktree-setup-command.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/worktree-setup-command.js +0 -201
- package/node_modules/pi-subagents/src/runs/shared/worktree-setup-command.js.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/worktree.d.ts +0 -182
- package/node_modules/pi-subagents/src/runs/shared/worktree.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/worktree.js +0 -1347
- package/node_modules/pi-subagents/src/runs/shared/worktree.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/accessible-dir.d.ts +0 -12
- package/node_modules/pi-subagents/src/shared/accessible-dir.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/accessible-dir.js +0 -37
- package/node_modules/pi-subagents/src/shared/accessible-dir.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/agent-stream-options.d.ts +0 -6
- package/node_modules/pi-subagents/src/shared/agent-stream-options.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/agent-stream-options.js +0 -4
- package/node_modules/pi-subagents/src/shared/agent-stream-options.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/artifacts.d.ts +0 -23
- package/node_modules/pi-subagents/src/shared/artifacts.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/artifacts.js +0 -273
- package/node_modules/pi-subagents/src/shared/artifacts.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/atomic-json.d.ts +0 -20
- package/node_modules/pi-subagents/src/shared/atomic-json.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/atomic-json.js +0 -62
- package/node_modules/pi-subagents/src/shared/atomic-json.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/capacity-resilient-json.d.ts +0 -27
- package/node_modules/pi-subagents/src/shared/capacity-resilient-json.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/capacity-resilient-json.js +0 -87
- package/node_modules/pi-subagents/src/shared/capacity-resilient-json.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/child-cache-retention.d.ts +0 -30
- package/node_modules/pi-subagents/src/shared/child-cache-retention.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/child-cache-retention.js +0 -41
- package/node_modules/pi-subagents/src/shared/child-cache-retention.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/child-session-name.d.ts +0 -9
- package/node_modules/pi-subagents/src/shared/child-session-name.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/child-session-name.js +0 -41
- package/node_modules/pi-subagents/src/shared/child-session-name.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/child-transcript.d.ts +0 -38
- package/node_modules/pi-subagents/src/shared/child-transcript.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/child-transcript.js +0 -226
- package/node_modules/pi-subagents/src/shared/child-transcript.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/completion-owner.d.ts +0 -3
- package/node_modules/pi-subagents/src/shared/completion-owner.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/completion-owner.js +0 -9
- package/node_modules/pi-subagents/src/shared/completion-owner.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/disabled-features.d.ts +0 -92
- package/node_modules/pi-subagents/src/shared/disabled-features.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/disabled-features.js +0 -113
- package/node_modules/pi-subagents/src/shared/disabled-features.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/display-text.d.ts +0 -6
- package/node_modules/pi-subagents/src/shared/display-text.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/display-text.js +0 -155
- package/node_modules/pi-subagents/src/shared/display-text.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/edit-distance.d.ts +0 -5
- package/node_modules/pi-subagents/src/shared/edit-distance.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/edit-distance.js +0 -33
- package/node_modules/pi-subagents/src/shared/edit-distance.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/extension-context.d.ts +0 -22
- package/node_modules/pi-subagents/src/shared/extension-context.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/extension-context.js +0 -40
- package/node_modules/pi-subagents/src/shared/extension-context.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/file-coalescer.d.ts +0 -12
- package/node_modules/pi-subagents/src/shared/file-coalescer.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/file-coalescer.js +0 -35
- package/node_modules/pi-subagents/src/shared/file-coalescer.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/file-lease.d.ts +0 -5
- package/node_modules/pi-subagents/src/shared/file-lease.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/file-lease.js +0 -101
- package/node_modules/pi-subagents/src/shared/file-lease.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/file-system-retry.d.ts +0 -32
- package/node_modules/pi-subagents/src/shared/file-system-retry.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/file-system-retry.js +0 -85
- package/node_modules/pi-subagents/src/shared/file-system-retry.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/fork-context.d.ts +0 -63
- package/node_modules/pi-subagents/src/shared/fork-context.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/fork-context.js +0 -176
- package/node_modules/pi-subagents/src/shared/fork-context.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/fork-session-cwd.d.ts +0 -3
- package/node_modules/pi-subagents/src/shared/fork-session-cwd.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/fork-session-cwd.js +0 -24
- package/node_modules/pi-subagents/src/shared/fork-session-cwd.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/formatters.d.ts +0 -36
- package/node_modules/pi-subagents/src/shared/formatters.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/formatters.js +0 -138
- package/node_modules/pi-subagents/src/shared/formatters.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/jsonl-writer.d.ts +0 -21
- package/node_modules/pi-subagents/src/shared/jsonl-writer.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/jsonl-writer.js +0 -68
- package/node_modules/pi-subagents/src/shared/jsonl-writer.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/launch-contract.d.ts +0 -64
- package/node_modules/pi-subagents/src/shared/launch-contract.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/launch-contract.js +0 -140
- package/node_modules/pi-subagents/src/shared/launch-contract.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/model-info.d.ts +0 -56
- package/node_modules/pi-subagents/src/shared/model-info.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/model-info.js +0 -104
- package/node_modules/pi-subagents/src/shared/model-info.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/model-response-aliases.d.ts +0 -2
- package/node_modules/pi-subagents/src/shared/model-response-aliases.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/model-response-aliases.js +0 -16
- package/node_modules/pi-subagents/src/shared/model-response-aliases.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/node-executable.d.ts +0 -2
- package/node_modules/pi-subagents/src/shared/node-executable.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/node-executable.js +0 -21
- package/node_modules/pi-subagents/src/shared/node-executable.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/opencode-session-headers.d.ts +0 -13
- package/node_modules/pi-subagents/src/shared/opencode-session-headers.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/opencode-session-headers.js +0 -27
- package/node_modules/pi-subagents/src/shared/opencode-session-headers.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/package-version.d.ts +0 -3
- package/node_modules/pi-subagents/src/shared/package-version.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/package-version.js +0 -15
- package/node_modules/pi-subagents/src/shared/package-version.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/parent-wake.d.ts +0 -24
- package/node_modules/pi-subagents/src/shared/parent-wake.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/parent-wake.js +0 -71
- package/node_modules/pi-subagents/src/shared/parent-wake.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/prompt-resources.d.ts +0 -6
- package/node_modules/pi-subagents/src/shared/prompt-resources.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/prompt-resources.js +0 -11
- package/node_modules/pi-subagents/src/shared/prompt-resources.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/pruned-fork.d.ts +0 -35
- package/node_modules/pi-subagents/src/shared/pruned-fork.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/pruned-fork.js +0 -435
- package/node_modules/pi-subagents/src/shared/pruned-fork.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/required-child-extensions.d.ts +0 -35
- package/node_modules/pi-subagents/src/shared/required-child-extensions.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/required-child-extensions.js +0 -106
- package/node_modules/pi-subagents/src/shared/required-child-extensions.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/runtime-module-path.d.ts +0 -11
- package/node_modules/pi-subagents/src/shared/runtime-module-path.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/runtime-module-path.js +0 -17
- package/node_modules/pi-subagents/src/shared/runtime-module-path.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/session-file-trust.d.ts +0 -2
- package/node_modules/pi-subagents/src/shared/session-file-trust.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/session-file-trust.js +0 -21
- package/node_modules/pi-subagents/src/shared/session-file-trust.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/session-identity.d.ts +0 -7
- package/node_modules/pi-subagents/src/shared/session-identity.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/session-identity.js +0 -7
- package/node_modules/pi-subagents/src/shared/session-identity.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/session-tokens.d.ts +0 -3
- package/node_modules/pi-subagents/src/shared/session-tokens.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/session-tokens.js +0 -59
- package/node_modules/pi-subagents/src/shared/session-tokens.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/settings-file-lease.d.ts +0 -5
- package/node_modules/pi-subagents/src/shared/settings-file-lease.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/settings-file-lease.js +0 -39
- package/node_modules/pi-subagents/src/shared/settings-file-lease.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/settings.d.ts +0 -147
- package/node_modules/pi-subagents/src/shared/settings.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/settings.js +0 -248
- package/node_modules/pi-subagents/src/shared/settings.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/shortcuts.d.ts +0 -2
- package/node_modules/pi-subagents/src/shared/shortcuts.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/shortcuts.js +0 -18
- package/node_modules/pi-subagents/src/shared/shortcuts.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/status-format.d.ts +0 -10
- package/node_modules/pi-subagents/src/shared/status-format.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/status-format.js +0 -61
- package/node_modules/pi-subagents/src/shared/status-format.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/thinking-ceiling.d.ts +0 -14
- package/node_modules/pi-subagents/src/shared/thinking-ceiling.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/thinking-ceiling.js +0 -38
- package/node_modules/pi-subagents/src/shared/thinking-ceiling.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/types.d.ts +0 -2748
- package/node_modules/pi-subagents/src/shared/types.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/types.js +0 -270
- package/node_modules/pi-subagents/src/shared/types.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/utf8.d.ts +0 -6
- package/node_modules/pi-subagents/src/shared/utf8.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/utf8.js +0 -13
- package/node_modules/pi-subagents/src/shared/utf8.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/utils.d.ts +0 -73
- package/node_modules/pi-subagents/src/shared/utils.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/utils.js +0 -596
- package/node_modules/pi-subagents/src/shared/utils.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/watch-strategy.d.ts +0 -3
- package/node_modules/pi-subagents/src/shared/watch-strategy.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/watch-strategy.js +0 -6
- package/node_modules/pi-subagents/src/shared/watch-strategy.js.map +0 -1
- package/node_modules/pi-subagents/src/shared/workflow-child-permit.d.ts +0 -59
- package/node_modules/pi-subagents/src/shared/workflow-child-permit.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/shared/workflow-child-permit.js +0 -160
- package/node_modules/pi-subagents/src/shared/workflow-child-permit.js.map +0 -1
- package/node_modules/pi-subagents/src/slash/delegation-adapters.d.ts +0 -153
- package/node_modules/pi-subagents/src/slash/delegation-adapters.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/slash/delegation-adapters.js +0 -310
- package/node_modules/pi-subagents/src/slash/delegation-adapters.js.map +0 -1
- package/node_modules/pi-subagents/src/slash/delegation-json.d.ts +0 -11
- package/node_modules/pi-subagents/src/slash/delegation-json.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/slash/delegation-json.js +0 -118
- package/node_modules/pi-subagents/src/slash/delegation-json.js.map +0 -1
- package/node_modules/pi-subagents/src/slash/delegation-request.d.ts +0 -13
- package/node_modules/pi-subagents/src/slash/delegation-request.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/slash/delegation-request.js +0 -175
- package/node_modules/pi-subagents/src/slash/delegation-request.js.map +0 -1
- package/node_modules/pi-subagents/src/slash/prompt-template-bridge.d.ts +0 -27
- package/node_modules/pi-subagents/src/slash/prompt-template-bridge.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/slash/prompt-template-bridge.js +0 -393
- package/node_modules/pi-subagents/src/slash/prompt-template-bridge.js.map +0 -1
- package/node_modules/pi-subagents/src/slash/prompt-workflows.d.ts +0 -22
- package/node_modules/pi-subagents/src/slash/prompt-workflows.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/slash/prompt-workflows.js +0 -275
- package/node_modules/pi-subagents/src/slash/prompt-workflows.js.map +0 -1
- package/node_modules/pi-subagents/src/slash/selector.d.ts +0 -48
- package/node_modules/pi-subagents/src/slash/selector.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/slash/selector.js +0 -118
- package/node_modules/pi-subagents/src/slash/selector.js.map +0 -1
- package/node_modules/pi-subagents/src/slash/slash-bridge.d.ts +0 -31
- package/node_modules/pi-subagents/src/slash/slash-bridge.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/slash/slash-bridge.js +0 -133
- package/node_modules/pi-subagents/src/slash/slash-bridge.js.map +0 -1
- package/node_modules/pi-subagents/src/slash/slash-commands.d.ts +0 -11
- package/node_modules/pi-subagents/src/slash/slash-commands.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/slash/slash-commands.js +0 -1060
- package/node_modules/pi-subagents/src/slash/slash-commands.js.map +0 -1
- package/node_modules/pi-subagents/src/slash/slash-live-state.d.ts +0 -22
- package/node_modules/pi-subagents/src/slash/slash-live-state.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/slash/slash-live-state.js +0 -264
- package/node_modules/pi-subagents/src/slash/slash-live-state.js.map +0 -1
- package/node_modules/pi-subagents/src/slash/subagent-cost.d.ts +0 -30
- package/node_modules/pi-subagents/src/slash/subagent-cost.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/slash/subagent-cost.js +0 -311
- package/node_modules/pi-subagents/src/slash/subagent-cost.js.map +0 -1
- package/node_modules/pi-subagents/src/slash/subagents-admin.d.ts +0 -3
- package/node_modules/pi-subagents/src/slash/subagents-admin.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/slash/subagents-admin.js +0 -455
- package/node_modules/pi-subagents/src/slash/subagents-admin.js.map +0 -1
- package/node_modules/pi-subagents/src/tui/fleet-status.d.ts +0 -93
- package/node_modules/pi-subagents/src/tui/fleet-status.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/tui/fleet-status.js +0 -1133
- package/node_modules/pi-subagents/src/tui/fleet-status.js.map +0 -1
- package/node_modules/pi-subagents/src/tui/fleet-transcript.d.ts +0 -52
- package/node_modules/pi-subagents/src/tui/fleet-transcript.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/tui/fleet-transcript.js +0 -502
- package/node_modules/pi-subagents/src/tui/fleet-transcript.js.map +0 -1
- package/node_modules/pi-subagents/src/tui/fleet.d.ts +0 -169
- package/node_modules/pi-subagents/src/tui/fleet.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/tui/fleet.js +0 -1432
- package/node_modules/pi-subagents/src/tui/fleet.js.map +0 -1
- package/node_modules/pi-subagents/src/tui/render-helpers.d.ts +0 -24
- package/node_modules/pi-subagents/src/tui/render-helpers.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/tui/render-helpers.js +0 -101
- package/node_modules/pi-subagents/src/tui/render-helpers.js.map +0 -1
- package/node_modules/pi-subagents/src/tui/render.d.ts +0 -61
- package/node_modules/pi-subagents/src/tui/render.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/tui/render.js +0 -3677
- package/node_modules/pi-subagents/src/tui/render.js.map +0 -1
- package/node_modules/pi-subagents/src/tui/running-tone.d.ts +0 -11
- package/node_modules/pi-subagents/src/tui/running-tone.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/tui/running-tone.js +0 -23
- package/node_modules/pi-subagents/src/tui/running-tone.js.map +0 -1
- package/node_modules/pi-subagents/src/tui/subagent-messages.d.ts +0 -23
- package/node_modules/pi-subagents/src/tui/subagent-messages.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/tui/subagent-messages.js +0 -270
- package/node_modules/pi-subagents/src/tui/subagent-messages.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/change-signature.d.ts +0 -8
- package/node_modules/pi-subagents/src/watchdog/change-signature.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/change-signature.js +0 -244
- package/node_modules/pi-subagents/src/watchdog/change-signature.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/child-status.d.ts +0 -54
- package/node_modules/pi-subagents/src/watchdog/child-status.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/child-status.js +0 -188
- package/node_modules/pi-subagents/src/watchdog/child-status.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/diff-tool.d.ts +0 -26
- package/node_modules/pi-subagents/src/watchdog/diff-tool.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/diff-tool.js +0 -99
- package/node_modules/pi-subagents/src/watchdog/diff-tool.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/emission-guard.d.ts +0 -37
- package/node_modules/pi-subagents/src/watchdog/emission-guard.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/emission-guard.js +0 -98
- package/node_modules/pi-subagents/src/watchdog/emission-guard.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/guidance.d.ts +0 -4
- package/node_modules/pi-subagents/src/watchdog/guidance.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/guidance.js +0 -20
- package/node_modules/pi-subagents/src/watchdog/guidance.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/lsp-diagnostics.d.ts +0 -18
- package/node_modules/pi-subagents/src/watchdog/lsp-diagnostics.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/lsp-diagnostics.js +0 -490
- package/node_modules/pi-subagents/src/watchdog/lsp-diagnostics.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/model-selection.d.ts +0 -25
- package/node_modules/pi-subagents/src/watchdog/model-selection.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/model-selection.js +0 -168
- package/node_modules/pi-subagents/src/watchdog/model-selection.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/permission-arbiter.d.ts +0 -21
- package/node_modules/pi-subagents/src/watchdog/permission-arbiter.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/permission-arbiter.js +0 -136
- package/node_modules/pi-subagents/src/watchdog/permission-arbiter.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/register-child.d.ts +0 -14
- package/node_modules/pi-subagents/src/watchdog/register-child.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/register-child.js +0 -129
- package/node_modules/pi-subagents/src/watchdog/register-child.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/register-main.d.ts +0 -10
- package/node_modules/pi-subagents/src/watchdog/register-main.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/register-main.js +0 -400
- package/node_modules/pi-subagents/src/watchdog/register-main.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/render.d.ts +0 -4
- package/node_modules/pi-subagents/src/watchdog/render.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/render.js +0 -34
- package/node_modules/pi-subagents/src/watchdog/render.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/review.d.ts +0 -37
- package/node_modules/pi-subagents/src/watchdog/review.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/review.js +0 -320
- package/node_modules/pi-subagents/src/watchdog/review.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/rules.d.ts +0 -22
- package/node_modules/pi-subagents/src/watchdog/rules.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/rules.js +0 -59
- package/node_modules/pi-subagents/src/watchdog/rules.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/runtime.d.ts +0 -196
- package/node_modules/pi-subagents/src/watchdog/runtime.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/runtime.js +0 -867
- package/node_modules/pi-subagents/src/watchdog/runtime.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/scope.d.ts +0 -15
- package/node_modules/pi-subagents/src/watchdog/scope.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/scope.js +0 -45
- package/node_modules/pi-subagents/src/watchdog/scope.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/settings.d.ts +0 -30
- package/node_modules/pi-subagents/src/watchdog/settings.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/settings.js +0 -481
- package/node_modules/pi-subagents/src/watchdog/settings.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/tool-actions.d.ts +0 -18
- package/node_modules/pi-subagents/src/watchdog/tool-actions.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/tool-actions.js +0 -151
- package/node_modules/pi-subagents/src/watchdog/tool-actions.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/turn-delta.d.ts +0 -16
- package/node_modules/pi-subagents/src/watchdog/turn-delta.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/turn-delta.js +0 -189
- package/node_modules/pi-subagents/src/watchdog/turn-delta.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/types.d.ts +0 -142
- package/node_modules/pi-subagents/src/watchdog/types.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/types.js +0 -28
- package/node_modules/pi-subagents/src/watchdog/types.js.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/warning-format.d.ts +0 -8
- package/node_modules/pi-subagents/src/watchdog/warning-format.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/watchdog/warning-format.js +0 -60
- package/node_modules/pi-subagents/src/watchdog/warning-format.js.map +0 -1
- package/node_modules/pi-subagents/src/workflows/chat-progress.d.ts +0 -38
- package/node_modules/pi-subagents/src/workflows/chat-progress.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/workflows/chat-progress.js +0 -130
- package/node_modules/pi-subagents/src/workflows/chat-progress.js.map +0 -1
- package/node_modules/pi-subagents/src/workflows/host-command.d.ts +0 -31
- package/node_modules/pi-subagents/src/workflows/host-command.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/workflows/host-command.js +0 -228
- package/node_modules/pi-subagents/src/workflows/host-command.js.map +0 -1
- package/node_modules/pi-subagents/src/workflows/scripted-workflow.d.ts +0 -205
- package/node_modules/pi-subagents/src/workflows/scripted-workflow.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/workflows/scripted-workflow.js +0 -2730
- package/node_modules/pi-subagents/src/workflows/scripted-workflow.js.map +0 -1
- package/node_modules/pi-subagents/src/workflows/structured-workflow-scripts.d.ts +0 -10
- package/node_modules/pi-subagents/src/workflows/structured-workflow-scripts.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/workflows/structured-workflow-scripts.js +0 -166
- package/node_modules/pi-subagents/src/workflows/structured-workflow-scripts.js.map +0 -1
- package/node_modules/pi-subagents/src/workflows/workflow-checklist.d.ts +0 -128
- package/node_modules/pi-subagents/src/workflows/workflow-checklist.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/workflows/workflow-checklist.js +0 -315
- package/node_modules/pi-subagents/src/workflows/workflow-checklist.js.map +0 -1
- package/node_modules/pi-subagents/src/workflows/workflow-child-summary.d.ts +0 -20
- package/node_modules/pi-subagents/src/workflows/workflow-child-summary.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/workflows/workflow-child-summary.js +0 -179
- package/node_modules/pi-subagents/src/workflows/workflow-child-summary.js.map +0 -1
- package/node_modules/pi-subagents/src/workflows/workflow-preflight.d.ts +0 -59
- package/node_modules/pi-subagents/src/workflows/workflow-preflight.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/workflows/workflow-preflight.js +0 -289
- package/node_modules/pi-subagents/src/workflows/workflow-preflight.js.map +0 -1
- package/node_modules/pi-subagents/src/workflows/workflow-receipt.d.ts +0 -35
- package/node_modules/pi-subagents/src/workflows/workflow-receipt.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/workflows/workflow-receipt.js +0 -455
- package/node_modules/pi-subagents/src/workflows/workflow-receipt.js.map +0 -1
- package/node_modules/pi-subagents/src/workflows/workflow-resources.d.ts +0 -56
- package/node_modules/pi-subagents/src/workflows/workflow-resources.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/workflows/workflow-resources.js +0 -272
- package/node_modules/pi-subagents/src/workflows/workflow-resources.js.map +0 -1
- package/node_modules/pi-subagents/src/workflows/workflow-reuse.d.ts +0 -51
- package/node_modules/pi-subagents/src/workflows/workflow-reuse.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/workflows/workflow-reuse.js +0 -103
- package/node_modules/pi-subagents/src/workflows/workflow-reuse.js.map +0 -1
- package/node_modules/pi-subagents/src/workflows/workflow-revival.d.ts +0 -32
- package/node_modules/pi-subagents/src/workflows/workflow-revival.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/workflows/workflow-revival.js +0 -111
- package/node_modules/pi-subagents/src/workflows/workflow-revival.js.map +0 -1
- package/node_modules/pi-subagents/src/workflows/workflow-settlement.d.ts +0 -85
- package/node_modules/pi-subagents/src/workflows/workflow-settlement.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/workflows/workflow-settlement.js +0 -204
- package/node_modules/pi-subagents/src/workflows/workflow-settlement.js.map +0 -1
- package/node_modules/undici/LICENSE +0 -21
- package/node_modules/undici/README.md +0 -797
- package/node_modules/undici/docs/docs/api/Agent.md +0 -291
- package/node_modules/undici/docs/docs/api/BalancedPool.md +0 -297
- package/node_modules/undici/docs/docs/api/CacheStorage.md +0 -188
- package/node_modules/undici/docs/docs/api/CacheStore.md +0 -360
- package/node_modules/undici/docs/docs/api/Client.md +0 -533
- package/node_modules/undici/docs/docs/api/ClientStats.md +0 -93
- package/node_modules/undici/docs/docs/api/Connector.md +0 -198
- package/node_modules/undici/docs/docs/api/ContentType.md +0 -97
- package/node_modules/undici/docs/docs/api/Cookies.md +0 -179
- package/node_modules/undici/docs/docs/api/Debug.md +0 -78
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +0 -515
- package/node_modules/undici/docs/docs/api/Dispatcher.md +0 -827
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +0 -171
- package/node_modules/undici/docs/docs/api/Errors.md +0 -524
- package/node_modules/undici/docs/docs/api/EventSource.md +0 -358
- package/node_modules/undici/docs/docs/api/Fetch.md +0 -711
- package/node_modules/undici/docs/docs/api/GlobalInstallation.md +0 -121
- package/node_modules/undici/docs/docs/api/H2CClient.md +0 -385
- package/node_modules/undici/docs/docs/api/Interceptors.md +0 -418
- package/node_modules/undici/docs/docs/api/MockAgent.md +0 -622
- package/node_modules/undici/docs/docs/api/MockCallHistory.md +0 -371
- package/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +0 -206
- package/node_modules/undici/docs/docs/api/MockClient.md +0 -199
- package/node_modules/undici/docs/docs/api/MockErrors.md +0 -63
- package/node_modules/undici/docs/docs/api/MockPool.md +0 -618
- package/node_modules/undici/docs/docs/api/Pool.md +0 -279
- package/node_modules/undici/docs/docs/api/PoolStats.md +0 -141
- package/node_modules/undici/docs/docs/api/ProxyAgent.md +0 -248
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +0 -276
- package/node_modules/undici/docs/docs/api/RetryAgent.md +0 -136
- package/node_modules/undici/docs/docs/api/RetryHandler.md +0 -200
- package/node_modules/undici/docs/docs/api/RoundRobinPool.md +0 -239
- package/node_modules/undici/docs/docs/api/SnapshotAgent.md +0 -361
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +0 -256
- package/node_modules/undici/docs/docs/api/Util.md +0 -82
- package/node_modules/undici/docs/docs/api/WebSocket.md +0 -536
- package/node_modules/undici/docs/docs/api/api-lifecycle.md +0 -159
- package/node_modules/undici/docs/docs/best-practices/client-certificate.md +0 -66
- package/node_modules/undici/docs/docs/best-practices/crawling.md +0 -60
- package/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +0 -233
- package/node_modules/undici/docs/docs/best-practices/mocking-request.md +0 -192
- package/node_modules/undici/docs/docs/best-practices/proxy.md +0 -129
- package/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +0 -226
- package/node_modules/undici/docs/docs/best-practices/writing-tests.md +0 -65
- package/node_modules/undici/docs/docs/getting-started.md +0 -281
- package/node_modules/undici/docs/docs/index.md +0 -784
- package/node_modules/undici/docs/docs/site.json +0 -125
- package/node_modules/undici/docs/docs/type-map.json +0 -79
- package/node_modules/undici/index-fetch.js +0 -65
- package/node_modules/undici/index.d.ts +0 -3
- package/node_modules/undici/index.js +0 -236
- package/node_modules/undici/lib/api/abort-signal.js +0 -59
- package/node_modules/undici/lib/api/api-connect.js +0 -112
- package/node_modules/undici/lib/api/api-pipeline.js +0 -265
- package/node_modules/undici/lib/api/api-request.js +0 -244
- package/node_modules/undici/lib/api/api-stream.js +0 -270
- package/node_modules/undici/lib/api/api-upgrade.js +0 -121
- package/node_modules/undici/lib/api/index.js +0 -7
- package/node_modules/undici/lib/api/readable.js +0 -616
- package/node_modules/undici/lib/cache/memory-cache-store.js +0 -279
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +0 -469
- package/node_modules/undici/lib/core/connect.js +0 -192
- package/node_modules/undici/lib/core/constants.js +0 -120
- package/node_modules/undici/lib/core/diagnostics.js +0 -227
- package/node_modules/undici/lib/core/errors.js +0 -497
- package/node_modules/undici/lib/core/request.js +0 -546
- package/node_modules/undici/lib/core/socks5-client.js +0 -422
- package/node_modules/undici/lib/core/socks5-utils.js +0 -212
- package/node_modules/undici/lib/core/symbols.js +0 -79
- package/node_modules/undici/lib/core/tree.js +0 -160
- package/node_modules/undici/lib/core/util.js +0 -1049
- package/node_modules/undici/lib/dispatcher/agent.js +0 -177
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +0 -217
- package/node_modules/undici/lib/dispatcher/client-h1.js +0 -1801
- package/node_modules/undici/lib/dispatcher/client-h2.js +0 -1781
- package/node_modules/undici/lib/dispatcher/client.js +0 -741
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +0 -197
- package/node_modules/undici/lib/dispatcher/dispatcher.js +0 -58
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +0 -110
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +0 -175
- package/node_modules/undici/lib/dispatcher/fixed-queue.js +0 -135
- package/node_modules/undici/lib/dispatcher/h2c-client.js +0 -51
- package/node_modules/undici/lib/dispatcher/pool-base.js +0 -232
- package/node_modules/undici/lib/dispatcher/pool.js +0 -143
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +0 -395
- package/node_modules/undici/lib/dispatcher/retry-agent.js +0 -38
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +0 -159
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +0 -350
- package/node_modules/undici/lib/encoding/index.js +0 -33
- package/node_modules/undici/lib/global.js +0 -82
- package/node_modules/undici/lib/handler/cache-handler.js +0 -818
- package/node_modules/undici/lib/handler/cache-revalidation-handler.js +0 -134
- package/node_modules/undici/lib/handler/decorator-handler.js +0 -72
- package/node_modules/undici/lib/handler/deduplication-handler.js +0 -466
- package/node_modules/undici/lib/handler/redirect-handler.js +0 -238
- package/node_modules/undici/lib/handler/retry-handler.js +0 -594
- package/node_modules/undici/lib/interceptor/cache.js +0 -671
- package/node_modules/undici/lib/interceptor/decompress.js +0 -394
- package/node_modules/undici/lib/interceptor/deduplicate.js +0 -118
- package/node_modules/undici/lib/interceptor/dns.js +0 -582
- package/node_modules/undici/lib/interceptor/dump.js +0 -99
- package/node_modules/undici/lib/interceptor/redirect.js +0 -21
- package/node_modules/undici/lib/interceptor/response-error.js +0 -95
- package/node_modules/undici/lib/interceptor/retry.js +0 -19
- package/node_modules/undici/lib/llhttp/constants.d.ts +0 -195
- package/node_modules/undici/lib/llhttp/constants.js +0 -531
- package/node_modules/undici/lib/llhttp/llhttp-wasm.js +0 -15
- package/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +0 -15
- package/node_modules/undici/lib/llhttp/utils.d.ts +0 -2
- package/node_modules/undici/lib/llhttp/utils.js +0 -12
- package/node_modules/undici/lib/mock/mock-agent.js +0 -244
- package/node_modules/undici/lib/mock/mock-call-history.js +0 -248
- package/node_modules/undici/lib/mock/mock-client.js +0 -68
- package/node_modules/undici/lib/mock/mock-errors.js +0 -29
- package/node_modules/undici/lib/mock/mock-interceptor.js +0 -227
- package/node_modules/undici/lib/mock/mock-pool.js +0 -68
- package/node_modules/undici/lib/mock/mock-symbols.js +0 -32
- package/node_modules/undici/lib/mock/mock-utils.js +0 -720
- package/node_modules/undici/lib/mock/pending-interceptors-formatter.js +0 -43
- package/node_modules/undici/lib/mock/snapshot-agent.js +0 -371
- package/node_modules/undici/lib/mock/snapshot-recorder.js +0 -623
- package/node_modules/undici/lib/mock/snapshot-utils.js +0 -158
- package/node_modules/undici/lib/util/cache.js +0 -758
- package/node_modules/undici/lib/util/date.js +0 -670
- package/node_modules/undici/lib/util/runtime-features.js +0 -93
- package/node_modules/undici/lib/util/stats.js +0 -32
- package/node_modules/undici/lib/util/timers.js +0 -425
- package/node_modules/undici/lib/web/cache/cache.js +0 -862
- package/node_modules/undici/lib/web/cache/cachestorage.js +0 -152
- package/node_modules/undici/lib/web/cache/util.js +0 -45
- package/node_modules/undici/lib/web/cookies/constants.js +0 -12
- package/node_modules/undici/lib/web/cookies/index.js +0 -199
- package/node_modules/undici/lib/web/cookies/parse.js +0 -318
- package/node_modules/undici/lib/web/cookies/util.js +0 -352
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +0 -521
- package/node_modules/undici/lib/web/eventsource/eventsource.js +0 -500
- package/node_modules/undici/lib/web/eventsource/util.js +0 -60
- package/node_modules/undici/lib/web/fetch/LICENSE +0 -21
- package/node_modules/undici/lib/web/fetch/body.js +0 -547
- package/node_modules/undici/lib/web/fetch/constants.js +0 -131
- package/node_modules/undici/lib/web/fetch/data-url.js +0 -596
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +0 -586
- package/node_modules/undici/lib/web/fetch/formdata.js +0 -278
- package/node_modules/undici/lib/web/fetch/global.js +0 -40
- package/node_modules/undici/lib/web/fetch/headers.js +0 -719
- package/node_modules/undici/lib/web/fetch/index.js +0 -2432
- package/node_modules/undici/lib/web/fetch/request.js +0 -1144
- package/node_modules/undici/lib/web/fetch/response.js +0 -639
- package/node_modules/undici/lib/web/fetch/util.js +0 -1530
- package/node_modules/undici/lib/web/infra/index.js +0 -229
- package/node_modules/undici/lib/web/subresource-integrity/Readme.md +0 -9
- package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +0 -307
- package/node_modules/undici/lib/web/webidl/index.js +0 -1004
- package/node_modules/undici/lib/web/websocket/connection.js +0 -329
- package/node_modules/undici/lib/web/websocket/constants.js +0 -126
- package/node_modules/undici/lib/web/websocket/events.js +0 -331
- package/node_modules/undici/lib/web/websocket/frame.js +0 -127
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +0 -105
- package/node_modules/undici/lib/web/websocket/receiver.js +0 -507
- package/node_modules/undici/lib/web/websocket/sender.js +0 -109
- package/node_modules/undici/lib/web/websocket/stream/websocketerror.js +0 -104
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +0 -496
- package/node_modules/undici/lib/web/websocket/util.js +0 -347
- package/node_modules/undici/lib/web/websocket/websocket.js +0 -780
- package/node_modules/undici/package.json +0 -152
- package/node_modules/undici/scripts/strip-comments.js +0 -10
- package/node_modules/undici/types/README.md +0 -6
- package/node_modules/undici/types/agent.d.ts +0 -30
- package/node_modules/undici/types/api.d.ts +0 -43
- package/node_modules/undici/types/balanced-pool.d.ts +0 -30
- package/node_modules/undici/types/cache-interceptor.d.ts +0 -179
- package/node_modules/undici/types/cache.d.ts +0 -36
- package/node_modules/undici/types/client-stats.d.ts +0 -15
- package/node_modules/undici/types/client.d.ts +0 -184
- package/node_modules/undici/types/connector.d.ts +0 -37
- package/node_modules/undici/types/content-type.d.ts +0 -21
- package/node_modules/undici/types/cookies.d.ts +0 -30
- package/node_modules/undici/types/diagnostics-channel.d.ts +0 -74
- package/node_modules/undici/types/dispatcher.d.ts +0 -253
- package/node_modules/undici/types/dispatcher1-wrapper.d.ts +0 -7
- package/node_modules/undici/types/env-http-proxy-agent.d.ts +0 -22
- package/node_modules/undici/types/errors.d.ts +0 -187
- package/node_modules/undici/types/eventsource.d.ts +0 -66
- package/node_modules/undici/types/fetch.d.ts +0 -235
- package/node_modules/undici/types/formdata.d.ts +0 -108
- package/node_modules/undici/types/global-dispatcher.d.ts +0 -9
- package/node_modules/undici/types/global-origin.d.ts +0 -7
- package/node_modules/undici/types/h2c-client.d.ts +0 -73
- package/node_modules/undici/types/handlers.d.ts +0 -16
- package/node_modules/undici/types/header.d.ts +0 -165
- package/node_modules/undici/types/index.d.ts +0 -93
- package/node_modules/undici/types/interceptors.d.ts +0 -82
- package/node_modules/undici/types/mock-agent.d.ts +0 -69
- package/node_modules/undici/types/mock-call-history.d.ts +0 -111
- package/node_modules/undici/types/mock-client.d.ts +0 -27
- package/node_modules/undici/types/mock-errors.d.ts +0 -12
- package/node_modules/undici/types/mock-interceptor.d.ts +0 -98
- package/node_modules/undici/types/mock-pool.d.ts +0 -27
- package/node_modules/undici/types/patch.d.ts +0 -29
- package/node_modules/undici/types/pool-stats.d.ts +0 -19
- package/node_modules/undici/types/pool.d.ts +0 -39
- package/node_modules/undici/types/proxy-agent.d.ts +0 -36
- package/node_modules/undici/types/readable.d.ts +0 -68
- package/node_modules/undici/types/retry-agent.d.ts +0 -8
- package/node_modules/undici/types/retry-handler.d.ts +0 -125
- package/node_modules/undici/types/round-robin-pool.d.ts +0 -39
- package/node_modules/undici/types/snapshot-agent.d.ts +0 -113
- package/node_modules/undici/types/socks5-proxy-agent.d.ts +0 -27
- package/node_modules/undici/types/util.d.ts +0 -18
- package/node_modules/undici/types/utility.d.ts +0 -7
- package/node_modules/undici/types/webidl.d.ts +0 -346
- package/node_modules/undici/types/websocket.d.ts +0 -188
- package/src/tools/utils/pi-subagent-delegation.ts +0 -121
|
@@ -1,1266 +0,0 @@
|
|
|
1
|
-
import { spawnSync } from "node:child_process";
|
|
2
|
-
import { createHash, randomUUID } from "node:crypto";
|
|
3
|
-
import * as fs from "node:fs";
|
|
4
|
-
import * as os from "node:os";
|
|
5
|
-
import * as path from "node:path";
|
|
6
|
-
import { getProjectSubagentsDir } from "../../shared/artifacts.js";
|
|
7
|
-
import { writePrivateAtomicJson } from "../../shared/atomic-json.js";
|
|
8
|
-
import { withFileLease } from "../../shared/file-lease.js";
|
|
9
|
-
import { shortenPath } from "../../shared/formatters.js";
|
|
10
|
-
import { validateExecutionAcceptance } from "../shared/acceptance.js";
|
|
11
|
-
import { previewSimpleWorkflowRun } from "../../workflows/scripted-workflow.js";
|
|
12
|
-
import { resolveGitRepositoryIdentity } from "../../workflows/chat-progress.js";
|
|
13
|
-
import { getConfigDirName } from "../../shared/utils.js";
|
|
14
|
-
import { normalizeWorktreeBaseRef } from "../shared/worktree.js";
|
|
15
|
-
import { deepFreezeWorkflowArgs, normalizeWorkflowArgs } from "../../workflows/workflow-resources.js";
|
|
16
|
-
import { readMission, resolveMissionStoreLocation, validateMissionId } from "../../missions/store.js";
|
|
17
|
-
import { calendarDateAfter, latestCalendarOccurrence, nextCalendarOccurrence, normalizeCalendarRule, restoreCalendarTrigger } from "./calendar-schedule.js";
|
|
18
|
-
import { reconcileAsyncRun } from "./stale-run-reconciler.js";
|
|
19
|
-
export const SCHEDULED_RUN_ACTIONS = [
|
|
20
|
-
"schedule.create",
|
|
21
|
-
"schedule.list",
|
|
22
|
-
"schedule.show",
|
|
23
|
-
"schedule.history",
|
|
24
|
-
"schedule.pause",
|
|
25
|
-
"schedule.resume",
|
|
26
|
-
"schedule.run",
|
|
27
|
-
"schedule.run-due",
|
|
28
|
-
"schedule.delete",
|
|
29
|
-
];
|
|
30
|
-
const MAX_TIMER_DELAY_MS = 2_147_483_647;
|
|
31
|
-
const DEFAULT_MAX_PENDING = 20;
|
|
32
|
-
const MAX_HISTORY = 100;
|
|
33
|
-
const STALE_LAUNCH_CLAIM_MS = 5 * 60_000;
|
|
34
|
-
const SCHEDULE_ID = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;
|
|
35
|
-
export function isScheduledRunAction(action) {
|
|
36
|
-
return typeof action === "string" && SCHEDULED_RUN_ACTIONS.includes(action);
|
|
37
|
-
}
|
|
38
|
-
export function scheduledRunsEnabled(config) {
|
|
39
|
-
return config.scheduledRuns?.enabled !== false;
|
|
40
|
-
}
|
|
41
|
-
export function scheduledRunStorePath(cwd, _sessionId, root) {
|
|
42
|
-
if (!root)
|
|
43
|
-
return path.join(getProjectSubagentsDir(path.resolve(cwd)), "schedules");
|
|
44
|
-
const projectKey = createHash("sha256").update(path.resolve(cwd)).digest("hex").slice(0, 20);
|
|
45
|
-
return path.join(root, projectKey);
|
|
46
|
-
}
|
|
47
|
-
export function parseScheduledRunTime(at, now = Date.now()) {
|
|
48
|
-
const trimmed = at.trim();
|
|
49
|
-
const relative = trimmed.match(/^\+(\d+)(s|m|h|d)$/);
|
|
50
|
-
if (relative) {
|
|
51
|
-
const amount = Number(relative[1]);
|
|
52
|
-
if (!Number.isSafeInteger(amount) || amount < 1)
|
|
53
|
-
throw new Error(`Invalid at value "${at}". Relative delays must be positive, such as "+10m".`);
|
|
54
|
-
const unitMs = { s: 1_000, m: 60_000, h: 3_600_000, d: 86_400_000 }[relative[2]];
|
|
55
|
-
const result = now + amount * unitMs;
|
|
56
|
-
if (!Number.isSafeInteger(result))
|
|
57
|
-
throw new Error(`Invalid at value "${at}". Relative delay is too large.`);
|
|
58
|
-
return result;
|
|
59
|
-
}
|
|
60
|
-
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})$/);
|
|
61
|
-
if (!iso)
|
|
62
|
-
throw new Error(`Invalid at value "${at}". Use a one-shot delay such as "+10m" or an ISO timestamp with timezone.`);
|
|
63
|
-
const year = Number(iso[1]);
|
|
64
|
-
const month = Number(iso[2]);
|
|
65
|
-
const day = Number(iso[3]);
|
|
66
|
-
const hour = Number(iso[4]);
|
|
67
|
-
const minute = Number(iso[5]);
|
|
68
|
-
const second = iso[6] === undefined ? 0 : Number(iso[6]);
|
|
69
|
-
const zone = iso[7];
|
|
70
|
-
const offsetHour = zone === "Z" ? 0 : Number(zone.slice(1, 3));
|
|
71
|
-
const offsetMinute = zone === "Z" ? 0 : Number(zone.slice(4, 6));
|
|
72
|
-
const daysInMonth = month >= 1 && month <= 12 ? new Date(Date.UTC(year, month, 0)).getUTCDate() : 0;
|
|
73
|
-
const parsed = Date.parse(trimmed);
|
|
74
|
-
if (month < 1 || month > 12 || day < 1 || day > daysInMonth || hour > 23 || minute > 59 || second > 59 || offsetHour > 23 || offsetMinute > 59 || !Number.isFinite(parsed))
|
|
75
|
-
throw new Error(`Invalid at value "${at}". Use a valid ISO timestamp.`);
|
|
76
|
-
if (parsed <= now)
|
|
77
|
-
throw new Error(`Scheduled time ${new Date(parsed).toISOString()} is in the past.`);
|
|
78
|
-
return parsed;
|
|
79
|
-
}
|
|
80
|
-
export function parseScheduleInterval(every) {
|
|
81
|
-
const match = every.trim().match(/^(\d+)(m|h|d|w)$/);
|
|
82
|
-
if (!match)
|
|
83
|
-
throw new Error(`Invalid every value "${every}". This first recurring slice supports fixed intervals such as "30m", "6h", "2d", or "2w".`);
|
|
84
|
-
const amount = Number(match[1]);
|
|
85
|
-
if (!Number.isSafeInteger(amount) || amount < 1)
|
|
86
|
-
throw new Error(`Invalid every value "${every}". Interval must be positive.`);
|
|
87
|
-
const unitMs = { m: 60_000, h: 3_600_000, d: 86_400_000, w: 604_800_000 }[match[2]];
|
|
88
|
-
const result = amount * unitMs;
|
|
89
|
-
if (!Number.isSafeInteger(result))
|
|
90
|
-
throw new Error(`Invalid every value "${every}". Interval is too large.`);
|
|
91
|
-
return result;
|
|
92
|
-
}
|
|
93
|
-
function timestamp(value) {
|
|
94
|
-
return new Date(value).toISOString();
|
|
95
|
-
}
|
|
96
|
-
function validateScheduleId(id) {
|
|
97
|
-
if (!SCHEDULE_ID.test(id))
|
|
98
|
-
throw new Error("Schedule id must be 1-64 characters and contain only letters, numbers, '.', '_', or '-'.");
|
|
99
|
-
return id;
|
|
100
|
-
}
|
|
101
|
-
function normalizedComparisonPath(value) {
|
|
102
|
-
const absolute = path.resolve(value);
|
|
103
|
-
if (process.platform !== "win32")
|
|
104
|
-
return absolute;
|
|
105
|
-
let normalized = absolute;
|
|
106
|
-
try {
|
|
107
|
-
normalized = fs.realpathSync.native(absolute);
|
|
108
|
-
}
|
|
109
|
-
catch { }
|
|
110
|
-
normalized = normalized.replaceAll("/", "\\");
|
|
111
|
-
if (normalized.startsWith("\\\\?\\UNC\\"))
|
|
112
|
-
normalized = `\\\\${normalized.slice(8)}`;
|
|
113
|
-
else if (normalized.startsWith("\\\\?\\"))
|
|
114
|
-
normalized = normalized.slice(4);
|
|
115
|
-
normalized = path.win32.normalize(normalized).toLowerCase();
|
|
116
|
-
if (normalized.length > 3)
|
|
117
|
-
normalized = normalized.replace(/[\\]+$/, "");
|
|
118
|
-
return normalized;
|
|
119
|
-
}
|
|
120
|
-
function pathWithin(root, candidate) {
|
|
121
|
-
const relative = path.relative(normalizedComparisonPath(root), normalizedComparisonPath(candidate));
|
|
122
|
-
return relative === "" || (relative !== ".." && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative));
|
|
123
|
-
}
|
|
124
|
-
function resolveGitCommonDirForCheckout(checkoutRoot) {
|
|
125
|
-
const gitPath = path.join(checkoutRoot, ".git");
|
|
126
|
-
try {
|
|
127
|
-
const stat = fs.statSync(gitPath);
|
|
128
|
-
if (stat.isDirectory())
|
|
129
|
-
return fs.realpathSync.native(gitPath);
|
|
130
|
-
if (!stat.isFile())
|
|
131
|
-
return undefined;
|
|
132
|
-
const match = /^gitdir:[ \t]*([^\r\n]+)$/i.exec(fs.readFileSync(gitPath, "utf-8").trim());
|
|
133
|
-
return match?.[1] ? fs.realpathSync.native(path.resolve(checkoutRoot, match[1])) : undefined;
|
|
134
|
-
}
|
|
135
|
-
catch {
|
|
136
|
-
return undefined;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
function samePath(left, right) {
|
|
140
|
-
return normalizedComparisonPath(left) === normalizedComparisonPath(right);
|
|
141
|
-
}
|
|
142
|
-
function resolveTrustedGitConfigRoot(checkoutRoot, commonDir) {
|
|
143
|
-
const resolvedCommonDir = resolveGitCommonDirForCheckout(checkoutRoot);
|
|
144
|
-
if (!resolvedCommonDir || !samePath(resolvedCommonDir, commonDir))
|
|
145
|
-
return undefined;
|
|
146
|
-
const configRoot = path.join(checkoutRoot, getConfigDirName());
|
|
147
|
-
try {
|
|
148
|
-
const resolved = fs.realpathSync.native(configRoot);
|
|
149
|
-
return fs.statSync(resolved).isDirectory() && pathWithin(checkoutRoot, resolved) ? resolved : undefined;
|
|
150
|
-
}
|
|
151
|
-
catch {
|
|
152
|
-
return undefined;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
function registeredGitWorktreeRoots(projectCwd) {
|
|
156
|
-
const result = spawnSync("git", ["-C", projectCwd, "worktree", "list", "--porcelain"], { encoding: "utf-8", windowsHide: true });
|
|
157
|
-
if (result.status !== 0 || typeof result.stdout !== "string")
|
|
158
|
-
return [];
|
|
159
|
-
const roots = [];
|
|
160
|
-
for (const line of result.stdout.split(/\r?\n/)) {
|
|
161
|
-
if (!line.startsWith("worktree "))
|
|
162
|
-
continue;
|
|
163
|
-
try {
|
|
164
|
-
roots.push(fs.realpathSync.native(line.slice("worktree ".length).trim()));
|
|
165
|
-
}
|
|
166
|
-
catch { }
|
|
167
|
-
}
|
|
168
|
-
return roots;
|
|
169
|
-
}
|
|
170
|
-
function resolveSharedGitConfigRoot(projectCwd) {
|
|
171
|
-
const repository = resolveGitRepositoryIdentity(projectCwd);
|
|
172
|
-
if (!repository)
|
|
173
|
-
return undefined;
|
|
174
|
-
let projectConfigRoot;
|
|
175
|
-
try {
|
|
176
|
-
projectConfigRoot = fs.realpathSync.native(path.join(projectCwd, getConfigDirName()));
|
|
177
|
-
}
|
|
178
|
-
catch {
|
|
179
|
-
return undefined;
|
|
180
|
-
}
|
|
181
|
-
// Git may report a separate-git-dir primary checkout as its common git
|
|
182
|
-
// directory, not as the checkout root. Without a registered checkout root,
|
|
183
|
-
// do not infer a shared config path from that unprovable layout.
|
|
184
|
-
for (const checkoutRoot of new Set(registeredGitWorktreeRoots(projectCwd))) {
|
|
185
|
-
const resolved = resolveTrustedGitConfigRoot(checkoutRoot, repository.commonDir);
|
|
186
|
-
if (resolved && samePath(resolved, projectConfigRoot))
|
|
187
|
-
return resolved;
|
|
188
|
-
}
|
|
189
|
-
return undefined;
|
|
190
|
-
}
|
|
191
|
-
// In the home directory the project config dir is the user's own Pi config dir,
|
|
192
|
-
// which may be a symlink to another disk.
|
|
193
|
-
function resolveHomeConfigRoot(projectPath) {
|
|
194
|
-
const home = process.env.HOME || process.env.USERPROFILE || os.homedir();
|
|
195
|
-
try {
|
|
196
|
-
if (!samePath(fs.realpathSync.native(home), projectPath))
|
|
197
|
-
return undefined;
|
|
198
|
-
return fs.realpathSync.native(path.join(home, getConfigDirName()));
|
|
199
|
-
}
|
|
200
|
-
catch {
|
|
201
|
-
return undefined;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
function assertScheduleRoot(root, projectCwd, create) {
|
|
205
|
-
if (!projectCwd) {
|
|
206
|
-
if (create)
|
|
207
|
-
fs.mkdirSync(root, { recursive: true, mode: 0o700 });
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
let projectPath;
|
|
211
|
-
try {
|
|
212
|
-
projectPath = fs.realpathSync.native(projectCwd);
|
|
213
|
-
}
|
|
214
|
-
catch (error) {
|
|
215
|
-
if (!create && error.code === "ENOENT")
|
|
216
|
-
return;
|
|
217
|
-
throw error;
|
|
218
|
-
}
|
|
219
|
-
let existing = root;
|
|
220
|
-
while (!fs.existsSync(existing)) {
|
|
221
|
-
const parent = path.dirname(existing);
|
|
222
|
-
if (parent === existing)
|
|
223
|
-
break;
|
|
224
|
-
existing = parent;
|
|
225
|
-
}
|
|
226
|
-
const existingPath = fs.realpathSync.native(existing);
|
|
227
|
-
const withinProject = pathWithin(projectPath, existingPath);
|
|
228
|
-
const sharedGitConfigRoot = withinProject ? undefined : resolveSharedGitConfigRoot(projectCwd);
|
|
229
|
-
const homeConfigRoot = withinProject ? undefined : resolveHomeConfigRoot(projectPath);
|
|
230
|
-
const isTrustedPath = (candidate) => pathWithin(projectPath, candidate)
|
|
231
|
-
|| (sharedGitConfigRoot !== undefined && pathWithin(sharedGitConfigRoot, candidate))
|
|
232
|
-
|| (homeConfigRoot !== undefined && pathWithin(homeConfigRoot, candidate));
|
|
233
|
-
if (!isTrustedPath(existingPath))
|
|
234
|
-
throw new Error(`Project schedule root '${root}' resolves outside the real project.`);
|
|
235
|
-
if (!create)
|
|
236
|
-
return;
|
|
237
|
-
fs.mkdirSync(root, { recursive: true, mode: 0o700 });
|
|
238
|
-
if (!isTrustedPath(fs.realpathSync.native(root)))
|
|
239
|
-
throw new Error(`Project schedule root '${root}' resolves outside the real project.`);
|
|
240
|
-
}
|
|
241
|
-
function scheduleDir(root, id, create = false, projectCwd) {
|
|
242
|
-
assertScheduleRoot(root, projectCwd, create);
|
|
243
|
-
const dir = path.join(root, validateScheduleId(id));
|
|
244
|
-
try {
|
|
245
|
-
const stat = fs.lstatSync(dir);
|
|
246
|
-
if (stat.isSymbolicLink() || !stat.isDirectory())
|
|
247
|
-
throw new Error(`Schedule path '${dir}' must be a real directory.`);
|
|
248
|
-
}
|
|
249
|
-
catch (error) {
|
|
250
|
-
if (error.code !== "ENOENT")
|
|
251
|
-
throw error;
|
|
252
|
-
if (!create)
|
|
253
|
-
return dir;
|
|
254
|
-
fs.mkdirSync(dir, { mode: 0o700 });
|
|
255
|
-
}
|
|
256
|
-
const rootPath = fs.realpathSync.native(root);
|
|
257
|
-
const dirPath = fs.realpathSync.native(dir);
|
|
258
|
-
if (!samePath(dirPath, path.join(rootPath, id)))
|
|
259
|
-
throw new Error(`Schedule path '${dir}' escapes the project schedule root.`);
|
|
260
|
-
return dir;
|
|
261
|
-
}
|
|
262
|
-
function readJson(file, label) {
|
|
263
|
-
try {
|
|
264
|
-
return JSON.parse(fs.readFileSync(file, "utf-8"));
|
|
265
|
-
}
|
|
266
|
-
catch (error) {
|
|
267
|
-
throw new Error(`Failed to read ${label} '${file}': ${error instanceof Error ? error.message : String(error)}`, { cause: error instanceof Error ? error : undefined });
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
function parseScheduleTarget(value, file) {
|
|
271
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
272
|
-
throw new Error(`Schedule record '${file}' has invalid trigger or target.`);
|
|
273
|
-
const target = value;
|
|
274
|
-
if (typeof target.workflowScript === "string" && target.workflowScript.trim()) {
|
|
275
|
-
let baseRef;
|
|
276
|
-
let missionId;
|
|
277
|
-
try {
|
|
278
|
-
baseRef = normalizeWorktreeBaseRef(target.baseRef);
|
|
279
|
-
}
|
|
280
|
-
catch (error) {
|
|
281
|
-
throw new Error(`Schedule record '${file}' has an invalid baseRef: ${error instanceof Error ? error.message : String(error)}`);
|
|
282
|
-
}
|
|
283
|
-
try {
|
|
284
|
-
missionId = target.missionId === undefined ? undefined : validateMissionId(target.missionId);
|
|
285
|
-
}
|
|
286
|
-
catch (error) {
|
|
287
|
-
throw new Error(`Schedule record '${file}' has an invalid missionId: ${error instanceof Error ? error.message : String(error)}`);
|
|
288
|
-
}
|
|
289
|
-
const normalizedArgs = normalizeWorkflowArgs(target.args);
|
|
290
|
-
if ("error" in normalizedArgs)
|
|
291
|
-
throw new Error(`Schedule record '${file}' has invalid args: ${normalizedArgs.error}`);
|
|
292
|
-
return { workflowScript: target.workflowScript.trim(), args: deepFreezeWorkflowArgs(normalizedArgs.args), ...(baseRef === undefined ? {} : { baseRef }), ...(missionId === undefined ? {} : { missionId }) };
|
|
293
|
-
}
|
|
294
|
-
if (target.agent !== undefined || target.task !== undefined)
|
|
295
|
-
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.`);
|
|
296
|
-
throw new Error(`Schedule record '${file}' requires a workflowScript target.`);
|
|
297
|
-
}
|
|
298
|
-
function parseSchedule(value, file) {
|
|
299
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
300
|
-
throw new Error(`Schedule record '${file}' must be a JSON object.`);
|
|
301
|
-
const record = value;
|
|
302
|
-
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")
|
|
303
|
-
throw new Error(`Schedule record '${file}' has invalid required fields.`);
|
|
304
|
-
validateScheduleId(record.id);
|
|
305
|
-
if (!record.trigger || typeof record.trigger !== "object" || !record.target || typeof record.target !== "object")
|
|
306
|
-
throw new Error(`Schedule record '${file}' has invalid trigger or target.`);
|
|
307
|
-
if (record.overlap !== "skip" || (record.catchUp !== "none" && record.catchUp !== "latest"))
|
|
308
|
-
throw new Error(`Schedule record '${file}' has unsupported policy fields.`);
|
|
309
|
-
if (record.trigger.kind === "once") {
|
|
310
|
-
if (typeof record.trigger.at !== "string" || (record.trigger.nextRunAt !== undefined && typeof record.trigger.nextRunAt !== "string"))
|
|
311
|
-
throw new Error(`Schedule record '${file}' has an invalid one-shot trigger.`);
|
|
312
|
-
}
|
|
313
|
-
else if (record.trigger.kind === "interval") {
|
|
314
|
-
if (typeof record.trigger.every !== "string" || typeof record.trigger.everyMs !== "number" || typeof record.trigger.anchorAt !== "string" || typeof record.trigger.nextRunAt !== "string")
|
|
315
|
-
throw new Error(`Schedule record '${file}' has an invalid interval trigger.`);
|
|
316
|
-
}
|
|
317
|
-
else if (record.trigger.kind === "calendar") {
|
|
318
|
-
restoreCalendarTrigger(record.trigger); // Validate without rewriting during read-only list/show.
|
|
319
|
-
}
|
|
320
|
-
else
|
|
321
|
-
throw new Error(`Schedule record '${file}' has an unsupported trigger.`);
|
|
322
|
-
if (record.sessionOnly !== undefined && typeof record.sessionOnly !== "boolean")
|
|
323
|
-
throw new Error(`Schedule record '${file}' has invalid sessionOnly.`);
|
|
324
|
-
if (record.quiet !== undefined && typeof record.quiet !== "boolean")
|
|
325
|
-
throw new Error(`Schedule record '${file}' has invalid quiet.`);
|
|
326
|
-
if (record.sessionOnly === true && (typeof record.ownerSessionFile !== "string" || !record.ownerSessionFile.trim()))
|
|
327
|
-
throw new Error(`Schedule record '${file}' is session-only but has no owner session file.`);
|
|
328
|
-
const target = parseScheduleTarget(record.target, file);
|
|
329
|
-
if ((record.schemaVersion === 2) !== (target.missionId !== undefined))
|
|
330
|
-
throw new Error(`Schedule record '${file}' requires schemaVersion 2 exactly when missionId is present.`);
|
|
331
|
-
return { ...record, target };
|
|
332
|
-
}
|
|
333
|
-
class ScheduleStore {
|
|
334
|
-
root;
|
|
335
|
-
projectCwd;
|
|
336
|
-
constructor(root, projectCwd) {
|
|
337
|
-
this.root = root;
|
|
338
|
-
this.projectCwd = projectCwd;
|
|
339
|
-
}
|
|
340
|
-
directory(id, create = false) {
|
|
341
|
-
return scheduleDir(this.root, id, create, this.projectCwd);
|
|
342
|
-
}
|
|
343
|
-
ids() {
|
|
344
|
-
assertScheduleRoot(this.root, this.projectCwd, false);
|
|
345
|
-
if (!fs.existsSync(this.root))
|
|
346
|
-
return [];
|
|
347
|
-
return fs.readdirSync(this.root, { withFileTypes: true })
|
|
348
|
-
.filter((entry) => entry.isDirectory() && SCHEDULE_ID.test(entry.name))
|
|
349
|
-
.map((entry) => entry.name);
|
|
350
|
-
}
|
|
351
|
-
list() {
|
|
352
|
-
return this.ids().map((id) => this.find(id)).filter((record) => record !== undefined);
|
|
353
|
-
}
|
|
354
|
-
get(id) {
|
|
355
|
-
const record = this.find(id);
|
|
356
|
-
if (!record)
|
|
357
|
-
throw new Error(`Schedule '${id}' not found.`);
|
|
358
|
-
return record;
|
|
359
|
-
}
|
|
360
|
-
/** Like {@link get}, but returns undefined when the schedule no longer exists. */
|
|
361
|
-
find(id) {
|
|
362
|
-
const file = path.join(scheduleDir(this.root, id, false, this.projectCwd), "schedule.json");
|
|
363
|
-
if (!fs.existsSync(file))
|
|
364
|
-
return undefined;
|
|
365
|
-
return parseSchedule(readJson(file, "schedule record"), file);
|
|
366
|
-
}
|
|
367
|
-
write(record) {
|
|
368
|
-
writePrivateAtomicJson(path.join(scheduleDir(this.root, record.id, true, this.projectCwd), "schedule.json"), record);
|
|
369
|
-
}
|
|
370
|
-
delete(id) {
|
|
371
|
-
fs.rmSync(scheduleDir(this.root, id, false, this.projectCwd), { recursive: true, force: true });
|
|
372
|
-
}
|
|
373
|
-
history(id) {
|
|
374
|
-
const file = path.join(scheduleDir(this.root, id, false, this.projectCwd), "history.json");
|
|
375
|
-
if (!fs.existsSync(file))
|
|
376
|
-
return [];
|
|
377
|
-
const value = readJson(file, "schedule history");
|
|
378
|
-
if (value?.schemaVersion !== 1 || !Array.isArray(value.runs))
|
|
379
|
-
throw new Error(`Schedule history '${file}' has invalid fields.`);
|
|
380
|
-
return value.runs;
|
|
381
|
-
}
|
|
382
|
-
/** The run's own receipt; it is written before history.json and is never trimmed. */
|
|
383
|
-
getRun(id, runId) {
|
|
384
|
-
if (!SCHEDULE_ID.test(runId))
|
|
385
|
-
throw new Error(`Invalid schedule run id '${runId}'.`);
|
|
386
|
-
const file = path.join(scheduleDir(this.root, id, false, this.projectCwd), "runs", `${runId}.json`);
|
|
387
|
-
if (!fs.existsSync(file))
|
|
388
|
-
return undefined;
|
|
389
|
-
const run = readJson(file, "schedule run");
|
|
390
|
-
if (run?.id !== runId || run.scheduleId !== id)
|
|
391
|
-
throw new Error(`Schedule run '${file}' has invalid fields.`);
|
|
392
|
-
return run;
|
|
393
|
-
}
|
|
394
|
-
writeRun(schedule, run, event) {
|
|
395
|
-
const dir = scheduleDir(this.root, schedule.id, true, this.projectCwd);
|
|
396
|
-
writePrivateAtomicJson(path.join(dir, "runs", `${run.id}.json`), run);
|
|
397
|
-
// Sessions sharing this project update history.json from their own snapshots.
|
|
398
|
-
withFileLease(path.join(dir, "history.json"), () => {
|
|
399
|
-
// An earlier update may have timed out; a run's own receipt is newer than a "running" entry.
|
|
400
|
-
const earlier = this.history(schedule.id).filter((item) => item.id !== run.id)
|
|
401
|
-
.map((item) => item.state === "running" ? this.getRun(schedule.id, item.id) ?? item : item);
|
|
402
|
-
const runs = [run, ...earlier].slice(0, MAX_HISTORY);
|
|
403
|
-
writePrivateAtomicJson(path.join(dir, "history.json"), { schemaVersion: 1, runs });
|
|
404
|
-
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 });
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
appendEvent(schedule, event) {
|
|
408
|
-
const dir = scheduleDir(this.root, schedule.id, true, this.projectCwd);
|
|
409
|
-
fs.mkdirSync(dir, { recursive: true, mode: 0o700 });
|
|
410
|
-
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 });
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
function resolveMaxPending(config) {
|
|
414
|
-
const value = config.scheduledRuns?.maxPending;
|
|
415
|
-
return typeof value === "number" && Number.isInteger(value) && value >= 1 ? value : DEFAULT_MAX_PENDING;
|
|
416
|
-
}
|
|
417
|
-
function hasPendingScheduleWork(schedule) {
|
|
418
|
-
return schedule.activeRunId !== undefined || schedule.trigger.nextRunAt !== undefined;
|
|
419
|
-
}
|
|
420
|
-
function nextAfter(trigger, plannedAt, now) {
|
|
421
|
-
if (trigger.kind === "once")
|
|
422
|
-
return { ...trigger, nextRunAt: undefined };
|
|
423
|
-
if (trigger.kind === "calendar")
|
|
424
|
-
return {
|
|
425
|
-
...trigger,
|
|
426
|
-
...nextCalendarOccurrence(trigger, Math.max(plannedAt, now), calendarDateAfter(trigger, plannedAt, trigger.nextLocalDate)),
|
|
427
|
-
};
|
|
428
|
-
const next = plannedAt + (Math.floor(Math.max(0, now - plannedAt) / trigger.everyMs) + 1) * trigger.everyMs;
|
|
429
|
-
return { ...trigger, nextRunAt: timestamp(next) };
|
|
430
|
-
}
|
|
431
|
-
function nextRunAt(schedule) {
|
|
432
|
-
const value = schedule.trigger.nextRunAt;
|
|
433
|
-
if (!value)
|
|
434
|
-
return undefined;
|
|
435
|
-
const parsed = Date.parse(value);
|
|
436
|
-
if (!Number.isFinite(parsed))
|
|
437
|
-
throw new Error(`Schedule '${schedule.id}' has invalid nextRunAt.`);
|
|
438
|
-
return parsed;
|
|
439
|
-
}
|
|
440
|
-
function duePlannedAt(schedule, now) {
|
|
441
|
-
const next = nextRunAt(schedule);
|
|
442
|
-
if (next === undefined || next > now || schedule.catchUp !== "latest")
|
|
443
|
-
return next;
|
|
444
|
-
if (schedule.trigger.kind === "calendar")
|
|
445
|
-
return Date.parse(latestCalendarOccurrence(schedule.trigger, now, schedule.trigger.nextLocalDate).nextRunAt);
|
|
446
|
-
if (schedule.trigger.kind === "interval")
|
|
447
|
-
return next + Math.floor((now - next) / schedule.trigger.everyMs) * schedule.trigger.everyMs;
|
|
448
|
-
return next;
|
|
449
|
-
}
|
|
450
|
-
function triggerLabel(trigger) {
|
|
451
|
-
if (trigger.kind === "calendar")
|
|
452
|
-
return `every ${trigger.every}${trigger.on ? ` (${trigger.on.join(", ")})` : ""} at ${trigger.at} ${trigger.timezone}`;
|
|
453
|
-
return trigger.kind === "once" ? `at ${trigger.at}` : `every ${trigger.every}`;
|
|
454
|
-
}
|
|
455
|
-
function textResult(text, schedules, runs, isError = false) {
|
|
456
|
-
const publicSchedules = schedules?.map(publicScheduleRecord);
|
|
457
|
-
return {
|
|
458
|
-
content: [{ type: "text", text }],
|
|
459
|
-
...(isError ? { isError: true } : {}),
|
|
460
|
-
details: { mode: "management", results: [], schedules: { ...(publicSchedules ? { records: publicSchedules } : {}), ...(runs ? { runs } : {}) } },
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
|
-
function publicScheduleRecord(schedule) {
|
|
464
|
-
const { ownerSessionFile: _ownerSessionFile, ...rest } = schedule;
|
|
465
|
-
return rest;
|
|
466
|
-
}
|
|
467
|
-
function targetLabel(target) {
|
|
468
|
-
const preview = previewSimpleWorkflowRun(target.workflowScript);
|
|
469
|
-
return preview?.agent ? `workflow -> agent ${preview.agent}` : "workflow (dynamic)";
|
|
470
|
-
}
|
|
471
|
-
function sanitizeTarget(params) {
|
|
472
|
-
if (params.tasks || params.chain)
|
|
473
|
-
return { error: "Recurring schedules require a workflow script; legacy tasks and chain inputs are unsupported." };
|
|
474
|
-
if (params.agent !== undefined || params.task !== undefined)
|
|
475
|
-
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 })." };
|
|
476
|
-
if (typeof params.workflowScript !== "string" || !params.workflowScript.trim())
|
|
477
|
-
return { error: "schedule.create requires workflow: true or a workflow script path." };
|
|
478
|
-
if (params.context === "fork")
|
|
479
|
-
return { error: "Scheduled runs require fresh context." };
|
|
480
|
-
if (params.async === false)
|
|
481
|
-
return { error: "Scheduled runs are always async." };
|
|
482
|
-
let baseRef;
|
|
483
|
-
let missionId;
|
|
484
|
-
try {
|
|
485
|
-
baseRef = normalizeWorktreeBaseRef(params.baseRef);
|
|
486
|
-
missionId = params.missionId === undefined ? undefined : validateMissionId(params.missionId);
|
|
487
|
-
}
|
|
488
|
-
catch (error) {
|
|
489
|
-
return { error: error instanceof Error ? error.message : String(error) };
|
|
490
|
-
}
|
|
491
|
-
const acceptanceErrors = validateExecutionAcceptance(params);
|
|
492
|
-
if (acceptanceErrors.length)
|
|
493
|
-
return { error: acceptanceErrors.join(" ") };
|
|
494
|
-
const normalizedArgs = normalizeWorkflowArgs(params.args);
|
|
495
|
-
if ("error" in normalizedArgs)
|
|
496
|
-
return { error: normalizedArgs.error };
|
|
497
|
-
return { target: { workflowScript: params.workflowScript.trim(), args: deepFreezeWorkflowArgs(normalizedArgs.args), ...(baseRef === undefined ? {} : { baseRef }), ...(missionId === undefined ? {} : { missionId }) } };
|
|
498
|
-
}
|
|
499
|
-
function executionParams(schedule, quiet = false) {
|
|
500
|
-
return {
|
|
501
|
-
...schedule.target,
|
|
502
|
-
async: true,
|
|
503
|
-
context: "fresh",
|
|
504
|
-
cwd: schedule.cwd,
|
|
505
|
-
...(schedule.target.missionId === undefined ? { mission: false } : {}),
|
|
506
|
-
// Scheduled fires have no operator watching, so completions must name the origin.
|
|
507
|
-
scheduleOrigin: { id: schedule.id, ...(schedule.name ? { name: schedule.name } : {}), ...(quiet ? { quiet: true } : {}) },
|
|
508
|
-
...(schedule.timeoutMs === undefined ? {} : { timeoutMs: schedule.timeoutMs }),
|
|
509
|
-
};
|
|
510
|
-
}
|
|
511
|
-
function snapshotContext(ctx, cwd) {
|
|
512
|
-
const source = ctx.sessionManager;
|
|
513
|
-
const sessionId = source.getSessionId();
|
|
514
|
-
const sessionFile = source.getSessionFile();
|
|
515
|
-
const sessionManager = new Proxy(source, {
|
|
516
|
-
get(target, property) {
|
|
517
|
-
if (property === "getSessionId")
|
|
518
|
-
return () => sessionId;
|
|
519
|
-
if (property === "getSessionFile")
|
|
520
|
-
return () => sessionFile;
|
|
521
|
-
const value = Reflect.get(target, property, target);
|
|
522
|
-
return typeof value === "function" ? value.bind(target) : value;
|
|
523
|
-
},
|
|
524
|
-
});
|
|
525
|
-
return { ...ctx, cwd, sessionManager };
|
|
526
|
-
}
|
|
527
|
-
/**
|
|
528
|
-
* 规范化会话文件路径, 兼容 Windows 路径大小写差异.
|
|
529
|
-
*
|
|
530
|
-
* @param value 会话文件路径
|
|
531
|
-
* @returns 规范化后的路径, 空值时返回 undefined
|
|
532
|
-
*/
|
|
533
|
-
function normalizedSessionFile(value) {
|
|
534
|
-
if (!value || !value.trim())
|
|
535
|
-
return undefined;
|
|
536
|
-
const normalized = path.normalize(path.resolve(value));
|
|
537
|
-
return process.platform === "win32" ? normalized.toLowerCase() : normalized;
|
|
538
|
-
}
|
|
539
|
-
/**
|
|
540
|
-
* 判断 Schedule 是否属于当前 Pi 会话.
|
|
541
|
-
*
|
|
542
|
-
* @param schedule Schedule 记录
|
|
543
|
-
* @param ctx 当前 Pi 会话上下文
|
|
544
|
-
* @returns 是否允许当前会话执行该 Schedule
|
|
545
|
-
*/
|
|
546
|
-
function scheduleBelongsToSession(schedule, ctx) {
|
|
547
|
-
if (schedule.sessionOnly !== true)
|
|
548
|
-
return true;
|
|
549
|
-
const ownerSessionFile = normalizedSessionFile(schedule.ownerSessionFile);
|
|
550
|
-
const currentSessionFile = normalizedSessionFile(ctx.sessionManager.getSessionFile());
|
|
551
|
-
return ownerSessionFile !== undefined && ownerSessionFile === currentSessionFile;
|
|
552
|
-
}
|
|
553
|
-
export function listScheduledRunSummaries(cwd, root) {
|
|
554
|
-
return new ScheduleStore(scheduledRunStorePath(cwd, undefined, root), root === undefined ? path.resolve(cwd) : undefined).list();
|
|
555
|
-
}
|
|
556
|
-
export class ScheduledRunManager {
|
|
557
|
-
store;
|
|
558
|
-
stores = new Map();
|
|
559
|
-
contexts = new Map();
|
|
560
|
-
timers = new Map();
|
|
561
|
-
observedAsyncIds = new Set();
|
|
562
|
-
now;
|
|
563
|
-
randomId;
|
|
564
|
-
timersApi;
|
|
565
|
-
deps;
|
|
566
|
-
constructor(deps) {
|
|
567
|
-
this.deps = deps;
|
|
568
|
-
this.now = deps.now ?? Date.now;
|
|
569
|
-
this.randomId = deps.randomId ?? (() => randomUUID().slice(0, 8));
|
|
570
|
-
this.timersApi = deps.timers ?? globalThis;
|
|
571
|
-
}
|
|
572
|
-
bindSession(ctx) {
|
|
573
|
-
if (!scheduledRunsEnabled(this.deps.config))
|
|
574
|
-
return;
|
|
575
|
-
this.selectProject(ctx.cwd, ctx);
|
|
576
|
-
}
|
|
577
|
-
stop() {
|
|
578
|
-
this.stopTimers();
|
|
579
|
-
this.store = undefined;
|
|
580
|
-
this.stores.clear();
|
|
581
|
-
this.contexts.clear();
|
|
582
|
-
this.observedAsyncIds.clear();
|
|
583
|
-
}
|
|
584
|
-
async handleToolCall(params, ctx) {
|
|
585
|
-
try {
|
|
586
|
-
if (!scheduledRunsEnabled(this.deps.config))
|
|
587
|
-
return textResult("Scheduled runs are disabled by scheduledRuns.enabled=false.", undefined, undefined, true);
|
|
588
|
-
this.selectProject(params.cwd ?? ctx.cwd, ctx);
|
|
589
|
-
switch (params.action) {
|
|
590
|
-
case "schedule.create": return this.create(params, ctx);
|
|
591
|
-
case "schedule.list": return this.list();
|
|
592
|
-
case "schedule.show": return this.show(params);
|
|
593
|
-
case "schedule.history": return this.history(params);
|
|
594
|
-
case "schedule.pause": return this.pause(params, true);
|
|
595
|
-
case "schedule.resume": return this.pause(params, false);
|
|
596
|
-
case "schedule.run": return await this.runManual(params);
|
|
597
|
-
case "schedule.run-due": return await this.runDue();
|
|
598
|
-
case "schedule.delete": return this.remove(params);
|
|
599
|
-
default: return textResult(`Unknown schedule action: ${params.action}`, undefined, undefined, true);
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
catch (error) {
|
|
603
|
-
return textResult(error instanceof Error ? error.message : String(error), undefined, undefined, true);
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
observedCompletionRunIds() {
|
|
607
|
-
return new Set(this.observedAsyncIds);
|
|
608
|
-
}
|
|
609
|
-
referencedAsyncRunIds() {
|
|
610
|
-
const runIds = new Set(this.observedAsyncIds);
|
|
611
|
-
for (const store of this.stores.values()) {
|
|
612
|
-
for (const scheduleId of store.ids()) {
|
|
613
|
-
for (const run of store.history(scheduleId)) {
|
|
614
|
-
if (run.asyncId)
|
|
615
|
-
runIds.add(run.asyncId);
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
return runIds;
|
|
620
|
-
}
|
|
621
|
-
handleAsyncCompletion(payload) {
|
|
622
|
-
if (!payload || typeof payload !== "object")
|
|
623
|
-
return;
|
|
624
|
-
const data = payload;
|
|
625
|
-
const asyncId = typeof data.runId === "string" ? data.runId : typeof data.id === "string" ? data.id : undefined;
|
|
626
|
-
if (!asyncId)
|
|
627
|
-
return;
|
|
628
|
-
for (const store of this.stores.values()) {
|
|
629
|
-
let ids;
|
|
630
|
-
try {
|
|
631
|
-
ids = store.ids();
|
|
632
|
-
}
|
|
633
|
-
catch (error) {
|
|
634
|
-
console.error(`Failed to inspect schedule store '${store.root}' during async completion:`, error);
|
|
635
|
-
continue;
|
|
636
|
-
}
|
|
637
|
-
for (const id of ids) {
|
|
638
|
-
try {
|
|
639
|
-
const schedule = store.get(id);
|
|
640
|
-
const listed = store.history(id).find((item) => item.asyncId === asyncId) ?? this.activeRun(store, schedule);
|
|
641
|
-
// history.json can lag the run's receipt when its update timed out.
|
|
642
|
-
const run = listed && (store.getRun(id, listed.id) ?? listed);
|
|
643
|
-
if (run?.asyncId !== asyncId || run.state !== "running")
|
|
644
|
-
continue;
|
|
645
|
-
this.finishRun(store, schedule, run, data.success === true, typeof data.summary === "string" ? data.summary : undefined);
|
|
646
|
-
return;
|
|
647
|
-
}
|
|
648
|
-
catch (error) {
|
|
649
|
-
console.error(`Failed to inspect schedule '${id}' in '${store.root}' during async completion:`, error);
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
create(params, ctx) {
|
|
655
|
-
const store = this.requireStore();
|
|
656
|
-
const target = sanitizeTarget(params);
|
|
657
|
-
if (target.error)
|
|
658
|
-
return textResult(target.error, undefined, undefined, true);
|
|
659
|
-
const at = params.at?.trim();
|
|
660
|
-
const every = params.every?.trim();
|
|
661
|
-
const calendar = every === "day" || every === "week";
|
|
662
|
-
if (!calendar && Boolean(at) === Boolean(every))
|
|
663
|
-
return textResult("schedule.create requires exactly one trigger: at or every.", undefined, undefined, true);
|
|
664
|
-
if (params.overlap !== undefined && params.overlap !== "skip")
|
|
665
|
-
return textResult("This first recurring slice supports overlap='skip' only.", undefined, undefined, true);
|
|
666
|
-
if (params.catchUp !== undefined && params.catchUp !== "none" && params.catchUp !== "latest")
|
|
667
|
-
return textResult("catchUp must be 'none' or 'latest'.", undefined, undefined, true);
|
|
668
|
-
if (params.mission !== undefined || params.missionUpdate !== undefined || params.missionStatus !== undefined || params.missionScope !== undefined)
|
|
669
|
-
return textResult("Schedules accept only an existing missionId; mission creation and updates are unsupported.", undefined, undefined, true);
|
|
670
|
-
if (!calendar && (params.on !== undefined || params.timezone !== undefined))
|
|
671
|
-
return textResult("on and timezone require every:'day' or every:'week'.", undefined, undefined, true);
|
|
672
|
-
if (params.quiet !== undefined && typeof params.quiet !== "boolean")
|
|
673
|
-
return textResult("quiet must be a boolean.", undefined, undefined, true);
|
|
674
|
-
if (!calendar && at && params.quiet === true)
|
|
675
|
-
return textResult("quiet is only supported for recurring schedules.", undefined, undefined, true);
|
|
676
|
-
const sessionOnly = params.sessionOnly === true;
|
|
677
|
-
if (sessionOnly && params.cwd !== undefined && !samePath(params.cwd, ctx.cwd))
|
|
678
|
-
return textResult("sessionOnly schedules cannot use an explicit cross-project cwd.", undefined, undefined, true);
|
|
679
|
-
const ownerSessionFile = sessionOnly ? ctx.sessionManager.getSessionFile() : undefined;
|
|
680
|
-
if (sessionOnly && !ownerSessionFile)
|
|
681
|
-
return textResult("sessionOnly schedules require a persisted current session.", undefined, undefined, true);
|
|
682
|
-
if (target.target.missionId !== undefined) {
|
|
683
|
-
readMission(resolveMissionStoreLocation({ projectRoot: path.resolve(params.cwd ?? ctx.cwd), ...(this.deps.config.missions ? { config: this.deps.config.missions } : {}) }), target.target.missionId);
|
|
684
|
-
}
|
|
685
|
-
const sessionId = ctx.sessionManager.getSessionId() ?? "unknown";
|
|
686
|
-
if (this.deps.resolveCapabilityCeiling?.(sessionId))
|
|
687
|
-
return textResult("Cannot persist a schedule while a capability ceiling is active.", undefined, undefined, true);
|
|
688
|
-
const pendingCount = store.list().filter(hasPendingScheduleWork).length;
|
|
689
|
-
const maxPending = resolveMaxPending(this.deps.config);
|
|
690
|
-
if (pendingCount >= maxPending)
|
|
691
|
-
return textResult(`Schedule limit reached (${maxPending}).`, undefined, undefined, true);
|
|
692
|
-
const id = validateScheduleId((params.id?.trim() || this.randomId()));
|
|
693
|
-
if (store.ids().includes(id))
|
|
694
|
-
return textResult(`Schedule '${id}' already exists.`, undefined, undefined, true);
|
|
695
|
-
const now = this.now();
|
|
696
|
-
let trigger;
|
|
697
|
-
if (calendar) {
|
|
698
|
-
const rule = normalizeCalendarRule({ every, at, on: params.on, timezone: params.timezone });
|
|
699
|
-
trigger = { kind: "calendar", ...rule, ...nextCalendarOccurrence(rule, now) };
|
|
700
|
-
}
|
|
701
|
-
else if (at) {
|
|
702
|
-
const planned = parseScheduledRunTime(at, now);
|
|
703
|
-
trigger = { kind: "once", at, nextRunAt: timestamp(planned) };
|
|
704
|
-
}
|
|
705
|
-
else {
|
|
706
|
-
const everyMs = parseScheduleInterval(every);
|
|
707
|
-
trigger = { kind: "interval", every: every, everyMs, anchorAt: timestamp(now), nextRunAt: timestamp(now + everyMs) };
|
|
708
|
-
}
|
|
709
|
-
const schedule = {
|
|
710
|
-
// Older readers ignore unknown target fields; they must reject mission-bound definitions.
|
|
711
|
-
schemaVersion: target.target.missionId === undefined ? 1 : 2,
|
|
712
|
-
id,
|
|
713
|
-
name: params.name?.trim() || targetLabel(target.target),
|
|
714
|
-
cwd: path.resolve(params.cwd ?? ctx.cwd),
|
|
715
|
-
trigger,
|
|
716
|
-
target: target.target,
|
|
717
|
-
overlap: "skip",
|
|
718
|
-
catchUp: params.catchUp ?? "latest",
|
|
719
|
-
...(params.timeoutMs === undefined ? {} : { timeoutMs: params.timeoutMs }),
|
|
720
|
-
paused: false,
|
|
721
|
-
...(sessionOnly ? { sessionOnly: true, ownerSessionFile: path.resolve(ownerSessionFile) } : {}),
|
|
722
|
-
...(trigger.kind !== "once" && params.quiet === true ? { quiet: true } : {}),
|
|
723
|
-
createdAt: timestamp(now),
|
|
724
|
-
updatedAt: timestamp(now),
|
|
725
|
-
};
|
|
726
|
-
store.write(schedule);
|
|
727
|
-
store.appendEvent(schedule, "schedule.created");
|
|
728
|
-
this.arm(schedule, store);
|
|
729
|
-
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]);
|
|
730
|
-
}
|
|
731
|
-
list() {
|
|
732
|
-
const schedules = this.requireStore().list().sort((a, b) => (a.trigger.nextRunAt ?? "").localeCompare(b.trigger.nextRunAt ?? ""));
|
|
733
|
-
if (!schedules.length)
|
|
734
|
-
return textResult("No project schedules.", []);
|
|
735
|
-
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);
|
|
736
|
-
}
|
|
737
|
-
show(params) {
|
|
738
|
-
const schedule = this.resolve(params);
|
|
739
|
-
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]);
|
|
740
|
-
}
|
|
741
|
-
history(params) {
|
|
742
|
-
const schedule = this.resolve(params);
|
|
743
|
-
const runs = this.requireStore().history(schedule.id);
|
|
744
|
-
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);
|
|
745
|
-
}
|
|
746
|
-
pause(params, paused) {
|
|
747
|
-
const schedule = this.resolve(params);
|
|
748
|
-
if (schedule.paused === paused)
|
|
749
|
-
return textResult(`Schedule ${schedule.id} is already ${paused ? "paused" : "active"}.`, [schedule]);
|
|
750
|
-
schedule.paused = paused;
|
|
751
|
-
schedule.updatedAt = timestamp(this.now());
|
|
752
|
-
this.requireStore().write(schedule);
|
|
753
|
-
this.requireStore().appendEvent(schedule, paused ? "schedule.paused" : "schedule.resumed");
|
|
754
|
-
const store = this.requireStore();
|
|
755
|
-
if (paused)
|
|
756
|
-
this.clearTimer(store, schedule.id);
|
|
757
|
-
else
|
|
758
|
-
this.restoreOne(store, schedule);
|
|
759
|
-
return textResult(`${paused ? "Paused" : "Resumed"} schedule ${schedule.id}.`, [schedule]);
|
|
760
|
-
}
|
|
761
|
-
async runManual(params) {
|
|
762
|
-
const store = this.requireStore();
|
|
763
|
-
const schedule = this.resolve(params);
|
|
764
|
-
const context = this.requireContext(store);
|
|
765
|
-
if (!scheduleBelongsToSession(schedule, context)) {
|
|
766
|
-
return textResult(`Skipped schedule ${schedule.id}: current session is not its owner.`, [schedule]);
|
|
767
|
-
}
|
|
768
|
-
if (params.quiet !== undefined && typeof params.quiet !== "boolean")
|
|
769
|
-
return textResult("quiet must be a boolean.", undefined, undefined, true);
|
|
770
|
-
const manualTrigger = schedule.trigger;
|
|
771
|
-
const run = await this.launch(store, schedule, this.now(), "manual", false, params.quiet === true);
|
|
772
|
-
const updated = store.get(schedule.id);
|
|
773
|
-
if (run.state === "running") {
|
|
774
|
-
const now = this.now();
|
|
775
|
-
if (updated.trigger.kind === "calendar") {
|
|
776
|
-
if (manualTrigger.kind !== "calendar")
|
|
777
|
-
throw new Error("Schedule trigger changed during manual launch.");
|
|
778
|
-
const consumed = latestCalendarOccurrence(manualTrigger, now, manualTrigger.nextLocalDate)?.nextRunAt ?? manualTrigger.nextRunAt;
|
|
779
|
-
const advanced = nextAfter(manualTrigger, Date.parse(consumed), now);
|
|
780
|
-
if (advanced.nextLocalDate > updated.trigger.nextLocalDate)
|
|
781
|
-
updated.trigger = advanced;
|
|
782
|
-
}
|
|
783
|
-
else if (updated.trigger.kind === "interval")
|
|
784
|
-
updated.trigger.nextRunAt = timestamp(now + updated.trigger.everyMs);
|
|
785
|
-
else
|
|
786
|
-
updated.trigger.nextRunAt = undefined;
|
|
787
|
-
updated.updatedAt = timestamp(now);
|
|
788
|
-
store.write(updated);
|
|
789
|
-
store.appendEvent(updated, "schedule.manual_satisfied");
|
|
790
|
-
this.arm(updated, store);
|
|
791
|
-
}
|
|
792
|
-
return textResult(`Manual schedule run ${run.id}: ${run.state}${run.asyncId ? ` (async ${run.asyncId})` : ""}.`, [store.get(schedule.id)], [run], run.state === "failed_launch");
|
|
793
|
-
}
|
|
794
|
-
async runDue() {
|
|
795
|
-
const store = this.requireStore();
|
|
796
|
-
const context = this.requireContext(store);
|
|
797
|
-
const due = store.list().filter((schedule) => scheduleBelongsToSession(schedule, context) && !schedule.paused && nextRunAt(schedule) !== undefined && nextRunAt(schedule) <= this.now());
|
|
798
|
-
const runs = [];
|
|
799
|
-
for (const schedule of due) {
|
|
800
|
-
const planned = duePlannedAt(schedule, this.now());
|
|
801
|
-
if (!schedule.activeRunId && schedule.catchUp === "none" && planned < this.now())
|
|
802
|
-
runs.push(this.recordMissed(store, schedule, planned, "run-due"));
|
|
803
|
-
else
|
|
804
|
-
runs.push(await this.launch(store, schedule, planned, "run-due", true));
|
|
805
|
-
}
|
|
806
|
-
return textResult(runs.length ? `Processed ${runs.length} due schedule(s).` : "No schedules are due.", store.list(), runs);
|
|
807
|
-
}
|
|
808
|
-
remove(params) {
|
|
809
|
-
const schedule = this.resolve(params);
|
|
810
|
-
const store = this.requireStore();
|
|
811
|
-
if (schedule.activeRunId) {
|
|
812
|
-
const run = this.activeRun(store, schedule);
|
|
813
|
-
let terminal = false;
|
|
814
|
-
if (run?.scheduleId === schedule.id && run.state === "running" && run.asyncId && run.asyncDir) {
|
|
815
|
-
const status = readJson(path.join(run.asyncDir, "status.json"), "async status");
|
|
816
|
-
terminal = status.runId === run.asyncId && typeof status.state === "string" && ["complete", "failed", "stopped", "rejected"].includes(status.state);
|
|
817
|
-
}
|
|
818
|
-
if (!terminal)
|
|
819
|
-
return textResult(`Schedule ${schedule.id} has active run ${schedule.activeRunId}; stop that run before deleting the schedule.`, [schedule], undefined, true);
|
|
820
|
-
}
|
|
821
|
-
this.clearTimer(store, schedule.id);
|
|
822
|
-
store.appendEvent(schedule, "schedule.deleted");
|
|
823
|
-
store.delete(schedule.id);
|
|
824
|
-
return textResult(`Deleted schedule ${schedule.id}.`);
|
|
825
|
-
}
|
|
826
|
-
restore(store) {
|
|
827
|
-
for (const schedule of store.list())
|
|
828
|
-
this.restoreOne(store, schedule);
|
|
829
|
-
}
|
|
830
|
-
restoreOne(store, schedule, notBefore, rearm = true) {
|
|
831
|
-
if (!scheduleBelongsToSession(schedule, this.requireContext(store)))
|
|
832
|
-
return;
|
|
833
|
-
if (schedule.trigger.kind === "calendar") {
|
|
834
|
-
const refreshed = restoreCalendarTrigger(schedule.trigger);
|
|
835
|
-
if (JSON.stringify(refreshed) !== JSON.stringify(schedule.trigger)) {
|
|
836
|
-
schedule.trigger = refreshed;
|
|
837
|
-
schedule.updatedAt = timestamp(this.now());
|
|
838
|
-
store.write(schedule);
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
if (schedule.activeRunId) {
|
|
842
|
-
const run = this.activeRun(store, schedule);
|
|
843
|
-
if (run?.state === "running" && run.asyncId)
|
|
844
|
-
this.observedAsyncIds.add(run.asyncId);
|
|
845
|
-
const startedAt = run?.startedAt ? Date.parse(run.startedAt) : Number.NaN;
|
|
846
|
-
const outcome = this.terminalAsyncOutcome(run);
|
|
847
|
-
if (run && outcome) {
|
|
848
|
-
// Restore releases a dead or terminal claim at most once and never re-enters itself. On success it continues
|
|
849
|
-
// to the existing policy code below with the latest record. On failure it arms the schedule from disk, so the
|
|
850
|
-
// next fire retries the release, and the original error propagates unchanged.
|
|
851
|
-
let latest;
|
|
852
|
-
try {
|
|
853
|
-
latest = this.finishRun(store, schedule, run, outcome.success, outcome.error, true) ?? store.find(schedule.id);
|
|
854
|
-
}
|
|
855
|
-
catch (error) {
|
|
856
|
-
if (rearm) {
|
|
857
|
-
try {
|
|
858
|
-
const current = store.find(schedule.id);
|
|
859
|
-
if (current)
|
|
860
|
-
this.arm(current, store, notBefore);
|
|
861
|
-
}
|
|
862
|
-
catch { /* Keep the release error. */ }
|
|
863
|
-
}
|
|
864
|
-
throw error;
|
|
865
|
-
}
|
|
866
|
-
if (!latest) {
|
|
867
|
-
this.clearTimer(store, schedule.id);
|
|
868
|
-
return;
|
|
869
|
-
}
|
|
870
|
-
schedule = latest;
|
|
871
|
-
}
|
|
872
|
-
if (schedule.activeRunId && (!run || run.state !== "running" || (!run.asyncId && Number.isFinite(startedAt) && startedAt + STALE_LAUNCH_CLAIM_MS <= this.now()))) {
|
|
873
|
-
if (run?.state === "running") {
|
|
874
|
-
run.state = "failed_launch";
|
|
875
|
-
run.completedAt = timestamp(this.now());
|
|
876
|
-
run.error = "Recovered a stale launch claim before an async run was attached.";
|
|
877
|
-
store.writeRun(schedule, run, "schedule.run.failed");
|
|
878
|
-
}
|
|
879
|
-
schedule.activeRunId = undefined;
|
|
880
|
-
schedule.updatedAt = timestamp(this.now());
|
|
881
|
-
store.write(schedule);
|
|
882
|
-
fs.rmSync(path.join(store.directory(schedule.id), "active.lock"), { force: true });
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
if (!rearm || schedule.paused)
|
|
886
|
-
return;
|
|
887
|
-
const next = nextRunAt(schedule);
|
|
888
|
-
if (next === undefined)
|
|
889
|
-
return;
|
|
890
|
-
if (!schedule.activeRunId && next < this.now() && schedule.catchUp === "none") {
|
|
891
|
-
try {
|
|
892
|
-
this.recordMissed(store, schedule, next, "timer");
|
|
893
|
-
}
|
|
894
|
-
catch (error) {
|
|
895
|
-
if (notBefore !== undefined)
|
|
896
|
-
this.arm(schedule, store, notBefore);
|
|
897
|
-
throw error;
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
this.arm(schedule, store, notBefore);
|
|
901
|
-
}
|
|
902
|
-
arm(schedule, store, notBefore) {
|
|
903
|
-
this.clearTimer(store, schedule.id);
|
|
904
|
-
if (schedule.paused)
|
|
905
|
-
return;
|
|
906
|
-
const next = nextRunAt(schedule);
|
|
907
|
-
if (next === undefined)
|
|
908
|
-
return;
|
|
909
|
-
const timer = this.timersApi.setTimeout(() => {
|
|
910
|
-
// A timer callback is outside every caller's try/catch, so an escaping
|
|
911
|
-
// rejection here reaches the process as an uncaught exception and exits
|
|
912
|
-
// Pi. Contain every failure to this one schedule.
|
|
913
|
-
void this.fire(store, schedule.id).catch((error) => {
|
|
914
|
-
console.warn(`[pi-subagents] Scheduled run '${schedule.id}' failed to fire: ${error instanceof Error ? error.message : String(error)}`);
|
|
915
|
-
this.restoreAfterFireError(store, schedule.id);
|
|
916
|
-
});
|
|
917
|
-
}, Math.min(Math.max(0, next - this.now(), (notBefore ?? 0) - this.now()), MAX_TIMER_DELAY_MS));
|
|
918
|
-
timer.unref?.();
|
|
919
|
-
this.timers.set(this.timerKey(store, schedule.id), timer);
|
|
920
|
-
}
|
|
921
|
-
restoreAfterFireError(store, id) {
|
|
922
|
-
try {
|
|
923
|
-
const schedule = store.find(id);
|
|
924
|
-
if (!schedule)
|
|
925
|
-
return;
|
|
926
|
-
const now = this.now();
|
|
927
|
-
const planned = schedule.trigger.kind !== "once" ? duePlannedAt(schedule, now) : undefined;
|
|
928
|
-
const notBefore = planned !== undefined && planned <= now ? Date.parse(nextAfter(schedule.trigger, planned, now).nextRunAt) : undefined;
|
|
929
|
-
this.restoreOne(store, schedule, notBefore, schedule.trigger.kind !== "once");
|
|
930
|
-
}
|
|
931
|
-
catch (error) {
|
|
932
|
-
console.warn(`[pi-subagents] Scheduled run '${id}' could not be restored after fire failure: ${error instanceof Error ? error.message : String(error)}`);
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
async fire(store, id) {
|
|
936
|
-
this.clearTimer(store, id);
|
|
937
|
-
// Schedules are project-scoped and shared, and `delete` only clears the
|
|
938
|
-
// timer inside the deleting process. Another session can therefore remove
|
|
939
|
-
// a schedule while this process still holds an armed timer for it; there
|
|
940
|
-
// is then nothing to run and nothing to re-arm.
|
|
941
|
-
const schedule = store.find(id);
|
|
942
|
-
if (!schedule)
|
|
943
|
-
return;
|
|
944
|
-
if (!scheduleBelongsToSession(schedule, this.requireContext(store)))
|
|
945
|
-
return;
|
|
946
|
-
const planned = duePlannedAt(schedule, this.now());
|
|
947
|
-
if (planned === undefined || schedule.paused)
|
|
948
|
-
return;
|
|
949
|
-
if (planned > this.now())
|
|
950
|
-
return this.arm(schedule, store);
|
|
951
|
-
await this.launch(store, schedule, planned, "timer", true);
|
|
952
|
-
}
|
|
953
|
-
async launch(store, schedule, planned, dueReason, advance, quiet) {
|
|
954
|
-
const now = this.now();
|
|
955
|
-
const nextRunAtBeforeClaim = schedule.trigger.nextRunAt;
|
|
956
|
-
const nextLocalDateBeforeClaim = schedule.trigger.kind === "calendar" ? schedule.trigger.nextLocalDate : undefined;
|
|
957
|
-
const run = { schemaVersion: 1, id: this.randomId(), scheduleId: schedule.id, plannedAt: timestamp(planned), dueReason, state: "running", startedAt: timestamp(now) };
|
|
958
|
-
if (schedule.activeRunId) {
|
|
959
|
-
let active;
|
|
960
|
-
let outcome;
|
|
961
|
-
try {
|
|
962
|
-
active = this.activeRun(store, schedule);
|
|
963
|
-
outcome = this.terminalAsyncOutcome(active);
|
|
964
|
-
}
|
|
965
|
-
catch (error) {
|
|
966
|
-
console.warn(`[pi-subagents] Could not reconcile active run '${schedule.activeRunId}' of schedule '${schedule.id}': ${error instanceof Error ? error.message : String(error)}`);
|
|
967
|
-
}
|
|
968
|
-
// A dead runner's completion never reaches this schedule, so its claim would skip every later fire.
|
|
969
|
-
if (active && outcome) {
|
|
970
|
-
const released = this.finishRun(store, schedule, active, outcome.success, outcome.error, true);
|
|
971
|
-
// Another session already released or re-claimed that run for this occurrence.
|
|
972
|
-
if (!released)
|
|
973
|
-
return this.skipLostClaim(store, schedule.id, run, planned, now);
|
|
974
|
-
schedule = released;
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
|
-
if (schedule.activeRunId) {
|
|
978
|
-
run.state = "skipped";
|
|
979
|
-
run.completedAt = timestamp(now);
|
|
980
|
-
if (advance) {
|
|
981
|
-
schedule.trigger = nextAfter(schedule.trigger, planned, now);
|
|
982
|
-
schedule.updatedAt = timestamp(now);
|
|
983
|
-
store.write(schedule);
|
|
984
|
-
}
|
|
985
|
-
store.writeRun(schedule, run, "schedule.skipped_overlap");
|
|
986
|
-
this.arm(schedule, store);
|
|
987
|
-
return run;
|
|
988
|
-
}
|
|
989
|
-
const lockPath = path.join(store.directory(schedule.id, true), "active.lock");
|
|
990
|
-
fs.mkdirSync(path.dirname(lockPath), { recursive: true, mode: 0o700 });
|
|
991
|
-
let lock;
|
|
992
|
-
try {
|
|
993
|
-
lock = fs.openSync(lockPath, "wx", 0o600);
|
|
994
|
-
fs.writeFileSync(lock, run.id, "utf-8");
|
|
995
|
-
fs.closeSync(lock);
|
|
996
|
-
}
|
|
997
|
-
catch (error) {
|
|
998
|
-
if (lock !== undefined) {
|
|
999
|
-
// An empty or partial claim would make every later launch skip. Keep the
|
|
1000
|
-
// descriptor open until the inode check so a replacement owner's lock survives.
|
|
1001
|
-
try {
|
|
1002
|
-
// Bigint stats: Windows file ids exceed 2^53, so number inodes of nearby files can compare equal.
|
|
1003
|
-
const owned = fs.fstatSync(lock, { bigint: true });
|
|
1004
|
-
const current = fs.lstatSync(lockPath, { bigint: true });
|
|
1005
|
-
if (owned.ino !== 0n && owned.dev === current.dev && owned.ino === current.ino)
|
|
1006
|
-
fs.rmSync(lockPath);
|
|
1007
|
-
}
|
|
1008
|
-
catch { /* Preserve the original error. */ }
|
|
1009
|
-
try {
|
|
1010
|
-
fs.closeSync(lock);
|
|
1011
|
-
}
|
|
1012
|
-
catch { /* Preserve the original error. */ }
|
|
1013
|
-
throw error;
|
|
1014
|
-
}
|
|
1015
|
-
if (error.code !== "EEXIST")
|
|
1016
|
-
throw error;
|
|
1017
|
-
return this.skipLostClaim(store, schedule.id, run, planned, now);
|
|
1018
|
-
}
|
|
1019
|
-
schedule.activeRunId = run.id;
|
|
1020
|
-
schedule.lastRunId = run.id;
|
|
1021
|
-
if (advance)
|
|
1022
|
-
schedule.trigger = nextAfter(schedule.trigger, planned, now);
|
|
1023
|
-
schedule.updatedAt = timestamp(now);
|
|
1024
|
-
try {
|
|
1025
|
-
store.write(schedule);
|
|
1026
|
-
store.writeRun(schedule, run, "schedule.run.started");
|
|
1027
|
-
}
|
|
1028
|
-
catch (error) {
|
|
1029
|
-
// No child has launched: release this run's claim, then report the original error.
|
|
1030
|
-
// Another session may already have recovered the claim and launched its own run.
|
|
1031
|
-
try {
|
|
1032
|
-
const latest = store.find(schedule.id);
|
|
1033
|
-
if (latest?.activeRunId === run.id) {
|
|
1034
|
-
latest.activeRunId = undefined;
|
|
1035
|
-
latest.updatedAt = timestamp(this.now());
|
|
1036
|
-
store.write(latest);
|
|
1037
|
-
}
|
|
1038
|
-
if (fs.readFileSync(lockPath, "utf-8") === run.id)
|
|
1039
|
-
fs.rmSync(lockPath);
|
|
1040
|
-
}
|
|
1041
|
-
catch (cleanupError) {
|
|
1042
|
-
console.warn(`[pi-subagents] Could not release schedule claim '${run.id}': ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}`);
|
|
1043
|
-
}
|
|
1044
|
-
throw error;
|
|
1045
|
-
}
|
|
1046
|
-
try {
|
|
1047
|
-
const result = await this.deps.launch(executionParams(schedule, dueReason === "manual" ? quiet === true : schedule.quiet === true), this.requireContext(store), new AbortController().signal);
|
|
1048
|
-
const asyncId = result.details?.asyncId ?? result.details?.runId;
|
|
1049
|
-
if (result.isError || !asyncId)
|
|
1050
|
-
throw new Error(result.content.find((item) => item.type === "text")?.text ?? "Scheduled launch failed.");
|
|
1051
|
-
run.asyncId = asyncId;
|
|
1052
|
-
run.asyncDir = result.details?.asyncDir;
|
|
1053
|
-
this.observedAsyncIds.add(asyncId);
|
|
1054
|
-
store.writeRun(schedule, run, "schedule.run.attached_async");
|
|
1055
|
-
this.arm(schedule, store);
|
|
1056
|
-
return run;
|
|
1057
|
-
}
|
|
1058
|
-
catch (error) {
|
|
1059
|
-
// The child is running, so its claim stays until completion.
|
|
1060
|
-
if (run.asyncId)
|
|
1061
|
-
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 });
|
|
1062
|
-
run.state = "failed_launch";
|
|
1063
|
-
run.completedAt = timestamp(this.now());
|
|
1064
|
-
run.error = error instanceof Error ? error.message : String(error);
|
|
1065
|
-
const latest = store.get(schedule.id);
|
|
1066
|
-
latest.activeRunId = undefined;
|
|
1067
|
-
if (!advance && nextRunAtBeforeClaim) {
|
|
1068
|
-
if (latest.trigger.kind === "calendar") {
|
|
1069
|
-
// An overlapping timer may have advanced both cursor fields while
|
|
1070
|
-
// this manual attachment was pending. Failure satisfies neither.
|
|
1071
|
-
if (nextLocalDateBeforeClaim !== undefined) {
|
|
1072
|
-
latest.trigger.nextLocalDate = nextLocalDateBeforeClaim;
|
|
1073
|
-
latest.trigger.nextRunAt = nextRunAtBeforeClaim;
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
else
|
|
1077
|
-
latest.trigger.nextRunAt = nextRunAtBeforeClaim;
|
|
1078
|
-
}
|
|
1079
|
-
latest.updatedAt = timestamp(this.now());
|
|
1080
|
-
store.write(latest);
|
|
1081
|
-
fs.rmSync(lockPath, { force: true });
|
|
1082
|
-
try {
|
|
1083
|
-
store.writeRun(latest, run, "schedule.run.failed");
|
|
1084
|
-
}
|
|
1085
|
-
finally {
|
|
1086
|
-
this.arm(latest, store);
|
|
1087
|
-
}
|
|
1088
|
-
return run;
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
/**
|
|
1092
|
-
* `releaseOnly` releases a dead run's claim and leaves the pending occurrence to the caller: it neither skips nor re-arms it.
|
|
1093
|
-
* It acts only while the schedule on disk still names that run, and returns the record it wrote, or undefined when another
|
|
1094
|
-
* session already released or re-claimed it.
|
|
1095
|
-
*/
|
|
1096
|
-
finishRun(store, schedule, run, success, error, releaseOnly = false) {
|
|
1097
|
-
const now = this.now();
|
|
1098
|
-
if (run.asyncId)
|
|
1099
|
-
this.observedAsyncIds.delete(run.asyncId);
|
|
1100
|
-
if (releaseOnly) {
|
|
1101
|
-
const latest = store.find(schedule.id);
|
|
1102
|
-
if (latest?.activeRunId !== run.id)
|
|
1103
|
-
return undefined;
|
|
1104
|
-
schedule = latest;
|
|
1105
|
-
}
|
|
1106
|
-
const next = nextRunAt(schedule);
|
|
1107
|
-
let skipped;
|
|
1108
|
-
if (!releaseOnly && next !== undefined && next <= now) {
|
|
1109
|
-
const planned = duePlannedAt(schedule, now);
|
|
1110
|
-
skipped = {
|
|
1111
|
-
schemaVersion: 1,
|
|
1112
|
-
id: this.randomId(),
|
|
1113
|
-
scheduleId: schedule.id,
|
|
1114
|
-
plannedAt: timestamp(planned),
|
|
1115
|
-
dueReason: "timer",
|
|
1116
|
-
state: "skipped",
|
|
1117
|
-
completedAt: timestamp(now),
|
|
1118
|
-
};
|
|
1119
|
-
schedule.trigger = nextAfter(schedule.trigger, planned, now);
|
|
1120
|
-
}
|
|
1121
|
-
run.state = success ? "completed" : "failed_run";
|
|
1122
|
-
run.completedAt = timestamp(now);
|
|
1123
|
-
if (!success && error)
|
|
1124
|
-
run.error = error;
|
|
1125
|
-
schedule.activeRunId = undefined;
|
|
1126
|
-
schedule.updatedAt = timestamp(now);
|
|
1127
|
-
store.write(schedule);
|
|
1128
|
-
const lockPath = path.join(store.directory(schedule.id), "active.lock");
|
|
1129
|
-
// A released dead run's lock may already belong to another session's newer claim.
|
|
1130
|
-
let holder;
|
|
1131
|
-
if (releaseOnly)
|
|
1132
|
-
try {
|
|
1133
|
-
holder = fs.readFileSync(lockPath, "utf-8");
|
|
1134
|
-
}
|
|
1135
|
-
catch { /* No readable lock names this run. */ }
|
|
1136
|
-
if (!releaseOnly || holder === run.id)
|
|
1137
|
-
fs.rmSync(lockPath, { force: true });
|
|
1138
|
-
// The schedule is already released; a history.json timeout must not leave it unarmed.
|
|
1139
|
-
try {
|
|
1140
|
-
store.writeRun(schedule, run, success ? "schedule.run.completed" : "schedule.run.failed");
|
|
1141
|
-
if (skipped)
|
|
1142
|
-
store.writeRun(schedule, skipped, "schedule.skipped_overlap");
|
|
1143
|
-
}
|
|
1144
|
-
finally {
|
|
1145
|
-
if (!releaseOnly)
|
|
1146
|
-
this.arm(schedule, store);
|
|
1147
|
-
}
|
|
1148
|
-
return schedule;
|
|
1149
|
-
}
|
|
1150
|
-
skipLostClaim(store, scheduleId, run, planned, now) {
|
|
1151
|
-
run.state = "skipped";
|
|
1152
|
-
run.completedAt = timestamp(now);
|
|
1153
|
-
// Losing the claim gives this snapshot no authority to change the owner.
|
|
1154
|
-
const latest = store.find(scheduleId);
|
|
1155
|
-
if (!latest) {
|
|
1156
|
-
this.clearTimer(store, scheduleId);
|
|
1157
|
-
return run;
|
|
1158
|
-
}
|
|
1159
|
-
store.writeRun(latest, run, "schedule.skipped_overlap");
|
|
1160
|
-
if (latest.trigger.kind === "once") {
|
|
1161
|
-
this.clearTimer(store, latest.id);
|
|
1162
|
-
}
|
|
1163
|
-
else {
|
|
1164
|
-
// The owner may hold the lock before persisting its cursor. Back off
|
|
1165
|
-
// locally without consuming that pending occurrence on disk.
|
|
1166
|
-
const next = nextRunAt(latest);
|
|
1167
|
-
const notBefore = next !== undefined && next <= now
|
|
1168
|
-
? Date.parse(nextAfter(latest.trigger, duePlannedAt(latest, now) ?? planned, now).nextRunAt)
|
|
1169
|
-
: undefined;
|
|
1170
|
-
this.arm(latest, store, notBefore);
|
|
1171
|
-
}
|
|
1172
|
-
return run;
|
|
1173
|
-
}
|
|
1174
|
-
recordMissed(store, schedule, planned, dueReason) {
|
|
1175
|
-
const run = {
|
|
1176
|
-
schemaVersion: 1,
|
|
1177
|
-
id: this.randomId(),
|
|
1178
|
-
scheduleId: schedule.id,
|
|
1179
|
-
plannedAt: timestamp(planned),
|
|
1180
|
-
dueReason,
|
|
1181
|
-
state: "missed",
|
|
1182
|
-
completedAt: timestamp(this.now()),
|
|
1183
|
-
};
|
|
1184
|
-
schedule.trigger = nextAfter(schedule.trigger, planned, this.now());
|
|
1185
|
-
schedule.updatedAt = timestamp(this.now());
|
|
1186
|
-
store.write(schedule);
|
|
1187
|
-
store.writeRun(schedule, run, "schedule.missed");
|
|
1188
|
-
return run;
|
|
1189
|
-
}
|
|
1190
|
-
selectProject(cwd, ctx) {
|
|
1191
|
-
const projectCwd = path.resolve(cwd);
|
|
1192
|
-
const root = scheduledRunStorePath(projectCwd, undefined, this.deps.storeRoot);
|
|
1193
|
-
const isBoundContext = path.resolve(ctx.cwd) === projectCwd;
|
|
1194
|
-
const previousContext = this.contexts.get(root);
|
|
1195
|
-
const contextChanged = isBoundContext
|
|
1196
|
-
&& previousContext !== undefined
|
|
1197
|
-
&& normalizedSessionFile(previousContext.sessionManager.getSessionFile()) !== normalizedSessionFile(ctx.sessionManager.getSessionFile());
|
|
1198
|
-
if (isBoundContext)
|
|
1199
|
-
this.contexts.set(root, snapshotContext(ctx, projectCwd));
|
|
1200
|
-
else if (!this.contexts.has(root))
|
|
1201
|
-
throw new Error(`Cannot use project '${projectCwd}' until that project has been opened in this runtime.`);
|
|
1202
|
-
let store = this.stores.get(root);
|
|
1203
|
-
if (!store) {
|
|
1204
|
-
store = new ScheduleStore(root, this.deps.storeRoot === undefined ? projectCwd : undefined);
|
|
1205
|
-
this.stores.set(root, store);
|
|
1206
|
-
this.restore(store);
|
|
1207
|
-
}
|
|
1208
|
-
else if (contextChanged) {
|
|
1209
|
-
this.restore(store);
|
|
1210
|
-
}
|
|
1211
|
-
this.store = store;
|
|
1212
|
-
}
|
|
1213
|
-
resolve(params) {
|
|
1214
|
-
const id = params.id?.trim();
|
|
1215
|
-
if (!id)
|
|
1216
|
-
throw new Error(`${params.action} requires id.`);
|
|
1217
|
-
return this.requireStore().get(id);
|
|
1218
|
-
}
|
|
1219
|
-
requireStore() {
|
|
1220
|
-
if (!this.store)
|
|
1221
|
-
throw new Error("Schedule store is unavailable.");
|
|
1222
|
-
return this.store;
|
|
1223
|
-
}
|
|
1224
|
-
requireContext(store) {
|
|
1225
|
-
const ctx = this.contexts.get(store.root);
|
|
1226
|
-
if (!ctx)
|
|
1227
|
-
throw new Error("Schedule runtime context is unavailable.");
|
|
1228
|
-
return ctx;
|
|
1229
|
-
}
|
|
1230
|
-
activeRun(store, schedule) {
|
|
1231
|
-
if (!schedule.activeRunId)
|
|
1232
|
-
return undefined;
|
|
1233
|
-
return store.getRun(schedule.id, schedule.activeRunId) ?? store.history(schedule.id).find((run) => run.id === schedule.activeRunId);
|
|
1234
|
-
}
|
|
1235
|
-
/** Reconciles an attached running run (a dead runner PID becomes failed) and returns its outcome once terminal. */
|
|
1236
|
-
terminalAsyncOutcome(run) {
|
|
1237
|
-
if (run?.state !== "running" || !run.asyncDir)
|
|
1238
|
-
return undefined;
|
|
1239
|
-
const status = reconcileAsyncRun(run.asyncDir, { now: this.now, kill: this.deps.kill }).status;
|
|
1240
|
-
if (!status || !["complete", "failed", "stopped", "rejected"].includes(status.state))
|
|
1241
|
-
return undefined;
|
|
1242
|
-
// Stale-run repair records its reason on the failed steps, not the root status.
|
|
1243
|
-
const error = [status.error, ...(status.steps ?? []).map((step) => step.error)].find((value) => typeof value === "string");
|
|
1244
|
-
return { success: status.state === "complete", error };
|
|
1245
|
-
}
|
|
1246
|
-
timerKey(store, id) {
|
|
1247
|
-
return `${store.root}\0${id}`;
|
|
1248
|
-
}
|
|
1249
|
-
clearTimer(store, id) {
|
|
1250
|
-
const key = this.timerKey(store, id);
|
|
1251
|
-
const timer = this.timers.get(key);
|
|
1252
|
-
if (!timer)
|
|
1253
|
-
return;
|
|
1254
|
-
this.timersApi.clearTimeout(timer);
|
|
1255
|
-
this.timers.delete(key);
|
|
1256
|
-
}
|
|
1257
|
-
stopTimers() {
|
|
1258
|
-
for (const timer of this.timers.values())
|
|
1259
|
-
this.timersApi.clearTimeout(timer);
|
|
1260
|
-
this.timers.clear();
|
|
1261
|
-
}
|
|
1262
|
-
}
|
|
1263
|
-
export function createScheduledRunManager(deps) {
|
|
1264
|
-
return new ScheduledRunManager(deps);
|
|
1265
|
-
}
|
|
1266
|
-
//# sourceMappingURL=scheduled-runs.js.map
|