@botiverse/oar 0.76.3 → 0.77.0
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/README.md +6 -4
- package/assets/brands/NOTICE.md +3 -3
- package/assets/brands/codebuddy-on-dark.svg +1 -0
- package/assets/brands/codebuddy-on-light.svg +1 -0
- package/assets/brands/codebuddy.svg +1 -0
- package/dist/brands.d.ts +8 -0
- package/dist/brands.d.ts.map +1 -1
- package/dist/brands.js +8 -0
- package/dist/brands.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/observe/redact-record.js +2 -2
- package/dist/observe/redact-record.js.map +1 -1
- package/dist/runtimes/codebuddy/account-control.d.ts +13 -0
- package/dist/runtimes/codebuddy/account-control.d.ts.map +1 -0
- package/dist/runtimes/codebuddy/account-control.js +88 -0
- package/dist/runtimes/codebuddy/account-control.js.map +1 -0
- package/dist/runtimes/codebuddy/auth-status.d.ts +7 -0
- package/dist/runtimes/codebuddy/auth-status.d.ts.map +1 -0
- package/dist/runtimes/codebuddy/auth-status.js +44 -0
- package/dist/runtimes/codebuddy/auth-status.js.map +1 -0
- package/dist/runtimes/codebuddy/extensions.d.ts +5 -0
- package/dist/runtimes/codebuddy/extensions.d.ts.map +1 -0
- package/dist/runtimes/codebuddy/extensions.js +28 -0
- package/dist/runtimes/codebuddy/extensions.js.map +1 -0
- package/dist/runtimes/codebuddy/failure.d.ts +5 -0
- package/dist/runtimes/codebuddy/failure.d.ts.map +1 -0
- package/dist/runtimes/codebuddy/failure.js +35 -0
- package/dist/runtimes/codebuddy/failure.js.map +1 -0
- package/dist/runtimes/codebuddy/index.d.ts +20 -0
- package/dist/runtimes/codebuddy/index.d.ts.map +1 -0
- package/dist/runtimes/codebuddy/index.js +15 -0
- package/dist/runtimes/codebuddy/index.js.map +1 -0
- package/dist/runtimes/codebuddy/installation.d.ts +2 -0
- package/dist/runtimes/codebuddy/installation.d.ts.map +1 -0
- package/dist/runtimes/codebuddy/installation.js +7 -0
- package/dist/runtimes/codebuddy/installation.js.map +1 -0
- package/dist/runtimes/codebuddy/list-models.d.ts +6 -0
- package/dist/runtimes/codebuddy/list-models.d.ts.map +1 -0
- package/dist/runtimes/codebuddy/list-models.js +90 -0
- package/dist/runtimes/codebuddy/list-models.js.map +1 -0
- package/dist/runtimes/codebuddy/login.d.ts +6 -0
- package/dist/runtimes/codebuddy/login.d.ts.map +1 -0
- package/dist/runtimes/codebuddy/login.js +110 -0
- package/dist/runtimes/codebuddy/login.js.map +1 -0
- package/dist/runtimes/codebuddy/options.d.ts +5 -0
- package/dist/runtimes/codebuddy/options.d.ts.map +1 -0
- package/dist/runtimes/codebuddy/options.js +21 -0
- package/dist/runtimes/codebuddy/options.js.map +1 -0
- package/dist/runtimes/codebuddy/prompt-file.d.ts +6 -0
- package/dist/runtimes/codebuddy/prompt-file.d.ts.map +1 -0
- package/dist/runtimes/codebuddy/prompt-file.js +20 -0
- package/dist/runtimes/codebuddy/prompt-file.js.map +1 -0
- package/dist/runtimes/codebuddy/session.d.ts +5 -0
- package/dist/runtimes/codebuddy/session.d.ts.map +1 -0
- package/dist/runtimes/codebuddy/session.js +52 -0
- package/dist/runtimes/codebuddy/session.js.map +1 -0
- package/dist/runtimes/qoder/daemon.js +2 -2
- package/dist/runtimes/qoder/daemon.js.map +1 -1
- package/dist/shared/credential-redaction.d.ts +4 -0
- package/dist/shared/credential-redaction.d.ts.map +1 -1
- package/dist/shared/credential-redaction.js +13 -4
- package/dist/shared/credential-redaction.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @botiverse/oar
|
|
2
2
|
|
|
3
|
-
Provider-independent TypeScript contracts and built-in implementations for controlling and observing Antigravity, Claude, Codex, Cursor, Grok, Kimi, OpenCode, Pi, Pi Durable, Qwen Code, and Qoder.
|
|
3
|
+
Provider-independent TypeScript contracts and built-in implementations for controlling and observing Antigravity, Claude, Codex, CodeBuddy, Cursor, Grok, Kimi, OpenCode, Pi, Pi Durable, Qwen Code, and Qoder.
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
import { defaultRuntimes, promptAndWait } from "@botiverse/oar";
|
|
@@ -117,7 +117,7 @@ The package has these public entry points, plus `@botiverse/oar/pi-durable` ([be
|
|
|
117
117
|
- `@botiverse/oar`: the runtime registry and adapters, bounded `orient` snapshots, `defineRuntime`, `UnsupportedOptionError`, `RuntimeFailureError`, `SessionNotFoundError`, `SessionUnavailableError`, `serveMcpTools`, the `oar-voyage/3` recorder (`openVoyage`), and everything the brands and observe entry points below export. Node-only (adapters import `node:child_process` and runtime SDKs).
|
|
118
118
|
- `@botiverse/oar/browser`: portable contracts, registry, session kernel, observe helpers, agent report formatting, and branding. No Node adapters, process helpers or local image-file loaders.
|
|
119
119
|
- `@botiverse/oar/brands`: browser-safe runtime names and SVG icons.
|
|
120
|
-
- `@botiverse/oar/runtimes/<id>` (`claude`, `codex`, `pi`, `cursor`, `opencode`, `kimi`, `grok`, `antigravity`, `qwen`, `qoder`): one built-in runtime (`claudeRuntime`, …; cursor's is `createCursorRuntime`) without the others, for a host that needs only some of them. Each entry stays at about 1 to 2.5 MB of heap where the root entry takes about 50 MB (Node 26, [#405](https://github.com/botiverse/oar/pull/405)): the ACP SDK (about 20 MB) loads only when an ACP runtime first opens a session, lists models (kimi, grok, antigravity), reads grok's usage, signs Kimi in or out or reads its status, or creates the Qwen provider facade, and the pi and cursor SDKs when theirs first run. Node-only.
|
|
120
|
+
- `@botiverse/oar/runtimes/<id>` (`claude`, `codex`, `codebuddy`, `pi`, `cursor`, `opencode`, `kimi`, `grok`, `antigravity`, `qwen`, `qoder`): one built-in runtime (`claudeRuntime`, …; cursor's is `createCursorRuntime`) without the others, for a host that needs only some of them. Each entry stays at about 1 to 2.5 MB of heap where the root entry takes about 50 MB (Node 26, [#405](https://github.com/botiverse/oar/pull/405)): the ACP SDK (about 20 MB) loads only when an ACP runtime first opens a session, lists models (kimi, grok, antigravity, codebuddy), reads grok's usage, signs Kimi in or out or reads its status, or creates the Qwen provider facade, and the pi and cursor SDKs when theirs first run. Node-only.
|
|
121
121
|
- `@botiverse/oar/observe`: the browser-safe pure derivations over `RawEvent`s and `Event`s (`eventsOf`, `graphOf`, `usageOf`, `coalesceText`, `observeAgent`, `reduceStatus`, `tasksOf`, `observeStalls`, `classifyTool`, `reduceConversation`, `viewOf`, …) with no Node or adapter imports, so a browser or Electron-renderer bundle can import it directly. The root export re-exports all of them.
|
|
122
122
|
It also supplies `failureAdvice` (recovery timing per `FailureClass`) and `noticeText`, `noticeTone`, `phaseLabel`, `failureText` and `taskStatusLabel`, alongside `toolActionLabel` and `toolGroupSummary`: English display wording for OAR types, usable in JavaScriptCore too. Wording may change in a minor release; hosts must use the typed values for decisions, not parse the text ([display wording](https://github.com/botiverse/oar/blob/main/docs/spec/conversation.md#display-wording)).
|
|
123
123
|
- `@botiverse/oar/kernel`: the runtime-author SPI. `createSessionKernel` is the record stream every built-in adapter is built on (dense `seq`, cursor replay, control recording, the reachability rule) and `sealSession` derives the `Session` API face over an adapter. Pair with `defineRuntime` to ship a custom runtime (a scripted runtime for a host's tests, an in-process agent) without re-implementing the stream contract. `inputImagesRefusal` and `withInputImages` are the image rules every built-in runtime keeps, so a custom runtime refuses the inputs they refuse. `withdrawHeld` is the decision behind `withdraw` for a runtime that holds its own queue.
|
|
@@ -128,7 +128,7 @@ The package has these public entry points, plus `@botiverse/oar/pi-durable` ([be
|
|
|
128
128
|
|
|
129
129
|
Brand SVG files are exported at `@botiverse/oar/assets/brands/<runtime-id>.svg`. Any other deep import (`@botiverse/oar/dist/...`, source paths) is internal and may break without notice.
|
|
130
130
|
|
|
131
|
-
Antigravity, Grok, Kimi, and OpenCode share an internal ACP v1 transport and session kernel, but only their concrete runtime identities are public. The registry deliberately does not expose a generic `acp` runtime. Pi and Cursor run in the host process through their SDKs. The pi SDK (`@earendil-works/pi-coding-agent`) is a dependency of this package. `@cursor/sdk` is an optional peer dependency, and cursor is not in `defaultRuntimes`: install the SDK (`npm install @cursor/sdk@1.1.0`) and hand it over, `createRuntimeRegistry([...defaultRuntimes.list(), createCursorRuntime({ sdk: () => import("@cursor/sdk") })])`. Written in your code, that import fails your compile if the package is missing. It is Cursor's own package under Cursor's terms, and it signs in with `CURSOR_API_KEY` or its own `Cursor.auth.login()`.
|
|
131
|
+
Antigravity, CodeBuddy, Grok, Kimi, and OpenCode share an internal ACP v1 transport and session kernel, but only their concrete runtime identities are public. The registry deliberately does not expose a generic `acp` runtime. Pi and Cursor run in the host process through their SDKs. The pi SDK (`@earendil-works/pi-coding-agent`) is a dependency of this package. `@cursor/sdk` is an optional peer dependency, and cursor is not in `defaultRuntimes`: install the SDK (`npm install @cursor/sdk@1.1.0`) and hand it over, `createRuntimeRegistry([...defaultRuntimes.list(), createCursorRuntime({ sdk: () => import("@cursor/sdk") })])`. Written in your code, that import fails your compile if the package is missing. It is Cursor's own package under Cursor's terms, and it signs in with `CURSOR_API_KEY` or its own `Cursor.auth.login()`.
|
|
132
132
|
|
|
133
133
|
Community runtimes are contributed and maintained outside the core team (each maintainer is named on its runtime page). They ship in this package from a separate entry point, `@botiverse/oar/community`, and are not in `defaultRuntimes`: `createRuntimeRegistry([...defaultRuntimes.list(), createMorphRuntime()])` adds [Mister Morph](https://github.com/botiverse/oar/blob/main/docs/runtimes/morph.md), driven through its Console Runtime API. The `oar` CLI includes them.
|
|
134
134
|
|
|
@@ -325,7 +325,9 @@ Codex, Cursor (through its SDK's own `Cursor.auth`), Qoder and Kimi (`kimi
|
|
|
325
325
|
login`, with `KimiLoginOptions.region`) have both. Qwen has only
|
|
326
326
|
`authStatus`, a local check of whether a provider credential is configured;
|
|
327
327
|
its provider settings are on `createQwenProviderAuth`. Grok, OpenCode and Pi
|
|
328
|
-
have neither yet (Pi's provider logins are on `createPiProviderAuth`)
|
|
328
|
+
have neither yet (Pi's provider logins are on `createPiProviderAuth`).
|
|
329
|
+
CodeBuddy supports login and a private native account-state read, but no logout
|
|
330
|
+
([mapping](../../docs/runtimes/codebuddy.md#international-login)).
|
|
329
331
|
Antigravity has neither, since its terms do not allow signing in through a
|
|
330
332
|
third-party tool. `runtime.logout(installation)` signs Claude, Codex, Cursor
|
|
331
333
|
and Kimi out through their own logout (`claude auth logout`, `codex logout`,
|
package/assets/brands/NOTICE.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Runtime icons
|
|
2
2
|
|
|
3
|
-
Claude Code, Codex, Kimi, Grok, Cursor, OpenCode, Qoder and Antigravity SVGs are from LobeHub lobe-icons, commit a94750e3f5f8fc33757b839d85030e742284e43a, packages/static-svg/icons.
|
|
3
|
+
Claude Code, Codex, Kimi, Grok, Cursor, OpenCode, Qoder, CodeBuddy and Antigravity SVGs are from LobeHub lobe-icons, commit a94750e3f5f8fc33757b839d85030e742284e43a, packages/static-svg/icons.
|
|
4
4
|
Source: https://github.com/lobehub/lobe-icons/tree/a94750e3f5f8fc33757b839d85030e742284e43a/packages/static-svg/icons
|
|
5
|
-
Files: claudecode-color.svg, codex.svg, kimi-color.svg, grok.svg, cursor.svg, opencode.svg, antigravity-color.svg, qoder.svg.
|
|
5
|
+
Files: claudecode-color.svg, codex.svg, kimi-color.svg, grok.svg, cursor.svg, opencode.svg, antigravity-color.svg, qoder.svg, codebuddy.svg.
|
|
6
6
|
Brand names and marks belong to their respective owners.
|
|
7
7
|
|
|
8
8
|
Mister Morph: `app_logo_dark.svg` from the Mister Morph website (quailyquaily/mistermorph-website, `public/`), the project's own mark. `morph-on-dark.svg` swaps its two colors (#1F1F1F and white) for dark backgrounds.
|
|
@@ -14,7 +14,7 @@ Pi: https://pi.dev/logo-on-dark.svg (retrieved 2026-09-16), unmodified official
|
|
|
14
14
|
`light` and `dark` refer to the destination background. Claude Code and
|
|
15
15
|
Antigravity retain their single color assets and use the default fallback on
|
|
16
16
|
both backgrounds.
|
|
17
|
-
Codex, Grok, Cursor and
|
|
17
|
+
Codex, Grok, Cursor, OpenCode and CodeBuddy variants replace the upstream `currentColor` with explicit black
|
|
18
18
|
or white so they work in external `<img>` elements. Kimi's light variant changes
|
|
19
19
|
its white foreground to black; its dark variant is unchanged. These are local
|
|
20
20
|
color adaptations of the MIT-licensed LobeHub paths, not separately sourced
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="#fff" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>CodeBuddy</title><path d="M18.777 1.647c.28-.02.536.114.972.51 1.018.926 2.437 2.828 3.318 4.452l.34.631.482.24.11.06v3.638a5.206 5.206 0 00-5.32-1.23c-.491.166-1.021.471-2.08 1.082l-6.09 3.516c-1.057.61-1.586.916-1.975 1.259a5.208 5.208 0 00-1.493 5.572c.165.49.471 1.02 1.082 2.08l.315.543h-3.26c-.685 0-1.34-.135-1.939-.377-.169-.956-.009-1.789.469-2.335.158-.18.164-.189.13-.493a11.846 11.846 0 01-.057-1.711l.02-.444-.667-1.18C2.1 15.622 1.445 14.078 1.192 12.9c-.133-.647-.125-.934.04-1.146.1-.128.427-.261.822-.334.994-.175 3.162-.017 5.575.41l.25.043.551-.487c.915-.81 1.522-1.264 2.641-1.962 1.167-.73 2.484-1.331 3.967-1.807l.476-.152.261-.688c.937-2.471 1.896-4.293 2.58-4.9.235-.21.25-.22.422-.23z"></path><path d="M12.139 18.2a1.203 1.203 0 011.642.44l1.296 2.243a1.204 1.204 0 01-2.083 1.203l-1.296-2.243a1.203 1.203 0 01.44-1.644zM18.629 14.452a1.203 1.203 0 011.642.44l1.295 2.244a1.203 1.203 0 11-2.083 1.203l-1.295-2.243a1.203 1.203 0 01.44-1.644z"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="#000" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>CodeBuddy</title><path d="M18.777 1.647c.28-.02.536.114.972.51 1.018.926 2.437 2.828 3.318 4.452l.34.631.482.24.11.06v3.638a5.206 5.206 0 00-5.32-1.23c-.491.166-1.021.471-2.08 1.082l-6.09 3.516c-1.057.61-1.586.916-1.975 1.259a5.208 5.208 0 00-1.493 5.572c.165.49.471 1.02 1.082 2.08l.315.543h-3.26c-.685 0-1.34-.135-1.939-.377-.169-.956-.009-1.789.469-2.335.158-.18.164-.189.13-.493a11.846 11.846 0 01-.057-1.711l.02-.444-.667-1.18C2.1 15.622 1.445 14.078 1.192 12.9c-.133-.647-.125-.934.04-1.146.1-.128.427-.261.822-.334.994-.175 3.162-.017 5.575.41l.25.043.551-.487c.915-.81 1.522-1.264 2.641-1.962 1.167-.73 2.484-1.331 3.967-1.807l.476-.152.261-.688c.937-2.471 1.896-4.293 2.58-4.9.235-.21.25-.22.422-.23z"></path><path d="M12.139 18.2a1.203 1.203 0 011.642.44l1.296 2.243a1.204 1.204 0 01-2.083 1.203l-1.296-2.243a1.203 1.203 0 01.44-1.644zM18.629 14.452a1.203 1.203 0 011.642.44l1.295 2.244a1.203 1.203 0 11-2.083 1.203l-1.295-2.243a1.203 1.203 0 01.44-1.644z"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>CodeBuddy</title><path d="M18.777 1.647c.28-.02.536.114.972.51 1.018.926 2.437 2.828 3.318 4.452l.34.631.482.24.11.06v3.638a5.206 5.206 0 00-5.32-1.23c-.491.166-1.021.471-2.08 1.082l-6.09 3.516c-1.057.61-1.586.916-1.975 1.259a5.208 5.208 0 00-1.493 5.572c.165.49.471 1.02 1.082 2.08l.315.543h-3.26c-.685 0-1.34-.135-1.939-.377-.169-.956-.009-1.789.469-2.335.158-.18.164-.189.13-.493a11.846 11.846 0 01-.057-1.711l.02-.444-.667-1.18C2.1 15.622 1.445 14.078 1.192 12.9c-.133-.647-.125-.934.04-1.146.1-.128.427-.261.822-.334.994-.175 3.162-.017 5.575.41l.25.043.551-.487c.915-.81 1.522-1.264 2.641-1.962 1.167-.73 2.484-1.331 3.967-1.807l.476-.152.261-.688c.937-2.471 1.896-4.293 2.58-4.9.235-.21.25-.22.422-.23z"></path><path d="M12.139 18.2a1.203 1.203 0 011.642.44l1.296 2.243a1.204 1.204 0 01-2.083 1.203l-1.296-2.243a1.203 1.203 0 01.44-1.644zM18.629 14.452a1.203 1.203 0 011.642.44l1.295 2.244a1.203 1.203 0 11-2.083 1.203l-1.295-2.243a1.203 1.203 0 01.44-1.644z"></path></svg>
|
package/dist/brands.d.ts
CHANGED
|
@@ -24,6 +24,14 @@ export declare const runtimeBrands: {
|
|
|
24
24
|
readonly name: "Claude Code";
|
|
25
25
|
readonly icon: `data:image/svg+xml,${string}`;
|
|
26
26
|
};
|
|
27
|
+
readonly codebuddy: {
|
|
28
|
+
readonly name: "CodeBuddy Code";
|
|
29
|
+
readonly icon: `data:image/svg+xml,${string}`;
|
|
30
|
+
readonly icons: {
|
|
31
|
+
readonly light: `data:image/svg+xml,${string}`;
|
|
32
|
+
readonly dark: `data:image/svg+xml,${string}`;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
27
35
|
readonly codex: {
|
|
28
36
|
readonly name: "Codex";
|
|
29
37
|
readonly icon: `data:image/svg+xml,${string}`;
|
package/dist/brands.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brands.d.ts","sources":["../src/brands.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,GA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CoE,YAAY;;CAAa,CAAC"}
|
package/dist/brands.js
CHANGED
|
@@ -16,6 +16,14 @@ const brands = {
|
|
|
16
16
|
name: "Claude Code",
|
|
17
17
|
icon: `data:image/svg+xml,${encodeURIComponent("<svg height=\"1em\" style=\"flex:none;line-height:1\" viewBox=\"0 0 24 24\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\"><title>Claude Code</title><path clip-rule=\"evenodd\" d=\"M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z\" fill=\"#D97757\" fill-rule=\"evenodd\"></path></svg>")}`,
|
|
18
18
|
},
|
|
19
|
+
codebuddy: {
|
|
20
|
+
name: "CodeBuddy Code",
|
|
21
|
+
icon: `data:image/svg+xml,${encodeURIComponent("<svg fill=\"currentColor\" fill-rule=\"evenodd\" height=\"1em\" style=\"flex:none;line-height:1\" viewBox=\"0 0 24 24\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\"><title>CodeBuddy</title><path d=\"M18.777 1.647c.28-.02.536.114.972.51 1.018.926 2.437 2.828 3.318 4.452l.34.631.482.24.11.06v3.638a5.206 5.206 0 00-5.32-1.23c-.491.166-1.021.471-2.08 1.082l-6.09 3.516c-1.057.61-1.586.916-1.975 1.259a5.208 5.208 0 00-1.493 5.572c.165.49.471 1.02 1.082 2.08l.315.543h-3.26c-.685 0-1.34-.135-1.939-.377-.169-.956-.009-1.789.469-2.335.158-.18.164-.189.13-.493a11.846 11.846 0 01-.057-1.711l.02-.444-.667-1.18C2.1 15.622 1.445 14.078 1.192 12.9c-.133-.647-.125-.934.04-1.146.1-.128.427-.261.822-.334.994-.175 3.162-.017 5.575.41l.25.043.551-.487c.915-.81 1.522-1.264 2.641-1.962 1.167-.73 2.484-1.331 3.967-1.807l.476-.152.261-.688c.937-2.471 1.896-4.293 2.58-4.9.235-.21.25-.22.422-.23z\"></path><path d=\"M12.139 18.2a1.203 1.203 0 011.642.44l1.296 2.243a1.204 1.204 0 01-2.083 1.203l-1.296-2.243a1.203 1.203 0 01.44-1.644zM18.629 14.452a1.203 1.203 0 011.642.44l1.295 2.244a1.203 1.203 0 11-2.083 1.203l-1.295-2.243a1.203 1.203 0 01.44-1.644z\"></path></svg>")}`,
|
|
22
|
+
icons: {
|
|
23
|
+
light: `data:image/svg+xml,${encodeURIComponent("<svg fill=\"#000\" fill-rule=\"evenodd\" height=\"1em\" style=\"flex:none;line-height:1\" viewBox=\"0 0 24 24\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\"><title>CodeBuddy</title><path d=\"M18.777 1.647c.28-.02.536.114.972.51 1.018.926 2.437 2.828 3.318 4.452l.34.631.482.24.11.06v3.638a5.206 5.206 0 00-5.32-1.23c-.491.166-1.021.471-2.08 1.082l-6.09 3.516c-1.057.61-1.586.916-1.975 1.259a5.208 5.208 0 00-1.493 5.572c.165.49.471 1.02 1.082 2.08l.315.543h-3.26c-.685 0-1.34-.135-1.939-.377-.169-.956-.009-1.789.469-2.335.158-.18.164-.189.13-.493a11.846 11.846 0 01-.057-1.711l.02-.444-.667-1.18C2.1 15.622 1.445 14.078 1.192 12.9c-.133-.647-.125-.934.04-1.146.1-.128.427-.261.822-.334.994-.175 3.162-.017 5.575.41l.25.043.551-.487c.915-.81 1.522-1.264 2.641-1.962 1.167-.73 2.484-1.331 3.967-1.807l.476-.152.261-.688c.937-2.471 1.896-4.293 2.58-4.9.235-.21.25-.22.422-.23z\"></path><path d=\"M12.139 18.2a1.203 1.203 0 011.642.44l1.296 2.243a1.204 1.204 0 01-2.083 1.203l-1.296-2.243a1.203 1.203 0 01.44-1.644zM18.629 14.452a1.203 1.203 0 011.642.44l1.295 2.244a1.203 1.203 0 11-2.083 1.203l-1.295-2.243a1.203 1.203 0 01.44-1.644z\"></path></svg>")}`,
|
|
24
|
+
dark: `data:image/svg+xml,${encodeURIComponent("<svg fill=\"#fff\" fill-rule=\"evenodd\" height=\"1em\" style=\"flex:none;line-height:1\" viewBox=\"0 0 24 24\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\"><title>CodeBuddy</title><path d=\"M18.777 1.647c.28-.02.536.114.972.51 1.018.926 2.437 2.828 3.318 4.452l.34.631.482.24.11.06v3.638a5.206 5.206 0 00-5.32-1.23c-.491.166-1.021.471-2.08 1.082l-6.09 3.516c-1.057.61-1.586.916-1.975 1.259a5.208 5.208 0 00-1.493 5.572c.165.49.471 1.02 1.082 2.08l.315.543h-3.26c-.685 0-1.34-.135-1.939-.377-.169-.956-.009-1.789.469-2.335.158-.18.164-.189.13-.493a11.846 11.846 0 01-.057-1.711l.02-.444-.667-1.18C2.1 15.622 1.445 14.078 1.192 12.9c-.133-.647-.125-.934.04-1.146.1-.128.427-.261.822-.334.994-.175 3.162-.017 5.575.41l.25.043.551-.487c.915-.81 1.522-1.264 2.641-1.962 1.167-.73 2.484-1.331 3.967-1.807l.476-.152.261-.688c.937-2.471 1.896-4.293 2.58-4.9.235-.21.25-.22.422-.23z\"></path><path d=\"M12.139 18.2a1.203 1.203 0 011.642.44l1.296 2.243a1.204 1.204 0 01-2.083 1.203l-1.296-2.243a1.203 1.203 0 01.44-1.644zM18.629 14.452a1.203 1.203 0 011.642.44l1.295 2.244a1.203 1.203 0 11-2.083 1.203l-1.295-2.243a1.203 1.203 0 01.44-1.644z\"></path></svg>")}`,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
19
27
|
codex: {
|
|
20
28
|
name: "Codex",
|
|
21
29
|
icon: `data:image/svg+xml,${encodeURIComponent("<svg fill=\"currentColor\" fill-rule=\"evenodd\" height=\"1em\" style=\"flex:none;line-height:1\" viewBox=\"0 0 24 24\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\"><title>Codex</title><path clip-rule=\"evenodd\" d=\"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z\"></path></svg>")}`,
|
package/dist/brands.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brands.js","sources":["../src/brands.ts"],"names":[],"mappings":"AAKA,4EAA4E;AAC5E,MAAM,UAAU,gBAAgB,CAAC,KAAmB,EAAE,KAAuB;IAC3E,OAAO,KAAK,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC;AAC5C,CAAC;AAED,MAAM,MAAM,GAAG;IACb,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,sBAAsB,kBAAkB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CAAC,EAAE;QAC/S,KAAK,EAAE;YACL,KAAK,EAAE,sBAAsB,kBAAkB,CAAC,qPAAqP,CAAC,EAAE;YACxS,IAAI,EAAE,sBAAsB,kBAAkB,CAAC,qPAAqP,CAAC,EAAE;SACxS;KACF;IACD,WAAW,EAAE;QACX,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,sBAAsB,kBAAkB,CAAC,s2PAAs2P,CAAC,EAAE;KACz5P;CACwD,CAAC;AAE5D,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,GAAG,MAAM,EAAE,YAAY,EAAE,EAAE,GAAG,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,EAAW,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -65,4 +65,8 @@ export { qoderListModels, projectQoderModels } from "./runtimes/qoder/list-model
|
|
|
65
65
|
export { orient } from "./shared/orientation/index.js";
|
|
66
66
|
export { userShellEnvironment } from "./shared/shell-environment.js";
|
|
67
67
|
export { writeShellEnvironmentCapture } from "./shared/shell-environment-capture.js";
|
|
68
|
+
export { codebuddyRuntime } from "./runtimes/codebuddy/index.js";
|
|
69
|
+
export { codebuddySession } from "./runtimes/codebuddy/session.js";
|
|
70
|
+
export { codebuddyInstallation } from "./runtimes/codebuddy/installation.js";
|
|
71
|
+
export { codebuddyListModels, projectCodebuddyModels } from "./runtimes/codebuddy/list-models.js";
|
|
68
72
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAYhD,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,qBAA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able import/max-dependencies -- The root entry is the composition point for all built-in runtimes. */
|
|
1
2
|
import { RuntimeRegistry } from "./registry.js";
|
|
2
3
|
import { antigravityRuntime } from "./runtimes/antigravity/index.js";
|
|
3
4
|
import { claudeRuntime } from "./runtimes/claude/index.js";
|
|
5
|
+
import { codebuddyRuntime } from "./runtimes/codebuddy/index.js";
|
|
4
6
|
import { codexRuntime } from "./runtimes/codex/index.js";
|
|
5
7
|
import { grokRuntime } from "./runtimes/grok/index.js";
|
|
6
8
|
import { kimiRuntime } from "./runtimes/kimi/index.js";
|
|
@@ -61,6 +63,7 @@ export const defaultRuntimes = new RuntimeRegistry([
|
|
|
61
63
|
antigravityRuntime,
|
|
62
64
|
claudeRuntime,
|
|
63
65
|
codexRuntime,
|
|
66
|
+
codebuddyRuntime,
|
|
64
67
|
grokRuntime,
|
|
65
68
|
kimiRuntime,
|
|
66
69
|
opencodeRuntime,
|
|
@@ -76,4 +79,8 @@ export { qoderListModels, projectQoderModels } from "./runtimes/qoder/list-model
|
|
|
76
79
|
export { orient } from "./shared/orientation/index.js";
|
|
77
80
|
export { userShellEnvironment } from "./shared/shell-environment.js";
|
|
78
81
|
export { writeShellEnvironmentCapture } from "./shared/shell-environment-capture.js";
|
|
82
|
+
export { codebuddyRuntime } from "./runtimes/codebuddy/index.js";
|
|
83
|
+
export { codebuddySession } from "./runtimes/codebuddy/session.js";
|
|
84
|
+
export { codebuddyInstallation } from "./runtimes/codebuddy/installation.js";
|
|
85
|
+
export { codebuddyListModels, projectCodebuddyModels } from "./runtimes/codebuddy/list-models.js";
|
|
79
86
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,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../shared/json.js";
|
|
3
3
|
/**
|
|
4
4
|
* A stored record with oar's current credential-redaction rules applied
|
|
@@ -19,7 +19,7 @@ export function redactRecord(record) {
|
|
|
19
19
|
if (native === null) {
|
|
20
20
|
return record;
|
|
21
21
|
}
|
|
22
|
-
const redacted =
|
|
22
|
+
const redacted = redactCredentialNotification(record.body.type, native);
|
|
23
23
|
if (redacted === native || JSON.stringify(redacted) === JSON.stringify(native)) {
|
|
24
24
|
return record;
|
|
25
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redact-record.js","sources":["../../src/observe/redact-record.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"redact-record.js","sources":["../../src/observe/redact-record.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAAC,MAAgB;IAC3C,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAC5B,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5C,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACpB,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,MAAM,QAAQ,GAAG,4BAA4B,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACxE,IAAI,QAAQ,KAAK,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QAC/E,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,EAAE,GAAG,MAAM,EAAE,IAAI,EAAE,EAAE,GAAG,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type JsonRecord } from "../../shared/json.js";
|
|
2
|
+
import { LoginSecrets, type LoginProcess } from "../../shared/login.js";
|
|
3
|
+
/** Initialize and authentication replies carry access tokens. This process has no record or log sink. */
|
|
4
|
+
export interface CodebuddyAccountControl {
|
|
5
|
+
readonly process: LoginProcess;
|
|
6
|
+
readonly secrets: LoginSecrets;
|
|
7
|
+
request(request: JsonRecord): Promise<JsonRecord>;
|
|
8
|
+
}
|
|
9
|
+
export declare class CodebuddyAccountRefusalError extends Error {
|
|
10
|
+
constructor(message: string);
|
|
11
|
+
}
|
|
12
|
+
export declare function codebuddyAccountControl(command: string, env: NodeJS.ProcessEnv, callback?: (request: JsonRecord) => void): CodebuddyAccountControl;
|
|
13
|
+
//# sourceMappingURL=account-control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-control.d.ts","sources":["../../../src/runtimes/codebuddy/account-control.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAqB,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE3F,yGAAyG;AACzG,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACnD;AAED,qBAAa,4BAA6B,SAAQ,KAAK;IACrD,YAAY,OAAO,EAAE,MAAM,EAAiE;CAC7F;AAcD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,QAAQ,GAAE,CAAC,OAAO,EAAE,UAAU,KAAK,IAAe,GACjD,uBAAuB,CA0CzB"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { asRecord, parseJson } from "../../shared/json.js";
|
|
3
|
+
import { LoginSecrets, spawnLoginProcess } from "../../shared/login.js";
|
|
4
|
+
export class CodebuddyAccountRefusalError extends Error {
|
|
5
|
+
constructor(message) { super(message); this.name = "CodebuddyAccountRefusalError"; }
|
|
6
|
+
}
|
|
7
|
+
function exitedError() { return new Error("CodeBuddy exited before answering its account query"); }
|
|
8
|
+
function rememberSecrets(value, secrets) {
|
|
9
|
+
if (Array.isArray(value)) {
|
|
10
|
+
for (const item of value) {
|
|
11
|
+
rememberSecrets(item, secrets);
|
|
12
|
+
}
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const record = asRecord(value);
|
|
16
|
+
if (record === null) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
for (const [key, item] of Object.entries(record)) {
|
|
20
|
+
if (typeof item === "string" && /token|secret|password|api.?key|authUrl|^state$|email|^uid$|^userId$|nickname|enterpriseName|enterpriseId|^username$|^displayName$/iu.test(key)) {
|
|
21
|
+
secrets.add(item);
|
|
22
|
+
}
|
|
23
|
+
else if (typeof item === "object") {
|
|
24
|
+
rememberSecrets(item, secrets);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export function codebuddyAccountControl(command, env, callback = () => { }) {
|
|
29
|
+
const secrets = new LoginSecrets();
|
|
30
|
+
const pending = new Map();
|
|
31
|
+
const child = spawnLoginProcess(command, ["--print", "--input-format", "stream-json", "--output-format", "stream-json"], env, {
|
|
32
|
+
onLine(line, stream) {
|
|
33
|
+
if (stream !== "stdout") {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const frame = asRecord(parseJson(line));
|
|
37
|
+
if (frame === null) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
rememberSecrets(frame, secrets);
|
|
41
|
+
const response = asRecord(frame.response);
|
|
42
|
+
if (frame.type === "control_response" && typeof response?.request_id === "string") {
|
|
43
|
+
const waiting = pending.get(response.request_id);
|
|
44
|
+
if (waiting === undefined) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
pending.delete(response.request_id);
|
|
48
|
+
if (response.subtype === "success") {
|
|
49
|
+
waiting.resolve(asRecord(response.response) ?? {});
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
waiting.reject(new CodebuddyAccountRefusalError(typeof response.error === "string" ? secrets.line(response.error) : "CodeBuddy refused the control request"));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
else if (frame.type === "control_request") {
|
|
56
|
+
const request = asRecord(frame.request);
|
|
57
|
+
if (request !== null) {
|
|
58
|
+
callback(request);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
let exited = false;
|
|
64
|
+
// oxlint-disable-next-line promise/prefer-await-to-then -- exit notification rejects all pending calls
|
|
65
|
+
void child.exited.then(() => {
|
|
66
|
+
exited = true;
|
|
67
|
+
for (const waiting of pending.values()) {
|
|
68
|
+
waiting.reject(exitedError());
|
|
69
|
+
}
|
|
70
|
+
pending.clear();
|
|
71
|
+
return null;
|
|
72
|
+
});
|
|
73
|
+
return {
|
|
74
|
+
process: child, secrets,
|
|
75
|
+
async request(request) {
|
|
76
|
+
if (exited) {
|
|
77
|
+
throw exitedError();
|
|
78
|
+
}
|
|
79
|
+
const id = `oar-account-${randomUUID()}`;
|
|
80
|
+
const waiting = Promise.withResolvers();
|
|
81
|
+
pending.set(id, waiting);
|
|
82
|
+
child.write(`${JSON.stringify({ type: "control_request", request_id: id, request })}\n`);
|
|
83
|
+
const response = await waiting.promise;
|
|
84
|
+
return response;
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=account-control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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AAE,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC;YACzF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC;YACvC,OAAO,QAAQ,CAAC;QAClB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AvailableInstallation } from "../../contracts/installation.js";
|
|
2
|
+
import type { AuthStatus, AuthStatusOptions } from "../../contracts/login.js";
|
|
3
|
+
import { type JsonRecord } from "../../shared/json.js";
|
|
4
|
+
/** Do not expose the account object: it contains the access token as well as account identity. */
|
|
5
|
+
export declare function projectCodebuddyAuthStatus(response: JsonRecord): AuthStatus;
|
|
6
|
+
export declare function codebuddyAuthStatus(installation: AvailableInstallation, options?: AuthStatusOptions, signal?: AbortSignal): Promise<AuthStatus>;
|
|
7
|
+
//# sourceMappingURL=auth-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-status.d.ts","sources":["../../../src/runtimes/codebuddy/auth-status.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAMjE,kGAAkG;AAClG,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,UAAU,GAAG,UAAU,CAI3E;AAED,wBAAsB,mBAAmB,CAAC,YAAY,EAAE,qBAAqB,EAAE,OAAO,GAAE,iBAAsB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAoBzJ"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { environmentValue, sessionEnvironment } from "../../shared/environment.js";
|
|
2
|
+
import { asRecord } from "../../shared/json.js";
|
|
3
|
+
import { loginBounds } from "../../shared/login.js";
|
|
4
|
+
import { codebuddyAccountControl } from "./account-control.js";
|
|
5
|
+
const SOURCE = "codebuddy stream-json initialize.account";
|
|
6
|
+
/** Do not expose the account object: it contains the access token as well as account identity. */
|
|
7
|
+
export function projectCodebuddyAuthStatus(response) {
|
|
8
|
+
if (response.account === null) {
|
|
9
|
+
return { kind: "logged_out", source: SOURCE };
|
|
10
|
+
}
|
|
11
|
+
if (asRecord(response.account) !== null) {
|
|
12
|
+
return { kind: "logged_in", source: SOURCE };
|
|
13
|
+
}
|
|
14
|
+
return { kind: "unknown", source: SOURCE, detail: "CodeBuddy initialize gave no account state" };
|
|
15
|
+
}
|
|
16
|
+
export async function codebuddyAuthStatus(installation, options = {}, signal) {
|
|
17
|
+
if (installation.via !== "executable") {
|
|
18
|
+
return { kind: "unknown", detail: "not a machine-installed executable" };
|
|
19
|
+
}
|
|
20
|
+
const env = sessionEnvironment(options.env);
|
|
21
|
+
if ((environmentValue(env, "CODEBUDDY_API_KEY") ?? "") !== "") {
|
|
22
|
+
// Native initialize may synthesize an account from this key without validating it.
|
|
23
|
+
return { kind: "unknown", source: SOURCE, configured: ["environment: CODEBUDDY_API_KEY"], detail: "CODEBUDDY_API_KEY is configured; the native account query does not validate this key or its provider endpoint." };
|
|
24
|
+
}
|
|
25
|
+
const bounds = loginBounds(signal, options.timeoutMs ?? 30_000);
|
|
26
|
+
let client = undefined;
|
|
27
|
+
try {
|
|
28
|
+
const control = codebuddyAccountControl(installation.command, env);
|
|
29
|
+
client = control;
|
|
30
|
+
const read = async () => projectCodebuddyAuthStatus(await control.request({ subtype: "initialize" }));
|
|
31
|
+
const timeout = async () => { const stopped = await bounds.stopped; return { kind: "unknown", source: SOURCE, detail: stopped === "cancelled" ? "CodeBuddy account query cancelled" : "CodeBuddy account query timed out" }; };
|
|
32
|
+
return await Promise.race([read(), timeout()]);
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
// Process output and control errors can contain an account or a credential.
|
|
36
|
+
return { kind: "unknown", source: SOURCE, detail: "CodeBuddy account query ended without an answer" };
|
|
37
|
+
}
|
|
38
|
+
finally {
|
|
39
|
+
bounds.dispose();
|
|
40
|
+
client?.process.stop();
|
|
41
|
+
await client?.process.exited;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=auth-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-status.js","sources":["../../../src/runtimes/codebuddy/auth-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGnF,OAAO,EAAE,QAAQ,EAAmB,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,MAAM,GAAG,0CAA0C,CAAC;AAE1D,kGAAkG;AAClG,MAAM,UAAU,0BAA0B,CAAC,QAAoB;IAC7D,IAAI,QAAQ,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;QAAC,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,CAAC;IACjF,IAAI,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;QAAC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,CAAC;IAC1F,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,4CAA4C,EAAE,CAAC;AACnG,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,YAAmC,EAAE,OAAO,GAAsB,EAAE,EAAE,MAAoB;IAClI,IAAI,YAAY,CAAC,GAAG,KAAK,YAAY,EAAE,CAAC;QAAC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,oCAAoC,EAA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EAAE,MAAM,EAAE,iDAAiD,EAAE,CAAC;IACxG,CAAC;YAAS,CAAC;QACT,MAAM,CAAC,OAAO,EAAE,CAAC;QAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;QAAC,MAAM,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC;IACzE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Native 2.178.1 ExtensionMethod and extNotification call sites.
|
|
2
|
+
* question and delegateTool are requests, not notifications. Preserve
|
|
3
|
+
* received notifications without inventing typed UI, task or child semantics. */
|
|
4
|
+
export declare const codebuddyNotifications: readonly string[];
|
|
5
|
+
//# sourceMappingURL=extensions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensions.d.ts","sources":["../../../src/runtimes/codebuddy/extensions.ts"],"names":[],"mappings":"AAAA;;iFAEiF;AACjF,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAuBnD,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Native 2.178.1 ExtensionMethod and extNotification call sites.
|
|
2
|
+
* question and delegateTool are requests, not notifications. Preserve
|
|
3
|
+
* received notifications without inventing typed UI, task or child semantics. */
|
|
4
|
+
export const codebuddyNotifications = [
|
|
5
|
+
"_codebuddy.ai/artifact",
|
|
6
|
+
"_codebuddy.ai/artifactBatch",
|
|
7
|
+
"_codebuddy.ai/checkpoint",
|
|
8
|
+
"_codebuddy.ai/command",
|
|
9
|
+
"_codebuddy.ai/authUrl",
|
|
10
|
+
"_codebuddy.ai/liteModelReset",
|
|
11
|
+
"_codebuddy.ai/file_history_snapshot",
|
|
12
|
+
"_codebuddy.ai/delegateToolsChanged",
|
|
13
|
+
"_codebuddy.ai/uiControl",
|
|
14
|
+
"_codebuddy.ai/modRender",
|
|
15
|
+
"_codebuddy.ai/modPress",
|
|
16
|
+
"_codebuddy.ai/fileDirectoryApproval/committed",
|
|
17
|
+
"_codebuddy.ai/modAuthoringChanged",
|
|
18
|
+
"_codebuddy.ai/modClientQuery",
|
|
19
|
+
"_codebuddy.ai/modClientQueryCancel",
|
|
20
|
+
"_codebuddy.ai/modViewEvent",
|
|
21
|
+
"_codebuddy.ai/modSlots",
|
|
22
|
+
"_codebuddy.ai/modRenderFold",
|
|
23
|
+
"_codebuddy.ai/modResidentInvalidate",
|
|
24
|
+
"_codebuddy.ai/modComponentsChanged",
|
|
25
|
+
"_codebuddy.ai/modClientReadyRequired",
|
|
26
|
+
"_codebuddy.ai/modCustomizationChanged",
|
|
27
|
+
];
|
|
28
|
+
//# sourceMappingURL=extensions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensions.js","sources":["../../../src/runtimes/codebuddy/extensions.ts"],"names":[],"mappings":"AAAA;;iFAEiF;AACjF,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACvD,wBAAwB;IACxB,6BAA6B;IAC7B,0BAA0B;IAC1B,uBAAuB;IACvB,uBAAuB;IACvB,8BAA8B;IAC9B,qCAAqC;IACrC,oCAAoC;IACpC,yBAAyB;IACzB,yBAAyB;IACzB,wBAAwB;IACxB,+CAA+C;IAC/C,mCAAmC;IACnC,8BAA8B;IAC9B,oCAAoC;IACpC,4BAA4B;IAC5B,wBAAwB;IACxB,6BAA6B;IAC7B,qCAAqC;IACrC,oCAAoC;IACpC,sCAAsC;IACtC,uCAAuC;CACxC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { TurnOutcome } from "../../contracts/session.js";
|
|
2
|
+
import { type JsonRecord } from "../../shared/json.js";
|
|
3
|
+
/** A successful prompt RPC can still carry a failed native task outcome. */
|
|
4
|
+
export declare function codebuddyPromptOutcome(response: JsonRecord): TurnOutcome | null;
|
|
5
|
+
//# sourceMappingURL=failure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"failure.d.ts","sources":["../../../src/runtimes/codebuddy/failure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE5E,OAAO,EAAiC,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAQtF,4EAA4E;AAC5E,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,UAAU,GAAG,WAAW,GAAG,IAAI,CAqB/E"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { failureFromStatus } from "../../shared/failure-class.js";
|
|
2
|
+
import { asNumber, asRecord, parseJson } from "../../shared/json.js";
|
|
3
|
+
// Native 2.178.1 error categories precede the less specific HTTP status.
|
|
4
|
+
const CATEGORIES = {
|
|
5
|
+
quota: "quota", auth: "auth", custom_model_auth: "auth", network: "unknown",
|
|
6
|
+
model_service: "provider", empty_model_response: "provider", internal: "unknown",
|
|
7
|
+
};
|
|
8
|
+
/** A successful prompt RPC can still carry a failed native task outcome. */
|
|
9
|
+
export function codebuddyPromptOutcome(response) {
|
|
10
|
+
if (response.stopReason === "cancelled") {
|
|
11
|
+
return { kind: "aborted" };
|
|
12
|
+
}
|
|
13
|
+
// oxlint-disable-next-line eslint/no-underscore-dangle -- Native ACP extension envelope.
|
|
14
|
+
const meta = asRecord(response._meta);
|
|
15
|
+
const outcome = meta?.["codebuddy.ai/outcome"];
|
|
16
|
+
if (response.stopReason !== "refusal" && !(typeof outcome === "string" && outcome.startsWith("FAILED"))) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
const raw = meta?.["codebuddy.ai/errorMessage"];
|
|
20
|
+
const error = typeof raw === "string" ? asRecord(parseJson(raw)) : null;
|
|
21
|
+
const nested = asRecord(error?.error);
|
|
22
|
+
const data = asRecord(error?.data);
|
|
23
|
+
const nestedData = asRecord(nested?.data);
|
|
24
|
+
const category = data?.category ?? nestedData?.category;
|
|
25
|
+
const status = asNumber(data?.statusCode) ?? asNumber(nestedData?.statusCode);
|
|
26
|
+
const message = error?.message ?? nested?.message;
|
|
27
|
+
const fallback = typeof outcome === "string" ? outcome : String(response.stopReason);
|
|
28
|
+
return {
|
|
29
|
+
kind: "failed", failure: (typeof category === "string" ? CATEGORIES[category] : undefined)
|
|
30
|
+
?? (status === null ? "unknown" : failureFromStatus(status)),
|
|
31
|
+
reason: typeof message === "string" ? message : fallback,
|
|
32
|
+
...(status === null ? {} : { status }),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=failure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"failure.js","sources":["../../../src/runtimes/codebuddy/failure.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAmB,MAAM,sBAAsB,CAAC;AAEtF,yEAAyE;AACzE,MAAM,UAAU,GAAoD;IAClE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS;IAC3E,aAAa,EAAE,UAAU,EAAE,oBAAoB,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS;CACjF,CAAC;AAEF,4EAA4E;AAC5E,MAAM,UAAU,sBAAsB,CAAC,QAAoB;IACzD,IAAI,QAAQ,CAAC,UAAU,KAAK,WAAW,EAAE,CAAC;QAAC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAAC,CAAC;IACxE,yFAAyF;IACzF,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,IAAI,EAAE,CAAC,sBAAsB,CAAC,CAAC;IAC/C,IAAI,QAAQ,CAAC,UAAU,KAAK,SAAS,IAAI,CAAC,CAAC,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;QAAC,OAAO,IAAI,CAAC;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,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;KACvC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const codebuddyRuntime: {
|
|
2
|
+
readonly id: "codebuddy";
|
|
3
|
+
readonly brand: {
|
|
4
|
+
readonly name: "CodeBuddy Code";
|
|
5
|
+
readonly icon: `data:image/svg+xml,${string}`;
|
|
6
|
+
readonly icons: {
|
|
7
|
+
readonly light: `data:image/svg+xml,${string}`;
|
|
8
|
+
readonly dark: `data:image/svg+xml,${string}`;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
readonly refusedSessionOptions: Readonly<Partial<Record<import("../../contracts/runtime.js").RefusableSessionOption, string>>>;
|
|
12
|
+
readonly installation: import("../../browser.js").InstallationProbe;
|
|
13
|
+
readonly listModels: (installation: import("../../browser.js").AvailableInstallation, options?: import("../../browser.js").ListModelsOptions | undefined) => Promise<import("../../browser.js").ListModelsResult>;
|
|
14
|
+
readonly login: (installation: import("../../browser.js").AvailableInstallation, interaction: import("../../browser.js").ProviderLoginInteraction, options?: import("../../contracts/login.js").LoginOptions | undefined) => Promise<import("../../contracts/login.js").LoginResult>;
|
|
15
|
+
readonly authStatus: (installation: import("../../browser.js").AvailableInstallation, options?: import("../../contracts/login.js").AuthStatusOptions | undefined) => Promise<import("../../contracts/login.js").AuthStatus>;
|
|
16
|
+
readonly session: (installation: import("../../browser.js").AvailableInstallation, options: import("../../browser.js").SessionOptions) => Promise<import("../../browser.js").Session>;
|
|
17
|
+
} & import("../../browser.js").RuntimeInventories & {
|
|
18
|
+
readonly brand: import("../../brands.js").RuntimeBrand;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../../src/runtimes/codebuddy/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;CAQ3B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { runtimeBrands } from "../../brands.js";
|
|
2
|
+
import { defineRuntime } from "../../contracts/runtime.js";
|
|
3
|
+
import { onFirstCall } from "../../shared/lazy.js";
|
|
4
|
+
import { codebuddyInstallation } from "./installation.js";
|
|
5
|
+
import { codebuddyRefusedSessionOptions } from "./options.js";
|
|
6
|
+
export const codebuddyRuntime = defineRuntime({
|
|
7
|
+
id: "codebuddy", brand: runtimeBrands.codebuddy,
|
|
8
|
+
refusedSessionOptions: codebuddyRefusedSessionOptions,
|
|
9
|
+
installation: codebuddyInstallation,
|
|
10
|
+
listModels: onFirstCall(async () => { const { codebuddyListModels } = await import("./list-models.js"); return codebuddyListModels; }),
|
|
11
|
+
login: onFirstCall(async () => { const { codebuddyLogin } = await import("./login.js"); return codebuddyLogin; }),
|
|
12
|
+
authStatus: onFirstCall(async () => { const { codebuddyAuthStatus } = await import("./auth-status.js"); return codebuddyAuthStatus; }),
|
|
13
|
+
session: onFirstCall(async () => { const { codebuddySession } = await import("./session.js"); return codebuddySession; }),
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/runtimes/codebuddy/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAC;AAE9D,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC;IAC5C,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,aAAa,CAAC,SAAS;IAC/C,qBAAqB,EAAE,8BAA8B;IACrD,YAAY,EAAE,qBAAqB;IACnC,UAAU,EAAE,WAAW,CAAC,KAAK,IAAI,EAAE,GAAG,MAAM,EAAE,mBAAmB,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC;IACtI,KAAK,EAAE,WAAW,CAAC,KAAK,IAAI,EAAE,GAAG,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC;IACjH,UAAU,EAAE,WAAW,CAAC,KAAK,IAA+B,EAAE,GAAG,MAAM,EAAE,mBAAmB,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC;IACjK,OAAO,EAAE,WAAW,CAAC,KAAK,IAAI,EAAE,GAAG,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC;CAC1H,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installation.d.ts","sources":["../../../src/runtimes/codebuddy/installation.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB,8CAEpB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { environmentHome } from "../../shared/environment-home.js";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { executableInstallation } from "../../shared/installation.js";
|
|
4
|
+
export const codebuddyInstallation = executableInstallation("OAR_CODEBUDDY_BIN", "codebuddy", (env) => [
|
|
5
|
+
path.join(environmentHome(env), ".local", "bin", process.platform === "win32" ? "codebuddy.exe" : "codebuddy"),
|
|
6
|
+
], ["--help"]);
|
|
7
|
+
//# sourceMappingURL=installation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installation.js","sources":["../../../src/runtimes/codebuddy/installation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAEtE,MAAM,CAAC,MAAM,qBAAqB,GAAG,sBAAsB,CAAC,mBAAmB,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC;IACrG,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,WAAW,CAAC;CAC/G,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ModelEntry, ModelLister } from "../../contracts/list-models.js";
|
|
2
|
+
/** CodeBuddy 2.178.1 returns the model menu and current selection on session/new.
|
|
3
|
+
* The thought-level menu belongs to that current model only. */
|
|
4
|
+
export declare function projectCodebuddyModels(response: unknown): ModelEntry[] | undefined;
|
|
5
|
+
export declare const codebuddyListModels: ModelLister;
|
|
6
|
+
//# sourceMappingURL=list-models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-models.d.ts","sources":["../../../src/runtimes/codebuddy/list-models.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAe9E;gEACgE;AAChE,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,OAAO,GAAG,UAAU,EAAE,GAAG,SAAS,CA6BlF;AAuCD,eAAO,MAAM,mBAAmB,EAAE,WAkBjC,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { sessionEnvironment } from "../../shared/environment.js";
|
|
2
|
+
/* oxlint-disable typescript/promise-function-async -- Deadline callbacks deliberately return the SDK's native promises. */
|
|
3
|
+
import { client as createClient, methods, PROTOCOL_VERSION, RequestError, } from "@agentclientprotocol/sdk";
|
|
4
|
+
import { startAcpProcess, withAcpDeadline } from "../../shared/acp/process.js";
|
|
5
|
+
import { acpThoughtLevelOption } from "../../shared/acp/model.js";
|
|
6
|
+
import { asRecord, asRecordList } from "../../shared/json.js";
|
|
7
|
+
import { listingCwd } from "../../shared/listing-cwd.js";
|
|
8
|
+
function text(value) {
|
|
9
|
+
if (typeof value !== "string") {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
const trimmed = value.trim();
|
|
13
|
+
return trimmed.length > 0 ? trimmed : undefined;
|
|
14
|
+
}
|
|
15
|
+
/** CodeBuddy 2.178.1 returns the model menu and current selection on session/new.
|
|
16
|
+
* The thought-level menu belongs to that current model only. */
|
|
17
|
+
export function projectCodebuddyModels(response) {
|
|
18
|
+
const root = asRecord(response);
|
|
19
|
+
const modelOption = asRecordList(root?.configOptions).find((option) => option.id === "model");
|
|
20
|
+
if (modelOption === undefined) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
// A new session's current model: what a session uses with no `model` set.
|
|
24
|
+
const current = text(modelOption.currentValue);
|
|
25
|
+
const thinking = acpThoughtLevelOption(root);
|
|
26
|
+
const effortLevels = asRecordList(thinking?.options)
|
|
27
|
+
.map((option) => text(option.value))
|
|
28
|
+
.filter((value) => value !== undefined && value !== "enabled" && value !== "disabled");
|
|
29
|
+
const defaultEffort = text(thinking?.currentValue);
|
|
30
|
+
const entries = [];
|
|
31
|
+
for (const model of asRecordList(modelOption.options)) {
|
|
32
|
+
const id = text(model.value);
|
|
33
|
+
if (id === undefined) {
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
const displayName = text(model.name);
|
|
37
|
+
entries.push({
|
|
38
|
+
id,
|
|
39
|
+
...(displayName === undefined || displayName === id ? {} : { displayName }),
|
|
40
|
+
...(id === current ? { default: true } : {}),
|
|
41
|
+
...(id === current && effortLevels.length > 0 ? { effortLevels } : {}),
|
|
42
|
+
...(id === current && defaultEffort !== undefined && effortLevels.includes(defaultEffort) ? { defaultEffort } : {}),
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return entries;
|
|
46
|
+
}
|
|
47
|
+
async function readNewSession(command, cwd, timeoutMs, env) {
|
|
48
|
+
const runtime = startAcpProcess(command, ["--acp", "--permission-mode", "bypassPermissions"], createClient({ name: "oar" }), { cwd, env });
|
|
49
|
+
try {
|
|
50
|
+
const initialize = methods.agent.initialize;
|
|
51
|
+
await withAcpDeadline(runtime, initialize, timeoutMs, (requestOptions) => runtime.connection.agent.request(initialize, {
|
|
52
|
+
protocolVersion: PROTOCOL_VERSION,
|
|
53
|
+
clientCapabilities: {
|
|
54
|
+
fs: { readTextFile: false, writeTextFile: false },
|
|
55
|
+
terminal: false,
|
|
56
|
+
},
|
|
57
|
+
clientInfo: { name: "oar", version: "0.0.0" },
|
|
58
|
+
}, requestOptions));
|
|
59
|
+
// No `authenticate` or `session/close`: the server reads its
|
|
60
|
+
// own persisted login, and the process is killed once the list is read.
|
|
61
|
+
const newSession = methods.agent.session.new;
|
|
62
|
+
const response = await withAcpDeadline(runtime, newSession, timeoutMs, (requestOptions) => runtime.connection.agent.request(newSession, { cwd, mcpServers: [] }, requestOptions));
|
|
63
|
+
return asRecord(response) ?? {};
|
|
64
|
+
}
|
|
65
|
+
finally {
|
|
66
|
+
runtime.kill();
|
|
67
|
+
await runtime.exited;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export const codebuddyListModels = async (installation, options = {}) => {
|
|
71
|
+
if (installation.via !== "executable") {
|
|
72
|
+
return { kind: "unsupported", reason: "codebuddy model listing requires the CodeBuddy executable" };
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
const response = await readNewSession(installation.command, listingCwd(options), options.timeoutMs ?? 30_000, sessionEnvironment(options.env));
|
|
76
|
+
const models = projectCodebuddyModels(response);
|
|
77
|
+
if (models === undefined) {
|
|
78
|
+
return { kind: "unsupported", reason: "this CodeBuddy build returns no model config option on session/new" };
|
|
79
|
+
}
|
|
80
|
+
return { kind: "ok", models };
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
if (error instanceof RequestError && (error.code === -32_000 || /auth(?:entication)?|log(?:ged)? ?in/iu.test(error.message))) {
|
|
84
|
+
return { kind: "unauthenticated", detail: "CodeBuddy requires authentication" };
|
|
85
|
+
}
|
|
86
|
+
// oxlint-disable-next-line eslint/preserve-caught-error -- Native errors may contain credentials or account details.
|
|
87
|
+
throw new Error("Failed to list CodeBuddy models");
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=list-models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-models.js","sources":["../../../src/runtimes/codebuddy/list-models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,2HAA2H;AAC3H,OAAO,EACL,MAAM,IAAI,YAAY,EACtB,OAAO,EACP,gBAAgB,EAChB,YAAY,GACb,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAmB,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAGzD,SAAS,IAAI,CAAC,KAAc;IAC1B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SA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/G,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAChC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,YAAY,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,uCAAuC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;YAC7H,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,mCAAmC,EAAE,CAAC;QAClF,CAAC;QACD,qHAAqH;QACrH,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AvailableInstallation } from "../../contracts/installation.js";
|
|
2
|
+
import type { LoginOptions, LoginResult } from "../../contracts/login.js";
|
|
3
|
+
import type { ProviderLoginInteraction } from "../../contracts/provider-auth.js";
|
|
4
|
+
/** Keep the CLI's current account environment, including CODEBUDDY_INTERNET_ENVIRONMENT. */
|
|
5
|
+
export declare function codebuddyLogin(installation: AvailableInstallation, interaction: ProviderLoginInteraction, options?: LoginOptions): Promise<LoginResult>;
|
|
6
|
+
//# sourceMappingURL=login.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login.d.ts","sources":["../../../src/runtimes/codebuddy/login.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAcjF,4FAA4F;AAC5F,wBAAsB,cAAc,CAAC,YAAY,EAAE,qBAAqB,EAAE,WAAW,EAAE,wBAAwB,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAgEjK"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { sessionEnvironment } from "../../shared/environment.js";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { errorMessage, loginBounds, loginExecutable, stoppedResult } from "../../shared/login.js";
|
|
4
|
+
import { asRecord } from "../../shared/json.js";
|
|
5
|
+
import { codebuddyAccountControl } from "./account-control.js";
|
|
6
|
+
import { codebuddyAuthStatus } from "./auth-status.js";
|
|
7
|
+
/** Native auth_failed includes token retrieval errors, not an explicit authorization denial. */
|
|
8
|
+
function authenticationFailure(value, redact) {
|
|
9
|
+
const error = asRecord(value);
|
|
10
|
+
if (error?.type === "cancelled") {
|
|
11
|
+
return { kind: "cancelled" };
|
|
12
|
+
}
|
|
13
|
+
const reason = error?.type === "timeout" ? "timed_out" : "process_failed";
|
|
14
|
+
return { kind: "failed", reason, detail: typeof error?.message === "string" ? redact(error.message) : "CodeBuddy reported that authentication failed" };
|
|
15
|
+
}
|
|
16
|
+
/** Keep the CLI's current account environment, including CODEBUDDY_INTERNET_ENVIRONMENT. */
|
|
17
|
+
export async function codebuddyLogin(installation, interaction, options = {}) {
|
|
18
|
+
const target = loginExecutable(installation, "CodeBuddy", undefined, sessionEnvironment(options.env));
|
|
19
|
+
if (target.kind === "settled") {
|
|
20
|
+
return target.result;
|
|
21
|
+
}
|
|
22
|
+
const aborted = () => interaction.signal?.aborted === true;
|
|
23
|
+
if (aborted()) {
|
|
24
|
+
return { kind: "cancelled" };
|
|
25
|
+
}
|
|
26
|
+
const timeoutMs = options.timeoutMs ?? 5 * 60_000;
|
|
27
|
+
const deadline = Date.now() + timeoutMs;
|
|
28
|
+
const bounds = loginBounds(interaction.signal, timeoutMs);
|
|
29
|
+
const interactionFailed = Promise.withResolvers();
|
|
30
|
+
let client = undefined;
|
|
31
|
+
const flowState = { success: false };
|
|
32
|
+
let settled = false;
|
|
33
|
+
const env = sessionEnvironment(options.env);
|
|
34
|
+
if (options.openBrowser === false) {
|
|
35
|
+
// CodeBuddy's UrlUtils honors BROWSER and does not fall back when it fails.
|
|
36
|
+
env.BROWSER = process.platform === "win32" ? path.join(env.SystemRoot ?? String.raw `C:\Windows`, "System32", "hostname.exe") : "true";
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
client = codebuddyAccountControl(target.installation.command, env, (request) => {
|
|
40
|
+
if (settled) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (request.subtype === "auth_result_callback" && request.success === true) {
|
|
44
|
+
flowState.success = true;
|
|
45
|
+
}
|
|
46
|
+
if (request.subtype === "auth_result_callback" && request.success === false && asRecord(request.error) !== null) {
|
|
47
|
+
flowState.failure = authenticationFailure(request.error, (text) => client?.secrets.line(text) ?? "CodeBuddy authentication failed");
|
|
48
|
+
}
|
|
49
|
+
const auth = asRecord(request.authState);
|
|
50
|
+
if (request.subtype === "auth_url_callback" && typeof auth?.authUrl === "string") {
|
|
51
|
+
try {
|
|
52
|
+
interaction.onEvent({ kind: "auth_url", url: auth.authUrl, instructions: "Open this URL to sign in to CodeBuddy." });
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
settled = true;
|
|
56
|
+
interactionFailed.resolve({ kind: "failed", reason: "interaction_failed", detail: client?.secrets.line(errorMessage(error)) ?? "Could not display the login link" });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
const control = client;
|
|
61
|
+
const flow = async () => {
|
|
62
|
+
await control.request({ subtype: "initialize" });
|
|
63
|
+
if (settled) {
|
|
64
|
+
return { kind: "failed", reason: "interaction_failed" };
|
|
65
|
+
}
|
|
66
|
+
// 2.173.0 lists cli-external-link but its provider inherits a different
|
|
67
|
+
// getAuthenticationType. Leave selection to native support(), as the TUI does.
|
|
68
|
+
const answer = await control.request({ subtype: "authenticate" });
|
|
69
|
+
flowState.success ||= answer.success === true;
|
|
70
|
+
return flowState.success ? { kind: "logged_in" } : flowState.failure ?? authenticationFailure(answer.error, (text) => control.secrets.line(text));
|
|
71
|
+
};
|
|
72
|
+
const stopped = async () => stoppedResult(await bounds.stopped, timeoutMs);
|
|
73
|
+
let result = { kind: "failed", reason: "process_failed" };
|
|
74
|
+
try {
|
|
75
|
+
result = await Promise.race([flow(), stopped(), interactionFailed.promise]);
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
result = flowState.failure ?? { kind: "failed", reason: "process_failed", detail: control.secrets.line(errorMessage(error)) };
|
|
79
|
+
}
|
|
80
|
+
settled = true;
|
|
81
|
+
control.process.stop();
|
|
82
|
+
await control.process.exited;
|
|
83
|
+
if (!flowState.success) {
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
if (aborted()) {
|
|
87
|
+
return { kind: "logged_in" };
|
|
88
|
+
}
|
|
89
|
+
// Confirmation shares the login deadline and cancellation signal. A
|
|
90
|
+
// native success remains success unless a fresh read contradicts it.
|
|
91
|
+
const remaining = deadline - Date.now();
|
|
92
|
+
if (remaining <= 0) {
|
|
93
|
+
return { kind: "logged_in" };
|
|
94
|
+
}
|
|
95
|
+
const status = await codebuddyAuthStatus(installation, { env: options.env, timeoutMs: Math.min(30_000, remaining) }, interaction.signal);
|
|
96
|
+
return status.kind === "logged_out"
|
|
97
|
+
? { kind: "failed", reason: "not_logged_in", detail: "CodeBuddy reported success but its account query reads logged out" }
|
|
98
|
+
: { kind: "logged_in" };
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
return { kind: "failed", reason: "process_failed", detail: "CodeBuddy login could not start" };
|
|
102
|
+
}
|
|
103
|
+
finally {
|
|
104
|
+
settled = true;
|
|
105
|
+
bounds.dispose();
|
|
106
|
+
client?.process.stop();
|
|
107
|
+
await client?.process.exited;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=login.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login.js","sources":["../../../src/runtimes/codebuddy/login.ts"],"names":[],"mappings":"AAAA,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../../contracts/session.js";
|
|
3
|
+
export declare const codebuddyRefusedSessionOptions: RefusedSessionOptions;
|
|
4
|
+
export declare function checkCodebuddyLaunchArgs(args: SessionOptions["launchArgs"]): void;
|
|
5
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sources":["../../../src/runtimes/codebuddy/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGjE,eAAO,MAAM,8BAA8B,EAAE,qBAQ5C,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,cAAc,CAAC,YAAY,CAAC,GAAG,IAAI,CAOjF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UnsupportedOptionError } from "../../contracts/errors.js";
|
|
2
|
+
export const codebuddyRefusedSessionOptions = {
|
|
3
|
+
goals: "CodeBuddy ACP has no verified structured goal controls",
|
|
4
|
+
appendSystemPrompt: "CodeBuddy ACP prompt append has no verified private input channel",
|
|
5
|
+
userConfiguration: "CodeBuddy has no verified way to exclude user configuration while preserving native credentials and history",
|
|
6
|
+
outputSchema: "CodeBuddy ACP has no verified final-output schema channel",
|
|
7
|
+
name: "CodeBuddy has no verified session name option",
|
|
8
|
+
serviceTier: "CodeBuddy ACP has no verified service-tier setting and readback",
|
|
9
|
+
additionalDirectories: "CodeBuddy ACP does not advertise additionalDirectories",
|
|
10
|
+
};
|
|
11
|
+
export function checkCodebuddyLaunchArgs(args) {
|
|
12
|
+
const managed = new Set(["--acp", "--acp-transport", "--serve", "--print", "-p", "--input-format", "--output-format",
|
|
13
|
+
"--resume", "-r", "--continue", "-c", "--session-id", "--fork-session", "--permission-mode", "--permission-mode-before-plan", "--system-prompt", "--system-prompt-file", "--"]);
|
|
14
|
+
for (const arg of args ?? []) {
|
|
15
|
+
const flag = arg.split("=", 1)[0] ?? arg;
|
|
16
|
+
if (managed.has(flag)) {
|
|
17
|
+
throw new UnsupportedOptionError("launchArgs", `CodeBuddy launchArgs cannot override ${flag}; OAR owns the protocol and session identity`);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sources":["../../../src/runtimes/codebuddy/options.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,MAAM,CAAC,MAAM,8BAA8B,GAA0B;IACnE,KAAK,EAAE,wDAAwD;IAC/D,kBAAkB,EAAE,mEAAmE;IACvF,iBAAiB,EAAE,6GAA6G;IAChI,YAAY,EAAE,2DAA2D;IACzE,IAAI,EAAE,+CAA+C;IACrD,WAAW,EAAE,iEAAiE;IAC9E,qBAAqB,EAAE,wDAAwD;CAChF,CAAC;AAEF,MAAM,UAAU,wBAAwB,CAAC,IAAkC;IACzE,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,gBAAgB,EAAE,iBAAiB;QAClH,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,+BAA+B,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,IAAI,CAAC,CAAC,CAAC;IAClL,KAAK,MAAM,GAAG,IAAI,IAAI,IAAI,EAAE,EAAE,CAAC;QAC7B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC;QACzC,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAAC,MAAM,IAAI,sBAAsB,CAAC,YAAY,EAAE,wCAAwC,IAAI,8CAA8C,CAAC,CAAC;QAAC,CAAC;IACxK,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-file.d.ts","sources":["../../../src/runtimes/codebuddy/prompt-file.ts"],"names":[],"mappings":"AAIA,8EAA8E;AAC9E,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,MAAM,IAAI,IAAI,CAAA;CAAE,CAAC,CAQrH"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { privateTempDir } from "../../shared/private-temp.js";
|
|
4
|
+
/** Keep the prompt out of argv; retain its private file until native exit. */
|
|
5
|
+
export async function codebuddyPromptFile(text) {
|
|
6
|
+
const directory = await privateTempDir("oar-codebuddy-prompt-");
|
|
7
|
+
try {
|
|
8
|
+
const file = path.join(directory.path, "system.txt");
|
|
9
|
+
await writeFile(file, text, { flag: "wx", mode: 0o600 });
|
|
10
|
+
if (await readFile(file, "utf8") !== text) {
|
|
11
|
+
throw new Error("CodeBuddy system prompt file did not retain the supplied text");
|
|
12
|
+
}
|
|
13
|
+
return { args: ["--system-prompt-file", file], remove: () => { directory.remove(); } };
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
directory.remove();
|
|
17
|
+
throw error;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=prompt-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-file.js","sources":["../../../src/runtimes/codebuddy/prompt-file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,8EAA8E;AAC9E,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,IAAY;IACpD,MAAM,SAAS,GAAG,MAAM,cAAc,CAAC,uBAAuB,CAAC,CAAC;IAChE,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QACrD,MAAM,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QACzD,IAAI,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;QAAC,CAAC;QAChI,OAAO,EAAE,IAAI,EAAE,CAAC,sBAAsB,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACzF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAAC,SAAS,CAAC,MAAM,EAAE,CAAC;QAAC,MAAM,KAAK,CAAC;IAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StartSession } from "../../contracts/session.js";
|
|
2
|
+
import { type AcpSessionProfile } from "../../shared/acp/session.js";
|
|
3
|
+
export declare const codebuddyAcpProfile: AcpSessionProfile;
|
|
4
|
+
export declare const codebuddySession: StartSession;
|
|
5
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sources":["../../../src/runtimes/codebuddy/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAM/E,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAOjF,eAAO,MAAM,mBAAmB,EAAE,iBAejC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,YAY9B,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { UnsupportedOptionError } from "../../contracts/errors.js";
|
|
2
|
+
import { codebuddyPromptFile } from "./prompt-file.js";
|
|
3
|
+
import { codebuddyPromptOutcome } from "./failure.js";
|
|
4
|
+
import { codebuddyNotifications } from "./extensions.js";
|
|
5
|
+
import { redactCodebuddyNotification } from "../../shared/credential-redaction.js";
|
|
6
|
+
import { acpSession } from "../../shared/acp/session.js";
|
|
7
|
+
import { refuseSessionOptions } from "../../shared/session-options.js";
|
|
8
|
+
import { checkCodebuddyLaunchArgs, codebuddyRefusedSessionOptions } from "./options.js";
|
|
9
|
+
const args = (options) => ["--acp", "--permission-mode", "bypassPermissions",
|
|
10
|
+
...((options.disallowedTools?.length ?? 0) === 0 ? [] : ["--disallowedTools", options.disallowedTools?.join(",") ?? ""])];
|
|
11
|
+
export const codebuddyAcpProfile = {
|
|
12
|
+
args,
|
|
13
|
+
capabilities: { queue: { durable: false }, attribution: "opaque" },
|
|
14
|
+
requestTimeoutMs: 30_000,
|
|
15
|
+
modelViaConfigOption: true,
|
|
16
|
+
promptOutcome: codebuddyPromptOutcome,
|
|
17
|
+
extensionNotifications: codebuddyNotifications,
|
|
18
|
+
redactExtensionNotification: redactCodebuddyNotification,
|
|
19
|
+
validateOptions: (options) => {
|
|
20
|
+
refuseSessionOptions(codebuddyRefusedSessionOptions, options);
|
|
21
|
+
checkCodebuddyLaunchArgs(options.launchArgs);
|
|
22
|
+
if (options.systemPrompt !== undefined && options.systemPrompt.trim() === "") {
|
|
23
|
+
throw new UnsupportedOptionError("systemPrompt", "CodeBuddy treats an empty replacement as omitted");
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
export const codebuddySession = async (installation, options) => {
|
|
28
|
+
codebuddyAcpProfile.validateOptions?.(options);
|
|
29
|
+
const file = options.systemPrompt === undefined ? undefined : await codebuddyPromptFile(options.systemPrompt);
|
|
30
|
+
try {
|
|
31
|
+
const session = await acpSession({ ...codebuddyAcpProfile, args: (input) => [...args(input), ...file?.args ?? []] })(installation, options);
|
|
32
|
+
const unsubscribe = session.rawEvents((record) => {
|
|
33
|
+
if (record.kind === "response" && record.body.kind === "exited") {
|
|
34
|
+
file?.remove();
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
return { ...session, dispose: async () => {
|
|
38
|
+
try {
|
|
39
|
+
await session.dispose();
|
|
40
|
+
}
|
|
41
|
+
finally {
|
|
42
|
+
unsubscribe();
|
|
43
|
+
file?.remove();
|
|
44
|
+
}
|
|
45
|
+
} };
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
file?.remove();
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sources":["../../../src/runtimes/codebuddy/session.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,UAAU,EAA0B,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAC;AAExF,MAAM,IAAI,GAAG,CAAC,OAAuB,EAAqB,EAAE,CAAC,CAAC,OAAO,EAAE,mBAAmB,EAAE,mBAAmB;IAC3G,GAAG,CAA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AAE,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QAC5I,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE;YAC/C,IAAI,MAAM,CAAC,IAAI,KAAK,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAAC,IAAI,EAAE,MAAM,EAAE,CAAC;YAAC,CAAC;QACtF,CAAC,CAAC,CAAC;QACH,OAAO,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,EAAE;gBACvC,IAAI,CAAC;oBAAC,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;gBAAC,CAAC;wBAAS,CAAC;oBAAC,WAAW,EAAE,CAAC;oBAAC,IAAI,EAAE,MAAM,EAAE,CAAC;gBAAC,CAAC;YAC7E,CAAC,EAAE,CAAC;IACN,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAC;QAAC,MAAM,KAAK,CAAC;IAAC,CAAC;AAClD,CAAC,CAAC"}
|
|
@@ -16,7 +16,7 @@ export async function qoderDaemonSession(child, sessionId, workerArgs, cwd, env)
|
|
|
16
16
|
if (frame === null || failure.error !== undefined) {
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
-
if (frame.session_id !== undefined && frame.session_id !== sessionId) {
|
|
19
|
+
if (frame.session_id !== undefined && frame.session_id !== null && frame.session_id !== sessionId) {
|
|
20
20
|
failure.error = new Error("Qoder daemon received a frame belonging to another session; OAR terminated the owned process");
|
|
21
21
|
controls.end();
|
|
22
22
|
child.kill();
|
|
@@ -46,7 +46,7 @@ export async function qoderDaemonSession(child, sessionId, workerArgs, cwd, env)
|
|
|
46
46
|
continue;
|
|
47
47
|
}
|
|
48
48
|
const frame = asRecord(parseJson(line));
|
|
49
|
-
if (frame === null || (frame.session_id !== undefined && frame.session_id !== sessionId)) {
|
|
49
|
+
if (frame === null || (frame.session_id !== undefined && frame.session_id !== null && frame.session_id !== sessionId)) {
|
|
50
50
|
throw new Error("Qoder daemon input does not belong to this session");
|
|
51
51
|
}
|
|
52
52
|
const request = asRecord(frame.request);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daemon.js","sources":["../../../src/runtimes/qoder/daemon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAEtE,6EAA6E;AAC7E,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,KAAkB,EAAE,SAAiB,EAAE,UAA6B,EAAE,GAAW,EAAE,GAAsB;IAChJ,MAAM,QAAQ,GAAG,YAAY,CAAC,KAAK,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,wBAAwB,CAAC,CAAC;IACzE,MAAM,QAAQ,GAA+B,EAAE,CAAC;IAChD,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,MAAM,OAAO,GAAsB,EAAE,CAAC;IACtC,MAAM,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;IACjC,MAAM,CAAC,MAAM,EAAE,CAAC;IAChB,IAAI,KAAK,GAAG,KAAK,CAAC;IAClB,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QACpB,MAAM,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;QACxC,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,K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AAM,KAAK,CAAC,MAAM,CAAC;QAAC,MAAM,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC;IAAC,CAAC;AACrG,CAAC"}
|
|
@@ -20,4 +20,8 @@ export declare function redactionCovers(type: string): boolean;
|
|
|
20
20
|
* edit free-form text, other field names, other notifications or the received object.
|
|
21
21
|
*/
|
|
22
22
|
export declare function redactGrokNotification(method: string, params: JsonRecord): JsonRecord;
|
|
23
|
+
/** Browser authorization URLs belong to the private login interaction, not stored session records. */
|
|
24
|
+
export declare function redactCodebuddyNotification(method: string, params: JsonRecord): JsonRecord;
|
|
25
|
+
/** Shared dispatch for both live frames and a host's previously stored records. */
|
|
26
|
+
export declare function redactCredentialNotification(method: string, params: JsonRecord): JsonRecord;
|
|
23
27
|
//# sourceMappingURL=credential-redaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-redaction.d.ts","sources":["../../src/shared/credential-redaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAkCtD;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAA;CAItG,CAAC;AAEF,+DAA+D;AAC/D,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,UAAU,CAErF"}
|
|
1
|
+
{"version":3,"file":"credential-redaction.d.ts","sources":["../../src/shared/credential-redaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAkCtD;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAA;CAItG,CAAC;AAEF,+DAA+D;AAC/D,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,UAAU,CAErF;AAED,sGAAsG;AACtG,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,UAAU,CAG1F;AAED,mFAAmF;AACnF,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,UAAU,CAE3F"}
|
|
@@ -37,9 +37,9 @@ function redactMcpTree(value) {
|
|
|
37
37
|
* can pre-filter its storage by them.
|
|
38
38
|
*/
|
|
39
39
|
export const REDACTION_RULES = {
|
|
40
|
-
version:
|
|
41
|
-
//
|
|
42
|
-
frameTypePrefixes: ["_x.ai/mcp/", "_x.ai/mcp_initialized"],
|
|
40
|
+
version: 2,
|
|
41
|
+
// Grok MCP credentials and CodeBuddy browser authorization links.
|
|
42
|
+
frameTypePrefixes: ["_x.ai/mcp/", "_x.ai/mcp_initialized", "_codebuddy.ai/authUrl"],
|
|
43
43
|
};
|
|
44
44
|
/** Whether a frame `type` is one the redaction rules cover. */
|
|
45
45
|
export function redactionCovers(type) {
|
|
@@ -52,6 +52,15 @@ export function redactionCovers(type) {
|
|
|
52
52
|
* edit free-form text, other field names, other notifications or the received object.
|
|
53
53
|
*/
|
|
54
54
|
export function redactGrokNotification(method, params) {
|
|
55
|
-
return
|
|
55
|
+
return method.startsWith("_x.ai/mcp/") || method.startsWith("_x.ai/mcp_initialized") ? redactMcpFields(params) : params;
|
|
56
|
+
}
|
|
57
|
+
/** Browser authorization URLs belong to the private login interaction, not stored session records. */
|
|
58
|
+
export function redactCodebuddyNotification(method, params) {
|
|
59
|
+
return method === "_codebuddy.ai/authUrl" && typeof params.authUrl === "string"
|
|
60
|
+
? { ...params, authUrl: "[redacted]" } : params;
|
|
61
|
+
}
|
|
62
|
+
/** Shared dispatch for both live frames and a host's previously stored records. */
|
|
63
|
+
export function redactCredentialNotification(method, params) {
|
|
64
|
+
return redactCodebuddyNotification(method, redactGrokNotification(method, params));
|
|
56
65
|
}
|
|
57
66
|
//# sourceMappingURL=credential-redaction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-redaction.js","sources":["../../src/shared/credential-redaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAmB,MAAM,WAAW,CAAC;AAEtD,gFAAgF;AAChF,SAAS,iBAAiB,CAAC,KAAc;IACvC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,KAAc,EAAE,EAAE;YAClC,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC/B,OAAO,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,eAAe,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACxI,CAAC,CAAC,CAAC;IACL,CAAC;IACD,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC/B,OAAO,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;AAC7G,CAAC;AAED,SAAS,eAAe,CAAC,MAAkB;IACzC,OAAO,MAAM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AQ;QAC7E,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;AACpD,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,4BAA4B,CAAC,MAAc,EAAE,MAAkB;IAC7E,OAAO,2BAA2B,CAAC,MAAM,EAAE,sBAAsB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AACrF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botiverse/oar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.77.0",
|
|
4
4
|
"description": "A programming interface for all agent harnesses: provider-independent contracts for controlling and observing agent runtimes",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|