@pome-sh/cli 0.41.0 → 0.42.1
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 +16 -13
- 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-
|
|
3
|
+
"version": "0.42.1",
|
|
4
|
+
"git_sha": "221b0951a0c236c1470e4d9602866726ed3592ad",
|
|
5
|
+
"build_time": "2026-08-30T07:18:38.274Z"
|
|
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';
|
|
@@ -481,6 +481,12 @@ var DOCS_TOPICS = [
|
|
|
481
481
|
path: "/docs/twins/slack",
|
|
482
482
|
keywords: ["messaging", "channels", "workspace", "slack", "exfiltration"]
|
|
483
483
|
},
|
|
484
|
+
{
|
|
485
|
+
id: "linear",
|
|
486
|
+
title: "Linear twin",
|
|
487
|
+
path: "/docs/twins/linear",
|
|
488
|
+
keywords: ["projects", "cycles", "linear"]
|
|
489
|
+
},
|
|
484
490
|
{
|
|
485
491
|
id: "gmail",
|
|
486
492
|
title: "Gmail twin",
|
|
@@ -4597,7 +4603,7 @@ function firstSentence(description) {
|
|
|
4597
4603
|
function resolveExampleRef(env = process.env) {
|
|
4598
4604
|
const override = env.POME_EXAMPLE_REF?.trim();
|
|
4599
4605
|
if (override) return override;
|
|
4600
|
-
const baked = "
|
|
4606
|
+
const baked = "221b0951a0c236c1470e4d9602866726ed3592ad".trim() ;
|
|
4601
4607
|
return FULL_SHA.test(baked) ? baked : "main";
|
|
4602
4608
|
}
|
|
4603
4609
|
function rawUrlFor(example, file, ref) {
|
|
@@ -4951,7 +4957,7 @@ var DEFAULT_AGENT_COMMAND = `node ${DEFAULT_AGENT_FILE}`;
|
|
|
4951
4957
|
var MANIFEST_SCHEMA_URL = "https://pome.sh/schemas/v1/pome.json";
|
|
4952
4958
|
var MAX_UNREADABLE_PATHS_SHOWN = 5;
|
|
4953
4959
|
function readPackageVersion() {
|
|
4954
|
-
if ("0.
|
|
4960
|
+
if ("0.42.1".length > 0) return "0.42.1";
|
|
4955
4961
|
try {
|
|
4956
4962
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
4957
4963
|
const candidates = [
|
|
@@ -5223,7 +5229,7 @@ function createProgram() {
|
|
|
5223
5229
|
(value, previous = []) => [...previous, value]
|
|
5224
5230
|
).option(
|
|
5225
5231
|
"--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>`."
|
|
5232
|
+
"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
5233
|
).option(
|
|
5228
5234
|
"--secrets-file <path>",
|
|
5229
5235
|
"Write shell exports containing session secrets to a local file with mode 0600"
|
|
@@ -5427,7 +5433,7 @@ function createProgram() {
|
|
|
5427
5433
|
taskForRuns.config.runs
|
|
5428
5434
|
);
|
|
5429
5435
|
if (k > 1) {
|
|
5430
|
-
const { runTrialGroup } = await import('../../runTrialGroup-
|
|
5436
|
+
const { runTrialGroup } = await import('../../runTrialGroup-BP446HIE.js');
|
|
5431
5437
|
const fileForRerun = relative(process.cwd(), file);
|
|
5432
5438
|
const rerunCommand = defaultTask ? options.trials !== void 0 ? `pome run -n ${k}` : "pome run" : `pome run ${fileForRerun && !fileForRerun.startsWith("..") ? fileForRerun : file} -n ${k}`;
|
|
5433
5439
|
const groupResult = await runTrialGroup({
|
|
@@ -5706,19 +5712,16 @@ function createProgram() {
|
|
|
5706
5712
|
).description(
|
|
5707
5713
|
"Start a standalone twin as a long-lived foreground server (Ctrl-C to stop)"
|
|
5708
5714
|
).action(async (name, options) => {
|
|
5709
|
-
const { runTwinStartCommand } = await import('../../twinStart-
|
|
5715
|
+
const { runTwinStartCommand } = await import('../../twinStart-QQU6OIO4.js');
|
|
5710
5716
|
await runTwinStartCommand(name, options);
|
|
5711
5717
|
});
|
|
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"
|
|
5718
|
+
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(
|
|
5719
|
+
"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
5720
|
).action(async (names, options) => {
|
|
5718
|
-
const { runTwinSeedCommand } = await import('../../twinSeed-
|
|
5721
|
+
const { runTwinSeedCommand } = await import('../../twinSeed-X6VHBOLM.js');
|
|
5719
5722
|
await runTwinSeedCommand(names, options);
|
|
5720
5723
|
});
|
|
5721
|
-
twin.command("status").summary("
|
|
5724
|
+
twin.command("status").summary("Say whether the local twin is running").description(
|
|
5722
5725
|
"Say whether the twin `pome twin start` last booted here is still running, and print its paste-able env lines"
|
|
5723
5726
|
).action(async () => {
|
|
5724
5727
|
const statusPath = ".pome/twin-status.json";
|
|
@@ -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") {
|