@ashx-j/lunr 0.2.11 → 0.2.13
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/CHANGELOG.md +13 -0
- package/README.md +211 -236
- package/dist/builtin-extensions/ashxj-tui.d.ts +3 -0
- package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
- package/dist/builtin-extensions/ashxj-tui.js +28 -11
- package/dist/builtin-extensions/ashxj-tui.js.map +1 -1
- package/dist/builtin-extensions/index.d.ts.map +1 -1
- package/dist/builtin-extensions/index.js +0 -2
- package/dist/builtin-extensions/index.js.map +1 -1
- package/dist/builtin-extensions/lunr-cron.d.ts +1 -1
- package/dist/builtin-extensions/lunr-cron.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-cron.js +1 -1
- package/dist/builtin-extensions/lunr-cron.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/chain-validation.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/chain-validation.js +3 -3
- package/dist/builtin-extensions/pi-subagents/src/extension/chain-validation.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/doctor.d.ts +0 -2
- package/dist/builtin-extensions/pi-subagents/src/extension/doctor.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/doctor.js +1 -23
- package/dist/builtin-extensions/pi-subagents/src/extension/doctor.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/fanout-child.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/fanout-child.js +6 -7
- package/dist/builtin-extensions/pi-subagents/src/extension/fanout-child.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +7 -14
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts +12 -9
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +38 -34
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts +3 -3
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js +32 -47
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.d.ts +2 -2
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts +7 -10
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js +90 -109
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.d.ts +3 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.js +37 -50
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/run-status.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/run-status.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/run-status.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/scheduled-runs.d.ts +4 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/scheduled-runs.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/scheduled-runs.js +5 -5
- package/dist/builtin-extensions/pi-subagents/src/runs/background/scheduled-runs.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js +31 -13
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-clarify.d.ts +2 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-clarify.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-clarify.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts +4 -3
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js +48 -20
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.d.ts +2 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js +90 -64
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts +6 -8
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +262 -161
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.d.ts +2 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.js +24 -33
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts +25 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js +51 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/dynamic-fanout.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/dynamic-fanout.js +20 -3
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/dynamic-fanout.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts +4 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts +5 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js +9 -3
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js +2 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.d.ts +2 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.js +20 -17
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.d.ts +70 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js +153 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/settings.d.ts +13 -8
- package/dist/builtin-extensions/pi-subagents/src/shared/settings.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/settings.js +20 -51
- package/dist/builtin-extensions/pi-subagents/src/shared/settings.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +80 -20
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.js +10 -2
- package/dist/builtin-extensions/pi-subagents/src/shared/types.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts +2 -2
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js +20 -32
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts +2 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js +23 -449
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +2 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js +13 -11
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/runtime.d.ts +2 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/runtime.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/runtime.js +18 -17
- package/dist/builtin-extensions/pi-subagents/src/watchdog/runtime.js.map +1 -1
- package/dist/builtin-extensions/simple-pi-memory.d.ts +2 -2
- package/dist/builtin-extensions/simple-pi-memory.d.ts.map +1 -1
- package/dist/builtin-extensions/simple-pi-memory.js +41 -17
- package/dist/builtin-extensions/simple-pi-memory.js.map +1 -1
- package/dist/catalog/models.json +1 -1
- package/dist/catalog/providers/amazon-bedrock.json +1 -1
- package/dist/catalog/providers/azure-openai-responses.json +1 -1
- package/dist/catalog/providers/cloudflare-ai-gateway.json +1 -1
- package/dist/catalog/providers/cloudflare-workers-ai.json +1 -1
- package/dist/catalog/providers/fireworks.json +1 -1
- package/dist/catalog/providers/github-copilot.json +1 -1
- package/dist/catalog/providers/huggingface.json +1 -1
- package/dist/catalog/providers/minimax-cn.json +1 -1
- package/dist/catalog/providers/minimax.json +1 -1
- package/dist/catalog/providers/mistral.json +1 -1
- package/dist/catalog/providers/nvidia.json +1 -1
- package/dist/catalog/providers/openai.json +1 -1
- package/dist/catalog/providers/opencode-go.json +1 -1
- package/dist/catalog/providers/opencode.json +1 -1
- package/dist/catalog/providers/openrouter.json +1 -1
- package/dist/catalog/providers/qwen-cloud-cn.json +1 -1
- package/dist/catalog/providers/qwen-cloud.json +1 -1
- package/dist/catalog/providers/qwen-token-plan-cn.json +1 -1
- package/dist/catalog/providers/qwen-token-plan.json +1 -1
- package/dist/catalog/providers/together.json +1 -1
- package/dist/catalog/providers/vercel-ai-gateway.json +1 -1
- package/dist/catalog/providers/zai-coding-cn.json +1 -1
- package/dist/catalog/providers/zai.json +1 -1
- package/dist/catalog/publication.json +3 -3
- package/dist/core/agent-session.d.ts +7 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +34 -4
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/context-breakdown.d.ts +3 -1
- package/dist/core/context-breakdown.d.ts.map +1 -1
- package/dist/core/context-breakdown.js +5 -2
- package/dist/core/context-breakdown.js.map +1 -1
- package/dist/core/customize.d.ts +2 -0
- package/dist/core/customize.d.ts.map +1 -1
- package/dist/core/customize.js +6 -0
- package/dist/core/customize.js.map +1 -1
- package/dist/core/memory-cap.d.ts +4 -8
- package/dist/core/memory-cap.d.ts.map +1 -1
- package/dist/core/memory-cap.js +8 -8
- package/dist/core/memory-cap.js.map +1 -1
- package/dist/core/permissions.d.ts +2 -0
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +30 -14
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/plan-mode.d.ts.map +1 -1
- package/dist/core/plan-mode.js +1 -9
- package/dist/core/plan-mode.js.map +1 -1
- package/dist/core/rollback.d.ts.map +1 -1
- package/dist/core/rollback.js +1 -1
- package/dist/core/rollback.js.map +1 -1
- package/dist/core/settings-manager.d.ts +16 -5
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +37 -10
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -5
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/subagent-permission-inherit.d.ts +34 -22
- package/dist/core/subagent-permission-inherit.d.ts.map +1 -1
- package/dist/core/subagent-permission-inherit.js +37 -80
- package/dist/core/subagent-permission-inherit.js.map +1 -1
- package/dist/core/swarm.d.ts.map +1 -1
- package/dist/core/swarm.js +13 -7
- package/dist/core/swarm.js.map +1 -1
- package/dist/core/system-prompt.d.ts +6 -4
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +38 -48
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/usage-adapters/openai-codex.d.ts +1 -1
- package/dist/core/usage-adapters/openai-codex.d.ts.map +1 -1
- package/dist/core/usage-adapters/openai-codex.js +22 -17
- package/dist/core/usage-adapters/openai-codex.js.map +1 -1
- package/dist/core/usage-service.d.ts +10 -1
- package/dist/core/usage-service.d.ts.map +1 -1
- package/dist/core/usage-service.js +17 -6
- package/dist/core/usage-service.js.map +1 -1
- package/dist/gateway/agent-bridge.d.ts.map +1 -1
- package/dist/gateway/agent-bridge.js +1 -4
- package/dist/gateway/agent-bridge.js.map +1 -1
- package/dist/gateway/cron.d.ts.map +1 -1
- package/dist/gateway/cron.js +1 -4
- package/dist/gateway/cron.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +0 -5
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts +2 -0
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +21 -0
- package/dist/migrations.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +7 -4
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +122 -162
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/usage-view.d.ts +1 -1
- package/dist/modes/interactive/components/usage-view.d.ts.map +1 -1
- package/dist/modes/interactive/components/usage-view.js +7 -4
- package/dist/modes/interactive/components/usage-view.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +55 -96
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/skill-tag-autocomplete.d.ts +13 -0
- package/dist/modes/interactive/skill-tag-autocomplete.d.ts.map +1 -0
- package/dist/modes/interactive/skill-tag-autocomplete.js +72 -0
- package/dist/modes/interactive/skill-tag-autocomplete.js.map +1 -0
- package/docs/compaction.md +23 -23
- package/docs/containerization.md +24 -24
- package/docs/custom-provider.md +18 -18
- package/docs/development.md +16 -15
- package/docs/docs.json +6 -2
- package/docs/extensions.md +82 -80
- package/docs/features.md +102 -0
- package/docs/index.md +25 -19
- package/docs/json.md +7 -7
- package/docs/keybindings.md +4 -4
- package/docs/models.md +2 -2
- package/docs/packages.md +38 -42
- package/docs/prompt-templates.md +4 -4
- package/docs/providers.md +22 -10
- package/docs/quickstart.md +81 -46
- package/docs/rpc.md +7 -13
- package/docs/sdk.md +43 -41
- package/docs/security.md +18 -18
- package/docs/session-format.md +9 -9
- package/docs/sessions.md +13 -12
- package/docs/settings.md +63 -24
- package/docs/shell-aliases.md +2 -2
- package/docs/skills.md +21 -11
- package/docs/terminal-setup.md +5 -5
- package/docs/termux.md +7 -7
- package/docs/themes.md +12 -14
- package/docs/tmux.md +4 -4
- package/docs/tui.md +23 -23
- package/docs/usage.md +112 -87
- package/docs/windows.md +10 -2
- package/examples/README.md +3 -1
- package/examples/extensions/README.md +6 -6
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/doom-overlay/README.md +2 -2
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/plan-mode/README.md +3 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/README.md +13 -11
- package/examples/extensions/todo.ts +2 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/sdk/README.md +9 -5
- package/package.json +6 -7
- package/dist/builtin-extensions/lunr-behavior.d.ts +0 -44
- package/dist/builtin-extensions/lunr-behavior.d.ts.map +0 -1
- package/dist/builtin-extensions/lunr-behavior.js +0 -213
- package/dist/builtin-extensions/lunr-behavior.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/agents/context-builder.md +0 -46
- package/dist/builtin-extensions/pi-subagents/agents/deep-researcher.md +0 -36
- package/dist/builtin-extensions/pi-subagents/agents/delegate.md +0 -12
- package/dist/builtin-extensions/pi-subagents/agents/oracle.md +0 -73
- package/dist/builtin-extensions/pi-subagents/agents/planner.md +0 -55
- package/dist/builtin-extensions/pi-subagents/agents/research-writer.md +0 -37
- package/dist/builtin-extensions/pi-subagents/agents/researcher.md +0 -52
- package/dist/builtin-extensions/pi-subagents/agents/reviewer.md +0 -79
- package/dist/builtin-extensions/pi-subagents/agents/scout.md +0 -50
- package/dist/builtin-extensions/pi-subagents/agents/worker.md +0 -55
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-management.d.ts +0 -20
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-management.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-management.js +0 -1273
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-management.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-memory.d.ts +0 -49
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-memory.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-memory.js +0 -252
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-memory.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-scope.d.ts +0 -3
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-scope.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-scope.js +0 -6
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-scope.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-selection.d.ts +0 -3
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-selection.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-selection.js +0 -23
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-selection.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-serializer.d.ts +0 -8
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-serializer.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-serializer.js +0 -143
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-serializer.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agents.d.ts +0 -176
- package/dist/builtin-extensions/pi-subagents/src/agents/agents.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agents.js +0 -1326
- package/dist/builtin-extensions/pi-subagents/src/agents/agents.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/chain-serializer.d.ts +0 -7
- package/dist/builtin-extensions/pi-subagents/src/agents/chain-serializer.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/chain-serializer.js +0 -307
- package/dist/builtin-extensions/pi-subagents/src/agents/chain-serializer.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/identity.d.ts +0 -8
- package/dist/builtin-extensions/pi-subagents/src/agents/identity.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/identity.js +0 -30
- package/dist/builtin-extensions/pi-subagents/src/agents/identity.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/proactive-skills.d.ts +0 -35
- package/dist/builtin-extensions/pi-subagents/src/agents/proactive-skills.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/proactive-skills.js +0 -151
- package/dist/builtin-extensions/pi-subagents/src/agents/proactive-skills.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/profiles/profiles.d.ts +0 -131
- package/dist/builtin-extensions/pi-subagents/src/profiles/profiles.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/profiles/profiles.js +0 -491
- package/dist/builtin-extensions/pi-subagents/src/profiles/profiles.js.map +0 -1
- package/dist/core/behavior-preset.d.ts +0 -60
- package/dist/core/behavior-preset.d.ts.map +0 -1
- package/dist/core/behavior-preset.js +0 -257
- package/dist/core/behavior-preset.js.map +0 -1
|
@@ -5,20 +5,21 @@
|
|
|
5
5
|
import { spawn } from "node:child_process";
|
|
6
6
|
import { splitKnownThinkingSuffix } from "../../shared/model-info.js";
|
|
7
7
|
import { existsSync, unlinkSync } from "node:fs";
|
|
8
|
-
import
|
|
8
|
+
import { childRowLabel } from "../../shared/types.js";
|
|
9
9
|
import { ensureArtifactsDir, getArtifactPaths, writeArtifact, writeMetadata, } from "../../shared/artifacts.js";
|
|
10
10
|
import { createChildTranscriptWriter } from "../../shared/child-transcript.js";
|
|
11
11
|
import { DEFAULT_MAX_OUTPUT, INTERCOM_DETACH_REQUEST_EVENT, INTERCOM_DETACH_RESPONSE_EVENT, truncateOutput, getSubagentDepthEnv, } from "../../shared/types.js";
|
|
12
12
|
import { DEFAULT_CONTROL_CONFIG, buildControlEvent, claimControlNotification, deriveActivityState, shouldNotifyControlEvent, } from "../shared/subagent-control.js";
|
|
13
13
|
import { getFinalOutput, findLatestSessionFile, detectSubagentError, extractToolArgsPreview, extractTextFromContent, } from "../../shared/utils.js";
|
|
14
14
|
import { buildSkillInjection, resolveSkillsWithFallback } from "../../agents/skills.js";
|
|
15
|
-
import {
|
|
15
|
+
import { resolveChildExcludeTools } from "../shared/child-tools.js";
|
|
16
|
+
import { normalizeSkillInput } from "../../agents/skills.js";
|
|
16
17
|
import { evaluateCompletionMutationGuard } from "../shared/completion-guard.js";
|
|
17
18
|
import { getPiSpawnCommand } from "../shared/pi-spawn.js";
|
|
18
19
|
import { createJsonlWriter } from "../../shared/jsonl-writer.js";
|
|
19
20
|
import { attachPostExitStdioGuard, trySignalChild } from "../../shared/post-exit-stdio-guard.js";
|
|
20
21
|
import { applyThinkingSuffix, buildPiArgs, cleanupTempDir } from "../shared/pi-args.js";
|
|
21
|
-
import {
|
|
22
|
+
import { PLAN_MODE_WRITE_SPAWN_ERROR, resolveChildPermissions, snapshotParentPermissionMode } from "../../../../../core/subagent-permission-inherit.js";
|
|
22
23
|
import { readStructuredOutput } from "../shared/structured-output.js";
|
|
23
24
|
import { readChildToolDiagnosticError } from "../shared/tool-availability.js";
|
|
24
25
|
import { captureSingleOutputSnapshot, extractChildWrittenOutput, formatSavedOutputReference, injectOutputPathSystemPrompt, resolveSingleOutput, validateFileOnlyOutputMode } from "../shared/single-output.js";
|
|
@@ -130,19 +131,23 @@ function snapshotResult(result, progress) {
|
|
|
130
131
|
outputReference: result.outputReference ? { ...result.outputReference } : undefined,
|
|
131
132
|
};
|
|
132
133
|
}
|
|
133
|
-
async function runSingleAttempt(runtimeCwd,
|
|
134
|
-
const effectiveThinking = options.thinkingOverride
|
|
134
|
+
async function runSingleAttempt(runtimeCwd, spec, task, model, options, shared) {
|
|
135
|
+
const effectiveThinking = options.thinkingOverride;
|
|
135
136
|
const modelArg = applyThinkingSuffix(model, effectiveThinking, options.thinkingOverride !== undefined);
|
|
136
137
|
const watchdogConfig = resolveWatchdogConfig(options.cwd ?? runtimeCwd);
|
|
137
138
|
const childWatchdog = watchdogConfig.ok
|
|
138
139
|
? resolveChildWatchdogConfig({
|
|
139
140
|
config: watchdogConfig.config,
|
|
140
|
-
agent:
|
|
141
|
+
agent: spec.childId,
|
|
141
142
|
runId: options.runId,
|
|
142
143
|
childIndex: options.index ?? 0,
|
|
143
144
|
})
|
|
144
145
|
: undefined;
|
|
145
|
-
const
|
|
146
|
+
const excludeTools = resolveChildExcludeTools({
|
|
147
|
+
permissions: spec.effectivePermissions,
|
|
148
|
+
fanoutAuthorized: spec.fanoutAuthorized,
|
|
149
|
+
});
|
|
150
|
+
const appendPrompt = appendTurnBudgetSystemPrompt(shared.systemPrompt, options.turnBudget);
|
|
146
151
|
const { args, env: sharedEnv, tempDir, toolDiagnosticPath } = buildPiArgs({
|
|
147
152
|
baseArgs: ["--mode", "json", "-p"],
|
|
148
153
|
task,
|
|
@@ -151,21 +156,21 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
151
156
|
sessionFile: options.sessionFile,
|
|
152
157
|
model: modelArg,
|
|
153
158
|
thinking: effectiveThinking,
|
|
154
|
-
systemPromptMode:
|
|
155
|
-
inheritProjectContext:
|
|
156
|
-
inheritSkills:
|
|
159
|
+
systemPromptMode: "append",
|
|
160
|
+
inheritProjectContext: true,
|
|
161
|
+
inheritSkills: false,
|
|
157
162
|
requireReadTool: Boolean(shared.resolvedSkillNames?.length),
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
+
excludeTools,
|
|
164
|
+
childPermission: spec.effectivePermissions,
|
|
165
|
+
childId: spec.childId,
|
|
166
|
+
childDescription: spec.description,
|
|
167
|
+
systemPrompt: appendPrompt || undefined,
|
|
163
168
|
cwd: options.cwd ?? runtimeCwd,
|
|
164
|
-
promptFileStem:
|
|
169
|
+
promptFileStem: spec.childId,
|
|
165
170
|
intercomSessionName: options.intercomSessionName,
|
|
166
171
|
orchestratorIntercomTarget: options.orchestratorIntercomTarget,
|
|
167
172
|
runId: options.runId,
|
|
168
|
-
childAgentName:
|
|
173
|
+
childAgentName: spec.childId,
|
|
169
174
|
childIndex: options.index ?? 0,
|
|
170
175
|
parentEventSink: options.nestedRoute?.eventSink,
|
|
171
176
|
parentControlInbox: options.nestedRoute?.controlInbox,
|
|
@@ -176,11 +181,13 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
176
181
|
toolBudget: options.toolBudget,
|
|
177
182
|
childWatchdog,
|
|
178
183
|
waitToolEnabled: options.waitToolEnabled,
|
|
179
|
-
parentPermissionMode,
|
|
180
184
|
});
|
|
181
185
|
const thinkingFromModel = modelArg ? splitKnownThinkingSuffix(modelArg).thinkingSuffix.slice(1) || undefined : undefined;
|
|
182
186
|
const result = {
|
|
183
|
-
|
|
187
|
+
childId: spec.childId,
|
|
188
|
+
description: spec.description,
|
|
189
|
+
permissions: spec.effectivePermissions,
|
|
190
|
+
agent: spec.description,
|
|
184
191
|
task: shared.originalTask ?? task,
|
|
185
192
|
exitCode: 0,
|
|
186
193
|
messages: [],
|
|
@@ -220,7 +227,10 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
220
227
|
};
|
|
221
228
|
const progress = {
|
|
222
229
|
index: options.index ?? 0,
|
|
223
|
-
|
|
230
|
+
childId: spec.childId,
|
|
231
|
+
description: spec.description,
|
|
232
|
+
permissions: spec.effectivePermissions,
|
|
233
|
+
agent: spec.description,
|
|
224
234
|
status: "running",
|
|
225
235
|
task,
|
|
226
236
|
skills: shared.resolvedSkillNames,
|
|
@@ -413,14 +423,14 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
413
423
|
if (hasRoute) {
|
|
414
424
|
if (typeof event.runId === "string" && event.runId !== options.runId)
|
|
415
425
|
return;
|
|
416
|
-
if (typeof event.agent === "string" && event.agent !== agent.
|
|
426
|
+
if (typeof event.agent === "string" && event.agent !== spec.childId && event.agent !== spec.description)
|
|
417
427
|
return;
|
|
418
428
|
if (typeof event.childIndex === "number" && event.childIndex !== (options.index ?? 0))
|
|
419
429
|
return;
|
|
420
430
|
}
|
|
421
431
|
else if (!intercomStarted)
|
|
422
432
|
return;
|
|
423
|
-
options.intercomEvents?.emit(INTERCOM_DETACH_RESPONSE_EVENT, { requestId, accepted: true, runId: options.runId, agent:
|
|
433
|
+
options.intercomEvents?.emit(INTERCOM_DETACH_RESPONSE_EVENT, { requestId, accepted: true, runId: options.runId, agent: spec.childId, childIndex: options.index ?? 0 });
|
|
424
434
|
detachForIntercom();
|
|
425
435
|
});
|
|
426
436
|
const finish = (code) => {
|
|
@@ -467,7 +477,7 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
467
477
|
from: previous,
|
|
468
478
|
to: "needs_attention",
|
|
469
479
|
runId: options.runId,
|
|
470
|
-
agent:
|
|
480
|
+
agent: spec.description,
|
|
471
481
|
index: options.index,
|
|
472
482
|
ts: now,
|
|
473
483
|
lastActivityAt: progress.lastActivityAt,
|
|
@@ -495,10 +505,10 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
495
505
|
from: previous,
|
|
496
506
|
to: "active_long_running",
|
|
497
507
|
runId: options.runId,
|
|
498
|
-
agent:
|
|
508
|
+
agent: spec.description,
|
|
499
509
|
index: options.index,
|
|
500
510
|
ts: now,
|
|
501
|
-
message: `${
|
|
511
|
+
message: `${spec.description} is still active but long-running`,
|
|
502
512
|
reason,
|
|
503
513
|
turns: result.usage.turns,
|
|
504
514
|
tokens: progress.tokens,
|
|
@@ -623,7 +633,10 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
623
633
|
current: childWatchdogState,
|
|
624
634
|
event: evt,
|
|
625
635
|
runId: options.runId,
|
|
626
|
-
|
|
636
|
+
childId: spec.childId,
|
|
637
|
+
description: spec.description,
|
|
638
|
+
permissions: spec.effectivePermissions,
|
|
639
|
+
agent: spec.description,
|
|
627
640
|
childIndex: options.index ?? 0,
|
|
628
641
|
});
|
|
629
642
|
if (!next)
|
|
@@ -750,7 +763,7 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
750
763
|
}, mutatingFailureWindowMs);
|
|
751
764
|
if (shouldEscalateMutatingFailures(mutatingFailures, controlConfig.failedToolAttemptsBeforeAttention)) {
|
|
752
765
|
emitNeedsAttention(now, {
|
|
753
|
-
message: `${
|
|
766
|
+
message: `${spec.description} needs attention after repeated mutating tool failures`,
|
|
754
767
|
reason: "tool_failures",
|
|
755
768
|
currentTool: toolSnapshot.tool,
|
|
756
769
|
currentPath: toolSnapshot.path,
|
|
@@ -1063,13 +1076,12 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
1063
1076
|
const note = turnBudgetSoftNote(result.turnBudget, result.turnBudget.wrapUpRequestedAtTurn ?? result.turnBudget.turnCount);
|
|
1064
1077
|
fullOutput = fullOutput.trim() ? `${note}\n\n${fullOutput}` : note;
|
|
1065
1078
|
}
|
|
1066
|
-
const completionGuard = result.exitCode === 0 && !result.error
|
|
1079
|
+
const completionGuard = result.exitCode === 0 && !result.error
|
|
1067
1080
|
? evaluateCompletionMutationGuard({
|
|
1068
|
-
agent:
|
|
1081
|
+
agent: spec.effectivePermissions,
|
|
1069
1082
|
task: shared.originalTask ?? task,
|
|
1070
1083
|
messages: result.messages,
|
|
1071
|
-
tools:
|
|
1072
|
-
mcpDirectTools: agent.mcpDirectTools,
|
|
1084
|
+
tools: spec.effectivePermissions === "read-only" ? ["read", "grep", "find", "ls", "bash"] : undefined,
|
|
1073
1085
|
})
|
|
1074
1086
|
: undefined;
|
|
1075
1087
|
if (completionGuard?.triggered && !observedMutationAttempt) {
|
|
@@ -1080,11 +1092,11 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
1080
1092
|
emitControlEvent(buildControlEvent({
|
|
1081
1093
|
from: progress.activityState,
|
|
1082
1094
|
to: "needs_attention",
|
|
1083
|
-
runId: options.runId ??
|
|
1084
|
-
agent:
|
|
1095
|
+
runId: options.runId ?? spec.childId,
|
|
1096
|
+
agent: spec.description,
|
|
1085
1097
|
index: options.index,
|
|
1086
1098
|
ts: Date.now(),
|
|
1087
|
-
message: `${
|
|
1099
|
+
message: `${spec.description} completed without making edits for an implementation task`,
|
|
1088
1100
|
reason: "completion_guard",
|
|
1089
1101
|
}));
|
|
1090
1102
|
}
|
|
@@ -1123,22 +1135,32 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
1123
1135
|
/**
|
|
1124
1136
|
* Run a subagent synchronously (blocking until complete)
|
|
1125
1137
|
*/
|
|
1126
|
-
export async function runSync(runtimeCwd,
|
|
1127
|
-
const
|
|
1128
|
-
|
|
1138
|
+
export async function runSync(runtimeCwd, spec, options) {
|
|
1139
|
+
const task = spec.task;
|
|
1140
|
+
const label = childRowLabel(spec);
|
|
1141
|
+
const parentMode = snapshotParentPermissionMode(options.parentSessionId);
|
|
1142
|
+
const resolvedPermissions = resolveChildPermissions(parentMode, spec.requestedPermissions);
|
|
1143
|
+
if (!resolvedPermissions.ok) {
|
|
1144
|
+
const error = resolvedPermissions.error || PLAN_MODE_WRITE_SPAWN_ERROR;
|
|
1129
1145
|
return {
|
|
1130
|
-
|
|
1146
|
+
childId: spec.childId,
|
|
1147
|
+
description: spec.description,
|
|
1148
|
+
permissions: spec.effectivePermissions,
|
|
1149
|
+
agent: spec.description,
|
|
1131
1150
|
task,
|
|
1132
1151
|
exitCode: 1,
|
|
1133
1152
|
messages: [],
|
|
1134
1153
|
usage: emptyUsage(),
|
|
1135
|
-
error
|
|
1154
|
+
error,
|
|
1136
1155
|
};
|
|
1137
1156
|
}
|
|
1138
|
-
const outputModeValidationError = validateFileOnlyOutputMode(options.outputMode, options.outputPath, `Single run (${
|
|
1157
|
+
const outputModeValidationError = validateFileOnlyOutputMode(options.outputMode, options.outputPath, `Single run (${label})`);
|
|
1139
1158
|
if (outputModeValidationError) {
|
|
1140
1159
|
return {
|
|
1141
|
-
|
|
1160
|
+
childId: spec.childId,
|
|
1161
|
+
description: spec.description,
|
|
1162
|
+
permissions: spec.effectivePermissions,
|
|
1163
|
+
agent: spec.description,
|
|
1142
1164
|
task,
|
|
1143
1165
|
exitCode: 1,
|
|
1144
1166
|
messages: [],
|
|
@@ -1149,9 +1171,8 @@ export async function runSync(runtimeCwd, agents, agentName, task, options) {
|
|
|
1149
1171
|
}
|
|
1150
1172
|
const shareEnabled = options.share === true;
|
|
1151
1173
|
const effectiveAcceptance = resolveEffectiveAcceptance({
|
|
1152
|
-
explicit: options.acceptance,
|
|
1153
|
-
|
|
1154
|
-
acceptanceRole: agent.acceptanceRole,
|
|
1174
|
+
explicit: options.acceptance ?? spec.acceptance,
|
|
1175
|
+
permissions: spec.effectivePermissions,
|
|
1155
1176
|
task,
|
|
1156
1177
|
mode: options.acceptanceContext?.mode ?? "single",
|
|
1157
1178
|
async: options.acceptanceContext?.async,
|
|
@@ -1161,12 +1182,15 @@ export async function runSync(runtimeCwd, agents, agentName, task, options) {
|
|
|
1161
1182
|
const acceptancePrompt = formatAcceptancePrompt(effectiveAcceptance);
|
|
1162
1183
|
const taskWithAcceptance = acceptancePrompt ? `${task}\n${acceptancePrompt}` : task;
|
|
1163
1184
|
const sessionEnabled = Boolean(options.sessionFile || options.sessionDir) || shareEnabled;
|
|
1164
|
-
const skillNames = options.skills ??
|
|
1165
|
-
const skillCwd = options.cwd ?? runtimeCwd;
|
|
1166
|
-
const { resolved: resolvedSkills, missing: missingSkills } = resolveSkillsWithFallback(skillNames, skillCwd, runtimeCwd,
|
|
1185
|
+
const skillNames = options.skills ?? (spec.skill === false ? [] : (normalizeSkillInput(spec.skill) || []));
|
|
1186
|
+
const skillCwd = options.cwd ?? spec.cwd ?? runtimeCwd;
|
|
1187
|
+
const { resolved: resolvedSkills, missing: missingSkills } = resolveSkillsWithFallback(skillNames, skillCwd, runtimeCwd, undefined, skillCwd);
|
|
1167
1188
|
if (skillNames.some((skill) => skill.trim() === "pi-subagents") && missingSkills.includes("pi-subagents")) {
|
|
1168
1189
|
return {
|
|
1169
|
-
|
|
1190
|
+
childId: spec.childId,
|
|
1191
|
+
description: spec.description,
|
|
1192
|
+
permissions: spec.effectivePermissions,
|
|
1193
|
+
agent: spec.description,
|
|
1170
1194
|
task,
|
|
1171
1195
|
exitCode: 1,
|
|
1172
1196
|
messages: [],
|
|
@@ -1174,17 +1198,14 @@ export async function runSync(runtimeCwd, agents, agentName, task, options) {
|
|
|
1174
1198
|
error: "Skills not found: pi-subagents",
|
|
1175
1199
|
};
|
|
1176
1200
|
}
|
|
1177
|
-
let systemPrompt =
|
|
1201
|
+
let systemPrompt = "";
|
|
1178
1202
|
if (resolvedSkills.length > 0) {
|
|
1179
|
-
|
|
1180
|
-
systemPrompt = systemPrompt ? `${systemPrompt}\n\n${skillInjection}` : skillInjection;
|
|
1181
|
-
}
|
|
1182
|
-
const memoryInjection = buildAgentMemoryInjection(agent, skillCwd);
|
|
1183
|
-
if (memoryInjection) {
|
|
1184
|
-
systemPrompt = systemPrompt ? `${systemPrompt}\n\n${memoryInjection}` : memoryInjection;
|
|
1203
|
+
systemPrompt = buildSkillInjection(resolvedSkills);
|
|
1185
1204
|
}
|
|
1186
|
-
systemPrompt = injectOutputPathSystemPrompt(systemPrompt, options.outputPath,
|
|
1187
|
-
|
|
1205
|
+
systemPrompt = injectOutputPathSystemPrompt(systemPrompt, options.outputPath, {
|
|
1206
|
+
tools: spec.effectivePermissions === "read-only" ? ["read", "grep", "find", "ls", "bash"] : undefined,
|
|
1207
|
+
});
|
|
1208
|
+
const candidates = buildModelCandidates(options.modelOverride ?? spec.model, undefined, options.availableModels, options.preferredModelProvider, { scope: options.modelScope });
|
|
1188
1209
|
const attemptedModels = [];
|
|
1189
1210
|
const modelAttempts = [];
|
|
1190
1211
|
const aggregateUsage = emptyUsage();
|
|
@@ -1195,10 +1216,10 @@ export async function runSync(runtimeCwd, agents, agentName, task, options) {
|
|
|
1195
1216
|
let jsonlPath;
|
|
1196
1217
|
let transcriptWriter;
|
|
1197
1218
|
if (options.artifactsDir && options.artifactConfig?.enabled !== false) {
|
|
1198
|
-
artifactPathsResult = getArtifactPaths(options.artifactsDir, options.runId,
|
|
1219
|
+
artifactPathsResult = getArtifactPaths(options.artifactsDir, options.runId, spec.childId, options.index);
|
|
1199
1220
|
ensureArtifactsDir(options.artifactsDir);
|
|
1200
1221
|
if (options.artifactConfig?.includeInput !== false) {
|
|
1201
|
-
writeArtifact(artifactPathsResult.inputPath, `# Task for ${
|
|
1222
|
+
writeArtifact(artifactPathsResult.inputPath, `# Task for ${label}\n\n${taskWithAcceptance}`);
|
|
1202
1223
|
}
|
|
1203
1224
|
if (options.artifactConfig?.includeJsonl !== false) {
|
|
1204
1225
|
jsonlPath = artifactPathsResult.jsonlPath;
|
|
@@ -1208,7 +1229,7 @@ export async function runSync(runtimeCwd, agents, agentName, task, options) {
|
|
|
1208
1229
|
transcriptPath: artifactPathsResult.transcriptPath,
|
|
1209
1230
|
source: "foreground",
|
|
1210
1231
|
runId: options.runId,
|
|
1211
|
-
agent:
|
|
1232
|
+
agent: spec.childId,
|
|
1212
1233
|
childIndex: options.index,
|
|
1213
1234
|
cwd: options.cwd ?? runtimeCwd,
|
|
1214
1235
|
});
|
|
@@ -1220,7 +1241,9 @@ export async function runSync(runtimeCwd, agents, agentName, task, options) {
|
|
|
1220
1241
|
return;
|
|
1221
1242
|
writeMetadata(artifactPathsResult.metadataPath, {
|
|
1222
1243
|
runId: options.runId,
|
|
1223
|
-
|
|
1244
|
+
childId: spec.childId,
|
|
1245
|
+
description: spec.description,
|
|
1246
|
+
permissions: spec.effectivePermissions,
|
|
1224
1247
|
task,
|
|
1225
1248
|
exitCode: target.exitCode,
|
|
1226
1249
|
usage: target.usage,
|
|
@@ -1280,7 +1303,7 @@ export async function runSync(runtimeCwd, agents, agentName, task, options) {
|
|
|
1280
1303
|
for (let i = 0; i < modelsToTry.length; i++) {
|
|
1281
1304
|
const candidate = modelsToTry[i];
|
|
1282
1305
|
const outputSnapshot = captureSingleOutputSnapshot(options.outputPath);
|
|
1283
|
-
const result = await runSingleAttempt(runtimeCwd,
|
|
1306
|
+
const result = await runSingleAttempt(runtimeCwd, spec, taskWithAcceptance, candidate, detachedAwareOptions, {
|
|
1284
1307
|
sessionEnabled,
|
|
1285
1308
|
systemPrompt,
|
|
1286
1309
|
resolvedSkillNames: resolvedSkills.length > 0 ? resolvedSkills.map((skill) => skill.name) : undefined,
|
|
@@ -1302,7 +1325,7 @@ export async function runSync(runtimeCwd, agents, agentName, task, options) {
|
|
|
1302
1325
|
totalDurationMs += result.progressSummary?.durationMs ?? 0;
|
|
1303
1326
|
const attemptSucceeded = result.exitCode === 0 && !result.error;
|
|
1304
1327
|
const attempt = {
|
|
1305
|
-
model: result.model ?? candidate ??
|
|
1328
|
+
model: result.model ?? candidate ?? spec.model ?? "default",
|
|
1306
1329
|
success: attemptSucceeded,
|
|
1307
1330
|
exitCode: result.exitCode,
|
|
1308
1331
|
error: result.error,
|
|
@@ -1321,7 +1344,10 @@ export async function runSync(runtimeCwd, agents, agentName, task, options) {
|
|
|
1321
1344
|
attemptNotes.push(formatModelAttemptNote(attempt, modelsToTry[i + 1]));
|
|
1322
1345
|
}
|
|
1323
1346
|
const result = lastResult ?? {
|
|
1324
|
-
|
|
1347
|
+
childId: spec.childId,
|
|
1348
|
+
description: spec.description,
|
|
1349
|
+
permissions: spec.effectivePermissions,
|
|
1350
|
+
agent: spec.description,
|
|
1325
1351
|
task,
|
|
1326
1352
|
exitCode: 1,
|
|
1327
1353
|
messages: [],
|