@getmodus/sdk 0.2.3 → 0.3.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 +56 -1
- package/dist/{chunk-ZFZQ2UMA.js → chunk-D3NU2M6B.js} +47 -36
- package/dist/chunk-D3NU2M6B.js.map +1 -0
- package/dist/{conversations-BP2sI3Q5.d.cts → conversations-GNBMPpyr.d.cts} +1242 -3878
- package/dist/{conversations-BP2sI3Q5.d.ts → conversations-GNBMPpyr.d.ts} +1242 -3878
- package/dist/index.cjs +71 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -25
- package/dist/index.d.ts +12 -25
- package/dist/index.js +24 -42
- package/dist/index.js.map +1 -1
- package/dist/management/index.cjs +67 -57
- package/dist/management/index.cjs.map +1 -1
- package/dist/management/index.d.cts +54 -40
- package/dist/management/index.d.ts +54 -40
- package/dist/management/index.js +22 -23
- package/dist/management/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-ZFZQ2UMA.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HttpClient, M as ModusConfig, c as components,
|
|
1
|
+
import { H as HttpClient, M as ModusConfig, c as components, W as WorkflowType, n as OperationId, V as VariationView, P as Page, a as Workflow, C as ContextItem, y as ContextItemDeletion, d as CustomContextItemsResource, z as CreatedContextItem, S as ScopeConversationsResource, h as Scope, i as ModusClientBase, j as ModusOptions } from '../conversations-GNBMPpyr.cjs';
|
|
2
2
|
|
|
3
3
|
type AgentInterface = components['schemas']['AgentInterfaceDto'];
|
|
4
4
|
type AddAgentInterface = components['schemas']['AddAgentInterfaceDto'];
|
|
@@ -32,18 +32,20 @@ interface ManagementWorkflowsOperations {
|
|
|
32
32
|
readonly acceptOwnershipTransfer: OperationId;
|
|
33
33
|
readonly toggle: OperationId;
|
|
34
34
|
}
|
|
35
|
-
interface
|
|
35
|
+
interface CreateWorkflowOptions {
|
|
36
36
|
name: string;
|
|
37
|
-
type:
|
|
37
|
+
type: WorkflowType;
|
|
38
38
|
description?: string;
|
|
39
39
|
trigger?: TriggerInput;
|
|
40
40
|
agentSelection?: AgentSelectionInput;
|
|
41
41
|
workflowStructure?: WorkflowGraphInput;
|
|
42
42
|
guardrails?: string[];
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
/** @deprecated Use `CreateWorkflowOptions` instead. */
|
|
45
|
+
type CreateAgentOptions = CreateWorkflowOptions;
|
|
46
|
+
interface UpdateWorkflowOptions {
|
|
45
47
|
name?: string;
|
|
46
|
-
type?:
|
|
48
|
+
type?: WorkflowType;
|
|
47
49
|
description?: string;
|
|
48
50
|
trigger?: TriggerInput;
|
|
49
51
|
agentSelection?: AgentSelectionInput;
|
|
@@ -51,6 +53,8 @@ interface UpdateAgentOptions {
|
|
|
51
53
|
guardrails?: string[];
|
|
52
54
|
updateMask?: string;
|
|
53
55
|
}
|
|
56
|
+
/** @deprecated Use `UpdateWorkflowOptions` instead. */
|
|
57
|
+
type UpdateAgentOptions = UpdateWorkflowOptions;
|
|
54
58
|
declare class ManagementWorkflowsResource {
|
|
55
59
|
private readonly http;
|
|
56
60
|
private readonly config;
|
|
@@ -60,28 +64,28 @@ declare class ManagementWorkflowsResource {
|
|
|
60
64
|
pageSize?: number;
|
|
61
65
|
pageToken?: string;
|
|
62
66
|
search?: string;
|
|
63
|
-
type?:
|
|
67
|
+
type?: WorkflowType;
|
|
64
68
|
view?: VariationView;
|
|
65
69
|
includeVariation?: boolean;
|
|
66
|
-
}): Promise<Page<
|
|
70
|
+
}): Promise<Page<Workflow>>;
|
|
67
71
|
private listPage;
|
|
68
72
|
get(workflowId: number | string, options?: {
|
|
69
73
|
view?: VariationView;
|
|
70
|
-
}): Promise<
|
|
74
|
+
}): Promise<Workflow>;
|
|
71
75
|
interfaces(workflowId: number | string): WorkflowInterfacesResource;
|
|
72
|
-
create(options:
|
|
73
|
-
update(workflowId: number | string, options?:
|
|
74
|
-
deploy(workflowId: number | string): Promise<
|
|
76
|
+
create(options: CreateWorkflowOptions): Promise<Workflow>;
|
|
77
|
+
update(workflowId: number | string, options?: UpdateWorkflowOptions): Promise<Workflow>;
|
|
78
|
+
deploy(workflowId: number | string): Promise<Workflow>;
|
|
75
79
|
toggle(workflowId: number | string, options: {
|
|
76
80
|
active: boolean;
|
|
77
|
-
}): Promise<
|
|
81
|
+
}): Promise<Workflow>;
|
|
78
82
|
delete(workflowId: number | string): Promise<void>;
|
|
79
|
-
restore(workflowId: number | string): Promise<
|
|
83
|
+
restore(workflowId: number | string): Promise<Workflow>;
|
|
80
84
|
requestOwnershipTransfer(workflowId: number | string, options: {
|
|
81
85
|
newOwnerUserId: string;
|
|
82
|
-
}): Promise<
|
|
83
|
-
cancelOwnershipTransfer(workflowId: number | string): Promise<
|
|
84
|
-
acceptOwnershipTransfer(workflowId: number | string): Promise<
|
|
86
|
+
}): Promise<Workflow>;
|
|
87
|
+
cancelOwnershipTransfer(workflowId: number | string): Promise<Workflow>;
|
|
88
|
+
acceptOwnershipTransfer(workflowId: number | string): Promise<Workflow>;
|
|
85
89
|
}
|
|
86
90
|
|
|
87
91
|
declare class ManagementContextItemsResource {
|
|
@@ -155,17 +159,18 @@ declare class ManagementContextResource {
|
|
|
155
159
|
}): Promise<ContextItem>;
|
|
156
160
|
}
|
|
157
161
|
|
|
158
|
-
declare class ManagementOrganizationResource {
|
|
159
|
-
private readonly http;
|
|
160
|
-
private readonly config;
|
|
161
|
-
constructor(http: HttpClient, config: ModusConfig);
|
|
162
|
-
delete(): Promise<void>;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
162
|
type JsonObjectInput = Record<string, unknown>;
|
|
166
163
|
type JsonObjectListInput = JsonObjectInput[];
|
|
167
164
|
|
|
168
|
-
/**
|
|
165
|
+
/**
|
|
166
|
+
* Skill toolset wire object: a map keyed by tool/integration surface
|
|
167
|
+
* (e.g. `slack`, `clickup`, `sql_runner`, `memory`, `pipedream`, `custom_mcps`),
|
|
168
|
+
* each with its own shape. Intentionally untyped: the OpenAPI `ToolsetDto`
|
|
169
|
+
* schema (`{ tools: [{ id, enabled, config }] }`) is Swagger-only decoration —
|
|
170
|
+
* the API's actual validator (`sanitizeAgentToolsetForWrite`) accepts this
|
|
171
|
+
* keyed-map shape instead, and rejects real payloads against `ToolsetDto`.
|
|
172
|
+
* Tightening this type here would misrepresent the real contract.
|
|
173
|
+
*/
|
|
169
174
|
type ToolsetInput = Record<string, unknown>;
|
|
170
175
|
|
|
171
176
|
type Memory = components['schemas']['MemoryDto'];
|
|
@@ -198,7 +203,7 @@ type EvaluationRun = components['schemas']['EvaluationRunDto'];
|
|
|
198
203
|
type EvaluationRunWithResults = components['schemas']['EvaluationRunWithResultsDto'];
|
|
199
204
|
type TriggerEvaluationRunResponse = components['schemas']['TriggerEvaluationRunResponseDto'];
|
|
200
205
|
|
|
201
|
-
/** Scheduled and manual
|
|
206
|
+
/** Scheduled and manual scope evaluations (`/api/v1/scopes/{id}/evaluations`). */
|
|
202
207
|
declare class ScopeEvaluationsResource {
|
|
203
208
|
private readonly http;
|
|
204
209
|
private readonly config;
|
|
@@ -245,7 +250,7 @@ interface ManagementScopesOperations {
|
|
|
245
250
|
readonly patchMcpConfig: OperationId;
|
|
246
251
|
readonly getVariation: OperationId;
|
|
247
252
|
}
|
|
248
|
-
interface
|
|
253
|
+
interface CreateScopeOptions {
|
|
249
254
|
name: string;
|
|
250
255
|
description?: string;
|
|
251
256
|
expectedOutput?: string;
|
|
@@ -257,7 +262,9 @@ interface CreateSkillOptions {
|
|
|
257
262
|
interfaces?: JsonObjectListInput;
|
|
258
263
|
guardrails?: string[];
|
|
259
264
|
}
|
|
260
|
-
|
|
265
|
+
/** @deprecated Use `CreateScopeOptions` instead. */
|
|
266
|
+
type CreateSkillOptions = CreateScopeOptions;
|
|
267
|
+
interface UpdateScopeOptions {
|
|
261
268
|
name?: string;
|
|
262
269
|
description?: string;
|
|
263
270
|
expectedOutput?: string;
|
|
@@ -273,6 +280,8 @@ interface UpdateSkillOptions {
|
|
|
273
280
|
supervisionSubordinateDescriptions?: Record<string, string>;
|
|
274
281
|
updateMask?: string;
|
|
275
282
|
}
|
|
283
|
+
/** @deprecated Use `UpdateScopeOptions` instead. */
|
|
284
|
+
type UpdateSkillOptions = UpdateScopeOptions;
|
|
276
285
|
/** Full CRUD and lifecycle for Modus scopes (`/api/v1/scopes`). */
|
|
277
286
|
declare class ManagementScopesResource {
|
|
278
287
|
private readonly http;
|
|
@@ -289,31 +298,32 @@ declare class ManagementScopesResource {
|
|
|
289
298
|
search?: string;
|
|
290
299
|
view?: VariationView;
|
|
291
300
|
managerId?: number;
|
|
292
|
-
}): Promise<Page<
|
|
301
|
+
}): Promise<Page<Scope>>;
|
|
293
302
|
private listPage;
|
|
294
303
|
get(scopeId: number | string, options?: {
|
|
295
304
|
view?: VariationView;
|
|
296
|
-
}): Promise<
|
|
297
|
-
create(options:
|
|
298
|
-
update(scopeId: number | string, options?:
|
|
299
|
-
deploy(scopeId: number | string): Promise<
|
|
305
|
+
}): Promise<Scope>;
|
|
306
|
+
create(options: CreateScopeOptions): Promise<Scope>;
|
|
307
|
+
update(scopeId: number | string, options?: UpdateScopeOptions): Promise<Scope>;
|
|
308
|
+
deploy(scopeId: number | string): Promise<Scope>;
|
|
300
309
|
delete(scopeId: number | string): Promise<void>;
|
|
301
|
-
restore(scopeId: number | string): Promise<
|
|
310
|
+
restore(scopeId: number | string): Promise<Scope>;
|
|
302
311
|
requestOwnershipTransfer(scopeId: number | string, options: {
|
|
303
312
|
newOwnerUserId: string;
|
|
304
|
-
}): Promise<
|
|
305
|
-
cancelOwnershipTransfer(scopeId: number | string): Promise<
|
|
306
|
-
acceptOwnershipTransfer(scopeId: number | string): Promise<
|
|
313
|
+
}): Promise<Scope>;
|
|
314
|
+
cancelOwnershipTransfer(scopeId: number | string): Promise<Scope>;
|
|
315
|
+
acceptOwnershipTransfer(scopeId: number | string): Promise<Scope>;
|
|
307
316
|
patchMcpConfig(scopeId: number | string, options: {
|
|
308
317
|
mcpConfig: Record<string, unknown>;
|
|
309
318
|
}): Promise<void>;
|
|
310
319
|
getVariation(scopeId: number | string, options: {
|
|
311
320
|
variationUid: string;
|
|
312
|
-
}): Promise<
|
|
321
|
+
}): Promise<Scope>;
|
|
313
322
|
}
|
|
314
323
|
|
|
315
324
|
type UsageReport = components['schemas']['ListUsageResponseDto'];
|
|
316
325
|
type UsageRollup = 'hour' | 'day';
|
|
326
|
+
type UsageUsersReport = components['schemas']['ListUsageUsersResponseDto'];
|
|
317
327
|
|
|
318
328
|
declare class ManagementUsageResource {
|
|
319
329
|
private readonly http;
|
|
@@ -324,7 +334,12 @@ declare class ManagementUsageResource {
|
|
|
324
334
|
until: string;
|
|
325
335
|
rollup: UsageRollup;
|
|
326
336
|
model?: string;
|
|
337
|
+
userEmail?: readonly string[];
|
|
327
338
|
}): Promise<UsageReport>;
|
|
339
|
+
listUsers(options: {
|
|
340
|
+
since: string;
|
|
341
|
+
until: string;
|
|
342
|
+
}): Promise<UsageUsersReport>;
|
|
328
343
|
}
|
|
329
344
|
|
|
330
345
|
type MemberGroup = components['schemas']['MemberGroupDto'];
|
|
@@ -337,15 +352,14 @@ declare class ManagementUsersResource {
|
|
|
337
352
|
listOrgMembers(): Promise<OrgMember[]>;
|
|
338
353
|
}
|
|
339
354
|
|
|
340
|
-
/** Configure scopes, workflows, context, usage, and
|
|
355
|
+
/** Configure scopes, workflows, context, usage, and users. */
|
|
341
356
|
declare class ModusManagement extends ModusClientBase {
|
|
342
357
|
readonly scopes: ManagementScopesResource;
|
|
343
358
|
readonly workflows: ManagementWorkflowsResource;
|
|
344
359
|
readonly context: ManagementContextResource;
|
|
345
360
|
readonly usage: ManagementUsageResource;
|
|
346
|
-
readonly organization: ManagementOrganizationResource;
|
|
347
361
|
readonly users: ManagementUsersResource;
|
|
348
362
|
constructor(options?: ModusOptions);
|
|
349
363
|
}
|
|
350
364
|
|
|
351
|
-
export { type AgentSelectionInput, type CreateAgentOptions, type CreateSkillOptions, type Memory, type MemorySearchRequest, type MemorySearchResult, type MemoryUpdate, ModusManagement, ModusOptions, type ToolsetInput, type TriggerInput, type UpdateAgentOptions, type UpdateSkillOptions, type UserFeedback, type WorkflowGraphInput };
|
|
365
|
+
export { type AgentSelectionInput, type CreateAgentOptions, type CreateScopeOptions, type CreateSkillOptions, type CreateWorkflowOptions, type Memory, type MemorySearchRequest, type MemorySearchResult, type MemoryUpdate, ModusManagement, ModusOptions, type ToolsetInput, type TriggerInput, type UpdateAgentOptions, type UpdateScopeOptions, type UpdateSkillOptions, type UpdateWorkflowOptions, type UserFeedback, type WorkflowGraphInput };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HttpClient, M as ModusConfig, c as components,
|
|
1
|
+
import { H as HttpClient, M as ModusConfig, c as components, W as WorkflowType, n as OperationId, V as VariationView, P as Page, a as Workflow, C as ContextItem, y as ContextItemDeletion, d as CustomContextItemsResource, z as CreatedContextItem, S as ScopeConversationsResource, h as Scope, i as ModusClientBase, j as ModusOptions } from '../conversations-GNBMPpyr.js';
|
|
2
2
|
|
|
3
3
|
type AgentInterface = components['schemas']['AgentInterfaceDto'];
|
|
4
4
|
type AddAgentInterface = components['schemas']['AddAgentInterfaceDto'];
|
|
@@ -32,18 +32,20 @@ interface ManagementWorkflowsOperations {
|
|
|
32
32
|
readonly acceptOwnershipTransfer: OperationId;
|
|
33
33
|
readonly toggle: OperationId;
|
|
34
34
|
}
|
|
35
|
-
interface
|
|
35
|
+
interface CreateWorkflowOptions {
|
|
36
36
|
name: string;
|
|
37
|
-
type:
|
|
37
|
+
type: WorkflowType;
|
|
38
38
|
description?: string;
|
|
39
39
|
trigger?: TriggerInput;
|
|
40
40
|
agentSelection?: AgentSelectionInput;
|
|
41
41
|
workflowStructure?: WorkflowGraphInput;
|
|
42
42
|
guardrails?: string[];
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
/** @deprecated Use `CreateWorkflowOptions` instead. */
|
|
45
|
+
type CreateAgentOptions = CreateWorkflowOptions;
|
|
46
|
+
interface UpdateWorkflowOptions {
|
|
45
47
|
name?: string;
|
|
46
|
-
type?:
|
|
48
|
+
type?: WorkflowType;
|
|
47
49
|
description?: string;
|
|
48
50
|
trigger?: TriggerInput;
|
|
49
51
|
agentSelection?: AgentSelectionInput;
|
|
@@ -51,6 +53,8 @@ interface UpdateAgentOptions {
|
|
|
51
53
|
guardrails?: string[];
|
|
52
54
|
updateMask?: string;
|
|
53
55
|
}
|
|
56
|
+
/** @deprecated Use `UpdateWorkflowOptions` instead. */
|
|
57
|
+
type UpdateAgentOptions = UpdateWorkflowOptions;
|
|
54
58
|
declare class ManagementWorkflowsResource {
|
|
55
59
|
private readonly http;
|
|
56
60
|
private readonly config;
|
|
@@ -60,28 +64,28 @@ declare class ManagementWorkflowsResource {
|
|
|
60
64
|
pageSize?: number;
|
|
61
65
|
pageToken?: string;
|
|
62
66
|
search?: string;
|
|
63
|
-
type?:
|
|
67
|
+
type?: WorkflowType;
|
|
64
68
|
view?: VariationView;
|
|
65
69
|
includeVariation?: boolean;
|
|
66
|
-
}): Promise<Page<
|
|
70
|
+
}): Promise<Page<Workflow>>;
|
|
67
71
|
private listPage;
|
|
68
72
|
get(workflowId: number | string, options?: {
|
|
69
73
|
view?: VariationView;
|
|
70
|
-
}): Promise<
|
|
74
|
+
}): Promise<Workflow>;
|
|
71
75
|
interfaces(workflowId: number | string): WorkflowInterfacesResource;
|
|
72
|
-
create(options:
|
|
73
|
-
update(workflowId: number | string, options?:
|
|
74
|
-
deploy(workflowId: number | string): Promise<
|
|
76
|
+
create(options: CreateWorkflowOptions): Promise<Workflow>;
|
|
77
|
+
update(workflowId: number | string, options?: UpdateWorkflowOptions): Promise<Workflow>;
|
|
78
|
+
deploy(workflowId: number | string): Promise<Workflow>;
|
|
75
79
|
toggle(workflowId: number | string, options: {
|
|
76
80
|
active: boolean;
|
|
77
|
-
}): Promise<
|
|
81
|
+
}): Promise<Workflow>;
|
|
78
82
|
delete(workflowId: number | string): Promise<void>;
|
|
79
|
-
restore(workflowId: number | string): Promise<
|
|
83
|
+
restore(workflowId: number | string): Promise<Workflow>;
|
|
80
84
|
requestOwnershipTransfer(workflowId: number | string, options: {
|
|
81
85
|
newOwnerUserId: string;
|
|
82
|
-
}): Promise<
|
|
83
|
-
cancelOwnershipTransfer(workflowId: number | string): Promise<
|
|
84
|
-
acceptOwnershipTransfer(workflowId: number | string): Promise<
|
|
86
|
+
}): Promise<Workflow>;
|
|
87
|
+
cancelOwnershipTransfer(workflowId: number | string): Promise<Workflow>;
|
|
88
|
+
acceptOwnershipTransfer(workflowId: number | string): Promise<Workflow>;
|
|
85
89
|
}
|
|
86
90
|
|
|
87
91
|
declare class ManagementContextItemsResource {
|
|
@@ -155,17 +159,18 @@ declare class ManagementContextResource {
|
|
|
155
159
|
}): Promise<ContextItem>;
|
|
156
160
|
}
|
|
157
161
|
|
|
158
|
-
declare class ManagementOrganizationResource {
|
|
159
|
-
private readonly http;
|
|
160
|
-
private readonly config;
|
|
161
|
-
constructor(http: HttpClient, config: ModusConfig);
|
|
162
|
-
delete(): Promise<void>;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
162
|
type JsonObjectInput = Record<string, unknown>;
|
|
166
163
|
type JsonObjectListInput = JsonObjectInput[];
|
|
167
164
|
|
|
168
|
-
/**
|
|
165
|
+
/**
|
|
166
|
+
* Skill toolset wire object: a map keyed by tool/integration surface
|
|
167
|
+
* (e.g. `slack`, `clickup`, `sql_runner`, `memory`, `pipedream`, `custom_mcps`),
|
|
168
|
+
* each with its own shape. Intentionally untyped: the OpenAPI `ToolsetDto`
|
|
169
|
+
* schema (`{ tools: [{ id, enabled, config }] }`) is Swagger-only decoration —
|
|
170
|
+
* the API's actual validator (`sanitizeAgentToolsetForWrite`) accepts this
|
|
171
|
+
* keyed-map shape instead, and rejects real payloads against `ToolsetDto`.
|
|
172
|
+
* Tightening this type here would misrepresent the real contract.
|
|
173
|
+
*/
|
|
169
174
|
type ToolsetInput = Record<string, unknown>;
|
|
170
175
|
|
|
171
176
|
type Memory = components['schemas']['MemoryDto'];
|
|
@@ -198,7 +203,7 @@ type EvaluationRun = components['schemas']['EvaluationRunDto'];
|
|
|
198
203
|
type EvaluationRunWithResults = components['schemas']['EvaluationRunWithResultsDto'];
|
|
199
204
|
type TriggerEvaluationRunResponse = components['schemas']['TriggerEvaluationRunResponseDto'];
|
|
200
205
|
|
|
201
|
-
/** Scheduled and manual
|
|
206
|
+
/** Scheduled and manual scope evaluations (`/api/v1/scopes/{id}/evaluations`). */
|
|
202
207
|
declare class ScopeEvaluationsResource {
|
|
203
208
|
private readonly http;
|
|
204
209
|
private readonly config;
|
|
@@ -245,7 +250,7 @@ interface ManagementScopesOperations {
|
|
|
245
250
|
readonly patchMcpConfig: OperationId;
|
|
246
251
|
readonly getVariation: OperationId;
|
|
247
252
|
}
|
|
248
|
-
interface
|
|
253
|
+
interface CreateScopeOptions {
|
|
249
254
|
name: string;
|
|
250
255
|
description?: string;
|
|
251
256
|
expectedOutput?: string;
|
|
@@ -257,7 +262,9 @@ interface CreateSkillOptions {
|
|
|
257
262
|
interfaces?: JsonObjectListInput;
|
|
258
263
|
guardrails?: string[];
|
|
259
264
|
}
|
|
260
|
-
|
|
265
|
+
/** @deprecated Use `CreateScopeOptions` instead. */
|
|
266
|
+
type CreateSkillOptions = CreateScopeOptions;
|
|
267
|
+
interface UpdateScopeOptions {
|
|
261
268
|
name?: string;
|
|
262
269
|
description?: string;
|
|
263
270
|
expectedOutput?: string;
|
|
@@ -273,6 +280,8 @@ interface UpdateSkillOptions {
|
|
|
273
280
|
supervisionSubordinateDescriptions?: Record<string, string>;
|
|
274
281
|
updateMask?: string;
|
|
275
282
|
}
|
|
283
|
+
/** @deprecated Use `UpdateScopeOptions` instead. */
|
|
284
|
+
type UpdateSkillOptions = UpdateScopeOptions;
|
|
276
285
|
/** Full CRUD and lifecycle for Modus scopes (`/api/v1/scopes`). */
|
|
277
286
|
declare class ManagementScopesResource {
|
|
278
287
|
private readonly http;
|
|
@@ -289,31 +298,32 @@ declare class ManagementScopesResource {
|
|
|
289
298
|
search?: string;
|
|
290
299
|
view?: VariationView;
|
|
291
300
|
managerId?: number;
|
|
292
|
-
}): Promise<Page<
|
|
301
|
+
}): Promise<Page<Scope>>;
|
|
293
302
|
private listPage;
|
|
294
303
|
get(scopeId: number | string, options?: {
|
|
295
304
|
view?: VariationView;
|
|
296
|
-
}): Promise<
|
|
297
|
-
create(options:
|
|
298
|
-
update(scopeId: number | string, options?:
|
|
299
|
-
deploy(scopeId: number | string): Promise<
|
|
305
|
+
}): Promise<Scope>;
|
|
306
|
+
create(options: CreateScopeOptions): Promise<Scope>;
|
|
307
|
+
update(scopeId: number | string, options?: UpdateScopeOptions): Promise<Scope>;
|
|
308
|
+
deploy(scopeId: number | string): Promise<Scope>;
|
|
300
309
|
delete(scopeId: number | string): Promise<void>;
|
|
301
|
-
restore(scopeId: number | string): Promise<
|
|
310
|
+
restore(scopeId: number | string): Promise<Scope>;
|
|
302
311
|
requestOwnershipTransfer(scopeId: number | string, options: {
|
|
303
312
|
newOwnerUserId: string;
|
|
304
|
-
}): Promise<
|
|
305
|
-
cancelOwnershipTransfer(scopeId: number | string): Promise<
|
|
306
|
-
acceptOwnershipTransfer(scopeId: number | string): Promise<
|
|
313
|
+
}): Promise<Scope>;
|
|
314
|
+
cancelOwnershipTransfer(scopeId: number | string): Promise<Scope>;
|
|
315
|
+
acceptOwnershipTransfer(scopeId: number | string): Promise<Scope>;
|
|
307
316
|
patchMcpConfig(scopeId: number | string, options: {
|
|
308
317
|
mcpConfig: Record<string, unknown>;
|
|
309
318
|
}): Promise<void>;
|
|
310
319
|
getVariation(scopeId: number | string, options: {
|
|
311
320
|
variationUid: string;
|
|
312
|
-
}): Promise<
|
|
321
|
+
}): Promise<Scope>;
|
|
313
322
|
}
|
|
314
323
|
|
|
315
324
|
type UsageReport = components['schemas']['ListUsageResponseDto'];
|
|
316
325
|
type UsageRollup = 'hour' | 'day';
|
|
326
|
+
type UsageUsersReport = components['schemas']['ListUsageUsersResponseDto'];
|
|
317
327
|
|
|
318
328
|
declare class ManagementUsageResource {
|
|
319
329
|
private readonly http;
|
|
@@ -324,7 +334,12 @@ declare class ManagementUsageResource {
|
|
|
324
334
|
until: string;
|
|
325
335
|
rollup: UsageRollup;
|
|
326
336
|
model?: string;
|
|
337
|
+
userEmail?: readonly string[];
|
|
327
338
|
}): Promise<UsageReport>;
|
|
339
|
+
listUsers(options: {
|
|
340
|
+
since: string;
|
|
341
|
+
until: string;
|
|
342
|
+
}): Promise<UsageUsersReport>;
|
|
328
343
|
}
|
|
329
344
|
|
|
330
345
|
type MemberGroup = components['schemas']['MemberGroupDto'];
|
|
@@ -337,15 +352,14 @@ declare class ManagementUsersResource {
|
|
|
337
352
|
listOrgMembers(): Promise<OrgMember[]>;
|
|
338
353
|
}
|
|
339
354
|
|
|
340
|
-
/** Configure scopes, workflows, context, usage, and
|
|
355
|
+
/** Configure scopes, workflows, context, usage, and users. */
|
|
341
356
|
declare class ModusManagement extends ModusClientBase {
|
|
342
357
|
readonly scopes: ManagementScopesResource;
|
|
343
358
|
readonly workflows: ManagementWorkflowsResource;
|
|
344
359
|
readonly context: ManagementContextResource;
|
|
345
360
|
readonly usage: ManagementUsageResource;
|
|
346
|
-
readonly organization: ManagementOrganizationResource;
|
|
347
361
|
readonly users: ManagementUsersResource;
|
|
348
362
|
constructor(options?: ModusOptions);
|
|
349
363
|
}
|
|
350
364
|
|
|
351
|
-
export { type AgentSelectionInput, type CreateAgentOptions, type CreateSkillOptions, type Memory, type MemorySearchRequest, type MemorySearchResult, type MemoryUpdate, ModusManagement, ModusOptions, type ToolsetInput, type TriggerInput, type UpdateAgentOptions, type UpdateSkillOptions, type UserFeedback, type WorkflowGraphInput };
|
|
365
|
+
export { type AgentSelectionInput, type CreateAgentOptions, type CreateScopeOptions, type CreateSkillOptions, type CreateWorkflowOptions, type Memory, type MemorySearchRequest, type MemorySearchResult, type MemoryUpdate, ModusManagement, ModusOptions, type ToolsetInput, type TriggerInput, type UpdateAgentOptions, type UpdateScopeOptions, type UpdateSkillOptions, type UpdateWorkflowOptions, type UserFeedback, type WorkflowGraphInput };
|
package/dist/management/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
omitUndefined,
|
|
10
10
|
validateId,
|
|
11
11
|
validatePageSize
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-D3NU2M6B.js";
|
|
13
13
|
|
|
14
14
|
// src/_query.ts
|
|
15
15
|
function updateMaskQuery(updateMask) {
|
|
@@ -53,7 +53,7 @@ async function accessConfigBodyForUpdate(guardrails, loadResource) {
|
|
|
53
53
|
return accessConfigWireForUpdate(existing, guardrails);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
// src/management/
|
|
56
|
+
// src/management/workflows/interfaces.ts
|
|
57
57
|
var WorkflowInterfacesResource = class {
|
|
58
58
|
constructor(http, config, workflowId) {
|
|
59
59
|
this.http = http;
|
|
@@ -98,7 +98,7 @@ var WorkflowInterfacesResource = class {
|
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
-
// src/management/
|
|
101
|
+
// src/management/workflows/agents.ts
|
|
102
102
|
var MANAGEMENT_WORKFLOW_OPERATIONS = {
|
|
103
103
|
list: "WorkflowsController_list",
|
|
104
104
|
get: "WorkflowsController_get",
|
|
@@ -149,7 +149,7 @@ var ManagementWorkflowsResource = class {
|
|
|
149
149
|
);
|
|
150
150
|
return buildAipPage(
|
|
151
151
|
data,
|
|
152
|
-
"
|
|
152
|
+
"workflows",
|
|
153
153
|
parseWorkflow,
|
|
154
154
|
(token) => this.listPage(pageSize, token, search, type, view, includeVariation)
|
|
155
155
|
);
|
|
@@ -216,7 +216,7 @@ var ManagementWorkflowsResource = class {
|
|
|
216
216
|
jsonBody: {}
|
|
217
217
|
})
|
|
218
218
|
);
|
|
219
|
-
return parseWorkflow(data.
|
|
219
|
+
return parseWorkflow(data.workflow);
|
|
220
220
|
}
|
|
221
221
|
async toggle(workflowId, options) {
|
|
222
222
|
validateId(workflowId, "workflow_id");
|
|
@@ -481,18 +481,7 @@ var ManagementContextResource = class {
|
|
|
481
481
|
}
|
|
482
482
|
};
|
|
483
483
|
|
|
484
|
-
// src/management/
|
|
485
|
-
var ManagementOrganizationResource = class {
|
|
486
|
-
constructor(http, config) {
|
|
487
|
-
this.http = http;
|
|
488
|
-
this.config = config;
|
|
489
|
-
}
|
|
490
|
-
async delete() {
|
|
491
|
-
await invokeWithRetry(this.config, this.http, "OrganizationController_deleteOrganization");
|
|
492
|
-
}
|
|
493
|
-
};
|
|
494
|
-
|
|
495
|
-
// src/management/skills/memories.ts
|
|
484
|
+
// src/management/scopes/memories.ts
|
|
496
485
|
function parseMemory(raw) {
|
|
497
486
|
return raw;
|
|
498
487
|
}
|
|
@@ -551,7 +540,7 @@ var ScopeMemoriesResource = class {
|
|
|
551
540
|
}
|
|
552
541
|
};
|
|
553
542
|
|
|
554
|
-
// src/management/
|
|
543
|
+
// src/management/scopes/evaluations.ts
|
|
555
544
|
function parseConfig(raw) {
|
|
556
545
|
return raw;
|
|
557
546
|
}
|
|
@@ -611,7 +600,7 @@ var ScopeEvaluationsResource = class {
|
|
|
611
600
|
}
|
|
612
601
|
};
|
|
613
602
|
|
|
614
|
-
// src/management/
|
|
603
|
+
// src/management/scopes/supervision.ts
|
|
615
604
|
var ScopeSupervisionResource = class {
|
|
616
605
|
constructor(http, config, scopeId) {
|
|
617
606
|
this.http = http;
|
|
@@ -640,7 +629,7 @@ var ScopeSupervisionResource = class {
|
|
|
640
629
|
}
|
|
641
630
|
};
|
|
642
631
|
|
|
643
|
-
// src/management/
|
|
632
|
+
// src/management/scopes/skills.ts
|
|
644
633
|
var MANAGEMENT_SCOPE_OPERATIONS = {
|
|
645
634
|
list: "ScopesController_list",
|
|
646
635
|
get: "ScopesController_get",
|
|
@@ -702,7 +691,7 @@ var ManagementScopesResource = class {
|
|
|
702
691
|
);
|
|
703
692
|
return buildAipPage(
|
|
704
693
|
data,
|
|
705
|
-
"
|
|
694
|
+
"scopes",
|
|
706
695
|
parseScope,
|
|
707
696
|
(token) => this.listPage(pageSize, token, search, view, managerId)
|
|
708
697
|
);
|
|
@@ -775,7 +764,7 @@ var ManagementScopesResource = class {
|
|
|
775
764
|
jsonBody: {}
|
|
776
765
|
})
|
|
777
766
|
);
|
|
778
|
-
return parseScope(data.
|
|
767
|
+
return parseScope(data.scope);
|
|
779
768
|
}
|
|
780
769
|
async delete(scopeId) {
|
|
781
770
|
validateId(scopeId, "scope_id");
|
|
@@ -854,9 +843,20 @@ var ManagementUsageResource = class {
|
|
|
854
843
|
rollup: options.rollup
|
|
855
844
|
};
|
|
856
845
|
if (options.model !== void 0) query.model = options.model;
|
|
846
|
+
if (options.userEmail !== void 0) query.user_email = [...options.userEmail];
|
|
857
847
|
const data = await invokeWithRetry(this.config, this.http, "UsageController_list", { query });
|
|
858
848
|
return data;
|
|
859
849
|
}
|
|
850
|
+
async listUsers(options) {
|
|
851
|
+
const query = {
|
|
852
|
+
since: options.since,
|
|
853
|
+
until: options.until
|
|
854
|
+
};
|
|
855
|
+
const data = await invokeWithRetry(this.config, this.http, "UsageController_listUsers", {
|
|
856
|
+
query
|
|
857
|
+
});
|
|
858
|
+
return data;
|
|
859
|
+
}
|
|
860
860
|
};
|
|
861
861
|
|
|
862
862
|
// src/management/users.ts
|
|
@@ -891,7 +891,6 @@ var ModusManagement = class extends ModusClientBase {
|
|
|
891
891
|
this.workflows = new ManagementWorkflowsResource(this.http, this.config);
|
|
892
892
|
this.context = new ManagementContextResource(this.http, this.config);
|
|
893
893
|
this.usage = new ManagementUsageResource(this.http, this.config);
|
|
894
|
-
this.organization = new ManagementOrganizationResource(this.http, this.config);
|
|
895
894
|
this.users = new ManagementUsersResource(this.http, this.config);
|
|
896
895
|
}
|
|
897
896
|
};
|