@pentoshi/clai 4.12.1 → 4.13.1
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/CODE_OF_CONDUCT.md +132 -0
- package/CONTRIBUTING.md +102 -0
- package/PROVIDERS.md +149 -0
- package/README.md +217 -464
- package/SECURITY.md +33 -0
- package/dist/agent/compaction/summary-execution.js +2 -2
- package/dist/agent/compaction/summary-execution.js.map +1 -1
- package/dist/agent/compaction-summary.d.ts +5 -2
- package/dist/agent/compaction-summary.js +10 -4
- package/dist/agent/compaction-summary.js.map +1 -1
- package/dist/agent/context/compact-with-summary.d.ts +1 -0
- package/dist/agent/context/compact-with-summary.js +25 -3
- package/dist/agent/context/compact-with-summary.js.map +1 -1
- package/dist/agent/context/compaction-recent-history.d.ts +12 -0
- package/dist/agent/context/compaction-recent-history.js +114 -0
- package/dist/agent/context/compaction-recent-history.js.map +1 -0
- package/dist/agent/context/user-credentials.d.ts +1 -0
- package/dist/agent/context/user-credentials.js +3 -0
- package/dist/agent/context/user-credentials.js.map +1 -1
- package/dist/agent/context-manager.js +2 -1
- package/dist/agent/context-manager.js.map +1 -1
- package/dist/agent/evidence/task-classification.js +2 -5
- package/dist/agent/evidence/task-classification.js.map +1 -1
- package/dist/agent/loop-guard.js +1 -5
- package/dist/agent/loop-guard.js.map +1 -1
- package/dist/agent/outcomes.js +9 -1
- package/dist/agent/outcomes.js.map +1 -1
- package/dist/agent/parser/arg-formatting.js +3 -16
- package/dist/agent/parser/arg-formatting.js.map +1 -1
- package/dist/agent/parser/bare-recognition.js +12 -6
- package/dist/agent/parser/bare-recognition.js.map +1 -1
- package/dist/agent/parser/xml-protocol.js +0 -2
- package/dist/agent/parser/xml-protocol.js.map +1 -1
- package/dist/agent/plan-implement-compact.js +2 -1
- package/dist/agent/plan-implement-compact.js.map +1 -1
- package/dist/agent/request-budget.d.ts +1 -0
- package/dist/agent/request-budget.js +6 -1
- package/dist/agent/request-budget.js.map +1 -1
- package/dist/agent/runner.js +2 -2
- package/dist/agent/runner.js.map +1 -1
- package/dist/agent/session-policy.d.ts +1 -0
- package/dist/agent/session-policy.js +1 -4
- package/dist/agent/session-policy.js.map +1 -1
- package/dist/agent/subagents/manager.d.ts +5 -1
- package/dist/agent/subagents/manager.js +95 -15
- package/dist/agent/subagents/manager.js.map +1 -1
- package/dist/agent/subagents/read-only-tools.js +44 -20
- package/dist/agent/subagents/read-only-tools.js.map +1 -1
- package/dist/agent/subagents/tools.d.ts +8 -1
- package/dist/agent/subagents/tools.js +21 -13
- package/dist/agent/subagents/tools.js.map +1 -1
- package/dist/agent/subagents/types.d.ts +7 -0
- package/dist/agent/subagents/worker.js +48 -7
- package/dist/agent/subagents/worker.js.map +1 -1
- package/dist/agent/task-evidence.js +2 -11
- package/dist/agent/task-evidence.js.map +1 -1
- package/dist/agent/tool-output-formatting.js +8 -2
- package/dist/agent/tool-output-formatting.js.map +1 -1
- package/dist/agent/turn/automatic-compaction-execution.js +1 -0
- package/dist/agent/turn/automatic-compaction-execution.js.map +1 -1
- package/dist/agent/turn/compaction-coordinator.js +4 -4
- package/dist/agent/turn/compaction-coordinator.js.map +1 -1
- package/dist/agent/turn/compaction-replay-selection.js +1 -0
- package/dist/agent/turn/compaction-replay-selection.js.map +1 -1
- package/dist/agent/turn/loop/run-rounds.js +11 -3
- package/dist/agent/turn/loop/run-rounds.js.map +1 -1
- package/dist/agent/turn/prompt-sections.js +4 -9
- package/dist/agent/turn/prompt-sections.js.map +1 -1
- package/dist/agent/turn/setup/turn-messages.js +2 -1
- package/dist/agent/turn/setup/turn-messages.js.map +1 -1
- package/dist/agent/turn/subagent-inbox.d.ts +5 -5
- package/dist/agent/turn/subagent-inbox.js +90 -11
- package/dist/agent/turn/subagent-inbox.js.map +1 -1
- package/dist/agent/turn/system-sections.d.ts +1 -0
- package/dist/agent/turn/system-sections.js +1 -1
- package/dist/agent/turn/system-sections.js.map +1 -1
- package/dist/agent/turn/task-autostart.js +2 -0
- package/dist/agent/turn/task-autostart.js.map +1 -1
- package/dist/agent/turn/tool-execution/single-tool.js +1 -3
- package/dist/agent/turn/tool-execution/single-tool.js.map +1 -1
- package/dist/agent/turn/tool-result-recorder.js +5 -0
- package/dist/agent/turn/tool-result-recorder.js.map +1 -1
- package/dist/agent/turn/tool-routing.d.ts +1 -1
- package/dist/agent/turn/tool-routing.js +11 -11
- package/dist/agent/turn/tool-routing.js.map +1 -1
- package/dist/agent/workspace-orient.js +2 -2
- package/dist/agent/workspace-orient.js.map +1 -1
- package/dist/app/adapters/agent-event-adapter.js +5 -0
- package/dist/app/adapters/agent-event-adapter.js.map +1 -1
- package/dist/app/adapters/current-store-adapter.js +2 -2
- package/dist/app/adapters/current-store-adapter.js.map +1 -1
- package/dist/app/commands/catalog.js +2 -0
- 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-compact-helper.js +1 -0
- 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 +58 -10
- package/dist/app/controllers/session-controller.js.map +1 -1
- package/dist/app/controllers/session-naming.d.ts +4 -5
- package/dist/app/controllers/session-naming.js +38 -80
- package/dist/app/controllers/session-naming.js.map +1 -1
- package/dist/app/controllers/session-prompt-history.d.ts +4 -0
- package/dist/app/controllers/session-prompt-history.js +33 -0
- package/dist/app/controllers/session-prompt-history.js.map +1 -0
- package/dist/app/controllers/session-prompt-queue.d.ts +1 -0
- package/dist/app/controllers/session-prompt-queue.js +1 -1
- package/dist/app/controllers/session-prompt-queue.js.map +1 -1
- package/dist/app/events/artifact-output.d.ts +1 -0
- package/dist/app/events/artifact-output.js +32 -0
- package/dist/app/events/artifact-output.js.map +1 -0
- package/dist/app/events/event-buffer.d.ts +13 -1
- package/dist/app/events/event-buffer.js +92 -4
- package/dist/app/events/event-buffer.js.map +1 -1
- package/dist/app/operation-review.js +1 -1
- package/dist/app/operation-review.js.map +1 -1
- package/dist/app/ports/persistence-port.d.ts +2 -1
- package/dist/classic/app/ClassicApp.js +33 -2
- package/dist/classic/app/ClassicApp.js.map +1 -1
- package/dist/classic/app/action-handlers.js +0 -2
- package/dist/classic/app/action-handlers.js.map +1 -1
- package/dist/classic/app/app-wiring.d.ts +1 -2
- package/dist/classic/app/app-wiring.js +1 -8
- package/dist/classic/app/app-wiring.js.map +1 -1
- package/dist/classic/app/wiring-interactions.d.ts +0 -2
- package/dist/classic/app/wiring-interactions.js +5 -13
- package/dist/classic/app/wiring-interactions.js.map +1 -1
- package/dist/classic/app/wiring-types.d.ts +2 -2
- package/dist/classic/blocks/batch-lines.js +10 -8
- package/dist/classic/blocks/batch-lines.js.map +1 -1
- package/dist/classic/blocks/block-context.d.ts +1 -0
- package/dist/classic/blocks/block-context.js.map +1 -1
- package/dist/classic/blocks/tool-lines.js +20 -39
- package/dist/classic/blocks/tool-lines.js.map +1 -1
- package/dist/classic/bootstrap/renderer-handle.d.ts +5 -1
- package/dist/classic/bootstrap/renderer-handle.js.map +1 -1
- package/dist/classic/bootstrap/start-classic.js +12 -12
- package/dist/classic/bootstrap/start-classic.js.map +1 -1
- package/dist/classic/chrome/context-limit-editor.d.ts +7 -0
- package/dist/classic/chrome/context-limit-editor.js +5 -0
- package/dist/classic/chrome/context-limit-editor.js.map +1 -1
- package/dist/classic/chrome/status-rows.d.ts +4 -0
- package/dist/classic/chrome/status-rows.js +11 -0
- package/dist/classic/chrome/status-rows.js.map +1 -1
- package/dist/classic/feed/feed-blocks.d.ts +1 -1
- package/dist/classic/feed/feed-blocks.js +13 -6
- package/dist/classic/feed/feed-blocks.js.map +1 -1
- package/dist/classic/panels/keys-panel.js +12 -3
- package/dist/classic/panels/keys-panel.js.map +1 -1
- package/dist/classic/panels/pager-panel.js +0 -6
- package/dist/classic/panels/pager-panel.js.map +1 -1
- package/dist/classic/panels/pager-source-controller.d.ts +34 -0
- package/dist/classic/panels/pager-source-controller.js +209 -0
- package/dist/classic/panels/pager-source-controller.js.map +1 -0
- package/dist/classic/panels/panel-controller.d.ts +1 -5
- package/dist/classic/panels/panel-controller.js +19 -88
- package/dist/classic/panels/panel-controller.js.map +1 -1
- package/dist/classic/panels/panel-effect.d.ts +0 -4
- package/dist/classic/panels/panel-effect.js.map +1 -1
- package/dist/classic/panels/panel-effects.js +0 -6
- package/dist/classic/panels/panel-effects.js.map +1 -1
- package/dist/classic/panels/panel-types.d.ts +0 -2
- package/dist/classic/panels/picker-panel.js +1 -1
- package/dist/classic/panels/picker-panel.js.map +1 -1
- package/dist/commands/providers.d.ts +1 -0
- package/dist/commands/providers.js +1 -0
- package/dist/commands/providers.js.map +1 -1
- package/dist/commands/qoder.d.ts +8 -0
- package/dist/commands/qoder.js +85 -0
- package/dist/commands/qoder.js.map +1 -0
- package/dist/index.js +19 -15
- package/dist/index.js.map +1 -1
- package/dist/interactive-session/transport-node-pty.js +3 -5
- package/dist/interactive-session/transport-node-pty.js.map +1 -1
- package/dist/llm/capability/state.d.ts +1 -1
- package/dist/llm/capability/tool-dialect.js +1 -0
- package/dist/llm/capability/tool-dialect.js.map +1 -1
- package/dist/llm/capability/vision-patterns.js +1 -0
- package/dist/llm/capability/vision-patterns.js.map +1 -1
- package/dist/llm/context-windows.js +2 -3
- package/dist/llm/context-windows.js.map +1 -1
- package/dist/llm/provider-identity.js +5 -0
- package/dist/llm/provider-identity.js.map +1 -1
- package/dist/llm/provider-info-text.js +25 -0
- package/dist/llm/provider-info-text.js.map +1 -1
- package/dist/llm/qoder/qoder-accounts.d.ts +9 -0
- package/dist/llm/qoder/qoder-accounts.js +53 -0
- package/dist/llm/qoder/qoder-accounts.js.map +1 -0
- package/dist/llm/qoder/qoder-auth.d.ts +59 -0
- package/dist/llm/qoder/qoder-auth.js +203 -0
- package/dist/llm/qoder/qoder-auth.js.map +1 -0
- package/dist/llm/qoder/qoder-credential.d.ts +31 -0
- package/dist/llm/qoder/qoder-credential.js +82 -0
- package/dist/llm/qoder/qoder-credential.js.map +1 -0
- package/dist/llm/qoder/qoder-login.d.ts +28 -0
- package/dist/llm/qoder/qoder-login.js +153 -0
- package/dist/llm/qoder/qoder-login.js.map +1 -0
- package/dist/llm/qoder/qoder-refresh.d.ts +4 -0
- package/dist/llm/qoder/qoder-refresh.js +165 -0
- package/dist/llm/qoder/qoder-refresh.js.map +1 -0
- package/dist/llm/qoder/qoder-signer.d.ts +66 -0
- package/dist/llm/qoder/qoder-signer.js +119 -0
- package/dist/llm/qoder/qoder-signer.js.map +1 -0
- package/dist/llm/qoder/qoder.d.ts +20 -0
- package/dist/llm/qoder/qoder.js +441 -0
- package/dist/llm/qoder/qoder.js.map +1 -0
- package/dist/llm/qoder/signer-glue.generated.d.ts +1 -0
- package/dist/llm/qoder/signer-glue.generated.js +4 -0
- package/dist/llm/qoder/signer-glue.generated.js.map +1 -0
- package/dist/llm/qoder/signer-wasm.generated.d.ts +3 -0
- package/dist/llm/qoder/signer-wasm.generated.js +6 -0
- package/dist/llm/qoder/signer-wasm.generated.js.map +1 -0
- package/dist/llm/reasoning-capability.js +1 -0
- package/dist/llm/reasoning-capability.js.map +1 -1
- package/dist/llm/routing/attempt-complete.js +4 -2
- package/dist/llm/routing/attempt-complete.js.map +1 -1
- package/dist/llm/routing/attempt-request.d.ts +2 -1
- package/dist/llm/routing/attempt-request.js +35 -1
- package/dist/llm/routing/attempt-request.js.map +1 -1
- package/dist/llm/routing/attempt-stream.js +4 -2
- package/dist/llm/routing/attempt-stream.js.map +1 -1
- package/dist/llm/routing/provider-selection.js +3 -0
- package/dist/llm/routing/provider-selection.js.map +1 -1
- package/dist/llm/tool-protocol.js +6 -0
- package/dist/llm/tool-protocol.js.map +1 -1
- package/dist/llm/wire/reasoning-payload.d.ts +1 -1
- package/dist/llm/wire/reasoning-payload.js +6 -0
- package/dist/llm/wire/reasoning-payload.js.map +1 -1
- package/dist/modes/ask.js +26 -10
- package/dist/modes/ask.js.map +1 -1
- package/dist/noninteractive/stream-blocks.d.ts +2 -4
- package/dist/noninteractive/stream-blocks.js +5 -5
- package/dist/noninteractive/stream-blocks.js.map +1 -1
- package/dist/noninteractive/stream-renderer.js +1 -1
- package/dist/noninteractive/stream-renderer.js.map +1 -1
- package/dist/prompts/embedded.js +2 -2
- package/dist/prompts/embedded.js.map +1 -1
- package/dist/prompts/index.d.ts +3 -1
- package/dist/prompts/index.js +25 -9
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/system.agent.md +11 -11
- package/dist/prompts/system.ask.md +5 -3
- package/dist/safety/shell-command-words.d.ts +11 -0
- package/dist/safety/shell-command-words.js +193 -0
- package/dist/safety/shell-command-words.js.map +1 -0
- package/dist/safety/shell-filesystem-effects.js +46 -40
- package/dist/safety/shell-filesystem-effects.js.map +1 -1
- package/dist/safety/tool-classification.js +0 -14
- package/dist/safety/tool-classification.js.map +1 -1
- package/dist/session-runtime/binding.js +4 -1
- package/dist/session-runtime/binding.js.map +1 -1
- package/dist/session-runtime/client.js +111 -7
- package/dist/session-runtime/client.js.map +1 -1
- package/dist/session-runtime/discovery.d.ts +1 -1
- package/dist/session-runtime/discovery.js +2 -2
- package/dist/session-runtime/discovery.js.map +1 -1
- package/dist/session-runtime/host.d.ts +10 -2
- package/dist/session-runtime/host.js +206 -83
- package/dist/session-runtime/host.js.map +1 -1
- package/dist/session-runtime/input-commands.d.ts +2 -0
- package/dist/session-runtime/input-commands.js +11 -0
- package/dist/session-runtime/input-commands.js.map +1 -0
- package/dist/session-runtime/input-stream.d.ts +15 -0
- package/dist/session-runtime/input-stream.js +128 -0
- package/dist/session-runtime/input-stream.js.map +1 -0
- package/dist/session-runtime/types.d.ts +9 -0
- package/dist/store/config.js +1 -0
- package/dist/store/config.js.map +1 -1
- package/dist/store/history/freshness.d.ts +9 -0
- package/dist/store/history/freshness.js +29 -0
- package/dist/store/history/freshness.js.map +1 -0
- package/dist/store/history/jsonl-backend.js +2 -16
- package/dist/store/history/jsonl-backend.js.map +1 -1
- package/dist/store/history/lifecycle.js +6 -2
- package/dist/store/history/lifecycle.js.map +1 -1
- package/dist/store/history/recovery.d.ts +1 -3
- package/dist/store/history/recovery.js +72 -111
- package/dist/store/history/recovery.js.map +1 -1
- package/dist/store/history/session-queries.js +5 -5
- package/dist/store/history/session-queries.js.map +1 -1
- package/dist/store/history-index.d.ts +5 -0
- package/dist/store/history-index.js +41 -9
- package/dist/store/history-index.js.map +1 -1
- package/dist/store/history.d.ts +7 -2
- package/dist/store/history.js +13 -7
- package/dist/store/history.js.map +1 -1
- package/dist/store/rtk-usage.d.ts +2 -0
- package/dist/store/rtk-usage.js +44 -0
- package/dist/store/rtk-usage.js.map +1 -0
- package/dist/store/session-prompts-format.d.ts +2 -0
- package/dist/store/session-prompts-format.js +29 -0
- package/dist/store/session-prompts-format.js.map +1 -0
- package/dist/store/session-prompts.d.ts +40 -0
- package/dist/store/session-prompts.js +213 -0
- package/dist/store/session-prompts.js.map +1 -0
- package/dist/store/subagents.d.ts +5 -1
- package/dist/store/subagents.js +64 -4
- package/dist/store/subagents.js.map +1 -1
- package/dist/tools/call-normalization.js +0 -3
- package/dist/tools/call-normalization.js.map +1 -1
- package/dist/tools/definitions/aggregate.js +0 -4
- package/dist/tools/definitions/aggregate.js.map +1 -1
- package/dist/tools/definitions/define.js +0 -3
- package/dist/tools/definitions/define.js.map +1 -1
- package/dist/tools/definitions/files.js +3 -111
- package/dist/tools/definitions/files.js.map +1 -1
- package/dist/tools/definitions/fs-read.d.ts +3 -0
- package/dist/tools/definitions/fs-read.js +43 -0
- package/dist/tools/definitions/fs-read.js.map +1 -0
- package/dist/tools/definitions/selection.js +0 -45
- package/dist/tools/definitions/selection.js.map +1 -1
- package/dist/tools/fs/read-budget.d.ts +8 -0
- package/dist/tools/fs/read-budget.js +30 -0
- package/dist/tools/fs/read-budget.js.map +1 -0
- package/dist/tools/fs/read-input.d.ts +16 -0
- package/dist/tools/fs/read-input.js +73 -0
- package/dist/tools/fs/read-input.js.map +1 -0
- package/dist/tools/fs/read-many.d.ts +6 -0
- package/dist/tools/fs/read-many.js +50 -0
- package/dist/tools/fs/read-many.js.map +1 -0
- package/dist/tools/fs/read-sections.d.ts +11 -0
- package/dist/tools/fs/read-sections.js +71 -0
- package/dist/tools/fs/read-sections.js.map +1 -0
- package/dist/tools/fs/read-window.d.ts +1 -1
- package/dist/tools/fs/read-window.js +57 -25
- package/dist/tools/fs/read-window.js.map +1 -1
- package/dist/tools/fs/read.d.ts +0 -4
- package/dist/tools/fs/read.js +34 -17
- package/dist/tools/fs/read.js.map +1 -1
- package/dist/tools/fs.d.ts +2 -2
- package/dist/tools/fs.js +1 -2
- package/dist/tools/fs.js.map +1 -1
- package/dist/tools/handlers/files-1.js +11 -35
- package/dist/tools/handlers/files-1.js.map +1 -1
- package/dist/tools/handlers/files-2.js.map +1 -1
- package/dist/tools/handlers/shell-1.js +8 -2
- package/dist/tools/handlers/shell-1.js.map +1 -1
- package/dist/tools/jobs/types.d.ts +3 -0
- package/dist/tools/jobs.js +8 -1
- package/dist/tools/jobs.js.map +1 -1
- package/dist/tools/read-only-shell.d.ts +2 -0
- package/dist/tools/read-only-shell.js +65 -0
- package/dist/tools/read-only-shell.js.map +1 -0
- package/dist/tools/registry.js +0 -9
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/retired-tools.js +1 -1
- package/dist/tools/retired-tools.js.map +1 -1
- package/dist/tools/rtk/rewrite.d.ts +3 -2
- package/dist/tools/rtk/rewrite.js +4 -5
- package/dist/tools/rtk/rewrite.js.map +1 -1
- package/dist/tools/shell/exec-attempt.js +1 -0
- package/dist/tools/shell/exec-attempt.js.map +1 -1
- package/dist/tools/shell/spawn-argv.js +1 -1
- package/dist/tools/shell/spawn-argv.js.map +1 -1
- package/dist/tools/shell.d.ts +1 -0
- package/dist/tools/shell.js.map +1 -1
- package/dist/tui-v2/bootstrap/start-tui-v2.js +0 -2
- package/dist/tui-v2/bootstrap/start-tui-v2.js.map +1 -1
- package/dist/tui-v2/components/modal/keys-modal.js +42 -6
- package/dist/tui-v2/components/modal/keys-modal.js.map +1 -1
- package/dist/tui-v2/components/pager/pager.js +36 -58
- package/dist/tui-v2/components/pager/pager.js.map +1 -1
- package/dist/tui-v2/components/transcript/tool-card.js +21 -19
- package/dist/tui-v2/components/transcript/tool-card.js.map +1 -1
- package/dist/tui-v2/components/transcript/transcript-view.js +24 -21
- package/dist/tui-v2/components/transcript/transcript-view.js.map +1 -1
- package/dist/tui-v2/components/transcript/use-transcript-selection.d.ts +1 -0
- package/dist/tui-v2/components/transcript/use-transcript-selection.js +12 -1
- package/dist/tui-v2/components/transcript/use-transcript-selection.js.map +1 -1
- package/dist/types.d.ts +16 -1
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -1
- package/dist/ui/mentions/expand.js +1 -1
- package/dist/ui-core/actions/action-id.d.ts +1 -1
- package/dist/ui-core/actions/action-id.js +0 -2
- package/dist/ui-core/actions/action-id.js.map +1 -1
- package/dist/ui-core/actions/format-shortcuts.js +0 -2
- package/dist/ui-core/actions/format-shortcuts.js.map +1 -1
- package/dist/ui-core/actions/keymap.js +0 -6
- package/dist/ui-core/actions/keymap.js.map +1 -1
- package/dist/ui-core/bootstrap/composition-root.d.ts +0 -3
- package/dist/ui-core/bootstrap/composition-root.js +0 -8
- package/dist/ui-core/bootstrap/composition-root.js.map +1 -1
- package/dist/ui-core/bootstrap/session-resume.d.ts +5 -0
- package/dist/ui-core/bootstrap/session-resume.js +13 -35
- package/dist/ui-core/bootstrap/session-resume.js.map +1 -1
- package/dist/ui-core/commands/command-handlers.js +3 -1
- package/dist/ui-core/commands/command-handlers.js.map +1 -1
- package/dist/ui-core/commands/config-commands.js +5 -1
- package/dist/ui-core/commands/config-commands.js.map +1 -1
- package/dist/ui-core/commands/key-commands.js +50 -30
- package/dist/ui-core/commands/key-commands.js.map +1 -1
- package/dist/ui-core/commands/keys/auth-picker.d.ts +3 -0
- package/dist/ui-core/commands/keys/auth-picker.js +29 -0
- package/dist/ui-core/commands/keys/auth-picker.js.map +1 -0
- package/dist/ui-core/commands/keys/qoder.d.ts +4 -0
- package/dist/ui-core/commands/keys/qoder.js +194 -0
- package/dist/ui-core/commands/keys/qoder.js.map +1 -0
- package/dist/ui-core/commands/picker-commands.js +19 -1
- package/dist/ui-core/commands/picker-commands.js.map +1 -1
- package/dist/ui-core/commands/prompt-commands.d.ts +2 -0
- package/dist/ui-core/commands/prompt-commands.js +10 -0
- package/dist/ui-core/commands/prompt-commands.js.map +1 -0
- package/dist/ui-core/commands/rtk-commands.js +35 -16
- package/dist/ui-core/commands/rtk-commands.js.map +1 -1
- package/dist/ui-core/commands/session-commands.js +13 -5
- package/dist/ui-core/commands/session-commands.js.map +1 -1
- package/dist/ui-core/controllers/overlay-controller.d.ts +7 -0
- package/dist/ui-core/controllers/overlay-controller.js +6 -0
- package/dist/ui-core/controllers/overlay-controller.js.map +1 -1
- package/dist/ui-core/rendering/batch-sections.d.ts +1 -1
- package/dist/ui-core/rendering/batch-sections.js +18 -4
- package/dist/ui-core/rendering/batch-sections.js.map +1 -1
- package/dist/ui-core/rendering/duration.js +1 -1
- package/dist/ui-core/rendering/duration.js.map +1 -1
- package/dist/ui-core/rendering/open-tool-output.js +4 -1
- package/dist/ui-core/rendering/open-tool-output.js.map +1 -1
- package/dist/ui-core/rendering/pager-source.js +3 -0
- package/dist/ui-core/rendering/pager-source.js.map +1 -1
- package/dist/ui-core/rendering/pager-text.js +3 -0
- package/dist/ui-core/rendering/pager-text.js.map +1 -1
- package/dist/ui-core/rendering/pager-view-policy.js +4 -2
- package/dist/ui-core/rendering/pager-view-policy.js.map +1 -1
- package/dist/ui-core/rendering/session-prompts-pager-source.d.ts +3 -0
- package/dist/ui-core/rendering/session-prompts-pager-source.js +40 -0
- package/dist/ui-core/rendering/session-prompts-pager-source.js.map +1 -0
- package/dist/ui-core/rendering/subagent-source.d.ts +1 -1
- package/dist/ui-core/rendering/subagent-source.js +37 -1
- package/dist/ui-core/rendering/subagent-source.js.map +1 -1
- package/dist/ui-core/rendering/text-width.d.ts +1 -0
- package/dist/ui-core/rendering/text-width.js +31 -0
- package/dist/ui-core/rendering/text-width.js.map +1 -1
- package/dist/ui-core/rendering/tool-presenter.d.ts +9 -4
- package/dist/ui-core/rendering/tool-presenter.js +43 -91
- package/dist/ui-core/rendering/tool-presenter.js.map +1 -1
- package/dist/ui-core/state/transcript-store.js +7 -2
- package/dist/ui-core/state/transcript-store.js.map +1 -1
- package/dist/ui-core/state/transcript-types.d.ts +1 -1
- package/dist/ui-core/state/transcript-types.js +4 -2
- package/dist/ui-core/state/transcript-types.js.map +1 -1
- package/dist/version.generated.d.ts +2 -2
- package/dist/version.generated.js +2 -2
- package/package.json +8 -3
- package/dist/agent/turn/pentest-tools.d.ts +0 -3
- package/dist/agent/turn/pentest-tools.js +0 -17
- package/dist/agent/turn/pentest-tools.js.map +0 -1
- package/dist/classic/bootstrap/suspend-port.d.ts +0 -14
- package/dist/classic/bootstrap/suspend-port.js +0 -29
- package/dist/classic/bootstrap/suspend-port.js.map +0 -1
- package/dist/tools/capabilities.d.ts +0 -12
- package/dist/tools/capabilities.js +0 -225
- package/dist/tools/capabilities.js.map +0 -1
- package/dist/tools/definitions/network.d.ts +0 -2
- package/dist/tools/definitions/network.js +0 -17
- package/dist/tools/definitions/network.js.map +0 -1
- package/dist/tools/definitions/orchestration.d.ts +0 -2
- package/dist/tools/definitions/orchestration.js +0 -27
- package/dist/tools/definitions/orchestration.js.map +0 -1
- package/dist/tools/fs/search.d.ts +0 -32
- package/dist/tools/fs/search.js +0 -431
- package/dist/tools/fs/search.js.map +0 -1
- package/dist/tools/handlers/network-3.d.ts +0 -2
- package/dist/tools/handlers/network-3.js +0 -13
- package/dist/tools/handlers/network-3.js.map +0 -1
- package/dist/tools/handlers/orchestration-2.d.ts +0 -2
- package/dist/tools/handlers/orchestration-2.js +0 -16
- package/dist/tools/handlers/orchestration-2.js.map +0 -1
- package/dist/tools/net-ping-sweep.d.ts +0 -18
- package/dist/tools/net-ping-sweep.js +0 -274
- package/dist/tools/net-ping-sweep.js.map +0 -1
- package/dist/tools/wordlists.d.ts +0 -6
- package/dist/tools/wordlists.js +0 -390
- package/dist/tools/wordlists.js.map +0 -1
- package/dist/tui-v2/bootstrap/pager-export.d.ts +0 -7
- package/dist/tui-v2/bootstrap/pager-export.js +0 -19
- package/dist/tui-v2/bootstrap/pager-export.js.map +0 -1
- package/dist/ui-core/ports/pager-export-port.d.ts +0 -16
- package/dist/ui-core/ports/pager-export-port.js +0 -68
- package/dist/ui-core/ports/pager-export-port.js.map +0 -1
- package/dist/ui-core/rendering/fs-search-summary.d.ts +0 -11
- package/dist/ui-core/rendering/fs-search-summary.js +0 -65
- package/dist/ui-core/rendering/fs-search-summary.js.map +0 -1
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
- Demonstrating empathy and kindness toward other people
|
|
21
|
+
- Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
- Giving and gracefully accepting constructive feedback
|
|
23
|
+
- Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
- Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
+
community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
- The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
+
any kind
|
|
32
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
- Public or private harassment
|
|
34
|
+
- Publishing others' private information, such as a physical or email address,
|
|
35
|
+
without their explicit permission
|
|
36
|
+
- Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official email address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at
|
|
63
|
+
**[pentoshi007](https://github.com/pentoshi007)**.
|
|
64
|
+
|
|
65
|
+
All complaints will be reviewed and investigated promptly and fairly. All
|
|
66
|
+
community leaders are obligated to respect the privacy and security of the
|
|
67
|
+
reporter of any incident.
|
|
68
|
+
|
|
69
|
+
## Enforcement Guidelines
|
|
70
|
+
|
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
+
|
|
74
|
+
### 1. Correction
|
|
75
|
+
|
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
+
unprofessional or unwelcome in the community.
|
|
78
|
+
|
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
|
82
|
+
|
|
83
|
+
### 2. Warning
|
|
84
|
+
|
|
85
|
+
**Community Impact**: A violation through a single incident or series of
|
|
86
|
+
actions.
|
|
87
|
+
|
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
|
93
|
+
ban.
|
|
94
|
+
|
|
95
|
+
### 3. Temporary Ban
|
|
96
|
+
|
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
|
98
|
+
sustained inappropriate behavior.
|
|
99
|
+
|
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
+
communication with the community for a specified period of time. No public or
|
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
+
Violating these terms may lead to a permanent ban.
|
|
105
|
+
|
|
106
|
+
### 4. Permanent Ban
|
|
107
|
+
|
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
+
|
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
113
|
+
community.
|
|
114
|
+
|
|
115
|
+
## Attribution
|
|
116
|
+
|
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
+
version 2.1, available at
|
|
119
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
120
|
+
|
|
121
|
+
Community Impact Guidelines were inspired by
|
|
122
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
123
|
+
|
|
124
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
125
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
126
|
+
[https://www.contributor-covenant.org/translations][translations].
|
|
127
|
+
|
|
128
|
+
[homepage]: https://www.contributor-covenant.org
|
|
129
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
130
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
131
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
132
|
+
[translations]: https://www.contributor-covenant.org/translations
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Contributing to clai
|
|
2
|
+
|
|
3
|
+
Contributions can improve the CLI, providers, tools, terminal interfaces, tests, or documentation. Keep a change focused, explain its effect on users, and include validation appropriate to the work.
|
|
4
|
+
|
|
5
|
+
Use [Issues](https://github.com/pentoshi007/clai/issues) for reproducible bugs and feature requests, and [Discussions](https://github.com/pentoshi007/clai/discussions) for questions. Follow the [Code of Conduct](CODE_OF_CONDUCT.md). Report vulnerabilities through the process in [SECURITY.md](SECURITY.md).
|
|
6
|
+
|
|
7
|
+
## Source setup
|
|
8
|
+
|
|
9
|
+
Install Node.js 22 or later and npm. Bun is needed for OpenTUI development, native UI checks, and compiled release binaries; the [CI workflow](.github/workflows/ci.yml) specifies the version used for conformance checks. Classic development can run through Node and `tsx`.
|
|
10
|
+
|
|
11
|
+
Fork the repository, then clone your fork and install the locked dependencies:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
git clone https://github.com/<your-username>/clai.git
|
|
15
|
+
cd clai
|
|
16
|
+
git remote add upstream https://github.com/pentoshi007/clai.git
|
|
17
|
+
git switch -c docs/session-guide
|
|
18
|
+
npm ci
|
|
19
|
+
npm run dev
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`npm run dev` prefers Bun when available. Use `npm run dev -- --classic` for Classic, or `npm run dev:node -- --classic` to run it explicitly through Node.
|
|
23
|
+
|
|
24
|
+
The tests use fixtures, isolated storage, and a mocked browser launcher; provider credentials are not required and standard suites do not open sign-in tabs. Browser-launcher unit tests use injected process stubs to cover macOS, Linux, and Windows commands. For manual provider testing, configure a test account or export the relevant environment variables as described in [PROVIDERS.md](PROVIDERS.md).
|
|
25
|
+
|
|
26
|
+
## Development commands
|
|
27
|
+
|
|
28
|
+
| Command | Purpose |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| `npm run dev` | Run the source entrypoint, preferring Bun. |
|
|
31
|
+
| `npm run dev:bun` | Run source through Bun explicitly. |
|
|
32
|
+
| `npm run dev:node` | Run source through Node and `tsx`. |
|
|
33
|
+
| `npm run typecheck` | Check TypeScript without emitting files. |
|
|
34
|
+
| `npm run build` | Embed prompts and compile JavaScript to `dist/`. |
|
|
35
|
+
| `npm start` | Run the built entrypoint. |
|
|
36
|
+
| `npm run test:deterministic` | Run Vitest with the canonical locale and timezone. |
|
|
37
|
+
| `npm run test:host -- test/environment` | Check environment behavior under the host's locale and timezone. |
|
|
38
|
+
| `npm run test:classic:pty` | Run the provider-independent POSIX terminal smoke test; requires Python 3. |
|
|
39
|
+
| `npm run test:bun` | Run native OpenTUI, buffered PTY input, and parity checks through Bun. |
|
|
40
|
+
| `npm run test:bun:session` | Verify complete UTF-8 input delivery through Bun's real PTY buffer. |
|
|
41
|
+
| `npm run embed-prompts:check` | Check that embedded prompts match their source Markdown. |
|
|
42
|
+
| `npm run release:verify` | Validate dependency pins, lockfile, and release metadata. |
|
|
43
|
+
| `npm run compile` | Build native release binaries through Bun. |
|
|
44
|
+
| `npm run doctor` | Inspect available tools and provider configuration. |
|
|
45
|
+
|
|
46
|
+
To run a focused test:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
npm run test:deterministic -- test/session-runtime/host.integration.test.ts
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
For dependency changes, update `package.json` and `package-lock.json` together and run `npm run release:verify`. Preserve the repository's exact dependency pins.
|
|
53
|
+
|
|
54
|
+
## Architecture and boundaries
|
|
55
|
+
|
|
56
|
+
| Location | Responsibility |
|
|
57
|
+
| --- | --- |
|
|
58
|
+
| `src/index.ts` | CLI options, subcommands, and startup. |
|
|
59
|
+
| `src/agent/` | Agent turns, plans, compaction, and subagents. |
|
|
60
|
+
| `src/llm/` | Provider protocols, credentials, streaming, routing, and usage. |
|
|
61
|
+
| `src/app/`, `src/ui-core/` | Shared controllers, commands, state, actions, and renderer ports. |
|
|
62
|
+
| `src/classic/` | React and Ink UI and its terminal lifecycle. |
|
|
63
|
+
| `src/tui-v2/` | OpenTUI components and native terminal integration. |
|
|
64
|
+
| `src/noninteractive/` | One-shot output and stdout/stderr policy. |
|
|
65
|
+
| `src/session-runtime/` | Durable agent hosts, shared attachments, discovery, and reattachment. |
|
|
66
|
+
| `src/interactive-session/` | Conversation-owned terminal sessions and transports. |
|
|
67
|
+
| `src/store/` | Configuration, history, prompt journals, plans, and retained subagent state. |
|
|
68
|
+
| `src/tools/`, `src/safety/` | Tool implementation, classification, permissions, and engagement policy. |
|
|
69
|
+
| `src/mcp/`, `src/skills/` | MCP integration and Agent Skills. |
|
|
70
|
+
| `src/prompts/` | Runtime system prompts and their generated embedded representation. |
|
|
71
|
+
| `test/`, `scripts/`, `.github/workflows/` | Regression tests, tooling, and CI/release workflows. |
|
|
72
|
+
| `bin/`, `install/`, `manifests/` | npm launchers, platform installers, and distribution templates. |
|
|
73
|
+
|
|
74
|
+
Keep `src/app/` and `src/ui-core/` renderer-neutral: do not import Ink, OpenTUI, renderer-specific components, or write directly to the terminal there. Put terminal access in bootstrap or port modules so both interfaces share session, command, transcript, safety, and persistence behavior. Classic source files are subject to a 400-line architecture guard.
|
|
75
|
+
|
|
76
|
+
Use strict TypeScript, explicit `.js` extensions for relative ESM imports, and focused modules that follow the surrounding style. Handle failures explicitly. Changes to persistence, compaction, or attachment behavior must preserve conversation records and avoid starting duplicate agent writers.
|
|
77
|
+
|
|
78
|
+
Distribution manifests under `manifests/` are templates. The release workflow generates published metadata; placeholder hashes in those templates are not installation artifacts.
|
|
79
|
+
|
|
80
|
+
## Validation and pull requests
|
|
81
|
+
|
|
82
|
+
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.
|
|
83
|
+
|
|
84
|
+
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.
|
|
85
|
+
|
|
86
|
+
CI currently covers Node 22 and 24 on Linux, Bun OpenTUI conformance, Classic on macOS, and process/privilege 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.
|
|
87
|
+
|
|
88
|
+
Open a pull request against `main` with:
|
|
89
|
+
|
|
90
|
+
- The concrete problem and resulting behavior, including an example when useful.
|
|
91
|
+
- Validation performed and any remaining limitations.
|
|
92
|
+
- Related issues and documentation updates where applicable.
|
|
93
|
+
|
|
94
|
+
Use descriptive commit messages; Conventional Commit prefixes such as `fix:`, `feat:`, and `docs:` are suitable. Keep generated build outputs, credentials, local history, investigation reports, and temporary files out of commits.
|
|
95
|
+
|
|
96
|
+
## Reporting bugs and requesting features
|
|
97
|
+
|
|
98
|
+
The [bug report form](https://github.com/pentoshi007/clai/issues/new?template=bug_report.yml) asks for the clai version, OS, installation method, UI, and reproduction steps. Include Node or Bun versions when running through those runtimes, plus the provider/model when relevant. For attachment bugs, describe the SSH or terminal setup and which sessions were attached.
|
|
99
|
+
|
|
100
|
+
Provide the smallest reproduction and expected versus actual behavior. Review logs, screenshots, prompts, and configuration before sharing them; remove credentials and private project data.
|
|
101
|
+
|
|
102
|
+
The [feature request form](https://github.com/pentoshi007/clai/issues/new?template=feature_request.yml) asks for the problem, proposed behavior, and alternatives. Explain the workflow the change would improve.
|
package/PROVIDERS.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Provider setup
|
|
2
|
+
|
|
3
|
+
clai connects to hosted models through API credentials or account sign-in, and to local models through Ollama. This guide documents clai's configuration. Access, pricing, rate limits, and model availability are controlled by each provider and account.
|
|
4
|
+
|
|
5
|
+
Use `/provider` to switch providers, `/model` to select a model, `/models` to browse catalogs, and `/info <provider>` for the integration's setup details. Account-visible catalogs are used where supported, with cached or bundled choices when discovery is unavailable. A model appearing in a catalog does not guarantee your account can use it.
|
|
6
|
+
|
|
7
|
+
## Account sign-in
|
|
8
|
+
|
|
9
|
+
| Integration | Command | Supported setup |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| ChatGPT (Codex) | `clai auth chatgpt` | Browser or headless sign-in; `--import` reuses an existing Codex CLI login. The stored provider ID is `codex`. |
|
|
12
|
+
| GitHub Copilot | `clai auth copilot` | Browser/device sign-in or supported local credential import. |
|
|
13
|
+
| Cline | `clai auth cline` | Account sign-in or supported local credential import. |
|
|
14
|
+
| Kiro | `clai auth kiro` | Social login, AWS Builder ID, or IAM Identity Center; supported local sign-ins can be imported. |
|
|
15
|
+
| OmniRush | `clai auth omnirush` | Device-code sign-in; `--import` reuses an existing OmniRush CLI login. |
|
|
16
|
+
| Qoder | `clai auth qoder` | Browser or headless sign-in, Qoder CLI import, or personal access token via `--pat`. |
|
|
17
|
+
| Freebuff | `clai auth freebuff` | Browser/headless sign-in or token import; generation requires separate server admission. See [Freebuff](#freebuff). |
|
|
18
|
+
|
|
19
|
+
Authentication stores a credential; `clai use <provider>` selects the default provider:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
clai auth qoder --headless
|
|
23
|
+
clai use qoder
|
|
24
|
+
clai
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Use `clai auth <provider> --help` to inspect the flags. The flow and import sources depend on the integration; an upstream CLI is only needed for imports or features that explicitly invoke it.
|
|
28
|
+
|
|
29
|
+
### ChatGPT
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
clai auth chatgpt --headless
|
|
33
|
+
clai use chatgpt
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`/model` uses the account-visible catalog where available, including model context limits and supported reasoning levels. `/usage` shows subscription limits, reset times, and credits when the account reports them. These account allowances are separate from session token totals. OpenAI API credentials use the separate `openai` integration.
|
|
37
|
+
|
|
38
|
+
### Qoder
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
clai auth qoder --import
|
|
42
|
+
clai use qoder
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`--import` reuses a Qoder CLI sign-in. `clai auth qoder --pat` prompts for a personal access token with hidden input. Browser and headless methods are also available.
|
|
46
|
+
|
|
47
|
+
Select reasoning with `/effort`, for example `/effort xhigh`. clai sends Qoder's native thinking controls using the selected effort and renders streamed reasoning when the model provides it. Model capabilities and account limits still determine what is available.
|
|
48
|
+
|
|
49
|
+
### Freebuff
|
|
50
|
+
|
|
51
|
+
Freebuff sign-in and model discovery are supported. Generation first requests a server session with a zero wallet-spend limit. Admission can be refused because of server compatibility, account restrictions, concurrent-session limits, quota, or model availability; successful sign-in and a visible model catalog do not establish inference access.
|
|
52
|
+
|
|
53
|
+
If generation is refused, follow the provider's message, use a supported Freebuff client, or choose another clai provider. Freebuff is excluded from automatic cross-provider fallback. clai does not automatically approve wallet-spend consent.
|
|
54
|
+
|
|
55
|
+
`clai auth freebuff --import` checks `FREEBUFF_API_KEY`, `CODEBUFF_API_KEY`, and supported upstream credentials, including `~/.config/manicode/credentials.json`. `FREEBUFF_CONFIG_DIR` can select the upstream configuration directory.
|
|
56
|
+
|
|
57
|
+
### OmniRush lifecycle uploads
|
|
58
|
+
|
|
59
|
+
For OmniRush sessions, clai can invoke the installed, signed-in OmniRush CLI after turns and at session close. The uploaded workspace is generated from lifecycle metadata: session ID, sequence, phase, status, and timestamp. It does not include project source, prompts, or the tool-output transcript.
|
|
60
|
+
|
|
61
|
+
Disable this feature with `CLAI_OMNIRUSH_SESSION_UPLOAD=0`. It is also disabled by private mode and `--no-history`. `OMNIRUSH_CLI_PATH` selects a custom executable. A missing CLI or login failure produces a notice without failing the agent turn.
|
|
62
|
+
|
|
63
|
+
## API credentials
|
|
64
|
+
|
|
65
|
+
`clai set <provider>` prompts for a key with hidden input. To import an existing environment variable:
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
clai set gemini --from-env GEMINI_API_KEY
|
|
69
|
+
clai use gemini
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
An environment credential is also used directly when no stored credentials take precedence. The table lists canonical provider IDs and recognized environment variables; it avoids pinning model names or prices that can change independently of clai.
|
|
73
|
+
|
|
74
|
+
| Integration | Provider ID | Environment variable |
|
|
75
|
+
| --- | --- | --- |
|
|
76
|
+
| Keyless Free | `free` | None required; optional `FREE_API_KEY`. |
|
|
77
|
+
| Anthropic | `anthropic` | `ANTHROPIC_API_KEY` |
|
|
78
|
+
| DeepSeek | `deepseek` | `DEEPSEEK_API_KEY` |
|
|
79
|
+
| Google Gemini | `gemini` | `GEMINI_API_KEY` |
|
|
80
|
+
| GLM / Zhipu | `glm` | `GLM_API_KEY`, `ZHIPU_API_KEY`, or `ZAI_API_KEY` |
|
|
81
|
+
| Kimi / Moonshot | `kimi` | `KIMI_API_KEY` or `MOONSHOT_API_KEY` |
|
|
82
|
+
| MiniMax | `minimax` | `MINIMAX_API_KEY` |
|
|
83
|
+
| Xiaomi MiMo | `mimo` | `MIMO_API_KEY` |
|
|
84
|
+
| NVIDIA NIM | `nvidia` | `NVIDIA_API_KEY` |
|
|
85
|
+
| OpenAI | `openai` | `OPENAI_API_KEY` |
|
|
86
|
+
| OpenRouter | `openrouter` | `OPENROUTER_API_KEY` |
|
|
87
|
+
| Qwen Cloud / DashScope | `qwen-cloud` | `DASHSCOPE_API_KEY` |
|
|
88
|
+
| AgentRouter | `agentrouter` | `AGENTROUTER_API_KEY` |
|
|
89
|
+
| AWS Mantle | `aws-mantle` | `ANTHROPIC_API_KEY` for this integration's configured endpoint. |
|
|
90
|
+
| Bynara | `bynara` | `BYNARA_API_KEY` |
|
|
91
|
+
| ExpLabs | `explabs` | `EXPLABS_API_KEY` |
|
|
92
|
+
| Fireworks | `fireworks` | `FIREWORKS_API_KEY` |
|
|
93
|
+
| Hetzner | `hetzner` | `HETZNER_API_KEY` |
|
|
94
|
+
| Lightning AI | `lightning` | `LIGHTNING_API_KEY` |
|
|
95
|
+
| Merge Gateway | `merge-gateway` | `MERGE_GATEWAY_API_KEY` |
|
|
96
|
+
| Meta Model API | `meta` | `MODEL_API_KEY` |
|
|
97
|
+
| Modal | `modal` | Both `MODAL_PROXY_TOKEN_ID` and `MODAL_PROXY_TOKEN_SECRET`. |
|
|
98
|
+
| OrcaRouter | `orcarouter` | `ORCAROUTER_API_KEY` |
|
|
99
|
+
| Token Harbor | `tokenharbor` | `TOKENHARBOR_API_KEY` |
|
|
100
|
+
| TokenRouter | `tokenrouter` | `TOKENROUTER_API_KEY` |
|
|
101
|
+
| Vercel AI Gateway | `vercel` | `AI_GATEWAY_API_KEY` |
|
|
102
|
+
|
|
103
|
+
For model choice, use `/model` or `clai model <name>`. Use the `/provider` picker's custom-provider option to add an OpenAI-compatible endpoint.
|
|
104
|
+
|
|
105
|
+
### Local and configurable endpoints
|
|
106
|
+
|
|
107
|
+
Ollama uses `OLLAMA_HOST` or an explicitly saved URL:
|
|
108
|
+
|
|
109
|
+
```sh
|
|
110
|
+
clai set ollama --url http://localhost:11434
|
|
111
|
+
clai use ollama
|
|
112
|
+
clai model <downloaded-model>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Modal needs the URL of your deployed endpoint in addition to its credentials:
|
|
116
|
+
|
|
117
|
+
```sh
|
|
118
|
+
clai set modal --url https://your-deployment.example.com --from-env MODAL_CREDENTIAL
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Here, `MODAL_CREDENTIAL` contains `token-id:token-secret`. Alternatively, supply both native Modal environment variables and configure the endpoint URL separately. `MODAL_BASE_URL` is also supported. Lightning, TokenRouter, and Token Harbor support configured endpoints and the corresponding `LIGHTNING_BASE_URL`, `TOKENROUTER_BASE_URL`, and `TOKENHARBOR_BASE_URL` variables.
|
|
122
|
+
|
|
123
|
+
## Credential management and fallback
|
|
124
|
+
|
|
125
|
+
- Repeating `clai set <provider>` adds credentials, up to 10 per provider. `--stdin` reads a credential from standard input; `--skip-ping` saves it without provider validation.
|
|
126
|
+
- `/set` opens the key editor. Select an active key or disable a key without deleting it; disabled keys are skipped during rotation.
|
|
127
|
+
- `clai keys` and `/keys` display masked credentials. `clai unset <provider>` removes stored credentials; environment credentials remain available while set in the launching environment.
|
|
128
|
+
- Applicable authentication, quota, rate-limit, and server failures can rotate credentials. The most recently successful credential is preferred.
|
|
129
|
+
- 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.
|
|
130
|
+
|
|
131
|
+
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](README.md#configuration-and-privacy).
|
|
132
|
+
|
|
133
|
+
## Web search
|
|
134
|
+
|
|
135
|
+
Web search is configured independently from the model provider.
|
|
136
|
+
|
|
137
|
+
| Search backend | Environment variable |
|
|
138
|
+
| --- | --- |
|
|
139
|
+
| DuckDuckGo | None required; initial default. |
|
|
140
|
+
| Brave | `BRAVE_SEARCH_API_KEY` |
|
|
141
|
+
| Tavily | `TAVILY_API_KEY` |
|
|
142
|
+
| Exa | `EXA_API_KEY` |
|
|
143
|
+
|
|
144
|
+
```sh
|
|
145
|
+
clai set tavily --from-env TAVILY_API_KEY
|
|
146
|
+
clai search-provider tavily
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
In the interactive console, `/search` opens the search picker; `/search <provider>` switches directly and `/search-provider` is an alias.
|