@capxul/cli 4.20.0-beta.27 → 4.20.0-beta.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -184,7 +184,9 @@ An agent gives the person the link and runs `next.argv`. `payment wait
184
184
  APPROVAL_ID` follows the approval: once it is approved it sends it (unless the
185
185
  page already did; only one send can claim it) and waits for the payment to
186
186
  settle. Its result is the SDK's `{ approval, payments }`. An Organization
187
- payment's wait carries `--org`.
187
+ payment's wait carries `--org`. Without `--timeout-seconds`, `payment wait` follows
188
+ until the approval lapses and the payment settles, as `send` does; with it, the wait
189
+ stops after that many seconds (1 to 3600) with exit 5 and the same command to run again.
188
190
 
189
191
  ## Personal Payments
190
192
 
@@ -192,11 +194,13 @@ payment's wait carries `--org`.
192
194
  capxul payment retry PAYMENT_ID --json
193
195
  capxul payment list --json
194
196
  capxul payment get PAYMENT_ID --json
197
+ capxul payment wait PAYMENT_ID --json
195
198
  capxul payment wait PAYMENT_ID --timeout-seconds 120 --json
196
199
  ```
197
200
 
198
201
  These commands use the current authenticated session. Add `--email EMAIL` to
199
202
  select a saved session. In a terminal, omit the required Payment ID to enter it.
203
+ `wait` follows a Payment until it ends unless `--timeout-seconds` bounds it.
200
204
  `get` refuses when the Payment is absent or unavailable to the session. Human
201
205
  output shows the full ID, status, amount, counterparty and available receipt.
202
206
 
@@ -297,7 +301,9 @@ Issue accepts a basic payment request or an Invoice request JSON object from
297
301
  `--input FILE` or `--input -`. Both require `payer` and an exact positive
298
302
  `amount`. A basic request requires an explicit `reference` and accepts an
299
303
  optional private `memo`. An Invoice request also supplies `invoice`.
300
- Issue saves available document PDFs in the common directory by default.
304
+ Issue saves no file. Its human output names the `document render` command for
305
+ each document, and its JSON result is `{ scope, direction, item }`: the issued
306
+ request with its document references, with no document output.
301
307
  Human and JSON output include `checkoutUrl` for an Invoice or Memo request
302
308
  instruction with a link token. Invoice requests keep `/checkout/invoices/`.
303
309
  Basic requests use `/checkout/requests/`. Movement documents do not create
@@ -307,9 +313,8 @@ For a custom deployment, set `CAPXUL_CHECKOUT_FRONTEND_ORIGIN` in both the CLI
307
313
  and backend environments. Use the same frontend origin for both.
308
314
  Offer create, get, list, revise, and deactivate output also include `checkoutUrl`.
309
315
  The checkout page reads current terms and status when the link opens.
310
- Use `--output-dir DIRECTORY` to change that location. A PDF failure retains the
311
- issued request and its document references. Do not issue it again to retry PDF
312
- output; use the printed document render command.
316
+ Save a PDF with the printed `document render` command. Do not issue the request
317
+ again to get a PDF.
313
318
 
314
319
  ```json
315
320
  {
@@ -361,7 +366,6 @@ CLI signer and the SDK fulfillment API. Organization payment requires the
361
366
  selected Permission; the backend checks Budget and spending authority. The
362
367
  command publishes prepared Payment IDs before signing. A submitted Payment
363
368
  is not a settled Payment. Use the printed get/wait commands to inspect its state.
364
- Returned documents use the same default PDF directory.
365
369
 
366
370
  A lost reply or timeout gives exact readback in the same session and scope.
367
371
  Pay refuses an already prepared Invoice unless you explicitly use `--resume`
@@ -393,12 +397,14 @@ file metadata. Each render uses a new private directory and preserves earlier
393
397
  files. `export` writes the original bytes to a new file.
394
398
  It refuses an existing output file.
395
399
 
396
- Reads never write files. Payment `get`, `wait` and `list`, Activity detail and
397
- Payroll `get` and `wait` name each document with the `document render` command
398
- that saves it. Payment `send` and `retry`, Payroll `run` and Inbox `pay` still
399
- save available documents as PDFs in the same directory and report them in their
400
- result. Pending or unavailable documents retain that state. A document failure
401
- does not change the Payment result or start another Payment.
400
+ Only `document render` and `document export` write files. Reads name each
401
+ document with the `document render` command that saves it: Payment `get`, `wait`
402
+ and `list`, Activity detail, Payroll `get` and `wait`. Writes save nothing either.
403
+ Payment `send` and `retry`, Payroll `run` and Inbox `pay` end with
404
+ `Save the receipt: capxul document render …` once the receipt exists, and
405
+ `request issue` prints that command for each document it issued. No write
406
+ result carries document output. A document that is still pending is named by
407
+ `payment get`.
402
408
 
403
409
  ## Contact commands
404
410
 
@@ -560,11 +566,16 @@ Every Budget write supplies the complete policy:
560
566
  "scope": {
561
567
  "recipients": { "type": "allowlist", "accounts": ["account_alice"] },
562
568
  "actions": ["pay"]
563
- }
569
+ },
570
+ "refill": "monthly"
564
571
  }
565
572
  ```
566
573
 
567
574
  Use an exact admitted AssetId for `A`. The cap must be positive and finite.
575
+ `refill` is `monthly`, which refills the cap every 30 days (a fixed period from
576
+ the block that sets it, not a calendar month), or `none`. A create without
577
+ `refill` means `none`. A change without `refill` keeps the Budget's current
578
+ refill; write `"refill": "none"` to turn a refill off.
568
579
  Recipients are `anyone` or 1 to 32 unique Account IDs. Actions are `pay`,
569
580
  `commitments`, or both. `pay` covers single and batch Payments. Missing scope,
570
581
  duplicate recipients/actions, unknown fields, and an asset mismatch refuse.
@@ -580,7 +591,14 @@ and printed before the first write. Scripted runs require `--request-key` and
580
591
  `--confirm`.
581
592
 
582
593
  Success means submitted and pending application. It does not prove active
583
- rights. After an interruption or uncertain result, retain the original input,
594
+ rights. Add `--wait` to `create`, `change`, `assign`, `revoke` or `replace` to
595
+ follow the submitted command to its end, as `org permission command wait` does:
596
+ it stops when the command is applied, failed or needs action. The result then
597
+ also holds `command`, the command's view (`status` is `applied`, `failed` or
598
+ `actionable`), and exits 0 in each case, as `command wait` does; read `status`.
599
+ `--timeout-seconds` bounds the signing and, separately, the wait. A wait that
600
+ runs out of time fails with exit 5 and prints the exact `command get` and
601
+ `command wait` lines. After an interruption or uncertain result, retain the original input,
584
602
  Organization ID, key, command ID, and execution ID. The key alone cannot restore
585
603
  wizard/stdin input.
586
604
 
@@ -803,7 +821,14 @@ SDK's own value for the command, with no CLI wrapper. A list is the SDK page,
803
821
  `{ items, nextCursor }`; pass `nextCursor` back as `--after` where the command
804
822
  takes one. `--fields a,b` keeps only those fields of `data` (`amount.value`
805
823
  reaches inside an object; a list keeps `nextCursor` and picks from each item).
806
- `--fields` without `--json` refuses.
824
+ `--fields` without `--json` refuses, and so does a typo: a name the result lacks that is a
825
+ letter or two off a name it has (exit 2, `field: "fields"`); the message names it, the
826
+ closest real field and the fields in this result. Any other name the result lacks, such as
827
+ an optional `execution` on a Payment that has none, is left out, as `jq` would.
828
+ The four commands that move money (`payment send`, `payment retry`, `inbox pay`,
829
+ `org payroll run`) check the names against the result they declare before they
830
+ run, so a typo never costs an approval: `status`, `approvalId`, `approvalUrl`,
831
+ `paymentIds`, `expiresAt` and `next`.
807
832
 
808
833
  A failure contains `error`:
809
834
 
@@ -825,13 +850,21 @@ not grant authority or bypass current checks. `error.details.recovery` keeps
825
850
  its `kind` (`read` or `retry`) next to the same `argv`.
826
851
 
827
852
  A person sees one red line for what happened and one for what fixes it (on the
828
- same line when both fit in 80 columns):
853
+ same line when both fit in 80 columns), then a dim last line, `ref <id>`, for
854
+ support:
829
855
 
830
856
  ```text
831
857
  ✗ Unknown command "paymnt". Did you mean: capxul payment list
832
858
  ✗ Not signed in. Try: capxul auth login
859
+ ref 6a0e10d1-06fb-4eed-9c2a-1f6f0c2b7d11
833
860
  ```
834
861
 
862
+ The `ref` is the backend's request ID when the error carries one, else its
863
+ correlation ID, else this run's `invocationId`. A mistyped command has none,
864
+ because no command started. An error that already quotes its request ID in its
865
+ sentence (a redacted backend error) has no `ref` line. JSON output has no `ref`
866
+ line and is unchanged: read `error.details.requestId` or `invocationId`.
867
+
835
868
  A wallet failure
836
869
  also includes its known `error.mode` and allowed `error.details`: wallet stage,
837
870
  operation, provider, provider code, and HTTP status. An unknown browser failure
@@ -918,7 +951,7 @@ sign-in; it sets `NEXT_PUBLIC_CAPXUL_PUBLISHABLE_KEY` and `CAPXUL_SITE_URL` in
918
951
  journeys with the built CLI against the local DevNet: sign in, `dev fund`, the home
919
952
  screen, a payment (refused with its fix while the wallet setup is unfinished, as
920
953
  it is on a DevNet with no wallet provider), requests, offers, Inbox, Organizations,
921
- the account, `schema`, a typo's fix and `dev key`. The `capxul dev journeys` job in
954
+ the account, `schema`, a typo's fix and `dev key`. The `cli-journeys` job in
922
955
  `.github/workflows/devnet-integration.yml` starts the DevNet and runs it.
923
956
 
924
957
  ## Development commands
@@ -1042,7 +1075,7 @@ a concurrent logout from being undone by a delayed credential save. The backend
1042
1075
  owns expiry and revocation. A failed remote logout is reported as `unconfirmed`;
1043
1076
  local sign-out remains in effect.
1044
1077
 
1045
- `auth profile` returns a backend-read Profile and account lifecycle without opening
1078
+ `account show` returns a backend-read Profile and account lifecycle without opening
1046
1079
  the browser. Successful email authentication can return `setupState: "setup-required"`.
1047
1080
  `account retry` returns `setupState: "ready"` only after Core reads a ready Account.
1048
1081
  After logout, profile reads refuse with `NOT_AUTHENTICATED` and exit 3. An invalid
@@ -1057,7 +1090,7 @@ capxul account retry --email you@example.com --wizard
1057
1090
 
1058
1091
  The terminal shows the verified session, Account ID and current lifecycle before
1059
1092
  confirmation. A ready Account starts no wallet work. Missing Account or Profile
1060
- state directs to `account retry`. A deadline stops waiting; check `account status`
1093
+ state directs to `account retry`. A deadline stops waiting; check `account show`
1061
1094
  for the same session before retrying.
1062
1095
 
1063
1096
  Read an Organization treasury or deposit target:
@@ -1117,7 +1150,7 @@ capxul offer deactivate OFFER_ID --expected-revision 2 --confirm
1117
1150
  capxul offer list --org ORG_ID
1118
1151
  ```
1119
1152
 
1120
- Use `org offer` and `--org ORG_ID` for each Organization command. Use `--email`
1153
+ Add `--org ORG_ID` to run any of these as an Organization. Use `--email`
1121
1154
  to select a saved session. Scripts must supply `--confirm` for each write.
1122
1155
  A terminal shows the proposed change and asks for confirmation. Use `--json`
1123
1156
  for structured output. Lists and reads create no PDF.
@@ -1153,16 +1186,16 @@ reference. Separate purchasers receive separate checkout and settlement IDs.
1153
1186
  ## Request and document flow
1154
1187
 
1155
1188
  Alice issues a basic request or an Invoice to Bob with `request issue`. For an Organization issuer,
1156
- Alice uses `org request issue --org ORGANIZATION_ID`. Issuance saves Alice's PDF
1157
- by default and returns the request ID, document references, and checkout URL.
1189
+ Alice uses `request issue --org ORGANIZATION_ID`. Issuance returns the request ID,
1190
+ document references, and checkout URL. Alice saves her PDF with the printed
1191
+ `document render` command.
1158
1192
  Bob runs `inbox list`, then `inbox get REQUEST_ID`. An Organization
1159
- payer uses the equivalent `org inbox` commands with its explicit Organization.
1193
+ payer uses the same `inbox` commands with `--org`.
1160
1194
 
1161
- Bob's Inbox contains the request and document references. It does not receive a
1162
- local PDF automatically. Bob uses the printed `document render` command to save
1163
- his copy. Both participants read the same verified document. Their files can
1164
- have different local paths. `status` shows available request and document counts;
1165
- it does not download documents.
1195
+ Bob's Inbox contains the request and document references. Bob uses the printed
1196
+ `document render` command to save his copy. Both participants read the same verified document. Their files can
1197
+ have different local paths. The home screen (`capxul`) shows how many requests wait
1198
+ for you; it does not download documents.
1166
1199
 
1167
1200
  A direct Payment uses the existing Payment and Activity commands. Alice inspects
1168
1201
  her outgoing records. Bob inspects his incoming records after the backend observes
@@ -1176,10 +1209,10 @@ access remains available through the saved document and content hashes. Keep
1176
1209
  those references when retaining a cancelled Invoice.
1177
1210
 
1178
1211
  The shared document directory is `documents` next to the CLI settings directory.
1179
- `CAPXUL_CLI_HOME` selects a separate CLI settings directory. `--output-dir` changes
1180
- the document output location for supported document and payment commands. Each
1181
- render preserves previous files. A failed PDF render does not repeat issuance or
1182
- payment. Retry `document render` with the existing document references.
1212
+ `CAPXUL_CLI_HOME` selects a separate CLI settings directory. `document render
1213
+ --output-dir` changes the document output location. Each render preserves
1214
+ previous files. A failed PDF render does not repeat issuance or payment. Retry
1215
+ `document render` with the existing document references.
1183
1216
 
1184
1217
  ## Checkout links
1185
1218
 
@@ -8883,28 +8883,28 @@
8883
8883
  * @since 4.0.0
8884
8884
  */
8885
8885
  function makeFormatterDefault() {
8886
- return (issue) => formatIssue(issue, "");
8886
+ return (issue) => formatIssue$1(issue, "");
8887
8887
  }
8888
8888
  /** @internal */
8889
8889
  const defaultFormatter$1 = /*#__PURE__*/ makeFormatterDefault();
8890
- function formatIssue(issue, path) {
8890
+ function formatIssue$1(issue, path) {
8891
8891
  let message;
8892
8892
  switch (issue._tag) {
8893
8893
  case "Filter": {
8894
8894
  const annotated = defaultCheckHook(issue);
8895
8895
  if (annotated !== void 0) message = annotated;
8896
8896
  else {
8897
- if (issue.issue._tag !== "InvalidValue") return formatIssue(issue.issue, path);
8897
+ if (issue.issue._tag !== "InvalidValue") return formatIssue$1(issue.issue, path);
8898
8898
  const expected = findExpected(issue.issue);
8899
8899
  message = expected === void 0 ? getExpectedMessage(formatCheck(issue.filter), issue) : getExpectedMessage(expected, issue.issue);
8900
8900
  }
8901
8901
  break;
8902
8902
  }
8903
- case "Encoding": return formatIssue(issue.issue, path);
8904
- case "Pointer": return formatIssue(issue.issue, path + formatPath(issue.path));
8903
+ case "Encoding": return formatIssue$1(issue.issue, path);
8904
+ case "Pointer": return formatIssue$1(issue.issue, path + formatPath(issue.path));
8905
8905
  case "Composite":
8906
8906
  case "AnyOf":
8907
- if (issue._tag === "Composite" || issue.issues.length > 0) return issue.issues.map((issue) => formatIssue(issue, path)).join("\n");
8907
+ if (issue._tag === "Composite" || issue.issues.length > 0) return issue.issues.map((issue) => formatIssue$1(issue, path)).join("\n");
8908
8908
  message = findMessage(issue) ?? getExpectedMessage(getExpected(issue.ast), issue);
8909
8909
  break;
8910
8910
  default: message = defaultLeafHook(issue);
@@ -13427,7 +13427,7 @@
13427
13427
  },
13428
13428
  anonymousId: {
13429
13429
  maxLength: 128,
13430
- pattern: /^anon_[A-Za-z0-9-]+$/u
13430
+ pattern: /^(?:anon_[A-Za-z0-9-]+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/u
13431
13431
  },
13432
13432
  traceparent: {
13433
13433
  maxLength: 55,
@@ -20343,6 +20343,15 @@ ensure: Operation.action("documents.memos.ensure", {
20343
20343
  })
20344
20344
  };
20345
20345
  //#endregion
20346
+ //#region ../../packages/protocol/src/evm/role-dsl.ts
20347
+ /**
20348
+ * How a capped Budget's allowance refills (#2298). `monthly` refills the
20349
+ * allowance to its cap every 30 days. Roles v2 counts fixed periods from the
20350
+ * moment the allowance is set; it has no calendar month. Absent means `none`:
20351
+ * the cap is one pot that spending drains for good.
20352
+ */
20353
+ const ORG_BUDGET_REFILLS = ["monthly", "none"];
20354
+ //#endregion
20346
20355
  //#region ../../packages/protocol/src/permissions/permission-schema.ts
20347
20356
  /**
20348
20357
  * One stored `setAllowance` call inside a command's expected authority set.
@@ -20381,12 +20390,19 @@ ensure: Operation.action("documents.memos.ensure", {
20381
20390
  })]),
20382
20391
  actions: NonEmptyArray(Literals(["pay", "commitments"]))
20383
20392
  }).pipe(refine((scope) => new Set(scope.actions).size === scope.actions.length && (scope.recipients.type === "anyone" || scope.recipients.accounts.length >= 1 && scope.recipients.accounts.length <= 32 && new Set(scope.recipients.accounts).size === scope.recipients.accounts.length), { message: "Budget scope requires unique actions and one to 32 unique allowed Accounts" }));
20393
+ /**
20394
+ * How a capped Budget refills (#2298): `monthly` tops the cap back up every 30
20395
+ * days (a fixed Roles v2 period, not a calendar month); `none` never refills.
20396
+ * Absent means `none`, and writers store only `monthly`.
20397
+ */
20398
+ const BudgetRefillSchema = Literals(ORG_BUDGET_REFILLS);
20384
20399
  /** The accepted product policy stored with one Permission revision. */
20385
20400
  const CurrentPolicySchema = Union([Struct({
20386
20401
  type: Literal("budget"),
20387
20402
  asset: AssetIdSchema,
20388
20403
  limit: NullOr(String$1),
20389
- scope: BudgetScopeSchema
20404
+ scope: BudgetScopeSchema,
20405
+ refill: optional(BudgetRefillSchema)
20390
20406
  }), Struct({ type: Literal("managePeople") })]);
20391
20407
  const BudgetIntentSchema = CurrentPolicySchema.pipe(refine((value) => {
20392
20408
  if (value.type !== "budget") return false;
@@ -20451,7 +20467,8 @@ ensure: Operation.action("documents.memos.ensure", {
20451
20467
  "send",
20452
20468
  "sendBatch",
20453
20469
  "createCommitment"
20454
- ]))
20470
+ ])),
20471
+ refill: optional(BudgetRefillSchema)
20455
20472
  });
20456
20473
  const PermissionRecipientBindingSchema = Struct({
20457
20474
  accountId: AccountIdSchema$1,
@@ -20463,14 +20480,16 @@ ensure: Operation.action("documents.memos.ensure", {
20463
20480
  type: Literal("budget"),
20464
20481
  asset: AssetIdSchema,
20465
20482
  limit: NullOr(AssetAmountSchema),
20466
- scope: optional(BudgetScopeSchema)
20483
+ scope: optional(BudgetScopeSchema),
20484
+ refill: optional(BudgetRefillSchema)
20467
20485
  }).pipe(refine((intent) => intent.limit === null || intent.limit.asset === intent.asset, { message: "Budget limit must use the Budget asset" })), Struct({ type: Literal("managePeople") })]);
20468
20486
  /** Writes state every granted right and use a finite positive AssetAmount cap. */
20469
20487
  const PermissionIntentSchema = Union([Struct({
20470
20488
  type: Literal("budget"),
20471
20489
  asset: AssetIdSchema,
20472
20490
  limit: AssetAmountSchema,
20473
- scope: BudgetScopeSchema
20491
+ scope: BudgetScopeSchema,
20492
+ refill: optional(BudgetRefillSchema)
20474
20493
  }).pipe(refine((intent) => intent.limit.asset === intent.asset && /[1-9]/u.test(intent.limit.value), { message: "Budget cap must be positive and use the Budget asset" })), Struct({ type: Literal("managePeople") })]);
20475
20494
  //#endregion
20476
20495
  //#region ../../packages/protocol/src/permissions/replacement-schema.ts
@@ -20671,7 +20690,7 @@ ensure: Operation.action("documents.memos.ensure", {
20671
20690
  Struct({
20672
20691
  type: Literal("new_budget"),
20673
20692
  label: String$1.pipe(refine((value) => value.trim().length >= 1 && value.trim().length <= 128)),
20674
- intent: BudgetIntentSchema
20693
+ intent: BudgetIntentSchema.pipe(refine((intent) => intent.refill !== "monthly", { message: "An invitation's new Budget cannot refill; change it once granted" }))
20675
20694
  })
20676
20695
  ])).pipe(refine((grants) => {
20677
20696
  if (grants.length < 1 || grants.length > 16) return false;
@@ -23679,7 +23698,9 @@ complete: Operation.mutation("profiles.onboardings.complete", {
23679
23698
  emitSafeConfirmed: "accounts.safes.emitSafeConfirmed",
23680
23699
  readSafe: "accounts.safes.readSafe",
23681
23700
  recordDeployment: "accounts.safes.recordDeployment"
23682
- }
23701
+ },
23702
+ /** The home's requests to pay and Payments to retry, read in one query. */
23703
+ summaries: { loadNeedsYou: "accounts.summaries.loadNeedsYou" }
23683
23704
  },
23684
23705
  /** The host observer's names for `client.approvals.*`. */
23685
23706
  approvals: {
@@ -23938,7 +23959,9 @@ emitSaved: "activity.annotations.emitSaved" },
23938
23959
  pay: "organizationPayments.pay",
23939
23960
  payBatch: "organizationPayments.payBatch",
23940
23961
  prepareExecution: "organizationPayments.prepareExecution",
23941
- retry: "organizationPayments.retry"
23962
+ retry: "organizationPayments.retry",
23963
+ cancel: "organizationPayments.cancel",
23964
+ redirect: "organizationPayments.redirect"
23942
23965
  },
23943
23966
  /**
23944
23967
  * Payments' internal functions and the client's own method names; its public
@@ -23960,7 +23983,9 @@ emitSaved: "activity.annotations.emitSaved" },
23960
23983
  loadContext: "payments.commands.loadContext",
23961
23984
  loadExecutionContext: "payments.commands.loadExecutionContext",
23962
23985
  /** The capped Budget a prepared Organization command spends from, before its allowance is read on chain. */
23963
- loadBudgetAllowance: "payments.commands.loadBudgetAllowance"
23986
+ loadBudgetAllowance: "payments.commands.loadBudgetAllowance",
23987
+ /** What a new Payment command would spend and from which Safe, read before it is born. */
23988
+ loadBirthFunding: "payments.commands.loadBirthFunding"
23964
23989
  },
23965
23990
  lifecycles: { prepareIntent: "payments.lifecycles.prepareIntent" },
23966
23991
  /** The stored UserOperation of every money command: Payment, Permission and configuration. */
@@ -24391,6 +24416,42 @@ emitChanged: "payroll.groups.emitChanged" }
24391
24416
  organization_id: OptionalOrgId,
24392
24417
  reason_code: OptionalReasonCode
24393
24418
  };
24419
+ /**
24420
+ * A journey's variants (`JOURNEYS`): the way a person came into a journey, or
24421
+ * the way they took through it. A variant is a property of the journey's step
24422
+ * events, never a journey of its own, so each journey funnel breaks down by
24423
+ * it. A step event takes only the variants that a journey contract names on
24424
+ * it, picked one by one; the analytics plan test checks both directions.
24425
+ * `pay_path` and `funding_source` have no carrier until their Phase 2 events.
24426
+ * `payment_*` events already carry `recipient_is_capxul_account`, and
24427
+ * `invoice_issued` carries `issuer_scope_kind`; neither is repeated here.
24428
+ */
24429
+ const JourneyVariantProps = {
24430
+ /** How a person came to Get started: by themselves, an invite, money that waited, or an invoice. */
24431
+ entry_path: optional(Literals([
24432
+ "signup",
24433
+ "invite",
24434
+ "claim",
24435
+ "invoice"
24436
+ ])),
24437
+ /** Where the person acted. `agent` is an AI agent driving the CLI. */
24438
+ surface: optional(Literals([
24439
+ "web",
24440
+ "cli",
24441
+ "agent"
24442
+ ])),
24443
+ /** Who pays: a person from their own account, or an Organization from a Budget. */
24444
+ payer_kind: optional(Literals(["person", "organization"])),
24445
+ /** How a request was paid: from the payer's inbox, or by its link at checkout. */
24446
+ pay_path: optional(Literals(["inbox", "link"])),
24447
+ /** Where an account's first money came from. `bank` is the planned on-ramp. */
24448
+ funding_source: optional(Literals([
24449
+ "deposit",
24450
+ "payment",
24451
+ "claim",
24452
+ "bank"
24453
+ ]))
24454
+ };
24394
24455
  //#endregion
24395
24456
  //#region ../../packages/observability/src/events/money.ts
24396
24457
  /**
@@ -24480,6 +24541,8 @@ emitChanged: "payroll.groups.emitChanged" }
24480
24541
  execution_id: OptionalString,
24481
24542
  payment_lifecycle_id: OptionalString,
24482
24543
  ...TelemetryEnvelopeProps,
24544
+ payer_kind: JourneyVariantProps.payer_kind,
24545
+ surface: JourneyVariantProps.surface,
24483
24546
  ...RecipientTelemetryProps,
24484
24547
  kind: String$1,
24485
24548
  payment_id: String$1
@@ -24495,6 +24558,8 @@ emitChanged: "payroll.groups.emitChanged" }
24495
24558
  const PaymentSettledL2Props = Struct({
24496
24559
  ...PaymentLifecycleProps,
24497
24560
  ...TelemetryEnvelopeProps,
24561
+ payer_kind: JourneyVariantProps.payer_kind,
24562
+ surface: JourneyVariantProps.surface,
24498
24563
  ...RecipientTelemetryProps,
24499
24564
  kind: String$1,
24500
24565
  chain_id: Finite,
@@ -24702,6 +24767,7 @@ emitChanged: "payroll.groups.emitChanged" }
24702
24767
  });
24703
24768
  const OrganizationCreationReadyProps = Struct({
24704
24769
  ...TelemetryEnvelopeProps,
24770
+ surface: JourneyVariantProps.surface,
24705
24771
  $insert_id: String$1,
24706
24772
  organization_id: OrgIdTelemetrySchema,
24707
24773
  attempt_number: AttemptNumberSchema,
@@ -24726,45 +24792,6 @@ emitChanged: "payroll.groups.emitChanged" }
24726
24792
  ...ORGANIZATION_SETUP_REASONS
24727
24793
  ]))
24728
24794
  });
24729
- const OrgCreateStartedProps = Struct({
24730
- ...TelemetryEnvelopeProps,
24731
- org_id: OptionalOrgId,
24732
- email_domain: OptionalString,
24733
- template: OptionalString
24734
- });
24735
- const OrgSafeCreatedProps = Struct({
24736
- ...TelemetryEnvelopeProps,
24737
- org_id: OptionalOrgId,
24738
- chainId: OptionalChainId,
24739
- safe_address: OptionalAddress
24740
- });
24741
- const OrgSafeConfirmedProps = Struct({
24742
- ...TelemetryEnvelopeProps,
24743
- org_id: OptionalOrgId,
24744
- chainId: OptionalChainId,
24745
- safe_address: OptionalAddress,
24746
- durationMs: OptionalDurationMs
24747
- });
24748
- const OrgRolesSeededProps = Struct({
24749
- ...TelemetryEnvelopeProps,
24750
- org_id: OptionalOrgId,
24751
- chainId: OptionalChainId,
24752
- role: OptionalString,
24753
- txHash: OptionalTxHash
24754
- });
24755
- const OrgCreatedProps = Struct({
24756
- ...TelemetryEnvelopeProps,
24757
- org_id: OptionalOrgId,
24758
- chainId: OptionalChainId,
24759
- safe_address: OptionalAddress,
24760
- durationMs: OptionalDurationMs
24761
- });
24762
- const OrgCreateFailedProps = Struct({
24763
- ...TelemetryEnvelopeProps,
24764
- ...ChainCauseTelemetryProps,
24765
- org_id: OptionalOrgId,
24766
- reason: OptionalString
24767
- });
24768
24795
  const OrgInviteSentProps = Struct({
24769
24796
  ...TelemetryEnvelopeProps,
24770
24797
  org_id: OptionalOrgId,
@@ -24809,30 +24836,6 @@ emitChanged: "payroll.groups.emitChanged" }
24809
24836
  name: Literal("organization_creation_failed"),
24810
24837
  props: OrganizationCreationFailedProps
24811
24838
  });
24812
- Struct({
24813
- name: Literal("org_create_started"),
24814
- props: OrgCreateStartedProps
24815
- });
24816
- Struct({
24817
- name: Literal("org_safe_created"),
24818
- props: OrgSafeCreatedProps
24819
- });
24820
- Struct({
24821
- name: Literal("org_safe_confirmed"),
24822
- props: OrgSafeConfirmedProps
24823
- });
24824
- Struct({
24825
- name: Literal("org_roles_seeded"),
24826
- props: OrgRolesSeededProps
24827
- });
24828
- Struct({
24829
- name: Literal("org_created"),
24830
- props: OrgCreatedProps
24831
- });
24832
- Struct({
24833
- name: Literal("org_create_failed"),
24834
- props: OrgCreateFailedProps
24835
- });
24836
24839
  Struct({
24837
24840
  name: Literal("org_invite_sent"),
24838
24841
  props: OrgInviteSentProps
@@ -25706,10 +25709,14 @@ emitChanged: "payroll.groups.emitChanged" }
25706
25709
  });
25707
25710
  const MemberActivationStartedProps = Struct({
25708
25711
  ...TelemetryEnvelopeProps,
25712
+ entry_path: JourneyVariantProps.entry_path,
25713
+ surface: JourneyVariantProps.surface,
25709
25714
  $insert_id: String$1
25710
25715
  });
25711
25716
  const MemberActivationReadyProps = Struct({
25712
25717
  ...TelemetryEnvelopeProps,
25718
+ entry_path: JourneyVariantProps.entry_path,
25719
+ surface: JourneyVariantProps.surface,
25713
25720
  $insert_id: String$1,
25714
25721
  duration_ms: DurationMsSchema
25715
25722
  });
@@ -27531,6 +27538,7 @@ emitChanged: "payroll.groups.emitChanged" }
27531
27538
  paymentsV2Signature("send");
27532
27539
  paymentsV2Signature("sendBatch");
27533
27540
  paymentsV2Signature("createCommitment");
27541
+ paymentsV2Signature("cancel"), paymentsV2Signature("redirect");
27534
27542
  //#endregion
27535
27543
  //#region ../../packages/protocol/src/evm/organization-payments.ts
27536
27544
  /** Supported Organization permission identities, newest first. */