@pome-sh/cli 0.23.33 → 0.23.34
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
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.34",
|
|
4
|
+
"git_sha": "0c6c21c02b475a025c5b83bc77f158832cd0dfe2",
|
|
5
|
+
"build_time": "2026-08-13T01:18:05.857Z"
|
|
6
6
|
}
|
|
@@ -2,14 +2,13 @@ import { readManifest, normalizeManifestTwins } from './chunk-ABM3CMQB.js';
|
|
|
2
2
|
import { createHostedClient, perTwinReturnedByCloud, parseTaskFile, runAgentCommand, writeRunArtifactsCore, toTwinHttpEvent, redactJsonl, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, evaluationCounts } from './chunk-ZTINFLSV.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,5 +1,5 @@
|
|
|
1
1
|
import { newGroupId, criterionPhrase } from './chunk-RGZBC7NF.js';
|
|
2
|
-
import { runTaskHosted, resolveRunAgentIdentity } from './chunk-
|
|
2
|
+
import { runTaskHosted, resolveRunAgentIdentity } from './chunk-ARAYJGDT.js';
|
|
3
3
|
import './chunk-ABM3CMQB.js';
|
|
4
4
|
import { createHostedClient, parseTaskFile, outcomeOf } from './chunk-ZTINFLSV.js';
|
|
5
5
|
import './chunk-NW7HGA2K.js';
|
package/dist/src/cli/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { DEFAULT_CONTROL_PLANE_URL, DEFAULT_DASHBOARD_URL, clearLocalCredentials, friendlyHostedError, 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-ARAYJGDT.js';
|
|
3
3
|
import { readManifest, writeManifest, MANIFEST_JSON, readRequiredManifest, normalizeManifestTwins } from '../../chunk-ABM3CMQB.js';
|
|
4
4
|
import { assetPath, runTask, resolvePackageRoot, DEMO_TASK_NAME, demoTaskPath } from '../../chunk-GEC6MJV5.js';
|
|
5
5
|
import '../../chunk-XDU6TD4O.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.34".length > 0) return "0.23.34";
|
|
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-VT7UGDJU.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({
|
package/package.json
CHANGED