@capxul/sandbox 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/dist/main.mjs +86 -78
- package/package.json +4 -4
package/dist/main.mjs
CHANGED
|
@@ -8853,28 +8853,28 @@ function formatCheck(check) {
|
|
|
8853
8853
|
* @since 4.0.0
|
|
8854
8854
|
*/
|
|
8855
8855
|
function makeFormatterDefault() {
|
|
8856
|
-
return (issue) => formatIssue(issue, "");
|
|
8856
|
+
return (issue) => formatIssue$1(issue, "");
|
|
8857
8857
|
}
|
|
8858
8858
|
/** @internal */
|
|
8859
8859
|
const defaultFormatter = /*#__PURE__*/ makeFormatterDefault();
|
|
8860
|
-
function formatIssue(issue, path) {
|
|
8860
|
+
function formatIssue$1(issue, path) {
|
|
8861
8861
|
let message;
|
|
8862
8862
|
switch (issue._tag) {
|
|
8863
8863
|
case "Filter": {
|
|
8864
8864
|
const annotated = defaultCheckHook(issue);
|
|
8865
8865
|
if (annotated !== void 0) message = annotated;
|
|
8866
8866
|
else {
|
|
8867
|
-
if (issue.issue._tag !== "InvalidValue") return formatIssue(issue.issue, path);
|
|
8867
|
+
if (issue.issue._tag !== "InvalidValue") return formatIssue$1(issue.issue, path);
|
|
8868
8868
|
const expected = findExpected(issue.issue);
|
|
8869
8869
|
message = expected === void 0 ? getExpectedMessage(formatCheck(issue.filter), issue) : getExpectedMessage(expected, issue.issue);
|
|
8870
8870
|
}
|
|
8871
8871
|
break;
|
|
8872
8872
|
}
|
|
8873
|
-
case "Encoding": return formatIssue(issue.issue, path);
|
|
8874
|
-
case "Pointer": return formatIssue(issue.issue, path + formatPath(issue.path));
|
|
8873
|
+
case "Encoding": return formatIssue$1(issue.issue, path);
|
|
8874
|
+
case "Pointer": return formatIssue$1(issue.issue, path + formatPath(issue.path));
|
|
8875
8875
|
case "Composite":
|
|
8876
8876
|
case "AnyOf":
|
|
8877
|
-
if (issue._tag === "Composite" || issue.issues.length > 0) return issue.issues.map((issue) => formatIssue(issue, path)).join("\n");
|
|
8877
|
+
if (issue._tag === "Composite" || issue.issues.length > 0) return issue.issues.map((issue) => formatIssue$1(issue, path)).join("\n");
|
|
8878
8878
|
message = findMessage(issue) ?? getExpectedMessage(getExpected(issue.ast), issue);
|
|
8879
8879
|
break;
|
|
8880
8880
|
default: message = defaultLeafHook(issue);
|
|
@@ -16926,6 +16926,15 @@ const probes = {
|
|
|
16926
16926
|
})
|
|
16927
16927
|
};
|
|
16928
16928
|
//#endregion
|
|
16929
|
+
//#region ../../packages/protocol/src/evm/role-dsl.ts
|
|
16930
|
+
/**
|
|
16931
|
+
* How a capped Budget's allowance refills (#2298). `monthly` refills the
|
|
16932
|
+
* allowance to its cap every 30 days. Roles v2 counts fixed periods from the
|
|
16933
|
+
* moment the allowance is set; it has no calendar month. Absent means `none`:
|
|
16934
|
+
* the cap is one pot that spending drains for good.
|
|
16935
|
+
*/
|
|
16936
|
+
const ORG_BUDGET_REFILLS = ["monthly", "none"];
|
|
16937
|
+
//#endregion
|
|
16929
16938
|
//#region ../../packages/protocol/src/permissions/permission-schema.ts
|
|
16930
16939
|
/**
|
|
16931
16940
|
* One stored `setAllowance` call inside a command's expected authority set.
|
|
@@ -16964,12 +16973,19 @@ const BudgetScopeSchema = Struct({
|
|
|
16964
16973
|
})]),
|
|
16965
16974
|
actions: NonEmptyArray(Literals(["pay", "commitments"]))
|
|
16966
16975
|
}).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" }));
|
|
16976
|
+
/**
|
|
16977
|
+
* How a capped Budget refills (#2298): `monthly` tops the cap back up every 30
|
|
16978
|
+
* days (a fixed Roles v2 period, not a calendar month); `none` never refills.
|
|
16979
|
+
* Absent means `none`, and writers store only `monthly`.
|
|
16980
|
+
*/
|
|
16981
|
+
const BudgetRefillSchema = Literals(ORG_BUDGET_REFILLS);
|
|
16967
16982
|
/** The accepted product policy stored with one Permission revision. */
|
|
16968
16983
|
const CurrentPolicySchema = Union([Struct({
|
|
16969
16984
|
type: Literal("budget"),
|
|
16970
16985
|
asset: AssetIdSchema,
|
|
16971
16986
|
limit: NullOr(String$1),
|
|
16972
|
-
scope: BudgetScopeSchema
|
|
16987
|
+
scope: BudgetScopeSchema,
|
|
16988
|
+
refill: optional(BudgetRefillSchema)
|
|
16973
16989
|
}), Struct({ type: Literal("managePeople") })]);
|
|
16974
16990
|
const BudgetIntentSchema = CurrentPolicySchema.pipe(refine((value) => {
|
|
16975
16991
|
if (value.type !== "budget") return false;
|
|
@@ -17034,7 +17050,8 @@ const ResolvedPermissionBudgetPolicySchema = Struct({
|
|
|
17034
17050
|
"send",
|
|
17035
17051
|
"sendBatch",
|
|
17036
17052
|
"createCommitment"
|
|
17037
|
-
]))
|
|
17053
|
+
])),
|
|
17054
|
+
refill: optional(BudgetRefillSchema)
|
|
17038
17055
|
});
|
|
17039
17056
|
const PermissionRecipientBindingSchema = Struct({
|
|
17040
17057
|
accountId: AccountIdSchema$1,
|
|
@@ -17046,14 +17063,16 @@ const StoredPermissionIntentSchema = Union([Struct({
|
|
|
17046
17063
|
type: Literal("budget"),
|
|
17047
17064
|
asset: AssetIdSchema,
|
|
17048
17065
|
limit: NullOr(AssetAmountSchema),
|
|
17049
|
-
scope: optional(BudgetScopeSchema)
|
|
17066
|
+
scope: optional(BudgetScopeSchema),
|
|
17067
|
+
refill: optional(BudgetRefillSchema)
|
|
17050
17068
|
}).pipe(refine((intent) => intent.limit === null || intent.limit.asset === intent.asset, { message: "Budget limit must use the Budget asset" })), Struct({ type: Literal("managePeople") })]);
|
|
17051
17069
|
/** Writes state every granted right and use a finite positive AssetAmount cap. */
|
|
17052
17070
|
const PermissionIntentSchema = Union([Struct({
|
|
17053
17071
|
type: Literal("budget"),
|
|
17054
17072
|
asset: AssetIdSchema,
|
|
17055
17073
|
limit: AssetAmountSchema,
|
|
17056
|
-
scope: BudgetScopeSchema
|
|
17074
|
+
scope: BudgetScopeSchema,
|
|
17075
|
+
refill: optional(BudgetRefillSchema)
|
|
17057
17076
|
}).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") })]);
|
|
17058
17077
|
//#endregion
|
|
17059
17078
|
//#region ../../packages/protocol/src/permissions/replacement-schema.ts
|
|
@@ -17254,7 +17273,7 @@ const InvitePreviewRequestSchema = Struct({
|
|
|
17254
17273
|
Struct({
|
|
17255
17274
|
type: Literal("new_budget"),
|
|
17256
17275
|
label: String$1.pipe(refine((value) => value.trim().length >= 1 && value.trim().length <= 128)),
|
|
17257
|
-
intent: BudgetIntentSchema
|
|
17276
|
+
intent: BudgetIntentSchema.pipe(refine((intent) => intent.refill !== "monthly", { message: "An invitation's new Budget cannot refill; change it once granted" }))
|
|
17258
17277
|
})
|
|
17259
17278
|
])).pipe(refine((grants) => {
|
|
17260
17279
|
if (grants.length < 1 || grants.length > 16) return false;
|
|
@@ -20587,7 +20606,9 @@ const PEOPLE_OPERATIONS = {
|
|
|
20587
20606
|
emitSafeConfirmed: "accounts.safes.emitSafeConfirmed",
|
|
20588
20607
|
readSafe: "accounts.safes.readSafe",
|
|
20589
20608
|
recordDeployment: "accounts.safes.recordDeployment"
|
|
20590
|
-
}
|
|
20609
|
+
},
|
|
20610
|
+
/** The home's requests to pay and Payments to retry, read in one query. */
|
|
20611
|
+
summaries: { loadNeedsYou: "accounts.summaries.loadNeedsYou" }
|
|
20591
20612
|
},
|
|
20592
20613
|
/** The host observer's names for `client.approvals.*`. */
|
|
20593
20614
|
approvals: {
|
|
@@ -20846,7 +20867,9 @@ emitSaved: "activity.annotations.emitSaved" },
|
|
|
20846
20867
|
pay: "organizationPayments.pay",
|
|
20847
20868
|
payBatch: "organizationPayments.payBatch",
|
|
20848
20869
|
prepareExecution: "organizationPayments.prepareExecution",
|
|
20849
|
-
retry: "organizationPayments.retry"
|
|
20870
|
+
retry: "organizationPayments.retry",
|
|
20871
|
+
cancel: "organizationPayments.cancel",
|
|
20872
|
+
redirect: "organizationPayments.redirect"
|
|
20850
20873
|
},
|
|
20851
20874
|
/**
|
|
20852
20875
|
* Payments' internal functions and the client's own method names; its public
|
|
@@ -20868,7 +20891,9 @@ emitSaved: "activity.annotations.emitSaved" },
|
|
|
20868
20891
|
loadContext: "payments.commands.loadContext",
|
|
20869
20892
|
loadExecutionContext: "payments.commands.loadExecutionContext",
|
|
20870
20893
|
/** The capped Budget a prepared Organization command spends from, before its allowance is read on chain. */
|
|
20871
|
-
loadBudgetAllowance: "payments.commands.loadBudgetAllowance"
|
|
20894
|
+
loadBudgetAllowance: "payments.commands.loadBudgetAllowance",
|
|
20895
|
+
/** What a new Payment command would spend and from which Safe, read before it is born. */
|
|
20896
|
+
loadBirthFunding: "payments.commands.loadBirthFunding"
|
|
20872
20897
|
},
|
|
20873
20898
|
lifecycles: { prepareIntent: "payments.lifecycles.prepareIntent" },
|
|
20874
20899
|
/** The stored UserOperation of every money command: Payment, Permission and configuration. */
|
|
@@ -21299,6 +21324,42 @@ const UiStepProps = {
|
|
|
21299
21324
|
organization_id: OptionalOrgId,
|
|
21300
21325
|
reason_code: OptionalReasonCode
|
|
21301
21326
|
};
|
|
21327
|
+
/**
|
|
21328
|
+
* A journey's variants (`JOURNEYS`): the way a person came into a journey, or
|
|
21329
|
+
* the way they took through it. A variant is a property of the journey's step
|
|
21330
|
+
* events, never a journey of its own, so each journey funnel breaks down by
|
|
21331
|
+
* it. A step event takes only the variants that a journey contract names on
|
|
21332
|
+
* it, picked one by one; the analytics plan test checks both directions.
|
|
21333
|
+
* `pay_path` and `funding_source` have no carrier until their Phase 2 events.
|
|
21334
|
+
* `payment_*` events already carry `recipient_is_capxul_account`, and
|
|
21335
|
+
* `invoice_issued` carries `issuer_scope_kind`; neither is repeated here.
|
|
21336
|
+
*/
|
|
21337
|
+
const JourneyVariantProps = {
|
|
21338
|
+
/** How a person came to Get started: by themselves, an invite, money that waited, or an invoice. */
|
|
21339
|
+
entry_path: optional(Literals([
|
|
21340
|
+
"signup",
|
|
21341
|
+
"invite",
|
|
21342
|
+
"claim",
|
|
21343
|
+
"invoice"
|
|
21344
|
+
])),
|
|
21345
|
+
/** Where the person acted. `agent` is an AI agent driving the CLI. */
|
|
21346
|
+
surface: optional(Literals([
|
|
21347
|
+
"web",
|
|
21348
|
+
"cli",
|
|
21349
|
+
"agent"
|
|
21350
|
+
])),
|
|
21351
|
+
/** Who pays: a person from their own account, or an Organization from a Budget. */
|
|
21352
|
+
payer_kind: optional(Literals(["person", "organization"])),
|
|
21353
|
+
/** How a request was paid: from the payer's inbox, or by its link at checkout. */
|
|
21354
|
+
pay_path: optional(Literals(["inbox", "link"])),
|
|
21355
|
+
/** Where an account's first money came from. `bank` is the planned on-ramp. */
|
|
21356
|
+
funding_source: optional(Literals([
|
|
21357
|
+
"deposit",
|
|
21358
|
+
"payment",
|
|
21359
|
+
"claim",
|
|
21360
|
+
"bank"
|
|
21361
|
+
]))
|
|
21362
|
+
};
|
|
21302
21363
|
//#endregion
|
|
21303
21364
|
//#region ../../packages/observability/src/events/money.ts
|
|
21304
21365
|
/**
|
|
@@ -21388,6 +21449,8 @@ const PaymentInitiatedProps = Struct({
|
|
|
21388
21449
|
execution_id: OptionalString,
|
|
21389
21450
|
payment_lifecycle_id: OptionalString,
|
|
21390
21451
|
...TelemetryEnvelopeProps,
|
|
21452
|
+
payer_kind: JourneyVariantProps.payer_kind,
|
|
21453
|
+
surface: JourneyVariantProps.surface,
|
|
21391
21454
|
...RecipientTelemetryProps,
|
|
21392
21455
|
kind: String$1,
|
|
21393
21456
|
payment_id: String$1
|
|
@@ -21403,6 +21466,8 @@ const PaymentLifecycleProps = {
|
|
|
21403
21466
|
const PaymentSettledL2Props = Struct({
|
|
21404
21467
|
...PaymentLifecycleProps,
|
|
21405
21468
|
...TelemetryEnvelopeProps,
|
|
21469
|
+
payer_kind: JourneyVariantProps.payer_kind,
|
|
21470
|
+
surface: JourneyVariantProps.surface,
|
|
21406
21471
|
...RecipientTelemetryProps,
|
|
21407
21472
|
kind: String$1,
|
|
21408
21473
|
chain_id: Finite,
|
|
@@ -21610,6 +21675,7 @@ const OrganizationCreationStartedProps = Struct({
|
|
|
21610
21675
|
});
|
|
21611
21676
|
const OrganizationCreationReadyProps = Struct({
|
|
21612
21677
|
...TelemetryEnvelopeProps,
|
|
21678
|
+
surface: JourneyVariantProps.surface,
|
|
21613
21679
|
$insert_id: String$1,
|
|
21614
21680
|
organization_id: OrgIdTelemetrySchema,
|
|
21615
21681
|
attempt_number: AttemptNumberSchema,
|
|
@@ -21634,45 +21700,6 @@ const OrganizationCreationFailedProps = Struct({
|
|
|
21634
21700
|
...ORGANIZATION_SETUP_REASONS
|
|
21635
21701
|
]))
|
|
21636
21702
|
});
|
|
21637
|
-
const OrgCreateStartedProps = Struct({
|
|
21638
|
-
...TelemetryEnvelopeProps,
|
|
21639
|
-
org_id: OptionalOrgId,
|
|
21640
|
-
email_domain: OptionalString,
|
|
21641
|
-
template: OptionalString
|
|
21642
|
-
});
|
|
21643
|
-
const OrgSafeCreatedProps = Struct({
|
|
21644
|
-
...TelemetryEnvelopeProps,
|
|
21645
|
-
org_id: OptionalOrgId,
|
|
21646
|
-
chainId: OptionalChainId,
|
|
21647
|
-
safe_address: OptionalAddress
|
|
21648
|
-
});
|
|
21649
|
-
const OrgSafeConfirmedProps = Struct({
|
|
21650
|
-
...TelemetryEnvelopeProps,
|
|
21651
|
-
org_id: OptionalOrgId,
|
|
21652
|
-
chainId: OptionalChainId,
|
|
21653
|
-
safe_address: OptionalAddress,
|
|
21654
|
-
durationMs: OptionalDurationMs
|
|
21655
|
-
});
|
|
21656
|
-
const OrgRolesSeededProps = Struct({
|
|
21657
|
-
...TelemetryEnvelopeProps,
|
|
21658
|
-
org_id: OptionalOrgId,
|
|
21659
|
-
chainId: OptionalChainId,
|
|
21660
|
-
role: OptionalString,
|
|
21661
|
-
txHash: OptionalTxHash
|
|
21662
|
-
});
|
|
21663
|
-
const OrgCreatedProps = Struct({
|
|
21664
|
-
...TelemetryEnvelopeProps,
|
|
21665
|
-
org_id: OptionalOrgId,
|
|
21666
|
-
chainId: OptionalChainId,
|
|
21667
|
-
safe_address: OptionalAddress,
|
|
21668
|
-
durationMs: OptionalDurationMs
|
|
21669
|
-
});
|
|
21670
|
-
const OrgCreateFailedProps = Struct({
|
|
21671
|
-
...TelemetryEnvelopeProps,
|
|
21672
|
-
...ChainCauseTelemetryProps,
|
|
21673
|
-
org_id: OptionalOrgId,
|
|
21674
|
-
reason: OptionalString
|
|
21675
|
-
});
|
|
21676
21703
|
const OrgInviteSentProps = Struct({
|
|
21677
21704
|
...TelemetryEnvelopeProps,
|
|
21678
21705
|
org_id: OptionalOrgId,
|
|
@@ -21717,30 +21744,6 @@ Struct({
|
|
|
21717
21744
|
name: Literal("organization_creation_failed"),
|
|
21718
21745
|
props: OrganizationCreationFailedProps
|
|
21719
21746
|
});
|
|
21720
|
-
Struct({
|
|
21721
|
-
name: Literal("org_create_started"),
|
|
21722
|
-
props: OrgCreateStartedProps
|
|
21723
|
-
});
|
|
21724
|
-
Struct({
|
|
21725
|
-
name: Literal("org_safe_created"),
|
|
21726
|
-
props: OrgSafeCreatedProps
|
|
21727
|
-
});
|
|
21728
|
-
Struct({
|
|
21729
|
-
name: Literal("org_safe_confirmed"),
|
|
21730
|
-
props: OrgSafeConfirmedProps
|
|
21731
|
-
});
|
|
21732
|
-
Struct({
|
|
21733
|
-
name: Literal("org_roles_seeded"),
|
|
21734
|
-
props: OrgRolesSeededProps
|
|
21735
|
-
});
|
|
21736
|
-
Struct({
|
|
21737
|
-
name: Literal("org_created"),
|
|
21738
|
-
props: OrgCreatedProps
|
|
21739
|
-
});
|
|
21740
|
-
Struct({
|
|
21741
|
-
name: Literal("org_create_failed"),
|
|
21742
|
-
props: OrgCreateFailedProps
|
|
21743
|
-
});
|
|
21744
21747
|
Struct({
|
|
21745
21748
|
name: Literal("org_invite_sent"),
|
|
21746
21749
|
props: OrgInviteSentProps
|
|
@@ -22614,10 +22617,14 @@ const BootstrapFailedProps = Struct({
|
|
|
22614
22617
|
});
|
|
22615
22618
|
const MemberActivationStartedProps = Struct({
|
|
22616
22619
|
...TelemetryEnvelopeProps,
|
|
22620
|
+
entry_path: JourneyVariantProps.entry_path,
|
|
22621
|
+
surface: JourneyVariantProps.surface,
|
|
22617
22622
|
$insert_id: String$1
|
|
22618
22623
|
});
|
|
22619
22624
|
const MemberActivationReadyProps = Struct({
|
|
22620
22625
|
...TelemetryEnvelopeProps,
|
|
22626
|
+
entry_path: JourneyVariantProps.entry_path,
|
|
22627
|
+
surface: JourneyVariantProps.surface,
|
|
22621
22628
|
$insert_id: String$1,
|
|
22622
22629
|
duration_ms: DurationMsSchema
|
|
22623
22630
|
});
|
|
@@ -22775,7 +22782,7 @@ const FIELD_RULES = {
|
|
|
22775
22782
|
},
|
|
22776
22783
|
anonymousId: {
|
|
22777
22784
|
maxLength: 128,
|
|
22778
|
-
pattern: /^anon_[A-Za-z0-9-]
|
|
22785
|
+
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
|
|
22779
22786
|
},
|
|
22780
22787
|
traceparent: {
|
|
22781
22788
|
maxLength: 55,
|
|
@@ -24530,6 +24537,7 @@ function paymentsV2Signature(name) {
|
|
|
24530
24537
|
paymentsV2Signature("send");
|
|
24531
24538
|
paymentsV2Signature("sendBatch");
|
|
24532
24539
|
paymentsV2Signature("createCommitment");
|
|
24540
|
+
paymentsV2Signature("cancel"), paymentsV2Signature("redirect");
|
|
24533
24541
|
//#endregion
|
|
24534
24542
|
//#region ../../packages/protocol/src/evm/organization-payments.ts
|
|
24535
24543
|
/** Supported Organization permission identities, newest first. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capxul/sandbox",
|
|
3
|
-
"version": "4.20.0-beta.
|
|
3
|
+
"version": "4.20.0-beta.28",
|
|
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.
|
|
46
|
-
"@capxul/protocol": "0.2.0-beta.
|
|
47
|
-
"@capxul/sdk": "4.20.0-beta.
|
|
45
|
+
"@capxul/observability": "4.20.0-beta.28",
|
|
46
|
+
"@capxul/protocol": "0.2.0-beta.2",
|
|
47
|
+
"@capxul/sdk": "4.20.0-beta.28",
|
|
48
48
|
"@capxul/typescript-config": "0.0.0"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|