@chankov/agent-fleet 2.2.2 → 2.2.3
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/harnesses/agent-hub/README.md +18 -2
- 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/index.ts +100 -17
- package/.pi/harnesses/agent-hub/no-progress.ts +133 -19
- 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/policy/work-mode.ts +2 -1
- package/.pi/harnesses/agent-hub/process-obligations.ts +1 -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/tools/action-executors.ts +24 -3
- package/.pi/harnesses/agent-hub/tools/context.ts +2 -0
- package/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +60 -17
- 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/index.ts +7 -5
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/harnesses/lib/bash-policy-analysis.ts +9 -1
- package/.pi/harnesses/lib/exact-permission-port.ts +6 -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/CHANGELOG.md +19 -0
- package/docs/hub-task-continuation.md +23 -0
- package/install-manifest.json +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
Capability,
|
|
3
|
+
EvaluateRequest,
|
|
4
|
+
JsonText,
|
|
5
|
+
ProviderEvaluation,
|
|
6
|
+
System1Answer,
|
|
7
|
+
System1Availability,
|
|
8
|
+
System1Provider,
|
|
9
|
+
System1Question,
|
|
10
|
+
System1Result,
|
|
11
|
+
System1Service,
|
|
12
|
+
} from "./contracts.ts";
|
|
13
|
+
import { resolveSystem1Readiness, validateSystem1Config } from "./config.js";
|
|
14
|
+
import { createJevProvider, type JevTransport } from "./jev.ts";
|
|
15
|
+
|
|
16
|
+
export const DEFAULT_SYSTEM1_TIMEOUT_MS = 2_000;
|
|
17
|
+
|
|
18
|
+
export interface CreateSystem1ServiceOptions {
|
|
19
|
+
provider?: System1Provider;
|
|
20
|
+
availability?: System1Availability;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
24
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function isJsonValue(value: unknown, seen: WeakSet<object>): boolean {
|
|
28
|
+
if (value === null || typeof value === "string" || typeof value === "boolean") return true;
|
|
29
|
+
if (typeof value === "number") return Number.isFinite(value);
|
|
30
|
+
if (typeof value !== "object") return false;
|
|
31
|
+
if (seen.has(value)) return false;
|
|
32
|
+
seen.add(value);
|
|
33
|
+
const valid = Array.isArray(value)
|
|
34
|
+
? value.every((item) => isJsonValue(item, seen))
|
|
35
|
+
: Object.getPrototypeOf(value) === Object.prototype &&
|
|
36
|
+
Object.values(value).every((item) => isJsonValue(item, seen));
|
|
37
|
+
seen.delete(value);
|
|
38
|
+
return valid;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function isJsonText(value: unknown): value is JsonText {
|
|
42
|
+
return (typeof value === "string" || Array.isArray(value) || isRecord(value)) &&
|
|
43
|
+
isJsonValue(value, new WeakSet<object>());
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function validId(value: unknown): value is string {
|
|
47
|
+
return typeof value === "string" && value.length > 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function validateQuestion(question: unknown): question is System1Question {
|
|
51
|
+
if (!isRecord(question) || !validId(question.id) || !isJsonText(question.instructions)) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
if (question.type === "choice") {
|
|
55
|
+
if (!isRecord(question.options)) return false;
|
|
56
|
+
const entries = Object.entries(question.options);
|
|
57
|
+
return entries.length >= 2 && entries.length <= 255 && entries.every(
|
|
58
|
+
([key, value]) => validId(key) && (value === null || isJsonText(value)),
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
if (question.type === "predicate") {
|
|
62
|
+
if (question.criteria === undefined) return true;
|
|
63
|
+
if (!isRecord(question.criteria)) return false;
|
|
64
|
+
const criteria = question.criteria;
|
|
65
|
+
const keys = Object.keys(criteria);
|
|
66
|
+
return keys.every((key) => (key === "true" || key === "false") && isJsonText(criteria[key]));
|
|
67
|
+
}
|
|
68
|
+
if (question.type === "ordinal") {
|
|
69
|
+
return Array.isArray(question.levels) &&
|
|
70
|
+
question.levels.length >= 2 &&
|
|
71
|
+
question.levels.length <= 10 &&
|
|
72
|
+
question.levels.every((level) => typeof level === "string" && level.length > 0);
|
|
73
|
+
}
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function validateRequest(request: EvaluateRequest): boolean {
|
|
78
|
+
if (!isJsonText(request.state)) return false;
|
|
79
|
+
if (!Array.isArray(request.questions) || request.questions.length === 0) return false;
|
|
80
|
+
if (typeof request.questionSetVersion !== "string" || request.questionSetVersion.length === 0) return false;
|
|
81
|
+
if (request.timeoutMs !== undefined && (!Number.isFinite(request.timeoutMs) || request.timeoutMs <= 0)) return false;
|
|
82
|
+
if (!request.questions.every(validateQuestion)) return false;
|
|
83
|
+
const ids = request.questions.map((question) => question.id);
|
|
84
|
+
return new Set(ids).size === ids.length;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function isProbability(value: unknown): value is number {
|
|
88
|
+
return typeof value === "number" && Number.isFinite(value) && value >= 0 && value <= 1;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function validDistribution(value: unknown, expectedKeys: readonly string[]): value is Record<string, number> {
|
|
92
|
+
if (!isRecord(value)) return false;
|
|
93
|
+
const actualKeys = Object.keys(value);
|
|
94
|
+
if (actualKeys.length !== expectedKeys.length || expectedKeys.some((key) => !actualKeys.includes(key))) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
return actualKeys.map((key) => value[key]).every(isProbability);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function validUncertainty(answer: System1Answer): boolean {
|
|
101
|
+
const uncertainty = answer.uncertainty;
|
|
102
|
+
if (!isRecord(uncertainty)) return false;
|
|
103
|
+
if (!["provider", "self_reported", "derived"].includes(String(uncertainty.provenance))) return false;
|
|
104
|
+
return uncertainty.confidence === undefined || isProbability(uncertainty.confidence);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function validateAnswer(answer: unknown, question: System1Question): answer is System1Answer {
|
|
108
|
+
if (!isRecord(answer) || answer.questionId !== question.id || answer.type !== question.type) return false;
|
|
109
|
+
if (!validUncertainty(answer as unknown as System1Answer)) return false;
|
|
110
|
+
|
|
111
|
+
if (question.type === "choice") {
|
|
112
|
+
const distribution = (answer.uncertainty as Record<string, unknown>).distribution;
|
|
113
|
+
return typeof answer.value === "string" &&
|
|
114
|
+
Object.hasOwn(question.options, answer.value) &&
|
|
115
|
+
(distribution === undefined || validDistribution(distribution, Object.keys(question.options)));
|
|
116
|
+
}
|
|
117
|
+
if (question.type === "predicate") {
|
|
118
|
+
return isProbability(answer.probabilityTrue);
|
|
119
|
+
}
|
|
120
|
+
const distribution = (answer.uncertainty as Record<string, unknown>).distribution;
|
|
121
|
+
return typeof answer.value === "number" &&
|
|
122
|
+
Number.isFinite(answer.value) &&
|
|
123
|
+
answer.value >= 0 &&
|
|
124
|
+
answer.value <= question.levels.length - 1 &&
|
|
125
|
+
Array.isArray(answer.levels) &&
|
|
126
|
+
answer.levels.length === question.levels.length &&
|
|
127
|
+
answer.levels.every((level, index) => level === question.levels[index]) &&
|
|
128
|
+
(distribution === undefined || validDistribution(
|
|
129
|
+
distribution,
|
|
130
|
+
question.levels.map((_, index) => String(index)),
|
|
131
|
+
));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function hasRequiredUncertainty(answer: System1Answer, request: EvaluateRequest): boolean {
|
|
135
|
+
const required = new Set(request.requiredCapabilities ?? []);
|
|
136
|
+
if ((answer.type === "choice" || answer.type === "ordinal") &&
|
|
137
|
+
required.has("distribution") && answer.uncertainty.distribution === undefined) {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
if (required.has("provider_confidence") && answer.uncertainty.confidence === undefined) return false;
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function validateEvaluation(
|
|
145
|
+
evaluation: ProviderEvaluation,
|
|
146
|
+
request: EvaluateRequest,
|
|
147
|
+
provider: System1Provider,
|
|
148
|
+
): boolean {
|
|
149
|
+
if (!isRecord(evaluation) || !Array.isArray(evaluation.answers) || !isRecord(evaluation.metadata)) return false;
|
|
150
|
+
if (evaluation.answers.length !== request.questions.length) return false;
|
|
151
|
+
const answerIds = evaluation.answers.map((answer) => answer?.questionId);
|
|
152
|
+
if (new Set(answerIds).size !== answerIds.length) return false;
|
|
153
|
+
if (!request.questions.every((question) => {
|
|
154
|
+
const matches = evaluation.answers.filter((answer) => answer?.questionId === question.id);
|
|
155
|
+
return matches.length === 1 &&
|
|
156
|
+
validateAnswer(matches[0], question) &&
|
|
157
|
+
hasRequiredUncertainty(matches[0], request);
|
|
158
|
+
})) return false;
|
|
159
|
+
|
|
160
|
+
const metadata = evaluation.metadata;
|
|
161
|
+
if (metadata.provider !== provider.name || metadata.requestedModel !== provider.model) return false;
|
|
162
|
+
if (!validId(metadata.returnedModel) || metadata.questionSetVersion !== request.questionSetVersion) return false;
|
|
163
|
+
if (!Number.isFinite(metadata.latencyMs) || metadata.latencyMs < 0) return false;
|
|
164
|
+
if (!Number.isInteger(metadata.attempts) || metadata.attempts < 1 || metadata.attempts > 2) return false;
|
|
165
|
+
if (metadata.usage !== undefined) {
|
|
166
|
+
if (!isRecord(metadata.usage)) return false;
|
|
167
|
+
if (!Number.isInteger(metadata.usage.inputTokens) || metadata.usage.inputTokens < 0) return false;
|
|
168
|
+
if (!Number.isInteger(metadata.usage.outputTokens) || metadata.usage.outputTokens < 0) return false;
|
|
169
|
+
}
|
|
170
|
+
return true;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function requiredCapabilities(request: EvaluateRequest): Capability[] {
|
|
174
|
+
const required: Capability[] = [];
|
|
175
|
+
for (const question of request.questions) {
|
|
176
|
+
if (!required.includes(question.type)) required.push(question.type);
|
|
177
|
+
}
|
|
178
|
+
for (const capability of request.requiredCapabilities ?? []) {
|
|
179
|
+
if (!required.includes(capability)) required.push(capability);
|
|
180
|
+
}
|
|
181
|
+
return required;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export interface CreateSystem1RuntimeOptions {
|
|
185
|
+
selected: boolean;
|
|
186
|
+
config: unknown;
|
|
187
|
+
env?: Record<string, string | undefined>;
|
|
188
|
+
transport?: JevTransport;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface System1Runtime {
|
|
192
|
+
readiness: System1Availability;
|
|
193
|
+
service: System1Service;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export function createSystem1Runtime(options: CreateSystem1RuntimeOptions): System1Runtime {
|
|
197
|
+
const env = options.env ?? {};
|
|
198
|
+
const readiness = resolveSystem1Readiness({ selected: options.selected, config: options.config, env });
|
|
199
|
+
if (readiness.status !== "ready") {
|
|
200
|
+
return { readiness, service: createSystem1Service({ availability: readiness }) };
|
|
201
|
+
}
|
|
202
|
+
const validated = validateSystem1Config(options.config);
|
|
203
|
+
if (!validated.ok) {
|
|
204
|
+
const unavailable = { status: "unavailable", reason: "invalid_config" } as const;
|
|
205
|
+
return { readiness: unavailable, service: createSystem1Service({ availability: unavailable }) };
|
|
206
|
+
}
|
|
207
|
+
const apiKey = env[validated.config.apiKeyEnv];
|
|
208
|
+
const provider = createJevProvider({ apiKey: typeof apiKey === "string" ? apiKey : "", transport: options.transport });
|
|
209
|
+
return { readiness, service: createSystem1Service({ provider, availability: readiness }) };
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export function createSystem1Service(options: CreateSystem1ServiceOptions): System1Service {
|
|
213
|
+
const availability = options.availability ?? { status: "ready" as const };
|
|
214
|
+
return {
|
|
215
|
+
async evaluate(request): Promise<System1Result> {
|
|
216
|
+
if (availability.status !== "ready") return availability;
|
|
217
|
+
if (!validateRequest(request) || !options.provider) {
|
|
218
|
+
return { status: "unavailable", reason: options.provider ? "invalid_request" : "invalid_config" };
|
|
219
|
+
}
|
|
220
|
+
if (request.signal?.aborted) return { status: "cancelled" };
|
|
221
|
+
|
|
222
|
+
const missingCapabilities = requiredCapabilities(request).filter(
|
|
223
|
+
(capability) => !options.provider!.capabilities.includes(capability),
|
|
224
|
+
);
|
|
225
|
+
if (missingCapabilities.length > 0) return { status: "unsupported", missingCapabilities };
|
|
226
|
+
|
|
227
|
+
try {
|
|
228
|
+
const result = await options.provider.evaluate({
|
|
229
|
+
...request,
|
|
230
|
+
timeoutMs: Math.min(request.timeoutMs ?? DEFAULT_SYSTEM1_TIMEOUT_MS, DEFAULT_SYSTEM1_TIMEOUT_MS),
|
|
231
|
+
});
|
|
232
|
+
if (request.signal?.aborted) return { status: "cancelled" };
|
|
233
|
+
if (result.status !== "ok") return result;
|
|
234
|
+
if (!validateEvaluation(result.evaluation, request, options.provider)) {
|
|
235
|
+
return { status: "unavailable", reason: "invalid_response" };
|
|
236
|
+
}
|
|
237
|
+
return result;
|
|
238
|
+
} catch {
|
|
239
|
+
return request.signal?.aborted
|
|
240
|
+
? { status: "cancelled" }
|
|
241
|
+
: { status: "unavailable", reason: "network" };
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
};
|
|
245
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// Root routing is not source-export consent. Only this exact, user-approved
|
|
2
|
+
// descriptor can activate a configured consumer for a physical checkout.
|
|
3
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
4
|
+
import { closeSync, constants, existsSync, fsyncSync, lstatSync, mkdirSync, openSync, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from 'node:fs';
|
|
5
|
+
import { isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
6
|
+
import { safeSourceRead } from '../safe-source-read.js';
|
|
7
|
+
import { resolvePolicyRoots, policyRootValidationContext } from '../policy-roots.js';
|
|
8
|
+
import { sessionRootsFromEnv, validateSessionRoots } from '../workspace-context.js';
|
|
9
|
+
import { CONSUMERS, deepFreeze, normalizeSystem1Config } from './config-v2.js';
|
|
10
|
+
const hash=value=>createHash('sha256').update(typeof value==='string'?value:JSON.stringify(value)).digest('hex');
|
|
11
|
+
function policy(roots) {
|
|
12
|
+
const path=join(roots.workspaceRoot,'.ai/agent-fleet-overrides.md');
|
|
13
|
+
const raw=existsSync(path)?safeSourceRead(roots.workspaceRoot,path,1024*1024).toString('utf8'):'';
|
|
14
|
+
const config={rulesDirs:[],docsPaths:[]};let section=false;
|
|
15
|
+
for(const line of raw.split(/\r?\n/)){
|
|
16
|
+
const heading=line.match(/^##\s+(.+?)\s*$/);if(heading){section=['agent-hub','agent-team'].includes(heading[1].trim().toLowerCase());continue;}
|
|
17
|
+
const pair=section&&line.match(/^\s*(rules|docs)\s*:\s*(.+?)\s*$/i);if(pair)config[pair[1].toLowerCase()==='rules'?'rulesDirs':'docsPaths']=pair[2].split(',').map(s=>s.trim()).filter(Boolean);
|
|
18
|
+
}
|
|
19
|
+
const table=resolvePolicyRoots(roots.executionRoot,config,roots.workspaceRoot);
|
|
20
|
+
if(table.diagnostics.length)throw Error('ambiguous_worktree_policy');
|
|
21
|
+
const guardPolicyHash=hash(safeSourceRead(roots.workspaceRoot,join(roots.workspaceRoot,'.pi/damage-control-rules.yaml'),1024*1024).toString('utf8'));
|
|
22
|
+
return {table,guardPolicyHash,configurationHash:hash(raw),roots:table.roots.map(root=>{const s=statSync(root.canonicalPath,{bigint:true});return {role:root.role,path:root.canonicalPath,lexicalPath:root.lexicalPath,kind:root.kind,device:String(s.dev),inode:String(s.ino),birthtime:String(s.birthtimeNs)};})};
|
|
23
|
+
}
|
|
24
|
+
const within=(base,path)=>path===base||path.startsWith(base+sep);
|
|
25
|
+
function projectSection(section,roots,grants){
|
|
26
|
+
const result=JSON.parse(JSON.stringify(section));
|
|
27
|
+
const map=path=>{
|
|
28
|
+
if(path==='git:tracked')return path;
|
|
29
|
+
if(typeof path!=='string'||isAbsolute(path)||path.includes('\\\\')||path.includes('\0'))throw Error('ambiguous_application_scope');
|
|
30
|
+
const absolute=resolve(roots.workspaceRoot,path);
|
|
31
|
+
if(within(roots.repositoryRoot,absolute))return relative(roots.repositoryRoot,absolute).split(sep).join('/')||'git:tracked';
|
|
32
|
+
const grant=grants.find(root=>root.role!=='workspace'&&within(root.lexicalPath??root.path,absolute));
|
|
33
|
+
if(grant){const suffix=relative(grant.lexicalPath??grant.path,absolute);return relative(roots.executionRoot,resolve(grant.path,suffix)).split(sep).join('/');}
|
|
34
|
+
if(path.split('/').includes('..'))throw Error('ambiguous_application_scope');
|
|
35
|
+
return path; // An explicit target-relative scope, shown as such for fresh consent.
|
|
36
|
+
};
|
|
37
|
+
if(Array.isArray(result.include))result.include=result.include.map(map);
|
|
38
|
+
for(const binding of result.localBindings??[]){
|
|
39
|
+
if(Array.isArray(binding.applicability?.paths))binding.applicability.paths=binding.applicability.paths.map(map);
|
|
40
|
+
if(Array.isArray(binding.exceptions?.paths))binding.exceptions.paths=binding.exceptions.paths.map(map);
|
|
41
|
+
if(binding.placement?.prefix)binding.placement.prefix=map(binding.placement.prefix);
|
|
42
|
+
}
|
|
43
|
+
return result;
|
|
44
|
+
}
|
|
45
|
+
export function projectWorktreeDocument(document,binding=sessionRootsFromEnv()) {
|
|
46
|
+
if(!binding||binding.mode!=='targeted'||!document?.consumers)return document;
|
|
47
|
+
const roots=validateSessionRoots(binding),grants=policy(roots).roots;
|
|
48
|
+
return {...document,consumers:Object.fromEntries(Object.entries(document.consumers).map(([name,section])=>[name,projectSection(section,roots,grants)]))};
|
|
49
|
+
}
|
|
50
|
+
export function worktreeScopePreview(document,consumer,binding=sessionRootsFromEnv()) {
|
|
51
|
+
if(!binding||binding.mode!=='targeted')return undefined;
|
|
52
|
+
const roots=validateSessionRoots(binding);
|
|
53
|
+
if(!CONSUMERS.includes(consumer))throw Error('unknown_consumer');
|
|
54
|
+
if(!['ready','off'].includes(normalizeSystem1Config(document).status))throw Error('invalid_configuration');
|
|
55
|
+
const section=document?.consumers?.[consumer];
|
|
56
|
+
if(!section)throw Error('consumer_unconfigured');
|
|
57
|
+
const {table,...policyScope}=policy(roots);
|
|
58
|
+
const projected=projectSection(section,roots,policyScope.roots);
|
|
59
|
+
const effective=normalizeSystem1Config({...document,consumers:{[consumer]:projected}},policyRootValidationContext(table)).consumers[consumer];
|
|
60
|
+
if(effective.status==='invalid')throw Error('ambiguous_consumer_scope');
|
|
61
|
+
const dataContracts={watchdog:'bounded progress messages',proactiveReview:'bounded changed-file excerpts and selected rule sections',dispatchTriage:'bounded task and role metadata',taskTriage:'bounded task state',agenticAsk:'explicit included file selections and opt-in tool output references',fileDiscovery:'approved candidate snippets and directory metadata',contextCompaction:'bounded session history',damageGuard:'commands, edits and results selected by remoteScopes'};
|
|
62
|
+
const descriptor={version:1,consumer,dataContract:dataContracts[consumer],targetId:roots.targetId,workspaceRoot:roots.workspaceRoot,executionRoot:roots.executionRoot,
|
|
63
|
+
repositoryRoot:roots.repositoryRoot,provider:document.provider,model:document.model,apiKeyEnv:document.apiKeyEnv,
|
|
64
|
+
configurationHash:hash(document),scope:JSON.parse(JSON.stringify(section)),effectiveScope:effective.config??projected,policy:policyScope};
|
|
65
|
+
return deepFreeze({...descriptor,digest:hash(descriptor)});
|
|
66
|
+
}
|
|
67
|
+
function recordPath(preview){return join(preview.workspaceRoot,'.pi/agent-sessions/worktree-consent',preview.targetId,`${preview.consumer}.json`);}
|
|
68
|
+
export function worktreeScopeApproved(document,consumer,binding=sessionRootsFromEnv()) {
|
|
69
|
+
if(!binding||binding.mode!=='targeted')return true;
|
|
70
|
+
try{
|
|
71
|
+
const preview=worktreeScopePreview(document,consumer,binding),path=recordPath(preview),stat=lstatSync(path);
|
|
72
|
+
if(!stat.isFile()||(stat.mode&0o077)!==0||(process.getuid&&stat.uid!==process.getuid()))return false;
|
|
73
|
+
const record=JSON.parse(safeSourceRead(binding.workspaceRoot,path,65536).toString('utf8'));
|
|
74
|
+
return record.version===1&&record.approved===true&&record.digest===preview.digest&&record.consumer===consumer&&record.targetId===binding.targetId;
|
|
75
|
+
}catch{return false;}
|
|
76
|
+
}
|
|
77
|
+
function privateDirectory(root,parts){
|
|
78
|
+
let path=root;
|
|
79
|
+
for(const part of parts){path=join(path,part);if(!existsSync(path))mkdirSync(path,{mode:0o700});const s=lstatSync(path);if(!s.isDirectory()||realpathSync(path)!==path)throw Error('consent_storage_denied');}
|
|
80
|
+
return path;
|
|
81
|
+
}
|
|
82
|
+
/** The caller supplies a real UI callback, never a Boolean/environment approval. */
|
|
83
|
+
export async function approveWorktreeScope({consumer,readDocument,ask,binding=sessionRootsFromEnv()}) {
|
|
84
|
+
if(!binding||binding.mode!=='targeted')return {status:'refused',reason:'target_required'};
|
|
85
|
+
if(typeof ask!=='function')return {status:'refused',reason:'approval_requires_ui'};
|
|
86
|
+
let before;try{before=worktreeScopePreview(readDocument(),consumer,binding);}catch{return {status:'refused',reason:'scope_unavailable'};}
|
|
87
|
+
if(await ask(before)!==true)return {status:'refused',reason:'scope_not_approved'};
|
|
88
|
+
let after;try{after=worktreeScopePreview(readDocument(),consumer,binding);}catch{return {status:'refused',reason:'scope_changed'};}
|
|
89
|
+
if(after.digest!==before.digest)return {status:'refused',reason:'scope_changed'};
|
|
90
|
+
const directory=privateDirectory(binding.workspaceRoot,['.pi','agent-sessions','worktree-consent',binding.targetId]);
|
|
91
|
+
const path=recordPath(before),temporary=join(directory,`.${randomUUID()}.tmp`);let fd;
|
|
92
|
+
try{
|
|
93
|
+
fd=openSync(temporary,constants.O_WRONLY|constants.O_CREAT|constants.O_EXCL|constants.O_NOFOLLOW,0o600);
|
|
94
|
+
writeFileSync(fd,JSON.stringify({version:1,approved:true,digest:before.digest,consumer,targetId:binding.targetId}));fsyncSync(fd);closeSync(fd);fd=undefined;
|
|
95
|
+
if(worktreeScopePreview(readDocument(),consumer,binding).digest!==before.digest)throw Error('scope_changed');
|
|
96
|
+
renameSync(temporary,path);
|
|
97
|
+
return {status:'approved',digest:before.digest};
|
|
98
|
+
}finally{if(fd!==undefined)closeSync(fd);try{unlinkSync(temporary);}catch{}}
|
|
99
|
+
}
|
|
100
|
+
export function gateWorktreeConsumer(document,consumer,section,binding=sessionRootsFromEnv()) {
|
|
101
|
+
if(!binding||binding.mode!=='targeted'||section?.status!=='ready'||document?.mode==='off')return section;
|
|
102
|
+
if(consumer==='proactiveReview'&§ion.config?.remoteContext==='disabled')return section;
|
|
103
|
+
if(worktreeScopeApproved(document,consumer,binding))return section;
|
|
104
|
+
return Object.freeze({status:'off',reason:'needs_worktree_consent',config:Object.freeze({...section.config,mode:'off'})});
|
|
105
|
+
}
|
|
106
|
+
export function gateWorktreeSnapshot(snapshot,binding=sessionRootsFromEnv()) {
|
|
107
|
+
if(!binding||binding.mode!=='targeted')return snapshot;
|
|
108
|
+
const consumers=Object.fromEntries(Object.entries(snapshot.consumers).map(([name,section])=>[name,gateWorktreeConsumer(snapshot.document,name,section,binding)]));
|
|
109
|
+
return Object.freeze({...snapshot,consumers:Object.freeze(consumers),targetId:binding.targetId});
|
|
110
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as runtime from './worktree-scopes.js';
|
|
2
|
+
import type { SessionRoots } from '../workspace-context.ts';
|
|
3
|
+
export interface WorktreeScopePreview {
|
|
4
|
+
readonly version:1;readonly consumer:string;readonly targetId:string;readonly workspaceRoot:string;readonly executionRoot:string;readonly repositoryRoot:string;
|
|
5
|
+
readonly provider:string;readonly model:string;readonly apiKeyEnv:string;readonly configurationHash:string;readonly scope:unknown;readonly effectiveScope:unknown;
|
|
6
|
+
readonly policy:{readonly configurationHash:string;readonly roots:readonly {role:string;path:string;kind:string;device:string;inode:string}[]};readonly digest:string;
|
|
7
|
+
}
|
|
8
|
+
export const worktreeScopePreview=runtime.worktreeScopePreview as (document:any,consumer:string,binding?:SessionRoots)=>WorktreeScopePreview|undefined;
|
|
9
|
+
export const worktreeScopeApproved=runtime.worktreeScopeApproved as (document:any,consumer:string,binding?:SessionRoots)=>boolean;
|
|
10
|
+
export const approveWorktreeScope=runtime.approveWorktreeScope as (options:{consumer:string;readDocument:()=>any;ask?:(preview:WorktreeScopePreview)=>Promise<boolean>;binding?:SessionRoots})=>Promise<{status:string;reason?:string;digest?:string}>;
|
|
11
|
+
export const gateWorktreeConsumer=runtime.gateWorktreeConsumer as (document:any,consumer:string,section:any,binding?:SessionRoots)=>any;
|
|
12
|
+
export const projectWorktreeDocument=runtime.projectWorktreeDocument as (document:any,binding?:SessionRoots)=>any;
|
|
13
|
+
export const gateWorktreeSnapshot=runtime.gateWorktreeSnapshot as (snapshot:any,binding?:SessionRoots)=>any;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { System1Service } from './contracts.ts';
|
|
2
|
+
import { readSystem1Document } from './config-loader.js';
|
|
3
|
+
import { sessionRootsFromEnv } from '../workspace-context.ts';
|
|
4
|
+
import { worktreeScopeApproved,worktreeScopePreview } from './worktree-scopes.ts';
|
|
5
|
+
/** Revalidate the exact scope at the provider boundary and before accepting a late result. */
|
|
6
|
+
export function worktreeConsumerService(service:System1Service|undefined,document:any,consumer:string):System1Service|undefined {
|
|
7
|
+
if(!service)return undefined;
|
|
8
|
+
const binding=sessionRootsFromEnv();if(!binding||binding.mode!=='targeted')return service;
|
|
9
|
+
let digest:string|undefined;try{digest=worktreeScopePreview(document,consumer,binding)?.digest;}catch{}
|
|
10
|
+
async function current(){
|
|
11
|
+
try{
|
|
12
|
+
if(!digest||sessionRootsFromEnv()?.targetId!==binding!.targetId)return false;
|
|
13
|
+
const {readDamagePolicy}=await import('../damage-policy.ts');
|
|
14
|
+
if(!readDamagePolicy(binding!.executionRoot,binding))return false;
|
|
15
|
+
const latest=readSystem1Document(binding!.workspaceRoot);
|
|
16
|
+
return worktreeScopePreview(latest,consumer,binding)?.digest===digest&&worktreeScopeApproved(latest,consumer,binding);
|
|
17
|
+
}catch{return false;}
|
|
18
|
+
}
|
|
19
|
+
return {async evaluate(request){
|
|
20
|
+
if(!await current())return {status:'unavailable',reason:'invalid_config'};
|
|
21
|
+
const result=await service.evaluate(request);
|
|
22
|
+
return await current()?result:{status:'unavailable',reason:'invalid_config'};
|
|
23
|
+
}};
|
|
24
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// These are integration contracts, not permissions or evidence of a check.
|
|
2
|
+
export const TARGET_CAPABILITIES=Object.freeze({
|
|
3
|
+
btw:Object.freeze({status:'unsupported',reason:'use_guarded_dispatch_agent'}),
|
|
4
|
+
hermesConductor:Object.freeze({status:'unsupported',reason:'external_profile_split_root_contract_unverified; use --hub or a targeted Pi peer'}),
|
|
5
|
+
outputContracts:Object.freeze({status:'not_present_in_runtime'}),
|
|
6
|
+
logSummarizer:Object.freeze({status:'not_present_in_runtime'}),
|
|
7
|
+
});
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fleet Core update check — surfaces an "update available" banner once per
|
|
3
|
+
* interactive session when @chankov/agent-fleet has a newer published version
|
|
4
|
+
* than the one recorded in `.ai/agent-fleet-setup.md`.
|
|
5
|
+
*
|
|
6
|
+
* damage-control-continue imports this helper so every `just fleet` launch
|
|
7
|
+
* (Hub, peer, coms) gets the check without a standalone pi extension.
|
|
8
|
+
*
|
|
9
|
+
* Design constraints:
|
|
10
|
+
* - Never blocks session start. Callers schedule it; network I/O is bounded
|
|
11
|
+
* to a single 3s fetch and every error path is swallowed.
|
|
12
|
+
* - Shares the same XDG cache file as the CLI (`~/.cache/agent-fleet/
|
|
13
|
+
* latest-version.json`) so the CLI and Fleet Core do not double-fetch.
|
|
14
|
+
* - Honors AGENT_SKILLS_NO_UPDATE_CHECK / NO_UPDATE_NOTIFIER / CI opt-outs.
|
|
15
|
+
* - Skips headless hub children (no UI, or AGENT_HUB_AGENT_ID set).
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
19
|
+
import { homedir } from "node:os";
|
|
20
|
+
import { dirname, join } from "node:path";
|
|
21
|
+
import { request } from "node:https";
|
|
22
|
+
|
|
23
|
+
import { AGENT_ID_ENV } from "./damage-control-shared.ts";
|
|
24
|
+
|
|
25
|
+
export const PACKAGE_NAME = "@chankov/agent-fleet";
|
|
26
|
+
export const RELEASES_URL = "https://github.com/chankov/agent-fleet/releases";
|
|
27
|
+
const REGISTRY = "https://registry.npmjs.org";
|
|
28
|
+
const CACHE_TTL_MS = 24 * 60 * 60 * 1000;
|
|
29
|
+
const FETCH_TIMEOUT_MS = 3000;
|
|
30
|
+
|
|
31
|
+
const CACHE_DIR = join(
|
|
32
|
+
process.env.XDG_CACHE_HOME || join(homedir(), ".cache"),
|
|
33
|
+
"agent-fleet",
|
|
34
|
+
);
|
|
35
|
+
const DEFAULT_CACHE_FILE = join(CACHE_DIR, "latest-version.json");
|
|
36
|
+
|
|
37
|
+
export interface CachePayload {
|
|
38
|
+
latest: string;
|
|
39
|
+
checkedAt: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type FleetUpdateCheckContext = {
|
|
43
|
+
cwd?: string;
|
|
44
|
+
hasUI?: boolean;
|
|
45
|
+
ui?: {
|
|
46
|
+
notify?: (message: string, level?: string) => void;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type FleetUpdateCheckDeps = {
|
|
51
|
+
env?: NodeJS.Dict<string>;
|
|
52
|
+
now?: () => number;
|
|
53
|
+
cwd?: string;
|
|
54
|
+
cacheFile?: string;
|
|
55
|
+
exists?: (path: string) => boolean;
|
|
56
|
+
readFile?: (path: string, encoding: "utf8") => string;
|
|
57
|
+
writeFile?: (path: string, data: string, encoding: "utf8") => void;
|
|
58
|
+
mkdir?: (path: string, opts: { recursive: boolean }) => void;
|
|
59
|
+
fetchLatest?: (timeoutMs: number) => Promise<string | null>;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Fire-and-forget entry used by damage-control-continue on session_start.
|
|
64
|
+
* Must never reject into the harness.
|
|
65
|
+
*/
|
|
66
|
+
export function scheduleFleetUpdateCheck(ctx: FleetUpdateCheckContext, deps: FleetUpdateCheckDeps = {}): void {
|
|
67
|
+
void runFleetUpdateCheck(ctx, deps).catch(() => {});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Run the check and notify when an upgrade exists.
|
|
72
|
+
* Returns the banner that was shown, or null when the check is skipped/silent.
|
|
73
|
+
*/
|
|
74
|
+
export async function runFleetUpdateCheck(
|
|
75
|
+
ctx: FleetUpdateCheckContext,
|
|
76
|
+
deps: FleetUpdateCheckDeps = {},
|
|
77
|
+
): Promise<string | null> {
|
|
78
|
+
try {
|
|
79
|
+
if (!shouldRun(ctx, deps)) return null;
|
|
80
|
+
|
|
81
|
+
const recorded = readRecordedVersion(deps.cwd ?? ctx.cwd ?? process.cwd(), deps);
|
|
82
|
+
if (!recorded) return null;
|
|
83
|
+
|
|
84
|
+
let latest = readCacheFresh(deps);
|
|
85
|
+
if (!latest) {
|
|
86
|
+
const fetchLatest = deps.fetchLatest ?? fetchLatestFromRegistry;
|
|
87
|
+
latest = await fetchLatest(FETCH_TIMEOUT_MS);
|
|
88
|
+
if (latest) writeCache({ latest, checkedAt: (deps.now ?? Date.now)() }, deps);
|
|
89
|
+
}
|
|
90
|
+
if (!latest) return null;
|
|
91
|
+
if (!isNewerVersion(latest, recorded)) return null;
|
|
92
|
+
|
|
93
|
+
const banner = formatUpdateBanner(recorded, latest);
|
|
94
|
+
ctx.ui?.notify?.(banner, "info");
|
|
95
|
+
return banner;
|
|
96
|
+
} catch {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function formatUpdateBanner(recorded: string, latest: string): string {
|
|
102
|
+
return [
|
|
103
|
+
`agent-fleet update available: ${recorded} → ${latest}`,
|
|
104
|
+
``,
|
|
105
|
+
`In the workspace root:`,
|
|
106
|
+
` npx ${PACKAGE_NAME}@latest setup`,
|
|
107
|
+
``,
|
|
108
|
+
`Preview without writing:`,
|
|
109
|
+
` npx ${PACKAGE_NAME}@latest setup --dry-run`,
|
|
110
|
+
``,
|
|
111
|
+
`Releases:`,
|
|
112
|
+
` ${RELEASES_URL}`,
|
|
113
|
+
].join("\n");
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function isNewerVersion(a: string, b: string): boolean {
|
|
117
|
+
const [aMain, aPre = ""] = a.split("-", 2);
|
|
118
|
+
const [bMain, bPre = ""] = b.split("-", 2);
|
|
119
|
+
const aParts = aMain.split(".").map(Number);
|
|
120
|
+
const bParts = bMain.split(".").map(Number);
|
|
121
|
+
for (let i = 0; i < 3; i++) {
|
|
122
|
+
const ai = aParts[i] ?? 0;
|
|
123
|
+
const bi = bParts[i] ?? 0;
|
|
124
|
+
if (ai !== bi) return ai > bi;
|
|
125
|
+
}
|
|
126
|
+
if (!aPre && bPre) return true;
|
|
127
|
+
if (aPre && !bPre) return false;
|
|
128
|
+
return aPre > bPre;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function isUpdateCheckDisabled(env: NodeJS.Dict<string> = process.env): boolean {
|
|
132
|
+
return env.AGENT_SKILLS_NO_UPDATE_CHECK === "1"
|
|
133
|
+
|| env.NO_UPDATE_NOTIFIER === "1"
|
|
134
|
+
|| env.CI === "true";
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function shouldRun(ctx: FleetUpdateCheckContext, deps: FleetUpdateCheckDeps): boolean {
|
|
138
|
+
const env = deps.env ?? process.env;
|
|
139
|
+
if (isUpdateCheckDisabled(env)) return false;
|
|
140
|
+
if (env[AGENT_ID_ENV]) return false;
|
|
141
|
+
if (ctx.hasUI !== true) return false;
|
|
142
|
+
if (typeof ctx.ui?.notify !== "function") return false;
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function readRecordedVersion(cwd: string, deps: FleetUpdateCheckDeps): string | null {
|
|
147
|
+
const exists = deps.exists ?? existsSync;
|
|
148
|
+
const readFile = deps.readFile ?? readFileSync;
|
|
149
|
+
const recordPath = join(cwd, ".ai", "agent-fleet-setup.md");
|
|
150
|
+
if (!exists(recordPath)) return null;
|
|
151
|
+
try {
|
|
152
|
+
const text = readFile(recordPath, "utf8");
|
|
153
|
+
const m = text.match(/^version:\s*([^\s#]+)/m);
|
|
154
|
+
return m ? m[1].trim() : null;
|
|
155
|
+
} catch {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function cacheFilePath(deps: FleetUpdateCheckDeps): string {
|
|
161
|
+
return deps.cacheFile ?? DEFAULT_CACHE_FILE;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function readCacheFresh(deps: FleetUpdateCheckDeps): string | null {
|
|
165
|
+
try {
|
|
166
|
+
const exists = deps.exists ?? existsSync;
|
|
167
|
+
const readFile = deps.readFile ?? readFileSync;
|
|
168
|
+
const file = cacheFilePath(deps);
|
|
169
|
+
if (!exists(file)) return null;
|
|
170
|
+
const payload = JSON.parse(readFile(file, "utf8")) as CachePayload;
|
|
171
|
+
if ((deps.now ?? Date.now)() - payload.checkedAt >= CACHE_TTL_MS) return null;
|
|
172
|
+
return payload.latest;
|
|
173
|
+
} catch {
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/** The cached latest published version when the cache is fresh; never fetches. */
|
|
179
|
+
export function readCachedLatestVersion(deps: FleetUpdateCheckDeps = {}): string | null {
|
|
180
|
+
return readCacheFresh(deps);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function writeCache(payload: CachePayload, deps: FleetUpdateCheckDeps): void {
|
|
184
|
+
try {
|
|
185
|
+
const mkdir = deps.mkdir ?? mkdirSync;
|
|
186
|
+
const writeFile = deps.writeFile ?? writeFileSync;
|
|
187
|
+
const file = cacheFilePath(deps);
|
|
188
|
+
mkdir(dirname(file), { recursive: true });
|
|
189
|
+
writeFile(file, JSON.stringify(payload, null, 2), "utf8");
|
|
190
|
+
} catch {
|
|
191
|
+
// Cache write failed — fine, we'll re-fetch next session.
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function fetchLatestFromRegistry(timeoutMs: number): Promise<string | null> {
|
|
196
|
+
return new Promise((resolve) => {
|
|
197
|
+
const url = `${REGISTRY}/${encodeURIComponent(PACKAGE_NAME).replace("%40", "@")}/latest`;
|
|
198
|
+
const req = request(
|
|
199
|
+
url,
|
|
200
|
+
{ method: "GET", headers: { accept: "application/json" } },
|
|
201
|
+
(res) => {
|
|
202
|
+
if (res.statusCode !== 200) {
|
|
203
|
+
res.resume();
|
|
204
|
+
resolve(null);
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
let body = "";
|
|
208
|
+
res.setEncoding("utf8");
|
|
209
|
+
res.on("data", (chunk) => { body += chunk; });
|
|
210
|
+
res.on("end", () => {
|
|
211
|
+
try {
|
|
212
|
+
const parsed = JSON.parse(body);
|
|
213
|
+
resolve(typeof parsed.version === "string" ? parsed.version : null);
|
|
214
|
+
} catch {
|
|
215
|
+
resolve(null);
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
},
|
|
219
|
+
);
|
|
220
|
+
req.on("error", () => resolve(null));
|
|
221
|
+
req.setTimeout(timeoutMs, () => {
|
|
222
|
+
req.destroy();
|
|
223
|
+
resolve(null);
|
|
224
|
+
});
|
|
225
|
+
req.end();
|
|
226
|
+
});
|
|
227
|
+
}
|