@aikdna/kdna-core 0.37.6 → 0.37.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +21 -15
  2. package/package.json +6 -1
  3. package/src/public-contract/browser-native/sections/contract.json +139 -2
  4. package/src/public-contract/browserwhole06/contract.json +2 -2
  5. package/src/public-contract/creation06/contract.json +2 -2
  6. package/src/public-contract/creation06/generation-manifest.json +7 -7
  7. package/src/public-contract/execution06/contract.json +2 -2
  8. package/src/public-contract/execution06/generation-manifest.json +7 -7
  9. package/src/public-contract/issuer-contract.generated.json +4 -4
  10. package/src/public-contract/issuer-validators.generated.js +7 -7
  11. package/src/public-contract/key-grant-issuer-node.d.ts +1 -1
  12. package/src/public-contract/migration06/contract.json +1155 -0
  13. package/src/public-contract/migration06/types.d.ts +41 -0
  14. package/src/public-contract/migration06/validators.cjs +8691 -0
  15. package/src/public-contract/package-set-contract.generated.json +5 -5
  16. package/src/public-contract/package-set-node.d.ts +1 -1
  17. package/src/public-contract/package-set-validators.generated.js +9 -9
  18. package/src/public-contract/packageset06/contract.json +2 -2
  19. package/src/public-contract/packageset06/generation-manifest.json +7 -7
  20. package/src/public-contract/protected-browser-contract/contract.json +4 -4
  21. package/src/public-contract/protected-browser-contract/descriptor.json +1 -1
  22. package/src/public-contract/protected-source-contract.generated.json +6 -6
  23. package/src/public-contract/protected-source-node.d.ts +1 -1
  24. package/src/public-contract/protection-contract.generated.json +6 -6
  25. package/src/public-contract/protection-node.d.ts +2 -2
  26. package/src/public-contract/protection-validators.generated.js +5 -5
  27. package/src/public-contract/retained/contract.json +2 -2
  28. package/src/public-contract/retained/generation-manifest.json +7 -7
  29. package/src/public-contract/retained-browser06/contract.json +2 -2
  30. package/src/public-contract/sectionbytes/contract.json +2 -2
  31. package/src/public-contract/sectionbytes/generation-manifest.json +7 -7
  32. package/src/public-contract/sections/contract.json +139 -2
  33. package/src/public-contract/sections/generation-manifest.json +9 -9
  34. package/src/public-contract/source-migration-node.d.ts +14 -0
  35. package/src/public-contract/source-migration-node.js +253 -0
  36. package/src/public-contract/source-migration-node.mjs +2 -0
  37. package/src/public-contract/source-route-capture.js +1 -1
  38. package/src/public-contract/source-validators.generated.js +6 -6
  39. package/src/public-contract/source06/contract.json +2 -2
@@ -0,0 +1,41 @@
1
+ // Candidate source-migration route types. Opaque brands require native creation.
2
+ declare const AdmittedSourceMigrationRequest06Brand: unique symbol;
3
+ export type AdmittedSourceMigrationRequest06 = { readonly [AdmittedSourceMigrationRequest06Brand]: true };
4
+ export type Boolean = boolean;
5
+ export type CandidateVersionTuple06 = { readonly "container": "0.6.0"; readonly "payload_profile": "kdna.payload.judgment"; readonly "payload_version": "0.5.1"; readonly "core": "kdna.core/0.8.2"; readonly "ir": "kdna.canonical-ir/0.6.1"; readonly "runtime": "kdna.runtime-capsule/0.3.1"; readonly "plan": "kdna.consumption-plan/0.3.1"; readonly "host": "kdna.agent-host/0.3.1"; readonly "trace": "kdna.judgment-trace/0.3.1"; readonly "read": "kdna.read/0.7.0-candidate"; };
6
+ export type CoreAdmissionRejected = { readonly "status": "rejected"; readonly "reason": ReadDiagnosticCode; readonly "diagnostics": ReadonlyArray<ReadDiagnostic>; readonly "states": CoreStaticStates; readonly "component_failure": (CoreComponentFailure | null); };
7
+ export type CoreComponentFailure = { readonly "judgment_ref": (Identifier | null); readonly "component_ref": (Identifier | null); readonly "status": "invalid"; readonly "body": null; readonly "code": "READ_COMPONENT_DECLARATION_INVALID" | "READ_COMPONENT_CONTENT_INVALID" | "READ_COMPONENT_REFERENCE_INVALID" | "READ_COMPONENT_GRAPH_CYCLE" | "READ_COMPONENT_LIMIT_EXCEEDED" | "READ_COMPONENT_BINDING_INVALID" | "READ_COMPONENT_ADOPTION_INVALID" | "READ_METHOD_PRESENCE_INVALID"; };
8
+ export type CoreStaticStates = { readonly "core": TechnicalState; readonly "interpretation": InterpretationState; };
9
+ export type Digest = string;
10
+ export type EntryName = string;
11
+ export type Identifier = string;
12
+ export type InterpretationState = "not_evaluated" | "complete" | "degraded" | "blocked";
13
+ export type ManifestRuntime = { readonly "mandatory_entries": ReadonlyArray<RuntimeMandatoryEntryName>; };
14
+ declare const NativeSourceMigrationAuthority06Brand: unique symbol;
15
+ export type NativeSourceMigrationAuthority06 = { readonly [NativeSourceMigrationAuthority06Brand]: true };
16
+ export type OriginalProtectionDisclosureFor06 = ({ readonly "kind": "none"; readonly "external_commit": OriginalProtectionExternalCommitNotInvokedFor06; } | { readonly "kind": "trusted_host"; readonly "at_ms": UInt; readonly "external_commit": OriginalProtectionExternalCommitFor06; });
17
+ export type OriginalProtectionExternalCommitConfirmedFor06 = { readonly "state": "confirmed"; readonly "attempt_id": Identifier; readonly "attempted_at_ms": UInt; readonly "confirmed_at_ms": (UInt | null); };
18
+ export type OriginalProtectionExternalCommitFor06 = (OriginalProtectionExternalCommitNotInvokedFor06 | OriginalProtectionExternalCommitUnknownFor06 | OriginalProtectionExternalCommitConfirmedFor06);
19
+ export type OriginalProtectionExternalCommitNotInvokedFor06 = { readonly "state": "not_invoked"; };
20
+ export type OriginalProtectionExternalCommitUnknownFor06 = { readonly "state": "outcome_unknown"; readonly "attempt_id": Identifier; readonly "attempted_at_ms": UInt; };
21
+ export type PayloadDescriptor = { readonly "path": "payload.kdnab"; readonly "encoding": "cbor"; readonly "encrypted": Boolean; };
22
+ export type ReadDiagnostic = { readonly "code": ReadDiagnosticCode; readonly "stage": ReadStage; readonly "severity": "error" | "warning"; readonly "subject": (Identifier | null); readonly "field": (Text | null); };
23
+ export type ReadDiagnosticCode = "READ_INPUT_INVALID" | "READ_SNAPSHOT_UNATTESTED" | "READ_CORE_CAPABILITY_UNAVAILABLE" | "READ_UNSUPPORTED_VERSION" | "READ_MIXED_VERSION_TUPLE" | "READ_CORE_INVALID" | "READ_INTERPRETATION_INCOMPLETE" | "READ_STATIC_POLICY_INVALID" | "READ_ASSET_MISMATCH" | "READ_ASSET_VERSION_MISMATCH" | "READ_SELECTION_NOT_FOUND" | "READ_SELECTION_AMBIGUOUS" | "READ_HANDLE_UNTRUSTED" | "READ_HANDLE_VERSION_MISMATCH" | "READ_HANDLE_STALE" | "READ_HANDLE_ASSET_MISMATCH" | "READ_HANDLE_SCOPE_MISMATCH" | "READ_HOST_CONTEXT_UNTRUSTED" | "READ_HOST_EPOCH_MISMATCH" | "READ_HOST_TIME_INVALID" | "READ_HANDLE_EXPIRED" | "READ_HOST_CONTEXT_EXPIRED" | "READ_HOST_DENIED" | "READ_SCOPE_DENIED" | "READ_PROJECTION_INVALID" | "READ_BUDGET_INSUFFICIENT" | "READ_COMPONENT_DECLARATION_INVALID" | "READ_COMPONENT_CONTENT_INVALID" | "READ_COMPONENT_REFERENCE_INVALID" | "READ_COMPONENT_GRAPH_CYCLE" | "READ_COMPONENT_LIMIT_EXCEEDED" | "READ_COMPONENT_BINDING_INVALID" | "READ_COMPONENT_ADOPTION_INVALID" | "READ_METHOD_PRESENCE_INVALID" | "READ_R2_STRUCTURE_INVALID" | "READ_R2_REFERENCE_INVALID" | "READ_R2_METHOD_INVALID" | "READ_R2_PLAN_INVALID" | "READ_R2_POLICY_INVALID" | "READ_R2_SCOPE_INVALID" | "READ_R2_EXAMPLE_INVALID" | "READ_R2_HISTORY_INVALID" | "READ_UNSUPPORTED_CRITICAL" | "READ_UNRESOLVED_EXTERNAL";
24
+ export type ReadStage = "input" | "version" | "core" | "selection" | "handle" | "host" | "projection" | "budget";
25
+ export type RepresentationOrigin06 = { readonly "source_format_version": "0.5.0"; readonly "source_container_digest": Digest; readonly "source_content_digest": Digest; readonly "payload": PayloadDescriptor; readonly "runtime": ManifestRuntime; readonly "declared_content_digest"?: Digest; readonly "declared_authoring_content_digest"?: Digest; };
26
+ export type RuntimeMandatoryEntryName = (EntryName);
27
+ export type SourceInputProfile06 = "public_sections06" | "protected_logical_payload06";
28
+ export type SourceMigrationAuthorityContext06 = { readonly "contract": SourceMigrationRouteContract06; readonly "request": SourceMigrationRequest06; readonly "request_digest": Digest; readonly "capture": SourceOuterCapture06; readonly "source_inventory": ReadonlyArray<SourceMigrationCaptureRow06>; readonly "output_intent": { readonly "container": "0.6.0"; readonly "read": "kdna.read/0.7.0-candidate"; readonly "adoption": "not_observed"; }; };
29
+ export type SourceMigrationCaptureRow06 = { readonly "name": EntryName; readonly "type": "file"; readonly "mode": UInt; readonly "size": UInt; };
30
+ export type SourceMigrationDiagnostic06 = { readonly "code": "SOURCE_INPUT_INVALID" | "SOURCE_EXPECTED_ASSET_MISMATCH" | "SOURCE_PERMISSION_REJECTED" | "SOURCE_DEADLINE_EXCEEDED" | "SOURCE_CAPABILITY_UNAVAILABLE" | "MIGRATION_SOURCE_UNSUPPORTED_VERSION" | "MIGRATION_SOURCE_PROTECTED_UNSUPPORTED" | "MIGRATION_SOURCE_EXTENSION_UNSUPPORTED" | "MIGRATION_PAYLOAD_MISMATCH" | "MIGRATION_MANIFEST_MISMATCH" | "MIGRATION_ORIGIN_MISSING"; readonly "stage": "input" | "capture" | "admission" | "authorization" | "semantic" | "output" | "return"; };
31
+ export type SourceMigrationFailure06 = { readonly "status": "source_failed"; readonly "diagnostic": SourceMigrationDiagnostic06; readonly "disclosure": OriginalProtectionDisclosureFor06; readonly "body": null; readonly "body_bytes": 0; };
32
+ export type SourceMigrationObservation06 = { readonly "contract": SourceMigrationRouteContract06; readonly "request_digest": Digest; readonly "capture_id": Identifier; readonly "tuple": CandidateVersionTuple06; readonly "source_A": Digest; readonly "source_content_digest": Digest; readonly "source_inventory": ReadonlyArray<SourceRouteMemberInventory06>; readonly "output": { readonly "A": Digest; readonly "C": Digest; readonly "E": Digest; }; readonly "E_profile": "kdna.digest-basis.runtime-entry-set/0.3.0-candidate"; readonly "output_ir_digest": Digest; readonly "member_actions": ReadonlyArray<{ readonly "name": EntryName; readonly "action": "added" | "removed" | "replaced" | "preserved"; }>; readonly "origin": RepresentationOrigin06; readonly "body_bytes": UInt; readonly "proof": "produced_bytes_with_confirmed_source_observation_not_consumer_read_or_adoption"; };
33
+ export type SourceMigrationRequest06 = { readonly "request_id": Identifier; readonly "tuple": CandidateVersionTuple06; readonly "operation": "migrate_public_source"; readonly "source_expected_A": Digest; readonly "timeout_ms": UInt; readonly "signature_policy": { readonly "requireSignature": false; readonly "expectedPublicKeyHex": null; }; };
34
+ export type SourceMigrationRequestAdmission06 = ({ readonly "status": "admitted_request"; readonly "request": AdmittedSourceMigrationRequest06; } | SourceMigrationFailure06 | SourceRouteCoreRejected06);
35
+ export type SourceMigrationRouteContract06 = { readonly "id": "kdna.source-migration/0.1.0-candidate"; readonly "version": "0.1.0-candidate"; readonly "definition_digest": Digest; };
36
+ export type SourceOuterCapture06 = { readonly "capture_id": Identifier; readonly "input_byte_length": UInt; readonly "manifest_bytes_digest": Digest; readonly "zip_directory_bytes_digest": Digest; readonly "input_profile": SourceInputProfile06; readonly "identity_scope": "observed_outer_metadata_before_source_materialization"; };
37
+ export type SourceRouteCoreRejected06 = { readonly "status": "core_rejected"; readonly "stage": "input" | "capture" | "admission" | "output"; readonly "core": CoreAdmissionRejected; readonly "disclosure": OriginalProtectionDisclosureFor06; readonly "body": null; readonly "body_bytes": 0; };
38
+ export type SourceRouteMemberInventory06 = { readonly "name": EntryName; readonly "type": "file"; readonly "mode": UInt; readonly "size": UInt; readonly "sha256": Digest; };
39
+ export type TechnicalState = "not_evaluated" | "valid" | "invalid";
40
+ export type Text = string;
41
+ export type UInt = number;