@pleri/olam-cli 0.1.8 → 0.1.10
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/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +2 -0
- package/dist/commands/create.js.map +1 -1
- package/dist/index.js +230 -88
- package/dist/mcp-server.js +248 -117
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuCzC,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuCzC,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmarD"}
|
package/dist/commands/create.js
CHANGED
|
@@ -85,6 +85,7 @@ export function registerCreate(program) {
|
|
|
85
85
|
// files in your local checkout and want claude to continue from
|
|
86
86
|
// there.
|
|
87
87
|
.option('--carry-uncommitted', "Preserve operator's uncommitted edits in the world's worktree")
|
|
88
|
+
.option('--allow-bootstrap-failure', 'Treat bootstrap step failures as warnings instead of destroying the world (dogfood escape hatch for cross-repo seed coupling)')
|
|
88
89
|
.action(async (opts) => {
|
|
89
90
|
// CLI parity for the MCP tool: when --from-prompt is set, treat
|
|
90
91
|
// it as the world's task AND use it to infer workspace + repos.
|
|
@@ -217,6 +218,7 @@ export function registerCreate(program) {
|
|
|
217
218
|
// `=== true` ensures only the literal boolean true reaches the
|
|
218
219
|
// manager, matching the manager's strict `if (!opts.carryUncommitted)`.
|
|
219
220
|
carryUncommitted: opts.carryUncommitted === true,
|
|
221
|
+
allowBootstrapFailure: opts.allowBootstrapFailure === true,
|
|
220
222
|
});
|
|
221
223
|
spinner.succeed('World created');
|
|
222
224
|
// --keep-after-merge: persist into the registry immediately so
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,UAAU,EACV,2BAA2B,GAC5B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,oBAAoB,GAErB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,6BAA6B,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE1G,MAAM,WAAW,GAAG,wBAAwB,CAAC;AAE7C,2EAA2E;AAC3E,KAAK,UAAU,wBAAwB;IACrC,IAAI,CAAC;QACH,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,CAAC;QAChD,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,CAAC;QAChD,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,MAAM,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,KAAK,UAAU,uBAAuB,CACpC,QAA2B;IAE3B,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,MAAM,eAAe,EAAE,CAAC;QACtC,IAAI,CAAC,KAAK;YAAE,OAAO,EAAE,CAAC;QACtB,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,WAAW,uBAAuB,EAAE;YAC7D,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,KAAK,EAAE;gBAChC,cAAc,EAAE,kBAAkB;aACnC;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;SACnC,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,EAAE,CAAC;QACvB,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAE7B,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC;aACxB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;aACtE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IAChE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4592,7 +4592,7 @@ function isSecureOrLocalhost(value) {
|
|
|
4592
4592
|
if (parsed.protocol !== "http:") return false;
|
|
4593
4593
|
return parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1" || parsed.hostname === "[::1]" || parsed.hostname === "::1";
|
|
4594
4594
|
}
|
|
4595
|
-
var repoTypeSchema, envSetupSchema, RepoConfigSchema, ServiceConfigSchema, sshHostSchema, computeProviderType, stackImageSchema, computeProvidersSchema, ComputeConfigSchema, CostConfigSchema, DashboardConfigSchema, PleriConfigSchema, authModeSchema, AuthConfigSchema, OlamConfigSchema;
|
|
4595
|
+
var repoTypeSchema, envSetupSchema, RepoConfigSchema, ServiceConfigSchema, sshHostSchema, computeProviderType, stackImageSchema, computeProvidersSchema, ComputeConfigSchema, CostConfigSchema, DashboardConfigSchema, PleriConfigSchema, authModeSchema, AuthConfigSchema, DevboxRegistrySchema, DevboxImageSelectorSchema, DevboxConfigSchema, OlamConfigSchema;
|
|
4596
4596
|
var init_schema2 = __esm({
|
|
4597
4597
|
"../core/src/config/schema.ts"() {
|
|
4598
4598
|
"use strict";
|
|
@@ -4718,6 +4718,56 @@ var init_schema2 = __esm({
|
|
|
4718
4718
|
"Copy host credentials into world at creation. Set false to use browser OAuth instead."
|
|
4719
4719
|
)
|
|
4720
4720
|
});
|
|
4721
|
+
DevboxRegistrySchema = external_exports.object({
|
|
4722
|
+
/**
|
|
4723
|
+
* Fully-qualified registry prefix (no trailing slash), e.g.
|
|
4724
|
+
* "ghcr.io/<org>/olam-devbox". When set without per-tag overrides, ALL
|
|
4725
|
+
* `olam-devbox:*` lookups are rewritten to `<prefix>:<tag>`.
|
|
4726
|
+
*/
|
|
4727
|
+
prefix: external_exports.string().optional(),
|
|
4728
|
+
/**
|
|
4729
|
+
* Per-tag overrides. Wins over `prefix` when both are set. Use this when
|
|
4730
|
+
* different image tags live in different registries, or when a few tags
|
|
4731
|
+
* are local-only.
|
|
4732
|
+
*/
|
|
4733
|
+
tags: external_exports.record(external_exports.string(), external_exports.string()).optional().default({})
|
|
4734
|
+
});
|
|
4735
|
+
DevboxImageSelectorSchema = external_exports.object({
|
|
4736
|
+
/** Bare tag the resolver feeds to the registry (e.g. "rails-monorepo"). */
|
|
4737
|
+
tag: external_exports.string().min(1),
|
|
4738
|
+
/** Match when ALL listed repo names are present in the world. */
|
|
4739
|
+
requires_all: external_exports.array(external_exports.string()).optional(),
|
|
4740
|
+
/** Match when at least one listed repo name is present. */
|
|
4741
|
+
requires_any: external_exports.array(external_exports.string()).optional(),
|
|
4742
|
+
/** Match when at least one repo of this type is present. */
|
|
4743
|
+
requires_type: external_exports.string().optional(),
|
|
4744
|
+
/**
|
|
4745
|
+
* When the selector matches, force the per-world mise-cache volume to
|
|
4746
|
+
* this architecture (e.g. "x64" when the image is amd64-only and
|
|
4747
|
+
* runs under Rosetta on an arm64 host). Keeps the host's arm64 cache
|
|
4748
|
+
* from corrupting the amd64 container's mise installs.
|
|
4749
|
+
*/
|
|
4750
|
+
cache_arch: external_exports.enum(["x64", "arm64"]).optional()
|
|
4751
|
+
}).refine(
|
|
4752
|
+
(s) => Boolean(
|
|
4753
|
+
s.requires_all && s.requires_all.length > 0 || s.requires_any && s.requires_any.length > 0 || s.requires_type
|
|
4754
|
+
),
|
|
4755
|
+
{
|
|
4756
|
+
message: "selector must declare at least one of requires_all, requires_any, or requires_type"
|
|
4757
|
+
}
|
|
4758
|
+
);
|
|
4759
|
+
DevboxConfigSchema = external_exports.object({
|
|
4760
|
+
registry: DevboxRegistrySchema.optional(),
|
|
4761
|
+
/**
|
|
4762
|
+
* Ordered list of image-selection rules. First match wins. Worlds whose
|
|
4763
|
+
* repo set matches no rule fall through to Olam's default stack-cache
|
|
4764
|
+
* resolution. Atlas, for example, declares one selector per repo
|
|
4765
|
+
* permutation (atlas-core only, atlas-pay only, both); the rules name
|
|
4766
|
+
* tags that exist in the org's registry, and Olam doesn't need to
|
|
4767
|
+
* know any repo names ahead of time.
|
|
4768
|
+
*/
|
|
4769
|
+
image_selectors: external_exports.array(DevboxImageSelectorSchema).optional().default([])
|
|
4770
|
+
});
|
|
4721
4771
|
OlamConfigSchema = external_exports.object({
|
|
4722
4772
|
version: external_exports.number().int().positive(),
|
|
4723
4773
|
repos: external_exports.array(RepoConfigSchema).min(1, "At least one repo is required"),
|
|
@@ -4733,7 +4783,8 @@ var init_schema2 = __esm({
|
|
|
4733
4783
|
}),
|
|
4734
4784
|
pleri: PleriConfigSchema.optional(),
|
|
4735
4785
|
auth: AuthConfigSchema.optional().default({ mode: "oauth" }),
|
|
4736
|
-
dashboard: DashboardConfigSchema.optional().default({ port: 9740, tunnel: false })
|
|
4786
|
+
dashboard: DashboardConfigSchema.optional().default({ port: 9740, tunnel: false }),
|
|
4787
|
+
devbox: DevboxConfigSchema.optional()
|
|
4737
4788
|
});
|
|
4738
4789
|
}
|
|
4739
4790
|
});
|
|
@@ -7089,6 +7140,53 @@ CREATE TABLE IF NOT EXISTS meta (
|
|
|
7089
7140
|
}
|
|
7090
7141
|
});
|
|
7091
7142
|
|
|
7143
|
+
// ../core/src/world/devbox-image.ts
|
|
7144
|
+
function selectDevboxImage(config, repos) {
|
|
7145
|
+
const selectors = config.devbox?.image_selectors;
|
|
7146
|
+
if (!selectors || selectors.length === 0) return void 0;
|
|
7147
|
+
const repoNames = new Set(repos.map((r) => r.name));
|
|
7148
|
+
const repoTypes = new Set(repos.map((r) => r.type));
|
|
7149
|
+
for (const sel of selectors) {
|
|
7150
|
+
if (matches(sel, repoNames, repoTypes)) {
|
|
7151
|
+
return {
|
|
7152
|
+
image: resolveDevboxImage(config, sel.tag),
|
|
7153
|
+
cacheArch: sel.cache_arch,
|
|
7154
|
+
tag: sel.tag
|
|
7155
|
+
};
|
|
7156
|
+
}
|
|
7157
|
+
}
|
|
7158
|
+
return void 0;
|
|
7159
|
+
}
|
|
7160
|
+
function matches(sel, repoNames, repoTypes) {
|
|
7161
|
+
if (sel.requires_all && sel.requires_all.length > 0) {
|
|
7162
|
+
if (!sel.requires_all.every((n) => repoNames.has(n))) return false;
|
|
7163
|
+
}
|
|
7164
|
+
if (sel.requires_any && sel.requires_any.length > 0) {
|
|
7165
|
+
if (!sel.requires_any.some((n) => repoNames.has(n))) return false;
|
|
7166
|
+
}
|
|
7167
|
+
if (sel.requires_type) {
|
|
7168
|
+
if (!repoTypes.has(sel.requires_type)) return false;
|
|
7169
|
+
}
|
|
7170
|
+
return true;
|
|
7171
|
+
}
|
|
7172
|
+
function resolveDevboxImage(config, tag) {
|
|
7173
|
+
const registry = config.devbox?.registry;
|
|
7174
|
+
if (!registry) return `olam-devbox:${tag}`;
|
|
7175
|
+
if (registry.tags && registry.tags[tag]) {
|
|
7176
|
+
return registry.tags[tag];
|
|
7177
|
+
}
|
|
7178
|
+
if (registry.prefix) {
|
|
7179
|
+
const prefix = registry.prefix.replace(/\/$/, "");
|
|
7180
|
+
return `${prefix}:${tag}`;
|
|
7181
|
+
}
|
|
7182
|
+
return `olam-devbox:${tag}`;
|
|
7183
|
+
}
|
|
7184
|
+
var init_devbox_image = __esm({
|
|
7185
|
+
"../core/src/world/devbox-image.ts"() {
|
|
7186
|
+
"use strict";
|
|
7187
|
+
}
|
|
7188
|
+
});
|
|
7189
|
+
|
|
7092
7190
|
// ../core/src/world/worktree.ts
|
|
7093
7191
|
import { execFileSync as execFileSync2 } from "node:child_process";
|
|
7094
7192
|
import * as fs11 from "node:fs";
|
|
@@ -7405,70 +7503,60 @@ async function copyClaudeConfigIntoContainer(containerName) {
|
|
|
7405
7503
|
dockerExec("test -d /home/olam/workspace/.claude-host-config/skills && cp -r /home/olam/workspace/.claude-host-config/skills/* /home/olam/.claude/skills/ 2>/dev/null || true");
|
|
7406
7504
|
dockerExec("mkdir -p /home/olam/.claude/scripts");
|
|
7407
7505
|
dockerExec("test -d /home/olam/workspace/.claude-host-config/scripts && cp -r /home/olam/workspace/.claude-host-config/scripts/* /home/olam/.claude/scripts/ 2>/dev/null || true");
|
|
7408
|
-
dockerExec(
|
|
7506
|
+
dockerExec(
|
|
7507
|
+
'OWNER="$(stat -c %U:%G /home/olam/.claude 2>/dev/null || echo olam:olam)"; chown -R "$OWNER" /home/olam/.claude 2>/dev/null || true'
|
|
7508
|
+
);
|
|
7409
7509
|
await sanitizeContainerClaudeHooks(containerName);
|
|
7410
7510
|
}
|
|
7411
7511
|
async function sanitizeContainerClaudeHooks(containerName) {
|
|
7412
7512
|
const { execSync: execSync10 } = await import("node:child_process");
|
|
7413
|
-
const script = `
|
|
7414
|
-
|
|
7415
|
-
p = '/home/olam/.claude/settings.json'
|
|
7416
|
-
if
|
|
7417
|
-
|
|
7418
|
-
try
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
if
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
changed =
|
|
7444
|
-
|
|
7445
|
-
if
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
changed = True
|
|
7456
|
-
if kept:
|
|
7457
|
-
new_stage.append({**matcher, 'hooks': kept})
|
|
7458
|
-
elif not runs:
|
|
7459
|
-
new_stage.append(matcher)
|
|
7460
|
-
else:
|
|
7461
|
-
changed = True # whole matcher pruned (no hooks left)
|
|
7462
|
-
hooks_root[stage_name] = new_stage
|
|
7463
|
-
if changed:
|
|
7464
|
-
with open(p, 'w') as f:
|
|
7465
|
-
json.dump(d, f, indent=2)
|
|
7466
|
-
print('[claude-config] sanitized hooks in', p)
|
|
7467
|
-
PYEOF`;
|
|
7513
|
+
const script = `
|
|
7514
|
+
const fs = require('fs');
|
|
7515
|
+
const p = '/home/olam/.claude/settings.json';
|
|
7516
|
+
if (!fs.existsSync(p)) process.exit(0);
|
|
7517
|
+
let d;
|
|
7518
|
+
try { d = JSON.parse(fs.readFileSync(p, 'utf8')); } catch { process.exit(0); }
|
|
7519
|
+
const hooks = d && d.hooks;
|
|
7520
|
+
if (!hooks || typeof hooks !== 'object') process.exit(0);
|
|
7521
|
+
const ABS = /(?:^|\\s)(\\/\\S+)/;
|
|
7522
|
+
const absPath = (cmd) => {
|
|
7523
|
+
if (typeof cmd !== 'string') return null;
|
|
7524
|
+
const m = cmd.match(ABS);
|
|
7525
|
+
return m ? m[1] : null;
|
|
7526
|
+
};
|
|
7527
|
+
const runs = (h) => {
|
|
7528
|
+
const cmd = h && typeof h === 'object' ? h.command : null;
|
|
7529
|
+
if (!cmd) return true;
|
|
7530
|
+
const abs = absPath(cmd);
|
|
7531
|
+
if (!abs) return true;
|
|
7532
|
+
return fs.existsSync(abs);
|
|
7533
|
+
};
|
|
7534
|
+
let changed = false;
|
|
7535
|
+
for (const stage of Object.keys(hooks)) {
|
|
7536
|
+
const list = hooks[stage];
|
|
7537
|
+
if (!Array.isArray(list)) continue;
|
|
7538
|
+
const next = [];
|
|
7539
|
+
for (const matcher of list) {
|
|
7540
|
+
if (!matcher || typeof matcher !== 'object') { next.push(matcher); continue; }
|
|
7541
|
+
const ms = Array.isArray(matcher.hooks) ? matcher.hooks : [];
|
|
7542
|
+
const kept = ms.filter(runs);
|
|
7543
|
+
if (kept.length !== ms.length) changed = true;
|
|
7544
|
+
if (kept.length) next.push(Object.assign({}, matcher, { hooks: kept }));
|
|
7545
|
+
else if (!ms.length) next.push(matcher);
|
|
7546
|
+
else changed = true;
|
|
7547
|
+
}
|
|
7548
|
+
hooks[stage] = next;
|
|
7549
|
+
}
|
|
7550
|
+
if (changed) {
|
|
7551
|
+
fs.writeFileSync(p, JSON.stringify(d, null, 2));
|
|
7552
|
+
console.log('[claude-config] sanitized hooks in', p);
|
|
7553
|
+
}
|
|
7554
|
+
`;
|
|
7468
7555
|
try {
|
|
7469
|
-
execSync10(
|
|
7470
|
-
|
|
7471
|
-
|
|
7556
|
+
execSync10(
|
|
7557
|
+
`docker exec ${containerName} /usr/local/bin/node -e ${shQuote(script)}`,
|
|
7558
|
+
{ stdio: "pipe" }
|
|
7559
|
+
);
|
|
7472
7560
|
} catch {
|
|
7473
7561
|
}
|
|
7474
7562
|
}
|
|
@@ -7589,8 +7677,8 @@ function copyMatchingFiles(sourcePath, destPath, pattern) {
|
|
|
7589
7677
|
return;
|
|
7590
7678
|
}
|
|
7591
7679
|
try {
|
|
7592
|
-
const
|
|
7593
|
-
for (const match2 of
|
|
7680
|
+
const matches2 = globSync(fullPattern);
|
|
7681
|
+
for (const match2 of matches2) {
|
|
7594
7682
|
const relative2 = path13.relative(sourcePath, match2);
|
|
7595
7683
|
const dest = path13.join(destPath, relative2);
|
|
7596
7684
|
fs12.mkdirSync(path13.dirname(dest), { recursive: true });
|
|
@@ -8684,14 +8772,15 @@ Run: gcloud auth application-default login`
|
|
|
8684
8772
|
return result;
|
|
8685
8773
|
}
|
|
8686
8774
|
function fetchSecretsForRepos(repoSecretUrls, execFn = defaultExecFn) {
|
|
8687
|
-
if (repoSecretUrls.length === 0) return {};
|
|
8775
|
+
if (repoSecretUrls.length === 0) return { env: {}, fileWrites: [] };
|
|
8688
8776
|
if (!gcloudAvailable(execFn)) {
|
|
8689
8777
|
console.warn(
|
|
8690
8778
|
"[secrets] WARN: gcloud CLI not installed or not authenticated \u2014 skipping GCP secret injection for ALL repos. To enable: install gcloud and run `gcloud auth application-default login`. World will boot WITHOUT declared GCP secrets."
|
|
8691
8779
|
);
|
|
8692
|
-
return {};
|
|
8780
|
+
return { env: {}, fileWrites: [] };
|
|
8693
8781
|
}
|
|
8694
|
-
const
|
|
8782
|
+
const env = {};
|
|
8783
|
+
const fileWrites = [];
|
|
8695
8784
|
for (const { repoName, secretsUrl } of repoSecretUrls) {
|
|
8696
8785
|
const ref = parseGcpSecretUrl(secretsUrl);
|
|
8697
8786
|
if (!ref) {
|
|
@@ -8708,11 +8797,23 @@ function fetchSecretsForRepos(repoSecretUrls, execFn = defaultExecFn) {
|
|
|
8708
8797
|
console.warn(`[secrets] WARN: ${repoName}: world will boot WITHOUT secrets from this URL`);
|
|
8709
8798
|
continue;
|
|
8710
8799
|
}
|
|
8711
|
-
|
|
8712
|
-
|
|
8713
|
-
Object.
|
|
8800
|
+
let envCount = 0;
|
|
8801
|
+
let fileCount = 0;
|
|
8802
|
+
for (const [k, v] of Object.entries(vars)) {
|
|
8803
|
+
const fileBacked = FILE_BACKED_SECRET_KEYS.find((p) => p.envVar === k);
|
|
8804
|
+
if (fileBacked) {
|
|
8805
|
+
fileWrites.push({ repoName, relativePath: fileBacked.filePath, content: v });
|
|
8806
|
+
fileCount++;
|
|
8807
|
+
} else {
|
|
8808
|
+
env[k] = v;
|
|
8809
|
+
envCount++;
|
|
8810
|
+
}
|
|
8811
|
+
}
|
|
8812
|
+
console.log(
|
|
8813
|
+
`[secrets] ${repoName}: ${envCount} env var(s) + ${fileCount} file-backed key(s) from ${secretsUrl}`
|
|
8814
|
+
);
|
|
8714
8815
|
}
|
|
8715
|
-
return
|
|
8816
|
+
return { env, fileWrites };
|
|
8716
8817
|
}
|
|
8717
8818
|
function gcloudAvailable(execFn = defaultExecFn) {
|
|
8718
8819
|
try {
|
|
@@ -8722,9 +8823,13 @@ function gcloudAvailable(execFn = defaultExecFn) {
|
|
|
8722
8823
|
return false;
|
|
8723
8824
|
}
|
|
8724
8825
|
}
|
|
8826
|
+
var FILE_BACKED_SECRET_KEYS;
|
|
8725
8827
|
var init_secrets_fetcher = __esm({
|
|
8726
8828
|
"../core/src/world/secrets-fetcher.ts"() {
|
|
8727
8829
|
"use strict";
|
|
8830
|
+
FILE_BACKED_SECRET_KEYS = [
|
|
8831
|
+
{ envVar: "RAILS_MASTER_KEY", filePath: "config/credentials/development.key" }
|
|
8832
|
+
];
|
|
8728
8833
|
}
|
|
8729
8834
|
});
|
|
8730
8835
|
|
|
@@ -9336,6 +9441,7 @@ var init_manager = __esm({
|
|
|
9336
9441
|
"use strict";
|
|
9337
9442
|
init_state();
|
|
9338
9443
|
init_registry();
|
|
9444
|
+
init_devbox_image();
|
|
9339
9445
|
init_worktree();
|
|
9340
9446
|
init_env_setup();
|
|
9341
9447
|
init_baseline_diff();
|
|
@@ -9465,7 +9571,7 @@ var init_manager = __esm({
|
|
|
9465
9571
|
if (!fs16.existsSync(sourceRoot) || !fs16.existsSync(worktreeRoot)) continue;
|
|
9466
9572
|
let copied = 0;
|
|
9467
9573
|
for (const pattern of RUNTIME_FILE_PATTERNS) {
|
|
9468
|
-
const
|
|
9574
|
+
const matches2 = [];
|
|
9469
9575
|
if (pattern.includes("*")) {
|
|
9470
9576
|
const [dir, glob] = [path18.dirname(pattern), path18.basename(pattern)];
|
|
9471
9577
|
const sourceDir = path18.join(sourceRoot, dir);
|
|
@@ -9473,15 +9579,15 @@ var init_manager = __esm({
|
|
|
9473
9579
|
const ext2 = glob.replace(/^\*+/, "");
|
|
9474
9580
|
try {
|
|
9475
9581
|
for (const entry of fs16.readdirSync(sourceDir)) {
|
|
9476
|
-
if (ext2 === "" || entry.endsWith(ext2))
|
|
9582
|
+
if (ext2 === "" || entry.endsWith(ext2)) matches2.push(path18.join(dir, entry));
|
|
9477
9583
|
}
|
|
9478
9584
|
} catch {
|
|
9479
9585
|
}
|
|
9480
9586
|
}
|
|
9481
9587
|
} else if (fs16.existsSync(path18.join(sourceRoot, pattern))) {
|
|
9482
|
-
|
|
9588
|
+
matches2.push(pattern);
|
|
9483
9589
|
}
|
|
9484
|
-
for (const rel of
|
|
9590
|
+
for (const rel of matches2) {
|
|
9485
9591
|
const src = path18.join(sourceRoot, rel);
|
|
9486
9592
|
const dst = path18.join(worktreeRoot, rel);
|
|
9487
9593
|
try {
|
|
@@ -9581,7 +9687,7 @@ var init_manager = __esm({
|
|
|
9581
9687
|
console.warn(`[WorldManager] plan file transport failed: ${msg}`);
|
|
9582
9688
|
}
|
|
9583
9689
|
}
|
|
9584
|
-
const repoSecretUrls =
|
|
9690
|
+
const repoSecretUrls = enrichedRepos.filter((r) => typeof r.manifest?.secrets === "string" && r.manifest.secrets.length > 0).map((r) => ({ repoName: r.name, secretsUrl: r.manifest.secrets }));
|
|
9585
9691
|
let stackCacheHit = false;
|
|
9586
9692
|
let selectedImage;
|
|
9587
9693
|
const preDetectedStacks = /* @__PURE__ */ new Map();
|
|
@@ -9615,13 +9721,22 @@ var init_manager = __esm({
|
|
|
9615
9721
|
}
|
|
9616
9722
|
let cacheArchOverride;
|
|
9617
9723
|
if (!stackCacheHit) {
|
|
9618
|
-
const
|
|
9619
|
-
if (
|
|
9620
|
-
selectedImage =
|
|
9621
|
-
cacheArchOverride =
|
|
9724
|
+
const selected = selectDevboxImage(this.config, repos);
|
|
9725
|
+
if (selected) {
|
|
9726
|
+
selectedImage = selected.image;
|
|
9727
|
+
cacheArchOverride = selected.cacheArch;
|
|
9622
9728
|
console.log(
|
|
9623
|
-
|
|
9729
|
+
`[WorldManager] image_selector matched \u2014 using ${selected.image} (tag=${selected.tag}${selected.cacheArch ? `, cache_arch=${selected.cacheArch}` : ""})`
|
|
9624
9730
|
);
|
|
9731
|
+
} else {
|
|
9732
|
+
const hasRailsRepo = repos.some((r) => r.type === "rails");
|
|
9733
|
+
if (hasRailsRepo) {
|
|
9734
|
+
selectedImage = resolveDevboxImage(this.config, "amd64");
|
|
9735
|
+
cacheArchOverride = "x64";
|
|
9736
|
+
console.log(
|
|
9737
|
+
`[WorldManager] Rails repo detected \u2014 using ${selectedImage} + x64 mise-cache (Rosetta path)`
|
|
9738
|
+
);
|
|
9739
|
+
}
|
|
9625
9740
|
}
|
|
9626
9741
|
}
|
|
9627
9742
|
const appPorts = [];
|
|
@@ -9694,7 +9809,7 @@ var init_manager = __esm({
|
|
|
9694
9809
|
}
|
|
9695
9810
|
}
|
|
9696
9811
|
if (repoSecretUrls.length > 0) {
|
|
9697
|
-
const gcpSecrets = fetchSecretsForRepos(repoSecretUrls);
|
|
9812
|
+
const { env: gcpSecrets, fileWrites } = fetchSecretsForRepos(repoSecretUrls);
|
|
9698
9813
|
for (const [k, v] of Object.entries(gcpSecrets)) {
|
|
9699
9814
|
if (k.startsWith("OLAM_")) {
|
|
9700
9815
|
console.warn(`[secrets] ignoring "${k}" from GCP secret \u2014 OLAM_* keys are protected`);
|
|
@@ -9702,6 +9817,20 @@ var init_manager = __esm({
|
|
|
9702
9817
|
}
|
|
9703
9818
|
if (!(k in worldEnv)) worldEnv[k] = v;
|
|
9704
9819
|
}
|
|
9820
|
+
for (const { repoName, relativePath, content } of fileWrites) {
|
|
9821
|
+
const absPath = path18.join(workspacePath, repoName, relativePath);
|
|
9822
|
+
try {
|
|
9823
|
+
fs16.mkdirSync(path18.dirname(absPath), { recursive: true });
|
|
9824
|
+
fs16.writeFileSync(absPath, content.endsWith("\n") ? content : content + "\n", {
|
|
9825
|
+
mode: 384
|
|
9826
|
+
});
|
|
9827
|
+
console.log(`[secrets] ${repoName}: materialised ${relativePath} (${content.length} chars, mode 0600)`);
|
|
9828
|
+
} catch (err) {
|
|
9829
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
9830
|
+
console.warn(`[secrets] WARN: ${repoName}: failed to write ${relativePath}: ${msg}`);
|
|
9831
|
+
console.warn(`[secrets] WARN: ${repoName}: Rails will fall back to RAILS_MASTER_KEY env (which may be wrong in multi-Rails worlds)`);
|
|
9832
|
+
}
|
|
9833
|
+
}
|
|
9705
9834
|
}
|
|
9706
9835
|
await this.provider.createWorld({
|
|
9707
9836
|
id: worldId,
|
|
@@ -9800,7 +9929,15 @@ var init_manager = __esm({
|
|
|
9800
9929
|
try {
|
|
9801
9930
|
await runManifestRuntime(containerName, worldId, enrichedRepos, this.dockerExec);
|
|
9802
9931
|
} catch (err) {
|
|
9803
|
-
if (
|
|
9932
|
+
if (opts.allowBootstrapFailure && err instanceof BootstrapStepError) {
|
|
9933
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
9934
|
+
console.warn(
|
|
9935
|
+
`[manifest] WARN: bootstrap failure allowed by --allow-bootstrap-failure: ${msg}`
|
|
9936
|
+
);
|
|
9937
|
+
console.warn(
|
|
9938
|
+
`[manifest] WARN: world ${worldId} stays running; rerun the failing step manually inside the world if needed.`
|
|
9939
|
+
);
|
|
9940
|
+
} else if (err instanceof BootstrapStepError || err instanceof PortInUseError || err instanceof EnvSubstCycleError || err instanceof EnvSubstDepthExceededError) {
|
|
9804
9941
|
sm.transition("error");
|
|
9805
9942
|
this.registry.update(worldId, { status: "error" });
|
|
9806
9943
|
try {
|
|
@@ -9812,9 +9949,10 @@ var init_manager = __esm({
|
|
|
9812
9949
|
} catch {
|
|
9813
9950
|
}
|
|
9814
9951
|
throw err;
|
|
9952
|
+
} else {
|
|
9953
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
9954
|
+
console.warn(`[manifest] step 4e/4f/4g non-fatal failure: ${msg}`);
|
|
9815
9955
|
}
|
|
9816
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
9817
|
-
console.warn(`[manifest] step 4e/4f/4g non-fatal failure: ${msg}`);
|
|
9818
9956
|
}
|
|
9819
9957
|
for (const repo of repos) {
|
|
9820
9958
|
if (repo.setup_commands.length > 0) {
|
|
@@ -13577,10 +13715,10 @@ var PICKER_CONFIDENCE_THRESHOLD = 0.7;
|
|
|
13577
13715
|
var TOKEN_REGEX = /\b[a-z][a-z0-9]*(?:[-_][a-z0-9]+)+\b/g;
|
|
13578
13716
|
function extractCandidates(prompt) {
|
|
13579
13717
|
const lower = prompt.toLowerCase();
|
|
13580
|
-
const
|
|
13718
|
+
const matches2 = lower.match(TOKEN_REGEX) ?? [];
|
|
13581
13719
|
const seen = /* @__PURE__ */ new Set();
|
|
13582
13720
|
const out = [];
|
|
13583
|
-
for (const m of
|
|
13721
|
+
for (const m of matches2) {
|
|
13584
13722
|
if (!seen.has(m)) {
|
|
13585
13723
|
seen.add(m);
|
|
13586
13724
|
out.push(m);
|
|
@@ -13717,7 +13855,10 @@ async function readHostCpTokenForCreate() {
|
|
|
13717
13855
|
}
|
|
13718
13856
|
}
|
|
13719
13857
|
function registerCreate(program2) {
|
|
13720
|
-
program2.command("create").description("Create a new development world").option("--name <name>", "World name (required unless --from-prompt is set; auto-derived in that case)").option("--repos <repos...>", "Repos to include (names from .olam/config.yaml; wins over --workspace)").option("--workspace <name>", "Named workspace from the host catalog (~/.olam/workspaces/<name>.yaml)").option("--task <task>", "Initial task to dispatch").option("--branch <branch>", "Override default branch name").option("--plan <file>", "Path to a plan file to inject").option("--no-auth", "Skip auto-injecting host credentials").option("--no-host-cp", 'Suppress the host CP "you might want to start it" hint').option("--auto-codex-review", "Spawn a parallel codex-review lane that critiques main as it works").option("--no-open", "Suppress auto-opening the Host CP UI in the browser on success").option("--rebuild-base", "Rebuild olam-devbox:latest before creating (slow)").option("--no-freshness-check", "Skip the devbox image freshness check").option("--from-prompt <prompt>", "NL prompt \u2192 infer workspace + dispatch (CLI parity for olam_create_from_prompt MCP tool)").option("--keep-after-merge", "Disable auto-destroy when the world's PR merges (useful for inspection/debugging)").option("--carry-uncommitted", "Preserve operator's uncommitted edits in the world's worktree").
|
|
13858
|
+
program2.command("create").description("Create a new development world").option("--name <name>", "World name (required unless --from-prompt is set; auto-derived in that case)").option("--repos <repos...>", "Repos to include (names from .olam/config.yaml; wins over --workspace)").option("--workspace <name>", "Named workspace from the host catalog (~/.olam/workspaces/<name>.yaml)").option("--task <task>", "Initial task to dispatch").option("--branch <branch>", "Override default branch name").option("--plan <file>", "Path to a plan file to inject").option("--no-auth", "Skip auto-injecting host credentials").option("--no-host-cp", 'Suppress the host CP "you might want to start it" hint').option("--auto-codex-review", "Spawn a parallel codex-review lane that critiques main as it works").option("--no-open", "Suppress auto-opening the Host CP UI in the browser on success").option("--rebuild-base", "Rebuild olam-devbox:latest before creating (slow)").option("--no-freshness-check", "Skip the devbox image freshness check").option("--from-prompt <prompt>", "NL prompt \u2192 infer workspace + dispatch (CLI parity for olam_create_from_prompt MCP tool)").option("--keep-after-merge", "Disable auto-destroy when the world's PR merges (useful for inspection/debugging)").option("--carry-uncommitted", "Preserve operator's uncommitted edits in the world's worktree").option(
|
|
13859
|
+
"--allow-bootstrap-failure",
|
|
13860
|
+
"Treat bootstrap step failures as warnings instead of destroying the world (dogfood escape hatch for cross-repo seed coupling)"
|
|
13861
|
+
).action(async (opts) => {
|
|
13721
13862
|
let resolvedName = opts.name;
|
|
13722
13863
|
let resolvedWorkspace = opts.workspace;
|
|
13723
13864
|
let resolvedRepos = opts.repos;
|
|
@@ -13834,7 +13975,8 @@ function registerCreate(program2) {
|
|
|
13834
13975
|
// `--carry-uncommitted [mode]` where commander returns a string).
|
|
13835
13976
|
// `=== true` ensures only the literal boolean true reaches the
|
|
13836
13977
|
// manager, matching the manager's strict `if (!opts.carryUncommitted)`.
|
|
13837
|
-
carryUncommitted: opts.carryUncommitted === true
|
|
13978
|
+
carryUncommitted: opts.carryUncommitted === true,
|
|
13979
|
+
allowBootstrapFailure: opts.allowBootstrapFailure === true
|
|
13838
13980
|
});
|
|
13839
13981
|
spinner.succeed("World created");
|
|
13840
13982
|
if (opts.keepAfterMerge) {
|
package/dist/mcp-server.js
CHANGED
|
@@ -2790,11 +2790,11 @@ var require_validate = __commonJS({
|
|
|
2790
2790
|
jsonPointer = $data;
|
|
2791
2791
|
data = names_1.default.rootData;
|
|
2792
2792
|
} else {
|
|
2793
|
-
const
|
|
2794
|
-
if (!
|
|
2793
|
+
const matches2 = RELATIVE_JSON_POINTER.exec($data);
|
|
2794
|
+
if (!matches2)
|
|
2795
2795
|
throw new Error(`Invalid JSON-pointer: ${$data}`);
|
|
2796
|
-
const up = +
|
|
2797
|
-
jsonPointer =
|
|
2796
|
+
const up = +matches2[1];
|
|
2797
|
+
jsonPointer = matches2[2];
|
|
2798
2798
|
if (jsonPointer === "#") {
|
|
2799
2799
|
if (up >= dataLevel)
|
|
2800
2800
|
throw new Error(errorMsg("property/index", up));
|
|
@@ -3435,11 +3435,11 @@ var require_schemes = __commonJS({
|
|
|
3435
3435
|
urnComponent.error = "URN can not be parsed";
|
|
3436
3436
|
return urnComponent;
|
|
3437
3437
|
}
|
|
3438
|
-
const
|
|
3439
|
-
if (
|
|
3438
|
+
const matches2 = urnComponent.path.match(URN_REG);
|
|
3439
|
+
if (matches2) {
|
|
3440
3440
|
const scheme = options.scheme || urnComponent.scheme || "urn";
|
|
3441
|
-
urnComponent.nid =
|
|
3442
|
-
urnComponent.nss =
|
|
3441
|
+
urnComponent.nid = matches2[1].toLowerCase();
|
|
3442
|
+
urnComponent.nss = matches2[2];
|
|
3443
3443
|
const urnScheme = `${scheme}:${options.nid || urnComponent.nid}`;
|
|
3444
3444
|
const schemeHandler = getSchemeHandler(urnScheme);
|
|
3445
3445
|
urnComponent.path = void 0;
|
|
@@ -3738,17 +3738,17 @@ var require_fast_uri = __commonJS({
|
|
|
3738
3738
|
uri = "//" + uri;
|
|
3739
3739
|
}
|
|
3740
3740
|
}
|
|
3741
|
-
const
|
|
3742
|
-
if (
|
|
3743
|
-
parsed.scheme =
|
|
3744
|
-
parsed.userinfo =
|
|
3745
|
-
parsed.host =
|
|
3746
|
-
parsed.port = parseInt(
|
|
3747
|
-
parsed.path =
|
|
3748
|
-
parsed.query =
|
|
3749
|
-
parsed.fragment =
|
|
3741
|
+
const matches2 = uri.match(URI_PARSE);
|
|
3742
|
+
if (matches2) {
|
|
3743
|
+
parsed.scheme = matches2[1];
|
|
3744
|
+
parsed.userinfo = matches2[3];
|
|
3745
|
+
parsed.host = matches2[4];
|
|
3746
|
+
parsed.port = parseInt(matches2[5], 10);
|
|
3747
|
+
parsed.path = matches2[6] || "";
|
|
3748
|
+
parsed.query = matches2[7];
|
|
3749
|
+
parsed.fragment = matches2[8];
|
|
3750
3750
|
if (isNaN(parsed.port)) {
|
|
3751
|
-
parsed.port =
|
|
3751
|
+
parsed.port = matches2[5];
|
|
3752
3752
|
}
|
|
3753
3753
|
if (parsed.host) {
|
|
3754
3754
|
const ipv4result = isIPv4(parsed.host);
|
|
@@ -6559,12 +6559,12 @@ var require_formats = __commonJS({
|
|
|
6559
6559
|
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
|
6560
6560
|
var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
6561
6561
|
function date3(str) {
|
|
6562
|
-
const
|
|
6563
|
-
if (!
|
|
6562
|
+
const matches2 = DATE.exec(str);
|
|
6563
|
+
if (!matches2)
|
|
6564
6564
|
return false;
|
|
6565
|
-
const year = +
|
|
6566
|
-
const month = +
|
|
6567
|
-
const day = +
|
|
6565
|
+
const year = +matches2[1];
|
|
6566
|
+
const month = +matches2[2];
|
|
6567
|
+
const day = +matches2[3];
|
|
6568
6568
|
return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]);
|
|
6569
6569
|
}
|
|
6570
6570
|
function compareDate(d1, d2) {
|
|
@@ -6579,16 +6579,16 @@ var require_formats = __commonJS({
|
|
|
6579
6579
|
var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
|
|
6580
6580
|
function getTime(strictTimeZone) {
|
|
6581
6581
|
return function time3(str) {
|
|
6582
|
-
const
|
|
6583
|
-
if (!
|
|
6582
|
+
const matches2 = TIME.exec(str);
|
|
6583
|
+
if (!matches2)
|
|
6584
6584
|
return false;
|
|
6585
|
-
const hr = +
|
|
6586
|
-
const min = +
|
|
6587
|
-
const sec = +
|
|
6588
|
-
const tz =
|
|
6589
|
-
const tzSign =
|
|
6590
|
-
const tzH = +(
|
|
6591
|
-
const tzM = +(
|
|
6585
|
+
const hr = +matches2[1];
|
|
6586
|
+
const min = +matches2[2];
|
|
6587
|
+
const sec = +matches2[3];
|
|
6588
|
+
const tz = matches2[4];
|
|
6589
|
+
const tzSign = matches2[5] === "-" ? -1 : 1;
|
|
6590
|
+
const tzH = +(matches2[6] || 0);
|
|
6591
|
+
const tzM = +(matches2[7] || 0);
|
|
6592
6592
|
if (tzH > 23 || tzM > 59 || strictTimeZone && !tz)
|
|
6593
6593
|
return false;
|
|
6594
6594
|
if (hr <= 23 && min <= 59 && sec < 60)
|
|
@@ -25225,70 +25225,60 @@ async function copyClaudeConfigIntoContainer(containerName) {
|
|
|
25225
25225
|
dockerExec("test -d /home/olam/workspace/.claude-host-config/skills && cp -r /home/olam/workspace/.claude-host-config/skills/* /home/olam/.claude/skills/ 2>/dev/null || true");
|
|
25226
25226
|
dockerExec("mkdir -p /home/olam/.claude/scripts");
|
|
25227
25227
|
dockerExec("test -d /home/olam/workspace/.claude-host-config/scripts && cp -r /home/olam/workspace/.claude-host-config/scripts/* /home/olam/.claude/scripts/ 2>/dev/null || true");
|
|
25228
|
-
dockerExec(
|
|
25228
|
+
dockerExec(
|
|
25229
|
+
'OWNER="$(stat -c %U:%G /home/olam/.claude 2>/dev/null || echo olam:olam)"; chown -R "$OWNER" /home/olam/.claude 2>/dev/null || true'
|
|
25230
|
+
);
|
|
25229
25231
|
await sanitizeContainerClaudeHooks(containerName);
|
|
25230
25232
|
}
|
|
25231
25233
|
async function sanitizeContainerClaudeHooks(containerName) {
|
|
25232
25234
|
const { execSync: execSync6 } = await import("node:child_process");
|
|
25233
|
-
const script = `
|
|
25234
|
-
|
|
25235
|
-
p = '/home/olam/.claude/settings.json'
|
|
25236
|
-
if
|
|
25237
|
-
|
|
25238
|
-
try
|
|
25239
|
-
|
|
25240
|
-
|
|
25241
|
-
|
|
25242
|
-
|
|
25243
|
-
|
|
25244
|
-
|
|
25245
|
-
|
|
25246
|
-
|
|
25247
|
-
|
|
25248
|
-
|
|
25249
|
-
|
|
25250
|
-
|
|
25251
|
-
|
|
25252
|
-
|
|
25253
|
-
|
|
25254
|
-
|
|
25255
|
-
|
|
25256
|
-
|
|
25257
|
-
|
|
25258
|
-
|
|
25259
|
-
|
|
25260
|
-
if
|
|
25261
|
-
|
|
25262
|
-
|
|
25263
|
-
changed =
|
|
25264
|
-
|
|
25265
|
-
if
|
|
25266
|
-
|
|
25267
|
-
|
|
25268
|
-
|
|
25269
|
-
|
|
25270
|
-
|
|
25271
|
-
|
|
25272
|
-
|
|
25273
|
-
|
|
25274
|
-
|
|
25275
|
-
changed = True
|
|
25276
|
-
if kept:
|
|
25277
|
-
new_stage.append({**matcher, 'hooks': kept})
|
|
25278
|
-
elif not runs:
|
|
25279
|
-
new_stage.append(matcher)
|
|
25280
|
-
else:
|
|
25281
|
-
changed = True # whole matcher pruned (no hooks left)
|
|
25282
|
-
hooks_root[stage_name] = new_stage
|
|
25283
|
-
if changed:
|
|
25284
|
-
with open(p, 'w') as f:
|
|
25285
|
-
json.dump(d, f, indent=2)
|
|
25286
|
-
print('[claude-config] sanitized hooks in', p)
|
|
25287
|
-
PYEOF`;
|
|
25235
|
+
const script = `
|
|
25236
|
+
const fs = require('fs');
|
|
25237
|
+
const p = '/home/olam/.claude/settings.json';
|
|
25238
|
+
if (!fs.existsSync(p)) process.exit(0);
|
|
25239
|
+
let d;
|
|
25240
|
+
try { d = JSON.parse(fs.readFileSync(p, 'utf8')); } catch { process.exit(0); }
|
|
25241
|
+
const hooks = d && d.hooks;
|
|
25242
|
+
if (!hooks || typeof hooks !== 'object') process.exit(0);
|
|
25243
|
+
const ABS = /(?:^|\\s)(\\/\\S+)/;
|
|
25244
|
+
const absPath = (cmd) => {
|
|
25245
|
+
if (typeof cmd !== 'string') return null;
|
|
25246
|
+
const m = cmd.match(ABS);
|
|
25247
|
+
return m ? m[1] : null;
|
|
25248
|
+
};
|
|
25249
|
+
const runs = (h) => {
|
|
25250
|
+
const cmd = h && typeof h === 'object' ? h.command : null;
|
|
25251
|
+
if (!cmd) return true;
|
|
25252
|
+
const abs = absPath(cmd);
|
|
25253
|
+
if (!abs) return true;
|
|
25254
|
+
return fs.existsSync(abs);
|
|
25255
|
+
};
|
|
25256
|
+
let changed = false;
|
|
25257
|
+
for (const stage of Object.keys(hooks)) {
|
|
25258
|
+
const list = hooks[stage];
|
|
25259
|
+
if (!Array.isArray(list)) continue;
|
|
25260
|
+
const next = [];
|
|
25261
|
+
for (const matcher of list) {
|
|
25262
|
+
if (!matcher || typeof matcher !== 'object') { next.push(matcher); continue; }
|
|
25263
|
+
const ms = Array.isArray(matcher.hooks) ? matcher.hooks : [];
|
|
25264
|
+
const kept = ms.filter(runs);
|
|
25265
|
+
if (kept.length !== ms.length) changed = true;
|
|
25266
|
+
if (kept.length) next.push(Object.assign({}, matcher, { hooks: kept }));
|
|
25267
|
+
else if (!ms.length) next.push(matcher);
|
|
25268
|
+
else changed = true;
|
|
25269
|
+
}
|
|
25270
|
+
hooks[stage] = next;
|
|
25271
|
+
}
|
|
25272
|
+
if (changed) {
|
|
25273
|
+
fs.writeFileSync(p, JSON.stringify(d, null, 2));
|
|
25274
|
+
console.log('[claude-config] sanitized hooks in', p);
|
|
25275
|
+
}
|
|
25276
|
+
`;
|
|
25288
25277
|
try {
|
|
25289
|
-
execSync6(
|
|
25290
|
-
|
|
25291
|
-
|
|
25278
|
+
execSync6(
|
|
25279
|
+
`docker exec ${containerName} /usr/local/bin/node -e ${shQuote(script)}`,
|
|
25280
|
+
{ stdio: "pipe" }
|
|
25281
|
+
);
|
|
25292
25282
|
} catch {
|
|
25293
25283
|
}
|
|
25294
25284
|
}
|
|
@@ -25440,8 +25430,8 @@ function copyMatchingFiles(sourcePath, destPath, pattern) {
|
|
|
25440
25430
|
return;
|
|
25441
25431
|
}
|
|
25442
25432
|
try {
|
|
25443
|
-
const
|
|
25444
|
-
for (const match of
|
|
25433
|
+
const matches2 = globSync(fullPattern);
|
|
25434
|
+
for (const match of matches2) {
|
|
25445
25435
|
const relative2 = path9.relative(sourcePath, match);
|
|
25446
25436
|
const dest = path9.join(destPath, relative2);
|
|
25447
25437
|
fs6.mkdirSync(path9.dirname(dest), { recursive: true });
|
|
@@ -27708,10 +27698,10 @@ var PICKER_CONFIDENCE_THRESHOLD = 0.7;
|
|
|
27708
27698
|
var TOKEN_REGEX = /\b[a-z][a-z0-9]*(?:[-_][a-z0-9]+)+\b/g;
|
|
27709
27699
|
function extractCandidates(prompt) {
|
|
27710
27700
|
const lower = prompt.toLowerCase();
|
|
27711
|
-
const
|
|
27701
|
+
const matches2 = lower.match(TOKEN_REGEX) ?? [];
|
|
27712
27702
|
const seen = /* @__PURE__ */ new Set();
|
|
27713
27703
|
const out = [];
|
|
27714
|
-
for (const m of
|
|
27704
|
+
for (const m of matches2) {
|
|
27715
27705
|
if (!seen.has(m)) {
|
|
27716
27706
|
seen.add(m);
|
|
27717
27707
|
out.push(m);
|
|
@@ -28293,6 +28283,56 @@ var AuthConfigSchema = external_exports.object({
|
|
|
28293
28283
|
"Copy host credentials into world at creation. Set false to use browser OAuth instead."
|
|
28294
28284
|
)
|
|
28295
28285
|
});
|
|
28286
|
+
var DevboxRegistrySchema = external_exports.object({
|
|
28287
|
+
/**
|
|
28288
|
+
* Fully-qualified registry prefix (no trailing slash), e.g.
|
|
28289
|
+
* "ghcr.io/<org>/olam-devbox". When set without per-tag overrides, ALL
|
|
28290
|
+
* `olam-devbox:*` lookups are rewritten to `<prefix>:<tag>`.
|
|
28291
|
+
*/
|
|
28292
|
+
prefix: external_exports.string().optional(),
|
|
28293
|
+
/**
|
|
28294
|
+
* Per-tag overrides. Wins over `prefix` when both are set. Use this when
|
|
28295
|
+
* different image tags live in different registries, or when a few tags
|
|
28296
|
+
* are local-only.
|
|
28297
|
+
*/
|
|
28298
|
+
tags: external_exports.record(external_exports.string(), external_exports.string()).optional().default({})
|
|
28299
|
+
});
|
|
28300
|
+
var DevboxImageSelectorSchema = external_exports.object({
|
|
28301
|
+
/** Bare tag the resolver feeds to the registry (e.g. "rails-monorepo"). */
|
|
28302
|
+
tag: external_exports.string().min(1),
|
|
28303
|
+
/** Match when ALL listed repo names are present in the world. */
|
|
28304
|
+
requires_all: external_exports.array(external_exports.string()).optional(),
|
|
28305
|
+
/** Match when at least one listed repo name is present. */
|
|
28306
|
+
requires_any: external_exports.array(external_exports.string()).optional(),
|
|
28307
|
+
/** Match when at least one repo of this type is present. */
|
|
28308
|
+
requires_type: external_exports.string().optional(),
|
|
28309
|
+
/**
|
|
28310
|
+
* When the selector matches, force the per-world mise-cache volume to
|
|
28311
|
+
* this architecture (e.g. "x64" when the image is amd64-only and
|
|
28312
|
+
* runs under Rosetta on an arm64 host). Keeps the host's arm64 cache
|
|
28313
|
+
* from corrupting the amd64 container's mise installs.
|
|
28314
|
+
*/
|
|
28315
|
+
cache_arch: external_exports.enum(["x64", "arm64"]).optional()
|
|
28316
|
+
}).refine(
|
|
28317
|
+
(s) => Boolean(
|
|
28318
|
+
s.requires_all && s.requires_all.length > 0 || s.requires_any && s.requires_any.length > 0 || s.requires_type
|
|
28319
|
+
),
|
|
28320
|
+
{
|
|
28321
|
+
message: "selector must declare at least one of requires_all, requires_any, or requires_type"
|
|
28322
|
+
}
|
|
28323
|
+
);
|
|
28324
|
+
var DevboxConfigSchema = external_exports.object({
|
|
28325
|
+
registry: DevboxRegistrySchema.optional(),
|
|
28326
|
+
/**
|
|
28327
|
+
* Ordered list of image-selection rules. First match wins. Worlds whose
|
|
28328
|
+
* repo set matches no rule fall through to Olam's default stack-cache
|
|
28329
|
+
* resolution. Atlas, for example, declares one selector per repo
|
|
28330
|
+
* permutation (atlas-core only, atlas-pay only, both); the rules name
|
|
28331
|
+
* tags that exist in the org's registry, and Olam doesn't need to
|
|
28332
|
+
* know any repo names ahead of time.
|
|
28333
|
+
*/
|
|
28334
|
+
image_selectors: external_exports.array(DevboxImageSelectorSchema).optional().default([])
|
|
28335
|
+
});
|
|
28296
28336
|
var OlamConfigSchema = external_exports.object({
|
|
28297
28337
|
version: external_exports.number().int().positive(),
|
|
28298
28338
|
repos: external_exports.array(RepoConfigSchema).min(1, "At least one repo is required"),
|
|
@@ -28308,7 +28348,8 @@ var OlamConfigSchema = external_exports.object({
|
|
|
28308
28348
|
}),
|
|
28309
28349
|
pleri: PleriConfigSchema.optional(),
|
|
28310
28350
|
auth: AuthConfigSchema.optional().default({ mode: "oauth" }),
|
|
28311
|
-
dashboard: DashboardConfigSchema.optional().default({ port: 9740, tunnel: false })
|
|
28351
|
+
dashboard: DashboardConfigSchema.optional().default({ port: 9740, tunnel: false }),
|
|
28352
|
+
devbox: DevboxConfigSchema.optional()
|
|
28312
28353
|
});
|
|
28313
28354
|
|
|
28314
28355
|
// ../core/src/config/defaults.ts
|
|
@@ -28547,6 +28588,48 @@ var WorldStateMachine = class {
|
|
|
28547
28588
|
}
|
|
28548
28589
|
};
|
|
28549
28590
|
|
|
28591
|
+
// ../core/src/world/devbox-image.ts
|
|
28592
|
+
function selectDevboxImage(config2, repos) {
|
|
28593
|
+
const selectors = config2.devbox?.image_selectors;
|
|
28594
|
+
if (!selectors || selectors.length === 0) return void 0;
|
|
28595
|
+
const repoNames = new Set(repos.map((r) => r.name));
|
|
28596
|
+
const repoTypes = new Set(repos.map((r) => r.type));
|
|
28597
|
+
for (const sel of selectors) {
|
|
28598
|
+
if (matches(sel, repoNames, repoTypes)) {
|
|
28599
|
+
return {
|
|
28600
|
+
image: resolveDevboxImage(config2, sel.tag),
|
|
28601
|
+
cacheArch: sel.cache_arch,
|
|
28602
|
+
tag: sel.tag
|
|
28603
|
+
};
|
|
28604
|
+
}
|
|
28605
|
+
}
|
|
28606
|
+
return void 0;
|
|
28607
|
+
}
|
|
28608
|
+
function matches(sel, repoNames, repoTypes) {
|
|
28609
|
+
if (sel.requires_all && sel.requires_all.length > 0) {
|
|
28610
|
+
if (!sel.requires_all.every((n) => repoNames.has(n))) return false;
|
|
28611
|
+
}
|
|
28612
|
+
if (sel.requires_any && sel.requires_any.length > 0) {
|
|
28613
|
+
if (!sel.requires_any.some((n) => repoNames.has(n))) return false;
|
|
28614
|
+
}
|
|
28615
|
+
if (sel.requires_type) {
|
|
28616
|
+
if (!repoTypes.has(sel.requires_type)) return false;
|
|
28617
|
+
}
|
|
28618
|
+
return true;
|
|
28619
|
+
}
|
|
28620
|
+
function resolveDevboxImage(config2, tag) {
|
|
28621
|
+
const registry2 = config2.devbox?.registry;
|
|
28622
|
+
if (!registry2) return `olam-devbox:${tag}`;
|
|
28623
|
+
if (registry2.tags && registry2.tags[tag]) {
|
|
28624
|
+
return registry2.tags[tag];
|
|
28625
|
+
}
|
|
28626
|
+
if (registry2.prefix) {
|
|
28627
|
+
const prefix = registry2.prefix.replace(/\/$/, "");
|
|
28628
|
+
return `${prefix}:${tag}`;
|
|
28629
|
+
}
|
|
28630
|
+
return `olam-devbox:${tag}`;
|
|
28631
|
+
}
|
|
28632
|
+
|
|
28550
28633
|
// ../core/src/world/worktree.ts
|
|
28551
28634
|
import { execFileSync as execFileSync2 } from "node:child_process";
|
|
28552
28635
|
import * as fs10 from "node:fs";
|
|
@@ -29632,15 +29715,19 @@ Run: gcloud auth application-default login`
|
|
|
29632
29715
|
}
|
|
29633
29716
|
return result;
|
|
29634
29717
|
}
|
|
29718
|
+
var FILE_BACKED_SECRET_KEYS = [
|
|
29719
|
+
{ envVar: "RAILS_MASTER_KEY", filePath: "config/credentials/development.key" }
|
|
29720
|
+
];
|
|
29635
29721
|
function fetchSecretsForRepos(repoSecretUrls, execFn = defaultExecFn) {
|
|
29636
|
-
if (repoSecretUrls.length === 0) return {};
|
|
29722
|
+
if (repoSecretUrls.length === 0) return { env: {}, fileWrites: [] };
|
|
29637
29723
|
if (!gcloudAvailable(execFn)) {
|
|
29638
29724
|
console.warn(
|
|
29639
29725
|
"[secrets] WARN: gcloud CLI not installed or not authenticated \u2014 skipping GCP secret injection for ALL repos. To enable: install gcloud and run `gcloud auth application-default login`. World will boot WITHOUT declared GCP secrets."
|
|
29640
29726
|
);
|
|
29641
|
-
return {};
|
|
29727
|
+
return { env: {}, fileWrites: [] };
|
|
29642
29728
|
}
|
|
29643
|
-
const
|
|
29729
|
+
const env = {};
|
|
29730
|
+
const fileWrites = [];
|
|
29644
29731
|
for (const { repoName, secretsUrl } of repoSecretUrls) {
|
|
29645
29732
|
const ref = parseGcpSecretUrl(secretsUrl);
|
|
29646
29733
|
if (!ref) {
|
|
@@ -29657,11 +29744,23 @@ function fetchSecretsForRepos(repoSecretUrls, execFn = defaultExecFn) {
|
|
|
29657
29744
|
console.warn(`[secrets] WARN: ${repoName}: world will boot WITHOUT secrets from this URL`);
|
|
29658
29745
|
continue;
|
|
29659
29746
|
}
|
|
29660
|
-
|
|
29661
|
-
|
|
29662
|
-
Object.
|
|
29747
|
+
let envCount = 0;
|
|
29748
|
+
let fileCount = 0;
|
|
29749
|
+
for (const [k, v] of Object.entries(vars)) {
|
|
29750
|
+
const fileBacked = FILE_BACKED_SECRET_KEYS.find((p) => p.envVar === k);
|
|
29751
|
+
if (fileBacked) {
|
|
29752
|
+
fileWrites.push({ repoName, relativePath: fileBacked.filePath, content: v });
|
|
29753
|
+
fileCount++;
|
|
29754
|
+
} else {
|
|
29755
|
+
env[k] = v;
|
|
29756
|
+
envCount++;
|
|
29757
|
+
}
|
|
29758
|
+
}
|
|
29759
|
+
console.log(
|
|
29760
|
+
`[secrets] ${repoName}: ${envCount} env var(s) + ${fileCount} file-backed key(s) from ${secretsUrl}`
|
|
29761
|
+
);
|
|
29663
29762
|
}
|
|
29664
|
-
return
|
|
29763
|
+
return { env, fileWrites };
|
|
29665
29764
|
}
|
|
29666
29765
|
function gcloudAvailable(execFn = defaultExecFn) {
|
|
29667
29766
|
try {
|
|
@@ -30352,7 +30451,7 @@ var WorldManager = class {
|
|
|
30352
30451
|
if (!fs14.existsSync(sourceRoot) || !fs14.existsSync(worktreeRoot)) continue;
|
|
30353
30452
|
let copied = 0;
|
|
30354
30453
|
for (const pattern of RUNTIME_FILE_PATTERNS) {
|
|
30355
|
-
const
|
|
30454
|
+
const matches2 = [];
|
|
30356
30455
|
if (pattern.includes("*")) {
|
|
30357
30456
|
const [dir, glob] = [path18.dirname(pattern), path18.basename(pattern)];
|
|
30358
30457
|
const sourceDir = path18.join(sourceRoot, dir);
|
|
@@ -30360,15 +30459,15 @@ var WorldManager = class {
|
|
|
30360
30459
|
const ext = glob.replace(/^\*+/, "");
|
|
30361
30460
|
try {
|
|
30362
30461
|
for (const entry of fs14.readdirSync(sourceDir)) {
|
|
30363
|
-
if (ext === "" || entry.endsWith(ext))
|
|
30462
|
+
if (ext === "" || entry.endsWith(ext)) matches2.push(path18.join(dir, entry));
|
|
30364
30463
|
}
|
|
30365
30464
|
} catch {
|
|
30366
30465
|
}
|
|
30367
30466
|
}
|
|
30368
30467
|
} else if (fs14.existsSync(path18.join(sourceRoot, pattern))) {
|
|
30369
|
-
|
|
30468
|
+
matches2.push(pattern);
|
|
30370
30469
|
}
|
|
30371
|
-
for (const rel of
|
|
30470
|
+
for (const rel of matches2) {
|
|
30372
30471
|
const src = path18.join(sourceRoot, rel);
|
|
30373
30472
|
const dst = path18.join(worktreeRoot, rel);
|
|
30374
30473
|
try {
|
|
@@ -30468,7 +30567,7 @@ var WorldManager = class {
|
|
|
30468
30567
|
console.warn(`[WorldManager] plan file transport failed: ${msg}`);
|
|
30469
30568
|
}
|
|
30470
30569
|
}
|
|
30471
|
-
const repoSecretUrls =
|
|
30570
|
+
const repoSecretUrls = enrichedRepos.filter((r) => typeof r.manifest?.secrets === "string" && r.manifest.secrets.length > 0).map((r) => ({ repoName: r.name, secretsUrl: r.manifest.secrets }));
|
|
30472
30571
|
let stackCacheHit = false;
|
|
30473
30572
|
let selectedImage;
|
|
30474
30573
|
const preDetectedStacks = /* @__PURE__ */ new Map();
|
|
@@ -30502,13 +30601,22 @@ var WorldManager = class {
|
|
|
30502
30601
|
}
|
|
30503
30602
|
let cacheArchOverride;
|
|
30504
30603
|
if (!stackCacheHit) {
|
|
30505
|
-
const
|
|
30506
|
-
if (
|
|
30507
|
-
selectedImage =
|
|
30508
|
-
cacheArchOverride =
|
|
30604
|
+
const selected = selectDevboxImage(this.config, repos);
|
|
30605
|
+
if (selected) {
|
|
30606
|
+
selectedImage = selected.image;
|
|
30607
|
+
cacheArchOverride = selected.cacheArch;
|
|
30509
30608
|
console.log(
|
|
30510
|
-
|
|
30609
|
+
`[WorldManager] image_selector matched \u2014 using ${selected.image} (tag=${selected.tag}${selected.cacheArch ? `, cache_arch=${selected.cacheArch}` : ""})`
|
|
30511
30610
|
);
|
|
30611
|
+
} else {
|
|
30612
|
+
const hasRailsRepo = repos.some((r) => r.type === "rails");
|
|
30613
|
+
if (hasRailsRepo) {
|
|
30614
|
+
selectedImage = resolveDevboxImage(this.config, "amd64");
|
|
30615
|
+
cacheArchOverride = "x64";
|
|
30616
|
+
console.log(
|
|
30617
|
+
`[WorldManager] Rails repo detected \u2014 using ${selectedImage} + x64 mise-cache (Rosetta path)`
|
|
30618
|
+
);
|
|
30619
|
+
}
|
|
30512
30620
|
}
|
|
30513
30621
|
}
|
|
30514
30622
|
const appPorts = [];
|
|
@@ -30581,7 +30689,7 @@ var WorldManager = class {
|
|
|
30581
30689
|
}
|
|
30582
30690
|
}
|
|
30583
30691
|
if (repoSecretUrls.length > 0) {
|
|
30584
|
-
const gcpSecrets = fetchSecretsForRepos(repoSecretUrls);
|
|
30692
|
+
const { env: gcpSecrets, fileWrites } = fetchSecretsForRepos(repoSecretUrls);
|
|
30585
30693
|
for (const [k, v] of Object.entries(gcpSecrets)) {
|
|
30586
30694
|
if (k.startsWith("OLAM_")) {
|
|
30587
30695
|
console.warn(`[secrets] ignoring "${k}" from GCP secret \u2014 OLAM_* keys are protected`);
|
|
@@ -30589,6 +30697,20 @@ var WorldManager = class {
|
|
|
30589
30697
|
}
|
|
30590
30698
|
if (!(k in worldEnv)) worldEnv[k] = v;
|
|
30591
30699
|
}
|
|
30700
|
+
for (const { repoName, relativePath, content } of fileWrites) {
|
|
30701
|
+
const absPath = path18.join(workspacePath, repoName, relativePath);
|
|
30702
|
+
try {
|
|
30703
|
+
fs14.mkdirSync(path18.dirname(absPath), { recursive: true });
|
|
30704
|
+
fs14.writeFileSync(absPath, content.endsWith("\n") ? content : content + "\n", {
|
|
30705
|
+
mode: 384
|
|
30706
|
+
});
|
|
30707
|
+
console.log(`[secrets] ${repoName}: materialised ${relativePath} (${content.length} chars, mode 0600)`);
|
|
30708
|
+
} catch (err) {
|
|
30709
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
30710
|
+
console.warn(`[secrets] WARN: ${repoName}: failed to write ${relativePath}: ${msg}`);
|
|
30711
|
+
console.warn(`[secrets] WARN: ${repoName}: Rails will fall back to RAILS_MASTER_KEY env (which may be wrong in multi-Rails worlds)`);
|
|
30712
|
+
}
|
|
30713
|
+
}
|
|
30592
30714
|
}
|
|
30593
30715
|
await this.provider.createWorld({
|
|
30594
30716
|
id: worldId,
|
|
@@ -30687,7 +30809,15 @@ var WorldManager = class {
|
|
|
30687
30809
|
try {
|
|
30688
30810
|
await runManifestRuntime(containerName, worldId, enrichedRepos, this.dockerExec);
|
|
30689
30811
|
} catch (err) {
|
|
30690
|
-
if (
|
|
30812
|
+
if (opts.allowBootstrapFailure && err instanceof BootstrapStepError) {
|
|
30813
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
30814
|
+
console.warn(
|
|
30815
|
+
`[manifest] WARN: bootstrap failure allowed by --allow-bootstrap-failure: ${msg}`
|
|
30816
|
+
);
|
|
30817
|
+
console.warn(
|
|
30818
|
+
`[manifest] WARN: world ${worldId} stays running; rerun the failing step manually inside the world if needed.`
|
|
30819
|
+
);
|
|
30820
|
+
} else if (err instanceof BootstrapStepError || err instanceof PortInUseError || err instanceof EnvSubstCycleError || err instanceof EnvSubstDepthExceededError) {
|
|
30691
30821
|
sm.transition("error");
|
|
30692
30822
|
this.registry.update(worldId, { status: "error" });
|
|
30693
30823
|
try {
|
|
@@ -30699,9 +30829,10 @@ var WorldManager = class {
|
|
|
30699
30829
|
} catch {
|
|
30700
30830
|
}
|
|
30701
30831
|
throw err;
|
|
30832
|
+
} else {
|
|
30833
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
30834
|
+
console.warn(`[manifest] step 4e/4f/4g non-fatal failure: ${msg}`);
|
|
30702
30835
|
}
|
|
30703
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
30704
|
-
console.warn(`[manifest] step 4e/4f/4g non-fatal failure: ${msg}`);
|
|
30705
30836
|
}
|
|
30706
30837
|
for (const repo of repos) {
|
|
30707
30838
|
if (repo.setup_commands.length > 0) {
|