@aisac/cli 0.4.0-beta.22 → 0.4.0-beta.23
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 +5 -3
- package/dist/claude-observation.mjs +1 -1
- package/dist/cli.mjs +5 -1
- package/dist/launch.mjs +4 -2
- package/dist/manager/launch-role.mjs +33 -13
- package/dist/package.json +1 -1
- package/dist/release-manifest.json +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -109,9 +109,11 @@ through its `manager_*` tools. `aisac workers` lists the room.
|
|
|
109
109
|
prompts there. A manager message is labelled as not typed by you, carries no approval
|
|
110
110
|
and never changes a worker's sandbox or approval policy. What you type into a turn the
|
|
111
111
|
manager started goes back to it with the answer; turns you start yourself do not.
|
|
112
|
-
- **Hosts:** the worker role
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
- **Hosts:** the worker role needs Codex `0.166.0` or newer and, from client
|
|
113
|
+
`0.4.0-beta.23`, is offered on every such Codex `aisac codex` runs; `aisac doctor` shows
|
|
114
|
+
it on its `manager` line, with the releases the role was measured with. On an older
|
|
115
|
+
Codex, or without an active license, the host starts without the role and says why in
|
|
116
|
+
one line.
|
|
115
117
|
- **Sends ask you:** Claude Code asks before the first `manager_send`; allow it for the
|
|
116
118
|
session or the project from that prompt.
|
|
117
119
|
- **Overnight:** `aisac workers delegate --for 8h`, typed in your own terminal with a
|
|
@@ -16,7 +16,7 @@ export const MAX_LOG_FILES = 3;
|
|
|
16
16
|
const LOCK_WAIT_MS = 250;
|
|
17
17
|
const LOCK_STALE_MS = 30_000;
|
|
18
18
|
const ADMISSION_MS = 60 * 60 * 1000;
|
|
19
|
-
export const ADAPTER_VERSION = '0.4.0-beta.
|
|
19
|
+
export const ADAPTER_VERSION = '0.4.0-beta.23';
|
|
20
20
|
const MAX_DIAGNOSTIC_COUNT = 10_000_000;
|
|
21
21
|
const MAX_DIAGNOSTIC_BYTES = 128 * 1024 * 1024;
|
|
22
22
|
const CHECKPOINT_BACKENDS = new Set(['native_store', 'private_file']);
|
package/dist/cli.mjs
CHANGED
|
@@ -70,7 +70,7 @@ import { codexHooksStatus, supportsCodexHooks } from './codex-hooks.mjs';
|
|
|
70
70
|
import { managerDoctorLine, managerDoctorSection, takeRoleFlags } from './manager/launch-role.mjs';
|
|
71
71
|
import { WORKERS_USAGE, workersCommand } from './manager/workers-cli.mjs';
|
|
72
72
|
|
|
73
|
-
const VERSION = '0.4.0-beta.
|
|
73
|
+
const VERSION = '0.4.0-beta.23';
|
|
74
74
|
// The command is `aisac`; `aibrain` is an alias installed from the same entry.
|
|
75
75
|
const COMMAND = 'aisac';
|
|
76
76
|
/** `aisac scan` could not scan as asked (scan spec D6); 1 means findings, 2 a usage error. */
|
|
@@ -1052,6 +1052,10 @@ async function doctor(json) {
|
|
|
1052
1052
|
root: stateRoot(),
|
|
1053
1053
|
claude: native.claude !== null,
|
|
1054
1054
|
codexVersion: native.codex === null ? null : (codexCompatibility?.version ?? null),
|
|
1055
|
+
// The worker role needs a Codex this client runs (D14); a refused one never has it.
|
|
1056
|
+
codexAccepted:
|
|
1057
|
+
codexCompatibility?.status === 'qualified' ||
|
|
1058
|
+
codexCompatibility?.status === 'protocol_match',
|
|
1055
1059
|
}).catch(() => null),
|
|
1056
1060
|
paidOrPilot: probe?.ok
|
|
1057
1061
|
? 'provider_free_probe_ok; paid entitlement or pilot invitation remains server-enforced'
|
package/dist/launch.mjs
CHANGED
|
@@ -972,8 +972,10 @@ export async function launchCodex(config, root, args, dependencies = {}, launchO
|
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
974
|
// The worker role (spec aisac-engineering-manager FR1, D14) needs the license the
|
|
975
|
-
// pack confirmed and a Codex measured with it;
|
|
976
|
-
//
|
|
975
|
+
// pack confirmed and a Codex from the first release measured with it on; this launch
|
|
976
|
+
// has already refused a Codex whose protocol it does not know. The role never blocks
|
|
977
|
+
// the launch. A name another live session of the room has stops it here, before any
|
|
978
|
+
// host starts.
|
|
977
979
|
/** @type {Awaited<ReturnType<typeof prepareRole>> | null} */
|
|
978
980
|
let role = null;
|
|
979
981
|
if (launchOptions.role != null) {
|
|
@@ -43,10 +43,17 @@ export const MANAGER_ALLOWED_TOOLS = Object.freeze([
|
|
|
43
43
|
'manager_decide',
|
|
44
44
|
]);
|
|
45
45
|
/**
|
|
46
|
-
* The Codex
|
|
47
|
-
*
|
|
46
|
+
* The first Codex release measured with the worker role (D14). An older one starts
|
|
47
|
+
* Codex without the role. A later one gets it whenever this client runs that Codex at
|
|
48
|
+
* all: the launcher has already refused a release whose protocol it does not know.
|
|
48
49
|
*/
|
|
49
|
-
export const
|
|
50
|
+
export const MIN_WORKER_CODEX_VERSION = '0.166.0';
|
|
51
|
+
/**
|
|
52
|
+
* The Codex releases the role's host gate ran on (docs/reference/codex-manager-gate.md).
|
|
53
|
+
* Doctor shows them; they do not decide who gets the role.
|
|
54
|
+
*/
|
|
55
|
+
export const MEASURED_WORKER_CODEX_VERSIONS = Object.freeze(['0.166.0', '0.167.1']);
|
|
56
|
+
const STABLE_VERSION_PATTERN = /^(\d+)\.(\d+)\.(\d+)$/u;
|
|
50
57
|
|
|
51
58
|
const USAGE_EXIT_CODE = 2;
|
|
52
59
|
/** Registration failures that stop the launch before any host starts (FR1). */
|
|
@@ -54,9 +61,9 @@ const REFUSED_REGISTRATIONS = ['worker_name_taken', 'manager_already_active', 'r
|
|
|
54
61
|
/** The Codex subcommands a worker runs under: none (the terminal), `resume` and `fork`. */
|
|
55
62
|
const WORKER_CODEX_SUBCOMMANDS = new Set(['resume', 'fork']);
|
|
56
63
|
/**
|
|
57
|
-
* The other subcommands of
|
|
58
|
-
*
|
|
59
|
-
*
|
|
64
|
+
* The other subcommands of the Codex releases measured with the role (D14). None opens
|
|
65
|
+
* the terminal bridge's socket, so no adapter would run the role. A first word not
|
|
66
|
+
* listed here is the prompt.
|
|
60
67
|
*/
|
|
61
68
|
const CODEX_SUBCOMMANDS = new Set([
|
|
62
69
|
'a',
|
|
@@ -240,11 +247,20 @@ function codexSubcommand(args) {
|
|
|
240
247
|
}
|
|
241
248
|
|
|
242
249
|
/**
|
|
243
|
-
* Whether this Codex version
|
|
250
|
+
* Whether this Codex version gets the worker role (D14): the first release measured
|
|
251
|
+
* with it, or a later one. A null or malformed version never does. The caller has
|
|
252
|
+
* already checked that this client runs the version.
|
|
244
253
|
* @param {string | null | undefined} version
|
|
245
254
|
*/
|
|
246
255
|
export function supportsWorkerRole(version) {
|
|
247
|
-
|
|
256
|
+
const match = STABLE_VERSION_PATTERN.exec(version ?? '');
|
|
257
|
+
const minimum = STABLE_VERSION_PATTERN.exec(MIN_WORKER_CODEX_VERSION);
|
|
258
|
+
if (match === null || minimum === null) return false;
|
|
259
|
+
for (let index = 1; index < match.length; index += 1) {
|
|
260
|
+
const difference = Number(match[index]) - Number(minimum[index]);
|
|
261
|
+
if (difference !== 0) return difference > 0;
|
|
262
|
+
}
|
|
263
|
+
return true;
|
|
248
264
|
}
|
|
249
265
|
|
|
250
266
|
/**
|
|
@@ -259,7 +275,7 @@ export function supportsWorkerRole(version) {
|
|
|
259
275
|
* @param {string} input.cwd
|
|
260
276
|
* @param {BusLocale} input.locale
|
|
261
277
|
* @param {boolean} input.licensed the launch's license check passed (D11)
|
|
262
|
-
* @param {boolean} input.qualified the host version
|
|
278
|
+
* @param {boolean} input.qualified the host version gets the role (D14)
|
|
263
279
|
* @param {import('./bus.mjs').BusClock} [input.clock]
|
|
264
280
|
* @param {import('./room.mjs').GitRunner} [input.git]
|
|
265
281
|
* @returns {Promise<ActiveRole | InactiveRole>}
|
|
@@ -415,7 +431,8 @@ export const ROLE_ENVIRONMENT_VARIABLES = Object.freeze([
|
|
|
415
431
|
* @typedef {object} ManagerDoctorSection
|
|
416
432
|
* @property {'supported' | 'claude_not_found'} manager_role
|
|
417
433
|
* @property {'supported' | 'host_unqualified' | 'codex_not_found'} worker_role
|
|
418
|
-
* @property {string
|
|
434
|
+
* @property {string} minimum_codex the first Codex release that gets the worker role
|
|
435
|
+
* @property {string[]} measured_codex the Codex releases the role's host gate ran on
|
|
419
436
|
* @property {{ label: string, kind: string, manager: boolean, workers: number, pending: number }[]} rooms
|
|
420
437
|
*/
|
|
421
438
|
|
|
@@ -427,10 +444,11 @@ export const ROLE_ENVIRONMENT_VARIABLES = Object.freeze([
|
|
|
427
444
|
* @param {string} input.root the client's state root
|
|
428
445
|
* @param {boolean} input.claude Claude Code is installed
|
|
429
446
|
* @param {string | null | undefined} input.codexVersion the installed Codex, when there is one
|
|
447
|
+
* @param {boolean} input.codexAccepted this client runs that Codex (listed, or the same protocol)
|
|
430
448
|
* @param {import('./bus.mjs').BusClock} [input.clock]
|
|
431
449
|
* @returns {Promise<ManagerDoctorSection>}
|
|
432
450
|
*/
|
|
433
|
-
export async function managerDoctorSection({ root, claude, codexVersion, clock }) {
|
|
451
|
+
export async function managerDoctorSection({ root, claude, codexVersion, codexAccepted, clock }) {
|
|
434
452
|
/** @type {ManagerDoctorSection['rooms']} */
|
|
435
453
|
const rooms = [];
|
|
436
454
|
for (const { descriptor, paths } of await listRooms(root)) {
|
|
@@ -448,10 +466,12 @@ export async function managerDoctorSection({ root, claude, codexVersion, clock }
|
|
|
448
466
|
/** @type {ManagerDoctorSection['worker_role']} */
|
|
449
467
|
let workerRole = 'codex_not_found';
|
|
450
468
|
if (typeof codexVersion === 'string')
|
|
451
|
-
workerRole =
|
|
469
|
+
workerRole =
|
|
470
|
+
codexAccepted && supportsWorkerRole(codexVersion) ? 'supported' : 'host_unqualified';
|
|
452
471
|
return {
|
|
453
472
|
manager_role: claude ? 'supported' : 'claude_not_found',
|
|
454
473
|
worker_role: workerRole,
|
|
474
|
+
minimum_codex: MIN_WORKER_CODEX_VERSION,
|
|
455
475
|
measured_codex: [...MEASURED_WORKER_CODEX_VERSIONS],
|
|
456
476
|
rooms,
|
|
457
477
|
};
|
|
@@ -472,5 +492,5 @@ export function managerDoctorLine(section) {
|
|
|
472
492
|
`${room.label} (${room.manager ? 'manager, ' : ''}${room.workers} worker${room.workers === 1 ? '' : 's'}, ${room.pending} pending)`,
|
|
473
493
|
)
|
|
474
494
|
.join('; ');
|
|
475
|
-
return `manager: manager role ${section.manager_role}; worker role ${section.worker_role} (measured with Codex ${section.measured_codex.join(', ')}); ${rooms}`;
|
|
495
|
+
return `manager: manager role ${section.manager_role}; worker role ${section.worker_role} (Codex ${section.minimum_codex} or newer; measured with Codex ${section.measured_codex.join(', ')}); ${rooms}`;
|
|
476
496
|
}
|
package/dist/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"kind": "aisac-release-manifest",
|
|
3
3
|
"schema_version": 1,
|
|
4
|
-
"sequence":
|
|
5
|
-
"issued_at": "2026-11-
|
|
6
|
-
"expires_at": "2026-12-
|
|
4
|
+
"sequence": 3,
|
|
5
|
+
"issued_at": "2026-11-16T19:15:00Z",
|
|
6
|
+
"expires_at": "2026-12-16T19:15:00Z",
|
|
7
7
|
"key_id": "94f9ccf331e4f7f3",
|
|
8
8
|
"features": {
|
|
9
9
|
"self_update": true,
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"minimum_version": "0.4.0-beta.18",
|
|
21
21
|
"channels": {
|
|
22
22
|
"beta": {
|
|
23
|
-
"version": "0.4.0-beta.
|
|
23
|
+
"version": "0.4.0-beta.22",
|
|
24
24
|
"integrity": {
|
|
25
|
-
"@aisac/cli": "sha512-
|
|
26
|
-
"@brunobracaioli/aibrain": "sha512-
|
|
25
|
+
"@aisac/cli": "sha512-ROhGli3dSMR86f054x8bnvf9MR/WEOjEzXCObocO5hBR7bP3HiQfL9cZ26+PaIdhrTHH1QNuEg5GlTz0pUm1HA==",
|
|
26
|
+
"@brunobracaioli/aibrain": "sha512-tlZYeDNiVB6L3uVlypLUCDnJz+kcKXQiv5PkQm0RGV4RI7Gnr26GfgRTKUp0O5ty7jKhGtfUo/nHWswtRMWURg=="
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -324,5 +324,5 @@
|
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
},
|
|
327
|
-
"signature": "
|
|
327
|
+
"signature": "ADTptu9LyuHwWnA5qlS0nhHGgYcrIyuXAWSVMLVzAbXKBAVXJhHINtOlzc0loX7X/Mh3s49RAM7hbHNbv8huCw=="
|
|
328
328
|
}
|
package/package.json
CHANGED