@capxul/sandbox 4.20.0-beta.24 → 4.20.0-beta.27

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.
Files changed (2) hide show
  1. package/dist/main.mjs +154 -112
  2. package/package.json +4 -4
package/dist/main.mjs CHANGED
@@ -12940,12 +12940,17 @@ const Errors = {
12940
12940
  * a PERMISSION denial — explicitly NOT an `INSUFFICIENT_BALANCE` (the treasury
12941
12941
  * held the funds; the role's authority is what bound). `reason` discriminates
12942
12942
  * the violated condition (`over_cap` / `daily_cap` / `not_member` /
12943
- * `disallowed_recipient` / `condition_violation`); leak-safe — no on-chain
12944
- * identifiers ever enter the details.
12943
+ * `disallowed_recipient` / `condition_violation` / `budget_exhausted`);
12944
+ * no Safe, Roles module or role key enters the details.
12945
+ * `budget_exhausted` carries what the Budget's allowance still holds and
12946
+ * what the spend needs, as asset amounts in major units (#2297); the asset
12947
+ * id names the public token contract.
12945
12948
  */
12946
- rolePermissionDenied: (details) => new CapxulError("ROLE_PERMISSION_DENIED", `Org role denied this spend on-chain (${details.reason}).`, { details: details.operation === void 0 ? { reason: details.reason } : {
12949
+ rolePermissionDenied: (details) => new CapxulError("ROLE_PERMISSION_DENIED", `Org role denied this spend on-chain (${details.reason}).`, { details: {
12947
12950
  reason: details.reason,
12948
- operation: details.operation
12951
+ ...details.operation === void 0 ? {} : { operation: details.operation },
12952
+ ...details.remaining === void 0 ? {} : { remaining: details.remaining },
12953
+ ...details.required === void 0 ? {} : { required: details.required }
12949
12954
  } }),
12950
12955
  /**
12951
12956
  * A transaction (or sponsored UserOp) failed. `details.reason` discriminates
@@ -13877,7 +13882,7 @@ const ActivityItemSchema = Union([Struct({
13877
13882
  }), Struct({
13878
13883
  kind: Literal("movement"),
13879
13884
  id: String$1,
13880
- classification: Literal("movement_only_outflow"),
13885
+ classification: Literals(["deposit", "movement_only_outflow"]),
13881
13886
  amount: Amount,
13882
13887
  direction: Direction,
13883
13888
  counterpartyLabel: String$1,
@@ -16216,10 +16221,19 @@ const ApprovalNetworkSchema = Struct({
16216
16221
  name: String$1,
16217
16222
  explorerUrl: String$1
16218
16223
  });
16224
+ /**
16225
+ * Whose money the operation moves: the person's own, or an Organization's,
16226
+ * which a reader follows through that Organization's scope.
16227
+ */
16228
+ const ApprovalActorSchema = Union([Struct({ kind: Literal("personal") }), Struct({
16229
+ kind: Literal("organization"),
16230
+ orgId: NonEmptyString
16231
+ })]);
16219
16232
  /** What the person reads before they sign. */
16220
16233
  const ApprovalSummarySchema = Struct({
16221
16234
  title: String$1,
16222
16235
  from: Struct({
16236
+ kind: Literals(["personal", "organization"]),
16223
16237
  label: String$1,
16224
16238
  address: AddressSchema$1
16225
16239
  }),
@@ -16241,6 +16255,7 @@ const ApprovalSchema = Struct({
16241
16255
  url: String$1,
16242
16256
  kind: Literals(APPROVAL_KINDS),
16243
16257
  state: Literals(APPROVAL_STATES),
16258
+ actor: ApprovalActorSchema,
16244
16259
  summary: ApprovalSummarySchema,
16245
16260
  operation: ApprovalOperationSchema,
16246
16261
  /** Who must sign: the owner key of the paying Safe. */
@@ -16473,7 +16488,44 @@ const approvals = {
16473
16488
  ]
16474
16489
  })
16475
16490
  };
16491
+ /**
16492
+ * The home screen in one read. A section whose read failed is null, so the
16493
+ * caller shows it as unavailable, never as empty.
16494
+ */
16495
+ const HomeSchema = Struct({
16496
+ email: String$1,
16497
+ actingAs: Union([Struct({ kind: Literal("personal") }), Struct({
16498
+ kind: Literal("organization"),
16499
+ orgId: String$1
16500
+ })]),
16501
+ /** The acting Safe's position in each settlement asset of its chain. */
16502
+ balances: NullOr(ArraySchema(AssetPositionSchema)),
16503
+ /** The ids of what waits on the caller, newest first. */
16504
+ needsYou: NullOr(Struct({
16505
+ requestsToPay: ArraySchema(String$1),
16506
+ payrollToApprove: ArraySchema(String$1),
16507
+ paymentsToRetry: ArraySchema(String$1)
16508
+ })),
16509
+ /** The newest rows of the actor's activity. */
16510
+ recentActivity: NullOr(ArraySchema(ActivityItemSchema))
16511
+ });
16476
16512
  const summaries = {
16513
+ /**
16514
+ * Where the caller acts, its balances, what needs it and its newest activity,
16515
+ * for the person or for an Organization they take part in. One round trip.
16516
+ */
16517
+ home: Operation.action("accounts.summaries.home", {
16518
+ input: Struct({
16519
+ chainId: ChainIdSchema$1,
16520
+ orgId: optionalKey(NonEmptyString)
16521
+ }),
16522
+ output: HomeSchema,
16523
+ errors: [
16524
+ ...CALL$10,
16525
+ ...DEFECTS,
16526
+ "ROLE_PERMISSION_DENIED"
16527
+ ]
16528
+ }),
16477
16529
  /** The signed-in person: id, verified email and Profile display name. */
16478
16530
  me: Operation.query("accounts.summaries.me", {
16479
16531
  input: Struct({}),
@@ -18793,7 +18845,11 @@ const OrgId$2 = NonEmptyString;
18793
18845
  const CALL$4 = ["NOT_AUTHENTICATED", "INVALID_INPUT"];
18794
18846
  /** The caller's own Account and Safe, which a Payment is signed from. */
18795
18847
  const ACCOUNT$1 = ["SMART_ACCOUNT_MISSING", "ACCOUNT_NOT_FOUND"];
18796
- /** Not a participant of the Organization, or no Budget in it that may pay for this. */
18848
+ /**
18849
+ * Not a participant of the Organization, no Budget in it that may pay for
18850
+ * this, or a Budget whose on-chain allowance holds less than the batch spends
18851
+ * (`budget_exhausted`, naming what is left).
18852
+ */
18797
18853
  const DENIED$1 = ["ROLE_PERMISSION_DENIED"];
18798
18854
  /** The command, its Payment or its execution is not in a state this applies to. */
18799
18855
  const STATE$3 = ["WRONG_STATE"];
@@ -19102,7 +19158,9 @@ const OneOrganization = Struct({ orgId: OrgId$1 });
19102
19158
  const CALL$3 = ["NOT_AUTHENTICATED", "INVALID_INPUT"];
19103
19159
  /**
19104
19160
  * The caller does not take part in the Organization, or holds no Budget in it
19105
- * that may pay for this. A caller outside the Organization learns nothing more.
19161
+ * that may pay for this, or the Budget's on-chain allowance holds less than the
19162
+ * run pays (`budget_exhausted`, naming what is left). A caller outside the
19163
+ * Organization learns nothing more.
19106
19164
  */
19107
19165
  const DENIED = ["ROLE_PERMISSION_DENIED"];
19108
19166
  /**
@@ -20710,7 +20768,11 @@ const ORGANIZATION_OPERATIONS = {
20710
20768
  seedNativeReadiness: "operator.fixtures.seedNativeReadiness",
20711
20769
  seedPrerequisites: "operator.fixtures.seedPrerequisites"
20712
20770
  },
20713
- identities: { purgeByEmail: "operator.identities.purgeByEmail" }
20771
+ identities: {
20772
+ purgeByEmail: "operator.identities.purgeByEmail",
20773
+ /** One Account and every row that refers to it, unless it has Payments or an Organization tie. */
20774
+ purgeAccount: "operator.identities.purgeAccount"
20775
+ }
20714
20776
  },
20715
20777
  /** Organizations' internal functions; its public rows join from `OPERATIONS`. */
20716
20778
  organizations: {
@@ -20804,7 +20866,9 @@ emitSaved: "activity.annotations.emitSaved" },
20804
20866
  linkObservation: "payments.commands.linkObservation",
20805
20867
  failPrepared: "payments.commands.failPrepared",
20806
20868
  loadContext: "payments.commands.loadContext",
20807
- loadExecutionContext: "payments.commands.loadExecutionContext"
20869
+ loadExecutionContext: "payments.commands.loadExecutionContext",
20870
+ /** The capped Budget a prepared Organization command spends from, before its allowance is read on chain. */
20871
+ loadBudgetAllowance: "payments.commands.loadBudgetAllowance"
20808
20872
  },
20809
20873
  lifecycles: { prepareIntent: "payments.lifecycles.prepareIntent" },
20810
20874
  /** The stored UserOperation of every money command: Payment, Permission and configuration. */
@@ -20958,7 +21022,11 @@ const PLATFORM_OPERATIONS = {
20958
21022
  recordUse: "applications.bootstraps.recordUse",
20959
21023
  resolve: "applications.bootstraps.resolve"
20960
21024
  },
20961
- keys: { issue: "applications.keys.issue" },
21025
+ keys: {
21026
+ issue: "applications.keys.issue",
21027
+ /** Operator-only: revoke one key by its id, whoever owns it. */
21028
+ revokeById: "applications.keys.revokeById"
21029
+ },
20962
21030
  quickstarts: {
20963
21031
  claim: "applications.quickstarts.claim",
20964
21032
  mint: "applications.quickstarts.mint"
@@ -22288,95 +22356,83 @@ Struct({
22288
22356
  });
22289
22357
  //#endregion
22290
22358
  //#region ../../packages/observability/src/catalog/cli.ts
22291
- /** One completed online CLI diagnostic. No command input or provider text. */
22359
+ /** Every command path of the `capxul` tree, dot-separated, plus the root and `unknown`. */
22292
22360
  const CLI_COMMAND_NAMES = [
22293
- "status",
22294
- "request",
22295
- "request.list",
22296
- "request.get",
22297
- "request.cancel",
22298
- "offer",
22299
- "offer.create",
22300
- "offer.list",
22301
- "offer.get",
22302
- "offer.revise",
22303
- "offer.deactivate",
22304
- "org.offer",
22305
- "org.offer.create",
22306
- "org.offer.list",
22307
- "org.offer.get",
22308
- "org.offer.revise",
22309
- "org.offer.deactivate",
22310
- "request.issue",
22311
- "inbox",
22312
- CAPXUL_OPERATIONS.inbox.list,
22313
- "inbox.get",
22314
- "inbox.pay",
22315
- CAPXUL_OPERATIONS.inbox.decline,
22316
- "org.request",
22317
- "org.request.list",
22318
- "org.request.get",
22319
- "org.request.cancel",
22320
- "org.request.issue",
22321
- "org.inbox",
22322
- CAPXUL_OPERATIONS.org.inbox.list,
22323
- "org.inbox.get",
22324
- "org.inbox.pay",
22325
- CAPXUL_OPERATIONS.org.inbox.decline,
22326
22361
  "capxul",
22362
+ "home",
22327
22363
  "whoami",
22328
22364
  "use",
22329
22365
  "use.personal",
22330
22366
  "use.org",
22331
22367
  "use.env",
22332
- "doctor",
22333
- "telemetry",
22334
- "telemetry.status",
22335
- "telemetry.enable",
22336
- "telemetry.disable",
22337
22368
  "auth",
22338
22369
  "auth.login",
22339
- "auth.signup",
22340
- "auth.send",
22341
22370
  "auth.verify",
22342
22371
  "auth.switch",
22343
- "auth.profile",
22344
- "auth.status",
22345
22372
  "auth.logout",
22346
22373
  "account",
22347
- CAPXUL_OPERATIONS.account.status,
22348
- CAPXUL_OPERATIONS.account.balance,
22349
- "account.deposit",
22374
+ "account.show",
22350
22375
  "account.retry",
22351
- "document",
22352
- "document.get",
22353
- "document.verify",
22354
- "document.render",
22355
- "document.export",
22376
+ "balance",
22377
+ "address",
22356
22378
  "payment",
22379
+ "payment.send",
22357
22380
  "payment.list",
22358
22381
  "payment.get",
22359
22382
  "payment.wait",
22360
- "payment.send",
22361
22383
  "payment.retry",
22362
- "activity",
22363
- "activity.list",
22364
- "activity.get",
22365
- "activity.summary",
22366
- "activity.annotate",
22384
+ "inbox",
22385
+ CAPXUL_OPERATIONS.inbox.list,
22386
+ "inbox.get",
22387
+ "inbox.pay",
22388
+ CAPXUL_OPERATIONS.inbox.decline,
22389
+ "request",
22390
+ "request.issue",
22391
+ "request.list",
22392
+ "request.get",
22393
+ "request.cancel",
22394
+ "offer",
22395
+ "offer.create",
22396
+ "offer.list",
22397
+ "offer.get",
22398
+ "offer.revise",
22399
+ "offer.deactivate",
22367
22400
  "contact",
22401
+ "contact.add",
22368
22402
  "contact.list",
22369
22403
  "contact.get",
22370
- "contact.add",
22371
22404
  "contact.label",
22372
22405
  "contact.hide",
22373
22406
  "contact.unhide",
22407
+ "document",
22408
+ "document.get",
22409
+ "document.render",
22410
+ "document.export",
22411
+ "document.verify",
22412
+ "activity",
22413
+ "activity.list",
22414
+ "activity.get",
22415
+ "activity.summary",
22416
+ "activity.annotate",
22417
+ "invite",
22418
+ "invite.list",
22419
+ "invite.accept",
22420
+ "invite.decline",
22374
22421
  "org",
22375
22422
  CAPXUL_OPERATIONS.org.list,
22376
- "org.status",
22423
+ CAPXUL_OPERATIONS.org.create,
22424
+ "org.show",
22377
22425
  CAPXUL_OPERATIONS.org.me,
22378
- "org.balance",
22379
- "org.deposit",
22426
+ "org.wait",
22427
+ CAPXUL_OPERATIONS.org.retry,
22428
+ "org.member",
22429
+ "org.member.list",
22430
+ "org.member.get",
22431
+ "org.member.invite",
22432
+ CAPXUL_OPERATIONS.org.invite,
22433
+ "org.invite.list",
22434
+ "org.invite.cancel",
22435
+ "org.invite.resend",
22380
22436
  "org.permission",
22381
22437
  "org.permission.list",
22382
22438
  "org.permission.get",
@@ -22388,46 +22444,32 @@ const CLI_COMMAND_NAMES = [
22388
22444
  "org.permission.command",
22389
22445
  "org.permission.command.get",
22390
22446
  "org.permission.command.wait",
22391
- CAPXUL_OPERATIONS.org.payment,
22392
- "org.payment.list",
22393
- "org.payment.get",
22394
- "org.payment.wait",
22395
- "org.payment.retry",
22396
- "org.payment.send",
22397
22447
  "org.payroll",
22448
+ "org.payroll.run",
22449
+ "org.payroll.list",
22450
+ "org.payroll.get",
22451
+ "org.payroll.wait",
22452
+ CAPXUL_OPERATIONS.org.payroll.terms,
22398
22453
  "org.payroll.groups",
22399
22454
  CAPXUL_OPERATIONS.org.payroll.groups.list,
22400
22455
  CAPXUL_OPERATIONS.org.payroll.groups.save,
22401
22456
  CAPXUL_OPERATIONS.org.payroll.groups.remove,
22402
- CAPXUL_OPERATIONS.org.payroll.terms,
22403
- "org.payroll.list",
22404
- "org.payroll.run",
22405
- "org.payroll.get",
22406
- "org.payroll.wait",
22407
- CAPXUL_OPERATIONS.org.members,
22408
- "org.member",
22409
- "org.member.get",
22410
- "org.member.invite",
22411
- "org.contact",
22412
- "org.contact.list",
22413
- "org.contact.get",
22414
- "org.contact.add",
22415
- "org.contact.label",
22416
- "org.contact.hide",
22417
- "org.contact.unhide",
22418
- CAPXUL_OPERATIONS.org.invite,
22419
- "org.invite.list",
22457
+ "config",
22458
+ "config.telemetry",
22459
+ "config.telemetry.on",
22460
+ "config.telemetry.off",
22461
+ "config.telemetry.status",
22462
+ "invite.get",
22463
+ "invite.review",
22464
+ "invite.wait",
22420
22465
  "org.invite.get",
22421
22466
  "org.invite.wait",
22422
- "org.invite.review",
22423
- "org.invite.accept",
22424
- "org.invite.decline",
22425
- "org.invite.cancel",
22426
- "org.invite.resend",
22427
22467
  "org.invite.retry",
22428
- "org.wait",
22429
- CAPXUL_OPERATIONS.org.create,
22430
- CAPXUL_OPERATIONS.org.retry,
22468
+ "schema",
22469
+ "doctor",
22470
+ "dev",
22471
+ "dev.key",
22472
+ "dev.fund",
22431
22473
  "unknown"
22432
22474
  ];
22433
22475
  const CLI_CAPABILITIES = [
@@ -24643,6 +24685,14 @@ function statusFromAccount(account, requirement) {
24643
24685
  }
24644
24686
  };
24645
24687
  }
24688
+ Struct({
24689
+ permissionId: AuthorizePayrollRunExecutionInputSchema.fields.permissionId,
24690
+ asset: AuthorizePayrollRunExecutionInputSchema.fields.asset,
24691
+ period: AuthorizePayrollRunExecutionInputSchema.fields.period,
24692
+ items: AuthorizePayrollRunExecutionInputSchema.fields.items,
24693
+ requestKey: optional(AuthorizePayrollRunExecutionInputSchema.fields.requestKey)
24694
+ });
24695
+ runs.authorize.name;
24646
24696
  //#endregion
24647
24697
  //#region ../../packages/sdk/src/platform/transport/wire.ts
24648
24698
  /**
@@ -24869,7 +24919,6 @@ gen$2(function* () {
24869
24919
  yield* promise(() => emitProvisioningTelemetry(deps.telemetry, provisioned, deps.runPromise));
24870
24920
  return provisioned;
24871
24921
  });
24872
- new Set(IDENTITY_EVENT_TAGS);
24873
24922
  Object.freeze({
24874
24923
  terminal: false,
24875
24924
  outcome: null,
@@ -24895,6 +24944,7 @@ Object.freeze({
24895
24944
  outcome: "neutral",
24896
24945
  needsAction: false
24897
24946
  });
24947
+ new Set(IDENTITY_EVENT_TAGS);
24898
24948
  //#endregion
24899
24949
  //#region ../../node_modules/.pnpm/zodiac-roles-deployments@2.5.0/node_modules/zodiac-roles-deployments/build/cjs/chains.js
24900
24950
  var require_chains = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -33552,14 +33602,6 @@ Roles__factory.createInterface();
33552
33602
  toFunctionSelector("setAllowance(bytes32,uint128,uint128,uint128,uint64,uint64)");
33553
33603
  toFunctionSelector("setTransactionUnwrapper(address,bytes4,address)");
33554
33604
  toFunctionSelector("assignRoles(address,bytes32[],bool[])");
33555
- Struct({
33556
- permissionId: AuthorizePayrollRunExecutionInputSchema.fields.permissionId,
33557
- asset: AuthorizePayrollRunExecutionInputSchema.fields.asset,
33558
- period: AuthorizePayrollRunExecutionInputSchema.fields.period,
33559
- items: AuthorizePayrollRunExecutionInputSchema.fields.items,
33560
- requestKey: optional(AuthorizePayrollRunExecutionInputSchema.fields.requestKey)
33561
- });
33562
- runs.authorize.name;
33563
33605
  Struct({
33564
33606
  token: optional(NullOr(String$1)),
33565
33607
  session: optional(NullOr(Struct({ token: optional(NullOr(String$1)) })))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capxul/sandbox",
3
- "version": "4.20.0-beta.24",
3
+ "version": "4.20.0-beta.27",
4
4
  "private": false,
5
5
  "description": "Capxul sandbox CLI for canonical quickstart keys and testnet faucet funds.",
6
6
  "keywords": [
@@ -42,9 +42,9 @@
42
42
  "typescript": "npm:@typescript/typescript6@6.0.2",
43
43
  "vite": "npm:@voidzero-dev/vite-plus-core@1.0.0",
44
44
  "vite-plus": "1.0.0",
45
- "@capxul/observability": "4.20.0-beta.24",
46
- "@capxul/protocol": "0.2.0-beta.0",
47
- "@capxul/sdk": "4.20.0-beta.24",
45
+ "@capxul/observability": "4.20.0-beta.27",
46
+ "@capxul/protocol": "0.2.0-beta.1",
47
+ "@capxul/sdk": "4.20.0-beta.27",
48
48
  "@capxul/typescript-config": "0.0.0"
49
49
  },
50
50
  "scripts": {