diff --git a/.agents/skills/release/SKILL.md b/.agents/skills/release/SKILL.md index 0ec890c..c6c4a48 100644 --- a/.agents/skills/release/SKILL.md +++ b/.agents/skills/release/SKILL.md @@ -77,7 +77,7 @@ the version, builds the five targets, publishes the five `@ondeinference/onde-code`. Publishing is skipped for a version that is already on npm, so re-running is safe. -Watch the run at `https://github.com/kelvin-soen/OndeCode/actions`. +Watch the run at `https://github.com/ondeinference/onde-code/actions`. After both workflows finish, confirm the npm package: diff --git a/.github/workflows/release-winget.yml b/.github/workflows/release-winget.yml index 6b0125e..bd7887f 100644 --- a/.github/workflows/release-winget.yml +++ b/.github/workflows/release-winget.yml @@ -35,7 +35,7 @@ permissions: contents: read env: - REPO: kelvin-soen/OndeCode + REPO: ondeinference/onde-code PACKAGE_IDENTIFIER: OndeInference.OndeCode jobs: diff --git a/Cargo.lock b/Cargo.lock index 9f05bdc..f3feedb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1621,7 +1621,7 @@ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "onde-code" -version = "1.1.0" +version = "1.1.1" dependencies = [ "agent-client-protocol", "anyhow", @@ -1643,7 +1643,7 @@ dependencies = [ [[package]] name = "onde-code-agent" -version = "1.1.0" +version = "1.1.1" dependencies = [ "agent-client-protocol", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index a589c12..3ac95de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,17 +3,17 @@ resolver = "3" members = ["crates/agent", "crates/cli"] [workspace.package] -version = "1.1.0" +version = "1.1.1" edition = "2024" license = "Apache-2.0" -repository = "https://github.com/kelvin-soen/OndeCode" +repository = "https://github.com/ondeinference/onde-code" homepage = "https://ondeinference.com" [workspace.dependencies] # Onde Agent Platform: the ACP server, terminal UI and MCP layer, from the onde-ed workspace. ed-acp = "1.3.5" ed-acp-tui = "1.3.5" -onde-code-agent = { version = "1.1.0", path = "crates/agent" } +onde-code-agent = { version = "1.1.1", path = "crates/agent" } agent-client-protocol = "2.2" anyhow = "1.0.104" async-trait = "0.1" diff --git a/README.md b/README.md index eb26772..6b152f5 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,46 @@ -# Onde Code +

+ Onde Inference +

-Onde Code is Onde Inference's ACP-compatible coding agent for model fine-tuning and deployment. +

Onde Code

-It speaks the [Agent Client Protocol](https://agentclientprotocol.com) (ACP), so it runs inside any -ACP editor (Zed, JetBrains, Xcode, Neovim and others), and it has its own TUI for the terminal. It is -written in Rust on the official [ACP Rust SDK](https://github.com/agentclientprotocol/rust-sdk). -Inference comes from [Onde Inference](https://ondeinference.com) by default, and the agent also -accepts any OpenAI API compatible endpoint. +

+ Fine-tune, manage and deploy models without leaving your editor. +

-It is one static binary with no runtime to install. It implements ACP v1, including the optional -parts editors actually use: session list/resume/close/delete, multi-root workspaces, MCP servers, -config options and slash commands. The [conformance audit](https://github.com/kelvin-soen/OndeCode/issues/25) -lists every spec page and where each requirement is handled. +

+ Website + npm + Crates.io + Release + CI + License +

-## Install - -Prebuilt binaries for macOS (arm64, x64), Linux (arm64, x64) and Windows (x64) are attached to -each [GitHub release](https://github.com/kelvin-soen/OndeCode/releases), along with a -`checksums.txt`: +

+ Swift · Flutter · React Native · Rust · Website +

-```sh -curl -LO https://github.com/kelvin-soen/OndeCode/releases/latest/download/onde-code-darwin-arm64.tar.gz -tar -xzf onde-code-darwin-arm64.tar.gz && mv onde-code ~/.local/bin/ -``` +--- -Or install from npm, which pulls in the right binary for your platform: - -```sh -npm install -g @ondeinference/onde-code -``` +Onde Code is a coding agent for your model work on [Onde Inference](https://ondeinference.com). It +writes and runs the fine-tuning, model management and deploy code in your repo, and it works in any +[Agent Client Protocol](https://agentclientprotocol.com) (ACP) editor or in the terminal. It is free +and Apache-2.0. Onde Inference is the hosted side: get an app key at +[ondeinference.com](https://ondeinference.com). -Editors can run it without a global install: `npx @ondeinference/onde-code --acp`. +It is one static binary written in Rust, and it also accepts any OpenAI API compatible endpoint. -Or build from source (Rust 1.88 or newer): +## Install ```sh -cargo build --release # -> target/release/onde-code +npm install -g @ondeinference/onde-code # pulls in the binary for your platform +npx @ondeinference/onde-code --acp # or run it without installing, from an editor ``` -A listing in the [ACP registry](https://agentclientprotocol.com/get-started/registry) is in review -([agentclientprotocol/registry#652](https://github.com/agentclientprotocol/registry/pull/652)). -Once it lands, editors that read the registry can install onde-code without the steps above. +Prebuilt archives for macOS, Linux and Windows are on the +[releases page](https://github.com/ondeinference/onde-code/releases). Building from source and the +ACP registry are covered in [docs/install.md](docs/install.md). ## Quick start @@ -50,168 +50,34 @@ cd my-project onde-code # terminal UI ``` -`--login` opens ondeinference.com. You sign in, pick an org and an app (or create one), and press -Connect. The app key goes back to the agent through a one-time code and PKCE, so it never appears -in a URL. It prints the URL too, for ssh and headless machines. Prefer to paste a key, or use another -OpenAI API compatible endpoint? Run `onde-code --setup` instead (the key is checked live, then stored). - -Both store the key in the platform config dir: `~/Library/Application Support/ondecode/env` -on macOS, `~/.config/ondecode/env` on Linux, `%APPDATA%\ondecode\env` on Windows. A variable set -in the environment wins over the same one in that file, so CI and editor configs can pass a key -directly. - -## Use it in an editor - -Editors launch the agent with piped stdio, which switches it to ACP mode (`--acp` forces it). In -Zed, add it to `settings.json`: - -```json -{ - "agent_servers": { - "Onde Code": { - "type": "custom", - "command": "/absolute/path/to/onde-code", - "args": ["--acp"], - "env": { - "ONDE_API_KEY": "APP_ID:APP_SECRET" - } - } - } -} -``` +`--login` opens ondeinference.com, and the app key comes back to the agent without appearing in a +URL. Prefer to paste a key? Run `onde-code --setup`. -The agent offers a **Sign in with Onde** method, which opens ondeinference.com in your browser (as a -URL prompt when the editor supports it). A key that already works, from the environment or the stored -file, passes without opening anything. Until one exists the agent answers `session/new`, `session/load`, `session/resume` and `session/prompt` with -`AUTH_REQUIRED`. Once you have signed in (or `--setup` succeeds), the running agent picks up the -stored key, so the open thread comes back without restarting anything. Logging out from the editor -deletes the stored key and the saved sign-in (`session.json`). +## Use it your way -In the editor you get: +- **In an editor:** Zed, Android Studio and other JetBrains IDEs, Xcode, marimo, Neovim and other ACP clients run `onde-code --acp`. + See [docs/editors.md](docs/editors.md). +- **In the terminal:** `onde-code` opens a chat UI that asks before every edit and command. See + [docs/terminal.md](docs/terminal.md). +- **Embedded in your app:** the [`onde-code-agent`](crates/agent) crate serves the agent in + process, for hosts that can't launch a subprocess. +- **For model operations:** pass [`onde --mcp`](docs/models.md) to the agent as an MCP server, and + it can list, register and assign models on your Onde Inference account. -- a model picker, filled from the endpoint's `GET /models` (or `ONDE_CODE_MODELS`) -- an "Auto-approve actions" toggle, in editors that support boolean config options -- `/models` and `/setup` slash commands, answered locally without a model call -- a thread history: sessions can be listed, resumed, loaded (with full replay), closed and - deleted. Sessions are saved to disk, so threads reopen with their history after the editor - or the agent restarts. Permission choices ("always allow", auto-approve) are not saved. +## Docs -## Use it in the terminal +The [docs index](docs/README.md) covers install, editors, what the agent does, the terminal UI, +model workflows, providers and configuration, and development. -```sh -onde-code # asks before every edit and command -onde-code --yolo # approves everything -onde-code --root ../shared-lib # add another workspace root (repeatable) -``` +## Contributing -Enter sends, Esc cancels a running turn, ↑/↓ and PgUp/PgDn scroll, Ctrl-C or `/quit` exits. -Permission prompts take `y` (allow), `a` (always allow this tool) or `n` (reject). - -The TUI is an ACP client itself. It starts `onde-code --acp` as a subprocess and speaks the same -protocol an editor does, so the terminal and the editor exercise the same code paths. - -## What the agent does - -- **Tools:** `read_file`, `write_file`, `edit_file`, `list_directory` and `run_command`. Every - tool takes an optional `root`, so the model can work across all roots of a multi-root - workspace. Each call is reported with its name, kind, absolute locations, diff, raw input and - output, and status. -- **Editor routing:** file reads and writes go through the client's `fs/*` methods when it - advertises them, so the agent sees unsaved buffers. Commands run in the client's `terminal/*` - when available, otherwise in a local `sh -c` (on Windows, `sh` has to be on `PATH`, for - example from Git for Windows). Commands time out after `ONDE_CODE_COMMAND_TIMEOUT_SECS`. -- **Permissions:** writes and commands ask through `session/request_permission` with allow once, - always allow, reject once and always reject. `--yolo`, `ONDE_CODE_YOLO=1` or the auto-approve - toggle skip the prompt. -- **MCP:** MCP servers passed in `session/new`, `session/load` or `session/resume`, over stdio - or streamable HTTP, are connected per session, and their tools are offered to the model as `mcp____`. A - server that fails to start is logged and skipped; the session still opens. -- **Prompts:** text, images (sent to the model as vision input), embedded resources and - `resource_link`s. `file://` links are read (through the client's - `fs/read_text_file` when advertised) and inlined. A link to a selection (`#L10:20`, as Zed - sends for selected text and symbols) inlines just those lines. -- **Streaming:** answer text and reasoning (`reasoning_content` / `reasoning` deltas) stream as - message and thought chunks with stable message ids, plus a `usage_update` after each model call. -- **Cancellation:** `session/cancel` stops the turn with `cancelled`, drops any open permission - prompt, and cancels in-flight `fs/*` and `terminal/*` requests to the client. - -A turn ends after 50 model calls with `max_turn_requests`. The agent doesn't send `plan` updates: -chat completion models don't produce plans reliably enough to report as structured steps. - -## Providers - -Onde Code uses Onde Inference by default. Set `ONDE_API_KEY` to the `app-id:app-secret` pair from -the Onde dashboard (or store it with `--setup`). The agent then talks to -`https://cloud.ondeinference.com/v1` and uses `onde-kkk` unless `OPENAI_MODEL` names another model; -`onde-code --list-models` prints the ids your key can use. - -It also accepts any OpenAI API compatible endpoint. Point it there with `OPENAI_BASE_URL`, -`OPENAI_API_KEY` and `OPENAI_MODEL`, or pick that option in `--setup`. The model has to support -tool (function) calling. - -Onde Inference wins: whenever `ONDE_API_KEY` is set, the agent uses it with the Onde Inference -URL and ignores `OPENAI_API_KEY` and `OPENAI_BASE_URL`. `ONDE_CODE_MODEL` (or `OPENAI_MODEL`) -still picks the model. To point it at a local or staging Onde Inference deployment, set -`ONDE_BASE_URL`. -To use another endpoint while `ONDE_API_KEY` is set, set `ONDE_CODE_PROVIDER=openai`. - -```sh -ONDE_API_KEY=APP_ID:APP_SECRET onde-code -OPENAI_BASE_URL=https://your-endpoint/v1 OPENAI_API_KEY=... OPENAI_MODEL=your-model onde-code -onde-code --list-models # what the configured endpoint serves -``` - -## Configuration - -| Env var | Default | | -|---------|---------|---| -| `ONDE_CODE_PROVIDER` | detected from keys | `onde`, or `openai` for any OpenAI API compatible endpoint | -| `ONDE_API_KEY` | unset | Onde Inference `app-id:app-secret`; selects Onde Inference | -| `ONDE_WEB_URL` | `https://ondeinference.com` | where `--login` and "Sign in with Onde" send the browser, for a local or staging site | -| `ONDE_BASE_URL` | `https://cloud.ondeinference.com/v1` | Onde Inference base URL, for a local or staging deployment | -| `OPENAI_BASE_URL` | `https://api.openai.com/v1` | base URL of an OpenAI API compatible endpoint | -| `OPENAI_API_KEY` | unset | bearer token for that endpoint | -| `ONDE_CODE_MODEL` | `OPENAI_MODEL` | model id for either provider; must support tool calling | -| `OPENAI_MODEL` | `onde-kkk` (Onde Inference), `gpt-4o-mini` (other endpoints) | model id when `ONDE_CODE_MODEL` is unset | -| `ONDE_CODE_MODELS` | listed from `/models` | comma-separated models for the editor's model picker | -| `ONDE_CODE_YOLO` | unset | `1` or `true` approves every tool call | -| `ONDE_CODE_COMMAND_TIMEOUT_SECS` | `120` | how long `run_command` may run before it is killed | -| `ONDE_CODE_DATA_DIR` | the config dir above | where the stored key and `sessions/` live | -| `ONDE_CODE_CONTEXT_WINDOW` | `128000` | context size reported in `usage_update` | -| `ONDE_CODE_SURFACE` | `acp` | set to `tui` by the terminal UI | -| `RUST_LOG` | unset | log filter; logs go to stderr, never stdout | - -``` -onde-code [--acp] [--yolo] [--list-models] [--root ...] [--login] [--setup] [--version] -``` - -## Development - -```sh -cargo test # unit, protocol and end-to-end ACP tests -cargo fmt --check && cargo clippy --all-targets -- -D warnings -``` - -The tests start the real binary over stdio and point it at a mock chat completions server, so they -need no API key or network. `crates/cli/tests/acp_integration.rs` drives the agent with the SDK's `Client`; -`crates/cli/tests/acp_protocol.rs` sends raw JSON-RPC. CI runs fmt, clippy and the tests on Linux and macOS. - -| Path | | -|------|---| -| `crates/cli/src/main.rs` | command line: flags, `--login`, `--setup`, `--list-models`, and which mode to run | -| `crates/cli/src/profile.rs` | the coding agent's prompt, tools and `/models` and `/setup` commands | -| `crates/cli/src/auth.rs`, `crates/cli/src/browser_auth.rs` | "Sign in with Onde" and `--login`: loopback + PKCE against ondeinference.com/connect | -| `crates/cli/src/legacy.rs` | moves sessions saved by Onde Code 1.0 into the current store | -| `packaging/registry/` | the first ACP registry submission; later releases are picked up by the registry | - -The ACP server, the chat completions client, the workspace tools, sessions on disk, MCP servers and -the terminal UI come from the Onde Agent Platform crates -[`ed-acp`](https://crates.io/crates/ed-acp) and [`ed-acp-tui`](https://crates.io/crates/ed-acp-tui). - -Releases are cut by pushing a `v*` tag that matches the version in the root `Cargo.toml` (`[workspace.package]`). The release -workflow builds all five targets and attaches the archives and `checksums.txt` to the GitHub -release. +Issues and pull requests are welcome at +[ondeinference/onde-code](https://github.com/ondeinference/onde-code). Run +`cargo fmt --check && cargo clippy --all-targets --locked -- -D warnings && cargo test` before you +open one. [docs/development.md](docs/development.md) has the layout. ## License Apache License 2.0. See [LICENSE](LICENSE). + +Copyright © 2026 Onde Inference diff --git a/assets/icon.svg b/assets/icon.svg index 8290c45..9c3cba1 100644 --- a/assets/icon.svg +++ b/assets/icon.svg @@ -1,4 +1,3 @@ - - + diff --git a/crates/agent/Cargo.toml b/crates/agent/Cargo.toml index a2c7788..e1387e6 100644 --- a/crates/agent/Cargo.toml +++ b/crates/agent/Cargo.toml @@ -1,11 +1,14 @@ [package] name = "onde-code-agent" -version = "1.1.0" +version = "1.1.1" edition.workspace = true description = "Onde Code as an embeddable ed-acp agent: the Profile, its Onde sign-in and the browser flow." license.workspace = true repository.workspace = true homepage.workspace = true +readme = "README.md" +keywords = ["acp", "coding-agent", "fine-tuning", "llm", "onde"] +categories = ["development-tools"] [dependencies] ed-acp.workspace = true diff --git a/crates/agent/README.md b/crates/agent/README.md new file mode 100644 index 0000000..f591b06 --- /dev/null +++ b/crates/agent/README.md @@ -0,0 +1,96 @@ +

+ Onde Inference +

+ +

onde-code-agent

+ +

+ Onde Code as a library, for apps that embed the agent. +

+ +

+ Website + npm + Crates.io + Release + CI + License +

+ +

+ Swift · Flutter · React Native · Rust · Website +

+ +--- + +Onde Code as a library, for apps that embed the agent instead of launching the +[`onde-code`](https://crates.io/crates/onde-code) binary. + +It is an [`ed-acp`](https://crates.io/crates/ed-acp) agent profile. A host serves it in process over +an in-memory channel and talks to it with an [Agent Client Protocol](https://agentclientprotocol.com) +client on the other end. That lets a sandboxed app (a Mac App Store build, an iOS app) run the agent +without spawning a subprocess. + +## What is in the crate + +- `OndeCode`, the `ed_acp::Profile`: the system prompt, the workspace tools and the `/models` and + `/setup` commands. `OndeCode::new()` includes `run_command`. `OndeCode::without_shell()` is for a + host that cannot start processes. It drops `run_command` and tells the model so. +- `INFO`, the agent's `AgentInfo`: name, display name, version and the `ONDE_CODE` env prefix. +- `auth::OndeAuth`, the profile's `AuthProvider`. It offers the "Sign in with Onde" method, accepts + a key that already works from the environment or the stored file, and otherwise runs the browser + flow. +- `browser_auth`, the flow behind it: a loopback redirect with PKCE against ondeinference.com. The + app key comes back through a one-time code and never appears in a URL. + +Inference goes to Onde Inference (`https://cloud.ondeinference.com/v1`, or `ONDE_BASE_URL`), or to +any OpenAI API compatible endpoint when `ONDE_CODE_PROVIDER=openai`. + +## Serving it + +```rust +use std::sync::Arc; + +use agent_client_protocol::Channel; +use ed_acp::ServeOptions; +use onde_code_agent::OndeCode; + +let (agent_end, client_end) = Channel::duplex(); +let opts = ServeOptions { yolo: false, surface: "app" }; + +tokio::spawn(ed_acp::serve(Arc::new(OndeCode::without_shell()), opts, agent_end)); +// Connect an ACP client to `client_end`, then initialize, authenticate and open a session. +``` + +`ed_acp::serve` is a future, so this runs inside the host's own async runtime. The example assumes +a `tokio` runtime, so the host needs `tokio` as a dependency. One call serves one connection: call +`serve` again with a new channel for the next client. + +## Where the key lives + +The stored key and the sessions live in the `ondecode` config dir (`~/Library/Application +Support/ondecode` on macOS). A sandboxed app should set `ONDE_CODE_DATA_DIR` to its own container +directory before starting the agent, so the app and the `onde-code` CLI never share or overwrite +each other's key. + +## Environment + +| Variable | Effect | +| --- | --- | +| `ONDE_API_KEY` | Onde Inference `app-id:app-secret`. Selects Onde Inference. | +| `ONDE_BASE_URL` | Inference endpoint. Defaults to `https://cloud.ondeinference.com/v1`. | +| `ONDE_WEB_URL` | Where the browser sign-in goes. Defaults to `https://ondeinference.com`. | +| `ONDE_CODE_PROVIDER` | `onde`, or `openai` for any OpenAI API compatible endpoint. | +| `ONDE_CODE_MODEL` | Model id. Must support tool calling. | +| `ONDE_CODE_DATA_DIR` | Where the key and sessions are stored. | + +The full table is in [docs/providers.md](https://github.com/ondeinference/onde-code/blob/main/docs/providers.md). + +## Get a key + +Onde Code is free and Apache-2.0. Create an Onde Inference app and get its key at +[ondeinference.com](https://ondeinference.com). + +## License + +Apache-2.0. Copyright © 2026 Onde Inference diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 2106132..ecb5588 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -2,11 +2,13 @@ name = "onde-code" version.workspace = true edition.workspace = true -description = "Onde Code is Onde Inference's ACP-compatible coding agent for model fine-tuning and deployment." +description = "Coding agent for fine-tuning, managing and deploying models on Onde Inference." license.workspace = true repository.workspace = true homepage.workspace = true readme = "../../README.md" +keywords = ["acp", "coding-agent", "fine-tuning", "llm", "onde"] +categories = ["command-line-utilities", "development-tools"] [[bin]] name = "onde-code" diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..55e740e --- /dev/null +++ b/docs/README.md @@ -0,0 +1,11 @@ +# Onde Code docs + +| Page | What it covers | +|------|----------------| +| [Install](install.md) | Release archives, npm and npx, building from source, the ACP registry | +| [Editor setup](editors.md) | Zed, Android Studio, Xcode and marimo setup, signing in from the editor, `AUTH_REQUIRED`, logging out | +| [What the agent does](acp.md) | Tools, permissions, MCP, prompts, streaming and the limits | +| [Terminal mode](terminal.md) | The chat UI, its keys, and how it uses ACP | +| [Models](models.md) | Fine-tuning, managing and deploying models with `onde --mcp` | +| [Providers and configuration](providers.md) | Onde Inference, OpenAI API compatible endpoints, every env var | +| [Development](development.md) | Tests, CI, where the code lives, releases | diff --git a/docs/acp.md b/docs/acp.md new file mode 100644 index 0000000..4307061 --- /dev/null +++ b/docs/acp.md @@ -0,0 +1,24 @@ +# What the agent does + +Onde Code implements ACP v1, including the optional parts editors use: session +list/resume/close/delete, multi-root workspaces, MCP servers, config options and slash commands. +The [conformance audit](https://github.com/kelvin-soen/OndeCode/issues/25) lists every spec page +and where each requirement is handled. + +| Area | Behavior | +|------|----------| +| Tools | `read_file`, `write_file`, `edit_file`, `list_directory` and `run_command`. Every tool takes an optional `root`, so the model can work across all roots of a multi-root workspace. Each call is reported with its name, kind, absolute locations, diff, raw input and output, and status. | +| Editor routing | File reads and writes go through the client's `fs/*` methods when it advertises them, so the agent sees unsaved buffers. Commands run in the client's `terminal/*` when available, otherwise in a local `sh -c`. On Windows, `sh` has to be on `PATH`, for example from Git for Windows. Commands time out after `ONDE_CODE_COMMAND_TIMEOUT_SECS`. | +| Permissions | Writes and commands ask through `session/request_permission` with allow once, always allow, reject once and always reject. `--yolo`, `ONDE_CODE_YOLO=1` or the auto-approve toggle skip the prompt. | +| MCP | Servers passed in `session/new`, `session/load` or `session/resume`, over stdio or streamable HTTP, are connected per session. Their tools reach the model as `mcp____`. A server that fails to start is logged and skipped, and the session still opens. | +| Prompts | Text, images (sent to the model as vision input), embedded resources and `resource_link`s. `file://` links are read, through the client's `fs/read_text_file` when advertised, and inlined. A link to a selection (`#L10:20`, as Zed sends) inlines just those lines. | +| Streaming | Answer text and reasoning (`reasoning_content` and `reasoning` deltas) stream as message and thought chunks with stable message ids, plus a `usage_update` after each model call. | +| Cancellation | `session/cancel` stops the turn with `cancelled`, drops any open permission prompt, and cancels in-flight `fs/*` and `terminal/*` requests to the client. | + +## Limits + +- A turn ends after 50 model calls with `max_turn_requests`. +- The agent doesn't send `plan` updates. Chat completion models don't produce plans reliably enough + to report as structured steps. +- The model has to support tool (function) calling. +- Logs go to stderr only. In `--acp` mode stdout is the protocol. diff --git a/docs/development.md b/docs/development.md new file mode 100644 index 0000000..a5c18b5 --- /dev/null +++ b/docs/development.md @@ -0,0 +1,42 @@ +# Development + +```sh +cargo test # unit, protocol and end-to-end ACP tests +cargo fmt --check && cargo clippy --all-targets --locked -- -D warnings +``` + +The tests start the real binary over stdio and point it at a mock chat completions server, so they +need no API key or network. `ONDE_CODE_DATA_DIR` isolates the stored key and sessions. +`crates/cli/tests/acp_integration.rs` drives the agent with the SDK's `Client`, and +`crates/cli/tests/acp_protocol.rs` sends raw JSON-RPC. CI runs fmt, clippy and the tests on Linux +and macOS. + +Live tests run against Onde Inference and cost real tokens. They skip themselves without a key: + +```sh +ONDE_API_KEY=app-id:app-secret cargo test --test onde_live -- --nocapture +``` + +## Where things live + +| Path | | +|------|---| +| `crates/cli/src/main.rs` | command line: flags, `--login`, `--setup`, `--list-models`, and which mode to run | +| `crates/agent/src/profile.rs` | the coding agent's prompt, tools and `/models` and `/setup` commands | +| `crates/agent/src/auth.rs`, `crates/agent/src/browser_auth.rs` | "Sign in with Onde" and `--login`: loopback and PKCE against ondeinference.com/connect | +| `crates/cli/src/legacy.rs` | moves sessions saved by Onde Code 1.0 into the current store | +| `packaging/registry/` | the ACP registry entry and the script that updates it | +| `packaging/npm/` | templates and the launcher for the npm packages | + +The ACP server, the chat completions client, the workspace tools, sessions on disk, MCP servers and +the terminal UI come from the Onde Agent Platform crates +[`ed-acp`](https://crates.io/crates/ed-acp) and [`ed-acp-tui`](https://crates.io/crates/ed-acp-tui). +This repo supplies what makes it a coding agent: the profile, the sign-in and the command line. + +## Releases + +Push a `v*` tag that matches the version in the root `Cargo.toml` (`[workspace.package]`). +`release-github.yml` builds the five targets and attaches the archives and `checksums.txt` to the +GitHub release. `release-npm.yml` publishes `@ondeinference/onde-code` and the five platform +packages with npm Trusted Publishing. After a release, the ACP registry picks up the new version +by itself. diff --git a/docs/editors.md b/docs/editors.md new file mode 100644 index 0000000..1a03749 --- /dev/null +++ b/docs/editors.md @@ -0,0 +1,113 @@ +# Editor setup + +Editors launch the agent with piped stdio, which switches it to ACP mode. `--acp` forces that mode. + +## Zed + +Add the agent to `settings.json`: + +```json +{ + "agent_servers": { + "Onde Code": { + "type": "custom", + "command": "/absolute/path/to/onde-code", + "args": ["--acp"], + "env": { + "ONDE_API_KEY": "APP_ID:APP_SECRET" + } + } + } +} +``` + +Without a global install, use `"command": "npx"` and `"args": ["-y", "@ondeinference/onde-code", "--acp"]`. +The `env` block is optional if you have already signed in with `onde-code --login`. + +## Android Studio and JetBrains IDEs + +Android Studio, IntelliJ IDEA and the other JetBrains IDEs run ACP agents from AI Chat (IDE +2025.3.2 or later with JetBrains AI). Once Onde Code is in the ACP registry, install it from +**Settings | Tools | AI Assistant | Agents**, or from **Install From ACP Registry** in the agent picker. + +Until then, or for a local build, choose **Add Custom Agent** in the agent picker. That opens +`~/.jetbrains/acp.json`: + +```json +{ + "agent_servers": { + "Onde Code": { + "command": "/absolute/path/to/onde-code", + "args": ["--acp"], + "env": { + "ONDE_API_KEY": "APP_ID:APP_SECRET" + } + } + } +} +``` + +The agent shows up in AI Chat right away. If it does not, check the JSON and restart the IDE. ACP +agents do not run in WSL. The `env` block is optional after `onde-code --login`. + +## Xcode + +Xcode runs ACP agents as custom agents in the coding assistant. This needs a release with custom +agent support (reported as Xcode 26.6, and by some tools as Xcode 27), so +check for **Add an Agent** under Intelligence in your version. + +1. Open **Xcode > Settings > Intelligence**. +2. Under **Agents**, click **Add an Agent**. +3. Set **Command** to the absolute path of `onde-code` and **Arguments** to `--acp`. +4. Click **Add**, then pick Onde Code in the coding assistant. + +Xcode does not expand `~` or read your shell `PATH`, so use the full path from `which onde-code`. +If you installed with npm, point Command at `npx` and use `-y @ondeinference/onde-code --acp` as the +arguments, again with the absolute path to `npx`. Sign in first with `onde-code --login`, because +Xcode has no place to set `ONDE_API_KEY`. + +To let the agent use Xcode's own tools, turn on **Allow external agents to use Xcode tools** under +Model Context Protocol and register `xcrun mcpbridge` as a stdio MCP server in the agent's MCP configuration. + +## marimo notebooks + +marimo can chat with an ACP agent from the notebook sidebar. This is experimental in marimo, so +features and APIs may change. + +marimo reaches agents over a local port, so bridge Onde Code's stdio to a WebSocket first: + +```sh +npx stdio-to-ws "onde-code --acp" --port 3025 +``` + +On Windows, put `cmd /c` before the command: `npx stdio-to-ws "cmd /c onde-code --acp" --port 3025`. +Then enable the agents feature flag under **Lab** in marimo's settings, open the agents icon in the +sidebar and select the agent. Keep the bridge running while you chat. Sign in with +`onde-code --login` beforehand or export `ONDE_API_KEY` in the same terminal. + +## Signing in from the editor + +The agent offers a **Sign in with Onde** method. It opens ondeinference.com in your browser, as a +URL prompt when the editor supports that. You pick an org and an app and press Connect. A key that +already works, from the environment or the stored file, passes without opening anything. + +Until a key exists, the agent answers `session/new`, `session/load`, `session/resume` and +`session/prompt` with `AUTH_REQUIRED`. Once you sign in (or `onde-code --setup` succeeds), the +running agent picks up the stored key, so the open thread comes back without restarting anything. + +The key is stored in the platform config dir: `~/Library/Application Support/ondecode/env` on +macOS, `~/.config/ondecode/env` on Linux and `%APPDATA%\ondecode\env` on Windows. A variable set in +the environment wins over the same one in that file. + +## Logging out + +Logging out from the editor deletes the stored key and the saved sign-in (`session.json`). + +## What you get in the editor + +- A model picker, filled from the endpoint's `GET /models` (or `ONDE_CODE_MODELS`). +- An "Auto-approve actions" toggle, in editors that support boolean config options. +- `/models` and `/setup` slash commands, answered locally without a model call. +- A thread history: sessions can be listed, resumed, loaded with full replay, closed and deleted. + They are saved to disk, so threads reopen after the editor or the agent restarts. Permission + choices ("always allow", auto-approve) are not saved. diff --git a/docs/install.md b/docs/install.md new file mode 100644 index 0000000..fd3cfdf --- /dev/null +++ b/docs/install.md @@ -0,0 +1,62 @@ +# Install + +## Release archives + +Prebuilt binaries for macOS (arm64, x64), Linux (arm64, x64) and Windows (x64) are attached to +each [GitHub release](https://github.com/ondeinference/onde-code/releases), along with a +`checksums.txt`: + +```sh +curl -LO https://github.com/ondeinference/onde-code/releases/latest/download/onde-code-darwin-arm64.tar.gz +curl -LO https://github.com/ondeinference/onde-code/releases/latest/download/checksums.txt +shasum -a 256 -c checksums.txt --ignore-missing +tar -xzf onde-code-darwin-arm64.tar.gz && mv onde-code ~/.local/bin/ +``` + +The archive names are `onde-code--.tar.gz` (`.zip` on Windows), with `darwin`, `linux` +or `windows` for the OS and `arm64` or `x64` for the architecture. + +## npm and npx + +```sh +npm install -g @ondeinference/onde-code +``` + +npm installs the right binary for your platform through one of five platform packages +(`@ondeinference/onde-code-darwin-arm64` and so on). Editors can run the agent without a global +install: + +```sh +npx @ondeinference/onde-code --acp +``` + +## winget + +```sh +winget install OndeInference.OndeCode +``` + +## From source + +Needs Rust 1.88 or newer. + +```sh +cargo build --release # -> target/release/onde-code +``` + +## ACP registry + +The [ACP registry](https://agentclientprotocol.com/get-started/registry) lists agents that editors +can install for you. Onde Code's entry lives in `packaging/registry/` and offers both the binary +archives and the npx package. Once it is merged, editors that read the registry can install +onde-code without the steps above. See [packaging/registry/README.md](../packaging/registry/README.md) +for how the entry is kept current. + +## First run + +```sh +onde-code --version +onde-code --login +``` + +Sign-in is covered in [Editor setup](editors.md) and [Providers](providers.md). diff --git a/docs/models.md b/docs/models.md new file mode 100644 index 0000000..749eef6 --- /dev/null +++ b/docs/models.md @@ -0,0 +1,60 @@ +# Models + +Onde Code is built for model work on Onde Inference: writing and running the code that fine-tunes, +manages and deploys your models. It does that with the same tools it uses for any repo (read and +edit files, run commands) plus the Onde CLI, [`onde`](https://github.com/ondeinference/onde-cli). + +## The Onde MCP server + +`onde --mcp` runs the Onde CLI as a [Model Context Protocol](https://modelcontextprotocol.io/) +server over stdio. It exposes account and model-catalog operations as tools that return structured +JSON: + +| Tool | What it does | +|------|--------------| +| `login`, `me` | Sign in, and show who you are signed in as | +| `apps_list`, `app_create`, `app_rename` | Manage your Onde Inference apps | +| `models_list` | List the models in the catalog | +| `model_register` | Register a fine-tuned GGUF model that is already uploaded to Hugging Face | +| `model_assign` | Assign a model to an app | +| `hf_search` | Search Hugging Face for base models | + +The tools run non-interactively and reuse the token from an `onde` sign-in. Install the CLI first, +for example `npm install -g @ondeinference/cli`, and sign in with `onde --tui`. + +Any ACP client can hand it to the agent in `mcpServers`, and Onde Code connects it for the session. +In Zed, add it under `context_servers` in `settings.json`, or pass it to the agent through whatever +MCP configuration your editor uses: + +```json +{ + "context_servers": { + "onde": { + "command": "onde", + "args": ["--mcp"] + } + } +} +``` + +The tools then appear to the model as `mcp__onde__models_list`, `mcp__onde__model_assign` and so on. + +## Fine-tuning + +Fine-tuning itself is part of the `onde` CLI, not of the MCP server: a local LoRA pipeline for +Qwen2, Qwen2.5 and Qwen3 models that merges the adapter and exports GGUF. Onde Code can drive it +with `run_command` like any other tool, and ask before it does. See the +[onde-cli README](https://github.com/ondeinference/onde-cli#fine-tuning) for the pipeline. + +A typical session, from a repo with your training data: + +1. Ask the agent to find a base model (`hf_search`) and set up the fine-tune. +2. It writes the config and runs the pipeline through `onde`, after you approve the commands. +3. Once the GGUF is on Hugging Face, it registers it (`model_register`) and assigns it to your app + (`model_assign`). + +## Built in + +Shipping the Onde tools inside the agent, with no MCP setup, is tracked in +[kelvin-soen/OndeCode#27](https://github.com/kelvin-soen/OndeCode/issues/27). Until then, the MCP +server above works today. diff --git a/docs/providers.md b/docs/providers.md new file mode 100644 index 0000000..a1e9ae2 --- /dev/null +++ b/docs/providers.md @@ -0,0 +1,49 @@ +# Providers and configuration + +## Onde Inference + +Onde Inference is the default. Set `ONDE_API_KEY` to the `app-id:app-secret` pair from the Onde +dashboard, or store a key with `onde-code --login` (browser) or `onde-code --setup` (paste). The +agent then talks to `https://cloud.ondeinference.com/v1` and uses `onde-kkk` unless a model is set. +`onde-code --list-models` prints the ids your key can use. + +## OpenAI API compatible endpoints + +Point the agent at any endpoint that supports tool calling with `OPENAI_BASE_URL`, +`OPENAI_API_KEY` and `OPENAI_MODEL`, or pick that option in `--setup`. + +Onde Inference wins: whenever `ONDE_API_KEY` is set, the agent uses it with the Onde Inference URL +and ignores `OPENAI_API_KEY` and `OPENAI_BASE_URL`. `ONDE_CODE_MODEL` (or `OPENAI_MODEL`) still +picks the model. To use another endpoint while `ONDE_API_KEY` is set, set +`ONDE_CODE_PROVIDER=openai`. To reach a local or staging Onde Inference deployment, set +`ONDE_BASE_URL`. + +```sh +ONDE_API_KEY=APP_ID:APP_SECRET onde-code +OPENAI_BASE_URL=https://your-endpoint/v1 OPENAI_API_KEY=... OPENAI_MODEL=your-model onde-code +onde-code --list-models # what the configured endpoint serves +``` + +## Environment variables + +| Env var | Default | | +|---------|---------|---| +| `ONDE_CODE_PROVIDER` | detected from keys | `onde`, or `openai` for any OpenAI API compatible endpoint | +| `ONDE_API_KEY` | unset | Onde Inference `app-id:app-secret`; selects Onde Inference | +| `ONDE_WEB_URL` | `https://ondeinference.com` | where `--login` and "Sign in with Onde" send the browser, for a local or staging site | +| `ONDE_BASE_URL` | `https://cloud.ondeinference.com/v1` | Onde Inference base URL, for a local or staging deployment | +| `OPENAI_BASE_URL` | `https://api.openai.com/v1` | base URL of an OpenAI API compatible endpoint | +| `OPENAI_API_KEY` | unset | bearer token for that endpoint | +| `ONDE_CODE_MODEL` | `OPENAI_MODEL` | model id for either provider; must support tool calling | +| `OPENAI_MODEL` | `onde-kkk` (Onde Inference), `gpt-4o-mini` (other endpoints) | model id when `ONDE_CODE_MODEL` is unset | +| `ONDE_CODE_MODELS` | listed from `/models` | comma-separated models for the editor's model picker | +| `ONDE_CODE_YOLO` | unset | `1` or `true` approves every tool call | +| `ONDE_CODE_COMMAND_TIMEOUT_SECS` | `120` | how long `run_command` may run before it is killed | +| `ONDE_CODE_DATA_DIR` | the config dir | where the stored key and `sessions/` live | +| `ONDE_CODE_CONTEXT_WINDOW` | `128000` | context size reported in `usage_update` | +| `ONDE_CODE_SURFACE` | `acp` | set to `tui` by the terminal UI | +| `RUST_LOG` | unset | log filter; logs go to stderr, never stdout | + +``` +onde-code [--acp] [--yolo] [--list-models] [--root ...] [--login] [--setup] [--version] +``` diff --git a/docs/terminal.md b/docs/terminal.md new file mode 100644 index 0000000..49405dd --- /dev/null +++ b/docs/terminal.md @@ -0,0 +1,27 @@ +# Terminal mode + +```sh +onde-code # asks before every edit and command +onde-code --yolo # approves everything +onde-code --root ../shared-lib # add another workspace root (repeatable) +``` + +`--root` applies to the terminal UI only. In an editor, the roots come from the editor. + +## Keys + +| Key | What it does | +|-----|--------------| +| Enter | Send the message | +| Esc | Cancel a running turn | +| ↑ / ↓, PgUp / PgDn | Scroll | +| Ctrl-C or `/quit` | Exit | +| `y`, `a`, `n` | At a permission prompt: allow, always allow this tool, reject | + +## The TUI is an ACP client + +The terminal UI starts `onde-code --acp` as a subprocess (with `ONDE_CODE_SURFACE=tui`) and speaks +the same protocol an editor does. The terminal and the editor therefore exercise the same code +paths, and anything that has to work in both lives on the ACP side. + +The TUI itself comes from the [`ed-acp-tui`](https://crates.io/crates/ed-acp-tui) crate. diff --git a/packaging/npm/README.md.tmpl b/packaging/npm/README.md.tmpl index 882d606..5b69c19 100644 --- a/packaging/npm/README.md.tmpl +++ b/packaging/npm/README.md.tmpl @@ -1,6 +1,8 @@ # Onde Code -Onde Code is Onde Inference's ACP-compatible coding agent for model fine-tuning and deployment. +Fine-tune, manage and deploy models without leaving your editor. + +Onde Code is a coding agent for your model work on [Onde Inference](https://ondeinference.com). It writes and runs the fine-tuning, model management and deploy code in your repo, and it works in any [Agent Client Protocol](https://agentclientprotocol.com) (ACP) editor or in the terminal. It is free and Apache-2.0. Get an app key at [ondeinference.com](https://ondeinference.com). ## `@ondeinference/${node_pkg}` diff --git a/packaging/npm/onde-code/README.md b/packaging/npm/onde-code/README.md index 68409af..0e742ad 100644 --- a/packaging/npm/onde-code/README.md +++ b/packaging/npm/onde-code/README.md @@ -1,6 +1,8 @@ # Onde Code -Onde Code is Onde Inference's ACP-compatible coding agent for model fine-tuning and deployment. +Fine-tune, manage and deploy models without leaving your editor. + +Onde Code is a coding agent for your model work on [Onde Inference](https://ondeinference.com). It writes and runs the fine-tuning, model management and deploy code in your repo, and it works in any [Agent Client Protocol](https://agentclientprotocol.com) (ACP) editor or in the terminal. It is free and Apache-2.0. Get an app key at [ondeinference.com](https://ondeinference.com). ## Install diff --git a/packaging/npm/onde-code/package.json b/packaging/npm/onde-code/package.json index 06b54a2..73bdc1c 100644 --- a/packaging/npm/onde-code/package.json +++ b/packaging/npm/onde-code/package.json @@ -16,7 +16,7 @@ "lib", "README.md" ], - "description": "Onde Code is Onde Inference's ACP-compatible coding agent for model fine-tuning and deployment.", + "description": "Coding agent for fine-tuning, managing and deploying models on Onde Inference.", "license": "Apache-2.0", "repository": { "type": "git", diff --git a/packaging/npm/package-main.json.tmpl b/packaging/npm/package-main.json.tmpl index ef8c67c..370f131 100644 --- a/packaging/npm/package-main.json.tmpl +++ b/packaging/npm/package-main.json.tmpl @@ -13,7 +13,7 @@ "onde-code": "lib/index.js" }, "files": ["lib", "README.md"], - "description": "Onde Code is Onde Inference's ACP-compatible coding agent for model fine-tuning and deployment.", + "description": "Coding agent for fine-tuning, managing and deploying models on Onde Inference.", "license": "Apache-2.0", "repository": { "type": "git", diff --git a/packaging/npm/package.json.tmpl b/packaging/npm/package.json.tmpl index 6192f4c..a3d4f1e 100644 --- a/packaging/npm/package.json.tmpl +++ b/packaging/npm/package.json.tmpl @@ -1,7 +1,7 @@ { "name": "@ondeinference/${node_pkg}", "version": "${node_version}", - "description": "Platform binary for Onde Code, the ACP-compatible coding agent from Onde Inference.", + "description": "Platform binary for Onde Code, the coding agent for fine-tuning, managing and deploying models on Onde Inference.", "license": "Apache-2.0", "repository": { "type": "git", diff --git a/packaging/registry/README.md b/packaging/registry/README.md index 7a90270..cdcc3a8 100644 --- a/packaging/registry/README.md +++ b/packaging/registry/README.md @@ -1,63 +1,75 @@ # ACP registry entry `agent.json` is onde-code's entry in the [ACP registry](https://agentclientprotocol.com/get-started/registry) -([agentclientprotocol/registry](https://github.com/agentclientprotocol/registry)), kept here for -the first submission: [agentclientprotocol/registry#652](https://github.com/agentclientprotocol/registry/pull/652). -In the registry it lives at `onde-code/agent.json`, with a copy of `assets/icon.svg` next to it as -`onde-code/icon.svg`. +([agentclientprotocol/registry](https://github.com/agentclientprotocol/registry)). In the registry it +lives at `onde-code/agent.json`, with a copy of `assets/icon.svg` next to it as `onde-code/icon.svg`. -Once #652 is merged, this folder is not part of the release process. The registry's -`update-versions` workflow runs every hour, finds new GitHub releases of this repo, and commits -the new version to the registry's `main` itself: it swaps the version in each archive URL -(`/v1.0.0/` becomes `/v1.1.0/`) and takes the `sha256` values from the digests GitHub records for -the release assets. That works as long as: +The listing is submitted in a fresh PR that supersedes +[agentclientprotocol/registry#652](https://github.com/agentclientprotocol/registry/pull/652). That +one points at the old `kelvin-soen/OndeCode` v1.0.0 release, while the releases and the npm +provenance are on `ondeinference/onde-code`. + +It lists two ways to run the agent: + +- `binary`: the five release archives, run as `onde-code --acp`. +- `npx`: `@ondeinference/onde-code@` with `--acp`. The launcher package pulls in the + platform binary. + +Once the listing is merged, this folder is not part of the release process. The registry's +`update-versions` workflow runs every hour, finds new GitHub releases of this repo, and commits the +new version to the registry's `main` itself. It swaps the version in each archive URL (`/v1.1.0/` +becomes `/v1.2.0/`), takes the `sha256` values from the digests GitHub records for the release +assets, and bumps the npx package version. That works as long as: - releases are tagged `v` and are not marked as prereleases, - the archive names stay version-free (`onde-code-darwin-arm64.tar.gz` and so on), which `.github/workflows/release-github.yml` takes care of, -- all five archives are attached to the release. +- all five archives are attached to the release, +- the same version is published to npm by `release-npm.yml`. -The automation only touches the version, archive URLs and hashes. Changing anything else in the -listing (description, authors, icon) still takes a PR to the registry. +The automation only touches the version, archive URLs, hashes and npx version. Changing anything +else in the listing (description, authors, icon) still takes a PR to the registry. What the registry checks, and where this repo covers it: -- `initialize` returns a `terminal` auth method (`terminal-setup`, runs `onde-code --setup`). The - registry's CI starts the binary with an empty `HOME`, so that method is what it sees. +- `initialize` returns the `onde` auth method ("Sign in with Onde"). The registry's CI starts the + binary with an empty `HOME`, so that method is what it sees, and `--auth-check` accepts it. - `session/new` and `session/prompt` return `AUTH_REQUIRED` until a key is configured. - `.github/workflows/release-github.yml` builds the five registry platforms on a `v*` tag and attaches the archives and `checksums.txt` to the release. It refuses a tag that doesn't match the version in `Cargo.toml`. - `assets/icon.svg` is a 16×16 monochrome icon drawn with `currentColor`. -## Moving the first submission to a new release - -Only needed while #652 is still open, for example to submit v1.0.0 instead of v0.3.1. +## Submitting a release 1. Tag the release on `main` (the tag must match `version` in `Cargo.toml`) and push it: ```sh - git tag v1.0.0 origin/main && git push origin v1.0.0 + VERSION=1.1.1 + git tag v$VERSION origin/main && git push origin v$VERSION ``` -2. Wait for the `release` workflow to publish the release, then point `agent.json` at it: +2. Wait for the `release` and `Code Release npm` workflows to finish, then point `agent.json` at + the release: ```sh - packaging/registry/update-agent.sh v1.0.0 + packaging/registry/update-agent.sh v$VERSION ``` - It downloads the five archives, hashes them, and writes the version, URLs and `sha256` - values. Commit the result here. + It downloads the five archives, hashes them, and writes the version, the npx package version, + the URLs and the `sha256` values. Commit the result here. -3. In the registry fork, copy the files and validate: +3. In your fork of the registry, branch off `upstream/main`, copy the files and validate: ```sh - cp ../OndeCode/packaging/registry/agent.json onde-code/agent.json - cp ../OndeCode/assets/icon.svg onde-code/icon.svg - uv run --with jsonschema .github/workflows/build_registry.py + git checkout -b add-onde-code-v$VERSION upstream/main + cp ../onde-code/packaging/registry/agent.json onde-code/agent.json + cp ../onde-code/assets/icon.svg onde-code/icon.svg + uv run --with jsonschema .github/workflows/build_registry.py --dry-run + ./.github/workflows/scripts/run-registry-docker.sh python3 .github/workflows/verify_agents.py --auth-check ``` - The script checks that every archive URL answers with HTTP 200, so run it after the release - is published. + The build script checks that every archive URL answers with HTTP 200, so run it after the + release is published. -4. Push to the fork's `add-onde-code` branch, which updates #652. +4. Push the branch to your fork and open the PR against `agentclientprotocol/registry`. diff --git a/packaging/registry/agent.json b/packaging/registry/agent.json index 20cd348..fa83049 100644 --- a/packaging/registry/agent.json +++ b/packaging/registry/agent.json @@ -1,60 +1,63 @@ { "id": "onde-code", - "name": "onde-code", - "version": "1.0.0", - "description": "Onde Code is Onde Inference's ACP-compatible coding agent for model fine-tuning and deployment.", - "repository": "https://github.com/kelvin-soen/OndeCode", + "name": "Onde Code", + "version": "1.1.0", + "description": "Coding agent for fine-tuning, managing and deploying models on Onde Inference.", + "repository": "https://github.com/ondeinference/onde-code", + "website": "https://ondeinference.com", "authors": [ - "Kelvin Soen ", - "OndeCode ", - "paydii ", - "Seto Elkahfi ", - "siGit Code " + "Onde Inference " ], "license": "Apache-2.0", - "license_url": "https://github.com/kelvin-soen/OndeCode/blob/main/LICENSE", + "license_url": "https://github.com/ondeinference/onde-code/blob/main/LICENSE", "distribution": { "binary": { "darwin-aarch64": { - "archive": "https://github.com/kelvin-soen/OndeCode/releases/download/v1.0.0/onde-code-darwin-arm64.tar.gz", - "sha256": "00890a3022dd1eb7177eff3e509dfea83a3d541a96ff5bb7aa52d229b565745a", + "archive": "https://github.com/ondeinference/onde-code/releases/download/v1.1.0/onde-code-darwin-arm64.tar.gz", + "sha256": "7f3279fb086acc101c5d1fbd36ed96662b6f2a9306f57f7d2a0cdf8e5f62e826", "cmd": "./onde-code", "args": [ "--acp" ] }, "darwin-x86_64": { - "archive": "https://github.com/kelvin-soen/OndeCode/releases/download/v1.0.0/onde-code-darwin-x64.tar.gz", - "sha256": "68e006eaffb8aac3e95ade9b87ff3f965e8825a0c445475544b1d11592e68279", + "archive": "https://github.com/ondeinference/onde-code/releases/download/v1.1.0/onde-code-darwin-x64.tar.gz", + "sha256": "ee10f0e6b061cb57ddebeeea27422564576c2f46ebe99a544e728a90b73c5b35", "cmd": "./onde-code", "args": [ "--acp" ] }, "linux-aarch64": { - "archive": "https://github.com/kelvin-soen/OndeCode/releases/download/v1.0.0/onde-code-linux-arm64.tar.gz", - "sha256": "a91f5544ad5d6cc8978999aa2cbf2319eb6ec7b8ebd4ffc11639713adafdde57", + "archive": "https://github.com/ondeinference/onde-code/releases/download/v1.1.0/onde-code-linux-arm64.tar.gz", + "sha256": "ddcf013897ed90f32a113ce70e2cb5f617e81f7f6db0dd7303cd287fc384eeec", "cmd": "./onde-code", "args": [ "--acp" ] }, "linux-x86_64": { - "archive": "https://github.com/kelvin-soen/OndeCode/releases/download/v1.0.0/onde-code-linux-x64.tar.gz", - "sha256": "91eccfdb3396522d85c2e20f776f8e4ba66389e11bf46550e4f0b7dbd46c81c5", + "archive": "https://github.com/ondeinference/onde-code/releases/download/v1.1.0/onde-code-linux-x64.tar.gz", + "sha256": "2721012616cd33ee859dceb21fba0da07d34473d47ac2bc9f5b89e3ce255a686", "cmd": "./onde-code", "args": [ "--acp" ] }, "windows-x86_64": { - "archive": "https://github.com/kelvin-soen/OndeCode/releases/download/v1.0.0/onde-code-windows-x64.zip", - "sha256": "e7945d0ea081d060661474a200205e2d06b0d0522dcb389cef8c4226bdefc076", + "archive": "https://github.com/ondeinference/onde-code/releases/download/v1.1.0/onde-code-windows-x64.zip", + "sha256": "a50c5ce6801c072fa6f850e704ac1eaf23ba4b58f12de236082bd9c2df344934", "cmd": "onde-code.exe", "args": [ "--acp" ] } + }, + "npx": { + "package": "@ondeinference/onde-code@1.1.0", + "args": [ + "--acp" + ] } } } diff --git a/packaging/registry/update-agent.sh b/packaging/registry/update-agent.sh index 7daa374..f8ae01d 100755 --- a/packaging/registry/update-agent.sh +++ b/packaging/registry/update-agent.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash -# Point packaging/registry/agent.json at a published release: set the version, the archive URLs and the -# sha256 of each archive. The archives are downloaded and hashed here rather than trusting +# Point packaging/registry/agent.json at a published release: set the version, the npx package +# version, the archive URLs and the sha256 of each archive. The archives are downloaded and hashed here rather than trusting # checksums.txt, which releases before v1.0.0 don't have. # # packaging/registry/update-agent.sh v1.0.0 set -euo pipefail tag=${1:?usage: packaging/registry/update-agent.sh } -repo=kelvin-soen/OndeCode +repo=ondeinference/onde-code here=$(cd "$(dirname "$0")" && pwd) dist=$(mktemp -d) trap 'rm -rf "$dist"' EXIT @@ -23,7 +23,8 @@ platforms=( "windows-x86_64 onde-code-windows-x64.zip" ) -json=$(jq --arg v "${tag#v}" '.version = $v' "$here/agent.json") +json=$(jq --arg v "${tag#v}" \ + '.version = $v | .distribution.npx.package = "@ondeinference/onde-code@" + $v' "$here/agent.json") for entry in "${platforms[@]}"; do read -r platform archive <<<"$entry" [ -f "$dist/$archive" ] || { echo "missing $archive in $tag" >&2; exit 1; } diff --git a/packaging/winget/OndeInference.OndeCode.locale.en-US.yaml.in b/packaging/winget/OndeInference.OndeCode.locale.en-US.yaml.in index f14e1fb..739675c 100644 --- a/packaging/winget/OndeInference.OndeCode.locale.en-US.yaml.in +++ b/packaging/winget/OndeInference.OndeCode.locale.en-US.yaml.in @@ -9,12 +9,12 @@ PackageName: Onde Code PackageUrl: https://github.com/@REPO@ License: Apache-2.0 LicenseUrl: https://github.com/@REPO@/blob/main/LICENSE -ShortDescription: Onde Code is Onde Inference's ACP-compatible coding agent for model fine-tuning and deployment. +ShortDescription: Coding agent for fine-tuning, managing and deploying models on Onde Inference. Description: |- - Onde Code is an ACP-compatible local-first AI coding agent backed by Onde Inference. - It runs LLM inference on-device via GGUF models or against any OpenAI-compatible - endpoint, and integrates with editors such as Zed and VS Code via the Agent Client - Protocol (ACP). + Onde Code is a coding agent for your model work on Onde Inference. It writes and runs the + fine-tuning, model management and deploy code in your repo, and it works in any Agent Client + Protocol (ACP) editor, such as Zed, or in the terminal. It uses Onde Inference by default and + also accepts any OpenAI API compatible endpoint. Moniker: onde-code Tags: - ai