@commonlyai/cli 0.1.370 → 0.1.371
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/package.json +1 -1
- package/src/commands/agent.js +5 -0
- package/src/lib/adapters/codex.js +23 -0
package/package.json
CHANGED
package/src/commands/agent.js
CHANGED
|
@@ -6023,6 +6023,11 @@ Docs:
|
|
|
6023
6023
|
installedVersion: installedCliVersion(),
|
|
6024
6024
|
log: (line) => console.log(`${stamp()} [${name}] ${line}`),
|
|
6025
6025
|
});
|
|
6026
|
+
// F262: a harness the seat's turns would refuse is named now, not on the
|
|
6027
|
+
// first mention. Fired, not awaited, like the update notice above.
|
|
6028
|
+
Promise.resolve(adapter.startNotice?.({ unconfined: hostUnconfined || codexUnconfined }))
|
|
6029
|
+
.then((notice) => { if (notice) console.warn(`${stamp()} [${name}] ${notice}`); })
|
|
6030
|
+
.catch(() => {});
|
|
6026
6031
|
|
|
6027
6032
|
const { stop } = performRun({
|
|
6028
6033
|
instanceUrl: record.instanceUrl,
|
|
@@ -1506,6 +1506,29 @@ export default {
|
|
|
1506
1506
|
|
|
1507
1507
|
inventory: codexRuntimeInventory,
|
|
1508
1508
|
|
|
1509
|
+
// Read once when `agent run` starts. A Codex below the floor is refused on
|
|
1510
|
+
// every public and private-profile turn, so the person hears it in the seat
|
|
1511
|
+
// log's first lines, not on the first mention (F262). A warning, not a
|
|
1512
|
+
// refusal: the floor skips a cloud-codex pod and an operator-unconfined seat,
|
|
1513
|
+
// exactly as spawn does. A Codex that can't be launched gives no notice here;
|
|
1514
|
+
// the run's detect() has already refused that. The probe is cached, so the
|
|
1515
|
+
// first turn doesn't ask again. `opts` carries spawn's version test seams.
|
|
1516
|
+
async startNotice({ env = process.env, unconfined = false, ...opts } = {}) {
|
|
1517
|
+
if (unconfined || codexTrustedPerimeter(env)) return null;
|
|
1518
|
+
let version;
|
|
1519
|
+
try {
|
|
1520
|
+
version = await readCodexVersion(opts, env);
|
|
1521
|
+
} catch {
|
|
1522
|
+
return null;
|
|
1523
|
+
}
|
|
1524
|
+
if (meetsMinimumVersion(version, PUBLIC_CODEX_MIN_VERSION)) return null;
|
|
1525
|
+
return version
|
|
1526
|
+
? `Codex ${version} is older than ${PUBLIC_CODEX_MIN_VERSION}, so every turn will be refused. `
|
|
1527
|
+
+ `Upgrade Codex to at least ${PUBLIC_CODEX_MIN_VERSION} and start the agent again.`
|
|
1528
|
+
: 'could not read the Codex version, so turns may be refused. Check that `codex --version` works '
|
|
1529
|
+
+ `for this agent; this seat needs Codex ${PUBLIC_CODEX_MIN_VERSION} or later.`;
|
|
1530
|
+
},
|
|
1531
|
+
|
|
1509
1532
|
// `opts` is a test seam only: `_commandResolution` overrides the Windows
|
|
1510
1533
|
// resolver's platform/env/fs. Production calls detect() with no argument.
|
|
1511
1534
|
async detect(opts = {}) {
|