@getmodus/sdk 0.5.0 → 0.7.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/CHANGELOG.md CHANGED
@@ -1,18 +1,98 @@
1
1
  # Changelog
2
2
 
3
- **Current npm release:** [`0.5.0`](https://www.npmjs.com/package/@getmodus/sdk/v/0.5.0).
3
+ Published versions come from the `sdk-typescript/v*` tags; the current release is
4
+ whatever [npm](https://www.npmjs.com/package/@getmodus/sdk) is serving. This file
5
+ records what changed, not which version is live.
4
6
 
5
- Pre-1.0 (`0.x`) releases are internal. Detailed release notes are not maintained
6
- until `1.0.0` — keep `[Unreleased]` empty while the package stays on `0.x`.
7
+ Record concise, customer-visible release notes under `[Unreleased]` for every SDK
8
+ release, including pre-1.0 (`0.x`) releases.
7
9
 
8
- ## [0.5.0] — 2026-08-08
10
+ ## [Unreleased]
11
+
12
+ ## [0.7.0] — 2026-09-30
13
+
14
+ ### Added
15
+
16
+ - **`contextItemUids` on composed context.** `POST /modus/context` and
17
+ `POST /scopes/{id}/context` now return the UIDs of the context items the composer
18
+ kept, in selection order. Previously the response reported `selectedCount` with no
19
+ way to learn which items it counted — `contextItems` has been an empty array for
20
+ some time and remains deprecated.
21
+ - **`claude-opus-5.5` and `grok-4.7` models.** The chat request `model` union
22
+ accepts the two new models.
23
+
24
+ ### Removed
25
+
26
+ - **`RunConfigDto.strategies`.** The run API no longer publishes context-composer
27
+ strategy IDs, so the generated `RunConfigDto` type no longer carries
28
+ `strategies`. These IDs are the composer's internal vocabulary and get renamed,
29
+ so a pinned value could silently stop doing anything. Strategy selection is
30
+ chosen by the service.
31
+
32
+ ### Added
33
+
34
+ - **Dashboard documents.** `mgmt.context.dashboards` document operations: list, get, create,
35
+ updateDraft, publish, delete, versions, draft snapshots, access, ownership transfer
36
+ (`list()`, `get()`, `create()`, `updateDraft()`, `publish()`, `delete()`,
37
+ `listVersions()`, `getVersion()`, `restoreVersion()`, `listDraftSnapshots()`,
38
+ `updateAccess()`, `requestOwnershipTransfer()`, `acceptOwnershipTransfer()`,
39
+ `cancelOwnershipTransfer()`). New types `DashboardVersion`, `DashboardDraftSnapshot`,
40
+ `DashboardPublishResult` and `DashboardView`, and the input types `CreateDashboardInput`,
41
+ `UpdateDashboardDraftInput`, `PublishDashboardInput`, `UpdateDashboardAccessInput` and
42
+ `TransferDashboardOwnershipInput`; version definitions are returned as stored, so older versions
43
+ may lack newer fields.
44
+
45
+ - **Dashboard draft elements and layout.** `mgmt.context.dashboards.elements(dashboardId)`
46
+ lists, reads, creates and updates the tiles and filters of a dashboard draft
47
+ (`list()`, `get()`, `create()`, `update()`), and `mgmt.context.dashboards.updateLayout()`
48
+ moves or resizes several of them in one change. Every write takes the `expectedRevision`
49
+ it is based on and throws `ConflictError` when the draft changed.
50
+
51
+ - Ingested-data uploads accept an optional source HTTP `response.status` from 100 through 599.
52
+
53
+ - **File uploads: optional `folderPath`.** `uploadFromUrl`, `finalize`, and directory
54
+ uploads now accept an optional relative folder label that is stored with the file and
55
+ returned on the file resource. `uploadDir` sets it automatically from each file's path
56
+ relative to the upload root, so directory structure is preserved.
57
+
58
+ - **Conversation lists: optional `source` and `sourceRef` filters.** `client.modus.conversations.list`
59
+ and `client.scopes.conversations(scopeId).list` now accept `source` to restrict results to
60
+ one UI surface (e.g. `"context_chat"`, `"dashboard_copilot"`, `"slack"`) and `sourceRef` to
61
+ narrow `source` to one instance of that surface — for `dashboard_copilot`, a dashboard id.
62
+ `sourceRef` requires `source`; sent on its own it is rejected with a 422. Conversations
63
+ recorded before the filter shipped carry no instance key and do not match it.
64
+
65
+ ### Changed
66
+
67
+ - **Scope MCP: Get Answer works alone.** `management.scopes.patchMcpConfig` now
68
+ rejects a config that turns `coreTools.chat` (`get_answer`) on together with
69
+ `getContext`, `teachModus` or any tool exposure, with HTTP 422. The call replaces the
70
+ whole config and omitted keys take their defaults: `chat` off, `getContext` on,
71
+ `teachModus` off, every tool exposed. To turn Get Answer on, send `chat: true`,
72
+ `getContext: false` and an empty `subset` exposure in one call.
73
+
74
+ - **Breaking (pre-1.0):** Ingested-data upload results now contain only `checksum`;
75
+ object keys are internal storage details.
76
+
77
+ - **Breaking (pre-1.0):** Directory-managed member groups no longer include member IDs.
78
+ Use the member count to determine their size. Native member groups are unchanged.
9
79
 
80
+ ## [0.6.0] — 2026-08-15
10
81
 
11
82
  ### Changed
12
83
 
13
84
  - Public OpenAPI updates from production release.
14
85
 
86
+ ## [0.5.0] — 2026-08-08
15
87
 
16
- ## [Unreleased]
88
+ ### Changed
89
+
90
+ - Public OpenAPI updates from production release.
91
+
92
+ ## [0.4.0] — 2026-08-01
93
+
94
+ ### Changed
95
+
96
+ - Public OpenAPI updates from production release.
17
97
 
18
98
  ## [0.3.0] — 2026-07-26
package/README.md CHANGED
@@ -165,9 +165,17 @@ await mgmt.scopes.deploy(scope.id)
165
165
  // Create returns contextItemId (also available as .uid); list/get use .uid
166
166
  const note = await mgmt.context.createNote('Title', 'Body')
167
167
  console.log(note.contextItemId, note.uid) // same UUID
168
+
169
+ // Context file upload (presign → PUT → finalize; polls until processing by default)
170
+ const upload = await mgmt.context.files.upload('report.pdf')
171
+ console.log(upload.uploadId, upload.status)
172
+
173
+ // Directory / many files — bulk uploadUrls + finalize (chunks of 100)
174
+ const batch = await mgmt.context.files.uploadDir('./reports')
175
+ console.log(batch.uploaded.length, batch.failed.length)
168
176
  ```
169
177
 
170
- Requires a token with write access to scopes and workflows (same as the Modus UI).
178
+ Requires a token with write access to scopes and workflows (same as the Modus UI). Context file upload/finalize also needs `context:write`; polling status and listing context items need `context:read`.
171
179
 
172
180
  ## Pagination
173
181
 
@@ -40,6 +40,86 @@ var OPERATIONS = {
40
40
  requestSchema: "CreateSavedQueryDto",
41
41
  responseSchema: "CreatedContextItemResponseDto"
42
42
  },
43
+ "ContextFilesController_finalize": {
44
+ method: "POST",
45
+ path: "/api/v1/context/files/{uploadId}/finalize",
46
+ service: "modus-api",
47
+ serverUrl: "https://api.getmodus.com",
48
+ pathParams: ["uploadId"],
49
+ queryParams: [],
50
+ requestSchema: "FinalizeUploadDto",
51
+ responseSchema: "FileUploadResourceDto"
52
+ },
53
+ "ContextFilesController_finalizeMany": {
54
+ method: "POST",
55
+ path: "/api/v1/context/files/finalize",
56
+ service: "modus-api",
57
+ serverUrl: "https://api.getmodus.com",
58
+ pathParams: [],
59
+ queryParams: [],
60
+ requestSchema: "BulkFinalizeDto",
61
+ responseSchema: "BulkFinalizeResponseDto"
62
+ },
63
+ "ContextFilesController_get": {
64
+ method: "GET",
65
+ path: "/api/v1/context/files/{uploadId}",
66
+ service: "modus-api",
67
+ serverUrl: "https://api.getmodus.com",
68
+ pathParams: ["uploadId"],
69
+ queryParams: [],
70
+ requestSchema: null,
71
+ responseSchema: "FileUploadResourceDto"
72
+ },
73
+ "ContextFilesController_list": {
74
+ method: "GET",
75
+ path: "/api/v1/context/files",
76
+ service: "modus-api",
77
+ serverUrl: "https://api.getmodus.com",
78
+ pathParams: [],
79
+ queryParams: ["pageToken", "pageSize"],
80
+ requestSchema: null,
81
+ responseSchema: "ListFilesResponseDto"
82
+ },
83
+ "ContextFilesController_uploadFromUrl": {
84
+ method: "POST",
85
+ path: "/api/v1/context/files/uploadFromUrl",
86
+ service: "modus-api",
87
+ serverUrl: "https://api.getmodus.com",
88
+ pathParams: [],
89
+ queryParams: [],
90
+ requestSchema: "UploadFromUrlDto",
91
+ responseSchema: "FileUploadResourceDto"
92
+ },
93
+ "ContextFilesController_uploadFromUrls": {
94
+ method: "POST",
95
+ path: "/api/v1/context/files/uploadFromUrls",
96
+ service: "modus-api",
97
+ serverUrl: "https://api.getmodus.com",
98
+ pathParams: [],
99
+ queryParams: [],
100
+ requestSchema: "BulkUploadFromUrlsDto",
101
+ responseSchema: "BulkUploadFromUrlsResponseDto"
102
+ },
103
+ "ContextFilesController_uploadUrl": {
104
+ method: "POST",
105
+ path: "/api/v1/context/files/uploadUrl",
106
+ service: "modus-api",
107
+ serverUrl: "https://api.getmodus.com",
108
+ pathParams: [],
109
+ queryParams: [],
110
+ requestSchema: "UploadUrlDto",
111
+ responseSchema: "UploadUrlResponseDto"
112
+ },
113
+ "ContextFilesController_uploadUrls": {
114
+ method: "POST",
115
+ path: "/api/v1/context/files/uploadUrls",
116
+ service: "modus-api",
117
+ serverUrl: "https://api.getmodus.com",
118
+ pathParams: [],
119
+ queryParams: [],
120
+ requestSchema: "BulkUploadUrlsDto",
121
+ responseSchema: "BulkUploadUrlsResponseDto"
122
+ },
43
123
  "ContextItemsController_delete": {
44
124
  method: "DELETE",
45
125
  path: "/api/v1/context/items/{uid}",
@@ -120,6 +200,16 @@ var OPERATIONS = {
120
200
  requestSchema: "CreateCustomContextItemDto",
121
201
  responseSchema: "CreatedCustomContextItemResponseDto"
122
202
  },
203
+ "CustomContextItemsController_createRelations": {
204
+ method: "POST",
205
+ path: "/api/v1/context/custom-items/relations",
206
+ service: "modus-api",
207
+ serverUrl: "https://api.getmodus.com",
208
+ pathParams: [],
209
+ queryParams: [],
210
+ requestSchema: "BatchCreateCustomContextItemRelationsDto",
211
+ responseSchema: "BatchCreateCustomContextItemRelationsResponseDto"
212
+ },
123
213
  "CustomContextItemsController_delete": {
124
214
  method: "DELETE",
125
215
  path: "/api/v1/context/custom-items/{uid}",
@@ -160,6 +250,196 @@ var OPERATIONS = {
160
250
  requestSchema: "UpdateCustomContextItemDto",
161
251
  responseSchema: null
162
252
  },
253
+ "DashboardsController_acceptOwnership": {
254
+ method: "POST",
255
+ path: "/api/v1/context/dashboards/{dashboardId}/transfer-ownership/accept",
256
+ service: "modus-api",
257
+ serverUrl: "https://api.getmodus.com",
258
+ pathParams: ["dashboardId"],
259
+ queryParams: [],
260
+ requestSchema: null,
261
+ responseSchema: "DashboardDto"
262
+ },
263
+ "DashboardsController_cancelOwnership": {
264
+ method: "DELETE",
265
+ path: "/api/v1/context/dashboards/{dashboardId}/transfer-ownership",
266
+ service: "modus-api",
267
+ serverUrl: "https://api.getmodus.com",
268
+ pathParams: ["dashboardId"],
269
+ queryParams: [],
270
+ requestSchema: null,
271
+ responseSchema: "DashboardDto"
272
+ },
273
+ "DashboardsController_create": {
274
+ method: "POST",
275
+ path: "/api/v1/context/dashboards",
276
+ service: "modus-api",
277
+ serverUrl: "https://api.getmodus.com",
278
+ pathParams: [],
279
+ queryParams: [],
280
+ requestSchema: "CreateDashboardDto",
281
+ responseSchema: "DashboardDto"
282
+ },
283
+ "DashboardsController_createElement": {
284
+ method: "POST",
285
+ path: "/api/v1/context/dashboards/{dashboardId}/elements",
286
+ service: "modus-api",
287
+ serverUrl: "https://api.getmodus.com",
288
+ pathParams: ["dashboardId"],
289
+ queryParams: [],
290
+ requestSchema: "CreateDashboardElementDto",
291
+ responseSchema: "DashboardElementResponseDto"
292
+ },
293
+ "DashboardsController_delete": {
294
+ method: "DELETE",
295
+ path: "/api/v1/context/dashboards/{dashboardId}",
296
+ service: "modus-api",
297
+ serverUrl: "https://api.getmodus.com",
298
+ pathParams: ["dashboardId"],
299
+ queryParams: [],
300
+ requestSchema: null,
301
+ responseSchema: null
302
+ },
303
+ "DashboardsController_get": {
304
+ method: "GET",
305
+ path: "/api/v1/context/dashboards/{dashboardId}",
306
+ service: "modus-api",
307
+ serverUrl: "https://api.getmodus.com",
308
+ pathParams: ["dashboardId"],
309
+ queryParams: ["view"],
310
+ requestSchema: null,
311
+ responseSchema: "DashboardDto"
312
+ },
313
+ "DashboardsController_getElement": {
314
+ method: "GET",
315
+ path: "/api/v1/context/dashboards/{dashboardId}/elements/{elementId}",
316
+ service: "modus-api",
317
+ serverUrl: "https://api.getmodus.com",
318
+ pathParams: ["dashboardId", "elementId"],
319
+ queryParams: [],
320
+ requestSchema: null,
321
+ responseSchema: "DashboardElementResponseDto"
322
+ },
323
+ "DashboardsController_getVersion": {
324
+ method: "GET",
325
+ path: "/api/v1/context/dashboards/{dashboardId}/versions/{versionId}",
326
+ service: "modus-api",
327
+ serverUrl: "https://api.getmodus.com",
328
+ pathParams: ["dashboardId", "versionId"],
329
+ queryParams: [],
330
+ requestSchema: null,
331
+ responseSchema: "DashboardDto"
332
+ },
333
+ "DashboardsController_list": {
334
+ method: "GET",
335
+ path: "/api/v1/context/dashboards",
336
+ service: "modus-api",
337
+ serverUrl: "https://api.getmodus.com",
338
+ pathParams: [],
339
+ queryParams: ["view"],
340
+ requestSchema: null,
341
+ responseSchema: "ListDashboardsResponseDto"
342
+ },
343
+ "DashboardsController_listDraftSnapshots": {
344
+ method: "GET",
345
+ path: "/api/v1/context/dashboards/{dashboardId}/draft-snapshots",
346
+ service: "modus-api",
347
+ serverUrl: "https://api.getmodus.com",
348
+ pathParams: ["dashboardId"],
349
+ queryParams: [],
350
+ requestSchema: null,
351
+ responseSchema: "ListDashboardDraftSnapshotsResponseDto"
352
+ },
353
+ "DashboardsController_listElements": {
354
+ method: "GET",
355
+ path: "/api/v1/context/dashboards/{dashboardId}/elements",
356
+ service: "modus-api",
357
+ serverUrl: "https://api.getmodus.com",
358
+ pathParams: ["dashboardId"],
359
+ queryParams: [],
360
+ requestSchema: null,
361
+ responseSchema: "DashboardElementsListResponseDto"
362
+ },
363
+ "DashboardsController_listVersions": {
364
+ method: "GET",
365
+ path: "/api/v1/context/dashboards/{dashboardId}/versions",
366
+ service: "modus-api",
367
+ serverUrl: "https://api.getmodus.com",
368
+ pathParams: ["dashboardId"],
369
+ queryParams: [],
370
+ requestSchema: null,
371
+ responseSchema: "ListDashboardVersionsResponseDto"
372
+ },
373
+ "DashboardsController_publish": {
374
+ method: "POST",
375
+ path: "/api/v1/context/dashboards/{dashboardId}/publish",
376
+ service: "modus-api",
377
+ serverUrl: "https://api.getmodus.com",
378
+ pathParams: ["dashboardId"],
379
+ queryParams: [],
380
+ requestSchema: "PublishDashboardDto",
381
+ responseSchema: "PublishDashboardResponseDto"
382
+ },
383
+ "DashboardsController_restore": {
384
+ method: "POST",
385
+ path: "/api/v1/context/dashboards/{dashboardId}/versions/{versionId}/restore",
386
+ service: "modus-api",
387
+ serverUrl: "https://api.getmodus.com",
388
+ pathParams: ["dashboardId", "versionId"],
389
+ queryParams: [],
390
+ requestSchema: null,
391
+ responseSchema: "DashboardDto"
392
+ },
393
+ "DashboardsController_transferOwnership": {
394
+ method: "POST",
395
+ path: "/api/v1/context/dashboards/{dashboardId}/transfer-ownership",
396
+ service: "modus-api",
397
+ serverUrl: "https://api.getmodus.com",
398
+ pathParams: ["dashboardId"],
399
+ queryParams: [],
400
+ requestSchema: "TransferDashboardOwnershipDto",
401
+ responseSchema: "DashboardDto"
402
+ },
403
+ "DashboardsController_updateAccess": {
404
+ method: "PATCH",
405
+ path: "/api/v1/context/dashboards/{dashboardId}/access",
406
+ service: "modus-api",
407
+ serverUrl: "https://api.getmodus.com",
408
+ pathParams: ["dashboardId"],
409
+ queryParams: [],
410
+ requestSchema: "UpdateDashboardAccessDto",
411
+ responseSchema: "DashboardDto"
412
+ },
413
+ "DashboardsController_updateDraft": {
414
+ method: "PATCH",
415
+ path: "/api/v1/context/dashboards/{dashboardId}/draft",
416
+ service: "modus-api",
417
+ serverUrl: "https://api.getmodus.com",
418
+ pathParams: ["dashboardId"],
419
+ queryParams: [],
420
+ requestSchema: "UpdateDashboardDraftDto",
421
+ responseSchema: "DashboardDto"
422
+ },
423
+ "DashboardsController_updateElement": {
424
+ method: "PATCH",
425
+ path: "/api/v1/context/dashboards/{dashboardId}/elements/{elementId}",
426
+ service: "modus-api",
427
+ serverUrl: "https://api.getmodus.com",
428
+ pathParams: ["dashboardId", "elementId"],
429
+ queryParams: [],
430
+ requestSchema: "UpdateDashboardElementDto",
431
+ responseSchema: "DashboardDto"
432
+ },
433
+ "DashboardsController_updateLayout": {
434
+ method: "PATCH",
435
+ path: "/api/v1/context/dashboards/{dashboardId}/layout",
436
+ service: "modus-api",
437
+ serverUrl: "https://api.getmodus.com",
438
+ pathParams: ["dashboardId"],
439
+ queryParams: [],
440
+ requestSchema: "UpdateDashboardLayoutDto",
441
+ responseSchema: "DashboardDto"
442
+ },
163
443
  "EvaluationsController_getConfig": {
164
444
  method: "GET",
165
445
  path: "/api/v1/scopes/{id}/evaluations/config",
@@ -210,6 +490,16 @@ var OPERATIONS = {
210
490
  requestSchema: "UpdateEvaluationConfigDto",
211
491
  responseSchema: "EvaluationConfigDto"
212
492
  },
493
+ "IngestedDataController_upload": {
494
+ method: "POST",
495
+ path: "/api/v1/ingested-data",
496
+ service: "modus-api",
497
+ serverUrl: "https://api.getmodus.com",
498
+ pathParams: [],
499
+ queryParams: [],
500
+ requestSchema: "CreateIngestedDataDto",
501
+ responseSchema: "CreatedIngestedDataResponseDto"
502
+ },
213
503
  "MemberGroupsController_list": {
214
504
  method: "GET",
215
505
  path: "/api/v1/users/member-groups",
@@ -266,7 +556,7 @@ var OPERATIONS = {
266
556
  service: "modus-api",
267
557
  serverUrl: "https://api.getmodus.com",
268
558
  pathParams: [],
269
- queryParams: ["pageToken", "page", "pageSize", "userId", "toolName", "timeframe", "includeTools", "kind"],
559
+ queryParams: ["pageToken", "page", "pageSize", "userId", "toolName", "source", "sourceRef", "timeframe", "includeTools", "kind"],
270
560
  requestSchema: null,
271
561
  responseSchema: "ListConversationsResponseDto"
272
562
  },
@@ -416,7 +706,7 @@ var OPERATIONS = {
416
706
  service: "modus-api",
417
707
  serverUrl: "https://api.getmodus.com",
418
708
  pathParams: ["id"],
419
- queryParams: ["pageToken", "page", "pageSize", "userId", "toolName", "timeframe", "includeTools"],
709
+ queryParams: ["pageToken", "page", "pageSize", "userId", "toolName", "source", "sourceRef", "timeframe", "includeTools"],
420
710
  requestSchema: null,
421
711
  responseSchema: "ListConversationsResponseDto"
422
712
  },
@@ -1169,7 +1459,7 @@ function formatConfigForLog(config) {
1169
1459
  }
1170
1460
 
1171
1461
  // src/_http.ts
1172
- var USER_AGENT = `modus-typescript/${"0.5.0"} (node/${process.version}; ${process.platform})`;
1462
+ var USER_AGENT = `modus-typescript/${"0.7.0"} (node/${process.version}; ${process.platform})`;
1173
1463
  function buildUrl(baseUrl, path, params) {
1174
1464
  const url = new URL(path.startsWith("/") ? path : `/${path}`, baseUrl);
1175
1465
  if (params) {
@@ -1416,12 +1706,28 @@ var WRITE_BODY_ALLOWED_KEYS = {
1416
1706
  ContextCreatorsController_createLink: ["url", "title", "isCrawl", "pageLimit"],
1417
1707
  ContextCreatorsController_createNote: ["title", "content"],
1418
1708
  ContextCreatorsController_createSavedQuery: ["name", "connectionId", "query", "description", "path"],
1709
+ ContextFilesController_finalize: ["fileName", "folderPath"],
1710
+ ContextFilesController_finalizeMany: ["uploads"],
1711
+ ContextFilesController_uploadFromUrl: ["url", "fileName", "folderPath"],
1712
+ ContextFilesController_uploadFromUrls: ["urls"],
1713
+ ContextFilesController_uploadUrl: ["fileName", "contentType", "fileSize"],
1714
+ ContextFilesController_uploadUrls: ["files"],
1419
1715
  ContextItemsController_lookup: ["contextType", "dataPath", "contentProjection"],
1420
1716
  ContextItemsController_update: ["contextType", "content", "description", "userFeedback", "topics"],
1421
1717
  CustomContextItemsController_batchCreate: ["items"],
1422
1718
  CustomContextItemsController_create: ["kind", "sourceId", "sourceName", "collectionId", "collectionName", "externalId", "fieldName", "name", "entityType", "description", "content", "url", "attributes", "dataType", "value", "samples", "raw", "topics", "idempotencyKey", "access"],
1719
+ CustomContextItemsController_createRelations: ["relations"],
1423
1720
  CustomContextItemsController_update: ["name", "entityType", "description", "content", "url", "attributes", "dataType", "value", "samples", "raw", "topics"],
1721
+ DashboardsController_create: ["title", "description", "definition", "access"],
1722
+ DashboardsController_createElement: ["expectedRevision", "kind", "title", "layout"],
1723
+ DashboardsController_publish: ["expectedRevision"],
1724
+ DashboardsController_transferOwnership: ["newOwnerUserId"],
1725
+ DashboardsController_updateAccess: ["visibility", "groupPermissions", "sharedWith"],
1726
+ DashboardsController_updateDraft: ["expectedRevision", "title", "description", "definition"],
1727
+ DashboardsController_updateElement: ["expectedRevision", "patch"],
1728
+ DashboardsController_updateLayout: ["expectedRevision", "elements"],
1424
1729
  EvaluationsController_updateConfig: ["enabled", "cadence", "judgeModel", "judgeGuidance", "notifications"],
1730
+ IngestedDataController_upload: ["integration_type", "request", "response"],
1425
1731
  ModusChatController_chat: ["message", "model"],
1426
1732
  ModusContextController_compose: ["message", "limit"],
1427
1733
  ModusRunsController_create: ["message", "sessionId", "organizationId", "version", "fileThreadId", "config", "attachments", "userContext", "source", "runId", "subordinateSkillIds"],
@@ -1487,6 +1793,8 @@ var ALLOWED_CHAT_MODELS = /* @__PURE__ */ new Set([
1487
1793
  "qwen3-coder",
1488
1794
  "qwen3-32b",
1489
1795
  "deepseek-chat-v3.1",
1796
+ "deepseek-v4-pro",
1797
+ "deepseek-v4-flash-latest",
1490
1798
  "minimax-m2.7",
1491
1799
  "llama-4-maverick",
1492
1800
  "llama-4-scout",
@@ -1659,6 +1967,12 @@ var CustomContextItemsResource = class {
1659
1967
  * @param options.searchQuery - Free-text search filter.
1660
1968
  * @param options.topics - Filter to items tagged with any of these topics.
1661
1969
  * @returns A page of custom context items.
1970
+ * @example
1971
+ * ```ts
1972
+ * const client = new Modus()
1973
+ * const page = await client.context.customItems.list({ pageSize: 25 })
1974
+ * for (const item of page.items) console.log(item.uid, item.contextType)
1975
+ * ```
1662
1976
  */
1663
1977
  list(options = {}) {
1664
1978
  const pageSize = options.pageSize ?? 25;
@@ -1687,6 +2001,11 @@ var CustomContextItemsResource = class {
1687
2001
  * @param uid - Item uid.
1688
2002
  * @returns The custom context item.
1689
2003
  * @throws {NotFoundError} When no item matches the uid.
2004
+ * @example
2005
+ * ```ts
2006
+ * const client = new Modus()
2007
+ * const item = await client.context.customItems.get('PLACEHOLDER_UID')
2008
+ * ```
1690
2009
  */
1691
2010
  async get(uid) {
1692
2011
  return parseContextItem(
@@ -1707,6 +2026,7 @@ var CustomContextItemsResource = class {
1707
2026
  *
1708
2027
  * @example
1709
2028
  * ```ts
2029
+ * const client = new Modus()
1710
2030
  * const created = await client.context.customItems.create({
1711
2031
  * kind: 'entity',
1712
2032
  * sourceId: 'my-source',
@@ -1730,6 +2050,7 @@ var CustomContextItemsResource = class {
1730
2050
  *
1731
2051
  * @example
1732
2052
  * ```ts
2053
+ * const client = new Modus()
1733
2054
  * const created = await client.context.customItems.batchCreate([
1734
2055
  * { kind: 'field', sourceId: 'src', fieldName: 'region', dataType: 'string' },
1735
2056
  * { kind: 'field', sourceId: 'src', fieldName: 'amount', dataType: 'number' },
@@ -1747,12 +2068,45 @@ var CustomContextItemsResource = class {
1747
2068
  const items = data.contextItems;
1748
2069
  return Array.isArray(items) ? items.map(parseCreatedCustomContextItem) : [];
1749
2070
  }
2071
+ /**
2072
+ * Create or update typed relations between context items.
2073
+ *
2074
+ * @param relations - Relations with source and target item uids, a snake_case type, and optional content.
2075
+ * @returns Number of relations created or updated.
2076
+ * @example
2077
+ * ```ts
2078
+ * const client = new Modus()
2079
+ * await client.context.customItems.createRelations([{
2080
+ * fromUid: 'SOURCE_UID',
2081
+ * toUid: 'TARGET_UID',
2082
+ * relationType: 'depends_on',
2083
+ * }])
2084
+ * ```
2085
+ */
2086
+ async createRelations(relations) {
2087
+ const data = asRecord(
2088
+ await invokeWithRetry(
2089
+ this.config,
2090
+ this.http,
2091
+ "CustomContextItemsController_createRelations",
2092
+ { jsonBody: { relations } }
2093
+ )
2094
+ );
2095
+ return data.upsertedCount;
2096
+ }
1750
2097
  /**
1751
2098
  * Update a custom context item.
1752
2099
  *
1753
2100
  * @param uid - Item uid.
1754
2101
  * @param input - Fields to change (kind and hierarchy ids cannot be changed).
1755
2102
  * @returns The updated item uid.
2103
+ * @example
2104
+ * ```ts
2105
+ * const client = new Modus()
2106
+ * await client.context.customItems.update('PLACEHOLDER_UID', {
2107
+ * description: 'Updated summary',
2108
+ * })
2109
+ * ```
1756
2110
  */
1757
2111
  async update(uid, input) {
1758
2112
  return asRecord(
@@ -1767,6 +2121,11 @@ var CustomContextItemsResource = class {
1767
2121
  *
1768
2122
  * @param uid - Item uid.
1769
2123
  * @returns Deletion confirmation with uid and context type.
2124
+ * @example
2125
+ * ```ts
2126
+ * const client = new Modus()
2127
+ * const result = await client.context.customItems.delete('PLACEHOLDER_UID')
2128
+ * ```
1770
2129
  */
1771
2130
  async delete(uid) {
1772
2131
  return parseDeletion(
@@ -1795,26 +2154,44 @@ var ScopeConversationsResource = class {
1795
2154
  *
1796
2155
  * @param options.pageSize - Items per page (default 25).
1797
2156
  * @param options.pageToken - Opaque token from a previous page.
1798
- * @returns Page of conversation list items.
2157
+ * @param options.source - Restrict to conversations started from this UI surface
2158
+ * (e.g. `"context_chat"`, `"dashboard_copilot"`, `"slack"`).
2159
+ * @param options.sourceRef - Narrow `source` to one instance of that surface — for
2160
+ * `"dashboard_copilot"`, a dashboard id. Requires `source`; the API throws an
2161
+ * `UnprocessableError` (422) if sent on its own. Conversations recorded before
2162
+ * this filter shipped carry no instance key and never match it.
2163
+ * @returns Page of conversation list items (`threadId`, `firstMessage`, `messageCount`).
2164
+ *
2165
+ * @example
2166
+ * ```ts
2167
+ * for await (const row of (
2168
+ * await client.scopes.conversations(scopeId).list({ pageSize: 10 })
2169
+ * ).autoPagingIter()) {
2170
+ * console.log(row.threadId, row.firstMessage, row.messageCount)
2171
+ * }
2172
+ * ```
1799
2173
  */
1800
2174
  list(options = {}) {
1801
2175
  const pageSize = options.pageSize ?? 25;
1802
2176
  validatePageSize(pageSize);
1803
- return this.listPage(pageSize, options.pageToken);
2177
+ return this.listPage(pageSize, options.pageToken, options.source, options.sourceRef);
1804
2178
  }
1805
- async listPage(pageSize, pageToken) {
2179
+ async listPage(pageSize, pageToken, source, sourceRef) {
1806
2180
  validateId(this.scopeId, "scope_id");
2181
+ const extra = {};
2182
+ if (source !== void 0) extra.source = source;
2183
+ if (sourceRef !== void 0) extra.sourceRef = sourceRef;
1807
2184
  const data = asRecord(
1808
2185
  await invokeWithRetry(this.config, this.http, "ScopeConversationsController_list", {
1809
2186
  pathParams: { id: this.scopeId },
1810
- query: aipListParams(pageSize, pageToken)
2187
+ query: aipListParams(pageSize, pageToken, extra)
1811
2188
  })
1812
2189
  );
1813
2190
  return buildAipPage(
1814
2191
  data,
1815
2192
  "conversations",
1816
2193
  parseListItem,
1817
- (token) => this.listPage(pageSize, token)
2194
+ (token) => this.listPage(pageSize, token, source, sourceRef)
1818
2195
  );
1819
2196
  }
1820
2197
  /**
@@ -1823,7 +2200,15 @@ var ScopeConversationsResource = class {
1823
2200
  * @param threadId - Conversation thread id.
1824
2201
  * @param options.messageLimit - Maximum messages to return (1–100).
1825
2202
  * @param options.beforeMessageIndex - Return messages before this index (requires messageLimit).
1826
- * @returns Conversation with messages.
2203
+ * @returns Conversation with `messages` (`type`, `content`).
2204
+ *
2205
+ * @example
2206
+ * ```ts
2207
+ * const thread = await client.scopes.conversations(scopeId).get(row.threadId)
2208
+ * for (const msg of thread.messages) {
2209
+ * console.log(msg.type, String(msg.content).slice(0, 80))
2210
+ * }
2211
+ * ```
1827
2212
  */
1828
2213
  async get(threadId, options = {}) {
1829
2214
  validateId(this.scopeId, "scope_id");
@@ -1874,4 +2259,4 @@ export {
1874
2259
  CustomContextItemsResource,
1875
2260
  ScopeConversationsResource
1876
2261
  };
1877
- //# sourceMappingURL=chunk-H76PTY5G.js.map
2262
+ //# sourceMappingURL=chunk-JMFT5KO5.js.map