@oneshot-agent/sdk 0.60.0 → 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/dist/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { UntrustedContent } from './untrusted-content';
1
2
  import type { WalletProvider } from './wallet-provider';
2
3
  export interface TokenInfo {
3
4
  address: string;
@@ -53,17 +54,17 @@ export type LoggerFn = (message: string) => void;
53
54
  */
54
55
  export type StatusUpdateFn = (status: string, requestId: string) => void;
55
56
  export interface OneShotConfig {
56
- /** Option A: Raw private key (existing behavior) */
57
+ /** Raw private key for wallet authentication. */
57
58
  privateKey?: string;
58
- /** Option B: Use Coinbase CDP Server Wallet (reads CDP_* env vars). Pass true or { address } to reuse existing. */
59
+ /** Use Coinbase CDP Server Wallet (reads CDP_* env vars). Pass true or { address } to reuse existing. */
59
60
  cdp?: boolean | {
60
61
  address?: string;
61
62
  };
62
- /** Option C: Bring your own WalletProvider implementation */
63
+ /** Bring your own WalletProvider implementation */
63
64
  walletProvider?: WalletProvider;
64
65
  /**
65
- * Option D: an agent access token (`oneshot_<64 hex>`), for code that runs
66
- * where the wallet key cannot be — hosted MCP clients, cloud runners. The
66
+ * An agent access token (`oneshot_<64 hex>`), for code that runs
67
+ * where the wallet key cannot be - hosted MCP clients, cloud runners. The
67
68
  * session identifies the agent with the token, pays every call from the
68
69
  * agent's prepaid credit balance, and never signs x402: a shortfall throws
69
70
  * `InsufficientCreditsError`. Budgets are read-only in this mode (set them
@@ -92,7 +93,7 @@ export interface OneShotConfig {
92
93
  /**
93
94
  * Payment currency: "USDC" (default, no swap) or "ETH". In ETH mode the SDK
94
95
  * checks the wallet's USDC before each payment and only swaps ETH→USDC (Uniswap
95
- * V3, Base mainnet) when it does not cover the charge — buying a buffer so one
96
+ * V3, Base mainnet) when it does not cover the charge - buying a buffer so one
96
97
  * swap covers many calls. See `swapBufferMultiplier`.
97
98
  */
98
99
  currency?: 'USDC' | 'ETH';
@@ -110,7 +111,7 @@ export interface OneShotConfig {
110
111
  swapBufferMultiplier?: number;
111
112
  /**
112
113
  * Spend budget for this agent. Synced to the server once, before the first
113
- * paid call, and enforced there against the receipts ledger — so the daily
114
+ * paid call, and enforced there against the receipts ledger - so the daily
114
115
  * figure is a real per-agent total, shared across every process and restart
115
116
  * running this wallet, not a per-instance counter.
116
117
  *
@@ -169,7 +170,7 @@ export interface AgentBudgetStatus {
169
170
  }
170
171
  /**
171
172
  * Structured decision context for a tool call. Machine-readable metadata
172
- * that explains WHY this tool was called — consumed by auditor agents
173
+ * that explains WHY this tool was called - consumed by auditor agents
173
174
  * and programmatic oversight. Open schema: known fields are typed,
174
175
  * extra keys are allowed.
175
176
  */
@@ -222,7 +223,7 @@ export interface ToolOptions {
222
223
  signal?: AbortSignal;
223
224
  onStatusUpdate?: StatusUpdateFn;
224
225
  wait?: boolean;
225
- /** Optional value tag for RoCS tracking — stored in the receipt at creation time */
226
+ /** Optional value tag for RoCS tracking - stored in the receipt at creation time */
226
227
  valueTag?: {
227
228
  type: string;
228
229
  amount?: number;
@@ -235,7 +236,7 @@ export interface ToolOptions {
235
236
  */
236
237
  memo?: string;
237
238
  /**
238
- * Structured decision context — goal linkage, alternatives considered,
239
+ * Structured decision context - goal linkage, alternatives considered,
239
240
  * confidence score. Machine-readable counterpart to memo. Stored alongside
240
241
  * the receipt for programmatic auditing by supervisor agents.
241
242
  */
@@ -263,9 +264,9 @@ export interface ToolOptions {
263
264
  * is optional with a 24h cached-response replay window; personProfile /
264
265
  * personEmail / personEmailStatus are honored when durable enrichment is enabled
265
266
  * on the server AND the session authenticates with a wallet, not an
266
- * `accessToken` — an access-token session skips the durable-replay check
267
+ * `accessToken` - an access-token session skips the durable-replay check
267
268
  * on these three routes entirely and always dispatches a fresh job, even
268
- * with durable enrichment on (no expiry otherwise — backed by a durable
269
+ * with durable enrichment on (no expiry otherwise - backed by a durable
269
270
  * row, not a cache); physical-mail/send is mandatory and likewise never
270
271
  * expires. Save the key before submission.
271
272
  */
@@ -287,37 +288,37 @@ export interface EmailToolOptions extends ToolOptions {
287
288
  from_domain?: string;
288
289
  /**
289
290
  * Sender mailbox / local-part. Defaults to `agent` (i.e. agent@from_domain).
290
- * Requires `from_domain` to be set — pinning `from_mailbox` alone throws a
291
+ * Requires `from_domain` to be set - pinning `from_mailbox` alone throws a
291
292
  * `ValidationError` (there is no default domain to attach it to). You may
292
- * use any local-part — a new address is auto-provisioned on first use
293
+ * use any local-part - a new address is auto-provisioned on first use
293
294
  * (and starts unwarmed, building reputation over time). See the email
294
295
  * "list domains" tool for each domain's `default_from` and existing `addresses`.
295
296
  */
296
297
  from_mailbox?: string;
297
298
  /**
298
299
  * How this domain sends (provider-neutral):
299
- * - `'relay'` (default) — header/relay send; any from-address works with nothing
300
+ * - `'relay'` (default) - header/relay send; any from-address works with nothing
300
301
  * provisioned per address (no mailbox fee).
301
- * - `'mailbox'` — a real per-address mailbox; each new from-address provisions +
302
+ * - `'mailbox'` - a real per-address mailbox; each new from-address provisions +
302
303
  * warms a dedicated mailbox (one-time `mailbox_provisioning_fee` on the quote).
303
- * Only honored when the domain is first set up — an already-provisioned domain
304
+ * Only honored when the domain is first set up - an already-provisioned domain
304
305
  * keeps the mode it was created with. Use `'mailbox'` on a new `from_domain`.
305
306
  *
306
307
  * Which means omitting this is NOT a way to avoid the fee: a domain created in
307
308
  * mailbox mode bills `mailbox_provisioning_fee` for every address that isn't
308
- * already `active` on it — the default `agent@` included — whatever you pass
309
+ * already `active` on it - the default `agent@` included - whatever you pass
309
310
  * here, and `from_mailbox` doesn't change that either. Read `mailbox_mode` per
310
311
  * domain from `listDomains()` to see which of yours charge.
311
312
  */
312
313
  mailbox_mode?: 'relay' | 'mailbox';
313
314
  /**
314
315
  * Only meaningful when `from_domain` is a domain the agent doesn't own yet.
315
- * A call with such a `from_domain` always stops after quoting — no charge,
316
- * no send — and returns `status: 'confirmation_required'` with the exact
316
+ * A call with such a `from_domain` always stops after quoting - no charge,
317
+ * no send - and returns `status: 'confirmation_required'` with the exact
317
318
  * total and its `quote_id`. Pass that `quote_id` here on the repeat call to
318
319
  * register the domain, pay exactly that quote's total, and send in one call:
319
320
  * the SDK sends against the stored quote instead of quoting again, so the
320
- * amount charged is the amount shown (#1070). A bare `true` names no amount
321
+ * amount charged is the amount shown. A bare `true` names no amount
321
322
  * and only re-quotes. An expired or used quote is refused by the server.
322
323
  */
323
324
  confirmNewDomain?: string;
@@ -330,11 +331,28 @@ export interface EmailToolOptions extends ToolOptions {
330
331
  content_type?: string;
331
332
  }>;
332
333
  }
334
+ /**
335
+ * The shared lookup cache's bypass. Every person, company and business lookup is served from
336
+ * OneShot's store when the same subject (or the same search) was looked up within its freshness window
337
+ * (profiles, dossiers, social accounts, email finds, company profiles and resolves 30 days; email status
338
+ * and searches 7 days; posts, articles, followers and interests 3 days); a stored record costs the same.
339
+ */
340
+ export interface FreshLookupOption {
341
+ /** Look the record up again instead of using OneShot's stored copy, and refresh that copy. Off by default. */
342
+ fresh?: boolean;
343
+ }
344
+ /** What a person, company or business result says about where it came from. */
345
+ export interface CachedRecordFields {
346
+ /** True when the record came from OneShot's store of earlier lookups. */
347
+ cached?: boolean;
348
+ /** When the record was obtained from its source, ISO 8601 UTC. */
349
+ fetched_at?: string;
350
+ }
333
351
  export interface ResearchToolOptions extends ToolOptions {
334
352
  topic: string;
335
353
  depth?: 'deep' | 'quick';
336
354
  }
337
- export interface PersonFindOptions extends ToolOptions {
355
+ export interface PersonFindOptions extends ToolOptions, FreshLookupOption {
338
356
  /** Off by default. Adds the per-person add-on on the pricing page × requested limit (default 100) for up to that many people; no phone hit guaranteed. */
339
357
  includePhone?: boolean;
340
358
  job_titles?: string[];
@@ -353,7 +371,7 @@ export interface PersonFindOptions extends ToolOptions {
353
371
  /** Max rows to return, 1-500 (server default 100). Large requests are
354
372
  * paginated server-side, so one response can hold up to `limit` rows.
355
373
  * The search runs under a time limit: if it is reached, the response holds
356
- * the rows found so far (possibly fewer than `limit`) — continue with
374
+ * the rows found so far (possibly fewer than `limit`) - continue with
357
375
  * `offset`. With `include_phone`, every row reports its `phone_lookup`
358
376
  * outcome (see `PersonResult.phone_lookup`); a row whose lookup did not
359
377
  * finish in time is `not_attempted` or `unavailable`, never silently empty. */
@@ -365,7 +383,7 @@ export interface PersonFindOptions extends ToolOptions {
365
383
  offset?: number;
366
384
  }
367
385
  /**
368
- * What a caller knows about one person (#1899). Every single-person tool takes
386
+ * What a caller knows about one person. Every single-person tool takes
369
387
  * these same optional fields; at least one of `name`, `email`, `phone` or
370
388
  * `profile_url` is required. The API resolves the rest (a LinkedIn URL from a
371
389
  * name and company or an email, the other handles, the employer).
@@ -384,7 +402,7 @@ export interface PersonIdentity {
384
402
  /** Same as `profile_url` (older name). */
385
403
  social_media_url?: string;
386
404
  }
387
- export interface PersonProfileOptions extends ToolOptions, PersonIdentity {
405
+ export interface PersonProfileOptions extends ToolOptions, PersonIdentity, FreshLookupOption {
388
406
  /** Off by default. Adds the per-person add-on on the pricing page for up to one person; no phone hit guaranteed. */
389
407
  includePhone?: boolean;
390
408
  /** Employer domain (older name; `company` takes a name or a domain). */
@@ -392,7 +410,7 @@ export interface PersonProfileOptions extends ToolOptions, PersonIdentity {
392
410
  /** Employer name (older name; `company` takes a name or a domain). */
393
411
  company_name?: string;
394
412
  }
395
- export interface CompanyFindOptions extends ToolOptions {
413
+ export interface CompanyFindOptions extends ToolOptions, FreshLookupOption {
396
414
  name?: string;
397
415
  domain?: string;
398
416
  industry?: string[];
@@ -404,13 +422,13 @@ export interface CompanyFindOptions extends ToolOptions {
404
422
  tags?: string[];
405
423
  limit?: number;
406
424
  }
407
- export interface CompanyProfileOptions extends ToolOptions {
425
+ export interface CompanyProfileOptions extends ToolOptions, FreshLookupOption {
408
426
  domain?: string;
409
427
  name?: string;
410
428
  linkedin_url?: string;
411
429
  ticker?: string;
412
430
  }
413
- export interface PersonEmailOptions extends ToolOptions, PersonIdentity {
431
+ export interface PersonEmailOptions extends ToolOptions, PersonIdentity, FreshLookupOption {
414
432
  /** Same as `name` (older name). */
415
433
  full_name?: string;
416
434
  first_name?: string;
@@ -420,26 +438,26 @@ export interface PersonEmailOptions extends ToolOptions, PersonIdentity {
420
438
  /** Employer name (older name; `company` takes a name or a domain). */
421
439
  company_name?: string;
422
440
  }
423
- export interface PersonEmailStatusOptions extends ToolOptions {
441
+ export interface PersonEmailStatusOptions extends ToolOptions, FreshLookupOption {
424
442
  email: string;
425
443
  }
426
- export interface PersonDossierOptions extends ToolOptions, PersonIdentity {
444
+ export interface PersonDossierOptions extends ToolOptions, PersonIdentity, FreshLookupOption {
427
445
  /** Off by default. Adds the per-person add-on on the pricing page for up to one person; no phone hit guaranteed. */
428
446
  includePhone?: boolean;
429
447
  }
430
- export interface PersonSocialAccountsOptions extends ToolOptions, PersonIdentity {
448
+ export interface PersonSocialAccountsOptions extends ToolOptions, PersonIdentity, FreshLookupOption {
431
449
  }
432
- export interface PersonArticlesOptions extends ToolOptions {
450
+ export interface PersonArticlesOptions extends ToolOptions, FreshLookupOption {
433
451
  name: string;
434
452
  company: string;
435
453
  sort?: 'recent' | 'popular';
436
454
  limit?: number;
437
455
  }
438
- export interface PersonPostsOptions extends ToolOptions, PersonIdentity {
456
+ export interface PersonPostsOptions extends ToolOptions, PersonIdentity, FreshLookupOption {
439
457
  }
440
- export interface PersonInterestsOptions extends ToolOptions, PersonIdentity {
458
+ export interface PersonInterestsOptions extends ToolOptions, PersonIdentity, FreshLookupOption {
441
459
  }
442
- export interface PersonFollowersOptions extends ToolOptions, PersonIdentity {
460
+ export interface PersonFollowersOptions extends ToolOptions, PersonIdentity, FreshLookupOption {
443
461
  type?: 'replies' | 'followers' | 'following' | 'followers,following';
444
462
  max_results?: number;
445
463
  }
@@ -489,7 +507,8 @@ export interface WebReadOptions extends ToolOptions {
489
507
  /** URL of the web page to read */
490
508
  url: string;
491
509
  }
492
- export interface WebReadResult {
510
+ export interface WebReadResult extends UntrustedContent {
511
+ hidden_removed: number;
493
512
  request_id?: string;
494
513
  /** Receipt id (`rcpt_…`) for this call. Pass to `tagReceiptValue` to annotate value later. */
495
514
  receipt_id?: string;
@@ -557,7 +576,7 @@ export interface Education {
557
576
  /**
558
577
  * A normalized person record. The worker returns every scalar field below and
559
578
  * uses `null`, not a missing key, for a value the provider did not have; the
560
- * declared person_dossier schema requires exactly that shape (#1789).
579
+ * declared person_dossier schema requires exactly that shape.
561
580
  */
562
581
  export interface PersonResult {
563
582
  company_address?: BusinessAddress | null;
@@ -592,7 +611,7 @@ export interface PersonResult {
592
611
  * person twice: it returns the number already found. */
593
612
  phone_lookup?: 'found' | 'none' | 'not_attempted' | 'unavailable' | 'pending';
594
613
  }
595
- export interface PersonFindResult {
614
+ export interface PersonFindResult extends CachedRecordFields {
596
615
  status: string;
597
616
  results: PersonResult[];
598
617
  total_found: number;
@@ -636,11 +655,11 @@ export interface EmailResult {
636
655
  error?: string;
637
656
  /**
638
657
  * Non-blocking advisory from the server. Values:
639
- * - `pinned_domain_warming` — a pinned sender's domain is still warming (low warmup score)
640
- * - `pinned_over_limit` — a pinned sender's domain is over its daily_send_limit
658
+ * - `pinned_domain_warming` - a pinned sender's domain is still warming (low warmup score)
659
+ * - `pinned_over_limit` - a pinned sender's domain is over its daily_send_limit
641
660
  * The send still proceeds; read this to back off / defer. (Note: an un-pinned
642
661
  * send with no eligible owned domain is a hard `400 no_sending_domain`, not a
643
- * warning — there is no shared fallback sender.)
662
+ * warning - there is no shared fallback sender.)
644
663
  */
645
664
  warning?: string;
646
665
  email?: {
@@ -662,7 +681,7 @@ export type DomainWarmupState = 'warming' | 'warmed' | 'degraded';
662
681
  export type DomainPauseReason = 'warming' | 'low_reputation' | 'manual' | null;
663
682
  /** A mailbox already provisioned on a domain (from `/email/domains` `addresses[]`). */
664
683
  export interface DomainAddressEntry {
665
- /** Full email address, lowercased — e.g. `sales@yourdomain.com`. */
684
+ /** Full email address, lowercased - e.g. `sales@yourdomain.com`. */
666
685
  address: string;
667
686
  /** Mailbox provisioning state. Only `active` counts as already-provisioned (free to send from). */
668
687
  status: 'active' | 'provisioning' | 'failed';
@@ -672,34 +691,34 @@ export interface DomainAddressEntry {
672
691
  export interface DomainPoolEntry {
673
692
  domain: string;
674
693
  /**
675
- * Canonical sending address for this domain (e.g. `agent@yourdomain.com`) — the
694
+ * Canonical sending address for this domain (e.g. `agent@yourdomain.com`) - the
676
695
  * default mailbox when you don't pick one. Like any address, the first send from
677
696
  * it incurs the one-time `mailbox_provisioning_fee`; free once it's `active`.
678
697
  */
679
698
  default_from: string;
680
699
  /**
681
700
  * Mailboxes already provisioned on this domain. Empty = none yet; you can still
682
- * send from any address — a new one is provisioned (and billed
701
+ * send from any address - a new one is provisioned (and billed
683
702
  * `mailbox_provisioning_fee`) on first use.
684
703
  */
685
704
  addresses: DomainAddressEntry[];
686
705
  /**
687
706
  * Which side of the provisioning fee this domain sits on.
688
707
  *
689
- * `mailbox` — a real mailbox is provisioned per address, so every address
708
+ * `mailbox` - a real mailbox is provisioned per address, so every address
690
709
  * that isn't already `active` in `addresses[]` bills the one-time
691
710
  * `mailbox_provisioning_fee` on its first send. That includes the canonical
692
711
  * `default_from`; nothing is exempt.
693
- * `relay` — header-only send, nothing provisioned, no per-address fee.
712
+ * `relay` - header-only send, nothing provisioned, no per-address fee.
694
713
  *
695
- * This is a property of the DOMAIN, fixed when it was set up — not of the
714
+ * This is a property of the DOMAIN, fixed when it was set up - not of the
696
715
  * call. Omitting `mailbox_mode` on a quote does not make the send relay; the
697
716
  * domain's own mode always wins. Check here before you quote.
698
717
  */
699
718
  mailbox_mode: 'relay' | 'mailbox';
700
- /** Rotation eligibility — the selector only picks `active`. */
719
+ /** Rotation eligibility - the selector only picks `active`. */
701
720
  pool_status: 'active' | 'paused' | 'removed';
702
- /** Reputation health — a domain can be `paused` AND still `warming`/recovering. */
721
+ /** Reputation health - a domain can be `paused` AND still `warming`/recovering. */
703
722
  warmup_state: DomainWarmupState;
704
723
  pause_reason: DomainPauseReason;
705
724
  provisioning_status: string;
@@ -730,7 +749,7 @@ export interface DossierSection<T> {
730
749
  state: 'found' | 'none' | 'unavailable';
731
750
  data: T;
732
751
  }
733
- export interface PersonProfileResult {
752
+ export interface PersonProfileResult extends CachedRecordFields {
734
753
  status: string;
735
754
  profile: PersonResult & {
736
755
  social_accounts: SocialAccount[];
@@ -764,7 +783,7 @@ export interface CompanyResult {
764
783
  linkedin_url?: string;
765
784
  [key: string]: unknown;
766
785
  }
767
- export interface CompanyFindResult {
786
+ export interface CompanyFindResult extends CachedRecordFields {
768
787
  status: string;
769
788
  results: CompanyResult[];
770
789
  total_found: number;
@@ -776,7 +795,7 @@ export interface CompanyFindResult {
776
795
  memo?: string;
777
796
  cost?: number;
778
797
  }
779
- export interface CompanyProfileResult {
798
+ export interface CompanyProfileResult extends CachedRecordFields {
780
799
  status: string;
781
800
  company: CompanyResult;
782
801
  request_id?: string;
@@ -786,7 +805,7 @@ export interface CompanyProfileResult {
786
805
  memo?: string;
787
806
  cost?: number;
788
807
  }
789
- export interface PersonEmailResult {
808
+ export interface PersonEmailResult extends CachedRecordFields {
790
809
  status: string;
791
810
  email: string | null;
792
811
  found: boolean;
@@ -855,7 +874,7 @@ export type PersonDossierPost = Omit<PersonPostsResult['result'][number], 'platf
855
874
  url?: string | null;
856
875
  posted_at?: string | null;
857
876
  };
858
- export interface PersonDossierResult {
877
+ export interface PersonDossierResult extends CachedRecordFields {
859
878
  status: string;
860
879
  result: {
861
880
  profile: {
@@ -882,7 +901,7 @@ export interface PersonDossierResult {
882
901
  memo?: string;
883
902
  cost?: number;
884
903
  }
885
- export interface PersonSocialAccountsResult {
904
+ export interface PersonSocialAccountsResult extends CachedRecordFields {
886
905
  status: string;
887
906
  result: Record<string, {
888
907
  url?: string;
@@ -895,7 +914,7 @@ export interface PersonSocialAccountsResult {
895
914
  memo?: string;
896
915
  cost?: number;
897
916
  }
898
- export interface PersonArticlesResult {
917
+ export interface PersonArticlesResult extends CachedRecordFields {
899
918
  status: string;
900
919
  result: Array<{
901
920
  title?: string;
@@ -909,7 +928,7 @@ export interface PersonArticlesResult {
909
928
  memo?: string;
910
929
  cost?: number;
911
930
  }
912
- export interface PersonPostsResult {
931
+ export interface PersonPostsResult extends CachedRecordFields {
913
932
  status: string;
914
933
  result: Array<{
915
934
  platform?: string;
@@ -925,7 +944,7 @@ export interface PersonPostsResult {
925
944
  memo?: string;
926
945
  cost?: number;
927
946
  }
928
- export interface PersonInterestsResult {
947
+ export interface PersonInterestsResult extends CachedRecordFields {
929
948
  status: string;
930
949
  result: Record<string, unknown>;
931
950
  request_id: string;
@@ -933,7 +952,7 @@ export interface PersonInterestsResult {
933
952
  memo?: string;
934
953
  cost?: number;
935
954
  }
936
- export interface PersonFollowersResult {
955
+ export interface PersonFollowersResult extends CachedRecordFields {
937
956
  status: string;
938
957
  result: {
939
958
  followers?: Array<Record<string, unknown>>;
@@ -945,7 +964,7 @@ export interface PersonFollowersResult {
945
964
  memo?: string;
946
965
  cost?: number;
947
966
  }
948
- export interface PersonEmailStatusResult {
967
+ export interface PersonEmailStatusResult extends CachedRecordFields {
949
968
  status: string;
950
969
  email: string;
951
970
  valid: boolean;
@@ -959,7 +978,9 @@ export interface PersonEmailStatusResult {
959
978
  memo?: string;
960
979
  cost?: number;
961
980
  }
962
- export interface InboxEmail {
981
+ export interface InboxEmail extends UntrustedContent {
982
+ hidden_removed: number;
983
+ authenticated: boolean;
963
984
  id: string;
964
985
  from: string;
965
986
  subject: string;
@@ -974,7 +995,8 @@ export interface InboxEmail {
974
995
  content?: string;
975
996
  }>;
976
997
  }
977
- export interface InboxListResult {
998
+ export interface InboxListResult extends UntrustedContent {
999
+ hidden_removed: number;
978
1000
  emails: InboxEmail[];
979
1001
  count: number;
980
1002
  has_more: boolean;
@@ -1027,13 +1049,6 @@ export interface VoiceQuote {
1027
1049
  quote_id: string;
1028
1050
  target_numbers: string[];
1029
1051
  conference_mode: boolean;
1030
- /** @deprecated The API stopped emitting a paraphrased objective summary
1031
- * when the voice prompt pipeline switched to verbatim assembly. Field
1032
- * retained for type-back-compat; will be removed in the next major. */
1033
- objective_summary?: string;
1034
- /** @deprecated See objective_summary — the LLM rewrite that produced these
1035
- * bullets is gone. The full objective is in the call's system prompt. */
1036
- talking_points?: string[];
1037
1052
  success_criteria: string[];
1038
1053
  estimated_duration_minutes: number;
1039
1054
  complexity_score: number;
@@ -1342,14 +1357,12 @@ export interface BrowserTaskOptions extends ToolOptions {
1342
1357
  output_schema?: Record<string, unknown>;
1343
1358
  /** Initial URL to navigate to */
1344
1359
  start_url?: string;
1345
- /** Instruct the agent to stay within these domains; not a network firewall. */
1360
+ /** Stay within these domains (subdomains included). Checked after each recorded navigation, not a network block: one outside the list ends the task with `browser_domain_not_allowed`. */
1346
1361
  allowed_domains?: string[];
1347
1362
  /** Reuse an existing browser session */
1348
1363
  session_id?: string;
1349
1364
  /** Persistent browser profile ID for reusing cookies/localStorage across sessions */
1350
1365
  profile_id?: string;
1351
- /** @deprecated Unsupported. Import cookies/storage_state when creating a profile. */
1352
- secrets?: Record<string, string>;
1353
1366
  /** Legacy step-derived budget allowance (default: 50, supported: 25–100); not an exact action limit. */
1354
1367
  max_steps?: number;
1355
1368
  }
@@ -1554,7 +1567,7 @@ export interface ComputeSchedule {
1554
1567
  cron: string;
1555
1568
  /** USDC budget per run */
1556
1569
  budget_per_run: number;
1557
- /** Maximum number of runs (optional — runs indefinitely if omitted) */
1570
+ /** Maximum number of runs (optional - runs indefinitely if omitted) */
1558
1571
  max_runs?: number;
1559
1572
  }
1560
1573
  export interface ComputeOptions extends ToolOptions {
@@ -1586,6 +1599,13 @@ export interface ComputeOptions extends ToolOptions {
1586
1599
  * approval covers exactly one call: that tool, those params, at most that amount.
1587
1600
  */
1588
1601
  approvals?: ComputeApprovals;
1602
+ /**
1603
+ * Hosts the goal's sandboxes may reach besides OneShot's API: hostnames, IPv4
1604
+ * addresses or IPv4 ranges, at most 50. Setting it (even to []) limits every
1605
+ * sandbox of the goal to OneShot's API and these hosts; an organization with
1606
+ * sandbox default-deny on gets the same for all its goals.
1607
+ */
1608
+ egress_allowlist?: string[];
1589
1609
  }
1590
1610
  export type ComputeDoneCheck =
1591
1611
  /** At least `at_least` calls of `tool` that reached `status` (default `completed`). */
@@ -1640,13 +1660,53 @@ export interface ComputeCheckResult {
1640
1660
  evaluated_at: string;
1641
1661
  attempt?: number;
1642
1662
  }
1643
- export type ComputeEndReason = 'check_passed' | 'owner_confirmed' | 'check_failed' | 'budget_exhausted' | 'deadline_passed' | 'planner_failed';
1663
+ export type ComputeEndReason = 'check_passed' | 'owner_confirmed' | 'check_failed' | 'budget_exhausted' | 'deadline_passed' | 'planner_failed' | 'impossible' | 'impossible_unverified' | 'connection_timeout';
1644
1664
  export interface ComputeApprovals {
1645
1665
  /** Hold any single call whose cost exceeds this many USDC. */
1646
1666
  spend_over_usdc?: number;
1647
1667
  /** Hold every call of these tools, whatever the cost (e.g. ["commerce_buy", "physical_mail", "voice", "soul_hire"]). */
1648
1668
  tools?: string[];
1649
1669
  }
1670
+ /** A connected system a goal needs, as the quote read it from the objective. */
1671
+ export interface ComputeRequirement {
1672
+ family: 'crm' | 'ledger' | 'shipping' | 'tax' | 'procurement' | 'repository';
1673
+ /** The product the objective names (e.g. "QuickBooks"); null when only the kind of system was named. */
1674
+ product: string | null;
1675
+ /** The system can be connected on OneShot right now. */
1676
+ available: boolean;
1677
+ /** The goal owner has an active connection to it. null for a caller that has not proven it holds the agent wallet (access token or signed proof). */
1678
+ connected: boolean | null;
1679
+ /** Where the owner connects a system; only for a caller proven to hold the agent wallet. */
1680
+ connect_url?: string;
1681
+ }
1682
+ /**
1683
+ * Whether a goal can be done, as the quote judged it. `refuse` comes only with a proof and no quote;
1684
+ * `hold` means a supported system is not connected yet (the quote is still issued); an unproven caller instead gets
1685
+ * `accept` with the reason `connection_checked_at_payment`. Warnings never change the verdict.
1686
+ */
1687
+ export interface ComputeFeasibility {
1688
+ verdict: 'accept' | 'hold' | 'refuse';
1689
+ reasons: {
1690
+ code: 'system_unsupported' | 'deadline_in_past' | 'infeasible_input' | 'connection_checked_at_payment';
1691
+ message: string;
1692
+ conflicts?: {
1693
+ constraints: {
1694
+ family: string;
1695
+ ref: string;
1696
+ label: string;
1697
+ }[];
1698
+ explanation: string;
1699
+ }[];
1700
+ }[];
1701
+ warnings: {
1702
+ code: 'no_tool_matched' | 'tight_deadline' | 'finish_line_unknowable' | 'product_unverified' | 'similar_goal_was_impossible';
1703
+ message: string;
1704
+ }[];
1705
+ finish_line?: {
1706
+ kind: 'measurable' | 'needs_owner' | 'unknowable';
1707
+ done_check?: ComputeDoneCheck;
1708
+ };
1709
+ }
1650
1710
  export interface ComputeQuote {
1651
1711
  quote_id: string;
1652
1712
  objective_summary: string;
@@ -1654,6 +1714,9 @@ export interface ComputeQuote {
1654
1714
  estimated_tasks: number;
1655
1715
  estimated_duration_days: number;
1656
1716
  budget_breakdown: Record<string, string>;
1717
+ /** One entry per connected system the goal needs. */
1718
+ requires: ComputeRequirement[];
1719
+ feasibility: ComputeFeasibility;
1657
1720
  total_budget: string;
1658
1721
  expires_at: string;
1659
1722
  schedule_cron?: string;
@@ -1662,6 +1725,7 @@ export interface ComputeQuote {
1662
1725
  projected_runs?: number;
1663
1726
  }
1664
1727
  export interface ComputeGoalResult {
1728
+ requires?: ComputeRequirement[];
1665
1729
  goal_id: string;
1666
1730
  request_id: string;
1667
1731
  receipt_id?: string;
@@ -1679,9 +1743,14 @@ export interface ComputeGoalResult {
1679
1743
  next_run_at?: string;
1680
1744
  };
1681
1745
  }
1746
+ export type GoalStatus = 'active' | 'paused' | 'completed' | 'failed' | 'cancelled' | 'awaiting_confirmation' | 'awaiting_connection';
1682
1747
  export interface ComputeGoalStatus {
1683
1748
  id: string;
1684
- status: string;
1749
+ status: GoalStatus;
1750
+ connection_hold?: {
1751
+ since: string;
1752
+ requires: ComputeRequirement[];
1753
+ } | null;
1685
1754
  name: string;
1686
1755
  objective: string;
1687
1756
  current_phase: number | null;
@@ -1773,7 +1842,7 @@ export interface ComputeBudgetStatus {
1773
1842
  created_at: string;
1774
1843
  }>;
1775
1844
  }
1776
- export interface BusinessFindOptions extends ToolOptions {
1845
+ export interface BusinessFindOptions extends ToolOptions, FreshLookupOption {
1777
1846
  /** Business categories, e.g. ['hvac contractor', 'dental practice']. category or keywords required. */
1778
1847
  category?: string[];
1779
1848
  /** Free-text keywords (alternative to category). */
@@ -1791,7 +1860,7 @@ export interface BusinessFindOptions extends ToolOptions {
1791
1860
  /** 1-500, default 100. Effective max is bounded by the vendor-call cap; see `truncated`. */
1792
1861
  limit?: number;
1793
1862
  }
1794
- export interface BusinessResolveOptions extends ToolOptions {
1863
+ export interface BusinessResolveOptions extends ToolOptions, FreshLookupOption {
1795
1864
  name: string;
1796
1865
  address?: string;
1797
1866
  city?: string;
@@ -1824,7 +1893,7 @@ export interface LocalResult {
1824
1893
  latitude: number | null;
1825
1894
  longitude: number | null;
1826
1895
  }
1827
- export interface BusinessFindResult {
1896
+ export interface BusinessFindResult extends CachedRecordFields {
1828
1897
  status: string;
1829
1898
  results: LocalResult[];
1830
1899
  total_found: number;
@@ -1838,9 +1907,9 @@ export interface BusinessFindResult {
1838
1907
  memo?: string;
1839
1908
  cost?: number;
1840
1909
  }
1841
- export interface BusinessResolveResult {
1910
+ export interface BusinessResolveResult extends CachedRecordFields {
1842
1911
  status: string;
1843
- /** false is a completed job, not an error — the same contract as personEmail. */
1912
+ /** false is a completed job, not an error - the same contract as personEmail. */
1844
1913
  found: boolean;
1845
1914
  /** 0..1 confidence of the best candidate (0 when nothing was returned). */
1846
1915
  confidence: number;
@@ -1864,7 +1933,7 @@ export type GovNoticeTypeCode = 'r' | 'p' | 'o' | 'k' | 's' | 'a' | 'u' | 'i' |
1864
1933
  export interface RecordSolicitationsFindOptions extends ToolOptions {
1865
1934
  /** 6-digit NAICS codes, 1-20. Required. */
1866
1935
  naics: string[];
1867
- /** Default ['r', 'p'] — Sources Sought + Presolicitation, the window where the requirement is still being written. */
1936
+ /** Default ['r', 'p'] - Sources Sought + Presolicitation, the window where the requirement is still being written. */
1868
1937
  notice_types?: GovNoticeTypeCode[];
1869
1938
  /** Look-back window on posted date, 1-365. Default 30. */
1870
1939
  since_days?: number;
@@ -1934,7 +2003,7 @@ export interface RecordSolicitationsFindResult {
1934
2003
  description_fetches: number;
1935
2004
  /**
1936
2005
  * ISO timestamp of the data snapshot behind `results`: the publish time of
1937
- * SAM.gov's daily extract when served from it (the common case — same-day
2006
+ * SAM.gov's daily extract when served from it (the common case - same-day
1938
2007
  * postings appear the next morning), or the request time when the live
1939
2008
  * SAM.gov API answered.
1940
2009
  */
@@ -1947,13 +2016,11 @@ export interface RecordSolicitationsFindResult {
1947
2016
  memo?: string;
1948
2017
  cost?: number;
1949
2018
  }
1950
- /** Interactive profile login (#1889). setup_url is a secret for the account's owner; do not log or persist it. */
2019
+ /** Interactive profile login. setup_url is a secret for the account's owner; do not log or persist it. */
1951
2020
  export interface BrowserProfileSetup {
1952
2021
  profile_id: string;
1953
2022
  session_id?: string;
1954
2023
  status: string;
1955
- /** @deprecated Use setup_url. Removed in the next release. */
1956
- live_url?: string | null;
1957
2024
  /** The OneShot page the account's owner opens to sign in. Opens once; a fresh one comes from createBrowserProfileSetupLink. Returned by start and link. */
1958
2025
  setup_url?: string;
1959
2026
  /** When setup_url stops opening (10 minutes after it was minted, or when the setup expires). */
@@ -2181,7 +2248,7 @@ export interface LinkedInConversationsOptions {
2181
2248
  export interface LinkedInMessagesOptions {
2182
2249
  accountId: string;
2183
2250
  conversationId?: string;
2184
- /** `inbound` = the human received it — use with `since` as a reply watermark. */
2251
+ /** `inbound` = the human received it - use with `since` as a reply watermark. */
2185
2252
  direction?: 'inbound' | 'outbound';
2186
2253
  /** ISO time: only messages sent after this. */
2187
2254
  since?: string;
@@ -2356,7 +2423,7 @@ export type DiscoverToolsResult = {
2356
2423
  message?: string;
2357
2424
  searchedCategories?: string[];
2358
2425
  };
2359
- /** One of the agent's connections (`GET /v1/connections`, #2403). A read of a connected system takes its `id` as `connection_id`. */
2426
+ /** One of the agent's connections (`GET /v1/connections`). A read of a connected system takes its `id` as `connection_id`. */
2360
2427
  export interface AgentConnection {
2361
2428
  id: string;
2362
2429
  name: string;