@orchestrator-claude/definitions 3.43.0 → 3.43.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -217,8 +217,11 @@ async function getAdversarialVerdict(workflowId, token) {
217
217
  try {
218
218
  const resp = await apiGet(`/api/v1/artifact-content/${workflowId}/adversarial_review`, token);
219
219
  if (!resp) return null;
220
- const { verdict, iteration } = resp.metadata ?? {};
221
- if (typeof verdict !== "string" || typeof iteration !== "number") return null;
220
+ const { verdict, iteration: rawIteration } = resp.metadata?.customMetadata ?? {};
221
+ if (typeof verdict !== "string" || typeof rawIteration !== "string") return null;
222
+ if (rawIteration.trim() === "") return null;
223
+ const iteration = Number(rawIteration);
224
+ if (!Number.isFinite(iteration)) return null;
222
225
  return { verdict, iteration };
223
226
  } catch {
224
227
  return null;
@@ -1091,8 +1091,13 @@ export async function getGateCellMode(
1091
1091
  /**
1092
1092
  * Retrieves the adversarial review verdict and iteration for a workflow.
1093
1093
  * Calls GET /api/v1/artifact-content/:workflowId/adversarial_review.
1094
- * Returns null when artifact is absent (404), on 5xx, timeout, or missing
1095
- * metadata fields (fail-open — gate is not enforced when artifact is absent).
1094
+ * The API serves the fields in metadata.customMetadata (strings — S3
1095
+ * x-amz-meta-* headers only carry strings), so `iteration` is coerced:
1096
+ * accepted only as a non-blank string whose Number() is finite (TD-331).
1097
+ * Returns null when artifact is absent (404), on 5xx, timeout, or missing /
1098
+ * malformed customMetadata fields (fail-open — gate is not enforced when
1099
+ * artifact is absent). The pre-TD-331 flat metadata.{verdict,iteration}
1100
+ * shape is NOT read (RF-003).
1096
1101
  */
1097
1102
  export async function getAdversarialVerdict(
1098
1103
  workflowId: string,
@@ -1101,11 +1106,14 @@ export async function getAdversarialVerdict(
1101
1106
  try {
1102
1107
  const resp = await apiGet<{
1103
1108
  content?: string;
1104
- metadata?: { verdict?: string; iteration?: number };
1109
+ metadata?: { customMetadata?: Record<string, unknown> };
1105
1110
  }>(`/api/v1/artifact-content/${workflowId}/adversarial_review`, token);
1106
1111
  if (!resp) return null;
1107
- const { verdict, iteration } = resp.metadata ?? {};
1108
- if (typeof verdict !== 'string' || typeof iteration !== 'number') return null;
1112
+ const { verdict, iteration: rawIteration } = resp.metadata?.customMetadata ?? {};
1113
+ if (typeof verdict !== 'string' || typeof rawIteration !== 'string') return null;
1114
+ if (rawIteration.trim() === '') return null;
1115
+ const iteration = Number(rawIteration);
1116
+ if (!Number.isFinite(iteration)) return null;
1109
1117
  return { verdict, iteration };
1110
1118
  } catch {
1111
1119
  return null;
package/manifest.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schema": "orchestrator-definitions/v1",
3
3
  "namespace": "orchestrator",
4
- "version": "3.43.0",
5
- "generatedAt": "2026-10-01T15:02:36.377Z",
4
+ "version": "3.43.1",
5
+ "generatedAt": "2026-10-01T17:04:34.229Z",
6
6
  "definitions": {
7
7
  "agents": [
8
8
  {
@@ -613,7 +613,7 @@
613
613
  "slug": "gate-guardian",
614
614
  "file": "hooks/gate-guardian.mjs",
615
615
  "version": "1.0.0",
616
- "checksum": "sha256:4211d19f890d2518bbda3ae38146485f2a692b3585794f9456e7157c9772e41e",
616
+ "checksum": "sha256:2fe79ad9a8621c9708530e627aed839cf145637af47f76a9ddd45e20da5ff70a",
617
617
  "supersedes": null,
618
618
  "metadata": {}
619
619
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchestrator-claude/definitions",
3
- "version": "3.43.0",
3
+ "version": "3.43.1",
4
4
  "description": "Built-in definitions (agents, skills, hooks, workflows, KB seeds) for the Orchestrator ecosystem",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",