@chankov/agent-fleet 2.0.19 → 2.0.20
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/.pi/agent-fleet/scripts/coms-claude-bridge.ts +5 -5
- package/.pi/extensions/compact-and-continue/index.ts +18 -2
- package/.pi/harnesses/agent-hub/README.md +163 -130
- package/.pi/harnesses/agent-hub/access-approval.ts +15 -9
- package/.pi/harnesses/agent-hub/action-authorization.ts +10 -0
- package/.pi/harnesses/agent-hub/agentic-sources.ts +1 -1
- package/.pi/harnesses/agent-hub/approval-wait.ts +1 -0
- package/.pi/harnesses/agent-hub/assist-profile.ts +3 -0
- package/.pi/harnesses/agent-hub/budget-recovery.ts +4 -95
- package/.pi/harnesses/agent-hub/commands/context.ts +0 -1
- package/.pi/harnesses/agent-hub/config/model-profiles.ts +3 -2
- package/.pi/harnesses/agent-hub/config/overrides.ts +2 -2
- package/.pi/harnesses/agent-hub/context/budgets.ts +12 -66
- package/.pi/harnesses/agent-hub/context-compaction-monitor.ts +35 -0
- package/.pi/harnesses/agent-hub/context-compaction-preflight.ts +21 -0
- package/.pi/harnesses/agent-hub/context-compaction-runtime.ts +69 -0
- package/.pi/harnesses/agent-hub/context-compaction.ts +34 -0
- package/.pi/harnesses/agent-hub/context-continuity-broker.ts +42 -0
- package/.pi/harnesses/agent-hub/context-continuity-child.ts +83 -0
- package/.pi/harnesses/agent-hub/context-continuity-client.ts +19 -0
- package/.pi/harnesses/agent-hub/context-continuity-compat.ts +30 -0
- package/.pi/harnesses/agent-hub/context-continuity-owners.ts +15 -0
- package/.pi/harnesses/agent-hub/context-continuity-registry.ts +8 -0
- package/.pi/harnesses/agent-hub/context-continuity.ts +82 -0
- package/.pi/harnesses/agent-hub/context-pressure.ts +37 -6
- package/.pi/harnesses/agent-hub/damage-guard-approval.ts +59 -0
- package/.pi/harnesses/agent-hub/damage-guard-broker.ts +125 -0
- package/.pi/harnesses/agent-hub/damage-guard-contract.ts +22 -0
- package/.pi/harnesses/agent-hub/damage-guard-descendant.ts +76 -0
- package/.pi/harnesses/agent-hub/damage-guard-hub.ts +249 -0
- package/.pi/harnesses/agent-hub/damage-guard-identity.ts +12 -0
- package/.pi/harnesses/agent-hub/damage-guard-owners.ts +54 -0
- package/.pi/harnesses/agent-hub/damage-guard-state.ts +43 -0
- package/.pi/harnesses/agent-hub/delegate.ts +4 -4
- package/.pi/harnesses/agent-hub/deterministic-fs.ts +33 -7
- package/.pi/harnesses/agent-hub/dispatch-coms.ts +3 -2
- package/.pi/harnesses/agent-hub/dispatch-native-complete.ts +1 -1
- package/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +32 -7
- package/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +24 -4
- package/.pi/harnesses/agent-hub/dispatch-native-types.ts +26 -0
- package/.pi/harnesses/agent-hub/dispatch-native.ts +2 -0
- package/.pi/harnesses/agent-hub/execution-trace.ts +241 -0
- package/.pi/harnesses/agent-hub/file-discovery/adapters.ts +9 -3
- package/.pi/harnesses/agent-hub/file-discovery/broker-client.ts +10 -4
- package/.pi/harnesses/agent-hub/file-discovery/broker.ts +8 -5
- package/.pi/harnesses/agent-hub/file-discovery/child-extension.ts +17 -8
- package/.pi/harnesses/agent-hub/file-discovery/descendant.ts +5 -1
- package/.pi/harnesses/agent-hub/file-discovery/discovery-worker.mjs +1 -1
- package/.pi/harnesses/agent-hub/file-discovery/evaluate.ts +14 -5
- package/.pi/harnesses/agent-hub/file-discovery/hub.ts +33 -16
- package/.pi/harnesses/agent-hub/file-discovery/results.ts +7 -6
- package/.pi/harnesses/agent-hub/file-discovery/runtime.ts +21 -11
- package/.pi/harnesses/agent-hub/file-discovery/semantic-profiles.ts +18 -0
- package/.pi/harnesses/agent-hub/file-discovery/sources.ts +2 -2
- package/.pi/harnesses/agent-hub/filesystem-tool.ts +6 -25
- package/.pi/harnesses/agent-hub/history-projection.ts +116 -0
- package/.pi/harnesses/agent-hub/hub-state-audit.js +0 -24
- package/.pi/harnesses/agent-hub/index.ts +102 -113
- package/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +122 -24
- package/.pi/harnesses/agent-hub/no-progress.ts +42 -15
- package/.pi/harnesses/agent-hub/operator-watchdog.ts +97 -0
- package/.pi/harnesses/agent-hub/orchestration-activation.ts +18 -21
- package/.pi/harnesses/agent-hub/orchestration-route.ts +8 -16
- package/.pi/harnesses/agent-hub/package.json +1 -1
- package/.pi/harnesses/agent-hub/policy/work-mode.ts +8 -3
- package/.pi/harnesses/agent-hub/proactive-runtime.ts +1 -1
- package/.pi/harnesses/agent-hub/process-obligations.ts +23 -22
- package/.pi/harnesses/agent-hub/prompts/context.ts +1 -2
- package/.pi/harnesses/agent-hub/prompts/fragments.ts +21 -30
- package/.pi/harnesses/agent-hub/prompts/session-start.ts +1 -1
- package/.pi/harnesses/agent-hub/recovery-contract.ts +2 -1
- package/.pi/harnesses/agent-hub/research/runtime.ts +14 -0
- package/.pi/harnesses/agent-hub/research/spawn-run.ts +41 -14
- package/.pi/harnesses/agent-hub/review-continuity.ts +73 -0
- package/.pi/harnesses/agent-hub/review-findings.js +2 -10
- package/.pi/harnesses/agent-hub/review-reuse.ts +47 -0
- package/.pi/harnesses/agent-hub/run-budget.js +17 -229
- package/.pi/harnesses/agent-hub/scope-gate.js +99 -15
- package/.pi/harnesses/agent-hub/session-audit.ts +22 -4
- package/.pi/harnesses/agent-hub/spawn.ts +87 -11
- package/.pi/harnesses/agent-hub/specialist-result-receipt.ts +13 -0
- package/.pi/harnesses/agent-hub/specialist-result.ts +69 -0
- package/.pi/harnesses/agent-hub/system1-communication-store.ts +29 -2
- package/.pi/harnesses/agent-hub/system1-runtime.ts +7 -0
- package/.pi/harnesses/agent-hub/task-continuation.ts +4 -0
- package/.pi/harnesses/agent-hub/task-triage-authorization.ts +43 -14
- package/.pi/harnesses/agent-hub/task-triage-config.ts +5 -14
- package/.pi/harnesses/agent-hub/task-triage-obligations.ts +17 -1
- package/.pi/harnesses/agent-hub/task-triage-runtime.ts +15 -10
- package/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +1 -1
- package/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +18 -7
- package/.pi/harnesses/agent-hub/tools/action-executors.ts +11 -10
- package/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +2 -2
- package/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +144 -64
- package/.pi/harnesses/agent-hub/ui/context-budget.ts +5 -3
- package/.pi/harnesses/agent-hub/ui/grid.ts +1 -1
- package/.pi/harnesses/agent-hub/work-mode.ts +3 -4
- package/.pi/harnesses/ask-user-remote/index.ts +13 -2
- package/.pi/harnesses/ask-user-remote/questions.ts +4 -6
- package/.pi/harnesses/ask-user-remote/runtime-ask.ts +16 -1
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/README.md +26 -0
- package/.pi/harnesses/damage-control-continue/index.ts +87 -20
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/result-screen.ts +98 -0
- package/.pi/harnesses/damage-control-continue/system1-child.ts +35 -0
- package/.pi/harnesses/damage-control-continue/system1-client.ts +85 -0
- package/.pi/harnesses/damage-control-continue/system1-guard.ts +65 -0
- package/.pi/harnesses/lib/approval-wait.ts +17 -0
- package/.pi/harnesses/lib/bash-policy-analysis.ts +155 -0
- package/.pi/harnesses/lib/clarification-policy.ts +9 -0
- package/.pi/harnesses/lib/coms-core-io.ts +2 -1
- package/.pi/harnesses/lib/coms-core.ts +3 -2
- package/.pi/harnesses/lib/coms-registry-entry.ts +4 -2
- package/.pi/harnesses/lib/context-budget-child-prompt.ts +8 -14
- package/.pi/harnesses/lib/context-budget-view.ts +5 -0
- package/.pi/harnesses/lib/context-compaction-policy.js +35 -0
- package/.pi/harnesses/lib/damage-action-hash.ts +28 -0
- package/.pi/harnesses/lib/damage-control-shared.ts +3 -0
- package/.pi/harnesses/lib/damage-guard-port.ts +25 -0
- package/.pi/harnesses/lib/damage-result-evidence.ts +25 -0
- package/.pi/harnesses/lib/damage-result-view.ts +16 -0
- package/.pi/harnesses/lib/execution-trace.ts +45 -0
- package/.pi/harnesses/lib/herdr-presence.ts +4 -4
- package/.pi/harnesses/lib/identical-dialog.ts +27 -0
- package/.pi/harnesses/lib/installation-state.js +62 -0
- package/.pi/harnesses/lib/process-shared.ts +9 -0
- package/.pi/harnesses/lib/semantic-approval.ts +80 -0
- package/.pi/harnesses/lib/system1/config-context-compaction.js +16 -0
- package/.pi/harnesses/lib/system1/config-damage-guard.js +24 -0
- package/.pi/harnesses/lib/system1/config-file-discovery.js +4 -2
- package/.pi/harnesses/lib/system1/config-v2.js +11 -5
- package/.pi/harnesses/lib/system1/payload-screen.ts +65 -0
- package/.pi/harnesses/lib/system1/service.ts +1 -1
- package/.pi/harnesses/package-lock.json +1041 -959
- package/.pi/harnesses/package.json +3 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.20/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.20/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/coms-claude-bridge.ts +437 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/fleet.ts +217 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/flow.ts +157 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +208 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/flow-command.ts +98 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/package-lock.json +35 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/package.json +9 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/team-up.ts +378 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +179 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +36 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.20/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.0.20/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.20/.pi/agents/model-profiles.yaml +134 -0
- package/.versions/2.0.20/.pi/agents/peers.yaml +147 -0
- package/.versions/2.0.20/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.20/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.20/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.20/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.20/.pi/extensions/btw/index.ts +914 -0
- package/.versions/2.0.20/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.20/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.20/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.20/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.20/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.20/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.20/.pi/extensions/compact-and-continue/index.ts +136 -0
- package/.versions/2.0.20/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.20/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.20/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.20/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.20/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.20/.pi/extensions/package.json +9 -0
- package/.versions/2.0.20/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.0.20/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/2.0.20/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.20/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.20/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.20/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.20/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/README.md +1516 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/acceptance.ts +199 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/access-approval.ts +141 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/action-authorization.ts +10 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/agentic-contract.ts +43 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/agentic-evidence.ts +64 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/agentic-hub.ts +54 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/agentic-runtime.ts +56 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/agentic-sources-worker.mjs +4 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/agentic-sources.ts +74 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/agentic-state.ts +23 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/approval-wait.ts +1 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/assist-profile.ts +19 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/budget-recovery.ts +123 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/context.ts +46 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/recover.ts +61 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/config/agents.ts +178 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/config/model-profiles.ts +237 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/config/overrides.ts +165 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/context/budgets.ts +152 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/context-compaction-monitor.ts +35 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/context-compaction-preflight.ts +21 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/context-compaction-runtime.ts +69 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/context-compaction.ts +34 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/context-continuity-broker.ts +42 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/context-continuity-child.ts +83 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/context-continuity-client.ts +19 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/context-continuity-compat.ts +30 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/context-continuity-owners.ts +15 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/context-continuity-registry.ts +8 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/context-continuity.ts +82 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/context-pressure.ts +222 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/context-window.js +108 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/damage-guard-approval.ts +59 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/damage-guard-broker.ts +125 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/damage-guard-contract.ts +22 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/damage-guard-descendant.ts +76 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/damage-guard-hub.ts +249 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/damage-guard-identity.ts +12 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/damage-guard-owners.ts +54 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/damage-guard-state.ts +43 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/damage-guard-test-tsconfig.json +19 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/delegate.ts +478 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/deterministic-fs.ts +195 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/dispatch-coms.ts +253 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/dispatch-native-complete.ts +173 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +295 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +253 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/dispatch-native-types.ts +293 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/dispatch-native.ts +236 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +27 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +77 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/docs-lane.js +123 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/execution-trace.ts +241 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/file-discovery/adapters.ts +88 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/file-discovery/broker-client.ts +62 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/file-discovery/broker.ts +128 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/file-discovery/child-extension.ts +42 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/file-discovery/descendant.ts +67 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/file-discovery/discovery-worker.mjs +15 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/file-discovery/discovery.ts +126 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/file-discovery/evaluate.ts +57 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/file-discovery/hub.ts +169 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/file-discovery/native-context.ts +8 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/file-discovery/native-fixture.test-support.ts +108 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/file-discovery/owners.ts +96 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/file-discovery/results.ts +55 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/file-discovery/runtime.ts +130 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/file-discovery/semantic-profiles.ts +18 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/file-discovery/sources.ts +69 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/file-discovery/state.ts +22 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/filesystem-tool.ts +166 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/fixtures/registration-surface.json +66 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/helpers.ts +270 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/history-projection.ts +116 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/hub-state-audit.js +41 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/index.ts +2614 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/input/completions.ts +82 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +231 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +144 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/no-progress.ts +620 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/operator-watchdog.ts +97 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/orchestration-activation.ts +109 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/orchestration-route.ts +68 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/policy/work-mode.ts +142 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/presentation.ts +48 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/proactive-config.ts +21 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/proactive-external-git.ts +82 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/proactive-external.ts +142 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/proactive-local.ts +89 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/proactive-observer.ts +106 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/proactive-rules.ts +171 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/proactive-runtime.ts +318 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/proactive-snapshot.ts +271 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/proactive-types.ts +67 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/process-obligations.ts +159 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/prompts/context.ts +55 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/prompts/fragments.ts +86 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/prompts/system-prompt.ts +125 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/recover-state.ts +104 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/recovery-contract.ts +151 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/research/runtime.ts +215 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/research/spawn-run.ts +221 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/return-contract.js +349 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/return-extract.js +77 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/review-closure.ts +43 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/review-continuity.ts +73 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/review-findings.js +96 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/review-reuse.ts +47 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/run-budget.js +342 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/run-namespace.js +93 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/runtime-test-check.ts +54 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/scope-gate.js +228 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/session-audit.ts +331 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/spawn.ts +639 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/specialist-result-receipt.ts +13 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/specialist-result.ts +69 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/system1-communication-store.ts +217 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/system1-report.ts +275 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/system1-runtime.ts +265 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/task-continuation.ts +4 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/task-triage-authorization.ts +151 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/task-triage-config.ts +20 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/task-triage-obligations.ts +120 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/task-triage-runtime.ts +130 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/timeline.ts +72 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +79 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tools/action-executors.ts +214 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tools/ask-system1-files.ts +15 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tools/ask-system1.ts +25 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tools/context.ts +144 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +88 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +640 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tools/herdr-executors.ts +95 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tools/run-flow.ts +136 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tools/spawn-research.ts +67 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/tsconfig.json +22 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/types.ts +66 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/ui/context-budget.ts +89 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +155 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/work-mode.ts +186 -0
- package/.versions/2.0.20/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
- package/.versions/2.0.20/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.20/.pi/harnesses/ask-user-remote/index.ts +569 -0
- package/.versions/2.0.20/.pi/harnesses/ask-user-remote/questions.ts +159 -0
- package/.versions/2.0.20/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.20/.pi/harnesses/ask-user-remote/runtime-ask.ts +83 -0
- package/.versions/2.0.20/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.20/.pi/harnesses/coms/index.ts +282 -0
- package/.versions/2.0.20/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.20/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.20/.pi/harnesses/damage-control-continue/README.md +161 -0
- package/.versions/2.0.20/.pi/harnesses/damage-control-continue/index.ts +600 -0
- package/.versions/2.0.20/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.20/.pi/harnesses/damage-control-continue/result-screen.ts +98 -0
- package/.versions/2.0.20/.pi/harnesses/damage-control-continue/system1-child.ts +35 -0
- package/.versions/2.0.20/.pi/harnesses/damage-control-continue/system1-client.ts +85 -0
- package/.versions/2.0.20/.pi/harnesses/damage-control-continue/system1-guard.ts +65 -0
- package/.versions/2.0.20/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.20/.pi/harnesses/lib/approval-wait.ts +17 -0
- package/.versions/2.0.20/.pi/harnesses/lib/bash-policy-analysis.ts +155 -0
- package/.versions/2.0.20/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.0.20/.pi/harnesses/lib/clarification-policy.ts +9 -0
- package/.versions/2.0.20/.pi/harnesses/lib/coms-core-io.ts +386 -0
- package/.versions/2.0.20/.pi/harnesses/lib/coms-core.ts +578 -0
- package/.versions/2.0.20/.pi/harnesses/lib/coms-registry-entry.ts +96 -0
- package/.versions/2.0.20/.pi/harnesses/lib/context-budget-child-prompt.ts +214 -0
- package/.versions/2.0.20/.pi/harnesses/lib/context-budget-hub-prompt.ts +121 -0
- package/.versions/2.0.20/.pi/harnesses/lib/context-budget-view.ts +112 -0
- package/.versions/2.0.20/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.20/.pi/harnesses/lib/context-compaction-policy.js +35 -0
- package/.versions/2.0.20/.pi/harnesses/lib/damage-action-hash.ts +28 -0
- package/.versions/2.0.20/.pi/harnesses/lib/damage-control-shared.ts +229 -0
- package/.versions/2.0.20/.pi/harnesses/lib/damage-guard-port.ts +25 -0
- package/.versions/2.0.20/.pi/harnesses/lib/damage-result-evidence.ts +25 -0
- package/.versions/2.0.20/.pi/harnesses/lib/damage-result-view.ts +16 -0
- package/.versions/2.0.20/.pi/harnesses/lib/deterministic-handle-path.ts +25 -0
- package/.versions/2.0.20/.pi/harnesses/lib/execution-trace.ts +45 -0
- package/.versions/2.0.20/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.20/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.20/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.20/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.0.20/.pi/harnesses/lib/fleet-dashboard-view.ts +172 -0
- package/.versions/2.0.20/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
- package/.versions/2.0.20/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.20/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.20/.pi/harnesses/lib/fleet-read-model.ts +609 -0
- package/.versions/2.0.20/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.20/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
- package/.versions/2.0.20/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
- package/.versions/2.0.20/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.20/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.20/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.20/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.20/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.20/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.20/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.20/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.20/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.20/.pi/harnesses/lib/identical-dialog.ts +27 -0
- package/.versions/2.0.20/.pi/harnesses/lib/installation-state.js +62 -0
- package/.versions/2.0.20/.pi/harnesses/lib/policy-roots.js +106 -0
- package/.versions/2.0.20/.pi/harnesses/lib/policy-roots.ts +31 -0
- package/.versions/2.0.20/.pi/harnesses/lib/process-shared.ts +9 -0
- package/.versions/2.0.20/.pi/harnesses/lib/safe-source-read.js +29 -0
- package/.versions/2.0.20/.pi/harnesses/lib/semantic-approval.ts +80 -0
- package/.versions/2.0.20/.pi/harnesses/lib/spawned-peers.js +191 -0
- package/.versions/2.0.20/.pi/harnesses/lib/system1/config-agentic.js +15 -0
- package/.versions/2.0.20/.pi/harnesses/lib/system1/config-context-compaction.js +16 -0
- package/.versions/2.0.20/.pi/harnesses/lib/system1/config-damage-guard.js +24 -0
- package/.versions/2.0.20/.pi/harnesses/lib/system1/config-file-discovery.js +23 -0
- package/.versions/2.0.20/.pi/harnesses/lib/system1/config-json.js +37 -0
- package/.versions/2.0.20/.pi/harnesses/lib/system1/config-loader.js +44 -0
- package/.versions/2.0.20/.pi/harnesses/lib/system1/config-proactive.js +68 -0
- package/.versions/2.0.20/.pi/harnesses/lib/system1/config-triage.js +42 -0
- package/.versions/2.0.20/.pi/harnesses/lib/system1/config-v2.js +112 -0
- package/.versions/2.0.20/.pi/harnesses/lib/system1/config.js +50 -0
- package/.versions/2.0.20/.pi/harnesses/lib/system1/contracts.ts +154 -0
- package/.versions/2.0.20/.pi/harnesses/lib/system1/demo.ts +95 -0
- package/.versions/2.0.20/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.versions/2.0.20/.pi/harnesses/lib/system1/payload-screen.ts +65 -0
- package/.versions/2.0.20/.pi/harnesses/lib/system1/selection.js +11 -0
- package/.versions/2.0.20/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.versions/2.0.20/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.20/.pi/harnesses/package-lock.json +2121 -0
- package/.versions/2.0.20/.pi/harnesses/package.json +13 -0
- package/.versions/2.0.20/.pi/prompts/af-build.md +27 -0
- package/.versions/2.0.20/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.20/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.0.20/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.20/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.20/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.20/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.20/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.0.20/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.20/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.20/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.20/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.20/.version +1 -0
- package/.versions/2.0.20/agents/architect.md +24 -0
- package/.versions/2.0.20/agents/bowser.md +28 -0
- package/.versions/2.0.20/agents/builder.md +55 -0
- package/.versions/2.0.20/agents/code-reviewer.md +209 -0
- package/.versions/2.0.20/agents/deep-researcher.md +32 -0
- package/.versions/2.0.20/agents/documenter.md +22 -0
- package/.versions/2.0.20/agents/orchestrator.md +22 -0
- package/.versions/2.0.20/agents/plan-reviewer.md +83 -0
- package/.versions/2.0.20/agents/planner.md +107 -0
- package/.versions/2.0.20/agents/releaser.md +24 -0
- package/.versions/2.0.20/agents/researcher.md +30 -0
- package/.versions/2.0.20/agents/security-auditor.md +167 -0
- package/.versions/2.0.20/agents/test-engineer.md +153 -0
- package/.versions/2.0.20/agents/web-debugger.md +44 -0
- package/.versions/2.0.20/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.20/bin/catalog/harness-runtime-closure.json +73 -0
- package/.versions/2.0.20/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.20/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.20/docs/ARCHITECTURE.md +977 -0
- package/.versions/2.0.20/docs/agent-fleet-setup.md +1103 -0
- package/.versions/2.0.20/docs/claude-code-coms-bridge.md +147 -0
- package/.versions/2.0.20/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.20/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.20/docs/getting-started.md +126 -0
- package/.versions/2.0.20/docs/npm-install.md +535 -0
- package/.versions/2.0.20/docs/pi-extensions.md +455 -0
- package/.versions/2.0.20/docs/pi-setup.md +92 -0
- package/.versions/2.0.20/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.20/install-manifest.json +3210 -0
- package/.versions/2.0.20/justfile +247 -0
- package/.versions/2.0.20/manifest-meta.json +1088 -0
- package/.versions/2.0.20/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.20/references/communication-contract.md +26 -0
- package/.versions/2.0.20/references/definition-of-done.md +67 -0
- package/.versions/2.0.20/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.20/references/observability-checklist.md +92 -0
- package/.versions/2.0.20/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.20/references/performance-checklist.md +236 -0
- package/.versions/2.0.20/references/prompting-patterns.md +380 -0
- package/.versions/2.0.20/references/security-checklist.md +245 -0
- package/.versions/2.0.20/references/testing-patterns.md +235 -0
- package/.versions/2.0.20/references/workflow-authoring.md +304 -0
- package/.versions/2.0.20/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.20/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.20/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.20/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.20/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.0.20/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.20/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.0.20/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.20/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.20/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.20/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.20/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.20/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.20/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.20/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.20/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.20/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.20/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.20/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.20/skills/incremental-implementation/SKILL.md +353 -0
- package/.versions/2.0.20/skills/incremental-implementation.zip +0 -0
- package/.versions/2.0.20/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.20/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.0.20/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.20/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.20/skills/planning-and-task-breakdown/SKILL.md +318 -0
- package/.versions/2.0.20/skills/planning-and-task-breakdown.zip +0 -0
- package/.versions/2.0.20/skills/repository-ai-setup/SKILL.md +135 -0
- package/.versions/2.0.20/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/.versions/2.0.20/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/.versions/2.0.20/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/.versions/2.0.20/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/.versions/2.0.20/skills/repository-ai-setup/references/verify-setup.md +20 -0
- package/.versions/2.0.20/skills/repository-ai-setup.zip +0 -0
- package/.versions/2.0.20/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.20/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.0.20/skills/spec-driven-development.zip +0 -0
- package/.versions/2.0.20/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.0.20/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/CHANGELOG.md +32 -0
- package/README.md +3 -2
- package/agents/builder.md +1 -1
- package/agents/planner.md +6 -4
- package/bin/cli.js +9 -2
- package/bin/lib/apply.js +4 -0
- package/bin/lib/desired.js +2 -0
- package/bin/lib/doctor.js +13 -7
- package/bin/lib/state.js +7 -4
- package/bin/lib/transaction.js +6 -1
- package/bin/lib/validate-overrides.js +7 -3
- package/bin/lib/verify.js +9 -2
- package/docs/ARCHITECTURE.md +177 -74
- package/docs/agent-fleet-setup.md +10 -8
- package/docs/external-project-ai-content.md +17 -2
- package/docs/pi-extensions.md +7 -6
- package/docs/system1-agentic.md +4 -4
- package/docs/system1-config.md +144 -1
- package/docs/system1-context-continuity.md +224 -0
- package/docs/system1-damage-guard.md +172 -0
- package/docs/system1-dispatch-triage.md +169 -0
- package/docs/system1-file-discovery.md +16 -4
- package/docs/system1.example.json +102 -0
- package/install-manifest.json +17 -4
- package/manifest-meta.json +14 -1
- package/package.json +21 -9
- package/skills/_internal/grilling.md +54 -54
- package/skills/incremental-implementation/SKILL.md +8 -8
- package/skills/incremental-implementation.zip +0 -0
- package/skills/planning-and-task-breakdown/SKILL.md +7 -7
- package/skills/planning-and-task-breakdown.zip +0 -0
- package/skills/spec-driven-development/SKILL.md +1 -1
- package/skills/spec-driven-development.zip +0 -0
- package/.pi/harnesses/agent-hub/budget-continuation.ts +0 -13
- package/.pi/harnesses/agent-hub/commands/budget-continue.ts +0 -10
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// .pi/agent-fleet/scripts/lib/spawn-stagger.ts
|
|
2
|
+
//
|
|
3
|
+
// Pre-warm/stagger for simultaneous pi pane spawns (team-up, hub-team,
|
|
4
|
+
// team-resume). pi's credential store (~/.pi/agent/auth.json) is loaded once
|
|
5
|
+
// at boot under a short-retry file lock; when a stale OAuth token forces one
|
|
6
|
+
// pane to refresh it over the network WHILE holding that lock, sibling panes
|
|
7
|
+
// booting in the same instant lose the lock race and come up with an empty
|
|
8
|
+
// credential store — every provider shows "unconfigured". The fix is local:
|
|
9
|
+
// when a stale OAuth credential is detected, one pi pane starts immediately
|
|
10
|
+
// (the warmer — it refreshes the token) and every other pi pane sleeps a few
|
|
11
|
+
// seconds before launching. Fresh tokens mean zero delay everywhere.
|
|
12
|
+
//
|
|
13
|
+
// Pure logic only — no fs, no sockets, no process.exit. Callers read
|
|
14
|
+
// auth.json themselves (lock-free, same as pi's readStoredCredential) and
|
|
15
|
+
// inject delays into pane env; the `_peer`/`_peer-plus` recipes honor
|
|
16
|
+
// AGENT_FLEET_SPAWN_DELAY with a plain `sleep`.
|
|
17
|
+
|
|
18
|
+
/** Env var the justfile peer recipes read: seconds to sleep before launching pi. */
|
|
19
|
+
export const STAGGER_ENV_VAR = "AGENT_FLEET_SPAWN_DELAY";
|
|
20
|
+
|
|
21
|
+
/** Delay for the first staggered pane — long enough for the warmer's token refresh round-trip. */
|
|
22
|
+
export const WARMUP_SECONDS = 4;
|
|
23
|
+
|
|
24
|
+
/** Extra spacing between subsequent staggered panes. */
|
|
25
|
+
export const STEP_SECONDS = 1;
|
|
26
|
+
|
|
27
|
+
/** Treat tokens expiring within this window as stale — pane boot takes seconds. */
|
|
28
|
+
export const EXPIRY_MARGIN_MS = 60_000;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Does auth.json hold an OAuth credential that a booting pi would refresh?
|
|
32
|
+
* `raw` is the file's contents (undefined when unreadable/absent). Missing or
|
|
33
|
+
* malformed files never stagger: with no stored credential there is nothing
|
|
34
|
+
* to refresh, so there is no long lock hold to dodge.
|
|
35
|
+
*/
|
|
36
|
+
export function oauthNeedsWarmup(raw: string | undefined, now = Date.now()): boolean {
|
|
37
|
+
if (!raw) return false;
|
|
38
|
+
let data: unknown;
|
|
39
|
+
try {
|
|
40
|
+
data = JSON.parse(raw);
|
|
41
|
+
} catch {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
if (typeof data !== "object" || data === null) return false;
|
|
45
|
+
for (const credential of Object.values(data)) {
|
|
46
|
+
if (typeof credential !== "object" || credential === null) continue;
|
|
47
|
+
const { type, expires } = credential as { type?: unknown; expires?: unknown };
|
|
48
|
+
if (type !== "oauth" || typeof expires !== "number") continue;
|
|
49
|
+
if (expires <= now + EXPIRY_MARGIN_MS) return true;
|
|
50
|
+
}
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface StaggerOptions {
|
|
55
|
+
/** Per-peer flag, in spawn order: does this pane boot a pi process? */
|
|
56
|
+
peerIsPi: boolean[];
|
|
57
|
+
/** Does the root pane (hub) boot a pi process? The hub warms when present. */
|
|
58
|
+
rootIsPi: boolean;
|
|
59
|
+
/** Result of oauthNeedsWarmup — false short-circuits to all-zero delays. */
|
|
60
|
+
needed: boolean;
|
|
61
|
+
warmupSeconds?: number;
|
|
62
|
+
stepSeconds?: number;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Per-peer delay seconds (spawn order). Exactly one pi process — the hub when
|
|
67
|
+
* present, otherwise the first pi peer — starts at 0 and refreshes the stale
|
|
68
|
+
* token; every other pi peer starts after the warm-up window. Non-pi panes
|
|
69
|
+
* (runner: claude-code) never wait: they do not touch pi's credential store.
|
|
70
|
+
*/
|
|
71
|
+
export function staggerDelays(opts: StaggerOptions): number[] {
|
|
72
|
+
const { peerIsPi, rootIsPi, needed, warmupSeconds = WARMUP_SECONDS, stepSeconds = STEP_SECONDS } = opts;
|
|
73
|
+
if (!needed) return peerIsPi.map(() => 0);
|
|
74
|
+
let staggered = 0;
|
|
75
|
+
let warmerAssigned = rootIsPi;
|
|
76
|
+
return peerIsPi.map((isPi) => {
|
|
77
|
+
if (!isPi) return 0;
|
|
78
|
+
if (!warmerAssigned) {
|
|
79
|
+
warmerAssigned = true;
|
|
80
|
+
return 0;
|
|
81
|
+
}
|
|
82
|
+
return warmupSeconds + staggered++ * stepSeconds;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Convenience for the team entrypoints: auth.json contents + peers → a
|
|
88
|
+
* `delayForPeer` hook for buildTeamLayout. Structural peer type avoids a
|
|
89
|
+
* circular import with herdr-layout.ts.
|
|
90
|
+
*/
|
|
91
|
+
export function planSpawnDelays<P extends { runner?: string }>(
|
|
92
|
+
peers: P[],
|
|
93
|
+
rootIsPi: boolean,
|
|
94
|
+
authJsonRaw: string | undefined,
|
|
95
|
+
now = Date.now(),
|
|
96
|
+
): { needed: boolean; delayForPeer: (peer: P) => number | undefined } {
|
|
97
|
+
const needed = oauthNeedsWarmup(authJsonRaw, now);
|
|
98
|
+
const delays = staggerDelays({ peerIsPi: peers.map((p) => p.runner !== "claude-code"), rootIsPi, needed });
|
|
99
|
+
const byPeer = new Map<P, number>(peers.map((p, i) => [p, delays[i]]));
|
|
100
|
+
return { needed, delayForPeer: (peer) => byPeer.get(peer) };
|
|
101
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
// .pi/agent-fleet/scripts/lib/team-project.ts
|
|
2
|
+
//
|
|
3
|
+
// Shared project scoping helpers for herdr team commands. The coms harness
|
|
4
|
+
// already isolates peers by --project; this file only keeps team workspace
|
|
5
|
+
// labels, snapshot files, and generated launch argv in sync with that scope.
|
|
6
|
+
|
|
7
|
+
import * as path from "node:path";
|
|
8
|
+
|
|
9
|
+
export const DEFAULT_PROJECT = "default";
|
|
10
|
+
|
|
11
|
+
// Conservative project names: no empty string, path separators, traversal,
|
|
12
|
+
// whitespace, shell metacharacters, or glob stars. Dots are allowed for names
|
|
13
|
+
// like "acme.prod", but ".." is not allowed anywhere.
|
|
14
|
+
export const PROJECT_SAFE = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
|
|
15
|
+
export const TEAM_SAFE = /^[A-Za-z0-9_-]+$/;
|
|
16
|
+
|
|
17
|
+
export type ConductorBackend = "hermes";
|
|
18
|
+
// "peer" is the `just fleet peer <name>` workspace: a single pane for
|
|
19
|
+
// a single peer, labelled by the PEER name where the others use a team name.
|
|
20
|
+
export type WorkspaceMode = "peers" | "peer" | "hub" | "conductor-hermes";
|
|
21
|
+
|
|
22
|
+
export interface ConductorSpec {
|
|
23
|
+
backend: ConductorBackend;
|
|
24
|
+
workspaceMode: Extract<WorkspaceMode, `conductor-${string}`>;
|
|
25
|
+
paneLabel: string;
|
|
26
|
+
command: string[];
|
|
27
|
+
cwd: string;
|
|
28
|
+
env: Record<string, string>;
|
|
29
|
+
ratio: number;
|
|
30
|
+
displayText: string;
|
|
31
|
+
expectedServiceScope: "none";
|
|
32
|
+
conductorName: string;
|
|
33
|
+
team: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function validateAbsoluteRepoRoot(repoRoot: string): string {
|
|
37
|
+
if (!path.isAbsolute(repoRoot) || path.resolve(repoRoot) !== repoRoot || repoRoot.includes("..")) {
|
|
38
|
+
throw new Error(`Invalid absolute repository root: ${JSON.stringify(repoRoot)}`);
|
|
39
|
+
}
|
|
40
|
+
return repoRoot;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function validateProject(project: string): string {
|
|
44
|
+
if (
|
|
45
|
+
project.length === 0 ||
|
|
46
|
+
project === "." ||
|
|
47
|
+
project.includes("..") ||
|
|
48
|
+
project.includes("/") ||
|
|
49
|
+
project.includes("\\") ||
|
|
50
|
+
!PROJECT_SAFE.test(project)
|
|
51
|
+
) {
|
|
52
|
+
throw new Error(
|
|
53
|
+
`Invalid project name: ${JSON.stringify(project)} (use letters, numbers, dots, underscores, or hyphens; no '..')`,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
return project;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function validateTeamName(team: string): string {
|
|
60
|
+
if (!TEAM_SAFE.test(team)) throw new Error(`Invalid team name: ${JSON.stringify(team)}`);
|
|
61
|
+
return team;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// The worktree/repo identity that scopes a workspace label so the same team
|
|
65
|
+
// launched from different checkouts never collides. It is the LAST dot-segment
|
|
66
|
+
// of the checkout directory's basename — the convention the fleet uses for
|
|
67
|
+
// git worktrees: `main.wt2` → `wt2`, `ringithub.end2` → `end2`, a plain
|
|
68
|
+
// `agent-fleet` checkout → `agent-fleet`. Sanitized to the label-safe charset;
|
|
69
|
+
// falls back to "repo" when nothing usable remains.
|
|
70
|
+
export function worktreeTag(repoRoot: string): string {
|
|
71
|
+
const base = path.basename(repoRoot);
|
|
72
|
+
const dot = base.lastIndexOf(".");
|
|
73
|
+
const seg = dot > 0 ? base.slice(dot + 1) : base;
|
|
74
|
+
const safe = seg.replace(/[^A-Za-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
75
|
+
return safe || "repo";
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function parseProjectFlag(argv: string[]): string {
|
|
79
|
+
let project = DEFAULT_PROJECT;
|
|
80
|
+
let seen = false;
|
|
81
|
+
for (let i = 0; i < argv.length; i++) {
|
|
82
|
+
if (argv[i] !== "--project") continue;
|
|
83
|
+
if (seen) throw new Error("--project may only be provided once");
|
|
84
|
+
seen = true;
|
|
85
|
+
const value = argv[i + 1];
|
|
86
|
+
if (!value || value.startsWith("--")) throw new Error("--project requires a name");
|
|
87
|
+
project = value;
|
|
88
|
+
i++;
|
|
89
|
+
}
|
|
90
|
+
return validateProject(project);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Workspace label = <worktree-tag>-<mode>-<team>, with a `--project.<name>`
|
|
94
|
+
// suffix when the coms project is non-default. The worktree tag keys the label
|
|
95
|
+
// to the checkout, so `just fleet team <team>` from two repos/worktrees yields
|
|
96
|
+
// distinct labels (e.g. `wt2-hub-plan` vs `end2-hub-plan`) instead of colliding
|
|
97
|
+
// on a shared `pi-hub-<team>`. Pass `tag` from worktreeTag(REPO_ROOT); it
|
|
98
|
+
// defaults to "repo" only for callers that have no checkout in hand.
|
|
99
|
+
export function teamWorkspaceLabel(
|
|
100
|
+
kind: WorkspaceMode,
|
|
101
|
+
team: string,
|
|
102
|
+
project = DEFAULT_PROJECT,
|
|
103
|
+
tag = "repo",
|
|
104
|
+
): string {
|
|
105
|
+
validateTeamName(team);
|
|
106
|
+
validateProject(project);
|
|
107
|
+
const base = `${tag}-${kind}-${team}`;
|
|
108
|
+
return project === DEFAULT_PROJECT ? base : `${base}--project.${project}`;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface HubCommandOptions {
|
|
112
|
+
workMode?: "operator" | "orchestrator";
|
|
113
|
+
agentTeam?: string;
|
|
114
|
+
noComs?: boolean;
|
|
115
|
+
browser?: boolean;
|
|
116
|
+
allExtensions?: boolean;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function resolveLegacyAgentRoster(teams: Record<string, string[]>, requested: string): string {
|
|
120
|
+
validateTeamName(requested);
|
|
121
|
+
const wanted = requested.toLowerCase();
|
|
122
|
+
return Object.keys(teams).find(name => name.toLowerCase() === wanted)
|
|
123
|
+
?? Object.keys(teams).find(name => name.toLowerCase() === "default")
|
|
124
|
+
?? "default";
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function hubCommand(
|
|
128
|
+
project = DEFAULT_PROJECT,
|
|
129
|
+
options: HubCommandOptions = {},
|
|
130
|
+
): string[] {
|
|
131
|
+
validateProject(project);
|
|
132
|
+
if (options.agentTeam) validateTeamName(options.agentTeam);
|
|
133
|
+
const command = ["just", "fleet"];
|
|
134
|
+
if (options.workMode) command.push("--work-mode", options.workMode);
|
|
135
|
+
if (options.agentTeam) command.push("--agents", options.agentTeam);
|
|
136
|
+
if (options.noComs) command.push("--no-coms");
|
|
137
|
+
if (options.browser) command.push("--browser");
|
|
138
|
+
if (options.allExtensions) command.push("--all-extensions");
|
|
139
|
+
if (project !== DEFAULT_PROJECT) command.push("--project", project);
|
|
140
|
+
return command;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export function conductorCommand(): string[] {
|
|
144
|
+
return ["hermes", "-p", "dev"];
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function conductorSpec(
|
|
148
|
+
backend: ConductorBackend,
|
|
149
|
+
input: { repoRoot: string; team: string; project?: string },
|
|
150
|
+
): ConductorSpec {
|
|
151
|
+
const repoRoot = validateAbsoluteRepoRoot(input.repoRoot);
|
|
152
|
+
const team = validateTeamName(input.team);
|
|
153
|
+
validateProject(input.project ?? DEFAULT_PROJECT);
|
|
154
|
+
if (backend !== "hermes") {
|
|
155
|
+
throw new Error(`Unknown conductor backend: ${JSON.stringify(backend)} (expected hermes)`);
|
|
156
|
+
}
|
|
157
|
+
return {
|
|
158
|
+
backend,
|
|
159
|
+
workspaceMode: "conductor-hermes",
|
|
160
|
+
paneLabel: "conductor-hermes",
|
|
161
|
+
command: conductorCommand(),
|
|
162
|
+
cwd: repoRoot,
|
|
163
|
+
env: {},
|
|
164
|
+
ratio: 0.35,
|
|
165
|
+
displayText: "Hermes conductor; no herdr control",
|
|
166
|
+
expectedServiceScope: "none",
|
|
167
|
+
conductorName: `${backend}-${team}-conductor`,
|
|
168
|
+
team,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export function teamSnapshotPath(snapshotDir: string, team: string, project = DEFAULT_PROJECT): string {
|
|
173
|
+
validateTeamName(team);
|
|
174
|
+
validateProject(project);
|
|
175
|
+
return project === DEFAULT_PROJECT
|
|
176
|
+
? path.join(snapshotDir, `${team}.json`)
|
|
177
|
+
: path.join(snapshotDir, "projects", project, `${team}.json`);
|
|
178
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// .pi/agent-fleet/scripts/lib/team-snapshot.ts
|
|
2
|
+
//
|
|
3
|
+
// Pure logic for fleet resume (B5): snapshot a running team (peer manifest +
|
|
4
|
+
// per-peer session resume refs harvested from herdr) and rebuild it later.
|
|
5
|
+
// See docs/plans/herdr/b5-resume-notes.md for the decisions: pane exit closes
|
|
6
|
+
// the pane (nothing to re-attach), layout.export cannot target an unfocused
|
|
7
|
+
// workspace, so snapshots store peers + refs and the grid is regenerated with
|
|
8
|
+
// the same builder team-up uses.
|
|
9
|
+
//
|
|
10
|
+
// No sockets, no fs, no process.exit here — the wiring lives in
|
|
11
|
+
// .pi/agent-fleet/scripts/team-snapshot.ts.
|
|
12
|
+
|
|
13
|
+
import type { Peer } from "./herdr-layout.ts";
|
|
14
|
+
import { DEFAULT_PROJECT, teamWorkspaceLabel, validateProject, validateTeamName } from "./team-project.ts";
|
|
15
|
+
|
|
16
|
+
// Shape of herdr's agent_session (agent.list): pi panes carry
|
|
17
|
+
// {kind:"path", value:<session .jsonl>}, claude panes {kind:"id", value:<uuid>}.
|
|
18
|
+
export interface ResumeRef {
|
|
19
|
+
kind: string;
|
|
20
|
+
value: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface PeerSnapshot extends Peer {
|
|
24
|
+
resume: ResumeRef | null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface TeamSnapshot {
|
|
28
|
+
version: 1;
|
|
29
|
+
team: string;
|
|
30
|
+
project: string;
|
|
31
|
+
hub: boolean;
|
|
32
|
+
workspace_label: string;
|
|
33
|
+
taken_at: string;
|
|
34
|
+
peers: PeerSnapshot[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Minimal shapes of the herdr responses the builder joins over.
|
|
38
|
+
export interface PaneLite {
|
|
39
|
+
pane_id: string;
|
|
40
|
+
label?: string;
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
}
|
|
43
|
+
export interface AgentLite {
|
|
44
|
+
pane_id?: string;
|
|
45
|
+
agent?: string;
|
|
46
|
+
agent_session?: { kind?: string; value?: string };
|
|
47
|
+
[key: string]: unknown;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Join: peers.yaml manifest × pane labels (pane label = peer name, set by the
|
|
51
|
+
// layout) × agent sessions (keyed by pane_id). A peer whose pane or session
|
|
52
|
+
// is missing snapshots with resume: null — it will start fresh on resume.
|
|
53
|
+
export function buildSnapshot(opts: {
|
|
54
|
+
team: string;
|
|
55
|
+
hub: boolean;
|
|
56
|
+
peers: Peer[];
|
|
57
|
+
panes: PaneLite[];
|
|
58
|
+
agents: AgentLite[];
|
|
59
|
+
now?: Date;
|
|
60
|
+
project?: string;
|
|
61
|
+
tag?: string;
|
|
62
|
+
}): TeamSnapshot {
|
|
63
|
+
const { team, hub, peers, panes, agents, project = DEFAULT_PROJECT, tag } = opts;
|
|
64
|
+
validateTeamName(team);
|
|
65
|
+
validateProject(project);
|
|
66
|
+
const paneByLabel = new Map<string, string>();
|
|
67
|
+
for (const p of panes) {
|
|
68
|
+
if (p.label) paneByLabel.set(p.label, p.pane_id);
|
|
69
|
+
}
|
|
70
|
+
const sessionByPane = new Map<string, ResumeRef>();
|
|
71
|
+
for (const a of agents) {
|
|
72
|
+
const s = a.agent_session;
|
|
73
|
+
if (a.pane_id && s && typeof s.kind === "string" && typeof s.value === "string") {
|
|
74
|
+
sessionByPane.set(a.pane_id, { kind: s.kind, value: s.value });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
version: 1,
|
|
79
|
+
team,
|
|
80
|
+
project,
|
|
81
|
+
hub,
|
|
82
|
+
workspace_label: teamWorkspaceLabel(hub ? "hub" : "peers", team, project, tag),
|
|
83
|
+
taken_at: (opts.now ?? new Date()).toISOString(),
|
|
84
|
+
peers: peers.map((peer) => {
|
|
85
|
+
const paneId = peer.name ? paneByLabel.get(peer.name) : undefined;
|
|
86
|
+
const resume = paneId ? sessionByPane.get(paneId) ?? null : null;
|
|
87
|
+
return { ...peer, resume };
|
|
88
|
+
}),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// The resume ref usable by this peer's launch recipe, or undefined to start
|
|
93
|
+
// fresh. `refUsable` is injected (fs check for pi paths); refs of kinds the
|
|
94
|
+
// recipes cannot consume yet (e.g. claude ids before the Phase-4 runner
|
|
95
|
+
// lands) resolve undefined with a reason via `onSkip`.
|
|
96
|
+
export function resumeRefForPeer(
|
|
97
|
+
peer: PeerSnapshot,
|
|
98
|
+
refUsable: (ref: ResumeRef) => boolean,
|
|
99
|
+
onSkip?: (peer: PeerSnapshot, reason: string) => void,
|
|
100
|
+
): string | undefined {
|
|
101
|
+
if (!peer.resume) {
|
|
102
|
+
onSkip?.(peer, "no session ref in snapshot — starting fresh");
|
|
103
|
+
return undefined;
|
|
104
|
+
}
|
|
105
|
+
// pi peers resume by session file path; claude-code peers by session id
|
|
106
|
+
// (herdr reports {kind:"id"} for claude — `claude --resume <id>`).
|
|
107
|
+
const wantKind = peer.runner === "claude-code" ? "id" : "path";
|
|
108
|
+
if (peer.resume.kind !== wantKind) {
|
|
109
|
+
onSkip?.(peer, `unsupported resume kind "${peer.resume.kind}" — starting fresh`);
|
|
110
|
+
return undefined;
|
|
111
|
+
}
|
|
112
|
+
if (!refUsable(peer.resume)) {
|
|
113
|
+
onSkip?.(peer, `session file gone (${peer.resume.value}) — starting fresh`);
|
|
114
|
+
return undefined;
|
|
115
|
+
}
|
|
116
|
+
return peer.resume.value;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function parseSnapshot(raw: string): TeamSnapshot {
|
|
120
|
+
let parsed: unknown;
|
|
121
|
+
try {
|
|
122
|
+
parsed = JSON.parse(raw);
|
|
123
|
+
} catch (err) {
|
|
124
|
+
throw new Error(`Snapshot is not valid JSON: ${err instanceof Error ? err.message : String(err)}`);
|
|
125
|
+
}
|
|
126
|
+
const s = parsed as TeamSnapshot;
|
|
127
|
+
if (!s || s.version !== 1 || typeof s.team !== "string" || !Array.isArray(s.peers)) {
|
|
128
|
+
throw new Error("Snapshot has an unexpected shape (want {version:1, team, peers[]}).");
|
|
129
|
+
}
|
|
130
|
+
validateTeamName(s.team);
|
|
131
|
+
if (!("project" in (s as Record<string, unknown>))) {
|
|
132
|
+
(s as { project: string }).project = DEFAULT_PROJECT;
|
|
133
|
+
} else if (typeof (s as { project?: unknown }).project !== "string") {
|
|
134
|
+
throw new Error("Snapshot has an unexpected shape (project must be a string when present).");
|
|
135
|
+
}
|
|
136
|
+
validateProject(s.project);
|
|
137
|
+
return s;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function assertSnapshotProject(snap: TeamSnapshot, requestedProject: string): void {
|
|
141
|
+
validateProject(requestedProject);
|
|
142
|
+
if (snap.project !== requestedProject) {
|
|
143
|
+
throw new Error(
|
|
144
|
+
`Snapshot project mismatch: snapshot is ${JSON.stringify(snap.project)}, requested ${JSON.stringify(requestedProject)}.`,
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-fleet-workflow-runtime-deps",
|
|
3
|
+
"lockfileVersion": 3,
|
|
4
|
+
"requires": true,
|
|
5
|
+
"packages": {
|
|
6
|
+
"": {
|
|
7
|
+
"name": "agent-fleet-workflow-runtime-deps",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@sinclair/typebox": "^0.34.49",
|
|
10
|
+
"yaml": "^2.9.0"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"node_modules/@sinclair/typebox": {
|
|
14
|
+
"version": "0.34.52",
|
|
15
|
+
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.52.tgz",
|
|
16
|
+
"integrity": "sha512-XiMQh7qqVlxZzcVD+kkGMNGMzcTrDMLWI7S4x7z1MkCkbDPrekpZXEUK0eZqZFMuHQg2a2DZOcDIh9o5v3Gonw==",
|
|
17
|
+
"license": "MIT"
|
|
18
|
+
},
|
|
19
|
+
"node_modules/yaml": {
|
|
20
|
+
"version": "2.9.0",
|
|
21
|
+
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz",
|
|
22
|
+
"integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==",
|
|
23
|
+
"license": "ISC",
|
|
24
|
+
"bin": {
|
|
25
|
+
"yaml": "bin.mjs"
|
|
26
|
+
},
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">= 14.6"
|
|
29
|
+
},
|
|
30
|
+
"funding": {
|
|
31
|
+
"url": "https://github.com/sponsors/eemeli"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// .pi/agent-fleet/scripts/peer-banner.ts
|
|
2
|
+
//
|
|
3
|
+
// Print a colored identity banner for a peer pane. Called by the hidden
|
|
4
|
+
// `just _peer`/`_peer-plus` recipes right before exec'ing pi, so every pane
|
|
5
|
+
// announces who lives in it. Never fails the recipe: any problem (missing
|
|
6
|
+
// persona, unreadable file) degrades to a plain banner and exit 0.
|
|
7
|
+
//
|
|
8
|
+
// usage: peer-banner.ts <persona> [<name>]
|
|
9
|
+
|
|
10
|
+
import * as fs from "node:fs";
|
|
11
|
+
import * as path from "node:path";
|
|
12
|
+
import { fileURLToPath } from "node:url";
|
|
13
|
+
|
|
14
|
+
import { parsePersonaFrontmatter, renderBanner } from "./lib/persona-banner.ts";
|
|
15
|
+
import { PERSONA_DIRS } from "./lib/persona-dirs.ts";
|
|
16
|
+
|
|
17
|
+
const SCRIPT_DIR = path.dirname(fileURLToPath(import.meta.url));
|
|
18
|
+
const REPO_ROOT = path.resolve(SCRIPT_DIR, "..", "..", "..");
|
|
19
|
+
|
|
20
|
+
function main(): void {
|
|
21
|
+
const [persona, nameArg] = process.argv.slice(2);
|
|
22
|
+
if (!persona) return;
|
|
23
|
+
const name = nameArg || persona;
|
|
24
|
+
|
|
25
|
+
let meta = {};
|
|
26
|
+
for (const dir of PERSONA_DIRS) {
|
|
27
|
+
const p = path.join(REPO_ROOT, ...dir, `${persona}.md`);
|
|
28
|
+
try {
|
|
29
|
+
meta = parsePersonaFrontmatter(fs.readFileSync(p, "utf-8"));
|
|
30
|
+
break;
|
|
31
|
+
} catch {
|
|
32
|
+
// try the next location; fall through to a plain banner
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const width = process.stdout.columns ? Math.min(process.stdout.columns, 100) : 60;
|
|
37
|
+
for (const line of renderBanner(name, meta, width)) console.log(line);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const isEntry = process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url);
|
|
41
|
+
if (isEntry) main();
|