@capxul/sdk 4.2.0-rc.12 → 4.2.0-rc.14

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.
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "source": {
3
- "commit": "fd5b4d0f124c75f609e469b8673c61f84253c0dc",
4
- "tree": "d61f0f6b0c83dfc2d405ffc6b55eecf2e9d80f2d",
3
+ "commit": "ad9386dd8d539fea17964d05292fc0ca16495d2f",
4
+ "tree": "87b1723ed13d7be72487cbcbbfded24b0ac850e5",
5
5
  "branch": "codex/programme-rc",
6
6
  "repository": "https://github.com/Xelmar-tech/infrastructure",
7
7
  "lockfileSha256": "5870f53b72706d103220c1bcf733cb4fb71196aea32a9cfbdc277d73cc959264"
8
8
  },
9
9
  "name": "@capxul/sdk",
10
- "version": "4.2.0-rc.12"
10
+ "version": "4.2.0-rc.14"
11
11
  }
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { $ as PayrollGroupId, B as ChainId, Ct as ChainCause, D as Account, Dt as RevertSummary, E as CAPXUL_PAYMENTS_V2_ADDRESS, Et as FailureMode, F as AssetId, G as EVM_ADDRESS_RE, H as CurrencyCode, I as AuthSession, J as Handle, L as AuthUserId, O as AccountId, P as AssetAmount, St as CHAIN_UPSTREAMS, Tt as FAILURE_MODES, V as CountryCode, X as OrgId, Y as Money, Z as PartyId, _ as Session, _t as CapxulErrorCode, a as Eip1193RequestProvider, at as RoleKey, c as injectedWalletSigner, ct as TesterKind, d as AccountRequirement, dt as toAddress, et as PayrollRunId, f as Eip1193Provider, ft as toCountryCode, g as Profile, gt as CapxulError, h as CapxulResult, ht as CAPXUL_ERROR_CODES, i as CapxulSigner, k as Address, l as AccountProvider, m as localPrivateKeyAccountProvider, mt as toPartyId, o as SignerStatus, p as eip1193AccountProvider, pt as toHandle, r as CapxulDigestSigner, s as SignerStatusStore, u as AccountProviderSource, v as SmartAccount, vt as CapxulErrorDetails, wt as ChainUpstream, xt as isCapxulError, yt as Errors, z as BudgetId } from "./OAuthBearerAuthClient-C-ip-z8M.mjs";
2
- import { $ as OrganizationPaymentBatchInput, $n as RequestStatus, $t as Destination, A as OrgScopedMethods, An as Ref, At as AddressBookAddInput, B as AuthorizeRunOptions, Bn as SmartAccountMethods, Bt as ActivityFilter, C as CurrentUserMethods, Cn as PaymentMoney, Ct as AccountMethods, D as MemberStatus, Dn as PaymentsMethods, Dt as ActorRequest, E as InviteMemberInput, En as PaymentType, Et as ActorRelationshipMethods, F as ResendInviteTokenInput, Fn as AccountLifecycle, Ft as InboxItem, G as PayrollGroupsMethods, Gn as ActorRef, Gt as ActivityPage, H as PayrollGroup, Hn as OrgLifecycle, Ht as ActivityKind, I as RoleDefinition, In as AccountSetupStep, It as InboxMethods, J as PayrollRun, Jn as SubmittedPermissionExecution, Jt as ActivitySummary, K as PayrollMethods, Kn as CurrentHoldings, Kt as ActivityRange, L as RoleSpendCap, Ln as isSettingUpLifecycle, Lt as ActivityAnnotation, M as OrgView, Mn as TargetReference, Mt as AddressBookLabelInput, N as OrganizationAccount, Nn as TargetsMethods, Nt as AddressBookMethods, O as MemberView, On as PaymentsPayInput, Ot as ActorRequestIssueInput, P as OrganizationAuditLogItem, Pn as fingerprintPaymentIntent, Pt as InboxApproveInput, Q as PayrollTermsUnit, Qn as PaymentStatus$1, Qt as DepositInstructions, R as RoleView, Rn as CompleteProfileInput, Rt as ActivityAnnotationInput, S as CurrentUserContext, Sn as PaymentDocumentsMethods, St as ReadyAccountLifecycle, T as DetectPendingOrgInvitationsResult, Tn as PaymentTiming, Tt as ActorProfileMethods, U as PayrollGroupInput, Un as OrgSetupStep, Ut as ActivityListParams, V as PayrollEngagementTerms, Vn as AuthMethods, Vt as ActivityItem, W as PayrollGroupMember, Wn as PayoutAddress, Wt as ActivityMethods, X as PayrollRunStatus, Xn as PAYMENT_DIRECTIONS, Xt as ActivitySummaryTotal, Y as PayrollRunItemInput, Yn as InboxStatus, Yt as ActivitySummaryParams, Z as PayrollRuns, Zn as PAYMENT_STATUSES, Zt as ActorReference, _ as HoldingsMethods, _n as PaymentDirection, _t as OnboardingMethods, a as ObservationContext, an as DestinationRemoveInput, ar as IdentityEvent, at as PermissionCreateInput, b as SystemHealth, bn as PaymentDocumentRender, bt as PersonOnboarding, c as HostObservability, cn as MeMethods, cr as Readiness, ct as PermissionReplaceInput, d as postHogObservability, dn as OfframpMethods, dr as isClaimed, dt as Budget, en as DestinationAddInput, et as OrganizationPaymentInput, f as CapxulClient, fn as OfframpQuote, fr as isRestoring, ft as OrgMe, g as IdentityRuntimeSendResult, gn as PaymentActivityEvidence, gt as CompletedPersonProfile, h as IdentityRuntime, hn as Payment, ht as AccountsMethods, i as ObservationAdapter, in as DestinationRail, ir as Destination$1, it as PermissionChangeInput, j as OrgTemplate, jn as ResolvedTarget, jt as AddressBookEntry, k as OrgMethods, kn as RecipientResolution, kt as ActorRequestsMethods, l as PostHogObservabilityClient, ln as MeProfile, lr as StateLabel, lt as PermissionRevokeInput, m as IdentityProfileDetails, mn as OfframpStatus, mr as InvocationControls, mt as OrgMeOptions, nn as DestinationListInput, nt as OrganizationPaymentsMethods, o as ObservationDelivery, on as DestinationsMethods, or as IdentityState, ot as PermissionMethods, p as CreateCapxulClientInput, pn as OfframpQuoteInput, pr as IdentityTransition, pt as OrgMeMethod, q as PayrollOptions, qn as Permission, qt as ActivityReference, r as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, rn as DestinationPayload, rr as TelemetryPort, rt as PermissionAssignInput, s as SdkFailureObservation, sn as FinancialOpsMethods, sr as OrgLane, st as PermissionOptions, t as CapxulClientInput, tn as DestinationKind, tt as OrganizationPaymentItemInput, u as PostHogObservabilityOptions, un as MovementActivityEvidence, ur as destination, ut as PermissionReadResult, v as Holding, vn as PaymentDocumentKind, vt as OrganizationOnboarding, w as CreateOrgInput, wn as PaymentStatus, wt as ActorProfile, x as MediaMethods, xn as PaymentDocumentVerification, xt as PersonOnboardingInput, y as SystemMethods, yn as PaymentDocumentRef, yt as OrganizationOnboardingInput, z as AuthorizeRunInput, zn as IdentityMethods, zt as ActivityDetail } from "./production-Cpz4hm8p.mjs";
2
+ import { $ as OrganizationPaymentBatchInput, $n as RequestStatus, $t as Destination, A as OrgScopedMethods, An as Ref, At as AddressBookAddInput, B as AuthorizeRunOptions, Bn as SmartAccountMethods, Bt as ActivityFilter, C as CurrentUserMethods, Cn as PaymentMoney, Ct as AccountMethods, D as MemberStatus, Dn as PaymentsMethods, Dt as ActorRequest, E as InviteMemberInput, En as PaymentType, Et as ActorRelationshipMethods, F as ResendInviteTokenInput, Fn as AccountLifecycle, Ft as InboxItem, G as PayrollGroupsMethods, Gn as ActorRef, Gt as ActivityPage, H as PayrollGroup, Hn as OrgLifecycle, Ht as ActivityKind, I as RoleDefinition, In as AccountSetupStep, It as InboxMethods, J as PayrollRun, Jn as SubmittedPermissionExecution, Jt as ActivitySummary, K as PayrollMethods, Kn as CurrentHoldings, Kt as ActivityRange, L as RoleSpendCap, Ln as isSettingUpLifecycle, Lt as ActivityAnnotation, M as OrgView, Mn as TargetReference, Mt as AddressBookLabelInput, N as OrganizationAccount, Nn as TargetsMethods, Nt as AddressBookMethods, O as MemberView, On as PaymentsPayInput, Ot as ActorRequestIssueInput, P as OrganizationAuditLogItem, Pn as fingerprintPaymentIntent, Pt as InboxApproveInput, Q as PayrollTermsUnit, Qn as PaymentStatus$1, Qt as DepositInstructions, R as RoleView, Rn as CompleteProfileInput, Rt as ActivityAnnotationInput, S as CurrentUserContext, Sn as PaymentDocumentsMethods, St as ReadyAccountLifecycle, T as DetectPendingOrgInvitationsResult, Tn as PaymentTiming, Tt as ActorProfileMethods, U as PayrollGroupInput, Un as OrgSetupStep, Ut as ActivityListParams, V as PayrollEngagementTerms, Vn as AuthMethods, Vt as ActivityItem, W as PayrollGroupMember, Wn as PayoutAddress, Wt as ActivityMethods, X as PayrollRunStatus, Xn as PAYMENT_DIRECTIONS, Xt as ActivitySummaryTotal, Y as PayrollRunItemInput, Yn as InboxStatus, Yt as ActivitySummaryParams, Z as PayrollRuns, Zn as PAYMENT_STATUSES, Zt as ActorReference, _ as HoldingsMethods, _n as PaymentDirection, _t as OnboardingMethods, a as ObservationContext, an as DestinationRemoveInput, ar as IdentityEvent, at as PermissionCreateInput, b as SystemHealth, bn as PaymentDocumentRender, bt as PersonOnboarding, c as HostObservability, cn as MeMethods, cr as Readiness, ct as PermissionReplaceInput, d as postHogObservability, dn as OfframpMethods, dr as isClaimed, dt as Budget, en as DestinationAddInput, et as OrganizationPaymentInput, f as CapxulClient, fn as OfframpQuote, fr as isRestoring, ft as OrgMe, g as IdentityRuntimeSendResult, gn as PaymentActivityEvidence, gt as CompletedPersonProfile, h as IdentityRuntime, hn as Payment, ht as AccountsMethods, i as ObservationAdapter, in as DestinationRail, ir as Destination$1, it as PermissionChangeInput, j as OrgTemplate, jn as ResolvedTarget, jt as AddressBookEntry, k as OrgMethods, kn as RecipientResolution, kt as ActorRequestsMethods, l as PostHogObservabilityClient, ln as MeProfile, lr as StateLabel, lt as PermissionRevokeInput, m as IdentityProfileDetails, mn as OfframpStatus, mr as InvocationControls, mt as OrgMeOptions, nn as DestinationListInput, nt as OrganizationPaymentsMethods, o as ObservationDelivery, on as DestinationsMethods, or as IdentityState, ot as PermissionMethods, p as CreateCapxulClientInput, pn as OfframpQuoteInput, pr as IdentityTransition, pt as OrgMeMethod, q as PayrollOptions, qn as Permission, qt as ActivityReference, r as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, rn as DestinationPayload, rr as TelemetryPort, rt as PermissionAssignInput, s as SdkFailureObservation, sn as FinancialOpsMethods, sr as OrgLane, st as PermissionOptions, t as CapxulClientInput, tn as DestinationKind, tt as OrganizationPaymentItemInput, u as PostHogObservabilityOptions, un as MovementActivityEvidence, ur as destination, ut as PermissionReadResult, v as Holding, vn as PaymentDocumentKind, vt as OrganizationOnboarding, w as CreateOrgInput, wn as PaymentStatus, wt as ActorProfile, x as MediaMethods, xn as PaymentDocumentVerification, xt as PersonOnboardingInput, y as SystemMethods, yn as PaymentDocumentRef, yt as OrganizationOnboardingInput, z as AuthorizeRunInput, zn as IdentityMethods, zt as ActivityDetail } from "./production-DuSjYRk4.mjs";
3
3
  import { Hex } from "viem";
4
4
  import { Effect, Layer } from "effect";
5
5
  //#region ../errors/src/index.d.ts
@@ -125,6 +125,8 @@ declare const CAPXUL_OPERATIONS: {
125
125
  readonly cancelRequest: "financialOps.cancelRequest";
126
126
  readonly createPayee: "financialOps.createPayee";
127
127
  readonly declineRequest: "financialOps.declineRequest";
128
+ readonly emitInvoiceIssued: "financialOps.emitInvoiceIssued";
129
+ readonly emitInvoiceRequestTransitioned: "financialOps.emitInvoiceRequestTransitioned";
128
130
  readonly emitPaymentWriterTelemetry: "financialOps.emitPaymentWriterTelemetry";
129
131
  readonly issueRequest: "financialOps.issueRequest";
130
132
  readonly recoverSettlementVerification: "financialOps.recoverSettlementVerification";
@@ -135,6 +137,9 @@ declare const CAPXUL_OPERATIONS: {
135
137
  readonly current: "holdings.current";
136
138
  readonly primary: "holdings.primary";
137
139
  };
140
+ readonly indexer: {
141
+ readonly reconcile: "indexer.reconcile";
142
+ };
138
143
  readonly identity: {
139
144
  readonly accountAt: "identity.AccountAt";
140
145
  readonly accountClaimed: "identity.AccountClaimed";
@@ -226,6 +231,7 @@ declare const CAPXUL_OPERATIONS: {
226
231
  readonly createOrg: "org.createOrg";
227
232
  readonly create: "org.create";
228
233
  readonly detectAndAcceptPendingInvitations: "org.detectAndAcceptPendingInvitations";
234
+ readonly emitInviteProgressed: "org.emitInviteProgressed";
229
235
  readonly expireInvitations: "org.expireInvitations";
230
236
  readonly getLifecycle: "org.getLifecycle";
231
237
  readonly getProofReceipt: "org.getProofReceipt";
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as signerFailure, B as isRestoring, C as normalizeExceptionErrorKind, E as safeExceptionLabel, F as CAPXUL_OPERATIONS, I as isCapxulOperation, L as normalizeCapxulOperation, M as PAYMENT_DIRECTIONS, N as PAYMENT_STATUSES, O as isSettingUpLifecycle, R as destination, S as SDK_VERSION, T as projectSdkException, _ as fingerprintPaymentIntent, b as failureDetail, d as embeddedSigner, f as openfortEmbeddedSigner, g as devPrivateKeySigner, h as deriveDevPrivateKey, j as resolveFailureMode, k as injectedWalletSigner, m as openfortEmbeddedWalletPort, p as openfortEmbeddedSignerFromWallet, r as postHogObservability, t as createCapxulClient$1, w as normalizeExceptionOperation, x as EXCEPTION_MESSAGE, y as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, z as isClaimed } from "./production-C8FuAYm1.mjs";
1
+ import { A as signerFailure, B as isRestoring, C as normalizeExceptionErrorKind, E as safeExceptionLabel, F as CAPXUL_OPERATIONS, I as isCapxulOperation, L as normalizeCapxulOperation, M as PAYMENT_DIRECTIONS, N as PAYMENT_STATUSES, O as isSettingUpLifecycle, R as destination, S as SDK_VERSION, T as projectSdkException, _ as fingerprintPaymentIntent, b as failureDetail, d as embeddedSigner, f as openfortEmbeddedSigner, g as devPrivateKeySigner, h as deriveDevPrivateKey, j as resolveFailureMode, k as injectedWalletSigner, m as openfortEmbeddedWalletPort, p as openfortEmbeddedSignerFromWallet, r as postHogObservability, t as createCapxulClient$1, w as normalizeExceptionOperation, x as EXCEPTION_MESSAGE, y as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, z as isClaimed } from "./production-C2EwEcoX.mjs";
2
2
  import { A as currencySymbolFor, B as toCurrencyCode, G as toHandle, M as toAddress, T as EVM_ADDRESS_RE, Y as toPartyId, at as HANDLE_RE, b as configuredMoneyAssetById, ct as CapxulError, dt as isCapxulError, ft as CHAIN_UPSTREAMS, g as CAPXUL_PAYMENTS_V2_ADDRESS, k as assetIdFor, pt as FAILURE_MODES, st as CAPXUL_ERROR_CODES, ut as Errors, z as toCountryCode } from "./OAuthBearerAuthClient-CbU_W9Sp.mjs";
3
3
  import { formatUnits } from "viem";
4
4
  import { Effect } from "effect";
@@ -493,6 +493,8 @@ const CAPXUL_OPERATIONS = {
493
493
  cancelRequest: "financialOps.cancelRequest",
494
494
  createPayee: "financialOps.createPayee",
495
495
  declineRequest: "financialOps.declineRequest",
496
+ emitInvoiceIssued: "financialOps.emitInvoiceIssued",
497
+ emitInvoiceRequestTransitioned: "financialOps.emitInvoiceRequestTransitioned",
496
498
  emitPaymentWriterTelemetry: "financialOps.emitPaymentWriterTelemetry",
497
499
  issueRequest: "financialOps.issueRequest",
498
500
  recoverSettlementVerification: "financialOps.recoverSettlementVerification",
@@ -503,6 +505,7 @@ const CAPXUL_OPERATIONS = {
503
505
  current: "holdings.current",
504
506
  primary: "holdings.primary"
505
507
  },
508
+ indexer: { reconcile: "indexer.reconcile" },
506
509
  identity: {
507
510
  accountAt: "identity.AccountAt",
508
511
  accountClaimed: "identity.AccountClaimed",
@@ -592,6 +595,7 @@ const CAPXUL_OPERATIONS = {
592
595
  createOrg: "org.createOrg",
593
596
  create: "org.create",
594
597
  detectAndAcceptPendingInvitations: "org.detectAndAcceptPendingInvitations",
598
+ emitInviteProgressed: "org.emitInviteProgressed",
595
599
  expireInvitations: "org.expireInvitations",
596
600
  getLifecycle: "org.getLifecycle",
597
601
  getProofReceipt: "org.getProofReceipt",
@@ -1411,6 +1415,26 @@ const MovementScanIncidentProps = Schema.Struct({
1411
1415
  incident_kind: Schema.String,
1412
1416
  anchor_block_number: Schema.Number
1413
1417
  });
1418
+ /**
1419
+ * One durable row the reconciliation job corrected against Ponder (SPEC D9).
1420
+ *
1421
+ * Both block fields are optional and for the same reason: a correction INTO
1422
+ * drift (a Payment settled in Convex whose Ponder fact a reorg removed) has no
1423
+ * current block, and a correction that confirms a later fact has one.
1424
+ *
1425
+ * `projection_kind` is closed. A later ticket that reconciles a deploy, a
1426
+ * bootstrap or a grant outcome adds its kind here in the same change; an
1427
+ * unknown kind must not decode.
1428
+ */
1429
+ const IndexerDriftCorrectedProps = Schema.Struct({
1430
+ ...TelemetryEnvelopeProps,
1431
+ projection_kind: Schema.Literals(["member_authority", "payment_settlement"]),
1432
+ previous_state: Schema.String,
1433
+ current_state: Schema.String,
1434
+ previous_block: Schema.optional(Schema.Number),
1435
+ current_block: Schema.optional(Schema.Number),
1436
+ logical_event_id: Schema.optional(Schema.String)
1437
+ });
1414
1438
  Schema.Struct({
1415
1439
  name: Schema.Literal("auth_otp_requested"),
1416
1440
  props: AuthOtpRequestedProps
@@ -1615,6 +1639,10 @@ Schema.Struct({
1615
1639
  name: Schema.Literal("movement_scan_incident"),
1616
1640
  props: MovementScanIncidentProps
1617
1641
  });
1642
+ Schema.Struct({
1643
+ name: Schema.Literal("indexer_drift_corrected"),
1644
+ props: IndexerDriftCorrectedProps
1645
+ });
1618
1646
  /** The one spelling of "whose scope did this happen in" across every surface. */
1619
1647
  const ScopeKindSchema = Schema.Literals(["account", "organization"]);
1620
1648
  const AccountKindSchema = Schema.Literals(["personalSafe", "orgTreasury"]);
@@ -3212,6 +3240,13 @@ Schema.Struct({
3212
3240
  transfers: Schema.Array(TransferEvidenceSchema),
3213
3241
  requestCount: nonNegativeInteger("requestCount")
3214
3242
  });
3243
+ /**
3244
+ * `chainId:txHash:transactionLogOrdinal` — the indexer's own row id. The
3245
+ * ordinal is the position in the transaction's receipt logs, never the
3246
+ * block-global index that `eventLogIndex` carries.
3247
+ */
3248
+ const LOGICAL_EVENT_ID_RE = /^[1-9][0-9]{0,9}:0x[0-9a-f]{64}:(0|[1-9][0-9]{0,5})$/u;
3249
+ const LogicalEventIdSchema = Schema.String.pipe(Schema.refine((value) => LOGICAL_EVENT_ID_RE.test(value), { message: "must be chainId:txHash:transactionLogOrdinal" }));
3215
3250
  const VerifiedMoneyEvidenceCommonSchema = Schema.Struct({
3216
3251
  chainId: BaseSepoliaChainIdSchema,
3217
3252
  contractAddress: AddressSchema,
@@ -3220,7 +3255,17 @@ const VerifiedMoneyEvidenceCommonSchema = Schema.Struct({
3220
3255
  blockNumber: BlockNumberSchema,
3221
3256
  blockHash: Bytes32Schema,
3222
3257
  blockTimestamp: Uint48Schema,
3223
- eventLogIndex: LogIndexSchema
3258
+ /**
3259
+ * The block-global log index of the settled event, as
3260
+ * `eth_getTransactionReceipt` reports it. Both readers key on this value, and
3261
+ * the ledger de-duplicates a settlement on `(txHash, eventLogIndex)`.
3262
+ */
3263
+ eventLogIndex: LogIndexSchema,
3264
+ /**
3265
+ * The indexer row the fact was read from. Present only when the indexer
3266
+ * answered; the receipt-backed reader reads no row and sets nothing.
3267
+ */
3268
+ logicalEventId: Schema.optional(LogicalEventIdSchema)
3224
3269
  });
3225
3270
  const VerifiedPaymentEvidenceSchema = Schema.Struct({
3226
3271
  ...VerifiedMoneyEvidenceCommonSchema.fields,
@@ -5175,31 +5220,31 @@ function makeActorRelationshipMethods(deps) {
5175
5220
  reference: input.reference,
5176
5221
  ...input.memo === void 0 ? {} : { memo: input.memo },
5177
5222
  ...input.expiresAt === void 0 ? {} : { expiresAt: input.expiresAt }
5178
- }))), (request) => mapActorRequest(request, input.payer)), controls, CAPXUL_OPERATIONS.requests.issue, deps.runPromise);
5223
+ }))), (request) => mapActorRequest(request, input.payer)).pipe(Effect.tap(() => observeContactScope)), controls, CAPXUL_OPERATIONS.requests.issue, deps.runPromise);
5179
5224
  },
5180
5225
  list: (options) => {
5181
5226
  const controls = deps.invocationControls?.(options) ?? options;
5182
- return runPortEffect(mapReply(CAPXUL_OPERATIONS.requests.list, Effect.suspend(() => convexCall.query(fns.requestsList, copyInvocationObservation(controls, { actor }))), (requests) => requests.map((request) => mapActorRequest(request))), controls, CAPXUL_OPERATIONS.requests.list, deps.runPromise);
5227
+ return runPortEffect(mapReply(CAPXUL_OPERATIONS.requests.list, Effect.suspend(() => convexCall.query(fns.requestsList, copyInvocationObservation(controls, { actor }))), (requests) => requests.map((request) => mapActorRequest(request))).pipe(Effect.tap(() => observeContactScope)), controls, CAPXUL_OPERATIONS.requests.list, deps.runPromise);
5183
5228
  },
5184
5229
  get: (requestId, options) => {
5185
5230
  const controls = deps.invocationControls?.(options) ?? options;
5186
5231
  return runPortEffect(mapReply(CAPXUL_OPERATIONS.requests.get, Effect.suspend(() => convexCall.query(fns.requestsGet, copyInvocationObservation(controls, {
5187
5232
  actor,
5188
5233
  paymentRequestId: requestId
5189
- }))), (request) => request === null ? null : mapActorRequest(request)), controls, CAPXUL_OPERATIONS.requests.get, deps.runPromise);
5234
+ }))), (request) => request === null ? null : mapActorRequest(request)).pipe(Effect.tap(() => observeContactScope)), controls, CAPXUL_OPERATIONS.requests.get, deps.runPromise);
5190
5235
  },
5191
5236
  cancel: (requestId, options) => {
5192
5237
  const controls = deps.invocationControls?.(options) ?? options;
5193
5238
  return runPortEffect(mapReply(CAPXUL_OPERATIONS.requests.cancel, Effect.suspend(() => convexCall.mutation(fns.requestsCancel, copyInvocationObservation(controls, {
5194
5239
  actor,
5195
5240
  paymentRequestId: requestId
5196
- }))), (request) => mapActorRequest(request)), controls, CAPXUL_OPERATIONS.requests.cancel, deps.runPromise);
5241
+ }))), (request) => mapActorRequest(request)).pipe(Effect.tap(() => observeContactScope)), controls, CAPXUL_OPERATIONS.requests.cancel, deps.runPromise);
5197
5242
  }
5198
5243
  },
5199
5244
  inbox: {
5200
5245
  list: (options) => {
5201
5246
  const controls = deps.invocationControls?.(options) ?? options;
5202
- return runPortEffect(mapReply(CAPXUL_OPERATIONS.inbox.list, Effect.suspend(() => convexCall.query(fns.inboxList, copyInvocationObservation(controls, { actor }))), (items) => items.map(mapInboxItem)), controls, CAPXUL_OPERATIONS.inbox.list, deps.runPromise);
5247
+ return runPortEffect(mapReply(CAPXUL_OPERATIONS.inbox.list, Effect.suspend(() => convexCall.query(fns.inboxList, copyInvocationObservation(controls, { actor }))), (items) => items.map(mapInboxItem)).pipe(Effect.tap(() => observeContactScope)), controls, CAPXUL_OPERATIONS.inbox.list, deps.runPromise);
5203
5248
  },
5204
5249
  approve: (input, options) => {
5205
5250
  const controls = deps.invocationControls?.(options) ?? options;
@@ -5211,14 +5256,14 @@ function makeActorRelationshipMethods(deps) {
5211
5256
  }))).pipe(Effect.flatMap((prepared) => {
5212
5257
  const result = mapApprovedInboxPayment(prepared, input);
5213
5258
  return result.ok ? Effect.succeed(result.value) : Effect.fail({ publicError: result.error });
5214
- })), controls, CAPXUL_OPERATIONS.inbox.approve, deps.runPromise);
5259
+ }), Effect.tap(() => observeContactScope)), controls, CAPXUL_OPERATIONS.inbox.approve, deps.runPromise);
5215
5260
  },
5216
5261
  decline: (requestId, options) => {
5217
5262
  const controls = deps.invocationControls?.(options) ?? options;
5218
5263
  return runPortEffect(mapReply(CAPXUL_OPERATIONS.inbox.decline, Effect.suspend(() => convexCall.mutation(fns.inboxDecline, copyInvocationObservation(controls, {
5219
5264
  actor,
5220
5265
  paymentRequestId: requestId
5221
- }))), mapInboxItem), controls, CAPXUL_OPERATIONS.inbox.decline, deps.runPromise);
5266
+ }))), mapInboxItem).pipe(Effect.tap(() => observeContactScope)), controls, CAPXUL_OPERATIONS.inbox.decline, deps.runPromise);
5222
5267
  }
5223
5268
  },
5224
5269
  profile: {
@@ -6074,7 +6119,7 @@ function subscribeActivity(deps, actor, controls, onChange) {
6074
6119
  }
6075
6120
  //#endregion
6076
6121
  //#region package.json
6077
- var version = "4.2.0-rc.12";
6122
+ var version = "4.2.0-rc.14";
6078
6123
  //#endregion
6079
6124
  //#region src/telemetry/exception-projection.ts
6080
6125
  /** Fixed fallback for failures that have no safe message. */
@@ -7536,10 +7581,12 @@ function makeFinancialOpsMethods(deps) {
7536
7581
  return runPortEffect(Effect.suspend(() => deps.convexCall.query(fns.depositInstructions, copyInvocationObservation(controls, {}))).pipe(Effect.tap((instructions) => emitDepositInitiated(deps.telemetry, instructions, controls))), controls, CAPXUL_OPERATIONS.me.depositInstructions, deps.runPromise);
7537
7582
  }
7538
7583
  },
7539
- targets: { resolve: async (reference, options) => {
7540
- const recipient = normalizeTargetForBackend(reference, "reference");
7541
- if (!recipient.ok) return recipient;
7542
- return mapOk(await runIfActive(options?.signal, CAPXUL_OPERATIONS.recipient.resolve, () => deps.convexCall.query(fns.resolveRecipient, { recipient: recipient.value })), resolvedTargetFromResolution);
7584
+ targets: { resolve: (reference, options) => {
7585
+ const controls = deps.invocationControls?.(options) ?? options;
7586
+ return runPortEffect(projectReply(Effect.suspend(() => {
7587
+ const recipient = normalizeTargetForBackend(reference, "reference");
7588
+ return recipient.ok ? deps.convexCall.query(fns.resolveRecipient, copyInvocationObservation(controls, { recipient: recipient.value })) : Effect.fail({ publicError: recipient.error });
7589
+ }), resolvedTargetFromResolution), controls, CAPXUL_OPERATIONS.recipient.resolve, deps.runPromise);
7543
7590
  } },
7544
7591
  destinations: {
7545
7592
  add: (input, options) => {
@@ -7602,8 +7649,14 @@ function makeFinancialOpsMethods(deps) {
7602
7649
  kind: "claim",
7603
7650
  paymentId
7604
7651
  }, deps.invocationControls?.(options) ?? options, CAPXUL_OPERATIONS.payments.claim),
7605
- list: async (options) => mapOk(await runIfActive(options?.signal, CAPXUL_OPERATIONS.payments.list, () => deps.convexCall.query(fns.listPayments, {})), (payments) => payments.map(normalizePaymentTiming)),
7606
- get: async (paymentId, options) => mapOk(await runIfActive(options?.signal, CAPXUL_OPERATIONS.payments.get, () => deps.convexCall.query(fns.getPayment, { paymentId })), (payment) => payment === null ? null : normalizePaymentTiming(payment)),
7652
+ list: (options) => {
7653
+ const controls = deps.invocationControls?.(options) ?? options;
7654
+ return runPortEffect(projectReply(Effect.suspend(() => deps.convexCall.query(fns.listPayments, copyInvocationObservation(controls, {}))), (payments) => payments.map(normalizePaymentTiming)), controls, CAPXUL_OPERATIONS.payments.list, deps.runPromise);
7655
+ },
7656
+ get: (paymentId, options) => {
7657
+ const controls = deps.invocationControls?.(options) ?? options;
7658
+ return runPortEffect(projectReply(Effect.suspend(() => deps.convexCall.query(fns.getPayment, copyInvocationObservation(controls, { paymentId }))), (payment) => payment === null ? null : normalizePaymentTiming(payment)), controls, CAPXUL_OPERATIONS.payments.get, deps.runPromise);
7659
+ },
7607
7660
  cancel: (paymentId, options) => runLifecycle({
7608
7661
  kind: "cancel",
7609
7662
  paymentId
@@ -7971,6 +8024,22 @@ function normalizePaymentTiming(payment) {
7971
8024
  timing: payment.timing ?? payment.release ?? { kind: "instant" }
7972
8025
  };
7973
8026
  }
8027
+ /**
8028
+ * `mapOk`, moved inside the observed Effect (R09 #1967).
8029
+ *
8030
+ * The projection can refuse — `toAddress` and `toPartyId` throw on a malformed
8031
+ * reply — and every verb on this surface returns a `CapxulResult`, so that
8032
+ * throw stays a value here (ADR-0023). The error identity is `mapOk`'s: a
8033
+ * `CapxulError` passes through, anything else becomes `Errors.unknown(cause)`.
8034
+ * Running it inside the runner is what puts the decode failure on the same
8035
+ * operation record as the read that produced the reply.
8036
+ */
8037
+ function projectReply(program, project) {
8038
+ return program.pipe(Effect.flatMap((value) => Effect.try({
8039
+ try: () => project(value),
8040
+ catch: (cause) => ({ publicError: cause instanceof CapxulError ? cause : Errors.unknown(cause) })
8041
+ })));
8042
+ }
7974
8043
  function mapOk(result, f) {
7975
8044
  if (!result.ok) return result;
7976
8045
  try {
@@ -9461,6 +9530,8 @@ const OBSERVED_CONVEX_QUERIES = /* @__PURE__ */ new Set([
9461
9530
  "movement/activity:summary",
9462
9531
  "movement/activity:get",
9463
9532
  "financialOps/queries:depositInstructions",
9533
+ "financialOps/queries:listPayments",
9534
+ "financialOps/queries:getPayment",
9464
9535
  "financialOps/destinations:list",
9465
9536
  "financialOps/queries:verifyPaymentDocument",
9466
9537
  "financialOps/queries:renderStoredDocument",
@@ -10185,11 +10256,11 @@ var ConvexOrganizationAdapter = class {
10185
10256
  return this.listMembers(input).pipe(Effect.map((members) => members.filter((member) => member.status === "pending" || member.status === "pending_safe" || member.status === "pending_grant")));
10186
10257
  }
10187
10258
  inviteMember(input) {
10188
- return this.#convex.action(this.#fns.inviteMember, {
10259
+ return this.#convex.action(this.#fns.inviteMember, copyInvocationObservation(input, {
10189
10260
  orgId: input.orgId,
10190
10261
  email: input.input.email,
10191
10262
  role: input.input.role
10192
- }).pipe(Effect.mapError((error) => orgErrorFromCapxul("inviteMember", error.publicError, error)), Effect.map(brandOrgMember), Effect.catchDefect((cause) => Effect.fail(toOrgError("inviteMember", cause))));
10263
+ })).pipe(Effect.mapError((error) => orgErrorFromCapxul("inviteMember", error.publicError, error)), Effect.map(brandOrgMember), Effect.catchDefect((cause) => Effect.fail(toOrgError("inviteMember", cause))));
10193
10264
  }
10194
10265
  resendInviteToken(input) {
10195
10266
  return this.#convex.mutation(this.#fns.resendInvite, {
@@ -13201,18 +13272,6 @@ function emitOrgCreateFailed(telemetry, error) {
13201
13272
  }
13202
13273
  });
13203
13274
  }
13204
- function emitOrgInviteSent(telemetry, input) {
13205
- const domain = emailDomain$1(input.email);
13206
- return emitOrgTelemetry(telemetry, {
13207
- name: "org_invite_sent",
13208
- props: {
13209
- org_id: input.orgId,
13210
- ...domain === void 0 ? {} : { email_domain: domain },
13211
- role: input.role,
13212
- status: input.status
13213
- }
13214
- });
13215
- }
13216
13275
  function reportOrgTelemetryFailure(kind, name, cause) {
13217
13276
  if (!isOrgTelemetryDebugEnabled()) return;
13218
13277
  globalThis.console?.warn?.("[capxul] org telemetry dropped", {
@@ -13388,25 +13447,26 @@ function listMembersProgram(orgId) {
13388
13447
  return [];
13389
13448
  });
13390
13449
  }
13450
+ /**
13451
+ * R06 (#1964): the SDK no longer emits `org_invite_sent`. The backend action
13452
+ * that writes the invitation is its ONE producer, so a hermetic call — which
13453
+ * writes nothing — can no longer report an invitation that never happened, and
13454
+ * a live call is counted once instead of twice. The captured attempt rides the
13455
+ * port input, so the durable event carries the correlation this call ran under.
13456
+ */
13391
13457
  function inviteMemberProgram(orgId, input) {
13392
13458
  return Effect.gen(function* () {
13393
13459
  const deps = yield* OrgDepsTag;
13394
- const member = deps.orgPort !== void 0 ? yield* deps.orgPort.inviteMember({
13395
- orgId,
13396
- input
13397
- }).pipe(Effect.mapError((error) => error.publicError)) : hermeticMember({
13460
+ if (deps.orgPort === void 0) return hermeticMember({
13398
13461
  orgId,
13399
13462
  email: input.email,
13400
13463
  role: input.role,
13401
13464
  status: "pending"
13402
13465
  });
13403
- yield* Effect.promise(() => emitOrgInviteSent(deps.telemetry, {
13466
+ return yield* deps.orgPort.inviteMember(copyInvocationObservation(deps.invocationSource, {
13404
13467
  orgId,
13405
- email: input.email,
13406
- role: member.role,
13407
- status: member.status
13408
- }));
13409
- return member;
13468
+ input
13469
+ })).pipe(Effect.mapError((error) => error.publicError));
13410
13470
  });
13411
13471
  }
13412
13472
  function detectAndAcceptPendingInvitationsProgram() {
@@ -13673,11 +13733,15 @@ function makeOrgMethods(deps) {
13673
13733
  return toCapxulResult(listRolesProgram(orgId), layer);
13674
13734
  },
13675
13735
  invite(_input, _options) {
13676
- if (_options?.signal?.aborted) return Promise.resolve({
13736
+ const controls = deps.invocationControls?.(_options) ?? _options;
13737
+ if (controls?.signal?.aborted) return Promise.resolve({
13677
13738
  ok: false,
13678
13739
  error: Errors.cancelled({ operation: CAPXUL_OPERATIONS.org.invite })
13679
13740
  });
13680
- return toCapxulResult(inviteMemberProgram(orgId, _input), layer);
13741
+ return runCapxulEffect(inviteMemberProgram(orgId, _input).pipe(Effect.provide(orgDepsLayer({
13742
+ ...orgDeps,
13743
+ ...controls === void 0 ? {} : { invocationSource: controls }
13744
+ }))), controls, CAPXUL_OPERATIONS.org.invite, deps.runPromise);
13681
13745
  },
13682
13746
  auditLog(_options) {
13683
13747
  if (_options?.signal?.aborted) return Promise.resolve({
@@ -14627,6 +14691,7 @@ function identity(row) {
14627
14691
  chainId: toChainId(integer(row, "chain_id")),
14628
14692
  txHash: toTxHash(hex(row, "tx_hash")),
14629
14693
  transactionLogOrdinal: integer(row, "transaction_log_ordinal"),
14694
+ logIndex: integer(row, "log_index"),
14630
14695
  blockNumber: big(row, "block_number"),
14631
14696
  blockHash: hex(row, "block_hash"),
14632
14697
  timestamp: big(row, "timestamp")
@@ -14709,8 +14774,8 @@ function decodeStatus(body) {
14709
14774
  * that allowlist changes, this file changes with it or every read fails 403.
14710
14775
  */
14711
14776
  const HEADS = {
14712
- transfer: "select \"id\", \"chain_id\", \"tx_hash\", \"transaction_log_ordinal\", \"block_number\", \"block_hash\", \"timestamp\", \"asset_id\", \"token\", \"from\", \"to\", \"amount\" from \"transfer\" where (\"transfer\".\"from\" = $1 or \"transfer\".\"to\" = $2) order by \"transfer\".\"block_number\" desc, \"transfer\".\"id\" desc",
14713
- payment: "select \"id\", \"chain_id\", \"tx_hash\", \"transaction_log_ordinal\", \"block_number\", \"block_hash\", \"timestamp\", \"contract\", \"settlement_id\", \"sender\", \"recipient\", \"asset_id\", \"token\", \"amount\", \"kind\", \"document_hash\" from \"payment\" where (\"payment\".\"sender\" = $1 or \"payment\".\"recipient\" = $2) order by \"payment\".\"block_number\" desc, \"payment\".\"id\" desc",
14777
+ transfer: "select \"id\", \"chain_id\", \"tx_hash\", \"transaction_log_ordinal\", \"log_index\", \"block_number\", \"block_hash\", \"timestamp\", \"asset_id\", \"token\", \"from\", \"to\", \"amount\" from \"transfer\" where (\"transfer\".\"from\" = $1 or \"transfer\".\"to\" = $2) order by \"transfer\".\"block_number\" desc, \"transfer\".\"id\" desc",
14778
+ payment: "select \"id\", \"chain_id\", \"tx_hash\", \"transaction_log_ordinal\", \"log_index\", \"block_number\", \"block_hash\", \"timestamp\", \"contract\", \"settlement_id\", \"sender\", \"recipient\", \"asset_id\", \"token\", \"amount\", \"kind\", \"document_hash\" from \"payment\" where (\"payment\".\"sender\" = $1 or \"payment\".\"recipient\" = $2) order by \"payment\".\"block_number\" desc, \"payment\".\"id\" desc",
14714
14779
  balance: "select \"chain_id\", \"asset_id\", \"to\", \"amount\" from \"balance\" where \"balance\".\"to\" = $1"
14715
14780
  };
14716
14781
  /** How many times the statement binds the Safe address. */
@@ -284,7 +284,7 @@ interface TelemetryPort {
284
284
  }
285
285
  //#endregion
286
286
  //#region ../observability/src/index.d.ts
287
- declare const TELEMETRY_EVENT_NAMES: readonly ["auth_otp_requested", "auth_otp_delivered", "auth_otp_expired", "auth_verified", "auth_failed", "identity_refused", "auth_signed_out", "onboarding_intent_selected", "onboarding_profile_submitted", "onboarding_organization_submitted", "onboarding_dashboard_reached", "provisioning_safe_created", "provisioning_safe_confirmed", "bootstrap_resolved", "bootstrap_failed", "member_activation_started", "member_activation_ready", "member_activation_failed", "organization_creation_started", "organization_creation_ready", "organization_creation_failed", "chain_upstream_fallback", "bundler_error", "receipt_pending", "operation_retried", "account_balance_read", "account_balance_failed", "faucet_requested", "faucet_confirmed", "faucet_failed", "org_create_started", "org_safe_created", "org_safe_confirmed", "org_roles_seeded", "org_created", "org_create_failed", "org_invite_sent", "org_invite_accepted", "org_invite_expired", "payment_initiated", "payment_settled", "payment_failed", "payment_verification_retry", "payment_lifecycle_transition", "quick_pay_external_address_acknowledged", "deposit_initiated", "deposit_settled", "permission_mirror_verification", "movement_scan_window", "movement_scan_checkpoint", "movement_scan_incident", "activity_annotation_saved", "ui_activity_action_completed", "contact_relationship_changed", "ui_contact_action_completed", "access_recovery_completed", "ui_access_step_completed", "org_invite_progressed", "invoice_issued", "invoice_request_transitioned", "ui_invoice_step_completed", "ui_treasury_step_completed", "ui_receive_step_completed", "payroll_group_changed", "payroll_run_transitioned", "ui_payroll_action_completed"];
287
+ declare const TELEMETRY_EVENT_NAMES: readonly ["auth_otp_requested", "auth_otp_delivered", "auth_otp_expired", "auth_verified", "auth_failed", "identity_refused", "auth_signed_out", "onboarding_intent_selected", "onboarding_profile_submitted", "onboarding_organization_submitted", "onboarding_dashboard_reached", "provisioning_safe_created", "provisioning_safe_confirmed", "bootstrap_resolved", "bootstrap_failed", "member_activation_started", "member_activation_ready", "member_activation_failed", "organization_creation_started", "organization_creation_ready", "organization_creation_failed", "chain_upstream_fallback", "bundler_error", "receipt_pending", "operation_retried", "account_balance_read", "account_balance_failed", "faucet_requested", "faucet_confirmed", "faucet_failed", "org_create_started", "org_safe_created", "org_safe_confirmed", "org_roles_seeded", "org_created", "org_create_failed", "org_invite_sent", "org_invite_accepted", "org_invite_expired", "payment_initiated", "payment_settled", "payment_failed", "payment_verification_retry", "payment_lifecycle_transition", "quick_pay_external_address_acknowledged", "deposit_initiated", "deposit_settled", "permission_mirror_verification", "movement_scan_window", "movement_scan_checkpoint", "movement_scan_incident", "indexer_drift_corrected", "activity_annotation_saved", "ui_activity_action_completed", "contact_relationship_changed", "ui_contact_action_completed", "access_recovery_completed", "ui_access_step_completed", "org_invite_progressed", "invoice_issued", "invoice_request_transitioned", "ui_invoice_step_completed", "ui_treasury_step_completed", "ui_receive_step_completed", "payroll_group_changed", "payroll_run_transitioned", "ui_payroll_action_completed"];
288
288
  type TelemetryEventName = (typeof TELEMETRY_EVENT_NAMES)[number];
289
289
  type TelemetryProps = Record<string, unknown>;
290
290
  type TelemetryEvent = {
@@ -938,6 +938,12 @@ interface IndexerEventIdentity {
938
938
  readonly chainId: ChainId;
939
939
  readonly txHash: TxHash;
940
940
  readonly transactionLogOrdinal: number;
941
+ /**
942
+ * The block-global log index of the same log, as the transaction receipt
943
+ * reports it. The ordinal above is the identity; this is the key Convex
944
+ * settles a Payment on (P12).
945
+ */
946
+ readonly logIndex: number;
941
947
  readonly blockNumber: bigint;
942
948
  readonly blockHash: string;
943
949
  /** Block timestamp in epoch seconds. */
@@ -1274,10 +1280,17 @@ interface ResolvedTarget {
1274
1280
  readonly canPayout: boolean;
1275
1281
  };
1276
1282
  }
1283
+ /**
1284
+ * R09 (#1967): the declared option type is the `InvocationControls` the money
1285
+ * surface already forwards to `deps.invocationControls`, named here exactly as
1286
+ * R02 named it on the address book and R13 on payroll. A caller that captured
1287
+ * one user attempt can hand the same `correlation_id`/`journey_id` to the read
1288
+ * it starts, so the read joins that attempt instead of standing alone.
1289
+ * `{ signal }` callers are unaffected.
1290
+ */
1291
+ type PaymentReadOptions = InvocationControls;
1277
1292
  interface TargetsMethods {
1278
- resolve(reference: TargetReference, options?: {
1279
- readonly signal?: AbortSignal;
1280
- }): Promise<CapxulResult<ResolvedTarget>>;
1293
+ resolve(reference: TargetReference, options?: PaymentReadOptions): Promise<CapxulResult<ResolvedTarget>>;
1281
1294
  }
1282
1295
  type Ref$1 = {
1283
1296
  readonly kind: "handle";
@@ -1763,12 +1776,8 @@ interface PaymentsMethods {
1763
1776
  claim(paymentId: string, options?: {
1764
1777
  readonly signal?: AbortSignal;
1765
1778
  }): Promise<CapxulResult<Payment>>;
1766
- list(options?: {
1767
- readonly signal?: AbortSignal;
1768
- }): Promise<CapxulResult<readonly Payment[]>>;
1769
- get(paymentId: string, options?: {
1770
- readonly signal?: AbortSignal;
1771
- }): Promise<CapxulResult<Payment | null>>;
1779
+ list(options?: PaymentReadOptions): Promise<CapxulResult<readonly Payment[]>>;
1780
+ get(paymentId: string, options?: PaymentReadOptions): Promise<CapxulResult<Payment | null>>;
1772
1781
  cancel(paymentId: string, options?: {
1773
1782
  readonly signal?: AbortSignal;
1774
1783
  }): Promise<CapxulResult<Payment>>;
@@ -1878,19 +1887,17 @@ interface ActorRequestIssueInput {
1878
1887
  readonly memo?: string;
1879
1888
  readonly expiresAt?: number;
1880
1889
  }
1890
+ /**
1891
+ * The issuer's own requests. The options are the address book's
1892
+ * `InvocationControls` (R07 #1965), so a caller that captured one browser
1893
+ * attempt hands it to the operation that attempt started; `{ signal }` callers
1894
+ * are unaffected.
1895
+ */
1881
1896
  interface ActorRequestsMethods {
1882
- issue(input: ActorRequestIssueInput, options?: {
1883
- readonly signal?: AbortSignal;
1884
- }): Promise<CapxulResult<ActorRequest>>;
1885
- list(options?: {
1886
- readonly signal?: AbortSignal;
1887
- }): Promise<CapxulResult<readonly ActorRequest[]>>;
1888
- get(requestId: string, options?: {
1889
- readonly signal?: AbortSignal;
1890
- }): Promise<CapxulResult<ActorRequest | null>>;
1891
- cancel(requestId: string, options?: {
1892
- readonly signal?: AbortSignal;
1893
- }): Promise<CapxulResult<ActorRequest>>;
1897
+ issue(input: ActorRequestIssueInput, options?: InvocationControls): Promise<CapxulResult<ActorRequest>>;
1898
+ list(options?: InvocationControls): Promise<CapxulResult<readonly ActorRequest[]>>;
1899
+ get(requestId: string, options?: InvocationControls): Promise<CapxulResult<ActorRequest | null>>;
1900
+ cancel(requestId: string, options?: InvocationControls): Promise<CapxulResult<ActorRequest>>;
1894
1901
  }
1895
1902
  interface InboxItem {
1896
1903
  readonly id: string;
@@ -1904,16 +1911,11 @@ interface InboxApproveInput {
1904
1911
  readonly timing?: PaymentTiming;
1905
1912
  readonly permissionId?: string;
1906
1913
  }
1914
+ /** The payer's own inbox. Its scope is the payer's, never the issuer's. */
1907
1915
  interface InboxMethods {
1908
- list(options?: {
1909
- readonly signal?: AbortSignal;
1910
- }): Promise<CapxulResult<readonly InboxItem[]>>;
1911
- approve(input: InboxApproveInput, options?: {
1912
- readonly signal?: AbortSignal;
1913
- }): Promise<CapxulResult<Payment>>;
1914
- decline(requestId: string, options?: {
1915
- readonly signal?: AbortSignal;
1916
- }): Promise<CapxulResult<InboxItem>>;
1916
+ list(options?: InvocationControls): Promise<CapxulResult<readonly InboxItem[]>>;
1917
+ approve(input: InboxApproveInput, options?: InvocationControls): Promise<CapxulResult<Payment>>;
1918
+ decline(requestId: string, options?: InvocationControls): Promise<CapxulResult<InboxItem>>;
1917
1919
  }
1918
1920
  interface ActorProfileMethods {
1919
1921
  get(options?: {
@@ -2082,6 +2084,12 @@ type ListOrgRolesInput = {
2082
2084
  type ListOrgMembersInput = {
2083
2085
  readonly orgId: OrgId;
2084
2086
  };
2087
+ /**
2088
+ * R06 (#1964): the program attaches the caller's captured attempt to this
2089
+ * record through `copyInvocationObservation`, so the adapter forwards one
2090
+ * observation context to the backend action that owns `org_invite_sent`. The
2091
+ * carrier is a non-enumerable symbol and never becomes a wire field.
2092
+ */
2085
2093
  type InviteOrgMemberInput = {
2086
2094
  readonly orgId: OrgId;
2087
2095
  readonly input: InviteMemberInput;
@@ -2516,9 +2524,14 @@ interface OrgScopedMethods extends ActorRelationshipMethods {
2516
2524
  roles(options?: {
2517
2525
  readonly signal?: AbortSignal;
2518
2526
  }): Promise<CapxulResult<readonly RoleView[]>>;
2519
- invite(input: InviteMemberInput, options?: {
2520
- readonly signal?: AbortSignal;
2521
- }): Promise<CapxulResult<MemberView>>;
2527
+ /**
2528
+ * Invite a member by email. `options` is the browser attempt the caller
2529
+ * captured before the person pressed the button (R06 #1964); it reaches the
2530
+ * backend action unchanged, so the durable `org_invite_sent` and the later
2531
+ * `org_invite_progressed` share the attempt's correlation. `{ signal }`
2532
+ * callers are unaffected.
2533
+ */
2534
+ invite(input: InviteMemberInput, options?: InvocationControls): Promise<CapxulResult<MemberView>>;
2522
2535
  /**
2523
2536
  * Leak-safe Organization payment: execute through the payments engine with
2524
2537
  * the selected receipt-verified Budget Permission
@@ -1,5 +1,5 @@
1
1
  import { h as CapxulResult } from "../OAuthBearerAuthClient-C-ip-z8M.mjs";
2
- import { er as TelemetryEvent, f as CapxulClient, i as ObservationAdapter, n as ProductionSignerControls, nr as TelemetryIdentifyInput, pr as IdentityTransition, t as CapxulClientInput, tr as TelemetryGroupInput } from "../production-Cpz4hm8p.mjs";
2
+ import { er as TelemetryEvent, f as CapxulClient, i as ObservationAdapter, n as ProductionSignerControls, nr as TelemetryIdentifyInput, pr as IdentityTransition, t as CapxulClientInput, tr as TelemetryGroupInput } from "../production-DuSjYRk4.mjs";
3
3
  import { Effect, Layer } from "effect";
4
4
  //#region src/testing/production-client.d.ts
5
5
  /** Create the one production client with per-client controls at its signing boundaries. */
@@ -1,4 +1,4 @@
1
- import { D as fromWei, P as redactTelemetryEvent, a as smartAccountErrorFromCapxul, c as identityErrorFromCapxul, i as assembleCapxulClient, l as convexCallErrorFromCapxul, n as createCapxulClientWithSignerControls, o as accountReadErrorFromCapxul, s as wireChainId, u as bootstrapErrorFromCapxul, v as toWei } from "../production-C8FuAYm1.mjs";
1
+ import { D as fromWei, P as redactTelemetryEvent, a as smartAccountErrorFromCapxul, c as identityErrorFromCapxul, i as assembleCapxulClient, l as convexCallErrorFromCapxul, n as createCapxulClientWithSignerControls, o as accountReadErrorFromCapxul, s as wireChainId, u as bootstrapErrorFromCapxul, v as toWei } from "../production-C2EwEcoX.mjs";
2
2
  import { G as toHandle, H as toEmail, I as toAuthUserId, K as toJwtToken, M as toAddress, N as toAllowedOrigin, P as toAppId, Q as toPublishableKey, R as toChainId, U as toEpochMs, V as toDurationMs, W as toEpochSeconds, ct as CapxulError, d as authClientPortFromPromiseAdapter, et as toSessionToken, it as validateHandle, j as toAccountId, n as readClockNow, q as toKycTier, r as InMemoryAuthCacheAdapter, ut as Errors, y as deriveCapxulSafeAddress, z as toCountryCode } from "../OAuthBearerAuthClient-CbU_W9Sp.mjs";
3
3
  import { keccak256 } from "viem";
4
4
  import { Effect, Result, Semaphore } from "effect";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capxul/sdk",
3
- "version": "4.2.0-rc.12",
3
+ "version": "4.2.0-rc.14",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Xelmar-tech/infrastructure.git",
@@ -48,10 +48,10 @@
48
48
  "vite-plus": "0.3.0",
49
49
  "vitest": "4.1.11",
50
50
  "@capxul/config": "0.3.0",
51
- "@capxul/observability": "4.2.0-rc.12",
52
- "@capxul/typescript-config": "0.0.0",
53
- "@capxul/types": "0.3.0",
54
51
  "@capxul/errors": "0.3.0",
52
+ "@capxul/observability": "4.2.0-rc.14",
53
+ "@capxul/types": "0.3.0",
54
+ "@capxul/typescript-config": "0.0.0",
55
55
  "@capxul/wire": "0.7.0"
56
56
  },
57
57
  "_permissionlessPinReason": "permissionless.toSafeSmartAccount is pinned to 0.3.4 for live Safe deployment E2E. Counterfactual address fixtures captured 2026-05-17 in packages/backend/convex/_shared/__tests__/counterfactual.test.ts and packages/config/tests/safe.test.ts must be re-verified before upgrading.",