@hasna/infinity 0.1.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.
- package/LICENSE +3 -0
- package/README.md +331 -0
- package/dist/cli.js +2965 -0
- package/dist/http-api.js +6448 -0
- package/dist/index.js +28536 -0
- package/dist/migrate.js +346 -0
- package/dist/self-hosted-migrate.js +2064 -0
- package/dist/self-hosted.js +13180 -0
- package/dist/types/authcapsules/codewith-local.d.ts +109 -0
- package/dist/types/authcapsules/infinity-agent-policy.d.ts +57 -0
- package/dist/types/authcapsules/os-isolated-runner.d.ts +87 -0
- package/dist/types/authority/authority.d.ts +342 -0
- package/dist/types/authority/effect-journal.d.ts +205 -0
- package/dist/types/authority/mutation-journal.d.ts +163 -0
- package/dist/types/authority/mutation-tuple.d.ts +26 -0
- package/dist/types/authority/state.d.ts +75 -0
- package/dist/types/authority/store.d.ts +15 -0
- package/dist/types/brokers/checkpoint/archive.d.ts +21 -0
- package/dist/types/brokers/checkpoint/bundle.d.ts +22 -0
- package/dist/types/brokers/checkpoint/bytes.d.ts +4 -0
- package/dist/types/brokers/checkpoint/clean-verifier-finalization.d.ts +62 -0
- package/dist/types/brokers/checkpoint/clean-verifier.d.ts +145 -0
- package/dist/types/brokers/checkpoint/final-trust-authority.d.ts +55 -0
- package/dist/types/brokers/checkpoint/idempotency.d.ts +25 -0
- package/dist/types/brokers/checkpoint/journaled-store.d.ts +9 -0
- package/dist/types/brokers/checkpoint/manifest-signature.d.ts +135 -0
- package/dist/types/brokers/checkpoint/manifest.d.ts +57 -0
- package/dist/types/brokers/checkpoint/s3-store.d.ts +215 -0
- package/dist/types/brokers/checkpoint/seal-authority.d.ts +86 -0
- package/dist/types/brokers/checkpoint/service.d.ts +198 -0
- package/dist/types/brokers/checkpoint/signing-message.d.ts +22 -0
- package/dist/types/brokers/checkpoint/store.d.ts +76 -0
- package/dist/types/brokers/checkpoint/verifier-cleanup-authority.d.ts +108 -0
- package/dist/types/brokers/checkpoint/verifier-cleanup.d.ts +391 -0
- package/dist/types/brokers/checkpoint/verifier.d.ts +225 -0
- package/dist/types/brokers/composition.d.ts +86 -0
- package/dist/types/brokers/git/github-app.d.ts +216 -0
- package/dist/types/brokers/git/promotion.d.ts +418 -0
- package/dist/types/brokers/persistence/contracts.d.ts +77 -0
- package/dist/types/brokers/persistence/memory.d.ts +5 -0
- package/dist/types/brokers/persistence/migration.d.ts +6 -0
- package/dist/types/brokers/persistence/postgres.d.ts +74 -0
- package/dist/types/cli/main.d.ts +2 -0
- package/dist/types/cli/operation-journal.d.ts +47 -0
- package/dist/types/cli/run.d.ts +15 -0
- package/dist/types/client/operator-client.d.ts +100 -0
- package/dist/types/contracts/dtos.d.ts +198 -0
- package/dist/types/contracts/events.d.ts +45 -0
- package/dist/types/contracts/fence.d.ts +39 -0
- package/dist/types/contracts/operations.d.ts +91 -0
- package/dist/types/contracts/runspec.d.ts +75 -0
- package/dist/types/contracts/validators.d.ts +8 -0
- package/dist/types/core/clock.d.ts +12 -0
- package/dist/types/core/errors.d.ts +18 -0
- package/dist/types/core/ids.d.ts +10 -0
- package/dist/types/core/int64.d.ts +7 -0
- package/dist/types/core/strict-json.d.ts +8 -0
- package/dist/types/core/validation.d.ts +25 -0
- package/dist/types/golden/disposable-task.d.ts +108 -0
- package/dist/types/golden/source-pins.d.ts +77 -0
- package/dist/types/http/api.d.ts +52 -0
- package/dist/types/http/bearer-auth.d.ts +8 -0
- package/dist/types/http/main.d.ts +3 -0
- package/dist/types/http/self-hosted-main.d.ts +17 -0
- package/dist/types/index.d.ts +65 -0
- package/dist/types/mcp/schema.d.ts +7 -0
- package/dist/types/node-agent/agent.d.ts +174 -0
- package/dist/types/node-agent/contracts.d.ts +119 -0
- package/dist/types/node-agent/macos-service.d.ts +33 -0
- package/dist/types/node-agent/service-cli.d.ts +26 -0
- package/dist/types/persistence/composition.d.ts +49 -0
- package/dist/types/persistence/migrate-main.d.ts +2 -0
- package/dist/types/persistence/migrations.d.ts +30 -0
- package/dist/types/persistence/postgres-accounts-operation.d.ts +26 -0
- package/dist/types/persistence/postgres-authority.d.ts +69 -0
- package/dist/types/persistence/postgres-external-mutation-journal.d.ts +22 -0
- package/dist/types/persistence/postgres-json.d.ts +1 -0
- package/dist/types/persistence/postgres-mutation-journal.d.ts +31 -0
- package/dist/types/persistence/postgres-reconciler.d.ts +34 -0
- package/dist/types/persistence/postgres-sandbox-dispatch-authority.d.ts +9 -0
- package/dist/types/persistence/self-hosted-migrate-main.d.ts +2 -0
- package/dist/types/ports/accounts-operation.d.ts +336 -0
- package/dist/types/ports/accounts.d.ts +293 -0
- package/dist/types/ports/sandbox-dispatch-authority.d.ts +154 -0
- package/dist/types/ports/sandboxes.d.ts +40 -0
- package/dist/types/providers/sandbox-dispatch.d.ts +143 -0
- package/dist/types/runtime/config.d.ts +61 -0
- package/dist/types/runtime/postgres.d.ts +18 -0
- package/dist/types/runtime/provider-activation.d.ts +45 -0
- package/dist/types/runtime/server.d.ts +68 -0
- package/dist/types/testing/accounts-fake.d.ts +31 -0
- package/dist/types/testing/fakes.d.ts +2 -0
- package/dist/types/testing/node-control-plane-fake.d.ts +20 -0
- package/dist/types/testing/reference.d.ts +27 -0
- package/dist/types/testing/sandboxes-fake.d.ts +22 -0
- package/evidence/provider-live-daytona-v3.json +1 -0
- package/evidence/provider-live-e2b-v3.json +1 -0
- package/evidence/provider-production-route-daytona-v1.json +1 -0
- package/evidence/provider-production-route-e2b-v1.json +1 -0
- package/migrations/0001_authority.sql +689 -0
- package/migrations/0002_effect_step_global_owner.sql +2 -0
- package/migrations/0003_effect_journal_observed_head.sql +34 -0
- package/migrations/0004_authority_mutation_journal_binding.sql +15 -0
- package/migrations/20260710_checkpoint_broker_v1.sql +163 -0
- package/migrations/20260711_accounts_operation_v1.sql +137 -0
- package/migrations/20260711_checkpoint_trust_v2.sql +17 -0
- package/migrations/20260711_verifier_cleanup_v2.sql +169 -0
- package/migrations/20260711_z_accounts_claim_authority_v2.sql +172 -0
- package/migrations/20260711_zz_sandbox_dispatch_authority_v1.sql +143 -0
- package/migrations/20260712_sandbox_dispatch_authority_v2.sql +58 -0
- package/migrations/external-journal/0001_external_authority_mutation_journal.sql +175 -0
- package/package.json +47 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import type { Clock } from "../core/clock";
|
|
2
|
+
import { type Int64 } from "../core/int64";
|
|
3
|
+
import type { AuthorityState } from "../authority/state";
|
|
4
|
+
import { InMemoryAuthorityStore } from "../authority/store";
|
|
5
|
+
import type { LaneReservation } from "../contracts/dtos";
|
|
6
|
+
import { type AccountsOnlineGenerationContext, type AccountsSlotEligibilityPort, type AccountsSerializationDomainPreimage } from "./accounts";
|
|
7
|
+
export type InfinitySha256Digest = `sha256:${string}`;
|
|
8
|
+
export type InfinityCounter = string;
|
|
9
|
+
/** Exact Accounts workspace integration pin used by the local compatibility fixture. */
|
|
10
|
+
export declare const INFINITY_ACCOUNTS_INTEGRATION_COMMIT: "6c2ba3d490cd58c7192d6e274514a9d849575ab8";
|
|
11
|
+
export declare const INFINITY_MODEL_CALL_PREPARED_ANCHOR_SCHEMA_DIGEST: "sha256:39f247a54d025353bdb2cf98907ccfe9ad49d8c03ba4244bf66c72da667e924e";
|
|
12
|
+
export declare const INFINITY_MODEL_CALL_CONSUME_BINDING_SCHEMA_DIGEST: "sha256:5ed69a61c6162ac1aa42e50e8d718b92fc8bbfab9b1da0d78ecbe91c24f621d2";
|
|
13
|
+
declare const PREPARED_SCHEMA_VERSION: "infinity.model-call-prepared-anchor/v1";
|
|
14
|
+
declare const CONSUME_BINDING_SCHEMA_VERSION: "infinity.model-call-consume-binding/v1";
|
|
15
|
+
declare const EFFECT_RECORD_SCHEMA_VERSION: "infinity.accounts-model-call-effect/v1";
|
|
16
|
+
declare const FRONTIER_HEAD_SCHEMA_VERSION: "infinity.account-serialization-frontier-head/v1";
|
|
17
|
+
declare const SIGNER_HISTORY_SCHEMA_VERSION: "infinity.accounts-operation-signer-history/v1";
|
|
18
|
+
export declare const INFINITY_MODEL_CALL_PREPARED_ANCHOR_DESCRIPTOR: {
|
|
19
|
+
schema_version: "infinity.model-call-prepared-anchor/v1";
|
|
20
|
+
fields: readonly ["schema_version", "schema_digest", "record_kind", "effect_namespace_id", "model_call_anchor_id", "capability_id", "capability_digest", "nonce", "subject", "actor_principal", "account_lane_id", "capacity_pool_id", "capacity_domain_ref", "credential_family_id", "serialization_key_digest", "resource_lease_id", "resource_id", "resource_lifecycle_generation", "operation_id", "operation_digest", "operation_execution_epoch", "sender_key_thumbprint", "channel_binding_digest", "canonical_request_digest", "provider_destination_policy_digest", "online_receipt_id", "online_receipt_digest", "hold_authority_epoch", "hold_id", "hold_generation", "hold_state", "predecessor_resource_lease_frontier_sequence", "predecessor_resource_lease_frontier_hash", "predecessor_model_effect_frontier_sequence", "predecessor_model_effect_frontier_hash", "predecessor_delivery_frontier_sequence", "predecessor_delivery_frontier_hash", "predecessor_hold_model_frontier_digest", "audience", "prepared_at", "expires_at", "signer_ref", "signer_incarnation", "key_id", "signature"];
|
|
21
|
+
literals: {
|
|
22
|
+
readonly record_kind: "PREPARED";
|
|
23
|
+
readonly hold_state: "OPEN";
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export declare const INFINITY_MODEL_CALL_CONSUME_BINDING_DESCRIPTOR: {
|
|
27
|
+
schema_version: "infinity.model-call-consume-binding/v1";
|
|
28
|
+
fields: readonly ["schema_version", "schema_digest", "record_kind", "effect_namespace_id", "model_call_anchor_id", "model_call_anchor_digest", "consume_receipt_digest", "use_id", "operation_id", "operation_execution_epoch", "canonical_request_digest", "hold_authority_epoch", "hold_id", "hold_generation", "hold_state", "resource_lease_frontier_sequence", "resource_lease_frontier_hash", "prepared_model_effect_frontier_sequence", "prepared_model_effect_frontier_hash", "delivery_frontier_sequence", "delivery_frontier_hash", "hold_model_frontier_digest", "audience", "bound_at", "signer_ref", "signer_incarnation", "key_id", "signature"];
|
|
29
|
+
literals: {
|
|
30
|
+
readonly record_kind: "CONSUME_BOUND";
|
|
31
|
+
readonly hold_state: "OPEN";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export declare const INFINITY_ACCOUNT_SERIALIZATION_FRONTIER_HEAD_SCHEMA_DIGEST: "sha256:924a0c36b038769cd96bdceb4457c732cf88663f26986ded66324a5c480527df";
|
|
35
|
+
export declare const INFINITY_ACCOUNT_SERIALIZATION_FRONTIER_HEAD_DESCRIPTOR: {
|
|
36
|
+
schema_version: "infinity.account-serialization-frontier-head/v1";
|
|
37
|
+
fields: readonly ["schema_version", "schema_digest", "frontier_kind", "effect_namespace_id", "serialization_key_digest", "frontier_sequence", "predecessor_frontier_hash", "last_record_digest", "recorded_at", "signer_ref", "signer_incarnation", "key_id", "audience", "signature"];
|
|
38
|
+
frontier_kinds: readonly ["DELIVERY", "MODEL_EFFECT", "RESOURCE_LEASE"];
|
|
39
|
+
};
|
|
40
|
+
export declare const INFINITY_ACCOUNT_MAINTENANCE_HOLD_OPEN_SCHEMA_DIGEST: "sha256:e985c04e6dc40d33e2c53e90ecbf30b64c7f3b303da558ee07e5d8a817214455";
|
|
41
|
+
export declare const INFINITY_ACCOUNT_MAINTENANCE_HOLD_OPEN_DESCRIPTOR: {
|
|
42
|
+
schema_version: "infinity.account-maintenance-hold-open-receipt/v1";
|
|
43
|
+
fields: readonly ["schema_version", "schema_digest", "receipt_id", "issuer", "issuer_incarnation", "key_id", "audience", "effect_namespace_id", "authority_epoch", "hold_id", "hold_generation", "event_kind", "hold_state", "account_resource_id", "resource_lifecycle_generation", "owner_ref", "provider_account_id", "capacity_pool_id", "capacity_domain_ref", "serialization_key_digest", "capacity_generation", "deny_generation", "resource_lease_frontier_sequence", "resource_lease_frontier_hash", "model_effect_frontier_sequence", "model_effect_frontier_hash", "delivery_frontier_sequence", "delivery_frontier_hash", "ambiguity_obligation_count", "obligation_set_digest", "opened_at", "signature"];
|
|
44
|
+
literals: {
|
|
45
|
+
readonly ambiguity_obligation_count: "0";
|
|
46
|
+
readonly event_kind: "INITIALIZED";
|
|
47
|
+
readonly hold_generation: "0";
|
|
48
|
+
readonly hold_state: "OPEN";
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export type AccountsSerializationFrontierKind = typeof INFINITY_ACCOUNT_SERIALIZATION_FRONTIER_HEAD_DESCRIPTOR.frontier_kinds[number];
|
|
52
|
+
export interface SignedAccountsSerializationFrontierHead {
|
|
53
|
+
readonly schemaVersion: typeof FRONTIER_HEAD_SCHEMA_VERSION;
|
|
54
|
+
readonly schemaDigest: typeof INFINITY_ACCOUNT_SERIALIZATION_FRONTIER_HEAD_SCHEMA_DIGEST;
|
|
55
|
+
readonly frontierKind: AccountsSerializationFrontierKind;
|
|
56
|
+
readonly effectNamespaceId: string;
|
|
57
|
+
readonly serializationKeyDigest: InfinitySha256Digest;
|
|
58
|
+
readonly frontierSequence: InfinityCounter;
|
|
59
|
+
readonly predecessorFrontierHash: InfinitySha256Digest;
|
|
60
|
+
readonly lastRecordDigest: InfinitySha256Digest;
|
|
61
|
+
readonly recordedAt: string;
|
|
62
|
+
readonly jcsBase64url: string;
|
|
63
|
+
readonly digest: InfinitySha256Digest;
|
|
64
|
+
}
|
|
65
|
+
export interface AccountsSerializationDomainState {
|
|
66
|
+
readonly domainKey: string;
|
|
67
|
+
readonly effectNamespaceId: string;
|
|
68
|
+
readonly serializationKeyDigest: InfinitySha256Digest;
|
|
69
|
+
holdAuthorityEpoch: InfinityCounter;
|
|
70
|
+
readonly holdId: string;
|
|
71
|
+
holdGeneration: InfinityCounter;
|
|
72
|
+
holdState: "OPEN" | "DRAINING" | "HELD";
|
|
73
|
+
readonly initializedOpenReceiptJcsBase64url: string;
|
|
74
|
+
readonly initializedOpenReceiptDigest: InfinitySha256Digest;
|
|
75
|
+
readonly resourceId: string;
|
|
76
|
+
readonly resourceLifecycleGeneration: InfinityCounter;
|
|
77
|
+
readonly resourceLeases: Record<string, AccountsResourceLeaseState>;
|
|
78
|
+
readonly frontierHeads: Record<AccountsSerializationFrontierKind, SignedAccountsSerializationFrontierHead[]>;
|
|
79
|
+
}
|
|
80
|
+
export interface AccountsResourceLeaseState {
|
|
81
|
+
readonly resourceLeaseId: string;
|
|
82
|
+
readonly resourceLeaseProjectionJcs: string;
|
|
83
|
+
readonly resourceLeaseProjectionDigest: InfinitySha256Digest;
|
|
84
|
+
activeModelOperationId: string | null;
|
|
85
|
+
}
|
|
86
|
+
export type AccountsOperationSigningKeyStatus = "ACTIVE" | "RETIRED" | "REVOKED";
|
|
87
|
+
export interface AccountsOperationSignerHistoryRecord {
|
|
88
|
+
readonly schemaVersion: typeof SIGNER_HISTORY_SCHEMA_VERSION;
|
|
89
|
+
readonly historySequence: InfinityCounter;
|
|
90
|
+
readonly priorHistoryDigest: InfinitySha256Digest;
|
|
91
|
+
readonly signerPrincipal: string;
|
|
92
|
+
readonly signerIncarnation: string;
|
|
93
|
+
readonly keyId: string;
|
|
94
|
+
readonly publicKeySpkiBase64url: string;
|
|
95
|
+
readonly status: AccountsOperationSigningKeyStatus;
|
|
96
|
+
readonly recordDigest: InfinitySha256Digest;
|
|
97
|
+
}
|
|
98
|
+
export interface AccountsOperationSignerHistoryPin {
|
|
99
|
+
readonly trustAnchorDigest: InfinitySha256Digest;
|
|
100
|
+
readonly headSequence: InfinityCounter;
|
|
101
|
+
readonly headDigest: InfinitySha256Digest;
|
|
102
|
+
}
|
|
103
|
+
export interface CapabilityUseOperationBinding {
|
|
104
|
+
readonly effectNamespaceId: string;
|
|
105
|
+
readonly capabilityId: string;
|
|
106
|
+
readonly capabilityDigest: InfinitySha256Digest;
|
|
107
|
+
readonly nonce: string;
|
|
108
|
+
readonly subject: string;
|
|
109
|
+
readonly actorPrincipal: string;
|
|
110
|
+
readonly accountLaneId: string;
|
|
111
|
+
readonly capacityPoolId: string;
|
|
112
|
+
readonly capacityDomainRef: string;
|
|
113
|
+
readonly serializationKeyDigest: InfinitySha256Digest;
|
|
114
|
+
readonly credentialFamilyId: string;
|
|
115
|
+
readonly resourceLeaseId: string;
|
|
116
|
+
readonly resourceId: string;
|
|
117
|
+
readonly resourceLifecycleGeneration: InfinityCounter;
|
|
118
|
+
readonly operationId: string;
|
|
119
|
+
readonly operationDigest: InfinitySha256Digest;
|
|
120
|
+
readonly operationExecutionEpoch: InfinityCounter;
|
|
121
|
+
readonly senderKeyThumbprint: InfinitySha256Digest;
|
|
122
|
+
readonly channelBindingDigest: InfinitySha256Digest;
|
|
123
|
+
readonly canonicalRequestDigest: InfinitySha256Digest;
|
|
124
|
+
readonly providerDestinationPolicyDigest: InfinitySha256Digest;
|
|
125
|
+
readonly onlineReceiptId: string;
|
|
126
|
+
readonly onlineReceiptDigest: InfinitySha256Digest;
|
|
127
|
+
readonly modelCallAnchorDigest: InfinitySha256Digest;
|
|
128
|
+
}
|
|
129
|
+
export interface VerifiedPreparedOpenOperation {
|
|
130
|
+
readonly schemaVersion: typeof PREPARED_SCHEMA_VERSION;
|
|
131
|
+
readonly schemaDigest: typeof INFINITY_MODEL_CALL_PREPARED_ANCHOR_SCHEMA_DIGEST;
|
|
132
|
+
readonly recordKind: "PREPARED";
|
|
133
|
+
readonly holdState: "OPEN";
|
|
134
|
+
readonly binding: CapabilityUseOperationBinding;
|
|
135
|
+
readonly preparedAnchorJcsBase64url: string;
|
|
136
|
+
readonly preparedAnchorDigest: InfinitySha256Digest;
|
|
137
|
+
readonly openHoldReceiptJcsBase64url: string;
|
|
138
|
+
readonly openHoldReceiptDigest: InfinitySha256Digest;
|
|
139
|
+
readonly holdAuthorityEpoch: InfinityCounter;
|
|
140
|
+
readonly holdId: string;
|
|
141
|
+
readonly holdGeneration: InfinityCounter;
|
|
142
|
+
readonly resourceLeaseFrontierSequence: InfinityCounter;
|
|
143
|
+
readonly resourceLeaseFrontierHash: InfinitySha256Digest;
|
|
144
|
+
readonly preparedModelEffectFrontierSequence: InfinityCounter;
|
|
145
|
+
readonly preparedModelEffectFrontierHash: InfinitySha256Digest;
|
|
146
|
+
readonly deliveryFrontierSequence: InfinityCounter;
|
|
147
|
+
readonly deliveryFrontierHash: InfinitySha256Digest;
|
|
148
|
+
readonly holdModelFrontierDigest: InfinitySha256Digest;
|
|
149
|
+
}
|
|
150
|
+
export interface BindCapabilityUseRequest {
|
|
151
|
+
readonly prepared: VerifiedPreparedOpenOperation;
|
|
152
|
+
readonly consumeReceiptDigest: InfinitySha256Digest;
|
|
153
|
+
readonly useId: InfinitySha256Digest;
|
|
154
|
+
}
|
|
155
|
+
export interface AssertPreparedOpenCurrentRequest {
|
|
156
|
+
readonly prepared: VerifiedPreparedOpenOperation;
|
|
157
|
+
}
|
|
158
|
+
export interface VerifiedConsumeBoundOperation {
|
|
159
|
+
readonly schemaVersion: typeof CONSUME_BINDING_SCHEMA_VERSION;
|
|
160
|
+
readonly schemaDigest: typeof INFINITY_MODEL_CALL_CONSUME_BINDING_SCHEMA_DIGEST;
|
|
161
|
+
readonly recordKind: "CONSUME_BOUND";
|
|
162
|
+
readonly holdState: "OPEN";
|
|
163
|
+
readonly prepared: VerifiedPreparedOpenOperation;
|
|
164
|
+
readonly consumeReceiptDigest: InfinitySha256Digest;
|
|
165
|
+
readonly useId: InfinitySha256Digest;
|
|
166
|
+
readonly consumeBindingJcsBase64url: string;
|
|
167
|
+
readonly consumeBindingDigest: InfinitySha256Digest;
|
|
168
|
+
readonly boundModelEffectFrontierSequence: InfinityCounter;
|
|
169
|
+
readonly boundModelEffectFrontierHash: InfinitySha256Digest;
|
|
170
|
+
}
|
|
171
|
+
export interface AssertConsumeBoundCurrentRequest {
|
|
172
|
+
readonly consumeBound: VerifiedConsumeBoundOperation;
|
|
173
|
+
}
|
|
174
|
+
export interface InfinityAccountsOperationPort {
|
|
175
|
+
readPreparedOpenOperation(binding: CapabilityUseOperationBinding): Promise<VerifiedPreparedOpenOperation>;
|
|
176
|
+
assertPreparedOpenCurrent(request: AssertPreparedOpenCurrentRequest): Promise<VerifiedPreparedOpenOperation>;
|
|
177
|
+
bindCapabilityUse(request: BindCapabilityUseRequest): Promise<VerifiedConsumeBoundOperation>;
|
|
178
|
+
assertConsumeBoundCurrent(request: AssertConsumeBoundCurrentRequest): Promise<VerifiedConsumeBoundOperation>;
|
|
179
|
+
}
|
|
180
|
+
export interface InfinityAccountsOperationRecoveryPort extends InfinityAccountsOperationPort {
|
|
181
|
+
/** Reads the current exact bound evidence, or null while the exact operation remains PREPARED. */
|
|
182
|
+
readConsumeBoundOperation(binding: CapabilityUseOperationBinding): Promise<VerifiedConsumeBoundOperation | null>;
|
|
183
|
+
}
|
|
184
|
+
export interface PrepareAccountsModelCallInput {
|
|
185
|
+
readonly binding: Omit<CapabilityUseOperationBinding, "modelCallAnchorDigest" | "onlineReceiptId" | "onlineReceiptDigest">;
|
|
186
|
+
readonly runId: string;
|
|
187
|
+
readonly attemptId: string;
|
|
188
|
+
readonly attemptLeaseId: string;
|
|
189
|
+
readonly leaseEpoch: InfinityCounter;
|
|
190
|
+
readonly expiresAt: string;
|
|
191
|
+
readonly onlineGenerationContext: AccountsOnlineGenerationContext;
|
|
192
|
+
}
|
|
193
|
+
export interface AccountsModelCallEffectJournalRecord {
|
|
194
|
+
readonly schemaVersion: typeof EFFECT_RECORD_SCHEMA_VERSION;
|
|
195
|
+
readonly journalSequence: Int64;
|
|
196
|
+
readonly domainKey: string;
|
|
197
|
+
readonly effectNamespaceId: string;
|
|
198
|
+
readonly serializationKeyDigest: InfinitySha256Digest;
|
|
199
|
+
readonly priorFrontierHash: InfinitySha256Digest;
|
|
200
|
+
readonly recordKind: "PREPARED" | "CONSUME_BOUND";
|
|
201
|
+
readonly operationId: string;
|
|
202
|
+
readonly operationDigest: string;
|
|
203
|
+
readonly modelCallAnchorDigest: string;
|
|
204
|
+
readonly recordCanonicalJson: string;
|
|
205
|
+
readonly recordDigest: string;
|
|
206
|
+
readonly frontierHash: string;
|
|
207
|
+
readonly frontierHeadJcsBase64url: string;
|
|
208
|
+
readonly recordedAt: string;
|
|
209
|
+
}
|
|
210
|
+
export interface AccountsModelCallOperationRecord {
|
|
211
|
+
operationId: string;
|
|
212
|
+
prepareInputDigest: string;
|
|
213
|
+
runId: string;
|
|
214
|
+
attemptId: string;
|
|
215
|
+
attemptLeaseId: string;
|
|
216
|
+
leaseEpoch: Int64;
|
|
217
|
+
expiresAt: string;
|
|
218
|
+
state: "PREPARED" | "CONSUME_BOUND" | "INVALIDATED";
|
|
219
|
+
prepared: VerifiedPreparedOpenOperation;
|
|
220
|
+
consumeBound: VerifiedConsumeBoundOperation | null;
|
|
221
|
+
consumeTombstoneDigest: string | null;
|
|
222
|
+
createdAt: string;
|
|
223
|
+
updatedAt: string;
|
|
224
|
+
}
|
|
225
|
+
export interface AccountsOperationEvidenceSigner {
|
|
226
|
+
readonly signerPrincipal: string;
|
|
227
|
+
readonly signerIncarnation: string;
|
|
228
|
+
readonly signingKeyId: string;
|
|
229
|
+
publicKeySpkiBase64url(): string;
|
|
230
|
+
sign(canonicalPayload: string): string;
|
|
231
|
+
verify(canonicalPayload: string, signature: string): boolean;
|
|
232
|
+
}
|
|
233
|
+
export declare class Ed25519AccountsOperationEvidenceSigner implements AccountsOperationEvidenceSigner {
|
|
234
|
+
readonly signerPrincipal: string;
|
|
235
|
+
readonly signerIncarnation: string;
|
|
236
|
+
readonly signingKeyId: string;
|
|
237
|
+
private readonly privateKey;
|
|
238
|
+
private readonly publicKey;
|
|
239
|
+
private constructor();
|
|
240
|
+
static generate(signerPrincipal: string, signingKeyId: string, signerIncarnation?: string): Ed25519AccountsOperationEvidenceSigner;
|
|
241
|
+
static fromPublicKey(signerPrincipal: string, signingKeyId: string, publicKeySpkiBase64url: string, signerIncarnation?: string): Ed25519AccountsOperationEvidenceSigner;
|
|
242
|
+
publicKeySpkiBase64url(): string;
|
|
243
|
+
sign(canonicalPayload: string): string;
|
|
244
|
+
verify(canonicalPayload: string, signature: string): boolean;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Process-external trust input for the local adapter. The history is append-only,
|
|
248
|
+
* hash-linked, and pinned by the authority state on every transaction. Retired
|
|
249
|
+
* keys remain historical verifiers; revoked keys invalidate their evidence.
|
|
250
|
+
*/
|
|
251
|
+
export declare class InMemoryAccountsOperationSignerHistory {
|
|
252
|
+
private readonly records;
|
|
253
|
+
private readonly signers;
|
|
254
|
+
private readonly trustAnchorDigestValue;
|
|
255
|
+
constructor(initialSigner: AccountsOperationEvidenceSigner);
|
|
256
|
+
get trustAnchorDigest(): InfinitySha256Digest;
|
|
257
|
+
snapshot(): readonly AccountsOperationSignerHistoryRecord[];
|
|
258
|
+
pin(): AccountsOperationSignerHistoryPin;
|
|
259
|
+
assertExtends(pin: AccountsOperationSignerHistoryPin | null): AccountsOperationSignerHistoryPin;
|
|
260
|
+
rotate(nextSigner: AccountsOperationEvidenceSigner): void;
|
|
261
|
+
retireCurrent(): void;
|
|
262
|
+
revoke(keyId: string): void;
|
|
263
|
+
currentActiveSigner(): AccountsOperationEvidenceSigner;
|
|
264
|
+
verify(canonicalPayload: string, identity: {
|
|
265
|
+
signerRef: unknown;
|
|
266
|
+
signerIncarnation: unknown;
|
|
267
|
+
keyId: unknown;
|
|
268
|
+
signature: unknown;
|
|
269
|
+
}): boolean;
|
|
270
|
+
private append;
|
|
271
|
+
private latestStatus;
|
|
272
|
+
private assertSignerIdentity;
|
|
273
|
+
private assertIntegrity;
|
|
274
|
+
}
|
|
275
|
+
export type TrustedAccountsReservationProjection = Readonly<Pick<LaneReservation, "id" | "resource_id" | "resource_lifecycle_generation" | "effect_namespace_id" | "provider_account_id" | "owner_ref" | "capacity_pool_id" | "capacity_domain_ref" | "serialization_key" | "serialization_key_digest" | "capacity_generation" | "deny_generation">>;
|
|
276
|
+
export interface AccountsSerializationDomainInitialization {
|
|
277
|
+
readonly domainKey: string;
|
|
278
|
+
readonly effectNamespaceId: string;
|
|
279
|
+
readonly serializationKeyDigest: InfinitySha256Digest;
|
|
280
|
+
readonly holdAuthorityEpoch: InfinityCounter;
|
|
281
|
+
readonly holdId: string;
|
|
282
|
+
readonly holdGeneration: "0";
|
|
283
|
+
readonly holdState: "OPEN";
|
|
284
|
+
readonly initializedOpenReceiptJcsBase64url: string;
|
|
285
|
+
readonly initializedOpenReceiptDigest: InfinitySha256Digest;
|
|
286
|
+
readonly frontierHeads: Record<AccountsSerializationFrontierKind, SignedAccountsSerializationFrontierHead[]>;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Package-internal construction seam shared by the local adapter and durable
|
|
290
|
+
* installers. The caller must supply a reservation read from trusted authority
|
|
291
|
+
* state; this function independently re-derives its Accounts domain digest.
|
|
292
|
+
*/
|
|
293
|
+
export declare function createAccountsSerializationDomainInitialization(authorityEpochInput: InfinityCounter, reservation: TrustedAccountsReservationProjection, databaseTimeInput: string, signerHistory: InMemoryAccountsOperationSignerHistory): AccountsSerializationDomainInitialization;
|
|
294
|
+
export declare function verifyAccountsSerializationDomainInitialization(initialization: AccountsSerializationDomainInitialization, authorityEpochInput: InfinityCounter, reservation: TrustedAccountsReservationProjection, signerHistory: InMemoryAccountsOperationSignerHistory): void;
|
|
295
|
+
/** Builds trusted initialization and its first RESOURCE_LEASE_ACQUIRED successor. */
|
|
296
|
+
export declare function createAccountsAcquiredSerializationDomain(authorityEpoch: InfinityCounter, reservation: TrustedAccountsReservationProjection & Readonly<Pick<LaneReservation, "run_id" | "attempt_id" | "lease_epoch" | "slot_id">>, attemptLeaseIdInput: string, databaseTimeInput: string, signerHistory: InMemoryAccountsOperationSignerHistory, suppliedInitialization?: AccountsSerializationDomainInitialization): AccountsSerializationDomainState;
|
|
297
|
+
/**
|
|
298
|
+
* Reusable claim-transaction primitive. A durable store may hydrate/lock the
|
|
299
|
+
* state row first, invoke this helper, then persist the resulting exact bytes.
|
|
300
|
+
*/
|
|
301
|
+
export declare function installOrAppendAccountsResourceLease(state: AuthorityState, authorityEpoch: InfinityCounter, reservation: TrustedAccountsReservationProjection & Readonly<Pick<LaneReservation, "run_id" | "attempt_id" | "lease_epoch" | "slot_id">>, attemptLeaseId: string, databaseTime: string, signerHistory: InMemoryAccountsOperationSignerHistory): AccountsSerializationDomainState;
|
|
302
|
+
/**
|
|
303
|
+
* Fails retryably before any shared RESOURCE_LEASE frontier advance while a
|
|
304
|
+
* PREPARED model operation owns the domain. All resource leases in the domain
|
|
305
|
+
* share that frontier, so even a sibling acquisition would invalidate the
|
|
306
|
+
* prepared predecessor proof.
|
|
307
|
+
*/
|
|
308
|
+
export declare function assertAccountsResourceLeaseFrontierAdvanceAllowed(domain: Readonly<AccountsSerializationDomainState>): void;
|
|
309
|
+
/** Clears the exact authoritative child when authority fences/releases a lease. */
|
|
310
|
+
export declare function releaseAccountsResourceLeaseActiveOperation(state: AuthorityState, resourceLeaseId: string, invalidatedAt: string, allowActiveInvalidation?: boolean): void;
|
|
311
|
+
/**
|
|
312
|
+
* Local vertical adapter. Its projection and append-only journal share the
|
|
313
|
+
* InMemoryAuthorityStore transaction with run cancellation. It deliberately
|
|
314
|
+
* performs no credential resolution and has no provider-effect callback.
|
|
315
|
+
*/
|
|
316
|
+
export declare class InMemoryInfinityAccountsOperationAdapter implements InfinityAccountsOperationRecoveryPort {
|
|
317
|
+
private readonly store;
|
|
318
|
+
private readonly clock;
|
|
319
|
+
private readonly signerHistory;
|
|
320
|
+
private readonly accounts;
|
|
321
|
+
constructor(store: InMemoryAuthorityStore, clock: Clock, signerHistory: InMemoryAccountsOperationSignerHistory, accounts: AccountsSlotEligibilityPort);
|
|
322
|
+
prepareModelCall(value: PrepareAccountsModelCallInput): Promise<VerifiedPreparedOpenOperation>;
|
|
323
|
+
readPreparedOpenOperation(value: CapabilityUseOperationBinding): Promise<VerifiedPreparedOpenOperation>;
|
|
324
|
+
assertPreparedOpenCurrent(value: AssertPreparedOpenCurrentRequest): Promise<VerifiedPreparedOpenOperation>;
|
|
325
|
+
readConsumeBoundOperation(value: CapabilityUseOperationBinding): Promise<VerifiedConsumeBoundOperation | null>;
|
|
326
|
+
bindCapabilityUse(value: BindCapabilityUseRequest): Promise<VerifiedConsumeBoundOperation>;
|
|
327
|
+
assertConsumeBoundCurrent(value: AssertConsumeBoundCurrentRequest): Promise<VerifiedConsumeBoundOperation>;
|
|
328
|
+
private assertExactPrepared;
|
|
329
|
+
private verifyPrepared;
|
|
330
|
+
private verifyConsumeBound;
|
|
331
|
+
}
|
|
332
|
+
export declare function accountsSerializationKeyDigest(value: AccountsSerializationDomainPreimage): InfinitySha256Digest;
|
|
333
|
+
/** Package-internal durable-startup verification seam. */
|
|
334
|
+
export declare function verifyAccountsSerializationDomainState(state: Readonly<AuthorityState>, storedKey: string, domain: AccountsSerializationDomainState, signerHistory: InMemoryAccountsOperationSignerHistory): void;
|
|
335
|
+
export declare function assertVerifiedConsumeBoundEvidence(signerHistory: InMemoryAccountsOperationSignerHistory, value: VerifiedConsumeBoundOperation, expectedTombstoneDigest?: string | null): VerifiedConsumeBoundOperation;
|
|
336
|
+
export {};
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
export interface SlotEligibilityRequest {
|
|
2
|
+
schema_version: "accounts.eligibility-request.v1";
|
|
3
|
+
account_lane_id: string;
|
|
4
|
+
data_classification: string;
|
|
5
|
+
destination_policy_class: string;
|
|
6
|
+
model: string;
|
|
7
|
+
operation: string;
|
|
8
|
+
}
|
|
9
|
+
export interface AccountsProviderDestinationPolicy extends Readonly<Record<string, unknown>> {
|
|
10
|
+
readonly scheme: string;
|
|
11
|
+
readonly normalized_host: string;
|
|
12
|
+
readonly port: string;
|
|
13
|
+
readonly operation_path: string;
|
|
14
|
+
readonly model: string;
|
|
15
|
+
readonly request_body_digest: string;
|
|
16
|
+
readonly tls_server_name: string;
|
|
17
|
+
readonly resolved_address_class: string;
|
|
18
|
+
readonly egress_policy_digest: string;
|
|
19
|
+
}
|
|
20
|
+
/** Exact Accounts v11 online-generation binding context. */
|
|
21
|
+
export interface AccountsOnlineGenerationContext {
|
|
22
|
+
readonly authenticated_actor_principal: string;
|
|
23
|
+
readonly account_lane_id: string;
|
|
24
|
+
readonly capability_id: string;
|
|
25
|
+
readonly capability_digest: string;
|
|
26
|
+
readonly nonce: string;
|
|
27
|
+
readonly authority_epoch: string;
|
|
28
|
+
readonly route_lineage_id: string;
|
|
29
|
+
readonly route_id: string;
|
|
30
|
+
readonly route_epoch: string;
|
|
31
|
+
readonly run_id: string;
|
|
32
|
+
readonly attempt_id: string;
|
|
33
|
+
readonly attempt_lease_id: string;
|
|
34
|
+
readonly lease_epoch: string;
|
|
35
|
+
readonly resource_lease_id: string;
|
|
36
|
+
readonly resource_id: string;
|
|
37
|
+
readonly resource_lifecycle_generation: string;
|
|
38
|
+
readonly lease_expires_at: string;
|
|
39
|
+
readonly operation_id: string;
|
|
40
|
+
readonly operation_digest: string;
|
|
41
|
+
readonly operation_execution_epoch: string;
|
|
42
|
+
readonly operation_execution_expires_at: string;
|
|
43
|
+
readonly subject: string;
|
|
44
|
+
readonly actor_principal: string;
|
|
45
|
+
readonly lease_holder_principal: string;
|
|
46
|
+
readonly operation_executor_principal: string;
|
|
47
|
+
readonly sender_key_thumbprint: string;
|
|
48
|
+
readonly approval_mode: string;
|
|
49
|
+
readonly approval_binding_digest: string;
|
|
50
|
+
readonly policy_digest: string;
|
|
51
|
+
readonly canonical_request_digest: string;
|
|
52
|
+
readonly provider_destination_policy: AccountsProviderDestinationPolicy;
|
|
53
|
+
readonly provider_destination_policy_digest: string;
|
|
54
|
+
readonly sender_constraint_confirmation: string;
|
|
55
|
+
readonly max_uses: "1";
|
|
56
|
+
}
|
|
57
|
+
export interface AllowedOnlineGenerationCheckReceipt extends Readonly<Record<string, unknown>> {
|
|
58
|
+
readonly schema_version: "accounts.online-generation-check-receipt/v1";
|
|
59
|
+
readonly schema_digest: string;
|
|
60
|
+
readonly receipt_id: string;
|
|
61
|
+
readonly issuer: string;
|
|
62
|
+
readonly issuer_incarnation: string;
|
|
63
|
+
readonly key_id: string;
|
|
64
|
+
readonly audience: string;
|
|
65
|
+
readonly nonce: string;
|
|
66
|
+
readonly issued_at: string;
|
|
67
|
+
readonly not_before: string;
|
|
68
|
+
readonly expires_at: string;
|
|
69
|
+
readonly signature: string;
|
|
70
|
+
readonly capability_id: string;
|
|
71
|
+
readonly capability_digest: string;
|
|
72
|
+
readonly authority_epoch: string;
|
|
73
|
+
readonly route_lineage_id: string;
|
|
74
|
+
readonly route_id: string;
|
|
75
|
+
readonly route_epoch: string;
|
|
76
|
+
readonly run_id: string;
|
|
77
|
+
readonly attempt_id: string;
|
|
78
|
+
readonly attempt_lease_id: string;
|
|
79
|
+
readonly lease_epoch: string;
|
|
80
|
+
readonly resource_lease_id: string;
|
|
81
|
+
readonly resource_id: string;
|
|
82
|
+
readonly resource_lifecycle_generation: string;
|
|
83
|
+
readonly lease_expires_at: string;
|
|
84
|
+
readonly operation_id: string;
|
|
85
|
+
readonly operation_digest: string;
|
|
86
|
+
readonly operation_execution_epoch: string;
|
|
87
|
+
readonly operation_execution_expires_at: string;
|
|
88
|
+
readonly subject: string;
|
|
89
|
+
readonly actor_principal: string;
|
|
90
|
+
readonly lease_holder_principal: string;
|
|
91
|
+
readonly operation_executor_principal: string;
|
|
92
|
+
readonly sender_key_thumbprint: string;
|
|
93
|
+
readonly effect_namespace_id: string;
|
|
94
|
+
readonly provider_account_id: string;
|
|
95
|
+
readonly account_lane_id: string;
|
|
96
|
+
readonly capacity_pool_id: string;
|
|
97
|
+
readonly capacity_domain_ref: string;
|
|
98
|
+
readonly serialization_key: string;
|
|
99
|
+
readonly serialization_key_digest: string;
|
|
100
|
+
readonly access_transport: "api_key" | "workload_identity" | "native_session";
|
|
101
|
+
readonly credential_family_id: string;
|
|
102
|
+
readonly allowed: true;
|
|
103
|
+
readonly deny_state: "allowed";
|
|
104
|
+
readonly reason_codes: readonly [];
|
|
105
|
+
readonly capacity_generation: string;
|
|
106
|
+
readonly deny_generation: string;
|
|
107
|
+
readonly credential_generation: string;
|
|
108
|
+
readonly accounts_revision_set_digest: string;
|
|
109
|
+
readonly allowed_channel_class: "brokered_provider_proxy" | "capsule_remote_tool";
|
|
110
|
+
readonly slot_eligibility_digest: string;
|
|
111
|
+
readonly approval_mode: string;
|
|
112
|
+
readonly approval_binding_digest: string;
|
|
113
|
+
readonly policy_digest: string;
|
|
114
|
+
readonly canonical_request_digest: string;
|
|
115
|
+
readonly provider_destination_policy: AccountsProviderDestinationPolicy;
|
|
116
|
+
readonly provider_destination_policy_digest: string;
|
|
117
|
+
readonly sender_constraint_confirmation: string;
|
|
118
|
+
readonly max_uses: "1";
|
|
119
|
+
readonly use_count: "0";
|
|
120
|
+
readonly catalog_incarnation: string;
|
|
121
|
+
readonly recovery_frontier_sequence: string;
|
|
122
|
+
readonly recovery_frontier_hash: string;
|
|
123
|
+
readonly credential_binding_id?: string;
|
|
124
|
+
readonly broker_ref?: string;
|
|
125
|
+
readonly auth_capsule_id?: string;
|
|
126
|
+
readonly canonical_node_id?: string;
|
|
127
|
+
readonly node_key_thumbprint?: string;
|
|
128
|
+
readonly node_generation?: string;
|
|
129
|
+
readonly placement_generation?: string;
|
|
130
|
+
readonly auth_generation?: string;
|
|
131
|
+
readonly auth_state_revision?: string;
|
|
132
|
+
}
|
|
133
|
+
export interface BrokeredAccessTarget {
|
|
134
|
+
kind: "brokered";
|
|
135
|
+
credential_binding_id: string;
|
|
136
|
+
broker_ref: string;
|
|
137
|
+
resolver: "brokered_secret" | "workload_identity";
|
|
138
|
+
}
|
|
139
|
+
export interface NativeAccessTarget {
|
|
140
|
+
kind: "native";
|
|
141
|
+
auth_capsule_id: string;
|
|
142
|
+
canonical_node_id: string;
|
|
143
|
+
node_key_thumbprint: string;
|
|
144
|
+
node_generation: string;
|
|
145
|
+
placement_generation: string;
|
|
146
|
+
auth_generation: string;
|
|
147
|
+
auth_state_revision: string;
|
|
148
|
+
}
|
|
149
|
+
export interface BrokeredRecordRevisionSet {
|
|
150
|
+
provider_account: string;
|
|
151
|
+
entitlement: string;
|
|
152
|
+
capacity_pool: string;
|
|
153
|
+
account_lane: string;
|
|
154
|
+
credential_binding: string;
|
|
155
|
+
}
|
|
156
|
+
export interface NativeRecordRevisionSet {
|
|
157
|
+
provider_account: string;
|
|
158
|
+
entitlement: string;
|
|
159
|
+
capacity_pool: string;
|
|
160
|
+
account_lane: string;
|
|
161
|
+
auth_capsule: string;
|
|
162
|
+
}
|
|
163
|
+
interface ResolvedSlotEligibilityBase {
|
|
164
|
+
schema_version: "accounts.slot-eligibility/v1";
|
|
165
|
+
schema_digest: typeof SLOT_ELIGIBILITY_SCHEMA_DIGEST;
|
|
166
|
+
evidence_id: string;
|
|
167
|
+
issuer: string;
|
|
168
|
+
issuer_incarnation: string;
|
|
169
|
+
catalog_incarnation: string;
|
|
170
|
+
audience: "infinity:self-hosted";
|
|
171
|
+
key_id: string;
|
|
172
|
+
nonce: string;
|
|
173
|
+
account_lane_id: string;
|
|
174
|
+
eligibility_request_digest: string;
|
|
175
|
+
eligible: true;
|
|
176
|
+
reason_codes: [];
|
|
177
|
+
issued_at: string;
|
|
178
|
+
expires_at: string;
|
|
179
|
+
signature: string;
|
|
180
|
+
recovery_frontier_sequence: string;
|
|
181
|
+
recovery_frontier_hash: string;
|
|
182
|
+
accounts_build_digest: string;
|
|
183
|
+
accounts_attestation_issuer_ref: string;
|
|
184
|
+
accounts_attestation_digest: string;
|
|
185
|
+
accounts_attested_at: string;
|
|
186
|
+
accounts_attestation_expires_at: string;
|
|
187
|
+
effect_namespace_id: string;
|
|
188
|
+
provider_account_id: string;
|
|
189
|
+
entitlement_id: string;
|
|
190
|
+
capacity_pool_id: string;
|
|
191
|
+
capacity_domain_ref: string;
|
|
192
|
+
provider_key: string;
|
|
193
|
+
provider_subject_ref: string;
|
|
194
|
+
owner_ref: string;
|
|
195
|
+
identity_realm: string;
|
|
196
|
+
access_transport: "api_key" | "workload_identity" | "native_session";
|
|
197
|
+
allowed_channel_class: "brokered_provider_proxy" | "capsule_remote_tool";
|
|
198
|
+
access_target: BrokeredAccessTarget | NativeAccessTarget;
|
|
199
|
+
serialization_key: string;
|
|
200
|
+
serialization_key_digest: string;
|
|
201
|
+
max_concurrency: string;
|
|
202
|
+
capacity_evidence_ref: string;
|
|
203
|
+
capacity_evidence_issuer_ref: string;
|
|
204
|
+
capacity_evidence_version: string;
|
|
205
|
+
capacity_evidence_digest: string;
|
|
206
|
+
capacity_evidence_issued_at: string;
|
|
207
|
+
capacity_evidence_expires_at: string;
|
|
208
|
+
capacity_evidence_generation: string;
|
|
209
|
+
capacity_policy_version: string;
|
|
210
|
+
capacity_generation: string;
|
|
211
|
+
deny_generation: string;
|
|
212
|
+
deny_state: "allowed";
|
|
213
|
+
credential_family_id: string;
|
|
214
|
+
credential_generation: string;
|
|
215
|
+
record_revision_set: BrokeredRecordRevisionSet | NativeRecordRevisionSet;
|
|
216
|
+
accounts_revision_set_digest: string;
|
|
217
|
+
ownership_evidence_issuer_ref: string;
|
|
218
|
+
ownership_evidence_version: string;
|
|
219
|
+
ownership_evidence_digest: string;
|
|
220
|
+
ownership_evidence_issued_at: string;
|
|
221
|
+
ownership_evidence_expires_at: string;
|
|
222
|
+
ownership_generation: string;
|
|
223
|
+
terms_evidence_issuer_ref: string;
|
|
224
|
+
terms_evidence_version: string;
|
|
225
|
+
terms_evidence_digest: string;
|
|
226
|
+
terms_evidence_issued_at: string;
|
|
227
|
+
terms_evidence_expires_at: string;
|
|
228
|
+
execution_policy_evidence_issuer_ref: string;
|
|
229
|
+
execution_policy_evidence_version: string;
|
|
230
|
+
execution_policy_evidence_digest: string;
|
|
231
|
+
execution_policy_evidence_issued_at: string;
|
|
232
|
+
execution_policy_evidence_expires_at: string;
|
|
233
|
+
data_policy_evidence_issuer_ref: string;
|
|
234
|
+
data_policy_evidence_version: string;
|
|
235
|
+
data_policy_evidence_digest: string;
|
|
236
|
+
data_policy_evidence_issued_at: string;
|
|
237
|
+
data_policy_evidence_expires_at: string;
|
|
238
|
+
isolation_policy_evidence_issuer_ref: string;
|
|
239
|
+
isolation_policy_evidence_version: string;
|
|
240
|
+
isolation_policy_evidence_digest: string;
|
|
241
|
+
isolation_policy_evidence_issued_at: string;
|
|
242
|
+
isolation_policy_evidence_expires_at: string;
|
|
243
|
+
health_evidence_issuer_ref: string;
|
|
244
|
+
health_evidence_version: string;
|
|
245
|
+
health_evidence_digest: string;
|
|
246
|
+
health_evidence_issued_at: string;
|
|
247
|
+
health_evidence_expires_at: string;
|
|
248
|
+
}
|
|
249
|
+
export interface BrokeredSlotEligibility extends ResolvedSlotEligibilityBase {
|
|
250
|
+
access_transport: "api_key" | "workload_identity";
|
|
251
|
+
allowed_channel_class: "brokered_provider_proxy";
|
|
252
|
+
access_target: BrokeredAccessTarget;
|
|
253
|
+
record_revision_set: BrokeredRecordRevisionSet;
|
|
254
|
+
binding_policy_digest: string;
|
|
255
|
+
}
|
|
256
|
+
export interface NativeSlotEligibility extends ResolvedSlotEligibilityBase {
|
|
257
|
+
access_transport: "native_session";
|
|
258
|
+
allowed_channel_class: "capsule_remote_tool";
|
|
259
|
+
access_target: NativeAccessTarget;
|
|
260
|
+
record_revision_set: NativeRecordRevisionSet;
|
|
261
|
+
capsule_attestation_issuer_ref: string;
|
|
262
|
+
capsule_attestation_version: string;
|
|
263
|
+
capsule_attestation_digest: string;
|
|
264
|
+
capsule_attestation_issued_at: string;
|
|
265
|
+
capsule_attestation_expires_at: string;
|
|
266
|
+
}
|
|
267
|
+
export type SlotEligibility = BrokeredSlotEligibility | NativeSlotEligibility;
|
|
268
|
+
export interface AccountsSlotEligibilityPort {
|
|
269
|
+
/** Returns evidence whose Accounts Ed25519 signature and trust policy were already verified. */
|
|
270
|
+
getSlotEligibility(request: SlotEligibilityRequest): Promise<unknown>;
|
|
271
|
+
/** Returns exact Accounts evidence already signature/trust/time verified by the port adapter. */
|
|
272
|
+
checkOnlineGeneration(request: {
|
|
273
|
+
readonly expectedSlotEligibility: SlotEligibility;
|
|
274
|
+
readonly context: AccountsOnlineGenerationContext;
|
|
275
|
+
}): Promise<unknown>;
|
|
276
|
+
}
|
|
277
|
+
export declare const SLOT_ELIGIBILITY_SCHEMA_DIGEST: "sha256:b3415ad8bb71951a628f9744b7949f49d794adde55fb965c73e9b4936c691a55";
|
|
278
|
+
export declare const MAX_SLOT_ELIGIBILITY_LIFETIME_MS = 30000;
|
|
279
|
+
export declare const ACCOUNTS_ELIGIBILITY_REQUEST_SCHEMA_VERSION: "accounts.eligibility-request.v1";
|
|
280
|
+
export declare const ONLINE_GENERATION_CHECK_RECEIPT_SCHEMA_DIGEST: "sha256:5061db743dafa19f9ea2e586494f4205e10549ad546ea92fa6fbc8c2e55a4210";
|
|
281
|
+
export declare function parseSlotEligibilityRequest(value: unknown): Readonly<SlotEligibilityRequest>;
|
|
282
|
+
export interface AccountsSerializationDomainPreimage {
|
|
283
|
+
effect_namespace_id: string;
|
|
284
|
+
provider_account_id: string;
|
|
285
|
+
capacity_pool_id: string;
|
|
286
|
+
capacity_domain_ref: string;
|
|
287
|
+
owner_ref: string;
|
|
288
|
+
serialization_key: string;
|
|
289
|
+
}
|
|
290
|
+
/** Exact seven-member RFC 8785/JCS preimage mandated by Accounts v11. */
|
|
291
|
+
export declare function accountsSerializationDomainDigest(value: AccountsSerializationDomainPreimage): string;
|
|
292
|
+
export declare function parseSlotEligibility(value: unknown): Readonly<SlotEligibility>;
|
|
293
|
+
export {};
|