@chankov/agent-fleet 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pi/extensions/package-lock.json +77 -45
- package/.pi/harnesses/agent-hub/README.md +109 -18
- package/.pi/harnesses/agent-hub/budget-continuation.ts +73 -0
- package/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.pi/harnesses/agent-hub/capability-packs.ts +180 -0
- package/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
- package/.pi/harnesses/agent-hub/hub-state-audit.js +18 -0
- package/.pi/harnesses/agent-hub/index.ts +988 -422
- package/.pi/harnesses/agent-hub/package.json +1 -1
- package/.pi/harnesses/agent-hub/posture.ts +72 -17
- package/.pi/harnesses/agent-hub/run-budget.js +12 -13
- package/.pi/harnesses/agent-hub/spawn.ts +14 -2
- package/.pi/harnesses/ask-user-remote/index.ts +59 -4
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/harnesses/lib/context-budget-child-prompt.ts +179 -0
- package/.pi/harnesses/lib/context-budget-hub-prompt.ts +116 -0
- package/.pi/harnesses/lib/context-budget-view.ts +107 -0
- package/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.pi/harnesses/lib/fleet-detail-view.ts +92 -2
- package/.pi/harnesses/package-lock.json +73 -80
- package/.versions/1.0.2/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/1.0.2/.pi/agents/model-profiles.yaml +27 -0
- package/.versions/1.0.2/.pi/agents/peers.yaml +142 -0
- package/.versions/1.0.2/.pi/agents/teams.yaml +41 -0
- package/.versions/1.0.2/.pi/damage-control-rules.yaml +297 -0
- package/.versions/1.0.2/.pi/extensions/agent-fleet-update-check/README.md +57 -0
- package/.versions/1.0.2/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
- package/.versions/1.0.2/.pi/extensions/agent-fleet-update-check/package.json +6 -0
- package/.versions/1.0.2/.pi/extensions/btw/README.md +120 -0
- package/.versions/1.0.2/.pi/extensions/btw/index.ts +914 -0
- package/.versions/1.0.2/.pi/extensions/btw/package.json +6 -0
- package/.versions/1.0.2/.pi/extensions/btw/state.js +179 -0
- package/.versions/1.0.2/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/1.0.2/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/1.0.2/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/1.0.2/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/1.0.2/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/1.0.2/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/1.0.2/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/1.0.2/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/1.0.2/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/1.0.2/.pi/extensions/package-lock.json +1175 -0
- package/.versions/1.0.2/.pi/extensions/package.json +9 -0
- package/.versions/1.0.2/.pi/extensions/pi-voice-stt/README.md +205 -0
- package/.versions/1.0.2/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/1.0.2/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/1.0.2/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/1.0.2/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/1.0.2/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/1.0.2/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/README.md +1156 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/budget-continuation.ts +73 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/capability-packs.ts +180 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/context-window.js +106 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/delegate.ts +435 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/docs-lane.js +122 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/drift-watchdog.js +211 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/footer.ts +35 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/helpers.ts +266 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/hub-state-audit.js +73 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/index.ts +9909 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/posture.ts +158 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/research-retention.js +34 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/return-contract.js +293 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/return-extract.js +75 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/review-findings.js +102 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/run-budget.js +539 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/run-namespace.js +87 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/scope-gate.js +103 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/spawn.ts +366 -0
- package/.versions/1.0.2/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/1.0.2/.pi/harnesses/ask-user-remote/README.md +53 -0
- package/.versions/1.0.2/.pi/harnesses/ask-user-remote/index.ts +532 -0
- package/.versions/1.0.2/.pi/harnesses/ask-user-remote/race-core.js +106 -0
- package/.versions/1.0.2/.pi/harnesses/coms/README.md +100 -0
- package/.versions/1.0.2/.pi/harnesses/coms/index.ts +1767 -0
- package/.versions/1.0.2/.pi/harnesses/coms/package.json +7 -0
- package/.versions/1.0.2/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/1.0.2/.pi/harnesses/damage-control-continue/README.md +124 -0
- package/.versions/1.0.2/.pi/harnesses/damage-control-continue/index.ts +536 -0
- package/.versions/1.0.2/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/1.0.2/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/1.0.2/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/1.0.2/.pi/harnesses/lib/context-budget-child-prompt.ts +179 -0
- package/.versions/1.0.2/.pi/harnesses/lib/context-budget-hub-prompt.ts +116 -0
- package/.versions/1.0.2/.pi/harnesses/lib/context-budget-view.ts +107 -0
- package/.versions/1.0.2/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/1.0.2/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/1.0.2/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/1.0.2/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/1.0.2/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/1.0.2/.pi/harnesses/lib/fleet-dashboard-ops.ts +155 -0
- package/.versions/1.0.2/.pi/harnesses/lib/fleet-dashboard-view.ts +140 -0
- package/.versions/1.0.2/.pi/harnesses/lib/fleet-detail-view.ts +133 -0
- package/.versions/1.0.2/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/1.0.2/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/1.0.2/.pi/harnesses/lib/fleet-read-model.ts +131 -0
- package/.versions/1.0.2/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/1.0.2/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/1.0.2/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/1.0.2/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/1.0.2/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/1.0.2/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/1.0.2/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/1.0.2/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/1.0.2/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/1.0.2/.pi/harnesses/lib/spawned-peers.js +190 -0
- package/.versions/1.0.2/.pi/harnesses/package-lock.json +2039 -0
- package/.versions/1.0.2/.pi/harnesses/package.json +10 -0
- package/.versions/1.0.2/.pi/prompts/af-build.md +24 -0
- package/.versions/1.0.2/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/1.0.2/.pi/prompts/af-plan.md +16 -0
- package/.versions/1.0.2/.pi/prompts/af-review.md +16 -0
- package/.versions/1.0.2/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/1.0.2/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/1.0.2/.pi/prompts/af-ship.md +17 -0
- package/.versions/1.0.2/.pi/prompts/af-spec.md +15 -0
- package/.versions/1.0.2/.pi/prompts/af-test.md +19 -0
- package/.versions/1.0.2/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/1.0.2/.version +1 -0
- package/.versions/1.0.2/agents/architect.md +24 -0
- package/.versions/1.0.2/agents/bowser.md +27 -0
- package/.versions/1.0.2/agents/builder.md +54 -0
- package/.versions/1.0.2/agents/code-reviewer.md +208 -0
- package/.versions/1.0.2/agents/deep-researcher.md +32 -0
- package/.versions/1.0.2/agents/documenter.md +18 -0
- package/.versions/1.0.2/agents/orchestrator.md +20 -0
- package/.versions/1.0.2/agents/plan-reviewer.md +83 -0
- package/.versions/1.0.2/agents/planner.md +70 -0
- package/.versions/1.0.2/agents/releaser.md +24 -0
- package/.versions/1.0.2/agents/researcher.md +28 -0
- package/.versions/1.0.2/agents/security-auditor.md +167 -0
- package/.versions/1.0.2/agents/test-engineer.md +153 -0
- package/.versions/1.0.2/agents/web-debugger.md +43 -0
- package/.versions/1.0.2/agents/web-performance-auditor.md +193 -0
- package/.versions/1.0.2/bin/catalog/harness-runtime-closure.json +38 -0
- package/.versions/1.0.2/codex/CONDUCTOR.md +148 -0
- package/.versions/1.0.2/docs/ARCHITECTURE.md +369 -0
- package/.versions/1.0.2/docs/agent-fleet-setup.md +468 -0
- package/.versions/1.0.2/docs/claude-code-coms-bridge.md +128 -0
- package/.versions/1.0.2/docs/codex-remote-conductor.md +170 -0
- package/.versions/1.0.2/docs/coms-hermes-bridge.md +189 -0
- package/.versions/1.0.2/docs/getting-started.md +98 -0
- package/.versions/1.0.2/docs/npm-install.md +292 -0
- package/.versions/1.0.2/docs/pi-extensions.md +439 -0
- package/.versions/1.0.2/docs/pi-setup.md +74 -0
- package/.versions/1.0.2/docs/skill-anatomy.md +150 -0
- package/.versions/1.0.2/hermes/README.md +347 -0
- package/.versions/1.0.2/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/1.0.2/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/1.0.2/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/1.0.2/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/1.0.2/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/1.0.2/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +770 -0
- package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/1.0.2/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/1.0.2/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/1.0.2/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/1.0.2/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/1.0.2/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/1.0.2/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/1.0.2/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/1.0.2/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/1.0.2/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/1.0.2/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/1.0.2/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/1.0.2/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/1.0.2/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/1.0.2/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/1.0.2/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/1.0.2/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/1.0.2/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/1.0.2/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/1.0.2/install-manifest.json +2745 -0
- package/.versions/1.0.2/justfile +272 -0
- package/.versions/1.0.2/manifest-meta.json +882 -0
- package/.versions/1.0.2/references/accessibility-checklist.md +160 -0
- package/.versions/1.0.2/references/definition-of-done.md +67 -0
- package/.versions/1.0.2/references/fleet-coordination-patterns.md +151 -0
- package/.versions/1.0.2/references/observability-checklist.md +91 -0
- package/.versions/1.0.2/references/orchestration-patterns.md +370 -0
- package/.versions/1.0.2/references/performance-checklist.md +153 -0
- package/.versions/1.0.2/references/prompting-patterns.md +380 -0
- package/.versions/1.0.2/references/security-checklist.md +179 -0
- package/.versions/1.0.2/references/testing-patterns.md +236 -0
- package/.versions/1.0.2/scripts/codex-conductor.ts +41 -0
- package/.versions/1.0.2/scripts/codex-remote-control.ts +167 -0
- package/.versions/1.0.2/scripts/coms-claude-bridge.ts +411 -0
- package/.versions/1.0.2/scripts/coms-cli.ts +484 -0
- package/.versions/1.0.2/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/1.0.2/scripts/fleet.ts +185 -0
- package/.versions/1.0.2/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/1.0.2/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/1.0.2/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/1.0.2/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/1.0.2/scripts/lib/claude-bridge-core.ts +210 -0
- package/.versions/1.0.2/scripts/lib/codex-conductor.ts +88 -0
- package/.versions/1.0.2/scripts/lib/codex-remote-control.ts +480 -0
- package/.versions/1.0.2/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/1.0.2/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/1.0.2/scripts/lib/fleet-command.ts +266 -0
- package/.versions/1.0.2/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/1.0.2/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/1.0.2/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/1.0.2/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/1.0.2/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/1.0.2/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/1.0.2/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/1.0.2/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/1.0.2/scripts/lib/monitor-env.ts +146 -0
- package/.versions/1.0.2/scripts/lib/peer-launch.ts +318 -0
- package/.versions/1.0.2/scripts/lib/persona-banner.ts +62 -0
- package/.versions/1.0.2/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/1.0.2/scripts/lib/team-project.ts +213 -0
- package/.versions/1.0.2/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/1.0.2/scripts/peer-banner.ts +40 -0
- package/.versions/1.0.2/scripts/peer-launch.ts +259 -0
- package/.versions/1.0.2/scripts/team-snapshot.ts +237 -0
- package/.versions/1.0.2/scripts/team-up.ts +406 -0
- package/.versions/1.0.2/skills/_internal/grilling.md +11 -0
- package/.versions/1.0.2/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/1.0.2/skills/code-review-and-quality/SKILL.md +381 -0
- package/.versions/1.0.2/skills/compound-learning/SKILL.md +137 -0
- package/.versions/1.0.2/skills/context-engineering/SKILL.md +291 -0
- package/.versions/1.0.2/skills/deprecation-and-migration/SKILL.md +206 -0
- package/.versions/1.0.2/skills/designing-agents/SKILL.md +394 -0
- package/.versions/1.0.2/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/1.0.2/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/1.0.2/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/1.0.2/skills/idea-refine/SKILL.md +182 -0
- package/.versions/1.0.2/skills/idea-refine/examples.md +238 -0
- package/.versions/1.0.2/skills/idea-refine/frameworks.md +99 -0
- package/.versions/1.0.2/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/1.0.2/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/1.0.2/skills/incremental-implementation/SKILL.md +287 -0
- package/.versions/1.0.2/skills/interview-me/SKILL.md +226 -0
- package/.versions/1.0.2/skills/orchestration-verification/SKILL.md +181 -0
- package/.versions/1.0.2/skills/peer-coms/SKILL.md +90 -0
- package/.versions/1.0.2/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/1.0.2/skills/planning-and-task-breakdown/SKILL.md +254 -0
- package/.versions/1.0.2/skills/security-and-hardening/SKILL.md +461 -0
- package/.versions/1.0.2/skills/spec-driven-development/SKILL.md +257 -0
- package/.versions/1.0.2/skills/using-agent-skills/SKILL.md +199 -0
- package/.versions/1.0.2/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/README.md +11 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
- package/.versions/1.0.2/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
- package/CHANGELOG.md +9 -0
- package/README.md +4 -2
- package/agents/orchestrator.md +4 -56
- package/docs/ARCHITECTURE.md +48 -16
- package/docs/agent-fleet-setup.md +33 -2
- package/docs/pi-extensions.md +29 -2
- package/install-manifest.json +2 -2
- package/package.json +2 -2
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
export const POSTURES = ["operator", "orchestrator"] as const;
|
|
2
2
|
export type Posture = (typeof POSTURES)[number];
|
|
3
3
|
|
|
4
|
-
export const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"team_adjust",
|
|
9
|
-
"set_assertions",
|
|
10
|
-
"update_assertion",
|
|
11
|
-
"get_assertions",
|
|
12
|
-
] as const;
|
|
4
|
+
export const FLEET_TOOLS = ["dispatch_agent", "spawn_research", "set_task_tier", "team_adjust"] as const;
|
|
5
|
+
export const VERIFICATION_TOOLS = ["set_assertions", "update_assertion", "get_assertions"] as const;
|
|
6
|
+
/** Compatibility export for callers that need every orchestration-owned tool. */
|
|
7
|
+
export const ORCHESTRATION_TOOLS = [...FLEET_TOOLS, ...VERIFICATION_TOOLS] as const;
|
|
13
8
|
|
|
14
9
|
export const COMS_TOOLS = ["coms_list", "coms_send", "coms_get", "coms_await"] as const;
|
|
15
10
|
|
|
@@ -21,7 +16,7 @@ export const HERDR_TOOLS = [
|
|
|
21
16
|
"herdr_notify",
|
|
22
17
|
] as const;
|
|
23
18
|
|
|
24
|
-
const CONDITIONAL_TOOLS = new Set<string>([...COMS_TOOLS, ...HERDR_TOOLS, "ask_user"]);
|
|
19
|
+
const CONDITIONAL_TOOLS = new Set<string>([...COMS_TOOLS, ...HERDR_TOOLS, "ask_user", "request_compaction"]);
|
|
25
20
|
const HUB_OWNED_TOOLS = new Set<string>([
|
|
26
21
|
...ORCHESTRATION_TOOLS,
|
|
27
22
|
...CONDITIONAL_TOOLS,
|
|
@@ -67,6 +62,62 @@ export function resolveSessionPosture(options: {
|
|
|
67
62
|
?? resolveStartupPosture({ hasExplicitRoster: options.hasExplicitRoster });
|
|
68
63
|
}
|
|
69
64
|
|
|
65
|
+
export const NATIVE_ROSTER_STATE_VERSION = 1 as const;
|
|
66
|
+
export const NATIVE_ROSTER_ENTRY_TYPE = "agent-hub-native-roster";
|
|
67
|
+
|
|
68
|
+
export function persistedNativeRosterState(team: string): { version: 1; team: string } {
|
|
69
|
+
const normalized = String(team ?? "").trim();
|
|
70
|
+
if (!normalized) throw new Error("Native roster team name cannot be empty.");
|
|
71
|
+
return { version: NATIVE_ROSTER_STATE_VERSION, team: normalized };
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function latestPersistedNativeRoster(entries: readonly unknown[]): string | null {
|
|
75
|
+
for (let index = entries.length - 1; index >= 0; index--) {
|
|
76
|
+
const entry = entries[index] as { type?: unknown; customType?: unknown; data?: { version?: unknown; team?: unknown } } | null;
|
|
77
|
+
if (entry?.type !== "custom" || entry.customType !== NATIVE_ROSTER_ENTRY_TYPE) continue;
|
|
78
|
+
if (entry.data?.version !== NATIVE_ROSTER_STATE_VERSION || typeof entry.data.team !== "string") continue;
|
|
79
|
+
const team = entry.data.team.trim();
|
|
80
|
+
if (team) return team;
|
|
81
|
+
}
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface SessionRosterResolution {
|
|
86
|
+
source: "none" | "explicit" | "persisted";
|
|
87
|
+
roster: { name: string; members: string[] } | null;
|
|
88
|
+
diagnostic: string | null;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function resolveSessionRoster(options: {
|
|
92
|
+
teams: Readonly<Record<string, readonly string[]>>;
|
|
93
|
+
entries: readonly unknown[];
|
|
94
|
+
explicitRoster?: unknown;
|
|
95
|
+
availablePersonas: readonly string[];
|
|
96
|
+
includePersisted?: boolean;
|
|
97
|
+
}): SessionRosterResolution {
|
|
98
|
+
const explicit = typeof options.explicitRoster === "string" ? options.explicitRoster.trim() : "";
|
|
99
|
+
const persisted = options.includePersisted === false ? null : latestPersistedNativeRoster(options.entries);
|
|
100
|
+
const requested = explicit || persisted;
|
|
101
|
+
const source: SessionRosterResolution["source"] = explicit ? "explicit" : persisted ? "persisted" : "none";
|
|
102
|
+
if (!requested) return { source, roster: null, diagnostic: null };
|
|
103
|
+
|
|
104
|
+
const name = Object.keys(options.teams).find(candidate => candidate.toLowerCase() === requested.toLowerCase());
|
|
105
|
+
if (!name) {
|
|
106
|
+
const available = Object.keys(options.teams).sort().join(", ") || "(none)";
|
|
107
|
+
return { source, roster: null, diagnostic: `Native roster "${requested}" is unavailable. Select one of: ${available}.` };
|
|
108
|
+
}
|
|
109
|
+
const members = [...options.teams[name]];
|
|
110
|
+
if (members.length === 0) {
|
|
111
|
+
return { source, roster: null, diagnostic: `Native roster "${name}" has no specialists.` };
|
|
112
|
+
}
|
|
113
|
+
const available = new Set(options.availablePersonas.map(persona => persona.toLowerCase()));
|
|
114
|
+
const missing = members.filter(member => !available.has(member.toLowerCase()));
|
|
115
|
+
if (missing.length > 0) {
|
|
116
|
+
return { source, roster: null, diagnostic: `Native roster "${name}" references missing personas: ${missing.join(", ")}.` };
|
|
117
|
+
}
|
|
118
|
+
return { source, roster: { name, members }, diagnostic: null };
|
|
119
|
+
}
|
|
120
|
+
|
|
70
121
|
export function posturePrompt(posture: Posture): { intro: string; hardRules: string } {
|
|
71
122
|
if (posture === "operator") {
|
|
72
123
|
return {
|
|
@@ -79,8 +130,7 @@ export function posturePrompt(posture: Posture): { intro: string; hardRules: str
|
|
|
79
130
|
return {
|
|
80
131
|
intro: "You are a dispatcher agent — an orchestrator. You coordinate specialist agents to accomplish tasks. You do NOT have direct access to the codebase.",
|
|
81
132
|
hardRules: `- NEVER try to read, write, or execute code directly — you have no such tools.
|
|
82
|
-
- ALWAYS use \`dispatch_agent\` to get implementation work done; use \`spawn_research\` for read-only recon
|
|
83
|
-
- \`herdr_spawn_pane\` is only for auxiliary processes such as watchers or servers; NEVER use it to bypass delegation by reading, editing, testing, or implementing code in a raw pane.`,
|
|
133
|
+
- ALWAYS use \`dispatch_agent\` to get implementation work done; use \`spawn_research\` for read-only recon.`,
|
|
84
134
|
};
|
|
85
135
|
}
|
|
86
136
|
|
|
@@ -90,14 +140,19 @@ export function resolvePostureTools(options: {
|
|
|
90
140
|
comsReady: boolean;
|
|
91
141
|
herdrReady: boolean;
|
|
92
142
|
askUserAvailable: boolean;
|
|
143
|
+
/** Active and provisional packs; omitted only for legacy callers. */
|
|
144
|
+
capabilityPacks?: readonly ("core" | "fleet" | "verification" | "peer" | "workspace" | "compaction")[];
|
|
93
145
|
}): string[] {
|
|
94
|
-
const
|
|
146
|
+
const packs = new Set(options.capabilityPacks ?? ["core", "fleet", "verification", "peer", "workspace"]);
|
|
147
|
+
const tools = options.posture === "operator" && packs.has("core")
|
|
95
148
|
? options.baselineTools.filter(name => !HUB_OWNED_TOOLS.has(name))
|
|
96
149
|
: [];
|
|
97
150
|
|
|
98
|
-
tools.push(...
|
|
99
|
-
if (
|
|
100
|
-
if (options.
|
|
101
|
-
if (options.herdrReady) tools.push(...HERDR_TOOLS);
|
|
151
|
+
if (packs.has("fleet")) tools.push(...FLEET_TOOLS);
|
|
152
|
+
if (packs.has("verification")) tools.push(...VERIFICATION_TOOLS);
|
|
153
|
+
if (packs.has("peer") && options.comsReady) tools.push(...COMS_TOOLS);
|
|
154
|
+
if (packs.has("workspace") && options.herdrReady) tools.push(...HERDR_TOOLS);
|
|
155
|
+
if (packs.has("core") && options.askUserAvailable) tools.push("ask_user");
|
|
156
|
+
if (packs.has("compaction")) tools.push("request_compaction");
|
|
102
157
|
return [...new Set(tools)];
|
|
103
158
|
}
|
|
@@ -111,10 +111,10 @@ export function resolveTurnBudget(mode, overrides = {}, tier = undefined) {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
function refusalTail(mode) {
|
|
114
|
-
return "Do NOT retry this call
|
|
115
|
-
"unproven assertions and artifact paths), then
|
|
116
|
-
"
|
|
117
|
-
`with /af-hub-mode (current: ${mode}) or the max-*-per-turn / turn-wall-time-s keys ` +
|
|
114
|
+
return "Do NOT retry this call before human confirmation. Summarize progress so far (including " +
|
|
115
|
+
"unproven assertions and artifact paths), then use the Hub's one-click budget continuation " +
|
|
116
|
+
"confirmation. Do not ask for a typed continue message or a slash command. The user can widen " +
|
|
117
|
+
`future budgets with /af-hub-mode (current: ${mode}) or the max-*-per-turn / turn-wall-time-s keys ` +
|
|
118
118
|
"in .ai/agent-fleet-overrides.md.";
|
|
119
119
|
}
|
|
120
120
|
|
|
@@ -203,8 +203,7 @@ export function budgetStatusLine(mode, counters, budget, tier = null, task = nul
|
|
|
203
203
|
//
|
|
204
204
|
// The tier now survives the turn and moves by ratchet: DOWN is free (cheap and
|
|
205
205
|
// self-limiting), UP costs an explicit reason that is recorded and shown. Only
|
|
206
|
-
// an explicit new task (set_task_tier `new_task: true
|
|
207
|
-
// it.
|
|
206
|
+
// an explicit new task (`set_task_tier` with `new_task: true`) clears it.
|
|
208
207
|
|
|
209
208
|
export const TIER_RANK = { trivial: 0, small: 1, feature: 2, project: 3 };
|
|
210
209
|
|
|
@@ -265,9 +264,9 @@ export function applyTierChange(current, next, reason = "") {
|
|
|
265
264
|
// Turn budgets are a per-message allowance, and a per-message allowance cannot
|
|
266
265
|
// bound a task: the observed 47-hour run never hit one, because every steering
|
|
267
266
|
// message opened a fresh window of 8 dispatches and 60 minutes. The task budget
|
|
268
|
-
// is the same envelope multiplied once and NOT reset by a user message
|
|
269
|
-
//
|
|
270
|
-
//
|
|
267
|
+
// is the same envelope multiplied once and NOT reset by a user message.
|
|
268
|
+
// Exhaustion is a hard stop until the human accepts one audited continuation
|
|
269
|
+
// tranche; opening a genuinely new task remains a separate lifecycle action.
|
|
271
270
|
|
|
272
271
|
export const TASK_BUDGET_MULTIPLIER = 3;
|
|
273
272
|
|
|
@@ -284,9 +283,9 @@ export function resolveTaskBudget(turnBudget, multiplier = TASK_BUDGET_MULTIPLIE
|
|
|
284
283
|
function taskRefusalTail() {
|
|
285
284
|
return "This is a HARD STOP for the current task, not a turn refusal — another user message does " +
|
|
286
285
|
"NOT reopen it. Summarize what is proven (with evidence and artifact paths), what is unproven, " +
|
|
287
|
-
"and what remains, then
|
|
288
|
-
"
|
|
289
|
-
"
|
|
286
|
+
"and what remains, then use the Hub's one-click task-budget continuation confirmation. A confirmed " +
|
|
287
|
+
"continuation opens one audited tranche while preserving task state. Use `set_task_tier` with " +
|
|
288
|
+
"`new_task: true` only when the human genuinely moved to different work.";
|
|
290
289
|
}
|
|
291
290
|
|
|
292
291
|
/**
|
|
@@ -500,7 +499,7 @@ export function checkReviewRoundCap(tier, persona, roundsSoFar) {
|
|
|
500
499
|
`the fix produced new findings is the ratchet — each round's findings become requirements, and the ` +
|
|
501
500
|
`enlarged requirement set justifies the next round.\n` +
|
|
502
501
|
`If this genuinely is a different review (a different subsystem, or work the earlier round never saw), ` +
|
|
503
|
-
`raise the tier with a reason via set_task_tier, or
|
|
502
|
+
`raise the tier with a reason via set_task_tier, or call it with new_task: true for genuinely different work.`,
|
|
504
503
|
};
|
|
505
504
|
}
|
|
506
505
|
|
|
@@ -49,7 +49,14 @@ export interface SpawnPiAgentOptions {
|
|
|
49
49
|
model: string;
|
|
50
50
|
tools: string;
|
|
51
51
|
thinking: string;
|
|
52
|
-
appendSystemPrompt
|
|
52
|
+
/** Replacement prompt; mutually exclusive with appendSystemPrompt when spawning. */
|
|
53
|
+
systemPrompt?: string;
|
|
54
|
+
/** Prompt appended to Pi's inherited prompt (legacy/default child policy). */
|
|
55
|
+
appendSystemPrompt?: string;
|
|
56
|
+
/** Disable automatic global skill discovery for a minimized child. */
|
|
57
|
+
noSkills?: boolean;
|
|
58
|
+
/** Disable AGENTS.md/CLAUDE.md and other automatic context-file discovery. */
|
|
59
|
+
noContextFiles?: boolean;
|
|
53
60
|
sessionFile: string;
|
|
54
61
|
resume?: boolean;
|
|
55
62
|
prompt: string;
|
|
@@ -122,11 +129,16 @@ export function spawnPiAgent(
|
|
|
122
129
|
opts: SpawnPiAgentOptions,
|
|
123
130
|
cbs: SpawnPiAgentCallbacks = {},
|
|
124
131
|
): Promise<SpawnPiAgentResult> {
|
|
132
|
+
const promptArg = opts.systemPrompt !== undefined
|
|
133
|
+
? ["--system-prompt", opts.systemPrompt]
|
|
134
|
+
: ["--append-system-prompt", opts.appendSystemPrompt ?? ""];
|
|
125
135
|
const args = [
|
|
126
136
|
"--mode", "json", "-p", "--no-extensions",
|
|
137
|
+
...(opts.noSkills ? ["--no-skills"] : []),
|
|
138
|
+
...(opts.noContextFiles ? ["--no-context-files"] : []),
|
|
127
139
|
...(opts.extensions || []).flatMap(e => ["-e", e]),
|
|
128
140
|
"--model", opts.model, "--tools", opts.tools, "--thinking", opts.thinking,
|
|
129
|
-
|
|
141
|
+
...promptArg, "--session", opts.sessionFile,
|
|
130
142
|
];
|
|
131
143
|
if (opts.resume) args.push("-c");
|
|
132
144
|
|
|
@@ -35,6 +35,26 @@ interface InstallOptions {
|
|
|
35
35
|
remoteProject?: string | (() => string);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
export interface AskUserResultObservation {
|
|
39
|
+
params: { question?: unknown; context?: unknown; options?: unknown };
|
|
40
|
+
result?: unknown;
|
|
41
|
+
phase: "start" | "result";
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const askUserResultObservers = new Set<(observation: AskUserResultObservation) => void>();
|
|
45
|
+
|
|
46
|
+
/** Observe compact ask calls without inspecting human prose. */
|
|
47
|
+
export function observeAskUserResults(observer: (observation: AskUserResultObservation) => void): () => void {
|
|
48
|
+
askUserResultObservers.add(observer);
|
|
49
|
+
return () => askUserResultObservers.delete(observer);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function emitAskUserObservation(observation: AskUserResultObservation): void {
|
|
53
|
+
for (const observer of askUserResultObservers) {
|
|
54
|
+
try { observer(observation); } catch { /* observers cannot break asking */ }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
38
58
|
interface ResolveStockOptions {
|
|
39
59
|
moduleUrl?: string;
|
|
40
60
|
cwd?: string;
|
|
@@ -329,26 +349,59 @@ async function defaultCancelRemote(qid: string, reason: string, project: string)
|
|
|
329
349
|
}
|
|
330
350
|
}
|
|
331
351
|
|
|
352
|
+
// Keep UI preferences in the stock implementation; expose only question semantics.
|
|
353
|
+
export const COMPACT_ASK_USER_PARAMETERS = {
|
|
354
|
+
type: "object",
|
|
355
|
+
properties: {
|
|
356
|
+
question: { type: "string", description: "One focused question." },
|
|
357
|
+
context: { type: "string", description: "Short decision context." },
|
|
358
|
+
options: { type: "array", items: { type: "string", description: "Choice label." }, minItems: 2, maxItems: 6, description: "Two to six choices." },
|
|
359
|
+
allowMultiple: { type: "boolean", description: "Allow several choices." },
|
|
360
|
+
allowFreeform: { type: "boolean", description: "Allow a typed answer." },
|
|
361
|
+
allowComment: { type: "boolean", description: "Allow an optional comment." },
|
|
362
|
+
},
|
|
363
|
+
required: ["question"],
|
|
364
|
+
} as const;
|
|
365
|
+
|
|
366
|
+
export function compactAskUserParams(params: any): any {
|
|
367
|
+
return {
|
|
368
|
+
question: params?.question,
|
|
369
|
+
...(params?.context === undefined ? {} : { context: params.context }),
|
|
370
|
+
...(params?.options === undefined ? {} : { options: normalizeOptions(params.options) }),
|
|
371
|
+
...(params?.allowMultiple === undefined ? {} : { allowMultiple: params.allowMultiple }),
|
|
372
|
+
...(params?.allowFreeform === undefined ? {} : { allowFreeform: params.allowFreeform }),
|
|
373
|
+
...(params?.allowComment === undefined ? {} : { allowComment: params.allowComment }),
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
|
|
332
377
|
export function wrapAskUserTool(stockTool: ToolRegistration, options: InstallOptions = {}): ToolRegistration {
|
|
333
378
|
return {
|
|
334
379
|
...stockTool,
|
|
380
|
+
description: "Ask one focused human question; choices are optional.",
|
|
381
|
+
promptSnippet: "Ask one focused human question",
|
|
382
|
+
promptGuidelines: ["Ask one focused question per call."],
|
|
383
|
+
parameters: COMPACT_ASK_USER_PARAMETERS,
|
|
335
384
|
async execute(toolCallId: string, params: any, signal?: AbortSignal, onUpdate?: any, ctx?: any) {
|
|
385
|
+
const stockParams = compactAskUserParams(params);
|
|
386
|
+
emitAskUserObservation({ params: stockParams, phase: "start" });
|
|
336
387
|
const configuredProject = typeof options.remoteProject === "function" ? options.remoteProject() : options.remoteProject;
|
|
337
388
|
const remoteProject = configuredProject ?? process.env.PI_COMS_PROJECT?.trim() ?? "default";
|
|
338
389
|
const startRemote = options.startRemote ?? ((remoteParams: any) => defaultStartRemote(remoteParams, remoteProject));
|
|
339
390
|
let remoteStart: { qid: string; result: Promise<any> } | null = null;
|
|
340
391
|
try {
|
|
341
|
-
remoteStart = await startRemote(
|
|
392
|
+
remoteStart = await startRemote(stockParams, ctx);
|
|
342
393
|
} catch {
|
|
343
394
|
remoteStart = null;
|
|
344
395
|
}
|
|
345
396
|
|
|
346
397
|
if (!remoteStart) {
|
|
347
|
-
|
|
398
|
+
const result = await stockTool.execute?.(toolCallId, stockParams, signal, onUpdate, ctx);
|
|
399
|
+
emitAskUserObservation({ params: stockParams, result, phase: "result" });
|
|
400
|
+
return result;
|
|
348
401
|
}
|
|
349
402
|
|
|
350
|
-
|
|
351
|
-
runLocal: (localSignal: AbortSignal) => stockTool.execute?.(toolCallId,
|
|
403
|
+
const result = await raceAskUser({
|
|
404
|
+
runLocal: (localSignal: AbortSignal) => stockTool.execute?.(toolCallId, stockParams, localSignal, onUpdate, ctx),
|
|
352
405
|
startRemote: () => remoteStart,
|
|
353
406
|
cancelRemote: options.cancelRemote ?? ((qid: string, reason: string) => defaultCancelRemote(qid, reason, remoteProject)),
|
|
354
407
|
createAbortController: () => {
|
|
@@ -358,6 +411,8 @@ export function wrapAskUserTool(stockTool: ToolRegistration, options: InstallOpt
|
|
|
358
411
|
},
|
|
359
412
|
signal,
|
|
360
413
|
});
|
|
414
|
+
emitAskUserObservation({ params: stockParams, result, phase: "result" });
|
|
415
|
+
return result;
|
|
361
416
|
},
|
|
362
417
|
};
|
|
363
418
|
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { DELEGATE_TREE_SPAWN_BUDGET } from "../agent-hub/helpers.ts";
|
|
2
|
+
import { externalBlockedProtocol } from "../agent-hub/external-blocker.js";
|
|
3
|
+
|
|
4
|
+
export { DELEGATE_TREE_SPAWN_BUDGET };
|
|
5
|
+
export const RESEARCH_TOOLS = "read,grep,find,ls";
|
|
6
|
+
export const MAX_AUTO_RESEARCH_QUESTIONS = 4;
|
|
7
|
+
/** Deterministic reference estimate: four serialized characters per token. */
|
|
8
|
+
export const RESEARCH_STANDING_TOKEN_CEILING = 3_000;
|
|
9
|
+
export const RESEARCH_TOKEN_CHARS = 4;
|
|
10
|
+
|
|
11
|
+
export function buildClarificationProtocol(userLanguage: string, maxQuestions = MAX_AUTO_RESEARCH_QUESTIONS): string {
|
|
12
|
+
return `
|
|
13
|
+
|
|
14
|
+
## Clarification protocol
|
|
15
|
+
If at any point you need a decision from the human user (ambiguity, missing input,
|
|
16
|
+
contradiction, or a destructive/irreversible next step), DO NOT guess. Stop and
|
|
17
|
+
return a single line of the form:
|
|
18
|
+
|
|
19
|
+
ASK_USER: <your question in one clear English sentence>
|
|
20
|
+
|
|
21
|
+
You may emit multiple ASK_USER lines if you have several questions. The dispatcher
|
|
22
|
+
will surface each to the human user in ${userLanguage} and re-dispatch you with the
|
|
23
|
+
answers. Do not invent values, do not pick "reasonable defaults" silently — ask.
|
|
24
|
+
|
|
25
|
+
## External-blocker protocol
|
|
26
|
+
${externalBlockedProtocol()}
|
|
27
|
+
|
|
28
|
+
## Research protocol
|
|
29
|
+
If you need reconnaissance you cannot perform with your own tools (broad code search,
|
|
30
|
+
reading unfamiliar areas of the codebase, summarizing docs), DO NOT guess and DO NOT
|
|
31
|
+
ask the user. Pause for research instead: end your turn with one or more lines of the
|
|
32
|
+
form
|
|
33
|
+
|
|
34
|
+
NEEDS_RESEARCH: <one specific, self-contained question>
|
|
35
|
+
|
|
36
|
+
with nothing after them. Your session pauses there; read-only research helpers are
|
|
37
|
+
spawned for you, each helper's findings are saved to a file, and you are resumed in
|
|
38
|
+
this same session with the file paths — read them and continue from where you left
|
|
39
|
+
off. Ask at most ${maxQuestions} questions per pause. Use ASK_USER only
|
|
40
|
+
for decisions a human must make; use NEEDS_RESEARCH for facts that can be looked up.`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function buildDelegationProtocol(roleNames: readonly string[], spawnBudget = DELEGATE_TREE_SPAWN_BUDGET): string {
|
|
44
|
+
if (roleNames.length === 0) return "";
|
|
45
|
+
return `
|
|
46
|
+
|
|
47
|
+
## Delegation protocol
|
|
48
|
+
You have a \`delegate\` tool with pre-configured sub-agents on cheaper models
|
|
49
|
+
(roles: ${roleNames.join(", ")}). Prefer delegating scoped, self-contained
|
|
50
|
+
sub-tasks to them over doing everything yourself. A child shares NONE of your
|
|
51
|
+
context — put everything it needs into its instruction/context. You may run up
|
|
52
|
+
to ${spawnBudget} delegate calls for this dispatch; parallel children are forced read-only.
|
|
53
|
+
Children are terminal workers: they do not receive delegate tooling at remaining depth 0.`;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function buildDeliverableProtocol(agentKey: string, runNumber: number): string {
|
|
57
|
+
return `
|
|
58
|
+
|
|
59
|
+
## Deliverable-to-file protocol
|
|
60
|
+
When your deliverable is a document (plan, review, critique, inventory, report), write the full document to the real session artifact path when your tools allow it: .pi/agent-sessions/artifacts/<kind>/${agentKey}-run${runNumber}.md (kinds: plans, reviews, inventories, evidence). Do NOT write repo-root ./artifacts/... files. In your final response, report and pass the artifact-relative handoff path: artifacts/<kind>/${agentKey}-run${runNumber}.md. If your persona already has an explicit output path contract such as planner PLAN_FILE, keep that existing behavior and also summarize/return the session artifact path the hub gives you.
|
|
61
|
+
Finish with the artifact-relative path plus a digest of no more than 10 lines. If the dispatch includes acceptance assertions (A1, A2, ...), also include the structured return from skills/orchestration-verification/SKILL.md. If your tools are read-only and you cannot write a document artifact yourself, finish with the digest + structured return; the hub will still persist your full final return under artifacts/returns/ for dispatcher recovery.`;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface ChildPromptParts {
|
|
65
|
+
id: string;
|
|
66
|
+
category: "persona" | "tool" | "system" | "protocol";
|
|
67
|
+
label: string;
|
|
68
|
+
chars: number;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface SpecialistContextManifest {
|
|
72
|
+
persona: { name: string; sourcePath: string; primarySkillPaths: string[] };
|
|
73
|
+
taskSkillPaths: string[];
|
|
74
|
+
projectPolicy: { rulesPaths: string[]; docsPaths: string[] };
|
|
75
|
+
flags: { assertions: boolean; scope: boolean; artifacts: boolean };
|
|
76
|
+
delegateRoles: string[];
|
|
77
|
+
protocolIds: string[];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const skillPaths = (text: string) => [...new Set(text.match(/(?:^|[\s`(])((?:\.?\/?skills\/)[\w./-]+\/SKILL\.md)/g) ?? [])]
|
|
81
|
+
.map(match => match.match(/((?:\.?\/?skills\/)[\w./-]+\/SKILL\.md)/)?.[1] ?? "")
|
|
82
|
+
.filter(Boolean);
|
|
83
|
+
|
|
84
|
+
export function buildSpecialistContextManifest(input: {
|
|
85
|
+
personaName: string;
|
|
86
|
+
personaPath: string;
|
|
87
|
+
personaPrompt: string;
|
|
88
|
+
task: string;
|
|
89
|
+
rulesPaths: readonly string[];
|
|
90
|
+
docsPaths: readonly string[];
|
|
91
|
+
hasAssertions: boolean;
|
|
92
|
+
hasScope: boolean;
|
|
93
|
+
hasArtifacts: boolean;
|
|
94
|
+
delegateRoles: readonly string[];
|
|
95
|
+
}): SpecialistContextManifest {
|
|
96
|
+
const protocolIds = ["clarification", "external-blocker", "research", "deliverable"];
|
|
97
|
+
if (input.rulesPaths.length) protocolIds.push("rules");
|
|
98
|
+
if (input.docsPaths.length) protocolIds.push("docs");
|
|
99
|
+
if (input.hasAssertions) protocolIds.push("verification");
|
|
100
|
+
if (input.delegateRoles.length) protocolIds.push("delegation");
|
|
101
|
+
return {
|
|
102
|
+
persona: { name: input.personaName, sourcePath: input.personaPath, primarySkillPaths: skillPaths(input.personaPrompt) },
|
|
103
|
+
taskSkillPaths: skillPaths(input.task),
|
|
104
|
+
projectPolicy: { rulesPaths: [...input.rulesPaths], docsPaths: [...input.docsPaths] },
|
|
105
|
+
flags: { assertions: input.hasAssertions, scope: input.hasScope, artifacts: input.hasArtifacts },
|
|
106
|
+
delegateRoles: [...input.delegateRoles],
|
|
107
|
+
protocolIds,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function nativeSpecialistSystemPrompt(input: { manifest: SpecialistContextManifest; userLanguage: string; agentKey: string; runNumber: number }): string {
|
|
112
|
+
const { manifest } = input;
|
|
113
|
+
const paths = (label: string, values: string[]) => values.length ? `\n${label}: ${values.join(", ")}` : "";
|
|
114
|
+
const framing = [
|
|
115
|
+
"Task is supplied via stdin.",
|
|
116
|
+
...(manifest.flags.scope ? ["Declared scope is supplied via stdin."] : []),
|
|
117
|
+
...(manifest.flags.artifacts ? ["Artifact paths are supplied via stdin."] : []),
|
|
118
|
+
];
|
|
119
|
+
const references = `# Managed Specialist\nPersona: ${manifest.persona.name}; source: ${manifest.persona.sourcePath}.${paths("Primary skills", manifest.persona.primarySkillPaths)}${paths("Task-selected skills", manifest.taskSkillPaths)}${paths("Applicable project rules", manifest.projectPolicy.rulesPaths)}${paths("Applicable project docs", manifest.projectPolicy.docsPaths)}\n${framing.join(" ")} Read the persona source before work and applicable project rules before edits or commands. Read only the named skill and documentation paths when relevant; do not discover global skills or context files.`;
|
|
120
|
+
let prompt = references + buildClarificationProtocol(input.userLanguage);
|
|
121
|
+
if (manifest.flags.assertions) prompt += "\n\n## Verification\nRead skills/orchestration-verification/SKILL.md for the structured return contract; apply the assertions supplied in the task.";
|
|
122
|
+
if (manifest.delegateRoles.length) prompt += buildDelegationProtocol(manifest.delegateRoles);
|
|
123
|
+
prompt += buildDeliverableProtocol(input.agentKey, input.runNumber);
|
|
124
|
+
return prompt;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function specialistStandingParts(input: {
|
|
128
|
+
replacementPrompt: string;
|
|
129
|
+
toolChars: number;
|
|
130
|
+
}): ChildPromptParts[] {
|
|
131
|
+
return [
|
|
132
|
+
{ id: "specialist-replacement", category: "system", label: "Replacement specialist manifest prompt", chars: input.replacementPrompt.length },
|
|
133
|
+
{ id: "child-tools", category: "tool", label: "Configured child tools", chars: input.toolChars },
|
|
134
|
+
{ id: "pi-base", category: "system", label: "Pi child base prompt inputs", chars: 0 },
|
|
135
|
+
];
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function researchStandingParts(input: {
|
|
139
|
+
replacementPrompt: string;
|
|
140
|
+
toolChars: number;
|
|
141
|
+
basePromptChars: number;
|
|
142
|
+
}): ChildPromptParts[] {
|
|
143
|
+
const parts = [
|
|
144
|
+
{ id: "research-replacement", category: "system" as const, label: "Replacement read-only research prompt", chars: input.replacementPrompt.length },
|
|
145
|
+
{ id: "child-tools", category: "tool" as const, label: "Configured child tools", chars: input.toolChars },
|
|
146
|
+
{ id: "pi-base", category: "system" as const, label: "Pi child base prompt inputs", chars: input.basePromptChars },
|
|
147
|
+
];
|
|
148
|
+
const standingChars = parts.reduce((sum, part) => sum + part.chars, 0);
|
|
149
|
+
if (Math.ceil(standingChars / RESEARCH_TOKEN_CHARS) > RESEARCH_STANDING_TOKEN_CEILING) {
|
|
150
|
+
throw new Error(`Research standing overhead exceeds ${RESEARCH_STANDING_TOKEN_CEILING} estimated tokens`);
|
|
151
|
+
}
|
|
152
|
+
return parts;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function delegateStandingParts(input: {
|
|
156
|
+
toolChars: number;
|
|
157
|
+
basePromptChars: number;
|
|
158
|
+
roleNames: readonly string[];
|
|
159
|
+
}): ChildPromptParts[] {
|
|
160
|
+
return [
|
|
161
|
+
{ id: "delegate-protocol", category: "protocol", label: "Resolved delegate role protocol", chars: buildDelegationProtocol(input.roleNames).length },
|
|
162
|
+
{ id: "child-tools", category: "tool", label: "Resolved delegate tools", chars: input.toolChars },
|
|
163
|
+
{ id: "pi-base", category: "system", label: "Pi child base prompt inputs", chars: input.basePromptChars },
|
|
164
|
+
];
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export function nativeResearchSystemPrompt(input: {
|
|
168
|
+
personaName?: string;
|
|
169
|
+
personaPath?: string;
|
|
170
|
+
cwd: string;
|
|
171
|
+
}): string {
|
|
172
|
+
const persona = input.personaName && input.personaPath
|
|
173
|
+
? `\nSelected persona: ${input.personaName}. Its source is ${input.personaPath}; read that one file only when its role guidance is needed.`
|
|
174
|
+
: "\nNo persona is selected; act as a general research helper.";
|
|
175
|
+
return `# Read-only Research Helper
|
|
176
|
+
You investigate the requested repository topic for a parent agent. Your only tools are read, grep, find, and ls. Do not edit, write, run bash, delegate, or claim those tools are available.${persona}
|
|
177
|
+
Working directory: ${input.cwd}
|
|
178
|
+
Task input may name artifact paths; inspect only paths relevant to that task. Report concise findings with concrete path:line citations. State uncertainty or missing evidence plainly. Return findings only; do not propose or attempt edits.`;
|
|
179
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { component, type ContextBudgetComponent, type ContextCategory } from "./context-budget.ts";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Prompt inputs are deliberately split between stable policy and a small volatile
|
|
5
|
+
* state capsule. Callers must not put counters or task state in policy fragments.
|
|
6
|
+
*/
|
|
7
|
+
export interface HubPromptParts {
|
|
8
|
+
intro: string;
|
|
9
|
+
toolList: string;
|
|
10
|
+
languageLines: string;
|
|
11
|
+
activeTeamName: string;
|
|
12
|
+
teamMembers: string;
|
|
13
|
+
dispatchSection: string;
|
|
14
|
+
userLanguage: string;
|
|
15
|
+
askUserBlock: string;
|
|
16
|
+
modeSection: string;
|
|
17
|
+
verificationSection: string;
|
|
18
|
+
comsSection: string;
|
|
19
|
+
herdrSection: string;
|
|
20
|
+
compactionSection?: string;
|
|
21
|
+
hardRules: string;
|
|
22
|
+
ambiguityRule: string;
|
|
23
|
+
agentCatalog: string;
|
|
24
|
+
researchCatalog: string;
|
|
25
|
+
/** Changes per turn: tier, budgets, active counters, and pending state only. */
|
|
26
|
+
stateCapsule?: string;
|
|
27
|
+
dispatcherPersonaPrompt?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const HUB_HERDR_SECTION = `
|
|
31
|
+
## Fleet (herdr)
|
|
32
|
+
- Use panes only for auxiliary processes; never bypass specialist delegation.
|
|
33
|
+
- Spawn a peer immediately before its first message. It boots idle; \`peer_ready: false\` is a failed start.
|
|
34
|
+
- Check \`coms_list\` for peer status; read panes only for unbridged tools or post-mortems.
|
|
35
|
+
- \`herdr_close_pane\` requires human confirmation. Close only panes you opened when their work ends.
|
|
36
|
+
- \`herdr_notify\` reaches an away human; it never replaces \`ask_user\`.
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
/** Assemble the effective Hub replacement prompt. Ledger metadata is never interpolated. */
|
|
40
|
+
export function assembleHubSystemPrompt(parts: HubPromptParts): string {
|
|
41
|
+
const team = parts.activeTeamName || "(none)";
|
|
42
|
+
const members = parts.teamMembers || "(none — add a persona before using dispatch_agent)";
|
|
43
|
+
const state = parts.stateCapsule ? `\n${parts.stateCapsule}\n` : "";
|
|
44
|
+
const fleet = parts.dispatchSection ? `
|
|
45
|
+
## Native Roster: ${team}
|
|
46
|
+
Members: ${members}
|
|
47
|
+
Dispatch only listed agents. The roster may change through its Fleet commands or \`team_adjust\` when it genuinely cannot serve the task; more personas is usually the wrong answer.
|
|
48
|
+
|
|
49
|
+
## How to Work
|
|
50
|
+
${parts.dispatchSection}
|
|
51
|
+
- Choose \`backend: native\` only for an explicitly requested local Pi specialist, \`backend: coms\` only for an explicitly requested live same-name peer, and \`backend: auto\` otherwise. Never substitute an explicit backend.
|
|
52
|
+
- Review results, follow up when needed, and summarize for the user in ${parts.userLanguage}.
|
|
53
|
+
|
|
54
|
+
## Research helpers (read-only)
|
|
55
|
+
- \`spawn_research\` is read-only (read/grep/find/ls; no bash or writes). Use it for necessary reconnaissance, not to read a return artifact you already have.
|
|
56
|
+
- Choose a light persona for simple reads and a stronger one for ambiguous, cross-cutting, or high-stakes research.
|
|
57
|
+
- Specialists cannot spawn helpers; run necessary research and pass its findings or artifact path to the specialist.
|
|
58
|
+
|
|
59
|
+
## Agents
|
|
60
|
+
|
|
61
|
+
${parts.agentCatalog}
|
|
62
|
+
|
|
63
|
+
## Research personas
|
|
64
|
+
|
|
65
|
+
${parts.researchCatalog}
|
|
66
|
+
` : "";
|
|
67
|
+
const verification = parts.verificationSection ? `\n${parts.verificationSection}\n` : "";
|
|
68
|
+
const policy = `${parts.intro} You have ${parts.toolList}.
|
|
69
|
+
|
|
70
|
+
## Language
|
|
71
|
+
${parts.languageLines}${fleet}
|
|
72
|
+
${parts.askUserBlock}
|
|
73
|
+
|
|
74
|
+
${parts.modeSection}${state}${verification}
|
|
75
|
+
${parts.comsSection}${parts.herdrSection}${parts.compactionSection ?? ""}
|
|
76
|
+
## Hard Rules
|
|
77
|
+
${parts.hardRules}
|
|
78
|
+
${parts.ambiguityRule}
|
|
79
|
+
- Keep each dispatch focused and use the returned evidence before reporting completion.`;
|
|
80
|
+
return parts.dispatcherPersonaPrompt ? `${parts.dispatcherPersonaPrompt}\n\n${policy}` : policy;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface NamedHubPart { id: string; text: string; category: ContextCategory; persistence?: ContextBudgetComponent["persistence"]; source?: string; }
|
|
84
|
+
|
|
85
|
+
export function namedHubLedgerParts(input: {
|
|
86
|
+
intro: string; languageLines: string; teamMembers: string; agentCards: readonly { id: string; text: string }[];
|
|
87
|
+
dispatchSection: string; modeSection: string; verificationSection: string; researchCards: readonly { id: string; text: string }[];
|
|
88
|
+
researchCatalog: string; comsSection: string; herdrSection: string; compactionSection?: string; stateCapsule?: string; dispatcherPersonaPrompt?: string;
|
|
89
|
+
}): NamedHubPart[] {
|
|
90
|
+
return [
|
|
91
|
+
{ id: "hub/policy/posture", text: input.intro, category: "system", persistence: "fixed", source: "posture.ts" },
|
|
92
|
+
{ id: "hub/policy/language", text: input.languageLines, category: "protocol", persistence: "fixed", source: "hub-policy" },
|
|
93
|
+
{ id: "hub/roster-header", text: input.teamMembers, category: "roster", persistence: "session", source: "active-roster" },
|
|
94
|
+
...input.agentCards.map(card => ({ id: `hub/roster/${card.id}`, text: card.text, category: "roster" as const, persistence: "session" as const, source: "agent-persona" })),
|
|
95
|
+
{ id: "hub/policy/dispatch", text: input.dispatchSection, category: "protocol", persistence: "fixed", source: "hub-policy" },
|
|
96
|
+
{ id: "hub/policy/triage", text: input.modeSection, category: "protocol", persistence: "fixed", source: "run-budget" },
|
|
97
|
+
{ id: "hub/policy/verification", text: input.verificationSection, category: "protocol", persistence: "fixed", source: "orchestration-verification" },
|
|
98
|
+
{ id: "hub/state", text: input.stateCapsule ?? "", category: "system", persistence: "turn", source: "hub-state" },
|
|
99
|
+
...(input.researchCards.length ? input.researchCards.map(card => ({ id: `hub/research/${card.id}`, text: card.text, category: "persona" as const, persistence: "session" as const, source: "research-persona" })) : [{ id: "hub/research-empty", text: input.researchCatalog, category: "persona" as const, persistence: "session" as const, source: "research-persona" }]),
|
|
100
|
+
{ id: "hub/policy/coms", text: input.comsSection, category: "protocol", persistence: "fixed", source: "coms" },
|
|
101
|
+
{ id: "hub/policy/workspace", text: input.herdrSection, category: "protocol", persistence: "fixed", source: "herdr" },
|
|
102
|
+
{ id: "hub/policy/compaction", text: input.compactionSection ?? "", category: "protocol", persistence: "fixed", source: "compaction" },
|
|
103
|
+
{ id: "hub/persona", text: input.dispatcherPersonaPrompt ?? "", category: "persona", persistence: "session", source: "dispatcher-persona" },
|
|
104
|
+
];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function recordHubLedger(systemPrompt: string, parts: readonly NamedHubPart[]): ContextBudgetComponent[] {
|
|
108
|
+
const namedChars = parts.reduce((sum, part) => sum + part.text.length, 0);
|
|
109
|
+
return parts.map(part => component({
|
|
110
|
+
id: part.id, plane: "hub", category: part.category, label: part.id.replace("hub/", "Hub "), source: part.source,
|
|
111
|
+
persistence: part.persistence ?? "turn", visibility: "model-visible", confidence: "exact-chars", chars: part.text.length,
|
|
112
|
+
})).concat(component({
|
|
113
|
+
id: "hub/separators-and-rules", plane: "hub", category: "system", label: "Hub separators and formatting", source: "hub-prompt-template",
|
|
114
|
+
persistence: "fixed", visibility: "model-visible", confidence: "exact-chars", chars: Math.max(0, systemPrompt.length - namedChars),
|
|
115
|
+
}));
|
|
116
|
+
}
|