Documentation
¶
Overview ¶
Command atomcode builds the CPA c-shared plugin library for AtomCode (AtomGit).
Both files in this directory are package main: main.go carries the exported cgo ABI and plugin.go carries the abiboot.Plugin implementation. Keeping the plugin implementation in the same package is what lets `go build -buildmode=c-shared ./plugins/atomcode` (see scripts/build.sh) emit the shared object directly from this directory. The dynamic library file name must start with the plugin id (`atomcode.so` or `atomcode-v<version>.so`); any other spelling makes the host derive the wrong id, and the resource routes are mounted under `/v0/resource/plugins/<id>/`.
Command atomcode implements the CLIProxyAPI native plugin for AtomCode (AtomGit's coding agent, `atomgit_atomcode/atomcode`).
The package is split after plugins/trae:
config.go provider keys, endpoint sets, settings credential.go persisted credential shape, expiry oauth.go the AtomGit broker: login, poll, exchange, refresh auth.go auth.parse / auth.login.* / auth.refresh models.go the models-v2 catalogue and its bundled fallback upstream.go gateway request preparation, stream consumption, error mapping executor.go executor.* routes credits.go plan status, the daily claim cascade, 60-day usage errors.go upstream error classification freshness.go credential renewal before use plugin.go registration and the management route table pluginui.go the HTML pages served into CPA-Manager-Plus
Unlike every other provider in this repository the upstream speaks OpenAI chat completions natively, so there is no translate.go: the client's body goes upstream verbatim and the upstream's frames come back verbatim.