pi-better-server 0.4.0 → 0.6.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/package.json +8 -1
- package/scripts/copy-pi-test-providers.mjs +10 -0
- package/scripts/event-publication/README.md +26 -0
- package/scripts/event-publication/commit.mjs +21 -0
- package/scripts/event-publication/measure.mjs +87 -0
- package/scripts/event-publication/writer.mjs +6 -0
- package/scripts/measure-full-runtime/frontend.ts +24 -0
- package/scripts/measure-full-runtime/hosted-extension.ts +28 -0
- package/scripts/measure-full-runtime/probe.mjs +29 -0
- package/scripts/measure-full-runtime/recovery-trace-loader.mjs +51 -0
- package/scripts/measure-full-runtime/recovery-trace.mjs +16 -0
- package/scripts/measure-full-runtime.mjs +146 -0
- package/scripts/measure-shared-reads/probe.mjs +26 -2
- package/scripts/measure-shared-reads.mjs +44 -9
- package/scripts/private-runtime/package-lock.json +66 -4
- package/scripts/private-runtime/package.json +10 -2
- package/scripts/source-provenance.mjs +31 -0
- package/scripts/test-on-pi.sh +3 -9
- package/src/handshake.ts +1 -1
- package/src/hosted-session.ts +32 -4
- package/src/maintenance.ts +35 -7
- package/src/registry.ts +28 -4
- package/src/runtime/attempt-invalidation.ts +54 -0
- package/src/runtime/background-history.ts +151 -45
- package/src/runtime/background-policy.ts +27 -0
- package/src/runtime/background-tools.ts +389 -0
- package/src/runtime/background.ts +410 -48
- package/src/runtime/cancellation.ts +28 -7
- package/src/runtime/catalog-sources.ts +199 -0
- package/src/runtime/catalog.ts +53 -21
- package/src/runtime/client.ts +22 -2
- package/src/runtime/domain/assignment-inbox.mjs +119 -0
- package/src/runtime/domain/assignment-observation.d.mts +1 -1
- package/src/runtime/domain/assignment-observation.mjs +71 -33
- package/src/runtime/domain/background/process-identity.mjs +20 -2
- package/src/runtime/domain/background/process.mjs +3 -3
- package/src/runtime/domain/background/registry.mjs +89 -4
- package/src/runtime/domain/background/types.mjs +1 -0
- package/src/runtime/domain/background-service/adapter-contract.domain.mjs +83 -0
- package/src/runtime/domain/background-service/adapter-contract.ts +70 -0
- package/src/runtime/domain/background-service/batch.domain.mjs +91 -0
- package/src/runtime/domain/background-service/batch.ts +111 -0
- package/src/runtime/domain/background-service/conditions.domain.mjs +94 -0
- package/src/runtime/domain/background-service/conditions.ts +99 -0
- package/src/runtime/domain/background-service/delivery-observer.domain.mjs +37 -0
- package/src/runtime/domain/background-service/delivery-observer.ts +42 -0
- package/src/runtime/domain/background-service/failures.domain.mjs +209 -0
- package/src/runtime/domain/background-service/failures.ts +212 -0
- package/src/runtime/domain/background-service/goal-provider.domain.mjs +193 -0
- package/src/runtime/domain/background-service/goal-provider.ts +209 -0
- package/src/runtime/domain/background-service/index.domain.mjs +54 -0
- package/src/runtime/domain/background-service/index.ts +55 -0
- package/src/runtime/domain/background-service/logs.domain.mjs +129 -0
- package/src/runtime/domain/background-service/logs.ts +134 -0
- package/src/runtime/domain/background-service/maintenance.domain.mjs +95 -0
- package/src/runtime/domain/background-service/maintenance.ts +98 -0
- package/src/runtime/domain/background-service/managed-authority.domain.mjs +32 -0
- package/src/runtime/domain/background-service/managed-authority.ts +30 -0
- package/src/runtime/domain/background-service/managed-client.domain.mjs +79 -0
- package/src/runtime/domain/background-service/managed-client.ts +73 -0
- package/src/runtime/domain/background-service/managed-frontend.domain.mjs +225 -0
- package/src/runtime/domain/background-service/managed-frontend.ts +176 -0
- package/src/runtime/domain/background-service/navigator-provider.domain.mjs +492 -0
- package/src/runtime/domain/background-service/navigator-provider.ts +485 -0
- package/src/runtime/domain/background-service/observed-wait-client.domain.mjs +6 -0
- package/src/runtime/domain/background-service/observed-wait-client.ts +10 -0
- package/src/runtime/domain/background-service/observed-waits.domain.mjs +4080 -0
- package/src/runtime/domain/background-service/observed-waits.ts +4513 -0
- package/src/runtime/domain/background-service/output.domain.mjs +867 -0
- package/src/runtime/domain/background-service/output.ts +952 -0
- package/src/runtime/domain/background-service/process-identity.domain.mjs +129 -0
- package/src/runtime/domain/background-service/process-identity.ts +134 -0
- package/src/runtime/domain/background-service/process.domain.mjs +512 -0
- package/src/runtime/domain/background-service/process.ts +532 -0
- package/src/runtime/domain/background-service/prompt.domain.mjs +58 -0
- package/src/runtime/domain/background-service/prompt.ts +72 -0
- package/src/runtime/domain/background-service/registry.domain.mjs +460 -0
- package/src/runtime/domain/background-service/registry.ts +450 -0
- package/src/runtime/domain/background-service/remote-task-preset.domain.mjs +67 -0
- package/src/runtime/domain/background-service/remote-task-preset.ts +127 -0
- package/src/runtime/domain/background-service/runtime.domain.mjs +1511 -0
- package/src/runtime/domain/background-service/runtime.ts +1636 -0
- package/src/runtime/domain/background-service/sandbox.domain.mjs +735 -0
- package/src/runtime/domain/background-service/sandbox.ts +913 -0
- package/src/runtime/domain/background-service/shared-callback-batcher.domain.mjs +777 -0
- package/src/runtime/domain/background-service/shared-callback-batcher.ts +956 -0
- package/src/runtime/domain/background-service/shared-execution-policy.domain.mjs +50 -0
- package/src/runtime/domain/background-service/shared-execution-policy.ts +61 -0
- package/src/runtime/domain/background-service/shared-failure-observations.domain.mjs +1078 -0
- package/src/runtime/domain/background-service/shared-failure-observations.ts +1166 -0
- package/src/runtime/domain/background-service/shared-harness-settings.domain.mjs +126 -0
- package/src/runtime/domain/background-service/shared-harness-settings.ts +116 -0
- package/src/runtime/domain/background-service/shared-log-utils.domain.mjs +1223 -0
- package/src/runtime/domain/background-service/shared-log-utils.ts +1492 -0
- package/src/runtime/domain/background-service/shared-navigator-panels.domain.mjs +289 -0
- package/src/runtime/domain/background-service/shared-navigator-panels.ts +272 -0
- package/src/runtime/domain/background-service/shared-navigator.domain.mjs +1930 -0
- package/src/runtime/domain/background-service/shared-navigator.ts +1962 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/assignment-inbox.mjs +144 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/assignment-observation.mjs +189 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/index.domain.mjs +51 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/index.ts +122 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/assignment-changes.domain.mjs +75 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/assignment-changes.ts +73 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/assignment-outcomes.domain.mjs +163 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/assignment-outcomes.ts +174 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/background-parent-callbacks.domain.mjs +66 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/background-parent-callbacks.ts +68 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/background-requests.domain.mjs +87 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/background-requests.ts +90 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/discovery.domain.mjs +97 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/discovery.ts +139 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/errors.domain.mjs +12 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/errors.ts +79 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/operations.domain.mjs +342 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/operations.ts +513 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/outbox.domain.mjs +283 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/outbox.ts +458 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/recovery.domain.mjs +52 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/recovery.ts +55 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/result-supervision.domain.mjs +114 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/result-supervision.ts +140 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/rows.domain.mjs +280 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/rows.ts +442 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/schema.domain.mjs +420 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/schema.ts +441 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/sqlite.domain.mjs +194 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/sqlite.ts +239 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/store.domain.mjs +275 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/store.ts +585 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/subagent-launch.domain.mjs +120 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/subagent-launch.ts +142 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/task-cancellation.domain.mjs +188 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/task-cancellation.ts +224 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/types.domain.mjs +25 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/types.ts +707 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/upgrade.domain.mjs +22 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/upgrade.ts +22 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/validate.domain.mjs +234 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/validate.ts +241 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/waits.domain.mjs +851 -0
- package/src/runtime/domain/background-service/shared-operation-coordinator/src/waits.ts +1424 -0
- package/src/runtime/domain/background-service/shared-permission-blocker.domain.mjs +40 -0
- package/src/runtime/domain/background-service/shared-permission-blocker.ts +48 -0
- package/src/runtime/domain/background-service/shared-render-scheduler.domain.mjs +41 -0
- package/src/runtime/domain/background-service/shared-render-scheduler.ts +47 -0
- package/src/runtime/domain/background-service/shared-sandbox-core.domain.mjs +1531 -0
- package/src/runtime/domain/background-service/shared-sandbox-core.ts +1757 -0
- package/src/runtime/domain/background-service/shared-sandbox-diagnostics.domain.mjs +591 -0
- package/src/runtime/domain/background-service/shared-sandbox-diagnostics.ts +491 -0
- package/src/runtime/domain/background-service/shared-ssh-core/index.domain.mjs +698 -0
- package/src/runtime/domain/background-service/shared-ssh-core/index.ts +979 -0
- package/src/runtime/domain/background-service/shared-stall-detector.domain.mjs +37 -0
- package/src/runtime/domain/background-service/shared-stall-detector.ts +69 -0
- package/src/runtime/domain/background-service/shared-work-client.mjs +303 -0
- package/src/runtime/domain/background-service/stall-attention.domain.mjs +29 -0
- package/src/runtime/domain/background-service/stall-attention.ts +31 -0
- package/src/runtime/domain/background-service/stall.domain.mjs +57 -0
- package/src/runtime/domain/background-service/stall.ts +57 -0
- package/src/runtime/domain/background-service/supervisor/README.md +111 -0
- package/src/runtime/domain/background-service/supervisor/emit-runner.mjs +90 -0
- package/src/runtime/domain/background-service/supervisor/generated/conditions.mjs +96 -0
- package/src/runtime/domain/background-service/supervisor/generated/identity.mjs +95 -0
- package/src/runtime/domain/background-service/supervisor/generated/process-identity.mjs +131 -0
- package/src/runtime/domain/background-service/supervisor/generated/process.mjs +514 -0
- package/src/runtime/domain/background-service/supervisor/generated/runner.mjs +872 -0
- package/src/runtime/domain/background-service/supervisor/generated/store.mjs +609 -0
- package/src/runtime/domain/background-service/supervisor/generated/types.mjs +50 -0
- package/src/runtime/domain/background-service/supervisor/identity.domain.mjs +93 -0
- package/src/runtime/domain/background-service/supervisor/identity.ts +99 -0
- package/src/runtime/domain/background-service/supervisor/index.domain.mjs +22 -0
- package/src/runtime/domain/background-service/supervisor/index.ts +37 -0
- package/src/runtime/domain/background-service/supervisor/invocation.domain.mjs +30 -0
- package/src/runtime/domain/background-service/supervisor/invocation.ts +44 -0
- package/src/runtime/domain/background-service/supervisor/runner.domain.mjs +870 -0
- package/src/runtime/domain/background-service/supervisor/runner.ts +982 -0
- package/src/runtime/domain/background-service/supervisor/store.domain.mjs +605 -0
- package/src/runtime/domain/background-service/supervisor/store.ts +651 -0
- package/src/runtime/domain/background-service/supervisor/supervisor.domain.mjs +721 -0
- package/src/runtime/domain/background-service/supervisor/supervisor.ts +804 -0
- package/src/runtime/domain/background-service/supervisor/types.domain.mjs +48 -0
- package/src/runtime/domain/background-service/supervisor/types.ts +394 -0
- package/src/runtime/domain/background-service/task-diagnostics.domain.mjs +60 -0
- package/src/runtime/domain/background-service/task-diagnostics.ts +71 -0
- package/src/runtime/domain/background-service/tools.domain.mjs +1050 -0
- package/src/runtime/domain/background-service/tools.ts +1142 -0
- package/src/runtime/domain/background-service/types.domain.mjs +5 -0
- package/src/runtime/domain/background-service/types.ts +236 -0
- package/src/runtime/domain/background-service/work-observation.domain.mjs +176 -0
- package/src/runtime/domain/background-service/work-observation.ts +144 -0
- package/src/runtime/domain/catalog/catalog-store.d.mts +9 -1
- package/src/runtime/domain/catalog/catalog-store.mjs +20 -22
- package/src/runtime/domain/coordinator/src/assignment-changes.mjs +75 -0
- package/src/runtime/domain/coordinator/src/assignment-outcomes.mjs +2 -0
- package/src/runtime/domain/coordinator/src/background-parent-callbacks.mjs +65 -0
- package/src/runtime/domain/coordinator/src/background-requests.mjs +86 -0
- package/src/runtime/domain/coordinator/src/discovery.mjs +4 -2
- package/src/runtime/domain/coordinator/src/operations.mjs +44 -4
- package/src/runtime/domain/coordinator/src/result-supervision.mjs +12 -0
- package/src/runtime/domain/coordinator/src/rows.mjs +2 -0
- package/src/runtime/domain/coordinator/src/schema.mjs +73 -21
- package/src/runtime/domain/coordinator/src/store.mjs +32 -3
- package/src/runtime/domain/coordinator/src/subagent-launch.mjs +119 -0
- package/src/runtime/domain/coordinator/src/types.mjs +1 -1
- package/src/runtime/domain/coordinator/src/upgrade.mjs +22 -0
- package/src/runtime/domain/health-observation.d.mts +3 -1
- package/src/runtime/domain/health-observation.mjs +189 -190
- package/src/runtime/domain/log-cursor.d.mts +2 -0
- package/src/runtime/domain/log-cursor.mjs +85 -16
- package/src/runtime/domain/parse.d.mts +4 -1
- package/src/runtime/domain/parse.mjs +50 -5
- package/src/runtime/domain/sandbox-policy/README.md +633 -0
- package/src/runtime/domain/sandbox-policy/background-admission.domain.mjs +83 -0
- package/src/runtime/domain/sandbox-policy/background-admission.ts +75 -0
- package/src/runtime/domain/sandbox-policy/commands.domain.mjs +245 -0
- package/src/runtime/domain/sandbox-policy/commands.ts +336 -0
- package/src/runtime/domain/sandbox-policy/deny-rules.domain.mjs +440 -0
- package/src/runtime/domain/sandbox-policy/deny-rules.ts +620 -0
- package/src/runtime/domain/sandbox-policy/diagnostics-command.domain.mjs +30 -0
- package/src/runtime/domain/sandbox-policy/diagnostics-command.ts +27 -0
- package/src/runtime/domain/sandbox-policy/events.domain.mjs +49 -0
- package/src/runtime/domain/sandbox-policy/events.ts +85 -0
- package/src/runtime/domain/sandbox-policy/files.domain.mjs +153 -0
- package/src/runtime/domain/sandbox-policy/files.ts +224 -0
- package/src/runtime/domain/sandbox-policy/index.domain.mjs +289 -0
- package/src/runtime/domain/sandbox-policy/index.ts +386 -0
- package/src/runtime/domain/sandbox-policy/package.json +66 -0
- package/src/runtime/domain/sandbox-policy/permission-settings.domain.mjs +36 -0
- package/src/runtime/domain/sandbox-policy/permission-settings.ts +46 -0
- package/src/runtime/domain/sandbox-policy/permissions-page.domain.mjs +309 -0
- package/src/runtime/domain/sandbox-policy/permissions-page.ts +295 -0
- package/src/runtime/domain/sandbox-policy/permissions.domain.mjs +98 -0
- package/src/runtime/domain/sandbox-policy/permissions.ts +125 -0
- package/src/runtime/domain/sandbox-policy/policy.domain.mjs +80 -0
- package/src/runtime/domain/sandbox-policy/policy.ts +102 -0
- package/src/runtime/domain/sandbox-policy/preferences.domain.mjs +55 -0
- package/src/runtime/domain/sandbox-policy/preferences.ts +82 -0
- package/src/runtime/domain/sandbox-policy/rules-page.domain.mjs +138 -0
- package/src/runtime/domain/sandbox-policy/rules-page.ts +176 -0
- package/src/runtime/domain/sandbox-policy/session-permissions.domain.mjs +22 -0
- package/src/runtime/domain/sandbox-policy/session-permissions.ts +24 -0
- package/src/runtime/domain/sandbox-policy/shared-harness-settings.domain.mjs +126 -0
- package/src/runtime/domain/sandbox-policy/shared-harness-settings.ts +116 -0
- package/src/runtime/domain/sandbox-policy/shared-permission-blocker.domain.mjs +40 -0
- package/src/runtime/domain/sandbox-policy/shared-permission-blocker.ts +48 -0
- package/src/runtime/domain/sandbox-policy/shared-sandbox-core.domain.mjs +1531 -0
- package/src/runtime/domain/sandbox-policy/shared-sandbox-core.ts +1757 -0
- package/src/runtime/domain/sandbox-policy/shared-sandbox-diagnostics.domain.mjs +591 -0
- package/src/runtime/domain/sandbox-policy/shared-sandbox-diagnostics.ts +491 -0
- package/src/runtime/domain/sandbox-policy/shared-task-application.domain.mjs +185 -0
- package/src/runtime/domain/sandbox-policy/shared-task-application.ts +185 -0
- package/src/runtime/domain/sandbox-policy/shared-task-apply-patch.domain.mjs +416 -0
- package/src/runtime/domain/sandbox-policy/shared-task-apply-patch.ts +409 -0
- package/src/runtime/domain/sandbox-policy/shared-task-exec.domain.mjs +325 -0
- package/src/runtime/domain/sandbox-policy/shared-task-exec.ts +335 -0
- package/src/runtime/domain/sandbox-policy/shared-task-files.domain.mjs +346 -0
- package/src/runtime/domain/sandbox-policy/shared-task-files.ts +342 -0
- package/src/runtime/domain/sandbox-policy/shared-task-process-identity.domain.mjs +140 -0
- package/src/runtime/domain/sandbox-policy/shared-task-process-identity.ts +126 -0
- package/src/runtime/domain/sandbox-policy/shared-task-process-list.domain.mjs +220 -0
- package/src/runtime/domain/sandbox-policy/shared-task-process-list.ts +209 -0
- package/src/runtime/domain/sandbox-policy/shared-task-sandbox.domain.mjs +227 -0
- package/src/runtime/domain/sandbox-policy/shared-task-sandbox.ts +224 -0
- package/src/runtime/domain/sandbox-policy/shared-task-tools.domain.mjs +92 -0
- package/src/runtime/domain/sandbox-policy/shared-task-tools.ts +123 -0
- package/src/runtime/domain/sandbox-policy/shell.domain.mjs +93 -0
- package/src/runtime/domain/sandbox-policy/shell.ts +129 -0
- package/src/runtime/domain/sandbox-policy/state.domain.mjs +307 -0
- package/src/runtime/domain/sandbox-policy/state.ts +408 -0
- package/src/runtime/domain/sandbox-policy/status.domain.mjs +64 -0
- package/src/runtime/domain/sandbox-policy/status.ts +76 -0
- package/src/runtime/domain/sandbox-policy/subagent-admission.domain.mjs +69 -0
- package/src/runtime/domain/sandbox-policy/subagent-admission.ts +60 -0
- package/src/runtime/domain/subagents/CONTEXT.md +202 -0
- package/src/runtime/domain/subagents/PRODUCT.md +49 -0
- package/src/runtime/domain/subagents/README.md +201 -0
- package/src/runtime/domain/subagents/agent-catalog.mjs +64 -0
- package/src/runtime/domain/subagents/agent-commands.domain.mjs +822 -0
- package/src/runtime/domain/subagents/agent-commands.ts +905 -0
- package/src/runtime/domain/subagents/agent-inspection.domain.mjs +398 -0
- package/src/runtime/domain/subagents/agent-inspection.ts +574 -0
- package/src/runtime/domain/subagents/agent-operations.domain.mjs +40 -0
- package/src/runtime/domain/subagents/agent-operations.ts +61 -0
- package/src/runtime/domain/subagents/agent-session-settings.domain.mjs +112 -0
- package/src/runtime/domain/subagents/agent-session-settings.ts +118 -0
- package/src/runtime/domain/subagents/agents-catalog-tool.domain.mjs +84 -0
- package/src/runtime/domain/subagents/agents-catalog-tool.ts +118 -0
- package/src/runtime/domain/subagents/assignment-outcomes.domain.mjs +276 -0
- package/src/runtime/domain/subagents/assignment-outcomes.ts +212 -0
- package/src/runtime/domain/subagents/assignment-projection.mjs +261 -0
- package/src/runtime/domain/subagents/assignment-report.domain.mjs +174 -0
- package/src/runtime/domain/subagents/assignment-report.ts +156 -0
- package/src/runtime/domain/subagents/batch.mjs +275 -0
- package/src/runtime/domain/subagents/callback-fields.domain.mjs +72 -0
- package/src/runtime/domain/subagents/callback-fields.ts +95 -0
- package/src/runtime/domain/subagents/capacity.mjs +108 -0
- package/src/runtime/domain/subagents/catalog-editor.domain.mjs +98 -0
- package/src/runtime/domain/subagents/catalog-editor.ts +125 -0
- package/src/runtime/domain/subagents/catalog-host-admission.domain.mjs +104 -0
- package/src/runtime/domain/subagents/catalog-host-admission.ts +85 -0
- package/src/runtime/domain/subagents/catalog-identity.domain.mjs +222 -0
- package/src/runtime/domain/subagents/catalog-identity.ts +258 -0
- package/src/runtime/domain/subagents/catalog-overlay.domain.mjs +9 -0
- package/src/runtime/domain/subagents/catalog-overlay.ts +10 -0
- package/src/runtime/domain/subagents/catalog-preferences.domain.mjs +164 -0
- package/src/runtime/domain/subagents/catalog-preferences.ts +139 -0
- package/src/runtime/domain/subagents/catalog-resolver.domain.mjs +366 -0
- package/src/runtime/domain/subagents/catalog-resolver.ts +540 -0
- package/src/runtime/domain/subagents/catalog-runtime.domain.mjs +570 -0
- package/src/runtime/domain/subagents/catalog-runtime.ts +680 -0
- package/src/runtime/domain/subagents/catalog-schema.domain.mjs +1331 -0
- package/src/runtime/domain/subagents/catalog-schema.ts +1563 -0
- package/src/runtime/domain/subagents/catalog-skill-edits.domain.mjs +95 -0
- package/src/runtime/domain/subagents/catalog-skill-edits.ts +116 -0
- package/src/runtime/domain/subagents/catalog-store.domain.mjs +808 -0
- package/src/runtime/domain/subagents/catalog-store.ts +1006 -0
- package/src/runtime/domain/subagents/catalog-ui.domain.mjs +651 -0
- package/src/runtime/domain/subagents/catalog-ui.ts +611 -0
- package/src/runtime/domain/subagents/child-apply-patch.domain.mjs +13 -0
- package/src/runtime/domain/subagents/child-apply-patch.ts +13 -0
- package/src/runtime/domain/subagents/child-codemode.domain.mjs +16 -0
- package/src/runtime/domain/subagents/child-codemode.ts +17 -0
- package/src/runtime/domain/subagents/child-dependencies.mjs +193 -0
- package/src/runtime/domain/subagents/child-incidents.domain.mjs +170 -0
- package/src/runtime/domain/subagents/child-incidents.ts +169 -0
- package/src/runtime/domain/subagents/child-operations.domain.mjs +986 -0
- package/src/runtime/domain/subagents/child-operations.ts +1191 -0
- package/src/runtime/domain/subagents/child-ownership.domain.mjs +205 -0
- package/src/runtime/domain/subagents/child-ownership.ts +160 -0
- package/src/runtime/domain/subagents/child-preflight.mjs +38 -0
- package/src/runtime/domain/subagents/child-process-list.domain.mjs +7 -0
- package/src/runtime/domain/subagents/child-process-list.ts +8 -0
- package/src/runtime/domain/subagents/child-runtime.mjs +67 -0
- package/src/runtime/domain/subagents/child-steer.domain.mjs +109 -0
- package/src/runtime/domain/subagents/child-steer.ts +102 -0
- package/src/runtime/domain/subagents/cleanup.domain.mjs +818 -0
- package/src/runtime/domain/subagents/cleanup.ts +1017 -0
- package/src/runtime/domain/subagents/codex-import.domain.mjs +575 -0
- package/src/runtime/domain/subagents/codex-import.ts +717 -0
- package/src/runtime/domain/subagents/completion.domain.mjs +6 -0
- package/src/runtime/domain/subagents/completion.mjs +152 -0
- package/src/runtime/domain/subagents/completion.ts +11 -0
- package/src/runtime/domain/subagents/config.domain.mjs +248 -0
- package/src/runtime/domain/subagents/config.json +15 -0
- package/src/runtime/domain/subagents/config.ts +328 -0
- package/src/runtime/domain/subagents/continuation-authority.domain.mjs +38 -0
- package/src/runtime/domain/subagents/continuation-authority.ts +31 -0
- package/src/runtime/domain/subagents/continuation-runtime.domain.mjs +89 -0
- package/src/runtime/domain/subagents/continuation-runtime.ts +88 -0
- package/src/runtime/domain/subagents/continuation.domain.mjs +942 -0
- package/src/runtime/domain/subagents/continuation.ts +1051 -0
- package/src/runtime/domain/subagents/delegation.domain.mjs +19 -0
- package/src/runtime/domain/subagents/delegation.ts +24 -0
- package/src/runtime/domain/subagents/effective-settings.domain.mjs +130 -0
- package/src/runtime/domain/subagents/effective-settings.ts +184 -0
- package/src/runtime/domain/subagents/extensions.domain.mjs +6 -0
- package/src/runtime/domain/subagents/extensions.mjs +164 -0
- package/src/runtime/domain/subagents/extensions.ts +19 -0
- package/src/runtime/domain/subagents/failures.domain.mjs +362 -0
- package/src/runtime/domain/subagents/failures.ts +319 -0
- package/src/runtime/domain/subagents/finalization.domain.mjs +168 -0
- package/src/runtime/domain/subagents/finalization.ts +218 -0
- package/src/runtime/domain/subagents/git-remotes.domain.mjs +351 -0
- package/src/runtime/domain/subagents/git-remotes.ts +413 -0
- package/src/runtime/domain/subagents/git-workspace.domain.mjs +337 -0
- package/src/runtime/domain/subagents/git-workspace.ts +430 -0
- package/src/runtime/domain/subagents/goal-provider.domain.mjs +125 -0
- package/src/runtime/domain/subagents/goal-provider.ts +132 -0
- package/src/runtime/domain/subagents/health-observation.domain.mjs +617 -0
- package/src/runtime/domain/subagents/health-observation.ts +818 -0
- package/src/runtime/domain/subagents/health-surface.mjs +284 -0
- package/src/runtime/domain/subagents/health.domain.mjs +261 -0
- package/src/runtime/domain/subagents/health.ts +343 -0
- package/src/runtime/domain/subagents/historical-attention.domain.mjs +37 -0
- package/src/runtime/domain/subagents/historical-attention.ts +35 -0
- package/src/runtime/domain/subagents/incident-model.domain.mjs +322 -0
- package/src/runtime/domain/subagents/incident-model.ts +358 -0
- package/src/runtime/domain/subagents/index.domain.mjs +4731 -0
- package/src/runtime/domain/subagents/index.ts +4781 -0
- package/src/runtime/domain/subagents/launch-abort.domain.mjs +13 -0
- package/src/runtime/domain/subagents/launch-abort.ts +21 -0
- package/src/runtime/domain/subagents/launch-context.domain.mjs +24 -0
- package/src/runtime/domain/subagents/launch-context.ts +23 -0
- package/src/runtime/domain/subagents/launch-digest.mjs +6 -0
- package/src/runtime/domain/subagents/lifecycle.domain.mjs +265 -0
- package/src/runtime/domain/subagents/lifecycle.ts +360 -0
- package/src/runtime/domain/subagents/list.domain.mjs +2 -0
- package/src/runtime/domain/subagents/list.mjs +152 -0
- package/src/runtime/domain/subagents/list.ts +19 -0
- package/src/runtime/domain/subagents/log-cursor.domain.mjs +217 -0
- package/src/runtime/domain/subagents/log-cursor.ts +268 -0
- package/src/runtime/domain/subagents/managed-background-capability.domain.mjs +10 -0
- package/src/runtime/domain/subagents/managed-background-capability.ts +9 -0
- package/src/runtime/domain/subagents/managed-failure-worker.mjs +36 -0
- package/src/runtime/domain/subagents/managed-launch-bootstrap.mjs +48 -0
- package/src/runtime/domain/subagents/managed-launch-client.domain.mjs +75 -0
- package/src/runtime/domain/subagents/managed-launch-client.ts +59 -0
- package/src/runtime/domain/subagents/managed-launch-host.domain.mjs +627 -0
- package/src/runtime/domain/subagents/managed-launch-host.ts +504 -0
- package/src/runtime/domain/subagents/managed-launch-journal.mjs +17 -0
- package/src/runtime/domain/subagents/managed-launch-ownership.domain.mjs +29 -0
- package/src/runtime/domain/subagents/managed-launch-ownership.ts +22 -0
- package/src/runtime/domain/subagents/managed-launch-port.domain.mjs +2 -0
- package/src/runtime/domain/subagents/managed-launch-port.ts +25 -0
- package/src/runtime/domain/subagents/managed-launch-recovery.domain.mjs +29 -0
- package/src/runtime/domain/subagents/managed-launch-recovery.ts +45 -0
- package/src/runtime/domain/subagents/managed-worker-bridge.domain.mjs +63 -0
- package/src/runtime/domain/subagents/managed-worker-bridge.ts +48 -0
- package/src/runtime/domain/subagents/managed-worker.mjs +13 -0
- package/src/runtime/domain/subagents/model-resolution-core.domain.mjs +822 -0
- package/src/runtime/domain/subagents/model-resolution-core.ts +1074 -0
- package/src/runtime/domain/subagents/model-resolution.domain.mjs +22 -0
- package/src/runtime/domain/subagents/model-resolution.ts +32 -0
- package/src/runtime/domain/subagents/navigator.domain.mjs +6 -0
- package/src/runtime/domain/subagents/navigator.mjs +1233 -0
- package/src/runtime/domain/subagents/navigator.ts +39 -0
- package/src/runtime/domain/subagents/operation-bridge-types.domain.mjs +1012 -0
- package/src/runtime/domain/subagents/operation-bridge-types.ts +1156 -0
- package/src/runtime/domain/subagents/outage-observations.domain.mjs +84 -0
- package/src/runtime/domain/subagents/outage-observations.ts +73 -0
- package/src/runtime/domain/subagents/output-payload.domain.mjs +767 -0
- package/src/runtime/domain/subagents/output-payload.ts +987 -0
- package/src/runtime/domain/subagents/owned-exit.domain.mjs +12 -0
- package/src/runtime/domain/subagents/owned-exit.ts +12 -0
- package/src/runtime/domain/subagents/package.json +86 -0
- package/src/runtime/domain/subagents/park-checkpoint.domain.mjs +55 -0
- package/src/runtime/domain/subagents/park-checkpoint.ts +61 -0
- package/src/runtime/domain/subagents/parse.domain.mjs +1218 -0
- package/src/runtime/domain/subagents/parse.ts +1451 -0
- package/src/runtime/domain/subagents/permission-policy.domain.mjs +232 -0
- package/src/runtime/domain/subagents/permission-policy.ts +291 -0
- package/src/runtime/domain/subagents/process-identity.mjs +33 -0
- package/src/runtime/domain/subagents/registry.domain.mjs +1584 -0
- package/src/runtime/domain/subagents/registry.ts +1904 -0
- package/src/runtime/domain/subagents/role-assignment.domain.mjs +104 -0
- package/src/runtime/domain/subagents/role-assignment.ts +141 -0
- package/src/runtime/domain/subagents/roles/role.architect.md +13 -0
- package/src/runtime/domain/subagents/roles/role.developer.md +16 -0
- package/src/runtime/domain/subagents/roles/role.explorer.md +13 -0
- package/src/runtime/domain/subagents/roles/role.product-manager.md +13 -0
- package/src/runtime/domain/subagents/roles/role.researcher.md +13 -0
- package/src/runtime/domain/subagents/roles/role.reviewer.md +13 -0
- package/src/runtime/domain/subagents/roles/role.writer.md +12 -0
- package/src/runtime/domain/subagents/sandbox.domain.mjs +64 -0
- package/src/runtime/domain/subagents/sandbox.ts +92 -0
- package/src/runtime/domain/subagents/session-selection.domain.mjs +32 -0
- package/src/runtime/domain/subagents/session-selection.ts +35 -0
- package/src/runtime/domain/subagents/session-store.domain.mjs +489 -0
- package/src/runtime/domain/subagents/session-store.ts +468 -0
- package/src/runtime/domain/subagents/settings-page.domain.mjs +313 -0
- package/src/runtime/domain/subagents/settings-page.ts +363 -0
- package/src/runtime/domain/subagents/shared-callback-batcher.domain.mjs +777 -0
- package/src/runtime/domain/subagents/shared-callback-batcher.ts +956 -0
- package/src/runtime/domain/subagents/shared-catalog.domain.mjs +70 -0
- package/src/runtime/domain/subagents/shared-catalog.ts +61 -0
- package/src/runtime/domain/subagents/shared-execution-policy.domain.mjs +50 -0
- package/src/runtime/domain/subagents/shared-execution-policy.ts +61 -0
- package/src/runtime/domain/subagents/shared-failure-observations.domain.mjs +1078 -0
- package/src/runtime/domain/subagents/shared-failure-observations.ts +1166 -0
- package/src/runtime/domain/subagents/shared-harness-settings.domain.mjs +126 -0
- package/src/runtime/domain/subagents/shared-harness-settings.ts +116 -0
- package/src/runtime/domain/subagents/shared-log-utils.domain.mjs +1223 -0
- package/src/runtime/domain/subagents/shared-log-utils.ts +1492 -0
- package/src/runtime/domain/subagents/shared-navigator-panels.domain.mjs +289 -0
- package/src/runtime/domain/subagents/shared-navigator-panels.ts +272 -0
- package/src/runtime/domain/subagents/shared-navigator.domain.mjs +1930 -0
- package/src/runtime/domain/subagents/shared-navigator.ts +1962 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/assignment-inbox.mjs +144 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/assignment-observation.mjs +189 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/index.domain.mjs +51 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/index.ts +122 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/assignment-changes.domain.mjs +75 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/assignment-changes.ts +73 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/assignment-outcomes.domain.mjs +163 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/assignment-outcomes.ts +174 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/background-parent-callbacks.domain.mjs +66 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/background-parent-callbacks.ts +68 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/background-requests.domain.mjs +87 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/background-requests.ts +90 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/discovery.domain.mjs +97 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/discovery.ts +139 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/errors.domain.mjs +12 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/errors.ts +79 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/operations.domain.mjs +342 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/operations.ts +513 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/outbox.domain.mjs +283 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/outbox.ts +458 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/recovery.domain.mjs +52 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/recovery.ts +55 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/result-supervision.domain.mjs +114 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/result-supervision.ts +140 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/rows.domain.mjs +280 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/rows.ts +442 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/schema.domain.mjs +420 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/schema.ts +441 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/sqlite.domain.mjs +194 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/sqlite.ts +239 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/store.domain.mjs +275 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/store.ts +585 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/subagent-launch.domain.mjs +120 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/subagent-launch.ts +142 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/task-cancellation.domain.mjs +188 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/task-cancellation.ts +224 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/types.domain.mjs +25 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/types.ts +707 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/upgrade.domain.mjs +22 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/upgrade.ts +22 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/validate.domain.mjs +234 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/validate.ts +241 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/waits.domain.mjs +851 -0
- package/src/runtime/domain/subagents/shared-operation-coordinator/src/waits.ts +1424 -0
- package/src/runtime/domain/subagents/shared-permission-blocker.domain.mjs +40 -0
- package/src/runtime/domain/subagents/shared-permission-blocker.ts +48 -0
- package/src/runtime/domain/subagents/shared-render-scheduler.domain.mjs +41 -0
- package/src/runtime/domain/subagents/shared-render-scheduler.ts +47 -0
- package/src/runtime/domain/subagents/shared-sandbox-core.domain.mjs +1531 -0
- package/src/runtime/domain/subagents/shared-sandbox-core.ts +1757 -0
- package/src/runtime/domain/subagents/shared-sandbox-diagnostics.domain.mjs +591 -0
- package/src/runtime/domain/subagents/shared-sandbox-diagnostics.ts +491 -0
- package/src/runtime/domain/subagents/shared-stall-detector.domain.mjs +37 -0
- package/src/runtime/domain/subagents/shared-stall-detector.ts +69 -0
- package/src/runtime/domain/subagents/shared-task-application.domain.mjs +185 -0
- package/src/runtime/domain/subagents/shared-task-application.ts +185 -0
- package/src/runtime/domain/subagents/shared-task-apply-patch.domain.mjs +416 -0
- package/src/runtime/domain/subagents/shared-task-apply-patch.ts +409 -0
- package/src/runtime/domain/subagents/shared-task-exec.domain.mjs +325 -0
- package/src/runtime/domain/subagents/shared-task-exec.ts +335 -0
- package/src/runtime/domain/subagents/shared-task-files.domain.mjs +346 -0
- package/src/runtime/domain/subagents/shared-task-files.ts +342 -0
- package/src/runtime/domain/subagents/shared-task-process-identity.domain.mjs +140 -0
- package/src/runtime/domain/subagents/shared-task-process-identity.ts +126 -0
- package/src/runtime/domain/subagents/shared-task-process-list.domain.mjs +220 -0
- package/src/runtime/domain/subagents/shared-task-process-list.ts +209 -0
- package/src/runtime/domain/subagents/shared-task-sandbox.domain.mjs +227 -0
- package/src/runtime/domain/subagents/shared-task-sandbox.ts +224 -0
- package/src/runtime/domain/subagents/shared-task-tools.domain.mjs +92 -0
- package/src/runtime/domain/subagents/shared-task-tools.ts +123 -0
- package/src/runtime/domain/subagents/shared-work-client.mjs +303 -0
- package/src/runtime/domain/subagents/shared-worktree-context.domain.mjs +142 -0
- package/src/runtime/domain/subagents/shared-worktree-context.ts +158 -0
- package/src/runtime/domain/subagents/skill-picker.domain.mjs +316 -0
- package/src/runtime/domain/subagents/skill-picker.ts +353 -0
- package/src/runtime/domain/subagents/skills.domain.mjs +138 -0
- package/src/runtime/domain/subagents/skills.ts +183 -0
- package/src/runtime/domain/subagents/spawn.domain.mjs +72 -0
- package/src/runtime/domain/subagents/spawn.ts +80 -0
- package/src/runtime/domain/subagents/stop.domain.mjs +184 -0
- package/src/runtime/domain/subagents/stop.ts +217 -0
- package/src/runtime/domain/subagents/subagent-tools.domain.mjs +101 -0
- package/src/runtime/domain/subagents/subagent-tools.ts +137 -0
- package/src/runtime/domain/subagents/task-guard.domain.mjs +163 -0
- package/src/runtime/domain/subagents/task-guard.ts +144 -0
- package/src/runtime/domain/subagents/task-policy.domain.mjs +201 -0
- package/src/runtime/domain/subagents/task-policy.ts +236 -0
- package/src/runtime/domain/subagents/task-runtime.mjs +53 -0
- package/src/runtime/domain/subagents/task-tool-owner.domain.mjs +18 -0
- package/src/runtime/domain/subagents/task-tool-owner.ts +21 -0
- package/src/runtime/domain/subagents/thinking.domain.mjs +22 -0
- package/src/runtime/domain/subagents/thinking.ts +28 -0
- package/src/runtime/domain/subagents/tier-policy.domain.mjs +75 -0
- package/src/runtime/domain/subagents/tier-policy.ts +126 -0
- package/src/runtime/domain/subagents/timing-notifications.domain.mjs +51 -0
- package/src/runtime/domain/subagents/timing-notifications.ts +37 -0
- package/src/runtime/domain/subagents/timing.domain.mjs +487 -0
- package/src/runtime/domain/subagents/timing.ts +634 -0
- package/src/runtime/domain/subagents/tools.domain.mjs +558 -0
- package/src/runtime/domain/subagents/tools.ts +629 -0
- package/src/runtime/domain/subagents/widget.domain.mjs +6 -0
- package/src/runtime/domain/subagents/widget.mjs +246 -0
- package/src/runtime/domain/subagents/widget.ts +30 -0
- package/src/runtime/domain/subagents/work-observation.domain.mjs +316 -0
- package/src/runtime/domain/subagents/work-observation.ts +248 -0
- package/src/runtime/domain/subagents/worker-catalog.domain.mjs +120 -0
- package/src/runtime/domain/subagents/worker-catalog.ts +162 -0
- package/src/runtime/domain/subagents/worker-operations-host.domain.mjs +1009 -0
- package/src/runtime/domain/subagents/worker-operations-host.ts +1238 -0
- package/src/runtime/domain/subagents/worker-waits.domain.mjs +2336 -0
- package/src/runtime/domain/subagents/worker-waits.ts +2878 -0
- package/src/runtime/domain/subagents/workspace-scope.domain.mjs +52 -0
- package/src/runtime/domain/subagents/workspace-scope.ts +50 -0
- package/src/runtime/health-config.ts +27 -11
- package/src/runtime/log-checkpoints.ts +117 -0
- package/src/runtime/mutation-store.ts +5 -4
- package/src/runtime/queries.ts +27 -3
- package/src/runtime/query-executor.ts +178 -34
- package/src/runtime/query-worker.mjs +119 -22
- package/src/runtime/read-model.ts +939 -113
- package/src/runtime/read-watchdog-probe.ts +4 -0
- package/src/runtime/result-supervision.ts +188 -16
- package/src/runtime/source-watch.ts +175 -0
- package/src/runtime/subagent-launch.ts +73 -0
- package/src/runtime/work-budget.ts +130 -0
- package/src/runtime/work-client.d.mts +8 -0
- package/src/runtime/work-client.mjs +150 -7
- package/src/server.ts +185 -22
- package/src/session-activity.ts +26 -4
- package/src/version.ts +1 -1
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# Context
|
|
2
|
+
|
|
3
|
+
## Delegated Assignment Authority
|
|
4
|
+
|
|
5
|
+
An automatically resumed assignment keeps its captured parent recipient, saved
|
|
6
|
+
conversation, scope and permissions. Parent Goal pause/completion/clearing or
|
|
7
|
+
replacement and parent session/branch inactivity do not gate worker execution.
|
|
8
|
+
The active runtime is a compatible supervisor, not a replacement recipient.
|
|
9
|
+
Observed-waits service v2 advertises `assignmentContinuation: 1`; unsupported
|
|
10
|
+
hosts refuse continuation explicitly. Storage remains compatible: pending records
|
|
11
|
+
with captured policy migrate without changing it, and missing policy is refused.
|
|
12
|
+
Current mandatory authority, cancellation, writer/launch fences and capacity still
|
|
13
|
+
apply. No compatible host means queued work, with no reserved idle capacity.
|
|
14
|
+
|
|
15
|
+
The real SDK replay uses `WORKER_SDK_ONLY=1` with
|
|
16
|
+
`tests/worker-waits-kernel.test.mjs`. The default lane additionally proves kernel
|
|
17
|
+
denials; `PI_WORKER_KERNEL_REQUIRE=1` makes unsupported kernel execution fail.
|
|
18
|
+
|
|
19
|
+
## Bounded Assignment Repair
|
|
20
|
+
|
|
21
|
+
Coordinator outages retain version-1 reports in the existing durable conversation
|
|
22
|
+
root (`observations-v1`). They preserve the published claim, original checkpoint,
|
|
23
|
+
assignment binding and last observed coordinator evidence. Reports are not wait
|
|
24
|
+
authority. Compatible service hosts advertise `outageReconciliation: 1`; replay
|
|
25
|
+
reads current generations and uses ordinary fenced repair and saved-conversation
|
|
26
|
+
admission. Exact cancellation/consumption wins over stale reports. A report receipt
|
|
27
|
+
releases neither evidence pins nor writer fences. Conversation storage refusal
|
|
28
|
+
reports degraded supervision and refuses new park checkpoints. Legacy hosts cannot
|
|
29
|
+
claim outage replay support. No Harness or Goal installation is required.
|
|
30
|
+
|
|
31
|
+
Coordinator storage v4 owns one repair allowance per assignment/wait generation
|
|
32
|
+
and structured unacknowledged-exit fault. The key includes the original park
|
|
33
|
+
checkpoint and exact dependency revisions, never attempt IDs, timestamps or prose.
|
|
34
|
+
`repairFailedResume` fences the exact publication and persists accounting before
|
|
35
|
+
returning `ready`; a repeated notification is idempotent. A new published attempt
|
|
36
|
+
that repeats the fault commits the ordinary retained #710 failure and parent
|
|
37
|
+
event. Background exposes `repairFailedResumeForWorker` with ownership checks.
|
|
38
|
+
Subagents verifies native checkpoint bytes and writer/lease exit before calling
|
|
39
|
+
it, then reuses ordinary continuation admission and capacity. Missing capability,
|
|
40
|
+
history, authority or an expired assignment deadline fails closed; uncertain
|
|
41
|
+
writer fences remain. No command is rerun and no parent Goal gate is added.
|
|
42
|
+
The SDK fixture also covers failed-test interpretation and real unacknowledged
|
|
43
|
+
exits followed by repair success or recurring-fault failure.
|
|
44
|
+
|
|
45
|
+
## Glossary
|
|
46
|
+
|
|
47
|
+
### Role
|
|
48
|
+
|
|
49
|
+
A reusable specialist template describing a kind of work and its default
|
|
50
|
+
instructions, model, and reasoning effort. A role can be selected directly for a
|
|
51
|
+
task or serve as the base of a named agent.
|
|
52
|
+
|
|
53
|
+
### Base Role
|
|
54
|
+
|
|
55
|
+
The single role from which a named agent inherits defaults. This inheritance
|
|
56
|
+
relationship is distinct from Agentier's executable-role memberships, which
|
|
57
|
+
describe eligibility for work.
|
|
58
|
+
|
|
59
|
+
### Named Agent
|
|
60
|
+
|
|
61
|
+
A reusable specialist with a stable identity, one base role, and agent-specific
|
|
62
|
+
customizations. Its identity is distinct from its display name and from any
|
|
63
|
+
individual execution.
|
|
64
|
+
|
|
65
|
+
### Role Inheritance
|
|
66
|
+
|
|
67
|
+
The continuing relationship through which an agent receives its base role's
|
|
68
|
+
current defaults for settings it has not explicitly overridden.
|
|
69
|
+
|
|
70
|
+
### Instruction Mode
|
|
71
|
+
|
|
72
|
+
An agent's choice to add its instructions to the base role's instructions or
|
|
73
|
+
replace that instruction text. Replacement does not sever inheritance of other
|
|
74
|
+
defaults.
|
|
75
|
+
|
|
76
|
+
### Agent Override
|
|
77
|
+
|
|
78
|
+
A setting deliberately supplied on a named agent instead of inherited from its
|
|
79
|
+
base role. Removing an override restores inheritance for that setting.
|
|
80
|
+
|
|
81
|
+
### Run
|
|
82
|
+
|
|
83
|
+
One execution of a task, with its own identity and the effective configuration
|
|
84
|
+
selected when it started. Repeated executions of the same named agent are separate
|
|
85
|
+
runs.
|
|
86
|
+
|
|
87
|
+
### Attempt
|
|
88
|
+
|
|
89
|
+
A run's identity as one detached execution. A continuation allocates a new
|
|
90
|
+
attempt (new run id, log, result, callback markers, timing record, and capacity
|
|
91
|
+
slot) while keeping the conversation it continues. Attempt identity and
|
|
92
|
+
conversation identity are separate throughout the registry and cleanup.
|
|
93
|
+
|
|
94
|
+
### Conversation
|
|
95
|
+
|
|
96
|
+
The native Pi session a run's child process writes. A fresh launch uses the
|
|
97
|
+
attempt id as its conversation id. A continuation keeps the prior conversation
|
|
98
|
+
id and its saved history, and records `resumedFrom` plus a stable `rootRunId`
|
|
99
|
+
lineage. The launch recipe captured at the first attempt (tools, exclusions,
|
|
100
|
+
clean/nesting and approval intent, confinement, effective model and effort,
|
|
101
|
+
workspace) describes how that conversation is reconstructed. New conversations
|
|
102
|
+
and their completed launch recipes are saved durably in the Pi agent directory,
|
|
103
|
+
independent of temporary event logs and the foreground session that launched them.
|
|
104
|
+
A later foreground session may continue the same conversation; the new attempt's
|
|
105
|
+
callback belongs to that caller. A stopped (`killed`) attempt is still a saved
|
|
106
|
+
conversation: the next attempt keeps the same history, records `resumedFrom`,
|
|
107
|
+
and leaves the stopped attempt's own record unchanged.
|
|
108
|
+
|
|
109
|
+
### Saved Conversation
|
|
110
|
+
|
|
111
|
+
A native Pi conversation and its completed launch recipe persisted for later
|
|
112
|
+
follow-up. Its session id stays the same across attempts. Spawn can select it
|
|
113
|
+
by session id or by an unambiguous name in the current folder, independently of
|
|
114
|
+
the foreground session that launched it. A saved conversation keeps no process
|
|
115
|
+
alive and occupies no concurrency slot.
|
|
116
|
+
|
|
117
|
+
### Skill Exposure
|
|
118
|
+
|
|
119
|
+
Which skills a child can see, chosen once per attempt. The three observable
|
|
120
|
+
states are discovery of the user-level catalog (an absent choice), none, and
|
|
121
|
+
exactly a list of skill paths. It is a launch value, not a permission: a list
|
|
122
|
+
narrows the prompt and grants nothing.
|
|
123
|
+
|
|
124
|
+
A launch option wins over the catalog definition's choice, which wins over the
|
|
125
|
+
current session's default, which wins over the saved global default; with none of
|
|
126
|
+
them the child discovers the catalog as before. `/subagents settings` edits the
|
|
127
|
+
session default immediately, and Ctrl+S saves it globally. The session choice
|
|
128
|
+
applies to the next launch even before it is saved. It saves discovery as
|
|
129
|
+
`null`, so choosing discovery overrides an older path list instead of reading as
|
|
130
|
+
"not set". Both Selected skills screens use one checkbox picker over the skills
|
|
131
|
+
Pi already loaded for the session; saved paths absent from discovery stay
|
|
132
|
+
visible as unavailable, and zero checked applies to No skill catalog rather
|
|
133
|
+
than becoming discovery or an empty explicit draft. The effective choice is
|
|
134
|
+
frozen in the launch recipe, so a later catalog or config edit cannot change a
|
|
135
|
+
saved conversation's exposure, and
|
|
136
|
+
a recipe written before the choice existed keeps discovery. Catalog inspection
|
|
137
|
+
reads the same live session-or-config default, so `/agents` and `agents_catalog`
|
|
138
|
+
name the source a launch would actually use; an invalid draft or saved value is
|
|
139
|
+
reported as an error instead of falling back to discovery.
|
|
140
|
+
|
|
141
|
+
Discovery and "none" are distinct: an absent choice means the child advertises
|
|
142
|
+
the user catalog, an empty list means it advertises nothing. A continuation
|
|
143
|
+
repeats the frozen choice, and refuses an explicit list that would differ from
|
|
144
|
+
it — including an empty list offered to a conversation launched with discovery.
|
|
145
|
+
|
|
146
|
+
### Run Alias
|
|
147
|
+
|
|
148
|
+
A user-supplied label for an individual run, rather than a reusable agent
|
|
149
|
+
identity.
|
|
150
|
+
|
|
151
|
+
### Catalog Snapshot
|
|
152
|
+
|
|
153
|
+
The set of role and agent definitions used to resolve a launch or a batch of
|
|
154
|
+
launches. A batch shares one snapshot even if the underlying definitions change.
|
|
155
|
+
|
|
156
|
+
### Related Work
|
|
157
|
+
|
|
158
|
+
Work launched for a subagent run that Pi can still credibly associate with that
|
|
159
|
+
run after direct supervision is interrupted.
|
|
160
|
+
|
|
161
|
+
For issue #63, related work is limited to live process-group evidence captured
|
|
162
|
+
from the spawned child. Descendants that daemonize, call `setsid`, leave the
|
|
163
|
+
captured process group/session, or become unobservable after reparenting are not
|
|
164
|
+
related work for this slice.
|
|
165
|
+
|
|
166
|
+
### Orphaned Run
|
|
167
|
+
|
|
168
|
+
A subagent run whose foreground Pi process can no longer directly supervise the
|
|
169
|
+
original child process, while credible evidence remains that related work may
|
|
170
|
+
still be alive.
|
|
171
|
+
|
|
172
|
+
An orphaned run is non-terminal and non-final. It does not promise useful
|
|
173
|
+
progress; it only means Pi should not yet treat the run as completed, failed, or
|
|
174
|
+
lost.
|
|
175
|
+
|
|
176
|
+
An orphaned run is operationally unhealthy as soon as it is observed. It is not
|
|
177
|
+
expected to become healthy again on its own; the appropriate user action is to
|
|
178
|
+
restart the work or stop the old unhealthy work.
|
|
179
|
+
|
|
180
|
+
### Restart
|
|
181
|
+
|
|
182
|
+
A user action that creates a new subagent run from the same task inputs as an
|
|
183
|
+
unhealthy run. Restart does not make the old run healthy and does not erase its
|
|
184
|
+
evidence.
|
|
185
|
+
|
|
186
|
+
### Stop
|
|
187
|
+
|
|
188
|
+
A user action that stops an unhealthy run's related work and closes it from
|
|
189
|
+
active tracking. Stop is separate from restart: restart creates replacement
|
|
190
|
+
work; stop ends the old unhealthy work.
|
|
191
|
+
|
|
192
|
+
Stop preserves run artifacts such as logs and metadata for investigation. It is
|
|
193
|
+
not deletion.
|
|
194
|
+
|
|
195
|
+
### Lost Run
|
|
196
|
+
|
|
197
|
+
A subagent run for which Pi has no credible process evidence for the launched
|
|
198
|
+
work and no normal completion record was captured.
|
|
199
|
+
|
|
200
|
+
A lost run is terminal with unknown outcome. It is not the same as a failed run:
|
|
201
|
+
failure means the subagent produced or exited with failure evidence, while lost
|
|
202
|
+
means supervision evidence ran out.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Product
|
|
2
|
+
|
|
3
|
+
<!-- impeccable:product-schema 1 -->
|
|
4
|
+
|
|
5
|
+
## Platform
|
|
6
|
+
|
|
7
|
+
terminal (Pi TUI extension; not a web or native mobile app)
|
|
8
|
+
|
|
9
|
+
## Users
|
|
10
|
+
|
|
11
|
+
Agent operators running Pi in a terminal. They delegate work to autonomous subagents, keep their foreground session moving, and need to monitor, inspect, and stop background runs without losing their place in the conversation.
|
|
12
|
+
|
|
13
|
+
## Product Purpose
|
|
14
|
+
|
|
15
|
+
pi-better-subagents makes subagent work autonomous, observable, and safe by default. Success means operators can see what is running, spot unhealthy states, inspect evidence, and take action without blocking the foreground session.
|
|
16
|
+
|
|
17
|
+
## Positioning
|
|
18
|
+
|
|
19
|
+
Detached subagent runs share a durable lifecycle with logs and results, while a reusable role and named-agent catalog resolves live inheritance into a launch snapshot. The catalog does not grant tools or permissions; those remain explicit spawn controls.
|
|
20
|
+
|
|
21
|
+
## Operating Context
|
|
22
|
+
|
|
23
|
+
Operators work inside Pi's terminal conversation. `/agents` discovers and inspects reusable definitions, then `subagent_spawn` or `subagent_spawn_batch` launches work. The shared background-work navigator surfaces live runs, detail, health, and stop or dismiss actions alongside other work providers. Print, JSON, and RPC callers also use the command and tool results without the TUI overlay.
|
|
24
|
+
|
|
25
|
+
## Capabilities and Constraints
|
|
26
|
+
|
|
27
|
+
- A named agent has one base role; its effective instructions combine role and agent text in add mode or use the agent text in replace mode. Model, effort, and tier can inherit or be overridden.
|
|
28
|
+
- Project, personal, and bundled definitions have explicit precedence. A fresh catalog read precedes launch; each batch uses one snapshot.
|
|
29
|
+
- Definition validity is not launchability. Model availability, unsupported restrictions, and sandbox or tool controls must be reported without implying permissions the catalog does not grant.
|
|
30
|
+
- The run navigator is shared with other background-work providers. Catalog UI must preserve headless results and avoid persistent transcript-sized widgets.
|
|
31
|
+
|
|
32
|
+
## Brand Commitments
|
|
33
|
+
|
|
34
|
+
Quiet, precise, operational language. The command surface must remain distinct from chat transcript content and respect the host terminal theme. Avoid ornamental terminal chrome or status conveyed only by color.
|
|
35
|
+
|
|
36
|
+
## Evidence on Hand
|
|
37
|
+
|
|
38
|
+
The implemented command and run surfaces, catalog schema and operations documentation, accepted catalog ADR, and test fixtures in this package are the source of product behavior. No customer claims, performance benchmarks, or external visual assets are supplied.
|
|
39
|
+
|
|
40
|
+
## Product Principles
|
|
41
|
+
|
|
42
|
+
1. Preserve foreground flow while background work remains inspectable and controllable.
|
|
43
|
+
2. Make identity, inheritance, launchability, and run health legible before deeper diagnostics.
|
|
44
|
+
3. Separate reusable agent definitions from individual run identity and evidence.
|
|
45
|
+
4. Keep actions explicit and consequential stop or replace paths confirmable.
|
|
46
|
+
|
|
47
|
+
## Accessibility & Inclusion
|
|
48
|
+
|
|
49
|
+
Use a high-contrast baseline. Selection and status must remain clear without relying on color alone. Keep wording concise, avoid motion-dependent feedback, and respect the host terminal theme where possible.
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# pi-better-subagents
|
|
2
|
+
|
|
3
|
+
`pi-better-subagents` is a Pi extension for detached, optionally sandboxed subagent runs that keep the foreground Pi session free.
|
|
4
|
+
|
|
5
|
+
## Quick Answer
|
|
6
|
+
|
|
7
|
+
Use `pi-better-subagents` when you want Pi to launch independent agent work without blocking the current conversation. Each subagent runs in its own `pi -p` child process, reports back when finished, and keeps durable logs for later inspection.
|
|
8
|
+
|
|
9
|
+
## Runtime Status
|
|
10
|
+
|
|
11
|
+
Run `pi-subagents-runtime-status` to ensure the manifest-pinned local server and
|
|
12
|
+
print its canonical agent root, build, Node version, instance and capabilities as JSON.
|
|
13
|
+
This command does not create a hosted Pi session or require Harness.
|
|
14
|
+
The first use installs a verified private Node 24 and locked server dependencies.
|
|
15
|
+
Set `PI_OFFLINE=1` to require the cached runtime without downloads.
|
|
16
|
+
`PI_CODING_AGENT_DIR` selects the agent root; `PI_SERVER_DIR` selects the initial
|
|
17
|
+
transport directory. Later calls for the same canonical root reuse the registered
|
|
18
|
+
transport, including calls from Background Tasks or another package installation.
|
|
19
|
+
An incompatible or unhealthy live owner is an error, not a reason to replace it.
|
|
20
|
+
The API is `runtime-client/src/runtime/client.mjs`, exporting `ensureRuntime`.
|
|
21
|
+
|
|
22
|
+
## Screenshots
|
|
23
|
+
|
|
24
|
+
<p><img src="https://raw.githubusercontent.com/1aboveio/pi-better-harness/main/docs/images/package-gallery/pi-better-subagents.png" alt="pi-better-subagents rendered in Pi" width="49%" /><img src="https://raw.githubusercontent.com/1aboveio/pi-better-harness/main/docs/images/package-gallery/overview/pi-better-subagents.png" alt="pi-better-subagents package overview" width="49%" /></p>
|
|
25
|
+
|
|
26
|
+
## Core Features
|
|
27
|
+
- Non-blocking subagent launches, with an optional role and named-agent catalog (`docs/agent-catalog.md`, `docs/agent-catalog-lifecycle.md`).
|
|
28
|
+
- Continue a saved conversation with `subagent_spawn({ session_id, prompt })`, or use `session_name` for a unique name in the current folder. Sessions persist by default. Lists show session IDs and search locally; `all:true` searches globally. Batch jobs use the same selectors. See [continuing a saved conversation](docs/usage.md#continuing-a-saved-conversation).
|
|
29
|
+
- Typed foreground `subagent_spawn_batch` launch receipts for native Pi codemode (Pi 0.99.1+), preserving direct tool calls, per-run callbacks, and batch capacity/catalog guarantees. See [codemode batch launches](docs/usage.md#codemode-batch-launches).
|
|
30
|
+
- Opt-in OS task sandboxing on macOS and Linux.
|
|
31
|
+
- Explicit tool allowlists for child sessions, and `skills` for prompt exposure: omit it to keep user-catalog discovery, pass `[]` for no skills, or pass absolute `SKILL.md` paths for exactly those. See [skill exposure](docs/usage.md#skill-exposure).
|
|
32
|
+
- Durable logs, result retrieval, and [failure observations](docs/failure-observations.md) independent of lifecycle status. A live child handles its own tool errors; the parent is woken only for actionable incidents, and children can classify handled failures with `failure_disposition`.
|
|
33
|
+
- Live background-work navigator for active runs.
|
|
34
|
+
- Harness-owned run timing: every run gets independent factual alerts for a tool call left open (5 min) and for no progress (10 min), plus a 60-minute hard timeout. Change the timeout in `/subagents settings`; `0` disables it. Soft deadlines remain opt-in. Configure per spawn with `deadline_minutes`, `grace_minutes`, `max_minutes`, `tool_wait_minutes`, `stuck_minutes`, globally in `config.json` / `PI_SUBAGENT_*_MINUTES`, or in `/subagents settings`. See [usage notes](docs/usage.md#run-timing-deadline-ceiling-tool-wait-stuck).
|
|
35
|
+
|
|
36
|
+
Every single or batch launch automatically joins one shared supervision watcher in the
|
|
37
|
+
foreground Pi process. The last active run's exit or stop tears it down; a later
|
|
38
|
+
launch starts it again. No separate background task or coordinator heartbeat is
|
|
39
|
+
needed. Completion delivery retries use the callback batcher's own timer. Lost-run
|
|
40
|
+
alerts retain supervision until their handoff is handled, so lost work is not silent.
|
|
41
|
+
|
|
42
|
+
## Worker Ownership
|
|
43
|
+
|
|
44
|
+
Every child launch, including clean, batch and unsandboxed launches, loads a Pi
|
|
45
|
+
hook that keeps external CI/PR monitoring with its coordinator. Workers finish
|
|
46
|
+
their assigned implementation or diagnosis, run focused checks, push only when
|
|
47
|
+
authorized, write the result, and return. Pending CI is a valid handoff, not a pass.
|
|
48
|
+
|
|
49
|
+
The hook refuses recognized `gh run watch`, `gh pr checks --watch`, and bundled
|
|
50
|
+
delivery-watcher commands through `bash` and `run_application`. Short status reads,
|
|
51
|
+
failed-log retrieval, and legitimate long local tests and builds remain allowed.
|
|
52
|
+
Workers retain ownership of their assigned validation. When Background Tasks is
|
|
53
|
+
loaded, default workers receive a guarded bridge to supervised local operations.
|
|
54
|
+
They launch a known long command with `bg_task_spawn`, continue independent work,
|
|
55
|
+
and call `wait_for_operations` when only the operation remains. The worker saves
|
|
56
|
+
the wait result and exits, releasing its capacity slot. Once the operation settles,
|
|
57
|
+
the same conversation resumes to read the evidence, acknowledge its interpretation,
|
|
58
|
+
and finish the assignment. A completed parked attempt does not complete the assignment.
|
|
59
|
+
|
|
60
|
+
When the guarded bridge is unavailable, workers hand back the exact command, cwd,
|
|
61
|
+
required environment variable names (never secret values), current evidence and
|
|
62
|
+
remaining validation. The coordinator runs the command through background tools
|
|
63
|
+
and inspects its terminal result. Shell polling and detachment are not substitutes.
|
|
64
|
+
|
|
65
|
+
Explicit tool exclusions and clean loadouts remain authoritative. The bridge does
|
|
66
|
+
not expand permissions: an operation must satisfy both the captured worker policy
|
|
67
|
+
and the current Background Tasks policy. Parking requires Pi SDK 0.82.1 or later,
|
|
68
|
+
a saved conversation, and a registered continuation adapter. If any prerequisite
|
|
69
|
+
cannot be proved, parking is refused or held with a reason.
|
|
70
|
+
|
|
71
|
+
The coordinator owns established command-only jobs and external delivery waits.
|
|
72
|
+
Use `watch_delivery` for supported merge observation. Recognized external watcher
|
|
73
|
+
commands remain refused in workers, including through their background bridge.
|
|
74
|
+
Command permissions and timeouts are unchanged.
|
|
75
|
+
|
|
76
|
+
## Install
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
pi install npm:pi-better-subagents
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Try it for one run:
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
pi -e npm:pi-better-subagents
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Sandboxing starts Off for fresh settings, including standalone subagents without published settings. Explicit saved profiles and session choices remain unchanged. Set `sandbox:true` for a confined launch; `sandbox:false` cannot bypass a human-enabled Subagents profile.
|
|
89
|
+
|
|
90
|
+
Linux confinement requires a usable `bubblewrap` backend and Pi SDK 0.82.1 or newer. `/sandbox` controls the independent Subagents profile, which each launch freezes. Pi handles its own startup, authentication, and provider connection; task tools obey the selected file, command, and network permissions. Outside project defaults to Write: tasks write across home and temp but can remove files outside the workspace only in temp, hidden home directories, and worktree folders (Linux keeps ordinary home folders read-only instead). Confined children admit `read`, `write`, `edit`, and policy-permitted `bash` or guarded `run_application`, the guarded `apply_patch` (Codex patches that follow the file rules), and the selected extension tools with verified providers (defaults include `web_fetch` and `web_search`), which run outside the file rules. Other requested tools are reported as unavailable, with the reason. For direct applications without shell scripts, set Subagents → Sandbox On, Run applications On, Shell scripts Off, and Command time limit to 10 min in `/sandbox`, then press Ctrl+S. This is an explicit choice, not the default. New launches capture the policy; running children keep theirs. See [usage notes](https://github.com/1aboveio/pi-better-harness/blob/main/packages/pi-better-subagents/docs/usage.md#write-sandbox) for the runtime boundary and supported configurations.
|
|
91
|
+
|
|
92
|
+
## Delegation Modes
|
|
93
|
+
|
|
94
|
+
The user config sets `delegationMode` to `manual`, `adaptive` (default), or
|
|
95
|
+
`coordinator`. `/subagents settings` (or `/subagents`) opens a settings page
|
|
96
|
+
for delegation mode, the concurrent-subagent cap (default 6), the tool-wait
|
|
97
|
+
alert (default 5 minutes), the no-progress alert (default 10 minutes), and the
|
|
98
|
+
default skill exposure. The two time values are edited independently; `0` turns
|
|
99
|
+
one alert off. Skill exposure cycles between Discover automatically and No skill
|
|
100
|
+
catalog. The Selected skills row opens the same searchable checkbox picker used
|
|
101
|
+
by `/agents`: it lists loaded skills by name and description, Space toggles one,
|
|
102
|
+
Enter applies, and typing filters without dropping checked items. Saved paths
|
|
103
|
+
missing from discovery stay visible as unavailable and survive apply. Zero
|
|
104
|
+
checked applies No skill catalog, not discovery. Manual Add skill path remains
|
|
105
|
+
available. The page names whether the current value comes from the saved config
|
|
106
|
+
or this session. The session choice controls the next launch before Ctrl+S, and
|
|
107
|
+
edits persist across reloads. Ctrl+S saves mode, cap, timing alerts, and skill
|
|
108
|
+
exposure as defaults, and Reset to defaults clears session overrides, including
|
|
109
|
+
the skill list. Agents opens the same catalog as `/agents`; a definition that inherits
|
|
110
|
+
skill exposure shows whether the live value comes from this session, saved
|
|
111
|
+
config, or discovery, and an invalid draft is marked invalid rather than shown
|
|
112
|
+
as discovery. `/subagents mode manual|adaptive|coordinator`,
|
|
113
|
+
`/subagents cap <number>`, `/subagents tool-wait <minutes>`, and
|
|
114
|
+
`/subagents stuck <minutes>` are command equivalents; `/subagents save` persists
|
|
115
|
+
the current settings. Lowering the cap blocks new single and batch launches, including launches
|
|
116
|
+
still preparing, without stopping running work. Saved configuration changes are
|
|
117
|
+
picked up on subsequent reads; explicit session overrides still take precedence.
|
|
118
|
+
Before every model request, including continuations after tool calls,
|
|
119
|
+
the foreground receives one temporary settings block with the current mode, cap,
|
|
120
|
+
timing alerts, setting sources, revision, and running/reserved/available slots. The latest block
|
|
121
|
+
replaces older snapshots and delegation guidance; it is not saved as conversation
|
|
122
|
+
history. Changes reach the model at its next request, not during an in-flight
|
|
123
|
+
response, and are not broadcast to running children. The cap is a ceiling, not a
|
|
124
|
+
target number of agents. `subagent_settings` inspects the same effective state
|
|
125
|
+
without changing it. Its revision is a stable fingerprint of mode, cap, timing
|
|
126
|
+
alerts, and sources; occupancy changes do not change the revision. Admission rechecks capacity
|
|
127
|
+
when spawning because the snapshot can become stale.
|
|
128
|
+
|
|
129
|
+
The navigator's `main` row retains its mode-only controls:
|
|
130
|
+
`m` cycles the session mode, `ctrl+s` saves that default, and `x`
|
|
131
|
+
does not stop it. Manual delegates only on explicit user or workflow request, even with a
|
|
132
|
+
plan. Adaptive delegates substantial independent work when useful. Coordinator
|
|
133
|
+
uses `agents_catalog` to discover current role descriptions and delegates every
|
|
134
|
+
nontrivial role-owned task, while the foreground coordinates, integrates, and
|
|
135
|
+
verifies. See [usage notes](docs/usage.md#delegation-mode).
|
|
136
|
+
|
|
137
|
+
Saved defaults live in global `~/.pi/agent/settings.json` under
|
|
138
|
+
`piBetterHarness.subagents` (or under `PI_CODING_AGENT_DIR`) and survive package
|
|
139
|
+
reinstalls and upgrades. The old user config migrates on first use. Global values
|
|
140
|
+
override the package's `config.json`, which remains a compatibility fallback.
|
|
141
|
+
Save existing mode, cap, timing-alert, and skill choices with `/subagents save`
|
|
142
|
+
or Ctrl+S.
|
|
143
|
+
Discovery is saved as `defaultSkills: null`, which clears a previously saved
|
|
144
|
+
path list. Put other
|
|
145
|
+
custom config keys in `piBetterHarness.subagents` as well; edits made only inside
|
|
146
|
+
the installed package can be lost on upgrade.
|
|
147
|
+
|
|
148
|
+
`agents_catalog` shows each role's and named agent's default model and effort,
|
|
149
|
+
such as `role developer "Developer" … default openai/gpt-6.1-sol@high`. Roles are
|
|
150
|
+
listed and passed by short name (`role: "developer"`); the stored id
|
|
151
|
+
`role.developer` also works, and named agents keep their full id
|
|
152
|
+
(`agent: "agent.payments"`). To launch on that default, omit
|
|
153
|
+
`model` and `thinking` on a role or agent spawn; name one only for a stated
|
|
154
|
+
reason. When a launch's model or effort differs from the default, its launch
|
|
155
|
+
line says so, for example
|
|
156
|
+
`model openai/gpt-6-astra@high (role developer default openai/gpt-6.1-sol@high)`.
|
|
157
|
+
|
|
158
|
+
## When To Use
|
|
159
|
+
|
|
160
|
+
Skills can use the same role definitions on Pi and Codex through the standalone
|
|
161
|
+
`pi-agent-catalog` JSON CLI, without starting Pi. The CLI checks supplied host
|
|
162
|
+
capabilities and returns a worker plan; it never launches workers or substitutes
|
|
163
|
+
prompt text for model selection. See [shared worker catalog](docs/worker-catalog.md).
|
|
164
|
+
|
|
165
|
+
Use this package for independent coding, review, research, or verification work that can finish later. Do not use it for steps that need immediate foreground interaction or user clarification.
|
|
166
|
+
|
|
167
|
+
## Compatibility
|
|
168
|
+
|
|
169
|
+
| Requirement | Support |
|
|
170
|
+
|-------------|---------|
|
|
171
|
+
| Pi | Required for worker execution through this extension; not for standalone catalog planning |
|
|
172
|
+
| Install method | `pi install npm:pi-better-subagents` |
|
|
173
|
+
| macOS sandboxing | Supported when enabled |
|
|
174
|
+
| Linux sandboxing | Requires usable `bubblewrap` when enabled |
|
|
175
|
+
| Development runtime | Node.js 22+ |
|
|
176
|
+
|
|
177
|
+
## Update Or Remove
|
|
178
|
+
|
|
179
|
+
```sh
|
|
180
|
+
pi update npm:pi-better-subagents
|
|
181
|
+
pi remove npm:pi-better-subagents
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## More Detail
|
|
185
|
+
|
|
186
|
+
### Assignment Progress
|
|
187
|
+
|
|
188
|
+
Result tools, lists, navigation and Goal activity share five assignment states:
|
|
189
|
+
Running, Waiting, Completed, Failed and Cancelled. Process status is separate.
|
|
190
|
+
An exited attempt can still be Waiting, and its output remains readable.
|
|
191
|
+
Consuming a dependency wait does not by itself complete the assignment.
|
|
192
|
+
|
|
193
|
+
The projection exposes an opaque semantic `revision`, readable `reason`, attempt
|
|
194
|
+
identity, process status, termination evidence and retained evidence references.
|
|
195
|
+
Compare revisions for equality; unchanged observations keep the same revision.
|
|
196
|
+
Unavailable or unsupported coordinator reads report Waiting with an unverified
|
|
197
|
+
reason. See the [projection contract](../../docs/adr/0022-assignment-progress-projection.md).
|
|
198
|
+
|
|
199
|
+
- Repository: https://github.com/1aboveio/pi-better-harness
|
|
200
|
+
- Detailed notes: https://github.com/1aboveio/pi-better-harness/blob/main/packages/pi-better-subagents/docs/usage.md
|
|
201
|
+
- License: https://github.com/1aboveio/pi-better-harness/blob/main/LICENSE
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// Generated fixed launch domain from packages/pi-better-subagents/agent-catalog.mjs. Do not edit directly.
|
|
2
|
+
#!/usr/bin/env node
|
|
3
|
+
import { readFileSync, realpathSync } from 'node:fs';
|
|
4
|
+
import { pathToFileURL } from 'node:url';
|
|
5
|
+
export async function runCli(args = process.argv.slice(2), input = () => readFileSync(0, 'utf8')) {
|
|
6
|
+
if (args[0] === 'list' || args[0] === 'inspect') {
|
|
7
|
+
let remote, closeHost;
|
|
8
|
+
try {
|
|
9
|
+
if (args.length > (args[0] === 'list' ? 1 : 2) || args[0] === 'inspect' && !args[1])
|
|
10
|
+
throw new Error('Usage: pi-agent-catalog list | inspect <id>');
|
|
11
|
+
const { register } = await import('tsx/esm/api');
|
|
12
|
+
register();
|
|
13
|
+
const { openSharedCatalog } = await import("./shared-catalog.domain.mjs");
|
|
14
|
+
const { noteCatalogHostContext, closeCatalogHost } = await import("./catalog-host-admission.domain.mjs");
|
|
15
|
+
closeHost = closeCatalogHost;
|
|
16
|
+
const { getAgentDir, ProjectTrustStore, SettingsManager } = await import('@earendil-works/pi-coding-agent');
|
|
17
|
+
const cwd = realpathSync(process.cwd());
|
|
18
|
+
const settings = SettingsManager.create(cwd, getAgentDir(), { projectTrusted: false });
|
|
19
|
+
if (settings.drainErrors().length)
|
|
20
|
+
throw new Error('Cannot verify CLI project trust');
|
|
21
|
+
noteCatalogHostContext({ cwd, isProjectTrusted: () => new ProjectTrustStore(getAgentDir()).get(cwd) ?? settings.getDefaultProjectTrust() === 'always' }, () => ({}));
|
|
22
|
+
const { presentCatalog, presentCatalogEntry } = await import("./agent-inspection.domain.mjs");
|
|
23
|
+
remote = await openSharedCatalog(process.cwd());
|
|
24
|
+
const snapshot = await remote.get();
|
|
25
|
+
const view = args[0] === 'list' ? presentCatalog(snapshot) : presentCatalogEntry(snapshot, args[1]);
|
|
26
|
+
console.log(JSON.stringify(view));
|
|
27
|
+
closeCatalogHost();
|
|
28
|
+
return view.found === false ? 2 : 0;
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
console.error(`pi-agent-catalog: ${error.message}`);
|
|
32
|
+
return 2;
|
|
33
|
+
}
|
|
34
|
+
finally {
|
|
35
|
+
remote?.close();
|
|
36
|
+
closeHost?.();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (args.includes('--help')) {
|
|
40
|
+
console.log('pi-agent-catalog [resolve-workers] < request.json\nResolves shared agent roles against explicit host model and effort capabilities. No workers are launched.');
|
|
41
|
+
return 0;
|
|
42
|
+
}
|
|
43
|
+
if (args.length > 1 || (args.length === 1 && args[0] !== 'resolve-workers')) {
|
|
44
|
+
console.error('Usage: pi-agent-catalog [resolve-workers] < request.json');
|
|
45
|
+
return 2;
|
|
46
|
+
}
|
|
47
|
+
try {
|
|
48
|
+
// Register only for this import. The portable resolver never loads Pi extensions or credentials.
|
|
49
|
+
const { tsImport } = await import('tsx/esm/api');
|
|
50
|
+
const { planWorkers } = await tsImport('./worker-catalog.ts', import.meta.url);
|
|
51
|
+
const text = input();
|
|
52
|
+
if (Buffer.byteLength(text) > 1024 * 1024)
|
|
53
|
+
throw new Error('worker request exceeds 1 MiB');
|
|
54
|
+
console.log(JSON.stringify(planWorkers(JSON.parse(text))));
|
|
55
|
+
return 0;
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
console.error(`pi-agent-catalog: ${error.message}`);
|
|
59
|
+
console.log(JSON.stringify({ version: 1, ok: false, code: 'worker-catalog-error', reason: error.message }));
|
|
60
|
+
return 2;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (process.argv[1] && import.meta.url === pathToFileURL(realpathSync(process.argv[1])).href)
|
|
64
|
+
process.exitCode = await runCli();
|