@cotal-ai/auth 0.90.1 → 0.92.0

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 (120) hide show
  1. package/dist/authority-client.d.ts +70 -3
  2. package/dist/authority-client.d.ts.map +1 -1
  3. package/dist/authority-client.js +113 -9
  4. package/dist/authority-client.js.map +1 -1
  5. package/dist/chat-parent-pin.d.ts +43 -0
  6. package/dist/chat-parent-pin.d.ts.map +1 -0
  7. package/dist/chat-parent-pin.js +115 -0
  8. package/dist/chat-parent-pin.js.map +1 -0
  9. package/dist/chat-session-authority.d.ts +120 -0
  10. package/dist/chat-session-authority.d.ts.map +1 -0
  11. package/dist/chat-session-authority.js +924 -0
  12. package/dist/chat-session-authority.js.map +1 -0
  13. package/dist/chat-session-row.d.ts +117 -0
  14. package/dist/chat-session-row.d.ts.map +1 -0
  15. package/dist/chat-session-row.js +358 -0
  16. package/dist/chat-session-row.js.map +1 -0
  17. package/dist/chat-session-store.d.ts +126 -0
  18. package/dist/chat-session-store.d.ts.map +1 -0
  19. package/dist/chat-session-store.js +392 -0
  20. package/dist/chat-session-store.js.map +1 -0
  21. package/dist/commands.d.ts +3 -1
  22. package/dist/commands.d.ts.map +1 -1
  23. package/dist/commands.js +527 -125
  24. package/dist/commands.js.map +1 -1
  25. package/dist/continuity.js +1 -1
  26. package/dist/continuity.js.map +1 -1
  27. package/dist/daemon-flags.d.ts +42 -0
  28. package/dist/daemon-flags.d.ts.map +1 -0
  29. package/dist/daemon-flags.js +12 -0
  30. package/dist/daemon-flags.js.map +1 -0
  31. package/dist/handle-inspect.d.ts +101 -0
  32. package/dist/handle-inspect.d.ts.map +1 -0
  33. package/dist/handle-inspect.js +50 -0
  34. package/dist/handle-inspect.js.map +1 -0
  35. package/dist/handle-verification.d.ts +75 -0
  36. package/dist/handle-verification.d.ts.map +1 -0
  37. package/dist/handle-verification.js +135 -0
  38. package/dist/handle-verification.js.map +1 -0
  39. package/dist/idp.d.ts +23 -1
  40. package/dist/idp.d.ts.map +1 -1
  41. package/dist/idp.js +54 -8
  42. package/dist/idp.js.map +1 -1
  43. package/dist/index.d.ts +3 -2
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +3 -2
  46. package/dist/index.js.map +1 -1
  47. package/dist/ledger.d.ts +58 -5
  48. package/dist/ledger.d.ts.map +1 -1
  49. package/dist/ledger.js +126 -6
  50. package/dist/ledger.js.map +1 -1
  51. package/dist/lifecycle-registry.d.ts +1 -70
  52. package/dist/lifecycle-registry.d.ts.map +1 -1
  53. package/dist/lifecycle-registry.js +4 -35
  54. package/dist/lifecycle-registry.js.map +1 -1
  55. package/dist/login.d.ts +9 -0
  56. package/dist/login.d.ts.map +1 -1
  57. package/dist/login.js +53 -8
  58. package/dist/login.js.map +1 -1
  59. package/dist/manager-authority.d.ts +59 -3
  60. package/dist/manager-authority.d.ts.map +1 -1
  61. package/dist/manager-authority.js +185 -4
  62. package/dist/manager-authority.js.map +1 -1
  63. package/dist/native-service-gate.d.ts +14 -3
  64. package/dist/native-service-gate.d.ts.map +1 -1
  65. package/dist/native-service-gate.js +34 -20
  66. package/dist/native-service-gate.js.map +1 -1
  67. package/dist/native-service-name.d.ts +7 -0
  68. package/dist/native-service-name.d.ts.map +1 -1
  69. package/dist/native-service-name.js +15 -6
  70. package/dist/native-service-name.js.map +1 -1
  71. package/dist/permissions.js +4 -0
  72. package/dist/permissions.js.map +1 -1
  73. package/dist/platform-control.d.ts.map +1 -1
  74. package/dist/platform-control.js +1 -0
  75. package/dist/platform-control.js.map +1 -1
  76. package/dist/provider.d.ts +23 -0
  77. package/dist/provider.d.ts.map +1 -1
  78. package/dist/provider.js +252 -44
  79. package/dist/provider.js.map +1 -1
  80. package/dist/run-cancel-observation.d.ts +50 -0
  81. package/dist/run-cancel-observation.d.ts.map +1 -0
  82. package/dist/run-cancel-observation.js +146 -0
  83. package/dist/run-cancel-observation.js.map +1 -0
  84. package/dist/service-adapter.d.ts +6 -0
  85. package/dist/service-adapter.d.ts.map +1 -0
  86. package/dist/service-adapter.js +120 -0
  87. package/dist/service-adapter.js.map +1 -0
  88. package/dist/service-custody.d.ts +29 -20
  89. package/dist/service-custody.d.ts.map +1 -1
  90. package/dist/service-custody.js +37 -167
  91. package/dist/service-custody.js.map +1 -1
  92. package/dist/service-endpoint-authority.d.ts +70 -0
  93. package/dist/service-endpoint-authority.d.ts.map +1 -0
  94. package/dist/service-endpoint-authority.js +257 -0
  95. package/dist/service-endpoint-authority.js.map +1 -0
  96. package/dist/service-host-contract.d.ts +158 -16
  97. package/dist/service-host-contract.d.ts.map +1 -1
  98. package/dist/service-host-contract.js +330 -1
  99. package/dist/service-host-contract.js.map +1 -1
  100. package/dist/service-host-ops.d.ts +550 -0
  101. package/dist/service-host-ops.d.ts.map +1 -0
  102. package/dist/service-host-ops.js +2180 -0
  103. package/dist/service-host-ops.js.map +1 -0
  104. package/dist/service-write.d.ts +141 -0
  105. package/dist/service-write.d.ts.map +1 -0
  106. package/dist/service-write.js +179 -0
  107. package/dist/service-write.js.map +1 -0
  108. package/dist/service.d.ts +115 -3
  109. package/dist/service.d.ts.map +1 -1
  110. package/dist/service.js +697 -92
  111. package/dist/service.js.map +1 -1
  112. package/dist/store.d.ts +10 -0
  113. package/dist/store.d.ts.map +1 -1
  114. package/dist/store.js +25 -8
  115. package/dist/store.js.map +1 -1
  116. package/dist/token.d.ts +1 -1
  117. package/dist/token.d.ts.map +1 -1
  118. package/dist/token.js +4 -1
  119. package/dist/token.js.map +1 -1
  120. package/package.json +16 -7
@@ -0,0 +1,550 @@
1
+ import type { NatsConnection } from "@nats-io/transport-node";
2
+ import { type ContractStoreContext, type EpCapability, type EpCommandAuthority, type ServiceAuthorityStatus, type ServiceRegistrationSnapshot, type ServiceRegistrationWitness, type ServiceUidCustodyV1 } from "@cotal-ai/core";
3
+ import { type ServiceHostEffectReads } from "./authority-client.js";
4
+ import { type LifecycleRegistry } from "./lifecycle-registry.js";
5
+ import { type ServiceAssignmentBinding } from "./native-service-gate.js";
6
+ import type { PlaneClaimHold } from "./plane-claim.js";
7
+ import { type ServiceApprovalResult, type ServiceDenyNew, type ServiceHostDebt, type ServiceHostGranter, type ServiceHostOutcome, type ServiceHostReason, type ServiceHostResult, type ServiceOperationKind, type ServiceOperationProjection, type ServiceOperationRefusal, type ServiceProposalCloseReason, type ServiceProposalTombstoneView } from "./service-host-contract.js";
8
+ import { type ServiceWriteScope } from "./service-write.js";
9
+ /** Original authority limit of one approve, refuse or register, from its admission. */
10
+ export declare const S2A_OPERATION_TTL_MS = 600000;
11
+ /** Per-invocation limit for reads, bookkeeping, settlement and native cancellation, and the
12
+ * longest window an invocation's effect credential may cover. */
13
+ export declare const S2A_INVOCATION_MS = 60000;
14
+ /** A proposal's canonical lifetime (canon:203). */
15
+ export declare const S2A_PROPOSAL_LIFETIME_MS = 86400000;
16
+ export declare const S2A_MAX_PENDING = 256;
17
+ export declare const S2A_MAX_PENDING_PER_OWNER = 32;
18
+ export declare const S2A_MAX_PROPOSAL_BYTES: number;
19
+ /** Fresh decisions after a CAS loss before a step holds. */
20
+ export declare const S2A_MAX_REDECIDE = 4;
21
+ /** Serving request intents one instance keeps (SPEC 13.1): never pruned or reused in this cut. */
22
+ export declare const S3_MAX_INTENTS_PER_INSTANCE = 64;
23
+ /** One id namespace for every host request in a space; a valid lifecycle token. */
24
+ export declare const serviceHostOperationId: (space: string, requestId: string) => string;
25
+ interface Account {
26
+ accountPublicKey: string;
27
+ space: string;
28
+ }
29
+ interface Projection extends ServiceOperationProjection {
30
+ }
31
+ type RegisterPlan = {
32
+ kind: "register";
33
+ proposalId: string;
34
+ proposalDigest: string;
35
+ createdAtMs: number;
36
+ expiresAtMs: number;
37
+ };
38
+ type ApprovePlan = {
39
+ kind: "approve";
40
+ proposalId: string;
41
+ proposalDigest: string;
42
+ proposalRevision: number;
43
+ nameRevision: number;
44
+ reservation: ServiceUidCustodyV1;
45
+ callerCeiling: EpCapability[];
46
+ approvalExpiresAt: number | null;
47
+ };
48
+ type RefusePlan = {
49
+ kind: "refuse";
50
+ proposalId: string;
51
+ proposalRevision: number;
52
+ };
53
+ type RevokeCause = "owner-request" | "membership-removal" | "operator-request" | "restore-quarantine" | "approval-expired";
54
+ type RevokePlan = {
55
+ kind: "revoke";
56
+ endpoint: string;
57
+ instanceId: string;
58
+ expectedAssignmentDigest: string;
59
+ cause: RevokeCause;
60
+ };
61
+ type Plan = RegisterPlan | ApprovePlan | RefusePlan | RevokePlan;
62
+ type RegisterResult = {
63
+ proposalId: string;
64
+ revision: number;
65
+ expiresAtMs: number;
66
+ };
67
+ type RefuseResult = {
68
+ proposal: ServiceProposalTombstoneView;
69
+ revision: number;
70
+ };
71
+ type OpResult = RegisterResult | ServiceApprovalResult | RefuseResult;
72
+ type Final = {
73
+ state: "complete";
74
+ result: OpResult;
75
+ } | {
76
+ state: "refused";
77
+ reason: ServiceOperationRefusal;
78
+ } | {
79
+ state: "superseded";
80
+ boundOperationId: string;
81
+ };
82
+ type Progress = {
83
+ state: "admitted";
84
+ } | {
85
+ state: "custody";
86
+ step: string;
87
+ } | {
88
+ state: "held";
89
+ reason: string;
90
+ phase: string;
91
+ } | Final;
92
+ interface OpLive {
93
+ v: 1;
94
+ kind: "service-host-operation";
95
+ operationId: string;
96
+ requestId: string;
97
+ requestDigest: string;
98
+ operation: ServiceOperationKind;
99
+ account: Account;
100
+ granter: ServiceHostGranter;
101
+ admittedAtMs: number;
102
+ notAfterMs: number;
103
+ admissionEpoch: number;
104
+ projection: Projection;
105
+ plan: Plan;
106
+ progress: Progress;
107
+ debt: ServiceHostDebt[];
108
+ }
109
+ interface OpTerminal {
110
+ v: 1;
111
+ kind: "service-host-operation-terminal";
112
+ operationId: string;
113
+ requestId: string;
114
+ requestDigest: string;
115
+ operation: ServiceOperationKind;
116
+ account: Account;
117
+ granter: ServiceHostGranter;
118
+ admittedAtMs: number;
119
+ projection: Projection;
120
+ outcome: Final;
121
+ }
122
+ type Op = OpLive | OpTerminal;
123
+ type Command = EpCommandAuthority & {
124
+ name: string;
125
+ };
126
+ interface ProposalLive {
127
+ v: 1;
128
+ kind: "service-proposal";
129
+ proposalId: string;
130
+ proposalDigest: string;
131
+ account: Account;
132
+ owner: string;
133
+ endpoint: string;
134
+ instanceId: string;
135
+ register: {
136
+ requestId: string;
137
+ requestDigest: string;
138
+ operationId: string;
139
+ };
140
+ createdAtMs: number;
141
+ expiresAtMs: number;
142
+ clusterDigests: string[];
143
+ commands: Command[];
144
+ state: {
145
+ state: "proposed";
146
+ } | {
147
+ state: "approving";
148
+ operationId: string;
149
+ assignmentDigest: string;
150
+ };
151
+ }
152
+ interface ProposalTerminal {
153
+ v: 1;
154
+ kind: "service-proposal-terminal";
155
+ proposalId: string;
156
+ proposalDigest: string;
157
+ owner: string;
158
+ endpoint: string;
159
+ instanceId: string;
160
+ register: {
161
+ requestId: string;
162
+ requestDigest: string;
163
+ operationId: string;
164
+ };
165
+ state: "approved" | "refused" | "expired";
166
+ operationId: string | null;
167
+ approvalDigest: string | null;
168
+ reason: ServiceProposalCloseReason | null;
169
+ atMs: number;
170
+ }
171
+ type Proposal = ProposalLive | ProposalTerminal;
172
+ interface CapEntry {
173
+ proposalId: string;
174
+ owner: string;
175
+ endpoint: string;
176
+ instanceId: string;
177
+ registerRequestId: string;
178
+ expiresAtMs: number;
179
+ }
180
+ interface Capacity {
181
+ v: 1;
182
+ kind: "service-proposal-capacity";
183
+ pending: CapEntry[];
184
+ }
185
+ type Cancel = {
186
+ operationId: string;
187
+ requestDigest: string;
188
+ cause: RevokeCause;
189
+ };
190
+ type Assignment = {
191
+ v: 1;
192
+ kind: "service-assignment";
193
+ state: "bound";
194
+ endpoint: string;
195
+ instanceId: string;
196
+ owner: string;
197
+ proposalId: string;
198
+ assignmentDigest: string;
199
+ reservation: ServiceUidCustodyV1;
200
+ creation: {
201
+ operationId: string;
202
+ };
203
+ cancel: Cancel | null;
204
+ } | {
205
+ v: 1;
206
+ kind: "service-assignment";
207
+ state: "fenced";
208
+ endpoint: string;
209
+ instanceId: string;
210
+ owner: string;
211
+ proposalId: string;
212
+ assignmentDigest: string;
213
+ cancel: Cancel;
214
+ };
215
+ interface Admission {
216
+ v: 1;
217
+ kind: "service-host-admission";
218
+ state: "open" | "quarantined";
219
+ epoch: number;
220
+ restoreId: string | null;
221
+ }
222
+ export declare function parseServiceHostOperationRecord(raw: unknown): Op;
223
+ export declare function parseServiceProposalRecord(raw: unknown): Proposal;
224
+ export declare function parseServiceCapacityRecord(raw: unknown): Capacity;
225
+ export declare function parseServiceAssignmentRecord(raw: unknown): Assignment;
226
+ export type ServiceServeOperation = "register" | "activate" | "renew" | "ready";
227
+ /** One public serving request, bound before its first effect. It holds no proof, token or reply. */
228
+ interface Intent {
229
+ v: 1;
230
+ kind: "service-request-intent";
231
+ operationId: string;
232
+ operation: ServiceServeOperation;
233
+ account: Account;
234
+ owner: string;
235
+ endpoint: string;
236
+ instanceId: string;
237
+ requestId: string;
238
+ requestDigest: string;
239
+ /** The registration the request names: register's expected witness (null for unregistered), or the request witness. */
240
+ registrationRequestId: string | null;
241
+ witnessDigest: string | null;
242
+ admittedAtMs: number;
243
+ }
244
+ interface IntentIndex {
245
+ v: 1;
246
+ kind: "service-request-intent-index";
247
+ owner: string;
248
+ endpoint: string;
249
+ instanceId: string;
250
+ intents: {
251
+ operationId: string;
252
+ operation: ServiceServeOperation;
253
+ }[];
254
+ }
255
+ export declare function parseServiceRequestIntentRecord(raw: unknown): Intent;
256
+ export declare function parseServiceRequestIntentIndexRecord(raw: unknown): IntentIndex;
257
+ export declare function parseServiceAdmissionRecord(raw: unknown): Admission;
258
+ /** What discovery located for one invocation before its effect connection opens. */
259
+ export interface ServiceHostScopeTarget {
260
+ operation: "startup" | "register" | "decide" | "revoke" | "name-bind" | "serve";
261
+ operationId: string | null;
262
+ proposalId: string | null;
263
+ owner: string | null;
264
+ endpoint: string | null;
265
+ instanceId: string | null;
266
+ lifecycleUid: string | null;
267
+ /** A serving invocation's public operation; required exactly when `operation` is `serve`. */
268
+ serve?: ServiceServeOperation;
269
+ /** The contract artifacts (sha256 hex) a serving registration publishes. */
270
+ contract?: readonly string[];
271
+ }
272
+ /** One invocation's scope: its target, the exact keys it may write and its original deadline. The
273
+ * engine guards every write with `keys` and never starts a request at or past `deadlineMs`, so an
274
+ * effect credential granted from the same keys and expiring from the same deadline cannot differ
275
+ * from it. */
276
+ export interface ServiceHostEffectScope extends ServiceHostScopeTarget {
277
+ readonly keys: ServiceWriteScope;
278
+ readonly reads: ServiceHostEffectReads;
279
+ readonly deadlineMs: number;
280
+ }
281
+ /** The one key source for an invocation's writes: its own S2-A records, plus native custody's keys
282
+ * for the located reservation. A decide with a reservation can bootstrap it; a revoke only cancels. */
283
+ export declare function serviceHostScopeKeys(account: {
284
+ accountPublicKey: string;
285
+ space: string;
286
+ }, t: ServiceHostScopeTarget): ServiceWriteScope;
287
+ /** What one invocation's effect credential may read by Direct Get and publish to the contract store. */
288
+ export declare function serviceHostScopeReads(t: ServiceHostScopeTarget): ServiceHostEffectReads;
289
+ /** One per-invocation effect connection's registry. `gone` resolves when the connection is gone for
290
+ * good, which fences the invocation. `close` runs only after every awaited call returned. */
291
+ export interface ServiceHostEffect {
292
+ registry: LifecycleRegistry;
293
+ gone: Promise<void>;
294
+ close(): Promise<void>;
295
+ /** The contract store over the same connection; a serving registration holds without it. */
296
+ contract?: ContractStoreContext;
297
+ }
298
+ /** Open one invocation's effect connection: a fresh identity whose credential publishes exactly
299
+ * `scope.keys`, never reconnects or renews, and expires at `scope.deadlineMs` rounded up to the
300
+ * whole second. The registry over it is the effect registry. */
301
+ export declare function openServiceHostEffect(opts: {
302
+ server: string;
303
+ space: string;
304
+ dataAccount: {
305
+ pub: string;
306
+ signingSeed: string;
307
+ };
308
+ log: (line: string) => void;
309
+ onConnection?: (nc: NatsConnection, label: string) => void;
310
+ }, scope: Pick<ServiceHostEffectScope, "keys" | "deadlineMs"> & {
311
+ reads?: ServiceHostEffectReads;
312
+ }): Promise<ServiceHostEffect>;
313
+ export interface ServiceHostOperationsOptions {
314
+ /** A standing read-only registry used only to locate an invocation's keys. */
315
+ discovery: LifecycleRegistry;
316
+ openEffect(scope: ServiceHostEffectScope): Promise<ServiceHostEffect>;
317
+ /** This process's genuine plane-claim hold; every invocation's custody host checks it. */
318
+ hold: PlaneClaimHold;
319
+ accountPublicKey: string;
320
+ /** The actor ledger directory an owner's current interactive row is read from. */
321
+ ledgerDir: string;
322
+ /** Required. Only normal startup is supported; restore refuses construction. */
323
+ startup?: {
324
+ kind: "normal";
325
+ } | {
326
+ kind: "restore";
327
+ restoreId: string;
328
+ };
329
+ /** Serving reads a registered closure's artifacts from the contract store; without it a
330
+ * serving read that needs them is unavailable. */
331
+ serving?: {
332
+ readContractArtifact(digest: string): Promise<unknown>;
333
+ };
334
+ }
335
+ /** One verified public serving request (SPEC 13.1). The face verified the proof: `owner` is an IdP
336
+ * owner, whose current interactive row the engine still requires, or a service proof's witness
337
+ * owner whose proof binds `witness`. */
338
+ export interface ServiceServeRequest {
339
+ operation: ServiceServeOperation;
340
+ caller: "owner" | "service";
341
+ owner: string;
342
+ endpoint: string;
343
+ instanceId: string;
344
+ /** The public request id and digest, and the engine request id of its full idempotency key. */
345
+ requestId: string;
346
+ requestDigest: string;
347
+ engineRequestId: string;
348
+ /** activate, renew and ready: the request witness. register: the expected witness, or null for unregistered. */
349
+ witness: ServiceRegistrationWitness | null;
350
+ /** register only: the compiled surface and the submitted artifacts. */
351
+ register?: {
352
+ clusterDigests: string[];
353
+ commands: Command[];
354
+ artifacts: unknown[];
355
+ };
356
+ }
357
+ export type ServiceServeResult = {
358
+ state: "registered";
359
+ witness: ServiceRegistrationWitness;
360
+ snapshot: ServiceRegistrationSnapshot;
361
+ }
362
+ /** activate (after its CAS) and renew: the current registration and the fixed bounds material may not outlive. */
363
+ | {
364
+ state: "current";
365
+ witness: ServiceRegistrationWitness;
366
+ snapshot: ServiceRegistrationSnapshot;
367
+ rootExpiresAt: number;
368
+ approvalExpiresAt: number | null;
369
+ } | {
370
+ state: "ready";
371
+ witness: ServiceRegistrationWitness;
372
+ reportedAt: number;
373
+ } | {
374
+ state: "denied";
375
+ reason: string;
376
+ }
377
+ /** Unread, unknown or inconsistent: the request may be bound, and its identity must be kept. */
378
+ | {
379
+ state: "unavailable";
380
+ detail: string;
381
+ };
382
+ /** One status query by a verified reader: an IdP owner, or a service proof's witness. */
383
+ export interface ServiceStatusQuery {
384
+ owner: string;
385
+ endpoint: string;
386
+ instanceId: string;
387
+ reader: {
388
+ kind: "owner";
389
+ } | {
390
+ kind: "service";
391
+ witness: ServiceRegistrationWitness;
392
+ };
393
+ target: {
394
+ kind: "instance";
395
+ } | {
396
+ kind: "operation";
397
+ operation: ServiceServeOperation;
398
+ engineRequestId: string;
399
+ };
400
+ }
401
+ export type ServiceStatusAnswer = {
402
+ kind: "status";
403
+ status: ServiceAuthorityStatus;
404
+ }
405
+ /** A register with no intent: its proposal-phase operation record answers. */
406
+ | {
407
+ kind: "proposal-phase";
408
+ }
409
+ /** An owner reader without an interactive row. */
410
+ | {
411
+ kind: "denied";
412
+ reason: "permission-denied";
413
+ } | {
414
+ kind: "not-found";
415
+ } | {
416
+ kind: "unavailable";
417
+ detail: string;
418
+ };
419
+ export interface ServiceRegisterRequest {
420
+ v: 1;
421
+ kind: "service-endpoint-host";
422
+ requestId: string;
423
+ operation: "register";
424
+ input: {
425
+ owner: string;
426
+ endpoint: string;
427
+ instanceId: string;
428
+ clusterDigests: string[];
429
+ commands: Command[];
430
+ /** The public request this admission serves, so a changed public body under one key is a conflict. */
431
+ publicRequest?: {
432
+ requestId: string;
433
+ requestDigest: string;
434
+ };
435
+ };
436
+ granter: {
437
+ kind: "owner";
438
+ owner: string;
439
+ };
440
+ }
441
+ export type ServiceRegisterResult = {
442
+ v: 1;
443
+ kind: "service-endpoint-host";
444
+ operation: "register";
445
+ requestId: string;
446
+ space: string;
447
+ accountPublicKey: string;
448
+ } & ({
449
+ state: "registered";
450
+ outcome: ServiceHostOutcome;
451
+ operationId: string;
452
+ proposalId: string;
453
+ proposalDigest: string;
454
+ revision: number;
455
+ expiresAtMs: number;
456
+ debt?: ServiceHostDebt[];
457
+ } | Arms);
458
+ type Arms = {
459
+ state: "pending";
460
+ operationId: string;
461
+ phase: string;
462
+ assignmentDigest?: string;
463
+ denyNew?: ServiceDenyNew;
464
+ root?: "none" | "revoked" | "retained-stamped";
465
+ debt?: ServiceHostDebt[];
466
+ } | {
467
+ state: "held";
468
+ operationId: string;
469
+ reason: string;
470
+ phase: string;
471
+ assignmentDigest?: string;
472
+ denyNew?: ServiceDenyNew;
473
+ debt?: ServiceHostDebt[];
474
+ } | {
475
+ state: "refused";
476
+ operationId: string;
477
+ reason: ServiceOperationRefusal;
478
+ boundOperationId?: string;
479
+ debt?: ServiceHostDebt[];
480
+ } | {
481
+ state: "denied";
482
+ reason: ServiceHostReason;
483
+ boundOperationId?: string;
484
+ };
485
+ export interface ServiceHostOperations {
486
+ readonly space: string;
487
+ readonly accountPublicKey: string;
488
+ /** Internal register admission; the public register route that verifies the owner calls it. */
489
+ register(raw: unknown): Promise<ServiceRegisterResult>;
490
+ /** decide, revoke, name-bind, operation-read and proposal-read; every other operation is `unsupported`. */
491
+ handle(raw: unknown): Promise<ServiceHostResult>;
492
+ /** One owner's assignment at a selector, from one discovery read of its record and endpoint gate.
493
+ * Another owner's assignment reads absent. For the authority door, which proved the owner. */
494
+ serviceState(owner: string, endpoint: string, instanceId: string): Promise<ServiceAssignmentState>;
495
+ /** One verified serving request: intent, quota and binding, then its effect (SPEC 13.1). */
496
+ serve(request: ServiceServeRequest): Promise<ServiceServeResult>;
497
+ /** Instance or serving-operation status, by the precedence rules; never a guessed absence. */
498
+ serveStatus(query: ServiceStatusQuery): Promise<ServiceStatusAnswer>;
499
+ /** The current bound assignment a service witness names, for the native service callout; throws otherwise. */
500
+ serviceBinding(witness: ServiceRegistrationWitness): Promise<ServiceAssignmentBinding>;
501
+ /** The engine-level fatal latch: refuses new invocations and trips every live invocation host. */
502
+ trip(reason: string): void;
503
+ /** From the moment it is called, refuses every later call with the latch's answers. */
504
+ refuse(): void;
505
+ /** Refuses every later call with the latch's answers, then resolves once every register or handle
506
+ * call that entered before it has returned, from entry: through discovery, effect open and its
507
+ * writes. It trips nothing; each call already in flight ends under its own discovery and
508
+ * invocation bounds. */
509
+ close(): Promise<void>;
510
+ }
511
+ /** The current state of one assignment. `pending-root` has no approval on its endpoint gate yet;
512
+ * `revoking` has a bound cancel identity. `unavailable` is a failed or inconsistent read, never absence. */
513
+ export type ServiceAssignmentState = {
514
+ state: "absent";
515
+ } | {
516
+ state: "unavailable";
517
+ } | {
518
+ state: "pending-root";
519
+ proposalId: string;
520
+ assignmentDigest: string;
521
+ } | {
522
+ state: "approved";
523
+ proposalId: string;
524
+ assignmentDigest: string;
525
+ approvalDigest: string;
526
+ registrationRequestId: string | null;
527
+ } | {
528
+ state: "revoking";
529
+ proposalId: string;
530
+ assignmentDigest: string;
531
+ operationId: string;
532
+ denyNew: ServiceDenyNew;
533
+ };
534
+ /** The host register request a public register's proposal phase admits. Serving recomputes it, so
535
+ * one public request key binds one body across both phases. */
536
+ export declare function serviceRegisterHostRequest(r: {
537
+ owner: string;
538
+ endpoint: string;
539
+ instanceId: string;
540
+ engineRequestId: string;
541
+ requestId: string;
542
+ requestDigest: string;
543
+ clusterDigests: string[];
544
+ commands: Command[];
545
+ }): ServiceRegisterRequest;
546
+ /** Structural admission of the internal register request. */
547
+ export declare function parseServiceRegisterRequest(raw: unknown): ServiceRegisterRequest;
548
+ export declare function openServiceHostOperations(opts: ServiceHostOperationsOptions): Promise<ServiceHostOperations>;
549
+ export {};
550
+ //# sourceMappingURL=service-host-ops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-host-ops.d.ts","sourceRoot":"","sources":["../src/service-host-ops.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,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