@augmentcode/auggie-sdk-compat
v0.0.1-alpha.0
Published
Opt-in v1 -> v2 compatibility adapter: run existing @augmentcode/auggie-sdk (v1) consumers on the @augmentcode/cosmos-agent-sdk (v2) runtime
Downloads
6
Readme
@augmentcode/auggie-sdk-compat (TypeScript)
Opt-in v1 → v2 compatibility adapter. Lets existing v1
@augmentcode/auggie-sdk consumers run on the v2
@augmentcode/cosmos-agent-sdk runtime
(auggie-v2 --mode rpc) with minimal changes: switch the install target and the
import path.
npm install @augmentcode/auggie-sdk-compatPer the repo's TypeScript topology (CSS-1490/CSS-1498), this is a separate
adapter package that depends on the core client via
@augmentcode/cosmos-agent-sdk. The core package keeps its single runtime
dependency and never gains the compat surface.
Scope — Phase 1: Bridge + Trivial
- Bridge — reproduce the v1
Auggiefacade on top of the v2AgentClient(arg translation, facade, permission responder, model mapping, listener adapter,run()loop). - Trivial — re-export v1 errors, types, and listener interfaces.
Deferred (NOT present this phase)
The following v1 surfaces are intentionally absent from this package in Phase 1. Consumers that need them keep the v1 SDK installed alongside until a later phase lifts them:
- the AI-SDK provider (
AugmentLanguageModel,listModels,ModelInfo,ModelListResult,AugmentCredentials,resolveAugmentCredentials); - the context surface (
DirectContext,FileSystemContext,context/*).
⚠️ Security-relevant default (Phase 1)
For v1 behavior parity, the bridge installs a default-on permission
responder that auto-approves the agent's permission prompts (confirm →
approve, select → first option). This means the agent may run bash / edit /
write and confirm destructive prompts without human review unless you pass
your own handler. This is the chosen v1-parity default, documented prominently
here and at the facade constructor; an override hook is provided.
What's implemented (Phase 1 complete)
- v1 → v2 CLI argument translation (
./args) — CSS-1522. Auggiefacade with the default-on permission responder — CSS-1523.- Model-alias resolution (v1 model alias → v2
(provider, modelId), static map + live-catalog fallback) — CSS-1524. - v1 static type re-exports —
KnownModel,AuggieModel,PredefinedToolType,ToolIdentifier— CSS-1526.
Phase-1 limitations
- No typed
run()loop. The v1 typed-result / local-function / verificationrun()loop existed only in the v1 Python SDK; the v1 TypeScript SDK was an ACP client + AI-SDK provider with no typedrun(), so there is nothing to reproduce here (CSS-1525). The facade'srun()returns the agent's reply text. listeneris accepted but not yet invoked. The listener option is present for v1 signature-compatibility, but the bridge does not yet forward v2 agent events to it — passing a listener is currently a no-op. Wiring it to the v2 event stream is a fast follow-up.
Development
bun install
bun run build # tsup -> dist/
bun test # golden-fixture arg-translation suite
bun run lint # biome / ultracite