@nubl/maestro 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -2
- package/dist/config.json.example +30 -0
- package/dist/maestro/adapters/fake/fake-harness-adapter.d.ts +24 -0
- package/dist/maestro/adapters/fake/fake-harness-adapter.d.ts.map +1 -0
- package/dist/maestro/adapters/fake/fake-harness-adapter.js +210 -0
- package/dist/maestro/adapters/fake/fake-harness-adapter.js.map +1 -0
- package/dist/maestro/adapters/pi/accept-groups.d.ts +35 -0
- package/dist/maestro/adapters/pi/accept-groups.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/accept-groups.js +70 -0
- package/dist/maestro/adapters/pi/accept-groups.js.map +1 -0
- package/dist/maestro/adapters/pi/accept-runner.d.ts +37 -0
- package/dist/maestro/adapters/pi/accept-runner.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/accept-runner.js +161 -0
- package/dist/maestro/adapters/pi/accept-runner.js.map +1 -0
- package/dist/maestro/adapters/pi/activity-file.d.ts +39 -0
- package/dist/maestro/adapters/pi/activity-file.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/activity-file.js +454 -0
- package/dist/maestro/adapters/pi/activity-file.js.map +1 -0
- package/dist/maestro/adapters/pi/child/accept-check.d.ts +24 -0
- package/dist/maestro/adapters/pi/child/accept-check.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/child/accept-check.js +82 -0
- package/dist/maestro/adapters/pi/child/accept-check.js.map +1 -0
- package/dist/maestro/adapters/pi/child/declared-skills.d.ts +51 -0
- package/dist/maestro/adapters/pi/child/declared-skills.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/child/declared-skills.js +148 -0
- package/dist/maestro/adapters/pi/child/declared-skills.js.map +1 -0
- package/dist/maestro/adapters/pi/child/done-nudge.d.ts +38 -0
- package/dist/maestro/adapters/pi/child/done-nudge.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/child/done-nudge.js +77 -0
- package/dist/maestro/adapters/pi/child/done-nudge.js.map +1 -0
- package/dist/maestro/adapters/pi/child/entry.d.ts +3 -0
- package/dist/maestro/adapters/pi/child/entry.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/child/entry.js +3 -0
- package/dist/maestro/adapters/pi/child/entry.js.map +1 -0
- package/dist/maestro/adapters/pi/child/protocol.d.ts +56 -0
- package/dist/maestro/adapters/pi/child/protocol.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/child/protocol.js +510 -0
- package/dist/maestro/adapters/pi/child/protocol.js.map +1 -0
- package/dist/maestro/adapters/pi/completion.d.ts +45 -0
- package/dist/maestro/adapters/pi/completion.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/completion.js +295 -0
- package/dist/maestro/adapters/pi/completion.js.map +1 -0
- package/dist/maestro/adapters/pi/launch-command.d.ts +27 -0
- package/dist/maestro/adapters/pi/launch-command.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/launch-command.js +75 -0
- package/dist/maestro/adapters/pi/launch-command.js.map +1 -0
- package/dist/maestro/adapters/pi/launch-operations.d.ts +78 -0
- package/dist/maestro/adapters/pi/launch-operations.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/launch-operations.js +270 -0
- package/dist/maestro/adapters/pi/launch-operations.js.map +1 -0
- package/dist/maestro/adapters/pi/launch-resume.d.ts +4 -0
- package/dist/maestro/adapters/pi/launch-resume.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/launch-resume.js +183 -0
- package/dist/maestro/adapters/pi/launch-resume.js.map +1 -0
- package/dist/maestro/adapters/pi/launch.d.ts +148 -0
- package/dist/maestro/adapters/pi/launch.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/launch.js +655 -0
- package/dist/maestro/adapters/pi/launch.js.map +1 -0
- package/dist/maestro/adapters/pi/model-registry.d.ts +3 -0
- package/dist/maestro/adapters/pi/model-registry.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/model-registry.js +29 -0
- package/dist/maestro/adapters/pi/model-registry.js.map +1 -0
- package/dist/maestro/adapters/pi/pi-harness-adapter.d.ts +95 -0
- package/dist/maestro/adapters/pi/pi-harness-adapter.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/pi-harness-adapter.js +549 -0
- package/dist/maestro/adapters/pi/pi-harness-adapter.js.map +1 -0
- package/dist/maestro/adapters/pi/process-identity.d.ts +92 -0
- package/dist/maestro/adapters/pi/process-identity.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/process-identity.js +248 -0
- package/dist/maestro/adapters/pi/process-identity.js.map +1 -0
- package/dist/maestro/adapters/pi/process-tree.d.ts +48 -0
- package/dist/maestro/adapters/pi/process-tree.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/process-tree.js +69 -0
- package/dist/maestro/adapters/pi/process-tree.js.map +1 -0
- package/dist/maestro/adapters/pi/script-shell.d.ts +40 -0
- package/dist/maestro/adapters/pi/script-shell.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/script-shell.js +43 -0
- package/dist/maestro/adapters/pi/script-shell.js.map +1 -0
- package/dist/maestro/adapters/pi/session.d.ts +207 -0
- package/dist/maestro/adapters/pi/session.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/session.js +714 -0
- package/dist/maestro/adapters/pi/session.js.map +1 -0
- package/dist/maestro/adapters/pi/task-model-init.d.ts +4 -0
- package/dist/maestro/adapters/pi/task-model-init.d.ts.map +1 -0
- package/dist/maestro/adapters/pi/task-model-init.js +47 -0
- package/dist/maestro/adapters/pi/task-model-init.js.map +1 -0
- package/dist/maestro/core/accept.d.ts +150 -0
- package/dist/maestro/core/accept.d.ts.map +1 -0
- package/dist/maestro/core/accept.js +243 -0
- package/dist/maestro/core/accept.js.map +1 -0
- package/dist/maestro/core/activity.d.ts +4 -0
- package/dist/maestro/core/activity.d.ts.map +1 -0
- package/dist/maestro/core/activity.js +18 -0
- package/dist/maestro/core/activity.js.map +1 -0
- package/dist/maestro/core/child-busy.d.ts +14 -0
- package/dist/maestro/core/child-busy.d.ts.map +1 -0
- package/dist/maestro/core/child-busy.js +14 -0
- package/dist/maestro/core/child-busy.js.map +1 -0
- package/dist/maestro/core/config/guidelines-config.d.ts +8 -0
- package/dist/maestro/core/config/guidelines-config.d.ts.map +1 -0
- package/dist/maestro/core/config/guidelines-config.js +60 -0
- package/dist/maestro/core/config/guidelines-config.js.map +1 -0
- package/dist/maestro/core/config/herdr-config.d.ts +13 -0
- package/dist/maestro/core/config/herdr-config.d.ts.map +1 -0
- package/dist/maestro/core/config/herdr-config.js +65 -0
- package/dist/maestro/core/config/herdr-config.js.map +1 -0
- package/dist/maestro/core/config/model-config.d.ts +92 -0
- package/dist/maestro/core/config/model-config.d.ts.map +1 -0
- package/dist/maestro/core/config/model-config.js +522 -0
- package/dist/maestro/core/config/model-config.js.map +1 -0
- package/dist/maestro/core/config/outcome-ledger-config.d.ts +8 -0
- package/dist/maestro/core/config/outcome-ledger-config.d.ts.map +1 -0
- package/dist/maestro/core/config/outcome-ledger-config.js +49 -0
- package/dist/maestro/core/config/outcome-ledger-config.js.map +1 -0
- package/dist/maestro/core/config/pane-config.d.ts +15 -0
- package/dist/maestro/core/config/pane-config.d.ts.map +1 -0
- package/dist/maestro/core/config/pane-config.js +101 -0
- package/dist/maestro/core/config/pane-config.js.map +1 -0
- package/dist/maestro/core/config/persistent-config.d.ts +7 -0
- package/dist/maestro/core/config/persistent-config.d.ts.map +1 -0
- package/dist/maestro/core/config/persistent-config.js +72 -0
- package/dist/maestro/core/config/persistent-config.js.map +1 -0
- package/dist/maestro/core/config/role-config.d.ts +7 -0
- package/dist/maestro/core/config/role-config.d.ts.map +1 -0
- package/dist/maestro/core/config/role-config.js +74 -0
- package/dist/maestro/core/config/role-config.js.map +1 -0
- package/dist/maestro/core/config/spawning-config.d.ts +7 -0
- package/dist/maestro/core/config/spawning-config.d.ts.map +1 -0
- package/dist/maestro/core/config/spawning-config.js +65 -0
- package/dist/maestro/core/config/spawning-config.js.map +1 -0
- package/dist/maestro/core/config/supervision-config.d.ts +7 -0
- package/dist/maestro/core/config/supervision-config.d.ts.map +1 -0
- package/dist/maestro/core/config/supervision-config.js +69 -0
- package/dist/maestro/core/config/supervision-config.js.map +1 -0
- package/dist/maestro/core/config/task-model-init.d.ts +118 -0
- package/dist/maestro/core/config/task-model-init.d.ts.map +1 -0
- package/dist/maestro/core/config/task-model-init.js +168 -0
- package/dist/maestro/core/config/task-model-init.js.map +1 -0
- package/dist/maestro/core/config/task-model-types.d.ts +36 -0
- package/dist/maestro/core/config/task-model-types.d.ts.map +1 -0
- package/dist/maestro/core/config/task-model-types.js +17 -0
- package/dist/maestro/core/config/task-model-types.js.map +1 -0
- package/dist/maestro/core/config/type-guards.d.ts +22 -0
- package/dist/maestro/core/config/type-guards.d.ts.map +1 -0
- package/dist/maestro/core/config/type-guards.js +31 -0
- package/dist/maestro/core/config/type-guards.js.map +1 -0
- package/dist/maestro/core/deadline.d.ts +11 -0
- package/dist/maestro/core/deadline.d.ts.map +1 -0
- package/dist/maestro/core/deadline.js +30 -0
- package/dist/maestro/core/deadline.js.map +1 -0
- package/dist/maestro/core/declared-skills.d.ts +16 -0
- package/dist/maestro/core/declared-skills.d.ts.map +1 -0
- package/dist/maestro/core/declared-skills.js +52 -0
- package/dist/maestro/core/declared-skills.js.map +1 -0
- package/dist/maestro/core/delegation-depth.d.ts +38 -0
- package/dist/maestro/core/delegation-depth.d.ts.map +1 -0
- package/dist/maestro/core/delegation-depth.js +59 -0
- package/dist/maestro/core/delegation-depth.js.map +1 -0
- package/dist/maestro/core/git-environment.d.ts +3 -0
- package/dist/maestro/core/git-environment.d.ts.map +1 -0
- package/dist/maestro/core/git-environment.js +29 -0
- package/dist/maestro/core/git-environment.js.map +1 -0
- package/dist/maestro/core/harness-adapter.d.ts +89 -0
- package/dist/maestro/core/harness-adapter.d.ts.map +1 -0
- package/dist/maestro/core/harness-adapter.js +2 -0
- package/dist/maestro/core/harness-adapter.js.map +1 -0
- package/dist/maestro/core/host-text.d.ts +49 -0
- package/dist/maestro/core/host-text.d.ts.map +1 -0
- package/dist/maestro/core/host-text.js +106 -0
- package/dist/maestro/core/host-text.js.map +1 -0
- package/dist/maestro/core/index.d.ts +4 -0
- package/dist/maestro/core/index.d.ts.map +1 -0
- package/dist/maestro/core/index.js +2 -0
- package/dist/maestro/core/index.js.map +1 -0
- package/dist/maestro/core/lifecycle.d.ts +16 -0
- package/dist/maestro/core/lifecycle.d.ts.map +1 -0
- package/dist/maestro/core/lifecycle.js +429 -0
- package/dist/maestro/core/lifecycle.js.map +1 -0
- package/dist/maestro/core/opened-primary-workspace.d.ts +31 -0
- package/dist/maestro/core/opened-primary-workspace.d.ts.map +1 -0
- package/dist/maestro/core/opened-primary-workspace.js +49 -0
- package/dist/maestro/core/opened-primary-workspace.js.map +1 -0
- package/dist/maestro/core/platform-support.d.ts +15 -0
- package/dist/maestro/core/platform-support.d.ts.map +1 -0
- package/dist/maestro/core/platform-support.js +23 -0
- package/dist/maestro/core/platform-support.js.map +1 -0
- package/dist/maestro/core/realpath-without-opening.d.ts +9 -0
- package/dist/maestro/core/realpath-without-opening.d.ts.map +1 -0
- package/dist/maestro/core/realpath-without-opening.js +45 -0
- package/dist/maestro/core/realpath-without-opening.js.map +1 -0
- package/dist/maestro/core/roles/discovery.d.ts +64 -0
- package/dist/maestro/core/roles/discovery.d.ts.map +1 -0
- package/dist/maestro/core/roles/discovery.js +422 -0
- package/dist/maestro/core/roles/discovery.js.map +1 -0
- package/dist/maestro/core/routing.d.ts +115 -0
- package/dist/maestro/core/routing.d.ts.map +1 -0
- package/dist/maestro/core/routing.js +449 -0
- package/dist/maestro/core/routing.js.map +1 -0
- package/dist/maestro/core/script-launch.d.ts +47 -0
- package/dist/maestro/core/script-launch.d.ts.map +1 -0
- package/dist/maestro/core/script-launch.js +102 -0
- package/dist/maestro/core/script-launch.js.map +1 -0
- package/dist/maestro/core/shell.d.ts +2 -0
- package/dist/maestro/core/shell.d.ts.map +1 -0
- package/dist/maestro/core/shell.js +4 -0
- package/dist/maestro/core/shell.js.map +1 -0
- package/dist/maestro/core/specialist-notice.d.ts +36 -0
- package/dist/maestro/core/specialist-notice.d.ts.map +1 -0
- package/dist/maestro/core/specialist-notice.js +41 -0
- package/dist/maestro/core/specialist-notice.js.map +1 -0
- package/dist/maestro/core/status.d.ts +87 -0
- package/dist/maestro/core/status.d.ts.map +1 -0
- package/dist/maestro/core/status.js +369 -0
- package/dist/maestro/core/status.js.map +1 -0
- package/dist/maestro/core/supervision.d.ts +56 -0
- package/dist/maestro/core/supervision.d.ts.map +1 -0
- package/dist/maestro/core/supervision.js +249 -0
- package/dist/maestro/core/supervision.js.map +1 -0
- package/dist/maestro/core/surface-provider.d.ts +200 -0
- package/dist/maestro/core/surface-provider.d.ts.map +1 -0
- package/dist/maestro/core/surface-provider.js +71 -0
- package/dist/maestro/core/surface-provider.js.map +1 -0
- package/dist/maestro/core/types.d.ts +388 -0
- package/dist/maestro/core/types.d.ts.map +1 -0
- package/dist/maestro/core/types.js +2 -0
- package/dist/maestro/core/types.js.map +1 -0
- package/dist/maestro/core/undelivered-children.d.ts +27 -0
- package/dist/maestro/core/undelivered-children.d.ts.map +1 -0
- package/dist/maestro/core/undelivered-children.js +31 -0
- package/dist/maestro/core/undelivered-children.js.map +1 -0
- package/dist/maestro/core/wake.d.ts +32 -0
- package/dist/maestro/core/wake.d.ts.map +1 -0
- package/dist/maestro/core/wake.js +125 -0
- package/dist/maestro/core/wake.js.map +1 -0
- package/dist/maestro/core/worktree-cleanup.d.ts +75 -0
- package/dist/maestro/core/worktree-cleanup.d.ts.map +1 -0
- package/dist/maestro/core/worktree-cleanup.js +278 -0
- package/dist/maestro/core/worktree-cleanup.js.map +1 -0
- package/dist/maestro/core/worktree.d.ts +50 -0
- package/dist/maestro/core/worktree.d.ts.map +1 -0
- package/dist/maestro/core/worktree.js +23 -0
- package/dist/maestro/core/worktree.js.map +1 -0
- package/dist/maestro/engine.d.ts +5 -0
- package/dist/maestro/engine.d.ts.map +1 -0
- package/dist/maestro/engine.js +5 -0
- package/dist/maestro/engine.js.map +1 -0
- package/dist/maestro/pi/child.d.ts +8 -0
- package/dist/maestro/pi/child.d.ts.map +1 -0
- package/dist/maestro/pi/child.js +8 -0
- package/dist/maestro/pi/child.js.map +1 -0
- package/dist/maestro/pi/extension.d.ts +10 -0
- package/dist/maestro/pi/extension.d.ts.map +1 -0
- package/dist/maestro/pi/extension.js +8 -0
- package/dist/maestro/pi/extension.js.map +1 -0
- package/dist/maestro/pi/subagents-index.d.ts +9 -0
- package/dist/maestro/pi/subagents-index.d.ts.map +1 -0
- package/dist/maestro/pi/subagents-index.js +9 -0
- package/dist/maestro/pi/subagents-index.js.map +1 -0
- package/dist/maestro/pi.d.ts +9 -0
- package/dist/maestro/pi.d.ts.map +1 -0
- package/dist/maestro/pi.js +7 -0
- package/dist/maestro/pi.js.map +1 -0
- package/dist/maestro/runtime/accept-recheck.d.ts +32 -0
- package/dist/maestro/runtime/accept-recheck.d.ts.map +1 -0
- package/dist/maestro/runtime/accept-recheck.js +92 -0
- package/dist/maestro/runtime/accept-recheck.js.map +1 -0
- package/dist/maestro/runtime/delegated-marker.d.ts +112 -0
- package/dist/maestro/runtime/delegated-marker.d.ts.map +1 -0
- package/dist/maestro/runtime/delegated-marker.js +200 -0
- package/dist/maestro/runtime/delegated-marker.js.map +1 -0
- package/dist/maestro/runtime/host-surface-binding.d.ts +25 -0
- package/dist/maestro/runtime/host-surface-binding.d.ts.map +1 -0
- package/dist/maestro/runtime/host-surface-binding.js +2 -0
- package/dist/maestro/runtime/host-surface-binding.js.map +1 -0
- package/dist/maestro/runtime/index.d.ts +10 -0
- package/dist/maestro/runtime/index.d.ts.map +1 -0
- package/dist/maestro/runtime/index.js +6 -0
- package/dist/maestro/runtime/index.js.map +1 -0
- package/dist/maestro/runtime/pi-persistent-io.d.ts +7 -0
- package/dist/maestro/runtime/pi-persistent-io.d.ts.map +1 -0
- package/dist/maestro/runtime/pi-persistent-io.js +64 -0
- package/dist/maestro/runtime/pi-persistent-io.js.map +1 -0
- package/dist/maestro/runtime/pi-run-session-types.d.ts +328 -0
- package/dist/maestro/runtime/pi-run-session-types.d.ts.map +1 -0
- package/dist/maestro/runtime/pi-run-session-types.js +2 -0
- package/dist/maestro/runtime/pi-run-session-types.js.map +1 -0
- package/dist/maestro/runtime/pi-run-session.d.ts +12 -0
- package/dist/maestro/runtime/pi-run-session.d.ts.map +1 -0
- package/dist/maestro/runtime/pi-run-session.js +809 -0
- package/dist/maestro/runtime/pi-run-session.js.map +1 -0
- package/dist/maestro/runtime/run-session.d.ts +129 -0
- package/dist/maestro/runtime/run-session.d.ts.map +1 -0
- package/dist/maestro/runtime/run-session.js +680 -0
- package/dist/maestro/runtime/run-session.js.map +1 -0
- package/dist/maestro/runtime/surface-retention.d.ts +3 -0
- package/dist/maestro/runtime/surface-retention.d.ts.map +1 -0
- package/dist/maestro/runtime/surface-retention.js +5 -0
- package/dist/maestro/runtime/surface-retention.js.map +1 -0
- package/dist/maestro/runtime/task-model-init.d.ts +34 -0
- package/dist/maestro/runtime/task-model-init.d.ts.map +1 -0
- package/dist/maestro/runtime/task-model-init.js +78 -0
- package/dist/maestro/runtime/task-model-init.js.map +1 -0
- package/dist/maestro/runtime/worktree-operations.d.ts +31 -0
- package/dist/maestro/runtime/worktree-operations.d.ts.map +1 -0
- package/dist/maestro/runtime/worktree-operations.js +633 -0
- package/dist/maestro/runtime/worktree-operations.js.map +1 -0
- package/dist/maestro/surfaces/fake/fake-surface-provider.d.ts +54 -0
- package/dist/maestro/surfaces/fake/fake-surface-provider.d.ts.map +1 -0
- package/dist/maestro/surfaces/fake/fake-surface-provider.js +231 -0
- package/dist/maestro/surfaces/fake/fake-surface-provider.js.map +1 -0
- package/dist/maestro/testing/harness-adapter.conformance.d.ts +31 -0
- package/dist/maestro/testing/harness-adapter.conformance.d.ts.map +1 -0
- package/dist/maestro/testing/harness-adapter.conformance.js +181 -0
- package/dist/maestro/testing/harness-adapter.conformance.js.map +1 -0
- package/dist/maestro/testing/index.d.ts +5 -0
- package/dist/maestro/testing/index.d.ts.map +1 -0
- package/dist/maestro/testing/index.js +5 -0
- package/dist/maestro/testing/index.js.map +1 -0
- package/dist/maestro/testing/surface-provider.conformance.d.ts +20 -0
- package/dist/maestro/testing/surface-provider.conformance.d.ts.map +1 -0
- package/dist/maestro/testing/surface-provider.conformance.js +167 -0
- package/dist/maestro/testing/surface-provider.conformance.js.map +1 -0
- package/dist/pi-extension/subagents/catalog.d.ts +70 -0
- package/dist/pi-extension/subagents/catalog.d.ts.map +1 -0
- package/dist/pi-extension/subagents/catalog.js +231 -0
- package/dist/pi-extension/subagents/catalog.js.map +1 -0
- package/dist/pi-extension/subagents/config-path.d.ts +6 -0
- package/dist/pi-extension/subagents/config-path.d.ts.map +1 -0
- package/dist/pi-extension/subagents/config-path.js +21 -0
- package/dist/pi-extension/subagents/config-path.js.map +1 -0
- package/dist/pi-extension/subagents/control-tools.d.ts +21 -0
- package/dist/pi-extension/subagents/control-tools.d.ts.map +1 -0
- package/dist/pi-extension/subagents/control-tools.js +150 -0
- package/dist/pi-extension/subagents/control-tools.js.map +1 -0
- package/dist/pi-extension/subagents/controls.d.ts +52 -0
- package/dist/pi-extension/subagents/controls.d.ts.map +1 -0
- package/dist/pi-extension/subagents/controls.js +173 -0
- package/dist/pi-extension/subagents/controls.js.map +1 -0
- package/dist/pi-extension/subagents/deferred-tools.d.ts +43 -0
- package/dist/pi-extension/subagents/deferred-tools.d.ts.map +1 -0
- package/dist/pi-extension/subagents/deferred-tools.js +67 -0
- package/dist/pi-extension/subagents/deferred-tools.js.map +1 -0
- package/dist/pi-extension/subagents/delivery.d.ts +22 -0
- package/dist/pi-extension/subagents/delivery.d.ts.map +1 -0
- package/dist/pi-extension/subagents/delivery.js +365 -0
- package/dist/pi-extension/subagents/delivery.js.map +1 -0
- package/dist/pi-extension/subagents/extension.d.ts +100 -0
- package/dist/pi-extension/subagents/extension.d.ts.map +1 -0
- package/dist/pi-extension/subagents/extension.js +367 -0
- package/dist/pi-extension/subagents/extension.js.map +1 -0
- package/dist/pi-extension/subagents/launch-tools.d.ts +33 -0
- package/dist/pi-extension/subagents/launch-tools.d.ts.map +1 -0
- package/dist/pi-extension/subagents/launch-tools.js +373 -0
- package/dist/pi-extension/subagents/launch-tools.js.map +1 -0
- package/dist/pi-extension/subagents/launch.d.ts +86 -0
- package/dist/pi-extension/subagents/launch.d.ts.map +1 -0
- package/dist/pi-extension/subagents/launch.js +133 -0
- package/dist/pi-extension/subagents/launch.js.map +1 -0
- package/dist/pi-extension/subagents/model-registry.d.ts +13 -0
- package/dist/pi-extension/subagents/model-registry.d.ts.map +1 -0
- package/dist/pi-extension/subagents/model-registry.js +52 -0
- package/dist/pi-extension/subagents/model-registry.js.map +1 -0
- package/dist/pi-extension/subagents/observation.d.ts +38 -0
- package/dist/pi-extension/subagents/observation.d.ts.map +1 -0
- package/dist/pi-extension/subagents/observation.js +168 -0
- package/dist/pi-extension/subagents/observation.js.map +1 -0
- package/dist/pi-extension/subagents/persistent.d.ts +72 -0
- package/dist/pi-extension/subagents/persistent.d.ts.map +1 -0
- package/dist/pi-extension/subagents/persistent.js +322 -0
- package/dist/pi-extension/subagents/persistent.js.map +1 -0
- package/dist/pi-extension/subagents/presentation-hooks.d.ts +25 -0
- package/dist/pi-extension/subagents/presentation-hooks.d.ts.map +1 -0
- package/dist/pi-extension/subagents/presentation-hooks.js +2 -0
- package/dist/pi-extension/subagents/presentation-hooks.js.map +1 -0
- package/dist/pi-extension/subagents/presentation.d.ts +149 -0
- package/dist/pi-extension/subagents/presentation.d.ts.map +1 -0
- package/dist/pi-extension/subagents/presentation.js +419 -0
- package/dist/pi-extension/subagents/presentation.js.map +1 -0
- package/dist/pi-extension/subagents/state.d.ts +183 -0
- package/dist/pi-extension/subagents/state.d.ts.map +1 -0
- package/dist/pi-extension/subagents/state.js +92 -0
- package/dist/pi-extension/subagents/state.js.map +1 -0
- package/dist/pi-extension/subagents/task-models.d.ts +9 -0
- package/dist/pi-extension/subagents/task-models.d.ts.map +1 -0
- package/dist/pi-extension/subagents/task-models.js +293 -0
- package/dist/pi-extension/subagents/task-models.js.map +1 -0
- package/dist/pi-extension/subagents/tool-boundary.d.ts +16 -0
- package/dist/pi-extension/subagents/tool-boundary.d.ts.map +1 -0
- package/dist/pi-extension/subagents/tool-boundary.js +53 -0
- package/dist/pi-extension/subagents/tool-boundary.js.map +1 -0
- package/dist/pi-extension/subagents/worktree-tools.d.ts +16 -0
- package/dist/pi-extension/subagents/worktree-tools.d.ts.map +1 -0
- package/dist/pi-extension/subagents/worktree-tools.js +185 -0
- package/dist/pi-extension/subagents/worktree-tools.js.map +1 -0
- package/dist/provenance.json +5 -0
- package/package.json +540 -27
- package/index.d.ts +0 -1
- package/index.js +0 -2
|
@@ -0,0 +1,809 @@
|
|
|
1
|
+
import { existsSync, statSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { randomUUID } from "node:crypto";
|
|
4
|
+
import { PiHarnessAdapter } from "../adapters/pi/pi-harness-adapter.js";
|
|
5
|
+
import { launchOperationsFromSurface, } from "../adapters/pi/launch-operations.js";
|
|
6
|
+
import { launchPiWorktreeHandoff } from "../adapters/pi/launch.js";
|
|
7
|
+
import { createWorktreeOperations, createWorktreeCleanupOperations, } from "./worktree-operations.js";
|
|
8
|
+
import { worktreeResultState, } from "../core/worktree.js";
|
|
9
|
+
import { getNewEntries, findLastAssistantSummary, findObservedSessionRuntime, inspectNoProgressSessionTail, } from "../adapters/pi/session.js";
|
|
10
|
+
import { assertManagedWorktreesSupported, managedWorktreeRefusal, } from "../core/platform-support.js";
|
|
11
|
+
import { assertSameHerdrBinding, } from "../core/config/herdr-config.js";
|
|
12
|
+
import { createPiScriptShellResolver } from "../adapters/pi/script-shell.js";
|
|
13
|
+
import { readSubagentActivityFile } from "../adapters/pi/activity-file.js";
|
|
14
|
+
import { projectActivity } from "../core/activity.js";
|
|
15
|
+
import { markCompletionDetected, markCompleted, markFailed, markDelivery, observeActivity, projectLifecycle, } from "../core/lifecycle.js";
|
|
16
|
+
import { FileWakeRegistry } from "../core/wake.js";
|
|
17
|
+
import { SupervisionCoordinator } from "../core/supervision.js";
|
|
18
|
+
import { assertModelInScope, isThinkingLevel, resolveRuntimePlan, resolveRuntimePlans, } from "../core/routing.js";
|
|
19
|
+
import { loadPaneConfig } from "../core/config/pane-config.js";
|
|
20
|
+
import { DelegatedMarkers } from "./delegated-marker.js";
|
|
21
|
+
import { createRunSession, } from "./run-session.js";
|
|
22
|
+
import { createPiPersistentIO } from "./pi-persistent-io.js";
|
|
23
|
+
import { appendOutcomeLedger, ledgerOutcome, outcomeLedgerFile, runParentAcceptCheck, } from "./accept-recheck.js";
|
|
24
|
+
import { runAcceptCommand } from "../adapters/pi/accept-runner.js";
|
|
25
|
+
import { terminateAcceptChecks, } from "../adapters/pi/accept-groups.js";
|
|
26
|
+
// pi-herdr-agents extension; no owning session required
|
|
27
|
+
export function observePiActivity(input, observedAt) {
|
|
28
|
+
const read = input.activityFile
|
|
29
|
+
? readSubagentActivityFile(input.activityFile, input.id)
|
|
30
|
+
: projectActivity(undefined);
|
|
31
|
+
const lifecycle = observeActivity(input.lifecycle, read, observedAt);
|
|
32
|
+
return {
|
|
33
|
+
kind: "refresh",
|
|
34
|
+
observedAt,
|
|
35
|
+
lifecycle,
|
|
36
|
+
projection: projectLifecycle(lifecycle, observedAt),
|
|
37
|
+
activity: read.ok ? read.activity : undefined,
|
|
38
|
+
activityRead: read,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
// The previous facade carries its live composition explicitly across module replacement.
|
|
42
|
+
// No module-local lookup can accidentally rediscover an owner.
|
|
43
|
+
const OWNER = Symbol.for("pi-herdr-agents/PiRunSession-owner");
|
|
44
|
+
// A detached close can outlive settlement without capturing a child, metadata,
|
|
45
|
+
// adapter, current hook binding or the composition registry.
|
|
46
|
+
function temporarySurfaceRelease(provider, surface) {
|
|
47
|
+
return async () => {
|
|
48
|
+
// Suppression may release before a watcher observes native exit. Like a
|
|
49
|
+
// legacy pane close, stop the owned program, but remove its record only
|
|
50
|
+
// after independent exit confirmation and delivery/suppression gating.
|
|
51
|
+
await provider.nativeExecution?.terminate(surface);
|
|
52
|
+
await provider.closeSurface(surface);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function createDelegatedMarkers(options) {
|
|
56
|
+
const transport = options.infrastructure
|
|
57
|
+
? {
|
|
58
|
+
write: options.infrastructure.markerWriter,
|
|
59
|
+
readSession: options.infrastructure.markerSessionReader,
|
|
60
|
+
}
|
|
61
|
+
: options.hostSurface.markers?.();
|
|
62
|
+
return transport?.write && transport.readSession
|
|
63
|
+
? new DelegatedMarkers({
|
|
64
|
+
write: transport.write,
|
|
65
|
+
readSession: transport.readSession,
|
|
66
|
+
})
|
|
67
|
+
: undefined;
|
|
68
|
+
}
|
|
69
|
+
/** Host diagnostics stay host; only text the child wrote is child-error. */
|
|
70
|
+
function errorProvenance(source) {
|
|
71
|
+
return source === "child" ? "child-error" : "host";
|
|
72
|
+
}
|
|
73
|
+
// Capture only resume presentation scalars, not the child or its owning registry.
|
|
74
|
+
function resumeResultReader(sessionFile, cursor, exitCode, errorMessage, errorSource) {
|
|
75
|
+
return () => ({
|
|
76
|
+
...(findLastAssistantSummary(getNewEntries(sessionFile, cursor)) ?? {
|
|
77
|
+
summary: errorMessage
|
|
78
|
+
? `Subagent error: ${errorMessage}`
|
|
79
|
+
: exitCode === 0
|
|
80
|
+
? "Resumed session exited without new output"
|
|
81
|
+
: `Resumed session exited with code ${exitCode}`,
|
|
82
|
+
summarySource: errorProvenance(errorSource),
|
|
83
|
+
}),
|
|
84
|
+
sessionFile,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
// pi-herdr-agents extension
|
|
88
|
+
export function createDefaultRunSession(options, previous) {
|
|
89
|
+
// SAFETY: this factory alone attaches its private symbol owner to Pi facades.
|
|
90
|
+
const adopted = previous &&
|
|
91
|
+
previous[OWNER];
|
|
92
|
+
if (previous && !adopted)
|
|
93
|
+
throw new Error("Previous PiRunSession does not carry its owning composition.");
|
|
94
|
+
if (options.infrastructure &&
|
|
95
|
+
options.infrastructure.launchOperations.nativeExecution !==
|
|
96
|
+
options.infrastructure.surfaceProvider.nativeExecution)
|
|
97
|
+
throw new Error("Pi owning provider and launch operations must use the same native execution binding");
|
|
98
|
+
if (!options.infrastructure && !options.hostSurface)
|
|
99
|
+
throw new Error("Pi run session requires a host surface binding");
|
|
100
|
+
// Injected infrastructure is a closed world: never inspect ambient Core sockets.
|
|
101
|
+
const binding = options.infrastructure
|
|
102
|
+
? { backend: "legacy" }
|
|
103
|
+
: options.hostSurface.resolve(options.configDir, options.configExamplePath, options.platform);
|
|
104
|
+
if (adopted) {
|
|
105
|
+
assertSameHerdrBinding(adopted.binding, binding);
|
|
106
|
+
const previousNative = adopted.infrastructure.surfaceProvider.nativeExecution;
|
|
107
|
+
const nextNative = options.infrastructure?.surfaceProvider.nativeExecution;
|
|
108
|
+
if (options.infrastructure && previousNative !== nextNative)
|
|
109
|
+
throw new Error("Injected native execution binding changed; restart Pi");
|
|
110
|
+
}
|
|
111
|
+
let state;
|
|
112
|
+
let resumePi;
|
|
113
|
+
if (adopted) {
|
|
114
|
+
state = adopted;
|
|
115
|
+
const supervision = state.infrastructure.supervision;
|
|
116
|
+
if (supervision.setForcePolling) {
|
|
117
|
+
supervision.setForcePolling(options.forcePolling);
|
|
118
|
+
}
|
|
119
|
+
else if ((supervision.diagnostics().mode === "polling(forced)") !==
|
|
120
|
+
options.forcePolling) {
|
|
121
|
+
// An owner created before live reconfiguration cannot transfer its
|
|
122
|
+
// registrations safely. Never silently replace it or ignore config.
|
|
123
|
+
throw new Error("Cannot change supervision.forcePolling on a pre-upgrade coordinator. Let active children finish, then restart Pi to apply it.");
|
|
124
|
+
}
|
|
125
|
+
state.options = options;
|
|
126
|
+
state.roles.splice(0, state.roles.length, ...options.roles);
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
// Configured placement belongs to each new launch; the coordinator alone owns
|
|
130
|
+
// this explicitly injected registry. Injected infrastructure already owns one.
|
|
131
|
+
const provider = options.infrastructure?.surfaceProvider ??
|
|
132
|
+
options.hostSurface.createProvider(binding, loadPaneConfig(join(options.configDir, "herdr-agents"), options.configExamplePath),
|
|
133
|
+
// No launch context here, so project settings are untrusted.
|
|
134
|
+
createPiScriptShellResolver({
|
|
135
|
+
cwd: process.cwd(),
|
|
136
|
+
projectTrusted: false,
|
|
137
|
+
}));
|
|
138
|
+
const wake = options.infrastructure ? undefined : new FileWakeRegistry();
|
|
139
|
+
const supervision = options.infrastructure?.supervision ??
|
|
140
|
+
new SupervisionCoordinator(async () => {
|
|
141
|
+
try {
|
|
142
|
+
return {
|
|
143
|
+
complete: true,
|
|
144
|
+
panes: (await provider.listSurfaces()).map((s) => ({
|
|
145
|
+
paneId: s.id,
|
|
146
|
+
workspaceId: s.workspaceId ?? "",
|
|
147
|
+
})),
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
catch {
|
|
151
|
+
return { complete: false, panes: [] };
|
|
152
|
+
}
|
|
153
|
+
}, (id) => provider.inspectSurface(id), options.forcePolling, wake);
|
|
154
|
+
const infrastructure = options.infrastructure ?? {
|
|
155
|
+
surfaceProvider: provider,
|
|
156
|
+
supervision,
|
|
157
|
+
};
|
|
158
|
+
const entries = new Map();
|
|
159
|
+
const roles = [...options.roles];
|
|
160
|
+
const pending = new Set();
|
|
161
|
+
// The operations always supply an actual owning adapter. The lazy default is
|
|
162
|
+
// an actual Pi adapter too, only constructed if the generic default is used.
|
|
163
|
+
const kernel = createRunSession({
|
|
164
|
+
get adapter() {
|
|
165
|
+
return adapter(state.options.getLaunchSnapshot());
|
|
166
|
+
},
|
|
167
|
+
roles,
|
|
168
|
+
cwd: process.cwd(),
|
|
169
|
+
operations: {
|
|
170
|
+
async prepare(task, role) {
|
|
171
|
+
if (task.worktree)
|
|
172
|
+
assertManagedWorktreesSupported(state.options.platform);
|
|
173
|
+
const snapshot = state.options.getLaunchSnapshot();
|
|
174
|
+
if (!snapshot.parentRuntime)
|
|
175
|
+
throw new Error("Pi launch requires the active parent runtime");
|
|
176
|
+
const plans = resolveRuntimePlans(task.runtime ?? {}, role.defaults ?? {}, snapshot.parentRuntime, snapshot.modelRegistry);
|
|
177
|
+
for (const candidate of task.runtime?.fallbacks ?? [])
|
|
178
|
+
plans.push(resolveRuntimePlan(candidate, role.defaults ?? {}, snapshot.parentRuntime, snapshot.modelRegistry));
|
|
179
|
+
const [first, ...rest] = plans;
|
|
180
|
+
if (!first)
|
|
181
|
+
throw new Error("No resolved runtime plans");
|
|
182
|
+
const id = randomUUID();
|
|
183
|
+
return prepare({
|
|
184
|
+
task,
|
|
185
|
+
role,
|
|
186
|
+
plans: [first, ...rest],
|
|
187
|
+
resolved: {
|
|
188
|
+
agent: role.name || undefined,
|
|
189
|
+
cwd: task.cwd,
|
|
190
|
+
tools: task.tools?.join(","),
|
|
191
|
+
},
|
|
192
|
+
identity: {
|
|
193
|
+
id,
|
|
194
|
+
logicalId: id,
|
|
195
|
+
generationId: randomUUID(),
|
|
196
|
+
taskId: randomUUID(),
|
|
197
|
+
},
|
|
198
|
+
}, snapshot);
|
|
199
|
+
},
|
|
200
|
+
async resume(resumeOptions, task) {
|
|
201
|
+
const acquisition = { taskId: task.id, suppressed: false };
|
|
202
|
+
state.pending.add(acquisition);
|
|
203
|
+
try {
|
|
204
|
+
const snapshot = state.options.getLaunchSnapshot();
|
|
205
|
+
const before = getNewEntries(resumeOptions.sessionId, 0);
|
|
206
|
+
const owner = adapter(snapshot);
|
|
207
|
+
const handle = await owner.resume(resumeOptions);
|
|
208
|
+
task.cwd = handle.cwd;
|
|
209
|
+
return acquired(task, owner, handle, [], [], undefined, before.length, acquisition.suppressed);
|
|
210
|
+
}
|
|
211
|
+
finally {
|
|
212
|
+
state.pending.delete(acquisition);
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
hooks: {
|
|
217
|
+
async onSpawned(_handle, task) {
|
|
218
|
+
const entry = entries.get(task.id);
|
|
219
|
+
await state.options.hooks.onSpawned?.(entry.record, entry.started, task);
|
|
220
|
+
},
|
|
221
|
+
onCancelState(handle, task, cancelState) {
|
|
222
|
+
// The kernel owns the intent; project it onto whichever owner is
|
|
223
|
+
// current, including one transferred after the cancel call.
|
|
224
|
+
const entry = entries.get(task.id);
|
|
225
|
+
if (entry &&
|
|
226
|
+
entry.record.id === handle.id &&
|
|
227
|
+
entry.record.sessionFile === handle.sessionId)
|
|
228
|
+
entry.record.cancelState = cancelState;
|
|
229
|
+
},
|
|
230
|
+
onObserved(_handle, _projection, observation) {
|
|
231
|
+
const entry = [...entries.values()].find((e) => e.record.id === _handle.id &&
|
|
232
|
+
e.record.sessionFile === _handle.sessionId);
|
|
233
|
+
if (entry)
|
|
234
|
+
observed(entry.record, observation);
|
|
235
|
+
},
|
|
236
|
+
async onSettled(result, task) {
|
|
237
|
+
const entry = entries.get(task.id);
|
|
238
|
+
// Exhausted acquisition failures are attached by the generic kernel after
|
|
239
|
+
// the last real attempt was finalized; preserve its original raw text.
|
|
240
|
+
const completed = { ...entry.completed, run: result };
|
|
241
|
+
if (result.evidence?.errorMessage !== undefined)
|
|
242
|
+
completed.errorMessage = result.evidence.errorMessage;
|
|
243
|
+
if (result.cancellation) {
|
|
244
|
+
// A cancel can settle after a retryable attempt was finalized with
|
|
245
|
+
// its natural error; present the run's actual cancelled outcome.
|
|
246
|
+
completed.summary = "Subagent cancelled.";
|
|
247
|
+
completed.summarySource = "host";
|
|
248
|
+
completed.error = "cancelled";
|
|
249
|
+
completed.exitCode = 1;
|
|
250
|
+
completed.sessionFile = entry.record.sessionFile;
|
|
251
|
+
completed.errorMessage = undefined;
|
|
252
|
+
completed.ping = undefined;
|
|
253
|
+
}
|
|
254
|
+
entry.completed = completed;
|
|
255
|
+
try {
|
|
256
|
+
const decision = await state.options.hooks.onSettled(entry.record, completed, task, entry.readResumeResult
|
|
257
|
+
? { ...io, readResumeResult: entry.readResumeResult }
|
|
258
|
+
: io);
|
|
259
|
+
entry.record.lifecycle = markDelivery(entry.record.lifecycle, decision === "suppressed" ? "suppressed" : "delivered");
|
|
260
|
+
return decision;
|
|
261
|
+
}
|
|
262
|
+
finally {
|
|
263
|
+
entries.delete(task.id);
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
});
|
|
268
|
+
// Reserve through kernel.resume before any transcript read or adapter creation.
|
|
269
|
+
resumePi = async (input) => {
|
|
270
|
+
const task = {
|
|
271
|
+
id: input.taskId,
|
|
272
|
+
name: input.name,
|
|
273
|
+
prompt: input.message ?? "resumed session",
|
|
274
|
+
role: "",
|
|
275
|
+
cwd: process.cwd(),
|
|
276
|
+
};
|
|
277
|
+
try {
|
|
278
|
+
return await kernel.resume({
|
|
279
|
+
task,
|
|
280
|
+
name: input.name,
|
|
281
|
+
sessionId: input.sessionPath,
|
|
282
|
+
message: input.message,
|
|
283
|
+
autoExit: input.autoExit,
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
finally {
|
|
287
|
+
prune(task.id);
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
state = {
|
|
291
|
+
binding,
|
|
292
|
+
options,
|
|
293
|
+
kernel,
|
|
294
|
+
entries,
|
|
295
|
+
infrastructure,
|
|
296
|
+
roles,
|
|
297
|
+
pending,
|
|
298
|
+
resumePi,
|
|
299
|
+
worktreeOperations: options.infrastructure?.worktreeOperations ??
|
|
300
|
+
options.infrastructure?.launchOperations.worktree ??
|
|
301
|
+
createWorktreeOperations(),
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
// Replacements must invoke the original kernel's invocation closure, which
|
|
305
|
+
// reads this shared current binding, not the old facade's options.
|
|
306
|
+
if (adopted)
|
|
307
|
+
resumePi = state.resumePi;
|
|
308
|
+
// Live markers and their sequence survive a reload with their runs.
|
|
309
|
+
if (state.binding.backend === "legacy" &&
|
|
310
|
+
!state.infrastructure.surfaceProvider.nativeExecution)
|
|
311
|
+
state.markers ??= createDelegatedMarkers(options);
|
|
312
|
+
const acceptChecks = (state.acceptChecks ??= {
|
|
313
|
+
label: "parent run session",
|
|
314
|
+
});
|
|
315
|
+
function prune(id) {
|
|
316
|
+
if (!state.kernel.getTask(id))
|
|
317
|
+
state.entries.delete(id);
|
|
318
|
+
}
|
|
319
|
+
function live(id) {
|
|
320
|
+
prune(id);
|
|
321
|
+
return state.entries.get(id);
|
|
322
|
+
}
|
|
323
|
+
function record(id) {
|
|
324
|
+
const value = live(id)?.record;
|
|
325
|
+
if (!value)
|
|
326
|
+
throw new Error(`Task "${id}" has no active Pi owner.`);
|
|
327
|
+
return value;
|
|
328
|
+
}
|
|
329
|
+
function hydrate(child, at, kind) {
|
|
330
|
+
const read = readSubagentActivityFile(child.activityFile, child.id);
|
|
331
|
+
child.lifecycle = observeActivity(child.lifecycle, read, at);
|
|
332
|
+
return {
|
|
333
|
+
kind,
|
|
334
|
+
observedAt: at,
|
|
335
|
+
lifecycle: child.lifecycle,
|
|
336
|
+
projection: projectLifecycle(child.lifecycle, at),
|
|
337
|
+
activity: read.ok ? read.activity : undefined,
|
|
338
|
+
activityRead: read,
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
function observed(child, observation) {
|
|
342
|
+
const entry = [...state.entries.values()].find((candidate) => candidate.record === child);
|
|
343
|
+
if (child.lifecycle.delivery === "suppressed" || !entry)
|
|
344
|
+
return;
|
|
345
|
+
entry.marker?.renew();
|
|
346
|
+
if (observation.kind === "local-evidence" && child.persistent) {
|
|
347
|
+
try {
|
|
348
|
+
state.options.persistent.drain(child, io);
|
|
349
|
+
}
|
|
350
|
+
catch {
|
|
351
|
+
/* unread event retries on a later wake */
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
state.options.hooks.onObserved?.(child, observation);
|
|
355
|
+
}
|
|
356
|
+
function launchOperations(snapshot) {
|
|
357
|
+
return {
|
|
358
|
+
...(state.options.infrastructure?.launchOperations ??
|
|
359
|
+
launchOperationsFromSurface(state.binding.backend === "core"
|
|
360
|
+
? state.infrastructure.surfaceProvider
|
|
361
|
+
: state.options.hostSurface.createLaunchProvider(snapshot), snapshot.paneConfig)),
|
|
362
|
+
worktree: state.worktreeOperations,
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
function adapter(snapshot) {
|
|
366
|
+
return new PiHarnessAdapter({
|
|
367
|
+
childEntryPath: state.options.childEntryPath,
|
|
368
|
+
surface: state.infrastructure.surfaceProvider,
|
|
369
|
+
paneConfig: snapshot.paneConfig,
|
|
370
|
+
modelRegistry: snapshot.modelRegistry,
|
|
371
|
+
parent: snapshot.parent,
|
|
372
|
+
parentRuntime: snapshot.parentRuntime,
|
|
373
|
+
supervision: state.infrastructure.supervision,
|
|
374
|
+
processProbe: state.infrastructure.processProbe,
|
|
375
|
+
operations: launchOperations(snapshot),
|
|
376
|
+
onObservation(child, kind) {
|
|
377
|
+
const at = Date.now();
|
|
378
|
+
// Local evidence only drains events. Tick/refresh still hydrate fresh
|
|
379
|
+
// activity; preserve the callback without another activity-file parse.
|
|
380
|
+
observed(child, kind === "local-evidence"
|
|
381
|
+
? {
|
|
382
|
+
kind,
|
|
383
|
+
observedAt: at,
|
|
384
|
+
lifecycle: child.lifecycle,
|
|
385
|
+
projection: projectLifecycle(child.lifecycle, at),
|
|
386
|
+
}
|
|
387
|
+
: hydrate(child, at, kind));
|
|
388
|
+
},
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
function acquired(task, owner, handle, attempts, failures, warning, cursor, suppressed = false) {
|
|
392
|
+
const child = owner.getRunningChild(handle);
|
|
393
|
+
const entry = {
|
|
394
|
+
record: child,
|
|
395
|
+
started: {
|
|
396
|
+
id: child.id,
|
|
397
|
+
name: child.name,
|
|
398
|
+
task: child.task,
|
|
399
|
+
agent: child.agent,
|
|
400
|
+
sessionFile: child.sessionFile,
|
|
401
|
+
launchScriptFile: child.launchScriptFile,
|
|
402
|
+
model: child.runtimePlan?.model,
|
|
403
|
+
thinking: child.runtimePlan?.thinking,
|
|
404
|
+
runtimePlan: child.runtimePlan,
|
|
405
|
+
worktree: child.worktree,
|
|
406
|
+
warning,
|
|
407
|
+
status: child.launchFailure ? "uncertain" : "started",
|
|
408
|
+
launchFailure: child.launchFailure,
|
|
409
|
+
},
|
|
410
|
+
};
|
|
411
|
+
if (suppressed)
|
|
412
|
+
child.lifecycle = markDelivery(child.lifecycle, "suppressed");
|
|
413
|
+
else {
|
|
414
|
+
entry.marker = state.markers?.attach(child);
|
|
415
|
+
state.entries.set(task.id, entry);
|
|
416
|
+
}
|
|
417
|
+
return {
|
|
418
|
+
handle,
|
|
419
|
+
adapter: owner,
|
|
420
|
+
persistent: child.persistent ?? false,
|
|
421
|
+
closeTemporarySurface: child.ownsSurface
|
|
422
|
+
? temporarySurfaceRelease(state.infrastructure.surfaceProvider, child.surface)
|
|
423
|
+
: undefined,
|
|
424
|
+
observe: (at) => hydrate(child, at, "refresh"),
|
|
425
|
+
finalize: async (result, _task, control) => {
|
|
426
|
+
// Clear before delivery; a retained worktree root keeps its pane.
|
|
427
|
+
entry.marker?.retire();
|
|
428
|
+
const at = Date.now();
|
|
429
|
+
let evidence = result.evidence;
|
|
430
|
+
if (evidence)
|
|
431
|
+
child.lifecycle = markCompletionDetected(child.lifecycle, evidence, at);
|
|
432
|
+
// A rejected adapter wait follows the shipped watch error result:
|
|
433
|
+
// transcript I/O is not retried as part of presenting that failure.
|
|
434
|
+
let all = [];
|
|
435
|
+
try {
|
|
436
|
+
if (evidence && existsSync(child.sessionFile))
|
|
437
|
+
all = getNewEntries(child.sessionFile, 0);
|
|
438
|
+
}
|
|
439
|
+
catch (error) {
|
|
440
|
+
// This is Pi processing failure AFTER real adapter evidence, not a
|
|
441
|
+
// provider error or a failed parent send. Normalize to the shipped
|
|
442
|
+
// watch error result and settle once; no synthetic evidence/retry.
|
|
443
|
+
result = {
|
|
444
|
+
handle: result.handle,
|
|
445
|
+
outcome: "failed",
|
|
446
|
+
error: error instanceof Error ? error.message : String(error),
|
|
447
|
+
durationMs: result.durationMs,
|
|
448
|
+
};
|
|
449
|
+
evidence = undefined;
|
|
450
|
+
}
|
|
451
|
+
const exitCode = evidence?.exitCode ?? 1;
|
|
452
|
+
const observedRuntime = findObservedSessionRuntime(all);
|
|
453
|
+
if (child.runtimePlan &&
|
|
454
|
+
observedRuntime.provider &&
|
|
455
|
+
observedRuntime.modelId) {
|
|
456
|
+
const model = `${observedRuntime.provider}/${observedRuntime.modelId}`;
|
|
457
|
+
const thinking = observedRuntime.thinking !== undefined &&
|
|
458
|
+
isThinkingLevel(observedRuntime.thinking)
|
|
459
|
+
? observedRuntime.thinking
|
|
460
|
+
: undefined;
|
|
461
|
+
const plan = {
|
|
462
|
+
...child.runtimePlan,
|
|
463
|
+
observed: { model },
|
|
464
|
+
};
|
|
465
|
+
if (thinking) {
|
|
466
|
+
plan.thinking = thinking;
|
|
467
|
+
plan.observed.thinking = thinking;
|
|
468
|
+
}
|
|
469
|
+
if (model !== plan.model)
|
|
470
|
+
plan.runtimeMismatch = `Resolved model ${plan.model} but child reported ${model}`;
|
|
471
|
+
child.runtimePlan = plan;
|
|
472
|
+
}
|
|
473
|
+
const { summary, summarySource } = evidence
|
|
474
|
+
? (findLastAssistantSummary(cursor === undefined ? all : all.slice(cursor)) ?? {
|
|
475
|
+
summary: evidence.errorMessage
|
|
476
|
+
? `Subagent error: ${evidence.errorMessage}`
|
|
477
|
+
: exitCode === 0
|
|
478
|
+
? cursor === undefined
|
|
479
|
+
? "Sub-agent exited without output"
|
|
480
|
+
: "Resumed session exited without new output"
|
|
481
|
+
: `${cursor === undefined ? "Sub-agent" : "Resumed session"} exited with code ${exitCode}`,
|
|
482
|
+
// Only a child-written sidecar error is child provenance.
|
|
483
|
+
summarySource: evidence.errorMessage
|
|
484
|
+
? errorProvenance(evidence.errorSource)
|
|
485
|
+
: "host",
|
|
486
|
+
})
|
|
487
|
+
: {
|
|
488
|
+
summary: result.outcome === "killed"
|
|
489
|
+
? "Subagent cancelled."
|
|
490
|
+
: `Subagent error: ${result.error}`,
|
|
491
|
+
summarySource: "host",
|
|
492
|
+
};
|
|
493
|
+
let worktree = child.worktree
|
|
494
|
+
? await state.worktreeOperations.captureWorktreeHandoff(child.worktree)
|
|
495
|
+
: undefined;
|
|
496
|
+
// After the handoff capture, before the lifecycle and manifest marks:
|
|
497
|
+
// the parent re-check decides the verdict (ADR-0017).
|
|
498
|
+
const accept = child.accept
|
|
499
|
+
? await runParentAcceptCheck({
|
|
500
|
+
spec: child.accept,
|
|
501
|
+
result,
|
|
502
|
+
evidence,
|
|
503
|
+
exitCode,
|
|
504
|
+
cwd: child.cwd,
|
|
505
|
+
worktree,
|
|
506
|
+
control,
|
|
507
|
+
runner: state.infrastructure.acceptRunner ?? runAcceptCommand,
|
|
508
|
+
owner: acceptChecks,
|
|
509
|
+
})
|
|
510
|
+
: undefined;
|
|
511
|
+
// A cancel that won during the re-check, with termination confirmed,
|
|
512
|
+
// delivers the cancelled result: the kernel says so, not the check.
|
|
513
|
+
const cancelledInCheck = !result.cancellation && control.interruption() === "cancelled";
|
|
514
|
+
if (child.worktree && worktree) {
|
|
515
|
+
try {
|
|
516
|
+
// Only confirmed termination is a cancellation. Shutdown suppression
|
|
517
|
+
// of an unconfirmed cancel records what a plain shutdown would. A
|
|
518
|
+
// rejected verdict leaves the manifest state unchanged.
|
|
519
|
+
state.worktreeOperations.persistWorktreeResult(child.worktree, result.cancellation?.termination === "confirmed" ||
|
|
520
|
+
cancelledInCheck
|
|
521
|
+
? "cancelled"
|
|
522
|
+
: worktreeResultState(exitCode, !!evidence?.ping), worktree);
|
|
523
|
+
}
|
|
524
|
+
catch (error) {
|
|
525
|
+
worktree = {
|
|
526
|
+
...worktree,
|
|
527
|
+
gitError: [
|
|
528
|
+
worktree.gitError,
|
|
529
|
+
`Manifest update failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
530
|
+
]
|
|
531
|
+
.filter(Boolean)
|
|
532
|
+
.join("; "),
|
|
533
|
+
};
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
child.lifecycle =
|
|
537
|
+
exitCode === 0 && !cancelledInCheck
|
|
538
|
+
? markCompleted(child.lifecycle, at)
|
|
539
|
+
: markFailed(child.lifecycle, cancelledInCheck ? "Subagent cancelled." : summary, at, cancelledInCheck ? 1 : exitCode);
|
|
540
|
+
if (evidence?.errorMessage)
|
|
541
|
+
failures.push({
|
|
542
|
+
model: child.runtimePlan?.model ?? attempts.at(-1),
|
|
543
|
+
error: evidence.errorMessage,
|
|
544
|
+
});
|
|
545
|
+
entry.completed = {
|
|
546
|
+
run: result,
|
|
547
|
+
name: child.name,
|
|
548
|
+
task: child.task,
|
|
549
|
+
agent: child.agent,
|
|
550
|
+
summary,
|
|
551
|
+
summarySource,
|
|
552
|
+
sessionFile: evidence || result.outcome === "killed"
|
|
553
|
+
? child.sessionFile
|
|
554
|
+
: undefined,
|
|
555
|
+
exitCode,
|
|
556
|
+
elapsed: Math.floor((at - child.startTime) / 1000),
|
|
557
|
+
error: evidence
|
|
558
|
+
? undefined
|
|
559
|
+
: result.outcome === "killed"
|
|
560
|
+
? "cancelled"
|
|
561
|
+
: result.error,
|
|
562
|
+
errorMessage: evidence?.errorMessage,
|
|
563
|
+
ping: evidence?.ping,
|
|
564
|
+
// The watch catch omits its result plan; the host still reports the
|
|
565
|
+
// live child's plan in structured details, not in the error summary.
|
|
566
|
+
runtimePlan: evidence ? child.runtimePlan : undefined,
|
|
567
|
+
worktree,
|
|
568
|
+
accept,
|
|
569
|
+
logicalId: child.logicalId,
|
|
570
|
+
generationId: child.generationId,
|
|
571
|
+
policyHash: child.policyHash,
|
|
572
|
+
};
|
|
573
|
+
if (state.options.outcomeLedger !== false)
|
|
574
|
+
appendOutcomeLedger(outcomeLedgerFile(state.options.configDir), {
|
|
575
|
+
at,
|
|
576
|
+
runId: child.id,
|
|
577
|
+
attempt: Math.max(1, attempts.length),
|
|
578
|
+
role: child.agent,
|
|
579
|
+
requestedModel: task.requestedModel ?? child.runtimePlan?.requestedModel,
|
|
580
|
+
model: child.runtimePlan?.observed?.model ?? child.runtimePlan?.model,
|
|
581
|
+
thinking: child.runtimePlan?.thinking,
|
|
582
|
+
elapsedSec: entry.completed.elapsed,
|
|
583
|
+
outcome: ledgerOutcome(result, evidence, exitCode, cancelledInCheck),
|
|
584
|
+
accept,
|
|
585
|
+
});
|
|
586
|
+
if (cursor !== undefined)
|
|
587
|
+
entry.readResumeResult = resumeResultReader(child.sessionFile, cursor, exitCode, evidence?.errorMessage, evidence?.errorSource);
|
|
588
|
+
if (cursor === undefined) {
|
|
589
|
+
entry.completed.fallbackAttempts = attempts;
|
|
590
|
+
entry.completed.fallbackFailures = failures;
|
|
591
|
+
}
|
|
592
|
+
return worktree && evidence
|
|
593
|
+
? { ...result, evidence: { ...evidence, worktree } }
|
|
594
|
+
: result;
|
|
595
|
+
},
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
function prepare(input, snapshot) {
|
|
599
|
+
const attempts = [];
|
|
600
|
+
const failures = [];
|
|
601
|
+
let publicId;
|
|
602
|
+
let logicalId;
|
|
603
|
+
let capturedSnapshot = snapshot;
|
|
604
|
+
return {
|
|
605
|
+
role: input.role,
|
|
606
|
+
persistent: input.task.behavior?.persistent ??
|
|
607
|
+
input.role.defaults?.persistent ??
|
|
608
|
+
false,
|
|
609
|
+
candidates: input.plans,
|
|
610
|
+
async spawnAttempt(_spawn, index, cancelled) {
|
|
611
|
+
const plan = input.plans[index];
|
|
612
|
+
attempts.push(plan.model);
|
|
613
|
+
const acquisition = { taskId: input.task.id, suppressed: false };
|
|
614
|
+
state.pending.add(acquisition);
|
|
615
|
+
let spawning = false;
|
|
616
|
+
try {
|
|
617
|
+
const current = (await input.prepareAttempt?.(index, cancelled)) ?? {
|
|
618
|
+
...input,
|
|
619
|
+
snapshot: (capturedSnapshot ??= state.options.getLaunchSnapshot()),
|
|
620
|
+
};
|
|
621
|
+
if (current.task.id !== input.task.id ||
|
|
622
|
+
current.task.prompt !== input.task.prompt ||
|
|
623
|
+
JSON.stringify(current.task.worktree) !==
|
|
624
|
+
JSON.stringify(input.task.worktree))
|
|
625
|
+
throw new Error("Pi attempt preparation changed the invocation identity, prompt or worktree.");
|
|
626
|
+
// A candidate was authorized at planning time; the scope may have
|
|
627
|
+
// changed since. Re-check it against this attempt's snapshot, which
|
|
628
|
+
// prepareAttempt rebuilds from the live parent for every attempt.
|
|
629
|
+
assertModelInScope(plan.model, current.snapshot.modelRegistry);
|
|
630
|
+
const owner = adapter(current.snapshot);
|
|
631
|
+
spawning = true;
|
|
632
|
+
const handle = await owner.spawn({
|
|
633
|
+
acquisitionSignal: cancelled,
|
|
634
|
+
name: input.task.name,
|
|
635
|
+
task: input.task.prompt,
|
|
636
|
+
cwd: current.task.cwd,
|
|
637
|
+
sessionId: current.snapshot.parent.sessionId,
|
|
638
|
+
role: current.role,
|
|
639
|
+
env: current.task.env,
|
|
640
|
+
session: current.task.session,
|
|
641
|
+
behavior: current.task.behavior,
|
|
642
|
+
tools: current.task.tools,
|
|
643
|
+
systemPrompt: current.resolved.agent
|
|
644
|
+
? current.role.systemPrompt
|
|
645
|
+
: current.task.systemPrompt,
|
|
646
|
+
surface: input.surface,
|
|
647
|
+
worktreeRequest: input.task.worktree,
|
|
648
|
+
accept: input.task.accept,
|
|
649
|
+
runtime: { model: plan.model, thinking: plan.thinking },
|
|
650
|
+
resolvedLaunch: { ...current.resolved, runtimePlan: plan },
|
|
651
|
+
launchIdentity: {
|
|
652
|
+
...current.identity,
|
|
653
|
+
id: publicId ?? current.identity.id,
|
|
654
|
+
logicalId: logicalId ?? current.identity.logicalId,
|
|
655
|
+
},
|
|
656
|
+
});
|
|
657
|
+
publicId = handle.id;
|
|
658
|
+
logicalId ??= current.identity.logicalId;
|
|
659
|
+
return acquired(input.task, owner, handle, attempts, failures, input.warning, undefined, acquisition.suppressed);
|
|
660
|
+
}
|
|
661
|
+
catch (error) {
|
|
662
|
+
if (cancelled.aborted && !spawning) {
|
|
663
|
+
// Cancelled while preparing: the candidate neither launched nor failed.
|
|
664
|
+
attempts.pop();
|
|
665
|
+
throw error;
|
|
666
|
+
}
|
|
667
|
+
failures.push({
|
|
668
|
+
model: plan.model,
|
|
669
|
+
error: error instanceof Error ? error.message : String(error),
|
|
670
|
+
});
|
|
671
|
+
throw error;
|
|
672
|
+
}
|
|
673
|
+
finally {
|
|
674
|
+
state.pending.delete(acquisition);
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
const io = createPiPersistentIO(state);
|
|
680
|
+
const facade = {
|
|
681
|
+
...state.kernel,
|
|
682
|
+
async handoffWorktree(input) {
|
|
683
|
+
assertManagedWorktreesSupported(state.options.platform);
|
|
684
|
+
// This is a long-lived interactive handoff, deliberately outside the
|
|
685
|
+
// watched kernel: no task reservation, acquire, producer or watcher.
|
|
686
|
+
const snapshot = input.snapshot;
|
|
687
|
+
const result = await launchPiWorktreeHandoff({
|
|
688
|
+
kind: "fresh",
|
|
689
|
+
name: input.name,
|
|
690
|
+
task: input.task,
|
|
691
|
+
cwd: snapshot.parent.cwd,
|
|
692
|
+
worktree: { branch: input.branch },
|
|
693
|
+
handoff: { leafId: input.leafId },
|
|
694
|
+
parent: { ...snapshot.parent },
|
|
695
|
+
runtimePlan: input.runtimePlan,
|
|
696
|
+
modelScope: snapshot.modelRegistry.scope,
|
|
697
|
+
behavior: {
|
|
698
|
+
deniedTools: [],
|
|
699
|
+
autoExit: false,
|
|
700
|
+
interactive: true,
|
|
701
|
+
sessionMode: "standalone",
|
|
702
|
+
},
|
|
703
|
+
}, launchOperations(snapshot));
|
|
704
|
+
return { record: result.running, focusError: result.focusError };
|
|
705
|
+
},
|
|
706
|
+
createWorktreeCleanupOperations: (input) => {
|
|
707
|
+
assertManagedWorktreesSupported(state.options.platform);
|
|
708
|
+
if (state.infrastructure.surfaceProvider.nativeExecution)
|
|
709
|
+
throw new Error("Managed worktree cleanup is not supported by Herdr Core");
|
|
710
|
+
return createWorktreeCleanupOperations(state.infrastructure.surfaceProvider, input);
|
|
711
|
+
},
|
|
712
|
+
managedWorktreeRefusal: () => managedWorktreeRefusal(state.options.platform),
|
|
713
|
+
async spawnPi(input) {
|
|
714
|
+
// Refuse before the kernel reserves the task or any attempt starts.
|
|
715
|
+
if (input.task.worktree)
|
|
716
|
+
assertManagedWorktreesSupported(state.options.platform);
|
|
717
|
+
try {
|
|
718
|
+
return await state.kernel.spawn(input.task, prepare(input));
|
|
719
|
+
}
|
|
720
|
+
finally {
|
|
721
|
+
prune(input.task.id);
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
resumePi: (input) => resumePi(input),
|
|
725
|
+
async supervise(handle, task, signal) {
|
|
726
|
+
try {
|
|
727
|
+
return await state.kernel.supervise(handle, task, signal);
|
|
728
|
+
}
|
|
729
|
+
finally {
|
|
730
|
+
prune(task.id);
|
|
731
|
+
}
|
|
732
|
+
},
|
|
733
|
+
getRecord: (id) => live(id)?.record,
|
|
734
|
+
getStarted: (id) => live(id)?.started,
|
|
735
|
+
getCompleted: (id) => live(id)?.completed,
|
|
736
|
+
getControlTaskId(publicId) {
|
|
737
|
+
for (const [id, entry] of state.entries)
|
|
738
|
+
if (live(id) && entry.record.id === publicId)
|
|
739
|
+
return id;
|
|
740
|
+
return undefined;
|
|
741
|
+
},
|
|
742
|
+
suppress(id) {
|
|
743
|
+
for (const acquisition of state.pending)
|
|
744
|
+
if (acquisition.taskId === id)
|
|
745
|
+
acquisition.suppressed = true;
|
|
746
|
+
const suppressed = live(id);
|
|
747
|
+
const r = suppressed?.record;
|
|
748
|
+
if (r)
|
|
749
|
+
r.lifecycle = markDelivery(r.lifecycle, "suppressed");
|
|
750
|
+
// Nothing renews an unsupervised run's marker; clear it now.
|
|
751
|
+
suppressed?.marker?.retire();
|
|
752
|
+
state.kernel.suppress(id);
|
|
753
|
+
state.entries.delete(id);
|
|
754
|
+
},
|
|
755
|
+
async cancel(id) {
|
|
756
|
+
// The kernel records the intent and projects every owner's cancel state
|
|
757
|
+
// through onCancelState; a natural result taken first keeps its own.
|
|
758
|
+
try {
|
|
759
|
+
return await state.kernel.cancel(id);
|
|
760
|
+
}
|
|
761
|
+
finally {
|
|
762
|
+
prune(id);
|
|
763
|
+
}
|
|
764
|
+
},
|
|
765
|
+
async sendPersistent(id, text) {
|
|
766
|
+
return state.options.persistent.send(record(id), text, io);
|
|
767
|
+
},
|
|
768
|
+
async stopPersistent(id, timeoutMs = 15_000) {
|
|
769
|
+
return state.options.persistent.stop(record(id), timeoutMs, io);
|
|
770
|
+
},
|
|
771
|
+
async send(id, text) {
|
|
772
|
+
const ack = await facade.sendPersistent(id, text);
|
|
773
|
+
if ("error" in ack)
|
|
774
|
+
throw new Error(ack.error);
|
|
775
|
+
},
|
|
776
|
+
availability: () => ({
|
|
777
|
+
available: state.infrastructure.surfaceProvider.isAvailable(),
|
|
778
|
+
setupHint: state.infrastructure.surfaceProvider.setupHint(),
|
|
779
|
+
}),
|
|
780
|
+
listWorktreeSurfaces: (opts) => state.infrastructure.surfaceProvider.listWorktreeSurfaces(opts),
|
|
781
|
+
inspectProgress(id) {
|
|
782
|
+
const r = record(id);
|
|
783
|
+
let updatedAt;
|
|
784
|
+
try {
|
|
785
|
+
updatedAt = statSync(r.sessionFile).mtimeMs;
|
|
786
|
+
}
|
|
787
|
+
catch {
|
|
788
|
+
/* unavailable */
|
|
789
|
+
}
|
|
790
|
+
return { ...inspectNoProgressSessionTail(r.sessionFile), updatedAt };
|
|
791
|
+
},
|
|
792
|
+
diagnostics: () => state.infrastructure.supervision.diagnostics(),
|
|
793
|
+
async shutdown(reason) {
|
|
794
|
+
if (!["reload", "new", "resume", "fork"].includes(reason ?? "")) {
|
|
795
|
+
for (const id of new Set([
|
|
796
|
+
...state.entries.keys(),
|
|
797
|
+
...[...state.pending].map((a) => a.taskId),
|
|
798
|
+
]))
|
|
799
|
+
facade.suppress(id);
|
|
800
|
+
state.infrastructure.supervision.close();
|
|
801
|
+
// Suppression aborted their re-checks; finish what ignores SIGTERM.
|
|
802
|
+
await terminateAcceptChecks(acceptChecks);
|
|
803
|
+
}
|
|
804
|
+
},
|
|
805
|
+
};
|
|
806
|
+
Object.defineProperty(facade, OWNER, { value: state });
|
|
807
|
+
return facade;
|
|
808
|
+
}
|
|
809
|
+
//# sourceMappingURL=pi-run-session.js.map
|