@pome-sh/cli 0.39.0 → 0.39.1
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.39.
|
|
4
|
-
"git_sha": "
|
|
5
|
-
"build_time": "2026-08-30T05:
|
|
3
|
+
"version": "0.39.1",
|
|
4
|
+
"git_sha": "ad57e84671dd2e6a2fb0dc3b66a78d97b95ed1c7",
|
|
5
|
+
"build_time": "2026-08-30T05:08:05.900Z"
|
|
6
6
|
}
|
package/dist/src/cli/main.js
CHANGED
|
@@ -9,7 +9,7 @@ import '../../chunk-PASFBRK4.js';
|
|
|
9
9
|
import { LINEAR_CHECKS } from '../../chunk-TSOSDKXP.js';
|
|
10
10
|
import '../../chunk-3FZY376K.js';
|
|
11
11
|
import '../../chunk-5NPGY73F.js';
|
|
12
|
-
import { TWIN_NAME_LIST, createGitHubSmokeApp } from '../../chunk-RPPF2KDQ.js';
|
|
12
|
+
import { TWIN_NAME_LIST, TWIN_REGISTRY, createGitHubSmokeApp } from '../../chunk-RPPF2KDQ.js';
|
|
13
13
|
import { readManifest, writeManifest, MANIFEST_JSON, readRequiredManifest, normalizeManifestTwins } from '../../chunk-DFOQGAKS.js';
|
|
14
14
|
import '../../chunk-XDU6TD4O.js';
|
|
15
15
|
import { MOUNTED_TWINS, deriveAgentSlug, exitCodeFor, HostedUsageError, HostedOrchError } from '../../chunk-NNXVR46L.js';
|
|
@@ -4575,7 +4575,7 @@ function firstSentence(description) {
|
|
|
4575
4575
|
function resolveExampleRef(env = process.env) {
|
|
4576
4576
|
const override = env.POME_EXAMPLE_REF?.trim();
|
|
4577
4577
|
if (override) return override;
|
|
4578
|
-
const baked = "
|
|
4578
|
+
const baked = "ad57e84671dd2e6a2fb0dc3b66a78d97b95ed1c7".trim() ;
|
|
4579
4579
|
return FULL_SHA.test(baked) ? baked : "main";
|
|
4580
4580
|
}
|
|
4581
4581
|
function rawUrlFor(example, file, ref) {
|
|
@@ -4929,7 +4929,7 @@ var DEFAULT_AGENT_COMMAND = `node ${DEFAULT_AGENT_FILE}`;
|
|
|
4929
4929
|
var MANIFEST_SCHEMA_URL = "https://pome.sh/schemas/v1/pome.json";
|
|
4930
4930
|
var MAX_UNREADABLE_PATHS_SHOWN = 5;
|
|
4931
4931
|
function readPackageVersion() {
|
|
4932
|
-
if ("0.39.
|
|
4932
|
+
if ("0.39.1".length > 0) return "0.39.1";
|
|
4933
4933
|
try {
|
|
4934
4934
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
4935
4935
|
const candidates = [
|
|
@@ -5709,14 +5709,18 @@ function createProgram() {
|
|
|
5709
5709
|
`Twin name (${TWIN_NAME_LIST.join(" | ")}). Optional when --seed names exactly one twin.`
|
|
5710
5710
|
).option(
|
|
5711
5711
|
"--port <port>",
|
|
5712
|
-
|
|
5712
|
+
// Built from the registry rather than restated: the per-twin overrides
|
|
5713
|
+
// are the registry's to add, and this text went stale when linear's did.
|
|
5714
|
+
`Port to bind (default: $PORT, else ${TWIN_NAME_LIST.filter(
|
|
5715
|
+
(twin2) => TWIN_REGISTRY[twin2].portEnvName
|
|
5716
|
+
).map((twin2) => `${TWIN_REGISTRY[twin2].portEnvName}/${TWIN_REGISTRY[twin2].defaultPort} for ${twin2}`).join(", ")}, otherwise 3333)`
|
|
5713
5717
|
).option(
|
|
5714
5718
|
"--seed <path>",
|
|
5715
5719
|
"Boot this twin from a JSON or YAML seed file instead of its default. A seed REPLACES the default; it does not merge. Takes the per-twin envelope { <twin>: { \u2026 } } or one twin's flat seed. Overrides POME_SEED_JSON."
|
|
5716
5720
|
).description(
|
|
5717
5721
|
"Start a standalone twin as a long-lived foreground server (Ctrl-C to stop)"
|
|
5718
5722
|
).action(async (name, options) => {
|
|
5719
|
-
const { runTwinStartCommand } = await import('../../twinStart-
|
|
5723
|
+
const { runTwinStartCommand } = await import('../../twinStart-N6HTOARC.js');
|
|
5720
5724
|
await runTwinStartCommand(name, options);
|
|
5721
5725
|
});
|
|
5722
5726
|
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(
|
|
@@ -5728,12 +5732,38 @@ function createProgram() {
|
|
|
5728
5732
|
const { runTwinSeedCommand } = await import('../../twinSeed-7M4GOIBS.js');
|
|
5729
5733
|
await runTwinSeedCommand(names, options);
|
|
5730
5734
|
});
|
|
5731
|
-
twin.command("status").
|
|
5732
|
-
|
|
5735
|
+
twin.command("status").summary("Print the local twin's status").description(
|
|
5736
|
+
"Say whether the twin `pome twin start` last booted here is still running, and print its paste-able env lines"
|
|
5737
|
+
).action(async () => {
|
|
5738
|
+
const statusPath = ".pome/twin-status.json";
|
|
5739
|
+
if (!existsSync(statusPath)) {
|
|
5733
5740
|
console.log("No standalone twin status found.");
|
|
5734
5741
|
return;
|
|
5735
5742
|
}
|
|
5736
|
-
|
|
5743
|
+
let status;
|
|
5744
|
+
let origin;
|
|
5745
|
+
try {
|
|
5746
|
+
status = JSON.parse(await readFile(statusPath, "utf8"));
|
|
5747
|
+
if (typeof status.name !== "string" || status.name === "") throw new Error("no name");
|
|
5748
|
+
origin = new URL(status.rest_url).origin;
|
|
5749
|
+
} catch {
|
|
5750
|
+
throw new Error(
|
|
5751
|
+
`pome twin status: ${statusPath} is unreadable \u2014 start a twin with \`pome twin start <${TWIN_NAME_LIST.join("|")}>\`.`
|
|
5752
|
+
);
|
|
5753
|
+
}
|
|
5754
|
+
const running = await fetch(`${origin}/healthz`, {
|
|
5755
|
+
signal: AbortSignal.timeout(1e3)
|
|
5756
|
+
}).then(
|
|
5757
|
+
async (res) => res.ok && (await res.json().catch(() => ({}))).twin === status.name,
|
|
5758
|
+
() => false
|
|
5759
|
+
);
|
|
5760
|
+
console.log(
|
|
5761
|
+
running ? `${status.name} twin \u2014 running` : `${status.name} twin \u2014 not running (stale ${statusPath})`
|
|
5762
|
+
);
|
|
5763
|
+
const envName = TWIN_REGISTRY[status.name]?.envName ?? status.name.toUpperCase();
|
|
5764
|
+
console.log(`POME_${envName}_REST_URL=${status.rest_url}`);
|
|
5765
|
+
console.log(`POME_${envName}_MCP_URL=${status.mcp_url}`);
|
|
5766
|
+
console.log(`POME_AUTH_TOKEN=${status.auth_token}`);
|
|
5737
5767
|
});
|
|
5738
5768
|
program.command("capture-server").summary("Record the agent's model calls").description(
|
|
5739
5769
|
"Boot an HTTP CONNECT-tunnel proxy that appends one LlmCallEvent per tunnel to events.jsonl. Spawned by `pome run`; agent traffic flows via HTTPS_PROXY."
|
|
@@ -114,6 +114,21 @@ async function runTwinStartCommand(nameArg, options) {
|
|
|
114
114
|
const mcpUrl = `${restUrl}/mcp`;
|
|
115
115
|
const server = serve({ fetch: harness.app.fetch, port, hostname: "127.0.0.1" });
|
|
116
116
|
try {
|
|
117
|
+
await new Promise((resolve, reject) => {
|
|
118
|
+
const onError = (err) => {
|
|
119
|
+
reject(
|
|
120
|
+
err.code === "EADDRINUSE" ? new Error(
|
|
121
|
+
`pome twin start: port ${port} is already in use \u2014 pass --port <port>, or stop the twin using it.`
|
|
122
|
+
) : err
|
|
123
|
+
);
|
|
124
|
+
};
|
|
125
|
+
server.once("error", onError);
|
|
126
|
+
server.once("listening", () => {
|
|
127
|
+
server.off("error", onError);
|
|
128
|
+
server.on("error", (err) => console.error(`pome twin start: server error: ${err}`));
|
|
129
|
+
resolve();
|
|
130
|
+
});
|
|
131
|
+
});
|
|
117
132
|
await mkdir(".pome", { recursive: true });
|
|
118
133
|
await writeFile(
|
|
119
134
|
".pome/twin-status.json",
|