@pome-sh/cli 0.23.9 → 0.23.11
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/{checks-V76LVIJE.js → checks-RGGGYUMP.js} +1 -1
- package/dist/{chunk-3SOI5EKJ.js → chunk-7I53HBHS.js} +2 -2
- package/dist/{chunk-GYKU53JU.js → chunk-FNLI5YX3.js} +78 -70
- package/dist/{chunk-6OT4IW25.js → chunk-IDNSKKEC.js} +12 -6
- package/dist/{chunk-FLGJ5GBX.js → chunk-JT6MYL7P.js} +1 -1
- package/dist/{chunk-ZRDVM4QC.js → chunk-UR3HUJDI.js} +1 -1
- package/dist/{chunk-IG76HVJS.js → chunk-VO3FOSAZ.js} +2 -2
- package/dist/{runDemo-QWCVL772.js → runDemo-SU5X6P27.js} +4 -4
- package/dist/{runTrialGroup-2NYQU3CM.js → runTrialGroup-VR2RS2RH.js} +3 -3
- package/dist/src/cli/main.js +45 -13
- package/dist/{src-D3CNAM6U.js → src-ZRMSHGVJ.js} +1 -1
- package/dist/twinHarness-MA7NQHL2.js +5 -0
- package/dist/{twinStart-DI4PUPQ2.js → twinStart-HKIRLN4U.js} +2 -2
- package/package.json +1 -1
- package/dist/twinHarness-5ZQMXYHU.js +0 -5
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-
|
|
3
|
+
"version": "0.23.11",
|
|
4
|
+
"git_sha": "0dbb84dc7726b94d8e6a3d1199f64ac583166990",
|
|
5
|
+
"build_time": "2026-08-11T13:17:29.925Z"
|
|
6
6
|
}
|
|
@@ -183,7 +183,7 @@ async function checkTwinReachable(_configDir) {
|
|
|
183
183
|
});
|
|
184
184
|
let harness;
|
|
185
185
|
try {
|
|
186
|
-
const { bootTwin } = await import('./twinHarness-
|
|
186
|
+
const { bootTwin } = await import('./twinHarness-MA7NQHL2.js');
|
|
187
187
|
harness = await bootTwin({
|
|
188
188
|
twin: "github",
|
|
189
189
|
seedState: void 0,
|
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
4
|
-
import { createRecorder, bootTwin } from './chunk-
|
|
3
|
+
import { parseTaskFile, seedStateForTwin, runAgentCommand, writeRunArtifactsCore } from './chunk-UR3HUJDI.js';
|
|
4
|
+
import { createRecorder, bootTwin } from './chunk-JT6MYL7P.js';
|
|
5
5
|
import { eventSchema } from './chunk-VBATFCWR.js';
|
|
6
6
|
import { redactSecrets, redactEvent } from './chunk-SG6ZTIMT.js';
|
|
7
7
|
import { serve } from '@hono/node-server';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { readManifest, normalizeManifestTwins } from './chunk-XOWIA7NR.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-UR3HUJDI.js';
|
|
3
3
|
import { MOUNTED_TWINS, HostedAuthError, HostedDiscardRefusedError, HostedQuotaError, HostedOrchError, HostedTrialError, agentResponseSchema } from './chunk-7AMIVWUB.js';
|
|
4
4
|
import { redactSecrets, redactEvent } from './chunk-SG6ZTIMT.js';
|
|
5
5
|
import { existsSync } from 'node:fs';
|
|
6
|
-
import {
|
|
6
|
+
import { rm, readFile, stat, mkdir, writeFile, chmod, mkdtemp, readdir } 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';
|
|
@@ -11,6 +11,49 @@ import { promisify } from 'node:util';
|
|
|
11
11
|
import { createInterface } from 'node:readline';
|
|
12
12
|
import { randomUUID, createHash } from 'node:crypto';
|
|
13
13
|
|
|
14
|
+
// src/hosted/runSets.ts
|
|
15
|
+
function groupRunSets(trials) {
|
|
16
|
+
const byKey = /* @__PURE__ */ new Map();
|
|
17
|
+
for (const trial of trials) {
|
|
18
|
+
const key = trial.verdict.group_id ?? `solo:${trial.verdict.session_id}`;
|
|
19
|
+
const bucket = byKey.get(key);
|
|
20
|
+
if (bucket) bucket.push(trial);
|
|
21
|
+
else byKey.set(key, [trial]);
|
|
22
|
+
}
|
|
23
|
+
const sets = [];
|
|
24
|
+
for (const bucket of byKey.values()) {
|
|
25
|
+
bucket.sort(
|
|
26
|
+
(a, b) => a.verdict.finalized_at.localeCompare(b.verdict.finalized_at)
|
|
27
|
+
);
|
|
28
|
+
const last = bucket[bucket.length - 1];
|
|
29
|
+
const hasFailed = bucket.some((t) => t.verdict.state === "fail");
|
|
30
|
+
const allPassed = bucket.every((t) => t.verdict.state === "pass");
|
|
31
|
+
sets.push({
|
|
32
|
+
groupId: bucket[0].verdict.group_id,
|
|
33
|
+
taskName: bucket[0].verdict.task_name,
|
|
34
|
+
taskPath: bucket[0].verdict.task_path,
|
|
35
|
+
trials: bucket,
|
|
36
|
+
latestFinalizedAt: last.verdict.finalized_at,
|
|
37
|
+
outcome: hasFailed ? "fail" : allPassed ? "pass" : "incomplete"
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
sets.sort((a, b) => a.latestFinalizedAt.localeCompare(b.latestFinalizedAt));
|
|
41
|
+
return sets;
|
|
42
|
+
}
|
|
43
|
+
function latestFailedRunSet(sets) {
|
|
44
|
+
for (let i = sets.length - 1; i >= 0; i -= 1) {
|
|
45
|
+
if (sets[i].outcome === "fail") return sets[i];
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
function latestIncompleteRunSet(sets) {
|
|
50
|
+
for (let i = sets.length - 1; i >= 0; i -= 1) {
|
|
51
|
+
if (sets[i].outcome === "incomplete") return sets[i];
|
|
52
|
+
}
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// src/hosted/evalResultCache.ts
|
|
14
57
|
var VERDICT_ARTIFACT_VERSION = 2;
|
|
15
58
|
var VERDICT_FILENAME = "verdict.json";
|
|
16
59
|
var VALID_STATES = /* @__PURE__ */ new Set([
|
|
@@ -80,11 +123,12 @@ async function readVerdictArtifactDetailed(runDir) {
|
|
|
80
123
|
async function scanVerdictArtifactsDetailed(artifactsRoot) {
|
|
81
124
|
const trials = [];
|
|
82
125
|
const staleVersionDirs = [];
|
|
126
|
+
const unreadableDirs = [];
|
|
83
127
|
let slugs;
|
|
84
128
|
try {
|
|
85
129
|
slugs = await readdir(artifactsRoot);
|
|
86
130
|
} catch {
|
|
87
|
-
return { trials, staleVersionDirs };
|
|
131
|
+
return { trials, staleVersionDirs, unreadableDirs };
|
|
88
132
|
}
|
|
89
133
|
for (const slug of slugs) {
|
|
90
134
|
const slugDir = join(artifactsRoot, slug);
|
|
@@ -99,49 +143,13 @@ async function scanVerdictArtifactsDetailed(artifactsRoot) {
|
|
|
99
143
|
const result = await readVerdictArtifactDetailed(runDir);
|
|
100
144
|
if (result.status === "ok") trials.push(result.trial);
|
|
101
145
|
else if (result.status === "stale-version") staleVersionDirs.push(runDir);
|
|
146
|
+
else if (result.status === "unreadable" && existsSync(join(runDir, VERDICT_FILENAME))) {
|
|
147
|
+
unreadableDirs.push(runDir);
|
|
148
|
+
}
|
|
102
149
|
}
|
|
103
150
|
}
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
function groupRunSets(trials) {
|
|
107
|
-
const byKey = /* @__PURE__ */ new Map();
|
|
108
|
-
for (const trial of trials) {
|
|
109
|
-
const key = trial.verdict.group_id ?? `solo:${trial.verdict.session_id}`;
|
|
110
|
-
const bucket = byKey.get(key);
|
|
111
|
-
if (bucket) bucket.push(trial);
|
|
112
|
-
else byKey.set(key, [trial]);
|
|
113
|
-
}
|
|
114
|
-
const sets = [];
|
|
115
|
-
for (const bucket of byKey.values()) {
|
|
116
|
-
bucket.sort(
|
|
117
|
-
(a, b) => a.verdict.finalized_at.localeCompare(b.verdict.finalized_at)
|
|
118
|
-
);
|
|
119
|
-
const last = bucket[bucket.length - 1];
|
|
120
|
-
const hasFailed = bucket.some((t) => t.verdict.state === "fail");
|
|
121
|
-
const allPassed = bucket.every((t) => t.verdict.state === "pass");
|
|
122
|
-
sets.push({
|
|
123
|
-
groupId: bucket[0].verdict.group_id,
|
|
124
|
-
taskName: bucket[0].verdict.task_name,
|
|
125
|
-
taskPath: bucket[0].verdict.task_path,
|
|
126
|
-
trials: bucket,
|
|
127
|
-
latestFinalizedAt: last.verdict.finalized_at,
|
|
128
|
-
outcome: hasFailed ? "fail" : allPassed ? "pass" : "incomplete"
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
sets.sort((a, b) => a.latestFinalizedAt.localeCompare(b.latestFinalizedAt));
|
|
132
|
-
return sets;
|
|
133
|
-
}
|
|
134
|
-
function latestFailedRunSet(sets) {
|
|
135
|
-
for (let i = sets.length - 1; i >= 0; i -= 1) {
|
|
136
|
-
if (sets[i].outcome === "fail") return sets[i];
|
|
137
|
-
}
|
|
138
|
-
return null;
|
|
139
|
-
}
|
|
140
|
-
function latestIncompleteRunSet(sets) {
|
|
141
|
-
for (let i = sets.length - 1; i >= 0; i -= 1) {
|
|
142
|
-
if (sets[i].outcome === "incomplete") return sets[i];
|
|
143
|
-
}
|
|
144
|
-
return null;
|
|
151
|
+
unreadableDirs.sort();
|
|
152
|
+
return { trials, staleVersionDirs, unreadableDirs };
|
|
145
153
|
}
|
|
146
154
|
async function discoverRunSet(target) {
|
|
147
155
|
const anchorResult = await readVerdictArtifactDetailed(target);
|
|
@@ -151,13 +159,26 @@ async function discoverRunSet(target) {
|
|
|
151
159
|
set: null,
|
|
152
160
|
incompleteSet: null,
|
|
153
161
|
totalSets: 0,
|
|
154
|
-
staleVersionCount: 1
|
|
162
|
+
staleVersionCount: 1,
|
|
163
|
+
unreadableCount: 0,
|
|
164
|
+
unreadablePaths: []
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
if (anchorResult.status === "unreadable" && existsSync(join(target, VERDICT_FILENAME))) {
|
|
168
|
+
return {
|
|
169
|
+
kind: "trial-dir",
|
|
170
|
+
set: null,
|
|
171
|
+
incompleteSet: null,
|
|
172
|
+
totalSets: 0,
|
|
173
|
+
staleVersionCount: 0,
|
|
174
|
+
unreadableCount: 1,
|
|
175
|
+
unreadablePaths: [target]
|
|
155
176
|
};
|
|
156
177
|
}
|
|
157
178
|
if (anchorResult.status === "ok") {
|
|
158
179
|
const anchor = anchorResult.trial;
|
|
159
180
|
const root = join(target, "..", "..");
|
|
160
|
-
const { trials: trials2, staleVersionDirs: staleVersionDirs2 } = await scanVerdictArtifactsDetailed(root);
|
|
181
|
+
const { trials: trials2, staleVersionDirs: staleVersionDirs2, unreadableDirs: unreadableDirs2 } = await scanVerdictArtifactsDetailed(root);
|
|
161
182
|
const sets2 = groupRunSets(trials2);
|
|
162
183
|
const own = sets2.find(
|
|
163
184
|
(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
|
|
@@ -167,7 +188,9 @@ async function discoverRunSet(target) {
|
|
|
167
188
|
set: own,
|
|
168
189
|
incompleteSet: null,
|
|
169
190
|
totalSets: Math.max(sets2.length, 1),
|
|
170
|
-
staleVersionCount: staleVersionDirs2.length
|
|
191
|
+
staleVersionCount: staleVersionDirs2.length,
|
|
192
|
+
unreadableCount: unreadableDirs2.length,
|
|
193
|
+
unreadablePaths: unreadableDirs2
|
|
171
194
|
};
|
|
172
195
|
}
|
|
173
196
|
if (!existsSync(target)) {
|
|
@@ -176,10 +199,12 @@ async function discoverRunSet(target) {
|
|
|
176
199
|
set: null,
|
|
177
200
|
incompleteSet: null,
|
|
178
201
|
totalSets: 0,
|
|
179
|
-
staleVersionCount: 0
|
|
202
|
+
staleVersionCount: 0,
|
|
203
|
+
unreadableCount: 0,
|
|
204
|
+
unreadablePaths: []
|
|
180
205
|
};
|
|
181
206
|
}
|
|
182
|
-
const { trials, staleVersionDirs } = await scanVerdictArtifactsDetailed(target);
|
|
207
|
+
const { trials, staleVersionDirs, unreadableDirs } = await scanVerdictArtifactsDetailed(target);
|
|
183
208
|
const sets = groupRunSets(trials);
|
|
184
209
|
const failedSet = latestFailedRunSet(sets);
|
|
185
210
|
return {
|
|
@@ -187,28 +212,11 @@ async function discoverRunSet(target) {
|
|
|
187
212
|
set: failedSet,
|
|
188
213
|
incompleteSet: failedSet ? null : latestIncompleteRunSet(sets),
|
|
189
214
|
totalSets: sets.length,
|
|
190
|
-
staleVersionCount: staleVersionDirs.length
|
|
215
|
+
staleVersionCount: staleVersionDirs.length,
|
|
216
|
+
unreadableCount: unreadableDirs.length,
|
|
217
|
+
unreadablePaths: unreadableDirs
|
|
191
218
|
};
|
|
192
219
|
}
|
|
193
|
-
async function loadTrialEvents(runDir) {
|
|
194
|
-
let raw;
|
|
195
|
-
try {
|
|
196
|
-
raw = await readFile(join(runDir, "events.jsonl"), "utf8");
|
|
197
|
-
} catch {
|
|
198
|
-
return [];
|
|
199
|
-
}
|
|
200
|
-
const events = [];
|
|
201
|
-
for (const line of raw.split("\n")) {
|
|
202
|
-
const trimmed = line.trim();
|
|
203
|
-
if (!trimmed) continue;
|
|
204
|
-
try {
|
|
205
|
-
const parsed = JSON.parse(trimmed);
|
|
206
|
-
if (typeof parsed === "object" && parsed !== null) events.push(parsed);
|
|
207
|
-
} catch {
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
return events;
|
|
211
|
-
}
|
|
212
220
|
var execFileAsync = promisify(execFile);
|
|
213
221
|
var SERVICE = "sh.pome.cli";
|
|
214
222
|
var ACCOUNT = "hosted";
|
|
@@ -1239,4 +1247,4 @@ async function abandonBestEffort(client, sessionId, errorCode) {
|
|
|
1239
1247
|
}
|
|
1240
1248
|
}
|
|
1241
1249
|
|
|
1242
|
-
export { DEFAULT_CONTROL_PLANE_URL, DEFAULT_DASHBOARD_URL, DEFAULT_DOCS_SITE_ORIGIN, VERDICT_ARTIFACT_VERSION, clearLocalCredentials, discoverRunSet, ensurePomeGitignored, friendlyHostedError,
|
|
1250
|
+
export { DEFAULT_CONTROL_PLANE_URL, DEFAULT_DASHBOARD_URL, DEFAULT_DOCS_SITE_ORIGIN, VERDICT_ARTIFACT_VERSION, clearLocalCredentials, discoverRunSet, ensurePomeGitignored, friendlyHostedError, persistCredentialsAfterLogin, postAgentResolver, readLinkCache, resolveCachedAgentId, resolveCredentials, resolveRunAgentIdentity, resolveSeams, runSessionCreate, runSessionList, runSessionStop, runTaskHosted, writeLinkCache };
|
|
@@ -172,7 +172,7 @@ var noMessagePosted = defineCheck({
|
|
|
172
172
|
});
|
|
173
173
|
var noReactionAdded = defineCheck({
|
|
174
174
|
id: "slack.no-reaction-added",
|
|
175
|
-
description: "Resolves the named channel, then filters the TOP-LEVEL reactions list by that channel's id and this emoji name, asserting no row matches. Reactions are not nested under their channel in the export, so this is a join the predicate performs itself. It asserts nothing about which message was reacted to, or by whom.",
|
|
175
|
+
description: "Resolves the named channel, then filters the TOP-LEVEL reactions list by that channel's id and this emoji name, asserting no row matches. Reactions are not nested under their channel in the export, so this is a join the predicate performs itself. It asserts nothing about which message was reacted to, or by whom. An export carrying no `reactions` collection at all is SKIPPED, because absent is not the same as none.",
|
|
176
176
|
template: 'No "{reaction}" reaction was added in the "{channel}" channel',
|
|
177
177
|
params: { reaction: emojiName, channel: channelName },
|
|
178
178
|
substrate: "final",
|
|
@@ -208,14 +208,20 @@ var noReactionAdded = defineCheck({
|
|
|
208
208
|
const found = resolveChannel(final, channel);
|
|
209
209
|
if ("missing" in found)
|
|
210
210
|
return missSkip(found);
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
joined.push(statePath("reactions"));
|
|
211
|
+
if (final.reactions == null)
|
|
212
|
+
return STATE_INCOMPLETE;
|
|
213
|
+
const hit = final.reactions.some((row) => row.channel_id === found.found.id && row.name === reaction);
|
|
215
214
|
return {
|
|
216
215
|
passed: !hit,
|
|
217
216
|
reason: hit ? `reaction "${reaction}" found in channel "${channel}"` : `no reaction "${reaction}" in channel "${channel}"`,
|
|
218
|
-
|
|
217
|
+
// BOTH sides of the join, because this predicate really does read two
|
|
218
|
+
// places and a reader who opens only one cannot check its work: the
|
|
219
|
+
// channel row is where the id came from, the top-level reactions list is
|
|
220
|
+
// what was filtered. Reactions are not nested under their channel in the
|
|
221
|
+
// export — that is the whole reason this check performs a join — so one
|
|
222
|
+
// pointer cannot say it. The guard above already proved `reactions` is
|
|
223
|
+
// present, so both pointers always resolve.
|
|
224
|
+
evidenceStatePaths: [found.path, statePath("reactions")]
|
|
219
225
|
};
|
|
220
226
|
}
|
|
221
227
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TWIN_NAMES, isTwinName, TWIN_REGISTRY } from './chunk-
|
|
1
|
+
import { TWIN_NAMES, isTwinName, TWIN_REGISTRY } from './chunk-VO3FOSAZ.js';
|
|
2
2
|
import { createFileBackedRecorderStore, createRecorderStore } from './chunk-TV5S6WQV.js';
|
|
3
3
|
|
|
4
4
|
// src/recorder/recorder.ts
|
|
@@ -2,7 +2,7 @@ import { criterionSchema, finalizeResponseSchema, HostedDiscardRefusedError, Hos
|
|
|
2
2
|
import { seedSchema, parseSeed, defaultSeedState as defaultSeedState$2 } from './chunk-KIUIKAVU.js';
|
|
3
3
|
import { gmailSeedSchema, defaultSeedState } from './chunk-NJ246QPJ.js';
|
|
4
4
|
import { linearSeedSchema, defaultSeedState as defaultSeedState$1 } from './chunk-ZKID2HS3.js';
|
|
5
|
-
import { isTwinName, TWIN_REGISTRY } from './chunk-
|
|
5
|
+
import { isTwinName, TWIN_REGISTRY } from './chunk-VO3FOSAZ.js';
|
|
6
6
|
import { toTwinHttpEventRow } from './chunk-TV5S6WQV.js';
|
|
7
7
|
import { redactEvent, redactSecrets } from './chunk-SG6ZTIMT.js';
|
|
8
8
|
import { mkdir, appendFile, writeFile, readFile } from 'node:fs/promises';
|
|
@@ -59,9 +59,9 @@ var TWIN_REGISTRY = {
|
|
|
59
59
|
envName: "SLACK",
|
|
60
60
|
defaultPort: 3333,
|
|
61
61
|
version: package_default2.version,
|
|
62
|
-
defaultSeed: async () => (await import('./src-
|
|
62
|
+
defaultSeed: async () => (await import('./src-ZRMSHGVJ.js')).defaultSeedState(),
|
|
63
63
|
async boot({ seedState, runId, recorder }) {
|
|
64
|
-
const { createSlackTwinApp, openSlackTwinDatabase, SlackDomain } = await import('./src-
|
|
64
|
+
const { createSlackTwinApp, openSlackTwinDatabase, SlackDomain } = await import('./src-ZRMSHGVJ.js');
|
|
65
65
|
const db = openSlackTwinDatabase(":memory:");
|
|
66
66
|
const domain = new SlackDomain(db);
|
|
67
67
|
domain.applySeed(seedState);
|
|
@@ -1,16 +1,16 @@
|
|
|
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-7I53HBHS.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-UR3HUJDI.js';
|
|
7
7
|
import './chunk-NW7HGA2K.js';
|
|
8
8
|
import { HostedQuotaError, HostedOrchError } from './chunk-7AMIVWUB.js';
|
|
9
9
|
import './chunk-KIUIKAVU.js';
|
|
10
10
|
import './chunk-NJ246QPJ.js';
|
|
11
11
|
import './chunk-ZKID2HS3.js';
|
|
12
|
-
import { bootTwin } from './chunk-
|
|
13
|
-
import './chunk-
|
|
12
|
+
import { bootTwin } from './chunk-JT6MYL7P.js';
|
|
13
|
+
import './chunk-VO3FOSAZ.js';
|
|
14
14
|
import './chunk-TV5S6WQV.js';
|
|
15
15
|
import './chunk-VBATFCWR.js';
|
|
16
16
|
import './chunk-SG6ZTIMT.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { newGroupId, criterionPhrase } from './chunk-RGZBC7NF.js';
|
|
2
|
-
import { runTaskHosted, resolveRunAgentIdentity } from './chunk-
|
|
2
|
+
import { runTaskHosted, resolveRunAgentIdentity } from './chunk-FNLI5YX3.js';
|
|
3
3
|
import './chunk-XOWIA7NR.js';
|
|
4
|
-
import { createHostedClient, parseTaskFile, outcomeOf } from './chunk-
|
|
4
|
+
import { createHostedClient, parseTaskFile, outcomeOf } from './chunk-UR3HUJDI.js';
|
|
5
5
|
import './chunk-NW7HGA2K.js';
|
|
6
6
|
import { HostedQuotaError, HostedTrialError } from './chunk-7AMIVWUB.js';
|
|
7
7
|
import './chunk-KIUIKAVU.js';
|
|
8
8
|
import './chunk-NJ246QPJ.js';
|
|
9
9
|
import './chunk-ZKID2HS3.js';
|
|
10
|
-
import './chunk-
|
|
10
|
+
import './chunk-VO3FOSAZ.js';
|
|
11
11
|
import './chunk-TV5S6WQV.js';
|
|
12
12
|
import './chunk-VBATFCWR.js';
|
|
13
13
|
import './chunk-SG6ZTIMT.js';
|
package/dist/src/cli/main.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
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,
|
|
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-FNLI5YX3.js';
|
|
3
3
|
import { readManifest, writeManifest, MANIFEST_JSON, readRequiredManifest, normalizeManifestTwins } from '../../chunk-XOWIA7NR.js';
|
|
4
|
-
import { assetPath, runTask, resolvePackageRoot, DEMO_TASK_NAME, demoTaskPath } from '../../chunk-
|
|
4
|
+
import { assetPath, runTask, resolvePackageRoot, DEMO_TASK_NAME, demoTaskPath } from '../../chunk-7I53HBHS.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-UR3HUJDI.js';
|
|
8
8
|
import '../../chunk-NW7HGA2K.js';
|
|
9
9
|
import { MOUNTED_TWINS, deriveAgentSlug, exitCodeFor, HostedUsageError, HostedOrchError, HostedAuthError, HostedQuotaError } from '../../chunk-7AMIVWUB.js';
|
|
10
10
|
import { TAPE_ASSERTABLE_TOOLS } from '../../chunk-FKZZWWYC.js';
|
|
11
11
|
import { seedSchema } from '../../chunk-KIUIKAVU.js';
|
|
12
|
-
import { SLACK_CHECKS } from '../../chunk-
|
|
12
|
+
import { SLACK_CHECKS } from '../../chunk-IDNSKKEC.js';
|
|
13
13
|
import { GMAIL_CHECKS } from '../../chunk-SE44FKWH.js';
|
|
14
14
|
import '../../chunk-NJ246QPJ.js';
|
|
15
15
|
import { LINEAR_CHECKS } from '../../chunk-XBT6ZLBG.js';
|
|
16
16
|
import '../../chunk-ZKID2HS3.js';
|
|
17
17
|
import { oneOf, defineCheck, repoRef, VACUITY_SENTINEL_NUMBER, childStatePath, VACUITY_SENTINEL, statePath, templateSlots, renderCheck, checksDigest, checkPattern, checkNearMissPattern } from '../../chunk-JWJYNAWI.js';
|
|
18
|
-
import '../../chunk-
|
|
19
|
-
import { TWIN_NAME_LIST, isTwinName, createGitHubSmokeApp } from '../../chunk-
|
|
18
|
+
import '../../chunk-JT6MYL7P.js';
|
|
19
|
+
import { TWIN_NAME_LIST, isTwinName, createGitHubSmokeApp } from '../../chunk-VO3FOSAZ.js';
|
|
20
20
|
import '../../chunk-TV5S6WQV.js';
|
|
21
21
|
import { isLegacyEventRow, eventSchema } from '../../chunk-VBATFCWR.js';
|
|
22
22
|
import { redactEvent, redactSecrets } from '../../chunk-SG6ZTIMT.js';
|
|
@@ -4513,6 +4513,25 @@ function buildGroupFixPrompt(ctx) {
|
|
|
4513
4513
|
|
|
4514
4514
|
${buildGroupFixUserPrompt(ctx)}`;
|
|
4515
4515
|
}
|
|
4516
|
+
async function loadTrialEvents(runDir) {
|
|
4517
|
+
let raw;
|
|
4518
|
+
try {
|
|
4519
|
+
raw = await readFile(join(runDir, "events.jsonl"), "utf8");
|
|
4520
|
+
} catch {
|
|
4521
|
+
return [];
|
|
4522
|
+
}
|
|
4523
|
+
const events = [];
|
|
4524
|
+
for (const line of raw.split("\n")) {
|
|
4525
|
+
const trimmed = line.trim();
|
|
4526
|
+
if (!trimmed) continue;
|
|
4527
|
+
try {
|
|
4528
|
+
const parsed = JSON.parse(trimmed);
|
|
4529
|
+
if (typeof parsed === "object" && parsed !== null) events.push(parsed);
|
|
4530
|
+
} catch {
|
|
4531
|
+
}
|
|
4532
|
+
}
|
|
4533
|
+
return events;
|
|
4534
|
+
}
|
|
4516
4535
|
|
|
4517
4536
|
// src/cli/main.ts
|
|
4518
4537
|
var PACKAGE_VERSION = readPackageVersion();
|
|
@@ -4520,8 +4539,9 @@ var SESSION_CREATE_FORMATS = /* @__PURE__ */ new Set(["text", "json", "env"]);
|
|
|
4520
4539
|
var DEFAULT_AGENT_FILE = "examples/agents/scripted-triage-agent.ts";
|
|
4521
4540
|
var DEFAULT_AGENT_COMMAND = `node ${DEFAULT_AGENT_FILE}`;
|
|
4522
4541
|
var MANIFEST_SCHEMA_URL = "https://pome.sh/schemas/v1/pome.json";
|
|
4542
|
+
var MAX_UNREADABLE_PATHS_SHOWN = 5;
|
|
4523
4543
|
function readPackageVersion() {
|
|
4524
|
-
if ("0.23.
|
|
4544
|
+
if ("0.23.11".length > 0) return "0.23.11";
|
|
4525
4545
|
try {
|
|
4526
4546
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
4527
4547
|
const candidates = [
|
|
@@ -4976,7 +4996,7 @@ function createProgram() {
|
|
|
4976
4996
|
return;
|
|
4977
4997
|
}
|
|
4978
4998
|
{
|
|
4979
|
-
const { runDoctorChecks } = await import('../../checks-
|
|
4999
|
+
const { runDoctorChecks } = await import('../../checks-RGGGYUMP.js');
|
|
4980
5000
|
const { renderDoctorReport } = await import('../../render-ZQQ4UMNO.js');
|
|
4981
5001
|
const doctorReport = await runDoctorChecks({ mode: useLocal ? "full" : "hosted" });
|
|
4982
5002
|
if (!doctorReport.ok) {
|
|
@@ -5014,7 +5034,7 @@ function createProgram() {
|
|
|
5014
5034
|
taskForRuns.config.runs
|
|
5015
5035
|
);
|
|
5016
5036
|
if (k > 1) {
|
|
5017
|
-
const { runTrialGroup } = await import('../../runTrialGroup-
|
|
5037
|
+
const { runTrialGroup } = await import('../../runTrialGroup-VR2RS2RH.js');
|
|
5018
5038
|
const fileForRerun = relative(process.cwd(), file);
|
|
5019
5039
|
const rerunCommand = defaultTask ? options.trials !== void 0 ? `pome run -n ${k}` : "pome run" : `pome run ${fileForRerun && !fileForRerun.startsWith("..") ? fileForRerun : file} -n ${k}`;
|
|
5020
5040
|
const groupResult = await runTrialGroup({
|
|
@@ -5108,7 +5128,7 @@ function createProgram() {
|
|
|
5108
5128
|
process.exitCode = 5;
|
|
5109
5129
|
return;
|
|
5110
5130
|
}
|
|
5111
|
-
const { runDemo } = await import('../../runDemo-
|
|
5131
|
+
const { runDemo } = await import('../../runDemo-SU5X6P27.js');
|
|
5112
5132
|
const result = await runDemo({
|
|
5113
5133
|
apiBase: opts.apiUrl.replace(/\/$/, ""),
|
|
5114
5134
|
dashboardBase: process.env.POME_DASHBOARD_URL ?? DEFAULT_DASHBOARD_URL,
|
|
@@ -5126,7 +5146,7 @@ function createProgram() {
|
|
|
5126
5146
|
program.command("doctor").description(
|
|
5127
5147
|
"Check the agent\u2194twin wiring: pome.json (or pome.yaml) present + valid, the local twin boots + serves, requests routed to the twin (not a hardcoded production host), egress floor active. On failure prints one named cause (file:line where knowable) + one concrete fix and exits non-zero."
|
|
5128
5148
|
).action(async () => {
|
|
5129
|
-
const { runDoctorChecks } = await import('../../checks-
|
|
5149
|
+
const { runDoctorChecks } = await import('../../checks-RGGGYUMP.js');
|
|
5130
5150
|
const { renderDoctorReport } = await import('../../render-ZQQ4UMNO.js');
|
|
5131
5151
|
const report = await runDoctorChecks();
|
|
5132
5152
|
for (const line of renderDoctorReport(report, { passNote: true })) console.error(line);
|
|
@@ -5218,8 +5238,20 @@ function createProgram() {
|
|
|
5218
5238
|
`${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.`
|
|
5219
5239
|
);
|
|
5220
5240
|
}
|
|
5241
|
+
if (discovery.unreadableCount > 0) {
|
|
5242
|
+
console.error(
|
|
5243
|
+
`${discovery.unreadableCount} verdict.json file(s) under ${root} could not be read (truncated, hand-edited, or not a verdict artifact) and were skipped:`
|
|
5244
|
+
);
|
|
5245
|
+
for (const path of discovery.unreadablePaths.slice(0, MAX_UNREADABLE_PATHS_SHOWN)) {
|
|
5246
|
+
console.error(` - ${path}`);
|
|
5247
|
+
}
|
|
5248
|
+
const omitted = discovery.unreadablePaths.length - MAX_UNREADABLE_PATHS_SHOWN;
|
|
5249
|
+
if (omitted > 0) {
|
|
5250
|
+
console.error(` (${omitted} more omitted \u2014 kept first ${MAX_UNREADABLE_PATHS_SHOWN})`);
|
|
5251
|
+
}
|
|
5252
|
+
}
|
|
5221
5253
|
if (discovery.totalSets === 0) {
|
|
5222
|
-
if (discovery.staleVersionCount === 0) {
|
|
5254
|
+
if (discovery.staleVersionCount === 0 && discovery.unreadableCount === 0) {
|
|
5223
5255
|
console.error(
|
|
5224
5256
|
`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).`
|
|
5225
5257
|
);
|
|
@@ -5290,7 +5322,7 @@ function createProgram() {
|
|
|
5290
5322
|
).description(
|
|
5291
5323
|
"Start a standalone twin as a long-lived foreground server (Ctrl-C to stop)"
|
|
5292
5324
|
).action(async (name, options) => {
|
|
5293
|
-
const { runTwinStartCommand } = await import('../../twinStart-
|
|
5325
|
+
const { runTwinStartCommand } = await import('../../twinStart-HKIRLN4U.js');
|
|
5294
5326
|
await runTwinStartCommand(name, options);
|
|
5295
5327
|
});
|
|
5296
5328
|
twin.command("reset").argument("[name]", "Twin name (default: github)", "github").description("Reset standalone twin state").action(async (name) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { SLACK_CHECKS } from './chunk-
|
|
1
|
+
export { SLACK_CHECKS } from './chunk-IDNSKKEC.js';
|
|
2
2
|
import './chunk-JWJYNAWI.js';
|
|
3
3
|
import { routeInputDeclarer, booleanInput, integerInput, mountDeclaredRoute, UndeclaredInputError } from './chunk-2Q3P45LK.js';
|
|
4
4
|
import { loadMcpToolFixture, defineTwin, queryTokenResolver, formTokenResolver, deriveMcpToolTable, UnknownToolError, openTwinDatabase, createApp } from './chunk-TV5S6WQV.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { bootTwin } from './chunk-
|
|
2
|
-
import { isTwinName, TWIN_NAMES, defaultPortFor, TWIN_REGISTRY } from './chunk-
|
|
1
|
+
import { bootTwin } from './chunk-JT6MYL7P.js';
|
|
2
|
+
import { isTwinName, TWIN_NAMES, defaultPortFor, TWIN_REGISTRY } from './chunk-VO3FOSAZ.js';
|
|
3
3
|
import './chunk-TV5S6WQV.js';
|
|
4
4
|
import './chunk-VBATFCWR.js';
|
|
5
5
|
import './chunk-SG6ZTIMT.js';
|
package/package.json
CHANGED