scalix 1.4.1 → 1.5.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/CHANGELOG.md +60 -0
- package/README.md +29 -10
- package/dist/agent-replay.js +2 -1
- package/dist/agent.js +319 -26
- package/dist/api-client.js +159 -26
- package/dist/cli.js +671 -252
- package/dist/cloud.js +94 -5
- package/dist/constants.js +96 -10
- package/dist/cost-tracker.js +43 -5
- package/dist/headless.js +44 -20
- package/dist/ipc-server.js +63 -12
- package/dist/keychain.js +46 -22
- package/dist/markdown.js +18 -1
- package/dist/providers/index.js +31 -0
- package/dist/providers/openai.js +149 -0
- package/dist/settings.js +117 -8
- package/dist/slash-commands.js +148 -0
- package/dist/sub-agent.js +1 -0
- package/package.json +13 -3
- package/PARITY-PLAN.md +0 -116
- package/docs/DISTRIBUTION.md +0 -301
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,66 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to Scalix Coder will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.5.1] - 2026-08-08
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Scalix Cloud key for BYOK sessions.** The platform tools (deploy, database, storage, …) now run on their own credential pair, independent of inference: `SCALIX_CLOUD_API_KEY` / `SCALIX_CLOUD_BASE_URL` env, a keychain slot and settings row in the VS Code extension, and a wizard step in the CLI. Inference on your own endpoint, deploys still on Scalix — the BYOK key never reaches Scalix and the Scalix key never reaches your endpoint. The IPC engine now registers the cloud tools at startup; the GUI previously had none at all, and models asked to deploy invented SDKs and CLI flags instead.
|
|
9
|
+
- **Guided setup.** Full-page setup panel in the extension (provider presets, key/model/limits, engine and terminal-CLI status with an install button) that auto-opens on first run and lands in chat after save; `/setup` slash command in both surfaces.
|
|
10
|
+
- **The agent knows what is at its disposal.** While a cloud connection is live, every request carries a section listing the registered `scalix_*` tool groups and the platform's ~30s per-call execution ceiling, steering long operations to the async pairs (`scalix_build_create` → poll `scalix_build_status`) instead of one blocking call that the transport would kill.
|
|
11
|
+
- **Scope-aware tool catalog.** The catalog is filtered client-side by the API key's scope families, so the model only sees tools its key can plausibly call; `/cloud status` reports "N of M available to this key" and says when the key's own project binding overrides a configured project id (the platform ignores the header for API keys — the key wins).
|
|
12
|
+
- **Key-shape guidance.** Platform tools need a project-scoped key with the `database:query` scope; setup copy now says so everywhere a key is entered, and the two known rejections map to one-line remedies (400 = org-wide key, 403 = missing database scope) in the wizard, `/cloud status`, headless warnings and the extension banner.
|
|
13
|
+
- `/status` marks the context window as *assumed* when neither the user nor the API supplied a spec for the active model, and points at the `/setup` context-window override — no invented numbers.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- **Scalix product steering is gated on connection state.** Full platform guidance only while Scalix Cloud is connected; a single neutral pointer on the Scalix provider while disconnected; nothing Scalix-specific on pure BYOK sessions. Coder is a generic tool — the pitch arrives with the tools, not before.
|
|
17
|
+
- Cloud tool-call budget cut from 120s to 45s: the platform transport ends a call at ~30–35s, so the extra 75s only ever waited on a dead call.
|
|
18
|
+
- Request timeout raised to 300s to match the platform's own walls (env-overridable via `SCALIX_REQUEST_TIMEOUT_MS`).
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
- **Model switching, 24 audited fixes + 3 from dogfooding videos.** `setModel` preserves the failover chain and mutates in place (sub-agents saw stale model lists), and resets the breaker; fresh sends no longer round-robin the chain; BYOK model specs are registered on every switch surface, so no more `max_tokens`-less requests that OpenRouter 400s; the TUI `/model` no longer fires mid-stream via the `/mode` prefix collision and persists chain-preservingly to the global config (project overrides no longer laundered); `/settings` reports live-vs-next-launch truthfully; a `SCALIX_MODEL` override is announced; the IPC engine survives stray rejections — a 429 used to kill the whole session.
|
|
22
|
+
- The system prompt forbids inventing `scalix` packages or CLI flags and explains the `scalix_*` tools, with pinned SDK names (`@scalix-world/sdk` on npm, `scalix-sdk` on PyPI) and exact model ids.
|
|
23
|
+
|
|
24
|
+
### Fixed (VS Code extension)
|
|
25
|
+
- Scalix keys are verified against `/v1/me` before storing — a rejected key gets a dialog with the reason instead of failing silently later. BYOK keys are never probed.
|
|
26
|
+
- Model QuickPick accepts mouse clicks under Antigravity's event ordering; model/command updates broadcast to every chat surface (the editor tab used to go stale); the shared-config watcher ignores its own writes, so adopting a config no longer reverts a fresh model switch; the settings Models tab was rebuilt — stable refresh, live active badge, auto-reload on provider/endpoint/key change.
|
|
27
|
+
- `vsce` packaging: the extension manifest carries the `repository` field CI packaging requires.
|
|
28
|
+
|
|
29
|
+
## [1.5.0] - 2026-08-02
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
- **BYOK — bring your own key and models.** New provider layer (`src/providers/`): the agent now runs against any **OpenAI-compatible endpoint** (OpenAI, OpenRouter, Ollama, LM Studio, Together, vLLM, LiteLLM, ...) with your own key. Setup wizard gained a provider step (Scalix stays the zero-config default/recommended); env config via `SCALIX_PROVIDER=openai` + `OPENAI_BASE_URL` + `OPENAI_API_KEY`. Endpoint roots are accepted with or without `/v1`. No default third-party endpoint — BYOK is fully opt-in.
|
|
33
|
+
- Provider-scoped behavior: BYOK endpoints stream every turn (native tool-call deltas), skip the Scalix-only `max_tokens` clamp, and never receive the Scalix `thinking_level` extension; Scalix Cloud platform tools are gated to the Scalix provider. Per-provider credential slots in the OS keychain; legacy `/v1`-suffixed Scalix bases keep working.
|
|
34
|
+
- BYOK model discovery reads whichever context-window field the endpoint actually reports (`context_length`, `max_model_len`, `max_context_length`, `context_window`, top level or under `top_provider`). A model that reports none is left without one rather than inheriting a borrowed number, and the wizard pre-fills a conservative 128K instead of a 1M figure almost no third-party model can honour.
|
|
35
|
+
- BYOK streams ask for `stream_options.include_usage`, so `/cost`, the status bar and the context meter carry real numbers instead of sitting on zero. Dropped for the session if the endpoint rejects the field.
|
|
36
|
+
- **Real cost tracking** — non-streaming responses read the platform's `x-scalix-cost-cents` estimate into `usage.cost`; `/cost` shows it as "Est. cost" with a pointer to console billing. No client-side price tables, nothing fabricated.
|
|
37
|
+
- 429/503 responses honor the server's `Retry-After` (capped at 60s) instead of blind exponential backoff, and the wait is now visible while it happens instead of the turn sitting silently on "Thinking...".
|
|
38
|
+
- `/status` shows the active provider; provider selection round-trips through config validation (whitelisted).
|
|
39
|
+
- A benchmark suite (`bench/`, repo only — not in the package): seven coding tasks graded by held-out verifiers that never exist in the workspace the agent sees, with protected paths and mutation-graded test writing. Runs against `bin/scalix.js`, the same entrypoint npm installs. `npm run bench` for the deterministic tier, `npm run bench:live` against a real model.
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
- **Responses no longer truncate mid-answer** — every request on the Scalix path sends an explicit `max_tokens`, and the ceiling is now 16,384 (matching the platform's own cap) rather than 4,000. Omitting the field lets the platform apply a much smaller default. The ceiling is per session: the client asks for 16,384 and falls back to 4,000 for the rest of the session if the endpoint rejects it, so older deployments keep working without configuration.
|
|
43
|
+
- **Tool calling against the Scalix platform** — agentic turns are no longer forced non-streaming. The client asks `/v1/ai/models` what the deployment supports and streams tool calls only where `streaming_tool_calls` is advertised; anything older, or unreachable, falls back to the non-streaming path that returns tool calls intact.
|
|
44
|
+
- The Scalix identity probe (`/v1/me`) is no longer sent on BYOK sessions. It was posting your provider key to a route that does not exist on OpenRouter/Ollama/vLLM and turning the resulting 404 into a "Scalix Cloud unavailable" warning on a session that never involved Scalix Cloud.
|
|
45
|
+
- Keychain reads and writes time out instead of hanging. A macOS keychain prompt nobody can see used to block the setup wizard's final keypress for ~20s with no feedback. When the keychain refuses outright and a secret has to stay in `config.json`, the app now says so instead of failing silently.
|
|
46
|
+
- Token and cost reporting: totals are derived when a server sends only prompt/completion halves; a resumed session no longer prints "12,000 (0 prompt + 0 completion)"; and a session that spent tokens but received no cost header says where the real figure lives instead of implying it was free.
|
|
47
|
+
- Terminal rendering: headings no longer arrive with their literal `##` attached, and emphasis inside list items is styled rather than printed as raw asterisks. Tool results are summarised to a readable line instead of a raw JSON envelope that buried the output and truncated the exit code. The banner is dropped rather than sliced in short or narrow terminals.
|
|
48
|
+
- `/help` and the `/` typeahead are generated from one catalog and can no longer disagree — `/update` was reachable but unlisted, while `/fork`, `/permissions`, `/resume` and `/skills` were listed but missing from `/help`.
|
|
49
|
+
- The setup wizard no longer opens its model step showing "At least one model is required" before anything has been typed.
|
|
50
|
+
- Replay files are written with owner-only permissions (0600), matching sessions/config.
|
|
51
|
+
|
|
52
|
+
### Fixed (VS Code extension)
|
|
53
|
+
- A tool that failed is shown as failed. Every tool reports failure the same way and the panel was marking them all with a success check, on live and replayed sessions alike.
|
|
54
|
+
- A model spec entered in the panel now reaches the engine: it is written to the shared config and pushed into the running process, where previously it affected no request at all.
|
|
55
|
+
- Responses can no longer be lost between the final stream delta and the end of a turn, which left an empty reply bubble on tool-heavy turns.
|
|
56
|
+
- Deleting a session asks first; the connection indicator can no longer read green while the engine is down; the thinking indicator stops when a turn ends without text; and the send button announces what it actually does when it becomes an abort button.
|
|
57
|
+
- Keyboard shortcut help is generated from the extension manifest, so it cannot drift from the real bindings. `Scalix Coder: Open` renamed to `Scalix Coder: Open Chat Panel`.
|
|
58
|
+
|
|
59
|
+
### Changed
|
|
60
|
+
- System prompt's Scalix Platform section corrected to real products and behavior: Scalix Run (via `scalix-cloud` CLI) for deploys, ScalixNova for databases, Scalix Sandboxes for code execution, exact `scalix-lumio-*` model ids, no "automatic model routing" claim, and an explicit provider-non-disclosure rule.
|
|
61
|
+
- Legacy public model ids in saved configs (`scalix-lite`, `scalix-balanced`, `scalix-max`, `scalix-embed`, `scalix-world-ai`, `scalix-advanced`) are normalized to their current Lumio ids on load.
|
|
62
|
+
- Chat completions now send `x-client-type: cli` (parity with the models/cloud endpoints).
|
|
63
|
+
- IPC `ready` event includes the engine `version` so the VS Code extension can detect engine/extension drift.
|
|
64
|
+
|
|
5
65
|
## [1.4.0] - 2026-07-05
|
|
6
66
|
|
|
7
67
|
### Added
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ AI-powered coding agent for the terminal and [VS Code](https://marketplace.visua
|
|
|
6
6
|

|
|
7
7
|

|
|
8
8
|
|
|
9
|
-
Scalix Coder is a full-featured AI coding assistant that runs in your terminal and in your editor — the extension is live on the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=scalix.scalix) and [Open VSX](https://open-vsx.org/extension/scalix/scalix) (Cursor/Windsurf/VSCodium). It connects to the Scalix API (or your own compatible endpoint) and gives AI direct access to your codebase through
|
|
9
|
+
Scalix Coder is a full-featured AI coding assistant that runs in your terminal and in your editor — the extension is live on the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=scalix.scalix) and [Open VSX](https://open-vsx.org/extension/scalix/scalix) (Cursor/Windsurf/VSCodium). It connects to the Scalix API (or your own compatible endpoint) and gives AI direct access to your codebase through 40 built-in tools — file editing, shell execution, search, git, web access, browser automation, vision, voice input, and more.
|
|
10
10
|
|
|
11
11
|
## One agent for your whole cloud
|
|
12
12
|
|
|
@@ -16,15 +16,34 @@ With a Scalix account, the agent is more than a coder: on start it fetches your
|
|
|
16
16
|
- `/cloud` shows your connection, plan, and available tools; `/cloud refresh` re-fetches the catalog
|
|
17
17
|
- No account (or catalog unreachable)? The agent says so once and runs in **local-only mode** with the built-in tools — nothing is faked
|
|
18
18
|
|
|
19
|
+
## Bring your own key (BYOK)
|
|
20
|
+
|
|
21
|
+
Scalix is the zero-config default, but the agent also runs against **any OpenAI-compatible endpoint** with your own key — OpenAI, OpenRouter, Ollama, LM Studio, Together, vLLM, LiteLLM, and friends. Pick "OpenAI-compatible endpoint" in the setup wizard (`scalix` → provider step, or `/setup`), or configure via env:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
export SCALIX_PROVIDER=openai
|
|
25
|
+
export OPENAI_BASE_URL=http://localhost:11434 # with or without /v1
|
|
26
|
+
export OPENAI_API_KEY=sk-...
|
|
27
|
+
export SCALIX_MODEL=llama3
|
|
28
|
+
scalix
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Notes:
|
|
32
|
+
- There is **no default third-party endpoint** — BYOK is fully opt-in and the endpoint URL is always yours.
|
|
33
|
+
- Scalix Cloud platform tools (database, deploys, storage, ...) are Scalix-only and are skipped on BYOK providers.
|
|
34
|
+
- On BYOK endpoints the agent streams every turn (tool calls included) and lets the server govern output limits; model context/output specs come from your `customModels` config when you want exact windows.
|
|
35
|
+
- Credentials are stored per provider (OS keychain / 0600 config), never shared between providers.
|
|
36
|
+
- Anthropic, Vertex, and Bedrock native adapters are specced follow-ups (see MULTI-PROVIDER-ADAPTER-SPEC.md).
|
|
37
|
+
|
|
19
38
|
## Features
|
|
20
39
|
|
|
21
40
|
- **Terminal UI** — Rich React/Ink interface with magenta-themed prompt, scrollable chat, streaming responses, and keyboard shortcuts
|
|
22
41
|
- **[VS Code Extension](https://marketplace.visualstudio.com/items?itemName=scalix.scalix)** — Sidebar chat panel with inline diffs, tab completion, inline chat (Cmd+I), codebase search, model picker, checkpoints, and session history
|
|
23
|
-
- **
|
|
42
|
+
- **40 Built-in Tools** — Shell, file read/write/edit, search (ripgrep), git, web fetch/search, directory tree, notebooks, browser automation, vision, voice input, sub-agents, task board
|
|
24
43
|
- **Security Sandbox** — Path traversal prevention, symlink detection, command blocklist, injection detection, SSRF protection
|
|
25
44
|
- **4 Permission Modes** — `plan` (read-only) / `default` (ask) / `auto` (auto-approve) / `yolo` (full autonomy)
|
|
26
45
|
- **Context Management** — Auto-compression, sliding window, per-model context limits
|
|
27
|
-
- **Dynamic Model Registry** — Models fetched from your Scalix account
|
|
46
|
+
- **Dynamic Model Registry** — Models fetched from your Scalix account; context windows applied when the platform supplies them (sensible defaults otherwise, or set exact limits per model in config)
|
|
28
47
|
- **Session Persistence** — Save, load, and resume conversations
|
|
29
48
|
- **Project Intelligence** — Auto-detects tech stack, conventions, git context
|
|
30
49
|
- **Plugin System** — Custom tools via `.scalix/plugins/`
|
|
@@ -199,14 +218,14 @@ Config is stored in `~/.scalix-coder/config.json`.
|
|
|
199
218
|
|
|
200
219
|
| Setting | Default | Description |
|
|
201
220
|
| ---------------------- | --------- | --------------------------------------------- |
|
|
202
|
-
| `maxSteps` |
|
|
203
|
-
| `maxMessages` |
|
|
221
|
+
| `maxSteps` | 500 | Tool-call rounds per request |
|
|
222
|
+
| `maxMessages` | 500 | History size |
|
|
204
223
|
| `maxContextTokens` | 1,000,000 | Context window (tokens) |
|
|
205
|
-
| `compressionThreshold` | 0.
|
|
206
|
-
| `maxToolResultTokens` |
|
|
207
|
-
| `commandTimeoutMs` |
|
|
208
|
-
| `bgCleanupMs` |
|
|
209
|
-
| `readFileMaxSize` |
|
|
224
|
+
| `compressionThreshold` | 0.80 | Auto-compress when context exceeds this ratio |
|
|
225
|
+
| `maxToolResultTokens` | 50,000 | Truncate tool results (tokens) |
|
|
226
|
+
| `commandTimeoutMs` | 120,000 | Shell command timeout (ms) |
|
|
227
|
+
| `bgCleanupMs` | 600,000 | Background process auto-cleanup (10 min) |
|
|
228
|
+
| `readFileMaxSize` | 50 MB | Max file size for read operations |
|
|
210
229
|
|
|
211
230
|
### Project Files
|
|
212
231
|
|
package/dist/agent-replay.js
CHANGED
|
@@ -110,7 +110,8 @@ export class AgentReplay {
|
|
|
110
110
|
async save() {
|
|
111
111
|
await fs.mkdir(REPLAYS_DIR, { recursive: true });
|
|
112
112
|
const filePath = path.join(REPLAYS_DIR, `${this.session.id}.json`);
|
|
113
|
-
|
|
113
|
+
// Replay files carry conversation content — same owner-only mode as sessions.
|
|
114
|
+
await fs.writeFile(filePath, JSON.stringify(this.session, null, 2), { encoding: 'utf-8', mode: 0o600 });
|
|
114
115
|
return filePath;
|
|
115
116
|
}
|
|
116
117
|
static async load(sessionId) {
|