diff --git a/CHANGELOG.md b/CHANGELOG.md index db9e6d97..98f279c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to the AxonFlow Java SDK will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [9.5.0] - 2026-10-21: Decision API approval retry fields + +### Added + +- Decision API payment approval wire fields: exact `target.server`, request `approval_id`, and response `pending_approval` and consumed `approval_id`. A hold is never an allow verdict; retry only after human approval and forward the payment only on an allow verdict for the spent approval. + ## [9.4.0] - 2026-09-14: decision provenance, the PEP capability handshake, typed policy authoring, and the simulation family deprecated The first Java SDK release carrying these entries sends the PEP capability handshake, which a diff --git a/pom.xml b/pom.xml index 08d80e8e..4c0d3628 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.getaxonflow axonflow-sdk - 9.4.0 + 9.5.0 jar AxonFlow Java SDK diff --git a/src/main/java/com/getaxonflow/sdk/types/DecideRequest.java b/src/main/java/com/getaxonflow/sdk/types/DecideRequest.java index 7ef4a8f6..ea5c48f4 100644 --- a/src/main/java/com/getaxonflow/sdk/types/DecideRequest.java +++ b/src/main/java/com/getaxonflow/sdk/types/DecideRequest.java @@ -37,6 +37,9 @@ public final class DecideRequest { @JsonProperty("context") private final Map context; + @JsonProperty("approval_id") + private final String approvalId; + private DecideRequest(Builder b) { this.stage = b.stage; this.query = b.query; @@ -46,6 +49,7 @@ private DecideRequest(Builder b) { this.userToken = (b.userToken == null || b.userToken.isEmpty()) ? null : b.userToken; // Omit an empty context map per the wire contract (omit if empty). this.context = (b.context == null || b.context.isEmpty()) ? null : b.context; + this.approvalId = (b.approvalId == null || b.approvalId.isEmpty()) ? null : b.approvalId; } /** @@ -89,6 +93,11 @@ public Map getContext() { return context; } + /** Returns the approved hold this exact retry spends, or null. */ + public String getApprovalId() { + return approvalId; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -99,12 +108,13 @@ public boolean equals(Object o) { && Objects.equals(callerIdentity, that.callerIdentity) && Objects.equals(target, that.target) && Objects.equals(userToken, that.userToken) - && Objects.equals(context, that.context); + && Objects.equals(context, that.context) + && Objects.equals(approvalId, that.approvalId); } @Override public int hashCode() { - return Objects.hash(stage, query, callerIdentity, target, userToken, context); + return Objects.hash(stage, query, callerIdentity, target, userToken, context, approvalId); } @Override @@ -125,6 +135,9 @@ public String toString() { + '\'' + ", context=" + context + + ", approvalId='" + + (approvalId != null ? "" : null) + + '\'' + '}'; } @@ -136,6 +149,7 @@ public static final class Builder { private DecisionTarget target; private String userToken; private Map context; + private String approvalId; private Builder(String stage, String query) { this.stage = stage; @@ -186,6 +200,12 @@ public Builder context(Map context) { return this; } + /** Names the approved hold spent by an exact retry. */ + public Builder approvalId(String approvalId) { + this.approvalId = approvalId; + return this; + } + /** * Builds the {@link DecideRequest}. * diff --git a/src/main/java/com/getaxonflow/sdk/types/DecideResponse.java b/src/main/java/com/getaxonflow/sdk/types/DecideResponse.java index 6182baf0..8a7b5efa 100644 --- a/src/main/java/com/getaxonflow/sdk/types/DecideResponse.java +++ b/src/main/java/com/getaxonflow/sdk/types/DecideResponse.java @@ -70,6 +70,12 @@ public final class DecideResponse { @JsonProperty("document_version") private final Integer documentVersion; + @JsonProperty("pending_approval") + private final DecisionPendingApproval pendingApproval; + + @JsonProperty("approval_id") + private final String approvalId; + /** * Creates a decide response, as Jackson reads it from the wire (v11.0.0 shape). * @@ -110,7 +116,9 @@ public DecideResponse( @JsonProperty("legacy_validators") List legacyValidators, @JsonProperty("policy_identities") List policyIdentities, @JsonProperty("policy_packs") List policyPacks, - @JsonProperty("document_version") Integer documentVersion) { + @JsonProperty("document_version") Integer documentVersion, + @JsonProperty("pending_approval") DecisionPendingApproval pendingApproval, + @JsonProperty("approval_id") String approvalId) { this.verdict = verdict; this.decisionId = decisionId; this.traceId = traceId; @@ -143,6 +151,47 @@ public DecideResponse( ? Collections.unmodifiableList(new ArrayList<>(policyPacks)) : Collections.emptyList(); this.documentVersion = documentVersion; + this.pendingApproval = pendingApproval; + this.approvalId = approvalId; + } + + /** Source compatible constructor retaining the v11.0 provenance shape. */ + public DecideResponse( + String verdict, + String decisionId, + String traceId, + List reasons, + List obligations, + List evaluatedPolicies, + String stage, + Instant expiresAt, + String error, + String engine, + String subjectType, + String policyBundle, + List legacyValidators, + List policyIdentities, + List policyPacks, + Integer documentVersion) { + this( + verdict, + decisionId, + traceId, + reasons, + obligations, + evaluatedPolicies, + stage, + expiresAt, + error, + engine, + subjectType, + policyBundle, + legacyValidators, + policyIdentities, + policyPacks, + documentVersion, + null, + null); } /** @@ -184,6 +233,8 @@ public DecideResponse( null, null, null, + null, + null, null); } @@ -279,6 +330,16 @@ public Integer getDocumentVersion() { return documentVersion; } + /** The pending human review; callers must not execute while this is present. */ + public DecisionPendingApproval getPendingApproval() { + return pendingApproval; + } + + /** The approval consumed by an allowed retry, when present. */ + public String getApprovalId() { + return approvalId; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -299,7 +360,9 @@ public boolean equals(Object o) { && Objects.equals(legacyValidators, that.legacyValidators) && Objects.equals(policyIdentities, that.policyIdentities) && Objects.equals(policyPacks, that.policyPacks) - && Objects.equals(documentVersion, that.documentVersion); + && Objects.equals(documentVersion, that.documentVersion) + && Objects.equals(pendingApproval, that.pendingApproval) + && Objects.equals(approvalId, that.approvalId); } @Override @@ -320,7 +383,9 @@ public int hashCode() { legacyValidators, policyIdentities, policyPacks, - documentVersion); + documentVersion, + pendingApproval, + approvalId); } @Override @@ -366,6 +431,11 @@ public String toString() { + policyPacks + ", documentVersion=" + documentVersion + + ", pendingApproval=" + + pendingApproval + + ", approvalId='" + + approvalId + + '\'' + '}'; } } diff --git a/src/main/java/com/getaxonflow/sdk/types/DecisionPendingApproval.java b/src/main/java/com/getaxonflow/sdk/types/DecisionPendingApproval.java new file mode 100644 index 00000000..00cafbf8 --- /dev/null +++ b/src/main/java/com/getaxonflow/sdk/types/DecisionPendingApproval.java @@ -0,0 +1,129 @@ +// Copyright 2026 AxonFlow +// SPDX-License-Identifier: MIT +package com.getaxonflow.sdk.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Instant; +import java.util.Objects; + +/** A Decision API call held for a person's review. A hold is never permission to forward. */ +@JsonIgnoreProperties(ignoreUnknown = true) +public final class DecisionPendingApproval { + @JsonProperty("approval_id") + private final String approvalId; + + @JsonProperty("status") + private final String status; + + @JsonProperty("plane") + private final String plane; + + @JsonProperty("expires_at") + private final Instant expiresAt; + + @JsonProperty("retry") + private final Retry retry; + + @JsonCreator + public DecisionPendingApproval( + @JsonProperty("approval_id") String approvalId, + @JsonProperty("status") String status, + @JsonProperty("plane") String plane, + @JsonProperty("expires_at") Instant expiresAt, + @JsonProperty("retry") Retry retry) { + this.approvalId = approvalId; + this.status = status; + this.plane = plane; + this.expiresAt = expiresAt; + this.retry = retry; + } + + public String getApprovalId() { + return approvalId; + } + + public String getStatus() { + return status; + } + + public String getPlane() { + return plane; + } + + public Instant getExpiresAt() { + return expiresAt; + } + + public Retry getRetry() { + return retry; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof DecisionPendingApproval)) return false; + DecisionPendingApproval that = (DecisionPendingApproval) o; + return Objects.equals(approvalId, that.approvalId) + && Objects.equals(status, that.status) + && Objects.equals(plane, that.plane) + && Objects.equals(expiresAt, that.expiresAt) + && Objects.equals(retry, that.retry); + } + + @Override + public int hashCode() { + return Objects.hash(approvalId, status, plane, expiresAt, retry); + } + + /** The header, request argument, or body field that names a held call on retry. */ + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Retry { + @JsonProperty("header") + private final String header; + + @JsonProperty("argument") + private final String argument; + + @JsonProperty("body_field") + private final String bodyField; + + @JsonCreator + public Retry( + @JsonProperty("header") String header, + @JsonProperty("argument") String argument, + @JsonProperty("body_field") String bodyField) { + this.header = header; + this.argument = argument; + this.bodyField = bodyField; + } + + public String getHeader() { + return header; + } + + public String getArgument() { + return argument; + } + + public String getBodyField() { + return bodyField; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof Retry)) return false; + Retry that = (Retry) o; + return Objects.equals(header, that.header) + && Objects.equals(argument, that.argument) + && Objects.equals(bodyField, that.bodyField); + } + + @Override + public int hashCode() { + return Objects.hash(header, argument, bodyField); + } + } +} diff --git a/src/main/java/com/getaxonflow/sdk/types/DecisionTarget.java b/src/main/java/com/getaxonflow/sdk/types/DecisionTarget.java index 5c40a58c..ed4f744a 100644 --- a/src/main/java/com/getaxonflow/sdk/types/DecisionTarget.java +++ b/src/main/java/com/getaxonflow/sdk/types/DecisionTarget.java @@ -25,6 +25,9 @@ public final class DecisionTarget { @JsonProperty("provider") private final String provider; + @JsonProperty("server") + private final String server; + @JsonProperty("tool") private final String tool; @@ -34,6 +37,7 @@ public final class DecisionTarget { * @param type {@code "llm"}, {@code "tool"}, or {@code "agent"} (may be null) * @param model the model name when {@code type=llm} (may be null) * @param provider the provider when {@code type=llm} (may be null) + * @param server the exact server when {@code type=tool} (may be null) * @param tool the tool name when {@code type=tool} (may be null) */ @JsonCreator @@ -41,13 +45,20 @@ public DecisionTarget( @JsonProperty("type") String type, @JsonProperty("model") String model, @JsonProperty("provider") String provider, + @JsonProperty("server") String server, @JsonProperty("tool") String tool) { this.type = type; this.model = model; this.provider = provider; + this.server = server; this.tool = tool; } + /** Source-compatible constructor for callers that do not name a tool server. */ + public DecisionTarget(String type, String model, String provider, String tool) { + this(type, model, provider, null, tool); + } + /** Returns the target type: {@code "llm"}, {@code "tool"}, or {@code "agent"}, or null. */ public String getType() { return type; @@ -63,6 +74,11 @@ public String getProvider() { return provider; } + /** Returns the exact tool server, or null. */ + public String getServer() { + return server; + } + /** Returns the tool name (when {@code type=tool}), or null. */ public String getTool() { return tool; @@ -76,12 +92,13 @@ public boolean equals(Object o) { return Objects.equals(type, that.type) && Objects.equals(model, that.model) && Objects.equals(provider, that.provider) + && Objects.equals(server, that.server) && Objects.equals(tool, that.tool); } @Override public int hashCode() { - return Objects.hash(type, model, provider, tool); + return Objects.hash(type, model, provider, server, tool); } @Override @@ -96,6 +113,9 @@ public String toString() { + ", provider='" + provider + '\'' + + ", server='" + + server + + '\'' + ", tool='" + tool + '\'' diff --git a/src/test/java/com/getaxonflow/sdk/types/PepTypesTest.java b/src/test/java/com/getaxonflow/sdk/types/PepTypesTest.java index 42d7471b..119ec1cd 100644 --- a/src/test/java/com/getaxonflow/sdk/types/PepTypesTest.java +++ b/src/test/java/com/getaxonflow/sdk/types/PepTypesTest.java @@ -24,6 +24,36 @@ class PepTypesTest { private static final ObjectMapper MAPPER = new ObjectMapper().registerModule(new JavaTimeModule()); + @Test + @DisplayName("payment approval hold and retry fields use the Decision API wire shape") + void paymentApprovalWireShape() throws Exception { + DecideRequest request = + DecideRequest.builder("tool", "transfer") + .target(new DecisionTarget("tool", null, null, "payments-live", "execute_payment")) + .approvalId("approval-123") + .build(); + String requestJson = MAPPER.writeValueAsString(request); + assertThat(requestJson).contains("\"server\":\"payments-live\""); + assertThat(requestJson).contains("\"approval_id\":\"approval-123\""); + assertThat(request.toString()).contains("approvalId=''"); + assertThat(request.toString()).doesNotContain("approval-123"); + + String hold = + "{\"verdict\":\"needs_approval\",\"pending_approval\":{" + + "\"approval_id\":\"approval-123\",\"status\":\"pending\",\"plane\":\"decide\"," + + "\"future\":\"ignored\",\"retry\":{\"body_field\":\"approval_id\"," + + "\"future\":\"ignored\"}}}"; + DecideResponse pending = MAPPER.readValue(hold, DecideResponse.class); + assertThat(pending.getPendingApproval().getApprovalId()).isEqualTo("approval-123"); + assertThat(pending.getPendingApproval().getRetry().getBodyField()).isEqualTo("approval_id"); + + DecideResponse allowed = + MAPPER.readValue( + "{\"verdict\":\"allow\",\"approval_id\":\"approval-123\"}", DecideResponse.class); + assertThat(allowed.getApprovalId()).isEqualTo("approval-123"); + assertThat(allowed.getPendingApproval()).isNull(); + } + @Test @DisplayName("DecideRequest serializes snake_case and omits blank user_token + empty context") void decideRequestWireShape() throws Exception { diff --git a/tests/fixtures/openapi/README.md b/tests/fixtures/openapi/README.md index 1ac79767..93c9e296 100644 --- a/tests/fixtures/openapi/README.md +++ b/tests/fixtures/openapi/README.md @@ -2,7 +2,7 @@ The wire-shape contract (`scripts/wire_shape/validate.py`, run by `.github/workflows/wire-shape-contract.yml`) diffs the Java SDK's `@JsonProperty` wire models against the platform's OpenAPI specs. It reads the schema declarations under `components.schemas` and the names of each one's `properties`. -The four files here hold exactly that, and nothing else. `scripts/snapshot_openapi_schemas.py` derives them from the platform's `docs/api/*.yaml` at platform commit `36e0e96b7e5c16626d394272b727b533f2b94a04`, the v11.0.0 candidate. The script is vendored byte-identical from axonflow-sdk-python (`756f06136`), and the four files are byte-identical to that repository's `tests/fixtures/openapi/`, so the SDKs pin the same contract. +The four files here hold exactly that, and nothing else. `scripts/snapshot_openapi_schemas.py` derives them from the platform's `docs/api/*.yaml` at platform commit `ba5201a52edd2bfbe9f1dadd736f19cae03d9cc4`, the merged platform source for the v11.2.0 train. The script is vendored byte-identical from axonflow-sdk-python (`756f06136`), and the four files are byte-identical to that repository's `tests/fixtures/openapi/`, so the SDKs pin the same contract. The script works on the YAML node graph, so every declaration survives in source order, including a schema declared twice in one file and a declaration with no properties. It drops descriptions, types, paths and the `info` block: the full specs carry the platform's own licence statement there, and this repository is MIT. It refuses a YAML merge key under `schemas` or `properties`, since loaders disagree on expanding one. @@ -26,7 +26,7 @@ A change to the pinned SHA or to any file here needs the `spec-pin-bump` label o | File | sha256 of the source spec | |---|---| -| `agent-api.yaml` | `49bd1b145cd3b2d29e8cc8de240cc184d4f5d24f83b6c546894d1f0a682a032a` | -| `masfeat-api.yaml` | `2d49d6af2d5b1510b373c01fce1df2b712b32766b14d477652797746c52147e7` | -| `orchestrator-api.yaml` | `b173c9bec456e4af3aa09c63306e503caa73ca0cf61da3dfaa7b21453dcd1188` | -| `policy-api.yaml` | `090730a359bf242b6ed5c1a0d63a2831c749583bd957cc3ecc64c99ead5514b7` | +| `agent-api.yaml` | `617e6236f91dd7716baaab8e2f22ef24f1713ebfd4938cc52a60a3368e3acb1a` | +| `masfeat-api.yaml` | `eb224773c2a14fc6a84a630b652b17e010a4776da28529b13e173b002d2d4756` | +| `orchestrator-api.yaml` | `a1f96d929ff35acb1204ce5ba3c6e605b8f91d93e7fa62a2fa8a760ea8486860` | +| `policy-api.yaml` | `a1a7aff59d759033f99721a40d942e8750c6026d69f9efb0edf66016f0069ae9` | diff --git a/tests/fixtures/openapi/agent-api.yaml b/tests/fixtures/openapi/agent-api.yaml index 3ff2e7c3..f8c0d50d 100644 --- a/tests/fixtures/openapi/agent-api.yaml +++ b/tests/fixtures/openapi/agent-api.yaml @@ -1,6 +1,6 @@ # GENERATED by scripts/snapshot_openapi_schemas.py - do not edit. -# Source: docs/api/agent-api.yaml at platform commit 36e0e96b7e5c16626d394272b727b533f2b94a04 -# Source sha256: 49bd1b145cd3b2d29e8cc8de240cc184d4f5d24f83b6c546894d1f0a682a032a +# Source: docs/api/agent-api.yaml at platform commit ba5201a52edd2bfbe9f1dadd736f19cae03d9cc4 +# Source sha256: 617e6236f91dd7716baaab8e2f22ef24f1713ebfd4938cc52a60a3368e3acb1a # Schema declarations and property names only; see tests/fixtures/openapi/README.md. components: schemas: @@ -18,6 +18,7 @@ components: "capabilities": {} "sdk_compatibility": {} "plugin_compatibility": {} + "upstream": {} "PlatformCapability": properties: "name": {} @@ -103,17 +104,6 @@ components: "enabled_override": {} "override_reason": {} "expires_at": {} - "CreateOverrideResponse": - properties: - "id": {} - "policy_id": {} - "policy_type": {} - "expires_at": {} - "ttl_seconds": {} - "requested_ttl": {} - "clamped": {} - "clamped_reason": {} - "created_at": {} "TestPatternRequest": properties: "pattern": {} @@ -165,6 +155,16 @@ components: "skip_llm": {} "context": {} "media": {} + "PolicyTestResponse": + properties: + "blocked": {} + "reason": {} + "triggered_policies": {} + "checks_performed": {} + "processing_time_ms": {} + "engine": {} + "subject_type": {} + "policy_bundle": {} "ClientResponse": properties: "success": {} @@ -173,18 +173,21 @@ components: "plan_id": {} "metadata": {} "error": {} + "code": {} "blocked": {} "block_reason": {} - "approval_request_id": {} "policy_info": {} "budget_info": {} "media_analysis": {} "engine": {} "subject_type": {} "policy_bundle": {} + "policy_packs": {} "legacy_validators": {} + "response_plane": {} "PolicyEvaluationInfo": properties: + "matched_policies": {} "policies_evaluated": {} "static_checks": {} "processing_time": {} @@ -205,7 +208,6 @@ components: "context_id": {} "approved_data": {} "policies": {} - "approval_request_id": {} "rate_limit": {} "expires_at": {} "block_reason": {} @@ -225,8 +227,17 @@ components: "pep_id": {} "audience": {} "capabilities": {} + "PendingApproval": + properties: + "approval_id": {} + "status": {} + "plane": {} + "expires_at": {} + "retry": {} + "ApprovalHoldReason": {} "DecideRequest": properties: + "approval_id": {} "stage": {} "caller_identity": {} "target": {} @@ -248,6 +259,8 @@ components: "tool": {} "DecideResponse": properties: + "pending_approval": {} + "approval_id": {} "verdict": {} "decision_id": {} "trace_id": {} @@ -426,6 +439,7 @@ components: "license_expiry": {} "MCPQueryRequest": properties: + "approval_id": {} "client_id": {} "license_key": {} "user_token": {} @@ -448,6 +462,7 @@ components: "engine": {} "subject_type": {} "policy_bundle": {} + "policy_packs": {} "legacy_validators": {} "PolicyInfo": properties: @@ -458,7 +473,6 @@ components: "processing_time_ms": {} "matched_policies": {} "exfiltration_check": {} - "dynamic_policy_info": {} "ExplainPolicy": properties: "policy_id": {} @@ -496,25 +510,11 @@ components: "tool_signature": {} "ExfiltrationCheckInfo": properties: - "exceeded": {} - "limit_type": {} "rows_returned": {} "row_limit": {} "bytes_returned": {} "byte_limit": {} - "DynamicPolicyInfo": - properties: - "policies_evaluated": {} - "matched_policies": {} - "orchestrator_reachable": {} - "processing_time_ms": {} - "DynamicPolicyMatch": - properties: - "policy_id": {} - "policy_name": {} - "policy_type": {} - "action": {} - "message": {} + "within_limits": {} "PolicyMatchInfo": properties: "policy_id": {} @@ -524,6 +524,7 @@ components: "action": {} "MCPExecuteRequest": properties: + "approval_id": {} "client_id": {} "license_key": {} "user_token": {} @@ -546,9 +547,11 @@ components: "engine": {} "subject_type": {} "policy_bundle": {} + "policy_packs": {} "legacy_validators": {} "MCPCheckInputRequest": properties: + "approval_id": {} "client_id": {} "user_token": {} "tenant_id": {} @@ -562,6 +565,8 @@ components: "content_type": {} "MCPCheckInputResponse": properties: + "pending_approval": {} + "approval_id": {} "allowed": {} "block_reason": {} "policies_evaluated": {} @@ -573,7 +578,13 @@ components: "override_existing_id": {} "redacted": {} "redacted_statement": {} + "redacted_parameters": {} "redaction_evaluated": {} + "engine": {} + "subject_type": {} + "policy_bundle": {} + "policy_packs": {} + "legacy_validators": {} "MCPCheckOutputRequest": properties: "client_id": {} @@ -599,6 +610,7 @@ components: "engine": {} "subject_type": {} "policy_bundle": {} + "policy_packs": {} "legacy_validators": {} "ConnectorRefreshResponse": properties: @@ -646,6 +658,7 @@ components: "window": {} "resets_at": {} "upgrade": {} + "code": {} "DecisionEntry": properties: "id": {} diff --git a/tests/fixtures/openapi/masfeat-api.yaml b/tests/fixtures/openapi/masfeat-api.yaml index ba5c354f..c262b194 100644 --- a/tests/fixtures/openapi/masfeat-api.yaml +++ b/tests/fixtures/openapi/masfeat-api.yaml @@ -1,6 +1,6 @@ # GENERATED by scripts/snapshot_openapi_schemas.py - do not edit. -# Source: docs/api/masfeat-api.yaml at platform commit 36e0e96b7e5c16626d394272b727b533f2b94a04 -# Source sha256: 2d49d6af2d5b1510b373c01fce1df2b712b32766b14d477652797746c52147e7 +# Source: docs/api/masfeat-api.yaml at platform commit ba5201a52edd2bfbe9f1dadd736f19cae03d9cc4 +# Source sha256: eb224773c2a14fc6a84a630b652b17e010a4776da28529b13e173b002d2d4756 # Schema declarations and property names only; see tests/fixtures/openapi/README.md. components: schemas: diff --git a/tests/fixtures/openapi/orchestrator-api.yaml b/tests/fixtures/openapi/orchestrator-api.yaml index 46f9a9a1..2befa340 100644 --- a/tests/fixtures/openapi/orchestrator-api.yaml +++ b/tests/fixtures/openapi/orchestrator-api.yaml @@ -1,6 +1,6 @@ # GENERATED by scripts/snapshot_openapi_schemas.py - do not edit. -# Source: docs/api/orchestrator-api.yaml at platform commit 36e0e96b7e5c16626d394272b727b533f2b94a04 -# Source sha256: b173c9bec456e4af3aa09c63306e503caa73ca0cf61da3dfaa7b21453dcd1188 +# Source: docs/api/orchestrator-api.yaml at platform commit ba5201a52edd2bfbe9f1dadd736f19cae03d9cc4 +# Source sha256: a1f96d929ff35acb1204ce5ba3c6e605b8f91d93e7fa62a2fa8a760ea8486860 # Schema declarations and property names only; see tests/fixtures/openapi/README.md. components: schemas: @@ -17,6 +17,23 @@ components: "separation_of_duties": {} "tier_established": {} "reserved": {} + "TemplateOmissionReport": + properties: + "omitted": {} + "modified": {} + "of": {} + "message": {} + "TypedAuthoringActivation": + properties: + "kind": {} + "root": {} + "digest": {} + "previous_digest": {} + "document_id": {} + "document_version": {} + "actor": {} + "at": {} + "reason": {} "AuthoringFinding": properties: "code": {} @@ -129,6 +146,10 @@ components: "provider_info": {} "processing_time": {} "media_analysis": {} + "engine": {} + "subject_type": {} + "policy_bundle": {} + "verdict": {} "PolicyEvaluationResult": properties: "allowed": {} @@ -142,9 +163,6 @@ components: "evaluation_error": {} "segments_resolved": {} "applied_policies_detail": {} - "override_applied": {} - "override_id": {} - "override_reason": {} "preferred_provider": {} "allowed_providers": {} "routing_reason": {} @@ -190,6 +208,10 @@ components: "metadata": {} "error": {} "policy_info": {} + "engine": {} + "subject_type": {} + "policy_bundle": {} + "verdict": {} "complexity": {} "domain": {} "parallel": {} @@ -234,6 +256,7 @@ components: "next_step_name": {} "step_result": {} "total_steps": {} + "ignored_foreign_gate_rows": {} "workflow_id": {} "RollbackPlanResponse": properties: @@ -491,6 +514,9 @@ components: "approval_url": {} "policies_evaluated": {} "policies_matched": {} + "engine": {} + "subject_type": {} + "policy_bundle": {} "cached": {} "decision_source": {} "retry_context": {} @@ -671,35 +697,6 @@ components: "approval_status": {} "paused_at_step": {} "paused_reason": {} - "MCPDynamicPolicyMatch": - properties: - "policy_id": {} - "policy_name": {} - "policy_type": {} - "action": {} - "reason": {} - "MCPPolicyEvaluationRequest": - properties: - "tenant_id": {} - "organization_id": {} - "user_id": {} - "user_role": {} - "segment_ids": {} - "connector_name": {} - "operation": {} - "statement": {} - "parameters": {} - "request_time": {} - "client_ip": {} - "metadata": {} - "MCPPolicyEvaluationResponse": - properties: - "allowed": {} - "block_reason": {} - "policies_evaluated": {} - "matched_policies": {} - "processing_time_ms": {} - "metadata": {} "RBIAISystemSummary": properties: "total_systems": {} @@ -742,6 +739,7 @@ components: properties: "success": {} "error": {} + "MultiAgentStepRefusal": {} "TripletErrorResponse": properties: "error": {} @@ -1495,6 +1493,7 @@ components: "pii_types": {} "has_extracted_text": {} "extracted_text_length": {} + "scanned": {} "estimated_cost_usd": {} "warnings": {} "structured_warnings": {} @@ -1607,7 +1606,6 @@ components: "created_at": {} "revoked_at": {} "revoked_by": {} - "CreateOverrideResponse": {} "OverrideSummary": {} "OverrideDetail": {} "DecisionListResponse": diff --git a/tests/fixtures/openapi/policy-api.yaml b/tests/fixtures/openapi/policy-api.yaml index 47171592..0b0bddae 100644 --- a/tests/fixtures/openapi/policy-api.yaml +++ b/tests/fixtures/openapi/policy-api.yaml @@ -1,6 +1,6 @@ # GENERATED by scripts/snapshot_openapi_schemas.py - do not edit. -# Source: docs/api/policy-api.yaml at platform commit 36e0e96b7e5c16626d394272b727b533f2b94a04 -# Source sha256: 090730a359bf242b6ed5c1a0d63a2831c749583bd957cc3ecc64c99ead5514b7 +# Source: docs/api/policy-api.yaml at platform commit ba5201a52edd2bfbe9f1dadd736f19cae03d9cc4 +# Source sha256: a1a7aff59d759033f99721a40d942e8750c6026d69f9efb0edf66016f0069ae9 # Schema declarations and property names only; see tests/fixtures/openapi/README.md. components: schemas: diff --git a/tests/fixtures/wire-shape-baseline.json b/tests/fixtures/wire-shape-baseline.json index 3a3f775f..63ac45dc 100644 --- a/tests/fixtures/wire-shape-baseline.json +++ b/tests/fixtures/wire-shape-baseline.json @@ -118,6 +118,7 @@ "status", "tier", "timestamp", + "upstream", "version" ], "orchestrator-api.yaml": [ @@ -148,6 +149,30 @@ "timestamp" ] }, + "PendingApproval": { + "agent-api.yaml": [ + "approval_id", + "expires_at", + "plane", + "retry", + "status" + ], + "orchestrator-api.yaml": [ + "approval_status", + "created_at", + "decision", + "decision_reason", + "plan_id", + "policies_matched", + "step_id", + "step_index", + "step_input", + "step_name", + "step_type", + "workflow_id", + "workflow_name" + ] + }, "UpdatePolicyRequest": { "orchestrator-api.yaml": [ "action", @@ -174,7 +199,7 @@ } }, "intra_file_duplicates": {}, - "openapi_specs_sha": "36e0e96b7e5c16626d394272b727b533f2b94a04", + "openapi_specs_sha": "ba5201a52edd2bfbe9f1dadd736f19cae03d9cc4", "per_type_drift": { "AISystemRegistry": { "sdk_only": [ @@ -252,8 +277,10 @@ "ClientResponse": { "sdk_only": [], "spec_only": [ - "approval_request_id", - "metadata" + "code", + "metadata", + "policy_packs", + "response_plane" ] }, "ConfigureKillSwitchRequest": { @@ -335,26 +362,12 @@ "policy_version_at_decision" ] }, - "DecisionTarget": { - "sdk_only": [], - "spec_only": [ - "server" - ] - }, "DynamicPolicy": { "sdk_only": [ "organization_id" ], "spec_only": [] }, - "DynamicPolicyMatch": { - "sdk_only": [ - "reason" - ], - "spec_only": [ - "message" - ] - }, "EffectivePoliciesResponse": { "sdk_only": [ "dynamic" @@ -371,15 +384,6 @@ "retry_count" ] }, - "ExfiltrationCheckInfo": { - "sdk_only": [ - "within_limits" - ], - "spec_only": [ - "exceeded", - "limit_type" - ] - }, "ExplainPolicy": { "sdk_only": [ "allowOverride", @@ -490,6 +494,7 @@ "MCPCheckInputRequest": { "sdk_only": [], "spec_only": [ + "approval_id", "client_id", "tenant_id", "user_id", @@ -497,6 +502,19 @@ "user_token" ] }, + "MCPCheckInputResponse": { + "sdk_only": [], + "spec_only": [ + "approval_id", + "engine", + "legacy_validators", + "pending_approval", + "policy_bundle", + "policy_packs", + "redacted_parameters", + "subject_type" + ] + }, "MCPCheckOutputRequest": { "sdk_only": [], "spec_only": [ @@ -511,7 +529,9 @@ "policy_matches", "redacted_message" ], - "spec_only": [] + "spec_only": [ + "policy_packs" + ] }, "PaginationMeta": { "sdk_only": [ @@ -548,9 +568,13 @@ "estimated_duration" ], "spec_only": [ + "engine", "error", + "policy_bundle", "policy_info", + "subject_type", "success", + "verdict", "version", "workflow_execution_id" ] @@ -570,9 +594,6 @@ "allowed_providers", "applied_policies_detail", "evaluation_error", - "override_applied", - "override_id", - "override_reason", "preferred_provider", "routing_reason", "segments_resolved", @@ -591,7 +612,6 @@ "spec_only": [ "block_reason", "blocked", - "dynamic_policy_info", "exfiltration_check", "matched_policies", "processing_time_ms", @@ -646,6 +666,7 @@ "ResumePlanResponse": { "sdk_only": [], "spec_only": [ + "ignored_foreign_gate_rows", "result", "step_result" ] @@ -672,7 +693,16 @@ "spec_only": [ "approval_enqueue", "approval_id", - "decision_id" + "decision_id", + "engine", + "policy_bundle", + "subject_type" + ] + }, + "TemplateOmissionReport": { + "sdk_only": [], + "spec_only": [ + "modified" ] }, "TriggerKillSwitchRequest": { @@ -809,8 +839,6 @@ "DecisionExplanation", "DecisionTarget", "DynamicPolicy", - "DynamicPolicyInfo", - "DynamicPolicyMatch", "EditionConstructReport", "EffectivePoliciesResponse", "ExecutionSnapshot", @@ -874,6 +902,7 @@ "StaticPolicy", "StepGateRequest", "StepGateResponse", + "TemplateOmissionReport", "TimelineEntry", "TokenUsage", "ToolContext",