Both packages are imported directly from source but were never declared in
apps/vscode/package.json, so they only resolved transitively. On a clean
install this broke:
- @grpc/proto-loader — imported by scripts/proto-utils.mjs,
src/standalone/utils.ts and src/standalone/hostbridge-client.ts; its absence
made `npm run protos` (and therefore the whole build) fail on a fresh checkout.
- @opentelemetry/api-logs — imported by the OpenTelemetry telemetry providers;
its absence produced TS2307 "Cannot find module" errors under tsc.
Versions are pinned to align with the existing dependency families already
declared in this package (@grpc/grpc-js ^1.9.x → proto-loader ^0.7.13;
the @opentelemetry/* 0.56.x line → api-logs ^0.56.0). The npm and bun
lockfiles are updated accordingly (the api-logs change also dedupes several
previously-nested copies to a single hoisted entry).
Omnibus squash of the 10 oldest SDK-migration commits (authored 2026-05-27
through 2026-06-02), collapsed during the 2026-06-09 rebase onto origin/main.
Squashed commits:
- sdk migration: squashed pre-2026-05-27 work
- sdk migration: squashed 06-05-2026 -- instead of listHistory, use host.get(sessionId) instead
- updat gitignore
- fix xai provider
- fix(vscode): forward Bedrock region + AWS auth to the SDK gateway
- fix(vscode): keep in-progress MCP OAuth flow across reconnects
- fix(vscode): wire auto compact into SDK sessions (#11197)
- fix(vscode): compact Codex OAuth before input cap (#11194)
- fix unauthed user flow
- fix(llms): strip Cerebras reasoning history (#11214)
* Improve OpenRouter sticky session routing
OpenRouter prompt caching was getting weaker cache hit rates because requests did not include a stable session_id. Without that identifier, OpenRouter can route consecutive turns away from the same upstream cache context even when cache_control is present, causing more fresh input billing.
Propagate explicit runtime sessionId metadata from agents into model requests without synthesizing fallback session or conversation ids. Add provider metadata for sticky sessions so OpenRouter maps metadata.sessionId to the JSON body session_id field, while keeping the mechanism extensible for header-based providers.
Apply sticky-session metadata in the AI SDK provider fetch wrapper, preserving explicit wire values when callers already set them. Move trimNonEmpty and omitUndefinedValues into @cline/shared for reuse, and cover the JSON-body, header, and no-fallback paths with tests.
* Tighten sticky session fetch body handling
Treat init.body null as an explicit no-body override so the sticky-session wrapper does not inspect or parse a Request body that the caller has intentionally overridden.
Model fetch body text by source, which removes the unreachable JSON-body injection branch and makes the Request rewrite path explicit. Also type the provider fetch mocks so sticky-session assertions compile cleanly in editors.
* merges model-handle default metadata with per-request metadata
* feat(hub): add connector configure path and share catalog via @cline/shared
Add connector.channels/configure/delete_config Hub commands that persist
connector settings to disk without starting connector processes or calling
provider auth APIs. This means settings (including tokens) are saved as-is
without verification; callers are responsible for supplying valid values.
Shared catalog and platform definitions:
- Move ConnectorCatalogEntry, CONNECTOR_CATALOG, listConnectorCatalog, and
all ConnectorPlatformDef/FieldDef/SecurityDef types + CONNECTOR_PLATFORMS
into sdk/packages/shared/src/connectors/platforms.ts
- Export everything from @cline/shared index so CLI and Hub use the same
definitions without duplication
- Reduce apps/cli/src/connectors/catalog.ts and
apps/cli/src/wizards/connect/platforms.ts to thin re-export shims that
preserve existing CLI import paths
New Hub connector handlers (sdk/packages/core):
- connector-handlers.ts: handles connector.channels (list available/active/
configured), connector.configure (validate fields and write settings.json
under ~/.cline/data/connectors/), connector.delete_config (remove entry
and clean up empty file)
- Settings are stored as ConnectorSettingsFile (version 1) at
~/.cline/data/connectors/settings.json; reads are lenient/defensive
- Wire handlers into hub-server-transport.ts dispatch switch
- connector-handlers.test.ts: unit tests for configure, channels, and
delete_config covering field validation, conditional fields, security
constraints, and settings round-trips
Hub WebSocket auth helpers (hub-websocket-server.ts):
- Extract isLocalHubHostName / isLocalHubOrigin as named, tested exports
- Allow unauthenticated WebSocket upgrades from local origins (localhost,
127.0.0.1, ::1) so the Hub UI can connect without an auth token
- hub-websocket-server.test.ts: extend tests to cover new local-origin logic
Add connector.channels, connector.configure, connector.delete_config to
HubCommandName union in sdk/packages/shared/src/hub.ts
* apply feedback
* export connector settings json path
* apply feedback from robin
* fix(hub-ui): Use development mode conditionally for connector
Refactor connector CLI launch logic to conditionally apply Bun-specific
flags (`--conditions=development`) only when running under Bun or Node
runtimes with access to the source entrypoint. When running from a
compiled binary (e.g., packaged Cline app), use the execPath directly
without Bun flags.
- Extract `buildCliConnectCommand` function to encapsulate launcher
and args resolution logic based on runtime detection
- Use `withResolvedClineBuildEnv` for environment variable setup
- Export `__test__` object to enable unit testing of internal logic
- Add tests covering Bun source entrypoint and compiled binary cases
* address feedback
* Optimize Cline Hub webview bundle
Issue:
The Cline Hub webview build emitted Vite's large chunk warning. The main entry bundle was over 2 MB minified, and the build output included many Shiki language/theme chunks plus eagerly bundled Streamdown math/Mermaid support that the hub did not need on startup.
Changes:
- Split heavyweight Cline Hub views behind React.lazy/Suspense so settings, customization, and chat code do not all land in the initial app shell.
- Replace root Shiki highlighter usage with shiki/core and lazily loaded, explicitly supported languages/themes.
- Route Streamdown through a local HubStreamdown wrapper that uses the local CodeBlock renderer and keeps Mermaid as a lazy diagram plugin.
- Remove unused Streamdown math/code/Mermaid packages, add direct lazy Mermaid support, and add targeted Rolldown chunk groups for Mermaid parser/layout/markup assets.
Before/after bundle measurements:
| Metric | Before | After |
| --- | ---: | ---: |
| Total generated JS | 24,356 KiB | 5,800 KiB |
| Total generated JS gzip | 4,805.5 KiB | 1,434.6 KiB |
| Main entry chunk | 2,044.02 kB | 373.88 kB |
| Main entry gzip | 617.25 kB | 117.83 kB |
Verification:
- bun -F @cline/cline-hub build:webview
- bun biome check apps/cline-hub/src/webview/vite.config.ts apps/cline-hub/src/webview/src/App.tsx apps/cline-hub/src/webview/src/components/ai-elements/code-block.tsx apps/cline-hub/src/webview/src/components/ai-elements/message.tsx apps/cline-hub/src/webview/src/components/ai-elements/reasoning.tsx apps/cline-hub/src/webview/src/components/ai-elements/streamdown.tsx apps/cline-hub/src/webview/package.json
* address feedback
* fix(sdk): resolve Cline Z.ai model metadata aliases
* fix(sdk): preserve Cline model alias overrides
* test(sdk): update Cline provider model list expectation
* fix(sdk): default-on tool result truncation, name fallback, tool_use budget accounting
- Truncate every tool result (MCP/custom tools included), not just an allowlist
- Resolve tool names from tool_result.name when the paired tool_use is gone
- Count tool_use.input strings toward the aggregate provider request budget
- Protect any binary carrier block ({type, data}) from truncation, not just images
- Don't let failSession cleanup errors mask the original turn error
* fix(sdk): tighten MessageBuilder limits with named options and env overrides
Folds #11474 into the default-on truncation branch and addresses review
feedback from both PRs:
- per-result tool cap drops to 8k chars; MessageBuilderOptions constructor
with CLINE_MESSAGE_BUILDER_* env overrides for A/B testing
- env parsing is positive-only so '=0' cannot silently disable a limit
(greptile on #11474)
- aggregate budget stays at 6MB: budget truncation rewrites mid-transcript
bytes and breaks provider prefix caching, so it must stay a rare overflow
valve rather than the steady state (johnwschoi on #11474)
- user file attachments get a dedicated 50k cap instead of inheriting the
aggressive tool-result cap (codex on #11474)
- isBinaryContentLike restricted to known binary block types so textual
{type, data} payloads can no longer dodge every cap (codex/greptile)
- tool_use.input strings become last-resort budget truncation candidates,
making the aggregate budget reclaimable when oversized model-generated
arguments carry the overflow (robinnewhouse/greptile)
* fix(sdk): constrain binary tool result truncation
* style(sdk): remove disallowed comment formatting
* Revert "style(sdk): remove disallowed comment formatting"
This reverts commit 9d8b66726d.
---------
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
* Add Cline Pass provider to VS Code extension
* Fix the model picker
* ClinePass specific options
* Add feature flag to the api options
* Extend flag usage
* fix type error
* Use the right model info
* Fix tests
* Hide price info for clinePass models
* feat(onboarding): add Cline Pass as optional user-type in signup flow
Surface Cline Pass as a recommended-but-optional onboarding choice gated
behind the ext-cline-pass feature flag, alongside Free / Frontier / BYOK.
When selected, signup provisions the cline-pass provider and ClinePass
model fields; price info is hidden since cost is covered by the
subscription. Falls back cleanly to the existing flow when the flag is
off. Adds unit tests for the new helpers.
* feat(onboarding): nudge + Cline Pass subscribe link in signup flow
Strengthen the Cline Pass onboarding option with a 'Recommended' copy
nudge (text + ordering, no badge/paid-default), and add an additive
subscribe affordance on the post-signup 'Almost there!' step that links
to {appBaseUrl}/dashboard/plan. Client-only: reuses existing appBaseUrl
from useClineAuth and the existing dashboard subscribe page; no backend
change. Shown only when the user selects Cline Pass; existing flow and
other user-types are unchanged.
* refactor(onboarding): redirect Cline Pass signup to subscription page
Replace the manual 'Get Cline Pass' callout with an automatic redirect:
after a Cline Pass user completes account creation, open the dashboard
subscription signup page (/onboarding/individual-plan) in the browser.
Keep the free option first and default-selected, with Cline Pass shown
second and labeled '(Recommended)'.
* chore(onboarding): tighten inline comments
* fix(onboarding): constrain Cline Pass selection and clear stale subscribe redirect
Addresses review findings:
- Never save a non-Cline-Pass model id under the cline-pass provider:
Cline Pass selection no longer falls back to a free model when the
Cline Pass list is empty, the generic model search is hidden for Cline
Pass, finishOnboarding guards on a cline-pass/ id, and the CTA is
disabled (with an empty state) when no Cline Pass model is available.
- Clear the pending subscription redirect when the user backs out, signs
in, or navigates away from Cline Pass, and re-check userType in the
redirect effect so a late auth update can't force the paid flow.
* fix(onboarding): add userType to handleFooterAction deps
The signup handler reads userType (to set the pending Cline Pass
subscribe flag); make that dependency explicit rather than relying on
the transitive finishOnboarding dependency.
* fix(onboarding): gate Cline Pass model data by feature flag
* fix(onboarding): address Greptile review on Cline Pass signup
- Log when the Cline Pass provider write is skipped due to an unexpected
(non cline-pass/) model id, so the otherwise-silent no-op is observable.
- Open the subscription page for already-authenticated users by invoking
the redirect helper directly after accountLoginClicked resolves, not
only via the auth effect (which never re-runs when clineUser is
unchanged).
* fix(onboarding): preserve ClinePass selection through login + one-word branding
- handleAuthCallback no longer forces the provider back to 'cline' on
login when the user picked Cline Pass during onboarding; it preserves a
'cline-pass' selection per mode. Only 'cline-pass' configs are affected
(which require the ext-cline-pass flag), so all other logins are
unchanged.
- Open the subscription page solely from the clineUser auth effect; the
signup action no longer also calls it directly (prevents the login
browser and subscribe page opening at once / dead-ends for already-
authenticated users). Signup flow is otherwise untouched.
- Rename user-facing 'Cline Pass' to one-word 'ClinePass' (card titles,
step title, empty state) and the model group label to 'clinepass'.
* chore(onboarding): normalize ClinePass branding in comments, trim verbose comments
* fix(merge): resolve ApiOptions redeclare + apply biome semicolon formatting
- Remove duplicate CLINE_PASS_FEATURE_FLAG const in ApiOptions.tsx (the
shared import from constants/featureFlags supersedes main's local const).
- Apply biome format (semicolons) to onboarding/controller files so they
match main's current style and pass Quality Checks.
* fix: restore clean no-semicolon formatting, keep only real ClinePass changes
The previous merge-recovery commit ran a local biome that incorrectly added
semicolons across entire files, bloating the diff by ~2000 LOC. Restore the
files to their clean pre-format state (matching main's asNeeded style) so the
diff reflects only the actual ClinePass onboarding changes (~420 LOC). Keeps
the handleAuthCallback provider-preservation fix and the ApiOptions duplicate
const removal.
* chore(onboarding): trim redundant inline comments
* chore: match main in refreshClineRecommendedModels (drop snake_case cline_pass handling)
* chore: trim featureFlags.ts comment
* fix(onboarding): open ClinePass subscribe page from App, not OnboardingView
handleAuthCallback marks the welcome view completed (unmounting OnboardingView)
before it pushes the auth-status update that sets clineUser. The redirect effect
lived in OnboardingView, so the pending-subscribe intent was lost on unmount and
the subscription page never opened for new ClinePass users.
Move the pending intent to a module-level store (clinePassSubscribe.ts) and run
the redirect from an effect in App, which outlives the onboarding unmount.
---------
Co-authored-by: BarreiroT <tomasmbarreiroi@gmail.com>
* Make sections expandable and add ClinePass
* fix label
* Map clinePass models to clinePass and the rest to cline
* gate the models behind the feature flag
* Do not allow custom model on cline pass
* Do not show the count on the mode list
* fix clinepass model list
* fix focus when expanding a section
* update the model data when the provider doesn't match
* Add ClinePass to the onboarding screen
* Fix the auth flow not starting
* Hide option behind a feature flag
* Update icon
* Remove unrelated changes
* Hide the custom model id
* fix model names
* remove custom model id option
* fix tests
* Fix names
* Display the clinepass models in the onboarding
* Throw a specific error when the user isn't subscribed
* properly render the error message
* fix error detection
* refactor
* Update the ResponseErrorHandler type
* re-add trailing slash
* Clear organization on ClinePass selection on the VSCode extension
* Disable remote config if ClinePass is selected
* Disable remote config if ClinePass is selected
* Revert formatting changes
* fix issue
Update the Fireworks model registry in apps/vscode/src/shared/api.ts:
- Add accounts/fireworks/models/glm-5p2: new general-purpose model with
a 1,048,576-token context window (131,072 output).
- Add accounts/fireworks/routers/kimi-k2p6-fast: standardizes the
Kimi K2.6 router on the `-fast` naming convention used for /routers.
The existing kimi-k2p6-turbo entry is retained for now to avoid
breaking user workflows; the turbo variant is expected to be removed
in a future release once the fast variant is the only one served.
- Correct the cache-read price for accounts/fireworks/models/deepseek-v4-flash
from 0.03 to 0.028 to match the published rate.
Pricing sourced from https://docs.fireworks.ai/serverless/pricing.
* Add Cline Pass provider to VS Code extension
* Fix the model picker
* ClinePass specific options
* Add feature flag to the api options
* Extend flag usage
* fix type error
* Use the right model info
* Fix tests
* Hide price info for clinePass models
* Add friendly Cline Pass entitlement error UI
When a Cline Pass model returns a 403 ENTITLEMENT_ERROR (user not subscribed to the required model plan), the chat dumped the raw serialized error JSON and pointlessly auto-retried it.
- Add ClineErrorType.Entitlement, classified before the generic 403/auth path.
- Skip auto-retry (and the retries-exhausted message) for entitlement errors.
- Render a dedicated EntitlementError card: friendly headline, env-aware 'Get Cline Pass' subscribe link (clineUser.appBaseUrl, falling back to production), and a Retry button; backend detail is shown as muted support text.
- Add unit/component tests and a Storybook story.
* Scope entitlement to individual case; fix path-prefixed subscribe URL
- ClineError: only classify the individual 'not subscribed' ENTITLEMENT_ERROR as Entitlement (checks message and details.message). Org-account variant falls through to generic handling rather than showing a misleading 'Get Cline Pass' card.
- EntitlementError: build the subscribe URL with a relative path against a trailing-slash-normalized base so path-prefixed self-hosted/proxy app URLs (e.g. https://proxy.example.com/cline/app) are preserved instead of resetting to origin.
- Tests: add org-exclusion case, path-prefixed URL case, and assert the retry askResponse payload (yesButtonClicked).
* Trim redundant inline comments
* Add provider test: pre-stream 403 entitlement error classifies correctly
Documents and locks in that a 403 ENTITLEMENT_ERROR (which rejects completions.create before streaming, as an OpenAI SDK APIError) propagates through ClineHandler with the code intact so ClineError classifies it as Entitlement. Confirms the error does not rely on the mid-stream chunk.error path.
* Guard subscribe URL build against malformed appBaseUrl
Wrap new URL() in try/catch so an invalid appBaseUrl from the auth context omits the subscribe link instead of throwing TypeError and crashing the EntitlementError card mid-render. Addresses Greptile review feedback; adds a malformed-URL test.
* test: trim entitlement error UI coverage
* Use one-word 'ClinePass' in user-facing copy
Renames the display text in the entitlement card (headline, helper, button) and related tests/story/comments from 'Cline Pass' to 'ClinePass'. Also normalizes EntitlementError.test.tsx formatting to the webview Biome style.
* fix: skip subagent retries for ClinePass entitlement errors
---------
Co-authored-by: BarreiroT <tomasmbarreiroi@gmail.com>
Co-authored-by: Tomás Barreiro <52393857+BarreiroT@users.noreply.github.com>
* Add Cline Pass provider to VS Code extension
* Fix the model picker
* ClinePass specific options
* Add feature flag to the api options
* Extend flag usage
* fix type error
* Use the right model info
* Fix tests
* Hide price info for clinePass models
* refactor
* remove redundancy
* fix syncModeConfigurations
* Make sections expandable and add ClinePass
* fix label
* Map clinePass models to clinePass and the rest to cline
* gate the models behind the feature flag
* Do not allow custom model on cline pass
* Do not show the count on the mode list
* fix clinepass model list
* fix focus when expanding a section
* update the model data when the provider doesn't match
* Add ClinePass to the onboarding screen
* Fix the auth flow not starting
* Hide option behind a feature flag
* Update icon
* Remove unrelated changes
* Hide the custom model id
* fix model names
* remove custom model id option
* fix tests
* Fix names
* Display the clinepass models in the onboarding
* feat(cli): add cline skill command aliasing the open skills CLI
Adds a 'cline skill' command that forwards to Vercel's open skills CLI
via 'npx -y skills@latest <args>', giving parity with 'cline plugin
install' and 'cline mcp' without reimplementing skill installation.
install/add/i default to '--agent cline' (unless the user passes their
own -a/--agent) so installs land in a directory Cline already scans;
use/list/remove pass through verbatim.
* fix(cli): scope skill update to cline