content-agent 1.1.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,794 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ type paths = {
6
+ '/{organizationId}/threads/{threadId}': {
7
+ parameters: {
8
+ query?: never;
9
+ header?: never;
10
+ path?: never;
11
+ cookie?: never;
12
+ };
13
+ get?: never;
14
+ put?: never;
15
+ /**
16
+ * Send a chat message
17
+ * @description Send a message to the agent and receive a streaming response.
18
+ * This endpoint manages conversation threads and persists message history.
19
+ */
20
+ post: operations['chat'];
21
+ delete?: never;
22
+ options?: never;
23
+ head?: never;
24
+ patch?: never;
25
+ trace?: never;
26
+ };
27
+ '/prompt': {
28
+ parameters: {
29
+ query?: never;
30
+ header?: never;
31
+ path?: never;
32
+ cookie?: never;
33
+ };
34
+ get?: never;
35
+ put?: never;
36
+ /**
37
+ * Send a one-shot prompt
38
+ * @description Stateless one-shot prompt endpoint. No thread management or message persistence.
39
+ * Ideal for simple, single-turn interactions.
40
+ */
41
+ post: operations['prompt'];
42
+ delete?: never;
43
+ options?: never;
44
+ head?: never;
45
+ patch?: never;
46
+ trace?: never;
47
+ };
48
+ };
49
+ type components = {
50
+ schemas: {
51
+ ChatRequest: {
52
+ /** @description Array of message objects */messages: components['schemas']['Message'][];
53
+ application?: components['schemas']['Application'];
54
+ config?: components['schemas']['Config'];
55
+ /**
56
+ * @description Enable or disable streaming responses
57
+ * @default true
58
+ */
59
+ stream: boolean;
60
+ /**
61
+ * @description Controls how directives in the response are formatted.
62
+ * - markdown (default): Directives are resolved server-side into standard markdown (e.g., links with titles).
63
+ * - directives: Raw directive syntax is preserved (e.g., `::document{id="doc-id"}`), useful for clients that render custom UI components.
64
+ * @default markdown
65
+ * @enum {string}
66
+ */
67
+ format: 'markdown' | 'directives';
68
+ };
69
+ PromptRequest: {
70
+ /**
71
+ * @description Your Sanity organization ID
72
+ * @example abc123
73
+ */
74
+ organizationId: string;
75
+ /**
76
+ * @description The prompt message
77
+ * @example Summarize my latest blog posts
78
+ */
79
+ message: string;
80
+ config?: components['schemas']['Config'];
81
+ /**
82
+ * @description Custom instructions for the agent
83
+ * @example Be concise and use bullet points
84
+ */
85
+ instructions?: string;
86
+ /**
87
+ * @description Controls how directives in the response are formatted.
88
+ * - markdown (default): Directives are resolved server-side into standard markdown.
89
+ * - directives: Raw directive syntax is preserved for clients that render custom UI.
90
+ * @default markdown
91
+ * @enum {string}
92
+ */
93
+ format: 'markdown' | 'directives';
94
+ };
95
+ Message: {
96
+ /**
97
+ * @description The role of the message sender
98
+ * @enum {string}
99
+ */
100
+ role: 'user' | 'assistant' | 'system'; /** @description The message content */
101
+ content: string; /** @description Optional unique identifier for the message */
102
+ id?: string; /** @description Optional name for the message sender */
103
+ name?: string;
104
+ }; /** @description Target Sanity application configuration */
105
+ Application: {
106
+ /**
107
+ * @description Application key in format "projectId.datasetName"
108
+ * @example abc123.production
109
+ */
110
+ key?: string;
111
+ resource?: {
112
+ /**
113
+ * @description Resource ID in format "projectId.datasetName"
114
+ * @example abc123.production
115
+ */
116
+ id?: string;
117
+ /**
118
+ * @description Resource type
119
+ * @enum {string}
120
+ */
121
+ type?: 'dataset';
122
+ };
123
+ /**
124
+ * Format: uri
125
+ * @description Base URL for the Sanity Studio
126
+ * @example https://your-studio.sanity.studio
127
+ */
128
+ intentBaseUrl?: string; /** @description Bundle version */
129
+ bundleVersion?: string; /** @description Application name */
130
+ name?: string; /** @description Application title */
131
+ title?: string; /** @description Schema descriptor ID */
132
+ schemaDescriptorId?: string;
133
+ }; /** @description Agent configuration. Controls behavior, capabilities, and document access. */
134
+ Config: {
135
+ /**
136
+ * @description Custom instruction string to include in the system prompt
137
+ * @example You are a helpful content assistant.
138
+ */
139
+ instruction?: string;
140
+ /**
141
+ * @description Key-value pairs appended to each user message as XML tags.
142
+ * Each key becomes an XML tag with the value as content.
143
+ * Example: { "slack-channel": "#marketing" } renders as <slack-channel>#marketing</slack-channel>
144
+ * @example {
145
+ * "slack-channel": "#marketing",
146
+ * "user-role": "editor"
147
+ * }
148
+ */
149
+ userMessageContext?: {
150
+ [key: string]: string;
151
+ };
152
+ capabilities?: components['schemas']['Capabilities'];
153
+ filter?: components['schemas']['Filter'];
154
+ perspectives?: components['schemas']['Perspectives'];
155
+ };
156
+ /**
157
+ * @description Agent capabilities that control what operations are allowed.
158
+ * Each capability can be a boolean or an object with a preset.
159
+ * @example {
160
+ * "read": true,
161
+ * "write": false
162
+ * }
163
+ */
164
+ Capabilities: {
165
+ read?: components['schemas']['Capability'];
166
+ write?: components['schemas']['Capability'];
167
+ features?: components['schemas']['FeatureOverrides'];
168
+ };
169
+ /**
170
+ * @description Explicit feature overrides applied on top of capability-derived defaults.
171
+ * When not specified, features use values derived from read/write capability presets.
172
+ */
173
+ FeatureOverrides: {
174
+ /**
175
+ * @description Override web search availability.
176
+ * By default, web search is enabled when read capability is 'standard'.
177
+ */
178
+ webSearch?: boolean;
179
+ };
180
+ /**
181
+ * @description A capability can be:
182
+ * - true: Full access (standard preset)
183
+ * - false: No access
184
+ * - { preset: 'minimal' | 'standard' }: Explicit preset selection
185
+ */
186
+ Capability: boolean | components['schemas']['CapabilityPreset'];
187
+ CapabilityPreset: {
188
+ /**
189
+ * @description For read capability:
190
+ * - minimal: Basic queries only (no bulk document analysis)
191
+ * - standard: All read tools including bulk analysis
192
+ *
193
+ * For write capability:
194
+ * - minimal: Basic mutations only (no bulk mutations)
195
+ * - standard: All write tools including bulk mutations
196
+ * @enum {string}
197
+ */
198
+ preset: 'minimal' | 'standard';
199
+ }; /** @description GROQ filter expressions for document access control */
200
+ Filter: {
201
+ /**
202
+ * @description GROQ boolean expression for document visibility.
203
+ * Documents matching this filter are visible to the agent.
204
+ * @example _type in ['post', 'author']
205
+ */
206
+ read?: string;
207
+ /**
208
+ * @description GROQ boolean expression for mutation permissions.
209
+ * Documents matching this filter can be mutated.
210
+ * @example _type == 'post'
211
+ */
212
+ write?: string;
213
+ };
214
+ /**
215
+ * @description Perspective locking configuration.
216
+ * Controls which document perspectives the agent can read from and write to.
217
+ * Values are Sanity perspective IDs: 'drafts', 'published', 'raw', or release/bundle IDs.
218
+ */
219
+ Perspectives: {
220
+ /**
221
+ * @description Allowed read perspectives. When set, query tools can only use these perspectives.
222
+ * If the agent tries to use a disallowed perspective, the request is rejected with an error.
223
+ * @example [
224
+ * "drafts",
225
+ * "published"
226
+ * ]
227
+ */
228
+ read?: string[];
229
+ /**
230
+ * @description The write perspective. When set, new documents are created in this perspective
231
+ * and mutations are restricted to documents whose ID matches it.
232
+ * @example drafts
233
+ */
234
+ write?: string;
235
+ }; /** @description JSON response when streaming is disabled */
236
+ ChatResponse: {
237
+ /** @description The agent's response text */text?: string; /** @description The application key used for this conversation */
238
+ applicationKey?: string;
239
+ };
240
+ ErrorResponse: {
241
+ /**
242
+ * @description Error type
243
+ * @example Invalid request
244
+ */
245
+ error: string;
246
+ /**
247
+ * @description Human-readable error description
248
+ * @example Request body validation failed
249
+ */
250
+ details?: string; /** @description Validation issues (when applicable) */
251
+ issues?: components['schemas']['ValidationIssue'][];
252
+ };
253
+ ValidationIssue: {
254
+ /**
255
+ * @description Error code
256
+ * @example invalid_type
257
+ */
258
+ code?: string;
259
+ /**
260
+ * @description Path to the invalid field
261
+ * @example [
262
+ * "messages"
263
+ * ]
264
+ */
265
+ path?: string[];
266
+ /**
267
+ * @description Error message
268
+ * @example Required
269
+ */
270
+ message?: string;
271
+ };
272
+ };
273
+ responses: {
274
+ /** @description Bad Request - Request validation failed */BadRequest: {
275
+ headers: {
276
+ [name: string]: unknown;
277
+ };
278
+ content: {
279
+ /**
280
+ * @example {
281
+ * "error": "Invalid request",
282
+ * "details": "Request body validation failed",
283
+ * "issues": [
284
+ * {
285
+ * "code": "invalid_type",
286
+ * "path": [
287
+ * "messages"
288
+ * ],
289
+ * "message": "Required"
290
+ * }
291
+ * ]
292
+ * }
293
+ */
294
+ 'application/json': components['schemas']['ErrorResponse'];
295
+ };
296
+ }; /** @description Unauthorized - Missing or invalid authentication token */
297
+ Unauthorized: {
298
+ headers: {
299
+ [name: string]: unknown;
300
+ };
301
+ content: {
302
+ /**
303
+ * @example {
304
+ * "error": "Unauthorized",
305
+ * "details": "Missing authorization token"
306
+ * }
307
+ */
308
+ 'application/json': components['schemas']['ErrorResponse'];
309
+ };
310
+ }; /** @description Internal Server Error */
311
+ InternalServerError: {
312
+ headers: {
313
+ [name: string]: unknown;
314
+ };
315
+ content: {
316
+ /**
317
+ * @example {
318
+ * "error": "Internal Server Error",
319
+ * "details": "An unexpected error occurred"
320
+ * }
321
+ */
322
+ 'application/json': components['schemas']['ErrorResponse'];
323
+ };
324
+ };
325
+ };
326
+ parameters: never;
327
+ requestBodies: never;
328
+ headers: never;
329
+ pathItems: never;
330
+ };
331
+ interface operations {
332
+ chat: {
333
+ parameters: {
334
+ query?: never;
335
+ header?: never;
336
+ path: {
337
+ /**
338
+ * @description Your Sanity organization ID
339
+ * @example abc123
340
+ */
341
+ organizationId: string;
342
+ /**
343
+ * @description Unique identifier for the conversation thread
344
+ * @example my-conversation-thread
345
+ */
346
+ threadId: string;
347
+ };
348
+ cookie?: never;
349
+ };
350
+ requestBody: {
351
+ content: {
352
+ 'application/json': components['schemas']['ChatRequest'];
353
+ };
354
+ };
355
+ responses: {
356
+ /** @description Streaming response */200: {
357
+ headers: {
358
+ 'Content-Type'?: string;
359
+ 'X-Vercel-AI-Data-Stream'?: string;
360
+ [name: string]: unknown;
361
+ };
362
+ content: {
363
+ 'text/event-stream': string; /** @description JSON response when stream is false */
364
+ 'application/json': components['schemas']['ChatResponse'];
365
+ };
366
+ };
367
+ 400: components['responses']['BadRequest'];
368
+ 401: components['responses']['Unauthorized'];
369
+ 500: components['responses']['InternalServerError'];
370
+ };
371
+ };
372
+ prompt: {
373
+ parameters: {
374
+ query?: never;
375
+ header?: never;
376
+ path?: never;
377
+ cookie?: never;
378
+ };
379
+ requestBody: {
380
+ content: {
381
+ 'application/json': components['schemas']['PromptRequest'];
382
+ };
383
+ };
384
+ responses: {
385
+ /** @description Streaming response */200: {
386
+ headers: {
387
+ 'Content-Type'?: string;
388
+ 'X-Vercel-AI-Data-Stream'?: string;
389
+ [name: string]: unknown;
390
+ };
391
+ content: {
392
+ 'text/event-stream': string;
393
+ };
394
+ };
395
+ 400: components['responses']['BadRequest'];
396
+ 401: components['responses']['Unauthorized'];
397
+ 500: components['responses']['InternalServerError'];
398
+ };
399
+ };
400
+ }
401
+ /**
402
+ * Request body for the conversation thread endpoint (`POST /{organizationId}/threads/{threadId}`).
403
+ * @category API Types
404
+ */
405
+ type ChatRequest = components['schemas']['ChatRequest'];
406
+ /**
407
+ * Request body for the one-shot prompt endpoint (`POST /prompt`).
408
+ * @category API Types
409
+ */
410
+ type GenerateRequest = components['schemas']['PromptRequest'];
411
+ /**
412
+ * Controls how directives in the response are formatted (`'markdown'` or `'directives'`).
413
+ * @category Configuration
414
+ */
415
+ type OutputFormat = ChatRequest['format'];
416
+ /**
417
+ * Response from the conversation thread endpoint when `stream: false`.
418
+ * @category API Types
419
+ */
420
+ type ChatResponse = components['schemas']['ChatResponse'];
421
+ /**
422
+ * Error response body returned by the API on failure.
423
+ * @category API Types
424
+ */
425
+ type ErrorResponse = components['schemas']['ErrorResponse'];
426
+ /**
427
+ * Individual validation issue within an {@link ErrorResponse}.
428
+ * @category API Types
429
+ */
430
+ type ValidationIssue = components['schemas']['ValidationIssue'];
431
+ /**
432
+ * A message in a conversation (user, assistant, or system).
433
+ * @category API Types
434
+ */
435
+ type Message = components['schemas']['Message'];
436
+ /**
437
+ * The role of a {@link Message}: `'user'`, `'assistant'`, or `'system'`.
438
+ * @category API Types
439
+ */
440
+ type MessageRole = Message['role'];
441
+ /**
442
+ * Specifies which Sanity project and dataset the agent should work with.
443
+ *
444
+ * @category Configuration
445
+ *
446
+ * @example
447
+ * ```ts
448
+ * const application = {
449
+ * key: 'project-id.dataset-name',
450
+ * }
451
+ * ```
452
+ */
453
+ type Application = components['schemas']['Application'];
454
+ /**
455
+ * Resource within an {@link Application}.
456
+ * @category Configuration
457
+ */
458
+ type ApplicationResource = NonNullable<Application['resource']>;
459
+ /**
460
+ * Agent configuration for controlling behavior, capabilities, and document access.
461
+ *
462
+ * @category Configuration
463
+ *
464
+ * @example Read-only with custom instruction and user message context
465
+ * ```ts
466
+ * const config = {
467
+ * instruction: 'You are a Slack bot helping users manage content.',
468
+ * userMessageContext: {
469
+ * 'slack-channel': '#content-team',
470
+ * 'slack-user': '@john.doe',
471
+ * },
472
+ * capabilities: {
473
+ * read: true,
474
+ * write: false,
475
+ * },
476
+ * }
477
+ * ```
478
+ *
479
+ * @example Read-only document explorer with type filtering
480
+ * ```ts
481
+ * const config = {
482
+ * capabilities: {
483
+ * read: { preset: 'standard' },
484
+ * write: false,
485
+ * },
486
+ * filter: {
487
+ * read: '_type in ["post", "author", "page"]',
488
+ * },
489
+ * }
490
+ * ```
491
+ */
492
+ type Config = components['schemas']['Config'];
493
+ /**
494
+ * Controls what operations the agent can perform.
495
+ *
496
+ * Each capability (`read`, `write`) can be:
497
+ * - `true` — Full access (standard preset)
498
+ * - `false` — No access
499
+ * - `{ preset: 'minimal' }` — Basic tools only
500
+ * - `{ preset: 'standard' }` — All tools available
501
+ *
502
+ * Use `features` to override individual feature toggles independently of presets.
503
+ *
504
+ * @example Read-only access
505
+ * ```ts
506
+ * const capabilities = { read: true, write: false }
507
+ * ```
508
+ *
509
+ * @example Full read, minimal write
510
+ * ```ts
511
+ * const capabilities = {
512
+ * read: true,
513
+ * write: { preset: 'minimal' },
514
+ * }
515
+ * ```
516
+ *
517
+ * @example Standard read with web search disabled
518
+ * ```ts
519
+ * const capabilities = {
520
+ * read: true,
521
+ * write: false,
522
+ * features: { webSearch: false },
523
+ * }
524
+ * ```
525
+ *
526
+ * @category Configuration
527
+ */
528
+ type Capabilities = components['schemas']['Capabilities'];
529
+ /**
530
+ * A single capability value: `true`, `false`, or a {@link CapabilityPreset}.
531
+ * @category Configuration
532
+ */
533
+ type Capability = components['schemas']['Capability'];
534
+ /**
535
+ * A capability preset object, e.g. `{ preset: 'minimal' }` or `{ preset: 'standard' }`.
536
+ * @category Configuration
537
+ */
538
+ type CapabilityPreset = components['schemas']['CapabilityPreset'];
539
+ /**
540
+ * The preset level string: `'minimal'` or `'standard'`.
541
+ * @category Configuration
542
+ */
543
+ type CapabilityPresetValue = CapabilityPreset['preset'];
544
+ /**
545
+ * GROQ boolean expressions to control document visibility and mutation permissions.
546
+ *
547
+ * @category Configuration
548
+ *
549
+ * @example
550
+ * ```ts
551
+ * const filter = {
552
+ * read: '_type in ["post", "author", "category"]',
553
+ * write: '_type == "post"',
554
+ * }
555
+ * ```
556
+ */
557
+ type Filter = components['schemas']['Filter'];
558
+ /**
559
+ * Key-value pairs appended to each user message as XML tags.
560
+ *
561
+ * @category Configuration
562
+ *
563
+ * @example
564
+ * ```ts
565
+ * const userMessageContext = {
566
+ * 'slack-channel': '#marketing',
567
+ * 'user-role': 'editor',
568
+ * }
569
+ * // Renders in the user message as:
570
+ * // <slack-channel>#marketing</slack-channel>
571
+ * // <user-role>editor</user-role>
572
+ * ```
573
+ */
574
+ type UserMessageContext = NonNullable<Config['userMessageContext']>;
575
+ /**
576
+ * Settings for creating a Content Agent provider instance via {@link createContentAgent}.
577
+ *
578
+ * @category Provider
579
+ *
580
+ * @example
581
+ * ```ts
582
+ * import { createContentAgent } from 'content-agent'
583
+ *
584
+ * const contentAgent = createContentAgent({
585
+ * organizationId: 'your-org-id',
586
+ * token: 'your-sanity-token',
587
+ * // Optional overrides:
588
+ * // baseURL: 'https://api.sanity.io',
589
+ * // apiVersion: 'v2026-01-01',
590
+ * })
591
+ * ```
592
+ */
593
+ interface ContentAgentProviderSettings {
594
+ /**
595
+ * Your Sanity organization ID.
596
+ *
597
+ * When using {@link createStudioAgent}, this is fetched automatically
598
+ * from the project metadata.
599
+ */
600
+ organizationId: string;
601
+ /**
602
+ * Default application for all agent and prompt calls.
603
+ *
604
+ * When set, this application is used unless overridden per-call via
605
+ * {@link AgentSettings.application} or {@link GenerateSettings.application}.
606
+ *
607
+ * Typically set automatically by {@link createStudioAgent}.
608
+ */
609
+ application?: Application;
610
+ /**
611
+ * Base URL for the Sanity API.
612
+ * @default 'https://api.sanity.io'
613
+ */
614
+ baseURL?: string;
615
+ /**
616
+ * API version to use for requests.
617
+ * Should be in format 'vYYYY-MM-DD' (e.g., 'v2026-01-01').
618
+ * @default 'v2026-01-01'
619
+ */
620
+ apiVersion?: string;
621
+ /**
622
+ * Authentication token for the Sanity API.
623
+ * If not provided, requests will be made without authentication
624
+ * (useful for browser contexts where auth may come from cookies).
625
+ */
626
+ token?: string;
627
+ /**
628
+ * Custom headers to include in requests.
629
+ */
630
+ headers?: Record<string, string>;
631
+ /**
632
+ * Custom fetch implementation.
633
+ * Useful for testing or adding middleware.
634
+ */
635
+ fetch?: typeof globalThis.fetch;
636
+ }
637
+ /**
638
+ * Base settings shared between agent and generate requests.
639
+ *
640
+ * @example Read-only agent with document type filtering
641
+ * ```ts
642
+ * const settings = {
643
+ * application: { key: 'projectId.datasetName' },
644
+ * config: {
645
+ * instruction: 'You are a helpful content assistant for our blog.',
646
+ * capabilities: {
647
+ * read: true,
648
+ * write: false,
649
+ * },
650
+ * filter: {
651
+ * read: '_type in ["post", "author", "category"]',
652
+ * },
653
+ * },
654
+ * }
655
+ * ```
656
+ *
657
+ * @example Read/write agent with perspective locking
658
+ * ```ts
659
+ * const settings = {
660
+ * application: { key: 'projectId.datasetName' },
661
+ * config: {
662
+ * capabilities: {
663
+ * read: true,
664
+ * write: { preset: 'minimal' },
665
+ * },
666
+ * filter: {
667
+ * read: '_type in ["post", "author", "category"]',
668
+ * write: '_type == "post"',
669
+ * },
670
+ * perspectives: {
671
+ * read: ['drafts', 'published'],
672
+ * write: 'drafts',
673
+ * },
674
+ * },
675
+ * }
676
+ * ```
677
+ */
678
+ interface BaseAgentSettings {
679
+ /**
680
+ * Target Sanity application configuration.
681
+ */
682
+ application?: Application;
683
+ /**
684
+ * Agent configuration for controlling behavior, capabilities, and document access.
685
+ */
686
+ config?: Config;
687
+ /**
688
+ * Controls how directives in the response are formatted.
689
+ * - `markdown` (default): Directives are resolved server-side into standard markdown.
690
+ * - `directives`: Raw directive syntax is preserved for clients that render custom UI.
691
+ * @default 'markdown'
692
+ */
693
+ format?: OutputFormat;
694
+ }
695
+ /**
696
+ * Settings for creating an agent instance (per-thread).
697
+ *
698
+ * Passed as the second argument to {@link ContentAgentProvider.agent | contentAgent.agent(threadId, settings)}.
699
+ *
700
+ * @example
701
+ * ```ts
702
+ * const model = contentAgent.agent('my-thread-id', {
703
+ * application: { key: 'projectId.datasetName' },
704
+ * config: {
705
+ * capabilities: { read: true, write: false },
706
+ * },
707
+ * })
708
+ * ```
709
+ *
710
+ * @category Configuration
711
+ */
712
+ interface AgentSettings extends BaseAgentSettings {
713
+ /**
714
+ * Identifies the client that created the thread (e.g. `'slack'`, `'linear'`, `'dashboard'`).
715
+ *
716
+ * Stored in thread metadata and used by the dashboard to filter its thread list.
717
+ * When omitted, the server assigns a default value.
718
+ */
719
+ clientId?: string;
720
+ /**
721
+ * Called when a custom `data-*` SSE part arrives during streaming.
722
+ *
723
+ * @param type - The data part type with the `data-` prefix stripped (e.g. `'agent-status'`).
724
+ * @param data - The parsed payload.
725
+ */
726
+ onStreamData?: (type: string, data: unknown) => void;
727
+ }
728
+ /**
729
+ * Settings for one-shot generation requests via {@link ContentAgentProvider.prompt | contentAgent.prompt()}.
730
+ *
731
+ * Extends {@link BaseAgentSettings} with an additional `instructions` field
732
+ * for providing custom system-level instructions.
733
+ *
734
+ * @example
735
+ * ```ts
736
+ * const { text } = await contentAgent.prompt(
737
+ * {
738
+ * application: { key: 'projectId.datasetName' },
739
+ * config: { capabilities: { read: true, write: false } },
740
+ * instructions: 'Be concise',
741
+ * },
742
+ * { message: 'List my 5 most recent posts' },
743
+ * )
744
+ * ```
745
+ *
746
+ * @category Configuration
747
+ */
748
+ interface GenerateSettings extends BaseAgentSettings {
749
+ /**
750
+ * Custom instructions for the agent.
751
+ */
752
+ instructions?: string;
753
+ }
754
+ /**
755
+ * Options for a one-shot generation request via {@link ContentAgentProvider.prompt | contentAgent.prompt()}.
756
+ *
757
+ * @category Configuration
758
+ *
759
+ * @example
760
+ * ```ts
761
+ * const { text } = await contentAgent.prompt(
762
+ * { instructions: 'Be concise' },
763
+ * { message: 'List all authors in my dataset' },
764
+ * )
765
+ * ```
766
+ */
767
+ interface GenerateOptions {
768
+ /**
769
+ * The prompt message to send.
770
+ */
771
+ message: string;
772
+ /**
773
+ * Enable streaming response.
774
+ * @default false
775
+ */
776
+ stream?: boolean;
777
+ /**
778
+ * Signal to abort the request.
779
+ */
780
+ abortSignal?: AbortSignal;
781
+ }
782
+ /**
783
+ * Result from a one-shot generation request via {@link ContentAgentProvider.prompt | contentAgent.prompt()}.
784
+ *
785
+ * @category Configuration
786
+ */
787
+ interface GenerateResult {
788
+ /**
789
+ * The generated text response.
790
+ */
791
+ text: string;
792
+ }
793
+ export { components as C, ValidationIssue as S, paths as T, GenerateSettings as _, Capability as a, OutputFormat as b, ChatRequest as c, ContentAgentProviderSettings as d, ErrorResponse as f, GenerateResult as g, GenerateRequest as h, Capabilities as i, ChatResponse as l, GenerateOptions as m, Application as n, CapabilityPreset as o, Filter as p, ApplicationResource as r, CapabilityPresetValue as s, AgentSettings as t, Config as u, Message as v, operations as w, UserMessageContext as x, MessageRole as y };
794
+ //# sourceMappingURL=types.d.ts.map