@oneshot-agent/sdk 0.25.0 → 0.27.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 +59 -0
- package/dist/errors.d.ts +64 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +63 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +80 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +251 -12
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +54 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -162,9 +162,68 @@ interface OneShotConfig {
|
|
|
162
162
|
rpcUrl?: string; // Override RPC URL
|
|
163
163
|
debug?: boolean; // Enable logging
|
|
164
164
|
logger?: (msg: string) => void;
|
|
165
|
+
budgets?: { // Spend budget (see below)
|
|
166
|
+
daily?: number;
|
|
167
|
+
perTransaction?: number;
|
|
168
|
+
alertAt?: number;
|
|
169
|
+
pauseAt?: number;
|
|
170
|
+
};
|
|
171
|
+
alerts?: { email?: string };
|
|
165
172
|
}
|
|
166
173
|
```
|
|
167
174
|
|
|
175
|
+
## Spend Budgets
|
|
176
|
+
|
|
177
|
+
Cap what the agent can spend, so a runaway loop can't drain the wallet overnight.
|
|
178
|
+
|
|
179
|
+
```typescript
|
|
180
|
+
const agent = await OneShot.create({
|
|
181
|
+
cdp: true,
|
|
182
|
+
budgets: {
|
|
183
|
+
daily: 50, // max USDC per UTC day
|
|
184
|
+
perTransaction: 5, // max USDC for any single call
|
|
185
|
+
alertAt: 0.8, // warn at 80% of daily
|
|
186
|
+
pauseAt: 1.0, // stop paying at 100%
|
|
187
|
+
},
|
|
188
|
+
alerts: { email: 'you@example.com' },
|
|
189
|
+
});
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Unlike `maxCost` (a per-call client-side check), budgets are **enforced server-side**
|
|
193
|
+
against your receipt ledger. The config is synced once before your first paid call,
|
|
194
|
+
so the daily figure is a true per-agent total — shared across every process, restart,
|
|
195
|
+
and serverless invocation using the same wallet, not a per-instance counter.
|
|
196
|
+
|
|
197
|
+
At `alertAt` you get a notification (in-app via `agent.notifications()`, plus email
|
|
198
|
+
if you set one). At `pauseAt` paid calls are rejected with a `BudgetExceededError`
|
|
199
|
+
until the window resets at the next UTC midnight:
|
|
200
|
+
|
|
201
|
+
```typescript
|
|
202
|
+
try {
|
|
203
|
+
await agent.research({ topic: '...' });
|
|
204
|
+
} catch (err) {
|
|
205
|
+
if (err instanceof BudgetExceededError) {
|
|
206
|
+
console.log(`${err.reason} budget hit — $${err.spent} spent, resumes ${err.resetsAt}`);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Check utilization any time:
|
|
212
|
+
|
|
213
|
+
```typescript
|
|
214
|
+
const b = await agent.budgets();
|
|
215
|
+
// { daily_usdc: 50, spent_today_usdc: '41.20', pct_used: 0.824, resets_at: '...' }
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Omit `budgets` entirely to leave whatever is stored server-side untouched — agents
|
|
219
|
+
without a budget are unlimited, which is the default.
|
|
220
|
+
|
|
221
|
+
The sync **fails closed**: if the budget can't be confirmed with the server (network
|
|
222
|
+
error, 5xx, rate limit, rejected config) the paid call throws `BudgetSyncError` and is
|
|
223
|
+
not made — proceeding would silently drop the guardrail you asked for. It retries on
|
|
224
|
+
the next paid call. An invalid config (`daily: -1`, `alertAt: 2`) throws `ValidationError`
|
|
225
|
+
at construction.
|
|
226
|
+
|
|
168
227
|
## Authentication
|
|
169
228
|
|
|
170
229
|
Every request identifies you by your wallet address (`X-Agent-ID`). Paid tools additionally settle a signed [x402](https://x402.org) USDC payment.
|
package/dist/errors.d.ts
CHANGED
|
@@ -6,6 +6,37 @@ export declare class ToolError extends OneShotError {
|
|
|
6
6
|
readonly responseBody: string;
|
|
7
7
|
constructor(message: string, statusCode: number, responseBody: string);
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* The facilitator rejected the payment signed for this request.
|
|
11
|
+
*
|
|
12
|
+
* Distinct from the ordinary 402 that opens the quote-pay handshake: this is a
|
|
13
|
+
* 402 arriving on the PAID retry, meaning the signature was refused. `reason`
|
|
14
|
+
* is the facilitator's machine-readable code (`insufficient_funds`,
|
|
15
|
+
* `invalid_exact_evm_payload_authorization_value`, …) and `expected`/`received`
|
|
16
|
+
* name the amounts when the two disagree — the case that produced a silent,
|
|
17
|
+
* bodiless 402 before the server started reporting it.
|
|
18
|
+
*/
|
|
19
|
+
export declare class PaymentError extends OneShotError {
|
|
20
|
+
readonly reason: string;
|
|
21
|
+
readonly expected?: {
|
|
22
|
+
amount?: string;
|
|
23
|
+
asset?: string;
|
|
24
|
+
network?: string;
|
|
25
|
+
payTo?: string;
|
|
26
|
+
} | undefined;
|
|
27
|
+
readonly received?: {
|
|
28
|
+
amount?: string;
|
|
29
|
+
} | undefined;
|
|
30
|
+
readonly quoteId?: string | undefined;
|
|
31
|
+
constructor(message: string, reason: string, expected?: {
|
|
32
|
+
amount?: string;
|
|
33
|
+
asset?: string;
|
|
34
|
+
network?: string;
|
|
35
|
+
payTo?: string;
|
|
36
|
+
} | undefined, received?: {
|
|
37
|
+
amount?: string;
|
|
38
|
+
} | undefined, quoteId?: string | undefined);
|
|
39
|
+
}
|
|
9
40
|
export declare class JobError extends OneShotError {
|
|
10
41
|
readonly jobId: string;
|
|
11
42
|
readonly jobError: string;
|
|
@@ -29,4 +60,37 @@ export declare class EmergencyNumberError extends OneShotError {
|
|
|
29
60
|
readonly blockedNumber: string;
|
|
30
61
|
constructor(message: string, blockedNumber: string);
|
|
31
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* The agent's own spend budget stopped this call (HTTP 403 `budget_exceeded`).
|
|
65
|
+
*
|
|
66
|
+
* Distinct from PaymentError: nothing was signed and nothing was charged. A
|
|
67
|
+
* retry cannot succeed until the daily window resets (`resetsAt`) or the budget
|
|
68
|
+
* is raised — which is why the server answers 403 rather than 402.
|
|
69
|
+
*
|
|
70
|
+
* `reason` is 'daily' when cumulative UTC-day spend would cross the budget, or
|
|
71
|
+
* 'per_transaction' when this single call is larger than the per-call cap.
|
|
72
|
+
*/
|
|
73
|
+
export declare class BudgetExceededError extends OneShotError {
|
|
74
|
+
readonly reason: 'daily' | 'per_transaction';
|
|
75
|
+
readonly cap?: number | undefined;
|
|
76
|
+
readonly spent?: number | undefined;
|
|
77
|
+
readonly charge?: number | undefined;
|
|
78
|
+
readonly resetsAt?: string | undefined;
|
|
79
|
+
constructor(message: string, reason: 'daily' | 'per_transaction', cap?: number | undefined, spent?: number | undefined, charge?: number | undefined, resetsAt?: string | undefined);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The SDK could not confirm the configured spend budget with the server
|
|
83
|
+
* before a paid call, so the call was NOT made.
|
|
84
|
+
*
|
|
85
|
+
* Budgets are enforced server-side; if the sync fails (network error, 5xx,
|
|
86
|
+
* rate limit, or a rejected config) the only honest options are to proceed
|
|
87
|
+
* without the guardrail the developer asked for, or to stop. We stop. The
|
|
88
|
+
* sync is retried on the next paid call. `status` is the HTTP status when the
|
|
89
|
+
* server answered, undefined on a network failure.
|
|
90
|
+
*/
|
|
91
|
+
export declare class BudgetSyncError extends OneShotError {
|
|
92
|
+
readonly status?: number | undefined;
|
|
93
|
+
readonly responseBody?: string | undefined;
|
|
94
|
+
constructor(message: string, status?: number | undefined, responseBody?: string | undefined);
|
|
95
|
+
}
|
|
32
96
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAMA,qBAAa,YAAa,SAAQ,KAAK;gBACzB,OAAO,EAAE,MAAM;CAK5B;AAED,qBAAa,SAAU,SAAQ,YAAY;aAGvB,UAAU,EAAE,MAAM;aAClB,YAAY,EAAE,MAAM;gBAFpC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C,OAAO,EAAE,MAAM,EACC,aAAa,EAAE,MAAM;CAKxC;AAED;;;;;;;;;GASG;AACH,qBAAa,mBAAoB,SAAQ,YAAY;aAGjC,MAAM,EAAE,OAAO,GAAG,iBAAiB;aACnC,GAAG,CAAC,EAAE,MAAM;aACZ,KAAK,CAAC,EAAE,MAAM;aACd,MAAM,CAAC,EAAE,MAAM;aACf,QAAQ,CAAC,EAAE,MAAM;gBALjC,OAAO,EAAE,MAAM,EACC,MAAM,EAAE,OAAO,GAAG,iBAAiB,EACnC,GAAG,CAAC,EAAE,MAAM,YAAA,EACZ,KAAK,CAAC,EAAE,MAAM,YAAA,EACd,MAAM,CAAC,EAAE,MAAM,YAAA,EACf,QAAQ,CAAC,EAAE,MAAM,YAAA;CAKpC;AAED;;;;;;;;;GASG;AACH,qBAAa,eAAgB,SAAQ,YAAY;aACF,MAAM,CAAC,EAAE,MAAM;aAAkB,YAAY,CAAC,EAAE,MAAM;gBAAvF,OAAO,EAAE,MAAM,EAAkB,MAAM,CAAC,EAAE,MAAM,YAAA,EAAkB,YAAY,CAAC,EAAE,MAAM,YAAA;CAIpG"}
|
package/dist/errors.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// that drove the throw (statusCode/responseBody, jobId, field, categories, …)
|
|
6
6
|
// so error handlers don't need to re-parse strings.
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.EmergencyNumberError = exports.ContentBlockedError = exports.ValidationError = exports.JobTimeoutError = exports.JobError = exports.ToolError = exports.OneShotError = void 0;
|
|
8
|
+
exports.BudgetSyncError = exports.BudgetExceededError = exports.EmergencyNumberError = exports.ContentBlockedError = exports.ValidationError = exports.JobTimeoutError = exports.JobError = exports.PaymentError = exports.ToolError = exports.OneShotError = void 0;
|
|
9
9
|
class OneShotError extends Error {
|
|
10
10
|
constructor(message) {
|
|
11
11
|
super(message);
|
|
@@ -23,6 +23,27 @@ class ToolError extends OneShotError {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
exports.ToolError = ToolError;
|
|
26
|
+
/**
|
|
27
|
+
* The facilitator rejected the payment signed for this request.
|
|
28
|
+
*
|
|
29
|
+
* Distinct from the ordinary 402 that opens the quote-pay handshake: this is a
|
|
30
|
+
* 402 arriving on the PAID retry, meaning the signature was refused. `reason`
|
|
31
|
+
* is the facilitator's machine-readable code (`insufficient_funds`,
|
|
32
|
+
* `invalid_exact_evm_payload_authorization_value`, …) and `expected`/`received`
|
|
33
|
+
* name the amounts when the two disagree — the case that produced a silent,
|
|
34
|
+
* bodiless 402 before the server started reporting it.
|
|
35
|
+
*/
|
|
36
|
+
class PaymentError extends OneShotError {
|
|
37
|
+
constructor(message, reason, expected, received, quoteId) {
|
|
38
|
+
super(message);
|
|
39
|
+
this.reason = reason;
|
|
40
|
+
this.expected = expected;
|
|
41
|
+
this.received = received;
|
|
42
|
+
this.quoteId = quoteId;
|
|
43
|
+
this.name = 'PaymentError';
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.PaymentError = PaymentError;
|
|
26
47
|
class JobError extends OneShotError {
|
|
27
48
|
constructor(message, jobId, jobError,
|
|
28
49
|
// Stable error-code taxonomy (issue #111): insufficient_funds, payment_failed,
|
|
@@ -71,4 +92,45 @@ class EmergencyNumberError extends OneShotError {
|
|
|
71
92
|
}
|
|
72
93
|
}
|
|
73
94
|
exports.EmergencyNumberError = EmergencyNumberError;
|
|
95
|
+
/**
|
|
96
|
+
* The agent's own spend budget stopped this call (HTTP 403 `budget_exceeded`).
|
|
97
|
+
*
|
|
98
|
+
* Distinct from PaymentError: nothing was signed and nothing was charged. A
|
|
99
|
+
* retry cannot succeed until the daily window resets (`resetsAt`) or the budget
|
|
100
|
+
* is raised — which is why the server answers 403 rather than 402.
|
|
101
|
+
*
|
|
102
|
+
* `reason` is 'daily' when cumulative UTC-day spend would cross the budget, or
|
|
103
|
+
* 'per_transaction' when this single call is larger than the per-call cap.
|
|
104
|
+
*/
|
|
105
|
+
class BudgetExceededError extends OneShotError {
|
|
106
|
+
constructor(message, reason, cap, spent, charge, resetsAt) {
|
|
107
|
+
super(message);
|
|
108
|
+
this.reason = reason;
|
|
109
|
+
this.cap = cap;
|
|
110
|
+
this.spent = spent;
|
|
111
|
+
this.charge = charge;
|
|
112
|
+
this.resetsAt = resetsAt;
|
|
113
|
+
this.name = 'BudgetExceededError';
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
exports.BudgetExceededError = BudgetExceededError;
|
|
117
|
+
/**
|
|
118
|
+
* The SDK could not confirm the configured spend budget with the server
|
|
119
|
+
* before a paid call, so the call was NOT made.
|
|
120
|
+
*
|
|
121
|
+
* Budgets are enforced server-side; if the sync fails (network error, 5xx,
|
|
122
|
+
* rate limit, or a rejected config) the only honest options are to proceed
|
|
123
|
+
* without the guardrail the developer asked for, or to stop. We stop. The
|
|
124
|
+
* sync is retried on the next paid call. `status` is the HTTP status when the
|
|
125
|
+
* server answered, undefined on a network failure.
|
|
126
|
+
*/
|
|
127
|
+
class BudgetSyncError extends OneShotError {
|
|
128
|
+
constructor(message, status, responseBody) {
|
|
129
|
+
super(message);
|
|
130
|
+
this.status = status;
|
|
131
|
+
this.responseBody = responseBody;
|
|
132
|
+
this.name = 'BudgetSyncError';
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
exports.BudgetSyncError = BudgetSyncError;
|
|
74
136
|
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,0EAA0E;AAC1E,gFAAgF;AAChF,8EAA8E;AAC9E,oDAAoD;;;AAEpD,MAAa,YAAa,SAAQ,KAAK;IACrC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,MAAM,CAAC,c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CAAC;QAFC,kBAAa,GAAb,aAAa,CAAQ;QAGrC,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AARD,oDAQC;AAED;;;;;;;;;GASG;AACH,MAAa,mBAAoB,SAAQ,YAAY;IACnD,YACE,OAAe,EACC,MAAmC,EACnC,GAAY,EACZ,KAAc,EACd,MAAe,EACf,QAAiB;QAEjC,KAAK,CAAC,OAAO,CAAC,CAAC;QANC,WAAM,GAAN,MAAM,CAA6B;QACnC,QAAG,GAAH,GAAG,CAAS;QACZ,UAAK,GAAL,KAAK,CAAS;QACd,WAAM,GAAN,MAAM,CAAS;QACf,aAAQ,GAAR,QAAQ,CAAS;QAGjC,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AAZD,kDAYC;AAED;;;;;;;;;GASG;AACH,MAAa,eAAgB,SAAQ,YAAY;IAC/C,YAAY,OAAe,EAAkB,MAAe,EAAkB,YAAqB;QACjG,KAAK,CAAC,OAAO,CAAC,CAAC;QAD4B,WAAM,GAAN,MAAM,CAAS;QAAkB,iBAAY,GAAZ,YAAY,CAAS;QAEjG,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AALD,0CAKC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,16 +6,7 @@ export { getSwapQuote, executeSwap } from './swap';
|
|
|
6
6
|
export type { SwapQuote, SwapResult, UniswapAddresses } from './swap';
|
|
7
7
|
export * from './errors';
|
|
8
8
|
export * from './types';
|
|
9
|
-
import type { OneShotConfig, ToolOptions, EmailToolOptions, ResearchToolOptions, PeopleSearchOptions, EnrichProfileOptions, FindEmailOptions, VerifyEmailOptions, CompanySearchOptions, CompanySearchResult, EnrichCompanyOptions, EnrichCompanyResult, DeepResearchPersonOptions, SocialProfilesOptions, ArticleSearchOptions, PersonNewsfeedOptions, PersonInterestsOptions, PersonInteractionsOptions, InboxListOptions, CommerceBuyOptions, CommerceSearchOptions, WebSearchOptions, WebSearchResult, WebReadOptions, WebReadResult, VoiceCallOptions, SmsOptions, SmsInboxOptions, PeopleSearchResult, ResearchResult, EmailResult, EnrichProfileResult, FindEmailResult, DeepResearchPersonResult, SocialProfilesResult, ArticleSearchResult, PersonNewsfeedResult, PersonInterestsResult, PersonInteractionsResult, VerifyEmailResult, InboxEmail, InboxListResult, CommerceBuyResult, CommerceSearchResult, VoiceCallResult, SmsSendResult, SmsInboxMessage, SmsInboxResult, NotificationsListOptions, NotificationsResult, BuildOptions, BuildResult, BrowserTaskOptions, BrowserProfile, BrowserResult, UpdateBuildOptions, SpendBreakdown, RoCSResult, RoCSByGoalResult, ReceiptsListResult, UnifiedBalance, ComputeOptions, ComputeGoalResult, ComputeGoalStatus, ComputeTask, ComputeBudgetStatus, DomainPoolListResult, DomainPoolStatusResult } from './types';
|
|
10
|
-
/**
|
|
11
|
-
* OneShot Agent SDK - Execute commercial transactions with automatic x402 payments.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```typescript
|
|
15
|
-
* const agent = new OneShot({ privateKey: process.env.AGENT_PRIVATE_KEY });
|
|
16
|
-
* await agent.email({ to: 'user@example.com', subject: 'Hi', body: 'Hello' });
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
9
|
+
import type { OneShotConfig, ToolOptions, EmailToolOptions, ResearchToolOptions, PeopleSearchOptions, EnrichProfileOptions, FindEmailOptions, VerifyEmailOptions, CompanySearchOptions, CompanySearchResult, EnrichCompanyOptions, EnrichCompanyResult, DeepResearchPersonOptions, SocialProfilesOptions, ArticleSearchOptions, PersonNewsfeedOptions, PersonInterestsOptions, PersonInteractionsOptions, InboxListOptions, CommerceBuyOptions, CommerceSearchOptions, WebSearchOptions, WebSearchResult, WebReadOptions, WebReadResult, VoiceCallOptions, SmsOptions, SmsInboxOptions, PeopleSearchResult, ResearchResult, EmailResult, EnrichProfileResult, FindEmailResult, DeepResearchPersonResult, SocialProfilesResult, ArticleSearchResult, PersonNewsfeedResult, PersonInterestsResult, PersonInteractionsResult, VerifyEmailResult, InboxEmail, InboxListResult, CommerceBuyResult, CommerceSearchResult, VoiceCallResult, SmsSendResult, SmsInboxMessage, SmsInboxResult, NotificationsListOptions, NotificationsResult, BuildOptions, BuildResult, BrowserTaskOptions, BrowserProfile, BrowserResult, UpdateBuildOptions, SpendBreakdown, RoCSResult, RoCSByGoalResult, ReceiptsListResult, UnifiedBalance, ComputeOptions, ComputeGoalResult, ComputeGoalStatus, ComputeTask, ComputeBudgetStatus, DomainPoolListResult, DomainPoolStatusResult, AgentBudgetConfig, AgentBudgetStatus } from './types';
|
|
19
10
|
export declare class OneShot {
|
|
20
11
|
private readonly provider;
|
|
21
12
|
private readonly rpcProvider;
|
|
@@ -24,6 +15,14 @@ export declare class OneShot {
|
|
|
24
15
|
private readonly logger;
|
|
25
16
|
private readonly _currency;
|
|
26
17
|
private readonly _slippage;
|
|
18
|
+
private readonly _budgets?;
|
|
19
|
+
private readonly _alertEmail?;
|
|
20
|
+
/**
|
|
21
|
+
* In-flight/settled budget sync. One PUT per instance: kept as a promise (not
|
|
22
|
+
* a boolean) so concurrent first calls await the same request instead of
|
|
23
|
+
* racing four PUTs on startup.
|
|
24
|
+
*/
|
|
25
|
+
private _budgetSync?;
|
|
27
26
|
/**
|
|
28
27
|
* Async factory — required for CDP wallets (account creation is async).
|
|
29
28
|
* Also works with privateKey and custom walletProvider.
|
|
@@ -48,6 +47,8 @@ export declare class OneShot {
|
|
|
48
47
|
get chainId(): number;
|
|
49
48
|
get currency(): 'USDC' | 'ETH';
|
|
50
49
|
get slippage(): number;
|
|
50
|
+
/** The budget config this instance was constructed with, if any. */
|
|
51
|
+
get budgetConfig(): AgentBudgetConfig | undefined;
|
|
51
52
|
tool<T = unknown>(toolName: string, options: ToolOptions & Record<string, unknown>): Promise<T>;
|
|
52
53
|
email(options: EmailToolOptions): Promise<EmailResult>;
|
|
53
54
|
/** List the caller's domain pool with warmup and rotation metadata. */
|
|
@@ -485,6 +486,38 @@ export declare class OneShot {
|
|
|
485
486
|
/** Build a query string, skipping null/undefined values. Pass falsy-but-valid
|
|
486
487
|
* values (0, '') as undefined at the call site to match prior `if (x)` guards. */
|
|
487
488
|
private buildQuery;
|
|
489
|
+
/**
|
|
490
|
+
* Push `config.budgets` to the server once, before the first paid call.
|
|
491
|
+
*
|
|
492
|
+
* Lazy rather than in the constructor because the PUT is signed (async) and
|
|
493
|
+
* the constructor is sync. Idempotent per instance via the cached promise,
|
|
494
|
+
* which is only kept once the sync SUCCEEDS.
|
|
495
|
+
*
|
|
496
|
+
* FAILS CLOSED. If the server can't confirm the budget — network error,
|
|
497
|
+
* 5xx, 429, or a rejected config — this throws BudgetSyncError and the paid
|
|
498
|
+
* call is not made. Proceeding would silently drop the guardrail the
|
|
499
|
+
* developer configured, which is exactly the "empty wallet at 3am" the
|
|
500
|
+
* budget exists to prevent. The marker is cleared so the next paid call
|
|
501
|
+
* retries.
|
|
502
|
+
*/
|
|
503
|
+
private ensureBudgetsSynced;
|
|
504
|
+
/**
|
|
505
|
+
* Local fast-fail on the per-transaction cap, so an oversized call fails
|
|
506
|
+
* without a network round-trip. The server enforces the same cap (and the
|
|
507
|
+
* daily one, which needs the ledger) regardless of which client calls —
|
|
508
|
+
* this is the same SDK-checks/server-enforces split as maxCost.
|
|
509
|
+
*/
|
|
510
|
+
private assertWithinBudget;
|
|
511
|
+
/**
|
|
512
|
+
* Current spend budget and today's utilization.
|
|
513
|
+
*
|
|
514
|
+
* @example
|
|
515
|
+
* ```typescript
|
|
516
|
+
* const b = await agent.budgets();
|
|
517
|
+
* console.log(`${b.spent_today_usdc} of ${b.daily_usdc} spent, resets ${b.resets_at}`);
|
|
518
|
+
* ```
|
|
519
|
+
*/
|
|
520
|
+
budgets(): Promise<AgentBudgetStatus>;
|
|
488
521
|
/** Local fast-fail guard: throw when a quote total exceeds the caller's cap. */
|
|
489
522
|
private assertWithinMaxCost;
|
|
490
523
|
/**
|
|
@@ -494,6 +527,43 @@ export declare class OneShot {
|
|
|
494
527
|
* a server-side enforcement layer so non-SDK callers (MCP server, custom
|
|
495
528
|
* integrations) can't ignore the cap.
|
|
496
529
|
*/
|
|
530
|
+
/**
|
|
531
|
+
* The amount to sign, in decimal USDC.
|
|
532
|
+
*
|
|
533
|
+
* A 402 advertises its price twice: the x402 v2 `PAYMENT-REQUIRED` header
|
|
534
|
+
* (`accepts[0].amount`, atomic units) and the legacy JSON body
|
|
535
|
+
* (`payment_request.amount`, decimal). The header is authoritative — it is
|
|
536
|
+
* what the server rebuilds its requirement from and what
|
|
537
|
+
* `findMatchingRequirements` compares the signature against.
|
|
538
|
+
*
|
|
539
|
+
* Preferring the body is how quote-based routes (email/send, sms, voice,
|
|
540
|
+
* build, commerce/buy, compute) silently failed: the body carried a
|
|
541
|
+
* hardcoded "0.00", so the SDK signed a zero-cost authorization against a
|
|
542
|
+
* real charge and the server answered with a bodiless 402. It stayed hidden
|
|
543
|
+
* for as long as credits covered those calls, since the credit path returns
|
|
544
|
+
* 202 without any payment handshake.
|
|
545
|
+
*
|
|
546
|
+
* Falls back to the body when the header is missing or unparseable.
|
|
547
|
+
*/
|
|
548
|
+
/**
|
|
549
|
+
* Throw the most specific error a failed response supports.
|
|
550
|
+
*
|
|
551
|
+
* A 402 arriving on the PAID retry means the facilitator refused the
|
|
552
|
+
* signature — not the ordinary "here is your quote" 402. The API names the
|
|
553
|
+
* cause in that body (`payment_verification_failed` + reason + expected vs
|
|
554
|
+
* received amount); surface it as a `PaymentError` so callers can branch on
|
|
555
|
+
* `err.reason` instead of string-matching. Anything else keeps the existing
|
|
556
|
+
* `ToolError` shape.
|
|
557
|
+
*/
|
|
558
|
+
private failFromResponse;
|
|
559
|
+
/**
|
|
560
|
+
* Map a 403 `budget_exceeded` body onto a typed error, so callers can catch
|
|
561
|
+
* "my own budget stopped this" separately from an auth failure or a payment
|
|
562
|
+
* rejection. Any other 403 falls through to ToolError.
|
|
563
|
+
*/
|
|
564
|
+
private parseBudgetRejection;
|
|
565
|
+
private parsePaymentRejection;
|
|
566
|
+
private chargeAmount;
|
|
497
567
|
private maxCostHeader;
|
|
498
568
|
/**
|
|
499
569
|
* Idempotency-Key header, sent on both legs (pre-402 and paid retry) so
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAexD,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAClI,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACnD,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AACtE,cAAc,UAAU,CAAC;AAqBzB,cAAc,SAAS,CAAC;AAExB,OAAO,KAAK,EAEgB,aAAa,EAAmB,WAAW,EACrE,gBAAgB,EAAE,mBAAmB,EAAE,mBAAmB,EAC1D,oBAAoB,EAAE,gBAAgB,EAAE,kBAAkB,EAC1D,oBAAoB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,mBAAmB,EACpF,yBAAyB,EAAE,qBAAqB,EAAE,oBAAoB,EACtE,qBAAqB,EAAE,sBAAsB,EAAE,yBAAyB,EACxE,gBAAgB,EAAmB,kBAAkB,EAAE,qBAAqB,EAC5E,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAChE,gBAAgB,EAAE,UAAU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