@codeam/shared 2.61.48 → 2.61.50
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/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +23 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -140,7 +140,7 @@ declare function getContextWindow(model: string | null): number;
|
|
|
140
140
|
*/
|
|
141
141
|
declare function tryGetContextWindow(model: string | null): number | undefined;
|
|
142
142
|
|
|
143
|
-
type AgentId = 'claude' | 'codex' | 'copilot' | 'coderabbit' | 'cursor' | 'aider' | 'gemini' | 'kimi';
|
|
143
|
+
type AgentId = 'claude' | 'codex' | 'copilot' | 'coderabbit' | 'cursor' | 'aider' | 'gemini' | 'kimi' | 'opencode';
|
|
144
144
|
type AgentAuthKind = 'oauth_token' | 'api_key' | 'setup_token';
|
|
145
145
|
/**
|
|
146
146
|
* The agent kinds Headroom (the token-compression proxy) can actually
|
|
@@ -273,7 +273,7 @@ declare const HOUSE_AGENT_SUBTITLE = "Included \u2014 no setup";
|
|
|
273
273
|
* endpoints and the mobile/web surfaces speak. The internal `AgentId`
|
|
274
274
|
* (`'claude' | 'codex' | …`) is what the runtimes / provisioning key on.
|
|
275
275
|
*/
|
|
276
|
-
type LinkedAgentId = 'claude_code' | 'codex' | 'cursor' | 'aider' | 'coderabbit' | 'gemini' | 'kimi' | 'omniroute' | typeof HOUSE_AGENT_ID;
|
|
276
|
+
type LinkedAgentId = 'claude_code' | 'codex' | 'cursor' | 'aider' | 'coderabbit' | 'gemini' | 'kimi' | 'omniroute' | 'opencode' | typeof HOUSE_AGENT_ID;
|
|
277
277
|
declare const LINKED_AGENT_IDS: readonly LinkedAgentId[];
|
|
278
278
|
declare function isLinkedAgentId(value: string): value is LinkedAgentId;
|
|
279
279
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -140,7 +140,7 @@ declare function getContextWindow(model: string | null): number;
|
|
|
140
140
|
*/
|
|
141
141
|
declare function tryGetContextWindow(model: string | null): number | undefined;
|
|
142
142
|
|
|
143
|
-
type AgentId = 'claude' | 'codex' | 'copilot' | 'coderabbit' | 'cursor' | 'aider' | 'gemini' | 'kimi';
|
|
143
|
+
type AgentId = 'claude' | 'codex' | 'copilot' | 'coderabbit' | 'cursor' | 'aider' | 'gemini' | 'kimi' | 'opencode';
|
|
144
144
|
type AgentAuthKind = 'oauth_token' | 'api_key' | 'setup_token';
|
|
145
145
|
/**
|
|
146
146
|
* The agent kinds Headroom (the token-compression proxy) can actually
|
|
@@ -273,7 +273,7 @@ declare const HOUSE_AGENT_SUBTITLE = "Included \u2014 no setup";
|
|
|
273
273
|
* endpoints and the mobile/web surfaces speak. The internal `AgentId`
|
|
274
274
|
* (`'claude' | 'codex' | …`) is what the runtimes / provisioning key on.
|
|
275
275
|
*/
|
|
276
|
-
type LinkedAgentId = 'claude_code' | 'codex' | 'cursor' | 'aider' | 'coderabbit' | 'gemini' | 'kimi' | 'omniroute' | typeof HOUSE_AGENT_ID;
|
|
276
|
+
type LinkedAgentId = 'claude_code' | 'codex' | 'cursor' | 'aider' | 'coderabbit' | 'gemini' | 'kimi' | 'omniroute' | 'opencode' | typeof HOUSE_AGENT_ID;
|
|
277
277
|
declare const LINKED_AGENT_IDS: readonly LinkedAgentId[];
|
|
278
278
|
declare function isLinkedAgentId(value: string): value is LinkedAgentId;
|
|
279
279
|
/**
|
package/dist/index.js
CHANGED
|
@@ -431,6 +431,23 @@ var AGENT_REGISTRY = {
|
|
|
431
431
|
headroomWrappable: false,
|
|
432
432
|
// Native ACP server: `kimi acp` (stdio JSON-RPC, answers `initialize`).
|
|
433
433
|
acp: true
|
|
434
|
+
},
|
|
435
|
+
opencode: {
|
|
436
|
+
id: "opencode",
|
|
437
|
+
displayName: "opencode",
|
|
438
|
+
binaryName: "opencode",
|
|
439
|
+
enabled: true,
|
|
440
|
+
// opencode auth = `opencode auth login` (multi-provider; API keys AND
|
|
441
|
+
// provider OAuth), which writes a login-state file at
|
|
442
|
+
// ~/.local/share/opencode/auth.json. The CLI captures that blob (like
|
|
443
|
+
// claude/codex capture their local login), so the vaulted credential is
|
|
444
|
+
// the auth.json — an `oauth_token`-kind login blob, not a bare api_key.
|
|
445
|
+
supportedAuthKinds: ["oauth_token"],
|
|
446
|
+
preferredAuthKind: "oauth_token",
|
|
447
|
+
// Not listed by `headroom init --global` (claude/codex/copilot only) — native.
|
|
448
|
+
headroomWrappable: false,
|
|
449
|
+
// Native ACP server: `opencode acp` (stdio JSON-RPC).
|
|
450
|
+
acp: true
|
|
434
451
|
}
|
|
435
452
|
};
|
|
436
453
|
function getEnabledAgents() {
|
|
@@ -460,6 +477,7 @@ var LINKED_AGENT_IDS = [
|
|
|
460
477
|
"gemini",
|
|
461
478
|
"kimi",
|
|
462
479
|
"omniroute",
|
|
480
|
+
"opencode",
|
|
463
481
|
HOUSE_AGENT_ID
|
|
464
482
|
];
|
|
465
483
|
function isLinkedAgentId(value) {
|
|
@@ -478,6 +496,9 @@ var PUBLIC_TO_INTERNAL = {
|
|
|
478
496
|
coderabbit: "coderabbit",
|
|
479
497
|
gemini: "gemini",
|
|
480
498
|
kimi: "kimi",
|
|
499
|
+
// opencode is a real, distinct agent (its own binary + ACP server) — it does
|
|
500
|
+
// NOT map onto another runtime. Public id === internal id.
|
|
501
|
+
opencode: "opencode",
|
|
481
502
|
// OmniRoute runs Claude Code under the hood, pointed at the user's OmniRoute
|
|
482
503
|
// gateway (their vaulted base URL + token) instead of the house MiniMax
|
|
483
504
|
// proxy. Same internal runtime as the house agent — `claude` — differing only
|
|
@@ -494,7 +515,8 @@ var INTERNAL_TO_PUBLIC = {
|
|
|
494
515
|
aider: "aider",
|
|
495
516
|
coderabbit: "coderabbit",
|
|
496
517
|
gemini: "gemini",
|
|
497
|
-
kimi: "kimi"
|
|
518
|
+
kimi: "kimi",
|
|
519
|
+
opencode: "opencode"
|
|
498
520
|
};
|
|
499
521
|
function isPublicToInternalKey(v) {
|
|
500
522
|
return Object.prototype.hasOwnProperty.call(PUBLIC_TO_INTERNAL, v);
|