@oatscenter/trellis 0.100.0-rc.6 → 0.100.0-rc.60

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 (188) hide show
  1. package/auth/authority.d.ts +31 -4
  2. package/auth/authority.js +320 -143
  3. package/auth/browser/oauth.d.ts +28 -6
  4. package/auth/browser/oauth.js +119 -29
  5. package/auth/browser/storage.d.ts +9 -1
  6. package/auth/browser/storage.js +17 -2
  7. package/auth/browser.d.ts +1 -0
  8. package/auth/browser.js +1 -0
  9. package/auth/connection.d.ts +6 -2
  10. package/auth/connection.js +166 -61
  11. package/auth/device_activation.d.ts +5 -0
  12. package/auth/device_activation.js +11 -4
  13. package/auth/http_error.d.ts +9 -1
  14. package/auth/http_error.js +17 -3
  15. package/auth/issuer_metadata.js +1 -1
  16. package/auth/issuer_trust.d.ts +2 -1
  17. package/auth/issuer_trust.js +24 -5
  18. package/auth/message_digests.js +6 -2
  19. package/auth/mod.d.ts +1 -1
  20. package/auth/oauth_core.d.ts +17 -2
  21. package/auth/oauth_core.js +9 -4
  22. package/auth/protocol_wasm/client/trellis_protocol_wasm.d.ts +32 -27
  23. package/auth/protocol_wasm/client/trellis_protocol_wasm.js +572 -370
  24. package/auth/protocol_wasm/client/trellis_protocol_wasm_bg.wasm +0 -0
  25. package/auth/protocol_wasm/provider/trellis_protocol_wasm.d.ts +37 -32
  26. package/auth/protocol_wasm/provider/trellis_protocol_wasm.js +643 -418
  27. package/auth/protocol_wasm/provider/trellis_protocol_wasm_bg.wasm +0 -0
  28. package/auth/protocol_wasm.d.ts +71 -24
  29. package/auth/protocol_wasm.js +32 -9
  30. package/auth/session_auth.d.ts +5 -0
  31. package/auth/session_auth.js +38 -2
  32. package/auth/session_proof.d.ts +1 -1
  33. package/backoff.d.ts +39 -0
  34. package/backoff.js +70 -0
  35. package/caller.d.ts +41 -8
  36. package/caller.js +68 -31
  37. package/client_connect.d.ts +63 -4
  38. package/client_connect.js +345 -20
  39. package/connection.d.ts +6 -1
  40. package/connection.js +2 -0
  41. package/data_plane/budget.js +1 -1
  42. package/device/activation.js +5 -1
  43. package/device.d.ts +4 -0
  44. package/device.js +50 -4
  45. package/errors/ResourceExhaustedError.d.ts +61 -0
  46. package/errors/ResourceExhaustedError.js +109 -0
  47. package/errors/index.d.ts +105 -96
  48. package/errors/index.js +10 -1
  49. package/generated.d.ts +1 -1
  50. package/generated_support.d.ts +38 -1
  51. package/generated_support.js +80 -39
  52. package/health_transport.d.ts +1 -1
  53. package/health_transport.js +9 -10
  54. package/index.d.ts +1 -0
  55. package/internal_sdk/generated/_internal/evidence.d.ts +12 -0
  56. package/internal_sdk/generated/_internal/evidence.js +13 -0
  57. package/internal_sdk/generated/apis/auth/mod.d.ts +1775 -115
  58. package/internal_sdk/generated/apis/auth/mod.js +853 -152
  59. package/internal_sdk/generated/apis/core/mod.d.ts +44 -10
  60. package/internal_sdk/generated/apis/core/mod.js +42 -31
  61. package/internal_sdk/generated/apis/events/mod.d.ts +127 -30
  62. package/internal_sdk/generated/apis/events/mod.js +131 -89
  63. package/internal_sdk/generated/apis/health/mod.d.ts +83 -13
  64. package/internal_sdk/generated/apis/health/mod.js +70 -42
  65. package/internal_sdk/generated/apis/index.d.ts +1 -0
  66. package/internal_sdk/generated/apis/index.js +1 -0
  67. package/internal_sdk/generated/apis/jobs/mod.d.ts +121 -21
  68. package/internal_sdk/generated/apis/jobs/mod.js +68 -50
  69. package/internal_sdk/generated/apis/state/mod.d.ts +70 -16
  70. package/internal_sdk/generated/apis/state/mod.js +109 -55
  71. package/internal_sdk/generated/apis/webhooks/mod.d.ts +165 -0
  72. package/internal_sdk/generated/apis/webhooks/mod.js +190 -0
  73. package/internal_sdk/generated/apps/cli/mod.d.ts +1535 -18
  74. package/internal_sdk/generated/apps/cli/mod.js +378 -29
  75. package/internal_sdk/generated/apps/console/mod.d.ts +1702 -16
  76. package/internal_sdk/generated/apps/console/mod.js +338 -19
  77. package/internal_sdk/generated/package.json +67 -11
  78. package/internal_sdk/generated/participants/eventsRuntime/mod.d.ts +180 -10
  79. package/internal_sdk/generated/participants/eventsRuntime/mod.js +65 -23
  80. package/internal_sdk/generated/participants/healthRuntime/mod.d.ts +85 -4
  81. package/internal_sdk/generated/participants/healthRuntime/mod.js +11 -17
  82. package/internal_sdk/generated/participants/jobsRuntime/mod.d.ts +186 -10
  83. package/internal_sdk/generated/participants/jobsRuntime/mod.js +65 -23
  84. package/internal_sdk/generated/participants/platform/mod.d.ts +1434 -13
  85. package/internal_sdk/generated/participants/platform/mod.js +73 -23
  86. package/internal_sdk/generated/types/_internal/p0.d.ts +9974 -243
  87. package/internal_sdk/generated/types/_internal/p0.js +2268 -1091
  88. package/internal_sdk/generated/types/index.d.ts +410 -28
  89. package/internal_sdk/generated/types/index.js +205 -14
  90. package/kv.d.ts +17 -3
  91. package/kv.js +105 -33
  92. package/live/client_open.js +129 -46
  93. package/live/manager.d.ts +6 -1
  94. package/live/manager.js +10 -4
  95. package/live/provider.js +22 -4
  96. package/live/subscription.js +1 -0
  97. package/native/certificate_acceptance.d.ts +73 -0
  98. package/native/certificate_acceptance.js +344 -0
  99. package/native/connection.d.ts +5 -0
  100. package/native/connection.js +27 -5
  101. package/native/custody.d.ts +2 -0
  102. package/native/custody.js +52 -10
  103. package/native/discovery.d.ts +5 -0
  104. package/native/discovery.js +66 -26
  105. package/native/oauth.d.ts +14 -7
  106. package/native/oauth.js +92 -46
  107. package/native.d.ts +1 -0
  108. package/native.js +1 -0
  109. package/operations.d.ts +10 -1
  110. package/operations.js +65 -18
  111. package/own_authority.d.ts +6 -1
  112. package/own_authority.js +28 -8
  113. package/package.json +12 -10
  114. package/pagination.d.ts +1 -1
  115. package/pagination.js +1 -1
  116. package/participant_runtime/participant.d.ts +4 -2
  117. package/participant_runtime/participant.js +16 -0
  118. package/portable.d.ts +5 -4
  119. package/portable.js +1 -1
  120. package/provider.d.ts +35 -3
  121. package/provider.js +22 -0
  122. package/runtime_transport.js +18 -2
  123. package/service/config.d.ts +247 -0
  124. package/service/config.js +751 -0
  125. package/service/mod.d.ts +8 -2
  126. package/service/mod.js +3 -0
  127. package/service/outbox_inbox.d.ts +4 -3
  128. package/service/outbox_inbox.js +2 -2
  129. package/service/runtime/core.js +578 -94
  130. package/service/runtime/enrollment.d.ts +85 -0
  131. package/service/runtime/enrollment.js +259 -0
  132. package/service/runtime/health.d.ts +12 -4
  133. package/service/runtime/health.js +26 -10
  134. package/service/runtime/health_schemas.d.ts +2 -2
  135. package/service/runtime/health_schemas.js +5 -1
  136. package/service/runtime/internal_jobs/active-job.d.ts +5 -0
  137. package/service/runtime/internal_jobs/active-job.js +12 -0
  138. package/service/runtime/internal_jobs/cancellation-registry.d.ts +5 -0
  139. package/service/runtime/internal_jobs/cancellation-registry.js +11 -0
  140. package/service/runtime/internal_jobs/job-manager.d.ts +2 -0
  141. package/service/runtime/internal_jobs/job-manager.js +131 -75
  142. package/service/runtime/internal_jobs/key-coordinator.js +9 -8
  143. package/service/runtime/internal_jobs/managed-worker.d.ts +1 -0
  144. package/service/runtime/internal_jobs/managed-worker.js +5 -0
  145. package/service/runtime/internal_jobs/runtime-worker.d.ts +6 -1
  146. package/service/runtime/internal_jobs/runtime-worker.js +52 -12
  147. package/service/runtime/lifecycle.d.ts +44 -0
  148. package/service/runtime/lifecycle.js +167 -0
  149. package/service/runtime/operation_record.d.ts +6 -1
  150. package/service/runtime/operation_record.js +7 -2
  151. package/service/runtime/service.d.ts +84 -26
  152. package/service/runtime/service.js +591 -71
  153. package/service/runtime/transfer/queue.js +5 -5
  154. package/service/runtime/transfer.js +50 -37
  155. package/session/durable_events.d.ts +19 -0
  156. package/session/durable_events.js +398 -260
  157. package/session/events.d.ts +2 -0
  158. package/session/facades.d.ts +3 -3
  159. package/session/handler_errors.d.ts +41 -1
  160. package/session/handler_errors.js +95 -1
  161. package/session/helpers.d.ts +12 -0
  162. package/session/helpers.js +28 -0
  163. package/session/local_authorization.js +53 -4
  164. package/session/operations.d.ts +5 -0
  165. package/session/state.d.ts +8 -20
  166. package/session/state.js +19 -11
  167. package/session/wire.d.ts +2 -0
  168. package/session/wire.js +2 -0
  169. package/session.d.ts +76 -7
  170. package/session.js +532 -117
  171. package/store.d.ts +11 -2
  172. package/store.js +12 -2
  173. package/tasks.js +15 -3
  174. package/telemetry/metrics.js +1 -1
  175. package/transfer/session.d.ts +4 -4
  176. package/transfer/session.js +12 -9
  177. package/transfer.d.ts +7 -3
  178. package/transfer.js +42 -27
  179. package/transport/generations.d.ts +31 -13
  180. package/transport/generations.js +95 -89
  181. package/values.d.ts +84 -7
  182. package/values.js +103 -8
  183. package/webhooks.d.ts +137 -0
  184. package/webhooks.js +214 -0
  185. package/service/runtime/bootstrap.d.ts +0 -3
  186. package/service/runtime/bootstrap.js +0 -7
  187. package/service/runtime/runtime.d.ts +0 -16
  188. package/service/runtime/runtime.js +0 -1
@@ -29,6 +29,12 @@ export type PendingSessionRequest = {
29
29
  action: CatalogActionIdentity;
30
30
  expectedDeploymentId: string | null;
31
31
  };
32
+ /**
33
+ * Verification evidence that is only briefly unavailable, such as a revocation
34
+ * mirror catching up. A change notification from the owner may make it current.
35
+ */
36
+ export declare class AuthorityUnavailableError extends Error {
37
+ }
32
38
  /** Short-lived typed identity lease; cannot be constructed from unverified JSON. */
33
39
  export declare class VerifiedAuthority {
34
40
  #private;
@@ -82,12 +88,22 @@ export declare class SessionAuthorityOwner {
82
88
  get trustSnapshot(): RuntimeAuthorizationTrust;
83
89
  /** Obtain successor trust only from this owner's verified chain rooted at the exact retained credential pin. */
84
90
  trustForCredential(anchor: RuntimeAuthorizationTrust): RuntimeAuthorizationTrust;
85
- /** Attach read-only public material and one snapshot-and-update mirror for all logical sessions. */
91
+ /**
92
+ * Attach read-only public material and one snapshot-and-update mirror for all logical sessions.
93
+ *
94
+ * Resolves once material reads and issuer metadata use `nats`. The mirror
95
+ * then catches up in the background: `caughtUp` settles when its initial
96
+ * snapshot is applied, or rejects if the mirror fails first. Nothing waits
97
+ * for it: verification of other parties' messages uses the revocations
98
+ * observed so far, and own authority never depends on the mirror.
99
+ */
86
100
  attach(nats: NatsConnection, binding: AuthorityRegistryBinding, options?: {
87
101
  signal?: AbortSignal;
88
102
  timeoutMs?: number;
89
103
  inboxPrefix?: string;
90
- }): Promise<void>;
104
+ }): Promise<{
105
+ readonly caughtUp: Promise<void>;
106
+ }>;
91
107
  /** Verify an issuer-signed lookup reply against the actual pending ephemeral request. */
92
108
  verifyAdmissionContext(bytes: Uint8Array, request: AdmissionGet, subject: string, reply: string): Promise<AdmissionContext>;
93
109
  /** Clock and bounds shared by all request/event/provider verification. */
@@ -96,8 +112,8 @@ export declare class SessionAuthorityOwner {
96
112
  get ownDigest(): string | undefined;
97
113
  /** Whether a verified sticky retirement affects the installed own logical session, even while its live lease is unavailable. */
98
114
  get ownRevoked(): boolean;
99
- /** Loss of current revocation coverage requiring private snapshot recovery. */
100
- get coverageLost(): boolean;
115
+ /** The revocation mirror failed and needs reattaching; verification carries on with the revocations already observed. */
116
+ get mirrorFailed(): boolean;
101
117
  /** Verified retirement observed by the runtime's single mirror. */
102
118
  isRevoked(sessionId: string): boolean;
103
119
  /** Observe promotion and sticky lifecycle changes, without a per-context subscription. */
@@ -160,6 +176,17 @@ export declare class SessionAuthorityOwner {
160
176
  stop(): void;
161
177
  /** Read public verification material using a fresh, pinned-issuer authenticated exchange. */
162
178
  readIssuerMetadata(query: IssuerMetadataQuery): Promise<IssuerMetadataResponse>;
179
+ /**
180
+ * Re-read each rotated-out key still inside its live overlap. Auth sends
181
+ * the issuer notice on revocation too, and a revoked key then stops
182
+ * authorizing live use at once instead of at its signed deadline.
183
+ */
184
+ recheckRetiringIssuers(): Promise<void>;
185
+ /**
186
+ * The issuer key with this id while it authorizes live use: the current key,
187
+ * or a rotated-out key inside its signed overlap that is not revoked.
188
+ */
189
+ liveIssuer(keyId: string): AuthorityIssuerKey | undefined;
163
190
  /** Authenticate one signed successor from this owner's existing durable pin. */
164
191
  acceptIssuerRotation(bytes: Uint8Array): Promise<void>;
165
192
  }