@rool-dev/svelte 0.3.1 → 0.3.2

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
@@ -54,6 +54,9 @@ The Svelte wrapper adds reactive state on top of the SDK:
54
54
  | `rool.userStorage` | User storage (cross-device preferences) |
55
55
  | `channel.interactions` | Channel interactions (auto-updates) |
56
56
  | `channel.objectIds` | All object IDs in the space (auto-updates on create/delete) |
57
+ | `channel.collections` | Collection names from the schema (auto-updates) |
58
+ | `channel.conversations` | Conversations in this channel (auto-updates on create/delete/rename) |
59
+ | `thread.interactions` | Interactions for a specific conversation (auto-updates) |
57
60
  | `watch.objects` | Objects matching a filter (auto-updates) |
58
61
  | `watch.loading` | Whether watch is loading |
59
62
 
@@ -124,9 +127,12 @@ Reactive cross-device storage for user preferences. Synced from server on `init(
124
127
  ### Spaces & Channels
125
128
 
126
129
  ```typescript
127
- // Open a channel — reactive, with SSE
130
+ // Open a channel — reactive, with SSE (default conversation)
128
131
  const channel = await rool.openChannel('space-id', 'my-channel');
129
132
 
133
+ // Open a channel with a specific conversation
134
+ const channel = await rool.openChannel('space-id', 'my-channel', 'thread-1');
135
+
130
136
  // Create a space, then open a channel on it
131
137
  const space = await rool.createSpace('My New Space');
132
138
  const channel = await space.openChannel('main');
@@ -222,7 +228,7 @@ Create auto-updating watches of objects filtered by field values:
222
228
  async function open(spaceId) {
223
229
  channel = await rool.openChannel(spaceId, 'main');
224
230
  // Create a reactive watch of all objects where type === 'article'
225
- articles = channel.watch({ where: { type: 'article' } });
231
+ articles = channel.watch({ collection: 'article' });
226
232
  }
227
233
  </script>
228
234
 
@@ -244,7 +250,8 @@ Watches automatically re-fetch when objects matching the filter are created, upd
244
250
  ```typescript
245
251
  // Watch options (same as findObjects, but no AI prompt)
246
252
  const articles = channel.watch({
247
- where: { type: 'article', status: 'published' },
253
+ collection: 'article',
254
+ where: { status: 'published' },
248
255
  order: 'desc', // by modifiedAt (default)
249
256
  limit: 20,
250
257
  });
@@ -290,6 +297,48 @@ channelList.refresh() // Manual re-fetch
290
297
  channelList.close() // Stop listening for updates
291
298
  ```
292
299
 
300
+ ### Reactive Conversation Handle
301
+
302
+ For apps with multiple independent interaction threads (e.g., chat with threads), use `channel.conversation()` to get a handle with reactive interactions:
303
+
304
+ ```svelte
305
+ <script>
306
+ let channel = $state(null);
307
+ let thread = $state(null);
308
+
309
+ async function openThread(spaceId, threadId) {
310
+ channel = await rool.openChannel(spaceId, 'main');
311
+ thread = channel.conversation(threadId);
312
+ }
313
+ </script>
314
+
315
+ {#if thread}
316
+ {#each thread.interactions as interaction}
317
+ <div>{interaction.output}</div>
318
+ {/each}
319
+
320
+ <button onclick={() => thread.prompt('Hello')}>Send</button>
321
+ {/if}
322
+ ```
323
+
324
+ ```typescript
325
+ // Reactive state
326
+ thread.interactions // $state<Interaction[]> — auto-updates via SSE
327
+
328
+ // All conversation-scoped methods
329
+ await thread.prompt('Hello')
330
+ await thread.createObject({ data: { text: 'Note' } })
331
+ await thread.setSystemInstruction('Respond in haiku')
332
+ await thread.rename('Research Thread')
333
+ thread.getInteractions() // Manual read
334
+ thread.getSystemInstruction()
335
+
336
+ // Cleanup
337
+ thread.close() // Stop listening for updates
338
+ ```
339
+
340
+ Conversations are auto-created on first interaction. All conversations share one SSE connection per channel.
341
+
293
342
  ### Channel Management
294
343
 
295
344
  ```typescript
@@ -316,10 +365,10 @@ channel.channelId
316
365
 
317
366
  // Object operations
318
367
  await channel.getObject(id)
319
- await channel.createObject({ data: { type: 'note', text: 'Hello' } })
368
+ await channel.createObject({ data: { text: 'Hello' } })
320
369
  await channel.updateObject(id, { data: { text: 'Updated' } })
321
370
  await channel.deleteObjects([id])
322
- await channel.findObjects({ where: { type: 'note' } })
371
+ await channel.findObjects({ collection: 'note' })
323
372
 
324
373
  // AI
325
374
  await channel.prompt('Summarize everything')
@@ -338,9 +387,18 @@ await channel.checkpoint('Before edit')
338
387
  await channel.undo()
339
388
  await channel.redo()
340
389
 
341
- // Interaction history
390
+ // Interaction history & conversations
342
391
  await channel.setSystemInstruction('You are helpful')
343
392
  channel.getInteractions()
393
+ channel.getConversations()
394
+ await channel.deleteConversation('old-thread')
395
+ await channel.renameConversation('Research')
396
+
397
+ // Conversation handles (reactive interactions for specific conversations)
398
+ const thread = channel.conversation('thread-42');
399
+ await thread.prompt('Hello'); // Uses thread-42's interaction history
400
+ // thread.interactions is reactive $state — auto-updates via SSE
401
+ thread.close(); // Stop listening when done
344
402
 
345
403
  // Channel admin
346
404
  await channel.rename('New Name')
@@ -361,10 +419,12 @@ const id = generateId();
361
419
 
362
420
  ```typescript
363
421
  // Package types
364
- import type { Rool, ReactiveChannel, ReactiveObject, ReactiveWatch, WatchOptions, ReactiveChannelList } from '@rool-dev/svelte';
422
+ import type { Rool, ReactiveChannel, ReactiveConversationHandle, ReactiveObject, ReactiveWatch, WatchOptions, ReactiveChannelList } from '@rool-dev/svelte';
365
423
 
366
424
  // Re-exported from @rool-dev/sdk
367
425
  import type {
426
+ RoolClient,
427
+ RoolClientConfig,
368
428
  RoolChannel,
369
429
  RoolSpace,
370
430
  RoolSpaceInfo,
@@ -373,6 +433,9 @@ import type {
373
433
  RoolUserRole,
374
434
  ConnectionState,
375
435
  ChannelInfo,
436
+ Conversation,
437
+ ConversationInfo,
438
+ CurrentUser,
376
439
  Interaction,
377
440
  FindObjectsOptions,
378
441
  PromptOptions,
@@ -382,6 +445,12 @@ import type {
382
445
  FieldDef,
383
446
  CollectionDef,
384
447
  SpaceSchema,
448
+ SpaceMember,
449
+ UserResult,
450
+ PublishedAppInfo,
451
+ PublishAppOptions,
452
+ AppManifest,
453
+ FindAppsOptions,
385
454
  } from '@rool-dev/svelte';
386
455
  ```
387
456
 
@@ -1,4 +1,4 @@
1
- import type { RoolChannel, RoolClient, Interaction, RoolObject, ChannelInfo } from '@rool-dev/sdk';
1
+ import type { RoolChannel, RoolClient, Interaction, RoolObject, ChannelInfo, ConversationInfo, ConversationHandle } from '@rool-dev/sdk';
2
2
  /**
3
3
  * Options for creating a reactive watch.
4
4
  * Same as FindObjectsOptions but without `prompt` (AI queries are too slow for reactive updates).
@@ -6,6 +6,8 @@ import type { RoolChannel, RoolClient, Interaction, RoolObject, ChannelInfo } fr
6
6
  export interface WatchOptions {
7
7
  /** Field requirements for exact matching */
8
8
  where?: Record<string, unknown>;
9
+ /** Filter by collection name. Only returns objects whose shape matches the named collection. */
10
+ collection?: string;
9
11
  /** Maximum number of objects */
10
12
  limit?: number;
11
13
  /** Sort order by modifiedAt: 'asc' or 'desc' (default: 'desc') */
@@ -47,6 +49,48 @@ declare class ReactiveObjectImpl {
47
49
  close(): void;
48
50
  }
49
51
  export type ReactiveObject = ReactiveObjectImpl;
52
+ /**
53
+ * A reactive conversation handle that auto-updates interactions when the
54
+ * conversation changes. Wraps the SDK's ConversationHandle with $state.
55
+ *
56
+ * Call `close()` when done to stop listening for updates.
57
+ */
58
+ declare class ReactiveConversationHandleImpl {
59
+ #private;
60
+ interactions: Interaction[];
61
+ constructor(channel: RoolChannel, conversationId: string);
62
+ get conversationId(): string;
63
+ getInteractions(): Interaction[];
64
+ getSystemInstruction(): string | undefined;
65
+ setSystemInstruction(...args: Parameters<ConversationHandle['setSystemInstruction']>): Promise<void>;
66
+ rename(...args: Parameters<ConversationHandle['rename']>): Promise<void>;
67
+ findObjects(...args: Parameters<ConversationHandle['findObjects']>): Promise<{
68
+ objects: RoolObject[];
69
+ message: string;
70
+ }>;
71
+ createObject(...args: Parameters<ConversationHandle['createObject']>): Promise<{
72
+ object: RoolObject;
73
+ message: string;
74
+ }>;
75
+ updateObject(...args: Parameters<ConversationHandle['updateObject']>): Promise<{
76
+ object: RoolObject;
77
+ message: string;
78
+ }>;
79
+ deleteObjects(...args: Parameters<ConversationHandle['deleteObjects']>): Promise<void>;
80
+ prompt(...args: Parameters<ConversationHandle['prompt']>): Promise<{
81
+ message: string;
82
+ objects: RoolObject[];
83
+ }>;
84
+ createCollection(...args: Parameters<ConversationHandle['createCollection']>): Promise<import("@rool-dev/sdk").CollectionDef>;
85
+ alterCollection(...args: Parameters<ConversationHandle['alterCollection']>): Promise<import("@rool-dev/sdk").CollectionDef>;
86
+ dropCollection(...args: Parameters<ConversationHandle['dropCollection']>): Promise<void>;
87
+ setMetadata(...args: Parameters<ConversationHandle['setMetadata']>): void;
88
+ /**
89
+ * Stop listening for updates and clean up.
90
+ */
91
+ close(): void;
92
+ }
93
+ export type ReactiveConversationHandle = ReactiveConversationHandleImpl;
50
94
  /**
51
95
  * Minimal wrapper that adds reactive `interactions` to RoolChannel.
52
96
  * All other properties and methods are proxied to the underlying channel.
@@ -55,6 +99,8 @@ declare class ReactiveChannelImpl {
55
99
  #private;
56
100
  interactions: Interaction[];
57
101
  objectIds: string[];
102
+ collections: string[];
103
+ conversations: ConversationInfo[];
58
104
  constructor(channel: RoolChannel);
59
105
  get id(): string;
60
106
  get name(): string;
@@ -64,6 +110,7 @@ declare class ReactiveChannelImpl {
64
110
  get channelName(): string | null;
65
111
  get isReadOnly(): boolean;
66
112
  get linkAccess(): import("@rool-dev/sdk").LinkAccess;
113
+ get appUrl(): string | null;
67
114
  close(): void;
68
115
  getObject(...args: Parameters<RoolChannel['getObject']>): Promise<RoolObject | undefined>;
69
116
  stat(...args: Parameters<RoolChannel['stat']>): import("@rool-dev/sdk").RoolObjectStat | undefined;
@@ -97,6 +144,9 @@ declare class ReactiveChannelImpl {
97
144
  getInteractions(): Interaction[];
98
145
  getSystemInstruction(): string | undefined;
99
146
  setSystemInstruction(...args: Parameters<RoolChannel['setSystemInstruction']>): Promise<void>;
147
+ getConversations(): ConversationInfo[];
148
+ deleteConversation(...args: Parameters<RoolChannel['deleteConversation']>): Promise<void>;
149
+ renameConversation(...args: Parameters<RoolChannel['renameConversation']>): Promise<void>;
100
150
  getSchema(): import("@rool-dev/sdk").SpaceSchema;
101
151
  createCollection(...args: Parameters<RoolChannel['createCollection']>): Promise<import("@rool-dev/sdk").CollectionDef>;
102
152
  alterCollection(...args: Parameters<RoolChannel['alterCollection']>): Promise<import("@rool-dev/sdk").CollectionDef>;
@@ -106,6 +156,7 @@ declare class ReactiveChannelImpl {
106
156
  deleteMedia(...args: Parameters<RoolChannel['deleteMedia']>): Promise<void>;
107
157
  listMedia(): Promise<import("@rool-dev/sdk").MediaInfo[]>;
108
158
  rename(...args: Parameters<RoolChannel['rename']>): Promise<void>;
159
+ conversation(conversationId: string): ReactiveConversationHandle;
109
160
  on(...args: Parameters<RoolChannel['on']>): () => void;
110
161
  off(...args: Parameters<RoolChannel['off']>): void;
111
162
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"channel.svelte.d.ts","sourceRoot":"","sources":["../src/channel.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAsB,WAAW,EAAE,MAAM,eAAe,CAAC;AAEvH;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACxB;AAGD;;GAEG;AACH,cAAM,iBAAiB;;IAOrB,OAAO,eAA4B;IACnC,OAAO,UAAgB;gBAEX,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY;IAiFvD;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAiB9B;;OAEG;IACH,KAAK,IAAI,IAAI;CAId;AAED,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAE9C;;GAEG;AACH,cAAM,kBAAkB;;IAMtB,IAAI,yBAA6C;IACjD,OAAO,UAAgB;gBAEX,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM;IA2ClD;;OAEG;IACG,OAAO,IAAI,OAAO,CAA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CAAC,IAAI,CAAC,CAAC;IACzC,GAAG,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAI3C;;;OAGG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc;IAKxC;;;OAGG;IACH,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,aAAa;CAK5C;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,eAAe,CAEjE;AAED,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAElD;;GAEG;AACH,cAAM,uBAAuB;;IAM3B,IAAI,gBAA6B;IACjC,OAAO,UAAgB;gBAEX,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM;IAmC/C;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAU9B;;OAEG;IACH,KAAK,IAAI,IAAI;CAId;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,mBAAmB,CAE1F;AAED,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,CAAC"}
@@ -77,6 +77,9 @@ class ReactiveWatchImpl {
77
77
  * Check if an object matches the `where` filter.
78
78
  */
79
79
  #matches(object) {
80
+ // Collection membership is shape-based and resolved server-side — can't match locally
81
+ if (this.#options.collection)
82
+ return true;
80
83
  const where = this.#options.where;
81
84
  if (!where)
82
85
  return true;
@@ -94,6 +97,7 @@ class ReactiveWatchImpl {
94
97
  try {
95
98
  const findOptions = {
96
99
  where: this.#options.where,
100
+ collection: this.#options.collection,
97
101
  limit: this.#options.limit,
98
102
  order: this.#options.order,
99
103
  ephemeral: true, // Don't pollute interaction history
@@ -183,6 +187,69 @@ class ReactiveObjectImpl {
183
187
  this.#unsubscribers.length = 0;
184
188
  }
185
189
  }
190
+ // ---------------------------------------------------------------------------
191
+ // ReactiveConversationHandle
192
+ // ---------------------------------------------------------------------------
193
+ /**
194
+ * A reactive conversation handle that auto-updates interactions when the
195
+ * conversation changes. Wraps the SDK's ConversationHandle with $state.
196
+ *
197
+ * Call `close()` when done to stop listening for updates.
198
+ */
199
+ class ReactiveConversationHandleImpl {
200
+ #handle;
201
+ #conversationId;
202
+ #unsubscribers = [];
203
+ // Reactive state
204
+ interactions = $state([]);
205
+ constructor(channel, conversationId) {
206
+ this.#conversationId = conversationId;
207
+ this.#handle = channel.conversation(conversationId);
208
+ // Initial load
209
+ this.interactions = this.#handle.getInteractions();
210
+ // Listen for updates to this conversation
211
+ const onConversationUpdated = (event) => {
212
+ if (event.conversationId === this.#conversationId) {
213
+ this.interactions = this.#handle.getInteractions();
214
+ }
215
+ };
216
+ channel.on('conversationUpdated', onConversationUpdated);
217
+ this.#unsubscribers.push(() => channel.off('conversationUpdated', onConversationUpdated));
218
+ // Handle full resets
219
+ const onReset = () => {
220
+ this.interactions = this.#handle.getInteractions();
221
+ };
222
+ channel.on('reset', onReset);
223
+ this.#unsubscribers.push(() => channel.off('reset', onReset));
224
+ }
225
+ get conversationId() { return this.#conversationId; }
226
+ // Conversation history
227
+ getInteractions() { return this.#handle.getInteractions(); }
228
+ getSystemInstruction() { return this.#handle.getSystemInstruction(); }
229
+ setSystemInstruction(...args) { return this.#handle.setSystemInstruction(...args); }
230
+ rename(...args) { return this.#handle.rename(...args); }
231
+ // Object operations
232
+ findObjects(...args) { return this.#handle.findObjects(...args); }
233
+ createObject(...args) { return this.#handle.createObject(...args); }
234
+ updateObject(...args) { return this.#handle.updateObject(...args); }
235
+ deleteObjects(...args) { return this.#handle.deleteObjects(...args); }
236
+ // AI
237
+ prompt(...args) { return this.#handle.prompt(...args); }
238
+ // Schema
239
+ createCollection(...args) { return this.#handle.createCollection(...args); }
240
+ alterCollection(...args) { return this.#handle.alterCollection(...args); }
241
+ dropCollection(...args) { return this.#handle.dropCollection(...args); }
242
+ // Metadata
243
+ setMetadata(...args) { return this.#handle.setMetadata(...args); }
244
+ /**
245
+ * Stop listening for updates and clean up.
246
+ */
247
+ close() {
248
+ for (const unsub of this.#unsubscribers)
249
+ unsub();
250
+ this.#unsubscribers.length = 0;
251
+ }
252
+ }
186
253
  /**
187
254
  * Minimal wrapper that adds reactive `interactions` to RoolChannel.
188
255
  * All other properties and methods are proxied to the underlying channel.
@@ -194,16 +261,26 @@ class ReactiveChannelImpl {
194
261
  // Reactive state
195
262
  interactions = $state([]);
196
263
  objectIds = $state([]);
264
+ collections = $state([]);
265
+ conversations = $state([]);
197
266
  constructor(channel) {
198
267
  this.#channel = channel;
199
268
  this.interactions = channel.getInteractions();
200
269
  this.objectIds = channel.getObjectIds();
201
- // Subscribe to channel updates
270
+ this.collections = Object.keys(channel.getSchema());
271
+ this.conversations = channel.getConversations();
272
+ // Subscribe to channel updates → refresh interactions
202
273
  const onChannelUpdated = () => {
203
274
  this.interactions = channel.getInteractions();
204
275
  };
205
276
  channel.on('channelUpdated', onChannelUpdated);
206
277
  this.#unsubscribers.push(() => channel.off('channelUpdated', onChannelUpdated));
278
+ // Subscribe to conversation updates → refresh conversations
279
+ const onConversationUpdated = () => {
280
+ this.conversations = channel.getConversations();
281
+ };
282
+ channel.on('conversationUpdated', onConversationUpdated);
283
+ this.#unsubscribers.push(() => channel.off('conversationUpdated', onConversationUpdated));
207
284
  // Subscribe to object events for objectIds
208
285
  const refreshObjectIds = () => {
209
286
  this.objectIds = channel.getObjectIds();
@@ -212,9 +289,17 @@ class ReactiveChannelImpl {
212
289
  this.#unsubscribers.push(() => channel.off('objectCreated', refreshObjectIds));
213
290
  channel.on('objectDeleted', refreshObjectIds);
214
291
  this.#unsubscribers.push(() => channel.off('objectDeleted', refreshObjectIds));
292
+ // Subscribe to schema updates for collections
293
+ const onSchemaUpdated = () => {
294
+ this.collections = Object.keys(channel.getSchema());
295
+ };
296
+ channel.on('schemaUpdated', onSchemaUpdated);
297
+ this.#unsubscribers.push(() => channel.off('schemaUpdated', onSchemaUpdated));
215
298
  const onReset = () => {
216
299
  this.interactions = channel.getInteractions();
217
300
  this.objectIds = channel.getObjectIds();
301
+ this.collections = Object.keys(channel.getSchema());
302
+ this.conversations = channel.getConversations();
218
303
  };
219
304
  channel.on('reset', onReset);
220
305
  this.#unsubscribers.push(() => channel.off('reset', onReset));
@@ -228,6 +313,7 @@ class ReactiveChannelImpl {
228
313
  get channelName() { return this.#channel.channelName; }
229
314
  get isReadOnly() { return this.#channel.isReadOnly; }
230
315
  get linkAccess() { return this.#channel.linkAccess; }
316
+ get appUrl() { return this.#channel.appUrl; }
231
317
  // Proxy all methods
232
318
  close() {
233
319
  this.#closed = true;
@@ -261,6 +347,9 @@ class ReactiveChannelImpl {
261
347
  getInteractions() { return this.#channel.getInteractions(); }
262
348
  getSystemInstruction() { return this.#channel.getSystemInstruction(); }
263
349
  setSystemInstruction(...args) { return this.#channel.setSystemInstruction(...args); }
350
+ getConversations() { return this.#channel.getConversations(); }
351
+ deleteConversation(...args) { return this.#channel.deleteConversation(...args); }
352
+ renameConversation(...args) { return this.#channel.renameConversation(...args); }
264
353
  // Schema
265
354
  getSchema() { return this.#channel.getSchema(); }
266
355
  createCollection(...args) { return this.#channel.createCollection(...args); }
@@ -273,6 +362,12 @@ class ReactiveChannelImpl {
273
362
  listMedia() { return this.#channel.listMedia(); }
274
363
  // Channel admin
275
364
  rename(...args) { return this.#channel.rename(...args); }
365
+ // Conversations
366
+ conversation(conversationId) {
367
+ if (this.#closed)
368
+ throw new Error('Cannot create reactive conversation: channel is closed');
369
+ return new ReactiveConversationHandleImpl(this.#channel, conversationId);
370
+ }
276
371
  // Events
277
372
  on(...args) { return this.#channel.on(...args); }
278
373
  off(...args) { return this.#channel.off(...args); }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { createRool, generateId } from './rool.svelte.js';
2
2
  export { wrapChannel } from './channel.svelte.js';
3
3
  export type { Rool } from './rool.svelte.js';
4
- export type { ReactiveChannel, ReactiveObject, ReactiveWatch, ReactiveChannelList, WatchOptions } from './channel.svelte.js';
5
- export type { RoolClientConfig, RoolChannel, RoolSpace, RoolSpaceInfo, RoolObject, RoolObjectStat, RoolUserRole, ConnectionState, ChannelInfo, CurrentUser, Interaction, FindObjectsOptions, PromptOptions, CreateObjectOptions, UpdateObjectOptions, FieldType, FieldDef, CollectionDef, SpaceSchema, SpaceMember, UserResult, RoolClient, } from '@rool-dev/sdk';
4
+ export type { ReactiveChannel, ReactiveConversationHandle, ReactiveObject, ReactiveWatch, ReactiveChannelList, WatchOptions } from './channel.svelte.js';
5
+ export type { RoolClientConfig, RoolChannel, RoolSpace, RoolSpaceInfo, RoolObject, RoolObjectStat, RoolUserRole, ConnectionState, ChannelInfo, Conversation, ConversationInfo, CurrentUser, Interaction, FindObjectsOptions, PromptOptions, CreateObjectOptions, UpdateObjectOptions, FieldType, FieldDef, CollectionDef, SpaceSchema, SpaceMember, UserResult, RoolClient, PublishedAppInfo, PublishAppOptions, AppManifest, FindAppsOptions, } from '@rool-dev/sdk';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG1D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAG7H,YAAY,EACV,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,aAAa,EACb,UAAU,EACV,cAAc,EACd,YAAY,EACZ,eAAe,EACf,WAAW,EACX,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,SAAS,EACT,QAAQ,EACR,aAAa,EACb,WAAW,EACX,WAAW,EACX,UAAU,EACV,UAAU,GACX,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG1D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,0BAA0B,EAAE,cAAc,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGzJ,YAAY,EACV,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,aAAa,EACb,UAAU,EACV,cAAc,EACd,YAAY,EACZ,eAAe,EACf,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,SAAS,EACT,QAAQ,EACR,aAAa,EACb,WAAW,EACX,WAAW,EACX,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,eAAe,GAChB,MAAM,eAAe,CAAC"}
@@ -1,4 +1,4 @@
1
- import { RoolClient, type RoolSpace, type RoolSpaceInfo, type ConnectionState, type RoolClientConfig, type CurrentUser } from '@rool-dev/sdk';
1
+ import { RoolClient, type RoolSpace, type RoolSpaceInfo, type ConnectionState, type RoolClientConfig, type CurrentUser, type FindAppsOptions, type PublishedAppInfo, type PublishAppOptions } from '@rool-dev/sdk';
2
2
  import { type ReactiveChannel, type ReactiveChannelList } from './channel.svelte.js';
3
3
  /**
4
4
  * Rool client with reactive state for Svelte 5.
@@ -90,6 +90,33 @@ declare class RoolImpl {
90
90
  * Delete a channel from a space.
91
91
  */
92
92
  deleteChannel(spaceId: string, channelId: string): Promise<void>;
93
+ /**
94
+ * Search for public apps. With a query, performs semantic search.
95
+ * Without a query, returns all public apps sorted by most recently updated.
96
+ */
97
+ findApps(options?: FindAppsOptions): Promise<PublishedAppInfo[]>;
98
+ /**
99
+ * Install an app into a space.
100
+ * Creates/updates a channel with the app's manifest settings.
101
+ * Returns the channel ID.
102
+ */
103
+ installApp(spaceId: string, appId: string, channelId?: string): Promise<string>;
104
+ /**
105
+ * Publish or update an app.
106
+ */
107
+ publishApp(appId: string, options: PublishAppOptions): Promise<PublishedAppInfo>;
108
+ /**
109
+ * Unpublish an app.
110
+ */
111
+ unpublishApp(appId: string): Promise<void>;
112
+ /**
113
+ * List the current user's published apps.
114
+ */
115
+ listApps(): Promise<PublishedAppInfo[]>;
116
+ /**
117
+ * Get info for a specific published app.
118
+ */
119
+ getAppInfo(appId: string): Promise<PublishedAppInfo | null>;
93
120
  /**
94
121
  * Create a reactive channel list for a space.
95
122
  * Auto-updates when channels are created, renamed, or deleted.
@@ -1 +1 @@
1
- {"version":3,"file":"rool.svelte.d.ts","sourceRoot":"","sources":["../src/rool.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAC9I,OAAO,EAAkC,KAAK,eAAe,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAErH;;;;;;;;GAQG;AACH,cAAM,QAAQ;;IAMZ,aAAa,iBAAgC;IAC7C,MAAM,8BAAkD;IACxD,aAAa,UAAiB;IAC9B,WAAW,eAA8B;IACzC,eAAe,kBAA2C;IAC1D,WAAW,0BAAuC;IAClD,WAAW,qBAAoC;gBAEnC,MAAM,CAAC,EAAE,gBAAgB;IAKrC;;;OAGG;IACH,IAAI,MAAM,IAAI,UAAU,CAEvB;IAwDD;;;OAGG;IACG,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;IAW9B;;OAEG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI5B;;O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AC,EAAE,gBAAgB,GAAG,IAAI,CAE1D;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED,MAAM,MAAM,IAAI,GAAG,QAAQ,CAAC"}
@@ -194,6 +194,45 @@ class RoolImpl {
194
194
  deleteChannel(spaceId, channelId) {
195
195
  return this.#client.deleteChannel(spaceId, channelId);
196
196
  }
197
+ /**
198
+ * Search for public apps. With a query, performs semantic search.
199
+ * Without a query, returns all public apps sorted by most recently updated.
200
+ */
201
+ findApps(options) {
202
+ return this.#client.findApps(options);
203
+ }
204
+ /**
205
+ * Install an app into a space.
206
+ * Creates/updates a channel with the app's manifest settings.
207
+ * Returns the channel ID.
208
+ */
209
+ installApp(spaceId, appId, channelId) {
210
+ return this.#client.installApp(spaceId, appId, channelId);
211
+ }
212
+ /**
213
+ * Publish or update an app.
214
+ */
215
+ publishApp(appId, options) {
216
+ return this.#client.publishApp(appId, options);
217
+ }
218
+ /**
219
+ * Unpublish an app.
220
+ */
221
+ unpublishApp(appId) {
222
+ return this.#client.unpublishApp(appId);
223
+ }
224
+ /**
225
+ * List the current user's published apps.
226
+ */
227
+ listApps() {
228
+ return this.#client.listApps();
229
+ }
230
+ /**
231
+ * Get info for a specific published app.
232
+ */
233
+ getAppInfo(appId) {
234
+ return this.#client.getAppInfo(appId);
235
+ }
197
236
  /**
198
237
  * Create a reactive channel list for a space.
199
238
  * Auto-updates when channels are created, renamed, or deleted.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rool-dev/svelte",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Svelte 5 runes for Rool Spaces",
5
5
  "type": "module",
6
6
  "svelte": "./dist/index.js",
@@ -41,15 +41,15 @@
41
41
  },
42
42
  "license": "MIT",
43
43
  "dependencies": {
44
- "@rool-dev/sdk": "0.3.1"
44
+ "@rool-dev/sdk": "0.3.2"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "svelte": "^5.0.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@sveltejs/package": "^2.0.0",
51
- "svelte": "^5.0.0",
52
- "svelte-check": "^4.0.0",
50
+ "@sveltejs/package": "^2.5.7",
51
+ "svelte": "^5.54.0",
52
+ "svelte-check": "^4.4.5",
53
53
  "typescript": "^5.9.3"
54
54
  },
55
55
  "scripts": {