@registrystack/client 0.44.0 → 0.46.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/README.md CHANGED
@@ -189,7 +189,7 @@ Coordinator joins the seven-product roster at v0.44.0. The source facade also
189
189
  contains held `render` and `@registrystack/client/render` namespaces. Default
190
190
  assembly omits Render; `--include-render` adds it to an explicit local candidate
191
191
  and does not authorize publication. Render takes a token or a resource-bound provider with
192
- `bearerToken()` and performs one bounded render exchange. A correlation key is
192
+ `bearerToken()` and performs one bounded render or seal exchange. A correlation key is
193
193
  not a durable idempotency promise. `outcomeUnknown` and `transportKind` preserve
194
194
  whether an exchange may have completed; provider errors keep their own class.
195
195
  Coordinator is optional.
package/breg/client.d.ts CHANGED
@@ -238,7 +238,7 @@ export interface ListContinuation {
238
238
  accessProfile?: string | null
239
239
  registryIdentifier: string
240
240
  datasetIdentifier: string
241
- entityTypeIdentifier: string
241
+ recordTypeIdentifier: string
242
242
  }
243
243
  export type CurrentListContinuation = ListContinuation
244
244
  export interface AsOfListContinuation extends ListContinuation { asOf: string }
@@ -266,7 +266,7 @@ export interface RegistryRecord {
266
266
  export interface RecordMetadata {
267
267
  registryIdentifier: string
268
268
  datasetIdentifier: string
269
- entityTypeIdentifier: string
269
+ recordTypeIdentifier: string
270
270
  readonly [member: string]: JsonValue | undefined
271
271
  }
272
272
 
@@ -559,8 +559,8 @@ export interface BRegBatchCreateItem {
559
559
  export interface BRegBatchPatchItem {
560
560
  readonly operation: 'patch'
561
561
  readonly recordIdentifier: string
562
- readonly etag: string
563
- readonly operations: ReadonlyArray<PatchOperation | RemovePatchOperation>
562
+ readonly ifMatch: string
563
+ readonly patch: ReadonlyArray<PatchOperation | RemovePatchOperation>
564
564
  }
565
565
  export type BRegBatchItem = BRegBatchCreateItem | BRegBatchPatchItem
566
566
  export type BRegChangeContext =
@@ -583,10 +583,10 @@ export interface BRegBatchReceipt {
583
583
  readonly snapshot: string
584
584
  readonly results: ReadonlyArray<{
585
585
  readonly operation: 'create' | 'patch'
586
- readonly id: string
587
- readonly revision: SafeInteger
586
+ readonly recordIdentifier: string
587
+ readonly revisionIdentifier: string
588
588
  readonly etag: string
589
- readonly data: Readonly<Record<string, JsonValue>>
589
+ readonly domainData: Readonly<Record<string, JsonValue>>
590
590
  }>
591
591
  }
592
592
 
@@ -881,13 +881,24 @@ export declare class BaseRegistryClientError extends Error implements BaseRegist
881
881
  }
882
882
 
883
883
  export declare class BaseRegistryClient {
884
- startProposal(binding: BRegActionBinding, inputsJson: string, key: string): Promise<BRegProposal>
884
+ startProposal(binding: BRegActionBinding, inputs: JsonObject, key: string): Promise<BRegProposal>
885
885
  getProposal(binding: BRegProposalGetBinding, id: string): Promise<BRegProposal>
886
886
  readProposal(proposal: BRegProposal): Promise<BRegProposal>
887
887
  /** Read one retained submission version under the access profile of the Proposal's self link. */
888
888
  readProposalSubmission(proposal: BRegProposal, version: number): Promise<CompleteOutcome<BRegProposalSubmission>>
889
- listProposals(collection: BRegProposalCollection, queryJson: string): Promise<BRegProposalPage>
890
- prepareProposal(proposal: BRegProposal, operation: BRegProposalTransition, bodyJson: string, key: string): BRegPreparedProposal
889
+ listProposals(collection: BRegProposalCollection, query: JsonObject): Promise<BRegProposalPage>
890
+ /** Exact JSON query; retains the metadata-selected collection and bounded pagination. */
891
+ listProposalsJson(collection: BRegProposalCollection, queryJson: string): Promise<BRegProposalPage>
892
+ /**
893
+ * Bind an available transition without I/O. Throws locally when the operation
894
+ * is not a legal transition from the Proposal's observed state; `cancel` is
895
+ * prepared only for a Draft or Submitted Proposal, so cancelling an Applied or
896
+ * Cancelled Proposal never reaches the server. Call the HTTP route directly to
897
+ * exercise the server's terminal-state refusal.
898
+ */
899
+ prepareProposal(proposal: BRegProposal, operation: BRegProposalTransition, body: JsonObject, key: string): BRegPreparedProposal
900
+ /** Exact JSON body; preserves integer values and the same lifecycle authority and recovery contract. */
901
+ prepareProposalJson(proposal: BRegProposal, operation: BRegProposalTransition, bodyJson: string, key: string): BRegPreparedProposal
891
902
  recoverProposal(proposal: BRegProposal, attempt: BRegPreparedProposal): BRegPreparedProposal
892
903
  executeProposal(attempt: BRegPreparedProposal): Promise<BRegProposal>
893
904
  constructor(config: BaseRegistryClientConfig)
@@ -900,7 +911,7 @@ export declare class BaseRegistryClient {
900
911
  * `{recordType, recordId, revision, createdAt}` JSON text, or null when the
901
912
  * caller may not read it (403 or 404).
902
913
  */
903
- eventRecordCreationRevision(entityRoute: string, recordIdentifier: string, accessProfile?: string | null): Promise<string | null>
914
+ eventRecordCreationRevision(recordRoute: string, recordIdentifier: string, accessProfile?: string | null): Promise<string | null>
904
915
  statisticsLive(dataset: string, from?: string | null, to?: string | null, accessProfile?: string | null, format?: StatisticsFormat | null): Promise<RawOutcome>
905
916
  statisticsReleases(dataset: string, top?: SafeInteger | null, skipToken?: string | null, accessProfile?: string | null): Promise<RawOutcome>
906
917
  statisticsLatestRelease(dataset: string, period: string, selection: StatisticsReleaseSelection, accessProfile?: string | null, format?: StatisticsFormat | null): Promise<RawOutcome>
@@ -909,24 +920,24 @@ export declare class BaseRegistryClient {
909
920
  statisticsPublish(dataset: string, period: string, status: StatisticsReleaseStatus, accessProfile: string, idempotencyKey: string): Promise<RawOutcome>
910
921
  statisticsWithdraw(dataset: string, period: string, version: SafeInteger, reason: StatisticsWithdrawalReason, accessProfile: string, idempotencyKey: string): Promise<RawOutcome>
911
922
  registryContract(accessProfile?: string | null): Promise<BRegMetadata>
912
- entitySchema(recordTypeIdentifier: string, accessProfile?: string | null): Promise<RawOutcome>
913
- recordRevisions(entityRoute: string, recordIdentifier: string, accessProfile?: string | null): Promise<RawOutcome>
914
- getRecordRevision(entityRoute: string, recordIdentifier: string, revision: SafeInteger, options?: RecordProjectionOptions | null): Promise<RawOutcome>
915
- getRecord(entityRoute: string, recordIdentifier: string, options?: RecordOptions | null): Promise<CompleteOutcome<RecordEnvelope>>
916
- listRecords(entityRoute: string, options?: ListOptions | null): Promise<PageOutcome>
923
+ recordSchema(recordTypeIdentifier: string, accessProfile?: string | null): Promise<RawOutcome>
924
+ recordRevisions(recordRoute: string, recordIdentifier: string, accessProfile?: string | null): Promise<RawOutcome>
925
+ getRecordRevision(recordRoute: string, recordIdentifier: string, revision: SafeInteger, options?: RecordProjectionOptions | null): Promise<RawOutcome>
926
+ getRecord(recordRoute: string, recordIdentifier: string, options?: RecordOptions | null): Promise<CompleteOutcome<RecordEnvelope>>
927
+ listRecords(recordRoute: string, options?: ListOptions | null): Promise<PageOutcome>
917
928
  continueList(continuation: ListContinuation): Promise<PageOutcome>
918
- getGeoJsonRecord(entityRoute: string, recordIdentifier: string, options?: GeoJsonOptions | null): Promise<CompleteOutcome<GeoJsonFeature>>
919
- listGeoJsonRecords(entityRoute: string, options?: GeoJsonListOptions | null): Promise<PageOutcome<GeoJsonFeatureCollection, GeoJsonListContinuation>>
929
+ getGeoJsonRecord(recordRoute: string, recordIdentifier: string, options?: GeoJsonOptions | null): Promise<CompleteOutcome<GeoJsonFeature>>
930
+ listGeoJsonRecords(recordRoute: string, options?: GeoJsonListOptions | null): Promise<PageOutcome<GeoJsonFeatureCollection, GeoJsonListContinuation>>
920
931
  continueGeoJsonList(continuation: GeoJsonListContinuation): Promise<PageOutcome<GeoJsonFeatureCollection, GeoJsonListContinuation>>
921
- listCurrentRecords(entityRoute: string, options?: CollectionOptions | null): Promise<PageOutcome<RecordCollection, CurrentListContinuation>>
932
+ listCurrentRecords(recordRoute: string, options?: CollectionOptions | null): Promise<PageOutcome<RecordCollection, CurrentListContinuation>>
922
933
  continueCurrentList(continuation: CurrentListContinuation): Promise<PageOutcome<RecordCollection, CurrentListContinuation>>
923
- listRecordsAsOf(entityRoute: string, options: AsOfListOptions): Promise<PageOutcome<RecordCollection, AsOfListContinuation>>
934
+ listRecordsAsOf(recordRoute: string, options: AsOfListOptions): Promise<PageOutcome<RecordCollection, AsOfListContinuation>>
924
935
  continueAsOfList(continuation: AsOfListContinuation): Promise<PageOutcome<RecordCollection, AsOfListContinuation>>
925
- listSnapshotRecords(entityRoute: string, options?: SnapshotListOptions | null): Promise<PageOutcome<RecordCollection, SnapshotListContinuation>>
936
+ listSnapshotRecords(recordRoute: string, options?: SnapshotListOptions | null): Promise<PageOutcome<RecordCollection, SnapshotListContinuation>>
926
937
  continueSnapshotList(continuation: SnapshotListContinuation): Promise<PageOutcome<RecordCollection, SnapshotListContinuation>>
927
- listRelationshipRecords(entityRoute: string, recordIdentifier: string, pathRoute: string, options?: CollectionOptions | null): Promise<PageOutcome<RecordCollection, RelationshipListContinuation>>
938
+ listRelationshipRecords(recordRoute: string, recordIdentifier: string, pathRoute: string, options?: CollectionOptions | null): Promise<PageOutcome<RecordCollection, RelationshipListContinuation>>
928
939
  continueRelationshipList(continuation: RelationshipListContinuation): Promise<PageOutcome<RecordCollection, RelationshipListContinuation>>
929
- lookupRecord(entityRoute: string, selector: string, values?: JsonObject | null, options?: RecordProjectionOptions | null): Promise<CompleteOutcome<RecordEnvelope>>
940
+ lookupRecord(recordRoute: string, selector: string, values?: JsonObject | null, options?: RecordProjectionOptions | null): Promise<CompleteOutcome<RecordEnvelope>>
930
941
  actionTargetConditions(binding: BRegActionBinding, inputs: JsonObject): Promise<BRegActionTargetConditions>
931
942
  actionTargetConditionsJson(binding: BRegActionBinding, inputsJson: string): Promise<BRegActionTargetConditions>
932
943
  actionAvailability(binding: BRegActionBinding, targetInput: string, inputs: JsonObject): Promise<CompleteOutcome<BRegActionAvailability>>
@@ -959,36 +970,36 @@ export declare class BaseRegistryClient {
959
970
  patchRecord(binding: BRegPatchBinding, recordIdentifier: string, etag: string, operations: ReadonlyArray<PatchOperation | RemovePatchOperation>, idempotencyKey: string, format?: RecordFormat | null): Promise<CompleteOutcome<RecordEnvelope>>
960
971
  batchRecords(binding: BRegBatchBinding, request: BRegBatchInput, idempotencyKey: string): Promise<CompleteOutcome<BRegBatchReceipt>>
961
972
  batchRecordsJson(binding: BRegBatchBinding, requestJson: string, idempotencyKey: string): Promise<JsonOutcome>
962
- createIngestionRun(entityRoute: string, request: BRegIngestionRunInput): Promise<CompleteOutcome<BRegIngestionRun>>
963
- listIngestionRuns(entityRoute: string, query?: BRegIngestionRunListInput | null): Promise<CompleteOutcome<BRegIngestionRunPage>>
964
- readIngestionRun(entityRoute: string, runId: string, accessProfile?: string | null): Promise<CompleteOutcome<BRegIngestionRun>>
965
- submitIngestionChunk(entityRoute: string, runId: string, chunk: BRegIngestionChunk, profileId: string): Promise<CompleteOutcome<BRegIngestionChunkSubmission>>
966
- cancelIngestionRun(entityRoute: string, runId: string, accessProfile?: string | null): Promise<CompleteOutcome<BRegIngestionRun>>
967
- ingestionChunkReceipt(entityRoute: string, runId: string, chunkIndex: SafeInteger, profileId: string): Promise<CompleteOutcome<BRegIngestionChunkReceipt>>
973
+ createIngestionRun(recordRoute: string, request: BRegIngestionRunInput): Promise<CompleteOutcome<BRegIngestionRun>>
974
+ listIngestionRuns(recordRoute: string, query?: BRegIngestionRunListInput | null): Promise<CompleteOutcome<BRegIngestionRunPage>>
975
+ readIngestionRun(recordRoute: string, runId: string, accessProfile?: string | null): Promise<CompleteOutcome<BRegIngestionRun>>
976
+ submitIngestionChunk(recordRoute: string, runId: string, chunk: BRegIngestionChunk, profileId: string): Promise<CompleteOutcome<BRegIngestionChunkSubmission>>
977
+ cancelIngestionRun(recordRoute: string, runId: string, accessProfile?: string | null): Promise<CompleteOutcome<BRegIngestionRun>>
978
+ ingestionChunkReceipt(recordRoute: string, runId: string, chunkIndex: SafeInteger, profileId: string): Promise<CompleteOutcome<BRegIngestionChunkReceipt>>
968
979
  tombstoneRecord(binding: BRegTombstoneBinding, recordIdentifier: string, etag: string, idempotencyKey: string, format?: RecordFormat | null): Promise<CompleteOutcome<RecordEnvelope>>
969
980
  tombstoneRecordJson(binding: BRegTombstoneBinding, recordIdentifier: string, etag: string, idempotencyKey: string, format?: RecordFormat | null): Promise<JsonOutcome>
970
- getRecordJson(entityRoute: string, recordIdentifier: string, options?: RecordOptions | null): Promise<JsonOutcome>
971
- listRecordsJson(entityRoute: string, options?: ListOptions | null): Promise<JsonOutcome>
981
+ getRecordJson(recordRoute: string, recordIdentifier: string, options?: RecordOptions | null): Promise<JsonOutcome>
982
+ listRecordsJson(recordRoute: string, options?: ListOptions | null): Promise<JsonOutcome>
972
983
  continueListJson(continuation: ListContinuation): Promise<JsonOutcome>
973
- getGeoJsonRecordJson(entityRoute: string, recordIdentifier: string, options?: GeoJsonOptions | null): Promise<JsonOutcome>
974
- listGeoJsonRecordsJson(entityRoute: string, options?: GeoJsonListOptions | null): Promise<JsonOutcome<GeoJsonListContinuation>>
984
+ getGeoJsonRecordJson(recordRoute: string, recordIdentifier: string, options?: GeoJsonOptions | null): Promise<JsonOutcome>
985
+ listGeoJsonRecordsJson(recordRoute: string, options?: GeoJsonListOptions | null): Promise<JsonOutcome<GeoJsonListContinuation>>
975
986
  continueGeoJsonListJson(continuation: GeoJsonListContinuation): Promise<JsonOutcome<GeoJsonListContinuation>>
976
- listCurrentRecordsJson(entityRoute: string, options?: CollectionOptions | null): Promise<JsonOutcome<CurrentListContinuation>>
987
+ listCurrentRecordsJson(recordRoute: string, options?: CollectionOptions | null): Promise<JsonOutcome<CurrentListContinuation>>
977
988
  continueCurrentListJson(continuation: CurrentListContinuation): Promise<JsonOutcome<CurrentListContinuation>>
978
- listRecordsAsOfJson(entityRoute: string, options: AsOfListOptions): Promise<JsonOutcome<AsOfListContinuation>>
989
+ listRecordsAsOfJson(recordRoute: string, options: AsOfListOptions): Promise<JsonOutcome<AsOfListContinuation>>
979
990
  continueAsOfListJson(continuation: AsOfListContinuation): Promise<JsonOutcome<AsOfListContinuation>>
980
- listSnapshotRecordsJson(entityRoute: string, options?: SnapshotListOptions | null): Promise<JsonOutcome<SnapshotListContinuation>>
991
+ listSnapshotRecordsJson(recordRoute: string, options?: SnapshotListOptions | null): Promise<JsonOutcome<SnapshotListContinuation>>
981
992
  continueSnapshotListJson(continuation: SnapshotListContinuation): Promise<JsonOutcome<SnapshotListContinuation>>
982
- listRelationshipRecordsJson(entityRoute: string, recordIdentifier: string, pathRoute: string, options?: CollectionOptions | null): Promise<JsonOutcome<RelationshipListContinuation>>
993
+ listRelationshipRecordsJson(recordRoute: string, recordIdentifier: string, pathRoute: string, options?: CollectionOptions | null): Promise<JsonOutcome<RelationshipListContinuation>>
983
994
  continueRelationshipListJson(continuation: RelationshipListContinuation): Promise<JsonOutcome<RelationshipListContinuation>>
984
- lookupRecordJson(entityRoute: string, selector: string, valuesJson?: string | null, options?: RecordProjectionOptions | null): Promise<JsonOutcome>
995
+ lookupRecordJson(recordRoute: string, selector: string, valuesJson?: string | null, options?: RecordProjectionOptions | null): Promise<JsonOutcome>
985
996
  createRecordJson(binding: BRegCreateBinding, dataJson: string, idempotencyKey: string, format?: RecordFormat | null): Promise<JsonOutcome>
986
997
  patchRecordJson(binding: BRegPatchBinding, recordIdentifier: string, etag: string, operationsJson: string, idempotencyKey: string, format?: RecordFormat | null): Promise<JsonOutcome>
987
998
  }
988
999
 
989
1000
  export type BRegProposalTransition = 'edit' | 'submit' | 'revise' | 'rebase' | 'retry' | 'cancel' | 'apply'
990
- export type BRegAvailabilityReason = 'pending-review' | 'review-rejected' | 'review-changes-requested' | 'review-ended' | 'stale-revision' | 'contract-changed' | 'dependency-outage' | 'invalid-input' | 'already-applied'
991
- export type BRegRecoveryHint = 'refresh' | 'revise' | 'retry' | 'correct-input' | 'receipt-only'
1001
+ export type BRegAvailabilityReason = 'pending-review' | 'review-rejected' | 'review-changes-requested' | 'review-ended' | 'stale-revision' | 'package-changed' | 'dependency-outage' | 'invalid-input' | 'already-applied'
1002
+ export type BRegRecoveryHint = 'refresh' | 'revise' | 'retry' | 'rebase' | 'correct-input' | 'receipt-only'
992
1003
  export type BRegAvailability =
993
1004
  | { readonly available: true; readonly observedRevision: number }
994
1005
  | { readonly available: false; readonly observedRevision: number; readonly reason: BRegAvailabilityReason; readonly recovery: BRegRecoveryHint }
@@ -1007,8 +1018,8 @@ export interface BRegProposalApplication {
1007
1018
  export interface BRegProposalApplicationStatus {
1008
1019
  readonly state: 'awaiting-review' | 'pending' | 'applying' | 'blocked' | 'applied' | 'cancelled' | 'rejected'
1009
1020
  readonly mode: 'automatic' | 'manual'
1010
- readonly reason?: 'contract-changed' | 'dependency-outage' | 'lease-expired' | 'application-refused' | 'attempts-exhausted'
1011
- readonly recovery?: 'retry' | 'correct-input'
1021
+ readonly reason?: 'package-changed' | 'dependency-outage' | 'lease-expired' | 'application-refused' | 'attempts-exhausted'
1022
+ readonly recovery?: 'retry' | 'rebase' | 'correct-input'
1012
1023
  readonly automaticRetry?: {readonly scheduled: boolean; readonly attempts: number; readonly maximumAttempts: number}
1013
1024
  }
1014
1025
  export interface BRegProposalReviewDocument {
@@ -1017,6 +1028,8 @@ export interface BRegProposalReviewDocument {
1017
1028
  readonly subject: {readonly source: string; readonly subjectType: 'proposal'; readonly id: string; readonly version: string; readonly digest: string}
1018
1029
  readonly context: {readonly reference: string; readonly contract?: {readonly id: string; readonly revision: string; readonly schemaDigest: string}; readonly fields?: Readonly<Record<string, JsonValue>>}
1019
1030
  readonly requestId?: string
1031
+ /** Status reads only: where the submission stands with the Review provider. `reason` is present exactly when `state` is `failed`. */
1032
+ readonly handoff?: {readonly state: 'pending' | 'accepted' | 'failed' | 'withdrawn'; readonly reason?: 'remote-refused' | 'producer-identity-mismatch' | 'review-acceptance-changed' | 'review-policy-changed' | 'submission-recovery-expired' | 'operator-closed' | 'unspecified'}
1020
1033
  readonly authority?: string; readonly policy?: {readonly id: string; readonly version: string; readonly digest: string}
1021
1034
  readonly result?: {readonly state: 'pending' | 'approved' | 'rejected' | 'changes-requested' | 'answered' | 'cancelled' | 'superseded' | 'expired'; readonly resultId?: string; readonly completedAt?: string; readonly availableUntil?: string}
1022
1035
  }
@@ -1024,13 +1037,16 @@ export interface BRegProposalReviewDocument {
1024
1037
  export type BRegProposalTurn = 'party' | 'official' | 'nobody'
1025
1038
  /** The review decision on one submission. The public reason is the only reviewer text BReg serves. */
1026
1039
  export interface BRegProposalDecision { readonly status: 'approved' | 'rejected' | 'changes-requested' | 'answered'; readonly decidedAt: string; readonly publicReason?: string }
1040
+ /** Why the review authority refused to take a submission. BReg names only these codes and never the authority's own text. */
1041
+ export interface BRegProposalHandoffRefusal { readonly code: 'review.initiator-required' | 'review.initiator-excluded' | 'review.policy-mismatch' | 'review.refused' }
1027
1042
  export interface BRegProposalSubmission {
1028
1043
  readonly id: string; readonly actionId: string; readonly submissionVersion: number; readonly current: boolean; readonly effectDigest: string
1029
1044
  readonly review: NonNullable<BRegProposalReviewDocument['result']> | null
1030
1045
  readonly application: (Omit<BRegProposalApplicationStatus, 'mode'> & {readonly mode?: BRegProposalApplicationStatus['mode']; readonly applicationId?: string; readonly appliedBy?: string; readonly appliedAt?: string}) | null
1031
1046
  readonly decision?: BRegProposalDecision
1047
+ readonly handoffRefusal?: BRegProposalHandoffRefusal
1032
1048
  }
1033
- export interface BRegProposalDocument { readonly id: string; readonly actionId: string; readonly actionRevision: string; readonly submissionVersion: number; readonly revision: number; readonly state: 'draft' | 'submitted' | 'cancelled' | 'applied' | 'rejected'; readonly turn?: BRegProposalTurn; readonly decision?: BRegProposalDecision; readonly title?: string; readonly input?: JsonObject; readonly blockedReason?: 'package-changed'; readonly effectDigest?: string; readonly application?: BRegProposalApplication; readonly applicationStatus?: BRegProposalApplicationStatus; readonly links: Readonly<Partial<Record<BRegProposalTransition | 'self' | 'reviewContext' | 'reviewStatus', BRegProposalLink>>>; readonly attachments?: Readonly<Record<string, BRegProposalAttachment>> }
1049
+ export interface BRegProposalDocument { readonly id: string; readonly actionId: string; readonly actionRevision: string; readonly submissionVersion: number; readonly revision: number; readonly state: 'draft' | 'submitted' | 'cancelled' | 'applied' | 'rejected'; readonly createdAt?: string; readonly turn?: BRegProposalTurn; readonly decision?: BRegProposalDecision; readonly handoffRefusal?: BRegProposalHandoffRefusal; readonly title?: string; readonly input?: JsonObject; readonly blockedReason?: 'package-changed'; readonly effectDigest?: string; readonly application?: BRegProposalApplication; readonly applicationStatus?: BRegProposalApplicationStatus; readonly links: Readonly<Partial<Record<BRegProposalTransition | 'self' | 'reviewContext' | 'reviewStatus', BRegProposalLink>>>; readonly attachments?: Readonly<Record<string, BRegProposalAttachment>> }
1034
1050
  export declare class BRegProposal { private constructor(); private readonly __opaque: void; readonly identifier: string; readonly actionIdentifier: string; readonly documentJson: string; readonly inputJson?: string | null }
1035
1051
  export declare class BRegProposalGetBinding { private constructor(); private readonly __opaque: void }
1036
1052
  export declare class BRegProposalReviewBinding { private constructor(); private readonly __opaque: void }
package/breg/client.js CHANGED
@@ -216,7 +216,7 @@ function wrapAsync(name, jsonIndexes = [], requiredIndexes = []) {
216
216
  }
217
217
 
218
218
  for (const [method, jsonIndexes, requiredIndexes] of [
219
- ['health'], ['ready'], ['openapi'], ['registryMetadata'], ['registryContract'], ['entitySchema'],
219
+ ['health'], ['ready'], ['openapi'], ['registryMetadata'], ['registryContract'], ['recordSchema'],
220
220
  ['statisticsLive'], ['statisticsReleases'], ['statisticsLatestRelease'],
221
221
  ['statisticsReleaseVersion'], ['statisticsReleaseSeries'], ['statisticsPublish'],
222
222
  ['statisticsWithdraw'],
@@ -232,7 +232,7 @@ for (const [method, jsonIndexes, requiredIndexes] of [
232
232
  ['invokeAction', [1], [1]],
233
233
  ['executeRecoveredAction'], ['executeRecoveredProposalStart'], ['executeRecoveredCreate'],
234
234
  ['patchRecord', [3], [3]], ['batchRecords', [1], [1]], ['tombstoneRecord'],
235
- ['startProposal'], ['readProposal'], ['readProposalSubmission'], ['getProposal'], ['listProposals'], ['executeProposal'],
235
+ ['startProposal', [1], [1]], ['readProposal'], ['readProposalSubmission'], ['getProposal'], ['listProposals', [1], [1]], ['executeProposal'], ['listProposalsJson'],
236
236
  ['downloadProposalAttachment'], ['uploadProposalAttachment'], ['deleteProposalAttachment'],
237
237
  ['readProposalReviewStatus'], ['readProposalReviewContext'],
238
238
  ['readProposalReviewContextBatch', [1], [1]],
@@ -256,7 +256,7 @@ for (const [method, jsonIndexes, requiredIndexes] of [
256
256
  ['prepareAction', [1], [1]], ['prepareActionJson'],
257
257
  ['recoverAction', [2], [2]], ['recoverActionJson'],
258
258
  ['prepareCreate', [1], [1]], ['prepareCreateJson'], ['recoverCreate'],
259
- ['prepareProposal'], ['recoverProposal'],
259
+ ['prepareProposal', [2], [2]], ['prepareProposalJson'], ['recoverProposal'],
260
260
  ]) {
261
261
  const original = native.BaseRegistryClient.prototype[method];
262
262
  native.BaseRegistryClient.prototype[method] = function (...args) {
package/breg/index.d.ts CHANGED
@@ -15,33 +15,33 @@ export declare class BaseRegistryClient {
15
15
  statisticsPublish(dataset: string, period: string, status: string, accessProfile: string, idempotencyKey: string): Promise<RawOutcome>
16
16
  statisticsWithdraw(dataset: string, period: string, version: number, reason: string, accessProfile: string, idempotencyKey: string): Promise<RawOutcome>
17
17
  registryContract(accessProfile?: string | undefined | null): Promise<BRegMetadata>
18
- entitySchema(recordTypeIdentifier: string, accessProfile?: string | undefined | null): Promise<RawOutcome>
18
+ recordSchema(recordTypeIdentifier: string, accessProfile?: string | undefined | null): Promise<RawOutcome>
19
19
  /** Retrieve one bounded first page of record revisions as inert JSON. */
20
- recordRevisions(entityRoute: string, recordIdentifier: string, accessProfile?: string | undefined | null): Promise<RawOutcome>
20
+ recordRevisions(recordRoute: string, recordIdentifier: string, accessProfile?: string | undefined | null): Promise<RawOutcome>
21
21
  /** Retrieve one exact retained revision as validated inert record JSON. */
22
- getRecordRevision(entityRoute: string, recordIdentifier: string, revision: number, options?: any | undefined | null): Promise<RawOutcome>
22
+ getRecordRevision(recordRoute: string, recordIdentifier: string, revision: number, options?: any | undefined | null): Promise<RawOutcome>
23
23
  /**
24
24
  * Read the first revision of one record as the compact
25
25
  * `{recordType, recordId, revision, createdAt}` JSON, or null when the
26
26
  * caller may not read it.
27
27
  */
28
- eventRecordCreationRevision(entityRoute: string, recordIdentifier: string, accessProfile?: string | undefined | null): Promise<string | null>
29
- getRecord(entityRoute: string, recordIdentifier: string, options?: any | undefined | null): Promise<CompleteOutcome>
30
- listRecords(entityRoute: string, options?: any | undefined | null): Promise<PageOutcome>
28
+ eventRecordCreationRevision(recordRoute: string, recordIdentifier: string, accessProfile?: string | undefined | null): Promise<string | null>
29
+ getRecord(recordRoute: string, recordIdentifier: string, options?: any | undefined | null): Promise<CompleteOutcome>
30
+ listRecords(recordRoute: string, options?: any | undefined | null): Promise<PageOutcome>
31
31
  continueList(value: any): Promise<PageOutcome>
32
- getGeoJsonRecord(entityRoute: string, recordIdentifier: string, options?: any | undefined | null): Promise<CompleteOutcome>
33
- listGeoJsonRecords(entityRoute: string, options?: any | undefined | null): Promise<PageOutcome>
32
+ getGeoJsonRecord(recordRoute: string, recordIdentifier: string, options?: any | undefined | null): Promise<CompleteOutcome>
33
+ listGeoJsonRecords(recordRoute: string, options?: any | undefined | null): Promise<PageOutcome>
34
34
  continueGeoJsonList(value: any): Promise<PageOutcome>
35
- listCurrentRecords(entityRoute: string, options?: any | undefined | null): Promise<PageOutcome>
35
+ listCurrentRecords(recordRoute: string, options?: any | undefined | null): Promise<PageOutcome>
36
36
  continueCurrentList(value: any): Promise<PageOutcome>
37
- listRecordsAsOf(entityRoute: string, options?: any | undefined | null): Promise<PageOutcome>
37
+ listRecordsAsOf(recordRoute: string, options?: any | undefined | null): Promise<PageOutcome>
38
38
  continueAsOfList(value: any): Promise<PageOutcome>
39
- listSnapshotRecords(entityRoute: string, options?: any | undefined | null): Promise<PageOutcome>
39
+ listSnapshotRecords(recordRoute: string, options?: any | undefined | null): Promise<PageOutcome>
40
40
  continueSnapshotList(value: any): Promise<PageOutcome>
41
- listRelationshipRecords(entityRoute: string, recordIdentifier: string, pathRoute: string, options?: any | undefined | null): Promise<PageOutcome>
41
+ listRelationshipRecords(recordRoute: string, recordIdentifier: string, pathRoute: string, options?: any | undefined | null): Promise<PageOutcome>
42
42
  continueRelationshipList(value: any): Promise<PageOutcome>
43
- lookupRecord(entityRoute: string, selector: string, values?: any | undefined | null, options?: any | undefined | null): Promise<CompleteOutcome>
44
- startProposal(binding: BRegActionBinding, inputsJson: string, key: string): Promise<BRegProposal>
43
+ lookupRecord(recordRoute: string, selector: string, values?: any | undefined | null, options?: any | undefined | null): Promise<CompleteOutcome>
44
+ startProposal(binding: BRegActionBinding, inputs: any, key: string): Promise<BRegProposal>
45
45
  readProposal(proposal: BRegProposal): Promise<BRegProposal>
46
46
  readProposalSubmission(proposal: BRegProposal, version: number): Promise<CompleteOutcome>
47
47
  getProposal(binding: BRegProposalGetBinding, id: string): Promise<BRegProposal>
@@ -53,8 +53,12 @@ export declare class BaseRegistryClient {
53
53
  readProposalReviewContextBatch(binding: BRegProposalReviewBinding, ids: Array<string>): Promise<CompleteOutcome>
54
54
  uploadProposalAttachment(proposal: BRegProposal, slot: string, contentType: string, bytes: Buffer, key: string): Promise<BRegProposal>
55
55
  deleteProposalAttachment(proposal: BRegProposal, slot: string, key: string): Promise<BRegProposal>
56
- listProposals(collection: BRegProposalCollection, queryJson: string): Promise<ProposalPage>
57
- prepareProposal(proposal: BRegProposal, operation: string, bodyJson: string, key: string): BRegPreparedProposal
56
+ listProposals(collection: BRegProposalCollection, query: any): Promise<ProposalPage>
57
+ prepareProposal(proposal: BRegProposal, operation: string, body: any, key: string): BRegPreparedProposal
58
+ /** Prepare a transition from exact JSON through the same lifecycle authority. */
59
+ prepareProposalJson(proposal: BRegProposal, operation: string, bodyJson: string, key: string): BRegPreparedProposal
60
+ /** List through the same metadata-selected collection with an exact JSON query. */
61
+ listProposalsJson(collection: BRegProposalCollection, queryJson: string): Promise<ProposalPage>
58
62
  recoverProposal(proposal: BRegProposal, attempt: BRegPreparedProposal): BRegPreparedProposal
59
63
  executeProposal(attempt: BRegPreparedProposal): Promise<BRegProposal>
60
64
  /** Fetch opaque target conditions for one metadata-selected action. */
@@ -105,42 +109,42 @@ export declare class BaseRegistryClient {
105
109
  * run request names the access profile, which the client selects for the
106
110
  * exchange.
107
111
  */
108
- createIngestionRun(entityRoute: string, request: any): Promise<CompleteOutcome>
109
- /** Read one bounded page of ingestion runs for one entity route. */
110
- listIngestionRuns(entityRoute: string, query?: any | undefined | null): Promise<CompleteOutcome>
112
+ createIngestionRun(recordRoute: string, request: any): Promise<CompleteOutcome>
113
+ /** Read one bounded page of ingestion runs for one record route. */
114
+ listIngestionRuns(recordRoute: string, query?: any | undefined | null): Promise<CompleteOutcome>
111
115
  /** Read the current durable state of one ingestion run. */
112
- readIngestionRun(entityRoute: string, runId: string, accessProfile?: string | undefined | null): Promise<CompleteOutcome>
116
+ readIngestionRun(recordRoute: string, runId: string, accessProfile?: string | undefined | null): Promise<CompleteOutcome>
113
117
  /**
114
118
  * Submit one bounded chunk of an open ingestion run under the run's
115
119
  * access profile. A resubmitted chunk replays its retained receipt
116
120
  * instead of executing twice.
117
121
  */
118
- submitIngestionChunk(entityRoute: string, runId: string, chunk: BRegIngestionChunk, profileId: string): Promise<CompleteOutcome>
122
+ submitIngestionChunk(recordRoute: string, runId: string, chunk: BRegIngestionChunk, profileId: string): Promise<CompleteOutcome>
119
123
  /** Cancel an open ingestion run. Committed chunks stay committed. */
120
- cancelIngestionRun(entityRoute: string, runId: string, accessProfile?: string | undefined | null): Promise<CompleteOutcome>
124
+ cancelIngestionRun(recordRoute: string, runId: string, accessProfile?: string | undefined | null): Promise<CompleteOutcome>
121
125
  /**
122
126
  * Read the retained receipt of one committed chunk under the run's
123
127
  * access profile. An erased receipt answers with the
124
128
  * `ingestion.receipt_erased` problem instead.
125
129
  */
126
- ingestionChunkReceipt(entityRoute: string, runId: string, chunkIndex: number, profileId: string): Promise<CompleteOutcome>
130
+ ingestionChunkReceipt(recordRoute: string, runId: string, chunkIndex: number, profileId: string): Promise<CompleteOutcome>
127
131
  /** Tombstone one record against its current strong ETag. */
128
132
  tombstoneRecord(binding: BRegTombstoneBinding, recordIdentifier: string, etag: string, idempotencyKey: string, formatValue?: string | undefined | null): Promise<CompleteOutcome>
129
- getRecordJson(entityRoute: string, recordIdentifier: string, options?: any | undefined | null): Promise<JsonOutcome>
130
- listRecordsJson(entityRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
133
+ getRecordJson(recordRoute: string, recordIdentifier: string, options?: any | undefined | null): Promise<JsonOutcome>
134
+ listRecordsJson(recordRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
131
135
  continueListJson(value: any): Promise<JsonOutcome>
132
- getGeoJsonRecordJson(entityRoute: string, recordIdentifier: string, options?: any | undefined | null): Promise<JsonOutcome>
133
- listGeoJsonRecordsJson(entityRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
136
+ getGeoJsonRecordJson(recordRoute: string, recordIdentifier: string, options?: any | undefined | null): Promise<JsonOutcome>
137
+ listGeoJsonRecordsJson(recordRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
134
138
  continueGeoJsonListJson(value: any): Promise<JsonOutcome>
135
- listCurrentRecordsJson(entityRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
139
+ listCurrentRecordsJson(recordRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
136
140
  continueCurrentListJson(value: any): Promise<JsonOutcome>
137
- listRecordsAsOfJson(entityRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
141
+ listRecordsAsOfJson(recordRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
138
142
  continueAsOfListJson(value: any): Promise<JsonOutcome>
139
- listSnapshotRecordsJson(entityRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
143
+ listSnapshotRecordsJson(recordRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
140
144
  continueSnapshotListJson(value: any): Promise<JsonOutcome>
141
- listRelationshipRecordsJson(entityRoute: string, recordIdentifier: string, pathRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
145
+ listRelationshipRecordsJson(recordRoute: string, recordIdentifier: string, pathRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
142
146
  continueRelationshipListJson(value: any): Promise<JsonOutcome>
143
- lookupRecordJson(entityRoute: string, selector: string, valuesJson?: string | undefined | null, options?: any | undefined | null): Promise<JsonOutcome>
147
+ lookupRecordJson(recordRoute: string, selector: string, valuesJson?: string | undefined | null, options?: any | undefined | null): Promise<JsonOutcome>
144
148
  /** Fetch opaque target conditions from exact action-input JSON. */
145
149
  actionTargetConditionsJson(binding: BRegActionBinding, inputsJson: string): Promise<BRegActionTargetConditions>
146
150
  /** Read field-guard availability from exact action-input JSON. */
@@ -2,12 +2,12 @@
2
2
  "schemaVersion": "registry-stack.sdk-compatibility.v1",
3
3
  "sdkPackage": {
4
4
  "name": "registry-stack-client",
5
- "version": "0.44.0"
5
+ "version": "0.46.0"
6
6
  },
7
7
  "namespaces": {
8
8
  "discovery": {
9
- "testedServerBaseline": "0.44.0",
10
- "compatibleServerPatchLine": "0.44.x",
9
+ "testedServerBaseline": "0.46.0",
10
+ "compatibleServerPatchLine": "0.46.x",
11
11
  "responseCompatibility": {
12
12
  "additiveObjectMembers": "ignored-after-duplicate-key-rejection",
13
13
  "unknownProblemCodes": "http-status-only",
@@ -69,6 +69,14 @@ export interface StepStatus {
69
69
  failureCode?: string | null
70
70
  /** Where a refused call input left its operation contract, as an RFC 6901 pointer that names no value. */
71
71
  failurePath?: string | null
72
+ /** What a person needs to clear a hold: for `in-force-ambiguous`, the two records in force and the date. */
73
+ holdDetail?: HoldDetail
74
+ }
75
+
76
+ /** The records and date behind a held step. */
77
+ export interface HoldDetail {
78
+ date: string
79
+ recordIdentifiers: string[]
72
80
  }
73
81
 
74
82
  export type RetryBlockReason =
@@ -115,6 +123,19 @@ export interface EffectStatus {
115
123
  operationRevision: string
116
124
  state: EffectState
117
125
  }
126
+ /**
127
+ * The latest answered read of a followed BReg Proposal. It carries no
128
+ * Proposal input and names no person. `stateSince` is when Coordinator first
129
+ * saw the current state and turn, not when BReg entered it.
130
+ */
131
+ export interface LastObservation {
132
+ state: string
133
+ turn?: string
134
+ submissionVersion: SafeInteger
135
+ handoffRefusal?: string
136
+ observedAt: Instant
137
+ stateSince: Instant
138
+ }
118
139
  export interface WaitStatus {
119
140
  step: string
120
141
  acceptedStep: string
@@ -126,6 +147,10 @@ export interface WaitStatus {
126
147
  minimumIntervalSeconds: SafeInteger
127
148
  observations: SafeInteger
128
149
  observationLimit: SafeInteger
150
+ /** What the latest answered read of a followed BReg Proposal showed. */
151
+ lastObservation?: LastObservation
152
+ /** The operator's "Open the request" link, when the deployment configures one. */
153
+ requestLink?: string
129
154
  }
130
155
 
131
156
  export interface RunInspection {
@@ -146,6 +171,9 @@ export type RunListState =
146
171
  | 'attention'
147
172
  | 'cancel-requested'
148
173
 
174
+ /** Whose turn a followed BReg Proposal showed at its last answered read. */
175
+ export type ProposalTurn = 'party' | 'official' | 'nobody'
176
+
149
177
  /** One stable page of runs the caller may read, newest admission first. */
150
178
  export interface RunList { runs: ReadonlyArray<RunStatus>; nextCursor?: string }
151
179
 
@@ -199,10 +227,15 @@ export class CoordinatorClient {
199
227
  reconcile(token: string, runId: RunId, reason: string): Promise<CoordinatorOutcome<RunInspection>>
200
228
  /**
201
229
  * Read one stable page of caller-visible runs. Pass `nextCursor` unchanged
202
- * with the same caller, `state`, and `attention` values. `attention: true`
203
- * selects the effective states `attention` and `failed`.
230
+ * with the same caller, `state`, `attention`, `proposal`, `turn`, and
231
+ * `outcome` values. `attention: true` selects the effective states
232
+ * `attention` and `failed`. `proposal` selects runs waiting on that BReg
233
+ * Proposal; `turn` selects runs whose Proposal wait last showed that turn.
234
+ * `outcome` selects runs that finished with that workflow outcome, matched
235
+ * exactly; it is 1 to 64 letters, digits, hyphens or underscores, checked
236
+ * before sending.
204
237
  */
205
- list(token: string, limit: SafeInteger, cursor?: string | null, state?: RunListState | null, attention?: boolean | null): Promise<CoordinatorOutcome<RunList>>
238
+ list(token: string, limit: SafeInteger, cursor?: string | null, state?: RunListState | null, attention?: boolean | null, proposal?: string | null, turn?: ProposalTurn | null, outcome?: string | null): Promise<CoordinatorOutcome<RunList>>
206
239
  /**
207
240
  * Schedule the run's saved command again, unchanged, when its inspection
208
241
  * allows a retry. Takes no idempotency key, so it is sent exactly once. `reason` is
@@ -8,7 +8,7 @@ export declare class CoordinatorClient {
8
8
  status(token: string, runId: import('./client').RunId): Promise<import('./client').CoordinatorOutcome<import('./client').RunStatus>>
9
9
  inspect(token: string, runId: import('./client').RunId): Promise<import('./client').CoordinatorOutcome<import('./client').RunInspection>>
10
10
  reconcile(token: string, runId: import('./client').RunId, reason: string): Promise<import('./client').CoordinatorOutcome<import('./client').RunInspection>>
11
- list(token: string, limit: number, cursor?: string | null, state?: import('./client').RunListState | null, attention?: boolean | null): Promise<import('./client').CoordinatorOutcome<import('./client').RunList>>
11
+ list(token: string, limit: number, cursor?: string | null, state?: import('./client').RunListState | null, attention?: boolean | null, proposal?: string | null, turn?: import('./client').ProposalTurn | null, outcome?: string | null): Promise<import('./client').CoordinatorOutcome<import('./client').RunList>>
12
12
  retrySame(token: string, runId: import('./client').RunId, reason: string): Promise<import('./client').CoordinatorOutcome<import('./client').RetryScheduled>>
13
13
  cancel(token: string, runId: import('./client').RunId, reason: string): Promise<import('./client').CoordinatorOutcome<import('./client').RunStatus>>
14
14
  }
@@ -30,6 +30,39 @@ import {
30
30
  /** The signed response encoding closed before one request is sent. */
31
31
  export type EvidenceResponseFormat = 'signed-jws' | 'sd-jwt-vc'
32
32
 
33
+ /**
34
+ * How an assertion's facts were obtained. `source` means Evidence acquired
35
+ * them itself from an authoritative source; `holder-presented` means a holder
36
+ * presented another issuer's credential and Evidence verified it. A request
37
+ * accepts `source` only unless it names more in `acceptedChannels`.
38
+ */
39
+ export type EvidenceChannel = 'source' | 'holder-presented'
40
+
41
+ /**
42
+ * The channel policy a request or request batch may state. Both members are
43
+ * optional: absent `acceptedChannels` means `['source']` only, so a request
44
+ * that never names a channel refuses an assertion a holder presented, and
45
+ * absent `maximumCredentialAgeSeconds` means no credential age bound, which
46
+ * applies to `holder-presented` assertions only.
47
+ */
48
+ export interface EvidenceChannelPolicy {
49
+ acceptedChannels?: ReadonlyArray<EvidenceChannel>
50
+ maximumCredentialAgeSeconds?: number
51
+ }
52
+
53
+ /**
54
+ * What a `holder-presented` assertion states about the credential the holder
55
+ * presented: the `presentedCredential` member of a verified `evidence`, present
56
+ * if and only if its `channel` is `holder-presented`.
57
+ */
58
+ export interface PresentedCredential {
59
+ readonly trustEntry: string
60
+ readonly issuer: string
61
+ readonly type: string
62
+ readonly issuedAt: string
63
+ readonly subjectLink: 'possession' | 'attribute-match'
64
+ }
65
+
33
66
  /** An opaque, versioned subject-continuity receipt owned by the application. */
34
67
  export interface SubjectBindingReceipt {
35
68
  readonly schema: 'registry.evidence-subject-binding-receipt/v1'
@@ -73,7 +106,7 @@ export type ProgressiveResult =
73
106
  | ({ readonly responseFormat: 'sd-jwt-vc' } & ProgressiveVerifiedAudienceScopedCredential)
74
107
 
75
108
  export type AudienceScopedRequest = {
76
- requirement: string
109
+ handle: string
77
110
  responseFormat?: EvidenceResponseFormat
78
111
  /** One request-origin subject. Node keeps the selector map explicit. */
79
112
  selectors?: Readonly<Record<string, string | number | boolean>>
@@ -81,6 +114,10 @@ export type AudienceScopedRequest = {
81
114
  subjects?: Readonly<Record<string, Readonly<Record<string, string | number | boolean>>>>
82
115
  /** A prior receipt the application chose to retain. Nothing is persisted by this package. */
83
116
  bindingReceipt?: SubjectBindingReceipt
117
+ /** See `EvidenceChannelPolicy`. Absent means `source` only. */
118
+ acceptedChannels?: ReadonlyArray<EvidenceChannel>
119
+ /** See `EvidenceChannelPolicy`. Absent means no credential age bound. */
120
+ maximumCredentialAgeSeconds?: number
84
121
  }
85
122
 
86
123
  /**
@@ -296,6 +333,10 @@ export interface EvidenceRequestSpec {
296
333
  expectedOutputs: ReadonlyArray<Readonly<Record<string, unknown>>>
297
334
  maximumAssertionLifetimeSeconds: number
298
335
  clockSkewSeconds: number
336
+ /** See `EvidenceChannelPolicy`. Absent means `source` only. */
337
+ acceptedChannels?: ReadonlyArray<EvidenceChannel>
338
+ /** See `EvidenceChannelPolicy`. Absent means no credential age bound. */
339
+ maximumCredentialAgeSeconds?: number
299
340
  subjectExpectations:
300
341
  | 'acceptFirstUse'
301
342
  | { pinned: ReadonlyArray<{ role: string; binding: string }> }
@@ -329,22 +370,26 @@ export interface EvidenceRequestBatchSpec {
329
370
  expectedOutputs: ReadonlyArray<Readonly<Record<string, unknown>>>
330
371
  maximumAssertionLifetimeSeconds: number
331
372
  clockSkewSeconds: number
373
+ /** See `EvidenceChannelPolicy`. Absent means `source` only. */
374
+ acceptedChannels?: ReadonlyArray<EvidenceChannel>
375
+ /** See `EvidenceChannelPolicy`. Absent means no credential age bound. */
376
+ maximumCredentialAgeSeconds?: number
332
377
  items: ReadonlyArray<EvidenceRequestBatchItemSpec>
333
378
  }
334
379
 
335
380
  /**
336
- * The stable eight-kind error envelope every mapped Evidence Node failure
381
+ * The stable ten-kind error envelope every mapped Evidence Node failure
337
382
  * carries, as properties on a thrown `Error` (see `src/lib.rs`'s
338
383
  * `to_napi_error` and `src/convert.rs`'s `map_client_error` for the Rust side
339
384
  * of this contract).
340
385
  *
341
386
  * `kind` is always present. The rest are present only when the underlying
342
387
  * failure carries them:
343
- * - `status`: `denied`, `protocol`, and any `token` failure whose `tokenKind`
388
+ * - `status`: `denied`, `invalid-request`, `unavailable`, `protocol`, and any `token` failure whose `tokenKind`
344
389
  * is `protocol`
345
- * - `code`: `denied`, `protocol` (optional), `verification`, and any `token`
390
+ * - `code`: `denied`, `invalid-request`, `unavailable`, `protocol` (optional), `verification`, and any `token`
346
391
  * failure whose `tokenKind` is `refused`
347
- * - `traceId`: `denied`, `not-available`, `protocol` (all optional)
392
+ * - `traceId`: `denied`, `not-available`, `invalid-request`, `unavailable`, `protocol` (all optional)
348
393
  * - `retryAfterSeconds`: `denied`, `protocol` (both optional)
349
394
  * - `transportKind`: `transport`, and any `token` failure whose `tokenKind`
350
395
  * is `transport`
@@ -9,7 +9,7 @@
9
9
  const native = require('./index');
10
10
 
11
11
  /**
12
- * The stable eight-kind error envelope every mapped Evidence Node failure
12
+ * The stable ten-kind error envelope every mapped Evidence Node failure
13
13
  * carries (see `crates/registry-evidence-client-node/src/convert.rs`'s
14
14
  * `map_client_error`), as properties on a thrown `Error` rather than as JSON
15
15
  * text a caller has to `JSON.parse` out of `.message`.
@@ -45,7 +45,7 @@ class EvidenceClientError extends Error {
45
45
  * serialization defect, a caught panic, napi's own argument-type checking)
46
46
  * throws a plain, non-JSON reason instead, and is left exactly as thrown:
47
47
  * only a recognized envelope becomes an `EvidenceClientError`, so a caller
48
- * cannot mistake "some other native failure" for one of the eight stable
48
+ * cannot mistake "some other native failure" for one of the ten stable
49
49
  * kinds.
50
50
  */
51
51
  function normalize(error) {
@@ -56,7 +56,7 @@ export declare class EvidenceClient {
56
56
  * a multi-subject request batch. No I/O happens here, and the returned
57
57
  * opaque batch is good for exactly one exchange.
58
58
  */
59
- prepareBatch(spec: { requirement: string; purpose: string; audience: string; evidenceType: string; issuedBy: string; providedBy: string; configurationRevision: string; expectedAssuranceProfile: any; expectedOutputs: ReadonlyArray<Readonly<Record<string, any>>>; maximumAssertionLifetimeSeconds: number; clockSkewSeconds: number; items: ReadonlyArray<{ subjects: ReadonlyArray<{ role: string; selectorProfile: string; selectorValues?: Readonly<Record<string, string | number | boolean>> | null }>; subjectExpectations: 'acceptFirstUse' | { pinned: ReadonlyArray<{ role: string; binding: string }> } }> }): PreparedEvidenceRequestBatch
59
+ prepareBatch(spec: { requirement: string; purpose: string; audience: string; evidenceType: string; issuedBy: string; providedBy: string; configurationRevision: string; expectedAssuranceProfile: any; expectedOutputs: ReadonlyArray<Readonly<Record<string, any>>>; maximumAssertionLifetimeSeconds: number; clockSkewSeconds: number; acceptedChannels?: ReadonlyArray<'source' | 'holder-presented'>; maximumCredentialAgeSeconds?: number; items: ReadonlyArray<{ subjects: ReadonlyArray<{ role: string; selectorProfile: string; selectorValues?: Readonly<Record<string, string | number | boolean>> | null }>; subjectExpectations: 'acceptFirstUse' | { pinned: ReadonlyArray<{ role: string; binding: string }> } }> }): PreparedEvidenceRequestBatch
60
60
  /**
61
61
  * Read the request shapes this requester is entitled to send. Discovery
62
62
  * is authoring input, not a trust anchor: it never supplies verification
@@ -275,7 +275,11 @@ export type SubjectContinuity =
275
275
  * opaque.
276
276
  */
277
277
  export interface VerifiedEvidence {
278
- /** The verified payload, serialized field for field with no hand mapping. */
278
+ /**
279
+ * The verified payload, serialized field for field with no hand mapping.
280
+ * Its `channel` is `source` or `holder-presented`, and a
281
+ * `holder-presented` payload also carries `presentedCredential`.
282
+ */
279
283
  evidence: any
280
284
  /**
281
285
  * The validated W3C trace identifier for the exchange that produced this
package/native.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const PACKAGE_VERSION = '0.44.0';
3
+ const PACKAGE_VERSION = '0.46.0';
4
4
  const PRODUCTS = new Set(["breg", "casework", "coordinator", "discovery", "evidence", "messaging", "scheduling"]);
5
5
 
6
6
  function target() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@registrystack/client",
3
- "version": "0.44.0",
3
+ "version": "0.46.0",
4
4
  "description": "Unified Node.js client for Registry Stack products.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://docs.registrystack.org/reference/client-api/",
@@ -68,8 +68,8 @@
68
68
  "typescript": "6.0.3"
69
69
  },
70
70
  "optionalDependencies": {
71
- "@registrystack/client-darwin-arm64": "0.44.0",
72
- "@registrystack/client-linux-arm64-gnu": "0.44.0",
73
- "@registrystack/client-linux-x64-gnu": "0.44.0"
71
+ "@registrystack/client-darwin-arm64": "0.46.0",
72
+ "@registrystack/client-linux-arm64-gnu": "0.46.0",
73
+ "@registrystack/client-linux-x64-gnu": "0.46.0"
74
74
  }
75
75
  }