@ours.network/codex 0.10.0 → 0.11.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/.codex-plugin/plugin.json +1 -1
- package/bin/monitor-mcp.mjs +1 -2
- package/bin/ours-codex-install.mjs +32 -9
- package/dist/monitor-mcp.mjs +21269 -0
- package/package.json +8 -2
package/bin/monitor-mcp.mjs
CHANGED
|
@@ -5,12 +5,14 @@
|
|
|
5
5
|
// npm i -g @ours.network/codex
|
|
6
6
|
// ours-codex-install
|
|
7
7
|
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
8
|
+
// SUPERSEDED BY `ours-install`: the unified `ours-install` is now the single front door for the
|
|
9
|
+
// WHOLE stack (ours core + harness plugins + ours-fleet + Telegram). `ours-codex-install` is kept
|
|
10
|
+
// as a THIN ALIAS — by default it hands off to `ours-install` when that's available, so an old
|
|
11
|
+
// muscle-memory command still lands the user in the current, unified flow. Pass `--codex-only`
|
|
12
|
+
// (or set OURS_CODEX_LEGACY=1) to force the legacy Codex-only install below.
|
|
11
13
|
//
|
|
12
14
|
// Usage:
|
|
13
|
-
// ours-codex-install [--codex-dir DIR] [--skills-dir DIR] [--skip-daemon]
|
|
15
|
+
// ours-codex-install [--codex-only] [--codex-dir DIR] [--skills-dir DIR] [--skip-daemon]
|
|
14
16
|
import { spawnSync } from 'node:child_process';
|
|
15
17
|
import { fileURLToPath } from 'node:url';
|
|
16
18
|
import { dirname, join } from 'node:path';
|
|
@@ -26,22 +28,43 @@ for (let i = 0; i < argv.length; i++) {
|
|
|
26
28
|
if (a === '--codex-dir') opts.codexDir = argv[++i];
|
|
27
29
|
else if (a === '--skills-dir') opts.skillsDir = argv[++i];
|
|
28
30
|
else if (a === '--skip-daemon') opts.skipDaemon = true;
|
|
31
|
+
else if (a === '--codex-only' || a === '--legacy') opts.codexOnly = true;
|
|
29
32
|
else if (a === '--help' || a === '-h') { help(); process.exit(0); }
|
|
30
33
|
else { console.error(`ours-codex-install: unknown argument "${a}"`); help(); process.exit(2); }
|
|
31
34
|
}
|
|
32
35
|
|
|
36
|
+
// Thin-alias hand-off: unless the caller forced the legacy Codex-only path, run the unified
|
|
37
|
+
// `ours-install` if we can find it — on PATH (published), or the monorepo sibling (dev/test).
|
|
38
|
+
if (!opts.codexOnly && !process.env.OURS_CODEX_LEGACY) {
|
|
39
|
+
const onPath = spawnSync('bash', ['-c', 'command -v ours-install'], { encoding: 'utf8' });
|
|
40
|
+
const unified = (onPath.status === 0 && (onPath.stdout || '').trim())
|
|
41
|
+
? { cmd: (onPath.stdout || '').trim(), args: argv }
|
|
42
|
+
: (() => {
|
|
43
|
+
const sib = join(PKG, '..', 'installer', 'install.mjs');
|
|
44
|
+
return existsSync(sib) ? { cmd: process.execPath, args: [sib, ...argv] } : null;
|
|
45
|
+
})();
|
|
46
|
+
if (unified) {
|
|
47
|
+
const r = spawnSync(unified.cmd, unified.args, { stdio: 'inherit', env: process.env });
|
|
48
|
+
if (r.error) { console.error(`ours-codex-install: ${r.error.message}`); process.exit(1); }
|
|
49
|
+
process.exit(r.status ?? 0);
|
|
50
|
+
}
|
|
51
|
+
// No unified installer found → fall through to the legacy Codex-only install (still never a dead end).
|
|
52
|
+
}
|
|
53
|
+
|
|
33
54
|
function help() {
|
|
34
55
|
console.log(`ours-codex-install — set up the ours.network plugin for the OpenAI Codex CLI.
|
|
35
56
|
|
|
36
57
|
ours-codex-install [options]
|
|
37
58
|
|
|
38
|
-
|
|
39
|
-
|
|
59
|
+
By default this hands off to the unified \`ours-install\` (the single front door for the whole
|
|
60
|
+
stack). Use --codex-only to run the legacy Codex-only install instead. Standard mode uses
|
|
61
|
+
\`codex\`; live mode uses \`ours-codex\`. Live monitoring still requires explicit consent.
|
|
40
62
|
|
|
41
63
|
Options:
|
|
42
|
-
--codex-
|
|
43
|
-
--
|
|
44
|
-
--
|
|
64
|
+
--codex-only run the legacy Codex-only install (skip the unified ours-install)
|
|
65
|
+
--codex-dir <dir> Codex config+AGENTS.md root (default ~/.codex) [--codex-only]
|
|
66
|
+
--skills-dir <dir> skills root (default ~/.agents/skills — USER scope) [--codex-only]
|
|
67
|
+
--skip-daemon do not install/start the ours daemon [--codex-only]
|
|
45
68
|
-h, --help show this help
|
|
46
69
|
|
|
47
70
|
Idempotent: safe to re-run. Start a new Codex thread after installation and review the
|