@cat-factory/executor-harness 1.124.0 → 1.127.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 +1 -1
- package/dist/job-env.d.ts +1 -1
- package/dist/job-env.js +2 -2
- package/dist/job.d.ts +1 -1
- package/dist/job.js +3 -3
- package/package.json +7 -7
- package/src/agent.ts +1 -1
- package/src/job-env.ts +2 -2
- package/src/job.ts +5 -5
package/dist/agent.js
CHANGED
|
@@ -246,7 +246,7 @@ export async function handleAgent(job, opts = {}) {
|
|
|
246
246
|
// mode check here would be that decision made twice, in the half that cannot see the registry.
|
|
247
247
|
const scoped = withAgentEnv(opts, {
|
|
248
248
|
...registryEnv,
|
|
249
|
-
...secretEnv(job.
|
|
249
|
+
...secretEnv(job.capabilitySecrets),
|
|
250
250
|
...artifactUploadEnv(job.artifactUpload),
|
|
251
251
|
});
|
|
252
252
|
if (job.mode === 'preview')
|
package/dist/job-env.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export interface TestSecretSpec {
|
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Validate a `{ key, value }` env-pair list under `field`. Shared by the tester's `testSecrets`
|
|
38
|
-
* and by `
|
|
38
|
+
* and by `capabilitySecrets` (the credentials of a step's generative binary integrations), because
|
|
39
39
|
* both are secret values the harness turns into environment variables of the agent's own process
|
|
40
40
|
* and both owe the same guarantees: valid env-var names, no toolchain-critical
|
|
41
41
|
* ({@link isReservedEnvName}) names, no duplicates. A second copy of these rules would be a second
|
package/dist/job-env.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// The primitive VALUE rules of the untrusted job body: what counts as a required string, which
|
|
2
2
|
// environment-variable names a body may never set, and how the two env-bearing fields (the
|
|
3
|
-
// tester's `testSecrets`, a generative integration's `
|
|
3
|
+
// tester's `testSecrets`, a generative integration's `capabilitySecrets`, and a frontend binding's
|
|
4
4
|
// `env`) are parsed against those rules.
|
|
5
5
|
//
|
|
6
6
|
// Extracted from `job.ts` when the generative-integration credentials arrived (the file-size
|
|
@@ -77,7 +77,7 @@ export function parseInfraEnv(raw) {
|
|
|
77
77
|
const ENV_VAR_NAME_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
78
78
|
/**
|
|
79
79
|
* Validate a `{ key, value }` env-pair list under `field`. Shared by the tester's `testSecrets`
|
|
80
|
-
* and by `
|
|
80
|
+
* and by `capabilitySecrets` (the credentials of a step's generative binary integrations), because
|
|
81
81
|
* both are secret values the harness turns into environment variables of the agent's own process
|
|
82
82
|
* and both owe the same guarantees: valid env-var names, no toolchain-critical
|
|
83
83
|
* ({@link isReservedEnvName}) names, no duplicates. A second copy of these rules would be a second
|
package/dist/job.d.ts
CHANGED
|
@@ -404,7 +404,7 @@ export interface AgentJob extends HarnessAuthFields {
|
|
|
404
404
|
* registration resolved per dispatch. Absent ⇒ no integration declared a credential, or none
|
|
405
405
|
* resolved (which the agent is told to report rather than work around).
|
|
406
406
|
*/
|
|
407
|
-
|
|
407
|
+
capabilitySecrets?: TestSecretSpec[];
|
|
408
408
|
/**
|
|
409
409
|
* Explore mode: stand the service's dependencies up before the agent runs (the
|
|
410
410
|
* tester). Brings the docker-compose infra up on localhost for the duration of the
|
package/dist/job.js
CHANGED
|
@@ -489,7 +489,7 @@ export function parseAgentJob(input) {
|
|
|
489
489
|
skills: parseSkillSpecs(o.skills),
|
|
490
490
|
mcpServers: parseMcpServerSpecs(o.mcpServers),
|
|
491
491
|
testSecrets: parseSecretEnvPairs(o.testSecrets, 'testSecrets'),
|
|
492
|
-
|
|
492
|
+
capabilitySecrets: parseSecretEnvPairs(o.capabilitySecrets, 'capabilitySecrets'),
|
|
493
493
|
guardLimits: parseGuardLimits(o.guardLimits),
|
|
494
494
|
validation: parseValidationSpec(o.validation),
|
|
495
495
|
validationChecks: parseValidationChecksSpec(o.validationChecks),
|
|
@@ -551,7 +551,7 @@ function parseAgentPrSpec(raw) {
|
|
|
551
551
|
* literal doesn't blow the complexity budget; behaviour is byte-identical (spread order preserved).
|
|
552
552
|
*/
|
|
553
553
|
function assembleAgentJob(o, mode, agentField, parts) {
|
|
554
|
-
const { output, pr, infra, peerRepos, referenceRepos, referenceBranches, bootstrap, contextFiles, referenceScreenshots, designImages, artifactUpload, packageRegistries, skills, mcpServers, testSecrets, guardLimits, validation, validationChecks, reproduction, dependencyInstall, reviewPrNumber,
|
|
554
|
+
const { output, pr, infra, peerRepos, referenceRepos, referenceBranches, bootstrap, contextFiles, referenceScreenshots, designImages, artifactUpload, packageRegistries, skills, mcpServers, testSecrets, guardLimits, validation, validationChecks, reproduction, dependencyInstall, reviewPrNumber, capabilitySecrets, } = parts;
|
|
555
555
|
const repo = (o.repo ?? {});
|
|
556
556
|
return {
|
|
557
557
|
jobId: str(o.jobId, 'jobId'),
|
|
@@ -574,7 +574,7 @@ function assembleAgentJob(o, mode, agentField, parts) {
|
|
|
574
574
|
...(skills ? { skills } : {}),
|
|
575
575
|
...(mcpServers ? { mcpServers } : {}),
|
|
576
576
|
...(testSecrets.length ? { testSecrets } : {}),
|
|
577
|
-
...(
|
|
577
|
+
...(capabilitySecrets.length ? { capabilitySecrets } : {}),
|
|
578
578
|
...(infra ? { infra } : {}),
|
|
579
579
|
...(pr ? { pr } : {}),
|
|
580
580
|
...(peerRepos.length ? { peerRepos } : {}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/executor-harness",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.127.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
|
-
"@hono/node-server": "^2.1.
|
|
28
|
+
"@hono/node-server": "^2.1.1",
|
|
29
29
|
"@types/node": "^26.2.0",
|
|
30
|
-
"hono": "^4.13.
|
|
30
|
+
"hono": "^4.13.3",
|
|
31
31
|
"typescript": "7.0.2",
|
|
32
|
-
"vitest": "^4.1.
|
|
33
|
-
"@cat-factory/kernel": "0.
|
|
34
|
-
"@cat-factory/server": "0.
|
|
35
|
-
"@cat-factory/spend": "0.
|
|
32
|
+
"vitest": "^4.1.11",
|
|
33
|
+
"@cat-factory/kernel": "0.314.1",
|
|
34
|
+
"@cat-factory/server": "0.299.1",
|
|
35
|
+
"@cat-factory/spend": "0.16.7"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "tsc -p tsconfig.json",
|
package/src/agent.ts
CHANGED
|
@@ -323,7 +323,7 @@ export async function handleAgent(job: AgentJob, opts: RunOptions = {}): Promise
|
|
|
323
323
|
// mode check here would be that decision made twice, in the half that cannot see the registry.
|
|
324
324
|
const scoped = withAgentEnv(opts, {
|
|
325
325
|
...registryEnv,
|
|
326
|
-
...secretEnv(job.
|
|
326
|
+
...secretEnv(job.capabilitySecrets),
|
|
327
327
|
...artifactUploadEnv(job.artifactUpload),
|
|
328
328
|
})
|
|
329
329
|
if (job.mode === 'preview') return await runPreviewMode(job, scoped)
|
package/src/job-env.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// The primitive VALUE rules of the untrusted job body: what counts as a required string, which
|
|
2
2
|
// environment-variable names a body may never set, and how the two env-bearing fields (the
|
|
3
|
-
// tester's `testSecrets`, a generative integration's `
|
|
3
|
+
// tester's `testSecrets`, a generative integration's `capabilitySecrets`, and a frontend binding's
|
|
4
4
|
// `env`) are parsed against those rules.
|
|
5
5
|
//
|
|
6
6
|
// Extracted from `job.ts` when the generative-integration credentials arrived (the file-size
|
|
@@ -93,7 +93,7 @@ const ENV_VAR_NAME_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/
|
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
95
|
* Validate a `{ key, value }` env-pair list under `field`. Shared by the tester's `testSecrets`
|
|
96
|
-
* and by `
|
|
96
|
+
* and by `capabilitySecrets` (the credentials of a step's generative binary integrations), because
|
|
97
97
|
* both are secret values the harness turns into environment variables of the agent's own process
|
|
98
98
|
* and both owe the same guarantees: valid env-var names, no toolchain-critical
|
|
99
99
|
* ({@link isReservedEnvName}) names, no duplicates. A second copy of these rules would be a second
|
package/src/job.ts
CHANGED
|
@@ -801,7 +801,7 @@ export interface AgentJob extends HarnessAuthFields {
|
|
|
801
801
|
* registration resolved per dispatch. Absent ⇒ no integration declared a credential, or none
|
|
802
802
|
* resolved (which the agent is told to report rather than work around).
|
|
803
803
|
*/
|
|
804
|
-
|
|
804
|
+
capabilitySecrets?: TestSecretSpec[]
|
|
805
805
|
/**
|
|
806
806
|
* Explore mode: stand the service's dependencies up before the agent runs (the
|
|
807
807
|
* tester). Brings the docker-compose infra up on localhost for the duration of the
|
|
@@ -1263,7 +1263,7 @@ export function parseAgentJob(input: unknown): AgentJob {
|
|
|
1263
1263
|
skills: parseSkillSpecs(o.skills),
|
|
1264
1264
|
mcpServers: parseMcpServerSpecs(o.mcpServers),
|
|
1265
1265
|
testSecrets: parseSecretEnvPairs(o.testSecrets, 'testSecrets'),
|
|
1266
|
-
|
|
1266
|
+
capabilitySecrets: parseSecretEnvPairs(o.capabilitySecrets, 'capabilitySecrets'),
|
|
1267
1267
|
guardLimits: parseGuardLimits(o.guardLimits),
|
|
1268
1268
|
validation: parseValidationSpec(o.validation),
|
|
1269
1269
|
validationChecks: parseValidationChecksSpec(o.validationChecks),
|
|
@@ -1308,7 +1308,7 @@ interface ParsedAgentJobParts {
|
|
|
1308
1308
|
skills: ReturnType<typeof parseSkillSpecs>
|
|
1309
1309
|
mcpServers: ReturnType<typeof parseMcpServerSpecs>
|
|
1310
1310
|
testSecrets: ReturnType<typeof parseSecretEnvPairs>
|
|
1311
|
-
|
|
1311
|
+
capabilitySecrets: ReturnType<typeof parseSecretEnvPairs>
|
|
1312
1312
|
guardLimits: ReturnType<typeof parseGuardLimits>
|
|
1313
1313
|
validation: ReturnType<typeof parseValidationSpec>
|
|
1314
1314
|
validationChecks: ReturnType<typeof parseValidationChecksSpec>
|
|
@@ -1374,7 +1374,7 @@ function assembleAgentJob(
|
|
|
1374
1374
|
reproduction,
|
|
1375
1375
|
dependencyInstall,
|
|
1376
1376
|
reviewPrNumber,
|
|
1377
|
-
|
|
1377
|
+
capabilitySecrets,
|
|
1378
1378
|
} = parts
|
|
1379
1379
|
const repo = (o.repo ?? {}) as Record<string, unknown>
|
|
1380
1380
|
return {
|
|
@@ -1398,7 +1398,7 @@ function assembleAgentJob(
|
|
|
1398
1398
|
...(skills ? { skills } : {}),
|
|
1399
1399
|
...(mcpServers ? { mcpServers } : {}),
|
|
1400
1400
|
...(testSecrets.length ? { testSecrets } : {}),
|
|
1401
|
-
...(
|
|
1401
|
+
...(capabilitySecrets.length ? { capabilitySecrets } : {}),
|
|
1402
1402
|
...(infra ? { infra } : {}),
|
|
1403
1403
|
...(pr ? { pr } : {}),
|
|
1404
1404
|
...(peerRepos.length ? { peerRepos } : {}),
|