diff --git a/runtime-images/daimon/publish-inputs.json b/runtime-images/daimon/publish-inputs.json index 59b6f8c4..e3e0d47a 100644 --- a/runtime-images/daimon/publish-inputs.json +++ b/runtime-images/daimon/publish-inputs.json @@ -19,8 +19,8 @@ "version": "0.162.1" }, "daimon": { - "commit": "e3eb84209cb6fd6bd8d6e9862697796df88887c4", - "package_version": "0.2.8", + "commit": "5e8bffc10779838e3ff0b6687de06db6b6fde02a", + "package_version": "0.2.9", "source": "https://github.com/noopolis/daimon-harness.git" }, "image": "noopolis/spawnfile-runtime-daimon", diff --git a/runtimes.yaml b/runtimes.yaml index 99745704..8923e398 100644 --- a/runtimes.yaml +++ b/runtimes.yaml @@ -13,17 +13,17 @@ runtimes: daimon: remote: git@github.com:noopolis/daimon-harness.git - ref: e3eb84209cb6fd6bd8d6e9862697796df88887c4 + ref: 5e8bffc10779838e3ff0b6687de06db6b6fde02a default_branch: main install: kind: container_image image: noopolis/spawnfile-runtime-daimon - tag: 0.2.8-e3eb842 - digest: sha256:2a98082125bd14dc907fc9b126069b1735e66315f78439d1bd7b27dc258c7ee4 + tag: 0.2.9-5e8bffc + digest: sha256:a8f385f57d06f81b0f64e61b2a455e9753216898eff333174da799c5d0aa7184 capability_receipts: - amd64: sha256:8730f5e2f03bf66ea89906da0b91b9efbcf23b6abb550a8b82c00b0226d53072 - arm64: sha256:17bbc1fe023423342423f009871fa017f31a306941bac96a358b2fb0a5e09558 - contract_manifest_sha256: sha256:e39551277c6727c8807b1247e759f57addcee3f17f1405ebc927179647d64de6 + amd64: sha256:c66fa10b3d186830bba369b96f8636ec8fe3c28afa9724beadf5ed983ebb4b09 + arm64: sha256:7deca0034e8f81fc7ec0cb822f1251a98c98a4ccfbad36b62ffc53fea66ae8fe + contract_manifest_sha256: sha256:9f91388983cc5308137ba0259302b9faec75a9f0e032b2a031b6a774ff3f409f status: active openclaw: diff --git a/scripts/AGENTS.md b/scripts/AGENTS.md index c651daa2..8650d506 100644 --- a/scripts/AGENTS.md +++ b/scripts/AGENTS.md @@ -47,11 +47,12 @@ tools live in `../archive/legacy-worktree-tools/` and are not active helpers. - `publish-daimon-runtime.ts` is the CI publication path. It reads only the checked-in `runtime-images/daimon/publish-inputs.json` (full Daimon commit, per-architecture AGY pins, Codex pin; Grok comes from the vendored manifest), - refuses a packed manifest that differs from the vendored contract, and never + refuses a packed manifest that differs from the explicit publication + `contract_manifest_sha256` (or vendored contract for legacy inputs), and never moves an existing tag. Its receipts carry `mode: "ci-published"` provenance. - Re-vendoring the contract manifest must bump `daimon.commit` to the vendored - Daimon commit in the same change; the `runtime-images` PR dry run fails - otherwise. + A publication may precede the compiler/runtime re-pin by setting the explicit + manifest digest alongside `daimon.commit`; the Dockerfile still validates + contract semantics and every engine artifact pin. The published identity is pinned into `runtimes.yaml` by a reviewed PR, never written by the script. - Clean Git remains the default source mode. Explicit Daimon archive mode diff --git a/scripts/build-local-daimon-runtime.test.ts b/scripts/build-local-daimon-runtime.test.ts index b29ca876..394082c4 100644 --- a/scripts/build-local-daimon-runtime.test.ts +++ b/scripts/build-local-daimon-runtime.test.ts @@ -389,8 +389,10 @@ test("Dockerfile contract validation accepts the vendored manifest and labels ea try { const run = (file: string): number | null => spawnSync(process.execPath, ["-e", code, file]).status; assert.equal(run(fileURLToPath(manifest)), 0, "Dockerfile rejects the pinned contract"); - for (const [before, after] of [['"version":"noopolis.daimon.runtime-contract-manifest.v5"', '"version":"noopolis.daimon.runtime-contract-manifest.v3"'], ['"terminalReceiptHorizon":2048', '"terminalReceiptHorizon":0']]) { - writeFileSync(path.join(root, "invalid.json"), readFileSync(manifest, "utf8").replace(before!, after!)); + for (const [before, after] of [['"version":"noopolis.daimon.runtime-contract-manifest.v6"', '"version":"noopolis.daimon.runtime-contract-manifest.v3"'], ['"terminalReceiptHorizon":2048', '"terminalReceiptHorizon":0']]) { + const source = readFileSync(manifest, "utf8"); + assert.ok(source.includes(before!), `mutation target missing: ${before}`); + writeFileSync(path.join(root, "invalid.json"), source.replace(before!, after!)); assert.equal(run(path.join(root, "invalid.json")), 1, `invalid contract must fail: ${after}`); } const lines = dockerfile.slice(dockerfile.indexOf("FROM daimon_${DAIMON_DEPENDENCY_MODE} AS build")).split("\n"); diff --git a/scripts/daimon-image-contract.test.ts b/scripts/daimon-image-contract.test.ts index e1b71b24..aa52f597 100644 --- a/scripts/daimon-image-contract.test.ts +++ b/scripts/daimon-image-contract.test.ts @@ -10,7 +10,9 @@ type Material = { directoryMode: number; fileMode: number; }; const readJson = (file: string): unknown => JSON.parse(readFileSync(new URL(file, import.meta.url), "utf8")); -const v5 = readJson("../src/runtime/daimon/contract-manifest.json") as Record; +const vendored = readJson("../src/runtime/daimon/contract-manifest.json") as Record; +const { engines: _engines, ...legacy } = vendored; +const v5 = { ...legacy, version: "noopolis.daimon.runtime-contract-manifest.v5" }; const mirror = readJson("../src/runtime/daimon/engine-descriptors.json") as { engines: Record; }; @@ -24,7 +26,7 @@ const v6 = (portableCount: 1 | 2) => { sourceRelativePath: ".daimon-inbound/another-auth", sourceSlot: "another-auth" } }; } - return { ...structuredClone(v5), version: "noopolis.daimon.runtime-contract-manifest.v6", + return { ...structuredClone(vendored), version: "noopolis.daimon.runtime-contract-manifest.v6", engines, supportedEngineKinds: Object.keys(engines).sort(), engineCredentialMaterial: Object.fromEntries( Object.values(engines).filter(e => e.auth.staging === "portable-file").map(e => [e.id, structuredClone(e.credentialMaterial!)])) }; }; @@ -48,7 +50,11 @@ const checkImageContract = (value: unknown): number | null => { } finally { rmSync(root, { force: true, recursive: true }); } }; -test("the image accepts the pinned v5 contract", () => { +test("the image accepts the pinned v6 contract", () => { + assert.equal(checkImageContract(vendored), 0); +}); + +test("the image retains v5 compatibility", () => { assert.equal(checkImageContract(v5), 0); }); diff --git a/scripts/daimon-publish-inputs.test.ts b/scripts/daimon-publish-inputs.test.ts index 2726961f..3c2b082a 100644 --- a/scripts/daimon-publish-inputs.test.ts +++ b/scripts/daimon-publish-inputs.test.ts @@ -12,7 +12,8 @@ import { parseDaimonPublishInputs, renderRuntimesYamlPin, resolvePublishedRepository, - resolvePublishedTag + resolvePublishedTag, + resolvePublishManifestSha256 } from "./daimon-publish-inputs.ts"; import { createDaimonImageBuildArgs, tagExists } from "./publish-daimon-runtime.ts"; @@ -29,6 +30,20 @@ test("checked-in publish inputs pin a full Daimon commit, both architectures, an assert.notEqual(resolvePublishedTag(inputs), "latest"); }); +test("publication uses its explicit manifest pin before the runtime re-pin", () => { + const raw = checkedIn(); + const pinned = `sha256:${digest("9")}`; + const vendored = `sha256:${digest("e")}`; + const inputs = parseDaimonPublishInputs({ ...raw, contract_manifest_sha256: pinned }); + assert.equal(inputs.contract_manifest_sha256, pinned); + assert.equal(resolvePublishManifestSha256(inputs, vendored), pinned); + delete raw.contract_manifest_sha256; + assert.equal(resolvePublishManifestSha256(parseDaimonPublishInputs(raw), vendored), vendored); + for (const invalid of [null, undefined, "latest", "sha256:bad"]) { + assert.throws(() => parseDaimonPublishInputs({ ...raw, contract_manifest_sha256: invalid }), /contract_manifest_sha256/u); + } +}); + test("Daimon Dockerfile manifest literals accept the vendored contract", () => { const dockerfile = readFileSync(new URL("../runtime-images/daimon/Dockerfile", import.meta.url), "utf8"); const validators = [...dockerfile.matchAll(/node -e '([^'\n]+)' \$\{RUNTIME_ROOT\}\/contract-manifest\.json/gu)]; diff --git a/scripts/daimon-publish-inputs.ts b/scripts/daimon-publish-inputs.ts index 45e20b0e..c4be3874 100644 --- a/scripts/daimon-publish-inputs.ts +++ b/scripts/daimon-publish-inputs.ts @@ -14,6 +14,7 @@ type AgyPlatformPin = { export type DaimonPublishInputs = { agy: { platforms: Partial>; version: string }; codex: { executable_sha256: string; version: string }; + contract_manifest_sha256?: string; daimon: { commit: string; package_version: string; source: string }; image: string; platforms: DaimonPublishArchitecture[]; @@ -77,7 +78,8 @@ const httpsUrl = (value: unknown, label: string): string => { /** Validates the checked-in publish inputs; every pin is explicit, nothing floats. */ export const parseDaimonPublishInputs = (raw: unknown): DaimonPublishInputs => { - const root = exactKeys(raw, ["agy", "codex", "daimon", "image", "platforms", "registry", "version"], "publish inputs"); + const manifestKeys = isRecord(raw) && "contract_manifest_sha256" in raw ? ["contract_manifest_sha256"] : []; + const root = exactKeys(raw, ["agy", "codex", "daimon", "image", "platforms", "registry", "version", ...manifestKeys], "publish inputs"); if (root.version !== "spawnfile.daimon-runtime-publish-inputs.v1") throw new Error("publish inputs version is unsupported"); const platforms = root.platforms; if (!Array.isArray(platforms) || platforms.length === 0 || new Set(platforms).size !== platforms.length || @@ -103,6 +105,7 @@ export const parseDaimonPublishInputs = (raw: unknown): DaimonPublishInputs => { executable_sha256: matching(codex.executable_sha256, SHA256, "codex.executable_sha256"), version: matching(codex.version, VERSION, "codex.version") }, + ...(manifestKeys.length ? { contract_manifest_sha256: matching(root.contract_manifest_sha256, SHA256, "contract_manifest_sha256") } : {}), daimon: { commit: matching(daimon.commit, COMMIT, "daimon.commit"), package_version: matching(daimon.package_version, VERSION, "daimon.package_version"), @@ -115,6 +118,10 @@ export const parseDaimonPublishInputs = (raw: unknown): DaimonPublishInputs => { }; }; +/** Publication may precede the compiler/runtime re-pin; legacy inputs use the vendored digest. */ +export const resolvePublishManifestSha256 = (inputs: DaimonPublishInputs, vendoredDigest: string): string => + inputs.contract_manifest_sha256 ?? vendoredDigest; + /** One tag per pinned Daimon commit: `-`, never `latest`. */ export const resolvePublishedTag = (inputs: DaimonPublishInputs): string => `${inputs.daimon.package_version}-${inputs.daimon.commit.slice(0, 7)}`; diff --git a/scripts/publish-daimon-runtime.ts b/scripts/publish-daimon-runtime.ts index ce40f363..89e48098 100644 --- a/scripts/publish-daimon-runtime.ts +++ b/scripts/publish-daimon-runtime.ts @@ -20,7 +20,8 @@ import { parseDaimonPublishInputs, renderRuntimesYamlPin, resolvePublishedRepository, - resolvePublishedTag + resolvePublishedTag, + resolvePublishManifestSha256 } from "./daimon-publish-inputs.ts"; import type { DaimonPublishArchitecture, DaimonPublishInputs, PublishedPlatform } from "./daimon-publish-inputs.ts"; @@ -100,7 +101,7 @@ const buildPlatform = (options: { const packagePath = packDaimon(options.checkout, architecture, stage); const manifestSha256 = sha256(execFileSync("tar", ["-xOf", packagePath, "package/dist/runtime/contract-manifest.json"])); if (manifestSha256 !== options.manifestSha256) { - throw new Error(`Daimon ${architecture} package manifest ${manifestSha256} is not the vendored contract ${options.manifestSha256}`); + throw new Error(`Daimon ${architecture} package manifest ${manifestSha256} is not the publication contract ${options.manifestSha256}`); } const grok = readPinnedGrokCli(architecture); const agy = inputs.agy.platforms[architecture]; @@ -187,7 +188,7 @@ const main = (): void => { process.stdout.write(`${repository}:${tag} already exists; refusing to move a published tag (pass --force to republish)\n`); return; } - const manifestSha256 = readFileSync(vendoredManifestDigestPath, "utf8").trim(); + const manifestSha256 = resolvePublishManifestSha256(inputs, readFileSync(vendoredManifestDigestPath, "utf8").trim()); const workDirectory = mkdtempSync(path.join(os.tmpdir(), "spawnfile-daimon-publish-")); try { const checkout = prepareDaimonCheckout(inputs, workDirectory); diff --git a/scripts/vendor-daimon-grok-contract.ts b/scripts/vendor-daimon-grok-contract.ts index ddd06d02..e36426ba 100644 --- a/scripts/vendor-daimon-grok-contract.ts +++ b/scripts/vendor-daimon-grok-contract.ts @@ -46,7 +46,7 @@ type DaimonModules = { /** `COMPONENT` is not exported, so its pattern is read from the source it is defined in; a missing definition fails vendoring. */ const skillComponentPattern = (daimonDirectory: string): string => { - const match = /^const COMPONENT = \/(.+)\/u;$/mu.exec(readFileSync(path.join(daimonDirectory, "src/runtime/grokWorkerSkills.ts"), "utf8")); + const match = /^const COMPONENT = \/(.+)\/u;$/mu.exec(readFileSync(path.join(daimonDirectory, "src/engines/grok/broker/grokWorkerSkills.ts"), "utf8")); if (!match) throw new Error("Daimon grokWorkerSkills.ts no longer defines its COMPONENT rule as a /.../u literal"); return match[1]!; }; @@ -55,9 +55,9 @@ const loadDaimon = async (daimonDirectory: string): Promise => { const load = (relative: string): Promise> => import(pathToFileURL(path.join(daimonDirectory, relative)).href); const [emitter, config, profile, skills] = await Promise.all([ load("scripts/emitRuntimeContractManifest.ts"), - load("src/runtime/grokBrokerWorkerConfig.ts"), - load("src/runtime/grokWorkerSandboxProfile.ts"), - load("src/runtime/grokWorkerSkills.ts") + load("src/engines/grok/broker/grokBrokerWorkerConfig.ts"), + load("src/engines/grok/broker/grokWorkerSandboxProfile.ts"), + load("src/engines/grok/broker/grokWorkerSkills.ts") ]); return { contractManifestArtifacts: emitter.contractManifestArtifacts as DaimonModules["contractManifestArtifacts"], diff --git a/src/compiler/publicDaimonHost.test.ts b/src/compiler/publicDaimonHost.test.ts index d8b5460a..ddc42b01 100644 --- a/src/compiler/publicDaimonHost.test.ts +++ b/src/compiler/publicDaimonHost.test.ts @@ -30,9 +30,9 @@ describe("public Daimon host fixture", () => { expect(agent.containerPaths.home).toBe(config.agents[0].runtimeHomePath); expect(agent.containerPaths.skillRoots).toEqual([".agents", ".codex"].map(root => `${config.agents[0].workspacePath}/${root}/skills`)); const dockerfile = await readUtf8File(path.join(outputDirectory, "Dockerfile")); - expect(dockerfile).toContain("COPY --from=noopolis/spawnfile-runtime-daimon@sha256:2a98082125bd14dc907fc9b126069b1735e66315f78439d1bd7b27dc258c7ee4 "); - expect(dockerfile).toContain('amd64) expected="sha256:8730f5e2f03bf66ea89906da0b91b9efbcf23b6abb550a8b82c00b0226d53072"'); - expect(dockerfile).toContain('arm64) expected="sha256:17bbc1fe023423342423f009871fa017f31a306941bac96a358b2fb0a5e09558"'); + expect(dockerfile).toContain("COPY --from=noopolis/spawnfile-runtime-daimon@sha256:a8f385f57d06f81b0f64e61b2a455e9753216898eff333174da799c5d0aa7184 "); + expect(dockerfile).toContain('amd64) expected="sha256:c66fa10b3d186830bba369b96f8636ec8fe3c28afa9724beadf5ed983ebb4b09"'); + expect(dockerfile).toContain('arm64) expected="sha256:7deca0034e8f81fc7ec0cb822f1251a98c98a4ccfbad36b62ffc53fea66ae8fe"'); }); it("compiles against an explicit local identity without changing production registry pins", async () => { @@ -66,7 +66,7 @@ describe("public Daimon host fixture", () => { `COPY --from=${LOCAL_DAIMON_IMAGE_REPOSITORY}@${digest("c")} ` ); expect(dockerfile).toContain(digest("a")); - expect(dockerfile).not.toContain("sha256:2a98082125bd14dc907fc9b126069b1735e66315f78439d1bd7b27dc258c7ee4"); + expect(dockerfile).not.toContain("sha256:a8f385f57d06f81b0f64e61b2a455e9753216898eff333174da799c5d0aa7184"); await expect((await import("node:fs/promises")).readFile(path.join(outputDirectory, "spawnfile-report.json"), "utf8").then(JSON.parse)).resolves.toMatchObject({ container: { local_daimon_runtime: { registry_authority: "127.0.0.1:54321", image_reference: `${LOCAL_DAIMON_IMAGE_REPOSITORY}@${digest("c")}` } } }); diff --git a/src/compiler/training/broker/projection.integration.test.ts b/src/compiler/training/broker/projection.integration.test.ts index 860bcf62..42668da1 100644 --- a/src/compiler/training/broker/projection.integration.test.ts +++ b/src/compiler/training/broker/projection.integration.test.ts @@ -12,14 +12,14 @@ import { DAIMON_GROK_WORKER_SKILLS_SAMPLES } from "../../../runtime/daimon/grokW import { renderDaimonGrokServiceConfig } from "../../containerDaimonGrokWorkerRender.js"; // Source checkout integration is explicit: no runtime dependency on Daimon and no provider calls. -const source = process.env.SPAWNFILE_DAIMON_SOURCE_DIR; +const source = process.env.DAIMON_SOURCE_ROOT ?? process.env.SPAWNFILE_DAIMON_SOURCE_DIR; const load = (file: string) => import(/* @vite-ignore */ pathToFileURL(path.join(source!, file)).href); describe.skipIf(!source)("clocked training slots against Daimon's actual contract", () => { it("attests every model/effort and slot, and verifies the clocked projection receipt", async () => { const [projectionApi, slotApi, configApi, receiptApi] = await Promise.all([ - load("src/runtime/grokBrokerProjection.ts"), load("src/runtime/grokBrokerSlot.ts"), - load("src/runtime/grokBrokerWorkerConfig.ts"), load("src/runtime/grokSlotPreflightReceipt.ts") + load("src/engines/grok/broker/grokBrokerProjection.ts"), load("src/engines/grok/broker/grokBrokerSlot.ts"), + load("src/engines/grok/broker/grokBrokerWorkerConfig.ts"), load("src/engines/grok/broker/grokSlotPreflightReceipt.ts") ]); const daimon = { ...projectionApi, GROK_ENGINE_BROKER: DAIMON_GROK_ENGINE_BROKER } as DaimonProjectionModule; for (const count of [1, 4, 8]) for (const p of trainingSlotDescriptors(count)) { @@ -49,8 +49,8 @@ describe.skipIf(!source)("clocked training slots against Daimon's actual contrac it("binds declared skills exactly as Daimon's projection, service parser and pre-turn attestation do", async () => { const [projectionApi, serviceApi, homeApi, skillsApi] = await Promise.all([ - load("src/runtime/grokBrokerProjection.ts"), load("src/runtime/engineBrokerServiceConfig.ts"), - load("src/runtime/grokWorkerHomeAttestation.ts"), load("src/runtime/grokWorkerSkills.ts") + load("src/engines/grok/broker/grokBrokerProjection.ts"), load("src/engines/grok/broker/engineBrokerServiceConfig.ts"), + load("src/engines/grok/broker/grokWorkerHomeAttestation.ts"), load("src/engines/grok/broker/grokWorkerSkills.ts") ]); const daimon = { ...projectionApi, GROK_ENGINE_BROKER: DAIMON_GROK_ENGINE_BROKER } as DaimonProjectionModule; const skills = DAIMON_GROK_WORKER_SKILLS_SAMPLES[2]!.skills.map((skill) => ({ name: skill.name, files: skill.files.map((file) => ({ ...file })) })); diff --git a/src/runtime/container.test.ts b/src/runtime/container.test.ts index 6852250a..71b519b8 100644 --- a/src/runtime/container.test.ts +++ b/src/runtime/container.test.ts @@ -92,9 +92,9 @@ describe("runtime container install recipes", () => { it("copies the CI-published Daimon index and checks the per-architecture receipt by default", async () => { const recipe = await createRuntimeInstallRecipe("daimon"); expect(recipe.copyCommands).toEqual([ - `COPY --from=noopolis/spawnfile-runtime-daimon@sha256:2a98082125bd14dc907fc9b126069b1735e66315f78439d1bd7b27dc258c7ee4 ${RUNTIME_INSTALL_ROOT}/daimon ${RUNTIME_INSTALL_ROOT}/daimon` + `COPY --from=noopolis/spawnfile-runtime-daimon@sha256:a8f385f57d06f81b0f64e61b2a455e9753216898eff333174da799c5d0aa7184 ${RUNTIME_INSTALL_ROOT}/daimon ${RUNTIME_INSTALL_ROOT}/daimon` ]); - expect(recipe.commands[0]).toContain('case "$arch" in amd64) expected="sha256:8730f5e2f03bf66ea89906da0b91b9efbcf23b6abb550a8b82c00b0226d53072" ;; arm64) expected="sha256:17bbc1fe023423342423f009871fa017f31a306941bac96a358b2fb0a5e09558" ;;'); + expect(recipe.commands[0]).toContain('case "$arch" in amd64) expected="sha256:c66fa10b3d186830bba369b96f8636ec8fe3c28afa9724beadf5ed983ebb4b09" ;; arm64) expected="sha256:7deca0034e8f81fc7ec0cb822f1251a98c98a4ccfbad36b62ffc53fea66ae8fe" ;;'); }); it("installs overridden runtime packages from the vendored tarball path in the Pi recipe", async () => { @@ -211,7 +211,7 @@ describe("runtime container install recipes", () => { process.env.SPAWNFILE_DAIMON_RUNTIME_BASE_IMAGE = "noopolis/spawnfile-runtime-daimon:legacy"; const recipe = await createRuntimeInstallRecipe("daimon"); expect(recipe.baseImage).toBeUndefined(); - expect(recipe.copyCommands[0]).toContain("noopolis/spawnfile-runtime-daimon@sha256:2a98082125bd14dc907fc9b126069b1735e66315f78439d1bd7b27dc258c7ee4"); + expect(recipe.copyCommands[0]).toContain("noopolis/spawnfile-runtime-daimon@sha256:a8f385f57d06f81b0f64e61b2a455e9753216898eff333174da799c5d0aa7184"); }); it("omits NOOPOLIS_RUN_ID from every recipe's env when unset", async () => { diff --git a/src/runtime/daimon/AGENTS.md b/src/runtime/daimon/AGENTS.md index d36bdb3d..d3d646d9 100644 --- a/src/runtime/daimon/AGENTS.md +++ b/src/runtime/daimon/AGENTS.md @@ -70,7 +70,7 @@ samples). The manifest also pins Grok CLI 1.0.34 (URL + sha256 per architecture), which the runtime image, the local builder, and generated organization images all verify. -Manifest v5 carries a separate clocked config matrix, slot-routed control protocol v4 +The consumed v6 manifest carries engine descriptors, a separate clocked config matrix, slot-routed control protocol v4 and projection v3. Training explicitly selects `clocked`; the default production matrix is byte-identical. Re-vendoring changes the whole-manifest authority: the old published pin must fail compilation until publication and re-pinning, @@ -224,8 +224,9 @@ structural JSON Schema; `engineDescriptorSchema.ts` validates descriptors and their cross-field relationships. v5 uses the generated `engine-descriptors.json`/`.sha256` and `engineDescriptors.generated.ts`, produced by `scripts/generate-daimon-engine-descriptors.ts` from static Git objects at the -registry's exact pin; CI reproduces them. v6 carries those descriptors directly -in `engines`. Engine selection follows capabilities and staging roles, while +registry's exact pin; CI reproduces them. Keep this mirror for v5 compatibility +and the literal broker/realm ABI types and schemas. The active v6 inventory +comes directly from `engines` in the manifest. Engine selection follows capabilities and staging roles, while omission defaults, historical wire identities and compiler admission stay local policy. Training providers own subscription transport and engine-broker grants; training/services owns durable slot freshness. Presence in the runtime inventory diff --git a/src/runtime/daimon/adapter.test.ts b/src/runtime/daimon/adapter.test.ts index 8b2d20e9..4951800d 100644 --- a/src/runtime/daimon/adapter.test.ts +++ b/src/runtime/daimon/adapter.test.ts @@ -384,7 +384,7 @@ describe("daimonAdapter", () => { it("uses the pinned image because it attests the exact compiler contract", async () => { const recipe = await createRuntimeInstallRecipe("daimon"); - expect(recipe.copyCommands[0]).toContain("noopolis/spawnfile-runtime-daimon@sha256:2a98082125bd14dc907fc9b126069b1735e66315f78439d1bd7b27dc258c7ee4"); + expect(recipe.copyCommands[0]).toContain("noopolis/spawnfile-runtime-daimon@sha256:a8f385f57d06f81b0f64e61b2a455e9753216898eff333174da799c5d0aa7184"); }); it("lowers schedules while retaining the MCP and non-Moltnet surface boundary", async () => { diff --git a/src/runtime/daimon/contract-manifest.json b/src/runtime/daimon/contract-manifest.json index 136564fb..e850007e 100644 --- a/src/runtime/daimon/contract-manifest.json +++ b/src/runtime/daimon/contract-manifest.json @@ -1 +1 @@ -{"activityResponseSchema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"agentId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"id":{"format":"uuid","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$","type":"string"},"kind":{"enum":["wake_started","wake_completed","wake_rejected","wake_aborted","agent_stopped"]},"occurredAt":{"format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","type":"string"},"wakeId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"}},"required":["id","agentId","kind","occurredAt"],"type":"object"},"maxItems":100,"type":"array"},"nextCursor":{"maxLength":16,"minLength":1,"pattern":"^(0|[1-9][0-9]{0,15})$","type":"string"},"version":{"const":"noopolis.daimon.organization-runtime-activity.v1"}},"required":["version","items"],"type":"object"},"activityV2ResponseSchema":{"additionalProperties":false,"properties":{"executions":{"items":{"additionalProperties":false,"properties":{"agent_id":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"delivery_ids":{"items":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"maxItems":32,"type":"array"},"execution_id":{"type":"string"},"state":{"const":"running"}},"required":["agent_id","execution_id","state","delivery_ids"],"type":"object"},"maxItems":32,"type":"array"},"items":{"items":{"additionalProperties":false,"properties":{"acceptance_id":{"type":"string"},"accepted_at":{"format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","type":"string"},"active":{"type":"boolean"},"agent_id":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"code":{"enum":["engine_failed","host_stopped","host_stopping","queued_wake_stopped","active_wake_aborted","queue_full","unknown_agent"]},"deferred":{"type":"boolean"},"delivery_id":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"execution_id":{"type":"string"},"queue_position":{"minimum":1,"type":"integer"},"request_digest":{"type":"string"},"state":{"enum":["accepted","running","completed","failed","stopped"]},"text":{"maxLength":16384,"type":"string"},"updated_at":{"format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","type":"string"},"version":{"const":"noopolis.daimon.wake-receipt-status.v2"}},"required":["version","acceptance_id","agent_id","delivery_id","request_digest","state","accepted_at","updated_at","active"],"type":"object"},"maxItems":2112,"type":"array"},"state":{"enum":["running","stopped"]},"version":{"const":"noopolis.daimon.organization-runtime-activity.v2"}},"required":["version","items"],"type":"object"},"agySubscriptionRealm":{"directoryMode":448,"durableMountPath":"/var/lib/spawnfile/daimon/agy-subscription-realm","fileMode":384,"maxUnlockBytes":4096,"unlockMountPath":"/var/lib/spawnfile/daimon/agy-unlock-secret","unlockSourceSlot":"agy-unlock-secret"},"attention":{"accounting":"execution-start-reservations","busyDispatch":"bounded-pending-message-batch","completion":"explicit-per-delivery","defaultMaxBatchBytes":12000,"defaultMaxBatchMessages":8,"enabledBy":"agents[].attention","idleDispatch":"immediate","unhandled":"deferred-until-new-input"},"consumedConfigFields":["version","host.bindHost","host.port","host.controlTokenEnv","agents[].id","agents[].name","agents[].instructions","agents[].workspacePath","agents[].runtimeHomePath","agents[].engine.kind","agents[].engine.model","agents[].engine.reasoningEffort","agents[].engine.codexSandbox","agents[].schedule.kind","agents[].schedule.interval_ms","agents[].schedule.cron","agents[].schedule.timezone","agents[].schedule.prompt","agents[].schedule.jitter_seconds","agents[].mcp","agents[].moltnet","agents[].memory","agents[].attention","agents[].recording"],"deliverySemantics":{"activeDeliveryIdempotency":"unbounded-until-terminal","concurrentSameAgentTurns":false,"externalEffectsExactlyOnce":false,"recovery":"at-least-once-with-stable-wake-id","terminalReceiptHorizon":2048},"engineCredentialMaterial":{"codex":{"destinationRelativePath":".codex/auth.json","directoryMode":448,"fileMode":384,"sourceRelativePath":".daimon-inbound/codex-auth","sourceSlot":"codex-auth"}},"grokEngineBroker":{"artifacts":{"arm64Sha256":"d0dc1c03197c3e90f09b66ad7c89b4f7b448d06dc84c03b247dce976d6018d6e","sourceSha256":"15836d7ad69f12ef581a6e5b8635c9db43b2177dac609160c0749d3d1fefbaa8","x64Sha256":"95aa9c272225e74ff9f45f54dde4bc30aee324e9ba24d8a876db9151c81b454d"},"backendSocketPath":"/run/daimon-engine-broker/backend.sock","bounds":{"capabilityBundleBytes":8196,"capabilityBytes":4096,"outputBytes":262144,"promptBytes":65536},"controlProtocolVersion":"noopolis.daimon.engine-broker.v4","controlSocketPath":"/run/daimon-engine-broker/control.sock","credentialHomePath":"/var/lib/spawnfile/daimon/grok-subscription-realm","grokCliArtifacts":{"arm64":{"bytes":136090504,"sha256":"39ab87666877d64ef3a40aa60fbe0c3b6a6acd7001b78fe60e2c76bb6cfc4a94","url":"https://storage.googleapis.com/grok-build-public-artifacts/cli/grok-1.0.34-linux-aarch64"},"x64":{"bytes":163035648,"sha256":"be5905e107d2b8b5f3c142d21ecfe4c8fd32a913d2fd551b788707930c4dc80d","url":"https://storage.googleapis.com/grok-build-public-artifacts/cli/grok-1.0.34-linux-x86_64"}},"grokCliBuild":"3736acbc8658","grokCliVersion":"1.0.34","grokExecutablePath":"/usr/local/bin/grok","identities":{"brokerUid":2100,"firstWorkerUid":2200,"organizationUid":2000},"inferenceGrants":{"bodyMembers":["messages","model","reasoning_effort","response_format","stream","stream_options"],"client":{"configSha256":{"grok-4.5":{"high":"ffbc33728b821e9854fbc7c93601e599225da421ecfd6ebf10d314afcc28d6f2","low":"a07f7436f1268bb399ec233c65d3b3d8fb99a11a1f175f8da1ca133c9367bc74","medium":"1f4c0d4dad1f3b09419b5739db6423a09e0049abc091594c64123a75dd53dfb9"},"grok-4.6":{"high":"5652656effa82f0c4f09cf8226b16e6140332a5a358b571194bb5563312367ac","low":"79314d039f787e4ebfec7dacf57adc969086b948f564dec008f0ed6367e6062f","medium":"6f538de0547c0c4e6a3f04ae08595ceadadabb06b75f6b6ee4c428744bb95cd8"},"grok-build":{"high":"98d16f2b7d12f4eb540d625c853e51d227933e204923e43e8b9b4176f10aca2c","low":"ca15c6a562a008227d39c51d3a3a83715663089b3784e8b46debb1fb67b3c4a1","medium":"01783fb6beadcf6f8486fff0836820ad43fab5662b812a907fe9cfdb83e9804d"}},"envKey":"DAIMON_INFERENCE_GRANT","modelId":"daimon-inference-grok"},"failureCodes":["auth_stale","grant_limit","invalid_request","unavailable"],"ledgerDedupeKey":["grant","request"],"ledgerVersion":"noopolis.daimon.inference-usage.v1","limits":{"maxRequests":64,"maxTokens":2000000},"maxInFlightRequestsPerGrant":1,"maxLiveGrants":8,"messageRoles":["system","user","assistant"],"purposes":["judge","optimizer"],"requestKinds":["request_inference_grant","release_inference_grant"],"tokenPrefix":"inference_","ttlMs":600000},"launcherSocketPath":"/run/daimon-engine-broker/launcher.sock","mcpFacade":{"host":"127.0.0.1","path":"/mcp","port":43124},"nativeAbiVersion":2,"nativeExecutablePath":"/opt/daimon/bin/daimon-engine-broker","projectionVersion":"noopolis.daimon.grok-broker-projection.v3","providerProxy":{"host":"127.0.0.1","port":43123},"registrationPath":"/etc/daimon-engine-broker/registrations.bin","runRequestBudget":{"countsCredentialRetries":true,"fileName":"run-requests.json","includesInferenceGrants":true,"maximumField":"maxRunRequests","storeField":"runRequestStore"},"serviceConfigPath":"/etc/daimon-engine-broker/service.json","serviceConfigVersions":["noopolis.daimon.engine-broker-service.v1","noopolis.daimon.engine-broker-service.v2","noopolis.daimon.engine-broker-service.v3"],"slotPreflightVersion":"noopolis.daimon.grok-slot-preflight.v2","slotRouting":{"controlCaller":"organization","key":"slot","repeatedAgentIds":true,"resetRequest":"reset_slot","resetResponse":"slot_reset","slotEnvironment":"DAIMON_ENGINE_BROKER_SLOT","turnStoreDirectory":"slot-{slot}","workersMayControl":false},"turnLimits":{"bounds":{"maxRequests":[1,48],"maxTokens":[1,10000000],"timeoutMs":[1000,3600000]},"keys":["maxRequests","maxTokens","timeoutMs"],"limitReasons":["tokens","requests","timeout","none"],"maxInFlightRequests":1,"missingUsageEstimate":{"inputBytesPerToken":2,"outputTokens":4096},"requestUsageMaxTokens":500000,"tokenCeilingOvershoot":"at-most-one-request","v1Defaults":{"maxRequests":32,"maxTokens":300000,"timeoutMs":240000},"wakeMayOnlyLower":true},"turnRecordVersions":["noopolis.daimon.engine-broker-turn.v1","noopolis.daimon.engine-broker-turn.v2"],"turnStorePath":"/var/lib/spawnfile/daimon/grok-subscription-realm/turns","wakeLimitEnvironment":{"maxTokens":"DAIMON_ENGINE_WAKE_TOKEN_CEILING","timeoutMs":"DAIMON_ENGINE_WAKE_TIMEOUT_MS"},"worker":{"clockedConfigSha256":{"grok-4.5":{"high":"907d8967960c342b442d6d256b2585f3c85bd846a78578f596f0b605403d6d34","low":"3c4f3515b21c1bffb3fb770e2ecb4b918b6c43d5e77c1fd47e1e6698d1fedee7","medium":"9117e12b2f3f6fa045799592969cbaae1c2f3b1ea79330badac8655b9b41dd7a"},"grok-4.6":{"high":"203744f6f0dfc0bc80cfb896880497edfd9b3de4dcf33060e8ef4d2ef5f220a7","low":"751f1dcd04983e5e5883df5a8fefa04f201e187e5ef1f344d3bf83f950830432","medium":"f1406f93a8091eb0c09e07321254a9c783a89b0bbf5548d9613d53a8d087a517"},"grok-build":{"high":"6efddadc82c38020d3351829e54bb09fa456cd6d76ea1247902794d82a4a3ffa","low":"a8c63ba910623a0686930c27db0733f4a2588c7fca9dd7da25c3f18027720ab5","medium":"6afcd2b90c0d19794f8c0d22147a0f011946a92e613f89dae98b0ca729313101"}},"configSha256":{"grok-4.5":{"high":"c63c3387ce92d94ec3f690abfe98942afcd7c9e17ff84816bbe751f340ab251f","low":"8247127c3625ff7c5d8d527a53596b89ec6557a821ac46cfd00bd122b90daff6","medium":"59288cee61297bb8c002097061a48f77b09d310754187a253ee089f7172a9155"},"grok-4.6":{"high":"65b0212564fb74042b1503d293fb8d3620276033264c0efade2a539ca09218e3","low":"ab58499ac32678097c146479896f2b8a8e2b0e39aea22dc0a60b6227e370538e","medium":"df1a5cc84346e7f6bf6090492fbd19faaefb42953e3bb2e8c6cbc0572242403f"},"grok-build":{"high":"a23724e00d670caee185ba7690d2daa868173e53905cf446f5329666f01ab4e3","low":"fb343f2809903f26d21681470943235031f946e99085542fd89555eb7782cbb5","medium":"8a587ef75c90eab70d19b24583e60051d6fba9d90c558839fdbb15588b4cc656"}},"defaultModel":"grok-4.6","defaultReasoningEffort":"low","home":{"directory":{"group":"worker","mode":1017,"uid":0},"organizationRuntimeHome":{"group":"worker","mode":456,"owner":"organization"},"privateTmp":{"mode":448,"owner":"worker","relativeToWorkerHome":"tmp"},"readOnlyFiles":{"gid":0,"mode":292,"names":["config.toml","managed_config.toml","requirements.toml","sandbox.toml","trusted_folders.toml"],"uid":0},"sandboxEvents":{"group":"broker","mode":416,"owner":"worker","relativePath":"sessions/sandbox-events.jsonl"},"sessionsDirectory":{"group":"worker","mode":1017,"relativePath":"sessions","uid":0},"sharedTmp":{"maxGroupExclusive":2200,"mode":1020,"otherMode":4,"paths":["/tmp","/var/tmp"],"uid":0},"spillDirectory":{"fileMode":416,"group":"worker","mode":1512,"owner":"organization","relativeToRuntimeHome":"tool-output"}},"maxTurns":48,"modelId":"daimon-broker-grok","models":["grok-4.6","grok-4.5","grok-build"],"reasoningEfforts":["low","medium","high"],"systemPromptSha256":"2c31c0085a54a4efbf9c0cf0b8124c56e47f38691b7f0c7fa233a74abaa8ddf8","taskClock":{"directoryMode":493,"directoryPath":"/run/daimon-engine-broker/task-clock/slot-0","fileMode":420,"ownerUid":2100,"preloadPath":"/usr/local/lib/daimon/libfaketime.so.1","rootDirectoryPath":"/run/daimon-engine-broker/task-clock","slotDirectoryPattern":"/run/daimon-engine-broker/task-clock/slot-{slot}","slotFilePattern":"/run/daimon-engine-broker/task-clock/slot-{slot}/faketime","timestampFilePath":"/run/daimon-engine-broker/task-clock/slot-0/faketime","version":"noopolis.daimon.grok-broker-task-clock.v2","workerView":"own-directory-visible-sibling-directories-denied"},"toolIds":["run_terminal_cmd","read_file","grep","list_dir","search_tool","use_tool"],"visibleTools":["grep","list_dir","read_file","run_terminal_command","search_tool","use_tool"]}},"grokSubscriptionRealm":{"agentCredentialRelativePath":".grok/auth.json","bootstrapMountPath":"/var/lib/spawnfile/daimon/grok-bootstrap-auth","bootstrapSourceSlot":"grok-auth","directoryMode":448,"durableMountPath":"/var/lib/spawnfile/daimon/grok-subscription-realm","fileMode":384,"maxCredentialBytes":65536},"healthResponseSchema":{"additionalProperties":false,"properties":{"agents":{"items":{"additionalProperties":false,"properties":{"agentId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"state":{"enum":["starting","running","stopping","stopped","idle","failed"]}},"required":["agentId","state"],"type":"object"},"maxItems":32,"type":"array"},"state":{"enum":["starting","running","stopping","stopped"]},"version":{"const":"noopolis.daimon.organization-runtime-health.v1"}},"required":["version","state","agents"],"type":"object"},"operatorDrain":{"authorization":"control-bearer","blockedReason":"operator_stop","drainRoute":"POST /v2/drain","queuedWakes":"retained","response":"workAvailabilityResponseSchema","resumeClearsOperatorStop":false,"resumeRoute":"POST /v2/resume","runningTurns":"finish","scope":"process"},"organizationRuntimeConfigSchema":{"$id":"noopolis.daimon.organization-runtime.v1","$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"agents":{"items":{"additionalProperties":false,"properties":{"attention":{"additionalProperties":false,"properties":{"maxBatchBytes":{"maximum":12000,"minimum":1024,"type":"integer"},"maxBatchMessages":{"maximum":32,"minimum":1,"type":"integer"},"maxExecutions":{"maximum":9007199254740991,"minimum":1,"type":"integer"},"maxTokens":{"maximum":9007199254740991,"minimum":1,"type":"integer"}},"type":"object"},"engine":{"additionalProperties":false,"allOf":[{"if":{"properties":{"kind":{"const":"grok"}}},"then":{"dependentRequired":{"model":["reasoningEffort"],"reasoningEffort":["model"]},"properties":{"codexSandbox":false,"model":{"enum":["grok-4.6","grok-4.5","grok-build"]},"reasoningEffort":{"enum":["low","medium","high"]}}}},{"if":{"properties":{"kind":{"const":"agy"}}},"then":{"properties":{"codexSandbox":false,"model":false,"reasoningEffort":false}}}],"properties":{"codexSandbox":{"additionalProperties":false,"properties":{"mode":{"const":"workspace-write"},"networkAccess":{"const":false},"webSearch":{"const":"disabled"}},"required":["mode","networkAccess","webSearch"],"type":"object"},"kind":{"enum":["codex","grok","agy"]},"model":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"reasoningEffort":{"enum":["none","minimal","low","medium","high","xhigh","max","ultra","persistent"]}},"required":["kind"],"type":"object"},"id":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"instructions":{"maxLength":16384,"minLength":1,"pattern":"\\S","type":"string"},"mcp":{"items":{"additionalProperties":false,"properties":{"args":{"items":{"maxLength":4096,"type":"string"},"maxItems":32,"type":"array"},"authSecretEnv":{"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"},"command":{"pattern":"^/","type":"string"},"env":{"additionalProperties":{"type":"string"},"type":"object"},"name":{"maxLength":4096,"minLength":1,"type":"string"},"tools":{"items":{"maxLength":4096,"minLength":1,"type":"string"},"maxItems":32,"minItems":1,"type":"array","uniqueItems":true},"transport":{"enum":["stdio","sse","streamable_http"]},"url":{"type":"string"}},"required":["name","transport","args","env","tools"],"type":"object"},"maxItems":8,"type":"array"},"memory":{"additionalProperties":false,"properties":{"runtimeHomePath":{"maxLength":4096,"pattern":"^/","type":"string"},"source":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"tokenBudget":{"maximum":1000000,"minimum":1,"type":"integer"}},"required":["runtimeHomePath"],"type":"object"},"moltnet":{"additionalProperties":false,"properties":{"cliPath":{"pattern":"^/","type":"string"},"configPath":{"pattern":"^/","type":"string"},"networks":{"items":{"additionalProperties":false,"properties":{"dms":{"type":"boolean"},"id":{"minLength":1,"type":"string"},"rooms":{"items":{"minLength":1,"type":"string"},"type":"array","uniqueItems":true}},"required":["id","rooms","dms"],"type":"object"},"maxItems":16,"type":"array"}},"required":["cliPath","configPath","networks"],"type":"object"},"name":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"recording":{"additionalProperties":false,"properties":{"directory":{"maxLength":4096,"pattern":"^/[^\\u0000]*$","type":"string"},"keepMs":{"maximum":9007199254740991,"minimum":1,"type":"integer"},"snapshots":{"items":{"additionalProperties":false,"properties":{"id":{"pattern":"^[A-Za-z0-9._-]{1,128}$","type":"string"},"path":{"maxLength":4096,"pattern":"^/[^\\u0000]*$","type":"string"}},"required":["id","path"],"type":"object"},"maxItems":16,"type":"array","uniqueItems":true}},"required":["directory","keepMs","snapshots"],"type":"object"},"runtimeHomePath":{"maxLength":4096,"pattern":"^/","type":"string"},"workspacePath":{"maxLength":4096,"pattern":"^/","type":"string"}},"required":["id","name","instructions","workspacePath","runtimeHomePath","engine"],"type":"object"},"maxItems":32,"minItems":1,"type":"array"},"host":{"additionalProperties":false,"properties":{"bindHost":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"controlTokenEnv":{"maxLength":4096,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"},"port":{"maximum":65535,"minimum":1,"type":"integer"}},"required":["bindHost","port","controlTokenEnv"],"type":"object"},"version":{"const":"noopolis.daimon.organization-runtime.v1"}},"required":["version","host","agents"],"type":"object"},"organizationRuntimeConfigV2Schema":{"$id":"noopolis.daimon.organization-runtime.v2","$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"agents":{"items":{"additionalProperties":false,"properties":{"attention":{"additionalProperties":false,"properties":{"maxBatchBytes":{"maximum":12000,"minimum":1024,"type":"integer"},"maxBatchMessages":{"maximum":32,"minimum":1,"type":"integer"},"maxExecutions":{"maximum":9007199254740991,"minimum":1,"type":"integer"},"maxTokens":{"maximum":9007199254740991,"minimum":1,"type":"integer"}},"type":"object"},"engine":{"additionalProperties":false,"allOf":[{"if":{"properties":{"kind":{"const":"grok"}}},"then":{"dependentRequired":{"model":["reasoningEffort"],"reasoningEffort":["model"]},"properties":{"codexSandbox":false,"model":{"enum":["grok-4.6","grok-4.5","grok-build"]},"reasoningEffort":{"enum":["low","medium","high"]}}}},{"if":{"properties":{"kind":{"const":"agy"}}},"then":{"properties":{"codexSandbox":false,"model":false,"reasoningEffort":false}}}],"properties":{"codexSandbox":{"additionalProperties":false,"properties":{"mode":{"const":"workspace-write"},"networkAccess":{"const":false},"webSearch":{"const":"disabled"}},"required":["mode","networkAccess","webSearch"],"type":"object"},"kind":{"enum":["codex","grok","agy"]},"model":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"reasoningEffort":{"enum":["none","minimal","low","medium","high","xhigh","max","ultra","persistent"]}},"required":["kind"],"type":"object"},"id":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"instructions":{"maxLength":16384,"minLength":1,"pattern":"\\S","type":"string"},"mcp":{"items":{"additionalProperties":false,"properties":{"args":{"items":{"maxLength":4096,"type":"string"},"maxItems":32,"type":"array"},"authSecretEnv":{"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"},"command":{"pattern":"^/","type":"string"},"env":{"additionalProperties":{"type":"string"},"type":"object"},"name":{"maxLength":4096,"minLength":1,"type":"string"},"tools":{"items":{"maxLength":4096,"minLength":1,"type":"string"},"maxItems":32,"minItems":1,"type":"array","uniqueItems":true},"transport":{"enum":["stdio","sse","streamable_http"]},"url":{"type":"string"}},"required":["name","transport","args","env","tools"],"type":"object"},"maxItems":8,"type":"array"},"memory":{"additionalProperties":false,"properties":{"runtimeHomePath":{"maxLength":4096,"pattern":"^/","type":"string"},"source":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"tokenBudget":{"maximum":1000000,"minimum":1,"type":"integer"}},"required":["runtimeHomePath"],"type":"object"},"moltnet":{"additionalProperties":false,"properties":{"cliPath":{"pattern":"^/","type":"string"},"configPath":{"pattern":"^/","type":"string"},"networks":{"items":{"additionalProperties":false,"properties":{"dms":{"type":"boolean"},"id":{"minLength":1,"type":"string"},"rooms":{"items":{"minLength":1,"type":"string"},"type":"array","uniqueItems":true}},"required":["id","rooms","dms"],"type":"object"},"maxItems":16,"type":"array"}},"required":["cliPath","configPath","networks"],"type":"object"},"name":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"recording":{"additionalProperties":false,"properties":{"directory":{"maxLength":4096,"pattern":"^/[^\\u0000]*$","type":"string"},"keepMs":{"maximum":9007199254740991,"minimum":1,"type":"integer"},"snapshots":{"items":{"additionalProperties":false,"properties":{"id":{"pattern":"^[A-Za-z0-9._-]{1,128}$","type":"string"},"path":{"maxLength":4096,"pattern":"^/[^\\u0000]*$","type":"string"}},"required":["id","path"],"type":"object"},"maxItems":16,"type":"array","uniqueItems":true}},"required":["directory","keepMs","snapshots"],"type":"object"},"runtimeHomePath":{"maxLength":4096,"pattern":"^/","type":"string"},"schedule":{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"const":"disabled"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"interval_ms":{"maximum":31536000000,"minimum":1,"type":"integer"},"jitter_seconds":{"maximum":3600,"minimum":0,"type":"integer"},"kind":{"const":"every"},"prompt":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"}},"required":["kind","interval_ms","prompt"],"type":"object"},{"additionalProperties":false,"properties":{"cron":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"jitter_seconds":{"maximum":3600,"minimum":0,"type":"integer"},"kind":{"const":"cron"},"prompt":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"timezone":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"}},"required":["kind","cron","timezone","prompt"],"type":"object"}]},"workspacePath":{"maxLength":4096,"pattern":"^/","type":"string"}},"required":["id","name","instructions","workspacePath","runtimeHomePath","engine","schedule"],"type":"object"},"maxItems":32,"minItems":1,"type":"array"},"host":{"additionalProperties":false,"properties":{"bindHost":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"controlTokenEnv":{"maxLength":4096,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"},"port":{"maximum":65535,"minimum":1,"type":"integer"}},"required":["bindHost","port","controlTokenEnv"],"type":"object"},"version":{"const":"noopolis.daimon.organization-runtime.v2"}},"required":["version","host","agents"],"type":"object"},"supportedEngineKinds":["agy","codex","grok"],"version":"noopolis.daimon.runtime-contract-manifest.v5","wakeAcceptanceTypes":["manual","message","schedule","external"],"wakeMoments":{"captureDeadlineMs":60000,"completionSuffix":".complete","configField":"agents[].recording","finalizationDeadlineMs":1000,"maxManifestBytes":134217728,"maxRowBytes":4194304,"maxSnapshotEntries":200000,"maxSnapshotRoots":16,"rowsFile":"wake-moments.jsonl","snapshotsDirectory":"snapshots","version":"noopolis.daimon.wake-moment.v1"},"wakeRequestSchema":{"additionalProperties":false,"properties":{"agentId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"event":{"additionalProperties":false,"properties":{"id":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"kind":{"enum":["manual","message","schedule","external"]},"occurredAt":{"format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","type":"string"},"text":{"maxLength":4096,"type":"string"},"version":{"const":"noopolis.daimon.wake.v1"}},"required":["version","id","kind","text","occurredAt"],"type":"object"}},"required":["agentId","event"],"type":"object"},"wakeResultSchema":{"oneOf":[{"additionalProperties":false,"properties":{"agentId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"durationMs":{"minimum":0,"type":"integer"},"status":{"const":"completed"},"text":{"maxLength":4096,"type":"string"},"version":{"const":"noopolis.daimon.wake-result.v1"},"wakeId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"}},"required":["version","status","agentId","wakeId","text","durationMs"],"type":"object"},{"additionalProperties":false,"properties":{"agentId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"code":{"enum":["unauthorized","unknown_agent","queue_full","durable_inbox_required"]},"status":{"const":"rejected"},"version":{"const":"noopolis.daimon.wake-result.v1"},"wakeId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"}},"required":["version","status","agentId","wakeId","code"],"type":"object"},{"additionalProperties":false,"properties":{"agentId":{"maxLength":4096,"type":"string"},"code":{"const":"invalid_request"},"status":{"const":"rejected"},"version":{"const":"noopolis.daimon.wake-result.v1"},"wakeId":{"maxLength":4096,"type":"string"}},"required":["version","status","agentId","wakeId","code"],"type":"object"},{"additionalProperties":false,"properties":{"agentId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"code":{"enum":["host_stopping","host_stopped","queued_wake_stopped","active_wake_aborted"]},"status":{"const":"stopped"},"version":{"const":"noopolis.daimon.wake-result.v1"},"wakeId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"}},"required":["version","status","agentId","wakeId","code"],"type":"object"},{"additionalProperties":false,"properties":{"agentId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"code":{"const":"engine_failed"},"status":{"const":"failed"},"version":{"const":"noopolis.daimon.wake-result.v1"},"wakeId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"}},"required":["version","status","agentId","wakeId","code"],"type":"object"}]},"workAvailabilityResponseSchema":{"additionalProperties":false,"properties":{"agents":{"items":{"additionalProperties":false,"properties":{"agent_id":{"type":"string"},"budget":{"additionalProperties":false,"properties":{"agent_executions_remaining":{"minimum":0,"type":"integer"},"agent_executions_used":{"minimum":0,"type":"integer"},"agent_tokens_remaining":{"minimum":0,"type":"integer"},"agent_tokens_used":{"minimum":0,"type":"integer"},"armed":{"type":"boolean"},"epoch":{"type":"string"},"executions_remaining":{"minimum":0,"type":"integer"},"executions_used":{"minimum":0,"type":"integer"},"reason":{"type":"string"},"state":{"enum":["available","paused","stopped"]},"tokens_remaining":{"minimum":0,"type":"integer"},"tokens_used":{"minimum":0,"type":"integer"}},"required":["armed","epoch","state","executions_used","executions_remaining","tokens_used","tokens_remaining","agent_executions_used","agent_tokens_used"],"type":"object"},"deferred":{"minimum":0,"type":"integer"},"error":{"type":"string"},"pending":{"minimum":0,"type":"integer"},"running":{"type":"boolean"}},"required":["agent_id","pending","running","deferred","budget"],"type":"object"},"maxItems":32,"type":"array"},"drain":{"additionalProperties":false,"properties":{"since":{"type":"string"},"state":{"enum":["draining","drained"]}},"required":["state","since"],"type":"object"},"state":{"enum":["running","paused","stopped"]},"version":{"const":"noopolis.daimon.work-availability.v1"}},"required":["version","state","agents"],"type":"object"},"workBlockedSchema":{"additionalProperties":false,"properties":{"reason":{"enum":["operator_stop","ledger_unavailable","host_stopping","host_stopped","queue_full"]},"retry_after_ms":{"maximum":300000,"minimum":1000,"type":"integer"},"version":{"const":"noopolis.daimon.work-blocked.v1"}},"required":["version","reason","retry_after_ms"],"type":"object"}} +{"activityResponseSchema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"agentId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"id":{"format":"uuid","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$","type":"string"},"kind":{"enum":["wake_started","wake_completed","wake_rejected","wake_aborted","agent_stopped"]},"occurredAt":{"format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","type":"string"},"wakeId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"}},"required":["id","agentId","kind","occurredAt"],"type":"object"},"maxItems":100,"type":"array"},"nextCursor":{"maxLength":16,"minLength":1,"pattern":"^(0|[1-9][0-9]{0,15})$","type":"string"},"version":{"const":"noopolis.daimon.organization-runtime-activity.v1"}},"required":["version","items"],"type":"object"},"activityV2ResponseSchema":{"additionalProperties":false,"properties":{"executions":{"items":{"additionalProperties":false,"properties":{"agent_id":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"delivery_ids":{"items":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"maxItems":32,"type":"array"},"execution_id":{"type":"string"},"state":{"const":"running"}},"required":["agent_id","execution_id","state","delivery_ids"],"type":"object"},"maxItems":32,"type":"array"},"items":{"items":{"additionalProperties":false,"properties":{"acceptance_id":{"type":"string"},"accepted_at":{"format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","type":"string"},"active":{"type":"boolean"},"agent_id":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"code":{"enum":["engine_failed","host_stopped","host_stopping","queued_wake_stopped","active_wake_aborted","queue_full","unknown_agent"]},"deferred":{"type":"boolean"},"delivery_id":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"execution_id":{"type":"string"},"queue_position":{"minimum":1,"type":"integer"},"request_digest":{"type":"string"},"state":{"enum":["accepted","running","completed","failed","stopped"]},"text":{"maxLength":16384,"type":"string"},"updated_at":{"format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","type":"string"},"version":{"const":"noopolis.daimon.wake-receipt-status.v2"}},"required":["version","acceptance_id","agent_id","delivery_id","request_digest","state","accepted_at","updated_at","active"],"type":"object"},"maxItems":2112,"type":"array"},"state":{"enum":["running","stopped"]},"version":{"const":"noopolis.daimon.organization-runtime-activity.v2"}},"required":["version","items"],"type":"object"},"agySubscriptionRealm":{"directoryMode":448,"durableMountPath":"/var/lib/spawnfile/daimon/agy-subscription-realm","fileMode":384,"maxUnlockBytes":4096,"unlockMountPath":"/var/lib/spawnfile/daimon/agy-unlock-secret","unlockSourceSlot":"agy-unlock-secret"},"attention":{"accounting":"execution-start-reservations","busyDispatch":"bounded-pending-message-batch","completion":"explicit-per-delivery","defaultMaxBatchBytes":12000,"defaultMaxBatchMessages":8,"enabledBy":"agents[].attention","idleDispatch":"immediate","unhandled":"deferred-until-new-input"},"consumedConfigFields":["version","host.bindHost","host.port","host.controlTokenEnv","agents[].id","agents[].name","agents[].instructions","agents[].workspacePath","agents[].runtimeHomePath","agents[].engine.kind","agents[].engine.model","agents[].engine.reasoningEffort","agents[].engine.codexSandbox","agents[].schedule.kind","agents[].schedule.interval_ms","agents[].schedule.cron","agents[].schedule.timezone","agents[].schedule.prompt","agents[].schedule.jitter_seconds","agents[].mcp","agents[].moltnet","agents[].memory","agents[].attention","agents[].recording"],"deliverySemantics":{"activeDeliveryIdempotency":"unbounded-until-terminal","concurrentSameAgentTurns":false,"externalEffectsExactlyOnce":false,"recovery":"at-least-once-with-stable-wake-id","terminalReceiptHorizon":2048},"engineCredentialMaterial":{"codex":{"destinationRelativePath":".codex/auth.json","directoryMode":448,"fileMode":384,"sourceRelativePath":".daimon-inbound/codex-auth","sourceSlot":"codex-auth"}},"engines":{"agy":{"auth":{"busEnvironment":"DBUS_SESSION_BUS_ADDRESS","format":null,"method":null,"provider":null,"realm":{"directoryMode":448,"durableMountPath":"/var/lib/spawnfile/daimon/agy-subscription-realm","fileMode":384,"maxUnlockBytes":4096,"unlockMountPath":"/var/lib/spawnfile/daimon/agy-unlock-secret","unlockSourceSlot":"agy-unlock-secret"},"staging":"secret-service"},"authKinds":["subscription"],"broker":null,"capabilities":{"broker":false,"nativeSandbox":false,"portableCredential":false,"secretService":true},"credentialMaterial":null,"homeDirectory":"","homeEnvironment":"ANTIGRAVITY_CLI_HOME","id":"agy","modelSelection":{"configurable":false,"declarationRequiresBroker":false,"defaults":{"model":null,"reasoningEffort":null},"models":null,"reasoningEfforts":[],"requiresPairedDeclaration":false},"requiredBinaries":["agy","dbus-daemon","gnome-keyring-daemon"],"sandbox":{"configurable":false},"training":{"inferenceGrants":null,"subject":{"isolation":null,"reason":"no verified per-agent sandbox","supported":false}}},"codex":{"auth":{"directoryMode":448,"fileMode":384,"fileName":"auth.json","format":{"accessTokenKeys":["access_token","accessToken","token"],"containerKey":"tokens","fallbackToRoot":true,"refreshTokenKeys":["refresh_token","refreshToken"]},"maxCredentialBytes":65536,"method":"codex","provider":"openai","realm":null,"staging":"portable-file"},"authKinds":["subscription"],"broker":null,"capabilities":{"broker":false,"nativeSandbox":true,"portableCredential":true,"secretService":false},"credentialMaterial":{"destinationRelativePath":".codex/auth.json","directoryMode":448,"fileMode":384,"sourceRelativePath":".daimon-inbound/codex-auth","sourceSlot":"codex-auth"},"homeDirectory":".codex","homeEnvironment":"CODEX_HOME","id":"codex","modelSelection":{"configurable":true,"declarationRequiresBroker":false,"defaults":{"model":null,"reasoningEffort":null},"models":{"kind":"non-empty-string"},"reasoningEfforts":["none","minimal","low","medium","high","xhigh","max","ultra","persistent"],"requiresPairedDeclaration":false},"piAuthMethod":"codex","piProvider":"openai-codex","piSourceProvider":"openai","requiredBinaries":["codex"],"sandbox":{"configurable":true,"policy":{"mode":"workspace-write","networkAccess":false,"webSearch":"disabled"}},"training":{"inferenceGrants":null,"subject":{"isolation":"native-sandbox","supported":true}}},"grok":{"auth":{"directoryMode":448,"fileMode":384,"fileName":"auth.json","format":{"accessTokenKeys":["key"],"entryKeyPattern":"^https://auth\\.x\\.ai::","expiresAtKey":"expires_at","refreshTokenKeys":["refresh_token"]},"maxCredentialBytes":65536,"method":"grok","provider":"xai","realm":{"agentCredentialRelativePath":".grok/auth.json","bootstrapMountPath":"/var/lib/spawnfile/daimon/grok-bootstrap-auth","bootstrapSourceSlot":"grok-auth","directoryMode":448,"durableMountPath":"/var/lib/spawnfile/daimon/grok-subscription-realm","fileMode":384,"maxCredentialBytes":65536},"staging":"broker-realm"},"authKinds":["subscription"],"broker":{"artifacts":{"arm64Sha256":"d0dc1c03197c3e90f09b66ad7c89b4f7b448d06dc84c03b247dce976d6018d6e","sourceSha256":"15836d7ad69f12ef581a6e5b8635c9db43b2177dac609160c0749d3d1fefbaa8","x64Sha256":"95aa9c272225e74ff9f45f54dde4bc30aee324e9ba24d8a876db9151c81b454d"},"backendSocketPath":"/run/daimon-engine-broker/backend.sock","bounds":{"capabilityBundleBytes":8196,"capabilityBytes":4096,"outputBytes":262144,"promptBytes":65536},"controlProtocolVersion":"noopolis.daimon.engine-broker.v4","controlSocketPath":"/run/daimon-engine-broker/control.sock","credentialHomePath":"/var/lib/spawnfile/daimon/grok-subscription-realm","grokCliArtifacts":{"arm64":{"bytes":136090504,"sha256":"39ab87666877d64ef3a40aa60fbe0c3b6a6acd7001b78fe60e2c76bb6cfc4a94","url":"https://storage.googleapis.com/grok-build-public-artifacts/cli/grok-1.0.34-linux-aarch64"},"x64":{"bytes":163035648,"sha256":"be5905e107d2b8b5f3c142d21ecfe4c8fd32a913d2fd551b788707930c4dc80d","url":"https://storage.googleapis.com/grok-build-public-artifacts/cli/grok-1.0.34-linux-x86_64"}},"grokCliBuild":"3736acbc8658","grokCliVersion":"1.0.34","grokExecutablePath":"/usr/local/bin/grok","identities":{"brokerUid":2100,"firstWorkerUid":2200,"organizationUid":2000},"inferenceGrants":{"bodyMembers":["messages","model","reasoning_effort","response_format","stream","stream_options"],"client":{"configSha256":{"grok-4.5":{"high":"ffbc33728b821e9854fbc7c93601e599225da421ecfd6ebf10d314afcc28d6f2","low":"a07f7436f1268bb399ec233c65d3b3d8fb99a11a1f175f8da1ca133c9367bc74","medium":"1f4c0d4dad1f3b09419b5739db6423a09e0049abc091594c64123a75dd53dfb9"},"grok-4.6":{"high":"5652656effa82f0c4f09cf8226b16e6140332a5a358b571194bb5563312367ac","low":"79314d039f787e4ebfec7dacf57adc969086b948f564dec008f0ed6367e6062f","medium":"6f538de0547c0c4e6a3f04ae08595ceadadabb06b75f6b6ee4c428744bb95cd8"},"grok-build":{"high":"98d16f2b7d12f4eb540d625c853e51d227933e204923e43e8b9b4176f10aca2c","low":"ca15c6a562a008227d39c51d3a3a83715663089b3784e8b46debb1fb67b3c4a1","medium":"01783fb6beadcf6f8486fff0836820ad43fab5662b812a907fe9cfdb83e9804d"}},"envKey":"DAIMON_INFERENCE_GRANT","modelId":"daimon-inference-grok"},"failureCodes":["auth_stale","grant_limit","invalid_request","unavailable"],"ledgerDedupeKey":["grant","request"],"ledgerVersion":"noopolis.daimon.inference-usage.v1","limits":{"maxRequests":64,"maxTokens":2000000},"maxInFlightRequestsPerGrant":1,"maxLiveGrants":8,"messageRoles":["system","user","assistant"],"purposes":["judge","optimizer"],"requestKinds":["request_inference_grant","release_inference_grant"],"tokenPrefix":"inference_","ttlMs":600000},"launcherSocketPath":"/run/daimon-engine-broker/launcher.sock","mcpFacade":{"host":"127.0.0.1","path":"/mcp","port":43124},"nativeAbiVersion":2,"nativeExecutablePath":"/opt/daimon/bin/daimon-engine-broker","projectionVersion":"noopolis.daimon.grok-broker-projection.v3","providerProxy":{"host":"127.0.0.1","port":43123},"registrationPath":"/etc/daimon-engine-broker/registrations.bin","runRequestBudget":{"countsCredentialRetries":true,"fileName":"run-requests.json","includesInferenceGrants":true,"maximumField":"maxRunRequests","storeField":"runRequestStore"},"serviceConfigPath":"/etc/daimon-engine-broker/service.json","serviceConfigVersions":["noopolis.daimon.engine-broker-service.v1","noopolis.daimon.engine-broker-service.v2","noopolis.daimon.engine-broker-service.v3"],"slotPreflightVersion":"noopolis.daimon.grok-slot-preflight.v2","slotRouting":{"controlCaller":"organization","key":"slot","repeatedAgentIds":true,"resetRequest":"reset_slot","resetResponse":"slot_reset","slotEnvironment":"DAIMON_ENGINE_BROKER_SLOT","turnStoreDirectory":"slot-{slot}","workersMayControl":false},"turnLimits":{"bounds":{"maxRequests":[1,48],"maxTokens":[1,10000000],"timeoutMs":[1000,3600000]},"keys":["maxRequests","maxTokens","timeoutMs"],"limitReasons":["tokens","requests","timeout","none"],"maxInFlightRequests":1,"missingUsageEstimate":{"inputBytesPerToken":2,"outputTokens":4096},"requestUsageMaxTokens":500000,"tokenCeilingOvershoot":"at-most-one-request","v1Defaults":{"maxRequests":32,"maxTokens":300000,"timeoutMs":240000},"wakeMayOnlyLower":true},"turnRecordVersions":["noopolis.daimon.engine-broker-turn.v1","noopolis.daimon.engine-broker-turn.v2"],"turnStorePath":"/var/lib/spawnfile/daimon/grok-subscription-realm/turns","wakeLimitEnvironment":{"maxTokens":"DAIMON_ENGINE_WAKE_TOKEN_CEILING","timeoutMs":"DAIMON_ENGINE_WAKE_TIMEOUT_MS"},"worker":{"clockedConfigSha256":{"grok-4.5":{"high":"907d8967960c342b442d6d256b2585f3c85bd846a78578f596f0b605403d6d34","low":"3c4f3515b21c1bffb3fb770e2ecb4b918b6c43d5e77c1fd47e1e6698d1fedee7","medium":"9117e12b2f3f6fa045799592969cbaae1c2f3b1ea79330badac8655b9b41dd7a"},"grok-4.6":{"high":"203744f6f0dfc0bc80cfb896880497edfd9b3de4dcf33060e8ef4d2ef5f220a7","low":"751f1dcd04983e5e5883df5a8fefa04f201e187e5ef1f344d3bf83f950830432","medium":"f1406f93a8091eb0c09e07321254a9c783a89b0bbf5548d9613d53a8d087a517"},"grok-build":{"high":"6efddadc82c38020d3351829e54bb09fa456cd6d76ea1247902794d82a4a3ffa","low":"a8c63ba910623a0686930c27db0733f4a2588c7fca9dd7da25c3f18027720ab5","medium":"6afcd2b90c0d19794f8c0d22147a0f011946a92e613f89dae98b0ca729313101"}},"configSha256":{"grok-4.5":{"high":"c63c3387ce92d94ec3f690abfe98942afcd7c9e17ff84816bbe751f340ab251f","low":"8247127c3625ff7c5d8d527a53596b89ec6557a821ac46cfd00bd122b90daff6","medium":"59288cee61297bb8c002097061a48f77b09d310754187a253ee089f7172a9155"},"grok-4.6":{"high":"65b0212564fb74042b1503d293fb8d3620276033264c0efade2a539ca09218e3","low":"ab58499ac32678097c146479896f2b8a8e2b0e39aea22dc0a60b6227e370538e","medium":"df1a5cc84346e7f6bf6090492fbd19faaefb42953e3bb2e8c6cbc0572242403f"},"grok-build":{"high":"a23724e00d670caee185ba7690d2daa868173e53905cf446f5329666f01ab4e3","low":"fb343f2809903f26d21681470943235031f946e99085542fd89555eb7782cbb5","medium":"8a587ef75c90eab70d19b24583e60051d6fba9d90c558839fdbb15588b4cc656"}},"defaultModel":"grok-4.6","defaultReasoningEffort":"low","home":{"directory":{"group":"worker","mode":1017,"uid":0},"organizationRuntimeHome":{"group":"worker","mode":456,"owner":"organization"},"privateTmp":{"mode":448,"owner":"worker","relativeToWorkerHome":"tmp"},"readOnlyFiles":{"gid":0,"mode":292,"names":["config.toml","managed_config.toml","requirements.toml","sandbox.toml","trusted_folders.toml"],"uid":0},"sandboxEvents":{"group":"broker","mode":416,"owner":"worker","relativePath":"sessions/sandbox-events.jsonl"},"sessionsDirectory":{"group":"worker","mode":1017,"relativePath":"sessions","uid":0},"sharedTmp":{"maxGroupExclusive":2200,"mode":1020,"otherMode":4,"paths":["/tmp","/var/tmp"],"uid":0},"spillDirectory":{"fileMode":416,"group":"worker","mode":1512,"owner":"organization","relativeToRuntimeHome":"tool-output"}},"maxTurns":48,"modelId":"daimon-broker-grok","models":["grok-4.6","grok-4.5","grok-build"],"reasoningEfforts":["low","medium","high"],"systemPromptSha256":"2c31c0085a54a4efbf9c0cf0b8124c56e47f38691b7f0c7fa233a74abaa8ddf8","taskClock":{"directoryMode":493,"directoryPath":"/run/daimon-engine-broker/task-clock/slot-0","fileMode":420,"ownerUid":2100,"preloadPath":"/usr/local/lib/daimon/libfaketime.so.1","rootDirectoryPath":"/run/daimon-engine-broker/task-clock","slotDirectoryPattern":"/run/daimon-engine-broker/task-clock/slot-{slot}","slotFilePattern":"/run/daimon-engine-broker/task-clock/slot-{slot}/faketime","timestampFilePath":"/run/daimon-engine-broker/task-clock/slot-0/faketime","version":"noopolis.daimon.grok-broker-task-clock.v2","workerView":"own-directory-visible-sibling-directories-denied"},"toolIds":["run_terminal_cmd","read_file","grep","list_dir","search_tool","use_tool"],"visibleTools":["grep","list_dir","read_file","run_terminal_command","search_tool","use_tool"]}},"capabilities":{"broker":true,"nativeSandbox":true,"portableCredential":true,"secretService":false},"credentialMaterial":{"destinationRelativePath":".grok/auth.json"},"homeDirectory":".grok","homeEnvironment":"GROK_HOME","id":"grok","modelSelection":{"configurable":true,"declarationRequiresBroker":true,"defaults":{"model":"grok-4.6","reasoningEffort":"low"},"models":{"kind":"enum","values":["grok-4.6","grok-4.5","grok-build"]},"reasoningEfforts":["low","medium","high"],"requiresPairedDeclaration":true},"requiredBinaries":["grok","daimon-engine-broker"],"sandbox":{"baseProfile":"strict","configurable":false,"denyPaths":{"canonicalAbsolute":true,"forbiddenCharacterPattern":"[\"\\\\\\u0000-\\u001f\\u007f*?[\\]]","rootAllowed":false,"trailingSlashAllowed":false},"profile":"daimon-strict","restrictNetwork":true},"training":{"inferenceGrants":{"bodyMembers":["messages","model","reasoning_effort","response_format","stream","stream_options"],"client":{"configSha256":{"grok-4.5":{"high":"ffbc33728b821e9854fbc7c93601e599225da421ecfd6ebf10d314afcc28d6f2","low":"a07f7436f1268bb399ec233c65d3b3d8fb99a11a1f175f8da1ca133c9367bc74","medium":"1f4c0d4dad1f3b09419b5739db6423a09e0049abc091594c64123a75dd53dfb9"},"grok-4.6":{"high":"5652656effa82f0c4f09cf8226b16e6140332a5a358b571194bb5563312367ac","low":"79314d039f787e4ebfec7dacf57adc969086b948f564dec008f0ed6367e6062f","medium":"6f538de0547c0c4e6a3f04ae08595ceadadabb06b75f6b6ee4c428744bb95cd8"},"grok-build":{"high":"98d16f2b7d12f4eb540d625c853e51d227933e204923e43e8b9b4176f10aca2c","low":"ca15c6a562a008227d39c51d3a3a83715663089b3784e8b46debb1fb67b3c4a1","medium":"01783fb6beadcf6f8486fff0836820ad43fab5662b812a907fe9cfdb83e9804d"}},"envKey":"DAIMON_INFERENCE_GRANT","modelId":"daimon-inference-grok"},"failureCodes":["auth_stale","grant_limit","invalid_request","unavailable"],"ledgerDedupeKey":["grant","request"],"ledgerVersion":"noopolis.daimon.inference-usage.v1","limits":{"maxRequests":64,"maxTokens":2000000},"maxInFlightRequestsPerGrant":1,"maxLiveGrants":8,"messageRoles":["system","user","assistant"],"purposes":["judge","optimizer"],"requestKinds":["request_inference_grant","release_inference_grant"],"tokenPrefix":"inference_","ttlMs":600000},"subject":{"isolation":"broker-worker","supported":true}}}},"grokEngineBroker":{"artifacts":{"arm64Sha256":"d0dc1c03197c3e90f09b66ad7c89b4f7b448d06dc84c03b247dce976d6018d6e","sourceSha256":"15836d7ad69f12ef581a6e5b8635c9db43b2177dac609160c0749d3d1fefbaa8","x64Sha256":"95aa9c272225e74ff9f45f54dde4bc30aee324e9ba24d8a876db9151c81b454d"},"backendSocketPath":"/run/daimon-engine-broker/backend.sock","bounds":{"capabilityBundleBytes":8196,"capabilityBytes":4096,"outputBytes":262144,"promptBytes":65536},"controlProtocolVersion":"noopolis.daimon.engine-broker.v4","controlSocketPath":"/run/daimon-engine-broker/control.sock","credentialHomePath":"/var/lib/spawnfile/daimon/grok-subscription-realm","grokCliArtifacts":{"arm64":{"bytes":136090504,"sha256":"39ab87666877d64ef3a40aa60fbe0c3b6a6acd7001b78fe60e2c76bb6cfc4a94","url":"https://storage.googleapis.com/grok-build-public-artifacts/cli/grok-1.0.34-linux-aarch64"},"x64":{"bytes":163035648,"sha256":"be5905e107d2b8b5f3c142d21ecfe4c8fd32a913d2fd551b788707930c4dc80d","url":"https://storage.googleapis.com/grok-build-public-artifacts/cli/grok-1.0.34-linux-x86_64"}},"grokCliBuild":"3736acbc8658","grokCliVersion":"1.0.34","grokExecutablePath":"/usr/local/bin/grok","identities":{"brokerUid":2100,"firstWorkerUid":2200,"organizationUid":2000},"inferenceGrants":{"bodyMembers":["messages","model","reasoning_effort","response_format","stream","stream_options"],"client":{"configSha256":{"grok-4.5":{"high":"ffbc33728b821e9854fbc7c93601e599225da421ecfd6ebf10d314afcc28d6f2","low":"a07f7436f1268bb399ec233c65d3b3d8fb99a11a1f175f8da1ca133c9367bc74","medium":"1f4c0d4dad1f3b09419b5739db6423a09e0049abc091594c64123a75dd53dfb9"},"grok-4.6":{"high":"5652656effa82f0c4f09cf8226b16e6140332a5a358b571194bb5563312367ac","low":"79314d039f787e4ebfec7dacf57adc969086b948f564dec008f0ed6367e6062f","medium":"6f538de0547c0c4e6a3f04ae08595ceadadabb06b75f6b6ee4c428744bb95cd8"},"grok-build":{"high":"98d16f2b7d12f4eb540d625c853e51d227933e204923e43e8b9b4176f10aca2c","low":"ca15c6a562a008227d39c51d3a3a83715663089b3784e8b46debb1fb67b3c4a1","medium":"01783fb6beadcf6f8486fff0836820ad43fab5662b812a907fe9cfdb83e9804d"}},"envKey":"DAIMON_INFERENCE_GRANT","modelId":"daimon-inference-grok"},"failureCodes":["auth_stale","grant_limit","invalid_request","unavailable"],"ledgerDedupeKey":["grant","request"],"ledgerVersion":"noopolis.daimon.inference-usage.v1","limits":{"maxRequests":64,"maxTokens":2000000},"maxInFlightRequestsPerGrant":1,"maxLiveGrants":8,"messageRoles":["system","user","assistant"],"purposes":["judge","optimizer"],"requestKinds":["request_inference_grant","release_inference_grant"],"tokenPrefix":"inference_","ttlMs":600000},"launcherSocketPath":"/run/daimon-engine-broker/launcher.sock","mcpFacade":{"host":"127.0.0.1","path":"/mcp","port":43124},"nativeAbiVersion":2,"nativeExecutablePath":"/opt/daimon/bin/daimon-engine-broker","projectionVersion":"noopolis.daimon.grok-broker-projection.v3","providerProxy":{"host":"127.0.0.1","port":43123},"registrationPath":"/etc/daimon-engine-broker/registrations.bin","runRequestBudget":{"countsCredentialRetries":true,"fileName":"run-requests.json","includesInferenceGrants":true,"maximumField":"maxRunRequests","storeField":"runRequestStore"},"serviceConfigPath":"/etc/daimon-engine-broker/service.json","serviceConfigVersions":["noopolis.daimon.engine-broker-service.v1","noopolis.daimon.engine-broker-service.v2","noopolis.daimon.engine-broker-service.v3"],"slotPreflightVersion":"noopolis.daimon.grok-slot-preflight.v2","slotRouting":{"controlCaller":"organization","key":"slot","repeatedAgentIds":true,"resetRequest":"reset_slot","resetResponse":"slot_reset","slotEnvironment":"DAIMON_ENGINE_BROKER_SLOT","turnStoreDirectory":"slot-{slot}","workersMayControl":false},"turnLimits":{"bounds":{"maxRequests":[1,48],"maxTokens":[1,10000000],"timeoutMs":[1000,3600000]},"keys":["maxRequests","maxTokens","timeoutMs"],"limitReasons":["tokens","requests","timeout","none"],"maxInFlightRequests":1,"missingUsageEstimate":{"inputBytesPerToken":2,"outputTokens":4096},"requestUsageMaxTokens":500000,"tokenCeilingOvershoot":"at-most-one-request","v1Defaults":{"maxRequests":32,"maxTokens":300000,"timeoutMs":240000},"wakeMayOnlyLower":true},"turnRecordVersions":["noopolis.daimon.engine-broker-turn.v1","noopolis.daimon.engine-broker-turn.v2"],"turnStorePath":"/var/lib/spawnfile/daimon/grok-subscription-realm/turns","wakeLimitEnvironment":{"maxTokens":"DAIMON_ENGINE_WAKE_TOKEN_CEILING","timeoutMs":"DAIMON_ENGINE_WAKE_TIMEOUT_MS"},"worker":{"clockedConfigSha256":{"grok-4.5":{"high":"907d8967960c342b442d6d256b2585f3c85bd846a78578f596f0b605403d6d34","low":"3c4f3515b21c1bffb3fb770e2ecb4b918b6c43d5e77c1fd47e1e6698d1fedee7","medium":"9117e12b2f3f6fa045799592969cbaae1c2f3b1ea79330badac8655b9b41dd7a"},"grok-4.6":{"high":"203744f6f0dfc0bc80cfb896880497edfd9b3de4dcf33060e8ef4d2ef5f220a7","low":"751f1dcd04983e5e5883df5a8fefa04f201e187e5ef1f344d3bf83f950830432","medium":"f1406f93a8091eb0c09e07321254a9c783a89b0bbf5548d9613d53a8d087a517"},"grok-build":{"high":"6efddadc82c38020d3351829e54bb09fa456cd6d76ea1247902794d82a4a3ffa","low":"a8c63ba910623a0686930c27db0733f4a2588c7fca9dd7da25c3f18027720ab5","medium":"6afcd2b90c0d19794f8c0d22147a0f011946a92e613f89dae98b0ca729313101"}},"configSha256":{"grok-4.5":{"high":"c63c3387ce92d94ec3f690abfe98942afcd7c9e17ff84816bbe751f340ab251f","low":"8247127c3625ff7c5d8d527a53596b89ec6557a821ac46cfd00bd122b90daff6","medium":"59288cee61297bb8c002097061a48f77b09d310754187a253ee089f7172a9155"},"grok-4.6":{"high":"65b0212564fb74042b1503d293fb8d3620276033264c0efade2a539ca09218e3","low":"ab58499ac32678097c146479896f2b8a8e2b0e39aea22dc0a60b6227e370538e","medium":"df1a5cc84346e7f6bf6090492fbd19faaefb42953e3bb2e8c6cbc0572242403f"},"grok-build":{"high":"a23724e00d670caee185ba7690d2daa868173e53905cf446f5329666f01ab4e3","low":"fb343f2809903f26d21681470943235031f946e99085542fd89555eb7782cbb5","medium":"8a587ef75c90eab70d19b24583e60051d6fba9d90c558839fdbb15588b4cc656"}},"defaultModel":"grok-4.6","defaultReasoningEffort":"low","home":{"directory":{"group":"worker","mode":1017,"uid":0},"organizationRuntimeHome":{"group":"worker","mode":456,"owner":"organization"},"privateTmp":{"mode":448,"owner":"worker","relativeToWorkerHome":"tmp"},"readOnlyFiles":{"gid":0,"mode":292,"names":["config.toml","managed_config.toml","requirements.toml","sandbox.toml","trusted_folders.toml"],"uid":0},"sandboxEvents":{"group":"broker","mode":416,"owner":"worker","relativePath":"sessions/sandbox-events.jsonl"},"sessionsDirectory":{"group":"worker","mode":1017,"relativePath":"sessions","uid":0},"sharedTmp":{"maxGroupExclusive":2200,"mode":1020,"otherMode":4,"paths":["/tmp","/var/tmp"],"uid":0},"spillDirectory":{"fileMode":416,"group":"worker","mode":1512,"owner":"organization","relativeToRuntimeHome":"tool-output"}},"maxTurns":48,"modelId":"daimon-broker-grok","models":["grok-4.6","grok-4.5","grok-build"],"reasoningEfforts":["low","medium","high"],"systemPromptSha256":"2c31c0085a54a4efbf9c0cf0b8124c56e47f38691b7f0c7fa233a74abaa8ddf8","taskClock":{"directoryMode":493,"directoryPath":"/run/daimon-engine-broker/task-clock/slot-0","fileMode":420,"ownerUid":2100,"preloadPath":"/usr/local/lib/daimon/libfaketime.so.1","rootDirectoryPath":"/run/daimon-engine-broker/task-clock","slotDirectoryPattern":"/run/daimon-engine-broker/task-clock/slot-{slot}","slotFilePattern":"/run/daimon-engine-broker/task-clock/slot-{slot}/faketime","timestampFilePath":"/run/daimon-engine-broker/task-clock/slot-0/faketime","version":"noopolis.daimon.grok-broker-task-clock.v2","workerView":"own-directory-visible-sibling-directories-denied"},"toolIds":["run_terminal_cmd","read_file","grep","list_dir","search_tool","use_tool"],"visibleTools":["grep","list_dir","read_file","run_terminal_command","search_tool","use_tool"]}},"grokSubscriptionRealm":{"agentCredentialRelativePath":".grok/auth.json","bootstrapMountPath":"/var/lib/spawnfile/daimon/grok-bootstrap-auth","bootstrapSourceSlot":"grok-auth","directoryMode":448,"durableMountPath":"/var/lib/spawnfile/daimon/grok-subscription-realm","fileMode":384,"maxCredentialBytes":65536},"healthResponseSchema":{"additionalProperties":false,"properties":{"agents":{"items":{"additionalProperties":false,"properties":{"agentId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"state":{"enum":["starting","running","stopping","stopped","idle","failed"]}},"required":["agentId","state"],"type":"object"},"maxItems":32,"type":"array"},"state":{"enum":["starting","running","stopping","stopped"]},"version":{"const":"noopolis.daimon.organization-runtime-health.v1"}},"required":["version","state","agents"],"type":"object"},"operatorDrain":{"authorization":"control-bearer","blockedReason":"operator_stop","drainRoute":"POST /v2/drain","queuedWakes":"retained","response":"workAvailabilityResponseSchema","resumeClearsOperatorStop":false,"resumeRoute":"POST /v2/resume","runningTurns":"finish","scope":"process"},"organizationRuntimeConfigSchema":{"$id":"noopolis.daimon.organization-runtime.v1","$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"agents":{"items":{"additionalProperties":false,"properties":{"attention":{"additionalProperties":false,"properties":{"maxBatchBytes":{"maximum":12000,"minimum":1024,"type":"integer"},"maxBatchMessages":{"maximum":32,"minimum":1,"type":"integer"},"maxExecutions":{"maximum":9007199254740991,"minimum":1,"type":"integer"},"maxTokens":{"maximum":9007199254740991,"minimum":1,"type":"integer"}},"type":"object"},"engine":{"additionalProperties":false,"allOf":[{"if":{"properties":{"kind":{"const":"grok"}}},"then":{"dependentRequired":{"model":["reasoningEffort"],"reasoningEffort":["model"]},"properties":{"codexSandbox":false,"model":{"enum":["grok-4.6","grok-4.5","grok-build"]},"reasoningEffort":{"enum":["low","medium","high"]}}}},{"if":{"properties":{"kind":{"const":"agy"}}},"then":{"properties":{"codexSandbox":false,"model":false,"reasoningEffort":false}}}],"properties":{"codexSandbox":{"additionalProperties":false,"properties":{"mode":{"const":"workspace-write"},"networkAccess":{"const":false},"webSearch":{"const":"disabled"}},"required":["mode","networkAccess","webSearch"],"type":"object"},"kind":{"enum":["codex","grok","agy"]},"model":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"reasoningEffort":{"enum":["none","minimal","low","medium","high","xhigh","max","ultra","persistent"]}},"required":["kind"],"type":"object"},"id":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"instructions":{"maxLength":16384,"minLength":1,"pattern":"\\S","type":"string"},"mcp":{"items":{"additionalProperties":false,"properties":{"args":{"items":{"maxLength":4096,"type":"string"},"maxItems":32,"type":"array"},"authSecretEnv":{"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"},"command":{"pattern":"^/","type":"string"},"env":{"additionalProperties":{"type":"string"},"type":"object"},"name":{"maxLength":4096,"minLength":1,"type":"string"},"tools":{"items":{"maxLength":4096,"minLength":1,"type":"string"},"maxItems":32,"minItems":1,"type":"array","uniqueItems":true},"transport":{"enum":["stdio","sse","streamable_http"]},"url":{"type":"string"}},"required":["name","transport","args","env","tools"],"type":"object"},"maxItems":8,"type":"array"},"memory":{"additionalProperties":false,"properties":{"runtimeHomePath":{"maxLength":4096,"pattern":"^/","type":"string"},"source":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"tokenBudget":{"maximum":1000000,"minimum":1,"type":"integer"}},"required":["runtimeHomePath"],"type":"object"},"moltnet":{"additionalProperties":false,"properties":{"cliPath":{"pattern":"^/","type":"string"},"configPath":{"pattern":"^/","type":"string"},"networks":{"items":{"additionalProperties":false,"properties":{"dms":{"type":"boolean"},"id":{"minLength":1,"type":"string"},"rooms":{"items":{"minLength":1,"type":"string"},"type":"array","uniqueItems":true}},"required":["id","rooms","dms"],"type":"object"},"maxItems":16,"type":"array"}},"required":["cliPath","configPath","networks"],"type":"object"},"name":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"recording":{"additionalProperties":false,"properties":{"directory":{"maxLength":4096,"pattern":"^/[^\\u0000]*$","type":"string"},"keepMs":{"maximum":9007199254740991,"minimum":1,"type":"integer"},"snapshots":{"items":{"additionalProperties":false,"properties":{"id":{"pattern":"^[A-Za-z0-9._-]{1,128}$","type":"string"},"path":{"maxLength":4096,"pattern":"^/[^\\u0000]*$","type":"string"}},"required":["id","path"],"type":"object"},"maxItems":16,"type":"array","uniqueItems":true}},"required":["directory","keepMs","snapshots"],"type":"object"},"runtimeHomePath":{"maxLength":4096,"pattern":"^/","type":"string"},"workspacePath":{"maxLength":4096,"pattern":"^/","type":"string"}},"required":["id","name","instructions","workspacePath","runtimeHomePath","engine"],"type":"object"},"maxItems":32,"minItems":1,"type":"array"},"host":{"additionalProperties":false,"properties":{"bindHost":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"controlTokenEnv":{"maxLength":4096,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"},"port":{"maximum":65535,"minimum":1,"type":"integer"}},"required":["bindHost","port","controlTokenEnv"],"type":"object"},"version":{"const":"noopolis.daimon.organization-runtime.v1"}},"required":["version","host","agents"],"type":"object"},"organizationRuntimeConfigV2Schema":{"$id":"noopolis.daimon.organization-runtime.v2","$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"agents":{"items":{"additionalProperties":false,"properties":{"attention":{"additionalProperties":false,"properties":{"maxBatchBytes":{"maximum":12000,"minimum":1024,"type":"integer"},"maxBatchMessages":{"maximum":32,"minimum":1,"type":"integer"},"maxExecutions":{"maximum":9007199254740991,"minimum":1,"type":"integer"},"maxTokens":{"maximum":9007199254740991,"minimum":1,"type":"integer"}},"type":"object"},"engine":{"additionalProperties":false,"allOf":[{"if":{"properties":{"kind":{"const":"grok"}}},"then":{"dependentRequired":{"model":["reasoningEffort"],"reasoningEffort":["model"]},"properties":{"codexSandbox":false,"model":{"enum":["grok-4.6","grok-4.5","grok-build"]},"reasoningEffort":{"enum":["low","medium","high"]}}}},{"if":{"properties":{"kind":{"const":"agy"}}},"then":{"properties":{"codexSandbox":false,"model":false,"reasoningEffort":false}}}],"properties":{"codexSandbox":{"additionalProperties":false,"properties":{"mode":{"const":"workspace-write"},"networkAccess":{"const":false},"webSearch":{"const":"disabled"}},"required":["mode","networkAccess","webSearch"],"type":"object"},"kind":{"enum":["codex","grok","agy"]},"model":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"reasoningEffort":{"enum":["none","minimal","low","medium","high","xhigh","max","ultra","persistent"]}},"required":["kind"],"type":"object"},"id":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"instructions":{"maxLength":16384,"minLength":1,"pattern":"\\S","type":"string"},"mcp":{"items":{"additionalProperties":false,"properties":{"args":{"items":{"maxLength":4096,"type":"string"},"maxItems":32,"type":"array"},"authSecretEnv":{"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"},"command":{"pattern":"^/","type":"string"},"env":{"additionalProperties":{"type":"string"},"type":"object"},"name":{"maxLength":4096,"minLength":1,"type":"string"},"tools":{"items":{"maxLength":4096,"minLength":1,"type":"string"},"maxItems":32,"minItems":1,"type":"array","uniqueItems":true},"transport":{"enum":["stdio","sse","streamable_http"]},"url":{"type":"string"}},"required":["name","transport","args","env","tools"],"type":"object"},"maxItems":8,"type":"array"},"memory":{"additionalProperties":false,"properties":{"runtimeHomePath":{"maxLength":4096,"pattern":"^/","type":"string"},"source":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"tokenBudget":{"maximum":1000000,"minimum":1,"type":"integer"}},"required":["runtimeHomePath"],"type":"object"},"moltnet":{"additionalProperties":false,"properties":{"cliPath":{"pattern":"^/","type":"string"},"configPath":{"pattern":"^/","type":"string"},"networks":{"items":{"additionalProperties":false,"properties":{"dms":{"type":"boolean"},"id":{"minLength":1,"type":"string"},"rooms":{"items":{"minLength":1,"type":"string"},"type":"array","uniqueItems":true}},"required":["id","rooms","dms"],"type":"object"},"maxItems":16,"type":"array"}},"required":["cliPath","configPath","networks"],"type":"object"},"name":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"recording":{"additionalProperties":false,"properties":{"directory":{"maxLength":4096,"pattern":"^/[^\\u0000]*$","type":"string"},"keepMs":{"maximum":9007199254740991,"minimum":1,"type":"integer"},"snapshots":{"items":{"additionalProperties":false,"properties":{"id":{"pattern":"^[A-Za-z0-9._-]{1,128}$","type":"string"},"path":{"maxLength":4096,"pattern":"^/[^\\u0000]*$","type":"string"}},"required":["id","path"],"type":"object"},"maxItems":16,"type":"array","uniqueItems":true}},"required":["directory","keepMs","snapshots"],"type":"object"},"runtimeHomePath":{"maxLength":4096,"pattern":"^/","type":"string"},"schedule":{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"const":"disabled"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"interval_ms":{"maximum":31536000000,"minimum":1,"type":"integer"},"jitter_seconds":{"maximum":3600,"minimum":0,"type":"integer"},"kind":{"const":"every"},"prompt":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"}},"required":["kind","interval_ms","prompt"],"type":"object"},{"additionalProperties":false,"properties":{"cron":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"jitter_seconds":{"maximum":3600,"minimum":0,"type":"integer"},"kind":{"const":"cron"},"prompt":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"timezone":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"}},"required":["kind","cron","timezone","prompt"],"type":"object"}]},"workspacePath":{"maxLength":4096,"pattern":"^/","type":"string"}},"required":["id","name","instructions","workspacePath","runtimeHomePath","engine","schedule"],"type":"object"},"maxItems":32,"minItems":1,"type":"array"},"host":{"additionalProperties":false,"properties":{"bindHost":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"controlTokenEnv":{"maxLength":4096,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"},"port":{"maximum":65535,"minimum":1,"type":"integer"}},"required":["bindHost","port","controlTokenEnv"],"type":"object"},"version":{"const":"noopolis.daimon.organization-runtime.v2"}},"required":["version","host","agents"],"type":"object"},"supportedEngineKinds":["agy","codex","grok"],"version":"noopolis.daimon.runtime-contract-manifest.v6","wakeAcceptanceTypes":["manual","message","schedule","external"],"wakeMoments":{"captureDeadlineMs":60000,"completionSuffix":".complete","configField":"agents[].recording","finalizationDeadlineMs":1000,"maxManifestBytes":134217728,"maxRowBytes":4194304,"maxSnapshotEntries":200000,"maxSnapshotRoots":16,"rowsFile":"wake-moments.jsonl","snapshotsDirectory":"snapshots","version":"noopolis.daimon.wake-moment.v1"},"wakeRequestSchema":{"additionalProperties":false,"properties":{"agentId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"event":{"additionalProperties":false,"properties":{"id":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"kind":{"enum":["manual","message","schedule","external"]},"occurredAt":{"format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","type":"string"},"text":{"maxLength":4096,"type":"string"},"version":{"const":"noopolis.daimon.wake.v1"}},"required":["version","id","kind","text","occurredAt"],"type":"object"}},"required":["agentId","event"],"type":"object"},"wakeResultSchema":{"oneOf":[{"additionalProperties":false,"properties":{"agentId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"durationMs":{"minimum":0,"type":"integer"},"status":{"const":"completed"},"text":{"maxLength":4096,"type":"string"},"version":{"const":"noopolis.daimon.wake-result.v1"},"wakeId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"}},"required":["version","status","agentId","wakeId","text","durationMs"],"type":"object"},{"additionalProperties":false,"properties":{"agentId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"code":{"enum":["unauthorized","unknown_agent","queue_full","durable_inbox_required"]},"status":{"const":"rejected"},"version":{"const":"noopolis.daimon.wake-result.v1"},"wakeId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"}},"required":["version","status","agentId","wakeId","code"],"type":"object"},{"additionalProperties":false,"properties":{"agentId":{"maxLength":4096,"type":"string"},"code":{"const":"invalid_request"},"status":{"const":"rejected"},"version":{"const":"noopolis.daimon.wake-result.v1"},"wakeId":{"maxLength":4096,"type":"string"}},"required":["version","status","agentId","wakeId","code"],"type":"object"},{"additionalProperties":false,"properties":{"agentId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"code":{"enum":["host_stopping","host_stopped","queued_wake_stopped","active_wake_aborted"]},"status":{"const":"stopped"},"version":{"const":"noopolis.daimon.wake-result.v1"},"wakeId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"}},"required":["version","status","agentId","wakeId","code"],"type":"object"},{"additionalProperties":false,"properties":{"agentId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"},"code":{"const":"engine_failed"},"status":{"const":"failed"},"version":{"const":"noopolis.daimon.wake-result.v1"},"wakeId":{"maxLength":4096,"minLength":1,"pattern":"\\S","type":"string"}},"required":["version","status","agentId","wakeId","code"],"type":"object"}]},"workAvailabilityResponseSchema":{"additionalProperties":false,"properties":{"agents":{"items":{"additionalProperties":false,"properties":{"agent_id":{"type":"string"},"budget":{"additionalProperties":false,"properties":{"agent_executions_remaining":{"minimum":0,"type":"integer"},"agent_executions_used":{"minimum":0,"type":"integer"},"agent_tokens_remaining":{"minimum":0,"type":"integer"},"agent_tokens_used":{"minimum":0,"type":"integer"},"armed":{"type":"boolean"},"epoch":{"type":"string"},"executions_remaining":{"minimum":0,"type":"integer"},"executions_used":{"minimum":0,"type":"integer"},"reason":{"type":"string"},"state":{"enum":["available","paused","stopped"]},"tokens_remaining":{"minimum":0,"type":"integer"},"tokens_used":{"minimum":0,"type":"integer"}},"required":["armed","epoch","state","executions_used","executions_remaining","tokens_used","tokens_remaining","agent_executions_used","agent_tokens_used"],"type":"object"},"deferred":{"minimum":0,"type":"integer"},"error":{"type":"string"},"pending":{"minimum":0,"type":"integer"},"running":{"type":"boolean"}},"required":["agent_id","pending","running","deferred","budget"],"type":"object"},"maxItems":32,"type":"array"},"drain":{"additionalProperties":false,"properties":{"since":{"type":"string"},"state":{"enum":["draining","drained"]}},"required":["state","since"],"type":"object"},"state":{"enum":["running","paused","stopped"]},"version":{"const":"noopolis.daimon.work-availability.v1"}},"required":["version","state","agents"],"type":"object"},"workBlockedSchema":{"additionalProperties":false,"properties":{"reason":{"enum":["operator_stop","ledger_unavailable","host_stopping","host_stopped","queue_full"]},"retry_after_ms":{"maximum":300000,"minimum":1000,"type":"integer"},"version":{"const":"noopolis.daimon.work-blocked.v1"}},"required":["version","reason","retry_after_ms"],"type":"object"}} diff --git a/src/runtime/daimon/contract-manifest.sha256 b/src/runtime/daimon/contract-manifest.sha256 index e0f8bcdf..87216ee7 100644 --- a/src/runtime/daimon/contract-manifest.sha256 +++ b/src/runtime/daimon/contract-manifest.sha256 @@ -1 +1 @@ -sha256:e39551277c6727c8807b1247e759f57addcee3f17f1405ebc927179647d64de6 +sha256:9f91388983cc5308137ba0259302b9faec75a9f0e032b2a031b6a774ff3f409f diff --git a/src/runtime/daimon/contractManifest.test.ts b/src/runtime/daimon/contractManifest.test.ts index 79355693..53559940 100644 --- a/src/runtime/daimon/contractManifest.test.ts +++ b/src/runtime/daimon/contractManifest.test.ts @@ -69,7 +69,7 @@ const manifest = () => ({ activeDeliveryIdempotency: "unbounded-until-terminal", terminalReceiptHorizon: 2_048, recovery: "at-least-once-with-stable-wake-id", concurrentSameAgentTurns: false, externalEffectsExactlyOnce: false }, - version: DAIMON_CONTRACT_MANIFEST_VERSION + version: "noopolis.daimon.runtime-contract-manifest.v5" }); const writeManifest = async (source: string): Promise => { @@ -96,6 +96,7 @@ describe("Daimon contract manifest", () => { contractManifestSha256: vendored.digest }); expect(vendored.digest).toBe(DAIMON_CONTRACT_MANIFEST_SHA256); + expect(vendored.manifest.version).toBe(DAIMON_CONTRACT_MANIFEST_VERSION); }); it("supports wake recording only when its exact section and consumed field appear together", () => { diff --git a/src/runtime/daimon/contractManifest.ts b/src/runtime/daimon/contractManifest.ts index e8073bb8..edb2bf09 100644 --- a/src/runtime/daimon/contractManifest.ts +++ b/src/runtime/daimon/contractManifest.ts @@ -9,9 +9,9 @@ import { DAIMON_PINNED_BROKER_DESCRIPTOR, DAIMON_PINNED_PORTABLE_DESCRIPTOR, DAI import { daimonContractManifestV6Schema } from "./contractManifestSchema.js"; export const DAIMON_CONTRACT_MANIFEST_VERSION = - "noopolis.daimon.runtime-contract-manifest.v5" as const; + "noopolis.daimon.runtime-contract-manifest.v6" as const; export const DAIMON_CONTRACT_MANIFEST_SHA256 = - "sha256:e39551277c6727c8807b1247e759f57addcee3f17f1405ebc927179647d64de6" as const; + "sha256:9f91388983cc5308137ba0259302b9faec75a9f0e032b2a031b6a774ff3f409f" as const; export const DAIMON_CONTRACT_MANIFEST_FILE = "contract-manifest.json"; export const DAIMON_CONTRACT_MANIFEST_DIGEST_FILE = "contract-manifest.sha256"; export const DAIMON_RUNTIME_HOME_ROOT = "/var/lib/spawnfile/instances/daimon"; @@ -76,7 +76,7 @@ export interface DaimonContractManifest { concurrentSameAgentTurns: false; externalEffectsExactlyOnce: false; }>; - readonly version: typeof DAIMON_CONTRACT_MANIFEST_VERSION | "noopolis.daimon.runtime-contract-manifest.v6"; + readonly version: typeof DAIMON_CONTRACT_MANIFEST_VERSION | "noopolis.daimon.runtime-contract-manifest.v5"; } export interface VerifiedDaimonContractManifest { @@ -165,7 +165,7 @@ export const parseDaimonContractManifest = (raw: unknown): DaimonContractManifes if (hasWakeMoments && !isDaimonWakeMoments(root.wakeMoments)) return fail("has an unsupported wakeMoments contract"); const configFields = hasWakeMoments ? [...expectedConfigFields, DAIMON_WAKE_MOMENTS.configField] : expectedConfigFields; if ( - (!v6 && root.version !== DAIMON_CONTRACT_MANIFEST_VERSION) || + (!v6 && root.version !== "noopolis.daimon.runtime-contract-manifest.v5") || !Array.isArray(root.supportedEngineKinds) || root.supportedEngineKinds.join("\0") !== engineKinds.join("\0") || !Array.isArray(root.consumedConfigFields) || @@ -228,7 +228,7 @@ export const parseDaimonContractManifest = (raw: unknown): DaimonContractManifes activeDeliveryIdempotency: "unbounded-until-terminal", terminalReceiptHorizon: 2_048, recovery: "at-least-once-with-stable-wake-id", concurrentSameAgentTurns: false, externalEffectsExactlyOnce: false }), - version: v6 ? "noopolis.daimon.runtime-contract-manifest.v6" : DAIMON_CONTRACT_MANIFEST_VERSION + version: v6 ? DAIMON_CONTRACT_MANIFEST_VERSION : "noopolis.daimon.runtime-contract-manifest.v5" }); }; diff --git a/src/runtime/daimon/contractManifestSchema.ts b/src/runtime/daimon/contractManifestSchema.ts index 0f25c691..e4daced5 100644 --- a/src/runtime/daimon/contractManifestSchema.ts +++ b/src/runtime/daimon/contractManifestSchema.ts @@ -1,13 +1,13 @@ import { z } from "zod"; -import manifestV5 from "./contract-manifest.json" with { type: "json" }; +import manifest from "./contract-manifest.json" with { type: "json" }; import { daimonEngineDescriptorsSchema } from "./engineDescriptorSchema.js"; export const DAIMON_CONTRACT_MANIFEST_V6_VERSION = "noopolis.daimon.runtime-contract-manifest.v6" as const; /** v6 retains every v5 section. Embedded protocol schemas remain JSON data. */ export const daimonContractManifestV6Schema = z.strictObject({ - ...Object.fromEntries(Object.keys(manifestV5).map((key) => [key, z.json()])), + ...Object.fromEntries(Object.keys(manifest).map((key) => [key, z.json()])), version: z.literal(DAIMON_CONTRACT_MANIFEST_V6_VERSION), engines: daimonEngineDescriptorsSchema, supportedEngineKinds: z.array(z.string().regex(/^[a-z][a-z0-9-]*$/u)).min(1), diff --git a/src/runtime/daimon/engine-descriptors.json b/src/runtime/daimon/engine-descriptors.json index b2d1e32c..0562a482 100644 --- a/src/runtime/daimon/engine-descriptors.json +++ b/src/runtime/daimon/engine-descriptors.json @@ -1,6 +1,6 @@ { "version": "noopolis.spawnfile.daimon-engine-descriptors.v1", - "sourceCommit": "e3eb84209cb6fd6bd8d6e9862697796df88887c4", + "sourceCommit": "5e8bffc10779838e3ff0b6687de06db6b6fde02a", "engines": { "agy": { "auth": { diff --git a/src/runtime/daimon/engine-descriptors.sha256 b/src/runtime/daimon/engine-descriptors.sha256 index 4852d7d9..97b8b6b1 100644 --- a/src/runtime/daimon/engine-descriptors.sha256 +++ b/src/runtime/daimon/engine-descriptors.sha256 @@ -1 +1 @@ -sha256:91a59eda693e1adbe1db91a107748266eb4ad4862ae5a3729bf69e02b5c76f30 +sha256:d9d0677a131f9165f273c9661eb8ea3c45dcfafa9ec5e116731c7f3fcc92443e diff --git a/src/runtime/daimon/engineDescriptors.generated.ts b/src/runtime/daimon/engineDescriptors.generated.ts index 5457bf09..3907a2c6 100644 --- a/src/runtime/daimon/engineDescriptors.generated.ts +++ b/src/runtime/daimon/engineDescriptors.generated.ts @@ -1,4 +1,4 @@ /* v8 ignore file -- generated data module */ // Generated by scripts/generate-daimon-engine-descriptors.ts from pinned Daimon static descriptors. Do not edit. -export const DAIMON_ENGINE_DESCRIPTOR_SOURCE_COMMIT = "e3eb84209cb6fd6bd8d6e9862697796df88887c4" as const; +export const DAIMON_ENGINE_DESCRIPTOR_SOURCE_COMMIT = "5e8bffc10779838e3ff0b6687de06db6b6fde02a" as const; export const DAIMON_V5_ENGINE_DESCRIPTORS = {"agy":{"auth":{"busEnvironment":"DBUS_SESSION_BUS_ADDRESS","format":null,"method":null,"provider":null,"realm":{"directoryMode":448,"durableMountPath":"/var/lib/spawnfile/daimon/agy-subscription-realm","fileMode":384,"maxUnlockBytes":4096,"unlockMountPath":"/var/lib/spawnfile/daimon/agy-unlock-secret","unlockSourceSlot":"agy-unlock-secret"},"staging":"secret-service"},"authKinds":["subscription"],"broker":null,"capabilities":{"broker":false,"nativeSandbox":false,"portableCredential":false,"secretService":true},"credentialMaterial":null,"homeDirectory":"","homeEnvironment":"ANTIGRAVITY_CLI_HOME","id":"agy","modelSelection":{"configurable":false,"declarationRequiresBroker":false,"defaults":{"model":null,"reasoningEffort":null},"models":null,"reasoningEfforts":[],"requiresPairedDeclaration":false},"requiredBinaries":["agy","dbus-daemon","gnome-keyring-daemon"],"sandbox":{"configurable":false},"training":{"inferenceGrants":null,"subject":{"isolation":null,"reason":"no verified per-agent sandbox","supported":false}}},"codex":{"auth":{"directoryMode":448,"fileMode":384,"fileName":"auth.json","format":{"accessTokenKeys":["access_token","accessToken","token"],"containerKey":"tokens","fallbackToRoot":true,"refreshTokenKeys":["refresh_token","refreshToken"]},"maxCredentialBytes":65536,"method":"codex","provider":"openai","realm":null,"staging":"portable-file"},"authKinds":["subscription"],"broker":null,"capabilities":{"broker":false,"nativeSandbox":true,"portableCredential":true,"secretService":false},"credentialMaterial":{"destinationRelativePath":".codex/auth.json","directoryMode":448,"fileMode":384,"sourceRelativePath":".daimon-inbound/codex-auth","sourceSlot":"codex-auth"},"homeDirectory":".codex","homeEnvironment":"CODEX_HOME","id":"codex","modelSelection":{"configurable":true,"declarationRequiresBroker":false,"defaults":{"model":null,"reasoningEffort":null},"models":{"kind":"non-empty-string"},"reasoningEfforts":["none","minimal","low","medium","high","xhigh","max","ultra","persistent"],"requiresPairedDeclaration":false},"piAuthMethod":"codex","piProvider":"openai-codex","piSourceProvider":"openai","requiredBinaries":["codex"],"sandbox":{"configurable":true,"policy":{"mode":"workspace-write","networkAccess":false,"webSearch":"disabled"}},"training":{"inferenceGrants":null,"subject":{"isolation":"native-sandbox","supported":true}}},"grok":{"auth":{"directoryMode":448,"fileMode":384,"fileName":"auth.json","format":{"accessTokenKeys":["key"],"entryKeyPattern":"^https://auth\\.x\\.ai::","expiresAtKey":"expires_at","refreshTokenKeys":["refresh_token"]},"maxCredentialBytes":65536,"method":"grok","provider":"xai","realm":{"agentCredentialRelativePath":".grok/auth.json","bootstrapMountPath":"/var/lib/spawnfile/daimon/grok-bootstrap-auth","bootstrapSourceSlot":"grok-auth","directoryMode":448,"durableMountPath":"/var/lib/spawnfile/daimon/grok-subscription-realm","fileMode":384,"maxCredentialBytes":65536},"staging":"broker-realm"},"authKinds":["subscription"],"broker":{"artifacts":{"arm64Sha256":"d0dc1c03197c3e90f09b66ad7c89b4f7b448d06dc84c03b247dce976d6018d6e","sourceSha256":"15836d7ad69f12ef581a6e5b8635c9db43b2177dac609160c0749d3d1fefbaa8","x64Sha256":"95aa9c272225e74ff9f45f54dde4bc30aee324e9ba24d8a876db9151c81b454d"},"backendSocketPath":"/run/daimon-engine-broker/backend.sock","bounds":{"capabilityBundleBytes":8196,"capabilityBytes":4096,"outputBytes":262144,"promptBytes":65536},"controlProtocolVersion":"noopolis.daimon.engine-broker.v4","controlSocketPath":"/run/daimon-engine-broker/control.sock","credentialHomePath":"/var/lib/spawnfile/daimon/grok-subscription-realm","grokCliArtifacts":{"arm64":{"bytes":136090504,"sha256":"39ab87666877d64ef3a40aa60fbe0c3b6a6acd7001b78fe60e2c76bb6cfc4a94","url":"https://storage.googleapis.com/grok-build-public-artifacts/cli/grok-1.0.34-linux-aarch64"},"x64":{"bytes":163035648,"sha256":"be5905e107d2b8b5f3c142d21ecfe4c8fd32a913d2fd551b788707930c4dc80d","url":"https://storage.googleapis.com/grok-build-public-artifacts/cli/grok-1.0.34-linux-x86_64"}},"grokCliBuild":"3736acbc8658","grokCliVersion":"1.0.34","grokExecutablePath":"/usr/local/bin/grok","identities":{"brokerUid":2100,"firstWorkerUid":2200,"organizationUid":2000},"inferenceGrants":{"bodyMembers":["messages","model","reasoning_effort","response_format","stream","stream_options"],"client":{"configSha256":{"grok-4.5":{"high":"ffbc33728b821e9854fbc7c93601e599225da421ecfd6ebf10d314afcc28d6f2","low":"a07f7436f1268bb399ec233c65d3b3d8fb99a11a1f175f8da1ca133c9367bc74","medium":"1f4c0d4dad1f3b09419b5739db6423a09e0049abc091594c64123a75dd53dfb9"},"grok-4.6":{"high":"5652656effa82f0c4f09cf8226b16e6140332a5a358b571194bb5563312367ac","low":"79314d039f787e4ebfec7dacf57adc969086b948f564dec008f0ed6367e6062f","medium":"6f538de0547c0c4e6a3f04ae08595ceadadabb06b75f6b6ee4c428744bb95cd8"},"grok-build":{"high":"98d16f2b7d12f4eb540d625c853e51d227933e204923e43e8b9b4176f10aca2c","low":"ca15c6a562a008227d39c51d3a3a83715663089b3784e8b46debb1fb67b3c4a1","medium":"01783fb6beadcf6f8486fff0836820ad43fab5662b812a907fe9cfdb83e9804d"}},"envKey":"DAIMON_INFERENCE_GRANT","modelId":"daimon-inference-grok"},"failureCodes":["auth_stale","grant_limit","invalid_request","unavailable"],"ledgerDedupeKey":["grant","request"],"ledgerVersion":"noopolis.daimon.inference-usage.v1","limits":{"maxRequests":64,"maxTokens":2000000},"maxInFlightRequestsPerGrant":1,"maxLiveGrants":8,"messageRoles":["system","user","assistant"],"purposes":["judge","optimizer"],"requestKinds":["request_inference_grant","release_inference_grant"],"tokenPrefix":"inference_","ttlMs":600000},"launcherSocketPath":"/run/daimon-engine-broker/launcher.sock","mcpFacade":{"host":"127.0.0.1","path":"/mcp","port":43124},"nativeAbiVersion":2,"nativeExecutablePath":"/opt/daimon/bin/daimon-engine-broker","projectionVersion":"noopolis.daimon.grok-broker-projection.v3","providerProxy":{"host":"127.0.0.1","port":43123},"registrationPath":"/etc/daimon-engine-broker/registrations.bin","runRequestBudget":{"countsCredentialRetries":true,"fileName":"run-requests.json","includesInferenceGrants":true,"maximumField":"maxRunRequests","storeField":"runRequestStore"},"serviceConfigPath":"/etc/daimon-engine-broker/service.json","serviceConfigVersions":["noopolis.daimon.engine-broker-service.v1","noopolis.daimon.engine-broker-service.v2","noopolis.daimon.engine-broker-service.v3"],"slotPreflightVersion":"noopolis.daimon.grok-slot-preflight.v2","slotRouting":{"controlCaller":"organization","key":"slot","repeatedAgentIds":true,"resetRequest":"reset_slot","resetResponse":"slot_reset","slotEnvironment":"DAIMON_ENGINE_BROKER_SLOT","turnStoreDirectory":"slot-{slot}","workersMayControl":false},"turnLimits":{"bounds":{"maxRequests":[1,48],"maxTokens":[1,10000000],"timeoutMs":[1000,3600000]},"keys":["maxRequests","maxTokens","timeoutMs"],"limitReasons":["tokens","requests","timeout","none"],"maxInFlightRequests":1,"missingUsageEstimate":{"inputBytesPerToken":2,"outputTokens":4096},"requestUsageMaxTokens":500000,"tokenCeilingOvershoot":"at-most-one-request","v1Defaults":{"maxRequests":32,"maxTokens":300000,"timeoutMs":240000},"wakeMayOnlyLower":true},"turnRecordVersions":["noopolis.daimon.engine-broker-turn.v1","noopolis.daimon.engine-broker-turn.v2"],"turnStorePath":"/var/lib/spawnfile/daimon/grok-subscription-realm/turns","wakeLimitEnvironment":{"maxTokens":"DAIMON_ENGINE_WAKE_TOKEN_CEILING","timeoutMs":"DAIMON_ENGINE_WAKE_TIMEOUT_MS"},"worker":{"clockedConfigSha256":{"grok-4.5":{"high":"907d8967960c342b442d6d256b2585f3c85bd846a78578f596f0b605403d6d34","low":"3c4f3515b21c1bffb3fb770e2ecb4b918b6c43d5e77c1fd47e1e6698d1fedee7","medium":"9117e12b2f3f6fa045799592969cbaae1c2f3b1ea79330badac8655b9b41dd7a"},"grok-4.6":{"high":"203744f6f0dfc0bc80cfb896880497edfd9b3de4dcf33060e8ef4d2ef5f220a7","low":"751f1dcd04983e5e5883df5a8fefa04f201e187e5ef1f344d3bf83f950830432","medium":"f1406f93a8091eb0c09e07321254a9c783a89b0bbf5548d9613d53a8d087a517"},"grok-build":{"high":"6efddadc82c38020d3351829e54bb09fa456cd6d76ea1247902794d82a4a3ffa","low":"a8c63ba910623a0686930c27db0733f4a2588c7fca9dd7da25c3f18027720ab5","medium":"6afcd2b90c0d19794f8c0d22147a0f011946a92e613f89dae98b0ca729313101"}},"configSha256":{"grok-4.5":{"high":"c63c3387ce92d94ec3f690abfe98942afcd7c9e17ff84816bbe751f340ab251f","low":"8247127c3625ff7c5d8d527a53596b89ec6557a821ac46cfd00bd122b90daff6","medium":"59288cee61297bb8c002097061a48f77b09d310754187a253ee089f7172a9155"},"grok-4.6":{"high":"65b0212564fb74042b1503d293fb8d3620276033264c0efade2a539ca09218e3","low":"ab58499ac32678097c146479896f2b8a8e2b0e39aea22dc0a60b6227e370538e","medium":"df1a5cc84346e7f6bf6090492fbd19faaefb42953e3bb2e8c6cbc0572242403f"},"grok-build":{"high":"a23724e00d670caee185ba7690d2daa868173e53905cf446f5329666f01ab4e3","low":"fb343f2809903f26d21681470943235031f946e99085542fd89555eb7782cbb5","medium":"8a587ef75c90eab70d19b24583e60051d6fba9d90c558839fdbb15588b4cc656"}},"defaultModel":"grok-4.6","defaultReasoningEffort":"low","home":{"directory":{"group":"worker","mode":1017,"uid":0},"organizationRuntimeHome":{"group":"worker","mode":456,"owner":"organization"},"privateTmp":{"mode":448,"owner":"worker","relativeToWorkerHome":"tmp"},"readOnlyFiles":{"gid":0,"mode":292,"names":["config.toml","managed_config.toml","requirements.toml","sandbox.toml","trusted_folders.toml"],"uid":0},"sandboxEvents":{"group":"broker","mode":416,"owner":"worker","relativePath":"sessions/sandbox-events.jsonl"},"sessionsDirectory":{"group":"worker","mode":1017,"relativePath":"sessions","uid":0},"sharedTmp":{"maxGroupExclusive":2200,"mode":1020,"otherMode":4,"paths":["/tmp","/var/tmp"],"uid":0},"spillDirectory":{"fileMode":416,"group":"worker","mode":1512,"owner":"organization","relativeToRuntimeHome":"tool-output"}},"maxTurns":48,"modelId":"daimon-broker-grok","models":["grok-4.6","grok-4.5","grok-build"],"reasoningEfforts":["low","medium","high"],"systemPromptSha256":"2c31c0085a54a4efbf9c0cf0b8124c56e47f38691b7f0c7fa233a74abaa8ddf8","taskClock":{"directoryMode":493,"directoryPath":"/run/daimon-engine-broker/task-clock/slot-0","fileMode":420,"ownerUid":2100,"preloadPath":"/usr/local/lib/daimon/libfaketime.so.1","rootDirectoryPath":"/run/daimon-engine-broker/task-clock","slotDirectoryPattern":"/run/daimon-engine-broker/task-clock/slot-{slot}","slotFilePattern":"/run/daimon-engine-broker/task-clock/slot-{slot}/faketime","timestampFilePath":"/run/daimon-engine-broker/task-clock/slot-0/faketime","version":"noopolis.daimon.grok-broker-task-clock.v2","workerView":"own-directory-visible-sibling-directories-denied"},"toolIds":["run_terminal_cmd","read_file","grep","list_dir","search_tool","use_tool"],"visibleTools":["grep","list_dir","read_file","run_terminal_command","search_tool","use_tool"]}},"capabilities":{"broker":true,"nativeSandbox":true,"portableCredential":true,"secretService":false},"credentialMaterial":{"destinationRelativePath":".grok/auth.json"},"homeDirectory":".grok","homeEnvironment":"GROK_HOME","id":"grok","modelSelection":{"configurable":true,"declarationRequiresBroker":true,"defaults":{"model":"grok-4.6","reasoningEffort":"low"},"models":{"kind":"enum","values":["grok-4.6","grok-4.5","grok-build"]},"reasoningEfforts":["low","medium","high"],"requiresPairedDeclaration":true},"requiredBinaries":["grok","daimon-engine-broker"],"sandbox":{"baseProfile":"strict","configurable":false,"denyPaths":{"canonicalAbsolute":true,"forbiddenCharacterPattern":"[\"\\\\\\u0000-\\u001f\\u007f*?[\\]]","rootAllowed":false,"trailingSlashAllowed":false},"profile":"daimon-strict","restrictNetwork":true},"training":{"inferenceGrants":{"bodyMembers":["messages","model","reasoning_effort","response_format","stream","stream_options"],"client":{"configSha256":{"grok-4.5":{"high":"ffbc33728b821e9854fbc7c93601e599225da421ecfd6ebf10d314afcc28d6f2","low":"a07f7436f1268bb399ec233c65d3b3d8fb99a11a1f175f8da1ca133c9367bc74","medium":"1f4c0d4dad1f3b09419b5739db6423a09e0049abc091594c64123a75dd53dfb9"},"grok-4.6":{"high":"5652656effa82f0c4f09cf8226b16e6140332a5a358b571194bb5563312367ac","low":"79314d039f787e4ebfec7dacf57adc969086b948f564dec008f0ed6367e6062f","medium":"6f538de0547c0c4e6a3f04ae08595ceadadabb06b75f6b6ee4c428744bb95cd8"},"grok-build":{"high":"98d16f2b7d12f4eb540d625c853e51d227933e204923e43e8b9b4176f10aca2c","low":"ca15c6a562a008227d39c51d3a3a83715663089b3784e8b46debb1fb67b3c4a1","medium":"01783fb6beadcf6f8486fff0836820ad43fab5662b812a907fe9cfdb83e9804d"}},"envKey":"DAIMON_INFERENCE_GRANT","modelId":"daimon-inference-grok"},"failureCodes":["auth_stale","grant_limit","invalid_request","unavailable"],"ledgerDedupeKey":["grant","request"],"ledgerVersion":"noopolis.daimon.inference-usage.v1","limits":{"maxRequests":64,"maxTokens":2000000},"maxInFlightRequestsPerGrant":1,"maxLiveGrants":8,"messageRoles":["system","user","assistant"],"purposes":["judge","optimizer"],"requestKinds":["request_inference_grant","release_inference_grant"],"tokenPrefix":"inference_","ttlMs":600000},"subject":{"isolation":"broker-worker","supported":true}}}} as const; diff --git a/src/runtime/daimon/engineDescriptors.test.ts b/src/runtime/daimon/engineDescriptors.test.ts index a197d290..47b66535 100644 --- a/src/runtime/daimon/engineDescriptors.test.ts +++ b/src/runtime/daimon/engineDescriptors.test.ts @@ -4,7 +4,7 @@ import { parse as parseYaml } from "yaml"; import Ajv2020 from "ajv/dist/2020.js"; import { afterEach, describe, expect, it, vi } from "vitest"; -import manifestV5 from "./contract-manifest.json" with { type: "json" }; +import manifest from "./contract-manifest.json" with { type: "json" }; import mirror from "./engine-descriptors.json" with { type: "json" }; import { DAIMON_ENGINE_DESCRIPTOR_SOURCE_COMMIT, DAIMON_V5_ENGINE_DESCRIPTORS } from "./engineDescriptors.generated.js"; import { parseDaimonContractManifest } from "./contractManifest.js"; @@ -13,8 +13,12 @@ import { parseDaimonEngineDescriptors } from "./engineDescriptorSchema.js"; import { createPiTestNode } from "../pi/testHelpers.js"; type Mutable = { -readonly [K in keyof T]: Mutable }; -const v6 = () => ({ ...structuredClone(manifestV5), version: DAIMON_CONTRACT_MANIFEST_V6_VERSION, - engines: structuredClone(DAIMON_V5_ENGINE_DESCRIPTORS) as Mutable }); +const v5 = () => { + const { engines: _engines, ...legacy } = structuredClone(manifest); + return { ...legacy, version: "noopolis.daimon.runtime-contract-manifest.v5" }; +}; +const v6 = () => ({ ...structuredClone(manifest), + engines: structuredClone(manifest.engines) as Mutable }); afterEach(() => { vi.doUnmock("./contract-manifest.json"); vi.resetModules(); }); describe("Daimon descriptor authority", () => { @@ -26,22 +30,24 @@ describe("Daimon descriptor authority", () => { expect(mirror.sourceCommit).toBe(registry.runtimes.daimon.ref); expect(DAIMON_ENGINE_DESCRIPTOR_SOURCE_COMMIT).toBe(mirror.sourceCommit); expect(DAIMON_V5_ENGINE_DESCRIPTORS).toEqual(mirror.engines); - expect(parseDaimonContractManifest(manifestV5).engines).toEqual(mirror.engines); - expect(parseDaimonContractManifest(manifestV5).supportedEngineKinds).toEqual(["agy", "codex", "grok"]); + expect(parseDaimonContractManifest(v5()).engines).toEqual(mirror.engines); + expect(parseDaimonContractManifest(v5()).supportedEngineKinds).toEqual(["agy", "codex", "grok"]); }); it("accepts v6 through both the portable JSON Schema and consumed-contract parser", () => { const ajv = new Ajv2020.default({ strict: false }); const validate = ajv.compile(DAIMON_CONTRACT_MANIFEST_V6_JSON_SCHEMA); expect(validate(v6()), JSON.stringify(validate.errors)).toBe(true); - expect(parseDaimonContractManifest(v6()).engines).toEqual(mirror.engines); + expect(manifest.version).toBe(DAIMON_CONTRACT_MANIFEST_V6_VERSION); + expect(parseDaimonContractManifest(manifest).engines).toEqual(manifest.engines); + expect(manifest.engines).toEqual(mirror.engines); const malformed = { ...v6(), engines: { ...v6().engines, codex: { ...v6().engines.codex, unknown: true } } }; expect(validate(malformed)).toBe(false); expect(() => parseDaimonContractManifest(malformed)).toThrow(/v6 schema/u); }); it("does not accept injected descriptors as v5 authority", () => { - expect(() => parseDaimonContractManifest({ ...manifestV5, engines: mirror.engines })).toThrow(/v5/u); + expect(() => parseDaimonContractManifest({ ...v5(), engines: mirror.engines })).toThrow(/v5/u); expect(() => parseDaimonContractManifest({ ...v6(), version: "noopolis.daimon.runtime-contract-manifest.v7" })).toThrow(/manifest/u); }); diff --git a/src/runtime/install.test.ts b/src/runtime/install.test.ts index bf4a58b5..ef9bdfd7 100644 --- a/src/runtime/install.test.ts +++ b/src/runtime/install.test.ts @@ -20,17 +20,17 @@ describe("runtime install selection", () => { it("resolves Daimon install selection from the pinned runtime image", async () => { await expect(resolveRuntimeInstallSelection("daimon")).resolves.toEqual({ capabilityReceipt: undefined, - capabilityReceipts: { amd64: "sha256:8730f5e2f03bf66ea89906da0b91b9efbcf23b6abb550a8b82c00b0226d53072", arm64: "sha256:17bbc1fe023423342423f009871fa017f31a306941bac96a358b2fb0a5e09558" }, - contractManifestSha256: "sha256:e39551277c6727c8807b1247e759f57addcee3f17f1405ebc927179647d64de6", - digest: "sha256:2a98082125bd14dc907fc9b126069b1735e66315f78439d1bd7b27dc258c7ee4", + capabilityReceipts: { amd64: "sha256:c66fa10b3d186830bba369b96f8636ec8fe3c28afa9724beadf5ed983ebb4b09", arm64: "sha256:7deca0034e8f81fc7ec0cb822f1251a98c98a4ccfbad36b62ffc53fea66ae8fe" }, + contractManifestSha256: "sha256:9f91388983cc5308137ba0259302b9faec75a9f0e032b2a031b6a774ff3f409f", + digest: "sha256:a8f385f57d06f81b0f64e61b2a455e9753216898eff333174da799c5d0aa7184", ecosystem: "node", image: "noopolis/spawnfile-runtime-daimon", installHint: "Copy a pinned Daimon runtime image.", kind: "container_image", runtimeName: "daimon", - runtimeRef: "e3eb84209cb6fd6bd8d6e9862697796df88887c4", + runtimeRef: "5e8bffc10779838e3ff0b6687de06db6b6fde02a", selectionSource: "runtime_registry_install", - tag: "0.2.8-e3eb842" + tag: "0.2.9-5e8bffc" }); });