@byokit/openclaw 0.18.0 → 0.18.3
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/CHANGELOG.md +13 -0
- package/dist/accounts.d.ts +1 -0
- package/dist/accounts.js +22 -5
- package/dist/bridge.js +3 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.18.3 (2026-10-19)
|
|
6
|
+
|
|
7
|
+
- A signed-in Claude Code login is an account in the kit's account list, and its Claude CLI route's models are listed under it.
|
|
8
|
+
|
|
9
|
+
## 0.18.2 (2026-10-19)
|
|
10
|
+
|
|
11
|
+
- A signed-in ChatGPT login lists the Codex CLI route's models in the account model list, marked available.
|
|
12
|
+
|
|
13
|
+
## 0.18.1 (2026-10-18)
|
|
14
|
+
|
|
15
|
+
- Dependency update: pins @byokit/accounts 0.28.1.
|
|
16
|
+
- FIX: (from @byokit/accounts 0.28.1) Installed Codex readiness retries a transient account check once and distinguishes timeouts, startup, pipe, exit, protocol and unreadable-reply failures from a confirmed signed-out account, with safe typed probe metadata and no provider messages or stderr.
|
|
17
|
+
|
|
5
18
|
## 0.18.0 (2026-10-18)
|
|
6
19
|
|
|
7
20
|
- Reattach a paired device to a live-kit run by its existing idempotency key: sequenced replay then live events, a bounded journal with typed truncation, and grant-member isolation. Device disconnect does not interrupt the run; engine-restart reconstruction is not included.
|
package/dist/accounts.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { createLocks } from './locks.ts';
|
|
|
2
2
|
import { type RouteView } from './routes.ts';
|
|
3
3
|
import type { Account, AccountId, AccountPick, Defaults, GatewayTransport, Member, ModelInfo, MoveResult, Room, RunSelection, SignInOptions, SignInView } from './types.ts';
|
|
4
4
|
export declare const modelsOf: (provider: string, answer: unknown) => ModelInfo[];
|
|
5
|
+
export declare const modelsOfAccount: (row: Pick<Account, 'provider' | 'state'>, answer: unknown) => ModelInfo[];
|
|
5
6
|
type IndexEntry = {
|
|
6
7
|
agent: string;
|
|
7
8
|
name: string;
|
package/dist/accounts.js
CHANGED
|
@@ -16,7 +16,7 @@ import { KEY_PREFIX, MEMBER_ID, NEW_MEMBER_ID, keyAgentId, untilListed, untilUnl
|
|
|
16
16
|
import { routes, routeFor } from './routes.js';
|
|
17
17
|
import { words } from './words.js';
|
|
18
18
|
const record = (v) => !!v && typeof v === 'object' && !Array.isArray(v);
|
|
19
|
-
// `models.list { agentId, view: '
|
|
19
|
+
// `models.list { agentId, view: 'all' }` rows of the account's provider, mapped to `provider/model`. The pin
|
|
20
20
|
// reports no per-plan availability, so `why: 'plan'` only comes from a run ending `plan`, never from here.
|
|
21
21
|
export const modelsOf = (provider, answer) => {
|
|
22
22
|
const rows = record(answer) && Array.isArray(answer.models) ? answer.models : [];
|
|
@@ -48,6 +48,16 @@ export const modelsOf = (provider, answer) => {
|
|
|
48
48
|
}
|
|
49
49
|
return out;
|
|
50
50
|
};
|
|
51
|
+
// The account's models: its provider's rows, plus the Codex CLI route's rows when the account is ready. The pin reports
|
|
52
|
+
// those as missing-auth (no auth reaches the Codex route from the ChatGPT login), so the kit, which holds the login, is the
|
|
53
|
+
// signal for them.
|
|
54
|
+
export const modelsOfAccount = (row, answer) => {
|
|
55
|
+
const own = modelsOf(row.provider, answer);
|
|
56
|
+
if (row.provider !== 'openai' || row.state !== 'ready')
|
|
57
|
+
return own;
|
|
58
|
+
const codex = modelsOf('openai-codex', answer).map(({ why: _why, ...m }) => ({ ...m, available: true }));
|
|
59
|
+
return [...own, ...codex];
|
|
60
|
+
};
|
|
51
61
|
const ACCOUNT_AGENT = /^[a-z][a-z0-9-]{0,31}--[0-9a-f]{6}$/;
|
|
52
62
|
const usable = (status) => status === 'ok' || status === 'expiring' || status === 'static';
|
|
53
63
|
const IDENTITY = 'IDENTITY.md';
|
|
@@ -512,7 +522,14 @@ export function createAccounts(ctx) {
|
|
|
512
522
|
}
|
|
513
523
|
return { rows, dirty };
|
|
514
524
|
};
|
|
515
|
-
|
|
525
|
+
// A detected Claude Code login has no profile in the kit: it stays in Claude Code. The engine's detection says whether
|
|
526
|
+
// it is there, and a detected one is the member's signed-in claude-cli profile for this read.
|
|
527
|
+
const claudeDetected = (agentId) => ctx.request('openclaw.setup.detect', { agentId }, { timeoutMs: 20_000 })
|
|
528
|
+
.then((r) => r.candidates?.some((c) => c.kind === 'claude-cli' && c.credentials === true) === true, () => false);
|
|
529
|
+
const gather = async (agentId) => {
|
|
530
|
+
const [roster, profiles, claude] = await Promise.all([rosterOf(), profilesOf(agentId), claudeDetected(agentId)]);
|
|
531
|
+
return [roster, claude && !profiles.some((p) => p.provider === 'claude-cli') ? [...profiles, { provider: 'claude-cli', status: 'ok' }] : profiles];
|
|
532
|
+
};
|
|
516
533
|
const buildRows = async (member, agentId) => {
|
|
517
534
|
const file = read(member);
|
|
518
535
|
const [roster, profiles] = await gather(agentId);
|
|
@@ -638,7 +655,7 @@ export function createAccounts(ctx) {
|
|
|
638
655
|
return readModels(row, entry);
|
|
639
656
|
}
|
|
640
657
|
// The shared hold covers the read, so no kit read of the agent is in flight while it is removed.
|
|
641
|
-
const readModels = (row, entry) => ctx.locks.shared(entry.agent, async () =>
|
|
658
|
+
const readModels = (row, entry) => ctx.locks.shared(entry.agent, async () => modelsOfAccount(row, await ctx.request('models.list', { agentId: entry.agent, view: 'all' })));
|
|
642
659
|
async function room(member, id, demand) {
|
|
643
660
|
check(member);
|
|
644
661
|
await ctx.ensure(member);
|
|
@@ -812,8 +829,8 @@ export function createAccounts(ctx) {
|
|
|
812
829
|
return failed('start_failed', words('move.taken', { name: row.name }));
|
|
813
830
|
// The session's model when the target lists it, else the target's first available; the read takes no shared
|
|
814
831
|
// hold (this move holds the target exclusively). With no answer the fork keeps the parent's own selection.
|
|
815
|
-
const models = await ctx.request('models.list', { agentId: entry.agent, view: '
|
|
816
|
-
.then((answer) =>
|
|
832
|
+
const models = await ctx.request('models.list', { agentId: entry.agent, view: 'all' })
|
|
833
|
+
.then((answer) => modelsOfAccount(row, answer), () => []);
|
|
817
834
|
const current = typeof session.model !== 'string' ? undefined
|
|
818
835
|
: (typeof session.modelProvider === 'string' && !session.model.includes('/') ? `${session.modelProvider}/${session.model}` : session.model).toLowerCase();
|
|
819
836
|
const model = models.find((m) => m.id.toLowerCase() === current)?.id ?? models.find((m) => m.available)?.id;
|
package/dist/bridge.js
CHANGED
|
@@ -3,6 +3,7 @@ import { randomBytes } from 'node:crypto';
|
|
|
3
3
|
import { existsSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
4
4
|
import { createServer } from 'node:net';
|
|
5
5
|
import { rm } from 'node:fs/promises';
|
|
6
|
+
import { provider } from '@byokit/accounts';
|
|
6
7
|
import { words } from './words.js';
|
|
7
8
|
/** Newline-framed JSON, one request per connection; anything larger is not a gate request. */
|
|
8
9
|
const FRAME_CAP = 1_000_000;
|
|
@@ -38,6 +39,8 @@ export function writePlugin(dir, o) {
|
|
|
38
39
|
name: 'BYOKit bridge',
|
|
39
40
|
activation: { onStartup: true },
|
|
40
41
|
cliBackends: ['openai-codex'],
|
|
42
|
+
// The Codex CLI route lists the ChatGPT catalogue's models; the engine lists a plugin route's rows only from here.
|
|
43
|
+
modelCatalog: { providers: { 'openai-codex': { models: [provider('chatgpt').models.strong, provider('chatgpt').models.fast].map((id) => ({ id, name: id })) } }, discovery: { 'openai-codex': 'static' } },
|
|
41
44
|
contracts: { tools: o.tools.map((t) => t.name), ...(o.browser ? { agentToolResultMiddleware: ['openclaw', 'codex'] } : {}) },
|
|
42
45
|
configSchema: { type: 'object', additionalProperties: false },
|
|
43
46
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byokit/openclaw",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.3",
|
|
4
4
|
"description": "The OpenClaw runtime kit: the pinned engine's full operator surface with plain-words helpers for members, sign-in, runs and approvals.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"prepack": "tsc -b && node ../../scripts/fix-words-dts.cjs"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@byokit/accounts": "0.28.
|
|
63
|
+
"@byokit/accounts": "0.28.1",
|
|
64
64
|
"@byokit/pair": "0.10.4",
|
|
65
65
|
"@byokit/relay": "0.8.2",
|
|
66
66
|
"@byokit/discover": "0.8.4",
|