open-multi-agent-kit 0.80.7 → 0.80.8
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 +4 -30
- package/README.md +80 -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 +7 -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/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 +45 -0
- package/dist/core/browser-use.d.ts.map +1 -0
- package/dist/core/browser-use.js +70 -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 +4 -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 +70 -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/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 +1 -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/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/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 +66 -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 +1 -0
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +46 -5
- 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-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 +4 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -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 +23 -0
- package/dist/modes/interactive/components/control-panel-layout.d.ts.map +1 -0
- package/dist/modes/interactive/components/control-panel-layout.js +165 -0
- package/dist/modes/interactive/components/control-panel-layout.js.map +1 -0
- package/dist/modes/interactive/components/control-panel-runtime-status.d.ts +5 -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 +20 -0
- package/dist/modes/interactive/components/control-panel-runtime-status.js.map +1 -0
- package/dist/modes/interactive/components/control-panel.d.ts +8 -31
- package/dist/modes/interactive/components/control-panel.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel.js +38 -169
- 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 +1 -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 +74 -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 +22 -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/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
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lane SA3 - Sandbox Policy V2.
|
|
3
|
+
* allow: SIZE_OK - legacy evaluator; this change only keeps strip-only TypeScript compatibility.
|
|
4
|
+
*
|
|
5
|
+
* Pure fail-closed evaluator that composes path / env / network checks for a
|
|
6
|
+
* sandbox policy. It layers general glob matching (via `minimatch`), realpath
|
|
7
|
+
* normalization (when a resolver is provided), denied-env fail-closed
|
|
8
|
+
* semantics, and IPv4 / IPv6 loopback detection on top of the existing
|
|
9
|
+
* `SandboxPolicy` types. It does not spawn, resolve through the filesystem on
|
|
10
|
+
* its own, or log env values.
|
|
11
|
+
*/
|
|
12
|
+
import path from "node:path";
|
|
13
|
+
import { minimatch } from "minimatch";
|
|
14
|
+
/** Exact sensitive environment variable names (do not end in a standard suffix). */
|
|
15
|
+
const SENSITIVE_ENV_EXACT = new Set([
|
|
16
|
+
"AWS_ACCESS_KEY_ID",
|
|
17
|
+
"AWS_SECRET_ACCESS_KEY",
|
|
18
|
+
"AWS_SESSION_TOKEN",
|
|
19
|
+
"GITHUB_TOKEN",
|
|
20
|
+
"GH_TOKEN",
|
|
21
|
+
"GITLAB_TOKEN",
|
|
22
|
+
"NPM_TOKEN",
|
|
23
|
+
"NODE_AUTH_TOKEN",
|
|
24
|
+
]);
|
|
25
|
+
/** Sensitive environment variable name suffixes. */
|
|
26
|
+
const SENSITIVE_ENV_REGEX = /(^|_)(API_KEY|API_TOKEN|ACCESS_TOKEN|SECRET|SECRET_KEY|PRIVATE_KEY|PASSWORD|PASSWD|TOKEN)$/i;
|
|
27
|
+
/**
|
|
28
|
+
* Environment variable names that are always denied because they inject code
|
|
29
|
+
* or redirect runtime loader behavior. Denial is fail-closed: presence of any
|
|
30
|
+
* of these names blocks the policy evaluation regardless of value.
|
|
31
|
+
*/
|
|
32
|
+
const ENV_DENY_NAMES = new Set([
|
|
33
|
+
"LD_PRELOAD",
|
|
34
|
+
"LD_LIBRARY_PATH",
|
|
35
|
+
"LD_AUDIT",
|
|
36
|
+
"LD_BIND_NOW",
|
|
37
|
+
"LD_PROFILE",
|
|
38
|
+
"DYLD_INSERT_LIBRARIES",
|
|
39
|
+
"DYLD_LIBRARY_PATH",
|
|
40
|
+
"DYLD_FALLBACK_LIBRARY_PATH",
|
|
41
|
+
"NODE_OPTIONS",
|
|
42
|
+
"NODE_PATH",
|
|
43
|
+
"NODE_REPL_EXTERNAL_MODULE",
|
|
44
|
+
"NODE_EXTRA_CA_CERTS",
|
|
45
|
+
"NODE_TLS_REJECT_UNAUTHORIZED",
|
|
46
|
+
"PYTHONPATH",
|
|
47
|
+
"PYTHONHOME",
|
|
48
|
+
"PYTHONSTARTUP",
|
|
49
|
+
"PYTHONINSPECT",
|
|
50
|
+
"PERL5LIB",
|
|
51
|
+
"PERLLIB",
|
|
52
|
+
"PERL5OPT",
|
|
53
|
+
"RUBYLIB",
|
|
54
|
+
"RUBYOPT",
|
|
55
|
+
"RUBYPATH",
|
|
56
|
+
"JAVA_TOOL_OPTIONS",
|
|
57
|
+
"_JAVA_OPTIONS",
|
|
58
|
+
"JDK_JAVA_OPTIONS",
|
|
59
|
+
"MAVEN_OPTS",
|
|
60
|
+
]);
|
|
61
|
+
/**
|
|
62
|
+
* Matches a URL / DSN with embedded userinfo (`scheme://user:pass@host`).
|
|
63
|
+
* Used for value-based denial; only the variable NAME is ever recorded.
|
|
64
|
+
*/
|
|
65
|
+
const AUTH_URL_REGEX = /^[a-z][a-z0-9+.-]*:\/\/[^\s/@:]+:[^\s/@]+@[^\s/@]/i;
|
|
66
|
+
/** Path patterns that look like credential / key material on disk. */
|
|
67
|
+
const SENSITIVE_PATH_REGEX = /(?:^|[/\\])(?:\.env(?:\..*)?|auth\.json|oauth\.json|\.netrc|\.npmrc|\.pgpass|credentials|id_rsa|id_dsa|id_ecdsa|id_ed25519|.*(?:token|private[_-]?key|credential).*)$/i;
|
|
68
|
+
function isSensitiveEnvName(name) {
|
|
69
|
+
if (SENSITIVE_ENV_EXACT.has(name))
|
|
70
|
+
return true;
|
|
71
|
+
return SENSITIVE_ENV_REGEX.test(name);
|
|
72
|
+
}
|
|
73
|
+
function normalizePathValue(value) {
|
|
74
|
+
const resolved = path.resolve(value);
|
|
75
|
+
let normalized = resolved.replace(/\\/g, "/");
|
|
76
|
+
if (normalized.length > 1)
|
|
77
|
+
normalized = normalized.replace(/\/+$/, "");
|
|
78
|
+
return normalized;
|
|
79
|
+
}
|
|
80
|
+
function ruleHasGlob(pattern) {
|
|
81
|
+
return /[*?[\]{}]/.test(pattern);
|
|
82
|
+
}
|
|
83
|
+
function matchesRule(pattern, candidate) {
|
|
84
|
+
const normPattern = normalizePathValue(pattern);
|
|
85
|
+
const normCandidate = normalizePathValue(candidate);
|
|
86
|
+
if (ruleHasGlob(normPattern)) {
|
|
87
|
+
if (minimatch(normCandidate, normPattern))
|
|
88
|
+
return true;
|
|
89
|
+
// also accept recursive prefix form even if the writer omitted `/**`
|
|
90
|
+
return minimatch(normCandidate, `${normPattern}/**`);
|
|
91
|
+
}
|
|
92
|
+
return normCandidate === normPattern || normCandidate.startsWith(`${normPattern}/`);
|
|
93
|
+
}
|
|
94
|
+
function matchesAny(patterns, candidate) {
|
|
95
|
+
for (const pattern of patterns) {
|
|
96
|
+
if (matchesRule(pattern, candidate))
|
|
97
|
+
return { match: true, pattern };
|
|
98
|
+
}
|
|
99
|
+
return { match: false };
|
|
100
|
+
}
|
|
101
|
+
function isInsideRoot(root, candidate) {
|
|
102
|
+
const normRoot = normalizePathValue(root);
|
|
103
|
+
const normCandidate = normalizePathValue(candidate);
|
|
104
|
+
return normCandidate === normRoot || normCandidate.startsWith(`${normRoot}/`);
|
|
105
|
+
}
|
|
106
|
+
function isSensitivePath(value) {
|
|
107
|
+
return SENSITIVE_PATH_REGEX.test(value.replace(/\\/g, "/"));
|
|
108
|
+
}
|
|
109
|
+
/** True for IPv4 / IPv6 loopback and localhost hostnames. */
|
|
110
|
+
function isLoopbackHost(host) {
|
|
111
|
+
const h = host
|
|
112
|
+
.toLowerCase()
|
|
113
|
+
.replace(/^\[|\]$/g, "")
|
|
114
|
+
.trim();
|
|
115
|
+
if (h === "localhost")
|
|
116
|
+
return true;
|
|
117
|
+
if (h === "127.0.0.1" || h === "::1" || h === "0:0:0:0:0:0:0:1")
|
|
118
|
+
return true;
|
|
119
|
+
if (h === "::ffff:127.0.0.1" || h === "::ffff:7f00:1")
|
|
120
|
+
return true;
|
|
121
|
+
if (/^127\./.test(h))
|
|
122
|
+
return true;
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
function normalizeNetworkLoopback(request) {
|
|
126
|
+
let host = request.host;
|
|
127
|
+
if (!host && request.url) {
|
|
128
|
+
try {
|
|
129
|
+
host = new URL(request.url).hostname;
|
|
130
|
+
}
|
|
131
|
+
catch {
|
|
132
|
+
host = undefined;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (host && isLoopbackHost(host)) {
|
|
136
|
+
return { ...request, host, loopback: true };
|
|
137
|
+
}
|
|
138
|
+
return request;
|
|
139
|
+
}
|
|
140
|
+
function hostFromRequest(request) {
|
|
141
|
+
if (request.host)
|
|
142
|
+
return request.host.toLowerCase();
|
|
143
|
+
if (!request.url)
|
|
144
|
+
return undefined;
|
|
145
|
+
try {
|
|
146
|
+
return new URL(request.url).hostname.toLowerCase();
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
return undefined;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
function hostMatches(patterns, host) {
|
|
153
|
+
const h = host.replace(/\.$/, "");
|
|
154
|
+
for (const raw of patterns) {
|
|
155
|
+
const p = raw.toLowerCase().replace(/\.$/, "");
|
|
156
|
+
if (h === p || h.endsWith(`.${p}`))
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
function decideNetworkV2(policy, request) {
|
|
162
|
+
if (policy.mode === "off")
|
|
163
|
+
return { allowed: true, rule: "sandbox.off", reason: "Sandbox policy is disabled." };
|
|
164
|
+
if (request.browser || request.unixSocketPath) {
|
|
165
|
+
return {
|
|
166
|
+
allowed: false,
|
|
167
|
+
rule: "network.socket_or_browser",
|
|
168
|
+
reason: "Browser and Unix socket access is denied by default.",
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
if (policy.network.mode === "none") {
|
|
172
|
+
return { allowed: false, rule: "network.none", reason: "Network access is disabled by policy." };
|
|
173
|
+
}
|
|
174
|
+
if (request.loopback) {
|
|
175
|
+
if (policy.network.mode === "loopback" ||
|
|
176
|
+
policy.network.mode === "domain-allowlist" ||
|
|
177
|
+
policy.network.mode === "all-explicit") {
|
|
178
|
+
return { allowed: true, rule: "network.loopback", reason: "Loopback access is allowed." };
|
|
179
|
+
}
|
|
180
|
+
return { allowed: false, rule: "network.loopback_denied", reason: "Loopback access is denied." };
|
|
181
|
+
}
|
|
182
|
+
const host = hostFromRequest(request);
|
|
183
|
+
if (!host)
|
|
184
|
+
return {
|
|
185
|
+
allowed: false,
|
|
186
|
+
rule: "network.unknown_host",
|
|
187
|
+
reason: "Network host could not be resolved from request.",
|
|
188
|
+
};
|
|
189
|
+
if (hostMatches(policy.network.deniedDomains, host)) {
|
|
190
|
+
return { allowed: false, rule: "network.domain_deny", reason: "Host matches a denied domain." };
|
|
191
|
+
}
|
|
192
|
+
if (policy.network.mode === "all-explicit") {
|
|
193
|
+
return {
|
|
194
|
+
allowed: true,
|
|
195
|
+
rule: "network.explicit_all",
|
|
196
|
+
reason: "Explicit network profile allows outbound host access.",
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
if (policy.network.mode === "domain-allowlist" && hostMatches(policy.network.allowedDomains, host)) {
|
|
200
|
+
return { allowed: true, rule: "network.domain_allow", reason: "Host matches an allowed domain." };
|
|
201
|
+
}
|
|
202
|
+
return { allowed: false, rule: "network.domain_not_allowed", reason: "Host is not allowed by network policy." };
|
|
203
|
+
}
|
|
204
|
+
function decidePathV2(policy, request, resolver) {
|
|
205
|
+
const requested = request.path;
|
|
206
|
+
const base = (rule, reason, candidate, action, matchedPattern) => ({
|
|
207
|
+
requestedPath: requested,
|
|
208
|
+
candidate,
|
|
209
|
+
kind: request.kind,
|
|
210
|
+
action,
|
|
211
|
+
rule,
|
|
212
|
+
reason,
|
|
213
|
+
matchedPattern,
|
|
214
|
+
});
|
|
215
|
+
const block = (rule, reason, candidate, matchedPattern) => base(rule, reason, candidate, "block", matchedPattern);
|
|
216
|
+
const allow = (rule, reason, candidate) => base(rule, reason, candidate, "allow");
|
|
217
|
+
if (requested.includes("\0")) {
|
|
218
|
+
return block("path.invalid", "Path contains a NUL byte.", requested);
|
|
219
|
+
}
|
|
220
|
+
let candidate;
|
|
221
|
+
let isSymlink = false;
|
|
222
|
+
if (resolver) {
|
|
223
|
+
const resolved = resolver(requested);
|
|
224
|
+
if (resolved.error) {
|
|
225
|
+
return block("path.resolve_error", resolved.error, requested);
|
|
226
|
+
}
|
|
227
|
+
candidate = resolved.realPath ?? resolved.nearestExistingParentRealPath ?? normalizePathValue(requested);
|
|
228
|
+
isSymlink = resolved.isSymlink === true;
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
candidate = normalizePathValue(requested);
|
|
232
|
+
}
|
|
233
|
+
if (isSensitivePath(requested) || isSensitivePath(candidate)) {
|
|
234
|
+
return block("path.sensitive", "Sensitive credential-like path is denied.", candidate);
|
|
235
|
+
}
|
|
236
|
+
if (!isInsideRoot(policy.filesystem.root, candidate)) {
|
|
237
|
+
return block("path.root_escape", "Resolved path is outside the sandbox root.", candidate);
|
|
238
|
+
}
|
|
239
|
+
if (isSymlink && !policy.filesystem.followSymlinks) {
|
|
240
|
+
return block("path.symlink", "Symlink traversal is denied by policy.", candidate);
|
|
241
|
+
}
|
|
242
|
+
if (request.kind === "read") {
|
|
243
|
+
const denied = matchesAny(policy.filesystem.readDeny, candidate);
|
|
244
|
+
if (denied.match) {
|
|
245
|
+
return block("path.read_deny", "Read path matches a deny rule.", candidate, denied.pattern);
|
|
246
|
+
}
|
|
247
|
+
const deniedRequested = matchesAny(policy.filesystem.readDeny, requested);
|
|
248
|
+
if (deniedRequested.match) {
|
|
249
|
+
return block("path.read_deny", "Read path matches a deny rule.", candidate, deniedRequested.pattern);
|
|
250
|
+
}
|
|
251
|
+
if (matchesAny(policy.filesystem.readAllow, candidate).match) {
|
|
252
|
+
return allow("path.read_allow", "Read path is allowed.", candidate);
|
|
253
|
+
}
|
|
254
|
+
return block("path.read_not_allowed", "Read path is not in an allow rule.", candidate);
|
|
255
|
+
}
|
|
256
|
+
const denyWriteCandidate = matchesAny(policy.filesystem.denyWrite, candidate);
|
|
257
|
+
if (denyWriteCandidate.match) {
|
|
258
|
+
return block("path.deny_write", "Write path matches an unoverrideable denyWrite rule.", candidate, denyWriteCandidate.pattern);
|
|
259
|
+
}
|
|
260
|
+
const denyWriteRequested = matchesAny(policy.filesystem.denyWrite, requested);
|
|
261
|
+
if (denyWriteRequested.match) {
|
|
262
|
+
return block("path.deny_write", "Write path matches an unoverrideable denyWrite rule.", candidate, denyWriteRequested.pattern);
|
|
263
|
+
}
|
|
264
|
+
if (matchesAny(policy.filesystem.writeAllow, candidate).match ||
|
|
265
|
+
matchesAny(policy.filesystem.tempWrite, candidate).match) {
|
|
266
|
+
return allow("path.write_allow", "Write path is allowed.", candidate);
|
|
267
|
+
}
|
|
268
|
+
return block("path.write_not_allowed", "Write path is not in an allow rule.", candidate);
|
|
269
|
+
}
|
|
270
|
+
function decideEnvV2(env) {
|
|
271
|
+
const denied = [];
|
|
272
|
+
for (const [name, value] of Object.entries(env)) {
|
|
273
|
+
if (value === undefined)
|
|
274
|
+
continue;
|
|
275
|
+
if (ENV_DENY_NAMES.has(name)) {
|
|
276
|
+
denied.push(name);
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
if (isSensitiveEnvName(name)) {
|
|
280
|
+
denied.push(name);
|
|
281
|
+
continue;
|
|
282
|
+
}
|
|
283
|
+
if (AUTH_URL_REGEX.test(value)) {
|
|
284
|
+
// Value-based denial: the value embeds credentials. Record NAME only.
|
|
285
|
+
denied.push(name);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
if (denied.length > 0) {
|
|
289
|
+
return {
|
|
290
|
+
action: "block",
|
|
291
|
+
rule: "env.denied_pattern",
|
|
292
|
+
reason: `Environment contains denied variable(s): ${denied.join(", ")}.`,
|
|
293
|
+
deniedNames: denied,
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
return { action: "allow", rule: "env.allow", reason: "No denied environment variables.", deniedNames: [] };
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Public: evaluate path / env / network requests against a sandbox policy.
|
|
300
|
+
* Path and env checks are fail-closed. Audit mode downgrades a would-block
|
|
301
|
+
* outcome to confirm; enforce mode keeps it block.
|
|
302
|
+
*/
|
|
303
|
+
export function evaluateSandboxPolicyV2(input) {
|
|
304
|
+
const { policy } = input;
|
|
305
|
+
const diagnostics = [];
|
|
306
|
+
const pathDecisions = [];
|
|
307
|
+
let envDecision;
|
|
308
|
+
let networkDecision;
|
|
309
|
+
let worst = "block";
|
|
310
|
+
if (policy.mode === "off") {
|
|
311
|
+
return {
|
|
312
|
+
action: "allow",
|
|
313
|
+
rule: "sandbox.off",
|
|
314
|
+
reason: "Sandbox policy is disabled.",
|
|
315
|
+
diagnostics,
|
|
316
|
+
pathDecisions,
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
// Default to allow and escalate to block on any failed check.
|
|
320
|
+
worst = "allow";
|
|
321
|
+
if (input.env) {
|
|
322
|
+
envDecision = decideEnvV2(input.env);
|
|
323
|
+
if (envDecision.action === "block") {
|
|
324
|
+
worst = "block";
|
|
325
|
+
diagnostics.push({
|
|
326
|
+
code: envDecision.rule,
|
|
327
|
+
message: `Denied env name(s): ${envDecision.deniedNames.join(", ")}`,
|
|
328
|
+
severity: "block",
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
for (const request of input.pathRequests ?? []) {
|
|
333
|
+
const decision = decidePathV2(policy, request, input.resolver);
|
|
334
|
+
pathDecisions.push(decision);
|
|
335
|
+
if (decision.action === "block") {
|
|
336
|
+
worst = "block";
|
|
337
|
+
diagnostics.push({ code: decision.rule, message: decision.reason, severity: "block" });
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
if (input.networkRequest) {
|
|
341
|
+
const normalized = normalizeNetworkLoopback(input.networkRequest);
|
|
342
|
+
networkDecision = decideNetworkV2(policy, normalized);
|
|
343
|
+
if (!networkDecision.allowed) {
|
|
344
|
+
worst = "block";
|
|
345
|
+
diagnostics.push({ code: networkDecision.rule, message: networkDecision.reason, severity: "block" });
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
let action;
|
|
349
|
+
let rule;
|
|
350
|
+
let reason;
|
|
351
|
+
if (worst === "allow") {
|
|
352
|
+
action = "allow";
|
|
353
|
+
rule = "policy.composite_allow";
|
|
354
|
+
reason = "All sandbox checks passed.";
|
|
355
|
+
}
|
|
356
|
+
else if (policy.mode === "audit") {
|
|
357
|
+
action = "confirm";
|
|
358
|
+
rule = "policy.audit_block";
|
|
359
|
+
reason = "Audit mode: a would-block check is downgraded to confirm.";
|
|
360
|
+
}
|
|
361
|
+
else {
|
|
362
|
+
action = "block";
|
|
363
|
+
rule = "policy.block";
|
|
364
|
+
reason = "One or more sandbox checks blocked the request.";
|
|
365
|
+
}
|
|
366
|
+
return { action, rule, reason, diagnostics, pathDecisions, networkDecision, envDecision };
|
|
367
|
+
}
|
|
368
|
+
//# sourceMappingURL=sandbox-policy-v2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox-policy-v2.js","sourceRoot":"","sources":["../../src/core/sandbox-policy-v2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAStC,oFAAoF;AACpF,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAS;IAC3C,mBAAmB;IACnB,uBAAuB;IACvB,mBAAmB;IACnB,cAAc;IACd,UAAU;IACV,cAAc;IACd,WAAW;IACX,iBAAiB;CACjB,CAAC,CAAC;AAEH,oDAAoD;AACpD,MAAM,mBAAmB,GACxB,6FAA6F,CAAC;AAE/F;;;;GAIG;AACH,MAAM,cAAc,GAAG,IAAI,GAAG,CAAS;IACtC,YAAY;IACZ,iBAAiB;IACjB,UAAU;IACV,aAAa;IACb,YAAY;IACZ,uBAAuB;IACvB,mBAAmB;IACnB,4BAA4B;IAC5B,cAAc;IACd,WAAW;IACX,2BAA2B;IAC3B,qBAAqB;IACrB,8BAA8B;IAC9B,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,eAAe;IACf,UAAU;IACV,SAAS;IACT,UAAU;IACV,SAAS;IACT,SAAS;IACT,UAAU;IACV,mBAAmB;IACnB,eAAe;IACf,kBAAkB;IAClB,YAAY;CACZ,CAAC,CAAC;AAEH;;;GA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iDAAiD,CAAC;IAC5D,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC;AAAA,CAC1F","sourcesContent":["/**\n * Lane SA3 - Sandbox Policy V2.\n * allow: SIZE_OK - legacy evaluator; this change only keeps strip-only TypeScript compatibility.\n *\n * Pure fail-closed evaluator that composes path / env / network checks for a\n * sandbox policy. It layers general glob matching (via `minimatch`), realpath\n * normalization (when a resolver is provided), denied-env fail-closed\n * semantics, and IPv4 / IPv6 loopback detection on top of the existing\n * `SandboxPolicy` types. It does not spawn, resolve through the filesystem on\n * its own, or log env values.\n */\nimport path from \"node:path\";\nimport { minimatch } from \"minimatch\";\nimport type {\n\tNetworkAccessRequest,\n\tPathAccessKind,\n\tSandboxDecision,\n\tSandboxPathResolver,\n\tSandboxPolicy,\n} from \"./sandbox/policy.ts\";\n\n/** Exact sensitive environment variable names (do not end in a standard suffix). */\nconst SENSITIVE_ENV_EXACT = new Set<string>([\n\t\"AWS_ACCESS_KEY_ID\",\n\t\"AWS_SECRET_ACCESS_KEY\",\n\t\"AWS_SESSION_TOKEN\",\n\t\"GITHUB_TOKEN\",\n\t\"GH_TOKEN\",\n\t\"GITLAB_TOKEN\",\n\t\"NPM_TOKEN\",\n\t\"NODE_AUTH_TOKEN\",\n]);\n\n/** Sensitive environment variable name suffixes. */\nconst SENSITIVE_ENV_REGEX =\n\t/(^|_)(API_KEY|API_TOKEN|ACCESS_TOKEN|SECRET|SECRET_KEY|PRIVATE_KEY|PASSWORD|PASSWD|TOKEN)$/i;\n\n/**\n * Environment variable names that are always denied because they inject code\n * or redirect runtime loader behavior. Denial is fail-closed: presence of any\n * of these names blocks the policy evaluation regardless of value.\n */\nconst ENV_DENY_NAMES = new Set<string>([\n\t\"LD_PRELOAD\",\n\t\"LD_LIBRARY_PATH\",\n\t\"LD_AUDIT\",\n\t\"LD_BIND_NOW\",\n\t\"LD_PROFILE\",\n\t\"DYLD_INSERT_LIBRARIES\",\n\t\"DYLD_LIBRARY_PATH\",\n\t\"DYLD_FALLBACK_LIBRARY_PATH\",\n\t\"NODE_OPTIONS\",\n\t\"NODE_PATH\",\n\t\"NODE_REPL_EXTERNAL_MODULE\",\n\t\"NODE_EXTRA_CA_CERTS\",\n\t\"NODE_TLS_REJECT_UNAUTHORIZED\",\n\t\"PYTHONPATH\",\n\t\"PYTHONHOME\",\n\t\"PYTHONSTARTUP\",\n\t\"PYTHONINSPECT\",\n\t\"PERL5LIB\",\n\t\"PERLLIB\",\n\t\"PERL5OPT\",\n\t\"RUBYLIB\",\n\t\"RUBYOPT\",\n\t\"RUBYPATH\",\n\t\"JAVA_TOOL_OPTIONS\",\n\t\"_JAVA_OPTIONS\",\n\t\"JDK_JAVA_OPTIONS\",\n\t\"MAVEN_OPTS\",\n]);\n\n/**\n * Matches a URL / DSN with embedded userinfo (`scheme://user:pass@host`).\n * Used for value-based denial; only the variable NAME is ever recorded.\n */\nconst AUTH_URL_REGEX = /^[a-z][a-z0-9+.-]*:\\/\\/[^\\s/@:]+:[^\\s/@]+@[^\\s/@]/i;\n\n/** Path patterns that look like credential / key material on disk. */\nconst SENSITIVE_PATH_REGEX =\n\t/(?:^|[/\\\\])(?:\\.env(?:\\..*)?|auth\\.json|oauth\\.json|\\.netrc|\\.npmrc|\\.pgpass|credentials|id_rsa|id_dsa|id_ecdsa|id_ed25519|.*(?:token|private[_-]?key|credential).*)$/i;\n\nexport interface PathAccessRequestV2 {\n\treadonly kind: PathAccessKind;\n\treadonly path: string;\n}\n\nexport interface PolicyDiagnostic {\n\treadonly code: string;\n\treadonly message: string;\n\treadonly severity: \"info\" | \"warn\" | \"block\";\n}\n\nexport interface PathDecisionV2 {\n\treadonly requestedPath: string;\n\treadonly candidate: string;\n\treadonly kind: PathAccessKind;\n\treadonly action: \"allow\" | \"block\";\n\treadonly rule: string;\n\treadonly reason: string;\n\treadonly matchedPattern?: string;\n}\n\nexport interface EnvDecisionV2 {\n\treadonly action: \"allow\" | \"block\";\n\treadonly rule: string;\n\treadonly reason: string;\n\t/** Denied variable NAMES only. Values are never recorded. */\n\treadonly deniedNames: readonly string[];\n}\n\nexport interface SandboxPolicyV2Decision {\n\treadonly action: \"allow\" | \"confirm\" | \"block\";\n\treadonly rule: string;\n\treadonly reason: string;\n\treadonly diagnostics: readonly PolicyDiagnostic[];\n\treadonly pathDecisions: readonly PathDecisionV2[];\n\treadonly networkDecision?: SandboxDecision;\n\treadonly envDecision?: EnvDecisionV2;\n}\n\nexport interface SandboxPolicyV2Input {\n\treadonly policy: SandboxPolicy;\n\treadonly pathRequests?: readonly PathAccessRequestV2[];\n\treadonly networkRequest?: NetworkAccessRequest;\n\treadonly env?: Readonly<Record<string, string | undefined>>;\n\treadonly resolver?: SandboxPathResolver;\n}\n\nfunction isSensitiveEnvName(name: string): boolean {\n\tif (SENSITIVE_ENV_EXACT.has(name)) return true;\n\treturn SENSITIVE_ENV_REGEX.test(name);\n}\n\nfunction normalizePathValue(value: string): string {\n\tconst resolved = path.resolve(value);\n\tlet normalized = resolved.replace(/\\\\/g, \"/\");\n\tif (normalized.length > 1) normalized = normalized.replace(/\\/+$/, \"\");\n\treturn normalized;\n}\n\nfunction ruleHasGlob(pattern: string): boolean {\n\treturn /[*?[\\]{}]/.test(pattern);\n}\n\nfunction matchesRule(pattern: string, candidate: string): boolean {\n\tconst normPattern = normalizePathValue(pattern);\n\tconst normCandidate = normalizePathValue(candidate);\n\tif (ruleHasGlob(normPattern)) {\n\t\tif (minimatch(normCandidate, normPattern)) return true;\n\t\t// also accept recursive prefix form even if the writer omitted `/**`\n\t\treturn minimatch(normCandidate, `${normPattern}/**`);\n\t}\n\treturn normCandidate === normPattern || normCandidate.startsWith(`${normPattern}/`);\n}\n\nfunction matchesAny(patterns: readonly string[], candidate: string): { match: boolean; pattern?: string } {\n\tfor (const pattern of patterns) {\n\t\tif (matchesRule(pattern, candidate)) return { match: true, pattern };\n\t}\n\treturn { match: false };\n}\n\nfunction isInsideRoot(root: string, candidate: string): boolean {\n\tconst normRoot = normalizePathValue(root);\n\tconst normCandidate = normalizePathValue(candidate);\n\treturn normCandidate === normRoot || normCandidate.startsWith(`${normRoot}/`);\n}\n\nfunction isSensitivePath(value: string): boolean {\n\treturn SENSITIVE_PATH_REGEX.test(value.replace(/\\\\/g, \"/\"));\n}\n\n/** True for IPv4 / IPv6 loopback and localhost hostnames. */\nfunction isLoopbackHost(host: string): boolean {\n\tconst h = host\n\t\t.toLowerCase()\n\t\t.replace(/^\\[|\\]$/g, \"\")\n\t\t.trim();\n\tif (h === \"localhost\") return true;\n\tif (h === \"127.0.0.1\" || h === \"::1\" || h === \"0:0:0:0:0:0:0:1\") return true;\n\tif (h === \"::ffff:127.0.0.1\" || h === \"::ffff:7f00:1\") return true;\n\tif (/^127\\./.test(h)) return true;\n\treturn false;\n}\n\nfunction normalizeNetworkLoopback(request: NetworkAccessRequest): NetworkAccessRequest {\n\tlet host = request.host;\n\tif (!host && request.url) {\n\t\ttry {\n\t\t\thost = new URL(request.url).hostname;\n\t\t} catch {\n\t\t\thost = undefined;\n\t\t}\n\t}\n\tif (host && isLoopbackHost(host)) {\n\t\treturn { ...request, host, loopback: true };\n\t}\n\treturn request;\n}\n\nfunction hostFromRequest(request: NetworkAccessRequest): string | undefined {\n\tif (request.host) return request.host.toLowerCase();\n\tif (!request.url) return undefined;\n\ttry {\n\t\treturn new URL(request.url).hostname.toLowerCase();\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\nfunction hostMatches(patterns: readonly string[], host: string): boolean {\n\tconst h = host.replace(/\\.$/, \"\");\n\tfor (const raw of patterns) {\n\t\tconst p = raw.toLowerCase().replace(/\\.$/, \"\");\n\t\tif (h === p || h.endsWith(`.${p}`)) return true;\n\t}\n\treturn false;\n}\n\nfunction decideNetworkV2(policy: SandboxPolicy, request: NetworkAccessRequest): SandboxDecision {\n\tif (policy.mode === \"off\") return { allowed: true, rule: \"sandbox.off\", reason: \"Sandbox policy is disabled.\" };\n\tif (request.browser || request.unixSocketPath) {\n\t\treturn {\n\t\t\tallowed: false,\n\t\t\trule: \"network.socket_or_browser\",\n\t\t\treason: \"Browser and Unix socket access is denied by default.\",\n\t\t};\n\t}\n\tif (policy.network.mode === \"none\") {\n\t\treturn { allowed: false, rule: \"network.none\", reason: \"Network access is disabled by policy.\" };\n\t}\n\tif (request.loopback) {\n\t\tif (\n\t\t\tpolicy.network.mode === \"loopback\" ||\n\t\t\tpolicy.network.mode === \"domain-allowlist\" ||\n\t\t\tpolicy.network.mode === \"all-explicit\"\n\t\t) {\n\t\t\treturn { allowed: true, rule: \"network.loopback\", reason: \"Loopback access is allowed.\" };\n\t\t}\n\t\treturn { allowed: false, rule: \"network.loopback_denied\", reason: \"Loopback access is denied.\" };\n\t}\n\tconst host = hostFromRequest(request);\n\tif (!host)\n\t\treturn {\n\t\t\tallowed: false,\n\t\t\trule: \"network.unknown_host\",\n\t\t\treason: \"Network host could not be resolved from request.\",\n\t\t};\n\tif (hostMatches(policy.network.deniedDomains, host)) {\n\t\treturn { allowed: false, rule: \"network.domain_deny\", reason: \"Host matches a denied domain.\" };\n\t}\n\tif (policy.network.mode === \"all-explicit\") {\n\t\treturn {\n\t\t\tallowed: true,\n\t\t\trule: \"network.explicit_all\",\n\t\t\treason: \"Explicit network profile allows outbound host access.\",\n\t\t};\n\t}\n\tif (policy.network.mode === \"domain-allowlist\" && hostMatches(policy.network.allowedDomains, host)) {\n\t\treturn { allowed: true, rule: \"network.domain_allow\", reason: \"Host matches an allowed domain.\" };\n\t}\n\treturn { allowed: false, rule: \"network.domain_not_allowed\", reason: \"Host is not allowed by network policy.\" };\n}\n\nfunction decidePathV2(\n\tpolicy: SandboxPolicy,\n\trequest: PathAccessRequestV2,\n\tresolver: SandboxPathResolver | undefined,\n): PathDecisionV2 {\n\tconst requested = request.path;\n\tconst base = (\n\t\trule: string,\n\t\treason: string,\n\t\tcandidate: string,\n\t\taction: \"allow\" | \"block\",\n\t\tmatchedPattern?: string,\n\t): PathDecisionV2 => ({\n\t\trequestedPath: requested,\n\t\tcandidate,\n\t\tkind: request.kind,\n\t\taction,\n\t\trule,\n\t\treason,\n\t\tmatchedPattern,\n\t});\n\tconst block = (rule: string, reason: string, candidate: string, matchedPattern?: string): PathDecisionV2 =>\n\t\tbase(rule, reason, candidate, \"block\", matchedPattern);\n\tconst allow = (rule: string, reason: string, candidate: string): PathDecisionV2 =>\n\t\tbase(rule, reason, candidate, \"allow\");\n\n\tif (requested.includes(\"\\0\")) {\n\t\treturn block(\"path.invalid\", \"Path contains a NUL byte.\", requested);\n\t}\n\n\tlet candidate: string;\n\tlet isSymlink = false;\n\tif (resolver) {\n\t\tconst resolved = resolver(requested);\n\t\tif (resolved.error) {\n\t\t\treturn block(\"path.resolve_error\", resolved.error, requested);\n\t\t}\n\t\tcandidate = resolved.realPath ?? resolved.nearestExistingParentRealPath ?? normalizePathValue(requested);\n\t\tisSymlink = resolved.isSymlink === true;\n\t} else {\n\t\tcandidate = normalizePathValue(requested);\n\t}\n\n\tif (isSensitivePath(requested) || isSensitivePath(candidate)) {\n\t\treturn block(\"path.sensitive\", \"Sensitive credential-like path is denied.\", candidate);\n\t}\n\n\tif (!isInsideRoot(policy.filesystem.root, candidate)) {\n\t\treturn block(\"path.root_escape\", \"Resolved path is outside the sandbox root.\", candidate);\n\t}\n\n\tif (isSymlink && !policy.filesystem.followSymlinks) {\n\t\treturn block(\"path.symlink\", \"Symlink traversal is denied by policy.\", candidate);\n\t}\n\n\tif (request.kind === \"read\") {\n\t\tconst denied = matchesAny(policy.filesystem.readDeny, candidate);\n\t\tif (denied.match) {\n\t\t\treturn block(\"path.read_deny\", \"Read path matches a deny rule.\", candidate, denied.pattern);\n\t\t}\n\t\tconst deniedRequested = matchesAny(policy.filesystem.readDeny, requested);\n\t\tif (deniedRequested.match) {\n\t\t\treturn block(\"path.read_deny\", \"Read path matches a deny rule.\", candidate, deniedRequested.pattern);\n\t\t}\n\t\tif (matchesAny(policy.filesystem.readAllow, candidate).match) {\n\t\t\treturn allow(\"path.read_allow\", \"Read path is allowed.\", candidate);\n\t\t}\n\t\treturn block(\"path.read_not_allowed\", \"Read path is not in an allow rule.\", candidate);\n\t}\n\n\tconst denyWriteCandidate = matchesAny(policy.filesystem.denyWrite, candidate);\n\tif (denyWriteCandidate.match) {\n\t\treturn block(\n\t\t\t\"path.deny_write\",\n\t\t\t\"Write path matches an unoverrideable denyWrite rule.\",\n\t\t\tcandidate,\n\t\t\tdenyWriteCandidate.pattern,\n\t\t);\n\t}\n\tconst denyWriteRequested = matchesAny(policy.filesystem.denyWrite, requested);\n\tif (denyWriteRequested.match) {\n\t\treturn block(\n\t\t\t\"path.deny_write\",\n\t\t\t\"Write path matches an unoverrideable denyWrite rule.\",\n\t\t\tcandidate,\n\t\t\tdenyWriteRequested.pattern,\n\t\t);\n\t}\n\tif (\n\t\tmatchesAny(policy.filesystem.writeAllow, candidate).match ||\n\t\tmatchesAny(policy.filesystem.tempWrite, candidate).match\n\t) {\n\t\treturn allow(\"path.write_allow\", \"Write path is allowed.\", candidate);\n\t}\n\treturn block(\"path.write_not_allowed\", \"Write path is not in an allow rule.\", candidate);\n}\n\nfunction decideEnvV2(env: Readonly<Record<string, string | undefined>>): EnvDecisionV2 {\n\tconst denied: string[] = [];\n\tfor (const [name, value] of Object.entries(env)) {\n\t\tif (value === undefined) continue;\n\t\tif (ENV_DENY_NAMES.has(name)) {\n\t\t\tdenied.push(name);\n\t\t\tcontinue;\n\t\t}\n\t\tif (isSensitiveEnvName(name)) {\n\t\t\tdenied.push(name);\n\t\t\tcontinue;\n\t\t}\n\t\tif (AUTH_URL_REGEX.test(value)) {\n\t\t\t// Value-based denial: the value embeds credentials. Record NAME only.\n\t\t\tdenied.push(name);\n\t\t}\n\t}\n\tif (denied.length > 0) {\n\t\treturn {\n\t\t\taction: \"block\",\n\t\t\trule: \"env.denied_pattern\",\n\t\t\treason: `Environment contains denied variable(s): ${denied.join(\", \")}.`,\n\t\t\tdeniedNames: denied,\n\t\t};\n\t}\n\treturn { action: \"allow\", rule: \"env.allow\", reason: \"No denied environment variables.\", deniedNames: [] };\n}\n\n/**\n * Public: evaluate path / env / network requests against a sandbox policy.\n * Path and env checks are fail-closed. Audit mode downgrades a would-block\n * outcome to confirm; enforce mode keeps it block.\n */\nexport function evaluateSandboxPolicyV2(input: SandboxPolicyV2Input): SandboxPolicyV2Decision {\n\tconst { policy } = input;\n\tconst diagnostics: PolicyDiagnostic[] = [];\n\tconst pathDecisions: PathDecisionV2[] = [];\n\tlet envDecision: EnvDecisionV2 | undefined;\n\tlet networkDecision: SandboxDecision | undefined;\n\tlet worst: \"allow\" | \"block\" = \"block\";\n\n\tif (policy.mode === \"off\") {\n\t\treturn {\n\t\t\taction: \"allow\",\n\t\t\trule: \"sandbox.off\",\n\t\t\treason: \"Sandbox policy is disabled.\",\n\t\t\tdiagnostics,\n\t\t\tpathDecisions,\n\t\t};\n\t}\n\n\t// Default to allow and escalate to block on any failed check.\n\tworst = \"allow\";\n\n\tif (input.env) {\n\t\tenvDecision = decideEnvV2(input.env);\n\t\tif (envDecision.action === \"block\") {\n\t\t\tworst = \"block\";\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: envDecision.rule,\n\t\t\t\tmessage: `Denied env name(s): ${envDecision.deniedNames.join(\", \")}`,\n\t\t\t\tseverity: \"block\",\n\t\t\t});\n\t\t}\n\t}\n\n\tfor (const request of input.pathRequests ?? []) {\n\t\tconst decision = decidePathV2(policy, request, input.resolver);\n\t\tpathDecisions.push(decision);\n\t\tif (decision.action === \"block\") {\n\t\t\tworst = \"block\";\n\t\t\tdiagnostics.push({ code: decision.rule, message: decision.reason, severity: \"block\" });\n\t\t}\n\t}\n\n\tif (input.networkRequest) {\n\t\tconst normalized = normalizeNetworkLoopback(input.networkRequest);\n\t\tnetworkDecision = decideNetworkV2(policy, normalized);\n\t\tif (!networkDecision.allowed) {\n\t\t\tworst = \"block\";\n\t\t\tdiagnostics.push({ code: networkDecision.rule, message: networkDecision.reason, severity: \"block\" });\n\t\t}\n\t}\n\n\tlet action: \"allow\" | \"confirm\" | \"block\";\n\tlet rule: string;\n\tlet reason: string;\n\tif (worst === \"allow\") {\n\t\taction = \"allow\";\n\t\trule = \"policy.composite_allow\";\n\t\treason = \"All sandbox checks passed.\";\n\t} else if (policy.mode === \"audit\") {\n\t\taction = \"confirm\";\n\t\trule = \"policy.audit_block\";\n\t\treason = \"Audit mode: a would-block check is downgraded to confirm.\";\n\t} else {\n\t\taction = \"block\";\n\t\trule = \"policy.block\";\n\t\treason = \"One or more sandbox checks blocked the request.\";\n\t}\n\n\treturn { action, rule, reason, diagnostics, pathDecisions, networkDecision, envDecision };\n}\n"]}
|
package/dist/core/sdk.d.ts
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
1
|
+
import { type ThinkingLevel } from "omk-agent-core";
|
|
2
|
+
import { type Model } from "omk-ai";
|
|
3
3
|
import { AgentSession } from "./agent-session.ts";
|
|
4
4
|
import { AuthStorage } from "./auth-storage.ts";
|
|
5
5
|
import type { LoadExtensionsResult, SessionStartEvent, ToolDefinition } from "./extensions/index.ts";
|
|
6
|
-
import type { ExtensionExecSandbox } from "./extensions/types.ts";
|
|
7
6
|
import type { LoadoutAccessPolicy } from "./loadout-access-policy.ts";
|
|
8
7
|
import { ModelRegistry } from "./model-registry.ts";
|
|
9
|
-
import type { PackageTrialRuntimeOptions } from "./package-manager.ts";
|
|
10
8
|
import type { ResourceLoader } from "./resource-loader.ts";
|
|
11
|
-
import { type SandboxPolicy } from "./sandbox/policy.ts";
|
|
12
9
|
import { SessionManager } from "./session-manager.ts";
|
|
13
10
|
import { SettingsManager } from "./settings-manager.ts";
|
|
14
|
-
import {
|
|
11
|
+
import type { BashSandboxPreflight } from "./tools/bash.ts";
|
|
12
|
+
import { createBashTool, createCodingTools, createEditTool, createFindTool, createGrepTool, createLsTool, createReadOnlyTools, createReadTool, createWriteTool, withFileMutationQueue } from "./tools/index.ts";
|
|
15
13
|
export interface CreateAgentSessionOptions {
|
|
16
14
|
/** Working directory for project-local discovery. Default: process.cwd() */
|
|
17
15
|
cwd?: string;
|
|
@@ -41,7 +39,7 @@ export interface CreateAgentSessionOptions {
|
|
|
41
39
|
/**
|
|
42
40
|
* Optional allowlist of tool names.
|
|
43
41
|
*
|
|
44
|
-
* When omitted,
|
|
42
|
+
* When omitted, OMK enables the default built-in tools (read, bash, edit, write)
|
|
45
43
|
* and leaves extension/custom tools enabled unless `noTools` changes that default.
|
|
46
44
|
* When provided, only the listed tool names are enabled.
|
|
47
45
|
*/
|
|
@@ -59,22 +57,14 @@ export interface CreateAgentSessionOptions {
|
|
|
59
57
|
/** Session start event metadata for extension runtime startup. */
|
|
60
58
|
sessionStartEvent?: SessionStartEvent;
|
|
61
59
|
/**
|
|
62
|
-
* Optional
|
|
63
|
-
*
|
|
64
|
-
* sanitized preflight runs before API key/header resolution and is
|
|
65
|
-
* forwarded to `streamSimple` for deeper provider-derived URL checks.
|
|
60
|
+
* Optional prompt hint used only for opt-in domain routing (`OMK_DOMAIN_ROUTING=1`).
|
|
61
|
+
* This text only selects a loadout policy and is never sent to the model.
|
|
66
62
|
*/
|
|
67
|
-
|
|
68
|
-
/** Optional sanitized audit sink for provider network policy decisions. */
|
|
69
|
-
onProviderNetworkAudit?: ProviderNetworkAuditSink;
|
|
63
|
+
domainRoutingPrompt?: string;
|
|
70
64
|
/** Optional loadout enforcement policy for SDK-created sessions. */
|
|
71
65
|
loadoutAccessPolicy?: LoadoutAccessPolicy;
|
|
72
|
-
/**
|
|
66
|
+
/** Trusted sandbox preflight used for built-in local bash execution. */
|
|
73
67
|
bashSandboxPreflight?: BashSandboxPreflight;
|
|
74
|
-
/** Optional sandbox policy for extension `omk.exec` loaded through the default resource loader. */
|
|
75
|
-
extensionExecSandbox?: ExtensionExecSandbox;
|
|
76
|
-
/** Optional sandboxed temporary package trial runtime for CLI/SDK supplied package sources. */
|
|
77
|
-
packageTrialRuntime?: PackageTrialRuntimeOptions;
|
|
78
68
|
}
|
|
79
69
|
/** Result from createAgentSession */
|
|
80
70
|
export interface CreateAgentSessionResult {
|
|
@@ -100,7 +90,7 @@ export { withFileMutationQueue, createCodingTools, createReadOnlyTools, createRe
|
|
|
100
90
|
* const { session } = await createAgentSession();
|
|
101
91
|
*
|
|
102
92
|
* // With explicit model
|
|
103
|
-
* import { getModel } from '
|
|
93
|
+
* import { getModel } from 'omk-ai';
|
|
104
94
|
* const { session } = await createAgentSession({
|
|
105
95
|
* model: getModel('anthropic', 'claude-opus-4-5'),
|
|
106
96
|
* thinkingLevel: 'high',
|
|
@@ -126,63 +116,5 @@ export { withFileMutationQueue, createCodingTools, createReadOnlyTools, createRe
|
|
|
126
116
|
* });
|
|
127
117
|
* ```
|
|
128
118
|
*/
|
|
129
|
-
export type ProviderNetworkPolicyMode = "off" | "audit" | "enforce";
|
|
130
|
-
export type ProviderNetworkPolicyNetwork = SandboxPolicy["network"];
|
|
131
|
-
export interface ProviderNetworkPolicyConfig {
|
|
132
|
-
mode: ProviderNetworkPolicyMode;
|
|
133
|
-
network: ProviderNetworkPolicyNetwork;
|
|
134
|
-
}
|
|
135
|
-
export interface ProviderNetworkAuditEvent {
|
|
136
|
-
provider: string;
|
|
137
|
-
api: string;
|
|
138
|
-
modelId: string;
|
|
139
|
-
host?: string;
|
|
140
|
-
protocol: ProviderNetworkRequest["protocol"];
|
|
141
|
-
port?: string;
|
|
142
|
-
transport: ProviderNetworkRequest["transport"];
|
|
143
|
-
purpose: ProviderNetworkRequest["purpose"];
|
|
144
|
-
mode: ProviderNetworkPolicyMode;
|
|
145
|
-
rule: string;
|
|
146
|
-
allowed: boolean;
|
|
147
|
-
wouldDeny?: boolean;
|
|
148
|
-
}
|
|
149
|
-
export type ProviderNetworkAuditSink = (event: ProviderNetworkAuditEvent) => void;
|
|
150
|
-
/**
|
|
151
|
-
* Map a sanitized provider network request to a provider-neutral decision.
|
|
152
|
-
* Reuses the pure sandbox network decision logic (`decideNetworkAccess`) so
|
|
153
|
-
* allow/deny/loopback semantics stay consistent with the rest of the sandbox.
|
|
154
|
-
*/
|
|
155
|
-
export declare function decideProviderNetworkAccess(config: ProviderNetworkPolicyConfig, request: ProviderNetworkRequest): ProviderNetworkDecision;
|
|
156
|
-
/**
|
|
157
|
-
* Create the `beforeNetworkRequest` hook installed on the agent stream
|
|
158
|
-
* function. The optional audit sink receives only sanitized metadata
|
|
159
|
-
* (provider, api, model id, host, protocol, port, transport, purpose, mode,
|
|
160
|
-
* rule, allowed/wouldDeny) and never headers, API keys, or request bodies.
|
|
161
|
-
*/
|
|
162
|
-
export declare function createBeforeProviderNetworkRequest(config: ProviderNetworkPolicyConfig, onAudit?: ProviderNetworkAuditSink): BeforeProviderNetworkRequest;
|
|
163
|
-
/**
|
|
164
|
-
* Dependencies for the agent stream function factory.
|
|
165
|
-
*/
|
|
166
|
-
export interface AgentStreamFunctionDeps {
|
|
167
|
-
modelRegistry: ModelRegistry;
|
|
168
|
-
settingsManager: SettingsManager;
|
|
169
|
-
/** When set, a sanitized preflight runs before auth resolution and is forwarded to `streamSimple`. */
|
|
170
|
-
providerNetworkBeforeRequest?: BeforeProviderNetworkRequest;
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Build the Agent `streamFn` used by `createAgentSession`.
|
|
174
|
-
*
|
|
175
|
-
* Contract preserved from the previous inline implementation:
|
|
176
|
-
* - resolves API key/headers via the model registry,
|
|
177
|
-
* - applies provider retry/timeout settings,
|
|
178
|
-
* - merges provider attribution headers.
|
|
179
|
-
*
|
|
180
|
-
* Added behavior: when `providerNetworkBeforeRequest` is set, a sanitized
|
|
181
|
-
* preflight runs BEFORE auth resolution. A deny returns a sanitized error
|
|
182
|
-
* stream (no headers/API keys/bodies/prompts/responses are exposed) and skips
|
|
183
|
-
* auth + provider invocation entirely. The hook is also forwarded to
|
|
184
|
-
* `streamSimple` so provider-derived endpoints can be checked deeper.
|
|
185
|
-
*/
|
|
186
|
-
export declare function createAgentStreamFunction(deps: AgentStreamFunctionDeps): StreamFn;
|
|
187
119
|
export declare function createAgentSession(options?: CreateAgentSessionOptions): Promise<CreateAgentSessionResult>;
|
|
188
120
|
//# sourceMappingURL=sdk.d.ts.map
|