@pome-sh/cli 0.23.33 → 0.23.37
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-GEC6MJV5.js → chunk-7GHIB4HM.js} +1 -1
- package/dist/{chunk-ZTINFLSV.js → chunk-EKQQYW7E.js} +10 -1
- package/dist/{chunk-A2LGBYJG.js → chunk-MUQX7EHA.js} +27 -27
- package/dist/{runDemo-EV3CQBDR.js → runDemo-F722I6AW.js} +2 -2
- package/dist/{runTrialGroup-WXDRCVUE.js → runTrialGroup-6FWGZGNM.js} +2 -2
- package/dist/src/cli/main.js +6 -6
- 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.23.
|
|
4
|
-
"git_sha": "
|
|
5
|
-
"build_time": "2026-08-13T01:
|
|
3
|
+
"version": "0.23.37",
|
|
4
|
+
"git_sha": "516d235ab8150a3823d3ac09d3cb667fb2fdd30a",
|
|
5
|
+
"build_time": "2026-08-13T01:35:08.896Z"
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getAvailablePort } from './chunk-XDU6TD4O.js';
|
|
2
2
|
import { buildEgressAllowlist, readBlockedEgress } from './chunk-CBFKZZBR.js';
|
|
3
|
-
import { parseTaskFile, seedStateForTwin, runAgentCommand, writeRunArtifactsCore } from './chunk-
|
|
3
|
+
import { parseTaskFile, seedStateForTwin, runAgentCommand, writeRunArtifactsCore } from './chunk-EKQQYW7E.js';
|
|
4
4
|
import { createRecorder, bootTwin } from './chunk-YL4FHI3J.js';
|
|
5
5
|
import { eventSchema } from './chunk-VBATFCWR.js';
|
|
6
6
|
import { redactSecrets, redactEvent } from './chunk-SG6ZTIMT.js';
|
|
@@ -414,6 +414,10 @@ function splitSections(markdown) {
|
|
|
414
414
|
}
|
|
415
415
|
var CRITERION_LINE_RE = /^[-*]\s+\[(code|model)(?::([a-z][a-z0-9_-]*))?(\s+always-scored)?\]\s+(.+)$/;
|
|
416
416
|
var LEGACY_CRITERION_LINE_RE = /^[-*]\s+\[([DP])(?::([a-z][a-z0-9_-]*))?\]\s+(.+)$/;
|
|
417
|
+
var NEAR_MISS_CRITERION_LINE_RE = /^[-*]\s*\[\s*(code|model)\b[^\]]*\]/;
|
|
418
|
+
function nearMissCriterionMessage(line) {
|
|
419
|
+
return `Criterion line "${line}" reaches for a [code]/[model] marker but does not match the criterion grammar ${CRITERION_LINE_RE.source} \u2014 fix the marker (e.g. "[code]", "[code:slack]", "[code:slack always-scored]"); a line this close to a criterion is refused rather than silently dropped as prose.`;
|
|
420
|
+
}
|
|
417
421
|
function parseCriteria(input, twins) {
|
|
418
422
|
const multiTwin = twins.length > 1;
|
|
419
423
|
const allowed = new Set(twins);
|
|
@@ -429,7 +433,12 @@ function parseCriteria(input, twins) {
|
|
|
429
433
|
);
|
|
430
434
|
}
|
|
431
435
|
const match = line.match(CRITERION_LINE_RE);
|
|
432
|
-
if (!match)
|
|
436
|
+
if (!match) {
|
|
437
|
+
if (NEAR_MISS_CRITERION_LINE_RE.test(line)) {
|
|
438
|
+
throw new Error(nearMissCriterionMessage(line));
|
|
439
|
+
}
|
|
440
|
+
continue;
|
|
441
|
+
}
|
|
433
442
|
const kind = match[1];
|
|
434
443
|
const tag = match[2];
|
|
435
444
|
const alwaysScored = match[3] !== void 0;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { readManifest, normalizeManifestTwins } from './chunk-ABM3CMQB.js';
|
|
2
|
-
import { createHostedClient, perTwinReturnedByCloud, parseTaskFile, runAgentCommand, writeRunArtifactsCore, toTwinHttpEvent, redactJsonl, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, evaluationCounts } from './chunk-
|
|
2
|
+
import { createHostedClient, perTwinReturnedByCloud, parseTaskFile, runAgentCommand, writeRunArtifactsCore, toTwinHttpEvent, redactJsonl, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, evaluationCounts } from './chunk-EKQQYW7E.js';
|
|
3
3
|
import { MOUNTED_TWINS, HostedAuthError, HostedDiscardRefusedError, HostedQuotaError, HostedOrchError, HostedTrialError, agentResponseSchema } from './chunk-X66JOOO7.js';
|
|
4
4
|
import { redactSecrets, redactEvent } from './chunk-SG6ZTIMT.js';
|
|
5
|
-
import {
|
|
6
|
-
import { rm, readFile, stat, mkdir, writeFile, chmod, mkdtemp, readdir } from 'node:fs/promises';
|
|
5
|
+
import { randomUUID, createHash } from 'node:crypto';
|
|
6
|
+
import { rm, readFile, stat, mkdir, writeFile, chmod, mkdtemp, readdir, rename } from 'node:fs/promises';
|
|
7
7
|
import { join, dirname } from 'node:path';
|
|
8
8
|
import { tmpdir, homedir } from 'node:os';
|
|
9
9
|
import { execFile } from 'node:child_process';
|
|
10
10
|
import { promisify } from 'node:util';
|
|
11
11
|
import { createInterface } from 'node:readline';
|
|
12
|
-
import { randomUUID, createHash } from 'node:crypto';
|
|
13
12
|
|
|
14
13
|
// src/hosted/runSets.ts
|
|
15
14
|
function groupRunSets(trials) {
|
|
@@ -62,12 +61,16 @@ var VALID_STATES = /* @__PURE__ */ new Set([
|
|
|
62
61
|
"incomplete"
|
|
63
62
|
]);
|
|
64
63
|
async function writeVerdictArtifact(runDir, verdict) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
`${JSON.stringify(verdict, null, 2)}
|
|
68
|
-
`,
|
|
69
|
-
|
|
70
|
-
)
|
|
64
|
+
const tmpPath = join(runDir, `.${VERDICT_FILENAME}.${process.pid}.${randomUUID()}.tmp`);
|
|
65
|
+
try {
|
|
66
|
+
await writeFile(tmpPath, `${JSON.stringify(verdict, null, 2)}
|
|
67
|
+
`, "utf8");
|
|
68
|
+
await rename(tmpPath, join(runDir, VERDICT_FILENAME));
|
|
69
|
+
} catch (err) {
|
|
70
|
+
await rm(tmpPath, { force: true }).catch(() => {
|
|
71
|
+
});
|
|
72
|
+
throw err;
|
|
73
|
+
}
|
|
71
74
|
}
|
|
72
75
|
function looksLikeVerdictArtifactBase(parsed) {
|
|
73
76
|
if (typeof parsed !== "object" || parsed === null) return false;
|
|
@@ -100,13 +103,23 @@ function isVerdictArtifact(parsed) {
|
|
|
100
103
|
if (typeof v.total !== "number") return false;
|
|
101
104
|
return true;
|
|
102
105
|
}
|
|
106
|
+
var MISSING_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
107
|
+
"ENOENT",
|
|
108
|
+
"ENOTDIR",
|
|
109
|
+
"ELOOP",
|
|
110
|
+
"ENAMETOOLONG"
|
|
111
|
+
]);
|
|
112
|
+
function isMissingFileError(err) {
|
|
113
|
+
const code = err?.code;
|
|
114
|
+
return typeof code === "string" && MISSING_ERROR_CODES.has(code);
|
|
115
|
+
}
|
|
103
116
|
async function readVerdictArtifactDetailed(runDir) {
|
|
104
117
|
const path = join(runDir, VERDICT_FILENAME);
|
|
105
118
|
let raw;
|
|
106
119
|
try {
|
|
107
120
|
raw = await readFile(path, "utf8");
|
|
108
|
-
} catch {
|
|
109
|
-
return { status: "unreadable" };
|
|
121
|
+
} catch (err) {
|
|
122
|
+
return isMissingFileError(err) ? { status: "missing" } : { status: "unreadable" };
|
|
110
123
|
}
|
|
111
124
|
let parsed;
|
|
112
125
|
try {
|
|
@@ -143,9 +156,7 @@ async function scanVerdictArtifactsDetailed(artifactsRoot) {
|
|
|
143
156
|
const result = await readVerdictArtifactDetailed(runDir);
|
|
144
157
|
if (result.status === "ok") trials.push(result.trial);
|
|
145
158
|
else if (result.status === "stale-version") staleVersionDirs.push(runDir);
|
|
146
|
-
else if (result.status === "unreadable"
|
|
147
|
-
unreadableDirs.push(runDir);
|
|
148
|
-
}
|
|
159
|
+
else if (result.status === "unreadable") unreadableDirs.push(runDir);
|
|
149
160
|
}
|
|
150
161
|
}
|
|
151
162
|
unreadableDirs.sort();
|
|
@@ -164,7 +175,7 @@ async function discoverRunSet(target) {
|
|
|
164
175
|
unreadablePaths: []
|
|
165
176
|
};
|
|
166
177
|
}
|
|
167
|
-
if (anchorResult.status === "unreadable"
|
|
178
|
+
if (anchorResult.status === "unreadable") {
|
|
168
179
|
return {
|
|
169
180
|
kind: "trial-dir",
|
|
170
181
|
set: null,
|
|
@@ -193,17 +204,6 @@ async function discoverRunSet(target) {
|
|
|
193
204
|
unreadablePaths: unreadableDirs2
|
|
194
205
|
};
|
|
195
206
|
}
|
|
196
|
-
if (!existsSync(target)) {
|
|
197
|
-
return {
|
|
198
|
-
kind: "root",
|
|
199
|
-
set: null,
|
|
200
|
-
incompleteSet: null,
|
|
201
|
-
totalSets: 0,
|
|
202
|
-
staleVersionCount: 0,
|
|
203
|
-
unreadableCount: 0,
|
|
204
|
-
unreadablePaths: []
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
207
|
const { trials, staleVersionDirs, unreadableDirs } = await scanVerdictArtifactsDetailed(target);
|
|
208
208
|
const sets = groupRunSets(trials);
|
|
209
209
|
const failedSet = latestFailedRunSet(sets);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { newGroupId, reassuranceBox, twinReadyLine, trialsHeaderLine, trialLine, summaryLines, evaluatingLine, criterionPhrase } from './chunk-RGZBC7NF.js';
|
|
2
2
|
import { DemoCapacityError, capacityLabel, parseCapacityMarker, capacityKindFrom } from './chunk-ZX4WNSZ5.js';
|
|
3
|
-
import { runTask, demoTaskPath, DEMO_TASK_NAME, DEMO_REPO } from './chunk-
|
|
3
|
+
import { runTask, demoTaskPath, DEMO_TASK_NAME, DEMO_REPO } from './chunk-7GHIB4HM.js';
|
|
4
4
|
import { getAvailablePort } from './chunk-XDU6TD4O.js';
|
|
5
5
|
import './chunk-CBFKZZBR.js';
|
|
6
|
-
import { createHostedClient, parseTaskFile, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, outcomeOf } from './chunk-
|
|
6
|
+
import { createHostedClient, parseTaskFile, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, outcomeOf } from './chunk-EKQQYW7E.js';
|
|
7
7
|
import './chunk-NW7HGA2K.js';
|
|
8
8
|
import { HostedQuotaError, HostedOrchError } from './chunk-X66JOOO7.js';
|
|
9
9
|
import './chunk-KIUIKAVU.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { newGroupId, criterionPhrase } from './chunk-RGZBC7NF.js';
|
|
2
|
-
import { runTaskHosted, resolveRunAgentIdentity } from './chunk-
|
|
2
|
+
import { runTaskHosted, resolveRunAgentIdentity } from './chunk-MUQX7EHA.js';
|
|
3
3
|
import './chunk-ABM3CMQB.js';
|
|
4
|
-
import { createHostedClient, parseTaskFile, outcomeOf } from './chunk-
|
|
4
|
+
import { createHostedClient, parseTaskFile, outcomeOf } from './chunk-EKQQYW7E.js';
|
|
5
5
|
import './chunk-NW7HGA2K.js';
|
|
6
6
|
import { HostedQuotaError, HostedTrialError } from './chunk-X66JOOO7.js';
|
|
7
7
|
import './chunk-KIUIKAVU.js';
|
package/dist/src/cli/main.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { DEFAULT_CONTROL_PLANE_URL, DEFAULT_DASHBOARD_URL, clearLocalCredentials, friendlyHostedError, runSessionCreate, runSessionList, runSessionStop, resolveCredentials, runTaskHosted, discoverRunSet, VERDICT_ARTIFACT_VERSION, persistCredentialsAfterLogin, DEFAULT_DOCS_SITE_ORIGIN, resolveSeams, resolveCachedAgentId, readLinkCache, postAgentResolver, writeLinkCache, ensurePomeGitignored } from '../../chunk-
|
|
2
|
+
import { DEFAULT_CONTROL_PLANE_URL, DEFAULT_DASHBOARD_URL, clearLocalCredentials, friendlyHostedError, runSessionCreate, runSessionList, runSessionStop, resolveCredentials, runTaskHosted, discoverRunSet, VERDICT_ARTIFACT_VERSION, persistCredentialsAfterLogin, DEFAULT_DOCS_SITE_ORIGIN, resolveSeams, resolveCachedAgentId, readLinkCache, postAgentResolver, writeLinkCache, ensurePomeGitignored } from '../../chunk-MUQX7EHA.js';
|
|
3
3
|
import { readManifest, writeManifest, MANIFEST_JSON, readRequiredManifest, normalizeManifestTwins } from '../../chunk-ABM3CMQB.js';
|
|
4
|
-
import { assetPath, runTask, resolvePackageRoot, DEMO_TASK_NAME, demoTaskPath } from '../../chunk-
|
|
4
|
+
import { assetPath, runTask, resolvePackageRoot, DEMO_TASK_NAME, demoTaskPath } from '../../chunk-7GHIB4HM.js';
|
|
5
5
|
import '../../chunk-XDU6TD4O.js';
|
|
6
6
|
import '../../chunk-CBFKZZBR.js';
|
|
7
|
-
import { parseTaskFile, scoreStatus, runScoreLine, readLatestRun, readMetaSummary, outcomeOf, readConfigTwins, scoreCountsSummary, markerFor, criterionMarkerLabel, twinSkipSuffix, readCodeCriteria, createHostedClient, toTwinHttpEvent, redactJsonl, scoreFromFinalizeResponse, parseGitHubSeedState, uploadRunBlobs, isPreSatisfied } from '../../chunk-
|
|
7
|
+
import { parseTaskFile, scoreStatus, runScoreLine, readLatestRun, readMetaSummary, outcomeOf, readConfigTwins, scoreCountsSummary, markerFor, criterionMarkerLabel, twinSkipSuffix, readCodeCriteria, createHostedClient, toTwinHttpEvent, redactJsonl, scoreFromFinalizeResponse, parseGitHubSeedState, uploadRunBlobs, isPreSatisfied } from '../../chunk-EKQQYW7E.js';
|
|
8
8
|
import '../../chunk-NW7HGA2K.js';
|
|
9
9
|
import { MOUNTED_TWINS, deriveAgentSlug, exitCodeFor, HostedUsageError, HostedOrchError, HostedAuthError, HostedQuotaError } from '../../chunk-X66JOOO7.js';
|
|
10
10
|
import { TAPE_ASSERTABLE_TOOLS } from '../../chunk-FKZZWWYC.js';
|
|
@@ -4580,7 +4580,7 @@ var DEFAULT_AGENT_COMMAND = `node ${DEFAULT_AGENT_FILE}`;
|
|
|
4580
4580
|
var MANIFEST_SCHEMA_URL = "https://pome.sh/schemas/v1/pome.json";
|
|
4581
4581
|
var MAX_UNREADABLE_PATHS_SHOWN = 5;
|
|
4582
4582
|
function readPackageVersion() {
|
|
4583
|
-
if ("0.23.
|
|
4583
|
+
if ("0.23.37".length > 0) return "0.23.37";
|
|
4584
4584
|
try {
|
|
4585
4585
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
4586
4586
|
const candidates = [
|
|
@@ -5073,7 +5073,7 @@ function createProgram() {
|
|
|
5073
5073
|
taskForRuns.config.runs
|
|
5074
5074
|
);
|
|
5075
5075
|
if (k > 1) {
|
|
5076
|
-
const { runTrialGroup } = await import('../../runTrialGroup-
|
|
5076
|
+
const { runTrialGroup } = await import('../../runTrialGroup-6FWGZGNM.js');
|
|
5077
5077
|
const fileForRerun = relative(process.cwd(), file);
|
|
5078
5078
|
const rerunCommand = defaultTask ? options.trials !== void 0 ? `pome run -n ${k}` : "pome run" : `pome run ${fileForRerun && !fileForRerun.startsWith("..") ? fileForRerun : file} -n ${k}`;
|
|
5079
5079
|
const groupResult = await runTrialGroup({
|
|
@@ -5167,7 +5167,7 @@ function createProgram() {
|
|
|
5167
5167
|
process.exitCode = 5;
|
|
5168
5168
|
return;
|
|
5169
5169
|
}
|
|
5170
|
-
const { runDemo } = await import('../../runDemo-
|
|
5170
|
+
const { runDemo } = await import('../../runDemo-F722I6AW.js');
|
|
5171
5171
|
const result = await runDemo({
|
|
5172
5172
|
apiBase: opts.apiUrl.replace(/\/$/, ""),
|
|
5173
5173
|
dashboardBase: process.env.POME_DASHBOARD_URL ?? DEFAULT_DASHBOARD_URL,
|
package/package.json
CHANGED