@rool-dev/sdk 0.3.0 → 0.3.1-dev.07199fc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  The TypeScript SDK for Rool, a persistent and collaborative environment for organizing objects.
4
4
 
5
+ > **Building a new Rool app?** Start with [`@rool-dev/app`](/app/) — it handles hosting, dev server, and gives you a reactive Svelte channel out of the box. This SDK is for advanced use cases: integrating Rool into an existing application, building Node.js scripts, or working outside the app sandbox.
6
+
5
7
  Rool enables you to build applications where AI operates on a structured world model rather than a text conversation. The context for all AI operations is the full object graph, allowing the system to reason about, update, and expand the state of your application directly.
6
8
 
7
9
  Use Rool to programmatically instruct agents to generate content, research topics, or reorganize data. The client manages authentication, real-time synchronization, and media storage, supporting both single-user and multi-user workflows.
@@ -105,22 +107,26 @@ await channel2.prompt('Analyze the data'); // Independent channel
105
107
 
106
108
  The `channelId` is fixed when you open a channel and cannot be changed. To use a different channel, open a new one. Both channels share the same objects and schema — only the interaction history differs.
107
109
 
110
+ **Channel ID constraints:**
111
+ - 1–32 characters
112
+ - Only alphanumeric characters, hyphens (`-`), and underscores (`_`)
113
+
108
114
  ### Objects & References
109
115
 
110
116
  **Objects** are plain key-value records. The `id` field is reserved; everything else is application-defined.
111
117
 
112
118
  ```typescript
113
- { id: 'abc123', type: 'article', title: 'Hello World', status: 'draft' }
119
+ { id: 'abc123', title: 'Hello World', status: 'draft' }
114
120
  ```
115
121
 
116
122
  **References** between objects are data fields whose values are object IDs. The system detects these statistically — any string field whose value matches an existing object ID is recognized as a reference.
117
123
 
118
124
  ```typescript
119
125
  // A planet references a star via the 'orbits' field
120
- { id: 'earth', type: 'planet', name: 'Earth', orbits: 'sun-01' }
126
+ { id: 'earth', name: 'Earth', orbits: 'sun-01' }
121
127
 
122
128
  // An array of references
123
- { id: 'team-a', type: 'team', name: 'Alpha', members: ['user-1', 'user-2', 'user-3'] }
129
+ { id: 'team-a', name: 'Alpha', members: ['user-1', 'user-2', 'user-3'] }
124
130
  ```
125
131
 
126
132
  References are just data — no special API is needed to create or remove them. Set a field to an object ID to create a reference; clear it to remove it.
@@ -133,7 +139,6 @@ Use `{{description}}` in field values to have AI generate content:
133
139
  // Create with AI-generated content
134
140
  await channel.createObject({
135
141
  data: {
136
- type: 'article',
137
142
  headline: '{{catchy headline about coffee}}',
138
143
  body: '{{informative paragraph}}'
139
144
  }
@@ -180,7 +185,7 @@ In collaborative scenarios, conflicting changes (modified by others since your c
180
185
 
181
186
  ### Hidden Fields
182
187
 
183
- Fields starting with `_` (e.g., `_ui`, `_cache`) are hidden from AI but otherwise behave like normal fields they sync in real-time, persist to the server, support undo/redo, and are visible to all users of the Space. Use them for UI state, positions, or other data the AI shouldn't see or modify:
188
+ Fields starting with `_` (e.g., `_ui`, `_cache`) are hidden from AI and ignored by the schema — you can add them to any object regardless of its collection definition. Otherwise they behave like normal fields: they sync in real-time, persist to the server, support undo/redo, and are visible to all users of the Space. Use them for UI state, positions, or other data the AI shouldn't see or modify:
184
189
 
185
190
  ```typescript
186
191
  await channel.createObject({
@@ -229,7 +234,7 @@ await channel.createObject({ data: { id: 'article-42', title: 'The Meaning of Li
229
234
  ```typescript
230
235
  // Fire-and-forget: create and reference without waiting
231
236
  const id = RoolClient.generateId();
232
- channel.createObject({ data: { id, type: 'note', text: '{{expand this idea}}' } });
237
+ channel.createObject({ data: { id, text: '{{expand this idea}}' } });
233
238
  channel.updateObject(parentId, { data: { notes: [...existingNotes, id] } }); // Add reference immediately
234
239
  ```
235
240
 
@@ -306,12 +311,12 @@ Returns a message (the AI's response) and the list of objects that were created
306
311
 
307
312
  | Option | Description |
308
313
  |--------|-------------|
309
- | `objectIds` | Limit context to specific objects |
314
+ | `objectIds` | Focus the AI on specific objects (given primary attention in context) |
310
315
  | `responseSchema` | Request structured JSON instead of text summary |
311
316
  | `effort` | Effort level: `'QUICK'`, `'STANDARD'` (default), `'REASONING'`, or `'RESEARCH'` |
312
317
  | `ephemeral` | If true, don't record in interaction history (useful for tab completion) |
313
318
  | `readOnly` | If true, disable mutation tools (create, update, delete). Use for questions. |
314
- | `attachments` | Files to attach (`File`, `Blob`, or `{ data, contentType }`). Uploaded to the media store via `uploadMedia()`. Resulting URLs are stored on the interaction's `attachments` field for UI rendering. **Currently only images are interpreted by the AI**; other file types are uploaded and stored but the AI cannot read their contents. |
319
+ | `attachments` | Files to attach (`File`, `Blob`, or `{ data, contentType }`). Uploaded to the media store via `uploadMedia()`. Resulting URLs are stored on the interaction's `attachments` field for UI rendering. The AI can interpret images (JPEG, PNG, GIF, WebP, SVG), PDFs, text-based files (plain text, Markdown, CSV, HTML, XML, JSON), and DOCX documents. Other file types are uploaded and stored but the AI cannot read their contents. |
315
320
 
316
321
  ### Effort Levels
317
322
 
@@ -320,7 +325,7 @@ Returns a message (the AI's response) and the list of objects that were created
320
325
  | `QUICK` | Fast, lightweight model. Best for simple questions. |
321
326
  | `STANDARD` | Default behavior with balanced capabilities. |
322
327
  | `REASONING` | Extended reasoning for complex tasks. |
323
- | `RESEARCH` | Pre-analysis and context gathering (reserved for future use). |
328
+ | `RESEARCH` | Most thorough mode with deep analysis. Slowest and most credit-intensive. |
324
329
 
325
330
  ### Examples
326
331
 
@@ -552,6 +557,19 @@ client.on('userStorageChanged', ({ key, value, source }) => {
552
557
  });
553
558
  ```
554
559
 
560
+ ### Apps
561
+
562
+ Publish, manage, and discover apps. See [`@rool-dev/app`](/app/) for building apps.
563
+
564
+ | Method | Description |
565
+ |--------|-------------|
566
+ | `publishApp(appId, options): Promise<PublishedAppInfo>` | Publish or update an app (`options.bundle`: zip with `index.html` and `rool-app.json`) |
567
+ | `unpublishApp(appId): Promise<void>` | Unpublish an app |
568
+ | `listApps(): Promise<PublishedAppInfo[]>` | List your own published apps |
569
+ | `getAppInfo(appId): Promise<PublishedAppInfo \| null>` | Get info for a specific app |
570
+ | `findApps(options?): Promise<PublishedAppInfo[]>` | Search public apps. Options: `query` (semantic search string), `limit` (default 20, max 100). Omit `query` to browse all. |
571
+ | `installApp(spaceId, appId, channelId?): Promise<string>` | Install an app into a space. Creates/updates a channel with the app's manifest settings (name, system instruction, collections). Returns the channel ID. Defaults `channelId` to `appId`. |
572
+
555
573
  ### Utilities
556
574
 
557
575
  | Method | Description |
@@ -632,6 +650,7 @@ A channel is a named context within a space. All object operations, AI prompts,
632
650
  | `userId: string` | Current user's ID |
633
651
  | `channelId: string` | Channel ID (read-only, fixed at open time) |
634
652
  | `isReadOnly: boolean` | True if viewer role |
653
+ | `appUrl: string \| null` | URL of the installed app, or null if this is a plain channel |
635
654
 
636
655
  ### Lifecycle
637
656
 
@@ -674,12 +693,14 @@ Objects are plain key/value records. `id` is the only reserved field; everything
674
693
  Find objects using structured filters and/or natural language.
675
694
 
676
695
  - **`where` only** — exact-match filtering, no AI, no credits.
696
+ - **`collection` only** — filter by collection name (shape-based matching), no AI, no credits.
677
697
  - **`prompt` only** — AI-powered semantic query over all objects.
678
698
  - **`where` + `prompt`** — `where` (and `objectIds`) narrow the data set first, then the AI queries within the constrained set.
679
699
 
680
700
  | Option | Description |
681
701
  |--------|-------------|
682
- | `where` | Exact-match field filter (e.g. `{ type: 'article' }`). Values must match literally — no operators or `{{placeholders}}`. When combined with `prompt`, constrains which objects the AI can see. |
702
+ | `where` | Exact-match field filter (e.g. `{ status: 'published' }`). Values must match literally — no operators or `{{placeholders}}`. When combined with `prompt`, constrains which objects the AI can see. |
703
+ | `collection` | Filter by collection name. Only returns objects whose shape matches the named collection. |
683
704
  | `prompt` | Natural language query. Triggers AI evaluation (uses credits). |
684
705
  | `limit` | Maximum number of results. |
685
706
  | `objectIds` | Scope to specific object IDs. Constrains the candidate set in both structured and AI queries. |
@@ -689,9 +710,20 @@ Find objects using structured filters and/or natural language.
689
710
  **Examples:**
690
711
 
691
712
  ```typescript
713
+ // Filter by collection (no AI, no credits)
714
+ const { objects } = await channel.findObjects({
715
+ collection: 'article'
716
+ });
717
+
692
718
  // Exact field matching (no AI, no credits)
693
719
  const { objects } = await channel.findObjects({
694
- where: { type: 'article', status: 'published' }
720
+ where: { status: 'published' }
721
+ });
722
+
723
+ // Combine collection and field filters
724
+ const { objects } = await channel.findObjects({
725
+ collection: 'article',
726
+ where: { status: 'published' }
695
727
  });
696
728
 
697
729
  // Pure natural language query (AI interprets)
@@ -699,9 +731,9 @@ const { objects, message } = await channel.findObjects({
699
731
  prompt: 'articles about space exploration published this year'
700
732
  });
701
733
 
702
- // Combined: where narrows the data, prompt queries within it
734
+ // Combined: collection + where narrow the data, prompt queries within it
703
735
  const { objects } = await channel.findObjects({
704
- where: { type: 'article' },
736
+ collection: 'article',
705
737
  prompt: 'that discuss climate solutions positively',
706
738
  limit: 10
707
739
  });
@@ -739,7 +771,7 @@ Media URLs in object fields are visible to AI. Both uploaded and AI-generated me
739
771
  | Method | Description |
740
772
  |--------|-------------|
741
773
  | `uploadMedia(file): Promise<string>` | Upload file, returns URL |
742
- | `fetchMedia(url): Promise<MediaResponse>` | Fetch any URL, returns headers and blob() method (adds auth for backend URLs, works for external URLs too) |
774
+ | `fetchMedia(url, options?): Promise<MediaResponse>` | Fetch any URL, returns headers and blob() method (adds auth for backend URLs, works for external URLs too). Pass `{ forceProxy: true }` to skip the direct fetch and route through the server proxy immediately. |
743
775
  | `deleteMedia(url): Promise<void>` | Delete media file by URL |
744
776
  | `listMedia(): Promise<MediaInfo[]>` | List all media with metadata |
745
777
 
@@ -856,6 +888,9 @@ channel.on('objectDeleted', ({ objectId, source }) => void)
856
888
  // Space metadata
857
889
  channel.on('metadataUpdated', ({ metadata, source }) => void)
858
890
 
891
+ // Collection schema changed
892
+ channel.on('schemaUpdated', ({ schema, source }) => void)
893
+
859
894
  // Channel updated (fetch with getInteractions())
860
895
  channel.on('channelUpdated', ({ channelId, source }) => void)
861
896
 
@@ -985,7 +1020,7 @@ The `ai` field in interactions distinguishes AI-generated responses from synthet
985
1020
 
986
1021
  ### Tool Calls
987
1022
 
988
- The `toolCalls` array captures what the AI agent did during execution. Use it to build responsive UIs that show progress while the agent works — the `channelUpdated` event fires as each tool completes, letting you display status updates or hints in real-time.
1023
+ The `toolCalls` array captures what the AI agent did during execution. Use it to build responsive UIs that show progress while the agent works — the `channelUpdated` event fires when each tool starts and completes. A tool call without a `result` is still running; once `result` is present, the tool has finished.
989
1024
 
990
1025
  ## Data Types
991
1026
 
@@ -1046,6 +1081,7 @@ interface Channel {
1046
1081
  createdBy: string; // User ID who created the channel
1047
1082
  createdByName?: string; // Display name at time of creation
1048
1083
  systemInstruction?: string; // Custom system instruction for AI
1084
+ appUrl?: string; // URL of installed app (set by installApp)
1049
1085
  interactions: Interaction[]; // Interaction history
1050
1086
  }
1051
1087
 
@@ -1057,6 +1093,7 @@ interface ChannelInfo {
1057
1093
  createdBy: string;
1058
1094
  createdByName: string | null;
1059
1095
  interactionCount: number;
1096
+ appUrl: string | null; // URL of installed app, or null
1060
1097
  }
1061
1098
  ```
1062
1099
 
@@ -1068,9 +1105,11 @@ Note: `Channel` and `ChannelInfo` are data types describing the stored channel m
1068
1105
  interface ToolCall {
1069
1106
  name: string; // Tool name (e.g., "create_object", "update_object", "search_web")
1070
1107
  input: unknown; // Arguments passed to the tool
1071
- result: string; // Truncated result (max 500 chars)
1108
+ result?: string; // Truncated result (absent while tool is running)
1072
1109
  }
1073
1110
 
1111
+ type InteractionStatus = 'pending' | 'streaming' | 'done' | 'error';
1112
+
1074
1113
  interface Interaction {
1075
1114
  id: string; // Unique ID for this interaction
1076
1115
  timestamp: number;
@@ -1078,7 +1117,8 @@ interface Interaction {
1078
1117
  userName?: string | null; // Display name at time of interaction
1079
1118
  operation: 'prompt' | 'createObject' | 'updateObject' | 'deleteObjects';
1080
1119
  input: string; // What the user did: prompt text or action description
1081
- output: string | null; // Result: AI response or confirmation message (null while in-progress)
1120
+ output: string | null; // AI response or confirmation message (may be partial when streaming)
1121
+ status: InteractionStatus; // Lifecycle status (pending → streaming → done/error)
1082
1122
  ai: boolean; // Whether AI was invoked (vs synthetic confirmation)
1083
1123
  modifiedObjectIds: string[]; // Objects affected by this interaction
1084
1124
  toolCalls: ToolCall[]; // Tools called during this interaction (for AI prompts)
package/dist/apps.d.ts CHANGED
@@ -18,7 +18,7 @@ export declare class AppsClient {
18
18
  /**
19
19
  * Publish or update an app.
20
20
  * @param appId - URL-safe identifier for the app
21
- * @param options - App name, bundle (zip file), and optional SPA flag
21
+ * @param options - Bundle zip file (must include index.html and rool-app.json)
22
22
  */
23
23
  publish(appId: string, options: PublishAppOptions): Promise<PublishedAppInfo>;
24
24
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../src/apps.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAmB;gBAErB,MAAM,EAAE,gBAAgB;IAIpC;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAkBzC;;OAEG;IACG,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAsB1D;;;;OAIG;IACG,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA4BnF;;OAEG;IACG,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAe9C"}
1
+ {"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../src/apps.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAmB;gBAErB,MAAM,EAAE,gBAAgB;IAIpC;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAkBzC;;OAEG;IACG,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAsB1D;;;;OAIG;IACG,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAwBnF;;OAEG;IACG,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAe9C"}
package/dist/apps.js CHANGED
@@ -47,7 +47,7 @@ export class AppsClient {
47
47
  /**
48
48
  * Publish or update an app.
49
49
  * @param appId - URL-safe identifier for the app
50
- * @param options - App name, bundle (zip file), and optional SPA flag
50
+ * @param options - Bundle zip file (must include index.html and rool-app.json)
51
51
  */
52
52
  async publish(appId, options) {
53
53
  const tokens = await this.config.authManager.getTokens();
@@ -56,10 +56,6 @@ export class AppsClient {
56
56
  const headers = { Authorization: `Bearer ${tokens.accessToken}`, 'X-Rool-Token': tokens.roolToken };
57
57
  const formData = new FormData();
58
58
  formData.append('bundle', options.bundle);
59
- formData.append('name', options.name);
60
- if (options.spa !== undefined) {
61
- formData.append('spa', String(options.spa));
62
- }
63
59
  const response = await fetch(`${this.config.appsUrl}/${encodeURIComponent(appId)}`, {
64
60
  method: 'POST',
65
61
  headers,
package/dist/apps.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"apps.js","sourceRoot":"","sources":["../src/apps.ts"],"names":[],"mappings":"AAAA,gFAAgF;AA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AC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAC1D,MAAM,YAAY,GAAG,SAAS,CAAC,KAAK,IAAI,GAAG,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC;YACpF,MAAM,IAAI,KAAK,CAAC,0BAA0B,YAAY,EAAE,CAAC,CAAC;QAC5D,CAAC;QAED,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,SAAS,CAAC,KAAa;QAC3B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;QACzD,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAElD,MAAM,OAAO,GAA2B,EAAE,aAAa,EAAE,UAAU,MAAM,CAAC,WAAW,EAAE,EAAE,cAAc,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC;QAE5H,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,kBAAkB,CAAC,KAAK,CAAC,EAAE,EAAE;YAClF,MAAM,EAAE,QAAQ;YAChB,OAAO;SACR,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YAC5C,MAAM,IAAI,KAAK,CAAC,4BAA4B,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;QACxF,CAAC;IACH,CAAC;CACF"}
package/dist/channel.d.ts CHANGED
@@ -20,7 +20,7 @@ export interface ChannelConfig {
20
20
  schema: SpaceSchema;
21
21
  /** Space metadata */
22
22
  meta: Record<string, unknown>;
23
- /** This channel's conversation data (undefined if new) */
23
+ /** This channel's data (undefined if new) */
24
24
  channel: Channel | undefined;
25
25
  /** Channel ID for this channel (required). */
26
26
  channelId: string;
@@ -39,7 +39,7 @@ export interface ChannelConfig {
39
39
  * open a second one.
40
40
  *
41
41
  * Objects are fetched on demand from the server; only schema, metadata,
42
- * and the channel's own conversation are cached locally. Object changes
42
+ * and the channel's own history are cached locally. Object changes
43
43
  * arrive via SSE semantic events and are emitted as SDK events.
44
44
  *
45
45
  * Features:
@@ -65,9 +65,10 @@ export declare class RoolChannel extends EventEmitter<ChannelEvents> {
65
65
  private logger;
66
66
  private _meta;
67
67
  private _schema;
68
- private _conversation;
68
+ private _channel;
69
69
  private _objectIds;
70
70
  private _objectStats;
71
+ private _hasConnected;
71
72
  private _pendingMutations;
72
73
  private _objectResolvers;
73
74
  private _objectBuffer;
@@ -84,6 +85,10 @@ export declare class RoolChannel extends EventEmitter<ChannelEvents> {
84
85
  get linkAccess(): LinkAccess;
85
86
  /** Current user's ID (for identifying own interactions) */
86
87
  get userId(): string;
88
+ /**
89
+ * Get the channel's display name, or null if not set.
90
+ */
91
+ get channelName(): string | null;
87
92
  /**
88
93
  * Get the channel ID for this channel.
89
94
  * Fixed at open time — cannot be changed.
@@ -91,7 +96,11 @@ export declare class RoolChannel extends EventEmitter<ChannelEvents> {
91
96
  get channelId(): string;
92
97
  get isReadOnly(): boolean;
93
98
  /**
94
- * Get interactions for this channel's conversation.
99
+ * Get the app URL if this channel was created via installApp, or null.
100
+ */
101
+ get appUrl(): string | null;
102
+ /**
103
+ * Get interactions for this channel.
95
104
  */
96
105
  getInteractions(): Interaction[];
97
106
  /**
@@ -125,7 +134,7 @@ export declare class RoolChannel extends EventEmitter<ChannelEvents> {
125
134
  */
126
135
  redo(): Promise<boolean>;
127
136
  /**
128
- * Clear checkpoint history for this conversation.
137
+ * Clear checkpoint history for this channel.
129
138
  */
130
139
  clearHistory(): Promise<void>;
131
140
  /**
@@ -150,7 +159,7 @@ export declare class RoolChannel extends EventEmitter<ChannelEvents> {
150
159
  * @param options.limit - Maximum number of results to return (applies to structured filtering only; the AI controls its own result size).
151
160
  * @param options.objectIds - Scope search to specific object IDs. Constrains the candidate set in both structured and AI queries.
152
161
  * @param options.order - Sort order by modifiedAt: `'asc'` or `'desc'` (default: `'desc'`). Only applies to structured filtering (no `prompt`).
153
- * @param options.ephemeral - If true, the query won't be recorded in conversation history.
162
+ * @param options.ephemeral - If true, the query won't be recorded in interaction history.
154
163
  * @returns The matching objects and a descriptive message.
155
164
  */
156
165
  findObjects(options: FindObjectsOptions): Promise<{
@@ -170,7 +179,7 @@ export declare class RoolChannel extends EventEmitter<ChannelEvents> {
170
179
  /**
171
180
  * Create a new object with optional AI generation.
172
181
  * @param options.data - Object data fields (any key-value pairs). Optionally include `id` to use a custom ID. Use {{placeholder}} for AI-generated content. Fields prefixed with _ are hidden from AI.
173
- * @param options.ephemeral - If true, the operation won't be recorded in conversation history.
182
+ * @param options.ephemeral - If true, the operation won't be recorded in interaction history.
174
183
  * @returns The created object (with AI-filled content) and message
175
184
  */
176
185
  createObject(options: CreateObjectOptions): Promise<{
@@ -182,7 +191,7 @@ export declare class RoolChannel extends EventEmitter<ChannelEvents> {
182
191
  * @param objectId - The ID of the object to update
183
192
  * @param options.data - Fields to add or update. Pass null or undefined to delete a field. Use {{placeholder}} for AI-generated content. Fields prefixed with _ are hidden from AI.
184
193
  * @param options.prompt - AI prompt for content editing (optional).
185
- * @param options.ephemeral - If true, the operation won't be recorded in conversation history.
194
+ * @param options.ephemeral - If true, the operation won't be recorded in interaction history.
186
195
  * @returns The updated object (with AI-filled content) and message
187
196
  */
188
197
  updateObject(objectId: string, options: UpdateObjectOptions): Promise<{
@@ -219,12 +228,12 @@ export declare class RoolChannel extends EventEmitter<ChannelEvents> {
219
228
  */
220
229
  dropCollection(name: string): Promise<void>;
221
230
  /**
222
- * Get the system instruction for this channel's conversation.
231
+ * Get the system instruction for this channel.
223
232
  * Returns undefined if no system instruction is set.
224
233
  */
225
234
  getSystemInstruction(): string | undefined;
226
235
  /**
227
- * Set the system instruction for this channel's conversation.
236
+ * Set the system instruction for this channel.
228
237
  * Pass null to clear the instruction.
229
238
  */
230
239
  setSystemInstruction(instruction: string | null): Promise<void>;
@@ -250,7 +259,7 @@ export declare class RoolChannel extends EventEmitter<ChannelEvents> {
250
259
  objects: RoolObject[];
251
260
  }>;
252
261
  /**
253
- * Rename this channel (conversation).
262
+ * Rename this channel.
254
263
  */
255
264
  rename(newName: string): Promise<void>;
256
265
  /**
@@ -267,8 +276,11 @@ export declare class RoolChannel extends EventEmitter<ChannelEvents> {
267
276
  /**
268
277
  * Fetch any URL, returning headers and a blob() method (like fetch Response).
269
278
  * Adds auth headers for backend media URLs, fetches external URLs via server proxy if CORS blocks.
279
+ * Pass `{ forceProxy: true }` to skip the direct fetch and go straight through the server proxy.
270
280
  */
271
- fetchMedia(url: string): Promise<MediaResponse>;
281
+ fetchMedia(url: string, options?: {
282
+ forceProxy?: boolean;
283
+ }): Promise<MediaResponse>;
272
284
  /**
273
285
  * Delete a media file by URL.
274
286
  */
@@ -1 +1 @@
1
- {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,aAAa,EACb,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,SAAS,EACT,aAAa,EAGb,WAAW,EACX,OAAO,EACP,UAAU,EACV,WAAW,EACX,aAAa,EACb,QAAQ,EACT,MAAM,YAAY,CAAC;AAKpB,wBAAgB,gBAAgB,IAAI,MAAM,CAMzC;AAKD,M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