@llblab/pi-kit 0.38.3 → 0.39.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/CHANGELOG.md +10 -0
- package/README.md +2 -2
- package/node_modules/@llblab/pi-actors/AGENTS.md +108 -20
- package/node_modules/@llblab/pi-actors/BACKLOG.md +207 -4
- package/node_modules/@llblab/pi-actors/CHANGELOG.md +13 -0
- package/node_modules/@llblab/pi-actors/README.md +31 -1
- package/node_modules/@llblab/pi-actors/dist/index.js +1 -1
- package/node_modules/@llblab/pi-actors/dist/lib/async-runs.d.ts +37 -0
- package/node_modules/@llblab/pi-actors/dist/lib/async-runs.js +131 -62
- package/node_modules/@llblab/pi-actors/dist/lib/automatic-review-runtime.d.ts +2 -0
- package/node_modules/@llblab/pi-actors/dist/lib/automatic-review-runtime.js +3 -2
- package/node_modules/@llblab/pi-actors/dist/lib/command-templates.d.ts +37 -0
- package/node_modules/@llblab/pi-actors/dist/lib/command-templates.js +263 -129
- package/node_modules/@llblab/pi-actors/dist/lib/execution-files.d.ts +32 -0
- package/node_modules/@llblab/pi-actors/dist/lib/execution-files.js +128 -0
- package/node_modules/@llblab/pi-actors/dist/lib/execution-output.js +5 -4
- package/node_modules/@llblab/pi-actors/dist/lib/execution-sessions.d.ts +19 -1
- package/node_modules/@llblab/pi-actors/dist/lib/execution-sessions.js +62 -26
- package/node_modules/@llblab/pi-actors/dist/lib/execution.d.ts +4 -1
- package/node_modules/@llblab/pi-actors/dist/lib/execution.js +6 -1
- package/node_modules/@llblab/pi-actors/dist/lib/extension-runtime.d.ts +9 -2
- package/node_modules/@llblab/pi-actors/dist/lib/extension-runtime.js +92 -14
- package/node_modules/@llblab/pi-actors/dist/lib/file-state.js +21 -2
- package/node_modules/@llblab/pi-actors/dist/lib/inspector-command.js +2 -2
- package/node_modules/@llblab/pi-actors/dist/lib/inspector-overlay.d.ts +25 -7
- package/node_modules/@llblab/pi-actors/dist/lib/inspector-overlay.js +562 -262
- package/node_modules/@llblab/pi-actors/dist/lib/inspector.d.ts +20 -10
- package/node_modules/@llblab/pi-actors/dist/lib/inspector.js +80 -91
- package/node_modules/@llblab/pi-actors/dist/lib/limits.d.ts +1 -0
- package/node_modules/@llblab/pi-actors/dist/lib/limits.js +1 -0
- package/node_modules/@llblab/pi-actors/dist/lib/observability.d.ts +15 -1
- package/node_modules/@llblab/pi-actors/dist/lib/observability.js +216 -99
- package/node_modules/@llblab/pi-actors/dist/lib/pi.d.ts +5 -4
- package/node_modules/@llblab/pi-actors/dist/lib/pi.js +64 -10
- package/node_modules/@llblab/pi-actors/dist/lib/recipe-projection.d.ts +18 -0
- package/node_modules/@llblab/pi-actors/dist/lib/recipe-projection.js +220 -0
- package/node_modules/@llblab/pi-actors/dist/lib/recipes-context.d.ts +2 -0
- package/node_modules/@llblab/pi-actors/dist/lib/recipes-context.js +30 -6
- package/node_modules/@llblab/pi-actors/dist/lib/registry.js +270 -36
- package/node_modules/@llblab/pi-actors/dist/lib/run-delivery.d.ts +213 -5
- package/node_modules/@llblab/pi-actors/dist/lib/run-delivery.js +1909 -40
- package/node_modules/@llblab/pi-actors/dist/lib/run-supervision.d.ts +107 -0
- package/node_modules/@llblab/pi-actors/dist/lib/run-supervision.js +412 -0
- package/node_modules/@llblab/pi-actors/dist/lib/run-ui-runtime.d.ts +9 -2
- package/node_modules/@llblab/pi-actors/dist/lib/run-ui-runtime.js +283 -60
- package/node_modules/@llblab/pi-actors/dist/lib/runs-artifacts.d.ts +26 -1
- package/node_modules/@llblab/pi-actors/dist/lib/runs-artifacts.js +68 -2
- package/node_modules/@llblab/pi-actors/dist/lib/runs-context-exports.d.ts +451 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-context-exports.js +2315 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-context-index.d.ts +97 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-context-index.js +368 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-control-delivery.js +46 -7
- package/node_modules/@llblab/pi-actors/dist/lib/runs-control.d.ts +78 -2
- package/node_modules/@llblab/pi-actors/dist/lib/runs-control.js +334 -2
- package/node_modules/@llblab/pi-actors/dist/lib/runs-controls.js +4 -1
- package/node_modules/@llblab/pi-actors/dist/lib/runs-descendant-launches.d.ts +80 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-descendant-launches.js +287 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-execution-evidence.d.ts +110 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-execution-evidence.js +282 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-index.d.ts +66 -1
- package/node_modules/@llblab/pi-actors/dist/lib/runs-index.js +349 -13
- package/node_modules/@llblab/pi-actors/dist/lib/runs-native-launches.d.ts +73 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-native-launches.js +227 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-outcomes.d.ts +141 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-outcomes.js +292 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-ownership.d.ts +10 -1
- package/node_modules/@llblab/pi-actors/dist/lib/runs-ownership.js +36 -4
- package/node_modules/@llblab/pi-actors/dist/lib/runs-process-windows-mi.d.ts +46 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-process-windows-mi.js +114 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-process.d.ts +34 -1
- package/node_modules/@llblab/pi-actors/dist/lib/runs-process.js +158 -26
- package/node_modules/@llblab/pi-actors/dist/lib/runs-results.d.ts +116 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-results.js +518 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-retention.d.ts +15 -2
- package/node_modules/@llblab/pi-actors/dist/lib/runs-retention.js +148 -9
- package/node_modules/@llblab/pi-actors/dist/lib/runs-session-exports.d.ts +95 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-session-exports.js +470 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-snapshot.d.ts +58 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-snapshot.js +92 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-start.d.ts +2 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-start.js +44 -3
- package/node_modules/@llblab/pi-actors/dist/lib/runs-status.d.ts +15 -1
- package/node_modules/@llblab/pi-actors/dist/lib/runs-status.js +337 -13
- package/node_modules/@llblab/pi-actors/dist/lib/runs-supervision.d.ts +105 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-supervision.js +501 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-trace.d.ts +1 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-trace.js +14 -3
- package/node_modules/@llblab/pi-actors/dist/lib/runtime.js +22 -3
- package/node_modules/@llblab/pi-actors/dist/lib/session-evidence.d.ts +37 -0
- package/node_modules/@llblab/pi-actors/dist/lib/session-evidence.js +59 -3
- package/node_modules/@llblab/pi-actors/dist/lib/state-readers.d.ts +4 -1
- package/node_modules/@llblab/pi-actors/dist/lib/state-readers.js +14 -8
- package/node_modules/@llblab/pi-actors/dist/lib/temp.d.ts +2 -4
- package/node_modules/@llblab/pi-actors/dist/lib/temp.js +4 -56
- package/node_modules/@llblab/pi-actors/dist/lib/tools-access.d.ts +3 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-access.js +13 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-inspect.d.ts +1 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-inspect.js +110 -43
- package/node_modules/@llblab/pi-actors/dist/lib/tools-local.d.ts +3 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-local.js +18 -6
- package/node_modules/@llblab/pi-actors/dist/lib/tools-message.d.ts +4 -1
- package/node_modules/@llblab/pi-actors/dist/lib/tools-message.js +126 -31
- package/node_modules/@llblab/pi-actors/dist/lib/tools-response.d.ts +31 -3
- package/node_modules/@llblab/pi-actors/dist/lib/tools-response.js +311 -47
- package/node_modules/@llblab/pi-actors/dist/lib/tools-spawn.d.ts +3 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-spawn.js +29 -7
- package/node_modules/@llblab/pi-actors/dist/lib/trace-projection.d.ts +20 -0
- package/node_modules/@llblab/pi-actors/dist/lib/trace-projection.js +192 -43
- package/node_modules/@llblab/pi-actors/dist/scripts/async-runner.mjs +272 -194
- package/node_modules/@llblab/pi-actors/dist/scripts/conformance.mjs +14 -2
- package/node_modules/@llblab/pi-actors/dist/skills/actors/SKILL.md +46 -2
- package/node_modules/@llblab/pi-actors/dist/skills/actors/references/diagnostics.md +40 -0
- package/node_modules/@llblab/pi-actors/dist/skills/actors/references/runs.md +55 -1
- package/node_modules/@llblab/pi-actors/docs/README.md +9 -1
- package/node_modules/@llblab/pi-actors/docs/actor-inspector.md +84 -15
- package/node_modules/@llblab/pi-actors/docs/agent-experience.md +216 -0
- package/node_modules/@llblab/pi-actors/docs/async-runs.md +18 -2
- package/node_modules/@llblab/pi-actors/docs/composition-transport.md +103 -0
- package/node_modules/@llblab/pi-actors/docs/coordinator-delivery.md +204 -4
- package/node_modules/@llblab/pi-actors/docs/inspection.md +38 -2
- package/node_modules/@llblab/pi-actors/docs/output-projection-map.md +130 -0
- package/node_modules/@llblab/pi-actors/docs/releasing.md +19 -2
- package/node_modules/@llblab/pi-actors/docs/run-supervision.md +1622 -0
- package/node_modules/@llblab/pi-actors/docs/template-recipes.md +4 -0
- package/node_modules/@llblab/pi-actors/docs/windows-process-observation.md +248 -0
- package/node_modules/@llblab/pi-actors/index.ts +1 -1
- package/node_modules/@llblab/pi-actors/lib/async-runs.ts +164 -73
- package/node_modules/@llblab/pi-actors/lib/automatic-review-runtime.ts +4 -2
- package/node_modules/@llblab/pi-actors/lib/command-templates.ts +287 -138
- package/node_modules/@llblab/pi-actors/lib/execution-files.ts +118 -0
- package/node_modules/@llblab/pi-actors/lib/execution-output.ts +4 -4
- package/node_modules/@llblab/pi-actors/lib/execution-sessions.ts +57 -27
- package/node_modules/@llblab/pi-actors/lib/execution.ts +8 -0
- package/node_modules/@llblab/pi-actors/lib/extension-runtime.ts +102 -12
- package/node_modules/@llblab/pi-actors/lib/file-state.ts +16 -2
- package/node_modules/@llblab/pi-actors/lib/inspector-command.ts +2 -2
- package/node_modules/@llblab/pi-actors/lib/inspector-overlay.ts +524 -261
- package/node_modules/@llblab/pi-actors/lib/inspector.ts +101 -130
- package/node_modules/@llblab/pi-actors/lib/limits.ts +1 -0
- package/node_modules/@llblab/pi-actors/lib/observability.ts +235 -116
- package/node_modules/@llblab/pi-actors/lib/pi.ts +59 -11
- package/node_modules/@llblab/pi-actors/lib/recipe-projection.ts +232 -0
- package/node_modules/@llblab/pi-actors/lib/recipes-context.ts +27 -6
- package/node_modules/@llblab/pi-actors/lib/registry.ts +266 -36
- package/node_modules/@llblab/pi-actors/lib/run-delivery.ts +1737 -49
- package/node_modules/@llblab/pi-actors/lib/run-supervision.ts +411 -0
- package/node_modules/@llblab/pi-actors/lib/run-ui-runtime.ts +237 -73
- package/node_modules/@llblab/pi-actors/lib/runs-artifacts.ts +73 -1
- package/node_modules/@llblab/pi-actors/lib/runs-context-exports.ts +1871 -0
- package/node_modules/@llblab/pi-actors/lib/runs-context-index.ts +372 -0
- package/node_modules/@llblab/pi-actors/lib/runs-control-delivery.ts +36 -18
- package/node_modules/@llblab/pi-actors/lib/runs-control.ts +297 -1
- package/node_modules/@llblab/pi-actors/lib/runs-controls.ts +3 -1
- package/node_modules/@llblab/pi-actors/lib/runs-descendant-launches.ts +338 -0
- package/node_modules/@llblab/pi-actors/lib/runs-execution-evidence.ts +302 -0
- package/node_modules/@llblab/pi-actors/lib/runs-index.ts +345 -17
- package/node_modules/@llblab/pi-actors/lib/runs-native-launches.ts +270 -0
- package/node_modules/@llblab/pi-actors/lib/runs-outcomes.ts +377 -0
- package/node_modules/@llblab/pi-actors/lib/runs-ownership.ts +37 -4
- package/node_modules/@llblab/pi-actors/lib/runs-process-windows-mi.ts +113 -0
- package/node_modules/@llblab/pi-actors/lib/runs-process.ts +210 -34
- package/node_modules/@llblab/pi-actors/lib/runs-results.ts +601 -0
- package/node_modules/@llblab/pi-actors/lib/runs-retention.ts +134 -10
- package/node_modules/@llblab/pi-actors/lib/runs-session-exports.ts +406 -0
- package/node_modules/@llblab/pi-actors/lib/runs-snapshot.ts +143 -0
- package/node_modules/@llblab/pi-actors/lib/runs-start.ts +44 -2
- package/node_modules/@llblab/pi-actors/lib/runs-status.ts +252 -10
- package/node_modules/@llblab/pi-actors/lib/runs-supervision.ts +394 -0
- package/node_modules/@llblab/pi-actors/lib/runs-trace.ts +14 -3
- package/node_modules/@llblab/pi-actors/lib/runtime.ts +22 -3
- package/node_modules/@llblab/pi-actors/lib/session-evidence.ts +76 -4
- package/node_modules/@llblab/pi-actors/lib/state-readers.ts +16 -7
- package/node_modules/@llblab/pi-actors/lib/temp.ts +3 -56
- package/node_modules/@llblab/pi-actors/lib/tools-access.ts +13 -0
- package/node_modules/@llblab/pi-actors/lib/tools-inspect.ts +110 -51
- package/node_modules/@llblab/pi-actors/lib/tools-local.ts +37 -24
- package/node_modules/@llblab/pi-actors/lib/tools-message.ts +120 -37
- package/node_modules/@llblab/pi-actors/lib/tools-response.ts +273 -50
- package/node_modules/@llblab/pi-actors/lib/tools-spawn.ts +31 -10
- package/node_modules/@llblab/pi-actors/lib/trace-projection.ts +165 -42
- package/node_modules/@llblab/pi-actors/package.json +10 -6
- package/node_modules/@llblab/pi-actors/scripts/async-runner.mjs +272 -194
- package/node_modules/@llblab/pi-actors/scripts/conformance.mjs +14 -2
- package/node_modules/@llblab/pi-actors/skills/actors/SKILL.md +46 -2
- package/node_modules/@llblab/pi-actors/skills/actors/references/diagnostics.md +40 -0
- package/node_modules/@llblab/pi-actors/skills/actors/references/runs.md +55 -1
- package/node_modules/@llblab/pi-codex-usage/AGENTS.md +2 -2
- package/node_modules/@llblab/pi-codex-usage/CHANGELOG.md +6 -0
- package/node_modules/@llblab/pi-codex-usage/README.md +9 -5
- package/node_modules/@llblab/pi-codex-usage/lib/query.ts +229 -50
- package/node_modules/@llblab/pi-codex-usage/lib/usage.ts +9 -1
- package/node_modules/@llblab/pi-codex-usage/package.json +1 -1
- package/node_modules/yaml/LICENSE +13 -0
- package/node_modules/yaml/README.md +172 -0
- package/node_modules/yaml/bin.mjs +11 -0
- package/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
- package/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
- package/node_modules/yaml/browser/dist/compose/compose-node.js +109 -0
- package/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
- package/node_modules/yaml/browser/dist/compose/composer.js +219 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
- package/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +225 -0
- package/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
- package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
- package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
- package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
- package/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
- package/node_modules/yaml/browser/dist/doc/Document.js +335 -0
- package/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
- package/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
- package/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
- package/node_modules/yaml/browser/dist/doc/directives.js +176 -0
- package/node_modules/yaml/browser/dist/errors.js +57 -0
- package/node_modules/yaml/browser/dist/index.js +17 -0
- package/node_modules/yaml/browser/dist/log.js +11 -0
- package/node_modules/yaml/browser/dist/nodes/Alias.js +116 -0
- package/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
- package/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
- package/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
- package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
- package/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
- package/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
- package/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
- package/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
- package/node_modules/yaml/browser/dist/parse/cst.js +98 -0
- package/node_modules/yaml/browser/dist/parse/lexer.js +721 -0
- package/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
- package/node_modules/yaml/browser/dist/parse/parser.js +975 -0
- package/node_modules/yaml/browser/dist/public-api.js +102 -0
- package/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
- package/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
- package/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
- package/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
- package/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
- package/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
- package/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
- package/node_modules/yaml/browser/dist/schema/tags.js +96 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +67 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
- package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
- package/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +153 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +25 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
- package/node_modules/yaml/browser/dist/util.js +11 -0
- package/node_modules/yaml/browser/dist/visit.js +233 -0
- package/node_modules/yaml/browser/index.js +5 -0
- package/node_modules/yaml/browser/package.json +3 -0
- package/node_modules/yaml/dist/cli.d.ts +8 -0
- package/node_modules/yaml/dist/cli.mjs +201 -0
- package/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
- package/node_modules/yaml/dist/compose/compose-collection.js +90 -0
- package/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
- package/node_modules/yaml/dist/compose/compose-doc.js +45 -0
- package/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
- package/node_modules/yaml/dist/compose/compose-node.js +112 -0
- package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
- package/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
- package/node_modules/yaml/dist/compose/composer.d.ts +63 -0
- package/node_modules/yaml/dist/compose/composer.js +224 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
- package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +227 -0
- package/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
- package/node_modules/yaml/dist/compose/resolve-props.js +148 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
- package/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
- package/node_modules/yaml/dist/doc/Document.d.ts +141 -0
- package/node_modules/yaml/dist/doc/Document.js +337 -0
- package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
- package/node_modules/yaml/dist/doc/anchors.js +76 -0
- package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
- package/node_modules/yaml/dist/doc/applyReviver.js +57 -0
- package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
- package/node_modules/yaml/dist/doc/createNode.js +90 -0
- package/node_modules/yaml/dist/doc/directives.d.ts +49 -0
- package/node_modules/yaml/dist/doc/directives.js +178 -0
- package/node_modules/yaml/dist/errors.d.ts +21 -0
- package/node_modules/yaml/dist/errors.js +62 -0
- package/node_modules/yaml/dist/index.d.ts +25 -0
- package/node_modules/yaml/dist/index.js +50 -0
- package/node_modules/yaml/dist/log.d.ts +3 -0
- package/node_modules/yaml/dist/log.js +19 -0
- package/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/Alias.js +118 -0
- package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
- package/node_modules/yaml/dist/nodes/Collection.js +151 -0
- package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/Node.js +40 -0
- package/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
- package/node_modules/yaml/dist/nodes/Pair.js +39 -0
- package/node_modules/yaml/dist/nodes/Scalar.d.ts +47 -0
- package/node_modules/yaml/dist/nodes/Scalar.js +27 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
- package/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
- package/node_modules/yaml/dist/nodes/identity.js +53 -0
- package/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/toJS.js +39 -0
- package/node_modules/yaml/dist/options.d.ts +350 -0
- package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
- package/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
- package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
- package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
- package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
- package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
- package/node_modules/yaml/dist/parse/cst.d.ts +109 -0
- package/node_modules/yaml/dist/parse/cst.js +112 -0
- package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
- package/node_modules/yaml/dist/parse/lexer.js +723 -0
- package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
- package/node_modules/yaml/dist/parse/line-counter.js +41 -0
- package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
- package/node_modules/yaml/dist/parse/parser.js +980 -0
- package/node_modules/yaml/dist/public-api.d.ts +44 -0
- package/node_modules/yaml/dist/public-api.js +107 -0
- package/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
- package/node_modules/yaml/dist/schema/Schema.js +39 -0
- package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/map.js +19 -0
- package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
- package/node_modules/yaml/dist/schema/common/null.js +17 -0
- package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/seq.js +19 -0
- package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/string.js +16 -0
- package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/bool.js +21 -0
- package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/float.js +47 -0
- package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/int.js +42 -0
- package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/core/schema.js +25 -0
- package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
- package/node_modules/yaml/dist/schema/json/schema.js +64 -0
- package/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
- package/node_modules/yaml/dist/schema/tags.d.ts +48 -0
- package/node_modules/yaml/dist/schema/tags.js +99 -0
- package/node_modules/yaml/dist/schema/types.d.ts +92 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +71 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
- package/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
- package/node_modules/yaml/dist/stringify/stringify.js +132 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.js +27 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
- package/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
- package/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
- package/node_modules/yaml/dist/test-events.d.ts +4 -0
- package/node_modules/yaml/dist/test-events.js +134 -0
- package/node_modules/yaml/dist/util.d.ts +16 -0
- package/node_modules/yaml/dist/util.js +28 -0
- package/node_modules/yaml/dist/visit.d.ts +102 -0
- package/node_modules/yaml/dist/visit.js +236 -0
- package/node_modules/yaml/package.json +97 -0
- package/node_modules/yaml/util.js +2 -0
- package/package.json +3 -3
- package/node_modules/@llblab/pi-actors/banner.jpg +0 -0
- package/node_modules/@llblab/pi-actors/dist/lib/inspector-actions.d.ts +0 -16
- package/node_modules/@llblab/pi-actors/dist/lib/inspector-actions.js +0 -57
- package/node_modules/@llblab/pi-actors/lib/inspector-actions.ts +0 -79
|
@@ -4,9 +4,33 @@
|
|
|
4
4
|
* Owns portable command-template parsing, expansion, risk checks, retries, timeouts, and direct execution.
|
|
5
5
|
*/
|
|
6
6
|
import { spawn, spawnSync } from "node:child_process";
|
|
7
|
-
import {
|
|
7
|
+
import { createHash } from "node:crypto";
|
|
8
|
+
import { accessSync, appendFileSync, constants, lstatSync, mkdirSync, mkdtempSync, statSync, writeFileSync } from "node:fs";
|
|
8
9
|
import { homedir, tmpdir } from "node:os";
|
|
9
10
|
import { basename, delimiter, extname, isAbsolute, join, resolve as resolvePath } from "node:path";
|
|
11
|
+
let pendingSpawnAdmission;
|
|
12
|
+
const freshManagedAttempts = new WeakMap();
|
|
13
|
+
/** Available only before this synchronous admission invokes its factory; never retroactively adopt a born process. */
|
|
14
|
+
export function readPendingCommandSpawnAdmission() {
|
|
15
|
+
return pendingSpawnAdmission;
|
|
16
|
+
}
|
|
17
|
+
/** Kernel-only launch observation capability; copies and references retained past the callback are not authority. */
|
|
18
|
+
export function requireFreshManagedCommandAttempt(context, admission) {
|
|
19
|
+
const actual = freshManagedAttempts.get(context);
|
|
20
|
+
if (!actual || (admission !== undefined && actual.admission !== admission) || context.process !== actual.process || actual.process.pid !== actual.pid) {
|
|
21
|
+
throw new Error("Native process observation requires a fresh managed attempt from this runtime.");
|
|
22
|
+
}
|
|
23
|
+
return context;
|
|
24
|
+
}
|
|
25
|
+
const nativeCloseReceipts = new WeakMap();
|
|
26
|
+
/** Exact retained process close during its synchronous receipt callback, never a serialized terminal claim. */
|
|
27
|
+
export function requireNativeCommandAttemptClose(receipt, admission, child) {
|
|
28
|
+
const actual = nativeCloseReceipts.get(receipt);
|
|
29
|
+
if (!actual || actual.admission !== admission || actual.process !== child || child.pid !== actual.close.pid) {
|
|
30
|
+
throw new Error("Native settlement requires its exact runtime-local process-close receipt.");
|
|
31
|
+
}
|
|
32
|
+
return actual.close;
|
|
33
|
+
}
|
|
10
34
|
const DEFAULT_COMMAND_CAPTURE_LIMIT_BYTES = 1024 * 1024;
|
|
11
35
|
const COMMAND_TEMPLATE_RISK_LABEL_ORDER = [
|
|
12
36
|
"risk.shell",
|
|
@@ -634,7 +658,7 @@ export async function execCommandTemplate(command, args, options = {}) {
|
|
|
634
658
|
captureDir: join(options.captureDir, `attempt-${String(attempt).padStart(3, "0")}`),
|
|
635
659
|
}
|
|
636
660
|
: options;
|
|
637
|
-
const result = await execCommandTemplateOnce(command, args, attemptOptions);
|
|
661
|
+
const result = await execCommandTemplateOnce(command, args, attemptOptions, attempt);
|
|
638
662
|
if (result.code === 0)
|
|
639
663
|
return result;
|
|
640
664
|
lastResult = result;
|
|
@@ -649,8 +673,9 @@ function trimCaptureTail(value, limit) {
|
|
|
649
673
|
start += 1;
|
|
650
674
|
return value.subarray(start);
|
|
651
675
|
}
|
|
652
|
-
function createBoundedCommandCapture(stream, limit, getCaptureDir, persistCompleteStream) {
|
|
676
|
+
function createBoundedCommandCapture(stream, limit, getCaptureDir, persistCompleteStream, onFailure) {
|
|
653
677
|
let bytes = 0;
|
|
678
|
+
const digest = stream === "stdout" && persistCompleteStream ? createHash("sha256") : undefined;
|
|
654
679
|
let content = Buffer.alloc(0);
|
|
655
680
|
let file = persistCompleteStream
|
|
656
681
|
? join(getCaptureDir(), `${stream}.log`)
|
|
@@ -658,163 +683,272 @@ function createBoundedCommandCapture(stream, limit, getCaptureDir, persistComple
|
|
|
658
683
|
if (file)
|
|
659
684
|
writeFileSync(file, Buffer.alloc(0));
|
|
660
685
|
let truncated = false;
|
|
686
|
+
let incomplete = false;
|
|
661
687
|
return {
|
|
662
688
|
append(value) {
|
|
663
689
|
const chunk = Buffer.isBuffer(value) ? value : Buffer.from(value);
|
|
664
690
|
bytes += chunk.length;
|
|
691
|
+
digest?.update(chunk);
|
|
665
692
|
if (bytes > limit)
|
|
666
693
|
truncated = true;
|
|
667
|
-
|
|
668
|
-
|
|
694
|
+
const previous = content;
|
|
695
|
+
content = trimCaptureTail(Buffer.concat([content, chunk]), limit);
|
|
696
|
+
if (!file && bytes <= limit)
|
|
697
|
+
return;
|
|
698
|
+
if (incomplete)
|
|
669
699
|
return;
|
|
700
|
+
try {
|
|
701
|
+
if (!file) {
|
|
702
|
+
file = join(getCaptureDir(), `${stream}.log`);
|
|
703
|
+
writeFileSync(file, previous);
|
|
704
|
+
}
|
|
705
|
+
appendFileSync(file, chunk);
|
|
670
706
|
}
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
707
|
+
catch (error) {
|
|
708
|
+
incomplete = true;
|
|
709
|
+
onFailure(error);
|
|
674
710
|
}
|
|
675
|
-
appendFileSync(file, chunk);
|
|
676
|
-
content = trimCaptureTail(Buffer.concat([content, chunk]), limit);
|
|
677
711
|
},
|
|
678
712
|
result() {
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
713
|
+
let retainedFile = file;
|
|
714
|
+
let fileBytes;
|
|
715
|
+
if (incomplete && file) {
|
|
716
|
+
try {
|
|
717
|
+
const stat = lstatSync(file);
|
|
718
|
+
if (stat.isFile())
|
|
719
|
+
fileBytes = stat.size;
|
|
720
|
+
else
|
|
721
|
+
retainedFile = undefined;
|
|
722
|
+
}
|
|
723
|
+
catch {
|
|
724
|
+
retainedFile = undefined;
|
|
725
|
+
}
|
|
682
726
|
}
|
|
683
727
|
return {
|
|
684
728
|
bytes,
|
|
685
729
|
content: content.toString("utf8"),
|
|
686
|
-
...(
|
|
730
|
+
...(retainedFile ? { file: retainedFile } : {}),
|
|
731
|
+
...(digest && !incomplete && retainedFile ? { sha256: digest.digest("hex") } : {}),
|
|
732
|
+
...(incomplete ? { incomplete: true, ...(fileBytes === undefined ? {} : { fileBytes }) } : {}),
|
|
687
733
|
truncated,
|
|
688
734
|
};
|
|
689
735
|
},
|
|
690
736
|
};
|
|
691
737
|
}
|
|
692
|
-
function execCommandTemplateOnce(command, args, options
|
|
693
|
-
return new Promise((resolve) => {
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
});
|
|
699
|
-
const
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
738
|
+
function execCommandTemplateOnce(command, args, options, attempt) {
|
|
739
|
+
return new Promise((resolve, reject) => {
|
|
740
|
+
let failure;
|
|
741
|
+
let managed;
|
|
742
|
+
let invoked = false;
|
|
743
|
+
let admissionOpen = true;
|
|
744
|
+
const spawnAdmission = Object.freeze({ attempt });
|
|
745
|
+
const rememberFailure = (error) => { failure ??= { error }; };
|
|
746
|
+
const start = () => {
|
|
747
|
+
if (!admissionOpen)
|
|
748
|
+
throw new Error("Native spawn admission window is closed.");
|
|
749
|
+
if (invoked)
|
|
750
|
+
throw new Error("Native spawn factory may be invoked only once per attempt.");
|
|
751
|
+
invoked = true;
|
|
752
|
+
pendingSpawnAdmission = undefined;
|
|
753
|
+
const captureLimit = Math.max(1, options.captureLimitBytes ?? DEFAULT_COMMAND_CAPTURE_LIMIT_BYTES);
|
|
754
|
+
let captureDir;
|
|
755
|
+
const getCaptureDir = () => {
|
|
756
|
+
if (captureDir)
|
|
757
|
+
return captureDir;
|
|
758
|
+
captureDir = options.captureDir
|
|
759
|
+
? resolvePath(options.captureDir)
|
|
760
|
+
: mkdtempSync(join(tmpdir(), "pi-actors-command-"));
|
|
761
|
+
mkdirSync(captureDir, { recursive: true });
|
|
703
762
|
return captureDir;
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
])
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
if (!Number.isSafeInteger(pid) || !Number.isSafeInteger(parent))
|
|
736
|
-
continue;
|
|
737
|
-
const siblings = children.get(parent) ?? [];
|
|
738
|
-
siblings.push(pid);
|
|
739
|
-
children.set(parent, siblings);
|
|
740
|
-
}
|
|
741
|
-
const descendants = [];
|
|
742
|
-
const collect = (parent) => {
|
|
743
|
-
for (const child of children.get(parent) ?? []) {
|
|
744
|
-
collect(child);
|
|
745
|
-
descendants.push(child);
|
|
763
|
+
};
|
|
764
|
+
const persistCompleteStreams = options.captureDir !== undefined;
|
|
765
|
+
const stdoutCapture = createBoundedCommandCapture("stdout", captureLimit, getCaptureDir, persistCompleteStreams, rememberFailure);
|
|
766
|
+
const stderrCapture = createBoundedCommandCapture("stderr", captureLimit, getCaptureDir, persistCompleteStreams, rememberFailure);
|
|
767
|
+
let killed = false;
|
|
768
|
+
let settled = false;
|
|
769
|
+
let timeoutId;
|
|
770
|
+
let killTimeoutId;
|
|
771
|
+
const signalProcessTree = (signal) => {
|
|
772
|
+
if (proc.pid === undefined)
|
|
773
|
+
return;
|
|
774
|
+
if (process.platform === "win32") {
|
|
775
|
+
spawnSync("taskkill", [
|
|
776
|
+
"/PID",
|
|
777
|
+
String(proc.pid),
|
|
778
|
+
"/T",
|
|
779
|
+
...(signal === "SIGKILL" ? ["/F"] : []),
|
|
780
|
+
]);
|
|
781
|
+
return;
|
|
782
|
+
}
|
|
783
|
+
const snapshot = spawnSync("ps", ["-eo", "pid=,ppid="], { encoding: "utf8" });
|
|
784
|
+
const children = new Map();
|
|
785
|
+
for (const line of snapshot.stdout?.split(/\r?\n/u) ?? []) {
|
|
786
|
+
const [pidText, parentText] = line.trim().split(/\s+/u);
|
|
787
|
+
const pid = Number(pidText);
|
|
788
|
+
const parent = Number(parentText);
|
|
789
|
+
if (!Number.isSafeInteger(pid) || !Number.isSafeInteger(parent))
|
|
790
|
+
continue;
|
|
791
|
+
const siblings = children.get(parent) ?? [];
|
|
792
|
+
siblings.push(pid);
|
|
793
|
+
children.set(parent, siblings);
|
|
746
794
|
}
|
|
795
|
+
const descendants = [];
|
|
796
|
+
const collect = (parent) => {
|
|
797
|
+
for (const child of children.get(parent) ?? []) {
|
|
798
|
+
collect(child);
|
|
799
|
+
descendants.push(child);
|
|
800
|
+
}
|
|
801
|
+
};
|
|
802
|
+
collect(proc.pid);
|
|
803
|
+
for (const pid of [...descendants, proc.pid]) {
|
|
804
|
+
try {
|
|
805
|
+
process.kill(pid, signal);
|
|
806
|
+
}
|
|
807
|
+
catch (error) {
|
|
808
|
+
if (error.code !== "ESRCH")
|
|
809
|
+
throw error;
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
};
|
|
813
|
+
const killProcess = () => {
|
|
814
|
+
if (killed)
|
|
815
|
+
return;
|
|
816
|
+
killed = true;
|
|
817
|
+
signalProcessTree("SIGTERM");
|
|
818
|
+
killTimeoutId = setTimeout(() => {
|
|
819
|
+
if (!settled)
|
|
820
|
+
signalProcessTree("SIGKILL");
|
|
821
|
+
}, options.killGrace ?? 5000);
|
|
747
822
|
};
|
|
748
|
-
|
|
749
|
-
|
|
823
|
+
const settle = (code, nativeExitCode, nativeSignal) => {
|
|
824
|
+
if (settled)
|
|
825
|
+
return;
|
|
826
|
+
settled = true;
|
|
827
|
+
if (timeoutId)
|
|
828
|
+
clearTimeout(timeoutId);
|
|
829
|
+
if (killTimeoutId)
|
|
830
|
+
clearTimeout(killTimeoutId);
|
|
831
|
+
if (options.signal)
|
|
832
|
+
options.signal.removeEventListener("abort", killProcess);
|
|
833
|
+
const stdout = stdoutCapture.result();
|
|
834
|
+
const stderr = stderrCapture.result();
|
|
835
|
+
const result = {
|
|
836
|
+
stdout: stdout.content,
|
|
837
|
+
stderr: stderr.content,
|
|
838
|
+
code,
|
|
839
|
+
killed,
|
|
840
|
+
stdoutBytes: stdout.bytes,
|
|
841
|
+
stderrBytes: stderr.bytes,
|
|
842
|
+
...(stdout.file ? { stdoutFile: stdout.file } : {}),
|
|
843
|
+
...(stderr.file ? { stderrFile: stderr.file } : {}),
|
|
844
|
+
...(stdout.truncated ? { stdoutTruncated: true } : {}),
|
|
845
|
+
...(stderr.truncated ? { stderrTruncated: true } : {}),
|
|
846
|
+
...(stdout.incomplete ? { stdoutCaptureIncomplete: true, ...(stdout.fileBytes === undefined ? {} : { stdoutFileBytes: stdout.fileBytes }) } : {}),
|
|
847
|
+
...(stderr.incomplete ? { stderrCaptureIncomplete: true, ...(stderr.fileBytes === undefined ? {} : { stderrFileBytes: stderr.fileBytes }) } : {}),
|
|
848
|
+
};
|
|
750
849
|
try {
|
|
751
|
-
|
|
850
|
+
if (options.onAttemptComplete) {
|
|
851
|
+
const receipt = Object.freeze({
|
|
852
|
+
attempt, result: Object.freeze({ ...result }),
|
|
853
|
+
...(stdout.sha256 ? { stdoutSha256: stdout.sha256 } : {}),
|
|
854
|
+
...(nativeExitCode !== undefined ? { nativeExitCode } : {}),
|
|
855
|
+
...(nativeSignal !== undefined ? { nativeSignal } : {}),
|
|
856
|
+
});
|
|
857
|
+
const exitObserved = (Number.isSafeInteger(nativeExitCode) && nativeSignal === null) ||
|
|
858
|
+
(nativeExitCode === null && typeof nativeSignal === "string" && /^SIG[A-Z0-9]+$/.exec(nativeSignal)?.[0] === nativeSignal);
|
|
859
|
+
if (exitObserved && Number.isSafeInteger(proc.pid) && Number(proc.pid) > 0 &&
|
|
860
|
+
proc.exitCode === nativeExitCode && proc.signalCode === nativeSignal) {
|
|
861
|
+
nativeCloseReceipts.set(receipt, {
|
|
862
|
+
admission: spawnAdmission, process: proc,
|
|
863
|
+
close: Object.freeze({ pid: proc.pid, nativeExitCode: nativeExitCode, nativeSignal: nativeSignal }),
|
|
864
|
+
});
|
|
865
|
+
}
|
|
866
|
+
try {
|
|
867
|
+
options.onAttemptComplete(receipt);
|
|
868
|
+
}
|
|
869
|
+
finally {
|
|
870
|
+
nativeCloseReceipts.delete(receipt);
|
|
871
|
+
}
|
|
872
|
+
}
|
|
752
873
|
}
|
|
753
874
|
catch (error) {
|
|
754
|
-
|
|
755
|
-
throw error;
|
|
875
|
+
rememberFailure(error);
|
|
756
876
|
}
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
settled = true;
|
|
773
|
-
if (timeoutId)
|
|
774
|
-
clearTimeout(timeoutId);
|
|
775
|
-
if (killTimeoutId)
|
|
776
|
-
clearTimeout(killTimeoutId);
|
|
777
|
-
if (options.signal)
|
|
778
|
-
options.signal.removeEventListener("abort", killProcess);
|
|
779
|
-
const stdout = stdoutCapture.result();
|
|
780
|
-
const stderr = stderrCapture.result();
|
|
781
|
-
resolve({
|
|
782
|
-
stdout: stdout.content,
|
|
783
|
-
stderr: stderr.content,
|
|
784
|
-
code,
|
|
785
|
-
killed,
|
|
786
|
-
stdoutBytes: stdout.bytes,
|
|
787
|
-
stderrBytes: stderr.bytes,
|
|
788
|
-
...(stdout.file ? { stdoutFile: stdout.file } : {}),
|
|
789
|
-
...(stderr.file ? { stderrFile: stderr.file } : {}),
|
|
790
|
-
...(stdout.truncated ? { stdoutTruncated: true } : {}),
|
|
791
|
-
...(stderr.truncated ? { stderrTruncated: true } : {}),
|
|
877
|
+
if (failure)
|
|
878
|
+
reject(failure.error);
|
|
879
|
+
else
|
|
880
|
+
resolve(result);
|
|
881
|
+
};
|
|
882
|
+
const proc = spawn(command, args, {
|
|
883
|
+
cwd: options.cwd,
|
|
884
|
+
shell: false,
|
|
885
|
+
stdio: [options.stdin === undefined ? "ignore" : "pipe", "pipe", "pipe"],
|
|
886
|
+
});
|
|
887
|
+
proc.stdout?.on("data", (data) => {
|
|
888
|
+
stdoutCapture.append(data);
|
|
889
|
+
});
|
|
890
|
+
proc.stderr?.on("data", (data) => {
|
|
891
|
+
stderrCapture.append(data);
|
|
792
892
|
});
|
|
893
|
+
proc.stdin?.on("error", () => { });
|
|
894
|
+
proc.on("error", (error) => {
|
|
895
|
+
const liveHandle = Number.isSafeInteger(proc.pid) && Number(proc.pid) > 0;
|
|
896
|
+
if (liveHandle)
|
|
897
|
+
rememberFailure(error);
|
|
898
|
+
stderrCapture.append(error instanceof Error ? error.message : String(error));
|
|
899
|
+
if (!liveHandle)
|
|
900
|
+
settle(1);
|
|
901
|
+
});
|
|
902
|
+
proc.on("close", (code, signal) => {
|
|
903
|
+
settle(code ?? 1, code, signal);
|
|
904
|
+
});
|
|
905
|
+
managed = proc;
|
|
906
|
+
try {
|
|
907
|
+
if (options.signal) {
|
|
908
|
+
if (options.signal.aborted)
|
|
909
|
+
killProcess();
|
|
910
|
+
else
|
|
911
|
+
options.signal.addEventListener("abort", killProcess, { once: true });
|
|
912
|
+
}
|
|
913
|
+
if (options.timeout !== undefined && options.timeout > 0)
|
|
914
|
+
timeoutId = setTimeout(killProcess, options.timeout);
|
|
915
|
+
if (options.stdin !== undefined)
|
|
916
|
+
proc.stdin?.end(options.stdin);
|
|
917
|
+
if (options.onAttemptManaged) {
|
|
918
|
+
const context = Object.freeze({ attempt, process: proc });
|
|
919
|
+
freshManagedAttempts.set(context, { process: proc, pid: proc.pid, admission: spawnAdmission });
|
|
920
|
+
try {
|
|
921
|
+
options.onAttemptManaged(context);
|
|
922
|
+
}
|
|
923
|
+
finally {
|
|
924
|
+
freshManagedAttempts.delete(context);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
catch (error) {
|
|
929
|
+
rememberFailure(error);
|
|
930
|
+
}
|
|
931
|
+
return proc;
|
|
793
932
|
};
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
933
|
+
const parentAdmission = pendingSpawnAdmission;
|
|
934
|
+
try {
|
|
935
|
+
pendingSpawnAdmission = spawnAdmission;
|
|
936
|
+
const proc = options.admitSpawn ? options.admitSpawn(start) : start();
|
|
937
|
+
if (!managed)
|
|
938
|
+
throw new Error("Native spawn admission must invoke its managed factory.");
|
|
939
|
+
if (proc !== managed)
|
|
940
|
+
throw new Error("Native spawn admission must return its managed process.");
|
|
941
|
+
}
|
|
942
|
+
catch (error) {
|
|
943
|
+
if (managed)
|
|
944
|
+
rememberFailure(error);
|
|
797
945
|
else
|
|
798
|
-
|
|
946
|
+
reject(error);
|
|
947
|
+
}
|
|
948
|
+
finally {
|
|
949
|
+
admissionOpen = false;
|
|
950
|
+
pendingSpawnAdmission = parentAdmission;
|
|
799
951
|
}
|
|
800
|
-
if (options.timeout !== undefined && options.timeout > 0)
|
|
801
|
-
timeoutId = setTimeout(killProcess, options.timeout);
|
|
802
|
-
proc.stdout?.on("data", (data) => {
|
|
803
|
-
stdoutCapture.append(data);
|
|
804
|
-
});
|
|
805
|
-
proc.stderr?.on("data", (data) => {
|
|
806
|
-
stderrCapture.append(data);
|
|
807
|
-
});
|
|
808
|
-
proc.stdin?.on("error", () => { });
|
|
809
|
-
if (options.stdin !== undefined)
|
|
810
|
-
proc.stdin?.end(options.stdin);
|
|
811
|
-
proc.on("error", (error) => {
|
|
812
|
-
stderrCapture.append(error instanceof Error ? error.message : String(error));
|
|
813
|
-
settle(1);
|
|
814
|
-
});
|
|
815
|
-
proc.on("close", (code) => {
|
|
816
|
-
settle(code ?? (killed ? 1 : 0));
|
|
817
|
-
});
|
|
818
952
|
});
|
|
819
953
|
}
|
|
820
954
|
export function buildCommandTemplateInvocation(config, values, cwd, options = {}) {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type ExecutionFileReferenceReading = {
|
|
2
|
+
readonly availability: "available";
|
|
3
|
+
readonly path: string;
|
|
4
|
+
readonly local_path: string;
|
|
5
|
+
readonly bytes_total: number;
|
|
6
|
+
readonly mutable: true;
|
|
7
|
+
readonly unchanged: () => boolean;
|
|
8
|
+
} | {
|
|
9
|
+
readonly availability: "unavailable";
|
|
10
|
+
readonly reason: "invalid_reference" | "reference_missing" | "reference_unavailable" | "reference_changed" | "reference_size_unrepresentable";
|
|
11
|
+
};
|
|
12
|
+
export declare const RUN_STREAM_SOURCE_MAX_BYTES: number;
|
|
13
|
+
export type ExecutionTextReading = {
|
|
14
|
+
readonly availability: "available";
|
|
15
|
+
readonly reference: Extract<ExecutionFileReferenceReading, {
|
|
16
|
+
availability: "available";
|
|
17
|
+
}>;
|
|
18
|
+
readonly text: string;
|
|
19
|
+
} | {
|
|
20
|
+
readonly availability: "unavailable";
|
|
21
|
+
readonly reason: Extract<ExecutionFileReferenceReading, {
|
|
22
|
+
availability: "unavailable";
|
|
23
|
+
}>["reason"] | "reference_too_large" | "reference_invalid_text";
|
|
24
|
+
};
|
|
25
|
+
/** Metadata-only: never reads body bytes, regardless of file size. */
|
|
26
|
+
export declare function observeExecutionFileReference(stateDir: string, request: unknown): Readonly<ExecutionFileReferenceReading>;
|
|
27
|
+
/** Raw text is kernel-local input to an authorized projection, never a tool/model result. */
|
|
28
|
+
export declare function readExecutionSessionText(stateDir: string, path: string): Readonly<ExecutionTextReading>;
|
|
29
|
+
/** Explicit command capture input only; neither this read nor its path authorizes publication. */
|
|
30
|
+
export declare function readExecutionCaptureText(stateDir: string, path: string): Readonly<ExecutionTextReading>;
|
|
31
|
+
/** Canonical runner text is kernel-local input, not complete command capture or a model-visible privacy projection. */
|
|
32
|
+
export declare function readExecutionRunnerStreamText(stateDir: string, stream: unknown): Readonly<ExecutionTextReading>;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Execution-file layout and metadata observation beneath a caller-admitted Run state root.
|
|
3
|
+
* Owns: capture/session/canonical-runner stream layout, metadata and bounded strict text inputs through a checked descriptor.
|
|
4
|
+
* Excludes: Run/generation admission, unrestricted body exposure, discovery, privacy projection, historical-content or native authority.
|
|
5
|
+
*/
|
|
6
|
+
import { closeSync, constants, fstatSync, lstatSync, openSync, readSync, realpathSync } from "node:fs";
|
|
7
|
+
import { isAbsolute, join, resolve, win32 } from "node:path";
|
|
8
|
+
import { SESSION_EVIDENCE_MAX_BYTES } from "./limits.js";
|
|
9
|
+
export const RUN_STREAM_SOURCE_MAX_BYTES = 4 * 1024 * 1024;
|
|
10
|
+
function unavailable(reason) { return Object.freeze({ availability: "unavailable", reason }); }
|
|
11
|
+
function sameObject(left, right) { return left.dev === right.dev && left.ino === right.ino; }
|
|
12
|
+
function sameFile(left, right) {
|
|
13
|
+
return right.isFile() && sameObject(left, right) && left.size === right.size && left.mtimeNs === right.mtimeNs && left.ctimeNs === right.ctimeNs;
|
|
14
|
+
}
|
|
15
|
+
function referencePath(request) {
|
|
16
|
+
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
17
|
+
return undefined;
|
|
18
|
+
const kind = Object.getOwnPropertyDescriptor(request, "kind")?.value;
|
|
19
|
+
const path = Object.getOwnPropertyDescriptor(request, "path")?.value;
|
|
20
|
+
if ((kind !== "session" && kind !== "capture" && kind !== "runner_stream") || typeof path !== "string" || !path || isAbsolute(path) || win32.isAbsolute(path) ||
|
|
21
|
+
/[\\\u0000-\u001f\u007f]/u.test(path) || (process.platform === "win32" && path.includes(":")))
|
|
22
|
+
return undefined;
|
|
23
|
+
const parts = path.split("/");
|
|
24
|
+
if (parts.some(part => !part || part === "." || part === ".."))
|
|
25
|
+
return undefined;
|
|
26
|
+
if (kind === "runner_stream")
|
|
27
|
+
return path === "stdout.log" || path === "stderr.log" ? path : undefined;
|
|
28
|
+
if (kind === "session")
|
|
29
|
+
return parts[0] === "sessions" && parts.length >= 2 && parts.at(-1).endsWith(".jsonl") ? path : undefined;
|
|
30
|
+
const capture = /^captures\/command-([0-9]{3,})\/attempt-([0-9]{3,})\/(stdout|stderr)\.log$/u.exec(path);
|
|
31
|
+
return capture && capture.slice(1, 3).every(number => Number.isSafeInteger(Number(number)) && Number(number) > 0) ? path : undefined;
|
|
32
|
+
}
|
|
33
|
+
function inspectExecutionFile(stateDir, request, maxTextBytes) {
|
|
34
|
+
const relative = referencePath(request);
|
|
35
|
+
if (!relative)
|
|
36
|
+
return unavailable("invalid_reference");
|
|
37
|
+
try {
|
|
38
|
+
const requestedRoot = resolve(stateDir);
|
|
39
|
+
const root = lstatSync(requestedRoot, { bigint: true });
|
|
40
|
+
if (!root.isDirectory() || root.isSymbolicLink())
|
|
41
|
+
return unavailable("reference_unavailable");
|
|
42
|
+
const canonicalRoot = realpathSync(requestedRoot);
|
|
43
|
+
const canonical = lstatSync(canonicalRoot, { bigint: true });
|
|
44
|
+
if (!canonical.isDirectory() || !sameObject(root, canonical))
|
|
45
|
+
return unavailable("reference_changed");
|
|
46
|
+
const directories = [{ path: requestedRoot, stamp: root }, { path: canonicalRoot, stamp: canonical }];
|
|
47
|
+
const parts = relative.split("/");
|
|
48
|
+
let directory = canonicalRoot;
|
|
49
|
+
for (const part of parts.slice(0, -1)) {
|
|
50
|
+
directory = join(directory, part);
|
|
51
|
+
const stamp = lstatSync(directory, { bigint: true });
|
|
52
|
+
if (!stamp.isDirectory() || stamp.isSymbolicLink())
|
|
53
|
+
return unavailable("reference_unavailable");
|
|
54
|
+
directories.push({ path: directory, stamp });
|
|
55
|
+
}
|
|
56
|
+
const path = join(canonicalRoot, ...parts);
|
|
57
|
+
const before = lstatSync(path, { bigint: true });
|
|
58
|
+
if (!before.isFile())
|
|
59
|
+
return unavailable("reference_unavailable");
|
|
60
|
+
if (before.size < 0n || before.size > BigInt(Number.MAX_SAFE_INTEGER))
|
|
61
|
+
return unavailable("reference_size_unrepresentable");
|
|
62
|
+
if (maxTextBytes !== undefined && before.size > BigInt(maxTextBytes))
|
|
63
|
+
return Object.freeze({ availability: "unavailable", reason: "reference_too_large" });
|
|
64
|
+
// Nonblocking/nofollow flags avoid waiting on a leaf replaced with a FIFO or following a leaf alias when supported.
|
|
65
|
+
const fd = openSync(path, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0) | (constants.O_NONBLOCK ?? 0));
|
|
66
|
+
try {
|
|
67
|
+
const opened = fstatSync(fd, { bigint: true });
|
|
68
|
+
if (!sameFile(before, opened))
|
|
69
|
+
return unavailable("reference_changed");
|
|
70
|
+
const unchanged = () => {
|
|
71
|
+
try {
|
|
72
|
+
return directories.every(directory => {
|
|
73
|
+
const current = lstatSync(directory.path, { bigint: true });
|
|
74
|
+
return current.isDirectory() && sameObject(directory.stamp, current);
|
|
75
|
+
}) && sameFile(opened, lstatSync(path, { bigint: true }));
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
let text;
|
|
82
|
+
if (maxTextBytes !== undefined) {
|
|
83
|
+
const bytes = Buffer.alloc(Number(opened.size));
|
|
84
|
+
let offset = 0;
|
|
85
|
+
while (offset < bytes.length) {
|
|
86
|
+
const count = readSync(fd, bytes, offset, bytes.length - offset, offset);
|
|
87
|
+
if (!count)
|
|
88
|
+
return unavailable("reference_changed");
|
|
89
|
+
offset += count;
|
|
90
|
+
}
|
|
91
|
+
try {
|
|
92
|
+
text = new TextDecoder("utf-8", { fatal: true, ignoreBOM: !relative.startsWith("sessions/") }).decode(bytes);
|
|
93
|
+
}
|
|
94
|
+
catch {
|
|
95
|
+
return Object.freeze({ availability: "unavailable", reason: "reference_invalid_text" });
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (!sameFile(opened, fstatSync(fd, { bigint: true })) || !unchanged())
|
|
99
|
+
return unavailable("reference_changed");
|
|
100
|
+
const reference = Object.freeze({ availability: "available", path: relative, local_path: path, bytes_total: Number(opened.size), mutable: true, unchanged });
|
|
101
|
+
return text === undefined ? reference : Object.freeze({ availability: "available", reference, text });
|
|
102
|
+
}
|
|
103
|
+
finally {
|
|
104
|
+
closeSync(fd);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
return unavailable(error.code === "ENOENT" ? "reference_missing" : "reference_unavailable");
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/** Metadata-only: never reads body bytes, regardless of file size. */
|
|
112
|
+
export function observeExecutionFileReference(stateDir, request) {
|
|
113
|
+
return inspectExecutionFile(stateDir, request);
|
|
114
|
+
}
|
|
115
|
+
/** Raw text is kernel-local input to an authorized projection, never a tool/model result. */
|
|
116
|
+
export function readExecutionSessionText(stateDir, path) {
|
|
117
|
+
return inspectExecutionFile(stateDir, { kind: "session", path }, SESSION_EVIDENCE_MAX_BYTES);
|
|
118
|
+
}
|
|
119
|
+
/** Explicit command capture input only; neither this read nor its path authorizes publication. */
|
|
120
|
+
export function readExecutionCaptureText(stateDir, path) {
|
|
121
|
+
return inspectExecutionFile(stateDir, { kind: "capture", path }, RUN_STREAM_SOURCE_MAX_BYTES);
|
|
122
|
+
}
|
|
123
|
+
/** Canonical runner text is kernel-local input, not complete command capture or a model-visible privacy projection. */
|
|
124
|
+
export function readExecutionRunnerStreamText(stateDir, stream) {
|
|
125
|
+
if (stream !== "stdout" && stream !== "stderr")
|
|
126
|
+
return unavailable("invalid_reference");
|
|
127
|
+
return inspectExecutionFile(stateDir, { kind: "runner_stream", path: `${stream}.log` }, RUN_STREAM_SOURCE_MAX_BYTES);
|
|
128
|
+
}
|
|
@@ -35,10 +35,11 @@ export function trimToTailBytes(value, maxBytes) {
|
|
|
35
35
|
const buffer = Buffer.from(value, "utf8");
|
|
36
36
|
if (buffer.length <= maxBytes)
|
|
37
37
|
return value;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
let start = Math.ceil(buffer.length - maxBytes);
|
|
39
|
+
// Skip only the cut code point's continuation bytes, not genuine U+FFFD text.
|
|
40
|
+
while (start < buffer.length && (buffer[start] & 0xc0) === 0x80)
|
|
41
|
+
start++;
|
|
42
|
+
return buffer.subarray(start).toString("utf8");
|
|
42
43
|
}
|
|
43
44
|
export function truncateTailContent(content) {
|
|
44
45
|
const totalBytes = byteLength(content);
|
|
@@ -14,4 +14,22 @@ export interface ExecutionTurnItem extends SessionEvidence.SessionEvidenceTurn {
|
|
|
14
14
|
sessionTruncated: boolean;
|
|
15
15
|
stage?: string;
|
|
16
16
|
}
|
|
17
|
-
export declare
|
|
17
|
+
export declare const EXECUTION_CHRONOLOGY: unique symbol;
|
|
18
|
+
export interface ExecutionChronologyEntry extends SessionEvidence.SessionChronologyEntry {
|
|
19
|
+
commandId: string;
|
|
20
|
+
sessionFile: string;
|
|
21
|
+
sessionOrdinal: number;
|
|
22
|
+
}
|
|
23
|
+
export type ExecutionChronology = Readonly<{
|
|
24
|
+
basis: "recorded_execution_metadata";
|
|
25
|
+
entries: readonly Readonly<ExecutionChronologyEntry>[];
|
|
26
|
+
} & ({
|
|
27
|
+
state: "available";
|
|
28
|
+
} | {
|
|
29
|
+
state: "unavailable";
|
|
30
|
+
reason: SessionEvidence.SessionChronologyReason | "source_changed" | "namespace_unavailable";
|
|
31
|
+
})>;
|
|
32
|
+
export type ExecutionTurnCollection = ExecutionTurnItem[] & {
|
|
33
|
+
readonly [EXECUTION_CHRONOLOGY]?: ExecutionChronology;
|
|
34
|
+
};
|
|
35
|
+
export declare function readExecutionTurns(stateDir: string): ExecutionTurnCollection;
|