@pleri/olam-cli 0.1.148 → 0.1.151
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/agent-stream/agent-sdk-to-chunks.js +276 -0
- package/dist/agent-stream/agent-stream-launch.js +348 -0
- package/dist/agent-stream/chunks-subscriber-transport.js +262 -0
- package/dist/agent-stream/codex-runner.js +188 -0
- package/dist/agent-stream/driver-runner.js +347 -0
- package/dist/agent-stream/operator-subscription.js +179 -0
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +39 -0
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/doctor.d.ts +23 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +77 -3
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts +46 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +90 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/kg-build.d.ts +23 -0
- package/dist/commands/kg-build.d.ts.map +1 -1
- package/dist/commands/kg-build.js +104 -2
- package/dist/commands/kg-build.js.map +1 -1
- package/dist/commands/restart.d.ts +18 -0
- package/dist/commands/restart.d.ts.map +1 -0
- package/dist/commands/restart.js +113 -0
- package/dist/commands/restart.js.map +1 -0
- package/dist/commands/setup-linux-gate.d.ts +26 -0
- package/dist/commands/setup-linux-gate.d.ts.map +1 -0
- package/dist/commands/setup-linux-gate.js +42 -0
- package/dist/commands/setup-linux-gate.js.map +1 -0
- package/dist/commands/setup-metrics.d.ts +26 -0
- package/dist/commands/setup-metrics.d.ts.map +1 -0
- package/dist/commands/setup-metrics.js +57 -0
- package/dist/commands/setup-metrics.js.map +1 -0
- package/dist/commands/setup-phase-5a-skill-source.d.ts +68 -0
- package/dist/commands/setup-phase-5a-skill-source.d.ts.map +1 -0
- package/dist/commands/setup-phase-5a-skill-source.js +196 -0
- package/dist/commands/setup-phase-5a-skill-source.js.map +1 -0
- package/dist/commands/setup-phase-5b-project-sweep.d.ts +38 -0
- package/dist/commands/setup-phase-5b-project-sweep.d.ts.map +1 -0
- package/dist/commands/setup-phase-5b-project-sweep.js +175 -0
- package/dist/commands/setup-phase-5b-project-sweep.js.map +1 -0
- package/dist/commands/setup.d.ts +19 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +22 -0
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/skills-10x.d.ts +23 -0
- package/dist/commands/skills-10x.d.ts.map +1 -0
- package/dist/commands/skills-10x.js +308 -0
- package/dist/commands/skills-10x.js.map +1 -0
- package/dist/image-digests.json +7 -7
- package/dist/index.js +17878 -15826
- package/dist/index.js.map +1 -1
- package/dist/lib/build-if-stale.d.ts +33 -0
- package/dist/lib/build-if-stale.d.ts.map +1 -0
- package/dist/lib/build-if-stale.js +156 -0
- package/dist/lib/build-if-stale.js.map +1 -0
- package/dist/lib/bundle-freshness.d.ts +57 -0
- package/dist/lib/bundle-freshness.d.ts.map +1 -0
- package/dist/lib/bundle-freshness.js +223 -0
- package/dist/lib/bundle-freshness.js.map +1 -0
- package/dist/lib/bundle-source.d.ts +52 -0
- package/dist/lib/bundle-source.d.ts.map +1 -0
- package/dist/lib/bundle-source.js +83 -0
- package/dist/lib/bundle-source.js.map +1 -0
- package/dist/lib/manifest-refresh.d.ts +34 -0
- package/dist/lib/manifest-refresh.d.ts.map +1 -1
- package/dist/lib/manifest-refresh.js +66 -0
- package/dist/lib/manifest-refresh.js.map +1 -1
- package/dist/lib/upgrade-kubernetes.d.ts +17 -1
- package/dist/lib/upgrade-kubernetes.d.ts.map +1 -1
- package/dist/lib/upgrade-kubernetes.js +125 -1
- package/dist/lib/upgrade-kubernetes.js.map +1 -1
- package/dist/mcp-server.js +84 -58
- package/host-cp/compose.yaml +6 -0
- package/host-cp/k8s/manifests/30-configmap.yaml +6 -0
- package/host-cp/k8s/manifests/50-deployment.yaml +46 -9
- package/host-cp/k8s/manifests/auth-service/50-deployment.yaml +7 -4
- package/host-cp/k8s/manifests/kg-service/50-deployment.yaml +1 -1
- package/host-cp/k8s/manifests/mcp-auth-service/50-deployment.yaml +7 -4
- package/host-cp/k8s/manifests/memory-service/50-deployment.yaml +6 -1
- package/host-cp/src/agent-runtime-trigger.mjs +7 -5
- package/host-cp/src/plan-chat-secret.mjs +13 -2
- package/host-cp/src/plan-chat-service.mjs +94 -12
- package/host-cp/src/server.mjs +19 -7
- package/host-cp/src/upgrade-spawner.mjs +10 -5
- package/package.json +4 -2
|
@@ -41,6 +41,95 @@ import { registerKgDoctorCommand } from './kg-doctor.js';
|
|
|
41
41
|
import { registerKgInstallHookCommand } from './kg-install-hook.js';
|
|
42
42
|
import { registerKgUninstallHookCommand } from './kg-uninstall-hook.js';
|
|
43
43
|
import { registerKgSavingsCommand } from './kg-savings.js';
|
|
44
|
+
/** Read JSONL queue entries from disk (real implementation). */
|
|
45
|
+
function readQueueFromDisk(queuePath) {
|
|
46
|
+
if (!fs.existsSync(queuePath))
|
|
47
|
+
return [];
|
|
48
|
+
const raw = fs.readFileSync(queuePath, 'utf-8');
|
|
49
|
+
const entries = [];
|
|
50
|
+
for (const line of raw.split('\n')) {
|
|
51
|
+
const t = line.trim();
|
|
52
|
+
if (!t)
|
|
53
|
+
continue;
|
|
54
|
+
try {
|
|
55
|
+
entries.push(JSON.parse(t));
|
|
56
|
+
}
|
|
57
|
+
catch { /* skip malformed */ }
|
|
58
|
+
}
|
|
59
|
+
return entries;
|
|
60
|
+
}
|
|
61
|
+
/** Write JSONL queue entries to disk (real implementation). */
|
|
62
|
+
function writeQueueToDisk(queuePath, entries) {
|
|
63
|
+
fs.mkdirSync(path.dirname(queuePath), { recursive: true });
|
|
64
|
+
const content = entries.map((e) => JSON.stringify(e)).join('\n') + (entries.length > 0 ? '\n' : '');
|
|
65
|
+
fs.writeFileSync(queuePath, content, 'utf-8');
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Drain the kg-pending.jsonl queue: build each entry sequentially via kg-service,
|
|
69
|
+
* remove successfully-built entries from the queue, leave failures with failedAt/failedReason.
|
|
70
|
+
*/
|
|
71
|
+
export async function runKgBuildPending(opts = {}) {
|
|
72
|
+
const queuePath = opts.queuePath ??
|
|
73
|
+
(() => {
|
|
74
|
+
const stateDir = process.env['OLAM_STATE_DIR'] ??
|
|
75
|
+
path.join(os.homedir(), '.olam', 'state');
|
|
76
|
+
return path.join(stateDir, 'kg-pending.jsonl');
|
|
77
|
+
})();
|
|
78
|
+
const readQueue = opts.readQueueFn ?? readQueueFromDisk;
|
|
79
|
+
const writeQueue = opts.writeQueueFn ?? writeQueueToDisk;
|
|
80
|
+
const rawEntries = readQueue(queuePath);
|
|
81
|
+
// Dedupe at drain-time: collapse duplicates by path, keeping the latest entry
|
|
82
|
+
// (Map insertion order: later entries overwrite earlier ones for the same key).
|
|
83
|
+
const deduped = [...new Map(rawEntries.map((e) => [e.path, e])).values()];
|
|
84
|
+
if (deduped.length === 0) {
|
|
85
|
+
printInfo('kg build --pending', 'queue is empty');
|
|
86
|
+
return { exitCode: 0, built: [], failed: [] };
|
|
87
|
+
}
|
|
88
|
+
printInfo('kg build --pending', `draining ${deduped.length} queued repo(s)`);
|
|
89
|
+
const built = [];
|
|
90
|
+
const failed = [];
|
|
91
|
+
const remaining = [];
|
|
92
|
+
for (const entry of deduped) {
|
|
93
|
+
const repoPath = entry.path;
|
|
94
|
+
const workspaceName = path.basename(repoPath).toLowerCase();
|
|
95
|
+
printInfo('kg build --pending', `building ${repoPath} (workspace=${workspaceName})`);
|
|
96
|
+
let containerPath;
|
|
97
|
+
try {
|
|
98
|
+
containerPath = toContainerPath(repoPath);
|
|
99
|
+
}
|
|
100
|
+
catch (err) {
|
|
101
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
102
|
+
printError(`skipping ${repoPath}: ${msg}`);
|
|
103
|
+
failed.push(repoPath);
|
|
104
|
+
remaining.push({ ...entry, failedAt: Date.now(), failedReason: msg });
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
let resp;
|
|
108
|
+
try {
|
|
109
|
+
resp = await kgServiceBuild({ workspace: workspaceName, repo_path: containerPath });
|
|
110
|
+
}
|
|
111
|
+
catch (err) {
|
|
112
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
113
|
+
printError(`build failed for ${repoPath}: ${msg}`);
|
|
114
|
+
failed.push(repoPath);
|
|
115
|
+
remaining.push({ ...entry, failedAt: Date.now(), failedReason: msg });
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
if (!resp.ok) {
|
|
119
|
+
const msg = resp.error ?? 'unknown error';
|
|
120
|
+
printError(`build failed for ${repoPath}: ${msg}`);
|
|
121
|
+
failed.push(repoPath);
|
|
122
|
+
remaining.push({ ...entry, failedAt: Date.now(), failedReason: msg });
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
built.push(repoPath);
|
|
126
|
+
printSuccess(`built ${repoPath} (${resp.nodes ?? '?'} nodes / ${resp.edges ?? '?'} edges)`);
|
|
127
|
+
// Do NOT add to remaining — successful builds are removed from queue
|
|
128
|
+
}
|
|
129
|
+
writeQueue(queuePath, remaining);
|
|
130
|
+
printInfo('kg build --pending', `done: ${built.length} built, ${failed.length} failed, ${remaining.length} remaining in queue`);
|
|
131
|
+
return { exitCode: failed.length > 0 && built.length === 0 ? 1 : 0, built, failed };
|
|
132
|
+
}
|
|
44
133
|
/**
|
|
45
134
|
* Resolve workspace name + source path. `name` defaults to the basename
|
|
46
135
|
* of the operator's cwd — the "build KG for the repo I'm in" common case.
|
|
@@ -153,11 +242,24 @@ export async function runKgBuild(workspaceArg, options = {}) {
|
|
|
153
242
|
*/
|
|
154
243
|
export function registerKg(program) {
|
|
155
244
|
const kg = program.command('kg').description('Knowledge-graph operations (kg-service container)');
|
|
156
|
-
kg.command('build')
|
|
157
|
-
|
|
245
|
+
const buildCmd = kg.command('build');
|
|
246
|
+
buildCmd
|
|
247
|
+
.description('Build pristine KG for a workspace (default: current dir). Routes through olam-kg-service /build endpoint. Use --pending to drain the pending queue.')
|
|
158
248
|
.argument('[workspace]', 'workspace name (lowercase alphanumeric + hyphens/underscores)')
|
|
159
249
|
.option('--json', 'emit freshness record as JSON instead of human-readable status')
|
|
250
|
+
.option('--pending', 'drain the kg-pending.jsonl queue (mutually exclusive with [workspace])')
|
|
160
251
|
.action(async (workspaceArg, opts) => {
|
|
252
|
+
if (opts.pending && workspaceArg !== undefined) {
|
|
253
|
+
printError('--pending is mutually exclusive with [workspace] argument');
|
|
254
|
+
process.exitCode = 2;
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
if (opts.pending) {
|
|
258
|
+
const r = await runKgBuildPending();
|
|
259
|
+
if (r.exitCode !== 0)
|
|
260
|
+
process.exitCode = r.exitCode;
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
161
263
|
const r = await runKgBuild(workspaceArg, opts);
|
|
162
264
|
if (r.exitCode !== 0)
|
|
163
265
|
process.exitCode = r.exitCode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kg-build.js","sourceRoot":"","sources":["../../src/commands/kg-build.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EACL,KAAK,IAAI,cAAc,EACvB,yBAAyB,GAE1B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM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Q,CAAC;IACtD,CAAC,CAAC,CAAC;IAEL,iEAAiE;IACjE,uBAAuB,CAAC,EAAE,CAAC,CAAC;IAC5B,sBAAsB,CAAC,EAAE,CAAC,CAAC;IAC3B,gFAAgF;IAChF,yBAAyB,CAAC,EAAE,CAAC,CAAC;IAC9B,uBAAuB,CAAC,EAAE,CAAC,CAAC;IAC5B,oFAAoF;IACpF,4BAA4B,CAAC,EAAE,CAAC,CAAC;IACjC,8BAA8B,CAAC,EAAE,CAAC,CAAC;IACnC,kFAAkF;IAClF,wBAAwB,CAAC,EAAE,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* olam restart <world> — Restart a world container, auto-building the
|
|
3
|
+
* agent-stream bundle first when the host dist is stale.
|
|
4
|
+
*
|
|
5
|
+
* Phase B2 (olam-world-bundle-freshness): closes the silent-staleness
|
|
6
|
+
* loop where operators run `olam restart` expecting a fresh bundle but
|
|
7
|
+
* instead get the image-baked dist from the last docker build.
|
|
8
|
+
*
|
|
9
|
+
* With Phase B1's bind-mount overlay, the freshly-built dist is
|
|
10
|
+
* immediately visible inside the restarted container — no docker cp
|
|
11
|
+
* required.
|
|
12
|
+
*
|
|
13
|
+
* Fast path (dist current): ≤ 15s.
|
|
14
|
+
* Slow path (dist absent or stale): ≤ 90s (dominated by tsc compile).
|
|
15
|
+
*/
|
|
16
|
+
import type { Command } from 'commander';
|
|
17
|
+
export declare function registerRestart(program: Command): void;
|
|
18
|
+
//# sourceMappingURL=restart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restart.d.ts","sourceRoot":"","sources":["../../src/commands/restart.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmCzC,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAuEtD"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* olam restart <world> — Restart a world container, auto-building the
|
|
3
|
+
* agent-stream bundle first when the host dist is stale.
|
|
4
|
+
*
|
|
5
|
+
* Phase B2 (olam-world-bundle-freshness): closes the silent-staleness
|
|
6
|
+
* loop where operators run `olam restart` expecting a fresh bundle but
|
|
7
|
+
* instead get the image-baked dist from the last docker build.
|
|
8
|
+
*
|
|
9
|
+
* With Phase B1's bind-mount overlay, the freshly-built dist is
|
|
10
|
+
* immediately visible inside the restarted container — no docker cp
|
|
11
|
+
* required.
|
|
12
|
+
*
|
|
13
|
+
* Fast path (dist current): ≤ 15s.
|
|
14
|
+
* Slow path (dist absent or stale): ≤ 90s (dominated by tsc compile).
|
|
15
|
+
*/
|
|
16
|
+
import { existsSync } from 'node:fs';
|
|
17
|
+
import { dirname, resolve } from 'node:path';
|
|
18
|
+
import { spawnSync } from 'node:child_process';
|
|
19
|
+
import { loadContext } from '../context.js';
|
|
20
|
+
import { printError, printInfo, printHeader } from '../output.js';
|
|
21
|
+
import { buildIfStale } from '../lib/build-if-stale.js';
|
|
22
|
+
import { resolveBundleSource, BundleSourceNotFoundError } from '../lib/bundle-source.js';
|
|
23
|
+
const RESTART_TIMEOUT_S = 30;
|
|
24
|
+
function docker(args) {
|
|
25
|
+
const result = spawnSync('docker', args, {
|
|
26
|
+
encoding: 'utf-8',
|
|
27
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
28
|
+
});
|
|
29
|
+
return {
|
|
30
|
+
ok: result.status === 0 && result.error === undefined,
|
|
31
|
+
stderr: result.stderr ?? '',
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Walk up from `start` until we find a directory containing both
|
|
36
|
+
* `packages/` and `package.json`. Returns `start` if not found.
|
|
37
|
+
*/
|
|
38
|
+
function resolveRepoRoot(start) {
|
|
39
|
+
let cur = start;
|
|
40
|
+
while (true) {
|
|
41
|
+
if (existsSync(resolve(cur, 'packages')) && existsSync(resolve(cur, 'package.json'))) {
|
|
42
|
+
return cur;
|
|
43
|
+
}
|
|
44
|
+
const parent = dirname(cur);
|
|
45
|
+
if (parent === cur)
|
|
46
|
+
return start;
|
|
47
|
+
cur = parent;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export function registerRestart(program) {
|
|
51
|
+
program
|
|
52
|
+
.command('restart')
|
|
53
|
+
.description('Restart a world container (auto-builds agent-stream bundle when stale)')
|
|
54
|
+
.argument('<world>', 'World ID or name')
|
|
55
|
+
.action(async (worldIdOrName) => {
|
|
56
|
+
const { ctx, error } = await loadContext();
|
|
57
|
+
if (!ctx) {
|
|
58
|
+
printError(error?.message ?? 'Olam is not configured. Run `olam init` first.');
|
|
59
|
+
process.exitCode = 1;
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const world = ctx.worldManager.getWorld(worldIdOrName);
|
|
63
|
+
if (!world) {
|
|
64
|
+
printError(`World "${worldIdOrName}" not found. Run \`olam list\` to see worlds.`);
|
|
65
|
+
process.exitCode = 1;
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
printHeader(`olam restart: ${world.name}`);
|
|
69
|
+
// C3 (olam-world-bundle-freshness): resolve bundle source and branch on mode.
|
|
70
|
+
// source-mode: auto-build if stale (B2 path).
|
|
71
|
+
// install-mode: skip build, log one line, proceed immediately.
|
|
72
|
+
try {
|
|
73
|
+
const bundleSource = resolveBundleSource();
|
|
74
|
+
if (bundleSource.mode === 'install') {
|
|
75
|
+
// C3 acceptance: log exactly this line to stderr.
|
|
76
|
+
process.stderr.write('bundle source: install-mode; skipping rebuild\n');
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
// source-mode: B2 path — auto-build if stale.
|
|
80
|
+
const repoRoot = resolveRepoRoot(process.cwd());
|
|
81
|
+
const buildResult = buildIfStale(repoRoot);
|
|
82
|
+
if (!buildResult.ok) {
|
|
83
|
+
printError('Agent-stream bundle build failed. Not restarting with a stale bundle.\n' +
|
|
84
|
+
'Fix the build error and re-run `olam restart`.');
|
|
85
|
+
process.exitCode = 1;
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
printInfo('Bundle', buildResult.message);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
if (err instanceof BundleSourceNotFoundError) {
|
|
93
|
+
// Graceful degradation: bundle path unresolved, but still restart.
|
|
94
|
+
// The container uses its image-baked dist as fallback.
|
|
95
|
+
process.stderr.write(`Warning: agent-stream bundle path unresolved; container uses image-baked dist.\n`);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
throw err;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
// Restart the container.
|
|
102
|
+
const containerName = `olam-${world.id}-devbox`;
|
|
103
|
+
printInfo('Container', containerName);
|
|
104
|
+
const result = docker(['restart', '--time', String(RESTART_TIMEOUT_S), containerName]);
|
|
105
|
+
if (!result.ok) {
|
|
106
|
+
printError(`docker restart failed: ${result.stderr.trim() || '(no stderr)'}`);
|
|
107
|
+
process.exitCode = 1;
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
printInfo('Status', 'restarted');
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=restart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restart.js","sourceRoot":"","sources":["../../src/commands/restart.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE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D;gBACvD,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,kFAAkF,CACnF,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,MAAM,GAAG,CAAC;YACZ,CAAC;QACH,CAAC;QAED,yBAAyB;QACzB,MAAM,aAAa,GAAG,QAAQ,KAAK,CAAC,EAAE,SAAS,CAAC;QAChD,SAAS,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;QAEtC,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC,iBAAiB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC;QACvF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,UAAU,CACR,0BAA0B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,aAAa,EAAE,CAClE,CAAC;YACF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;YACrB,OAAO;QACT,CAAC;QAED,SAAS,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* olam setup linux-gate-status — Linux gate detector subcommand
|
|
3
|
+
* (olam-setup-epic Phase F, F3).
|
|
4
|
+
*
|
|
5
|
+
* Checks two signals and reports whether the Linux platform gate is triggered:
|
|
6
|
+
* (a) ≥1 GitHub issue labeled `linux-platform-request` (any state)
|
|
7
|
+
* (b) ≥3 trust-audit-log entries with platform = 'linux'
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* olam setup linux-gate-status
|
|
11
|
+
*
|
|
12
|
+
* Outputs JSON to stdout:
|
|
13
|
+
* { triggered, source, ghIssues, linuxInvocations }
|
|
14
|
+
* (plus ghError when the `gh` CLI is unavailable)
|
|
15
|
+
*
|
|
16
|
+
* Exit codes:
|
|
17
|
+
* 0 — gate not triggered OR triggered (both cases print JSON; caller decides)
|
|
18
|
+
* 1 — unexpected runtime error (not the same as "triggered")
|
|
19
|
+
*
|
|
20
|
+
* Design constraint: this file lives in @pleri/olam-cli and delegates to
|
|
21
|
+
* the pure @olam/core helper (detectLinuxGateTrigger). @olam/core does NOT
|
|
22
|
+
* import from @pleri/olam-cli (dep-cycle rule).
|
|
23
|
+
*/
|
|
24
|
+
import type { Command } from 'commander';
|
|
25
|
+
export declare function registerSetupLinuxGate(program: Command): void;
|
|
26
|
+
//# sourceMappingURL=setup-linux-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-linux-gate.d.ts","sourceRoot":"","sources":["../../src/commands/setup-linux-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmB7D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* olam setup linux-gate-status — Linux gate detector subcommand
|
|
3
|
+
* (olam-setup-epic Phase F, F3).
|
|
4
|
+
*
|
|
5
|
+
* Checks two signals and reports whether the Linux platform gate is triggered:
|
|
6
|
+
* (a) ≥1 GitHub issue labeled `linux-platform-request` (any state)
|
|
7
|
+
* (b) ≥3 trust-audit-log entries with platform = 'linux'
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* olam setup linux-gate-status
|
|
11
|
+
*
|
|
12
|
+
* Outputs JSON to stdout:
|
|
13
|
+
* { triggered, source, ghIssues, linuxInvocations }
|
|
14
|
+
* (plus ghError when the `gh` CLI is unavailable)
|
|
15
|
+
*
|
|
16
|
+
* Exit codes:
|
|
17
|
+
* 0 — gate not triggered OR triggered (both cases print JSON; caller decides)
|
|
18
|
+
* 1 — unexpected runtime error (not the same as "triggered")
|
|
19
|
+
*
|
|
20
|
+
* Design constraint: this file lives in @pleri/olam-cli and delegates to
|
|
21
|
+
* the pure @olam/core helper (detectLinuxGateTrigger). @olam/core does NOT
|
|
22
|
+
* import from @pleri/olam-cli (dep-cycle rule).
|
|
23
|
+
*/
|
|
24
|
+
import { detectLinuxGateTrigger } from '@olam/core/src/setup/linux-gate.js';
|
|
25
|
+
export function registerSetupLinuxGate(program) {
|
|
26
|
+
program
|
|
27
|
+
.command('setup-linux-gate-status')
|
|
28
|
+
.description('Detect whether the Linux platform expansion gate has been triggered. ' +
|
|
29
|
+
'Checks GitHub issues labeled linux-platform-request and the trust-audit-log ' +
|
|
30
|
+
'for ≥3 Linux invocations. Outputs JSON.')
|
|
31
|
+
.action(() => {
|
|
32
|
+
try {
|
|
33
|
+
const result = detectLinuxGateTrigger();
|
|
34
|
+
process.stdout.write(JSON.stringify(result, null, 2) + '\n');
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
process.stderr.write(`error: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
38
|
+
process.exitCode = 1;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=setup-linux-gate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-linux-gate.js","sourceRoot":"","sources":["../../src/commands/setup-linux-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E,MAAM,UAAU,sBAAsB,CAAC,OAAgB;IACrD,OAAO;SACJ,OAAO,CAAC,yBAAyB,CAAC;SAClC,WAAW,CACV,uEAAuE;QACrE,8EAA8E;QAC9E,yCAAyC,CAC5C;SACA,MAAM,CAAC,GAAG,EAAE;QACX,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,sBAAsB,EAAE,CAAC;YACxC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;QAC/D,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,UAAU,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAC/D,CAAC;YACF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* olam setup metrics — dogfood metrics subcommand (olam-setup-epic Phase F, F2).
|
|
3
|
+
*
|
|
4
|
+
* Reads the trust-audit-log and computes aggregate setup statistics:
|
|
5
|
+
* medianMinutes, p95Minutes, completedCount, abortedCount, ratio
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* olam setup metrics --since <date>
|
|
9
|
+
*
|
|
10
|
+
* --since accepts ISO 8601 (2026-05-18 or 2026-05-18T00:00:00Z).
|
|
11
|
+
* Malformed dates are rejected with a clear error message (exit 1).
|
|
12
|
+
*
|
|
13
|
+
* The command outputs JSON to stdout so it is pipeline-friendly.
|
|
14
|
+
*
|
|
15
|
+
* Design constraint: this file lives in @pleri/olam-cli and delegates to
|
|
16
|
+
* the pure @olam/core helper (queryDogfoodMetrics). @olam/core does NOT
|
|
17
|
+
* import from @pleri/olam-cli (dep-cycle rule).
|
|
18
|
+
*/
|
|
19
|
+
import type { Command } from 'commander';
|
|
20
|
+
/**
|
|
21
|
+
* Parse an ISO 8601 date string (date-only or datetime).
|
|
22
|
+
* Returns a Date object or throws with a descriptive message on failure.
|
|
23
|
+
*/
|
|
24
|
+
export declare function parseSinceDate(raw: string): Date;
|
|
25
|
+
export declare function registerSetupMetrics(program: Command): void;
|
|
26
|
+
//# sourceMappingURL=setup-metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-metrics.d.ts","sourceRoot":"","sources":["../../src/commands/setup-metrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAahD;AAID,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqB3D"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* olam setup metrics — dogfood metrics subcommand (olam-setup-epic Phase F, F2).
|
|
3
|
+
*
|
|
4
|
+
* Reads the trust-audit-log and computes aggregate setup statistics:
|
|
5
|
+
* medianMinutes, p95Minutes, completedCount, abortedCount, ratio
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* olam setup metrics --since <date>
|
|
9
|
+
*
|
|
10
|
+
* --since accepts ISO 8601 (2026-05-18 or 2026-05-18T00:00:00Z).
|
|
11
|
+
* Malformed dates are rejected with a clear error message (exit 1).
|
|
12
|
+
*
|
|
13
|
+
* The command outputs JSON to stdout so it is pipeline-friendly.
|
|
14
|
+
*
|
|
15
|
+
* Design constraint: this file lives in @pleri/olam-cli and delegates to
|
|
16
|
+
* the pure @olam/core helper (queryDogfoodMetrics). @olam/core does NOT
|
|
17
|
+
* import from @pleri/olam-cli (dep-cycle rule).
|
|
18
|
+
*/
|
|
19
|
+
import { queryDogfoodMetrics } from '@olam/core/src/setup/dogfood-metrics.js';
|
|
20
|
+
// ── Date parsing ──────────────────────────────────────────────────────────────
|
|
21
|
+
/**
|
|
22
|
+
* Parse an ISO 8601 date string (date-only or datetime).
|
|
23
|
+
* Returns a Date object or throws with a descriptive message on failure.
|
|
24
|
+
*/
|
|
25
|
+
export function parseSinceDate(raw) {
|
|
26
|
+
// Accept date-only (YYYY-MM-DD) by normalising to midnight UTC.
|
|
27
|
+
const normalised = /^\d{4}-\d{2}-\d{2}$/.test(raw.trim())
|
|
28
|
+
? `${raw.trim()}T00:00:00Z`
|
|
29
|
+
: raw.trim();
|
|
30
|
+
const d = new Date(normalised);
|
|
31
|
+
if (Number.isNaN(d.getTime())) {
|
|
32
|
+
throw new Error(`--since: invalid date "${raw}". Use ISO 8601 format, e.g. 2026-05-18 or 2026-05-18T00:00:00Z`);
|
|
33
|
+
}
|
|
34
|
+
return d;
|
|
35
|
+
}
|
|
36
|
+
// ── Command registration ──────────────────────────────────────────────────────
|
|
37
|
+
export function registerSetupMetrics(program) {
|
|
38
|
+
program
|
|
39
|
+
.command('setup-metrics')
|
|
40
|
+
.description('Query trust-audit-log for olam setup dogfood statistics. ' +
|
|
41
|
+
'Returns { medianMinutes, p95Minutes, completedCount, abortedCount, ratio }.')
|
|
42
|
+
.requiredOption('--since <date>', 'ISO 8601 lower bound (e.g. 2026-05-18)')
|
|
43
|
+
.action((opts) => {
|
|
44
|
+
let since;
|
|
45
|
+
try {
|
|
46
|
+
since = parseSinceDate(opts.since);
|
|
47
|
+
}
|
|
48
|
+
catch (err) {
|
|
49
|
+
process.stderr.write(`error: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
50
|
+
process.exitCode = 1;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const result = queryDogfoodMetrics({ since });
|
|
54
|
+
process.stdout.write(JSON.stringify(result, null, 2) + '\n');
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=setup-metrics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-metrics.js","sourceRoot":"","sources":["../../src/commands/setup-metrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAE9E,iFAAiF;AAEjF;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,gEAAgE;IA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AC/D,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Phase 5a — Skill-source picker (olam-setup-epic Phase B).
|
|
3
|
+
*
|
|
4
|
+
* Three paths (in evaluation order):
|
|
5
|
+
* 1. Skip-on-flag — opts.skipSkillSource is true
|
|
6
|
+
* 2. Non-interactive — opts.skillSource provides a curated name or git URL
|
|
7
|
+
* 3. Interactive TUI — @inquirer/prompts select + optional custom-URL input
|
|
8
|
+
*
|
|
9
|
+
* After path 2 or 3 resolves a git URL: addSkillSource → cloneSkillSource →
|
|
10
|
+
* appendTrustAudit('setup-skill-source-picked').
|
|
11
|
+
*
|
|
12
|
+
* TTY-safety: when !process.stdin.isTTY and no --skill-source flag, falls back
|
|
13
|
+
* to the recommended default (atlas-toolbox) with a stderr hint — mirrors the
|
|
14
|
+
* defaultPrompt pattern in setup.ts.
|
|
15
|
+
*
|
|
16
|
+
* Dependency injection: real @olam/core functions are lazily imported so this
|
|
17
|
+
* module resolves in vitest without a pre-built @olam/core dist. Callers
|
|
18
|
+
* inject stubs via RunSetupDeps for unit tests.
|
|
19
|
+
*/
|
|
20
|
+
import type { RunSetupOptions, RunSetupDeps, PhaseResult } from './setup.js';
|
|
21
|
+
import type { SkillSource } from '@olam/core/src/skill-sources/schema.js';
|
|
22
|
+
import type { TrustAuditEntry } from '@olam/core/src/skill-sources/trust-audit-log.js';
|
|
23
|
+
declare const CURATED_SOURCES: readonly [{
|
|
24
|
+
readonly value: "atlas-toolbox";
|
|
25
|
+
readonly name: "atlas-toolbox (recommended)";
|
|
26
|
+
readonly gitUrl: "https://github.com/grain-tech/atlas-toolbox.git";
|
|
27
|
+
}, {
|
|
28
|
+
readonly value: "grain-tech/ai-skills";
|
|
29
|
+
readonly name: "grain-tech/ai-skills";
|
|
30
|
+
readonly gitUrl: "https://github.com/grain-tech/ai-skills.git";
|
|
31
|
+
}, {
|
|
32
|
+
readonly value: "custom";
|
|
33
|
+
readonly name: "Custom git URL…";
|
|
34
|
+
readonly gitUrl: null;
|
|
35
|
+
}];
|
|
36
|
+
type CuratedValue = (typeof CURATED_SOURCES)[number]['value'];
|
|
37
|
+
export type AddSkillSourceFn = (entry: {
|
|
38
|
+
name: string;
|
|
39
|
+
gitUrl: string;
|
|
40
|
+
branch?: string;
|
|
41
|
+
trustMethod: 'flag' | 'interactive';
|
|
42
|
+
}) => SkillSource;
|
|
43
|
+
export type CloneSkillSourceFn = (opts: {
|
|
44
|
+
gitUrl: string;
|
|
45
|
+
branch: string;
|
|
46
|
+
id: string;
|
|
47
|
+
}) => {
|
|
48
|
+
clonePath: string;
|
|
49
|
+
headSha: string;
|
|
50
|
+
};
|
|
51
|
+
export type AppendTrustAuditFn = (entry: Omit<TrustAuditEntry, 'timestamp'> & {
|
|
52
|
+
timestamp?: string;
|
|
53
|
+
}) => TrustAuditEntry;
|
|
54
|
+
export type RedactUrlFn = (url: string) => string;
|
|
55
|
+
export type SelectPromptFn = (config: {
|
|
56
|
+
message: string;
|
|
57
|
+
choices: ReadonlyArray<{
|
|
58
|
+
value: CuratedValue;
|
|
59
|
+
name: string;
|
|
60
|
+
}>;
|
|
61
|
+
}) => Promise<CuratedValue>;
|
|
62
|
+
export type InputPromptFn = (config: {
|
|
63
|
+
message: string;
|
|
64
|
+
validate: (v: string) => boolean | string;
|
|
65
|
+
}) => Promise<string>;
|
|
66
|
+
export declare function pickSkillSourcePhase(opts: RunSetupOptions, deps: RunSetupDeps): Promise<PhaseResult>;
|
|
67
|
+
export {};
|
|
68
|
+
//# sourceMappingURL=setup-phase-5a-skill-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-phase-5a-skill-source.d.ts","sourceRoot":"","sources":["../../src/commands/setup-phase-5a-skill-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,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