@pome-sh/cli 0.23.6 → 0.23.8

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.23.6",
4
- "git_sha": "f9e8dd169756875b27344c6b3b3cc818aeec93d6",
5
- "build_time": "2026-08-10T16:36:24.732Z"
3
+ "version": "0.23.8",
4
+ "git_sha": "868105c982912eb0f5a95ab65f4a8153e73b4a33",
5
+ "build_time": "2026-08-10T21:34:22.900Z"
6
6
  }
@@ -183,7 +183,7 @@ async function checkTwinReachable(_configDir) {
183
183
  });
184
184
  let harness;
185
185
  try {
186
- const { bootTwin } = await import('./twinHarness-VH4HVKSS.js');
186
+ const { bootTwin } = await import('./twinHarness-K6LAPTBC.js');
187
187
  harness = await bootTwin({
188
188
  twin: "github",
189
189
  seedState: void 0,
@@ -1,5 +1,5 @@
1
1
  import { readManifest, normalizeManifestTwins } from './chunk-XOWIA7NR.js';
2
- import { createHostedClient, perTwinReturnedByCloud, parseTaskFile, runAgentCommand, writeRunArtifactsCore, toTwinHttpEvent, redactJsonl, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, evaluationCounts } from './chunk-GFTFMA3T.js';
2
+ import { createHostedClient, perTwinReturnedByCloud, parseTaskFile, runAgentCommand, writeRunArtifactsCore, toTwinHttpEvent, redactJsonl, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, evaluationCounts } from './chunk-XJUBS2CV.js';
3
3
  import { MOUNTED_TWINS, HostedAuthError, HostedDiscardRefusedError, HostedQuotaError, HostedOrchError, HostedTrialError, agentResponseSchema } from './chunk-7AMIVWUB.js';
4
4
  import { redactSecrets, redactEvent } from './chunk-SG6ZTIMT.js';
5
5
  import { existsSync } from 'node:fs';
@@ -1,7 +1,7 @@
1
1
  import { getAvailablePort } from './chunk-XDU6TD4O.js';
2
2
  import { buildEgressAllowlist, readBlockedEgress } from './chunk-CBFKZZBR.js';
3
- import { parseTaskFile, seedStateForTwin, runAgentCommand, writeRunArtifactsCore } from './chunk-GFTFMA3T.js';
4
- import { createRecorder, bootTwin } from './chunk-2R46XQAL.js';
3
+ import { parseTaskFile, seedStateForTwin, runAgentCommand, writeRunArtifactsCore } from './chunk-XJUBS2CV.js';
4
+ import { createRecorder, bootTwin } from './chunk-S54BIYLZ.js';
5
5
  import { eventSchema } from './chunk-VBATFCWR.js';
6
6
  import { redactSecrets, redactEvent } from './chunk-SG6ZTIMT.js';
7
7
  import { serve } from '@hono/node-server';
@@ -1,6 +1,6 @@
1
1
  // ../packages/twin-github/package.json
2
2
  var package_default = {
3
- version: "0.10.1"};
3
+ version: "0.10.3"};
4
4
 
5
5
  // ../packages/twin-slack/package.json
6
6
  var package_default2 = {
@@ -39,7 +39,7 @@ var TWIN_REGISTRY = {
39
39
  defaultSeedState,
40
40
  GitHubDomain,
41
41
  openGitHubCloneDatabase
42
- } = await import('./src-ETJXAZZN.js');
42
+ } = await import('./src-UYWCHESS.js');
43
43
  const db = openGitHubCloneDatabase();
44
44
  const domain = new GitHubDomain(db);
45
45
  domain.seed(seedState === void 0 ? defaultSeedState() : seedState);
@@ -173,7 +173,7 @@ var TWIN_REGISTRY = {
173
173
  }
174
174
  };
175
175
  async function createGitHubSmokeApp() {
176
- const { createGitHubCloneApp } = await import('./src-ETJXAZZN.js');
176
+ const { createGitHubCloneApp } = await import('./src-UYWCHESS.js');
177
177
  return createGitHubCloneApp();
178
178
  }
179
179
  function defaultPortFor(twin, env = process.env) {
@@ -20,13 +20,61 @@ var seedSchema = z.object({
20
20
  description: z.string().default("")
21
21
  })).default([]),
22
22
  files: z.array(z.object({ path: z.string().min(1), content: z.string(), branch: z.string().optional() })).default([]),
23
+ // F-1421 — milestones, tags and releases are repository-level entities the
24
+ // twin already SERVES (`GET /milestones`, `/tags`, `/releases`,
25
+ // `/releases/latest`, `/releases/tags/:tag`) and the seed could not
26
+ // express. Zod strips unknown keys, so a seed naming one reached the
27
+ // domain as nothing at all and those routes could only ever answer `[]`
28
+ // — a shape of infidelity no shape-diff can see, because an empty array
29
+ // on both sides compares zero elements.
30
+ milestones: z.array(z.object({
31
+ // Assigned sequentially from 1 in seed order when omitted, the way
32
+ // `nextMilestoneNumber` hands them out. Honored when given, so a
33
+ // seed that pins `PATCH /milestones/2` addresses the milestone it
34
+ // named rather than one silently renumbered under it.
35
+ number: z.number().int().positive().optional(),
36
+ title: z.string().min(1),
37
+ description: z.string().default(""),
38
+ state: z.enum(["open", "closed"]).default("open"),
39
+ // GitHub's own spelling: an ISO 8601 timestamp. Absent means the
40
+ // milestone has no due date (`due_on: null` on the wire).
41
+ due_on: z.string().optional()
42
+ })).default([]),
43
+ // A tag names a commit. `target` is any ref the twin resolves — a branch
44
+ // name or a SHA — and defaults to the repository's default-branch head. A
45
+ // release whose `tag_name` matches an entry here reuses that tag rather
46
+ // than minting a second one: `createRelease` looks the tag up first.
47
+ tags: z.array(z.object({
48
+ name: z.string().min(1),
49
+ target: z.string().min(1).optional()
50
+ })).default([]),
51
+ releases: z.array(z.object({
52
+ tag_name: z.string().min(1),
53
+ // Nullable upstream, so an absent `name` means `null` — not `""`.
54
+ name: z.string().optional(),
55
+ body: z.string().default(""),
56
+ target_commitish: z.string().min(1).optional(),
57
+ draft: z.boolean().default(false),
58
+ prerelease: z.boolean().default(false),
59
+ author: z.string().min(1).optional()
60
+ })).default([]),
23
61
  issues: z.array(z.object({
24
62
  number: z.number().int().positive().optional(),
25
63
  title: z.string().min(1),
26
64
  body: z.string().default(""),
27
65
  state: z.enum(["open", "closed"]).default("open"),
28
66
  labels: z.array(z.string().min(1)).default([]),
29
- assignees: z.array(z.string().min(1)).default([])
67
+ assignees: z.array(z.string().min(1)).default([]),
68
+ // The issue's conversation timeline, served at
69
+ // `GET /repos/:o/:r/issues/:n/comments` (F-1421). `author` is
70
+ // seeded honestly rather than taken from the write path, which
71
+ // stamps every comment `pome-agent`: a world in which the agent
72
+ // under test wrote every comment on the issue it is being asked to
73
+ // read is not one worth testing against.
74
+ comments: z.array(z.object({
75
+ body: z.string().min(1),
76
+ author: z.string().min(1).optional()
77
+ })).default([])
30
78
  })).default([]),
31
79
  pull_requests: z.array(z.object({
32
80
  number: z.number().int().positive().optional(),
@@ -50,6 +98,30 @@ var seedSchema = z.object({
50
98
  context: z.string().min(1).default("ci/build"),
51
99
  state: z.enum(["error", "failure", "pending", "success"]).default("success"),
52
100
  description: z.string().default("")
101
+ })).default([]),
102
+ // F-1421 — the PR's CONVERSATION timeline. Same table, same route
103
+ // and same number space as an issue's comments, because GitHub
104
+ // models a pull request as an issue (F-1151). This is the third
105
+ // thing a reader could call "a comment on the PR" and the seed
106
+ // keeps all three apart: `reviews[].body` is the prose on a review
107
+ // verdict, `review_comments[]` below is anchored to a file and
108
+ // line, and THIS one is the timeline.
109
+ comments: z.array(z.object({
110
+ body: z.string().min(1),
111
+ author: z.string().min(1).optional()
112
+ })).default([]),
113
+ // F-1421 — inline review comments, served at
114
+ // `GET /repos/:o/:r/pulls/:n/comments`. Seeded through the domain's
115
+ // own write path, so `path` must name a file the PR changes and
116
+ // `line` must exist in it: a seeded review comment is one
117
+ // `POST /pulls/:n/comments` could have produced, not a row only the
118
+ // seeder can make.
119
+ review_comments: z.array(z.object({
120
+ body: z.string().min(1),
121
+ path: z.string().min(1),
122
+ line: z.number().int().positive().default(1),
123
+ side: z.enum(["LEFT", "RIGHT"]).default("RIGHT"),
124
+ author: z.string().min(1).optional()
53
125
  })).default([])
54
126
  })).default([])
55
127
  }))
@@ -1,4 +1,4 @@
1
- import { TWIN_NAMES, isTwinName, TWIN_REGISTRY } from './chunk-T6ZGCJSG.js';
1
+ import { TWIN_NAMES, isTwinName, TWIN_REGISTRY } from './chunk-HRHFPIK3.js';
2
2
  import { createFileBackedRecorderStore, createRecorderStore } from './chunk-TV5S6WQV.js';
3
3
 
4
4
  // src/recorder/recorder.ts
@@ -1,8 +1,8 @@
1
1
  import { criterionSchema, finalizeResponseSchema, HostedDiscardRefusedError, HostedOrchError, HostedAuthError, HostedQuotaError, submitResultResponseSchema, createEvalSessionResponseSchema, createSessionResponseSchema, sessionPublicSchema } from './chunk-7AMIVWUB.js';
2
- import { seedSchema, parseSeed, defaultSeedState as defaultSeedState$2 } from './chunk-SGDUD7KK.js';
2
+ import { seedSchema, parseSeed, defaultSeedState as defaultSeedState$2 } from './chunk-KIUIKAVU.js';
3
3
  import { gmailSeedSchema, defaultSeedState } from './chunk-NJ246QPJ.js';
4
4
  import { linearSeedSchema, defaultSeedState as defaultSeedState$1 } from './chunk-ZKID2HS3.js';
5
- import { isTwinName, TWIN_REGISTRY } from './chunk-T6ZGCJSG.js';
5
+ import { isTwinName, TWIN_REGISTRY } from './chunk-HRHFPIK3.js';
6
6
  import { toTwinHttpEventRow } from './chunk-TV5S6WQV.js';
7
7
  import { redactEvent, redactSecrets } from './chunk-SG6ZTIMT.js';
8
8
  import { mkdir, appendFile, writeFile, readFile } from 'node:fs/promises';
@@ -1,16 +1,16 @@
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-YUKMLGYF.js';
3
+ import { runTask, demoTaskPath, DEMO_TASK_NAME, DEMO_REPO } from './chunk-7EHEN7PQ.js';
4
4
  import { getAvailablePort } from './chunk-XDU6TD4O.js';
5
5
  import './chunk-CBFKZZBR.js';
6
- import { createHostedClient, parseTaskFile, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, outcomeOf } from './chunk-GFTFMA3T.js';
6
+ import { createHostedClient, parseTaskFile, uploadRunBlobs, scoreFromFinalizeResponse, scoreStatus, outcomeOf } from './chunk-XJUBS2CV.js';
7
7
  import './chunk-NW7HGA2K.js';
8
8
  import { HostedQuotaError, HostedOrchError } from './chunk-7AMIVWUB.js';
9
- import './chunk-SGDUD7KK.js';
9
+ import './chunk-KIUIKAVU.js';
10
10
  import './chunk-NJ246QPJ.js';
11
11
  import './chunk-ZKID2HS3.js';
12
- import { bootTwin } from './chunk-2R46XQAL.js';
13
- import './chunk-T6ZGCJSG.js';
12
+ import { bootTwin } from './chunk-S54BIYLZ.js';
13
+ import './chunk-HRHFPIK3.js';
14
14
  import './chunk-TV5S6WQV.js';
15
15
  import './chunk-VBATFCWR.js';
16
16
  import './chunk-SG6ZTIMT.js';
@@ -1,13 +1,13 @@
1
1
  import { newGroupId, criterionPhrase } from './chunk-RGZBC7NF.js';
2
- import { runTaskHosted, resolveRunAgentIdentity } from './chunk-RSQY6UIL.js';
2
+ import { runTaskHosted, resolveRunAgentIdentity } from './chunk-6NLZUM3Y.js';
3
3
  import './chunk-XOWIA7NR.js';
4
- import { createHostedClient, parseTaskFile, outcomeOf } from './chunk-GFTFMA3T.js';
4
+ import { createHostedClient, parseTaskFile, outcomeOf } from './chunk-XJUBS2CV.js';
5
5
  import './chunk-NW7HGA2K.js';
6
6
  import { HostedQuotaError, HostedTrialError } from './chunk-7AMIVWUB.js';
7
- import './chunk-SGDUD7KK.js';
7
+ import './chunk-KIUIKAVU.js';
8
8
  import './chunk-NJ246QPJ.js';
9
9
  import './chunk-ZKID2HS3.js';
10
- import './chunk-T6ZGCJSG.js';
10
+ import './chunk-HRHFPIK3.js';
11
11
  import './chunk-TV5S6WQV.js';
12
12
  import './chunk-VBATFCWR.js';
13
13
  import './chunk-SG6ZTIMT.js';
@@ -1,22 +1,22 @@
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, loadTrialEvents, persistCredentialsAfterLogin, DEFAULT_DOCS_SITE_ORIGIN, resolveSeams, resolveCachedAgentId, readLinkCache, postAgentResolver, writeLinkCache, ensurePomeGitignored } from '../../chunk-RSQY6UIL.js';
2
+ import { DEFAULT_CONTROL_PLANE_URL, DEFAULT_DASHBOARD_URL, clearLocalCredentials, friendlyHostedError, runSessionCreate, runSessionList, runSessionStop, resolveCredentials, runTaskHosted, discoverRunSet, VERDICT_ARTIFACT_VERSION, loadTrialEvents, persistCredentialsAfterLogin, DEFAULT_DOCS_SITE_ORIGIN, resolveSeams, resolveCachedAgentId, readLinkCache, postAgentResolver, writeLinkCache, ensurePomeGitignored } from '../../chunk-6NLZUM3Y.js';
3
3
  import { readManifest, writeManifest, MANIFEST_JSON, readRequiredManifest, normalizeManifestTwins } from '../../chunk-XOWIA7NR.js';
4
- import { assetPath, runTask, resolvePackageRoot, DEMO_TASK_NAME, demoTaskPath } from '../../chunk-YUKMLGYF.js';
4
+ import { assetPath, runTask, resolvePackageRoot, DEMO_TASK_NAME, demoTaskPath } from '../../chunk-7EHEN7PQ.js';
5
5
  import '../../chunk-XDU6TD4O.js';
6
6
  import '../../chunk-CBFKZZBR.js';
7
- import { parseTaskFile, scoreStatus, runScoreLine, readLatestRun, readMetaSummary, outcomeOf, readConfigTwins, scoreCountsSummary, markerFor, criterionMarkerLabel, twinSkipSuffix, readCodeCriteria, createHostedClient, toTwinHttpEvent, redactJsonl, scoreFromFinalizeResponse, parseGitHubSeedState, uploadRunBlobs, isPreSatisfied } from '../../chunk-GFTFMA3T.js';
7
+ import { parseTaskFile, scoreStatus, runScoreLine, readLatestRun, readMetaSummary, outcomeOf, readConfigTwins, scoreCountsSummary, markerFor, criterionMarkerLabel, twinSkipSuffix, readCodeCriteria, createHostedClient, toTwinHttpEvent, redactJsonl, scoreFromFinalizeResponse, parseGitHubSeedState, uploadRunBlobs, isPreSatisfied } from '../../chunk-XJUBS2CV.js';
8
8
  import '../../chunk-NW7HGA2K.js';
9
9
  import { MOUNTED_TWINS, deriveAgentSlug, exitCodeFor, HostedUsageError, HostedOrchError, HostedAuthError, HostedQuotaError } from '../../chunk-7AMIVWUB.js';
10
10
  import { TAPE_ASSERTABLE_TOOLS } from '../../chunk-FKZZWWYC.js';
11
- import { seedSchema } from '../../chunk-SGDUD7KK.js';
11
+ import { seedSchema } from '../../chunk-KIUIKAVU.js';
12
12
  import { SLACK_CHECKS } from '../../chunk-6OT4IW25.js';
13
13
  import { GMAIL_CHECKS } from '../../chunk-SE44FKWH.js';
14
14
  import '../../chunk-NJ246QPJ.js';
15
15
  import { LINEAR_CHECKS } from '../../chunk-XBT6ZLBG.js';
16
16
  import '../../chunk-ZKID2HS3.js';
17
17
  import { oneOf, defineCheck, repoRef, VACUITY_SENTINEL_NUMBER, childStatePath, VACUITY_SENTINEL, statePath, templateSlots, renderCheck, checksDigest, checkPattern, checkNearMissPattern } from '../../chunk-JWJYNAWI.js';
18
- import '../../chunk-2R46XQAL.js';
19
- import { TWIN_NAME_LIST, isTwinName, createGitHubSmokeApp } from '../../chunk-T6ZGCJSG.js';
18
+ import '../../chunk-S54BIYLZ.js';
19
+ import { TWIN_NAME_LIST, isTwinName, createGitHubSmokeApp } from '../../chunk-HRHFPIK3.js';
20
20
  import '../../chunk-TV5S6WQV.js';
21
21
  import { isLegacyEventRow, eventSchema } from '../../chunk-VBATFCWR.js';
22
22
  import { redactEvent, redactSecrets } from '../../chunk-SG6ZTIMT.js';
@@ -850,7 +850,7 @@ async function throwForStatus(res) {
850
850
 
851
851
  // src/task/seed-verifier.ts
852
852
  async function verifySeedWithTwin(seed) {
853
- const { GitHubDomain, openGitHubCloneDatabase } = await import('../../src-ETJXAZZN.js');
853
+ const { GitHubDomain, openGitHubCloneDatabase } = await import('../../src-UYWCHESS.js');
854
854
  const db = openGitHubCloneDatabase(":memory:");
855
855
  try {
856
856
  new GitHubDomain(db).seed(seed);
@@ -4521,7 +4521,7 @@ var DEFAULT_AGENT_FILE = "examples/agents/scripted-triage-agent.ts";
4521
4521
  var DEFAULT_AGENT_COMMAND = `node ${DEFAULT_AGENT_FILE}`;
4522
4522
  var MANIFEST_SCHEMA_URL = "https://pome.sh/schemas/v1/pome.json";
4523
4523
  function readPackageVersion() {
4524
- if ("0.23.6".length > 0) return "0.23.6";
4524
+ if ("0.23.8".length > 0) return "0.23.8";
4525
4525
  try {
4526
4526
  const here = dirname(fileURLToPath(import.meta.url));
4527
4527
  const candidates = [
@@ -4976,7 +4976,7 @@ function createProgram() {
4976
4976
  return;
4977
4977
  }
4978
4978
  {
4979
- const { runDoctorChecks } = await import('../../checks-HIGL2LWC.js');
4979
+ const { runDoctorChecks } = await import('../../checks-TLWGOQJJ.js');
4980
4980
  const { renderDoctorReport } = await import('../../render-ZQQ4UMNO.js');
4981
4981
  const doctorReport = await runDoctorChecks({ mode: useLocal ? "full" : "hosted" });
4982
4982
  if (!doctorReport.ok) {
@@ -5014,7 +5014,7 @@ function createProgram() {
5014
5014
  taskForRuns.config.runs
5015
5015
  );
5016
5016
  if (k > 1) {
5017
- const { runTrialGroup } = await import('../../runTrialGroup-NIBA5KRF.js');
5017
+ const { runTrialGroup } = await import('../../runTrialGroup-6LI6FB72.js');
5018
5018
  const fileForRerun = relative(process.cwd(), file);
5019
5019
  const rerunCommand = defaultTask ? options.trials !== void 0 ? `pome run -n ${k}` : "pome run" : `pome run ${fileForRerun && !fileForRerun.startsWith("..") ? fileForRerun : file} -n ${k}`;
5020
5020
  const groupResult = await runTrialGroup({
@@ -5108,7 +5108,7 @@ function createProgram() {
5108
5108
  process.exitCode = 5;
5109
5109
  return;
5110
5110
  }
5111
- const { runDemo } = await import('../../runDemo-4J5TDA5N.js');
5111
+ const { runDemo } = await import('../../runDemo-FVISANBG.js');
5112
5112
  const result = await runDemo({
5113
5113
  apiBase: opts.apiUrl.replace(/\/$/, ""),
5114
5114
  dashboardBase: process.env.POME_DASHBOARD_URL ?? DEFAULT_DASHBOARD_URL,
@@ -5126,7 +5126,7 @@ function createProgram() {
5126
5126
  program.command("doctor").description(
5127
5127
  "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."
5128
5128
  ).action(async () => {
5129
- const { runDoctorChecks } = await import('../../checks-HIGL2LWC.js');
5129
+ const { runDoctorChecks } = await import('../../checks-TLWGOQJJ.js');
5130
5130
  const { renderDoctorReport } = await import('../../render-ZQQ4UMNO.js');
5131
5131
  const report = await runDoctorChecks();
5132
5132
  for (const line of renderDoctorReport(report, { passNote: true })) console.error(line);
@@ -5290,7 +5290,7 @@ function createProgram() {
5290
5290
  ).description(
5291
5291
  "Start a standalone twin as a long-lived foreground server (Ctrl-C to stop)"
5292
5292
  ).action(async (name, options) => {
5293
- const { runTwinStartCommand } = await import('../../twinStart-FR2NH7YE.js');
5293
+ const { runTwinStartCommand } = await import('../../twinStart-YNQLSQOY.js');
5294
5294
  await runTwinStartCommand(name, options);
5295
5295
  });
5296
5296
  twin.command("reset").argument("[name]", "Twin name (default: github)", "github").description("Reset standalone twin state").action(async (name) => {
@@ -1,6 +1,6 @@
1
1
  import './chunk-FKZZWWYC.js';
2
- import { defaultSeedState, parseSeed } from './chunk-SGDUD7KK.js';
3
- export { defaultSeedState, parseSeed, seedSchema } from './chunk-SGDUD7KK.js';
2
+ import { defaultSeedState, parseSeed } from './chunk-KIUIKAVU.js';
3
+ export { defaultSeedState, parseSeed, seedSchema } from './chunk-KIUIKAVU.js';
4
4
  import { routeInputDeclarer, integerInput, mountDeclaredRoute, UndeclaredInputError, MalformedBodyError } from './chunk-2Q3P45LK.js';
5
5
  import { loadMcpToolFixture, defineTwin, twinBuildInfo, deriveMcpToolTable, UnknownToolError, openTwinDatabase, createApp } from './chunk-TV5S6WQV.js';
6
6
  import './chunk-VBATFCWR.js';
@@ -2935,14 +2935,7 @@ function getPullRequestComments(domain, input) {
2935
2935
  const repo = domain.requireRepo(input.owner, input.repo);
2936
2936
  domain.requirePullRequest(repo.id, input.pull_number);
2937
2937
  const rows = domain.listPullRequestReviewCommentRows(repo.id, input.pull_number);
2938
- return paginate(rows, input.page, input.per_page ?? input.perPage).map((comment) => ({
2939
- id: comment.id,
2940
- path: comment.path,
2941
- body: comment.body,
2942
- user: userJson(comment.user_login),
2943
- created_at: comment.created_at,
2944
- updated_at: comment.updated_at
2945
- }));
2938
+ return paginate(rows, input.page, input.per_page ?? input.perPage).map((comment) => pullRequestReviewCommentJson(comment, repo));
2946
2939
  }
2947
2940
  function getPullRequestStatus(domain, input) {
2948
2941
  const repo = domain.requireRepo(input.owner, input.repo);
@@ -3417,6 +3410,19 @@ var GitHubDomain = class {
3417
3410
  for (const label of repoSeed.labels ?? []) {
3418
3411
  this.createLabel(repo, label.name, label.color ?? "ededed", label.description ?? "");
3419
3412
  }
3413
+ for (const milestone of repoSeed.milestones ?? []) {
3414
+ const created2 = this.createMilestone({
3415
+ owner: repo.owner,
3416
+ repo: repo.name,
3417
+ title: milestone.title,
3418
+ description: milestone.description ?? "",
3419
+ due_on: milestone.due_on,
3420
+ state: milestone.state ?? "open"
3421
+ });
3422
+ if (milestone.number && milestone.number !== created2.number) {
3423
+ this.db.prepare("UPDATE milestones SET number = ? WHERE repo_id = ? AND number = ?").run(milestone.number, repo.id, created2.number);
3424
+ }
3425
+ }
3420
3426
  this.createBranchInternal(repo, repo.default_branch, null);
3421
3427
  const files = repoSeed.files?.filter((file) => (file.branch ?? repo.default_branch) === repo.default_branch) ?? [];
3422
3428
  this.commitFiles(repo, repo.default_branch, "Initial seed commit", files, "pome-agent");
@@ -3441,6 +3447,9 @@ var GitHubDomain = class {
3441
3447
  }
3442
3448
  if (issue.state === "closed")
3443
3449
  this.updateIssue({ owner: repo.owner, repo: repo.name, issue_number: issue.number ?? created2.number, state: "closed" });
3450
+ for (const comment of issue.comments ?? []) {
3451
+ this.seedComment(repo, issue.number ?? created2.number, comment);
3452
+ }
3444
3453
  }
3445
3454
  for (const pull of repoSeed.pull_requests ?? []) {
3446
3455
  const createdPr = this.createPullRequest({ owner: repo.owner, repo: repo.name, title: pull.title, body: pull.body ?? "", head: pull.head, base: pull.base ?? repo.default_branch, actor: pull.author });
@@ -3476,6 +3485,43 @@ var GitHubDomain = class {
3476
3485
  });
3477
3486
  }
3478
3487
  }
3488
+ for (const comment of pull.comments ?? []) {
3489
+ this.seedComment(repo, prNumber2, comment);
3490
+ }
3491
+ for (const comment of pull.review_comments ?? []) {
3492
+ const author = comment.author ?? "pome-agent";
3493
+ this.upsertUser(author, "User", author);
3494
+ this.createPullRequestReviewComment({
3495
+ owner: repo.owner,
3496
+ repo: repo.name,
3497
+ pull_number: prNumber2,
3498
+ body: comment.body,
3499
+ path: comment.path,
3500
+ line: comment.line ?? 1,
3501
+ side: comment.side ?? "RIGHT"
3502
+ }, { actor: author });
3503
+ }
3504
+ }
3505
+ for (const tag of repoSeed.tags ?? []) {
3506
+ if (this.db.prepare("SELECT 1 FROM tags WHERE repo_id = ? AND name = ?").get(repo.id, tag.name)) {
3507
+ conflict(`Seed declares tag ${tag.name} twice in ${repo.full_name}`);
3508
+ }
3509
+ const sha = this.resolveRefToSha(repo, tag.target ?? repo.default_branch);
3510
+ this.db.prepare("INSERT INTO tags (repo_id, name, commit_sha, created_at) VALUES (?, ?, ?, ?)").run(repo.id, tag.name, sha, nowIso());
3511
+ }
3512
+ for (const release of repoSeed.releases ?? []) {
3513
+ const author = release.author ?? "pome-agent";
3514
+ this.upsertUser(author, "User", author);
3515
+ this.createRelease({
3516
+ owner: repo.owner,
3517
+ repo: repo.name,
3518
+ tag_name: release.tag_name,
3519
+ target_commitish: release.target_commitish,
3520
+ name: release.name,
3521
+ body: release.body ?? "",
3522
+ draft: release.draft ?? false,
3523
+ prerelease: release.prerelease ?? false
3524
+ }, { actor: author });
3479
3525
  }
3480
3526
  }
3481
3527
  this.audit("seed", null, { repositories: parsedSeed.repositories.length });
@@ -3486,6 +3532,23 @@ var GitHubDomain = class {
3486
3532
  after: { repositories: this.summarizeRepositories() }
3487
3533
  });
3488
3534
  }
3535
+ /**
3536
+ * F-1421 — plant one conversation comment on an issue or a pull request.
3537
+ *
3538
+ * A direct INSERT, for the same reason the seeded reviews above bypass
3539
+ * `createPullRequestReview`: `addIssueComment` stamps `user_login =
3540
+ * "pome-agent"` unconditionally, and a seeded world where the agent under
3541
+ * test wrote every comment it is being asked to read has nothing to read.
3542
+ * The one check the write path does that matters here is kept — the comment
3543
+ * must hang off an issue or a pull request that exists (F-1151).
3544
+ */
3545
+ seedComment(repo, number, comment) {
3546
+ this.requireCommentTarget(repo.id, number);
3547
+ const author = comment.author ?? "pome-agent";
3548
+ this.upsertUser(author, "User", author);
3549
+ const now = nowIso();
3550
+ this.db.prepare("INSERT INTO issue_comments (repo_id, issue_number, body, user_login, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?)").run(repo.id, number, comment.body, author, now, now);
3551
+ }
3489
3552
  summarizeRepositories() {
3490
3553
  const rows = this.db.prepare("SELECT owner, name FROM repositories ORDER BY full_name ASC").all();
3491
3554
  return rows;
@@ -4237,6 +4300,11 @@ var GitHubDomain = class {
4237
4300
  listPullRequestReviewRows(repoId, pullNumber) {
4238
4301
  return this.db.prepare("SELECT * FROM pull_request_reviews WHERE repo_id = ? AND pull_number = ? ORDER BY submitted_at ASC").all(repoId, pullNumber);
4239
4302
  }
4303
+ // F-1422 — `PullRequestReviewCommentRow`, not a six-key structural subset of
4304
+ // it. The query is `SELECT *` and always was, so the narrow cast described
4305
+ // less than the reader was handed and every caller inherited that description
4306
+ // as its ceiling: `getPullRequestComments` served exactly the six keys named
4307
+ // here while `line`, `side` and `commit_sha` sat unreachable in the same row.
4240
4308
  listPullRequestReviewCommentRows(repoId, pullNumber) {
4241
4309
  return this.db.prepare("SELECT * FROM pull_request_review_comments WHERE repo_id = ? AND pull_number = ? ORDER BY id ASC").all(repoId, pullNumber);
4242
4310
  }
@@ -0,0 +1,5 @@
1
+ export { UnsupportedTwinError, bootTwin } from './chunk-S54BIYLZ.js';
2
+ export { STRIPE_LOCAL_ACCOUNT_ID } from './chunk-HRHFPIK3.js';
3
+ import './chunk-TV5S6WQV.js';
4
+ import './chunk-VBATFCWR.js';
5
+ import './chunk-SG6ZTIMT.js';
@@ -1,5 +1,5 @@
1
- import { bootTwin } from './chunk-2R46XQAL.js';
2
- import { isTwinName, TWIN_NAMES, defaultPortFor, TWIN_REGISTRY } from './chunk-T6ZGCJSG.js';
1
+ import { bootTwin } from './chunk-S54BIYLZ.js';
2
+ import { isTwinName, TWIN_NAMES, defaultPortFor, TWIN_REGISTRY } from './chunk-HRHFPIK3.js';
3
3
  import './chunk-TV5S6WQV.js';
4
4
  import './chunk-VBATFCWR.js';
5
5
  import './chunk-SG6ZTIMT.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pome-sh/cli",
3
- "version": "0.23.6",
3
+ "version": "0.23.8",
4
4
  "description": "Digital-twin testing for AI agents \u2014 run tasks against resettable local or hosted twins and record tool-call traces for evaluation on pome.sh.",
5
5
  "keywords": [
6
6
  "ai",
@@ -1,5 +0,0 @@
1
- export { UnsupportedTwinError, bootTwin } from './chunk-2R46XQAL.js';
2
- export { STRIPE_LOCAL_ACCOUNT_ID } from './chunk-T6ZGCJSG.js';
3
- import './chunk-TV5S6WQV.js';
4
- import './chunk-VBATFCWR.js';
5
- import './chunk-SG6ZTIMT.js';