@pome-sh/cli 0.40.0 → 0.41.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "pome-sh",
3
- "version": "0.40.0",
4
- "git_sha": "18ff79b115d837fa3081e5925664bd24f5843c8c",
5
- "build_time": "2026-08-30T05:50:34.377Z"
3
+ "version": "0.41.0",
4
+ "git_sha": "ea56e5f03b661023c9cea61aca95323fa0a9eada",
5
+ "build_time": "2026-08-30T06:26:23.470Z"
6
6
  }
@@ -1,4 +1,4 @@
1
- import { createHostedClient, perTwinReturnedByCloud, parseTaskFile, runAgentCommand, writeRunArtifactsCore, toTwinHttpEvent, redactJsonl, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, evaluationCounts } from './chunk-BS47AE55.js';
1
+ import { createHostedClient, perTwinReturnedByCloud, parseTaskFile, runAgentCommand, writeRunArtifactsCore, toTwinHttpEvent, redactJsonl, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, evaluationCounts } from './chunk-STMGQ7GU.js';
2
2
  import { readSeedFileText, parseSeedFileText, soleTwinOf, 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';
@@ -73,9 +73,10 @@ async function writeVerdictArtifact(runDir, verdict) {
73
73
  throw err;
74
74
  }
75
75
  }
76
- function looksLikeVerdictArtifactBase(parsed) {
76
+ function isVerdictArtifact(parsed) {
77
77
  if (typeof parsed !== "object" || parsed === null) return false;
78
78
  const v = parsed;
79
+ if (v.version !== VERDICT_ARTIFACT_VERSION) return false;
79
80
  if (v.source !== "cloud-finalize") return false;
80
81
  if (typeof v.session_id !== "string") return false;
81
82
  if (typeof v.task_name !== "string") return false;
@@ -84,6 +85,11 @@ function looksLikeVerdictArtifactBase(parsed) {
84
85
  if (typeof v.finalized_at !== "string") return false;
85
86
  if (typeof v.passed !== "boolean") return false;
86
87
  if (typeof v.score !== "number") return false;
88
+ if (typeof v.state !== "string" || !VALID_STATES.has(v.state)) return false;
89
+ if (typeof v.evaluated !== "number") return false;
90
+ if (typeof v.not_evaluated !== "number") return false;
91
+ if (typeof v.pre_satisfied !== "number") return false;
92
+ if (typeof v.total !== "number") return false;
87
93
  if (!Array.isArray(v.criteria_results)) return false;
88
94
  return v.criteria_results.every((r) => {
89
95
  if (typeof r !== "object" || r === null) return false;
@@ -92,18 +98,6 @@ function looksLikeVerdictArtifactBase(parsed) {
92
98
  return typeof criterion === "object" && criterion !== null && typeof criterion.text === "string" && typeof result.reason === "string" && typeof result.passed === "boolean" && typeof result.skipped === "boolean";
93
99
  });
94
100
  }
95
- function isVerdictArtifact(parsed) {
96
- if (!looksLikeVerdictArtifactBase(parsed)) return false;
97
- const v = parsed;
98
- if (v.version !== VERDICT_ARTIFACT_VERSION) return false;
99
- if (typeof v.task_path !== "string") return false;
100
- if (typeof v.state !== "string" || !VALID_STATES.has(v.state)) return false;
101
- if (typeof v.evaluated !== "number") return false;
102
- if (typeof v.not_evaluated !== "number") return false;
103
- if (typeof v.pre_satisfied !== "number") return false;
104
- if (typeof v.total !== "number") return false;
105
- return true;
106
- }
107
101
  var MISSING_ERROR_CODES = /* @__PURE__ */ new Set([
108
102
  "ENOENT",
109
103
  "ENOTDIR",
@@ -128,21 +122,17 @@ async function readVerdictArtifactDetailed(runDir) {
128
122
  } catch {
129
123
  return { status: "unreadable" };
130
124
  }
131
- if (!looksLikeVerdictArtifactBase(parsed)) return { status: "unreadable" };
132
- const version = typeof parsed.version === "number" ? parsed.version : null;
133
- if (version !== VERDICT_ARTIFACT_VERSION) return { status: "stale-version", version };
134
125
  if (!isVerdictArtifact(parsed)) return { status: "unreadable" };
135
126
  return { status: "ok", trial: { runDir, verdict: parsed } };
136
127
  }
137
128
  async function scanVerdictArtifactsDetailed(artifactsRoot) {
138
129
  const trials = [];
139
- const staleVersionDirs = [];
140
130
  const unreadableDirs = [];
141
131
  let slugs;
142
132
  try {
143
133
  slugs = await readdir(artifactsRoot);
144
134
  } catch {
145
- return { trials, staleVersionDirs, unreadableDirs };
135
+ return { trials, unreadableDirs };
146
136
  }
147
137
  for (const slug of slugs) {
148
138
  const slugDir = join(artifactsRoot, slug);
@@ -156,33 +146,20 @@ async function scanVerdictArtifactsDetailed(artifactsRoot) {
156
146
  const runDir = join(slugDir, runId);
157
147
  const result = await readVerdictArtifactDetailed(runDir);
158
148
  if (result.status === "ok") trials.push(result.trial);
159
- else if (result.status === "stale-version") staleVersionDirs.push(runDir);
160
149
  else if (result.status === "unreadable") unreadableDirs.push(runDir);
161
150
  }
162
151
  }
163
152
  unreadableDirs.sort();
164
- return { trials, staleVersionDirs, unreadableDirs };
153
+ return { trials, unreadableDirs };
165
154
  }
166
155
  async function discoverRunSet(target) {
167
156
  const anchorResult = await readVerdictArtifactDetailed(target);
168
- if (anchorResult.status === "stale-version") {
169
- return {
170
- kind: "trial-dir",
171
- set: null,
172
- incompleteSet: null,
173
- totalSets: 0,
174
- staleVersionCount: 1,
175
- unreadableCount: 0,
176
- unreadablePaths: []
177
- };
178
- }
179
157
  if (anchorResult.status === "unreadable") {
180
158
  return {
181
159
  kind: "trial-dir",
182
160
  set: null,
183
161
  incompleteSet: null,
184
162
  totalSets: 0,
185
- staleVersionCount: 0,
186
163
  unreadableCount: 1,
187
164
  unreadablePaths: [target]
188
165
  };
@@ -190,7 +167,7 @@ async function discoverRunSet(target) {
190
167
  if (anchorResult.status === "ok") {
191
168
  const anchor = anchorResult.trial;
192
169
  const root = join(target, "..", "..");
193
- const { trials: trials2, staleVersionDirs: staleVersionDirs2, unreadableDirs: unreadableDirs2 } = await scanVerdictArtifactsDetailed(root);
170
+ const { trials: trials2, unreadableDirs: unreadableDirs2 } = await scanVerdictArtifactsDetailed(root);
194
171
  const sets2 = groupRunSets(trials2);
195
172
  const own = sets2.find(
196
173
  (s) => anchor.verdict.group_id !== null && s.groupId === anchor.verdict.group_id || anchor.verdict.group_id === null && s.trials.length === 1 && s.trials[0].verdict.session_id === anchor.verdict.session_id
@@ -200,12 +177,11 @@ async function discoverRunSet(target) {
200
177
  set: own,
201
178
  incompleteSet: null,
202
179
  totalSets: Math.max(sets2.length, 1),
203
- staleVersionCount: staleVersionDirs2.length,
204
180
  unreadableCount: unreadableDirs2.length,
205
181
  unreadablePaths: unreadableDirs2
206
182
  };
207
183
  }
208
- const { trials, staleVersionDirs, unreadableDirs } = await scanVerdictArtifactsDetailed(target);
184
+ const { trials, unreadableDirs } = await scanVerdictArtifactsDetailed(target);
209
185
  const sets = groupRunSets(trials);
210
186
  const failedSet = latestFailedRunSet(sets);
211
187
  return {
@@ -213,7 +189,6 @@ async function discoverRunSet(target) {
213
189
  set: failedSet,
214
190
  incompleteSet: failedSet ? null : latestIncompleteRunSet(sets),
215
191
  totalSets: sets.length,
216
- staleVersionCount: staleVersionDirs.length,
217
192
  unreadableCount: unreadableDirs.length,
218
193
  unreadablePaths: unreadableDirs
219
194
  };
@@ -1255,4 +1230,4 @@ async function abandonBestEffort(client, sessionId, errorCode) {
1255
1230
  }
1256
1231
  }
1257
1232
 
1258
- export { DEFAULT_CONTROL_PLANE_URL, DEFAULT_DASHBOARD_URL, DEFAULT_DOCS_SITE_ORIGIN, SESSION_TWIN_NAMES, VERDICT_ARTIFACT_VERSION, clearLocalCredentials, discoverRunSet, ensurePomeGitignored, friendlyHostedError, persistCredentialsAfterLogin, postAgentResolver, readLinkCache, resolveCachedAgentId, resolveCredentials, resolveRunAgentIdentity, resolveSeams, runSessionCreate, runSessionList, runSessionStop, runTaskHosted, writeLinkCache };
1233
+ export { DEFAULT_CONTROL_PLANE_URL, DEFAULT_DASHBOARD_URL, DEFAULT_DOCS_SITE_ORIGIN, SESSION_TWIN_NAMES, clearLocalCredentials, discoverRunSet, ensurePomeGitignored, friendlyHostedError, persistCredentialsAfterLogin, postAgentResolver, readLinkCache, resolveCachedAgentId, resolveCredentials, resolveRunAgentIdentity, resolveSeams, runSessionCreate, runSessionList, runSessionStop, runTaskHosted, writeLinkCache };
@@ -1525,7 +1525,7 @@ function scoreFromFinalizeResponse(finalized) {
1525
1525
  }
1526
1526
  function redactJsonl(body) {
1527
1527
  const lines = body.split("\n");
1528
- const redacted = lines.filter((line) => line.trim().length > 0).map((line) => {
1528
+ const redacted = lines.map((line) => line.trim()).filter((line) => line.length > 0).map((line) => {
1529
1529
  try {
1530
1530
  return JSON.stringify(redactSecrets(JSON.parse(line)));
1531
1531
  } catch {
@@ -1,4 +1,4 @@
1
- import { parseTaskFile, seedStateForTwin, runAgentCommand, writeRunArtifactsCore } from './chunk-BS47AE55.js';
1
+ import { parseTaskFile, seedStateForTwin, runAgentCommand, writeRunArtifactsCore } from './chunk-STMGQ7GU.js';
2
2
  import { createRecorder, bootTwin } from './chunk-5NPGY73F.js';
3
3
  import { getAvailablePort } from './chunk-XDU6TD4O.js';
4
4
  import { buildEgressAllowlist, readBlockedEgress } from './chunk-CBFKZZBR.js';
@@ -1,7 +1,7 @@
1
1
  import { newGroupId } from './chunk-JNXZBK3O.js';
2
2
  import { DemoCapacityError, capacityLabel, parseCapacityMarker, capacityKindFrom } from './chunk-ZX4WNSZ5.js';
3
- import { runTask, demoTaskPath, DEMO_TASK_NAME, DEMO_REPO } from './chunk-AEFXTGW3.js';
4
- import { createHostedClient, parseTaskFile, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, isNarrated, outcomeOf, criterionPhrase, narratorReadingLines } from './chunk-BS47AE55.js';
3
+ import { runTask, demoTaskPath, DEMO_TASK_NAME, DEMO_REPO } from './chunk-WERG4AUH.js';
4
+ import { createHostedClient, parseTaskFile, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, isNarrated, outcomeOf, criterionPhrase, narratorReadingLines } from './chunk-STMGQ7GU.js';
5
5
  import './chunk-NW7HGA2K.js';
6
6
  import './chunk-PASFBRK4.js';
7
7
  import './chunk-3FZY376K.js';
@@ -1,6 +1,6 @@
1
1
  import { newGroupId } from './chunk-JNXZBK3O.js';
2
- import { runTaskHosted, resolveRunAgentIdentity } from './chunk-G7252TQ3.js';
3
- import { createHostedClient, parseTaskFile, outcomeOf, isNarrated, criterionPhrase, narratorReadingLines } from './chunk-BS47AE55.js';
2
+ import { runTaskHosted, resolveRunAgentIdentity } from './chunk-KD6OUKCT.js';
3
+ import { createHostedClient, parseTaskFile, outcomeOf, isNarrated, criterionPhrase, narratorReadingLines } from './chunk-STMGQ7GU.js';
4
4
  import './chunk-VPXIGCZW.js';
5
5
  import './chunk-NW7HGA2K.js';
6
6
  import './chunk-PASFBRK4.js';
@@ -1,7 +1,7 @@
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, VERDICT_ARTIFACT_VERSION, persistCredentialsAfterLogin, DEFAULT_DOCS_SITE_ORIGIN, resolveSeams, resolveCachedAgentId, readLinkCache, postAgentResolver, writeLinkCache, ensurePomeGitignored } from '../../chunk-G7252TQ3.js';
3
- import { assetPath, runTask, resolvePackageRoot, DEMO_TASK_NAME, demoTaskPath } from '../../chunk-AEFXTGW3.js';
4
- import { parseTaskFile, scoreStatus, runScoreLine, narratorReadingLines, readLatestRun, readMetaSummary, outcomeOf, readConfigTwins, scoreCountsSummary, criterionRowLine, readCodeCriteria, createHostedClient, toTwinHttpEvent, redactJsonl, scoreFromFinalizeResponse, parseGitHubSeedState, uploadRunBlobs, isPreSatisfied } from '../../chunk-BS47AE55.js';
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-KD6OUKCT.js';
3
+ import { assetPath, runTask, resolvePackageRoot, DEMO_TASK_NAME, demoTaskPath } from '../../chunk-WERG4AUH.js';
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';
6
6
  import '../../chunk-NW7HGA2K.js';
7
7
  import { GMAIL_CHECKS } from '../../chunk-JM6VS62R.js';
@@ -21,7 +21,7 @@ import { oneOf, defineCheck, repoRef, VACUITY_SENTINEL_NUMBER, childStatePath, V
21
21
  import '../../chunk-YBWG5JK2.js';
22
22
  import '../../chunk-HRAD7MRX.js';
23
23
  import { eventSchema, isLegacyEventRow } from '../../chunk-6KJC4BTO.js';
24
- import { redactEvent, redactSecrets } from '../../chunk-SG6ZTIMT.js';
24
+ import { redactSecrets, redactEvent } from '../../chunk-SG6ZTIMT.js';
25
25
  import '../../chunk-2K6BJ3PI.js';
26
26
  import '../../chunk-FBSA5L36.js';
27
27
  import { Command } from 'commander';
@@ -38,17 +38,37 @@ import Anthropic from '@anthropic-ai/sdk';
38
38
  import { zodOutputFormat } from '@anthropic-ai/sdk/helpers/zod';
39
39
 
40
40
  async function readEventsJsonl(runDir) {
41
+ const file = resolve(runDir, "events.jsonl");
41
42
  let raw;
42
43
  try {
43
- raw = await readFile(join(runDir, "events.jsonl"), "utf8");
44
+ raw = await readFile(file, "utf8");
44
45
  } catch (err) {
45
46
  if (err.code === "ENOENT") {
46
47
  return { kind: "missing" };
47
48
  }
48
49
  throw err;
49
50
  }
50
- const rows = raw.split("\n").map((line) => line.trim()).filter((line) => line.length > 0).map((line) => JSON.parse(line));
51
- const events = rows.map((row) => eventSchema.parse(row));
51
+ const events = [];
52
+ const lines = raw.split("\n");
53
+ for (let i = 0; i < lines.length; i += 1) {
54
+ const line = lines[i].trim();
55
+ if (line.length === 0) continue;
56
+ let parsed;
57
+ try {
58
+ parsed = JSON.parse(line);
59
+ } catch (err) {
60
+ throw new Error(
61
+ `pome inspect: ${file} line ${i + 1} is not valid JSON \u2014 ${err instanceof Error ? err.message : String(err)}. Re-run the task to record the trace again.`
62
+ );
63
+ }
64
+ const result = eventSchema.safeParse(parsed);
65
+ if (!result.success) {
66
+ throw new Error(
67
+ `pome inspect: ${file} line ${i + 1} is not a recorded event \u2014 ${result.error.issues[0]?.message ?? "unrecognized shape"}. Re-run the task to record the trace again.`
68
+ );
69
+ }
70
+ events.push(result.data);
71
+ }
52
72
  return { kind: "events", events };
53
73
  }
54
74
  function computeTraceHealth(input) {
@@ -290,8 +310,8 @@ async function startCallbackServer(expectedState) {
290
310
  let rejectCode = null;
291
311
  let settled = false;
292
312
  let deliveredCode = false;
293
- const codePromise = new Promise((resolve5, reject) => {
294
- resolveCode = resolve5;
313
+ const codePromise = new Promise((resolve6, reject) => {
314
+ resolveCode = resolve6;
295
315
  rejectCode = reject;
296
316
  });
297
317
  const fail = (err) => {
@@ -335,9 +355,9 @@ async function startCallbackServer(expectedState) {
335
355
  succeed(code);
336
356
  void closeServer(server);
337
357
  });
338
- await new Promise((resolve5, reject) => {
358
+ await new Promise((resolve6, reject) => {
339
359
  server?.once("error", reject);
340
- server?.listen(0, "127.0.0.1", resolve5);
360
+ server?.listen(0, "127.0.0.1", resolve6);
341
361
  });
342
362
  const address = server.address();
343
363
  if (!address || typeof address === "string") {
@@ -374,21 +394,21 @@ async function startCallbackServer(expectedState) {
374
394
  };
375
395
  }
376
396
  function closeServer(server) {
377
- return new Promise((resolve5) => {
378
- server?.close(() => resolve5());
397
+ return new Promise((resolve6) => {
398
+ server?.close(() => resolve6());
379
399
  });
380
400
  }
381
401
  async function openBrowser(url) {
382
402
  const command = process.platform === "darwin" ? "open" : process.platform === "win32" ? "powershell.exe" : "xdg-open";
383
403
  const args = process.platform === "win32" ? ["-NoProfile", "-Command", "Start-Process", url] : [url];
384
- await new Promise((resolve5) => {
404
+ await new Promise((resolve6) => {
385
405
  execFile(command, args, (error) => {
386
406
  if (error) {
387
407
  console.error(
388
408
  "Could not open a browser automatically \u2014 copy the URL above into a browser."
389
409
  );
390
410
  }
391
- resolve5();
411
+ resolve6();
392
412
  });
393
413
  });
394
414
  }
@@ -591,7 +611,7 @@ function topicMatchesFilter(t, filter) {
591
611
  return t.id.includes(f) || t.title.toLowerCase().includes(f) || t.keywords.some((k) => k.toLowerCase().includes(f)) || t.path.toLowerCase().includes(f);
592
612
  }
593
613
  async function promptLine(rl, q) {
594
- return await new Promise((resolve5) => rl.question(q, resolve5));
614
+ return await new Promise((resolve6) => rl.question(q, resolve6));
595
615
  }
596
616
  function printTopicUrl(topic, site) {
597
617
  console.log(`${site}${topic.path}`);
@@ -3605,13 +3625,19 @@ function validateJsonl(name, raw) {
3605
3625
  const line = lines[i].trim();
3606
3626
  if (line.length === 0) continue;
3607
3627
  nonEmpty += 1;
3628
+ let parsed;
3608
3629
  try {
3609
- JSON.parse(line);
3630
+ parsed = JSON.parse(line);
3610
3631
  } catch {
3611
3632
  throw new HostedUsageError(
3612
3633
  `pome eval: ${name} is corrupt \u2014 line ${i + 1} is not valid JSON.`
3613
3634
  );
3614
3635
  }
3636
+ if (name === "events.jsonl" && isLegacyEventRow(parsed)) {
3637
+ throw new HostedUsageError(
3638
+ `pome eval: events.jsonl line ${i + 1} has no "kind" \u2014 it was recorded before the unified event shape, and the control plane refuses it. Re-run the task to record the trace again.`
3639
+ );
3640
+ }
3615
3641
  }
3616
3642
  if (name === "events.jsonl" && nonEmpty === 0) {
3617
3643
  throw new HostedUsageError(
@@ -3744,11 +3770,7 @@ async function runEval(options) {
3744
3770
  baseUrl: options.hosted.baseUrl,
3745
3771
  apiKey: options.hosted.apiKey
3746
3772
  });
3747
- const eventsJsonl = artifacts.eventsJsonl.split("\n").filter((line) => line.trim().length > 0).map((line) => {
3748
- const parsed = JSON.parse(line);
3749
- const event2 = isLegacyEventRow(parsed) ? toTwinHttpEvent(parsed) : parsed;
3750
- return JSON.stringify(redactEvent(event2));
3751
- }).join("\n") + "\n";
3773
+ const eventsJsonl = redactJsonl(artifacts.eventsJsonl);
3752
3774
  const blobs = {
3753
3775
  eventsJsonl,
3754
3776
  stateInitialJson: JSON.stringify(
@@ -4575,7 +4597,7 @@ function firstSentence(description) {
4575
4597
  function resolveExampleRef(env = process.env) {
4576
4598
  const override = env.POME_EXAMPLE_REF?.trim();
4577
4599
  if (override) return override;
4578
- const baked = "18ff79b115d837fa3081e5925664bd24f5843c8c".trim() ;
4600
+ const baked = "ea56e5f03b661023c9cea61aca95323fa0a9eada".trim() ;
4579
4601
  return FULL_SHA.test(baked) ? baked : "main";
4580
4602
  }
4581
4603
  function rawUrlFor(example, file, ref) {
@@ -4929,7 +4951,7 @@ var DEFAULT_AGENT_COMMAND = `node ${DEFAULT_AGENT_FILE}`;
4929
4951
  var MANIFEST_SCHEMA_URL = "https://pome.sh/schemas/v1/pome.json";
4930
4952
  var MAX_UNREADABLE_PATHS_SHOWN = 5;
4931
4953
  function readPackageVersion() {
4932
- if ("0.40.0".length > 0) return "0.40.0";
4954
+ if ("0.41.0".length > 0) return "0.41.0";
4933
4955
  try {
4934
4956
  const here = dirname(fileURLToPath(import.meta.url));
4935
4957
  const candidates = [
@@ -5405,7 +5427,7 @@ function createProgram() {
5405
5427
  taskForRuns.config.runs
5406
5428
  );
5407
5429
  if (k > 1) {
5408
- const { runTrialGroup } = await import('../../runTrialGroup-I6FCP2L5.js');
5430
+ const { runTrialGroup } = await import('../../runTrialGroup-OGTLUB2X.js');
5409
5431
  const fileForRerun = relative(process.cwd(), file);
5410
5432
  const rerunCommand = defaultTask ? options.trials !== void 0 ? `pome run -n ${k}` : "pome run" : `pome run ${fileForRerun && !fileForRerun.startsWith("..") ? fileForRerun : file} -n ${k}`;
5411
5433
  const groupResult = await runTrialGroup({
@@ -5498,7 +5520,7 @@ function createProgram() {
5498
5520
  process.exitCode = 5;
5499
5521
  return;
5500
5522
  }
5501
- const { runDemo } = await import('../../runDemo-B2SXM4OC.js');
5523
+ const { runDemo } = await import('../../runDemo-DRDMCG25.js');
5502
5524
  const result = await runDemo({
5503
5525
  apiBase: globals(cmd).apiUrl.replace(/\/$/, ""),
5504
5526
  dashboardBase: process.env.POME_DASHBOARD_URL ?? DEFAULT_DASHBOARD_URL,
@@ -5590,14 +5612,9 @@ function createProgram() {
5590
5612
  }
5591
5613
  const root = target ?? "runs";
5592
5614
  const discovery = await discoverRunSet(resolve(root));
5593
- if (discovery.staleVersionCount > 0) {
5594
- console.error(
5595
- `${discovery.staleVersionCount} verdict.json file(s) under ${root} are not artifact version ${VERDICT_ARTIFACT_VERSION} (the only version this CLI reads) and were skipped \u2014 re-run \`pome run\` to record those trials again.`
5596
- );
5597
- }
5598
5615
  if (discovery.unreadableCount > 0) {
5599
5616
  console.error(
5600
- `${discovery.unreadableCount} verdict.json file(s) under ${root} could not be read (truncated, hand-edited, or not a verdict artifact) and were skipped:`
5617
+ `${discovery.unreadableCount} verdict.json file(s) under ${root} could not be read (truncated, hand-edited, written by an older CLI, or not a verdict artifact) and were skipped \u2014 re-run \`pome run\` to record those trials again:`
5601
5618
  );
5602
5619
  for (const path of discovery.unreadablePaths.slice(0, MAX_UNREADABLE_PATHS_SHOWN)) {
5603
5620
  console.error(` - ${path}`);
@@ -5608,7 +5625,7 @@ function createProgram() {
5608
5625
  }
5609
5626
  }
5610
5627
  if (discovery.totalSets === 0) {
5611
- if (discovery.staleVersionCount === 0 && discovery.unreadableCount === 0) {
5628
+ if (discovery.unreadableCount === 0) {
5612
5629
  console.error(
5613
5630
  `No finalized run sets under ${root} \u2014 hosted \`pome run\` records a verdict.json per trial; run one first (or point fix-prompt at your artifacts dir).`
5614
5631
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pome-sh/cli",
3
- "version": "0.40.0",
3
+ "version": "0.41.0",
4
4
  "description": "Test AI agents against digital twins of real SaaS APIs. Records tool-call traces and scores them on pome.sh.",
5
5
  "keywords": [
6
6
  "ai",
@@ -1,3 +0,0 @@
1
- {"ts":"2026-05-11T22:21:54.256Z","run_id":"m0-1-refund-retry","twin":"stripe","request_id":"req_f2e53238-8783-4cfd-b5de-efd60f442be8","correlation_id":"req_f2e53238-8783-4cfd-b5de-efd60f442be8","scenario_step_id":null,"step_id":null,"tool_call_id":null,"method":"POST","path":"/s/default/v1/refunds","request_body":"{\"charge\":\"ch_q9dVWLmN4flQFRzqYRe7iAu1\",\"amount\":7500}","status":402,"response_body":{"error":{"type":"card_error","code":"card_declined","message":"Simulated lost-response failure: refund persisted server-side, but response delivery to the client failed."}},"latency_ms":0,"fidelity":"semantic","state_mutation":true,"state_delta":{"before":null,"after":{"id":"re_LOW1fo91HP1TYIe31f04Kpcn","account_id":"acct_default","charge_id":"ch_q9dVWLmN4flQFRzqYRe7iAu1","payment_intent_id":"pi_pKYzqMO9yYaY2jesB8VcRRxc","amount":7500,"currency":"usd","status":"succeeded","reason":null,"idempotency_key":null,"created":1778538114}},"error":"Simulated lost-response failure: refund persisted server-side, but response delivery to the client failed."}
2
- {"ts":"2026-05-11T22:21:54.257Z","run_id":"m0-1-refund-retry","twin":"stripe","request_id":"req_c0774431-a954-458c-9b38-8f416cfde198","correlation_id":"req_c0774431-a954-458c-9b38-8f416cfde198","scenario_step_id":null,"step_id":null,"tool_call_id":null,"method":"POST","path":"/s/default/v1/refunds","request_body":"{\"charge\":\"ch_q9dVWLmN4flQFRzqYRe7iAu1\",\"amount\":7500}","status":200,"response_body":{"id":"re_L5jCYOtsrPiLpbCCiQZtnOmv","object":"refund","amount":7500,"balance_transaction":null,"charge":"ch_q9dVWLmN4flQFRzqYRe7iAu1","created":1778538114,"currency":"usd","metadata":{},"payment_intent":"pi_pKYzqMO9yYaY2jesB8VcRRxc","reason":null,"receipt_number":null,"source_transfer_reversal":null,"status":"succeeded","transfer_reversal":null},"latency_ms":1,"fidelity":"semantic","state_mutation":true,"state_delta":{"before":null,"after":{"id":"re_L5jCYOtsrPiLpbCCiQZtnOmv","account_id":"acct_default","charge_id":"ch_q9dVWLmN4flQFRzqYRe7iAu1","payment_intent_id":"pi_pKYzqMO9yYaY2jesB8VcRRxc","amount":7500,"currency":"usd","status":"succeeded","reason":null,"idempotency_key":null,"created":1778538114}},"error":null}
3
- {"ts":"2026-05-11T22:21:54.257Z","run_id":"m0-1-refund-retry","twin":"stripe","request_id":"req_37c6074d-7b44-4c06-8b69-86567aa2ae8a","correlation_id":"req_37c6074d-7b44-4c06-8b69-86567aa2ae8a","scenario_step_id":null,"step_id":null,"tool_call_id":null,"method":"GET","path":"/s/default/v1/charges/ch_q9dVWLmN4flQFRzqYRe7iAu1","request_body":null,"status":200,"response_body":{"id":"ch_q9dVWLmN4flQFRzqYRe7iAu1","object":"charge","amount":20000,"amount_captured":20000,"amount_refunded":15000,"application":null,"application_fee":null,"application_fee_amount":null,"balance_transaction":"txn_nuda9v4Uks4931U8xOShQZsV","billing_details":{"address":{"city":null,"country":null,"line1":null,"line2":null,"postal_code":null,"state":null},"email":null,"name":null,"phone":null},"calculated_statement_descriptor":null,"captured":true,"created":1778538114,"currency":"usd","customer":null,"description":null,"disputed":false,"failure_balance_transaction":null,"failure_code":null,"failure_message":null,"fraud_details":{},"invoice":null,"livemode":false,"metadata":{},"on_behalf_of":null,"outcome":{"network_status":"approved_by_network","reason":null,"risk_level":"normal","seller_message":"Payment complete.","type":"authorized"},"paid":true,"payment_intent":"pi_pKYzqMO9yYaY2jesB8VcRRxc","payment_method":null,"payment_method_details":{"type":"crypto","crypto":{"buyer_address":null,"network":"base","token_currency":"usdc","transaction_hash":null}},"receipt_email":null,"receipt_number":null,"receipt_url":null,"refunded":false,"review":null,"shipping":null,"source_transfer":null,"statement_descriptor":null,"statement_descriptor_suffix":null,"status":"succeeded","transfer_data":null,"transfer_group":null},"latency_ms":0,"fidelity":"semantic","state_mutation":false,"state_delta":null,"error":null}