@chankov/agent-fleet 2.1.0 → 2.1.2
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 +4 -2
- package/.pi/agent-fleet/scripts/lib/fleet-codex-local-mcp.ts +39 -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/agent-fleet/scripts/lib/fleet-codex-response-read.ts +26 -0
- package/.pi/agent-fleet/scripts/lib/fleet-codex-response-transport.ts +38 -0
- package/.pi/harnesses/agent-hub/README.md +1 -1
- package/.pi/harnesses/agent-hub/context-continuity-compat.ts +18 -3
- 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/coms-core.ts +21 -7
- package/.pi/harnesses/lib/coms-response-read.ts +107 -0
- 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 +67 -0
- package/.pi/harnesses/lib/fleet-question-reference.ts +42 -0
- package/.pi/harnesses/lib/fleet-transcript-store.ts +1 -1
- 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/.versions/2.1.2/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.1.2/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.1.2/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/coms-claude-bridge.ts +440 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/coms-cli.ts +430 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +416 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/exec-at-target.ts +10 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/fixtures/fleet-codex-allowlist-store-child.ts +31 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/fixtures/response-fixture.ts +23 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/fleet-codex-local-mcp.mjs +26 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/fleet-codex-local-mcp.ts +59 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/fleet.ts +248 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/flow.ts +166 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +208 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/codex-desktop-queue-host.ts +106 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/codex-unix-queue-rpc.ts +91 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-allowlist-store.ts +367 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-allowlist.ts +175 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-answer-transport.ts +73 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-answers.ts +74 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-connections.ts +70 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-event-reply.ts +58 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-event-runtime.ts +116 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-instruction-store.ts +428 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-instruction-transport.ts +160 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-instructions.ts +175 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-local-mcp.ts +415 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-native-history.ts +215 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-observation-store.ts +208 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-observe-transport.ts +49 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-observe.ts +93 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-overview.ts +52 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-permission-transport.ts +23 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-permissions.ts +83 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-readonly.ts +213 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-relay-latency.ts +45 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-response-read.ts +26 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-response-transport.ts +38 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-codex-resync.ts +212 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/fleet-command.ts +268 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/flow-command.ts +107 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +238 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/peer-target.ts +1 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/resource-closure.js +1 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/session-launch.ts +56 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/lib/team-snapshot.ts +160 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/package-lock.json +57 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/package.json +10 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/peer-launch.ts +289 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/pi-session.ts +9 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/team-snapshot.ts +245 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/team-up.ts +385 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +181 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/env.ts +36 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/git.ts +99 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +130 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +137 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +37 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/quality.ts +65 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/run.ts +109 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/trace.ts +52 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/writer-lease-race.worker.mjs +36 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +148 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.1.2/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.1.2/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.1.2/.pi/agents/model-profiles.yaml +134 -0
- package/.versions/2.1.2/.pi/agents/peers.yaml +147 -0
- package/.versions/2.1.2/.pi/agents/teams.yaml +41 -0
- package/.versions/2.1.2/.pi/agents/voices.yaml +13 -0
- package/.versions/2.1.2/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.1.2/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.1.2/.pi/extensions/btw/index.ts +916 -0
- package/.versions/2.1.2/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.1.2/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.1.2/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.1.2/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.1.2/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.1.2/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.1.2/.pi/extensions/compact-and-continue/index.ts +136 -0
- package/.versions/2.1.2/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.1.2/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.1.2/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.1.2/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.1.2/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.1.2/.pi/extensions/package.json +9 -0
- package/.versions/2.1.2/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.1.2/.pi/extensions/pi-voice-stt/config.ts +199 -0
- package/.versions/2.1.2/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.1.2/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.1.2/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.1.2/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.1.2/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/README.md +1584 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/acceptance.ts +204 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/access-approval.ts +266 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/action-authorization.ts +10 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/agentic-contract.ts +43 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/agentic-evidence.ts +64 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/agentic-hub.ts +55 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/agentic-runtime.ts +56 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/agentic-sources-worker.mjs +4 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/agentic-sources.ts +74 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/agentic-state.ts +23 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/approval-wait.ts +1 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/assertion-ledger.js +68 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/assist-profile.ts +19 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/budget-recovery.ts +123 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/config.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/context.ts +47 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/recover.ts +61 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/config/agents.ts +181 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/config/model-profiles.ts +237 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/config/overrides.ts +166 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/context/budgets.ts +152 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/context-compaction-monitor.ts +35 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/context-compaction-preflight.ts +21 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/context-compaction-runtime.ts +69 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/context-compaction.ts +34 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/context-continuity-broker.ts +44 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/context-continuity-child.ts +83 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/context-continuity-client.ts +22 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/context-continuity-compat.ts +45 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/context-continuity-owners.ts +17 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/context-continuity-registry.ts +8 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/context-continuity.ts +82 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/context-pressure.ts +222 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/context-window.js +108 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/damage-guard-approval.ts +83 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/damage-guard-broker.ts +125 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/damage-guard-contract.ts +22 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/damage-guard-descendant.ts +76 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/damage-guard-hub.ts +263 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/damage-guard-identity.ts +12 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/damage-guard-owners.ts +59 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/damage-guard-state.ts +43 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/damage-guard-test-tsconfig.json +19 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/delegate.ts +478 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/deterministic-fs.ts +195 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/dispatch-coms.ts +258 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/dispatch-native-complete.ts +176 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +301 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +262 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/dispatch-native-types.ts +293 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/dispatch-native.ts +236 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +27 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +77 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/docs-lane.js +123 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/execution-evidence.ts +96 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/execution-trace.ts +241 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/external-blocker.js +92 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/file-discovery/adapters.ts +88 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/file-discovery/broker-client.ts +62 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/file-discovery/broker.ts +128 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/file-discovery/child-extension.ts +42 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/file-discovery/descendant.ts +67 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/file-discovery/discovery-worker.mjs +15 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/file-discovery/discovery.ts +126 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/file-discovery/evaluate.ts +57 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/file-discovery/hub.ts +170 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/file-discovery/native-context.ts +8 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/file-discovery/native-fixture.test-support.ts +108 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/file-discovery/owners.ts +100 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/file-discovery/results.ts +55 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/file-discovery/runtime.ts +130 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/file-discovery/semantic-profiles.ts +18 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/file-discovery/sources.ts +69 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/file-discovery/state.ts +22 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/filesystem-tool.ts +166 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/fixtures/registration-surface.json +68 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/helpers.ts +270 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/history-projection.ts +116 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/hub-state-audit.js +41 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/index.ts +2705 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/input/completions.ts +82 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/input/shortcuts.ts +23 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +231 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +145 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +90 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/no-progress.ts +622 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/operator-current-state.ts +53 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/operator-watchdog.ts +97 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/orchestration-activation.ts +109 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/orchestration-route.ts +68 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/permission-channel.ts +87 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/permission-relay.ts +84 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/policy/work-mode.ts +142 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/presentation.ts +54 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/private-config-current-state.ts +81 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/private-config-fixtures.ts +26 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/private-config-review.ts +100 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/proactive-config.ts +22 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/proactive-external-git.ts +82 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/proactive-external.ts +142 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/proactive-local.ts +89 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/proactive-observer.ts +106 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/proactive-rules.ts +171 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/proactive-runtime.ts +318 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/proactive-snapshot.ts +279 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/proactive-types.ts +70 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/process-obligations.ts +177 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/prompts/context.ts +55 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/prompts/fragments.ts +86 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/prompts/system-prompt.ts +125 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/recover-state.ts +104 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/recovery-contract.ts +151 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/research/runtime.ts +215 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/research/spawn-run.ts +221 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/return-contract.js +371 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/return-extract.js +77 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/review-closure.ts +43 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/review-continuity.ts +73 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/review-findings.js +96 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/review-reuse.ts +47 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/review-verdict.ts +6 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/run-budget.js +342 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/run-namespace.js +93 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/runtime-receipts.ts +63 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/runtime-test-check.ts +85 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/safety-routing.ts +28 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/scope-gate.js +233 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/session-audit.ts +331 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/spawn.ts +702 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/specialist-result-receipt.ts +13 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/specialist-result.ts +78 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/system1-communication-store.ts +225 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/system1-report.ts +275 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/system1-runtime.ts +271 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/task-continuation.ts +4 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/task-resume-contract.ts +80 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/task-triage-authorization.ts +170 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/task-triage-config.ts +21 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/task-triage-obligations.ts +120 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/task-triage-runtime.ts +130 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/timeline.ts +72 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +79 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tools/action-executors.ts +216 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tools/ask-system1-files.ts +15 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tools/ask-system1.ts +25 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tools/context.ts +147 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +92 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +777 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tools/fleet-tools.ts +201 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tools/herdr-executors.ts +100 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tools/run-flow.ts +146 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tools/spawn-research.ts +67 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tools/verification-contract.ts +81 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/tsconfig.json +22 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/types.ts +66 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/ui/context-budget.ts +89 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +163 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/work-mode.ts +188 -0
- package/.versions/2.1.2/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
- package/.versions/2.1.2/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.1.2/.pi/harnesses/ask-user-remote/index.ts +571 -0
- package/.versions/2.1.2/.pi/harnesses/ask-user-remote/questions.ts +206 -0
- package/.versions/2.1.2/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.1.2/.pi/harnesses/ask-user-remote/runtime-ask.ts +90 -0
- package/.versions/2.1.2/.pi/harnesses/coms/README.md +105 -0
- package/.versions/2.1.2/.pi/harnesses/coms/index.ts +308 -0
- package/.versions/2.1.2/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.1.2/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.1.2/.pi/harnesses/damage-control-continue/README.md +161 -0
- package/.versions/2.1.2/.pi/harnesses/damage-control-continue/index.ts +659 -0
- package/.versions/2.1.2/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.1.2/.pi/harnesses/damage-control-continue/result-screen.ts +98 -0
- package/.versions/2.1.2/.pi/harnesses/damage-control-continue/system1-child.ts +45 -0
- package/.versions/2.1.2/.pi/harnesses/damage-control-continue/system1-client.ts +85 -0
- package/.versions/2.1.2/.pi/harnesses/damage-control-continue/system1-guard.ts +65 -0
- package/.versions/2.1.2/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.1.2/.pi/harnesses/lib/approval-wait.ts +17 -0
- package/.versions/2.1.2/.pi/harnesses/lib/bash-policy-analysis.ts +185 -0
- package/.versions/2.1.2/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.1.2/.pi/harnesses/lib/clarification-policy.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/lib/coms-core-io.ts +422 -0
- package/.versions/2.1.2/.pi/harnesses/lib/coms-core.ts +734 -0
- package/.versions/2.1.2/.pi/harnesses/lib/coms-instruction-receipts.ts +113 -0
- package/.versions/2.1.2/.pi/harnesses/lib/coms-observation.ts +74 -0
- package/.versions/2.1.2/.pi/harnesses/lib/coms-registry-entry.ts +99 -0
- package/.versions/2.1.2/.pi/harnesses/lib/coms-response-read.ts +107 -0
- package/.versions/2.1.2/.pi/harnesses/lib/context-budget-child-prompt.ts +214 -0
- package/.versions/2.1.2/.pi/harnesses/lib/context-budget-hub-prompt.ts +121 -0
- package/.versions/2.1.2/.pi/harnesses/lib/context-budget-view.ts +112 -0
- package/.versions/2.1.2/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.1.2/.pi/harnesses/lib/context-compaction-policy.js +35 -0
- package/.versions/2.1.2/.pi/harnesses/lib/damage-action-hash.ts +28 -0
- package/.versions/2.1.2/.pi/harnesses/lib/damage-auto-policy.ts +52 -0
- package/.versions/2.1.2/.pi/harnesses/lib/damage-control-presentation.ts +14 -0
- package/.versions/2.1.2/.pi/harnesses/lib/damage-control-shared.ts +276 -0
- package/.versions/2.1.2/.pi/harnesses/lib/damage-guard-port.ts +25 -0
- package/.versions/2.1.2/.pi/harnesses/lib/damage-policy.ts +35 -0
- package/.versions/2.1.2/.pi/harnesses/lib/damage-result-evidence.ts +25 -0
- package/.versions/2.1.2/.pi/harnesses/lib/damage-result-view.ts +16 -0
- package/.versions/2.1.2/.pi/harnesses/lib/deterministic-handle-path.ts +25 -0
- package/.versions/2.1.2/.pi/harnesses/lib/exact-permission-port.ts +38 -0
- package/.versions/2.1.2/.pi/harnesses/lib/execution-trace.ts +45 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-codex-event-bridge.ts +82 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-config/cli-bridge.ts +111 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-config/mutations.ts +201 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-config/snapshot.ts +417 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-config/transition.ts +68 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-config/ui.ts +269 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-config/view.ts +338 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-connection-control.ts +77 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-dashboard-view.ts +174 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-event-source.ts +21 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-notification-validation.ts +67 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-question-reference.ts +42 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-read-model.ts +609 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
- package/.versions/2.1.2/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.1.2/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.1.2/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.1.2/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.1.2/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.1.2/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.1.2/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.1.2/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.1.2/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.1.2/.pi/harnesses/lib/identical-dialog.ts +27 -0
- package/.versions/2.1.2/.pi/harnesses/lib/installation-state.js +62 -0
- package/.versions/2.1.2/.pi/harnesses/lib/peer-target.ts +24 -0
- package/.versions/2.1.2/.pi/harnesses/lib/policy-roots.js +117 -0
- package/.versions/2.1.2/.pi/harnesses/lib/policy-roots.ts +32 -0
- package/.versions/2.1.2/.pi/harnesses/lib/process-shared.ts +9 -0
- package/.versions/2.1.2/.pi/harnesses/lib/resource-closure.js +26 -0
- package/.versions/2.1.2/.pi/harnesses/lib/safe-source-read.js +29 -0
- package/.versions/2.1.2/.pi/harnesses/lib/semantic-approval.ts +80 -0
- package/.versions/2.1.2/.pi/harnesses/lib/session-target.ts +62 -0
- package/.versions/2.1.2/.pi/harnesses/lib/spawned-peers.js +191 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/config-agentic.js +15 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/config-context-compaction.js +16 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/config-damage-guard.js +24 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/config-file-discovery.js +23 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/config-json.js +37 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/config-loader.js +53 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/config-proactive.js +68 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/config-triage.js +42 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/config-v2.js +112 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/config.js +50 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/contracts.ts +154 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/demo.ts +95 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/payload-screen.ts +65 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/selection.js +11 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/worktree-scopes.js +110 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/worktree-scopes.ts +13 -0
- package/.versions/2.1.2/.pi/harnesses/lib/system1/worktree-service.ts +24 -0
- package/.versions/2.1.2/.pi/harnesses/lib/target-capabilities.js +7 -0
- package/.versions/2.1.2/.pi/harnesses/lib/update-check.ts +227 -0
- package/.versions/2.1.2/.pi/harnesses/lib/workspace-context.js +115 -0
- package/.versions/2.1.2/.pi/harnesses/lib/workspace-context.ts +22 -0
- package/.versions/2.1.2/.pi/harnesses/package-lock.json +2121 -0
- package/.versions/2.1.2/.pi/harnesses/package.json +13 -0
- package/.versions/2.1.2/.pi/prompts/af-build.md +27 -0
- package/.versions/2.1.2/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.1.2/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.1.2/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.1.2/.pi/prompts/af-review.md +16 -0
- package/.versions/2.1.2/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.1.2/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.1.2/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.1.2/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.1.2/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.1.2/.pi/prompts/af-test.md +19 -0
- package/.versions/2.1.2/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.1.2/.version +1 -0
- package/.versions/2.1.2/agents/architect.md +24 -0
- package/.versions/2.1.2/agents/bowser.md +28 -0
- package/.versions/2.1.2/agents/builder.md +55 -0
- package/.versions/2.1.2/agents/code-reviewer.md +209 -0
- package/.versions/2.1.2/agents/deep-researcher.md +32 -0
- package/.versions/2.1.2/agents/documenter.md +22 -0
- package/.versions/2.1.2/agents/orchestrator.md +22 -0
- package/.versions/2.1.2/agents/plan-reviewer.md +83 -0
- package/.versions/2.1.2/agents/planner.md +107 -0
- package/.versions/2.1.2/agents/releaser.md +24 -0
- package/.versions/2.1.2/agents/researcher.md +30 -0
- package/.versions/2.1.2/agents/security-auditor.md +167 -0
- package/.versions/2.1.2/agents/test-engineer.md +153 -0
- package/.versions/2.1.2/agents/web-debugger.md +44 -0
- package/.versions/2.1.2/agents/web-performance-auditor.md +194 -0
- package/.versions/2.1.2/bin/catalog/harness-runtime-closure.json +85 -0
- package/.versions/2.1.2/docs/ARCHITECTURE.md +1195 -0
- package/.versions/2.1.2/docs/agent-fleet-setup.md +1143 -0
- package/.versions/2.1.2/docs/claude-code-coms-bridge.md +147 -0
- package/.versions/2.1.2/docs/codex-local-mcp.md +503 -0
- package/.versions/2.1.2/docs/codex-session-bridge.md +44 -0
- package/.versions/2.1.2/docs/codex-setup.md +183 -0
- package/.versions/2.1.2/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.1.2/docs/fleet-native-voice.md +145 -0
- package/.versions/2.1.2/docs/getting-started.md +126 -0
- package/.versions/2.1.2/docs/npm-install.md +535 -0
- package/.versions/2.1.2/docs/pi-extensions.md +455 -0
- package/.versions/2.1.2/docs/pi-setup.md +92 -0
- package/.versions/2.1.2/docs/skill-anatomy.md +150 -0
- package/.versions/2.1.2/install-manifest.json +3239 -0
- package/.versions/2.1.2/justfile +247 -0
- package/.versions/2.1.2/manifest-meta.json +1087 -0
- package/.versions/2.1.2/references/accessibility-checklist.md +160 -0
- package/.versions/2.1.2/references/communication-contract.md +26 -0
- package/.versions/2.1.2/references/definition-of-done.md +67 -0
- package/.versions/2.1.2/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.1.2/references/observability-checklist.md +92 -0
- package/.versions/2.1.2/references/orchestration-patterns.md +370 -0
- package/.versions/2.1.2/references/performance-checklist.md +236 -0
- package/.versions/2.1.2/references/prompting-patterns.md +380 -0
- package/.versions/2.1.2/references/security-checklist.md +245 -0
- package/.versions/2.1.2/references/testing-patterns.md +235 -0
- package/.versions/2.1.2/references/workflow-authoring.md +304 -0
- package/.versions/2.1.2/skills/_internal/grilling.md +59 -0
- package/.versions/2.1.2/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.1.2/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.1.2/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.1.2/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.1.2/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.1.2/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.1.2/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.1.2/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.1.2/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.1.2/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.1.2/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.1.2/skills/fleet-connect/SKILL.md +25 -0
- package/.versions/2.1.2/skills/fleet-native-voice/SKILL.md +87 -0
- package/.versions/2.1.2/skills/fleet-native-voice/agents/openai.yaml +4 -0
- package/.versions/2.1.2/skills/fleet-native-voice.zip +0 -0
- package/.versions/2.1.2/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.1.2/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.1.2/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.1.2/skills/idea-refine/examples.md +238 -0
- package/.versions/2.1.2/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.1.2/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.1.2/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.1.2/skills/incremental-implementation/SKILL.md +353 -0
- package/.versions/2.1.2/skills/incremental-implementation.zip +0 -0
- package/.versions/2.1.2/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.1.2/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.1.2/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.1.2/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.1.2/skills/planning-and-task-breakdown/SKILL.md +318 -0
- package/.versions/2.1.2/skills/planning-and-task-breakdown.zip +0 -0
- package/.versions/2.1.2/skills/repository-ai-setup/SKILL.md +135 -0
- package/.versions/2.1.2/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/.versions/2.1.2/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/.versions/2.1.2/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/.versions/2.1.2/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/.versions/2.1.2/skills/repository-ai-setup/references/verify-setup.md +20 -0
- package/.versions/2.1.2/skills/repository-ai-setup.zip +0 -0
- package/.versions/2.1.2/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.1.2/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.1.2/skills/spec-driven-development.zip +0 -0
- package/.versions/2.1.2/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.1.2/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/CHANGELOG.md +17 -0
- package/docs/ARCHITECTURE.md +38 -1
- package/docs/codex-local-mcp.md +71 -2
- package/docs/codex-session-bridge.md +2 -2
- package/docs/codex-setup.md +1 -1
- package/docs/fleet-native-voice.md +17 -7
- package/docs/system1-context-continuity.md +11 -5
- 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
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
// Native-only local history. No CLI imports, environment discovery, grants or peer writes.
|
|
2
|
+
import * as fs from 'node:fs';
|
|
3
|
+
import * as path from 'node:path';
|
|
4
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
5
|
+
import { AllowedSessionsPolicy, type ConversationKey, type TargetEpoch } from './fleet-codex-allowlist.ts';
|
|
6
|
+
import { redactSecrets } from '../../../harnesses/lib/fleet-transcript-store.ts';
|
|
7
|
+
export class HistoryError extends Error {
|
|
8
|
+
readonly code: string;
|
|
9
|
+
constructor(code: string) { super(code); this.code = code; }
|
|
10
|
+
}
|
|
11
|
+
function fail(code: string): never { throw new HistoryError(code); }
|
|
12
|
+
const object = (v: unknown): v is Record<string, unknown> => !!v && typeof v === 'object' && !Array.isArray(v);
|
|
13
|
+
const text = (v: unknown): v is string => typeof v === 'string' && v.length > 0;
|
|
14
|
+
const hash = (v: string | Buffer) => createHash('sha256').update(v).digest('hex');
|
|
15
|
+
const MAX = 4 * 1024 * 1024;
|
|
16
|
+
function redactedJson(value: unknown) { let nodes = 0; return JSON.stringify(value, (key, v: unknown) => { if (++nodes > 131072)
|
|
17
|
+
fail('HISTORY_LIMIT'); if (/(?:api[_-]?key|access[_-]?token|auth[_-]?token|refresh[_-]?token|client[_-]?secret|password|passwd|pwd|token|secret|authorization)$/i.test(key))
|
|
18
|
+
return '[REDACTED]'; if (typeof v === 'string')
|
|
19
|
+
return v.length > 4096 ? '[HISTORY_TEXT_WITHHELD:SIZE_LIMIT]' : redactSecrets(v); return v; }); }
|
|
20
|
+
function contextKey(c: ConversationKey) { try {
|
|
21
|
+
new AllowedSessionsPolicy().list(c);
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
fail('HISTORY_IDENTITY_INVALID');
|
|
25
|
+
} return JSON.stringify([c.hostProfile, c.principal, c.threadId]); }
|
|
26
|
+
function identity(c: ConversationKey) { contextKey(c); if (!/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(c.threadId))
|
|
27
|
+
fail('HISTORY_IDENTITY_INVALID'); return c.threadId.toLowerCase(); }
|
|
28
|
+
function selector(v: unknown): {
|
|
29
|
+
project: string;
|
|
30
|
+
peer: string;
|
|
31
|
+
} { if (!object(v) || Object.keys(v).some(k => !['project', 'peer'].includes(k)) || typeof v.project !== 'string' || !/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(v.project) || v.project.includes('..') || typeof v.peer !== 'string' || !/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/.test(v.peer))
|
|
32
|
+
fail('INVALID_ARGUMENTS'); return { project: v.project, peer: v.peer }; }
|
|
33
|
+
function ancestors(p: string) { if (typeof process.getuid !== 'function')
|
|
34
|
+
fail('HISTORY_UNSUPPORTED_PLATFORM'); const uid = process.getuid(); for (let current = p;; current = path.dirname(current)) {
|
|
35
|
+
const s = fs.lstatSync(current);
|
|
36
|
+
if (s.isSymbolicLink() || !s.isDirectory() || s.uid !== uid && s.uid !== 0 || (s.mode & 0o022) !== 0 && (s.mode & 0o1000) === 0)
|
|
37
|
+
fail('HISTORY_UNSAFE_PATH');
|
|
38
|
+
if (current === path.dirname(current))
|
|
39
|
+
break;
|
|
40
|
+
} }
|
|
41
|
+
function stat(p: string, directory: boolean) { try {
|
|
42
|
+
const s = fs.lstatSync(p);
|
|
43
|
+
if (s.isSymbolicLink() || !(directory ? s.isDirectory() : s.isFile()) || s.uid !== process.getuid?.() || (s.mode & 0o077) || !directory && s.nlink !== 1)
|
|
44
|
+
fail('HISTORY_UNSAFE_PATH');
|
|
45
|
+
if (directory) {
|
|
46
|
+
ancestors(p);
|
|
47
|
+
if (fs.realpathSync(p) !== p)
|
|
48
|
+
fail('HISTORY_UNSAFE_PATH');
|
|
49
|
+
}
|
|
50
|
+
return s;
|
|
51
|
+
}
|
|
52
|
+
catch (e) {
|
|
53
|
+
if ((e as NodeJS.ErrnoException).code === 'ENOENT')
|
|
54
|
+
return null;
|
|
55
|
+
throw e;
|
|
56
|
+
} }
|
|
57
|
+
function read(root: string, name: string) { const dir = stat(root, true); if (!dir)
|
|
58
|
+
return null; const p = path.join(root, name), before = stat(p, false); if (!before)
|
|
59
|
+
return null; if (before.size > MAX)
|
|
60
|
+
fail('HISTORY_LIMIT'); const fd = fs.openSync(p, fs.constants.O_RDONLY | fs.constants.O_NOFOLLOW); try {
|
|
61
|
+
const opened = fs.fstatSync(fd);
|
|
62
|
+
if (opened.ino !== before.ino || opened.dev !== before.dev)
|
|
63
|
+
fail('HISTORY_STATE_CHANGED');
|
|
64
|
+
const bytes = fs.readFileSync(fd);
|
|
65
|
+
if (bytes.length > MAX)
|
|
66
|
+
fail('HISTORY_LIMIT');
|
|
67
|
+
const after = fs.fstatSync(fd), current = stat(p, false), end = stat(root, true);
|
|
68
|
+
if (!current || !end || current.ino !== opened.ino || current.dev !== opened.dev || after.size !== opened.size || after.mtimeMs !== opened.mtimeMs || after.ctimeMs !== opened.ctimeMs || end.ino !== dir.ino || end.dev !== dir.dev)
|
|
69
|
+
fail('HISTORY_STATE_CHANGED');
|
|
70
|
+
return bytes;
|
|
71
|
+
}
|
|
72
|
+
finally {
|
|
73
|
+
fs.closeSync(fd);
|
|
74
|
+
} }
|
|
75
|
+
function json(bytes: Buffer) { try {
|
|
76
|
+
const value = JSON.parse(bytes.toString('utf8'));
|
|
77
|
+
if (!object(value))
|
|
78
|
+
fail('LEGACY_STATE_INVALID');
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
catch (e) {
|
|
82
|
+
if (e instanceof HistoryError)
|
|
83
|
+
throw e;
|
|
84
|
+
return fail('LEGACY_STATE_INVALID');
|
|
85
|
+
} }
|
|
86
|
+
export class NativeHistory {
|
|
87
|
+
readonly #root: string;
|
|
88
|
+
readonly #legacy?: string;
|
|
89
|
+
constructor(policyRoot: string, legacyRoot?: string) { if (!path.isAbsolute(policyRoot) || path.resolve(policyRoot) !== policyRoot)
|
|
90
|
+
fail('HISTORY_UNSAFE_PATH'); this.#root = policyRoot + '.reports'; this.#legacy = legacyRoot; if (legacyRoot) {
|
|
91
|
+
if (!path.isAbsolute(legacyRoot) || path.resolve(legacyRoot) !== legacyRoot || [policyRoot, policyRoot + '.instructions', policyRoot + '.observations', this.#root].some(p => p === legacyRoot || p.startsWith(legacyRoot + path.sep) || legacyRoot.startsWith(p + path.sep)))
|
|
92
|
+
fail('HISTORY_UNSAFE_PATH');
|
|
93
|
+
} }
|
|
94
|
+
#archive(c: ConversationKey) { const id = identity(c); if (!this.#legacy)
|
|
95
|
+
fail('LEGACY_NOT_CONFIGURED'); if (!stat(this.#legacy, true))
|
|
96
|
+
fail('LEGACY_ARCHIVE_MISSING'); const bindingBytes = read(this.#legacy, id + '.json'), runtimeBytes = read(this.#legacy, id + '.json.runtime'); if (!bindingBytes && !runtimeBytes)
|
|
97
|
+
return null; const binding = bindingBytes ? json(bindingBytes) : null; if (bindingBytes && bindingBytes.length > 8192)
|
|
98
|
+
fail('LEGACY_STATE_INVALID'); if (binding) {
|
|
99
|
+
if (binding.version !== 1 || binding.clientId !== id || !['project', 'peer', 'sessionId', 'startedAt', 'selectedAt'].every(k => text(binding[k])) || !Number.isFinite(Date.parse(binding.startedAt as string)) || !Number.isFinite(Date.parse(binding.selectedAt as string)))
|
|
100
|
+
fail('LEGACY_STATE_INVALID');
|
|
101
|
+
selector({ project: binding.project, peer: binding.peer });
|
|
102
|
+
} let runtime: Record<string, unknown> | null = null; if (runtimeBytes) {
|
|
103
|
+
runtime = json(runtimeBytes);
|
|
104
|
+
if (runtime.version !== 1 || !Array.isArray(runtime.receipts) || runtime.receipts.length > 1000 || !object(runtime.cursor) || runtime.receipts.some(r => !object(r) || !['commandId', 'target', 'digest', 'at'].every(k => text(r[k])) || !['unknown', 'submitted', 'queued', 'result', 'failed'].includes(r.state as string)))
|
|
105
|
+
fail('LEGACY_STATE_INVALID');
|
|
106
|
+
if (runtime.questionReceipts !== undefined && (!Array.isArray(runtime.questionReceipts) || runtime.questionReceipts.length > 1000 || runtime.questionReceipts.some(r => !object(r) || !['requestId', 'wireId', 'target', 'questionId', 'digest', 'status', 'at'].every(k => text(r[k])))))
|
|
107
|
+
fail('LEGACY_STATE_INVALID');
|
|
108
|
+
} return { binding, bindingBytes, runtime, runtimeBytes }; }
|
|
109
|
+
legacy(c: ConversationKey, input: unknown) {
|
|
110
|
+
if (!object(input) || Object.keys(input).some(k => !['section', 'offset', 'limit', 'sourceSha256'].includes(k)) || !['selection', 'runtime'].includes(input.section as string)) fail('INVALID_ARGUMENTS');
|
|
111
|
+
const offset=input.offset??0,limit=input.limit??8192,expected=input.sourceSha256;
|
|
112
|
+
if(!Number.isSafeInteger(offset)||(offset as number)<0||!Number.isSafeInteger(limit)||(limit as number)<1||(limit as number)>8192||expected!==undefined&&(typeof expected!=='string'||! /^[a-f0-9]{64}$/.test(expected))||(offset as number)>0&&expected===undefined)fail('INVALID_ARGUMENTS');
|
|
113
|
+
const archive=this.#archive(c),bytes=archive&&(input.section==='selection'?archive.bindingBytes:archive.runtimeBytes);
|
|
114
|
+
if(!bytes){if(expected!==undefined)fail('HISTORY_STATE_CHANGED');return {status:'unavailable',scope:'historical_only',remote:'not_checked',text:'',nextOffset:null};}
|
|
115
|
+
const sourceSha256=hash(bytes);if(expected!==undefined&&expected!==sourceSha256)fail('HISTORY_STATE_CHANGED');
|
|
116
|
+
const redacted=redactedJson(json(bytes));if(redacted.length>MAX)fail('HISTORY_LIMIT');if((offset as number)>redacted.length)fail('INVALID_ARGUMENTS');
|
|
117
|
+
const end=Math.min(redacted.length,(offset as number)+(limit as number));
|
|
118
|
+
return {status:'historical',scope:'historical_only',remote:'not_checked',humanProvenance:'unknown',encoding:'redacted_json_fragment',offset,text:redacted.slice(offset as number,end),nextOffset:end<redacted.length?end:null,sourceSha256,totalCharacters:redacted.length};
|
|
119
|
+
}
|
|
120
|
+
assertNewAction(c: ConversationKey, id: string) { const thread = identity(c); if (!this.#legacy)
|
|
121
|
+
return; for (const suffix of ['.json.lock', '.json.runtime.lock']) {
|
|
122
|
+
try {
|
|
123
|
+
fs.lstatSync(path.join(this.#legacy, thread + suffix));
|
|
124
|
+
fail('LEGACY_WRITER_ACTIVE');
|
|
125
|
+
}
|
|
126
|
+
catch (e) {
|
|
127
|
+
if ((e as NodeJS.ErrnoException).code !== 'ENOENT')
|
|
128
|
+
throw e;
|
|
129
|
+
}
|
|
130
|
+
} const a = this.#archive(c); if (!a?.runtime)
|
|
131
|
+
return; const receipts = a.runtime.receipts as Record<string, unknown>[], questions = (a.runtime.questionReceipts ?? []) as Record<string, unknown>[]; if (receipts.some(r => r.commandId === id) || questions.some(r => r.requestId === id))
|
|
132
|
+
fail('LEGACY_REQUEST_ID_RESERVED'); }
|
|
133
|
+
#name(c: ConversationKey, s: unknown) { identity(c); return hash(JSON.stringify([contextKey(c), selector(s)])) + '.json'; }
|
|
134
|
+
save(c: ConversationKey, t: TargetEpoch, report: unknown) {
|
|
135
|
+
const s = selector({ project: t.project, peer: t.peer }), name = this.#name(c, s);
|
|
136
|
+
if (!object(report))
|
|
137
|
+
fail('INVALID_ARGUMENTS');
|
|
138
|
+
const value = { version: 1, context: contextKey(c), selector: s, target: t, observedAt: new Date().toISOString(), report };
|
|
139
|
+
if (Buffer.byteLength(JSON.stringify(value)) > 98304)
|
|
140
|
+
fail('HISTORY_LIMIT');
|
|
141
|
+
const bytes = Buffer.from(JSON.stringify({ ...value, report: JSON.parse(redactedJson(report)) }));
|
|
142
|
+
if (bytes.length > 98304)
|
|
143
|
+
fail('HISTORY_LIMIT');
|
|
144
|
+
ancestors(path.dirname(this.#root));
|
|
145
|
+
if (!stat(this.#root, true)) {
|
|
146
|
+
try {
|
|
147
|
+
fs.mkdirSync(this.#root, { mode: 0o700 });
|
|
148
|
+
}
|
|
149
|
+
catch (e) {
|
|
150
|
+
if ((e as NodeJS.ErrnoException).code !== 'EEXIST')
|
|
151
|
+
throw e;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
const root = stat(this.#root, true)!;
|
|
155
|
+
const file = path.join(this.#root, name), lock = file + '.lock';
|
|
156
|
+
let lockfd: number;
|
|
157
|
+
try {
|
|
158
|
+
lockfd = fs.openSync(lock, fs.constants.O_WRONLY | fs.constants.O_CREAT | fs.constants.O_EXCL | fs.constants.O_NOFOLLOW, 0o600);
|
|
159
|
+
}
|
|
160
|
+
catch (e) {
|
|
161
|
+
if ((e as NodeJS.ErrnoException).code === 'EEXIST')
|
|
162
|
+
fail('HISTORY_BUSY');
|
|
163
|
+
throw e;
|
|
164
|
+
}
|
|
165
|
+
const held = fs.fstatSync(lockfd), tmp = file + '.' + randomUUID() + '.tmp';
|
|
166
|
+
let renamed = false;
|
|
167
|
+
try {
|
|
168
|
+
const previous = stat(file, false);
|
|
169
|
+
if (previous)
|
|
170
|
+
this.replay(c, s);
|
|
171
|
+
const fd = fs.openSync(tmp, fs.constants.O_WRONLY | fs.constants.O_CREAT | fs.constants.O_EXCL | fs.constants.O_NOFOLLOW, 0o600);
|
|
172
|
+
try {
|
|
173
|
+
fs.writeFileSync(fd, bytes);
|
|
174
|
+
fs.fsyncSync(fd);
|
|
175
|
+
}
|
|
176
|
+
finally {
|
|
177
|
+
fs.closeSync(fd);
|
|
178
|
+
}
|
|
179
|
+
const current = stat(file, false), directory = stat(this.#root, true), owned = stat(lock, false);
|
|
180
|
+
if (!directory || directory.ino !== root.ino || directory.dev !== root.dev || !owned || owned.ino !== held.ino || owned.dev !== held.dev || !!previous !== !!current || previous && current && (previous.ino !== current.ino || previous.dev !== current.dev || previous.mtimeMs !== current.mtimeMs || previous.ctimeMs !== current.ctimeMs))
|
|
181
|
+
fail('HISTORY_STATE_CHANGED');
|
|
182
|
+
fs.renameSync(tmp, file);
|
|
183
|
+
renamed = true;
|
|
184
|
+
const dir = fs.openSync(this.#root, fs.constants.O_RDONLY | fs.constants.O_DIRECTORY | fs.constants.O_NOFOLLOW);
|
|
185
|
+
try {
|
|
186
|
+
fs.fsyncSync(dir);
|
|
187
|
+
}
|
|
188
|
+
finally {
|
|
189
|
+
fs.closeSync(dir);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
catch (e) {
|
|
193
|
+
if (renamed)
|
|
194
|
+
fail('HISTORY_COMMIT_UNCERTAIN');
|
|
195
|
+
throw e;
|
|
196
|
+
}
|
|
197
|
+
finally {
|
|
198
|
+
fs.closeSync(lockfd);
|
|
199
|
+
try {
|
|
200
|
+
fs.unlinkSync(tmp);
|
|
201
|
+
}
|
|
202
|
+
catch (e) {
|
|
203
|
+
if ((e as NodeJS.ErrnoException).code !== 'ENOENT')
|
|
204
|
+
throw e;
|
|
205
|
+
}
|
|
206
|
+
const current = stat(lock, false);
|
|
207
|
+
if (current && current.ino === held.ino && current.dev === held.dev)
|
|
208
|
+
fs.unlinkSync(lock);
|
|
209
|
+
}
|
|
210
|
+
return { status: 'saved', scope: 'historical_only', target: t };
|
|
211
|
+
}
|
|
212
|
+
replay(c: ConversationKey, input: unknown) { const s = selector(input), bytes = read(this.#root, this.#name(c, s)); if (!bytes)
|
|
213
|
+
fail('REPORT_UNAVAILABLE'); const value = json(bytes); if (value.version !== 1 || value.context !== contextKey(c) || JSON.stringify(value.selector) !== JSON.stringify(s) || !object(value.target) || value.target.project !== s.project || value.target.peer !== s.peer || !object(value.report) || typeof value.observedAt !== 'string')
|
|
214
|
+
fail('LEGACY_STATE_INVALID'); return { scope: 'historical_only', remote: 'not_checked', completion: 'not_established', observedAt: value.observedAt, target: value.target, report: value.report }; }
|
|
215
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
// Observation metadata only. Never policy/grants, payload archive or delivery receipts.
|
|
2
|
+
import * as fs from 'node:fs';
|
|
3
|
+
import { resolve, join, isAbsolute } from 'node:path';
|
|
4
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
5
|
+
import type { ConversationKey, TargetEpoch } from './fleet-codex-allowlist.ts';
|
|
6
|
+
export class ObservationStoreError extends Error {
|
|
7
|
+
readonly code: string;
|
|
8
|
+
constructor(code: string) { super(code); this.code = code; this.name = 'ObservationStoreError'; }
|
|
9
|
+
}
|
|
10
|
+
function fail(code: string): never { throw new ObservationStoreError(code); }
|
|
11
|
+
const object = (v: unknown): v is Record<string, unknown> => !!v && typeof v === 'object' && !Array.isArray(v);
|
|
12
|
+
const keys = (v: Record<string, unknown>, names: string[]) => Object.keys(v).length === names.length && names.every(k => Object.hasOwn(v, k));
|
|
13
|
+
const text = (v: unknown): v is string => typeof v === 'string' && v.length > 0 && v.length <= 1024 && !/[\u0000-\u001f]/.test(v);
|
|
14
|
+
const token = (v: unknown) => v === null || typeof v === 'string' && /^[a-f0-9]{64}$/.test(v);
|
|
15
|
+
const date = (v: unknown): v is string => typeof v === 'string' && v.length <= 40 && Number.isFinite(Date.parse(v));
|
|
16
|
+
const positive = (v: unknown): v is number => Number.isSafeInteger(v) && (v as number) > 0;
|
|
17
|
+
export type CursorData = {
|
|
18
|
+
leaf: string | null;
|
|
19
|
+
lastEvent: string | null;
|
|
20
|
+
questions: string[];
|
|
21
|
+
observedAt: string;
|
|
22
|
+
};
|
|
23
|
+
export type Cursor = CursorData & {
|
|
24
|
+
target: TargetEpoch;
|
|
25
|
+
revision: number;
|
|
26
|
+
};
|
|
27
|
+
type State = {
|
|
28
|
+
format: 'fleet-observations';
|
|
29
|
+
version: 1;
|
|
30
|
+
namespace: ConversationKey;
|
|
31
|
+
revision: number;
|
|
32
|
+
targets: Cursor[];
|
|
33
|
+
};
|
|
34
|
+
export const epochKey = (t: TargetEpoch) => JSON.stringify([t.project, t.peer, t.sessionId, t.startedAt]);
|
|
35
|
+
const contextKey = (c: ConversationKey) => {
|
|
36
|
+
if (!object(c) || !keys(c, ['hostProfile', 'principal', 'threadId']) || ![c.hostProfile, c.principal, c.threadId].every(text))
|
|
37
|
+
fail('CURSOR_IDENTITY_INVALID');
|
|
38
|
+
return JSON.stringify([c.hostProfile, c.principal, c.threadId]);
|
|
39
|
+
};
|
|
40
|
+
function validTarget(v: unknown): v is TargetEpoch { return object(v) && keys(v, ['project', 'peer', 'sessionId', 'startedAt']) && text(v.project) && /^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(v.project) && !v.project.includes('..') && typeof v.peer === 'string' && /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/.test(v.peer) && text(v.sessionId) && date(v.startedAt); }
|
|
41
|
+
function validData(v: unknown): v is CursorData { return object(v) && keys(v, ['leaf', 'lastEvent', 'questions', 'observedAt']) && token(v.leaf) && token(v.lastEvent) && date(v.observedAt) && Array.isArray(v.questions) && v.questions.length <= 256 && v.questions.every(q => typeof q === 'string' && /^[A-Za-z0-9][A-Za-z0-9._-]{0,95}$/.test(q)) && new Set(v.questions).size === v.questions.length; }
|
|
42
|
+
function validCursor(v: unknown): v is Cursor { return object(v) && keys(v, ['leaf', 'lastEvent', 'questions', 'observedAt', 'target', 'revision']) && validTarget(v.target) && positive(v.revision) && validData({ leaf: v.leaf, lastEvent: v.lastEvent, questions: v.questions, observedAt: v.observedAt }); }
|
|
43
|
+
const MAX_BYTES = 1048576;
|
|
44
|
+
export class ObservationStore {
|
|
45
|
+
readonly #root: string;
|
|
46
|
+
readonly #checkpoint?: (stage: string) => void;
|
|
47
|
+
readonly #known = new Map<string, number>();
|
|
48
|
+
constructor(root: string, options: {
|
|
49
|
+
checkpoint?: (stage: string) => void;
|
|
50
|
+
} = {}) { if (!isAbsolute(root) || resolve(root) !== root)
|
|
51
|
+
fail('CURSOR_UNSAFE_PATH'); this.#root = root; this.#checkpoint = options.checkpoint; }
|
|
52
|
+
#path(c: ConversationKey) { return join(this.#root, createHash('sha256').update(contextKey(c)).digest('hex') + '.json'); }
|
|
53
|
+
#safe(path: string, directory = false): fs.Stats | null {
|
|
54
|
+
let s: fs.Stats;
|
|
55
|
+
try {
|
|
56
|
+
s = fs.lstatSync(path);
|
|
57
|
+
}
|
|
58
|
+
catch (e) {
|
|
59
|
+
if ((e as NodeJS.ErrnoException).code === 'ENOENT')
|
|
60
|
+
return null;
|
|
61
|
+
throw new ObservationStoreError('CURSOR_IO_ERROR');
|
|
62
|
+
}
|
|
63
|
+
if (s.isSymbolicLink() || !(directory ? s.isDirectory() : s.isFile()) || process.getuid && s.uid !== process.getuid() || (s.mode & 0o077) !== 0 || !directory && s.nlink !== 1)
|
|
64
|
+
fail('CURSOR_UNSAFE_PATH');
|
|
65
|
+
return s;
|
|
66
|
+
}
|
|
67
|
+
#load(c: ConversationKey): State | null {
|
|
68
|
+
const path = this.#path(c), root = this.#safe(this.#root, true), st = root ? this.#safe(path) : null;
|
|
69
|
+
if (!st) {
|
|
70
|
+
if (this.#known.has(path))
|
|
71
|
+
fail('CURSOR_STATE_MISSING');
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
if (st.size > MAX_BYTES)
|
|
75
|
+
fail('CURSOR_LIMIT');
|
|
76
|
+
let raw: unknown, fd: number | undefined;
|
|
77
|
+
try {
|
|
78
|
+
fd = fs.openSync(path, fs.constants.O_RDONLY | fs.constants.O_NOFOLLOW);
|
|
79
|
+
const opened = fs.fstatSync(fd);
|
|
80
|
+
if (opened.dev !== st.dev || opened.ino !== st.ino)
|
|
81
|
+
fail('CURSOR_STATE_CHANGED');
|
|
82
|
+
const bytes = fs.readFileSync(fd);
|
|
83
|
+
if (bytes.length > MAX_BYTES)
|
|
84
|
+
fail('CURSOR_LIMIT');
|
|
85
|
+
const after = fs.fstatSync(fd);
|
|
86
|
+
if (after.size !== opened.size || after.mtimeMs !== opened.mtimeMs)
|
|
87
|
+
fail('CURSOR_STATE_CHANGED');
|
|
88
|
+
try {
|
|
89
|
+
raw = JSON.parse(bytes.toString('utf8'));
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
fail('CURSOR_STATE_INVALID');
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
catch (e) {
|
|
96
|
+
if (e instanceof ObservationStoreError)
|
|
97
|
+
throw e;
|
|
98
|
+
throw new ObservationStoreError('CURSOR_IO_ERROR');
|
|
99
|
+
}
|
|
100
|
+
finally {
|
|
101
|
+
if (fd !== undefined)
|
|
102
|
+
fs.closeSync(fd);
|
|
103
|
+
}
|
|
104
|
+
if (!object(raw))
|
|
105
|
+
fail('CURSOR_STATE_INVALID');
|
|
106
|
+
if (raw.version !== 1)
|
|
107
|
+
fail('CURSOR_STATE_VERSION');
|
|
108
|
+
if (!keys(raw, ['format', 'version', 'namespace', 'revision', 'targets']) || raw.format !== 'fleet-observations' || !positive(raw.revision) || !object(raw.namespace) || !keys(raw.namespace, ['hostProfile', 'principal', 'threadId']) || !['hostProfile', 'principal', 'threadId'].every(k => text((raw.namespace as Record<string, unknown>)[k])) || !Array.isArray(raw.targets) || raw.targets.length > 32 || !raw.targets.every(validCursor))
|
|
109
|
+
fail('CURSOR_STATE_INVALID');
|
|
110
|
+
if (contextKey(raw.namespace as unknown as ConversationKey) !== contextKey(c))
|
|
111
|
+
fail('CURSOR_NAMESPACE_MISMATCH');
|
|
112
|
+
const state = raw as unknown as State;
|
|
113
|
+
if (new Set(state.targets.map(v => epochKey(v.target))).size !== state.targets.length)
|
|
114
|
+
fail('CURSOR_STATE_INVALID');
|
|
115
|
+
if (state.revision < (this.#known.get(path) ?? 0))
|
|
116
|
+
fail('CURSOR_STATE_CHANGED');
|
|
117
|
+
this.#known.set(path, state.revision);
|
|
118
|
+
return state;
|
|
119
|
+
}
|
|
120
|
+
read(c: ConversationKey, target: TargetEpoch) {
|
|
121
|
+
if (!validTarget(target))
|
|
122
|
+
fail('CURSOR_STATE_INVALID');
|
|
123
|
+
const s = this.#load(c), cursor = s?.targets.find(v => epochKey(v.target) === epochKey(target)) ?? null;
|
|
124
|
+
return { cursor: structuredClone(cursor), reset: cursor ? null : s?.targets.some(v => v.target.project === target.project && v.target.peer === target.peer) ? 'epoch_changed' : 'initial' };
|
|
125
|
+
}
|
|
126
|
+
async save(c: ConversationKey, target: TargetEpoch, expectedRevision: number | null, next: CursorData, guard: () => Promise<void>): Promise<Cursor> {
|
|
127
|
+
const path = this.#path(c);
|
|
128
|
+
if (!validTarget(target) || !validData(next) || expectedRevision !== null && !positive(expectedRevision))
|
|
129
|
+
fail('CURSOR_STATE_INVALID');
|
|
130
|
+
// Await remote/local authorization BEFORE the synchronous lock section. Different
|
|
131
|
+
// targets merge under one fresh disk read; no async lock holder blocks its sibling.
|
|
132
|
+
await guard();
|
|
133
|
+
if (!this.#safe(this.#root, true)) {
|
|
134
|
+
try {
|
|
135
|
+
fs.mkdirSync(this.#root, { recursive: true, mode: 0o700 });
|
|
136
|
+
}
|
|
137
|
+
catch {
|
|
138
|
+
fail('CURSOR_IO_ERROR');
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
const root = this.#safe(this.#root, true)!, lock = path + '.lock';
|
|
142
|
+
let fd: number;
|
|
143
|
+
try {
|
|
144
|
+
fd = fs.openSync(lock, fs.constants.O_WRONLY | fs.constants.O_CREAT | fs.constants.O_EXCL | fs.constants.O_NOFOLLOW, 0o600);
|
|
145
|
+
}
|
|
146
|
+
catch (e) {
|
|
147
|
+
if ((e as NodeJS.ErrnoException).code === 'EEXIST')
|
|
148
|
+
fail('CURSOR_BUSY');
|
|
149
|
+
throw new ObservationStoreError('CURSOR_IO_ERROR');
|
|
150
|
+
}
|
|
151
|
+
const lockStat = fs.fstatSync(fd), tmp = path + '.' + randomUUID() + '.tmp';
|
|
152
|
+
try {
|
|
153
|
+
const s = this.#load(c) ?? { format: 'fleet-observations' as const, version: 1 as const, namespace: { ...c }, revision: 0, targets: [] }, old = s.targets.find(v => epochKey(v.target) === epochKey(target));
|
|
154
|
+
if ((old?.revision ?? null) !== expectedRevision)
|
|
155
|
+
fail('CURSOR_STATE_CHANGED');
|
|
156
|
+
if (!old && s.targets.length >= 32 || s.revision >= Number.MAX_SAFE_INTEGER || (old?.revision ?? 0) >= Number.MAX_SAFE_INTEGER)
|
|
157
|
+
fail('CURSOR_LIMIT');
|
|
158
|
+
const cursor: Cursor = { ...structuredClone(next), target: { ...target }, revision: (old?.revision ?? 0) + 1 };
|
|
159
|
+
s.targets = s.targets.filter(v => epochKey(v.target) !== epochKey(target));
|
|
160
|
+
s.targets.push(cursor);
|
|
161
|
+
s.revision++;
|
|
162
|
+
const bytes = JSON.stringify(s);
|
|
163
|
+
if (Buffer.byteLength(bytes) > MAX_BYTES)
|
|
164
|
+
fail('CURSOR_LIMIT');
|
|
165
|
+
const currentRoot = this.#safe(this.#root, true);
|
|
166
|
+
if (!currentRoot || currentRoot.dev !== root.dev || currentRoot.ino !== root.ino)
|
|
167
|
+
fail('CURSOR_UNSAFE_PATH');
|
|
168
|
+
let renamed = false;
|
|
169
|
+
try {
|
|
170
|
+
const output = fs.openSync(tmp, fs.constants.O_WRONLY | fs.constants.O_CREAT | fs.constants.O_EXCL | fs.constants.O_NOFOLLOW, 0o600);
|
|
171
|
+
try {
|
|
172
|
+
fs.writeFileSync(output, bytes);
|
|
173
|
+
fs.fsyncSync(output);
|
|
174
|
+
}
|
|
175
|
+
finally {
|
|
176
|
+
fs.closeSync(output);
|
|
177
|
+
}
|
|
178
|
+
this.#checkpoint?.('beforeRename');
|
|
179
|
+
fs.renameSync(tmp, path);
|
|
180
|
+
renamed = true;
|
|
181
|
+
this.#checkpoint?.('afterRename');
|
|
182
|
+
const dir = fs.openSync(this.#root, fs.constants.O_RDONLY | fs.constants.O_DIRECTORY | fs.constants.O_NOFOLLOW);
|
|
183
|
+
try {
|
|
184
|
+
fs.fsyncSync(dir);
|
|
185
|
+
}
|
|
186
|
+
finally {
|
|
187
|
+
fs.closeSync(dir);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
catch {
|
|
191
|
+
throw new ObservationStoreError(renamed ? 'CURSOR_COMMIT_UNCERTAIN' : 'CURSOR_IO_ERROR');
|
|
192
|
+
}
|
|
193
|
+
this.#known.set(path, s.revision);
|
|
194
|
+
return structuredClone(cursor);
|
|
195
|
+
}
|
|
196
|
+
finally {
|
|
197
|
+
try {
|
|
198
|
+
fs.rmSync(tmp, { force: true });
|
|
199
|
+
}
|
|
200
|
+
finally {
|
|
201
|
+
fs.closeSync(fd);
|
|
202
|
+
const own = this.#safe(lock);
|
|
203
|
+
if (own?.dev === lockStat.dev && own.ino === lockStat.ino)
|
|
204
|
+
fs.unlinkSync(lock);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Narrow transport: exactly one addressed snapshot request; no prompt/answer/cancel API.
|
|
2
|
+
import { lstat } from 'node:fs/promises';
|
|
3
|
+
import { isAbsolute,join,resolve } from 'node:path';
|
|
4
|
+
import { createConnection } from 'node:net';
|
|
5
|
+
import { randomUUID } from 'node:crypto';
|
|
6
|
+
import type { TargetEpoch } from './fleet-codex-allowlist.ts';
|
|
7
|
+
import type { ObservationReader } from './fleet-codex-observe.ts';
|
|
8
|
+
const object=(v:unknown):v is Record<string,unknown>=>!!v&&typeof v==='object'&&!Array.isArray(v);
|
|
9
|
+
const same=(a:unknown,b:TargetEpoch)=>object(a)&&['project','peer','sessionId','startedAt'].every(k=>a[k]===b[k as keyof TargetEpoch]);
|
|
10
|
+
class SourceError extends Error { readonly code:string;constructor(code:string){super(code);this.code=code;} }
|
|
11
|
+
function gap(target:TargetEpoch,at:string,reason:string) {
|
|
12
|
+
const c={status:reason==='RPC_UNSUPPORTED'?'unsupported':'unavailable',partial:true,reasons:[reason]};
|
|
13
|
+
return {target:{...target},observedAt:at,transcript:{...c,entries:[]},questionState:{...c,questions:[],resolved:[],nextCursor:null}};
|
|
14
|
+
}
|
|
15
|
+
async function request(endpoint:string,target:TargetEpoch):Promise<Record<string,unknown>> {
|
|
16
|
+
return new Promise((resolveReply,reject)=>{
|
|
17
|
+
const msgId=randomUUID();let done=false,buffer=Buffer.alloc(0);const socket=createConnection({path:endpoint});
|
|
18
|
+
const finish=(code?:string,value?:Record<string,unknown>)=>{if(done)return;done=true;clearTimeout(deadline);socket.destroy();if(code)reject(new SourceError(code));else resolveReply(value!);};
|
|
19
|
+
const deadline=setTimeout(()=>finish('RPC_UNAVAILABLE'),1500);deadline.unref();
|
|
20
|
+
socket.setTimeout(1500,()=>finish('RPC_UNAVAILABLE'));
|
|
21
|
+
socket.once('connect',()=>socket.write(JSON.stringify({type:'observation_request',version:1,msg_id:msgId,sender_session:'local-codex-read',sender_endpoint:'',operation:'snapshot',owner:target})+'\n'));
|
|
22
|
+
socket.on('data',(chunk:Buffer)=>{
|
|
23
|
+
if(buffer.length+chunk.length>131072){finish('RPC_INVALID');return;}buffer=Buffer.concat([buffer,chunk]);const end=buffer.indexOf(10);if(end<0)return;
|
|
24
|
+
try {
|
|
25
|
+
const r:unknown=JSON.parse(new TextDecoder('utf-8',{fatal:true}).decode(buffer.subarray(0,end)));
|
|
26
|
+
if(!object(r)||r.msg_id!==msgId){finish('RPC_INVALID');return;}
|
|
27
|
+
if(r.type==='nack'||r.type==='observation_response'&&r.status==='unsupported'){finish('RPC_UNSUPPORTED');return;}
|
|
28
|
+
if(r.type!=='observation_response'||r.version!==1||r.status!=='available'||!same(r.owner,target)){finish('RPC_INVALID');return;}
|
|
29
|
+
finish(undefined,r);
|
|
30
|
+
}catch{finish('RPC_INVALID');}
|
|
31
|
+
});
|
|
32
|
+
socket.once('error',()=>finish('RPC_UNAVAILABLE'));
|
|
33
|
+
socket.once('close',()=>finish(buffer.length?'RPC_INVALID':'RPC_UNAVAILABLE'));
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
export function createObservationReader(options:{registryRoot:string;now?:()=>number}):ObservationReader {
|
|
37
|
+
if(!isAbsolute(options.registryRoot)||resolve(options.registryRoot)!==options.registryRoot)throw new SourceError('UNSAFE_PATH');
|
|
38
|
+
const now=options.now??Date.now;
|
|
39
|
+
return async target=>{
|
|
40
|
+
try {
|
|
41
|
+
if(!/^[A-Za-z0-9][A-Za-z0-9._-]{0,95}$/.test(target.sessionId)||target.sessionId.includes('..'))throw new SourceError('UNSAFE_PATH');
|
|
42
|
+
for(const dir of [options.registryRoot,join(options.registryRoot,'sockets')]){const s=await lstat(dir);if(!s.isDirectory()||s.isSymbolicLink())throw new SourceError('UNSAFE_PATH');}
|
|
43
|
+
const endpoint=join(options.registryRoot,'sockets',target.sessionId+'.sock'),s=await lstat(endpoint);
|
|
44
|
+
if(!s.isSocket()||s.isSymbolicLink()||process.getuid&&s.uid!==process.getuid())throw new SourceError('UNSAFE_PATH');
|
|
45
|
+
const response=await request(endpoint,target);
|
|
46
|
+
return {target:{...target},observedAt:response.observedAt,transcript:response.transcript,questionState:response.questionState,permissionState:response.permissionState};
|
|
47
|
+
}catch(e){return gap(target,new Date(now()).toISOString(),e instanceof SourceError?e.code:'RPC_UNAVAILABLE');}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// Post-S4: exact-target observations, not authority inferred from source text.
|
|
2
|
+
import { ReadonlyFleetError } from './fleet-codex-readonly.ts';
|
|
3
|
+
import { redactSecrets } from '../../../harnesses/lib/fleet-transcript-store.ts';
|
|
4
|
+
import type { TargetEpoch } from './fleet-codex-allowlist.ts';
|
|
5
|
+
export type ObservationReader = (target: TargetEpoch) => Promise<unknown>;
|
|
6
|
+
export type ReadAuthorization = { checkAllowedReadTarget(context: unknown, selectors: unknown): Promise<{target: TargetEpoch}> };
|
|
7
|
+
type Status = 'available'|'unavailable'|'unsupported';
|
|
8
|
+
type Event = {at:string;kind:'assistant'|'tool'|'turn_end';text:string;seq?:number;id?:string};
|
|
9
|
+
export type ObservationWindow={leaf:string|null;ancestry:string[];rootReached:boolean};
|
|
10
|
+
const cursorId=(v:unknown):v is string=>typeof v==='string'&&/^[a-f0-9]{64}$/.test(v);
|
|
11
|
+
const object=(v:unknown):v is Record<string,unknown>=>!!v&&typeof v==='object'&&!Array.isArray(v);
|
|
12
|
+
const same=(a:TargetEpoch,b:TargetEpoch)=>['project','peer','sessionId','startedAt'].every(k=>a[k as keyof TargetEpoch]===b[k as keyof TargetEpoch]);
|
|
13
|
+
const date=(v:unknown):v is string=>typeof v==='string'&&/^\d{4}-\d\d-\d\dT[0-9:.]+(?:Z|[+-]\d\d:\d\d)$/.test(v)&&Number.isFinite(Date.parse(v));
|
|
14
|
+
const text=(v:unknown,n=2000):v is string=>typeof v==='string'&&v.length<=n&&!/[\u0000-\u0008\u000b\u000c\u000e-\u001f]/.test(v);
|
|
15
|
+
const safeText=(v:unknown,n=2000):v is string=>text(v,n)&&redactSecrets(v)===v;
|
|
16
|
+
const id=(v:unknown):v is string=>typeof v==='string'&&/^[A-Za-z0-9][A-Za-z0-9._-]{0,95}$/.test(v);
|
|
17
|
+
const codes=new Set(['SOURCE_UNAVAILABLE','SOURCE_INVALID','SOURCE_LIMIT','SOURCE_NOT_CONFIGURED','NO_MATCHING_TRANSCRIPT','AMBIGUOUS_TRANSCRIPT','UNSAFE_PATH','READ_ERROR','ENTRY_LIMIT','TRUNCATED','IDENTITY_UNVERIFIED','RPC_UNAVAILABLE','RPC_UNSUPPORTED','RPC_INVALID','REDACTED']);
|
|
18
|
+
function common(v:unknown) {
|
|
19
|
+
if(!object(v)||!['available','unavailable','unsupported'].includes(v.status as string)||typeof v.partial!=='boolean'||!Array.isArray(v.reasons)
|
|
20
|
+
||v.reasons.length>16||v.reasons.some(r=>!codes.has(r as string)))throw new Error('INVALID');
|
|
21
|
+
return {status:v.status as Status,partial:v.partial||v.status!=='available',reasons:[...new Set(v.reasons as string[])]};
|
|
22
|
+
}
|
|
23
|
+
function transcript(v:unknown):{status:Status;partial:boolean;reasons:string[];source:string;entries:Event[];window?:ObservationWindow} {
|
|
24
|
+
try {
|
|
25
|
+
const c=common(v);if(!object(v)||!Array.isArray(v.entries)||v.entries.length>50)throw new Error('INVALID');
|
|
26
|
+
const entries:Event[]=v.entries.map(e=>{
|
|
27
|
+
if(!object(e)||!date(e.at)||!['assistant','tool','turn_end'].includes(e.kind as string)||!safeText(e.text)
|
|
28
|
+
||e.seq!==undefined&&(!Number.isSafeInteger(e.seq)||(e.seq as number)<0)||e.id!==undefined&&!cursorId(e.id))throw new Error('INVALID');
|
|
29
|
+
return {at:e.at,kind:e.kind as Event['kind'],text:e.text,...(e.seq===undefined?{}:{seq:e.seq as number}),...(e.id===undefined?{}:{id:e.id as string})};
|
|
30
|
+
});
|
|
31
|
+
if(c.status!=='available'&&entries.length)throw new Error('INVALID');
|
|
32
|
+
let window:ObservationWindow|undefined;
|
|
33
|
+
if(v.window!==undefined){const w=v.window;if(!object(w)||Object.keys(w).length!==3||!['leaf','ancestry','rootReached'].every(k=>Object.hasOwn(w,k))
|
|
34
|
+
||w.leaf!==null&&!cursorId(w.leaf)||!Array.isArray(w.ancestry)||w.ancestry.length>256||w.ancestry.some(x=>!cursorId(x))||new Set(w.ancestry).size!==w.ancestry.length
|
|
35
|
+
||typeof w.rootReached!=='boolean'||w.leaf===null&&(w.ancestry.length!==0||!w.rootReached||entries.length!==0)||w.leaf!==null&&w.ancestry[0]!==w.leaf||entries.some(e=>!e.id))throw new Error('INVALID');
|
|
36
|
+
window={leaf:w.leaf as string|null,ancestry:[...w.ancestry] as string[],rootReached:w.rootReached};}
|
|
37
|
+
return {...c,source:'pi_session_branch_projection',entries,...(window?{window}:{})};
|
|
38
|
+
}catch{return {status:'unavailable' as Status,partial:true,reasons:['SOURCE_INVALID'],source:'pi_session_branch_projection',entries:[] as Event[]};}
|
|
39
|
+
}
|
|
40
|
+
function questions(v:unknown,target:TargetEpoch) {
|
|
41
|
+
try {
|
|
42
|
+
const c=common(v);if(!object(v)||!Array.isArray(v.questions)||!Array.isArray(v.resolved)||v.questions.length>64||v.resolved.length>64
|
|
43
|
+
||v.nextCursor!==null&&!id(v.nextCursor))throw new Error('INVALID');
|
|
44
|
+
const pending=v.questions.map(q=>{
|
|
45
|
+
if(!object(q)||!object(q.owner)||!same(q.owner as unknown as TargetEpoch,target)||!id(q.id)||!text(q.toolCallId,256)||!q.toolCallId||!safeText(q.question)||!q.question||q.state!=='pending'||!date(q.createdAt)
|
|
46
|
+
||q.expiresAt!==null&&!date(q.expiresAt)||q.context!==undefined&&!safeText(q.context)||!Array.isArray(q.options)||q.options.length>64
|
|
47
|
+
||['allowMultiple','allowFreeform','allowComment'].some(k=>typeof q[k]!=='boolean'))throw new Error('INVALID');
|
|
48
|
+
const options=q.options.map(o=>{if(!object(o)||!safeText(o.title)||!o.title||o.description!==undefined&&!safeText(o.description))throw new Error('INVALID');
|
|
49
|
+
return {title:o.title,...(o.description===undefined?{}:{description:o.description})};});
|
|
50
|
+
return {id:q.id,toolCallId:q.toolCallId,question:q.question,state:'pending',createdAt:q.createdAt,expiresAt:q.expiresAt,
|
|
51
|
+
allowMultiple:q.allowMultiple,allowFreeform:q.allowFreeform,allowComment:q.allowComment,options,
|
|
52
|
+
...(typeof q.context==='string'&&safeText(q.context)?{context:q.context}:{})};
|
|
53
|
+
});
|
|
54
|
+
const resolved=v.resolved.map(r=>{if(!object(r)||!id(r.id)||!['answered','cancelled','expired','failed'].includes(r.state as string)
|
|
55
|
+
||r.requestId!==undefined&&!id(r.requestId))throw new Error('INVALID');return {id:r.id,state:r.state,...(r.requestId===undefined?{}:{requestId:r.requestId})};});
|
|
56
|
+
if(c.status!=='available'&&(pending.length||resolved.length||v.nextCursor!==null))throw new Error('INVALID');
|
|
57
|
+
const partial=c.partial||v.nextCursor!==null;
|
|
58
|
+
return {...c,partial,source:'pi_question_rpc',questions:pending,resolved,nextCursor:v.nextCursor,pendingCount:c.status==='available'&&!partial?pending.length:null};
|
|
59
|
+
}catch{return {status:'unavailable' as Status,partial:true,reasons:['SOURCE_INVALID'],source:'pi_question_rpc',questions:[],resolved:[],nextCursor:null,pendingCount:null};}
|
|
60
|
+
}
|
|
61
|
+
function permissions(v:unknown,target:TargetEpoch){
|
|
62
|
+
const unavailable=(status='unsupported',reason='RPC_UNSUPPORTED')=>({status,partial:true,reasons:[reason],source:'pi_permission_rpc',pendingCount:null,requests:[] as any[],resolved:[] as any[],nextCursor:null});
|
|
63
|
+
if(v===undefined)return unavailable();
|
|
64
|
+
try{
|
|
65
|
+
if(!object(v)||!['available','unavailable','unsupported'].includes(v.status as string))throw Error();
|
|
66
|
+
if(v.status!=='available')return unavailable(v.status as string,v.status==='unsupported'?'RPC_UNSUPPORTED':'SOURCE_UNAVAILABLE');
|
|
67
|
+
if(!Array.isArray(v.requests)||v.requests.length>32||!Number.isSafeInteger(v.pendingCount)||(v.pendingCount as number)<v.requests.length||(v.pendingCount as number)>256||typeof v.partial!=='boolean'||v.nextCursor!==null&&!id(v.nextCursor))throw Error();
|
|
68
|
+
const requests=v.requests.map(s=>{if(!object(s)||!object(s.owner)||!same(s.owner as unknown as TargetEpoch,target)||!id(s.id)||!id(s.epoch)||!safeText(s.taskId,256)||!safeText(s.inputRevision,256)||typeof s.actionDigest!=='string'||!/^[a-f0-9]{64}$/.test(s.actionDigest)||!Number.isSafeInteger(s.expiresAt))throw Error();return {id:s.id,epoch:s.epoch,taskId:s.taskId,inputRevision:s.inputRevision,actionDigest:s.actionDigest,expiresAt:s.expiresAt,detailsRequired:true};});
|
|
69
|
+
if(!Array.isArray(v.resolved)||v.resolved.length>32)throw Error();
|
|
70
|
+
const resolved=v.resolved.map(r=>{if(!object(r)||!id(r.id)||!['decided','expired','cancelled','stale','failed'].includes(r.state as string)||!['pending','not_applied','consumed','response_queued_unconfirmed'].includes(r.effect as string))throw Error();return {id:r.id,state:r.state,effect:r.effect,detailsRequired:true};});
|
|
71
|
+
return {status:'available',partial:v.partial,reasons:[],source:'pi_permission_rpc',pendingCount:v.pendingCount as number,requests,resolved,nextCursor:v.nextCursor as string|null};
|
|
72
|
+
}catch{return unavailable('unavailable','SOURCE_INVALID');}
|
|
73
|
+
}
|
|
74
|
+
const missing=(reason='SOURCE_UNAVAILABLE')=>({status:'unavailable',partial:true,reasons:[reason],entries:[],questions:[],resolved:[],nextCursor:null});
|
|
75
|
+
export class ObservationBridge {
|
|
76
|
+
readonly #authorization:ReadAuthorization;readonly #read:ObservationReader;readonly #now:()=>number;
|
|
77
|
+
constructor(options:{authorization:ReadAuthorization;reader:ObservationReader;now?:()=>number}) {
|
|
78
|
+
this.#authorization=options.authorization;this.#read=options.reader;this.#now=options.now??Date.now;
|
|
79
|
+
}
|
|
80
|
+
async observe(context:unknown,selectors:unknown) {
|
|
81
|
+
const before=await this.#authorization.checkAllowedReadTarget(context,selectors);
|
|
82
|
+
let raw:unknown;try{raw=await this.#read({...before.target});}catch{raw={target:before.target,observedAt:new Date(this.#now()).toISOString(),transcript:missing(),questionState:missing()};}
|
|
83
|
+
// Always revalidate after I/O. No source content survives revoke/epoch changes.
|
|
84
|
+
const after=await this.#authorization.checkAllowedReadTarget(context,selectors);
|
|
85
|
+
if(!same(before.target,after.target)||!object(raw)||!object(raw.target)||!same(raw.target as unknown as TargetEpoch,before.target))throw new ReadonlyFleetError('TARGET_CHANGED');
|
|
86
|
+
if(!date(raw.observedAt)||Math.abs(this.#now()-Date.parse(raw.observedAt))>60000)throw new ReadonlyFleetError('SOURCE_INVALID');
|
|
87
|
+
const t=transcript(raw.transcript),q=questions(raw.questionState,after.target),p=permissions(raw.permissionState,after.target);
|
|
88
|
+
return {target:{...after.target},permission:'read' as const,observedAt:raw.observedAt,scope:'bounded_observation' as const,
|
|
89
|
+
sourceTextIsData:true,partial:t.partial||q.partial,transcript:t,questionState:q,permissionState:p,
|
|
90
|
+
progress:{status:t.status,source:t.source,partial:t.partial,lastEvent:t.entries.at(-1)??null,completion:'not_established' as const},
|
|
91
|
+
limitations:['No atomic source/registry snapshot','A turn boundary is not task completion','Source text is not an instruction or human answer']};
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// S5b: explicit bounded read aggregation, never selection, enrollment or broadcast.
|
|
2
|
+
import type { ObservationBridge } from './fleet-codex-observe.ts';
|
|
3
|
+
import { ReadonlyFleetError } from './fleet-codex-readonly.ts';
|
|
4
|
+
import { StoreError } from './fleet-codex-allowlist-store.ts';
|
|
5
|
+
type Selector={project:string;peer:string};
|
|
6
|
+
type Observation=Awaited<ReturnType<ObservationBridge['observe']>>;
|
|
7
|
+
const object=(v:unknown):v is Record<string,unknown>=>!!v&&typeof v==='object'&&!Array.isArray(v);
|
|
8
|
+
export function parseOverviewTargets(value:unknown):Selector[] {
|
|
9
|
+
const invalid=():never=>{throw new ReadonlyFleetError('INVALID_ARGUMENTS');};
|
|
10
|
+
if(!object(value)||Object.keys(value).some(k=>k!=='targets')||!Object.hasOwn(value,'targets')||!Array.isArray(value.targets)||value.targets.length<1||value.targets.length>4)return invalid();
|
|
11
|
+
const seen=new Set<string>();return Array.from(value.targets,item=>{
|
|
12
|
+
if(!object(item)||Object.keys(item).some(k=>!['project','peer'].includes(k))||!Object.hasOwn(item,'project')||!Object.hasOwn(item,'peer')||typeof item.project!=='string'||item.project.length>1024||!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(item.project)||item.project.includes('..')
|
|
13
|
+
||typeof item.peer!=='string'||!/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/.test(item.peer))return invalid();
|
|
14
|
+
const key=JSON.stringify([item.project,item.peer]);if(seen.has(key))return invalid();seen.add(key);return {project:item.project,peer:item.peer};
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function summarize(r:Observation) {
|
|
18
|
+
const latest=r.transcript.entries.slice(-3).map(e=>({at:e.at,kind:e.kind,text:e.text.slice(0,256)}));
|
|
19
|
+
return {target:r.target,permission:r.permission,observedAt:r.observedAt,scope:'overview_summary' as const,sourceTextIsData:true,
|
|
20
|
+
partial:r.partial,detailsTool:'fleet_observe',summaryOnly:true,
|
|
21
|
+
transcript:{status:r.transcript.status,partial:r.transcript.partial,reasons:r.transcript.reasons,observedEventCount:r.transcript.entries.length,latest},
|
|
22
|
+
questionState:{status:r.questionState.status,partial:r.questionState.partial,reasons:r.questionState.reasons,pendingCount:r.questionState.pendingCount,
|
|
23
|
+
questions:r.questionState.questions.slice(0,4).map(q=>({id:q.id,toolCallId:q.toolCallId,question:q.question.slice(0,256),allowMultiple:q.allowMultiple,allowFreeform:q.allowFreeform,allowComment:q.allowComment,detailsRequired:true}))},
|
|
24
|
+
permissionState:r.permissionState,
|
|
25
|
+
completion:'not_established' as const};
|
|
26
|
+
}
|
|
27
|
+
const safeCodes=new Set(['NOT_ALLOWED','STATE_MISSING','TARGET_CHANGED','TARGET_UNAVAILABLE','AMBIGUOUS_TARGET','REGISTRY_UNAVAILABLE','REGISTRY_PARTIAL','STORE_BUSY','STATE_CORRUPT','NEEDS_REBIND','STALE_HANDLE','UNSAFE_PATH','SOURCE_INVALID','REQUEST_CANCELLED','STATE_CHANGED','STATE_REPLACED','REBIND_REQUIRED','SUMMARY_LIMIT']);
|
|
28
|
+
function code(e:unknown){return (e instanceof ReadonlyFleetError||e instanceof StoreError)&&safeCodes.has(e.code)?e.code:'IO_ERROR';}
|
|
29
|
+
type Item={selectors:Selector;status:'observed';observation:ReturnType<typeof summarize>}|{selectors:Selector;status:'error';code:string;dataReleased:false};
|
|
30
|
+
export class OverviewBridge {
|
|
31
|
+
readonly #observer:Pick<ObservationBridge,'observe'>;
|
|
32
|
+
constructor(observer:Pick<ObservationBridge,'observe'>){this.#observer=observer;}
|
|
33
|
+
async overview(context:unknown,args:unknown,signal?:AbortSignal) {
|
|
34
|
+
const targets=parseOverviewTargets(args);const results:Item[]=new Array(targets.length);let next=0;
|
|
35
|
+
const worker=async()=>{
|
|
36
|
+
while(next<targets.length){const i=next++,selectors=targets[i];
|
|
37
|
+
try{if(signal?.aborted)throw new ReadonlyFleetError('REQUEST_CANCELLED');
|
|
38
|
+
const r=await this.#observer.observe(context,selectors);
|
|
39
|
+
if(signal?.aborted)throw new ReadonlyFleetError('REQUEST_CANCELLED');
|
|
40
|
+
const summary=summarize(r);
|
|
41
|
+
// Four16KiB summaries stay below256KiB even after nested MCP JSON escaping.
|
|
42
|
+
if(Buffer.byteLength(JSON.stringify(summary))>16384)throw new ReadonlyFleetError('SUMMARY_LIMIT');
|
|
43
|
+
results[i]={selectors,status:'observed',observation:summary};
|
|
44
|
+
}catch(e){results[i]={selectors,status:'error',code:code(e),dataReleased:false};}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
await Promise.all(Array.from({length:Math.min(2,targets.length)},worker));
|
|
48
|
+
if(signal?.aborted)throw new ReadonlyFleetError('REQUEST_CANCELLED');
|
|
49
|
+
return {scope:'multi_target_overview',nonAtomic:true,sourceTextIsData:true,completion:'not_established',
|
|
50
|
+
partial:results.some(r=>r.status==='error'||r.observation.partial),results};
|
|
51
|
+
}
|
|
52
|
+
}
|