@cat-factory/executor-harness 1.34.0 → 1.34.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.
- package/dist/job.js +15 -0
- package/package.json +3 -3
- package/src/job.ts +21 -0
package/dist/job.js
CHANGED
|
@@ -295,8 +295,23 @@ function parseAgentInfraSpec(value) {
|
|
|
295
295
|
...(typeof o.environmentUrl === 'string' && o.environmentUrl
|
|
296
296
|
? { environmentUrl: o.environmentUrl }
|
|
297
297
|
: {}),
|
|
298
|
+
...(() => {
|
|
299
|
+
const peers = parseStringMap(o.peerEnvironments);
|
|
300
|
+
return peers ? { peerEnvironments: peers } : {};
|
|
301
|
+
})(),
|
|
298
302
|
};
|
|
299
303
|
}
|
|
304
|
+
/** Parse a `Record<string, string>` from untrusted input, keeping only string→non-empty-string. */
|
|
305
|
+
function parseStringMap(value) {
|
|
306
|
+
if (typeof value !== 'object' || value === null)
|
|
307
|
+
return undefined;
|
|
308
|
+
const out = {};
|
|
309
|
+
for (const [key, val] of Object.entries(value)) {
|
|
310
|
+
if (typeof val === 'string' && val)
|
|
311
|
+
out[key] = val;
|
|
312
|
+
}
|
|
313
|
+
return Object.keys(out).length ? out : undefined;
|
|
314
|
+
}
|
|
300
315
|
/**
|
|
301
316
|
* Env-var names never injected from a frontend binding: spread over `process.env` at build
|
|
302
317
|
* time, so any of these would break the toolchain (or enable code execution / cert overrides)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/executor-harness",
|
|
3
|
-
"version": "1.34.
|
|
3
|
+
"version": "1.34.4",
|
|
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,8 +26,8 @@
|
|
|
26
26
|
"hono": "^4.12.27",
|
|
27
27
|
"typescript": "^6.0.3",
|
|
28
28
|
"vitest": "^4.1.9",
|
|
29
|
-
"@cat-factory/server": "0.
|
|
30
|
-
"@cat-factory/spend": "0.10.
|
|
29
|
+
"@cat-factory/server": "0.75.0",
|
|
30
|
+
"@cat-factory/spend": "0.10.84"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "tsc -p tsconfig.json",
|
package/src/job.ts
CHANGED
|
@@ -363,6 +363,13 @@ export interface ServiceInfraSpec {
|
|
|
363
363
|
composePath?: string
|
|
364
364
|
/** Ephemeral mode: the provisioned environment URL (echoed for context only). */
|
|
365
365
|
environmentUrl?: string
|
|
366
|
+
/**
|
|
367
|
+
* The connected services "directly involved" in this task that have a LIVE ephemeral env this
|
|
368
|
+
* run (service title → URL), so a cross-service integration test can reach a peer's real
|
|
369
|
+
* environment. Echoed for context only (surfaced in the agent's prompt); the harness stands
|
|
370
|
+
* nothing up for it. Absent when no involved peer is live.
|
|
371
|
+
*/
|
|
372
|
+
peerEnvironments?: Record<string, string>
|
|
366
373
|
}
|
|
367
374
|
|
|
368
375
|
/**
|
|
@@ -698,7 +705,21 @@ function parseAgentInfraSpec(value: unknown): AgentInfraSpec | undefined {
|
|
|
698
705
|
...(typeof o.environmentUrl === 'string' && o.environmentUrl
|
|
699
706
|
? { environmentUrl: o.environmentUrl }
|
|
700
707
|
: {}),
|
|
708
|
+
...(() => {
|
|
709
|
+
const peers = parseStringMap(o.peerEnvironments)
|
|
710
|
+
return peers ? { peerEnvironments: peers } : {}
|
|
711
|
+
})(),
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
/** Parse a `Record<string, string>` from untrusted input, keeping only string→non-empty-string. */
|
|
716
|
+
function parseStringMap(value: unknown): Record<string, string> | undefined {
|
|
717
|
+
if (typeof value !== 'object' || value === null) return undefined
|
|
718
|
+
const out: Record<string, string> = {}
|
|
719
|
+
for (const [key, val] of Object.entries(value as Record<string, unknown>)) {
|
|
720
|
+
if (typeof val === 'string' && val) out[key] = val
|
|
701
721
|
}
|
|
722
|
+
return Object.keys(out).length ? out : undefined
|
|
702
723
|
}
|
|
703
724
|
|
|
704
725
|
/**
|