@capxul/observability 4.2.0-rc.1 → 4.2.0-rc.11

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": "efa1ae30674425e4db92020bfad513fb6cf36011",
4
- "tree": "91f805524a7c7b53e6c28cf484b549b0c1dbd9dd",
3
+ "commit": "12a590f10914e8b056ce54732e6f484f36e060f3",
4
+ "tree": "90adc6656be3c1fb0a6e18170877d46081fa2538",
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/observability",
10
- "version": "4.2.0-rc.1"
10
+ "version": "4.2.0-rc.11"
11
11
  }
package/dist/index.d.mts CHANGED
@@ -199,6 +199,8 @@ declare const CAPXUL_OPERATIONS: {
199
199
  readonly emitAnnotationSaved: "activity.emitAnnotationSaved";
200
200
  readonly get: "activity.get";
201
201
  readonly list: "activity.list";
202
+ /** The SDK's live Activity read over the indexer's SSE stream. */
203
+ readonly subscribe: "activity.subscribe";
202
204
  readonly summary: "activity.summary";
203
205
  };
204
206
  readonly addressBook: {
@@ -600,7 +602,7 @@ interface TelemetryPort {
600
602
  }
601
603
  //#endregion
602
604
  //#region src/index.d.ts
603
- declare const TELEMETRY_EVENT_NAMES: readonly ["auth_otp_requested", "auth_otp_delivered", "auth_otp_expired", "auth_verified", "auth_failed", "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"];
605
+ 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"];
604
606
  type TelemetryEventName = (typeof TELEMETRY_EVENT_NAMES)[number];
605
607
  type NonEmptyTelemetryEventNames = readonly [TelemetryEventName, ...TelemetryEventName[]];
606
608
  type FunnelStepPropertyFilter = {
@@ -919,6 +921,24 @@ declare const AuthFailedTelemetryEventSchema: Schema.Struct<{
919
921
  readonly reason: Schema.optional<Schema.String>;
920
922
  }>;
921
923
  }>;
924
+ declare const IdentityRefusedTelemetryEventSchema: Schema.Struct<{
925
+ readonly name: Schema.Literal<"identity_refused">;
926
+ readonly props: Schema.Struct<{
927
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
928
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
929
+ readonly journey_id: Schema.optional<Schema.String>;
930
+ readonly correlation_id: Schema.optional<Schema.String>;
931
+ readonly sdk_version: Schema.optional<Schema.String>;
932
+ /** The refused identity event tag, for example CreateOrganization. */
933
+ readonly event: Schema.optional<Schema.String>;
934
+ /** The machine's refusal code: WRONG_STATE, SUPERSEDED or STALE_EPOCH. */
935
+ readonly refusal_code: Schema.optional<Schema.String>;
936
+ /** The machine slot the request targeted, for example identity:org. */
937
+ readonly slot: Schema.optional<Schema.String>;
938
+ /** The machine state at refusal, for example authenticated:claiming. */
939
+ readonly state: Schema.optional<Schema.String>;
940
+ }>;
941
+ }>;
922
942
  declare const AuthSignedOutTelemetryEventSchema: Schema.Struct<{
923
943
  readonly name: Schema.Literal<"auth_signed_out">;
924
944
  readonly props: Schema.Struct<{
@@ -1779,10 +1799,33 @@ declare const PermissionMirrorVerificationTelemetryEventSchema: Schema.Struct<{
1779
1799
  readonly journey_id: Schema.optional<Schema.String>;
1780
1800
  readonly correlation_id: Schema.optional<Schema.String>;
1781
1801
  readonly sdk_version: Schema.optional<Schema.String>;
1802
+ /** The RECEIPT verification outcome. What the mirror then did is separate. */
1782
1803
  readonly outcome: Schema.String;
1783
1804
  readonly reason: Schema.String;
1784
1805
  readonly chain_id: Schema.Number;
1785
1806
  readonly retry_count: Schema.Number;
1807
+ /**
1808
+ * #1960 R02, consumed by R03. A verified receipt is not an applied Permission:
1809
+ * these two optional fields let the producer say what the applying mutation
1810
+ * actually returned, and which command it was, without either fact rewriting
1811
+ * the receipt outcome above. Absent when application has not happened yet.
1812
+ */
1813
+ readonly application_result: Schema.optional<Schema.Literals<readonly ["applied", "replayed", "conflicting_replay", "revision_mismatch"]>>;
1814
+ readonly command_id: Schema.optional<Schema.String>;
1815
+ /**
1816
+ * #1961 R03. The authorized stored row names the Permission it changed; the
1817
+ * verified receipt names the chain facts that prove it. Every field is
1818
+ * optional because a pending or provider-failed verification has neither an
1819
+ * application result nor a receipt to report.
1820
+ */
1821
+ readonly permission_id: Schema.optional<Schema.String>;
1822
+ readonly permission_assignment_id: Schema.optional<Schema.String>;
1823
+ readonly permission_operation: Schema.optional<Schema.Literals<readonly ["create", "change", "assign", "revoke", "replace"]>>;
1824
+ readonly revision: Schema.optional<Schema.Number>;
1825
+ readonly user_op_hash: Schema.optional<Schema.String>;
1826
+ readonly transaction_hash: Schema.optional<Schema.String>;
1827
+ readonly block_number: Schema.optional<Schema.Number>;
1828
+ readonly log_index: Schema.optional<Schema.Number>;
1786
1829
  }>;
1787
1830
  }>;
1788
1831
  declare const MovementScanWindowTelemetryEventSchema: Schema.Struct<{
@@ -1976,6 +2019,182 @@ declare const UiActivityActionCompletedTelemetryEventSchema: Schema.Struct<{
1976
2019
  readonly truncated: Schema.optional<Schema.Boolean>;
1977
2020
  }>]>;
1978
2021
  }>;
2022
+ declare const AccessRecoveryCompletedTelemetryEventSchema: Schema.Struct<{
2023
+ readonly name: Schema.Literal<"access_recovery_completed">;
2024
+ readonly props: Schema.Union<readonly [Schema.Struct<{
2025
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2026
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2027
+ readonly journey_id: Schema.optional<Schema.String>;
2028
+ readonly correlation_id: Schema.optional<Schema.String>;
2029
+ readonly sdk_version: Schema.optional<Schema.String>;
2030
+ readonly recovery: Schema.Literal<"session_restoration">;
2031
+ readonly outcome: Schema.Literals<readonly ["restored", "absent", "failed"]>;
2032
+ readonly reason_code: Schema.optional<Schema.Literals<readonly ["NOT_AUTHENTICATED", "EMAIL_DELIVERY_FAILED", "PROFILE_NOT_FOUND", "SMART_ACCOUNT_MISSING", "PLAYER_NOT_FOUND", "ACCOUNT_NOT_FOUND", "ACCOUNT_CLAIMED_BY_OTHER_SIGNER", "PROVIDER_ERROR", "CAPABILITY_UNAVAILABLE", "INVALID_INPUT", "ENV_MISSING", "NOT_IMPLEMENTED", "VERIFICATION_REQUIRED", "INSUFFICIENT_BALANCE", "INVALID_RECIPIENT", "ROLE_PERMISSION_DENIED", "TRANSACTION_FAILED", "RATE_LIMITED", "NETWORK_ERROR", "UNKNOWN", "OTP_EXPIRED", "SIGNER_REJECTED", "CANCELLED", "WRONG_STATE", "STALE_EPOCH", "SUPERSEDED", "WORK_DIED", "ACTOR_STOPPED"]>>;
2033
+ readonly organization_id: Schema.optional<Schema.Codec<string, string, never, never>>;
2034
+ }>, Schema.Struct<{
2035
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2036
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2037
+ readonly journey_id: Schema.optional<Schema.String>;
2038
+ readonly correlation_id: Schema.optional<Schema.String>;
2039
+ readonly sdk_version: Schema.optional<Schema.String>;
2040
+ readonly recovery: Schema.Literal<"signer_readiness">;
2041
+ readonly outcome: Schema.Literals<readonly ["ready", "unavailable"]>;
2042
+ readonly reason_code: Schema.optional<Schema.Literals<readonly ["NOT_AUTHENTICATED", "EMAIL_DELIVERY_FAILED", "PROFILE_NOT_FOUND", "SMART_ACCOUNT_MISSING", "PLAYER_NOT_FOUND", "ACCOUNT_NOT_FOUND", "ACCOUNT_CLAIMED_BY_OTHER_SIGNER", "PROVIDER_ERROR", "CAPABILITY_UNAVAILABLE", "INVALID_INPUT", "ENV_MISSING", "NOT_IMPLEMENTED", "VERIFICATION_REQUIRED", "INSUFFICIENT_BALANCE", "INVALID_RECIPIENT", "ROLE_PERMISSION_DENIED", "TRANSACTION_FAILED", "RATE_LIMITED", "NETWORK_ERROR", "UNKNOWN", "OTP_EXPIRED", "SIGNER_REJECTED", "CANCELLED", "WRONG_STATE", "STALE_EPOCH", "SUPERSEDED", "WORK_DIED", "ACTOR_STOPPED"]>>;
2043
+ readonly organization_id: Schema.optional<Schema.Codec<string, string, never, never>>;
2044
+ }>]>;
2045
+ }>;
2046
+ declare const UiAccessStepCompletedTelemetryEventSchema: Schema.Struct<{
2047
+ readonly name: Schema.Literal<"ui_access_step_completed">;
2048
+ readonly props: Schema.Struct<{
2049
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2050
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2051
+ readonly journey_id: Schema.optional<Schema.String>;
2052
+ readonly correlation_id: Schema.optional<Schema.String>;
2053
+ readonly sdk_version: Schema.optional<Schema.String>;
2054
+ readonly scope_kind: Schema.Literals<readonly ["account", "organization"]>;
2055
+ readonly organization_id: Schema.optional<Schema.Codec<string, string, never, never>>;
2056
+ readonly reason_code: Schema.optional<Schema.Literals<readonly ["NOT_AUTHENTICATED", "EMAIL_DELIVERY_FAILED", "PROFILE_NOT_FOUND", "SMART_ACCOUNT_MISSING", "PLAYER_NOT_FOUND", "ACCOUNT_NOT_FOUND", "ACCOUNT_CLAIMED_BY_OTHER_SIGNER", "PROVIDER_ERROR", "CAPABILITY_UNAVAILABLE", "INVALID_INPUT", "ENV_MISSING", "NOT_IMPLEMENTED", "VERIFICATION_REQUIRED", "INSUFFICIENT_BALANCE", "INVALID_RECIPIENT", "ROLE_PERMISSION_DENIED", "TRANSACTION_FAILED", "RATE_LIMITED", "NETWORK_ERROR", "UNKNOWN", "OTP_EXPIRED", "SIGNER_REJECTED", "CANCELLED", "WRONG_STATE", "STALE_EPOCH", "SUPERSEDED", "WORK_DIED", "ACTOR_STOPPED"]>>;
2057
+ readonly step: Schema.Literals<readonly ["dashboard_granted", "redirect_completed", "gate_error_displayed", "retry_selected", "capability_refusal_displayed", "signer_refusal_displayed"]>;
2058
+ readonly capability: Schema.optional<Schema.Literals<readonly ["spend", "managePeople"]>>;
2059
+ readonly probe: Schema.optional<Schema.Literals<readonly ["session", "membership", "lifecycle"]>>;
2060
+ readonly reason: Schema.optional<Schema.Literals<readonly ["loading", "no-permission", "org-unavailable"]>>;
2061
+ }>;
2062
+ }>;
2063
+ declare const OrgInviteProgressedTelemetryEventSchema: Schema.Struct<{
2064
+ readonly name: Schema.Literal<"org_invite_progressed">;
2065
+ readonly props: Schema.Struct<{
2066
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2067
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2068
+ readonly journey_id: Schema.optional<Schema.String>;
2069
+ readonly correlation_id: Schema.optional<Schema.String>;
2070
+ readonly sdk_version: Schema.optional<Schema.String>;
2071
+ readonly organization_id: Schema.Codec<string, string, never, never>;
2072
+ readonly progress: Schema.Literals<readonly ["account_ready", "permission_applied", "membership_activated", "revoked"]>;
2073
+ /** The invited Party. The initiating actor stays on the envelope's identity. */
2074
+ readonly member_party_id: Schema.String;
2075
+ readonly occurred_at: Schema.Number;
2076
+ }>;
2077
+ }>;
2078
+ declare const InvoiceIssuedTelemetryEventSchema: Schema.Struct<{
2079
+ readonly name: Schema.Literal<"invoice_issued">;
2080
+ readonly props: Schema.Struct<{
2081
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2082
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2083
+ readonly journey_id: Schema.optional<Schema.String>;
2084
+ readonly correlation_id: Schema.optional<Schema.String>;
2085
+ readonly sdk_version: Schema.optional<Schema.String>;
2086
+ readonly request_id: Schema.String;
2087
+ readonly issuer_scope_kind: Schema.Literals<readonly ["account", "organization"]>;
2088
+ readonly issuer_scope_id: Schema.String;
2089
+ readonly payer_party_id: Schema.optional<Schema.String>;
2090
+ readonly occurred_at: Schema.Number;
2091
+ }>;
2092
+ }>;
2093
+ declare const InvoiceRequestTransitionedTelemetryEventSchema: Schema.Struct<{
2094
+ readonly name: Schema.Literal<"invoice_request_transitioned">;
2095
+ readonly props: Schema.Struct<{
2096
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2097
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2098
+ readonly journey_id: Schema.optional<Schema.String>;
2099
+ readonly correlation_id: Schema.optional<Schema.String>;
2100
+ readonly sdk_version: Schema.optional<Schema.String>;
2101
+ readonly request_id: Schema.String;
2102
+ readonly transition: Schema.Literals<readonly ["approval_prepared", "declined", "cancelled"]>;
2103
+ readonly actor_scope_kind: Schema.Literals<readonly ["account", "organization"]>;
2104
+ readonly actor_scope_id: Schema.String;
2105
+ readonly occurred_at: Schema.Number;
2106
+ }>;
2107
+ }>;
2108
+ declare const UiInvoiceStepCompletedTelemetryEventSchema: Schema.Struct<{
2109
+ readonly name: Schema.Literal<"ui_invoice_step_completed">;
2110
+ readonly props: Schema.Struct<{
2111
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2112
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2113
+ readonly journey_id: Schema.optional<Schema.String>;
2114
+ readonly correlation_id: Schema.optional<Schema.String>;
2115
+ readonly sdk_version: Schema.optional<Schema.String>;
2116
+ readonly scope_kind: Schema.Literals<readonly ["account", "organization"]>;
2117
+ readonly organization_id: Schema.optional<Schema.Codec<string, string, never, never>>;
2118
+ readonly reason_code: Schema.optional<Schema.Literals<readonly ["NOT_AUTHENTICATED", "EMAIL_DELIVERY_FAILED", "PROFILE_NOT_FOUND", "SMART_ACCOUNT_MISSING", "PLAYER_NOT_FOUND", "ACCOUNT_NOT_FOUND", "ACCOUNT_CLAIMED_BY_OTHER_SIGNER", "PROVIDER_ERROR", "CAPABILITY_UNAVAILABLE", "INVALID_INPUT", "ENV_MISSING", "NOT_IMPLEMENTED", "VERIFICATION_REQUIRED", "INSUFFICIENT_BALANCE", "INVALID_RECIPIENT", "ROLE_PERMISSION_DENIED", "TRANSACTION_FAILED", "RATE_LIMITED", "NETWORK_ERROR", "UNKNOWN", "OTP_EXPIRED", "SIGNER_REJECTED", "CANCELLED", "WRONG_STATE", "STALE_EPOCH", "SUPERSEDED", "WORK_DIED", "ACTOR_STOPPED"]>>;
2119
+ readonly step: Schema.Literals<readonly ["opened", "previewed", "dismissed", "submitted", "result_displayed", "refusal_displayed", "retry_selected"]>;
2120
+ readonly request_id: Schema.optional<Schema.String>;
2121
+ }>;
2122
+ }>;
2123
+ declare const UiTreasuryStepCompletedTelemetryEventSchema: Schema.Struct<{
2124
+ readonly name: Schema.Literal<"ui_treasury_step_completed">;
2125
+ readonly props: Schema.Struct<{
2126
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2127
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2128
+ readonly journey_id: Schema.optional<Schema.String>;
2129
+ readonly correlation_id: Schema.optional<Schema.String>;
2130
+ readonly sdk_version: Schema.optional<Schema.String>;
2131
+ readonly scope_kind: Schema.Literals<readonly ["account", "organization"]>;
2132
+ readonly organization_id: Schema.optional<Schema.Codec<string, string, never, never>>;
2133
+ readonly reason_code: Schema.optional<Schema.Literals<readonly ["NOT_AUTHENTICATED", "EMAIL_DELIVERY_FAILED", "PROFILE_NOT_FOUND", "SMART_ACCOUNT_MISSING", "PLAYER_NOT_FOUND", "ACCOUNT_NOT_FOUND", "ACCOUNT_CLAIMED_BY_OTHER_SIGNER", "PROVIDER_ERROR", "CAPABILITY_UNAVAILABLE", "INVALID_INPUT", "ENV_MISSING", "NOT_IMPLEMENTED", "VERIFICATION_REQUIRED", "INSUFFICIENT_BALANCE", "INVALID_RECIPIENT", "ROLE_PERMISSION_DENIED", "TRANSACTION_FAILED", "RATE_LIMITED", "NETWORK_ERROR", "UNKNOWN", "OTP_EXPIRED", "SIGNER_REJECTED", "CANCELLED", "WRONG_STATE", "STALE_EPOCH", "SUPERSEDED", "WORK_DIED", "ACTOR_STOPPED"]>>;
2134
+ readonly step: Schema.Literals<readonly ["balance_displayed", "read_refusal_displayed", "retry_selected", "recovery_completed"]>;
2135
+ readonly account_kind: Schema.optional<Schema.Literals<readonly ["personalSafe", "orgTreasury"]>>;
2136
+ }>;
2137
+ }>;
2138
+ declare const UiReceiveStepCompletedTelemetryEventSchema: Schema.Struct<{
2139
+ readonly name: Schema.Literal<"ui_receive_step_completed">;
2140
+ readonly props: Schema.Struct<{
2141
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2142
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2143
+ readonly journey_id: Schema.optional<Schema.String>;
2144
+ readonly correlation_id: Schema.optional<Schema.String>;
2145
+ readonly sdk_version: Schema.optional<Schema.String>;
2146
+ readonly scope_kind: Schema.Literals<readonly ["account", "organization"]>;
2147
+ readonly organization_id: Schema.optional<Schema.Codec<string, string, never, never>>;
2148
+ readonly reason_code: Schema.optional<Schema.Literals<readonly ["NOT_AUTHENTICATED", "EMAIL_DELIVERY_FAILED", "PROFILE_NOT_FOUND", "SMART_ACCOUNT_MISSING", "PLAYER_NOT_FOUND", "ACCOUNT_NOT_FOUND", "ACCOUNT_CLAIMED_BY_OTHER_SIGNER", "PROVIDER_ERROR", "CAPABILITY_UNAVAILABLE", "INVALID_INPUT", "ENV_MISSING", "NOT_IMPLEMENTED", "VERIFICATION_REQUIRED", "INSUFFICIENT_BALANCE", "INVALID_RECIPIENT", "ROLE_PERMISSION_DENIED", "TRANSACTION_FAILED", "RATE_LIMITED", "NETWORK_ERROR", "UNKNOWN", "OTP_EXPIRED", "SIGNER_REJECTED", "CANCELLED", "WRONG_STATE", "STALE_EPOCH", "SUPERSEDED", "WORK_DIED", "ACTOR_STOPPED"]>>;
2149
+ readonly step: Schema.Literals<readonly ["instructions_displayed", "address_copied", "copy_failed", "refusal_displayed", "retry_selected"]>;
2150
+ readonly account_kind: Schema.optional<Schema.Literals<readonly ["personalSafe", "orgTreasury"]>>;
2151
+ }>;
2152
+ }>;
2153
+ declare const PayrollGroupChangedTelemetryEventSchema: Schema.Struct<{
2154
+ readonly name: Schema.Literal<"payroll_group_changed">;
2155
+ readonly props: Schema.Struct<{
2156
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2157
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2158
+ readonly journey_id: Schema.optional<Schema.String>;
2159
+ readonly correlation_id: Schema.optional<Schema.String>;
2160
+ readonly sdk_version: Schema.optional<Schema.String>;
2161
+ readonly organization_id: Schema.Codec<string, string, never, never>;
2162
+ readonly change: Schema.Literals<readonly ["created", "updated", "deleted"]>;
2163
+ readonly group_id: Schema.String;
2164
+ readonly member_count: Schema.Number;
2165
+ readonly occurred_at: Schema.Number;
2166
+ }>;
2167
+ }>;
2168
+ declare const PayrollRunTransitionedTelemetryEventSchema: Schema.Struct<{
2169
+ readonly name: Schema.Literal<"payroll_run_transitioned">;
2170
+ readonly props: Schema.Struct<{
2171
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2172
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2173
+ readonly journey_id: Schema.optional<Schema.String>;
2174
+ readonly correlation_id: Schema.optional<Schema.String>;
2175
+ readonly sdk_version: Schema.optional<Schema.String>;
2176
+ readonly organization_id: Schema.Codec<string, string, never, never>;
2177
+ readonly transition: Schema.Literals<readonly ["prepared", "authorized", "settled"]>;
2178
+ readonly run_id: Schema.String;
2179
+ readonly payment_count: Schema.optional<Schema.Number>;
2180
+ readonly occurred_at: Schema.Number;
2181
+ }>;
2182
+ }>;
2183
+ declare const UiPayrollActionCompletedTelemetryEventSchema: Schema.Struct<{
2184
+ readonly name: Schema.Literal<"ui_payroll_action_completed">;
2185
+ readonly props: Schema.Struct<{
2186
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2187
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2188
+ readonly journey_id: Schema.optional<Schema.String>;
2189
+ readonly correlation_id: Schema.optional<Schema.String>;
2190
+ readonly sdk_version: Schema.optional<Schema.String>;
2191
+ readonly scope_kind: Schema.Literals<readonly ["account", "organization"]>;
2192
+ readonly organization_id: Schema.optional<Schema.Codec<string, string, never, never>>;
2193
+ readonly reason_code: Schema.optional<Schema.Literals<readonly ["NOT_AUTHENTICATED", "EMAIL_DELIVERY_FAILED", "PROFILE_NOT_FOUND", "SMART_ACCOUNT_MISSING", "PLAYER_NOT_FOUND", "ACCOUNT_NOT_FOUND", "ACCOUNT_CLAIMED_BY_OTHER_SIGNER", "PROVIDER_ERROR", "CAPABILITY_UNAVAILABLE", "INVALID_INPUT", "ENV_MISSING", "NOT_IMPLEMENTED", "VERIFICATION_REQUIRED", "INSUFFICIENT_BALANCE", "INVALID_RECIPIENT", "ROLE_PERMISSION_DENIED", "TRANSACTION_FAILED", "RATE_LIMITED", "NETWORK_ERROR", "UNKNOWN", "OTP_EXPIRED", "SIGNER_REJECTED", "CANCELLED", "WRONG_STATE", "STALE_EPOCH", "SUPERSEDED", "WORK_DIED", "ACTOR_STOPPED"]>>;
2194
+ readonly action: Schema.Literals<readonly ["opened", "refusal_displayed", "recovery_completed", "cancelled", "submitted_displayed"]>;
2195
+ readonly run_id: Schema.optional<Schema.String>;
2196
+ }>;
2197
+ }>;
1979
2198
  declare const TELEMETRY_EVENT_SCHEMAS: {
1980
2199
  readonly contact_relationship_changed: Schema.Struct<{
1981
2200
  readonly name: Schema.Literal<"contact_relationship_changed">;
@@ -1995,6 +2214,182 @@ declare const TELEMETRY_EVENT_SCHEMAS: {
1995
2214
  readonly operation: Schema.Literals<readonly ["addressBook.add", "addressBook.label", "addressBook.hide", "addressBook.unhide"]>;
1996
2215
  }>;
1997
2216
  }>;
2217
+ readonly access_recovery_completed: Schema.Struct<{
2218
+ readonly name: Schema.Literal<"access_recovery_completed">;
2219
+ readonly props: Schema.Union<readonly [Schema.Struct<{
2220
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2221
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2222
+ readonly journey_id: Schema.optional<Schema.String>;
2223
+ readonly correlation_id: Schema.optional<Schema.String>;
2224
+ readonly sdk_version: Schema.optional<Schema.String>;
2225
+ readonly recovery: Schema.Literal<"session_restoration">;
2226
+ readonly outcome: Schema.Literals<readonly ["restored", "absent", "failed"]>;
2227
+ readonly reason_code: Schema.optional<Schema.Literals<readonly ["NOT_AUTHENTICATED", "EMAIL_DELIVERY_FAILED", "PROFILE_NOT_FOUND", "SMART_ACCOUNT_MISSING", "PLAYER_NOT_FOUND", "ACCOUNT_NOT_FOUND", "ACCOUNT_CLAIMED_BY_OTHER_SIGNER", "PROVIDER_ERROR", "CAPABILITY_UNAVAILABLE", "INVALID_INPUT", "ENV_MISSING", "NOT_IMPLEMENTED", "VERIFICATION_REQUIRED", "INSUFFICIENT_BALANCE", "INVALID_RECIPIENT", "ROLE_PERMISSION_DENIED", "TRANSACTION_FAILED", "RATE_LIMITED", "NETWORK_ERROR", "UNKNOWN", "OTP_EXPIRED", "SIGNER_REJECTED", "CANCELLED", "WRONG_STATE", "STALE_EPOCH", "SUPERSEDED", "WORK_DIED", "ACTOR_STOPPED"]>>;
2228
+ readonly organization_id: Schema.optional<Schema.Codec<string, string, never, never>>;
2229
+ }>, Schema.Struct<{
2230
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2231
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2232
+ readonly journey_id: Schema.optional<Schema.String>;
2233
+ readonly correlation_id: Schema.optional<Schema.String>;
2234
+ readonly sdk_version: Schema.optional<Schema.String>;
2235
+ readonly recovery: Schema.Literal<"signer_readiness">;
2236
+ readonly outcome: Schema.Literals<readonly ["ready", "unavailable"]>;
2237
+ readonly reason_code: Schema.optional<Schema.Literals<readonly ["NOT_AUTHENTICATED", "EMAIL_DELIVERY_FAILED", "PROFILE_NOT_FOUND", "SMART_ACCOUNT_MISSING", "PLAYER_NOT_FOUND", "ACCOUNT_NOT_FOUND", "ACCOUNT_CLAIMED_BY_OTHER_SIGNER", "PROVIDER_ERROR", "CAPABILITY_UNAVAILABLE", "INVALID_INPUT", "ENV_MISSING", "NOT_IMPLEMENTED", "VERIFICATION_REQUIRED", "INSUFFICIENT_BALANCE", "INVALID_RECIPIENT", "ROLE_PERMISSION_DENIED", "TRANSACTION_FAILED", "RATE_LIMITED", "NETWORK_ERROR", "UNKNOWN", "OTP_EXPIRED", "SIGNER_REJECTED", "CANCELLED", "WRONG_STATE", "STALE_EPOCH", "SUPERSEDED", "WORK_DIED", "ACTOR_STOPPED"]>>;
2238
+ readonly organization_id: Schema.optional<Schema.Codec<string, string, never, never>>;
2239
+ }>]>;
2240
+ }>;
2241
+ readonly ui_access_step_completed: Schema.Struct<{
2242
+ readonly name: Schema.Literal<"ui_access_step_completed">;
2243
+ readonly props: Schema.Struct<{
2244
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2245
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2246
+ readonly journey_id: Schema.optional<Schema.String>;
2247
+ readonly correlation_id: Schema.optional<Schema.String>;
2248
+ readonly sdk_version: Schema.optional<Schema.String>;
2249
+ readonly scope_kind: Schema.Literals<readonly ["account", "organization"]>;
2250
+ readonly organization_id: Schema.optional<Schema.Codec<string, string, never, never>>;
2251
+ readonly reason_code: Schema.optional<Schema.Literals<readonly ["NOT_AUTHENTICATED", "EMAIL_DELIVERY_FAILED", "PROFILE_NOT_FOUND", "SMART_ACCOUNT_MISSING", "PLAYER_NOT_FOUND", "ACCOUNT_NOT_FOUND", "ACCOUNT_CLAIMED_BY_OTHER_SIGNER", "PROVIDER_ERROR", "CAPABILITY_UNAVAILABLE", "INVALID_INPUT", "ENV_MISSING", "NOT_IMPLEMENTED", "VERIFICATION_REQUIRED", "INSUFFICIENT_BALANCE", "INVALID_RECIPIENT", "ROLE_PERMISSION_DENIED", "TRANSACTION_FAILED", "RATE_LIMITED", "NETWORK_ERROR", "UNKNOWN", "OTP_EXPIRED", "SIGNER_REJECTED", "CANCELLED", "WRONG_STATE", "STALE_EPOCH", "SUPERSEDED", "WORK_DIED", "ACTOR_STOPPED"]>>;
2252
+ readonly step: Schema.Literals<readonly ["dashboard_granted", "redirect_completed", "gate_error_displayed", "retry_selected", "capability_refusal_displayed", "signer_refusal_displayed"]>;
2253
+ readonly capability: Schema.optional<Schema.Literals<readonly ["spend", "managePeople"]>>;
2254
+ readonly probe: Schema.optional<Schema.Literals<readonly ["session", "membership", "lifecycle"]>>;
2255
+ readonly reason: Schema.optional<Schema.Literals<readonly ["loading", "no-permission", "org-unavailable"]>>;
2256
+ }>;
2257
+ }>;
2258
+ readonly org_invite_progressed: Schema.Struct<{
2259
+ readonly name: Schema.Literal<"org_invite_progressed">;
2260
+ readonly props: Schema.Struct<{
2261
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2262
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2263
+ readonly journey_id: Schema.optional<Schema.String>;
2264
+ readonly correlation_id: Schema.optional<Schema.String>;
2265
+ readonly sdk_version: Schema.optional<Schema.String>;
2266
+ readonly organization_id: Schema.Codec<string, string, never, never>;
2267
+ readonly progress: Schema.Literals<readonly ["account_ready", "permission_applied", "membership_activated", "revoked"]>;
2268
+ /** The invited Party. The initiating actor stays on the envelope's identity. */
2269
+ readonly member_party_id: Schema.String;
2270
+ readonly occurred_at: Schema.Number;
2271
+ }>;
2272
+ }>;
2273
+ readonly invoice_issued: Schema.Struct<{
2274
+ readonly name: Schema.Literal<"invoice_issued">;
2275
+ readonly props: Schema.Struct<{
2276
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2277
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2278
+ readonly journey_id: Schema.optional<Schema.String>;
2279
+ readonly correlation_id: Schema.optional<Schema.String>;
2280
+ readonly sdk_version: Schema.optional<Schema.String>;
2281
+ readonly request_id: Schema.String;
2282
+ readonly issuer_scope_kind: Schema.Literals<readonly ["account", "organization"]>;
2283
+ readonly issuer_scope_id: Schema.String;
2284
+ readonly payer_party_id: Schema.optional<Schema.String>;
2285
+ readonly occurred_at: Schema.Number;
2286
+ }>;
2287
+ }>;
2288
+ readonly invoice_request_transitioned: Schema.Struct<{
2289
+ readonly name: Schema.Literal<"invoice_request_transitioned">;
2290
+ readonly props: Schema.Struct<{
2291
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2292
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2293
+ readonly journey_id: Schema.optional<Schema.String>;
2294
+ readonly correlation_id: Schema.optional<Schema.String>;
2295
+ readonly sdk_version: Schema.optional<Schema.String>;
2296
+ readonly request_id: Schema.String;
2297
+ readonly transition: Schema.Literals<readonly ["approval_prepared", "declined", "cancelled"]>;
2298
+ readonly actor_scope_kind: Schema.Literals<readonly ["account", "organization"]>;
2299
+ readonly actor_scope_id: Schema.String;
2300
+ readonly occurred_at: Schema.Number;
2301
+ }>;
2302
+ }>;
2303
+ readonly ui_invoice_step_completed: Schema.Struct<{
2304
+ readonly name: Schema.Literal<"ui_invoice_step_completed">;
2305
+ readonly props: Schema.Struct<{
2306
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2307
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2308
+ readonly journey_id: Schema.optional<Schema.String>;
2309
+ readonly correlation_id: Schema.optional<Schema.String>;
2310
+ readonly sdk_version: Schema.optional<Schema.String>;
2311
+ readonly scope_kind: Schema.Literals<readonly ["account", "organization"]>;
2312
+ readonly organization_id: Schema.optional<Schema.Codec<string, string, never, never>>;
2313
+ readonly reason_code: Schema.optional<Schema.Literals<readonly ["NOT_AUTHENTICATED", "EMAIL_DELIVERY_FAILED", "PROFILE_NOT_FOUND", "SMART_ACCOUNT_MISSING", "PLAYER_NOT_FOUND", "ACCOUNT_NOT_FOUND", "ACCOUNT_CLAIMED_BY_OTHER_SIGNER", "PROVIDER_ERROR", "CAPABILITY_UNAVAILABLE", "INVALID_INPUT", "ENV_MISSING", "NOT_IMPLEMENTED", "VERIFICATION_REQUIRED", "INSUFFICIENT_BALANCE", "INVALID_RECIPIENT", "ROLE_PERMISSION_DENIED", "TRANSACTION_FAILED", "RATE_LIMITED", "NETWORK_ERROR", "UNKNOWN", "OTP_EXPIRED", "SIGNER_REJECTED", "CANCELLED", "WRONG_STATE", "STALE_EPOCH", "SUPERSEDED", "WORK_DIED", "ACTOR_STOPPED"]>>;
2314
+ readonly step: Schema.Literals<readonly ["opened", "previewed", "dismissed", "submitted", "result_displayed", "refusal_displayed", "retry_selected"]>;
2315
+ readonly request_id: Schema.optional<Schema.String>;
2316
+ }>;
2317
+ }>;
2318
+ readonly ui_treasury_step_completed: Schema.Struct<{
2319
+ readonly name: Schema.Literal<"ui_treasury_step_completed">;
2320
+ readonly props: Schema.Struct<{
2321
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2322
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2323
+ readonly journey_id: Schema.optional<Schema.String>;
2324
+ readonly correlation_id: Schema.optional<Schema.String>;
2325
+ readonly sdk_version: Schema.optional<Schema.String>;
2326
+ readonly scope_kind: Schema.Literals<readonly ["account", "organization"]>;
2327
+ readonly organization_id: Schema.optional<Schema.Codec<string, string, never, never>>;
2328
+ readonly reason_code: Schema.optional<Schema.Literals<readonly ["NOT_AUTHENTICATED", "EMAIL_DELIVERY_FAILED", "PROFILE_NOT_FOUND", "SMART_ACCOUNT_MISSING", "PLAYER_NOT_FOUND", "ACCOUNT_NOT_FOUND", "ACCOUNT_CLAIMED_BY_OTHER_SIGNER", "PROVIDER_ERROR", "CAPABILITY_UNAVAILABLE", "INVALID_INPUT", "ENV_MISSING", "NOT_IMPLEMENTED", "VERIFICATION_REQUIRED", "INSUFFICIENT_BALANCE", "INVALID_RECIPIENT", "ROLE_PERMISSION_DENIED", "TRANSACTION_FAILED", "RATE_LIMITED", "NETWORK_ERROR", "UNKNOWN", "OTP_EXPIRED", "SIGNER_REJECTED", "CANCELLED", "WRONG_STATE", "STALE_EPOCH", "SUPERSEDED", "WORK_DIED", "ACTOR_STOPPED"]>>;
2329
+ readonly step: Schema.Literals<readonly ["balance_displayed", "read_refusal_displayed", "retry_selected", "recovery_completed"]>;
2330
+ readonly account_kind: Schema.optional<Schema.Literals<readonly ["personalSafe", "orgTreasury"]>>;
2331
+ }>;
2332
+ }>;
2333
+ readonly ui_receive_step_completed: Schema.Struct<{
2334
+ readonly name: Schema.Literal<"ui_receive_step_completed">;
2335
+ readonly props: Schema.Struct<{
2336
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2337
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2338
+ readonly journey_id: Schema.optional<Schema.String>;
2339
+ readonly correlation_id: Schema.optional<Schema.String>;
2340
+ readonly sdk_version: Schema.optional<Schema.String>;
2341
+ readonly scope_kind: Schema.Literals<readonly ["account", "organization"]>;
2342
+ readonly organization_id: Schema.optional<Schema.Codec<string, string, never, never>>;
2343
+ readonly reason_code: Schema.optional<Schema.Literals<readonly ["NOT_AUTHENTICATED", "EMAIL_DELIVERY_FAILED", "PROFILE_NOT_FOUND", "SMART_ACCOUNT_MISSING", "PLAYER_NOT_FOUND", "ACCOUNT_NOT_FOUND", "ACCOUNT_CLAIMED_BY_OTHER_SIGNER", "PROVIDER_ERROR", "CAPABILITY_UNAVAILABLE", "INVALID_INPUT", "ENV_MISSING", "NOT_IMPLEMENTED", "VERIFICATION_REQUIRED", "INSUFFICIENT_BALANCE", "INVALID_RECIPIENT", "ROLE_PERMISSION_DENIED", "TRANSACTION_FAILED", "RATE_LIMITED", "NETWORK_ERROR", "UNKNOWN", "OTP_EXPIRED", "SIGNER_REJECTED", "CANCELLED", "WRONG_STATE", "STALE_EPOCH", "SUPERSEDED", "WORK_DIED", "ACTOR_STOPPED"]>>;
2344
+ readonly step: Schema.Literals<readonly ["instructions_displayed", "address_copied", "copy_failed", "refusal_displayed", "retry_selected"]>;
2345
+ readonly account_kind: Schema.optional<Schema.Literals<readonly ["personalSafe", "orgTreasury"]>>;
2346
+ }>;
2347
+ }>;
2348
+ readonly payroll_group_changed: Schema.Struct<{
2349
+ readonly name: Schema.Literal<"payroll_group_changed">;
2350
+ readonly props: Schema.Struct<{
2351
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2352
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2353
+ readonly journey_id: Schema.optional<Schema.String>;
2354
+ readonly correlation_id: Schema.optional<Schema.String>;
2355
+ readonly sdk_version: Schema.optional<Schema.String>;
2356
+ readonly organization_id: Schema.Codec<string, string, never, never>;
2357
+ readonly change: Schema.Literals<readonly ["created", "updated", "deleted"]>;
2358
+ readonly group_id: Schema.String;
2359
+ readonly member_count: Schema.Number;
2360
+ readonly occurred_at: Schema.Number;
2361
+ }>;
2362
+ }>;
2363
+ readonly payroll_run_transitioned: Schema.Struct<{
2364
+ readonly name: Schema.Literal<"payroll_run_transitioned">;
2365
+ readonly props: Schema.Struct<{
2366
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2367
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2368
+ readonly journey_id: Schema.optional<Schema.String>;
2369
+ readonly correlation_id: Schema.optional<Schema.String>;
2370
+ readonly sdk_version: Schema.optional<Schema.String>;
2371
+ readonly organization_id: Schema.Codec<string, string, never, never>;
2372
+ readonly transition: Schema.Literals<readonly ["prepared", "authorized", "settled"]>;
2373
+ readonly run_id: Schema.String;
2374
+ readonly payment_count: Schema.optional<Schema.Number>;
2375
+ readonly occurred_at: Schema.Number;
2376
+ }>;
2377
+ }>;
2378
+ readonly ui_payroll_action_completed: Schema.Struct<{
2379
+ readonly name: Schema.Literal<"ui_payroll_action_completed">;
2380
+ readonly props: Schema.Struct<{
2381
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2382
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2383
+ readonly journey_id: Schema.optional<Schema.String>;
2384
+ readonly correlation_id: Schema.optional<Schema.String>;
2385
+ readonly sdk_version: Schema.optional<Schema.String>;
2386
+ readonly scope_kind: Schema.Literals<readonly ["account", "organization"]>;
2387
+ readonly organization_id: Schema.optional<Schema.Codec<string, string, never, never>>;
2388
+ readonly reason_code: Schema.optional<Schema.Literals<readonly ["NOT_AUTHENTICATED", "EMAIL_DELIVERY_FAILED", "PROFILE_NOT_FOUND", "SMART_ACCOUNT_MISSING", "PLAYER_NOT_FOUND", "ACCOUNT_NOT_FOUND", "ACCOUNT_CLAIMED_BY_OTHER_SIGNER", "PROVIDER_ERROR", "CAPABILITY_UNAVAILABLE", "INVALID_INPUT", "ENV_MISSING", "NOT_IMPLEMENTED", "VERIFICATION_REQUIRED", "INSUFFICIENT_BALANCE", "INVALID_RECIPIENT", "ROLE_PERMISSION_DENIED", "TRANSACTION_FAILED", "RATE_LIMITED", "NETWORK_ERROR", "UNKNOWN", "OTP_EXPIRED", "SIGNER_REJECTED", "CANCELLED", "WRONG_STATE", "STALE_EPOCH", "SUPERSEDED", "WORK_DIED", "ACTOR_STOPPED"]>>;
2389
+ readonly action: Schema.Literals<readonly ["opened", "refusal_displayed", "recovery_completed", "cancelled", "submitted_displayed"]>;
2390
+ readonly run_id: Schema.optional<Schema.String>;
2391
+ }>;
2392
+ }>;
1998
2393
  readonly ui_contact_action_completed: Schema.Struct<{
1999
2394
  readonly name: Schema.Literal<"ui_contact_action_completed">;
2000
2395
  readonly props: Schema.Union<readonly [Schema.Struct<{
@@ -2212,6 +2607,24 @@ declare const TELEMETRY_EVENT_SCHEMAS: {
2212
2607
  readonly reason: Schema.optional<Schema.String>;
2213
2608
  }>;
2214
2609
  }>;
2610
+ readonly identity_refused: Schema.Struct<{
2611
+ readonly name: Schema.Literal<"identity_refused">;
2612
+ readonly props: Schema.Struct<{
2613
+ readonly capxul_env: Schema.Literals<readonly ["development", "staging", "production", "unknown", "local"]>;
2614
+ readonly producer: Schema.Literals<readonly ["server", "browser", "sdk", "mcp", "e2e"]>;
2615
+ readonly journey_id: Schema.optional<Schema.String>;
2616
+ readonly correlation_id: Schema.optional<Schema.String>;
2617
+ readonly sdk_version: Schema.optional<Schema.String>;
2618
+ /** The refused identity event tag, for example CreateOrganization. */
2619
+ readonly event: Schema.optional<Schema.String>;
2620
+ /** The machine's refusal code: WRONG_STATE, SUPERSEDED or STALE_EPOCH. */
2621
+ readonly refusal_code: Schema.optional<Schema.String>;
2622
+ /** The machine slot the request targeted, for example identity:org. */
2623
+ readonly slot: Schema.optional<Schema.String>;
2624
+ /** The machine state at refusal, for example authenticated:claiming. */
2625
+ readonly state: Schema.optional<Schema.String>;
2626
+ }>;
2627
+ }>;
2215
2628
  readonly auth_signed_out: Schema.Struct<{
2216
2629
  readonly name: Schema.Literal<"auth_signed_out">;
2217
2630
  readonly props: Schema.Struct<{
@@ -3072,10 +3485,33 @@ declare const TELEMETRY_EVENT_SCHEMAS: {
3072
3485
  readonly journey_id: Schema.optional<Schema.String>;
3073
3486
  readonly correlation_id: Schema.optional<Schema.String>;
3074
3487
  readonly sdk_version: Schema.optional<Schema.String>;
3488
+ /** The RECEIPT verification outcome. What the mirror then did is separate. */
3075
3489
  readonly outcome: Schema.String;
3076
3490
  readonly reason: Schema.String;
3077
3491
  readonly chain_id: Schema.Number;
3078
3492
  readonly retry_count: Schema.Number;
3493
+ /**
3494
+ * #1960 R02, consumed by R03. A verified receipt is not an applied Permission:
3495
+ * these two optional fields let the producer say what the applying mutation
3496
+ * actually returned, and which command it was, without either fact rewriting
3497
+ * the receipt outcome above. Absent when application has not happened yet.
3498
+ */
3499
+ readonly application_result: Schema.optional<Schema.Literals<readonly ["applied", "replayed", "conflicting_replay", "revision_mismatch"]>>;
3500
+ readonly command_id: Schema.optional<Schema.String>;
3501
+ /**
3502
+ * #1961 R03. The authorized stored row names the Permission it changed; the
3503
+ * verified receipt names the chain facts that prove it. Every field is
3504
+ * optional because a pending or provider-failed verification has neither an
3505
+ * application result nor a receipt to report.
3506
+ */
3507
+ readonly permission_id: Schema.optional<Schema.String>;
3508
+ readonly permission_assignment_id: Schema.optional<Schema.String>;
3509
+ readonly permission_operation: Schema.optional<Schema.Literals<readonly ["create", "change", "assign", "revoke", "replace"]>>;
3510
+ readonly revision: Schema.optional<Schema.Number>;
3511
+ readonly user_op_hash: Schema.optional<Schema.String>;
3512
+ readonly transaction_hash: Schema.optional<Schema.String>;
3513
+ readonly block_number: Schema.optional<Schema.Number>;
3514
+ readonly log_index: Schema.optional<Schema.Number>;
3079
3515
  }>;
3080
3516
  }>;
3081
3517
  readonly movement_scan_window: Schema.Struct<{
@@ -3131,7 +3567,7 @@ declare const FINANCIAL_OPS_TARGET_TELEMETRY_PRODUCERS: readonly [];
3131
3567
  * A domain node removes its entry when it adds the producer. The telemetry
3132
3568
  * gate rejects an entry that has a producer.
3133
3569
  */
3134
- declare const CONTRACT_FIRST_TELEMETRY_EVENTS: readonly [];
3570
+ declare const CONTRACT_FIRST_TELEMETRY_EVENTS: readonly ["org_invite_progressed", "invoice_issued", "invoice_request_transitioned", "payroll_group_changed", "payroll_run_transitioned"];
3135
3571
  /**
3136
3572
  * Catalog events whose product mapper remains gated on the #1150 frontend
3137
3573
  * adoption. L1 S1 removes their retired SDK-flow producers without inventing
@@ -3141,7 +3577,7 @@ declare const CONTRACT_FIRST_TELEMETRY_EVENTS: readonly [];
3141
3577
  */
3142
3578
  declare const PRODUCT_MAPPER_GATED_TELEMETRY_EVENTS: readonly ["auth_otp_expired"];
3143
3579
  /** Catalogued browser observations whose producers remain owned by app adoption. */
3144
- declare const BROWSER_GATED_TELEMETRY_EVENTS: readonly ["onboarding_intent_selected", "onboarding_profile_submitted", "onboarding_organization_submitted", "onboarding_dashboard_reached", "ui_activity_action_completed", "ui_contact_action_completed"];
3580
+ declare const BROWSER_GATED_TELEMETRY_EVENTS: readonly ["onboarding_intent_selected", "onboarding_profile_submitted", "onboarding_organization_submitted", "onboarding_dashboard_reached", "ui_activity_action_completed", "ui_contact_action_completed", "ui_access_step_completed", "ui_invoice_step_completed", "ui_treasury_step_completed", "ui_receive_step_completed", "ui_payroll_action_completed"];
3145
3581
  interface TelemetryIdentifyInput {
3146
3582
  readonly distinctId: string;
3147
3583
  readonly anonDistinctId?: AnonymousDistinctId;
@@ -3360,4 +3796,4 @@ declare class InMemoryTelemetryBusAdapter implements TelemetryPort {
3360
3796
  reportHandledError(_error: CapxulError, _context?: HandledErrorReportContext): Effect.Effect<void, never>;
3361
3797
  }
3362
3798
  //#endregion
3363
- export { AccountBalanceFailedTelemetryEventSchema, AccountBalanceReadTelemetryEventSchema, ActivityAnnotationSavedTelemetryEventSchema, AuthFailedTelemetryEventSchema, AuthOtpDeliveredTelemetryEventSchema, AuthOtpExpiredTelemetryEventSchema, AuthOtpRequestedTelemetryEventSchema, AuthSignedOutTelemetryEventSchema, AuthVerifiedTelemetryEventSchema, BROWSER_GATED_TELEMETRY_EVENTS, BootstrapFailedTelemetryEventSchema, BootstrapResolvedTelemetryEventSchema, BundlerErrorTelemetryEventSchema, CAPXUL_ENVS, CAPXUL_OPERATIONS, CONTRACT_FIRST_TELEMETRY_EVENTS, CapturedNetworkRequestLike, CapxulBrowserAnalyticsInput, CapxulEnv, type CapxulOperation, ChainAttemptSchema, ChainUpstreamFallbackTelemetryEventSchema, ChainUpstreamSchema, ContactRelationshipChangedTelemetryEventSchema, DepositInitiatedTelemetryEventSchema, DepositSettledTelemetryEventSchema, FINANCIAL_OPS_TARGET_TELEMETRY_PRODUCERS, FailureModeSchema, FaucetConfirmedTelemetryEventSchema, FaucetFailedTelemetryEventSchema, FaucetRequestedTelemetryEventSchema, FunnelJourney, FunnelStepPropertyFilter, type HandledErrorReportContext, InMemoryTelemetryBusAdapter, InitializePostHogBrowserAnalyticsInput, Journey, MemberActivationFailedTelemetryEventSchema, MemberActivationReadyTelemetryEventSchema, MemberActivationStartedTelemetryEventSchema, MovementScanCheckpointTelemetryEventSchema, MovementScanIncidentTelemetryEventSchema, MovementScanWindowTelemetryEventSchema, NonEmptyTelemetryEventNames, type NormalizedCapxulOperation, OnboardingDashboardReachedTelemetryEventSchema, OnboardingIntentSelectedTelemetryEventSchema, OnboardingOrganizationSubmittedTelemetryEventSchema, OnboardingProfileSubmittedTelemetryEventSchema, OperationRetriedTelemetryEventSchema, OrgCreateFailedTelemetryEventSchema, OrgCreateStartedTelemetryEventSchema, OrgCreatedTelemetryEventSchema, OrgInviteAcceptedTelemetryEventSchema, OrgInviteExpiredTelemetryEventSchema, OrgInviteSentTelemetryEventSchema, OrgRolesSeededTelemetryEventSchema, OrgSafeConfirmedTelemetryEventSchema, OrgSafeCreatedTelemetryEventSchema, OrganizationCreationFailedTelemetryEventSchema, OrganizationCreationReadyTelemetryEventSchema, OrganizationCreationStartedTelemetryEventSchema, PII, PRODUCT_MAPPER_GATED_TELEMETRY_EVENTS, PaymentFailedTelemetryEventSchema, PaymentInitiatedTelemetryEventSchema, PaymentLifecycleTransitionTelemetryEventSchema, PaymentSettledTelemetryEventSchema, PaymentVerificationRetryTelemetryEventSchema, PermissionMirrorVerificationTelemetryEventSchema, PointEventJourney, PostHogBeforeSend, PostHogBrowserCapture, PostHogBrowserInitialize, PostHogBrowserOptions, PostHogBrowserPageviewClient, PostHogProductAppOptions, PostHogTelemetryAdapter, PostHogUtilityAppOptions, ProvisioningSafeConfirmedTelemetryEventSchema, ProvisioningSafeCreatedTelemetryEventSchema, QuickPayExternalAddressAcknowledgedTelemetryEventSchema, ReceiptPendingTelemetryEventSchema, RecordingTelemetryAdapter, ResponseHeadersSchema, SYNCABLE_CAPXUL_ENVS, TELEMETRY_EVENT_NAMES, TELEMETRY_EVENT_SCHEMAS, TELEMETRY_JOURNEYS, TELEMETRY_PRODUCERS, TelemetryEnvelopeDefaults, TelemetryEvent, TelemetryEventName, TelemetryGroupInput, TelemetryIdentifyInput, type TelemetryPort, TelemetryProducer, TelemetryProps, TelemetryRedactionOptions, TrackHandler, UiActivityActionCompletedTelemetryEventSchema, UiContactActionCompletedTelemetryEventSchema, createCapxulBeforeSend, createPostHogBrowserPageviewTracker, getTrackHandler, initializeCapxulBrowserAnalytics, initializePostHogBrowserAnalytics, isCapxulOperation, maskCapturedNetworkRequest, normalizeCapxulOperation, productAppAnalytics, redactTelemetryEvent, redactTelemetryProps, sanitizePostHogBrowserEvent, setTrackHandler, stampTelemetryEnvelope, track, utilityAppAnalytics };
3799
+ export { AccessRecoveryCompletedTelemetryEventSchema, AccountBalanceFailedTelemetryEventSchema, AccountBalanceReadTelemetryEventSchema, ActivityAnnotationSavedTelemetryEventSchema, AuthFailedTelemetryEventSchema, AuthOtpDeliveredTelemetryEventSchema, AuthOtpExpiredTelemetryEventSchema, AuthOtpRequestedTelemetryEventSchema, AuthSignedOutTelemetryEventSchema, AuthVerifiedTelemetryEventSchema, BROWSER_GATED_TELEMETRY_EVENTS, BootstrapFailedTelemetryEventSchema, BootstrapResolvedTelemetryEventSchema, BundlerErrorTelemetryEventSchema, CAPXUL_ENVS, CAPXUL_OPERATIONS, CONTRACT_FIRST_TELEMETRY_EVENTS, CapturedNetworkRequestLike, CapxulBrowserAnalyticsInput, CapxulEnv, type CapxulOperation, ChainAttemptSchema, ChainUpstreamFallbackTelemetryEventSchema, ChainUpstreamSchema, ContactRelationshipChangedTelemetryEventSchema, DepositInitiatedTelemetryEventSchema, DepositSettledTelemetryEventSchema, FINANCIAL_OPS_TARGET_TELEMETRY_PRODUCERS, FailureModeSchema, FaucetConfirmedTelemetryEventSchema, FaucetFailedTelemetryEventSchema, FaucetRequestedTelemetryEventSchema, FunnelJourney, FunnelStepPropertyFilter, type HandledErrorReportContext, IdentityRefusedTelemetryEventSchema, InMemoryTelemetryBusAdapter, InitializePostHogBrowserAnalyticsInput, InvoiceIssuedTelemetryEventSchema, InvoiceRequestTransitionedTelemetryEventSchema, Journey, MemberActivationFailedTelemetryEventSchema, MemberActivationReadyTelemetryEventSchema, MemberActivationStartedTelemetryEventSchema, MovementScanCheckpointTelemetryEventSchema, MovementScanIncidentTelemetryEventSchema, MovementScanWindowTelemetryEventSchema, NonEmptyTelemetryEventNames, type NormalizedCapxulOperation, OnboardingDashboardReachedTelemetryEventSchema, OnboardingIntentSelectedTelemetryEventSchema, OnboardingOrganizationSubmittedTelemetryEventSchema, OnboardingProfileSubmittedTelemetryEventSchema, OperationRetriedTelemetryEventSchema, OrgCreateFailedTelemetryEventSchema, OrgCreateStartedTelemetryEventSchema, OrgCreatedTelemetryEventSchema, OrgInviteAcceptedTelemetryEventSchema, OrgInviteExpiredTelemetryEventSchema, OrgInviteProgressedTelemetryEventSchema, OrgInviteSentTelemetryEventSchema, OrgRolesSeededTelemetryEventSchema, OrgSafeConfirmedTelemetryEventSchema, OrgSafeCreatedTelemetryEventSchema, OrganizationCreationFailedTelemetryEventSchema, OrganizationCreationReadyTelemetryEventSchema, OrganizationCreationStartedTelemetryEventSchema, PII, PRODUCT_MAPPER_GATED_TELEMETRY_EVENTS, PaymentFailedTelemetryEventSchema, PaymentInitiatedTelemetryEventSchema, PaymentLifecycleTransitionTelemetryEventSchema, PaymentSettledTelemetryEventSchema, PaymentVerificationRetryTelemetryEventSchema, PayrollGroupChangedTelemetryEventSchema, PayrollRunTransitionedTelemetryEventSchema, PermissionMirrorVerificationTelemetryEventSchema, PointEventJourney, PostHogBeforeSend, PostHogBrowserCapture, PostHogBrowserInitialize, PostHogBrowserOptions, PostHogBrowserPageviewClient, PostHogProductAppOptions, PostHogTelemetryAdapter, PostHogUtilityAppOptions, ProvisioningSafeConfirmedTelemetryEventSchema, ProvisioningSafeCreatedTelemetryEventSchema, QuickPayExternalAddressAcknowledgedTelemetryEventSchema, ReceiptPendingTelemetryEventSchema, RecordingTelemetryAdapter, ResponseHeadersSchema, SYNCABLE_CAPXUL_ENVS, TELEMETRY_EVENT_NAMES, TELEMETRY_EVENT_SCHEMAS, TELEMETRY_JOURNEYS, TELEMETRY_PRODUCERS, TelemetryEnvelopeDefaults, TelemetryEvent, TelemetryEventName, TelemetryGroupInput, TelemetryIdentifyInput, type TelemetryPort, TelemetryProducer, TelemetryProps, TelemetryRedactionOptions, TrackHandler, UiAccessStepCompletedTelemetryEventSchema, UiActivityActionCompletedTelemetryEventSchema, UiContactActionCompletedTelemetryEventSchema, UiInvoiceStepCompletedTelemetryEventSchema, UiPayrollActionCompletedTelemetryEventSchema, UiReceiveStepCompletedTelemetryEventSchema, UiTreasuryStepCompletedTelemetryEventSchema, createCapxulBeforeSend, createPostHogBrowserPageviewTracker, getTrackHandler, initializeCapxulBrowserAnalytics, initializePostHogBrowserAnalytics, isCapxulOperation, maskCapturedNetworkRequest, normalizeCapxulOperation, productAppAnalytics, redactTelemetryEvent, redactTelemetryProps, sanitizePostHogBrowserEvent, setTrackHandler, stampTelemetryEnvelope, track, utilityAppAnalytics };
package/dist/index.mjs CHANGED
@@ -114,6 +114,8 @@ const CAPXUL_OPERATIONS = {
114
114
  emitAnnotationSaved: "activity.emitAnnotationSaved",
115
115
  get: "activity.get",
116
116
  list: "activity.list",
117
+ /** The SDK's live Activity read over the indexer's SSE stream. */
118
+ subscribe: "activity.subscribe",
117
119
  summary: "activity.summary"
118
120
  },
119
121
  addressBook: {
@@ -473,6 +475,7 @@ const TELEMETRY_EVENT_NAMES = [
473
475
  "auth_otp_expired",
474
476
  "auth_verified",
475
477
  "auth_failed",
478
+ "identity_refused",
476
479
  "auth_signed_out",
477
480
  "onboarding_intent_selected",
478
481
  "onboarding_profile_submitted",
@@ -521,7 +524,18 @@ const TELEMETRY_EVENT_NAMES = [
521
524
  "activity_annotation_saved",
522
525
  "ui_activity_action_completed",
523
526
  "contact_relationship_changed",
524
- "ui_contact_action_completed"
527
+ "ui_contact_action_completed",
528
+ "access_recovery_completed",
529
+ "ui_access_step_completed",
530
+ "org_invite_progressed",
531
+ "invoice_issued",
532
+ "invoice_request_transitioned",
533
+ "ui_invoice_step_completed",
534
+ "ui_treasury_step_completed",
535
+ "ui_receive_step_completed",
536
+ "payroll_group_changed",
537
+ "payroll_run_transitioned",
538
+ "ui_payroll_action_completed"
525
539
  ];
526
540
  const TELEMETRY_JOURNEYS = {
527
541
  returning_user_login: {
@@ -869,6 +883,17 @@ const AuthFailedProps = Schema.Struct({
869
883
  auth_type: OptionalString,
870
884
  reason: OptionalString
871
885
  });
886
+ const IdentityRefusedProps = Schema.Struct({
887
+ ...TelemetryEnvelopeProps,
888
+ /** The refused identity event tag, for example CreateOrganization. */
889
+ event: OptionalString,
890
+ /** The machine's refusal code: WRONG_STATE, SUPERSEDED or STALE_EPOCH. */
891
+ refusal_code: OptionalString,
892
+ /** The machine slot the request targeted, for example identity:org. */
893
+ slot: OptionalString,
894
+ /** The machine state at refusal, for example authenticated:claiming. */
895
+ state: OptionalString
896
+ });
872
897
  const AuthSignedOutProps = Schema.Struct(TelemetryEnvelopeProps);
873
898
  const ProvisioningSafeCreatedProps = Schema.Struct({
874
899
  ...TelemetryEnvelopeProps,
@@ -1256,10 +1281,44 @@ const DepositSettledProps = Schema.Struct({
1256
1281
  });
1257
1282
  const PermissionMirrorVerificationProps = Schema.Struct({
1258
1283
  ...TelemetryEnvelopeProps,
1284
+ /** The RECEIPT verification outcome. What the mirror then did is separate. */
1259
1285
  outcome: Schema.String,
1260
1286
  reason: Schema.String,
1261
1287
  chain_id: Schema.Number,
1262
- retry_count: Schema.Number
1288
+ retry_count: Schema.Number,
1289
+ /**
1290
+ * #1960 R02, consumed by R03. A verified receipt is not an applied Permission:
1291
+ * these two optional fields let the producer say what the applying mutation
1292
+ * actually returned, and which command it was, without either fact rewriting
1293
+ * the receipt outcome above. Absent when application has not happened yet.
1294
+ */
1295
+ application_result: Schema.optional(Schema.Literals([
1296
+ "applied",
1297
+ "replayed",
1298
+ "conflicting_replay",
1299
+ "revision_mismatch"
1300
+ ])),
1301
+ command_id: OptionalString,
1302
+ /**
1303
+ * #1961 R03. The authorized stored row names the Permission it changed; the
1304
+ * verified receipt names the chain facts that prove it. Every field is
1305
+ * optional because a pending or provider-failed verification has neither an
1306
+ * application result nor a receipt to report.
1307
+ */
1308
+ permission_id: OptionalString,
1309
+ permission_assignment_id: OptionalString,
1310
+ permission_operation: Schema.optional(Schema.Literals([
1311
+ "create",
1312
+ "change",
1313
+ "assign",
1314
+ "revoke",
1315
+ "replace"
1316
+ ])),
1317
+ revision: Schema.optional(Schema.Number),
1318
+ user_op_hash: OptionalString,
1319
+ transaction_hash: OptionalString,
1320
+ block_number: Schema.optional(Schema.Number),
1321
+ log_index: Schema.optional(Schema.Number)
1263
1322
  });
1264
1323
  const MovementScanWindowProps = Schema.Struct({
1265
1324
  ...TelemetryEnvelopeProps,
@@ -1305,6 +1364,10 @@ const AuthFailedTelemetryEventSchema = Schema.Struct({
1305
1364
  name: Schema.Literal("auth_failed"),
1306
1365
  props: AuthFailedProps
1307
1366
  });
1367
+ const IdentityRefusedTelemetryEventSchema = Schema.Struct({
1368
+ name: Schema.Literal("identity_refused"),
1369
+ props: IdentityRefusedProps
1370
+ });
1308
1371
  const AuthSignedOutTelemetryEventSchema = Schema.Struct({
1309
1372
  name: Schema.Literal("auth_signed_out"),
1310
1373
  props: AuthSignedOutProps
@@ -1485,6 +1548,10 @@ const MovementScanIncidentTelemetryEventSchema = Schema.Struct({
1485
1548
  name: Schema.Literal("movement_scan_incident"),
1486
1549
  props: MovementScanIncidentProps
1487
1550
  });
1551
+ /** The one spelling of "whose scope did this happen in" across every surface. */
1552
+ const ScopeKindSchema = Schema.Literals(["account", "organization"]);
1553
+ const AccountKindSchema = Schema.Literals(["personalSafe", "orgTreasury"]);
1554
+ const OptionalReasonCode = Schema.optional(Schema.Literals(CAPXUL_ERROR_CODES));
1488
1555
  const ActivityReferenceProps = {
1489
1556
  reference_kind: Schema.Literals(["payment", "movement"]),
1490
1557
  reference_id: Schema.String
@@ -1515,8 +1582,8 @@ const ActivityFilterProps = {
1515
1582
  };
1516
1583
  const ActivityActionProps = {
1517
1584
  ...TelemetryEnvelopeProps,
1518
- scope_kind: Schema.Literals(["account", "organization"]),
1519
- reason_code: Schema.optional(Schema.Literals(CAPXUL_ERROR_CODES))
1585
+ scope_kind: ScopeKindSchema,
1586
+ reason_code: OptionalReasonCode
1520
1587
  };
1521
1588
  const ContactRelationshipChangedTelemetryEventSchema = Schema.Struct({
1522
1589
  name: Schema.Literal("contact_relationship_changed"),
@@ -1528,7 +1595,7 @@ const ContactRelationshipChangedTelemetryEventSchema = Schema.Struct({
1528
1595
  "hidden",
1529
1596
  "restored"
1530
1597
  ]),
1531
- scope_kind: Schema.Literals(["account", "organization"]),
1598
+ scope_kind: ScopeKindSchema,
1532
1599
  scope_id: Schema.String,
1533
1600
  owner_party_id: Schema.String,
1534
1601
  party_id: Schema.String,
@@ -1544,9 +1611,9 @@ const ContactRelationshipChangedTelemetryEventSchema = Schema.Struct({
1544
1611
  });
1545
1612
  const ContactActionProps = {
1546
1613
  ...TelemetryEnvelopeProps,
1547
- scope_kind: Schema.Literals(["account", "organization"]),
1614
+ scope_kind: ScopeKindSchema,
1548
1615
  party_id: OptionalString,
1549
- reason_code: Schema.optional(Schema.Literals(CAPXUL_ERROR_CODES))
1616
+ reason_code: OptionalReasonCode
1550
1617
  };
1551
1618
  const UiContactActionCompletedTelemetryEventSchema = Schema.Struct({
1552
1619
  name: Schema.Literal("ui_contact_action_completed"),
@@ -1573,7 +1640,7 @@ const ActivityAnnotationSavedTelemetryEventSchema = Schema.Struct({
1573
1640
  props: Schema.Struct({
1574
1641
  ...TelemetryEnvelopeProps,
1575
1642
  ...ActivityReferenceProps,
1576
- scope_kind: Schema.Literals(["account", "organization"]),
1643
+ scope_kind: ScopeKindSchema,
1577
1644
  scope_id: Schema.String,
1578
1645
  occurred_at: Schema.Number
1579
1646
  })
@@ -1628,8 +1695,206 @@ const UiActivityActionCompletedTelemetryEventSchema = Schema.Struct({
1628
1695
  })
1629
1696
  ])
1630
1697
  });
1698
+ /**
1699
+ * Reliability closeout (#1960 R02) — the shape every explicit UI observation
1700
+ * below shares. `scope_kind` says whose surface the person was looking at,
1701
+ * `organization_id` is the verified Organization the producer resolved (absent
1702
+ * on a personal action), and `reason_code` is a catalog error code, never copy.
1703
+ */
1704
+ const UiStepProps = {
1705
+ ...TelemetryEnvelopeProps,
1706
+ scope_kind: ScopeKindSchema,
1707
+ organization_id: OptionalOrgId,
1708
+ reason_code: OptionalReasonCode
1709
+ };
1710
+ const AccessRecoveryCompletedProps = Schema.Union([Schema.Struct({
1711
+ ...TelemetryEnvelopeProps,
1712
+ recovery: Schema.Literal("session_restoration"),
1713
+ outcome: Schema.Literals([
1714
+ "restored",
1715
+ "absent",
1716
+ "failed"
1717
+ ]),
1718
+ reason_code: OptionalReasonCode,
1719
+ organization_id: OptionalOrgId
1720
+ }), Schema.Struct({
1721
+ ...TelemetryEnvelopeProps,
1722
+ recovery: Schema.Literal("signer_readiness"),
1723
+ outcome: Schema.Literals(["ready", "unavailable"]),
1724
+ reason_code: OptionalReasonCode,
1725
+ organization_id: OptionalOrgId
1726
+ })]);
1727
+ const AccessRecoveryCompletedTelemetryEventSchema = Schema.Struct({
1728
+ name: Schema.Literal("access_recovery_completed"),
1729
+ props: AccessRecoveryCompletedProps
1730
+ });
1731
+ const UiAccessStepCompletedTelemetryEventSchema = Schema.Struct({
1732
+ name: Schema.Literal("ui_access_step_completed"),
1733
+ props: Schema.Struct({
1734
+ ...UiStepProps,
1735
+ step: Schema.Literals([
1736
+ "dashboard_granted",
1737
+ "redirect_completed",
1738
+ "gate_error_displayed",
1739
+ "retry_selected",
1740
+ "capability_refusal_displayed",
1741
+ "signer_refusal_displayed"
1742
+ ]),
1743
+ capability: Schema.optional(Schema.Literals(["spend", "managePeople"])),
1744
+ probe: Schema.optional(Schema.Literals([
1745
+ "session",
1746
+ "membership",
1747
+ "lifecycle"
1748
+ ])),
1749
+ reason: Schema.optional(Schema.Literals([
1750
+ "loading",
1751
+ "no-permission",
1752
+ "org-unavailable"
1753
+ ]))
1754
+ })
1755
+ });
1756
+ const OrgInviteProgressedTelemetryEventSchema = Schema.Struct({
1757
+ name: Schema.Literal("org_invite_progressed"),
1758
+ props: Schema.Struct({
1759
+ ...TelemetryEnvelopeProps,
1760
+ organization_id: OrgIdTelemetrySchema,
1761
+ progress: Schema.Literals([
1762
+ "account_ready",
1763
+ "permission_applied",
1764
+ "membership_activated",
1765
+ "revoked"
1766
+ ]),
1767
+ /** The invited Party. The initiating actor stays on the envelope's identity. */
1768
+ member_party_id: Schema.String,
1769
+ occurred_at: Schema.Number
1770
+ })
1771
+ });
1772
+ const InvoiceIssuedTelemetryEventSchema = Schema.Struct({
1773
+ name: Schema.Literal("invoice_issued"),
1774
+ props: Schema.Struct({
1775
+ ...TelemetryEnvelopeProps,
1776
+ request_id: Schema.String,
1777
+ issuer_scope_kind: ScopeKindSchema,
1778
+ issuer_scope_id: Schema.String,
1779
+ payer_party_id: OptionalString,
1780
+ occurred_at: Schema.Number
1781
+ })
1782
+ });
1783
+ const InvoiceRequestTransitionedTelemetryEventSchema = Schema.Struct({
1784
+ name: Schema.Literal("invoice_request_transitioned"),
1785
+ props: Schema.Struct({
1786
+ ...TelemetryEnvelopeProps,
1787
+ request_id: Schema.String,
1788
+ transition: Schema.Literals([
1789
+ "approval_prepared",
1790
+ "declined",
1791
+ "cancelled"
1792
+ ]),
1793
+ actor_scope_kind: ScopeKindSchema,
1794
+ actor_scope_id: Schema.String,
1795
+ occurred_at: Schema.Number
1796
+ })
1797
+ });
1798
+ const UiInvoiceStepCompletedTelemetryEventSchema = Schema.Struct({
1799
+ name: Schema.Literal("ui_invoice_step_completed"),
1800
+ props: Schema.Struct({
1801
+ ...UiStepProps,
1802
+ step: Schema.Literals([
1803
+ "opened",
1804
+ "previewed",
1805
+ "dismissed",
1806
+ "submitted",
1807
+ "result_displayed",
1808
+ "refusal_displayed",
1809
+ "retry_selected"
1810
+ ]),
1811
+ request_id: OptionalString
1812
+ })
1813
+ });
1814
+ const UiTreasuryStepCompletedTelemetryEventSchema = Schema.Struct({
1815
+ name: Schema.Literal("ui_treasury_step_completed"),
1816
+ props: Schema.Struct({
1817
+ ...UiStepProps,
1818
+ step: Schema.Literals([
1819
+ "balance_displayed",
1820
+ "read_refusal_displayed",
1821
+ "retry_selected",
1822
+ "recovery_completed"
1823
+ ]),
1824
+ account_kind: Schema.optional(AccountKindSchema)
1825
+ })
1826
+ });
1827
+ const UiReceiveStepCompletedTelemetryEventSchema = Schema.Struct({
1828
+ name: Schema.Literal("ui_receive_step_completed"),
1829
+ props: Schema.Struct({
1830
+ ...UiStepProps,
1831
+ step: Schema.Literals([
1832
+ "instructions_displayed",
1833
+ "address_copied",
1834
+ "copy_failed",
1835
+ "refusal_displayed",
1836
+ "retry_selected"
1837
+ ]),
1838
+ account_kind: Schema.optional(AccountKindSchema)
1839
+ })
1840
+ });
1841
+ const PayrollGroupChangedTelemetryEventSchema = Schema.Struct({
1842
+ name: Schema.Literal("payroll_group_changed"),
1843
+ props: Schema.Struct({
1844
+ ...TelemetryEnvelopeProps,
1845
+ organization_id: OrgIdTelemetrySchema,
1846
+ change: Schema.Literals([
1847
+ "created",
1848
+ "updated",
1849
+ "deleted"
1850
+ ]),
1851
+ group_id: Schema.String,
1852
+ member_count: Schema.Number,
1853
+ occurred_at: Schema.Number
1854
+ })
1855
+ });
1856
+ const PayrollRunTransitionedTelemetryEventSchema = Schema.Struct({
1857
+ name: Schema.Literal("payroll_run_transitioned"),
1858
+ props: Schema.Struct({
1859
+ ...TelemetryEnvelopeProps,
1860
+ organization_id: OrgIdTelemetrySchema,
1861
+ transition: Schema.Literals([
1862
+ "prepared",
1863
+ "authorized",
1864
+ "settled"
1865
+ ]),
1866
+ run_id: Schema.String,
1867
+ payment_count: Schema.optional(Schema.Number),
1868
+ occurred_at: Schema.Number
1869
+ })
1870
+ });
1871
+ const UiPayrollActionCompletedTelemetryEventSchema = Schema.Struct({
1872
+ name: Schema.Literal("ui_payroll_action_completed"),
1873
+ props: Schema.Struct({
1874
+ ...UiStepProps,
1875
+ action: Schema.Literals([
1876
+ "opened",
1877
+ "refusal_displayed",
1878
+ "recovery_completed",
1879
+ "cancelled",
1880
+ "submitted_displayed"
1881
+ ]),
1882
+ run_id: OptionalString
1883
+ })
1884
+ });
1631
1885
  const TELEMETRY_EVENT_SCHEMAS = {
1632
1886
  contact_relationship_changed: ContactRelationshipChangedTelemetryEventSchema,
1887
+ access_recovery_completed: AccessRecoveryCompletedTelemetryEventSchema,
1888
+ ui_access_step_completed: UiAccessStepCompletedTelemetryEventSchema,
1889
+ org_invite_progressed: OrgInviteProgressedTelemetryEventSchema,
1890
+ invoice_issued: InvoiceIssuedTelemetryEventSchema,
1891
+ invoice_request_transitioned: InvoiceRequestTransitionedTelemetryEventSchema,
1892
+ ui_invoice_step_completed: UiInvoiceStepCompletedTelemetryEventSchema,
1893
+ ui_treasury_step_completed: UiTreasuryStepCompletedTelemetryEventSchema,
1894
+ ui_receive_step_completed: UiReceiveStepCompletedTelemetryEventSchema,
1895
+ payroll_group_changed: PayrollGroupChangedTelemetryEventSchema,
1896
+ payroll_run_transitioned: PayrollRunTransitionedTelemetryEventSchema,
1897
+ ui_payroll_action_completed: UiPayrollActionCompletedTelemetryEventSchema,
1633
1898
  ui_contact_action_completed: UiContactActionCompletedTelemetryEventSchema,
1634
1899
  activity_annotation_saved: ActivityAnnotationSavedTelemetryEventSchema,
1635
1900
  ui_activity_action_completed: UiActivityActionCompletedTelemetryEventSchema,
@@ -1638,6 +1903,7 @@ const TELEMETRY_EVENT_SCHEMAS = {
1638
1903
  auth_otp_expired: AuthOtpExpiredTelemetryEventSchema,
1639
1904
  auth_verified: AuthVerifiedTelemetryEventSchema,
1640
1905
  auth_failed: AuthFailedTelemetryEventSchema,
1906
+ identity_refused: IdentityRefusedTelemetryEventSchema,
1641
1907
  auth_signed_out: AuthSignedOutTelemetryEventSchema,
1642
1908
  onboarding_intent_selected: OnboardingIntentSelectedTelemetryEventSchema,
1643
1909
  onboarding_profile_submitted: OnboardingProfileSubmittedTelemetryEventSchema,
@@ -1691,7 +1957,13 @@ const FINANCIAL_OPS_TARGET_TELEMETRY_PRODUCERS = [];
1691
1957
  * A domain node removes its entry when it adds the producer. The telemetry
1692
1958
  * gate rejects an entry that has a producer.
1693
1959
  */
1694
- const CONTRACT_FIRST_TELEMETRY_EVENTS = [];
1960
+ const CONTRACT_FIRST_TELEMETRY_EVENTS = [
1961
+ "org_invite_progressed",
1962
+ "invoice_issued",
1963
+ "invoice_request_transitioned",
1964
+ "payroll_group_changed",
1965
+ "payroll_run_transitioned"
1966
+ ];
1695
1967
  /**
1696
1968
  * Catalog events whose product mapper remains gated on the #1150 frontend
1697
1969
  * adoption. L1 S1 removes their retired SDK-flow producers without inventing
@@ -1707,7 +1979,12 @@ const BROWSER_GATED_TELEMETRY_EVENTS = [
1707
1979
  "onboarding_organization_submitted",
1708
1980
  "onboarding_dashboard_reached",
1709
1981
  "ui_activity_action_completed",
1710
- "ui_contact_action_completed"
1982
+ "ui_contact_action_completed",
1983
+ "ui_access_step_completed",
1984
+ "ui_invoice_step_completed",
1985
+ "ui_treasury_step_completed",
1986
+ "ui_receive_step_completed",
1987
+ "ui_payroll_action_completed"
1711
1988
  ];
1712
1989
  let trackHandler = () => {};
1713
1990
  function setTrackHandler(handler) {
@@ -2289,4 +2566,4 @@ function rotr(value, bits) {
2289
2566
  return value >>> bits | value << 32 - bits;
2290
2567
  }
2291
2568
  //#endregion
2292
- export { AccountBalanceFailedTelemetryEventSchema, AccountBalanceReadTelemetryEventSchema, ActivityAnnotationSavedTelemetryEventSchema, AuthFailedTelemetryEventSchema, AuthOtpDeliveredTelemetryEventSchema, AuthOtpExpiredTelemetryEventSchema, AuthOtpRequestedTelemetryEventSchema, AuthSignedOutTelemetryEventSchema, AuthVerifiedTelemetryEventSchema, BROWSER_GATED_TELEMETRY_EVENTS, BootstrapFailedTelemetryEventSchema, BootstrapResolvedTelemetryEventSchema, BundlerErrorTelemetryEventSchema, CAPXUL_ENVS, CAPXUL_OPERATIONS, CONTRACT_FIRST_TELEMETRY_EVENTS, ChainAttemptSchema, ChainUpstreamFallbackTelemetryEventSchema, ChainUpstreamSchema, ContactRelationshipChangedTelemetryEventSchema, DepositInitiatedTelemetryEventSchema, DepositSettledTelemetryEventSchema, FINANCIAL_OPS_TARGET_TELEMETRY_PRODUCERS, FailureModeSchema, FaucetConfirmedTelemetryEventSchema, FaucetFailedTelemetryEventSchema, FaucetRequestedTelemetryEventSchema, InMemoryTelemetryBusAdapter, MemberActivationFailedTelemetryEventSchema, MemberActivationReadyTelemetryEventSchema, MemberActivationStartedTelemetryEventSchema, MovementScanCheckpointTelemetryEventSchema, MovementScanIncidentTelemetryEventSchema, MovementScanWindowTelemetryEventSchema, OnboardingDashboardReachedTelemetryEventSchema, OnboardingIntentSelectedTelemetryEventSchema, OnboardingOrganizationSubmittedTelemetryEventSchema, OnboardingProfileSubmittedTelemetryEventSchema, OperationRetriedTelemetryEventSchema, OrgCreateFailedTelemetryEventSchema, OrgCreateStartedTelemetryEventSchema, OrgCreatedTelemetryEventSchema, OrgInviteAcceptedTelemetryEventSchema, OrgInviteExpiredTelemetryEventSchema, OrgInviteSentTelemetryEventSchema, OrgRolesSeededTelemetryEventSchema, OrgSafeConfirmedTelemetryEventSchema, OrgSafeCreatedTelemetryEventSchema, OrganizationCreationFailedTelemetryEventSchema, OrganizationCreationReadyTelemetryEventSchema, OrganizationCreationStartedTelemetryEventSchema, PII, PRODUCT_MAPPER_GATED_TELEMETRY_EVENTS, PaymentFailedTelemetryEventSchema, PaymentInitiatedTelemetryEventSchema, PaymentLifecycleTransitionTelemetryEventSchema, PaymentSettledTelemetryEventSchema, PaymentVerificationRetryTelemetryEventSchema, PermissionMirrorVerificationTelemetryEventSchema, PostHogTelemetryAdapter, ProvisioningSafeConfirmedTelemetryEventSchema, ProvisioningSafeCreatedTelemetryEventSchema, QuickPayExternalAddressAcknowledgedTelemetryEventSchema, ReceiptPendingTelemetryEventSchema, RecordingTelemetryAdapter, ResponseHeadersSchema, SYNCABLE_CAPXUL_ENVS, TELEMETRY_EVENT_NAMES, TELEMETRY_EVENT_SCHEMAS, TELEMETRY_JOURNEYS, TELEMETRY_PRODUCERS, UiActivityActionCompletedTelemetryEventSchema, UiContactActionCompletedTelemetryEventSchema, createCapxulBeforeSend, createPostHogBrowserPageviewTracker, getTrackHandler, initializeCapxulBrowserAnalytics, initializePostHogBrowserAnalytics, isCapxulOperation, maskCapturedNetworkRequest, normalizeCapxulOperation, productAppAnalytics, redactTelemetryEvent, redactTelemetryProps, sanitizePostHogBrowserEvent, setTrackHandler, stampTelemetryEnvelope, track, utilityAppAnalytics };
2569
+ export { AccessRecoveryCompletedTelemetryEventSchema, AccountBalanceFailedTelemetryEventSchema, AccountBalanceReadTelemetryEventSchema, ActivityAnnotationSavedTelemetryEventSchema, AuthFailedTelemetryEventSchema, AuthOtpDeliveredTelemetryEventSchema, AuthOtpExpiredTelemetryEventSchema, AuthOtpRequestedTelemetryEventSchema, AuthSignedOutTelemetryEventSchema, AuthVerifiedTelemetryEventSchema, BROWSER_GATED_TELEMETRY_EVENTS, BootstrapFailedTelemetryEventSchema, BootstrapResolvedTelemetryEventSchema, BundlerErrorTelemetryEventSchema, CAPXUL_ENVS, CAPXUL_OPERATIONS, CONTRACT_FIRST_TELEMETRY_EVENTS, ChainAttemptSchema, ChainUpstreamFallbackTelemetryEventSchema, ChainUpstreamSchema, ContactRelationshipChangedTelemetryEventSchema, DepositInitiatedTelemetryEventSchema, DepositSettledTelemetryEventSchema, FINANCIAL_OPS_TARGET_TELEMETRY_PRODUCERS, FailureModeSchema, FaucetConfirmedTelemetryEventSchema, FaucetFailedTelemetryEventSchema, FaucetRequestedTelemetryEventSchema, IdentityRefusedTelemetryEventSchema, InMemoryTelemetryBusAdapter, InvoiceIssuedTelemetryEventSchema, InvoiceRequestTransitionedTelemetryEventSchema, MemberActivationFailedTelemetryEventSchema, MemberActivationReadyTelemetryEventSchema, MemberActivationStartedTelemetryEventSchema, MovementScanCheckpointTelemetryEventSchema, MovementScanIncidentTelemetryEventSchema, MovementScanWindowTelemetryEventSchema, OnboardingDashboardReachedTelemetryEventSchema, OnboardingIntentSelectedTelemetryEventSchema, OnboardingOrganizationSubmittedTelemetryEventSchema, OnboardingProfileSubmittedTelemetryEventSchema, OperationRetriedTelemetryEventSchema, OrgCreateFailedTelemetryEventSchema, OrgCreateStartedTelemetryEventSchema, OrgCreatedTelemetryEventSchema, OrgInviteAcceptedTelemetryEventSchema, OrgInviteExpiredTelemetryEventSchema, OrgInviteProgressedTelemetryEventSchema, OrgInviteSentTelemetryEventSchema, OrgRolesSeededTelemetryEventSchema, OrgSafeConfirmedTelemetryEventSchema, OrgSafeCreatedTelemetryEventSchema, OrganizationCreationFailedTelemetryEventSchema, OrganizationCreationReadyTelemetryEventSchema, OrganizationCreationStartedTelemetryEventSchema, PII, PRODUCT_MAPPER_GATED_TELEMETRY_EVENTS, PaymentFailedTelemetryEventSchema, PaymentInitiatedTelemetryEventSchema, PaymentLifecycleTransitionTelemetryEventSchema, PaymentSettledTelemetryEventSchema, PaymentVerificationRetryTelemetryEventSchema, PayrollGroupChangedTelemetryEventSchema, PayrollRunTransitionedTelemetryEventSchema, PermissionMirrorVerificationTelemetryEventSchema, PostHogTelemetryAdapter, ProvisioningSafeConfirmedTelemetryEventSchema, ProvisioningSafeCreatedTelemetryEventSchema, QuickPayExternalAddressAcknowledgedTelemetryEventSchema, ReceiptPendingTelemetryEventSchema, RecordingTelemetryAdapter, ResponseHeadersSchema, SYNCABLE_CAPXUL_ENVS, TELEMETRY_EVENT_NAMES, TELEMETRY_EVENT_SCHEMAS, TELEMETRY_JOURNEYS, TELEMETRY_PRODUCERS, UiAccessStepCompletedTelemetryEventSchema, UiActivityActionCompletedTelemetryEventSchema, UiContactActionCompletedTelemetryEventSchema, UiInvoiceStepCompletedTelemetryEventSchema, UiPayrollActionCompletedTelemetryEventSchema, UiReceiveStepCompletedTelemetryEventSchema, UiTreasuryStepCompletedTelemetryEventSchema, createCapxulBeforeSend, createPostHogBrowserPageviewTracker, getTrackHandler, initializeCapxulBrowserAnalytics, initializePostHogBrowserAnalytics, isCapxulOperation, maskCapturedNetworkRequest, normalizeCapxulOperation, productAppAnalytics, redactTelemetryEvent, redactTelemetryProps, sanitizePostHogBrowserEvent, setTrackHandler, stampTelemetryEnvelope, track, utilityAppAnalytics };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capxul/observability",
3
- "version": "4.2.0-rc.1",
3
+ "version": "4.2.0-rc.11",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",