open-multi-agent-kit 0.80.7 → 0.90.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 +5 -27
- package/README.md +81 -38
- package/dist/agents/jailbreak/index.d.ts +7 -0
- package/dist/agents/jailbreak/index.d.ts.map +1 -0
- package/dist/agents/jailbreak/index.js +7 -0
- package/dist/agents/jailbreak/index.js.map +1 -0
- package/dist/agents/jailbreak/subagent-f.d.ts +44 -0
- package/dist/agents/jailbreak/subagent-f.d.ts.map +1 -0
- package/dist/agents/jailbreak/subagent-f.js +60 -0
- package/dist/agents/jailbreak/subagent-f.js.map +1 -0
- package/dist/bun/register-bedrock.d.ts.map +1 -1
- package/dist/bun/register-bedrock.js +2 -2
- package/dist/bun/register-bedrock.js.map +1 -1
- package/dist/ci/verify-reporter.d.ts +22 -0
- package/dist/ci/verify-reporter.d.ts.map +1 -0
- package/dist/ci/verify-reporter.js +50 -0
- package/dist/ci/verify-reporter.js.map +1 -0
- package/dist/cli/args.d.ts +4 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +8 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +1 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/file-processor.d.ts +1 -1
- package/dist/cli/file-processor.d.ts.map +1 -1
- 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/jailbreak-args.d.ts +26 -0
- package/dist/cli/jailbreak-args.d.ts.map +1 -0
- package/dist/cli/jailbreak-args.js +86 -0
- package/dist/cli/jailbreak-args.js.map +1 -0
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js +1 -1
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js +1 -1
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/commands/doctor-provider.d.ts +19 -0
- package/dist/commands/doctor-provider.d.ts.map +1 -0
- package/dist/commands/doctor-provider.js +123 -0
- package/dist/commands/doctor-provider.js.map +1 -0
- package/dist/commands/jailbreak.d.ts +49 -0
- package/dist/commands/jailbreak.d.ts.map +1 -0
- package/dist/commands/jailbreak.js +201 -0
- package/dist/commands/jailbreak.js.map +1 -0
- package/dist/config.d.ts +9 -5
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +33 -52
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +2 -2
- 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 +16 -27
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +185 -89
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +3 -6
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +7 -7
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/automation/index.d.ts +359 -0
- package/dist/core/automation/index.d.ts.map +1 -0
- package/dist/core/automation/index.js +665 -0
- package/dist/core/automation/index.js.map +1 -0
- package/dist/core/bash-executor.d.ts +1 -0
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +1 -0
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/browser-use.d.ts +53 -0
- package/dist/core/browser-use.d.ts.map +1 -0
- package/dist/core/browser-use.js +108 -0
- package/dist/core/browser-use.js.map +1 -0
- package/dist/core/command-safety-parser.d.ts +77 -0
- package/dist/core/command-safety-parser.d.ts.map +1 -0
- package/dist/core/command-safety-parser.js +763 -0
- package/dist/core/command-safety-parser.js.map +1 -0
- package/dist/core/command-safety.d.ts.map +1 -1
- package/dist/core/command-safety.js +106 -3
- package/dist/core/command-safety.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +2 -2
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +5 -21
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +3 -101
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +21 -656
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/utils.d.ts +2 -2
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/compactor.d.ts +42 -0
- package/dist/core/compactor.d.ts.map +1 -0
- package/dist/core/compactor.js +131 -0
- package/dist/core/compactor.js.map +1 -0
- package/dist/core/context-budget-compressors.d.ts +50 -0
- package/dist/core/context-budget-compressors.d.ts.map +1 -0
- package/dist/core/context-budget-compressors.js +166 -0
- package/dist/core/context-budget-compressors.js.map +1 -0
- package/dist/core/context-budget-governor-v2.d.ts +7 -0
- package/dist/core/context-budget-governor-v2.d.ts.map +1 -0
- package/dist/core/context-budget-governor-v2.js +7 -0
- package/dist/core/context-budget-governor-v2.js.map +1 -0
- package/dist/core/context-budget-governor.d.ts +67 -0
- package/dist/core/context-budget-governor.d.ts.map +1 -0
- package/dist/core/context-budget-governor.js +224 -0
- package/dist/core/context-budget-governor.js.map +1 -0
- package/dist/core/context-budget-headroom-candidates.d.ts +3 -0
- package/dist/core/context-budget-headroom-candidates.d.ts.map +1 -0
- package/dist/core/context-budget-headroom-candidates.js +85 -0
- package/dist/core/context-budget-headroom-candidates.js.map +1 -0
- package/dist/core/context-budget-headroom-types.d.ts +67 -0
- package/dist/core/context-budget-headroom-types.d.ts.map +1 -0
- package/dist/core/context-budget-headroom-types.js +46 -0
- package/dist/core/context-budget-headroom-types.js.map +1 -0
- package/dist/core/context-budget-headroom.d.ts +5 -0
- package/dist/core/context-budget-headroom.d.ts.map +1 -0
- package/dist/core/context-budget-headroom.js +123 -0
- package/dist/core/context-budget-headroom.js.map +1 -0
- package/dist/core/context-budget-relevance.d.ts +46 -0
- package/dist/core/context-budget-relevance.d.ts.map +1 -0
- package/dist/core/context-budget-relevance.js +329 -0
- package/dist/core/context-budget-relevance.js.map +1 -0
- package/dist/core/context-budget-system-prompt-items.d.ts +19 -0
- package/dist/core/context-budget-system-prompt-items.d.ts.map +1 -0
- package/dist/core/context-budget-system-prompt-items.js +143 -0
- package/dist/core/context-budget-system-prompt-items.js.map +1 -0
- package/dist/core/context-budget-system-prompt.d.ts +31 -0
- package/dist/core/context-budget-system-prompt.d.ts.map +1 -0
- package/dist/core/context-budget-system-prompt.js +87 -0
- package/dist/core/context-budget-system-prompt.js.map +1 -0
- package/dist/core/context-budget-token-counter.d.ts +34 -0
- package/dist/core/context-budget-token-counter.d.ts.map +1 -0
- package/dist/core/context-budget-token-counter.js +315 -0
- package/dist/core/context-budget-token-counter.js.map +1 -0
- package/dist/core/context-budget-v2-coverage.d.ts +5 -0
- package/dist/core/context-budget-v2-coverage.d.ts.map +1 -0
- package/dist/core/context-budget-v2-coverage.js +58 -0
- package/dist/core/context-budget-v2-coverage.js.map +1 -0
- package/dist/core/context-budget-v2-plan-hash.d.ts +12 -0
- package/dist/core/context-budget-v2-plan-hash.d.ts.map +1 -0
- package/dist/core/context-budget-v2-plan-hash.js +38 -0
- package/dist/core/context-budget-v2-plan-hash.js.map +1 -0
- package/dist/core/context-budget-v2-planner.d.ts +3 -0
- package/dist/core/context-budget-v2-planner.d.ts.map +1 -0
- package/dist/core/context-budget-v2-planner.js +143 -0
- package/dist/core/context-budget-v2-planner.js.map +1 -0
- package/dist/core/context-budget-v2-scoring.d.ts +14 -0
- package/dist/core/context-budget-v2-scoring.d.ts.map +1 -0
- package/dist/core/context-budget-v2-scoring.js +114 -0
- package/dist/core/context-budget-v2-scoring.js.map +1 -0
- package/dist/core/context-budget-v2-selection.d.ts +32 -0
- package/dist/core/context-budget-v2-selection.d.ts.map +1 -0
- package/dist/core/context-budget-v2-selection.js +158 -0
- package/dist/core/context-budget-v2-selection.js.map +1 -0
- package/dist/core/context-budget-v2-tiers.d.ts +15 -0
- package/dist/core/context-budget-v2-tiers.d.ts.map +1 -0
- package/dist/core/context-budget-v2-tiers.js +68 -0
- package/dist/core/context-budget-v2-tiers.js.map +1 -0
- package/dist/core/context-budget-v2-types.d.ts +92 -0
- package/dist/core/context-budget-v2-types.d.ts.map +1 -0
- package/dist/core/context-budget-v2-types.js +24 -0
- package/dist/core/context-budget-v2-types.js.map +1 -0
- package/dist/core/defaults.d.ts +1 -1
- package/dist/core/defaults.d.ts.map +1 -1
- package/dist/core/defaults.js.map +1 -1
- package/dist/core/diagnostics.d.ts +6 -0
- package/dist/core/diagnostics.d.ts.map +1 -1
- package/dist/core/diagnostics.js.map +1 -1
- package/dist/core/domain-confidence.d.ts +9 -0
- package/dist/core/domain-confidence.d.ts.map +1 -0
- package/dist/core/domain-confidence.js +39 -0
- package/dist/core/domain-confidence.js.map +1 -0
- package/dist/core/domain-dispatch.d.ts +44 -0
- package/dist/core/domain-dispatch.d.ts.map +1 -0
- package/dist/core/domain-dispatch.js +118 -0
- package/dist/core/domain-dispatch.js.map +1 -0
- package/dist/core/domain-loadouts.d.ts +76 -0
- package/dist/core/domain-loadouts.d.ts.map +1 -0
- package/dist/core/domain-loadouts.js +981 -0
- package/dist/core/domain-loadouts.js.map +1 -0
- package/dist/core/domain-registry.d.ts +7 -0
- package/dist/core/domain-registry.d.ts.map +1 -0
- package/dist/core/domain-registry.js +11 -0
- package/dist/core/domain-registry.js.map +1 -0
- package/dist/core/domain-router.d.ts +16 -0
- package/dist/core/domain-router.d.ts.map +1 -0
- package/dist/core/domain-router.js +24 -0
- package/dist/core/domain-router.js.map +1 -0
- package/dist/core/domain-score.d.ts +13 -0
- package/dist/core/domain-score.d.ts.map +1 -0
- package/dist/core/domain-score.js +48 -0
- package/dist/core/domain-score.js.map +1 -0
- package/dist/core/domain-trigger-match.d.ts +14 -0
- package/dist/core/domain-trigger-match.d.ts.map +1 -0
- package/dist/core/domain-trigger-match.js +51 -0
- package/dist/core/domain-trigger-match.js.map +1 -0
- package/dist/core/domain-types.d.ts +30 -0
- package/dist/core/domain-types.d.ts.map +1 -0
- package/dist/core/domain-types.js +2 -0
- package/dist/core/domain-types.js.map +1 -0
- package/dist/core/exact-cache-policy.d.ts +8 -0
- package/dist/core/exact-cache-policy.d.ts.map +1 -1
- package/dist/core/exact-cache-policy.js +9 -0
- package/dist/core/exact-cache-policy.js.map +1 -1
- package/dist/core/exec.d.ts +0 -2
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js +0 -1
- package/dist/core/exec.js.map +1 -1
- package/dist/core/export-html/index.d.ts +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/template.js +1 -3
- 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/extensions/builtin/command-safety-gate.d.ts +3 -0
- package/dist/core/extensions/builtin/command-safety-gate.d.ts.map +1 -1
- package/dist/core/extensions/builtin/command-safety-gate.js +15 -3
- package/dist/core/extensions/builtin/command-safety-gate.js.map +1 -1
- package/dist/core/extensions/builtin/todo-checklist.d.ts +20 -0
- package/dist/core/extensions/builtin/todo-checklist.d.ts.map +1 -0
- package/dist/core/extensions/builtin/todo-checklist.js +73 -0
- package/dist/core/extensions/builtin/todo-checklist.js.map +1 -0
- package/dist/core/extensions/loader.d.ts +4 -4
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +57 -92
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +3 -3
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +1 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +7 -35
- 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 +1 -1
- package/dist/core/extensions/wrapper.d.ts.map +1 -1
- package/dist/core/extensions/wrapper.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +3 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +4 -0
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/headroom.d.ts +45 -0
- package/dist/core/headroom.d.ts.map +1 -0
- package/dist/core/headroom.js +171 -0
- package/dist/core/headroom.js.map +1 -0
- package/dist/core/hook-inventory.d.ts +4 -2
- package/dist/core/hook-inventory.d.ts.map +1 -1
- package/dist/core/hook-inventory.js +80 -11
- package/dist/core/hook-inventory.js.map +1 -1
- package/dist/core/hooks/fail-closed.d.ts +4 -1
- package/dist/core/hooks/fail-closed.d.ts.map +1 -1
- package/dist/core/hooks/fail-closed.js +79 -5
- package/dist/core/hooks/fail-closed.js.map +1 -1
- package/dist/core/hooks/index.d.ts +2 -2
- package/dist/core/hooks/index.d.ts.map +1 -1
- package/dist/core/hooks/index.js +1 -1
- package/dist/core/hooks/index.js.map +1 -1
- package/dist/core/hooks/types.d.ts +9 -0
- package/dist/core/hooks/types.d.ts.map +1 -1
- package/dist/core/hooks/types.js.map +1 -1
- package/dist/core/keybindings.d.ts +2 -14
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +1 -31
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/lean-ctx.d.ts +99 -0
- package/dist/core/lean-ctx.d.ts.map +1 -0
- package/dist/core/lean-ctx.js +225 -0
- package/dist/core/lean-ctx.js.map +1 -0
- package/dist/core/loadout-compose.d.ts +53 -0
- package/dist/core/loadout-compose.d.ts.map +1 -0
- package/dist/core/loadout-compose.js +172 -0
- package/dist/core/loadout-compose.js.map +1 -0
- package/dist/core/loadout-policy-bridge.d.ts +22 -0
- package/dist/core/loadout-policy-bridge.d.ts.map +1 -0
- package/dist/core/loadout-policy-bridge.js +52 -0
- package/dist/core/loadout-policy-bridge.js.map +1 -0
- package/dist/core/loadout-runtime.d.ts +22 -0
- package/dist/core/loadout-runtime.d.ts.map +1 -1
- package/dist/core/loadout-runtime.js +41 -5
- package/dist/core/loadout-runtime.js.map +1 -1
- package/dist/core/loadout-safety.d.ts +55 -0
- package/dist/core/loadout-safety.d.ts.map +1 -0
- package/dist/core/loadout-safety.js +213 -0
- package/dist/core/loadout-safety.js.map +1 -0
- package/dist/core/loadouts.d.ts +4 -2
- package/dist/core/loadouts.d.ts.map +1 -1
- package/dist/core/loadouts.js +116 -5
- package/dist/core/loadouts.js.map +1 -1
- package/dist/core/loop-gates.d.ts +48 -0
- package/dist/core/loop-gates.d.ts.map +1 -0
- package/dist/core/loop-gates.js +352 -0
- package/dist/core/loop-gates.js.map +1 -0
- package/dist/core/loop-registry.d.ts +77 -0
- package/dist/core/loop-registry.d.ts.map +1 -0
- package/dist/core/loop-registry.js +831 -0
- package/dist/core/loop-registry.js.map +1 -0
- package/dist/core/loop-types.d.ts +194 -0
- package/dist/core/loop-types.d.ts.map +1 -0
- package/dist/core/loop-types.js +2 -0
- package/dist/core/loop-types.js.map +1 -0
- package/dist/core/mcp-inventory.d.ts +7 -0
- package/dist/core/mcp-inventory.d.ts.map +1 -1
- package/dist/core/mcp-inventory.js +5 -1
- package/dist/core/mcp-inventory.js.map +1 -1
- package/dist/core/mcp-presets.d.ts +43 -2
- package/dist/core/mcp-presets.d.ts.map +1 -1
- package/dist/core/mcp-presets.js +298 -2
- package/dist/core/mcp-presets.js.map +1 -1
- package/dist/core/messages.d.ts +3 -3
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js.map +1 -1
- package/dist/core/metrics-sampler.d.ts +11 -0
- package/dist/core/metrics-sampler.d.ts.map +1 -1
- package/dist/core/metrics-sampler.js +52 -13
- package/dist/core/metrics-sampler.js.map +1 -1
- package/dist/core/model-registry.d.ts +1 -2
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +18 -41
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +2 -2
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +2 -2
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/package-gallery-identity.d.ts +7 -0
- package/dist/core/package-gallery-identity.d.ts.map +1 -0
- package/dist/core/package-gallery-identity.js +31 -0
- package/dist/core/package-gallery-identity.js.map +1 -0
- package/dist/core/package-gallery-install.d.ts +6 -0
- package/dist/core/package-gallery-install.d.ts.map +1 -0
- package/dist/core/package-gallery-install.js +59 -0
- package/dist/core/package-gallery-install.js.map +1 -0
- package/dist/core/package-gallery-manifest.d.ts +13 -0
- package/dist/core/package-gallery-manifest.d.ts.map +1 -0
- package/dist/core/package-gallery-manifest.js +183 -0
- package/dist/core/package-gallery-manifest.js.map +1 -0
- package/dist/core/package-gallery-trial.d.ts +4 -0
- package/dist/core/package-gallery-trial.d.ts.map +1 -0
- package/dist/core/package-gallery-trial.js +55 -0
- package/dist/core/package-gallery-trial.js.map +1 -0
- package/dist/core/package-gallery-types.d.ts +71 -0
- package/dist/core/package-gallery-types.d.ts.map +1 -0
- package/dist/core/package-gallery-types.js +2 -0
- package/dist/core/package-gallery-types.js.map +1 -0
- package/dist/core/package-gallery.d.ts +5 -123
- package/dist/core/package-gallery.d.ts.map +1 -1
- package/dist/core/package-gallery.js +5 -391
- package/dist/core/package-gallery.js.map +1 -1
- package/dist/core/package-manager.d.ts +0 -69
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +69 -367
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/package-procurement.d.ts +4 -4
- package/dist/core/package-procurement.d.ts.map +1 -1
- package/dist/core/package-procurement.js +29 -17
- package/dist/core/package-procurement.js.map +1 -1
- package/dist/core/pi-package-intake-candidates.d.ts +21 -0
- package/dist/core/pi-package-intake-candidates.d.ts.map +1 -0
- package/dist/core/pi-package-intake-candidates.js +109 -0
- package/dist/core/pi-package-intake-candidates.js.map +1 -0
- package/dist/core/pi-package-intake.d.ts +43 -0
- package/dist/core/pi-package-intake.d.ts.map +1 -0
- package/dist/core/pi-package-intake.js +122 -0
- package/dist/core/pi-package-intake.js.map +1 -0
- package/dist/core/provider-attribution.d.ts +1 -1
- package/dist/core/provider-attribution.d.ts.map +1 -1
- package/dist/core/provider-attribution.js.map +1 -1
- 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/read-anchors.d.ts +1 -1
- package/dist/core/read-anchors.d.ts.map +1 -1
- package/dist/core/read-anchors.js +1 -1
- package/dist/core/read-anchors.js.map +1 -1
- package/dist/core/recovery-checkpoint.d.ts +2 -2
- package/dist/core/recovery-checkpoint.d.ts.map +1 -1
- package/dist/core/recovery-checkpoint.js +2 -2
- package/dist/core/recovery-checkpoint.js.map +1 -1
- package/dist/core/resolve-config-value.d.ts +1 -1
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js +2 -30
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/resource-loader.d.ts +12 -20
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +67 -90
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sandbox-policy-v2.d.ts +49 -0
- package/dist/core/sandbox-policy-v2.d.ts.map +1 -0
- package/dist/core/sandbox-policy-v2.js +368 -0
- package/dist/core/sandbox-policy-v2.js.map +1 -0
- package/dist/core/sdk.d.ts +10 -78
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +97 -139
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/semantic-cache-policy.d.ts +7 -1
- package/dist/core/semantic-cache-policy.d.ts.map +1 -1
- package/dist/core/semantic-cache-policy.js +8 -0
- package/dist/core/semantic-cache-policy.js.map +1 -1
- package/dist/core/session-manager.d.ts +2 -4
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +5 -6
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +1 -18
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +2 -48
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts +5 -0
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +149 -36
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +0 -2
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/subagent-orchestration.d.ts +73 -0
- package/dist/core/subagent-orchestration.d.ts.map +1 -0
- package/dist/core/subagent-orchestration.js +408 -0
- package/dist/core/subagent-orchestration.js.map +1 -0
- package/dist/core/system-prompt.d.ts +5 -4
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +57 -36
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/timings.d.ts +0 -4
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js +0 -4
- package/dist/core/timings.js.map +1 -1
- package/dist/core/todo-runtime-state.d.ts +5 -0
- package/dist/core/todo-runtime-state.d.ts.map +1 -0
- package/dist/core/todo-runtime-state.js +12 -0
- package/dist/core/todo-runtime-state.js.map +1 -0
- package/dist/core/todo-state.d.ts +53 -0
- package/dist/core/todo-state.d.ts.map +1 -0
- package/dist/core/todo-state.js +87 -0
- package/dist/core/todo-state.js.map +1 -0
- package/dist/core/token-optimizer.d.ts +58 -0
- package/dist/core/token-optimizer.d.ts.map +1 -0
- package/dist/core/token-optimizer.js +179 -0
- package/dist/core/token-optimizer.js.map +1 -0
- package/dist/core/tools/bash.d.ts +8 -9
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +9 -8
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts +3 -14
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +4 -25
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts +1 -4
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +1 -4
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +1 -4
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +2 -5
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts +2 -2
- 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 +1 -4
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +1 -4
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts +2 -14
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +4 -28
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +1 -1
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +1 -1
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts +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/write.d.ts +2 -4
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +4 -4
- package/dist/core/tools/write.js.map +1 -1
- package/dist/encoding/index.d.ts +6 -0
- package/dist/encoding/index.d.ts.map +1 -0
- package/dist/encoding/index.js +6 -0
- package/dist/encoding/index.js.map +1 -0
- package/dist/encoding/l4-encoder.d.ts +96 -0
- package/dist/encoding/l4-encoder.d.ts.map +1 -0
- package/dist/encoding/l4-encoder.js +474 -0
- package/dist/encoding/l4-encoder.js.map +1 -0
- package/dist/fuzzing/index.d.ts +6 -0
- package/dist/fuzzing/index.d.ts.map +1 -0
- package/dist/fuzzing/index.js +6 -0
- package/dist/fuzzing/index.js.map +1 -0
- package/dist/fuzzing/mutation-engine.d.ts +93 -0
- package/dist/fuzzing/mutation-engine.d.ts.map +1 -0
- package/dist/fuzzing/mutation-engine.js +244 -0
- package/dist/fuzzing/mutation-engine.js.map +1 -0
- package/dist/guardrails/audit-logger.d.ts +4 -0
- package/dist/guardrails/audit-logger.d.ts.map +1 -0
- package/dist/guardrails/audit-logger.js +28 -0
- package/dist/guardrails/audit-logger.js.map +1 -0
- package/dist/guardrails/evidence-system.d.ts +61 -0
- package/dist/guardrails/evidence-system.d.ts.map +1 -0
- package/dist/guardrails/evidence-system.js +302 -0
- package/dist/guardrails/evidence-system.js.map +1 -0
- package/dist/guardrails/freedomd-adapter.d.ts +16 -0
- package/dist/guardrails/freedomd-adapter.d.ts.map +1 -0
- package/dist/guardrails/freedomd-adapter.js +87 -0
- package/dist/guardrails/freedomd-adapter.js.map +1 -0
- package/dist/index.d.ts +5 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -17
- package/dist/index.js.map +1 -1
- package/dist/jailbreak-extension.d.ts +48 -0
- package/dist/jailbreak-extension.d.ts.map +1 -0
- package/dist/jailbreak-extension.js +47 -0
- package/dist/jailbreak-extension.js.map +1 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +2 -2
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts +0 -37
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +6 -414
- package/dist/migrations.js.map +1 -1
- package/dist/modes/interactive/components/armin.d.ts +1 -1
- package/dist/modes/interactive/components/armin.d.ts.map +1 -1
- package/dist/modes/interactive/components/armin.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +2 -2
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +1 -1
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +1 -1
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.js +1 -1
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +1 -1
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/control-panel-box.d.ts +15 -0
- package/dist/modes/interactive/components/control-panel-box.d.ts.map +1 -0
- package/dist/modes/interactive/components/control-panel-box.js +55 -0
- package/dist/modes/interactive/components/control-panel-box.js.map +1 -0
- package/dist/modes/interactive/components/control-panel-gradient-motion.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel-gradient-motion.js +2 -36
- package/dist/modes/interactive/components/control-panel-gradient-motion.js.map +1 -1
- package/dist/modes/interactive/components/control-panel-gradient.d.ts +1 -0
- package/dist/modes/interactive/components/control-panel-gradient.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel-gradient.js +6 -5
- package/dist/modes/interactive/components/control-panel-gradient.js.map +1 -1
- package/dist/modes/interactive/components/control-panel-layout.d.ts +30 -0
- package/dist/modes/interactive/components/control-panel-layout.d.ts.map +1 -0
- package/dist/modes/interactive/components/control-panel-layout.js +197 -0
- package/dist/modes/interactive/components/control-panel-layout.js.map +1 -0
- package/dist/modes/interactive/components/control-panel-runtime-status.d.ts +6 -0
- package/dist/modes/interactive/components/control-panel-runtime-status.d.ts.map +1 -0
- package/dist/modes/interactive/components/control-panel-runtime-status.js +29 -0
- package/dist/modes/interactive/components/control-panel-runtime-status.js.map +1 -0
- package/dist/modes/interactive/components/control-panel.d.ts +9 -31
- package/dist/modes/interactive/components/control-panel.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel.js +49 -168
- package/dist/modes/interactive/components/control-panel.js.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts +1 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +14 -22
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +1 -1
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/daxnuts.d.ts +1 -1
- package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -1
- package/dist/modes/interactive/components/daxnuts.js.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts +1 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts +1 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.js +1 -1
- package/dist/modes/interactive/components/earendil-announcement.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +1 -1
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.js +1 -1
- package/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +1 -1
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +7 -9
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +0 -2
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +0 -2
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +2 -2
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +2 -2
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +13 -47
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +118 -193
- package/dist/modes/interactive/components/model-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 +1 -1
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +2 -2
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js +1 -1
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +1 -1
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +3 -3
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +1 -1
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts +1 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.js +1 -1
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/theme-selector.d.ts +1 -2
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/theme-selector.js +2 -11
- package/dist/modes/interactive/components/theme-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts +8 -7
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +48 -7
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/todo-checklist.d.ts +31 -0
- package/dist/modes/interactive/components/todo-checklist.d.ts.map +1 -0
- package/dist/modes/interactive/components/todo-checklist.js +121 -0
- package/dist/modes/interactive/components/todo-checklist.js.map +1 -0
- package/dist/modes/interactive/components/tool-execution.d.ts +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +1 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +1 -1
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +1 -1
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +1 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +1 -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 +1 -1
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +3 -8
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +80 -232
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/omk-control-grid-dark.json +65 -77
- package/dist/modes/interactive/theme/omk-neon-control.json +90 -0
- package/dist/modes/interactive/theme/rust-forge.json +14 -24
- package/dist/modes/interactive/theme/theme.d.ts +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +25 -45
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/print-mode.d.ts +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +2 -2
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- 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 +0 -4
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +2 -2
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/modules/index.d.ts +8 -0
- package/dist/modules/index.d.ts.map +1 -0
- package/dist/modules/index.js +7 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/modules/lrl-bypass.d.ts +40 -0
- package/dist/modules/lrl-bypass.d.ts.map +1 -0
- package/dist/modules/lrl-bypass.js +84 -0
- package/dist/modules/lrl-bypass.js.map +1 -0
- package/dist/modules/lrl-deps.d.ts +38 -0
- package/dist/modules/lrl-deps.d.ts.map +1 -0
- package/dist/modules/lrl-deps.js +128 -0
- package/dist/modules/lrl-deps.js.map +1 -0
- package/dist/multiturn/easl-chain.d.ts +113 -0
- package/dist/multiturn/easl-chain.d.ts.map +1 -0
- package/dist/multiturn/easl-chain.js +351 -0
- package/dist/multiturn/easl-chain.js.map +1 -0
- package/dist/multiturn/index.d.ts +6 -0
- package/dist/multiturn/index.d.ts.map +1 -0
- package/dist/multiturn/index.js +6 -0
- package/dist/multiturn/index.js.map +1 -0
- package/dist/orchestration/lane-grant-auditor.d.ts +4 -0
- package/dist/orchestration/lane-grant-auditor.d.ts.map +1 -0
- package/dist/orchestration/lane-grant-auditor.js +87 -0
- package/dist/orchestration/lane-grant-auditor.js.map +1 -0
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +48 -113
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/routing/fallback-router.d.ts +123 -0
- package/dist/routing/fallback-router.d.ts.map +1 -0
- package/dist/routing/fallback-router.js +355 -0
- package/dist/routing/fallback-router.js.map +1 -0
- package/dist/routing/index.d.ts +6 -0
- package/dist/routing/index.d.ts.map +1 -0
- package/dist/routing/index.js +6 -0
- package/dist/routing/index.js.map +1 -0
- package/dist/types/evidence.d.ts +117 -0
- package/dist/types/evidence.d.ts.map +1 -0
- package/dist/types/evidence.js +8 -0
- package/dist/types/evidence.js.map +1 -0
- package/dist/types/guardrails.d.ts +61 -0
- package/dist/types/guardrails.d.ts.map +1 -0
- package/dist/types/guardrails.js +9 -0
- package/dist/types/guardrails.js.map +1 -0
- package/dist/types/jailbreak.d.ts +246 -0
- package/dist/types/jailbreak.d.ts.map +1 -0
- package/dist/types/jailbreak.js +8 -0
- package/dist/types/jailbreak.js.map +1 -0
- package/dist/types/lane-grant.d.ts +58 -0
- package/dist/types/lane-grant.d.ts.map +1 -0
- package/dist/types/lane-grant.js +9 -0
- package/dist/types/lane-grant.js.map +1 -0
- package/dist/utils/jailbreak/common.d.ts +63 -0
- package/dist/utils/jailbreak/common.d.ts.map +1 -0
- package/dist/utils/jailbreak/common.js +130 -0
- package/dist/utils/jailbreak/common.js.map +1 -0
- package/dist/utils/jailbreak/index.d.ts +7 -0
- package/dist/utils/jailbreak/index.d.ts.map +1 -0
- package/dist/utils/jailbreak/index.js +7 -0
- package/dist/utils/jailbreak/index.js.map +1 -0
- package/dist/utils/windows-self-update.d.ts.map +1 -1
- package/dist/utils/windows-self-update.js +1 -1
- package/dist/utils/windows-self-update.js.map +1 -1
- package/docs/compaction.md +8 -21
- package/docs/custom-provider.md +2 -2
- package/docs/development.md +1 -1
- package/docs/extensions.md +11 -11
- package/docs/loadout-domains/README.md +70 -0
- package/docs/loadout-domains/ai-agent-ops.md +94 -0
- package/docs/loadout-domains/backend-api.md +116 -0
- package/docs/loadout-domains/data-science.md +100 -0
- package/docs/loadout-domains/devops-infra.md +85 -0
- package/docs/loadout-domains/docs-writing.md +92 -0
- package/docs/loadout-domains/frontend-ui.md +128 -0
- package/docs/loadout-domains/general.md +62 -0
- package/docs/loadout-domains/mobile.md +84 -0
- package/docs/loadout-domains/qa-testing.md +87 -0
- package/docs/loadout-domains/research.md +80 -0
- package/docs/loadout-domains/security-audit.md +97 -0
- package/docs/packages.md +7 -48
- package/docs/prompt-templates.md +0 -2
- package/docs/providers.md +12 -0
- package/docs/sdk.md +3 -3
- package/docs/security.md +145 -0
- package/docs/session-format.md +1 -1
- package/docs/themes.md +8 -7
- package/docs/tui.md +14 -14
- package/docs/usage.md +6 -16
- package/examples/extensions/README.md +2 -2
- package/examples/extensions/aside-computer-use/README.md +114 -0
- package/examples/extensions/aside-computer-use/action-scoring.ts +122 -0
- package/examples/extensions/aside-computer-use/assertions.ts +380 -0
- package/examples/extensions/aside-computer-use/controller.ts +491 -0
- package/examples/extensions/aside-computer-use/evidence.ts +229 -0
- package/examples/extensions/aside-computer-use/golden-trace.ts +141 -0
- package/examples/extensions/aside-computer-use/index.ts +76 -0
- package/examples/extensions/aside-computer-use/mcp-client.ts +381 -0
- package/examples/extensions/aside-computer-use/observation-snapshot.ts +121 -0
- package/examples/extensions/aside-computer-use/package.json +16 -0
- package/examples/extensions/aside-computer-use/policy.ts +257 -0
- package/examples/extensions/aside-computer-use/risk-authorize.ts +200 -0
- package/examples/extensions/aside-computer-use/risk-classifier.ts +205 -0
- package/examples/extensions/aside-computer-use/schema-fingerprint.ts +80 -0
- package/examples/extensions/aside-computer-use/session-binding.ts +161 -0
- package/examples/extensions/aside-computer-use/tools.ts +449 -0
- package/examples/extensions/aside-computer-use/types.ts +217 -0
- package/examples/extensions/aside-computer-use/url-origin.ts +132 -0
- package/examples/extensions/bash-spawn-hook.ts +1 -1
- package/examples/extensions/border-status-editor.ts +2 -2
- package/examples/extensions/built-in-tool-renderer.ts +1 -1
- package/examples/extensions/custom-compaction.ts +1 -1
- package/examples/extensions/custom-footer.ts +2 -2
- package/examples/extensions/custom-header.ts +8 -8
- package/examples/extensions/custom-provider-anthropic/index.ts +1 -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/index.ts +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +1 -1
- package/examples/extensions/doom-overlay/README.md +1 -2
- package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
- package/examples/extensions/doom-overlay/doom/build.sh +4 -4
- package/examples/extensions/doom-overlay/doom/doomgeneric_omk.c +72 -0
- package/examples/extensions/doom-overlay/doom-component.ts +2 -2
- package/examples/extensions/doom-overlay/doom-keys.ts +1 -1
- package/examples/extensions/git-merge-and-resolve.ts +1 -1
- package/examples/extensions/github-issue-autocomplete.ts +1 -6
- package/examples/extensions/gondolin/index.ts +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/handoff.ts +2 -2
- package/examples/extensions/hello.ts +1 -1
- package/examples/extensions/inline-bash.ts +1 -1
- package/examples/extensions/input-transform-streaming.ts +1 -1
- package/examples/extensions/input-transform.ts +2 -2
- package/examples/extensions/mac-system-theme.ts +1 -1
- package/examples/extensions/message-renderer.ts +1 -1
- package/examples/extensions/minimal-mode.ts +1 -1
- package/examples/extensions/modal-editor.ts +1 -1
- package/examples/extensions/overlay-qa-tests.ts +7 -7
- package/examples/extensions/overlay-test.ts +1 -1
- package/examples/extensions/plan-mode/index.ts +3 -3
- package/examples/extensions/preset.ts +4 -4
- package/examples/extensions/provider-payload.ts +6 -3
- package/examples/extensions/qna.ts +1 -1
- package/examples/extensions/question.ts +1 -1
- package/examples/extensions/questionnaire.ts +1 -1
- package/examples/extensions/rpc-demo.ts +1 -1
- package/examples/extensions/sandbox/index.ts +2 -2
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/shutdown-command.ts +5 -5
- package/examples/extensions/snake.ts +1 -1
- package/examples/extensions/space-invaders.ts +1 -1
- package/examples/extensions/structured-output.ts +1 -1
- package/examples/extensions/subagent/agents.ts +2 -2
- package/examples/extensions/subagent/index.ts +19 -51
- package/examples/extensions/summarize.ts +2 -2
- package/examples/extensions/tic-tac-toe.ts +2 -2
- package/examples/extensions/todo.ts +2 -2
- package/examples/extensions/tool-override.ts +1 -1
- package/examples/extensions/tools.ts +1 -1
- package/examples/extensions/truncated-tool.ts +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/extensions/working-indicator.ts +3 -3
- package/examples/rpc-extension-ui.ts +1 -9
- package/examples/sdk/02-custom-model.ts +1 -1
- package/examples/sdk/07-context-files.ts +0 -2
- package/examples/sdk/12-full-control.ts +1 -1
- package/examples/sdk/README.md +1 -1
- package/npm-shrinkwrap.json +1805 -0
- package/package.json +10 -32
- package/dist/core/compaction/pruner-policy.d.ts +0 -84
- package/dist/core/compaction/pruner-policy.d.ts.map +0 -1
- package/dist/core/compaction/pruner-policy.js +0 -273
- package/dist/core/compaction/pruner-policy.js.map +0 -1
- package/dist/core/context-graph-identity-resolution.d.ts +0 -114
- package/dist/core/context-graph-identity-resolution.d.ts.map +0 -1
- package/dist/core/context-graph-identity-resolution.js +0 -127
- package/dist/core/context-graph-identity-resolution.js.map +0 -1
- package/dist/core/context-graph-memory-store.d.ts +0 -153
- package/dist/core/context-graph-memory-store.d.ts.map +0 -1
- package/dist/core/context-graph-memory-store.js +0 -377
- package/dist/core/context-graph-memory-store.js.map +0 -1
- package/dist/core/context-graph-ontology-generation.d.ts +0 -104
- package/dist/core/context-graph-ontology-generation.d.ts.map +0 -1
- package/dist/core/context-graph-ontology-generation.js +0 -135
- package/dist/core/context-graph-ontology-generation.js.map +0 -1
- package/dist/core/context-graph-ontology-registry.d.ts +0 -766
- package/dist/core/context-graph-ontology-registry.d.ts.map +0 -1
- package/dist/core/context-graph-ontology-registry.js +0 -1133
- package/dist/core/context-graph-ontology-registry.js.map +0 -1
- package/dist/core/context-graph-policy.d.ts +0 -68
- package/dist/core/context-graph-policy.d.ts.map +0 -1
- package/dist/core/context-graph-policy.js +0 -221
- package/dist/core/context-graph-policy.js.map +0 -1
- package/dist/core/context-graph-reasoning.d.ts +0 -130
- package/dist/core/context-graph-reasoning.d.ts.map +0 -1
- package/dist/core/context-graph-reasoning.js +0 -442
- package/dist/core/context-graph-reasoning.js.map +0 -1
- package/dist/core/context-graph-retrieval.d.ts +0 -120
- package/dist/core/context-graph-retrieval.d.ts.map +0 -1
- package/dist/core/context-graph-retrieval.js +0 -288
- package/dist/core/context-graph-retrieval.js.map +0 -1
- package/dist/core/contract-verification.d.ts +0 -78
- package/dist/core/contract-verification.d.ts.map +0 -1
- package/dist/core/contract-verification.js +0 -110
- package/dist/core/contract-verification.js.map +0 -1
- package/dist/core/freedom/banner.d.ts +0 -14
- package/dist/core/freedom/banner.d.ts.map +0 -1
- package/dist/core/freedom/banner.js +0 -22
- package/dist/core/freedom/banner.js.map +0 -1
- package/dist/core/freedom/config.d.ts +0 -27
- package/dist/core/freedom/config.d.ts.map +0 -1
- package/dist/core/freedom/config.js +0 -216
- package/dist/core/freedom/config.js.map +0 -1
- package/dist/core/freedom/index.d.ts +0 -23
- package/dist/core/freedom/index.d.ts.map +0 -1
- package/dist/core/freedom/index.js +0 -19
- package/dist/core/freedom/index.js.map +0 -1
- package/dist/core/freedom/policy.d.ts +0 -42
- package/dist/core/freedom/policy.d.ts.map +0 -1
- package/dist/core/freedom/policy.js +0 -47
- package/dist/core/freedom/policy.js.map +0 -1
- package/dist/core/freedom/safety-floor.d.ts +0 -73
- package/dist/core/freedom/safety-floor.d.ts.map +0 -1
- package/dist/core/freedom/safety-floor.js +0 -275
- package/dist/core/freedom/safety-floor.js.map +0 -1
- package/dist/core/harness-control-events.d.ts +0 -91
- package/dist/core/harness-control-events.d.ts.map +0 -1
- package/dist/core/harness-control-events.js +0 -514
- package/dist/core/harness-control-events.js.map +0 -1
- package/dist/core/harness-control-replay.d.ts +0 -31
- package/dist/core/harness-control-replay.d.ts.map +0 -1
- package/dist/core/harness-control-replay.js +0 -187
- package/dist/core/harness-control-replay.js.map +0 -1
- package/dist/core/headroom-middleware.d.ts +0 -35
- package/dist/core/headroom-middleware.d.ts.map +0 -1
- package/dist/core/headroom-middleware.js +0 -166
- package/dist/core/headroom-middleware.js.map +0 -1
- package/dist/core/lean-context-middleware.d.ts +0 -12
- package/dist/core/lean-context-middleware.d.ts.map +0 -1
- package/dist/core/lean-context-middleware.js +0 -87
- package/dist/core/lean-context-middleware.js.map +0 -1
- package/dist/core/lean-context-policy.d.ts +0 -45
- package/dist/core/lean-context-policy.d.ts.map +0 -1
- package/dist/core/lean-context-policy.js +0 -108
- package/dist/core/lean-context-policy.js.map +0 -1
- package/dist/core/native-adoption-benchmark.d.ts +0 -166
- package/dist/core/native-adoption-benchmark.d.ts.map +0 -1
- package/dist/core/native-adoption-benchmark.js +0 -624
- package/dist/core/native-adoption-benchmark.js.map +0 -1
- package/dist/core/observability-trace.d.ts +0 -80
- package/dist/core/observability-trace.d.ts.map +0 -1
- package/dist/core/observability-trace.js +0 -140
- package/dist/core/observability-trace.js.map +0 -1
- package/dist/core/orchestration/checkpoint.d.ts +0 -83
- package/dist/core/orchestration/checkpoint.d.ts.map +0 -1
- package/dist/core/orchestration/checkpoint.js +0 -152
- package/dist/core/orchestration/checkpoint.js.map +0 -1
- package/dist/core/orchestration/errors.d.ts +0 -74
- package/dist/core/orchestration/errors.d.ts.map +0 -1
- package/dist/core/orchestration/errors.js +0 -52
- package/dist/core/orchestration/errors.js.map +0 -1
- package/dist/core/orchestration/merge-queue.d.ts +0 -121
- package/dist/core/orchestration/merge-queue.d.ts.map +0 -1
- package/dist/core/orchestration/merge-queue.js +0 -149
- package/dist/core/orchestration/merge-queue.js.map +0 -1
- package/dist/core/orchestration/recovery.d.ts +0 -106
- package/dist/core/orchestration/recovery.d.ts.map +0 -1
- package/dist/core/orchestration/recovery.js +0 -110
- package/dist/core/orchestration/recovery.js.map +0 -1
- package/dist/core/orchestration/replay-ledger.d.ts +0 -76
- package/dist/core/orchestration/replay-ledger.d.ts.map +0 -1
- package/dist/core/orchestration/replay-ledger.js +0 -395
- package/dist/core/orchestration/replay-ledger.js.map +0 -1
- package/dist/core/orchestration/scheduler-state.d.ts +0 -78
- package/dist/core/orchestration/scheduler-state.d.ts.map +0 -1
- package/dist/core/orchestration/scheduler-state.js +0 -185
- package/dist/core/orchestration/scheduler-state.js.map +0 -1
- package/dist/core/orchestration/scheduler-store.d.ts +0 -309
- package/dist/core/orchestration/scheduler-store.d.ts.map +0 -1
- package/dist/core/orchestration/scheduler-store.js +0 -368
- package/dist/core/orchestration/scheduler-store.js.map +0 -1
- package/dist/core/orchestration/sqlite-scheduler-store.d.ts +0 -57
- package/dist/core/orchestration/sqlite-scheduler-store.d.ts.map +0 -1
- package/dist/core/orchestration/sqlite-scheduler-store.js +0 -528
- package/dist/core/orchestration/sqlite-scheduler-store.js.map +0 -1
- package/dist/core/orchestration/transaction-coordinator.d.ts +0 -217
- package/dist/core/orchestration/transaction-coordinator.d.ts.map +0 -1
- package/dist/core/orchestration/transaction-coordinator.js +0 -281
- package/dist/core/orchestration/transaction-coordinator.js.map +0 -1
- package/dist/core/orchestration/verification-contract.d.ts +0 -197
- package/dist/core/orchestration/verification-contract.d.ts.map +0 -1
- package/dist/core/orchestration/verification-contract.js +0 -145
- package/dist/core/orchestration/verification-contract.js.map +0 -1
- package/dist/core/package-composition.d.ts +0 -68
- package/dist/core/package-composition.d.ts.map +0 -1
- package/dist/core/package-composition.js +0 -304
- package/dist/core/package-composition.js.map +0 -1
- package/dist/core/package-trial-runtime.d.ts +0 -75
- package/dist/core/package-trial-runtime.d.ts.map +0 -1
- package/dist/core/package-trial-runtime.js +0 -73
- package/dist/core/package-trial-runtime.js.map +0 -1
- package/dist/core/package-trial-sandbox.d.ts +0 -27
- package/dist/core/package-trial-sandbox.d.ts.map +0 -1
- package/dist/core/package-trial-sandbox.js +0 -102
- package/dist/core/package-trial-sandbox.js.map +0 -1
- package/dist/core/policy-overlays-runtime.d.ts +0 -141
- package/dist/core/policy-overlays-runtime.d.ts.map +0 -1
- package/dist/core/policy-overlays-runtime.js +0 -720
- package/dist/core/policy-overlays-runtime.js.map +0 -1
- package/dist/core/read-anchor-registry.d.ts +0 -27
- package/dist/core/read-anchor-registry.d.ts.map +0 -1
- package/dist/core/read-anchor-registry.js +0 -103
- package/dist/core/read-anchor-registry.js.map +0 -1
- package/dist/core/read-content-cache.d.ts +0 -22
- package/dist/core/read-content-cache.d.ts.map +0 -1
- package/dist/core/read-content-cache.js +0 -79
- package/dist/core/read-content-cache.js.map +0 -1
- package/dist/core/session-digest.d.ts +0 -57
- package/dist/core/session-digest.d.ts.map +0 -1
- package/dist/core/session-digest.js +0 -193
- package/dist/core/session-digest.js.map +0 -1
- package/dist/core/spec-kit/compiler.d.ts +0 -67
- package/dist/core/spec-kit/compiler.d.ts.map +0 -1
- package/dist/core/spec-kit/compiler.js +0 -268
- package/dist/core/spec-kit/compiler.js.map +0 -1
- package/dist/core/transaction-coordinator.d.ts +0 -30
- package/dist/core/transaction-coordinator.d.ts.map +0 -1
- package/dist/core/transaction-coordinator.js +0 -173
- package/dist/core/transaction-coordinator.js.map +0 -1
- package/dist/modes/interactive/components/mcp-selector.d.ts +0 -30
- package/dist/modes/interactive/components/mcp-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/mcp-selector.js +0 -155
- package/dist/modes/interactive/components/mcp-selector.js.map +0 -1
- package/dist/modes/interactive/components/model-selector-state.d.ts +0 -101
- package/dist/modes/interactive/components/model-selector-state.d.ts.map +0 -1
- package/dist/modes/interactive/components/model-selector-state.js +0 -261
- package/dist/modes/interactive/components/model-selector-state.js.map +0 -1
- package/dist/modes/interactive/components/skills-selector.d.ts +0 -32
- package/dist/modes/interactive/components/skills-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/skills-selector.js +0 -130
- package/dist/modes/interactive/components/skills-selector.js.map +0 -1
- package/dist/modes/interactive/theme/omk-blackboard.json +0 -91
- package/dist/modes/interactive/theme/omk-freedom-grid.json +0 -91
- package/dist/modes/interactive/theme/omk-neon-ops.json +0 -90
- package/dist/modes/interactive/theme/omk-slate-light.json +0 -91
- package/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +0 -72
- package/node_modules/@earendil-works/omk-agent-core/README.md +0 -488
- package/node_modules/@earendil-works/omk-agent-core/dist/agent-loop.d.ts +0 -24
- package/node_modules/@earendil-works/omk-agent-core/dist/agent-loop.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/agent-loop.js +0 -553
- package/node_modules/@earendil-works/omk-agent-core/dist/agent-loop.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/agent.d.ts +0 -118
- package/node_modules/@earendil-works/omk-agent-core/dist/agent.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/agent.js +0 -402
- package/node_modules/@earendil-works/omk-agent-core/dist/agent.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/agent-harness.d.ts +0 -95
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/agent-harness.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/agent-harness.js +0 -996
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/agent-harness.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/branch-summarization.d.ts +0 -53
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/branch-summarization.js +0 -175
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/branch-summarization.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/compaction.d.ts +0 -117
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/compaction.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/compaction.js +0 -568
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/compaction.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/utils.d.ts +0 -25
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/utils.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/utils.js +0 -131
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/utils.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/env/nodejs.d.ts +0 -51
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/env/nodejs.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/env/nodejs.js +0 -510
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/env/nodejs.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/messages.d.ts +0 -51
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/messages.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/messages.js +0 -102
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/messages.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/prompt-templates.d.ts +0 -48
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/prompt-templates.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/prompt-templates.js +0 -230
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/prompt-templates.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/jsonl-repo.d.ts +0 -26
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/jsonl-repo.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/jsonl-repo.js +0 -101
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/jsonl-repo.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/jsonl-storage.d.ts +0 -36
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/jsonl-storage.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/jsonl-storage.js +0 -273
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/jsonl-storage.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/memory-repo.d.ts +0 -18
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/memory-repo.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/memory-repo.js +0 -42
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/memory-repo.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/memory-storage.d.ts +0 -25
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/memory-storage.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/memory-storage.js +0 -114
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/memory-storage.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/repo-utils.d.ts +0 -11
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/repo-utils.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/repo-utils.js +0 -39
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/repo-utils.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/session.d.ts +0 -33
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/session.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/session.js +0 -210
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/session.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/uuid.d.ts +0 -2
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/uuid.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/uuid.js +0 -50
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/uuid.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/skills.d.ts +0 -44
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/skills.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/skills.js +0 -311
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/skills.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/system-prompt.d.ts +0 -3
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/system-prompt.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/system-prompt.js +0 -30
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/system-prompt.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/types.d.ts +0 -616
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/types.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/types.js +0 -94
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/types.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/utils/shell-output.d.ts +0 -14
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/utils/shell-output.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/utils/shell-output.js +0 -126
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/utils/shell-output.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/utils/truncate.d.ts +0 -70
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/utils/truncate.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/utils/truncate.js +0 -297
- package/node_modules/@earendil-works/omk-agent-core/dist/harness/utils/truncate.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/index.d.ts +0 -20
- package/node_modules/@earendil-works/omk-agent-core/dist/index.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/index.js +0 -25
- package/node_modules/@earendil-works/omk-agent-core/dist/index.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/node.d.ts +0 -3
- package/node_modules/@earendil-works/omk-agent-core/dist/node.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/node.js +0 -3
- package/node_modules/@earendil-works/omk-agent-core/dist/node.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/proxy.d.ts +0 -69
- package/node_modules/@earendil-works/omk-agent-core/dist/proxy.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/proxy.js +0 -278
- package/node_modules/@earendil-works/omk-agent-core/dist/proxy.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/types.d.ts +0 -393
- package/node_modules/@earendil-works/omk-agent-core/dist/types.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/dist/types.js +0 -2
- package/node_modules/@earendil-works/omk-agent-core/dist/types.js.map +0 -1
- package/node_modules/@earendil-works/omk-agent-core/package.json +0 -60
- package/node_modules/@earendil-works/omk-ai/README.md +0 -1389
- package/node_modules/@earendil-works/omk-ai/dist/api-registry.d.ts +0 -20
- package/node_modules/@earendil-works/omk-ai/dist/api-registry.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/api-registry.js +0 -44
- package/node_modules/@earendil-works/omk-ai/dist/api-registry.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/bedrock-provider.d.ts +0 -5
- package/node_modules/@earendil-works/omk-ai/dist/bedrock-provider.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/bedrock-provider.js +0 -6
- package/node_modules/@earendil-works/omk-ai/dist/bedrock-provider.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/cli.d.ts +0 -3
- package/node_modules/@earendil-works/omk-ai/dist/cli.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/cli.js +0 -130
- package/node_modules/@earendil-works/omk-ai/dist/cli.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/env-api-keys.d.ts +0 -20
- package/node_modules/@earendil-works/omk-ai/dist/env-api-keys.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/env-api-keys.js +0 -199
- package/node_modules/@earendil-works/omk-ai/dist/env-api-keys.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/image-models.d.ts +0 -10
- package/node_modules/@earendil-works/omk-ai/dist/image-models.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/image-models.generated.d.ts +0 -515
- package/node_modules/@earendil-works/omk-ai/dist/image-models.generated.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/image-models.generated.js +0 -517
- package/node_modules/@earendil-works/omk-ai/dist/image-models.generated.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/image-models.js +0 -23
- package/node_modules/@earendil-works/omk-ai/dist/image-models.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/images-api-registry.d.ts +0 -14
- package/node_modules/@earendil-works/omk-ai/dist/images-api-registry.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/images-api-registry.js +0 -22
- package/node_modules/@earendil-works/omk-ai/dist/images-api-registry.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/images.d.ts +0 -4
- package/node_modules/@earendil-works/omk-ai/dist/images.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/images.js +0 -16
- package/node_modules/@earendil-works/omk-ai/dist/images.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/index.d.ts +0 -33
- package/node_modules/@earendil-works/omk-ai/dist/index.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/index.js +0 -21
- package/node_modules/@earendil-works/omk-ai/dist/index.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/models.d.ts +0 -18
- package/node_modules/@earendil-works/omk-ai/dist/models.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/models.generated.d.ts +0 -18762
- package/node_modules/@earendil-works/omk-ai/dist/models.generated.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/models.generated.js +0 -17197
- package/node_modules/@earendil-works/omk-ai/dist/models.generated.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/models.js +0 -78
- package/node_modules/@earendil-works/omk-ai/dist/models.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/oauth.d.ts +0 -2
- package/node_modules/@earendil-works/omk-ai/dist/oauth.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/oauth.js +0 -2
- package/node_modules/@earendil-works/omk-ai/dist/oauth.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/provider-network.d.ts +0 -39
- package/node_modules/@earendil-works/omk-ai/dist/provider-network.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/provider-network.js +0 -170
- package/node_modules/@earendil-works/omk-ai/dist/provider-network.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/amazon-bedrock.d.ts +0 -38
- package/node_modules/@earendil-works/omk-ai/dist/providers/amazon-bedrock.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/amazon-bedrock.js +0 -826
- package/node_modules/@earendil-works/omk-ai/dist/providers/amazon-bedrock.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/anthropic.d.ts +0 -77
- package/node_modules/@earendil-works/omk-ai/dist/providers/anthropic.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/anthropic.js +0 -1123
- package/node_modules/@earendil-works/omk-ai/dist/providers/anthropic.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/azure-openai-responses.d.ts +0 -15
- package/node_modules/@earendil-works/omk-ai/dist/providers/azure-openai-responses.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/azure-openai-responses.js +0 -221
- package/node_modules/@earendil-works/omk-ai/dist/providers/azure-openai-responses.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/cloudflare.d.ts +0 -13
- package/node_modules/@earendil-works/omk-ai/dist/providers/cloudflare.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/cloudflare.js +0 -26
- package/node_modules/@earendil-works/omk-ai/dist/providers/cloudflare.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/faux.d.ts +0 -56
- package/node_modules/@earendil-works/omk-ai/dist/providers/faux.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/faux.js +0 -368
- package/node_modules/@earendil-works/omk-ai/dist/providers/faux.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/github-copilot-headers.d.ts +0 -8
- package/node_modules/@earendil-works/omk-ai/dist/providers/github-copilot-headers.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/github-copilot-headers.js +0 -29
- package/node_modules/@earendil-works/omk-ai/dist/providers/github-copilot-headers.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/google-shared.d.ts +0 -70
- package/node_modules/@earendil-works/omk-ai/dist/providers/google-shared.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/google-shared.js +0 -331
- package/node_modules/@earendil-works/omk-ai/dist/providers/google-shared.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/google-vertex.d.ts +0 -15
- package/node_modules/@earendil-works/omk-ai/dist/providers/google-vertex.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/google-vertex.js +0 -442
- package/node_modules/@earendil-works/omk-ai/dist/providers/google-vertex.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/google.d.ts +0 -13
- package/node_modules/@earendil-works/omk-ai/dist/providers/google.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/google.js +0 -402
- package/node_modules/@earendil-works/omk-ai/dist/providers/google.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/images/openrouter.d.ts +0 -3
- package/node_modules/@earendil-works/omk-ai/dist/providers/images/openrouter.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/images/openrouter.js +0 -128
- package/node_modules/@earendil-works/omk-ai/dist/providers/images/openrouter.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/images/register-builtins.d.ts +0 -4
- package/node_modules/@earendil-works/omk-ai/dist/providers/images/register-builtins.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/images/register-builtins.js +0 -34
- package/node_modules/@earendil-works/omk-ai/dist/providers/images/register-builtins.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/mistral.d.ts +0 -25
- package/node_modules/@earendil-works/omk-ai/dist/providers/mistral.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/mistral.js +0 -534
- package/node_modules/@earendil-works/omk-ai/dist/providers/mistral.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-codex-responses.d.ts +0 -30
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-codex-responses.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-codex-responses.js +0 -1171
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-codex-responses.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-completions.d.ts +0 -19
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-completions.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-completions.js +0 -977
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-completions.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-prompt-cache.d.ts +0 -11
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-prompt-cache.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-prompt-cache.js +0 -22
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-prompt-cache.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-responses-shared.d.ts +0 -18
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-responses-shared.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-responses-shared.js +0 -496
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-responses-shared.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-responses.d.ts +0 -13
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-responses.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-responses.js +0 -233
- package/node_modules/@earendil-works/omk-ai/dist/providers/openai-responses.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/register-builtins.d.ts +0 -35
- package/node_modules/@earendil-works/omk-ai/dist/providers/register-builtins.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/register-builtins.js +0 -254
- package/node_modules/@earendil-works/omk-ai/dist/providers/register-builtins.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/simple-options.d.ts +0 -8
- package/node_modules/@earendil-works/omk-ai/dist/providers/simple-options.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/simple-options.js +0 -42
- package/node_modules/@earendil-works/omk-ai/dist/providers/simple-options.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/tool-schema.d.ts +0 -13
- package/node_modules/@earendil-works/omk-ai/dist/providers/tool-schema.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/tool-schema.js +0 -82
- package/node_modules/@earendil-works/omk-ai/dist/providers/tool-schema.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/transform-messages.d.ts +0 -8
- package/node_modules/@earendil-works/omk-ai/dist/providers/transform-messages.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/providers/transform-messages.js +0 -184
- package/node_modules/@earendil-works/omk-ai/dist/providers/transform-messages.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/session-resources.d.ts +0 -4
- package/node_modules/@earendil-works/omk-ai/dist/session-resources.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/session-resources.js +0 -22
- package/node_modules/@earendil-works/omk-ai/dist/session-resources.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/stream.d.ts +0 -8
- package/node_modules/@earendil-works/omk-ai/dist/stream.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/stream.js +0 -77
- package/node_modules/@earendil-works/omk-ai/dist/stream.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/types.d.ts +0 -570
- package/node_modules/@earendil-works/omk-ai/dist/types.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/types.js +0 -2
- package/node_modules/@earendil-works/omk-ai/dist/types.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/abort-signals.d.ts +0 -6
- package/node_modules/@earendil-works/omk-ai/dist/utils/abort-signals.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/abort-signals.js +0 -34
- package/node_modules/@earendil-works/omk-ai/dist/utils/abort-signals.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/diagnostics.d.ts +0 -19
- package/node_modules/@earendil-works/omk-ai/dist/utils/diagnostics.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/diagnostics.js +0 -25
- package/node_modules/@earendil-works/omk-ai/dist/utils/diagnostics.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/event-stream.d.ts +0 -21
- package/node_modules/@earendil-works/omk-ai/dist/utils/event-stream.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/event-stream.js +0 -81
- package/node_modules/@earendil-works/omk-ai/dist/utils/event-stream.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/hash.d.ts +0 -3
- package/node_modules/@earendil-works/omk-ai/dist/utils/hash.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/hash.js +0 -14
- package/node_modules/@earendil-works/omk-ai/dist/utils/hash.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/headers.d.ts +0 -2
- package/node_modules/@earendil-works/omk-ai/dist/utils/headers.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/headers.js +0 -8
- package/node_modules/@earendil-works/omk-ai/dist/utils/headers.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/json-parse.d.ts +0 -16
- package/node_modules/@earendil-works/omk-ai/dist/utils/json-parse.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/json-parse.js +0 -113
- package/node_modules/@earendil-works/omk-ai/dist/utils/json-parse.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/node-http-proxy.d.ts +0 -10
- package/node_modules/@earendil-works/omk-ai/dist/utils/node-http-proxy.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/node-http-proxy.js +0 -97
- package/node_modules/@earendil-works/omk-ai/dist/utils/node-http-proxy.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/anthropic.d.ts +0 -25
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/anthropic.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/anthropic.js +0 -335
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/anthropic.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/device-code.d.ts +0 -21
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/device-code.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/device-code.js +0 -56
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/device-code.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/github-copilot.d.ts +0 -30
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/github-copilot.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/github-copilot.js +0 -280
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/github-copilot.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/index.d.ts +0 -58
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/index.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/index.js +0 -122
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/index.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/oauth-page.d.ts +0 -3
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/oauth-page.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/oauth-page.js +0 -105
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/oauth-page.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/openai-codex.d.ts +0 -43
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/openai-codex.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/openai-codex.js +0 -487
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/openai-codex.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/pkce.d.ts +0 -13
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/pkce.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/pkce.js +0 -31
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/pkce.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/types.d.ts +0 -64
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/types.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/types.js +0 -2
- package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/types.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/overflow.d.ts +0 -57
- package/node_modules/@earendil-works/omk-ai/dist/utils/overflow.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/overflow.js +0 -154
- package/node_modules/@earendil-works/omk-ai/dist/utils/overflow.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/sanitize-unicode.d.ts +0 -22
- package/node_modules/@earendil-works/omk-ai/dist/utils/sanitize-unicode.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/sanitize-unicode.js +0 -26
- package/node_modules/@earendil-works/omk-ai/dist/utils/sanitize-unicode.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/typebox-helpers.d.ts +0 -17
- package/node_modules/@earendil-works/omk-ai/dist/utils/typebox-helpers.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/typebox-helpers.js +0 -21
- package/node_modules/@earendil-works/omk-ai/dist/utils/typebox-helpers.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/validation.d.ts +0 -18
- package/node_modules/@earendil-works/omk-ai/dist/utils/validation.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-ai/dist/utils/validation.js +0 -281
- package/node_modules/@earendil-works/omk-ai/dist/utils/validation.js.map +0 -1
- package/node_modules/@earendil-works/omk-ai/package.json +0 -106
- package/node_modules/@earendil-works/omk-tui/README.md +0 -791
- package/node_modules/@earendil-works/omk-tui/dist/autocomplete.d.ts +0 -54
- package/node_modules/@earendil-works/omk-tui/dist/autocomplete.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/autocomplete.js +0 -632
- package/node_modules/@earendil-works/omk-tui/dist/autocomplete.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/box.d.ts +0 -22
- package/node_modules/@earendil-works/omk-tui/dist/components/box.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/box.js +0 -104
- package/node_modules/@earendil-works/omk-tui/dist/components/box.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/cancellable-loader.d.ts +0 -22
- package/node_modules/@earendil-works/omk-tui/dist/components/cancellable-loader.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/cancellable-loader.js +0 -35
- package/node_modules/@earendil-works/omk-tui/dist/components/cancellable-loader.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/editor.d.ts +0 -249
- package/node_modules/@earendil-works/omk-tui/dist/components/editor.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/editor.js +0 -1857
- package/node_modules/@earendil-works/omk-tui/dist/components/editor.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/image.d.ts +0 -28
- package/node_modules/@earendil-works/omk-tui/dist/components/image.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/image.js +0 -89
- package/node_modules/@earendil-works/omk-tui/dist/components/image.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/input.d.ts +0 -37
- package/node_modules/@earendil-works/omk-tui/dist/components/input.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/input.js +0 -378
- package/node_modules/@earendil-works/omk-tui/dist/components/input.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/loader.d.ts +0 -31
- package/node_modules/@earendil-works/omk-tui/dist/components/loader.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/loader.js +0 -69
- package/node_modules/@earendil-works/omk-tui/dist/components/loader.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/markdown.d.ts +0 -96
- package/node_modules/@earendil-works/omk-tui/dist/components/markdown.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/markdown.js +0 -644
- package/node_modules/@earendil-works/omk-tui/dist/components/markdown.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/select-list.d.ts +0 -50
- package/node_modules/@earendil-works/omk-tui/dist/components/select-list.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/select-list.js +0 -159
- package/node_modules/@earendil-works/omk-tui/dist/components/select-list.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/settings-list.d.ts +0 -50
- package/node_modules/@earendil-works/omk-tui/dist/components/settings-list.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/settings-list.js +0 -185
- package/node_modules/@earendil-works/omk-tui/dist/components/settings-list.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/spacer.d.ts +0 -12
- package/node_modules/@earendil-works/omk-tui/dist/components/spacer.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/spacer.js +0 -23
- package/node_modules/@earendil-works/omk-tui/dist/components/spacer.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/text.d.ts +0 -19
- package/node_modules/@earendil-works/omk-tui/dist/components/text.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/text.js +0 -89
- package/node_modules/@earendil-works/omk-tui/dist/components/text.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/truncated-text.d.ts +0 -13
- package/node_modules/@earendil-works/omk-tui/dist/components/truncated-text.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/components/truncated-text.js +0 -51
- package/node_modules/@earendil-works/omk-tui/dist/components/truncated-text.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/editor-component.d.ts +0 -39
- package/node_modules/@earendil-works/omk-tui/dist/editor-component.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/editor-component.js +0 -2
- package/node_modules/@earendil-works/omk-tui/dist/editor-component.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/fuzzy.d.ts +0 -16
- package/node_modules/@earendil-works/omk-tui/dist/fuzzy.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/fuzzy.js +0 -110
- package/node_modules/@earendil-works/omk-tui/dist/fuzzy.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/index.d.ts +0 -23
- package/node_modules/@earendil-works/omk-tui/dist/index.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/index.js +0 -32
- package/node_modules/@earendil-works/omk-tui/dist/index.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/keybindings.d.ts +0 -212
- package/node_modules/@earendil-works/omk-tui/dist/keybindings.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/keybindings.js +0 -252
- package/node_modules/@earendil-works/omk-tui/dist/keybindings.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/keys.d.ts +0 -184
- package/node_modules/@earendil-works/omk-tui/dist/keys.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/keys.js +0 -1173
- package/node_modules/@earendil-works/omk-tui/dist/keys.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/kill-ring.d.ts +0 -28
- package/node_modules/@earendil-works/omk-tui/dist/kill-ring.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/kill-ring.js +0 -44
- package/node_modules/@earendil-works/omk-tui/dist/kill-ring.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/native-modifiers.d.ts +0 -3
- package/node_modules/@earendil-works/omk-tui/dist/native-modifiers.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/native-modifiers.js +0 -53
- package/node_modules/@earendil-works/omk-tui/dist/native-modifiers.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/stdin-buffer.d.ts +0 -50
- package/node_modules/@earendil-works/omk-tui/dist/stdin-buffer.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/stdin-buffer.js +0 -361
- package/node_modules/@earendil-works/omk-tui/dist/stdin-buffer.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/terminal-image.d.ts +0 -90
- package/node_modules/@earendil-works/omk-tui/dist/terminal-image.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/terminal-image.js +0 -366
- package/node_modules/@earendil-works/omk-tui/dist/terminal-image.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/terminal.d.ts +0 -113
- package/node_modules/@earendil-works/omk-tui/dist/terminal.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/terminal.js +0 -472
- package/node_modules/@earendil-works/omk-tui/dist/terminal.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/tui.d.ts +0 -242
- package/node_modules/@earendil-works/omk-tui/dist/tui.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/tui.js +0 -1221
- package/node_modules/@earendil-works/omk-tui/dist/tui.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/undo-stack.d.ts +0 -17
- package/node_modules/@earendil-works/omk-tui/dist/undo-stack.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/undo-stack.js +0 -25
- package/node_modules/@earendil-works/omk-tui/dist/undo-stack.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/utils.d.ts +0 -84
- package/node_modules/@earendil-works/omk-tui/dist/utils.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/utils.js +0 -1032
- package/node_modules/@earendil-works/omk-tui/dist/utils.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/word-navigation.d.ts +0 -25
- package/node_modules/@earendil-works/omk-tui/dist/word-navigation.d.ts.map +0 -1
- package/node_modules/@earendil-works/omk-tui/dist/word-navigation.js +0 -96
- package/node_modules/@earendil-works/omk-tui/dist/word-navigation.js.map +0 -1
- package/node_modules/@earendil-works/omk-tui/native/darwin/prebuilds/darwin-arm64/darwin-modifiers.node +0 -0
- package/node_modules/@earendil-works/omk-tui/native/darwin/prebuilds/darwin-x64/darwin-modifiers.node +0 -0
- package/node_modules/@earendil-works/omk-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/omk-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/omk-tui/package.json +0 -47
|
@@ -1,1032 +0,0 @@
|
|
|
1
|
-
import { eastAsianWidth } from "get-east-asian-width";
|
|
2
|
-
// segmenters (shared instance)
|
|
3
|
-
const graphemeSegmenter = new Intl.Segmenter(undefined, { granularity: "grapheme" });
|
|
4
|
-
const wordSegmenter = new Intl.Segmenter(undefined, { granularity: "word" });
|
|
5
|
-
/**
|
|
6
|
-
* Get the shared grapheme segmenter instance.
|
|
7
|
-
*/
|
|
8
|
-
export function getGraphemeSegmenter() {
|
|
9
|
-
return graphemeSegmenter;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Get the shared word segmenter instance.
|
|
13
|
-
*/
|
|
14
|
-
export function getWordSegmenter() {
|
|
15
|
-
return wordSegmenter;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Check if a grapheme cluster (after segmentation) could possibly be an RGI emoji.
|
|
19
|
-
* This is a fast heuristic to avoid the expensive rgiEmojiRegex test.
|
|
20
|
-
* The tested Unicode blocks are deliberately broad to account for future
|
|
21
|
-
* Unicode additions.
|
|
22
|
-
*/
|
|
23
|
-
function couldBeEmoji(segment) {
|
|
24
|
-
const cp = segment.codePointAt(0);
|
|
25
|
-
return ((cp >= 0x1f000 && cp <= 0x1fbff) || // Emoji and Pictograph
|
|
26
|
-
(cp >= 0x2300 && cp <= 0x23ff) || // Misc technical
|
|
27
|
-
(cp >= 0x2600 && cp <= 0x27bf) || // Misc symbols, dingbats
|
|
28
|
-
(cp >= 0x2b50 && cp <= 0x2b55) || // Specific stars/circles
|
|
29
|
-
segment.includes("\uFE0F") || // Contains VS16 (emoji presentation selector)
|
|
30
|
-
segment.length > 2 // Multi-codepoint sequences (ZWJ, skin tones, etc.)
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
// Regexes for character classification (same as string-width library)
|
|
34
|
-
const zeroWidthRegex = /^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Mark}|\p{Surrogate})+$/v;
|
|
35
|
-
const leadingNonPrintingRegex = /^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}\p{Surrogate}]+/v;
|
|
36
|
-
const rgiEmojiRegex = /^\p{RGI_Emoji}$/v;
|
|
37
|
-
// Cache for non-ASCII strings
|
|
38
|
-
const WIDTH_CACHE_SIZE = 512;
|
|
39
|
-
const widthCache = new Map();
|
|
40
|
-
function isPrintableAscii(str) {
|
|
41
|
-
for (let i = 0; i < str.length; i++) {
|
|
42
|
-
const code = str.charCodeAt(i);
|
|
43
|
-
if (code < 0x20 || code > 0x7e) {
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return true;
|
|
48
|
-
}
|
|
49
|
-
function truncateFragmentToWidth(text, maxWidth) {
|
|
50
|
-
if (maxWidth <= 0 || text.length === 0) {
|
|
51
|
-
return { text: "", width: 0 };
|
|
52
|
-
}
|
|
53
|
-
if (isPrintableAscii(text)) {
|
|
54
|
-
const clipped = text.slice(0, maxWidth);
|
|
55
|
-
return { text: clipped, width: clipped.length };
|
|
56
|
-
}
|
|
57
|
-
const hasAnsi = text.includes("\x1b");
|
|
58
|
-
const hasTabs = text.includes("\t");
|
|
59
|
-
if (!hasAnsi && !hasTabs) {
|
|
60
|
-
let result = "";
|
|
61
|
-
let width = 0;
|
|
62
|
-
for (const { segment } of graphemeSegmenter.segment(text)) {
|
|
63
|
-
const w = graphemeWidth(segment);
|
|
64
|
-
if (width + w > maxWidth) {
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
result += segment;
|
|
68
|
-
width += w;
|
|
69
|
-
}
|
|
70
|
-
return { text: result, width };
|
|
71
|
-
}
|
|
72
|
-
let result = "";
|
|
73
|
-
let width = 0;
|
|
74
|
-
let i = 0;
|
|
75
|
-
let pendingAnsi = "";
|
|
76
|
-
while (i < text.length) {
|
|
77
|
-
const ansi = extractAnsiCode(text, i);
|
|
78
|
-
if (ansi) {
|
|
79
|
-
pendingAnsi += ansi.code;
|
|
80
|
-
i += ansi.length;
|
|
81
|
-
continue;
|
|
82
|
-
}
|
|
83
|
-
if (text[i] === "\t") {
|
|
84
|
-
if (width + 3 > maxWidth) {
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
if (pendingAnsi) {
|
|
88
|
-
result += pendingAnsi;
|
|
89
|
-
pendingAnsi = "";
|
|
90
|
-
}
|
|
91
|
-
result += "\t";
|
|
92
|
-
width += 3;
|
|
93
|
-
i++;
|
|
94
|
-
continue;
|
|
95
|
-
}
|
|
96
|
-
let end = i;
|
|
97
|
-
while (end < text.length && text[end] !== "\t") {
|
|
98
|
-
const nextAnsi = extractAnsiCode(text, end);
|
|
99
|
-
if (nextAnsi) {
|
|
100
|
-
break;
|
|
101
|
-
}
|
|
102
|
-
end++;
|
|
103
|
-
}
|
|
104
|
-
for (const { segment } of graphemeSegmenter.segment(text.slice(i, end))) {
|
|
105
|
-
const w = graphemeWidth(segment);
|
|
106
|
-
if (width + w > maxWidth) {
|
|
107
|
-
return { text: result, width };
|
|
108
|
-
}
|
|
109
|
-
if (pendingAnsi) {
|
|
110
|
-
result += pendingAnsi;
|
|
111
|
-
pendingAnsi = "";
|
|
112
|
-
}
|
|
113
|
-
result += segment;
|
|
114
|
-
width += w;
|
|
115
|
-
}
|
|
116
|
-
i = end;
|
|
117
|
-
}
|
|
118
|
-
return { text: result, width };
|
|
119
|
-
}
|
|
120
|
-
function finalizeTruncatedResult(prefix, prefixWidth, ellipsis, ellipsisWidth, maxWidth, pad) {
|
|
121
|
-
const reset = "\x1b[0m";
|
|
122
|
-
const visibleWidth = prefixWidth + ellipsisWidth;
|
|
123
|
-
let result;
|
|
124
|
-
if (ellipsis.length > 0) {
|
|
125
|
-
result = `${prefix}${reset}${ellipsis}${reset}`;
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
result = `${prefix}${reset}`;
|
|
129
|
-
}
|
|
130
|
-
return pad ? result + " ".repeat(Math.max(0, maxWidth - visibleWidth)) : result;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Calculate the terminal width of a single grapheme cluster.
|
|
134
|
-
* Based on code from the string-width library, but includes a possible-emoji
|
|
135
|
-
* check to avoid running the RGI_Emoji regex unnecessarily.
|
|
136
|
-
*/
|
|
137
|
-
function graphemeWidth(segment) {
|
|
138
|
-
if (segment === "\t") {
|
|
139
|
-
return 3;
|
|
140
|
-
}
|
|
141
|
-
// Zero-width clusters
|
|
142
|
-
if (zeroWidthRegex.test(segment)) {
|
|
143
|
-
return 0;
|
|
144
|
-
}
|
|
145
|
-
// Emoji check with pre-filter
|
|
146
|
-
if (couldBeEmoji(segment) && rgiEmojiRegex.test(segment)) {
|
|
147
|
-
return 2;
|
|
148
|
-
}
|
|
149
|
-
// Get base visible codepoint
|
|
150
|
-
const base = segment.replace(leadingNonPrintingRegex, "");
|
|
151
|
-
const cp = base.codePointAt(0);
|
|
152
|
-
if (cp === undefined) {
|
|
153
|
-
return 0;
|
|
154
|
-
}
|
|
155
|
-
// Regional indicator symbols (U+1F1E6..U+1F1FF) are often rendered as
|
|
156
|
-
// full-width emoji in terminals, even when isolated during streaming.
|
|
157
|
-
// Keep width conservative (2) to avoid terminal auto-wrap drift artifacts.
|
|
158
|
-
if (cp >= 0x1f1e6 && cp <= 0x1f1ff) {
|
|
159
|
-
return 2;
|
|
160
|
-
}
|
|
161
|
-
let width = eastAsianWidth(cp);
|
|
162
|
-
// Trailing halfwidth/fullwidth forms and AM vowels that segment with a base.
|
|
163
|
-
if (segment.length > 1) {
|
|
164
|
-
for (const char of segment.slice(1)) {
|
|
165
|
-
const c = char.codePointAt(0);
|
|
166
|
-
if (c >= 0xff00 && c <= 0xffef) {
|
|
167
|
-
width += eastAsianWidth(c);
|
|
168
|
-
}
|
|
169
|
-
else if (c === 0x0e33 || c === 0x0eb3) {
|
|
170
|
-
width += 1;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
return width;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Calculate the visible width of a string in terminal columns.
|
|
178
|
-
*/
|
|
179
|
-
export function visibleWidth(str) {
|
|
180
|
-
if (str.length === 0) {
|
|
181
|
-
return 0;
|
|
182
|
-
}
|
|
183
|
-
// Fast path: pure ASCII printable
|
|
184
|
-
if (isPrintableAscii(str)) {
|
|
185
|
-
return str.length;
|
|
186
|
-
}
|
|
187
|
-
// Check cache
|
|
188
|
-
const cached = widthCache.get(str);
|
|
189
|
-
if (cached !== undefined) {
|
|
190
|
-
return cached;
|
|
191
|
-
}
|
|
192
|
-
// Normalize: tabs to 3 spaces, strip ANSI escape codes
|
|
193
|
-
let clean = str;
|
|
194
|
-
if (str.includes("\t")) {
|
|
195
|
-
clean = clean.replace(/\t/g, " ");
|
|
196
|
-
}
|
|
197
|
-
if (clean.includes("\x1b")) {
|
|
198
|
-
// Strip supported ANSI/OSC/APC escape sequences in one pass.
|
|
199
|
-
// This covers CSI styling/cursor codes, OSC hyperlinks and prompt markers,
|
|
200
|
-
// and APC sequences like CURSOR_MARKER.
|
|
201
|
-
let stripped = "";
|
|
202
|
-
let i = 0;
|
|
203
|
-
while (i < clean.length) {
|
|
204
|
-
const ansi = extractAnsiCode(clean, i);
|
|
205
|
-
if (ansi) {
|
|
206
|
-
i += ansi.length;
|
|
207
|
-
continue;
|
|
208
|
-
}
|
|
209
|
-
stripped += clean[i];
|
|
210
|
-
i++;
|
|
211
|
-
}
|
|
212
|
-
clean = stripped;
|
|
213
|
-
}
|
|
214
|
-
// Calculate width
|
|
215
|
-
let width = 0;
|
|
216
|
-
for (const { segment } of graphemeSegmenter.segment(clean)) {
|
|
217
|
-
width += graphemeWidth(segment);
|
|
218
|
-
}
|
|
219
|
-
// Cache result
|
|
220
|
-
if (widthCache.size >= WIDTH_CACHE_SIZE) {
|
|
221
|
-
const firstKey = widthCache.keys().next().value;
|
|
222
|
-
if (firstKey !== undefined) {
|
|
223
|
-
widthCache.delete(firstKey);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
widthCache.set(str, width);
|
|
227
|
-
return width;
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
* Normalize text for terminal output without changing logical editor content.
|
|
231
|
-
* Some terminals render precomposed Thai/Lao AM vowels inconsistently during
|
|
232
|
-
* differential repaint. Their compatibility decompositions have the same cell
|
|
233
|
-
* width but avoid stale-cell artifacts in terminal renderers.
|
|
234
|
-
*/
|
|
235
|
-
const THAI_LAO_AM_REGEX = /[\u0e33\u0eb3]/;
|
|
236
|
-
const THAI_LAO_AM_GLOBAL_REGEX = /[\u0e33\u0eb3]/g;
|
|
237
|
-
export function normalizeTerminalOutput(str) {
|
|
238
|
-
if (!THAI_LAO_AM_REGEX.test(str))
|
|
239
|
-
return str;
|
|
240
|
-
return str.replace(THAI_LAO_AM_GLOBAL_REGEX, (char) => (char === "\u0e33" ? "\u0e4d\u0e32" : "\u0ecd\u0eb2"));
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Extract ANSI escape sequences from a string at the given position.
|
|
244
|
-
*/
|
|
245
|
-
export function extractAnsiCode(str, pos) {
|
|
246
|
-
if (pos >= str.length || str[pos] !== "\x1b")
|
|
247
|
-
return null;
|
|
248
|
-
const next = str[pos + 1];
|
|
249
|
-
// CSI sequence: ESC [ ... m/G/K/H/J
|
|
250
|
-
if (next === "[") {
|
|
251
|
-
let j = pos + 2;
|
|
252
|
-
while (j < str.length && !/[mGKHJ]/.test(str[j]))
|
|
253
|
-
j++;
|
|
254
|
-
if (j < str.length)
|
|
255
|
-
return { code: str.substring(pos, j + 1), length: j + 1 - pos };
|
|
256
|
-
return null;
|
|
257
|
-
}
|
|
258
|
-
// OSC sequence: ESC ] ... BEL or ESC ] ... ST (ESC \)
|
|
259
|
-
// Used for hyperlinks (OSC 8), window titles, etc.
|
|
260
|
-
if (next === "]") {
|
|
261
|
-
let j = pos + 2;
|
|
262
|
-
while (j < str.length) {
|
|
263
|
-
if (str[j] === "\x07")
|
|
264
|
-
return { code: str.substring(pos, j + 1), length: j + 1 - pos };
|
|
265
|
-
if (str[j] === "\x1b" && str[j + 1] === "\\")
|
|
266
|
-
return { code: str.substring(pos, j + 2), length: j + 2 - pos };
|
|
267
|
-
j++;
|
|
268
|
-
}
|
|
269
|
-
return null;
|
|
270
|
-
}
|
|
271
|
-
// APC sequence: ESC _ ... BEL or ESC _ ... ST (ESC \)
|
|
272
|
-
// Used for cursor marker and application-specific commands
|
|
273
|
-
if (next === "_") {
|
|
274
|
-
let j = pos + 2;
|
|
275
|
-
while (j < str.length) {
|
|
276
|
-
if (str[j] === "\x07")
|
|
277
|
-
return { code: str.substring(pos, j + 1), length: j + 1 - pos };
|
|
278
|
-
if (str[j] === "\x1b" && str[j + 1] === "\\")
|
|
279
|
-
return { code: str.substring(pos, j + 2), length: j + 2 - pos };
|
|
280
|
-
j++;
|
|
281
|
-
}
|
|
282
|
-
return null;
|
|
283
|
-
}
|
|
284
|
-
return null;
|
|
285
|
-
}
|
|
286
|
-
function parseOsc8Hyperlink(ansiCode) {
|
|
287
|
-
if (!ansiCode.startsWith("\x1b]8;")) {
|
|
288
|
-
return undefined;
|
|
289
|
-
}
|
|
290
|
-
const terminator = ansiCode.endsWith("\x07") ? "\x07" : "\x1b\\";
|
|
291
|
-
const body = ansiCode.slice(4, terminator === "\x07" ? -1 : -2);
|
|
292
|
-
const separatorIndex = body.indexOf(";");
|
|
293
|
-
if (separatorIndex === -1) {
|
|
294
|
-
return undefined;
|
|
295
|
-
}
|
|
296
|
-
const params = body.slice(0, separatorIndex);
|
|
297
|
-
const url = body.slice(separatorIndex + 1);
|
|
298
|
-
if (!url) {
|
|
299
|
-
return null;
|
|
300
|
-
}
|
|
301
|
-
return { params, url, terminator };
|
|
302
|
-
}
|
|
303
|
-
function formatOsc8Hyperlink(hyperlink) {
|
|
304
|
-
return `\x1b]8;${hyperlink.params};${hyperlink.url}${hyperlink.terminator}`;
|
|
305
|
-
}
|
|
306
|
-
function formatOsc8Close(terminator) {
|
|
307
|
-
return `\x1b]8;;${terminator}`;
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
* Track active ANSI SGR codes to preserve styling across line breaks.
|
|
311
|
-
*/
|
|
312
|
-
class AnsiCodeTracker {
|
|
313
|
-
// Track individual attributes separately so we can reset them specifically
|
|
314
|
-
bold = false;
|
|
315
|
-
dim = false;
|
|
316
|
-
italic = false;
|
|
317
|
-
underline = false;
|
|
318
|
-
blink = false;
|
|
319
|
-
inverse = false;
|
|
320
|
-
hidden = false;
|
|
321
|
-
strikethrough = false;
|
|
322
|
-
fgColor = null; // Stores the full code like "31" or "38;5;240"
|
|
323
|
-
bgColor = null; // Stores the full code like "41" or "48;5;240"
|
|
324
|
-
activeHyperlink = null;
|
|
325
|
-
process(ansiCode) {
|
|
326
|
-
// OSC 8 hyperlink: \x1b]8;;<url>\x1b\\ (open) or \x1b]8;;\x1b\\ (close).
|
|
327
|
-
// Preserve the original terminator because some terminals only make BEL-terminated
|
|
328
|
-
// links clickable. OAuth login URLs use BEL, so reopening wrapped lines with ST
|
|
329
|
-
// made only the first physical line clickable in those terminals.
|
|
330
|
-
const hyperlink = parseOsc8Hyperlink(ansiCode);
|
|
331
|
-
if (hyperlink !== undefined) {
|
|
332
|
-
this.activeHyperlink = hyperlink;
|
|
333
|
-
return;
|
|
334
|
-
}
|
|
335
|
-
if (!ansiCode.endsWith("m")) {
|
|
336
|
-
return;
|
|
337
|
-
}
|
|
338
|
-
// Extract the parameters between \x1b[ and m
|
|
339
|
-
const match = ansiCode.match(/\x1b\[([\d;]*)m/);
|
|
340
|
-
if (!match)
|
|
341
|
-
return;
|
|
342
|
-
const params = match[1];
|
|
343
|
-
if (params === "" || params === "0") {
|
|
344
|
-
// Full reset
|
|
345
|
-
this.reset();
|
|
346
|
-
return;
|
|
347
|
-
}
|
|
348
|
-
// Parse parameters (can be semicolon-separated)
|
|
349
|
-
const parts = params.split(";");
|
|
350
|
-
let i = 0;
|
|
351
|
-
while (i < parts.length) {
|
|
352
|
-
const code = Number.parseInt(parts[i], 10);
|
|
353
|
-
// Handle 256-color and RGB codes which consume multiple parameters
|
|
354
|
-
if (code === 38 || code === 48) {
|
|
355
|
-
// 38;5;N (256 color fg) or 38;2;R;G;B (RGB fg)
|
|
356
|
-
// 48;5;N (256 color bg) or 48;2;R;G;B (RGB bg)
|
|
357
|
-
if (parts[i + 1] === "5" && parts[i + 2] !== undefined) {
|
|
358
|
-
// 256 color: 38;5;N or 48;5;N
|
|
359
|
-
const colorCode = `${parts[i]};${parts[i + 1]};${parts[i + 2]}`;
|
|
360
|
-
if (code === 38) {
|
|
361
|
-
this.fgColor = colorCode;
|
|
362
|
-
}
|
|
363
|
-
else {
|
|
364
|
-
this.bgColor = colorCode;
|
|
365
|
-
}
|
|
366
|
-
i += 3;
|
|
367
|
-
continue;
|
|
368
|
-
}
|
|
369
|
-
else if (parts[i + 1] === "2" && parts[i + 4] !== undefined) {
|
|
370
|
-
// RGB color: 38;2;R;G;B or 48;2;R;G;B
|
|
371
|
-
const colorCode = `${parts[i]};${parts[i + 1]};${parts[i + 2]};${parts[i + 3]};${parts[i + 4]}`;
|
|
372
|
-
if (code === 38) {
|
|
373
|
-
this.fgColor = colorCode;
|
|
374
|
-
}
|
|
375
|
-
else {
|
|
376
|
-
this.bgColor = colorCode;
|
|
377
|
-
}
|
|
378
|
-
i += 5;
|
|
379
|
-
continue;
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
// Standard SGR codes
|
|
383
|
-
switch (code) {
|
|
384
|
-
case 0:
|
|
385
|
-
this.reset();
|
|
386
|
-
break;
|
|
387
|
-
case 1:
|
|
388
|
-
this.bold = true;
|
|
389
|
-
break;
|
|
390
|
-
case 2:
|
|
391
|
-
this.dim = true;
|
|
392
|
-
break;
|
|
393
|
-
case 3:
|
|
394
|
-
this.italic = true;
|
|
395
|
-
break;
|
|
396
|
-
case 4:
|
|
397
|
-
this.underline = true;
|
|
398
|
-
break;
|
|
399
|
-
case 5:
|
|
400
|
-
this.blink = true;
|
|
401
|
-
break;
|
|
402
|
-
case 7:
|
|
403
|
-
this.inverse = true;
|
|
404
|
-
break;
|
|
405
|
-
case 8:
|
|
406
|
-
this.hidden = true;
|
|
407
|
-
break;
|
|
408
|
-
case 9:
|
|
409
|
-
this.strikethrough = true;
|
|
410
|
-
break;
|
|
411
|
-
case 21:
|
|
412
|
-
this.bold = false;
|
|
413
|
-
break; // Some terminals
|
|
414
|
-
case 22:
|
|
415
|
-
this.bold = false;
|
|
416
|
-
this.dim = false;
|
|
417
|
-
break;
|
|
418
|
-
case 23:
|
|
419
|
-
this.italic = false;
|
|
420
|
-
break;
|
|
421
|
-
case 24:
|
|
422
|
-
this.underline = false;
|
|
423
|
-
break;
|
|
424
|
-
case 25:
|
|
425
|
-
this.blink = false;
|
|
426
|
-
break;
|
|
427
|
-
case 27:
|
|
428
|
-
this.inverse = false;
|
|
429
|
-
break;
|
|
430
|
-
case 28:
|
|
431
|
-
this.hidden = false;
|
|
432
|
-
break;
|
|
433
|
-
case 29:
|
|
434
|
-
this.strikethrough = false;
|
|
435
|
-
break;
|
|
436
|
-
case 39:
|
|
437
|
-
this.fgColor = null;
|
|
438
|
-
break; // Default fg
|
|
439
|
-
case 49:
|
|
440
|
-
this.bgColor = null;
|
|
441
|
-
break; // Default bg
|
|
442
|
-
default:
|
|
443
|
-
// Standard foreground colors 30-37, 90-97
|
|
444
|
-
if ((code >= 30 && code <= 37) || (code >= 90 && code <= 97)) {
|
|
445
|
-
this.fgColor = String(code);
|
|
446
|
-
}
|
|
447
|
-
// Standard background colors 40-47, 100-107
|
|
448
|
-
else if ((code >= 40 && code <= 47) || (code >= 100 && code <= 107)) {
|
|
449
|
-
this.bgColor = String(code);
|
|
450
|
-
}
|
|
451
|
-
break;
|
|
452
|
-
}
|
|
453
|
-
i++;
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
reset() {
|
|
457
|
-
this.bold = false;
|
|
458
|
-
this.dim = false;
|
|
459
|
-
this.italic = false;
|
|
460
|
-
this.underline = false;
|
|
461
|
-
this.blink = false;
|
|
462
|
-
this.inverse = false;
|
|
463
|
-
this.hidden = false;
|
|
464
|
-
this.strikethrough = false;
|
|
465
|
-
this.fgColor = null;
|
|
466
|
-
this.bgColor = null;
|
|
467
|
-
// SGR reset does not affect OSC 8 hyperlink state
|
|
468
|
-
}
|
|
469
|
-
/** Clear all state for reuse. */
|
|
470
|
-
clear() {
|
|
471
|
-
this.reset();
|
|
472
|
-
this.activeHyperlink = null;
|
|
473
|
-
}
|
|
474
|
-
getActiveCodes() {
|
|
475
|
-
const codes = [];
|
|
476
|
-
if (this.bold)
|
|
477
|
-
codes.push("1");
|
|
478
|
-
if (this.dim)
|
|
479
|
-
codes.push("2");
|
|
480
|
-
if (this.italic)
|
|
481
|
-
codes.push("3");
|
|
482
|
-
if (this.underline)
|
|
483
|
-
codes.push("4");
|
|
484
|
-
if (this.blink)
|
|
485
|
-
codes.push("5");
|
|
486
|
-
if (this.inverse)
|
|
487
|
-
codes.push("7");
|
|
488
|
-
if (this.hidden)
|
|
489
|
-
codes.push("8");
|
|
490
|
-
if (this.strikethrough)
|
|
491
|
-
codes.push("9");
|
|
492
|
-
if (this.fgColor)
|
|
493
|
-
codes.push(this.fgColor);
|
|
494
|
-
if (this.bgColor)
|
|
495
|
-
codes.push(this.bgColor);
|
|
496
|
-
let result = codes.length > 0 ? `\x1b[${codes.join(";")}m` : "";
|
|
497
|
-
if (this.activeHyperlink) {
|
|
498
|
-
result += formatOsc8Hyperlink(this.activeHyperlink);
|
|
499
|
-
}
|
|
500
|
-
return result;
|
|
501
|
-
}
|
|
502
|
-
hasActiveCodes() {
|
|
503
|
-
return (this.bold ||
|
|
504
|
-
this.dim ||
|
|
505
|
-
this.italic ||
|
|
506
|
-
this.underline ||
|
|
507
|
-
this.blink ||
|
|
508
|
-
this.inverse ||
|
|
509
|
-
this.hidden ||
|
|
510
|
-
this.strikethrough ||
|
|
511
|
-
this.fgColor !== null ||
|
|
512
|
-
this.bgColor !== null ||
|
|
513
|
-
this.activeHyperlink !== null);
|
|
514
|
-
}
|
|
515
|
-
/**
|
|
516
|
-
* Get reset codes for attributes that need to be turned off at line end.
|
|
517
|
-
* Underline must be closed to prevent bleeding into padding.
|
|
518
|
-
* Active OSC 8 hyperlinks must be closed and re-opened on the next line.
|
|
519
|
-
* Returns empty string if no attributes need closing.
|
|
520
|
-
*/
|
|
521
|
-
getLineEndReset() {
|
|
522
|
-
let result = "";
|
|
523
|
-
if (this.underline) {
|
|
524
|
-
result += "\x1b[24m"; // Underline off only
|
|
525
|
-
}
|
|
526
|
-
if (this.activeHyperlink) {
|
|
527
|
-
result += formatOsc8Close(this.activeHyperlink.terminator); // Re-opened at line start via getActiveCodes()
|
|
528
|
-
}
|
|
529
|
-
return result;
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
function updateTrackerFromText(text, tracker) {
|
|
533
|
-
let i = 0;
|
|
534
|
-
while (i < text.length) {
|
|
535
|
-
const ansiResult = extractAnsiCode(text, i);
|
|
536
|
-
if (ansiResult) {
|
|
537
|
-
tracker.process(ansiResult.code);
|
|
538
|
-
i += ansiResult.length;
|
|
539
|
-
}
|
|
540
|
-
else {
|
|
541
|
-
i++;
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
/**
|
|
546
|
-
* Split text into words while keeping ANSI codes attached.
|
|
547
|
-
*/
|
|
548
|
-
function splitIntoTokensWithAnsi(text) {
|
|
549
|
-
const tokens = [];
|
|
550
|
-
let current = "";
|
|
551
|
-
let pendingAnsi = ""; // ANSI codes waiting to be attached to next visible content
|
|
552
|
-
let inWhitespace = false;
|
|
553
|
-
let i = 0;
|
|
554
|
-
while (i < text.length) {
|
|
555
|
-
const ansiResult = extractAnsiCode(text, i);
|
|
556
|
-
if (ansiResult) {
|
|
557
|
-
// Hold ANSI codes separately - they'll be attached to the next visible char
|
|
558
|
-
pendingAnsi += ansiResult.code;
|
|
559
|
-
i += ansiResult.length;
|
|
560
|
-
continue;
|
|
561
|
-
}
|
|
562
|
-
const char = text[i];
|
|
563
|
-
const charIsSpace = char === " ";
|
|
564
|
-
if (charIsSpace !== inWhitespace && current) {
|
|
565
|
-
// Switching between whitespace and non-whitespace, push current token
|
|
566
|
-
tokens.push(current);
|
|
567
|
-
current = "";
|
|
568
|
-
}
|
|
569
|
-
// Attach any pending ANSI codes to this visible character
|
|
570
|
-
if (pendingAnsi) {
|
|
571
|
-
current += pendingAnsi;
|
|
572
|
-
pendingAnsi = "";
|
|
573
|
-
}
|
|
574
|
-
inWhitespace = charIsSpace;
|
|
575
|
-
current += char;
|
|
576
|
-
i++;
|
|
577
|
-
}
|
|
578
|
-
// Handle any remaining pending ANSI codes (attach to last token)
|
|
579
|
-
if (pendingAnsi) {
|
|
580
|
-
current += pendingAnsi;
|
|
581
|
-
}
|
|
582
|
-
if (current) {
|
|
583
|
-
tokens.push(current);
|
|
584
|
-
}
|
|
585
|
-
return tokens;
|
|
586
|
-
}
|
|
587
|
-
/**
|
|
588
|
-
* Wrap text with ANSI codes preserved.
|
|
589
|
-
*
|
|
590
|
-
* ONLY does word wrapping - NO padding, NO background colors.
|
|
591
|
-
* Returns lines where each line is <= width visible chars.
|
|
592
|
-
* Active ANSI codes are preserved across line breaks.
|
|
593
|
-
*
|
|
594
|
-
* @param text - Text to wrap (may contain ANSI codes and newlines)
|
|
595
|
-
* @param width - Maximum visible width per line
|
|
596
|
-
* @returns Array of wrapped lines (NOT padded to width)
|
|
597
|
-
*/
|
|
598
|
-
export function wrapTextWithAnsi(text, width) {
|
|
599
|
-
if (!text) {
|
|
600
|
-
return [""];
|
|
601
|
-
}
|
|
602
|
-
// Handle newlines by processing each line separately
|
|
603
|
-
// Track ANSI state across lines so styles carry over after literal newlines
|
|
604
|
-
const inputLines = text.split("\n");
|
|
605
|
-
const result = [];
|
|
606
|
-
const tracker = new AnsiCodeTracker();
|
|
607
|
-
for (const inputLine of inputLines) {
|
|
608
|
-
// Prepend active ANSI codes from previous lines (except for first line)
|
|
609
|
-
const prefix = result.length > 0 ? tracker.getActiveCodes() : "";
|
|
610
|
-
const wrappedLines = wrapSingleLine(prefix + inputLine, width);
|
|
611
|
-
for (const wrappedLine of wrappedLines) {
|
|
612
|
-
result.push(wrappedLine);
|
|
613
|
-
}
|
|
614
|
-
// Update tracker with codes from this line for next iteration
|
|
615
|
-
updateTrackerFromText(inputLine, tracker);
|
|
616
|
-
}
|
|
617
|
-
return result.length > 0 ? result : [""];
|
|
618
|
-
}
|
|
619
|
-
function wrapSingleLine(line, width) {
|
|
620
|
-
if (!line) {
|
|
621
|
-
return [""];
|
|
622
|
-
}
|
|
623
|
-
const visibleLength = visibleWidth(line);
|
|
624
|
-
if (visibleLength <= width) {
|
|
625
|
-
return [line];
|
|
626
|
-
}
|
|
627
|
-
const wrapped = [];
|
|
628
|
-
const tracker = new AnsiCodeTracker();
|
|
629
|
-
const tokens = splitIntoTokensWithAnsi(line);
|
|
630
|
-
let currentLine = "";
|
|
631
|
-
let currentVisibleLength = 0;
|
|
632
|
-
for (const token of tokens) {
|
|
633
|
-
const tokenVisibleLength = visibleWidth(token);
|
|
634
|
-
const isWhitespace = token.trim() === "";
|
|
635
|
-
// Token itself is too long - break it character by character
|
|
636
|
-
if (tokenVisibleLength > width && !isWhitespace) {
|
|
637
|
-
if (currentLine) {
|
|
638
|
-
// Add specific reset for underline only (preserves background)
|
|
639
|
-
const lineEndReset = tracker.getLineEndReset();
|
|
640
|
-
if (lineEndReset) {
|
|
641
|
-
currentLine += lineEndReset;
|
|
642
|
-
}
|
|
643
|
-
wrapped.push(currentLine);
|
|
644
|
-
currentLine = "";
|
|
645
|
-
currentVisibleLength = 0;
|
|
646
|
-
}
|
|
647
|
-
// Break long token - breakLongWord handles its own resets
|
|
648
|
-
const broken = breakLongWord(token, width, tracker);
|
|
649
|
-
for (let i = 0; i < broken.length - 1; i++) {
|
|
650
|
-
wrapped.push(broken[i]);
|
|
651
|
-
}
|
|
652
|
-
currentLine = broken[broken.length - 1];
|
|
653
|
-
currentVisibleLength = visibleWidth(currentLine);
|
|
654
|
-
continue;
|
|
655
|
-
}
|
|
656
|
-
// Check if adding this token would exceed width
|
|
657
|
-
const totalNeeded = currentVisibleLength + tokenVisibleLength;
|
|
658
|
-
if (totalNeeded > width && currentVisibleLength > 0) {
|
|
659
|
-
// Trim trailing whitespace, then add underline reset (not full reset, to preserve background)
|
|
660
|
-
let lineToWrap = currentLine.trimEnd();
|
|
661
|
-
const lineEndReset = tracker.getLineEndReset();
|
|
662
|
-
if (lineEndReset) {
|
|
663
|
-
lineToWrap += lineEndReset;
|
|
664
|
-
}
|
|
665
|
-
wrapped.push(lineToWrap);
|
|
666
|
-
if (isWhitespace) {
|
|
667
|
-
// Don't start new line with whitespace
|
|
668
|
-
currentLine = tracker.getActiveCodes();
|
|
669
|
-
currentVisibleLength = 0;
|
|
670
|
-
}
|
|
671
|
-
else {
|
|
672
|
-
currentLine = tracker.getActiveCodes() + token;
|
|
673
|
-
currentVisibleLength = tokenVisibleLength;
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
else {
|
|
677
|
-
// Add to current line
|
|
678
|
-
currentLine += token;
|
|
679
|
-
currentVisibleLength += tokenVisibleLength;
|
|
680
|
-
}
|
|
681
|
-
updateTrackerFromText(token, tracker);
|
|
682
|
-
}
|
|
683
|
-
if (currentLine) {
|
|
684
|
-
// No reset at end of final line - let caller handle it
|
|
685
|
-
wrapped.push(currentLine);
|
|
686
|
-
}
|
|
687
|
-
// Trailing whitespace can cause lines to exceed the requested width
|
|
688
|
-
return wrapped.length > 0 ? wrapped.map((line) => line.trimEnd()) : [""];
|
|
689
|
-
}
|
|
690
|
-
export const PUNCTUATION_REGEX = /[(){}[\]<>.,;:'"!?+\-=*/\\|&%^$#@~`]/;
|
|
691
|
-
/**
|
|
692
|
-
* Check if a character is whitespace.
|
|
693
|
-
*/
|
|
694
|
-
export function isWhitespaceChar(char) {
|
|
695
|
-
return /\s/.test(char);
|
|
696
|
-
}
|
|
697
|
-
/**
|
|
698
|
-
* Check if a character is punctuation.
|
|
699
|
-
*/
|
|
700
|
-
export function isPunctuationChar(char) {
|
|
701
|
-
return PUNCTUATION_REGEX.test(char);
|
|
702
|
-
}
|
|
703
|
-
function breakLongWord(word, width, tracker) {
|
|
704
|
-
const lines = [];
|
|
705
|
-
let currentLine = tracker.getActiveCodes();
|
|
706
|
-
let currentWidth = 0;
|
|
707
|
-
// First, separate ANSI codes from visible content
|
|
708
|
-
// We need to handle ANSI codes specially since they're not graphemes
|
|
709
|
-
let i = 0;
|
|
710
|
-
const segments = [];
|
|
711
|
-
while (i < word.length) {
|
|
712
|
-
const ansiResult = extractAnsiCode(word, i);
|
|
713
|
-
if (ansiResult) {
|
|
714
|
-
segments.push({ type: "ansi", value: ansiResult.code });
|
|
715
|
-
i += ansiResult.length;
|
|
716
|
-
}
|
|
717
|
-
else {
|
|
718
|
-
// Find the next ANSI code or end of string
|
|
719
|
-
let end = i;
|
|
720
|
-
while (end < word.length) {
|
|
721
|
-
const nextAnsi = extractAnsiCode(word, end);
|
|
722
|
-
if (nextAnsi)
|
|
723
|
-
break;
|
|
724
|
-
end++;
|
|
725
|
-
}
|
|
726
|
-
// Segment this non-ANSI portion into graphemes
|
|
727
|
-
const textPortion = word.slice(i, end);
|
|
728
|
-
for (const seg of graphemeSegmenter.segment(textPortion)) {
|
|
729
|
-
segments.push({ type: "grapheme", value: seg.segment });
|
|
730
|
-
}
|
|
731
|
-
i = end;
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
// Now process segments
|
|
735
|
-
for (const seg of segments) {
|
|
736
|
-
if (seg.type === "ansi") {
|
|
737
|
-
currentLine += seg.value;
|
|
738
|
-
tracker.process(seg.value);
|
|
739
|
-
continue;
|
|
740
|
-
}
|
|
741
|
-
const grapheme = seg.value;
|
|
742
|
-
// Skip empty graphemes to avoid issues with string-width calculation
|
|
743
|
-
if (!grapheme)
|
|
744
|
-
continue;
|
|
745
|
-
const graphemeWidth = visibleWidth(grapheme);
|
|
746
|
-
if (currentWidth + graphemeWidth > width) {
|
|
747
|
-
// Add specific reset for underline only (preserves background)
|
|
748
|
-
const lineEndReset = tracker.getLineEndReset();
|
|
749
|
-
if (lineEndReset) {
|
|
750
|
-
currentLine += lineEndReset;
|
|
751
|
-
}
|
|
752
|
-
lines.push(currentLine);
|
|
753
|
-
currentLine = tracker.getActiveCodes();
|
|
754
|
-
currentWidth = 0;
|
|
755
|
-
}
|
|
756
|
-
currentLine += grapheme;
|
|
757
|
-
currentWidth += graphemeWidth;
|
|
758
|
-
}
|
|
759
|
-
if (currentLine) {
|
|
760
|
-
// No reset at end of final segment - caller handles continuation
|
|
761
|
-
lines.push(currentLine);
|
|
762
|
-
}
|
|
763
|
-
return lines.length > 0 ? lines : [""];
|
|
764
|
-
}
|
|
765
|
-
/**
|
|
766
|
-
* Apply background color to a line, padding to full width.
|
|
767
|
-
*
|
|
768
|
-
* @param line - Line of text (may contain ANSI codes)
|
|
769
|
-
* @param width - Total width to pad to
|
|
770
|
-
* @param bgFn - Background color function
|
|
771
|
-
* @returns Line with background applied and padded to width
|
|
772
|
-
*/
|
|
773
|
-
export function applyBackgroundToLine(line, width, bgFn) {
|
|
774
|
-
// Calculate padding needed
|
|
775
|
-
const visibleLen = visibleWidth(line);
|
|
776
|
-
const paddingNeeded = Math.max(0, width - visibleLen);
|
|
777
|
-
const padding = " ".repeat(paddingNeeded);
|
|
778
|
-
// Apply background to content + padding
|
|
779
|
-
const withPadding = line + padding;
|
|
780
|
-
return bgFn(withPadding);
|
|
781
|
-
}
|
|
782
|
-
/**
|
|
783
|
-
* Truncate text to fit within a maximum visible width, adding ellipsis if needed.
|
|
784
|
-
* Optionally pad with spaces to reach exactly maxWidth.
|
|
785
|
-
* Properly handles ANSI escape codes (they don't count toward width).
|
|
786
|
-
*
|
|
787
|
-
* @param text - Text to truncate (may contain ANSI codes)
|
|
788
|
-
* @param maxWidth - Maximum visible width
|
|
789
|
-
* @param ellipsis - Ellipsis string to append when truncating (default: "...")
|
|
790
|
-
* @param pad - If true, pad result with spaces to exactly maxWidth (default: false)
|
|
791
|
-
* @returns Truncated text, optionally padded to exactly maxWidth
|
|
792
|
-
*/
|
|
793
|
-
export function truncateToWidth(text, maxWidth, ellipsis = "...", pad = false) {
|
|
794
|
-
if (maxWidth <= 0) {
|
|
795
|
-
return "";
|
|
796
|
-
}
|
|
797
|
-
if (text.length === 0) {
|
|
798
|
-
return pad ? " ".repeat(maxWidth) : "";
|
|
799
|
-
}
|
|
800
|
-
const ellipsisWidth = visibleWidth(ellipsis);
|
|
801
|
-
if (ellipsisWidth >= maxWidth) {
|
|
802
|
-
const textWidth = visibleWidth(text);
|
|
803
|
-
if (textWidth <= maxWidth) {
|
|
804
|
-
return pad ? text + " ".repeat(maxWidth - textWidth) : text;
|
|
805
|
-
}
|
|
806
|
-
const clippedEllipsis = truncateFragmentToWidth(ellipsis, maxWidth);
|
|
807
|
-
if (clippedEllipsis.width === 0) {
|
|
808
|
-
return pad ? " ".repeat(maxWidth) : "";
|
|
809
|
-
}
|
|
810
|
-
return finalizeTruncatedResult("", 0, clippedEllipsis.text, clippedEllipsis.width, maxWidth, pad);
|
|
811
|
-
}
|
|
812
|
-
if (isPrintableAscii(text)) {
|
|
813
|
-
if (text.length <= maxWidth) {
|
|
814
|
-
return pad ? text + " ".repeat(maxWidth - text.length) : text;
|
|
815
|
-
}
|
|
816
|
-
const targetWidth = maxWidth - ellipsisWidth;
|
|
817
|
-
return finalizeTruncatedResult(text.slice(0, targetWidth), targetWidth, ellipsis, ellipsisWidth, maxWidth, pad);
|
|
818
|
-
}
|
|
819
|
-
const targetWidth = maxWidth - ellipsisWidth;
|
|
820
|
-
let result = "";
|
|
821
|
-
let pendingAnsi = "";
|
|
822
|
-
let visibleSoFar = 0;
|
|
823
|
-
let keptWidth = 0;
|
|
824
|
-
let keepContiguousPrefix = true;
|
|
825
|
-
let overflowed = false;
|
|
826
|
-
let exhaustedInput = false;
|
|
827
|
-
const hasAnsi = text.includes("\x1b");
|
|
828
|
-
const hasTabs = text.includes("\t");
|
|
829
|
-
if (!hasAnsi && !hasTabs) {
|
|
830
|
-
for (const { segment } of graphemeSegmenter.segment(text)) {
|
|
831
|
-
const width = graphemeWidth(segment);
|
|
832
|
-
if (keepContiguousPrefix && keptWidth + width <= targetWidth) {
|
|
833
|
-
result += segment;
|
|
834
|
-
keptWidth += width;
|
|
835
|
-
}
|
|
836
|
-
else {
|
|
837
|
-
keepContiguousPrefix = false;
|
|
838
|
-
}
|
|
839
|
-
visibleSoFar += width;
|
|
840
|
-
if (visibleSoFar > maxWidth) {
|
|
841
|
-
overflowed = true;
|
|
842
|
-
break;
|
|
843
|
-
}
|
|
844
|
-
}
|
|
845
|
-
exhaustedInput = !overflowed;
|
|
846
|
-
}
|
|
847
|
-
else {
|
|
848
|
-
let i = 0;
|
|
849
|
-
while (i < text.length) {
|
|
850
|
-
const ansi = extractAnsiCode(text, i);
|
|
851
|
-
if (ansi) {
|
|
852
|
-
pendingAnsi += ansi.code;
|
|
853
|
-
i += ansi.length;
|
|
854
|
-
continue;
|
|
855
|
-
}
|
|
856
|
-
if (text[i] === "\t") {
|
|
857
|
-
if (keepContiguousPrefix && keptWidth + 3 <= targetWidth) {
|
|
858
|
-
if (pendingAnsi) {
|
|
859
|
-
result += pendingAnsi;
|
|
860
|
-
pendingAnsi = "";
|
|
861
|
-
}
|
|
862
|
-
result += "\t";
|
|
863
|
-
keptWidth += 3;
|
|
864
|
-
}
|
|
865
|
-
else {
|
|
866
|
-
keepContiguousPrefix = false;
|
|
867
|
-
pendingAnsi = "";
|
|
868
|
-
}
|
|
869
|
-
visibleSoFar += 3;
|
|
870
|
-
if (visibleSoFar > maxWidth) {
|
|
871
|
-
overflowed = true;
|
|
872
|
-
break;
|
|
873
|
-
}
|
|
874
|
-
i++;
|
|
875
|
-
continue;
|
|
876
|
-
}
|
|
877
|
-
let end = i;
|
|
878
|
-
while (end < text.length && text[end] !== "\t") {
|
|
879
|
-
const nextAnsi = extractAnsiCode(text, end);
|
|
880
|
-
if (nextAnsi) {
|
|
881
|
-
break;
|
|
882
|
-
}
|
|
883
|
-
end++;
|
|
884
|
-
}
|
|
885
|
-
for (const { segment } of graphemeSegmenter.segment(text.slice(i, end))) {
|
|
886
|
-
const width = graphemeWidth(segment);
|
|
887
|
-
if (keepContiguousPrefix && keptWidth + width <= targetWidth) {
|
|
888
|
-
if (pendingAnsi) {
|
|
889
|
-
result += pendingAnsi;
|
|
890
|
-
pendingAnsi = "";
|
|
891
|
-
}
|
|
892
|
-
result += segment;
|
|
893
|
-
keptWidth += width;
|
|
894
|
-
}
|
|
895
|
-
else {
|
|
896
|
-
keepContiguousPrefix = false;
|
|
897
|
-
pendingAnsi = "";
|
|
898
|
-
}
|
|
899
|
-
visibleSoFar += width;
|
|
900
|
-
if (visibleSoFar > maxWidth) {
|
|
901
|
-
overflowed = true;
|
|
902
|
-
break;
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
if (overflowed) {
|
|
906
|
-
break;
|
|
907
|
-
}
|
|
908
|
-
i = end;
|
|
909
|
-
}
|
|
910
|
-
exhaustedInput = i >= text.length;
|
|
911
|
-
}
|
|
912
|
-
if (!overflowed && exhaustedInput) {
|
|
913
|
-
return pad ? text + " ".repeat(Math.max(0, maxWidth - visibleSoFar)) : text;
|
|
914
|
-
}
|
|
915
|
-
return finalizeTruncatedResult(result, keptWidth, ellipsis, ellipsisWidth, maxWidth, pad);
|
|
916
|
-
}
|
|
917
|
-
/**
|
|
918
|
-
* Extract a range of visible columns from a line. Handles ANSI codes and wide chars.
|
|
919
|
-
* @param strict - If true, exclude wide chars at boundary that would extend past the range
|
|
920
|
-
*/
|
|
921
|
-
export function sliceByColumn(line, startCol, length, strict = false) {
|
|
922
|
-
return sliceWithWidth(line, startCol, length, strict).text;
|
|
923
|
-
}
|
|
924
|
-
/** Like sliceByColumn but also returns the actual visible width of the result. */
|
|
925
|
-
export function sliceWithWidth(line, startCol, length, strict = false) {
|
|
926
|
-
if (length <= 0)
|
|
927
|
-
return { text: "", width: 0 };
|
|
928
|
-
const endCol = startCol + length;
|
|
929
|
-
let result = "", resultWidth = 0, currentCol = 0, i = 0, pendingAnsi = "";
|
|
930
|
-
while (i < line.length) {
|
|
931
|
-
const ansi = extractAnsiCode(line, i);
|
|
932
|
-
if (ansi) {
|
|
933
|
-
if (currentCol >= startCol && currentCol < endCol)
|
|
934
|
-
result += ansi.code;
|
|
935
|
-
else if (currentCol < startCol)
|
|
936
|
-
pendingAnsi += ansi.code;
|
|
937
|
-
i += ansi.length;
|
|
938
|
-
continue;
|
|
939
|
-
}
|
|
940
|
-
let textEnd = i;
|
|
941
|
-
while (textEnd < line.length && !extractAnsiCode(line, textEnd))
|
|
942
|
-
textEnd++;
|
|
943
|
-
for (const { segment } of graphemeSegmenter.segment(line.slice(i, textEnd))) {
|
|
944
|
-
const w = graphemeWidth(segment);
|
|
945
|
-
const inRange = currentCol >= startCol && currentCol < endCol;
|
|
946
|
-
const fits = !strict || currentCol + w <= endCol;
|
|
947
|
-
if (inRange && fits) {
|
|
948
|
-
if (pendingAnsi) {
|
|
949
|
-
result += pendingAnsi;
|
|
950
|
-
pendingAnsi = "";
|
|
951
|
-
}
|
|
952
|
-
result += segment;
|
|
953
|
-
resultWidth += w;
|
|
954
|
-
}
|
|
955
|
-
currentCol += w;
|
|
956
|
-
if (currentCol >= endCol)
|
|
957
|
-
break;
|
|
958
|
-
}
|
|
959
|
-
i = textEnd;
|
|
960
|
-
if (currentCol >= endCol)
|
|
961
|
-
break;
|
|
962
|
-
}
|
|
963
|
-
return { text: result, width: resultWidth };
|
|
964
|
-
}
|
|
965
|
-
// Pooled tracker instance for extractSegments (avoids allocation per call)
|
|
966
|
-
const pooledStyleTracker = new AnsiCodeTracker();
|
|
967
|
-
/**
|
|
968
|
-
* Extract "before" and "after" segments from a line in a single pass.
|
|
969
|
-
* Used for overlay compositing where we need content before and after the overlay region.
|
|
970
|
-
* Preserves styling from before the overlay that should affect content after it.
|
|
971
|
-
*/
|
|
972
|
-
export function extractSegments(line, beforeEnd, afterStart, afterLen, strictAfter = false) {
|
|
973
|
-
let before = "", beforeWidth = 0, after = "", afterWidth = 0;
|
|
974
|
-
let currentCol = 0, i = 0;
|
|
975
|
-
let pendingAnsiBefore = "";
|
|
976
|
-
let afterStarted = false;
|
|
977
|
-
const afterEnd = afterStart + afterLen;
|
|
978
|
-
// Track styling state so "after" inherits styling from before the overlay
|
|
979
|
-
pooledStyleTracker.clear();
|
|
980
|
-
while (i < line.length) {
|
|
981
|
-
const ansi = extractAnsiCode(line, i);
|
|
982
|
-
if (ansi) {
|
|
983
|
-
// Track all SGR codes to know styling state at afterStart
|
|
984
|
-
pooledStyleTracker.process(ansi.code);
|
|
985
|
-
// Include ANSI codes in their respective segments
|
|
986
|
-
if (currentCol < beforeEnd) {
|
|
987
|
-
pendingAnsiBefore += ansi.code;
|
|
988
|
-
}
|
|
989
|
-
else if (currentCol >= afterStart && currentCol < afterEnd && afterStarted) {
|
|
990
|
-
// Only include after we've started "after" (styling already prepended)
|
|
991
|
-
after += ansi.code;
|
|
992
|
-
}
|
|
993
|
-
i += ansi.length;
|
|
994
|
-
continue;
|
|
995
|
-
}
|
|
996
|
-
let textEnd = i;
|
|
997
|
-
while (textEnd < line.length && !extractAnsiCode(line, textEnd))
|
|
998
|
-
textEnd++;
|
|
999
|
-
for (const { segment } of graphemeSegmenter.segment(line.slice(i, textEnd))) {
|
|
1000
|
-
const w = graphemeWidth(segment);
|
|
1001
|
-
if (currentCol < beforeEnd) {
|
|
1002
|
-
if (pendingAnsiBefore) {
|
|
1003
|
-
before += pendingAnsiBefore;
|
|
1004
|
-
pendingAnsiBefore = "";
|
|
1005
|
-
}
|
|
1006
|
-
before += segment;
|
|
1007
|
-
beforeWidth += w;
|
|
1008
|
-
}
|
|
1009
|
-
else if (currentCol >= afterStart && currentCol < afterEnd) {
|
|
1010
|
-
const fits = !strictAfter || currentCol + w <= afterEnd;
|
|
1011
|
-
if (fits) {
|
|
1012
|
-
// On first "after" grapheme, prepend inherited styling from before overlay
|
|
1013
|
-
if (!afterStarted) {
|
|
1014
|
-
after += pooledStyleTracker.getActiveCodes();
|
|
1015
|
-
afterStarted = true;
|
|
1016
|
-
}
|
|
1017
|
-
after += segment;
|
|
1018
|
-
afterWidth += w;
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
currentCol += w;
|
|
1022
|
-
// Early exit: done with "before" only, or done with both segments
|
|
1023
|
-
if (afterLen <= 0 ? currentCol >= beforeEnd : currentCol >= afterEnd)
|
|
1024
|
-
break;
|
|
1025
|
-
}
|
|
1026
|
-
i = textEnd;
|
|
1027
|
-
if (afterLen <= 0 ? currentCol >= beforeEnd : currentCol >= afterEnd)
|
|
1028
|
-
break;
|
|
1029
|
-
}
|
|
1030
|
-
return { before, beforeWidth, after, afterWidth };
|
|
1031
|
-
}
|
|
1032
|
-
//# sourceMappingURL=utils.js.map
|