Skip to content

Add Kiro subscription provider#2026

Merged
guillaumegay13 merged 1 commit into
mnfst:mainfrom
guillaumegay13:feat/kiro-subscription-provider
May 26, 2026
Merged

Add Kiro subscription provider#2026
guillaumegay13 merged 1 commit into
mnfst:mainfrom
guillaumegay13:feat/kiro-subscription-provider

Conversation

@guillaumegay13

@guillaumegay13 guillaumegay13 commented May 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add Kiro as a subscription-only provider using local Kiro CLI OAuth instead of an API-key/token paste flow
  • read and refresh the Kiro CLI OAuth token cache, store the encrypted CLI token blob, and unwrap it for proxy/model discovery
  • dynamically discover Kiro models from the Kiro AWS endpoint and forward chat through a Kiro eventstream adapter
  • add the Kiro provider UI, icon, CLI OAuth connect view, and focused backend/frontend coverage

Validation

  • npm --workspace manifest-shared run build
  • npm test --workspace=manifest-backend -- --runInBand routing/oauth/kiro-cli-token.spec.ts routing/oauth/kiro-oauth.service.spec.ts routing/kiro-oauth.controller.spec.ts routing/proxy/__tests__/proxy-fallback.service.spec.ts routing/proxy/__tests__/proxy.service.spec.ts routing/proxy/__tests__/provider-client.spec.ts routing/proxy/__tests__/provider-endpoints.spec.ts routing/proxy/__tests__/kiro-adapter.spec.ts model-discovery/model-discovery.service.spec.ts model-discovery/provider-model-fetcher.service.spec.ts common/constants/providers.spec.ts common/utils/provider-inference.spec.ts
  • npm --workspace manifest-backend run build
  • npm --workspace manifest-frontend run build
  • npm test --workspace=manifest-frontend -- providers.test.ts ProviderIcon.test.tsx
  • git diff --check HEAD

Notes: frontend build still reports the existing large Playground chunk warning. Backend Jest still prints the existing open-handle warning after passing.


Summary by cubic

Adds Kiro as a subscription-only provider using local Kiro CLI OAuth (cli_oauth). Discovers models from AWS and proxies chats to Kiro’s JSON event-stream with OpenAI-compatible SSE/JSON responses.

  • New Features

    • CLI OAuth: read/refresh Kiro CLI token cache, store encrypted CLI blob, unwrap for discovery/proxy; POST /api/v1/oauth/kiro/cli-connect endpoint and a CLI OAuth connect UI with copyable kiro-cli login --use-device-flow command and Kiro icon.
    • Model discovery: call AmazonCodeWhispererService.ListAvailableModels with pagination, infer context windows, and register kiro/* models; provider inference updated.
    • Proxy: Kiro adapter converts OpenAI-style requests, targets AWS AmazonCodeWhispererStreamingService.GenerateAssistantResponse, parses JSON event-stream frames (incl. errors/reasoning), and streams SSE or returns JSON; provider endpoint set to https://q.us-east-1.amazonaws.com with x-amz-target.
  • Migration

    • Install and log in with Kiro CLI: kiro-cli login --use-device-flow.
    • In Providers, select Kiro subscription and click Connect. Optionally set KIRO_CLI_BIN or KIRO_CLI_TOKEN_CACHE to customize CLI path/cache.

Written for commit 0e2b471. Summary will update on new commits. Review in cubic

@codecov

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.44%. Comparing base (41f6942) to head (0e2b471).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2026      +/-   ##
==========================================
+ Coverage   99.41%   99.44%   +0.03%     
==========================================
  Files         186      187       +1     
  Lines       17333    17452     +119     
  Branches     6874     6919      +45     
==========================================
+ Hits        17232    17356     +124     
+ Misses         99       94       -5     
  Partials        2        2              
Flag Coverage Δ
frontend 99.49% <100.00%> (+0.03%) ⬆️
shared 97.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codecov

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 4.83kB (0.23%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
manifest-frontend-esm 2.06MB 4.83kB (0.23%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: manifest-frontend-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/ProviderSelectModal-*.js 2.65kB 120.52kB 2.25%
assets/index-*.js 592 bytes 58.08kB 1.03%
assets/routing-*.js 1.34kB 37.23kB 3.75%
assets/providers-*.js 216 bytes 6.35kB 3.52%
assets/api-*.js 34 bytes 4.23kB 0.81%

Files in assets/ProviderSelectModal-*.js:

  • ./src/components/ProviderDetailView.tsx → Total Size: 20.78kB

  • ./src/components/CliOAuthDetailView.tsx → Total Size: 3.5kB

  • ./src/services/provider-api-key-urls.ts → Total Size: 1.24kB

  • ./src/services/api/oauth.ts → Total Size: 3.2kB

Files in assets/routing-*.js:

  • ./src/components/ProviderIcon.tsx → Total Size: 37.41kB

@guillaumegay13 guillaumegay13 marked this pull request as ready for review May 26, 2026 08:06
@guillaumegay13 guillaumegay13 force-pushed the feat/kiro-subscription-provider branch from 50666f0 to 88f2a2e Compare May 26, 2026 08:10

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 36 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/backend/src/routing/proxy/kiro-adapter.ts Outdated
@guillaumegay13 guillaumegay13 force-pushed the feat/kiro-subscription-provider branch 2 times, most recently from 9174c0f to 85209d3 Compare May 26, 2026 08:44
@guillaumegay13 guillaumegay13 force-pushed the feat/kiro-subscription-provider branch from 85209d3 to 0e2b471 Compare May 26, 2026 08:56
@guillaumegay13 guillaumegay13 merged commit 7bf1fbd into mnfst:main May 26, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant