Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ Current honest state:
sandbox XDG config tree so project-scope verification matches the local
resolver on `@kilocode/cli >=7.2.0` installs, and that temporary sandbox now
stages outside the repository with cleanup after verification
- the stock public build now ships `moonshotai/Kimi-K2.6` as the recommended
validated curated default, with installer-managed
- the installer now fetches `GET https://api.gonkagate.com/v1/models` after
safe API-key intake and uses that live response as the model source of truth
- the managed GonkaGate provider config writes every fetched chat-completions
model into Kilo's OpenCode-style `/models` picker with installer-managed
`limit.output = 8192` for Kilo `7.2.0` compatibility
- the managed GonkaGate provider config now writes the validated
chat-completions catalog, currently Kimi K2.6, Qwen3 235B A22B Instruct
2507 FP8, and MiniMax M2.7, so Kilo's OpenCode-style `/models` picker can
switch between validated GonkaGate models
- Kilo detection now accepts `@kilocode/cli >=7.2.0` without pre-blocking
future Kilo releases, while the audited compatibility baseline remains
`@kilocode/cli@7.2.0`
Expand All @@ -59,12 +57,12 @@ The intended happy path is:

1. user runs `npx @gonkagate/kilo-setup`
2. installer validates local `kilo` or fallback `kilocode`
3. installer offers curated validated Kilo model choices
4. installer auto-selects `project` inside a git repository or `user`
3. installer collects a GonkaGate key through a hidden prompt,
`GONKAGATE_API_KEY`, or `--api-key-stdin`
4. installer fetches live Kilo model choices from GonkaGate `/v1/models`
5. installer auto-selects `project` inside a git repository or `user`
otherwise, and only asks on interactive reruns when the previous
installer-managed scope differs from the new recommendation
5. installer collects a GonkaGate key through a hidden prompt,
`GONKAGATE_API_KEY`, or `--api-key-stdin`
6. installer writes the minimum safe Kilo config layers
7. for `project` installs, installer reports Kilo global UI-model cache risk
and can clear the current cached model on request
Expand Down Expand Up @@ -134,10 +132,8 @@ These are implementation facts today:
- `src/install/` contains shipped Kilo detection, path resolution, secret
intake, managed config writes, rollback, effective-config verification, and
orchestration
- `src/constants/models.ts` now exposes Kimi K2.6 as the recommended validated
production default plus the validated Qwen3 235B A22B Instruct 2507 FP8
and MiniMax M2.7 catalog entries, each with installer-managed
`limit.output = 8192` in the written Kilo provider config
- `src/install/model-catalog.ts` fetches and parses GonkaGate `/v1/models` as
the installer model source of truth
- `docs/specs/kilo-setup-prd/spec.md` is the copied Kilo setup PRD
- `docs/release-readiness.md` records the current production-readiness audit
- `.github/workflows/release-please.yml` and `.github/workflows/publish.yml`
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

- Fetched GonkaGate model availability from authenticated `GET /v1/models`
after safe API-key intake, using the live response for the model picker,
config writes, and `--model` validation.
- Updated managed GonkaGate `limit.context` values to match the current
deployed windows: `240000` for Kimi/Qwen and `180000` for MiniMax.
- Wrote the validated GonkaGate chat-completions catalog into the managed
Expand Down
36 changes: 15 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,10 @@ Current public baseline:
- package: `@gonkagate/kilo-setup`
- primary command after setup: `kilo`
- current transport target: `chat/completions`
- curated default:
`moonshotai/Kimi-K2.6`
- managed validated catalog for Kilo's OpenCode-style `/models` picker:
`moonshotai/Kimi-K2.6`,
`qwen/qwen3-235b-a22b-instruct-2507-fp8`, and
`minimaxai/minimax-m2.7`
- installer-managed `limit.output = 8192` for Kilo compatibility
- model source of truth: `GET https://api.gonkagate.com/v1/models` after safe
API-key intake
- Kilo's OpenCode-style `/models` picker receives every fetched GonkaGate model
- installer-managed `limit.output = 8192` for each fetched model entry
- no native Windows production claim yet

## Shortest Start Path
Expand All @@ -95,15 +92,16 @@ The installer will:

1. detect `kilo`, or fall back to `kilocode`
2. verify local Kilo is at least `@kilocode/cli >=7.2.0`
3. show the curated model choice
4. write the validated GonkaGate provider model catalog for Kilo's `/models`
3. collect your API key through a hidden prompt
4. fetch the live GonkaGate model catalog from `/v1/models`
5. show the live model choices
6. write the fetched GonkaGate provider model catalog for Kilo's `/models`
picker
5. choose the recommended scope automatically:
7. choose the recommended scope automatically:
- inside a git repository: `project`
- outside a repository: `user`
6. collect your API key through a hidden prompt
7. write the managed config and verify the result
8. return you to normal `kilo` usage
8. write the managed config and verify the result
9. return you to normal `kilo` usage

On interactive reruns, the installer asks about scope only if the last
installer-managed scope differs from the new recommendation.
Expand Down Expand Up @@ -205,18 +203,14 @@ This repository intentionally stays narrow today:

- minimum accepted Kilo floor: `@kilocode/cli >=7.2.0`
- current transport target: `chat/completions`
- current curated default:
`moonshotai/Kimi-K2.6`
- validated GonkaGate models exposed to Kilo's `/models` picker:
`moonshotai/Kimi-K2.6`,
`qwen/qwen3-235b-a22b-instruct-2507-fp8`, and
`minimaxai/minimax-m2.7`
- model availability comes from authenticated `GET /v1/models`
- if no explicit model is selected, setup uses the API-provided default when
present, otherwise the first returned model
- real-path Kilo verification is not the production default
- native Windows production support is not claimed yet
- future Kilo releases are not pre-blocked by version, but observed
compatibility breaks still need fixes
- unvalidated extra models and new flows are not implied just because this
package exists
- new transport flows are not implied just because this package exists

The shipped runtime treats effective Kilo config as the real success gate. It
uses the local resolver as the durable verifier and keeps the XDG-isolated
Expand Down
10 changes: 4 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ Current contract documents:
- [`specs/kilo-setup-prd/spec.md`](./specs/kilo-setup-prd/spec.md): copied Kilo
setup PRD from the planning repository

This repository ships the Kilo installer runtime with a validated curated
GonkaGate chat-completions catalog, Kimi K2.6 as the recommended default,
MiniMax M2.7 and Qwen3 235B A22B Instruct 2507 FP8 as additional validated
catalog entries, installer-managed `limit.output = 8192` for Kilo
compatibility, and a minimum accepted Kilo floor of `@kilocode/cli >=7.2.0`
without a preset upper version bound.
This repository ships the Kilo installer runtime with authenticated GonkaGate
`GET /v1/models` discovery as the model source of truth, installer-managed
`limit.output = 8192` for each fetched Kilo model entry, and a minimum accepted
Kilo floor of `@kilocode/cli >=7.2.0` without a preset upper version bound.
17 changes: 7 additions & 10 deletions docs/gonkagate-x-kilo.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,13 @@ Right now the public default is deliberately small:
- base URL: `https://api.gonkagate.com/v1`
- transport: `chat/completions`
- minimum Kilo floor: `@kilocode/cli >=7.2.0`
- recommended validated model: `moonshotai/Kimi-K2.6`
- validated catalog exposed to Kilo's OpenCode-style `/models` picker:
`moonshotai/Kimi-K2.6`,
`qwen/qwen3-235b-a22b-instruct-2507-fp8`, and
`minimaxai/minimax-m2.7`
- managed limits: `limit.output = 8192` for all validated entries;
`limit.context = 240000` for Kimi/Qwen and `180000` for MiniMax

We are treating model support as a curated list, not as a vague "it probably
works" promise.
- model source of truth: authenticated `GET /v1/models`
- catalog exposed to Kilo's OpenCode-style `/models` picker: every fetched
GonkaGate model id
- managed limit: `limit.output = 8192` for each fetched model entry

We are treating model availability as GonkaGate API truth, not as a checked-in
package catalog.

## What we are not claiming

Expand Down
52 changes: 25 additions & 27 deletions docs/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,48 +29,46 @@ Current public limit:
- the published contract keeps a minimum Kilo floor of
`@kilocode/cli >=7.2.0`, `chat/completions`, and non-Windows production
claims
- the curated default is
`moonshotai/Kimi-K2.6` with `limit.context = 240000` and
`limit.output = 8192`
- the written provider config includes the validated chat-completions model
catalog, currently `moonshotai/Kimi-K2.6`,
`qwen/qwen3-235b-a22b-instruct-2507-fp8`, and
`minimaxai/minimax-m2.7`, so Kilo's OpenCode-style `/models` picker can
switch between validated GonkaGate models
- broader model claims still require additional proof before models should be
added to the validated catalog
- model availability comes from authenticated `GET /v1/models` after safe
API-key intake
- the written provider config includes every fetched GonkaGate
chat-completions model so Kilo's OpenCode-style `/models` picker can switch
between the live GonkaGate options
- each fetched model entry gets installer-managed `limit.output = 8192` for
Kilo `7.2.0` compatibility

## Install Flow

1. Check that `kilo` is available, or fall back to `kilocode`.
2. Verify the minimum accepted Kilo floor: `@kilocode/cli >=7.2.0`.
3. Resolve the curated model choice and scope.
4. Use the recommended scope automatically in the default interactive flow:
- `project` inside a git repository
- `user` outside a repository
5. On interactive reruns, ask about scope only when the previous
installer-managed scope differs from the new recommendation.
6. Accept a GonkaGate API key through:
3. Accept a GonkaGate API key through:
- a hidden interactive prompt
- `GONKAGATE_API_KEY`
- `--api-key-stdin`
7. Save the secret only under `~/.gonkagate/kilo/api-key`.
8. Write or update the user-level provider definition, including the validated
4. Fetch the live GonkaGate model catalog from `GET /v1/models`.
5. Resolve the live model choice and scope.
6. Use the recommended scope automatically in the default interactive flow:
- `project` inside a git repository
- `user` outside a repository
7. On interactive reruns, ask about scope only when the previous
installer-managed scope differs from the new recommendation.
8. Save the secret only under `~/.gonkagate/kilo/api-key`.
9. Write or update the user-level provider definition, including the fetched
GonkaGate model catalog for Kilo's `/models` picker.
9. When `project` scope is chosen, write only activation settings into
`.kilo/kilo.jsonc`.
10. On rerun, remove only installer-owned stale GonkaGate activation from the
10. When `project` scope is chosen, write only activation settings into
`.kilo/kilo.jsonc`.
11. On rerun, remove only installer-owned stale GonkaGate activation from the
old location and preserve unrelated Kilo config.
11. Verify the durable intended Kilo outcome with the local resolver and use
12. Verify the durable intended Kilo outcome with the local resolver and use
the XDG-isolated oracle as a compatibility check.
12. If `KILO_CONFIG_CONTENT` is active, or the installer is running inside an
13. If `KILO_CONFIG_CONTENT` is active, or the installer is running inside an
active `kilo` terminal session with runtime config overrides, verify the
current session separately.
13. For `project` installs, surface Kilo global UI-model cache notices and
14. For `project` installs, surface Kilo global UI-model cache notices and
optionally clear the current cached model when the user requests it.
14. Report redacted blockers or mismatches instead of printing raw resolved
15. Report redacted blockers or mismatches instead of printing raw resolved
config.
15. Finish by sending the user back to plain `kilo`.
16. Finish by sending the user back to plain `kilo`.

## Why User-Level Provider Ownership

Expand Down
52 changes: 21 additions & 31 deletions docs/release-readiness.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@ docs, and tests for these facts:
- Kilo command contract: `kilo` first, `kilocode` as fallback
- minimum Kilo compatibility floor: `@kilocode/cli >=7.2.0`
- current GonkaGate transport claim: `chat/completions`
- curated public default:
`moonshotai/Kimi-K2.6`
- validated provider catalog exposed to Kilo's OpenCode-style `/models` picker:
`moonshotai/Kimi-K2.6`,
`qwen/qwen3-235b-a22b-instruct-2507-fp8`, and
`minimaxai/minimax-m2.7`
- curated model limits for the validated catalog:
`limit.output = 8192` for all validated entries; `limit.context = 240000`
for Kimi/Qwen and `180000` for MiniMax
- model availability source: authenticated `GET /v1/models`
- provider catalog exposed to Kilo's OpenCode-style `/models` picker: every
fetched GonkaGate model id
- model limit written for Kilo compatibility: `limit.output = 8192` for each
fetched model entry
- managed secret path: `~/.gonkagate/kilo/api-key`
- project scope stays secret-free and still depends on a compatible
user-level `provider.gonkagate` definition on each machine
Expand All @@ -34,21 +30,16 @@ docs, and tests for these facts:

## External Evidence Captured

The current model-limit contract is backed by product direction plus Gonka
deployment metadata checked on 2026-06-23:
The current model contract is backed by product direction plus Kilo
compatibility evidence:

- Gonka deployment model args list Kimi K2.6 and Qwen3 235B A22B Instruct 2507
FP8 with `--max-model-len 240000`
- Gonka deployment model args list `minimaxai/minimax-m2.7` with
`--max-model-len 180000`
- the model card documents OpenAI-compatible chat completions access through
Moonshot's API
- the API docs describe the supported request path as `POST /v1/chat/completions`
- the package writes `limit.output = 8192` for validated catalog entries as
the installer-managed Kilo compatibility clamp because Kilo `7.2.0` requires
a numeric output limit in custom model config
- the package keeps the same installer-managed `limit.output = 8192`
compatibility clamp for every validated catalog entry
- model availability is resolved from GonkaGate `GET /v1/models` after safe
API-key intake
- the API docs describe the supported request path as
`POST /v1/chat/completions`
- the package writes `limit.output = 8192` for fetched catalog entries as the
installer-managed Kilo compatibility clamp because Kilo `7.2.0` requires a
numeric output limit in custom model config
- npm registry metadata checked on 2026-04-29 showed `@kilocode/cli` patch
releases in the `7.2.x` line, including `7.2.14`, with both `kilo` and
`kilocode` binaries still exposed by the wrapper package
Expand All @@ -62,22 +53,21 @@ The repository must continue to avoid these claims:
- no claim that GonkaGate `responses` transport works today
- no claim that real-path Kilo verification is the production default
- no claim that native Windows production support is proven
- no claim that every future Kilo behavior or live GonkaGate model is
proven just because the current curated default is shipped
- no claim that every future Kilo behavior or live GonkaGate model is proven
beyond fetching and writing the catalog shape

## Remaining Follow-Up Items

These items still benefit from fresh proof or human review outside this
repository-only pass:

- fresh live GonkaGate/Kilo smoke evidence when the selected public model or
Kilo baseline changes
- fresh live GonkaGate/Kilo smoke evidence when Kilo's model config
requirements or transport behavior changes
- native Windows oracle-safety proof on a real runner or equivalent native VM
- product/legal approval for public publishing under
`@gonkagate/kilo-setup`

Those items do not change the current package contract: the publishable surface
remains the minimum Kilo `7.2.0` floor without an upper version bound, the
validated GonkaGate chat-completions catalog with Kimi as the recommended
default, Qwen3 and MiniMax as additional validated entries, and the current
non-Windows verification policy documented above.
remains the minimum Kilo `7.2.0` floor without an upper version bound,
authenticated GonkaGate `/v1/models` discovery for the chat-completions
catalog, and the current non-Windows verification policy documented above.
7 changes: 4 additions & 3 deletions docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ proven.
that sandbox up after verification
- do not claim real-path Kilo verification as the production default

The current runtime already rejects plain `--api-key`, keeps stock public runs
blocked before writes when no validated curated model exists, and redacts
secret-bearing text on user-facing error paths.
The current runtime already rejects plain `--api-key`, fetches the model
catalog only after safe API-key intake, blocks before writes when `/v1/models`
does not return usable models, and redacts secret-bearing text on user-facing
error paths.
3 changes: 3 additions & 0 deletions docs/specs/kilo-setup-prd/compatibility-spike-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

Date: April 14, 2026

Current model availability comes from authenticated GonkaGate `GET /v1/models`;
model ids below are historical evidence examples, not the runtime catalog.

These notes preserve redacted evidence for the GonkaGate Kilo setup PRD. They do
not contain raw `kilo debug config` output or real secrets.

Expand Down
15 changes: 9 additions & 6 deletions docs/specs/kilo-setup-prd/implementation-plan.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Implementation Plan: GonkaGate Kilo Setup

Current repository behavior supersedes the draft model-catalog tasks below:
the installer now fetches authenticated `GET /v1/models` after safe API-key
intake and uses that live response for model choices, config writes, and
`--model` validation.

## Overview

This plan breaks the draft PRD into ordered, verifiable implementation tasks.
Expand Down Expand Up @@ -317,7 +322,7 @@ diagnostics for the user and for machine-readable JSON output.

- [ ] Detect `KILO_CONFIG`, `KILO_CONFIG_DIR`, home-level directory, and
`KILO_CONFIG_CONTENT` blockers.
- [ ] Detect provider shape mismatch, missing curated model entry, provider
- [ ] Detect provider shape mismatch, missing selected model entry, provider
allow/deny, provider whitelist/blacklist, and secret-binding provenance
mismatch.
- [ ] Treat `disabled_providers` as stronger than `enabled_providers` when both
Expand Down Expand Up @@ -422,14 +427,13 @@ sandbox and installer-owned targets.
## Task 12: Enable Interactive Setup

**Description:** Replace scaffold-only execution with an interactive install
flow that detects Kilo, shows the installed version, offers curated model
choices, recommends scope, accepts a hidden secret, writes config, verifies, and
flow that detects Kilo, shows the installed version, fetches live model choices from `/v1/models`, recommends scope, accepts a hidden secret, writes config, verifies, and
ends by sending the user back to plain `kilo`.

**Acceptance criteria:**

- [ ] Interactive flow shows the selected Kilo command and version.
- [ ] Model picker shows only validated curated choices.
- [ ] Model picker shows fetched `/v1/models` choices.
- [ ] Project scope is recommended inside a git repository and user scope
outside a git repository.
- [ ] Prompt text explains Kilo-specific scope effects in user language.
Expand Down Expand Up @@ -626,8 +630,7 @@ acceptance criteria before claiming production installer support.

## Open Questions

- What is the proven numeric `limit.output` for
`qwen/qwen3-235b-a22b-instruct-2507-fp8`?
- What numeric `limit.output` policy should fetched model entries use?
- Does the live GonkaGate/Kilo `chat/completions` smoke pass tool-call behavior
for the selected model?
- Will product/legal approve `@gonkagate/kilo-setup` as the public package
Expand Down
Loading
Loading