open-multi-agent-kit 0.98.4 → 0.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/README.md +4 -2
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +1 -0
- package/dist/cli/help.js.map +1 -1
- package/dist/commands/run-command.d.ts +2 -1
- package/dist/commands/run-command.d.ts.map +1 -1
- package/dist/commands/run-command.js +9 -1
- package/dist/commands/run-command.js.map +1 -1
- package/dist/commands/verified-run-cli.d.ts +6 -0
- package/dist/commands/verified-run-cli.d.ts.map +1 -0
- package/dist/commands/verified-run-cli.js +190 -0
- package/dist/commands/verified-run-cli.js.map +1 -0
- package/dist/core/agent-session-services.d.ts +8 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +41 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +7 -8
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +80 -43
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/devin-harness-dispatch.d.ts +12 -0
- package/dist/core/devin-harness-dispatch.d.ts.map +1 -0
- package/dist/core/devin-harness-dispatch.js +12 -0
- package/dist/core/devin-harness-dispatch.js.map +1 -0
- package/dist/core/devin-harness.d.ts +53 -0
- package/dist/core/devin-harness.d.ts.map +1 -0
- package/dist/core/devin-harness.js +112 -0
- package/dist/core/devin-harness.js.map +1 -0
- package/dist/core/domain-dispatch.d.ts +4 -1
- package/dist/core/domain-dispatch.d.ts.map +1 -1
- package/dist/core/domain-dispatch.js +5 -0
- package/dist/core/domain-dispatch.js.map +1 -1
- package/dist/core/domain-loadouts-provider-harness.d.ts +12 -0
- package/dist/core/domain-loadouts-provider-harness.d.ts.map +1 -0
- package/dist/core/domain-loadouts-provider-harness.js +122 -0
- package/dist/core/domain-loadouts-provider-harness.js.map +1 -0
- package/dist/core/domain-loadouts.d.ts +2 -33
- package/dist/core/domain-loadouts.d.ts.map +1 -1
- package/dist/core/domain-loadouts.js +3 -56
- package/dist/core/domain-loadouts.js.map +1 -1
- package/dist/core/domain-profile.d.ts +40 -0
- package/dist/core/domain-profile.d.ts.map +1 -0
- package/dist/core/domain-profile.js +7 -0
- package/dist/core/domain-profile.js.map +1 -0
- package/dist/core/grok-harness-dispatch.d.ts +6 -20
- package/dist/core/grok-harness-dispatch.d.ts.map +1 -1
- package/dist/core/grok-harness-dispatch.js +6 -55
- package/dist/core/grok-harness-dispatch.js.map +1 -1
- package/dist/core/grok-harness.d.ts +7 -9
- package/dist/core/grok-harness.d.ts.map +1 -1
- package/dist/core/grok-harness.js +9 -23
- package/dist/core/grok-harness.js.map +1 -1
- package/dist/core/harness-skills.d.ts +20 -0
- package/dist/core/harness-skills.d.ts.map +1 -0
- package/dist/core/harness-skills.js +36 -0
- package/dist/core/harness-skills.js.map +1 -0
- package/dist/core/loadout-runtime-state.d.ts +25 -0
- package/dist/core/loadout-runtime-state.d.ts.map +1 -0
- package/dist/core/loadout-runtime-state.js +39 -0
- package/dist/core/loadout-runtime-state.js.map +1 -0
- package/dist/core/loadout-runtime.d.ts +2 -12
- package/dist/core/loadout-runtime.d.ts.map +1 -1
- package/dist/core/loadout-runtime.js +6 -13
- package/dist/core/loadout-runtime.js.map +1 -1
- package/dist/core/model-resolver.d.ts +1 -41
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +2 -49
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/prompt-settlement.d.ts +4 -3
- package/dist/core/prompt-settlement.d.ts.map +1 -1
- package/dist/core/prompt-settlement.js.map +1 -1
- package/dist/core/provider-default-models.d.ts +42 -0
- package/dist/core/provider-default-models.d.ts.map +1 -0
- package/dist/core/provider-default-models.js +50 -0
- package/dist/core/provider-default-models.js.map +1 -0
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/provider-display-names.js +1 -0
- package/dist/core/provider-display-names.js.map +1 -1
- package/dist/core/provider-harness-dispatch.d.ts +63 -0
- package/dist/core/provider-harness-dispatch.d.ts.map +1 -0
- package/dist/core/provider-harness-dispatch.js +60 -0
- package/dist/core/provider-harness-dispatch.js.map +1 -0
- package/dist/core/provider-usage-devin.d.ts +16 -0
- package/dist/core/provider-usage-devin.d.ts.map +1 -0
- package/dist/core/provider-usage-devin.js +61 -0
- package/dist/core/provider-usage-devin.js.map +1 -0
- package/dist/core/provider-usage-text.d.ts +5 -0
- package/dist/core/provider-usage-text.d.ts.map +1 -0
- package/dist/core/provider-usage-text.js +15 -0
- package/dist/core/provider-usage-text.js.map +1 -0
- package/dist/core/provider-usage-types.d.ts +2 -1
- package/dist/core/provider-usage-types.d.ts.map +1 -1
- package/dist/core/provider-usage-types.js.map +1 -1
- package/dist/core/provider-usage.d.ts +1 -2
- package/dist/core/provider-usage.d.ts.map +1 -1
- package/dist/core/provider-usage.js +12 -7
- package/dist/core/provider-usage.js.map +1 -1
- package/dist/core/run-budget-policy.d.ts +18 -0
- package/dist/core/run-budget-policy.d.ts.map +1 -0
- package/dist/core/run-budget-policy.js +52 -0
- package/dist/core/run-budget-policy.js.map +1 -0
- package/dist/core/run-budget.d.ts +33 -0
- package/dist/core/run-budget.d.ts.map +1 -0
- package/dist/core/run-budget.js +89 -0
- package/dist/core/run-budget.js.map +1 -0
- package/dist/core/run-execution-api.d.ts +15 -0
- package/dist/core/run-execution-api.d.ts.map +1 -0
- package/dist/core/run-execution-api.js +7 -0
- package/dist/core/run-execution-api.js.map +1 -0
- package/dist/core/run-journal.d.ts.map +1 -1
- package/dist/core/run-journal.js +30 -208
- package/dist/core/run-journal.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +23 -18
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-bash-service.d.ts +2 -2
- package/dist/core/session-bash-service.d.ts.map +1 -1
- package/dist/core/session-bash-service.js +21 -9
- package/dist/core/session-bash-service.js.map +1 -1
- package/dist/core/session-failure-cause.d.ts.map +1 -1
- package/dist/core/session-failure-cause.js +5 -0
- package/dist/core/session-failure-cause.js.map +1 -1
- package/dist/core/session-prompt-lifecycle.d.ts +25 -0
- package/dist/core/session-prompt-lifecycle.d.ts.map +1 -0
- package/dist/core/session-prompt-lifecycle.js +87 -0
- package/dist/core/session-prompt-lifecycle.js.map +1 -0
- package/dist/core/session-run-budget.d.ts +28 -0
- package/dist/core/session-run-budget.d.ts.map +1 -0
- package/dist/core/session-run-budget.js +127 -0
- package/dist/core/session-run-budget.js.map +1 -0
- package/dist/core/session-run-termination.d.ts.map +1 -1
- package/dist/core/session-run-termination.js +14 -3
- package/dist/core/session-run-termination.js.map +1 -1
- package/dist/core/session-termination-types.d.ts +97 -0
- package/dist/core/session-termination-types.d.ts.map +1 -0
- package/dist/core/session-termination-types.js +26 -0
- package/dist/core/session-termination-types.js.map +1 -0
- package/dist/core/session-termination.d.ts +3 -97
- package/dist/core/session-termination.d.ts.map +1 -1
- package/dist/core/session-termination.js +24 -28
- package/dist/core/session-termination.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/subagent-lane-launcher.d.ts +3 -2
- package/dist/core/subagent-lane-launcher.d.ts.map +1 -1
- package/dist/core/subagent-lane-launcher.js +24 -13
- package/dist/core/subagent-lane-launcher.js.map +1 -1
- package/dist/core/verified-run/broker.d.ts +26 -0
- package/dist/core/verified-run/broker.d.ts.map +1 -0
- package/dist/core/verified-run/broker.js +210 -0
- package/dist/core/verified-run/broker.js.map +1 -0
- package/dist/core/verified-run/candidate.d.ts +24 -0
- package/dist/core/verified-run/candidate.d.ts.map +1 -0
- package/dist/core/verified-run/candidate.js +167 -0
- package/dist/core/verified-run/candidate.js.map +1 -0
- package/dist/core/verified-run/check-receipt.d.ts +18 -0
- package/dist/core/verified-run/check-receipt.d.ts.map +1 -0
- package/dist/core/verified-run/check-receipt.js +92 -0
- package/dist/core/verified-run/check-receipt.js.map +1 -0
- package/dist/core/verified-run/coordinator.d.ts +39 -0
- package/dist/core/verified-run/coordinator.d.ts.map +1 -0
- package/dist/core/verified-run/coordinator.js +190 -0
- package/dist/core/verified-run/coordinator.js.map +1 -0
- package/dist/core/verified-run/dag-candidates.d.ts +8 -0
- package/dist/core/verified-run/dag-candidates.d.ts.map +1 -0
- package/dist/core/verified-run/dag-candidates.js +65 -0
- package/dist/core/verified-run/dag-candidates.js.map +1 -0
- package/dist/core/verified-run/dag-phase.d.ts +7 -0
- package/dist/core/verified-run/dag-phase.d.ts.map +1 -0
- package/dist/core/verified-run/dag-phase.js +130 -0
- package/dist/core/verified-run/dag-phase.js.map +1 -0
- package/dist/core/verified-run/dag-projection.d.ts +7 -0
- package/dist/core/verified-run/dag-projection.d.ts.map +1 -0
- package/dist/core/verified-run/dag-projection.js +103 -0
- package/dist/core/verified-run/dag-projection.js.map +1 -0
- package/dist/core/verified-run/dag-recovery.d.ts +13 -0
- package/dist/core/verified-run/dag-recovery.d.ts.map +1 -0
- package/dist/core/verified-run/dag-recovery.js +98 -0
- package/dist/core/verified-run/dag-recovery.js.map +1 -0
- package/dist/core/verified-run/dag-retry-projection.d.ts +9 -0
- package/dist/core/verified-run/dag-retry-projection.d.ts.map +1 -0
- package/dist/core/verified-run/dag-retry-projection.js +43 -0
- package/dist/core/verified-run/dag-retry-projection.js.map +1 -0
- package/dist/core/verified-run/dag-types.d.ts +58 -0
- package/dist/core/verified-run/dag-types.d.ts.map +1 -0
- package/dist/core/verified-run/dag-types.js +2 -0
- package/dist/core/verified-run/dag-types.js.map +1 -0
- package/dist/core/verified-run/event-parser.d.ts +3 -0
- package/dist/core/verified-run/event-parser.d.ts.map +1 -0
- package/dist/core/verified-run/event-parser.js +154 -0
- package/dist/core/verified-run/event-parser.js.map +1 -0
- package/dist/core/verified-run/events.d.ts +4 -0
- package/dist/core/verified-run/events.d.ts.map +1 -0
- package/dist/core/verified-run/events.js +3 -0
- package/dist/core/verified-run/events.js.map +1 -0
- package/dist/core/verified-run/evidence-binding.d.ts +18 -0
- package/dist/core/verified-run/evidence-binding.d.ts.map +1 -0
- package/dist/core/verified-run/evidence-binding.js +81 -0
- package/dist/core/verified-run/evidence-binding.js.map +1 -0
- package/dist/core/verified-run/evidence.d.ts +27 -0
- package/dist/core/verified-run/evidence.d.ts.map +1 -0
- package/dist/core/verified-run/evidence.js +100 -0
- package/dist/core/verified-run/evidence.js.map +1 -0
- package/dist/core/verified-run/journal.d.ts +32 -0
- package/dist/core/verified-run/journal.d.ts.map +1 -0
- package/dist/core/verified-run/journal.js +103 -0
- package/dist/core/verified-run/journal.js.map +1 -0
- package/dist/core/verified-run/namespace-identity.d.ts +11 -0
- package/dist/core/verified-run/namespace-identity.d.ts.map +1 -0
- package/dist/core/verified-run/namespace-identity.js +77 -0
- package/dist/core/verified-run/namespace-identity.js.map +1 -0
- package/dist/core/verified-run/owned-execution.d.ts +22 -0
- package/dist/core/verified-run/owned-execution.d.ts.map +1 -0
- package/dist/core/verified-run/owned-execution.js +49 -0
- package/dist/core/verified-run/owned-execution.js.map +1 -0
- package/dist/core/verified-run/phase-context.d.ts +9 -0
- package/dist/core/verified-run/phase-context.d.ts.map +1 -0
- package/dist/core/verified-run/phase-context.js +2 -0
- package/dist/core/verified-run/phase-context.js.map +1 -0
- package/dist/core/verified-run/process-gate.d.ts +5 -0
- package/dist/core/verified-run/process-gate.d.ts.map +1 -0
- package/dist/core/verified-run/process-gate.js +31 -0
- package/dist/core/verified-run/process-gate.js.map +1 -0
- package/dist/core/verified-run/process-projection.d.ts +13 -0
- package/dist/core/verified-run/process-projection.d.ts.map +1 -0
- package/dist/core/verified-run/process-projection.js +82 -0
- package/dist/core/verified-run/process-projection.js.map +1 -0
- package/dist/core/verified-run/projection.d.ts +4 -0
- package/dist/core/verified-run/projection.d.ts.map +1 -0
- package/dist/core/verified-run/projection.js +175 -0
- package/dist/core/verified-run/projection.js.map +1 -0
- package/dist/core/verified-run/recovery-clock.d.ts +19 -0
- package/dist/core/verified-run/recovery-clock.d.ts.map +1 -0
- package/dist/core/verified-run/recovery-clock.js +69 -0
- package/dist/core/verified-run/recovery-clock.js.map +1 -0
- package/dist/core/verified-run/recovery-command.d.ts +11 -0
- package/dist/core/verified-run/recovery-command.d.ts.map +1 -0
- package/dist/core/verified-run/recovery-command.js +73 -0
- package/dist/core/verified-run/recovery-command.js.map +1 -0
- package/dist/core/verified-run/recovery-projection.d.ts +12 -0
- package/dist/core/verified-run/recovery-projection.d.ts.map +1 -0
- package/dist/core/verified-run/recovery-projection.js +88 -0
- package/dist/core/verified-run/recovery-projection.js.map +1 -0
- package/dist/core/verified-run/recovery.d.ts +12 -0
- package/dist/core/verified-run/recovery.d.ts.map +1 -0
- package/dist/core/verified-run/recovery.js +115 -0
- package/dist/core/verified-run/recovery.js.map +1 -0
- package/dist/core/verified-run/run-types.d.ts +104 -0
- package/dist/core/verified-run/run-types.d.ts.map +1 -0
- package/dist/core/verified-run/run-types.js +2 -0
- package/dist/core/verified-run/run-types.js.map +1 -0
- package/dist/core/verified-run/scripted-writer.d.ts +15 -0
- package/dist/core/verified-run/scripted-writer.d.ts.map +1 -0
- package/dist/core/verified-run/scripted-writer.js +94 -0
- package/dist/core/verified-run/scripted-writer.js.map +1 -0
- package/dist/core/verified-run/session-port.d.ts +27 -0
- package/dist/core/verified-run/session-port.d.ts.map +1 -0
- package/dist/core/verified-run/session-port.js +2 -0
- package/dist/core/verified-run/session-port.js.map +1 -0
- package/dist/core/verified-run/storage.d.ts +15 -0
- package/dist/core/verified-run/storage.d.ts.map +1 -0
- package/dist/core/verified-run/storage.js +96 -0
- package/dist/core/verified-run/storage.js.map +1 -0
- package/dist/core/verified-run/task-execution.d.ts +9 -0
- package/dist/core/verified-run/task-execution.d.ts.map +1 -0
- package/dist/core/verified-run/task-execution.js +29 -0
- package/dist/core/verified-run/task-execution.js.map +1 -0
- package/dist/core/verified-run/verification-phase.d.ts +5 -0
- package/dist/core/verified-run/verification-phase.d.ts.map +1 -0
- package/dist/core/verified-run/verification-phase.js +56 -0
- package/dist/core/verified-run/verification-phase.js.map +1 -0
- package/dist/core/verified-run/work-recovery.d.ts +8 -0
- package/dist/core/verified-run/work-recovery.d.ts.map +1 -0
- package/dist/core/verified-run/work-recovery.js +44 -0
- package/dist/core/verified-run/work-recovery.js.map +1 -0
- package/dist/core/verified-run/writer-completion.d.ts +4 -0
- package/dist/core/verified-run/writer-completion.d.ts.map +1 -0
- package/dist/core/verified-run/writer-completion.js +27 -0
- package/dist/core/verified-run/writer-completion.js.map +1 -0
- package/dist/core/verified-run/writer-phase.d.ts +8 -0
- package/dist/core/verified-run/writer-phase.d.ts.map +1 -0
- package/dist/core/verified-run/writer-phase.js +76 -0
- package/dist/core/verified-run/writer-phase.js.map +1 -0
- package/dist/core/verified-run/writer-projection.d.ts +11 -0
- package/dist/core/verified-run/writer-projection.d.ts.map +1 -0
- package/dist/core/verified-run/writer-projection.js +71 -0
- package/dist/core/verified-run/writer-projection.js.map +1 -0
- package/dist/core/verified-run/writer-recovery.d.ts +16 -0
- package/dist/core/verified-run/writer-recovery.d.ts.map +1 -0
- package/dist/core/verified-run/writer-recovery.js +107 -0
- package/dist/core/verified-run/writer-recovery.js.map +1 -0
- package/dist/core/workload-permit-pool.d.ts +1 -3
- package/dist/core/workload-permit-pool.d.ts.map +1 -1
- package/dist/core/workload-permit-pool.js +11 -11
- package/dist/core/workload-permit-pool.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +2 -8
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/session-failure.d.ts +13 -0
- package/dist/modes/interactive/components/session-failure.d.ts.map +1 -0
- package/dist/modes/interactive/components/session-failure.js +81 -0
- package/dist/modes/interactive/components/session-failure.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +47 -36
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/resource-description.d.ts +3 -0
- package/dist/modes/interactive/resource-description.d.ts.map +1 -0
- package/dist/modes/interactive/resource-description.js +15 -0
- package/dist/modes/interactive/resource-description.js.map +1 -0
- package/dist/modes/interactive/tui-diagnostics.d.ts +36 -0
- package/dist/modes/interactive/tui-diagnostics.d.ts.map +1 -0
- package/dist/modes/interactive/tui-diagnostics.js +105 -0
- package/dist/modes/interactive/tui-diagnostics.js.map +1 -0
- package/dist/modes/interactive/tui-runtime-info.d.ts +20 -0
- package/dist/modes/interactive/tui-runtime-info.d.ts.map +1 -0
- package/dist/modes/interactive/tui-runtime-info.js +76 -0
- package/dist/modes/interactive/tui-runtime-info.js.map +1 -0
- package/docs/development.md +10 -0
- package/docs/devin-harness.md +121 -0
- package/docs/docs.json +4 -0
- package/docs/environment-variables.md +2 -1
- package/docs/index.md +1 -0
- package/docs/keybindings.md +1 -1
- package/docs/loadout-domains/README.md +2 -1
- package/docs/loadout-domains/devin-harness.md +72 -0
- package/docs/metrics.md +57 -16
- package/docs/providers.md +76 -0
- package/docs/release-audit-0.98.5.md +101 -0
- package/docs/release-audit-0.99.0.md +68 -0
- package/docs/run-protocol.md +34 -1
- package/docs/runtime-algorithms.md +30 -1
- package/docs/sdk.md +198 -1
- package/docs/settings.md +1 -1
- package/docs/startup-resource-labels-testing.md +47 -0
- package/docs/tb21-audit.md +18 -4
- package/docs/usage.md +59 -0
- package/docs/verified-run-remaining-design.md +881 -0
- package/docs/verified-run-testing.md +508 -0
- package/docs/verified-run.md +409 -0
- 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/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/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 +18 -18
- package/package.json +6 -6
|
@@ -14,8 +14,8 @@ export { formatResumeCommand } from "./interactive-resume-command.js";
|
|
|
14
14
|
import { getApiKeyLoginDisplayName, isApiKeyLoginProvider, resolveLoginProviderArg, } from "./interactive-login-options.js";
|
|
15
15
|
import { disposeComponent, ExpandableText, isExpandable, normalizeToolExecutionResult, } from "./interactive-tool-result.js";
|
|
16
16
|
export { getApiKeyLoginDisplayName, isApiKeyLoginProvider, resolveLoginProviderArg, } from "./interactive-login-options.js";
|
|
17
|
-
import { CombinedAutocompleteProvider, Container, fuzzyFilter, getCapabilities, hyperlink, Loader, Markdown, matchesKey, ProcessTerminal, Spacer, setKeybindings, Text, TruncatedText, TUI,
|
|
18
|
-
import { APP_NAME, APP_TITLE, getAgentDir, getAuthPath,
|
|
17
|
+
import { CombinedAutocompleteProvider, Container, fuzzyFilter, getCapabilities, hyperlink, Loader, Markdown, matchesKey, ProcessTerminal, Spacer, setKeybindings, Text, TruncatedText, TUI, } from "omk-tui";
|
|
18
|
+
import { APP_NAME, APP_TITLE, getAgentDir, getAuthPath, getDocsPath, getShareViewerUrl, VERSION, } from "../../config.js";
|
|
19
19
|
import { parseSkillBlock } from "../../core/agent-session.js";
|
|
20
20
|
import { SessionImportFileNotFoundError } from "../../core/agent-session-runtime.js";
|
|
21
21
|
import { parseBangInvocation } from "../../core/bang-skill-invocation.js";
|
|
@@ -32,7 +32,6 @@ import { decideResourceAdmission } from "../../core/resource-admission.js";
|
|
|
32
32
|
import { formatResourcePolicyLines, formatResourceProbeLines, formatResourceSummaryLines, resolveResourceGovernorSettings, } from "../../core/resource-governor-settings.js";
|
|
33
33
|
import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../core/session-cwd.js";
|
|
34
34
|
import { SessionManager } from "../../core/session-manager.js";
|
|
35
|
-
import { formatSessionTermination } from "../../core/session-termination.js";
|
|
36
35
|
import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
|
|
37
36
|
import { isInstallTelemetryEnabled } from "../../core/telemetry.js";
|
|
38
37
|
import { getChangelogPath, getNewEntries, parseChangelog } from "../../utils/changelog.js";
|
|
@@ -70,6 +69,7 @@ import { ModelSelectorComponent } from "./components/model-selector.js";
|
|
|
70
69
|
import { OAuthAccountSelectorComponent } from "./components/oauth-account-selector.js";
|
|
71
70
|
import { OAuthSelectorComponent } from "./components/oauth-selector.js";
|
|
72
71
|
import { ScopedModelsSelectorComponent } from "./components/scoped-models-selector.js";
|
|
72
|
+
import { SessionFailureComponent } from "./components/session-failure.js";
|
|
73
73
|
import { SessionSelectorComponent } from "./components/session-selector.js";
|
|
74
74
|
import { SettingsSelectorComponent, ThinkingSelectorComponent } from "./components/settings-selector.js";
|
|
75
75
|
import { SkillInvocationMessageComponent } from "./components/skill-invocation-message.js";
|
|
@@ -78,7 +78,11 @@ import { ToolExecutionComponent } from "./components/tool-execution.js";
|
|
|
78
78
|
import { TreeSelectorComponent } from "./components/tree-selector.js";
|
|
79
79
|
import { UserMessageComponent } from "./components/user-message.js";
|
|
80
80
|
import { UserMessageSelectorComponent } from "./components/user-message-selector.js";
|
|
81
|
+
import { formatResourceDescription } from "./resource-description.js";
|
|
81
82
|
import { getAvailableThemes, getAvailableThemesWithPaths, getEditorTheme, getMarkdownTheme, getThemeByName, initTheme, onThemeChange, setRegisteredThemes, setTheme, setThemeInstance, stopThemeWatcher, Theme, theme, } from "./theme/theme.js";
|
|
83
|
+
import { createTuiDiagnostics, createTuiDiagnosticsView, saveTuiDiagnostics } from "./tui-diagnostics.js";
|
|
84
|
+
import { captureTuiRuntime, inspectTuiRuntime } from "./tui-runtime-info.js";
|
|
85
|
+
const TUI_RUNTIME = captureTuiRuntime(import.meta.url);
|
|
82
86
|
const DEAD_TERMINAL_ERROR_CODES = new Set(["EIO", "EPIPE", "ENOTCONN"]);
|
|
83
87
|
/**
|
|
84
88
|
* Pseudo-entry for the thinking selector/autocomplete representing auto mode.
|
|
@@ -134,6 +138,7 @@ export class InteractiveMode {
|
|
|
134
138
|
// Stored so the same manager can be injected into custom editors, selectors, and extension UI.
|
|
135
139
|
keybindings;
|
|
136
140
|
version;
|
|
141
|
+
lastResourceReloadAt;
|
|
137
142
|
isInitialized = false;
|
|
138
143
|
onInputCallback;
|
|
139
144
|
pendingPromptPayloads = [];
|
|
@@ -300,11 +305,7 @@ export class InteractiveMode {
|
|
|
300
305
|
return scopePrefix;
|
|
301
306
|
}
|
|
302
307
|
prefixAutocompleteDescription(description, sourceInfo) {
|
|
303
|
-
|
|
304
|
-
if (!sourceTag) {
|
|
305
|
-
return description;
|
|
306
|
-
}
|
|
307
|
-
return description ? `[${sourceTag}] ${description}` : `[${sourceTag}]`;
|
|
308
|
+
return formatResourceDescription(description, this.getAutocompleteSourceTag(sourceInfo));
|
|
308
309
|
}
|
|
309
310
|
getBuiltInCommandConflictDiagnostics(extensionRunner) {
|
|
310
311
|
const builtinNames = new Set(BUILTIN_SLASH_COMMANDS.map((command) => command.name));
|
|
@@ -2422,8 +2423,8 @@ export class InteractiveMode {
|
|
|
2422
2423
|
await this.handleReloadCommand();
|
|
2423
2424
|
return;
|
|
2424
2425
|
}
|
|
2425
|
-
if (text === "/debug") {
|
|
2426
|
-
this.handleDebugCommand();
|
|
2426
|
+
if (text === "/debug" || text.startsWith("/debug ")) {
|
|
2427
|
+
this.handleDebugCommand(text.slice("/debug".length).trim());
|
|
2427
2428
|
this.editor.setText("");
|
|
2428
2429
|
return;
|
|
2429
2430
|
}
|
|
@@ -2869,13 +2870,22 @@ export class InteractiveMode {
|
|
|
2869
2870
|
return textBlocks.map((c) => c.text).join("");
|
|
2870
2871
|
}
|
|
2871
2872
|
showSessionTermination(termination) {
|
|
2872
|
-
if (termination.kind === "completed"
|
|
2873
|
+
if (termination.kind === "completed")
|
|
2874
|
+
return;
|
|
2875
|
+
const last = this.lastRenderedTermination;
|
|
2876
|
+
if (last?.sessionId === termination.sessionId &&
|
|
2877
|
+
last.runId === termination.runId &&
|
|
2878
|
+
last.timestamp === termination.timestamp &&
|
|
2879
|
+
last.causeCode === termination.causeCode &&
|
|
2880
|
+
last.source === termination.source)
|
|
2873
2881
|
return;
|
|
2874
2882
|
this.lastRenderedTermination = termination;
|
|
2875
2883
|
// compaction_end owns the concise cancellation status; rendering this too duplicates it as a scary error.
|
|
2876
2884
|
if (termination.causeCode === "compaction.aborted")
|
|
2877
2885
|
return;
|
|
2878
|
-
this.
|
|
2886
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
2887
|
+
this.chatContainer.addChild(new SessionFailureComponent(termination, this.toolOutputExpanded));
|
|
2888
|
+
this.ui.requestRender();
|
|
2879
2889
|
}
|
|
2880
2890
|
showPromptError(error, previousTermination) {
|
|
2881
2891
|
const termination = this.session.lastTermination;
|
|
@@ -4775,6 +4785,7 @@ export class InteractiveMode {
|
|
|
4775
4785
|
if (modelsJsonError) {
|
|
4776
4786
|
this.showError(`models.json error: ${modelsJsonError}`);
|
|
4777
4787
|
}
|
|
4788
|
+
this.lastResourceReloadAt = new Date().toISOString();
|
|
4778
4789
|
this.showStatus("Reloaded keybindings, extensions, skills, prompts, themes");
|
|
4779
4790
|
}
|
|
4780
4791
|
catch (error) {
|
|
@@ -5273,31 +5284,31 @@ export class InteractiveMode {
|
|
|
5273
5284
|
await this.handleFatalRuntimeError("Failed to create session", error);
|
|
5274
5285
|
}
|
|
5275
5286
|
}
|
|
5276
|
-
handleDebugCommand() {
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
const
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
}),
|
|
5292
|
-
"",
|
|
5293
|
-
"=== Agent messages (JSONL) ===",
|
|
5294
|
-
...this.session.messages.map((msg) => JSON.stringify(msg)),
|
|
5295
|
-
"",
|
|
5296
|
-
].join("\n");
|
|
5297
|
-
fs.mkdirSync(path.dirname(debugLogPath), { recursive: true });
|
|
5298
|
-
fs.writeFileSync(debugLogPath, debugData);
|
|
5287
|
+
handleDebugCommand(args = "") {
|
|
5288
|
+
if (args !== "" && args !== "save") {
|
|
5289
|
+
this.showError("Usage: /debug [save]. Raw transcripts are not part of diagnostics.");
|
|
5290
|
+
return;
|
|
5291
|
+
}
|
|
5292
|
+
const report = createTuiDiagnostics({
|
|
5293
|
+
runtime: inspectTuiRuntime(TUI_RUNTIME),
|
|
5294
|
+
columns: this.ui.terminal.columns,
|
|
5295
|
+
rows: this.ui.terminal.rows,
|
|
5296
|
+
isStreaming: this.session.isStreaming,
|
|
5297
|
+
isCompacting: this.session.isCompacting,
|
|
5298
|
+
messageCount: this.session.messages.length,
|
|
5299
|
+
termination: this.session.lastTermination,
|
|
5300
|
+
lastResourceReloadAt: this.lastResourceReloadAt,
|
|
5301
|
+
});
|
|
5299
5302
|
this.chatContainer.addChild(new Spacer(1));
|
|
5300
|
-
this.chatContainer.addChild(
|
|
5303
|
+
this.chatContainer.addChild(createTuiDiagnosticsView(report, TUI_RUNTIME));
|
|
5304
|
+
if (args === "save") {
|
|
5305
|
+
try {
|
|
5306
|
+
this.showStatus(`Metadata-only diagnostics saved locally: ${saveTuiDiagnostics(report)}`);
|
|
5307
|
+
}
|
|
5308
|
+
catch {
|
|
5309
|
+
this.showError("Could not save diagnostics. Check temporary-directory permissions; no transcript was exported.");
|
|
5310
|
+
}
|
|
5311
|
+
}
|
|
5301
5312
|
this.ui.requestRender();
|
|
5302
5313
|
}
|
|
5303
5314
|
handleArminSaysHi() {
|