@chankov/agent-fleet 2.1.0 → 2.1.1
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/lib/codex-desktop-queue-host.ts +9 -25
- package/.pi/agent-fleet/scripts/lib/fleet-codex-allowlist-store.ts +31 -13
- package/.pi/agent-fleet/scripts/lib/fleet-codex-answer-transport.ts +2 -1
- package/.pi/agent-fleet/scripts/lib/fleet-codex-connections.ts +70 -0
- package/.pi/agent-fleet/scripts/lib/fleet-codex-event-reply.ts +9 -4
- package/.pi/agent-fleet/scripts/lib/fleet-codex-event-runtime.ts +22 -17
- package/.pi/agent-fleet/scripts/lib/fleet-codex-instruction-store.ts +2 -2
- package/.pi/agent-fleet/scripts/lib/fleet-codex-instructions.ts +1 -1
- package/.pi/agent-fleet/scripts/lib/fleet-codex-local-mcp.ts +30 -8
- package/.pi/agent-fleet/scripts/lib/fleet-codex-permission-transport.ts +4 -4
- package/.pi/agent-fleet/scripts/lib/fleet-codex-permissions.ts +3 -1
- package/.pi/agent-fleet/scripts/lib/fleet-codex-readonly.ts +1 -1
- package/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +3 -0
- package/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +3 -1
- package/.pi/harnesses/agent-hub/index.ts +30 -7
- package/.pi/harnesses/agent-hub/no-progress.ts +4 -4
- package/.pi/harnesses/agent-hub/package.json +1 -1
- package/.pi/harnesses/agent-hub/private-config-current-state.ts +81 -0
- package/.pi/harnesses/agent-hub/private-config-fixtures.ts +26 -0
- package/.pi/harnesses/agent-hub/private-config-review.ts +100 -0
- package/.pi/harnesses/agent-hub/process-obligations.ts +21 -8
- package/.pi/harnesses/agent-hub/runtime-receipts.ts +3 -0
- package/.pi/harnesses/agent-hub/runtime-test-check.ts +8 -2
- package/.pi/harnesses/agent-hub/task-resume-contract.ts +5 -0
- package/.pi/harnesses/agent-hub/tools/action-executors.ts +4 -2
- package/.pi/harnesses/agent-hub/tools/context.ts +3 -1
- package/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +14 -12
- package/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +59 -16
- package/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +8 -2
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/harnesses/lib/fleet-codex-event-bridge.ts +2 -1
- package/.pi/harnesses/lib/fleet-connection-control.ts +77 -0
- package/.pi/harnesses/lib/fleet-notification-validation.ts +66 -0
- package/.pi/harnesses/lib/fleet-question-reference.ts +42 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.1.1/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.1.1/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/coms-claude-bridge.ts +440 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/coms-cli.ts +430 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +416 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/exec-at-target.ts +10 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/fixtures/fleet-codex-allowlist-store-child.ts +31 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/fleet-codex-local-mcp.mjs +26 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/fleet-codex-local-mcp.ts +59 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/fleet.ts +248 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/flow.ts +166 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +208 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/codex-desktop-queue-host.ts +106 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/codex-unix-queue-rpc.ts +91 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-allowlist-store.ts +367 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-allowlist.ts +175 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-answer-transport.ts +73 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-answers.ts +74 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-connections.ts +70 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-event-reply.ts +58 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-event-runtime.ts +116 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-instruction-store.ts +428 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-instruction-transport.ts +160 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-instructions.ts +173 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-local-mcp.ts +406 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-native-history.ts +215 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-observation-store.ts +208 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-observe-transport.ts +49 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-observe.ts +93 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-overview.ts +52 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-permission-transport.ts +23 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-permissions.ts +83 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-readonly.ts +213 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-relay-latency.ts +45 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-codex-resync.ts +212 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/fleet-command.ts +268 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/flow-command.ts +107 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +238 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/peer-target.ts +1 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/resource-closure.js +1 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/session-launch.ts +56 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/lib/team-snapshot.ts +160 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/package-lock.json +57 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/package.json +10 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/peer-launch.ts +289 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/pi-session.ts +9 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/team-snapshot.ts +245 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/team-up.ts +385 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +181 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/env.ts +36 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/git.ts +99 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +130 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +137 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +37 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/quality.ts +65 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/run.ts +109 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/trace.ts +52 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/writer-lease-race.worker.mjs +36 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +148 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.1.1/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.1.1/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.1.1/.pi/agents/model-profiles.yaml +134 -0
- package/.versions/2.1.1/.pi/agents/peers.yaml +147 -0
- package/.versions/2.1.1/.pi/agents/teams.yaml +41 -0
- package/.versions/2.1.1/.pi/agents/voices.yaml +13 -0
- package/.versions/2.1.1/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.1.1/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.1.1/.pi/extensions/btw/index.ts +916 -0
- package/.versions/2.1.1/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.1.1/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.1.1/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.1.1/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.1.1/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.1.1/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.1.1/.pi/extensions/compact-and-continue/index.ts +136 -0
- package/.versions/2.1.1/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.1.1/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.1.1/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.1.1/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.1.1/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.1.1/.pi/extensions/package.json +9 -0
- package/.versions/2.1.1/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.1.1/.pi/extensions/pi-voice-stt/config.ts +199 -0
- package/.versions/2.1.1/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.1.1/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.1.1/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.1.1/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.1.1/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/README.md +1584 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/acceptance.ts +204 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/access-approval.ts +266 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/action-authorization.ts +10 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/agentic-contract.ts +43 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/agentic-evidence.ts +64 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/agentic-hub.ts +55 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/agentic-runtime.ts +56 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/agentic-sources-worker.mjs +4 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/agentic-sources.ts +74 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/agentic-state.ts +23 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/approval-wait.ts +1 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/assertion-ledger.js +68 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/assist-profile.ts +19 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/budget-recovery.ts +123 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/config.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/context.ts +47 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/recover.ts +61 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/config/agents.ts +181 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/config/model-profiles.ts +237 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/config/overrides.ts +166 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/context/budgets.ts +152 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/context-compaction-monitor.ts +35 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/context-compaction-preflight.ts +21 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/context-compaction-runtime.ts +69 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/context-compaction.ts +34 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/context-continuity-broker.ts +44 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/context-continuity-child.ts +83 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/context-continuity-client.ts +22 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/context-continuity-compat.ts +30 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/context-continuity-owners.ts +17 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/context-continuity-registry.ts +8 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/context-continuity.ts +82 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/context-pressure.ts +222 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/context-window.js +108 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/damage-guard-approval.ts +83 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/damage-guard-broker.ts +125 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/damage-guard-contract.ts +22 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/damage-guard-descendant.ts +76 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/damage-guard-hub.ts +263 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/damage-guard-identity.ts +12 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/damage-guard-owners.ts +59 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/damage-guard-state.ts +43 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/damage-guard-test-tsconfig.json +19 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/delegate.ts +478 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/deterministic-fs.ts +195 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/dispatch-coms.ts +258 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/dispatch-native-complete.ts +176 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +301 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +262 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/dispatch-native-types.ts +293 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/dispatch-native.ts +236 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +27 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +77 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/docs-lane.js +123 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/execution-evidence.ts +96 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/execution-trace.ts +241 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/external-blocker.js +92 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/file-discovery/adapters.ts +88 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/file-discovery/broker-client.ts +62 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/file-discovery/broker.ts +128 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/file-discovery/child-extension.ts +42 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/file-discovery/descendant.ts +67 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/file-discovery/discovery-worker.mjs +15 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/file-discovery/discovery.ts +126 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/file-discovery/evaluate.ts +57 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/file-discovery/hub.ts +170 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/file-discovery/native-context.ts +8 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/file-discovery/native-fixture.test-support.ts +108 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/file-discovery/owners.ts +100 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/file-discovery/results.ts +55 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/file-discovery/runtime.ts +130 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/file-discovery/semantic-profiles.ts +18 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/file-discovery/sources.ts +69 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/file-discovery/state.ts +22 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/filesystem-tool.ts +166 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/fixtures/registration-surface.json +68 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/helpers.ts +270 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/history-projection.ts +116 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/hub-state-audit.js +41 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/index.ts +2705 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/input/completions.ts +82 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/input/shortcuts.ts +23 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +231 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +145 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +90 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/no-progress.ts +622 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/operator-current-state.ts +53 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/operator-watchdog.ts +97 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/orchestration-activation.ts +109 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/orchestration-route.ts +68 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/permission-channel.ts +87 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/permission-relay.ts +84 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/policy/work-mode.ts +142 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/presentation.ts +54 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/private-config-current-state.ts +81 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/private-config-fixtures.ts +26 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/private-config-review.ts +100 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/proactive-config.ts +22 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/proactive-external-git.ts +82 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/proactive-external.ts +142 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/proactive-local.ts +89 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/proactive-observer.ts +106 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/proactive-rules.ts +171 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/proactive-runtime.ts +318 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/proactive-snapshot.ts +279 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/proactive-types.ts +70 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/process-obligations.ts +177 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/prompts/context.ts +55 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/prompts/fragments.ts +86 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/prompts/system-prompt.ts +125 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/recover-state.ts +104 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/recovery-contract.ts +151 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/research/runtime.ts +215 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/research/spawn-run.ts +221 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/return-contract.js +371 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/return-extract.js +77 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/review-closure.ts +43 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/review-continuity.ts +73 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/review-findings.js +96 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/review-reuse.ts +47 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/review-verdict.ts +6 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/run-budget.js +342 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/run-namespace.js +93 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/runtime-receipts.ts +63 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/runtime-test-check.ts +85 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/safety-routing.ts +28 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/scope-gate.js +233 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/session-audit.ts +331 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/spawn.ts +702 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/specialist-result-receipt.ts +13 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/specialist-result.ts +78 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/system1-communication-store.ts +225 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/system1-report.ts +275 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/system1-runtime.ts +271 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/task-continuation.ts +4 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/task-resume-contract.ts +80 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/task-triage-authorization.ts +170 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/task-triage-config.ts +21 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/task-triage-obligations.ts +120 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/task-triage-runtime.ts +130 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/timeline.ts +72 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +79 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tools/action-executors.ts +216 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tools/ask-system1-files.ts +15 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tools/ask-system1.ts +25 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tools/context.ts +147 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +92 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +777 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tools/fleet-tools.ts +201 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tools/herdr-executors.ts +100 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tools/run-flow.ts +146 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tools/spawn-research.ts +67 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tools/verification-contract.ts +81 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/tsconfig.json +22 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/types.ts +66 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/ui/context-budget.ts +89 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +163 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/work-mode.ts +188 -0
- package/.versions/2.1.1/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
- package/.versions/2.1.1/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.1.1/.pi/harnesses/ask-user-remote/index.ts +571 -0
- package/.versions/2.1.1/.pi/harnesses/ask-user-remote/questions.ts +206 -0
- package/.versions/2.1.1/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.1.1/.pi/harnesses/ask-user-remote/runtime-ask.ts +90 -0
- package/.versions/2.1.1/.pi/harnesses/coms/README.md +105 -0
- package/.versions/2.1.1/.pi/harnesses/coms/index.ts +308 -0
- package/.versions/2.1.1/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.1.1/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.1.1/.pi/harnesses/damage-control-continue/README.md +161 -0
- package/.versions/2.1.1/.pi/harnesses/damage-control-continue/index.ts +659 -0
- package/.versions/2.1.1/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.1.1/.pi/harnesses/damage-control-continue/result-screen.ts +98 -0
- package/.versions/2.1.1/.pi/harnesses/damage-control-continue/system1-child.ts +45 -0
- package/.versions/2.1.1/.pi/harnesses/damage-control-continue/system1-client.ts +85 -0
- package/.versions/2.1.1/.pi/harnesses/damage-control-continue/system1-guard.ts +65 -0
- package/.versions/2.1.1/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.1.1/.pi/harnesses/lib/approval-wait.ts +17 -0
- package/.versions/2.1.1/.pi/harnesses/lib/bash-policy-analysis.ts +185 -0
- package/.versions/2.1.1/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.1.1/.pi/harnesses/lib/clarification-policy.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/lib/coms-core-io.ts +422 -0
- package/.versions/2.1.1/.pi/harnesses/lib/coms-core.ts +720 -0
- package/.versions/2.1.1/.pi/harnesses/lib/coms-instruction-receipts.ts +113 -0
- package/.versions/2.1.1/.pi/harnesses/lib/coms-observation.ts +74 -0
- package/.versions/2.1.1/.pi/harnesses/lib/coms-registry-entry.ts +99 -0
- package/.versions/2.1.1/.pi/harnesses/lib/context-budget-child-prompt.ts +214 -0
- package/.versions/2.1.1/.pi/harnesses/lib/context-budget-hub-prompt.ts +121 -0
- package/.versions/2.1.1/.pi/harnesses/lib/context-budget-view.ts +112 -0
- package/.versions/2.1.1/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.1.1/.pi/harnesses/lib/context-compaction-policy.js +35 -0
- package/.versions/2.1.1/.pi/harnesses/lib/damage-action-hash.ts +28 -0
- package/.versions/2.1.1/.pi/harnesses/lib/damage-auto-policy.ts +52 -0
- package/.versions/2.1.1/.pi/harnesses/lib/damage-control-presentation.ts +14 -0
- package/.versions/2.1.1/.pi/harnesses/lib/damage-control-shared.ts +276 -0
- package/.versions/2.1.1/.pi/harnesses/lib/damage-guard-port.ts +25 -0
- package/.versions/2.1.1/.pi/harnesses/lib/damage-policy.ts +35 -0
- package/.versions/2.1.1/.pi/harnesses/lib/damage-result-evidence.ts +25 -0
- package/.versions/2.1.1/.pi/harnesses/lib/damage-result-view.ts +16 -0
- package/.versions/2.1.1/.pi/harnesses/lib/deterministic-handle-path.ts +25 -0
- package/.versions/2.1.1/.pi/harnesses/lib/exact-permission-port.ts +38 -0
- package/.versions/2.1.1/.pi/harnesses/lib/execution-trace.ts +45 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-codex-event-bridge.ts +82 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-config/cli-bridge.ts +111 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-config/mutations.ts +201 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-config/snapshot.ts +417 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-config/transition.ts +68 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-config/ui.ts +269 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-config/view.ts +338 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-connection-control.ts +77 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-dashboard-view.ts +174 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-event-source.ts +21 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-notification-validation.ts +66 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-question-reference.ts +42 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-read-model.ts +609 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
- package/.versions/2.1.1/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.1.1/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.1.1/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.1.1/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.1.1/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.1.1/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.1.1/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.1.1/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.1.1/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.1.1/.pi/harnesses/lib/identical-dialog.ts +27 -0
- package/.versions/2.1.1/.pi/harnesses/lib/installation-state.js +62 -0
- package/.versions/2.1.1/.pi/harnesses/lib/peer-target.ts +24 -0
- package/.versions/2.1.1/.pi/harnesses/lib/policy-roots.js +117 -0
- package/.versions/2.1.1/.pi/harnesses/lib/policy-roots.ts +32 -0
- package/.versions/2.1.1/.pi/harnesses/lib/process-shared.ts +9 -0
- package/.versions/2.1.1/.pi/harnesses/lib/resource-closure.js +26 -0
- package/.versions/2.1.1/.pi/harnesses/lib/safe-source-read.js +29 -0
- package/.versions/2.1.1/.pi/harnesses/lib/semantic-approval.ts +80 -0
- package/.versions/2.1.1/.pi/harnesses/lib/session-target.ts +62 -0
- package/.versions/2.1.1/.pi/harnesses/lib/spawned-peers.js +191 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/config-agentic.js +15 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/config-context-compaction.js +16 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/config-damage-guard.js +24 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/config-file-discovery.js +23 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/config-json.js +37 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/config-loader.js +53 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/config-proactive.js +68 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/config-triage.js +42 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/config-v2.js +112 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/config.js +50 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/contracts.ts +154 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/demo.ts +95 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/payload-screen.ts +65 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/selection.js +11 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/worktree-scopes.js +110 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/worktree-scopes.ts +13 -0
- package/.versions/2.1.1/.pi/harnesses/lib/system1/worktree-service.ts +24 -0
- package/.versions/2.1.1/.pi/harnesses/lib/target-capabilities.js +7 -0
- package/.versions/2.1.1/.pi/harnesses/lib/update-check.ts +227 -0
- package/.versions/2.1.1/.pi/harnesses/lib/workspace-context.js +115 -0
- package/.versions/2.1.1/.pi/harnesses/lib/workspace-context.ts +22 -0
- package/.versions/2.1.1/.pi/harnesses/package-lock.json +2121 -0
- package/.versions/2.1.1/.pi/harnesses/package.json +13 -0
- package/.versions/2.1.1/.pi/prompts/af-build.md +27 -0
- package/.versions/2.1.1/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.1.1/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.1.1/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.1.1/.pi/prompts/af-review.md +16 -0
- package/.versions/2.1.1/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.1.1/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.1.1/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.1.1/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.1.1/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.1.1/.pi/prompts/af-test.md +19 -0
- package/.versions/2.1.1/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.1.1/.version +1 -0
- package/.versions/2.1.1/agents/architect.md +24 -0
- package/.versions/2.1.1/agents/bowser.md +28 -0
- package/.versions/2.1.1/agents/builder.md +55 -0
- package/.versions/2.1.1/agents/code-reviewer.md +209 -0
- package/.versions/2.1.1/agents/deep-researcher.md +32 -0
- package/.versions/2.1.1/agents/documenter.md +22 -0
- package/.versions/2.1.1/agents/orchestrator.md +22 -0
- package/.versions/2.1.1/agents/plan-reviewer.md +83 -0
- package/.versions/2.1.1/agents/planner.md +107 -0
- package/.versions/2.1.1/agents/releaser.md +24 -0
- package/.versions/2.1.1/agents/researcher.md +30 -0
- package/.versions/2.1.1/agents/security-auditor.md +167 -0
- package/.versions/2.1.1/agents/test-engineer.md +153 -0
- package/.versions/2.1.1/agents/web-debugger.md +44 -0
- package/.versions/2.1.1/agents/web-performance-auditor.md +194 -0
- package/.versions/2.1.1/bin/catalog/harness-runtime-closure.json +85 -0
- package/.versions/2.1.1/docs/ARCHITECTURE.md +1187 -0
- package/.versions/2.1.1/docs/agent-fleet-setup.md +1143 -0
- package/.versions/2.1.1/docs/claude-code-coms-bridge.md +147 -0
- package/.versions/2.1.1/docs/codex-local-mcp.md +487 -0
- package/.versions/2.1.1/docs/codex-session-bridge.md +44 -0
- package/.versions/2.1.1/docs/codex-setup.md +183 -0
- package/.versions/2.1.1/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.1.1/docs/fleet-native-voice.md +137 -0
- package/.versions/2.1.1/docs/getting-started.md +126 -0
- package/.versions/2.1.1/docs/npm-install.md +535 -0
- package/.versions/2.1.1/docs/pi-extensions.md +455 -0
- package/.versions/2.1.1/docs/pi-setup.md +92 -0
- package/.versions/2.1.1/docs/skill-anatomy.md +150 -0
- package/.versions/2.1.1/install-manifest.json +3239 -0
- package/.versions/2.1.1/justfile +247 -0
- package/.versions/2.1.1/manifest-meta.json +1087 -0
- package/.versions/2.1.1/references/accessibility-checklist.md +160 -0
- package/.versions/2.1.1/references/communication-contract.md +26 -0
- package/.versions/2.1.1/references/definition-of-done.md +67 -0
- package/.versions/2.1.1/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.1.1/references/observability-checklist.md +92 -0
- package/.versions/2.1.1/references/orchestration-patterns.md +370 -0
- package/.versions/2.1.1/references/performance-checklist.md +236 -0
- package/.versions/2.1.1/references/prompting-patterns.md +380 -0
- package/.versions/2.1.1/references/security-checklist.md +245 -0
- package/.versions/2.1.1/references/testing-patterns.md +235 -0
- package/.versions/2.1.1/references/workflow-authoring.md +304 -0
- package/.versions/2.1.1/skills/_internal/grilling.md +59 -0
- package/.versions/2.1.1/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.1.1/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.1.1/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.1.1/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.1.1/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.1.1/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.1.1/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.1.1/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.1.1/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.1.1/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.1.1/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.1.1/skills/fleet-connect/SKILL.md +25 -0
- package/.versions/2.1.1/skills/fleet-native-voice/SKILL.md +79 -0
- package/.versions/2.1.1/skills/fleet-native-voice/agents/openai.yaml +4 -0
- package/.versions/2.1.1/skills/fleet-native-voice.zip +0 -0
- package/.versions/2.1.1/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.1.1/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.1.1/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.1.1/skills/idea-refine/examples.md +238 -0
- package/.versions/2.1.1/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.1.1/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.1.1/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.1.1/skills/incremental-implementation/SKILL.md +353 -0
- package/.versions/2.1.1/skills/incremental-implementation.zip +0 -0
- package/.versions/2.1.1/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.1.1/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.1.1/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.1.1/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.1.1/skills/planning-and-task-breakdown/SKILL.md +318 -0
- package/.versions/2.1.1/skills/planning-and-task-breakdown.zip +0 -0
- package/.versions/2.1.1/skills/repository-ai-setup/SKILL.md +135 -0
- package/.versions/2.1.1/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/.versions/2.1.1/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/.versions/2.1.1/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/.versions/2.1.1/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/.versions/2.1.1/skills/repository-ai-setup/references/verify-setup.md +20 -0
- package/.versions/2.1.1/skills/repository-ai-setup.zip +0 -0
- package/.versions/2.1.1/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.1.1/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.1.1/skills/spec-driven-development.zip +0 -0
- package/.versions/2.1.1/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.1.1/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/CHANGELOG.md +10 -0
- package/docs/ARCHITECTURE.md +30 -1
- package/docs/codex-local-mcp.md +55 -2
- package/docs/codex-session-bridge.md +2 -2
- package/docs/codex-setup.md +1 -1
- package/docs/fleet-native-voice.md +9 -7
- package/install-manifest.json +24 -1
- package/manifest-meta.json +1 -0
- package/package.json +1 -1
- package/skills/fleet-connect/SKILL.md +25 -0
- package/skills/fleet-native-voice.zip +0 -0
|
@@ -9,15 +9,15 @@ const object=(v:unknown):v is Record<string,unknown>=>!!v&&typeof v==='object'&&
|
|
|
9
9
|
export class PermissionTransportError extends Error {readonly code:string;constructor(code:string){super(code);this.code=code;}}
|
|
10
10
|
function fail(code:string):never{throw new PermissionTransportError(code);}
|
|
11
11
|
export class PermissionTransport {
|
|
12
|
-
readonly #root:string;readonly #timeout:number;
|
|
13
|
-
constructor(options:{registryRoot:string;timeoutMs?:number}){if(!isAbsolute(options.registryRoot)||resolve(options.registryRoot)!==options.registryRoot)fail('UNSAFE_PATH');this.#root=options.registryRoot;this.#timeout=options.timeoutMs??1500;if(!Number.isInteger(this.#timeout)||this.#timeout<1||this.#timeout>1500)fail('INVALID_TRANSPORT_OPTIONS');}
|
|
12
|
+
readonly #root:string;readonly #timeout:number;readonly #channel: 'permission' | 'connection';
|
|
13
|
+
constructor(options:{registryRoot:string;timeoutMs?:number;channel?:'permission'|'connection'}){if(!isAbsolute(options.registryRoot)||resolve(options.registryRoot)!==options.registryRoot)fail('UNSAFE_PATH');this.#root=options.registryRoot;this.#channel=options.channel??'permission';this.#timeout=options.timeoutMs??1500;if(!Number.isInteger(this.#timeout)||this.#timeout<1||this.#timeout>1500)fail('INVALID_TRANSPORT_OPTIONS');}
|
|
14
14
|
async #endpoint(t:TargetEpoch){if(!validInstructionTarget(t))fail('INVALID_TARGET');for(let p=this.#root;;p=dirname(p)){const s=await lstat(p);if(s.isSymbolicLink()||!s.isDirectory())fail('UNSAFE_PATH');if(p===dirname(p))break;}const dir=await lstat(join(this.#root,'sockets'));if(!dir.isDirectory()||dir.isSymbolicLink())fail('UNSAFE_PATH');const path=join(this.#root,'sockets',t.sessionId+'.sock'),s=await lstat(path);if(!s.isSocket()||s.isSymbolicLink()||process.getuid&&s.uid!==process.getuid())fail('UNSAFE_PATH');return{path,dev:s.dev,ino:s.ino};}
|
|
15
15
|
async rpc(t:TargetEpoch,fields:Record<string,unknown>,beforeWrite?:()=>Promise<void>,signal?:AbortSignal):Promise<Record<string,unknown>>{
|
|
16
16
|
const ep=await this.#endpoint(t),msg_id=typeof fields.msg_id==='string'?fields.msg_id:randomUUID();
|
|
17
|
-
const envelope={type:'
|
|
17
|
+
const envelope={type:this.#channel+'_request',version:1,msg_id,owner:t,operation:fields.operation,payload:fields.payload,sender_session:'local-codex-permission',sender_endpoint:'',hops:0,timestamp:new Date().toISOString()},frame=JSON.stringify(envelope)+'\n';if(Buffer.byteLength(frame)>32768)fail('FRAME_TOO_LARGE');
|
|
18
18
|
return new Promise((yes,no)=>{let done=false,b=Buffer.alloc(0);const socket=createConnection(ep.path);const finish=(error?:unknown,r?:Record<string,unknown>)=>{if(done)return;done=true;clearTimeout(timer);signal?.removeEventListener('abort',abort);socket.destroy();error?no(error):yes(r!);};const abort=()=>finish(new PermissionTransportError('CANCELLED'));const timer=setTimeout(()=>finish(new PermissionTransportError('RPC_TIMEOUT')),this.#timeout);signal?.addEventListener('abort',abort,{once:true});if(signal?.aborted){abort();return;}
|
|
19
19
|
socket.once('connect',()=>{void(async()=>{try{const now=await this.#endpoint(t);if(now.dev!==ep.dev||now.ino!==ep.ino)fail('TARGET_CHANGED');if(done||signal?.aborted)return;await beforeWrite?.();if(!done&&!signal?.aborted)socket.write(frame);}catch(e){finish(e);}})();});
|
|
20
|
-
socket.on('data',(chunk:Buffer)=>{if(b.length+chunk.length>32768){finish(new PermissionTransportError('RPC_INVALID'));return;}b=Buffer.concat([b,chunk]);const end=b.indexOf(10);if(end<0)return;try{const r:unknown=JSON.parse(new TextDecoder('utf-8',{fatal:true}).decode(b.subarray(0,end)));if(!object(r)||r.type!=='
|
|
20
|
+
socket.on('data',(chunk:Buffer)=>{if(b.length+chunk.length>32768){finish(new PermissionTransportError('RPC_INVALID'));return;}b=Buffer.concat([b,chunk]);const end=b.indexOf(10);if(end<0)return;try{const r:unknown=JSON.parse(new TextDecoder('utf-8',{fatal:true}).decode(b.subarray(0,end)));if(!object(r)||r.type!==this.#channel+'_response'||r.version!==1||r.msg_id!==msg_id||!validInstructionTarget(r.owner)||targetKey(r.owner)!==targetKey(t))fail('RPC_INVALID');finish(undefined,r);}catch(e){finish(e);}});socket.once('error',()=>finish(new PermissionTransportError('RPC_UNAVAILABLE')));socket.once('close',()=>finish(new PermissionTransportError('RPC_UNAVAILABLE')));
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -17,7 +17,9 @@ export class PermissionBridge {
|
|
|
17
17
|
private ledger:InstructionLedger;
|
|
18
18
|
private policyRoot:string;
|
|
19
19
|
private wire:Pick<PermissionTransport,'rpc'>;
|
|
20
|
+
private now:()=>number;
|
|
20
21
|
constructor(options:{now?:()=>number;policyRoot:string;registryReader:RegistryReader;transport:Pick<PermissionTransport,'rpc'>}){
|
|
22
|
+
this.now=options.now??Date.now;
|
|
21
23
|
this.policyRoot=options.policyRoot;this.auth=new ReadonlyFleetBridge({registryReader:options.registryReader,policyBaseDir:options.policyRoot,now:options.now});
|
|
22
24
|
// Isolated reservation journal using the proven atomic/locking engine. Its internal
|
|
23
25
|
// generic instruction record is never presented as an instruction or permission grant.
|
|
@@ -29,7 +31,7 @@ export class PermissionBridge {
|
|
|
29
31
|
const matches=registry.candidates.filter(v=>v.target.peer===target.peer);
|
|
30
32
|
if(matches.length!==1||matches[0].presence!=='fresh'||targetKey(matches[0].target)!==targetKey(target))fail('TARGET_CHANGED');
|
|
31
33
|
const current=registry.candidates.filter(v=>v.presence==='fresh').map(v=>v.target);
|
|
32
|
-
const store=new AllowedSessionsStore(this.policyRoot,c),state=await store.list(current);
|
|
34
|
+
const store=new AllowedSessionsStore(this.policyRoot,c,{now:this.now}),state=await store.list(current);
|
|
33
35
|
const bindings=state.bindings.filter(b=>targetKey(b.target)===targetKey(target));if(bindings.length!==1)fail('NOT_ALLOWED');
|
|
34
36
|
const handle=await store.resolve(bindings[0].alias,current);
|
|
35
37
|
await store.authorize(handle,right,current);
|
|
@@ -116,7 +116,7 @@ export class ReadonlyFleetBridge {
|
|
|
116
116
|
const context = hostContext(outerHostContext), q = request(arguments_, true);
|
|
117
117
|
const first = await this.#registry(q.project), candidate = choose(first, q.peer!).target;
|
|
118
118
|
try {
|
|
119
|
-
const store = new AllowedSessionsStore(this.#root, context);
|
|
119
|
+
const store = new AllowedSessionsStore(this.#root, context, {now:this.#now});
|
|
120
120
|
const current = currentEpochs(first);
|
|
121
121
|
const list = await store.list(current);
|
|
122
122
|
const matches = list.bindings.filter(b => b.target.project === q.project && b.target.peer === q.peer);
|
|
@@ -37,6 +37,7 @@ export async function prepareNativeRun(base: NativeRunBase, _resumeRequested: bo
|
|
|
37
37
|
const agentWindow = resolveContextWindow(model, { lookup: deps.modelWindowLookup(ctx), fallbackWindow: deps.getContextWindow() });
|
|
38
38
|
const agentSessionFile = safePathWithin(base.evidenceDir, "session.json");
|
|
39
39
|
const resumeContract = bindResume({
|
|
40
|
+
privateConfig: requestedContract?.privateConfig,
|
|
40
41
|
taskId: requestedContract?.taskId ?? task,
|
|
41
42
|
instructions: requestedContract?.instructions ?? task,
|
|
42
43
|
scope: requestedContract?.scope ?? scopeGlobs,
|
|
@@ -49,6 +50,7 @@ export async function prepareNativeRun(base: NativeRunBase, _resumeRequested: bo
|
|
|
49
50
|
});
|
|
50
51
|
const contractOf=(value: typeof resumeContract)=>Object.freeze({
|
|
51
52
|
taskId:value.taskId,instructions:value.instructions,
|
|
53
|
+
...(value.privateConfig ? {privateConfig:structuredClone(value.privateConfig)} : {}),
|
|
52
54
|
boundAssertionIds:value.boundAssertionIds === undefined ? undefined : Object.freeze([...value.boundAssertionIds]),
|
|
53
55
|
scope:Object.freeze([...value.scope]),deliverables:Object.freeze([...value.deliverables]),
|
|
54
56
|
artifacts:Object.freeze([...value.artifacts]),permissions:Object.freeze([...value.permissions]),
|
|
@@ -56,6 +58,7 @@ export async function prepareNativeRun(base: NativeRunBase, _resumeRequested: bo
|
|
|
56
58
|
const admittedContract=contractOf(resumeContract);
|
|
57
59
|
const contractSnapshot=JSON.stringify(admittedContract);
|
|
58
60
|
const currentContract=()=>contractOf(bindResume({
|
|
61
|
+
privateConfig:requestedContract?.privateConfig,
|
|
59
62
|
taskId:requestedContract?.taskId??task,instructions:requestedContract?.instructions??task,
|
|
60
63
|
boundAssertionIds:requestedContract?.boundAssertionIds,
|
|
61
64
|
scope:requestedContract?.scope??scopeGlobs,deliverables:requestedContract?.deliverables,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BOUND_ASSERTION_IDS_ENV, validateBoundAssertionIds } from "./return-contract.js";
|
|
2
2
|
import { relative } from "node:path";
|
|
3
|
+
import { PRIVATE_CONFIG_ENV } from './private-config-current-state.ts';
|
|
3
4
|
import { RUNTIME_TEST_SCOPE_ENV } from "./runtime-test-check.ts";
|
|
4
5
|
import { TRACE_OWNER_ENV } from "../lib/execution-trace.ts";
|
|
5
6
|
import { mkdirSync, watch } from "node:fs";
|
|
@@ -187,7 +188,8 @@ export async function runPreparedNative(run: PreparedNativeRun): Promise<NativeS
|
|
|
187
188
|
extensions,
|
|
188
189
|
env: { ...deps.guardrailEnv(run.agentKey), ...(delegateEnv || {}), [TRACE_OWNER_ENV]: run.dispatchId,
|
|
189
190
|
...(boundAssertionIds === undefined ? {} : { [BOUND_ASSERTION_IDS_ENV]: JSON.stringify(boundAssertionIds) }),
|
|
190
|
-
[
|
|
191
|
+
[PRIVATE_CONFIG_ENV]: run.resumeContract?.privateConfig ? JSON.stringify(run.resumeContract.privateConfig) : '',
|
|
192
|
+
[RUNTIME_TEST_SCOPE_ENV]: JSON.stringify(run.scopeGlobs) },
|
|
191
193
|
attemptLifecycle: {
|
|
192
194
|
...drift.attemptLifecycle,
|
|
193
195
|
beforePhysicalSpawn: info=>{
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {FleetConnectionControl,connectionLines,connectionNamespaces} from '../lib/fleet-connection-control.ts';
|
|
2
|
+
import {homedir} from 'node:os';
|
|
3
|
+
import { privateDeclarationHash, type PrivateProofUse } from './private-config-review.ts';
|
|
1
4
|
import { registerDiscoveryHub, configureDiscoveryHub, resetDiscoveryHub, discoveryHubEnabled, discoveryManagedReadbackAllowed, prepareDiscoveryNative } from './file-discovery/hub.ts';
|
|
2
5
|
import { registerDamageGuardHub, configureDamageGuardHub, resetDamageGuardHub, acceptDamageGuardInput, prepareDamageGuardNative } from './damage-guard-hub.ts';
|
|
3
6
|
import { bindSemanticScope } from '../lib/semantic-approval.ts';
|
|
@@ -275,6 +278,19 @@ export default function (pi: ExtensionAPI) {
|
|
|
275
278
|
let refreshFleetUi = () => {};
|
|
276
279
|
const permissionRelay=new PermissionRelay(()=>observationOwner(),()=>accessTaskIdentity());registerPermissionRelay(pi,permissionRelay);registerPermissionRelay(pi.events,permissionRelay);
|
|
277
280
|
let codexNotifications:import('../../agent-fleet/scripts/lib/fleet-codex-event-runtime.ts').FleetCodexNotificationRuntime|undefined;
|
|
281
|
+
let renewCodexNotifications:((until:number)=>unknown)|undefined;
|
|
282
|
+
const codexPolicyRoot=process.env.AF_CODEX_POLICY_ROOT??path.join(homedir(),'.codex/agent-fleet/state/fleet-native');
|
|
283
|
+
const codexNamespace={hostProfile:process.env.AF_CODEX_HOST_PROFILE??'desktop',principal:process.env.AF_CODEX_PRINCIPAL??'local-user'};
|
|
284
|
+
const connectionControl=new FleetConnectionControl({owner:()=>observationOwner(),session:()=>codexNotifications?{status:()=>codexNotifications!.status(),renewUntil:until=>{if(!renewCodexNotifications)throw Error('renewal_unavailable');return renewCodexNotifications(until);}}:undefined,
|
|
285
|
+
defaultNamespace:codexNamespace,listNamespaces:async()=>(await connectionNamespaces(codexPolicyRoot)).filter(c=>c.hostProfile===codexNamespace.hostProfile&&c.principal===codexNamespace.principal),
|
|
286
|
+
readRights:async namespace=>{const owner=observationOwner();if(!owner)return {rights:[],status:'owner_unavailable'};
|
|
287
|
+
try{const {AllowedSessionsStore}=await import('../../agent-fleet/scripts/lib/fleet-codex-allowlist-store.ts');const state=await new AllowedSessionsStore(codexPolicyRoot,namespace).open();
|
|
288
|
+
const b=state.bindings.find(b=>b.target.project===owner.project&&b.target.peer===owner.peer);
|
|
289
|
+
return b?{rights:[...b.rights],expiresAt:b.expiresAt,status:b.target.sessionId===owner.sessionId&&b.target.startedAt===owner.startedAt?b.status:'target_changed',revision:state.revision}:{rights:[],status:'not_connected',revision:state.revision};
|
|
290
|
+
}catch{return {rights:[],status:'rights_unavailable'};}
|
|
291
|
+
}});
|
|
292
|
+
let connectionRefreshAt=0,connectionRefreshBusy=false;
|
|
293
|
+
const refreshConnections=()=>{if(connectionRefreshBusy||Date.now()-connectionRefreshAt<2000)return;connectionRefreshAt=Date.now();connectionRefreshBusy=true;void connectionControl.refresh().finally(()=>{connectionRefreshBusy=false;refreshFleetUi();});};
|
|
278
294
|
// Explicit user command only: no configuration discovery or default host activation.
|
|
279
295
|
pi.registerCommand('af-codex-events',{description:'prepare|enable <private config.json> or disable; never starts daemon or grants approve',handler:async(args,ctx)=>{
|
|
280
296
|
let started:typeof codexNotifications;
|
|
@@ -282,11 +298,12 @@ export default function (pi: ExtensionAPI) {
|
|
|
282
298
|
const split=args.trim().indexOf(' '),operation=split<0?args.trim():args.trim().slice(0,split),path=split<0?'':args.trim().slice(split+1).trim();
|
|
283
299
|
if(operation==='disable'){codexNotifications?.stop();codexNotifications=undefined;ctx.ui.notify('Codex event runtime stopped; no grants changed.','info');return;}
|
|
284
300
|
if(!['prepare','enable'].includes(operation)||!path)throw Error('notification_command_invalid');
|
|
285
|
-
const {readNotificationConfiguration,notificationConfigurationUnchanged,notificationPreview,FleetCodexNotificationRuntime}=await import('../../agent-fleet/scripts/lib/fleet-codex-event-runtime.ts');
|
|
301
|
+
const {readNotificationConfiguration,notificationConfigurationUnchanged,notificationPreview,renewNotificationConfiguration,FleetCodexNotificationRuntime}=await import('../../agent-fleet/scripts/lib/fleet-codex-event-runtime.ts');
|
|
286
302
|
const config=readNotificationConfiguration(path),preview=notificationPreview(config,observationOwner());
|
|
287
303
|
if(operation==='prepare'||!preview.ready){ctx.ui.notify(JSON.stringify(preview),preview.ready?'info':'warning');return;}
|
|
288
304
|
if(codexNotifications)throw Error('notification_runtime_already_running');
|
|
289
305
|
const runtime=new FleetCodexNotificationRuntime(config,()=>notificationConfigurationUnchanged(path,config)?observationOwner():null);const startup=runtime.start();started=runtime;codexNotifications=runtime;await startup;
|
|
306
|
+
renewCodexNotifications=until=>runtime.renewUntil(until,()=>{const next=renewNotificationConfiguration(path,config,until);config.approval.confirmedUntil=next.approval.confirmedUntil;});refreshConnections();
|
|
290
307
|
ctx.ui.notify('Codex event ingress enabled explicitly; ACK is not model delivery, no approve granted.','info');
|
|
291
308
|
}catch{if(started){started.stop();if(codexNotifications===started)codexNotifications=undefined;}ctx.ui.notify('Codex event operation refused or uncertain; inspect private journal, do not replay.','error');}
|
|
292
309
|
}});
|
|
@@ -300,6 +317,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
300
317
|
? "orchestrator roster recovery required"
|
|
301
318
|
: null,
|
|
302
319
|
handleCustomEnvelope: (socket, envelope) => {
|
|
320
|
+
if(connectionControl.handle(socket,envelope))return true;
|
|
303
321
|
if (handleObservationEnvelope(socket, envelope, {
|
|
304
322
|
owner: observationOwner,
|
|
305
323
|
session: () => currentCtx?.sessionManager,
|
|
@@ -422,6 +440,9 @@ export default function (pi: ExtensionAPI) {
|
|
|
422
440
|
|
|
423
441
|
let activeWritableDispatches = 0;
|
|
424
442
|
let writableOverlapCounter = 0;
|
|
443
|
+
function privateProofUse(cwd = currentCtx?.cwd || process.cwd()): PrivateProofUse {
|
|
444
|
+
return { cwd, taskId: noProgress.taskId(), sessionDir, declarationHash: privateDeclarationHash(assertions as any, hubTaskText), activeWriters: activeWritableDispatches, overlap: writableOverlapCounter };
|
|
445
|
+
}
|
|
425
446
|
let pendingHandoff: { target: string; token: string } | null = null;
|
|
426
447
|
const hubStateCtx = createHubStateContext({
|
|
427
448
|
getCurrentContext: () => currentCtx, setCurrentContext: value => { currentCtx = value; },
|
|
@@ -751,7 +772,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
751
772
|
getSystem1: () => watchdogActivity?.live() ?? null,
|
|
752
773
|
getTaskTriage: () => {
|
|
753
774
|
if (!taskTriageConfigured && !processState.additions?.length) return null;
|
|
754
|
-
try { return { ...taskTriageMetadata(), process: { schema: processState.schema, ...evaluateProcessObligations(processState, { writable: true, budgetTier: taskTier ?? DEFAULT_TASK_TIER }) } }; }
|
|
775
|
+
try { return { ...taskTriageMetadata(), process: { schema: processState.schema, ...evaluateProcessObligations(processState, { writable: true, budgetTier: taskTier ?? DEFAULT_TASK_TIER, privateUse: privateProofUse() }) } }; }
|
|
755
776
|
catch { return { ...taskTriageMetadata(), process: { schema: "invalid" } }; }
|
|
756
777
|
},
|
|
757
778
|
getProactive: () => proactiveRuntime ? { records: proactiveRuntime.records, history: proactiveRuntime.findings.history, current: proactiveRuntime.findings.current, activity: proactiveRuntime.activity.live() } : null,
|
|
@@ -958,7 +979,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
958
979
|
function pendingCapabilityOperations(): PendingOperation[] {
|
|
959
980
|
const pending: PendingOperation[] = [];
|
|
960
981
|
if (pendingTaskTransition) pending.push({ pack: "fleet", kind: "task-transition" });
|
|
961
|
-
if (processOpenObligations(processState).some(stage => stage === "plan" || stage === "review")) pending.push({ pack: "fleet", kind: "process-stage" });
|
|
982
|
+
if (processOpenObligations(processState, undefined, privateProofUse()).some(stage => stage === "plan" || stage === "review")) pending.push({ pack: "fleet", kind: "process-stage" });
|
|
962
983
|
if (Array.from(agentStates.values()).some(state => state.status === "running") || Array.from(researchStates.values()).some(state => state.status === "running")) pending.push({ pack: "fleet", kind: "child" });
|
|
963
984
|
if (pendingReplies.size > 0 || pendingHandoff) pending.push({ pack: "peer", kind: "message" });
|
|
964
985
|
if (hubSpawnedPeers.size > 0) pending.push({ pack: "workspace", kind: "pane" });
|
|
@@ -1054,10 +1075,11 @@ export default function (pi: ExtensionAPI) {
|
|
|
1054
1075
|
try { pi.appendEntry(TASK_TRANSITION_ENTRY_TYPE, { pending: false }); } catch { processPersistenceBlocked = true; }
|
|
1055
1076
|
return next;
|
|
1056
1077
|
},
|
|
1057
|
-
persistProcessState: value => persistProcessVerdict(value, evaluateProcessObligations(value, { writable: true, budgetTier: taskTier ?? DEFAULT_TASK_TIER })),
|
|
1078
|
+
persistProcessState: value => persistProcessVerdict(value, evaluateProcessObligations(value, { writable: true, budgetTier: taskTier ?? DEFAULT_TASK_TIER, privateUse: privateProofUse() })),
|
|
1058
1079
|
getTaskDispatchCount: () => taskDispatchCount, getTaskResearchCount: () => taskResearchCount,
|
|
1059
1080
|
getTurnReport: () => turnReport, getAssertions: () => assertions, setAssertions: value => { assertions = value; },
|
|
1060
1081
|
currentTaskId: () => noProgress.taskId(), currentRevision: ctx => worktreeRevision(ctx.cwd || process.cwd(), []),
|
|
1082
|
+
privateProofUse: ctx => privateProofUse(ctx.cwd || process.cwd()),
|
|
1061
1083
|
adoptReservedTaskId: (id, resetTaskWindow) => { taskIdentityReset.run(id, resetTaskWindow); bindSemanticScope(id, hubTaskText ? createHash("sha256").update(hubTaskText).digest("hex") : ""); },
|
|
1062
1084
|
confirmTaskSupersession: (input, ctx, signal) => confirmTaskSupersession(input, ctx, { language: () => userLanguage, currentTaskId: () => noProgress.taskId(), ask: (id, params, askCtx, askSignal) => requestRuntimeAsk(pi.events, id, params, askCtx, askSignal), startWait: id => executionHistory.startAskUser(id), endWait: (id, sameTask) => { const wait = executionHistory.endAskUser(id, Date.now()); if (sameTask && wait > 0) taskClock = addTaskClockWait(taskClock, wait); } }, signal),
|
|
1063
1085
|
getAgentStates: () => agentStates, rosterAdd, rosterDrop,
|
|
@@ -1204,7 +1226,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1204
1226
|
taskId: () => noProgress.taskId(), inputRevision: () => taskTriage?.current?.revision ?? "",
|
|
1205
1227
|
ask: (nonce, question, askCtx, signal) => requestRuntimeAsk(pi.events, nonce, question, askCtx, signal, undefined, 'permission'),
|
|
1206
1228
|
startWait: nonce => executionHistory.startAskUser(nonce), endWait: (nonce, sameTask) => { const wait = executionHistory.endAskUser(nonce, Date.now()); if (sameTask && wait > 0) taskClock = addTaskClockWait(taskClock, wait); },
|
|
1207
|
-
persist: value => pi.appendEntry("agent-hub-process-state", processAuditRecord(value, evaluateProcessObligations(value, { writable: true, budgetTier: taskTier ?? DEFAULT_TASK_TIER }))),
|
|
1229
|
+
persist: value => pi.appendEntry("agent-hub-process-state", processAuditRecord(value, evaluateProcessObligations(value, { writable: true, budgetTier: taskTier ?? DEFAULT_TASK_TIER, privateUse: privateProofUse() }))),
|
|
1208
1230
|
}, ctx);
|
|
1209
1231
|
if (next) processState = next;
|
|
1210
1232
|
return !!next;
|
|
@@ -2040,6 +2062,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
2040
2062
|
killSpecialistProcess: state => { fenceOperatorCancel(state); cancelLocalOwnedProcess({ process: state.proc, monitorBridge, monitorKey: monitorKeyForAgent(state.def.name, state.dispatchId ?? state.runCount), treeKill: killPiTree }); },
|
|
2041
2063
|
abortComs: state => { state.comsAbort?.(); },
|
|
2042
2064
|
getComsLines: (width, theme) => poolPresentation.render(width, theme),
|
|
2065
|
+
getConnectionLines: (width) => {refreshConnections();const lines=connectionLines(connectionControl.rows());return ['Bounded private policy inventory; refresh every 2s',...(lines.length?lines:['No connection observed; absence is not proof of no saved grants'])].map(line=>truncateToWidth(line,width));},
|
|
2043
2066
|
});
|
|
2044
2067
|
const { fleetRows, openFleetDashboard: openFleetDashboardRaw } = fleetDashboard;
|
|
2045
2068
|
const openFleetDashboard = (ctx: any, startSubstitution = false) => gridUI.withSuspended(() => openFleetDashboardRaw(ctx, startSubstitution));
|
|
@@ -2208,7 +2231,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
2208
2231
|
taskTierAssumed,
|
|
2209
2232
|
processRisk: processState.risk,
|
|
2210
2233
|
processScope: processState.scope,
|
|
2211
|
-
processOpen: Object.entries(evaluateProcessObligations(processState, { writable: true, budgetTier: taskTier ?? DEFAULT_TASK_TIER }).obligations).filter(([, value]) => value.status === "open").map(([name]) => name),
|
|
2234
|
+
processOpen: Object.entries(evaluateProcessObligations(processState, { writable: true, budgetTier: taskTier ?? DEFAULT_TASK_TIER, privateUse: privateProofUse() }).obligations).filter(([, value]) => value.status === "open").map(([name]) => name),
|
|
2212
2235
|
turnDispatchCount,
|
|
2213
2236
|
turnResearchCount,
|
|
2214
2237
|
taskDispatchCount,
|
|
@@ -2343,7 +2366,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
2343
2366
|
});
|
|
2344
2367
|
pi.on("session_compact", async (_event, ctx) => {
|
|
2345
2368
|
noProgress.compact(ctx.sessionManager.getEntries());
|
|
2346
|
-
if (!processPersistenceBlocked) persistProcessVerdict(processState, evaluateProcessObligations(processState, { writable: true, budgetTier: taskTier ?? DEFAULT_TASK_TIER }));
|
|
2369
|
+
if (!processPersistenceBlocked) persistProcessVerdict(processState, evaluateProcessObligations(processState, { writable: true, budgetTier: taskTier ?? DEFAULT_TASK_TIER, privateUse: privateProofUse() }));
|
|
2347
2370
|
const result = toolCatalogRuntime.compact({
|
|
2348
2371
|
mode: getWorkMode(), getEffectiveTools: () => pi.getActiveTools(),
|
|
2349
2372
|
persist: (type, data) => pi.appendEntry(type, data), counterSnapshot: () => unknownToolCounter.snapshot(),
|
|
@@ -105,18 +105,18 @@ function invocationDiagnostics(value: NonNullable<GuardHistory['invocation']>):
|
|
|
105
105
|
if (!value || !['dispatch_agent', 'spawn_research'].includes(value.tool)) return [{ field: 'tool', expected: 'dispatch_agent | spawn_research', actual: type(value?.tool) }];
|
|
106
106
|
if (!value.params || typeof value.params !== 'object' || Array.isArray(value.params)) return [{ field: 'params', expected: 'object', actual: type(value.params) }];
|
|
107
107
|
const params = value.params as unknown as Record<string, unknown>;
|
|
108
|
-
const keys = value.tool === 'dispatch_agent' ? ['agent','task','artifacts','scope','scope_mode','deliverables','watchdog','review_reason','review_mode','backend','triage_id','triage_reason'] : ['task','persona','model','artifacts','read_scope','goal','expected_result'];
|
|
108
|
+
const keys = value.tool === 'dispatch_agent' ? ['agent','task','artifacts','scope','scope_mode','deliverables','watchdog','review_reason','review_mode','private_config_files','verifier_sources','backend','triage_id','triage_reason'] : ['task','persona','model','artifacts','read_scope','goal','expected_result'];
|
|
109
109
|
const diagnostics: InvocationDiagnostic[] = [];
|
|
110
110
|
const add = (field: string, expected: string, item: unknown, reason?: string) => { if (diagnostics.length < 16) diagnostics.push({ field, expected, actual: type(item), ...(reason ? { reason } : {}) }); };
|
|
111
111
|
for (const key of ['task', ...(value.tool === 'dispatch_agent' ? ['agent'] : [])]) {
|
|
112
112
|
if (typeof params[key] !== 'string') add(key, 'nonblank string', params[key]);
|
|
113
113
|
else if (!(params[key] as string).trim()) add(key, 'nonblank string', params[key], 'blank');
|
|
114
114
|
}
|
|
115
|
-
const enums: Record<string, string[]> = { scope_mode: ['existing','create'], review_mode: ['changes','operator-current-state'], backend: ['auto','native','coms'], triage_reason: ['used','better_fit','changed_scope','independent_judgment'] };
|
|
115
|
+
const enums: Record<string, string[]> = { scope_mode: ['existing','create'], review_mode: ['changes','operator-current-state','private-config-current-state'], backend: ['auto','native','coms'], triage_reason: ['used','better_fit','changed_scope','independent_judgment'] };
|
|
116
116
|
for (const [key, item] of Object.entries(params)) {
|
|
117
117
|
if (!keys.includes(key)) { add('params.<unknown-key>', 'supported field', item, 'unknown key (redacted)'); continue; }
|
|
118
118
|
if (item === undefined || key === 'task' || key === 'agent') continue;
|
|
119
|
-
if (['artifacts','scope','deliverables','read_scope'].includes(key)) {
|
|
119
|
+
if (['artifacts','scope','deliverables','read_scope','private_config_files','verifier_sources'].includes(key)) {
|
|
120
120
|
if (!Array.isArray(item)) add(key, 'array of strings', item);
|
|
121
121
|
else item.forEach((entry, i) => {
|
|
122
122
|
if (typeof entry !== 'string') add(`${key}[${i}]`, 'string', entry);
|
|
@@ -515,7 +515,7 @@ export function withNoProgress<P extends DispatchAgentParams | SpawnResearchPara
|
|
|
515
515
|
const fingerprint = () => canonical({
|
|
516
516
|
worktree: worktreeRevision(cwd, scope),
|
|
517
517
|
artifacts: artifactRevision(),
|
|
518
|
-
structuredContract: research ? { readScope: research.readScope, goalDeclared: !!research.goal, expectedResultDeclared: !!research.expectedResult } : { scope, deliverables: contractIdentity, scopeMode: (params as DispatchAgentParams).scope_mode ?? "existing", ...((params as DispatchAgentParams).review_mode==='operator-current-state'?{reviewMode:'operator-current-state'}:{}) },
|
|
518
|
+
structuredContract: research ? { readScope: research.readScope, goalDeclared: !!research.goal, expectedResultDeclared: !!research.expectedResult } : { scope, deliverables: contractIdentity, scopeMode: (params as DispatchAgentParams).scope_mode ?? "existing", ...((params as DispatchAgentParams).review_mode==='operator-current-state'?{reviewMode:'operator-current-state'}:(params as DispatchAgentParams).review_mode==='private-config-current-state'?{reviewMode:'private-config-current-state',privateFiles:(params as DispatchAgentParams).private_config_files,verifierSources:(params as DispatchAgentParams).verifier_sources}:{}) },
|
|
519
519
|
conditions,
|
|
520
520
|
// Authoritative prerequisite snapshot: tier/catalog changes unblock not_started.
|
|
521
521
|
// Task identity is deliberately excluded so reset cannot bypass cancel/unknown-write fences.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { closeSync, constants, fstatSync, lstatSync, openSync, readSync, realpathSync } from 'node:fs';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
import { isAbsolute, join, relative, resolve } from 'node:path';
|
|
5
|
+
import { notificationPreview, parseNotificationConfiguration } from '../lib/fleet-notification-validation.ts';
|
|
6
|
+
|
|
7
|
+
const fail = (): never => { throw Error('private_config_invalid_or_changed'); };
|
|
8
|
+
const hash = (value: string | Buffer) => createHash('sha256').update(value).digest('hex');
|
|
9
|
+
export interface PrivateFileFingerprint { path: string; sha256: string; size: number; dev: number; ino: number; uid: number; mode: number; mtime: number; ctime: number }
|
|
10
|
+
export interface PrivateConfigSnapshot { files: PrivateFileFingerprint[]; sources: PrivateFileFingerprint[] }
|
|
11
|
+
/** Transport is parent-owned, not a tool parameter. No private body or overridable root. */
|
|
12
|
+
export interface PrivateConfigBinding {
|
|
13
|
+
files: string[]; sources: string[]; taskId: string; sessionDir: string; declarationHash: string;
|
|
14
|
+
captureId: string; generation: string; epoch: number;
|
|
15
|
+
}
|
|
16
|
+
export const PRIVATE_CONFIG_ENV = 'AGENT_FLEET_PRIVATE_CONFIG_CAPTURE';
|
|
17
|
+
export function privateConfigRoot(): string { return join(homedir(), '.local/state/agent-fleet/codex-events'); }
|
|
18
|
+
function exactPaths(value: unknown, max: number): string[] {
|
|
19
|
+
if (!Array.isArray(value) || !value.length || value.length > max) return fail();
|
|
20
|
+
const paths = value as unknown[];
|
|
21
|
+
if (paths.some(p => typeof p !== 'string' || !p || p.length > 1024 || /[\x00-\x20\x7f\\*?\[\]{}()!]/.test(p) || p.split('/').some((v, i) => (!v && i !== 0) || v === '.' || v === '..')) || new Set(paths).size !== paths.length) return fail();
|
|
22
|
+
return (paths as string[]).slice().sort();
|
|
23
|
+
}
|
|
24
|
+
function ownedDirectory(path: string): void {
|
|
25
|
+
const stat = lstatSync(path);
|
|
26
|
+
if (!stat.isDirectory() || stat.uid !== process.getuid?.() || (stat.mode & 0o7777) !== 0o700 || realpathSync(path) !== path) fail();
|
|
27
|
+
}
|
|
28
|
+
function fingerprint(path: string, max: number, privateFile: boolean): { metadata: PrivateFileFingerprint; bytes: Buffer } {
|
|
29
|
+
const before = lstatSync(path);
|
|
30
|
+
const safe = (s: typeof before) => s.isFile() && s.nlink === 1 && s.uid === process.getuid?.() && (privateFile ? [0o400, 0o600].includes(s.mode & 0o7777) : (s.mode & 0o022) === 0) && s.size > 0 && s.size <= max;
|
|
31
|
+
if (!safe(before) || realpathSync(path) !== path) return fail();
|
|
32
|
+
const fd = openSync(path, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
|
|
33
|
+
try {
|
|
34
|
+
const opened = fstatSync(fd);
|
|
35
|
+
if (!safe(opened) || opened.dev !== before.dev || opened.ino !== before.ino) return fail();
|
|
36
|
+
// Bounded reads even if a same-user writer grows the already-opened file.
|
|
37
|
+
const buffer = Buffer.alloc(max + 1); let length = 0, n: number;
|
|
38
|
+
while (length < buffer.length && (n = readSync(fd, buffer, length, buffer.length - length, null)) > 0) length += n;
|
|
39
|
+
const after = fstatSync(fd), current = lstatSync(path);
|
|
40
|
+
const identity = (s: typeof before) => [s.dev, s.ino, s.uid, s.mode, s.nlink, s.size, s.mtimeMs, s.ctimeMs].join(':');
|
|
41
|
+
if (length !== opened.size || length > max || identity(before) !== identity(opened) || identity(opened) !== identity(after) || identity(after) !== identity(current) || realpathSync(path) !== path) return fail();
|
|
42
|
+
const bytes = buffer.subarray(0, length);
|
|
43
|
+
return { bytes, metadata: { path, sha256: hash(bytes), size: length, dev: after.dev, ino: after.ino, uid: after.uid, mode: after.mode, mtime: after.mtimeMs, ctime: after.ctimeMs } };
|
|
44
|
+
} finally { closeSync(fd); }
|
|
45
|
+
}
|
|
46
|
+
/** Reads only explicit configuration files in the app-owned namespace and declared repo helpers.
|
|
47
|
+
* Errors intentionally discard parser text/paths/private values. Never returns private bytes. */
|
|
48
|
+
export function capturePrivateConfig(cwd: string, privateFiles: unknown, verifierSources: unknown): PrivateConfigSnapshot {
|
|
49
|
+
try {
|
|
50
|
+
const root = privateConfigRoot(), files = exactPaths(privateFiles, 4), sources = exactPaths(verifierSources, 32);
|
|
51
|
+
// The namespace cannot be redirected through a mutable or foreign-owned ancestor.
|
|
52
|
+
for (const path of [homedir(), join(homedir(), '.local'), join(homedir(), '.local/state'), join(homedir(), '.local/state/agent-fleet')]) {
|
|
53
|
+
const stat = lstatSync(path);
|
|
54
|
+
if (!stat.isDirectory() || stat.uid !== process.getuid?.() || (stat.mode & 0o022) !== 0 || realpathSync(path) !== path) return fail();
|
|
55
|
+
}
|
|
56
|
+
ownedDirectory(root);
|
|
57
|
+
const fileMetadata = files.map(path => {
|
|
58
|
+
if (!isAbsolute(path) || resolve(path) !== path) return fail();
|
|
59
|
+
const rel = relative(root, path), parts = rel.split('/');
|
|
60
|
+
if (parts.length !== 3 || !/^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/.test(parts[0]) || !/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/.test(parts[1]) || !/^notification(?:-[A-Za-z0-9_-]{1,96})?\.json$/.test(parts[2])) return fail();
|
|
61
|
+
ownedDirectory(join(root, parts[0])); ownedDirectory(join(root, parts[0], parts[1]));
|
|
62
|
+
const { metadata, bytes } = fingerprint(path, 65536, true);
|
|
63
|
+
const config = parseNotificationConfiguration(bytes.toString('utf8'));
|
|
64
|
+
if (config?.approval?.binding?.threadId !== parts[0] || !notificationPreview(config, config?.approval?.target).ready) return fail();
|
|
65
|
+
return metadata;
|
|
66
|
+
});
|
|
67
|
+
const repo = realpathSync(cwd);
|
|
68
|
+
const sourceMetadata = sources.map(path => {
|
|
69
|
+
if (isAbsolute(path) || relative(repo, resolve(repo, path)) !== path || !/\.(?:[cm]?[jt]s|sh|py)$/.test(path)) return fail();
|
|
70
|
+
return { ...fingerprint(resolve(repo, path), 1024 * 1024, false).metadata, path };
|
|
71
|
+
});
|
|
72
|
+
if (new Set([...fileMetadata, ...sourceMetadata].map(f => `${f.dev}:${f.ino}`)).size !== files.length + sources.length) return fail();
|
|
73
|
+
return { files: fileMetadata, sources: sourceMetadata };
|
|
74
|
+
} catch { return fail(); }
|
|
75
|
+
}
|
|
76
|
+
export function privateConfigRevision(cwd: string, repositoryRevision: string, binding: PrivateConfigBinding): string {
|
|
77
|
+
try {
|
|
78
|
+
if (!/^[a-f0-9]{64}$/.test(repositoryRevision) || !binding || !binding.taskId || !binding.sessionDir || !binding.captureId || !binding.generation || !Number.isSafeInteger(binding.epoch) || !/^[a-f0-9]{64}$/.test(binding.declarationHash)) return 'unavailable';
|
|
79
|
+
return hash(JSON.stringify({ repositoryRevision, binding, snapshot: capturePrivateConfig(cwd, binding.files, binding.sources) }));
|
|
80
|
+
} catch { return 'unavailable'; }
|
|
81
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { mkdtempSync, mkdirSync, writeFileSync, rmSync } from 'node:fs';
|
|
2
|
+
import { tmpdir } from 'node:os';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { execFileSync } from 'node:child_process';
|
|
5
|
+
import { TOOLS } from '../../agent-fleet/scripts/lib/fleet-codex-local-mcp.ts';
|
|
6
|
+
import { desktopQueuePin } from '../../agent-fleet/scripts/lib/codex-desktop-queue-host.ts';
|
|
7
|
+
import { targetKey } from '../../agent-fleet/scripts/lib/fleet-codex-instruction-store.ts';
|
|
8
|
+
|
|
9
|
+
/** Isolated HOME, Git repository and inert configuration. Never opens a socket/runtime. */
|
|
10
|
+
export function privateFixture(t: any) {
|
|
11
|
+
const home = mkdtempSync(join(tmpdir(), 'private-config-'));
|
|
12
|
+
const oldHome = process.env.HOME; process.env.HOME = home;
|
|
13
|
+
t.after(() => { if (oldHome === undefined) delete process.env.HOME; else process.env.HOME = oldHome; rmSync(home, { recursive: true, force: true }); });
|
|
14
|
+
const cwd = join(home, 'repo'); mkdirSync(cwd); execFileSync('git', ['init', '-q'], { cwd });
|
|
15
|
+
writeFileSync(join(cwd, '.gitignore'), '.pi/agent-sessions/\n');
|
|
16
|
+
const session = join(cwd, '.pi/agent-sessions/sessions/fixture'); mkdirSync(session, { recursive: true, mode: 0o700 });
|
|
17
|
+
const source = '.pi/agent-sessions/sessions/fixture/check.mjs'; writeFileSync(join(cwd, source), '/* inert verifier source */\n', { mode: 0o600 });
|
|
18
|
+
const folder = join(home, '.local/state/agent-fleet/codex-events/11111111-1111-4111-8111-111111111111/fixture-owner');
|
|
19
|
+
mkdirSync(folder, { recursive: true, mode: 0o700 });
|
|
20
|
+
const owner = { project: 'fixture', peer: 'hub', sessionId: 'session', startedAt: '2026-11-04T00:00:00Z' };
|
|
21
|
+
const config = { optedIn: true, stateRoot: join(home, 'state'), socketPath: join(home, 'unused.sock'), messageBudgetMs: 30000,
|
|
22
|
+
loadedCatalog: { tools: TOOLS.map(t => ({ name: t.name })), identity: 'host_context_validated', nodeVersion: '25.2.1', protocolVersion: '2025-06-18' },
|
|
23
|
+
approval: { binding: { id: 'fixture', epoch: 'epoch', hostInstance: 'fixture-host', threadId: '11111111-1111-4111-8111-111111111111', fleetOwner: targetKey(owner) }, target: owner, authorityRevision: 1, confirmedUntil: Date.now() + 3600000, transportOrigin: 'user_input', mappingEvidence: 'externally_confirmed_loaded_desktop', daemonVersion: desktopQueuePin.daemon, desktopVersion: desktopQueuePin.desktop, addSchema: desktopQueuePin.addSchema, responseSchema: desktopQueuePin.responseSchema } };
|
|
24
|
+
const file = join(folder, 'notification-fixture.json'); writeFileSync(file, JSON.stringify(config), { mode: 0o600 });
|
|
25
|
+
return { home, cwd, session, folder, file, source, config };
|
|
26
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { lstatSync, readFileSync, realpathSync } from 'node:fs';
|
|
3
|
+
import { isAbsolute, relative, resolve } from 'node:path';
|
|
4
|
+
import { minimalChangeRequirement, type AcceptanceRequirement } from './acceptance.ts';
|
|
5
|
+
import { receiptDeclarationHash, runtimeReceiptEvidenceCurrent } from './runtime-receipts.ts';
|
|
6
|
+
import type { ProcessObligationState } from './process-obligations.ts';
|
|
7
|
+
import { affirmativeReviewVerdict } from './review-verdict.ts';
|
|
8
|
+
import { countReviewFindings } from './review-findings.js';
|
|
9
|
+
import { reviewMayClose } from './orchestration-activation.ts';
|
|
10
|
+
import { persistOperatorStateProof, type OperatorEvidenceWriter } from './operator-current-state.ts';
|
|
11
|
+
import { worktreeRevision } from './scope-gate.js';
|
|
12
|
+
import { capturePrivateConfig, privateConfigRevision, type PrivateConfigBinding } from './private-config-current-state.ts';
|
|
13
|
+
import type { RuntimeReceipt } from './runtime-receipts.ts';
|
|
14
|
+
|
|
15
|
+
const digest = (value: string | Buffer) => createHash('sha256').update(value).digest('hex');
|
|
16
|
+
export interface PrivateProcessProof {
|
|
17
|
+
origin: 'private-config-current-state'; binding: PrivateConfigBinding; revision: string;
|
|
18
|
+
evidenceRef: string; evidenceHash: string; overlap: number; classification: string;
|
|
19
|
+
reviewer: { evidenceRef: string; evidenceHash: string };
|
|
20
|
+
receipts: { evidenceRef: string; evidenceHash: string }[];
|
|
21
|
+
}
|
|
22
|
+
/** Live parent state, never tool parameters or a persisted validity boolean. */
|
|
23
|
+
export interface PrivateProofUse {
|
|
24
|
+
cwd: string; taskId: string; sessionDir: string; declarationHash: string;
|
|
25
|
+
activeWriters: number; overlap: number;
|
|
26
|
+
}
|
|
27
|
+
export function privateRequirements(assertions: AcceptanceRequirement[]): AcceptanceRequirement[] {
|
|
28
|
+
const ledger = assertions.map(r => ({ ...r })), minimal = minimalChangeRequirement(), inherited = ledger.find(r => r.id === minimal.id);
|
|
29
|
+
if (inherited) inherited.criticalConditions = [...new Set([...(inherited.criticalConditions ?? []), ...(minimal.criticalConditions ?? []), ...(inherited.text !== minimal.text ? [minimal.text] : [])])];
|
|
30
|
+
return inherited ? ledger : [...ledger, minimal];
|
|
31
|
+
}
|
|
32
|
+
export function privateDeclarationHash(assertions: AcceptanceRequirement[], acceptedInput?: string): string {
|
|
33
|
+
return receiptDeclarationHash(privateRequirements(assertions), [], acceptedInput);
|
|
34
|
+
}
|
|
35
|
+
export function privateClassification(state: ProcessObligationState): string {
|
|
36
|
+
return digest(JSON.stringify([state.risk, state.scope, state.reassessments, state.additions ?? []]));
|
|
37
|
+
}
|
|
38
|
+
function proofBytes(sessionDir: string, path: string, kind: 'evidence' | 'returns' = 'evidence'): Buffer {
|
|
39
|
+
const root = resolve(realpathSync(sessionDir), 'artifacts', kind), file = resolve(path), rel = relative(root, file);
|
|
40
|
+
if (!rel || rel.startsWith('..') || isAbsolute(rel) || realpathSync(root) !== root || realpathSync(file) !== file) throw Error();
|
|
41
|
+
const stat = lstatSync(file);
|
|
42
|
+
if (!stat.isFile() || stat.size > 256 * 1024) throw Error();
|
|
43
|
+
return readFileSync(file);
|
|
44
|
+
}
|
|
45
|
+
/** Private closure is deliberately separate from Git stages and requires live revalidation at every use. */
|
|
46
|
+
export function privateProcessProofCurrent(state: ProcessObligationState, use?: PrivateProofUse): boolean {
|
|
47
|
+
try {
|
|
48
|
+
const p = state.privateVerification, receipts = state.runtimeReceipts;
|
|
49
|
+
if (!p || !use || p.origin !== 'private-config-current-state' || !receipts || state.changedFiles.length || state.workOrigin
|
|
50
|
+
|| state.acceptance.evidenceRef || state.review.evidenceRef || state.additions?.some(a => a.status === 'active' && a.reason !== 'irreversible_execution') || use.activeWriters !== 0 || p.overlap !== use.overlap
|
|
51
|
+
|| p.classification !== privateClassification(state) || p.binding.taskId !== use.taskId || p.binding.sessionDir !== use.sessionDir
|
|
52
|
+
|| p.binding.declarationHash !== use.declarationHash || receipts.generation !== p.binding.generation || receipts.epoch !== p.binding.epoch
|
|
53
|
+
|| receipts.pending.length || !p.receipts.length || p.revision === 'unavailable'
|
|
54
|
+
|| privateConfigRevision(use.cwd, worktreeRevision(use.cwd, []), p.binding) !== p.revision
|
|
55
|
+
|| digest(proofBytes(use.sessionDir, p.evidenceRef)) !== p.evidenceHash
|
|
56
|
+
|| digest(proofBytes(use.sessionDir, p.reviewer.evidenceRef, 'returns')) !== p.reviewer.evidenceHash) return false;
|
|
57
|
+
return p.receipts.every(ref => receipts.records.some(r => r.captureId === p.binding.captureId && r.taskId === use.taskId
|
|
58
|
+
&& r.generation === p.binding.generation && r.epoch === p.binding.epoch && r.sessionDir === use.sessionDir
|
|
59
|
+
&& r.declarationHash === use.declarationHash && r.check.inspectedRevision === p.revision
|
|
60
|
+
&& r.check.evidenceRef === ref.evidenceRef && r.evidenceHash === ref.evidenceHash && runtimeReceiptEvidenceCurrent(r)));
|
|
61
|
+
} catch { return false; }
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** No proof reuse for review: every success requires this dispatch's anchored native receipts. */
|
|
65
|
+
export function finishPrivateConfigReview(input: {
|
|
66
|
+
stillCurrent: () => boolean; cwd: string; binding: PrivateConfigBinding; revision: string; beforeRevision: string; sameTask: boolean;
|
|
67
|
+
native: boolean; reviewerValid: boolean; exclusive: boolean; captureCurrent: boolean; delivered: boolean;
|
|
68
|
+
exitCode: number; dispatchId?: string; submission: any; protocolDiagnostic: unknown;
|
|
69
|
+
output: string; parsedReturn: any; questions: string[]; research: string[];
|
|
70
|
+
verification: any; anchored: RuntimeReceipt[]; sourceDelta: boolean; sourceObligations: boolean;
|
|
71
|
+
returnPath?: string | null; writer: OperatorEvidenceWriter; runCount: number;
|
|
72
|
+
}) {
|
|
73
|
+
const result = { status: 'unproven' as const, origin: 'private-config-current-state' as const, historicalAttribution: 'not_claimed' as const, revision: input.revision };
|
|
74
|
+
const requirements = input.verification?.requirements ?? [], checks = input.verification?.checks ?? [];
|
|
75
|
+
const ready = input.sameTask && input.native && input.reviewerValid && input.exclusive && input.captureCurrent && input.delivered && input.exitCode === 0
|
|
76
|
+
&& !!input.dispatchId && !input.protocolDiagnostic && input.submission?.status === 'completed'
|
|
77
|
+
&& !input.sourceDelta && !input.sourceObligations && input.revision !== 'unavailable' && input.revision === input.beforeRevision
|
|
78
|
+
&& affirmativeReviewVerdict(input.output) && countReviewFindings(input.output).blocking === 0
|
|
79
|
+
&& !input.questions.length && !input.research.length && !!input.parsedReturn
|
|
80
|
+
&& !(input.parsedReturn.assertions_failed ?? []).length && !(input.parsedReturn.assertions_unproven ?? []).length
|
|
81
|
+
&& !(input.submission.requires_user_decision ?? []).some((q: string) => q.trim().toLowerCase() !== 'none')
|
|
82
|
+
&& requirements.some((r: any) => r.id !== 'AF-MIN-CHANGE') && requirements.some((r: any) => r.id === 'AF-MIN-CHANGE')
|
|
83
|
+
&& requirements.every((r: any) => ['test', 'code-grep'].includes(r.tag) && r.status === 'passed' && r.evidenceRefs?.length)
|
|
84
|
+
&& checks.length > 0 && checks.every((c: any) => c.producer === 'runtime' && c.status === 'passed'
|
|
85
|
+
&& input.anchored.some(a => a.captureId === input.binding.captureId && a.originDispatchId === input.dispatchId && a.check.evidenceRef === c.evidenceRef))
|
|
86
|
+
&& reviewMayClose({ revision: input.revision, scope: input.binding.sources, output: input.output, evidenceRef: input.returnPath ?? undefined, declared: true, wide: true });
|
|
87
|
+
if (!ready) return result;
|
|
88
|
+
try {
|
|
89
|
+
const current = () => input.stillCurrent() && privateConfigRevision(input.cwd, worktreeRevision(input.cwd, []), input.binding) === input.beforeRevision;
|
|
90
|
+
if (!current()) return result;
|
|
91
|
+
const reviewer = { evidenceRef: input.returnPath!, evidenceHash: digest(proofBytes(input.binding.sessionDir, input.returnPath!, 'returns')) };
|
|
92
|
+
const evidenceRef = persistOperatorStateProof({ writer: input.writer, sessionDir: input.binding.sessionDir, runCount: input.runCount, dispatchId: input.dispatchId!, record: {
|
|
93
|
+
schema: 'agent-fleet.private-config-verification/v1', ...result, status: 'accepted', binding: input.binding,
|
|
94
|
+
snapshot: capturePrivateConfig(input.cwd, input.binding.files, input.binding.sources),
|
|
95
|
+
checks, reviewer: { backend: 'native', dispatchId: input.dispatchId, ...reviewer },
|
|
96
|
+
activation: 'not_performed', sourceObligations: 'not_covered',
|
|
97
|
+
} });
|
|
98
|
+
return current() ? { ...result, status: 'accepted' as const, evidenceRef, reviewer, evidenceHash: digest(proofBytes(input.binding.sessionDir, evidenceRef)) } : result;
|
|
99
|
+
} catch { return { ...result, reason: 'evidence_readback_failed' }; }
|
|
100
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { privateProcessProofCurrent, type PrivateProcessProof, type PrivateProofUse } from './private-config-review.ts';
|
|
1
2
|
import { normalizeRuntimeReceipts, type RuntimeReceiptState } from "./runtime-receipts.ts";
|
|
2
3
|
import { normalizeReviewEvidence, type ReviewEvidence } from "./review-reuse.ts";
|
|
3
4
|
import { consumeActionGrant, type ActionContract, type ActionGrant } from "./task-triage-authorization.ts";
|
|
@@ -15,6 +16,8 @@ export interface ProcessObligationState {
|
|
|
15
16
|
acceptance: ProcessStageState; review: ProcessStageState; plan: ProcessStageState;
|
|
16
17
|
reassessments: number; lastReason: string | null; appliedRuleIds: string[]; changedFiles: string[];
|
|
17
18
|
workOrigin?: "operator-current-state";
|
|
19
|
+
privateVerification?: PrivateProcessProof;
|
|
20
|
+
privateVerificationRequired?: true;
|
|
18
21
|
additions?: ProcessAddition[];
|
|
19
22
|
runtimeReceipts?: RuntimeReceiptState;
|
|
20
23
|
reviews?: ReviewEvidence[];
|
|
@@ -22,7 +25,7 @@ export interface ProcessObligationState {
|
|
|
22
25
|
}
|
|
23
26
|
export interface ProcessClassificationInput { risk?: string; scope?: string; reason?: string; newTask?: boolean; }
|
|
24
27
|
export interface ProcessVerdict {
|
|
25
|
-
accepted: boolean; path: "read-only" | "changed-task" | "operator-current-state"; risk: TaskRisk; scope: TaskScope; budgetTier: string;
|
|
28
|
+
accepted: boolean; path: "read-only" | "changed-task" | "operator-current-state" | "private-config-current-state"; risk: TaskRisk; scope: TaskScope; budgetTier: string;
|
|
26
29
|
obligations: Record<"risk" | "acceptance" | "review" | "plan", { status: ObligationStatus; evidenceRef?: string }> & { confirmation?: { status: ObligationStatus } };
|
|
27
30
|
additions: Pick<ProcessAddition, "id" | "taskId" | "evaluationId" | "inputRevision" | "reason" | "status">[];
|
|
28
31
|
appliedRuleIds: string[]; currentStage: ProcessStage; admissibleNextAction: string; auditScope: string[]; explanation: string;
|
|
@@ -35,6 +38,13 @@ export function createProcessState(): ProcessObligationState { return { schema:
|
|
|
35
38
|
export function normalizeProcessState(value: unknown): ProcessObligationState {
|
|
36
39
|
const row = value && typeof value === "object" ? value as any : {}, state = createProcessState();
|
|
37
40
|
state.runtimeReceipts = normalizeRuntimeReceipts(row.runtimeReceipts);
|
|
41
|
+
if (row.privateVerificationRequired !== undefined && row.privateVerificationRequired !== true) throw Error('Invalid private verification requirement; dependent effects are blocked.');
|
|
42
|
+
if (row.privateVerificationRequired === true) state.privateVerificationRequired = true;
|
|
43
|
+
if (row.privateVerification !== undefined) {
|
|
44
|
+
const p = row.privateVerification;
|
|
45
|
+
if (!p || p.origin !== 'private-config-current-state' || typeof p.evidenceRef !== 'string' || !/^[a-f0-9]{64}$/.test(p.evidenceHash) || !/^[a-f0-9]{64}$/.test(p.revision) || !p.binding || !Array.isArray(p.receipts) || p.receipts.length > 64 || Buffer.byteLength(JSON.stringify(p)) > 64 * 1024) throw Error('Invalid private verification state; dependent effects are blocked.');
|
|
46
|
+
state.privateVerification = structuredClone(p);
|
|
47
|
+
}
|
|
38
48
|
if(row.workOrigin!==undefined){if(row.workOrigin!=="operator-current-state")throw new Error("Invalid work origin; dependent effects are blocked.");state.workOrigin=row.workOrigin;}
|
|
39
49
|
if (RISKS.has(row.risk)) state.risk = row.risk; if (SCOPES.has(row.scope)) state.scope = row.scope;
|
|
40
50
|
for (const key of ["acceptance", "review", "plan"] as const) { const stage = row[key] && typeof row[key] === "object" ? row[key] : {}; state[key] = { required: key !== "plan" && (key === "acceptance" || stage.required === true || key === "review" && (state.risk === "high" || state.scope === "wide")), evidenceRef: typeof stage.evidenceRef === "string" && stage.evidenceRef ? stage.evidenceRef : null, revision: typeof stage.revision === "string" && stage.revision ? stage.revision : null }; }
|
|
@@ -63,8 +73,8 @@ export function applyProcessClassification(current: ProcessObligationState, inpu
|
|
|
63
73
|
return { ok: true, state: next, message: `Process classified: risk ${next.risk}, scope ${next.scope}.` };
|
|
64
74
|
}
|
|
65
75
|
export function effectiveProcessStage(state: ProcessObligationState, stage: "plan" | "review" | "confirmation"): boolean { if (stage === "plan") return false; const s = normalizeProcessState(state); return (stage !== "confirmation" && s[stage].required) || !!s.additions?.some(a => a.status === "active" && (stage === "confirmation" ? a.reason === "irreversible_execution" : a.reason === "wide_change" || a.reason === "security_change")); }
|
|
66
|
-
export function noteProcessStage(state: ProcessObligationState, stage: "acceptance" | "plan" | "review", evidence: { evidenceRef: string; revision: string; changedFiles?: string[]; workOrigin?: "operator-current-state" }): ProcessObligationState { const next = normalizeProcessState(state); if ((stage === "plan" || stage === "acceptance" || effectiveProcessStage(next, stage)) && evidence.evidenceRef && evidence.revision) next[stage] = { ...next[stage], evidenceRef: evidence.evidenceRef, revision: evidence.revision }; if (stage === "acceptance" && evidence.changedFiles) { next.changedFiles = strings(evidence.changedFiles); if(evidence.workOrigin)next.workOrigin=evidence.workOrigin;else delete next.workOrigin; } return next; }
|
|
67
|
-
export function processOpenObligations(state: ProcessObligationState, revision?: string): string[] { const s = normalizeProcessState(state); return [s.risk === "unknown" ? "risk" : "", s.acceptance.required && (!s.acceptance.evidenceRef || revision && s.acceptance.revision !== revision) ? "acceptance" : "", effectiveProcessStage(s, "review") && (!s.review.evidenceRef || revision && s.review.revision !== revision) ? "review" : "", effectiveProcessStage(s, "confirmation") ? "action_confirmation" : ""].filter(Boolean); }
|
|
76
|
+
export function noteProcessStage(state: ProcessObligationState, stage: "acceptance" | "plan" | "review", evidence: { evidenceRef: string; revision: string; changedFiles?: string[]; workOrigin?: "operator-current-state" }): ProcessObligationState { const next = normalizeProcessState(state); if ((stage === "plan" || stage === "acceptance" || effectiveProcessStage(next, stage)) && evidence.evidenceRef && evidence.revision) next[stage] = { ...next[stage], evidenceRef: evidence.evidenceRef, revision: evidence.revision }; if (stage === "acceptance" && evidence.changedFiles) { delete next.privateVerification; delete next.privateVerificationRequired; next.changedFiles = strings(evidence.changedFiles); if(evidence.workOrigin)next.workOrigin=evidence.workOrigin;else delete next.workOrigin; } return next; }
|
|
77
|
+
export function processOpenObligations(state: ProcessObligationState, revision?: string, privateUse?: PrivateProofUse): string[] { const s = normalizeProcessState(state); const privateRequired = s.privateVerificationRequired || !!s.privateVerification; if (privateProcessProofCurrent(s, privateUse)) return [s.risk === 'unknown' ? 'risk' : '', effectiveProcessStage(s, 'confirmation') ? 'action_confirmation' : ''].filter(Boolean); return [s.risk === "unknown" ? "risk" : "", privateRequired || s.acceptance.required && (!s.acceptance.evidenceRef || revision && s.acceptance.revision !== revision) ? "acceptance" : "", privateRequired || effectiveProcessStage(s, "review") && (!s.review.evidenceRef || revision && s.review.revision !== revision) ? "review" : "", effectiveProcessStage(s, "confirmation") ? "action_confirmation" : ""].filter(Boolean); }
|
|
68
78
|
// Recovery guidance is derived from effective obligations, not roster size or model advice.
|
|
69
79
|
export function missingProcessRoleRecoveryHints(state: ProcessObligationState, roster: ReadonlySet<string>): string {
|
|
70
80
|
const open = processOpenObligations(state);
|
|
@@ -126,7 +136,7 @@ export function processActionGate(state: ProcessObligationState, contract?: Acti
|
|
|
126
136
|
if (!contract?.actionId || !contract.taskId || !contract.inputRevision || !contract.operation || !contract.target || pending.some(a => a.taskId !== contract.taskId || a.inputRevision !== contract.inputRevision) || !consumeActionGrant(grant, contract)) return { reason: "action_confirmation_unsupported", message: "A task-triage irreversible-action signal requires exact task/revision/action-bound human confirmation; unsupported binding refuses this effect." };
|
|
127
137
|
return null;
|
|
128
138
|
}
|
|
129
|
-
export function processPreEffectGate(state: ProcessObligationState, effect: "write" | "child" | "prove", persona = "", revision?: string): { reason: string; message: string } | null {
|
|
139
|
+
export function processPreEffectGate(state: ProcessObligationState, effect: "write" | "child" | "prove", persona = "", revision?: string, privateUse?: PrivateProofUse): { reason: string; message: string } | null {
|
|
130
140
|
let s: ProcessObligationState;
|
|
131
141
|
try { s = normalizeProcessState(state); } catch { return { reason: "process_state_corrupt", message: "Saved process additions are invalid or oversized; dependent effects are blocked until human recovery of the session state." }; }
|
|
132
142
|
// Only the Hub's direct bash/edit/write effects receive exact-action grants.
|
|
@@ -138,20 +148,23 @@ export function processPreEffectGate(state: ProcessObligationState, effect: "wri
|
|
|
138
148
|
const stageProducer = effect === "child" && ["code-reviewer", "plan-reviewer", "security-auditor"].includes(persona) && effectiveProcessStage(s, "review") && !s.review.evidenceRef;
|
|
139
149
|
|
|
140
150
|
if ((effect === "write" || effect === "child") && !stageProducer) { const confirmation = processActionGate(s); if (confirmation) return confirmation; }
|
|
141
|
-
if (effect === "prove") { const open = processOpenObligations(s, revision).filter(x => x !== "acceptance" && x !== "action_confirmation"); if (open.length) return { reason: "process_obligations_open", message: `Assertion cannot become proven while process obligations are open: ${open.join(", ")}.` }; }
|
|
151
|
+
if (effect === "prove") { const open = processOpenObligations(s, revision, privateUse).filter(x => x !== "acceptance" && x !== "action_confirmation"); if (open.length) return { reason: "process_obligations_open", message: `Assertion cannot become proven while process obligations are open: ${open.join(", ")}.` }; }
|
|
142
152
|
return null;
|
|
143
153
|
}
|
|
144
|
-
export function evaluateProcessObligations(state: ProcessObligationState, input: { writable: boolean; budgetTier: string; t2Accepted?: boolean; currentRevision?: string }): ProcessVerdict {
|
|
154
|
+
export function evaluateProcessObligations(state: ProcessObligationState, input: { writable: boolean; budgetTier: string; t2Accepted?: boolean; currentRevision?: string; privateUse?: PrivateProofUse }): ProcessVerdict {
|
|
145
155
|
const s = normalizeProcessState(state); const additions = s.additions!.map(({ id, taskId, evaluationId, inputRevision, reason, status }) => ({ id, taskId, evaluationId, inputRevision, reason, status })); if (!input.writable) return { accepted: false, path: "read-only", risk: s.risk, scope: s.scope, budgetTier: input.budgetTier, obligations: { risk: { status: "unsupported" }, acceptance: { status: "unsupported" }, review: { status: "unsupported" }, plan: { status: "unsupported" } }, additions, appliedRuleIds: rules(s.risk, "read-only"), currentStage: "acceptance", admissibleNextAction: "continue read-only research; changed-task acceptance is unavailable", auditScope: [], explanation: `Read-only source-traceable path; T2 acceptance is unsupported and fails closed. Budget tier ${input.budgetTier} controls per-run resources only.` };
|
|
146
156
|
const status = (stage: ProcessStageState, required = stage.required, revisionBound = true): ObligationStatus => !required ? "satisfied" : stage.evidenceRef && (!revisionBound || !input.currentRevision || stage.revision === input.currentRevision) ? "satisfied" : "open";
|
|
147
157
|
const obligations: ProcessVerdict["obligations"] = { risk: { status: s.risk === "unknown" ? "open" : "satisfied" }, acceptance: { status: input.t2Accepted || status(s.acceptance) === "satisfied" ? "satisfied" : "open", ...(s.acceptance.evidenceRef ? { evidenceRef: s.acceptance.evidenceRef } : {}) }, review: { status: status(s.review, effectiveProcessStage(s, "review")), ...(s.review.evidenceRef ? { evidenceRef: s.review.evidenceRef } : {}) }, plan: { status: status(s.plan, effectiveProcessStage(s, "plan"), false), ...(s.plan.evidenceRef ? { evidenceRef: s.plan.evidenceRef } : {}) } };
|
|
158
|
+
const privateCurrent = privateProcessProofCurrent(s, input.privateUse);
|
|
159
|
+
if ((s.privateVerificationRequired || s.privateVerification) && !privateCurrent) for (const stage of ['acceptance', 'review'] as const) obligations[stage] = { status: 'open' };
|
|
160
|
+
if (privateCurrent) for (const stage of ['acceptance', 'review'] as const) obligations[stage] = { status: 'satisfied', evidenceRef: s.privateVerification!.evidenceRef };
|
|
148
161
|
const waivedOnly = (stage: "plan" | "review" | "confirmation") => stage !== "plan" && !effectiveProcessStage(s, stage) && !(stage === "review" && s.review.required) && s.additions!.some(a => a.status === "waived" && (stage === "confirmation" ? a.reason === "irreversible_execution" : a.reason === "wide_change" || a.reason === "security_change"));
|
|
149
162
|
for (const stage of ["plan", "review"] as const) if (waivedOnly(stage)) obligations[stage] = { status: "waived" };
|
|
150
163
|
if (effectiveProcessStage(s, "confirmation") || waivedOnly("confirmation")) obligations.confirmation = { status: effectiveProcessStage(s, "confirmation") ? "open" : "waived" };
|
|
151
164
|
// Confirmation is checked for each exact effect before execution, not a task-level acceptance stage.
|
|
152
165
|
const open = Object.entries(obligations).filter(([name, x]) => name !== "confirmation" && (x.status === "open" || x.status === "unsupported")).map(([x]) => x), accepted = open.length === 0; const currentStage: ProcessStage = open.includes("risk") ? "classify-risk" : open.includes("acceptance") ? "acceptance" : open.includes("review") ? "review" : "complete";
|
|
153
166
|
const next = currentStage === "classify-risk" ? "set_task_tier with explicit risk and reason" : currentStage === "acceptance" ? "execute and verify the changed task" : currentStage === "review" ? "dispatch an independent reviewer over the current changed scope" : "report completion";
|
|
154
|
-
return { accepted, path: s.workOrigin ?? "changed-task", risk: s.risk, scope: s.scope, budgetTier: input.budgetTier, obligations, additions, appliedRuleIds: s.appliedRuleIds.length ? s.appliedRuleIds : rules(s.risk,s.scope), currentStage, admissibleNextAction: next, auditScope: s.changedFiles, explanation: `Risk ${s.risk} and scope ${s.scope} determine correctness obligations; budget tier ${input.budgetTier} controls per-run resources only.${open.length ? ` Open: ${open.join(", ")}.` : " All task-level obligations satisfied; source waivers remain waived, not satisfied."}${obligations.confirmation?.status === "open" ? " Each future effect still requires exact one-use human confirmation." : ""}` };
|
|
167
|
+
return { accepted, path: privateCurrent ? 'private-config-current-state' : s.workOrigin ?? "changed-task", risk: s.risk, scope: s.scope, budgetTier: input.budgetTier, obligations, additions, appliedRuleIds: s.appliedRuleIds.length ? s.appliedRuleIds : rules(s.risk,s.scope), currentStage, admissibleNextAction: next, auditScope: s.changedFiles, explanation: `Risk ${s.risk} and scope ${s.scope} determine correctness obligations; budget tier ${input.budgetTier} controls per-run resources only.${open.length ? ` Open: ${open.join(", ")}.` : " All task-level obligations satisfied; source waivers remain waived, not satisfied."}${obligations.confirmation?.status === "open" ? " Each future effect still requires exact one-use human confirmation." : ""}` };
|
|
155
168
|
}
|
|
156
169
|
export function processAllowsPersona(state: ProcessObligationState, persona: string): boolean { const name = String(persona||"").trim().toLowerCase(), s=normalizeProcessState(state); return effectiveProcessStage(s, "review") && ["code-reviewer","plan-reviewer","security-auditor"].includes(name); }
|
|
157
170
|
export function processAuditRecord(state: ProcessObligationState, verdict: ProcessVerdict) { return { schema: PROCESS_OBLIGATIONS_SCHEMA, risk: verdict.risk, scope: verdict.scope, budgetTier: verdict.budgetTier, obligations: Object.fromEntries(Object.entries(verdict.obligations).map(([k,v])=>[k,{status:v.status}])), additions: verdict.additions, appliedRuleIds: verdict.appliedRuleIds, currentStage: verdict.currentStage, admissibleNextAction: verdict.admissibleNextAction, auditScope: verdict.auditScope, explanation: verdict.explanation, state: normalizeProcessState(state) }; }
|
|
@@ -160,5 +173,5 @@ export function latestProcessState(entries: readonly unknown[]): ProcessObligati
|
|
|
160
173
|
/** A saved addition must never authorize a different or ambiguous recovered task. */
|
|
161
174
|
export function processTaskIdentityConflicts(state: ProcessObligationState, taskId: string): boolean {
|
|
162
175
|
const ids = new Set(state.additions?.map(addition => addition.taskId));
|
|
163
|
-
return ids.size > 1 || ids.size === 1 && !ids.has(taskId);
|
|
176
|
+
return !!state.privateVerification && state.privateVerification.binding.taskId !== taskId || ids.size > 1 || ids.size === 1 && !ids.has(taskId);
|
|
164
177
|
}
|