@getmodus/sdk 0.6.0 → 0.8.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,142 @@
1
1
  # Changelog
2
2
 
3
- **Current npm release:** [`0.6.0`](https://www.npmjs.com/package/@getmodus/sdk/v/0.6.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.
9
+
10
+ ## [Unreleased]
11
+
12
+ ## [0.8.0] — 2026-10-18
13
+
14
+ ### Added
15
+
16
+ - **`includeOwnLearnings` on `scopes.create`.** A new scope reads what is taught while
17
+ using it by default; pass `false` to create it without its own learnings.
18
+ - **`defaultHeaders` client option.** `Modus` and `ModusManagement` accept headers to
19
+ send on every request. They override the SDK's own defaults, except `Authorization`,
20
+ which always comes from `apiKey`.
21
+ - **`X-Modus-Client: sdk` request header.** Every request names the SDK as the client.
22
+ - **`gpt-6-luna` model.** The chat request `model` union accepts the new
23
+ OpenAI model.
24
+ - **`gpt-5.6-luna` model.** The chat request `model` union accepts the new
25
+ OpenAI model.
26
+ - **Move Files items.** `mgmt.context.items.move(uid, { destinationFolderUid })`
27
+ relocates a live file or folder. Pass `null` for the Files root.
28
+ - **Generic context item browse.** `client.context.items.list()` and
29
+ `mgmt.context.items.list()` accept optional `connectionIds`, `parentUids`,
30
+ and `ancestorUids` arrays. Omit a filter to leave it unrestricted; pass `[]`
31
+ for the known-empty / match-none forms (`parentUids: []` is the Files root).
32
+ - **Upload destinations.** Upload helpers accept an optional `folderPath`
33
+ prefix for single files, batches, and directories.
34
+
35
+ ### Changed
36
+
37
+ - **Connected-integration toolset entries bind to a connection.** A scope toolset entry
38
+ given as `{ actions: [...], rules }` is bound on create/update to the organization's
39
+ newest workspace connection of that integration and returned as
40
+ `{ byConnection: { <connection id>: {...} } }`. A create or update whose entry has no
41
+ workspace connection to bind to returns `422`; re-sending an entry already stored
42
+ unchanged is accepted.
43
+ - Deleting a Files folder through context items also deletes its contained files,
44
+ subfolders, and parsed file items.
45
+
46
+ ## [0.7.0] — 2026-09-30
47
+
48
+ ### Added
49
+
50
+ - **Scope Slack/Teams interfaces.** `scopes.interfaces(scopeId)` lists, adds, updates and
51
+ removes the Slack and Microsoft Teams interfaces of a scope.
52
+ - **`claude-sonnet-5.5` model.** The chat request `model` union accepts the new
53
+ Anthropic model.
54
+ - **`deepseek-v4-pro`, `deepseek-v4-flash-latest`, and `kimi-k3` models.** The
55
+ chat request `model` union accepts these models.
56
+ - **Optional `ancestry` on context items.** List, get, lookup, and custom-item
57
+ responses may include ordered ancestors (`uid`, `display_name`, `type`). The
58
+ field is omitted on older responses, `null` when stored ancestry is unknown,
59
+ and `[]` when the item has no ancestors.
60
+ - **`contextItemUids` on composed context.** `POST /modus/context` and
61
+ `POST /scopes/{id}/context` now return the UIDs of the context items the composer
62
+ kept, in selection order. Previously the response reported `selectedCount` with no
63
+ way to learn which items it counted — `contextItems` has been an empty array for
64
+ some time and remains deprecated.
65
+ - **`claude-opus-5.5` and `grok-4.7` models.** The chat request `model` union
66
+ accepts the two new models.
67
+
68
+ ### Removed
69
+
70
+ - **`RunConfigDto.strategies`.** The run API no longer publishes context-composer
71
+ strategy IDs, so the generated `RunConfigDto` type no longer carries
72
+ `strategies`. These IDs are the composer's internal vocabulary and get renamed,
73
+ so a pinned value could silently stop doing anything. Strategy selection is
74
+ chosen by the service.
75
+
76
+ ### Added
77
+
78
+ - **Dashboard documents.** `mgmt.context.dashboards` document operations: list, get, create,
79
+ updateDraft, publish, delete, versions, draft snapshots, access, ownership transfer
80
+ (`list()`, `get()`, `create()`, `updateDraft()`, `publish()`, `delete()`,
81
+ `listVersions()`, `getVersion()`, `restoreVersion()`, `listDraftSnapshots()`,
82
+ `updateAccess()`, `requestOwnershipTransfer()`, `acceptOwnershipTransfer()`,
83
+ `cancelOwnershipTransfer()`). New types `DashboardVersion`, `DashboardDraftSnapshot`,
84
+ `DashboardPublishResult` and `DashboardView`, and the input types `CreateDashboardInput`,
85
+ `UpdateDashboardDraftInput`, `PublishDashboardInput`, `UpdateDashboardAccessInput` and
86
+ `TransferDashboardOwnershipInput`; version definitions are returned as stored, so older versions
87
+ may lack newer fields.
88
+
89
+ - **Dashboard draft elements and layout.** `mgmt.context.dashboards.elements(dashboardId)`
90
+ lists, reads, creates and updates the tiles and filters of a dashboard draft
91
+ (`list()`, `get()`, `create()`, `update()`), and `mgmt.context.dashboards.updateLayout()`
92
+ moves or resizes several of them in one change. Every write takes the `expectedRevision`
93
+ it is based on and throws `ConflictError` when the draft changed.
94
+
95
+ - Ingested-data uploads accept an optional source HTTP `response.status` from 100 through 599.
96
+
97
+ - **File uploads: optional `folderPath`.** `uploadFromUrl`, `finalize`, and directory
98
+ uploads now accept an optional relative folder label that is stored with the file and
99
+ returned on the file resource. `uploadDir` sets it automatically from each file's path
100
+ relative to the upload root, so directory structure is preserved.
101
+
102
+ - **Conversation lists: optional `source` and `sourceRef` filters.** `client.modus.conversations.list`
103
+ and `client.scopes.conversations(scopeId).list` now accept `source` to restrict results to
104
+ one UI surface (e.g. `"context_chat"`, `"dashboard_copilot"`, `"slack"`) and `sourceRef` to
105
+ narrow `source` to one instance of that surface — for `dashboard_copilot`, a dashboard id.
106
+ `sourceRef` requires `source`; sent on its own it is rejected with a 422. Conversations
107
+ recorded before the filter shipped carry no instance key and do not match it.
108
+
109
+ ### Changed
110
+
111
+ - **Scope MCP: Get Answer works alone.** `management.scopes.patchMcpConfig` now
112
+ rejects a config that turns `coreTools.chat` (`get_answer`) on together with
113
+ `getContext`, `teachModus` or any tool exposure, with HTTP 422. The call replaces the
114
+ whole config and omitted keys take their defaults: `chat` off, `getContext` on,
115
+ `teachModus` off, every tool exposed. To turn Get Answer on, send `chat: true`,
116
+ `getContext: false` and an empty `subset` exposure in one call.
117
+
118
+ - **Breaking (pre-1.0):** Ingested-data upload results now contain only `checksum`;
119
+ object keys are internal storage details.
120
+
121
+ - **Breaking (pre-1.0):** Directory-managed member groups no longer include member IDs.
122
+ Use the member count to determine their size. Native member groups are unchanged.
7
123
 
8
124
  ## [0.6.0] — 2026-08-15
9
125
 
126
+ ### Changed
127
+
128
+ - Public OpenAPI updates from production release.
129
+
130
+ ## [0.5.0] — 2026-08-08
10
131
 
11
132
  ### Changed
12
133
 
13
134
  - Public OpenAPI updates from production release.
14
135
 
136
+ ## [0.4.0] — 2026-08-01
15
137
 
16
- ## [Unreleased]
138
+ ### Changed
139
+
140
+ - Public OpenAPI updates from production release.
17
141
 
18
142
  ## [0.3.0] — 2026-07-26
package/README.md CHANGED
@@ -165,9 +165,36 @@ 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', { folderPath: 'reports/2026' })
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', { folderPath: 'archive' })
175
+ console.log(batch.uploaded.length, batch.failed.length)
176
+
177
+ const file = await mgmt.context.files.get(upload.uploadId)
178
+ const files = await mgmt.context.files.list()
179
+ console.log(file.status, files.items.length)
180
+
181
+ const rootFolders = await mgmt.context.items.list({
182
+ connectionIds: ['files'],
183
+ contextType: 'file_folder_metadata',
184
+ parentUids: [],
185
+ })
186
+ console.log(rootFolders.items.length)
187
+
188
+ const destination = rootFolders.items[0]
189
+ if (destination) {
190
+ const moved = await mgmt.context.items.move(upload.uploadId, {
191
+ destinationFolderUid: destination.uid,
192
+ })
193
+ console.log(moved.movedItems)
194
+ }
168
195
  ```
169
196
 
170
- Requires a token with write access to scopes and workflows (same as the Modus UI).
197
+ 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
198
 
172
199
  ## Pagination
173
200