@getmodus/sdk 0.13.0 → 0.14.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
@@ -9,6 +9,55 @@ release, including pre-1.0 (`0.x`) releases.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [0.14.0] — 2026-12-06
13
+
14
+ ### Added
15
+
16
+ - Usage breakdowns group by `activity` (`llm_call`, `composition`, `tool_call`), `composition_mode` (`fast`, `deep`), `tool_family`, `tool_name` and `tool_source`, and filter by `activity`, `tool_family` and `tool_source`. `tool_source` is `mcp` for tool calls made through a Modus MCP server and `run` for tool calls inside a scope chat or workflow run. Compositions and tool calls appear only for organizations billed for them, which is enabled per organization; elsewhere all usage is `llm_call`. Usage a grouping does not apply to is `""`.
17
+ - Manage dashboard tabs through `updateLayout({ tabs: ... })`, choose a destination with `tabId` when creating elements, and read or update tile explanations through `description`. Element listings include tab names and assignments.
18
+ - Run resumes accept an optional interrupt ID to answer one approval or connection request while leaving other requests pending.
19
+ - `auditEvents.list` and `auditEvents.count` accept `outcome` to filter by `success` or `failure`.
20
+ - Share conversations with organization members, list recipients and revoke access.
21
+ - Conversation detail includes `canSend` so clients can disable sending in conversations shared with the caller.
22
+ - Browse connection workspace trees, discover and invoke integration actions, and generate text completions.
23
+ - Manage Context reporting, graphs, organization learnings, artifacts and comments, and dashboard alerts and queries through `ModusManagement.context`.
24
+ - Discuss Context suggestions and answer pending approvals through `workflows.runs.createSuggestion` and `workflows.runs.resumeSuggestion`.
25
+ - Read connection and Git synchronization status, manage connection access, and inspect credential-free LLM and directory synchronization metadata.
26
+ - Get user activity and the service accounts active in a usage window.
27
+ - Manage a workflow's inbound email address, including rotation, disabling delivery, re-enabling delivery and revoking the previous address.
28
+ - List, approve, dismiss and undo context suggestions through `management.context.suggestions`.
29
+ - `scopes.applySelectionOps` accepts `enableToolAction` with a built-in tool and action key to enable one action in a scope draft while preserving its other settings.
30
+ - `management.auditEvents.list()` reads your organization's audit log, filterable by time range, actor, action and resource (owners and admins; events are kept for 92 days).
31
+
32
+ ### Changed
33
+
34
+ - Usage credits and `call_count` include context compositions and tool calls for organizations billed for them, which is enabled per organization. Compositions and tool calls carry no tokens.
35
+ - Usage breakdowns return `workflow` as the interface of workflow runs that no client started, `chat` for the home chat with Modus in the scope and attribution breakdowns, and `no_scope` in the attribution breakdown for a request of your own with no scope or workflow, such as a context request through the API. `workflow` and `chat` also work as `interface` and `skill_id` filters. A `skill_id` filter of `0` no longer matches the home chat; filter by `chat` instead.
36
+ - Connection access grants `use` and `manage` separately once separate grants are enabled for your organization: `connections.updateAccess()` with `{ use: true, manage: false }` then grants Use only (until then it is stored as both), `{ use: false, manage: true }` is stored as both, and the update returns 400 unless a group with members keeps `manage` and you keep it too. `connections.listViews()` items carry `canManage`; an item with `accessDenied: false`, no `error` and `canManage: false` returns `settings: {}`; denied and `error` items carry no `settings`.
37
+ - **MAJOR:** `scopes.applySelectionOps()` now calls `POST /scopes/{id}/apply-selection`. The server removed `POST /scopes/{id}/apply-selection-ops`, so every earlier SDK version gets a 404 on it until it upgrades. Release this SDK after the server.
38
+ - **MAJOR:** `customItems.createRelations()` now calls `POST /context/custom-items/relations/batch`; the server removed `POST /context/custom-items/relations`, so an earlier SDK version cannot create relations. Release this SDK after the server.
39
+ - **MAJOR:** `context.files.createUploadUrls()` and `uploadFromUrls()` now call `/upload-urls/batch` and `/upload-from-urls/batch`. The server removed `POST /context/files/upload-urls` and `POST /context/files/upload-from-urls`, so every earlier SDK version gets a 404 on bulk upload (including `uploadDir`) until it upgrades. Release this SDK after the server. Release this SDK after the server.
40
+ - Scope supervision writes and `scopes.update()` manager moves now return 422 when they add a missing, deleted, or inaccessible subordinate scope. Existing subordinate entries can still be kept or removed.
41
+ - File uploads (`context.files` upload-url, upload-urls, upload-from-url, upload-from-urls), `customItems.batchDelete` and `scopes.applySelectionOps` now call kebab-case paths (`/upload-url`, `/batch-delete`, `/apply-selection-ops`, ...). The camelCase paths are removed; no external caller used them in 30 days of production access logs.
42
+ - **MAJOR:** Custom context relation types `duplicates`, `contradicts`, and `refers_to` are reserved for system-managed learning links and cannot be written through `customItems.createRelations()`.
43
+ - **MAJOR:** Custom context relation type `overlaps` is reserved for system-managed learning links and cannot be written through `customItems.createRelations()`.
44
+
45
+ ### Removed
46
+
47
+ - **MAJOR, BREAKING:** the conversation file listing no longer returns `signedUrl` and `expiresAt` on each file (`ConversationFile`); download a file with its path.
48
+ - **MAJOR, BREAKING:** `management.context.artifacts.getDownload()` and `getVersionDownload()`, `management.context.reporting.getImagePreview()` and `scopes.getUploadContentUrl()` send `POST` instead of `GET`, so the audit log records each download; the old `GET .../download`, `GET .../image-preview` and `GET .../files/{uploadId}/content` endpoints are gone. `getUploadContentUrl(threadId, uploadId, request)` takes the file name in a request body (`{ fileName }`) instead of an `options.fileName` query parameter.
49
+ - **MAJOR, BREAKING:** `management.context.artifacts.setVersionPin()` takes the artifact's `kind` and `id` as arguments (`setVersionPin(kind, id, { versionId, name })`); the old `PUT /context/artifacts/version-pin` endpoint is gone.
50
+ - **MAJOR, BREAKING:** `management.context.artifacts.move()` and `delete()` take the artifact's `kind` and `id` as arguments (`move(kind, id, { folderId })`, `delete(kind, id)`); the old `POST /context/artifacts/place` and `/delete` endpoints are gone.
51
+ - **MAJOR, BREAKING:** `management.context.reporting.refreshCoverage(connectionId, { integrationType })` takes the connection as an argument; the `connectionId` query parameter and its endpoint are gone.
52
+ - **MAJOR, BREAKING:** `management.context.reporting.clearItemError()` is removed, and `clearItemErrors()` clears a context type across the organization only (`connectionId` and `dataPath` are gone). Call `clearConnectionErrors(connectionId, { contextType, dataPath? })` to clear a connection or one row.
53
+ - **MAJOR, BREAKING:** `management.git.connectFork(connectionId, request)` takes the connection as an argument; the old endpoint with `connectionId` in its body is gone. `management.context.customItems.batchDelete()` keeps its signature but calls `POST /context/custom-items/sources/{sourceId}/delete`, so it needs a server that has the new route.
54
+ - **MAJOR, BREAKING:** `workflows.interfaces(id).deleteAll()` is removed; the endpoint behind it, `DELETE /workflows/{id}/interfaces`, is gone. Call `delete(interfaceId)` for each interface.
55
+ - **MAJOR:** `selectionId` is removed from context items and from the row `context.items.lookup()` returns; the API no longer sends it. `dataPath` places the item (for custom context, `dataPath[1]` is the source id).
56
+
57
+ ### Fixed
58
+
59
+ - Usage filtered on `skill_id`, `agent_id` or `interface` no longer includes Work by Modus usage, so it equals that group in the matching `group_by` breakdown. This mattered for an empty value (usage with no scope, no workflow or no interface), which used to count all Work by Modus usage.
60
+
12
61
  ## [0.13.0] — 2026-11-29
13
62
 
14
63
  ### Removed
@@ -48,6 +97,39 @@ release, including pre-1.0 (`0.x`) releases.
48
97
  - **Breaking (pre-1.0): a scope read returns one `connectionSet` entry per connection.** `variation.connectionSet` is `{ connection_id: string; preferences?: Record<string, unknown> }[]`: `path` (one row per included path) and `context_enabled` are removed, so a connection appears once, with its `preferences`. `preferences` is absent only on the entry of a deleted connection, whose `connection_id` is a placeholder and which grants nothing. An entry with `preferences` can be sent back unchanged in `scopes.update()`; drop one without `preferences` first, or the write fails with 400 `legacy_entry`. Migration: read what a connection selects from its `preferences` instead of `path`.
49
98
  - **Breaking (pre-1.0): `context_enabled` and `contextEnabled` are removed from scope writes.** A `connectionSet` entry in `scopes.create()` and `scopes.update()` is `{ connection_id, preferences }`, and a `setConnectionPreferences` op in `applySelectionOps()` is `{ op, connectionId, preferences }`. A scope reads context from every connection it lists. Sending `false` fails with 400 (`info.reason` `legacy_entry` on a `connectionSet` entry); `true` is ignored.
50
99
 
100
+ ## [0.12.0] — 2026-11-21
101
+
102
+ ### Removed
103
+
104
+ - **MAJOR:** Custom context item relations no longer accept `content`. Use `edgeProperties` (`edge_properties` in Python) for a flat map of primitives or primitive arrays; omitting it replaces the map with `{}`.
105
+
106
+ ### Added
107
+
108
+ - **Personal tools in a toolset.** `PlatformToolsetEntry.personal` (`{ actions, rules? }`, beside `byConnection`) grants actions on the personal connection of whoever runs the skill. A runner who has not connected the platform is asked to connect it in chat, or gets a tool error elsewhere; nobody else's connection is used. Only platforms people connect personally (Gmail, Google Calendar, Google Drive and others) take it.
109
+ - **`personal` MCP exposure family.** `McpExposureFamily` includes `personal`: the MCP exposure catalog lists a platform's personal grant as one row (`toolset_personal:<platform>`, with `toolset_action:<platform>:personal:<action>` per tool) that runs on the own personal connection of whoever calls it.
110
+ - **`email` run source.** `RunSource` and `SupplementalContextSource` include `email`, for runs started by an email sent to a workflow's address; the conversation list's `source` filter accepts it. Only the email trigger records it: an API-token run asking for it still records its server-owned source (`api`, or `modus_api` for Modus runs), and `supplementalContext.source: 'email'` is refused with 400.
111
+ - **`attachments` and `origin` on a workflow run.** `workflows.runs.get()` (the run detail) includes `attachments`, the files the run was started with by name, with MIME type and size when known (a file the trigger left out carries `skipped.reason`, `too_large` or `too_many`), and `origin`, where the run came from (`source`, such as `api` or `schedule`; `unknown` for a run that did not record it). An email-started run will also carry `from`, `fromName` and `subject` when the email has them. Both fields can be absent on responses from older servers. File contents are not returned.
112
+ - **`includeOrgLearnings` on `scopes.create`.** The org-wide learnings path is added to a new scope's selections unless `includeOrgLearnings: false`, or `contextSelections` already mention learnings or are context filters without a rule-based query; the scope reads the entries the caller can see. They are a learnings path in the scope's context selections (`auto_generated:org`), so they can be removed or added later like the scope's own learnings; `includeOrgLearnings: false` only skips adding the path, and selections that already name it still read them.
113
+ - **Move into a folder path.** `mgmt.context.items.move(uid, { destinationFolderPath })` moves a file or folder to a root-relative path such as `reports/2026`; missing folders on the path are created with the move, and existing ones are reused. `{ destinationFolderUid }` is unchanged.
114
+ - Context item access updates now support organization learnings, with the same user and group sharing controls as notes.
115
+
116
+ ### Changed
117
+
118
+ - **`workflows.chat()` runs a workflow without a message or a model.** `message` defaults to `''` and `options` is optional, so `await client.workflows.chat(workflowId)` triggers a run with no input, like Run Now in the app. `workflows.runs.create()` accepts a body without `message` or `sessionId` too.
119
+ - A scope save that adds a personal connection's UUID to `<platform>.byConnection`, or adds actions to one stored there, is refused with 422 (`UnprocessableError`, rule `toolset.personal_connection`); grant it with `personal` instead. Sending a stored entry back unchanged, or with fewer actions, still saves.
120
+ - **Changed:** a workflow created without `accessConfig` (`workflows.create()`) is now private, with no group grants and no invitees; its creator can share it later. Pass an `accessConfig` with `visibility: 'shared'` for the previous behaviour. A service account token that omits it still creates the workflow shared with the whole organization. Existing workflows are unchanged.
121
+ - **Changed:** an unfiltered scope conversation list (or one filtered by user or timeframe) now includes conversations you did not take part in, but such a conversation carries only who took part and when: an empty first message, a null title and source, a message count of 0 and no tools. Each item has a new optional `ownedByCaller` that says whether you took part. Getting such a conversation, its files, or renaming it now fails with 404, whatever your role. A `toolName` or `source` filter matches only conversations you took part in, and combining either with another member's user id fails with 400.
122
+ - Custom context relation documentation lists reserved system names (`contains`, `reads`, `joins_with`, `has_context`, `has_feedback`, `filters_by`, `context_relation`) and explains that dotted names are reserved.
123
+
124
+ ### Deprecated
125
+
126
+ - **`model` on `workflows.chat()`** (`WorkflowChatOptions.model`). A workflow's steps run with the models set in the workflow, so the option was never used; it is no longer sent. The `config`, `fileThreadId`, `debug`, `experimentalFeatures` and `streamProtocolVersion` fields of a workflow run body are deprecated for the same reason: the server accepts and ignores them.
127
+
128
+ ### Removed
129
+
130
+ - **Breaking (pre-1.0): a scope read returns one `connectionSet` entry per connection.** `variation.connectionSet` is `{ connection_id: string; preferences?: Record<string, unknown> }[]`: `path` (one row per included path) and `context_enabled` are removed, so a connection appears once, with its `preferences`. `preferences` is absent only on the entry of a deleted connection, whose `connection_id` is a placeholder and which grants nothing. An entry with `preferences` can be sent back unchanged in `scopes.update()`; drop one without `preferences` first, or the write fails with 400 `legacy_entry`. Migration: read what a connection selects from its `preferences` instead of `path`.
131
+ - **Breaking (pre-1.0): `context_enabled` and `contextEnabled` are removed from scope writes.** A `connectionSet` entry in `scopes.create()` and `scopes.update()` is `{ connection_id, preferences }`, and a `setConnectionPreferences` op in `applySelectionOps()` is `{ op, connectionId, preferences }`. A scope reads context from every connection it lists. Sending `false` fails with 400 (`info.reason` `legacy_entry` on a `connectionSet` entry); `true` is ignored.
132
+
51
133
  ## [0.11.0] — 2026-11-14
52
134
 
53
135
  ### Added