From 48f3884533b6c5a8dce92f0fa62e64b6b88522a6 Mon Sep 17 00:00:00 2001 From: Noam Alum Date: Mon, 9 Nov 2026 15:53:37 +0200 Subject: [PATCH 1/2] fix(protocol): remove provider profile claims --- CLAUDE.md | 6 +- .../procedures/capability-assessment.md | 2 +- docs/v0.1.0/procedures/operation-admission.md | 36 +++----- .../procedures/operation-admission.yaml | 4 +- .../progress-results-cancellation.md | 8 +- docs/v0.1.0/procedures/provider-manifest.md | 73 +++++---------- docs/v0.1.0/reference/glossary.md | 8 +- docs/v0.1.0/reference/python-contracts.md | 2 +- .../reference/security-trust-boundary.md | 5 +- docs/v0.1.0/reference/status-errors.md | 2 +- .../reference/versioning-compatibility.md | 4 +- .../sfp/manifest/v1/manifest.proto | 14 +-- .../v1/operation_admission.proto | 16 +--- .../v1/operation_lifecycle.proto | 2 +- scripts/ci/verify_installed.py | 11 +++ .../sfp/manifest/v1/contract.py | 1 - .../sfp/manifest/v1/manifest.schema.json | 14 +-- .../sfp/manifest/v1/manifest_pb2.py | 88 +++++++++---------- .../sfp/manifest/v1/manifest_pb2.pyi | 24 +---- .../sfp/operation_admission/v1/contract.py | 1 - .../v1/operation_admission.schema.json | 17 +--- .../v1/operation_admission_pb2.py | 34 +++---- .../v1/operation_admission_pb2.pyi | 26 ++---- .../sfp/operation_admission/v1/validation.py | 5 +- .../v1/operation_lifecycle_pb2.pyi | 2 +- .../accepted-manifest.json | 16 ++-- .../invalid/duplicate-operation-request.json | 2 +- .../invalid/invariant-violation-response.json | 2 +- .../unspecified-support-state-response.json | 2 +- .../capability_assessment/request.json | 2 +- .../response-mixed-states.json | 2 +- .../manifest/presentation-response.json | 7 +- tests/fixtures/manifest/response.json | 5 +- .../fixtures/manifest/revision-preimage.json | 2 +- .../operation_admission/error-cases.json | 2 +- .../fingerprint-vector.json | 6 +- .../invalid/default-request.json | 3 +- .../invalid/payload-array-request.json | 9 +- .../fixtures/operation_admission/request.json | 6 +- .../response-accepted-new.json | 2 +- .../response-resolved-existing.json | 2 +- tests/fixtures/operation_lifecycle/README.md | 2 +- .../operation_lifecycle/cancel-request.json | 2 +- .../operation_lifecycle/cancel-requested.json | 2 +- .../operation_lifecycle/snapshots.json | 30 +++---- .../operation_lifecycle/watch-request.json | 2 +- .../operation_lifecycle/watch-terminal.json | 2 +- tests/test_manifest_contract.py | 71 ++++++--------- tests/test_manifest_session_contract.py | 2 +- tests/test_manifest_validation.py | 2 +- tests/test_operation_admission_contract.py | 42 ++++----- 51 files changed, 242 insertions(+), 390 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index a3986d2..1686ad4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -59,9 +59,9 @@ This repository contains authoritative Protocol Buffer sources and generated language contracts. It contains no Agent client behavior, Provider server runtime, third-party integration, BackupEngine, or Control Plane logic. -Operations are namespaced string identifiers rather than a closed enum. Backup -and disaster recovery are predefined compliance profiles constructed on the -generic operation model. Contracts must leave room for custom operations. +Operations are namespaced string identifiers rather than a closed enum. +Profiles and Contracts are managed by the Control Plane using concrete +operation and trigger schemas. SFP carries no Provider-owned Profile claims. Edit `.proto` sources first. Never hand-edit generated `_pb2.py`, `_pb2.pyi`, `_pb2_grpc.py`, or `_pb2_grpc.pyi` files. Regenerate them with the checked-in diff --git a/docs/v0.1.0/procedures/capability-assessment.md b/docs/v0.1.0/procedures/capability-assessment.md index 72fad0d..c7f13c7 100644 --- a/docs/v0.1.0/procedures/capability-assessment.md +++ b/docs/v0.1.0/procedures/capability-assessment.md @@ -247,7 +247,7 @@ payload. "providerInstanceId": "550e8400-e29b-41d4-a716-446655440000", "endpointGeneration": "4", "sessionId": "session-3d19b6d2-4b7b-4f4a-9c9a-2f3f4f0c9a1b (2)", - "manifestRevision": "sha256:dd58cd0518f631e370a095e6ba0c97476b028c8c65fac1f4b8da28d130c94cb7", + "manifestRevision": "sha256:4ad60e2cc41a8e180190739cf07acdd511d8236aedf585820897fdbd61d404c9", "assessmentId": "6ba7b810-9dad-41d1-80b4-00c04fd430c8 (3)", "assessmentTimestamp": "2026-09-16T07:30:00Z", "findings": [ diff --git a/docs/v0.1.0/procedures/operation-admission.md b/docs/v0.1.0/procedures/operation-admission.md index 8eb8e7a..3c227b6 100644 --- a/docs/v0.1.0/procedures/operation-admission.md +++ b/docs/v0.1.0/procedures/operation-admission.md @@ -41,7 +41,7 @@ scenario: first-admission Agent->>Service: StartOperation(request) Service->>Service: Validate structure and live fences - Service->>Service: Validate declaration, roles, and payload + Service->>Service: Validate declaration and payload Service->>Service: Fingerprint immutable invocation Service->>Registry: Look up operation_id @@ -189,11 +189,7 @@ invocation from fields needed to validate the current call. }, "executionDeadline": "2026-09-20T12:00:00Z", "contract": { - "manifestRevision": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (4)", - "requiredImplementationRoles": [ - "stateforge.operation.v1.safe", - "stateforge.operation.v1.audited" - ] + "manifestRevision": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (4)" }, "executionContext": { "authority": "policy-run-123", @@ -236,7 +232,6 @@ fingerprint. | `payload` | Required JSON object validated against the selected operation's manifest `input_schema` before admission. An operation that acts on a resource identifies it here, using its own schema; an operation with no resource needs no placeholder. Provider-level `configuration_schema` does not validate operation input. JSON Schema defaults are annotations and are not silently inserted. | | `execution_deadline` | Absolute Agent-selected deadline for the business attempt. It is distinct from the gRPC call deadline and is immutable. | | `contract.manifest_revision` | Exact accepted manifest revision. It pins the operation declaration and its input/result schemas. | -| `contract.required_implementation_roles` | Zero or more distinct profile claims from the selected operation's manifest `implements` list that this invocation relies on. This may be a subset of all declared claims. Empty means this invocation requires no profile claim. These are not permissions. | | `execution_context` | Required bounded JSON object containing already-approved, non-secret execution metadata. SFP transports context; it does not make the policy or authorization decision. | ### Comparison and safety rules @@ -244,7 +239,6 @@ fingerprint. | Concern | Rule | | --- | --- | | JSON values | Object-member order is irrelevant. Adding, removing, or changing a value changes the invocation. Schema defaults are not inserted automatically. | -| Required roles | Roles form an unordered, duplicate-free set. Every requested role must appear in the operation declaration; membership is not authorization or proof of compliance. | | Secrets | Values declared `writeOnly` must not appear in responses, errors, diagnostics, fixtures, or logs. | The request fingerprint correlates retries. It is not authentication and must @@ -258,8 +252,7 @@ invocation**. It is not a hash of the complete RPC request. ```mermaid flowchart LR A[OperationInvocation] --> B[ProtoJSON projection] - B --> C[Sort required roles only] - C --> D[RFC 8785 canonical JSON] + B --> D[RFC 8785 canonical JSON] D --> E[SHA-256] E --> F[sha256: lowercase hex] ``` @@ -269,18 +262,16 @@ flowchart LR | Operation ID and operation identifier | Current Provider, generation, and session binding | | Complete payload and execution context | Admission mode | | Execution deadline | gRPC call deadline | -| Manifest revision and required roles | Transport metadata | +| Manifest revision | Transport metadata | The Provider computes the fingerprint before looking up `operation_id`: 1. Parse and structurally validate `StartOperationRequest`. 2. Project only `OperationInvocation` to ProtoJSON using lowerCamelCase field names and emitting all non-presence defaults. -3. Sort `contract.requiredImplementationRoles` lexicographically by Unicode - code point. Do not sort any other array. -4. Canonicalize the projected JSON with RFC 8785 (JCS). -5. Compute SHA-256 over the canonical UTF-8 bytes. -6. Encode the fingerprint as `sha256:` plus 64 lowercase hexadecimal digits. +3. Canonicalize the projected JSON with RFC 8785 (JCS). +4. Compute SHA-256 over the canonical UTF-8 bytes. +5. Encode the fingerprint as `sha256:` plus 64 lowercase hexadecimal digits. A reconnect or switch to resolve-only therefore preserves the fingerprint. Changing any immutable operation field while retaining the same operation ID @@ -314,7 +305,7 @@ silently redispatch work: ```mermaid flowchart TD A[Bound and decode request] --> B[Validate structure and active session] - B --> C[Validate manifest, operation, roles, and payload] + B --> C[Validate manifest, operation, and payload] C --> D[Compute invocation fingerprint] D --> E{Retained state for operation ID?} E -->|Matching record| F[RESOLVED_EXISTING] @@ -333,7 +324,7 @@ flowchart TD `admission_mode`. 3. Validate the active handshake session, Provider identity, and generation. 4. Match `contract.manifest_revision` to the Agent-accepted active manifest. - Confirm the operation is declared, every required role is present, and the + Confirm the operation is declared and the complete payload satisfies the selected operation's accepted input schema. 5. Compute the canonical invocation fingerprint. 6. Look up `operation_id` before testing a new-admission deadline or capacity: @@ -356,7 +347,7 @@ has since passed. The lifecycle contract determines what the operation did, not a new admission attempt. Capability assessment is point-in-time evidence, not authorization. Admission -revalidates the current session, manifest, declaration, roles, schemas, +revalidates the current session, manifest, declaration, schemas, readiness, and any current prerequisites instead of trusting an earlier Capability Assessment result. @@ -383,7 +374,7 @@ invalid. "disposition": "ADMISSION_DISPOSITION_ACCEPTED_NEW (1)", "record": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df (2)", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df (2)", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" @@ -406,7 +397,7 @@ invalid. "disposition": "ADMISSION_DISPOSITION_RESOLVED_EXISTING (2)", "record": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42 (3)" @@ -447,7 +438,7 @@ delay, and sanitized explanation. | --- | --- | --- | --- | | Malformed fields, invalid identifiers, invalid bounds, or schema-invalid payload | `INVALID_ARGUMENT` | `INVALID_OPERATION_REQUEST` | Correct the request. Reusing the same ID is permitted only because the Provider explicitly rejected before admission. | | Operation absent from the accepted manifest | `UNIMPLEMENTED` | `OPERATION_NOT_DECLARED` | Refresh declarations or choose declared work; do not reinterpret the identifier. | -| Selected operation schema or required profile role is incompatible | `FAILED_PRECONDITION` | `OPERATION_INCOMPATIBLE` | Obtain a compatible declaration or profile and use a new operation ID if semantic content changes. | +| Selected operation schema is incompatible | `FAILED_PRECONDITION` | `OPERATION_INCOMPATIBLE` | Obtain a compatible declaration and use a new operation ID if semantic content changes. | | Session, generation, manifest, health, or current prerequisite is stale | `FAILED_PRECONDITION` | `OPERATION_PRECONDITION_FAILED` | Re-establish prerequisites. Reuse the ID only with identical invocation content. | | Admission capacity temporarily exhausted | `RESOURCE_EXHAUSTED` | `PROVIDER_CAPACITY_EXHAUSTED` | Retry the identical request with bounded backoff; honor `retry_after` when present. | | Whole Provider service temporarily unavailable | `UNAVAILABLE` | `PROVIDER_UNAVAILABLE` | Reconnect and revalidate before a bounded retry. | @@ -522,7 +513,6 @@ generation zero, and `UNSPECIFIED` enums are invalid. | Entries per JSON object or array | 256 | | JSON property name | 128 Unicode code points | | JSON string value | 65,536 Unicode code points | -| Required implementation roles | 16 unique entries | | Versioned identifier or role identifier | 255 Unicode code points | | Session ID | 255 Unicode code points | | Sanitized error explanation | 1,024 Unicode code points | diff --git a/docs/v0.1.0/procedures/operation-admission.yaml b/docs/v0.1.0/procedures/operation-admission.yaml index 6f851e9..a8504a5 100644 --- a/docs/v0.1.0/procedures/operation-admission.yaml +++ b/docs/v0.1.0/procedures/operation-admission.yaml @@ -79,7 +79,7 @@ scenarios: - id: validate-request title: Validate the current contract - detail: The Admission Service validates message shape, the active session, the accepted manifest revision, the operation declaration, roles, payload schema, and current prerequisites. + detail: The Admission Service validates message shape, the active session, the accepted manifest revision, the operation declaration, payload schema, and current prerequisites. phase: Validation active: [admission] fields: [active session, manifest revision, input schema, prerequisites] @@ -96,7 +96,7 @@ scenarios: - id: compute-fingerprint title: Fingerprint the immutable invocation - detail: The Admission Service projects only OperationInvocation, sorts required implementation roles, canonicalizes it with RFC 8785, and hashes the bytes with SHA-256. + detail: The Admission Service projects only OperationInvocation, canonicalizes it with RFC 8785, and hashes the bytes with SHA-256. phase: Canonical identity active: [admission] fields: [OperationInvocation, RFC 8785, SHA-256] diff --git a/docs/v0.1.0/procedures/progress-results-cancellation.md b/docs/v0.1.0/procedures/progress-results-cancellation.md index 0f1454b..57701a5 100644 --- a/docs/v0.1.0/procedures/progress-results-cancellation.md +++ b/docs/v0.1.0/procedures/progress-results-cancellation.md @@ -182,7 +182,7 @@ carries the last validated sequence. "expectedSessionId": "session-admission-42" }, "operationId": "22222222-2222-4222-8222-222222222222 (2)", - "expectedRequestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df (3)", + "expectedRequestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df (3)", "afterSequence": "0 (4)" } ``` @@ -202,7 +202,7 @@ carries the last validated sequence. "expectedSessionId": "session-admission-42" }, "operationId": "22222222-2222-4222-8222-222222222222", - "expectedRequestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df" + "expectedRequestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df" } ``` @@ -293,7 +293,7 @@ current state and any terminal outcome. "snapshot": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" @@ -390,7 +390,7 @@ All four dispositions are successful gRPC responses. "snapshot": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" diff --git a/docs/v0.1.0/procedures/provider-manifest.md b/docs/v0.1.0/procedures/provider-manifest.md index 844e732..5098102 100644 --- a/docs/v0.1.0/procedures/provider-manifest.md +++ b/docs/v0.1.0/procedures/provider-manifest.md @@ -193,8 +193,7 @@ revisioned declaration snapshot. "type": "object", "properties": {}, "additionalProperties": false - }, - "implements": [] + } } }, "runtimeRequirements": { @@ -228,7 +227,7 @@ revisioned declaration snapshot. }, "triggers": {} }, - "manifestRevision": "sha256:6bfdf3aedc2d4e45d77d4787cc0e744a488208b2510d81788291f51d24a623e8 (3)", + "manifestRevision": "sha256:aa27f0fddaa13df211bd3e4e4e4230cdda42d9188d4b480d196c2e0de2d20cdb (3)", "sessionId": "manifest-session-A (4)" } ``` @@ -300,7 +299,7 @@ pipeline, and limits remain defined on this page. ## Declaration model The public Provider framework constructs these declarations from Python -metadata, typed models, decorators, and explicit compliance claims. Provider +metadata, typed models, and decorators. Provider authors do not construct protobuf messages or calculate revisions themselves. | Declaration | Schema-1 meaning | @@ -308,7 +307,7 @@ authors do not construct protobuf messages or calculate revisions themselves. | `provider_identity` | Author-declared dotted lowercase identity such as `stateforge.git`. | | `implementation_version` | SemVer 2.0.0 of the running Provider implementation. | | `display_name` | Nonempty human-readable name. | -| `operations` | Map from extensible operation identifier to Draft 2020-12 input schema, result schema, and explicit `implements` roles. | +| `operations` | Map from extensible operation identifier to Draft 2020-12 input and result schemas. | | `runtime_requirements` | Map of dotted requirement identifiers to descriptions and version constraints. These are declarations, not installed-state observations or commands to execute. | | `platforms` | Nonempty list of explicit operating-system/architecture pairs, such as `linux` / `x86_64`. No wildcard or implied Cartesian product. | | `configuration_schema` | JSON Schema Draft 2020-12 object schema describing configuration shape. | @@ -367,42 +366,19 @@ not by `stateforge-protocol`. that the requirement is satisfied. Capability Assessment and Operation Admission own that later runtime decision. -### Profiles express interoperability - -A **profile** is a separately named and versioned contract for a reusable -operation role. It can define common semantics, schemas, and behavior outside -the generic SFP operation model. This lets consumers recognize operations that -implement the same role even when their Provider-specific operation identifiers -are different. - -A **profile claim** is the Provider's explicit assertion that one operation -conforms to that profile: - -```text -stateforge.git/reference.resolve@1 - └── implements → example.vendor.profile.v1.read_only -``` - -| Concept | What it identifies | -| --- | --- | -| Operation identifier | The concrete operation exposed by this Provider. | -| Profile identifier | The reusable external contract. | -| Entry in `implements` | The operation's explicit claim that it conforms to that profile. | - -| SFP does | SFP does not | -| --- | --- | -| Validate each claim's identifier shape. | Assign application-specific meaning to a claim. | -| Transport declared claims unchanged. | Infer a claim from an operation's name or schemas. | -| Treat `implements: []` as no claims. | Treat an empty list as implicit support. | +### Profiles and Contracts -Another specification may define a profile's schemas and semantics. Manifest -Exchange only carries the explicit claim. +Providers describe concrete operations through input and result schemas, and +triggers through event-payload schemas. They do not declare Profile compliance. -!!! note "Declaration, not runtime evidence" +The Control Plane owns Profile definitions, schema-based matching, field +mappings, and Contract fulfillment. Matching names with compatible types and +constraints can supply automatic mappings. Differently named fields remain +mapping candidates; partial matches are not complete fulfillment. Structural +compatibility does not prove behavioral compliance. - A profile claim describes what the operation implements. It does not prove - that the operation can run in the current environment; Capability - Assessment decides that later. +The planned SF-AOP connection will carry accepted declarations through the Agent +to the Control Plane. This is not an implemented SFP matching service. ### Every operation has the same shape @@ -414,19 +390,17 @@ Exchange only carries the explicit claim. result_schema: $schema: https://json-schema.org/draft/2020-12/schema type: object - implements: [] ``` | Field | Meaning | | --- | --- | | `input_schema` | The operation's accepted input shape. | | `result_schema` | The operation's terminal result shape. This is its only manifest-level result declaration. | -| `implements` | The operation's explicit profile claims; an empty list claims none. | !!! important "Do not infer another contract" - Construction and validation must not invent result modes or profile claims - from operation names, roles, or schema payloads. Names inside embedded + Construction and validation must not invent result modes + from operation names or schema payloads. Names inside embedded schemas remain ordinary schema data; they do not create manifest fields or claims. @@ -511,7 +485,7 @@ declarations, or maintain Agent caches. | Provider instance identity | Canonical lowercase UUIDv4. | | Endpoint generation | Positive decimal value within protobuf's `uint64` range. | | Implementation version | SemVer 2.0.0. | -| Operation, trigger, requirement, and profile identifiers | Their respective canonical identifier syntax. | +| Operation, trigger, and requirement identifiers | Their respective canonical identifier syntax. | | Manifest schema version | A known supported version. | | Manifest revision | `sha256:` followed by 64 lowercase hexadecimal characters. | | Presentation schema version | Version `1` when a presentation snapshot is included. | @@ -532,7 +506,6 @@ Implementations enforce these limits before accepting a snapshot: | Schema nodes processed per embedded document | 25,000 | | Each operations, triggers, or requirements map | 1,024 entries | | Platform pairs | 256 unique pairs | -| Profile claims per operation | 64 unique claims | | Embedded JSON nesting | 64 containers | | Presentation assets | 64 assets; 256 KiB each; 1 MiB total | | Presentation dimensions | 8192 × 8192 pixels | @@ -592,15 +565,14 @@ revision = validation.compute_manifest_revision( [RFC 8785 JSON Canonicalization Scheme](https://www.rfc-editor.org/rfc/rfc8785.html), encode it as UTF-8, and set the revision to `sha256:` followed by the lowercase SHA-256 digest. Include all schema-1 declaration fields, including display -metadata, explicit empty maps/lists/strings, embedded schemas, and compliance -claims. Exclude `manifest_revision`, `endpoint_generation`, and `session_id`. +metadata, explicit empty maps/lists/strings, and embedded schemas. Exclude `manifest_revision`, `endpoint_generation`, and `session_id`. Thus a new handshake or a restart with unchanged declarations and stable installation identity can retain its revision, while a new installation or changed declarations gets a new one. Session binding changes only the exchange envelope: the checked-in canonical preimage bytes and golden digest stay the same. -Changing an input or result schema changes the revision even if the role is +Changing an input or result schema changes the revision even if the operation identifier is unchanged. Object/map key insertion order does not affect the revision. Array order is preserved and contributes to the revision, including JSON Schema arrays. A Provider should generate stable ordering for set-like declaration lists to @@ -612,7 +584,7 @@ Do not hash protobuf bytes, even with deterministic serialization enabled: [protobuf serialization is not canonical](https://protobuf.dev/programming-guides/serialization-not-canonical/). The checked-in `tests/fixtures/manifest/response.json` and `revision-preimage.json` form a cross-language conformance vector. Its revision -is `sha256:6bfdf3aedc2d4e45d77d4787cc0e744a488208b2510d81788291f51d24a623e8`. +is `sha256:aa27f0fddaa13df211bd3e4e4e4230cdda42d9188d4b480d196c2e0de2d20cdb`. ## Agent acceptance and caching @@ -626,10 +598,9 @@ is `sha256:6bfdf3aedc2d4e45d77d4787cc0e744a488208b2510d81788291f51d24a623e8`. cache entry. On a match, reuse that exact cached declaration; do not merge fields from the new response or skip current session/generation checks. 4. For a new key, call the versioned semantic validator before acceptance. It - validates the complete schema, embedded references, identity, claim shapes, + validates the complete schema, embedded references, identity, identifier shapes, limits, and canonical digest. Store only accepted snapshots. A revision is - a change detector, not authentication. Profile-specific conformance still - requires the validators and behavior tests defined by that profile. + a change detector, not authentication. 5. Validate `presentation` independently. Cache it by Provider identity, accepted manifest revision, presentation schema version, and presentation revision. If it is absent, unsupported, or invalid, discard it and retain diff --git a/docs/v0.1.0/reference/glossary.md b/docs/v0.1.0/reference/glossary.md index 5f714f7..851db47 100644 --- a/docs/v0.1.0/reference/glossary.md +++ b/docs/v0.1.0/reference/glossary.md @@ -78,15 +78,13 @@ governing each version surface. | Term | Meaning | |---|---| | **Provider manifest** | Complete revisioned declaration of a Provider's identity, operations, triggers, schemas, requirements, and compatibility. It contains no configured secret values. | -| **Operation declaration** | Manifest entry defining one operation identifier, input and result schemas, requirements, and profile claims. | +| **Operation declaration** | Manifest entry defining one concrete operation's input and result schemas. | | **Trigger declaration** | Manifest entry defining one trigger identifier and its payload schema. | | **Operation or trigger identifier** | Case-sensitive extensible identifier in `namespace/name@major` form. It names a declared type, not one occurrence. | | **Runtime requirement** | Named prerequisite declared for an operation and evaluated against the target runtime during Capability Assessment. | | **Platform compatibility** | Manifest-declared operating-system or architecture compatibility. It is static declaration data, not current runtime evidence. | | **Configuration schema** | JSON Schema describing Provider configuration shape. Fields marked `writeOnly` may carry secrets and must not be echoed. | -| **Profile** | External versioned semantic or compliance contract that may be implemented by an operation. SFP carries the identifier but does not define the external semantics. | -| **Profile claim** (`implements`) | Operation declaration's claim that it implements a named profile. An empty list claims none. | -| **Required implementation role** | Invocation-selected subset of the operation's declared profile claims. Membership validation is not authorization or proof of compliance. | +| **Profile** | Control Plane-managed capability definition matched to concrete schemas and field mappings. SFP carries no Provider-owned Profile claims. | | **Health** | Standard gRPC Health status for overall Provider process readiness, watched with an empty service name. | | **Availability** | Agent-derived state describing whether the current Provider session can accept new work after transport, session, manifest, and Health checks. | | **Eligibility** | Whether the Agent may use a Provider for a particular procedure after that procedure's prerequisites are satisfied. | @@ -100,7 +98,7 @@ governing each version surface. |---|---| | **Operation identifier** (`operation_identifier`) | Manifest key naming the declared operation type. | | **Operation ID** (`operation_id`) | Agent-assigned UUIDv4 for one immutable business attempt. Reusing it with different content is an idempotency conflict. | -| **Operation invocation** | Immutable request content for one operation ID: operation identifier, payload, deadline, pinned contract context, execution context, and required roles. | +| **Operation invocation** | Immutable request content for one operation ID: operation identifier, payload, deadline, pinned contract context, and execution context. | | **Payload** | JSON input validated against the operation declaration's input schema. | | **Execution context** | Agent-approved non-secret metadata that may affect runtime assessment or execution. | | **Admission** | Provider decision that either creates exactly one operation record or resolves an already retained record for the same operation ID. | diff --git a/docs/v0.1.0/reference/python-contracts.md b/docs/v0.1.0/reference/python-contracts.md index 9fb5f16..4ec6f1e 100644 --- a/docs/v0.1.0/reference/python-contracts.md +++ b/docs/v0.1.0/reference/python-contracts.md @@ -173,7 +173,7 @@ Common categories include: | --- | --- | | RPC size | `MAX_REQUEST_BYTES`, `MAX_RESPONSE_BYTES` | | Canonical content | JSON depth, node count, string length, and preimage size | -| Collections | Operations, triggers, findings, roles, observers, or in-flight publications | +| Collections | Operations, triggers, findings, observers, or in-flight publications | | Stable identities | `SERVICE_NAME`, descriptor suffix, transport name, reason-code vocabulary | | Flow control | Pending snapshots, observers, retry bounds, and stalled-delivery deadlines | diff --git a/docs/v0.1.0/reference/security-trust-boundary.md b/docs/v0.1.0/reference/security-trust-boundary.md index 5b38b54..e512ad7 100644 --- a/docs/v0.1.0/reference/security-trust-boundary.md +++ b/docs/v0.1.0/reference/security-trust-boundary.md @@ -83,7 +83,7 @@ flowchart LR | Endpoint observation | Canonical bounded descriptor plus a correlated Unix socket | Opening a provisional channel to one Provider generation | A negotiated session or permission to use later procedures | | Bootstrap session | Matching Provider identity and generation, mutually supported wire version, Provider runtime ID, fresh session ID | Binding the channel to one negotiated SFP session | Authorization to invoke an operation | | Accepted declaration | Valid manifest envelope, schemas, deterministic revision, and current Health | Selecting declared operations and triggers from the current Provider surface | That a declaration is truthful or that an operation is safe now | -| Runtime admission | Current session, declaration, availability, schema, profile, prerequisite, capacity, deadline, and policy checks | Creating or resolving one immutable operation record | That an earlier capability finding remains current | +| Runtime admission | Current session, declaration, availability, schema, prerequisite, capacity, deadline, and policy checks | Creating or resolving one immutable operation record | That an earlier capability finding remains current | ## The local trust anchor @@ -152,10 +152,9 @@ approval. | Signal | What it means | What it does not mean | | --- | --- | --- | -| Manifest declaration | The Provider declares an operation, trigger, schema, requirement, or profile claim | The Agent authorizes its use or the implementation satisfies the claim | +| Manifest declaration | The Provider declares an operation, trigger, schema, or runtime requirement | The Agent authorizes its use | | Health `SERVING` | The Provider reports process-wide readiness and the Agent may include it in eligibility | A target is authorized or a particular operation will succeed | | Capability finding | Point-in-time evidence about runtime support and requirements | Authorization, capacity reservation, or a durable promise | -| Profile claim or required role | A versioned semantic claim is declared and selected | A permission or independent proof of compliance | | Admission success | The Provider atomically accepted or resolved one immutable invocation under current fences | Authorization for a different invocation or identity | The Agent passes only approved, non-secret metadata in `execution_context`. diff --git a/docs/v0.1.0/reference/status-errors.md b/docs/v0.1.0/reference/status-errors.md index d24036f..6aa5088 100644 --- a/docs/v0.1.0/reference/status-errors.md +++ b/docs/v0.1.0/reference/status-errors.md @@ -121,7 +121,7 @@ identity. | --- | --- | --- | | `ADMISSION_ERROR_REASON_INVALID_OPERATION_REQUEST` | `INVALID_ARGUMENT` | The immutable request is malformed or schema-invalid. | | `ADMISSION_ERROR_REASON_OPERATION_NOT_DECLARED` | `UNIMPLEMENTED` | The accepted manifest does not declare the operation. | - | `ADMISSION_ERROR_REASON_OPERATION_INCOMPATIBLE` | `FAILED_PRECONDITION` | The requested schema or profile context is incompatible. | + | `ADMISSION_ERROR_REASON_OPERATION_INCOMPATIBLE` | `FAILED_PRECONDITION` | The requested schema context is incompatible. | | `ADMISSION_ERROR_REASON_OPERATION_PRECONDITION_FAILED` | `FAILED_PRECONDITION` | A live session, manifest, health, or requirement fence is stale. | | `ADMISSION_ERROR_REASON_PROVIDER_CAPACITY_EXHAUSTED` | `RESOURCE_EXHAUSTED` | Admission capacity is temporarily exhausted. | | `ADMISSION_ERROR_REASON_PROVIDER_UNAVAILABLE` | `UNAVAILABLE` | The Provider is temporarily unavailable. | diff --git a/docs/v0.1.0/reference/versioning-compatibility.md b/docs/v0.1.0/reference/versioning-compatibility.md index 1f030a3..62c4cf7 100644 --- a/docs/v0.1.0/reference/versioning-compatibility.md +++ b/docs/v0.1.0/reference/versioning-compatibility.md @@ -59,7 +59,6 @@ The complete set of versioned surfaces is: | Agent software version | `agent_runtime.software_version` | The running Agent software release | Supplied by the Agent; required but never used to select the SFP wire version | | Provider implementation | `1.0.0` | The running Provider software release | Declared by the Provider; never used as the SFP wire version | | Operation or trigger identifier | `stateforge.git/reference.resolve@1` | One versioned domain action or event | Declared in the accepted manifest and matched exactly | -| Profile claim | `example.profile.v1.read_only` | A versioned semantic or compliance claim | Interpreted by the specification that defines that profile | ## How wire negotiation works @@ -113,7 +112,6 @@ independent: | Endpoint descriptor | The Agent parses only a descriptor schema it recognizes. An unknown schema is not interpreted as schema `1`. | | Provider manifest | After Bootstrap, the Agent offers supported manifest schema versions and the Provider returns the highest common version. No common schema produces `UNIMPLEMENTED`. | | Operation and trigger declarations | Identifiers are exact, extensible strings. `@1` is part of the declared domain identifier; it is not SFP `1.0`. | -| Profile claims | The profile's defining specification owns its version meaning. SFP validates and transports the claim without inventing that meaning. | This separation allows a package to add a new domain identifier or schema version without pretending that every such addition is a new transport @@ -152,7 +150,7 @@ same versioned contract. | Change | Version boundary to review | | --- | --- | | Fix implementation behavior without changing the public contract | Python distribution or Provider implementation release | -| Add a new operation, trigger, or profile identifier under existing extensibility rules | The identifier or profile version; not automatically the SFP wire version | +| Add a new operation or trigger identifier under existing extensibility rules | The identifier version; not automatically the SFP wire version | | Change the endpoint descriptor document incompatibly | Endpoint descriptor schema | | Change the Provider declaration shape incompatibly | Manifest schema | | Change a procedure's RPC shape or semantics incompatibly | Versioned procedure package and SFP wire compatibility | diff --git a/proto/stateforge_protocol/sfp/manifest/v1/manifest.proto b/proto/stateforge_protocol/sfp/manifest/v1/manifest.proto index 9a6492e..9173185 100644 --- a/proto/stateforge_protocol/sfp/manifest/v1/manifest.proto +++ b/proto/stateforge_protocol/sfp/manifest/v1/manifest.proto @@ -87,23 +87,13 @@ message ProviderManifest { map triggers = 9; } -// OperationDeclaration describes an available handler and explicit compliance -// claims. Declaring a role is not proof of compliance; consumers validate claims -// against the referenced profile. No StartOperation or execution behavior is -// introduced by this message. +// OperationDeclaration describes a concrete handler's input and result schemas. +// No StartOperation or execution behavior is introduced by this message. message OperationDeclaration { // Required Draft 2020-12 object schemas for typed input and terminal result. google.protobuf.Struct input_schema = 1; // The sole declaration of terminal result shape for this versioned operation. - // Recognized compliance roles require the exact schemas of their profile. google.protobuf.Struct result_schema = 2; - // Zero or more distinct claims that this operation implements versioned - // semantic/compliance profiles, e.g. - // example.vendor.profile.v1.read_only. SFP transports these extensible - // claims without assigning application-specific meaning to them. Empty - // means no profile claim. Never infer a role from the operation identifier - // or a Python method name. - repeated string implements = 3; } // RuntimeRequirement describes a dependency or prerequisite without transferring diff --git a/proto/stateforge_protocol/sfp/operation_admission/v1/operation_admission.proto b/proto/stateforge_protocol/sfp/operation_admission/v1/operation_admission.proto index eb5d2d5..1ff3b28 100644 --- a/proto/stateforge_protocol/sfp/operation_admission/v1/operation_admission.proto +++ b/proto/stateforge_protocol/sfp/operation_admission/v1/operation_admission.proto @@ -81,8 +81,8 @@ message OperationSessionBinding { } // OperationInvocation is the immutable semantic request identified by -// operation_id. Its complete ProtoJSON projection, with defaults emitted and -// required_implementation_roles sorted, is the canonical fingerprint preimage. +// operation_id. Its complete ProtoJSON projection, with defaults emitted, +// is the canonical fingerprint preimage. message OperationInvocation { // Agent-assigned canonical lowercase UUIDv4 allocated before first contact. // A genuinely new authorized attempt receives a new operation ID. @@ -96,25 +96,17 @@ message OperationInvocation { // the immutable request, not the gRPC call deadline. A deadline that has // elapsed rejects a new admission but does not erase a retained record. google.protobuf.Timestamp execution_deadline = 5; - // Pins the declaration/schema/profile expectations authorized by the Agent. + // Pins the accepted declaration and its schemas. OperationContractContext contract = 6; // Required bounded, non-secret execution metadata. Authorization and policy // decisions remain outside SFP; this object carries only approved context. google.protobuf.Struct execution_context = 7; } -// OperationContractContext pins the exact accepted declaration and optional -// compliance roles needed by this invocation without changing P1 schema 1. +// OperationContractContext pins the exact accepted declaration. message OperationContractContext { // Exact accepted GetManifestResponse.manifest_revision. string manifest_revision = 1; - // Distinct profile claims this invocation relies on: a subset of the selected - // operation's P1 implements list, not a list of Control Plane contracts or - // permissions. The Agent validates recognized profiles before relying on - // them; the Provider checks that each requested claim is declared. Empty - // means no profile claim is required for this invocation. Ordering is - // semantically irrelevant and is sorted in the fingerprint projection. - repeated string required_implementation_roles = 2; } // StartOperationResponse reports only the admission-layer record. The later diff --git a/proto/stateforge_protocol/sfp/operation_lifecycle/v1/operation_lifecycle.proto b/proto/stateforge_protocol/sfp/operation_lifecycle/v1/operation_lifecycle.proto index 929078d..27ed975 100644 --- a/proto/stateforge_protocol/sfp/operation_lifecycle/v1/operation_lifecycle.proto +++ b/proto/stateforge_protocol/sfp/operation_lifecycle/v1/operation_lifecycle.proto @@ -159,7 +159,7 @@ message OperationProgress { message OperationSuccess { // Required object, including an explicitly present empty object when allowed. // Validate against the original admitted operation's pinned Provider - // Manifest result_schema and relied-on profiles before committing SUCCEEDED. + // Manifest result_schema before committing SUCCEEDED. // Never apply defaults. google.protobuf.Struct result = 1; } diff --git a/scripts/ci/verify_installed.py b/scripts/ci/verify_installed.py index e2cbc7b..16d416c 100644 --- a/scripts/ci/verify_installed.py +++ b/scripts/ci/verify_installed.py @@ -61,6 +61,17 @@ def _verify_wire_contracts() -> int: """Verify installed Bootstrap, Health, and endpoint limit contracts.""" + declarations = ( + manifest_pb2.OperationDeclaration, + operation_admission_pb2.OperationContractContext, + ) + if tuple( + {field.name: field.number for field in message.DESCRIPTOR.fields} + for message in declarations + ) != ({"input_schema": 1, "result_schema": 2}, {"manifest_revision": 1}): + raise ValueError( + "Installed operation declaration contracts are invalid" + ) bootstrap_service = bootstrap_pb2.DESCRIPTOR.services_by_name[ "BootstrapService" ] diff --git a/src/stateforge_protocol/sfp/manifest/v1/contract.py b/src/stateforge_protocol/sfp/manifest/v1/contract.py index b858d5b..92363e8 100644 --- a/src/stateforge_protocol/sfp/manifest/v1/contract.py +++ b/src/stateforge_protocol/sfp/manifest/v1/contract.py @@ -33,7 +33,6 @@ MAX_TRIGGERS: Final = 1_024 MAX_RUNTIME_REQUIREMENTS: Final = 1_024 MAX_PLATFORMS: Final = 256 -MAX_PROFILE_CLAIMS_PER_OPERATION: Final = 64 # Optional presentation-tree limits mirrored by the packaged schema. PRESENTATION_SCHEMA_VERSION: Final = 1 diff --git a/src/stateforge_protocol/sfp/manifest/v1/manifest.schema.json b/src/stateforge_protocol/sfp/manifest/v1/manifest.schema.json index db488f1..83772b2 100644 --- a/src/stateforge_protocol/sfp/manifest/v1/manifest.schema.json +++ b/src/stateforge_protocol/sfp/manifest/v1/manifest.schema.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "urn:stateforge:sfp:manifest:1", "title": "SFP manifest schema 1 ProtoJSON validation", - "description": "Validate ProtoJSON using lowerCamelCase field names and all non-presence defaults emitted. This schema validates structure; session binding, negotiation, revision integrity, JSON reference resolution and semantic compliance require consumer checks described in the procedure specification.", + "description": "Validate ProtoJSON using lowerCamelCase field names and all non-presence defaults emitted. This schema validates structure; session binding, negotiation, revision integrity, JSON reference resolution and runtime admission require consumer checks described in the procedure specification.", "$ref": "#/$defs/getManifestResponse", "$defs": { "instanceId": { @@ -214,21 +214,11 @@ }, "resultSchema": { "$ref": "#/$defs/schemaDocument" - }, - "implements": { - "type": "array", - "items": { - "$ref": "#/$defs/dottedIdentifier" - }, - "minItems": 0, - "maxItems": 64, - "uniqueItems": true } }, "required": [ "inputSchema", - "resultSchema", - "implements" + "resultSchema" ], "additionalProperties": false }, diff --git a/src/stateforge_protocol/sfp/manifest/v1/manifest_pb2.py b/src/stateforge_protocol/sfp/manifest/v1/manifest_pb2.py index 5949287..d7ae3bb 100644 --- a/src/stateforge_protocol/sfp/manifest/v1/manifest_pb2.py +++ b/src/stateforge_protocol/sfp/manifest/v1/manifest_pb2.py @@ -25,7 +25,7 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n2stateforge_protocol/sfp/manifest/v1/manifest.proto\x12\x1astateforge.sfp.manifest.v1\x1a\x1cgoogle/protobuf/struct.proto\"\x96\x02\n\x12GetManifestRequest\x12\x41\n\x1d\x65xpected_provider_instance_id\x18\x01 \x01(\tR\x1a\x65xpectedProviderInstanceId\x12@\n\x1c\x65xpected_endpoint_generation\x18\x02 \x01(\x04R\x1a\x65xpectedEndpointGeneration\x12K\n\"supported_manifest_schema_versions\x18\x03 \x03(\rR\x1fsupportedManifestSchemaVersions\x12.\n\x13\x65xpected_session_id\x18\x04 \x01(\tR\x11\x65xpectedSessionId\"\xf0\x03\n\x13GetManifestResponse\x12\x30\n\x14provider_instance_id\x18\x01 \x01(\tR\x12providerInstanceId\x12/\n\x13\x65ndpoint_generation\x18\x02 \x01(\x04R\x12\x65ndpointGeneration\x12\x36\n\x17manifest_schema_version\x18\x03 \x01(\rR\x15manifestSchemaVersion\x12+\n\x11manifest_revision\x18\x04 \x01(\tR\x10manifestRevision\x12H\n\x08manifest\x18\x05 \x01(\x0b\x32,.stateforge.sfp.manifest.v1.ProviderManifestR\x08manifest\x12\x1d\n\nsession_id\x18\x06 \x01(\tR\tsessionId\x12T\n\x0cpresentation\x18\x07 \x01(\x0b\x32\x30.stateforge.sfp.manifest.v1.ProviderPresentationR\x0cpresentation\x12\x38\n\x15presentation_revision\x18\x08 \x01(\tH\x00R\x14presentationRevision\x88\x01\x01\x42\x18\n\x16_presentation_revision\"\xbc\x07\n\x10ProviderManifest\x12+\n\x11provider_identity\x18\x01 \x01(\tR\x10providerIdentity\x12\x35\n\x16implementation_version\x18\x02 \x01(\tR\x15implementationVersion\x12!\n\x0c\x64isplay_name\x18\x03 \x01(\tR\x0b\x64isplayName\x12\\\n\noperations\x18\x04 \x03(\x0b\x32<.stateforge.sfp.manifest.v1.ProviderManifest.OperationsEntryR\noperations\x12x\n\x14runtime_requirements\x18\x06 \x03(\x0b\x32\x45.stateforge.sfp.manifest.v1.ProviderManifest.RuntimeRequirementsEntryR\x13runtimeRequirements\x12O\n\tplatforms\x18\x07 \x03(\x0b\x32\x31.stateforge.sfp.manifest.v1.PlatformCompatibilityR\tplatforms\x12J\n\x14\x63onfiguration_schema\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructR\x13\x63onfigurationSchema\x12V\n\x08triggers\x18\t \x03(\x0b\x32:.stateforge.sfp.manifest.v1.ProviderManifest.TriggersEntryR\x08triggers\x1ao\n\x0fOperationsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x30.stateforge.sfp.manifest.v1.OperationDeclarationR\x05value:\x02\x38\x01\x1av\n\x18RuntimeRequirementsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x44\n\x05value\x18\x02 \x01(\x0b\x32..stateforge.sfp.manifest.v1.RuntimeRequirementR\x05value:\x02\x38\x01\x1ak\n\rTriggersEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x44\n\x05value\x18\x02 \x01(\x0b\x32..stateforge.sfp.manifest.v1.TriggerDeclarationR\x05value:\x02\x38\x01\"\xb0\x01\n\x14OperationDeclaration\x12:\n\x0cinput_schema\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\x0binputSchema\x12<\n\rresult_schema\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructR\x0cresultSchema\x12\x1e\n\nimplements\x18\x03 \x03(\tR\nimplements\"e\n\x12RuntimeRequirement\x12 \n\x0b\x64\x65scription\x18\x01 \x01(\tR\x0b\x64\x65scription\x12-\n\x12version_constraint\x18\x02 \x01(\tR\x11versionConstraint\"f\n\x15PlatformCompatibility\x12)\n\x10operating_system\x18\x01 \x01(\tR\x0foperatingSystem\x12\"\n\x0c\x61rchitecture\x18\x02 \x01(\tR\x0c\x61rchitecture\"T\n\x12TriggerDeclaration\x12>\n\x0epayload_schema\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\rpayloadSchema\"\xf7\x07\n\x14ProviderPresentation\x12>\n\x1bpresentation_schema_version\x18\x01 \x01(\rR\x19presentationSchemaVersion\x12J\n\x08provider\x18\x02 \x01(\x0b\x32..stateforge.sfp.manifest.v1.PresentationTargetR\x08provider\x12`\n\noperations\x18\x03 \x03(\x0b\x32@.stateforge.sfp.manifest.v1.ProviderPresentation.OperationsEntryR\noperations\x12Z\n\x08triggers\x18\x04 \x03(\x0b\x32>.stateforge.sfp.manifest.v1.ProviderPresentation.TriggersEntryR\x08triggers\x12T\n\x06\x61ssets\x18\x05 \x03(\x0b\x32<.stateforge.sfp.manifest.v1.ProviderPresentation.AssetsEntryR\x06\x61ssets\x12\x7f\n\x15renderer_requirements\x18\x06 \x03(\x0b\x32J.stateforge.sfp.manifest.v1.ProviderPresentation.RendererRequirementsEntryR\x14rendererRequirements\x1am\n\x0fOperationsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x44\n\x05value\x18\x02 \x01(\x0b\x32..stateforge.sfp.manifest.v1.PresentationTargetR\x05value:\x02\x38\x01\x1ak\n\rTriggersEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x44\n\x05value\x18\x02 \x01(\x0b\x32..stateforge.sfp.manifest.v1.PresentationTargetR\x05value:\x02\x38\x01\x1ah\n\x0b\x41ssetsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32-.stateforge.sfp.manifest.v1.PresentationAssetR\x05value:\x02\x38\x01\x1ax\n\x19RendererRequirementsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32/.stateforge.sfp.manifest.v1.RendererRequirementR\x05value:\x02\x38\x01\"\xdc\x01\n\x12PresentationTarget\x12X\n\x08surfaces\x18\x01 \x03(\x0b\x32<.stateforge.sfp.manifest.v1.PresentationTarget.SurfacesEntryR\x08surfaces\x1al\n\rSurfacesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32/.stateforge.sfp.manifest.v1.PresentationSurfaceR\x05value:\x02\x38\x01\"T\n\x13PresentationSurface\x12=\n\x04root\x18\x01 \x01(\x0b\x32).stateforge.sfp.manifest.v1.ComponentNodeR\x04root\"\xf0\x05\n\rComponentNode\x12\x31\n\x14\x63omponent_identifier\x18\x01 \x01(\tR\x13\x63omponentIdentifier\x12\x37\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructR\nproperties\x12S\n\x08\x62indings\x18\x03 \x03(\x0b\x32\x37.stateforge.sfp.manifest.v1.ComponentNode.BindingsEntryR\x08\x62indings\x12\x45\n\x08\x63hildren\x18\x04 \x03(\x0b\x32).stateforge.sfp.manifest.v1.ComponentNodeR\x08\x63hildren\x12\x45\n\x08\x66\x61llback\x18\x05 \x01(\x0b\x32).stateforge.sfp.manifest.v1.ComponentNodeR\x08\x66\x61llback\x12\x43\n\tcondition\x18\x06 \x01(\x0b\x32%.stateforge.sfp.manifest.v1.ConditionR\tcondition\x12>\n\x06repeat\x18\x07 \x01(\x0b\x32&.stateforge.sfp.manifest.v1.RepetitionR\x06repeat\x12\x63\n\x0e\x61sset_bindings\x18\x08 \x03(\x0b\x32<.stateforge.sfp.manifest.v1.ComponentNode.AssetBindingsEntryR\rassetBindings\x1a\x64\n\rBindingsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12=\n\x05value\x18\x02 \x01(\x0b\x32\'.stateforge.sfp.manifest.v1.DataBindingR\x05value:\x02\x38\x01\x1a@\n\x12\x41ssetBindingsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"j\n\x0b\x44\x61taBinding\x12+\n\x11source_identifier\x18\x01 \x01(\tR\x10sourceIdentifier\x12\x18\n\x07pointer\x18\x02 \x01(\tR\x07pointer\x12\x14\n\x05scope\x18\x03 \x01(\tR\x05scope\"\xc7\x01\n\tCondition\x12\x41\n\x07\x62inding\x18\x01 \x01(\x0b\x32\'.stateforge.sfp.manifest.v1.DataBindingR\x07\x62inding\x12I\n\x08operator\x18\x02 \x01(\x0e\x32-.stateforge.sfp.manifest.v1.ConditionOperatorR\x08operator\x12,\n\x05value\x18\x03 \x01(\x0b\x32\x16.google.protobuf.ValueR\x05value\"\x91\x01\n\nRepetition\x12G\n\ncollection\x18\x01 \x01(\x0b\x32\'.stateforge.sfp.manifest.v1.DataBindingR\ncollection\x12\x1d\n\nitem_scope\x18\x02 \x01(\tR\titemScope\x12\x1b\n\tmax_items\x18\x03 \x01(\rR\x08maxItems\"\xf2\x01\n\x13RendererRequirement\x12\x31\n\x14\x65xtension_identifier\x18\x01 \x01(\tR\x13\x65xtensionIdentifier\x12+\n\x11\x65xtension_version\x18\x02 \x01(\tR\x10\x65xtensionVersion\x12\x30\n\x14renderer_api_version\x18\x03 \x01(\tR\x12rendererApiVersion\x12\'\n\x0f\x61rtifact_digest\x18\x04 \x01(\tR\x0e\x61rtifactDigest\x12 \n\x0bpermissions\x18\x05 \x03(\tR\x0bpermissions\"\x95\x01\n\x11PresentationAsset\x12\x1d\n\nmedia_type\x18\x01 \x01(\tR\tmediaType\x12\x18\n\x07\x63ontent\x18\x02 \x01(\x0cR\x07\x63ontent\x12\x14\n\x05width\x18\x03 \x01(\rR\x05width\x12\x16\n\x06height\x18\x04 \x01(\rR\x06height\x12\x19\n\x08\x61lt_text\x18\x05 \x01(\tR\x07\x61ltText*\xbb\x01\n\x11\x43onditionOperator\x12\"\n\x1e\x43ONDITION_OPERATOR_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x43ONDITION_OPERATOR_EXISTS\x10\x01\x12!\n\x1d\x43ONDITION_OPERATOR_NOT_EXISTS\x10\x02\x12\x1d\n\x19\x43ONDITION_OPERATOR_EQUALS\x10\x03\x12!\n\x1d\x43ONDITION_OPERATOR_NOT_EQUALS\x10\x04\x32\x81\x01\n\x0fManifestService\x12n\n\x0bGetManifest\x12..stateforge.sfp.manifest.v1.GetManifestRequest\x1a/.stateforge.sfp.manifest.v1.GetManifestResponseb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n2stateforge_protocol/sfp/manifest/v1/manifest.proto\x12\x1astateforge.sfp.manifest.v1\x1a\x1cgoogle/protobuf/struct.proto\"\x96\x02\n\x12GetManifestRequest\x12\x41\n\x1d\x65xpected_provider_instance_id\x18\x01 \x01(\tR\x1a\x65xpectedProviderInstanceId\x12@\n\x1c\x65xpected_endpoint_generation\x18\x02 \x01(\x04R\x1a\x65xpectedEndpointGeneration\x12K\n\"supported_manifest_schema_versions\x18\x03 \x03(\rR\x1fsupportedManifestSchemaVersions\x12.\n\x13\x65xpected_session_id\x18\x04 \x01(\tR\x11\x65xpectedSessionId\"\xf0\x03\n\x13GetManifestResponse\x12\x30\n\x14provider_instance_id\x18\x01 \x01(\tR\x12providerInstanceId\x12/\n\x13\x65ndpoint_generation\x18\x02 \x01(\x04R\x12\x65ndpointGeneration\x12\x36\n\x17manifest_schema_version\x18\x03 \x01(\rR\x15manifestSchemaVersion\x12+\n\x11manifest_revision\x18\x04 \x01(\tR\x10manifestRevision\x12H\n\x08manifest\x18\x05 \x01(\x0b\x32,.stateforge.sfp.manifest.v1.ProviderManifestR\x08manifest\x12\x1d\n\nsession_id\x18\x06 \x01(\tR\tsessionId\x12T\n\x0cpresentation\x18\x07 \x01(\x0b\x32\x30.stateforge.sfp.manifest.v1.ProviderPresentationR\x0cpresentation\x12\x38\n\x15presentation_revision\x18\x08 \x01(\tH\x00R\x14presentationRevision\x88\x01\x01\x42\x18\n\x16_presentation_revision\"\xbc\x07\n\x10ProviderManifest\x12+\n\x11provider_identity\x18\x01 \x01(\tR\x10providerIdentity\x12\x35\n\x16implementation_version\x18\x02 \x01(\tR\x15implementationVersion\x12!\n\x0c\x64isplay_name\x18\x03 \x01(\tR\x0b\x64isplayName\x12\\\n\noperations\x18\x04 \x03(\x0b\x32<.stateforge.sfp.manifest.v1.ProviderManifest.OperationsEntryR\noperations\x12x\n\x14runtime_requirements\x18\x06 \x03(\x0b\x32\x45.stateforge.sfp.manifest.v1.ProviderManifest.RuntimeRequirementsEntryR\x13runtimeRequirements\x12O\n\tplatforms\x18\x07 \x03(\x0b\x32\x31.stateforge.sfp.manifest.v1.PlatformCompatibilityR\tplatforms\x12J\n\x14\x63onfiguration_schema\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructR\x13\x63onfigurationSchema\x12V\n\x08triggers\x18\t \x03(\x0b\x32:.stateforge.sfp.manifest.v1.ProviderManifest.TriggersEntryR\x08triggers\x1ao\n\x0fOperationsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x30.stateforge.sfp.manifest.v1.OperationDeclarationR\x05value:\x02\x38\x01\x1av\n\x18RuntimeRequirementsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x44\n\x05value\x18\x02 \x01(\x0b\x32..stateforge.sfp.manifest.v1.RuntimeRequirementR\x05value:\x02\x38\x01\x1ak\n\rTriggersEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x44\n\x05value\x18\x02 \x01(\x0b\x32..stateforge.sfp.manifest.v1.TriggerDeclarationR\x05value:\x02\x38\x01\"\x90\x01\n\x14OperationDeclaration\x12:\n\x0cinput_schema\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\x0binputSchema\x12<\n\rresult_schema\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructR\x0cresultSchema\"e\n\x12RuntimeRequirement\x12 \n\x0b\x64\x65scription\x18\x01 \x01(\tR\x0b\x64\x65scription\x12-\n\x12version_constraint\x18\x02 \x01(\tR\x11versionConstraint\"f\n\x15PlatformCompatibility\x12)\n\x10operating_system\x18\x01 \x01(\tR\x0foperatingSystem\x12\"\n\x0c\x61rchitecture\x18\x02 \x01(\tR\x0c\x61rchitecture\"T\n\x12TriggerDeclaration\x12>\n\x0epayload_schema\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\rpayloadSchema\"\xf7\x07\n\x14ProviderPresentation\x12>\n\x1bpresentation_schema_version\x18\x01 \x01(\rR\x19presentationSchemaVersion\x12J\n\x08provider\x18\x02 \x01(\x0b\x32..stateforge.sfp.manifest.v1.PresentationTargetR\x08provider\x12`\n\noperations\x18\x03 \x03(\x0b\x32@.stateforge.sfp.manifest.v1.ProviderPresentation.OperationsEntryR\noperations\x12Z\n\x08triggers\x18\x04 \x03(\x0b\x32>.stateforge.sfp.manifest.v1.ProviderPresentation.TriggersEntryR\x08triggers\x12T\n\x06\x61ssets\x18\x05 \x03(\x0b\x32<.stateforge.sfp.manifest.v1.ProviderPresentation.AssetsEntryR\x06\x61ssets\x12\x7f\n\x15renderer_requirements\x18\x06 \x03(\x0b\x32J.stateforge.sfp.manifest.v1.ProviderPresentation.RendererRequirementsEntryR\x14rendererRequirements\x1am\n\x0fOperationsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x44\n\x05value\x18\x02 \x01(\x0b\x32..stateforge.sfp.manifest.v1.PresentationTargetR\x05value:\x02\x38\x01\x1ak\n\rTriggersEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x44\n\x05value\x18\x02 \x01(\x0b\x32..stateforge.sfp.manifest.v1.PresentationTargetR\x05value:\x02\x38\x01\x1ah\n\x0b\x41ssetsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32-.stateforge.sfp.manifest.v1.PresentationAssetR\x05value:\x02\x38\x01\x1ax\n\x19RendererRequirementsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32/.stateforge.sfp.manifest.v1.RendererRequirementR\x05value:\x02\x38\x01\"\xdc\x01\n\x12PresentationTarget\x12X\n\x08surfaces\x18\x01 \x03(\x0b\x32<.stateforge.sfp.manifest.v1.PresentationTarget.SurfacesEntryR\x08surfaces\x1al\n\rSurfacesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32/.stateforge.sfp.manifest.v1.PresentationSurfaceR\x05value:\x02\x38\x01\"T\n\x13PresentationSurface\x12=\n\x04root\x18\x01 \x01(\x0b\x32).stateforge.sfp.manifest.v1.ComponentNodeR\x04root\"\xf0\x05\n\rComponentNode\x12\x31\n\x14\x63omponent_identifier\x18\x01 \x01(\tR\x13\x63omponentIdentifier\x12\x37\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructR\nproperties\x12S\n\x08\x62indings\x18\x03 \x03(\x0b\x32\x37.stateforge.sfp.manifest.v1.ComponentNode.BindingsEntryR\x08\x62indings\x12\x45\n\x08\x63hildren\x18\x04 \x03(\x0b\x32).stateforge.sfp.manifest.v1.ComponentNodeR\x08\x63hildren\x12\x45\n\x08\x66\x61llback\x18\x05 \x01(\x0b\x32).stateforge.sfp.manifest.v1.ComponentNodeR\x08\x66\x61llback\x12\x43\n\tcondition\x18\x06 \x01(\x0b\x32%.stateforge.sfp.manifest.v1.ConditionR\tcondition\x12>\n\x06repeat\x18\x07 \x01(\x0b\x32&.stateforge.sfp.manifest.v1.RepetitionR\x06repeat\x12\x63\n\x0e\x61sset_bindings\x18\x08 \x03(\x0b\x32<.stateforge.sfp.manifest.v1.ComponentNode.AssetBindingsEntryR\rassetBindings\x1a\x64\n\rBindingsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12=\n\x05value\x18\x02 \x01(\x0b\x32\'.stateforge.sfp.manifest.v1.DataBindingR\x05value:\x02\x38\x01\x1a@\n\x12\x41ssetBindingsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"j\n\x0b\x44\x61taBinding\x12+\n\x11source_identifier\x18\x01 \x01(\tR\x10sourceIdentifier\x12\x18\n\x07pointer\x18\x02 \x01(\tR\x07pointer\x12\x14\n\x05scope\x18\x03 \x01(\tR\x05scope\"\xc7\x01\n\tCondition\x12\x41\n\x07\x62inding\x18\x01 \x01(\x0b\x32\'.stateforge.sfp.manifest.v1.DataBindingR\x07\x62inding\x12I\n\x08operator\x18\x02 \x01(\x0e\x32-.stateforge.sfp.manifest.v1.ConditionOperatorR\x08operator\x12,\n\x05value\x18\x03 \x01(\x0b\x32\x16.google.protobuf.ValueR\x05value\"\x91\x01\n\nRepetition\x12G\n\ncollection\x18\x01 \x01(\x0b\x32\'.stateforge.sfp.manifest.v1.DataBindingR\ncollection\x12\x1d\n\nitem_scope\x18\x02 \x01(\tR\titemScope\x12\x1b\n\tmax_items\x18\x03 \x01(\rR\x08maxItems\"\xf2\x01\n\x13RendererRequirement\x12\x31\n\x14\x65xtension_identifier\x18\x01 \x01(\tR\x13\x65xtensionIdentifier\x12+\n\x11\x65xtension_version\x18\x02 \x01(\tR\x10\x65xtensionVersion\x12\x30\n\x14renderer_api_version\x18\x03 \x01(\tR\x12rendererApiVersion\x12\'\n\x0f\x61rtifact_digest\x18\x04 \x01(\tR\x0e\x61rtifactDigest\x12 \n\x0bpermissions\x18\x05 \x03(\tR\x0bpermissions\"\x95\x01\n\x11PresentationAsset\x12\x1d\n\nmedia_type\x18\x01 \x01(\tR\tmediaType\x12\x18\n\x07\x63ontent\x18\x02 \x01(\x0cR\x07\x63ontent\x12\x14\n\x05width\x18\x03 \x01(\rR\x05width\x12\x16\n\x06height\x18\x04 \x01(\rR\x06height\x12\x19\n\x08\x61lt_text\x18\x05 \x01(\tR\x07\x61ltText*\xbb\x01\n\x11\x43onditionOperator\x12\"\n\x1e\x43ONDITION_OPERATOR_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x43ONDITION_OPERATOR_EXISTS\x10\x01\x12!\n\x1d\x43ONDITION_OPERATOR_NOT_EXISTS\x10\x02\x12\x1d\n\x19\x43ONDITION_OPERATOR_EQUALS\x10\x03\x12!\n\x1d\x43ONDITION_OPERATOR_NOT_EQUALS\x10\x04\x32\x81\x01\n\x0fManifestService\x12n\n\x0bGetManifest\x12..stateforge.sfp.manifest.v1.GetManifestRequest\x1a/.stateforge.sfp.manifest.v1.GetManifestResponseb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -52,8 +52,8 @@ _globals['_COMPONENTNODE_BINDINGSENTRY']._serialized_options = b'8\001' _globals['_COMPONENTNODE_ASSETBINDINGSENTRY']._loaded_options = None _globals['_COMPONENTNODE_ASSETBINDINGSENTRY']._serialized_options = b'8\001' - _globals['_CONDITIONOPERATOR']._serialized_start=5261 - _globals['_CONDITIONOPERATOR']._serialized_end=5448 + _globals['_CONDITIONOPERATOR']._serialized_start=5229 + _globals['_CONDITIONOPERATOR']._serialized_end=5416 _globals['_GETMANIFESTREQUEST']._serialized_start=113 _globals['_GETMANIFESTREQUEST']._serialized_end=391 _globals['_GETMANIFESTRESPONSE']._serialized_start=394 @@ -67,45 +67,45 @@ _globals['_PROVIDERMANIFEST_TRIGGERSENTRY']._serialized_start=1742 _globals['_PROVIDERMANIFEST_TRIGGERSENTRY']._serialized_end=1849 _globals['_OPERATIONDECLARATION']._serialized_start=1852 - _globals['_OPERATIONDECLARATION']._serialized_end=2028 - _globals['_RUNTIMEREQUIREMENT']._serialized_start=2030 - _globals['_RUNTIMEREQUIREMENT']._serialized_end=2131 - _globals['_PLATFORMCOMPATIBILITY']._serialized_start=2133 - _globals['_PLATFORMCOMPATIBILITY']._serialized_end=2235 - _globals['_TRIGGERDECLARATION']._serialized_start=2237 - _globals['_TRIGGERDECLARATION']._serialized_end=2321 - _globals['_PROVIDERPRESENTATION']._serialized_start=2324 - _globals['_PROVIDERPRESENTATION']._serialized_end=3339 - _globals['_PROVIDERPRESENTATION_OPERATIONSENTRY']._serialized_start=2893 - _globals['_PROVIDERPRESENTATION_OPERATIONSENTRY']._serialized_end=3002 - _globals['_PROVIDERPRESENTATION_TRIGGERSENTRY']._serialized_start=3004 - _globals['_PROVIDERPRESENTATION_TRIGGERSENTRY']._serialized_end=3111 - _globals['_PROVIDERPRESENTATION_ASSETSENTRY']._serialized_start=3113 - _globals['_PROVIDERPRESENTATION_ASSETSENTRY']._serialized_end=3217 - _globals['_PROVIDERPRESENTATION_RENDERERREQUIREMENTSENTRY']._serialized_start=3219 - _globals['_PROVIDERPRESENTATION_RENDERERREQUIREMENTSENTRY']._serialized_end=3339 - _globals['_PRESENTATIONTARGET']._serialized_start=3342 - _globals['_PRESENTATIONTARGET']._serialized_end=3562 - _globals['_PRESENTATIONTARGET_SURFACESENTRY']._serialized_start=3454 - _globals['_PRESENTATIONTARGET_SURFACESENTRY']._serialized_end=3562 - _globals['_PRESENTATIONSURFACE']._serialized_start=3564 - _globals['_PRESENTATIONSURFACE']._serialized_end=3648 - _globals['_COMPONENTNODE']._serialized_start=3651 - _globals['_COMPONENTNODE']._serialized_end=4403 - _globals['_COMPONENTNODE_BINDINGSENTRY']._serialized_start=4237 - _globals['_COMPONENTNODE_BINDINGSENTRY']._serialized_end=4337 - _globals['_COMPONENTNODE_ASSETBINDINGSENTRY']._serialized_start=4339 - _globals['_COMPONENTNODE_ASSETBINDINGSENTRY']._serialized_end=4403 - _globals['_DATABINDING']._serialized_start=4405 - _globals['_DATABINDING']._serialized_end=4511 - _globals['_CONDITION']._serialized_start=4514 - _globals['_CONDITION']._serialized_end=4713 - _globals['_REPETITION']._serialized_start=4716 - _globals['_REPETITION']._serialized_end=4861 - _globals['_RENDERERREQUIREMENT']._serialized_start=4864 - _globals['_RENDERERREQUIREMENT']._serialized_end=5106 - _globals['_PRESENTATIONASSET']._serialized_start=5109 - _globals['_PRESENTATIONASSET']._serialized_end=5258 - _globals['_MANIFESTSERVICE']._serialized_start=5451 - _globals['_MANIFESTSERVICE']._serialized_end=5580 + _globals['_OPERATIONDECLARATION']._serialized_end=1996 + _globals['_RUNTIMEREQUIREMENT']._serialized_start=1998 + _globals['_RUNTIMEREQUIREMENT']._serialized_end=2099 + _globals['_PLATFORMCOMPATIBILITY']._serialized_start=2101 + _globals['_PLATFORMCOMPATIBILITY']._serialized_end=2203 + _globals['_TRIGGERDECLARATION']._serialized_start=2205 + _globals['_TRIGGERDECLARATION']._serialized_end=2289 + _globals['_PROVIDERPRESENTATION']._serialized_start=2292 + _globals['_PROVIDERPRESENTATION']._serialized_end=3307 + _globals['_PROVIDERPRESENTATION_OPERATIONSENTRY']._serialized_start=2861 + _globals['_PROVIDERPRESENTATION_OPERATIONSENTRY']._serialized_end=2970 + _globals['_PROVIDERPRESENTATION_TRIGGERSENTRY']._serialized_start=2972 + _globals['_PROVIDERPRESENTATION_TRIGGERSENTRY']._serialized_end=3079 + _globals['_PROVIDERPRESENTATION_ASSETSENTRY']._serialized_start=3081 + _globals['_PROVIDERPRESENTATION_ASSETSENTRY']._serialized_end=3185 + _globals['_PROVIDERPRESENTATION_RENDERERREQUIREMENTSENTRY']._serialized_start=3187 + _globals['_PROVIDERPRESENTATION_RENDERERREQUIREMENTSENTRY']._serialized_end=3307 + _globals['_PRESENTATIONTARGET']._serialized_start=3310 + _globals['_PRESENTATIONTARGET']._serialized_end=3530 + _globals['_PRESENTATIONTARGET_SURFACESENTRY']._serialized_start=3422 + _globals['_PRESENTATIONTARGET_SURFACESENTRY']._serialized_end=3530 + _globals['_PRESENTATIONSURFACE']._serialized_start=3532 + _globals['_PRESENTATIONSURFACE']._serialized_end=3616 + _globals['_COMPONENTNODE']._serialized_start=3619 + _globals['_COMPONENTNODE']._serialized_end=4371 + _globals['_COMPONENTNODE_BINDINGSENTRY']._serialized_start=4205 + _globals['_COMPONENTNODE_BINDINGSENTRY']._serialized_end=4305 + _globals['_COMPONENTNODE_ASSETBINDINGSENTRY']._serialized_start=4307 + _globals['_COMPONENTNODE_ASSETBINDINGSENTRY']._serialized_end=4371 + _globals['_DATABINDING']._serialized_start=4373 + _globals['_DATABINDING']._serialized_end=4479 + _globals['_CONDITION']._serialized_start=4482 + _globals['_CONDITION']._serialized_end=4681 + _globals['_REPETITION']._serialized_start=4684 + _globals['_REPETITION']._serialized_end=4829 + _globals['_RENDERERREQUIREMENT']._serialized_start=4832 + _globals['_RENDERERREQUIREMENT']._serialized_end=5074 + _globals['_PRESENTATIONASSET']._serialized_start=5077 + _globals['_PRESENTATIONASSET']._serialized_end=5226 + _globals['_MANIFESTSERVICE']._serialized_start=5419 + _globals['_MANIFESTSERVICE']._serialized_end=5548 # @@protoc_insertion_point(module_scope) diff --git a/src/stateforge_protocol/sfp/manifest/v1/manifest_pb2.pyi b/src/stateforge_protocol/sfp/manifest/v1/manifest_pb2.pyi index 6f4a2a6..d3c4891 100644 --- a/src/stateforge_protocol/sfp/manifest/v1/manifest_pb2.pyi +++ b/src/stateforge_protocol/sfp/manifest/v1/manifest_pb2.pyi @@ -292,47 +292,31 @@ Global___ProviderManifest: _TypeAlias = ProviderManifest # noqa: Y015 @_typing.final class OperationDeclaration(_message.Message): - """OperationDeclaration describes an available handler and explicit compliance - claims. Declaring a role is not proof of compliance; consumers validate claims - against the referenced profile. No StartOperation or execution behavior is - introduced by this message. + """OperationDeclaration describes a concrete handler's input and result schemas. + No StartOperation or execution behavior is introduced by this message. """ DESCRIPTOR: _descriptor.Descriptor INPUT_SCHEMA_FIELD_NUMBER: _builtins.int RESULT_SCHEMA_FIELD_NUMBER: _builtins.int - IMPLEMENTS_FIELD_NUMBER: _builtins.int @_builtins.property def input_schema(self) -> _struct_pb2.Struct: """Required Draft 2020-12 object schemas for typed input and terminal result.""" @_builtins.property def result_schema(self) -> _struct_pb2.Struct: - """The sole declaration of terminal result shape for this versioned operation. - Recognized compliance roles require the exact schemas of their profile. - """ - - @_builtins.property - def implements(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: - """Zero or more distinct claims that this operation implements versioned - semantic/compliance profiles, e.g. - example.vendor.profile.v1.read_only. SFP transports these extensible - claims without assigning application-specific meaning to them. Empty - means no profile claim. Never infer a role from the operation identifier - or a Python method name. - """ + """The sole declaration of terminal result shape for this versioned operation.""" def __init__( self, *, input_schema: _struct_pb2.Struct | None = ..., result_schema: _struct_pb2.Struct | None = ..., - implements: _abc.Iterable[_builtins.str] | None = ..., ) -> None: ... _HasFieldArgType: _TypeAlias = _typing.Literal["input_schema", b"input_schema", "result_schema", b"result_schema"] # noqa: Y015 def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["implements", b"implements", "input_schema", b"input_schema", "result_schema", b"result_schema"] # noqa: Y015 + _ClearFieldArgType: _TypeAlias = _typing.Literal["input_schema", b"input_schema", "result_schema", b"result_schema"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... def WhichOneof(self, oneof_group: _Never) -> None: ... diff --git a/src/stateforge_protocol/sfp/operation_admission/v1/contract.py b/src/stateforge_protocol/sfp/operation_admission/v1/contract.py index ba5c075..7d64310 100644 --- a/src/stateforge_protocol/sfp/operation_admission/v1/contract.py +++ b/src/stateforge_protocol/sfp/operation_admission/v1/contract.py @@ -22,7 +22,6 @@ MAX_JSON_CONTAINER_ENTRIES: Final = 256 # Contract-context limits mirrored by the packaged validation schema. -MAX_REQUIRED_IMPLEMENTATION_ROLES: Final = 16 @dataclass(frozen=True, slots=True) diff --git a/src/stateforge_protocol/sfp/operation_admission/v1/operation_admission.schema.json b/src/stateforge_protocol/sfp/operation_admission/v1/operation_admission.schema.json index 9c43ab1..cadf432 100644 --- a/src/stateforge_protocol/sfp/operation_admission/v1/operation_admission.schema.json +++ b/src/stateforge_protocol/sfp/operation_admission/v1/operation_admission.schema.json @@ -23,12 +23,6 @@ "maxLength": 255, "pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+/[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*@[1-9][0-9]*(?![\\s\\S])" }, - "dottedIdentifier": { - "type": "string", - "minLength": 3, - "maxLength": 255, - "pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+(?![\\s\\S])" - }, "revision": { "type": "string", "minLength": 71, @@ -128,16 +122,9 @@ "operationContractContext": { "type": "object", "properties": { - "manifestRevision": {"$ref": "#/$defs/revision"}, - "requiredImplementationRoles": { - "type": "array", - "items": {"$ref": "#/$defs/dottedIdentifier"}, - "minItems": 0, - "maxItems": 16, - "uniqueItems": true - } + "manifestRevision": {"$ref": "#/$defs/revision"} }, - "required": ["manifestRevision", "requiredImplementationRoles"], + "required": ["manifestRevision"], "additionalProperties": false }, "operationInvocation": { diff --git a/src/stateforge_protocol/sfp/operation_admission/v1/operation_admission_pb2.py b/src/stateforge_protocol/sfp/operation_admission/v1/operation_admission_pb2.py index e669058..bdc9b14 100644 --- a/src/stateforge_protocol/sfp/operation_admission/v1/operation_admission_pb2.py +++ b/src/stateforge_protocol/sfp/operation_admission/v1/operation_admission_pb2.py @@ -27,33 +27,33 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nHstateforge_protocol/sfp/operation_admission/v1/operation_admission.proto\x12%stateforge.sfp.operation_admission.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb9\x02\n\x15StartOperationRequest\x12g\n\x0fsession_binding\x18\x01 \x01(\x0b\x32>.stateforge.sfp.operation_admission.v1.OperationSessionBindingR\x0esessionBinding\x12Z\n\ninvocation\x18\x02 \x01(\x0b\x32:.stateforge.sfp.operation_admission.v1.OperationInvocationR\ninvocation\x12[\n\x0e\x61\x64mission_mode\x18\x03 \x01(\x0e\x32\x34.stateforge.sfp.operation_admission.v1.AdmissionModeR\radmissionMode\"\xce\x01\n\x17OperationSessionBinding\x12\x41\n\x1d\x65xpected_provider_instance_id\x18\x01 \x01(\tR\x1a\x65xpectedProviderInstanceId\x12@\n\x1c\x65xpected_endpoint_generation\x18\x02 \x01(\x04R\x1a\x65xpectedEndpointGeneration\x12.\n\x13\x65xpected_session_id\x18\x03 \x01(\tR\x11\x65xpectedSessionId\"\x8c\x03\n\x13OperationInvocation\x12!\n\x0coperation_id\x18\x01 \x01(\tR\x0boperationId\x12\x31\n\x14operation_identifier\x18\x02 \x01(\tR\x13operationIdentifier\x12\x31\n\x07payload\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructR\x07payload\x12I\n\x12\x65xecution_deadline\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x11\x65xecutionDeadline\x12[\n\x08\x63ontract\x18\x06 \x01(\x0b\x32?.stateforge.sfp.operation_admission.v1.OperationContractContextR\x08\x63ontract\x12\x44\n\x11\x65xecution_context\x18\x07 \x01(\x0b\x32\x17.google.protobuf.StructR\x10\x65xecutionContext\"\x8b\x01\n\x18OperationContractContext\x12+\n\x11manifest_revision\x18\x01 \x01(\tR\x10manifestRevision\x12\x42\n\x1drequired_implementation_roles\x18\x02 \x03(\tR\x1brequiredImplementationRoles\"\xff\x02\n\x16StartOperationResponse\x12\x30\n\x14provider_instance_id\x18\x01 \x01(\tR\x12providerInstanceId\x12/\n\x13\x65ndpoint_generation\x18\x02 \x01(\x04R\x12\x65ndpointGeneration\x12\x1d\n\nsession_id\x18\x03 \x01(\tR\tsessionId\x12+\n\x11manifest_revision\x18\x04 \x01(\tR\x10manifestRevision\x12]\n\x0b\x64isposition\x18\x05 \x01(\x0e\x32;.stateforge.sfp.operation_admission.v1.AdmissionDispositionR\x0b\x64isposition\x12W\n\x06record\x18\x06 \x01(\x0b\x32?.stateforge.sfp.operation_admission.v1.OperationAdmissionRecordR\x06record\"\xb5\x02\n\x18OperationAdmissionRecord\x12!\n\x0coperation_id\x18\x01 \x01(\tR\x0boperationId\x12/\n\x13request_fingerprint\x18\x02 \x01(\tR\x12requestFingerprint\x12;\n\x0b\x61\x64mitted_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\nadmittedAt\x12\x46\n\x11record_expires_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0frecordExpiresAt\x12@\n\x1c\x61\x64mitted_endpoint_generation\x18\x05 \x01(\x04R\x1a\x61\x64mittedEndpointGeneration\"\x93\x02\n\x1dOperationAdmissionErrorDetail\x12!\n\x0coperation_id\x18\x01 \x01(\tR\x0boperationId\x12S\n\x06reason\x18\x02 \x01(\x0e\x32;.stateforge.sfp.operation_admission.v1.AdmissionErrorReasonR\x06reason\x12\x1c\n\tretryable\x18\x03 \x01(\x08R\tretryable\x12:\n\x0bretry_after\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationR\nretryAfter\x12 \n\x0b\x65xplanation\x18\x05 \x01(\tR\x0b\x65xplanation*u\n\rAdmissionMode\x12\x1e\n\x1a\x41\x44MISSION_MODE_UNSPECIFIED\x10\x00\x12#\n\x1f\x41\x44MISSION_MODE_ADMIT_OR_RESOLVE\x10\x01\x12\x1f\n\x1b\x41\x44MISSION_MODE_RESOLVE_ONLY\x10\x02*\x92\x01\n\x14\x41\x64missionDisposition\x12%\n!ADMISSION_DISPOSITION_UNSPECIFIED\x10\x00\x12&\n\"ADMISSION_DISPOSITION_ACCEPTED_NEW\x10\x01\x12+\n\'ADMISSION_DISPOSITION_RESOLVED_EXISTING\x10\x02*\xd3\x04\n\x14\x41\x64missionErrorReason\x12&\n\"ADMISSION_ERROR_REASON_UNSPECIFIED\x10\x00\x12\x34\n0ADMISSION_ERROR_REASON_INVALID_OPERATION_REQUEST\x10\x01\x12\x31\n-ADMISSION_ERROR_REASON_OPERATION_NOT_DECLARED\x10\x02\x12\x31\n-ADMISSION_ERROR_REASON_OPERATION_INCOMPATIBLE\x10\x03\x12\x38\n4ADMISSION_ERROR_REASON_OPERATION_PRECONDITION_FAILED\x10\x04\x12\x36\n2ADMISSION_ERROR_REASON_PROVIDER_CAPACITY_EXHAUSTED\x10\x05\x12/\n+ADMISSION_ERROR_REASON_PROVIDER_UNAVAILABLE\x10\x06\x12/\n+ADMISSION_ERROR_REASON_IDEMPOTENCY_CONFLICT\x10\x07\x12\x35\n1ADMISSION_ERROR_REASON_OPERATION_DEADLINE_EXPIRED\x10\x08\x12\x37\n3ADMISSION_ERROR_REASON_OPERATION_RECORD_UNAVAILABLE\x10\t\x12\x33\n/ADMISSION_ERROR_REASON_OPERATION_RECORD_EXPIRED\x10\n2\xab\x01\n\x19OperationAdmissionService\x12\x8d\x01\n\x0eStartOperation\x12<.stateforge.sfp.operation_admission.v1.StartOperationRequest\x1a=.stateforge.sfp.operation_admission.v1.StartOperationResponseb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nHstateforge_protocol/sfp/operation_admission/v1/operation_admission.proto\x12%stateforge.sfp.operation_admission.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb9\x02\n\x15StartOperationRequest\x12g\n\x0fsession_binding\x18\x01 \x01(\x0b\x32>.stateforge.sfp.operation_admission.v1.OperationSessionBindingR\x0esessionBinding\x12Z\n\ninvocation\x18\x02 \x01(\x0b\x32:.stateforge.sfp.operation_admission.v1.OperationInvocationR\ninvocation\x12[\n\x0e\x61\x64mission_mode\x18\x03 \x01(\x0e\x32\x34.stateforge.sfp.operation_admission.v1.AdmissionModeR\radmissionMode\"\xce\x01\n\x17OperationSessionBinding\x12\x41\n\x1d\x65xpected_provider_instance_id\x18\x01 \x01(\tR\x1a\x65xpectedProviderInstanceId\x12@\n\x1c\x65xpected_endpoint_generation\x18\x02 \x01(\x04R\x1a\x65xpectedEndpointGeneration\x12.\n\x13\x65xpected_session_id\x18\x03 \x01(\tR\x11\x65xpectedSessionId\"\x8c\x03\n\x13OperationInvocation\x12!\n\x0coperation_id\x18\x01 \x01(\tR\x0boperationId\x12\x31\n\x14operation_identifier\x18\x02 \x01(\tR\x13operationIdentifier\x12\x31\n\x07payload\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructR\x07payload\x12I\n\x12\x65xecution_deadline\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x11\x65xecutionDeadline\x12[\n\x08\x63ontract\x18\x06 \x01(\x0b\x32?.stateforge.sfp.operation_admission.v1.OperationContractContextR\x08\x63ontract\x12\x44\n\x11\x65xecution_context\x18\x07 \x01(\x0b\x32\x17.google.protobuf.StructR\x10\x65xecutionContext\"G\n\x18OperationContractContext\x12+\n\x11manifest_revision\x18\x01 \x01(\tR\x10manifestRevision\"\xff\x02\n\x16StartOperationResponse\x12\x30\n\x14provider_instance_id\x18\x01 \x01(\tR\x12providerInstanceId\x12/\n\x13\x65ndpoint_generation\x18\x02 \x01(\x04R\x12\x65ndpointGeneration\x12\x1d\n\nsession_id\x18\x03 \x01(\tR\tsessionId\x12+\n\x11manifest_revision\x18\x04 \x01(\tR\x10manifestRevision\x12]\n\x0b\x64isposition\x18\x05 \x01(\x0e\x32;.stateforge.sfp.operation_admission.v1.AdmissionDispositionR\x0b\x64isposition\x12W\n\x06record\x18\x06 \x01(\x0b\x32?.stateforge.sfp.operation_admission.v1.OperationAdmissionRecordR\x06record\"\xb5\x02\n\x18OperationAdmissionRecord\x12!\n\x0coperation_id\x18\x01 \x01(\tR\x0boperationId\x12/\n\x13request_fingerprint\x18\x02 \x01(\tR\x12requestFingerprint\x12;\n\x0b\x61\x64mitted_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\nadmittedAt\x12\x46\n\x11record_expires_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0frecordExpiresAt\x12@\n\x1c\x61\x64mitted_endpoint_generation\x18\x05 \x01(\x04R\x1a\x61\x64mittedEndpointGeneration\"\x93\x02\n\x1dOperationAdmissionErrorDetail\x12!\n\x0coperation_id\x18\x01 \x01(\tR\x0boperationId\x12S\n\x06reason\x18\x02 \x01(\x0e\x32;.stateforge.sfp.operation_admission.v1.AdmissionErrorReasonR\x06reason\x12\x1c\n\tretryable\x18\x03 \x01(\x08R\tretryable\x12:\n\x0bretry_after\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationR\nretryAfter\x12 \n\x0b\x65xplanation\x18\x05 \x01(\tR\x0b\x65xplanation*u\n\rAdmissionMode\x12\x1e\n\x1a\x41\x44MISSION_MODE_UNSPECIFIED\x10\x00\x12#\n\x1f\x41\x44MISSION_MODE_ADMIT_OR_RESOLVE\x10\x01\x12\x1f\n\x1b\x41\x44MISSION_MODE_RESOLVE_ONLY\x10\x02*\x92\x01\n\x14\x41\x64missionDisposition\x12%\n!ADMISSION_DISPOSITION_UNSPECIFIED\x10\x00\x12&\n\"ADMISSION_DISPOSITION_ACCEPTED_NEW\x10\x01\x12+\n\'ADMISSION_DISPOSITION_RESOLVED_EXISTING\x10\x02*\xd3\x04\n\x14\x41\x64missionErrorReason\x12&\n\"ADMISSION_ERROR_REASON_UNSPECIFIED\x10\x00\x12\x34\n0ADMISSION_ERROR_REASON_INVALID_OPERATION_REQUEST\x10\x01\x12\x31\n-ADMISSION_ERROR_REASON_OPERATION_NOT_DECLARED\x10\x02\x12\x31\n-ADMISSION_ERROR_REASON_OPERATION_INCOMPATIBLE\x10\x03\x12\x38\n4ADMISSION_ERROR_REASON_OPERATION_PRECONDITION_FAILED\x10\x04\x12\x36\n2ADMISSION_ERROR_REASON_PROVIDER_CAPACITY_EXHAUSTED\x10\x05\x12/\n+ADMISSION_ERROR_REASON_PROVIDER_UNAVAILABLE\x10\x06\x12/\n+ADMISSION_ERROR_REASON_IDEMPOTENCY_CONFLICT\x10\x07\x12\x35\n1ADMISSION_ERROR_REASON_OPERATION_DEADLINE_EXPIRED\x10\x08\x12\x37\n3ADMISSION_ERROR_REASON_OPERATION_RECORD_UNAVAILABLE\x10\t\x12\x33\n/ADMISSION_ERROR_REASON_OPERATION_RECORD_EXPIRED\x10\n2\xab\x01\n\x19OperationAdmissionService\x12\x8d\x01\n\x0eStartOperation\x12<.stateforge.sfp.operation_admission.v1.StartOperationRequest\x1a=.stateforge.sfp.operation_admission.v1.StartOperationResponseb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'stateforge_protocol.sfp.operation_admission.v1.operation_admission_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: DESCRIPTOR._loaded_options = None - _globals['_ADMISSIONMODE']._serialized_start=2252 - _globals['_ADMISSIONMODE']._serialized_end=2369 - _globals['_ADMISSIONDISPOSITION']._serialized_start=2372 - _globals['_ADMISSIONDISPOSITION']._serialized_end=2518 - _globals['_ADMISSIONERRORREASON']._serialized_start=2521 - _globals['_ADMISSIONERRORREASON']._serialized_end=3116 + _globals['_ADMISSIONMODE']._serialized_start=2183 + _globals['_ADMISSIONMODE']._serialized_end=2300 + _globals['_ADMISSIONDISPOSITION']._serialized_start=2303 + _globals['_ADMISSIONDISPOSITION']._serialized_end=2449 + _globals['_ADMISSIONERRORREASON']._serialized_start=2452 + _globals['_ADMISSIONERRORREASON']._serialized_end=3047 _globals['_STARTOPERATIONREQUEST']._serialized_start=211 _globals['_STARTOPERATIONREQUEST']._serialized_end=524 _globals['_OPERATIONSESSIONBINDING']._serialized_start=527 _globals['_OPERATIONSESSIONBINDING']._serialized_end=733 _globals['_OPERATIONINVOCATION']._serialized_start=736 _globals['_OPERATIONINVOCATION']._serialized_end=1132 - _globals['_OPERATIONCONTRACTCONTEXT']._serialized_start=1135 - _globals['_OPERATIONCONTRACTCONTEXT']._serialized_end=1274 - _globals['_STARTOPERATIONRESPONSE']._serialized_start=1277 - _globals['_STARTOPERATIONRESPONSE']._serialized_end=1660 - _globals['_OPERATIONADMISSIONRECORD']._serialized_start=1663 - _globals['_OPERATIONADMISSIONRECORD']._serialized_end=1972 - _globals['_OPERATIONADMISSIONERRORDETAIL']._serialized_start=1975 - _globals['_OPERATIONADMISSIONERRORDETAIL']._serialized_end=2250 - _globals['_OPERATIONADMISSIONSERVICE']._serialized_start=3119 - _globals['_OPERATIONADMISSIONSERVICE']._serialized_end=3290 + _globals['_OPERATIONCONTRACTCONTEXT']._serialized_start=1134 + _globals['_OPERATIONCONTRACTCONTEXT']._serialized_end=1205 + _globals['_STARTOPERATIONRESPONSE']._serialized_start=1208 + _globals['_STARTOPERATIONRESPONSE']._serialized_end=1591 + _globals['_OPERATIONADMISSIONRECORD']._serialized_start=1594 + _globals['_OPERATIONADMISSIONRECORD']._serialized_end=1903 + _globals['_OPERATIONADMISSIONERRORDETAIL']._serialized_start=1906 + _globals['_OPERATIONADMISSIONERRORDETAIL']._serialized_end=2181 + _globals['_OPERATIONADMISSIONSERVICE']._serialized_start=3050 + _globals['_OPERATIONADMISSIONSERVICE']._serialized_end=3221 # @@protoc_insertion_point(module_scope) diff --git a/src/stateforge_protocol/sfp/operation_admission/v1/operation_admission_pb2.pyi b/src/stateforge_protocol/sfp/operation_admission/v1/operation_admission_pb2.pyi index 28e29e5..ec61e83 100644 --- a/src/stateforge_protocol/sfp/operation_admission/v1/operation_admission_pb2.pyi +++ b/src/stateforge_protocol/sfp/operation_admission/v1/operation_admission_pb2.pyi @@ -3,13 +3,11 @@ isort:skip_file """ -from collections import abc as _abc from google.protobuf import descriptor as _descriptor from google.protobuf import duration_pb2 as _duration_pb2 from google.protobuf import message as _message from google.protobuf import struct_pb2 as _struct_pb2 from google.protobuf import timestamp_pb2 as _timestamp_pb2 -from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper import builtins as _builtins import sys @@ -186,8 +184,8 @@ Global___OperationSessionBinding: _TypeAlias = OperationSessionBinding # noqa: @_typing.final class OperationInvocation(_message.Message): """OperationInvocation is the immutable semantic request identified by - operation_id. Its complete ProtoJSON projection, with defaults emitted and - required_implementation_roles sorted, is the canonical fingerprint preimage. + operation_id. Its complete ProtoJSON projection, with defaults emitted, + is the canonical fingerprint preimage. """ DESCRIPTOR: _descriptor.Descriptor @@ -219,7 +217,7 @@ class OperationInvocation(_message.Message): @_builtins.property def contract(self) -> Global___OperationContractContext: - """Pins the declaration/schema/profile expectations authorized by the Agent.""" + """Pins the accepted declaration and its schemas.""" @_builtins.property def execution_context(self) -> _struct_pb2.Struct: @@ -247,35 +245,21 @@ Global___OperationInvocation: _TypeAlias = OperationInvocation # noqa: Y015 @_typing.final class OperationContractContext(_message.Message): - """OperationContractContext pins the exact accepted declaration and optional - compliance roles needed by this invocation without changing P1 schema 1. - """ + """OperationContractContext pins the exact accepted declaration.""" DESCRIPTOR: _descriptor.Descriptor MANIFEST_REVISION_FIELD_NUMBER: _builtins.int - REQUIRED_IMPLEMENTATION_ROLES_FIELD_NUMBER: _builtins.int manifest_revision: _builtins.str """Exact accepted GetManifestResponse.manifest_revision.""" - @_builtins.property - def required_implementation_roles(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: - """Distinct profile claims this invocation relies on: a subset of the selected - operation's P1 implements list, not a list of Control Plane contracts or - permissions. The Agent validates recognized profiles before relying on - them; the Provider checks that each requested claim is declared. Empty - means no profile claim is required for this invocation. Ordering is - semantically irrelevant and is sorted in the fingerprint projection. - """ - def __init__( self, *, manifest_revision: _builtins.str = ..., - required_implementation_roles: _abc.Iterable[_builtins.str] | None = ..., ) -> None: ... _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["manifest_revision", b"manifest_revision", "required_implementation_roles", b"required_implementation_roles"] # noqa: Y015 + _ClearFieldArgType: _TypeAlias = _typing.Literal["manifest_revision", b"manifest_revision"] # noqa: Y015 def ClearField(self, field_name: _ClearFieldArgType) -> None: ... def WhichOneof(self, oneof_group: _Never) -> None: ... diff --git a/src/stateforge_protocol/sfp/operation_admission/v1/validation.py b/src/stateforge_protocol/sfp/operation_admission/v1/validation.py index f3a6c79..2d82e9d 100644 --- a/src/stateforge_protocol/sfp/operation_admission/v1/validation.py +++ b/src/stateforge_protocol/sfp/operation_admission/v1/validation.py @@ -3,7 +3,7 @@ from __future__ import annotations import hashlib -from typing import Final, cast +from typing import Final from stateforge_protocol.sfp import _validation from stateforge_protocol.sfp.operation_admission.v1 import ( @@ -243,9 +243,6 @@ def canonical_invocation( "operationInvocation", "invocation", ) - contract_context = cast(dict[str, object], projected["contract"]) - roles = cast(list[str], contract_context["requiredImplementationRoles"]) - roles.sort() return _VALIDATION.canonicalize_json( projected, maximum_bytes=None, diff --git a/src/stateforge_protocol/sfp/operation_lifecycle/v1/operation_lifecycle_pb2.pyi b/src/stateforge_protocol/sfp/operation_lifecycle/v1/operation_lifecycle_pb2.pyi index 9cdb2cc..95f1d9b 100644 --- a/src/stateforge_protocol/sfp/operation_lifecycle/v1/operation_lifecycle_pb2.pyi +++ b/src/stateforge_protocol/sfp/operation_lifecycle/v1/operation_lifecycle_pb2.pyi @@ -404,7 +404,7 @@ class OperationSuccess(_message.Message): def result(self) -> _struct_pb2.Struct: """Required object, including an explicitly present empty object when allowed. Validate against the original admitted operation's pinned Provider - Manifest result_schema and relied-on profiles before committing SUCCEEDED. + Manifest result_schema before committing SUCCEEDED. Never apply defaults. """ diff --git a/tests/fixtures/capability_assessment/accepted-manifest.json b/tests/fixtures/capability_assessment/accepted-manifest.json index 31e48c7..fcb1b41 100644 --- a/tests/fixtures/capability_assessment/accepted-manifest.json +++ b/tests/fixtures/capability_assessment/accepted-manifest.json @@ -19,8 +19,7 @@ "type": "object", "properties": {}, "additionalProperties": false - }, - "implements": [] + } }, "stateforge.git/branch.list@1": { "inputSchema": { @@ -34,8 +33,7 @@ "type": "object", "properties": {}, "additionalProperties": false - }, - "implements": [] + } }, "stateforge.git/tag.list@1": { "inputSchema": { @@ -49,8 +47,7 @@ "type": "object", "properties": {}, "additionalProperties": false - }, - "implements": [] + } }, "stateforge.git/configuration.inspect@1": { "inputSchema": { @@ -64,10 +61,7 @@ "type": "object", "properties": {}, "additionalProperties": false - }, - "implements": [ - "example.git.profile.v1.configuration_inspection" - ] + } } }, "runtimeRequirements": { @@ -101,6 +95,6 @@ }, "triggers": {} }, - "manifestRevision": "sha256:dd58cd0518f631e370a095e6ba0c97476b028c8c65fac1f4b8da28d130c94cb7", + "manifestRevision": "sha256:4ad60e2cc41a8e180190739cf07acdd511d8236aedf585820897fdbd61d404c9", "sessionId": "session-3d19b6d2-4b7b-4f4a-9c9a-2f3f4f0c9a1b" } diff --git a/tests/fixtures/capability_assessment/invalid/duplicate-operation-request.json b/tests/fixtures/capability_assessment/invalid/duplicate-operation-request.json index e88ff9c..2c3a42b 100644 --- a/tests/fixtures/capability_assessment/invalid/duplicate-operation-request.json +++ b/tests/fixtures/capability_assessment/invalid/duplicate-operation-request.json @@ -3,7 +3,7 @@ "expectedProviderInstanceId": "550e8400-e29b-41d4-a716-446655440000", "expectedEndpointGeneration": "4", "expectedSessionId": "session-3d19b6d2-4b7b-4f4a-9c9a-2f3f4f0c9a1b", - "expectedManifestRevision": "sha256:dd58cd0518f631e370a095e6ba0c97476b028c8c65fac1f4b8da28d130c94cb7", + "expectedManifestRevision": "sha256:4ad60e2cc41a8e180190739cf07acdd511d8236aedf585820897fdbd61d404c9", "executionContext": { "locale": "en-US" }, diff --git a/tests/fixtures/capability_assessment/invalid/invariant-violation-response.json b/tests/fixtures/capability_assessment/invalid/invariant-violation-response.json index 1705b83..97fceba 100644 --- a/tests/fixtures/capability_assessment/invalid/invariant-violation-response.json +++ b/tests/fixtures/capability_assessment/invalid/invariant-violation-response.json @@ -3,7 +3,7 @@ "providerInstanceId": "550e8400-e29b-41d4-a716-446655440000", "endpointGeneration": "4", "sessionId": "session-3d19b6d2-4b7b-4f4a-9c9a-2f3f4f0c9a1b", - "manifestRevision": "sha256:dd58cd0518f631e370a095e6ba0c97476b028c8c65fac1f4b8da28d130c94cb7", + "manifestRevision": "sha256:4ad60e2cc41a8e180190739cf07acdd511d8236aedf585820897fdbd61d404c9", "assessmentId": "6ba7b810-9dad-41d1-80b4-00c04fd430c8", "assessmentTimestamp": "2026-09-16T07:30:00Z", "findings": [ diff --git a/tests/fixtures/capability_assessment/invalid/unspecified-support-state-response.json b/tests/fixtures/capability_assessment/invalid/unspecified-support-state-response.json index c28c7bf..aa815a4 100644 --- a/tests/fixtures/capability_assessment/invalid/unspecified-support-state-response.json +++ b/tests/fixtures/capability_assessment/invalid/unspecified-support-state-response.json @@ -3,7 +3,7 @@ "providerInstanceId": "550e8400-e29b-41d4-a716-446655440000", "endpointGeneration": "4", "sessionId": "session-3d19b6d2-4b7b-4f4a-9c9a-2f3f4f0c9a1b", - "manifestRevision": "sha256:dd58cd0518f631e370a095e6ba0c97476b028c8c65fac1f4b8da28d130c94cb7", + "manifestRevision": "sha256:4ad60e2cc41a8e180190739cf07acdd511d8236aedf585820897fdbd61d404c9", "assessmentId": "6ba7b810-9dad-41d1-80b4-00c04fd430c8", "assessmentTimestamp": "2026-09-16T07:30:00Z", "findings": [ diff --git a/tests/fixtures/capability_assessment/request.json b/tests/fixtures/capability_assessment/request.json index a6b7712..66c96ab 100644 --- a/tests/fixtures/capability_assessment/request.json +++ b/tests/fixtures/capability_assessment/request.json @@ -3,7 +3,7 @@ "expectedProviderInstanceId": "550e8400-e29b-41d4-a716-446655440000", "expectedEndpointGeneration": "4", "expectedSessionId": "session-3d19b6d2-4b7b-4f4a-9c9a-2f3f4f0c9a1b", - "expectedManifestRevision": "sha256:dd58cd0518f631e370a095e6ba0c97476b028c8c65fac1f4b8da28d130c94cb7", + "expectedManifestRevision": "sha256:4ad60e2cc41a8e180190739cf07acdd511d8236aedf585820897fdbd61d404c9", "executionContext": { "locale": "en-US" }, diff --git a/tests/fixtures/capability_assessment/response-mixed-states.json b/tests/fixtures/capability_assessment/response-mixed-states.json index ec6a053..72a910d 100644 --- a/tests/fixtures/capability_assessment/response-mixed-states.json +++ b/tests/fixtures/capability_assessment/response-mixed-states.json @@ -3,7 +3,7 @@ "providerInstanceId": "550e8400-e29b-41d4-a716-446655440000", "endpointGeneration": "4", "sessionId": "session-3d19b6d2-4b7b-4f4a-9c9a-2f3f4f0c9a1b", - "manifestRevision": "sha256:dd58cd0518f631e370a095e6ba0c97476b028c8c65fac1f4b8da28d130c94cb7", + "manifestRevision": "sha256:4ad60e2cc41a8e180190739cf07acdd511d8236aedf585820897fdbd61d404c9", "assessmentId": "6ba7b810-9dad-41d1-80b4-00c04fd430c8", "assessmentTimestamp": "2026-09-16T07:30:00Z", "findings": [ diff --git a/tests/fixtures/manifest/presentation-response.json b/tests/fixtures/manifest/presentation-response.json index 37f40c1..337dfde 100644 --- a/tests/fixtures/manifest/presentation-response.json +++ b/tests/fixtures/manifest/presentation-response.json @@ -45,8 +45,7 @@ "commit" ], "additionalProperties": false - }, - "implements": [] + } } }, "runtimeRequirements": { @@ -99,7 +98,7 @@ } } }, - "manifestRevision": "sha256:c836c97c8f170ea22b7c9002aa6075d84746dab7bbe3c822f628fd1176fd3c56", + "manifestRevision": "sha256:6637635060a434145e916c9eef9e3218ec6f07c4c580083b796fdaa99e8977e4", "sessionId": "manifest-session-A", "presentation": { "presentationSchemaVersion": 1, @@ -236,5 +235,5 @@ } } }, - "presentationRevision": "sha256:df215c63eb41659f8d38649cf84bd9f9e7696aa9d08b88219f219361d1bc8d2d" + "presentationRevision": "sha256:d009132a924764a4d7d68947c2d76f654faa6e2111640fc21d49281593644e3e" } diff --git a/tests/fixtures/manifest/response.json b/tests/fixtures/manifest/response.json index ba16216..e9f090b 100644 --- a/tests/fixtures/manifest/response.json +++ b/tests/fixtures/manifest/response.json @@ -19,8 +19,7 @@ "type": "object", "properties": {}, "additionalProperties": false - }, - "implements": [] + } } }, "runtimeRequirements": { @@ -54,6 +53,6 @@ }, "triggers": {} }, - "manifestRevision": "sha256:6bfdf3aedc2d4e45d77d4787cc0e744a488208b2510d81788291f51d24a623e8", + "manifestRevision": "sha256:aa27f0fddaa13df211bd3e4e4e4230cdda42d9188d4b480d196c2e0de2d20cdb", "sessionId": "manifest-session-A" } diff --git a/tests/fixtures/manifest/revision-preimage.json b/tests/fixtures/manifest/revision-preimage.json index 84936ec..9ef598b 100644 --- a/tests/fixtures/manifest/revision-preimage.json +++ b/tests/fixtures/manifest/revision-preimage.json @@ -1 +1 @@ -{"manifest":{"configurationSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"repository":{"type":"string"},"token":{"type":"string","writeOnly":true}},"required":["repository"],"type":"object"},"displayName":"Git Provider","implementationVersion":"1.0.0","operations":{"stateforge.git/reference.resolve@1":{"implements":[],"inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{},"type":"object"},"resultSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{},"type":"object"}}},"platforms":[{"architecture":"x86_64","operatingSystem":"linux"}],"providerIdentity":"stateforge.git","runtimeRequirements":{"executable.git":{"description":"Git executable available to the Provider","versionConstraint":">=2.40"}},"triggers":{}},"manifestSchemaVersion":1,"providerInstanceId":"7f7db7d8-68b4-4f71-9769-065b5c4f941c"} \ No newline at end of file +{"manifest":{"configurationSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"repository":{"type":"string"},"token":{"type":"string","writeOnly":true}},"required":["repository"],"type":"object"},"displayName":"Git Provider","implementationVersion":"1.0.0","operations":{"stateforge.git/reference.resolve@1":{"inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{},"type":"object"},"resultSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{},"type":"object"}}},"platforms":[{"architecture":"x86_64","operatingSystem":"linux"}],"providerIdentity":"stateforge.git","runtimeRequirements":{"executable.git":{"description":"Git executable available to the Provider","versionConstraint":">=2.40"}},"triggers":{}},"manifestSchemaVersion":1,"providerInstanceId":"7f7db7d8-68b4-4f71-9769-065b5c4f941c"} \ No newline at end of file diff --git a/tests/fixtures/operation_admission/error-cases.json b/tests/fixtures/operation_admission/error-cases.json index ee30045..1f9a0fa 100644 --- a/tests/fixtures/operation_admission/error-cases.json +++ b/tests/fixtures/operation_admission/error-cases.json @@ -14,7 +14,7 @@ "createsAcceptedRecord": false }, { - "condition": "operation schema or required role is incompatible", + "condition": "operation schema is incompatible", "grpcStatus": "FAILED_PRECONDITION", "reason": "ADMISSION_ERROR_REASON_OPERATION_INCOMPATIBLE", "retryable": false, diff --git a/tests/fixtures/operation_admission/fingerprint-vector.json b/tests/fixtures/operation_admission/fingerprint-vector.json index 73b4297..81f380d 100644 --- a/tests/fixtures/operation_admission/fingerprint-vector.json +++ b/tests/fixtures/operation_admission/fingerprint-vector.json @@ -1,7 +1,7 @@ { "algorithm": "sha256", "canonicalization": "RFC 8785", - "projection": "OperationInvocation ProtoJSON with defaults emitted and requiredImplementationRoles sorted lexicographically", - "canonicalJson": "{\"contract\":{\"manifestRevision\":\"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"requiredImplementationRoles\":[\"stateforge.operation.v1.audited\",\"stateforge.operation.v1.safe\"]},\"executionContext\":{\"authority\":\"policy-run-123\",\"requestedBy\":\"control-plane\"},\"executionDeadline\":\"2026-09-20T12:00:00Z\",\"operationId\":\"22222222-2222-4222-8222-222222222222\",\"operationIdentifier\":\"example.database/maintenance.compact@1\",\"payload\":{\"maxDurationSeconds\":300,\"mode\":\"online\",\"resource\":{\"cluster\":\"primary\",\"region\":\"eu-west-1\"}}}", - "fingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df" + "projection": "OperationInvocation ProtoJSON with defaults emitted", + "canonicalJson": "{\"contract\":{\"manifestRevision\":\"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"},\"executionContext\":{\"authority\":\"policy-run-123\",\"requestedBy\":\"control-plane\"},\"executionDeadline\":\"2026-09-20T12:00:00Z\",\"operationId\":\"22222222-2222-4222-8222-222222222222\",\"operationIdentifier\":\"example.database/maintenance.compact@1\",\"payload\":{\"maxDurationSeconds\":300,\"mode\":\"online\",\"resource\":{\"cluster\":\"primary\",\"region\":\"eu-west-1\"}}}", + "fingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df" } diff --git a/tests/fixtures/operation_admission/invalid/default-request.json b/tests/fixtures/operation_admission/invalid/default-request.json index 33a60d5..5724038 100644 --- a/tests/fixtures/operation_admission/invalid/default-request.json +++ b/tests/fixtures/operation_admission/invalid/default-request.json @@ -10,8 +10,7 @@ "payload": {}, "executionDeadline": "1970-01-01T00:00:00Z", "contract": { - "manifestRevision": "", - "requiredImplementationRoles": [] + "manifestRevision": "" }, "executionContext": {} }, diff --git a/tests/fixtures/operation_admission/invalid/payload-array-request.json b/tests/fixtures/operation_admission/invalid/payload-array-request.json index 33fb25d..cb73428 100644 --- a/tests/fixtures/operation_admission/invalid/payload-array-request.json +++ b/tests/fixtures/operation_admission/invalid/payload-array-request.json @@ -7,11 +7,14 @@ "invocation": { "operationId": "22222222-2222-4222-8222-222222222222", "operationIdentifier": "example.database/maintenance.compact@1", - "payload": ["not", "an", "object"], + "payload": [ + "not", + "an", + "object" + ], "executionDeadline": "2026-09-20T12:00:00Z", "contract": { - "manifestRevision": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "requiredImplementationRoles": [] + "manifestRevision": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "executionContext": {} }, diff --git a/tests/fixtures/operation_admission/request.json b/tests/fixtures/operation_admission/request.json index 40f0ee5..8e9d24f 100644 --- a/tests/fixtures/operation_admission/request.json +++ b/tests/fixtures/operation_admission/request.json @@ -17,11 +17,7 @@ }, "executionDeadline": "2026-09-20T12:00:00Z", "contract": { - "manifestRevision": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "requiredImplementationRoles": [ - "stateforge.operation.v1.safe", - "stateforge.operation.v1.audited" - ] + "manifestRevision": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "executionContext": { "authority": "policy-run-123", diff --git a/tests/fixtures/operation_admission/response-accepted-new.json b/tests/fixtures/operation_admission/response-accepted-new.json index 5e58299..8571c67 100644 --- a/tests/fixtures/operation_admission/response-accepted-new.json +++ b/tests/fixtures/operation_admission/response-accepted-new.json @@ -6,7 +6,7 @@ "disposition": "ADMISSION_DISPOSITION_ACCEPTED_NEW", "record": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" diff --git a/tests/fixtures/operation_admission/response-resolved-existing.json b/tests/fixtures/operation_admission/response-resolved-existing.json index 14396cf..af3c2aa 100644 --- a/tests/fixtures/operation_admission/response-resolved-existing.json +++ b/tests/fixtures/operation_admission/response-resolved-existing.json @@ -6,7 +6,7 @@ "disposition": "ADMISSION_DISPOSITION_RESOLVED_EXISTING", "record": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" diff --git a/tests/fixtures/operation_lifecycle/README.md b/tests/fixtures/operation_lifecycle/README.md index 4b3d778..c7f963c 100644 --- a/tests/fixtures/operation_lifecycle/README.md +++ b/tests/fixtures/operation_lifecycle/README.md @@ -22,7 +22,7 @@ cancellation/transport enforcement. earlier cancellation was undone. The fixture tests do not invoke author code. - `result-schema.json` is an illustrative pinned Draft 2020-12 result schema for Operation Admission's generic maintenance operation. It is not a standardized - compliance profile or a replacement for the real admitted manifest. Negative + Profile definition or a replacement for the real admitted manifest. Negative author values and invalid wire/cross-field values are parametrized in the tests. - `error-cases.json` distinguishes RPC rejection from a terminal operation diff --git a/tests/fixtures/operation_lifecycle/cancel-request.json b/tests/fixtures/operation_lifecycle/cancel-request.json index 958a7e5..077834b 100644 --- a/tests/fixtures/operation_lifecycle/cancel-request.json +++ b/tests/fixtures/operation_lifecycle/cancel-request.json @@ -5,5 +5,5 @@ "expectedSessionId": "session-admission-42" }, "operationId": "22222222-2222-4222-8222-222222222222", - "expectedRequestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df" + "expectedRequestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df" } diff --git a/tests/fixtures/operation_lifecycle/cancel-requested.json b/tests/fixtures/operation_lifecycle/cancel-requested.json index 23238ce..f77a2e4 100644 --- a/tests/fixtures/operation_lifecycle/cancel-requested.json +++ b/tests/fixtures/operation_lifecycle/cancel-requested.json @@ -6,7 +6,7 @@ "snapshot": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" diff --git a/tests/fixtures/operation_lifecycle/snapshots.json b/tests/fixtures/operation_lifecycle/snapshots.json index 25a2dd0..a23c2bf 100644 --- a/tests/fixtures/operation_lifecycle/snapshots.json +++ b/tests/fixtures/operation_lifecycle/snapshots.json @@ -2,7 +2,7 @@ "accepted": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" @@ -16,7 +16,7 @@ "running": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" @@ -30,7 +30,7 @@ "progress-25": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" @@ -50,7 +50,7 @@ "progress-100": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" @@ -70,7 +70,7 @@ "requested": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" @@ -90,7 +90,7 @@ "succeeded": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" @@ -115,7 +115,7 @@ "succeeded-after-request": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" @@ -140,7 +140,7 @@ "cancelled": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" @@ -167,7 +167,7 @@ "failed": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" @@ -196,7 +196,7 @@ "failed-after-request": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" @@ -225,7 +225,7 @@ "invalid-result": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" @@ -254,7 +254,7 @@ "deadline": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" @@ -283,7 +283,7 @@ "prestart-failure": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" @@ -306,7 +306,7 @@ "queued-request": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" @@ -320,7 +320,7 @@ "queued-cancelled": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" diff --git a/tests/fixtures/operation_lifecycle/watch-request.json b/tests/fixtures/operation_lifecycle/watch-request.json index c39013c..efd6544 100644 --- a/tests/fixtures/operation_lifecycle/watch-request.json +++ b/tests/fixtures/operation_lifecycle/watch-request.json @@ -5,6 +5,6 @@ "expectedSessionId": "session-admission-42" }, "operationId": "22222222-2222-4222-8222-222222222222", - "expectedRequestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "expectedRequestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "afterSequence": "0" } diff --git a/tests/fixtures/operation_lifecycle/watch-terminal.json b/tests/fixtures/operation_lifecycle/watch-terminal.json index 568bc48..b542adc 100644 --- a/tests/fixtures/operation_lifecycle/watch-terminal.json +++ b/tests/fixtures/operation_lifecycle/watch-terminal.json @@ -5,7 +5,7 @@ "snapshot": { "admissionRecord": { "operationId": "22222222-2222-4222-8222-222222222222", - "requestFingerprint": "sha256:9d52f77a7f678fda81dcee97df7b3bc5e4877ee570285f6aa5741b83d4c731df", + "requestFingerprint": "sha256:6f555da004a09c3aba919883a19ede8de6cd424d59e1696954fb10aec2f416df", "admittedAt": "2026-09-19T12:00:00Z", "recordExpiresAt": "2026-09-20T12:00:00Z", "admittedEndpointGeneration": "42" diff --git a/tests/test_manifest_contract.py b/tests/test_manifest_contract.py index 0621d3a..c29529a 100644 --- a/tests/test_manifest_contract.py +++ b/tests/test_manifest_contract.py @@ -76,7 +76,6 @@ def test_versioned_contract_exposes_normative_limits() -> None: "MAX_TRIGGERS": 1_024, "MAX_RUNTIME_REQUIREMENTS": 1_024, "MAX_PLATFORMS": 256, - "MAX_PROFILE_CLAIMS_PER_OPERATION": 64, "PRESENTATION_SCHEMA_VERSION": 1, "MAX_PRESENTATION_SURFACES_PER_TARGET": 8, "MAX_PRESENTATION_COMPONENTS": 4_096, @@ -108,10 +107,6 @@ def test_versioned_contract_limits_match_packaged_schema() -> None: == contract.MAX_RUNTIME_REQUIREMENTS ) assert manifest["platforms"]["maxItems"] == contract.MAX_PLATFORMS - assert ( - definitions["operation"]["properties"]["implements"]["maxItems"] - == contract.MAX_PROFILE_CLAIMS_PER_OPERATION - ) schema_versions = request["supportedManifestSchemaVersions"] assert ( schema_versions["maxItems"] == contract.MAX_SUPPORTED_SCHEMA_VERSIONS @@ -592,7 +587,7 @@ def test_secret_schema_fields_cannot_embed_values( validator.validate(response) -def test_custom_operations_do_not_imply_compliance(response, validator): +def test_custom_operations_preserve_declared_schemas(response, validator): operations = response["manifest"]["operations"] declaration = operations.pop("stateforge.git/reference.resolve@1") operations["example.vendor/resource.inspect@3"] = declaration @@ -601,9 +596,7 @@ def test_custom_operations_do_not_imply_compliance(response, validator): message = json_format.ParseDict( response, manifest_pb2.GetManifestResponse() ) - assert not message.manifest.operations[ - "example.vendor/resource.inspect@3" - ].implements + assert "example.vendor/resource.inspect@3" in message.manifest.operations @pytest.mark.parametrize( @@ -624,12 +617,9 @@ def test_invalid_operation_identifiers(response, validator, identifier): validator.validate(response) -def test_compliance_claims_and_trigger_schemas_survive_wire( - response, validator -): +def test_operation_and_trigger_schemas_survive_wire(response, validator): manifest = response["manifest"] operation = next(iter(manifest["operations"].values())) - operation["implements"] = ["example.vendor.profile.v1.read_only"] manifest["triggers"]["stateforge.git/reference.changed@1"] = { "payloadSchema": copy.deepcopy(operation["resultSchema"]) } @@ -640,11 +630,8 @@ def test_compliance_claims_and_trigger_schemas_survive_wire( decoded = manifest_pb2.GetManifestResponse.FromString( message.SerializeToString() ) - assert list( - decoded.manifest.operations[ - "stateforge.git/reference.resolve@1" - ].implements - ) == ["example.vendor.profile.v1.read_only"] + assert decoded.manifest.operations == message.manifest.operations + assert decoded.manifest.triggers == message.manifest.triggers assert "stateforge.git/reference.changed@1" in decoded.manifest.triggers @@ -659,7 +646,7 @@ def test_unchanged_revision_is_independent_of_map_order_and_generation( @pytest.mark.parametrize( "change", - ["identity", "version", "configuration", "operation", "profile", "result"], + ["identity", "version", "configuration", "operation", "input", "result"], ) def test_interoperability_changes_change_revision(response, change): original = hashlib.sha256(_preimage(response)).digest() @@ -679,9 +666,9 @@ def test_interoperability_changes_change_revision(response, change): "properties" ] = {"count": {"type": "integer"}} else: - next(iter(manifest["operations"].values()))["implements"] = [ - "example.vendor.profile.v1.read_only" - ] + next(iter(manifest["operations"].values()))["inputSchema"][ + "properties" + ] = {"count": {"type": "integer"}} assert hashlib.sha256(_preimage(response)).digest() != original @@ -702,13 +689,10 @@ def test_operation_declaration_contains_only_generic_fields(): assert {field.name: field.number for field in descriptor.fields} == { "input_schema": 1, "result_schema": 2, - "implements": 3, } -@pytest.mark.parametrize( - "field", ["inputSchema", "resultSchema", "implements"] -) +@pytest.mark.parametrize("field", ["inputSchema", "resultSchema"]) def test_all_declaration_fields_are_explicitly_required(response, field): operation = next(iter(response["manifest"]["operations"].values())) del operation[field] @@ -717,25 +701,19 @@ def test_all_declaration_fields_are_explicitly_required(response, field): @pytest.mark.parametrize( - ("identifier", "roles"), + "identifier", [ - ("stateforge.git/reference.resolve@1", []), - ("example.vendor/resource.inspect@3", []), - ("example.vendor/collect@1", ["example.vendor.profile.v1.read_only"]), - ( - "example.vendor/resource.update@1", - ["example.vendor.profile.v1.mutating"], - ), - ("example.vendor/custom@2", ["example.vendor.manifest_pb2.custom"]), + "stateforge.git/reference.resolve@1", + "example.vendor/resource.inspect@3", + "example.vendor/collect@1", + "example.vendor/resource.update@1", + "example.vendor/custom@2", ], ) def test_all_operation_categories_share_generic_declaration( - response, identifier, roles + response, identifier ): - # These are structural claim examples. SFP transports but does not assign - # semantics to extensible profile identifiers. operation = next(iter(response["manifest"]["operations"].values())) - operation["implements"] = roles response["manifest"]["operations"] = {identifier: operation} Draft202012Validator(_SCHEMA).validate(response) message = json_format.ParseDict( @@ -745,8 +723,16 @@ def test_all_operation_categories_share_generic_declaration( message, always_print_fields_with_no_presence=True )["manifest"]["operations"][identifier] assert projected == operation - assert set(projected) == {"inputSchema", "resultSchema", "implements"} - assert projected["implements"] == roles + assert set(projected) == {"inputSchema", "resultSchema"} + + +def test_removed_profile_claim_is_rejected(response, validator): + operation = next(iter(response["manifest"]["operations"].values())) + operation["implements"] = ["example.vendor.profile.v1.read_only"] + with pytest.raises(ValidationError, match="Additional properties"): + validator.validate(response) + with pytest.raises(json_format.ParseError, match="implements"): + json_format.ParseDict(response, manifest_pb2.GetManifestResponse()) def test_incidental_result_shape_creates_no_manifest_semantics(response): @@ -764,8 +750,7 @@ def test_incidental_result_shape_creates_no_manifest_semantics(response): message, always_print_fields_with_no_presence=True ) assert projected == response - assert not operation["implements"] - assert set(operation) == {"inputSchema", "resultSchema", "implements"} + assert set(operation) == {"inputSchema", "resultSchema"} @pytest.mark.parametrize("field", ["inputSchema", "resultSchema"]) diff --git a/tests/test_manifest_session_contract.py b/tests/test_manifest_session_contract.py index 484b139..43b13b7 100644 --- a/tests/test_manifest_session_contract.py +++ b/tests/test_manifest_session_contract.py @@ -30,7 +30,7 @@ "getManifestResponse": manifest_pb2.GetManifestResponse, } _GOLDEN = ( - "sha256:6bfdf3aedc2d4e45d77d4787cc0e744a488208b2510d81788291f51d24a623e8" + "sha256:aa27f0fddaa13df211bd3e4e4e4230cdda42d9188d4b480d196c2e0de2d20cdb" ) diff --git a/tests/test_manifest_validation.py b/tests/test_manifest_validation.py index 8b97cf8..c694c86 100644 --- a/tests/test_manifest_validation.py +++ b/tests/test_manifest_validation.py @@ -37,7 +37,7 @@ TRIGGER_EVENT_SURFACE = "stateforge.ui/surface.trigger.event@1" PROVIDER_RUNTIME_BINDING = "stateforge.binding/provider.runtime@1" _GOLDEN_REVISION = ( - "sha256:6bfdf3aedc2d4e45d77d4787cc0e744a488208b2510d81788291f51d24a623e8" + "sha256:aa27f0fddaa13df211bd3e4e4e4230cdda42d9188d4b480d196c2e0de2d20cdb" ) diff --git a/tests/test_operation_admission_contract.py b/tests/test_operation_admission_contract.py index 7cdbb72..191a662 100644 --- a/tests/test_operation_admission_contract.py +++ b/tests/test_operation_admission_contract.py @@ -55,7 +55,6 @@ def _canonical_invocation(request_data: dict) -> bytes: request.invocation, always_print_fields_with_no_presence=True, ) - projection["contract"]["requiredImplementationRoles"].sort() return rfc8785.dumps(projection) @@ -91,7 +90,6 @@ def test_versioned_contract_exposes_normative_limits() -> None: "MAX_PAYLOAD_JSON_DEPTH": 64, "MAX_EXECUTION_CONTEXT_JSON_DEPTH": 64, "MAX_JSON_CONTAINER_ENTRIES": 256, - "MAX_REQUIRED_IMPLEMENTATION_ROLES": 16, } assert {name: getattr(contract, name) for name in expected} == expected @@ -108,12 +106,6 @@ def test_versioned_contract_limits_match_packaged_schema() -> None: definitions["boundedObject"]["maxProperties"] == contract.MAX_JSON_CONTAINER_ENTRIES ) - assert ( - definitions["operationContractContext"]["properties"][ - "requiredImplementationRoles" - ]["maxItems"] - == contract.MAX_REQUIRED_IMPLEMENTATION_ROLES - ) def test_request_round_trip_preserves_complete_projection( @@ -289,9 +281,6 @@ def test_resource_selection_is_operation_specific_payload( "example.utility/heartbeat.ping@1" ) without_resource["invocation"]["payload"] = {} - without_resource["invocation"]["contract"][ - "requiredImplementationRoles" - ] = [] _REQUEST_VALIDATOR.validate(without_resource) json_format.ParseDict( without_resource, @@ -351,13 +340,11 @@ def test_golden_fingerprint_vector(request_data) -> None: assert _fingerprint(request_data) == vector["fingerprint"] -def test_required_role_order_is_not_semantic(request_data) -> None: - reordered = copy.deepcopy(request_data) - reordered["invocation"]["contract"][ - "requiredImplementationRoles" - ].reverse() - - assert _fingerprint(reordered) == _fingerprint(request_data) +def test_contract_context_contains_only_manifest_revision() -> None: + descriptor = operation_admission_pb2.OperationContractContext.DESCRIPTOR + assert {field.name: field.number for field in descriptor.fields} == { + "manifest_revision": 1, + } @pytest.mark.parametrize( @@ -751,12 +738,13 @@ def test_generation_outside_uint64_cannot_enter_wire_message() -> None: ) -def test_duplicate_required_roles_are_structurally_invalid( - request_data, -) -> None: - duplicate = copy.deepcopy(request_data) - roles = duplicate["invocation"]["contract"]["requiredImplementationRoles"] - roles.append(roles[0]) - - with pytest.raises(ValidationError): - _REQUEST_VALIDATOR.validate(duplicate) +def test_removed_required_roles_are_rejected(request_data) -> None: + request_data["invocation"]["contract"]["requiredImplementationRoles"] = [] + with pytest.raises(ValidationError, match="Additional properties"): + _REQUEST_VALIDATOR.validate(request_data) + with pytest.raises( + json_format.ParseError, match="requiredImplementationRoles" + ): + json_format.ParseDict( + request_data, operation_admission_pb2.StartOperationRequest() + ) From edc1eca0a69506a29fd1f0c3d364d2750772ff95 Mon Sep 17 00:00:00 2001 From: Noam Alum Date: Mon, 9 Nov 2026 15:58:51 +0200 Subject: [PATCH 2/2] Removed unnecessary explanation about profiles. --- docs/v0.1.0/reference/glossary.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/v0.1.0/reference/glossary.md b/docs/v0.1.0/reference/glossary.md index 851db47..0dfb3c7 100644 --- a/docs/v0.1.0/reference/glossary.md +++ b/docs/v0.1.0/reference/glossary.md @@ -84,7 +84,6 @@ governing each version surface. | **Runtime requirement** | Named prerequisite declared for an operation and evaluated against the target runtime during Capability Assessment. | | **Platform compatibility** | Manifest-declared operating-system or architecture compatibility. It is static declaration data, not current runtime evidence. | | **Configuration schema** | JSON Schema describing Provider configuration shape. Fields marked `writeOnly` may carry secrets and must not be echoed. | -| **Profile** | Control Plane-managed capability definition matched to concrete schemas and field mappings. SFP carries no Provider-owned Profile claims. | | **Health** | Standard gRPC Health status for overall Provider process readiness, watched with an empty service name. | | **Availability** | Agent-derived state describing whether the current Provider session can accept new work after transport, session, manifest, and Health checks. | | **Eligibility** | Whether the Agent may use a Provider for a particular procedure after that procedure's prerequisites are satisfied. |