@oneshot-agent/sdk 0.16.2 → 0.18.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.
@@ -0,0 +1,1040 @@
1
+ import type { WalletProvider } from './wallet-provider';
2
+ export interface TokenInfo {
3
+ address: string;
4
+ symbol: string;
5
+ decimals: number;
6
+ }
7
+ export interface PaymentInfo {
8
+ protocol: 'x402';
9
+ network: string;
10
+ payTo: string;
11
+ amount: string;
12
+ currency: string;
13
+ facilitator_url: string;
14
+ token: TokenInfo;
15
+ context?: Record<string, unknown>;
16
+ }
17
+ export interface PaymentRequirements {
18
+ scheme: string;
19
+ network: string;
20
+ amount: string;
21
+ asset: string;
22
+ payTo: string;
23
+ maxTimeoutSeconds: number;
24
+ extra?: Record<string, unknown>;
25
+ }
26
+ export interface PaymentAuthorization {
27
+ x402Version: 2;
28
+ resource?: {
29
+ url: string;
30
+ description?: string;
31
+ mimeType?: string;
32
+ };
33
+ extensions?: Record<string, unknown>;
34
+ accepted: PaymentRequirements;
35
+ payload: {
36
+ signature: string;
37
+ authorization: {
38
+ from: string;
39
+ to: string;
40
+ value: string;
41
+ validAfter: string;
42
+ validBefore: string;
43
+ nonce: string;
44
+ };
45
+ };
46
+ }
47
+ export type LoggerFn = (message: string) => void;
48
+ export type StatusUpdateFn = (status: string, requestId: string) => void;
49
+ export interface OneShotConfig {
50
+ /** Option A: Raw private key (existing behavior) */
51
+ privateKey?: string;
52
+ /** Option B: Use Coinbase CDP Server Wallet (reads CDP_* env vars). Pass true or { address } to reuse existing. */
53
+ cdp?: boolean | {
54
+ address?: string;
55
+ };
56
+ /** Option C: Bring your own WalletProvider implementation */
57
+ walletProvider?: WalletProvider;
58
+ /** Override API URL */
59
+ baseUrl?: string;
60
+ /** Override RPC URL */
61
+ rpcUrl?: string;
62
+ /** Enable debug logging */
63
+ debug?: boolean;
64
+ /** Custom logger function */
65
+ logger?: LoggerFn;
66
+ /** Payment currency: "USDC" (default, no swap) or "ETH" (auto-swap via Uniswap V3) */
67
+ currency?: 'USDC' | 'ETH';
68
+ /** Slippage tolerance for ETH→USDC swaps (default: 0.01 = 1%). Only used when currency is "ETH". */
69
+ slippage?: number;
70
+ }
71
+ /**
72
+ * Structured decision context for a tool call. Machine-readable metadata
73
+ * that explains WHY this tool was called — consumed by auditor agents
74
+ * and programmatic oversight. Open schema: known fields are typed,
75
+ * extra keys are allowed.
76
+ */
77
+ export interface DecisionContext {
78
+ /** Goal or objective this tool call serves */
79
+ goal?: string;
80
+ /** Compute goal ID if linked to an orchestrated goal */
81
+ goalId?: string;
82
+ /** Alternative tools/approaches that were considered */
83
+ alternatives?: string[];
84
+ /** Confidence in this being the right tool choice (0-1) */
85
+ confidence?: number;
86
+ /** Any additional context */
87
+ [key: string]: unknown;
88
+ }
89
+ export interface ToolOptions {
90
+ maxCost?: number;
91
+ timeout?: number;
92
+ signal?: AbortSignal;
93
+ onStatusUpdate?: StatusUpdateFn;
94
+ wait?: boolean;
95
+ /** Optional value tag for RoCS tracking — stored in the receipt at creation time */
96
+ valueTag?: {
97
+ type: string;
98
+ amount?: number;
99
+ label?: string;
100
+ };
101
+ /**
102
+ * Short human-readable reason for this tool call. Stored on the receipt
103
+ * for debugging and audit. Max 1000 chars. The SDK warns (does not error)
104
+ * if a paid tool is called without a memo.
105
+ */
106
+ memo?: string;
107
+ /**
108
+ * Structured decision context — goal linkage, alternatives considered,
109
+ * confidence score. Machine-readable counterpart to memo. Stored alongside
110
+ * the receipt for programmatic auditing by supervisor agents.
111
+ */
112
+ decisionContext?: DecisionContext;
113
+ /**
114
+ * Async phone-reveal opt-in. For person-intelligence tools, phone numbers
115
+ * sometimes arrive via an asynchronous webhook minutes AFTER the initial
116
+ * enrichment completes. By default the SDK returns as soon as the worker
117
+ * writes status=completed (phones=null, phones_pending=true). Set
118
+ * `waitForPhones: true` to keep polling at a slower cadence (every 5s)
119
+ * until phones land or `phoneTimeoutSec` expires (default 360s = 6 min).
120
+ * Only meaningful for tools whose upstream enrichment supports async
121
+ * phone reveals (research/person, enrich/profile, …). For other tools
122
+ * the flag is a no-op.
123
+ */
124
+ waitForPhones?: boolean;
125
+ phoneTimeoutSec?: number;
126
+ }
127
+ export interface EmailToolOptions extends ToolOptions {
128
+ to: string | string[];
129
+ subject: string;
130
+ body: string;
131
+ from_domain?: string;
132
+ /** Sender mailbox / local-part. Defaults to `agent` (i.e. agent@from_domain). */
133
+ from_mailbox?: string;
134
+ /** Display name shown to the recipient, e.g. "Jane Doe" → "Jane Doe <jane@domain>". */
135
+ from_name?: string;
136
+ attachments?: Array<{
137
+ filename?: string;
138
+ content?: string;
139
+ url?: string;
140
+ content_type?: string;
141
+ }>;
142
+ }
143
+ export interface ResearchToolOptions extends ToolOptions {
144
+ topic: string;
145
+ depth?: 'deep' | 'quick';
146
+ }
147
+ export interface PeopleSearchOptions extends ToolOptions {
148
+ job_titles?: string[];
149
+ keywords?: string[];
150
+ companies?: string[];
151
+ company_domains?: string[];
152
+ location?: string[];
153
+ skills?: string[];
154
+ seniority?: string[];
155
+ industry?: string[];
156
+ company_size?: string;
157
+ limit?: number;
158
+ }
159
+ export interface EnrichProfileOptions extends ToolOptions {
160
+ linkedin_url?: string;
161
+ email?: string;
162
+ name?: string;
163
+ company_domain?: string;
164
+ }
165
+ export interface FindEmailOptions extends ToolOptions {
166
+ full_name?: string;
167
+ first_name?: string;
168
+ last_name?: string;
169
+ company_domain: string;
170
+ }
171
+ export interface VerifyEmailOptions extends ToolOptions {
172
+ email: string;
173
+ }
174
+ export interface DeepResearchPersonOptions extends ToolOptions {
175
+ email?: string;
176
+ social_media_url?: string;
177
+ name?: string;
178
+ company?: string;
179
+ }
180
+ export interface SocialProfilesOptions extends ToolOptions {
181
+ email?: string;
182
+ social_media_url?: string;
183
+ }
184
+ export interface ArticleSearchOptions extends ToolOptions {
185
+ name: string;
186
+ company: string;
187
+ sort?: 'recent' | 'popular';
188
+ limit?: number;
189
+ }
190
+ export interface PersonNewsfeedOptions extends ToolOptions {
191
+ social_media_url: string;
192
+ }
193
+ export interface PersonInterestsOptions extends ToolOptions {
194
+ email?: string;
195
+ phone?: string;
196
+ social_media_url?: string;
197
+ }
198
+ export interface PersonInteractionsOptions extends ToolOptions {
199
+ social_media_url: string;
200
+ type?: 'replies' | 'followers' | 'following' | 'followers,following';
201
+ max_results?: number;
202
+ }
203
+ export interface InboxListOptions {
204
+ since?: string;
205
+ limit?: number;
206
+ include_body?: boolean;
207
+ }
208
+ export interface ShippingAddress {
209
+ first_name: string;
210
+ last_name: string;
211
+ street: string;
212
+ street2?: string;
213
+ city: string;
214
+ state: string;
215
+ zip_code: string;
216
+ country?: string;
217
+ email?: string;
218
+ phone: string;
219
+ }
220
+ export interface CommerceBuyOptions extends ToolOptions {
221
+ product_url: string;
222
+ shipping_address: ShippingAddress;
223
+ quantity?: number;
224
+ variant_id?: string;
225
+ }
226
+ export interface CommerceSearchOptions extends ToolOptions {
227
+ query: string;
228
+ limit?: number;
229
+ }
230
+ export interface WebSearchOptions extends ToolOptions {
231
+ query: string;
232
+ max_results?: number;
233
+ }
234
+ export interface WebSearchResult {
235
+ query: string;
236
+ results: Array<{
237
+ url: string;
238
+ title: string;
239
+ description: string;
240
+ }>;
241
+ result_count: number;
242
+ memo?: string;
243
+ cost?: number;
244
+ }
245
+ export interface WebReadOptions extends ToolOptions {
246
+ /** URL of the web page to read */
247
+ url: string;
248
+ }
249
+ export interface WebReadResult {
250
+ request_id?: string;
251
+ url: string;
252
+ markdown: string;
253
+ screenshot_url?: string;
254
+ metadata?: {
255
+ title: string;
256
+ description: string;
257
+ statusCode?: number;
258
+ };
259
+ truncated?: boolean;
260
+ memo?: string;
261
+ cost?: number;
262
+ }
263
+ export interface VoiceCallOptions extends ToolOptions {
264
+ /** The objective of the call - what should the OneShot Agent accomplish */
265
+ objective: string;
266
+ /** Target phone number(s) in E.164 format. Array triggers conference mode analysis. */
267
+ target_number: string | string[];
268
+ /** Optional persona for the OneShot Agent caller */
269
+ caller_persona?: string;
270
+ /** Additional context about the call */
271
+ context?: string;
272
+ /** Maximum call duration in minutes (1-30) */
273
+ max_duration_minutes?: number;
274
+ }
275
+ export interface SmsOptions extends ToolOptions {
276
+ /** The SMS message body (max 1600 characters) */
277
+ message: string;
278
+ /** Target phone number(s) in E.164 format (max 10 recipients) */
279
+ to_number: string | string[];
280
+ }
281
+ export interface SmsInboxOptions {
282
+ /** Filter messages received after this ISO timestamp */
283
+ since?: string;
284
+ /** Maximum number of messages to return (default: 50, max: 100) */
285
+ limit?: number;
286
+ /** Filter by sender phone number */
287
+ from?: string;
288
+ }
289
+ export interface Experience {
290
+ company?: {
291
+ name?: string;
292
+ website?: string;
293
+ };
294
+ title?: {
295
+ name?: string;
296
+ };
297
+ start_date?: string;
298
+ end_date?: string;
299
+ is_primary?: boolean;
300
+ }
301
+ export interface Education {
302
+ school?: {
303
+ name?: string;
304
+ };
305
+ degrees?: string[];
306
+ majors?: string[];
307
+ start_date?: string;
308
+ end_date?: string;
309
+ }
310
+ export interface PersonResult {
311
+ full_name?: string;
312
+ first_name?: string;
313
+ last_name?: string;
314
+ title?: string;
315
+ company?: string;
316
+ company_domain?: string;
317
+ linkedin_url?: string;
318
+ location?: string;
319
+ email?: string;
320
+ phone?: string;
321
+ summary?: string;
322
+ skills?: string[];
323
+ experience?: Experience[];
324
+ education?: Education[];
325
+ fullphone?: Array<{
326
+ fullphone: string;
327
+ }>;
328
+ altemails?: string[];
329
+ best_work_email?: string | null;
330
+ best_personal_email?: string | null;
331
+ }
332
+ export interface PeopleSearchResult {
333
+ status: string;
334
+ results: PersonResult[];
335
+ total_found: number;
336
+ request_id?: string;
337
+ completed_at?: string;
338
+ filters?: Record<string, unknown>;
339
+ memo?: string;
340
+ cost?: number;
341
+ }
342
+ export interface ResearchResult {
343
+ request_id?: string;
344
+ report_content: string;
345
+ sources: Array<{
346
+ url: string;
347
+ title?: string;
348
+ }>;
349
+ sources_count: number;
350
+ topic: string;
351
+ depth: string;
352
+ workspace: string;
353
+ report_path: string;
354
+ completed_at: string;
355
+ report_gcs_uri: string;
356
+ memo?: string;
357
+ cost?: number;
358
+ }
359
+ export interface EmailResult {
360
+ request_id?: string;
361
+ status: string;
362
+ timeline?: Array<Record<string, unknown>>;
363
+ error?: string;
364
+ email?: {
365
+ id: string;
366
+ provider_message_id: string;
367
+ status: string;
368
+ };
369
+ domain?: {
370
+ domain: string;
371
+ status: string;
372
+ was_provisioned: boolean;
373
+ };
374
+ memo?: string;
375
+ cost?: number;
376
+ }
377
+ export interface DomainPoolEntry {
378
+ domain: string;
379
+ pool_status: 'active' | 'warming' | 'paused' | 'removed';
380
+ provisioning_status: string;
381
+ warmup_provider: string | null;
382
+ warmup_score: number | null;
383
+ warmup_started_at: string | null;
384
+ daily_send_limit: number;
385
+ daily_sent_count: number;
386
+ daily_sent_date: string | null;
387
+ last_used_at: string | null;
388
+ }
389
+ export interface DomainPoolListResult {
390
+ agent_id: string;
391
+ domains: DomainPoolEntry[];
392
+ }
393
+ export interface DomainPoolStatusResult {
394
+ domain: string;
395
+ pool_status: 'active' | 'paused';
396
+ }
397
+ export interface EnrichProfileResult {
398
+ status: string;
399
+ profile: PersonResult;
400
+ request_id?: string;
401
+ completed_at?: string;
402
+ memo?: string;
403
+ cost?: number;
404
+ }
405
+ export interface FindEmailResult {
406
+ status: string;
407
+ email: string | null;
408
+ found: boolean;
409
+ full_name?: string;
410
+ company_domain?: string;
411
+ request_id?: string;
412
+ completed_at?: string;
413
+ memo?: string;
414
+ cost?: number;
415
+ }
416
+ export interface AsyncJobResult {
417
+ request_id: string;
418
+ status: string;
419
+ }
420
+ /** Enrichment data nested inside deep research and enrichment responses. */
421
+ export interface PersonEnrichment {
422
+ displayname?: string;
423
+ firstname?: string;
424
+ lastname?: string;
425
+ bio?: string;
426
+ location?: string;
427
+ altemails?: string[];
428
+ best_work_email?: string;
429
+ best_personal_email?: string;
430
+ fullphone?: Array<{
431
+ fullphone: string;
432
+ type: string;
433
+ }>;
434
+ organizations?: Array<{
435
+ name?: string;
436
+ title?: string;
437
+ startDate?: string;
438
+ endDate?: string;
439
+ endDate_formatted?: {
440
+ is_current: boolean;
441
+ };
442
+ }>;
443
+ schools_info?: Array<{
444
+ name?: string;
445
+ degree?: string;
446
+ title?: string;
447
+ }>;
448
+ social_profiles?: Record<string, {
449
+ url?: string;
450
+ username?: string;
451
+ followers?: number;
452
+ }>;
453
+ newsfeed?: Array<{
454
+ source?: string;
455
+ type?: string;
456
+ content?: string;
457
+ date_posted?: string;
458
+ engagement?: {
459
+ likes?: number;
460
+ replies?: number;
461
+ shares?: number;
462
+ };
463
+ }>;
464
+ }
465
+ export interface DeepResearchPersonResult {
466
+ status: string;
467
+ result: {
468
+ enrichment: PersonEnrichment;
469
+ following?: Record<string, unknown>[];
470
+ articles?: Array<{
471
+ title?: string;
472
+ url?: string;
473
+ source?: string;
474
+ published_date?: string;
475
+ snippet?: string;
476
+ }>;
477
+ dossier?: Record<string, unknown>;
478
+ };
479
+ request_id: string;
480
+ completed_at: string;
481
+ memo?: string;
482
+ cost?: number;
483
+ }
484
+ export interface SocialProfilesResult {
485
+ status: string;
486
+ result: Record<string, {
487
+ url?: string;
488
+ username?: string;
489
+ followers?: number;
490
+ bio?: string;
491
+ }>;
492
+ request_id: string;
493
+ completed_at: string;
494
+ memo?: string;
495
+ cost?: number;
496
+ }
497
+ export interface ArticleSearchResult {
498
+ status: string;
499
+ result: Array<{
500
+ title?: string;
501
+ url?: string;
502
+ source?: string;
503
+ published_date?: string;
504
+ snippet?: string;
505
+ }>;
506
+ request_id: string;
507
+ completed_at: string;
508
+ memo?: string;
509
+ cost?: number;
510
+ }
511
+ export interface PersonNewsfeedResult {
512
+ status: string;
513
+ result: Array<{
514
+ platform?: string;
515
+ content?: string;
516
+ url?: string;
517
+ posted_at?: string;
518
+ likes?: number;
519
+ replies?: number;
520
+ shares?: number;
521
+ }>;
522
+ request_id: string;
523
+ completed_at: string;
524
+ memo?: string;
525
+ cost?: number;
526
+ }
527
+ export interface PersonInterestsResult {
528
+ status: string;
529
+ result: Record<string, unknown>;
530
+ request_id: string;
531
+ completed_at: string;
532
+ memo?: string;
533
+ cost?: number;
534
+ }
535
+ export interface PersonInteractionsResult {
536
+ status: string;
537
+ result: {
538
+ followers?: Array<Record<string, unknown>>;
539
+ following?: Array<Record<string, unknown>>;
540
+ replies?: Array<Record<string, unknown>>;
541
+ };
542
+ request_id: string;
543
+ completed_at: string;
544
+ memo?: string;
545
+ cost?: number;
546
+ }
547
+ export interface VerifyEmailResult {
548
+ status: string;
549
+ email: string;
550
+ valid: boolean;
551
+ deliverable: boolean;
552
+ catch_all: boolean;
553
+ disposable: boolean;
554
+ request_id?: string;
555
+ completed_at?: string;
556
+ memo?: string;
557
+ cost?: number;
558
+ }
559
+ export interface InboxEmail {
560
+ id: string;
561
+ from: string;
562
+ subject: string;
563
+ received_at: string;
564
+ thread_id?: string;
565
+ body?: string;
566
+ body_html?: string;
567
+ attachments?: Array<{
568
+ filename: string;
569
+ content_type: string;
570
+ size: number;
571
+ content?: string;
572
+ }>;
573
+ }
574
+ export interface InboxListResult {
575
+ emails: InboxEmail[];
576
+ count: number;
577
+ has_more: boolean;
578
+ agent_id: string;
579
+ }
580
+ export interface CommerceQuote {
581
+ quote_id: string;
582
+ product_title: string;
583
+ subtotal: string;
584
+ shipping: string;
585
+ tax: string;
586
+ fee: string;
587
+ total: string;
588
+ }
589
+ export interface CommerceBuyResult {
590
+ request_id?: string;
591
+ status: string;
592
+ order_id: string;
593
+ order_status: string;
594
+ tracking_url?: string;
595
+ memo?: string;
596
+ cost?: number;
597
+ }
598
+ export interface CommerceSearchProduct {
599
+ product_url: string;
600
+ title: string;
601
+ price: number;
602
+ currency: string;
603
+ image_url?: string;
604
+ vendor?: string;
605
+ rating?: number;
606
+ review_count?: number;
607
+ in_stock?: boolean;
608
+ description?: string;
609
+ }
610
+ export interface CommerceSearchResult {
611
+ request_id?: string;
612
+ status: string;
613
+ query: string;
614
+ products: CommerceSearchProduct[];
615
+ count: number;
616
+ memo?: string;
617
+ cost?: number;
618
+ }
619
+ export interface VoiceQuote {
620
+ quote_id: string;
621
+ target_numbers: string[];
622
+ conference_mode: boolean;
623
+ /** @deprecated The API stopped emitting a paraphrased objective summary
624
+ * when the voice prompt pipeline switched to verbatim assembly. Field
625
+ * retained for type-back-compat; will be removed in the next major. */
626
+ objective_summary?: string;
627
+ /** @deprecated See objective_summary — the LLM rewrite that produced these
628
+ * bullets is gone. The full objective is in the call's system prompt. */
629
+ talking_points?: string[];
630
+ success_criteria: string[];
631
+ estimated_duration_minutes: number;
632
+ complexity_score: number;
633
+ pipeline_fee: string;
634
+ phone_registration_fee: string;
635
+ estimated_call_cost: string;
636
+ total: string;
637
+ needs_phone_registration: boolean;
638
+ expires_at: string;
639
+ }
640
+ export interface VoiceCallResult {
641
+ request_id?: string;
642
+ status: string;
643
+ ended_reason?: string;
644
+ duration_seconds?: number;
645
+ transcript?: string;
646
+ summary?: string;
647
+ success_evaluation?: string;
648
+ structured_data?: Record<string, unknown>;
649
+ memo?: string;
650
+ cost?: number;
651
+ credit_issued?: number;
652
+ }
653
+ export interface SmsQuote {
654
+ quote_id: string;
655
+ recipient_count: number;
656
+ message_length: number;
657
+ segment_count: number;
658
+ per_message_rate: string;
659
+ messaging_fee: string;
660
+ phone_registration_fee: string;
661
+ total: string;
662
+ needs_phone_registration: boolean;
663
+ expires_at: string;
664
+ }
665
+ export interface SmsSendResult {
666
+ request_id?: string;
667
+ status: string;
668
+ sent: number;
669
+ failed: number;
670
+ total: number;
671
+ details: Array<{
672
+ to: string;
673
+ from?: string;
674
+ status: string;
675
+ message_sid?: string;
676
+ error?: string;
677
+ }>;
678
+ memo?: string;
679
+ cost?: number;
680
+ }
681
+ export interface SmsInboxMessage {
682
+ id: string;
683
+ from: string;
684
+ to: string;
685
+ body: string;
686
+ num_media: number;
687
+ media_urls?: string[];
688
+ thread_id?: string;
689
+ related_outbound_id?: string;
690
+ received_at: string;
691
+ created_at: string;
692
+ }
693
+ export interface SmsInboxResult {
694
+ messages: SmsInboxMessage[];
695
+ count: number;
696
+ }
697
+ export interface Notification {
698
+ id: string;
699
+ agentId: string;
700
+ type: 'job_completed' | 'job_failed' | 'voice_completed' | 'sms_completed' | 'credit_issued' | 'domain_expiring' | 'phone_expiring';
701
+ title: string;
702
+ body?: string;
703
+ metadata?: Record<string, unknown>;
704
+ read: boolean;
705
+ createdAt: string;
706
+ }
707
+ export interface NotificationsListOptions {
708
+ /** Only return unread notifications */
709
+ unread?: boolean;
710
+ /** Maximum number of notifications to return (default: 50, max: 100) */
711
+ limit?: number;
712
+ }
713
+ export interface NotificationsResult {
714
+ notifications: Notification[];
715
+ count: number;
716
+ }
717
+ export interface BuildProduct {
718
+ /** Product or business name */
719
+ name: string;
720
+ /** Description of the product/service (min 10 chars) */
721
+ description: string;
722
+ /** Industry category */
723
+ industry?: string;
724
+ /** Pricing information to display */
725
+ pricing?: string;
726
+ }
727
+ export interface BuildLeadCapture {
728
+ /** Enable lead capture form */
729
+ enabled: boolean;
730
+ /** Email to receive leads (defaults to agent inbox) */
731
+ inbox_email?: string;
732
+ }
733
+ export interface BuildBrand {
734
+ /** Primary brand color (hex format, e.g., #FF5733) */
735
+ primary_color?: string;
736
+ /** Font family preference */
737
+ font?: string;
738
+ /** Brand tone */
739
+ tone?: 'professional' | 'playful' | 'bold' | 'minimal';
740
+ }
741
+ export interface BuildImages {
742
+ /** Hero image URL */
743
+ hero?: string;
744
+ /** Logo image URL */
745
+ logo?: string;
746
+ }
747
+ export interface BuildOptions extends ToolOptions {
748
+ /** Website type */
749
+ type?: 'saas' | 'portfolio' | 'agency' | 'personal' | 'product' | 'funnel' | 'restaurant' | 'event';
750
+ /** Product/business information */
751
+ product: BuildProduct;
752
+ /** URL to analyze for content/inspiration */
753
+ source_url?: string;
754
+ /** Specific sections to include */
755
+ sections?: string[];
756
+ /** Lead capture configuration */
757
+ lead_capture?: BuildLeadCapture;
758
+ /** Brand customization */
759
+ brand?: BuildBrand;
760
+ /** Image URLs to use */
761
+ images?: BuildImages;
762
+ /** Custom domain (e.g., mysite.com) */
763
+ domain?: string;
764
+ /** Existing build ID to update */
765
+ build_id?: string;
766
+ }
767
+ export interface BuildQuote {
768
+ quote_id: string;
769
+ type: string;
770
+ product_name: string;
771
+ analysis: {
772
+ inferred_type: string;
773
+ estimated_sections: number;
774
+ estimated_ai_images: number;
775
+ needs_lead_capture: boolean;
776
+ needs_video: boolean;
777
+ video_type?: string;
778
+ complexity_score: number;
779
+ reasoning: string;
780
+ };
781
+ pricing: {
782
+ base_price: string;
783
+ extra_sections_fee: string;
784
+ ai_images_fee: string;
785
+ video_embed_fee: string;
786
+ lead_capture_fee: string;
787
+ source_analysis_fee: string;
788
+ custom_domain_fee: string;
789
+ total: string;
790
+ };
791
+ expires_at: string;
792
+ }
793
+ export interface BuildResult {
794
+ request_id?: string;
795
+ status: string;
796
+ success: boolean;
797
+ production_url?: string;
798
+ preview_url?: string;
799
+ design_score?: number;
800
+ iterations?: number;
801
+ v0_chat_id?: string;
802
+ vercel_deployment_id?: string;
803
+ vercel_project_id?: string;
804
+ github_repo?: string;
805
+ error?: string;
806
+ memo?: string;
807
+ cost?: number;
808
+ }
809
+ export interface BrowserTaskOptions extends ToolOptions {
810
+ /** Natural language instruction for what to do in the browser (min 10 chars) */
811
+ task: string;
812
+ /** JSON schema for structured output extraction */
813
+ output_schema?: Record<string, unknown>;
814
+ /** Initial URL to navigate to */
815
+ start_url?: string;
816
+ /** Restrict browsing to specific domains */
817
+ allowed_domains?: string[];
818
+ /** Reuse an existing browser session */
819
+ session_id?: string;
820
+ /** Persistent browser profile ID for reusing cookies/localStorage across sessions */
821
+ profile_id?: string;
822
+ /** Domain-scoped credentials for auto-login, e.g. { "github.com": "user:token" } */
823
+ secrets?: Record<string, string>;
824
+ /** Maximum browser steps (default: 50, max: 100) */
825
+ max_steps?: number;
826
+ }
827
+ export interface BrowserProfile {
828
+ id: string;
829
+ name: string;
830
+ }
831
+ export interface BrowserQuote {
832
+ quote_id: string;
833
+ task_preview: string;
834
+ estimated_steps: number;
835
+ max_steps: number;
836
+ estimated_cost: string;
837
+ has_output_schema: boolean;
838
+ start_url: string | null;
839
+ expires_at: string;
840
+ }
841
+ export interface BrowserResult {
842
+ request_id?: string;
843
+ output?: string | Record<string, unknown>;
844
+ steps?: Array<{
845
+ number: number;
846
+ goal: string;
847
+ url: string;
848
+ }>;
849
+ memo?: string;
850
+ cost?: number;
851
+ output_files?: string[];
852
+ browser_task_id?: string;
853
+ session_id?: string;
854
+ }
855
+ export interface UpdateBuildOptions extends ToolOptions {
856
+ /** Existing build ID to update (required) */
857
+ build_id: string;
858
+ /** Updated product/business information */
859
+ product: BuildProduct;
860
+ /** Website type (optional, defaults to existing) */
861
+ type?: 'saas' | 'portfolio' | 'agency' | 'personal' | 'product' | 'funnel' | 'restaurant' | 'event';
862
+ /** URL to analyze for content/inspiration */
863
+ source_url?: string;
864
+ /** Specific sections to include */
865
+ sections?: string[];
866
+ /** Lead capture configuration */
867
+ lead_capture?: BuildLeadCapture;
868
+ /** Brand customization */
869
+ brand?: BuildBrand;
870
+ /** Image URLs to use */
871
+ images?: BuildImages;
872
+ /** Custom domain */
873
+ domain?: string;
874
+ }
875
+ export interface SpendCategory {
876
+ category: string;
877
+ total: string;
878
+ count: number;
879
+ pct: number;
880
+ }
881
+ export interface SpendBreakdown {
882
+ categories: SpendCategory[];
883
+ total: string;
884
+ period_days: number;
885
+ }
886
+ export interface RoCSResult {
887
+ rocs: number;
888
+ total_spend: string;
889
+ total_value: string;
890
+ period_days: number;
891
+ }
892
+ export interface Receipt {
893
+ id: string;
894
+ receipt_id: string;
895
+ category: string;
896
+ subcategory: string;
897
+ amount_usdc: string;
898
+ service_fee: string;
899
+ status: string;
900
+ settlement_tx: string | null;
901
+ value_tag: {
902
+ type: string;
903
+ amount?: number;
904
+ label?: string;
905
+ } | null;
906
+ job_id: string | null;
907
+ metadata: Record<string, unknown> | null;
908
+ created_at: string;
909
+ settled_at: string | null;
910
+ }
911
+ export interface ReceiptsListResult {
912
+ receipts: Receipt[];
913
+ count: number;
914
+ has_more: boolean;
915
+ }
916
+ export interface UnifiedBalance {
917
+ on_chain_balance: string;
918
+ credits_balance: string;
919
+ currency: string;
920
+ address: string;
921
+ chain_id: number;
922
+ }
923
+ export interface ComputeSchedule {
924
+ /** Cron expression (UTC). Minimum interval: 15 minutes. */
925
+ cron: string;
926
+ /** USDC budget per run */
927
+ budget_per_run: number;
928
+ /** Maximum number of runs (optional — runs indefinitely if omitted) */
929
+ max_runs?: number;
930
+ }
931
+ export interface ComputeOptions extends ToolOptions {
932
+ /** Natural language objective for the orchestrator */
933
+ objective: string;
934
+ /** Additional parameters / constraints */
935
+ params?: Record<string, unknown>;
936
+ /** Suggested budget in USDC (server will estimate if omitted) */
937
+ budget_usdc?: number;
938
+ /** ISO deadline for completion */
939
+ deadline?: string;
940
+ /** Route to a specific Soul agent */
941
+ soul_slug?: string;
942
+ /** Route to a specific Soul service */
943
+ soul_service_slug?: string;
944
+ /** Make this a recurring goal */
945
+ schedule?: ComputeSchedule;
946
+ }
947
+ export interface ComputeQuote {
948
+ quote_id: string;
949
+ objective_summary: string;
950
+ estimated_phases: number;
951
+ estimated_tasks: number;
952
+ estimated_duration_days: number;
953
+ budget_breakdown: Record<string, string>;
954
+ total_budget: string;
955
+ expires_at: string;
956
+ schedule_cron?: string;
957
+ budget_per_run?: number;
958
+ max_runs?: number;
959
+ projected_runs?: number;
960
+ }
961
+ export interface ComputeGoalResult {
962
+ goal_id: string;
963
+ request_id: string;
964
+ receipt_id?: string;
965
+ status: string;
966
+ message: string;
967
+ memo?: string;
968
+ cost?: number;
969
+ goal: {
970
+ objective: string;
971
+ budget_usdc: string;
972
+ deadline?: string;
973
+ schedule_cron?: string;
974
+ budget_per_run?: number;
975
+ max_runs?: number;
976
+ next_run_at?: string;
977
+ };
978
+ }
979
+ export interface ComputeGoalStatus {
980
+ id: string;
981
+ status: string;
982
+ name: string;
983
+ objective: string;
984
+ current_phase: number | null;
985
+ plan: unknown;
986
+ budget: {
987
+ total: string;
988
+ spent: string;
989
+ reserved: string;
990
+ remaining: string;
991
+ } | null;
992
+ soul_agent_id: string | null;
993
+ deadline: string | null;
994
+ started_at: string | null;
995
+ completed_at: string | null;
996
+ last_wake_at: string | null;
997
+ next_wake_at: string | null;
998
+ created_at: string;
999
+ schedule?: {
1000
+ cron: string;
1001
+ budget_per_run: string;
1002
+ max_runs: number | null;
1003
+ run_count: number;
1004
+ last_run_at: string | null;
1005
+ next_run_at: string | null;
1006
+ };
1007
+ }
1008
+ export interface ComputeTask {
1009
+ id: string;
1010
+ task_type: string;
1011
+ tool: string | null;
1012
+ description: string;
1013
+ status: string;
1014
+ phase: number | null;
1015
+ sequence: number | null;
1016
+ progress_pct: number | null;
1017
+ progress_message: string | null;
1018
+ result: unknown;
1019
+ quoted_usdc: string | null;
1020
+ actual_usdc: string | null;
1021
+ run_number: number | null;
1022
+ started_at: string | null;
1023
+ completed_at: string | null;
1024
+ created_at: string;
1025
+ }
1026
+ export interface ComputeBudgetStatus {
1027
+ budgetId: string;
1028
+ goalId: string;
1029
+ totalBudgetUsdc: string;
1030
+ spentUsdc: string;
1031
+ reservedUsdc: string;
1032
+ remainingUsdc: string;
1033
+ spend_entries: Array<{
1034
+ category: string;
1035
+ amount_usdc: string;
1036
+ description: string;
1037
+ created_at: string;
1038
+ }>;
1039
+ }
1040
+ //# sourceMappingURL=types.d.ts.map