From adbbba7206112c1b0c7035a07d72bb3d18b008ce Mon Sep 17 00:00:00 2001 From: Copybara Date: Sun, 20 Sep 2026 06:02:50 +0000 Subject: [PATCH 01/29] Project import generated by Copybara. FolderOrigin-RevId: b31318e06ac415532fa16ad18652f8fb1fced134 --- .repository-projection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index f41271d..cab5abf 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,9 +3,9 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "3acc63c2c655c22b5ca7f2d55b63a6b87eced2bc", + "sourceSha": "b31318e06ac415532fa16ad18652f8fb1fced134", "destinationRepository": "dx-corp/examples", - "priorProjectedBase": "9768ae97ce25b0a40c04d8bf39485b94e630bdd9", + "priorProjectedBase": "d506e59cedb3962f15ae4fc5e4bcabad74eedb56", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", "toolDigest": "c8000985e1bd708bf1f8754b27cc1a2aad67af10ee23cf5317bd1fba670b4456", "contentDigest": "2c0ad720579687a98503a3b562d92a9b5db4e12ada15e8a601a4cc8794273ec4", From 8e6c1682020cc0f5b26d83dcabf9cf46019f5db4 Mon Sep 17 00:00:00 2001 From: Copybara Date: Sun, 20 Sep 2026 16:02:00 +0000 Subject: [PATCH 02/29] Project import generated by Copybara. FolderOrigin-RevId: 9ffaa22bee2d27571af1dfd4dcd9d05a5668ae78 --- .repository-projection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repository-projection.json b/.repository-projection.json index cab5abf..d8a833e 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,7 +3,7 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "b31318e06ac415532fa16ad18652f8fb1fced134", + "sourceSha": "9ffaa22bee2d27571af1dfd4dcd9d05a5668ae78", "destinationRepository": "dx-corp/examples", "priorProjectedBase": "d506e59cedb3962f15ae4fc5e4bcabad74eedb56", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", From 4a8564ca941bdc542e569ca740e5c248594bf66e Mon Sep 17 00:00:00 2001 From: Copybara Date: Sun, 20 Sep 2026 16:42:38 +0000 Subject: [PATCH 03/29] Project import generated by Copybara. FolderOrigin-RevId: 67f00d037a06934e42acff64499f0bfa518e220e --- .repository-projection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repository-projection.json b/.repository-projection.json index d8a833e..174669f 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,7 +3,7 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "9ffaa22bee2d27571af1dfd4dcd9d05a5668ae78", + "sourceSha": "67f00d037a06934e42acff64499f0bfa518e220e", "destinationRepository": "dx-corp/examples", "priorProjectedBase": "d506e59cedb3962f15ae4fc5e4bcabad74eedb56", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", From f13d2299d2b5192fc1c99c8309639a60b2c1a8cb Mon Sep 17 00:00:00 2001 From: Copybara Date: Sun, 20 Sep 2026 18:14:54 +0000 Subject: [PATCH 04/29] Project import generated by Copybara. FolderOrigin-RevId: 0274e34d132f6b00a9c72841e39eda43084db5d4 --- .repository-projection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repository-projection.json b/.repository-projection.json index 174669f..cf3be78 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,7 +3,7 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "67f00d037a06934e42acff64499f0bfa518e220e", + "sourceSha": "0274e34d132f6b00a9c72841e39eda43084db5d4", "destinationRepository": "dx-corp/examples", "priorProjectedBase": "d506e59cedb3962f15ae4fc5e4bcabad74eedb56", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", From 7a0053fed139d831a5e0590bdd6744a94938bbc3 Mon Sep 17 00:00:00 2001 From: Copybara Date: Sun, 20 Sep 2026 20:25:49 +0000 Subject: [PATCH 05/29] Project import generated by Copybara. FolderOrigin-RevId: 8420a1f8c5fdd07a3d2d4d2a46e0db0bb6bbb352 --- .repository-projection.json | 8 ++-- scripts/distribution-validation.mjs | 61 +++++++++++++++++++++++++++-- 2 files changed, 62 insertions(+), 7 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index cf3be78..d8c8284 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "0274e34d132f6b00a9c72841e39eda43084db5d4", + "sourceSha": "8420a1f8c5fdd07a3d2d4d2a46e0db0bb6bbb352", "destinationRepository": "dx-corp/examples", - "priorProjectedBase": "d506e59cedb3962f15ae4fc5e4bcabad74eedb56", + "priorProjectedBase": "6a3ad1a8f8681261e01a40a6f2d91b2651e79b80", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", - "toolDigest": "c8000985e1bd708bf1f8754b27cc1a2aad67af10ee23cf5317bd1fba670b4456", - "contentDigest": "2c0ad720579687a98503a3b562d92a9b5db4e12ada15e8a601a4cc8794273ec4", + "toolDigest": "de718162d050963e0c04ca9cbc0e38b1db545e838e587f949bcd9fd8aded6bcd", + "contentDigest": "d8e22f9a88e97248ddc8bf399e65925881b71d35d75c6326cdf10a991b273856", "publicationEligible": true } diff --git a/scripts/distribution-validation.mjs b/scripts/distribution-validation.mjs index 9cc6486..84a0515 100644 --- a/scripts/distribution-validation.mjs +++ b/scripts/distribution-validation.mjs @@ -6,9 +6,20 @@ import { join, relative, resolve } from "node:path"; import { pathToFileURL } from "node:url"; import { parseArgs } from "node:util"; -const NAMES = new Set(["endpoint", "private-runner", "private-deployment", "api", "examples", "plugins"]); +const NAMES = new Set(["endpoint", "private-runner", "private-deployment", "api", "examples", "plugins", "capobara"]); const SHA = /^[0-9a-f]{40}$/; const HEX = /^[0-9a-f]{64}$/; +// `toolDigest` is the one provenance field with two legitimate shapes. Node +// hashes the contents of its own TOOL_INPUTS script list, giving a 64-hex +// SHA-256; Capobara embeds the git tree id of `rust/tools/capobara`, giving a +// 40-hex object name. Both are valid "the tool that ran this matches the tool +// committed at this revision" proofs, and the Rust side's +// `git::is_tree_id_or_digest` accepts both widths for exactly this reason -- +// this predicate is its twin and must stay in step with it. A receipt written +// by either implementation has to validate here, or a clone of +// `dx-corp/capobara` fails `invalid provenance toolDigest` against a +// perfectly correct tree. +const TOOL_DIGEST = /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/; const PROTO = [ "common/v1/analytics.proto", "common/v1/authz.proto", "common/v1/classification.proto", "common/v1/delivery.proto", "common/v1/entity.proto", "common/v1/risk.proto", "common/v1/surface.proto", @@ -82,7 +93,8 @@ export async function validateProvenance(name, root) { requireValue(provenance.projection === name && provenance.sourceRepository === "dx-corp/mono" && provenance.destinationRepository === `dx-corp/${name}`, "projection provenance identity mismatch"); requireValue(SHA.test(provenance.sourceSha) && SHA.test(provenance.priorProjectedBase), "projection SHAs are invalid"); - for (const key of ["definitionDigest", "toolDigest", "contentDigest"]) requireValue(HEX.test(provenance[key]), `invalid provenance ${key}`); + for (const key of ["definitionDigest", "contentDigest"]) requireValue(HEX.test(provenance[key]), `invalid provenance ${key}`); + requireValue(TOOL_DIGEST.test(provenance.toolDigest), "invalid provenance toolDigest"); requireValue(typeof provenance.publicationEligible === "boolean", "invalid publication eligibility"); return provenance; } @@ -244,6 +256,49 @@ async function validatePlugins(root, files) { for (const path of files) requireValue(!/(?:prompt-audit|session-history|product-kit)/i.test(path), `private plugin surface: ${path}`); } +// `capobara` is admitted here rather than routed around this validation by +// the workflow's `matrix.name == 'capobara'` condition. That condition only +// governs the `sync` job; `node scripts/projections/verify-catalog.mjs +// --validate` -- the `repository-projections` component's own CI gate -- +// builds and validates *every* catalog entry, and `validate.mjs` admits any +// name the catalog holds, so a catalog entry with no validator here fails +// that gate on `unsupported distribution: capobara`. +// +// The compile proof for the projected crate lives in the crate's own +// `tests/standalone_build.rs`, which copies it out of the workspace and runs +// `cargo build --locked`. Repeating that here would add a full dependency +// build to every catalog verification, so this checks the standalone +// closure without compiling: the manifest, the crate-root lockfile and the +// single-package workspace that the projection has to produce, plus the +// internal surfaces it must not carry. +async function validateCapobara(root, files) { + for (const required of ["Cargo.toml", "Cargo.lock", "README.md", "build.rs", "src/main.rs", "src/lib.rs"]) { + requireValue(files.includes(required), `capobara is missing ${required}`); + } + for (const path of files) { + requireValue(!/^scripts\//.test(path), `capobara contains an internal surface: ${path}`); + requireValue(!/^tests\/fixtures\/definitions\//.test(path), `capobara contains an excluded fixture: ${path}`); + } + const manifest = await readFile(join(root, "Cargo.toml"), "utf8"); + requireValue(!/\bworkspace\s*=\s*true/.test(manifest), "capobara Cargo.toml still inherits from the Mono workspace"); + // Resolution must include dependencies here: with `--no-deps` nothing is + // resolved, so `--locked` has nothing to compare and a stale lockfile + // passes. With the full graph, `--locked` fails when the projected + // crate-root lockfile does not match the projected manifest, which is the + // failure this projection is most exposed to -- the standalone lockfile is + // generated separately from the workspace one and can go stale without any + // Mono build noticing. + // + // This resolves all 178 locked packages, so on a cold runner it fetches the + // crates.io index and downloads every `.crate`. That is a network-dependent + // step in the component's CI gate; the component already declares `rust` in + // `ci.test.tools`, and nothing cheaper discriminates (see above). + const metadata = JSON.parse(run("cargo", ["metadata", "--locked", "--format-version", "1"], root)); + requireValue(metadata.workspace_members.length === 1, "capobara standalone workspace gained a member"); + const member = metadata.packages.find(pkg => pkg.id === metadata.workspace_members[0]); + requireValue(member?.name === "capobara", "capobara standalone workspace member is not the crate"); +} + export async function validateDistribution({ name, target }) { requireValue(NAMES.has(name), `unsupported distribution: ${name}`); const root = resolve(target); @@ -252,7 +307,7 @@ export async function validateDistribution({ name, target }) { await validateProvenance(name, root); const validators = { endpoint: validateEndpoint, "private-runner": validateRunner, "private-deployment": validateDeployment, - api: validateApi, examples: validateExamples, plugins: validatePlugins, + api: validateApi, examples: validateExamples, plugins: validatePlugins, capobara: validateCapobara, }; await validators[name](root, files); return { name, target: root, files: files.length, valid: true }; From 3e61255a1654f140c34f2575f3ff5ecb58d411a7 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Sun, 20 Sep 2026 21:24:22 +0000 Subject: [PATCH 06/29] chore: project examples from Mono a2e8b231b208 --- .repository-projection.json | 8 ++++---- scripts/distribution-validation.mjs | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index d8c8284..9f6d836 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "8420a1f8c5fdd07a3d2d4d2a46e0db0bb6bbb352", + "sourceSha": "a2e8b231b208f9e30b0a115eb132176e1e7c301a", "destinationRepository": "dx-corp/examples", - "priorProjectedBase": "6a3ad1a8f8681261e01a40a6f2d91b2651e79b80", + "priorProjectedBase": "f4775eaf5000a722d9e754b107797a181d8e823d", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", - "toolDigest": "de718162d050963e0c04ca9cbc0e38b1db545e838e587f949bcd9fd8aded6bcd", - "contentDigest": "d8e22f9a88e97248ddc8bf399e65925881b71d35d75c6326cdf10a991b273856", + "toolDigest": "8a4412f3a379ca0bd1cfea9bff69cc46773c6d1f", + "contentDigest": "6a0afd64349e428a9c866600b11f7d0967ef9c5889676882fbd8828677089f32", "publicationEligible": true } diff --git a/scripts/distribution-validation.mjs b/scripts/distribution-validation.mjs index 84a0515..13c5b1b 100644 --- a/scripts/distribution-validation.mjs +++ b/scripts/distribution-validation.mjs @@ -21,10 +21,12 @@ const HEX = /^[0-9a-f]{64}$/; // perfectly correct tree. const TOOL_DIGEST = /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/; const PROTO = [ + "agentruntime/v1/runtime.proto", "agents/v1/agents.proto", "codex/v1/codex.proto", "common/v1/analytics.proto", "common/v1/authz.proto", "common/v1/classification.proto", - "common/v1/delivery.proto", "common/v1/entity.proto", "common/v1/risk.proto", "common/v1/surface.proto", - "connectors/v1/connectors.proto", "console/v1/console.proto", "deixic/v1/deixic.proto", - "memory/v1/memory.proto", "meter/v1/meter.proto", "orbcontrol/v1/orb_control.proto", + "common/v1/delivery.proto", "common/v1/entity.proto", "common/v1/risk.proto", + "common/v1/surface.proto", "connectors/v1/connectors.proto", "console/v1/console.proto", + "deixic/v1/deixic.proto", "memory/v1/memory.proto", "meter/v1/meter.proto", + "objectives/v1/objectives.proto", "orbcontrol/v1/orb_control.proto", "platform/v1/platform.proto", "remoterunner/v1/remoterunner.proto", "toolexecution/v1/toolexecution.proto", "traces/v1/traces.proto", "vfs/v1/filesystem.proto", ].sort(); @@ -256,13 +258,11 @@ async function validatePlugins(root, files) { for (const path of files) requireValue(!/(?:prompt-audit|session-history|product-kit)/i.test(path), `private plugin surface: ${path}`); } -// `capobara` is admitted here rather than routed around this validation by -// the workflow's `matrix.name == 'capobara'` condition. That condition only -// governs the `sync` job; `node scripts/projections/verify-catalog.mjs -// --validate` -- the `repository-projections` component's own CI gate -- -// builds and validates *every* catalog entry, and `validate.mjs` admits any -// name the catalog holds, so a catalog entry with no validator here fails -// that gate on `unsupported distribution: capobara`. +// `capobara` is admitted here like every other catalog entry: `validate.mjs` +// admits any name the catalog holds, and the `sync` job validates every +// prepared projection between Capobara's dry run and its real run, so a +// catalog entry with no validator here fails its publication on +// `unsupported distribution: capobara`. // // The compile proof for the projected crate lives in the crate's own // `tests/standalone_build.rs`, which copies it out of the workspace and runs From 19b801a17525442ccd651c66459251404beb2f4c Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Sun, 20 Sep 2026 22:53:05 +0000 Subject: [PATCH 07/29] chore: project examples from Mono cc1e1c0a4251 --- .repository-projection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 9f6d836..c45ed97 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,9 +3,9 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "a2e8b231b208f9e30b0a115eb132176e1e7c301a", + "sourceSha": "cc1e1c0a42519977b42d956cc61e4624197a33e8", "destinationRepository": "dx-corp/examples", - "priorProjectedBase": "f4775eaf5000a722d9e754b107797a181d8e823d", + "priorProjectedBase": "4bcc27037e5ffdc795672dfc5f0ca25bf3f72031", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", "toolDigest": "8a4412f3a379ca0bd1cfea9bff69cc46773c6d1f", "contentDigest": "6a0afd64349e428a9c866600b11f7d0967ef9c5889676882fbd8828677089f32", From 2b5ae00b22c1b119d9589c6ac854bc61e41503ec Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Mon, 21 Sep 2026 00:21:37 +0000 Subject: [PATCH 08/29] chore: project examples from Mono 9b559bc70e7d --- .repository-projection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repository-projection.json b/.repository-projection.json index c45ed97..9dfdd1c 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,7 +3,7 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "cc1e1c0a42519977b42d956cc61e4624197a33e8", + "sourceSha": "9b559bc70e7d8afc723d2ac67c8c62fe0cfbdeeb", "destinationRepository": "dx-corp/examples", "priorProjectedBase": "4bcc27037e5ffdc795672dfc5f0ca25bf3f72031", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", From f4f6c7e47239b81fb02c0a26379a3f06f5b9310c Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Mon, 21 Sep 2026 01:07:24 +0000 Subject: [PATCH 09/29] chore: project examples from Mono 78799bd5ae75 --- .repository-projection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repository-projection.json b/.repository-projection.json index 9dfdd1c..ce661cb 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,7 +3,7 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "9b559bc70e7d8afc723d2ac67c8c62fe0cfbdeeb", + "sourceSha": "78799bd5ae75fdb86a0e0f8a56b5ce891fe42e71", "destinationRepository": "dx-corp/examples", "priorProjectedBase": "4bcc27037e5ffdc795672dfc5f0ca25bf3f72031", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", From a671a32dcfe0dd80b55d73b42c3dd148473a1f10 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Mon, 21 Sep 2026 02:39:25 +0000 Subject: [PATCH 10/29] chore: project examples from Mono 9a003786d767 --- .repository-projection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index ce661cb..a4be255 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,9 +3,9 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "78799bd5ae75fdb86a0e0f8a56b5ce891fe42e71", + "sourceSha": "9a003786d7679e9029fa077557bc7ab4d00eb48f", "destinationRepository": "dx-corp/examples", - "priorProjectedBase": "4bcc27037e5ffdc795672dfc5f0ca25bf3f72031", + "priorProjectedBase": "d374b5f645e256b269202cd343d532bb8476c8a7", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", "toolDigest": "8a4412f3a379ca0bd1cfea9bff69cc46773c6d1f", "contentDigest": "6a0afd64349e428a9c866600b11f7d0967ef9c5889676882fbd8828677089f32", From 8e56b55c44786bc77583dad6caee4e19db0c4bf4 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Mon, 21 Sep 2026 03:17:55 +0000 Subject: [PATCH 11/29] chore: project examples from Mono 511bd2305f5a --- .repository-projection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index a4be255..5ea6c5d 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "9a003786d7679e9029fa077557bc7ab4d00eb48f", + "sourceSha": "511bd2305f5a92cfbedb91208d7bc0820fda29b5", "destinationRepository": "dx-corp/examples", "priorProjectedBase": "d374b5f645e256b269202cd343d532bb8476c8a7", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", - "toolDigest": "8a4412f3a379ca0bd1cfea9bff69cc46773c6d1f", + "toolDigest": "e9fc82741fdf4a797b076d29d51e14aced32368b", "contentDigest": "6a0afd64349e428a9c866600b11f7d0967ef9c5889676882fbd8828677089f32", "publicationEligible": true } From 4ee0c323c7090257bcc798f39348c3cdb757edee Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Mon, 21 Sep 2026 06:22:39 +0000 Subject: [PATCH 12/29] chore: project examples from Mono ad7b9df0b712 --- .repository-projection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 5ea6c5d..493893a 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "511bd2305f5a92cfbedb91208d7bc0820fda29b5", + "sourceSha": "ad7b9df0b7129a2fe8a6cda64eed199b0ea9a748", "destinationRepository": "dx-corp/examples", "priorProjectedBase": "d374b5f645e256b269202cd343d532bb8476c8a7", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", - "toolDigest": "e9fc82741fdf4a797b076d29d51e14aced32368b", + "toolDigest": "1885e6c68d4a94f6633f0a96aecfbe92501547e6", "contentDigest": "6a0afd64349e428a9c866600b11f7d0967ef9c5889676882fbd8828677089f32", "publicationEligible": true } From 2cfc1c7c9bc71fffcf57e9d561d0eae92756834c Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Mon, 21 Sep 2026 06:53:10 +0000 Subject: [PATCH 13/29] chore: project examples from Mono 3a95acea6719 --- .repository-projection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repository-projection.json b/.repository-projection.json index 493893a..173c7e2 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,7 +3,7 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "ad7b9df0b7129a2fe8a6cda64eed199b0ea9a748", + "sourceSha": "3a95acea6719539cd068e54ad31208582b6e2bc3", "destinationRepository": "dx-corp/examples", "priorProjectedBase": "d374b5f645e256b269202cd343d532bb8476c8a7", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", From 13dbab947e2c3793d938653f0c9006045aa4fef2 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Mon, 21 Sep 2026 08:02:59 +0000 Subject: [PATCH 14/29] chore: project examples from Mono c16f3515c56a --- .repository-projection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repository-projection.json b/.repository-projection.json index 173c7e2..c713b71 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,7 +3,7 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "3a95acea6719539cd068e54ad31208582b6e2bc3", + "sourceSha": "c16f3515c56a8ad5f531ab9b7cba7f9493e579bf", "destinationRepository": "dx-corp/examples", "priorProjectedBase": "d374b5f645e256b269202cd343d532bb8476c8a7", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", From 0a7cac7884eea0780da9cebe6f79bb9eda246664 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Mon, 21 Sep 2026 09:36:12 +0000 Subject: [PATCH 15/29] chore: project examples from Mono 4ab4845398fd --- .repository-projection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index c713b71..f0cfeed 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "c16f3515c56a8ad5f531ab9b7cba7f9493e579bf", + "sourceSha": "4ab4845398fdca60f84eb815733b8e2361b4856d", "destinationRepository": "dx-corp/examples", "priorProjectedBase": "d374b5f645e256b269202cd343d532bb8476c8a7", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", - "toolDigest": "1885e6c68d4a94f6633f0a96aecfbe92501547e6", + "toolDigest": "f58d71f023a4f0a27d77cb96dcc5348a40816d0b", "contentDigest": "6a0afd64349e428a9c866600b11f7d0967ef9c5889676882fbd8828677089f32", "publicationEligible": true } From a996422a3d142fde6f8aaa77ea8fb9eead2ca63f Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Tue, 22 Sep 2026 01:04:18 +0000 Subject: [PATCH 16/29] chore: project examples from Mono 43ad52f7bcc9 --- .repository-projection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index f0cfeed..56fe688 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,9 +3,9 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "4ab4845398fdca60f84eb815733b8e2361b4856d", + "sourceSha": "43ad52f7bcc9498f3f63ad108e528eb210107a86", "destinationRepository": "dx-corp/examples", - "priorProjectedBase": "d374b5f645e256b269202cd343d532bb8476c8a7", + "priorProjectedBase": "cb7c44b469a050c1ca6ee37deb30f57e2dc3243f", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", "toolDigest": "f58d71f023a4f0a27d77cb96dcc5348a40816d0b", "contentDigest": "6a0afd64349e428a9c866600b11f7d0967ef9c5889676882fbd8828677089f32", From 28ce2c41bd71cbd2f0ed02604415888d5c438a95 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Tue, 22 Sep 2026 02:38:32 +0000 Subject: [PATCH 17/29] chore: project examples from Mono 2df44a8283c0 --- .repository-projection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repository-projection.json b/.repository-projection.json index 56fe688..69454dd 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,7 +3,7 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "43ad52f7bcc9498f3f63ad108e528eb210107a86", + "sourceSha": "2df44a8283c07c0ba875174e70d2aaabb72d19cc", "destinationRepository": "dx-corp/examples", "priorProjectedBase": "cb7c44b469a050c1ca6ee37deb30f57e2dc3243f", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", From 2626ff19fad3ab4aee30523006775213ab43b43c Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Tue, 22 Sep 2026 05:09:30 +0000 Subject: [PATCH 18/29] chore: project examples from Mono f6e0aa99e756 --- .repository-projection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 69454dd..59ffc6c 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,9 +3,9 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "2df44a8283c07c0ba875174e70d2aaabb72d19cc", + "sourceSha": "f6e0aa99e756a677a1f035d6825462abd1fffe0c", "destinationRepository": "dx-corp/examples", - "priorProjectedBase": "cb7c44b469a050c1ca6ee37deb30f57e2dc3243f", + "priorProjectedBase": "075d06f3c623916a833a0d16063c63dbb93b8a0a", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", "toolDigest": "f58d71f023a4f0a27d77cb96dcc5348a40816d0b", "contentDigest": "6a0afd64349e428a9c866600b11f7d0967ef9c5889676882fbd8828677089f32", From 9f5b41d10e937c055a2d297ec99972960490052d Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Tue, 22 Sep 2026 06:46:24 +0000 Subject: [PATCH 19/29] chore: project examples from Mono 3457dcec675e --- .repository-projection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 59ffc6c..45458e3 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,9 +3,9 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "f6e0aa99e756a677a1f035d6825462abd1fffe0c", + "sourceSha": "3457dcec675e2f625d5c4fd2b029354a6c999872", "destinationRepository": "dx-corp/examples", - "priorProjectedBase": "075d06f3c623916a833a0d16063c63dbb93b8a0a", + "priorProjectedBase": "ac881ff9fe91f4202e75f0703a5a474798d8ebb7", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", "toolDigest": "f58d71f023a4f0a27d77cb96dcc5348a40816d0b", "contentDigest": "6a0afd64349e428a9c866600b11f7d0967ef9c5889676882fbd8828677089f32", From 57da914cc90ce5cbf3b78cd8d3e28006f3bd85fe Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Tue, 22 Sep 2026 18:08:23 +0000 Subject: [PATCH 20/29] chore: project examples from Mono 2102d45bdf4c --- .repository-projection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 45458e3..3d13cd4 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,9 +3,9 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "3457dcec675e2f625d5c4fd2b029354a6c999872", + "sourceSha": "2102d45bdf4cf6222425e5b03441015fa8b56026", "destinationRepository": "dx-corp/examples", - "priorProjectedBase": "ac881ff9fe91f4202e75f0703a5a474798d8ebb7", + "priorProjectedBase": "6b9264e1fbc861dc40ea08751b7de88e95dd7a25", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", "toolDigest": "f58d71f023a4f0a27d77cb96dcc5348a40816d0b", "contentDigest": "6a0afd64349e428a9c866600b11f7d0967ef9c5889676882fbd8828677089f32", From a8bdc07d744bd65d79557210213bfd3588fc3e10 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Wed, 23 Sep 2026 18:02:27 +0000 Subject: [PATCH 21/29] chore: project examples from Mono 0135ea0655c8 --- .repository-projection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 3d13cd4..5871fa7 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,9 +3,9 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "2102d45bdf4cf6222425e5b03441015fa8b56026", + "sourceSha": "0135ea0655c81b1b2a8e7fb5e4fb00d827607b35", "destinationRepository": "dx-corp/examples", - "priorProjectedBase": "6b9264e1fbc861dc40ea08751b7de88e95dd7a25", + "priorProjectedBase": "6c475aa670e1fec7c7b406c7d731e6d96b37a129", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", "toolDigest": "f58d71f023a4f0a27d77cb96dcc5348a40816d0b", "contentDigest": "6a0afd64349e428a9c866600b11f7d0967ef9c5889676882fbd8828677089f32", From e6ce56abfcc98c170b6ae367ea9f0c8e1ecf1ad6 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Wed, 23 Sep 2026 18:33:06 +0000 Subject: [PATCH 22/29] chore: project examples from Mono 7f322bbd03a5 --- .repository-projection.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 5871fa7..835388b 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "0135ea0655c81b1b2a8e7fb5e4fb00d827607b35", + "sourceSha": "7f322bbd03a590ed5a478b12303369ea8d48c00a", "destinationRepository": "dx-corp/examples", - "priorProjectedBase": "6c475aa670e1fec7c7b406c7d731e6d96b37a129", + "priorProjectedBase": "316ede54390995c61fd36ef90b006634789fc143", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", - "toolDigest": "f58d71f023a4f0a27d77cb96dcc5348a40816d0b", + "toolDigest": "898e8657d9153a2a51d7c283bf83bb3350b5d1e6", "contentDigest": "6a0afd64349e428a9c866600b11f7d0967ef9c5889676882fbd8828677089f32", "publicationEligible": true } From 8a925fce3fe588d1950ebc537812827384f38512 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Wed, 23 Sep 2026 19:29:40 +0000 Subject: [PATCH 23/29] chore: project examples from Mono c3fe404d7c05 --- .repository-projection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repository-projection.json b/.repository-projection.json index 835388b..aa3a04e 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,7 +3,7 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "7f322bbd03a590ed5a478b12303369ea8d48c00a", + "sourceSha": "c3fe404d7c05f9d3b39f6e0d56659c6f020c7159", "destinationRepository": "dx-corp/examples", "priorProjectedBase": "316ede54390995c61fd36ef90b006634789fc143", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", From 6f13acea9053dd1ab99123b039ef907599e3fd5b Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Wed, 23 Sep 2026 21:33:52 +0000 Subject: [PATCH 24/29] chore: project examples from Mono 53a87ef3a96f --- .repository-projection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repository-projection.json b/.repository-projection.json index aa3a04e..229f839 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,7 +3,7 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "c3fe404d7c05f9d3b39f6e0d56659c6f020c7159", + "sourceSha": "53a87ef3a96f42ee4cbc1e526865c44db3be67d4", "destinationRepository": "dx-corp/examples", "priorProjectedBase": "316ede54390995c61fd36ef90b006634789fc143", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", From 50318efbc2649219eee0c52b8899074c03104e46 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Thu, 24 Sep 2026 03:39:22 +0000 Subject: [PATCH 25/29] chore: project examples from Mono 0405bd95fc12 --- .repository-projection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repository-projection.json b/.repository-projection.json index 229f839..9220a6d 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,7 +3,7 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "53a87ef3a96f42ee4cbc1e526865c44db3be67d4", + "sourceSha": "0405bd95fc12ed2ca79294c8a91340aec60f7f17", "destinationRepository": "dx-corp/examples", "priorProjectedBase": "316ede54390995c61fd36ef90b006634789fc143", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", From 6c6d7ad3759d4aa9468ddcd0376c8c982e219e7a Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Thu, 24 Sep 2026 05:09:16 +0000 Subject: [PATCH 26/29] chore: project examples from Mono 916d407917e8 --- .repository-projection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 9220a6d..3e77b0a 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,9 +3,9 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "0405bd95fc12ed2ca79294c8a91340aec60f7f17", + "sourceSha": "916d407917e806df56819c92b7ebc8c9cdcef9b5", "destinationRepository": "dx-corp/examples", - "priorProjectedBase": "316ede54390995c61fd36ef90b006634789fc143", + "priorProjectedBase": "c4df6306c20a8670d6b0046a960f0c5aa020f8bb", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", "toolDigest": "898e8657d9153a2a51d7c283bf83bb3350b5d1e6", "contentDigest": "6a0afd64349e428a9c866600b11f7d0967ef9c5889676882fbd8828677089f32", From 5773ee7f6676646a029b8852181d9124be99cd03 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Thu, 24 Sep 2026 06:32:05 +0000 Subject: [PATCH 27/29] chore: project examples from Mono c27319825e1c --- .repository-projection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repository-projection.json b/.repository-projection.json index 3e77b0a..d7679eb 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,7 +3,7 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "916d407917e806df56819c92b7ebc8c9cdcef9b5", + "sourceSha": "c27319825e1c40e34be35016e71b4553c4313dc0", "destinationRepository": "dx-corp/examples", "priorProjectedBase": "c4df6306c20a8670d6b0046a960f0c5aa020f8bb", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", From ae55ce2f470798c7b4b954c562c4f0e15db3b788 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Thu, 24 Sep 2026 07:57:16 +0000 Subject: [PATCH 28/29] chore: project examples from Mono 274db22a3ad9 --- .repository-projection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repository-projection.json b/.repository-projection.json index d7679eb..48af139 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,7 +3,7 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "c27319825e1c40e34be35016e71b4553c4313dc0", + "sourceSha": "274db22a3ad92a0a22c45c0ecbc770f92c9d053d", "destinationRepository": "dx-corp/examples", "priorProjectedBase": "c4df6306c20a8670d6b0046a960f0c5aa020f8bb", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", From 9234da8bbf5b6157048379fd428c95fd15565326 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Thu, 24 Sep 2026 18:36:48 +0000 Subject: [PATCH 29/29] chore: project examples from Mono a971433d12b4 --- .repository-projection.json | 6 +- examples/account-brief.mjs | 16 +-- python/deixic_examples/account_brief.py | 39 +++---- python/deixic_examples/task_result.py | 149 +++++++++++++++++------- scripts/distribution-validation.mjs | 16 +-- 5 files changed, 136 insertions(+), 90 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 48af139..54cdc21 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "examples", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "274db22a3ad92a0a22c45c0ecbc770f92c9d053d", + "sourceSha": "a971433d12b40d9042b3a64c2c074fa8fc398e69", "destinationRepository": "dx-corp/examples", "priorProjectedBase": "c4df6306c20a8670d6b0046a960f0c5aa020f8bb", "definitionDigest": "ec2a926dbb322ffc1c2329c0b1f56b2b8bc0528c918473ebbcea0ef8234ff2b5", - "toolDigest": "898e8657d9153a2a51d7c283bf83bb3350b5d1e6", - "contentDigest": "6a0afd64349e428a9c866600b11f7d0967ef9c5889676882fbd8828677089f32", + "toolDigest": "ff02edcbb40b0028af10ab01a101e918341f157a", + "contentDigest": "dd893c827fbf83693aa832b8932dd452e30876e77e70477fe8ebae40ed92d678", "publicationEligible": true } diff --git a/examples/account-brief.mjs b/examples/account-brief.mjs index 3fc93c6..1a36fc9 100755 --- a/examples/account-brief.mjs +++ b/examples/account-brief.mjs @@ -61,7 +61,7 @@ async function main() { writeAccess: check.writeAccess, nextAction: check.nextAction, requirements: check.capabilities.map(item => ({ service: item.service, missingRequirements: item.missingRequirements, - reasonCodes: item.missingRequirementStates.map(reason => reason.reasonCode) })), + accessible: item.accessible })), modelReady: check.selectedModel?.ready ?? null, errorKind: check.error?.kind, requestId: check.error?.requestId, })); @@ -86,13 +86,13 @@ async function main() { else if (["approve", "deny"].includes(action)) { const result = await task.result(); const event = result.event; - if (result.status !== "waiting" || !event || event.requestType !== OperatingThreadRequestType.APPROVAL + if (result.status !== "waiting" || !event || event.requestKind !== OperatingThreadRequestType.APPROVAL || event.requestId !== values.request) { console.log(JSON.stringify({ status: "needs_attention", reason: "approval_request_not_current" })); return 2; } await client.controls.respond({ channelId: task.checkpoint().channelId, turnId: result.turnId, - response: { requestId: event.requestId, callId: event.requestCallId, requestType: event.requestType, + response: { requestId: event.requestId, callId: event.callId, requestKind: event.requestKind, action: action === "approve" ? OperatingThreadResponseAction.APPROVE : OperatingThreadResponseAction.DENY }, idempotencyKey: values["decision-key"], }); @@ -121,15 +121,15 @@ async function main() { } } const receipts = result.status === "completed" ? result.receipts : []; - const actions = receipts.map(item => ({ id: item.id, ownerService: item.ownerService, - objectId: item.objectId, kind: item.kind, lifecycleState: item.lifecycleState, - evidenceRefs: item.evidenceRefs.map(ref => ({ resourceType: ref.resourceType, id: ref.id })) })); - const attention = receipts.some(item => ![ReceiptLifecycleState.SUCCEEDED, ReceiptLifecycleState.VERIFIED].includes(item.lifecycleState)); + const actions = receipts.map(item => ({ id: item.id, ownerService: undefined, + objectId: undefined, kind: item.kind, lifecycleState: item.state, + evidenceRefs: item.evidence.map(ref => ({ resourceType: ref.kind, id: ref.id })) })); + const attention = receipts.some(item => ![ReceiptLifecycleState.SUCCEEDED, ReceiptLifecycleState.VERIFIED].includes(item.state)); console.log(JSON.stringify({ status: result.status, turnId: result.turnId, reason: result.reason, body: result.status === "completed" && !structured ? result.body : undefined, brief, receiptIds: receipts.map(item => item.id), actions, actionStatus: !actions.length ? "not_reported" : attention ? "requires_attention" : "owner_reported_success", - requestId: result.event?.requestId, requestType: result.event?.requestType, errorCode: result.turn?.errorCode, + requestId: result.event?.requestId, requestKind: result.event?.requestKind, errorCode: result.turn?.terminalError?.code, })); return result.status === "completed" && !attention ? 0 : 2; } diff --git a/python/deixic_examples/account_brief.py b/python/deixic_examples/account_brief.py index 4fc342e..52dc7ca 100644 --- a/python/deixic_examples/account_brief.py +++ b/python/deixic_examples/account_brief.py @@ -8,7 +8,7 @@ import sys from pathlib import Path -from console.v1 import console_pb2 as pb +from deixic import protocol as pb from deixic import Deixic, DeixicError from .task_result import save @@ -85,12 +85,7 @@ def main() -> int: next_action=check.next_action, requirements=[ dict( - service=item.service, missing_requirements=list(item.missing_requirements), - reason_codes=[ - reason.reason_code - for reason in item.missing_requirement_states - ], ) for item in check.capabilities ], @@ -137,7 +132,7 @@ def persist(state): if ( outcome.status != "waiting" or event is None - or event.request_type != pb.OPERATING_THREAD_REQUEST_TYPE_APPROVAL + or event.request_kind != pb.REQUEST_KIND_APPROVAL or event.request_id != args.request ): print( @@ -152,13 +147,13 @@ def persist(state): client.controls.respond( channel_id=task.checkpoint()["channelId"], turn_id=outcome.turn_id, - response=pb.OperatingThreadResponse( + response=pb.RespondToRequestRequest( request_id=event.request_id, - call_id=event.request_call_id, - request_type=event.request_type, - action=pb.OPERATING_THREAD_RESPONSE_ACTION_APPROVE + call_id=event.call_id, + request_kind=event.request_kind, + action=pb.RESPONSE_ACTION_APPROVE if args.action == "approve" - else pb.OPERATING_THREAD_RESPONSE_ACTION_DENY, + else pb.RESPONSE_ACTION_DENY, ), idempotency_key=args.decision_key, ) @@ -179,7 +174,7 @@ def progress(event): print( json.dumps( dict( - event_id=event.event_id, + id=event.id, turn_id=event.turn_id, kind=event.kind, ) @@ -218,22 +213,20 @@ def progress(event): actions = [ dict( id=item.id, - owner_service=item.owner_service, - object_id=item.object_id, kind=item.kind, - lifecycle_state=item.lifecycle_state, + lifecycle_state=item.state, evidence_refs=[ - dict(resource_type=ref.resource_type, id=ref.id) - for ref in item.evidence_refs + dict(resource_type=ref.kind, id=ref.id) + for ref in item.evidence ], ) for item in outcome.receipts ] attention = any( - item.lifecycle_state + item.state not in ( - pb.RECEIPT_LIFECYCLE_STATE_SUCCEEDED, - pb.RECEIPT_LIFECYCLE_STATE_VERIFIED, + pb.RECEIPT_STATE_SUCCEEDED, + pb.RECEIPT_STATE_VERIFIED, ) for item in outcome.receipts ) @@ -255,10 +248,10 @@ def progress(event): request_id=outcome.event.request_id if outcome.event else None, - request_type=outcome.event.request_type + request_kind=outcome.event.request_kind if outcome.event else None, - error_code=outcome.turn.error_code + error_code=outcome.turn.terminal_error.code if outcome.turn else None, ) diff --git a/python/deixic_examples/task_result.py b/python/deixic_examples/task_result.py index f7313c9..51244de 100644 --- a/python/deixic_examples/task_result.py +++ b/python/deixic_examples/task_result.py @@ -10,7 +10,7 @@ from pathlib import Path from typing import Any -from console.v1 import console_pb2 as pb +from deixic import protocol as pb from deixic import Deixic, DeixicError @@ -23,7 +23,9 @@ def save(path: Path, state: dict[str, Any], *, create: bool = False) -> None: output.flush() os.fsync(output.fileno()) if create: - os.link(temporary, path) # Atomic and exclusive: partial initial files are never visible. + os.link( + temporary, path + ) # Atomic and exclusive: partial initial files are never visible. else: os.replace(temporary, path) directory = os.open(path.parent, os.O_RDONLY) @@ -36,21 +38,38 @@ def save(path: Path, state: dict[str, Any], *, create: bool = False) -> None: os.unlink(temporary) -def prepare(path: Path, *, organization_id: str, workspace_id: str, - base_url: str, channel_id: str, body: str) -> dict[str, Any]: - state = dict(organization_id=organization_id, workspace_id=workspace_id, - base_url=base_url.rstrip("/"), channel_id=channel_id, body=body, - idempotency_key=str(uuid.uuid4()), turn_id="", cursor=0, - turn_state=pb.OPERATING_TURN_STATE_UNSPECIFIED) +def prepare( + path: Path, + *, + organization_id: str, + workspace_id: str, + base_url: str, + channel_id: str, + body: str, +) -> dict[str, Any]: + state = dict( + organization_id=organization_id, + workspace_id=workspace_id, + base_url=base_url.rstrip("/"), + channel_id=channel_id, + body=body, + idempotency_key=str(uuid.uuid4()), + turn_id="", + cursor=0, + turn_state=pb.TURN_STATE_UNSPECIFIED, + ) save(path, state, create=True) return state -def load(path: Path, *, organization_id: str, workspace_id: str, - base_url: str) -> dict[str, Any]: +def load( + path: Path, *, organization_id: str, workspace_id: str, base_url: str +) -> dict[str, Any]: state = json.loads(path.read_text()) if (state["organization_id"], state["workspace_id"], state["base_url"]) != ( - organization_id, workspace_id, base_url.rstrip("/"), + organization_id, + workspace_id, + base_url.rstrip("/"), ): raise ValueError("Checkpoint belongs to a different tenant or Platform URL") return state @@ -59,12 +78,18 @@ def load(path: Path, *, organization_id: str, workspace_id: str, def submit(client: Deixic, path: Path, state: dict[str, Any]) -> None: if state["turn_id"]: raise ValueError("This checkpoint already has an accepted turn; use resume") - accepted = client.messages.send(channel_id=state["channel_id"], body=state["body"], - idempotency_key=state["idempotency_key"]) + accepted = client.messages.send( + channel_id=state["channel_id"], + body=state["body"], + idempotency_key=state["idempotency_key"], + ) if not accepted.accepted_turn.turn_id: raise ValueError("Submission omitted the accepted turn identity") - state.update(turn_id=accepted.accepted_turn.turn_id, cursor=accepted.replay_cursor, - turn_state=accepted.accepted_turn.state) + state.update( + turn_id=accepted.accepted_turn.turn_id, + cursor=accepted.replay_cursor, + turn_state=accepted.accepted_turn.state, + ) save(path, state) @@ -74,9 +99,12 @@ def result(client: Deixic, state: dict[str, Any]) -> dict[str, Any] | None: messages = {} seen_tokens = set() while True: - thread = client.threads.get(channel_id=state["channel_id"], limit=200, - page_token=page_token) - turn = next((item for item in thread.turns if item.turn_id == state["turn_id"]), turn) + thread = client.threads.get( + channel_id=state["channel_id"], limit=200, page_token=page_token + ) + turn = next( + (item for item in thread.turns if item.turn_id == state["turn_id"]), turn + ) messages.update({message.id: message for message in thread.messages}) if not thread.next_page_token: break @@ -87,36 +115,49 @@ def result(client: Deixic, state: dict[str, Any]) -> dict[str, Any] | None: if turn is None: return None state["turn_state"] = turn.state - if turn.state in (pb.OPERATING_TURN_STATE_FAILED, pb.OPERATING_TURN_STATE_INTERRUPTED): - return dict(status="failed" if turn.state == pb.OPERATING_TURN_STATE_FAILED else "interrupted", - turn_id=turn.turn_id, error_code=turn.error_code) - if turn.state != pb.OPERATING_TURN_STATE_COMPLETED: + if turn.state in (pb.TURN_STATE_FAILED, pb.TURN_STATE_INTERRUPTED): + return dict( + status="failed" if turn.state == pb.TURN_STATE_FAILED else "interrupted", + turn_id=turn.turn_id, + error_code=turn.terminal_error.code, + ) + if turn.state != pb.TURN_STATE_COMPLETED: return None message = messages.get(turn.assistant_message_id) - if message is None or message.role != "assistant" or message.channel_id != state["channel_id"]: + if message is None or message.role != pb.MESSAGE_ROLE_ASSISTANT: raise ValueError("Completed turn omitted its linked final assistant message") receipts = [] for receipt_id in message.receipt_ids: - receipt = client.receipts.get(channel_id=state["channel_id"], receipt_id=receipt_id).receipt + receipt = client.receipts.get( + channel_id=state["channel_id"], receipt_id=receipt_id + ).receipt if receipt.id != receipt_id: raise ValueError("Receipt lookup returned a different identity") receipts.append(receipt.id) - return dict(status="completed", turn_id=turn.turn_id, message_id=message.id, - body=message.body, receipt_ids=receipts) + return dict( + status="completed", + turn_id=turn.turn_id, + message_id=message.id, + body=message.body, + receipt_ids=receipts, + ) def apply_page(path: Path, state: dict[str, Any], page: Any) -> None: if page.reset_required: # Replace the old projection; retained events cannot reconstruct it. - turn = next((item for item in page.snapshot_turns if item.turn_id == state["turn_id"]), None) - state["turn_state"] = turn.state if turn else pb.OPERATING_TURN_STATE_UNSPECIFIED + turn = next( + (item for item in page.snapshot_turns if item.turn_id == state["turn_id"]), + None, + ) + state["turn_state"] = turn.state if turn else pb.TURN_STATE_UNSPECIFIED for event in page.events: if event.turn_id != state["turn_id"]: continue terminal = { - pb.OPERATING_THREAD_EVENT_KIND_TURN_COMPLETED: pb.OPERATING_TURN_STATE_COMPLETED, - pb.OPERATING_THREAD_EVENT_KIND_TURN_FAILED: pb.OPERATING_TURN_STATE_FAILED, - pb.OPERATING_THREAD_EVENT_KIND_TURN_INTERRUPTED: pb.OPERATING_TURN_STATE_INTERRUPTED, + pb.EVENT_KIND_TURN_COMPLETED: pb.TURN_STATE_COMPLETED, + pb.EVENT_KIND_TURN_FAILED: pb.TURN_STATE_FAILED, + pb.EVENT_KIND_TURN_INTERRUPTED: pb.TURN_STATE_INTERRUPTED, }.get(event.kind) if terminal is not None: state["turn_state"] = terminal @@ -126,14 +167,18 @@ def apply_page(path: Path, state: dict[str, Any], page: Any) -> None: def resume(client: Deixic, path: Path, state: dict[str, Any]) -> dict[str, Any]: if not state["turn_id"]: - return dict(status="unacknowledged", action="replay the saved request explicitly") + return dict( + status="unacknowledged", action="replay the saved request explicitly" + ) outcome = result(client, state) save(path, state) if outcome is not None: return outcome while True: previous_cursor = state["cursor"] - page = client.events.list(channel_id=state["channel_id"], after_cursor=previous_cursor) + page = client.events.list( + channel_id=state["channel_id"], after_cursor=previous_cursor + ) apply_page(path, state, page) outcome = result(client, state) save(path, state) @@ -143,7 +188,9 @@ def resume(client: Deixic, path: Path, state: dict[str, Any]) -> dict[str, Any]: break if state["cursor"] == previous_cursor: raise ValueError("Event pagination did not advance its cursor") - stream = client.events.watch(channel_id=state["channel_id"], after_cursor=state["cursor"]) + stream = client.events.watch( + channel_id=state["channel_id"], after_cursor=state["cursor"] + ) try: for page in stream: apply_page(path, state, page) @@ -153,8 +200,12 @@ def resume(client: Deixic, path: Path, state: dict[str, Any]) -> dict[str, Any]: return outcome finally: stream.close() - return dict(status="unfinished", reason="watch_eof", turn_id=state["turn_id"], - cursor=state["cursor"]) + return dict( + status="unfinished", + reason="watch_eof", + turn_id=state["turn_id"], + cursor=state["cursor"], + ) def main() -> int: @@ -167,18 +218,32 @@ def main() -> int: organization = os.environ["DEIXIC_ORGANIZATION_ID"] workspace = os.environ["DEIXIC_WORKSPACE_ID"] base_url = os.environ.get("DEIXIC_BASE_URL", "https://app.deixic.com") - client = Deixic(api_key=os.environ["DEIXIC_API_KEY"], organization_id=organization, - workspace_id=workspace, base_url=base_url) + client = Deixic( + api_key=os.environ["DEIXIC_API_KEY"], + organization_id=organization, + workspace_id=workspace, + base_url=base_url, + ) if args.action == "start": if not args.body: parser.error("start requires --body") - state = prepare(args.state, organization_id=organization, workspace_id=workspace, - base_url=base_url, channel_id=args.channel, body=args.body) + state = prepare( + args.state, + organization_id=organization, + workspace_id=workspace, + base_url=base_url, + channel_id=args.channel, + body=args.body, + ) else: if args.body is not None: parser.error("replay and resume use the saved request; omit --body") - state = load(args.state, organization_id=organization, workspace_id=workspace, - base_url=base_url) + state = load( + args.state, + organization_id=organization, + workspace_id=workspace, + base_url=base_url, + ) try: if args.action in ("start", "replay"): submit(client, args.state, state) diff --git a/scripts/distribution-validation.mjs b/scripts/distribution-validation.mjs index 13c5b1b..2fbd4e1 100644 --- a/scripts/distribution-validation.mjs +++ b/scripts/distribution-validation.mjs @@ -20,16 +20,7 @@ const HEX = /^[0-9a-f]{64}$/; // `dx-corp/capobara` fails `invalid provenance toolDigest` against a // perfectly correct tree. const TOOL_DIGEST = /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/; -const PROTO = [ - "agentruntime/v1/runtime.proto", "agents/v1/agents.proto", "codex/v1/codex.proto", - "common/v1/analytics.proto", "common/v1/authz.proto", "common/v1/classification.proto", - "common/v1/delivery.proto", "common/v1/entity.proto", "common/v1/risk.proto", - "common/v1/surface.proto", "connectors/v1/connectors.proto", "console/v1/console.proto", - "deixic/v1/deixic.proto", "memory/v1/memory.proto", "meter/v1/meter.proto", - "objectives/v1/objectives.proto", "orbcontrol/v1/orb_control.proto", - "platform/v1/platform.proto", "remoterunner/v1/remoterunner.proto", - "toolexecution/v1/toolexecution.proto", "traces/v1/traces.proto", "vfs/v1/filesystem.proto", -].sort(); +const PROTO = ["deixicpublic/v1/sdk.proto"]; const SKILLS = [ "doc-coauthoring", "frontend-design", "incident-triage", "install-code-review", "mcp-builder", "openai-agent-browser-verify", "pr-review", "release-verification", "security-review", "skill-creator", @@ -154,12 +145,9 @@ async function validateApi(root, files) { } } const surface = JSON.parse(await readFile(join(root, "contracts", "public-surface.json"), "utf8")); - requireValue(surface.service === "deixic.v1.DeixicService" && surface.operations?.length === 8, "Deixic public facade contract changed"); + requireValue(surface.service === "deixicpublic.v1.DeixicPublicService" && surface.operations?.length === 8, "Deixic public facade contract changed"); const rpcs = surface.operations.map(item => item.rpc).sort(); requireValue(new Set(rpcs).size === 8 && surface.operations.filter(item => item.kind === "mutation").every(item => item.requiresIdempotencyKey), "Deixic public operations are invalid"); - const lock = await readFile(join(root, "buf.lock"), "utf8"); - requireValue(lock.includes("buf.build/bufbuild/protovalidate") && lock.includes("buf.build/googleapis/googleapis") - && (lock.match(/digest:\s*b5:[0-9a-f]+/g) ?? []).length === 2, "Buf dependencies are not pinned"); const generation = await readFile(join(root, "buf.gen.yaml"), "utf8"); requireValue(generation.includes("sudorandom-connect-openapi:v0.19.1") && !generation.includes("./scripts/"), "public codegen config is not pinned or is private"); run("buf", ["build"], root);