@pome-sh/cli 0.35.1 → 0.35.3
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-KY5OLJQI.js → chunk-4EPOCS3X.js} +1 -1
- package/dist/{chunk-EIEPFWHZ.js → chunk-D3NCOYBV.js} +42 -3
- package/dist/chunk-JNXZBK3O.js +17 -0
- package/dist/{chunk-THDEJ5AJ.js → chunk-NAU4UZOE.js} +1 -1
- package/dist/{runDemo-DV2TYPWC.js → runDemo-EBSKTX6V.js} +84 -5
- package/dist/{runTrialGroup-FVGBOLMJ.js → runTrialGroup-WZ3CUKYB.js} +9 -3
- package/dist/src/cli/main.js +12 -11
- package/package.json +1 -1
- package/dist/chunk-RGZBC7NF.js +0 -90
package/dist/build-info.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "pome-sh",
|
|
3
|
-
"version": "0.35.
|
|
4
|
-
"git_sha": "
|
|
5
|
-
"build_time": "2026-08-
|
|
3
|
+
"version": "0.35.3",
|
|
4
|
+
"git_sha": "76f126bc15b2467859785d59555570627963259e",
|
|
5
|
+
"build_time": "2026-08-29T21:46:38.757Z"
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createHostedClient, perTwinReturnedByCloud, parseTaskFile, runAgentCommand, writeRunArtifactsCore, toTwinHttpEvent, redactJsonl, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, evaluationCounts } from './chunk-
|
|
1
|
+
import { createHostedClient, perTwinReturnedByCloud, parseTaskFile, runAgentCommand, writeRunArtifactsCore, toTwinHttpEvent, redactJsonl, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, evaluationCounts } from './chunk-D3NCOYBV.js';
|
|
2
2
|
import { readSeedFileText, parseSeedFileText, soleTwinOf, seedsForTwins } from './chunk-DWOCTCSE.js';
|
|
3
3
|
import { readManifest, normalizeManifestTwins } from './chunk-L7XARKMM.js';
|
|
4
4
|
import { MOUNTED_TWINS, HostedAuthError, HostedDiscardRefusedError, HostedQuotaError, HostedOrchError, HostedTrialError, agentResponseSchema, isMultiTwinSeedEnvelope } from './chunk-533VIN3J.js';
|
|
@@ -1259,6 +1259,10 @@ function isPreSatisfied(result) {
|
|
|
1259
1259
|
function isNarrated(result) {
|
|
1260
1260
|
return result.skipped && (result.score_state === ADVISORY_SCORE_STATE || result.score_state === ABSTAINED_SCORE_STATE);
|
|
1261
1261
|
}
|
|
1262
|
+
function narratorStateLabel(result) {
|
|
1263
|
+
if (!isNarrated(result)) return null;
|
|
1264
|
+
return result.score_state === ADVISORY_SCORE_STATE ? ADVISORY_SCORE_STATE : ABSTAINED_SCORE_STATE;
|
|
1265
|
+
}
|
|
1262
1266
|
function scoreStatus(score, passThreshold) {
|
|
1263
1267
|
if (!score.evaluated || !score.can_pass) return "incomplete";
|
|
1264
1268
|
return score.satisfaction >= passThreshold ? "pass" : "fail";
|
|
@@ -1275,12 +1279,43 @@ function markerFor(outcome) {
|
|
|
1275
1279
|
return "-";
|
|
1276
1280
|
}
|
|
1277
1281
|
}
|
|
1282
|
+
var NARRATED_MARKER = "~";
|
|
1283
|
+
function criterionMarker(result) {
|
|
1284
|
+
return isNarrated(result) ? NARRATED_MARKER : markerFor(outcomeOf(result));
|
|
1285
|
+
}
|
|
1286
|
+
function narratorSuffix(result) {
|
|
1287
|
+
const label = narratorStateLabel(result);
|
|
1288
|
+
if (label === null) return "";
|
|
1289
|
+
return label === ADVISORY_SCORE_STATE ? " \u2014 advisory: read by the narrator, never scored" : " \u2014 abstained: nothing in this run to read";
|
|
1290
|
+
}
|
|
1291
|
+
function criterionRowLine(result) {
|
|
1292
|
+
return `${criterionMarker(result)} ${criterionMarkerLabel(result.criterion)} ${result.criterion.text}${narratorSuffix(result)}${twinSkipSuffix(result)}`;
|
|
1293
|
+
}
|
|
1294
|
+
function narratorReadingLines(results) {
|
|
1295
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1296
|
+
const rows = [];
|
|
1297
|
+
for (const result of results) {
|
|
1298
|
+
const state = narratorStateLabel(result);
|
|
1299
|
+
if (state === null) continue;
|
|
1300
|
+
const line = ` ${NARRATED_MARKER} ${state} \xB7 ${criterionPhrase(result.criterion.text)}`;
|
|
1301
|
+
if (seen.has(line)) continue;
|
|
1302
|
+
seen.add(line);
|
|
1303
|
+
rows.push(line);
|
|
1304
|
+
}
|
|
1305
|
+
if (rows.length === 0) return [];
|
|
1306
|
+
return ["the narrator also read these, and scored none of them:", ...rows];
|
|
1307
|
+
}
|
|
1308
|
+
function criterionPhrase(text) {
|
|
1309
|
+
const clause = text.split(/[.;]/)[0]?.trim() ?? text.trim();
|
|
1310
|
+
const lowered = clause.length > 0 ? clause[0].toLowerCase() + clause.slice(1) : clause;
|
|
1311
|
+
return lowered.length > 64 ? `${lowered.slice(0, 61).trimEnd()}\u2026` : lowered;
|
|
1312
|
+
}
|
|
1278
1313
|
function criterionMarkerLabel(criterion) {
|
|
1279
1314
|
return criterion.twin ? `[${criterion.type}:${criterion.twin}]` : `[${criterion.type}]`;
|
|
1280
1315
|
}
|
|
1281
1316
|
function twinSkipSuffix(result) {
|
|
1282
1317
|
const twin = result.criterion.twin;
|
|
1283
|
-
if (!twin) return "";
|
|
1318
|
+
if (!twin || isNarrated(result)) return "";
|
|
1284
1319
|
const outcome = outcomeOf(result);
|
|
1285
1320
|
const twinRelated = outcome === "skipped" || outcome === "errored" || /no_matching_predicate|no matching predicate/i.test(result.reason);
|
|
1286
1321
|
return twinRelated ? ` (twin: ${twin})` : "";
|
|
@@ -1303,7 +1338,11 @@ function evaluationCounts(score) {
|
|
|
1303
1338
|
};
|
|
1304
1339
|
}
|
|
1305
1340
|
function scoreCountsSummary(score) {
|
|
1306
|
-
|
|
1341
|
+
const advisory = score.advisory ?? 0;
|
|
1342
|
+
const abstained = score.abstained ?? 0;
|
|
1343
|
+
const narrated = (advisory > 0 ? `, ${advisory} advisory` : "") + (abstained > 0 ? `, ${abstained} abstained` : "");
|
|
1344
|
+
const skipped = (score.skipped ?? 0) - advisory - abstained;
|
|
1345
|
+
return `${score.passed ?? 0} passed, ${score.failed ?? 0} failed, ${skipped} skipped, ${score.errored ?? 0} errored${narrated}`;
|
|
1307
1346
|
}
|
|
1308
1347
|
function runScoreLine(score, passThreshold, unevaluatedNumericLabel) {
|
|
1309
1348
|
const status = scoreStatus(score, passThreshold);
|
|
@@ -1673,4 +1712,4 @@ function splitCommand(command) {
|
|
|
1673
1712
|
return file ? { file, args } : null;
|
|
1674
1713
|
}
|
|
1675
1714
|
|
|
1676
|
-
export { createHostedClient,
|
|
1715
|
+
export { createHostedClient, criterionPhrase, criterionRowLine, evaluationCounts, isNarrated, isPreSatisfied, narratorReadingLines, outcomeOf, parseGitHubSeedState, parseTaskFile, perTwinReturnedByCloud, readCodeCriteria, readConfigTwins, readLatestRun, readMetaSummary, redactJsonl, runAgentCommand, runScoreLine, scoreCountsSummary, scoreFromFinalizeResponse, scoreStatus, seedStateForTwin, toTwinHttpEvent, uploadRunBlobs, writeRunArtifactsCore };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { randomBytes } from 'node:crypto';
|
|
2
|
+
|
|
3
|
+
// src/demo/ids.ts
|
|
4
|
+
var NANOID_ALPHABET = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
5
|
+
function nanoid(size = 21) {
|
|
6
|
+
const bytes = randomBytes(size);
|
|
7
|
+
let id = "";
|
|
8
|
+
for (let i = 0; i < size; i += 1) {
|
|
9
|
+
id += NANOID_ALPHABET[bytes[i] & 63];
|
|
10
|
+
}
|
|
11
|
+
return id;
|
|
12
|
+
}
|
|
13
|
+
function newGroupId() {
|
|
14
|
+
return `grp_${nanoid(21)}`;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { newGroupId };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseTaskFile, seedStateForTwin, runAgentCommand, writeRunArtifactsCore } from './chunk-
|
|
1
|
+
import { parseTaskFile, seedStateForTwin, runAgentCommand, writeRunArtifactsCore } from './chunk-D3NCOYBV.js';
|
|
2
2
|
import { createRecorder, bootTwin } from './chunk-T73VMABH.js';
|
|
3
3
|
import { getAvailablePort } from './chunk-XDU6TD4O.js';
|
|
4
4
|
import { buildEgressAllowlist, readBlockedEgress } from './chunk-CBFKZZBR.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { newGroupId
|
|
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-
|
|
4
|
-
import { createHostedClient, parseTaskFile, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, outcomeOf } from './chunk-
|
|
3
|
+
import { runTask, demoTaskPath, DEMO_TASK_NAME, DEMO_REPO } from './chunk-NAU4UZOE.js';
|
|
4
|
+
import { createHostedClient, parseTaskFile, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, isNarrated, outcomeOf, criterionPhrase, narratorReadingLines } from './chunk-D3NCOYBV.js';
|
|
5
5
|
import './chunk-NW7HGA2K.js';
|
|
6
6
|
import './chunk-3T5XN64P.js';
|
|
7
7
|
import './chunk-Q5NBPR57.js';
|
|
@@ -87,6 +87,78 @@ async function mintOne(options) {
|
|
|
87
87
|
return parsed.data;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
+
// src/demo/render.ts
|
|
91
|
+
function reassuranceBox() {
|
|
92
|
+
const lines = [
|
|
93
|
+
"pome demo \xB7 running locally",
|
|
94
|
+
"No signup. No API keys.",
|
|
95
|
+
"The GitHub twin runs on your machine; model calls go through pome's",
|
|
96
|
+
"anonymous demo gateway; the trace is evaluated in pome cloud.",
|
|
97
|
+
"Your repo and your data are never touched."
|
|
98
|
+
];
|
|
99
|
+
const width = Math.max(...lines.map((line) => line.length));
|
|
100
|
+
const top = `\u250C${"\u2500".repeat(width + 2)}\u2510`;
|
|
101
|
+
const bottom = `\u2514${"\u2500".repeat(width + 2)}\u2518`;
|
|
102
|
+
return [top, ...lines.map((line) => `\u2502 ${line.padEnd(width)} \u2502`), bottom];
|
|
103
|
+
}
|
|
104
|
+
function twinReadyLine(seconds) {
|
|
105
|
+
return `spinning up github twin \u2026 ready (${seconds.toFixed(1)}s)`;
|
|
106
|
+
}
|
|
107
|
+
function trialsHeaderLine(count, taskName) {
|
|
108
|
+
return `running ${count} isolated trials of ${taskName} \u2026`;
|
|
109
|
+
}
|
|
110
|
+
function evaluatingLine(index) {
|
|
111
|
+
return `trial ${index} \u2026 evaluating in the cloud \u2026`;
|
|
112
|
+
}
|
|
113
|
+
function trialLine(index, verdict) {
|
|
114
|
+
switch (verdict.kind) {
|
|
115
|
+
case "passed":
|
|
116
|
+
return `trial ${index} \u2713 passed ${formatSeconds(verdict.seconds)} ${checksPhrase(verdict.checks)}`;
|
|
117
|
+
case "failed":
|
|
118
|
+
return `trial ${index} \u2717 failed ${formatSeconds(verdict.seconds)} ${checksPhrase(verdict.checks)} ${verdict.note}`;
|
|
119
|
+
case "errored":
|
|
120
|
+
return `trial ${index} \u26A0 errored ${verdict.reason} \u2014 excluded`;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
function checksPhrase(checks) {
|
|
124
|
+
return `${checks.passed} of ${checks.total} checks`;
|
|
125
|
+
}
|
|
126
|
+
function formatSeconds(seconds) {
|
|
127
|
+
return `${seconds.toFixed(1)}s`;
|
|
128
|
+
}
|
|
129
|
+
function summaryLines(input) {
|
|
130
|
+
const passed = input.verdicts.filter((v) => v.kind === "passed").length;
|
|
131
|
+
const failed = input.verdicts.filter((v) => v.kind === "failed").length;
|
|
132
|
+
const errored = input.verdicts.filter(
|
|
133
|
+
(v) => v.kind === "errored"
|
|
134
|
+
);
|
|
135
|
+
const denominator = passed + failed;
|
|
136
|
+
const lines = ["\u2500\u2500\u2500\u2500\u2500"];
|
|
137
|
+
let fraction;
|
|
138
|
+
if (denominator === 0) {
|
|
139
|
+
fraction = "no trials were evaluated";
|
|
140
|
+
} else {
|
|
141
|
+
fraction = `${passed} of ${denominator} passed`;
|
|
142
|
+
}
|
|
143
|
+
if (errored.length > 0) {
|
|
144
|
+
const reason = errored[0].reason;
|
|
145
|
+
const noun = errored.length === 1 ? "trial" : "trials";
|
|
146
|
+
fraction += ` \xB7 ${errored.length} ${noun} errored on ${reason}, excluded from the fraction`;
|
|
147
|
+
}
|
|
148
|
+
lines.push(fraction);
|
|
149
|
+
lines.push(...narratorReadingLines(input.narrated ?? []));
|
|
150
|
+
if (input.failingCriterionPhrase && typeof input.failingCriterionCount === "number" && input.failingCriterionCount > 0 && denominator > 0) {
|
|
151
|
+
lines.push(
|
|
152
|
+
`${input.failingCriterionPhrase} in ${input.failingCriterionCount} of ${denominator} \u2014 start there`
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
if (denominator > 0) {
|
|
156
|
+
lines.push("see the full breakdown \u2014 read-only, still no account:");
|
|
157
|
+
lines.push(`\u2192 ${input.previewUrl}`);
|
|
158
|
+
}
|
|
159
|
+
return lines;
|
|
160
|
+
}
|
|
161
|
+
|
|
90
162
|
// src/demo/runDemo.ts
|
|
91
163
|
var DEMO_FINALIZE_TIMEOUT_MS = 6e4;
|
|
92
164
|
async function runDemo(options) {
|
|
@@ -141,6 +213,7 @@ async function runDemo(options) {
|
|
|
141
213
|
const agentCommand = options.agentCommand ?? defaultDemoAgentCommand(process.execPath, process.argv[1]);
|
|
142
214
|
const verdicts = [];
|
|
143
215
|
const collectedFailures = [];
|
|
216
|
+
const collectedReadings = [];
|
|
144
217
|
let capacityAbort = null;
|
|
145
218
|
for (let i = 0; i < trials; i += 1) {
|
|
146
219
|
const session = sessions[i];
|
|
@@ -162,6 +235,7 @@ async function runDemo(options) {
|
|
|
162
235
|
captureServerCommand: options.captureServerCommand,
|
|
163
236
|
out,
|
|
164
237
|
collectedFailures,
|
|
238
|
+
collectedReadings,
|
|
165
239
|
progress
|
|
166
240
|
});
|
|
167
241
|
} catch (err) {
|
|
@@ -204,6 +278,7 @@ async function runDemo(options) {
|
|
|
204
278
|
verdicts,
|
|
205
279
|
failingCriterionPhrase: failing?.phrase,
|
|
206
280
|
failingCriterionCount: failing?.count,
|
|
281
|
+
narrated: collectedReadings,
|
|
207
282
|
previewUrl: `${options.dashboardBase.replace(/\/$/, "")}/demo/${groupId}`
|
|
208
283
|
})) {
|
|
209
284
|
out(line);
|
|
@@ -278,14 +353,18 @@ async function runOneTrial(input) {
|
|
|
278
353
|
input.progress.finalized = true;
|
|
279
354
|
const score = scoreFromFinalizeResponse(finalized);
|
|
280
355
|
const status = scoreStatus(score, 100);
|
|
356
|
+
const checks = { passed: score.passed, total: score.total_required };
|
|
357
|
+
if (status !== "incomplete") {
|
|
358
|
+
input.collectedReadings.push(...score.results.filter(isNarrated));
|
|
359
|
+
}
|
|
281
360
|
if (status === "pass") {
|
|
282
|
-
return { kind: "passed", seconds: agentSeconds };
|
|
361
|
+
return { kind: "passed", seconds: agentSeconds, checks };
|
|
283
362
|
}
|
|
284
363
|
if (status === "fail") {
|
|
285
364
|
const failedResults = score.results.filter((r) => outcomeOf(r) === "failed");
|
|
286
365
|
for (const r of failedResults) input.collectedFailures.push(r.criterion.text);
|
|
287
366
|
const note = failedResults[0] ? criterionPhrase(failedResults[0].criterion.text) : "criterion not met";
|
|
288
|
-
return { kind: "failed", seconds: agentSeconds, note };
|
|
367
|
+
return { kind: "failed", seconds: agentSeconds, note, checks };
|
|
289
368
|
}
|
|
290
369
|
return { kind: "errored", reason: "cloud could not evaluate the trace" };
|
|
291
370
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { newGroupId
|
|
2
|
-
import { runTaskHosted, resolveRunAgentIdentity } from './chunk-
|
|
3
|
-
import { createHostedClient, parseTaskFile, outcomeOf } from './chunk-
|
|
1
|
+
import { newGroupId } from './chunk-JNXZBK3O.js';
|
|
2
|
+
import { runTaskHosted, resolveRunAgentIdentity } from './chunk-4EPOCS3X.js';
|
|
3
|
+
import { createHostedClient, parseTaskFile, outcomeOf, isNarrated, criterionPhrase, narratorReadingLines } from './chunk-D3NCOYBV.js';
|
|
4
4
|
import './chunk-DWOCTCSE.js';
|
|
5
5
|
import './chunk-NW7HGA2K.js';
|
|
6
6
|
import './chunk-3T5XN64P.js';
|
|
@@ -60,6 +60,7 @@ function groupSummaryLines(input) {
|
|
|
60
60
|
fraction += ` \xB7 ${errored} errored, excluded from the fraction`;
|
|
61
61
|
}
|
|
62
62
|
lines.push(fraction);
|
|
63
|
+
lines.push(...narratorReadingLines(input.narrated ?? []));
|
|
63
64
|
if (input.failingCriterionPhrase && typeof input.failingCriterionCount === "number" && input.failingCriterionCount > 0 && completed.length > 0) {
|
|
64
65
|
lines.push(
|
|
65
66
|
`${input.failingCriterionPhrase} failed in ${input.failingCriterionCount} of ${completed.length} \u2014 start there`
|
|
@@ -188,6 +189,7 @@ async function runTrialGroup(options) {
|
|
|
188
189
|
};
|
|
189
190
|
const rows = new Array(options.trials);
|
|
190
191
|
const failedCriteria = [];
|
|
192
|
+
const narrated = [];
|
|
191
193
|
let printedRows = 0;
|
|
192
194
|
const flushRows = () => {
|
|
193
195
|
while (printedRows < options.trials && rows[printedRows] !== void 0) {
|
|
@@ -216,6 +218,9 @@ async function runTrialGroup(options) {
|
|
|
216
218
|
(r) => outcomeOf(r) === "failed"
|
|
217
219
|
);
|
|
218
220
|
for (const r of failing2) failedCriteria.push(r.criterion.text);
|
|
221
|
+
if (result.verdict !== "incomplete") {
|
|
222
|
+
narrated.push(...result.score.results.filter(isNarrated));
|
|
223
|
+
}
|
|
219
224
|
row = {
|
|
220
225
|
kind: "completed",
|
|
221
226
|
score: result.score.satisfaction,
|
|
@@ -257,6 +262,7 @@ async function runTrialGroup(options) {
|
|
|
257
262
|
rows,
|
|
258
263
|
failingCriterionPhrase: failing?.phrase,
|
|
259
264
|
failingCriterionCount: failing?.count,
|
|
265
|
+
narrated,
|
|
260
266
|
reliabilityUrl
|
|
261
267
|
})) {
|
|
262
268
|
out(line);
|
package/dist/src/cli/main.js
CHANGED
|
@@ -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-
|
|
3
|
-
import { assetPath, runTask, resolvePackageRoot, DEMO_TASK_NAME, demoTaskPath } from '../../chunk-
|
|
4
|
-
import { parseTaskFile, scoreStatus, runScoreLine, readLatestRun, readMetaSummary, outcomeOf, readConfigTwins, scoreCountsSummary,
|
|
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-4EPOCS3X.js';
|
|
3
|
+
import { assetPath, runTask, resolvePackageRoot, DEMO_TASK_NAME, demoTaskPath } from '../../chunk-NAU4UZOE.js';
|
|
4
|
+
import { parseTaskFile, scoreStatus, runScoreLine, narratorReadingLines, readLatestRun, readMetaSummary, outcomeOf, readConfigTwins, scoreCountsSummary, criterionRowLine, readCodeCriteria, createHostedClient, toTwinHttpEvent, redactJsonl, scoreFromFinalizeResponse, parseGitHubSeedState, uploadRunBlobs, isPreSatisfied } from '../../chunk-D3NCOYBV.js';
|
|
5
5
|
import '../../chunk-DWOCTCSE.js';
|
|
6
6
|
import '../../chunk-NW7HGA2K.js';
|
|
7
7
|
import { GMAIL_CHECKS } from '../../chunk-JM6VS62R.js';
|
|
@@ -405,7 +405,7 @@ var DOCS_TOPICS = [
|
|
|
405
405
|
{
|
|
406
406
|
id: "getting-started",
|
|
407
407
|
title: "Quickstart",
|
|
408
|
-
path: "/quickstart/
|
|
408
|
+
path: "/quickstart/coding-agent",
|
|
409
409
|
keywords: ["install", "quickstart", "setup", "begin"]
|
|
410
410
|
},
|
|
411
411
|
{
|
|
@@ -3943,9 +3943,7 @@ async function runEvalCommand(runDirArg, opts) {
|
|
|
3943
3943
|
if (result.score.results.length > 0) {
|
|
3944
3944
|
console.error(` criteria: ${scoreCountsSummary(result.score)}`);
|
|
3945
3945
|
for (const criterionResult of result.score.results) {
|
|
3946
|
-
console.error(
|
|
3947
|
-
` ${markerFor(outcomeOf(criterionResult))} ${criterionMarkerLabel(criterionResult.criterion)} ${criterionResult.criterion.text}${twinSkipSuffix(criterionResult)}`
|
|
3948
|
-
);
|
|
3946
|
+
console.error(` ${criterionRowLine(criterionResult)}`);
|
|
3949
3947
|
}
|
|
3950
3948
|
}
|
|
3951
3949
|
if (result.reusedSession) {
|
|
@@ -4641,7 +4639,7 @@ function firstSentence(description) {
|
|
|
4641
4639
|
function resolveExampleRef(env = process.env) {
|
|
4642
4640
|
const override = env.POME_EXAMPLE_REF?.trim();
|
|
4643
4641
|
if (override) return override;
|
|
4644
|
-
const baked = "
|
|
4642
|
+
const baked = "76f126bc15b2467859785d59555570627963259e".trim() ;
|
|
4645
4643
|
return FULL_SHA.test(baked) ? baked : "main";
|
|
4646
4644
|
}
|
|
4647
4645
|
function rawUrlFor(example, file, ref) {
|
|
@@ -4996,7 +4994,7 @@ var DEFAULT_AGENT_COMMAND = `node ${DEFAULT_AGENT_FILE}`;
|
|
|
4996
4994
|
var MANIFEST_SCHEMA_URL = "https://pome.sh/schemas/v1/pome.json";
|
|
4997
4995
|
var MAX_UNREADABLE_PATHS_SHOWN = 5;
|
|
4998
4996
|
function readPackageVersion() {
|
|
4999
|
-
if ("0.35.
|
|
4997
|
+
if ("0.35.3".length > 0) return "0.35.3";
|
|
5000
4998
|
try {
|
|
5001
4999
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
5002
5000
|
const candidates = [
|
|
@@ -5513,7 +5511,7 @@ function createProgram() {
|
|
|
5513
5511
|
taskForRuns.config.runs
|
|
5514
5512
|
);
|
|
5515
5513
|
if (k > 1) {
|
|
5516
|
-
const { runTrialGroup } = await import('../../runTrialGroup-
|
|
5514
|
+
const { runTrialGroup } = await import('../../runTrialGroup-WZ3CUKYB.js');
|
|
5517
5515
|
const fileForRerun = relative(process.cwd(), file);
|
|
5518
5516
|
const rerunCommand = defaultTask ? options.trials !== void 0 ? `pome run -n ${k}` : "pome run" : `pome run ${fileForRerun && !fileForRerun.startsWith("..") ? fileForRerun : file} -n ${k}`;
|
|
5519
5517
|
const groupResult = await runTrialGroup({
|
|
@@ -5551,6 +5549,9 @@ function createProgram() {
|
|
|
5551
5549
|
const label = status === "pass" ? "PASS" : status === "fail" ? "FAIL" : "INCOMPLETE";
|
|
5552
5550
|
console.error(`${label} ${result.scenario.title}`);
|
|
5553
5551
|
console.error(` ${runScoreLine(result.score, result.scenario.config.passThreshold, "cloud score")}`);
|
|
5552
|
+
for (const line of narratorReadingLines(result.score.results)) {
|
|
5553
|
+
console.error(` ${line}`);
|
|
5554
|
+
}
|
|
5554
5555
|
console.error(` local: ${result.artifacts.runDir}`);
|
|
5555
5556
|
console.error(` cloud: ${result.cloudDashboardUrl}`);
|
|
5556
5557
|
if (result.exitCode !== 0) worstExit = result.exitCode;
|
|
@@ -5607,7 +5608,7 @@ function createProgram() {
|
|
|
5607
5608
|
process.exitCode = 5;
|
|
5608
5609
|
return;
|
|
5609
5610
|
}
|
|
5610
|
-
const { runDemo } = await import('../../runDemo-
|
|
5611
|
+
const { runDemo } = await import('../../runDemo-EBSKTX6V.js');
|
|
5611
5612
|
const result = await runDemo({
|
|
5612
5613
|
apiBase: opts.apiUrl.replace(/\/$/, ""),
|
|
5613
5614
|
dashboardBase: process.env.POME_DASHBOARD_URL ?? DEFAULT_DASHBOARD_URL,
|
package/package.json
CHANGED
package/dist/chunk-RGZBC7NF.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { randomBytes } from 'node:crypto';
|
|
2
|
-
|
|
3
|
-
// src/demo/ids.ts
|
|
4
|
-
var NANOID_ALPHABET = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
5
|
-
function nanoid(size = 21) {
|
|
6
|
-
const bytes = randomBytes(size);
|
|
7
|
-
let id = "";
|
|
8
|
-
for (let i = 0; i < size; i += 1) {
|
|
9
|
-
id += NANOID_ALPHABET[bytes[i] & 63];
|
|
10
|
-
}
|
|
11
|
-
return id;
|
|
12
|
-
}
|
|
13
|
-
function newGroupId() {
|
|
14
|
-
return `grp_${nanoid(21)}`;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// src/demo/render.ts
|
|
18
|
-
function reassuranceBox() {
|
|
19
|
-
const lines = [
|
|
20
|
-
"pome demo \xB7 running locally",
|
|
21
|
-
"No signup. No API keys.",
|
|
22
|
-
"The GitHub twin runs on your machine; model calls go through pome's",
|
|
23
|
-
"anonymous demo gateway; the trace is evaluated in pome cloud.",
|
|
24
|
-
"Your repo and your data are never touched."
|
|
25
|
-
];
|
|
26
|
-
const width = Math.max(...lines.map((line) => line.length));
|
|
27
|
-
const top = `\u250C${"\u2500".repeat(width + 2)}\u2510`;
|
|
28
|
-
const bottom = `\u2514${"\u2500".repeat(width + 2)}\u2518`;
|
|
29
|
-
return [top, ...lines.map((line) => `\u2502 ${line.padEnd(width)} \u2502`), bottom];
|
|
30
|
-
}
|
|
31
|
-
function twinReadyLine(seconds) {
|
|
32
|
-
return `spinning up github twin \u2026 ready (${seconds.toFixed(1)}s)`;
|
|
33
|
-
}
|
|
34
|
-
function trialsHeaderLine(count, taskName) {
|
|
35
|
-
return `running ${count} isolated trials of ${taskName} \u2026`;
|
|
36
|
-
}
|
|
37
|
-
function evaluatingLine(index) {
|
|
38
|
-
return `trial ${index} \u2026 evaluating in the cloud \u2026`;
|
|
39
|
-
}
|
|
40
|
-
function trialLine(index, verdict) {
|
|
41
|
-
switch (verdict.kind) {
|
|
42
|
-
case "passed":
|
|
43
|
-
return `trial ${index} \u2713 passed ${formatSeconds(verdict.seconds)}`;
|
|
44
|
-
case "failed":
|
|
45
|
-
return `trial ${index} \u2717 failed ${formatSeconds(verdict.seconds)} ${verdict.note}`;
|
|
46
|
-
case "errored":
|
|
47
|
-
return `trial ${index} \u26A0 errored ${verdict.reason} \u2014 excluded`;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function formatSeconds(seconds) {
|
|
51
|
-
return `${seconds.toFixed(1)}s`;
|
|
52
|
-
}
|
|
53
|
-
function summaryLines(input) {
|
|
54
|
-
const passed = input.verdicts.filter((v) => v.kind === "passed").length;
|
|
55
|
-
const failed = input.verdicts.filter((v) => v.kind === "failed").length;
|
|
56
|
-
const errored = input.verdicts.filter(
|
|
57
|
-
(v) => v.kind === "errored"
|
|
58
|
-
);
|
|
59
|
-
const denominator = passed + failed;
|
|
60
|
-
const lines = ["\u2500\u2500\u2500\u2500\u2500"];
|
|
61
|
-
let fraction;
|
|
62
|
-
if (denominator === 0) {
|
|
63
|
-
fraction = "no trials were evaluated";
|
|
64
|
-
} else {
|
|
65
|
-
fraction = `${passed} of ${denominator} passed`;
|
|
66
|
-
}
|
|
67
|
-
if (errored.length > 0) {
|
|
68
|
-
const reason = errored[0].reason;
|
|
69
|
-
const noun = errored.length === 1 ? "trial" : "trials";
|
|
70
|
-
fraction += ` \xB7 ${errored.length} ${noun} errored on ${reason}, excluded from the fraction`;
|
|
71
|
-
}
|
|
72
|
-
lines.push(fraction);
|
|
73
|
-
if (input.failingCriterionPhrase && typeof input.failingCriterionCount === "number" && input.failingCriterionCount > 0 && denominator > 0) {
|
|
74
|
-
lines.push(
|
|
75
|
-
`${input.failingCriterionPhrase} in ${input.failingCriterionCount} of ${denominator} \u2014 start there`
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
if (denominator > 0) {
|
|
79
|
-
lines.push("see the full breakdown \u2014 read-only, still no account:");
|
|
80
|
-
lines.push(`\u2192 ${input.previewUrl}`);
|
|
81
|
-
}
|
|
82
|
-
return lines;
|
|
83
|
-
}
|
|
84
|
-
function criterionPhrase(text) {
|
|
85
|
-
const clause = text.split(/[.;]/)[0]?.trim() ?? text.trim();
|
|
86
|
-
const lowered = clause.length > 0 ? clause[0].toLowerCase() + clause.slice(1) : clause;
|
|
87
|
-
return lowered.length > 64 ? `${lowered.slice(0, 61).trimEnd()}\u2026` : lowered;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export { criterionPhrase, evaluatingLine, newGroupId, reassuranceBox, summaryLines, trialLine, trialsHeaderLine, twinReadyLine };
|