@selesai/code 0.6.2 → 0.7.0
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 +16 -1
- package/README.md +1 -1
- package/dist/bun/cli.d.ts +0 -1
- package/dist/bun/cli.js +0 -1
- package/dist/bun/register-bedrock.d.ts +0 -1
- package/dist/bun/register-bedrock.js +0 -1
- package/dist/bun/restore-sandbox-env.d.ts +0 -1
- package/dist/bun/restore-sandbox-env.js +0 -1
- package/dist/cli/args.d.ts +0 -1
- package/dist/cli/args.js +0 -1
- package/dist/cli/config-selector.d.ts +0 -1
- package/dist/cli/config-selector.js +0 -1
- package/dist/cli/credential-print.d.ts +0 -1
- package/dist/cli/credential-print.js +0 -1
- package/dist/cli/file-processor.d.ts +0 -1
- package/dist/cli/file-processor.js +0 -1
- package/dist/cli/initial-message.d.ts +0 -1
- package/dist/cli/initial-message.js +0 -1
- package/dist/cli/list-models.d.ts +0 -1
- package/dist/cli/list-models.js +0 -1
- package/dist/cli/project-trust.d.ts +0 -1
- package/dist/cli/project-trust.js +0 -1
- package/dist/cli/session-picker.d.ts +0 -1
- package/dist/cli/session-picker.js +0 -1
- package/dist/cli/startup-ui.d.ts +0 -1
- package/dist/cli/startup-ui.js +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +0 -1
- package/dist/config.d.ts +0 -1
- package/dist/config.js +0 -1
- package/dist/core/agent-session-auto-handoff.test.d.ts +0 -1
- package/dist/core/agent-session-auto-handoff.test.js +0 -1
- package/dist/core/agent-session-runtime.d.ts +0 -1
- package/dist/core/agent-session-runtime.js +0 -1
- package/dist/core/agent-session-services.d.ts +0 -1
- package/dist/core/agent-session-services.js +0 -1
- package/dist/core/agent-session-skill-block.test.d.ts +0 -1
- package/dist/core/agent-session-skill-block.test.js +0 -1
- package/dist/core/agent-session.d.ts +0 -1
- package/dist/core/agent-session.js +0 -1
- package/dist/core/agents.d.ts +0 -1
- package/dist/core/agents.js +0 -1
- package/dist/core/auth-guidance.d.ts +0 -1
- package/dist/core/auth-guidance.js +0 -1
- package/dist/core/auth-storage.d.ts +0 -1
- package/dist/core/auth-storage.js +0 -1
- package/dist/core/bash-executor.d.ts +0 -1
- package/dist/core/bash-executor.js +0 -1
- package/dist/core/built-in-extensions.d.ts +0 -1
- package/dist/core/built-in-extensions.js +0 -1
- package/dist/core/cache-stats.d.ts +0 -1
- package/dist/core/cache-stats.js +0 -1
- package/dist/core/compaction/branch-summarization.d.ts +0 -1
- package/dist/core/compaction/branch-summarization.js +0 -1
- package/dist/core/compaction/compaction.d.ts +0 -1
- package/dist/core/compaction/compaction.js +0 -1
- package/dist/core/compaction/index.d.ts +0 -1
- package/dist/core/compaction/index.js +0 -1
- package/dist/core/compaction/utils.d.ts +0 -1
- package/dist/core/compaction/utils.js +0 -1
- package/dist/core/defaults.d.ts +0 -1
- package/dist/core/defaults.js +0 -1
- package/dist/core/diagnostics.d.ts +0 -1
- package/dist/core/diagnostics.js +0 -1
- package/dist/core/event-bus.d.ts +0 -1
- package/dist/core/event-bus.js +0 -1
- package/dist/core/exec.d.ts +0 -1
- package/dist/core/exec.js +0 -1
- package/dist/core/experimental.d.ts +0 -1
- package/dist/core/experimental.js +0 -1
- package/dist/core/export-html/ansi-to-html.d.ts +0 -1
- package/dist/core/export-html/ansi-to-html.js +0 -1
- package/dist/core/export-html/index.d.ts +0 -1
- package/dist/core/export-html/index.js +0 -1
- package/dist/core/export-html/tool-renderer.d.ts +0 -1
- package/dist/core/export-html/tool-renderer.js +0 -1
- package/dist/core/extensions/index.d.ts +0 -1
- package/dist/core/extensions/index.js +0 -1
- package/dist/core/extensions/loader.d.ts +0 -1
- package/dist/core/extensions/loader.js +0 -1
- package/dist/core/extensions/runner.d.ts +0 -1
- package/dist/core/extensions/runner.js +0 -1
- package/dist/core/extensions/types.d.ts +0 -1
- package/dist/core/extensions/types.js +0 -1
- package/dist/core/extensions/wrapper.d.ts +0 -1
- package/dist/core/extensions/wrapper.js +0 -1
- package/dist/core/footer-data-provider.d.ts +0 -1
- package/dist/core/footer-data-provider.js +0 -1
- package/dist/core/git-command.d.ts +0 -1
- package/dist/core/git-command.js +0 -1
- package/dist/core/http-dispatcher.d.ts +0 -1
- package/dist/core/http-dispatcher.js +0 -1
- package/dist/core/index.d.ts +0 -1
- package/dist/core/index.js +0 -1
- package/dist/core/keybindings.d.ts +0 -1
- package/dist/core/keybindings.js +0 -1
- package/dist/core/llama/client.d.ts +0 -1
- package/dist/core/llama/client.js +0 -1
- package/dist/core/llama/huggingface.d.ts +0 -1
- package/dist/core/llama/huggingface.js +0 -1
- package/dist/core/llama/index.d.ts +0 -1
- package/dist/core/llama/index.js +0 -1
- package/dist/core/llama/provider.d.ts +0 -1
- package/dist/core/llama/provider.js +0 -1
- package/dist/core/llama/ui.d.ts +0 -1
- package/dist/core/llama/ui.js +0 -1
- package/dist/core/messages.d.ts +0 -1
- package/dist/core/messages.js +0 -1
- package/dist/core/model-config.d.ts +0 -1
- package/dist/core/model-config.js +0 -1
- package/dist/core/model-registry.d.ts +0 -1
- package/dist/core/model-registry.js +0 -1
- package/dist/core/model-resolver.d.ts +0 -1
- package/dist/core/model-resolver.js +0 -1
- package/dist/core/model-runtime.d.ts +0 -1
- package/dist/core/model-runtime.js +0 -1
- package/dist/core/models-store.d.ts +0 -1
- package/dist/core/models-store.js +0 -1
- package/dist/core/output-guard.d.ts +0 -1
- package/dist/core/output-guard.js +0 -1
- package/dist/core/package-manager.d.ts +0 -1
- package/dist/core/package-manager.js +0 -1
- package/dist/core/package-manager.test.d.ts +0 -1
- package/dist/core/package-manager.test.js +0 -1
- package/dist/core/project-trust.d.ts +0 -1
- package/dist/core/project-trust.js +0 -1
- package/dist/core/prompt-templates.d.ts +0 -1
- package/dist/core/prompt-templates.js +0 -1
- package/dist/core/provider-attribution.d.ts +0 -1
- package/dist/core/provider-attribution.js +0 -1
- package/dist/core/provider-composer.d.ts +0 -1
- package/dist/core/provider-composer.js +0 -1
- package/dist/core/radius.d.ts +0 -1
- package/dist/core/radius.js +0 -1
- package/dist/core/remote-catalog-provider.d.ts +0 -1
- package/dist/core/remote-catalog-provider.js +0 -1
- package/dist/core/resolve-config-value.d.ts +0 -1
- package/dist/core/resolve-config-value.js +0 -1
- package/dist/core/resource-loader.d.ts +0 -1
- package/dist/core/resource-loader.js +0 -1
- package/dist/core/runtime-credentials.d.ts +0 -1
- package/dist/core/runtime-credentials.js +0 -1
- package/dist/core/sdk.d.ts +0 -1
- package/dist/core/sdk.js +0 -1
- package/dist/core/session-cwd.d.ts +0 -1
- package/dist/core/session-cwd.js +0 -1
- package/dist/core/session-manager.d.ts +0 -1
- package/dist/core/session-manager.js +0 -1
- package/dist/core/settings-manager-auto-handoff.test.d.ts +0 -1
- package/dist/core/settings-manager-auto-handoff.test.js +0 -1
- package/dist/core/settings-manager.d.ts +0 -4
- package/dist/core/settings-manager.js +0 -12
- package/dist/core/skills.d.ts +0 -1
- package/dist/core/skills.js +0 -1
- package/dist/core/slash-commands.d.ts +0 -1
- package/dist/core/slash-commands.js +0 -1
- package/dist/core/source-info.d.ts +0 -1
- package/dist/core/source-info.js +0 -1
- package/dist/core/system-prompt.d.ts +0 -1
- package/dist/core/system-prompt.js +0 -1
- package/dist/core/system-prompt.test.d.ts +0 -1
- package/dist/core/system-prompt.test.js +0 -1
- package/dist/core/telemetry.d.ts +0 -1
- package/dist/core/telemetry.js +0 -1
- package/dist/core/timings.d.ts +0 -1
- package/dist/core/timings.js +0 -1
- package/dist/core/tools/bash.d.ts +0 -1
- package/dist/core/tools/bash.js +0 -1
- package/dist/core/tools/edit-diff.d.ts +0 -1
- package/dist/core/tools/edit-diff.js +0 -1
- package/dist/core/tools/edit.d.ts +0 -1
- package/dist/core/tools/edit.js +0 -1
- package/dist/core/tools/file-mutation-queue.d.ts +0 -1
- package/dist/core/tools/file-mutation-queue.js +0 -1
- package/dist/core/tools/find.d.ts +0 -1
- package/dist/core/tools/find.js +0 -1
- package/dist/core/tools/grep.d.ts +0 -1
- package/dist/core/tools/grep.js +0 -1
- package/dist/core/tools/index.d.ts +0 -1
- package/dist/core/tools/index.js +0 -1
- package/dist/core/tools/ls.d.ts +0 -1
- package/dist/core/tools/ls.js +0 -1
- package/dist/core/tools/output-accumulator.d.ts +0 -1
- package/dist/core/tools/output-accumulator.js +0 -1
- package/dist/core/tools/path-utils.d.ts +0 -1
- package/dist/core/tools/path-utils.js +0 -1
- package/dist/core/tools/read.d.ts +0 -1
- package/dist/core/tools/read.js +0 -1
- package/dist/core/tools/render-utils.d.ts +0 -1
- package/dist/core/tools/render-utils.js +0 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts +0 -1
- package/dist/core/tools/tool-definition-wrapper.js +0 -1
- package/dist/core/tools/truncate.d.ts +0 -1
- package/dist/core/tools/truncate.js +0 -1
- package/dist/core/tools/write.d.ts +0 -1
- package/dist/core/tools/write.js +0 -1
- package/dist/core/trust-manager.d.ts +0 -1
- package/dist/core/trust-manager.js +0 -1
- package/dist/core/usage-totals.d.ts +0 -1
- package/dist/core/usage-totals.js +0 -1
- package/dist/defaults/models.json +8 -0
- package/dist/defaults/settings.json +6 -7
- package/dist/extensions/inline-skills.test.ts +13 -13
- package/dist/extensions/inline-skills.ts +6 -6
- package/dist/extensions/pi-subagents/CHANGELOG.md +89 -12
- package/dist/extensions/pi-subagents/README.md +339 -604
- package/dist/extensions/pi-subagents/package-lock.json +190 -2079
- package/dist/extensions/pi-subagents/package.json +13 -5
- package/dist/extensions/pi-subagents/prompts/parallel-context-build.md +1 -1
- package/dist/extensions/pi-subagents/prompts/parallel-handoff-plan.md +1 -1
- package/dist/extensions/pi-subagents/prompts/review-loop.md +1 -1
- package/dist/extensions/pi-subagents/skills/pi-subagents/SKILL.md +10 -10
- package/dist/extensions/pi-subagents/skills/pi-subagents/references/constraints-and-recipes.md +32 -43
- package/dist/extensions/pi-subagents/skills/pi-subagents/references/execution-controls.md +106 -105
- package/dist/extensions/pi-subagents/skills/pi-subagents/references/management-authoring-rpc.md +3 -3
- package/dist/extensions/pi-subagents/skills/pi-subagents/references/prompting-and-roles.md +28 -35
- package/dist/extensions/pi-subagents/src/agents/agent-management.ts +167 -124
- package/dist/extensions/pi-subagents/src/agents/agent-serializer.ts +19 -0
- package/dist/extensions/pi-subagents/src/agents/agents.ts +163 -75
- package/dist/extensions/pi-subagents/src/agents/chain-serializer.ts +10 -7
- package/dist/extensions/pi-subagents/src/agents/frontmatter.ts +5 -3
- package/dist/extensions/pi-subagents/src/agents/identity.ts +1 -1
- package/dist/extensions/pi-subagents/src/agents/proactive-skills.ts +14 -11
- package/dist/extensions/pi-subagents/src/agents/skills.ts +23 -6
- package/dist/extensions/pi-subagents/src/agents/task-aware-routing.ts +8 -1
- package/dist/extensions/pi-subagents/src/api/control-channel.ts +4 -0
- package/dist/extensions/pi-subagents/src/api/delegation.ts +26 -194
- package/dist/extensions/pi-subagents/src/api/external-runs.ts +129 -0
- package/dist/extensions/pi-subagents/src/api/intercom-bridge.ts +3 -0
- package/dist/extensions/pi-subagents/src/api/pi-args.ts +5 -0
- package/dist/extensions/pi-subagents/src/api/preflight.ts +4 -4
- package/dist/extensions/pi-subagents/src/api/shared-types.ts +19 -0
- package/dist/extensions/pi-subagents/src/extension/config.ts +10 -0
- package/dist/extensions/pi-subagents/src/extension/control-notices.ts +5 -39
- package/dist/extensions/pi-subagents/src/extension/doctor.ts +10 -9
- package/dist/extensions/pi-subagents/src/extension/fanout-child.ts +7 -4
- package/dist/extensions/pi-subagents/src/extension/index.ts +243 -77
- package/dist/extensions/pi-subagents/src/extension/rpc.ts +18 -6
- package/dist/extensions/pi-subagents/src/extension/schemas.ts +50 -39
- package/dist/extensions/pi-subagents/src/extension/tool-description.ts +36 -103
- package/dist/extensions/pi-subagents/src/inspectors/herdr/actions.ts +229 -0
- package/dist/extensions/pi-subagents/src/inspectors/herdr/client.ts +130 -0
- package/dist/extensions/pi-subagents/src/inspectors/herdr/inspector-runner.ts +141 -0
- package/dist/extensions/pi-subagents/src/inspectors/herdr/project-panes.ts +154 -0
- package/dist/extensions/pi-subagents/src/integrations/herdr-status.ts +330 -0
- package/dist/extensions/pi-subagents/src/intercom/intercom-bridge.ts +3 -2
- package/dist/extensions/pi-subagents/src/intercom/result-intercom.ts +5 -1
- package/dist/extensions/pi-subagents/src/missions/actions.ts +372 -0
- package/dist/extensions/pi-subagents/src/missions/lifecycle.ts +314 -0
- package/dist/extensions/pi-subagents/src/missions/store.ts +442 -0
- package/dist/extensions/pi-subagents/src/missions/types.ts +135 -0
- package/dist/extensions/pi-subagents/src/policy/authority.ts +46 -0
- package/dist/extensions/pi-subagents/src/profiles/profiles.ts +32 -6
- package/dist/extensions/pi-subagents/src/runs/background/async-execution.ts +103 -72
- package/dist/extensions/pi-subagents/src/runs/background/async-job-tracker.ts +10 -2
- package/dist/extensions/pi-subagents/src/runs/background/async-resume.ts +6 -6
- package/dist/extensions/pi-subagents/src/runs/background/async-status.ts +29 -1
- package/dist/extensions/pi-subagents/src/runs/background/auto-drain.ts +3 -3
- package/dist/extensions/pi-subagents/src/runs/background/chain-append.ts +3 -2
- package/dist/extensions/pi-subagents/src/runs/background/control-channel.ts +9 -7
- package/dist/extensions/pi-subagents/src/runs/background/fleet-view.ts +3 -4
- package/dist/extensions/pi-subagents/src/runs/background/notify.ts +3 -28
- package/dist/extensions/pi-subagents/src/runs/background/process-terminal.ts +5 -5
- package/dist/extensions/pi-subagents/src/runs/background/result-watcher.ts +18 -68
- package/dist/extensions/pi-subagents/src/runs/background/run-id-resolver.ts +3 -3
- package/dist/extensions/pi-subagents/src/runs/background/run-status.ts +35 -8
- package/dist/extensions/pi-subagents/src/runs/background/scheduled-runs.ts +602 -375
- package/dist/extensions/pi-subagents/src/runs/background/stale-run-reconciler.ts +3 -3
- package/dist/extensions/pi-subagents/src/runs/background/subagent-runner.ts +612 -464
- package/dist/extensions/pi-subagents/src/runs/background/subagent-wait.ts +50 -9
- package/dist/extensions/pi-subagents/src/runs/background/wait-subscriptions.ts +253 -0
- package/dist/extensions/pi-subagents/src/runs/background/wait-tool.ts +12 -4
- package/dist/extensions/pi-subagents/src/runs/foreground/async-steering-action.ts +3 -3
- package/dist/extensions/pi-subagents/src/runs/foreground/chain-clarify.ts +8 -4
- package/dist/extensions/pi-subagents/src/runs/foreground/chain-execution.ts +74 -102
- package/dist/extensions/pi-subagents/src/runs/foreground/execution.ts +21 -22
- package/dist/extensions/pi-subagents/src/runs/foreground/subagent-executor.ts +1050 -396
- package/dist/extensions/pi-subagents/src/runs/shared/acceptance.ts +44 -18
- package/dist/extensions/pi-subagents/src/runs/shared/capability-ceiling.ts +0 -1
- package/dist/extensions/pi-subagents/src/runs/shared/child-protocol.ts +302 -22
- package/dist/extensions/pi-subagents/src/runs/shared/dynamic-fanout.ts +1 -1
- package/dist/extensions/pi-subagents/src/runs/shared/external-cli-runner.ts +130 -0
- package/dist/extensions/pi-subagents/src/runs/shared/long-running-guard.ts +42 -1
- package/dist/extensions/pi-subagents/src/runs/shared/model-fallback.ts +1 -1
- package/dist/extensions/pi-subagents/src/runs/shared/nested-events.ts +59 -5
- package/dist/extensions/pi-subagents/src/runs/shared/nested-render.ts +9 -4
- package/dist/extensions/pi-subagents/src/runs/shared/parallel-handoff.ts +86 -2
- package/dist/extensions/pi-subagents/src/runs/shared/parallel-utils.ts +11 -2
- package/dist/extensions/pi-subagents/src/runs/shared/permissions.ts +95 -0
- package/dist/extensions/pi-subagents/src/runs/shared/pi-args.ts +11 -1
- package/dist/extensions/pi-subagents/src/runs/shared/pi-spawn.ts +15 -6
- package/dist/extensions/pi-subagents/src/runs/shared/run-history.ts +1 -1
- package/dist/extensions/pi-subagents/src/runs/shared/single-output.ts +9 -63
- package/dist/extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.ts +37 -6
- package/dist/extensions/pi-subagents/src/runs/shared/subagent-startup-retry.ts +5 -2
- package/dist/extensions/pi-subagents/src/runs/shared/task-intent.ts +2 -23
- package/dist/extensions/pi-subagents/src/runs/shared/turn-budget.ts +6 -6
- package/dist/extensions/pi-subagents/src/runs/shared/worktree.ts +124 -13
- package/dist/extensions/pi-subagents/src/shared/accessible-dir.ts +29 -7
- package/dist/extensions/pi-subagents/src/shared/artifacts.ts +18 -1
- package/dist/extensions/pi-subagents/src/shared/fork-context.ts +3 -2
- package/dist/extensions/pi-subagents/src/shared/launch-contract.ts +1 -0
- package/dist/extensions/pi-subagents/src/shared/settings.ts +10 -0
- package/dist/extensions/pi-subagents/src/shared/types.ts +158 -55
- package/dist/extensions/pi-subagents/src/shared/utils.ts +16 -66
- package/dist/extensions/pi-subagents/src/slash/delegation-adapters.ts +33 -199
- package/dist/extensions/pi-subagents/src/slash/delegation-request.ts +43 -126
- package/dist/extensions/pi-subagents/src/slash/inline-subagents.ts +103 -0
- package/dist/extensions/pi-subagents/src/slash/prompt-template-bridge.ts +158 -205
- package/dist/extensions/pi-subagents/src/slash/prompt-workflows.ts +22 -58
- package/dist/extensions/pi-subagents/src/slash/slash-bridge.ts +14 -0
- package/dist/extensions/pi-subagents/src/slash/slash-commands.ts +44 -642
- package/dist/extensions/pi-subagents/src/slash/subagents-admin.ts +18 -14
- package/dist/extensions/pi-subagents/src/tui/fleet-status.ts +156 -21
- package/dist/extensions/pi-subagents/src/tui/fleet-transcript.ts +110 -5
- package/dist/extensions/pi-subagents/src/tui/fleet.ts +60 -24
- package/dist/extensions/pi-subagents/src/tui/render.ts +296 -140
- package/dist/extensions/pi-subagents/src/types/pi-runtime-compat.d.ts +14 -0
- package/dist/extensions/pi-subagents/src/watchdog/change-signature.ts +1 -1
- package/dist/extensions/pi-subagents/src/watchdog/lsp-diagnostics.ts +13 -7
- package/dist/extensions/pi-subagents/src/watchdog/model-selection.ts +2 -2
- package/dist/extensions/pi-subagents/src/watchdog/permission-arbiter.ts +145 -0
- package/dist/extensions/pi-subagents/src/watchdog/register-child.ts +1 -1
- package/dist/extensions/pi-subagents/src/watchdog/register-main.ts +1 -1
- package/dist/extensions/pi-subagents/src/watchdog/review.ts +4 -1
- package/dist/extensions/pi-subagents/src/watchdog/runtime.ts +3 -2
- package/dist/extensions/pi-subagents/src/workflows/chat-progress.ts +140 -0
- package/dist/extensions/pi-subagents/src/workflows/scripted-workflow.ts +415 -0
- package/dist/extensions/pi-subagents/test/e2e/real-session-subagent.test.ts +41 -144
- package/dist/extensions/pi-subagents/test/integration/acceptance-file-report.test.ts +16 -16
- package/dist/extensions/pi-subagents/test/integration/async-execution.test.ts +415 -298
- package/dist/extensions/pi-subagents/test/integration/async-job-tracker.test.ts +149 -82
- package/dist/extensions/pi-subagents/test/integration/async-status.test.ts +40 -40
- package/dist/extensions/pi-subagents/test/integration/chain-clarify.test.ts +15 -15
- package/dist/extensions/pi-subagents/test/integration/chain-execution.test.ts +193 -133
- package/dist/extensions/pi-subagents/test/integration/detect-error.test.ts +1 -49
- package/dist/extensions/pi-subagents/test/integration/external-cli-runner.test.ts +62 -0
- package/dist/extensions/pi-subagents/test/integration/fork-context-execution.test.ts +56 -58
- package/dist/extensions/pi-subagents/test/integration/intercom-result-delivery.test.ts +81 -68
- package/dist/extensions/pi-subagents/test/integration/parallel-execution.test.ts +20 -25
- package/dist/extensions/pi-subagents/test/integration/render-fork-badge.test.ts +425 -317
- package/dist/extensions/pi-subagents/test/integration/render-widget.test.ts +73 -73
- package/dist/extensions/pi-subagents/test/integration/result-watcher.test.ts +123 -98
- package/dist/extensions/pi-subagents/test/integration/single-execution.test.ts +653 -240
- package/dist/extensions/pi-subagents/test/integration/slash-commands.test.ts +20 -1661
- package/dist/extensions/pi-subagents/test/integration/slash-live-state.test.ts +9 -9
- package/dist/extensions/pi-subagents/test/integration/template-resolution.test.ts +3 -3
- package/dist/extensions/pi-subagents/test/integration/top-level-async.test.ts +2 -2
- package/dist/extensions/pi-subagents/test/support/mock-pi-script.mjs +8 -5
- package/dist/extensions/pi-subagents/test/support/mock-pi.ts +6 -6
- package/dist/extensions/pi-subagents/test/support/real-session-runner.ts +4 -20
- package/dist/extensions/pi-subagents/test/unit/acceptance.test.ts +25 -4
- package/dist/extensions/pi-subagents/test/unit/agent-disabled.test.ts +1 -1
- package/dist/extensions/pi-subagents/test/unit/agent-frontmatter.test.ts +280 -295
- package/dist/extensions/pi-subagents/test/unit/agent-management.test.ts +47 -207
- package/dist/extensions/pi-subagents/test/unit/agent-memory.test.ts +26 -26
- package/dist/extensions/pi-subagents/test/unit/agent-overrides.test.ts +89 -89
- package/dist/extensions/pi-subagents/test/unit/agent-selection.test.ts +9 -9
- package/dist/extensions/pi-subagents/test/unit/artifacts.test.ts +10 -0
- package/dist/extensions/pi-subagents/test/unit/async-execution.test.ts +33 -9
- package/dist/extensions/pi-subagents/test/unit/async-interrupt-action.test.ts +24 -2
- package/dist/extensions/pi-subagents/test/unit/async-permission-session.test.ts +11 -9
- package/dist/extensions/pi-subagents/test/unit/async-recovery-descriptor.test.ts +2 -2
- package/dist/extensions/pi-subagents/test/unit/async-resume.test.ts +40 -40
- package/dist/extensions/pi-subagents/test/unit/authority-policy.test.ts +22 -0
- package/dist/extensions/pi-subagents/test/unit/background-work.test.ts +1 -1
- package/dist/extensions/pi-subagents/test/unit/capability-ceiling-agent-allowlist.test.ts +5 -39
- package/dist/extensions/pi-subagents/test/unit/chain-append.test.ts +19 -19
- package/dist/extensions/pi-subagents/test/unit/chain-root-attachment.test.ts +9 -9
- package/dist/extensions/pi-subagents/test/unit/chain-serializer.test.ts +20 -20
- package/dist/extensions/pi-subagents/test/unit/child-protocol.test.ts +99 -0
- package/dist/extensions/pi-subagents/test/unit/child-transcript.test.ts +9 -9
- package/dist/extensions/pi-subagents/test/unit/compaction-resume.test.ts +41 -0
- package/dist/extensions/pi-subagents/test/unit/completion-dedupe.test.ts +2 -2
- package/dist/extensions/pi-subagents/test/unit/completion-guard.test.ts +35 -5
- package/dist/extensions/pi-subagents/test/unit/config-dir-runtime.test.ts +7 -0
- package/dist/extensions/pi-subagents/test/unit/control-notices.test.ts +16 -82
- package/dist/extensions/pi-subagents/test/unit/delegation-api.test.ts +162 -620
- package/dist/extensions/pi-subagents/test/unit/doctor.test.ts +1 -1
- package/dist/extensions/pi-subagents/test/unit/dynamic-fanout.test.ts +25 -25
- package/dist/extensions/pi-subagents/test/unit/ensure-accessible-dir.test.ts +125 -0
- package/dist/extensions/pi-subagents/test/unit/external-cli-runner.test.ts +94 -0
- package/dist/extensions/pi-subagents/test/unit/external-runs.test.ts +66 -0
- package/dist/extensions/pi-subagents/test/unit/extra-agent-dirs.test.ts +3 -3
- package/dist/extensions/pi-subagents/test/unit/fleet-status.test.ts +242 -52
- package/dist/extensions/pi-subagents/test/unit/fleet-transcript.test.ts +127 -0
- package/dist/extensions/pi-subagents/test/unit/fleet.test.ts +197 -36
- package/dist/extensions/pi-subagents/test/unit/foreground-control.test.ts +4 -4
- package/dist/extensions/pi-subagents/test/unit/herdr-inspector.test.ts +245 -0
- package/dist/extensions/pi-subagents/test/unit/herdr-status-bridge.test.ts +494 -0
- package/dist/extensions/pi-subagents/test/unit/index-child-registration.test.ts +261 -31
- package/dist/extensions/pi-subagents/test/unit/inline-subagents.test.ts +52 -0
- package/dist/extensions/pi-subagents/test/unit/intercom-bridge.test.ts +6 -6
- package/dist/extensions/pi-subagents/test/unit/mission-lifecycle.test.ts +217 -0
- package/dist/extensions/pi-subagents/test/unit/mission-store.test.ts +182 -0
- package/dist/extensions/pi-subagents/test/unit/mock-pi.test.ts +22 -0
- package/dist/extensions/pi-subagents/test/unit/model-fallback.test.ts +1 -1
- package/dist/extensions/pi-subagents/test/unit/native-supervisor-channel.test.ts +10 -10
- package/dist/extensions/pi-subagents/test/unit/nested-control.test.ts +20 -12
- package/dist/extensions/pi-subagents/test/unit/nested-events.test.ts +47 -5
- package/dist/extensions/pi-subagents/test/unit/notify.test.ts +49 -55
- package/dist/extensions/pi-subagents/test/unit/package-manifest.test.ts +20 -3
- package/dist/extensions/pi-subagents/test/unit/parallel-handoff.test.ts +37 -7
- package/dist/extensions/pi-subagents/test/unit/parallel-utils.test.ts +10 -10
- package/dist/extensions/pi-subagents/test/unit/path-handling.test.ts +3 -3
- package/dist/extensions/pi-subagents/test/unit/permissions.test.ts +46 -0
- package/dist/extensions/pi-subagents/test/unit/pi-args.test.ts +31 -10
- package/dist/extensions/pi-subagents/test/unit/pi-spawn.test.ts +40 -16
- package/dist/extensions/pi-subagents/test/unit/preflight.test.ts +42 -44
- package/dist/extensions/pi-subagents/test/unit/proactive-skills.test.ts +13 -13
- package/dist/extensions/pi-subagents/test/unit/process-terminal.test.ts +4 -4
- package/dist/extensions/pi-subagents/test/unit/profiles.test.ts +75 -9
- package/dist/extensions/pi-subagents/test/unit/prompt-template-bridge.test.ts +20 -84
- package/dist/extensions/pi-subagents/test/unit/prompt-workflows.test.ts +15 -16
- package/dist/extensions/pi-subagents/test/unit/render-helpers.test.ts +28 -28
- package/dist/extensions/pi-subagents/test/unit/result-intercom.test.ts +19 -12
- package/dist/extensions/pi-subagents/test/unit/rpc.test.ts +37 -21
- package/dist/extensions/pi-subagents/test/unit/run-id-resolver.test.ts +1 -1
- package/dist/extensions/pi-subagents/test/unit/run-status.test.ts +50 -50
- package/dist/extensions/pi-subagents/test/unit/scheduled-runs.test.ts +396 -433
- package/dist/extensions/pi-subagents/test/unit/schemas.test.ts +76 -153
- package/dist/extensions/pi-subagents/test/unit/scripted-workflow.test.ts +411 -0
- package/dist/extensions/pi-subagents/test/unit/single-output.test.ts +1 -91
- package/dist/extensions/pi-subagents/test/unit/skills-fallback.test.ts +139 -0
- package/dist/extensions/pi-subagents/test/unit/slash-bridge.test.ts +29 -0
- package/dist/extensions/pi-subagents/test/unit/stale-run-reconciler.test.ts +13 -13
- package/dist/extensions/pi-subagents/test/unit/steering-action.test.ts +2 -2
- package/dist/extensions/pi-subagents/test/unit/steering.test.ts +2 -2
- package/dist/extensions/pi-subagents/test/unit/subagent-control.test.ts +35 -35
- package/dist/extensions/pi-subagents/test/unit/subagent-prompt-runtime.test.ts +53 -18
- package/dist/extensions/pi-subagents/test/unit/subagent-startup-retry.test.ts +13 -1
- package/dist/extensions/pi-subagents/test/unit/subagent-wait.test.ts +44 -11
- package/dist/extensions/pi-subagents/test/unit/task-intent.test.ts +2 -26
- package/dist/extensions/pi-subagents/test/unit/tool-description.test.ts +24 -148
- package/dist/extensions/pi-subagents/test/unit/turn-budget.test.ts +11 -9
- package/dist/extensions/pi-subagents/test/unit/wait-subscriptions.test.ts +351 -0
- package/dist/extensions/pi-subagents/test/unit/watchdog-child-status.test.ts +13 -13
- package/dist/extensions/pi-subagents/test/unit/watchdog-lsp-diagnostics.test.ts +1 -1
- package/dist/extensions/pi-subagents/test/unit/watchdog-permission-arbiter.test.ts +79 -0
- package/dist/extensions/pi-subagents/test/unit/watchdog-runtime.test.ts +1 -1
- package/dist/extensions/pi-subagents/test/unit/watchdog-settings.test.ts +8 -8
- package/dist/extensions/pi-subagents/test/unit/widget-nested-render.test.ts +45 -9
- package/dist/extensions/pi-subagents/test/unit/workflow-chat-progress.test.ts +197 -0
- package/dist/extensions/pi-subagents/test/unit/workflow-graph.test.ts +8 -8
- package/dist/extensions/pi-subagents/test/unit/worktree.test.ts +142 -12
- package/dist/extensions/pi-subagents/tsconfig.json +15 -0
- package/dist/extensions/pi-web-agent/package.json +1 -1
- package/dist/extensions/rtk.test.ts +126 -0
- package/dist/extensions/rtk.ts +56 -20
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/main.d.ts +0 -1
- package/dist/main.js +0 -1
- package/dist/migrations.d.ts +0 -1
- package/dist/migrations.js +0 -1
- package/dist/modes/index.d.ts +0 -1
- package/dist/modes/index.js +0 -1
- package/dist/modes/interactive/components/armin.d.ts +0 -1
- package/dist/modes/interactive/components/armin.js +0 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +0 -1
- package/dist/modes/interactive/components/assistant-message.js +0 -1
- package/dist/modes/interactive/components/bash-execution.d.ts +0 -1
- package/dist/modes/interactive/components/bash-execution.js +0 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts +0 -1
- package/dist/modes/interactive/components/bordered-loader.js +0 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +0 -1
- package/dist/modes/interactive/components/branch-summary-message.js +0 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +0 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +0 -1
- package/dist/modes/interactive/components/config-selector.d.ts +0 -1
- package/dist/modes/interactive/components/config-selector.js +0 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts +0 -1
- package/dist/modes/interactive/components/countdown-timer.js +0 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +0 -1
- package/dist/modes/interactive/components/custom-editor.js +0 -1
- package/dist/modes/interactive/components/custom-entry.d.ts +0 -1
- package/dist/modes/interactive/components/custom-entry.js +0 -1
- package/dist/modes/interactive/components/custom-message.d.ts +0 -1
- package/dist/modes/interactive/components/custom-message.js +0 -1
- package/dist/modes/interactive/components/daxnuts.d.ts +0 -1
- package/dist/modes/interactive/components/daxnuts.js +0 -1
- package/dist/modes/interactive/components/diff.d.ts +0 -1
- package/dist/modes/interactive/components/diff.js +0 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts +0 -1
- package/dist/modes/interactive/components/dynamic-border.js +0 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts +0 -1
- package/dist/modes/interactive/components/earendil-announcement.js +0 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +0 -1
- package/dist/modes/interactive/components/extension-editor.js +0 -1
- package/dist/modes/interactive/components/extension-input.d.ts +0 -1
- package/dist/modes/interactive/components/extension-input.js +0 -1
- package/dist/modes/interactive/components/extension-selector.d.ts +0 -1
- package/dist/modes/interactive/components/extension-selector.js +0 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts +0 -1
- package/dist/modes/interactive/components/first-time-setup.js +0 -1
- package/dist/modes/interactive/components/footer.d.ts +0 -1
- package/dist/modes/interactive/components/footer.js +0 -1
- package/dist/modes/interactive/components/index.d.ts +0 -1
- package/dist/modes/interactive/components/index.js +0 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts +0 -1
- package/dist/modes/interactive/components/keybinding-hints.js +0 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +0 -1
- package/dist/modes/interactive/components/login-dialog.js +0 -1
- package/dist/modes/interactive/components/model-selector.d.ts +0 -1
- package/dist/modes/interactive/components/model-selector.js +0 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +0 -1
- package/dist/modes/interactive/components/oauth-selector.js +0 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +0 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +0 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts +0 -1
- package/dist/modes/interactive/components/session-selector-search.js +0 -1
- package/dist/modes/interactive/components/session-selector.d.ts +0 -1
- package/dist/modes/interactive/components/session-selector.js +0 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +0 -3
- package/dist/modes/interactive/components/settings-selector.js +1 -14
- package/dist/modes/interactive/components/show-images-selector.d.ts +0 -1
- package/dist/modes/interactive/components/show-images-selector.js +0 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +0 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +0 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +0 -1
- package/dist/modes/interactive/components/status-indicator.js +0 -1
- package/dist/modes/interactive/components/theme-selector.d.ts +0 -1
- package/dist/modes/interactive/components/theme-selector.js +0 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts +0 -1
- package/dist/modes/interactive/components/thinking-selector.js +0 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +0 -1
- package/dist/modes/interactive/components/tool-execution.js +0 -1
- package/dist/modes/interactive/components/tree-selector.d.ts +0 -1
- package/dist/modes/interactive/components/tree-selector.js +0 -1
- package/dist/modes/interactive/components/trust-selector.d.ts +0 -1
- package/dist/modes/interactive/components/trust-selector.js +0 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts +0 -1
- package/dist/modes/interactive/components/user-message-selector.js +0 -1
- package/dist/modes/interactive/components/user-message.d.ts +0 -1
- package/dist/modes/interactive/components/user-message.js +0 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts +0 -1
- package/dist/modes/interactive/components/visual-truncate.js +0 -1
- package/dist/modes/interactive/external-editor.d.ts +0 -1
- package/dist/modes/interactive/external-editor.js +0 -1
- package/dist/modes/interactive/interactive-mode.d.ts +0 -2
- package/dist/modes/interactive/interactive-mode.js +1 -22
- package/dist/modes/interactive/model-search.d.ts +0 -1
- package/dist/modes/interactive/model-search.js +0 -1
- package/dist/modes/interactive/theme/theme-controller.d.ts +0 -1
- package/dist/modes/interactive/theme/theme-controller.js +0 -1
- package/dist/modes/interactive/theme/theme.d.ts +0 -1
- package/dist/modes/interactive/theme/theme.js +0 -1
- package/dist/modes/print-mode.d.ts +0 -1
- package/dist/modes/print-mode.js +0 -1
- package/dist/modes/rpc/jsonl.d.ts +0 -1
- package/dist/modes/rpc/jsonl.js +0 -1
- package/dist/modes/rpc/rpc-client.d.ts +1 -2
- package/dist/modes/rpc/rpc-client.js +1 -2
- package/dist/modes/rpc/rpc-mode.d.ts +0 -1
- package/dist/modes/rpc/rpc-mode.js +0 -9
- package/dist/modes/rpc/rpc-types.d.ts +0 -1
- package/dist/modes/rpc/rpc-types.js +0 -1
- package/dist/package-manager-cli.d.ts +0 -1
- package/dist/package-manager-cli.js +0 -1
- package/dist/rpc-entry.d.ts +0 -1
- package/dist/rpc-entry.js +0 -1
- package/dist/utils/ansi.d.ts +0 -1
- package/dist/utils/ansi.js +0 -1
- package/dist/utils/changelog.d.ts +0 -1
- package/dist/utils/changelog.js +0 -1
- package/dist/utils/child-process.d.ts +0 -1
- package/dist/utils/child-process.js +0 -1
- package/dist/utils/clipboard-image.d.ts +0 -1
- package/dist/utils/clipboard-image.js +0 -1
- package/dist/utils/clipboard-native.d.ts +0 -1
- package/dist/utils/clipboard-native.js +0 -1
- package/dist/utils/clipboard.d.ts +0 -1
- package/dist/utils/clipboard.js +0 -1
- package/dist/utils/deprecation.d.ts +0 -1
- package/dist/utils/deprecation.js +0 -1
- package/dist/utils/exif-orientation.d.ts +0 -1
- package/dist/utils/exif-orientation.js +0 -1
- package/dist/utils/frontmatter.d.ts +0 -1
- package/dist/utils/frontmatter.js +0 -1
- package/dist/utils/fs-watch.d.ts +0 -1
- package/dist/utils/fs-watch.js +0 -1
- package/dist/utils/git.d.ts +0 -1
- package/dist/utils/git.js +0 -1
- package/dist/utils/html.d.ts +0 -1
- package/dist/utils/html.js +0 -1
- package/dist/utils/image-convert.d.ts +0 -1
- package/dist/utils/image-convert.js +0 -1
- package/dist/utils/image-process.d.ts +0 -1
- package/dist/utils/image-process.js +0 -1
- package/dist/utils/image-resize-core.d.ts +0 -1
- package/dist/utils/image-resize-core.js +0 -1
- package/dist/utils/image-resize-worker.d.ts +0 -1
- package/dist/utils/image-resize-worker.js +0 -1
- package/dist/utils/image-resize.d.ts +0 -1
- package/dist/utils/image-resize.js +0 -1
- package/dist/utils/json.d.ts +0 -1
- package/dist/utils/json.js +0 -1
- package/dist/utils/mime.d.ts +0 -1
- package/dist/utils/mime.js +0 -1
- package/dist/utils/open-browser.d.ts +0 -1
- package/dist/utils/open-browser.js +0 -1
- package/dist/utils/paths.d.ts +0 -1
- package/dist/utils/paths.js +0 -1
- package/dist/utils/photon.d.ts +0 -1
- package/dist/utils/photon.js +0 -1
- package/dist/utils/pi-user-agent.d.ts +0 -1
- package/dist/utils/pi-user-agent.js +0 -1
- package/dist/utils/shell.d.ts +0 -1
- package/dist/utils/shell.js +0 -1
- package/dist/utils/sleep.d.ts +0 -1
- package/dist/utils/sleep.js +0 -1
- package/dist/utils/syntax-highlight.d.ts +0 -1
- package/dist/utils/syntax-highlight.js +0 -1
- package/dist/utils/thinking-tags.d.ts +0 -1
- package/dist/utils/thinking-tags.js +0 -1
- package/dist/utils/tools-manager.d.ts +3 -3
- package/dist/utils/tools-manager.js +125 -42
- package/dist/utils/version-check.d.ts +0 -1
- package/dist/utils/version-check.js +0 -1
- package/dist/utils/windows-self-update.d.ts +0 -1
- package/dist/utils/windows-self-update.js +0 -1
- package/docs/rpc.md +1 -2
- package/docs/settings.md +0 -1
- package/docs/skills.md +10 -18
- package/package.json +4 -3
- package/dist/bun/cli.d.ts.map +0 -1
- package/dist/bun/cli.js.map +0 -1
- package/dist/bun/register-bedrock.d.ts.map +0 -1
- package/dist/bun/register-bedrock.js.map +0 -1
- package/dist/bun/restore-sandbox-env.d.ts.map +0 -1
- package/dist/bun/restore-sandbox-env.js.map +0 -1
- package/dist/cli/args.d.ts.map +0 -1
- package/dist/cli/args.js.map +0 -1
- package/dist/cli/config-selector.d.ts.map +0 -1
- package/dist/cli/config-selector.js.map +0 -1
- package/dist/cli/credential-print.d.ts.map +0 -1
- package/dist/cli/credential-print.js.map +0 -1
- package/dist/cli/file-processor.d.ts.map +0 -1
- package/dist/cli/file-processor.js.map +0 -1
- package/dist/cli/initial-message.d.ts.map +0 -1
- package/dist/cli/initial-message.js.map +0 -1
- package/dist/cli/list-models.d.ts.map +0 -1
- package/dist/cli/list-models.js.map +0 -1
- package/dist/cli/project-trust.d.ts.map +0 -1
- package/dist/cli/project-trust.js.map +0 -1
- package/dist/cli/session-picker.d.ts.map +0 -1
- package/dist/cli/session-picker.js.map +0 -1
- package/dist/cli/startup-ui.d.ts.map +0 -1
- package/dist/cli/startup-ui.js.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/core/agent-session-auto-handoff.test.d.ts.map +0 -1
- package/dist/core/agent-session-auto-handoff.test.js.map +0 -1
- package/dist/core/agent-session-runtime.d.ts.map +0 -1
- package/dist/core/agent-session-runtime.js.map +0 -1
- package/dist/core/agent-session-services.d.ts.map +0 -1
- package/dist/core/agent-session-services.js.map +0 -1
- package/dist/core/agent-session-skill-block.test.d.ts.map +0 -1
- package/dist/core/agent-session-skill-block.test.js.map +0 -1
- package/dist/core/agent-session.d.ts.map +0 -1
- package/dist/core/agent-session.js.map +0 -1
- package/dist/core/agents.d.ts.map +0 -1
- package/dist/core/agents.js.map +0 -1
- package/dist/core/auth-guidance.d.ts.map +0 -1
- package/dist/core/auth-guidance.js.map +0 -1
- package/dist/core/auth-storage.d.ts.map +0 -1
- package/dist/core/auth-storage.js.map +0 -1
- package/dist/core/bash-executor.d.ts.map +0 -1
- package/dist/core/bash-executor.js.map +0 -1
- package/dist/core/built-in-extensions.d.ts.map +0 -1
- package/dist/core/built-in-extensions.js.map +0 -1
- package/dist/core/cache-stats.d.ts.map +0 -1
- package/dist/core/cache-stats.js.map +0 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +0 -1
- package/dist/core/compaction/branch-summarization.js.map +0 -1
- package/dist/core/compaction/compaction.d.ts.map +0 -1
- package/dist/core/compaction/compaction.js.map +0 -1
- package/dist/core/compaction/index.d.ts.map +0 -1
- package/dist/core/compaction/index.js.map +0 -1
- package/dist/core/compaction/utils.d.ts.map +0 -1
- package/dist/core/compaction/utils.js.map +0 -1
- package/dist/core/defaults.d.ts.map +0 -1
- package/dist/core/defaults.js.map +0 -1
- package/dist/core/diagnostics.d.ts.map +0 -1
- package/dist/core/diagnostics.js.map +0 -1
- package/dist/core/event-bus.d.ts.map +0 -1
- package/dist/core/event-bus.js.map +0 -1
- package/dist/core/exec.d.ts.map +0 -1
- package/dist/core/exec.js.map +0 -1
- package/dist/core/experimental.d.ts.map +0 -1
- package/dist/core/experimental.js.map +0 -1
- package/dist/core/export-html/ansi-to-html.d.ts.map +0 -1
- package/dist/core/export-html/ansi-to-html.js.map +0 -1
- package/dist/core/export-html/index.d.ts.map +0 -1
- package/dist/core/export-html/index.js.map +0 -1
- package/dist/core/export-html/tool-renderer.d.ts.map +0 -1
- package/dist/core/export-html/tool-renderer.js.map +0 -1
- package/dist/core/extensions/index.d.ts.map +0 -1
- package/dist/core/extensions/index.js.map +0 -1
- package/dist/core/extensions/loader.d.ts.map +0 -1
- package/dist/core/extensions/loader.js.map +0 -1
- package/dist/core/extensions/runner.d.ts.map +0 -1
- package/dist/core/extensions/runner.js.map +0 -1
- package/dist/core/extensions/types.d.ts.map +0 -1
- package/dist/core/extensions/types.js.map +0 -1
- package/dist/core/extensions/wrapper.d.ts.map +0 -1
- package/dist/core/extensions/wrapper.js.map +0 -1
- package/dist/core/footer-data-provider.d.ts.map +0 -1
- package/dist/core/footer-data-provider.js.map +0 -1
- package/dist/core/git-command.d.ts.map +0 -1
- package/dist/core/git-command.js.map +0 -1
- package/dist/core/http-dispatcher.d.ts.map +0 -1
- package/dist/core/http-dispatcher.js.map +0 -1
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/core/keybindings.d.ts.map +0 -1
- package/dist/core/keybindings.js.map +0 -1
- package/dist/core/llama/client.d.ts.map +0 -1
- package/dist/core/llama/client.js.map +0 -1
- package/dist/core/llama/huggingface.d.ts.map +0 -1
- package/dist/core/llama/huggingface.js.map +0 -1
- package/dist/core/llama/index.d.ts.map +0 -1
- package/dist/core/llama/index.js.map +0 -1
- package/dist/core/llama/provider.d.ts.map +0 -1
- package/dist/core/llama/provider.js.map +0 -1
- package/dist/core/llama/ui.d.ts.map +0 -1
- package/dist/core/llama/ui.js.map +0 -1
- package/dist/core/messages.d.ts.map +0 -1
- package/dist/core/messages.js.map +0 -1
- package/dist/core/model-config.d.ts.map +0 -1
- package/dist/core/model-config.js.map +0 -1
- package/dist/core/model-registry.d.ts.map +0 -1
- package/dist/core/model-registry.js.map +0 -1
- package/dist/core/model-resolver.d.ts.map +0 -1
- package/dist/core/model-resolver.js.map +0 -1
- package/dist/core/model-runtime.d.ts.map +0 -1
- package/dist/core/model-runtime.js.map +0 -1
- package/dist/core/models-store.d.ts.map +0 -1
- package/dist/core/models-store.js.map +0 -1
- package/dist/core/output-guard.d.ts.map +0 -1
- package/dist/core/output-guard.js.map +0 -1
- package/dist/core/package-manager.d.ts.map +0 -1
- package/dist/core/package-manager.js.map +0 -1
- package/dist/core/package-manager.test.d.ts.map +0 -1
- package/dist/core/package-manager.test.js.map +0 -1
- package/dist/core/project-trust.d.ts.map +0 -1
- package/dist/core/project-trust.js.map +0 -1
- package/dist/core/prompt-templates.d.ts.map +0 -1
- package/dist/core/prompt-templates.js.map +0 -1
- package/dist/core/provider-attribution.d.ts.map +0 -1
- package/dist/core/provider-attribution.js.map +0 -1
- package/dist/core/provider-composer.d.ts.map +0 -1
- package/dist/core/provider-composer.js.map +0 -1
- package/dist/core/radius.d.ts.map +0 -1
- package/dist/core/radius.js.map +0 -1
- package/dist/core/remote-catalog-provider.d.ts.map +0 -1
- package/dist/core/remote-catalog-provider.js.map +0 -1
- package/dist/core/resolve-config-value.d.ts.map +0 -1
- package/dist/core/resolve-config-value.js.map +0 -1
- package/dist/core/resource-loader.d.ts.map +0 -1
- package/dist/core/resource-loader.js.map +0 -1
- package/dist/core/runtime-credentials.d.ts.map +0 -1
- package/dist/core/runtime-credentials.js.map +0 -1
- package/dist/core/sdk.d.ts.map +0 -1
- package/dist/core/sdk.js.map +0 -1
- package/dist/core/session-cwd.d.ts.map +0 -1
- package/dist/core/session-cwd.js.map +0 -1
- package/dist/core/session-manager.d.ts.map +0 -1
- package/dist/core/session-manager.js.map +0 -1
- package/dist/core/settings-manager-auto-handoff.test.d.ts.map +0 -1
- package/dist/core/settings-manager-auto-handoff.test.js.map +0 -1
- package/dist/core/settings-manager.d.ts.map +0 -1
- package/dist/core/settings-manager.js.map +0 -1
- package/dist/core/skills.d.ts.map +0 -1
- package/dist/core/skills.js.map +0 -1
- package/dist/core/slash-commands.d.ts.map +0 -1
- package/dist/core/slash-commands.js.map +0 -1
- package/dist/core/source-info.d.ts.map +0 -1
- package/dist/core/source-info.js.map +0 -1
- package/dist/core/system-prompt.d.ts.map +0 -1
- package/dist/core/system-prompt.js.map +0 -1
- package/dist/core/system-prompt.test.d.ts.map +0 -1
- package/dist/core/system-prompt.test.js.map +0 -1
- package/dist/core/telemetry.d.ts.map +0 -1
- package/dist/core/telemetry.js.map +0 -1
- package/dist/core/timings.d.ts.map +0 -1
- package/dist/core/timings.js.map +0 -1
- package/dist/core/tools/bash.d.ts.map +0 -1
- package/dist/core/tools/bash.js.map +0 -1
- package/dist/core/tools/edit-diff.d.ts.map +0 -1
- package/dist/core/tools/edit-diff.js.map +0 -1
- package/dist/core/tools/edit.d.ts.map +0 -1
- package/dist/core/tools/edit.js.map +0 -1
- package/dist/core/tools/file-mutation-queue.d.ts.map +0 -1
- package/dist/core/tools/file-mutation-queue.js.map +0 -1
- package/dist/core/tools/find.d.ts.map +0 -1
- package/dist/core/tools/find.js.map +0 -1
- package/dist/core/tools/grep.d.ts.map +0 -1
- package/dist/core/tools/grep.js.map +0 -1
- package/dist/core/tools/index.d.ts.map +0 -1
- package/dist/core/tools/index.js.map +0 -1
- package/dist/core/tools/ls.d.ts.map +0 -1
- package/dist/core/tools/ls.js.map +0 -1
- package/dist/core/tools/output-accumulator.d.ts.map +0 -1
- package/dist/core/tools/output-accumulator.js.map +0 -1
- package/dist/core/tools/path-utils.d.ts.map +0 -1
- package/dist/core/tools/path-utils.js.map +0 -1
- package/dist/core/tools/read.d.ts.map +0 -1
- package/dist/core/tools/read.js.map +0 -1
- package/dist/core/tools/render-utils.d.ts.map +0 -1
- package/dist/core/tools/render-utils.js.map +0 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +0 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +0 -1
- package/dist/core/tools/truncate.d.ts.map +0 -1
- package/dist/core/tools/truncate.js.map +0 -1
- package/dist/core/tools/write.d.ts.map +0 -1
- package/dist/core/tools/write.js.map +0 -1
- package/dist/core/trust-manager.d.ts.map +0 -1
- package/dist/core/trust-manager.js.map +0 -1
- package/dist/core/usage-totals.d.ts.map +0 -1
- package/dist/core/usage-totals.js.map +0 -1
- package/dist/extensions/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
- package/dist/extensions/pi-subagents/test/unit/slash-chain-groups.test.ts +0 -464
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/main.d.ts.map +0 -1
- package/dist/main.js.map +0 -1
- package/dist/migrations.d.ts.map +0 -1
- package/dist/migrations.js.map +0 -1
- package/dist/modes/index.d.ts.map +0 -1
- package/dist/modes/index.js.map +0 -1
- package/dist/modes/interactive/components/armin.d.ts.map +0 -1
- package/dist/modes/interactive/components/armin.js.map +0 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/assistant-message.js.map +0 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +0 -1
- package/dist/modes/interactive/components/bash-execution.js.map +0 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +0 -1
- package/dist/modes/interactive/components/bordered-loader.js.map +0 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/branch-summary-message.js.map +0 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/compaction-summary-message.js.map +0 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/config-selector.js.map +0 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +0 -1
- package/dist/modes/interactive/components/countdown-timer.js.map +0 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +0 -1
- package/dist/modes/interactive/components/custom-editor.js.map +0 -1
- package/dist/modes/interactive/components/custom-entry.d.ts.map +0 -1
- package/dist/modes/interactive/components/custom-entry.js.map +0 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/custom-message.js.map +0 -1
- package/dist/modes/interactive/components/daxnuts.d.ts.map +0 -1
- package/dist/modes/interactive/components/daxnuts.js.map +0 -1
- package/dist/modes/interactive/components/diff.d.ts.map +0 -1
- package/dist/modes/interactive/components/diff.js.map +0 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +0 -1
- package/dist/modes/interactive/components/dynamic-border.js.map +0 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +0 -1
- package/dist/modes/interactive/components/earendil-announcement.js.map +0 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +0 -1
- package/dist/modes/interactive/components/extension-editor.js.map +0 -1
- package/dist/modes/interactive/components/extension-input.d.ts.map +0 -1
- package/dist/modes/interactive/components/extension-input.js.map +0 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/extension-selector.js.map +0 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +0 -1
- package/dist/modes/interactive/components/first-time-setup.js.map +0 -1
- package/dist/modes/interactive/components/footer.d.ts.map +0 -1
- package/dist/modes/interactive/components/footer.js.map +0 -1
- package/dist/modes/interactive/components/index.d.ts.map +0 -1
- package/dist/modes/interactive/components/index.js.map +0 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +0 -1
- package/dist/modes/interactive/components/keybinding-hints.js.map +0 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +0 -1
- package/dist/modes/interactive/components/login-dialog.js.map +0 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/model-selector.js.map +0 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/oauth-selector.js.map +0 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/scoped-models-selector.js.map +0 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +0 -1
- package/dist/modes/interactive/components/session-selector-search.js.map +0 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/session-selector.js.map +0 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/settings-selector.js.map +0 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/show-images-selector.js.map +0 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/skill-invocation-message.js.map +0 -1
- package/dist/modes/interactive/components/status-indicator.d.ts.map +0 -1
- package/dist/modes/interactive/components/status-indicator.js.map +0 -1
- package/dist/modes/interactive/components/theme-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/theme-selector.js.map +0 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/thinking-selector.js.map +0 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +0 -1
- package/dist/modes/interactive/components/tool-execution.js.map +0 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/tree-selector.js.map +0 -1
- package/dist/modes/interactive/components/trust-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/trust-selector.js.map +0 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/user-message-selector.js.map +0 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/user-message.js.map +0 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +0 -1
- package/dist/modes/interactive/components/visual-truncate.js.map +0 -1
- package/dist/modes/interactive/external-editor.d.ts.map +0 -1
- package/dist/modes/interactive/external-editor.js.map +0 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +0 -1
- package/dist/modes/interactive/interactive-mode.js.map +0 -1
- package/dist/modes/interactive/model-search.d.ts.map +0 -1
- package/dist/modes/interactive/model-search.js.map +0 -1
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +0 -1
- package/dist/modes/interactive/theme/theme-controller.js.map +0 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +0 -1
- package/dist/modes/interactive/theme/theme.js.map +0 -1
- package/dist/modes/print-mode.d.ts.map +0 -1
- package/dist/modes/print-mode.js.map +0 -1
- package/dist/modes/rpc/jsonl.d.ts.map +0 -1
- package/dist/modes/rpc/jsonl.js.map +0 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +0 -1
- package/dist/modes/rpc/rpc-client.js.map +0 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +0 -1
- package/dist/modes/rpc/rpc-mode.js.map +0 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +0 -1
- package/dist/modes/rpc/rpc-types.js.map +0 -1
- package/dist/package-manager-cli.d.ts.map +0 -1
- package/dist/package-manager-cli.js.map +0 -1
- package/dist/rpc-entry.d.ts.map +0 -1
- package/dist/rpc-entry.js.map +0 -1
- package/dist/utils/ansi.d.ts.map +0 -1
- package/dist/utils/ansi.js.map +0 -1
- package/dist/utils/changelog.d.ts.map +0 -1
- package/dist/utils/changelog.js.map +0 -1
- package/dist/utils/child-process.d.ts.map +0 -1
- package/dist/utils/child-process.js.map +0 -1
- package/dist/utils/clipboard-image.d.ts.map +0 -1
- package/dist/utils/clipboard-image.js.map +0 -1
- package/dist/utils/clipboard-native.d.ts.map +0 -1
- package/dist/utils/clipboard-native.js.map +0 -1
- package/dist/utils/clipboard.d.ts.map +0 -1
- package/dist/utils/clipboard.js.map +0 -1
- package/dist/utils/deprecation.d.ts.map +0 -1
- package/dist/utils/deprecation.js.map +0 -1
- package/dist/utils/exif-orientation.d.ts.map +0 -1
- package/dist/utils/exif-orientation.js.map +0 -1
- package/dist/utils/frontmatter.d.ts.map +0 -1
- package/dist/utils/frontmatter.js.map +0 -1
- package/dist/utils/fs-watch.d.ts.map +0 -1
- package/dist/utils/fs-watch.js.map +0 -1
- package/dist/utils/git.d.ts.map +0 -1
- package/dist/utils/git.js.map +0 -1
- package/dist/utils/html.d.ts.map +0 -1
- package/dist/utils/html.js.map +0 -1
- package/dist/utils/image-convert.d.ts.map +0 -1
- package/dist/utils/image-convert.js.map +0 -1
- package/dist/utils/image-process.d.ts.map +0 -1
- package/dist/utils/image-process.js.map +0 -1
- package/dist/utils/image-resize-core.d.ts.map +0 -1
- package/dist/utils/image-resize-core.js.map +0 -1
- package/dist/utils/image-resize-worker.d.ts.map +0 -1
- package/dist/utils/image-resize-worker.js.map +0 -1
- package/dist/utils/image-resize.d.ts.map +0 -1
- package/dist/utils/image-resize.js.map +0 -1
- package/dist/utils/json.d.ts.map +0 -1
- package/dist/utils/json.js.map +0 -1
- package/dist/utils/mime.d.ts.map +0 -1
- package/dist/utils/mime.js.map +0 -1
- package/dist/utils/open-browser.d.ts.map +0 -1
- package/dist/utils/open-browser.js.map +0 -1
- package/dist/utils/paths.d.ts.map +0 -1
- package/dist/utils/paths.js.map +0 -1
- package/dist/utils/photon.d.ts.map +0 -1
- package/dist/utils/photon.js.map +0 -1
- package/dist/utils/pi-user-agent.d.ts.map +0 -1
- package/dist/utils/pi-user-agent.js.map +0 -1
- package/dist/utils/shell.d.ts.map +0 -1
- package/dist/utils/shell.js.map +0 -1
- package/dist/utils/sleep.d.ts.map +0 -1
- package/dist/utils/sleep.js.map +0 -1
- package/dist/utils/syntax-highlight.d.ts.map +0 -1
- package/dist/utils/syntax-highlight.js.map +0 -1
- package/dist/utils/thinking-tags.d.ts.map +0 -1
- package/dist/utils/thinking-tags.js.map +0 -1
- package/dist/utils/tools-manager.d.ts.map +0 -1
- package/dist/utils/tools-manager.js.map +0 -1
- package/dist/utils/version-check.d.ts.map +0 -1
- package/dist/utils/version-check.js.map +0 -1
- package/dist/utils/windows-self-update.d.ts.map +0 -1
- package/dist/utils/windows-self-update.js.map +0 -1
|
@@ -45,7 +45,7 @@ describe("agent management config parsing", () => {
|
|
|
45
45
|
it("hides lower-priority agents shadowed by project agents in list output", () => {
|
|
46
46
|
const agentsDir = path.join(tempDir, ".selesai", "agents");
|
|
47
47
|
fs.mkdirSync(agentsDir, { recursive: true });
|
|
48
|
-
fs.writeFileSync(path.join(agentsDir, "
|
|
48
|
+
fs.writeFileSync(path.join(agentsDir, "explorer.md"), "---\nname: explorer\ndescription: Project explorer override\n---\n\nProject explorer agent.\n");
|
|
49
49
|
|
|
50
50
|
const result = handleList(
|
|
51
51
|
{ agentScope: "project" },
|
|
@@ -53,8 +53,8 @@ describe("agent management config parsing", () => {
|
|
|
53
53
|
);
|
|
54
54
|
|
|
55
55
|
assert.equal(result.isError, false);
|
|
56
|
-
assert.match(readText(result), /-
|
|
57
|
-
assert.doesNotMatch(readText(result), /-
|
|
56
|
+
assert.match(readText(result), /- explorer \(project\): Project explorer override/);
|
|
57
|
+
assert.doesNotMatch(readText(result), /- explorer \(builtin/);
|
|
58
58
|
});
|
|
59
59
|
|
|
60
60
|
it("gets only the effective agent detail and respects explicit scope", () => {
|
|
@@ -65,26 +65,26 @@ describe("agent management config parsing", () => {
|
|
|
65
65
|
fs.mkdirSync(userAgentsDir, { recursive: true });
|
|
66
66
|
fs.mkdirSync(path.join(packageDir, "agents"), { recursive: true });
|
|
67
67
|
fs.mkdirSync(path.join(packageDir, "chains"), { recursive: true });
|
|
68
|
-
fs.writeFileSync(path.join(projectAgentsDir, "
|
|
69
|
-
fs.writeFileSync(path.join(userAgentsDir, "
|
|
68
|
+
fs.writeFileSync(path.join(projectAgentsDir, "builder.md"), "---\nname: builder\ndescription: Project builder override\n---\n\nProject builder.\n");
|
|
69
|
+
fs.writeFileSync(path.join(userAgentsDir, "builder.md"), "---\nname: builder\ndescription: User builder override\n---\n\nUser builder.\n");
|
|
70
70
|
fs.writeFileSync(path.join(packageDir, "package.json"), JSON.stringify({ "pi-subagents": { agents: ["agents"], chains: ["chains"] } }));
|
|
71
|
-
fs.writeFileSync(path.join(packageDir, "agents", "
|
|
71
|
+
fs.writeFileSync(path.join(packageDir, "agents", "builder.md"), "---\nname: builder\ndescription: Package builder override\n---\n\nPackage builder.\n");
|
|
72
72
|
fs.writeFileSync(path.join(packageDir, "chains", "package-flow.chain.json"), JSON.stringify({
|
|
73
73
|
name: "package-flow",
|
|
74
74
|
description: "Package flow",
|
|
75
|
-
chain: [{ agent: "
|
|
75
|
+
chain: [{ agent: "builder", task: "Package task" }],
|
|
76
76
|
}), "utf-8");
|
|
77
77
|
const ctx = { cwd: tempDir, modelRegistry: { getAvailable: () => [] } };
|
|
78
78
|
|
|
79
|
-
const effective = readText(handleManagementAction("get", { agent: "
|
|
80
|
-
assert.match(effective, /Agent:
|
|
81
|
-
assert.match(effective, /Description: Project
|
|
82
|
-
assert.doesNotMatch(effective, /User
|
|
79
|
+
const effective = readText(handleManagementAction("get", { agent: "builder" }, ctx));
|
|
80
|
+
assert.match(effective, /Agent: builder \(project\)/);
|
|
81
|
+
assert.match(effective, /Description: Project builder override/);
|
|
82
|
+
assert.doesNotMatch(effective, /User builder override|Package builder override|Implementation agent for normal tasks/);
|
|
83
83
|
|
|
84
|
-
const userScoped = readText(handleManagementAction("get", { agent: "
|
|
85
|
-
assert.match(userScoped, /Agent:
|
|
86
|
-
assert.match(userScoped, /Description: User
|
|
87
|
-
assert.doesNotMatch(userScoped, /Project
|
|
84
|
+
const userScoped = readText(handleManagementAction("get", { agent: "builder", agentScope: "user" }, ctx));
|
|
85
|
+
assert.match(userScoped, /Agent: builder \(user\)/);
|
|
86
|
+
assert.match(userScoped, /Description: User builder override/);
|
|
87
|
+
assert.doesNotMatch(userScoped, /Project builder override|Implementation agent for normal tasks/);
|
|
88
88
|
|
|
89
89
|
const userChainsDir = path.join(tempDir, "agent-home", "chains");
|
|
90
90
|
const projectChainsDir = path.join(tempDir, ".selesai", "chains");
|
|
@@ -93,12 +93,12 @@ describe("agent management config parsing", () => {
|
|
|
93
93
|
fs.writeFileSync(path.join(userChainsDir, "shared-flow.chain.json"), JSON.stringify({
|
|
94
94
|
name: "shared-flow",
|
|
95
95
|
description: "User shared flow",
|
|
96
|
-
chain: [{ agent: "
|
|
96
|
+
chain: [{ agent: "builder", task: "User flow" }],
|
|
97
97
|
}), "utf-8");
|
|
98
98
|
fs.writeFileSync(path.join(projectChainsDir, "shared-flow.chain.json"), JSON.stringify({
|
|
99
99
|
name: "shared-flow",
|
|
100
100
|
description: "Project shared flow",
|
|
101
|
-
chain: [{ agent: "
|
|
101
|
+
chain: [{ agent: "builder", task: "Project flow" }],
|
|
102
102
|
}), "utf-8");
|
|
103
103
|
|
|
104
104
|
const userChain = readText(handleManagementAction("get", { chainName: "shared-flow", agentScope: "user" }, ctx));
|
|
@@ -120,7 +120,7 @@ describe("agent management config parsing", () => {
|
|
|
120
120
|
|
|
121
121
|
it("surfaces JSON parse errors for update config strings", () => {
|
|
122
122
|
const result = handleUpdate(
|
|
123
|
-
{ agent: "
|
|
123
|
+
{ agent: "commentator", config: '{"description":' },
|
|
124
124
|
{ cwd: tempDir, modelRegistry: { getAvailable: () => [] } },
|
|
125
125
|
);
|
|
126
126
|
|
|
@@ -213,8 +213,8 @@ describe("agent management config parsing", () => {
|
|
|
213
213
|
it("creates and updates packaged chains while preserving packaged step names", () => {
|
|
214
214
|
const ctx = { cwd: tempDir, modelRegistry: { getAvailable: () => [] } };
|
|
215
215
|
fs.mkdirSync(path.join(tempDir, ".selesai", "agents"), { recursive: true });
|
|
216
|
-
fs.writeFileSync(path.join(tempDir, ".selesai", "agents", "code-analysis.
|
|
217
|
-
name:
|
|
216
|
+
fs.writeFileSync(path.join(tempDir, ".selesai", "agents", "code-analysis.explorer.md"), `---
|
|
217
|
+
name: explorer
|
|
218
218
|
package: code-analysis
|
|
219
219
|
description: Fast recon
|
|
220
220
|
---
|
|
@@ -223,7 +223,7 @@ Inspect
|
|
|
223
223
|
`, "utf-8");
|
|
224
224
|
|
|
225
225
|
const created = handleCreate(
|
|
226
|
-
{ config: { name: "Review Flow", package: "Code Analysis", description: "Review flow", scope: "project", steps: [{ agent: "code-analysis.
|
|
226
|
+
{ config: { name: "Review Flow", package: "Code Analysis", description: "Review flow", scope: "project", steps: [{ agent: "code-analysis.explorer", task: "Inspect", toolBudget: { soft: 3, hard: 5, block: ["read"] } }] } },
|
|
227
227
|
ctx,
|
|
228
228
|
);
|
|
229
229
|
assert.equal(created.isError, false);
|
|
@@ -232,7 +232,7 @@ Inspect
|
|
|
232
232
|
let content = fs.readFileSync(filePath, "utf-8");
|
|
233
233
|
assert.match(content, /^name: review-flow$/m);
|
|
234
234
|
assert.match(content, /^package: code-analysis$/m);
|
|
235
|
-
assert.match(content, /^## code-analysis\.
|
|
235
|
+
assert.match(content, /^## code-analysis\.explorer$/m);
|
|
236
236
|
assert.match(content, /^toolBudget: \{"soft":3,"hard":5,"block":\["read"\]\}$/m);
|
|
237
237
|
|
|
238
238
|
const updated = handleUpdate(
|
|
@@ -252,35 +252,35 @@ Inspect
|
|
|
252
252
|
const result = handleCreate(
|
|
253
253
|
{
|
|
254
254
|
config: {
|
|
255
|
-
name: "background-
|
|
255
|
+
name: "background-commentator",
|
|
256
256
|
description: "Review in the background",
|
|
257
257
|
scope: "project",
|
|
258
258
|
async: false,
|
|
259
259
|
timeoutMs: 120_000,
|
|
260
260
|
turnBudget: { maxTurns: 8, graceTurns: 2 },
|
|
261
|
-
acceptance: { level: "none", reason: "lightweight
|
|
261
|
+
acceptance: { level: "none", reason: "lightweight commentator" },
|
|
262
262
|
},
|
|
263
263
|
},
|
|
264
264
|
ctx,
|
|
265
265
|
);
|
|
266
266
|
|
|
267
267
|
assert.equal(result.isError, false);
|
|
268
|
-
const filePath = path.join(tempDir, ".selesai", "agents", "background-
|
|
268
|
+
const filePath = path.join(tempDir, ".selesai", "agents", "background-commentator.md");
|
|
269
269
|
let content = fs.readFileSync(filePath, "utf-8");
|
|
270
270
|
assert.match(content, /^async: false$/m);
|
|
271
271
|
assert.match(content, /^timeoutMs: 120000$/m);
|
|
272
272
|
assert.match(content, /^turnBudget: \{"maxTurns":8,"graceTurns":2\}$/m);
|
|
273
|
-
assert.match(content, /^acceptance: \{"level":"none","reason":"lightweight
|
|
273
|
+
assert.match(content, /^acceptance: \{"level":"none","reason":"lightweight commentator"\}$/m);
|
|
274
274
|
|
|
275
|
-
const got = handleManagementAction("get", { agent: "background-
|
|
275
|
+
const got = handleManagementAction("get", { agent: "background-commentator" }, ctx);
|
|
276
276
|
assert.equal(got.isError, false);
|
|
277
277
|
assert.match(readText(got), /Async: false/);
|
|
278
278
|
assert.match(readText(got), /Timeout: 120000ms/);
|
|
279
279
|
assert.match(readText(got), /Turn budget: \{"maxTurns":8,"graceTurns":2\}/);
|
|
280
|
-
assert.match(readText(got), /Acceptance: \{"level":"none","reason":"lightweight
|
|
280
|
+
assert.match(readText(got), /Acceptance: \{"level":"none","reason":"lightweight commentator"\}/);
|
|
281
281
|
|
|
282
282
|
const updated = handleUpdate(
|
|
283
|
-
{ agent: "background-
|
|
283
|
+
{ agent: "background-commentator", config: { async: true, timeoutMs: false, turnBudget: false, acceptance: "" } },
|
|
284
284
|
ctx,
|
|
285
285
|
);
|
|
286
286
|
assert.equal(updated.isError, false);
|
|
@@ -291,7 +291,7 @@ Inspect
|
|
|
291
291
|
assert.doesNotMatch(content, /^acceptance:/m);
|
|
292
292
|
|
|
293
293
|
const deprecatedFalse = handleUpdate(
|
|
294
|
-
{ agent: "background-
|
|
294
|
+
{ agent: "background-commentator", config: { acceptance: false } },
|
|
295
295
|
ctx,
|
|
296
296
|
);
|
|
297
297
|
assert.equal(deprecatedFalse.isError, false);
|
|
@@ -333,21 +333,21 @@ Inspect
|
|
|
333
333
|
it("creates and updates agents with tool budgets", () => {
|
|
334
334
|
const ctx = { cwd: tempDir, modelRegistry: { getAvailable: () => [] } };
|
|
335
335
|
const result = handleCreate(
|
|
336
|
-
{ config: { name: "budgeted-
|
|
336
|
+
{ config: { name: "budgeted-commentator", description: "Review with a budget", scope: "project", toolBudget: { soft: 4, hard: 7, block: ["read", "grep"] } } },
|
|
337
337
|
ctx,
|
|
338
338
|
);
|
|
339
339
|
|
|
340
340
|
assert.equal(result.isError, false);
|
|
341
|
-
const filePath = path.join(tempDir, ".selesai", "agents", "budgeted-
|
|
341
|
+
const filePath = path.join(tempDir, ".selesai", "agents", "budgeted-commentator.md");
|
|
342
342
|
let content = fs.readFileSync(filePath, "utf-8");
|
|
343
343
|
assert.match(content, /^toolBudget: \{"soft":4,"hard":7,"block":\["read","grep"\]\}$/m);
|
|
344
344
|
|
|
345
|
-
const got = handleManagementAction("get", { agent: "budgeted-
|
|
345
|
+
const got = handleManagementAction("get", { agent: "budgeted-commentator" }, ctx);
|
|
346
346
|
assert.equal(got.isError, false);
|
|
347
347
|
assert.match(readText(got), /Tool budget: \{"soft":4,"hard":7,"block":\["read","grep"\]\}/);
|
|
348
348
|
|
|
349
349
|
const updated = handleUpdate(
|
|
350
|
-
{ agent: "budgeted-
|
|
350
|
+
{ agent: "budgeted-commentator", config: { toolBudget: { hard: 3, block: "*" } } },
|
|
351
351
|
ctx,
|
|
352
352
|
);
|
|
353
353
|
assert.equal(updated.isError, false);
|
|
@@ -365,7 +365,7 @@ Inspect
|
|
|
365
365
|
assert.match(readText(agentResult), /config\.toolBudget\.soft must be <= config\.toolBudget\.hard/);
|
|
366
366
|
|
|
367
367
|
const chainResult = handleCreate(
|
|
368
|
-
{ config: { name: "bad-chain-budget", description: "Bad budget", scope: "project", steps: [{ agent: "
|
|
368
|
+
{ config: { name: "bad-chain-budget", description: "Bad budget", scope: "project", steps: [{ agent: "commentator", toolBudget: { hard: 2, block: [] } }] } },
|
|
369
369
|
ctx,
|
|
370
370
|
);
|
|
371
371
|
assert.equal(chainResult.isError, true);
|
|
@@ -572,10 +572,10 @@ Drive the failing test first.
|
|
|
572
572
|
name: "dynamic-review",
|
|
573
573
|
description: "Review dynamic targets",
|
|
574
574
|
chain: [
|
|
575
|
-
{ agent: "
|
|
575
|
+
{ agent: "explorer", task: "Return targets", as: "targets", outputSchema: { type: "object" } },
|
|
576
576
|
{
|
|
577
577
|
expand: { from: { output: "targets", path: "/items" }, item: "target", key: "/path", maxItems: 4 },
|
|
578
|
-
parallel: { agent: "
|
|
578
|
+
parallel: { agent: "commentator", task: "Review {target.path}", outputSchema: { type: "object" } },
|
|
579
579
|
collect: { as: "reviews" },
|
|
580
580
|
},
|
|
581
581
|
],
|
|
@@ -598,7 +598,7 @@ Drive the failing test first.
|
|
|
598
598
|
fs.writeFileSync(chainPath, JSON.stringify({
|
|
599
599
|
name: "dynamic-review",
|
|
600
600
|
description: "Review dynamic targets",
|
|
601
|
-
chain: [{ agent: "
|
|
601
|
+
chain: [{ agent: "explorer", task: "Return targets" }],
|
|
602
602
|
}), "utf-8");
|
|
603
603
|
|
|
604
604
|
const updated = handleUpdate({ chainName: "dynamic-review", config: { name: "Review Flow", package: "Code Analysis" } }, ctx);
|
|
@@ -611,7 +611,7 @@ Drive the failing test first.
|
|
|
611
611
|
const parsed = JSON.parse(content) as { name?: string; package?: string; chain?: Array<{ agent?: string }> };
|
|
612
612
|
assert.equal(parsed.name, "review-flow");
|
|
613
613
|
assert.equal(parsed.package, "code-analysis");
|
|
614
|
-
assert.equal(parsed.chain?.[0]?.agent, "
|
|
614
|
+
assert.equal(parsed.chain?.[0]?.agent, "explorer");
|
|
615
615
|
});
|
|
616
616
|
|
|
617
617
|
it("gets dynamic JSON chain details and lists invalid chain diagnostics", () => {
|
|
@@ -621,10 +621,10 @@ Drive the failing test first.
|
|
|
621
621
|
name: "dynamic-review",
|
|
622
622
|
description: "Review dynamic targets",
|
|
623
623
|
chain: [
|
|
624
|
-
{ agent: "
|
|
624
|
+
{ agent: "explorer", task: "Return targets", as: "targets", outputSchema: { type: "object" } },
|
|
625
625
|
{
|
|
626
626
|
expand: { from: { output: "targets", path: "/items" }, item: "target", key: "/path", maxItems: 4 },
|
|
627
|
-
parallel: { agent: "
|
|
627
|
+
parallel: { agent: "commentator", task: "Review {target.path}", outputSchema: { type: "object" } },
|
|
628
628
|
collect: { as: "reviews" },
|
|
629
629
|
},
|
|
630
630
|
],
|
|
@@ -635,7 +635,7 @@ Drive the failing test first.
|
|
|
635
635
|
assert.equal(got.isError, false);
|
|
636
636
|
assert.match(readText(got), /Dynamic fanout -> reviews/);
|
|
637
637
|
assert.match(readText(got), /Expand: targets\/items/);
|
|
638
|
-
assert.match(readText(got), /Agent:
|
|
638
|
+
assert.match(readText(got), /Agent: commentator/);
|
|
639
639
|
|
|
640
640
|
const listed = handleManagementAction("list", {}, ctx);
|
|
641
641
|
assert.equal(listed.isError, false);
|
|
@@ -708,140 +708,20 @@ Drive the failing test first.
|
|
|
708
708
|
assert.match(readText(result), /Builtin agent 'not-a-builtin' not found/);
|
|
709
709
|
});
|
|
710
710
|
|
|
711
|
-
it("creates
|
|
711
|
+
it("creates explorer with its builtin prompt defaults", () => {
|
|
712
712
|
const result = handleCreate(
|
|
713
|
-
{ config: { name: "
|
|
713
|
+
{ config: { name: "explorer", description: "Delegate helper", scope: "project" } },
|
|
714
714
|
{ cwd: tempDir, modelRegistry: { getAvailable: () => [] } },
|
|
715
715
|
);
|
|
716
716
|
|
|
717
717
|
assert.equal(result.isError, false);
|
|
718
|
-
const filePath = path.join(tempDir, ".selesai", "agents", "
|
|
718
|
+
const filePath = path.join(tempDir, ".selesai", "agents", "explorer.md");
|
|
719
719
|
const content = fs.readFileSync(filePath, "utf-8");
|
|
720
|
-
assert.match(content, /systemPromptMode:
|
|
721
|
-
assert.match(content, /inheritProjectContext:
|
|
720
|
+
assert.match(content, /systemPromptMode: replace/);
|
|
721
|
+
assert.match(content, /inheritProjectContext: false/);
|
|
722
722
|
assert.match(content, /inheritSkills: false/);
|
|
723
723
|
});
|
|
724
724
|
|
|
725
|
-
it("exposes a rich human and machine catalog for a custom project agent and chain", () => {
|
|
726
|
-
const ctx = { cwd: tempDir, modelRegistry: { getAvailable: () => [] } };
|
|
727
|
-
const created = handleCreate(
|
|
728
|
-
{
|
|
729
|
-
config: {
|
|
730
|
-
name: "Catalog Writer",
|
|
731
|
-
description: "Scoped catalog writer",
|
|
732
|
-
scope: "project",
|
|
733
|
-
aliases: "catw",
|
|
734
|
-
acceptanceRole: "writer",
|
|
735
|
-
defaultContext: "fork",
|
|
736
|
-
tools: "read, grep, find, ls, bash, edit, write, mcp:fixture_search",
|
|
737
|
-
systemPrompt: "Implement scoped changes.",
|
|
738
|
-
},
|
|
739
|
-
},
|
|
740
|
-
ctx,
|
|
741
|
-
);
|
|
742
|
-
assert.equal(created.isError, false);
|
|
743
|
-
|
|
744
|
-
const chainCreated = handleCreate(
|
|
745
|
-
{ config: { name: "Review Flow", description: "Catalog review flow", scope: "project", steps: [{ agent: "catalog-writer", task: "Inspect" }] } },
|
|
746
|
-
ctx,
|
|
747
|
-
);
|
|
748
|
-
assert.equal(chainCreated.isError, false);
|
|
749
|
-
|
|
750
|
-
const listed = handleManagementAction("list", {}, ctx);
|
|
751
|
-
assert.equal(listed.isError, false);
|
|
752
|
-
const text = readText(listed);
|
|
753
|
-
assert.match(text, /Executable agents:/);
|
|
754
|
-
assert.match(
|
|
755
|
-
text,
|
|
756
|
-
/- catalog-writer \(project, context: fork, role: writer, aliases: catw, tools: read, grep, find, ls, bash, edit, write, mcp:fixture_search\): Scoped catalog writer/,
|
|
757
|
-
);
|
|
758
|
-
assert.match(text, /Chains:\n- review-flow \(project\): Catalog review flow/);
|
|
759
|
-
|
|
760
|
-
const details = (listed as { details: { catalog: unknown } }).details.catalog as {
|
|
761
|
-
version: number;
|
|
762
|
-
agents: Array<{
|
|
763
|
-
name: string;
|
|
764
|
-
source: string;
|
|
765
|
-
description: string;
|
|
766
|
-
executable: boolean;
|
|
767
|
-
aliases?: string[];
|
|
768
|
-
defaultContext: string;
|
|
769
|
-
acceptanceRole?: string;
|
|
770
|
-
tools?: string[];
|
|
771
|
-
}>;
|
|
772
|
-
chains: Array<{ name: string; source: string; description: string }>;
|
|
773
|
-
};
|
|
774
|
-
assert.equal(details.version, 1);
|
|
775
|
-
const entry = details.agents.find((agent) => agent.name === "catalog-writer");
|
|
776
|
-
assert.ok(entry, "catalog must include the custom project agent");
|
|
777
|
-
assert.equal(entry.source, "project");
|
|
778
|
-
assert.equal(entry.description, "Scoped catalog writer");
|
|
779
|
-
assert.equal(entry.executable, true);
|
|
780
|
-
assert.deepEqual(entry.aliases, ["catw"]);
|
|
781
|
-
assert.equal(entry.defaultContext, "fork");
|
|
782
|
-
assert.equal(entry.acceptanceRole, "writer");
|
|
783
|
-
assert.deepEqual(entry.tools, ["read", "grep", "find", "ls", "bash", "edit", "write", "mcp:fixture_search"]);
|
|
784
|
-
assert.deepEqual(details.chains, [{ name: "review-flow", source: "project", description: "Catalog review flow" }]);
|
|
785
|
-
});
|
|
786
|
-
|
|
787
|
-
it("normalizes unset defaultContext to fresh in the machine catalog", () => {
|
|
788
|
-
const ctx = { cwd: tempDir, modelRegistry: { getAvailable: () => [] } };
|
|
789
|
-
const created = handleCreate(
|
|
790
|
-
{ config: { name: "No Context", description: "No explicit context", scope: "project", systemPrompt: "Work" } },
|
|
791
|
-
ctx,
|
|
792
|
-
);
|
|
793
|
-
assert.equal(created.isError, false);
|
|
794
|
-
|
|
795
|
-
const listed = handleManagementAction("list", {}, ctx);
|
|
796
|
-
const details = (listed as { details: { catalog: unknown } }).details.catalog as {
|
|
797
|
-
agents: Array<{ name: string; defaultContext: string }>;
|
|
798
|
-
};
|
|
799
|
-
const entry = details.agents.find((agent) => agent.name === "no-context");
|
|
800
|
-
assert.ok(entry);
|
|
801
|
-
assert.equal(entry.defaultContext, "fresh");
|
|
802
|
-
assert.match(readText(listed), /- no-context \(project, context: fresh\)/);
|
|
803
|
-
});
|
|
804
|
-
|
|
805
|
-
it("omits disabled agents from both human text and machine catalog metadata", () => {
|
|
806
|
-
const ctx = { cwd: tempDir, modelRegistry: { getAvailable: () => [] } };
|
|
807
|
-
const created = handleCreate(
|
|
808
|
-
{ config: { name: "Hidden Writer", description: "Should stay hidden", scope: "project", systemPrompt: "Work" } },
|
|
809
|
-
ctx,
|
|
810
|
-
);
|
|
811
|
-
assert.equal(created.isError, false);
|
|
812
|
-
|
|
813
|
-
const disabled = handleManagementAction("disable", { agent: "hidden-writer" }, ctx);
|
|
814
|
-
assert.equal(disabled.isError, false);
|
|
815
|
-
|
|
816
|
-
const listed = handleManagementAction("list", {}, ctx);
|
|
817
|
-
assert.equal(listed.isError, false);
|
|
818
|
-
assert.doesNotMatch(readText(listed), /hidden-writer/);
|
|
819
|
-
const details = (listed as { details: { catalog: unknown } }).details.catalog as {
|
|
820
|
-
agents: Array<{ name: string }>;
|
|
821
|
-
};
|
|
822
|
-
assert.equal(details.agents.some((agent) => agent.name === "hidden-writer"), false);
|
|
823
|
-
});
|
|
824
|
-
|
|
825
|
-
it("returns (none) text and an empty versioned catalog when no agents are discovered", () => {
|
|
826
|
-
fs.mkdirSync(path.join(tempDir, "agent-home"), { recursive: true });
|
|
827
|
-
fs.writeFileSync(
|
|
828
|
-
path.join(tempDir, "agent-home", "settings.json"),
|
|
829
|
-
JSON.stringify({ subagents: { disableBuiltins: true } }, null, 2),
|
|
830
|
-
"utf-8",
|
|
831
|
-
);
|
|
832
|
-
const ctx = { cwd: tempDir, modelRegistry: { getAvailable: () => [] } };
|
|
833
|
-
const listed = handleManagementAction("list", {}, ctx);
|
|
834
|
-
assert.equal(listed.isError, false);
|
|
835
|
-
const text = readText(listed);
|
|
836
|
-
assert.match(text, /Executable agents:\n- \(none\)/);
|
|
837
|
-
assert.match(text, /Chains:\n- \(none\)/);
|
|
838
|
-
assert.deepEqual((listed as { details: { catalog: unknown } }).details.catalog, {
|
|
839
|
-
version: 1,
|
|
840
|
-
agents: [],
|
|
841
|
-
chains: [],
|
|
842
|
-
});
|
|
843
|
-
});
|
|
844
|
-
|
|
845
725
|
it("lists proactive skill subagent suggestions from repeated configured skill use", () => {
|
|
846
726
|
const ctx = { cwd: tempDir, modelRegistry: { getAvailable: () => [] } };
|
|
847
727
|
fs.mkdirSync(path.join(tempDir, ".selesai", "agents"), { recursive: true });
|
|
@@ -894,44 +774,4 @@ Inspect cleanup.
|
|
|
894
774
|
assert.doesNotMatch(readText(listed), /Proactive skill subagent suggestions:/);
|
|
895
775
|
});
|
|
896
776
|
|
|
897
|
-
it("appends explicit-only task-aware advisory routing to list output when task is provided", () => {
|
|
898
|
-
const ctx = { cwd: tempDir, modelRegistry: { getAvailable: () => [] } };
|
|
899
|
-
handleCreate(
|
|
900
|
-
{ config: { name: "Code Reviewer", description: "Reviews without editing", scope: "project", acceptanceRole: "read-only", tools: "read, grep, find, ls", systemPrompt: "Review." } },
|
|
901
|
-
ctx,
|
|
902
|
-
);
|
|
903
|
-
handleCreate(
|
|
904
|
-
{ config: { name: "Fixer", description: "Implements changes", scope: "project", acceptanceRole: "writer", tools: "read, grep, bash, edit, write", systemPrompt: "Fix." } },
|
|
905
|
-
ctx,
|
|
906
|
-
);
|
|
907
|
-
|
|
908
|
-
const implementation = handleManagementAction("list", { task: "Implement the fix" }, ctx);
|
|
909
|
-
assert.equal(implementation.isError, false);
|
|
910
|
-
assert.deepEqual((implementation as { details: { results: unknown[] } }).details.results, []);
|
|
911
|
-
const implementationText = readText(implementation);
|
|
912
|
-
assert.match(implementationText, /Task-aware advisory routing:/);
|
|
913
|
-
assert.match(implementationText, /- Intent: implementation/);
|
|
914
|
-
assert.match(implementationText, /- Recommended: fixer \(project\)/);
|
|
915
|
-
assert.match(implementationText, /- Advisory only: no subagent was launched\. To proceed, explicitly call subagent with this canonical agent name and the task\./);
|
|
916
|
-
|
|
917
|
-
const review = handleManagementAction("list", { task: "Review only; do not edit files" }, ctx);
|
|
918
|
-
assert.equal(review.isError, false);
|
|
919
|
-
const reviewText = readText(review);
|
|
920
|
-
assert.match(reviewText, /- Intent: read-only/);
|
|
921
|
-
assert.match(reviewText, /- Recommended: code-reviewer \(project\)/);
|
|
922
|
-
|
|
923
|
-
const vague = handleManagementAction("list", { task: "Look into this" }, ctx);
|
|
924
|
-
assert.equal(vague.isError, false);
|
|
925
|
-
const vagueText = readText(vague);
|
|
926
|
-
assert.match(vagueText, /- Intent: unknown/);
|
|
927
|
-
assert.match(vagueText, /- Recommendation: none/);
|
|
928
|
-
assert.match(vagueText, /Clarify whether the task is read-only analysis\/review or implementation allowed to edit files\./);
|
|
929
|
-
|
|
930
|
-
for (const noTaskParams of [{}, { task: " " }]) {
|
|
931
|
-
const noTask = handleManagementAction("list", noTaskParams, ctx);
|
|
932
|
-
assert.equal(noTask.isError, false);
|
|
933
|
-
assert.doesNotMatch(readText(noTask), /Task-aware advisory routing:/);
|
|
934
|
-
}
|
|
935
|
-
});
|
|
936
|
-
|
|
937
777
|
});
|
|
@@ -80,9 +80,9 @@ afterEach(() => {
|
|
|
80
80
|
|
|
81
81
|
describe("parseMemoryFrontmatter", () => {
|
|
82
82
|
it("parses a project scope block", () => {
|
|
83
|
-
assert.deepEqual(parseMemoryFrontmatter("scope: project\npath: security-
|
|
83
|
+
assert.deepEqual(parseMemoryFrontmatter("scope: project\npath: security-commentator"), {
|
|
84
84
|
scope: "project",
|
|
85
|
-
path: "security-
|
|
85
|
+
path: "security-commentator",
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
88
|
|
|
@@ -94,9 +94,9 @@ describe("parseMemoryFrontmatter", () => {
|
|
|
94
94
|
});
|
|
95
95
|
|
|
96
96
|
it("parses an inline object memory block", () => {
|
|
97
|
-
assert.deepEqual(parseMemoryFrontmatter('{ scope: "project", path: "security-
|
|
97
|
+
assert.deepEqual(parseMemoryFrontmatter('{ scope: "project", path: "security-commentator" }'), {
|
|
98
98
|
scope: "project",
|
|
99
|
-
path: "security-
|
|
99
|
+
path: "security-commentator",
|
|
100
100
|
});
|
|
101
101
|
});
|
|
102
102
|
|
|
@@ -138,8 +138,8 @@ describe("agentHasWriteTools", () => {
|
|
|
138
138
|
describe("resolveMemoryDir", () => {
|
|
139
139
|
it("resolves a simple and nested path under the root", () => {
|
|
140
140
|
const root = mkdtemp("pi-subagents-mem-root-");
|
|
141
|
-
assert.deepEqual(resolveMemoryDir(root, "
|
|
142
|
-
assert.deepEqual(resolveMemoryDir(root, "team/
|
|
141
|
+
assert.deepEqual(resolveMemoryDir(root, "commentator"), { dir: path.join(root, "commentator") });
|
|
142
|
+
assert.deepEqual(resolveMemoryDir(root, "team/commentator"), { dir: path.join(root, "team", "commentator") });
|
|
143
143
|
});
|
|
144
144
|
|
|
145
145
|
it("rejects empty paths", () => {
|
|
@@ -157,9 +157,9 @@ describe("resolveMemoryDir", () => {
|
|
|
157
157
|
|
|
158
158
|
it("rejects absolute and Windows drive-like paths", () => {
|
|
159
159
|
const root = mkdtemp("pi-subagents-mem-root-");
|
|
160
|
-
assert.ok("error" in resolveMemoryDir(root, "/tmp/
|
|
161
|
-
assert.ok("error" in resolveMemoryDir(root, "C:\\Users\\
|
|
162
|
-
assert.ok("error" in resolveMemoryDir(root, "C:
|
|
160
|
+
assert.ok("error" in resolveMemoryDir(root, "/tmp/commentator"));
|
|
161
|
+
assert.ok("error" in resolveMemoryDir(root, "C:\\Users\\commentator"));
|
|
162
|
+
assert.ok("error" in resolveMemoryDir(root, "C:commentator"));
|
|
163
163
|
assert.ok("error" in resolveMemoryDir(root, "team:C"));
|
|
164
164
|
});
|
|
165
165
|
|
|
@@ -245,9 +245,9 @@ describe("buildAgentMemoryInjection", () => {
|
|
|
245
245
|
|
|
246
246
|
it("injects a read-write block with contents for a project scope", () => {
|
|
247
247
|
const project = mkProject();
|
|
248
|
-
const memoryDir = path.join(project, ".selesai", AGENT_MEMORY_DIR_NAME, "security-
|
|
248
|
+
const memoryDir = path.join(project, ".selesai", AGENT_MEMORY_DIR_NAME, "security-commentator");
|
|
249
249
|
writeMemoryFile(memoryDir, "Threat: token leakage in logs.\nGotcha: retry on 429.");
|
|
250
|
-
const agent = makeAgent({ memory: { scope: "project", path: "security-
|
|
250
|
+
const agent = makeAgent({ memory: { scope: "project", path: "security-commentator" }, tools: ["read", "edit"] });
|
|
251
251
|
const injection = buildAgentMemoryInjection(agent, project);
|
|
252
252
|
const memoryFile = path.join(memoryDir, AGENT_MEMORY_FILE);
|
|
253
253
|
assert.match(injection, /# Persistent agent memory/);
|
|
@@ -271,9 +271,9 @@ describe("buildAgentMemoryInjection", () => {
|
|
|
271
271
|
|
|
272
272
|
it("injects a read-only block for agents without write tools", () => {
|
|
273
273
|
const project = mkProject();
|
|
274
|
-
const memoryDir = path.join(project, ".selesai", AGENT_MEMORY_DIR_NAME, "
|
|
274
|
+
const memoryDir = path.join(project, ".selesai", AGENT_MEMORY_DIR_NAME, "explorer");
|
|
275
275
|
writeMemoryFile(memoryDir, "Known flake: async timeout test.");
|
|
276
|
-
const agent = makeAgent({ memory: { scope: "project", path: "
|
|
276
|
+
const agent = makeAgent({ memory: { scope: "project", path: "explorer" }, tools: ["read", "grep", "find", "ls"] });
|
|
277
277
|
const injection = buildAgentMemoryInjection(agent, project);
|
|
278
278
|
assert.match(injection, /read-only, role-specific memory scope/);
|
|
279
279
|
assert.match(injection, /Do not attempt to edit or create the memory file/);
|
|
@@ -285,7 +285,7 @@ describe("buildAgentMemoryInjection", () => {
|
|
|
285
285
|
|
|
286
286
|
it("injects nothing for a read-only agent with no memory file yet", () => {
|
|
287
287
|
const project = mkProject();
|
|
288
|
-
const agent = makeAgent({ memory: { scope: "project", path: "empty-
|
|
288
|
+
const agent = makeAgent({ memory: { scope: "project", path: "empty-explorer" }, tools: ["read"] });
|
|
289
289
|
assert.equal(buildAgentMemoryInjection(agent, project), "");
|
|
290
290
|
});
|
|
291
291
|
|
|
@@ -349,19 +349,19 @@ describe("buildAgentMemoryInjection", () => {
|
|
|
349
349
|
describe("agent memory frontmatter round-trip", () => {
|
|
350
350
|
it("parses memory frontmatter during discovery and keeps it out of extraFields", () => {
|
|
351
351
|
const project = mkProject();
|
|
352
|
-
fs.writeFileSync(path.join(project, ".selesai", "agents", "security-
|
|
353
|
-
name: security-
|
|
354
|
-
description: Recurring security
|
|
352
|
+
fs.writeFileSync(path.join(project, ".selesai", "agents", "security-commentator.md"), `---
|
|
353
|
+
name: security-commentator
|
|
354
|
+
description: Recurring security commentator
|
|
355
355
|
tools: read, grep, bash, edit
|
|
356
|
-
memory: { scope: project, path: security-
|
|
356
|
+
memory: { scope: project, path: security-commentator }
|
|
357
357
|
---
|
|
358
358
|
|
|
359
359
|
Review for threats.
|
|
360
360
|
`, "utf-8");
|
|
361
361
|
|
|
362
|
-
const agent = discoverAgents(project, "project").agents.find((a) => a.name === "security-
|
|
362
|
+
const agent = discoverAgents(project, "project").agents.find((a) => a.name === "security-commentator");
|
|
363
363
|
assert.ok(agent, "agent should be discovered");
|
|
364
|
-
assert.deepEqual(agent?.memory, { scope: "project", path: "security-
|
|
364
|
+
assert.deepEqual(agent?.memory, { scope: "project", path: "security-commentator" });
|
|
365
365
|
assert.equal(agent?.extraFields?.memory, undefined, "memory must not leak into extraFields");
|
|
366
366
|
});
|
|
367
367
|
|
|
@@ -395,23 +395,23 @@ Still loads.
|
|
|
395
395
|
describe("agent memory in management detail", () => {
|
|
396
396
|
it("surfaces the memory scope in the get action", () => {
|
|
397
397
|
const project = mkProject();
|
|
398
|
-
fs.writeFileSync(path.join(project, ".selesai", "agents", "security-
|
|
399
|
-
name: security-
|
|
400
|
-
description: Recurring security
|
|
398
|
+
fs.writeFileSync(path.join(project, ".selesai", "agents", "security-commentator.md"), `---
|
|
399
|
+
name: security-commentator
|
|
400
|
+
description: Recurring security commentator
|
|
401
401
|
memory:
|
|
402
402
|
scope: project
|
|
403
|
-
path: security-
|
|
403
|
+
path: security-commentator
|
|
404
404
|
---
|
|
405
405
|
|
|
406
406
|
Review for threats.
|
|
407
407
|
`, "utf-8");
|
|
408
408
|
|
|
409
|
-
const res = handleManagementAction("get", { agent: "security-
|
|
409
|
+
const res = handleManagementAction("get", { agent: "security-commentator" }, {
|
|
410
410
|
cwd: project,
|
|
411
411
|
modelRegistry: { getAvailable: () => [] },
|
|
412
412
|
});
|
|
413
413
|
assert.equal(res.isError, false);
|
|
414
|
-
assert.match(res.content[0]?.text ?? "", /Memory: project scope, path: security-
|
|
414
|
+
assert.match(res.content[0]?.text ?? "", /Memory: project scope, path: security-commentator/);
|
|
415
415
|
});
|
|
416
416
|
});
|
|
417
417
|
|