@byok-sdk/client 0.1.0 → 0.2.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 CHANGED
@@ -7,5 +7,14 @@ and exposes authenticated local diagnostics/control commands.
7
7
  The package installs `byok-agent` and `byok-approval-mcp` binaries. Provider
8
8
  credentials are not read by the dispatch plane; `@byok-sdk/keys` is separate.
9
9
 
10
- MIT licensed. Node.js 20 or newer; SQLite-backed journaling requires a runtime
11
- with `node:sqlite` support.
10
+ Pi is a required exact npm dependency and runs as an external Node subprocess;
11
+ authenticate it with your own provider credentials. Claude Code and Codex
12
+ remain user-installed runtimes. The SDK never reads or packages provider
13
+ credentials. Hosts that only need runtime detection/composition can import the
14
+ transport-free adapter surface:
15
+
16
+ ```ts
17
+ import { PiAdapter, ClaudeAdapter, CodexAdapter } from '@byok-sdk/client/adapters';
18
+ ```
19
+
20
+ MIT licensed. Node.js 22.19.0 or newer.
@@ -6,7 +6,7 @@ export interface ResolvedBin {
6
6
  * Resolve the `claude` (Claude Code) CLI executable.
7
7
  *
8
8
  * Unlike pi (`../pi/resolve-bin.ts`), this package does NOT bundle a
9
- * matched `claude` build as an optionalDependency. Claude Code is the end
9
+ * matched `claude` build as a dependency. Claude Code is the end
10
10
  * user's own globally-installed, individually-authenticated CLI (`claude
11
11
  * auth login`, tied to their Anthropic/claude.ai account) — there is
12
12
  * nothing useful to vendor: a bundled copy could never carry the user's own
@@ -22,6 +22,6 @@ export interface ResolvedBin {
22
22
  * `fake-claude.mjs` fixture ahead of a real claude install, exactly as pi's
23
23
  * own override does), otherwise this falls back to the literal command name
24
24
  * `claude`, resolved via the child process's own PATH lookup — there is no
25
- * optionalDependency tier in between.
25
+ * package-resolution tier in between.
26
26
  */
27
27
  export declare function resolveClaudeBin(): ResolvedBin;
@@ -66,9 +66,10 @@ export declare class CodexAdapter implements RuntimeAdapter {
66
66
  * Two independently-verified channel gotchas apply here, the "pi lesson"
67
67
  * yet again:
68
68
  * - `codex login status`'s human-readable "Logged in using ChatGPT"
69
- * message prints on STDERR, not stdout (the opposite-channel
70
- * counterpart of pi's own `--version`-goes-to-stderr surprise) both
71
- * streams are checked here for exactly that reason.
69
+ * message prints on STDERR, not stdout both streams are checked
70
+ * here for exactly that reason. pi's `--version` is the same class of
71
+ * hazard from the other direction: its channel has moved between pi
72
+ * releases (see ../pi/pi-adapter.ts), so neither stream is assumed.
72
73
  * - The NOT-logged-in message/exit-code shape was deliberately never
73
74
  * empirically tested: this machine has a real, live ChatGPT login, and
74
75
  * running `codex logout` to observe the negative case would have
@@ -5,15 +5,14 @@ export interface ResolvedBin {
5
5
  /**
6
6
  * Resolve the codex CLI executable.
7
7
  *
8
- * Unlike pi (bundled as an npm optionalDependency see
9
- * `../pi/resolve-bin.ts`), the real OpenAI Codex CLI (empirically `codex-cli
8
+ * Like pi and Claude Code, the real OpenAI Codex CLI (empirically `codex-cli
10
9
  * 0.144.5` on the machine this adapter was built/verified against, installed
11
10
  * at a plain PATH location — not inside this repo's `node_modules`) is not
12
11
  * published as an npm package this SDK could sensibly depend on: it's a
13
12
  * standalone global install (native installer / `npm i -g @openai/codex` /
14
13
  * homebrew, depending on platform and version). There is no package-relative
15
- * resolution to attempt, so this is simpler than pi's version: an explicit
16
- * override for tests, else a bare PATH lookup.
14
+ * resolution to attempt: use an explicit override for tests, else a bare
15
+ * PATH lookup.
17
16
  *
18
17
  * `BYOK_CODEX_BIN` overrides PATH lookup — substituting the fake-codex test
19
18
  * fixture, exactly like `BYOK_PI_BIN` does for pi. The `byok-agent` CLI bin
@@ -0,0 +1,9 @@
1
+ export type { RuntimeAdapter, RuntimeCapabilities, RuntimeDetectResult, } from '../types';
2
+ export type { RuntimeEnvironmentRequirements } from '../daemon/environment';
3
+ export { PiAdapter } from './pi/pi-adapter';
4
+ export type { PiAdapterOptions } from './pi/pi-adapter';
5
+ export { PI_PACKAGE_NAME } from './pi/resolve-bin';
6
+ export { ClaudeAdapter } from './claude/claude-adapter';
7
+ export type { ClaudeAdapterOptions } from './claude/claude-adapter';
8
+ export { CodexAdapter } from './codex/codex-adapter';
9
+ export type { CodexAdapterOptions } from './codex/codex-adapter';