@chankov/agent-fleet 2.0.21 → 2.0.23
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 -2
- package/.pi/agent-fleet/scripts/coms-cli.ts +9 -4
- package/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +5 -2
- package/.pi/agent-fleet/scripts/exec-at-target.ts +10 -0
- package/.pi/agent-fleet/scripts/fleet.ts +32 -4
- package/.pi/agent-fleet/scripts/flow.ts +10 -1
- package/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +1 -1
- package/.pi/agent-fleet/scripts/lib/fleet-command.ts +14 -0
- package/.pi/agent-fleet/scripts/lib/flow-command.ts +9 -0
- package/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +14 -6
- package/.pi/agent-fleet/scripts/lib/peer-target.ts +1 -0
- package/.pi/agent-fleet/scripts/lib/resource-closure.js +1 -0
- package/.pi/agent-fleet/scripts/lib/session-launch.ts +56 -0
- package/.pi/agent-fleet/scripts/lib/team-snapshot.ts +13 -0
- package/.pi/agent-fleet/scripts/peer-launch.ts +17 -11
- package/.pi/agent-fleet/scripts/pi-session.ts +9 -0
- package/.pi/agent-fleet/scripts/team-snapshot.ts +14 -6
- package/.pi/agent-fleet/scripts/team-up.ts +16 -9
- package/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +5 -3
- package/.pi/agent-fleet/scripts/workflows/lib/env.ts +3 -1
- package/.pi/agent-fleet/scripts/workflows/lib/git.ts +4 -1
- package/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +10 -5
- package/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +15 -8
- package/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +5 -4
- package/.pi/agent-fleet/scripts/workflows/lib/quality.ts +3 -2
- package/.pi/agent-fleet/scripts/workflows/lib/run.ts +1 -0
- package/.pi/agent-fleet/scripts/workflows/lib/trace.ts +23 -5
- package/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +59 -23
- package/.pi/agents/model-profiles.yaml +3 -3
- package/.pi/extensions/btw/index.ts +2 -0
- package/.pi/extensions/pi-voice-stt/config.ts +5 -4
- package/.pi/harnesses/agent-hub/README.md +10 -0
- package/.pi/harnesses/agent-hub/acceptance.ts +2 -1
- package/.pi/harnesses/agent-hub/agentic-hub.ts +2 -1
- package/.pi/harnesses/agent-hub/config/agents.ts +3 -0
- package/.pi/harnesses/agent-hub/config/overrides.ts +4 -3
- package/.pi/harnesses/agent-hub/context-continuity-broker.ts +7 -5
- package/.pi/harnesses/agent-hub/context-continuity-client.ts +6 -3
- package/.pi/harnesses/agent-hub/context-continuity-owners.ts +5 -3
- package/.pi/harnesses/agent-hub/damage-guard-hub.ts +11 -4
- package/.pi/harnesses/agent-hub/damage-guard-owners.ts +5 -0
- package/.pi/harnesses/agent-hub/dispatch-coms.ts +7 -2
- package/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +3 -1
- package/.pi/harnesses/agent-hub/execution-evidence.ts +20 -4
- package/.pi/harnesses/agent-hub/external-blocker.js +9 -2
- package/.pi/harnesses/agent-hub/file-discovery/hub.ts +2 -1
- package/.pi/harnesses/agent-hub/file-discovery/owners.ts +7 -3
- package/.pi/harnesses/agent-hub/index.ts +4 -3
- package/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +3 -2
- package/.pi/harnesses/agent-hub/no-progress.ts +4 -2
- package/.pi/harnesses/agent-hub/package.json +1 -1
- package/.pi/harnesses/agent-hub/presentation.ts +7 -1
- package/.pi/harnesses/agent-hub/proactive-config.ts +2 -1
- package/.pi/harnesses/agent-hub/proactive-rules.ts +1 -1
- package/.pi/harnesses/agent-hub/proactive-snapshot.ts +12 -4
- package/.pi/harnesses/agent-hub/proactive-types.ts +3 -0
- package/.pi/harnesses/agent-hub/runtime-test-check.ts +16 -2
- package/.pi/harnesses/agent-hub/safety-routing.ts +7 -1
- package/.pi/harnesses/agent-hub/scope-gate.js +10 -5
- package/.pi/harnesses/agent-hub/spawn.ts +30 -4
- package/.pi/harnesses/agent-hub/system1-runtime.ts +9 -3
- package/.pi/harnesses/agent-hub/task-triage-config.ts +2 -1
- package/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +3 -2
- package/.pi/harnesses/agent-hub/tools/fleet-tools.ts +3 -2
- package/.pi/harnesses/agent-hub/tools/herdr-executors.ts +11 -6
- package/.pi/harnesses/agent-hub/tools/run-flow.ts +21 -11
- package/.pi/harnesses/ask-user-remote/index.ts +4 -2
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/index.ts +25 -4
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/system1-child.ts +16 -6
- package/.pi/harnesses/lib/bash-policy-analysis.ts +31 -1
- package/.pi/harnesses/lib/coms-core-io.ts +2 -0
- package/.pi/harnesses/lib/coms-core.ts +7 -1
- package/.pi/harnesses/lib/coms-registry-entry.ts +3 -0
- package/.pi/harnesses/lib/damage-control-shared.ts +17 -1
- package/.pi/harnesses/lib/damage-policy.ts +35 -0
- package/.pi/harnesses/lib/peer-target.ts +24 -0
- package/.pi/harnesses/lib/policy-roots.js +20 -9
- package/.pi/harnesses/lib/policy-roots.ts +2 -1
- package/.pi/harnesses/lib/resource-closure.js +26 -0
- package/.pi/harnesses/lib/session-target.ts +62 -0
- package/.pi/harnesses/lib/system1/config-loader.js +12 -3
- package/.pi/harnesses/lib/system1/worktree-scopes.js +110 -0
- package/.pi/harnesses/lib/system1/worktree-scopes.ts +13 -0
- package/.pi/harnesses/lib/system1/worktree-service.ts +24 -0
- package/.pi/harnesses/lib/target-capabilities.js +7 -0
- package/.pi/harnesses/lib/workspace-context.js +115 -0
- package/.pi/harnesses/lib/workspace-context.ts +22 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.22/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.22/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/coms-claude-bridge.ts +437 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/fleet.ts +217 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/flow.ts +157 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +208 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/flow-command.ts +98 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/package-lock.json +35 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/package.json +9 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/team-up.ts +378 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +179 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +36 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.0.22/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.22/.pi/agents/model-profiles.yaml +134 -0
- package/.versions/2.0.22/.pi/agents/peers.yaml +147 -0
- package/.versions/2.0.22/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.22/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.22/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.22/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.22/.pi/extensions/btw/index.ts +914 -0
- package/.versions/2.0.22/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.22/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.22/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.22/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.22/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.22/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.22/.pi/extensions/compact-and-continue/index.ts +136 -0
- package/.versions/2.0.22/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.22/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.22/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.22/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.22/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.22/.pi/extensions/package.json +9 -0
- package/.versions/2.0.22/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.0.22/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/2.0.22/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.22/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.22/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.22/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.22/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/README.md +1527 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/acceptance.ts +200 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/access-approval.ts +141 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/action-authorization.ts +10 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/agentic-contract.ts +43 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/agentic-evidence.ts +64 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/agentic-hub.ts +54 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/agentic-runtime.ts +56 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/agentic-sources-worker.mjs +4 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/agentic-sources.ts +74 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/agentic-state.ts +23 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/approval-wait.ts +1 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/assist-profile.ts +19 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/budget-recovery.ts +123 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/context.ts +46 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/recover.ts +61 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/config/agents.ts +178 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/config/model-profiles.ts +237 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/config/overrides.ts +165 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/context/budgets.ts +152 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/context-compaction-monitor.ts +35 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/context-compaction-preflight.ts +21 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/context-compaction-runtime.ts +69 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/context-compaction.ts +34 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/context-continuity-broker.ts +42 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/context-continuity-child.ts +83 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/context-continuity-client.ts +19 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/context-continuity-compat.ts +30 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/context-continuity-owners.ts +15 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/context-continuity-registry.ts +8 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/context-continuity.ts +82 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/context-pressure.ts +222 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/context-window.js +108 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/damage-guard-approval.ts +59 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/damage-guard-broker.ts +125 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/damage-guard-contract.ts +22 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/damage-guard-descendant.ts +76 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/damage-guard-hub.ts +254 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/damage-guard-identity.ts +12 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/damage-guard-owners.ts +54 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/damage-guard-state.ts +43 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/damage-guard-test-tsconfig.json +19 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/delegate.ts +478 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/deterministic-fs.ts +195 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-coms.ts +253 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-native-complete.ts +173 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +295 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +255 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-native-types.ts +293 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-native.ts +236 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +27 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +77 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/docs-lane.js +123 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/execution-trace.ts +241 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/external-blocker.js +92 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/adapters.ts +88 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/broker-client.ts +62 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/broker.ts +128 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/child-extension.ts +42 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/descendant.ts +67 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/discovery-worker.mjs +15 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/discovery.ts +126 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/evaluate.ts +57 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/hub.ts +169 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/native-context.ts +8 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/native-fixture.test-support.ts +108 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/owners.ts +96 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/results.ts +55 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/runtime.ts +130 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/semantic-profiles.ts +18 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/sources.ts +69 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/state.ts +22 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/filesystem-tool.ts +166 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/fixtures/registration-surface.json +66 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/helpers.ts +270 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/history-projection.ts +116 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/hub-state-audit.js +41 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/index.ts +2616 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/input/completions.ts +82 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +231 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +144 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +90 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/no-progress.ts +622 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/operator-watchdog.ts +97 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/orchestration-activation.ts +109 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/orchestration-route.ts +68 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/policy/work-mode.ts +142 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/presentation.ts +48 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-config.ts +21 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-external-git.ts +82 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-external.ts +142 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-local.ts +89 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-observer.ts +106 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-rules.ts +171 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-runtime.ts +318 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-snapshot.ts +271 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-types.ts +67 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/process-obligations.ts +159 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/prompts/context.ts +55 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/prompts/fragments.ts +86 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/prompts/system-prompt.ts +125 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/recover-state.ts +104 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/recovery-contract.ts +151 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/research/runtime.ts +215 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/research/spawn-run.ts +221 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/return-contract.js +349 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/return-extract.js +77 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/review-closure.ts +43 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/review-continuity.ts +73 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/review-findings.js +96 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/review-reuse.ts +47 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/run-budget.js +342 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/run-namespace.js +93 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/runtime-test-check.ts +68 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/scope-gate.js +228 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/session-audit.ts +331 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/spawn.ts +639 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/specialist-result-receipt.ts +13 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/specialist-result.ts +69 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/system1-communication-store.ts +217 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/system1-report.ts +275 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/system1-runtime.ts +265 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/task-continuation.ts +4 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-authorization.ts +151 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-config.ts +20 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-obligations.ts +120 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-runtime.ts +130 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/timeline.ts +72 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +79 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/action-executors.ts +214 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/ask-system1-files.ts +15 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/ask-system1.ts +25 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/context.ts +144 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +88 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +641 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/herdr-executors.ts +95 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/run-flow.ts +136 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/spawn-research.ts +67 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/tsconfig.json +22 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/types.ts +66 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/context-budget.ts +89 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +155 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/work-mode.ts +186 -0
- package/.versions/2.0.22/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
- package/.versions/2.0.22/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.22/.pi/harnesses/ask-user-remote/index.ts +569 -0
- package/.versions/2.0.22/.pi/harnesses/ask-user-remote/questions.ts +159 -0
- package/.versions/2.0.22/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.22/.pi/harnesses/ask-user-remote/runtime-ask.ts +83 -0
- package/.versions/2.0.22/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.22/.pi/harnesses/coms/index.ts +285 -0
- package/.versions/2.0.22/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.22/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.22/.pi/harnesses/damage-control-continue/README.md +161 -0
- package/.versions/2.0.22/.pi/harnesses/damage-control-continue/index.ts +600 -0
- package/.versions/2.0.22/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.22/.pi/harnesses/damage-control-continue/result-screen.ts +98 -0
- package/.versions/2.0.22/.pi/harnesses/damage-control-continue/system1-child.ts +45 -0
- package/.versions/2.0.22/.pi/harnesses/damage-control-continue/system1-client.ts +85 -0
- package/.versions/2.0.22/.pi/harnesses/damage-control-continue/system1-guard.ts +65 -0
- package/.versions/2.0.22/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.22/.pi/harnesses/lib/approval-wait.ts +17 -0
- package/.versions/2.0.22/.pi/harnesses/lib/bash-policy-analysis.ts +185 -0
- package/.versions/2.0.22/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.0.22/.pi/harnesses/lib/clarification-policy.ts +9 -0
- package/.versions/2.0.22/.pi/harnesses/lib/coms-core-io.ts +413 -0
- package/.versions/2.0.22/.pi/harnesses/lib/coms-core.ts +680 -0
- package/.versions/2.0.22/.pi/harnesses/lib/coms-registry-entry.ts +96 -0
- package/.versions/2.0.22/.pi/harnesses/lib/context-budget-child-prompt.ts +214 -0
- package/.versions/2.0.22/.pi/harnesses/lib/context-budget-hub-prompt.ts +121 -0
- package/.versions/2.0.22/.pi/harnesses/lib/context-budget-view.ts +112 -0
- package/.versions/2.0.22/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.22/.pi/harnesses/lib/context-compaction-policy.js +35 -0
- package/.versions/2.0.22/.pi/harnesses/lib/damage-action-hash.ts +28 -0
- package/.versions/2.0.22/.pi/harnesses/lib/damage-control-shared.ts +229 -0
- package/.versions/2.0.22/.pi/harnesses/lib/damage-guard-port.ts +25 -0
- package/.versions/2.0.22/.pi/harnesses/lib/damage-result-evidence.ts +25 -0
- package/.versions/2.0.22/.pi/harnesses/lib/damage-result-view.ts +16 -0
- package/.versions/2.0.22/.pi/harnesses/lib/deterministic-handle-path.ts +25 -0
- package/.versions/2.0.22/.pi/harnesses/lib/execution-trace.ts +45 -0
- package/.versions/2.0.22/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.22/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.22/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.22/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.0.22/.pi/harnesses/lib/fleet-dashboard-view.ts +172 -0
- package/.versions/2.0.22/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
- package/.versions/2.0.22/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.22/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.22/.pi/harnesses/lib/fleet-read-model.ts +609 -0
- package/.versions/2.0.22/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.22/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
- package/.versions/2.0.22/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
- package/.versions/2.0.22/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.22/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.22/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.22/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.22/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.22/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.22/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.22/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.22/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.22/.pi/harnesses/lib/identical-dialog.ts +27 -0
- package/.versions/2.0.22/.pi/harnesses/lib/installation-state.js +62 -0
- package/.versions/2.0.22/.pi/harnesses/lib/policy-roots.js +106 -0
- package/.versions/2.0.22/.pi/harnesses/lib/policy-roots.ts +31 -0
- package/.versions/2.0.22/.pi/harnesses/lib/process-shared.ts +9 -0
- package/.versions/2.0.22/.pi/harnesses/lib/safe-source-read.js +29 -0
- package/.versions/2.0.22/.pi/harnesses/lib/semantic-approval.ts +80 -0
- package/.versions/2.0.22/.pi/harnesses/lib/spawned-peers.js +191 -0
- package/.versions/2.0.22/.pi/harnesses/lib/system1/config-agentic.js +15 -0
- package/.versions/2.0.22/.pi/harnesses/lib/system1/config-context-compaction.js +16 -0
- package/.versions/2.0.22/.pi/harnesses/lib/system1/config-damage-guard.js +24 -0
- package/.versions/2.0.22/.pi/harnesses/lib/system1/config-file-discovery.js +23 -0
- package/.versions/2.0.22/.pi/harnesses/lib/system1/config-json.js +37 -0
- package/.versions/2.0.22/.pi/harnesses/lib/system1/config-loader.js +44 -0
- package/.versions/2.0.22/.pi/harnesses/lib/system1/config-proactive.js +68 -0
- package/.versions/2.0.22/.pi/harnesses/lib/system1/config-triage.js +42 -0
- package/.versions/2.0.22/.pi/harnesses/lib/system1/config-v2.js +112 -0
- package/.versions/2.0.22/.pi/harnesses/lib/system1/config.js +50 -0
- package/.versions/2.0.22/.pi/harnesses/lib/system1/contracts.ts +154 -0
- package/.versions/2.0.22/.pi/harnesses/lib/system1/demo.ts +95 -0
- package/.versions/2.0.22/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.versions/2.0.22/.pi/harnesses/lib/system1/payload-screen.ts +65 -0
- package/.versions/2.0.22/.pi/harnesses/lib/system1/selection.js +11 -0
- package/.versions/2.0.22/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.versions/2.0.22/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.22/.pi/harnesses/package-lock.json +2121 -0
- package/.versions/2.0.22/.pi/harnesses/package.json +13 -0
- package/.versions/2.0.22/.pi/prompts/af-build.md +27 -0
- package/.versions/2.0.22/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.22/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.0.22/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.22/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.22/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.22/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.22/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.0.22/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.22/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.22/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.22/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.22/.version +1 -0
- package/.versions/2.0.22/agents/architect.md +24 -0
- package/.versions/2.0.22/agents/bowser.md +28 -0
- package/.versions/2.0.22/agents/builder.md +55 -0
- package/.versions/2.0.22/agents/code-reviewer.md +209 -0
- package/.versions/2.0.22/agents/deep-researcher.md +32 -0
- package/.versions/2.0.22/agents/documenter.md +22 -0
- package/.versions/2.0.22/agents/orchestrator.md +22 -0
- package/.versions/2.0.22/agents/plan-reviewer.md +83 -0
- package/.versions/2.0.22/agents/planner.md +107 -0
- package/.versions/2.0.22/agents/releaser.md +24 -0
- package/.versions/2.0.22/agents/researcher.md +30 -0
- package/.versions/2.0.22/agents/security-auditor.md +167 -0
- package/.versions/2.0.22/agents/test-engineer.md +153 -0
- package/.versions/2.0.22/agents/web-debugger.md +44 -0
- package/.versions/2.0.22/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.22/bin/catalog/harness-runtime-closure.json +73 -0
- package/.versions/2.0.22/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.22/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.22/docs/ARCHITECTURE.md +982 -0
- package/.versions/2.0.22/docs/agent-fleet-setup.md +1103 -0
- package/.versions/2.0.22/docs/claude-code-coms-bridge.md +147 -0
- package/.versions/2.0.22/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.22/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.22/docs/getting-started.md +126 -0
- package/.versions/2.0.22/docs/npm-install.md +535 -0
- package/.versions/2.0.22/docs/pi-extensions.md +455 -0
- package/.versions/2.0.22/docs/pi-setup.md +92 -0
- package/.versions/2.0.22/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.22/install-manifest.json +3210 -0
- package/.versions/2.0.22/justfile +247 -0
- package/.versions/2.0.22/manifest-meta.json +1088 -0
- package/.versions/2.0.22/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.22/references/communication-contract.md +26 -0
- package/.versions/2.0.22/references/definition-of-done.md +67 -0
- package/.versions/2.0.22/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.22/references/observability-checklist.md +92 -0
- package/.versions/2.0.22/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.22/references/performance-checklist.md +236 -0
- package/.versions/2.0.22/references/prompting-patterns.md +380 -0
- package/.versions/2.0.22/references/security-checklist.md +245 -0
- package/.versions/2.0.22/references/testing-patterns.md +235 -0
- package/.versions/2.0.22/references/workflow-authoring.md +304 -0
- package/.versions/2.0.22/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.22/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.22/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.22/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.22/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.0.22/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.22/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.0.22/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.22/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.22/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.22/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.22/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.22/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.22/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.22/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.22/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.22/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.22/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.22/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.22/skills/incremental-implementation/SKILL.md +353 -0
- package/.versions/2.0.22/skills/incremental-implementation.zip +0 -0
- package/.versions/2.0.22/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.22/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.0.22/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.22/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.22/skills/planning-and-task-breakdown/SKILL.md +318 -0
- package/.versions/2.0.22/skills/planning-and-task-breakdown.zip +0 -0
- package/.versions/2.0.22/skills/repository-ai-setup/SKILL.md +135 -0
- package/.versions/2.0.22/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/.versions/2.0.22/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/.versions/2.0.22/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/.versions/2.0.22/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/.versions/2.0.22/skills/repository-ai-setup/references/verify-setup.md +20 -0
- package/.versions/2.0.22/skills/repository-ai-setup.zip +0 -0
- package/.versions/2.0.22/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.22/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.0.22/skills/spec-driven-development.zip +0 -0
- package/.versions/2.0.22/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.0.22/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.23/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/coms-claude-bridge.ts +440 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/coms-cli.ts +430 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +416 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/exec-at-target.ts +10 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/fleet.ts +245 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/flow.ts +166 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +208 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/fleet-command.ts +266 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/flow-command.ts +107 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +238 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/peer-target.ts +1 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/resource-closure.js +1 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/session-launch.ts +56 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/team-snapshot.ts +160 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/package-lock.json +35 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/package.json +9 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/peer-launch.ts +289 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/pi-session.ts +9 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/team-snapshot.ts +245 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/team-up.ts +385 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +181 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/env.ts +36 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/git.ts +99 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +130 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +137 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +37 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/quality.ts +65 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/run.ts +109 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/trace.ts +52 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/writer-lease-race.worker.mjs +36 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +148 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.0.23/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.23/.pi/agents/model-profiles.yaml +134 -0
- package/.versions/2.0.23/.pi/agents/peers.yaml +147 -0
- package/.versions/2.0.23/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.23/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.23/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.23/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.23/.pi/extensions/btw/index.ts +916 -0
- package/.versions/2.0.23/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.23/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.23/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.23/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.23/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.23/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.23/.pi/extensions/compact-and-continue/index.ts +136 -0
- package/.versions/2.0.23/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.23/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.23/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.23/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.23/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.23/.pi/extensions/package.json +9 -0
- package/.versions/2.0.23/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.0.23/.pi/extensions/pi-voice-stt/config.ts +199 -0
- package/.versions/2.0.23/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.23/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.23/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.23/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.23/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/README.md +1527 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/acceptance.ts +200 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/access-approval.ts +141 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/action-authorization.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/agentic-contract.ts +43 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/agentic-evidence.ts +64 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/agentic-hub.ts +55 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/agentic-runtime.ts +56 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/agentic-sources-worker.mjs +4 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/agentic-sources.ts +74 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/agentic-state.ts +23 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/approval-wait.ts +1 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/assist-profile.ts +19 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/budget-recovery.ts +123 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/context.ts +46 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/recover.ts +61 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/config/agents.ts +181 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/config/model-profiles.ts +237 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/config/overrides.ts +166 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context/budgets.ts +152 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-compaction-monitor.ts +35 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-compaction-preflight.ts +21 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-compaction-runtime.ts +69 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-compaction.ts +34 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-continuity-broker.ts +44 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-continuity-child.ts +83 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-continuity-client.ts +22 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-continuity-compat.ts +30 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-continuity-owners.ts +17 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-continuity-registry.ts +8 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-continuity.ts +82 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-pressure.ts +222 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-window.js +108 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/damage-guard-approval.ts +59 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/damage-guard-broker.ts +125 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/damage-guard-contract.ts +22 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/damage-guard-descendant.ts +76 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/damage-guard-hub.ts +256 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/damage-guard-identity.ts +12 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/damage-guard-owners.ts +59 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/damage-guard-state.ts +43 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/damage-guard-test-tsconfig.json +19 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/delegate.ts +478 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/deterministic-fs.ts +195 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-coms.ts +258 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-native-complete.ts +173 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +295 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +255 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-native-types.ts +293 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-native.ts +236 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +27 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +77 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/docs-lane.js +123 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/execution-evidence.ts +96 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/execution-trace.ts +241 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/external-blocker.js +92 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/adapters.ts +88 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/broker-client.ts +62 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/broker.ts +128 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/child-extension.ts +42 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/descendant.ts +67 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/discovery-worker.mjs +15 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/discovery.ts +126 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/evaluate.ts +57 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/hub.ts +170 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/native-context.ts +8 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/native-fixture.test-support.ts +108 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/owners.ts +100 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/results.ts +55 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/runtime.ts +130 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/semantic-profiles.ts +18 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/sources.ts +69 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/state.ts +22 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/filesystem-tool.ts +166 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/fixtures/registration-surface.json +66 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/helpers.ts +270 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/history-projection.ts +116 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/hub-state-audit.js +41 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/index.ts +2617 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/input/completions.ts +82 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +231 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +145 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +90 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/no-progress.ts +622 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/operator-watchdog.ts +97 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/orchestration-activation.ts +109 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/orchestration-route.ts +68 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/policy/work-mode.ts +142 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/presentation.ts +54 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-config.ts +22 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-external-git.ts +82 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-external.ts +142 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-local.ts +89 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-observer.ts +106 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-rules.ts +171 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-runtime.ts +318 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-snapshot.ts +279 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-types.ts +70 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/process-obligations.ts +159 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/prompts/context.ts +55 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/prompts/fragments.ts +86 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/prompts/system-prompt.ts +125 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/recover-state.ts +104 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/recovery-contract.ts +151 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/research/runtime.ts +215 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/research/spawn-run.ts +221 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/return-contract.js +349 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/return-extract.js +77 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/review-closure.ts +43 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/review-continuity.ts +73 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/review-findings.js +96 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/review-reuse.ts +47 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/run-budget.js +342 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/run-namespace.js +93 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/runtime-test-check.ts +68 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/safety-routing.ts +28 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/scope-gate.js +233 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/session-audit.ts +331 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/spawn.ts +665 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/specialist-result-receipt.ts +13 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/specialist-result.ts +69 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/system1-communication-store.ts +217 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/system1-report.ts +275 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/system1-runtime.ts +271 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-continuation.ts +4 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-authorization.ts +151 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-config.ts +21 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-obligations.ts +120 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-runtime.ts +130 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/timeline.ts +72 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +79 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/action-executors.ts +214 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/ask-system1-files.ts +15 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/ask-system1.ts +25 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/context.ts +144 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +88 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +641 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/fleet-tools.ts +201 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/herdr-executors.ts +100 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/run-flow.ts +146 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/spawn-research.ts +67 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tsconfig.json +22 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/types.ts +66 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/context-budget.ts +89 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +155 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/work-mode.ts +186 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
- package/.versions/2.0.23/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.23/.pi/harnesses/ask-user-remote/index.ts +571 -0
- package/.versions/2.0.23/.pi/harnesses/ask-user-remote/questions.ts +159 -0
- package/.versions/2.0.23/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.23/.pi/harnesses/ask-user-remote/runtime-ask.ts +83 -0
- package/.versions/2.0.23/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.23/.pi/harnesses/coms/index.ts +285 -0
- package/.versions/2.0.23/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.23/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.23/.pi/harnesses/damage-control-continue/README.md +161 -0
- package/.versions/2.0.23/.pi/harnesses/damage-control-continue/index.ts +621 -0
- package/.versions/2.0.23/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.23/.pi/harnesses/damage-control-continue/result-screen.ts +98 -0
- package/.versions/2.0.23/.pi/harnesses/damage-control-continue/system1-child.ts +45 -0
- package/.versions/2.0.23/.pi/harnesses/damage-control-continue/system1-client.ts +85 -0
- package/.versions/2.0.23/.pi/harnesses/damage-control-continue/system1-guard.ts +65 -0
- package/.versions/2.0.23/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.23/.pi/harnesses/lib/approval-wait.ts +17 -0
- package/.versions/2.0.23/.pi/harnesses/lib/bash-policy-analysis.ts +185 -0
- package/.versions/2.0.23/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.0.23/.pi/harnesses/lib/clarification-policy.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/lib/coms-core-io.ts +415 -0
- package/.versions/2.0.23/.pi/harnesses/lib/coms-core.ts +686 -0
- package/.versions/2.0.23/.pi/harnesses/lib/coms-registry-entry.ts +99 -0
- package/.versions/2.0.23/.pi/harnesses/lib/context-budget-child-prompt.ts +214 -0
- package/.versions/2.0.23/.pi/harnesses/lib/context-budget-hub-prompt.ts +121 -0
- package/.versions/2.0.23/.pi/harnesses/lib/context-budget-view.ts +112 -0
- package/.versions/2.0.23/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.23/.pi/harnesses/lib/context-compaction-policy.js +35 -0
- package/.versions/2.0.23/.pi/harnesses/lib/damage-action-hash.ts +28 -0
- package/.versions/2.0.23/.pi/harnesses/lib/damage-control-shared.ts +245 -0
- package/.versions/2.0.23/.pi/harnesses/lib/damage-guard-port.ts +25 -0
- package/.versions/2.0.23/.pi/harnesses/lib/damage-policy.ts +35 -0
- package/.versions/2.0.23/.pi/harnesses/lib/damage-result-evidence.ts +25 -0
- package/.versions/2.0.23/.pi/harnesses/lib/damage-result-view.ts +16 -0
- package/.versions/2.0.23/.pi/harnesses/lib/deterministic-handle-path.ts +25 -0
- package/.versions/2.0.23/.pi/harnesses/lib/execution-trace.ts +45 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-dashboard-view.ts +172 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-read-model.ts +609 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.23/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.23/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.23/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.23/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.23/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.23/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.23/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.23/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.23/.pi/harnesses/lib/identical-dialog.ts +27 -0
- package/.versions/2.0.23/.pi/harnesses/lib/installation-state.js +62 -0
- package/.versions/2.0.23/.pi/harnesses/lib/peer-target.ts +24 -0
- package/.versions/2.0.23/.pi/harnesses/lib/policy-roots.js +117 -0
- package/.versions/2.0.23/.pi/harnesses/lib/policy-roots.ts +32 -0
- package/.versions/2.0.23/.pi/harnesses/lib/process-shared.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/lib/resource-closure.js +26 -0
- package/.versions/2.0.23/.pi/harnesses/lib/safe-source-read.js +29 -0
- package/.versions/2.0.23/.pi/harnesses/lib/semantic-approval.ts +80 -0
- package/.versions/2.0.23/.pi/harnesses/lib/session-target.ts +62 -0
- package/.versions/2.0.23/.pi/harnesses/lib/spawned-peers.js +191 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config-agentic.js +15 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config-context-compaction.js +16 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config-damage-guard.js +24 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config-file-discovery.js +23 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config-json.js +37 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config-loader.js +53 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config-proactive.js +68 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config-triage.js +42 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config-v2.js +112 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config.js +50 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/contracts.ts +154 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/demo.ts +95 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/payload-screen.ts +65 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/selection.js +11 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/worktree-scopes.js +110 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/worktree-scopes.ts +13 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/worktree-service.ts +24 -0
- package/.versions/2.0.23/.pi/harnesses/lib/target-capabilities.js +7 -0
- package/.versions/2.0.23/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.23/.pi/harnesses/lib/workspace-context.js +115 -0
- package/.versions/2.0.23/.pi/harnesses/lib/workspace-context.ts +22 -0
- package/.versions/2.0.23/.pi/harnesses/package-lock.json +2121 -0
- package/.versions/2.0.23/.pi/harnesses/package.json +13 -0
- package/.versions/2.0.23/.pi/prompts/af-build.md +27 -0
- package/.versions/2.0.23/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.23/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.0.23/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.23/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.23/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.23/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.23/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.0.23/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.23/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.23/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.23/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.23/.version +1 -0
- package/.versions/2.0.23/agents/architect.md +24 -0
- package/.versions/2.0.23/agents/bowser.md +28 -0
- package/.versions/2.0.23/agents/builder.md +55 -0
- package/.versions/2.0.23/agents/code-reviewer.md +209 -0
- package/.versions/2.0.23/agents/deep-researcher.md +32 -0
- package/.versions/2.0.23/agents/documenter.md +22 -0
- package/.versions/2.0.23/agents/orchestrator.md +22 -0
- package/.versions/2.0.23/agents/plan-reviewer.md +83 -0
- package/.versions/2.0.23/agents/planner.md +107 -0
- package/.versions/2.0.23/agents/releaser.md +24 -0
- package/.versions/2.0.23/agents/researcher.md +30 -0
- package/.versions/2.0.23/agents/security-auditor.md +167 -0
- package/.versions/2.0.23/agents/test-engineer.md +153 -0
- package/.versions/2.0.23/agents/web-debugger.md +44 -0
- package/.versions/2.0.23/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.23/bin/catalog/harness-runtime-closure.json +85 -0
- package/.versions/2.0.23/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.23/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.23/docs/ARCHITECTURE.md +1023 -0
- package/.versions/2.0.23/docs/agent-fleet-setup.md +1106 -0
- package/.versions/2.0.23/docs/claude-code-coms-bridge.md +147 -0
- package/.versions/2.0.23/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.23/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.23/docs/getting-started.md +126 -0
- package/.versions/2.0.23/docs/npm-install.md +535 -0
- package/.versions/2.0.23/docs/pi-extensions.md +455 -0
- package/.versions/2.0.23/docs/pi-setup.md +92 -0
- package/.versions/2.0.23/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.23/install-manifest.json +3251 -0
- package/.versions/2.0.23/justfile +247 -0
- package/.versions/2.0.23/manifest-meta.json +1096 -0
- package/.versions/2.0.23/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.23/references/communication-contract.md +26 -0
- package/.versions/2.0.23/references/definition-of-done.md +67 -0
- package/.versions/2.0.23/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.23/references/observability-checklist.md +92 -0
- package/.versions/2.0.23/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.23/references/performance-checklist.md +236 -0
- package/.versions/2.0.23/references/prompting-patterns.md +380 -0
- package/.versions/2.0.23/references/security-checklist.md +245 -0
- package/.versions/2.0.23/references/testing-patterns.md +235 -0
- package/.versions/2.0.23/references/workflow-authoring.md +304 -0
- package/.versions/2.0.23/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.23/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.23/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.23/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.23/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.0.23/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.23/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.0.23/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.23/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.23/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.23/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.23/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.23/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.23/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.23/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.23/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.23/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.23/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.23/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.23/skills/incremental-implementation/SKILL.md +353 -0
- package/.versions/2.0.23/skills/incremental-implementation.zip +0 -0
- package/.versions/2.0.23/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.23/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.0.23/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.23/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.23/skills/planning-and-task-breakdown/SKILL.md +318 -0
- package/.versions/2.0.23/skills/planning-and-task-breakdown.zip +0 -0
- package/.versions/2.0.23/skills/repository-ai-setup/SKILL.md +135 -0
- package/.versions/2.0.23/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/.versions/2.0.23/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/.versions/2.0.23/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/.versions/2.0.23/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/.versions/2.0.23/skills/repository-ai-setup/references/verify-setup.md +20 -0
- package/.versions/2.0.23/skills/repository-ai-setup.zip +0 -0
- package/.versions/2.0.23/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.23/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.0.23/skills/spec-driven-development.zip +0 -0
- package/.versions/2.0.23/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/CHANGELOG.md +28 -0
- package/README.md +4 -1
- package/agents/architect.md +1 -1
- package/agents/bowser.md +1 -1
- package/agents/builder.md +1 -1
- package/agents/code-reviewer.md +1 -1
- package/agents/deep-researcher.md +1 -1
- package/agents/documenter.md +1 -1
- package/agents/orchestrator.md +1 -1
- package/agents/plan-reviewer.md +1 -1
- package/agents/planner.md +1 -1
- package/agents/releaser.md +1 -1
- package/agents/researcher.md +1 -1
- package/agents/security-auditor.md +1 -1
- package/agents/test-engineer.md +1 -1
- package/agents/web-debugger.md +1 -1
- package/agents/web-performance-auditor.md +1 -1
- package/bin/catalog/harness-runtime-closure.json +12 -0
- package/bin/cli.js +3 -2
- package/docs/ARCHITECTURE.md +47 -3
- package/docs/agent-fleet-setup.md +5 -2
- package/docs/session-worktree-targeting.md +99 -0
- package/docs/system1-damage-guard.md +23 -2
- package/docs/workflows.md +4 -0
- package/install-manifest.json +43 -2
- package/justfile +6 -6
- package/manifest-meta.json +8 -0
- package/package.json +3 -2
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Damage-Control (continue) — fail-closed guardrails without aborting the agent turn
|
|
3
|
+
*
|
|
4
|
+
* On a blocked tool call:
|
|
5
|
+
* - The result is replaced with actionable feedback that
|
|
6
|
+
* distinguishes destructive vs non-destructive intent and tells the
|
|
7
|
+
* agent how to adapt.
|
|
8
|
+
* - We do NOT call ctx.abort(), so the agent's turn continues and can
|
|
9
|
+
* try an alternate path (e.g. assume a .env key exists instead of
|
|
10
|
+
* reading it to verify).
|
|
11
|
+
*
|
|
12
|
+
* On top of the rule engine this variant supports runtime EXEMPTIONS for the
|
|
13
|
+
* path categories (zeroAccessPaths / readOnlyPaths / noDeletePaths) — never
|
|
14
|
+
* for the destructive bashToolPatterns:
|
|
15
|
+
* - /af-allow <pattern> [turn|session] pre-authorizes a protected pattern
|
|
16
|
+
* (/af-allowed lists, /af-revoke removes). Session grants are mirrored into the
|
|
17
|
+
* shared exemptions file when agent-hub provides one, so spawned children
|
|
18
|
+
* inherit them.
|
|
19
|
+
* - In interactive sessions a path block opens a dialog (keep blocked /
|
|
20
|
+
* allow once / turn / session) — an approved call proceeds immediately.
|
|
21
|
+
* - In headless children spawned by agent-hub (ctx.hasUI is false and
|
|
22
|
+
* AGENT_HUB_ASK_ENDPOINT is set) a path block escalates to the hub
|
|
23
|
+
* dispatcher over its coms socket and waits for the user's decision;
|
|
24
|
+
* timeout or denial fails closed.
|
|
25
|
+
*
|
|
26
|
+
* In this repo it is the only supported safety harness: the agent-hub main
|
|
27
|
+
* session and every native specialist, research helper, and nested delegate
|
|
28
|
+
* use it. Missing safety plumbing makes Agent Hub refuse child dispatch.
|
|
29
|
+
* Interactive sessions also schedule the shared Fleet Core update check
|
|
30
|
+
* (../lib/update-check.ts) on session_start — never blocking, never in children.
|
|
31
|
+
*
|
|
32
|
+
* Usage: pi -e .pi/harnesses/damage-control-continue/index.ts
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
36
|
+
import { createSessionTargetGuard } from '../lib/session-target.ts';
|
|
37
|
+
import { readDamagePolicy } from '../lib/damage-policy.ts';
|
|
38
|
+
import { sessionRootsFromEnv } from '../lib/workspace-context.ts';
|
|
39
|
+
import { isToolCallEventType } from "@mariozechner/pi-coding-agent";
|
|
40
|
+
import { beginRuntimeTrace, policyTraceReason, TRACE_OWNER_ENV } from "../lib/execution-trace.ts";
|
|
41
|
+
import { analyzeBashCommand, bashReferencesProtectedPath, bashPolicyText } from "../lib/bash-policy-analysis.ts";
|
|
42
|
+
import { parse as yamlParse } from "yaml";
|
|
43
|
+
import * as crypto from "crypto";
|
|
44
|
+
import * as fs from "fs";
|
|
45
|
+
import * as path from "path";
|
|
46
|
+
import * as os from "os";
|
|
47
|
+
import {
|
|
48
|
+
damageControlPathMatches,
|
|
49
|
+
AGENT_ID_ENV,
|
|
50
|
+
ASK_ENDPOINT_ENV,
|
|
51
|
+
EXEMPTIONS_FILE_ENV,
|
|
52
|
+
appendExemptionToFile,
|
|
53
|
+
fileExemptionsFor,
|
|
54
|
+
readExemptionsFile,
|
|
55
|
+
removeExemptionFromFile,
|
|
56
|
+
requestAccessFromHub,
|
|
57
|
+
type AccessRequest,
|
|
58
|
+
type Exemption,
|
|
59
|
+
type ExemptionScope,
|
|
60
|
+
type PathRuleCategory,
|
|
61
|
+
} from "../lib/damage-control-shared.ts";
|
|
62
|
+
import { registerVersionStatus } from "./version.ts";
|
|
63
|
+
import { scheduleFleetUpdateCheck } from "../lib/update-check.ts";
|
|
64
|
+
import { deterministicHandlePath } from "../lib/deterministic-handle-path.ts";
|
|
65
|
+
import {sharedApprovalWait} from '../lib/approval-wait.ts';
|
|
66
|
+
import {assessDamageCall,takeSpawnedDamageAssignment} from '../lib/damage-guard-port.ts';
|
|
67
|
+
import type {createDamageChild} from './system1-child.ts';
|
|
68
|
+
import {captureDamageResult} from '../lib/damage-result-evidence.ts';
|
|
69
|
+
|
|
70
|
+
interface Rule {
|
|
71
|
+
pattern: string;
|
|
72
|
+
reason: string;
|
|
73
|
+
ask?: boolean;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
interface Rules {
|
|
77
|
+
bashToolPatterns: Rule[];
|
|
78
|
+
zeroAccessPaths: string[];
|
|
79
|
+
readOnlyPaths: string[];
|
|
80
|
+
noDeletePaths: string[];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Cap on hub escalations per agent run, so a confused child cannot flood the
|
|
84
|
+
// dispatcher with approval dialogs. Denials are also cached per turn.
|
|
85
|
+
const MAX_ESCALATIONS_PER_TURN = 3;
|
|
86
|
+
const PROMPT_TIMEOUT_MS = 60_000;
|
|
87
|
+
|
|
88
|
+
function continueFeedback(toolName: string, violationReason: string, invocation: string, note?: string): string {
|
|
89
|
+
return [
|
|
90
|
+
`🛡️ Damage-Control: ${toolName} blocked — ${violationReason}`,
|
|
91
|
+
``,
|
|
92
|
+
`Attempted: ${invocation}`,
|
|
93
|
+
...(note ? [``, note] : []),
|
|
94
|
+
``,
|
|
95
|
+
`Don't call ${toolName} directly like this. Decide which case you're in and continue:`,
|
|
96
|
+
``,
|
|
97
|
+
`→ NON-DESTRUCTIVE (e.g. reading .env to verify a key, listing a protected dir, peeking at config):`,
|
|
98
|
+
` Assume the data is present and correct. Skip the verification step and move on with the task.`,
|
|
99
|
+
` Example: if you were reading .env to confirm a key exists, just assume it does — the user has`,
|
|
100
|
+
` configured their environment. If you actually need a value, ask the user for it explicitly.`,
|
|
101
|
+
``,
|
|
102
|
+
`→ DESTRUCTIVE (delete, overwrite, force-push, drop, rm, truncate, sudo, kill, etc.):`,
|
|
103
|
+
` STOP. Tell the user exactly what you need to ship this task and ask how they want to proceed.`,
|
|
104
|
+
` Do not invent a workaround that achieves the same destructive effect.`,
|
|
105
|
+
``,
|
|
106
|
+
`Pick the right path above and continue working. Do not retry this exact call.`,
|
|
107
|
+
].join("\n");
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export default function (pi: ExtensionAPI, dependencies: {assignment?:unknown} = {}) {
|
|
111
|
+
const sessionTarget=createSessionTargetGuard(pi);
|
|
112
|
+
const assignment=dependencies.assignment!==undefined?dependencies.assignment:takeSpawnedDamageAssignment();
|
|
113
|
+
let baselineEpoch=0;
|
|
114
|
+
let targetPolicyDigest:string|undefined;
|
|
115
|
+
let targetPolicyError:string|undefined;
|
|
116
|
+
function targetPolicyCurrent(cwd:string):boolean {
|
|
117
|
+
if(targetPolicyError)return false;
|
|
118
|
+
if(!process.env.AF_SESSION_ROOTS)return targetPolicyDigest===undefined;
|
|
119
|
+
try { const roots=sessionRootsFromEnv()!;return roots.mode!=='targeted'||(roots.executionRoot===fs.realpathSync(cwd)&&readDamagePolicy(cwd)?.digest===targetPolicyDigest); } catch {return false;}
|
|
120
|
+
}
|
|
121
|
+
let child: ReturnType<typeof createDamageChild> | undefined;
|
|
122
|
+
pi.on('tool_result', event => {
|
|
123
|
+
captureDamageResult(event);
|
|
124
|
+
return child?.result(event);
|
|
125
|
+
});
|
|
126
|
+
const disposeChild = () => { baselineEpoch++; child?.dispose(); child=undefined; };
|
|
127
|
+
// The SDK emits shutdown for committed switch/quit, not cancelled before-switch.
|
|
128
|
+
pi.on("session_shutdown", async () => { disposeChild(); });
|
|
129
|
+
let rules: Rules = {
|
|
130
|
+
bashToolPatterns: [],
|
|
131
|
+
zeroAccessPaths: [],
|
|
132
|
+
readOnlyPaths: [],
|
|
133
|
+
noDeletePaths: [],
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
// Runtime exemptions. Turn-scoped entries (and per-turn denial memory) are
|
|
137
|
+
// cleared on agent_end; session-scoped entries live for the process. The
|
|
138
|
+
// shared exemptions file (agent-hub plumbing) is re-read on every block, so
|
|
139
|
+
// grants made mid-session in the hub apply to already-running children.
|
|
140
|
+
const turnExemptions: Exemption[] = [];
|
|
141
|
+
const sessionExemptions: Exemption[] = [];
|
|
142
|
+
const deniedThisTurn = new Set<string>();
|
|
143
|
+
let escalationsThisTurn = 0;
|
|
144
|
+
|
|
145
|
+
const agentId = () => process.env[AGENT_ID_ENV] || "unknown-agent";
|
|
146
|
+
const askEndpoint = () => process.env[ASK_ENDPOINT_ENV];
|
|
147
|
+
const sharedExemptionsFile = () => process.env[EXEMPTIONS_FILE_ENV];
|
|
148
|
+
|
|
149
|
+
function activeExemptions(): Exemption[] {
|
|
150
|
+
return [...turnExemptions, ...sessionExemptions, ...fileExemptionsFor(sharedExemptionsFile(), agentId())];
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function grantExemption(pattern: string, scope: ExemptionScope, via: Exemption["grantedVia"]): Exemption {
|
|
154
|
+
const ex: Exemption = { pattern, scope, grantedVia: via, grantedAt: new Date().toISOString() };
|
|
155
|
+
(scope === "turn" ? turnExemptions : sessionExemptions).push(ex);
|
|
156
|
+
if (scope === "session") {
|
|
157
|
+
const file = sharedExemptionsFile();
|
|
158
|
+
if (file) {
|
|
159
|
+
try { appendExemptionToFile(file, ex); } catch { /* best-effort — memory copy still applies */ }
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
pi.appendEntry("damage-control-log", { action: "exemption_granted", pattern, scope, via });
|
|
163
|
+
return ex;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function resolvePath(p: string, cwd: string): string {
|
|
167
|
+
if (p.startsWith("~")) {
|
|
168
|
+
p = path.join(os.homedir(), p.slice(1));
|
|
169
|
+
}
|
|
170
|
+
return path.resolve(cwd, p);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function expandTilde(p: string): string {
|
|
174
|
+
return p.startsWith("~") ? path.join(os.homedir(), p.slice(1)) : p;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function commandReferencesPath(command: string, protectedPath: string): boolean {
|
|
178
|
+
if (!protectedPath) return false;
|
|
179
|
+
let idx = command.indexOf(protectedPath);
|
|
180
|
+
while (idx >= 0) {
|
|
181
|
+
const after = command[idx + protectedPath.length];
|
|
182
|
+
if (!after || !/[A-Za-z0-9_-]/.test(after)) return true;
|
|
183
|
+
idx = command.indexOf(protectedPath, idx + 1);
|
|
184
|
+
}
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
// An exemption unlocks the exact protected pattern it names, or any target
|
|
190
|
+
// it would itself match under the same rules the block used.
|
|
191
|
+
function exemptionApplies(ex: Exemption, matchedPattern: string, inputPaths: string[], command: string | null, cwd: string): boolean {
|
|
192
|
+
if (ex.pattern === matchedPattern) return true;
|
|
193
|
+
if (command && command.includes(ex.pattern)) return true;
|
|
194
|
+
for (const p of inputPaths) {
|
|
195
|
+
if (damageControlPathMatches(resolvePath(p, cwd), ex.pattern, cwd)) return true;
|
|
196
|
+
}
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function statusText(): string {
|
|
201
|
+
const total = rules.bashToolPatterns.length + rules.zeroAccessPaths.length + rules.readOnlyPaths.length + rules.noDeletePaths.length;
|
|
202
|
+
const exemptions = turnExemptions.length + sessionExemptions.length + readExemptionsFile(sharedExemptionsFile()).length;
|
|
203
|
+
return exemptions > 0
|
|
204
|
+
? `🛡️ Damage-Control (continue): ${total} Rules, ${exemptions} exemption${exemptions === 1 ? "" : "s"}`
|
|
205
|
+
: `🛡️ Damage-Control (continue): ${total} Rules`;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
pi.registerCommand("af-allow", {
|
|
209
|
+
description: "Damage-control: exempt a protected path pattern — /af-allow <pattern> [turn|session]",
|
|
210
|
+
handler: async (args, ctx) => {
|
|
211
|
+
const parts = args.trim().split(/\s+/).filter(Boolean);
|
|
212
|
+
let scope: ExemptionScope = "session";
|
|
213
|
+
const last = parts[parts.length - 1];
|
|
214
|
+
if (last === "turn" || last === "session") {
|
|
215
|
+
scope = last;
|
|
216
|
+
parts.pop();
|
|
217
|
+
}
|
|
218
|
+
const pattern = parts.join(" ");
|
|
219
|
+
if (!pattern) {
|
|
220
|
+
ctx.ui.notify("Usage: /af-allow <pattern> [turn|session] — e.g. /af-allow .env turn", "warning");
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
const already = activeExemptions().some((e) => e.pattern === pattern && (e.scope === scope || e.scope === "session"));
|
|
224
|
+
if (already) {
|
|
225
|
+
ctx.ui.notify(`🛡️ ${pattern} is already exempted`, "info");
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
grantExemption(pattern, scope, "command");
|
|
229
|
+
ctx.ui.notify(`🛡️ Exemption granted: ${pattern} (${scope})`, "warning");
|
|
230
|
+
ctx.ui.setStatus("damage-control", statusText());
|
|
231
|
+
},
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
pi.registerCommand("af-allowed", {
|
|
235
|
+
description: "Damage-control: list active exemptions",
|
|
236
|
+
handler: async (_args, ctx) => {
|
|
237
|
+
const lines: string[] = [];
|
|
238
|
+
for (const e of turnExemptions) lines.push(`${e.pattern} (turn, via ${e.grantedVia})`);
|
|
239
|
+
for (const e of sessionExemptions) lines.push(`${e.pattern} (session, via ${e.grantedVia})`);
|
|
240
|
+
for (const e of readExemptionsFile(sharedExemptionsFile())) {
|
|
241
|
+
lines.push(`${e.pattern} (session${e.agent ? `, agent ${e.agent}` : ", all agents"}, via ${e.grantedVia})`);
|
|
242
|
+
}
|
|
243
|
+
ctx.ui.notify(lines.length ? `🛡️ Active exemptions:\n${lines.join("\n")}` : "🛡️ No active exemptions", "info");
|
|
244
|
+
},
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
pi.registerCommand("af-revoke", {
|
|
248
|
+
description: "Damage-control: revoke an exemption — /af-revoke <pattern>",
|
|
249
|
+
handler: async (args, ctx) => {
|
|
250
|
+
const pattern = args.trim();
|
|
251
|
+
if (!pattern) {
|
|
252
|
+
ctx.ui.notify("Usage: /af-revoke <pattern>", "warning");
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
let removed = false;
|
|
256
|
+
for (const store of [turnExemptions, sessionExemptions]) {
|
|
257
|
+
for (let i = store.length - 1; i >= 0; i--) {
|
|
258
|
+
if (store[i].pattern === pattern) {
|
|
259
|
+
store.splice(i, 1);
|
|
260
|
+
removed = true;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
if (removeExemptionFromFile(sharedExemptionsFile(), pattern)) removed = true;
|
|
265
|
+
if (removed) {
|
|
266
|
+
pi.appendEntry("damage-control-log", { action: "exemption_revoked", pattern });
|
|
267
|
+
ctx.ui.notify(`🛡️ Exemption revoked: ${pattern}`, "warning");
|
|
268
|
+
} else {
|
|
269
|
+
ctx.ui.notify(`🛡️ No exemption found for: ${pattern}`, "info");
|
|
270
|
+
}
|
|
271
|
+
ctx.ui.setStatus("damage-control", statusText());
|
|
272
|
+
},
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
pi.on("agent_end", async () => {
|
|
276
|
+
baselineEpoch++;
|
|
277
|
+
turnExemptions.length = 0;
|
|
278
|
+
deniedThisTurn.clear();
|
|
279
|
+
escalationsThisTurn = 0;
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
pi.on("session_start", async (_event, ctx) => {
|
|
283
|
+
disposeChild();
|
|
284
|
+
registerVersionStatus(ctx);
|
|
285
|
+
await sessionTarget.start(ctx);
|
|
286
|
+
// Non-blocking: never delay rule loading or session start for a registry fetch.
|
|
287
|
+
scheduleFleetUpdateCheck(ctx);
|
|
288
|
+
targetPolicyDigest=undefined;targetPolicyError=undefined;
|
|
289
|
+
const projectRulesPath = path.join(ctx.cwd, ".pi", "damage-control-rules.yaml");
|
|
290
|
+
const globalRulesPath = path.join(os.homedir(), ".pi", "damage-control-rules.yaml");
|
|
291
|
+
const rulesPath = fs.existsSync(projectRulesPath) ? projectRulesPath : fs.existsSync(globalRulesPath) ? globalRulesPath : null;
|
|
292
|
+
try {
|
|
293
|
+
const roots=sessionRootsFromEnv();
|
|
294
|
+
if(roots?.mode==='targeted') {
|
|
295
|
+
const loaded=readDamagePolicy(ctx.cwd)!;
|
|
296
|
+
rules=loaded.rules;targetPolicyDigest=loaded.digest;
|
|
297
|
+
ctx.ui.notify(`Damage-Control: loaded workspace policy for ${roots.executionRoot}`);
|
|
298
|
+
} else if (rulesPath) {
|
|
299
|
+
const content = fs.readFileSync(rulesPath, "utf8");
|
|
300
|
+
const loaded = yamlParse(content) as Partial<Rules>;
|
|
301
|
+
rules = {
|
|
302
|
+
bashToolPatterns: loaded.bashToolPatterns || [],
|
|
303
|
+
zeroAccessPaths: loaded.zeroAccessPaths || [],
|
|
304
|
+
readOnlyPaths: loaded.readOnlyPaths || [],
|
|
305
|
+
noDeletePaths: loaded.noDeletePaths || [],
|
|
306
|
+
};
|
|
307
|
+
const source = rulesPath === projectRulesPath ? "project" : "global";
|
|
308
|
+
const total = rules.bashToolPatterns.length + rules.zeroAccessPaths.length + rules.readOnlyPaths.length + rules.noDeletePaths.length;
|
|
309
|
+
ctx.ui.notify(`🛡️ Damage-Control (continue): Loaded ${total} rules (${source}). Blocks deliver feedback so the agent can adapt and keep working.`);
|
|
310
|
+
} else {
|
|
311
|
+
ctx.ui.notify("🛡️ Damage-Control (continue): No rules found at .pi/damage-control-rules.yaml (project or global)");
|
|
312
|
+
}
|
|
313
|
+
} catch (err) {
|
|
314
|
+
if(process.env.AF_SESSION_ROOTS)targetPolicyError=String(err);
|
|
315
|
+
ctx.ui.notify(`🛡️ Damage-Control (continue): Failed to load rules: ${err instanceof Error ? err.message : String(err)}`);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
ctx.ui.setStatus("damage-control", statusText());
|
|
319
|
+
if(assignment!==undefined){
|
|
320
|
+
const epoch=baselineEpoch;
|
|
321
|
+
const {createDamageChild}=await import('./system1-child.ts');
|
|
322
|
+
if(epoch===baselineEpoch)child=createDamageChild(assignment);
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
pi.on("tool_call", async (event, ctx) => {
|
|
327
|
+
const targetRefusal=sessionTarget.current(ctx.cwd);if(targetRefusal)return {block:true,reason:`Fleet target refused: ${targetRefusal}; start a new explicitly bound session.`};
|
|
328
|
+
if(!targetPolicyCurrent(ctx.cwd))return {block:true,reason:`Damage-Control: targeted workspace policy is missing, invalid or changed; restart the session. ${targetPolicyError??''}`};
|
|
329
|
+
const finishPolicy=beginRuntimeTrace(pi.events,{kind:'policy',id:`baseline:${event.toolCallId}`,parentId:event.toolCallId,source:'damage-control',tool:event.toolName});
|
|
330
|
+
let policyAnalysis:'static_operands'|'conservative_text'|undefined;
|
|
331
|
+
const evaluate=async()=>{
|
|
332
|
+
// Capture loaded policy before baseline dialogs, not after the user waits.
|
|
333
|
+
const policySnapshot=JSON.stringify(rules),epoch=baselineEpoch;
|
|
334
|
+
const exactCall=JSON.stringify(event),cwd=ctx.cwd;
|
|
335
|
+
const semanticAllow=async()=>{
|
|
336
|
+
const unchanged=()=>targetPolicyCurrent(ctx.cwd)&&epoch===baselineEpoch&&policySnapshot===JSON.stringify(rules)&&exactCall===JSON.stringify(event)&&cwd===ctx.cwd;
|
|
337
|
+
const blocked={block:true,reason:'Damage-Control: baseline authority changed; re-authorize the call.'};
|
|
338
|
+
if(!unchanged())return blocked;
|
|
339
|
+
const snapshot=JSON.stringify([rules,activeExemptions()]);
|
|
340
|
+
const revalidateBaseline=()=>unchanged()&&snapshot===JSON.stringify([rules,activeExemptions()]);
|
|
341
|
+
const result=await assessDamageCall(event,{cwd,revalidateBaseline});
|
|
342
|
+
// Local authority is checked after the asynchronous parent approval, never
|
|
343
|
+
// serialized as evidence and never replaced by the semantic grant.
|
|
344
|
+
return revalidateBaseline()?result:blocked;
|
|
345
|
+
};
|
|
346
|
+
let violationReason: string | null = null;
|
|
347
|
+
let shouldAsk = false;
|
|
348
|
+
// The protected pattern that matched, set only for the path categories —
|
|
349
|
+
// those are exemptible/escalatable. Destructive bashToolPatterns leave
|
|
350
|
+
// this null and can never be exempted.
|
|
351
|
+
let matchedPattern: string | null = null;
|
|
352
|
+
let matchedCategory: PathRuleCategory | null = null;
|
|
353
|
+
|
|
354
|
+
const checkPaths = (pathsToCheck: string[]) => {
|
|
355
|
+
for (const p of pathsToCheck) {
|
|
356
|
+
const resolved = resolvePath(p, ctx.cwd);
|
|
357
|
+
for (const zap of rules.zeroAccessPaths) {
|
|
358
|
+
if (damageControlPathMatches(resolved, zap, ctx.cwd)) {
|
|
359
|
+
matchedPattern = zap;
|
|
360
|
+
matchedCategory = "zero_access";
|
|
361
|
+
return `Access to zero-access path restricted: ${zap}`;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
return null;
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
const inputPaths: string[] = [];
|
|
369
|
+
if (isToolCallEventType("read", event) || isToolCallEventType("write", event) || isToolCallEventType("edit", event)) {
|
|
370
|
+
inputPaths.push(event.input.path);
|
|
371
|
+
} else if (isToolCallEventType("grep", event) || isToolCallEventType("find", event) || isToolCallEventType("ls", event)) {
|
|
372
|
+
inputPaths.push(event.input.path || ".");
|
|
373
|
+
} else if (event.toolName === "submit_result") {
|
|
374
|
+
// Submission hashes evidence files; enforce the same read policy first.
|
|
375
|
+
for (const ref of Array.isArray((event.input as any).evidence) ? (event.input as any).evidence : []) {
|
|
376
|
+
if (typeof ref?.path === "string") {
|
|
377
|
+
inputPaths.push(ref.path);
|
|
378
|
+
try { inputPaths.push(fs.realpathSync(path.resolve(ctx.cwd,ref.path))); } catch { /* submission validates missing files */ }
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
} else if (event.toolName === "filesystem") {
|
|
382
|
+
// Reuse the same path-policy/exemption/approval pipeline as built-in reads.
|
|
383
|
+
// Handle decoding is metadata-only: policy runs before any source bytes are read.
|
|
384
|
+
if (typeof (event.input as any).path === "string") inputPaths.push((event.input as any).path);
|
|
385
|
+
if (typeof (event.input as any).handle === "string") {
|
|
386
|
+
try { inputPaths.push(deterministicHandlePath((event.input as any).handle)); }
|
|
387
|
+
catch { /* the filesystem tool itself refuses malformed handles */ }
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
if (isToolCallEventType("grep", event) && event.input.glob) {
|
|
392
|
+
for (const zap of rules.zeroAccessPaths) {
|
|
393
|
+
if (event.input.glob.includes(zap) || damageControlPathMatches(event.input.glob, zap, ctx.cwd)) {
|
|
394
|
+
violationReason = `Glob matches zero-access path: ${zap}`;
|
|
395
|
+
matchedPattern = zap;
|
|
396
|
+
matchedCategory = "zero_access";
|
|
397
|
+
break;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// find's required `pattern` is a filename glob (e.g. "*.env") — the `path` check
|
|
403
|
+
// above only sees the search root ("."), so check the pattern too, mirroring grep's glob.
|
|
404
|
+
if (!violationReason && isToolCallEventType("find", event) && event.input.pattern) {
|
|
405
|
+
for (const zap of rules.zeroAccessPaths) {
|
|
406
|
+
if (event.input.pattern.includes(zap) || damageControlPathMatches(event.input.pattern, zap, ctx.cwd)) {
|
|
407
|
+
violationReason = `Find pattern matches zero-access path: ${zap}`;
|
|
408
|
+
matchedPattern = zap;
|
|
409
|
+
matchedCategory = "zero_access";
|
|
410
|
+
break;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
if (!violationReason) {
|
|
416
|
+
violationReason = checkPaths(inputPaths);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
if (!violationReason) {
|
|
420
|
+
if (isToolCallEventType("bash", event)) {
|
|
421
|
+
const command = bashPolicyText(event.input.command);
|
|
422
|
+
const analysis = analyzeBashCommand(command);
|
|
423
|
+
policyAnalysis = analysis ? 'static_operands' : 'conservative_text';
|
|
424
|
+
|
|
425
|
+
for (const rule of rules.bashToolPatterns) {
|
|
426
|
+
const regex = new RegExp(rule.pattern);
|
|
427
|
+
if (regex.test(analysis?.patternText ?? command)) {
|
|
428
|
+
violationReason = rule.reason;
|
|
429
|
+
shouldAsk = !!rule.ask;
|
|
430
|
+
break;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
if (!violationReason) {
|
|
435
|
+
for (const zap of rules.zeroAccessPaths) {
|
|
436
|
+
if (analysis ? bashReferencesProtectedPath(analysis, "zero_access", zap, ctx.cwd) : command.includes(zap)) {
|
|
437
|
+
violationReason = `Bash command references zero-access path: ${zap}`;
|
|
438
|
+
matchedPattern = zap;
|
|
439
|
+
matchedCategory = "zero_access";
|
|
440
|
+
break;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
if (!violationReason) {
|
|
446
|
+
for (const rop of rules.readOnlyPaths) {
|
|
447
|
+
if (analysis ? bashReferencesProtectedPath(analysis, "read_only", rop, ctx.cwd) : command.includes(rop) && (/[\s>|]/.test(command) || command.includes("rm") || command.includes("mv") || command.includes("sed"))) {
|
|
448
|
+
violationReason = `Bash command may modify read-only path: ${rop}`;
|
|
449
|
+
matchedPattern = rop;
|
|
450
|
+
matchedCategory = "read_only";
|
|
451
|
+
break;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
if (!violationReason) {
|
|
457
|
+
const hasDeleteOrMove = analysis || /\brm\b/.test(command) || /\bmv\b/.test(command);
|
|
458
|
+
if (hasDeleteOrMove) {
|
|
459
|
+
for (const ndp of rules.noDeletePaths) {
|
|
460
|
+
const expanded = expandTilde(ndp);
|
|
461
|
+
const matched = analysis ? bashReferencesProtectedPath(analysis, "no_delete", ndp, ctx.cwd) : commandReferencesPath(command, ndp) || (expanded !== ndp && commandReferencesPath(command, expanded));
|
|
462
|
+
if (matched) {
|
|
463
|
+
violationReason = `Bash command attempts to delete/move protected path: ${ndp}`;
|
|
464
|
+
matchedPattern = ndp;
|
|
465
|
+
matchedCategory = "no_delete";
|
|
466
|
+
break;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
} else if (isToolCallEventType("write", event) || isToolCallEventType("edit", event)) {
|
|
472
|
+
for (const p of inputPaths) {
|
|
473
|
+
const resolved = resolvePath(p, ctx.cwd);
|
|
474
|
+
for (const rop of rules.readOnlyPaths) {
|
|
475
|
+
if (damageControlPathMatches(resolved, rop, ctx.cwd)) {
|
|
476
|
+
violationReason = `Modification of read-only path restricted: ${rop}`;
|
|
477
|
+
matchedPattern = rop;
|
|
478
|
+
matchedCategory = "read_only";
|
|
479
|
+
break;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
if (!violationReason) {
|
|
487
|
+
return semanticAllow();
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
const command = isToolCallEventType("bash", event) ? event.input.command : null;
|
|
491
|
+
const invocation = command ?? JSON.stringify(event.input);
|
|
492
|
+
|
|
493
|
+
// ── exemption layer (path categories only) ──
|
|
494
|
+
if (matchedPattern) {
|
|
495
|
+
const exempted = activeExemptions().find((ex) => exemptionApplies(ex, matchedPattern!, inputPaths, command, ctx.cwd));
|
|
496
|
+
if (exempted) {
|
|
497
|
+
pi.appendEntry("damage-control-log", { tool: event.toolName, input: event.input, rule: violationReason, action: "exempted", pattern: exempted.pattern, scope: exempted.scope });
|
|
498
|
+
ctx.ui.notify(`🛡️ Damage-Control: ${event.toolName} allowed by exemption ${exempted.pattern} (${exempted.scope})`, "warning");
|
|
499
|
+
return semanticAllow();
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
if (!deniedThisTurn.has(matchedPattern)) {
|
|
503
|
+
if (ctx.hasUI) {
|
|
504
|
+
// Interactive session: ask the user right now. An approved call
|
|
505
|
+
// proceeds immediately — the agent never sees the block.
|
|
506
|
+
const KEEP = "Keep blocked";
|
|
507
|
+
const ONCE = "Allow once";
|
|
508
|
+
const TURN = "Allow for this turn";
|
|
509
|
+
const SESSION = "Allow for this session";
|
|
510
|
+
const choices = matchedCategory === "no_delete"
|
|
511
|
+
? [KEEP, ONCE]
|
|
512
|
+
: [KEEP, ONCE, TURN, SESSION];
|
|
513
|
+
const finishQueue=beginRuntimeTrace(pi.events,{kind:'queue',id:`baseline:${event.toolCallId}`,parentId:event.toolCallId,source:'damage-control',reason:'approval_queue'});
|
|
514
|
+
const choice = await sharedApprovalWait.run(async signal=>{
|
|
515
|
+
finishQueue({status:'completed'});
|
|
516
|
+
const finish=beginRuntimeTrace(pi.events,{kind:'approval',id:`baseline:${event.toolCallId}`,parentId:event.toolCallId,source:'damage-control',rule:matchedPattern!});
|
|
517
|
+
try{const selected=await ctx.ui.select(
|
|
518
|
+
`🛡️ Blocked: ${event.toolName} — ${violationReason}`,
|
|
519
|
+
choices,
|
|
520
|
+
{ timeout: PROMPT_TIMEOUT_MS, signal },
|
|
521
|
+
);finish({status:selected===KEEP?'denied':selected?'allowed':'cancelled'});return selected;
|
|
522
|
+
}catch(error){finish({status:'failed'});throw error;}
|
|
523
|
+
}).finally(()=>finishQueue({status:'cancelled'}));
|
|
524
|
+
if (choice === ONCE) {
|
|
525
|
+
pi.appendEntry("damage-control-log", { tool: event.toolName, input: event.input, rule: violationReason, action: "allowed_once", pattern: matchedPattern });
|
|
526
|
+
return semanticAllow();
|
|
527
|
+
}
|
|
528
|
+
if (choice === TURN || choice === SESSION) {
|
|
529
|
+
grantExemption(matchedPattern, choice === TURN ? "turn" : "session", "prompt");
|
|
530
|
+
ctx.ui.setStatus("damage-control", statusText());
|
|
531
|
+
return semanticAllow();
|
|
532
|
+
}
|
|
533
|
+
const note = choice === KEEP
|
|
534
|
+
? `The user reviewed this call and kept the block in place.`
|
|
535
|
+
: `The user did not answer the approval dialog in time (auto-kept blocked). They can pre-authorize with /af-allow ${matchedPattern} [turn|session].`;
|
|
536
|
+
if (choice === KEEP) deniedThisTurn.add(matchedPattern);
|
|
537
|
+
ctx.ui.setStatus("damage-control", `⚠️ Last Violation: ${violationReason.slice(0, 30)}...`);
|
|
538
|
+
pi.appendEntry("damage-control-log", { tool: event.toolName, input: event.input, rule: violationReason, action: choice === KEEP ? "blocked_by_user" : "blocked_prompt_timeout" });
|
|
539
|
+
return { block: true, reason: continueFeedback(event.toolName, violationReason, invocation, note) };
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
const endpoint = askEndpoint();
|
|
543
|
+
if (endpoint && escalationsThisTurn < MAX_ESCALATIONS_PER_TURN) {
|
|
544
|
+
// Headless child spawned by agent-hub: escalate to the dispatcher
|
|
545
|
+
// and wait for the user's decision (fail closed on timeout/error).
|
|
546
|
+
escalationsThisTurn++;
|
|
547
|
+
const req: AccessRequest = {
|
|
548
|
+
type: "access_request",
|
|
549
|
+
msg_id: crypto.randomUUID(),
|
|
550
|
+
sender_session: agentId(),
|
|
551
|
+
sender_endpoint: "",
|
|
552
|
+
hops: 0,
|
|
553
|
+
timestamp: new Date().toISOString(),
|
|
554
|
+
agent: agentId(),
|
|
555
|
+
tool: event.toolName,
|
|
556
|
+
toolCallId: event.toolCallId,
|
|
557
|
+
traceOwner: process.env[TRACE_OWNER_ENV],
|
|
558
|
+
rule: violationReason,
|
|
559
|
+
pattern: matchedPattern,
|
|
560
|
+
category: matchedCategory!,
|
|
561
|
+
invocation: invocation.slice(0, 500),
|
|
562
|
+
};
|
|
563
|
+
const decision = await requestAccessFromHub(endpoint, req);
|
|
564
|
+
if (decision === "allow_once") {
|
|
565
|
+
pi.appendEntry("damage-control-log", { tool: event.toolName, input: event.input, rule: violationReason, action: "allowed_once", pattern: matchedPattern, via: "escalation" });
|
|
566
|
+
return semanticAllow();
|
|
567
|
+
}
|
|
568
|
+
if (decision === "allow_agent" || decision === "allow_all") {
|
|
569
|
+
// The hub persisted the grant to the shared file; keep a memory
|
|
570
|
+
// copy too so this run doesn't depend on re-reading it.
|
|
571
|
+
sessionExemptions.push({ pattern: matchedPattern, scope: "session", grantedVia: "escalation", grantedAt: new Date().toISOString() });
|
|
572
|
+
pi.appendEntry("damage-control-log", { tool: event.toolName, input: event.input, rule: violationReason, action: decision === "allow_all" ? "allowed_all_agents" : "allowed_this_agent", pattern: matchedPattern, via: "escalation" });
|
|
573
|
+
return semanticAllow();
|
|
574
|
+
}
|
|
575
|
+
deniedThisTurn.add(matchedPattern);
|
|
576
|
+
const note = decision === "deny"
|
|
577
|
+
? `This block was escalated to the user via the dispatcher and the user DENIED access.`
|
|
578
|
+
: decision === "timeout"
|
|
579
|
+
? `This block was escalated to the user via the dispatcher but the approval request timed out (auto-kept blocked). If access to this path is essential, say so explicitly in your final response so the user can grant it and re-dispatch you.`
|
|
580
|
+
: `Escalating this block to the dispatcher failed (hub unreachable).`;
|
|
581
|
+
pi.appendEntry("damage-control-log", { tool: event.toolName, input: event.input, rule: violationReason, action: `escalation_${decision}`, pattern: matchedPattern });
|
|
582
|
+
return { block: true, reason: continueFeedback(event.toolName, violationReason, invocation, note) };
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
if (shouldAsk) {
|
|
588
|
+
const finishQueue=beginRuntimeTrace(pi.events,{kind:'queue',id:`destructive:${event.toolCallId}`,parentId:event.toolCallId,source:'damage-control',reason:'approval_queue'});
|
|
589
|
+
const confirmed = await sharedApprovalWait.run(async signal=>{
|
|
590
|
+
finishQueue({status:'completed'});
|
|
591
|
+
const finish=beginRuntimeTrace(pi.events,{kind:'approval',id:`destructive:${event.toolCallId}`,parentId:event.toolCallId,source:'damage-control',rule:violationReason!});
|
|
592
|
+
try{const selected=await ctx.ui.confirm(
|
|
593
|
+
"🛡️ Damage-Control Confirmation",
|
|
594
|
+
`Dangerous command detected: ${violationReason}\n\nCommand: ${invocation}\n\nDo you want to proceed?`,
|
|
595
|
+
{ timeout: 30000, signal },
|
|
596
|
+
);finish({status:selected?'allowed':'denied'});return selected;
|
|
597
|
+
}catch(error){finish({status:'failed'});throw error;}
|
|
598
|
+
}).finally(()=>finishQueue({status:'cancelled'}));
|
|
599
|
+
|
|
600
|
+
if (!confirmed) {
|
|
601
|
+
ctx.ui.setStatus("damage-control", `⚠️ Last Violation Blocked: ${violationReason.slice(0, 30)}...`);
|
|
602
|
+
pi.appendEntry("damage-control-log", { tool: event.toolName, input: event.input, rule: violationReason, action: "blocked_by_user" });
|
|
603
|
+
return { block: true, reason: continueFeedback(event.toolName, `${violationReason} (user denied)`, invocation) };
|
|
604
|
+
} else {
|
|
605
|
+
pi.appendEntry("damage-control-log", { tool: event.toolName, input: event.input, rule: violationReason, action: "confirmed_by_user" });
|
|
606
|
+
return semanticAllow();
|
|
607
|
+
}
|
|
608
|
+
} else {
|
|
609
|
+
const note = matchedPattern
|
|
610
|
+
? `The user can pre-authorize this path with /af-allow ${matchedPattern} [turn|session] in a damage-control-continue session.`
|
|
611
|
+
: undefined;
|
|
612
|
+
ctx.ui.notify(`🛑 Damage-Control: Blocked ${event.toolName} (${violationReason}) — agent will adapt and continue.`);
|
|
613
|
+
ctx.ui.setStatus("damage-control", `⚠️ Last Violation: ${violationReason.slice(0, 30)}...`);
|
|
614
|
+
pi.appendEntry("damage-control-log", { tool: event.toolName, input: event.input, rule: violationReason, action: "blocked" });
|
|
615
|
+
return { block: true, reason: continueFeedback(event.toolName, violationReason, invocation, note) };
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
try{const result=await evaluate();finishPolicy({status:result?.block?'blocked':'allowed',analysis:policyAnalysis,...(result?.reason?{rule:result.reason.split('\n',1)[0],reason:policyTraceReason(result.reason)}:{})});return result;}
|
|
619
|
+
catch(error){finishPolicy({status:'failed'});throw error;}
|
|
620
|
+
});
|
|
621
|
+
}
|