@lumavox/server 0.5.0 → 0.8.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.
@@ -81,12 +81,27 @@ export type SkyboxStyle = {
81
81
  image: string | null;
82
82
  };
83
83
  export type EphemeralKeyLimits = {
84
+ /**
85
+ * The platform's longest lifetime for a key.
86
+ */
84
87
  max_ttl_seconds: number;
85
88
  default_ttl_seconds: number;
86
89
  /**
87
- * Micro-credits: 1 credit is 1,000,000.
90
+ * The platform's largest credit limit for a key.
88
91
  */
89
92
  max_credit_limit_micros: number;
93
+ /**
94
+ * Your plan's longest lifetime for one end user's key; `null` sets none. A key is held to the tighter of this and `max_ttl_seconds`.
95
+ */
96
+ plan_max_ttl_seconds: number | null;
97
+ /**
98
+ * Your plan's largest credit limit for one end user's key, in micro-credits; `null` sets none. A key is held to the tighter of this and `max_credit_limit_micros`.
99
+ */
100
+ plan_max_credit_limit_micros: number | null;
101
+ /**
102
+ * How many live keys one end user may hold on your plan; `null` sets none.
103
+ */
104
+ plan_max_live_keys: number | null;
90
105
  grantable_scopes: Array<string>;
91
106
  };
92
107
  export type EphemeralKeyCreateResponse = {
@@ -100,7 +115,7 @@ export type EphemeralKeyCreateResponse = {
100
115
  */
101
116
  credit_limit_micros: number;
102
117
  /**
103
- * What it has spent, as its end user DO last settled — at the end, or daily for a long-lived key.
118
+ * What it has spent, as its end user DO last settled — at the end, or daily for a long-lived key. Final once `settled_at` is set.
104
119
  */
105
120
  credits_spent_micros: number;
106
121
  /**
@@ -116,6 +131,10 @@ export type EphemeralKeyCreateResponse = {
116
131
  last_used_at: string | null;
117
132
  revoked_at: string | null;
118
133
  revoked_reason: string | null;
134
+ /**
135
+ * When its end user DO settled it for the last time — what it spent and what came back are final from then. `null` while it is live, and for a few seconds after it ends, longer while a memory job it paid for still runs.
136
+ */
137
+ settled_at: string | null;
119
138
  active: boolean;
120
139
  /**
121
140
  * The token, in full. **Shown once**: it is signed rather than stored, so it cannot be shown again.
@@ -151,7 +170,7 @@ export type EphemeralKeyInfo = {
151
170
  */
152
171
  credit_limit_micros: number;
153
172
  /**
154
- * What it has spent, as its end user DO last settled — at the end, or daily for a long-lived key.
173
+ * What it has spent, as its end user DO last settled — at the end, or daily for a long-lived key. Final once `settled_at` is set.
155
174
  */
156
175
  credits_spent_micros: number;
157
176
  /**
@@ -167,6 +186,10 @@ export type EphemeralKeyInfo = {
167
186
  last_used_at: string | null;
168
187
  revoked_at: string | null;
169
188
  revoked_reason: string | null;
189
+ /**
190
+ * When its end user DO settled it for the last time — what it spent and what came back are final from then. `null` while it is live, and for a few seconds after it ends, longer while a memory job it paid for still runs.
191
+ */
192
+ settled_at: string | null;
170
193
  active: boolean;
171
194
  };
172
195
  export type TokenSelf = ({
@@ -182,7 +205,7 @@ export type EphemeralTokenSelf = {
182
205
  */
183
206
  credit_limit_micros: number;
184
207
  /**
185
- * What the key had spent when its end user DO last settled — at the end, or daily for a long-lived key.
208
+ * What the key has spent so far, turn by turn.
186
209
  */
187
210
  credits_spent_micros: number;
188
211
  /**
@@ -1101,6 +1124,10 @@ export type MessageInfo = {
1101
1124
  */
1102
1125
  mood_intensity: number | null;
1103
1126
  role: 'user' | 'assistant';
1127
+ /**
1128
+ * On a reply: the calls of your tools it made, in order, each with its arguments and what it answered. Empty when it called none, and on the person's messages.
1129
+ */
1130
+ tool_calls: Array<MessageToolCall>;
1104
1131
  };
1105
1132
  export type MessageKnowledge = {
1106
1133
  lookups: Array<KnowledgeLookupInfo>;
@@ -1126,6 +1153,40 @@ export type KnowledgeCitation = {
1126
1153
  score: number;
1127
1154
  title: string;
1128
1155
  };
1156
+ export type MessageToolCall = {
1157
+ /**
1158
+ * The call's id, `call_…`: what your server or app was sent.
1159
+ */
1160
+ call_id: string;
1161
+ name: string;
1162
+ kind: 'webhook' | 'app';
1163
+ /**
1164
+ * What the model called it with.
1165
+ */
1166
+ arguments: {
1167
+ [key: string]: unknown;
1168
+ };
1169
+ /**
1170
+ * What it answered, as the model read it — its JSON, or its text, cut at 16 KB. Null when it answered nothing.
1171
+ */
1172
+ result?: unknown;
1173
+ /**
1174
+ * It answered in time, with a 2xx or a result.
1175
+ */
1176
+ ok: boolean;
1177
+ /**
1178
+ * What failed, as the model was told — or, for a tool that asks first, that it waited for the person's yes. Null when nothing did.
1179
+ */
1180
+ error: string | null;
1181
+ /**
1182
+ * How long it took.
1183
+ */
1184
+ ms: number;
1185
+ /**
1186
+ * Which of the reply's rounds of calls, 1 to 3; 0 for a call the person confirmed with a tap.
1187
+ */
1188
+ round: number;
1189
+ };
1129
1190
  export type RelationInfo = {
1130
1191
  agent_id: string;
1131
1192
  /**
@@ -2551,6 +2612,218 @@ export type AgentKnowledgeUpdate = {
2551
2612
  */
2552
2613
  entry_ids: Array<string>;
2553
2614
  };
2615
+ export type ToolPage = {
2616
+ data: Array<ToolInfo>;
2617
+ /**
2618
+ * Pass as `cursor` for the next page; `null` when this is the last.
2619
+ */
2620
+ next_cursor: string | null;
2621
+ };
2622
+ export type ToolInfo = {
2623
+ /**
2624
+ * The tool's id, `tl_…`.
2625
+ */
2626
+ id: string;
2627
+ /**
2628
+ * What the model calls the tool by: 1 to 64 lower-case letters, digits and underscores, starting with a letter. Unique in your organisation; `search_knowledge` and `remember_relation` are the platform's own.
2629
+ */
2630
+ name: string;
2631
+ description: string;
2632
+ /**
2633
+ * `webhook`: your server, sent a signed `POST` with the call. `app`: the person's app, called over the agent's WebSocket. Fixed at creation.
2634
+ */
2635
+ kind: 'webhook' | 'app';
2636
+ /**
2637
+ * Its inputs, as a JSON Schema object: `{"type": "object", "properties": {…}, "required": […]}`, each property `string` (with an optional `enum`), `number`, `integer`, `boolean`, `array` (with `items`) or `object`, each with an optional `description`. Nothing else is taken: a key outside this set is refused rather than passed on unenforced.
2638
+ */
2639
+ parameters: {
2640
+ [key: string]: unknown;
2641
+ };
2642
+ /**
2643
+ * A webhook's address; `null` for an app's.
2644
+ */
2645
+ url: string | null;
2646
+ /**
2647
+ * How long a call may take, in milliseconds: 1000 to 30000, 10000 by default. Past it the call failed, and the model is told so.
2648
+ */
2649
+ timeout_ms: number;
2650
+ /**
2651
+ * Never run on the model's word alone: the agent asks the person first, and the tool runs only after they say yes.
2652
+ */
2653
+ ask_first: boolean;
2654
+ /**
2655
+ * An app's tool only: the app is told to act and the reply carries on at once, with no answer awaited.
2656
+ */
2657
+ action_only: boolean;
2658
+ /**
2659
+ * The line said before the call; `null` for none.
2660
+ */
2661
+ filler: string | null;
2662
+ /**
2663
+ * The names of the headers sent with each call; their values are never shown.
2664
+ */
2665
+ header_names: Array<string>;
2666
+ /**
2667
+ * The signing secret's last four characters; `null` for an app's tool.
2668
+ */
2669
+ secret_hint: string | null;
2670
+ /**
2671
+ * The agents it is turned on for.
2672
+ */
2673
+ agent_ids: Array<string>;
2674
+ /**
2675
+ * Moves by one on every save. Send it back as `expected_version` on an update to have the save refused (409) if somebody else changed the tool since you read it.
2676
+ */
2677
+ version: number;
2678
+ created_at: string;
2679
+ updated_at: string;
2680
+ };
2681
+ export type ToolWithSecret = ToolInfo & {
2682
+ /**
2683
+ * The signing secret, `whsec_…`, **shown this once**: every call is signed with it (`X-Tool-Signature`). Keep it on your server. `null` for an app's tool.
2684
+ */
2685
+ secret: string | null;
2686
+ };
2687
+ export type ToolCreate = {
2688
+ /**
2689
+ * What the model calls the tool by: 1 to 64 lower-case letters, digits and underscores, starting with a letter. Unique in your organisation; `search_knowledge` and `remember_relation` are the platform's own.
2690
+ */
2691
+ name: string;
2692
+ /**
2693
+ * What the tool does and when to call it, in the model's terms: it reads this to decide.
2694
+ */
2695
+ description: string;
2696
+ /**
2697
+ * `webhook`: your server, sent a signed `POST` with the call. `app`: the person's app, called over the agent's WebSocket. Fixed at creation.
2698
+ */
2699
+ kind: 'webhook' | 'app';
2700
+ /**
2701
+ * Its inputs (as above); omitted: it takes none.
2702
+ */
2703
+ parameters?: {
2704
+ [key: string]: unknown;
2705
+ };
2706
+ /**
2707
+ * A webhook's `https://` address, public, and not this platform's. An app's tool has none.
2708
+ */
2709
+ url?: string | null;
2710
+ /**
2711
+ * How long a call may take, in milliseconds: 1000 to 30000, 10000 by default. Past it the call failed, and the model is told so.
2712
+ */
2713
+ timeout_ms?: number;
2714
+ /**
2715
+ * Never run on the model's word alone: the agent asks the person first, and the tool runs only after they say yes.
2716
+ */
2717
+ ask_first?: boolean;
2718
+ /**
2719
+ * An app's tool only: the app is told to act and the reply carries on at once, with no answer awaited.
2720
+ */
2721
+ action_only?: boolean;
2722
+ /**
2723
+ * A line the agent says before the call, while it waits: `Let me check that for you.` `null`: none.
2724
+ */
2725
+ filler?: string | null;
2726
+ /**
2727
+ * A webhook's own headers, sent with every call (your API token): at most 10, stored encrypted and never shown again — a tool answers their names. `Content-Type`, `User-Agent`, `X-Tool-*` and HTTP's own are the platform's.
2728
+ */
2729
+ headers?: {
2730
+ [key: string]: string;
2731
+ } | null;
2732
+ };
2733
+ export type ToolUpdate = {
2734
+ /**
2735
+ * What the model calls the tool by: 1 to 64 lower-case letters, digits and underscores, starting with a letter. Unique in your organisation; `search_knowledge` and `remember_relation` are the platform's own.
2736
+ */
2737
+ name?: string;
2738
+ /**
2739
+ * What the tool does and when to call it, in the model's terms: it reads this to decide.
2740
+ */
2741
+ description?: string;
2742
+ /**
2743
+ * Its inputs, as a JSON Schema object: `{"type": "object", "properties": {…}, "required": […]}`, each property `string` (with an optional `enum`), `number`, `integer`, `boolean`, `array` (with `items`) or `object`, each with an optional `description`. Nothing else is taken: a key outside this set is refused rather than passed on unenforced.
2744
+ */
2745
+ parameters?: {
2746
+ [key: string]: unknown;
2747
+ };
2748
+ /**
2749
+ * A webhook's `https://` address, public, and not this platform's. An app's tool has none.
2750
+ */
2751
+ url?: string;
2752
+ /**
2753
+ * How long a call may take, in milliseconds: 1000 to 30000, 10000 by default. Past it the call failed, and the model is told so.
2754
+ */
2755
+ timeout_ms?: number;
2756
+ /**
2757
+ * Never run on the model's word alone: the agent asks the person first, and the tool runs only after they say yes.
2758
+ */
2759
+ ask_first?: boolean;
2760
+ /**
2761
+ * An app's tool only: the app is told to act and the reply carries on at once, with no answer awaited.
2762
+ */
2763
+ action_only?: boolean;
2764
+ /**
2765
+ * A line the agent says before the call, while it waits: `Let me check that for you.` `null`: none.
2766
+ */
2767
+ filler?: string | null;
2768
+ /**
2769
+ * Replaces every header; `null` or `{}` sends none.
2770
+ */
2771
+ headers?: {
2772
+ [key: string]: string;
2773
+ } | null;
2774
+ /**
2775
+ * The `version` you last read. When set and the tool has been changed since, the update is refused with 409 and nothing is written. Omit it to write unconditionally.
2776
+ */
2777
+ expected_version?: number | null;
2778
+ };
2779
+ export type ToolTestResult = {
2780
+ /**
2781
+ * Your server answered 2xx within the timeout.
2782
+ */
2783
+ ok: boolean;
2784
+ /**
2785
+ * Its HTTP status; `null` when none came (unreachable, or too slow).
2786
+ */
2787
+ status: number | null;
2788
+ /**
2789
+ * From sending to its answer's last byte.
2790
+ */
2791
+ duration_ms: number;
2792
+ /**
2793
+ * Its answer: the JSON it sent, else its text, cut at 16384 bytes; `null` for none.
2794
+ */
2795
+ result?: unknown;
2796
+ /**
2797
+ * The answer was longer than 16384 bytes and was cut.
2798
+ */
2799
+ truncated: boolean;
2800
+ /**
2801
+ * What failed, as the model would be told; `null` when it did not.
2802
+ */
2803
+ error: string | null;
2804
+ };
2805
+ export type ToolTestRequest = {
2806
+ /**
2807
+ * What the call carries as `arguments`; `{}` when omitted.
2808
+ */
2809
+ arguments?: {
2810
+ [key: string]: unknown;
2811
+ };
2812
+ };
2813
+ export type ToolsAssigned = {
2814
+ added: number;
2815
+ removed: number;
2816
+ /**
2817
+ * Ids sent that are not this organisation's, ignored.
2818
+ */
2819
+ skipped: Array<string>;
2820
+ };
2821
+ export type AgentToolsUpdate = {
2822
+ /**
2823
+ * The complete set, at most 20. An empty list turns every tool off.
2824
+ */
2825
+ tool_ids: Array<string>;
2826
+ };
2554
2827
  export type TtsRequest = {
2555
2828
  /**
2556
2829
  * An id from `GET /v1/voices` — the built-in voice, a platform voice, or one your organisation uploaded.
@@ -3025,6 +3298,48 @@ export type RevokeEphemeralKeyResponses = {
3025
3298
  200: EphemeralKeyInfo;
3026
3299
  };
3027
3300
  export type RevokeEphemeralKeyResponse = RevokeEphemeralKeyResponses[keyof RevokeEphemeralKeyResponses];
3301
+ export type GetEphemeralKeyData = {
3302
+ body?: never;
3303
+ path: {
3304
+ key_id: string;
3305
+ };
3306
+ query?: never;
3307
+ url: '/v1/ephemeral-keys/{key_id}';
3308
+ };
3309
+ export type GetEphemeralKeyErrors = {
3310
+ /**
3311
+ * The request could not be read: malformed JSON
3312
+ */
3313
+ 400: ErrorResponse;
3314
+ /**
3315
+ * Missing or invalid credentials
3316
+ */
3317
+ 401: ErrorResponse;
3318
+ /**
3319
+ * The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
3320
+ */
3321
+ 403: ErrorResponse;
3322
+ /**
3323
+ * Unknown ephemeral key id
3324
+ */
3325
+ 404: ErrorResponse;
3326
+ /**
3327
+ * The request failed validation
3328
+ */
3329
+ 422: ErrorResponse;
3330
+ /**
3331
+ * Rate limit exceeded
3332
+ */
3333
+ 429: ErrorResponse;
3334
+ };
3335
+ export type GetEphemeralKeyError = GetEphemeralKeyErrors[keyof GetEphemeralKeyErrors];
3336
+ export type GetEphemeralKeyResponses = {
3337
+ /**
3338
+ * The token
3339
+ */
3340
+ 200: EphemeralKeyInfo;
3341
+ };
3342
+ export type GetEphemeralKeyResponse = GetEphemeralKeyResponses[keyof GetEphemeralKeyResponses];
3028
3343
  export type GetTokenData = {
3029
3344
  body?: never;
3030
3345
  path?: never;
@@ -4732,6 +5047,14 @@ export type ListFactsData = {
4732
5047
  * Optional, and only ever the key's own end user — their `eu_...` id or your own id for them. Anybody else is a 403.
4733
5048
  */
4734
5049
  end_user_id?: string;
5050
+ /**
5051
+ * How many to answer, 1 to 200.
5052
+ */
5053
+ limit?: number;
5054
+ /**
5055
+ * The `next_cursor` of the page before.
5056
+ */
5057
+ cursor?: string;
4735
5058
  };
4736
5059
  url: '/v1/agent/facts';
4737
5060
  };
@@ -6038,6 +6361,380 @@ export type SetAgentKnowledgeResponses = {
6038
6361
  200: KnowledgeAssigned;
6039
6362
  };
6040
6363
  export type SetAgentKnowledgeResponse = SetAgentKnowledgeResponses[keyof SetAgentKnowledgeResponses];
6364
+ export type ListToolsData = {
6365
+ body?: never;
6366
+ path?: never;
6367
+ query?: never;
6368
+ url: '/v1/tools';
6369
+ };
6370
+ export type ListToolsErrors = {
6371
+ /**
6372
+ * Missing or invalid credentials
6373
+ */
6374
+ 401: ErrorResponse;
6375
+ /**
6376
+ * The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
6377
+ */
6378
+ 403: ErrorResponse;
6379
+ /**
6380
+ * The request failed validation
6381
+ */
6382
+ 422: ErrorResponse;
6383
+ /**
6384
+ * Rate limit exceeded
6385
+ */
6386
+ 429: ErrorResponse;
6387
+ };
6388
+ export type ListToolsError = ListToolsErrors[keyof ListToolsErrors];
6389
+ export type ListToolsResponses = {
6390
+ /**
6391
+ * Every tool
6392
+ */
6393
+ 200: ToolPage;
6394
+ };
6395
+ export type ListToolsResponse = ListToolsResponses[keyof ListToolsResponses];
6396
+ export type CreateToolData = {
6397
+ body: ToolCreate;
6398
+ path?: never;
6399
+ query?: never;
6400
+ url: '/v1/tools';
6401
+ };
6402
+ export type CreateToolErrors = {
6403
+ /**
6404
+ * The request could not be read: malformed JSON
6405
+ */
6406
+ 400: ErrorResponse;
6407
+ /**
6408
+ * Missing or invalid credentials
6409
+ */
6410
+ 401: ErrorResponse;
6411
+ /**
6412
+ * The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
6413
+ */
6414
+ 403: ErrorResponse;
6415
+ /**
6416
+ * A tool by that name exists already, or the library holds 200 tools.
6417
+ */
6418
+ 409: ErrorResponse;
6419
+ /**
6420
+ * The request failed validation
6421
+ */
6422
+ 422: ErrorResponse;
6423
+ /**
6424
+ * Rate limit exceeded
6425
+ */
6426
+ 429: ErrorResponse;
6427
+ /**
6428
+ * This deployment cannot seal a tool's secret (`TOOL_SECRET_KEY` unset): webhook tools cannot be saved or called.
6429
+ */
6430
+ 503: ErrorResponse;
6431
+ };
6432
+ export type CreateToolError = CreateToolErrors[keyof CreateToolErrors];
6433
+ export type CreateToolResponses = {
6434
+ /**
6435
+ * The tool, with its signing secret shown this once
6436
+ */
6437
+ 201: ToolWithSecret;
6438
+ };
6439
+ export type CreateToolResponse = CreateToolResponses[keyof CreateToolResponses];
6440
+ export type DeleteToolData = {
6441
+ body?: never;
6442
+ path: {
6443
+ tool_id: string;
6444
+ };
6445
+ query?: never;
6446
+ url: '/v1/tools/{tool_id}';
6447
+ };
6448
+ export type DeleteToolErrors = {
6449
+ /**
6450
+ * Missing or invalid credentials
6451
+ */
6452
+ 401: ErrorResponse;
6453
+ /**
6454
+ * The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
6455
+ */
6456
+ 403: ErrorResponse;
6457
+ /**
6458
+ * Unknown tool id
6459
+ */
6460
+ 404: ErrorResponse;
6461
+ /**
6462
+ * The request failed validation
6463
+ */
6464
+ 422: ErrorResponse;
6465
+ /**
6466
+ * Rate limit exceeded
6467
+ */
6468
+ 429: ErrorResponse;
6469
+ };
6470
+ export type DeleteToolError = DeleteToolErrors[keyof DeleteToolErrors];
6471
+ export type DeleteToolResponses = {
6472
+ /**
6473
+ * The tool is gone
6474
+ */
6475
+ 204: void;
6476
+ };
6477
+ export type DeleteToolResponse = DeleteToolResponses[keyof DeleteToolResponses];
6478
+ export type GetToolData = {
6479
+ body?: never;
6480
+ path: {
6481
+ tool_id: string;
6482
+ };
6483
+ query?: never;
6484
+ url: '/v1/tools/{tool_id}';
6485
+ };
6486
+ export type GetToolErrors = {
6487
+ /**
6488
+ * Missing or invalid credentials
6489
+ */
6490
+ 401: ErrorResponse;
6491
+ /**
6492
+ * The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
6493
+ */
6494
+ 403: ErrorResponse;
6495
+ /**
6496
+ * Unknown tool id
6497
+ */
6498
+ 404: ErrorResponse;
6499
+ /**
6500
+ * The request failed validation
6501
+ */
6502
+ 422: ErrorResponse;
6503
+ /**
6504
+ * Rate limit exceeded
6505
+ */
6506
+ 429: ErrorResponse;
6507
+ };
6508
+ export type GetToolError = GetToolErrors[keyof GetToolErrors];
6509
+ export type GetToolResponses = {
6510
+ /**
6511
+ * The tool
6512
+ */
6513
+ 200: ToolInfo;
6514
+ };
6515
+ export type GetToolResponse = GetToolResponses[keyof GetToolResponses];
6516
+ export type UpdateToolData = {
6517
+ body: ToolUpdate;
6518
+ path: {
6519
+ tool_id: string;
6520
+ };
6521
+ query?: never;
6522
+ url: '/v1/tools/{tool_id}';
6523
+ };
6524
+ export type UpdateToolErrors = {
6525
+ /**
6526
+ * The request could not be read: malformed JSON
6527
+ */
6528
+ 400: ErrorResponse;
6529
+ /**
6530
+ * Missing or invalid credentials
6531
+ */
6532
+ 401: ErrorResponse;
6533
+ /**
6534
+ * The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
6535
+ */
6536
+ 403: ErrorResponse;
6537
+ /**
6538
+ * Unknown tool id
6539
+ */
6540
+ 404: ErrorResponse;
6541
+ /**
6542
+ * `expected_version` was sent and the tool has been changed since, or the new name is taken. Nothing was written.
6543
+ */
6544
+ 409: ErrorResponse;
6545
+ /**
6546
+ * The request failed validation
6547
+ */
6548
+ 422: ErrorResponse;
6549
+ /**
6550
+ * Rate limit exceeded
6551
+ */
6552
+ 429: ErrorResponse;
6553
+ /**
6554
+ * This deployment cannot seal a tool's secret (`TOOL_SECRET_KEY` unset): webhook tools cannot be saved or called.
6555
+ */
6556
+ 503: ErrorResponse;
6557
+ };
6558
+ export type UpdateToolError = UpdateToolErrors[keyof UpdateToolErrors];
6559
+ export type UpdateToolResponses = {
6560
+ /**
6561
+ * The tool as it now stands
6562
+ */
6563
+ 200: ToolInfo;
6564
+ };
6565
+ export type UpdateToolResponse = UpdateToolResponses[keyof UpdateToolResponses];
6566
+ export type RotateToolSecretData = {
6567
+ body?: never;
6568
+ path: {
6569
+ tool_id: string;
6570
+ };
6571
+ query?: never;
6572
+ url: '/v1/tools/{tool_id}/secret';
6573
+ };
6574
+ export type RotateToolSecretErrors = {
6575
+ /**
6576
+ * Missing or invalid credentials
6577
+ */
6578
+ 401: ErrorResponse;
6579
+ /**
6580
+ * The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
6581
+ */
6582
+ 403: ErrorResponse;
6583
+ /**
6584
+ * Unknown tool id
6585
+ */
6586
+ 404: ErrorResponse;
6587
+ /**
6588
+ * The request failed validation
6589
+ */
6590
+ 422: ErrorResponse;
6591
+ /**
6592
+ * Rate limit exceeded
6593
+ */
6594
+ 429: ErrorResponse;
6595
+ /**
6596
+ * This deployment cannot seal a tool's secret (`TOOL_SECRET_KEY` unset): webhook tools cannot be saved or called.
6597
+ */
6598
+ 503: ErrorResponse;
6599
+ };
6600
+ export type RotateToolSecretError = RotateToolSecretErrors[keyof RotateToolSecretErrors];
6601
+ export type RotateToolSecretResponses = {
6602
+ /**
6603
+ * The tool, with its new signing secret
6604
+ */
6605
+ 200: ToolWithSecret;
6606
+ };
6607
+ export type RotateToolSecretResponse = RotateToolSecretResponses[keyof RotateToolSecretResponses];
6608
+ export type TestToolData = {
6609
+ body: ToolTestRequest;
6610
+ path: {
6611
+ tool_id: string;
6612
+ };
6613
+ query?: never;
6614
+ url: '/v1/tools/{tool_id}/test';
6615
+ };
6616
+ export type TestToolErrors = {
6617
+ /**
6618
+ * The request could not be read: malformed JSON
6619
+ */
6620
+ 400: ErrorResponse;
6621
+ /**
6622
+ * Missing or invalid credentials
6623
+ */
6624
+ 401: ErrorResponse;
6625
+ /**
6626
+ * The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
6627
+ */
6628
+ 403: ErrorResponse;
6629
+ /**
6630
+ * Unknown tool id
6631
+ */
6632
+ 404: ErrorResponse;
6633
+ /**
6634
+ * The tool's stored secret cannot be opened: `TOOL_SECRET_KEY` changed since it was saved. Rotate its secret, and save its headers again.
6635
+ */
6636
+ 409: ErrorResponse;
6637
+ /**
6638
+ * The request failed validation
6639
+ */
6640
+ 422: ErrorResponse;
6641
+ /**
6642
+ * Rate limit exceeded
6643
+ */
6644
+ 429: ErrorResponse;
6645
+ /**
6646
+ * This deployment cannot seal a tool's secret (`TOOL_SECRET_KEY` unset): webhook tools cannot be saved or called.
6647
+ */
6648
+ 503: ErrorResponse;
6649
+ };
6650
+ export type TestToolError = TestToolErrors[keyof TestToolErrors];
6651
+ export type TestToolResponses = {
6652
+ /**
6653
+ * What your server answered, or why it did not
6654
+ */
6655
+ 200: ToolTestResult;
6656
+ };
6657
+ export type TestToolResponse = TestToolResponses[keyof TestToolResponses];
6658
+ export type ListAgentToolsData = {
6659
+ body?: never;
6660
+ path: {
6661
+ agent_id: string;
6662
+ };
6663
+ query?: never;
6664
+ url: '/v1/agents/{agent_id}/tools';
6665
+ };
6666
+ export type ListAgentToolsErrors = {
6667
+ /**
6668
+ * Missing or invalid credentials
6669
+ */
6670
+ 401: ErrorResponse;
6671
+ /**
6672
+ * The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
6673
+ */
6674
+ 403: ErrorResponse;
6675
+ /**
6676
+ * Unknown agent id
6677
+ */
6678
+ 404: ErrorResponse;
6679
+ /**
6680
+ * The request failed validation
6681
+ */
6682
+ 422: ErrorResponse;
6683
+ /**
6684
+ * Rate limit exceeded
6685
+ */
6686
+ 429: ErrorResponse;
6687
+ };
6688
+ export type ListAgentToolsError = ListAgentToolsErrors[keyof ListAgentToolsErrors];
6689
+ export type ListAgentToolsResponses = {
6690
+ /**
6691
+ * The tools this agent can call
6692
+ */
6693
+ 200: ToolPage;
6694
+ };
6695
+ export type ListAgentToolsResponse = ListAgentToolsResponses[keyof ListAgentToolsResponses];
6696
+ export type SetAgentToolsData = {
6697
+ body: AgentToolsUpdate;
6698
+ path: {
6699
+ agent_id: string;
6700
+ };
6701
+ query?: never;
6702
+ url: '/v1/agents/{agent_id}/tools';
6703
+ };
6704
+ export type SetAgentToolsErrors = {
6705
+ /**
6706
+ * The request could not be read: malformed JSON
6707
+ */
6708
+ 400: ErrorResponse;
6709
+ /**
6710
+ * Missing or invalid credentials
6711
+ */
6712
+ 401: ErrorResponse;
6713
+ /**
6714
+ * The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
6715
+ */
6716
+ 403: ErrorResponse;
6717
+ /**
6718
+ * Unknown agent id
6719
+ */
6720
+ 404: ErrorResponse;
6721
+ /**
6722
+ * The request failed validation
6723
+ */
6724
+ 422: ErrorResponse;
6725
+ /**
6726
+ * Rate limit exceeded
6727
+ */
6728
+ 429: ErrorResponse;
6729
+ };
6730
+ export type SetAgentToolsError = SetAgentToolsErrors[keyof SetAgentToolsErrors];
6731
+ export type SetAgentToolsResponses = {
6732
+ /**
6733
+ * How many tools were turned on and off
6734
+ */
6735
+ 200: ToolsAssigned;
6736
+ };
6737
+ export type SetAgentToolsResponse = SetAgentToolsResponses[keyof SetAgentToolsResponses];
6041
6738
  export type SynthesizeSpeechData = {
6042
6739
  body: TtsRequest;
6043
6740
  path?: never;