@getmodus/sdk 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  validateChatModel,
30
30
  validateId,
31
31
  validatePageSize
32
- } from "./chunk-JMFT5KO5.js";
32
+ } from "./chunk-SP4UYRYG.js";
33
33
 
34
34
  // src/_agent_run_request.ts
35
35
  import { randomUUID } from "crypto";
@@ -309,6 +309,64 @@ function conversationSkillId(item) {
309
309
  return item.scopeId;
310
310
  }
311
311
 
312
+ // src/_generated/resources/consumption/workflows.ts
313
+ var WorkflowsResourceBase = class {
314
+ /** @internal */
315
+ constructor(http, config) {
316
+ this.http = http;
317
+ this.config = config;
318
+ }
319
+ /**
320
+ * List workflows.
321
+ *
322
+ * Returns a paginated page of workflows the caller can at least `use`. Workflows the caller
323
+ * cannot see are filtered out. Pagination uses an opaque token returned in `nextPageToken`.
324
+ *
325
+ * **Requires:** `workflows:read`
326
+ *
327
+ * @param options.pageSize - Items per page. Defaults to 25.
328
+ * @param options.pageToken - Opaque page token from a previous response's `nextPageToken`. Omit
329
+ * for the first page.
330
+ * @param options.search - Case-insensitive substring filter on workflow name.
331
+ * @param options.type - Filter by workflow type.
332
+ * @param options.view - Variation view. `active` reads deployed; `draft` reads the latest builder
333
+ * snapshot.
334
+ * @param options.includeVariation - Include the requested variation payload (`trigger`,
335
+ * `workflowStructure`, `agentSelection`) on list rows.
336
+ * @returns A page of workflows.
337
+ *
338
+ * @example
339
+ * ```ts
340
+ * for await (const wf of (await client.workflows.list({ search: 'digest' })).autoPagingIter()) {
341
+ * console.log(wf.id, wf.name, wf.status)
342
+ * }
343
+ * ```
344
+ */
345
+ list(options = {}) {
346
+ const pageSize = options.pageSize ?? 25;
347
+ validatePageSize(pageSize);
348
+ return this.listPage(pageSize, options.pageToken, options.search, options.type, options.view, options.includeVariation);
349
+ }
350
+ async listPage(pageSize, pageToken, search, type, view, includeVariation) {
351
+ const extra = {};
352
+ if (search !== void 0) extra.search = search;
353
+ if (type !== void 0) extra.type = type;
354
+ if (view !== void 0) extra.view = view;
355
+ if (includeVariation !== void 0) extra.includeVariation = includeVariation;
356
+ const data = asRecord(
357
+ await invokeWithRetry(this.config, this.http, "WorkflowsController_list", {
358
+ query: aipListParams(pageSize, pageToken, extra)
359
+ })
360
+ );
361
+ return buildAipPage(
362
+ data,
363
+ "workflows",
364
+ (raw) => raw,
365
+ (token) => this.listPage(pageSize, token, search, type, view, includeVariation)
366
+ );
367
+ }
368
+ };
369
+
312
370
  // src/resources/workflows/runs.ts
313
371
  import { randomUUID as randomUUID2 } from "crypto";
314
372
  var RUNS_MAX_PAGE_SIZE = 100;
@@ -734,75 +792,16 @@ var AgentWorkflowActionsResource = class {
734
792
  };
735
793
 
736
794
  // src/resources/workflows.ts
737
- function workflowsListParams(pageSize, pageToken, search, type, view, includeVariation) {
738
- const extra = {};
739
- if (search !== void 0) extra.search = search;
740
- if (type !== void 0) extra.type = type;
741
- if (view !== void 0) extra.view = view;
742
- if (includeVariation !== void 0) extra.includeVariation = includeVariation;
743
- return aipListParams(pageSize, pageToken, extra);
744
- }
745
795
  function parseWorkflow(raw) {
746
796
  return raw;
747
797
  }
748
- var WorkflowsResource = class {
798
+ var WorkflowsResource = class extends WorkflowsResourceBase {
749
799
  /** @internal */
750
800
  constructor(http, config) {
751
- this.http = http;
752
- this.config = config;
801
+ super(http, config);
753
802
  this.runs = new WorkflowRunsResource(http, config);
754
803
  this.workflowActions = new AgentWorkflowActionsResource(http, config);
755
804
  }
756
- /**
757
- * List workflows in the organisation.
758
- *
759
- * @param options.pageSize - Maximum items per page (default 25).
760
- * @param options.pageToken - Opaque token from a previous page.
761
- * @param options.search - Case-insensitive substring filter on the workflow name.
762
- * @param options.type - Workflow kind: `"task"` or `"workflow"`.
763
- * @param options.view - Which saved version to return (`active` or `draft`).
764
- * @param options.includeVariation - Include variation metadata when supported.
765
- * @returns A page of workflows — use `.autoPagingIter()` for all pages.
766
- *
767
- * @example
768
- * ```ts
769
- * for await (const wf of (await client.workflows.list({ search: 'digest' })).autoPagingIter()) {
770
- * console.log(wf.id, wf.name, wf.status)
771
- * }
772
- * ```
773
- */
774
- list(options = {}) {
775
- const pageSize = options.pageSize ?? 25;
776
- validatePageSize(pageSize);
777
- return this.listPage(
778
- pageSize,
779
- options.pageToken,
780
- options.search,
781
- options.type,
782
- options.view,
783
- options.includeVariation
784
- );
785
- }
786
- async listPage(pageSize, pageToken, search, type, view, includeVariation) {
787
- const data = asRecord(
788
- await invokeWithRetry(this.config, this.http, "WorkflowsController_list", {
789
- query: workflowsListParams(
790
- pageSize,
791
- pageToken,
792
- search,
793
- type,
794
- view,
795
- includeVariation
796
- )
797
- })
798
- );
799
- return buildAipPage(
800
- data,
801
- "workflows",
802
- parseWorkflow,
803
- (token) => this.listPage(pageSize, token, search, type, view, includeVariation)
804
- );
805
- }
806
805
  /**
807
806
  * Retrieve a workflow by ID or slug.
808
807
  *
@@ -833,27 +832,26 @@ var WorkflowsResource = class {
833
832
  }
834
833
  };
835
834
 
836
- // src/resources/connections.ts
837
- function connectionsListParams(pageSize, pageToken, type) {
838
- const extra = {};
839
- if (type !== void 0) extra.type = type;
840
- return aipListParams(pageSize, pageToken, extra);
841
- }
842
- function parseConnection(raw) {
843
- return raw;
844
- }
845
- var ConnectionsResource = class {
835
+ // src/_generated/resources/consumption/connections.ts
836
+ var ConnectionsResourceBase = class {
846
837
  /** @internal */
847
838
  constructor(http, config) {
848
839
  this.http = http;
849
840
  this.config = config;
850
841
  }
851
842
  /**
852
- * List integration connections.
843
+ * List connections.
853
844
  *
854
- * @param options.pageSize - Maximum items per page (default 25).
855
- * @param options.pageToken - Opaque token from a previous page.
856
- * @param options.type - Integration category; exact match filter.
845
+ * Returns a paginated page of warehouse and SaaS integration connections the caller can `use`.
846
+ * Connections the caller cannot access are filtered out. Use the returned `id` when creating
847
+ * saved-query context items. Pagination uses an opaque token returned in `nextPageToken`.
848
+ *
849
+ * **Requires:** `context:read`
850
+ *
851
+ * @param options.pageSize - Items per page. Defaults to 25.
852
+ * @param options.pageToken - Opaque page token from a previous response's `nextPageToken`. Omit
853
+ * for the first page.
854
+ * @param options.type - Filter by effective integration category (case-sensitive exact match).
857
855
  * @returns A page of connections.
858
856
  */
859
857
  list(options = {}) {
@@ -862,18 +860,24 @@ var ConnectionsResource = class {
862
860
  return this.listPage(pageSize, options.pageToken, options.type);
863
861
  }
864
862
  async listPage(pageSize, pageToken, type) {
863
+ const extra = {};
864
+ if (type !== void 0) extra.type = type;
865
865
  const data = asRecord(
866
866
  await invokeWithRetry(this.config, this.http, "ConnectionsController_list", {
867
- query: connectionsListParams(pageSize, pageToken, type)
867
+ query: aipListParams(pageSize, pageToken, extra)
868
868
  })
869
869
  );
870
870
  return buildAipPage(
871
871
  data,
872
872
  "connections",
873
- parseConnection,
873
+ (raw) => raw,
874
874
  (token) => this.listPage(pageSize, token, type)
875
875
  );
876
876
  }
877
+ };
878
+
879
+ // src/resources/connections.ts
880
+ var ConnectionsResource = class extends ConnectionsResourceBase {
877
881
  /**
878
882
  * Find the first connection whose name matches (case-insensitive).
879
883
  *
@@ -898,12 +902,67 @@ var ConnectionsResource = class {
898
902
  } while (token !== void 0);
899
903
  return void 0;
900
904
  }
905
+ /**
906
+ * List the selectable units on a connection (a repository, a schema, a project).
907
+ *
908
+ * @param connectionId - Connection id.
909
+ * @param options.pageSize - Maximum items per page (default 25).
910
+ * @param options.pageToken - Opaque token from a previous page.
911
+ * @returns A page of selectable units — use {@link iterSelections} or `.autoPagingIter()` for every page.
912
+ * @example
913
+ * for await (const unit of client.connections.iterSelections('7a3f9d2c-1111-4000-a000-000000000abc')) {
914
+ * console.log(unit.objectType, unit.path)
915
+ * }
916
+ */
917
+ listSelections(connectionId, options = {}) {
918
+ validateId(connectionId, "connection_id");
919
+ const pageSize = options.pageSize ?? 25;
920
+ validatePageSize(pageSize);
921
+ return this.listSelectionsPage(connectionId, pageSize, options.pageToken);
922
+ }
923
+ async listSelectionsPage(connectionId, pageSize, pageToken) {
924
+ const data = asRecord(
925
+ await invokeWithRetry(this.config, this.http, "ConnectionsController_listSelections", {
926
+ pathParams: { connectionId },
927
+ query: aipListParams(pageSize, pageToken)
928
+ })
929
+ );
930
+ return buildAipPage(
931
+ data,
932
+ "selections",
933
+ (raw) => raw,
934
+ (token) => this.listSelectionsPage(connectionId, pageSize, token)
935
+ );
936
+ }
937
+ /**
938
+ * Yield every selectable unit on a connection, following pages.
939
+ *
940
+ * @param connectionId - Connection id.
941
+ * @param options.pageSize - Maximum items per page (default 25).
942
+ * @example
943
+ * for await (const unit of client.connections.iterSelections('7a3f9d2c-1111-4000-a000-000000000abc')) {
944
+ * console.log(unit.objectType, unit.displayName)
945
+ * }
946
+ */
947
+ async *iterSelections(connectionId, options = {}) {
948
+ const page = await this.listSelections(connectionId, options);
949
+ yield* page.autoPagingIter();
950
+ }
901
951
  };
902
952
 
903
953
  // src/resources/context/items.ts
904
- function contextListParams(pageSize, pageToken, contextType) {
954
+ function contextListParams(pageSize, pageToken, filters = {}) {
905
955
  const extra = {};
906
- if (contextType !== void 0) extra.contextTypes = [contextType];
956
+ if (filters.contextType !== void 0) extra.contextTypes = [filters.contextType];
957
+ if (filters.parentUids !== void 0) {
958
+ extra.parentUids = filters.parentUids.length === 0 ? "" : [...filters.parentUids];
959
+ }
960
+ if (filters.ancestorUids !== void 0) {
961
+ extra.ancestorUids = filters.ancestorUids.length === 0 ? "" : [...filters.ancestorUids];
962
+ }
963
+ if (filters.connectionIds !== void 0) {
964
+ extra.connectionIds = filters.connectionIds.length === 0 ? "" : [...filters.connectionIds];
965
+ }
907
966
  return aipListParams(pageSize, pageToken, extra);
908
967
  }
909
968
  function parseContextItem(raw) {
@@ -929,6 +988,17 @@ var ContextItemsResource = class {
929
988
  * @param options.pageSize - Maximum items per page (default 25).
930
989
  * @param options.pageToken - Opaque token from a previous page.
931
990
  * @param options.contextType - Filter to a single context type (e.g. `"note"`).
991
+ * @param options.parentUids - Exact ordered native ancestry chain for direct
992
+ * children. Omit to leave parent unrestricted; pass `[]` for the known-empty
993
+ * root. Native UIDs are exact tokens (including whitespace); do not use the
994
+ * hashed context-item `uid`. For a folder's children, send that item's
995
+ * `ancestry` UIDs plus its last `dataPath` token.
996
+ * @param options.ancestorUids - Ordered UID ancestry prefix for strict
997
+ * descendants. Omit to leave unrestricted; pass `[]` for every item with
998
+ * non-null ancestry.
999
+ * @param options.connectionIds - Restrict to these connection ids. Omit to
1000
+ * leave unfiltered; pass `[]` to match none. The Files root is
1001
+ * `connectionIds: ['files']` with `parentUids: []`.
932
1002
  * @returns A page of context items — use `.autoPagingIter()` for all pages.
933
1003
  *
934
1004
  * @example
@@ -938,23 +1008,47 @@ var ContextItemsResource = class {
938
1008
  * console.log(item.description ?? item.uid, item.uid)
939
1009
  * }
940
1010
  * ```
1011
+ *
1012
+ * @example
1013
+ * ```ts
1014
+ * const rootFolders = await client.context.items.list({
1015
+ * connectionIds: ['files'],
1016
+ * contextType: 'file_folder_metadata',
1017
+ * parentUids: [],
1018
+ * })
1019
+ * const folder = rootFolders.items[0]
1020
+ * const nativeUid = folder?.dataPath?.at(-1)
1021
+ * // Known ancestry only — never treat null/omitted ancestry as a root chain.
1022
+ * if (folder?.ancestry != null && nativeUid !== undefined) {
1023
+ * const filesInFolder = await client.context.items.list({
1024
+ * connectionIds: ['files'],
1025
+ * contextType: 'file_upload',
1026
+ * parentUids: [...folder.ancestry.map((a) => a.uid), nativeUid],
1027
+ * })
1028
+ * }
1029
+ * ```
941
1030
  */
942
1031
  list(options = {}) {
943
1032
  const pageSize = options.pageSize ?? 25;
944
1033
  validatePageSize(pageSize);
945
- return this.listPage(pageSize, options.pageToken, options.contextType);
1034
+ return this.listPage(pageSize, options.pageToken, {
1035
+ contextType: options.contextType,
1036
+ parentUids: options.parentUids,
1037
+ ancestorUids: options.ancestorUids,
1038
+ connectionIds: options.connectionIds
1039
+ });
946
1040
  }
947
- async listPage(pageSize, pageToken, contextType) {
1041
+ async listPage(pageSize, pageToken, filters) {
948
1042
  const data = asRecord(
949
1043
  await invokeWithRetry(this.config, this.http, "ContextItemsController_list", {
950
- query: contextListParams(pageSize, pageToken, contextType)
1044
+ query: contextListParams(pageSize, pageToken, filters)
951
1045
  })
952
1046
  );
953
1047
  return buildAipPage(
954
1048
  data,
955
1049
  "contextItems",
956
1050
  parseContextItem,
957
- (token) => this.listPage(pageSize, token, contextType)
1051
+ (token) => this.listPage(pageSize, token, filters)
958
1052
  );
959
1053
  }
960
1054
  /**
@@ -1128,6 +1222,31 @@ var IngestedDataResource = class {
1128
1222
  }
1129
1223
  };
1130
1224
 
1225
+ // src/_generated/resources/consumption/modus/conversations.ts
1226
+ var ModusConversationsResourceBase = class {
1227
+ /** @internal */
1228
+ constructor(http, config) {
1229
+ this.http = http;
1230
+ this.config = config;
1231
+ }
1232
+ /**
1233
+ * Get a Modus conversation.
1234
+ *
1235
+ * Returns the full message history for a conversation thread.
1236
+ *
1237
+ * **Requires:** `scopes:read`
1238
+ *
1239
+ * @param threadId - Thread id from a conversation list or chat response.
1240
+ */
1241
+ async get(threadId) {
1242
+ validateId(threadId, "thread_id");
1243
+ const data = await invokeWithRetry(this.config, this.http, "ModusConversationsController_get", {
1244
+ pathParams: { threadId }
1245
+ });
1246
+ return data;
1247
+ }
1248
+ };
1249
+
1131
1250
  // src/resources/modus/conversations.ts
1132
1251
  var ALLOWED_KINDS = /* @__PURE__ */ new Set(["all", "modus", "scopes"]);
1133
1252
  function listParams(pageSize, pageToken, kind, source, sourceRef) {
@@ -1145,13 +1264,9 @@ function listParams(pageSize, pageToken, kind, source, sourceRef) {
1145
1264
  function parseListItem(raw) {
1146
1265
  return raw;
1147
1266
  }
1148
- function parseConversation(raw) {
1149
- return raw;
1150
- }
1151
- var ModusConversationsResource = class {
1267
+ var ModusConversationsResource = class extends ModusConversationsResourceBase {
1152
1268
  constructor(http, config) {
1153
- this.http = http;
1154
- this.config = config;
1269
+ super(http, config);
1155
1270
  }
1156
1271
  /**
1157
1272
  * List conversations.
@@ -1187,19 +1302,6 @@ var ModusConversationsResource = class {
1187
1302
  (token) => this.listPage(pageSize, token, kind, source, sourceRef)
1188
1303
  );
1189
1304
  }
1190
- /**
1191
- * Retrieve a conversation thread with full message history.
1192
- *
1193
- * @param threadId - Conversation thread id.
1194
- * @returns Conversation with messages.
1195
- */
1196
- async get(threadId) {
1197
- validateId(threadId, "thread_id");
1198
- const data = await invokeWithRetry(this.config, this.http, "ModusConversationsController_get", {
1199
- pathParams: { threadId }
1200
- });
1201
- return parseConversation(data);
1202
- }
1203
1305
  };
1204
1306
 
1205
1307
  // src/resources/modus/modus.ts
@@ -1277,50 +1379,29 @@ var ModusResource = class {
1277
1379
  }
1278
1380
  };
1279
1381
 
1280
- // src/resources/scopes.ts
1281
- function scopesListParams(pageSize, pageToken, search, view, managerId) {
1282
- const extra = {};
1283
- if (search !== void 0) extra.search = search;
1284
- if (view !== void 0) extra.view = view;
1285
- if (managerId !== void 0) extra.managerId = managerId;
1286
- return aipListParams(pageSize, pageToken, extra);
1287
- }
1288
- function parseScope(raw) {
1289
- return raw;
1290
- }
1291
- var ScopesResource = class {
1382
+ // src/_generated/resources/consumption/scopes.ts
1383
+ var ScopesResourceBase = class {
1292
1384
  /** @internal */
1293
1385
  constructor(http, config) {
1294
1386
  this.http = http;
1295
1387
  this.config = config;
1296
1388
  }
1297
1389
  /**
1298
- * Return the conversations sub-resource scoped to `scopeId`.
1390
+ * List scopes.
1299
1391
  *
1300
- * @param scopeId - Scope numeric id or slug.
1301
- * @returns Conversations resource for the scope.
1392
+ * Returns a paginated page of scopes the caller can at least `use`. Scopes the caller cannot see
1393
+ * are filtered out. Pagination uses an opaque token returned in `nextPageToken`.
1302
1394
  *
1303
- * @example
1304
- * ```ts
1305
- * for await (const row of (
1306
- * await client.scopes.conversations(scopeId).list({ pageSize: 10 })
1307
- * ).autoPagingIter()) {
1308
- * console.log(row.threadId, row.firstMessage)
1309
- * }
1310
- * ```
1311
- */
1312
- conversations(scopeId) {
1313
- return new ScopeConversationsResource(this.http, this.config, scopeId);
1314
- }
1315
- /**
1316
- * List scopes in the organisation.
1395
+ * **Requires:** `scopes:read`
1317
1396
  *
1318
- * @param options.pageSize - Items per page (default 25).
1319
- * @param options.pageToken - Opaque token from a previous page.
1320
- * @param options.search - Case-insensitive substring filter on the scope name.
1321
- * @param options.view - `"active"` (deployed) or `"draft"`.
1322
- * @param options.managerId - Only scopes supervised by this manager scope id.
1323
- * @returns Page of scopes — use `.autoPagingIter()` for all pages.
1397
+ * @param options.pageSize - Items per page. Defaults to 25.
1398
+ * @param options.pageToken - Opaque page token from a previous response's `nextPageToken`. Omit
1399
+ * for the first page.
1400
+ * @param options.search - Case-insensitive substring filter on scope name.
1401
+ * @param options.view - Variation view. `active` reads deployed; `draft` reads the latest builder
1402
+ * snapshot.
1403
+ * @param options.managerId - Return only scopes supervised by this manager scope id.
1404
+ * @returns A page of scopes.
1324
1405
  *
1325
1406
  * @example
1326
1407
  * ```ts
@@ -1332,34 +1413,35 @@ var ScopesResource = class {
1332
1413
  list(options = {}) {
1333
1414
  const pageSize = options.pageSize ?? 25;
1334
1415
  validatePageSize(pageSize);
1335
- return this.listPage(
1336
- pageSize,
1337
- options.pageToken,
1338
- options.search,
1339
- options.view,
1340
- options.managerId
1341
- );
1416
+ return this.listPage(pageSize, options.pageToken, options.search, options.view, options.managerId);
1342
1417
  }
1343
1418
  async listPage(pageSize, pageToken, search, view, managerId) {
1419
+ const extra = {};
1420
+ if (search !== void 0) extra.search = search;
1421
+ if (view !== void 0) extra.view = view;
1422
+ if (managerId !== void 0) extra.managerId = managerId;
1344
1423
  const data = asRecord(
1345
1424
  await invokeWithRetry(this.config, this.http, "ScopesController_list", {
1346
- query: scopesListParams(pageSize, pageToken, search, view, managerId)
1425
+ query: aipListParams(pageSize, pageToken, extra)
1347
1426
  })
1348
1427
  );
1349
1428
  return buildAipPage(
1350
1429
  data,
1351
1430
  "scopes",
1352
- parseScope,
1431
+ (raw) => raw,
1353
1432
  (token) => this.listPage(pageSize, token, search, view, managerId)
1354
1433
  );
1355
1434
  }
1356
1435
  /**
1357
- * Retrieve a scope by ID or slug.
1436
+ * Get a scope.
1358
1437
  *
1359
- * @param scopeId - Scope numeric id or slug.
1360
- * @param options.view - `"active"` (deployed) or `"draft"`.
1361
- * @throws {NotFoundError} When no scope matches the id or slug.
1362
- * @returns Scope (`id`, `name`, `status`, …).
1438
+ * Returns a scope. `view=active` (default) returns the deployed version; `view=draft` returns the
1439
+ * latest unpublished edits. Returns 404 if you cannot access the scope.
1440
+ *
1441
+ * **Requires:** `scopes:read`
1442
+ *
1443
+ * @param scopeId - Numeric scope id.
1444
+ * @param options.view - Which variation snapshot to read. Defaults to `active`.
1363
1445
  *
1364
1446
  * @example
1365
1447
  * ```ts
@@ -1369,20 +1451,44 @@ var ScopesResource = class {
1369
1451
  */
1370
1452
  async get(scopeId, options = {}) {
1371
1453
  validateId(scopeId, "scope_id");
1372
- const query = options.view !== void 0 ? { view: options.view } : void 0;
1373
1454
  const data = await invokeWithRetry(this.config, this.http, "ScopesController_get", {
1374
1455
  pathParams: { id: scopeId },
1375
- query
1456
+ query: { view: options.view }
1376
1457
  });
1377
- return parseScope(data);
1458
+ return data;
1459
+ }
1460
+ };
1461
+
1462
+ // src/resources/scopes.ts
1463
+ var ScopesResource = class extends ScopesResourceBase {
1464
+ /**
1465
+ * Return the conversations sub-resource scoped to `scopeId`.
1466
+ *
1467
+ * @param scopeId - Scope numeric id or slug.
1468
+ * @returns Conversations resource for the scope.
1469
+ *
1470
+ * @example
1471
+ * ```ts
1472
+ * for await (const row of (
1473
+ * await client.scopes.conversations(scopeId).list({ pageSize: 10 })
1474
+ * ).autoPagingIter()) {
1475
+ * console.log(row.threadId, row.firstMessage)
1476
+ * }
1477
+ * ```
1478
+ */
1479
+ conversations(scopeId) {
1480
+ return new ScopeConversationsResource(this.http, this.config, scopeId);
1378
1481
  }
1379
1482
  /**
1380
1483
  * Compose context this scope would use for an intent, without running chat.
1381
1484
  *
1485
+ * Large bodies are bounded inline previews. This REST method does not expose file references
1486
+ * or a full-content fetch operation.
1487
+ *
1382
1488
  * @param scopeId - Scope numeric id or slug.
1383
1489
  * @param message - Natural-language intent used to select context.
1384
1490
  * @param options.limit - Maximum context items to return. Omit to return all selected items.
1385
- * @returns Composition metadata. Use `chat` when you need an assistant reply.
1491
+ * @returns Composed context text plus selection counts, item UIDs, and correlation session id.
1386
1492
  *
1387
1493
  * @example
1388
1494
  * ```ts