Repository navigation
Conversation
zalan159
force-pushed
the
agent-cteno
branch
from
November 19, 2026 14:23
3d0e69b to
e8186f0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
@magpie-community/agent-cteno: Cteno (cteno-host-cliand the Cteno desktop app) on Magpie's Agents page. Pick one of Magpie's models or routing groups in its row; switch it off and Cteno'sprofiles.jsonis put back. (Maintained by the Cteno team; also tracked upstream in yetone/magpie#5976.)What it does
Cteno stores its model profiles in
profiles.jsoninside its OS app-data folder (com.cteno-host.guiunder~/Library/Application Support,%APPDATA%, or$XDG_DATA_HOME/~/.local/share, with$CTENO_APP_DATA_DIRoverride) as aprofilesarray plusdefault_profile_id. Because Magpie'smoejsagent sandbox edits a single static path by dotted object keys, this package uses the sameagent+ Bun host companion (main) layout as@magpie-community/agent-zycode:cteno.agent.js(moejs, zero imports): detects Cteno viabin: "cteno-host-cli"anddir: "~/.cteno", declaresua: ["cteno"]and an embedded SVGdata:icon, and writes the selected model,gateway.v1,gateway.key(magpie-cteno), and model capabilities (context,output,images,thinking) to~/.config/magpie-cteno/connection.json.index.mjs+bridge.mjs(main, runs in Magpie's plugin host, zero dependencies, no network/process spawns): watchesconnection.json(plus synchronousprocess.once("exit", ...)flush on disable/unwire) and atomically updates only theid: "magpie"entry (api_format: "anthropic",picker_group: "Magpie") anddefault_profile_id: "magpie"in Cteno'sprofiles.json, keeping every user profile and top-level field (subscription_compress,light_model, media backends,base_url_schema) untouched.profiles.jsonbyte for byte when unmodified meanwhile (including CRLF and trailing-newline fidelity), or deletesprofiles.jsonwhen created by the bridge and still empty of user profiles. If the user added or changed profiles in Cteno while connected, onlyid: "magpie"is removed and user edits (including a newly chosen default) stay.profilesentries, and non-http(s)gateway URLs without touching user files; writes via mode-preservingwxtemp file +renameSync, with0600recovery state.Files:
packages/cteno/{package.json,cteno.agent.js,index.mjs,bridge.mjs,cteno.test.mjs,README.md}, one row inREADME.md, and oneregistry.jsonentry ("kind": "agent").Verification
HOME=$(mktemp -d) bun test packages/cteno: 10 pass, 0 fail (70 assertions).HOME=$(mktemp -d) bun test scripts/: 40 pass, 0 fail.bun scripts/check.mjs&bun scripts/bumped.mjs origin/main&npm pack --dry-run: pass (5.9 kBtarball, 5 files).cteno-host-cli 2.11.8, sandboxHOME+CTENO_APP_DATA_DIR+CTENO_HOST_ROOTwith an existingmy-ownuser profile):deepseek/deepseek-flash->cteno-host-cli profile listreportsdefaultProfileId: "magpie",byokProfileskeepsmy-ownand addsmagpie(pickerGroup: "Magpie",apiFormat: "anthropic",isCompressModel: true,thinking: true,baseUrl: "http://127.0.0.1:3425/v1").cmp -sconfirmsprofiles.jsonis restored byte for byte, andcteno-host-cli profile listreportsdefaultProfileId: "my-own"with onlymy-own.