@caupulican/pi-adaptative 0.81.41 → 0.81.43
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 +53 -0
- package/dist/bun/cli.d.ts.map +1 -1
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/register-bedrock.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.js.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.d.ts.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/dispatch-grant.js.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.d.ts.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.js +52 -49
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.js.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.ts +62 -57
- package/dist/bundled-resources/prompts/skillify.md +1 -1
- package/dist/bundled-resources/runtimes/pi-shell-engine/commands/fs.py +16 -19
- package/dist/bundled-resources/runtimes/pi-shell-engine/commands/search.py +12 -26
- package/dist/bundled-resources/runtimes/pi-shell-engine/commands/strings.py +15 -121
- package/dist/bundled-resources/runtimes/pi-shell-engine/commands/text.py +57 -80
- package/dist/bundled-resources/runtimes/pi-shell-engine/context.py +3 -3
- package/dist/bundled-resources/runtimes/pi-shell-engine/errors.py +8 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/escapes.py +70 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/exec.py +135 -63
- package/dist/bundled-resources/runtimes/pi-shell-engine/expand.py +3 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/main.py +108 -22
- package/dist/bundled-resources/runtimes/pi-shell-engine/paths.py +10 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/proc.py +12 -4
- package/dist/bundled-resources/runtimes/pi-shell-engine/shell_args.py +22 -0
- package/dist/bundled-resources/runtimes/pi-shell-engine/state.py +10 -2
- package/dist/bundled-resources/runtimes/pi-shell-engine/tokens.py +131 -259
- package/dist/bundled-resources/skills/authorized-web-security-audit/SKILL.md +187 -0
- package/dist/bundled-resources/skills/authorized-web-security-audit/references/assessment-contract.md +92 -0
- package/dist/bundled-resources/skills/deduplicate-by-evidence/SKILL.md +134 -0
- package/dist/bundled-resources/skills/evidence-gated-tdd/SKILL.md +93 -0
- package/dist/bundled-resources/skills/evidence-gated-tdd/references/evidence-model.md +27 -0
- package/dist/bundled-resources/skills/evidence-gated-tdd/references/security-scanners.md +24 -0
- package/dist/bundled-resources/skills/harness-self-adaptation/SKILL.md +4 -2
- package/dist/bundled-resources/skills/secure-agent-tool-surfaces/SKILL.md +217 -0
- package/dist/bundled-resources/skills/secure-agent-tool-surfaces/references/defensive-exploit-catalogue.md +175 -0
- package/dist/bundled-resources/skills/secure-agent-tool-surfaces/references/tool-boundary-checklist.md +87 -0
- package/dist/bundled-resources/skills/skill-architect/SKILL.md +2 -2
- package/dist/bundled-resources/skills/skill-creator/SKILL.md +188 -0
- package/dist/bundled-resources/skills/skill-creator/references/pi-skill-contract.md +73 -0
- package/dist/bundled-resources/skills/skill-creator/scripts/init-skill.mjs +142 -0
- package/dist/bundled-resources/skills/skill-creator/scripts/validate-skill.mjs +122 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js +8 -8
- package/dist/cli/file-processor.js.map +1 -1
- package/dist/cli/initial-message.d.ts +1 -1
- package/dist/cli/initial-message.d.ts.map +1 -1
- package/dist/cli/initial-message.js.map +1 -1
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/piped-stdin.d.ts +4 -0
- package/dist/cli/piped-stdin.d.ts.map +1 -0
- package/dist/cli/piped-stdin.js +13 -0
- package/dist/cli/piped-stdin.js.map +1 -0
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +9 -14
- package/dist/config.js.map +1 -1
- package/dist/core/agent-directory-layout.d.ts.map +1 -1
- package/dist/core/agent-directory-layout.js.map +1 -1
- package/dist/core/agent-paths.d.ts +32 -0
- package/dist/core/agent-paths.d.ts.map +1 -1
- package/dist/core/agent-paths.js +65 -0
- package/dist/core/agent-paths.js.map +1 -1
- package/dist/core/agent-session-contracts.d.ts +24 -10
- package/dist/core/agent-session-contracts.d.ts.map +1 -1
- package/dist/core/agent-session-contracts.js +1 -12
- package/dist/core/agent-session-contracts.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +10 -25
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +24 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +214 -246
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-guidance.d.ts.map +1 -1
- package/dist/core/auth-guidance.js.map +1 -1
- package/dist/core/auth-storage.d.ts +4 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +13 -39
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/autonomy/approval-gate.d.ts.map +1 -1
- package/dist/core/autonomy/approval-gate.js.map +1 -1
- package/dist/core/autonomy/bounded-completion.d.ts.map +1 -1
- package/dist/core/autonomy/bounded-completion.js.map +1 -1
- package/dist/core/autonomy/contracts.d.ts +2 -0
- package/dist/core/autonomy/contracts.d.ts.map +1 -1
- package/dist/core/autonomy/contracts.js.map +1 -1
- package/dist/core/autonomy/envelope-enforcement.d.ts.map +1 -1
- package/dist/core/autonomy/envelope-enforcement.js +4 -9
- package/dist/core/autonomy/envelope-enforcement.js.map +1 -1
- package/dist/core/autonomy/evidence-finding-projection.d.ts +11 -0
- package/dist/core/autonomy/evidence-finding-projection.d.ts.map +1 -0
- package/dist/core/autonomy/evidence-finding-projection.js +37 -0
- package/dist/core/autonomy/evidence-finding-projection.js.map +1 -0
- package/dist/core/autonomy/foreground-envelope.d.ts.map +1 -1
- package/dist/core/autonomy/foreground-envelope.js.map +1 -1
- package/dist/core/autonomy/gates.d.ts.map +1 -1
- package/dist/core/autonomy/gates.js.map +1 -1
- package/dist/core/autonomy/lane-private-paths.d.ts.map +1 -1
- package/dist/core/autonomy/lane-private-paths.js.map +1 -1
- package/dist/core/autonomy/lane-tool-surface.d.ts +3 -1
- package/dist/core/autonomy/lane-tool-surface.d.ts.map +1 -1
- package/dist/core/autonomy/lane-tool-surface.js +17 -4
- package/dist/core/autonomy/lane-tool-surface.js.map +1 -1
- package/dist/core/autonomy/lane-tracker.d.ts.map +1 -1
- package/dist/core/autonomy/lane-tracker.js +2 -3
- package/dist/core/autonomy/lane-tracker.js.map +1 -1
- package/dist/core/autonomy/path-scope.d.ts +14 -0
- package/dist/core/autonomy/path-scope.d.ts.map +1 -1
- package/dist/core/autonomy/path-scope.js +37 -6
- package/dist/core/autonomy/path-scope.js.map +1 -1
- package/dist/core/autonomy/risk-assessment.d.ts.map +1 -1
- package/dist/core/autonomy/session-lane-record.d.ts.map +1 -1
- package/dist/core/autonomy/session-lane-record.js.map +1 -1
- package/dist/core/autonomy/status.d.ts.map +1 -1
- package/dist/core/autonomy/status.js.map +1 -1
- package/dist/core/autonomy/subagent-prompt.d.ts.map +1 -1
- package/dist/core/autonomy/subagent-prompt.js.map +1 -1
- package/dist/core/autonomy/telemetry-events.d.ts.map +1 -1
- package/dist/core/autonomy/telemetry-events.js.map +1 -1
- package/dist/core/autonomy-telemetry.d.ts.map +1 -1
- package/dist/core/autonomy-telemetry.js +2 -4
- package/dist/core/autonomy-telemetry.js.map +1 -1
- package/dist/core/background-lane-controller.d.ts +27 -1
- package/dist/core/background-lane-controller.d.ts.map +1 -1
- package/dist/core/background-lane-controller.js +34 -16
- package/dist/core/background-lane-controller.js.map +1 -1
- package/dist/core/background-tool-task-controller.d.ts +88 -0
- package/dist/core/background-tool-task-controller.d.ts.map +1 -0
- package/dist/core/background-tool-task-controller.js +470 -0
- package/dist/core/background-tool-task-controller.js.map +1 -0
- package/dist/core/bash-execution-controller.d.ts +1 -0
- package/dist/core/bash-execution-controller.d.ts.map +1 -1
- package/dist/core/bash-execution-controller.js +5 -4
- package/dist/core/bash-execution-controller.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/bedrock-sso-login.d.ts.map +1 -1
- package/dist/core/bedrock-sso-login.js.map +1 -1
- package/dist/core/billing-failover-controller.d.ts.map +1 -1
- package/dist/core/billing-failover-controller.js +3 -3
- package/dist/core/billing-failover-controller.js.map +1 -1
- package/dist/core/billing-failover.d.ts.map +1 -1
- package/dist/core/billing-failover.js.map +1 -1
- package/dist/core/capability-contract.d.ts.map +1 -1
- package/dist/core/catalog-manager.d.ts.map +1 -1
- package/dist/core/catalog-manager.js +0 -0
- package/dist/core/catalog-manager.js.map +1 -1
- package/dist/core/compaction-controller.d.ts +2 -0
- package/dist/core/compaction-controller.d.ts.map +1 -1
- package/dist/core/compaction-controller.js +21 -8
- package/dist/core/compaction-controller.js.map +1 -1
- package/dist/core/compaction-support.d.ts +8 -0
- package/dist/core/compaction-support.d.ts.map +1 -1
- package/dist/core/compaction-support.js +0 -2
- package/dist/core/compaction-support.js.map +1 -1
- package/dist/core/context/artifact-retrieval.d.ts.map +1 -1
- package/dist/core/context/artifact-retrieval.js.map +1 -1
- package/dist/core/context/brain-curator.d.ts.map +1 -1
- package/dist/core/context/brain-curator.js +14 -33
- package/dist/core/context/brain-curator.js.map +1 -1
- package/dist/core/context/context-artifacts.d.ts.map +1 -1
- package/dist/core/context/context-artifacts.js +16 -24
- package/dist/core/context/context-artifacts.js.map +1 -1
- package/dist/core/context/context-audit.d.ts.map +1 -1
- package/dist/core/context/context-audit.js +3 -17
- package/dist/core/context/context-audit.js.map +1 -1
- package/dist/core/context/context-composition.d.ts.map +1 -1
- package/dist/core/context/context-composition.js.map +1 -1
- package/dist/core/context/context-item.d.ts.map +1 -1
- package/dist/core/context/context-item.js.map +1 -1
- package/dist/core/context/context-prompt-enforcement.d.ts.map +1 -1
- package/dist/core/context/context-prompt-enforcement.js +3 -16
- package/dist/core/context/context-prompt-enforcement.js.map +1 -1
- package/dist/core/context/context-prompt-policy.d.ts.map +1 -1
- package/dist/core/context/context-prompt-policy.js.map +1 -1
- package/dist/core/context/context-retention.d.ts.map +1 -1
- package/dist/core/context/context-retention.js.map +1 -1
- package/dist/core/context/context-store-retention.d.ts.map +1 -1
- package/dist/core/context/context-store-retention.js.map +1 -1
- package/dist/core/context/context-store.d.ts.map +1 -1
- package/dist/core/context/context-store.js.map +1 -1
- package/dist/core/context/context-tool-result.d.ts +4 -0
- package/dist/core/context/context-tool-result.d.ts.map +1 -0
- package/dist/core/context/context-tool-result.js +15 -0
- package/dist/core/context/context-tool-result.js.map +1 -0
- package/dist/core/context/current-work-memory.d.ts.map +1 -1
- package/dist/core/context/current-work-memory.js.map +1 -1
- package/dist/core/context/file-store-memory-provider.d.ts.map +1 -1
- package/dist/core/context/file-store-memory-provider.js +7 -28
- package/dist/core/context/file-store-memory-provider.js.map +1 -1
- package/dist/core/context/local-memory-search.d.ts +11 -0
- package/dist/core/context/local-memory-search.d.ts.map +1 -0
- package/dist/core/context/local-memory-search.js +37 -0
- package/dist/core/context/local-memory-search.js.map +1 -0
- package/dist/core/context/long-term-memory-trigger.d.ts.map +1 -1
- package/dist/core/context/long-term-memory-trigger.js.map +1 -1
- package/dist/core/context/memory-diagnostics.d.ts.map +1 -1
- package/dist/core/context/memory-diagnostics.js.map +1 -1
- package/dist/core/context/memory-index-store.d.ts.map +1 -1
- package/dist/core/context/memory-index-store.js.map +1 -1
- package/dist/core/context/memory-prompt-block.d.ts.map +1 -1
- package/dist/core/context/memory-prompt-block.js.map +1 -1
- package/dist/core/context/memory-prompt-budget.d.ts.map +1 -1
- package/dist/core/context/memory-prompt-budget.js.map +1 -1
- package/dist/core/context/memory-provider-contract.d.ts.map +1 -1
- package/dist/core/context/memory-provider-contract.js.map +1 -1
- package/dist/core/context/memory-retrieval.d.ts.map +1 -1
- package/dist/core/context/memory-retrieval.js.map +1 -1
- package/dist/core/context/memory-tier-composer.d.ts.map +1 -1
- package/dist/core/context/memory-tier-composer.js.map +1 -1
- package/dist/core/context/message-text.d.ts +7 -0
- package/dist/core/context/message-text.d.ts.map +1 -0
- package/dist/core/context/message-text.js +68 -0
- package/dist/core/context/message-text.js.map +1 -0
- package/dist/core/context/okf-memory-provider.d.ts.map +1 -1
- package/dist/core/context/okf-memory-provider.js +4 -30
- package/dist/core/context/okf-memory-provider.js.map +1 -1
- package/dist/core/context/okf-memory.d.ts.map +1 -1
- package/dist/core/context/okf-memory.js.map +1 -1
- package/dist/core/context/policy-engine.d.ts.map +1 -1
- package/dist/core/context/policy-engine.js.map +1 -1
- package/dist/core/context/policy-types.d.ts.map +1 -1
- package/dist/core/context/sqlite-runtime-index.d.ts.map +1 -1
- package/dist/core/context/sqlite-runtime-index.js.map +1 -1
- package/dist/core/context/storage-authority.d.ts.map +1 -1
- package/dist/core/context/tool-output-packer.d.ts.map +1 -1
- package/dist/core/context/tool-output-packer.js.map +1 -1
- package/dist/core/context-gc.d.ts.map +1 -1
- package/dist/core/context-gc.js +14 -21
- package/dist/core/context-gc.js.map +1 -1
- package/dist/core/context-pipeline.d.ts +1 -3
- package/dist/core/context-pipeline.d.ts.map +1 -1
- package/dist/core/context-pipeline.js +64 -145
- package/dist/core/context-pipeline.js.map +1 -1
- package/dist/core/cost/cost-summary.d.ts.map +1 -1
- package/dist/core/cost/cost-summary.js.map +1 -1
- package/dist/core/cost/daily-usage.d.ts.map +1 -1
- package/dist/core/cost/daily-usage.js.map +1 -1
- package/dist/core/cost/session-usage.d.ts.map +1 -1
- package/dist/core/cost/session-usage.js.map +1 -1
- package/dist/core/cost-guard.d.ts.map +1 -1
- package/dist/core/cost-guard.js.map +1 -1
- package/dist/core/default-tool-surface.d.ts.map +1 -1
- package/dist/core/default-tool-surface.js +1 -0
- package/dist/core/default-tool-surface.js.map +1 -1
- package/dist/core/defaults.d.ts.map +1 -1
- package/dist/core/delegation/managed-lane-controller.d.ts +11 -1
- package/dist/core/delegation/managed-lane-controller.d.ts.map +1 -1
- package/dist/core/delegation/managed-lane-controller.js +85 -46
- package/dist/core/delegation/managed-lane-controller.js.map +1 -1
- package/dist/core/delegation/session-worker-claim.d.ts.map +1 -1
- package/dist/core/delegation/session-worker-claim.js +4 -3
- package/dist/core/delegation/session-worker-claim.js.map +1 -1
- package/dist/core/delegation/worker-action-journal.d.ts +73 -0
- package/dist/core/delegation/worker-action-journal.d.ts.map +1 -0
- package/dist/core/delegation/worker-action-journal.js +293 -0
- package/dist/core/delegation/worker-action-journal.js.map +1 -0
- package/dist/core/delegation/worker-actions.d.ts +36 -1
- package/dist/core/delegation/worker-actions.d.ts.map +1 -1
- package/dist/core/delegation/worker-actions.js +171 -46
- package/dist/core/delegation/worker-actions.js.map +1 -1
- package/dist/core/delegation/worker-agent-control-coordinator.d.ts +76 -0
- package/dist/core/delegation/worker-agent-control-coordinator.d.ts.map +1 -0
- package/dist/core/delegation/worker-agent-control-coordinator.js +216 -0
- package/dist/core/delegation/worker-agent-control-coordinator.js.map +1 -0
- package/dist/core/delegation/worker-agent-control.d.ts +66 -0
- package/dist/core/delegation/worker-agent-control.d.ts.map +1 -0
- package/dist/core/delegation/worker-agent-control.js +160 -0
- package/dist/core/delegation/worker-agent-control.js.map +1 -0
- package/dist/core/delegation/worker-attempt-executor.d.ts +80 -0
- package/dist/core/delegation/worker-attempt-executor.d.ts.map +1 -0
- package/dist/core/delegation/worker-attempt-executor.js +343 -0
- package/dist/core/delegation/worker-attempt-executor.js.map +1 -0
- package/dist/core/delegation/worker-claim.d.ts +30 -0
- package/dist/core/delegation/worker-claim.d.ts.map +1 -1
- package/dist/core/delegation/worker-claim.js +205 -53
- package/dist/core/delegation/worker-claim.js.map +1 -1
- package/dist/core/delegation/worker-conversation-store.d.ts +116 -0
- package/dist/core/delegation/worker-conversation-store.d.ts.map +1 -0
- package/dist/core/delegation/worker-conversation-store.js +440 -0
- package/dist/core/delegation/worker-conversation-store.js.map +1 -0
- package/dist/core/delegation/worker-delegation-controller.d.ts +21 -5
- package/dist/core/delegation/worker-delegation-controller.d.ts.map +1 -1
- package/dist/core/delegation/worker-delegation-controller.js +386 -260
- package/dist/core/delegation/worker-delegation-controller.js.map +1 -1
- package/dist/core/delegation/worker-delegation-request.d.ts +14 -0
- package/dist/core/delegation/worker-delegation-request.d.ts.map +1 -1
- package/dist/core/delegation/worker-delegation-request.js.map +1 -1
- package/dist/core/delegation/worker-dispatch-scheduler.d.ts +4 -2
- package/dist/core/delegation/worker-dispatch-scheduler.d.ts.map +1 -1
- package/dist/core/delegation/worker-dispatch-scheduler.js +20 -11
- package/dist/core/delegation/worker-dispatch-scheduler.js.map +1 -1
- package/dist/core/delegation/worker-execution-policy.d.ts +2 -1
- package/dist/core/delegation/worker-execution-policy.d.ts.map +1 -1
- package/dist/core/delegation/worker-execution-policy.js +5 -7
- package/dist/core/delegation/worker-execution-policy.js.map +1 -1
- package/dist/core/delegation/worker-lane-projection.d.ts.map +1 -1
- package/dist/core/delegation/worker-lane-projection.js.map +1 -1
- package/dist/core/delegation/worker-lifecycle.d.ts +44 -1
- package/dist/core/delegation/worker-lifecycle.d.ts.map +1 -1
- package/dist/core/delegation/worker-lifecycle.js +119 -2
- package/dist/core/delegation/worker-lifecycle.js.map +1 -1
- package/dist/core/delegation/worker-notification-coordinator.d.ts.map +1 -1
- package/dist/core/delegation/worker-notification-coordinator.js +4 -5
- package/dist/core/delegation/worker-notification-coordinator.js.map +1 -1
- package/dist/core/delegation/worker-process-owner.d.ts +18 -0
- package/dist/core/delegation/worker-process-owner.d.ts.map +1 -0
- package/dist/core/delegation/worker-process-owner.js +54 -0
- package/dist/core/delegation/worker-process-owner.js.map +1 -0
- package/dist/core/delegation/worker-profile-resolver.d.ts +5 -1
- package/dist/core/delegation/worker-profile-resolver.d.ts.map +1 -1
- package/dist/core/delegation/worker-profile-resolver.js +9 -2
- package/dist/core/delegation/worker-profile-resolver.js.map +1 -1
- package/dist/core/delegation/worker-recovery-coordinator.d.ts +54 -0
- package/dist/core/delegation/worker-recovery-coordinator.d.ts.map +1 -0
- package/dist/core/delegation/worker-recovery-coordinator.js +180 -0
- package/dist/core/delegation/worker-recovery-coordinator.js.map +1 -0
- package/dist/core/delegation/worker-resource-catalog.d.ts +32 -0
- package/dist/core/delegation/worker-resource-catalog.d.ts.map +1 -0
- package/dist/core/delegation/worker-resource-catalog.js +116 -0
- package/dist/core/delegation/worker-resource-catalog.js.map +1 -0
- package/dist/core/delegation/worker-resource-materializer.d.ts +47 -0
- package/dist/core/delegation/worker-resource-materializer.d.ts.map +1 -0
- package/dist/core/delegation/worker-resource-materializer.js +134 -0
- package/dist/core/delegation/worker-resource-materializer.js.map +1 -0
- package/dist/core/delegation/worker-runner.d.ts +5 -5
- package/dist/core/delegation/worker-runner.d.ts.map +1 -1
- package/dist/core/delegation/worker-runner.js +193 -70
- package/dist/core/delegation/worker-runner.js.map +1 -1
- package/dist/core/delegation/worker-task-label.d.ts.map +1 -1
- package/dist/core/delegation/worker-task-label.js.map +1 -1
- package/dist/core/delegation/worker-terminal-finalizer.d.ts +23 -0
- package/dist/core/delegation/worker-terminal-finalizer.d.ts.map +1 -0
- package/dist/core/delegation/worker-terminal-finalizer.js +12 -0
- package/dist/core/delegation/worker-terminal-finalizer.js.map +1 -0
- package/dist/core/delegation/worker-write-reservation-coordinator.d.ts +38 -0
- package/dist/core/delegation/worker-write-reservation-coordinator.d.ts.map +1 -0
- package/dist/core/delegation/worker-write-reservation-coordinator.js +104 -0
- package/dist/core/delegation/worker-write-reservation-coordinator.js.map +1 -0
- package/dist/core/delegation/worker-write-reservation.d.ts +90 -0
- package/dist/core/delegation/worker-write-reservation.d.ts.map +1 -0
- package/dist/core/delegation/worker-write-reservation.js +346 -0
- package/dist/core/delegation/worker-write-reservation.js.map +1 -0
- package/dist/core/diagnostics.d.ts.map +1 -1
- package/dist/core/doctor.d.ts.map +1 -1
- package/dist/core/doctor.js.map +1 -1
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js +26 -7
- package/dist/core/exec.js.map +1 -1
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/dist/core/export-html/ansi-to-html.js +21 -74
- package/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js +4 -0
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/session-tree-foundations.d.mts +67 -0
- package/dist/core/export-html/session-tree-foundations.mjs +313 -0
- package/dist/core/export-html/template.css +14 -41
- package/dist/core/export-html/template.html +3 -1
- package/dist/core/export-html/template.js +26 -435
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extension-import-authority.d.ts.map +1 -1
- package/dist/core/extension-import-authority.js.map +1 -1
- package/dist/core/extension-metadata.d.ts.map +1 -1
- package/dist/core/extension-metadata.js.map +1 -1
- package/dist/core/extensions/builtin.d.ts +17 -0
- package/dist/core/extensions/builtin.d.ts.map +1 -1
- package/dist/core/extensions/builtin.js +18 -54
- package/dist/core/extensions/builtin.js.map +1 -1
- package/dist/core/extensions/entry-resolution.d.ts +3 -0
- package/dist/core/extensions/entry-resolution.d.ts.map +1 -0
- package/dist/core/extensions/entry-resolution.js +17 -0
- package/dist/core/extensions/entry-resolution.js.map +1 -0
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +76 -21
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +2 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +41 -112
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/stale-context.d.ts.map +1 -1
- package/dist/core/extensions/storage.d.ts.map +1 -1
- package/dist/core/extensions/storage.js.map +1 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/wrapper.d.ts.map +1 -1
- package/dist/core/extensions/wrapper.js.map +1 -1
- package/dist/core/failure-corpus.d.ts.map +1 -1
- package/dist/core/failure-corpus.js +2 -5
- package/dist/core/failure-corpus.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +27 -33
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/foreground-recovery-controller.d.ts.map +1 -1
- package/dist/core/foreground-recovery-controller.js +0 -4
- package/dist/core/foreground-recovery-controller.js.map +1 -1
- package/dist/core/gateways/channel-provider.d.ts.map +1 -1
- package/dist/core/gateways/channel-provider.js +7 -5
- package/dist/core/gateways/channel-provider.js.map +1 -1
- package/dist/core/goal-loop-controller.d.ts.map +1 -1
- package/dist/core/goal-loop-controller.js +0 -1
- package/dist/core/goal-loop-controller.js.map +1 -1
- package/dist/core/goals/compact-goal-context.d.ts.map +1 -1
- package/dist/core/goals/compact-goal-context.js +2 -4
- package/dist/core/goals/compact-goal-context.js.map +1 -1
- package/dist/core/goals/goal-acceptance.d.ts.map +1 -1
- package/dist/core/goals/goal-acceptance.js.map +1 -1
- package/dist/core/goals/goal-auto-continue-controller.d.ts.map +1 -1
- package/dist/core/goals/goal-auto-continue-controller.js +1 -3
- package/dist/core/goals/goal-auto-continue-controller.js.map +1 -1
- package/dist/core/goals/goal-continuation-controller.d.ts.map +1 -1
- package/dist/core/goals/goal-continuation-controller.js.map +1 -1
- package/dist/core/goals/goal-continuation-defaults.d.ts.map +1 -1
- package/dist/core/goals/goal-continuation-prompt.d.ts.map +1 -1
- package/dist/core/goals/goal-continuation-prompt.js.map +1 -1
- package/dist/core/goals/goal-lifecycle.d.ts.map +1 -1
- package/dist/core/goals/goal-lifecycle.js.map +1 -1
- package/dist/core/goals/goal-record.d.ts.map +1 -1
- package/dist/core/goals/goal-record.js.map +1 -1
- package/dist/core/goals/goal-runtime-snapshot.d.ts.map +1 -1
- package/dist/core/goals/goal-runtime-snapshot.js.map +1 -1
- package/dist/core/goals/goal-session-controller.d.ts +15 -0
- package/dist/core/goals/goal-session-controller.d.ts.map +1 -1
- package/dist/core/goals/goal-session-controller.js +27 -3
- package/dist/core/goals/goal-session-controller.js.map +1 -1
- package/dist/core/goals/goal-state.d.ts.map +1 -1
- package/dist/core/goals/goal-state.js +35 -51
- package/dist/core/goals/goal-state.js.map +1 -1
- package/dist/core/goals/goal-tool-core.d.ts.map +1 -1
- package/dist/core/goals/goal-tool-core.js.map +1 -1
- package/dist/core/goals/natural-language-goal.d.ts +9 -0
- package/dist/core/goals/natural-language-goal.d.ts.map +1 -0
- package/dist/core/goals/natural-language-goal.js +23 -0
- package/dist/core/goals/natural-language-goal.js.map +1 -0
- package/dist/core/goals/session-goal-state.d.ts.map +1 -1
- package/dist/core/goals/session-goal-state.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/human-input-controller.d.ts.map +1 -1
- package/dist/core/human-input-controller.js +2 -3
- package/dist/core/human-input-controller.js.map +1 -1
- package/dist/core/human-input.d.ts.map +1 -1
- package/dist/core/human-input.js.map +1 -1
- package/dist/core/improvement-loop.d.ts.map +1 -1
- package/dist/core/improvement-loop.js +11 -11
- package/dist/core/improvement-loop.js.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/install-telemetry.d.ts.map +1 -1
- package/dist/core/install-telemetry.js.map +1 -1
- package/dist/core/isolated-text-completion.d.ts +17 -0
- package/dist/core/isolated-text-completion.d.ts.map +1 -0
- package/dist/core/isolated-text-completion.js +15 -0
- package/dist/core/isolated-text-completion.js.map +1 -0
- package/dist/core/keybindings.d.ts +47 -2
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +12 -1
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/learning/learning-audit.d.ts.map +1 -1
- package/dist/core/learning/learning-audit.js.map +1 -1
- package/dist/core/learning/learning-gate.d.ts.map +1 -1
- package/dist/core/learning/learning-gate.js.map +1 -1
- package/dist/core/learning/observation-store.d.ts.map +1 -1
- package/dist/core/learning/observation-store.js +0 -2
- package/dist/core/learning/observation-store.js.map +1 -1
- package/dist/core/learning/reflection-engine.d.ts +1 -1
- package/dist/core/learning/reflection-engine.d.ts.map +1 -1
- package/dist/core/learning/reflection-engine.js +3 -0
- package/dist/core/learning/reflection-engine.js.map +1 -1
- package/dist/core/learning/reflection-turn-analysis.d.ts +20 -0
- package/dist/core/learning/reflection-turn-analysis.d.ts.map +1 -0
- package/dist/core/learning/reflection-turn-analysis.js +136 -0
- package/dist/core/learning/reflection-turn-analysis.js.map +1 -0
- package/dist/core/learning/session-learning-decision.d.ts.map +1 -1
- package/dist/core/learning/session-learning-decision.js.map +1 -1
- package/dist/core/learning/skill-curator.d.ts.map +1 -1
- package/dist/core/learning/skill-curator.js +0 -3
- package/dist/core/learning/skill-curator.js.map +1 -1
- package/dist/core/local-runtime-controller.d.ts +39 -0
- package/dist/core/local-runtime-controller.d.ts.map +1 -1
- package/dist/core/local-runtime-controller.js +41 -62
- package/dist/core/local-runtime-controller.js.map +1 -1
- package/dist/core/memory/effectiveness-tracker.d.ts.map +1 -1
- package/dist/core/memory/effectiveness-tracker.js +4 -2
- package/dist/core/memory/effectiveness-tracker.js.map +1 -1
- package/dist/core/memory/memory-manager.d.ts.map +1 -1
- package/dist/core/memory/memory-manager.js +7 -7
- package/dist/core/memory/memory-manager.js.map +1 -1
- package/dist/core/memory/memory-provider.d.ts.map +1 -1
- package/dist/core/memory/providers/file-store.d.ts +7 -0
- package/dist/core/memory/providers/file-store.d.ts.map +1 -1
- package/dist/core/memory/providers/file-store.js +48 -13
- package/dist/core/memory/providers/file-store.js.map +1 -1
- package/dist/core/memory/providers/transcript-recall-worker-protocol.d.ts +47 -0
- package/dist/core/memory/providers/transcript-recall-worker-protocol.d.ts.map +1 -0
- package/dist/core/memory/providers/transcript-recall-worker-protocol.js +50 -0
- package/dist/core/memory/providers/transcript-recall-worker-protocol.js.map +1 -0
- package/dist/core/memory/providers/transcript-recall-worker.d.ts +2 -0
- package/dist/core/memory/providers/transcript-recall-worker.d.ts.map +1 -0
- package/dist/core/memory/providers/transcript-recall-worker.js +143 -0
- package/dist/core/memory/providers/transcript-recall-worker.js.map +1 -0
- package/dist/core/memory/providers/transcript-recall.d.ts +24 -13
- package/dist/core/memory/providers/transcript-recall.d.ts.map +1 -1
- package/dist/core/memory/providers/transcript-recall.js +143 -141
- package/dist/core/memory/providers/transcript-recall.js.map +1 -1
- package/dist/core/memory/providers/user-memory-archive.d.ts +39 -0
- package/dist/core/memory/providers/user-memory-archive.d.ts.map +1 -0
- package/dist/core/memory/providers/user-memory-archive.js +258 -0
- package/dist/core/memory/providers/user-memory-archive.js.map +1 -0
- package/dist/core/memory/transcript-index.d.ts.map +1 -1
- package/dist/core/memory/transcript-index.js +1 -1
- package/dist/core/memory/transcript-index.js.map +1 -1
- package/dist/core/memory-controller.d.ts +9 -0
- package/dist/core/memory-controller.d.ts.map +1 -1
- package/dist/core/memory-controller.js +57 -16
- package/dist/core/memory-controller.js.map +1 -1
- package/dist/core/model-capability.d.ts.map +1 -1
- package/dist/core/model-capability.js.map +1 -1
- package/dist/core/model-output-json.d.ts +10 -0
- package/dist/core/model-output-json.d.ts.map +1 -0
- package/dist/core/model-output-json.js +43 -0
- package/dist/core/model-output-json.js.map +1 -0
- package/dist/core/model-registry.d.ts +8 -8
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +29 -52
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-router/config-diagnostics.d.ts.map +1 -1
- package/dist/core/model-router/config-diagnostics.js.map +1 -1
- package/dist/core/model-router/executor-route.d.ts.map +1 -1
- package/dist/core/model-router/executor-route.js.map +1 -1
- package/dist/core/model-router/fitness-gate.d.ts.map +1 -1
- package/dist/core/model-router/fitness-gate.js.map +1 -1
- package/dist/core/model-router/intent-classifier.d.ts.map +1 -1
- package/dist/core/model-router/route-judge.d.ts.map +1 -1
- package/dist/core/model-router/route-judge.js +18 -36
- package/dist/core/model-router/route-judge.js.map +1 -1
- package/dist/core/model-router/session-buffer.d.ts.map +1 -1
- package/dist/core/model-router/session-buffer.js.map +1 -1
- package/dist/core/model-router/status.d.ts.map +1 -1
- package/dist/core/model-router/status.js.map +1 -1
- package/dist/core/model-router/tool-escalation.d.ts.map +1 -1
- package/dist/core/model-router/tool-escalation.js.map +1 -1
- package/dist/core/model-router-controller.d.ts +1 -0
- package/dist/core/model-router-controller.d.ts.map +1 -1
- package/dist/core/model-router-controller.js +25 -56
- package/dist/core/model-router-controller.js.map +1 -1
- package/dist/core/model-selection-controller.d.ts +10 -0
- package/dist/core/model-selection-controller.d.ts.map +1 -1
- package/dist/core/model-selection-controller.js +0 -1
- package/dist/core/model-selection-controller.js.map +1 -1
- package/dist/core/model-tool-protocol.d.ts.map +1 -1
- package/dist/core/model-tool-protocol.js.map +1 -1
- package/dist/core/models/adaptation-store.d.ts.map +1 -1
- package/dist/core/models/adaptation-store.js +0 -1
- package/dist/core/models/adaptation-store.js.map +1 -1
- package/dist/core/models/context-sizing.d.ts.map +1 -1
- package/dist/core/models/context-sizing.js.map +1 -1
- package/dist/core/models/default-model-suggestions.d.ts.map +1 -1
- package/dist/core/models/default-model-suggestions.js.map +1 -1
- package/dist/core/models/fitness-store.d.ts.map +1 -1
- package/dist/core/models/fitness-store.js +0 -1
- package/dist/core/models/fitness-store.js.map +1 -1
- package/dist/core/models/host-state-store.d.ts.map +1 -1
- package/dist/core/models/host-state-store.js +1 -6
- package/dist/core/models/host-state-store.js.map +1 -1
- package/dist/core/models/llamacpp-runtime.d.ts +4 -19
- package/dist/core/models/llamacpp-runtime.d.ts.map +1 -1
- package/dist/core/models/llamacpp-runtime.js +32 -136
- package/dist/core/models/llamacpp-runtime.js.map +1 -1
- package/dist/core/models/local-registration.d.ts.map +1 -1
- package/dist/core/models/local-registration.js +82 -115
- package/dist/core/models/local-registration.js.map +1 -1
- package/dist/core/models/local-runtime.d.ts +12 -18
- package/dist/core/models/local-runtime.d.ts.map +1 -1
- package/dist/core/models/local-runtime.js +60 -204
- package/dist/core/models/local-runtime.js.map +1 -1
- package/dist/core/models/model-endpoint.d.ts +3 -0
- package/dist/core/models/model-endpoint.d.ts.map +1 -0
- package/dist/core/models/model-endpoint.js +11 -0
- package/dist/core/models/model-endpoint.js.map +1 -0
- package/dist/core/models/model-ref.d.ts.map +1 -1
- package/dist/core/models/model-ref.js.map +1 -1
- package/dist/core/models/needle-runtime.d.ts +7 -3
- package/dist/core/models/needle-runtime.d.ts.map +1 -1
- package/dist/core/models/needle-runtime.js +16 -92
- package/dist/core/models/needle-runtime.js.map +1 -1
- package/dist/core/models/perf-profile.d.ts +1 -1
- package/dist/core/models/perf-profile.d.ts.map +1 -1
- package/dist/core/models/perf-profile.js +6 -13
- package/dist/core/models/perf-profile.js.map +1 -1
- package/dist/core/models/prism-llamacpp-lifecycle.d.ts.map +1 -1
- package/dist/core/models/prism-llamacpp-lifecycle.js.map +1 -1
- package/dist/core/models/runtime-arbiter.d.ts.map +1 -1
- package/dist/core/models/runtime-arbiter.js +3 -15
- package/dist/core/models/runtime-arbiter.js.map +1 -1
- package/dist/core/models/runtime-process.d.ts +100 -0
- package/dist/core/models/runtime-process.d.ts.map +1 -0
- package/dist/core/models/runtime-process.js +183 -0
- package/dist/core/models/runtime-process.js.map +1 -0
- package/dist/core/orchestration/agent-resume.d.ts +2 -0
- package/dist/core/orchestration/agent-resume.d.ts.map +1 -1
- package/dist/core/orchestration/agent-resume.js +7 -0
- package/dist/core/orchestration/agent-resume.js.map +1 -1
- package/dist/core/orchestration/attempt-usage.d.ts +28 -0
- package/dist/core/orchestration/attempt-usage.d.ts.map +1 -0
- package/dist/core/orchestration/attempt-usage.js +168 -0
- package/dist/core/orchestration/attempt-usage.js.map +1 -0
- package/dist/core/orchestration/capability-gateway.d.ts +19 -1
- package/dist/core/orchestration/capability-gateway.d.ts.map +1 -1
- package/dist/core/orchestration/capability-gateway.js +120 -34
- package/dist/core/orchestration/capability-gateway.js.map +1 -1
- package/dist/core/orchestration/contracts.d.ts +35 -0
- package/dist/core/orchestration/contracts.d.ts.map +1 -1
- package/dist/core/orchestration/contracts.js +17 -0
- package/dist/core/orchestration/contracts.js.map +1 -1
- package/dist/core/orchestration/delegation-ledger.d.ts +17 -2
- package/dist/core/orchestration/delegation-ledger.d.ts.map +1 -1
- package/dist/core/orchestration/delegation-ledger.js +78 -5
- package/dist/core/orchestration/delegation-ledger.js.map +1 -1
- package/dist/core/orchestration/event-store.d.ts +1 -0
- package/dist/core/orchestration/event-store.d.ts.map +1 -1
- package/dist/core/orchestration/event-store.js +79 -52
- package/dist/core/orchestration/event-store.js.map +1 -1
- package/dist/core/orchestration/lane-tool-manifests.d.ts.map +1 -1
- package/dist/core/orchestration/lane-tool-manifests.js.map +1 -1
- package/dist/core/orchestration/model-binding.d.ts.map +1 -1
- package/dist/core/orchestration/model-binding.js.map +1 -1
- package/dist/core/orchestration/policy-compiler.d.ts.map +1 -1
- package/dist/core/orchestration/policy-compiler.js +0 -3
- package/dist/core/orchestration/policy-compiler.js.map +1 -1
- package/dist/core/orchestration/policy-gate.d.ts.map +1 -1
- package/dist/core/orchestration/policy-gate.js +0 -2
- package/dist/core/orchestration/policy-gate.js.map +1 -1
- package/dist/core/orchestration/profile-registry.d.ts.map +1 -1
- package/dist/core/orchestration/profile-registry.js +82 -42
- package/dist/core/orchestration/profile-registry.js.map +1 -1
- package/dist/core/orchestration/profile-store.d.ts.map +1 -1
- package/dist/core/orchestration/profile-store.js +18 -7
- package/dist/core/orchestration/profile-store.js.map +1 -1
- package/dist/core/orchestration/risk-budget.d.ts +2 -0
- package/dist/core/orchestration/risk-budget.d.ts.map +1 -1
- package/dist/core/orchestration/risk-budget.js +26 -0
- package/dist/core/orchestration/risk-budget.js.map +1 -1
- package/dist/core/orchestration/task-runtime.d.ts +14 -1
- package/dist/core/orchestration/task-runtime.d.ts.map +1 -1
- package/dist/core/orchestration/task-runtime.js +153 -57
- package/dist/core/orchestration/task-runtime.js.map +1 -1
- package/dist/core/orchestration/work-state-projection.d.ts.map +1 -1
- package/dist/core/orchestration/work-state-projection.js.map +1 -1
- package/dist/core/orchestration/worker-execution-contract.d.ts +3 -1
- package/dist/core/orchestration/worker-execution-contract.d.ts.map +1 -1
- package/dist/core/orchestration/worker-execution-contract.js +75 -23
- package/dist/core/orchestration/worker-execution-contract.js.map +1 -1
- package/dist/core/orchestration/worker-result-adapter.d.ts +9 -3
- package/dist/core/orchestration/worker-result-adapter.d.ts.map +1 -1
- package/dist/core/orchestration/worker-result-adapter.js +167 -14
- package/dist/core/orchestration/worker-result-adapter.js.map +1 -1
- package/dist/core/output-guard.d.ts.map +1 -1
- package/dist/core/output-guard.js.map +1 -1
- package/dist/core/package-manager.d.ts +3 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +88 -353
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/process-identity.d.ts.map +1 -1
- package/dist/core/process-identity.js.map +1 -1
- package/dist/core/process-liveness.d.ts +3 -0
- package/dist/core/process-liveness.d.ts.map +1 -0
- package/dist/core/process-liveness.js +17 -0
- package/dist/core/process-liveness.js.map +1 -0
- package/dist/core/process-matrix/codes.d.ts.map +1 -1
- package/dist/core/process-matrix/resume-launcher.d.ts.map +1 -1
- package/dist/core/process-matrix/resume-launcher.js.map +1 -1
- package/dist/core/process-matrix/runtime.d.ts.map +1 -1
- package/dist/core/process-matrix/runtime.js.map +1 -1
- package/dist/core/process-matrix/store.d.ts.map +1 -1
- package/dist/core/process-matrix/store.js.map +1 -1
- package/dist/core/process-matrix/supervisor.d.ts.map +1 -1
- package/dist/core/process-matrix/supervisor.js.map +1 -1
- package/dist/core/profile-filter-controller.d.ts.map +1 -1
- package/dist/core/profile-filter-controller.js +7 -8
- package/dist/core/profile-filter-controller.js.map +1 -1
- package/dist/core/profile-registry.d.ts.map +1 -1
- package/dist/core/profile-registry.js +1 -2
- package/dist/core/profile-registry.js.map +1 -1
- package/dist/core/profile-resource-selection.d.ts.map +1 -1
- package/dist/core/profile-resource-selection.js +18 -59
- package/dist/core/profile-resource-selection.js.map +1 -1
- package/dist/core/prompt-markup.d.ts +3 -0
- package/dist/core/prompt-markup.d.ts.map +1 -0
- package/dist/core/prompt-markup.js +7 -0
- package/dist/core/prompt-markup.js.map +1 -0
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +13 -39
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/python-runtime.d.ts.map +1 -1
- package/dist/core/python-runtime.js.map +1 -1
- package/dist/core/reflection-controller.d.ts +23 -2
- package/dist/core/reflection-controller.d.ts.map +1 -1
- package/dist/core/reflection-controller.js +233 -79
- package/dist/core/reflection-controller.js.map +1 -1
- package/dist/core/reload-blockers.d.ts +2 -1
- package/dist/core/reload-blockers.d.ts.map +1 -1
- package/dist/core/reload-blockers.js +4 -14
- package/dist/core/reload-blockers.js.map +1 -1
- package/dist/core/request-auth.d.ts.map +1 -1
- package/dist/core/request-auth.js.map +1 -1
- package/dist/core/research/automata-provider.d.ts.map +1 -1
- package/dist/core/research/automata-provider.js.map +1 -1
- package/dist/core/research/evidence-bundle.d.ts +20 -0
- package/dist/core/research/evidence-bundle.d.ts.map +1 -1
- package/dist/core/research/evidence-bundle.js +173 -69
- package/dist/core/research/evidence-bundle.js.map +1 -1
- package/dist/core/research/lane-model-resolver.d.ts.map +1 -1
- package/dist/core/research/lane-model-resolver.js +0 -1
- package/dist/core/research/lane-model-resolver.js.map +1 -1
- package/dist/core/research/model-fitness-controller.d.ts.map +1 -1
- package/dist/core/research/model-fitness-controller.js +17 -33
- package/dist/core/research/model-fitness-controller.js.map +1 -1
- package/dist/core/research/model-fitness.d.ts.map +1 -1
- package/dist/core/research/model-fitness.js +4 -25
- package/dist/core/research/model-fitness.js.map +1 -1
- package/dist/core/research/research-gate.d.ts.map +1 -1
- package/dist/core/research/research-gate.js.map +1 -1
- package/dist/core/research/research-lane-controller.d.ts.map +1 -1
- package/dist/core/research/research-lane-controller.js +5 -10
- package/dist/core/research/research-lane-controller.js.map +1 -1
- package/dist/core/research/research-runner.d.ts +2 -4
- package/dist/core/research/research-runner.d.ts.map +1 -1
- package/dist/core/research/research-runner.js +17 -48
- package/dist/core/research/research-runner.js.map +1 -1
- package/dist/core/research/session-evidence-bundle.d.ts.map +1 -1
- package/dist/core/research/session-evidence-bundle.js.map +1 -1
- package/dist/core/research/workspace-collector.d.ts.map +1 -1
- package/dist/core/research/workspace-collector.js.map +1 -1
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/resource-ignore.d.ts +6 -0
- package/dist/core/resource-ignore.d.ts.map +1 -0
- package/dist/core/resource-ignore.js +44 -0
- package/dist/core/resource-ignore.js.map +1 -0
- package/dist/core/resource-loader.d.ts +0 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +52 -187
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/resource-profile-blocks.d.ts +3 -1
- package/dist/core/resource-profile-blocks.d.ts.map +1 -1
- package/dist/core/resource-profile-blocks.js +8 -5
- package/dist/core/resource-profile-blocks.js.map +1 -1
- package/dist/core/resource-profile-equality.d.ts.map +1 -1
- package/dist/core/resource-profile-equality.js.map +1 -1
- package/dist/core/resource-traversal.d.ts +43 -0
- package/dist/core/resource-traversal.d.ts.map +1 -0
- package/dist/core/resource-traversal.js +84 -0
- package/dist/core/resource-traversal.js.map +1 -0
- package/dist/core/risk-classifier.d.ts.map +1 -1
- package/dist/core/risk-classifier.js.map +1 -1
- package/dist/core/runtime-builder.d.ts +11 -1
- package/dist/core/runtime-builder.d.ts.map +1 -1
- package/dist/core/runtime-builder.js +40 -51
- package/dist/core/runtime-builder.js.map +1 -1
- package/dist/core/scout-controller.d.ts.map +1 -1
- package/dist/core/scout-controller.js +0 -1
- package/dist/core/scout-controller.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/secrets/credential-exposure-guard.d.ts.map +1 -1
- package/dist/core/secrets/credential-exposure-guard.js +70 -44
- package/dist/core/secrets/credential-exposure-guard.js.map +1 -1
- package/dist/core/secrets/secret-dotenv.d.ts.map +1 -1
- package/dist/core/secrets/secret-dotenv.js +0 -1
- package/dist/core/secrets/secret-dotenv.js.map +1 -1
- package/dist/core/secrets/secret-vault-format.d.ts.map +1 -1
- package/dist/core/secrets/secret-vault-format.js +0 -1
- package/dist/core/secrets/secret-vault-format.js.map +1 -1
- package/dist/core/secrets/secret-vault.d.ts.map +1 -1
- package/dist/core/secrets/secret-vault.js +2 -10
- package/dist/core/secrets/secret-vault.js.map +1 -1
- package/dist/core/security/secret-text.d.ts.map +1 -1
- package/dist/core/security/secret-text.js.map +1 -1
- package/dist/core/security/untrusted-boundary.d.ts.map +1 -1
- package/dist/core/security/untrusted-boundary.js.map +1 -1
- package/dist/core/session-analytics.d.ts.map +1 -1
- package/dist/core/session-analytics.js +18 -50
- package/dist/core/session-analytics.js.map +1 -1
- package/dist/core/session-artifact-bundle.d.ts +35 -0
- package/dist/core/session-artifact-bundle.d.ts.map +1 -0
- package/dist/core/session-artifact-bundle.js +61 -0
- package/dist/core/session-artifact-bundle.js.map +1 -0
- package/dist/core/session-cwd.d.ts.map +1 -1
- package/dist/core/session-cwd.js +0 -1
- package/dist/core/session-cwd.js.map +1 -1
- package/dist/core/session-entry-index.d.ts +8 -0
- package/dist/core/session-entry-index.d.ts.map +1 -0
- package/dist/core/session-entry-index.js +16 -0
- package/dist/core/session-entry-index.js.map +1 -0
- package/dist/core/session-image-store.d.ts.map +1 -1
- package/dist/core/session-image-store.js +0 -3
- package/dist/core/session-image-store.js.map +1 -1
- package/dist/core/session-jsonl-writer.d.ts +3 -0
- package/dist/core/session-jsonl-writer.d.ts.map +1 -0
- package/dist/core/session-jsonl-writer.js +38 -0
- package/dist/core/session-jsonl-writer.js.map +1 -0
- package/dist/core/session-manager-factory.d.ts.map +1 -1
- package/dist/core/session-manager-factory.js.map +1 -1
- package/dist/core/session-role.d.ts.map +1 -1
- package/dist/core/session-role.js.map +1 -1
- package/dist/core/session-snapshot.d.ts.map +1 -1
- package/dist/core/session-snapshot.js.map +1 -1
- package/dist/core/session-supervision-runtime.d.ts.map +1 -1
- package/dist/core/session-supervision-runtime.js +1 -4
- package/dist/core/session-supervision-runtime.js.map +1 -1
- package/dist/core/session-tree-navigator.d.ts.map +1 -1
- package/dist/core/session-tree-navigator.js +0 -1
- package/dist/core/session-tree-navigator.js.map +1 -1
- package/dist/core/settings-manager.d.ts +2 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +64 -162
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skill-block.d.mts +8 -0
- package/dist/core/skill-block.mjs +52 -0
- package/dist/core/skill-discovery.d.ts +5 -0
- package/dist/core/skill-discovery.d.ts.map +1 -0
- package/dist/core/skill-discovery.js +34 -0
- package/dist/core/skill-discovery.js.map +1 -0
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +23 -159
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js.map +1 -1
- package/dist/core/spawned-usage.d.ts +21 -0
- package/dist/core/spawned-usage.d.ts.map +1 -0
- package/dist/core/spawned-usage.js +29 -0
- package/dist/core/spawned-usage.js.map +1 -0
- package/dist/core/system-prompt-builder.d.ts +4 -0
- package/dist/core/system-prompt-builder.d.ts.map +1 -1
- package/dist/core/system-prompt-builder.js +15 -8
- package/dist/core/system-prompt-builder.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +52 -35
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tasks/session-task-state.d.ts.map +1 -1
- package/dist/core/tasks/session-task-state.js.map +1 -1
- package/dist/core/tasks/task-command.d.ts.map +1 -1
- package/dist/core/tasks/task-command.js.map +1 -1
- package/dist/core/tasks/task-contract-monitor.d.ts.map +1 -1
- package/dist/core/tasks/task-contract-monitor.js.map +1 -1
- package/dist/core/tasks/task-projection.d.ts.map +1 -1
- package/dist/core/tasks/task-projection.js.map +1 -1
- package/dist/core/tasks/task-state.d.ts.map +1 -1
- package/dist/core/tasks/task-state.js.map +1 -1
- package/dist/core/text-preview.d.ts +4 -0
- package/dist/core/text-preview.d.ts.map +1 -0
- package/dist/core/text-preview.js +33 -0
- package/dist/core/text-preview.js.map +1 -0
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js.map +1 -1
- package/dist/core/tool-capability-policy.d.ts.map +1 -1
- package/dist/core/tool-capability-policy.js.map +1 -1
- package/dist/core/tool-gate-controller.d.ts.map +1 -1
- package/dist/core/tool-gate-controller.js +86 -87
- package/dist/core/tool-gate-controller.js.map +1 -1
- package/dist/core/tool-protocol-controller.d.ts +4 -1
- package/dist/core/tool-protocol-controller.d.ts.map +1 -1
- package/dist/core/tool-protocol-controller.js +19 -23
- package/dist/core/tool-protocol-controller.js.map +1 -1
- package/dist/core/tool-recovery-log-records.d.ts.map +1 -1
- package/dist/core/tool-recovery-log-records.js.map +1 -1
- package/dist/core/tool-recovery-log-worker.d.ts.map +1 -1
- package/dist/core/tool-recovery-log-worker.js.map +1 -1
- package/dist/core/tool-recovery-logger.d.ts.map +1 -1
- package/dist/core/tool-recovery-logger.js +12 -24
- package/dist/core/tool-recovery-logger.js.map +1 -1
- package/dist/core/tool-recovery-stats.d.ts.map +1 -1
- package/dist/core/tool-recovery-stats.js +16 -22
- package/dist/core/tool-recovery-stats.js.map +1 -1
- package/dist/core/tool-repair-health.d.ts.map +1 -1
- package/dist/core/tool-repair-health.js.map +1 -1
- package/dist/core/tool-repair-settings.d.ts.map +1 -1
- package/dist/core/tool-repair-settings.js.map +1 -1
- package/dist/core/tool-selection/expected-utility.d.ts.map +1 -1
- package/dist/core/tool-selection/expected-utility.js.map +1 -1
- package/dist/core/tool-selection/promotion.d.ts.map +1 -1
- package/dist/core/tool-selection/promotion.js.map +1 -1
- package/dist/core/tool-selection/tool-performance-store.d.ts +2 -0
- package/dist/core/tool-selection/tool-performance-store.d.ts.map +1 -1
- package/dist/core/tool-selection/tool-performance-store.js +49 -7
- package/dist/core/tool-selection/tool-performance-store.js.map +1 -1
- package/dist/core/tool-selection/tool-phase-timing.d.ts +19 -0
- package/dist/core/tool-selection/tool-phase-timing.d.ts.map +1 -0
- package/dist/core/tool-selection/tool-phase-timing.js +63 -0
- package/dist/core/tool-selection/tool-phase-timing.js.map +1 -0
- package/dist/core/tool-selection/tool-selection-controller.d.ts +2 -5
- package/dist/core/tool-selection/tool-selection-controller.d.ts.map +1 -1
- package/dist/core/tool-selection/tool-selection-controller.js +50 -30
- package/dist/core/tool-selection/tool-selection-controller.js.map +1 -1
- package/dist/core/toolkit/reflex-interpreter.d.ts +16 -0
- package/dist/core/toolkit/reflex-interpreter.d.ts.map +1 -1
- package/dist/core/toolkit/reflex-interpreter.js +21 -0
- package/dist/core/toolkit/reflex-interpreter.js.map +1 -1
- package/dist/core/toolkit/script-registry.d.ts.map +1 -1
- package/dist/core/toolkit/script-registry.js.map +1 -1
- package/dist/core/toolkit/script-runner.d.ts.map +1 -1
- package/dist/core/toolkit/script-runner.js.map +1 -1
- package/dist/core/tools/artifact-retrieve.d.ts.map +1 -1
- package/dist/core/tools/artifact-retrieve.js.map +1 -1
- package/dist/core/tools/ask-question.d.ts +2 -3
- package/dist/core/tools/ask-question.d.ts.map +1 -1
- package/dist/core/tools/ask-question.js +14 -40
- package/dist/core/tools/ask-question.js.map +1 -1
- package/dist/core/tools/bash.d.ts +2 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +83 -30
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/context-scout.d.ts.map +1 -1
- package/dist/core/tools/context-scout.js.map +1 -1
- package/dist/core/tools/delegate-status.d.ts +6 -1
- package/dist/core/tools/delegate-status.d.ts.map +1 -1
- package/dist/core/tools/delegate-status.js +109 -25
- package/dist/core/tools/delegate-status.js.map +1 -1
- package/dist/core/tools/delegate.d.ts +9 -1
- package/dist/core/tools/delegate.d.ts.map +1 -1
- package/dist/core/tools/delegate.js +329 -67
- package/dist/core/tools/delegate.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/extensionify.d.ts.map +1 -1
- package/dist/core/tools/extensionify.js.map +1 -1
- package/dist/core/tools/fff-search-backend.d.ts +19 -0
- package/dist/core/tools/fff-search-backend.d.ts.map +1 -1
- package/dist/core/tools/fff-search-backend.js +28 -2
- package/dist/core/tools/fff-search-backend.js.map +1 -1
- package/dist/core/tools/file-encoding-policy.d.ts.map +1 -1
- package/dist/core/tools/file-encoding-policy.js.map +1 -1
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -1
- package/dist/core/tools/file-mutation-queue.js.map +1 -1
- package/dist/core/tools/find.d.ts +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +44 -108
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/git-filter.d.ts.map +1 -1
- package/dist/core/tools/git-filter.js.map +1 -1
- package/dist/core/tools/goal.d.ts.map +1 -1
- package/dist/core/tools/goal.js +7 -7
- package/dist/core/tools/goal.js.map +1 -1
- package/dist/core/tools/grep.d.ts +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +42 -102
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +20 -36
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/model-fitness.d.ts.map +1 -1
- package/dist/core/tools/model-fitness.js.map +1 -1
- package/dist/core/tools/orchestration-panel.d.ts +5 -0
- package/dist/core/tools/orchestration-panel.d.ts.map +1 -1
- package/dist/core/tools/orchestration-panel.js +5 -5
- package/dist/core/tools/orchestration-panel.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts +2 -0
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +24 -36
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/path-utils.d.ts.map +1 -1
- package/dist/core/tools/path-utils.js.map +1 -1
- package/dist/core/tools/persistent-process-coordinator.d.ts +31 -0
- package/dist/core/tools/persistent-process-coordinator.d.ts.map +1 -0
- package/dist/core/tools/persistent-process-coordinator.js +123 -0
- package/dist/core/tools/persistent-process-coordinator.js.map +1 -0
- package/dist/core/tools/python.d.ts.map +1 -1
- package/dist/core/tools/python.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +14 -13
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +29 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +31 -1
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/run-process.d.ts +1 -1
- package/dist/core/tools/run-process.d.ts.map +1 -1
- package/dist/core/tools/run-process.js +69 -9
- package/dist/core/tools/run-process.js.map +1 -1
- package/dist/core/tools/run-toolkit-script.d.ts.map +1 -1
- package/dist/core/tools/run-toolkit-script.js.map +1 -1
- package/dist/core/tools/search-command-guard.d.ts +10 -0
- package/dist/core/tools/search-command-guard.d.ts.map +1 -1
- package/dist/core/tools/search-command-guard.js +118 -31
- package/dist/core/tools/search-command-guard.js.map +1 -1
- package/dist/core/tools/search-router.d.ts.map +1 -1
- package/dist/core/tools/search-router.js.map +1 -1
- package/dist/core/tools/search-tool-runtime.d.ts +19 -0
- package/dist/core/tools/search-tool-runtime.d.ts.map +1 -0
- package/dist/core/tools/search-tool-runtime.js +12 -0
- package/dist/core/tools/search-tool-runtime.js.map +1 -0
- package/dist/core/tools/secret-store.d.ts.map +1 -1
- package/dist/core/tools/secret-store.js.map +1 -1
- package/dist/core/tools/shell-command-parser.d.ts.map +1 -1
- package/dist/core/tools/shell-command-parser.js.map +1 -1
- package/dist/core/tools/shell-contract-router.d.ts.map +1 -1
- package/dist/core/tools/shell-contract-router.js +16 -6
- package/dist/core/tools/shell-contract-router.js.map +1 -1
- package/dist/core/tools/shell-execution-session.d.ts +4 -0
- package/dist/core/tools/shell-execution-session.d.ts.map +1 -0
- package/dist/core/tools/shell-execution-session.js +11 -0
- package/dist/core/tools/shell-execution-session.js.map +1 -0
- package/dist/core/tools/shell-output-projection.d.ts +49 -0
- package/dist/core/tools/shell-output-projection.d.ts.map +1 -0
- package/dist/core/tools/shell-output-projection.js +381 -0
- package/dist/core/tools/shell-output-projection.js.map +1 -0
- package/dist/core/tools/shell-session.d.ts +2 -13
- package/dist/core/tools/shell-session.d.ts.map +1 -1
- package/dist/core/tools/shell-session.js +36 -136
- package/dist/core/tools/shell-session.js.map +1 -1
- package/dist/core/tools/skill-audit.d.ts.map +1 -1
- package/dist/core/tools/skill-audit.js.map +1 -1
- package/dist/core/tools/skillify.d.ts.map +1 -1
- package/dist/core/tools/skillify.js.map +1 -1
- package/dist/core/tools/task-steps.d.ts +8 -8
- package/dist/core/tools/task-steps.d.ts.map +1 -1
- package/dist/core/tools/task-steps.js +17 -18
- package/dist/core/tools/task-steps.js.map +1 -1
- package/dist/core/tools/tmux-dispatch.d.ts.map +1 -1
- package/dist/core/tools/tmux-dispatch.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/tool-task.d.ts +23 -0
- package/dist/core/tools/tool-task.d.ts.map +1 -0
- package/dist/core/tools/tool-task.js +93 -0
- package/dist/core/tools/tool-task.js.map +1 -0
- package/dist/core/tools/windows-shell-engine.d.ts +17 -11
- package/dist/core/tools/windows-shell-engine.d.ts.map +1 -1
- package/dist/core/tools/windows-shell-engine.js +339 -117
- package/dist/core/tools/windows-shell-engine.js.map +1 -1
- package/dist/core/tools/windows-shell-state.d.ts.map +1 -1
- package/dist/core/tools/windows-shell-state.js.map +1 -1
- package/dist/core/tools/worktree-sync.d.ts.map +1 -1
- package/dist/core/tools/worktree-sync.js +8 -12
- package/dist/core/tools/worktree-sync.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +0 -1
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +7 -40
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/core/util/atomic-file.d.ts +19 -0
- package/dist/core/util/atomic-file.d.ts.map +1 -1
- package/dist/core/util/atomic-file.js +50 -15
- package/dist/core/util/atomic-file.js.map +1 -1
- package/dist/core/util/bounded-file.d.ts +15 -0
- package/dist/core/util/bounded-file.d.ts.map +1 -0
- package/dist/core/util/bounded-file.js +120 -0
- package/dist/core/util/bounded-file.js.map +1 -0
- package/dist/core/util/bounded-jsonl.d.ts.map +1 -1
- package/dist/core/util/bounded-jsonl.js +112 -9
- package/dist/core/util/bounded-jsonl.js.map +1 -1
- package/dist/core/util/bounded-value.d.ts +3 -0
- package/dist/core/util/bounded-value.d.ts.map +1 -0
- package/dist/core/util/bounded-value.js +12 -0
- package/dist/core/util/bounded-value.js.map +1 -0
- package/dist/core/util/json-size.d.ts +3 -0
- package/dist/core/util/json-size.d.ts.map +1 -0
- package/dist/core/util/json-size.js +95 -0
- package/dist/core/util/json-size.js.map +1 -0
- package/dist/core/util/minimatch-cache.d.ts.map +1 -1
- package/dist/core/util/minimatch-cache.js.map +1 -1
- package/dist/core/util/value-guards.d.ts +2 -0
- package/dist/core/util/value-guards.d.ts.map +1 -1
- package/dist/core/util/value-guards.js +5 -0
- package/dist/core/util/value-guards.js.map +1 -1
- package/dist/core/worktree-sync/codes.d.ts.map +1 -1
- package/dist/core/worktree-sync/git-engine.d.ts.map +1 -1
- package/dist/core/worktree-sync/git-engine.js +20 -36
- package/dist/core/worktree-sync/git-engine.js.map +1 -1
- package/dist/core/worktree-sync/lane-gate.d.ts.map +1 -1
- package/dist/core/worktree-sync/lane-gate.js +1 -4
- package/dist/core/worktree-sync/lane-gate.js.map +1 -1
- package/dist/core/worktree-sync/runtime.d.ts.map +1 -1
- package/dist/core/worktree-sync/runtime.js.map +1 -1
- package/dist/core/worktree-sync/store.d.ts.map +1 -1
- package/dist/core/worktree-sync/store.js.map +1 -1
- package/dist/core/worktree-sync/watcher.d.ts.map +1 -1
- package/dist/core/worktree-sync/watcher.js.map +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 +10 -32
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +6 -19
- package/dist/migrations.js.map +1 -1
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/interactive/auth-dialogs-controller.d.ts +3 -0
- package/dist/modes/interactive/auth-dialogs-controller.d.ts.map +1 -1
- package/dist/modes/interactive/auth-dialogs-controller.js +96 -132
- package/dist/modes/interactive/auth-dialogs-controller.js.map +1 -1
- package/dist/modes/interactive/auto-learn-controller.d.ts +1 -31
- package/dist/modes/interactive/auto-learn-controller.d.ts.map +1 -1
- package/dist/modes/interactive/auto-learn-controller.js +86 -307
- package/dist/modes/interactive/auto-learn-controller.js.map +1 -1
- package/dist/modes/interactive/autocomplete-provider.d.ts.map +1 -1
- package/dist/modes/interactive/autocomplete-provider.js.map +1 -1
- package/dist/modes/interactive/autonomy-commands.d.ts.map +1 -1
- package/dist/modes/interactive/autonomy-commands.js +2 -8
- package/dist/modes/interactive/autonomy-commands.js.map +1 -1
- package/dist/modes/interactive/clipboard-input.d.ts +5 -1
- package/dist/modes/interactive/clipboard-input.d.ts.map +1 -1
- package/dist/modes/interactive/clipboard-input.js +17 -0
- package/dist/modes/interactive/clipboard-input.js.map +1 -1
- package/dist/modes/interactive/compaction-queue.d.ts.map +1 -1
- package/dist/modes/interactive/compaction-queue.js +13 -18
- package/dist/modes/interactive/compaction-queue.js.map +1 -1
- package/dist/modes/interactive/components/activity-lane.d.ts.map +1 -1
- package/dist/modes/interactive/components/activity-lane.js +6 -10
- package/dist/modes/interactive/components/activity-lane.js.map +1 -1
- package/dist/modes/interactive/components/armin.d.ts +1 -0
- package/dist/modes/interactive/components/armin.d.ts.map +1 -1
- package/dist/modes/interactive/components/armin.js +10 -21
- package/dist/modes/interactive/components/armin.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +1 -6
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +4 -9
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.js +0 -3
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +3 -8
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +13 -35
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +3 -8
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +14 -36
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts +1 -0
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +20 -43
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.js +0 -5
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +2 -0
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +4 -8
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +1 -6
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -1
- package/dist/modes/interactive/components/daxnuts.js +6 -8
- package/dist/modes/interactive/components/daxnuts.js.map +1 -1
- package/dist/modes/interactive/components/diff.d.ts.map +1 -1
- package/dist/modes/interactive/components/diff.js.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.js +0 -1
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.js.map +1 -1
- package/dist/modes/interactive/components/expandable-markdown-message.d.ts +21 -0
- package/dist/modes/interactive/components/expandable-markdown-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/expandable-markdown-message.js +48 -0
- package/dist/modes/interactive/components/expandable-markdown-message.js.map +1 -0
- package/dist/modes/interactive/components/expandable-text.d.ts.map +1 -1
- package/dist/modes/interactive/components/expandable-text.js +0 -2
- package/dist/modes/interactive/components/expandable-text.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +1 -9
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.js +2 -8
- package/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +5 -20
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/fitness-role-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/fitness-role-selector.js +0 -1
- package/dist/modes/interactive/components/fitness-role-selector.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +1 -5
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +4 -10
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +2 -2
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +21 -44
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/model-suggestion-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-suggestion-selector.js +0 -1
- package/dist/modes/interactive/components/model-suggestion-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +16 -32
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/profile-resource-editor.d.ts +3 -4
- package/dist/modes/interactive/components/profile-resource-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/profile-resource-editor.js +34 -93
- package/dist/modes/interactive/components/profile-resource-editor.js.map +1 -1
- package/dist/modes/interactive/components/profile-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/profile-selector.js +0 -1
- package/dist/modes/interactive/components/profile-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +3 -4
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +34 -79
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/selector-list.d.ts +63 -0
- package/dist/modes/interactive/components/selector-list.d.ts.map +1 -0
- package/dist/modes/interactive/components/selector-list.js +186 -0
- package/dist/modes/interactive/components/selector-list.js.map +1 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +61 -103
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +40 -138
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts +2 -4
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.js +9 -28
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +3 -8
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +12 -40
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/theme-selector.d.ts +2 -5
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/theme-selector.js +11 -37
- package/dist/modes/interactive/components/theme-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts +2 -4
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +9 -31
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +9 -28
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tool-group.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-group.js +2 -3
- package/dist/modes/interactive/components/tool-group.js.map +1 -1
- package/dist/modes/interactive/components/tool-panel-registry.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-panel-registry.js +5 -3
- package/dist/modes/interactive/components/tool-panel-registry.js.map +1 -1
- package/dist/modes/interactive/components/tool-title.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-title.js +0 -4
- package/dist/modes/interactive/components/tool-title.js.map +1 -1
- package/dist/modes/interactive/components/transcript-pager.d.ts +26 -0
- package/dist/modes/interactive/components/transcript-pager.d.ts.map +1 -0
- package/dist/modes/interactive/components/transcript-pager.js +81 -0
- package/dist/modes/interactive/components/transcript-pager.js.map +1 -0
- package/dist/modes/interactive/components/tree-selector.d.ts +1 -12
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +42 -402
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/trust-selector.js +4 -16
- package/dist/modes/interactive/components/trust-selector.js.map +1 -1
- package/dist/modes/interactive/components/usage-action-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/usage-action-selector.js +2 -10
- package/dist/modes/interactive/components/usage-action-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +3 -6
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +0 -1
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/config-backup.d.ts.map +1 -1
- package/dist/modes/interactive/config-backup.js.map +1 -1
- package/dist/modes/interactive/editor-overlay-host.d.ts.map +1 -1
- package/dist/modes/interactive/editor-overlay-host.js +0 -3
- package/dist/modes/interactive/editor-overlay-host.js.map +1 -1
- package/dist/modes/interactive/extension-ui-host.d.ts +2 -0
- package/dist/modes/interactive/extension-ui-host.d.ts.map +1 -1
- package/dist/modes/interactive/extension-ui-host.js +51 -72
- package/dist/modes/interactive/extension-ui-host.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +2 -15
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/history-reload-math.d.ts.map +1 -1
- package/dist/modes/interactive/history-reload-math.js.map +1 -1
- package/dist/modes/interactive/interactive-event-controller.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-event-controller.js +23 -16
- package/dist/modes/interactive/interactive-event-controller.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +13 -4
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +123 -204
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/interactive-selection-prompts.d.ts +20 -0
- package/dist/modes/interactive/interactive-selection-prompts.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-selection-prompts.js +43 -0
- package/dist/modes/interactive/interactive-selection-prompts.js.map +1 -0
- package/dist/modes/interactive/key-handlers.d.ts +2 -1
- package/dist/modes/interactive/key-handlers.d.ts.map +1 -1
- package/dist/modes/interactive/key-handlers.js +4 -2
- package/dist/modes/interactive/key-handlers.js.map +1 -1
- package/dist/modes/interactive/loaded-resources-view.d.ts.map +1 -1
- package/dist/modes/interactive/loaded-resources-view.js.map +1 -1
- package/dist/modes/interactive/local-model-commands.d.ts.map +1 -1
- package/dist/modes/interactive/local-model-commands.js +4 -9
- package/dist/modes/interactive/local-model-commands.js.map +1 -1
- package/dist/modes/interactive/model-fitness-presentation.d.ts +21 -0
- package/dist/modes/interactive/model-fitness-presentation.d.ts.map +1 -0
- package/dist/modes/interactive/model-fitness-presentation.js +13 -0
- package/dist/modes/interactive/model-fitness-presentation.js.map +1 -0
- package/dist/modes/interactive/profile-menu-controller.d.ts +2 -0
- package/dist/modes/interactive/profile-menu-controller.d.ts.map +1 -1
- package/dist/modes/interactive/profile-menu-controller.js +79 -171
- package/dist/modes/interactive/profile-menu-controller.js.map +1 -1
- package/dist/modes/interactive/report-commands.d.ts +2 -0
- package/dist/modes/interactive/report-commands.d.ts.map +1 -1
- package/dist/modes/interactive/report-commands.js +12 -6
- package/dist/modes/interactive/report-commands.js.map +1 -1
- package/dist/modes/interactive/resource-display.d.ts.map +1 -1
- package/dist/modes/interactive/resource-display.js.map +1 -1
- package/dist/modes/interactive/resource-shell-commands.d.ts.map +1 -1
- package/dist/modes/interactive/resource-shell-commands.js +6 -23
- package/dist/modes/interactive/resource-shell-commands.js.map +1 -1
- package/dist/modes/interactive/session-flow-commands.d.ts.map +1 -1
- package/dist/modes/interactive/session-flow-commands.js +21 -25
- package/dist/modes/interactive/session-flow-commands.js.map +1 -1
- package/dist/modes/interactive/session-io-commands.d.ts.map +1 -1
- package/dist/modes/interactive/session-io-commands.js.map +1 -1
- package/dist/modes/interactive/session-replacement-errors.d.ts.map +1 -1
- package/dist/modes/interactive/session-replacement-errors.js.map +1 -1
- package/dist/modes/interactive/settings-selector-flow.d.ts.map +1 -1
- package/dist/modes/interactive/settings-selector-flow.js.map +1 -1
- package/dist/modes/interactive/signal-lifecycle.d.ts.map +1 -1
- package/dist/modes/interactive/signal-lifecycle.js.map +1 -1
- package/dist/modes/interactive/startup-checks.d.ts.map +1 -1
- package/dist/modes/interactive/startup-checks.js +12 -8
- package/dist/modes/interactive/startup-checks.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +10 -76
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/interactive/usage-commands.d.ts.map +1 -1
- package/dist/modes/interactive/usage-commands.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +5 -22
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/jsonl.d.ts.map +1 -1
- package/dist/modes/rpc/jsonl.js +1 -1
- package/dist/modes/rpc/jsonl.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +7 -8
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +5 -20
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/modes/termination-signals.d.ts +4 -0
- package/dist/modes/termination-signals.d.ts.map +1 -0
- package/dist/modes/termination-signals.js +21 -0
- package/dist/modes/termination-signals.js.map +1 -0
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/ansi-colors.d.ts +5 -0
- package/dist/utils/ansi-colors.d.ts.map +1 -0
- package/dist/utils/ansi-colors.js +38 -0
- package/dist/utils/ansi-colors.js.map +1 -0
- package/dist/utils/ansi.d.ts.map +1 -1
- package/dist/utils/ansi.js.map +1 -1
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard-native.d.ts.map +1 -1
- package/dist/utils/clipboard-native.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/deprecation.d.ts.map +1 -1
- package/dist/utils/deprecation.js.map +1 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/external-editor-command.d.ts.map +1 -1
- package/dist/utils/external-editor-command.js.map +1 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/fs-watch.d.ts.map +1 -1
- package/dist/utils/fs-watch.js.map +1 -1
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js +20 -28
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/highlight-js-languages.d.ts.map +1 -1
- package/dist/utils/html.d.ts.map +1 -1
- package/dist/utils/html.js.map +1 -1
- package/dist/utils/image-convert.d.ts.map +1 -1
- package/dist/utils/image-convert.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/image-resize-worker.d.ts.map +1 -1
- package/dist/utils/image-resize-worker.js.map +1 -1
- package/dist/utils/image-resize.d.ts.map +1 -1
- package/dist/utils/image-resize.js.map +1 -1
- package/dist/utils/json.d.ts.map +1 -1
- package/dist/utils/json.js.map +1 -1
- package/dist/utils/mime.d.ts.map +1 -1
- package/dist/utils/mime.js.map +1 -1
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/photon.d.ts.map +1 -1
- package/dist/utils/photon.js.map +1 -1
- package/dist/utils/pi-user-agent.d.ts.map +1 -1
- package/dist/utils/pi-user-agent.js.map +1 -1
- package/dist/utils/platform.d.ts.map +1 -1
- package/dist/utils/platform.js.map +1 -1
- package/dist/utils/process-memory.d.ts.map +1 -1
- package/dist/utils/process-memory.js.map +1 -1
- package/dist/utils/safe-write-stream.d.ts.map +1 -1
- package/dist/utils/safe-write-stream.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/sleep.d.ts.map +1 -1
- package/dist/utils/sleep.js +2 -15
- package/dist/utils/sleep.js.map +1 -1
- package/dist/utils/stdin-events.d.ts +8 -0
- package/dist/utils/stdin-events.d.ts.map +1 -0
- package/dist/utils/stdin-events.js +19 -0
- package/dist/utils/stdin-events.js.map +1 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +20 -13
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js.map +1 -1
- package/dist/utils/windows-self-update.d.ts.map +1 -1
- package/dist/utils/windows-self-update.js.map +1 -1
- package/dist/utils/work-directory.d.ts.map +1 -1
- package/dist/utils/work-directory.js.map +1 -1
- package/docs/compaction.md +11 -3
- package/docs/sessions.md +6 -0
- package/docs/settings.md +1 -1
- package/docs/tool-repair.md +3 -0
- package/docs/windows.md +29 -2
- package/docs/work-directory.md +9 -1
- 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/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +16 -16
- package/package.json +10 -10
- package/dist/utils/streaming-lines.d.ts +0 -20
- package/dist/utils/streaming-lines.d.ts.map +0 -1
- package/dist/utils/streaming-lines.js +0 -79
- package/dist/utils/streaming-lines.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell-contract-router.js","sourceRoot":"","sources":["../../../src/core/tools/shell-contract-router.ts"],"names":[],"mappings":"AAMA,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AAQlE,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC;IACrC,MAAM;IACN,IAAI;IACJ,KAAK;IACL,MAAM;IACN,KAAK;IACL,SAAS;IACT,YAAY;IACZ,gBAAgB;IAChB,MAAM;IACN,UAAU;IACV,KAAK;IACL,SAAS;CACT,CAAC,CAAC;AACH,MAAM,4BAA4B,GACjC,iMAAiM,CAAC;AAEnM,SAAS,uBAAuB,CAAC,OAAe,EAAkB;IACjE,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,IAAI,YAAY,GAAG,KAAK,CAAC;IACzB,IAAI,KAAsC,CAAC;IAC3C,IAAI,QAAQ,GAAG,KAAK,CAAC;IAErB,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,YAAY;YAAE,OAAO;QAC1B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjB,KAAK,GAAG,EAAE,CA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CAAC,WAAW,CAAC,EAAE,CAAC;QAC7D,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC;IAC3C,CAAC;IAED,IAAI,qBAAqB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;QAC5C,OAAO;YACN,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,+EAA+E;SACtF,CAAC;IACH,CAAC;IACD,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,OAAO;QAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACnE,IAAI,oBAAoB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;QAC3C,wFAAwF;QACxF,yCAAwC;QACxC,IAAI,YAAY;YAAE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC;QAC5D,OAAO;YACN,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,eAAe,IAAI,CAAC,CAAC,CAAC,0FAA0F;SACvH,CAAC;IACH,CAAC;IACD,IAAI,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAClE,OAAO;YACN,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,6EAA6E;SACpF,CAAC;IACH,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC;AAAA,CACpE","sourcesContent":["export type ShellContractRoute =\n\t| { kind: \"passthrough\"; command: string }\n\t| { kind: \"powershell\"; command: string; argv: readonly string[] }\n\t| { kind: \"python-engine\"; command: string }\n\t| { kind: \"unsupported\"; error: string };\n\nconst STATE_MUTATOR_BUILTINS = new Set([\"cd\", \"export\", \"unset\"]);\n\ninterface TokenizeResult {\n\tok: boolean;\n\targv?: string[];\n\terror?: string;\n}\n\nconst BLOCKED_NESTED_SHELLS = new Set([\n\t\"bash\",\n\t\"sh\",\n\t\"zsh\",\n\t\"fish\",\n\t\"cmd\",\n\t\"cmd.exe\",\n\t\"powershell\",\n\t\"powershell.exe\",\n\t\"pwsh\",\n\t\"pwsh.exe\",\n\t\"wsl\",\n\t\"wsl.exe\",\n]);\nconst UNSUPPORTED_OPERATOR_MESSAGE =\n\t\"Unsupported Bash construct on Windows. Use one simple command per call; pipelines, redirection, command substitution, variable expansion, shell chaining, and nested shells are not translated.\";\n\nfunction tokenizePortableCommand(command: string): TokenizeResult {\n\tconst argv: string[] = [];\n\tlet token = \"\";\n\tlet tokenStarted = false;\n\tlet quote: \"single\" | \"double\" | undefined;\n\tlet escaping = false;\n\n\tconst finishToken = () => {\n\t\tif (!tokenStarted) return;\n\t\targv.push(token);\n\t\ttoken = \"\";\n\t\ttokenStarted = false;\n\t};\n\n\tconst source = command.trim();\n\tfor (let index = 0; index < source.length; index++) {\n\t\tconst character = source[index];\n\t\tconst nextCharacter = source[index + 1];\n\t\tif (escaping) {\n\t\t\ttoken += character;\n\t\t\ttokenStarted = true;\n\t\t\tescaping = false;\n\t\t\tcontinue;\n\t\t}\n\t\tif (quote === \"single\") {\n\t\t\tif (character === \"'\") quote = undefined;\n\t\t\telse token += character;\n\t\t\ttokenStarted = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (quote === \"double\") {\n\t\t\tif (character === '\"') {\n\t\t\t\tquote = undefined;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (character === \"\\\\\") {\n\t\t\t\tif (nextCharacter && '\"$`\\\\'.includes(nextCharacter)) {\n\t\t\t\t\ttoken += nextCharacter;\n\t\t\t\t\ttokenStarted = true;\n\t\t\t\t\tindex++;\n\t\t\t\t} else {\n\t\t\t\t\ttoken += character;\n\t\t\t\t\ttokenStarted = true;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (character === \"$\" || character === \"`\") {\n\t\t\t\treturn { ok: false, error: UNSUPPORTED_OPERATOR_MESSAGE };\n\t\t\t}\n\t\t\ttoken += character;\n\t\t\ttokenStarted = true;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (character === \"'\") {\n\t\t\tquote = \"single\";\n\t\t\ttokenStarted = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (character === '\"') {\n\t\t\tquote = \"double\";\n\t\t\ttokenStarted = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (character === \"\\\\\") {\n\t\t\tif (/^[A-Za-z]:/u.test(token) || token.startsWith(\"\\\\\\\\\")) {\n\t\t\t\ttoken += character;\n\t\t\t\ttokenStarted = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (token === \"\" && nextCharacter === \"\\\\\") {\n\t\t\t\ttoken = \"\\\\\\\\\";\n\t\t\t\ttokenStarted = true;\n\t\t\t\tindex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tescaping = true;\n\t\t\ttokenStarted = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (/\\s/u.test(character)) {\n\t\t\tfinishToken();\n\t\t\tcontinue;\n\t\t}\n\t\tif (\"|><&;\\n\\r$`(){}*?[]\".includes(character) || character === \"#\" || (character === \"~\" && token === \"\")) {\n\t\t\treturn { ok: false, error: UNSUPPORTED_OPERATOR_MESSAGE };\n\t\t}\n\t\ttoken += character;\n\t\ttokenStarted = true;\n\t}\n\n\tif (escaping) return { ok: false, error: \"Unsupported trailing escape in Bash-like command.\" };\n\tif (quote) return { ok: false, error: \"Unclosed quote in Bash-like command.\" };\n\tfinishToken();\n\treturn argv.length > 0 ? { ok: true, argv } : { ok: false, error: \"Shell command is empty.\" };\n}\n\nfunction quotePowerShell(value: string): string {\n\treturn `'${value.replaceAll(\"'\", \"''\")}'`;\n}\n\nfunction powershellArray(values: readonly string[]): string {\n\treturn `@(${values.map(quotePowerShell).join(\", \")})`;\n}\n\nfunction externalCommand(argv: readonly string[]): string {\n\tconst invocation = `& ${argv.map(quotePowerShell).join(\" \")}`;\n\treturn `${invocation}\\nif ($null -ne $LASTEXITCODE) { exit $LASTEXITCODE }\\nif (-not $?) { exit 1 }`;\n}\n\nfunction parseFlags(\n\targv: readonly string[],\n\tallowedFlags: ReadonlySet<string>,\n): { flags: Set<string>; operands: string[] } | undefined {\n\tconst flags = new Set<string>();\n\tconst operands: string[] = [];\n\tlet optionsEnded = false;\n\tfor (const value of argv) {\n\t\tif (!optionsEnded && value === \"--\") {\n\t\t\toptionsEnded = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (!optionsEnded && value.startsWith(\"-\") && value !== \"-\") {\n\t\t\tif (!allowedFlags.has(value)) return undefined;\n\t\t\tflags.add(value);\n\t\t\tcontinue;\n\t\t}\n\t\toperands.push(value);\n\t}\n\treturn { flags, operands };\n}\n\nfunction routeLs(argv: readonly string[]): string | undefined {\n\tconst parsed = parseFlags(argv.slice(1), new Set([\"-a\", \"-A\", \"-l\", \"-1\", \"-la\", \"-al\"]));\n\tif (!parsed || parsed.operands.length > 1) return undefined;\n\tconst target = parsed.operands[0] ?? \".\";\n\tconst includeHidden = [...parsed.flags].some((flag) => flag.includes(\"a\") || flag.includes(\"A\"));\n\tconst hiddenFilter = includeHidden ? \"\" : \" | Where-Object { -not $_.Name.StartsWith('.') }\";\n\treturn `[string[]]$items = @(Get-ChildItem -LiteralPath ${quotePowerShell(target)}${includeHidden ? \" -Force\" : \"\"} -ErrorAction Stop${hiddenFilter} | ForEach-Object { if ($_.PSIsContainer) { $_.Name + '/' } else { $_.Name } }); [Array]::Sort($items, [StringComparer]::Ordinal); $items`;\n}\n\nfunction routeCat(argv: readonly string[]): string | undefined {\n\tconst parsed = parseFlags(argv.slice(1), new Set([\"--\"]));\n\tif (!parsed || parsed.operands.length === 0) return undefined;\n\treturn `foreach ($path in ${powershellArray(parsed.operands)}) { [Console]::Out.Write([IO.File]::ReadAllText($path)) }`;\n}\n\nfunction routeHeadOrTail(argv: readonly string[], tail: boolean): string | undefined {\n\tlet count = 10;\n\tlet operands = argv.slice(1);\n\tif (operands[0] === \"-n\") {\n\t\tconst parsedCount = Number(operands[1]);\n\t\tif (!Number.isInteger(parsedCount) || parsedCount < 0) return undefined;\n\t\tcount = parsedCount;\n\t\toperands = operands.slice(2);\n\t}\n\tif (operands.length !== 1 || operands[0].startsWith(\"-\")) return undefined;\n\treturn `Get-Content -LiteralPath ${quotePowerShell(operands[0])} ${tail ? \"-Tail\" : \"-TotalCount\"} ${count} -ErrorAction Stop`;\n}\n\nfunction routeGrep(argv: readonly string[]): string | undefined {\n\tif (argv.length !== 3 || argv[1].startsWith(\"-\") || argv[2].startsWith(\"-\")) return undefined;\n\treturn `[string[]]$matches = @(Select-String -LiteralPath ${quotePowerShell(argv[2])} -Pattern ${quotePowerShell(argv[1])} -CaseSensitive -ErrorAction Stop | ForEach-Object { $_.Line }); if ($matches.Count -eq 0) { exit 1 }; $matches`;\n}\n\nfunction routeFind(argv: readonly string[]): string | undefined {\n\tlet searchPath = \".\";\n\tlet type: \"File\" | \"Directory\" | undefined;\n\tlet filter: string | undefined;\n\tlet index = 1;\n\tif (argv[index] && !argv[index].startsWith(\"-\")) searchPath = argv[index++];\n\twhile (index < argv.length) {\n\t\tconst option = argv[index++];\n\t\tif (option === \"-type\" && (argv[index] === \"f\" || argv[index] === \"d\")) {\n\t\t\ttype = argv[index++] === \"f\" ? \"File\" : \"Directory\";\n\t\t\tcontinue;\n\t\t}\n\t\tif (option === \"-name\" && argv[index]) {\n\t\t\tfilter = argv[index++];\n\t\t\tcontinue;\n\t\t}\n\t\treturn undefined;\n\t}\n\tconst typeFlag = type ? ` -${type}` : \"\";\n\tconst filterFlag = filter ? ` -Filter ${quotePowerShell(filter)}` : \"\";\n\treturn `[string[]]$paths = @(Get-ChildItem -LiteralPath ${quotePowerShell(searchPath)} -Recurse -Force${typeFlag}${filterFlag} -ErrorAction Stop | ForEach-Object { $_.FullName.Replace('\\\\', '/') }); [Array]::Sort($paths, [StringComparer]::Ordinal); $paths`;\n}\n\nfunction routeRemove(argv: readonly string[]): string | undefined {\n\tconst parsed = parseFlags(argv.slice(1), new Set([\"-f\", \"-r\", \"-rf\", \"-fr\"]));\n\tif (!parsed || parsed.operands.length === 0) return undefined;\n\tconst recursive = [...parsed.flags].some((flag) => flag.includes(\"r\"));\n\tconst force = [...parsed.flags].some((flag) => flag.includes(\"f\"));\n\treturn `foreach ($path in ${powershellArray(parsed.operands)}) { if (Test-Path -LiteralPath $path) { Remove-Item -LiteralPath $path -Force${recursive ? \" -Recurse\" : \"\"} -ErrorAction Stop }${force ? \"\" : ' else { throw \"rm: path not found: $path\" }'} }`;\n}\n\nfunction routeCopyOrMove(argv: readonly string[], move: boolean): string | undefined {\n\tconst parsed = parseFlags(argv.slice(1), move ? new Set<string>() : new Set([\"-r\", \"-R\"]));\n\tif (!parsed || parsed.operands.length !== 2) return undefined;\n\tconst [source, destination] = parsed.operands;\n\tconst recurse = !move && parsed.flags.size > 0 ? \" -Recurse\" : \"\";\n\tconst rejectDirectoryWithoutRecursion =\n\t\t!move && parsed.flags.size === 0\n\t\t\t? `$sourceItem = Get-Item -LiteralPath ${quotePowerShell(source)} -Force -ErrorAction Stop; if ($sourceItem.PSIsContainer) { throw 'cp: source is a directory; use -r' }; `\n\t\t\t: \"\";\n\treturn `${rejectDirectoryWithoutRecursion}${move ? \"Move-Item\" : \"Copy-Item\"} -LiteralPath ${quotePowerShell(source)} -Destination ${quotePowerShell(destination)}${recurse} -ErrorAction Stop`;\n}\n\nfunction routeMkdir(argv: readonly string[]): string | undefined {\n\tconst parsed = parseFlags(argv.slice(1), new Set([\"-p\"]));\n\tif (!parsed || parsed.operands.length === 0) return undefined;\n\treturn `${powershellArray(parsed.operands)} | ForEach-Object { New-Item -ItemType Directory -Path $_${parsed.flags.has(\"-p\") ? \" -Force\" : \"\"} -ErrorAction Stop | Out-Null }`;\n}\n\nfunction routeTouch(argv: readonly string[]): string | undefined {\n\tconst parsed = parseFlags(argv.slice(1), new Set());\n\tif (!parsed || parsed.operands.length === 0) return undefined;\n\treturn `${powershellArray(parsed.operands)} | ForEach-Object { if (Test-Path -LiteralPath $_) { (Get-Item -LiteralPath $_ -ErrorAction Stop).LastWriteTime = Get-Date } else { New-Item -ItemType File -Path $_ -ErrorAction Stop | Out-Null } }`;\n}\n\nfunction routeBuiltIn(argv: readonly string[]): string | undefined {\n\tconst command = argv[0].toLowerCase();\n\tif (command === \"pwd\" && argv.length === 1) return \"(Get-Location).Path\";\n\tif (command === \"echo\") {\n\t\tlet valueIndex = 1;\n\t\twhile (/^-n+$/u.test(argv[valueIndex] ?? \"\")) valueIndex++;\n\t\tif (/^-[neE]+$/u.test(argv[valueIndex] ?? \"\") && /[eE]/u.test(argv[valueIndex] ?? \"\")) return undefined;\n\t\tconst method = valueIndex > 1 ? \"Write\" : \"WriteLine\";\n\t\treturn `[Console]::Out.${method}((${powershellArray(argv.slice(valueIndex))} -join ' '))`;\n\t}\n\tif (command === \"true\" && argv.length === 1) return \"exit 0\";\n\tif (command === \"false\" && argv.length === 1) return \"exit 1\";\n\tif (command === \"which\" && argv.length === 2) {\n\t\treturn `(Get-Command -Name ${quotePowerShell(argv[1])} -CommandType Application -ErrorAction Stop).Source`;\n\t}\n\tif (command === \"ls\") return routeLs(argv);\n\tif (command === \"cat\") return routeCat(argv);\n\tif (command === \"head\") return routeHeadOrTail(argv, false);\n\tif (command === \"tail\") return routeHeadOrTail(argv, true);\n\tif (command === \"grep\") return routeGrep(argv);\n\tif (command === \"find\") return routeFind(argv);\n\tif (command === \"rm\") return routeRemove(argv);\n\tif (command === \"cp\") return routeCopyOrMove(argv, false);\n\tif (command === \"mv\") return routeCopyOrMove(argv, true);\n\tif (command === \"mkdir\") return routeMkdir(argv);\n\tif (command === \"touch\") return routeTouch(argv);\n\treturn undefined;\n}\n\nconst ROUTED_BUILTIN_NAMES = new Set([\n\t\"pwd\",\n\t\"echo\",\n\t\"true\",\n\t\"false\",\n\t\"which\",\n\t\"ls\",\n\t\"cat\",\n\t\"head\",\n\t\"tail\",\n\t\"grep\",\n\t\"find\",\n\t\"rm\",\n\t\"cp\",\n\t\"mv\",\n\t\"mkdir\",\n\t\"touch\",\n]);\n\nexport function routeShellContract(\n\tcommand: string,\n\tplatform: NodeJS.Platform = process.platform,\n\toptions?: { pythonEngine?: boolean },\n): ShellContractRoute {\n\tif (platform !== \"win32\") return { kind: \"passthrough\", command };\n\tconst pythonEngine = options?.pythonEngine === true;\n\tconst tokenized = tokenizePortableCommand(command);\n\n\t// Complex constructs (pipelines, redirection, expansion, quoting the tokenizer refuses, …) are\n\t// exactly the grammar the Python engine owns; with the engine off this is the original\n\t// fail-closed floor verbatim.\n\tif (!tokenized.ok || !tokenized.argv) {\n\t\tif (pythonEngine) return { kind: \"python-engine\", command };\n\t\treturn { kind: \"unsupported\", error: tokenized.error ?? UNSUPPORTED_OPERATOR_MESSAGE };\n\t}\n\n\tconst argv = tokenized.argv;\n\tconst commandName = argv[0].toLowerCase();\n\n\t// Inline env assignments (`NAME=value [cmd]`) are a state-mutating/expansion form the engine\n\t// supports (§2.1); with the engine off this is the original fail-closed floor verbatim.\n\tif (/^[A-Za-z_][A-Za-z0-9_]*=/u.test(argv[0])) {\n\t\tif (pythonEngine) return { kind: \"python-engine\", command };\n\t\treturn {\n\t\t\tkind: \"unsupported\",\n\t\t\terror: \"Inline environment assignments are not supported. Configure the environment outside the shell command.\",\n\t\t};\n\t}\n\n\t// State mutators route to the engine unconditionally when it is enabled: the engine is the\n\t// sole state owner (D4), so `cd`/`export`/`unset` never execute against the PS floor.\n\tif (pythonEngine && STATE_MUTATOR_BUILTINS.has(commandName)) {\n\t\treturn { kind: \"python-engine\", command };\n\t}\n\n\tif (BLOCKED_NESTED_SHELLS.has(commandName)) {\n\t\treturn {\n\t\t\tkind: \"unsupported\",\n\t\t\terror: \"Nested shell execution is not supported by the Windows shell contract router.\",\n\t\t};\n\t}\n\tconst builtIn = routeBuiltIn(argv);\n\tif (builtIn) return { kind: \"powershell\", command: builtIn, argv };\n\tif (ROUTED_BUILTIN_NAMES.has(commandName)) {\n\t\t// The PS floor rejected the FORM (flags/argument shape); the engine supports the fuller\n\t\t// flag set for the same builtin (§2.2).\n\t\tif (pythonEngine) return { kind: \"python-engine\", command };\n\t\treturn {\n\t\t\tkind: \"unsupported\",\n\t\t\terror: `Unsupported ${argv[0]} form on Windows. Use a simpler Bash-like form or Pi's dedicated read/search/edit tools.`,\n\t\t};\n\t}\n\tif (commandName.endsWith(\".sh\") || commandName.includes(\"/bin/\")) {\n\t\treturn {\n\t\t\tkind: \"unsupported\",\n\t\t\terror: \"POSIX shell scripts are not supported by the Windows shell contract router.\",\n\t\t};\n\t}\n\treturn { kind: \"powershell\", command: externalCommand(argv), argv };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"shell-contract-router.js","sourceRoot":"","sources":["../../../src/core/tools/shell-contract-router.ts"],"names":[],"mappings":"AAMA,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAQzE,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC;IACrC,MAAM;IACN,IAAI;IACJ,KAAK;IACL,MAAM;IACN,KAAK;IACL,SAAS;IACT,YAAY;IACZ,gBAAgB;IAChB,MAAM;IACN,UAAU;IACV,KAAK;IACL,SAAS;CACT,CAAC,CAAC;AACH,MAAM,4BAA4B,GACjC,iMAAiM,CAAC;AAEnM,SAAS,uBAAuB,CAAC,OAAe;IAC/C,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,IAAI,YAAY,GAAG,KAAK,CAAC;IACzB,IAAI,KAAsC,CAAC;IAC3C,IAAI,QAAQ,GAAG,KAAK,CAAC;IAErB,MAAM,WAAW,GAAG,GAAG,EAAE;QACxB,IAAI,CAAC,YAAY;YAAE,OAAO;QAC1B,IAAI,CAAC,IAAI,CAAC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E,IAAI,EAAE,CAAC;AACrE,CAAC","sourcesContent":["export type ShellContractRoute =\n\t| { kind: \"passthrough\"; command: string }\n\t| { kind: \"powershell\"; command: string; argv: readonly string[] }\n\t| { kind: \"python-engine\"; command: string }\n\t| { kind: \"unsupported\"; error: string };\n\nconst ENGINE_OWNED_BUILTINS = new Set([\"cd\", \"export\", \"unset\", \"exit\"]);\n\ninterface TokenizeResult {\n\tok: boolean;\n\targv?: string[];\n\terror?: string;\n}\n\nconst BLOCKED_NESTED_SHELLS = new Set([\n\t\"bash\",\n\t\"sh\",\n\t\"zsh\",\n\t\"fish\",\n\t\"cmd\",\n\t\"cmd.exe\",\n\t\"powershell\",\n\t\"powershell.exe\",\n\t\"pwsh\",\n\t\"pwsh.exe\",\n\t\"wsl\",\n\t\"wsl.exe\",\n]);\nconst UNSUPPORTED_OPERATOR_MESSAGE =\n\t\"Unsupported Bash construct on Windows. Use one simple command per call; pipelines, redirection, command substitution, variable expansion, shell chaining, and nested shells are not translated.\";\n\nfunction tokenizePortableCommand(command: string): TokenizeResult {\n\tconst argv: string[] = [];\n\tlet token = \"\";\n\tlet tokenStarted = false;\n\tlet quote: \"single\" | \"double\" | undefined;\n\tlet escaping = false;\n\n\tconst finishToken = () => {\n\t\tif (!tokenStarted) return;\n\t\targv.push(token);\n\t\ttoken = \"\";\n\t\ttokenStarted = false;\n\t};\n\n\tconst source = command.trim();\n\tfor (let index = 0; index < source.length; index++) {\n\t\tconst character = source[index];\n\t\tconst nextCharacter = source[index + 1];\n\t\tif (escaping) {\n\t\t\ttoken += character;\n\t\t\ttokenStarted = true;\n\t\t\tescaping = false;\n\t\t\tcontinue;\n\t\t}\n\t\tif (quote === \"single\") {\n\t\t\tif (character === \"'\") quote = undefined;\n\t\t\telse token += character;\n\t\t\ttokenStarted = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (quote === \"double\") {\n\t\t\tif (character === '\"') {\n\t\t\t\tquote = undefined;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (character === \"\\\\\") {\n\t\t\t\tif (nextCharacter && '\"$`\\\\'.includes(nextCharacter)) {\n\t\t\t\t\ttoken += nextCharacter;\n\t\t\t\t\ttokenStarted = true;\n\t\t\t\t\tindex++;\n\t\t\t\t} else {\n\t\t\t\t\ttoken += character;\n\t\t\t\t\ttokenStarted = true;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (character === \"$\" || character === \"`\") {\n\t\t\t\treturn { ok: false, error: UNSUPPORTED_OPERATOR_MESSAGE };\n\t\t\t}\n\t\t\ttoken += character;\n\t\t\ttokenStarted = true;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (character === \"'\") {\n\t\t\tquote = \"single\";\n\t\t\ttokenStarted = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (character === '\"') {\n\t\t\tquote = \"double\";\n\t\t\ttokenStarted = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (character === \"\\\\\") {\n\t\t\tif (/^[A-Za-z]:/u.test(token) || token.startsWith(\"\\\\\\\\\")) {\n\t\t\t\ttoken += character;\n\t\t\t\ttokenStarted = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (token === \"\" && nextCharacter === \"\\\\\") {\n\t\t\t\ttoken = \"\\\\\\\\\";\n\t\t\t\ttokenStarted = true;\n\t\t\t\tindex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tescaping = true;\n\t\t\ttokenStarted = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (/\\s/u.test(character)) {\n\t\t\tfinishToken();\n\t\t\tcontinue;\n\t\t}\n\t\tif (\"|><&;\\n\\r$`(){}*?[]\".includes(character) || character === \"#\" || (character === \"~\" && token === \"\")) {\n\t\t\treturn { ok: false, error: UNSUPPORTED_OPERATOR_MESSAGE };\n\t\t}\n\t\ttoken += character;\n\t\ttokenStarted = true;\n\t}\n\n\tif (escaping) return { ok: false, error: \"Unsupported trailing escape in Bash-like command.\" };\n\tif (quote) return { ok: false, error: \"Unclosed quote in Bash-like command.\" };\n\tfinishToken();\n\treturn argv.length > 0 ? { ok: true, argv } : { ok: false, error: \"Shell command is empty.\" };\n}\n\nfunction quotePowerShell(value: string): string {\n\treturn `'${value.replaceAll(\"'\", \"''\")}'`;\n}\n\nfunction powershellArray(values: readonly string[]): string {\n\treturn `@(${values.map(quotePowerShell).join(\", \")})`;\n}\n\nfunction externalCommand(argv: readonly string[]): string {\n\tconst invocation = `& ${argv.map(quotePowerShell).join(\" \")}`;\n\treturn `${invocation}\\nif ($null -ne $LASTEXITCODE) { exit $LASTEXITCODE }\\nif (-not $?) { exit 1 }`;\n}\n\nfunction parseFlags(\n\targv: readonly string[],\n\tallowedFlags: ReadonlySet<string>,\n): { flags: Set<string>; operands: string[] } | undefined {\n\tconst flags = new Set<string>();\n\tconst operands: string[] = [];\n\tlet optionsEnded = false;\n\tfor (const value of argv) {\n\t\tif (!optionsEnded && value === \"--\") {\n\t\t\toptionsEnded = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (!optionsEnded && value.startsWith(\"-\") && value !== \"-\") {\n\t\t\tif (!allowedFlags.has(value)) return undefined;\n\t\t\tflags.add(value);\n\t\t\tcontinue;\n\t\t}\n\t\toperands.push(value);\n\t}\n\treturn { flags, operands };\n}\n\nfunction routeLs(argv: readonly string[]): string | undefined {\n\tconst parsed = parseFlags(argv.slice(1), new Set([\"-a\", \"-A\", \"-l\", \"-1\", \"-la\", \"-al\"]));\n\tif (!parsed || parsed.operands.length > 1) return undefined;\n\tconst target = parsed.operands[0] ?? \".\";\n\tconst includeHidden = [...parsed.flags].some((flag) => flag.includes(\"a\") || flag.includes(\"A\"));\n\tconst hiddenFilter = includeHidden ? \"\" : \" | Where-Object { -not $_.Name.StartsWith('.') }\";\n\treturn `[string[]]$items = @(Get-ChildItem -LiteralPath ${quotePowerShell(target)}${includeHidden ? \" -Force\" : \"\"} -ErrorAction Stop${hiddenFilter} | ForEach-Object { if ($_.PSIsContainer) { $_.Name + '/' } else { $_.Name } }); [Array]::Sort($items, [StringComparer]::Ordinal); $items`;\n}\n\nfunction routeCat(argv: readonly string[]): string | undefined {\n\tconst parsed = parseFlags(argv.slice(1), new Set([\"--\"]));\n\tif (!parsed || parsed.operands.length === 0) return undefined;\n\treturn `foreach ($path in ${powershellArray(parsed.operands)}) { [Console]::Out.Write([IO.File]::ReadAllText($path)) }`;\n}\n\nfunction routeHeadOrTail(argv: readonly string[], tail: boolean): string | undefined {\n\tlet count = 10;\n\tlet operands = argv.slice(1);\n\tif (operands[0] === \"-n\") {\n\t\tconst parsedCount = Number(operands[1]);\n\t\tif (!Number.isInteger(parsedCount) || parsedCount < 0) return undefined;\n\t\tcount = parsedCount;\n\t\toperands = operands.slice(2);\n\t}\n\tif (operands.length !== 1 || operands[0].startsWith(\"-\")) return undefined;\n\treturn `Get-Content -LiteralPath ${quotePowerShell(operands[0])} ${tail ? \"-Tail\" : \"-TotalCount\"} ${count} -ErrorAction Stop`;\n}\n\nfunction routeGrep(argv: readonly string[]): string | undefined {\n\tif (argv.length !== 3 || argv[1].startsWith(\"-\") || argv[2].startsWith(\"-\")) return undefined;\n\treturn `[string[]]$matches = @(Select-String -LiteralPath ${quotePowerShell(argv[2])} -Pattern ${quotePowerShell(argv[1])} -CaseSensitive -ErrorAction Stop | ForEach-Object { $_.Line }); if ($matches.Count -eq 0) { exit 1 }; $matches`;\n}\n\nfunction routeFind(argv: readonly string[]): string | undefined {\n\tlet searchPath = \".\";\n\tlet type: \"File\" | \"Directory\" | undefined;\n\tlet filter: string | undefined;\n\tlet index = 1;\n\tif (argv[index] && !argv[index].startsWith(\"-\")) searchPath = argv[index++];\n\twhile (index < argv.length) {\n\t\tconst option = argv[index++];\n\t\tif (option === \"-type\" && (argv[index] === \"f\" || argv[index] === \"d\")) {\n\t\t\ttype = argv[index++] === \"f\" ? \"File\" : \"Directory\";\n\t\t\tcontinue;\n\t\t}\n\t\tif (option === \"-name\" && argv[index]) {\n\t\t\tfilter = argv[index++];\n\t\t\tcontinue;\n\t\t}\n\t\treturn undefined;\n\t}\n\tconst typeFlag = type ? ` -${type}` : \"\";\n\tconst filterFlag = filter ? ` -Filter ${quotePowerShell(filter)}` : \"\";\n\treturn `[string[]]$paths = @(Get-ChildItem -LiteralPath ${quotePowerShell(searchPath)} -Recurse -Force${typeFlag}${filterFlag} -ErrorAction Stop | ForEach-Object { $_.FullName.Replace('\\\\', '/') }); [Array]::Sort($paths, [StringComparer]::Ordinal); $paths`;\n}\n\nfunction routeRemove(argv: readonly string[]): string | undefined {\n\tconst parsed = parseFlags(argv.slice(1), new Set([\"-f\", \"-r\", \"-rf\", \"-fr\"]));\n\tif (!parsed || parsed.operands.length === 0) return undefined;\n\tconst recursive = [...parsed.flags].some((flag) => flag.includes(\"r\"));\n\tconst force = [...parsed.flags].some((flag) => flag.includes(\"f\"));\n\treturn `foreach ($path in ${powershellArray(parsed.operands)}) { if (Test-Path -LiteralPath $path) { Remove-Item -LiteralPath $path -Force${recursive ? \" -Recurse\" : \"\"} -ErrorAction Stop }${force ? \"\" : ' else { throw \"rm: path not found: $path\" }'} }`;\n}\n\nfunction routeCopyOrMove(argv: readonly string[], move: boolean): string | undefined {\n\tconst parsed = parseFlags(argv.slice(1), move ? new Set<string>() : new Set([\"-r\", \"-R\"]));\n\tif (!parsed || parsed.operands.length !== 2) return undefined;\n\tconst [source, destination] = parsed.operands;\n\tconst recurse = !move && parsed.flags.size > 0 ? \" -Recurse\" : \"\";\n\tconst rejectDirectoryWithoutRecursion =\n\t\t!move && parsed.flags.size === 0\n\t\t\t? `$sourceItem = Get-Item -LiteralPath ${quotePowerShell(source)} -Force -ErrorAction Stop; if ($sourceItem.PSIsContainer) { throw 'cp: source is a directory; use -r' }; `\n\t\t\t: \"\";\n\treturn `${rejectDirectoryWithoutRecursion}${move ? \"Move-Item\" : \"Copy-Item\"} -LiteralPath ${quotePowerShell(source)} -Destination ${quotePowerShell(destination)}${recurse} -ErrorAction Stop`;\n}\n\nfunction routeMkdir(argv: readonly string[]): string | undefined {\n\tconst parsed = parseFlags(argv.slice(1), new Set([\"-p\"]));\n\tif (!parsed || parsed.operands.length === 0) return undefined;\n\treturn `${powershellArray(parsed.operands)} | ForEach-Object { New-Item -ItemType Directory -Path $_${parsed.flags.has(\"-p\") ? \" -Force\" : \"\"} -ErrorAction Stop | Out-Null }`;\n}\n\nfunction routeTouch(argv: readonly string[]): string | undefined {\n\tconst parsed = parseFlags(argv.slice(1), new Set());\n\tif (!parsed || parsed.operands.length === 0) return undefined;\n\treturn `${powershellArray(parsed.operands)} | ForEach-Object { if (Test-Path -LiteralPath $_) { (Get-Item -LiteralPath $_ -ErrorAction Stop).LastWriteTime = Get-Date } else { New-Item -ItemType File -Path $_ -ErrorAction Stop | Out-Null } }`;\n}\n\nfunction routeBuiltIn(argv: readonly string[]): string | undefined {\n\tconst command = argv[0].toLowerCase();\n\tif (command === \"pwd\" && argv.length === 1) return \"(Get-Location).Path\";\n\tif (command === \"echo\") {\n\t\tlet valueIndex = 1;\n\t\twhile (/^-n+$/u.test(argv[valueIndex] ?? \"\")) valueIndex++;\n\t\tif (/^-[neE]+$/u.test(argv[valueIndex] ?? \"\") && /[eE]/u.test(argv[valueIndex] ?? \"\")) return undefined;\n\t\tconst method = valueIndex > 1 ? \"Write\" : \"WriteLine\";\n\t\treturn `[Console]::Out.${method}((${powershellArray(argv.slice(valueIndex))} -join ' '))`;\n\t}\n\tif (command === \"true\" && argv.length === 1) return \"exit 0\";\n\tif (command === \"false\" && argv.length === 1) return \"exit 1\";\n\tif (command === \"which\" && argv.length === 2) {\n\t\treturn `(Get-Command -Name ${quotePowerShell(argv[1])} -CommandType Application -ErrorAction Stop).Source`;\n\t}\n\tif (command === \"ls\") return routeLs(argv);\n\tif (command === \"cat\") return routeCat(argv);\n\tif (command === \"head\") return routeHeadOrTail(argv, false);\n\tif (command === \"tail\") return routeHeadOrTail(argv, true);\n\tif (command === \"grep\") return routeGrep(argv);\n\tif (command === \"find\") return routeFind(argv);\n\tif (command === \"rm\") return routeRemove(argv);\n\tif (command === \"cp\") return routeCopyOrMove(argv, false);\n\tif (command === \"mv\") return routeCopyOrMove(argv, true);\n\tif (command === \"mkdir\") return routeMkdir(argv);\n\tif (command === \"touch\") return routeTouch(argv);\n\treturn undefined;\n}\n\nconst ROUTED_BUILTIN_NAMES = new Set([\n\t\"pwd\",\n\t\"echo\",\n\t\"true\",\n\t\"false\",\n\t\"which\",\n\t\"ls\",\n\t\"cat\",\n\t\"head\",\n\t\"tail\",\n\t\"grep\",\n\t\"find\",\n\t\"rm\",\n\t\"cp\",\n\t\"mv\",\n\t\"mkdir\",\n\t\"touch\",\n]);\n\nexport function routeShellContract(\n\tcommand: string,\n\tplatform: NodeJS.Platform = process.platform,\n\toptions?: { pythonEngine?: boolean },\n): ShellContractRoute {\n\tif (platform !== \"win32\") return { kind: \"passthrough\", command };\n\tconst pythonEngine = options?.pythonEngine === true;\n\tconst tokenized = tokenizePortableCommand(command);\n\n\t// Complex constructs (pipelines, redirection, expansion, quoting the tokenizer refuses, …) are\n\t// exactly the grammar the Python engine owns; with the engine off this is the original\n\t// fail-closed floor verbatim.\n\tif (!tokenized.ok || !tokenized.argv) {\n\t\tif (pythonEngine) return { kind: \"python-engine\", command };\n\t\treturn { kind: \"unsupported\", error: tokenized.error ?? UNSUPPORTED_OPERATOR_MESSAGE };\n\t}\n\n\tconst argv = tokenized.argv;\n\tconst commandName = argv[0].toLowerCase();\n\n\t// Inline env assignments (`NAME=value [cmd]`) are a state-mutating/expansion form the engine\n\t// supports (§2.1); with the engine off this is the original fail-closed floor verbatim.\n\tif (/^[A-Za-z_][A-Za-z0-9_]*=/u.test(argv[0])) {\n\t\tif (pythonEngine) return { kind: \"python-engine\", command };\n\t\treturn {\n\t\t\tkind: \"unsupported\",\n\t\t\terror: \"Inline environment assignments are not supported. Configure the environment outside the shell command.\",\n\t\t};\n\t}\n\n\t// State mutators and controlled exit route to the engine unconditionally when enabled: the\n\t// engine is the sole state owner and must frame `exit` instead of terminating the PS backend.\n\tif (ENGINE_OWNED_BUILTINS.has(commandName)) {\n\t\tif (pythonEngine) return { kind: \"python-engine\", command };\n\t\tif (commandName === \"exit\") {\n\t\t\treturn {\n\t\t\t\tkind: \"unsupported\",\n\t\t\t\terror: \"The Bash-like 'exit' builtin requires the Windows Python shell engine so Pi can preserve its terminal result protocol.\",\n\t\t\t};\n\t\t}\n\t}\n\n\tif (BLOCKED_NESTED_SHELLS.has(commandName)) {\n\t\tconst powershellGuidance = [\"powershell\", \"powershell.exe\", \"pwsh\", \"pwsh.exe\"].includes(commandName)\n\t\t\t? \" Invoke the .ps1 path directly with its arguments, without powershell.exe -File or pwsh -File.\"\n\t\t\t: \" Invoke the target executable or supported script directly.\";\n\t\treturn {\n\t\t\tkind: \"unsupported\",\n\t\t\terror: `Nested shell execution is not supported by the Windows shell contract router.${powershellGuidance}`,\n\t\t};\n\t}\n\tconst builtIn = routeBuiltIn(argv);\n\tif (builtIn) return { kind: \"powershell\", command: builtIn, argv };\n\tif (ROUTED_BUILTIN_NAMES.has(commandName)) {\n\t\t// The PS floor rejected the FORM (flags/argument shape); the engine supports the fuller\n\t\t// flag set for the same builtin (§2.2).\n\t\tif (pythonEngine) return { kind: \"python-engine\", command };\n\t\treturn {\n\t\t\tkind: \"unsupported\",\n\t\t\terror: `Unsupported ${argv[0]} form on Windows. Use a simpler Bash-like form or Pi's dedicated read/search/edit tools.`,\n\t\t};\n\t}\n\tif (commandName.endsWith(\".sh\") || commandName.includes(\"/bin/\")) {\n\t\treturn {\n\t\t\tkind: \"unsupported\",\n\t\t\terror: \"POSIX shell scripts are not supported by the Windows shell contract router.\",\n\t\t};\n\t}\n\treturn { kind: \"powershell\", command: externalCommand(argv), argv };\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** One production lifecycle boundary for every process/state resource owned by a shell session. */
|
|
2
|
+
/** Idempotently dispose both execution tiers and their shared authoritative Windows state. */
|
|
3
|
+
export declare function disposeShellExecutionSession(sessionKey: string): void;
|
|
4
|
+
//# sourceMappingURL=shell-execution-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-execution-session.d.ts","sourceRoot":"","sources":["../../../src/core/tools/shell-execution-session.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAMnG,8FAA8F;AAC9F,wBAAgB,4BAA4B,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAIrE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** One production lifecycle boundary for every process/state resource owned by a shell session. */
|
|
2
|
+
import { disposePersistentShellSession } from "./shell-session.js";
|
|
3
|
+
import { disposeWindowsShellEngineSession } from "./windows-shell-engine.js";
|
|
4
|
+
import { disposeWindowsShellState } from "./windows-shell-state.js";
|
|
5
|
+
/** Idempotently dispose both execution tiers and their shared authoritative Windows state. */
|
|
6
|
+
export function disposeShellExecutionSession(sessionKey) {
|
|
7
|
+
disposeWindowsShellEngineSession(sessionKey);
|
|
8
|
+
disposePersistentShellSession(sessionKey);
|
|
9
|
+
disposeWindowsShellState(sessionKey);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=shell-execution-session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-execution-session.js","sourceRoot":"","sources":["../../../src/core/tools/shell-execution-session.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAEnG,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,8FAA8F;AAC9F,MAAM,UAAU,4BAA4B,CAAC,UAAkB;IAC9D,gCAAgC,CAAC,UAAU,CAAC,CAAC;IAC7C,6BAA6B,CAAC,UAAU,CAAC,CAAC;IAC1C,wBAAwB,CAAC,UAAU,CAAC,CAAC;AACtC,CAAC","sourcesContent":["/** One production lifecycle boundary for every process/state resource owned by a shell session. */\n\nimport { disposePersistentShellSession } from \"./shell-session.ts\";\nimport { disposeWindowsShellEngineSession } from \"./windows-shell-engine.ts\";\nimport { disposeWindowsShellState } from \"./windows-shell-state.ts\";\n\n/** Idempotently dispose both execution tiers and their shared authoritative Windows state. */\nexport function disposeShellExecutionSession(sessionKey: string): void {\n\tdisposeWindowsShellEngineSession(sessionKey);\n\tdisposePersistentShellSession(sessionKey);\n\tdisposeWindowsShellState(sessionKey);\n}\n"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conservatively identifies commands whose stdout is owned by a test runner.
|
|
3
|
+
* Mixed shell expressions are deliberately excluded because their output has
|
|
4
|
+
* more than one semantic owner and cannot be projected safely as test output.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isProjectableTestCommand(command: string): boolean;
|
|
7
|
+
export interface ShellOutputProjection {
|
|
8
|
+
kind: "test";
|
|
9
|
+
content: string;
|
|
10
|
+
inputLines: number;
|
|
11
|
+
inputBytes: number;
|
|
12
|
+
outputLines: number;
|
|
13
|
+
outputBytes: number;
|
|
14
|
+
omittedLines: number;
|
|
15
|
+
collapsedPassingLines: number;
|
|
16
|
+
}
|
|
17
|
+
export type ShellOutputProjectionDetails = Omit<ShellOutputProjection, "content">;
|
|
18
|
+
/**
|
|
19
|
+
* Incremental, bounded projector for recognized test-runner output. It retains
|
|
20
|
+
* failure identity, nearby diagnostics, summaries, and final context while
|
|
21
|
+
* counting passing/progress chatter instead of retaining it. The caller owns
|
|
22
|
+
* exact raw-output persistence and must fall back to raw output if that handoff
|
|
23
|
+
* cannot be created.
|
|
24
|
+
*/
|
|
25
|
+
export declare class ShellOutputProjector {
|
|
26
|
+
private readonly decoder;
|
|
27
|
+
private readonly selected;
|
|
28
|
+
private readonly recent;
|
|
29
|
+
private currentHead;
|
|
30
|
+
private currentTail;
|
|
31
|
+
private currentChars;
|
|
32
|
+
private hasOpenLine;
|
|
33
|
+
private totalBytes;
|
|
34
|
+
private totalLines;
|
|
35
|
+
private collapsedPassingLines;
|
|
36
|
+
private failureSignals;
|
|
37
|
+
private followFailureLines;
|
|
38
|
+
private finished;
|
|
39
|
+
private cachedProjection;
|
|
40
|
+
append(data: Buffer): void;
|
|
41
|
+
finish(exitCode: number | null): ShellOutputProjection | undefined;
|
|
42
|
+
private appendDecodedText;
|
|
43
|
+
private appendToCurrentLine;
|
|
44
|
+
private completeLine;
|
|
45
|
+
private select;
|
|
46
|
+
private renderSelected;
|
|
47
|
+
}
|
|
48
|
+
export declare function createShellOutputProjector(command: string): ShellOutputProjector | undefined;
|
|
49
|
+
//# sourceMappingURL=shell-output-projection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-output-projection.d.ts","sourceRoot":"","sources":["../../../src/core/tools/shell-output-projection.ts"],"names":[],"mappings":"AAgFA;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAgDjE;AAED,MAAM,WAAW,qBAAqB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,qBAAqB,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC;AAyDlF;;;;;;GAMG;AACH,qBAAa,oBAAoB;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmC;IAC5D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;IAC7C,OAAO,CAAC,WAAW,CAAM;IACzB,OAAO,CAAC,WAAW,CAAM;IACzB,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,qBAAqB,CAAK;IAClC,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,kBAAkB,CAAK;IAC/B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,gBAAgB,CAA2C;IAEnE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAQzB;IAED,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,qBAAqB,GAAG,SAAS,CAmCjE;IAED,OAAO,CAAC,iBAAiB;IAUzB,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,YAAY;IA4CpB,OAAO,CAAC,MAAM;IAsBd,OAAO,CAAC,cAAc;CA4CtB;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAE5F"}
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
import { stripAnsi } from "../../utils/ansi.js";
|
|
2
|
+
import { tokenizeShellCommand } from "./shell-command-parser.js";
|
|
3
|
+
const MIN_PROJECTABLE_LINES = 24;
|
|
4
|
+
const MIN_PROJECTABLE_BYTES = 4 * 1024;
|
|
5
|
+
const MAX_APPEND_CHUNK_BYTES = 64 * 1024;
|
|
6
|
+
const MAX_LINE_HEAD_CHARS = 4 * 1024;
|
|
7
|
+
const MAX_LINE_TAIL_CHARS = 4 * 1024;
|
|
8
|
+
const MAX_SELECTED_LINE_CHARS = 2 * 1024;
|
|
9
|
+
const MAX_SELECTED_LINES = 120;
|
|
10
|
+
const MAX_SELECTED_BYTES = 12 * 1024;
|
|
11
|
+
const FAILURE_CONTEXT_BEFORE = 2;
|
|
12
|
+
const FAILURE_CONTEXT_AFTER = 6;
|
|
13
|
+
const FINAL_CONTEXT_LINES = 8;
|
|
14
|
+
const DIRECT_TEST_RUNNERS = new Set([
|
|
15
|
+
"ava",
|
|
16
|
+
"bats",
|
|
17
|
+
"jest",
|
|
18
|
+
"mocha",
|
|
19
|
+
"node-tap",
|
|
20
|
+
"playwright",
|
|
21
|
+
"pytest",
|
|
22
|
+
"tap",
|
|
23
|
+
"vitest",
|
|
24
|
+
]);
|
|
25
|
+
const EXECUTABLE_EXTENSIONS_RE = /\.(?:bat|cmd|exe)$/iu;
|
|
26
|
+
const TEST_SCRIPT_EXTENSIONS_RE = /\.(?:bat|cjs|cmd|js|mjs|ps1|py|sh|ts)$/iu;
|
|
27
|
+
const TEST_NAME_SEGMENT_RE = /(?:^|[.\-_:])tests?(?:[.\-_:]|$)/iu;
|
|
28
|
+
const ENV_ASSIGNMENT_RE = /^[A-Za-z_][A-Za-z0-9_]*=/u;
|
|
29
|
+
function executableName(token) {
|
|
30
|
+
return (token.replace(/\\/gu, "/").split("/").at(-1) ?? token).toLowerCase();
|
|
31
|
+
}
|
|
32
|
+
function executableStem(token) {
|
|
33
|
+
return executableName(token).replace(EXECUTABLE_EXTENSIONS_RE, "");
|
|
34
|
+
}
|
|
35
|
+
function isNamedTestScript(token) {
|
|
36
|
+
const name = executableName(token);
|
|
37
|
+
if (!TEST_SCRIPT_EXTENSIONS_RE.test(name))
|
|
38
|
+
return false;
|
|
39
|
+
return TEST_NAME_SEGMENT_RE.test(name.replace(TEST_SCRIPT_EXTENSIONS_RE, ""));
|
|
40
|
+
}
|
|
41
|
+
function firstNonOption(tokens, start) {
|
|
42
|
+
for (let index = start; index < tokens.length; index++) {
|
|
43
|
+
if (!tokens[index].startsWith("-"))
|
|
44
|
+
return tokens[index];
|
|
45
|
+
}
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
function isRunnerToken(token) {
|
|
49
|
+
if (!token)
|
|
50
|
+
return false;
|
|
51
|
+
const stem = executableStem(token);
|
|
52
|
+
return DIRECT_TEST_RUNNERS.has(stem) || /(?:^|[\\/])node_modules[\\/].*(?:vitest|jest|mocha)/iu.test(token);
|
|
53
|
+
}
|
|
54
|
+
function isTestScriptName(token) {
|
|
55
|
+
if (!token)
|
|
56
|
+
return false;
|
|
57
|
+
return TEST_NAME_SEGMENT_RE.test(token.toLowerCase());
|
|
58
|
+
}
|
|
59
|
+
function commandArguments(command) {
|
|
60
|
+
const tokens = tokenizeShellCommand(command);
|
|
61
|
+
if (!tokens || tokens.some((token) => token.kind === "operator" || token.kind === "pipe"))
|
|
62
|
+
return undefined;
|
|
63
|
+
const args = [];
|
|
64
|
+
for (const token of tokens) {
|
|
65
|
+
if (token.kind === "redirect")
|
|
66
|
+
break;
|
|
67
|
+
if (token.kind === "arg")
|
|
68
|
+
args.push(token.value);
|
|
69
|
+
}
|
|
70
|
+
let start = 0;
|
|
71
|
+
if (executableStem(args[start] ?? "") === "env")
|
|
72
|
+
start++;
|
|
73
|
+
while (start < args.length && ENV_ASSIGNMENT_RE.test(args[start]))
|
|
74
|
+
start++;
|
|
75
|
+
return args.slice(start);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Conservatively identifies commands whose stdout is owned by a test runner.
|
|
79
|
+
* Mixed shell expressions are deliberately excluded because their output has
|
|
80
|
+
* more than one semantic owner and cannot be projected safely as test output.
|
|
81
|
+
*/
|
|
82
|
+
export function isProjectableTestCommand(command) {
|
|
83
|
+
const args = commandArguments(command);
|
|
84
|
+
if (!args || args.length === 0)
|
|
85
|
+
return false;
|
|
86
|
+
const executable = executableStem(args[0]);
|
|
87
|
+
if (executable === "test" || executable === "[")
|
|
88
|
+
return false;
|
|
89
|
+
if (isNamedTestScript(args[0]))
|
|
90
|
+
return true;
|
|
91
|
+
if (DIRECT_TEST_RUNNERS.has(executable))
|
|
92
|
+
return true;
|
|
93
|
+
if (executable === "node") {
|
|
94
|
+
if (args.slice(1).some((token) => token === "--test" || token.startsWith("--test=")))
|
|
95
|
+
return true;
|
|
96
|
+
return isRunnerToken(firstNonOption(args, 1)) || isNamedTestScript(firstNonOption(args, 1) ?? "");
|
|
97
|
+
}
|
|
98
|
+
if (executable === "python" || executable === "python3" || executable === "py") {
|
|
99
|
+
const moduleIndex = args.indexOf("-m");
|
|
100
|
+
if (moduleIndex !== -1 && isRunnerToken(args[moduleIndex + 1]))
|
|
101
|
+
return true;
|
|
102
|
+
return isNamedTestScript(firstNonOption(args, 1) ?? "");
|
|
103
|
+
}
|
|
104
|
+
if (executable === "npx" || executable === "pnpx" || executable === "bunx") {
|
|
105
|
+
return isRunnerToken(firstNonOption(args, 1));
|
|
106
|
+
}
|
|
107
|
+
if (executable === "npm") {
|
|
108
|
+
const action = args[1]?.toLowerCase();
|
|
109
|
+
if (action === "test" || action === "t" || action === "tst")
|
|
110
|
+
return true;
|
|
111
|
+
if (action === "run" || action === "run-script")
|
|
112
|
+
return isTestScriptName(args[2]);
|
|
113
|
+
if (action === "exec")
|
|
114
|
+
return isRunnerToken(firstNonOption(args, 2));
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
if (executable === "pnpm" || executable === "yarn" || executable === "bun") {
|
|
118
|
+
const action = args[1]?.toLowerCase();
|
|
119
|
+
if (action === "test")
|
|
120
|
+
return true;
|
|
121
|
+
if (action === "run")
|
|
122
|
+
return isTestScriptName(args[2]);
|
|
123
|
+
if (action === "exec" || action === "dlx")
|
|
124
|
+
return isRunnerToken(firstNonOption(args, 2));
|
|
125
|
+
if (isRunnerToken(action))
|
|
126
|
+
return true;
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
if (executable === "deno")
|
|
130
|
+
return args[1]?.toLowerCase() === "test";
|
|
131
|
+
if (executable === "uv" || executable === "poetry" || executable === "pipenv") {
|
|
132
|
+
return args[1]?.toLowerCase() === "run" && isRunnerToken(firstNonOption(args, 2));
|
|
133
|
+
}
|
|
134
|
+
if (executable === "make" || executable === "just")
|
|
135
|
+
return isTestScriptName(args[1]);
|
|
136
|
+
if (executable === "cargo" || executable === "go" || executable === "dotnet") {
|
|
137
|
+
return args[1]?.toLowerCase() === "test" || (executable === "dotnet" && args[1]?.toLowerCase() === "vstest");
|
|
138
|
+
}
|
|
139
|
+
if (executable === "mvn" || executable === "mvnw" || executable === "gradle" || executable === "gradlew") {
|
|
140
|
+
return args.slice(1).some((token) => token.toLowerCase() === "test");
|
|
141
|
+
}
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
function clipSelectedLine(line) {
|
|
145
|
+
if (line.length <= MAX_SELECTED_LINE_CHARS)
|
|
146
|
+
return line;
|
|
147
|
+
const side = Math.floor((MAX_SELECTED_LINE_CHARS - 28) / 2);
|
|
148
|
+
return `${line.slice(0, side)} … [line clipped] … ${line.slice(-side)}`;
|
|
149
|
+
}
|
|
150
|
+
function isSummaryLine(line) {
|
|
151
|
+
const text = line.trim();
|
|
152
|
+
return (/^(?:ran\b|result\b|snapshots?\b|suites?\b|test files?\b|test suites?\b|tests?\b|tests passed\b|total tests?\b|duration\b|time\b)/iu.test(text) ||
|
|
153
|
+
/\b\d+\s+(?:failed|passed|pending|skipped)\b/iu.test(text) ||
|
|
154
|
+
/\b(?:failed|passed|pending|skipped)\s*:\s*\d+\b/iu.test(text));
|
|
155
|
+
}
|
|
156
|
+
function isPassingLine(line) {
|
|
157
|
+
return /^\s*(?:PASS\b|\[(?:PASS|PASSED|\+)\]|ok\s+\d+\b|test\s+.+\.\.\.\s+ok\b|[+✓✔√]\s)/iu.test(line);
|
|
158
|
+
}
|
|
159
|
+
function isProgressLine(line) {
|
|
160
|
+
return /^\s*[.·*]+(?:\s+\[?\d+%\]?)?\s*$/u.test(line);
|
|
161
|
+
}
|
|
162
|
+
function withoutZeroFailureSummaries(line) {
|
|
163
|
+
return line
|
|
164
|
+
.replace(/\b(?:errors?|failed|failures?)\s*[:=]?\s*0\b/giu, "")
|
|
165
|
+
.replace(/\b0\s+(?:errors?|failed|failures?)\b/giu, "");
|
|
166
|
+
}
|
|
167
|
+
function isFailureLine(line) {
|
|
168
|
+
const text = withoutZeroFailureSummaries(line.trim());
|
|
169
|
+
return (/^(?:FAIL(?:ED)?\b|---\s+FAIL:|\[FAIL(?:ED)?\]|\[-\]|not ok\b|[×✗]\s|error\b|fatal\b|panic\b|thread\s+.+\s+panicked at\b)/iu.test(text) ||
|
|
170
|
+
/\b(?:AssertionError|assertion .+ failed|Caused by:\s*Error|Exception|Expected:.+Received:|panicked at|timed? out|Traceback \(most recent call last\))\b/iu.test(text) ||
|
|
171
|
+
/\b(?:errors?|failed|failures?)\s*[:=]\s*[1-9]\d*\b/iu.test(text) ||
|
|
172
|
+
/\b[1-9]\d*\s+(?:errors?|failed|failures?)\b/iu.test(text));
|
|
173
|
+
}
|
|
174
|
+
function isWarningLine(line) {
|
|
175
|
+
return /^\s*(?:WARN(?:ING)?\b|\[WARN(?:ING)?\])/iu.test(line);
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Incremental, bounded projector for recognized test-runner output. It retains
|
|
179
|
+
* failure identity, nearby diagnostics, summaries, and final context while
|
|
180
|
+
* counting passing/progress chatter instead of retaining it. The caller owns
|
|
181
|
+
* exact raw-output persistence and must fall back to raw output if that handoff
|
|
182
|
+
* cannot be created.
|
|
183
|
+
*/
|
|
184
|
+
export class ShellOutputProjector {
|
|
185
|
+
constructor() {
|
|
186
|
+
this.decoder = new TextDecoder();
|
|
187
|
+
this.selected = new Map();
|
|
188
|
+
this.recent = [];
|
|
189
|
+
this.currentHead = "";
|
|
190
|
+
this.currentTail = "";
|
|
191
|
+
this.currentChars = 0;
|
|
192
|
+
this.hasOpenLine = false;
|
|
193
|
+
this.totalBytes = 0;
|
|
194
|
+
this.totalLines = 0;
|
|
195
|
+
this.collapsedPassingLines = 0;
|
|
196
|
+
this.failureSignals = 0;
|
|
197
|
+
this.followFailureLines = 0;
|
|
198
|
+
this.finished = false;
|
|
199
|
+
}
|
|
200
|
+
append(data) {
|
|
201
|
+
if (this.finished)
|
|
202
|
+
throw new Error("Cannot append to a finished shell output projector");
|
|
203
|
+
this.totalBytes += data.length;
|
|
204
|
+
for (let offset = 0; offset < data.length; offset += MAX_APPEND_CHUNK_BYTES) {
|
|
205
|
+
this.appendDecodedText(this.decoder.decode(data.subarray(offset, offset + MAX_APPEND_CHUNK_BYTES), { stream: true }));
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
finish(exitCode) {
|
|
209
|
+
if (this.cachedProjection !== undefined)
|
|
210
|
+
return this.cachedProjection ?? undefined;
|
|
211
|
+
if (!this.finished) {
|
|
212
|
+
this.finished = true;
|
|
213
|
+
this.appendDecodedText(this.decoder.decode());
|
|
214
|
+
if (this.hasOpenLine)
|
|
215
|
+
this.completeLine();
|
|
216
|
+
}
|
|
217
|
+
if (this.totalLines < MIN_PROJECTABLE_LINES && this.totalBytes < MIN_PROJECTABLE_BYTES) {
|
|
218
|
+
this.cachedProjection = null;
|
|
219
|
+
return undefined;
|
|
220
|
+
}
|
|
221
|
+
if (exitCode !== 0 && this.failureSignals === 0) {
|
|
222
|
+
this.cachedProjection = null;
|
|
223
|
+
return undefined;
|
|
224
|
+
}
|
|
225
|
+
for (const line of this.recent.slice(-FINAL_CONTEXT_LINES))
|
|
226
|
+
this.select(line.index, line.text, 2);
|
|
227
|
+
const projected = this.renderSelected();
|
|
228
|
+
if (!projected || projected.outputBytes >= this.totalBytes * 0.8) {
|
|
229
|
+
this.cachedProjection = null;
|
|
230
|
+
return undefined;
|
|
231
|
+
}
|
|
232
|
+
this.cachedProjection = {
|
|
233
|
+
kind: "test",
|
|
234
|
+
content: projected.content,
|
|
235
|
+
inputLines: this.totalLines,
|
|
236
|
+
inputBytes: this.totalBytes,
|
|
237
|
+
outputLines: projected.outputLines,
|
|
238
|
+
outputBytes: projected.outputBytes,
|
|
239
|
+
omittedLines: Math.max(0, this.totalLines - projected.selectedLines),
|
|
240
|
+
collapsedPassingLines: this.collapsedPassingLines,
|
|
241
|
+
};
|
|
242
|
+
return this.cachedProjection;
|
|
243
|
+
}
|
|
244
|
+
appendDecodedText(text) {
|
|
245
|
+
let segmentStart = 0;
|
|
246
|
+
for (let index = text.indexOf("\n"); index !== -1; index = text.indexOf("\n", segmentStart)) {
|
|
247
|
+
this.appendToCurrentLine(text.slice(segmentStart, index));
|
|
248
|
+
this.completeLine();
|
|
249
|
+
segmentStart = index + 1;
|
|
250
|
+
}
|
|
251
|
+
if (segmentStart < text.length)
|
|
252
|
+
this.appendToCurrentLine(text.slice(segmentStart));
|
|
253
|
+
}
|
|
254
|
+
appendToCurrentLine(segment) {
|
|
255
|
+
if (segment.length === 0)
|
|
256
|
+
return;
|
|
257
|
+
this.hasOpenLine = true;
|
|
258
|
+
this.currentChars += segment.length;
|
|
259
|
+
const headRemaining = Math.max(0, MAX_LINE_HEAD_CHARS - this.currentHead.length);
|
|
260
|
+
if (headRemaining > 0)
|
|
261
|
+
this.currentHead += segment.slice(0, headRemaining);
|
|
262
|
+
const remainder = segment.slice(headRemaining);
|
|
263
|
+
if (remainder.length > 0) {
|
|
264
|
+
this.currentTail = `${this.currentTail}${remainder}`.slice(-MAX_LINE_TAIL_CHARS);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
completeLine() {
|
|
268
|
+
const rawLine = this.currentChars <= this.currentHead.length
|
|
269
|
+
? this.currentHead
|
|
270
|
+
: `${this.currentHead} … [line clipped] … ${this.currentTail}`;
|
|
271
|
+
const withoutAnsi = rawLine.includes("\u001b") ? stripAnsi(rawLine) : rawLine;
|
|
272
|
+
const line = withoutAnsi.includes("\r") ? withoutAnsi.replace(/\r/gu, "") : withoutAnsi;
|
|
273
|
+
const index = this.totalLines++;
|
|
274
|
+
const before = this.recent.slice(-FAILURE_CONTEXT_BEFORE);
|
|
275
|
+
const selectedLine = { index, text: line, priority: 1 };
|
|
276
|
+
const passingOrProgress = isPassingLine(line) || isProgressLine(line);
|
|
277
|
+
if (passingOrProgress) {
|
|
278
|
+
this.collapsedPassingLines++;
|
|
279
|
+
if (this.followFailureLines > 0) {
|
|
280
|
+
this.select(index, line, 4);
|
|
281
|
+
this.followFailureLines--;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
else if (isFailureLine(line)) {
|
|
285
|
+
this.failureSignals++;
|
|
286
|
+
for (const context of before)
|
|
287
|
+
this.select(context.index, context.text, 4);
|
|
288
|
+
this.select(index, line, 5);
|
|
289
|
+
this.followFailureLines = FAILURE_CONTEXT_AFTER;
|
|
290
|
+
}
|
|
291
|
+
else if (isWarningLine(line)) {
|
|
292
|
+
this.select(index, line, 4);
|
|
293
|
+
}
|
|
294
|
+
else {
|
|
295
|
+
if (isSummaryLine(line))
|
|
296
|
+
this.select(index, line, 3);
|
|
297
|
+
if (this.followFailureLines > 0) {
|
|
298
|
+
this.select(index, line, 4);
|
|
299
|
+
this.followFailureLines--;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
if (index < 2 && !passingOrProgress)
|
|
303
|
+
this.select(index, line, 1);
|
|
304
|
+
if (!passingOrProgress) {
|
|
305
|
+
this.recent.push(selectedLine);
|
|
306
|
+
if (this.recent.length > FINAL_CONTEXT_LINES)
|
|
307
|
+
this.recent.shift();
|
|
308
|
+
}
|
|
309
|
+
this.currentHead = "";
|
|
310
|
+
this.currentTail = "";
|
|
311
|
+
this.currentChars = 0;
|
|
312
|
+
this.hasOpenLine = false;
|
|
313
|
+
}
|
|
314
|
+
select(index, line, priority) {
|
|
315
|
+
const existing = this.selected.get(index);
|
|
316
|
+
if (existing) {
|
|
317
|
+
if (priority > existing.priority)
|
|
318
|
+
existing.priority = priority;
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
const selected = { index, text: clipSelectedLine(line), priority };
|
|
322
|
+
if (this.selected.size < MAX_SELECTED_LINES) {
|
|
323
|
+
this.selected.set(index, selected);
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
let eviction;
|
|
327
|
+
for (const candidate of this.selected.values()) {
|
|
328
|
+
if (!eviction || candidate.priority < eviction.priority)
|
|
329
|
+
eviction = candidate;
|
|
330
|
+
}
|
|
331
|
+
if (eviction && eviction.priority < priority) {
|
|
332
|
+
this.selected.delete(eviction.index);
|
|
333
|
+
this.selected.set(index, selected);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
renderSelected() {
|
|
337
|
+
const prioritized = [...this.selected.values()].sort((left, right) => right.priority - left.priority || left.index - right.index);
|
|
338
|
+
const chosen = [];
|
|
339
|
+
let selectedBytes = 0;
|
|
340
|
+
for (const line of prioritized) {
|
|
341
|
+
const bytes = Buffer.byteLength(line.text, "utf-8") + 1;
|
|
342
|
+
if (chosen.length > 0 && selectedBytes + bytes > MAX_SELECTED_BYTES)
|
|
343
|
+
continue;
|
|
344
|
+
chosen.push(line);
|
|
345
|
+
selectedBytes += bytes;
|
|
346
|
+
}
|
|
347
|
+
if (chosen.length === 0) {
|
|
348
|
+
const content = `[... ${this.totalLines} lines omitted ...]`;
|
|
349
|
+
return {
|
|
350
|
+
content,
|
|
351
|
+
outputLines: 1,
|
|
352
|
+
outputBytes: Buffer.byteLength(content, "utf-8"),
|
|
353
|
+
selectedLines: 0,
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
chosen.sort((left, right) => left.index - right.index);
|
|
357
|
+
const output = [];
|
|
358
|
+
let previousIndex = -1;
|
|
359
|
+
for (const line of chosen) {
|
|
360
|
+
const omitted = line.index - previousIndex - 1;
|
|
361
|
+
if (omitted > 0)
|
|
362
|
+
output.push(`[... ${omitted} lines omitted ...]`);
|
|
363
|
+
output.push(line.text);
|
|
364
|
+
previousIndex = line.index;
|
|
365
|
+
}
|
|
366
|
+
const trailing = this.totalLines - previousIndex - 1;
|
|
367
|
+
if (trailing > 0)
|
|
368
|
+
output.push(`[... ${trailing} lines omitted ...]`);
|
|
369
|
+
const content = output.join("\n");
|
|
370
|
+
return {
|
|
371
|
+
content,
|
|
372
|
+
outputLines: output.length,
|
|
373
|
+
outputBytes: Buffer.byteLength(content, "utf-8"),
|
|
374
|
+
selectedLines: chosen.length,
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
export function createShellOutputProjector(command) {
|
|
379
|
+
return isProjectableTestCommand(command) ? new ShellOutputProjector() : undefined;
|
|
380
|
+
}
|
|
381
|
+
//# sourceMappingURL=shell-output-projection.js.map
|