@pome-sh/cli 0.42.3 → 0.42.4

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "pome-sh",
3
- "version": "0.42.3",
4
- "git_sha": "427e67af93e006eada090db181006321bd24b62e",
5
- "build_time": "2026-08-30T23:10:16.999Z"
3
+ "version": "0.42.4",
4
+ "git_sha": "8596587c815472aa76ee5c89ddf025c3ab7dd19a",
5
+ "build_time": "2026-08-30T23:55:15.281Z"
6
6
  }
@@ -35,6 +35,7 @@ import { createServer } from 'node:http';
35
35
  import { createInterface } from 'node:readline';
36
36
  import { z } from 'zod';
37
37
  import Anthropic from '@anthropic-ai/sdk';
38
+ import { createRequire } from 'node:module';
38
39
 
39
40
  async function readEventsJsonl(runDir) {
40
41
  const file = resolve(runDir, "events.jsonl");
@@ -2970,15 +2971,27 @@ function displaySentence(def) {
2970
2971
  function localDigest(twin) {
2971
2972
  return checksDigest(checksFor(twin));
2972
2973
  }
2974
+ function bakedVersions() {
2975
+ try {
2976
+ return JSON.parse('{"@pome-sh/sdk":"0.11.6","@pome-sh/wire":"0.4.0","@pome-sh/twin-github":"0.12.0","@pome-sh/twin-gmail":"0.4.0","@pome-sh/twin-linear":"0.4.1","@pome-sh/twin-slack":"0.4.1","@pome-sh/twin-stripe":"0.4.7"}');
2977
+ } catch {
2978
+ return {};
2979
+ }
2980
+ }
2973
2981
  function pinnedVersion(pkg) {
2974
- const root = resolvePackageRoot(import.meta.url);
2975
- if (!root) return "unknown";
2982
+ const baked = bakedVersions()[pkg];
2983
+ if (baked) return baked;
2976
2984
  try {
2977
- const manifest = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
2978
- return manifest.dependencies?.[pkg] ?? "unknown";
2985
+ const require2 = createRequire(import.meta.url);
2986
+ const manifest = JSON.parse(readFileSync(require2.resolve(`${pkg}/package.json`), "utf8"));
2987
+ if (manifest.name === pkg && typeof manifest.version === "string") return manifest.version;
2979
2988
  } catch {
2980
- return "unknown";
2981
2989
  }
2990
+ return void 0;
2991
+ }
2992
+ function pinLabel(pkg) {
2993
+ const version = pinnedVersion(pkg);
2994
+ return version === void 0 ? pkg : `${pkg} ${version}`;
2982
2995
  }
2983
2996
  var SUBSTRATE_HELP = {
2984
2997
  final: "the final state",
@@ -2997,6 +3010,10 @@ function bold3(s) {
2997
3010
  function argFlagsFor(def) {
2998
3011
  return templateSlots(def.template).params.map((name) => `--arg ${name}=${def.params[name].example}`).join(" ");
2999
3012
  }
3013
+ function checksHeader(twin, count2, version) {
3014
+ const label = bold3(`${twin} \u2014 ${count2} declared check${count2 === 1 ? "" : "s"}`);
3015
+ return version === void 0 ? label : `${label} ${dim3(`(@pome-sh/twin-${twin} ${version})`)}`;
3016
+ }
3000
3017
  function jsonView(twin) {
3001
3018
  return {
3002
3019
  twin,
@@ -3050,9 +3067,7 @@ async function runChecksCommand(twinArg, opts) {
3050
3067
  );
3051
3068
  return;
3052
3069
  }
3053
- console.log(
3054
- `${bold3(`${twin} \u2014 ${checks.length} declared check${checks.length === 1 ? "" : "s"}`)} ` + dim3(`(@pome-sh/twin-${twin} ${pinnedVersion(`@pome-sh/twin-${twin}`)})`)
3055
- );
3070
+ console.log(checksHeader(twin, checks.length, pinnedVersion(`@pome-sh/twin-${twin}`)));
3056
3071
  console.log("");
3057
3072
  for (const def of checks) {
3058
3073
  console.log(` ${bold3(def.id)}`);
@@ -3343,7 +3358,7 @@ function formatSkewRefusal(twin, findings) {
3343
3358
  `Refusing to write: this CLI and the cloud disagree about ${twin}'s vocabulary, so a sentence written here might not be graded there.`,
3344
3359
  ...findings.flatMap(bullet),
3345
3360
  "",
3346
- ` local @pome-sh/twin-${twin} ${pinnedVersion(`@pome-sh/twin-${twin}`)}` + (sdkImplicated ? `, @pome-sh/sdk ${pinnedVersion("@pome-sh/sdk")}` : ""),
3361
+ ` local ${pinLabel(`@pome-sh/twin-${twin}`)}` + (sdkImplicated ? `, ${pinLabel("@pome-sh/sdk")}` : ""),
3347
3362
  ...sdkImplicated ? [` The cloud publishes no sdk version here, so that is the only pin this CLI can name.`] : [],
3348
3363
  ` Update with \`npm i -g @pome-sh/cli@latest\`. If this CLI is already current, the cloud is behind \u2014 that is a deploy, not something you can fix here.`
3349
3364
  ].join("\n");
@@ -3368,14 +3383,13 @@ function parseArgFlags(pairs) {
3368
3383
  return args;
3369
3384
  }
3370
3385
  async function handshake(twin, fetchRemote) {
3371
- const pin = pinnedVersion(`@pome-sh/twin-${twin}`);
3372
3386
  let remote;
3373
3387
  try {
3374
3388
  remote = await fetchRemote(twin);
3375
3389
  } catch (err) {
3376
3390
  return {
3377
3391
  kind: "unverified",
3378
- note: `Not verified against the cloud (${err instanceof Error ? err.message : "unreachable"}). Writing from the local pin: @pome-sh/twin-${twin} ${pin}.`
3392
+ note: `Not verified against the cloud (${err instanceof Error ? err.message : "unreachable"}). Writing from the local pin: ${pinLabel(`@pome-sh/twin-${twin}`)}.`
3379
3393
  };
3380
3394
  }
3381
3395
  if (localDigest(twin) === remote.digest) return { kind: "match" };
@@ -4622,7 +4636,7 @@ function firstSentence(description) {
4622
4636
  function resolveExampleRef(env = process.env) {
4623
4637
  const override = env.POME_EXAMPLE_REF?.trim();
4624
4638
  if (override) return override;
4625
- const baked = "427e67af93e006eada090db181006321bd24b62e".trim() ;
4639
+ const baked = "8596587c815472aa76ee5c89ddf025c3ab7dd19a".trim() ;
4626
4640
  return FULL_SHA.test(baked) ? baked : "main";
4627
4641
  }
4628
4642
  function rawUrlFor(example, file, ref) {
@@ -4985,7 +4999,7 @@ var DEFAULT_AGENT_COMMAND = `node ${DEFAULT_AGENT_FILE}`;
4985
4999
  var MANIFEST_SCHEMA_URL = "https://pome.sh/schemas/v1/pome.json";
4986
5000
  var MAX_UNREADABLE_PATHS_SHOWN = 5;
4987
5001
  function readPackageVersion() {
4988
- if ("0.42.3".length > 0) return "0.42.3";
5002
+ if ("0.42.4".length > 0) return "0.42.4";
4989
5003
  try {
4990
5004
  const here = dirname(fileURLToPath(import.meta.url));
4991
5005
  const candidates = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pome-sh/cli",
3
- "version": "0.42.3",
3
+ "version": "0.42.4",
4
4
  "description": "Test AI agents against digital twins of real SaaS APIs. Records tool-call traces and scores them on pome.sh.",
5
5
  "keywords": [
6
6
  "ai",