@cat-factory/executor-harness 1.129.0 → 1.132.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/agent.js CHANGED
@@ -861,6 +861,10 @@ export function buildSingleRepoCodingSpec(job, pushBranch) {
861
861
  guardLimits: job.guardLimits,
862
862
  ...(job.persistentCheckout ? { persistentCheckout: true } : {}),
863
863
  ...(job.streamFollowUps ? { streamFollowUps: true } : {}),
864
+ // The task's linked documents, materialised into `.cat-context/` for the agent to read on
865
+ // demand. Every other caller of `runAgentInWorkspace` forwards these; this spread was the one
866
+ // that did not, so the implementer's prompt named files its checkout had never been given.
867
+ ...(job.contextFiles?.length ? { contextFiles: job.contextFiles } : {}),
864
868
  // Whether a pull request will open at all is exactly `job.pr` (see the `if (job.pr)` guard in
865
869
  // `runSingleRepoCoding`), and it is what decides whether the repo's PR template is worth
866
870
  // resolving. Read off the same field rather than a new job-body flag, so the two can't drift.
@@ -1,4 +1,4 @@
1
- import type { HarnessAuthFields, ImageManifestSpec, RepoSpec, SkillSpec, McpServerSpec } from './job.js';
1
+ import type { ContextFileSpec, HarnessAuthFields, ImageManifestSpec, RepoSpec, SkillSpec, McpServerSpec } from './job.js';
2
2
  import type { HarnessCallMetric } from './pi.js';
3
3
  import type { PiRunStats } from './pi-reduction.js';
4
4
  import { type EffortReport } from './effort.js';
@@ -99,6 +99,21 @@ export interface CodingAgentSpec extends HarnessAuthFields {
99
99
  * `docs/initiatives/bugfix-reproduction-proof.md`.
100
100
  */
101
101
  reproduction?: ReproductionSpec;
102
+ /**
103
+ * The run's LINKED CONTEXT documents (the task's attached brief, an RFC, a tracker issue body),
104
+ * materialised into `.cat-context/<path>` in the checkout and enumerated for the agent in its
105
+ * `AGENTS.md` context block. Absent ⇒ none.
106
+ *
107
+ * Carried here because the CODING agent is the one that needs them most and was the ONE path
108
+ * that dropped them: every sibling caller of {@link runAgentInWorkspace} (the explore paths, the
109
+ * conflict path, `multi-repo-coding.ts`) forwarded `job.contextFiles` and this one did not, so a
110
+ * task whose brief was too long for `description` and therefore rode an attached document
111
+ * reached the implementer as a prompt naming `.cat-context/<file>.md` and a checkout with no
112
+ * such directory. The agent then rebuilt the brief from whatever summary the prompt carried and
113
+ * reported the gap as a follow-up question, which is the most expensive way to discover a
114
+ * missing field spread.
115
+ */
116
+ contextFiles?: ContextFileSpec[];
102
117
  /**
103
118
  * The skills to make available for this run — a `skill` step's pick and/or the running kind's
104
119
  * declared playbooks. Threaded into {@link runAgentInWorkspace}, which installs them
@@ -246,6 +246,8 @@ export async function runCodingAgent(spec, opts = {}) {
246
246
  webToolsGuidance: spec.webToolsGuidance,
247
247
  webSearchProxy: spec.webSearchProxy,
248
248
  guardLimits: spec.guardLimits,
249
+ // Materialised into `.cat-context/` and enumerated in the agent's AGENTS.md block.
250
+ ...(spec.contextFiles?.length ? { contextFiles: spec.contextFiles } : {}),
249
251
  ...(spec.skills?.length ? { skills: spec.skills } : {}),
250
252
  ...(spec.mcpServers?.length ? { mcpServers: spec.mcpServers } : {}),
251
253
  ...(spec.referenceScreenshots
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/executor-harness",
3
- "version": "1.129.0",
3
+ "version": "1.132.1",
4
4
  "description": "Container payload: a thin TypeScript wrapper that runs the Pi coding agent against a cloned repo and opens a PR. Runs in the Cloudflare Container (and, in local native mode, as a host process); carries no secrets.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,14 +25,14 @@
25
25
  "access": "public"
26
26
  },
27
27
  "devDependencies": {
28
+ "@cat-factory/kernel": "0.318.1",
29
+ "@cat-factory/server": "0.306.1",
30
+ "@cat-factory/spend": "0.16.13",
28
31
  "@hono/node-server": "^2.1.1",
29
32
  "@types/node": "^26.2.0",
30
- "hono": "^4.13.3",
33
+ "hono": "^4.13.4",
31
34
  "typescript": "7.0.2",
32
- "vitest": "^4.1.11",
33
- "@cat-factory/kernel": "0.316.0",
34
- "@cat-factory/server": "0.302.0",
35
- "@cat-factory/spend": "0.16.9"
35
+ "vitest": "^4.1.11"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "tsc -p tsconfig.json",
package/src/agent.ts CHANGED
@@ -1024,6 +1024,10 @@ export function buildSingleRepoCodingSpec(
1024
1024
  guardLimits: job.guardLimits,
1025
1025
  ...(job.persistentCheckout ? { persistentCheckout: true } : {}),
1026
1026
  ...(job.streamFollowUps ? { streamFollowUps: true } : {}),
1027
+ // The task's linked documents, materialised into `.cat-context/` for the agent to read on
1028
+ // demand. Every other caller of `runAgentInWorkspace` forwards these; this spread was the one
1029
+ // that did not, so the implementer's prompt named files its checkout had never been given.
1030
+ ...(job.contextFiles?.length ? { contextFiles: job.contextFiles } : {}),
1027
1031
  // Whether a pull request will open at all is exactly `job.pr` (see the `if (job.pr)` guard in
1028
1032
  // `runSingleRepoCoding`), and it is what decides whether the repo's PR template is worth
1029
1033
  // resolving. Read off the same field rather than a new job-body flag, so the two can't drift.
@@ -2,6 +2,7 @@ import { mkdir } from 'node:fs/promises'
2
2
  import { join } from 'node:path'
3
3
  import { runCapturedCommand } from './captured-command.js'
4
4
  import type {
5
+ ContextFileSpec,
5
6
  HarnessAuthFields,
6
7
  ImageManifestSpec,
7
8
  RepoSpec,
@@ -162,6 +163,21 @@ export interface CodingAgentSpec extends HarnessAuthFields {
162
163
  * `docs/initiatives/bugfix-reproduction-proof.md`.
163
164
  */
164
165
  reproduction?: ReproductionSpec
166
+ /**
167
+ * The run's LINKED CONTEXT documents (the task's attached brief, an RFC, a tracker issue body),
168
+ * materialised into `.cat-context/<path>` in the checkout and enumerated for the agent in its
169
+ * `AGENTS.md` context block. Absent ⇒ none.
170
+ *
171
+ * Carried here because the CODING agent is the one that needs them most and was the ONE path
172
+ * that dropped them: every sibling caller of {@link runAgentInWorkspace} (the explore paths, the
173
+ * conflict path, `multi-repo-coding.ts`) forwarded `job.contextFiles` and this one did not, so a
174
+ * task whose brief was too long for `description` and therefore rode an attached document
175
+ * reached the implementer as a prompt naming `.cat-context/<file>.md` and a checkout with no
176
+ * such directory. The agent then rebuilt the brief from whatever summary the prompt carried and
177
+ * reported the gap as a follow-up question, which is the most expensive way to discover a
178
+ * missing field spread.
179
+ */
180
+ contextFiles?: ContextFileSpec[]
165
181
  /**
166
182
  * The skills to make available for this run — a `skill` step's pick and/or the running kind's
167
183
  * declared playbooks. Threaded into {@link runAgentInWorkspace}, which installs them
@@ -508,6 +524,8 @@ export async function runCodingAgent(
508
524
  webToolsGuidance: spec.webToolsGuidance,
509
525
  webSearchProxy: spec.webSearchProxy,
510
526
  guardLimits: spec.guardLimits,
527
+ // Materialised into `.cat-context/` and enumerated in the agent's AGENTS.md block.
528
+ ...(spec.contextFiles?.length ? { contextFiles: spec.contextFiles } : {}),
511
529
  ...(spec.skills?.length ? { skills: spec.skills } : {}),
512
530
  ...(spec.mcpServers?.length ? { mcpServers: spec.mcpServers } : {}),
513
531
  ...(spec.referenceScreenshots