@pome-sh/cli 0.42.1 → 0.42.3

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.1",
4
- "git_sha": "221b0951a0c236c1470e4d9602866726ed3592ad",
5
- "build_time": "2026-08-30T07:18:38.274Z"
3
+ "version": "0.42.3",
4
+ "git_sha": "427e67af93e006eada090db181006321bd24b62e",
5
+ "build_time": "2026-08-30T23:10:16.999Z"
6
6
  }
@@ -35,7 +35,6 @@ 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 { zodOutputFormat } from '@anthropic-ai/sdk/helpers/zod';
39
38
 
40
39
  async function readEventsJsonl(runDir) {
41
40
  const file = resolve(runDir, "events.jsonl");
@@ -710,6 +709,8 @@ async function runDocsCommand(topicArg, opts) {
710
709
  }
711
710
  }
712
711
  var COMPILER_MODEL = "claude-opus-4-7";
712
+ var MAX_TOKENS = 8192;
713
+ var SEED_JSON_SCHEMA = JSON.stringify(z.toJSONSchema(seedSchema, { io: "input" }));
713
714
  var SYSTEM_PROMPT = `You convert natural-language descriptions of a GitHub twin's seed state into JSON matching the provided schema.
714
715
 
715
716
  Rules:
@@ -721,7 +722,13 @@ Rules:
721
722
  6. Issue \`number\` is required and must be set (use #N if the prose says so, otherwise start at 1).
722
723
  7. PR \`number\` is optional; set it when the prose says "#N".
723
724
  8. Issue \`assignees\` is an array of login strings; use [] when unassigned.
724
- 9. Use fenced code blocks in the prose to indicate the exact content of \`files[].content\`. Preserve trailing newlines verbatim.`;
725
+ 9. Use fenced code blocks in the prose to indicate the exact content of \`files[].content\`. Preserve trailing newlines verbatim.
726
+
727
+ Respond with a single JSON object that validates against this JSON Schema. Output only the JSON object \u2014 no prose, no markdown fences.
728
+
729
+ <schema>
730
+ ${SEED_JSON_SCHEMA}
731
+ </schema>`;
725
732
  async function compileSeed(prose, opts = {}) {
726
733
  if (!process.env.ANTHROPIC_API_KEY) {
727
734
  throw new Error(
@@ -731,20 +738,26 @@ async function compileSeed(prose, opts = {}) {
731
738
  const model = opts.model ?? COMPILER_MODEL;
732
739
  const client = new Anthropic();
733
740
  const t0 = Date.now();
734
- const response = await client.messages.parse({
741
+ const response = await client.messages.create({
735
742
  model,
736
- max_tokens: 8192,
743
+ max_tokens: MAX_TOKENS,
737
744
  system: SYSTEM_PROMPT,
738
- messages: [{ role: "user", content: prose }],
739
- output_config: { format: zodOutputFormat(seedSchema) }
745
+ messages: [{ role: "user", content: prose }]
740
746
  });
741
747
  const durationMs = Date.now() - t0;
742
- if (!response.parsed_output) {
748
+ if (response.stop_reason === "max_tokens") {
743
749
  throw new Error(
744
- `Compiler returned no parsed_output (stop_reason=${response.stop_reason}). This usually means the model produced output that failed schema validation.`
750
+ `Compiler output was truncated at max_tokens=${MAX_TOKENS}. The seed prose may describe more state than one compile can emit.`
745
751
  );
746
752
  }
747
- const seed = parseGitHubSeedState(response.parsed_output);
753
+ const text = response.content.map((block) => block.type === "text" ? block.text : "").join("");
754
+ let candidate;
755
+ try {
756
+ candidate = JSON.parse(extractJsonPayload(text));
757
+ } catch (err) {
758
+ throw new Error(`Compiler did not return valid JSON: ${err.message}`);
759
+ }
760
+ const seed = parseGitHubSeedState(candidate);
748
761
  return {
749
762
  seed,
750
763
  inputTokens: response.usage.input_tokens,
@@ -753,6 +766,11 @@ async function compileSeed(prose, opts = {}) {
753
766
  durationMs
754
767
  };
755
768
  }
769
+ function extractJsonPayload(text) {
770
+ const trimmed = text.trim();
771
+ const fenced = trimmed.match(/^```(?:json)?\s*([\s\S]*?)\s*```$/);
772
+ return fenced ? fenced[1] : trimmed;
773
+ }
756
774
 
757
775
  // src/task/seed-verifier.ts
758
776
  async function verifySeedWithTwin(seed) {
@@ -4458,6 +4476,7 @@ var CATALOG_EXAMPLES = [
4458
4476
  root: "agent-examples",
4459
4477
  rel: "agent-examples/support-triage",
4460
4478
  description: "Pome hero example: the support-triage examinee as a local Claude Agent SDK subprocess, wired to the GitHub + Slack twins over MCP.",
4479
+ homepage: "https://docs.pome.sh/quickstart/coding-agent",
4461
4480
  files: [
4462
4481
  "README.md",
4463
4482
  "VERIFICATION.md",
@@ -4603,7 +4622,7 @@ function firstSentence(description) {
4603
4622
  function resolveExampleRef(env = process.env) {
4604
4623
  const override = env.POME_EXAMPLE_REF?.trim();
4605
4624
  if (override) return override;
4606
- const baked = "221b0951a0c236c1470e4d9602866726ed3592ad".trim() ;
4625
+ const baked = "427e67af93e006eada090db181006321bd24b62e".trim() ;
4607
4626
  return FULL_SHA.test(baked) ? baked : "main";
4608
4627
  }
4609
4628
  function rawUrlFor(example, file, ref) {
@@ -4673,12 +4692,21 @@ Next steps:
4673
4692
  3. Read ${dir}/README.md \u2014 this example is driven by its own eval runner, not by \`pome run\`.`;
4674
4693
  }
4675
4694
  const task = firstTaskFile(example);
4695
+ const run = `pome run ${task ?? "<task>.md"}`;
4696
+ if (example.homepage) {
4697
+ return `${header}
4698
+ Next steps:
4699
+ 1. cd ${dir}
4700
+ 2. npm install
4701
+ 3. Follow the documented walk: ${example.homepage}
4702
+ 4. Or from the CLI: pome login, then ${run}`;
4703
+ }
4676
4704
  return `${header}
4677
4705
  Next steps:
4678
4706
  1. cd ${dir}
4679
4707
  2. npm install
4680
4708
  3. pome login # one-time, opens the dashboard to sign in
4681
- 4. pome run ${task ?? "<task>.md"}`;
4709
+ 4. ${run}`;
4682
4710
  }
4683
4711
  var FIX_PROMPT_TEMPLATE_VERSION = "v1";
4684
4712
  var MAX_EVENTS = 50;
@@ -4957,7 +4985,7 @@ var DEFAULT_AGENT_COMMAND = `node ${DEFAULT_AGENT_FILE}`;
4957
4985
  var MANIFEST_SCHEMA_URL = "https://pome.sh/schemas/v1/pome.json";
4958
4986
  var MAX_UNREADABLE_PATHS_SHOWN = 5;
4959
4987
  function readPackageVersion() {
4960
- if ("0.42.1".length > 0) return "0.42.1";
4988
+ if ("0.42.3".length > 0) return "0.42.3";
4961
4989
  try {
4962
4990
  const here = dirname(fileURLToPath(import.meta.url));
4963
4991
  const candidates = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pome-sh/cli",
3
- "version": "0.42.1",
3
+ "version": "0.42.3",
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",