From dfbeac0d3fb9b82371fef458b39bcbc364a34071 Mon Sep 17 00:00:00 2001 From: kjgbot Date: Fri, 20 Nov 2026 01:26:05 -0800 Subject: [PATCH 1/2] chore(agent): layered-agent kit 0.1.29 0.1.28: ledger.py rides the hot update, not user data. 0.1.29: a Codex lead serves Codex's shared app-server socket, so Agent Relay Desktop delivers Relay messages to it (layered-agents#60); repo stewardship for every lead (layered-agents#59). headless.py changed, so the hot update drains and restarts the lead. Co-Authored-By: Claude Opus 5.5 --- agent/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/package.json b/agent/package.json index 0b21398e..a0f28d5a 100644 --- a/agent/package.json +++ b/agent/package.json @@ -12,7 +12,7 @@ "shellcheck": "shellcheck *.sh" }, "dependencies": { - "@agentworkforce/layered-agent": "0.1.26", + "@agentworkforce/layered-agent": "0.1.29", "@alchemy.run/aws": "2.0.0-beta.84", "@effect/platform-node": "4.0.7", "@effect/platform-node-shared": "4.0.7", From 9ebd0915d47f4d10295f535e2acdfd44b57d1684 Mon Sep 17 00:00:00 2001 From: layered-infra-ops-agent-host Date: Fri, 20 Nov 2026 09:44:02 +0000 Subject: [PATCH 2/2] test(agent): follow layered-agent kit 0.1.29 (ledger.py by hot update, stewardship, PR watch) The kit bump changes three things the host tests pin: - ledger.py (0.1.28) and the delegation and stewardship kit files ride the hot update, so they are no longer expected in user data. - stewardship.json is a third generated file, after the card and the watch. - A watch covers pull requests unless it sets pullRequests: false, so the rendered globs are the repo's issues and pulls. Adds a test for the default repo stewardship (this repo, kit thresholds, generated, kept out of user data). Test-only; no change to agent.config.ts. Co-Authored-By: Claude --- agent/test/agent.test.ts | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/agent/test/agent.test.ts b/agent/test/agent.test.ts index 76986717..01355a8f 100644 --- a/agent/test/agent.test.ts +++ b/agent/test/agent.test.ts @@ -8,7 +8,7 @@ import assert from "node:assert/strict"; import { readFileSync } from "node:fs"; import { fileURLToPath } from "node:url"; import { gunzipSync } from "node:zlib"; -import { AGENT_CARD_FILE, EC2_USER_DATA_ENCODED_LIMIT, ISSUE_WATCH_FILE, ISSUE_WATCH_KIT_FILES, RELAY_SESSIONS_KIT_FILES, renderIssueWatch, WORKER_KIT_FILES, fileReader, hostRolePolicy, hostTemplate, renderAgentCard, userDataBase64 } from "@agentworkforce/layered-agent"; +import { AGENT_CARD_FILE, DELEGATION_KIT_FILES, EC2_USER_DATA_ENCODED_LIMIT, ISSUE_WATCH_FILE, ISSUE_WATCH_KIT_FILES, RELAY_SESSIONS_KIT_FILES, STEWARDSHIP_FILE, STEWARDSHIP_KIT_FILES, renderIssueWatch, renderStewardship, stewardship, WORKER_KIT_FILES, fileReader, hostRolePolicy, hostTemplate, renderAgentCard, userDataBase64 } from "@agentworkforce/layered-agent"; import agent from "../agent.config.ts"; const read = fileReader(fileURLToPath(new URL("..", import.meta.url))); @@ -18,10 +18,11 @@ test("user data: under EC2's limit, every kit and lane file, no secret values", const encoded = userDataBase64(agent, read); assert.ok(encoded.length < EC2_USER_DATA_ENCODED_LIMIT - 500, `user data is ${encoded.length} bytes encoded`); const script = gunzipSync(Buffer.from(encoded, "base64")).toString("utf8"); - const optional: readonly string[] = ["headless.py", "delegation.md", "orchestration.md", ...WORKER_KIT_FILES, ...RELAY_SESSIONS_KIT_FILES, ...ISSUE_WATCH_KIT_FILES]; + // The kit's own list of files that ride the hot update (it does not export it): ledger.py since 0.1.28. + const optional: readonly string[] = ["headless.py", "ledger.py", "delegation.md", "orchestration.md", ...DELEGATION_KIT_FILES, ...WORKER_KIT_FILES, ...RELAY_SESSIONS_KIT_FILES, ...ISSUE_WATCH_KIT_FILES, ...STEWARDSHIP_KIT_FILES]; for (const f of agent.files) { const shipped = script.includes(`cat > /opt/agent-host/${f.name} <<'`); - // The generated card and issue-watch files travel by hot update, never in user data. + // The generated card, issue-watch and stewardship files travel by hot update, never in user data. assert.equal(shipped, !(f.source === "generated" || (f.source === "kit" && optional.includes(f.name))), f.name); } assert.doesNotMatch(script, /sk-ant-|ghp_|ghs_|gho_|BEGIN [A-Z ]*PRIVATE KEY|"private_key"/); @@ -137,15 +138,31 @@ test("the A2A card: renders within the relay's limits, one skill per kind of wor assert.equal(card.documentation_url, "https://github.com/AgentWorkforce/infra"); assert.match(card.version, /^[0-9a-f]{12}$/); assert.equal(agent.generated[AGENT_CARD_FILE], rendered); - assert.deepEqual(agent.files.filter((f) => f.source === "generated"), [{ name: AGENT_CARD_FILE, source: "generated" }, { name: ISSUE_WATCH_FILE, source: "generated" }]); + assert.deepEqual(agent.files.filter((f) => f.source === "generated"), [{ name: AGENT_CARD_FILE, source: "generated" }, { name: ISSUE_WATCH_FILE, source: "generated" }, { name: STEWARDSHIP_FILE, source: "generated" }]); const script = gunzipSync(Buffer.from(userDataBase64(agent, read), "base64")).toString("utf8"); assert.ok(!script.includes(`cat > /opt/agent-host/${AGENT_CARD_FILE}`), "the card never rides in user data"); }); -test("new-issue watch: this repo, to khaliq-gant, generated and kept out of user data", () => { +test("new-issue and new-PR watch: this repo, to khaliq-gant, generated and kept out of user data", () => { assert.deepEqual(agent.input.issueWatch, { repos: ["AgentWorkforce/infra"], notify: "khaliq-gant" }); assert.equal(agent.generated[ISSUE_WATCH_FILE], renderIssueWatch(agent.input.issueWatch!)); - assert.deepEqual(JSON.parse(agent.generated[ISSUE_WATCH_FILE]!).globs, ["/github/repos/AgentWorkforce/infra/issues/**"]); + // Since kit 0.1.29 a watch covers pull requests too unless it sets pullRequests: false. + const watch = JSON.parse(agent.generated[ISSUE_WATCH_FILE]!) as { notify: string[]; pullRequests: boolean; globs: string[] }; + assert.deepEqual(watch.notify, ["khaliq-gant"]); + assert.equal(watch.pullRequests, true); + assert.deepEqual(watch.globs, ["/github/repos/AgentWorkforce/infra/issues/**", "/github/repos/AgentWorkforce/infra/pulls/**"]); const script = gunzipSync(Buffer.from(userDataBase64(agent, read), "base64")).toString("utf8"); assert.ok(!script.includes(`cat > /opt/agent-host/${ISSUE_WATCH_FILE}`), "the watch never rides in user data"); }); + +test("repo stewardship: the kit's default for this repo, generated and kept out of user data", () => { + assert.equal(agent.input.stewardship, undefined, "the default: on, this repo, the kit's stale thresholds"); + const steward = stewardship(agent.input)!; + assert.deepEqual(steward.repos, ["AgentWorkforce/infra"]); + // The explicit issueWatch above replaces stewardship's own watch, so khaliq-gant stays the one notified. + assert.deepEqual(steward.owners, []); + assert.equal(agent.generated[STEWARDSHIP_FILE], renderStewardship(steward)); + for (const name of STEWARDSHIP_KIT_FILES) assert.ok(agent.files.some((f) => f.name === name && f.source === "kit"), name); + const script = gunzipSync(Buffer.from(userDataBase64(agent, read), "base64")).toString("utf8"); + assert.ok(!script.includes(`cat > /opt/agent-host/${STEWARDSHIP_FILE}`), "stewardship never rides in user data"); +});