@chankov/agent-fleet 2.2.2 → 2.2.4
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/agents/model-profiles.yaml +3 -3
- package/.pi/agents/peers.yaml +2 -2
- package/.pi/agents/voices.yaml +2 -2
- package/.pi/harnesses/agent-hub/README.md +26 -3
- package/.pi/harnesses/agent-hub/access-approval.ts +20 -8
- package/.pi/harnesses/agent-hub/budget-recovery.ts +28 -0
- package/.pi/harnesses/agent-hub/commands/recover.ts +28 -9
- package/.pi/harnesses/agent-hub/context/assertion-journal.ts +133 -0
- package/.pi/harnesses/agent-hub/damage-guard-state.ts +5 -2
- package/.pi/harnesses/agent-hub/execution-trace.ts +1 -1
- package/.pi/harnesses/agent-hub/index.ts +126 -21
- package/.pi/harnesses/agent-hub/no-progress.ts +167 -21
- package/.pi/harnesses/agent-hub/operator-current-state.ts +51 -6
- package/.pi/harnesses/agent-hub/package.json +1 -1
- package/.pi/harnesses/agent-hub/permission-relay.ts +15 -6
- package/.pi/harnesses/agent-hub/policy/work-mode.ts +2 -1
- package/.pi/harnesses/agent-hub/process-obligations.ts +21 -1
- package/.pi/harnesses/agent-hub/recover-policy.ts +1 -1
- package/.pi/harnesses/agent-hub/recover-state.ts +46 -6
- package/.pi/harnesses/agent-hub/recovery-continuation.ts +134 -0
- package/.pi/harnesses/agent-hub/spawn.ts +4 -0
- package/.pi/harnesses/agent-hub/task-continuation.ts +19 -2
- package/.pi/harnesses/agent-hub/task-triage-authorization.ts +22 -5
- package/.pi/harnesses/agent-hub/tools/action-executors.ts +33 -6
- package/.pi/harnesses/agent-hub/tools/context.ts +2 -0
- package/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +71 -23
- package/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +2 -1
- package/.pi/harnesses/agent-hub/tools/recover-task.ts +16 -0
- package/.pi/harnesses/agent-hub/verification-diagnostics.ts +23 -0
- package/.pi/harnesses/agent-hub/work-mode.ts +4 -2
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/README.md +15 -3
- package/.pi/harnesses/damage-control-continue/index.ts +103 -63
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/harnesses/lib/bash-policy-analysis.ts +30 -10
- package/.pi/harnesses/lib/damage-control-shared.ts +6 -3
- package/.pi/harnesses/lib/exact-permission-port.ts +13 -4
- package/.versions/2.2.3/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.2.3/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.2.3/.pi/agent-fleet/hooks/coms-stop-hook.mjs +124 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/coms-claude-bridge.ts +440 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/coms-cli.ts +430 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +416 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/exec-at-target.ts +10 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/0.167-shared.json +1900 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/README.md +223 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/assessment.md +83 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/bootstrap-profile-0.167.json +5627 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/bootstrap-profile.md +43 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/bootstrap.md +45 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/capture-profile.ts +53 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/capture.ts +102 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/catalog.md +91 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/channel.md +21 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/measurement.md +133 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/measurements.json +74 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/notification-profile-0.167.json +2679 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/observer.md +101 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/opaque-response.md +57 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/open-sent.md +68 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/probe-reader.md +51 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/profile.md +71 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/projection.md +147 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/reconnect.md +40 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/response-unions.md +74 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/semver.md +124 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/surface.md +73 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/fleet-codex-allowlist-store-child.ts +31 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/response-fixture.ts +23 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fleet-codex-local-mcp.mjs +26 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fleet-codex-local-mcp.ts +63 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/fleet.ts +244 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/flow.ts +166 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +208 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-bootstrap-files.ts +46 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-bootstrap-probe.ts +52 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-bootstrap-producer.ts +131 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-connection-history.ts +51 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-daemon-observer.ts +137 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-desktop-discovery.ts +84 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-desktop-preflight.ts +130 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-desktop-queue-host.ts +113 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-measurement.ts +218 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-native-presence.ts +61 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-probe-transcript.ts +135 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-send-lineage.ts +72 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-unix-queue-rpc.ts +101 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-allowlist-store.ts +453 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-allowlist.ts +175 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-answer-transport.ts +73 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-answers.ts +74 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-bootstrap.ts +207 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-connections.ts +76 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-event-reply.ts +58 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-event-runtime.ts +132 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-instruction-store.ts +428 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-instruction-transport.ts +160 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-instructions.ts +175 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-local-mcp.ts +435 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-native-history.ts +215 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-observation-store.ts +208 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-observe-transport.ts +49 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-observe.ts +93 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-overview.ts +52 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-permission-transport.ts +44 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-permissions.ts +83 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-readonly.ts +213 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-relay-latency.ts +45 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-response-read.ts +26 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-response-transport.ts +38 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-resync.ts +212 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-command.ts +264 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/flow-command.ts +107 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +239 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/peer-target.ts +1 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/resource-closure.js +1 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/session-launch.ts +56 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/team-project.ts +176 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/team-snapshot.ts +160 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/package-lock.json +57 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/package.json +10 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/peer-launch.ts +289 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/pi-session.ts +9 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/team-snapshot.ts +245 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/team-up.ts +378 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +181 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/env.ts +36 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/git.ts +108 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +130 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +137 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +37 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/quality.ts +78 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/run.ts +109 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/trace.ts +52 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/writer-lease-race.worker.mjs +36 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +148 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.2.3/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.2.3/.pi/agents/model-profiles.yaml +132 -0
- package/.versions/2.2.3/.pi/agents/peers.yaml +147 -0
- package/.versions/2.2.3/.pi/agents/teams.yaml +41 -0
- package/.versions/2.2.3/.pi/agents/voices.yaml +13 -0
- package/.versions/2.2.3/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.2.3/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.2.3/.pi/extensions/btw/index.ts +916 -0
- package/.versions/2.2.3/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.2.3/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.2.3/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.2.3/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.2.3/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.2.3/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.2.3/.pi/extensions/compact-and-continue/index.ts +136 -0
- package/.versions/2.2.3/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.2.3/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.2.3/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.2.3/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.2.3/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.2.3/.pi/extensions/package.json +9 -0
- package/.versions/2.2.3/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.2.3/.pi/extensions/pi-voice-stt/config.ts +199 -0
- package/.versions/2.2.3/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.2.3/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.2.3/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.2.3/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.2.3/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/README.md +1657 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/acceptance.ts +204 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/access-approval.ts +266 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/action-authorization.ts +10 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/agentic-contract.ts +43 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/agentic-evidence.ts +64 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/agentic-hub.ts +55 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/agentic-runtime.ts +56 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/agentic-sources-worker.mjs +4 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/agentic-sources.ts +74 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/agentic-state.ts +23 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/approval-wait.ts +1 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/assertion-ledger.js +68 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/assist-profile.ts +19 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/budget-recovery.ts +151 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/capability-packs.ts +187 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/codex-bootstrap.ts +117 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/config.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/context.ts +43 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/recover.ts +81 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/config/agents.ts +183 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/config/model-profiles.ts +240 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/config/overrides.ts +166 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context/assertion-journal.ts +133 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +234 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context/budgets.ts +152 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context-compaction-monitor.ts +35 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context-compaction-preflight.ts +21 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context-compaction-runtime.ts +69 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context-compaction.ts +34 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context-continuity-broker.ts +44 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context-continuity-child.ts +83 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context-continuity-client.ts +22 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context-continuity-compat.ts +45 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context-continuity-owners.ts +17 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context-continuity-registry.ts +8 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context-continuity.ts +82 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context-pressure.ts +222 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/context-window.js +108 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/damage-guard-approval.ts +83 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/damage-guard-broker.ts +125 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/damage-guard-contract.ts +22 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/damage-guard-descendant.ts +76 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/damage-guard-hub.ts +263 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/damage-guard-identity.ts +12 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/damage-guard-owners.ts +59 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/damage-guard-state.ts +43 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/damage-guard-test-tsconfig.json +19 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/delegate.ts +478 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/deterministic-fs.ts +195 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-coms.ts +258 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-native-complete.ts +176 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +318 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +264 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-native-types.ts +297 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-native.ts +242 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +27 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +77 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/docs-lane.js +123 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/drift-watchdog.js +344 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/execution-evidence.ts +96 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/execution-trace.ts +241 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/external-blocker.js +92 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/adapters.ts +88 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/broker-client.ts +62 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/broker.ts +128 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/child-extension.ts +42 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/descendant.ts +67 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/discovery-worker.mjs +15 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/discovery.ts +126 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/evaluate.ts +57 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/hub.ts +170 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/native-context.ts +8 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/native-fixture.test-support.ts +108 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/owners.ts +100 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/results.ts +55 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/runtime.ts +130 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/semantic-profiles.ts +18 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/sources.ts +69 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/state.ts +22 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/filesystem-tool.ts +166 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/fixtures/registration-surface.json +69 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/footer.ts +29 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/helpers.ts +269 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/history-projection.ts +116 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/hub-state-audit.js +41 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/index.ts +2805 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/input/completions.ts +82 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/input/shortcuts.ts +16 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +231 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +90 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/no-progress.ts +741 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/operator-current-state.ts +102 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/operator-watchdog.ts +97 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/orchestration-activation.ts +109 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/orchestration-route.ts +68 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/permission-channel.ts +87 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/permission-relay.ts +84 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/policy/roster.ts +103 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/policy/work-mode.ts +104 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/poll-command.ts +184 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/presentation.ts +54 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/private-config-current-state.ts +81 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/private-config-fixtures.ts +26 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/private-config-review.ts +100 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-config.ts +22 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-external-git.ts +82 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-external.ts +142 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-local.ts +89 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-observer.ts +106 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-rules.ts +171 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-runtime.ts +318 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-snapshot.ts +287 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-types.ts +70 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/process-obligations.ts +210 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/prompts/context.ts +72 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/prompts/fragments.ts +94 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/prompts/session-start.ts +89 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/prompts/system-prompt.ts +142 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/provider-semaphore.js +143 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/recover-state.ts +144 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/recovery-continuation.ts +134 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/recovery-contract.ts +151 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/research/runtime.ts +215 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/research/spawn-run.ts +221 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/return-contract.js +371 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/return-extract.js +77 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/review-closure.ts +43 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/review-continuity.ts +76 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/review-findings.js +96 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/review-reuse.ts +48 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/review-verdict.ts +6 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/run-budget.js +362 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/run-namespace.js +93 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/runtime-receipts.ts +63 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/runtime-test-check.ts +85 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/safety-routing.ts +28 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/scope-gate.js +271 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/scope-overlap.ts +46 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/session-audit.ts +331 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/spawn.ts +702 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/specialist-result-receipt.ts +13 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/specialist-result.ts +78 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/system1-communication-store.ts +225 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/system1-report.ts +275 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/system1-runtime.ts +271 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/task-brief.ts +98 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/task-continuation.ts +4 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/task-resume-contract.ts +80 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-authorization.ts +170 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-config.ts +21 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-obligations.ts +120 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-runtime.ts +132 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/timeline.ts +72 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +83 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tool-catalog-state.ts +125 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/action-executors.ts +237 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/ask-system1-files.ts +15 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/ask-system1.ts +25 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/context.ts +151 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +93 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +971 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +23 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/fleet-tools.ts +201 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/herdr-executors.ts +100 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/poll-panel-core.ts +30 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/poll-panel.ts +33 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/recover-task.ts +16 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/run-flow.ts +177 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/spawn-research.ts +67 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/verification-contract.ts +81 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/tsconfig.json +22 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/types.ts +66 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/context-budget.ts +89 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +173 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/verification-diagnostics.ts +23 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/work-mode.ts +185 -0
- package/.versions/2.2.3/.pi/harnesses/agent-hub/write-isolation.ts +232 -0
- package/.versions/2.2.3/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.2.3/.pi/harnesses/ask-user-remote/index.ts +571 -0
- package/.versions/2.2.3/.pi/harnesses/ask-user-remote/questions.ts +206 -0
- package/.versions/2.2.3/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.2.3/.pi/harnesses/ask-user-remote/runtime-ask.ts +90 -0
- package/.versions/2.2.3/.pi/harnesses/coms/README.md +105 -0
- package/.versions/2.2.3/.pi/harnesses/coms/index.ts +308 -0
- package/.versions/2.2.3/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.2.3/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.2.3/.pi/harnesses/damage-control-continue/README.md +161 -0
- package/.versions/2.2.3/.pi/harnesses/damage-control-continue/index.ts +661 -0
- package/.versions/2.2.3/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.2.3/.pi/harnesses/damage-control-continue/result-screen.ts +98 -0
- package/.versions/2.2.3/.pi/harnesses/damage-control-continue/system1-child.ts +45 -0
- package/.versions/2.2.3/.pi/harnesses/damage-control-continue/system1-client.ts +85 -0
- package/.versions/2.2.3/.pi/harnesses/damage-control-continue/system1-guard.ts +65 -0
- package/.versions/2.2.3/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.2.3/.pi/harnesses/lib/approval-wait.ts +17 -0
- package/.versions/2.2.3/.pi/harnesses/lib/bash-policy-analysis.ts +193 -0
- package/.versions/2.2.3/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.2.3/.pi/harnesses/lib/clarification-policy.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/lib/codex-compat.ts +97 -0
- package/.versions/2.2.3/.pi/harnesses/lib/codex-contract.ts +259 -0
- package/.versions/2.2.3/.pi/harnesses/lib/codex-notification-profile.ts +75 -0
- package/.versions/2.2.3/.pi/harnesses/lib/coms-core-io.ts +422 -0
- package/.versions/2.2.3/.pi/harnesses/lib/coms-core.ts +738 -0
- package/.versions/2.2.3/.pi/harnesses/lib/coms-instruction-receipts.ts +113 -0
- package/.versions/2.2.3/.pi/harnesses/lib/coms-observation.ts +74 -0
- package/.versions/2.2.3/.pi/harnesses/lib/coms-registry-entry.ts +99 -0
- package/.versions/2.2.3/.pi/harnesses/lib/coms-response-read.ts +107 -0
- package/.versions/2.2.3/.pi/harnesses/lib/context-budget-child-prompt.ts +214 -0
- package/.versions/2.2.3/.pi/harnesses/lib/context-budget-hub-prompt.ts +124 -0
- package/.versions/2.2.3/.pi/harnesses/lib/context-budget-view.ts +112 -0
- package/.versions/2.2.3/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.2.3/.pi/harnesses/lib/context-compaction-policy.js +35 -0
- package/.versions/2.2.3/.pi/harnesses/lib/damage-action-hash.ts +28 -0
- package/.versions/2.2.3/.pi/harnesses/lib/damage-auto-policy.ts +52 -0
- package/.versions/2.2.3/.pi/harnesses/lib/damage-control-presentation.ts +14 -0
- package/.versions/2.2.3/.pi/harnesses/lib/damage-control-shared.ts +276 -0
- package/.versions/2.2.3/.pi/harnesses/lib/damage-guard-port.ts +25 -0
- package/.versions/2.2.3/.pi/harnesses/lib/damage-policy.ts +35 -0
- package/.versions/2.2.3/.pi/harnesses/lib/damage-result-evidence.ts +25 -0
- package/.versions/2.2.3/.pi/harnesses/lib/damage-result-view.ts +16 -0
- package/.versions/2.2.3/.pi/harnesses/lib/deterministic-handle-path.ts +25 -0
- package/.versions/2.2.3/.pi/harnesses/lib/exact-permission-port.ts +40 -0
- package/.versions/2.2.3/.pi/harnesses/lib/execution-trace.ts +45 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-bootstrap-channel.ts +148 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-codex-catalog.ts +30 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-codex-chat-view.ts +55 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-codex-event-bridge.ts +82 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-codex-namespace.ts +2 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-codex-policy-snapshot.ts +10 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-config/cli-bridge.ts +111 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-config/mutations.ts +201 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-config/snapshot.ts +417 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-config/transition.ts +68 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-config/ui.ts +269 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-config/view.ts +338 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-connection-control.ts +94 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-connection-diagnostics.ts +7 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-dashboard-view.ts +174 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-event-source.ts +21 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-notification-admission.ts +32 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-notification-bootstrap.ts +172 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-notification-validation.ts +122 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-question-reference.ts +42 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-read-model.ts +609 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-target-identity.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.2.3/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.2.3/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.2.3/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.2.3/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.2.3/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.2.3/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.2.3/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.2.3/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.2.3/.pi/harnesses/lib/identical-dialog.ts +27 -0
- package/.versions/2.2.3/.pi/harnesses/lib/installation-state.js +62 -0
- package/.versions/2.2.3/.pi/harnesses/lib/peer-target.ts +24 -0
- package/.versions/2.2.3/.pi/harnesses/lib/policy-roots.js +117 -0
- package/.versions/2.2.3/.pi/harnesses/lib/policy-roots.ts +32 -0
- package/.versions/2.2.3/.pi/harnesses/lib/process-shared.ts +9 -0
- package/.versions/2.2.3/.pi/harnesses/lib/resource-closure.js +26 -0
- package/.versions/2.2.3/.pi/harnesses/lib/safe-source-read.js +29 -0
- package/.versions/2.2.3/.pi/harnesses/lib/semantic-approval.ts +80 -0
- package/.versions/2.2.3/.pi/harnesses/lib/session-target.ts +62 -0
- package/.versions/2.2.3/.pi/harnesses/lib/spawned-peers.js +191 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/config-agentic.js +15 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/config-context-compaction.js +16 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/config-damage-guard.js +24 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/config-file-discovery.js +23 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/config-json.js +37 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/config-loader.js +53 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/config-proactive.js +68 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/config-triage.js +42 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/config-v2.js +112 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/config.js +50 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/contracts.ts +154 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/demo.ts +95 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/payload-screen.ts +65 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/selection.js +11 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/worktree-scopes.js +110 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/worktree-scopes.ts +13 -0
- package/.versions/2.2.3/.pi/harnesses/lib/system1/worktree-service.ts +24 -0
- package/.versions/2.2.3/.pi/harnesses/lib/target-capabilities.js +7 -0
- package/.versions/2.2.3/.pi/harnesses/lib/update-check.ts +227 -0
- package/.versions/2.2.3/.pi/harnesses/lib/workspace-context.js +115 -0
- package/.versions/2.2.3/.pi/harnesses/lib/workspace-context.ts +22 -0
- package/.versions/2.2.3/.pi/harnesses/package-lock.json +2121 -0
- package/.versions/2.2.3/.pi/harnesses/package.json +13 -0
- package/.versions/2.2.3/.pi/prompts/af-build.md +27 -0
- package/.versions/2.2.3/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.2.3/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.2.3/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.2.3/.pi/prompts/af-review.md +16 -0
- package/.versions/2.2.3/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.2.3/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.2.3/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.2.3/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.2.3/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.2.3/.pi/prompts/af-test.md +19 -0
- package/.versions/2.2.3/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.2.3/.version +1 -0
- package/.versions/2.2.3/agents/architect.md +24 -0
- package/.versions/2.2.3/agents/bowser.md +28 -0
- package/.versions/2.2.3/agents/builder.md +55 -0
- package/.versions/2.2.3/agents/code-reviewer.md +209 -0
- package/.versions/2.2.3/agents/deep-researcher.md +32 -0
- package/.versions/2.2.3/agents/documenter.md +22 -0
- package/.versions/2.2.3/agents/plan-reviewer.md +83 -0
- package/.versions/2.2.3/agents/planner.md +107 -0
- package/.versions/2.2.3/agents/releaser.md +24 -0
- package/.versions/2.2.3/agents/researcher.md +30 -0
- package/.versions/2.2.3/agents/security-auditor.md +167 -0
- package/.versions/2.2.3/agents/test-engineer.md +153 -0
- package/.versions/2.2.3/agents/web-debugger.md +44 -0
- package/.versions/2.2.3/agents/web-performance-auditor.md +194 -0
- package/.versions/2.2.3/bin/catalog/harness-runtime-closure.json +85 -0
- package/.versions/2.2.3/docs/ARCHITECTURE.md +1291 -0
- package/.versions/2.2.3/docs/agent-fleet-setup.md +1161 -0
- package/.versions/2.2.3/docs/claude-code-coms-bridge.md +147 -0
- package/.versions/2.2.3/docs/codex-local-mcp.md +520 -0
- package/.versions/2.2.3/docs/codex-session-bridge.md +44 -0
- package/.versions/2.2.3/docs/codex-setup.md +183 -0
- package/.versions/2.2.3/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.2.3/docs/fleet-native-voice.md +151 -0
- package/.versions/2.2.3/docs/getting-started.md +126 -0
- package/.versions/2.2.3/docs/npm-install.md +535 -0
- package/.versions/2.2.3/docs/pi-extensions.md +450 -0
- package/.versions/2.2.3/docs/pi-setup.md +92 -0
- package/.versions/2.2.3/docs/skill-anatomy.md +150 -0
- package/.versions/2.2.3/install-manifest.json +3227 -0
- package/.versions/2.2.3/justfile +246 -0
- package/.versions/2.2.3/manifest-meta.json +1099 -0
- package/.versions/2.2.3/references/accessibility-checklist.md +160 -0
- package/.versions/2.2.3/references/communication-contract.md +26 -0
- package/.versions/2.2.3/references/definition-of-done.md +67 -0
- package/.versions/2.2.3/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.2.3/references/observability-checklist.md +92 -0
- package/.versions/2.2.3/references/orchestration-patterns.md +370 -0
- package/.versions/2.2.3/references/performance-checklist.md +236 -0
- package/.versions/2.2.3/references/prompting-patterns.md +380 -0
- package/.versions/2.2.3/references/security-checklist.md +245 -0
- package/.versions/2.2.3/references/testing-patterns.md +235 -0
- package/.versions/2.2.3/references/workflow-authoring.md +304 -0
- package/.versions/2.2.3/skills/_internal/grilling.md +59 -0
- package/.versions/2.2.3/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.2.3/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.2.3/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.2.3/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.2.3/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.2.3/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.2.3/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.2.3/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.2.3/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.2.3/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.2.3/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.2.3/skills/fleet-connect/SKILL.md +29 -0
- package/.versions/2.2.3/skills/fleet-connect.zip +0 -0
- package/.versions/2.2.3/skills/fleet-native-voice/SKILL.md +103 -0
- package/.versions/2.2.3/skills/fleet-native-voice/agents/openai.yaml +4 -0
- package/.versions/2.2.3/skills/fleet-native-voice.zip +0 -0
- package/.versions/2.2.3/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.2.3/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.2.3/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.2.3/skills/idea-refine/examples.md +238 -0
- package/.versions/2.2.3/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.2.3/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.2.3/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.2.3/skills/incremental-implementation/SKILL.md +353 -0
- package/.versions/2.2.3/skills/incremental-implementation.zip +0 -0
- package/.versions/2.2.3/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.2.3/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.2.3/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.2.3/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.2.3/skills/planning-and-task-breakdown/SKILL.md +318 -0
- package/.versions/2.2.3/skills/planning-and-task-breakdown.zip +0 -0
- package/.versions/2.2.3/skills/repository-ai-setup/SKILL.md +135 -0
- package/.versions/2.2.3/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/.versions/2.2.3/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/.versions/2.2.3/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/.versions/2.2.3/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/.versions/2.2.3/skills/repository-ai-setup/references/verify-setup.md +20 -0
- package/.versions/2.2.3/skills/repository-ai-setup.zip +0 -0
- package/.versions/2.2.3/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.2.3/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.2.3/skills/spec-driven-development.zip +0 -0
- package/.versions/2.2.3/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.2.3/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.2.4/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.2.4/.pi/agent-fleet/hooks/coms-stop-hook.mjs +124 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/coms-claude-bridge.ts +440 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/coms-cli.ts +430 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +416 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/exec-at-target.ts +10 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/0.167-shared.json +1900 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/README.md +223 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/assessment.md +83 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/bootstrap-profile-0.167.json +5627 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/bootstrap-profile.md +43 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/bootstrap.md +45 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/capture-profile.ts +53 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/capture.ts +102 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/catalog.md +91 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/channel.md +21 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/measurement.md +133 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/measurements.json +74 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/notification-profile-0.167.json +2679 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/observer.md +101 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/opaque-response.md +57 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/open-sent.md +68 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/probe-reader.md +51 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/profile.md +71 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/projection.md +147 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/reconnect.md +40 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/response-unions.md +74 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/semver.md +124 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/surface.md +73 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/fleet-codex-allowlist-store-child.ts +31 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fixtures/response-fixture.ts +23 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fleet-codex-local-mcp.mjs +26 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fleet-codex-local-mcp.ts +63 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/fleet.ts +244 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/flow.ts +166 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +208 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/codex-bootstrap-files.ts +46 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/codex-bootstrap-probe.ts +52 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/codex-bootstrap-producer.ts +131 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/codex-connection-history.ts +51 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/codex-daemon-observer.ts +137 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/codex-desktop-discovery.ts +84 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/codex-desktop-preflight.ts +130 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/codex-desktop-queue-host.ts +113 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/codex-measurement.ts +218 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/codex-native-presence.ts +61 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/codex-probe-transcript.ts +135 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/codex-send-lineage.ts +72 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/codex-unix-queue-rpc.ts +101 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-allowlist-store.ts +453 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-allowlist.ts +175 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-answer-transport.ts +73 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-answers.ts +74 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-bootstrap.ts +207 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-connections.ts +76 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-event-reply.ts +58 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-event-runtime.ts +132 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-instruction-store.ts +428 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-instruction-transport.ts +160 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-instructions.ts +175 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-local-mcp.ts +435 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-native-history.ts +215 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-observation-store.ts +208 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-observe-transport.ts +49 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-observe.ts +93 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-overview.ts +52 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-permission-transport.ts +44 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-permissions.ts +83 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-readonly.ts +213 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-relay-latency.ts +45 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-response-read.ts +26 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-response-transport.ts +38 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-codex-resync.ts +212 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/fleet-command.ts +264 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/flow-command.ts +107 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +239 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/peer-target.ts +1 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/resource-closure.js +1 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/session-launch.ts +56 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/team-project.ts +176 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/lib/team-snapshot.ts +160 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/package-lock.json +57 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/package.json +10 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/peer-launch.ts +289 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/pi-session.ts +9 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/team-snapshot.ts +245 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/team-up.ts +378 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +181 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/env.ts +36 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/git.ts +108 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +130 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +137 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +37 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/quality.ts +78 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/run.ts +109 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/trace.ts +52 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/writer-lease-race.worker.mjs +36 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +148 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.2.4/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.2.4/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.2.4/.pi/agents/model-profiles.yaml +132 -0
- package/.versions/2.2.4/.pi/agents/peers.yaml +147 -0
- package/.versions/2.2.4/.pi/agents/teams.yaml +41 -0
- package/.versions/2.2.4/.pi/agents/voices.yaml +13 -0
- package/.versions/2.2.4/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.2.4/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.2.4/.pi/extensions/btw/index.ts +916 -0
- package/.versions/2.2.4/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.2.4/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.2.4/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.2.4/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.2.4/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.2.4/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.2.4/.pi/extensions/compact-and-continue/index.ts +136 -0
- package/.versions/2.2.4/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.2.4/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.2.4/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.2.4/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.2.4/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.2.4/.pi/extensions/package.json +9 -0
- package/.versions/2.2.4/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.2.4/.pi/extensions/pi-voice-stt/config.ts +199 -0
- package/.versions/2.2.4/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.2.4/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.2.4/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.2.4/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.2.4/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/README.md +1664 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/acceptance.ts +204 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/access-approval.ts +278 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/action-authorization.ts +10 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/agentic-contract.ts +43 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/agentic-evidence.ts +64 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/agentic-hub.ts +55 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/agentic-runtime.ts +56 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/agentic-sources-worker.mjs +4 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/agentic-sources.ts +74 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/agentic-state.ts +23 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/approval-wait.ts +1 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/assertion-ledger.js +68 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/assist-profile.ts +19 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/budget-recovery.ts +151 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/capability-packs.ts +187 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/codex-bootstrap.ts +117 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/config.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/context.ts +43 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/recover.ts +81 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/config/agents.ts +183 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/config/model-profiles.ts +240 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/config/overrides.ts +166 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context/assertion-journal.ts +133 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +234 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context/budgets.ts +152 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context-compaction-monitor.ts +35 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context-compaction-preflight.ts +21 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context-compaction-runtime.ts +69 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context-compaction.ts +34 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context-continuity-broker.ts +44 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context-continuity-child.ts +83 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context-continuity-client.ts +22 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context-continuity-compat.ts +45 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context-continuity-owners.ts +17 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context-continuity-registry.ts +8 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context-continuity.ts +82 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context-pressure.ts +222 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/context-window.js +108 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/damage-guard-approval.ts +83 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/damage-guard-broker.ts +125 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/damage-guard-contract.ts +22 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/damage-guard-descendant.ts +76 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/damage-guard-hub.ts +263 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/damage-guard-identity.ts +12 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/damage-guard-owners.ts +59 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/damage-guard-state.ts +46 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/damage-guard-test-tsconfig.json +19 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/delegate.ts +478 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/deterministic-fs.ts +195 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/dispatch-coms.ts +258 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/dispatch-native-complete.ts +176 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +318 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +264 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/dispatch-native-types.ts +297 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/dispatch-native.ts +242 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +27 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +77 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/docs-lane.js +123 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/drift-watchdog.js +344 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/execution-evidence.ts +96 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/execution-trace.ts +241 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/external-blocker.js +92 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/file-discovery/adapters.ts +88 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/file-discovery/broker-client.ts +62 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/file-discovery/broker.ts +128 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/file-discovery/child-extension.ts +42 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/file-discovery/descendant.ts +67 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/file-discovery/discovery-worker.mjs +15 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/file-discovery/discovery.ts +126 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/file-discovery/evaluate.ts +57 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/file-discovery/hub.ts +170 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/file-discovery/native-context.ts +8 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/file-discovery/native-fixture.test-support.ts +108 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/file-discovery/owners.ts +100 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/file-discovery/results.ts +55 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/file-discovery/runtime.ts +130 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/file-discovery/semantic-profiles.ts +18 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/file-discovery/sources.ts +69 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/file-discovery/state.ts +22 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/filesystem-tool.ts +166 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/fixtures/registration-surface.json +69 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/footer.ts +29 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/helpers.ts +269 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/history-projection.ts +116 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/hub-state-audit.js +41 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/index.ts +2827 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/input/completions.ts +82 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/input/shortcuts.ts +16 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +231 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +90 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/no-progress.ts +773 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/operator-current-state.ts +102 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/operator-watchdog.ts +97 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/orchestration-activation.ts +109 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/orchestration-route.ts +68 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/permission-channel.ts +87 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/permission-relay.ts +93 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/policy/roster.ts +103 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/policy/work-mode.ts +104 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/poll-command.ts +184 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/presentation.ts +54 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/private-config-current-state.ts +81 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/private-config-fixtures.ts +26 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/private-config-review.ts +100 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/proactive-config.ts +22 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/proactive-external-git.ts +82 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/proactive-external.ts +142 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/proactive-local.ts +89 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/proactive-observer.ts +106 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/proactive-rules.ts +171 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/proactive-runtime.ts +318 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/proactive-snapshot.ts +287 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/proactive-types.ts +70 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/process-obligations.ts +230 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/prompts/context.ts +72 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/prompts/fragments.ts +94 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/prompts/session-start.ts +89 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/prompts/system-prompt.ts +142 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/provider-semaphore.js +143 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/recover-state.ts +144 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/recovery-continuation.ts +134 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/recovery-contract.ts +151 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/research/runtime.ts +215 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/research/spawn-run.ts +221 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/return-contract.js +371 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/return-extract.js +77 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/review-closure.ts +43 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/review-continuity.ts +76 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/review-findings.js +96 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/review-reuse.ts +48 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/review-verdict.ts +6 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/run-budget.js +362 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/run-namespace.js +93 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/runtime-receipts.ts +63 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/runtime-test-check.ts +85 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/safety-routing.ts +28 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/scope-gate.js +271 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/scope-overlap.ts +46 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/session-audit.ts +331 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/spawn.ts +706 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/specialist-result-receipt.ts +13 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/specialist-result.ts +78 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/system1-communication-store.ts +225 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/system1-report.ts +275 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/system1-runtime.ts +271 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/task-brief.ts +98 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/task-continuation.ts +21 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/task-resume-contract.ts +80 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/task-triage-authorization.ts +187 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/task-triage-config.ts +21 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/task-triage-obligations.ts +120 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/task-triage-runtime.ts +132 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/timeline.ts +72 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +83 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tool-catalog-state.ts +125 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/action-executors.ts +243 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/ask-system1-files.ts +15 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/ask-system1.ts +25 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/context.ts +151 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +93 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +976 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +23 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/fleet-tools.ts +201 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/herdr-executors.ts +100 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/poll-panel-core.ts +30 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/poll-panel.ts +33 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/recover-task.ts +16 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/run-flow.ts +177 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/spawn-research.ts +67 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tools/verification-contract.ts +81 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/tsconfig.json +22 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/types.ts +66 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/ui/context-budget.ts +89 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +173 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/verification-diagnostics.ts +23 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/work-mode.ts +185 -0
- package/.versions/2.2.4/.pi/harnesses/agent-hub/write-isolation.ts +232 -0
- package/.versions/2.2.4/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.2.4/.pi/harnesses/ask-user-remote/index.ts +571 -0
- package/.versions/2.2.4/.pi/harnesses/ask-user-remote/questions.ts +206 -0
- package/.versions/2.2.4/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.2.4/.pi/harnesses/ask-user-remote/runtime-ask.ts +90 -0
- package/.versions/2.2.4/.pi/harnesses/coms/README.md +105 -0
- package/.versions/2.2.4/.pi/harnesses/coms/index.ts +308 -0
- package/.versions/2.2.4/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.2.4/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.2.4/.pi/harnesses/damage-control-continue/README.md +173 -0
- package/.versions/2.2.4/.pi/harnesses/damage-control-continue/index.ts +699 -0
- package/.versions/2.2.4/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.2.4/.pi/harnesses/damage-control-continue/result-screen.ts +98 -0
- package/.versions/2.2.4/.pi/harnesses/damage-control-continue/system1-child.ts +45 -0
- package/.versions/2.2.4/.pi/harnesses/damage-control-continue/system1-client.ts +85 -0
- package/.versions/2.2.4/.pi/harnesses/damage-control-continue/system1-guard.ts +65 -0
- package/.versions/2.2.4/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.2.4/.pi/harnesses/lib/approval-wait.ts +17 -0
- package/.versions/2.2.4/.pi/harnesses/lib/bash-policy-analysis.ts +205 -0
- package/.versions/2.2.4/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.2.4/.pi/harnesses/lib/clarification-policy.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/lib/codex-compat.ts +97 -0
- package/.versions/2.2.4/.pi/harnesses/lib/codex-contract.ts +259 -0
- package/.versions/2.2.4/.pi/harnesses/lib/codex-notification-profile.ts +75 -0
- package/.versions/2.2.4/.pi/harnesses/lib/coms-core-io.ts +422 -0
- package/.versions/2.2.4/.pi/harnesses/lib/coms-core.ts +738 -0
- package/.versions/2.2.4/.pi/harnesses/lib/coms-instruction-receipts.ts +113 -0
- package/.versions/2.2.4/.pi/harnesses/lib/coms-observation.ts +74 -0
- package/.versions/2.2.4/.pi/harnesses/lib/coms-registry-entry.ts +99 -0
- package/.versions/2.2.4/.pi/harnesses/lib/coms-response-read.ts +107 -0
- package/.versions/2.2.4/.pi/harnesses/lib/context-budget-child-prompt.ts +214 -0
- package/.versions/2.2.4/.pi/harnesses/lib/context-budget-hub-prompt.ts +124 -0
- package/.versions/2.2.4/.pi/harnesses/lib/context-budget-view.ts +112 -0
- package/.versions/2.2.4/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.2.4/.pi/harnesses/lib/context-compaction-policy.js +35 -0
- package/.versions/2.2.4/.pi/harnesses/lib/damage-action-hash.ts +28 -0
- package/.versions/2.2.4/.pi/harnesses/lib/damage-auto-policy.ts +52 -0
- package/.versions/2.2.4/.pi/harnesses/lib/damage-control-presentation.ts +14 -0
- package/.versions/2.2.4/.pi/harnesses/lib/damage-control-shared.ts +279 -0
- package/.versions/2.2.4/.pi/harnesses/lib/damage-guard-port.ts +25 -0
- package/.versions/2.2.4/.pi/harnesses/lib/damage-policy.ts +35 -0
- package/.versions/2.2.4/.pi/harnesses/lib/damage-result-evidence.ts +25 -0
- package/.versions/2.2.4/.pi/harnesses/lib/damage-result-view.ts +16 -0
- package/.versions/2.2.4/.pi/harnesses/lib/deterministic-handle-path.ts +25 -0
- package/.versions/2.2.4/.pi/harnesses/lib/exact-permission-port.ts +47 -0
- package/.versions/2.2.4/.pi/harnesses/lib/execution-trace.ts +45 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-bootstrap-channel.ts +148 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-codex-catalog.ts +30 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-codex-chat-view.ts +55 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-codex-event-bridge.ts +82 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-codex-namespace.ts +2 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-codex-policy-snapshot.ts +10 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-config/cli-bridge.ts +111 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-config/mutations.ts +201 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-config/snapshot.ts +417 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-config/transition.ts +68 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-config/ui.ts +269 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-config/view.ts +338 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-connection-control.ts +94 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-connection-diagnostics.ts +7 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-dashboard-view.ts +174 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-event-source.ts +21 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-notification-admission.ts +32 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-notification-bootstrap.ts +172 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-notification-validation.ts +122 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-question-reference.ts +42 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-read-model.ts +609 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-target-identity.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.2.4/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.2.4/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.2.4/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.2.4/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.2.4/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.2.4/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.2.4/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.2.4/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.2.4/.pi/harnesses/lib/identical-dialog.ts +27 -0
- package/.versions/2.2.4/.pi/harnesses/lib/installation-state.js +62 -0
- package/.versions/2.2.4/.pi/harnesses/lib/peer-target.ts +24 -0
- package/.versions/2.2.4/.pi/harnesses/lib/policy-roots.js +117 -0
- package/.versions/2.2.4/.pi/harnesses/lib/policy-roots.ts +32 -0
- package/.versions/2.2.4/.pi/harnesses/lib/process-shared.ts +9 -0
- package/.versions/2.2.4/.pi/harnesses/lib/resource-closure.js +26 -0
- package/.versions/2.2.4/.pi/harnesses/lib/safe-source-read.js +29 -0
- package/.versions/2.2.4/.pi/harnesses/lib/semantic-approval.ts +80 -0
- package/.versions/2.2.4/.pi/harnesses/lib/session-target.ts +62 -0
- package/.versions/2.2.4/.pi/harnesses/lib/spawned-peers.js +191 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/config-agentic.js +15 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/config-context-compaction.js +16 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/config-damage-guard.js +24 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/config-file-discovery.js +23 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/config-json.js +37 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/config-loader.js +53 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/config-proactive.js +68 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/config-triage.js +42 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/config-v2.js +112 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/config.js +50 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/contracts.ts +154 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/demo.ts +95 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/payload-screen.ts +65 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/selection.js +11 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/worktree-scopes.js +110 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/worktree-scopes.ts +13 -0
- package/.versions/2.2.4/.pi/harnesses/lib/system1/worktree-service.ts +24 -0
- package/.versions/2.2.4/.pi/harnesses/lib/target-capabilities.js +7 -0
- package/.versions/2.2.4/.pi/harnesses/lib/update-check.ts +227 -0
- package/.versions/2.2.4/.pi/harnesses/lib/workspace-context.js +115 -0
- package/.versions/2.2.4/.pi/harnesses/lib/workspace-context.ts +22 -0
- package/.versions/2.2.4/.pi/harnesses/package-lock.json +2121 -0
- package/.versions/2.2.4/.pi/harnesses/package.json +13 -0
- package/.versions/2.2.4/.pi/prompts/af-build.md +27 -0
- package/.versions/2.2.4/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.2.4/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.2.4/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.2.4/.pi/prompts/af-review.md +16 -0
- package/.versions/2.2.4/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.2.4/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.2.4/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.2.4/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.2.4/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.2.4/.pi/prompts/af-test.md +19 -0
- package/.versions/2.2.4/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.2.4/.version +1 -0
- package/.versions/2.2.4/agents/architect.md +24 -0
- package/.versions/2.2.4/agents/bowser.md +28 -0
- package/.versions/2.2.4/agents/builder.md +55 -0
- package/.versions/2.2.4/agents/code-reviewer.md +209 -0
- package/.versions/2.2.4/agents/deep-researcher.md +32 -0
- package/.versions/2.2.4/agents/documenter.md +22 -0
- package/.versions/2.2.4/agents/plan-reviewer.md +83 -0
- package/.versions/2.2.4/agents/planner.md +107 -0
- package/.versions/2.2.4/agents/releaser.md +24 -0
- package/.versions/2.2.4/agents/researcher.md +30 -0
- package/.versions/2.2.4/agents/security-auditor.md +167 -0
- package/.versions/2.2.4/agents/test-engineer.md +153 -0
- package/.versions/2.2.4/agents/web-debugger.md +44 -0
- package/.versions/2.2.4/agents/web-performance-auditor.md +194 -0
- package/.versions/2.2.4/bin/catalog/harness-runtime-closure.json +85 -0
- package/.versions/2.2.4/docs/ARCHITECTURE.md +1291 -0
- package/.versions/2.2.4/docs/agent-fleet-setup.md +1161 -0
- package/.versions/2.2.4/docs/claude-code-coms-bridge.md +147 -0
- package/.versions/2.2.4/docs/codex-local-mcp.md +528 -0
- package/.versions/2.2.4/docs/codex-session-bridge.md +44 -0
- package/.versions/2.2.4/docs/codex-setup.md +183 -0
- package/.versions/2.2.4/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.2.4/docs/fleet-native-voice.md +151 -0
- package/.versions/2.2.4/docs/getting-started.md +126 -0
- package/.versions/2.2.4/docs/npm-install.md +535 -0
- package/.versions/2.2.4/docs/pi-extensions.md +450 -0
- package/.versions/2.2.4/docs/pi-setup.md +92 -0
- package/.versions/2.2.4/docs/skill-anatomy.md +150 -0
- package/.versions/2.2.4/install-manifest.json +3227 -0
- package/.versions/2.2.4/justfile +246 -0
- package/.versions/2.2.4/manifest-meta.json +1099 -0
- package/.versions/2.2.4/references/accessibility-checklist.md +160 -0
- package/.versions/2.2.4/references/communication-contract.md +26 -0
- package/.versions/2.2.4/references/definition-of-done.md +67 -0
- package/.versions/2.2.4/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.2.4/references/observability-checklist.md +92 -0
- package/.versions/2.2.4/references/orchestration-patterns.md +370 -0
- package/.versions/2.2.4/references/performance-checklist.md +236 -0
- package/.versions/2.2.4/references/prompting-patterns.md +380 -0
- package/.versions/2.2.4/references/security-checklist.md +245 -0
- package/.versions/2.2.4/references/testing-patterns.md +235 -0
- package/.versions/2.2.4/references/workflow-authoring.md +304 -0
- package/.versions/2.2.4/skills/_internal/grilling.md +59 -0
- package/.versions/2.2.4/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.2.4/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.2.4/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.2.4/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.2.4/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.2.4/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.2.4/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.2.4/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.2.4/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.2.4/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.2.4/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.2.4/skills/fleet-connect/SKILL.md +29 -0
- package/.versions/2.2.4/skills/fleet-connect.zip +0 -0
- package/.versions/2.2.4/skills/fleet-native-voice/SKILL.md +103 -0
- package/.versions/2.2.4/skills/fleet-native-voice/agents/openai.yaml +4 -0
- package/.versions/2.2.4/skills/fleet-native-voice.zip +0 -0
- package/.versions/2.2.4/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.2.4/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.2.4/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.2.4/skills/idea-refine/examples.md +238 -0
- package/.versions/2.2.4/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.2.4/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.2.4/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.2.4/skills/incremental-implementation/SKILL.md +353 -0
- package/.versions/2.2.4/skills/incremental-implementation.zip +0 -0
- package/.versions/2.2.4/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.2.4/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.2.4/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.2.4/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.2.4/skills/planning-and-task-breakdown/SKILL.md +318 -0
- package/.versions/2.2.4/skills/planning-and-task-breakdown.zip +0 -0
- package/.versions/2.2.4/skills/repository-ai-setup/SKILL.md +135 -0
- package/.versions/2.2.4/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/.versions/2.2.4/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/.versions/2.2.4/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/.versions/2.2.4/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/.versions/2.2.4/skills/repository-ai-setup/references/verify-setup.md +20 -0
- package/.versions/2.2.4/skills/repository-ai-setup.zip +0 -0
- package/.versions/2.2.4/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.2.4/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.2.4/skills/spec-driven-development.zip +0 -0
- package/.versions/2.2.4/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.2.4/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/CHANGELOG.md +44 -0
- package/README.md +3 -3
- package/agents/architect.md +2 -2
- package/agents/bowser.md +1 -1
- package/agents/builder.md +2 -2
- package/agents/code-reviewer.md +2 -2
- package/agents/deep-researcher.md +1 -1
- package/agents/documenter.md +1 -1
- package/agents/plan-reviewer.md +2 -2
- package/agents/planner.md +5 -5
- package/agents/releaser.md +1 -1
- package/agents/researcher.md +1 -1
- package/agents/security-auditor.md +1 -1
- package/agents/test-engineer.md +2 -2
- package/agents/web-debugger.md +2 -2
- package/agents/web-performance-auditor.md +2 -2
- package/bin/force-patch-changesets.js +2 -3
- package/bin/snapshot-version.js +1 -1
- package/docs/agent-fleet-setup.md +3 -3
- package/docs/codex-local-mcp.md +13 -5
- package/docs/hub-task-continuation.md +23 -0
- package/install-manifest.json +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import {spawn} from 'node:child_process';
|
|
2
|
+
import {createHash} from 'node:crypto';
|
|
3
|
+
import {constants,type BigIntStats} from 'node:fs';
|
|
4
|
+
import {lstat,mkdir,mkdtemp,open,realpath,rm,stat,type FileHandle} from 'node:fs/promises';
|
|
5
|
+
import {delimiter,dirname,isAbsolute,join} from 'node:path';
|
|
6
|
+
import {tmpdir} from 'node:os';
|
|
7
|
+
import {compareCodexVersions,codexDaemonVersionFromUserAgent} from '../../../harnesses/lib/codex-compat.ts';
|
|
8
|
+
|
|
9
|
+
export class CodexMeasurementError extends Error {
|
|
10
|
+
readonly code: string;
|
|
11
|
+
constructor(code: string) { super(code); this.code = code; }
|
|
12
|
+
}
|
|
13
|
+
function fail(code: string): never { throw new CodexMeasurementError(code); }
|
|
14
|
+
const epoch = (value: unknown): value is string => typeof value === 'string' && value.length > 0 && value.length <= 1024 && !/[\u0000-\u0020\u007f]/.test(value);
|
|
15
|
+
const version = (value: unknown): value is string => typeof value === 'string' && compareCodexVersions(value, value) === 0;
|
|
16
|
+
const sha = (bytes: string | Buffer) => createHash('sha256').update(bytes).digest('hex');
|
|
17
|
+
type Options = {timeoutMs?: number; signal?: AbortSignal};
|
|
18
|
+
function deadline(options: Options, fallback: number) {
|
|
19
|
+
const timeout = options.timeoutMs ?? fallback, signal = options.signal;
|
|
20
|
+
if (!Number.isSafeInteger(timeout) || timeout < 1 || timeout > 30000) fail('invalid_timeout');
|
|
21
|
+
const controller = new AbortController(), expires = performance.now() + timeout; let reason = 'measurement_cancelled';
|
|
22
|
+
const stop = (code: string) => { if (!controller.signal.aborted) { reason = code; controller.abort(); } };
|
|
23
|
+
const abort = () => stop(performance.now() >= expires ? 'measurement_timeout' : 'measurement_cancelled');
|
|
24
|
+
if (signal?.aborted) fail(reason);
|
|
25
|
+
signal?.addEventListener('abort', abort, {once: true});
|
|
26
|
+
const timer = setTimeout(() => stop('measurement_timeout'), timeout);
|
|
27
|
+
// A fulfilled callback/microtask can run before an already-due timer. Never
|
|
28
|
+
// publish an overdue observation merely because that timer has not run yet.
|
|
29
|
+
const check = () => { if (performance.now() >= expires) stop('measurement_timeout'); if (controller.signal.aborted) fail(reason); };
|
|
30
|
+
return {signal: controller.signal, check, error: () => new CodexMeasurementError(reason), close: () => { clearTimeout(timer); signal?.removeEventListener('abort', abort); controller.abort(); }};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface DaemonObservationRpc {
|
|
34
|
+
/** Trusted connect-only provider. Both callbacks must honor abort and clean up
|
|
35
|
+
* their own transport. They must not start/resume/queue/approve anything.
|
|
36
|
+
* Existing CodexUnixQueueRpc is NOT loosened or automatically wired here.
|
|
37
|
+
*/
|
|
38
|
+
socketEpoch(signal: AbortSignal): unknown | Promise<unknown>;
|
|
39
|
+
/** socketEpoch is captured/checked connection metadata, NEVER a server result
|
|
40
|
+
* or an ambient path snapshot. The provider must fence against expectedEpoch.
|
|
41
|
+
*/
|
|
42
|
+
initialize(signal: AbortSignal, expectedEpoch: string): Promise<{result: unknown; socketEpoch: string}>;
|
|
43
|
+
}
|
|
44
|
+
export type DaemonMeasurement = {kind: 'initialize_version_observation'; version: string; socketEpoch: string};
|
|
45
|
+
/** Version claim from the measured UA grammar only; NOT Desktop identity, MCP
|
|
46
|
+
* clientInfo, current consumer presence or persistent approval evidence.
|
|
47
|
+
*/
|
|
48
|
+
export async function measureDaemon(rpc: DaemonObservationRpc, options: Options = {}): Promise<DaemonMeasurement> {
|
|
49
|
+
const scope = deadline(options, 3000);
|
|
50
|
+
const cancelled = new Promise<never>((_, reject) => scope.signal.addEventListener('abort', () => reject(scope.error()), {once: true}));
|
|
51
|
+
const work = async (): Promise<DaemonMeasurement> => {
|
|
52
|
+
scope.check(); const before = await rpc.socketEpoch(scope.signal); scope.check();
|
|
53
|
+
if (!epoch(before)) fail('invalid_socket_epoch');
|
|
54
|
+
const initialized = await rpc.initialize(scope.signal, before); scope.check();
|
|
55
|
+
if (!initialized || typeof initialized !== 'object' || !epoch(initialized.socketEpoch) || initialized.socketEpoch !== before) fail('initialize_epoch_mismatch');
|
|
56
|
+
const observed = initialized.result;
|
|
57
|
+
const ua = observed && typeof observed === 'object' && !Array.isArray(observed) ? (observed as {userAgent?: unknown}).userAgent : undefined;
|
|
58
|
+
// Shared exact measured prefix; no guessed alias or clientInfo/CLI fallback.
|
|
59
|
+
const observedVersion=codexDaemonVersionFromUserAgent(ua);
|
|
60
|
+
if (!observedVersion) fail('daemon_version_unavailable');
|
|
61
|
+
const after = await rpc.socketEpoch(scope.signal); scope.check();
|
|
62
|
+
if (!epoch(after) || before !== after) fail('socket_epoch_changed');
|
|
63
|
+
return {kind: 'initialize_version_observation', version: observedVersion, socketEpoch: before};
|
|
64
|
+
};
|
|
65
|
+
try { return await Promise.race([work(), cancelled]); }
|
|
66
|
+
catch (error) { if (error instanceof CodexMeasurementError) throw error; throw new CodexMeasurementError('daemon_observation_failed'); }
|
|
67
|
+
finally { scope.close(); }
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** Revalidate the previously selected CLI bytes/alias identity without running
|
|
71
|
+
* any command. A cached schema snapshot is not permission to trust a changed
|
|
72
|
+
* executable. This remains byte identity, not daemon/Desktop process identity. */
|
|
73
|
+
export async function schemaExportStillCurrent(binary:string,evidence:{binaryEpoch:string;binarySha256:string},options:Options={}){
|
|
74
|
+
const scope=deadline(options,2000);try{if(typeof process.getuid!=='function')return false;scope.check();const current=await binarySnapshot(binary,scope.check,process.getuid());scope.check();return current.epoch===evidence.binaryEpoch&¤t.sha256===evidence.binarySha256;}finally{scope.close();}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const sourceFiles = ['ClientRequest.json','ClientNotification.json','JSONRPCResponse.json','JSONRPCError.json','v1/InitializeResponse.json','v2/ThreadReadResponse.json','v2/ThreadLoadedListResponse.json','v2/ThreadQueueAddResponse.json','v2/ThreadQueueListResponse.json'] as const;
|
|
78
|
+
const maxBinaryBytes = 512 * 1024 * 1024, maxFileBytes = 16 * 1024 * 1024, maxTotalBytes = 32 * 1024 * 1024;
|
|
79
|
+
const stamp = (s: BigIntStats) => [s.dev,s.ino,s.size,s.mode,s.uid,s.gid,s.nlink,s.mtimeNs,s.ctimeNs].map(String).join(':');
|
|
80
|
+
async function binarySnapshot(path: string, check: () => void, owner: number) {
|
|
81
|
+
check(); const alias = await lstat(path, {bigint: true}); const resolved = await realpath(path);
|
|
82
|
+
const uid = BigInt(owner), checked = new Set<string>();
|
|
83
|
+
// A safe file mode alone cannot stop another UID replacing it through a
|
|
84
|
+
// writable ancestor. Execute only through physically trusted parent chains.
|
|
85
|
+
for (const parent of [dirname(resolved), await realpath(dirname(path))]) {
|
|
86
|
+
for (let dir = parent; !checked.has(dir); dir = dirname(dir)) {
|
|
87
|
+
check(); checked.add(dir); const s = await lstat(dir, {bigint: true});
|
|
88
|
+
if (!s.isDirectory() || s.isSymbolicLink() || (s.uid !== uid && s.uid !== 0n) || ((Number(s.mode) & 0o022) !== 0 && (Number(s.mode) & 0o1000) === 0)) fail('unsafe_binary_parent');
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const before = await lstat(resolved, {bigint: true});
|
|
92
|
+
if (!before.isFile() || before.isSymbolicLink() || (before.uid !== uid && before.uid !== 0n) || (alias.uid !== uid && alias.uid !== 0n) || (Number(before.mode) & 0o6022) !== 0 || (Number(before.mode) & 0o111) === 0) fail('unsafe_binary');
|
|
93
|
+
if (before.size < 1n || before.size > BigInt(maxBinaryBytes)) fail('binary_limit');
|
|
94
|
+
const handle = await open(resolved, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
|
|
95
|
+
const hash = createHash('sha256'); let total = 0;
|
|
96
|
+
try {
|
|
97
|
+
if (stamp(await handle.stat({bigint: true})) !== stamp(before)) fail('binary_changed');
|
|
98
|
+
const buffer = Buffer.alloc(1024 * 1024);
|
|
99
|
+
while (true) { check(); const {bytesRead} = await handle.read(buffer, 0, buffer.length, null); if (!bytesRead) break; total += bytesRead; if (total > maxBinaryBytes) fail('binary_limit'); hash.update(buffer.subarray(0, bytesRead)); }
|
|
100
|
+
if (total !== Number(before.size) || stamp(await handle.stat({bigint: true})) !== stamp(before) || stamp(await stat(resolved, {bigint: true})) !== stamp(before) || stamp(await lstat(path, {bigint: true})) !== stamp(alias) || await realpath(path) !== resolved) fail('binary_changed');
|
|
101
|
+
} finally { await handle.close(); }
|
|
102
|
+
check(); const digest = hash.digest('hex');
|
|
103
|
+
return {path: resolved, sha256: digest, epoch: sha(JSON.stringify([path,resolved,stamp(alias),stamp(before),digest]))};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** Fixed local subcommands only. Minimal isolated HOME/CODEX_HOME; no inherited
|
|
107
|
+
* agent grants, auth, NODE_OPTIONS or model/provider configuration. This is not
|
|
108
|
+
* an OS/network sandbox: the explicitly selected executable must be trusted.
|
|
109
|
+
*/
|
|
110
|
+
function command(binary: string, args: string[], cwd: string, env: NodeJS.ProcessEnv, scope: ReturnType<typeof deadline>): Promise<Buffer> {
|
|
111
|
+
scope.check();
|
|
112
|
+
return new Promise((resolve, reject) => {
|
|
113
|
+
let error: CodexMeasurementError | undefined, stdout = 0, stderr = 0;
|
|
114
|
+
const chunks: Buffer[] = [];
|
|
115
|
+
const child = spawn(binary, args, {cwd, env, shell: false, detached: true, windowsHide: true, stdio: ['ignore','pipe','pipe']});
|
|
116
|
+
const kill = () => { if (child.pid) try { process.kill(-child.pid, 'SIGKILL'); } catch { child.kill('SIGKILL'); } };
|
|
117
|
+
const abort = () => { error ??= scope.error(); kill(); };
|
|
118
|
+
scope.signal.addEventListener('abort', abort, {once: true});
|
|
119
|
+
child.on('error', () => { error ??= new CodexMeasurementError('binary_command_failed'); });
|
|
120
|
+
child.stdout.on('data', (data: Buffer) => { stdout += data.length; if (stdout > 16384) { error ??= new CodexMeasurementError('command_output_limit'); kill(); } else chunks.push(data); });
|
|
121
|
+
child.stderr.on('data', (data: Buffer) => { stderr += data.length; if (stderr > 16384) { error ??= new CodexMeasurementError('command_output_limit'); kill(); } });
|
|
122
|
+
child.on('close', code => { scope.signal.removeEventListener('abort', abort); if (error) reject(error); else if (code !== 0) reject(new CodexMeasurementError('binary_command_failed')); else resolve(Buffer.concat(chunks)); });
|
|
123
|
+
if (scope.signal.aborted) abort();
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export type SchemaExportObservation = {
|
|
128
|
+
kind: 'schema_export_observation'; version: string; socketEpoch: string;
|
|
129
|
+
binarySha256: string; binaryEpoch: string;
|
|
130
|
+
documents: Record<string, unknown>; sourceHashes: Record<string, string>;
|
|
131
|
+
};
|
|
132
|
+
/** Offline fixed schema export in an owned 0700 temp root, only after EXACT CLI
|
|
133
|
+
* version match (including build metadata). No install/update/start commands.
|
|
134
|
+
* Returns data after cleanup, never a ready/compatible verdict. Epoch freshness
|
|
135
|
+
* must be rechecked by the future caller; no live RPC adapter is installed here.
|
|
136
|
+
*/
|
|
137
|
+
export async function exportSchema(binary: string, daemon: DaemonMeasurement, options: Options = {}): Promise<SchemaExportObservation> {
|
|
138
|
+
const uid = process.getuid?.();
|
|
139
|
+
if (process.platform === 'win32' || uid === undefined) fail('unsupported_platform');
|
|
140
|
+
if (typeof binary !== 'string' || !isAbsolute(binary) || binary.includes('\0')) fail('invalid_binary_path');
|
|
141
|
+
const observedVersion = daemon?.version, socketEpoch = daemon?.socketEpoch;
|
|
142
|
+
if (daemon?.kind !== 'initialize_version_observation' || !version(observedVersion) || !epoch(socketEpoch)) fail('invalid_daemon_measurement');
|
|
143
|
+
const scope = deadline(options, 30000);
|
|
144
|
+
let root: string | undefined, rootIdentity: string | undefined, rootHandle: FileHandle | undefined;
|
|
145
|
+
let hasResult = false;
|
|
146
|
+
try {
|
|
147
|
+
scope.check();
|
|
148
|
+
const requestedTemp = tmpdir(); if (!isAbsolute(requestedTemp)) fail('unsafe_temp_parent');
|
|
149
|
+
const base = await realpath(requestedTemp), parent = await lstat(base);
|
|
150
|
+
if (!parent.isDirectory() || (parent.uid !== uid && parent.uid !== 0) || ((parent.mode & 0o022) !== 0 && (parent.mode & 0o1000) === 0)) fail('unsafe_temp_parent');
|
|
151
|
+
root = await mkdtemp(join(base, 'fleet-codex-schema-')); rootIdentity = stamp(await lstat(root, {bigint: true}));
|
|
152
|
+
// Pin the directory inode through cleanup: unlink/recreate cannot reuse it and
|
|
153
|
+
// masquerade as our original root while this handle remains open.
|
|
154
|
+
rootHandle = await open(root, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_DIRECTORY);
|
|
155
|
+
if (stamp(await rootHandle.stat({bigint: true})).split(':').slice(0,2).join(':') !== rootIdentity.split(':').slice(0,2).join(':')) fail('unsafe_export_root');
|
|
156
|
+
const home = join(root, 'home'), codexHome = join(root, 'codex-home'), temp = join(root, 'tmp'), output = join(root, 'schema');
|
|
157
|
+
for (const dir of [home,codexHome,temp,output]) await mkdir(dir, {mode: 0o700});
|
|
158
|
+
const env = {PATH: [dirname(process.execPath),'/usr/bin','/bin'].join(delimiter), HOME: home, CODEX_HOME: codexHome, TMPDIR: temp, TMP: temp, TEMP: temp, LANG: 'C.UTF-8', LC_ALL: 'C.UTF-8', TERM: 'dumb', NO_COLOR: '1'};
|
|
159
|
+
const privateRoot = async () => {
|
|
160
|
+
const current = await lstat(root!, {bigint: true});
|
|
161
|
+
if (!current.isDirectory() || current.isSymbolicLink() || current.uid !== BigInt(uid) || (Number(current.mode) & 0o077) !== 0 || stamp(current).split(':').slice(0,2).join(':') !== rootIdentity?.split(':').slice(0,2).join(':')) fail('unsafe_export_root');
|
|
162
|
+
};
|
|
163
|
+
await privateRoot();
|
|
164
|
+
const before = await binarySnapshot(binary, scope.check, uid);
|
|
165
|
+
const rawVersion = new TextDecoder('utf-8', {fatal: true}).decode(await command(before.path, ['--version'], root, env, scope));
|
|
166
|
+
const match = /^codex-cli ([^\r\n ]+)(?:\r?\n)?$/.exec(rawVersion);
|
|
167
|
+
if (!match || !version(match[1]) || match[1] !== observedVersion) fail('export_version_mismatch');
|
|
168
|
+
await privateRoot();
|
|
169
|
+
if ((await binarySnapshot(binary, scope.check, uid)).epoch !== before.epoch) fail('binary_changed');
|
|
170
|
+
await command(before.path, ['app-server','generate-json-schema','--experimental','--out',output], root, env, scope);
|
|
171
|
+
await privateRoot();
|
|
172
|
+
if ((await binarySnapshot(binary, scope.check, uid)).epoch !== before.epoch) fail('binary_changed');
|
|
173
|
+
const documents: Record<string, unknown> = {}, sourceHashes: Record<string, string> = {}; let total = 0;
|
|
174
|
+
for (const file of sourceFiles) {
|
|
175
|
+
scope.check();
|
|
176
|
+
const path = join(output, file);
|
|
177
|
+
for (const dir of file.includes('/') ? [output,dirname(path)] : [output]) { const s = await lstat(dir); if (!s.isDirectory() || s.isSymbolicLink() || s.uid !== uid) fail('unsafe_schema_output'); }
|
|
178
|
+
const entry = await lstat(path, {bigint: true});
|
|
179
|
+
if (!entry.isFile() || entry.isSymbolicLink() || entry.nlink !== 1n) fail('unsafe_schema_output');
|
|
180
|
+
const handle = await open(path, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
|
|
181
|
+
let bytes: Buffer;
|
|
182
|
+
try {
|
|
183
|
+
const initial = await handle.stat({bigint: true});
|
|
184
|
+
if (stamp(initial) !== stamp(entry)) fail('schema_output_changed');
|
|
185
|
+
if (!initial.isFile() || initial.nlink !== 1n || initial.uid !== BigInt(uid)) fail('unsafe_schema_output');
|
|
186
|
+
if (initial.size < 1n || initial.size > BigInt(maxFileBytes) || total + Number(initial.size) > maxTotalBytes) fail('schema_output_limit');
|
|
187
|
+
const buffer = Buffer.alloc(Number(initial.size) + 1); let offset = 0;
|
|
188
|
+
while (offset < buffer.length) { scope.check(); const {bytesRead} = await handle.read(buffer, offset, buffer.length - offset, null); if (!bytesRead) break; offset += bytesRead; }
|
|
189
|
+
bytes = buffer.subarray(0, offset);
|
|
190
|
+
if (bytes.length !== Number(initial.size) || stamp(await handle.stat({bigint: true})) !== stamp(initial)) fail('schema_output_changed');
|
|
191
|
+
} finally { await handle.close(); }
|
|
192
|
+
total += bytes.length;
|
|
193
|
+
let parsed: unknown;
|
|
194
|
+
try { parsed = JSON.parse(new TextDecoder('utf-8', {fatal: true}).decode(bytes)); } catch { fail('invalid_schema_document'); }
|
|
195
|
+
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) fail('invalid_schema_document');
|
|
196
|
+
documents[file] = parsed; sourceHashes[file] = sha(bytes);
|
|
197
|
+
}
|
|
198
|
+
scope.check(); hasResult = true;
|
|
199
|
+
return {kind: 'schema_export_observation', version: observedVersion, socketEpoch, binarySha256: before.sha256, binaryEpoch: before.epoch, documents, sourceHashes};
|
|
200
|
+
} catch (error) { if (error instanceof CodexMeasurementError) throw error; if (scope.signal.aborted) throw scope.error(); throw new CodexMeasurementError('schema_export_failed'); }
|
|
201
|
+
finally {
|
|
202
|
+
try {
|
|
203
|
+
try {
|
|
204
|
+
if (root) {
|
|
205
|
+
// Directory timestamps change as children are created; bind only dev+inode.
|
|
206
|
+
try {
|
|
207
|
+
const current = await lstat(root, {bigint: true});
|
|
208
|
+
if (stamp(current).split(':').slice(0,2).join(':') !== rootIdentity?.split(':').slice(0,2).join(':') || !current.isDirectory() || current.isSymbolicLink() || current.uid !== BigInt(uid)) fail('unsafe_export_cleanup');
|
|
209
|
+
await rm(root, {recursive: true, force: false});
|
|
210
|
+
} catch (error) { if (error instanceof CodexMeasurementError) throw error; throw new CodexMeasurementError('schema_export_cleanup_failed'); }
|
|
211
|
+
}
|
|
212
|
+
} finally { if (rootHandle) try { await rootHandle.close(); } catch { fail('schema_export_cleanup_failed'); } }
|
|
213
|
+
// Cleanup is mandatory even after cancellation. A completed observation may
|
|
214
|
+
// leave the helper only if its budget/caller is still live after cleanup.
|
|
215
|
+
if (hasResult) scope.check();
|
|
216
|
+
} finally { scope.close(); }
|
|
217
|
+
}
|
|
218
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import {createHash,randomUUID} from 'node:crypto';
|
|
2
|
+
import {opendir,lstat,unlink} from 'node:fs/promises';
|
|
3
|
+
import {join} from 'node:path';
|
|
4
|
+
import {namespaceKey,bootstrapNamespace,type BootstrapPresence} from '../../../harnesses/lib/fleet-bootstrap-channel.ts';
|
|
5
|
+
import type {ConversationKey,TargetEpoch} from './fleet-codex-allowlist.ts';
|
|
6
|
+
import {validInstructionTarget} from '../../../harnesses/lib/fleet-target-identity.ts';
|
|
7
|
+
import {privateDirectory,readPrivateJson,writePrivateJson,privateFileIdentity,canonicalPrivatePath} from './codex-bootstrap-files.ts';
|
|
8
|
+
const TTL=600000,uuid=(v:unknown):v is string=>typeof v==='string'&&/^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/.test(v);
|
|
9
|
+
const object=(v:unknown):v is Record<string,any>=>!!v&&typeof v==='object'&&!Array.isArray(v);
|
|
10
|
+
export type NativePresence={schema:'fleet-native-presence/v1';observation:BootstrapPresence;observedAt:number};
|
|
11
|
+
export type NativeAttachRequest={schema:'fleet-native-attach-request/v1';id:string;namespace:ConversationKey;hostInstance:string;owner:TargetEpoch;createdAt:number};
|
|
12
|
+
const hash=(c:ConversationKey)=>createHash('sha256').update(namespaceKey(c)).digest('hex');
|
|
13
|
+
export function validNativeObservation(v:unknown):v is BootstrapPresence{return object(v)&&Object.keys(v).sort().join(',')==='catalog,clientInfo,hostInstance,namespace,protocolVersion'&&bootstrapNamespace(v.namespace)&&uuid(v.hostInstance)&&v.protocolVersion==='2025-06-18'&&(v.clientInfo===null||object(v.clientInfo)&&Object.keys(v.clientInfo).sort().join(',')==='name,version'&&typeof v.clientInfo.name==='string'&&typeof v.clientInfo.version==='string'&&[v.clientInfo.name,v.clientInfo.version].every(x=>x.length>=1&&x.length<=256&&!/[\u0000-\u001f\u007f]/.test(x)))&&Array.isArray(v.catalog)&&v.catalog.length<=128&&Array.from(v.catalog).every(x=>typeof x==='string'&&/^[A-Za-z0-9._-]{1,128}$/.test(x))&&new Set(v.catalog).size===v.catalog.length;}
|
|
14
|
+
/** Private metadata rendezvous, not policy/config/consent. No new listener or
|
|
15
|
+
* broadcast to unrelated AF projects. Native publishes only observed context;
|
|
16
|
+
* AF may ask its exact owner to attach, but only a later Pi-confirmed coordinator
|
|
17
|
+
* command can reach the Codex writer. No directory repair/foreign file cleanup. */
|
|
18
|
+
export class NativePresenceDirectory {
|
|
19
|
+
readonly root:string;readonly #now:()=>number;readonly #issued=new Map<string,{path:string;identity:string}>();
|
|
20
|
+
constructor(root:string,now=Date.now){if(!canonicalPrivatePath(root))throw Error('native_presence_root');this.root=root;this.#now=now;}
|
|
21
|
+
#time(){const now=this.#now();if(!Number.isSafeInteger(now)||now<0)throw Error('native_presence_clock');return now;}
|
|
22
|
+
#path(o:BootstrapPresence){return join(this.root,'presence-'+hash(o.namespace)+'-'+o.hostInstance+'.json');}
|
|
23
|
+
async publish(value:BootstrapPresence,signal?:AbortSignal){
|
|
24
|
+
const seen=structuredClone(value);if(!validNativeObservation(seen))throw Error('native_presence_invalid');const record:NativePresence={schema:'fleet-native-presence/v1',observation:seen,observedAt:this.#time()};
|
|
25
|
+
await writePrivateJson(this.#path(seen),record,{signal,createParent:true});return structuredClone(record);
|
|
26
|
+
}
|
|
27
|
+
async #files(prefix:'presence-'|'request-',signal?:AbortSignal){
|
|
28
|
+
try{await privateDirectory(this.root);}catch(e){if((e as any)?.code==='ENOENT')return [];throw e;}
|
|
29
|
+
const dir=await opendir(this.root),files:{name:string;value:any;identity:string}[]=[];let count=0,total=0;
|
|
30
|
+
try{for await(const entry of dir){if(signal?.aborted)throw Error('native_presence_cancelled');if(++count>128)throw Error('native_presence_limit');if(!entry.name.startsWith(prefix)||!entry.name.endsWith('.json'))continue;
|
|
31
|
+
let at:Awaited<ReturnType<typeof readPrivateJson>>;try{at=await readPrivateJson(join(this.root,entry.name),32768,signal);}catch(e){if(!(e instanceof Error)||e.message!=='bootstrap_file_changed')throw e;at=await readPrivateJson(join(this.root,entry.name),32768,signal);}if(!at)throw Error('native_presence_changed');total+=Buffer.byteLength(JSON.stringify(at.value));if(total>1048576)throw Error('native_presence_limit');files.push({name:entry.name,...at});
|
|
32
|
+
}}finally{try{await dir.close();}catch(e){if((e as any)?.code!=='ERR_DIR_CLOSED')throw e;}}return files;
|
|
33
|
+
}
|
|
34
|
+
async list(signal?:AbortSignal){
|
|
35
|
+
const result:Readonly<NativePresence&{fresh:boolean}>[]=[];const now=this.#time();
|
|
36
|
+
for(const file of await this.#files('presence-',signal)){
|
|
37
|
+
const v=file.value;if(!object(v)||Object.keys(v).sort().join(',')!=='observation,observedAt,schema'||v.schema!=='fleet-native-presence/v1'||!validNativeObservation(v.observation)||!Number.isSafeInteger(v.observedAt)||v.observedAt>now+1000||file.name!=='presence-'+hash(v.observation.namespace)+'-'+v.observation.hostInstance+'.json')throw Error('native_presence_invalid');
|
|
38
|
+
result.push({...structuredClone(v as NativePresence),fresh:now-v.observedAt<TTL});
|
|
39
|
+
}return result;
|
|
40
|
+
}
|
|
41
|
+
async requestAttach(seen:NativePresence,owner:TargetEpoch,signal?:AbortSignal){
|
|
42
|
+
const selected={schema:seen.schema,observation:structuredClone(seen.observation),observedAt:seen.observedAt},target=structuredClone(owner),now=this.#time();if(selected.schema!=='fleet-native-presence/v1'||!validNativeObservation(selected.observation)||!validInstructionTarget(target)||!Number.isSafeInteger(selected.observedAt)||now-selected.observedAt>=TTL||selected.observedAt>now+1000)throw Error('native_presence_stale');
|
|
43
|
+
await privateDirectory(this.root);const current=await readPrivateJson(this.#path(selected.observation),32768,signal);if(!current||current.value?.schema!==selected.schema||JSON.stringify(current.value.observation)!==JSON.stringify(selected.observation)||!Number.isSafeInteger(current.value.observedAt)||current.value.observedAt<selected.observedAt||this.#time()-current.value.observedAt>=TTL||current.value.observedAt>this.#time()+1000)throw Error('native_presence_changed');
|
|
44
|
+
const request:NativeAttachRequest={schema:'fleet-native-attach-request/v1',id:randomUUID(),namespace:selected.observation.namespace,hostInstance:selected.observation.hostInstance,owner:target,createdAt:this.#time()};
|
|
45
|
+
const path=join(this.root,'request-'+request.id+'.json');if(this.#issued.size>=32)throw Error('native_presence_request_capacity');const identity=await writePrivateJson(path,request,{signal,expected:null});this.#issued.set(request.id,{path,identity});return request.id;
|
|
46
|
+
}
|
|
47
|
+
async requests(hostInstance:string,signal?:AbortSignal){
|
|
48
|
+
const result:{request:NativeAttachRequest;path:string;identity:string}[]=[];const now=this.#time();
|
|
49
|
+
for(const file of await this.#files('request-',signal)){
|
|
50
|
+
const v=file.value;if(!object(v)||Object.keys(v).sort().join(',')!=='createdAt,hostInstance,id,namespace,owner,schema'||v.schema!=='fleet-native-attach-request/v1'||!uuid(v.id)||!uuid(v.hostInstance)||!bootstrapNamespace(v.namespace)||!validInstructionTarget(v.owner)||!Number.isSafeInteger(v.createdAt)||v.createdAt>now+1000||file.name!=='request-'+v.id+'.json')throw Error('native_presence_request_invalid');
|
|
51
|
+
if(now-v.createdAt>=5000){await this.consume(join(this.root,file.name),file.identity).catch(()=>{});continue;}
|
|
52
|
+
if(v.hostInstance===hostInstance)result.push({request:structuredClone(v as NativeAttachRequest),path:join(this.root,file.name),identity:file.identity});
|
|
53
|
+
}return result;
|
|
54
|
+
}
|
|
55
|
+
async consume(path:string,expected:string){
|
|
56
|
+
if(!path.startsWith(this.root+'/')||!/^request-[a-f0-9-]{36}\.json$/.test(path.slice(this.root.length+1)))throw Error('native_presence_path');
|
|
57
|
+
const current=await lstat(path);if(privateFileIdentity(current)!==expected)throw Error('native_presence_changed');await unlink(path);
|
|
58
|
+
}
|
|
59
|
+
async cancelAttach(id:string){const issued=this.#issued.get(id);if(!issued)return;this.#issued.delete(id);try{await this.consume(issued.path,issued.identity);}catch(e){if((e as any)?.code!=='ENOENT')throw e;}}
|
|
60
|
+
async remove(observed:BootstrapPresence){const path=this.#path(observed),old=await readPrivateJson(path);if(!old)return;if(old.value?.observation?.hostInstance!==observed.hostInstance)throw Error('native_presence_changed');const at=await lstat(path);if(privateFileIdentity(at)!==old.identity)throw Error('native_presence_changed');await unlink(path);}
|
|
61
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import {constants,type BigIntStats} from 'node:fs';
|
|
2
|
+
import {lstat,open,type FileHandle} from 'node:fs/promises';
|
|
3
|
+
import {isAbsolute,normalize,resolve,join,dirname,basename,sep} from 'node:path';
|
|
4
|
+
import {createHash} from 'node:crypto';
|
|
5
|
+
|
|
6
|
+
export const codexProbeReaderVersion='codex-local-rollout-ack/v1';
|
|
7
|
+
export type ProbeCheckpoint=Readonly<{kind:typeof codexProbeReaderVersion}>;
|
|
8
|
+
export type LocalProbeAck=Readonly<{source:'local_codex_rollout_jsonl';readerVersion:typeof codexProbeReaderVersion;threadId:string;probeId:string;receiptId:string}>;
|
|
9
|
+
type Parent={path:string;identity:string};
|
|
10
|
+
type Entry={allowGroupWrite:boolean;file:FileHandle;path:string;threadId:string;identity:string;parents:Parent[];offset:number;skip:boolean;pending:Buffer;bytes:number;records:number;used:boolean;closed:boolean;signal:AbortSignal;cancel:AbortController;abandon?:()=>void;closing?:Promise<void>};
|
|
11
|
+
function fail(code:string):never{throw Error(code);}
|
|
12
|
+
const uuid=(v:unknown):v is string=>typeof v==='string'&&/^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/.test(v);
|
|
13
|
+
const identity=(s:BigIntStats)=>[s.dev,s.ino,s.uid,s.mode,s.nlink].join(':');
|
|
14
|
+
const parentIdentity=(s:BigIntStats)=>[s.dev,s.ino,s.uid,s.mode].join(':');
|
|
15
|
+
const object=(v:unknown):v is Record<string,any>=>!!v&&typeof v==='object'&&!Array.isArray(v);
|
|
16
|
+
const decoder=new TextDecoder('utf-8',{fatal:true});
|
|
17
|
+
|
|
18
|
+
/** Bounded local O_RDONLY reader, not a daemon/thread API or Desktop attestor.
|
|
19
|
+
* Never exposes transcript text. Caller obtains path from the exact metadata
|
|
20
|
+
* thread, separately checks notLoaded/versions/identity, and uses a fresh nonce.
|
|
21
|
+
* Only trusted server code constructs this reader; no model/tool path arguments.
|
|
22
|
+
* Filesystem/proc calls are not forcibly interruptible, but overdue evidence is
|
|
23
|
+
* never published. Strict ACK reads never repair permissions. Separate post-consent securing only removes group-write bits; no traversal fallback, content writes or watcher. */
|
|
24
|
+
export class CodexProbeTranscript {
|
|
25
|
+
readonly #home:string;readonly #sessions:string;readonly #uid:bigint;readonly #timeout:number;readonly #poll:number;
|
|
26
|
+
readonly #entries=new WeakMap<ProbeCheckpoint,Entry>();readonly #active=new Set<ProbeCheckpoint>();readonly #stop=new AbortController();
|
|
27
|
+
readonly #openingTasks=new Set<Promise<ProbeCheckpoint>>();readonly #closing=new Set<Promise<void>>();#opening=0;
|
|
28
|
+
constructor(options:{codexHome:string;timeoutMs?:number;pollMs?:number}){
|
|
29
|
+
if(typeof options?.codexHome!=='string'||options.codexHome.length>4096||/[\u0000-\u001f\u007f]/.test(options.codexHome)||!isAbsolute(options.codexHome)||resolve(options.codexHome)!==options.codexHome||options.codexHome===sep||typeof process.getuid!=='function')fail('probe_reader_options_invalid');
|
|
30
|
+
this.#home=options.codexHome;this.#sessions=join(this.#home,'sessions');this.#uid=BigInt(process.getuid());this.#timeout=options.timeoutMs??120000;this.#poll=options.pollMs??100;
|
|
31
|
+
if(!Number.isInteger(this.#timeout)||this.#timeout<1||this.#timeout>120000||!Number.isInteger(this.#poll)||this.#poll<1||this.#poll>1000)fail('probe_reader_options_invalid');
|
|
32
|
+
}
|
|
33
|
+
#check(signal:AbortSignal,deadline:number){if(signal.aborted||this.#stop.signal.aborted)fail('probe_reader_cancelled');if(performance.now()>=deadline)fail('probe_reader_timeout');}
|
|
34
|
+
#signal(signal:AbortSignal,extra?:AbortSignal){if(!(signal instanceof AbortSignal))fail('probe_reader_options_invalid');try{return AbortSignal.any([signal,this.#stop.signal,...(extra?[extra]:[])]);}catch{fail('probe_reader_options_invalid');}}
|
|
35
|
+
async #io<T>(signal:AbortSignal,deadline:number,fn:()=>Promise<T>){this.#check(signal,deadline);const value=await fn();this.#check(signal,deadline);return value;}
|
|
36
|
+
#directory(s:BigIntStats,owned:boolean,allowGroupWrite=false){if(!s.isDirectory()||s.isSymbolicLink()||(owned&&(s.uid!==this.#uid||(s.mode&(allowGroupWrite?0o002n:0o022n))!==0n)))fail('probe_reader_unsafe_path');}
|
|
37
|
+
#file(s:BigIntStats,allowGroupWrite=false){if(!s.isFile()||s.uid!==this.#uid||s.nlink!==1n||(s.mode&(allowGroupWrite?0o002n:0o022n))!==0n||s.size<1n||s.size>2n*1024n*1024n*1024n)fail('probe_reader_unsafe_file');}
|
|
38
|
+
async #parents(path:string,signal:AbortSignal,deadline:number,allowGroupWrite=false){
|
|
39
|
+
const parents:Parent[]=[];
|
|
40
|
+
for(let p=dirname(path);;p=dirname(p)){
|
|
41
|
+
if(parents.length>=64)fail('probe_reader_unsafe_path');const s=await this.#io(signal,deadline,()=>lstat(p,{bigint:true}));this.#directory(s,p===this.#home||p.startsWith(this.#home+sep),allowGroupWrite&&(p===this.#sessions||p.startsWith(this.#sessions+sep)));parents.push({path:p,identity:parentIdentity(s)});if(p===dirname(p))break;
|
|
42
|
+
}
|
|
43
|
+
return parents;
|
|
44
|
+
}
|
|
45
|
+
async #verify(e:Entry,signal:AbortSignal,deadline:number){
|
|
46
|
+
if(e.closed)fail('probe_reader_closed');
|
|
47
|
+
for(const parent of e.parents){const s=await this.#io(signal,deadline,()=>lstat(parent.path,{bigint:true}));this.#directory(s,parent.path===this.#home||parent.path.startsWith(this.#home+sep),e.allowGroupWrite&&(parent.path===this.#sessions||parent.path.startsWith(this.#sessions+sep)));if(parentIdentity(s)!==parent.identity)fail('probe_reader_changed');}
|
|
48
|
+
const at=await this.#io(signal,deadline,()=>lstat(e.path,{bigint:true})),held=await this.#io(signal,deadline,()=>e.file.stat({bigint:true}));this.#file(at,e.allowGroupWrite);this.#file(held,e.allowGroupWrite);
|
|
49
|
+
if(identity(at)!==e.identity||identity(held)!==e.identity||held.size<BigInt(e.offset))fail('probe_reader_changed');return Number(held.size);
|
|
50
|
+
}
|
|
51
|
+
checkpoint(path:string,threadId:string,signal:AbortSignal):Promise<ProbeCheckpoint>{
|
|
52
|
+
return this.#acquire(path,threadId,signal,false);
|
|
53
|
+
}
|
|
54
|
+
#acquire(path:string,threadId:string,signal:AbortSignal,allowGroupWrite:boolean){
|
|
55
|
+
const work=this.#checkpoint(path,threadId,signal,allowGroupWrite);this.#openingTasks.add(work);void work.then(()=>this.#openingTasks.delete(work),()=>this.#openingTasks.delete(work));return work;
|
|
56
|
+
}
|
|
57
|
+
async #checkpoint(path:string,threadId:string,signal:AbortSignal,allowGroupWrite=false):Promise<ProbeCheckpoint>{
|
|
58
|
+
if(typeof path!=='string'||path.length>4096||/[\u0000-\u001f\u007f]/.test(path)||!isAbsolute(path)||normalize(path)!==path||!path.startsWith(this.#sessions+sep)||!uuid(threadId)||!basename(path).startsWith('rollout-')||!basename(path).endsWith('-'+threadId+'.jsonl')||this.#active.size+this.#closing.size+this.#opening>=16)fail('probe_reader_unsafe_path');
|
|
59
|
+
const scoped=this.#signal(signal),deadline=performance.now()+this.#timeout;this.#check(scoped,deadline);this.#opening++;
|
|
60
|
+
let file:FileHandle|undefined;
|
|
61
|
+
try{
|
|
62
|
+
const parents=await this.#parents(path,scoped,deadline,allowGroupWrite),before=await this.#io(scoped,deadline,()=>lstat(path,{bigint:true}));this.#file(before,allowGroupWrite);
|
|
63
|
+
// Acquisition assigns the handle before checking an overdue/cancelled result.
|
|
64
|
+
this.#check(scoped,deadline);file=await open(path,constants.O_RDONLY|constants.O_NOFOLLOW|constants.O_NONBLOCK);this.#check(scoped,deadline);
|
|
65
|
+
const held=await this.#io(scoped,deadline,()=>file!.stat({bigint:true}));this.#file(held,allowGroupWrite);if(identity(held)!==identity(before))fail('probe_reader_changed');
|
|
66
|
+
const cancel=new AbortController();
|
|
67
|
+
const e:Entry={allowGroupWrite,file,path,threadId,identity:identity(held),parents,offset:Number(held.size),skip:false,pending:Buffer.alloc(0),bytes:0,records:0,used:false,closed:false,signal:scoped,cancel};
|
|
68
|
+
await this.#verify(e,scoped,deadline);
|
|
69
|
+
const head=Buffer.alloc(Math.min(Number(held.size),256*1024));const result=await this.#io(scoped,deadline,()=>file!.read(head,0,head.length,0));const first=head.subarray(0,result.bytesRead),end=first.indexOf(10);if(end<0)fail('probe_reader_invalid_header');
|
|
70
|
+
let metadata:unknown;try{metadata=JSON.parse(decoder.decode(first.subarray(0,end)));}catch{fail('probe_reader_invalid_header');}
|
|
71
|
+
if(!object(metadata)||metadata.type!=='session_meta'||!object(metadata.payload)||metadata.payload.id!==threadId)fail('probe_reader_thread_mismatch');
|
|
72
|
+
const last=Buffer.alloc(1);await this.#io(scoped,deadline,()=>file!.read(last,0,1,e.offset-1));e.skip=last[0]!==10;
|
|
73
|
+
await this.#verify(e,scoped,deadline);this.#check(scoped,deadline);
|
|
74
|
+
const token:ProbeCheckpoint=Object.freeze({kind:codexProbeReaderVersion});this.#entries.set(token,e);this.#active.add(token);e.abandon=()=>{void this.close(token);};e.signal.addEventListener('abort',e.abandon,{once:true});file=undefined;return token;
|
|
75
|
+
}catch(error){if(error instanceof Error&&/^probe_reader_[a-z_]+$/.test(error.message))throw error;return fail('probe_reader_io_failed');}
|
|
76
|
+
finally{if(file)await file.close().catch(()=>{});this.#opening--;}
|
|
77
|
+
}
|
|
78
|
+
/** Read-only preparation accepts repairable group-write bits, never ACK evidence. */
|
|
79
|
+
async checkCapability(path:string,threadId:string,signal:AbortSignal){
|
|
80
|
+
const token=await this.#acquire(path,threadId,signal,true);await this.close(token);
|
|
81
|
+
}
|
|
82
|
+
/** Called only after native Pi consent. Tightens exact owned session ancestors
|
|
83
|
+
* and file via no-follow pinned handles; never recursive and never adds a bit.
|
|
84
|
+
* A partial failure is not rolled back by widening permissions. */
|
|
85
|
+
async securePermissions(path:string,threadId:string,signal:AbortSignal,guard:()=>void){
|
|
86
|
+
guard();const token=await this.#acquire(path,threadId,signal,true),e=this.#entries.get(token)!,deadline=performance.now()+this.#timeout;
|
|
87
|
+
try{
|
|
88
|
+
for(const parent of [...e.parents].reverse()){
|
|
89
|
+
if(parent.path!==this.#sessions&&!parent.path.startsWith(this.#sessions+sep))continue;
|
|
90
|
+
guard();await this.#verify(e,signal,deadline);
|
|
91
|
+
const handle=await open(parent.path,constants.O_RDONLY|constants.O_NOFOLLOW|constants.O_DIRECTORY);
|
|
92
|
+
try{
|
|
93
|
+
const before=await handle.stat({bigint:true});if(parentIdentity(before)!==parent.identity)fail('probe_reader_changed');
|
|
94
|
+
guard();this.#check(signal,deadline);
|
|
95
|
+
if(before.mode&0o020n)await handle.chmod(Number(before.mode&0o7777n&~0o020n));
|
|
96
|
+
parent.identity=parentIdentity(await handle.stat({bigint:true}));
|
|
97
|
+
}finally{await handle.close();}
|
|
98
|
+
guard();await this.#verify(e,signal,deadline);
|
|
99
|
+
}
|
|
100
|
+
guard();await this.#verify(e,signal,deadline);const before=await e.file.stat({bigint:true});
|
|
101
|
+
guard();this.#check(signal,deadline);if(before.mode&0o020n)await e.file.chmod(Number(before.mode&0o7777n&~0o020n));
|
|
102
|
+
e.identity=identity(await e.file.stat({bigint:true}));e.allowGroupWrite=false;
|
|
103
|
+
guard();await this.#verify(e,signal,deadline);
|
|
104
|
+
}finally{await this.close(token);}
|
|
105
|
+
}
|
|
106
|
+
#match(e:Entry,line:Buffer,probeId:string):LocalProbeAck|undefined{
|
|
107
|
+
if(++e.records>4096||line.length>65536)fail('probe_reader_limit');if(!line.length)return;
|
|
108
|
+
let record:unknown;try{record=JSON.parse(decoder.decode(line));}catch{fail('probe_reader_invalid_record');}
|
|
109
|
+
if(!object(record)||record.type!=='response_item'||!object(record.payload))return;
|
|
110
|
+
const p=record.payload;if(p.type!=='message'||p.role!=='assistant'||p.phase!=='final_answer'||!Array.isArray(p.content)||p.content.length!==1)return;
|
|
111
|
+
const part=p.content[0];if(!object(part)||part.type!=='output_text'||part.text!=='FLEET_PROBE_ACK '+probeId)return;
|
|
112
|
+
return {source:'local_codex_rollout_jsonl',readerVersion:codexProbeReaderVersion,threadId:e.threadId,probeId,receiptId:'rollout:'+createHash('sha256').update(line).digest('hex')};
|
|
113
|
+
}
|
|
114
|
+
async #sleep(signal:AbortSignal,ms:number){await new Promise<void>((resolve,reject)=>{const abort=()=>{clearTimeout(timer);signal.removeEventListener('abort',abort);reject(Error('probe_reader_cancelled'));};const timer=setTimeout(()=>{signal.removeEventListener('abort',abort);resolve();},ms);signal.addEventListener('abort',abort,{once:true});if(signal.aborted)abort();});}
|
|
115
|
+
async waitForAck(token:ProbeCheckpoint,probeId:string,signal:AbortSignal):Promise<LocalProbeAck>{
|
|
116
|
+
const e=this.#entries.get(token);if(!e||e.closed||e.used||!uuid(probeId))fail('probe_reader_checkpoint_invalid');e.used=true;
|
|
117
|
+
try{
|
|
118
|
+
const scoped=AbortSignal.any([this.#signal(signal,e.cancel.signal),e.signal]),deadline=performance.now()+this.#timeout;
|
|
119
|
+
while(true){
|
|
120
|
+
this.#check(scoped,deadline);const size=await this.#verify(e,scoped,deadline);
|
|
121
|
+
if(size>e.offset){
|
|
122
|
+
if(e.bytes>=2*1024*1024)fail('probe_reader_limit');const chunk=Buffer.alloc(Math.min(65536,size-e.offset,2*1024*1024-e.bytes));
|
|
123
|
+
const got=await this.#io(scoped,deadline,()=>e.file.read(chunk,0,chunk.length,e.offset));if(!got.bytesRead)fail('probe_reader_changed');e.offset+=got.bytesRead;e.bytes+=got.bytesRead;
|
|
124
|
+
let bytes=Buffer.concat([e.pending,chunk.subarray(0,got.bytesRead)]),end:number;
|
|
125
|
+
while((end=bytes.indexOf(10))>=0){this.#check(scoped,deadline);const line=bytes.subarray(0,end);bytes=bytes.subarray(end+1);if(e.skip){e.skip=false;continue;}const ack=this.#match(e,line,probeId);if(ack){await this.#verify(e,scoped,deadline);this.#check(scoped,deadline);return ack;}}
|
|
126
|
+
if(bytes.length>65536)fail('probe_reader_limit');e.pending=Buffer.from(bytes);continue;
|
|
127
|
+
}
|
|
128
|
+
await this.#sleep(scoped,Math.max(1,Math.min(this.#poll,deadline-performance.now())));
|
|
129
|
+
}
|
|
130
|
+
}catch(error){if(error instanceof Error&&/^probe_reader_[a-z_]+$/.test(error.message))throw error;fail('probe_reader_io_failed');}
|
|
131
|
+
finally{await this.close(token);}
|
|
132
|
+
}
|
|
133
|
+
async close(token:ProbeCheckpoint){const e=this.#entries.get(token);if(!e)return;if(e.closing)return e.closing;e.closed=true;if(e.abandon)e.signal.removeEventListener('abort',e.abandon);e.cancel.abort();this.#active.delete(token);let work!:Promise<void>;work=e.file.close().catch(()=>{}).finally(()=>{this.#entries.delete(token);this.#closing.delete(work);});e.closing=work;this.#closing.add(work);return work;}
|
|
134
|
+
async stop(){this.#stop.abort();await Promise.allSettled([...this.#openingTasks]);await Promise.all([...this.#active].map(token=>this.close(token)));await Promise.all([...this.#closing]);}
|
|
135
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {constants,lstatSync,openSync,fstatSync,readSync,closeSync,type Stats} from 'node:fs';
|
|
2
|
+
import {dirname} from 'node:path';
|
|
3
|
+
import {readPrivateJson,writePrivateJson,privateFileIdentity} from './codex-bootstrap-files.ts';
|
|
4
|
+
import type {ConversationKey,TargetEpoch,Right} from './fleet-codex-allowlist.ts';
|
|
5
|
+
import {targetKey} from '../../../harnesses/lib/fleet-target-identity.ts';
|
|
6
|
+
|
|
7
|
+
export type SendState={storeId:string;namespace:ConversationKey;revision:number;bindings:{alias:string;target:TargetEpoch;rights:Right[];status:string;expiresAt?:number}[]};
|
|
8
|
+
type Step={from:number;to:number;alias:string;send:boolean;before:string;after:string};
|
|
9
|
+
type Lineage={schema:'fleet-send-lineage/v1';storeId:string;namespace:ConversationKey;steps:Step[]};
|
|
10
|
+
const limit=64,maxBytes=32768,same=(a:unknown,b:unknown)=>JSON.stringify(a)===JSON.stringify(b);
|
|
11
|
+
const keys=(v:any,names:string[])=>v&&typeof v==='object'&&!Array.isArray(v)&&same(Object.keys(v).sort(),[...names].sort());
|
|
12
|
+
const digest=(v:unknown)=>typeof v==='string'&&/^[a-f0-9]{64}$/.test(v);
|
|
13
|
+
function decode(value:unknown,state:SendState):Lineage{
|
|
14
|
+
const v=value as Lineage;
|
|
15
|
+
if(!keys(v,['schema','storeId','namespace','steps'])||v.schema!=='fleet-send-lineage/v1'||v.storeId!==state.storeId||!same(v.namespace,state.namespace)||!Array.isArray(v.steps)||v.steps.length>limit)throw Error('send_lineage_invalid');
|
|
16
|
+
let previous=-1;
|
|
17
|
+
for(const s of v.steps){if(!keys(s,['from','to','alias','send','before','after'])||!Number.isSafeInteger(s.from)||s.from<0||s.from>=Number.MAX_SAFE_INTEGER||s.to!==s.from+1||s.from<=previous||typeof s.alias!=='string'||s.alias.length<1||s.alias.length>1024||typeof s.send!=='boolean'||!digest(s.before)||!digest(s.after))throw Error('send_lineage_invalid');previous=s.from;}
|
|
18
|
+
return v;
|
|
19
|
+
}
|
|
20
|
+
function changed<T extends SendState>(before:T,alias:string,send:boolean):T{
|
|
21
|
+
const next=structuredClone(before),b=next.bindings.find(b=>b.alias===alias);
|
|
22
|
+
if(!b||b.status!=='active'||b.rights[0]!=='read'||next.revision>=Number.MAX_SAFE_INTEGER)throw Error('send_lineage_invalid');
|
|
23
|
+
b.rights=['read',...(send?['send' as const]:[]),...(b.rights.includes('approve')?['approve' as const]:[])];next.revision++;return next;
|
|
24
|
+
}
|
|
25
|
+
/** Prepare the exact send-only proof before policy rename, under its existing
|
|
26
|
+
* lock. A future/failed write proves nothing until that after-state is current. */
|
|
27
|
+
export async function prepareSendLineage<T extends SendState>(path:string,before:T,after:T,alias:string,send:boolean,hash:(s:T)=>string,signal?:AbortSignal){
|
|
28
|
+
const next=changed(before,alias,send);if(!same(next,after))return;
|
|
29
|
+
const prior=await readPrivateJson(path,maxBytes,signal);
|
|
30
|
+
const lineage:Lineage=prior?decode(prior.value,before):{schema:'fleet-send-lineage/v1',storeId:before.storeId,namespace:structuredClone(before.namespace),steps:[]};
|
|
31
|
+
// Supersede an uncommitted future proof. Past gaps remain gaps, never authority.
|
|
32
|
+
lineage.steps=lineage.steps.filter(s=>s.from<before.revision);
|
|
33
|
+
lineage.steps.push({from:before.revision,to:after.revision,alias,send,before:hash(before),after:hash(after)});lineage.steps=lineage.steps.slice(-limit);
|
|
34
|
+
while(Buffer.byteLength(JSON.stringify(lineage)+'\n')>maxBytes&&lineage.steps.length>1)lineage.steps.shift();
|
|
35
|
+
await writePrivateJson(path,lineage,{signal,expected:prior?.identity??null});
|
|
36
|
+
}
|
|
37
|
+
/** A failed explicit write can leave a future proof. An equivalent generic
|
|
38
|
+
* reconnect/no-op must retire it before publication, including before a later
|
|
39
|
+
* explicit send can extend the chain. Real read/approve revocations cannot
|
|
40
|
+
* match a send-only state and never depend on optional continuity metadata. */
|
|
41
|
+
export async function retireFutureSendLineage<T extends SendState>(path:string,before:T,after:T,signal?:AbortSignal){
|
|
42
|
+
const couldMatch=before.bindings.some(b=>b.status==='active'&&b.rights[0]==='read'&&[false,true].some(send=>same(changed(before,b.alias,send),after)));
|
|
43
|
+
if(!couldMatch)return;
|
|
44
|
+
const prior=await readPrivateJson(path,maxBytes,signal);if(!prior)return;
|
|
45
|
+
const lineage=decode(prior.value,before),steps=lineage.steps.filter(s=>s.from<before.revision);if(steps.length===lineage.steps.length)return;
|
|
46
|
+
lineage.steps=steps;await writePrivateJson(path,lineage,{signal,expected:prior.identity});
|
|
47
|
+
}
|
|
48
|
+
function readNow(path:string):unknown{
|
|
49
|
+
const uid=process.getuid?.();if(uid===undefined)throw Error('send_lineage_unsafe');
|
|
50
|
+
for(let p=dirname(path);;p=dirname(p)){const s=lstatSync(p);if(!s.isDirectory()||s.isSymbolicLink()||(s.uid!==uid&&s.uid!==0)||((s.mode&0o022)!==0&&!(s.uid===0&&(s.mode&0o1000)!==0))||(p===dirname(path)&&(s.uid!==uid||(s.mode&0o077)!==0)))throw Error('send_lineage_unsafe');if(p===dirname(p))break;}
|
|
51
|
+
const parentStamp=(s:Stats)=>[s.dev,s.ino,s.uid,s.mode].join(':');
|
|
52
|
+
const parent=parentStamp(lstatSync(dirname(path))),before=lstatSync(path);
|
|
53
|
+
const safe=(s:Stats)=>{if(!s.isFile()||s.isSymbolicLink()||s.uid!==uid||(s.mode&0o077)!==0||s.nlink!==1||s.size<1||s.size>maxBytes)throw Error('send_lineage_unsafe');};safe(before);
|
|
54
|
+
const fd=openSync(path,constants.O_RDONLY|constants.O_NOFOLLOW|constants.O_NONBLOCK);
|
|
55
|
+
try{const held=fstatSync(fd);safe(held);if(privateFileIdentity(held)!==privateFileIdentity(before))throw Error('send_lineage_changed');const bytes=Buffer.alloc(held.size+1);let count=0;
|
|
56
|
+
while(count<bytes.length){const n=readSync(fd,bytes,count,bytes.length-count,null);if(!n)break;count+=n;}
|
|
57
|
+
if(count!==held.size||privateFileIdentity(fstatSync(fd))!==privateFileIdentity(held)||privateFileIdentity(lstatSync(path))!==privateFileIdentity(held)||parentStamp(lstatSync(dirname(path)))!==parent)throw Error('send_lineage_changed');
|
|
58
|
+
return JSON.parse(new TextDecoder('utf-8',{fatal:true}).decode(bytes.subarray(0,count)));
|
|
59
|
+
}finally{closeSync(fd);}
|
|
60
|
+
}
|
|
61
|
+
/** Caller pins both policy reads and an issued starting state. Every intermediate
|
|
62
|
+
* state is reconstructed; endpoint equality cannot hide revoke/re-enroll ABA. */
|
|
63
|
+
export function verifySendLineage<T extends SendState>(path:string,before:T,after:T,owner:TargetEpoch,hash:(s:T)=>string):boolean{
|
|
64
|
+
try{const anchor=before.bindings.find(b=>targetKey(b.target)===targetKey(owner));if(!anchor||anchor.status!=='active'||anchor.rights[0]!=='read'||after.revision<=before.revision)return false;
|
|
65
|
+
const lineage=decode(readNow(path),before);let state=structuredClone(before);
|
|
66
|
+
for(const step of lineage.steps){if(step.from<state.revision)continue;if(state.revision===after.revision)break;
|
|
67
|
+
if(step.from!==state.revision||step.alias!==anchor.alias||step.before!==hash(state))return false;
|
|
68
|
+
state=changed(state,step.alias,step.send);if(step.to!==state.revision||step.after!==hash(state))return false;
|
|
69
|
+
}
|
|
70
|
+
return same(state,after);
|
|
71
|
+
}catch{return false;}
|
|
72
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import {createConnection} from 'node:net';
|
|
2
|
+
import {lstatSync,realpathSync,readlinkSync} from 'node:fs';
|
|
3
|
+
import {dirname,isAbsolute,resolve} from 'node:path';
|
|
4
|
+
import {randomUUID} from 'node:crypto';
|
|
5
|
+
import {CodexDaemonObserver,webSocket,type WsConnection} from './codex-daemon-observer.ts';
|
|
6
|
+
import {compareCodexVersions,codexDaemonVersionFromUserAgent} from '../../../harnesses/lib/codex-compat.ts';
|
|
7
|
+
|
|
8
|
+
export type QueueMethod='thread/read'|'thread/loaded/list'|'thread/queue/list'|'thread/queue/add';
|
|
9
|
+
export class QueueRpcError extends Error {
|
|
10
|
+
readonly code:string;readonly attempted:boolean;
|
|
11
|
+
constructor(code:string,attempted=false){super(code);this.code=code;this.attempted=attempted;}
|
|
12
|
+
}
|
|
13
|
+
/** Connect-only WS-over-Unix client. Never CLI queue, daemon start, resume or auth-file discovery. */
|
|
14
|
+
export class CodexUnixQueueRpc {
|
|
15
|
+
private readonly path:string;
|
|
16
|
+
private readonly timeout:number;
|
|
17
|
+
constructor(options:{socketPath:string;timeoutMs?:number}){
|
|
18
|
+
if(!isAbsolute(options.socketPath)||options.socketPath.length>100||/[:?#%\\\u0000-\u0020]/.test(options.socketPath))throw new QueueRpcError('INVALID_SOCKET_PATH');
|
|
19
|
+
this.path=resolve(options.socketPath);this.timeout=options.timeoutMs??3000;
|
|
20
|
+
if(!Number.isSafeInteger(this.timeout)||this.timeout<1||this.timeout>10000)throw new QueueRpcError('INVALID_TIMEOUT');
|
|
21
|
+
}
|
|
22
|
+
private endpoint(){
|
|
23
|
+
const uid=process.getuid?.();
|
|
24
|
+
const privateParent=(path:string)=>{
|
|
25
|
+
const parent=dirname(path),directory=lstatSync(parent);
|
|
26
|
+
if(!directory.isDirectory()||directory.isSymbolicLink()||directory.uid!==uid||(directory.mode&0o077)!==0||realpathSync(parent)!==parent)throw new QueueRpcError('UNSAFE_SOCKET');
|
|
27
|
+
};
|
|
28
|
+
privateParent(this.path);
|
|
29
|
+
const alias=lstatSync(this.path);
|
|
30
|
+
if(alias.uid!==uid)throw new QueueRpcError('UNSAFE_SOCKET');
|
|
31
|
+
// The managed daemon's official control path is a user-owned symlink in a
|
|
32
|
+
// private directory. Allow one hop only, to a separately checked private socket.
|
|
33
|
+
const path=alias.isSymbolicLink()?resolve(dirname(this.path),readlinkSync(this.path)):this.path;
|
|
34
|
+
if(path.length>100||/[:?#%\\\u0000-\u0020]/.test(path))throw new QueueRpcError('UNSAFE_SOCKET');
|
|
35
|
+
privateParent(path);
|
|
36
|
+
const socket=lstatSync(path);
|
|
37
|
+
if(!socket.isSocket()||socket.isSymbolicLink()||socket.uid!==uid||(socket.mode&0o022)!==0||realpathSync(path)!==path)throw new QueueRpcError('UNSAFE_SOCKET');
|
|
38
|
+
return {path,epoch:`${alias.dev}:${alias.ino}:${path}:${socket.dev}:${socket.ino}`};
|
|
39
|
+
}
|
|
40
|
+
request(method:QueueMethod,params:unknown,options:{signal?:AbortSignal;beforeWrite?:()=>void;pin?:{daemonVersion:string;socketEpoch:string}}={}):Promise<unknown>{
|
|
41
|
+
// Opt-in probe/bootstrap pin. Does not admit a new tuple or attest Desktop.
|
|
42
|
+
options={...options,...(options.pin?{pin:{...options.pin}}:{})};const pin=options.pin,deadline=performance.now()+this.timeout;
|
|
43
|
+
if(pin&&(compareCodexVersions(pin.daemonVersion,pin.daemonVersion)!==0||typeof pin.socketEpoch!=='string'||!/^codex-initialize\/v1:[a-f0-9]{64}$/.test(pin.socketEpoch)))return Promise.reject(new QueueRpcError('INVALID_PIN'));
|
|
44
|
+
const epochObserver=pin?new CodexDaemonObserver({socketPath:this.path}):undefined;
|
|
45
|
+
const pinError=()=>{if(!pin)return undefined;if(options.signal?.aborted)return 'CANCELLED';if(performance.now()>=deadline)return 'TIMEOUT';try{if(epochObserver!.socketEpoch(options.signal??new AbortController().signal)!==pin.socketEpoch)return 'SOCKET_CHANGED';}catch{return 'SOCKET_CHANGED';}return performance.now()>=deadline?'TIMEOUT':undefined;};
|
|
46
|
+
if(pin)try{params=structuredClone(params);}catch{return Promise.reject(new QueueRpcError('REQUEST_LIMIT'));}
|
|
47
|
+
const initialPinError=pinError();if(initialPinError)return Promise.reject(new QueueRpcError(initialPinError));
|
|
48
|
+
if(!['thread/read','thread/loaded/list','thread/queue/list','thread/queue/add'].includes(method))return Promise.reject(new QueueRpcError('METHOD_NOT_ALLOWED'));
|
|
49
|
+
let endpoint:ReturnType<CodexUnixQueueRpc['endpoint']>;
|
|
50
|
+
try{endpoint=this.endpoint();}catch{return Promise.reject(new QueueRpcError('DAEMON_UNAVAILABLE'));}
|
|
51
|
+
if(options.signal?.aborted)return Promise.reject(new QueueRpcError('CANCELLED'));
|
|
52
|
+
return new Promise((resolveRequest,reject)=>{
|
|
53
|
+
let ws:WsConnection|undefined,timer:ReturnType<typeof setTimeout>|undefined,done=false,attempted=false,initialized=false,messages=0;
|
|
54
|
+
const initializeId=randomUUID(),requestId=randomUUID();
|
|
55
|
+
const finish=(error?:string,result?:unknown)=>{
|
|
56
|
+
if(done)return;done=true;clearTimeout(timer);options.signal?.removeEventListener('abort',abort);
|
|
57
|
+
// terminate during CONNECTING may emit an asynchronous error: keep it handled.
|
|
58
|
+
ws?.on('error',()=>{});ws?.removeAllListeners('message');ws?.terminate();
|
|
59
|
+
if(error)reject(new QueueRpcError(error,attempted));else resolveRequest(result);
|
|
60
|
+
};
|
|
61
|
+
const abort=()=>finish('CANCELLED');
|
|
62
|
+
options.signal?.addEventListener('abort',abort,{once:true});
|
|
63
|
+
try{
|
|
64
|
+
ws=new (webSocket())('ws+unix://'+endpoint.path+':/',{createConnection:()=>createConnection(endpoint.path),maxPayload:32768,perMessageDeflate:false,followRedirects:false,handshakeTimeout:this.timeout});
|
|
65
|
+
timer=setTimeout(()=>finish('TIMEOUT'),this.timeout);
|
|
66
|
+
ws.on('open',()=>{
|
|
67
|
+
try{const error=pinError();if(error){finish(error);return;}if(this.endpoint().epoch!==endpoint.epoch||options.signal?.aborted){finish('SOCKET_CHANGED');return;}
|
|
68
|
+
ws!.send(JSON.stringify({id:initializeId,method:'initialize',params:{clientInfo:{name:'agent_fleet_queue_bridge',title:'Fleet queue bridge',version:'1'},capabilities:{experimentalApi:true}}}));
|
|
69
|
+
}catch{finish('INITIALIZE_FAILED');}
|
|
70
|
+
});
|
|
71
|
+
ws.on('message',(data:Buffer,isBinary:boolean)=>{
|
|
72
|
+
if(done)return;if(++messages>256||!Buffer.isBuffer(data)||data.length>32768){finish('RESPONSE_LIMIT');return;}
|
|
73
|
+
if(isBinary){finish('INVALID_RESPONSE');return;}
|
|
74
|
+
let response:any;try{response=JSON.parse(new TextDecoder('utf-8',{fatal:true}).decode(data));}catch{finish('INVALID_JSON');return;}
|
|
75
|
+
if(!response||typeof response!=='object'||Array.isArray(response)){finish('INVALID_RESPONSE');return;}
|
|
76
|
+
if(Object.hasOwn(response,'method'))return;
|
|
77
|
+
if(!initialized&&response.id===initializeId){
|
|
78
|
+
if(Object.hasOwn(response,'error')||!response.result||typeof response.result.userAgent!=='string'){finish('INITIALIZE_REJECTED');return;}
|
|
79
|
+
if(pin){if(codexDaemonVersionFromUserAgent(response.result.userAgent)!==pin.daemonVersion){finish('VERSION_CHANGED');return;}const error=pinError();if(error){finish(error);return;}}
|
|
80
|
+
initialized=true;
|
|
81
|
+
try{
|
|
82
|
+
ws!.send(JSON.stringify({method:'initialized',params:{}}));
|
|
83
|
+
if(this.endpoint().epoch!==endpoint.epoch||options.signal?.aborted){finish('SOCKET_CHANGED');return;}
|
|
84
|
+
const packet=JSON.stringify({id:requestId,method,params});if(Buffer.byteLength(packet)>16384){finish('REQUEST_LIMIT');return;}
|
|
85
|
+
options.beforeWrite?.();
|
|
86
|
+
if(options.signal?.aborted){finish('CANCELLED');return;}
|
|
87
|
+
if(this.endpoint().epoch!==endpoint.epoch){finish('SOCKET_CHANGED');return;}
|
|
88
|
+
const error=pinError();if(error){finish(error);return;}
|
|
89
|
+
attempted=true;ws!.send(packet);
|
|
90
|
+
}catch{finish('PREWRITE_OR_SEND_FAILED');}
|
|
91
|
+
}else if(initialized&&response.id===requestId){
|
|
92
|
+
const error=pinError();if(error){finish(error);return;}
|
|
93
|
+
if(Object.hasOwn(response,'error'))finish('RPC_REJECTED');else if(!Object.hasOwn(response,'result'))finish('INVALID_RESPONSE');else finish(undefined,response.result);
|
|
94
|
+
}
|
|
95
|
+
// Notifications/server requests are never answered with automatic approvals.
|
|
96
|
+
});
|
|
97
|
+
ws.on('error',()=>finish('CONNECTION_ERROR'));ws.on('close',()=>finish('CONNECTION_CLOSED'));
|
|
98
|
+
}catch{finish('CONNECTION_ERROR');}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|