@cat-factory/executor-harness 1.70.0 → 1.72.0

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/job.js CHANGED
@@ -703,6 +703,8 @@ function assembleAgentJob(o, mode, agentField, parts) {
703
703
  */
704
704
  function collectOptionalRequestFields(o) {
705
705
  return {
706
+ ...(typeof o.workspaceId === 'string' && o.workspaceId ? { workspaceId: o.workspaceId } : {}),
707
+ ...(typeof o.executionId === 'string' && o.executionId ? { executionId: o.executionId } : {}),
706
708
  ...(typeof o.githubApiBase === 'string' ? { githubApiBase: o.githubApiBase } : {}),
707
709
  ...(typeof o.webToolsGuidance === 'string' ? { webToolsGuidance: o.webToolsGuidance } : {}),
708
710
  ...(o.webSearch === true ? { webSearch: true } : {}),
package/dist/server.js CHANGED
@@ -65,6 +65,11 @@ describe) {
65
65
  // image carries no runtime deps.
66
66
  const KINDS = {
67
67
  agent: defineKind(parseAgentJob, handleAgent, (job) => ({
68
+ // The backend's correlation ids first, so EVERY line this job emits joins to the run in the
69
+ // backend's own logs. Absent on a body from a backend older than the field — the rest of the
70
+ // description is unaffected.
71
+ ...(job.workspaceId ? { workspaceId: job.workspaceId } : {}),
72
+ ...(job.executionId ? { executionId: job.executionId } : {}),
68
73
  mode: job.mode,
69
74
  repo: `${job.repo.owner}/${job.repo.name}`,
70
75
  branch: job.branch,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/executor-harness",
3
- "version": "1.70.0",
3
+ "version": "1.72.0",
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",
@@ -26,9 +26,9 @@
26
26
  "hono": "^4.12.32",
27
27
  "typescript": "7.0.2",
28
28
  "vitest": "^4.1.10",
29
- "@cat-factory/kernel": "0.179.0",
30
- "@cat-factory/server": "0.167.0",
31
- "@cat-factory/spend": "0.12.108"
29
+ "@cat-factory/kernel": "0.184.0",
30
+ "@cat-factory/server": "0.172.0",
31
+ "@cat-factory/spend": "0.12.113"
32
32
  },
33
33
  "scripts": {
34
34
  "build": "tsc -p tsconfig.json",
package/src/job.ts CHANGED
@@ -703,6 +703,17 @@ export interface ValidationSpec {
703
703
 
704
704
  export interface AgentJob extends HarnessAuthFields {
705
705
  jobId: string
706
+ /**
707
+ * The backend run this job belongs to, bound onto the per-job logger beside `jobId` and used
708
+ * for NOTHING else. The container is the far side of the platform's longest seam: the backend
709
+ * knows a run as `executionId` and the harness knew it only as `jobId`, so a container log line
710
+ * could not be joined to the run that dispatched it except through the
711
+ * `${executionId}-${agentKind}` job-id naming convention. Optional because a body predating the
712
+ * field (or a hand-rolled acceptance fixture) must still run — an absent id costs correlation,
713
+ * never the job.
714
+ */
715
+ workspaceId?: string
716
+ executionId?: string
706
717
  mode: AgentMode
707
718
  systemPrompt: string
708
719
  userPrompt: string
@@ -1435,6 +1446,8 @@ function assembleAgentJob(
1435
1446
  */
1436
1447
  function collectOptionalRequestFields(o: Record<string, unknown>): Partial<AgentJob> {
1437
1448
  return {
1449
+ ...(typeof o.workspaceId === 'string' && o.workspaceId ? { workspaceId: o.workspaceId } : {}),
1450
+ ...(typeof o.executionId === 'string' && o.executionId ? { executionId: o.executionId } : {}),
1438
1451
  ...(typeof o.githubApiBase === 'string' ? { githubApiBase: o.githubApiBase } : {}),
1439
1452
  ...(typeof o.webToolsGuidance === 'string' ? { webToolsGuidance: o.webToolsGuidance } : {}),
1440
1453
  ...(o.webSearch === true ? { webSearch: true } : {}),
package/src/server.ts CHANGED
@@ -82,6 +82,11 @@ function defineKind<TJob extends { jobId: string }, TResult extends JobResultBas
82
82
  // image carries no runtime deps.
83
83
  const KINDS: Record<string, KindEntry> = {
84
84
  agent: defineKind(parseAgentJob, handleAgent, (job) => ({
85
+ // The backend's correlation ids first, so EVERY line this job emits joins to the run in the
86
+ // backend's own logs. Absent on a body from a backend older than the field — the rest of the
87
+ // description is unaffected.
88
+ ...(job.workspaceId ? { workspaceId: job.workspaceId } : {}),
89
+ ...(job.executionId ? { executionId: job.executionId } : {}),
85
90
  mode: job.mode,
86
91
  repo: `${job.repo.owner}/${job.repo.name}`,
87
92
  branch: job.branch,