@chankov/agent-fleet 2.0.22 → 2.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pi/agent-fleet/scripts/coms-claude-bridge.ts +5 -2
- package/.pi/agent-fleet/scripts/coms-cli.ts +9 -4
- package/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +5 -2
- package/.pi/agent-fleet/scripts/exec-at-target.ts +10 -0
- package/.pi/agent-fleet/scripts/fleet.ts +32 -4
- package/.pi/agent-fleet/scripts/flow.ts +10 -1
- package/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +1 -1
- package/.pi/agent-fleet/scripts/lib/fleet-command.ts +14 -0
- package/.pi/agent-fleet/scripts/lib/flow-command.ts +9 -0
- package/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +14 -6
- package/.pi/agent-fleet/scripts/lib/peer-target.ts +1 -0
- package/.pi/agent-fleet/scripts/lib/resource-closure.js +1 -0
- package/.pi/agent-fleet/scripts/lib/session-launch.ts +56 -0
- package/.pi/agent-fleet/scripts/lib/team-snapshot.ts +13 -0
- package/.pi/agent-fleet/scripts/peer-launch.ts +17 -11
- package/.pi/agent-fleet/scripts/pi-session.ts +9 -0
- package/.pi/agent-fleet/scripts/team-snapshot.ts +14 -6
- package/.pi/agent-fleet/scripts/team-up.ts +16 -9
- package/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +5 -3
- package/.pi/agent-fleet/scripts/workflows/lib/env.ts +3 -1
- package/.pi/agent-fleet/scripts/workflows/lib/git.ts +4 -1
- package/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +10 -5
- package/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +15 -8
- package/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +5 -4
- package/.pi/agent-fleet/scripts/workflows/lib/quality.ts +3 -2
- package/.pi/agent-fleet/scripts/workflows/lib/run.ts +1 -0
- package/.pi/agent-fleet/scripts/workflows/lib/trace.ts +23 -5
- package/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +59 -23
- package/.pi/agents/model-profiles.yaml +3 -3
- package/.pi/extensions/btw/index.ts +2 -0
- package/.pi/extensions/pi-voice-stt/config.ts +5 -4
- package/.pi/harnesses/agent-hub/agentic-hub.ts +2 -1
- package/.pi/harnesses/agent-hub/config/agents.ts +3 -0
- package/.pi/harnesses/agent-hub/config/overrides.ts +4 -3
- package/.pi/harnesses/agent-hub/context-continuity-broker.ts +7 -5
- package/.pi/harnesses/agent-hub/context-continuity-client.ts +6 -3
- package/.pi/harnesses/agent-hub/context-continuity-owners.ts +5 -3
- package/.pi/harnesses/agent-hub/damage-guard-hub.ts +4 -2
- package/.pi/harnesses/agent-hub/damage-guard-owners.ts +5 -0
- package/.pi/harnesses/agent-hub/dispatch-coms.ts +7 -2
- package/.pi/harnesses/agent-hub/execution-evidence.ts +20 -4
- package/.pi/harnesses/agent-hub/file-discovery/hub.ts +2 -1
- package/.pi/harnesses/agent-hub/file-discovery/owners.ts +7 -3
- package/.pi/harnesses/agent-hub/index.ts +4 -3
- package/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +3 -2
- package/.pi/harnesses/agent-hub/package.json +1 -1
- package/.pi/harnesses/agent-hub/presentation.ts +7 -1
- package/.pi/harnesses/agent-hub/proactive-config.ts +2 -1
- package/.pi/harnesses/agent-hub/proactive-rules.ts +1 -1
- package/.pi/harnesses/agent-hub/proactive-snapshot.ts +12 -4
- package/.pi/harnesses/agent-hub/proactive-types.ts +3 -0
- package/.pi/harnesses/agent-hub/safety-routing.ts +7 -1
- package/.pi/harnesses/agent-hub/scope-gate.js +10 -5
- package/.pi/harnesses/agent-hub/spawn.ts +30 -4
- package/.pi/harnesses/agent-hub/system1-runtime.ts +9 -3
- package/.pi/harnesses/agent-hub/task-triage-config.ts +2 -1
- package/.pi/harnesses/agent-hub/tools/fleet-tools.ts +3 -2
- package/.pi/harnesses/agent-hub/tools/herdr-executors.ts +11 -6
- package/.pi/harnesses/agent-hub/tools/run-flow.ts +21 -11
- package/.pi/harnesses/ask-user-remote/index.ts +4 -2
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/index.ts +23 -2
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/harnesses/lib/coms-core-io.ts +2 -0
- package/.pi/harnesses/lib/coms-core.ts +7 -1
- package/.pi/harnesses/lib/coms-registry-entry.ts +3 -0
- package/.pi/harnesses/lib/damage-control-shared.ts +17 -1
- package/.pi/harnesses/lib/damage-policy.ts +35 -0
- package/.pi/harnesses/lib/peer-target.ts +24 -0
- package/.pi/harnesses/lib/policy-roots.js +20 -9
- package/.pi/harnesses/lib/policy-roots.ts +2 -1
- package/.pi/harnesses/lib/resource-closure.js +26 -0
- package/.pi/harnesses/lib/session-target.ts +62 -0
- package/.pi/harnesses/lib/system1/config-loader.js +12 -3
- package/.pi/harnesses/lib/system1/worktree-scopes.js +110 -0
- package/.pi/harnesses/lib/system1/worktree-scopes.ts +13 -0
- package/.pi/harnesses/lib/system1/worktree-service.ts +24 -0
- package/.pi/harnesses/lib/target-capabilities.js +7 -0
- package/.pi/harnesses/lib/workspace-context.js +115 -0
- package/.pi/harnesses/lib/workspace-context.ts +22 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.23/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.23/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/coms-claude-bridge.ts +440 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/coms-cli.ts +430 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +416 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/exec-at-target.ts +10 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/fleet.ts +245 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/flow.ts +166 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +208 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/fleet-command.ts +266 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/flow-command.ts +107 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +238 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/peer-target.ts +1 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/resource-closure.js +1 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/session-launch.ts +56 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/lib/team-snapshot.ts +160 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/package-lock.json +35 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/package.json +9 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/peer-launch.ts +289 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/pi-session.ts +9 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/team-snapshot.ts +245 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/team-up.ts +385 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +181 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/env.ts +36 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/git.ts +99 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +130 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +137 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +37 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/quality.ts +65 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/run.ts +109 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/trace.ts +52 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/writer-lease-race.worker.mjs +36 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +148 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.23/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.0.23/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.23/.pi/agents/model-profiles.yaml +134 -0
- package/.versions/2.0.23/.pi/agents/peers.yaml +147 -0
- package/.versions/2.0.23/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.23/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.23/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.23/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.23/.pi/extensions/btw/index.ts +916 -0
- package/.versions/2.0.23/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.23/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.23/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.23/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.23/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.23/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.23/.pi/extensions/compact-and-continue/index.ts +136 -0
- package/.versions/2.0.23/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.23/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.23/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.23/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.23/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.23/.pi/extensions/package.json +9 -0
- package/.versions/2.0.23/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.0.23/.pi/extensions/pi-voice-stt/config.ts +199 -0
- package/.versions/2.0.23/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.23/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.23/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.23/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.23/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/README.md +1527 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/acceptance.ts +200 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/access-approval.ts +141 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/action-authorization.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/agentic-contract.ts +43 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/agentic-evidence.ts +64 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/agentic-hub.ts +55 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/agentic-runtime.ts +56 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/agentic-sources-worker.mjs +4 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/agentic-sources.ts +74 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/agentic-state.ts +23 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/approval-wait.ts +1 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/assist-profile.ts +19 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/budget-recovery.ts +123 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/context.ts +46 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/recover.ts +61 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/config/agents.ts +181 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/config/model-profiles.ts +237 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/config/overrides.ts +166 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context/budgets.ts +152 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-compaction-monitor.ts +35 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-compaction-preflight.ts +21 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-compaction-runtime.ts +69 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-compaction.ts +34 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-continuity-broker.ts +44 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-continuity-child.ts +83 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-continuity-client.ts +22 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-continuity-compat.ts +30 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-continuity-owners.ts +17 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-continuity-registry.ts +8 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-continuity.ts +82 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-pressure.ts +222 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/context-window.js +108 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/damage-guard-approval.ts +59 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/damage-guard-broker.ts +125 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/damage-guard-contract.ts +22 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/damage-guard-descendant.ts +76 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/damage-guard-hub.ts +256 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/damage-guard-identity.ts +12 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/damage-guard-owners.ts +59 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/damage-guard-state.ts +43 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/damage-guard-test-tsconfig.json +19 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/delegate.ts +478 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/deterministic-fs.ts +195 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-coms.ts +258 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-native-complete.ts +173 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +295 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +255 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-native-types.ts +293 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-native.ts +236 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +27 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +77 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/docs-lane.js +123 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/execution-evidence.ts +96 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/execution-trace.ts +241 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/external-blocker.js +92 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/adapters.ts +88 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/broker-client.ts +62 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/broker.ts +128 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/child-extension.ts +42 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/descendant.ts +67 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/discovery-worker.mjs +15 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/discovery.ts +126 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/evaluate.ts +57 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/hub.ts +170 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/native-context.ts +8 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/native-fixture.test-support.ts +108 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/owners.ts +100 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/results.ts +55 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/runtime.ts +130 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/semantic-profiles.ts +18 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/sources.ts +69 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/file-discovery/state.ts +22 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/filesystem-tool.ts +166 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/fixtures/registration-surface.json +66 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/helpers.ts +270 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/history-projection.ts +116 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/hub-state-audit.js +41 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/index.ts +2617 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/input/completions.ts +82 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +231 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +145 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +90 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/no-progress.ts +622 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/operator-watchdog.ts +97 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/orchestration-activation.ts +109 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/orchestration-route.ts +68 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/policy/work-mode.ts +142 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/presentation.ts +54 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-config.ts +22 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-external-git.ts +82 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-external.ts +142 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-local.ts +89 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-observer.ts +106 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-rules.ts +171 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-runtime.ts +318 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-snapshot.ts +279 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/proactive-types.ts +70 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/process-obligations.ts +159 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/prompts/context.ts +55 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/prompts/fragments.ts +86 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/prompts/system-prompt.ts +125 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/recover-state.ts +104 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/recovery-contract.ts +151 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/research/runtime.ts +215 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/research/spawn-run.ts +221 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/return-contract.js +349 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/return-extract.js +77 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/review-closure.ts +43 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/review-continuity.ts +73 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/review-findings.js +96 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/review-reuse.ts +47 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/run-budget.js +342 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/run-namespace.js +93 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/runtime-test-check.ts +68 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/safety-routing.ts +28 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/scope-gate.js +233 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/session-audit.ts +331 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/spawn.ts +665 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/specialist-result-receipt.ts +13 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/specialist-result.ts +69 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/system1-communication-store.ts +217 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/system1-report.ts +275 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/system1-runtime.ts +271 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-continuation.ts +4 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-authorization.ts +151 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-config.ts +21 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-obligations.ts +120 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-runtime.ts +130 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/timeline.ts +72 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +79 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/action-executors.ts +214 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/ask-system1-files.ts +15 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/ask-system1.ts +25 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/context.ts +144 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +88 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +641 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/fleet-tools.ts +201 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/herdr-executors.ts +100 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/run-flow.ts +146 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/spawn-research.ts +67 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/tsconfig.json +22 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/types.ts +66 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/context-budget.ts +89 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +155 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/work-mode.ts +186 -0
- package/.versions/2.0.23/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
- package/.versions/2.0.23/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.23/.pi/harnesses/ask-user-remote/index.ts +571 -0
- package/.versions/2.0.23/.pi/harnesses/ask-user-remote/questions.ts +159 -0
- package/.versions/2.0.23/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.23/.pi/harnesses/ask-user-remote/runtime-ask.ts +83 -0
- package/.versions/2.0.23/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.23/.pi/harnesses/coms/index.ts +285 -0
- package/.versions/2.0.23/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.23/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.23/.pi/harnesses/damage-control-continue/README.md +161 -0
- package/.versions/2.0.23/.pi/harnesses/damage-control-continue/index.ts +621 -0
- package/.versions/2.0.23/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.23/.pi/harnesses/damage-control-continue/result-screen.ts +98 -0
- package/.versions/2.0.23/.pi/harnesses/damage-control-continue/system1-child.ts +45 -0
- package/.versions/2.0.23/.pi/harnesses/damage-control-continue/system1-client.ts +85 -0
- package/.versions/2.0.23/.pi/harnesses/damage-control-continue/system1-guard.ts +65 -0
- package/.versions/2.0.23/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.23/.pi/harnesses/lib/approval-wait.ts +17 -0
- package/.versions/2.0.23/.pi/harnesses/lib/bash-policy-analysis.ts +185 -0
- package/.versions/2.0.23/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.0.23/.pi/harnesses/lib/clarification-policy.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/lib/coms-core-io.ts +415 -0
- package/.versions/2.0.23/.pi/harnesses/lib/coms-core.ts +686 -0
- package/.versions/2.0.23/.pi/harnesses/lib/coms-registry-entry.ts +99 -0
- package/.versions/2.0.23/.pi/harnesses/lib/context-budget-child-prompt.ts +214 -0
- package/.versions/2.0.23/.pi/harnesses/lib/context-budget-hub-prompt.ts +121 -0
- package/.versions/2.0.23/.pi/harnesses/lib/context-budget-view.ts +112 -0
- package/.versions/2.0.23/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.23/.pi/harnesses/lib/context-compaction-policy.js +35 -0
- package/.versions/2.0.23/.pi/harnesses/lib/damage-action-hash.ts +28 -0
- package/.versions/2.0.23/.pi/harnesses/lib/damage-control-shared.ts +245 -0
- package/.versions/2.0.23/.pi/harnesses/lib/damage-guard-port.ts +25 -0
- package/.versions/2.0.23/.pi/harnesses/lib/damage-policy.ts +35 -0
- package/.versions/2.0.23/.pi/harnesses/lib/damage-result-evidence.ts +25 -0
- package/.versions/2.0.23/.pi/harnesses/lib/damage-result-view.ts +16 -0
- package/.versions/2.0.23/.pi/harnesses/lib/deterministic-handle-path.ts +25 -0
- package/.versions/2.0.23/.pi/harnesses/lib/execution-trace.ts +45 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-dashboard-view.ts +172 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-read-model.ts +609 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
- package/.versions/2.0.23/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.23/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.23/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.23/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.23/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.23/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.23/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.23/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.23/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.23/.pi/harnesses/lib/identical-dialog.ts +27 -0
- package/.versions/2.0.23/.pi/harnesses/lib/installation-state.js +62 -0
- package/.versions/2.0.23/.pi/harnesses/lib/peer-target.ts +24 -0
- package/.versions/2.0.23/.pi/harnesses/lib/policy-roots.js +117 -0
- package/.versions/2.0.23/.pi/harnesses/lib/policy-roots.ts +32 -0
- package/.versions/2.0.23/.pi/harnesses/lib/process-shared.ts +9 -0
- package/.versions/2.0.23/.pi/harnesses/lib/resource-closure.js +26 -0
- package/.versions/2.0.23/.pi/harnesses/lib/safe-source-read.js +29 -0
- package/.versions/2.0.23/.pi/harnesses/lib/semantic-approval.ts +80 -0
- package/.versions/2.0.23/.pi/harnesses/lib/session-target.ts +62 -0
- package/.versions/2.0.23/.pi/harnesses/lib/spawned-peers.js +191 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config-agentic.js +15 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config-context-compaction.js +16 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config-damage-guard.js +24 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config-file-discovery.js +23 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config-json.js +37 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config-loader.js +53 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config-proactive.js +68 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config-triage.js +42 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config-v2.js +112 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/config.js +50 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/contracts.ts +154 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/demo.ts +95 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/payload-screen.ts +65 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/selection.js +11 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/worktree-scopes.js +110 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/worktree-scopes.ts +13 -0
- package/.versions/2.0.23/.pi/harnesses/lib/system1/worktree-service.ts +24 -0
- package/.versions/2.0.23/.pi/harnesses/lib/target-capabilities.js +7 -0
- package/.versions/2.0.23/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.23/.pi/harnesses/lib/workspace-context.js +115 -0
- package/.versions/2.0.23/.pi/harnesses/lib/workspace-context.ts +22 -0
- package/.versions/2.0.23/.pi/harnesses/package-lock.json +2121 -0
- package/.versions/2.0.23/.pi/harnesses/package.json +13 -0
- package/.versions/2.0.23/.pi/prompts/af-build.md +27 -0
- package/.versions/2.0.23/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.23/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.0.23/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.23/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.23/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.23/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.23/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.0.23/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.23/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.23/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.23/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.23/.version +1 -0
- package/.versions/2.0.23/agents/architect.md +24 -0
- package/.versions/2.0.23/agents/bowser.md +28 -0
- package/.versions/2.0.23/agents/builder.md +55 -0
- package/.versions/2.0.23/agents/code-reviewer.md +209 -0
- package/.versions/2.0.23/agents/deep-researcher.md +32 -0
- package/.versions/2.0.23/agents/documenter.md +22 -0
- package/.versions/2.0.23/agents/orchestrator.md +22 -0
- package/.versions/2.0.23/agents/plan-reviewer.md +83 -0
- package/.versions/2.0.23/agents/planner.md +107 -0
- package/.versions/2.0.23/agents/releaser.md +24 -0
- package/.versions/2.0.23/agents/researcher.md +30 -0
- package/.versions/2.0.23/agents/security-auditor.md +167 -0
- package/.versions/2.0.23/agents/test-engineer.md +153 -0
- package/.versions/2.0.23/agents/web-debugger.md +44 -0
- package/.versions/2.0.23/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.23/bin/catalog/harness-runtime-closure.json +85 -0
- package/.versions/2.0.23/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.23/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.23/docs/ARCHITECTURE.md +1023 -0
- package/.versions/2.0.23/docs/agent-fleet-setup.md +1106 -0
- package/.versions/2.0.23/docs/claude-code-coms-bridge.md +147 -0
- package/.versions/2.0.23/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.23/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.23/docs/getting-started.md +126 -0
- package/.versions/2.0.23/docs/npm-install.md +535 -0
- package/.versions/2.0.23/docs/pi-extensions.md +455 -0
- package/.versions/2.0.23/docs/pi-setup.md +92 -0
- package/.versions/2.0.23/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.23/install-manifest.json +3251 -0
- package/.versions/2.0.23/justfile +247 -0
- package/.versions/2.0.23/manifest-meta.json +1096 -0
- package/.versions/2.0.23/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.23/references/communication-contract.md +26 -0
- package/.versions/2.0.23/references/definition-of-done.md +67 -0
- package/.versions/2.0.23/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.23/references/observability-checklist.md +92 -0
- package/.versions/2.0.23/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.23/references/performance-checklist.md +236 -0
- package/.versions/2.0.23/references/prompting-patterns.md +380 -0
- package/.versions/2.0.23/references/security-checklist.md +245 -0
- package/.versions/2.0.23/references/testing-patterns.md +235 -0
- package/.versions/2.0.23/references/workflow-authoring.md +304 -0
- package/.versions/2.0.23/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.23/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.23/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.23/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.23/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.0.23/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.23/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.0.23/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.23/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.23/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.23/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.23/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.23/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.23/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.23/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.23/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.23/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.23/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.23/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.23/skills/incremental-implementation/SKILL.md +353 -0
- package/.versions/2.0.23/skills/incremental-implementation.zip +0 -0
- package/.versions/2.0.23/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.23/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.0.23/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.23/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.23/skills/planning-and-task-breakdown/SKILL.md +318 -0
- package/.versions/2.0.23/skills/planning-and-task-breakdown.zip +0 -0
- package/.versions/2.0.23/skills/repository-ai-setup/SKILL.md +135 -0
- package/.versions/2.0.23/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/.versions/2.0.23/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/.versions/2.0.23/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/.versions/2.0.23/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/.versions/2.0.23/skills/repository-ai-setup/references/verify-setup.md +20 -0
- package/.versions/2.0.23/skills/repository-ai-setup.zip +0 -0
- package/.versions/2.0.23/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.23/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.0.23/skills/spec-driven-development.zip +0 -0
- package/.versions/2.0.23/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.0.23/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/CHANGELOG.md +15 -0
- package/README.md +4 -1
- package/agents/architect.md +1 -1
- package/agents/bowser.md +1 -1
- package/agents/builder.md +1 -1
- package/agents/code-reviewer.md +1 -1
- package/agents/deep-researcher.md +1 -1
- package/agents/documenter.md +1 -1
- package/agents/orchestrator.md +1 -1
- package/agents/plan-reviewer.md +1 -1
- package/agents/planner.md +1 -1
- package/agents/releaser.md +1 -1
- package/agents/researcher.md +1 -1
- package/agents/security-auditor.md +1 -1
- package/agents/test-engineer.md +1 -1
- package/agents/web-debugger.md +1 -1
- package/agents/web-performance-auditor.md +1 -1
- package/bin/catalog/harness-runtime-closure.json +12 -0
- package/docs/ARCHITECTURE.md +41 -0
- package/docs/agent-fleet-setup.md +5 -2
- package/docs/session-worktree-targeting.md +99 -0
- package/docs/workflows.md +4 -0
- package/install-manifest.json +43 -2
- package/justfile +6 -6
- package/manifest-meta.json +8 -0
- package/package.json +3 -2
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Setup flow: discovery → proposal → grilling → diff → apply → verify
|
|
2
|
+
|
|
3
|
+
Detailed checklists for the `repository-ai-setup` skill. Normative gates live
|
|
4
|
+
in `../SKILL.md`; this reference holds the executable shape of each phase and
|
|
5
|
+
the CLI handoff. It contains no overrides merge algorithm — settings changes
|
|
6
|
+
use `agent-fleet configure` only.
|
|
7
|
+
|
|
8
|
+
## 1. Discovery checklist
|
|
9
|
+
|
|
10
|
+
- Resolve target root and git state (`git status --short`, current branch).
|
|
11
|
+
- Read: existing `.ai/rules`, `.ai/commands`, `.ai/agent-prompts` (indexes
|
|
12
|
+
first, then task-relevant entries); `.ai/agent-fleet-overrides.md` (`rules:`,
|
|
13
|
+
`docs:` under `## agent-hub`); `AGENTS.md` / `CLAUDE.md` pointers; docs
|
|
14
|
+
entry points and their index files.
|
|
15
|
+
- Inventory with representative evidence, not counts: language manifests and
|
|
16
|
+
lockfiles; formatter / linter / analyzer configs; build and test commands;
|
|
17
|
+
CI workflows; module boundaries with actual consumers; existing document
|
|
18
|
+
templates (PRD / ADR / runbook); current quality gates (`quality:` under
|
|
19
|
+
`## workflows`, CONSTRAINTS.md when present).
|
|
20
|
+
- Skip generated, vendor, build, and cache trees. Never read secret values.
|
|
21
|
+
- Classify every finding: **confirmed** (explicit policy — reuse without
|
|
22
|
+
re-asking), **proposed** (code-observed practice with cited files, scope, and
|
|
23
|
+
exceptions — needs acceptance), or **conflicting** (competing explicit
|
|
24
|
+
policies or patterns — needs a decision). Missing or unverifiable facts stay
|
|
25
|
+
unknown. Never create empty language directories or invent build commands.
|
|
26
|
+
|
|
27
|
+
## 2. Proposal shape
|
|
28
|
+
|
|
29
|
+
Present, in chat or a session artifact per the target docs policy:
|
|
30
|
+
|
|
31
|
+
1. Proposed `.ai/` tree (new files, files to update, files untouched).
|
|
32
|
+
2. Selected catalogue profiles / roles / commands with one-line reasons tied
|
|
33
|
+
to discovery evidence.
|
|
34
|
+
3. For each new or changed file: evidence source, scope, status, and the
|
|
35
|
+
observable check that will verify it.
|
|
36
|
+
4. Conflicts and material deviations from catalogue intent, each mapped to a
|
|
37
|
+
grilling question — never resolved silently.
|
|
38
|
+
5. Settings delta as CLI arguments (roots only), not file edits.
|
|
39
|
+
|
|
40
|
+
Each adapted file must be a complete project file: concrete trigger, rules,
|
|
41
|
+
applicable paths, accepted exceptions, verification, and real `.ai/` or docs
|
|
42
|
+
references. Catalogue source paths are source references, never target links.
|
|
43
|
+
|
|
44
|
+
## 3. Grilling format
|
|
45
|
+
|
|
46
|
+
One question at a time. Each question carries:
|
|
47
|
+
|
|
48
|
+
- the evidence found (files, competing examples, tooling),
|
|
49
|
+
- 2–4 real options,
|
|
50
|
+
- the orchestrator's **recommendation with reason**,
|
|
51
|
+
- the material trade-off of deciding otherwise.
|
|
52
|
+
|
|
53
|
+
Typical families: canonical practice among conflicting patterns; formatter /
|
|
54
|
+
analyzer policy vs. established variants (no semantic reorder); local module
|
|
55
|
+
boundaries and exceptions; allowed document types, paths, and indexes;
|
|
56
|
+
blocking vs. advisory verification and which existing checker owns it; which
|
|
57
|
+
optional roles and tool integrations materially help; handling of existing
|
|
58
|
+
edits, replacements, retirements, and unresolved conflicts.
|
|
59
|
+
|
|
60
|
+
Record each outcome as accepted / rejected / deferred in the proposal.
|
|
61
|
+
Deferred blocks its dependent change. Zero open decisions is a result — report
|
|
62
|
+
it and proceed. In headless runs produce analysis and proposal only.
|
|
63
|
+
|
|
64
|
+
## 4. Diff, apply, verify
|
|
65
|
+
|
|
66
|
+
1. Show the concrete candidate diff preserving unrelated content, with the
|
|
67
|
+
recorded decisions reflected. Honor prior authorization; re-check bytes if
|
|
68
|
+
the repo moved since preview.
|
|
69
|
+
2. Classify each target file with `classifyProjectFile` (unchanged,
|
|
70
|
+
local-edit, source-update, conflict, unknown/deleted) and act per the
|
|
71
|
+
update contract: no-op stays byte-identical; local edits are preserved;
|
|
72
|
+
source updates and conflicts need review and explicit reconciliation —
|
|
73
|
+
never an automatic three-way merge; unknown files are adopted explicitly.
|
|
74
|
+
3. Write accepted content with `applyAcceptedProjectFiles` (or the equivalent
|
|
75
|
+
reviewed write path), then update the sidecar only for files successfully
|
|
76
|
+
written and re-read. Preserve / skip never changes `appliedHash`. A
|
|
77
|
+
stale preview or interrupted apply is reported, never counted as success.
|
|
78
|
+
4. Settings handoff — the skill shows the CLI diff; the CLI performs the
|
|
79
|
+
write. Preview first (zero writes):
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
agent-fleet configure --rules .ai/rules --docs docs/README.md --dry-run --workspace <project>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Review `before`, `after`, and `expectedHash`, then apply exactly the
|
|
86
|
+
previewed roots:
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
agent-fleet configure --rules .ai/rules --docs docs/README.md --expect-hash <expectedHash> --yes --workspace <project>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Omit a key to leave it byte-identical. Repeat the preview to confirm a
|
|
93
|
+
no-op. Missing configured paths warn and continue; they never fail setup.
|
|
94
|
+
|
|
95
|
+
## 5. Verification checklist
|
|
96
|
+
|
|
97
|
+
- Links resolve to real target files; no catalogue paths leak into `.ai/`.
|
|
98
|
+
- Triggers fire on the intended task intents; no empty rules block when the
|
|
99
|
+
index is absent.
|
|
100
|
+
- No stale placeholders, no invented paths, checks, or commands.
|
|
101
|
+
- Overrides contain the accepted roots and nothing else changed; unknown
|
|
102
|
+
sections, comments, and unrelated settings intact.
|
|
103
|
+
- Target-local slash adapters resolve their canonical `.ai/commands` source;
|
|
104
|
+
agent prompts resolve by reference; no global registration, no automatic
|
|
105
|
+
personas.
|
|
106
|
+
- Clean-session check: the configured policy loads for planning before edit
|
|
107
|
+
without repeating any instruction.
|
|
108
|
+
- Unchanged rerun regenerates nothing and changes no bytes or metadata.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Verify a setup: clean-session behavior and binding checks
|
|
2
|
+
|
|
3
|
+
Run after every apply, before reporting setup complete. Findings here are structural; they never certify semantic compliance of the prose — the reviewer still checks claims against evidence.
|
|
4
|
+
|
|
5
|
+
## Clean-session check
|
|
6
|
+
|
|
7
|
+
Start a fresh session (or a fresh prompt context) and confirm the configured policy loads for planning before any edit, without repeating any instruction from this setup conversation. A settings change takes effect in a new session, never the current one.
|
|
8
|
+
|
|
9
|
+
## Binding sweep
|
|
10
|
+
|
|
11
|
+
- Links: every reference in the new and touched `.ai/` files resolves to a real target file; no catalogue (`catalog/…`) path leaks into `.ai/`.
|
|
12
|
+
- Triggers: each new rule names the task intent that loads it; no empty rules block when the index is absent.
|
|
13
|
+
- Placeholders: no stale template markers, no invented paths, checks, or commands.
|
|
14
|
+
- Overrides: `agent-fleet configure --dry-run` repeats as a no-op (`write: false`); unknown sections, comments, and unrelated settings are intact.
|
|
15
|
+
- Adapters: each selected command has exactly one target-local slash adapter resolving its canonical `.ai/commands` source; agent prompts resolve by reference with no global registration and no automatic personas.
|
|
16
|
+
- Provenance: every applied file has a sidecar entry with origin, evidence, accepted decision, and `appliedHash`; current bytes match `appliedHash` (re-classify to confirm `unchanged`).
|
|
17
|
+
|
|
18
|
+
## Small later edits
|
|
19
|
+
|
|
20
|
+
Direct edits and compound-learning iterations are local modifications: the next setup classifies them as `local-edit`, preserves them, and reconciles explicitly. They never silently become template updates. See `apply-contract.md` for the classification actions.
|
|
Binary file
|
|
@@ -0,0 +1,524 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-and-hardening
|
|
3
|
+
description: Hardens code against vulnerabilities. Use when auditing an input handler for vulnerabilities, when handling user input, authentication, data storage, or external integrations, or when checking a login flow is safe against the OWASP Top Ten. Use when building any feature that accepts untrusted data, manages user sessions, or interacts with third-party services. Use when auditing dependencies for known vulnerabilities, triaging package-manager audit findings, or assessing supply-chain risk in a new package. Use when personal data or privacy compliance (GDPR, CCPA) is involved.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Security and Hardening
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Security-first development practices for web applications. Treat every external input as hostile, every secret as sacred, and every authorization check as mandatory. Security isn't a phase — it's a constraint on every line of code that touches user data, authentication, or external systems.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- Building anything that accepts user input
|
|
15
|
+
- Implementing authentication or authorization
|
|
16
|
+
- Storing or transmitting sensitive data
|
|
17
|
+
- Integrating with external APIs or services
|
|
18
|
+
- Adding file uploads, webhooks, or callbacks
|
|
19
|
+
- Handling payment or PII data
|
|
20
|
+
|
|
21
|
+
## Process: Threat Model First
|
|
22
|
+
|
|
23
|
+
Controls bolted on without a threat model are guesses. Before hardening, spend five minutes thinking like an attacker:
|
|
24
|
+
|
|
25
|
+
1. **Map the trust boundaries.** Where does untrusted data cross into your system? HTTP requests, form fields, file uploads, webhooks, third-party APIs, message queues, and **LLM output** — plus the local values that look internal because the OS handed them to you: another process's command line or environment, filenames on a shared volume, a path in a job payload. Trust follows who *wrote* a value, not which channel delivered it. Every boundary is attack surface.
|
|
26
|
+
2. **Name the assets.** What's worth stealing or breaking? Credentials, PII, payment data, admin actions, money movement.
|
|
27
|
+
3. **Run STRIDE over each boundary** — a quick lens, not a ceremony:
|
|
28
|
+
|
|
29
|
+
| Threat | Ask | Typical mitigation |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| **S**poofing | Can someone impersonate a user/service? | Authentication, signature verification |
|
|
32
|
+
| **T**ampering | Can data be altered in transit or at rest? | Integrity checks, parameterized queries, HTTPS |
|
|
33
|
+
| **R**epudiation | Can an action be denied later? | Audit logging of security events |
|
|
34
|
+
| **I**nformation disclosure | Can data leak? | Encryption, field allowlists, generic errors |
|
|
35
|
+
| **D**enial of service | Can it be overwhelmed? | Rate limiting, input size caps, timeouts |
|
|
36
|
+
| **E**levation of privilege | Can a user gain rights they shouldn't? | Authorization checks, least privilege |
|
|
37
|
+
|
|
38
|
+
4. **Write abuse cases next to use cases.** For each feature, ask "how would I misuse this?" — then make that your first test.
|
|
39
|
+
|
|
40
|
+
If you can't name the trust boundaries for a feature, you're not ready to secure it. This is OWASP **A04: Insecure Design** — most breaches begin in design, not code.
|
|
41
|
+
|
|
42
|
+
## The Three-Tier Boundary System
|
|
43
|
+
|
|
44
|
+
### Always Do (No Exceptions)
|
|
45
|
+
|
|
46
|
+
- **Validate all external input** at the system boundary (API routes, form handlers)
|
|
47
|
+
- **Parameterize all database queries** — never concatenate user input into SQL
|
|
48
|
+
- **Encode output** to prevent XSS (use framework auto-escaping, don't bypass it)
|
|
49
|
+
- **Use HTTPS** for all external communication
|
|
50
|
+
- **Hash passwords** with bcrypt/scrypt/argon2 (never store plaintext)
|
|
51
|
+
- **Set security headers** (CSP, HSTS, X-Frame-Options, X-Content-Type-Options)
|
|
52
|
+
- **Use httpOnly, secure, sameSite cookies** for sessions
|
|
53
|
+
- **Run the detected package manager's native audit** against the committed lockfile before every release
|
|
54
|
+
|
|
55
|
+
### Ask First (Requires Human Approval)
|
|
56
|
+
|
|
57
|
+
- Adding new authentication flows or changing auth logic
|
|
58
|
+
- Storing new categories of sensitive data (PII, payment info)
|
|
59
|
+
- Adding new external service integrations
|
|
60
|
+
- Changing CORS configuration
|
|
61
|
+
- Adding file upload handlers
|
|
62
|
+
- Modifying rate limiting or throttling
|
|
63
|
+
- Granting elevated permissions or roles
|
|
64
|
+
|
|
65
|
+
### Never Do
|
|
66
|
+
|
|
67
|
+
- **Never commit secrets** to version control (API keys, passwords, tokens)
|
|
68
|
+
- **Never log sensitive data** (passwords, tokens, full credit card numbers)
|
|
69
|
+
- **Never trust client-side validation** as a security boundary
|
|
70
|
+
- **Never disable security headers** for convenience
|
|
71
|
+
- **Never use `eval()` or `innerHTML`** with user-provided data
|
|
72
|
+
- **Never store sessions in client-accessible storage** (localStorage for auth tokens)
|
|
73
|
+
- **Never expose stack traces** or internal error details to users
|
|
74
|
+
|
|
75
|
+
## OWASP Top 10 Prevention Patterns
|
|
76
|
+
|
|
77
|
+
These are prevention patterns, not a ranking. For the 2021 ordering, see the quick-reference table in `../../references/security-checklist.md`.
|
|
78
|
+
|
|
79
|
+
### Injection (SQL, NoSQL, OS Command)
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
// BAD: SQL injection via string concatenation
|
|
83
|
+
const query = `SELECT * FROM users WHERE id = '${userId}'`;
|
|
84
|
+
|
|
85
|
+
// GOOD: Parameterized query
|
|
86
|
+
const user = await db.query('SELECT * FROM users WHERE id = $1', [userId]);
|
|
87
|
+
|
|
88
|
+
// GOOD: ORM with parameterized input
|
|
89
|
+
const user = await prisma.user.findUnique({ where: { id: userId } });
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Broken Authentication
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
// Password hashing
|
|
96
|
+
import { hash, compare } from 'bcrypt';
|
|
97
|
+
|
|
98
|
+
const SALT_ROUNDS = 12;
|
|
99
|
+
const hashedPassword = await hash(plaintext, SALT_ROUNDS);
|
|
100
|
+
const isValid = await compare(plaintext, hashedPassword);
|
|
101
|
+
|
|
102
|
+
// Session management
|
|
103
|
+
app.use(session({
|
|
104
|
+
secret: process.env.SESSION_SECRET, // From environment, not code
|
|
105
|
+
resave: false,
|
|
106
|
+
saveUninitialized: false,
|
|
107
|
+
cookie: {
|
|
108
|
+
httpOnly: true, // Not accessible via JavaScript
|
|
109
|
+
secure: true, // HTTPS only
|
|
110
|
+
sameSite: 'lax', // CSRF protection
|
|
111
|
+
maxAge: 24 * 60 * 60 * 1000, // 24 hours
|
|
112
|
+
},
|
|
113
|
+
}));
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Cross-Site Scripting (XSS)
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
119
|
+
// BAD: Rendering user input as HTML
|
|
120
|
+
element.innerHTML = userInput;
|
|
121
|
+
|
|
122
|
+
// GOOD: Use framework auto-escaping (React does this by default)
|
|
123
|
+
return <div>{userInput}</div>;
|
|
124
|
+
|
|
125
|
+
// If you MUST render HTML, sanitize first
|
|
126
|
+
import DOMPurify from 'dompurify';
|
|
127
|
+
const clean = DOMPurify.sanitize(userInput);
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Broken Access Control
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
133
|
+
// Always check authorization, not just authentication
|
|
134
|
+
app.patch('/api/tasks/:id', authenticate, async (req, res) => {
|
|
135
|
+
const task = await taskService.findById(req.params.id);
|
|
136
|
+
|
|
137
|
+
// Check that the authenticated user owns this resource
|
|
138
|
+
if (task.ownerId !== req.user.id) {
|
|
139
|
+
return res.status(403).json({
|
|
140
|
+
error: { code: 'FORBIDDEN', message: 'Not authorized to modify this task' }
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Proceed with update
|
|
145
|
+
const updated = await taskService.update(req.params.id, req.body);
|
|
146
|
+
return res.json(updated);
|
|
147
|
+
});
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Security Misconfiguration
|
|
151
|
+
|
|
152
|
+
```typescript
|
|
153
|
+
// Security headers (use helmet for Express)
|
|
154
|
+
import helmet from 'helmet';
|
|
155
|
+
app.use(helmet());
|
|
156
|
+
|
|
157
|
+
// Content Security Policy
|
|
158
|
+
app.use(helmet.contentSecurityPolicy({
|
|
159
|
+
directives: {
|
|
160
|
+
defaultSrc: ["'self'"],
|
|
161
|
+
scriptSrc: ["'self'"],
|
|
162
|
+
styleSrc: ["'self'", "'unsafe-inline'"], // Tighten if possible
|
|
163
|
+
imgSrc: ["'self'", 'data:', 'https:'],
|
|
164
|
+
connectSrc: ["'self'"],
|
|
165
|
+
},
|
|
166
|
+
}));
|
|
167
|
+
|
|
168
|
+
// CORS — restrict to known origins
|
|
169
|
+
app.use(cors({
|
|
170
|
+
origin: process.env.ALLOWED_ORIGINS?.split(',') || 'http://localhost:3000',
|
|
171
|
+
credentials: true,
|
|
172
|
+
}));
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Sensitive Data Exposure
|
|
176
|
+
|
|
177
|
+
```typescript
|
|
178
|
+
// Never return sensitive fields in API responses
|
|
179
|
+
function sanitizeUser(user: UserRecord): PublicUser {
|
|
180
|
+
const { passwordHash, resetToken, ...publicFields } = user;
|
|
181
|
+
return publicFields;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Use environment variables for secrets
|
|
185
|
+
const API_KEY = process.env.STRIPE_API_KEY;
|
|
186
|
+
if (!API_KEY) throw new Error('STRIPE_API_KEY not configured');
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Server-Side Request Forgery (SSRF)
|
|
190
|
+
|
|
191
|
+
Any time the server fetches a URL the user influenced — webhooks, "import from URL", image proxies, link previews — an attacker can aim it at internal services (cloud metadata, `localhost`, private IPs).
|
|
192
|
+
|
|
193
|
+
```typescript
|
|
194
|
+
// BAD: fetch whatever the user gives you
|
|
195
|
+
await fetch(req.body.webhookUrl);
|
|
196
|
+
|
|
197
|
+
// GOOD: allowlist scheme + host, reject if ANY resolved IP is private, forbid redirects
|
|
198
|
+
import { lookup } from 'node:dns/promises';
|
|
199
|
+
import ipaddr from 'ipaddr.js';
|
|
200
|
+
|
|
201
|
+
const ALLOWED_HOSTS = new Set(['hooks.example.com']);
|
|
202
|
+
|
|
203
|
+
async function assertSafeUrl(raw: string): Promise<URL> {
|
|
204
|
+
const url = new URL(raw);
|
|
205
|
+
if (url.protocol !== 'https:') throw new Error('https only');
|
|
206
|
+
if (!ALLOWED_HOSTS.has(url.hostname)) throw new Error('host not allowed');
|
|
207
|
+
// Resolve ALL records; a single private/reserved address fails the check.
|
|
208
|
+
const addrs = await lookup(url.hostname, { all: true });
|
|
209
|
+
if (addrs.some((a) => ipaddr.parse(a.address).range() !== 'unicast')) {
|
|
210
|
+
throw new Error('private/reserved IP');
|
|
211
|
+
}
|
|
212
|
+
return url;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
await fetch(await assertSafeUrl(req.body.webhookUrl), { redirect: 'error' });
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
The `range() !== 'unicast'` check covers loopback, link-local `169.254.169.254` (cloud metadata, the #1 SSRF target), private, and unique-local ranges across IPv4 and IPv6.
|
|
219
|
+
|
|
220
|
+
**Caveat — this still has a TOCTOU gap.** `fetch` resolves DNS again after the check, so an attacker using a short-TTL record can rebind to an internal IP between validation and connection. For high-risk surfaces, resolve once and connect to the pinned IP, or put a filtering agent in front (`request-filtering-agent` / `ssrf-req-filter`).
|
|
221
|
+
|
|
222
|
+
## Input Validation Patterns
|
|
223
|
+
|
|
224
|
+
### Schema Validation at Boundaries
|
|
225
|
+
|
|
226
|
+
```typescript
|
|
227
|
+
import { z } from 'zod';
|
|
228
|
+
|
|
229
|
+
const CreateTaskSchema = z.object({
|
|
230
|
+
title: z.string().min(1).max(200).trim(),
|
|
231
|
+
description: z.string().max(2000).optional(),
|
|
232
|
+
priority: z.enum(['low', 'medium', 'high']).default('medium'),
|
|
233
|
+
dueDate: z.string().datetime().optional(),
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
// Validate at the route handler
|
|
237
|
+
app.post('/api/tasks', async (req, res) => {
|
|
238
|
+
const result = CreateTaskSchema.safeParse(req.body);
|
|
239
|
+
if (!result.success) {
|
|
240
|
+
return res.status(422).json({
|
|
241
|
+
error: {
|
|
242
|
+
code: 'VALIDATION_ERROR',
|
|
243
|
+
message: 'Invalid input',
|
|
244
|
+
details: result.error.flatten(),
|
|
245
|
+
},
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
// result.data is now typed and validated
|
|
249
|
+
const task = await taskService.create(result.data);
|
|
250
|
+
return res.status(201).json(task);
|
|
251
|
+
});
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### File Upload Safety
|
|
255
|
+
|
|
256
|
+
```typescript
|
|
257
|
+
// Restrict file types and sizes
|
|
258
|
+
const ALLOWED_TYPES = ['image/jpeg', 'image/png', 'image/webp'];
|
|
259
|
+
const MAX_SIZE = 5 * 1024 * 1024; // 5MB
|
|
260
|
+
|
|
261
|
+
function validateUpload(file: UploadedFile) {
|
|
262
|
+
if (!ALLOWED_TYPES.includes(file.mimetype)) {
|
|
263
|
+
throw new ValidationError('File type not allowed');
|
|
264
|
+
}
|
|
265
|
+
if (file.size > MAX_SIZE) {
|
|
266
|
+
throw new ValidationError('File too large (max 5MB)');
|
|
267
|
+
}
|
|
268
|
+
// Don't trust the file extension — check magic bytes if critical
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Destructive Operations on Derived Paths
|
|
273
|
+
|
|
274
|
+
A delete, move, or overwrite is only as safe as the value that names its target. Reading that value from the kernel, a job payload, or a sibling service proves where it *arrived from*, not who *wrote* it — another process's command line is as attacker-controlled as a form field. A shape check ("absolute path, at least one directory deep") proves well-formedness and gets mistaken for authorization; that is how a cleanup routine deletes the root instead of the leaf.
|
|
275
|
+
|
|
276
|
+
Before a destructive call, require all three: the resolved target sits under an **allowlisted root** (compare after resolving symlinks, never on the raw string); it is at least one level **below** that root, so a root is never itself the target; and it carries **evidence that it is yours**, read *before* the operation and before any teardown that removes it — otherwise "absent" and "not mine" are indistinguishable. On refusal, log the rejected target and stop: a cleanup that falls back to a broader default path is the failure this guards against. Worked example in `../../references/security-checklist.md`.
|
|
277
|
+
|
|
278
|
+
Two limits, because the check reads stronger than it is. A marker inside the tree is self-attestation — anything that can write there can write the marker — so the expected owner has to come from authenticated state, and the marker needs integrity protection (restrictive ownership, or a MAC) before it counts as authorization. And resolving a path and then operating on the *name* is a check/use race wherever an untrusted process can swap an ancestor: on a shared volume, hold the target by descriptor and use no-follow, beneath-the-root operations, or make sure the hierarchy cannot change for the duration.
|
|
279
|
+
|
|
280
|
+
## Triaging Dependency Audit Results
|
|
281
|
+
|
|
282
|
+
Package-manager audits report known advisories; they do not prove a package is trustworthy or that vulnerable code is reachable. Use this decision tree:
|
|
283
|
+
|
|
284
|
+
```
|
|
285
|
+
The native package-manager audit reports a vulnerability
|
|
286
|
+
├── Severity: critical or high
|
|
287
|
+
│ ├── Is the vulnerable code reachable in runtime, build, test, or deployment paths?
|
|
288
|
+
│ │ ├── YES --> Fix immediately (update, patch, or replace the dependency)
|
|
289
|
+
│ │ └── NO (confirmed unused across those paths) --> Fix soon, but not a blocker
|
|
290
|
+
│ └── Is a fix available?
|
|
291
|
+
│ ├── YES --> Update to the patched version
|
|
292
|
+
│ └── NO --> Check for workarounds, consider replacing the dependency, or add to allowlist with a review date
|
|
293
|
+
├── Severity: moderate
|
|
294
|
+
│ ├── Reachable in production? --> Fix in the next release cycle
|
|
295
|
+
│ └── Dev-only? --> Fix when convenient, track in backlog
|
|
296
|
+
└── Severity: low
|
|
297
|
+
└── Track and fix during regular dependency updates
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
**Key questions:**
|
|
301
|
+
- Is the vulnerable function actually called in your code path?
|
|
302
|
+
- Is the dependency a runtime dependency or dev-only?
|
|
303
|
+
- Is the vulnerability exploitable given your deployment context (e.g., a server-side vulnerability in a client-only app)?
|
|
304
|
+
|
|
305
|
+
When you defer a fix, document the reason and set a review date.
|
|
306
|
+
|
|
307
|
+
### Supply-Chain Hygiene
|
|
308
|
+
|
|
309
|
+
Do not assume npm or treat the nearest manifest as the install root. Apply this order:
|
|
310
|
+
|
|
311
|
+
1. **Find the installation boundary and manager.** Use the workspace root that owns the lockfile, or an independent nested project only when it is outside that workspace. There, corroborate `packageManager` (when present), the lockfile, and CI; stop on disagreement or competing lockfiles. Pin the manager version and use the matrix in `../../references/security-checklist.md`.
|
|
312
|
+
2. **Block dependency scripts before first execution.** Bootstrap with scripts disabled or a documented fail-closed policy, inspect the pending script source, approve only the minimum required packages, commit the policy, then verify with a clean frozen/immutable install. Never blanket-approve scripts.
|
|
313
|
+
|
|
314
|
+
Audits only find known advisories; they do not catch a newly malicious or typosquatted package. Therefore:
|
|
315
|
+
|
|
316
|
+
- **Never apply forced audit remediation automatically** (`npm audit fix --force` or equivalent). Preview the remediation, read changelogs, and test each resulting upgrade; forced fixes may cross declared dependency ranges.
|
|
317
|
+
- **Verify registry signatures and provenance where supported** (`npm audit signatures`, `pnpm audit signatures`) and treat absence as a signal to investigate, not automatic proof of compromise.
|
|
318
|
+
- **Review new dependencies, lockfile diffs, and script-policy changes together** — ownership, maintenance, release age, provenance, transitive graph, and typosquats such as `cross-env` vs `crossenv` (OWASP **A06**, **LLM03**).
|
|
319
|
+
|
|
320
|
+
## Rate Limiting
|
|
321
|
+
|
|
322
|
+
```typescript
|
|
323
|
+
import rateLimit from 'express-rate-limit';
|
|
324
|
+
|
|
325
|
+
// General API rate limit
|
|
326
|
+
app.use('/api/', rateLimit({
|
|
327
|
+
windowMs: 15 * 60 * 1000, // 15 minutes
|
|
328
|
+
max: 100, // 100 requests per window
|
|
329
|
+
standardHeaders: true,
|
|
330
|
+
legacyHeaders: false,
|
|
331
|
+
}));
|
|
332
|
+
|
|
333
|
+
// Stricter limit for auth endpoints
|
|
334
|
+
app.use('/api/auth/', rateLimit({
|
|
335
|
+
windowMs: 15 * 60 * 1000,
|
|
336
|
+
max: 10, // 10 attempts per 15 minutes
|
|
337
|
+
}));
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
**Count in a shared store once there is more than one process.** `express-rate-limit` keeps its counters in process memory by default. Behind a load balancer each instance holds its own count, so the effective limit is `max × instances`; on serverless or edge runtimes a fresh invocation starts from zero, so the auth limit above may never fire. Pass a shared `store` (Redis via `rate-limit-redis`), or use an HTTP-based limiter that works where a long-lived TCP connection does not (for example `@upstash/ratelimit`):
|
|
341
|
+
|
|
342
|
+
```typescript
|
|
343
|
+
import { Ratelimit } from '@upstash/ratelimit';
|
|
344
|
+
import { Redis } from '@upstash/redis';
|
|
345
|
+
|
|
346
|
+
const authLimiter = new Ratelimit({
|
|
347
|
+
redis: Redis.fromEnv(), // UPSTASH_REDIS_REST_URL + _TOKEN
|
|
348
|
+
limiter: Ratelimit.slidingWindow(10, '15 m'), // 10 attempts per 15 minutes, across all instances
|
|
349
|
+
});
|
|
350
|
+
const { success } = await authLimiter.limit(`login:${req.ip}`);
|
|
351
|
+
if (!success) return res.status(429).end();
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
## Secrets Management
|
|
355
|
+
|
|
356
|
+
```
|
|
357
|
+
.env files:
|
|
358
|
+
├── .env.example → Committed (template with placeholder values)
|
|
359
|
+
├── .env → NOT committed (contains real secrets)
|
|
360
|
+
└── .env.local → NOT committed (local overrides)
|
|
361
|
+
|
|
362
|
+
.gitignore must include:
|
|
363
|
+
.env
|
|
364
|
+
.env.local
|
|
365
|
+
.env.*.local
|
|
366
|
+
*.pem
|
|
367
|
+
*.key
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
**Always check before committing:**
|
|
371
|
+
```bash
|
|
372
|
+
# Check for accidentally staged secrets
|
|
373
|
+
git diff --cached | grep -i "password\|secret\|api_key\|token"
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
**If a secret is ever committed, rotate it.** Deleting the line or rewriting history is not enough — assume it's compromised the moment it reaches a remote. Revoke and reissue the key first, then purge it from history.
|
|
377
|
+
|
|
378
|
+
## Data Privacy & Compliance
|
|
379
|
+
|
|
380
|
+
Securing data is "can an attacker read it?" Privacy is "should *we* even hold it, and for how long?" — a separate question that hardening doesn't answer. The cheapest data to protect, breach, and comply over is the data you never collected. Treat personal data as a liability to minimize, not an asset to hoard.
|
|
381
|
+
|
|
382
|
+
**Know what you hold.** You can't protect or honor a deletion request for data you can't find. Classify fields as you add them:
|
|
383
|
+
|
|
384
|
+
| Class | Examples | Handling |
|
|
385
|
+
|---|---|---|
|
|
386
|
+
| **Non-personal** | Aggregates, anonymized counts | Normal handling |
|
|
387
|
+
| **Personal (PII)** | Name, email, IP, device/user IDs | Minimize, access-control, include in export/delete |
|
|
388
|
+
| **Sensitive** | Health, finance, location, biometrics, gov IDs, anything about minors | Extra basis to collect, stricter access, often encryption + audit logging |
|
|
389
|
+
|
|
390
|
+
**Operating rules:**
|
|
391
|
+
- **Minimize and set a purpose.** Collect a field only against a stated use. "It might be useful later" is not a purpose — it's latent breach scope. Don't log PII into telemetry (the `observability-and-instrumentation` skill makes the same point from the ops side).
|
|
392
|
+
- **Set retention up front, then actually delete.** Every personal-data store needs a TTL and a working deletion path — including backups, caches, search indexes, and analytics copies. Data with no expiry is a breach scheduled for later.
|
|
393
|
+
- **Support the data-subject rights your jurisdiction requires** (GDPR/CCPA and kin): export, correct, and delete on request. These are engineering features — design the schema so a user's data is *findable* and *erasable*, not smeared irreversibly across systems.
|
|
394
|
+
- **Get consent before collection or third-party sharing**, and make it auditable. Sending PII to an analytics/ad/LLM vendor is "sharing" — the user's choice gates it, and the vendor needs a data-processing agreement.
|
|
395
|
+
- **Localize defaults, don't hardcode one region's law.** Data-residency and rules differ by user location; make the policy a configurable boundary, not an assumption.
|
|
396
|
+
|
|
397
|
+
When data crosses a trust boundary, validate it as untrusted (see Input Validation above); when a privacy incident exposes personal data, the breach-notification clock is part of the postmortem — follow the `debugging-and-error-recovery` skill.
|
|
398
|
+
|
|
399
|
+
## Securing AI / LLM Features
|
|
400
|
+
|
|
401
|
+
If your app calls an LLM — chatbots, summarizers, agents, RAG — it inherits a new attack surface. Map it to the [OWASP Top 10 for LLM Applications (2025)](https://genai.owasp.org/llm-top-10/):
|
|
402
|
+
|
|
403
|
+
- **Treat all model output as untrusted input (LLM05: Improper Output Handling).** Never pass LLM output straight into `eval`, SQL, a shell, `innerHTML`, or a file path. Validate and encode it exactly as you would raw user input.
|
|
404
|
+
- **Assume prompts can be hijacked (LLM01: Prompt Injection).** Untrusted text in the context window — a user message, a fetched web page, a PDF — can carry instructions. The system prompt is not a security boundary; enforce permissions in code, not in the prompt.
|
|
405
|
+
- **Keep secrets and other users' data out of prompts (LLM02 / LLM07).** Anything in the context can be echoed back. Don't put API keys, cross-tenant data, or the full system prompt where the model can repeat it.
|
|
406
|
+
- **Constrain tool and agent permissions (LLM06: Excessive Agency).** Scope tools to the minimum, require confirmation for destructive or irreversible actions, and validate every tool argument.
|
|
407
|
+
- **Bound consumption (LLM10: Unbounded Consumption).** Cap tokens, request rate, and loop/recursion depth so a crafted input can't run up cost or hang the system.
|
|
408
|
+
- **Isolate retrieval data (LLM08: Vector and Embedding Weaknesses).** In RAG, treat the vector store as a trust boundary: partition embeddings per tenant so one user can't retrieve another's data, and validate documents before indexing so poisoned content can't steer answers.
|
|
409
|
+
|
|
410
|
+
```typescript
|
|
411
|
+
// BAD: trusting model output as a command or as markup
|
|
412
|
+
const sql = await llm.generate(`Write SQL for: ${userQuestion}`);
|
|
413
|
+
await db.query(sql); // arbitrary query execution
|
|
414
|
+
container.innerHTML = await llm.reply(userMessage); // stored XSS, via the model
|
|
415
|
+
|
|
416
|
+
// GOOD: model output is data — parse defensively, then validate, then encode
|
|
417
|
+
let intent;
|
|
418
|
+
try {
|
|
419
|
+
intent = CommandSchema.parse(JSON.parse(await llm.replyJson(userMessage)));
|
|
420
|
+
} catch {
|
|
421
|
+
throw new ValidationError('unexpected model output'); // JSON.parse or schema failed
|
|
422
|
+
}
|
|
423
|
+
await runAllowlistedAction(intent.action, intent.params);
|
|
424
|
+
container.textContent = await llm.reply(userMessage);
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
## Security Review Checklist
|
|
428
|
+
|
|
429
|
+
```markdown
|
|
430
|
+
### Authentication
|
|
431
|
+
- [ ] Passwords hashed with bcrypt/scrypt/argon2 (salt rounds ≥ 12)
|
|
432
|
+
- [ ] Session tokens are httpOnly, secure, sameSite
|
|
433
|
+
- [ ] Login has rate limiting
|
|
434
|
+
- [ ] Password reset tokens expire
|
|
435
|
+
|
|
436
|
+
### Authorization
|
|
437
|
+
- [ ] Every endpoint checks user permissions
|
|
438
|
+
- [ ] Users can only access their own resources
|
|
439
|
+
- [ ] Admin actions require admin role verification
|
|
440
|
+
|
|
441
|
+
### Input
|
|
442
|
+
- [ ] All user input validated at the boundary
|
|
443
|
+
- [ ] SQL queries are parameterized
|
|
444
|
+
- [ ] HTML output is encoded/escaped
|
|
445
|
+
- [ ] Server-side URL fetches are allowlisted (no SSRF to internal services)
|
|
446
|
+
- [ ] Delete/move/overwrite targets built from data are checked against an allowlisted root, a minimum depth, and ownership evidence read before the operation
|
|
447
|
+
|
|
448
|
+
### Data
|
|
449
|
+
- [ ] No secrets in code or version control
|
|
450
|
+
- [ ] Sensitive fields excluded from API responses
|
|
451
|
+
- [ ] PII encrypted at rest (if applicable)
|
|
452
|
+
- [ ] Personal data is classified, collected against a stated purpose, and minimized
|
|
453
|
+
- [ ] Personal data has a retention limit and a working deletion path (incl. backups/indexes)
|
|
454
|
+
- [ ] Export/delete (data-subject) requests are supported where required; sharing with third parties has consent
|
|
455
|
+
|
|
456
|
+
### Infrastructure
|
|
457
|
+
- [ ] Security headers configured (CSP, HSTS, etc.)
|
|
458
|
+
- [ ] CORS restricted to known origins
|
|
459
|
+
- [ ] Dependencies audited for vulnerabilities
|
|
460
|
+
- [ ] Error messages don't expose internals
|
|
461
|
+
|
|
462
|
+
### Supply Chain
|
|
463
|
+
- [ ] One authoritative lockfile committed; CI uses that manager's frozen/immutable install
|
|
464
|
+
- [ ] Native audit triaged by reachability and fix risk; dependency install scripts blocked unless explicitly approved
|
|
465
|
+
- [ ] New dependencies reviewed (ownership, provenance, release age, transitive graph)
|
|
466
|
+
|
|
467
|
+
### AI / LLM (if used)
|
|
468
|
+
- [ ] Model output treated as untrusted (no eval/SQL/innerHTML/shell)
|
|
469
|
+
- [ ] Secrets and other users' data kept out of prompts
|
|
470
|
+
- [ ] Tool/agent permissions scoped; destructive actions require confirmation
|
|
471
|
+
```
|
|
472
|
+
## See Also
|
|
473
|
+
|
|
474
|
+
For detailed security checklists and pre-commit verification steps, see `../../references/security-checklist.md`.
|
|
475
|
+
|
|
476
|
+
## Common Rationalizations
|
|
477
|
+
|
|
478
|
+
| Rationalization | Reality |
|
|
479
|
+
|---|---|
|
|
480
|
+
| "This is an internal tool, security doesn't matter" | Internal tools get compromised. Attackers target the weakest link. |
|
|
481
|
+
| "We'll add security later" | Security retrofitting is 10x harder than building it in. Add it now. |
|
|
482
|
+
| "No one would try to exploit this" | Automated scanners will find it. Security by obscurity is not security. |
|
|
483
|
+
| "The framework handles security" | Frameworks provide tools, not guarantees. You still need to use them correctly. |
|
|
484
|
+
| "It's just a prototype" | Prototypes become production. Security habits from day one. |
|
|
485
|
+
| "Threat modeling is overkill here" | Five minutes of "how would I attack this?" prevents the design flaws no control can patch later. |
|
|
486
|
+
| "It's just LLM output, it's only text" | That "text" can be a SQL statement, a script tag, or a shell command. Treat it like any untrusted input. |
|
|
487
|
+
| "The audit passed, so the dependency is safe" | Audits match known advisories. They do not detect a newly malicious package or make unreviewed install scripts safe to execute. |
|
|
488
|
+
| "Collect it now, we might need it later" | Data you don't hold can't be breached, subpoenaed, or mis-deleted. "Might need it" is breach scope, not a purpose. |
|
|
489
|
+
| "We'll handle deletion requests manually" | Manual erasure misses backups, caches, and analytics copies. If the schema can't find a user's data, you can't honor the request — design for it. |
|
|
490
|
+
| "Compliance is legal's problem, not ours" | Export, deletion, retention, and consent are schema and code. Legal can't bolt them on after you've smeared PII across ten systems. |
|
|
491
|
+
|
|
492
|
+
## Red Flags
|
|
493
|
+
|
|
494
|
+
- User input passed directly to database queries, shell commands, or HTML rendering
|
|
495
|
+
- A delete, move, or overwrite whose target comes from a payload, a config value, or another process's command line, guarded only by a shape check on the path
|
|
496
|
+
- Secrets in source code or commit history
|
|
497
|
+
- API endpoints without authentication or authorization checks
|
|
498
|
+
- Missing CORS configuration or wildcard (`*`) origins
|
|
499
|
+
- No rate limiting on authentication endpoints, or an in-memory limiter in front of more than one instance
|
|
500
|
+
- Stack traces or internal errors exposed to users
|
|
501
|
+
- Dependencies with known critical vulnerabilities, competing lockfiles at one installation boundary, non-reproducible installs, or blanket-approved scripts
|
|
502
|
+
- Server fetches user-supplied URLs without an allowlist (SSRF)
|
|
503
|
+
- LLM/model output passed into a query, the DOM, a shell, or `eval`
|
|
504
|
+
- Secrets, PII, or the full system prompt placed inside an LLM context window
|
|
505
|
+
- Personal data collected with no stated purpose, retention limit, or deletion path
|
|
506
|
+
- PII sent to analytics/ad/LLM vendors with no consent or data-processing agreement
|
|
507
|
+
- "Delete my account" that only flips a flag while the personal data lingers in stores and backups
|
|
508
|
+
|
|
509
|
+
## Verification
|
|
510
|
+
|
|
511
|
+
After implementing security-relevant code:
|
|
512
|
+
|
|
513
|
+
- [ ] The native audit has no unmitigated reachable critical/high findings; CI preserves the authoritative lockfile and blocks unreviewed dependency scripts
|
|
514
|
+
- [ ] No secrets in source code or git history
|
|
515
|
+
- [ ] All user input validated at system boundaries
|
|
516
|
+
- [ ] Destructive filesystem operations resolve symlinks, then verify allowlisted root, minimum depth, and ownership before running
|
|
517
|
+
- [ ] Authentication and authorization checked on every protected endpoint
|
|
518
|
+
- [ ] Security headers present in response (check with browser DevTools)
|
|
519
|
+
- [ ] Error responses don't expose internal details
|
|
520
|
+
- [ ] Rate limiting active on auth endpoints, backed by a shared store when more than one instance serves traffic
|
|
521
|
+
- [ ] Server-side URL fetches validated against an allowlist (no SSRF)
|
|
522
|
+
- [ ] LLM/model output validated and encoded before use (if AI features present)
|
|
523
|
+
- [ ] Personal data is classified, minimized to a stated purpose, and has a retention limit
|
|
524
|
+
- [ ] Deletion and export requests work end-to-end (including backups, caches, and analytics copies)
|