@getmodus/sdk 0.1.0 → 0.2.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 +20 -33
- package/dist/{chunk-VLHNZJBG.js → chunk-7IOU7BOU.js} +2 -2
- package/dist/{conversations-nx1ujbiv.d.cts → conversations-DoyTcWk6.d.cts} +0 -5
- package/dist/{conversations-nx1ujbiv.d.ts → conversations-DoyTcWk6.d.ts} +0 -5
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/management/index.cjs +1 -1
- package/dist/management/index.d.cts +1 -1
- package/dist/management/index.d.ts +1 -1
- package/dist/management/index.js +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-VLHNZJBG.js.map → chunk-7IOU7BOU.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,48 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
**Current npm release:**
|
|
3
|
+
**Current npm release:** [`0.2.0`](https://www.npmjs.com/package/@getmodus/sdk/v/0.2.0).
|
|
4
4
|
|
|
5
|
-
## [Unreleased]
|
|
6
|
-
|
|
7
|
-
### Changed
|
|
8
|
-
|
|
9
|
-
- npm package scope is **`@getmodus/sdk`** (npm org `getmodus`; `@modus` scope was unavailable). Install with `npm install @getmodus/sdk`.
|
|
10
5
|
|
|
11
|
-
|
|
6
|
+
## [0.2.0] — 2026-07-20
|
|
12
7
|
|
|
13
|
-
|
|
14
|
-
- **`/scopes` + `/workflows` are now the only public surface.** `client.scopes` / `client.workflows` and `mgmt.scopes` / `mgmt.workflows` are canonical; they call the `/api/v1/scopes` and `/api/v1/workflows` routes and the `ScopesController_*` / `WorkflowsController_*` operationIds.
|
|
15
|
-
- Run creation: `client.workflows.runs.createScope(scopeId, body)` replaces the old `createSkill(...)` (routes to `/agent/v1/scopes/:id/runs`).
|
|
16
|
-
- Existing tokens that carry the legacy `skills:*` / `agents:*` scopes continue to authorize the renamed routes via server-side scope equivalence — no token re-issuance is required.
|
|
8
|
+
### Added
|
|
17
9
|
|
|
18
|
-
|
|
10
|
+
- Canonical **`client.scopes` / `client.workflows`** and **`mgmt.scopes` / `mgmt.workflows`** against `/api/v1/scopes` and `/api/v1/workflows`.
|
|
11
|
+
- **`client.suggestions`** — `list()` / `recordEvent()`.
|
|
12
|
+
- **`client.workflows.runs.active()` / `activeBySession(...)`** — active conversation runs.
|
|
13
|
+
- **`mgmt.scopes.evaluations(scopeId)`** — evaluation config, trigger, run history.
|
|
14
|
+
- Bounded conversation windows via optional `{ messageLimit, beforeMessageIndex }` on `conversations(id).get()`.
|
|
15
|
+
- MCP **`get_context_data`** batch + ACL: `{ items[], sessionId? }` → `{ results[] }` (max 20).
|
|
16
|
+
- Shipped examples under `examples/scripts/`.
|
|
17
|
+
- Full public OpenAPI operation coverage (contract-tested). Dual ESM + CJS. Zero runtime dependencies.
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
- Placeholder `SECURITY.md` (no verified security contact yet).
|
|
19
|
+
### Changed
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
- Package name is **`@getmodus/sdk`** (npm org `getmodus`). Install: `npm install @getmodus/sdk`.
|
|
22
|
+
- Run creation: `client.workflows.runs.createScope(scopeId, body)` (not `createSkill`).
|
|
23
|
+
- Public docs use **Scope** / **Workflow** vocabulary.
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
- `skills.conversations(id).get()` accepts an optional `{ messageLimit, beforeMessageIndex }` to request a bounded message window; the response gains an optional `messageWindow` field describing the returned slice. Omit both for the full conversation (unchanged default behavior).
|
|
27
|
-
- **`client.suggestions`** — `list()` returns approved suggested questions (optional `skillId`/`skillIds` filter), `recordEvent()` records an impression/click/dismiss event against a suggestion.
|
|
28
|
-
- **`client.workflows.runs.active(options)` / `activeBySession(sessionIds)`** — list active (queued/pending/running) conversation runs for the current user, or look up active runs for specific conversation thread ids.
|
|
29
|
-
- **`claude-sonnet-4.6`** restored as an allowed run `model` value (scope/workflow run creation and chat).
|
|
30
|
-
- **`mgmt.scopes.evaluations(scopeId)`** — `getConfig()` / `updateConfig()` manage a scope's evaluation schedule and judge settings; `triggerRun()` starts a manual evaluation run; `listRuns()` / `getRun(runId)` read run history and per-case results.
|
|
25
|
+
### Removed
|
|
31
26
|
|
|
32
|
-
|
|
27
|
+
- Legacy **`client.skills` / `client.agents`** and **`mgmt.skills` / `mgmt.agents`** accessors — use `scopes` / `workflows`.
|
|
33
28
|
|
|
34
|
-
|
|
29
|
+
## [Unreleased]
|
|
35
30
|
|
|
36
|
-
## [0.1.0] — 2026-
|
|
31
|
+
## [0.1.0] — 2026-07-20
|
|
37
32
|
|
|
38
33
|
### Added
|
|
39
34
|
|
|
40
|
-
- **`@getmodus/sdk`**
|
|
41
|
-
- **`Modus`** client — read / invoke: skills, agents, context, connections, Modus assistant chat, runs.
|
|
42
|
-
- **`ModusManagement`** (`@getmodus/sdk/management`) — configure: CRUD, deploy, context creators, usage, org admin.
|
|
43
|
-
- Cursor-based **`Page<T>`** pagination with `autoPagingIter()` (AIP-158 `pageSize` / `pageToken`).
|
|
44
|
-
- Automatic retry on 429 and 5xx with exponential backoff and `Retry-After` support.
|
|
45
|
-
- SSE streaming chat via `ChatStream` (`textStream()`, `eventStream()`).
|
|
46
|
-
- **58/58** public API operations covered; contract tests enforce OpenAPI parity.
|
|
47
|
-
- Dual **ESM + CommonJS** build (`import` and `require()`).
|
|
48
|
-
- Zero runtime dependencies.
|
|
35
|
+
- First public npm release of **`@getmodus/sdk`** (Node.js 18+): `Modus` + `ModusManagement`, pagination, retries, SSE chat, OpenAPI contract coverage.
|
|
@@ -1102,7 +1102,7 @@ function formatConfigForLog(config) {
|
|
|
1102
1102
|
}
|
|
1103
1103
|
|
|
1104
1104
|
// src/_http.ts
|
|
1105
|
-
var USER_AGENT = `modus-typescript/${"0.
|
|
1105
|
+
var USER_AGENT = `modus-typescript/${"0.2.0"} (node/${process.version}; ${process.platform})`;
|
|
1106
1106
|
function buildUrl(baseUrl, path, params) {
|
|
1107
1107
|
const url = new URL(path.startsWith("/") ? path : `/${path}`, baseUrl);
|
|
1108
1108
|
if (params) {
|
|
@@ -1678,4 +1678,4 @@ export {
|
|
|
1678
1678
|
CustomContextItemsResource,
|
|
1679
1679
|
ScopeConversationsResource
|
|
1680
1680
|
};
|
|
1681
|
-
//# sourceMappingURL=chunk-
|
|
1681
|
+
//# sourceMappingURL=chunk-7IOU7BOU.js.map
|
|
@@ -4093,7 +4093,6 @@ interface components {
|
|
|
4093
4093
|
*/
|
|
4094
4094
|
streamProtocolVersion?: 2;
|
|
4095
4095
|
experimentalFeatures?: boolean;
|
|
4096
|
-
modelOnly?: boolean;
|
|
4097
4096
|
debug?: boolean;
|
|
4098
4097
|
};
|
|
4099
4098
|
AttachmentsDto: {
|
|
@@ -4172,7 +4171,6 @@ interface components {
|
|
|
4172
4171
|
*/
|
|
4173
4172
|
streamProtocolVersion?: 2;
|
|
4174
4173
|
experimentalFeatures?: boolean;
|
|
4175
|
-
modelOnly?: boolean;
|
|
4176
4174
|
debug?: boolean;
|
|
4177
4175
|
/** @description Saved scope ids to scope the Modus run to. */
|
|
4178
4176
|
subordinateSkillIds?: number[];
|
|
@@ -4205,7 +4203,6 @@ interface components {
|
|
|
4205
4203
|
*/
|
|
4206
4204
|
streamProtocolVersion?: 2;
|
|
4207
4205
|
experimentalFeatures?: boolean;
|
|
4208
|
-
modelOnly?: boolean;
|
|
4209
4206
|
debug?: boolean;
|
|
4210
4207
|
/**
|
|
4211
4208
|
* @description Decision that resumes the interrupted run.
|
|
@@ -4231,7 +4228,6 @@ interface components {
|
|
|
4231
4228
|
toolset?: Record<string, never>;
|
|
4232
4229
|
strategies?: string[];
|
|
4233
4230
|
experimentalFeatures?: boolean;
|
|
4234
|
-
modelOnly?: boolean;
|
|
4235
4231
|
debug?: boolean;
|
|
4236
4232
|
/** @description Set false to keep composer output inline. */
|
|
4237
4233
|
composerFileOffload?: boolean;
|
|
@@ -4276,7 +4272,6 @@ interface components {
|
|
|
4276
4272
|
*/
|
|
4277
4273
|
streamProtocolVersion?: 2;
|
|
4278
4274
|
experimentalFeatures?: boolean;
|
|
4279
|
-
modelOnly?: boolean;
|
|
4280
4275
|
debug?: boolean;
|
|
4281
4276
|
/** @description Subordinate scope ids for an unsaved supervisor-scope draft test. */
|
|
4282
4277
|
subordinateSkillIds?: number[];
|
|
@@ -4093,7 +4093,6 @@ interface components {
|
|
|
4093
4093
|
*/
|
|
4094
4094
|
streamProtocolVersion?: 2;
|
|
4095
4095
|
experimentalFeatures?: boolean;
|
|
4096
|
-
modelOnly?: boolean;
|
|
4097
4096
|
debug?: boolean;
|
|
4098
4097
|
};
|
|
4099
4098
|
AttachmentsDto: {
|
|
@@ -4172,7 +4171,6 @@ interface components {
|
|
|
4172
4171
|
*/
|
|
4173
4172
|
streamProtocolVersion?: 2;
|
|
4174
4173
|
experimentalFeatures?: boolean;
|
|
4175
|
-
modelOnly?: boolean;
|
|
4176
4174
|
debug?: boolean;
|
|
4177
4175
|
/** @description Saved scope ids to scope the Modus run to. */
|
|
4178
4176
|
subordinateSkillIds?: number[];
|
|
@@ -4205,7 +4203,6 @@ interface components {
|
|
|
4205
4203
|
*/
|
|
4206
4204
|
streamProtocolVersion?: 2;
|
|
4207
4205
|
experimentalFeatures?: boolean;
|
|
4208
|
-
modelOnly?: boolean;
|
|
4209
4206
|
debug?: boolean;
|
|
4210
4207
|
/**
|
|
4211
4208
|
* @description Decision that resumes the interrupted run.
|
|
@@ -4231,7 +4228,6 @@ interface components {
|
|
|
4231
4228
|
toolset?: Record<string, never>;
|
|
4232
4229
|
strategies?: string[];
|
|
4233
4230
|
experimentalFeatures?: boolean;
|
|
4234
|
-
modelOnly?: boolean;
|
|
4235
4231
|
debug?: boolean;
|
|
4236
4232
|
/** @description Set false to keep composer output inline. */
|
|
4237
4233
|
composerFileOffload?: boolean;
|
|
@@ -4276,7 +4272,6 @@ interface components {
|
|
|
4276
4272
|
*/
|
|
4277
4273
|
streamProtocolVersion?: 2;
|
|
4278
4274
|
experimentalFeatures?: boolean;
|
|
4279
|
-
modelOnly?: boolean;
|
|
4280
4275
|
debug?: boolean;
|
|
4281
4276
|
/** @description Subordinate scope ids for an unsaved supervisor-scope draft test. */
|
|
4282
4277
|
subordinateSkillIds?: number[];
|
package/dist/index.cjs
CHANGED
|
@@ -1452,7 +1452,7 @@ function formatConfigForLog(config) {
|
|
|
1452
1452
|
}
|
|
1453
1453
|
|
|
1454
1454
|
// src/_http.ts
|
|
1455
|
-
var USER_AGENT = `modus-typescript/${"0.
|
|
1455
|
+
var USER_AGENT = `modus-typescript/${"0.2.0"} (node/${process.version}; ${process.platform})`;
|
|
1456
1456
|
function buildUrl(baseUrl, path, params) {
|
|
1457
1457
|
const url = new URL(path.startsWith("/") ? path : `/${path}`, baseUrl);
|
|
1458
1458
|
if (params) {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as components, H as HttpClient, M as ModusConfig, P as Page, A as AgentType, V as VariationView, a as Agent, C as ContextItem, b as ContextItemLookupRow, d as CustomContextItemsResource, e as ConversationKind, f as ConversationListItem, g as Conversation, S as ScopeConversationsResource, h as Skill, i as ModusClientBase, j as ModusOptions } from './conversations-
|
|
2
|
-
export { k as ContextType, l as Message, O as OPERATIONS, m as OperationId, n as OperationSpec, o as SkillStatus, p as SkillVariation, q as conversationSkillId, r as operations, s as paths } from './conversations-
|
|
1
|
+
import { c as components, H as HttpClient, M as ModusConfig, P as Page, A as AgentType, V as VariationView, a as Agent, C as ContextItem, b as ContextItemLookupRow, d as CustomContextItemsResource, e as ConversationKind, f as ConversationListItem, g as Conversation, S as ScopeConversationsResource, h as Skill, i as ModusClientBase, j as ModusOptions } from './conversations-DoyTcWk6.cjs';
|
|
2
|
+
export { k as ContextType, l as Message, O as OPERATIONS, m as OperationId, n as OperationSpec, o as SkillStatus, p as SkillVariation, q as conversationSkillId, r as operations, s as paths } from './conversations-DoyTcWk6.cjs';
|
|
3
3
|
|
|
4
4
|
declare class ModusError extends Error {
|
|
5
5
|
readonly statusCode?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as components, H as HttpClient, M as ModusConfig, P as Page, A as AgentType, V as VariationView, a as Agent, C as ContextItem, b as ContextItemLookupRow, d as CustomContextItemsResource, e as ConversationKind, f as ConversationListItem, g as Conversation, S as ScopeConversationsResource, h as Skill, i as ModusClientBase, j as ModusOptions } from './conversations-
|
|
2
|
-
export { k as ContextType, l as Message, O as OPERATIONS, m as OperationId, n as OperationSpec, o as SkillStatus, p as SkillVariation, q as conversationSkillId, r as operations, s as paths } from './conversations-
|
|
1
|
+
import { c as components, H as HttpClient, M as ModusConfig, P as Page, A as AgentType, V as VariationView, a as Agent, C as ContextItem, b as ContextItemLookupRow, d as CustomContextItemsResource, e as ConversationKind, f as ConversationListItem, g as Conversation, S as ScopeConversationsResource, h as Skill, i as ModusClientBase, j as ModusOptions } from './conversations-DoyTcWk6.js';
|
|
2
|
+
export { k as ContextType, l as Message, O as OPERATIONS, m as OperationId, n as OperationSpec, o as SkillStatus, p as SkillVariation, q as conversationSkillId, r as operations, s as paths } from './conversations-DoyTcWk6.js';
|
|
3
3
|
|
|
4
4
|
declare class ModusError extends Error {
|
|
5
5
|
readonly statusCode?: number;
|
package/dist/index.js
CHANGED
|
@@ -177,7 +177,7 @@ function formatConfigForLog(config) {
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
// src/_http.ts
|
|
180
|
-
var USER_AGENT = `modus-typescript/${"0.
|
|
180
|
+
var USER_AGENT = `modus-typescript/${"0.2.0"} (node/${process.version}; ${process.platform})`;
|
|
181
181
|
function buildUrl(baseUrl, path, params) {
|
|
182
182
|
const url = new URL(path.startsWith("/") ? path : `/${path}`, baseUrl);
|
|
183
183
|
if (params) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HttpClient, M as ModusConfig, c as components, A as AgentType, m as OperationId, V as VariationView, P as Page, a as Agent, C as ContextItem, t as ContextItemDeletion, d as CustomContextItemsResource, u as CreatedContextItem, S as ScopeConversationsResource, h as Skill, i as ModusClientBase, j as ModusOptions } from '../conversations-
|
|
1
|
+
import { H as HttpClient, M as ModusConfig, c as components, A as AgentType, m as OperationId, V as VariationView, P as Page, a as Agent, C as ContextItem, t as ContextItemDeletion, d as CustomContextItemsResource, u as CreatedContextItem, S as ScopeConversationsResource, h as Skill, i as ModusClientBase, j as ModusOptions } from '../conversations-DoyTcWk6.cjs';
|
|
2
2
|
|
|
3
3
|
type AgentInterface = components['schemas']['AgentInterfaceDto'];
|
|
4
4
|
type AddAgentInterface = components['schemas']['AddAgentInterfaceDto'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HttpClient, M as ModusConfig, c as components, A as AgentType, m as OperationId, V as VariationView, P as Page, a as Agent, C as ContextItem, t as ContextItemDeletion, d as CustomContextItemsResource, u as CreatedContextItem, S as ScopeConversationsResource, h as Skill, i as ModusClientBase, j as ModusOptions } from '../conversations-
|
|
1
|
+
import { H as HttpClient, M as ModusConfig, c as components, A as AgentType, m as OperationId, V as VariationView, P as Page, a as Agent, C as ContextItem, t as ContextItemDeletion, d as CustomContextItemsResource, u as CreatedContextItem, S as ScopeConversationsResource, h as Skill, i as ModusClientBase, j as ModusOptions } from '../conversations-DoyTcWk6.js';
|
|
2
2
|
|
|
3
3
|
type AgentInterface = components['schemas']['AgentInterfaceDto'];
|
|
4
4
|
type AddAgentInterface = components['schemas']['AddAgentInterfaceDto'];
|
package/dist/management/index.js
CHANGED
package/package.json
CHANGED
|
File without changes
|