@1claw/sdk 0.59.10 → 0.61.0
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 +39 -4
- package/dist/core/client.d.ts +12 -0
- package/dist/core/client.d.ts.map +1 -1
- package/dist/core/client.js +8 -0
- package/dist/core/client.js.map +1 -1
- package/dist/generated/api-types.d.ts +12592 -9029
- package/dist/generated/api-types.d.ts.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/resources/connectors.d.ts +33 -0
- package/dist/resources/connectors.d.ts.map +1 -0
- package/dist/resources/connectors.js +38 -0
- package/dist/resources/connectors.js.map +1 -0
- package/dist/resources/discovery.d.ts +54 -1
- package/dist/resources/discovery.d.ts.map +1 -1
- package/dist/resources/discovery.js +60 -0
- package/dist/resources/discovery.js.map +1 -1
- package/dist/resources/notification-targets.d.ts +30 -0
- package/dist/resources/notification-targets.d.ts.map +1 -0
- package/dist/resources/notification-targets.js +34 -0
- package/dist/resources/notification-targets.js.map +1 -0
- package/dist/resources/pay.d.ts +85 -0
- package/dist/resources/pay.d.ts.map +1 -0
- package/dist/resources/pay.js +96 -0
- package/dist/resources/pay.js.map +1 -0
- package/dist/resources/peers.d.ts +59 -0
- package/dist/resources/peers.d.ts.map +1 -0
- package/dist/resources/peers.js +70 -0
- package/dist/resources/peers.js.map +1 -0
- package/dist/resources/platform.d.ts +61 -1
- package/dist/resources/platform.d.ts.map +1 -1
- package/dist/resources/platform.js +82 -0
- package/dist/resources/platform.js.map +1 -1
- package/dist/types.d.ts +477 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +8 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -1333,13 +1333,61 @@ export interface ApprovalRequest {
|
|
|
1333
1333
|
created_at: string;
|
|
1334
1334
|
}
|
|
1335
1335
|
export interface CreateApprovalRequest {
|
|
1336
|
+
/**
|
|
1337
|
+
* A control-plane request (`access_request`, `policy_request`,
|
|
1338
|
+
* `binding_request`) or a business action named `namespace.verb`
|
|
1339
|
+
* (`refund.create`, `social.post`).
|
|
1340
|
+
*
|
|
1341
|
+
* Actions 1Claw executes on approval — `card_order`, `agent_transaction`
|
|
1342
|
+
* and friends — are created by the platform and rejected here.
|
|
1343
|
+
*/
|
|
1336
1344
|
action: string;
|
|
1337
1345
|
target_type: string;
|
|
1338
1346
|
target_id: string;
|
|
1347
|
+
/** What the human is shown: `{ title, body, fields }`. */
|
|
1339
1348
|
summary: Record<string, unknown>;
|
|
1349
|
+
/**
|
|
1350
|
+
* What the action will actually do. The enforced risk tier and the
|
|
1351
|
+
* plain-language line are derived from this, not from `summary`.
|
|
1352
|
+
*/
|
|
1353
|
+
payload?: Record<string, unknown>;
|
|
1340
1354
|
reason?: string;
|
|
1355
|
+
/**
|
|
1356
|
+
* Advisory. The server derives the enforced tier and takes the higher of
|
|
1357
|
+
* the two — a caller may raise its own bar, never lower it. The response
|
|
1358
|
+
* returns both.
|
|
1359
|
+
*/
|
|
1360
|
+
declared_risk_tier?: number;
|
|
1361
|
+
/** @deprecated Renamed to `declared_risk_tier`. Still accepted. */
|
|
1341
1362
|
risk_tier?: number;
|
|
1342
1363
|
}
|
|
1364
|
+
/** An approval as returned by the API. */
|
|
1365
|
+
export interface Approval {
|
|
1366
|
+
id: string;
|
|
1367
|
+
org_id: string;
|
|
1368
|
+
user_id: string;
|
|
1369
|
+
agent_id: string | null;
|
|
1370
|
+
action: string;
|
|
1371
|
+
target_type: string;
|
|
1372
|
+
target_id: string;
|
|
1373
|
+
/** The tier actually enforced. Authoritative. */
|
|
1374
|
+
risk_tier: number;
|
|
1375
|
+
/** What the caller asked for, when it asked for anything. */
|
|
1376
|
+
declared_risk_tier?: number | null;
|
|
1377
|
+
/** The caller asked for a lower tier than policy required. */
|
|
1378
|
+
declared_below_floor?: boolean;
|
|
1379
|
+
status: "pending" | "approved" | "rejected";
|
|
1380
|
+
summary: Record<string, unknown>;
|
|
1381
|
+
/** Plain-language line, rendered server-side from the agent's policy template. */
|
|
1382
|
+
human_summary?: string | null;
|
|
1383
|
+
payload?: Record<string, unknown>;
|
|
1384
|
+
reason: string | null;
|
|
1385
|
+
decision_reason: string | null;
|
|
1386
|
+
decided_by: string | null;
|
|
1387
|
+
decided_at: string | null;
|
|
1388
|
+
expires_at: string | null;
|
|
1389
|
+
created_at: string;
|
|
1390
|
+
}
|
|
1343
1391
|
export interface ApprovalListResponse {
|
|
1344
1392
|
approvals: ApprovalRequest[];
|
|
1345
1393
|
}
|
|
@@ -1458,11 +1506,155 @@ export interface TemplateResponse {
|
|
|
1458
1506
|
name: string;
|
|
1459
1507
|
description: string;
|
|
1460
1508
|
version: number;
|
|
1509
|
+
/**
|
|
1510
|
+
* SHA-256 of `spec`. Lets a caller tell a version bump that changed nothing
|
|
1511
|
+
* from one that did. Null on templates written before migration 245.
|
|
1512
|
+
*/
|
|
1513
|
+
spec_hash?: string | null;
|
|
1461
1514
|
spec: Record<string, unknown>;
|
|
1462
1515
|
is_active: boolean;
|
|
1463
1516
|
created_at: string;
|
|
1464
1517
|
updated_at: string;
|
|
1465
1518
|
}
|
|
1519
|
+
/** How a cohort splits across the template versions it was provisioned from. */
|
|
1520
|
+
export interface FleetVersionBucket {
|
|
1521
|
+
template_version: number | null;
|
|
1522
|
+
agents: number;
|
|
1523
|
+
}
|
|
1524
|
+
export interface FleetSummaryResponse {
|
|
1525
|
+
template_id: string;
|
|
1526
|
+
template_name: string;
|
|
1527
|
+
current_version: number;
|
|
1528
|
+
spec_hash?: string | null;
|
|
1529
|
+
total_agents: number;
|
|
1530
|
+
version_skew: FleetVersionBucket[];
|
|
1531
|
+
agents_on_current_version: number;
|
|
1532
|
+
agents_behind: number;
|
|
1533
|
+
/** Agents a previous rollout declined to touch. */
|
|
1534
|
+
drifted_agents: number;
|
|
1535
|
+
/**
|
|
1536
|
+
* The fields `bulkPatch` and `rollout` will carry.
|
|
1537
|
+
*
|
|
1538
|
+
* Read this rather than hard-coding the list. It is deliberately narrower
|
|
1539
|
+
* than a single-agent patch — no guardrails, no capability flags — because
|
|
1540
|
+
* a fleet request applies to every agent at once and nobody reviews it per
|
|
1541
|
+
* agent. It may narrow further.
|
|
1542
|
+
*/
|
|
1543
|
+
bulk_patchable_fields: string[];
|
|
1544
|
+
}
|
|
1545
|
+
export interface FleetAgent {
|
|
1546
|
+
agent_id: string;
|
|
1547
|
+
name: string;
|
|
1548
|
+
org_id: string;
|
|
1549
|
+
platform_connection_id?: string | null;
|
|
1550
|
+
provisioned_from_version?: number | null;
|
|
1551
|
+
last_fleet_sync_at?: string | null;
|
|
1552
|
+
/**
|
|
1553
|
+
* Fields a rollout skipped because they were changed outside fleet control.
|
|
1554
|
+
* The standing answer to "why is this agent behind?".
|
|
1555
|
+
*/
|
|
1556
|
+
drift_fields: string[];
|
|
1557
|
+
is_active: boolean;
|
|
1558
|
+
is_current: boolean;
|
|
1559
|
+
}
|
|
1560
|
+
export interface ListFleetAgentsResponse {
|
|
1561
|
+
agents: FleetAgent[];
|
|
1562
|
+
limit: number;
|
|
1563
|
+
offset: number;
|
|
1564
|
+
current_version: number;
|
|
1565
|
+
}
|
|
1566
|
+
export interface BulkPatchFleetResponse {
|
|
1567
|
+
fields_applied: string[];
|
|
1568
|
+
agents_matched: number;
|
|
1569
|
+
agents_updated: number;
|
|
1570
|
+
}
|
|
1571
|
+
export type FleetRolloutOutcome = {
|
|
1572
|
+
outcome: "already_current";
|
|
1573
|
+
agent_id: string;
|
|
1574
|
+
} | {
|
|
1575
|
+
outcome: "synced";
|
|
1576
|
+
agent_id: string;
|
|
1577
|
+
fields: string[];
|
|
1578
|
+
} | {
|
|
1579
|
+
outcome: "skipped_drifted";
|
|
1580
|
+
agent_id: string;
|
|
1581
|
+
drift_fields: string[];
|
|
1582
|
+
};
|
|
1583
|
+
export interface FleetRolloutResponse {
|
|
1584
|
+
/** Null for a dry run, which claims no job. */
|
|
1585
|
+
job_id: string | null;
|
|
1586
|
+
to_version: number;
|
|
1587
|
+
dry_run: boolean;
|
|
1588
|
+
forced: boolean;
|
|
1589
|
+
total_agents: number;
|
|
1590
|
+
synced: number;
|
|
1591
|
+
already_current: number;
|
|
1592
|
+
skipped_drifted: number;
|
|
1593
|
+
outcomes: FleetRolloutOutcome[];
|
|
1594
|
+
}
|
|
1595
|
+
export interface FleetRolloutRequest {
|
|
1596
|
+
/** Overwrite hand edits. Still cannot carry a guardrail. */
|
|
1597
|
+
force?: boolean;
|
|
1598
|
+
/** Report the plan without applying it. Claims no job. */
|
|
1599
|
+
dry_run?: boolean;
|
|
1600
|
+
}
|
|
1601
|
+
export interface PauseFleetResponse {
|
|
1602
|
+
agents_paused: number;
|
|
1603
|
+
}
|
|
1604
|
+
/**
|
|
1605
|
+
* Text the server judged suspicious but not blocking.
|
|
1606
|
+
*
|
|
1607
|
+
* Returned instead of a bare string so a caller cannot pass it to a model by
|
|
1608
|
+
* accident: the type will not typecheck as a string. Treat `raw_text` as data
|
|
1609
|
+
* and prepend `system_prefix` if it must reach a prompt at all.
|
|
1610
|
+
*/
|
|
1611
|
+
export interface UntrustedContent {
|
|
1612
|
+
untrusted_content: true;
|
|
1613
|
+
source: string;
|
|
1614
|
+
id: string;
|
|
1615
|
+
field: string;
|
|
1616
|
+
raw_text: string;
|
|
1617
|
+
system_prefix: string;
|
|
1618
|
+
}
|
|
1619
|
+
/** A string when clean, an envelope when `content_warning` is true. */
|
|
1620
|
+
export type MaybeUntrusted = string | UntrustedContent;
|
|
1621
|
+
export interface DirectoryJob {
|
|
1622
|
+
id: string;
|
|
1623
|
+
title: MaybeUntrusted;
|
|
1624
|
+
description: MaybeUntrusted;
|
|
1625
|
+
tags: string[];
|
|
1626
|
+
required_capabilities: string[];
|
|
1627
|
+
budget?: {
|
|
1628
|
+
amount: string;
|
|
1629
|
+
currency: string;
|
|
1630
|
+
} | null;
|
|
1631
|
+
deadline_at?: string | null;
|
|
1632
|
+
status: "open" | "awarded" | "completed" | "cancelled" | "expired";
|
|
1633
|
+
bid_count: number;
|
|
1634
|
+
content_warning: boolean;
|
|
1635
|
+
awarded_agent_id?: string | null;
|
|
1636
|
+
a2a_handoff?: Record<string, unknown> | null;
|
|
1637
|
+
expires_at: string;
|
|
1638
|
+
created_at: string;
|
|
1639
|
+
}
|
|
1640
|
+
export interface DirectoryJobBid {
|
|
1641
|
+
id: string;
|
|
1642
|
+
job_id: string;
|
|
1643
|
+
bidder_agent_id: string;
|
|
1644
|
+
summary: MaybeUntrusted;
|
|
1645
|
+
proposed_cost?: {
|
|
1646
|
+
amount: string;
|
|
1647
|
+
currency: string;
|
|
1648
|
+
} | null;
|
|
1649
|
+
estimated_duration_mins?: number | null;
|
|
1650
|
+
status: "pending" | "accepted" | "rejected" | "withdrawn";
|
|
1651
|
+
content_warning: boolean;
|
|
1652
|
+
created_at: string;
|
|
1653
|
+
}
|
|
1654
|
+
/** Narrow a possibly-wrapped field, and say plainly whether it was flagged. */
|
|
1655
|
+
export declare function isUntrusted(v: MaybeUntrusted): v is UntrustedContent;
|
|
1656
|
+
/** The text of a field, wrapped or not. Never pass this straight to a model. */
|
|
1657
|
+
export declare function rawText(v: MaybeUntrusted): string;
|
|
1466
1658
|
export interface TemplateListResponse {
|
|
1467
1659
|
templates: TemplateResponse[];
|
|
1468
1660
|
}
|
|
@@ -2548,4 +2740,289 @@ export interface ShamirSetupResponse {
|
|
|
2548
2740
|
custody_mode: string;
|
|
2549
2741
|
created_at: string;
|
|
2550
2742
|
}
|
|
2743
|
+
export interface ConnectorPreset {
|
|
2744
|
+
slug: string;
|
|
2745
|
+
display_name: string;
|
|
2746
|
+
description: string;
|
|
2747
|
+
category: string;
|
|
2748
|
+
/** `oauth_providers.slug`, or null when the connector uses a pasted API key. */
|
|
2749
|
+
provider_slug: string | null;
|
|
2750
|
+
oauth_scopes: string[];
|
|
2751
|
+
/** Scopes without which the connector cannot do anything. */
|
|
2752
|
+
required_scopes: string[];
|
|
2753
|
+
binding_type: string;
|
|
2754
|
+
base_url: string;
|
|
2755
|
+
/** Hosts the installed binding may reach. Always includes the base URL's host. */
|
|
2756
|
+
allowed_hosts: string[];
|
|
2757
|
+
documentation_url: string;
|
|
2758
|
+
tier_required: string;
|
|
2759
|
+
requires_oauth: boolean;
|
|
2760
|
+
}
|
|
2761
|
+
export interface ConnectorPresetListResponse {
|
|
2762
|
+
presets: ConnectorPreset[];
|
|
2763
|
+
}
|
|
2764
|
+
export interface InstallConnectorRequest {
|
|
2765
|
+
/** Defaults to the preset slug. */
|
|
2766
|
+
binding_name?: string;
|
|
2767
|
+
/** May narrow the preset's scopes; never extend them. */
|
|
2768
|
+
scopes?: string[];
|
|
2769
|
+
redirect_after?: string;
|
|
2770
|
+
}
|
|
2771
|
+
export interface InstallConnectorResponse {
|
|
2772
|
+
binding_id: string;
|
|
2773
|
+
binding_name: string;
|
|
2774
|
+
preset_slug: string;
|
|
2775
|
+
/** Absent for connectors that use a pasted API key rather than OAuth. */
|
|
2776
|
+
authorization_url?: string | null;
|
|
2777
|
+
/** What the user still has to do, in words. */
|
|
2778
|
+
next_step: string;
|
|
2779
|
+
}
|
|
2780
|
+
export interface InstalledConnector {
|
|
2781
|
+
binding_id: string;
|
|
2782
|
+
binding_name: string;
|
|
2783
|
+
preset_slug: string;
|
|
2784
|
+
/** Null if the preset has since been retired from the catalogue. */
|
|
2785
|
+
display_name?: string | null;
|
|
2786
|
+
is_active: boolean;
|
|
2787
|
+
/** The OAuth round trip completed and a token is stored. */
|
|
2788
|
+
connected: boolean;
|
|
2789
|
+
/** The stored token was rejected; the user must reconnect. */
|
|
2790
|
+
needs_reauth: boolean;
|
|
2791
|
+
created_at: string;
|
|
2792
|
+
}
|
|
2793
|
+
export interface InstalledConnectorListResponse {
|
|
2794
|
+
connectors: InstalledConnector[];
|
|
2795
|
+
}
|
|
2796
|
+
export type NotificationTargetType = "sms" | "webhook" | "expo" | "email";
|
|
2797
|
+
export interface NotificationTarget {
|
|
2798
|
+
id: string;
|
|
2799
|
+
target_type: NotificationTargetType;
|
|
2800
|
+
user_id?: string | null;
|
|
2801
|
+
agent_id?: string | null;
|
|
2802
|
+
/**
|
|
2803
|
+
* `{ phone_number }` for sms (E.164 only), `{ url }` for webhook (https
|
|
2804
|
+
* only), `{ email }`, or `{ push_token }`.
|
|
2805
|
+
*/
|
|
2806
|
+
config: Record<string, unknown>;
|
|
2807
|
+
/** Empty means every event. */
|
|
2808
|
+
events: string[];
|
|
2809
|
+
is_active: boolean;
|
|
2810
|
+
/**
|
|
2811
|
+
* An unverified SMS target receives notifications but cannot decide an
|
|
2812
|
+
* approval by reply.
|
|
2813
|
+
*/
|
|
2814
|
+
verified: boolean;
|
|
2815
|
+
created_at: string;
|
|
2816
|
+
}
|
|
2817
|
+
export interface NotificationTargetListResponse {
|
|
2818
|
+
targets: NotificationTarget[];
|
|
2819
|
+
}
|
|
2820
|
+
export interface CreateNotificationTargetRequest {
|
|
2821
|
+
target_type: NotificationTargetType;
|
|
2822
|
+
config: Record<string, unknown>;
|
|
2823
|
+
events?: string[];
|
|
2824
|
+
/** The agent whose SMS channel sends to this target. */
|
|
2825
|
+
agent_id?: string;
|
|
2826
|
+
/** Defaults to the caller. */
|
|
2827
|
+
user_id?: string;
|
|
2828
|
+
}
|
|
2829
|
+
export interface UsageCounts {
|
|
2830
|
+
api_requests: number;
|
|
2831
|
+
signatures: number;
|
|
2832
|
+
execution_intents: number;
|
|
2833
|
+
execution_intents_tee: number;
|
|
2834
|
+
/** A decimal string. Money is not a float; zero is `"0"`. */
|
|
2835
|
+
inference_usd: string;
|
|
2836
|
+
credits_debited_cents: number;
|
|
2837
|
+
}
|
|
2838
|
+
export interface ConnectionUsageEntry {
|
|
2839
|
+
connection_id: string;
|
|
2840
|
+
usage: UsageCounts;
|
|
2841
|
+
}
|
|
2842
|
+
/**
|
|
2843
|
+
* Usage that could not be charged to a connection.
|
|
2844
|
+
*
|
|
2845
|
+
* The two are different problems. `none` is ordinary traffic with no platform
|
|
2846
|
+
* linkage. `ambiguous` belongs to a real end-user whose connection could not be
|
|
2847
|
+
* determined — that is the one worth acting on.
|
|
2848
|
+
*/
|
|
2849
|
+
export interface UnattributedUsage {
|
|
2850
|
+
ambiguous: UsageCounts;
|
|
2851
|
+
none: UsageCounts;
|
|
2852
|
+
}
|
|
2853
|
+
export interface AppUsageReport {
|
|
2854
|
+
app_id: string;
|
|
2855
|
+
period_start: string;
|
|
2856
|
+
/** Exclusive: the period is half-open. */
|
|
2857
|
+
period_end: string;
|
|
2858
|
+
connections: ConnectionUsageEntry[];
|
|
2859
|
+
unattributed: UnattributedUsage;
|
|
2860
|
+
/** Connections plus both unattributed buckets. Derived, not queried. */
|
|
2861
|
+
totals: UsageCounts;
|
|
2862
|
+
has_ambiguous_usage: boolean;
|
|
2863
|
+
}
|
|
2864
|
+
export interface Peer {
|
|
2865
|
+
id: string;
|
|
2866
|
+
peer_type: "user" | "platform_connection" | "external";
|
|
2867
|
+
peer_ref: string;
|
|
2868
|
+
display_name?: string | null;
|
|
2869
|
+
profile: Record<string, unknown>;
|
|
2870
|
+
/** Archived when a connection is disconnected: agents lose observation, the person keeps export and delete. */
|
|
2871
|
+
status: "active" | "archived";
|
|
2872
|
+
/** How many agents observe this peer. The list itself is not returned. */
|
|
2873
|
+
observer_count: number;
|
|
2874
|
+
created_at: string;
|
|
2875
|
+
}
|
|
2876
|
+
export interface PeerFact {
|
|
2877
|
+
fact_key: string;
|
|
2878
|
+
fact_value: Record<string, unknown>;
|
|
2879
|
+
/** 0..1, capped below certainty — no history makes the next decision certain. */
|
|
2880
|
+
confidence?: string | null;
|
|
2881
|
+
/** Why this is believed. Entries are `event`, `tombstone` (the event expired) or `human`. */
|
|
2882
|
+
provenance: unknown[];
|
|
2883
|
+
/** A person corrected this; the processor will not overwrite it. */
|
|
2884
|
+
edited_by_human: boolean;
|
|
2885
|
+
updated_at: string;
|
|
2886
|
+
}
|
|
2887
|
+
export interface PeerWithFacts {
|
|
2888
|
+
peer: Peer;
|
|
2889
|
+
facts: PeerFact[];
|
|
2890
|
+
}
|
|
2891
|
+
export interface CreatePeerRequest {
|
|
2892
|
+
peer_type: "user" | "platform_connection" | "external";
|
|
2893
|
+
peer_ref: string;
|
|
2894
|
+
display_name?: string;
|
|
2895
|
+
platform_connection_id?: string;
|
|
2896
|
+
/** Empty means nobody. A peer with no observers is readable by no agent. */
|
|
2897
|
+
observer_agent_ids?: string[];
|
|
2898
|
+
}
|
|
2899
|
+
export interface PeerContextResponse {
|
|
2900
|
+
/** Empty when nothing has been derived yet. */
|
|
2901
|
+
context: string;
|
|
2902
|
+
characters: number;
|
|
2903
|
+
budget?: number;
|
|
2904
|
+
facts_available?: number;
|
|
2905
|
+
}
|
|
2906
|
+
export interface PredictApprovalRequest {
|
|
2907
|
+
action_type: string;
|
|
2908
|
+
payload?: Record<string, unknown>;
|
|
2909
|
+
/** The server-derived tier for this action. */
|
|
2910
|
+
effective_risk_tier: number;
|
|
2911
|
+
}
|
|
2912
|
+
export type PredictApprovalBlockedReason = "no_matching_rule" | "rule_requires_approval" | "above_configured_threshold" | "risk_tier_requires_step_up" | "action_is_sensitive";
|
|
2913
|
+
export interface PredictApprovalResponse {
|
|
2914
|
+
/** An observation about a person. Absent when there is no comparable history. */
|
|
2915
|
+
likelihood?: number | null;
|
|
2916
|
+
reasoning: string;
|
|
2917
|
+
/**
|
|
2918
|
+
* A statement about your policy — whether a rule you already wrote permits
|
|
2919
|
+
* this automatically. Never derived from `likelihood`.
|
|
2920
|
+
*/
|
|
2921
|
+
suggest_auto: boolean;
|
|
2922
|
+
blocked_reason?: PredictApprovalBlockedReason;
|
|
2923
|
+
}
|
|
2924
|
+
export interface PayPrepareRequest {
|
|
2925
|
+
/**
|
|
2926
|
+
* The exact bytes the paywall served, base64. Send them verbatim: the digest
|
|
2927
|
+
* a person authorizes is computed from this preimage, so any field parsed
|
|
2928
|
+
* out and re-sent would fall outside what they actually approved.
|
|
2929
|
+
*/
|
|
2930
|
+
challenge_b64: string;
|
|
2931
|
+
method: string;
|
|
2932
|
+
resource_url: string;
|
|
2933
|
+
/** Reuse on retry so one 402 cannot become two payments. */
|
|
2934
|
+
idempotency_key?: string;
|
|
2935
|
+
/** A request, not an instruction — the vault decides (D12). */
|
|
2936
|
+
mode?: "strict" | "session" | "auto";
|
|
2937
|
+
}
|
|
2938
|
+
export interface PayPrepareResponse {
|
|
2939
|
+
session_id: string;
|
|
2940
|
+
payment_digest: string;
|
|
2941
|
+
sign_idempotency_key: string;
|
|
2942
|
+
quote: Record<string, unknown>;
|
|
2943
|
+
valid_before: string | null;
|
|
2944
|
+
expires_at: string;
|
|
2945
|
+
/** `allow` | `require_passkey` | `require_grant` | `deny: <reason>` */
|
|
2946
|
+
authorization: string;
|
|
2947
|
+
/** Under 30 seconds left — may expire while a person reads the page. */
|
|
2948
|
+
short_window: boolean;
|
|
2949
|
+
}
|
|
2950
|
+
export interface PaySignRequest {
|
|
2951
|
+
session_id: string;
|
|
2952
|
+
mode?: "strict" | "session" | "auto";
|
|
2953
|
+
/** Offer a specific grant; omit for the newest live one. */
|
|
2954
|
+
grant_id?: string;
|
|
2955
|
+
}
|
|
2956
|
+
export interface PaySignResponse {
|
|
2957
|
+
payment_id: string;
|
|
2958
|
+
/** The `X-PAYMENT` header value. The signature, never the key. */
|
|
2959
|
+
payment_header: string;
|
|
2960
|
+
amount_usd: string;
|
|
2961
|
+
pay_to: string;
|
|
2962
|
+
grant_id: string | null;
|
|
2963
|
+
}
|
|
2964
|
+
export interface PayResultRequest {
|
|
2965
|
+
http_status?: number;
|
|
2966
|
+
/** Omit when the outcome is genuinely unknown rather than guessing false. */
|
|
2967
|
+
settled?: boolean;
|
|
2968
|
+
error?: string | null;
|
|
2969
|
+
}
|
|
2970
|
+
export interface CreatePayGrantRequest {
|
|
2971
|
+
cap_usd: string;
|
|
2972
|
+
ttl_secs: number;
|
|
2973
|
+
/** `null`/omitted means any recipient; `[]` means none. */
|
|
2974
|
+
allowed_paytos?: string[] | null;
|
|
2975
|
+
/** The digest the person asserted over. */
|
|
2976
|
+
grant_digest: string;
|
|
2977
|
+
}
|
|
2978
|
+
export interface PayGrantResponse {
|
|
2979
|
+
grant_id: string;
|
|
2980
|
+
cap_usd: string;
|
|
2981
|
+
remaining_usd: string;
|
|
2982
|
+
expires_at: string;
|
|
2983
|
+
allowed_paytos: string[] | null;
|
|
2984
|
+
}
|
|
2985
|
+
export interface PaySessionResponse {
|
|
2986
|
+
session_id: string;
|
|
2987
|
+
agent_id: string;
|
|
2988
|
+
agent_name: string;
|
|
2989
|
+
status: string;
|
|
2990
|
+
quote: Record<string, unknown>;
|
|
2991
|
+
payment_digest: string;
|
|
2992
|
+
valid_before: string | null;
|
|
2993
|
+
expires_at: string;
|
|
2994
|
+
}
|
|
2995
|
+
export interface PaymentStatusResponse {
|
|
2996
|
+
payment_id: string;
|
|
2997
|
+
status: string;
|
|
2998
|
+
amount_usd: string | null;
|
|
2999
|
+
pay_to: string;
|
|
3000
|
+
resource_url: string;
|
|
3001
|
+
grant_id: string | null;
|
|
3002
|
+
}
|
|
3003
|
+
export interface UpdatePayGuardrailsRequest {
|
|
3004
|
+
pay_enabled?: boolean;
|
|
3005
|
+
pay_max_usd?: string | null;
|
|
3006
|
+
pay_daily_limit_usd?: string | null;
|
|
3007
|
+
/** Null is not a wildcard — for an unattended agent it means no one. */
|
|
3008
|
+
pay_payto_allowlist?: string[] | null;
|
|
3009
|
+
/** Defaults true. Turning it off is what "unattended" means. */
|
|
3010
|
+
pay_require_passkey?: boolean;
|
|
3011
|
+
pay_require_approval?: boolean;
|
|
3012
|
+
pay_grant_mode_enabled?: boolean;
|
|
3013
|
+
pay_grant_max_usd?: string | null;
|
|
3014
|
+
pay_grant_max_ttl_secs?: number | null;
|
|
3015
|
+
}
|
|
3016
|
+
export interface PaySettingsResponse {
|
|
3017
|
+
agent_id: string;
|
|
3018
|
+
pay_enabled: boolean;
|
|
3019
|
+
pay_max_usd: string | null;
|
|
3020
|
+
pay_daily_limit_usd: string | null;
|
|
3021
|
+
pay_payto_allowlist: string[] | null;
|
|
3022
|
+
pay_require_passkey: boolean;
|
|
3023
|
+
pay_require_approval: boolean;
|
|
3024
|
+
pay_grant_mode_enabled: boolean;
|
|
3025
|
+
pay_grant_max_usd: string | null;
|
|
3026
|
+
pay_grant_max_ttl_secs: number | null;
|
|
3027
|
+
}
|
|
2551
3028
|
//# sourceMappingURL=types.d.ts.map
|