@getmodus/sdk 0.9.0 → 0.11.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 +166 -0
- package/README.md +189 -14
- package/dist/{conversations-D7ffhHIh.d.cts → _client-base-DdnxB9JA.d.cts} +4425 -1674
- package/dist/{conversations-D7ffhHIh.d.ts → _client-base-DdnxB9JA.d.ts} +4425 -1674
- package/dist/chunk-3MHHVC6C.cjs +2678 -0
- package/dist/chunk-3MHHVC6C.cjs.map +1 -0
- package/dist/{chunk-SP4UYRYG.js → chunk-JVTQBBMZ.js} +613 -304
- package/dist/chunk-JVTQBBMZ.js.map +1 -0
- package/dist/index.cjs +585 -2800
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +802 -614
- package/dist/index.d.ts +802 -614
- package/dist/index.js +434 -300
- package/dist/index.js.map +1 -1
- package/dist/management/index.cjs +555 -2659
- package/dist/management/index.cjs.map +1 -1
- package/dist/management/index.d.cts +211 -42
- package/dist/management/index.d.ts +211 -42
- package/dist/management/index.js +291 -98
- package/dist/management/index.js.map +1 -1
- package/package.json +8 -1
- package/dist/chunk-SP4UYRYG.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HttpClient, M as ModusConfig, W as WorkflowType, V as VariationView, P as Page,
|
|
1
|
+
import { H as HttpClient, M as ModusConfig, W as WorkflowType, V as VariationView, P as Page, e as Workflow, c as components, z as OperationId, h as ContextItem, p as ContextItemDeletion, q as ContextItemMove, U as UpdateContextItemAccessInput, n as ContextItemAccessUpdate, j as CustomContextItemsResource, T as CreatedContextItem, S as Scope, J as SupervisionView, a as ScopeConversationsResource, k as ModusClientBase, l as ModusOptions } from '../_client-base-DdnxB9JA.cjs';
|
|
2
2
|
|
|
3
3
|
/** Generated base for the management `workflows` resource. */
|
|
4
4
|
declare class WorkflowsResourceBase {
|
|
@@ -19,8 +19,9 @@ declare class WorkflowsResourceBase {
|
|
|
19
19
|
* for the first page.
|
|
20
20
|
* @param options.search - Case-insensitive substring filter on workflow name.
|
|
21
21
|
* @param options.type - Filter by workflow type.
|
|
22
|
-
* @param options.view - Variation view. `active` reads deployed
|
|
23
|
-
* snapshot.
|
|
22
|
+
* @param options.view - Variation view. `active` reads the deployed version. `draft` reads the
|
|
23
|
+
* latest builder snapshot. `published` reads only a published workflow of type workflow that
|
|
24
|
+
* you can use; tasks are excluded.
|
|
24
25
|
* @param options.includeVariation - Include the requested variation payload (`trigger`,
|
|
25
26
|
* `workflowStructure`, `agentSelection`) on list rows.
|
|
26
27
|
* @returns A page of workflows.
|
|
@@ -46,7 +47,7 @@ declare class WorkflowsResourceBase {
|
|
|
46
47
|
* Delete a workflow.
|
|
47
48
|
*
|
|
48
49
|
* Deletes a workflow and stops its schedule. The workflow can be restored later with POST
|
|
49
|
-
* /workflows/{id}/restore.
|
|
50
|
+
* /workflows/{id}/restore. Returns 404 if the workflow does not exist or is already deleted.
|
|
50
51
|
*
|
|
51
52
|
* **Requires:** `workflows:write`
|
|
52
53
|
*
|
|
@@ -105,7 +106,7 @@ declare class WorkflowsInterfacesResourceBase {
|
|
|
105
106
|
* List interfaces attached to a workflow.
|
|
106
107
|
*
|
|
107
108
|
* Returns every Slack, MCP, or Teams interface bound to the workflow. Requires manage permission
|
|
108
|
-
* on the workflow.
|
|
109
|
+
* on the workflow: returns 403 if you can only use it, and 404 if you cannot access it.
|
|
109
110
|
*
|
|
110
111
|
* **Requires:** `workflows:read`
|
|
111
112
|
*/
|
|
@@ -177,7 +178,6 @@ interface CreateWorkflowOptions {
|
|
|
177
178
|
trigger?: TriggerInput;
|
|
178
179
|
agentSelection?: AgentSelectionInput;
|
|
179
180
|
workflowStructure?: WorkflowGraphInput;
|
|
180
|
-
guardrails?: string[];
|
|
181
181
|
}
|
|
182
182
|
/** @deprecated Use `CreateWorkflowOptions` instead. */
|
|
183
183
|
type CreateAgentOptions = CreateWorkflowOptions;
|
|
@@ -188,7 +188,6 @@ interface UpdateWorkflowOptions {
|
|
|
188
188
|
trigger?: TriggerInput;
|
|
189
189
|
agentSelection?: AgentSelectionInput;
|
|
190
190
|
workflowStructure?: WorkflowGraphInput;
|
|
191
|
-
guardrails?: string[];
|
|
192
191
|
updateMask?: string;
|
|
193
192
|
}
|
|
194
193
|
/** @deprecated Use `UpdateWorkflowOptions` instead. */
|
|
@@ -198,13 +197,14 @@ declare class ManagementWorkflowsResource extends WorkflowsResourceBase {
|
|
|
198
197
|
/**
|
|
199
198
|
* Retrieve a workflow with full configuration.
|
|
200
199
|
*
|
|
201
|
-
* @param workflowId -
|
|
202
|
-
* @param options.view - Variation view: `"active"` (deployed) or `"
|
|
200
|
+
* @param workflowId - Numeric workflow id.
|
|
201
|
+
* @param options.view - Variation view: `"active"` (deployed), `"draft"`, or `"published"` (published workflow you can use).
|
|
203
202
|
* @returns The workflow.
|
|
204
203
|
* @example
|
|
205
204
|
* ```ts
|
|
206
205
|
* const mgmt = new ModusManagement()
|
|
207
|
-
* const
|
|
206
|
+
* const [first] = (await mgmt.workflows.list()).items
|
|
207
|
+
* const wf = await mgmt.workflows.get(first.id)
|
|
208
208
|
* console.log(wf.name, wf.status)
|
|
209
209
|
* ```
|
|
210
210
|
*/
|
|
@@ -222,14 +222,13 @@ declare class ManagementWorkflowsResource extends WorkflowsResourceBase {
|
|
|
222
222
|
* Create a new workflow in the organization.
|
|
223
223
|
*
|
|
224
224
|
* @param options.name - Display name for the workflow.
|
|
225
|
-
* @param options.type - `"task"`
|
|
225
|
+
* @param options.type - `"workflow"`. `"task"` is a deprecated alias the server stores as `"workflow"`.
|
|
226
226
|
* @param options.trigger - Optional trigger configuration.
|
|
227
|
-
* @param options.guardrails - Runtime guardrail labels (for example `"no-pii"`). Omit to create with no guardrails.
|
|
228
227
|
* @returns The created workflow (draft).
|
|
229
228
|
* @example
|
|
230
229
|
* ```ts
|
|
231
230
|
* const mgmt = new ModusManagement()
|
|
232
|
-
* const wf = await mgmt.workflows.create({ name: 'Daily report', type: '
|
|
231
|
+
* const wf = await mgmt.workflows.create({ name: 'Daily report', type: 'workflow' })
|
|
233
232
|
* ```
|
|
234
233
|
*/
|
|
235
234
|
create(options: CreateWorkflowOptions): Promise<Workflow>;
|
|
@@ -237,10 +236,10 @@ declare class ManagementWorkflowsResource extends WorkflowsResourceBase {
|
|
|
237
236
|
* Update a workflow's configuration.
|
|
238
237
|
*
|
|
239
238
|
* Only the fields you pass are changed. To clear a field, name it in
|
|
240
|
-
* `updateMask` and leave its argument unset
|
|
239
|
+
* `updateMask` and leave its argument unset: it is sent as `null`.
|
|
241
240
|
*
|
|
242
|
-
* @param workflowId -
|
|
243
|
-
* @param options.
|
|
241
|
+
* @param workflowId - Numeric workflow id.
|
|
242
|
+
* @param options.type - Only `"workflow"` is accepted; `"task"` is rejected with a 422.
|
|
244
243
|
* @param options.updateMask - Comma-separated field names to update or clear.
|
|
245
244
|
* @returns The updated workflow.
|
|
246
245
|
* @example
|
|
@@ -336,7 +335,7 @@ declare class ManagementContextItemsResource {
|
|
|
336
335
|
* Update a context item.
|
|
337
336
|
*
|
|
338
337
|
* Only the fields you pass are changed. To clear a field, name it in
|
|
339
|
-
* `updateMask` and leave its argument unset
|
|
338
|
+
* `updateMask` and leave its argument unset: it is sent as `null`.
|
|
340
339
|
*
|
|
341
340
|
* @param uid - Context item uid.
|
|
342
341
|
* @param options.content - Replacement type-specific content.
|
|
@@ -391,6 +390,35 @@ declare class ManagementContextItemsResource {
|
|
|
391
390
|
move(uid: string, options: {
|
|
392
391
|
destinationFolderUid: string | null;
|
|
393
392
|
}): Promise<ContextItemMove>;
|
|
393
|
+
/**
|
|
394
|
+
* Replace who can view and manage a note, saved query, link or uploaded file.
|
|
395
|
+
*
|
|
396
|
+
* All three settings are required and replace the current ones. You cannot
|
|
397
|
+
* remove your own manage access. An item created before items had owners
|
|
398
|
+
* becomes yours on the first change.
|
|
399
|
+
*
|
|
400
|
+
* @param uid - UUID of the context item.
|
|
401
|
+
* @param input.visibility - `shared` (the owner plus the groups in
|
|
402
|
+
* `groupPermissions`) or `private` (the owner plus the users in `sharedWith`).
|
|
403
|
+
* @param input.groupPermissions - Group id to `{ use, manage }`. Used only when shared.
|
|
404
|
+
* @param input.sharedWith - Users such as `{ email: 'ana@example.com', permission: 'use' }`.
|
|
405
|
+
* Used only when private.
|
|
406
|
+
* @returns The item's new access settings and whether you can still manage it.
|
|
407
|
+
* @throws {NotFoundError} The item does not exist or you cannot view it.
|
|
408
|
+
* @throws {PermissionDeniedError} You can view the item but not manage it.
|
|
409
|
+
* @throws {ModusError} The item is another type, a group or user is invalid,
|
|
410
|
+
* or the change would remove your own manage access.
|
|
411
|
+
*
|
|
412
|
+
* @example
|
|
413
|
+
* ```ts
|
|
414
|
+
* await mgmt.context.items.updateAccess('PLACEHOLDER_UID', {
|
|
415
|
+
* visibility: 'private',
|
|
416
|
+
* groupPermissions: {},
|
|
417
|
+
* sharedWith: [{ email: 'ana@example.com', permission: 'use' }],
|
|
418
|
+
* })
|
|
419
|
+
* ```
|
|
420
|
+
*/
|
|
421
|
+
updateAccess(uid: string, input: UpdateContextItemAccessInput): Promise<ContextItemAccessUpdate>;
|
|
394
422
|
}
|
|
395
423
|
|
|
396
424
|
type UserFeedback = 'positive' | 'neutral' | 'negative';
|
|
@@ -1269,6 +1297,9 @@ declare class ManagementContextResource {
|
|
|
1269
1297
|
private create;
|
|
1270
1298
|
}
|
|
1271
1299
|
|
|
1300
|
+
type McpExposureCatalogRequest = components['schemas']['McpExposureCatalogRequestDto'];
|
|
1301
|
+
type McpExposureCatalog = components['schemas']['McpExposureCatalogResponseDto'];
|
|
1302
|
+
|
|
1272
1303
|
/** Generated base for the management `scopes` resource. */
|
|
1273
1304
|
declare class ScopesResourceBase {
|
|
1274
1305
|
protected readonly http: HttpClient;
|
|
@@ -1287,8 +1318,9 @@ declare class ScopesResourceBase {
|
|
|
1287
1318
|
* @param options.pageToken - Opaque page token from a previous response's `nextPageToken`. Omit
|
|
1288
1319
|
* for the first page.
|
|
1289
1320
|
* @param options.search - Case-insensitive substring filter on scope name.
|
|
1290
|
-
* @param options.view - Variation view. `active` reads deployed
|
|
1291
|
-
* snapshot.
|
|
1321
|
+
* @param options.view - Variation view. `active` reads the deployed version, or the latest draft
|
|
1322
|
+
* when nothing is published. `draft` reads the latest builder snapshot. `published` reads only
|
|
1323
|
+
* the published version, and only scopes you can use.
|
|
1292
1324
|
* @param options.managerId - Return only scopes supervised by this manager scope id.
|
|
1293
1325
|
* @returns A page of scopes.
|
|
1294
1326
|
*
|
|
@@ -1311,13 +1343,15 @@ declare class ScopesResourceBase {
|
|
|
1311
1343
|
/**
|
|
1312
1344
|
* Get a scope.
|
|
1313
1345
|
*
|
|
1314
|
-
* Returns a scope. `view=active` (default)
|
|
1315
|
-
*
|
|
1346
|
+
* Returns a scope. `view=active` (default) is the deployed version, or the latest draft when
|
|
1347
|
+
* nothing is published. `view=draft` is the latest edits. `view=published` is only the published
|
|
1348
|
+
* version, and only if you can use the scope. Returns 404 if you cannot access it.
|
|
1316
1349
|
*
|
|
1317
1350
|
* **Requires:** `scopes:read`
|
|
1318
1351
|
*
|
|
1319
1352
|
* @param scopeId - Numeric scope id.
|
|
1320
|
-
* @param options.view - Which
|
|
1353
|
+
* @param options.view - Which version to read. Defaults to `active`. `published` is only the
|
|
1354
|
+
* published version, and only if you can use the scope.
|
|
1321
1355
|
*
|
|
1322
1356
|
* @example
|
|
1323
1357
|
* ```ts
|
|
@@ -1332,8 +1366,8 @@ declare class ScopesResourceBase {
|
|
|
1332
1366
|
/**
|
|
1333
1367
|
* Delete a scope.
|
|
1334
1368
|
*
|
|
1335
|
-
* Deletes a scope. The scope can be restored later with POST /scopes/{id}/restore.
|
|
1336
|
-
*
|
|
1369
|
+
* Deletes a scope. The scope can be restored later with POST /scopes/{id}/restore. Returns 404 if
|
|
1370
|
+
* the scope does not exist or is already deleted.
|
|
1337
1371
|
*
|
|
1338
1372
|
* **Requires:** `scopes:write`
|
|
1339
1373
|
*
|
|
@@ -1346,6 +1380,25 @@ declare class ScopesResourceBase {
|
|
|
1346
1380
|
* ```
|
|
1347
1381
|
*/
|
|
1348
1382
|
delete(scopeId: number | string): Promise<void>;
|
|
1383
|
+
/**
|
|
1384
|
+
* Preview MCP exposure catalog.
|
|
1385
|
+
*
|
|
1386
|
+
* Lists tools this scope can expose to MCP clients. A field you send replaces the current draft;
|
|
1387
|
+
* a field you omit stays as stored. Nothing is saved. Entries you cannot access are left out, and
|
|
1388
|
+
* stored selections on them are counted in hiddenSelectedCount.
|
|
1389
|
+
*
|
|
1390
|
+
* **Requires:** `scopes:write`
|
|
1391
|
+
*
|
|
1392
|
+
* @param scopeId - Numeric scope id.
|
|
1393
|
+
* @param request - Request body; see `McpExposureCatalogRequest`.
|
|
1394
|
+
*
|
|
1395
|
+
* @example
|
|
1396
|
+
* ```ts
|
|
1397
|
+
* const catalog = await mgmt.scopes.mcpExposureCatalog(42, {})
|
|
1398
|
+
* catalog.discoveryAllowed
|
|
1399
|
+
* ```
|
|
1400
|
+
*/
|
|
1401
|
+
mcpExposureCatalog(scopeId: number | string, request: McpExposureCatalogRequest): Promise<McpExposureCatalog>;
|
|
1349
1402
|
/**
|
|
1350
1403
|
* Restore a deleted scope.
|
|
1351
1404
|
*
|
|
@@ -1360,8 +1413,8 @@ declare class ScopesResourceBase {
|
|
|
1360
1413
|
/**
|
|
1361
1414
|
* Cancel ownership transfer.
|
|
1362
1415
|
*
|
|
1363
|
-
* Cancels a pending ownership transfer. The current owner may cancel
|
|
1364
|
-
* decline.
|
|
1416
|
+
* Cancels a pending ownership transfer. The current owner may cancel, the pending recipient may
|
|
1417
|
+
* decline, and for a scope with no owner an organization owner may cancel.
|
|
1365
1418
|
*
|
|
1366
1419
|
* **Requires:** `scopes:write`
|
|
1367
1420
|
*
|
|
@@ -1383,14 +1436,37 @@ declare class ScopesResourceBase {
|
|
|
1383
1436
|
type JsonObjectInput = Record<string, unknown>;
|
|
1384
1437
|
type JsonObjectListInput = JsonObjectInput[];
|
|
1385
1438
|
|
|
1439
|
+
/** Channel restrictions for one integration connection's actions. */
|
|
1440
|
+
interface ToolsetRules {
|
|
1441
|
+
allowedChannelIds?: string[];
|
|
1442
|
+
allowedChannelNames?: Record<string, string>;
|
|
1443
|
+
}
|
|
1444
|
+
/** Operation names granted on one connection, without path or project suffixes. */
|
|
1445
|
+
interface ToolsetSlot {
|
|
1446
|
+
actions: string[];
|
|
1447
|
+
rules?: ToolsetRules;
|
|
1448
|
+
}
|
|
1449
|
+
/** Integration grants keyed by the explicit, lowercase connection UUID. */
|
|
1450
|
+
interface PlatformToolsetEntry {
|
|
1451
|
+
byConnection: Record<string, ToolsetSlot>;
|
|
1452
|
+
}
|
|
1386
1453
|
/**
|
|
1387
|
-
* Skill toolset wire object
|
|
1388
|
-
*
|
|
1389
|
-
*
|
|
1390
|
-
*
|
|
1391
|
-
*
|
|
1392
|
-
*
|
|
1393
|
-
*
|
|
1454
|
+
* Skill toolset wire object, keyed by catalog platform or nonintegration tool name.
|
|
1455
|
+
* Integration values use `PlatformToolsetEntry`; SQL platforms grant `query`.
|
|
1456
|
+
* General tools, MCP, Pipedream and Coding retain their own formats.
|
|
1457
|
+
* The API validates known keys and values; this matches its open-map schema.
|
|
1458
|
+
*
|
|
1459
|
+
* @example
|
|
1460
|
+
* ```ts
|
|
1461
|
+
* const toolset: ToolsetInput = {
|
|
1462
|
+
* postgresql: {
|
|
1463
|
+
* byConnection: {
|
|
1464
|
+
* '11111111-1111-4111-8111-111111111111': { actions: ['query'] },
|
|
1465
|
+
* },
|
|
1466
|
+
* } satisfies PlatformToolsetEntry,
|
|
1467
|
+
* memory: { enabled: true },
|
|
1468
|
+
* }
|
|
1469
|
+
* ```
|
|
1394
1470
|
*/
|
|
1395
1471
|
type ToolsetInput = Record<string, unknown>;
|
|
1396
1472
|
|
|
@@ -1453,11 +1529,11 @@ declare class ScopesMemoriesResourceBase {
|
|
|
1453
1529
|
*/
|
|
1454
1530
|
update(memoryId: string, update: MemoryUpdate, options?: {
|
|
1455
1531
|
updateMask?: string;
|
|
1456
|
-
}): Promise<
|
|
1532
|
+
}): Promise<void>;
|
|
1457
1533
|
/**
|
|
1458
1534
|
* Delete a memory.
|
|
1459
1535
|
*
|
|
1460
|
-
* Deletes one memory.
|
|
1536
|
+
* Deletes one memory. Returns 404 if the memory does not exist or is already deleted.
|
|
1461
1537
|
*
|
|
1462
1538
|
* **Requires:** `scopes:write`
|
|
1463
1539
|
*
|
|
@@ -1475,6 +1551,9 @@ type UpdateEvaluationConfig = components['schemas']['UpdateEvaluationConfigDto']
|
|
|
1475
1551
|
type EvaluationRun = components['schemas']['EvaluationRunDto'];
|
|
1476
1552
|
type EvaluationRunWithResults = components['schemas']['EvaluationRunWithResultsDto'];
|
|
1477
1553
|
type TriggerEvaluationRunResponse = components['schemas']['TriggerEvaluationRunResponseDto'];
|
|
1554
|
+
type EvaluationCase = components['schemas']['EvaluationCaseDto'];
|
|
1555
|
+
type AddEvaluationCase = components['schemas']['EvaluationCaseInputDto'];
|
|
1556
|
+
type UpdateEvaluationCase = components['schemas']['UpdateEvaluationCaseDto'];
|
|
1478
1557
|
|
|
1479
1558
|
/** Generated base for the management `scopes.evaluations` resource. */
|
|
1480
1559
|
declare class ScopesEvaluationsResourceBase {
|
|
@@ -1522,6 +1601,8 @@ declare class ScopesEvaluationsResourceBase {
|
|
|
1522
1601
|
* **Requires:** `scopes:read`
|
|
1523
1602
|
*
|
|
1524
1603
|
* @param options.pageSize - Items per page. Defaults to 25.
|
|
1604
|
+
* @param options.pageToken - Opaque page token from a previous response's `nextPageToken`. Omit
|
|
1605
|
+
* for the first page.
|
|
1525
1606
|
* @returns A page of runs.
|
|
1526
1607
|
*/
|
|
1527
1608
|
listRuns(options?: {
|
|
@@ -1543,6 +1624,53 @@ declare class ScopesEvaluationsResourceBase {
|
|
|
1543
1624
|
|
|
1544
1625
|
/** Scheduled and manual scope evaluations. */
|
|
1545
1626
|
declare class ScopeEvaluationsResource extends ScopesEvaluationsResourceBase {
|
|
1627
|
+
/**
|
|
1628
|
+
* Add one evaluation case and return the stored case.
|
|
1629
|
+
*
|
|
1630
|
+
* @param input.task - What the scope should do. An empty string is allowed.
|
|
1631
|
+
* @param input.expectedOutput - What a correct result looks like. An empty string is allowed.
|
|
1632
|
+
* @param input.id - Stable id. Omit it and the client assigns one before the request, so a retry sends the same id.
|
|
1633
|
+
* @returns The stored evaluation case, including its id.
|
|
1634
|
+
* @throws ConflictError An evaluation case with this id already exists. A retry after the case was stored returns this error. An identical body is not treated as success.
|
|
1635
|
+
* @example
|
|
1636
|
+
* ```ts
|
|
1637
|
+
* const mgmt = new ModusManagement()
|
|
1638
|
+
* const added = await mgmt.scopes.evaluations(42).addCase({
|
|
1639
|
+
* task: "Summarize last quarter's revenue",
|
|
1640
|
+
* expectedOutput: 'A one-paragraph summary with the total',
|
|
1641
|
+
* })
|
|
1642
|
+
* console.log(added.id)
|
|
1643
|
+
* ```
|
|
1644
|
+
*/
|
|
1645
|
+
addCase(input: AddEvaluationCase): Promise<EvaluationCase>;
|
|
1646
|
+
/**
|
|
1647
|
+
* Change the task, the expected output, or both, for one evaluation case.
|
|
1648
|
+
*
|
|
1649
|
+
* @param caseId - Id of the case to change.
|
|
1650
|
+
* @param patch.task - Replacement task. Omit to leave it unchanged.
|
|
1651
|
+
* @param patch.expectedOutput - Replacement expected output. Omit to leave it unchanged.
|
|
1652
|
+
* @returns The evaluation case after the change.
|
|
1653
|
+
* @example
|
|
1654
|
+
* ```ts
|
|
1655
|
+
* const mgmt = new ModusManagement()
|
|
1656
|
+
* const updated = await mgmt.scopes.evaluations(42).updateCase('CASE_ID', {
|
|
1657
|
+
* task: 'Summarize revenue in two sentences',
|
|
1658
|
+
* })
|
|
1659
|
+
* console.log(updated.task)
|
|
1660
|
+
* ```
|
|
1661
|
+
*/
|
|
1662
|
+
updateCase(caseId: string, patch: UpdateEvaluationCase): Promise<EvaluationCase>;
|
|
1663
|
+
/**
|
|
1664
|
+
* Remove one evaluation case. The other cases stay as they are.
|
|
1665
|
+
*
|
|
1666
|
+
* @param caseId - Id of the case to remove.
|
|
1667
|
+
* @example
|
|
1668
|
+
* ```ts
|
|
1669
|
+
* const mgmt = new ModusManagement()
|
|
1670
|
+
* await mgmt.scopes.evaluations(42).deleteCase('CASE_ID')
|
|
1671
|
+
* ```
|
|
1672
|
+
*/
|
|
1673
|
+
deleteCase(caseId: string): Promise<void>;
|
|
1546
1674
|
}
|
|
1547
1675
|
|
|
1548
1676
|
/** Generated base for the management `scopes.interfaces` resource. */
|
|
@@ -1615,7 +1743,7 @@ declare class ScopesSupervisionResourceBase {
|
|
|
1615
1743
|
* @param options.view - Which variation snapshot to read. Defaults to `active`.
|
|
1616
1744
|
*/
|
|
1617
1745
|
get(options?: {
|
|
1618
|
-
view?:
|
|
1746
|
+
view?: SupervisionView;
|
|
1619
1747
|
}): Promise<Supervision>;
|
|
1620
1748
|
/**
|
|
1621
1749
|
* Replace draft subordinate supervision list.
|
|
@@ -1655,6 +1783,7 @@ interface ManagementScopesOperations {
|
|
|
1655
1783
|
readonly create: OperationId;
|
|
1656
1784
|
readonly update: OperationId;
|
|
1657
1785
|
readonly deploy: OperationId;
|
|
1786
|
+
readonly applySelectionOps: OperationId;
|
|
1658
1787
|
readonly delete: OperationId;
|
|
1659
1788
|
readonly restore: OperationId;
|
|
1660
1789
|
readonly requestOwnershipTransfer: OperationId;
|
|
@@ -1663,6 +1792,8 @@ interface ManagementScopesOperations {
|
|
|
1663
1792
|
readonly patchMcpConfig: OperationId;
|
|
1664
1793
|
readonly getVariation: OperationId;
|
|
1665
1794
|
}
|
|
1795
|
+
/** A connectionSet row from `scopes.get`, or a plain `{ connection_id, preferences }` object. */
|
|
1796
|
+
type ConnectionSetRowInput = components['schemas']['ConnectionSetItemDto'];
|
|
1666
1797
|
interface CreateScopeOptions {
|
|
1667
1798
|
name: string;
|
|
1668
1799
|
description?: string;
|
|
@@ -1670,7 +1801,7 @@ interface CreateScopeOptions {
|
|
|
1670
1801
|
instructions?: string[];
|
|
1671
1802
|
toolset?: ToolsetInput;
|
|
1672
1803
|
model?: string;
|
|
1673
|
-
connectionSet?:
|
|
1804
|
+
connectionSet?: ReadonlyArray<ConnectionSetRowInput>;
|
|
1674
1805
|
contextSelections?: JsonObjectListInput;
|
|
1675
1806
|
includeOwnLearnings?: boolean;
|
|
1676
1807
|
interfaces?: JsonObjectListInput;
|
|
@@ -1685,11 +1816,12 @@ interface UpdateScopeOptions {
|
|
|
1685
1816
|
instructions?: string[];
|
|
1686
1817
|
toolset?: ToolsetInput;
|
|
1687
1818
|
model?: string;
|
|
1688
|
-
connectionSet?:
|
|
1819
|
+
connectionSet?: ReadonlyArray<ConnectionSetRowInput>;
|
|
1689
1820
|
contextSelections?: JsonObjectListInput;
|
|
1690
1821
|
interfaces?: JsonObjectListInput;
|
|
1691
1822
|
guardrails?: string[];
|
|
1692
|
-
|
|
1823
|
+
/** Numeric id of the manager scope, or `null` to detach from the current manager. */
|
|
1824
|
+
managerId?: number | null;
|
|
1693
1825
|
evaluations?: JsonObjectListInput;
|
|
1694
1826
|
supervisionSubordinateDescriptions?: Record<string, string>;
|
|
1695
1827
|
updateMask?: string;
|
|
@@ -1761,10 +1893,13 @@ declare class ManagementScopesResource extends ScopesResourceBase {
|
|
|
1761
1893
|
* Update a scope's configuration.
|
|
1762
1894
|
*
|
|
1763
1895
|
* Only the fields you pass are changed. To clear a field, name it in
|
|
1764
|
-
* `updateMask` (comma-separated field names) and leave its argument unset
|
|
1896
|
+
* `updateMask` (comma-separated field names) and leave its argument unset:
|
|
1897
|
+
* it is sent as `null`.
|
|
1765
1898
|
*
|
|
1766
|
-
* @param scopeId -
|
|
1899
|
+
* @param scopeId - Numeric scope id.
|
|
1767
1900
|
* @param options.guardrails - Guardrail labels to set. Fetches the current scope first to merge. Pass `[]` to clear all.
|
|
1901
|
+
* @param options.managerId - Numeric id of the manager scope to move this scope under, or `null`
|
|
1902
|
+
* to detach it. Send it alone: the server rejects it combined with other fields.
|
|
1768
1903
|
* @param options.updateMask - Comma-separated field names to update or clear.
|
|
1769
1904
|
* @returns The updated scope.
|
|
1770
1905
|
* @example
|
|
@@ -1790,9 +1925,40 @@ declare class ManagementScopesResource extends ScopesResourceBase {
|
|
|
1790
1925
|
* ```
|
|
1791
1926
|
*/
|
|
1792
1927
|
deploy(scopeId: number | string): Promise<Scope>;
|
|
1928
|
+
/**
|
|
1929
|
+
* Apply selection changes to a scope.
|
|
1930
|
+
*
|
|
1931
|
+
* Pass `validateOnly: true` to run the same checks and return the scope that would
|
|
1932
|
+
* be saved, without writing. Set a connection with `setConnectionPreferences` and
|
|
1933
|
+
* remove it with `removeConnection`.
|
|
1934
|
+
*
|
|
1935
|
+
* @param scopeId - Scope id.
|
|
1936
|
+
* @param ops - Selection changes, applied in order.
|
|
1937
|
+
* @param options.toolset - The scope toolset after the edit, when the edit changed it.
|
|
1938
|
+
* @param options.validateOnly - When true, check and return the planned scope without writing.
|
|
1939
|
+
* @returns The scope, or the scope that would be saved when `validateOnly` is true.
|
|
1940
|
+
* @example
|
|
1941
|
+
* ```ts
|
|
1942
|
+
* const mgmt = new ModusManagement()
|
|
1943
|
+
* const preview = await mgmt.scopes.applySelectionOps(42, [{
|
|
1944
|
+
* op: 'setConnectionPreferences',
|
|
1945
|
+
* connectionId: '11111111-1111-4111-8111-111111111111',
|
|
1946
|
+
* preferences: { schemaVersion: 2, mode: 'all', include: [], exclude: [] },
|
|
1947
|
+
* }], { validateOnly: true })
|
|
1948
|
+
* console.log(preview.id)
|
|
1949
|
+
* ```
|
|
1950
|
+
*/
|
|
1951
|
+
applySelectionOps(scopeId: number | string, ops: ReadonlyArray<Record<string, unknown>>, options?: {
|
|
1952
|
+
toolset?: Record<string, unknown>;
|
|
1953
|
+
validateOnly?: boolean;
|
|
1954
|
+
}): Promise<Scope>;
|
|
1793
1955
|
/**
|
|
1794
1956
|
* Start transferring ownership of a scope to another organization member.
|
|
1795
1957
|
*
|
|
1958
|
+
* The current owner calls this, and the recipient accepts. A scope with no owner (one
|
|
1959
|
+
* created with a service-account token) can be given one by an organization owner;
|
|
1960
|
+
* assigning yourself takes effect at once.
|
|
1961
|
+
*
|
|
1796
1962
|
* @param scopeId - Scope id.
|
|
1797
1963
|
* @param options.newOwnerUserId - User id of the proposed new owner.
|
|
1798
1964
|
* @returns The scope with a pending ownership transfer.
|
|
@@ -1822,8 +1988,11 @@ declare class ManagementScopesResource extends ScopesResourceBase {
|
|
|
1822
1988
|
}
|
|
1823
1989
|
|
|
1824
1990
|
type UsageReport = components['schemas']['ListUsageResponseDto'];
|
|
1991
|
+
type UsageBucket = components['schemas']['UsageBucketDto'];
|
|
1992
|
+
type UsageTotals = components['schemas']['UsageTotalsDto'];
|
|
1825
1993
|
type UsageRollup = 'hour' | 'day';
|
|
1826
1994
|
type UsageUsersReport = components['schemas']['ListUsageUsersResponseDto'];
|
|
1995
|
+
type UsageUser = components['schemas']['UsageUserDto'];
|
|
1827
1996
|
|
|
1828
1997
|
/** Generated base for the management `usage` resource. */
|
|
1829
1998
|
declare class UsageResourceBase {
|
|
@@ -1932,4 +2101,4 @@ declare class ModusManagement extends ModusClientBase {
|
|
|
1932
2101
|
constructor(options?: ModusOptions);
|
|
1933
2102
|
}
|
|
1934
2103
|
|
|
1935
|
-
export { type AgentSelectionInput, type BulkUploadFromUrlsResult, type BulkUploadUrlsResult, ContextItemDeletion, ContextItemMove, type CreateAgentOptions, type CreateDashboardElementInput, type CreateDashboardInput, type CreateScopeOptions, type CreateSkillOptions, type CreateWorkflowOptions, type Dashboard, type DashboardDraftSnapshot, type DashboardElementKind, type DashboardElementLayout, type DashboardElementPatch, type DashboardElementResult, type DashboardElementSummary, type DashboardElementsList, type DashboardLayoutElement, type DashboardPublishResult, type DashboardVersion, type DashboardView, type FailedUploadFromUrl, type FailedUploadUrl, type FileUpload, type FileUploadStatus, type FinalizeInput, type Memory, type MemorySearchRequest, type MemorySearchResult, type MemoryUpdate, ModusManagement, ModusOptions, type PublishDashboardInput, type ToolsetInput, type TransferDashboardOwnershipInput, type TriggerInput, type UpdateAgentOptions, type UpdateDashboardAccessInput, type UpdateDashboardDraftInput, type UpdateDashboardElementInput, type UpdateDashboardLayoutInput, type UpdateScopeOptions, type UpdateSkillOptions, type UpdateWorkflowOptions, type UploadDirFailure, type UploadDirResult, type UploadFileInput, type UploadFromUrlInput, type UploadProgress, type UploadProgressCallback, type UploadUrlInput, type UploadUrlSlot, type UserFeedback, type WaitUntil, type WorkflowGraphInput };
|
|
2104
|
+
export { type AddAgentInterface, type AddEvaluationCase, type AddScopeInterface, type AgentInterface, type AgentSelectionInput, type BatchUploadOptions, type BulkFinalizeResult, type BulkUploadFromUrlsResult, type BulkUploadUrlsResult, ContextItemAccessUpdate, ContextItemDeletion, ContextItemMove, type CreateAgentOptions, type CreateDashboardElementInput, type CreateDashboardInput, type CreateScopeOptions, type CreateSkillOptions, type CreateWorkflowOptions, CreatedContextItem, type Dashboard, type DashboardDraftSnapshot, type DashboardElementKind, type DashboardElementLayout, type DashboardElementPatch, type DashboardElementResult, type DashboardElementSummary, type DashboardElementsList, type DashboardLayoutElement, type DashboardPublishResult, type DashboardVersion, type DashboardView, type EvaluationCase, type EvaluationConfig, type EvaluationRun, type EvaluationRunWithResults, type FailedUploadFromUrl, type FailedUploadUrl, type FileUpload, type FileUploadStatus, type FinalizeFailure, type FinalizeInput, type JsonObjectInput, type JsonObjectListInput, ManagementContextFilesResource, ManagementContextItemsResource, ManagementContextResource, ManagementDashboardElementsResource, ManagementDashboardsResource, ManagementScopesResource, ManagementToolsResource, ManagementUsageResource, ManagementUsersResource, ManagementWorkflowsResource, type McpExposureCatalog, type McpExposureCatalogRequest, type MemberGroup, type Memory, type MemorySearchRequest, type MemorySearchResult, type MemoryUpdate, ModusConfig, ModusManagement, ModusOptions, type OrgMember, type PlatformToolsetEntry, type PublishDashboardInput, ScopeEvaluationsResource, type ScopeInterface, ScopeInterfacesResource, ScopeMemoriesResource, ScopeSupervisionResource, type SetSupervisionRequest, type Supervision, type ToolCatalogEntry, type ToolsetInput, type ToolsetRules, type ToolsetSlot, type TransferDashboardOwnershipInput, type TriggerEvaluationRunResponse, type TriggerInput, type UpdateAgentInterface, type UpdateAgentOptions, UpdateContextItemAccessInput, type UpdateDashboardAccessInput, type UpdateDashboardDraftInput, type UpdateDashboardElementInput, type UpdateDashboardLayoutInput, type UpdateEvaluationCase, type UpdateEvaluationConfig, type UpdateScopeInterface, type UpdateScopeOptions, type UpdateSkillOptions, type UpdateWorkflowOptions, type UploadDirFailure, type UploadDirResult, type UploadFileInput, type UploadFromUrlInput, type UploadProgress, type UploadProgressCallback, type UploadUrlInput, type UploadUrlSlot, type UsageBucket, type UsageReport, type UsageRollup, type UsageTotals, type UsageUser, type UsageUsersReport, type UserFeedback, type WaitUntil, type WorkflowGraphInput, WorkflowInterfacesResource };
|