@oneshot-agent/sdk 0.26.0 → 0.28.1
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 +33 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +42 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +78 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +296 -83
- package/dist/index.js.map +1 -1
- package/dist/swap.d.ts.map +1 -1
- package/dist/swap.js +0 -4
- package/dist/swap.js.map +1 -1
- package/dist/types.d.ts +56 -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
|
@@ -60,4 +60,37 @@ export declare class EmergencyNumberError extends OneShotError {
|
|
|
60
60
|
readonly blockedNumber: string;
|
|
61
61
|
constructor(message: string, blockedNumber: string);
|
|
62
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
|
+
}
|
|
63
96
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts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AE,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.PaymentError = 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);
|
|
@@ -92,4 +92,45 @@ class EmergencyNumberError extends OneShotError {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
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;
|
|
95
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,M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BAAiB,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 { StatusUpdateFn, 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
|
/**
|
|
@@ -523,6 +556,12 @@ export declare class OneShot {
|
|
|
523
556
|
* `ToolError` shape.
|
|
524
557
|
*/
|
|
525
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;
|
|
526
565
|
private parsePaymentRejection;
|
|
527
566
|
private chargeAmount;
|
|
528
567
|
private maxCostHeader;
|
|
@@ -541,6 +580,21 @@ export declare class OneShot {
|
|
|
541
580
|
* body directly), since that differs per tool.
|
|
542
581
|
*/
|
|
543
582
|
private runQuoteToPay;
|
|
583
|
+
/**
|
|
584
|
+
* Wait for a previously dispatched job and return its result.
|
|
585
|
+
*
|
|
586
|
+
* Use this to resolve the `request_id` returned by a call made with
|
|
587
|
+
* `wait: false`, or to resume waiting after a client restart. Delivery is the
|
|
588
|
+
* same as for blocking calls: WebSocket push when the server offers it, HTTP
|
|
589
|
+
* polling of `GET /v1/requests/:id` as the source of truth.
|
|
590
|
+
*/
|
|
591
|
+
waitForResult<T = Record<string, unknown>>(requestId: string, options?: {
|
|
592
|
+
timeout?: number;
|
|
593
|
+
signal?: AbortSignal;
|
|
594
|
+
onStatusUpdate?: StatusUpdateFn;
|
|
595
|
+
waitForPhones?: boolean;
|
|
596
|
+
phoneTimeoutSec?: number;
|
|
597
|
+
}): Promise<T>;
|
|
544
598
|
private pollJob;
|
|
545
599
|
/**
|
|
546
600
|
* Detects whether a job result is still waiting for an async phone reveal.
|
|
@@ -561,7 +615,21 @@ export declare class OneShot {
|
|
|
561
615
|
* `phones_pending`).
|
|
562
616
|
*/
|
|
563
617
|
private _pollForPhones;
|
|
618
|
+
/**
|
|
619
|
+
* WebSocket branch of a job wait. Resolves on a `completed` push for this
|
|
620
|
+
* request, rejects with `JobError` on `failed` and with `OneShotError` on
|
|
621
|
+
* abort. Every other failure (no WebSocket global, handshake refused, socket
|
|
622
|
+
* closed early) rejects with a plain `Error`, which `pollJob` treats as
|
|
623
|
+
* "no push available" rather than as an outcome. There is no timeout here:
|
|
624
|
+
* the HTTP branch owns the deadline and aborts this one when it settles.
|
|
625
|
+
*/
|
|
564
626
|
private waitViaWebSocket;
|
|
627
|
+
/**
|
|
628
|
+
* HTTP branch of a job wait: polls `GET /v1/requests/:id` immediately, then
|
|
629
|
+
* on a short backoff (300ms → 2s). Once the WebSocket has proven it delivers
|
|
630
|
+
* for this request, polling relaxes to 5s and acts as a safety net only.
|
|
631
|
+
* Owns the caller's deadline (`JobTimeoutError`).
|
|
632
|
+
*/
|
|
565
633
|
private pollJobHttp;
|
|
566
634
|
private sleep;
|
|
567
635
|
private makeRequest;
|
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,KAA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