* rename folders
* fix examples reorg references
* move over files
* having agent fixing and validating all examples are still working
* fix sidecar paths
---------
Co-authored-by: abeatrix <beatrix@cline.bot>
* fix: resolve workspace export aliases reliably
Support additional package export conditions when building workspace aliases and fall back from dist JS exports to src TS files when needed. Sort aliases by specificity so jiti resolves subpath aliases before broader package aliases.
* prefer import.meta.resolve for host module lookup
Resolve host runtime specifiers with import.meta.resolve first and normalize file URLs to paths. Fall back to require.resolve for CommonJS packages and older resolution edge cases.
* patches
* patch
* fix
* feat: add plugin install support for npm, git, and local sources
Implement plugin source parsing and installation into the Cline plugin directory. Support local files/directories, npm packages, and git repositories, including force installs and dependency handling. Add tests for parsing, install behavior, and config discovery.
Examples:
```sh
clite plugin installi ./my-plugin
clite plugin i https://github.com/owner/repo.git
clite plugin i --npm @scope/plugin
clite plugin i --git github.com/owner/repo
clite plugin install --git https://github.com/owner/repo.git
```
Manuall Test:
```
bun run build
bun run cli plugin install https://github.com/abeatrix/demotest.git
```
* patches:
.git exclusion now filters by basename(sourcePath) !== ".git", so the .git directory itself is not copied.
Hostname-style sources like github.com/owner/repo now throw a guided error unless --git is used, instead of falling through to a confusing local-path failure.
plugin-module-import no longer reads and statically scans every plugin file unconditionally. It pre-registers known host-provided @cline/* SDK aliases, and only reads the plugin source for static specifier analysis when preferHostRuntimeDependencies actually requires it.
* tighten
* tighten
* add --omit=peer
* fix: retry daemon spawn when CLI binary is busy CLINE-2115
Retry detached hub daemon startup on transient ETXTBSY spawn failures before polling discovery. This handles package-manager updates that replace the CLI binary during restart, with tests and architecture docs covering the behavior.
* use fake timer
* retry prewarm
* retry
* @clinebot to @cline
* fix: harden CI permissions and add workflow CODEOWNERS for public repo
- Remove unnecessary checks:write and pull-requests:write from test.yml
(no step uses them; GitHub creates check runs automatically with
contents:read)
- Move publish-sdk.yaml permissions from workflow-level to job-level so
the test caller job gets only contents:read while the publish job
gets contents:write + id-token:write
- Add CODEOWNERS entry restricting .github/workflows/ changes to
saoudrizwan, abeatrix, and maxpaulus43 (enforced by the existing
ruleset's require_code_owner_review setting)
* fix: add BarreiroT to workflow CODEOWNERS
* fix: scope CODEOWNERS for .github to saoudrizwan, abeatrix, and BarreiroT
Remove development export entries that pointed at source TypeScript files and limit published package files to dist output. Update core tsconfig path handling so local builds still resolve workspace sources while consumers use compiled artifacts.
* Derive prompt-cache from cache write pricing
* fix: prompt cache detection (#45)
Regenerate the model catalog with updated provider metadata, including Xiaomi MiMo naming, family, capability, and token limit changes.
Detect prompt-cache support when either cache read or cache write pricing is present so write-only cache support is represented correctly.
* Update packages/llms/src/catalog/catalog-live.ts
Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>
* require number to be non-zero
---------
Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com>
Co-authored-by: abeatrix <beatrix@cline.bot>
* feat(cli): dual-publish @clinebot/cli mirror wrapper
After publishing @cline/cli, the publish script now also publishes an
identical wrapper under @clinebot/cli so existing users who installed
via npm i -g @clinebot/cli continue receiving updates. The mirror
wrapper references the same @cline/cli-* platform packages.
* fix(cli): preserve legacy wrapper updates
Track and destroy sockets opened by the blocking HTTP server so the port fallback test can close reliably. Also mark an unused compaction test callback argument.
* fix(cli): embed tree-sitter parser worker in compiled binary
The standalone CLI binary was missing syntax-highlighted markdown
rendering (headers, inline code, quotes, bold, etc.) while tables
rendered fine. This happened because the tree-sitter parser worker
from @opentui/core was never embedded as an entrypoint in the
compiled binary, so TreeSitterClient.startWorker() couldn't find it
at runtime.
The fix adds parser.worker.js as a second entrypoint to the build
command, enables --splitting (required for multi-entrypoint compile),
and defines OTUI_TREE_SITTER_WORKER_PATH so opentui resolves the
embedded worker from Bun's virtual filesystem (bunfs). The relative
path is computed from the workspace root (rootDir) to match how Bun
lays out files in bunfs.
* refactor(cli): switch build from CLI command to Bun.build() API
Aligns with how opencode structures their compiled binary build.
Uses the programmatic Bun.build() API with explicit entrypoints,
splitting, and define options instead of shelling out to
`bun build --compile`.
* fix: respect --thinking none when persisted reasoning exists
Two-layer fix for DeepSeek API error "thinking options type cannot be
disabled when reasoning_effort is set":
1. CLI: Add thinkingExplicitlySet flag to ParsedArgs so --thinking none
is distinguished from "not passed" and not overridden by persisted
ProviderSettings.reasoning.effort
2. LLMs: Guard buildCompatibleEffortOptions on reasoning.enabled !== false
to prevent conflicting reasoningEffort/effort fields from being emitted
alongside thinking.type=disabled in the openaiCompatible provider options
Closes: CLINE-2087
* test: add DeepSeek v4 Flash thinking-off regression entries
Add two live test entries for the model reported in CLINE-2087:
- deepseek-v4-flash-thinking-off: basic enabled=false
- deepseek-v4-flash-thinking-off-with-effort: enabled=false with
effort=xhigh (exact bug scenario — effort leaking alongside disabled)
* fix: inject steer prompts before model requests
* chore: split dev hub owner changes
* chore: keep tool result ordering fix in core
* fix: wrap steered prompts as user input
* fix: disable strictJsonSchema by default
Set strictJsonSchema: false helps when the provider itself is rejecting or over-constraining tool schemas because strict mode is on.
Before we migrate to AI SDK, the OpenAI SDK has strict set to false by default, so it uses the union schema we have set to reduce tool calls failture. However,
in AI SDK 6, OpenAI/openai-compatible default strictJsonSchema is true, and it is used for strict JSON schema / tool-call generation behavior. Turning it off can reduce provider-side failures around schemas that strict mode does not support well, especially unions, optional fields, nullable fields, anyOf, etc.
* tighter fix
* unit tests
* fix: missing tool result on resumed session
The runtime emits the assistant message before tools execute, so an abort between those two steps can leave the persisted transcript ending with tool_use blocks. On resume, the provider request is built from that transcript, so this is a transcript repair problem at the provider-message boundary rather than a tool executor problem.
MessageBuilder.buildForApi now repairs provider-bound transcripts by inserting synthetic tool_result messages for assistant tool_use blocks that have no result.
The synthetic result uses text block array content and is_error: true, e.g. “Tool execution was interrupted before a result was produced.”
Inserted results are placed before the next user prompt/assistant turn, so provider message ordering stays valid.
Read-tool compaction now skips error tool results so synthetic interrupted read results do not get rewritten as outdated file content.
* patches
Handle rejected agent runs during interactive aborts as aborted turns instead of failing the session. Preserve messages, clear abort state, and allow later turns to continue.
Also export AgentTool from the core entrypoint.
Resolve the system prompt once and send non-empty string prompts through
streamText's system field instead of embedding them in message history.
This avoids duplicate prompt handling while preserving cached message logic.
Removes DOC.md as content will be moved to doc site.
Same root cause as #371 -- the trailing space in the > marker text
only applied to the first visual line. Wrapped lines rendered flush
against the marker column. Use a fixed-width box for the > marker
(matching assistant_text and tool_call entries) so the gap is
structural rather than inline text.
**Status: draft. Latest implementation is pushed through `aa14b75d`. The
onboarding flow has been manually verified with Ollama by selecting a
configured local model.**
## Motivation
Interactive local-provider setup had several gaps:
- Ollama / LM Studio setup could ask for an API key but not the endpoint
users actually need to configure.
- Keyless local providers were blocked or confusing in UI paths even
though the flag path could already save base URLs.
- Onboarding could not manually enter a model ID when the provider
returned no models.
- Onboarding model lookup did not consistently use the saved local
provider endpoint, so live Ollama models could be missing.
- Cloud providers were showing editable base URLs too broadly because
the UI inferred editability from the existence of a default base URL.
## Current architecture
### Provider config projection belongs to core
`@clinebot/core` now owns the UI-facing provider config projection
through `getProviderConfigFields(providerId)` in
`packages/core/src/services/providers/local-provider-service.ts`.
- OAuth providers return `{ authMethod: "oauth", fields: {} }` and route
to OAuth login.
- API-key providers return `apiKey`.
- Built-in editable base URLs are intentionally limited to
endpoint-style providers: `ollama`, `lmstudio`, and `litellm`.
- User-added/custom providers with saved endpoints still expose
`baseUrl`, so custom OpenAI-compatible providers remain editable.
- Fields are not marked runtime-required; provider/upstream errors
remain the source of truth.
### Settings-to-runtime conversion stays canonical
The CLI no longer has a custom `ProviderSettings -> ProviderConfig`
projection for model lookup.
- `toProviderConfig(settings, { includeKnownModels: false })` was added
in core.
- `ProviderSettingsManager.getProviderConfig(providerId, options)` now
forwards that option.
- Model lookup paths can keep saved auth/base URL/routing settings while
avoiding bundled `knownModels` that would pollute live local discovery.
### Local model discovery is live-first
Ollama / LM Studio use public keyless model fetchers in
`packages/core/src/services/llms/provider-defaults.ts`.
- Ollama fetches `${baseUrl without /v1}/api/tags`.
- LM Studio fetches `${baseUrl}/models`.
- Public fetchers run even when no config object is passed, falling back
to the provider default base URL.
- When a public fetcher returns models, those results override generated
catalog entries so local pickers show what is actually
installed/available.
### CLI UX updates
The CLI provider-change and onboarding flows now consume the core
projection.
- Bring-your-own-provider onboarding renders `baseUrl` only when core
says it should.
- Base URL is focused first for endpoint-style providers; cloud
providers see only API key.
- The model picker supports manual model ID entry even when models are
present.
- The onboarding model picker also supports manual model ID entry when
the fetched list is empty.
- Existing configured-provider detection treats meaningful saved
endpoint/model/API-key settings as configured for non-OAuth providers
and requires an OAuth access token for OAuth providers.
## Main files changed
| Path | Change |
|---|---|
| `packages/core/src/services/providers/local-provider-service.ts` |
Adds provider config field projection and base URL editability policy |
| `packages/core/src/services/providers/local-provider-service.test.ts`
| Covers cloud, local/proxy, OAuth, unknown, and custom-provider config
field behavior |
| `packages/core/src/services/llms/provider-defaults.ts` | Adds/uses
public Ollama and LM Studio model fetchers with live-first merge
behavior |
| `packages/core/src/services/llms/provider-settings.ts` | Adds
`includeKnownModels` option to canonical `toProviderConfig` |
| `packages/core/src/services/storage/provider-settings-manager.ts` |
Exposes provider config conversion options through the settings manager
|
| `apps/cli/src/tui/components/dialogs/provider-picker.tsx` | Renders
configure fields returned by core |
| `apps/cli/src/tui/components/model-selector/model-selector.tsx` |
Allows manual typed model IDs in the regular model picker |
| `apps/cli/src/tui/components/searchable-list.tsx` | Supports synthetic
searchable rows for typed custom values |
| `apps/cli/src/tui/hooks/use-model-selector.tsx` | Uses saved config
without pre-seeded known models for lookup refresh |
| `apps/cli/src/tui/views/onboarding/*` | Adds BYO base URL config and
manual model ID entry to onboarding |
| `apps/cli/src/utils/provider-auth.ts` | Keeps provider auth helpers
small; no custom provider-config projection |
## Verified
- Pre-commit hook on `aa14b75d` ran:
- `bun run types`
- `bun biome check --no-errors-on-unmatched --files-ignore-unknown=true`
- Additional focused verification run locally:
- `bun -F @clinebot/core test:unit --
src/services/storage/provider-settings-manager.test.ts
src/services/providers/local-provider-service.test.ts`
- `bun -F @clinebot/cli typecheck`
- `bun -F @clinebot/cli test:unit`
- `git diff --check`
- Manual verification: onboarding worked with Ollama and showed the
available local model.
## Notes / residual risk
- TUI keyboard/focus behavior is covered mostly through typecheck/unit
coverage and manual verification rather than deep e2e coverage.
- The base URL allowlist is intentional product policy. Additional
providers such as Requesty can be added later, but should be explicit
rather than inferred from a default endpoint.
- `includeKnownModels: false` is deliberately scoped to lookup flows;
normal runtime config still includes known model metadata for
cloud/catalog providers.
## Out of scope
- VS Code webview parity for `getProviderConfigFields`.
- Custom-provider creation UX.
- Richer retry/error UI when local servers are unreachable.
- Multi-field provider-specific setup forms, such as SAP AI Core.
## Screenshots
<img width="615" height="290" alt="Screenshot 2026-05-01 at 7 00 49 PM"
src="https://github.com/user-attachments/assets/2a5dc945-2204-4263-abb8-eee24fcc1a33"
/>
<img width="619" height="209" alt="Screenshot 2026-05-01 at 7 00 53 PM"
src="https://github.com/user-attachments/assets/eb5e0d38-3442-470f-8916-25d2f919876e"
/>
<img width="541" height="220" alt="Screenshot 2026-05-01 at 7 01 08 PM"
src="https://github.com/user-attachments/assets/1b828c35-c815-44f2-a199-4d0ac32d3861"
/>
<img width="544" height="248" alt="Screenshot 2026-05-01 at 7 01 18 PM"
src="https://github.com/user-attachments/assets/b42853f0-b45d-4901-ae85-31ea5886be40"
/>