@pentoshi/clai 4.18.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +73 -0
- package/CONTRIBUTING.md +3 -2
- package/PROVIDERS.md +3 -3
- package/REA.md +96 -0
- package/README.md +110 -267
- package/SECURITY.md +5 -1
- package/dist/agent/compaction/compaction-prompt.d.ts +49 -0
- package/dist/agent/compaction/compaction-prompt.js +163 -0
- package/dist/agent/compaction/compaction-prompt.js.map +1 -0
- package/dist/agent/compaction/memory-sections.d.ts +27 -0
- package/dist/agent/compaction/memory-sections.js +144 -0
- package/dist/agent/compaction/memory-sections.js.map +1 -0
- package/dist/agent/compaction-summary.d.ts +2 -33
- package/dist/agent/compaction-summary.js +3 -113
- package/dist/agent/compaction-summary.js.map +1 -1
- package/dist/agent/context/compact-with-summary.d.ts +2 -4
- package/dist/agent/context/compact-with-summary.js +42 -68
- package/dist/agent/context/compact-with-summary.js.map +1 -1
- package/dist/agent/context/compaction-recent-history.d.ts +4 -3
- package/dist/agent/context/compaction-recent-history.js +30 -52
- package/dist/agent/context/compaction-recent-history.js.map +1 -1
- package/dist/agent/context/compaction-user-instructions.d.ts +5 -6
- package/dist/agent/context/compaction-user-instructions.js +156 -231
- package/dist/agent/context/compaction-user-instructions.js.map +1 -1
- package/dist/agent/context-manager.js +17 -8
- package/dist/agent/context-manager.js.map +1 -1
- package/dist/agent/durable-envelope.js +1 -1
- package/dist/agent/durable-envelope.js.map +1 -1
- package/dist/agent/events.d.ts +6 -0
- package/dist/agent/parser/dsml.d.ts +30 -0
- package/dist/agent/parser/dsml.js +233 -0
- package/dist/agent/parser/dsml.js.map +1 -0
- package/dist/agent/parser/vendor-protocols.d.ts +2 -5
- package/dist/agent/parser/vendor-protocols.js +4 -93
- package/dist/agent/parser/vendor-protocols.js.map +1 -1
- package/dist/agent/plan-implement-compact.js +1 -2
- package/dist/agent/plan-implement-compact.js.map +1 -1
- package/dist/agent/reliability-policy.d.ts +1 -0
- package/dist/agent/reliability-policy.js +14 -15
- package/dist/agent/reliability-policy.js.map +1 -1
- package/dist/agent/runner.js +12 -1
- package/dist/agent/runner.js.map +1 -1
- package/dist/agent/tool-call-parser.js +6 -8
- package/dist/agent/tool-call-parser.js.map +1 -1
- package/dist/agent/turn/event-emitter.js +2 -0
- package/dist/agent/turn/event-emitter.js.map +1 -1
- package/dist/agent/turn/loop/answer-path.js +3 -1
- package/dist/agent/turn/loop/answer-path.js.map +1 -1
- package/dist/agent/turn/loop/canonicalize-turn-call.js +5 -3
- package/dist/agent/turn/loop/canonicalize-turn-call.js.map +1 -1
- package/dist/agent/turn/loop/output-budget.d.ts +0 -1
- package/dist/agent/turn/loop/output-budget.js +5 -13
- package/dist/agent/turn/loop/output-budget.js.map +1 -1
- package/dist/agent/turn/loop/request-assembly.js +39 -33
- package/dist/agent/turn/loop/request-assembly.js.map +1 -1
- package/dist/agent/turn/loop/round-request.js +31 -18
- package/dist/agent/turn/loop/round-request.js.map +1 -1
- package/dist/agent/turn/loop/run-rounds.js +0 -2
- package/dist/agent/turn/loop/run-rounds.js.map +1 -1
- package/dist/agent/turn/loop/tool-call-recovery.d.ts +2 -0
- package/dist/agent/turn/loop/tool-call-recovery.js +26 -11
- package/dist/agent/turn/loop/tool-call-recovery.js.map +1 -1
- package/dist/agent/turn/mcp-agent-tools.d.ts +3 -0
- package/dist/agent/turn/mcp-agent-tools.js +11 -2
- package/dist/agent/turn/mcp-agent-tools.js.map +1 -1
- package/dist/agent/turn/prompt-sections.js +1 -0
- package/dist/agent/turn/prompt-sections.js.map +1 -1
- package/dist/agent/turn/scaffold-preflight.d.ts +6 -1
- package/dist/agent/turn/scaffold-preflight.js +10 -2
- package/dist/agent/turn/scaffold-preflight.js.map +1 -1
- package/dist/agent/turn/setup/mcp-agent-ports.d.ts +5 -1
- package/dist/agent/turn/setup/mcp-agent-ports.js +2 -0
- package/dist/agent/turn/setup/mcp-agent-ports.js.map +1 -1
- package/dist/agent/turn/system-sections.d.ts +2 -0
- package/dist/agent/turn/system-sections.js +12 -8
- package/dist/agent/turn/system-sections.js.map +1 -1
- package/dist/agent/turn/tool-execution/deps.d.ts +2 -0
- package/dist/agent/turn/tool-execution/result-framing.js +8 -6
- package/dist/agent/turn/tool-execution/result-framing.js.map +1 -1
- package/dist/agent/turn/tool-execution/single-tool.js +4 -1
- package/dist/agent/turn/tool-execution/single-tool.js.map +1 -1
- package/dist/agent/turn/turn-counters.d.ts +1 -0
- package/dist/agent/turn/turn-counters.js +2 -0
- package/dist/agent/turn/turn-counters.js.map +1 -1
- package/dist/agent/turn/workspace-setup.d.ts +7 -2
- package/dist/agent/turn/workspace-setup.js +45 -30
- package/dist/agent/turn/workspace-setup.js.map +1 -1
- package/dist/agent/workspace-orient.d.ts +4 -0
- package/dist/agent/workspace-orient.js +83 -37
- package/dist/agent/workspace-orient.js.map +1 -1
- package/dist/app/adapters/agent-event-adapter.d.ts +1 -0
- package/dist/app/adapters/agent-event-adapter.js +17 -2
- package/dist/app/adapters/agent-event-adapter.js.map +1 -1
- package/dist/app/adapters/current-agent-adapter.js +1 -0
- package/dist/app/adapters/current-agent-adapter.js.map +1 -1
- package/dist/app/adapters/current-store-adapter.js +10 -3
- package/dist/app/adapters/current-store-adapter.js.map +1 -1
- package/dist/app/commands/catalog.js +13 -4
- package/dist/app/commands/catalog.js.map +1 -1
- package/dist/app/commands/registry.js +1 -1
- package/dist/app/commands/registry.js.map +1 -1
- package/dist/app/controllers/session-changes.d.ts +5 -0
- package/dist/app/controllers/session-changes.js +50 -20
- package/dist/app/controllers/session-changes.js.map +1 -1
- package/dist/app/controllers/session-compact-helper.js +2 -5
- package/dist/app/controllers/session-compact-helper.js.map +1 -1
- package/dist/app/controllers/session-controller.d.ts +8 -0
- package/dist/app/controllers/session-controller.js +97 -8
- package/dist/app/controllers/session-controller.js.map +1 -1
- package/dist/app/controllers/session-id.d.ts +1 -0
- package/dist/app/controllers/session-id.js +4 -0
- package/dist/app/controllers/session-id.js.map +1 -0
- package/dist/app/controllers/session-late-work.d.ts +27 -0
- package/dist/app/controllers/session-late-work.js +113 -0
- package/dist/app/controllers/session-late-work.js.map +1 -0
- package/dist/app/controllers/session-persistence.d.ts +5 -3
- package/dist/app/controllers/session-persistence.js +8 -5
- package/dist/app/controllers/session-persistence.js.map +1 -1
- package/dist/app/controllers/session-prompt-queue.d.ts +13 -1
- package/dist/app/controllers/session-prompt-queue.js +96 -24
- package/dist/app/controllers/session-prompt-queue.js.map +1 -1
- package/dist/app/controllers/turn-controller.d.ts +1 -0
- package/dist/app/controllers/turn-controller.js +14 -1
- package/dist/app/controllers/turn-controller.js.map +1 -1
- package/dist/app/events/app-event.d.ts +4 -0
- package/dist/app/events/app-event.js.map +1 -1
- package/dist/app/ports/agent-port.d.ts +1 -0
- package/dist/app/ports/persistence-port.d.ts +13 -1
- package/dist/app/ports/transcript-item.d.ts +2 -0
- package/dist/classic/app/app-wiring.d.ts +9 -4
- package/dist/classic/app/app-wiring.js +13 -5
- package/dist/classic/app/app-wiring.js.map +1 -1
- package/dist/classic/app/paint-pacing.js +2 -2
- package/dist/classic/app/paint-pacing.js.map +1 -1
- package/dist/classic/app/use-feed.js +16 -11
- package/dist/classic/app/use-feed.js.map +1 -1
- package/dist/classic/app/wiring-disclosure.js +1 -1
- package/dist/classic/app/wiring-disclosure.js.map +1 -1
- package/dist/classic/app/wiring-feed-scroll.d.ts +5 -0
- package/dist/classic/app/wiring-feed-scroll.js +39 -0
- package/dist/classic/app/wiring-feed-scroll.js.map +1 -0
- package/dist/classic/app/wiring-interactions.d.ts +3 -5
- package/dist/classic/app/wiring-interactions.js +18 -32
- package/dist/classic/app/wiring-interactions.js.map +1 -1
- package/dist/classic/app/wiring-lifecycle.d.ts +1 -0
- package/dist/classic/app/wiring-lifecycle.js +20 -2
- package/dist/classic/app/wiring-lifecycle.js.map +1 -1
- package/dist/classic/app/wiring-selection.js +46 -37
- package/dist/classic/app/wiring-selection.js.map +1 -1
- package/dist/classic/app/wiring-types.d.ts +9 -3
- package/dist/classic/blocks/intro-lines.js +1 -0
- package/dist/classic/blocks/intro-lines.js.map +1 -1
- package/dist/classic/blocks/thinking-lines.d.ts +6 -0
- package/dist/classic/blocks/thinking-lines.js +21 -7
- package/dist/classic/blocks/thinking-lines.js.map +1 -1
- package/dist/classic/blocks/tool-lines.js +1 -1
- package/dist/classic/blocks/tool-lines.js.map +1 -1
- package/dist/classic/blocks/turn-summary-lines.d.ts +1 -1
- package/dist/classic/blocks/turn-summary-lines.js +5 -3
- package/dist/classic/blocks/turn-summary-lines.js.map +1 -1
- package/dist/classic/bootstrap/renderer-handle.js +11 -3
- package/dist/classic/bootstrap/renderer-handle.js.map +1 -1
- package/dist/classic/bootstrap/start-classic.js +8 -18
- package/dist/classic/bootstrap/start-classic.js.map +1 -1
- package/dist/classic/chrome/composer-mentions.js +2 -1
- package/dist/classic/chrome/composer-mentions.js.map +1 -1
- package/dist/classic/chrome/directory-row.js +5 -5
- package/dist/classic/chrome/directory-row.js.map +1 -1
- package/dist/classic/chrome/status-rows.d.ts +2 -1
- package/dist/classic/chrome/status-rows.js +18 -8
- package/dist/classic/chrome/status-rows.js.map +1 -1
- package/dist/classic/feed/background-layout.d.ts +26 -0
- package/dist/classic/feed/background-layout.js +77 -0
- package/dist/classic/feed/background-layout.js.map +1 -0
- package/dist/classic/feed/estimated-height.d.ts +2 -0
- package/dist/classic/feed/estimated-height.js +24 -0
- package/dist/classic/feed/estimated-height.js.map +1 -0
- package/dist/classic/feed/feed-blocks.d.ts +4 -1
- package/dist/classic/feed/feed-blocks.js +32 -10
- package/dist/classic/feed/feed-blocks.js.map +1 -1
- package/dist/classic/feed/transcript-selection.d.ts +2 -1
- package/dist/classic/feed/transcript-selection.js +15 -10
- package/dist/classic/feed/transcript-selection.js.map +1 -1
- package/dist/classic/feed/transcript-window.d.ts +1 -0
- package/dist/classic/feed/transcript-window.js +41 -15
- package/dist/classic/feed/transcript-window.js.map +1 -1
- package/dist/classic/panels/confirm-panel.js +1 -0
- package/dist/classic/panels/confirm-panel.js.map +1 -1
- package/dist/classic/panels/jobs-panel.js +1 -1
- package/dist/classic/panels/jobs-panel.js.map +1 -1
- package/dist/classic/panels/pager-panel.d.ts +11 -8
- package/dist/classic/panels/pager-panel.js +42 -28
- package/dist/classic/panels/pager-panel.js.map +1 -1
- package/dist/classic/panels/pager-region-paint.d.ts +3 -0
- package/dist/classic/panels/pager-region-paint.js +43 -0
- package/dist/classic/panels/pager-region-paint.js.map +1 -0
- package/dist/classic/panels/pager-search-paint.d.ts +3 -0
- package/dist/classic/panels/pager-search-paint.js +59 -0
- package/dist/classic/panels/pager-search-paint.js.map +1 -0
- package/dist/classic/panels/pager-source-controller.js +2 -0
- package/dist/classic/panels/pager-source-controller.js.map +1 -1
- package/dist/classic/panels/panel-controller.js +5 -6
- package/dist/classic/panels/panel-controller.js.map +1 -1
- package/dist/classic/panels/panel-host.js +2 -2
- package/dist/classic/panels/panel-host.js.map +1 -1
- package/dist/classic/panels/panel-initial-states.d.ts +1 -0
- package/dist/classic/panels/panel-initial-states.js +1 -0
- package/dist/classic/panels/panel-initial-states.js.map +1 -1
- package/dist/classic/panels/panel-types.d.ts +1 -0
- package/dist/classic/panels/panel-wheel.js +2 -2
- package/dist/classic/panels/panel-wheel.js.map +1 -1
- package/dist/classic/panels/text-editor-panel.d.ts +2 -1
- package/dist/classic/panels/text-editor-panel.js +21 -12
- package/dist/classic/panels/text-editor-panel.js.map +1 -1
- package/dist/classic/render/ansi-text.js +49 -33
- package/dist/classic/render/ansi-text.js.map +1 -1
- package/dist/classic/render/ink-theme.js +1 -1
- package/dist/classic/render/ink-theme.js.map +1 -1
- package/dist/classic/render/measure.js +2 -3
- package/dist/classic/render/measure.js.map +1 -1
- package/dist/classic/render/shell-width.js +1 -1
- package/dist/classic/render/shell-width.js.map +1 -1
- package/dist/classic/render/widest-line.d.ts +1 -0
- package/dist/classic/render/widest-line.js +5 -0
- package/dist/classic/render/widest-line.js.map +1 -0
- package/dist/commands/current-version.d.ts +1 -0
- package/dist/commands/current-version.js +42 -0
- package/dist/commands/current-version.js.map +1 -0
- package/dist/commands/doctor.js +2 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/update.d.ts +2 -1
- package/dist/commands/update.js +4 -41
- package/dist/commands/update.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +26 -16
- package/dist/index.js.map +1 -1
- package/dist/instructions/scaffold.js +2 -1
- package/dist/instructions/scaffold.js.map +1 -1
- package/dist/llm/agentrouter.js +6 -11
- package/dist/llm/agentrouter.js.map +1 -1
- package/dist/llm/anthropic.js +6 -8
- package/dist/llm/anthropic.js.map +1 -1
- package/dist/llm/bynara.js +6 -10
- package/dist/llm/bynara.js.map +1 -1
- package/dist/llm/capabilities.js +13 -6
- package/dist/llm/capabilities.js.map +1 -1
- package/dist/llm/capability/vision-patterns.js +1 -1
- package/dist/llm/capability/vision-patterns.js.map +1 -1
- package/dist/llm/cline.js +3 -2
- package/dist/llm/cline.js.map +1 -1
- package/dist/llm/codex-models.d.ts +1 -1
- package/dist/llm/codex-models.js +11 -6
- package/dist/llm/codex-models.js.map +1 -1
- package/dist/llm/codex.js +2 -1
- package/dist/llm/codex.js.map +1 -1
- package/dist/llm/constellation.js +5 -0
- package/dist/llm/constellation.js.map +1 -1
- package/dist/llm/context-windows.js +17 -13
- package/dist/llm/context-windows.js.map +1 -1
- package/dist/llm/copilot.js +19 -21
- package/dist/llm/copilot.js.map +1 -1
- package/dist/llm/custom-providers.d.ts +2 -1
- package/dist/llm/custom-providers.js +16 -10
- package/dist/llm/custom-providers.js.map +1 -1
- package/dist/llm/deepseek.js +6 -11
- package/dist/llm/deepseek.js.map +1 -1
- package/dist/llm/explabs.js +8 -9
- package/dist/llm/explabs.js.map +1 -1
- package/dist/llm/fireworks.js +9 -11
- package/dist/llm/fireworks.js.map +1 -1
- package/dist/llm/free-default-model.js +5 -3
- package/dist/llm/free-default-model.js.map +1 -1
- package/dist/llm/free-model-limits.js +2 -1
- package/dist/llm/free-model-limits.js.map +1 -1
- package/dist/llm/free.js +20 -23
- package/dist/llm/free.js.map +1 -1
- package/dist/llm/freebuff-agent-prompt.d.ts +1 -0
- package/dist/llm/freebuff-agent-prompt.js +46 -0
- package/dist/llm/freebuff-agent-prompt.js.map +1 -0
- package/dist/llm/freebuff-auth.js +15 -3
- package/dist/llm/freebuff-auth.js.map +1 -1
- package/dist/llm/freebuff-device-key.d.ts +39 -0
- package/dist/llm/freebuff-device-key.js +330 -0
- package/dist/llm/freebuff-device-key.js.map +1 -0
- package/dist/llm/freebuff-env-profile.d.ts +41 -0
- package/dist/llm/freebuff-env-profile.js +205 -0
- package/dist/llm/freebuff-env-profile.js.map +1 -0
- package/dist/llm/freebuff-fingerprint.d.ts +21 -0
- package/dist/llm/freebuff-fingerprint.js +137 -0
- package/dist/llm/freebuff-fingerprint.js.map +1 -0
- package/dist/llm/freebuff-models.d.ts +26 -5
- package/dist/llm/freebuff-models.js +146 -80
- package/dist/llm/freebuff-models.js.map +1 -1
- package/dist/llm/freebuff-run.d.ts +2 -0
- package/dist/llm/freebuff-run.js +77 -24
- package/dist/llm/freebuff-run.js.map +1 -1
- package/dist/llm/freebuff-session-api.d.ts +3 -1
- package/dist/llm/freebuff-session-api.js +26 -18
- package/dist/llm/freebuff-session-api.js.map +1 -1
- package/dist/llm/freebuff-session.d.ts +7 -1
- package/dist/llm/freebuff-session.js +81 -31
- package/dist/llm/freebuff-session.js.map +1 -1
- package/dist/llm/freebuff-wire.d.ts +8 -0
- package/dist/llm/freebuff-wire.js +42 -20
- package/dist/llm/freebuff-wire.js.map +1 -1
- package/dist/llm/freebuff.js +81 -10
- package/dist/llm/freebuff.js.map +1 -1
- package/dist/llm/generation-metrics.d.ts +11 -0
- package/dist/llm/generation-metrics.js +54 -0
- package/dist/llm/generation-metrics.js.map +1 -0
- package/dist/llm/generation-submission.d.ts +2 -0
- package/dist/llm/generation-submission.js +13 -0
- package/dist/llm/generation-submission.js.map +1 -0
- package/dist/llm/glm.js +6 -11
- package/dist/llm/glm.js.map +1 -1
- package/dist/llm/hetzner.js +9 -11
- package/dist/llm/hetzner.js.map +1 -1
- package/dist/llm/kimi.js +6 -11
- package/dist/llm/kimi.js.map +1 -1
- package/dist/llm/kiro.js +11 -10
- package/dist/llm/kiro.js.map +1 -1
- package/dist/llm/lightning.js +6 -10
- package/dist/llm/lightning.js.map +1 -1
- package/dist/llm/main-effort-discovery.d.ts +16 -0
- package/dist/llm/main-effort-discovery.js +71 -0
- package/dist/llm/main-effort-discovery.js.map +1 -0
- package/dist/llm/merge-gateway.js +9 -10
- package/dist/llm/merge-gateway.js.map +1 -1
- package/dist/llm/meta.js +6 -10
- package/dist/llm/meta.js.map +1 -1
- package/dist/llm/mimo.js +6 -11
- package/dist/llm/mimo.js.map +1 -1
- package/dist/llm/minimax.js +6 -11
- package/dist/llm/minimax.js.map +1 -1
- package/dist/llm/mistral.js +10 -5
- package/dist/llm/mistral.js.map +1 -1
- package/dist/llm/modal.js +6 -11
- package/dist/llm/modal.js.map +1 -1
- package/dist/llm/model-discovery.d.ts +4 -1
- package/dist/llm/model-discovery.js +5 -2
- package/dist/llm/model-discovery.js.map +1 -1
- package/dist/llm/model-limit-store.d.ts +2 -0
- package/dist/llm/model-limit-store.js +44 -12
- package/dist/llm/model-limit-store.js.map +1 -1
- package/dist/llm/model-list-cache.d.ts +15 -0
- package/dist/llm/model-list-cache.js +55 -0
- package/dist/llm/model-list-cache.js.map +1 -0
- package/dist/llm/nvidia.js +9 -10
- package/dist/llm/nvidia.js.map +1 -1
- package/dist/llm/ollama.js +4 -0
- package/dist/llm/ollama.js.map +1 -1
- package/dist/llm/omnirush-session-upload.d.ts +1 -0
- package/dist/llm/omnirush-session-upload.js +14 -1
- package/dist/llm/omnirush-session-upload.js.map +1 -1
- package/dist/llm/omnirush.js +10 -14
- package/dist/llm/omnirush.js.map +1 -1
- package/dist/llm/openrouter.js +6 -11
- package/dist/llm/openrouter.js.map +1 -1
- package/dist/llm/operation-usage.js +22 -5
- package/dist/llm/operation-usage.js.map +1 -1
- package/dist/llm/orcarouter.js +9 -13
- package/dist/llm/orcarouter.js.map +1 -1
- package/dist/llm/provider-info-text.js +2 -1
- package/dist/llm/provider-info-text.js.map +1 -1
- package/dist/llm/provider-model-layers.js +4 -0
- package/dist/llm/provider-model-layers.js.map +1 -1
- package/dist/llm/provider-profile-layers.js +2 -1
- package/dist/llm/provider-profile-layers.js.map +1 -1
- package/dist/llm/provider-profiles.d.ts +1 -0
- package/dist/llm/provider-profiles.js +32 -2
- package/dist/llm/provider-profiles.js.map +1 -1
- package/dist/llm/provider.js +2 -1
- package/dist/llm/provider.js.map +1 -1
- package/dist/llm/qoder/qoder.js +6 -10
- package/dist/llm/qoder/qoder.js.map +1 -1
- package/dist/llm/qwen-cloud.js +6 -9
- package/dist/llm/qwen-cloud.js.map +1 -1
- package/dist/llm/request-plan.js +17 -9
- package/dist/llm/request-plan.js.map +1 -1
- package/dist/llm/responses-request.js +8 -1
- package/dist/llm/responses-request.js.map +1 -1
- package/dist/llm/river-models.d.ts +1 -0
- package/dist/llm/river-models.js +6 -1
- package/dist/llm/river-models.js.map +1 -1
- package/dist/llm/routing/attempt-complete.js +6 -1
- package/dist/llm/routing/attempt-complete.js.map +1 -1
- package/dist/llm/routing/attempt-request.d.ts +3 -1
- package/dist/llm/routing/attempt-request.js +39 -5
- package/dist/llm/routing/attempt-request.js.map +1 -1
- package/dist/llm/routing/attempt-stream.js +8 -1
- package/dist/llm/routing/attempt-stream.js.map +1 -1
- package/dist/llm/routing/error-classification.d.ts +1 -0
- package/dist/llm/routing/error-classification.js +9 -1
- package/dist/llm/routing/error-classification.js.map +1 -1
- package/dist/llm/routing/request-option-fallback.d.ts +6 -0
- package/dist/llm/routing/request-option-fallback.js +63 -3
- package/dist/llm/routing/request-option-fallback.js.map +1 -1
- package/dist/llm/token-usage.js +7 -2
- package/dist/llm/token-usage.js.map +1 -1
- package/dist/llm/tokenharbor.js +10 -13
- package/dist/llm/tokenharbor.js.map +1 -1
- package/dist/llm/tokenrouter.js +10 -14
- package/dist/llm/tokenrouter.js.map +1 -1
- package/dist/llm/vercel.js +12 -12
- package/dist/llm/vercel.js.map +1 -1
- package/dist/llm/wire/chat-body.js +3 -1
- package/dist/llm/wire/chat-body.js.map +1 -1
- package/dist/llm/wire/effort-preflight.d.ts +4 -1
- package/dist/llm/wire/effort-preflight.js +49 -6
- package/dist/llm/wire/effort-preflight.js.map +1 -1
- package/dist/llm/wire/openai-complete.d.ts +1 -0
- package/dist/llm/wire/openai-complete.js +5 -1
- package/dist/llm/wire/openai-complete.js.map +1 -1
- package/dist/llm/wire/openai-stream.d.ts +1 -0
- package/dist/llm/wire/openai-stream.js +1 -0
- package/dist/llm/wire/openai-stream.js.map +1 -1
- package/dist/llm/wire/responses-first.js +3 -0
- package/dist/llm/wire/responses-first.js.map +1 -1
- package/dist/llm/zen-catalog.d.ts +3 -1
- package/dist/llm/zen-catalog.js +9 -3
- package/dist/llm/zen-catalog.js.map +1 -1
- package/dist/mcp/argument-hint.d.ts +9 -0
- package/dist/mcp/argument-hint.js +17 -0
- package/dist/mcp/argument-hint.js.map +1 -0
- package/dist/mcp/catalog.js +5 -5
- package/dist/mcp/catalog.js.map +1 -1
- package/dist/mcp/manager.d.ts +2 -0
- package/dist/mcp/manager.js +21 -1
- package/dist/mcp/manager.js.map +1 -1
- package/dist/mcp/runtime.d.ts +5 -1
- package/dist/mcp/runtime.js +33 -2
- package/dist/mcp/runtime.js.map +1 -1
- package/dist/noninteractive/stream-renderer.js +2 -0
- package/dist/noninteractive/stream-renderer.js.map +1 -1
- package/dist/os/ownership-repair.d.ts +5 -0
- package/dist/os/ownership-repair.js +62 -0
- package/dist/os/ownership-repair.js.map +1 -0
- package/dist/os/permissions.d.ts +7 -0
- package/dist/os/permissions.js +27 -22
- package/dist/os/permissions.js.map +1 -1
- package/dist/os/runtime-error.d.ts +2 -0
- package/dist/os/runtime-error.js +39 -0
- package/dist/os/runtime-error.js.map +1 -0
- package/dist/os/settle-within.d.ts +1 -0
- package/dist/os/settle-within.js +12 -0
- package/dist/os/settle-within.js.map +1 -0
- package/dist/os/user-environment.d.ts +1 -0
- package/dist/os/user-environment.js +3 -0
- package/dist/os/user-environment.js.map +1 -0
- package/dist/os/user-identity.d.ts +11 -0
- package/dist/os/user-identity.js +163 -0
- package/dist/os/user-identity.js.map +1 -0
- package/dist/prompts/embedded.js +1 -1
- package/dist/prompts/embedded.js.map +1 -1
- package/dist/prompts/index.js +21 -18
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/system.agent.md +10 -9
- package/dist/rea/availability.d.ts +22 -0
- package/dist/rea/availability.js +82 -0
- package/dist/rea/availability.js.map +1 -0
- package/dist/rea/connection.d.ts +8 -0
- package/dist/rea/connection.js +12 -0
- package/dist/rea/connection.js.map +1 -0
- package/dist/rea/distribution.d.ts +13 -0
- package/dist/rea/distribution.js +140 -0
- package/dist/rea/distribution.js.map +1 -0
- package/dist/rea/download.d.ts +22 -0
- package/dist/rea/download.js +198 -0
- package/dist/rea/download.js.map +1 -0
- package/dist/rea/engine-report.d.ts +4 -0
- package/dist/rea/engine-report.js +77 -0
- package/dist/rea/engine-report.js.map +1 -0
- package/dist/rea/engine-status.d.ts +24 -0
- package/dist/rea/engine-status.js +103 -0
- package/dist/rea/engine-status.js.map +1 -0
- package/dist/rea/engines.d.ts +43 -0
- package/dist/rea/engines.js +160 -0
- package/dist/rea/engines.js.map +1 -0
- package/dist/rea/ghidra.d.ts +83 -0
- package/dist/rea/ghidra.js +316 -0
- package/dist/rea/ghidra.js.map +1 -0
- package/dist/rea/guide.d.ts +14 -0
- package/dist/rea/guide.js +178 -0
- package/dist/rea/guide.js.map +1 -0
- package/dist/rea/hints.d.ts +3 -0
- package/dist/rea/hints.js +99 -0
- package/dist/rea/hints.js.map +1 -0
- package/dist/rea/install.d.ts +10 -0
- package/dist/rea/install.js +173 -0
- package/dist/rea/install.js.map +1 -0
- package/dist/rea/jdk.d.ts +50 -0
- package/dist/rea/jdk.js +171 -0
- package/dist/rea/jdk.js.map +1 -0
- package/dist/rea/node.d.ts +22 -0
- package/dist/rea/node.js +150 -0
- package/dist/rea/node.js.map +1 -0
- package/dist/rea/runtime.d.ts +11 -0
- package/dist/rea/runtime.js +186 -0
- package/dist/rea/runtime.js.map +1 -0
- package/dist/rea/tool-index.d.ts +7 -0
- package/dist/rea/tool-index.js +105 -0
- package/dist/rea/tool-index.js.map +1 -0
- package/dist/rea/types.d.ts +36 -0
- package/dist/rea/types.js +2 -0
- package/dist/rea/types.js.map +1 -0
- package/dist/rea/workflow.d.ts +14 -0
- package/dist/rea/workflow.js +60 -0
- package/dist/rea/workflow.js.map +1 -0
- package/dist/rea/zip.d.ts +19 -0
- package/dist/rea/zip.js +257 -0
- package/dist/rea/zip.js.map +1 -0
- package/dist/safety/tool-classification.js +12 -0
- package/dist/safety/tool-classification.js.map +1 -1
- package/dist/security/known-secrets.d.ts +5 -0
- package/dist/security/known-secrets.js +50 -0
- package/dist/security/known-secrets.js.map +1 -0
- package/dist/session-runtime/client.d.ts +1 -1
- package/dist/session-runtime/client.js +6 -3
- package/dist/session-runtime/client.js.map +1 -1
- package/dist/session-runtime/host.js +2 -0
- package/dist/session-runtime/host.js.map +1 -1
- package/dist/session-runtime/paths.js +14 -6
- package/dist/session-runtime/paths.js.map +1 -1
- package/dist/session-runtime/start-runtime.js +5 -8
- package/dist/session-runtime/start-runtime.js.map +1 -1
- package/dist/session-runtime/store.js +4 -1
- package/dist/session-runtime/store.js.map +1 -1
- package/dist/store/config/endpoints.js +3 -1
- package/dist/store/config/endpoints.js.map +1 -1
- package/dist/store/credentials/crypto.d.ts +7 -0
- package/dist/store/credentials/crypto.js +118 -0
- package/dist/store/credentials/crypto.js.map +1 -0
- package/dist/store/credentials.d.ts +21 -0
- package/dist/store/credentials.js +150 -0
- package/dist/store/credentials.js.map +1 -0
- package/dist/store/history/freshness.d.ts +2 -0
- package/dist/store/history/freshness.js +3 -2
- package/dist/store/history/freshness.js.map +1 -1
- package/dist/store/history/jsonl-backend.d.ts +0 -1
- package/dist/store/history/jsonl-backend.js +3 -122
- package/dist/store/history/jsonl-backend.js.map +1 -1
- package/dist/store/history/jsonl-lock.d.ts +1 -0
- package/dist/store/history/jsonl-lock.js +94 -71
- package/dist/store/history/jsonl-lock.js.map +1 -1
- package/dist/store/history/legacy-migration.d.ts +6 -0
- package/dist/store/history/legacy-migration.js +127 -0
- package/dist/store/history/legacy-migration.js.map +1 -0
- package/dist/store/history/lifecycle.js +11 -2
- package/dist/store/history/lifecycle.js.map +1 -1
- package/dist/store/history/recovery.d.ts +2 -0
- package/dist/store/history/recovery.js +6 -1
- package/dist/store/history/recovery.js.map +1 -1
- package/dist/store/history/session-frames.d.ts +74 -0
- package/dist/store/history/session-frames.js +234 -0
- package/dist/store/history/session-frames.js.map +1 -0
- package/dist/store/history/session-index.d.ts +13 -0
- package/dist/store/history/session-index.js +135 -0
- package/dist/store/history/session-index.js.map +1 -0
- package/dist/store/history/session-log.d.ts +44 -0
- package/dist/store/history/session-log.js +386 -0
- package/dist/store/history/session-log.js.map +1 -0
- package/dist/store/history/session-paths.d.ts +11 -0
- package/dist/store/history/session-paths.js +35 -0
- package/dist/store/history/session-paths.js.map +1 -0
- package/dist/store/history/session-queries.js +34 -19
- package/dist/store/history/session-queries.js.map +1 -1
- package/dist/store/history/session-store.d.ts +11 -0
- package/dist/store/history/session-store.js +202 -0
- package/dist/store/history/session-store.js.map +1 -0
- package/dist/store/history/sqlite-backend.js +2 -0
- package/dist/store/history/sqlite-backend.js.map +1 -1
- package/dist/store/history/transcript-merge.d.ts +2 -0
- package/dist/store/history/transcript-merge.js +46 -0
- package/dist/store/history/transcript-merge.js.map +1 -0
- package/dist/store/history-index.d.ts +2 -2
- package/dist/store/history-index.js +3 -18
- package/dist/store/history-index.js.map +1 -1
- package/dist/store/history.d.ts +4 -1
- package/dist/store/history.js +113 -61
- package/dist/store/history.js.map +1 -1
- package/dist/store/keys/secret-store.js +5 -2
- package/dist/store/keys/secret-store.js.map +1 -1
- package/dist/store/legacy-location.d.ts +1 -0
- package/dist/store/legacy-location.js +37 -0
- package/dist/store/legacy-location.js.map +1 -0
- package/dist/store/ownership.d.ts +3 -0
- package/dist/store/ownership.js +23 -0
- package/dist/store/ownership.js.map +1 -0
- package/dist/store/paths.js +3 -2
- package/dist/store/paths.js.map +1 -1
- package/dist/store/redaction-cache.d.ts +0 -5
- package/dist/store/redaction-cache.js +6 -5
- package/dist/store/redaction-cache.js.map +1 -1
- package/dist/store/scope.js +7 -2
- package/dist/store/scope.js.map +1 -1
- package/dist/store/session-prompts.d.ts +1 -0
- package/dist/store/session-prompts.js +34 -13
- package/dist/store/session-prompts.js.map +1 -1
- package/dist/store/session-queue.d.ts +4 -0
- package/dist/store/session-queue.js +62 -0
- package/dist/store/session-queue.js.map +1 -0
- package/dist/store/session-workspace-activity.d.ts +4 -0
- package/dist/store/session-workspace-activity.js +69 -0
- package/dist/store/session-workspace-activity.js.map +1 -0
- package/dist/store/session-workspace-cleanup.d.ts +4 -0
- package/dist/store/session-workspace-cleanup.js +246 -0
- package/dist/store/session-workspace-cleanup.js.map +1 -0
- package/dist/store/session-workspace.js +9 -0
- package/dist/store/session-workspace.js.map +1 -1
- package/dist/tools/credentials.d.ts +2 -0
- package/dist/tools/credentials.js +27 -0
- package/dist/tools/credentials.js.map +1 -0
- package/dist/tools/definitions/aggregate.js +10 -0
- package/dist/tools/definitions/aggregate.js.map +1 -1
- package/dist/tools/definitions/credentials.d.ts +1 -0
- package/dist/tools/definitions/credentials.js +15 -0
- package/dist/tools/definitions/credentials.js.map +1 -0
- package/dist/tools/definitions/files.js +4 -4
- package/dist/tools/definitions/files.js.map +1 -1
- package/dist/tools/definitions/fs-read.js +3 -2
- package/dist/tools/definitions/fs-read.js.map +1 -1
- package/dist/tools/definitions/shell.js +2 -2
- package/dist/tools/definitions/shell.js.map +1 -1
- package/dist/tools/definitions/terminal.js +2 -1
- package/dist/tools/definitions/terminal.js.map +1 -1
- package/dist/tools/definitions.js +2 -1
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/elevated-shell.js +11 -14
- package/dist/tools/elevated-shell.js.map +1 -1
- package/dist/tools/fs/mutations.js +1 -1
- package/dist/tools/fs/mutations.js.map +1 -1
- package/dist/tools/handlers/files-2.js +1 -1
- package/dist/tools/handlers/files-2.js.map +1 -1
- package/dist/tools/http/agents.d.ts +4 -5
- package/dist/tools/http/agents.js +4 -12
- package/dist/tools/http/agents.js.map +1 -1
- package/dist/tools/http/fetch.js +3 -10
- package/dist/tools/http/fetch.js.map +1 -1
- package/dist/tools/interactive-session-tools.js +20 -4
- package/dist/tools/interactive-session-tools.js.map +1 -1
- package/dist/tools/registry.d.ts +1 -0
- package/dist/tools/registry.js +5 -0
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/shell/artifact.d.ts +7 -0
- package/dist/tools/shell/artifact.js +85 -0
- package/dist/tools/shell/artifact.js.map +1 -0
- package/dist/tools/shell/capture.d.ts +1 -5
- package/dist/tools/shell/capture.js +1 -18
- package/dist/tools/shell/capture.js.map +1 -1
- package/dist/tools/shell/exec-attempt.js +9 -27
- package/dist/tools/shell/exec-attempt.js.map +1 -1
- package/dist/tools/shell/spawn-argv.js +7 -21
- package/dist/tools/shell/spawn-argv.js.map +1 -1
- package/dist/tools/sudo-session.d.ts +2 -1
- package/dist/tools/sudo-session.js +26 -9
- package/dist/tools/sudo-session.js.map +1 -1
- package/dist/tui-v2/app/App.js +11 -15
- package/dist/tui-v2/app/App.js.map +1 -1
- package/dist/tui-v2/app/layout-widths.js +6 -5
- package/dist/tui-v2/app/layout-widths.js.map +1 -1
- package/dist/tui-v2/bootstrap/patch-opentui-selection.d.ts +6 -0
- package/dist/tui-v2/bootstrap/patch-opentui-selection.js +27 -0
- package/dist/tui-v2/bootstrap/patch-opentui-selection.js.map +1 -0
- package/dist/tui-v2/bootstrap/renderer-handle.d.ts +2 -0
- package/dist/tui-v2/bootstrap/renderer-handle.js +21 -10
- package/dist/tui-v2/bootstrap/renderer-handle.js.map +1 -1
- package/dist/tui-v2/bootstrap/runtime-view.js +2 -0
- package/dist/tui-v2/bootstrap/runtime-view.js.map +1 -1
- package/dist/tui-v2/bootstrap/start-tui-v2.js +19 -29
- package/dist/tui-v2/bootstrap/start-tui-v2.js.map +1 -1
- package/dist/tui-v2/components/jobs/jobs-panel.js +1 -9
- package/dist/tui-v2/components/jobs/jobs-panel.js.map +1 -1
- package/dist/tui-v2/components/modal/confirm-modal.js +1 -0
- package/dist/tui-v2/components/modal/confirm-modal.js.map +1 -1
- package/dist/tui-v2/components/modal/text-editor-modal.js +4 -0
- package/dist/tui-v2/components/modal/text-editor-modal.js.map +1 -1
- package/dist/tui-v2/components/overlay/overlay-host.js +1 -2
- package/dist/tui-v2/components/overlay/overlay-host.js.map +1 -1
- package/dist/tui-v2/components/pager/pager-line.d.ts +1 -0
- package/dist/tui-v2/components/pager/pager-line.js +46 -27
- package/dist/tui-v2/components/pager/pager-line.js.map +1 -1
- package/dist/tui-v2/components/pager/pager-rows.d.ts +3 -0
- package/dist/tui-v2/components/pager/pager-rows.js +18 -1
- package/dist/tui-v2/components/pager/pager-rows.js.map +1 -1
- package/dist/tui-v2/components/pager/pager.d.ts +2 -0
- package/dist/tui-v2/components/pager/pager.js +12 -8
- package/dist/tui-v2/components/pager/pager.js.map +1 -1
- package/dist/tui-v2/components/plan/plan-view.js +28 -6
- package/dist/tui-v2/components/plan/plan-view.js.map +1 -1
- package/dist/tui-v2/components/status/context-limit-chip.js +2 -2
- package/dist/tui-v2/components/status/status-line.js +13 -12
- package/dist/tui-v2/components/status/status-line.js.map +1 -1
- package/dist/tui-v2/components/toast/toast-anim.d.ts +6 -0
- package/dist/tui-v2/components/toast/toast-anim.js +17 -0
- package/dist/tui-v2/components/toast/toast-anim.js.map +1 -1
- package/dist/tui-v2/components/toast/toast-host.js +15 -5
- package/dist/tui-v2/components/toast/toast-host.js.map +1 -1
- package/dist/tui-v2/components/transcript/compacted-row.js +3 -1
- package/dist/tui-v2/components/transcript/compacted-row.js.map +1 -1
- package/dist/tui-v2/components/transcript/intro-card.js +5 -8
- package/dist/tui-v2/components/transcript/intro-card.js.map +1 -1
- package/dist/tui-v2/components/transcript/selection-snap.d.ts +43 -0
- package/dist/tui-v2/components/transcript/selection-snap.js +68 -0
- package/dist/tui-v2/components/transcript/selection-snap.js.map +1 -0
- package/dist/tui-v2/components/transcript/thinking-block.d.ts +2 -0
- package/dist/tui-v2/components/transcript/thinking-block.js +36 -19
- package/dist/tui-v2/components/transcript/thinking-block.js.map +1 -1
- package/dist/tui-v2/components/transcript/thinking-presentation.d.ts +0 -2
- package/dist/tui-v2/components/transcript/thinking-presentation.js +0 -52
- package/dist/tui-v2/components/transcript/thinking-presentation.js.map +1 -1
- package/dist/tui-v2/components/transcript/tool-card.js +5 -2
- package/dist/tui-v2/components/transcript/tool-card.js.map +1 -1
- package/dist/tui-v2/components/transcript/transcript-anchor.d.ts +20 -0
- package/dist/tui-v2/components/transcript/transcript-anchor.js +43 -0
- package/dist/tui-v2/components/transcript/transcript-anchor.js.map +1 -0
- package/dist/tui-v2/components/transcript/transcript-row.js +20 -6
- package/dist/tui-v2/components/transcript/transcript-row.js.map +1 -1
- package/dist/tui-v2/components/transcript/transcript-scroll-port.d.ts +2 -0
- package/dist/tui-v2/components/transcript/transcript-scroll-port.js +35 -0
- package/dist/tui-v2/components/transcript/transcript-scroll-port.js.map +1 -1
- package/dist/tui-v2/components/transcript/transcript-view.js +184 -147
- package/dist/tui-v2/components/transcript/transcript-view.js.map +1 -1
- package/dist/tui-v2/components/transcript/user-message.js +31 -21
- package/dist/tui-v2/components/transcript/user-message.js.map +1 -1
- package/dist/tui-v2/composer/composer-editor.js +2 -4
- package/dist/tui-v2/composer/composer-editor.js.map +1 -1
- package/dist/tui-v2/composer/composer-highlight.js +2 -1
- package/dist/tui-v2/composer/composer-highlight.js.map +1 -1
- package/dist/tui-v2/composer/composer-wheel.d.ts +1 -1
- package/dist/tui-v2/composer/composer-wheel.js +4 -4
- package/dist/tui-v2/composer/composer-wheel.js.map +1 -1
- package/dist/tui-v2/rendering/ansi-to-styled.js +16 -20
- package/dist/tui-v2/rendering/ansi-to-styled.js.map +1 -1
- package/dist/tui-v2/rendering/pager-markdown.d.ts +3 -2
- package/dist/tui-v2/rendering/pager-markdown.js +15 -11
- package/dist/tui-v2/rendering/pager-markdown.js.map +1 -1
- package/dist/types.d.ts +5 -7
- package/dist/types.js.map +1 -1
- package/dist/ui/mentions/expand.js +4 -0
- package/dist/ui/mentions/expand.js.map +1 -1
- package/dist/ui-core/bootstrap/composition-root.js +23 -0
- package/dist/ui-core/bootstrap/composition-root.js.map +1 -1
- package/dist/ui-core/bootstrap/fatal-diagnostics.d.ts +1 -0
- package/dist/ui-core/bootstrap/fatal-diagnostics.js +9 -0
- package/dist/ui-core/bootstrap/fatal-diagnostics.js.map +1 -0
- package/dist/ui-core/bootstrap/lifecycle.d.ts +5 -0
- package/dist/ui-core/bootstrap/lifecycle.js +33 -4
- package/dist/ui-core/bootstrap/lifecycle.js.map +1 -1
- package/dist/ui-core/bootstrap/resume-option.d.ts +11 -0
- package/dist/ui-core/bootstrap/resume-option.js +9 -0
- package/dist/ui-core/bootstrap/resume-option.js.map +1 -0
- package/dist/ui-core/bootstrap/session-merge.d.ts +4 -0
- package/dist/ui-core/bootstrap/session-merge.js +19 -0
- package/dist/ui-core/bootstrap/session-merge.js.map +1 -0
- package/dist/ui-core/bootstrap/session-resume.d.ts +2 -11
- package/dist/ui-core/bootstrap/session-resume.js +2 -8
- package/dist/ui-core/bootstrap/session-resume.js.map +1 -1
- package/dist/ui-core/bootstrap/shutdown-services.d.ts +3 -0
- package/dist/ui-core/bootstrap/shutdown-services.js +24 -0
- package/dist/ui-core/bootstrap/shutdown-services.js.map +1 -0
- package/dist/ui-core/commands/change-commands.js +53 -15
- package/dist/ui-core/commands/change-commands.js.map +1 -1
- package/dist/ui-core/commands/command-handlers.js +4 -0
- package/dist/ui-core/commands/command-handlers.js.map +1 -1
- package/dist/ui-core/commands/credential-commands.d.ts +7 -0
- package/dist/ui-core/commands/credential-commands.js +114 -0
- package/dist/ui-core/commands/credential-commands.js.map +1 -0
- package/dist/ui-core/commands/picker-commands.d.ts +6 -2
- package/dist/ui-core/commands/picker-commands.js +30 -17
- package/dist/ui-core/commands/picker-commands.js.map +1 -1
- package/dist/ui-core/commands/pickers/search-reasoning.js +14 -4
- package/dist/ui-core/commands/pickers/search-reasoning.js.map +1 -1
- package/dist/ui-core/commands/rea-commands.d.ts +3 -0
- package/dist/ui-core/commands/rea-commands.js +176 -0
- package/dist/ui-core/commands/rea-commands.js.map +1 -0
- package/dist/ui-core/commands/rea-engines-commands.d.ts +37 -0
- package/dist/ui-core/commands/rea-engines-commands.js +433 -0
- package/dist/ui-core/commands/rea-engines-commands.js.map +1 -0
- package/dist/ui-core/composer/completion.js +3 -0
- package/dist/ui-core/composer/completion.js.map +1 -1
- package/dist/ui-core/controllers/overlay-controller.d.ts +5 -2
- package/dist/ui-core/controllers/overlay-controller.js +3 -2
- package/dist/ui-core/controllers/overlay-controller.js.map +1 -1
- package/dist/ui-core/controllers/selection-controller.d.ts +2 -1
- package/dist/ui-core/controllers/selection-controller.js +27 -0
- package/dist/ui-core/controllers/selection-controller.js.map +1 -1
- package/dist/ui-core/layout/compute-layout.d.ts +3 -1
- package/dist/ui-core/layout/compute-layout.js +4 -2
- package/dist/ui-core/layout/compute-layout.js.map +1 -1
- package/dist/ui-core/motion/wheel-scroll.d.ts +7 -0
- package/dist/ui-core/motion/wheel-scroll.js +24 -0
- package/dist/ui-core/motion/wheel-scroll.js.map +1 -0
- package/dist/{classic/render/palette.js → ui-core/rendering/ansi-palette.js} +1 -1
- package/dist/ui-core/rendering/ansi-palette.js.map +1 -0
- package/dist/ui-core/rendering/artifact-pager-source.d.ts +1 -0
- package/dist/ui-core/rendering/artifact-pager-source.js.map +1 -1
- package/dist/ui-core/rendering/compaction-pager-source.d.ts +4 -0
- package/dist/ui-core/rendering/compaction-pager-source.js +65 -0
- package/dist/ui-core/rendering/compaction-pager-source.js.map +1 -0
- package/dist/ui-core/rendering/duration.d.ts +3 -1
- package/dist/ui-core/rendering/duration.js +12 -3
- package/dist/ui-core/rendering/duration.js.map +1 -1
- package/dist/ui-core/rendering/incremental-strip.js +4 -1
- package/dist/ui-core/rendering/incremental-strip.js.map +1 -1
- package/dist/ui-core/rendering/intro-header.d.ts +3 -0
- package/dist/ui-core/rendering/intro-header.js +145 -161
- package/dist/ui-core/rendering/intro-header.js.map +1 -1
- package/dist/ui-core/rendering/job-tail-source.js +30 -2
- package/dist/ui-core/rendering/job-tail-source.js.map +1 -1
- package/dist/ui-core/rendering/markdown-diff-rows.d.ts +12 -0
- package/dist/ui-core/rendering/markdown-diff-rows.js +85 -0
- package/dist/ui-core/rendering/markdown-diff-rows.js.map +1 -0
- package/dist/ui-core/rendering/markdown.d.ts +1 -0
- package/dist/ui-core/rendering/markdown.js +12 -0
- package/dist/ui-core/rendering/markdown.js.map +1 -1
- package/dist/ui-core/rendering/open-tool-output.d.ts +1 -0
- package/dist/ui-core/rendering/open-tool-output.js +48 -14
- package/dist/ui-core/rendering/open-tool-output.js.map +1 -1
- package/dist/ui-core/rendering/pager-regions.d.ts +7 -0
- package/dist/ui-core/rendering/pager-regions.js +8 -0
- package/dist/ui-core/rendering/pager-regions.js.map +1 -0
- package/dist/ui-core/rendering/plan-view.js +5 -5
- package/dist/ui-core/rendering/plan-view.js.map +1 -1
- package/dist/ui-core/rendering/render-markdown-lines.d.ts +1 -0
- package/dist/ui-core/rendering/render-markdown-lines.js +5 -2
- package/dist/ui-core/rendering/render-markdown-lines.js.map +1 -1
- package/dist/ui-core/rendering/session-change-diff.d.ts +2 -0
- package/dist/ui-core/rendering/session-change-diff.js +85 -0
- package/dist/ui-core/rendering/session-change-diff.js.map +1 -0
- package/dist/ui-core/rendering/session-prompts-pager-source.js +1 -1
- package/dist/ui-core/rendering/session-prompts-pager-source.js.map +1 -1
- package/dist/ui-core/rendering/strip-tool-surfaces.js +7 -7
- package/dist/ui-core/rendering/strip-tool-surfaces.js.map +1 -1
- package/dist/ui-core/rendering/task-disclosure.js +3 -3
- package/dist/ui-core/rendering/task-disclosure.js.map +1 -1
- package/dist/ui-core/rendering/text-width.d.ts +2 -0
- package/dist/ui-core/rendering/text-width.js +100 -4
- package/dist/ui-core/rendering/text-width.js.map +1 -1
- package/dist/ui-core/rendering/thinking-tail.js +6 -2
- package/dist/ui-core/rendering/thinking-tail.js.map +1 -1
- package/dist/ui-core/rendering/tool-output-pager-source.d.ts +4 -0
- package/dist/ui-core/rendering/tool-output-pager-source.js +94 -0
- package/dist/ui-core/rendering/tool-output-pager-source.js.map +1 -0
- package/dist/ui-core/rendering/tool-presenter.d.ts +2 -0
- package/dist/ui-core/rendering/tool-presenter.js +53 -0
- package/dist/ui-core/rendering/tool-presenter.js.map +1 -1
- package/dist/ui-core/state/hydrate/classic-transcript.js +2 -0
- package/dist/ui-core/state/hydrate/classic-transcript.js.map +1 -1
- package/dist/ui-core/state/pager-search.d.ts +8 -0
- package/dist/ui-core/state/pager-search.js +20 -0
- package/dist/ui-core/state/pager-search.js.map +1 -1
- package/dist/ui-core/state/semantic-document.d.ts +4 -0
- package/dist/ui-core/state/semantic-document.js.map +1 -1
- package/dist/ui-core/state/transcript/apply-app-event.js +1 -0
- package/dist/ui-core/state/transcript/apply-app-event.js.map +1 -1
- package/dist/ui-core/state/transcript-hydrate.js +1 -0
- package/dist/ui-core/state/transcript-hydrate.js.map +1 -1
- package/dist/ui-core/state/transcript-store.d.ts +2 -1
- package/dist/ui-core/state/transcript-store.js +35 -0
- package/dist/ui-core/state/transcript-store.js.map +1 -1
- package/dist/ui-core/state/transcript-types.d.ts +2 -0
- package/dist/ui-core/state/transcript-types.js.map +1 -1
- package/dist/ui-core/state/transcript-window.d.ts +11 -2
- package/dist/ui-core/state/transcript-window.js +11 -2
- package/dist/ui-core/state/transcript-window.js.map +1 -1
- package/dist/version.generated.d.ts +2 -2
- package/dist/version.generated.js +2 -2
- package/dist/version.generated.js.map +1 -1
- package/package.json +5 -2
- package/dist/agent/context/compaction-work-history.d.ts +0 -13
- package/dist/agent/context/compaction-work-history.js +0 -150
- package/dist/agent/context/compaction-work-history.js.map +0 -1
- package/dist/classic/render/palette.js.map +0 -1
- package/dist/tui-v2/components/modal/prompt-actions-modal.d.ts +0 -10
- package/dist/tui-v2/components/modal/prompt-actions-modal.js +0 -101
- package/dist/tui-v2/components/modal/prompt-actions-modal.js.map +0 -1
- package/dist/tui-v2/components/transcript/transcript-scrollbar.d.ts +0 -29
- package/dist/tui-v2/components/transcript/transcript-scrollbar.js +0 -211
- package/dist/tui-v2/components/transcript/transcript-scrollbar.js.map +0 -1
- package/dist/ui-core/rendering/prompt-preview.d.ts +0 -5
- package/dist/ui-core/rendering/prompt-preview.js +0 -27
- package/dist/ui-core/rendering/prompt-preview.js.map +0 -1
- /package/dist/{classic/render/palette.d.ts → ui-core/rendering/ansi-palette.d.ts} +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v5.0.0 — 2026-10-22
|
|
4
|
+
|
|
5
|
+
This release covers all changes since **v4.19.0**, including the REA integration, session and interface improvements, provider fixes, and the reliability work below.
|
|
6
|
+
|
|
7
|
+
### Accurate completion statistics
|
|
8
|
+
|
|
9
|
+
- Show output tokens per second alongside elapsed time, file changes, and `/changes` in Classic and OpenTUI, including narrow layouts and restored transcripts.
|
|
10
|
+
- Calculate TPS from reported output tokens and model-active generation time across foreground calls. Tool execution, user waits, auxiliary calls, and compaction do not inflate the rate; reasoning tokens are not counted twice.
|
|
11
|
+
- Preserve earlier valid measurements when a later generation is interrupted. Aborted turns retain measured TPS, and exact partial usage is included when the provider reports it. Missing usage is never replaced with guessed token counts.
|
|
12
|
+
|
|
13
|
+
### Live output and durable queued prompts
|
|
14
|
+
|
|
15
|
+
- Keep tool-output and job pagers live in both interfaces, following streamed output, spool replacement, final artifacts, externally appended job logs, and log rotation.
|
|
16
|
+
- Preserve paused scrolling when output completes, with explicit follow controls, bounded reads, redacted output, and cleanup of subscriptions and file watchers.
|
|
17
|
+
- Stream the OpenTUI compaction pager through progress, replacement, final summaries, and failures instead of opening a frozen snapshot.
|
|
18
|
+
- Persist unsent queued prompts per session with validated, redacted, atomic storage. Recover them after crashes, normal shutdown, session switches, and composer editing.
|
|
19
|
+
- Remove a queued prompt only after foreground model submission is acknowledged. Pre-submission failures retain and pause the prompt rather than silently losing it or retrying indefinitely. Private/no-history sessions do not persist the queue.
|
|
20
|
+
|
|
21
|
+
### On-demand reverse engineering with REA
|
|
22
|
+
|
|
23
|
+
- Add managed REA installation, updates, connection controls, and status, with `@rea`, `/rea <task>`, and an in-app `/rea guide` in both interfaces.
|
|
24
|
+
- Attach a version-matched, grouped tool index and workflow only when needed, preserving the stable system prompt and native tool catalog. Indicate tools that need an open target, an analysis engine, or unavailable prerequisites.
|
|
25
|
+
- Add explicit user-run `/rea engines` status, install, use, and remove workflows for Ghidra, Java, and configured external engines. The agent cannot install analysis engines on its own.
|
|
26
|
+
- Harden downloads with trusted HTTPS hosts, redirect validation, published SHA-256 checks, streamed size limits, stall detection, and disk-space checks. Reject unsafe archive entries and corrupted extraction.
|
|
27
|
+
- Improve macOS, Linux x64/ARM64, and Windows installation behavior, including native decompiler builds where required, Windows path and rename handling, stale staging cleanup, selected-engine environment precedence, and clear unsupported-platform guidance.
|
|
28
|
+
- Improve cancellation, reconnect sequencing, staged-update version reporting, installation contention messages, strict argument hints, exact tool lookup, and lazy archive loading.
|
|
29
|
+
|
|
30
|
+
### Sessions, compaction, and terminal interfaces
|
|
31
|
+
|
|
32
|
+
- Store sessions in individual append-only delta logs, automatically importing legacy `history.jsonl` while preserving the original file. Keep rejected frames separately and avoid unnecessary history reloads.
|
|
33
|
+
- Rebuild compaction memory around the active goal, scoped instructions, gathered context, completed work, next steps, relevant files, genuine issues, and the latest user prompts. Preserve inherited instruction scope and stable replay prefixes.
|
|
34
|
+
- Reduce per-frame transcript work and smooth wheel scrolling in both interfaces. Fix OpenTUI wheel stalls, duplicate acceleration, window-update races, and final-tool-card reachability without discarding saved history.
|
|
35
|
+
- Refresh startup cards with clearer mode and permission badges, responsive labels, a consolidated version/welcome row, and correct provider/model pairing in Classic.
|
|
36
|
+
- Improve whole-cell mouse selection, padding-origin drags, selectable startup and plan content, and plain-click behavior. Remove the transcript scrollbar.
|
|
37
|
+
- Render markdown in completed and streaming reasoning, including emphasis and fenced code, with incremental caches. Improve status spacing, context chips, and tool durations.
|
|
38
|
+
- Print large piped `history --show` output completely under Bun and regenerate the README preview from the real OpenTUI renderer.
|
|
39
|
+
|
|
40
|
+
### Providers and agent reliability
|
|
41
|
+
|
|
42
|
+
- Cache model lists for two minutes instead of up to thirty; never cache empty or fallback lists. Add `/model refresh` and `/models refresh [filter]`, bypass stale/in-flight results, and identify unavailable live catalogs accurately.
|
|
43
|
+
- Size reasoning output budgets from learned, live, remembered, or documented model limits, up to 131,072 tokens where supported. Preserve context fit and learn actual output caps from provider rejections with a bounded retry.
|
|
44
|
+
- Send a stable per-session River `prompt_cache_key`, preserve DeepSeek reasoning on tool-bearing requests, and derive Free/Zen context limits from the live catalog.
|
|
45
|
+
- Recover from malformed DSML tool calls rather than terminating the turn.
|
|
46
|
+
- Allow `http.fetch` to reach private, loopback, CGNAT, and metadata addresses while retaining engagement-scope enforcement.
|
|
47
|
+
- Recover from asynchronous shell artifact open, write, and flush failures without crashing Bun or discarding bounded output. Surface actionable storage warnings and fatal-shutdown diagnostics.
|
|
48
|
+
- Clean recognized session scratch folders after ten days of inactivity, checking at most daily across processes. Protect active sessions, recently modified files, and symlink targets; leave saved conversations and global/custom artifact retention unchanged. Compare expiry conservatively at millisecond precision so filesystem timestamp rounding cannot delete a folder at the exact ten-day boundary.
|
|
49
|
+
|
|
50
|
+
### Safer tools and agent guidance
|
|
51
|
+
|
|
52
|
+
- Allow `fs.edit` replacements of `""` to delete exact matching text. Keep empty search text invalid with actionable guidance rather than a generic argument error.
|
|
53
|
+
- Clarify exact current `oldText`, whitespace and line endings, safe creation/insertion alternatives, stale-preview risks, and the requirement to re-read after a no-match result.
|
|
54
|
+
- Require Responder delegation for finite work expected to exceed four to five minutes, including long suites, builds, scans, and CI watches. Keep interactive sessions in terminal tools and persistent servers/watchers in named normal background jobs.
|
|
55
|
+
- Preserve useful prompt safeguards and raise the native prompt-overhead guard to 23,000 estimated tokens.
|
|
56
|
+
- Keep deliverables out of scratch directories and avoid adopting unrelated same-named projects. Scope persistent instructions to the actual project while preserving cross-turn prompt-cache prefixes.
|
|
57
|
+
- Prevent MCP fuzzy matching from overriding built-in tool names or wire spellings, preserving built-in confirmation and parallel-safety rules.
|
|
58
|
+
|
|
59
|
+
### Validation and distribution
|
|
60
|
+
|
|
61
|
+
- Expand regressions for provider cancellation and exact TPS, both terminal interfaces, live pagers, queue submission/restart/shutdown behavior, atomic storage, tool edits, prompt variants, cache stability, and platform-specific REA behavior.
|
|
62
|
+
- Isolate test home directories and disable the real keychain during tests so placeholder provider keys cannot overwrite developer credentials.
|
|
63
|
+
- Harden CI checkout credentials and require SHA-256 evidence in the REA smoke test.
|
|
64
|
+
- Synchronize the v5 version across runtime metadata, npm lockfile, Homebrew and Scoop templates, and include this changelog in the npm package.
|
|
65
|
+
|
|
66
|
+
### Upgrade notes
|
|
67
|
+
|
|
68
|
+
- Existing configuration remains supported; legacy session history is imported automatically and retained.
|
|
69
|
+
- Queued-prompt persistence does not promise distributed exactly-once delivery across a crash between remote acceptance and local acknowledgement.
|
|
70
|
+
- TPS is omitted when exact provider usage is unavailable rather than displaying a fabricated rate.
|
|
71
|
+
- REA engine setup remains an explicit user action; platform prerequisites and limitations are documented in [REA.md](REA.md).
|
|
72
|
+
|
|
73
|
+
[Full comparison since v4.19.0](https://github.com/pentoshi007/clai/compare/v4.19.0...v5.0.0)
|
package/CONTRIBUTING.md
CHANGED
|
@@ -41,7 +41,8 @@ The tests use fixtures, isolated storage, and a mocked browser launcher; provide
|
|
|
41
41
|
| `npm run test:deterministic -- test/mcp` | Check MCP transports, tool catalogs, authentication, and concurrent credential/config storage with local fixtures. |
|
|
42
42
|
| `npm run embed-prompts:check` | Check that embedded prompts match their source Markdown. |
|
|
43
43
|
| `npm run release:verify` | Validate dependency pins, lockfile, and release metadata. |
|
|
44
|
-
| `npm run compile` | Build native release
|
|
44
|
+
| `npm run compile` | Build all six minified native release targets through Bun. |
|
|
45
|
+
| `npm run compile -- --target bun-linux-arm64` | Build one target; `--target` is repeatable and `--outdir` selects the output directory. |
|
|
45
46
|
| `npm run doctor` | Inspect available tools and provider configuration. |
|
|
46
47
|
|
|
47
48
|
To run a focused test:
|
|
@@ -90,7 +91,7 @@ Distribution manifests under `manifests/` are templates. The release workflow ge
|
|
|
90
91
|
|
|
91
92
|
For behavior changes, add or update meaningful regression coverage and run the focused tests first. Run the relevant typecheck, build, deterministic suite, terminal checks, and release validation before submitting. UI changes should cover both renderers; process and privilege changes need the platform coverage defined in CI. Run native performance checks without competing build or full-suite workloads.
|
|
92
93
|
|
|
93
|
-
For documentation-only changes, check examples against current CLI help, validate links and formatting, and check any issue-template YAML. A full local application suite is unnecessary unless the change affects code, runtime prompts, or generated artifacts.
|
|
94
|
+
For documentation-only changes, check examples against current CLI help, validate links and formatting, and check any issue-template YAML. The README preview `.github/assets/clai-opentui.svg` is rendered from the real OpenTUI interface; regenerate it with `bun run scripts/render-readme-preview.ts` after visible UI changes. A full local application suite is unnecessary unless the change affects code, runtime prompts, or generated artifacts.
|
|
94
95
|
|
|
95
96
|
CI currently covers Node 22 and 24 on Linux, Bun OpenTUI conformance, Classic on macOS, and process/privilege and MCP behavior on macOS and Windows. The [workflow](.github/workflows/ci.yml) is the source of truth for required checks. All relevant remote checks must pass.
|
|
96
97
|
|
package/PROVIDERS.md
CHANGED
|
@@ -125,9 +125,9 @@ For model choice, use `/model` or `clai model <name>`. Use the `/provider` picke
|
|
|
125
125
|
|
|
126
126
|
The `free` integration discovers free models from two gateways: `free-1/<model>` uses [OpenCode Zen](https://opencode.ai/docs/zen/), and `free-2/<model>` uses [Kilo](https://kilo.ai/docs/gateway/api-reference). Model availability can change independently at each gateway. Zen's Jev decision models use the separate System One API and are omitted from the chat model picker.
|
|
127
127
|
|
|
128
|
-
Kilo's model catalog supplies context and output limits directly. Zen
|
|
128
|
+
Kilo's model catalog supplies context and output limits directly. Zen models are discovered from the live [OpenCode provider catalog](https://models.opencode.ai/api.json): non-deprecated, zero-cost entries determine the list, including models omitted from Zen's `/models` response. Missing gateway limits come from each exact catalog entry, without per-model allowlists, context pins, or upstream model-name guesses. Values reported by the gateway take precedence. The two sources keep separate limits even when model names match; older unprefixed Zen model selections also use the discovered limits.
|
|
129
129
|
|
|
130
|
-
Discovered limits are cached for 30 minutes and retained locally for later sessions. A newly discovered Zen model ID can trigger an earlier metadata refresh; retries for unpublished limits or failed lookups have a one-minute cooldown. When discovery is unavailable, clai keeps previously learned limits
|
|
130
|
+
Discovered limits are cached for 30 minutes and retained locally for later sessions. A newly discovered Zen model ID can trigger an earlier metadata refresh; retries for unpublished limits or failed lookups have a one-minute cooldown. For Zen only, a published 200,000-token context is configured as 250,000 tokens in clai; every other published limit is used unchanged. This is a clai policy, not a guarantee that the gateway accepts more than its published limit. When discovery is unavailable, clai keeps previously learned limits; unknown Zen limits use the conservative 200,000-token default, not the upstream model table. Explicit session context overrides remain available. Use `/context` to inspect the selected session's context budget.
|
|
131
131
|
|
|
132
132
|
Agent turns retry temporary HTTP 429 failures up to four times, with visible waits of 5, 8, 10, and 15 seconds. This includes gateway responses that report an unavailable upstream endpoint. Shorter provider retry hints can shorten a wait. Standalone requests allow three retries by default.
|
|
133
133
|
|
|
@@ -208,7 +208,7 @@ Use `/usage` to inspect reported cached input and cache writes. An initial cache
|
|
|
208
208
|
- Applicable authentication, quota, rate-limit, and server failures can rotate credentials. The most recently successful credential is preferred.
|
|
209
209
|
- Cross-provider fallback is opt-in through `/fallback on`. `/freeonly on` restricts fallback by clai's configured provider categories; this filter does not determine a model's price or account bill.
|
|
210
210
|
|
|
211
|
-
Saved credentials are retained in the plaintext recovery file `~/.clai/keys.json`, with restricted POSIX permissions, and are also written to the OS keyring when available. See [configuration and privacy](
|
|
211
|
+
Saved credentials are retained in the plaintext recovery file `~/.clai/keys.json`, with restricted POSIX permissions, and are also written to the OS keyring when available. See [configuration and privacy](guides/configuration.md).
|
|
212
212
|
|
|
213
213
|
## Web search
|
|
214
214
|
|
package/REA.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# REA: Reverse Engineer Anything
|
|
2
|
+
|
|
3
|
+
clai integrates the official [morluto/rea](https://github.com/morluto/rea) project as an on-demand capability. Use `/rea` in either terminal interface to open its picker.
|
|
4
|
+
|
|
5
|
+
| Command | Effect |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| `/rea install` | Install the latest official `rea-agents` package privately for clai. |
|
|
8
|
+
| `/rea setup` | Install if needed and connect clai's managed REA server. |
|
|
9
|
+
| `/rea update` | Verify and stage the latest release without interrupting an existing analysis. |
|
|
10
|
+
| `/rea use` | Connect if necessary and insert an editable `@rea` token in your draft. |
|
|
11
|
+
| `/rea on` | Enable REA for the session without editing the draft. |
|
|
12
|
+
| `/rea off` | Stop only clai's managed REA server. |
|
|
13
|
+
| `/rea status` | Check installation, connection and maintenance state without starting a server. |
|
|
14
|
+
| `/rea reconnect` | Reconnect or adopt an update when it is safe to discard the current analysis connection. |
|
|
15
|
+
| `/rea guide` | Open the usage guide in a markdown pager: commands, how the agent uses REA, supported targets and prerequisites for your OS, permissions, resource use and troubleshooting. |
|
|
16
|
+
| `/rea engines` | Show which analysis engines (Ghidra, Hopper, IDA, Kuna) are ready on this machine and the exact command that fixes each one that is not. |
|
|
17
|
+
| `/rea engines install ghidra` | After a confirmation, download the official Ghidra release and make it usable by REA. |
|
|
18
|
+
| `/rea engines install java` | After a confirmation, install a private JDK 21 for REA's server when Java is what is missing. |
|
|
19
|
+
| `/rea engines use <engine> <location>` | Use an installation you already have: a Ghidra folder, a JDK home, the Hopper launcher, an IDA MCP registration file or a Kuna executable. |
|
|
20
|
+
| `/rea engines remove <engine>` | Forget an engine; clai asks before deleting anything it installed. |
|
|
21
|
+
| `/rea <task>` | Submit `@rea <task>`, for example `/rea inspect this Electron app`. |
|
|
22
|
+
|
|
23
|
+
`/rea` is the command that opens these options; `@rea` is the token that attaches REA to a prompt. Type `@rea` anywhere in a normal prompt. The token is highlighted in both composers, like `@mcp:` and skill mentions, and is never treated as a file (attach a file that is really named `rea` as `@./rea`). When a turn contains `@rea`, clai connects an installed REA before the model is called and gives the model the workflow and the tool index described below; if REA is not installed, the model is told to run `rea.manage action=setup`. The agent can also choose REA through `rea.manage` when the task warrants it; no manual activation is required. Installation and agent-initiated state changes use the normal permission policy. Ask/plan mode can inspect status and guidance but cannot install or change REA state.
|
|
24
|
+
|
|
25
|
+
## Installation without npm or npx
|
|
26
|
+
|
|
27
|
+
The installer uses clai's existing JavaScript runtime and HTTPS APIs; it does not invoke a shell, Homebrew, curl, PowerShell, tar, unzip, npm or npx from PATH. A compatible existing Node installation with its npm CLI is reused, looked up in this order: `CLAI_REA_NODE`, the Node that is running clai, then `node` on PATH. Otherwise clai downloads an official Node 24 LTS runtime with npm into its private installation. The native compiled clai binary therefore does not require a preinstalled Node toolchain.
|
|
28
|
+
|
|
29
|
+
A compatible Node is 22.19+, 24.15+ or 26+ (upstream REA also accepts 24.11 to 24.14, but SQLite inspection needs 24.15+ or 26+). `CLAI_REA_NODE` must point at the `node` executable and is read when REA is installed; to move an existing installation to a different Node, remove `current.json` and run `/rea setup`. Installation is cancellable with Esc from either interface, and a download is abandoned after 60 seconds without data rather than after a fixed total time, so slow links can finish.
|
|
30
|
+
|
|
31
|
+
Supported portable targets are macOS, Linux and Windows on x64/ARM64, subject to the official Node release's OS/libc support. nodejs.org does not publish Linux musl builds (Alpine), so install Node with the system package manager there. Unavailable architectures/builds produce an error that names the required Node versions and `CLAI_REA_NODE`, not an incompatible executable. Native engine support is a separate upstream constraint.
|
|
32
|
+
|
|
33
|
+
Files live under `~/.clai/tools/rea` (or `$CLAI_DATA_DIR/tools/rea`). Node archives are checked against the official SHA-256 manifest; REA/npm tarballs use registry SHA-512 integrity. npm verifies dependency integrity, lifecycle scripts are disabled, and the install uses isolated registry/config/cache settings. Package acquisition requires access to `nodejs.org` and `registry.npmjs.org` as applicable. TLS/registry checksum verification is not an independent publisher-signature guarantee.
|
|
34
|
+
|
|
35
|
+
A staged release is published only after its launcher reports the expected version, and the pointer file is replaced atomically (retrying briefly on Windows when another process holds it). Failures leave the previous release intact. Concurrent maintenance is serialized across processes and deduplicated within a process; a second clai session that waits too long is told that another session is installing. The current and previous releases are always kept so running MCP processes are not broken by an update; reconnect explicitly when ready. Releases older than that, including leftovers from interrupted installs, are removed once they are seven days old. An install takes about 250 MB with an existing Node and about 450 MB when clai also downloads one (the npm cache is shared across releases). Setup never changes Claude Code, Codex, other clients' registrations, skills, or the project's MCP configuration.
|
|
36
|
+
|
|
37
|
+
## Efficient agent use
|
|
38
|
+
|
|
39
|
+
REA is for shipped artifacts, decompilation, JavaScript/Electron applications, managed assemblies, Android, firmware, saved captures and requested runtime evidence—not ordinary source-repository reading.
|
|
40
|
+
|
|
41
|
+
Only one small `rea.manage` tool is permanently advertised. Installing does not start a server. Enabling registers `clai-rea` for the current runtime, preserves other selected MCP servers, and connects once. Repeated enables reuse the analysis. REA's tools are not added to the provider's native tool catalog; the agent calls them through `mcp.call`.
|
|
42
|
+
|
|
43
|
+
On `@rea`, on enable and on a `guide` request the model receives, once per conversation, a workflow of about 4,200 characters, an `ENGINE:` line and a version-matched index generated from the live catalog: every tool name, grouped by verb, with its required arguments, `~` where the tool accepts `detail` and `!` where it changes state or the target (about 8,300 characters for REA 6.7.0's 207 tools, bounded at 10,000). The index lets the agent call tools directly; `mcp.tools` with an exact tool name returns just that tool's full schema for optional fields and structured arguments. REA schemas are strict, so an argument a tool does not list is rejected and clai appends the accepted argument names to the error. The context is sent once per conversation: later turns that repeat `@rea` reuse it, and it is sent again, once, only if it changed (for example after you install an engine and reconnect).
|
|
44
|
+
|
|
45
|
+
So that the agent does not call tools that cannot work, clai asks REA once per connection (one `binary_session` call, about 2 seconds and 50 KB, not repeated) which tools need an open target, an analysis engine or a missing prerequisite, and marks the index: `#` acts on the binary opened by `open_binary` and takes no path, `^` also needs an analysis engine, `%` is unavailable on this machine. The `ENGINE:` line says which engines are ready. When a call still fails, clai replaces REA's long machine-readable error with a short instruction: pass no `path` to a `#` tool and call `open_binary` first; thin a universal Mach-O to one slice with `lipo` before Ghidra or Kuna can read it; or, when no engine is ready, do not retry and tell the user to run `/rea engines`. If the availability report cannot be read, the plain index is used. Repeating `enable` on a live connection returns it again on request, without restarting anything. The always-advertised `rea.manage` description is kept to about 450 characters because it is sent with every request. The long human-oriented usage guide is shown only by `/rea guide` and is never sent to the model. Version-matched detailed workflow references remain on disk for focused reading. Prefer summaries, retained Evidence IDs, selected fields and bounded pages instead of repeating analysis or requesting full results. A host timeout does not establish that server work stopped: inspect state/Evidence before retrying. Inspect the actual current schema or returned remediation rather than guessing arguments or reinstalling.
|
|
46
|
+
|
|
47
|
+
REA activation never rewrites the stable system prompt, native tool schemas, or prior messages. State and workflow changes enter the append-only conversation context. Cache-prefix regression tests cover installation, activation, discovery, calls, update, reconnect, disable and subsequent composer selection in both native/text tool modes and multiple provider wire formats. Provider cache eviction, compaction and switching providers/models remain independent of this guarantee.
|
|
48
|
+
|
|
49
|
+
## Analysis engines
|
|
50
|
+
|
|
51
|
+
Static JavaScript and Electron inspection, managed (.NET) assemblies, archives, Mach-O headers, plists, signatures and metadata need no engine. Native decompilation (procedures, pseudocode, strings, cross-references, assembly) needs one of Ghidra, Hopper, IDA or Kuna, and REA does not ship any of them.
|
|
52
|
+
|
|
53
|
+
Engines are installed by you, never by the agent. `/rea engines` shows what is ready and what to run, and `/rea setup` points at it when it connects REA with no engine ready. `install` shows what it will download and where it will write (press `ctrl+o` for the full plan), asks for confirmation, shows progress and can be cancelled with Esc; `remove` asks before deleting anything clai installed, reconnects REA first so nothing is still using the files, refuses while a turn is running with REA connected, and says so if a folder could not be deleted (on Windows a folder that REA's Ghidra has open can be neither moved nor removed). The agent's workflow tells it not to install or configure an engine and to send you to `/rea engines` instead, and `rea.manage` has no engine action. Only one engine operation runs at a time. If REA is connected and idle when an install finishes, clai reconnects it so the new engine is used straight away; the engine is verified with REA before the install is reported as done.
|
|
54
|
+
|
|
55
|
+
| System | `install ghidra` | `install java` |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| macOS arm64 and x64 | Yes. Ghidra does not ship a macOS decompiler, so clai builds it once (one to three minutes; needs the Xcode Command Line Tools). | Yes |
|
|
58
|
+
| Linux x64 | Yes; the decompiler is in the download. | Yes (glibc) |
|
|
59
|
+
| Linux arm64 | Yes; builds the decompiler once (needs make, g++ and bison). | Yes (glibc) |
|
|
60
|
+
| Windows x64 | Yes; the decompiler is in the download. REA's Windows Ghidra support is experimental upstream. | Yes |
|
|
61
|
+
| Anything else (Windows arm64, Alpine and other musl Linux, 32-bit) | Not offered; `/rea engines` says so and why. Use `/rea engines use ghidra <folder>` with your own installation. | Not offered for musl; use `/rea engines use java <JDK home>` |
|
|
62
|
+
|
|
63
|
+
Hopper is a commercial macOS and Linux application and Kuna is not available on Windows; clai does not install either. IDA needs your own installation and an MCP registration file. These are connected with `/rea engines use`. Android, firmware, capture and similar tools (JADX, apktool, binwalk, tshark and others) have their own prerequisites; `/rea engines` lists the ones that block tools on your machine with the fix REA reports, and clai does not install them.
|
|
64
|
+
|
|
65
|
+
What `install ghidra` does:
|
|
66
|
+
|
|
67
|
+
- Resolves the newest Ghidra 12.1.x release on GitHub (the series REA 6.7.0 needs) and refuses to continue unless GitHub publishes a SHA-256 for the download. Downloads are HTTPS only, limited to `github.com`, `*.githubusercontent.com`, `api.github.com` and `api.adoptium.net`, with every redirect re-checked, a size limit and a 60-second stall guard.
|
|
68
|
+
- Checks free disk space first (about 570 MB to download, 1.6 GB while installing and 900 MB afterwards), extracts the archive itself (no `unzip`), and rejects absolute paths, `..`, symlinks, encrypted or ZIP64 entries and checksum mismatches.
|
|
69
|
+
- Builds the native decompiler where needed with `make` using at most four jobs, with a 30-minute limit. It checks for the build tools before downloading anything and tells you what to install.
|
|
70
|
+
- Stages everything in a temporary folder, moves it into `~/.clai/tools/ghidra/<version>` only when it is complete, then asks REA whether Ghidra is usable. A failed or cancelled install leaves nothing behind and keeps the previous version; after a successful one, older versions that clai installed are removed.
|
|
71
|
+
|
|
72
|
+
Ghidra also needs a JDK 21 or newer. `install ghidra` does not change your system Java: if REA reports that Java is missing or too old, clai offers `install java`, which puts Eclipse Temurin 21 (about 200 MB, SHA-256 verified) in `~/.clai/tools/jdk/` and uses it for REA's server only.
|
|
73
|
+
|
|
74
|
+
Settings live in `~/.clai/tools/rea/engines.json` (mode 0600; `$CLAI_DATA_DIR/tools/rea` if set). They are passed to REA's server as `GHIDRA_INSTALL_DIR`, `JAVA_HOME`, `HOPPER_LAUNCHER_PATH`, `REA_IDA_MCP_CONFIG` and `REA_KUNA_COMMAND`; a choice made with `/rea engines` takes precedence over the same variable in your own environment, for REA's server only (your shell is untouched), and `/rea engines remove` hands control back to your environment. Variables you have not set through `/rea engines` are passed through unchanged. Reconnect REA (`/rea reconnect`) after changing them yourself.
|
|
75
|
+
|
|
76
|
+
Ghidra and Kuna cannot open universal (fat) Mach-O files such as most system binaries on macOS. The agent is told to thin one slice into the session scratch directory with `lipo <file> -thin <arch> -output <scratch>/<name>-<arch>` (`llvm-lipo` when `lipo` is missing) and open that. Hopper opens universal files directly.
|
|
77
|
+
|
|
78
|
+
## Limits
|
|
79
|
+
|
|
80
|
+
clai does not execute the target. On Linux, owned-process analysis needs a procps-compatible `ps`. The agent follows the selected tool's actual prerequisite or remediation and continues with supported work.
|
|
81
|
+
|
|
82
|
+
Portable archives and failure cases have deterministic cross-platform fixtures. The implementation was live-tested on Linux ARM64 with REA 6.7.0 and portable Node/npm, including a standalone compiled integration smoke with no system executables on PATH. That smoke bootstrapped Node 24.22.0, discovered 207 tools, performed a digest-bound static analysis and disabled the server without removing the installation.
|
|
83
|
+
|
|
84
|
+
The engine installers were run for real on freshly provisioned GitHub-hosted machines: Linux x64 and arm64, Windows x64, macOS arm64 and macOS Intel. Each one already exported its own Java (17 on Linux and Windows, 21 on macOS) and had no engine. On each, the shipped code installed Temurin 21 and Ghidra 12.1.4, REA reported Ghidra ready, and `open_binary`, `list_procedures`, `search_procedures` and `procedure_pseudo_code` returned decompiled code for a real system binary (an ELF `ls`, Windows' `whoami.exe`, a thinned Mach-O `ls`). Timings on GitHub's network, where the 543 MB download is quick; on a home connection the download dominates:
|
|
85
|
+
|
|
86
|
+
| Machine | JDK | Ghidra | Decompiler |
|
|
87
|
+
| --- | --- | --- | --- |
|
|
88
|
+
| Linux x64 | 4 s | 11 s | in the download |
|
|
89
|
+
| Linux arm64 | 3 s | 53 s | built (make, g++ and bison were present) |
|
|
90
|
+
| macOS arm64 | 5 s | 73 s | built |
|
|
91
|
+
| macOS Intel | 10 s | 184 s | built |
|
|
92
|
+
| Windows x64 | 5 s | 18 s | in the download |
|
|
93
|
+
|
|
94
|
+
The JDK takes 310 to 345 MB on disk and Ghidra 864 to 877 MB. The whole check on each machine, REA's own installation included, stayed under 500 MB of memory in clai's process; measured on its own on macOS arm64, the Ghidra install peaked at about 260 MB and used about 33 seconds of CPU. An Alpine container and a Windows 11 ARM machine report themselves as unsupported with the reason; nothing is downloaded there.
|
|
95
|
+
|
|
96
|
+
Not exercised live: Hopper, IDA and Kuna, the interactive install dialogs on Windows terminals (they run the same code as the macOS ones, which were driven through a pseudo-terminal), and the unauthenticated GitHub API limit (60 requests per hour per address, which clai explains when it is hit).
|