@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 @@
|
|
|
1
|
+
{"version":3,"file":"launch.js","sourceRoot":"","sources":["../../../../maestro/adapters/pi/launch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EACN,eAAe,GAEf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,kBAAkB,GAElB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACN,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,GACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAmB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EACN,yBAAyB,EACzB,2BAA2B,EAC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,CACP,CACD;SACA,IAAI,CACJ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,GAAG,QAAQ,CAAC,EAChD,CAAC,KAAK,EAAE,EAAE;QACT,KAAK,CAAC,oBAAoB,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;QACjD,OAAO,SAAS,CAAC;IAClB,CAAC,CACD,CAAC;AACJ,CAAC;AAED,SAAS,uBAAuB,CAAC,GAAW,EAAE,QAAgB;IAC7D,MAAM,QAAQ,GAAG,KAAK,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,IAAI,CAAC;IAC5E,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;IACxD,SAAS,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3C,OAAO,UAAU,CAAC;AACnB,CAAC;AAED,SAAS,yBAAyB,CACjC,UAA8B;IAE9B,IAAI,CAAC,UAAU,CAAC,QAAQ;QACvB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACxD,OAAO,UAAU,CAAC,QAAQ,CAAC;AAC5B,CAAC;AAED,SAAS,YAAY,CAAC,KAAU;IAC/B,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC","sourcesContent":["import { randomUUID } from \"node:crypto\";\nimport { existsSync, mkdirSync, writeFileSync } from \"node:fs\";\nimport { dirname, isAbsolute, join, win32 } from \"node:path\";\nimport { homedir } from \"node:os\";\nimport { getSubagentActivityFile } from \"./activity-file.ts\";\nimport {\n\tcreateLifecycle,\n\ttype SubagentLifecycle,\n} from \"../../core/lifecycle.ts\";\nimport {\n\tassertModelInScope,\n\ttype ResolvedRuntimePlan,\n} from \"../../core/routing.ts\";\nimport {\n\tDECLARED_SKILLS_ENV,\n\tformatDeclaredSkillsEnv,\n\tparseDeclaredSkills,\n} from \"../../core/declared-skills.ts\";\nimport { shellQuote } from \"../../core/shell.ts\";\nimport { ACCEPT_FILE_ENV, type AcceptSpec } from \"../../core/accept.ts\";\nimport {\n\tAcquisitionUncertainError,\n\tisAcquisitionUncertainError,\n\tWorktreeProvisioningError,\n} from \"../../core/surface-provider.ts\";\nimport type {\n\tFailedWorktreeManifest,\n\tWorktreeLaunch,\n\tWorktreeOperations,\n} from \"../../core/worktree.ts\";\nimport {\n\tgetSubagentProcessIdentityFile,\n\ttype PiProcessIdentity,\n} from \"./process-identity.ts\";\nimport {\n\tappendPersistentDeliveryLedger,\n\tcreateWorktreeSessionFork,\n\tseedSubagentSessionFile,\n\twriteSubagentSessionPolicy,\n\ttype SubagentSessionPolicyV2,\n} from \"./session.ts\";\nimport {\n\tbuildSubagentToolAllowlist,\n\tchildDepthAssignment,\n\tmodelScopeArgs,\n\tmodelScopeAssignment,\n\tsafeName,\n\tshellComment,\n\tDEFAULT_CHILD_ENTRY_PATH,\n\ttimestampForFile,\n} from \"./launch-command.ts\";\nimport { shellExitFileFor } from \"./completion.ts\";\nimport {\n\tPI_LAUNCH_SESSION_ENV,\n\ttype PiLaunchOperations,\n\ttype WorktreeSurfaceForLaunch,\n} from \"./launch-operations.ts\";\nimport { launchResumedPiSubagent } from \"./launch-resume.ts\";\n\ntype SubagentSessionMode = \"standalone\" | \"lineage-only\" | \"fork\";\n\nexport interface FreshPiLaunchRequest {\n\tkind: \"fresh\";\n\tchildEntryPath?: string;\n\tacquisitionSignal?: AbortSignal;\n\tid?: string;\n\tname: string;\n\ttask: string;\n\tagent?: string;\n\tcwd?: string;\n\tworktree?: { branch: string; base?: string } | null;\n\t/** Written to a spec file the child reads; a handoff carries none. */\n\taccept?: AcceptSpec;\n\tfork?: boolean;\n\thandoff?: { leafId: string };\n\tsurface?: string;\n\tparent: {\n\t\tcwd: string;\n\t\tinvocationCwd?: string;\n\t\tsessionFile: string;\n\t\tsessionId: string;\n\t\tsessionDir: string;\n\t\tagentDir?: string;\n\t};\n\truntimePlan: ResolvedRuntimePlan;\n\t/** The parent session's model scope (exact provider/model-id refs). The\n\t * child receives it as its exact allowlist ({@link MODEL_SCOPE_ENV}) and as\n\t * Pi's `--models` hint; absent leaves it unscoped. */\n\tmodelScope?: readonly string[];\n\tbehavior: {\n\t\ttools?: string;\n\t\tskills?: string;\n\t\tdeniedTools: readonly string[];\n\t\t/** Lets the child launch another instance of its own role. */\n\t\tselfSpawn?: boolean;\n\t\tautoExit: boolean;\n\t\tinteractive: boolean;\n\t\tpersistent?: boolean;\n\t\t/** A persistent specialist may wake the parent with notices (ADR-0019). */\n\t\tnotify?: boolean;\n\t\tlogicalId?: string;\n\t\tgenerationId?: string;\n\t\ttaskId?: string;\n\t\tidentity?: string;\n\t\tsystemPromptMode?: \"append\" | \"replace\";\n\t\tsessionMode: SubagentSessionMode;\n\t\tcwd?: string;\n\t};\n}\n\nexport interface ResumePiLaunchRequest {\n\tkind: \"resume\";\n\tchildEntryPath?: string;\n\tacquisitionSignal?: AbortSignal;\n\tid?: string;\n\tname: string;\n\tsessionFile: string;\n\tmessage?: string;\n\tparent: {\n\t\tsessionId: string;\n\t\tsessionDir: string;\n\t};\n\t/** The parent session's model scope. When set, the stored model must be in\n\t * it and is pinned with `--model`; the child receives it as its exact\n\t * allowlist ({@link MODEL_SCOPE_ENV}) and as Pi's `--models` hint. */\n\tmodelScope?: readonly string[];\n\tbehavior?: {\n\t\tautoExit?: boolean;\n\t\tinteractive?: boolean;\n\t};\n}\n\nexport type PiLaunchRequest = FreshPiLaunchRequest | ResumePiLaunchRequest;\n\nexport interface PiRunningChild {\n\t/** Dispatch/rollback failed; this real owner remains controlled until exit. */\n\tlaunchFailure?: string;\n\tid: string;\n\tname: string;\n\ttask: string;\n\tagent?: string;\n\tsurface: string;\n\t/** Only an ordinary pane created by this transaction may be closed. */\n\townsSurface: boolean;\n\tstartTime: number;\n\tsessionFile: string;\n\tlaunchScriptFile: string;\n\tactivityFile: string;\n\tinteractive: boolean;\n\truntimePlan: ResolvedRuntimePlan | undefined;\n\tworktree?: WorktreeLaunch;\n\t/** Where the child runs: the worktree root or the ordinary cwd. */\n\tcwd?: string;\n\t/** The validated accept check the parent re-runs in `cwd`. */\n\taccept?: AcceptSpec;\n\tlifecycle: SubagentLifecycle;\n\tpersistent?: boolean;\n\tlogicalId?: string;\n\tgenerationId?: string;\n\tpolicyHash?: string;\n\tpolicyTools?: string[] | null;\n\tpolicyDeniedTools?: string[];\n\ttasksCompleted?: number;\n\ttaskId?: string;\n\t/** Task IDs this parent dispatched; the child-writable ledger never decides. */\n\tissuedTaskIds?: string[];\n\t/** The parent opted this specialist into notices at launch (ADR-0019). */\n\tnotify?: boolean;\n\tinboxSequence?: number;\n\tobservedTaskEvents?: number;\n\tstopState?: \"requested\" | \"pending\" | \"failed\";\n\tstopFailure?: string;\n\tcrashNotified?: boolean;\n\t/** Managed worktree children: where the child records its own process identity. */\n\tprocessIdentityFile?: string;\n\t/** Verified at launch readiness; a worktree cancel's only signal and exit evidence. */\n\tprocessIdentity?: PiProcessIdentity;\n\t/** Settles when launch-readiness capture verifies or gives up; never rejects. */\n\tprocessIdentityCapture?: Promise<PiProcessIdentity | undefined>;\n\tprocessIdentityError?: string;\n}\n\n/** Ownership transfer, not a retryable rejection. The initialized child is real. */\nexport class AcquiredPiLaunchError extends Error {\n\treadonly child: PiRunningChild;\n\tconstructor(child: PiRunningChild, cause: unknown) {\n\t\tsuper(\n\t\t\t`Launch outcome uncertain; ${child.worktree ? `worktree retained at ${child.worktree.path} (workspace ${child.worktree.workspaceId}); ` : `pane ${child.surface}; `}owner retained, no fallback: ${errorMessage(cause)}`,\n\t\t\t{ cause },\n\t\t);\n\t\tthis.name = \"AcquiredPiLaunchError\";\n\t\tthis.child = child;\n\t\tchild.launchFailure = this.message;\n\t}\n}\n\ninterface ResolvedLaunch {\n\trequest: FreshPiLaunchRequest;\n\tid: string;\n\tstartTime: number;\n\tagentDir: string;\n\tlocalAgentDir: string | null;\n\tsourceCwd: string;\n\tartifactDir: string;\n\tsessionMode: SubagentSessionMode;\n\ttaskDelivery: \"direct\" | \"artifact\";\n}\n\ninterface PreparedSurface {\n\tsurface?: string;\n\ttargetCwd: string;\n\teffectiveAgentDir: string;\n\tlocalAgentDir: string | null;\n\tworktree?: WorktreeLaunch;\n}\n\ninterface PreparedSession extends PreparedSurface {\n\tsessionFile: string;\n\tactivityFile: string;\n\tpolicy: SubagentSessionPolicyV2;\n\tinitialTaskId?: string;\n\tprocessIdentityFile?: string;\n}\n\ninterface PreparedArtifacts extends PreparedSession {\n\ttaskArg: string;\n\tsystemPromptFile?: string;\n\tacceptFile?: string;\n}\n\n/**\n * Launch one validated Pi-backed request. Lifecycle watching and parent\n * delivery begin only after this transaction returns the running child.\n */\nexport async function launchPiSubagent(\n\trequest: PiLaunchRequest,\n\toperations: PiLaunchOperations,\n): Promise<PiRunningChild> {\n\tif (request.kind === \"resume\")\n\t\treturn launchResumedPiSubagent(request, operations);\n\tif (\n\t\toperations.nativeExecution &&\n\t\t(request.worktree || request.handoff || request.surface)\n\t)\n\t\tthrow new Error(\n\t\t\t\"Herdr Core supports ordinary native execution only; managed worktrees, handoffs and supplied panes are deferred\",\n\t\t);\n\t// Last checks before any resource exists: the plan must be in the live\n\t// scope, and the scope must be representable as the child's --models.\n\tassertModelInScope(request.runtimePlan.model, { scope: request.modelScope });\n\tmodelScopeArgs(request.modelScope);\n\t// Declared skill names must follow Pi's rules; a handoff carries none.\n\tif (!request.handoff) parseDeclaredSkills(request.behavior.skills);\n\treturn launchFreshPiSubagent(request, operations);\n}\n\nexport async function launchPiWorktreeHandoff(\n\trequest: FreshPiLaunchRequest,\n\toperations: PiLaunchOperations,\n): Promise<{ running: PiRunningChild; focusError?: string }> {\n\tif (!request.worktree || !request.handoff) {\n\t\tthrow new Error(\"A worktree handoff requires a worktree and active leaf\");\n\t}\n\tconst running = await launchPiSubagent(request, operations);\n\tif (!running.worktree) {\n\t\tthrow new Error(\"Worktree handoff did not create a managed worktree\");\n\t}\n\ttry {\n\t\tawait operations.focusWorkspace?.(running.worktree.workspaceId);\n\t} catch (error) {\n\t\tconst focusError = errorMessage(error);\n\t\trequireWorktreeOperations(operations).writeWorktreeManifest(\n\t\t\trunning.worktree.manifestFile,\n\t\t\t{\n\t\t\t\tstate: \"running\",\n\t\t\t\tfocusError,\n\t\t\t},\n\t\t);\n\t\treturn {\n\t\t\trunning,\n\t\t\tfocusError,\n\t\t};\n\t}\n\treturn { running };\n}\n\nasync function launchFreshPiSubagent(\n\trequest: FreshPiLaunchRequest,\n\toperations: PiLaunchOperations,\n): Promise<PiRunningChild> {\n\tconst resolved = resolveLaunchRequest(request);\n\tif (operations.nativeExecution)\n\t\treturn launchNativePiSubagent(resolved, operations);\n\tlet surface: PreparedSurface | undefined;\n\tlet running: PiRunningChild | undefined;\n\n\ttry {\n\t\trequest.acquisitionSignal?.throwIfAborted();\n\t\tsurface = await prepareLaunchSurface(resolved, operations);\n\t\trequest.acquisitionSignal?.throwIfAborted();\n\t\tconst session = prepareChildSession(resolved, surface, operations);\n\t\tconst handoffArtifacts = request.handoff\n\t\t\t? prepareTaskArtifacts(resolved, session, operations)\n\t\t\t: undefined;\n\t\tawait confirmShellReady(session, operations);\n\t\tconst artifacts =\n\t\t\thandoffArtifacts ?? prepareTaskArtifacts(resolved, session, operations);\n\t\trequest.acquisitionSignal?.throwIfAborted();\n\t\tconst command = buildPiCommand(resolved, artifacts);\n\t\tif (artifacts.worktree && !request.handoff) {\n\t\t\trequireWorktreeOperations(operations).persistWorktreeResult(\n\t\t\t\tartifacts.worktree,\n\t\t\t\t\"running\",\n\t\t\t);\n\t\t}\n\t\trequest.acquisitionSignal?.throwIfAborted();\n\t\t// Complete fallible initialization while this transaction still owns the\n\t\t// surface, before any child can run or mutate its session artifacts.\n\t\tconst initialized: PiRunningChild = {\n\t\t\t...createRunningChild(resolved, artifacts),\n\t\t\tsurface: requiredSurface(artifacts),\n\t\t};\n\t\ttry {\n\t\t\tinitialized.launchScriptFile = await startPiProcess(\n\t\t\t\tresolved,\n\t\t\t\tartifacts,\n\t\t\t\tcommand,\n\t\t\t\tinitialized.launchScriptFile,\n\t\t\t\toperations,\n\t\t\t);\n\t\t} catch (error) {\n\t\t\tif (\n\t\t\t\tisAcquisitionUncertainError(error) &&\n\t\t\t\terror.uncertainty.kind === \"command-dispatch\"\n\t\t\t)\n\t\t\t\trunning = initialized;\n\t\t\tthrow error;\n\t\t}\n\t\trunning = initialized;\n\t\tif (request.handoff) {\n\t\t\tif (!operations.waitForPiReady) {\n\t\t\t\tthrow new Error(\"Pi startup confirmation is unavailable\");\n\t\t\t}\n\t\t\tawait operations.waitForPiReady(\n\t\t\t\trequiredSurface(artifacts),\n\t\t\t\tartifacts.sessionFile,\n\t\t\t\tartifacts.targetCwd,\n\t\t\t);\n\t\t\tif (artifacts.worktree) {\n\t\t\t\trequireWorktreeOperations(operations).persistWorktreeResult(\n\t\t\t\t\tartifacts.worktree,\n\t\t\t\t\t\"running\",\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tstartProcessIdentityCapture(running, operations);\n\t\treturn running;\n\t} catch (error) {\n\t\tif (!surface) throw error;\n\t\tif (running) startProcessIdentityCapture(running, operations);\n\t\tif (!surface.worktree) {\n\t\t\tif (!request.surface) {\n\t\t\t\ttry {\n\t\t\t\t\tawait operations.closePane(requiredSurface(surface));\n\t\t\t\t} catch (rollback) {\n\t\t\t\t\tif (running)\n\t\t\t\t\t\tthrow new AcquiredPiLaunchError(\n\t\t\t\t\t\t\trunning,\n\t\t\t\t\t\t\tnew Error(\n\t\t\t\t\t\t\t\t`${errorMessage(error)}; rollback unconfirmed: ${errorMessage(rollback)}`,\n\t\t\t\t\t\t\t\t{ cause: error },\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t\tthrow new AcquisitionUncertainError(\n\t\t\t\t\t\t`${errorMessage(error)}; rollback unconfirmed: ${errorMessage(rollback)}; pane retained: ${surface.surface}; no fallback`,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tkind: \"surface-create\",\n\t\t\t\t\t\t\tplacement: \"tab\",\n\t\t\t\t\t\t\tobservedSurfaceId: surface.surface,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ cause: error },\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (running) throw new AcquiredPiLaunchError(running, error);\n\t\t\tthrow error;\n\t\t}\n\t\tif (running) {\n\t\t\ttry {\n\t\t\t\tconst worktreeOps = requireWorktreeOperations(operations);\n\t\t\t\t// Interactive handoffs have no runtime finalizer. Watched children capture there once.\n\t\t\t\tconst handoff = request.handoff\n\t\t\t\t\t? await worktreeOps.captureWorktreeHandoff(surface.worktree)\n\t\t\t\t\t: undefined;\n\t\t\t\tworktreeOps.persistWorktreeResult(surface.worktree, \"failed\", handoff);\n\t\t\t\tworktreeOps.writeWorktreeManifest(surface.worktree.manifestFile, {\n\t\t\t\t\tacquisitionUncertain: true,\n\t\t\t\t\terror: errorMessage(error),\n\t\t\t\t});\n\t\t\t} catch {\n\t\t\t\t/* transfer ownership even if evidence persistence fails */\n\t\t\t}\n\t\t\tthrow new AcquiredPiLaunchError(running, error);\n\t\t}\n\t\tconst worktreeOps = requireWorktreeOperations(operations);\n\t\tlet handoff;\n\t\ttry {\n\t\t\thandoff = await worktreeOps.captureWorktreeHandoff(surface.worktree);\n\t\t} catch {\n\t\t\t/* preserve launch failure */\n\t\t}\n\t\ttry {\n\t\t\tworktreeOps.persistWorktreeResult(surface.worktree, \"failed\", handoff);\n\t\t} catch {\n\t\t\t// The launch error remains authoritative when persistence also fails.\n\t\t}\n\t\tthrow new Error(\n\t\t\t`Failed to launch subagent; worktree retained at ${surface.worktree.path} ` +\n\t\t\t\t`(workspace ${surface.worktree.workspaceId}): ${errorMessage(error)}`,\n\t\t);\n\t}\n}\n\nasync function launchNativePiSubagent(\n\tresolved: ResolvedLaunch,\n\toperations: PiLaunchOperations,\n): Promise<PiRunningChild> {\n\tconst execution = operations.nativeExecution;\n\tif (!execution) throw new Error(\"Native execution unavailable\");\n\tconst { request } = resolved;\n\trequest.acquisitionSignal?.throwIfAborted();\n\tconst session = prepareChildSession(\n\t\tresolved,\n\t\t{\n\t\t\ttargetCwd: resolved.sourceCwd,\n\t\t\teffectiveAgentDir: resolved.localAgentDir ?? resolved.agentDir,\n\t\t\tlocalAgentDir: resolved.localAgentDir,\n\t\t},\n\t\toperations,\n\t);\n\tconst artifacts = prepareTaskArtifacts(resolved, session, operations);\n\tconst command = buildPiCommand(resolved, artifacts);\n\t// This also writes the persistent dispatch ledger. Nothing fallible remains\n\t// locally after submission, and no surface ID exists until Core replies.\n\tconst initialized = createRunningChild(resolved, artifacts);\n\ttry {\n\t\tconst surface = await execution.start({\n\t\t\tcwd: artifacts.targetCwd,\n\t\t\tcommand,\n\t\t\tscriptPath: initialized.launchScriptFile,\n\t\t\tscriptPreamble: shellComment(\n\t\t\t\t`Subagent launch script for ${request.name}`,\n\t\t\t),\n\t\t\tsignal: request.acquisitionSignal,\n\t\t});\n\t\treturn { ...initialized, surface };\n\t} catch (error) {\n\t\tif (\n\t\t\tisAcquisitionUncertainError(error) &&\n\t\t\terror.uncertainty.kind === \"execution-start\" &&\n\t\t\terror.uncertainty.acquiredSurfaceId\n\t\t)\n\t\t\tthrow new AcquiredPiLaunchError(\n\t\t\t\t{ ...initialized, surface: error.uncertainty.acquiredSurfaceId },\n\t\t\t\terror,\n\t\t\t);\n\t\tthrow error;\n\t}\n}\n\nfunction requiredSurface(surface: PreparedSurface): string {\n\tif (!surface.surface)\n\t\tthrow new Error(\"Shell launch requires an acquired surface\");\n\treturn surface.surface;\n}\n\nfunction resolveLaunchRequest(request: FreshPiLaunchRequest): ResolvedLaunch {\n\tconst id = request.id ?? Math.random().toString(16).slice(2, 10);\n\tconst agentDir =\n\t\trequest.parent.agentDir ??\n\t\tprocess.env.PI_CODING_AGENT_DIR ??\n\t\tjoin(homedir(), \".pi\", \"agent\");\n\tconst rawCwd = request.cwd ?? request.behavior.cwd;\n\tconst cwdBase =\n\t\trequest.cwd == null && request.behavior.cwd != null\n\t\t\t? agentDir\n\t\t\t: (request.parent.invocationCwd ?? request.parent.cwd);\n\tconst sourceCwd = rawCwd\n\t\t? isAbsolute(rawCwd) || win32.isAbsolute(rawCwd)\n\t\t\t? rawCwd\n\t\t\t: join(cwdBase, rawCwd)\n\t\t: request.parent.cwd;\n\tconst localAgentDir = rawCwd ? join(sourceCwd, \".pi\", \"agent\") : null;\n\tlet sessionMode: SubagentSessionMode = request.behavior.sessionMode;\n\tif (request.fork === true) sessionMode = \"fork\";\n\telse if (request.fork === false) sessionMode = \"standalone\";\n\treturn {\n\t\trequest,\n\t\tid,\n\t\tstartTime: Date.now(),\n\t\tagentDir,\n\t\tlocalAgentDir:\n\t\t\tlocalAgentDir && existsSync(localAgentDir) ? localAgentDir : null,\n\t\tsourceCwd,\n\t\tartifactDir: join(\n\t\t\trequest.parent.sessionDir,\n\t\t\t\"artifacts\",\n\t\t\trequest.parent.sessionId,\n\t\t),\n\t\tsessionMode,\n\t\ttaskDelivery: sessionMode === \"fork\" ? \"direct\" : \"artifact\",\n\t};\n}\n\nasync function prepareLaunchSurface(\n\tresolved: ResolvedLaunch,\n\toperations: PiLaunchOperations,\n): Promise<PreparedSurface> {\n\tconst { request } = resolved;\n\tif (!request.worktree) {\n\t\treturn {\n\t\t\tsurface:\n\t\t\t\trequest.surface ??\n\t\t\t\t(await operations.createPane(request.name, resolved.sourceCwd, {\n\t\t\t\t\tsignal: request.acquisitionSignal,\n\t\t\t\t})),\n\t\t\ttargetCwd: resolved.sourceCwd,\n\t\t\teffectiveAgentDir: resolved.localAgentDir ?? resolved.agentDir,\n\t\t\tlocalAgentDir: resolved.localAgentDir,\n\t\t};\n\t}\n\tif (request.surface)\n\t\tthrow new Error(\"A worktree subagent cannot use a pre-created pane\");\n\n\tconst worktreeOps = requireWorktreeOperations(operations);\n\tconst baseRef = request.worktree.base ?? \"HEAD\";\n\tconst baseSha = await worktreeOps.resolveGitCommit(\n\t\tresolved.sourceCwd,\n\t\tbaseRef,\n\t);\n\tconst provisionCwd = await worktreeOps.resolveWorktreeProvisionCwd(\n\t\tresolved.sourceCwd,\n\t);\n\tconst manifestFile = join(\n\t\tresolved.artifactDir,\n\t\t\"worktree-runs\",\n\t\t`${resolved.id}.json`,\n\t);\n\tconst ownership = {\n\t\tid: resolved.id,\n\t\tname: request.name,\n\t\tsourceCwd: resolved.sourceCwd,\n\t\tbranch: request.worktree.branch,\n\t\tbaseRef,\n\t\tbaseSha,\n\t\tcreatedAt: resolved.startTime,\n\t};\n\tworktreeOps.writeWorktreeManifest(manifestFile, {\n\t\tstate: \"provisioning\",\n\t\t...ownership,\n\t});\n\n\tlet created: WorktreeSurfaceForLaunch;\n\ttry {\n\t\tcreated = await operations.createWorktree(\n\t\t\trequest.name,\n\t\t\tprovisionCwd,\n\t\t\trequest.worktree.branch,\n\t\t\tbaseSha,\n\t\t\t{ signal: request.acquisitionSignal },\n\t\t);\n\t} catch (error) {\n\t\tconst failedManifest: FailedWorktreeManifest = {\n\t\t\tstate: \"failed\",\n\t\t\t...ownership,\n\t\t};\n\t\tif (error instanceof WorktreeProvisioningError) {\n\t\t\tObject.assign(failedManifest, error.recoveredWorktree);\n\t\t}\n\t\tif (\n\t\t\tisAcquisitionUncertainError(error) &&\n\t\t\terror.uncertainty.kind === \"worktree-create\"\n\t\t) {\n\t\t\tObject.assign(failedManifest, error.uncertainty.recovered, {\n\t\t\t\tacquisitionUncertain: true,\n\t\t\t});\n\t\t}\n\t\tfailedManifest.error = errorMessage(error);\n\t\ttry {\n\t\t\tworktreeOps.writeWorktreeManifest(manifestFile, failedManifest);\n\t\t} catch {\n\t\t\t/* original acquisition failure remains authoritative */\n\t\t}\n\t\tif (isAcquisitionUncertainError(error))\n\t\t\tthrow new AcquisitionUncertainError(\n\t\t\t\t`${error.message}; ownership manifest retained at ${manifestFile}`,\n\t\t\t\terror.uncertainty,\n\t\t\t\t{ cause: error },\n\t\t\t);\n\t\tthrow error;\n\t}\n\n\tconst worktree: WorktreeLaunch = {\n\t\tpath: created.path,\n\t\tworkspaceId: created.workspaceId,\n\t\tpaneId: created.paneId,\n\t\tbranch: created.branch,\n\t\tbaseRef,\n\t\tbaseSha,\n\t\tmanifestFile,\n\t};\n\tif (created.diagnostics?.length) worktree.diagnostics = created.diagnostics;\n\ttry {\n\t\tworktreeOps.writeWorktreeManifest(manifestFile, {\n\t\t\tstate: \"provisioned\",\n\t\t\t...ownership,\n\t\t\t...worktree,\n\t\t});\n\t} catch (error) {\n\t\t// Preserve the known retained root even when a manifest update fails.\n\t\t(worktree.diagnostics ??= []).push(\n\t\t\t`Manifest update failed: ${errorMessage(error)}`,\n\t\t);\n\t}\n\tconst isolatedAgentDir = join(created.path, \".pi\", \"agent\");\n\tconst hasIsolatedAgentDir = existsSync(isolatedAgentDir);\n\treturn {\n\t\tsurface: created.paneId,\n\t\ttargetCwd: created.path,\n\t\teffectiveAgentDir: hasIsolatedAgentDir\n\t\t\t? isolatedAgentDir\n\t\t\t: resolved.agentDir,\n\t\tlocalAgentDir: hasIsolatedAgentDir ? isolatedAgentDir : null,\n\t\tworktree,\n\t};\n}\n\nfunction prepareChildSession(\n\tresolved: ResolvedLaunch,\n\tsurface: PreparedSurface,\n\toperations: PiLaunchOperations,\n): PreparedSession {\n\tconst sessionDir = getDefaultSessionDirFor(\n\t\tsurface.targetCwd,\n\t\tsurface.effectiveAgentDir,\n\t);\n\tconst timestamp = timestampForFile();\n\tconst uuid = [\n\t\tresolved.id,\n\t\tMath.random().toString(16).slice(2, 10),\n\t\tMath.random().toString(16).slice(2, 10),\n\t\tMath.random().toString(16).slice(2, 6),\n\t].join(\"-\");\n\tconst sessionFile = join(sessionDir, `${timestamp}_${uuid}.jsonl`);\n\tif (surface.worktree) {\n\t\tsurface.worktree.sessionFile = sessionFile;\n\t\trequireWorktreeOperations(operations).writeWorktreeManifest(\n\t\t\tsurface.worktree.manifestFile,\n\t\t\t{ sessionFile },\n\t\t);\n\t}\n\tconst policy = writeSubagentSessionPolicy(sessionFile, {\n\t\towner: surface.worktree ? \"managed-worktree\" : \"public\",\n\t\ttools: resolved.request.behavior.tools,\n\t\tdeniedTools: resolved.request.behavior.deniedTools,\n\t\tpersistent: resolved.request.behavior.persistent,\n\t\tlogicalId: resolved.request.behavior.logicalId ?? resolved.id,\n\t\tgenerationId: resolved.request.behavior.generationId,\n\t\tagent: resolved.request.handoff ? null : (resolved.request.agent ?? null),\n\t\tselfSpawn:\n\t\t\t!resolved.request.handoff &&\n\t\t\tBoolean(resolved.request.agent) &&\n\t\t\tBoolean(resolved.request.behavior.selfSpawn),\n\t\tworktree: surface.worktree\n\t\t\t? {\n\t\t\t\t\tpath: surface.worktree.path,\n\t\t\t\t\tworkspaceId: surface.worktree.workspaceId,\n\t\t\t\t\tbranch: surface.worktree.branch,\n\t\t\t\t\tbaseSha: surface.worktree.baseSha,\n\t\t\t\t}\n\t\t\t: undefined,\n\t});\n\tconst activityFile = getSubagentActivityFile(\n\t\tresolved.artifactDir,\n\t\tresolved.id,\n\t);\n\treturn {\n\t\t...surface,\n\t\tsessionFile,\n\t\tactivityFile,\n\t\tpolicy,\n\t\tinitialTaskId: policy.persistent\n\t\t\t? (resolved.request.behavior.taskId ?? randomUUID())\n\t\t\t: undefined,\n\t\t// A handoff Pi loads no child protocol extension, so it records nothing.\n\t\tprocessIdentityFile:\n\t\t\t(surface.worktree || resolved.request.surface) &&\n\t\t\t!resolved.request.handoff\n\t\t\t\t? getSubagentProcessIdentityFile(sessionFile)\n\t\t\t\t: undefined,\n\t};\n}\n\nasync function confirmShellReady(\n\tsession: PreparedSession,\n\toperations: PiLaunchOperations,\n): Promise<void> {\n\tawait operations.waitForShellReady(requiredSurface(session));\n}\n\nfunction buildWorktreeHandoffMessage(\n\trequest: FreshPiLaunchRequest,\n\tworktree: WorktreeLaunch,\n\tsessionFile: string,\n): string {\n\tconst task = request.task.slice(0, 2000);\n\treturn [\n\t\t\"Worktree handoff context:\",\n\t\t`Branch: ${worktree.branch}`,\n\t\t`Base commit: ${worktree.baseSha}`,\n\t\t`Worktree: ${worktree.path}`,\n\t\t`Source session: ${request.parent.sessionFile}`,\n\t\t`Fork session: ${sessionFile}`,\n\t\t\"\",\n\t\t\"Requested task:\",\n\t\ttask || \"Continue the current work in this worktree.\",\n\t].join(\"\\n\");\n}\n\nfunction prepareTaskArtifacts(\n\tresolved: ResolvedLaunch,\n\tsession: PreparedSession,\n\toperations: PiLaunchOperations,\n): PreparedArtifacts {\n\tconst { request } = resolved;\n\tif (request.handoff) {\n\t\tif (!session.worktree) {\n\t\t\tthrow new Error(\"A worktree handoff requires a managed worktree\");\n\t\t}\n\t\tconst handoffMessage = buildWorktreeHandoffMessage(\n\t\t\trequest,\n\t\t\tsession.worktree,\n\t\t\tsession.sessionFile,\n\t\t);\n\t\tcreateWorktreeSessionFork({\n\t\t\tparentSessionFile: request.parent.sessionFile,\n\t\t\tleafId: request.handoff.leafId,\n\t\t\tchildSessionFile: session.sessionFile,\n\t\t\tchildCwd: session.targetCwd,\n\t\t\thandoffMessage,\n\t\t});\n\t\tsession.worktree.sourceSessionFile = request.parent.sessionFile;\n\t\tsession.worktree.handoffMessage = handoffMessage;\n\t\trequireWorktreeOperations(operations).writeWorktreeManifest(\n\t\t\tsession.worktree.manifestFile,\n\t\t\t{\n\t\t\t\tsourceSessionFile: request.parent.sessionFile,\n\t\t\t\thandoffMessage,\n\t\t\t},\n\t\t);\n\t} else if (resolved.sessionMode !== \"standalone\") {\n\t\tseedSubagentSessionFile({\n\t\t\tmode: resolved.sessionMode,\n\t\t\tparentSessionFile: request.parent.sessionFile,\n\t\t\tchildSessionFile: session.sessionFile,\n\t\t\tchildCwd: session.targetCwd,\n\t\t});\n\t}\n\tmkdirSync(dirname(session.activityFile), { recursive: true });\n\n\tconst identityInSystemPrompt =\n\t\trequest.behavior.systemPromptMode && request.behavior.identity;\n\tconst roleBlock =\n\t\trequest.behavior.identity && !identityInSystemPrompt\n\t\t\t? `\\n\\n${request.behavior.identity}`\n\t\t\t: \"\";\n\tconst modeHint = request.behavior.autoExit\n\t\t? \"Complete your task autonomously.\"\n\t\t: \"Complete your task. When finished, call the subagent_done tool. The user can interact with you at any time.\";\n\tconst summaryInstruction = request.behavior.autoExit\n\t\t? \"Your FINAL assistant message should summarize what you accomplished.\"\n\t\t: \"Your FINAL assistant message (before calling subagent_done or before the user exits) should summarize what you accomplished.\";\n\tconst fullTask = request.handoff\n\t\t? request.task\n\t\t: resolved.sessionMode === \"fork\"\n\t\t\t? request.task\n\t\t\t: `${roleBlock}\\n\\n${modeHint}\\n\\n${request.task}\\n\\n${summaryInstruction}`;\n\tlet taskArg = fullTask;\n\tif (resolved.taskDelivery === \"artifact\" && !request.handoff) {\n\t\tconst artifactPath = join(\n\t\t\tresolved.artifactDir,\n\t\t\t`context/${safeName(request.name) || \"subagent\"}-${timestampForFile(false)}.md`,\n\t\t);\n\t\tmkdirSync(dirname(artifactPath), { recursive: true });\n\t\twriteFileSync(artifactPath, fullTask, \"utf8\");\n\t\ttaskArg = `@${artifactPath}`;\n\t}\n\n\tlet systemPromptFile: string | undefined;\n\tif (identityInSystemPrompt) {\n\t\tsystemPromptFile = join(\n\t\t\tresolved.artifactDir,\n\t\t\t`context/${safeName(request.name) || \"subagent\"}-sysprompt-${timestampForFile(false)}.md`,\n\t\t);\n\t\tmkdirSync(dirname(systemPromptFile), { recursive: true });\n\t\twriteFileSync(systemPromptFile, identityInSystemPrompt, \"utf8\");\n\t}\n\t// A file, never the raw command in the launch environment or script.\n\tlet acceptFile: string | undefined;\n\tif (request.accept && !request.handoff) {\n\t\tacceptFile = join(\n\t\t\tresolved.artifactDir,\n\t\t\t`context/${safeName(request.name) || \"subagent\"}-accept-${resolved.id}.json`,\n\t\t);\n\t\tmkdirSync(dirname(acceptFile), { recursive: true });\n\t\twriteFileSync(\n\t\t\tacceptFile,\n\t\t\tJSON.stringify({ version: 1, ...request.accept }),\n\t\t\t\"utf8\",\n\t\t);\n\t}\n\treturn { ...session, taskArg, systemPromptFile, acceptFile };\n}\n\nfunction buildPiCommand(\n\tresolved: ResolvedLaunch,\n\tartifacts: PreparedArtifacts,\n): string {\n\tconst { request } = resolved;\n\tconst parts = [\n\t\t\"pi\",\n\t\t\"--session\",\n\t\tshellQuote(artifacts.sessionFile),\n\t\t...(request.handoff\n\t\t\t? []\n\t\t\t: [\"-e\", shellQuote(request.childEntryPath ?? DEFAULT_CHILD_ENTRY_PATH)]),\n\t\t\"--model\",\n\t\tshellQuote(request.runtimePlan.model),\n\t\t\"--thinking\",\n\t\tshellQuote(request.runtimePlan.thinking),\n\t\t...modelScopeArgs(request.modelScope),\n\t];\n\tif (artifacts.systemPromptFile) {\n\t\tparts.push(\n\t\t\trequest.behavior.systemPromptMode === \"replace\"\n\t\t\t\t? \"--system-prompt\"\n\t\t\t\t: \"--append-system-prompt\",\n\t\t\tshellQuote(artifacts.systemPromptFile),\n\t\t);\n\t}\n\tconst notify =\n\t\t!request.handoff &&\n\t\trequest.behavior.persistent === true &&\n\t\trequest.behavior.notify === true;\n\tconst toolAllowlist = buildSubagentToolAllowlist(\n\t\trequest.behavior.tools,\n\t\trequest.behavior.autoExit,\n\t\tnotify,\n\t);\n\tif (toolAllowlist) parts.push(\"--tools\", shellQuote(toolAllowlist));\n\tif (!request.handoff) parts.push(shellQuote(artifacts.taskArg));\n\n\tconst env = [\n\t\t`${PI_LAUNCH_SESSION_ENV}=${shellQuote(artifacts.sessionFile)}`,\n\t\tchildDepthAssignment(resolved.request.handoff ? \"handoff\" : \"child\"),\n\t\tmodelScopeAssignment(request.modelScope),\n\t\t// Explicit on every path, including a handoff, so an opt-in left in the\n\t\t// pane's shell never reaches a session whose role did not declare it.\n\t\t`PI_SUBAGENT_SELF_SPAWN=${!request.handoff && request.agent && request.behavior.selfSpawn ? \"1\" : \"0\"}`,\n\t];\n\tif (artifacts.localAgentDir) {\n\t\tenv.push(`PI_CODING_AGENT_DIR=${shellQuote(artifacts.localAgentDir)}`);\n\t} else if (process.env.PI_CODING_AGENT_DIR) {\n\t\tenv.push(\n\t\t\t`PI_CODING_AGENT_DIR=${shellQuote(process.env.PI_CODING_AGENT_DIR)}`,\n\t\t);\n\t}\n\tif (!request.handoff) {\n\t\tif (request.behavior.deniedTools.length > 0) {\n\t\t\tenv.push(\n\t\t\t\t`PI_DENY_TOOLS=${shellQuote(request.behavior.deniedTools.join(\",\"))}`,\n\t\t\t);\n\t\t}\n\t\tenv.push(`PI_SUBAGENT_NAME=${shellQuote(request.name)}`);\n\t\tif (request.agent)\n\t\t\tenv.push(`PI_SUBAGENT_AGENT=${shellQuote(request.agent)}`);\n\t\tenv.push(`PI_SUBAGENT_AUTO_EXIT=${request.behavior.autoExit ? \"1\" : \"0\"}`);\n\t\tif (artifacts.acceptFile)\n\t\t\tenv.push(`${ACCEPT_FILE_ENV}=${shellQuote(artifacts.acceptFile)}`);\n\t\t// Names only, always set: the child's own Pi decides which skills exist.\n\t\tenv.push(\n\t\t\t`${DECLARED_SKILLS_ENV}=${shellQuote(formatDeclaredSkillsEnv(parseDeclaredSkills(request.behavior.skills)))}`,\n\t\t);\n\t\tif (request.behavior.persistent) {\n\t\t\tenv.push(\"PI_SUBAGENT_PERSISTENT=1\");\n\t\t\tenv.push(\n\t\t\t\t`PI_SUBAGENT_GENERATION_ID=${shellQuote(artifacts.policy.generationId)}`,\n\t\t\t);\n\t\t\tenv.push(`PI_SUBAGENT_TASK_ID=${shellQuote(artifacts.initialTaskId!)}`);\n\t\t\t// Explicit either way, so an opt-in left in the pane's shell never leaks.\n\t\t\tenv.push(`PI_SUBAGENT_NOTIFY=${notify ? \"1\" : \"0\"}`);\n\t\t}\n\t\tenv.push(`PI_SUBAGENT_SESSION=${shellQuote(artifacts.sessionFile)}`);\n\t\tenv.push(`PI_SUBAGENT_ID=${shellQuote(resolved.id)}`);\n\t\tenv.push(`PI_SUBAGENT_ACTIVITY_FILE=${shellQuote(artifacts.activityFile)}`);\n\t\tif (artifacts.surface)\n\t\t\tenv.push(`PI_SUBAGENT_SURFACE=${shellQuote(artifacts.surface)}`);\n\t\tif (artifacts.processIdentityFile)\n\t\t\tenv.push(\n\t\t\t\t`PI_SUBAGENT_PROCESS_FILE=${shellQuote(artifacts.processIdentityFile)}`,\n\t\t\t);\n\t}\n\n\tconst piCommand =\n\t\t`cd ${shellQuote(artifacts.targetCwd)} && ` +\n\t\t`${env.join(\" \")} ${parts.join(\" \")}`;\n\tif (request.handoff) return piCommand;\n\tif (!artifacts.surface)\n\t\treturn `${piCommand}; piha_exit=$?; echo \"__SUBAGENT_DONE_\\${piha_exit}__\"; exit \"$piha_exit\"`;\n\t// A persistent stop needs exit evidence that a shell prompt cannot scroll\n\t// off the screen, as the marker can (#143); the shell writes it after Pi exits.\n\tif (request.behavior.persistent)\n\t\treturn `${piCommand}; piha_exit=$?; printf '%s\\\\n' \"$piha_exit\" > ${shellQuote(shellExitFileFor(artifacts.sessionFile))} 2>/dev/null; echo \"__SUBAGENT_DONE_\\${piha_exit}__\"`;\n\treturn `${piCommand}; echo '__SUBAGENT_DONE_'$?'__'`;\n}\n\nasync function startPiProcess(\n\tresolved: ResolvedLaunch,\n\tartifacts: PreparedArtifacts,\n\tcommand: string,\n\tlaunchScriptFile: string,\n\toperations: PiLaunchOperations,\n): Promise<string> {\n\treturn await operations.runScript(requiredSurface(artifacts), command, {\n\t\tscriptPath: launchScriptFile,\n\t\tscriptPreamble: [\n\t\t\tshellComment(`Subagent launch script for ${resolved.request.name}`),\n\t\t\tshellComment(`Generated: ${new Date().toISOString()}`),\n\t\t\tshellComment(`Session: ${artifacts.sessionFile}`),\n\t\t\tshellComment(`Surface: ${artifacts.surface}`),\n\t\t].join(\"\\n\"),\n\t});\n}\n\nfunction createRunningChild(\n\tresolved: ResolvedLaunch,\n\tartifacts: PreparedArtifacts,\n): Omit<PiRunningChild, \"surface\"> {\n\tconst child: Omit<PiRunningChild, \"surface\"> = {\n\t\tid: resolved.id,\n\t\tname: resolved.request.name,\n\t\ttask: resolved.request.task,\n\t\tagent: resolved.request.agent,\n\t\townsSurface: !artifacts.worktree && !resolved.request.surface,\n\t\tstartTime: resolved.startTime,\n\t\tsessionFile: artifacts.sessionFile,\n\t\tlaunchScriptFile: join(\n\t\t\tresolved.artifactDir,\n\t\t\t\"subagent-scripts\",\n\t\t\t`${safeName(resolved.request.name) || \"subagent\"}-${resolved.id}.sh`,\n\t\t),\n\t\tactivityFile: artifacts.activityFile,\n\t\tinteractive: resolved.request.behavior.interactive,\n\t\truntimePlan: resolved.request.runtimePlan,\n\t\tworktree: artifacts.worktree,\n\t\tcwd: artifacts.targetCwd,\n\t\t// A handoff loads no child protocol, so it never carries a check.\n\t\taccept: resolved.request.handoff ? undefined : resolved.request.accept,\n\t\tlifecycle: createLifecycle(resolved.startTime),\n\t\tprocessIdentityFile: artifacts.processIdentityFile,\n\t};\n\tconst { policy, initialTaskId } = artifacts;\n\tif (policy.persistent) {\n\t\tObject.assign(child, {\n\t\t\tpersistent: true,\n\t\t\tlogicalId: policy.logicalId,\n\t\t\tgenerationId: policy.generationId,\n\t\t\tpolicyHash: policy.policyHash,\n\t\t\tpolicyTools: policy.tools,\n\t\t\tpolicyDeniedTools: policy.deniedTools,\n\t\t\ttasksCompleted: 0,\n\t\t\ttaskId: initialTaskId,\n\t\t\tissuedTaskIds: [initialTaskId!],\n\t\t\tinboxSequence: 0,\n\t\t\tobservedTaskEvents: 0,\n\t\t});\n\t\tif (resolved.request.behavior.notify === true && !resolved.request.handoff)\n\t\t\tchild.notify = true;\n\t\tappendPersistentDeliveryLedger(child.sessionFile, {\n\t\t\ttask: initialTaskId!,\n\t\t\toutcome: \"dispatched\",\n\t\t\tgeneration: policy.generationId,\n\t\t\tlogicalId: policy.logicalId,\n\t\t\tpolicyHash: policy.policyHash,\n\t\t});\n\t}\n\treturn child;\n}\n\n// Capture runs beside the launch so readiness never delays the acknowledgement;\n// a cancel awaits it, and without a verified identity nothing is signalled. A\n// cancel after an expired capture starts a fresh one bounded by its own budget.\nexport function startProcessIdentityCapture(\n\tchild: PiRunningChild,\n\toperations: PiLaunchOperations,\n\toptions?: { timeoutMs?: number },\n): void {\n\tconst file = child.processIdentityFile;\n\tif (!file) return;\n\tconst capture = operations.captureProcessIdentity;\n\tif (!capture) {\n\t\tchild.processIdentityError = \"process identity capture is unavailable\";\n\t\treturn;\n\t}\n\tchild.processIdentityError = undefined;\n\tchild.processIdentityCapture = Promise.resolve()\n\t\t.then(() =>\n\t\t\tcapture(\n\t\t\t\tchild.surface,\n\t\t\t\t{ file, id: child.id, sessionFile: child.sessionFile },\n\t\t\t\toptions,\n\t\t\t),\n\t\t)\n\t\t.then(\n\t\t\t(identity) => (child.processIdentity = identity),\n\t\t\t(error) => {\n\t\t\t\tchild.processIdentityError = errorMessage(error);\n\t\t\t\treturn undefined;\n\t\t\t},\n\t\t);\n}\n\nfunction getDefaultSessionDirFor(cwd: string, agentDir: string): string {\n\tconst safePath = `--${cwd.replace(/^[/\\\\]/, \"\").replace(/[/\\\\:]/g, \"-\")}--`;\n\tconst sessionDir = join(agentDir, \"sessions\", safePath);\n\tmkdirSync(sessionDir, { recursive: true });\n\treturn sessionDir;\n}\n\nfunction requireWorktreeOperations(\n\toperations: PiLaunchOperations,\n): WorktreeOperations {\n\tif (!operations.worktree)\n\t\tthrow new Error(\"Worktree operations are unavailable\");\n\treturn operations.worktree;\n}\n\nfunction errorMessage(error: any): string {\n\treturn error instanceof Error ? error.message : String(error);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-registry.d.ts","sourceRoot":"","sources":["../../../../maestro/adapters/pi/model-registry.ts"],"names":[],"mappings":"AAKA,OAAO,EAEN,KAAK,oBAAoB,EAEzB,KAAK,qBAAqB,EAC1B,MAAM,uBAAuB,CAAC;AAE/B,wBAAgB,mBAAmB,CAClC,QAAQ,EAAE,qBAAqB,GAC7B,oBAAoB,CAOtB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { clampThinkingLevel, getSupportedThinkingLevels, } from "@earendil-works/pi-ai";
|
|
2
|
+
import { createModelRegistryAdapter, } from "../../core/routing.js";
|
|
3
|
+
export function wrapPiModelRegistry(registry) {
|
|
4
|
+
return createModelRegistryAdapter(registry, {
|
|
5
|
+
supportedThinkingLevels: (model) => getSupportedThinkingLevels(asPiModel(model)),
|
|
6
|
+
clampThinkingLevel: (model, level) => clampThinkingLevel(asPiModel(model), level),
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
function asPiModel(model) {
|
|
10
|
+
return {
|
|
11
|
+
provider: model.provider,
|
|
12
|
+
id: model.id,
|
|
13
|
+
name: model.id,
|
|
14
|
+
api: "openai-completions",
|
|
15
|
+
baseUrl: "",
|
|
16
|
+
reasoning: model.reasoning,
|
|
17
|
+
thinkingLevelMap: model.thinkingLevelMap,
|
|
18
|
+
input: model.input?.filter((entry) => entry === "text" || entry === "image") ?? ["text"],
|
|
19
|
+
contextWindow: model.contextWindow ?? 0,
|
|
20
|
+
maxTokens: model.maxTokens ?? 0,
|
|
21
|
+
cost: {
|
|
22
|
+
input: model.cost?.input ?? 0,
|
|
23
|
+
output: model.cost?.output ?? 0,
|
|
24
|
+
cacheRead: model.cost?.cacheRead ?? 0,
|
|
25
|
+
cacheWrite: model.cost?.cacheWrite ?? 0,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=model-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-registry.js","sourceRoot":"","sources":["../../../../maestro/adapters/pi/model-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,0BAA0B,GAE1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACN,0BAA0B,GAI1B,MAAM,uBAAuB,CAA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ai\";\nimport {\n\tcreateModelRegistryAdapter,\n\ttype ModelRegistryAdapter,\n\ttype RoutingModel,\n\ttype RoutingRegistrySource,\n} from \"../../core/routing.ts\";\n\nexport function wrapPiModelRegistry(\n\tregistry: RoutingRegistrySource,\n): ModelRegistryAdapter {\n\treturn createModelRegistryAdapter(registry, {\n\t\tsupportedThinkingLevels: (model) =>\n\t\t\tgetSupportedThinkingLevels(asPiModel(model)),\n\t\tclampThinkingLevel: (model, level) =>\n\t\t\tclampThinkingLevel(asPiModel(model), level),\n\t});\n}\n\nfunction asPiModel(model: RoutingModel): Model<any> {\n\treturn {\n\t\tprovider: model.provider,\n\t\tid: model.id,\n\t\tname: model.id,\n\t\tapi: \"openai-completions\",\n\t\tbaseUrl: \"\",\n\t\treasoning: model.reasoning,\n\t\tthinkingLevelMap: model.thinkingLevelMap,\n\t\tinput: model.input?.filter(\n\t\t\t(entry): entry is \"text\" | \"image\" =>\n\t\t\t\tentry === \"text\" || entry === \"image\",\n\t\t) ?? [\"text\"],\n\t\tcontextWindow: model.contextWindow ?? 0,\n\t\tmaxTokens: model.maxTokens ?? 0,\n\t\tcost: {\n\t\t\tinput: model.cost?.input ?? 0,\n\t\t\toutput: model.cost?.output ?? 0,\n\t\t\tcacheRead: model.cost?.cacheRead ?? 0,\n\t\t\tcacheWrite: model.cost?.cacheWrite ?? 0,\n\t\t},\n\t};\n}\n"]}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { HarnessAdapter, ResumeOptions, SpawnOptions } from "../../core/harness-adapter.ts";
|
|
2
|
+
import type { AgentHandle, AgentState, CompletionEvidence } from "../../core/types.ts";
|
|
3
|
+
import type { SurfaceProvider } from "../../core/surface-provider.ts";
|
|
4
|
+
import type { PaneConfig } from "../../core/config/pane-config.ts";
|
|
5
|
+
import { type ModelRegistryAdapter, type ParentRuntime, type ResolvedRuntimePlan } from "../../core/routing.ts";
|
|
6
|
+
import type { FileWakeRegistry } from "../../core/wake.ts";
|
|
7
|
+
import type { SupervisionCoordinator } from "../../core/supervision.ts";
|
|
8
|
+
import { type ProcessIdentityProbe } from "./process-identity.ts";
|
|
9
|
+
import { type PiLaunchOperations } from "./launch-operations.ts";
|
|
10
|
+
import { type FreshPiLaunchRequest, type PiRunningChild } from "./launch.ts";
|
|
11
|
+
import type { WorktreeOperations } from "../../core/worktree.ts";
|
|
12
|
+
export interface PiSpawnOptions extends SpawnOptions {
|
|
13
|
+
/** Pi host normalization: retain validation/provenance and raw cwd/config origins.
|
|
14
|
+
* Presence selects this snapshot, including intentionally omitted agent/tools/cwd.
|
|
15
|
+
* Generic callers continue to resolve their role/runtime through the adapter.
|
|
16
|
+
*/
|
|
17
|
+
resolvedLaunch?: {
|
|
18
|
+
runtimePlan: ResolvedRuntimePlan;
|
|
19
|
+
agent?: string;
|
|
20
|
+
cwd?: string;
|
|
21
|
+
roleCwd?: string;
|
|
22
|
+
tools?: string;
|
|
23
|
+
};
|
|
24
|
+
/** Preserve opaque host identities during the staged migration. Not the core task/session ID. */
|
|
25
|
+
launchIdentity?: {
|
|
26
|
+
id?: string;
|
|
27
|
+
logicalId?: string;
|
|
28
|
+
generationId?: string;
|
|
29
|
+
taskId?: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface PiHarnessAdapterOptions {
|
|
33
|
+
childEntryPath?: string;
|
|
34
|
+
surface: SurfaceProvider;
|
|
35
|
+
paneConfig: PaneConfig;
|
|
36
|
+
modelRegistry: ModelRegistryAdapter;
|
|
37
|
+
parent: FreshPiLaunchRequest["parent"];
|
|
38
|
+
/** Compatibility only; supervision owns its wake registry and registrations. */
|
|
39
|
+
wake?: FileWakeRegistry;
|
|
40
|
+
supervision: SupervisionCoordinator;
|
|
41
|
+
/** The active parent's registry runtime can precede persisted model-change entries. */
|
|
42
|
+
parentRuntime?: ParentRuntime;
|
|
43
|
+
/** Optional launch-operation injection, keeping the real Pi protocol in unit tests. */
|
|
44
|
+
operations?: PiLaunchOperations;
|
|
45
|
+
worktreeOperations?: WorktreeOperations;
|
|
46
|
+
/** Kernel process facts for a retained worktree child's identity; tests inject it. */
|
|
47
|
+
processProbe?: ProcessIdentityProbe;
|
|
48
|
+
/** Bound for confirming a retained worktree child's exit. Default: 5000ms. */
|
|
49
|
+
killTimeoutMs?: number;
|
|
50
|
+
/** Explicit local evidence/lifecycle bridge. The host still owns delivery and deduplication. */
|
|
51
|
+
onObservation?(child: PiRunningChild, kind: "local-evidence" | "pane" | "tick" | "completion" | "state" | "interrupt"): void;
|
|
52
|
+
}
|
|
53
|
+
/** Pi's existing launch and child-sidecar protocol behind the harness seam. */
|
|
54
|
+
export declare class PiHarnessAdapter implements HarnessAdapter {
|
|
55
|
+
readonly name = "pi";
|
|
56
|
+
private readonly options;
|
|
57
|
+
private readonly operations;
|
|
58
|
+
private readonly children;
|
|
59
|
+
private readonly evidence;
|
|
60
|
+
private readonly waits;
|
|
61
|
+
constructor(options: PiHarnessAdapterOptions);
|
|
62
|
+
isAvailable(): boolean;
|
|
63
|
+
spawn(opts: PiSpawnOptions): Promise<AgentHandle>;
|
|
64
|
+
resume(opts: ResumeOptions): Promise<AgentHandle>;
|
|
65
|
+
private acquireChild;
|
|
66
|
+
/** Temporary Pi-specific bridge for runtime migration; never infer task delivery from coarse state. */
|
|
67
|
+
getRunningChild(handle: AgentHandle): PiRunningChild;
|
|
68
|
+
readPersistentEvents(handle: AgentHandle): import("./session.ts").PersistentTaskEvent[];
|
|
69
|
+
getState(handle: AgentHandle): Promise<AgentState>;
|
|
70
|
+
interrupt(handle: AgentHandle): Promise<void>;
|
|
71
|
+
/** Resolves only with termination evidence; otherwise rejects (unconfirmed). */
|
|
72
|
+
kill(handle: AgentHandle): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Exit evidence is only the launch-verified identity (PID + start time, on
|
|
75
|
+
* this boot and PID namespace) no longer existing, or a gone pane while that
|
|
76
|
+
* identity is not known alive. SIGTERM goes only to that identity,
|
|
77
|
+
* re-verified first; without it nothing is signalled and the cancel stays
|
|
78
|
+
* unconfirmed. A failed SIGTERM to a live identity stays unconfirmed unless
|
|
79
|
+
* that identity then exits. Herdr's foreground list and argv text are never
|
|
80
|
+
* evidence.
|
|
81
|
+
* Every provider await is bounded by the deadline, and a late answer is
|
|
82
|
+
* dropped, so an unconfirmed outcome is reported on time and never flipped.
|
|
83
|
+
*/
|
|
84
|
+
private stopRetainedPi;
|
|
85
|
+
readOutput(handle: AgentHandle, lines?: number): Promise<string>;
|
|
86
|
+
exitCode(handle: AgentHandle): number | undefined;
|
|
87
|
+
sendInput(handle: AgentHandle, text: string): Promise<void>;
|
|
88
|
+
awaitCompletion(handle: AgentHandle, signal: AbortSignal): Promise<CompletionEvidence>;
|
|
89
|
+
private joinWait;
|
|
90
|
+
private runKey;
|
|
91
|
+
private track;
|
|
92
|
+
private parentRuntime;
|
|
93
|
+
private rejectEnvironment;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=pi-harness-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pi-harness-adapter.d.ts","sourceRoot":"","sources":["../../../../maestro/adapters/pi/pi-harness-adapter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACZ,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EACX,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAQtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAIN,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAA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