@pome-sh/cli 0.30.0 → 0.32.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.
- package/dist/build-info.json +3 -3
- package/dist/{checks-P272TU4C.js → checks-KGDGQ35O.js} +2 -2
- package/dist/{chunk-XWGZ5C7Y.js → chunk-2V5A7NWP.js} +1 -1
- package/dist/{chunk-OTFDQT3H.js → chunk-72CG3JNL.js} +1 -0
- package/dist/{chunk-KLVIYURL.js → chunk-BK42YBOX.js} +9 -9
- package/dist/{chunk-3DHWCIT2.js → chunk-KIADZ7UM.js} +1 -1
- package/dist/{chunk-LSS7PZGW.js → chunk-KNULR6S4.js} +6 -12
- package/dist/{runDemo-7AVS4AML.js → runDemo-3JEAM6CM.js} +3 -3
- package/dist/{runTrialGroup-DWFSBMQ2.js → runTrialGroup-W7C4Z5DN.js} +4 -4
- package/dist/src/cli/main.js +25 -22
- package/dist/{twinSeed-XIKTIHX2.js → twinSeed-QCYKAY3I.js} +9 -5
- 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.
|
|
4
|
-
"git_sha": "
|
|
5
|
-
"build_time": "2026-08-
|
|
3
|
+
"version": "0.32.0",
|
|
4
|
+
"git_sha": "816bd6d21eb0380e78441fd7f8e419ccb9f86ba0",
|
|
5
|
+
"build_time": "2026-08-27T11:54:47.200Z"
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { findManifestPath, readManifest } from './chunk-
|
|
1
|
+
import { findManifestPath, readManifest } from './chunk-2V5A7NWP.js';
|
|
2
2
|
import { getAvailablePort } from './chunk-XDU6TD4O.js';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-72CG3JNL.js';
|
|
4
4
|
import { buildEgressAllowlist } from './chunk-CBFKZZBR.js';
|
|
5
5
|
import './chunk-6KJC4BTO.js';
|
|
6
6
|
import './chunk-SG6ZTIMT.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HostedOrchError, manifestSchema, deriveAgentSlug, SLUG_RE } from './chunk-
|
|
1
|
+
import { HostedOrchError, manifestSchema, deriveAgentSlug, SLUG_RE } from './chunk-72CG3JNL.js';
|
|
2
2
|
import { readFile, writeFile } from 'node:fs/promises';
|
|
3
3
|
import { resolve, join, dirname } from 'node:path';
|
|
4
4
|
import { stringify, parse } from 'yaml';
|
|
@@ -1286,6 +1286,7 @@ function exitCodeFor(err) {
|
|
|
1286
1286
|
if (err instanceof HostedAuthError) return 3;
|
|
1287
1287
|
if (err instanceof HostedQuotaError) return 4;
|
|
1288
1288
|
if (err instanceof HostedUsageError) return 5;
|
|
1289
|
+
if (err instanceof HostedDiscardRefusedError) return 5;
|
|
1289
1290
|
return 2;
|
|
1290
1291
|
}
|
|
1291
1292
|
|
|
@@ -1,7 +1,7 @@
|
|
|
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-KNULR6S4.js';
|
|
2
2
|
import { readSeedFileText, parseSeedFileText, soleTwinOf, seedsForTwins } from './chunk-IHKUFGYW.js';
|
|
3
|
-
import { readManifest, normalizeManifestTwins } from './chunk-
|
|
4
|
-
import { MOUNTED_TWINS, HostedAuthError, HostedDiscardRefusedError, HostedQuotaError, HostedOrchError, HostedTrialError, agentResponseSchema, isMultiTwinSeedEnvelope } from './chunk-
|
|
3
|
+
import { readManifest, normalizeManifestTwins } from './chunk-2V5A7NWP.js';
|
|
4
|
+
import { MOUNTED_TWINS, HostedAuthError, HostedDiscardRefusedError, HostedQuotaError, HostedOrchError, HostedTrialError, agentResponseSchema, isMultiTwinSeedEnvelope } from './chunk-72CG3JNL.js';
|
|
5
5
|
import { redactSecrets, redactEvent } from './chunk-SG6ZTIMT.js';
|
|
6
6
|
import { randomUUID, createHash } from 'node:crypto';
|
|
7
7
|
import { rm, readFile, stat, mkdir, writeFile, chmod, mkdtemp, readdir, rename } from 'node:fs/promises';
|
|
@@ -640,7 +640,7 @@ function redactSession(res) {
|
|
|
640
640
|
}
|
|
641
641
|
function formatEnvExport(res, twins) {
|
|
642
642
|
const lines = [
|
|
643
|
-
`# Pome hosted
|
|
643
|
+
`# Pome hosted sandbox \u2014 treat as secret. Twins: ${twins.join(", ")}`,
|
|
644
644
|
`export POME_AUTH_TOKEN=${JSON.stringify(res.agent_token)}`,
|
|
645
645
|
`export POME_SESSION_ID=${JSON.stringify(res.session_id)}`,
|
|
646
646
|
// Legacy single-endpoint URL (= the primary twin's api_url). Kept for
|
|
@@ -733,7 +733,7 @@ async function runSessionCreate(opts) {
|
|
|
733
733
|
});
|
|
734
734
|
if (opts.secretsFile) {
|
|
735
735
|
await writeSecretsFile(opts.secretsFile, formatEnvExport(session, twins));
|
|
736
|
-
console.error(`Wrote
|
|
736
|
+
console.error(`Wrote sandbox secrets to ${opts.secretsFile} (mode 0600).`);
|
|
737
737
|
}
|
|
738
738
|
if (opts.format === "json") {
|
|
739
739
|
const payload = redactSession(session);
|
|
@@ -750,7 +750,7 @@ async function runSessionCreate(opts) {
|
|
|
750
750
|
process.exitCode = 2;
|
|
751
751
|
return;
|
|
752
752
|
}
|
|
753
|
-
console.error(`
|
|
753
|
+
console.error(`Sandbox: ${session.session_id}`);
|
|
754
754
|
console.error(`Expires: ${session.expires_at}`);
|
|
755
755
|
if (opts.seedPath !== void 0) {
|
|
756
756
|
console.error(`Seed: ${opts.seedPath} (replaces the default for ${twins.join(", ")}).`);
|
|
@@ -803,7 +803,7 @@ async function runSessionList(opts) {
|
|
|
803
803
|
}
|
|
804
804
|
if (rows.length === 0) {
|
|
805
805
|
const scope = opts.state === "all" ? "any" : `state=${opts.state}`;
|
|
806
|
-
console.error(`No
|
|
806
|
+
console.error(`No sandboxes returned (${scope}).`);
|
|
807
807
|
return;
|
|
808
808
|
}
|
|
809
809
|
for (const r of rows) {
|
|
@@ -830,12 +830,12 @@ async function runSessionStop(opts) {
|
|
|
830
830
|
if (err.taskName) console.error(` Task: ${err.taskName}`);
|
|
831
831
|
console.error(` Open for ${err.openSeconds}s.`);
|
|
832
832
|
console.error(
|
|
833
|
-
` To keep the run, finalize it instead. To discard it anyway: pome
|
|
833
|
+
` To keep the run, finalize it instead. To discard it anyway: pome sandbox stop ${err.sessionId} --discard`
|
|
834
834
|
);
|
|
835
835
|
}
|
|
836
836
|
throw err;
|
|
837
837
|
}
|
|
838
|
-
console.error(`Stopped
|
|
838
|
+
console.error(`Stopped sandbox ${opts.sessionId}.`);
|
|
839
839
|
}
|
|
840
840
|
function friendlyHostedError(err) {
|
|
841
841
|
if (err instanceof HostedDiscardRefusedError) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseTaskFile, seedStateForTwin, runAgentCommand, writeRunArtifactsCore } from './chunk-
|
|
1
|
+
import { parseTaskFile, seedStateForTwin, runAgentCommand, writeRunArtifactsCore } from './chunk-KNULR6S4.js';
|
|
2
2
|
import { createRecorder, bootTwin } from './chunk-WJFRBXL5.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 { gmailSeedSchema, defaultSeedState } from './chunk-3T5XN64P.js';
|
|
2
2
|
import { linearSeedSchema, defaultSeedState as defaultSeedState$1 } from './chunk-Q5NBPR57.js';
|
|
3
3
|
import { isTwinName, TWIN_REGISTRY } from './chunk-SDBBGCE7.js';
|
|
4
|
-
import { criterionSchema, normalizeTaskConfigKeys, finalizeResponseSchema, HostedDiscardRefusedError, HostedOrchError, HostedAuthError, HostedQuotaError, submitResultResponseSchema, createEvalSessionResponseSchema, createSessionResponseSchema, sessionPublicSchema } from './chunk-
|
|
4
|
+
import { criterionSchema, normalizeTaskConfigKeys, finalizeResponseSchema, HostedDiscardRefusedError, HostedOrchError, HostedAuthError, HostedQuotaError, submitResultResponseSchema, createEvalSessionResponseSchema, createSessionResponseSchema, sessionPublicSchema } from './chunk-72CG3JNL.js';
|
|
5
5
|
import { seedSchema, parseSeed, defaultSeedState as defaultSeedState$2 } from './chunk-HJX25USP.js';
|
|
6
6
|
import { toTwinHttpEventRow } from './chunk-E665XWYU.js';
|
|
7
7
|
import { redactEvent, redactSecrets } from './chunk-SG6ZTIMT.js';
|
|
@@ -181,24 +181,18 @@ var stripeSeedStateSchema = z.object({
|
|
|
181
181
|
account_id: z.string().min(1).optional()
|
|
182
182
|
})
|
|
183
183
|
).default([]),
|
|
184
|
-
|
|
185
|
-
products: z.array(z.record(z.string(), z.unknown())).default([]),
|
|
186
|
-
prices: z.array(z.record(z.string(), z.unknown())).default([]),
|
|
184
|
+
failure_injection: z.array(stripeFailureInjectionRuleSchema).default([]),
|
|
187
185
|
payment_intents: z.array(z.record(z.string(), z.unknown())).default([]),
|
|
188
186
|
charges: z.array(z.record(z.string(), z.unknown())).default([]),
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
failure_injection: z.array(stripeFailureInjectionRuleSchema).default([])
|
|
187
|
+
refunds: z.array(z.record(z.string(), z.unknown())).default([]),
|
|
188
|
+
balance_transactions: z.array(z.record(z.string(), z.unknown())).default([])
|
|
192
189
|
}).strict();
|
|
193
190
|
var slackSeedStateSchema = z.object({
|
|
194
191
|
team: z.record(z.string(), z.unknown()).optional(),
|
|
195
192
|
users: z.array(z.record(z.string(), z.unknown())).default([]),
|
|
196
193
|
channels: z.array(z.record(z.string(), z.unknown())).default([]),
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
// REJECTS an unlisted key: without this line a slack seed declaring `files`
|
|
200
|
-
// fails to parse rather than being stripped.
|
|
201
|
-
files: z.array(z.record(z.string(), z.unknown())).default([])
|
|
194
|
+
files: z.array(z.record(z.string(), z.unknown())).default([]),
|
|
195
|
+
emoji: z.array(z.record(z.string(), z.unknown())).default([])
|
|
202
196
|
}).strict();
|
|
203
197
|
var seedStateSchema = z.union([
|
|
204
198
|
gmailSeedSchema,
|
|
@@ -1,14 +1,14 @@
|
|
|
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-
|
|
4
|
-
import { createHostedClient, parseTaskFile, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, outcomeOf } from './chunk-
|
|
3
|
+
import { runTask, demoTaskPath, DEMO_TASK_NAME, DEMO_REPO } from './chunk-KIADZ7UM.js';
|
|
4
|
+
import { createHostedClient, parseTaskFile, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, outcomeOf } from './chunk-KNULR6S4.js';
|
|
5
5
|
import './chunk-NW7HGA2K.js';
|
|
6
6
|
import './chunk-3T5XN64P.js';
|
|
7
7
|
import './chunk-Q5NBPR57.js';
|
|
8
8
|
import { bootTwin } from './chunk-WJFRBXL5.js';
|
|
9
9
|
import './chunk-SDBBGCE7.js';
|
|
10
10
|
import { getAvailablePort } from './chunk-XDU6TD4O.js';
|
|
11
|
-
import { HostedQuotaError, HostedOrchError } from './chunk-
|
|
11
|
+
import { HostedQuotaError, HostedOrchError } from './chunk-72CG3JNL.js';
|
|
12
12
|
import './chunk-CBFKZZBR.js';
|
|
13
13
|
import './chunk-HJX25USP.js';
|
|
14
14
|
import './chunk-E665XWYU.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { newGroupId, criterionPhrase } from './chunk-RGZBC7NF.js';
|
|
2
|
-
import { runTaskHosted, resolveRunAgentIdentity } from './chunk-
|
|
3
|
-
import { createHostedClient, parseTaskFile, outcomeOf } from './chunk-
|
|
2
|
+
import { runTaskHosted, resolveRunAgentIdentity } from './chunk-BK42YBOX.js';
|
|
3
|
+
import { createHostedClient, parseTaskFile, outcomeOf } from './chunk-KNULR6S4.js';
|
|
4
4
|
import './chunk-IHKUFGYW.js';
|
|
5
5
|
import './chunk-NW7HGA2K.js';
|
|
6
6
|
import './chunk-3T5XN64P.js';
|
|
7
7
|
import './chunk-Q5NBPR57.js';
|
|
8
8
|
import './chunk-SDBBGCE7.js';
|
|
9
|
-
import './chunk-
|
|
10
|
-
import { HostedQuotaError, HostedTrialError } from './chunk-
|
|
9
|
+
import './chunk-2V5A7NWP.js';
|
|
10
|
+
import { HostedQuotaError, HostedTrialError } from './chunk-72CG3JNL.js';
|
|
11
11
|
import './chunk-HJX25USP.js';
|
|
12
12
|
import './chunk-E665XWYU.js';
|
|
13
13
|
import './chunk-6KJC4BTO.js';
|
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, markerFor, criterionMarkerLabel, twinSkipSuffix, readCodeCriteria, createHostedClient, toTwinHttpEvent, redactJsonl, scoreFromFinalizeResponse, parseGitHubSeedState, uploadRunBlobs, isPreSatisfied } from '../../chunk-
|
|
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-BK42YBOX.js';
|
|
3
|
+
import { assetPath, runTask, resolvePackageRoot, DEMO_TASK_NAME, demoTaskPath } from '../../chunk-KIADZ7UM.js';
|
|
4
|
+
import { parseTaskFile, scoreStatus, runScoreLine, readLatestRun, readMetaSummary, outcomeOf, readConfigTwins, scoreCountsSummary, markerFor, criterionMarkerLabel, twinSkipSuffix, readCodeCriteria, createHostedClient, toTwinHttpEvent, redactJsonl, scoreFromFinalizeResponse, parseGitHubSeedState, uploadRunBlobs, isPreSatisfied } from '../../chunk-KNULR6S4.js';
|
|
5
5
|
import '../../chunk-IHKUFGYW.js';
|
|
6
6
|
import '../../chunk-NW7HGA2K.js';
|
|
7
7
|
import { GMAIL_CHECKS } from '../../chunk-JM6VS62R.js';
|
|
@@ -10,9 +10,9 @@ import { LINEAR_CHECKS } from '../../chunk-TSOSDKXP.js';
|
|
|
10
10
|
import '../../chunk-Q5NBPR57.js';
|
|
11
11
|
import '../../chunk-WJFRBXL5.js';
|
|
12
12
|
import { TWIN_NAME_LIST, isTwinName, createGitHubSmokeApp } from '../../chunk-SDBBGCE7.js';
|
|
13
|
-
import { readManifest, writeManifest, MANIFEST_JSON, readRequiredManifest, normalizeManifestTwins } from '../../chunk-
|
|
13
|
+
import { readManifest, writeManifest, MANIFEST_JSON, readRequiredManifest, normalizeManifestTwins } from '../../chunk-2V5A7NWP.js';
|
|
14
14
|
import '../../chunk-XDU6TD4O.js';
|
|
15
|
-
import { MOUNTED_TWINS, deriveAgentSlug, exitCodeFor, HostedUsageError, HostedOrchError, HostedAuthError, HostedQuotaError } from '../../chunk-
|
|
15
|
+
import { MOUNTED_TWINS, deriveAgentSlug, exitCodeFor, HostedUsageError, HostedOrchError, HostedAuthError, HostedQuotaError } from '../../chunk-72CG3JNL.js';
|
|
16
16
|
import '../../chunk-CBFKZZBR.js';
|
|
17
17
|
import { TAPE_ASSERTABLE_TOOLS } from '../../chunk-C4BVTUA3.js';
|
|
18
18
|
import { seedSchema } from '../../chunk-HJX25USP.js';
|
|
@@ -238,7 +238,7 @@ async function loginWithClerk(options) {
|
|
|
238
238
|
console.error(`Saved Pome credentials to ${path}`);
|
|
239
239
|
}
|
|
240
240
|
console.error("Pome login complete.");
|
|
241
|
-
console.error("Next: `pome
|
|
241
|
+
console.error("Next: `pome sandbox create --twin github` or `pome run <task>.md`");
|
|
242
242
|
}
|
|
243
243
|
async function exchangeCode(input) {
|
|
244
244
|
const ctrl = new AbortController();
|
|
@@ -4622,7 +4622,7 @@ var DEFAULT_AGENT_COMMAND = `node ${DEFAULT_AGENT_FILE}`;
|
|
|
4622
4622
|
var MANIFEST_SCHEMA_URL = "https://pome.sh/schemas/v1/pome.json";
|
|
4623
4623
|
var MAX_UNREADABLE_PATHS_SHOWN = 5;
|
|
4624
4624
|
function readPackageVersion() {
|
|
4625
|
-
if ("0.
|
|
4625
|
+
if ("0.32.0".length > 0) return "0.32.0";
|
|
4626
4626
|
try {
|
|
4627
4627
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
4628
4628
|
const candidates = [
|
|
@@ -4782,7 +4782,7 @@ function createProgram() {
|
|
|
4782
4782
|
}
|
|
4783
4783
|
);
|
|
4784
4784
|
const checks = program.command("checks").argument("[twin]", "Twin id (e.g. github). Omit to list twins that declare checks.").option("--json", "Emit the declaration as JSON (for skills and agents).", false).description(
|
|
4785
|
-
"Browse the typed checks a twin declares \u2014 the closed set [code]
|
|
4785
|
+
"Browse the typed checks a twin declares \u2014 the closed set a [code] criterion is graded by"
|
|
4786
4786
|
).action(async (twin2, opts) => {
|
|
4787
4787
|
await runChecksCommand(twin2, { json: opts.json });
|
|
4788
4788
|
});
|
|
@@ -4857,10 +4857,10 @@ function createProgram() {
|
|
|
4857
4857
|
}
|
|
4858
4858
|
}
|
|
4859
4859
|
);
|
|
4860
|
-
const session = program.command("
|
|
4861
|
-
"Hosted
|
|
4860
|
+
const session = program.command("sandbox").description(
|
|
4861
|
+
"Hosted sandboxes (same API as the dashboard Twins page \u2014 requires login)"
|
|
4862
4862
|
);
|
|
4863
|
-
session.command("create").description("Create a hosted sandbox
|
|
4863
|
+
session.command("create").description("Create a hosted sandbox for one or more twins and print its connection info").option(
|
|
4864
4864
|
"--twin <name>",
|
|
4865
4865
|
// The enumeration is derived, never typed: this line is the public
|
|
4866
4866
|
// discovery surface for which twins exist, and a hand-written copy of the
|
|
@@ -4874,7 +4874,7 @@ function createProgram() {
|
|
|
4874
4874
|
// reject the invocation before the action runs, so the check moved into
|
|
4875
4875
|
// `runSessionCreate`, which fails with the same "No twin specified"
|
|
4876
4876
|
// sentence when neither source supplies one.
|
|
4877
|
-
`${SESSION_TWIN_NAMES.join(" | ")}. Repeat the flag for a multi-twin
|
|
4877
|
+
`${SESSION_TWIN_NAMES.join(" | ")}. Repeat the flag for a multi-twin sandbox (e.g. --twin github --twin gmail). Optional when --seed names exactly one twin.`,
|
|
4878
4878
|
(value, previous = []) => [...previous, value]
|
|
4879
4879
|
).option(
|
|
4880
4880
|
"--seed <path>",
|
|
@@ -4912,7 +4912,7 @@ function createProgram() {
|
|
|
4912
4912
|
}
|
|
4913
4913
|
}
|
|
4914
4914
|
);
|
|
4915
|
-
session.command("list").description("List hosted
|
|
4915
|
+
session.command("list").description("List hosted sandboxes (defaults to --state running, like the dashboard)").option(
|
|
4916
4916
|
"--api-url <url>",
|
|
4917
4917
|
"Control-plane URL",
|
|
4918
4918
|
process.env.POME_API_URL ?? DEFAULT_CONTROL_PLANE_URL
|
|
@@ -4949,7 +4949,7 @@ function createProgram() {
|
|
|
4949
4949
|
}
|
|
4950
4950
|
}
|
|
4951
4951
|
);
|
|
4952
|
-
session.command("stop").
|
|
4952
|
+
session.command("stop").description("Stop a hosted sandbox").argument("<session-id>", "Sandbox id (ses_\u2026)").option(
|
|
4953
4953
|
"--api-url <url>",
|
|
4954
4954
|
"Control-plane URL",
|
|
4955
4955
|
process.env.POME_API_URL ?? DEFAULT_CONTROL_PLANE_URL
|
|
@@ -4968,7 +4968,7 @@ function createProgram() {
|
|
|
4968
4968
|
} catch (err) {
|
|
4969
4969
|
const friendly = friendlyHostedError(err);
|
|
4970
4970
|
if (friendly) console.error(friendly);
|
|
4971
|
-
process.exitCode =
|
|
4971
|
+
process.exitCode = exitCodeFor(err);
|
|
4972
4972
|
}
|
|
4973
4973
|
}
|
|
4974
4974
|
);
|
|
@@ -5069,7 +5069,7 @@ function createProgram() {
|
|
|
5069
5069
|
return;
|
|
5070
5070
|
}
|
|
5071
5071
|
{
|
|
5072
|
-
const { runDoctorChecks } = await import('../../checks-
|
|
5072
|
+
const { runDoctorChecks } = await import('../../checks-KGDGQ35O.js');
|
|
5073
5073
|
const { renderDoctorReport } = await import('../../render-ZQQ4UMNO.js');
|
|
5074
5074
|
const doctorReport = await runDoctorChecks({ mode: useLocal ? "full" : "hosted" });
|
|
5075
5075
|
if (!doctorReport.ok) {
|
|
@@ -5078,7 +5078,7 @@ function createProgram() {
|
|
|
5078
5078
|
console.error(
|
|
5079
5079
|
"pome run: wiring check failed \u2014 refusing to spawn the agent. Fix the cause above and re-run (there is no --force)."
|
|
5080
5080
|
);
|
|
5081
|
-
process.exitCode =
|
|
5081
|
+
process.exitCode = 5;
|
|
5082
5082
|
return;
|
|
5083
5083
|
}
|
|
5084
5084
|
}
|
|
@@ -5107,7 +5107,7 @@ function createProgram() {
|
|
|
5107
5107
|
taskForRuns.config.runs
|
|
5108
5108
|
);
|
|
5109
5109
|
if (k > 1) {
|
|
5110
|
-
const { runTrialGroup } = await import('../../runTrialGroup-
|
|
5110
|
+
const { runTrialGroup } = await import('../../runTrialGroup-W7C4Z5DN.js');
|
|
5111
5111
|
const fileForRerun = relative(process.cwd(), file);
|
|
5112
5112
|
const rerunCommand = defaultTask ? options.trials !== void 0 ? `pome run -n ${k}` : "pome run" : `pome run ${fileForRerun && !fileForRerun.startsWith("..") ? fileForRerun : file} -n ${k}`;
|
|
5113
5113
|
const groupResult = await runTrialGroup({
|
|
@@ -5201,7 +5201,7 @@ function createProgram() {
|
|
|
5201
5201
|
process.exitCode = 5;
|
|
5202
5202
|
return;
|
|
5203
5203
|
}
|
|
5204
|
-
const { runDemo } = await import('../../runDemo-
|
|
5204
|
+
const { runDemo } = await import('../../runDemo-3JEAM6CM.js');
|
|
5205
5205
|
const result = await runDemo({
|
|
5206
5206
|
apiBase: opts.apiUrl.replace(/\/$/, ""),
|
|
5207
5207
|
dashboardBase: process.env.POME_DASHBOARD_URL ?? DEFAULT_DASHBOARD_URL,
|
|
@@ -5219,7 +5219,7 @@ function createProgram() {
|
|
|
5219
5219
|
program.command("doctor").description(
|
|
5220
5220
|
"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."
|
|
5221
5221
|
).action(async () => {
|
|
5222
|
-
const { runDoctorChecks } = await import('../../checks-
|
|
5222
|
+
const { runDoctorChecks } = await import('../../checks-KGDGQ35O.js');
|
|
5223
5223
|
const { renderDoctorReport } = await import('../../render-ZQQ4UMNO.js');
|
|
5224
5224
|
const report = await runDoctorChecks();
|
|
5225
5225
|
for (const line of renderDoctorReport(report, { passNote: true })) console.error(line);
|
|
@@ -5399,10 +5399,13 @@ function createProgram() {
|
|
|
5399
5399
|
const { runTwinStartCommand } = await import('../../twinStart-VUCN4CFY.js');
|
|
5400
5400
|
await runTwinStartCommand(name, options);
|
|
5401
5401
|
});
|
|
5402
|
-
twin.command("seed").argument("<name...>", `Twin name (${TWIN_NAME_LIST.join(" | ")}). Repeat for one file covering several.`).option("--out <path>", "Write to this file instead of stdout. Refuses to overwrite.").
|
|
5402
|
+
twin.command("seed").argument("<name...>", `Twin name (${TWIN_NAME_LIST.join(" | ")}). Repeat for one file covering several.`).option("--out <path>", "Write to this file instead of stdout. Refuses to overwrite.").option(
|
|
5403
|
+
"--for-task",
|
|
5404
|
+
"Emit the shape a `<task>.seed.json` sidecar takes \u2014 flat for one twin, the per-twin envelope for more, the rule the task's `## Config` twins already set. Without it you get a seed file for `--seed`, which is always the envelope."
|
|
5405
|
+
).description(
|
|
5403
5406
|
"Print a starter seed file for a twin, generated from the twin's own starting state"
|
|
5404
5407
|
).action(async (names, options) => {
|
|
5405
|
-
const { runTwinSeedCommand } = await import('../../twinSeed-
|
|
5408
|
+
const { runTwinSeedCommand } = await import('../../twinSeed-QCYKAY3I.js');
|
|
5406
5409
|
await runTwinSeedCommand(names, options);
|
|
5407
5410
|
});
|
|
5408
5411
|
twin.command("reset").argument("[name]", "Twin name (default: github)", "github").description("Reset standalone twin state").action(async (name) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TWIN_NAMES, isTwinName, TWIN_REGISTRY } from './chunk-SDBBGCE7.js';
|
|
2
2
|
import { writeFile } from 'node:fs/promises';
|
|
3
3
|
|
|
4
|
-
async function generateSeedFile(twins) {
|
|
4
|
+
async function generateSeedFile(twins, opts = {}) {
|
|
5
5
|
if (twins.length === 0) {
|
|
6
6
|
throw new Error(`No twin specified. Pass at least one of: ${TWIN_NAMES.join(", ")}.`);
|
|
7
7
|
}
|
|
@@ -19,7 +19,8 @@ async function generateSeedFile(twins) {
|
|
|
19
19
|
const entry = TWIN_REGISTRY[twin];
|
|
20
20
|
envelope[twin] = await entry.parseSeed(await entry.defaultSeed());
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
const body = opts.forTask && twins.length === 1 ? envelope[twins[0]] : envelope;
|
|
23
|
+
return `${JSON.stringify(body, null, 2)}
|
|
23
24
|
`;
|
|
24
25
|
}
|
|
25
26
|
async function writeSeedFile(path, text) {
|
|
@@ -35,14 +36,17 @@ async function writeSeedFile(path, text) {
|
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
async function runTwinSeedCommand(names, options = {}) {
|
|
38
|
-
const text = await generateSeedFile(names);
|
|
39
|
+
const text = await generateSeedFile(names, { forTask: options.forTask });
|
|
39
40
|
if (options.out === void 0) {
|
|
40
41
|
process.stdout.write(text);
|
|
41
42
|
return;
|
|
42
43
|
}
|
|
43
44
|
await writeSeedFile(options.out, text);
|
|
44
|
-
|
|
45
|
-
console.error(`
|
|
45
|
+
const what = options.forTask ? "task seed" : "starting seed";
|
|
46
|
+
console.error(`Wrote ${options.out} \u2014 the ${names.join(" + ")} ${what}.`);
|
|
47
|
+
console.error(
|
|
48
|
+
options.forTask ? `Put it next to a task whose \`## Config\` reads twins: [${names.join(", ")}], named <task>.seed.json.` : `Boot it: pome twin start ${names[0]} --seed ${options.out}`
|
|
49
|
+
);
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
export { generateSeedFile, runTwinSeedCommand, writeSeedFile };
|
package/package.json
CHANGED