@pome-sh/cli 0.41.0 → 0.42.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/dist/build-info.json +3 -3
- package/dist/{chunk-KD6OUKCT.js → chunk-46POYRLY.js} +9 -2
- package/dist/{runTrialGroup-OGTLUB2X.js → runTrialGroup-BP446HIE.js} +1 -1
- package/dist/src/cli/main.js +9 -12
- package/dist/{twinSeed-7M4GOIBS.js → twinSeed-X6VHBOLM.js} +11 -6
- package/dist/{twinStart-N6HTOARC.js → twinStart-QQU6OIO4.js} +1 -1
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "pome-sh",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"git_sha": "
|
|
5
|
-
"build_time": "2026-08-30T06:
|
|
3
|
+
"version": "0.42.0",
|
|
4
|
+
"git_sha": "88bf8097cb93566a7b23eeddec28e4440325cf91",
|
|
5
|
+
"build_time": "2026-08-30T06:50:07.914Z"
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createHostedClient, perTwinReturnedByCloud, parseTaskFile, runAgentCommand, writeRunArtifactsCore, toTwinHttpEvent, redactJsonl, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, evaluationCounts } from './chunk-STMGQ7GU.js';
|
|
2
|
-
import { readSeedFileText, parseSeedFileText, soleTwinOf, seedsForTwins } from './chunk-VPXIGCZW.js';
|
|
2
|
+
import { readSeedFileText, parseSeedFileText, soleTwinOf, twinsNamedBy, seedsForTwins } from './chunk-VPXIGCZW.js';
|
|
3
3
|
import { readManifest, normalizeManifestTwins } from './chunk-DFOQGAKS.js';
|
|
4
4
|
import { MOUNTED_TWINS, HostedAuthError, HostedDiscardRefusedError, HostedQuotaError, HostedOrchError, HostedTrialError, agentResponseSchema, isMultiTwinSeedEnvelope } from './chunk-NNXVR46L.js';
|
|
5
5
|
import { redactSecrets, redactEvent } from './chunk-SG6ZTIMT.js';
|
|
@@ -677,8 +677,15 @@ async function resolveSessionSeed(seedPath, requestedTwins) {
|
|
|
677
677
|
const raw = readSeedFileText(seedPath, "pome sandbox create --seed");
|
|
678
678
|
const origin = `--seed ${seedPath}`;
|
|
679
679
|
const file = parseSeedFileText(raw, origin);
|
|
680
|
+
const sole = soleTwinOf(file);
|
|
681
|
+
if (requestedTwins.length === 0 && sole === void 0) {
|
|
682
|
+
const named = twinsNamedBy(file);
|
|
683
|
+
throw new Error(
|
|
684
|
+
named.length === 0 ? `${origin} is a flat seed, so it does not name a twin. Pass the name: pome sandbox create --twin <${SESSION_TWIN_NAMES.join("|")}> --seed ${seedPath}` : `${origin} names ${named.length} twins (${named.join(", ")}), so it does not say which the sandbox is for. Pass the name: ${named.map((twin) => `--twin ${twin}`).join(" ")} --seed ${seedPath}`
|
|
685
|
+
);
|
|
686
|
+
}
|
|
680
687
|
const twins = normalizeSessionTwins(
|
|
681
|
-
requestedTwins.length > 0 ? requestedTwins : [
|
|
688
|
+
requestedTwins.length > 0 ? requestedTwins : [sole]
|
|
682
689
|
);
|
|
683
690
|
const byTwin = await seedsForTwins(file, twins, origin);
|
|
684
691
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { newGroupId } from './chunk-JNXZBK3O.js';
|
|
2
|
-
import { runTaskHosted, resolveRunAgentIdentity } from './chunk-
|
|
2
|
+
import { runTaskHosted, resolveRunAgentIdentity } from './chunk-46POYRLY.js';
|
|
3
3
|
import { createHostedClient, parseTaskFile, outcomeOf, isNarrated, criterionPhrase, narratorReadingLines } from './chunk-STMGQ7GU.js';
|
|
4
4
|
import './chunk-VPXIGCZW.js';
|
|
5
5
|
import './chunk-NW7HGA2K.js';
|
package/dist/src/cli/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { DEFAULT_CONTROL_PLANE_URL, DEFAULT_DASHBOARD_URL, clearLocalCredentials, friendlyHostedError, SESSION_TWIN_NAMES, runSessionCreate, runSessionList, runSessionStop, resolveCredentials, runTaskHosted, discoverRunSet, persistCredentialsAfterLogin, DEFAULT_DOCS_SITE_ORIGIN, resolveSeams, resolveCachedAgentId, readLinkCache, postAgentResolver, writeLinkCache, ensurePomeGitignored } from '../../chunk-
|
|
2
|
+
import { DEFAULT_CONTROL_PLANE_URL, DEFAULT_DASHBOARD_URL, clearLocalCredentials, friendlyHostedError, SESSION_TWIN_NAMES, runSessionCreate, runSessionList, runSessionStop, resolveCredentials, runTaskHosted, discoverRunSet, persistCredentialsAfterLogin, DEFAULT_DOCS_SITE_ORIGIN, resolveSeams, resolveCachedAgentId, readLinkCache, postAgentResolver, writeLinkCache, ensurePomeGitignored } from '../../chunk-46POYRLY.js';
|
|
3
3
|
import { assetPath, runTask, resolvePackageRoot, DEMO_TASK_NAME, demoTaskPath } from '../../chunk-WERG4AUH.js';
|
|
4
4
|
import { parseTaskFile, scoreStatus, runScoreLine, narratorReadingLines, readLatestRun, readMetaSummary, outcomeOf, readConfigTwins, scoreCountsSummary, criterionRowLine, readCodeCriteria, createHostedClient, redactJsonl, scoreFromFinalizeResponse, parseGitHubSeedState, uploadRunBlobs, isPreSatisfied } from '../../chunk-STMGQ7GU.js';
|
|
5
5
|
import '../../chunk-VPXIGCZW.js';
|
|
@@ -4597,7 +4597,7 @@ function firstSentence(description) {
|
|
|
4597
4597
|
function resolveExampleRef(env = process.env) {
|
|
4598
4598
|
const override = env.POME_EXAMPLE_REF?.trim();
|
|
4599
4599
|
if (override) return override;
|
|
4600
|
-
const baked = "
|
|
4600
|
+
const baked = "88bf8097cb93566a7b23eeddec28e4440325cf91".trim() ;
|
|
4601
4601
|
return FULL_SHA.test(baked) ? baked : "main";
|
|
4602
4602
|
}
|
|
4603
4603
|
function rawUrlFor(example, file, ref) {
|
|
@@ -4951,7 +4951,7 @@ var DEFAULT_AGENT_COMMAND = `node ${DEFAULT_AGENT_FILE}`;
|
|
|
4951
4951
|
var MANIFEST_SCHEMA_URL = "https://pome.sh/schemas/v1/pome.json";
|
|
4952
4952
|
var MAX_UNREADABLE_PATHS_SHOWN = 5;
|
|
4953
4953
|
function readPackageVersion() {
|
|
4954
|
-
if ("0.
|
|
4954
|
+
if ("0.42.0".length > 0) return "0.42.0";
|
|
4955
4955
|
try {
|
|
4956
4956
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
4957
4957
|
const candidates = [
|
|
@@ -5223,7 +5223,7 @@ function createProgram() {
|
|
|
5223
5223
|
(value, previous = []) => [...previous, value]
|
|
5224
5224
|
).option(
|
|
5225
5225
|
"--seed <path>",
|
|
5226
|
-
"Start the sandbox from a JSON or YAML seed file instead of each twin's default. A seed REPLACES the default; it does not merge. Same file `pome twin start --seed` takes; write one with `pome twin seed <name>`."
|
|
5226
|
+
"Start the sandbox from a JSON or YAML seed file instead of each twin's default. A seed REPLACES the default; it does not merge. Same file `pome twin start --seed` takes; write one with `pome twin new-seed <name>`."
|
|
5227
5227
|
).option(
|
|
5228
5228
|
"--secrets-file <path>",
|
|
5229
5229
|
"Write shell exports containing session secrets to a local file with mode 0600"
|
|
@@ -5427,7 +5427,7 @@ function createProgram() {
|
|
|
5427
5427
|
taskForRuns.config.runs
|
|
5428
5428
|
);
|
|
5429
5429
|
if (k > 1) {
|
|
5430
|
-
const { runTrialGroup } = await import('../../runTrialGroup-
|
|
5430
|
+
const { runTrialGroup } = await import('../../runTrialGroup-BP446HIE.js');
|
|
5431
5431
|
const fileForRerun = relative(process.cwd(), file);
|
|
5432
5432
|
const rerunCommand = defaultTask ? options.trials !== void 0 ? `pome run -n ${k}` : "pome run" : `pome run ${fileForRerun && !fileForRerun.startsWith("..") ? fileForRerun : file} -n ${k}`;
|
|
5433
5433
|
const groupResult = await runTrialGroup({
|
|
@@ -5706,16 +5706,13 @@ function createProgram() {
|
|
|
5706
5706
|
).description(
|
|
5707
5707
|
"Start a standalone twin as a long-lived foreground server (Ctrl-C to stop)"
|
|
5708
5708
|
).action(async (name, options) => {
|
|
5709
|
-
const { runTwinStartCommand } = await import('../../twinStart-
|
|
5709
|
+
const { runTwinStartCommand } = await import('../../twinStart-QQU6OIO4.js');
|
|
5710
5710
|
await runTwinStartCommand(name, options);
|
|
5711
5711
|
});
|
|
5712
|
-
twin.command("seed").argument("<name...>", `Twin name (${TWIN_NAME_LIST.join(" | ")}). Repeat for one file covering several.`).option("--out <path>", "Write to this file instead of stdout. Refuses to overwrite.").
|
|
5713
|
-
"
|
|
5714
|
-
"Emit the shape a `<task>.seed.json` sidecar takes \u2014 flat for one twin, the per-twin envelope for more, the rule the task's `## Config` twins already set. Without it you get a seed file for `--seed`, which is always the envelope."
|
|
5715
|
-
).description(
|
|
5716
|
-
"Print a starter seed file for a twin, generated from the twin's own starting state"
|
|
5712
|
+
twin.command("new-seed").argument("<name...>", `Twin name (${TWIN_NAME_LIST.join(" | ")}). Repeat for one file covering several.`).option("--out <path>", "Write to this file instead of stdout. Refuses to overwrite.").summary("Print a new starter seed file for a twin").description(
|
|
5713
|
+
"Print a new starter seed file for a twin, generated from the twin's own starting state. One twin is flat, several are the per-twin envelope. Boot it with `twin start <twin> --seed`, seed a sandbox with `sandbox create --twin <twin> --seed`, or drop it beside a task as <task>.seed.json"
|
|
5717
5714
|
).action(async (names, options) => {
|
|
5718
|
-
const { runTwinSeedCommand } = await import('../../twinSeed-
|
|
5715
|
+
const { runTwinSeedCommand } = await import('../../twinSeed-X6VHBOLM.js');
|
|
5719
5716
|
await runTwinSeedCommand(names, options);
|
|
5720
5717
|
});
|
|
5721
5718
|
twin.command("status").summary("Print the local twin's status").description(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TWIN_NAMES, isTwinName, TWIN_REGISTRY } from './chunk-RPPF2KDQ.js';
|
|
2
2
|
import { writeFile } from 'node:fs/promises';
|
|
3
3
|
|
|
4
|
-
async function generateSeedFile(twins
|
|
4
|
+
async function generateSeedFile(twins) {
|
|
5
5
|
if (twins.length === 0) {
|
|
6
6
|
throw new Error(`No twin specified. Pass at least one of: ${TWIN_NAMES.join(", ")}.`);
|
|
7
7
|
}
|
|
@@ -19,7 +19,7 @@ async function generateSeedFile(twins, opts = {}) {
|
|
|
19
19
|
const entry = TWIN_REGISTRY[twin];
|
|
20
20
|
envelope[twin] = await entry.parseSeed(await entry.defaultSeed());
|
|
21
21
|
}
|
|
22
|
-
const body =
|
|
22
|
+
const body = twins.length === 1 ? envelope[twins[0]] : envelope;
|
|
23
23
|
return `${JSON.stringify(body, null, 2)}
|
|
24
24
|
`;
|
|
25
25
|
}
|
|
@@ -36,16 +36,21 @@ async function writeSeedFile(path, text) {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
async function runTwinSeedCommand(names, options = {}) {
|
|
39
|
-
const text = await generateSeedFile(names
|
|
39
|
+
const text = await generateSeedFile(names);
|
|
40
40
|
if (options.out === void 0) {
|
|
41
41
|
process.stdout.write(text);
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
await writeSeedFile(options.out, text);
|
|
45
|
-
|
|
46
|
-
console.error(`Wrote ${options.out} \u2014 the ${names.join(" + ")} ${what}.`);
|
|
45
|
+
console.error(`Wrote ${options.out} \u2014 the ${names.join(" + ")} starting seed.`);
|
|
47
46
|
console.error(
|
|
48
|
-
|
|
47
|
+
`Boot ${names.length === 1 ? "it" : "one"} locally: pome twin start ${names[0]} --seed ${options.out}`
|
|
48
|
+
);
|
|
49
|
+
console.error(
|
|
50
|
+
`Hosted: pome sandbox create ${names.map((twin) => `--twin ${twin}`).join(" ")} --seed ${options.out}`
|
|
51
|
+
);
|
|
52
|
+
console.error(
|
|
53
|
+
names.length === 1 ? `As a task seed: drop it beside a ${names[0]} task as <task>.seed.json.` : `As a task seed: drop it beside a task whose \`## Config\` reads twins: [${names.join(", ")}], named <task>.seed.json.`
|
|
49
54
|
);
|
|
50
55
|
}
|
|
51
56
|
|
|
@@ -152,7 +152,7 @@ async function runTwinStartCommand(nameArg, options) {
|
|
|
152
152
|
);
|
|
153
153
|
} else {
|
|
154
154
|
console.log(
|
|
155
|
-
`Seed: the ${name} twin's default (pass --seed <path>, or write one with \`pome twin seed ${name}\`).`
|
|
155
|
+
`Seed: the ${name} twin's default (pass --seed <path>, or write one with \`pome twin new-seed ${name}\`).`
|
|
156
156
|
);
|
|
157
157
|
}
|
|
158
158
|
if (resolved.source === "persisted") {
|