@getmodus/sdk 0.1.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.
@@ -0,0 +1,351 @@
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-nx1ujbiv.cjs';
2
+
3
+ type AgentInterface = components['schemas']['AgentInterfaceDto'];
4
+ type AddAgentInterface = components['schemas']['AddAgentInterfaceDto'];
5
+ type UpdateAgentInterface = components['schemas']['UpdateAgentInterfaceDto'];
6
+ declare class WorkflowInterfacesResource {
7
+ private readonly http;
8
+ private readonly config;
9
+ private readonly workflowId;
10
+ constructor(http: HttpClient, config: ModusConfig, workflowId: number | string);
11
+ list(): Promise<AgentInterface[]>;
12
+ create(options: AddAgentInterface): Promise<AgentInterface>;
13
+ update(interfaceId: string, options: UpdateAgentInterface, updateMask?: string): Promise<AgentInterface>;
14
+ delete(interfaceId: string): Promise<void>;
15
+ deleteAll(): Promise<void>;
16
+ }
17
+
18
+ type TriggerInput = Record<string, unknown>;
19
+ type AgentSelectionInput = Record<string, unknown>;
20
+ type WorkflowGraphInput = Record<string, unknown>;
21
+ /** The canonical `/api/v1/workflows` management operationIds. */
22
+ interface ManagementWorkflowsOperations {
23
+ readonly list: OperationId;
24
+ readonly get: OperationId;
25
+ readonly create: OperationId;
26
+ readonly update: OperationId;
27
+ readonly deploy: OperationId;
28
+ readonly delete: OperationId;
29
+ readonly restore: OperationId;
30
+ readonly requestOwnershipTransfer: OperationId;
31
+ readonly cancelOwnershipTransfer: OperationId;
32
+ readonly acceptOwnershipTransfer: OperationId;
33
+ readonly toggle: OperationId;
34
+ }
35
+ interface CreateAgentOptions {
36
+ name: string;
37
+ type: AgentType;
38
+ description?: string;
39
+ trigger?: TriggerInput;
40
+ agentSelection?: AgentSelectionInput;
41
+ workflowStructure?: WorkflowGraphInput;
42
+ guardrails?: string[];
43
+ }
44
+ interface UpdateAgentOptions {
45
+ name?: string;
46
+ type?: AgentType;
47
+ description?: string;
48
+ trigger?: TriggerInput;
49
+ agentSelection?: AgentSelectionInput;
50
+ workflowStructure?: WorkflowGraphInput;
51
+ guardrails?: string[];
52
+ updateMask?: string;
53
+ }
54
+ declare class ManagementWorkflowsResource {
55
+ private readonly http;
56
+ private readonly config;
57
+ protected readonly ops: ManagementWorkflowsOperations;
58
+ constructor(http: HttpClient, config: ModusConfig);
59
+ list(options?: {
60
+ pageSize?: number;
61
+ pageToken?: string;
62
+ search?: string;
63
+ type?: AgentType;
64
+ view?: VariationView;
65
+ includeVariation?: boolean;
66
+ }): Promise<Page<Agent>>;
67
+ private listPage;
68
+ get(workflowId: number | string, options?: {
69
+ view?: VariationView;
70
+ }): Promise<Agent>;
71
+ interfaces(workflowId: number | string): WorkflowInterfacesResource;
72
+ create(options: CreateAgentOptions): Promise<Agent>;
73
+ update(workflowId: number | string, options?: UpdateAgentOptions): Promise<Agent>;
74
+ deploy(workflowId: number | string): Promise<Agent>;
75
+ toggle(workflowId: number | string, options: {
76
+ active: boolean;
77
+ }): Promise<Agent>;
78
+ delete(workflowId: number | string): Promise<void>;
79
+ restore(workflowId: number | string): Promise<Agent>;
80
+ requestOwnershipTransfer(workflowId: number | string, options: {
81
+ newOwnerUserId: string;
82
+ }): Promise<Agent>;
83
+ cancelOwnershipTransfer(workflowId: number | string): Promise<Agent>;
84
+ acceptOwnershipTransfer(workflowId: number | string): Promise<Agent>;
85
+ }
86
+
87
+ declare class ManagementContextItemsResource {
88
+ private readonly http;
89
+ private readonly config;
90
+ constructor(http: HttpClient, config: ModusConfig);
91
+ list(options?: {
92
+ pageSize?: number;
93
+ pageToken?: string;
94
+ contextType?: string;
95
+ }): Promise<Page<ContextItem>>;
96
+ private listPage;
97
+ get(uid: string): Promise<ContextItem>;
98
+ update(uid: string, options?: {
99
+ content?: unknown;
100
+ contextType?: string;
101
+ description?: string;
102
+ userFeedback?: UserFeedback;
103
+ topics?: string[];
104
+ updateMask?: string;
105
+ }): Promise<ContextItem>;
106
+ delete(uid: string): Promise<ContextItemDeletion>;
107
+ }
108
+
109
+ type UserFeedback = 'positive' | 'neutral' | 'negative';
110
+
111
+ declare class ManagementContextResource {
112
+ private readonly http;
113
+ private readonly config;
114
+ readonly items: ManagementContextItemsResource;
115
+ readonly customItems: CustomContextItemsResource;
116
+ constructor(http: HttpClient, config: ModusConfig);
117
+ private create;
118
+ createNote(title: string, content: string): Promise<CreatedContextItem>;
119
+ updateNote(uid: string, options: {
120
+ title: string;
121
+ body: string;
122
+ existing?: ContextItem;
123
+ description?: string;
124
+ userFeedback?: UserFeedback;
125
+ topics?: string[];
126
+ }): Promise<ContextItem>;
127
+ createSavedQuery(name: string, options: {
128
+ query?: string;
129
+ connectionId: string;
130
+ description?: string;
131
+ path?: string[];
132
+ }): Promise<CreatedContextItem>;
133
+ updateSavedQuery(uid: string, options: {
134
+ name: string;
135
+ query: string;
136
+ connectionId?: string;
137
+ path?: string[];
138
+ existing?: ContextItem;
139
+ description?: string;
140
+ userFeedback?: UserFeedback;
141
+ topics?: string[];
142
+ }): Promise<ContextItem>;
143
+ createLink(url: string, options?: {
144
+ title?: string;
145
+ isCrawl?: boolean;
146
+ pageLimit?: number;
147
+ }): Promise<CreatedContextItem>;
148
+ updateLink(uid: string, options: {
149
+ title?: string;
150
+ url?: string;
151
+ existing?: ContextItem;
152
+ description?: string;
153
+ userFeedback?: UserFeedback;
154
+ topics?: string[];
155
+ }): Promise<ContextItem>;
156
+ }
157
+
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
+ type JsonObjectInput = Record<string, unknown>;
166
+ type JsonObjectListInput = JsonObjectInput[];
167
+
168
+ /** Skill toolset wire object (integrations, sql_runner, memory, mcp, …). */
169
+ type ToolsetInput = Record<string, unknown>;
170
+
171
+ type Memory = components['schemas']['MemoryDto'];
172
+ type MemorySearchRequest = components['schemas']['SearchMemoriesRequestDto'];
173
+ type MemoryUpdate = components['schemas']['UpdateMemoryRequestDto'];
174
+ type MemorySearchResult = components['schemas']['ListMemoriesResponseDto'];
175
+
176
+ /** Long-term memory stored per scope (`/api/v1/scopes/{id}/memories`). */
177
+ declare class ScopeMemoriesResource {
178
+ private readonly http;
179
+ private readonly config;
180
+ private readonly scopeId;
181
+ constructor(http: HttpClient, config: ModusConfig, scopeId: number | string);
182
+ list(options?: {
183
+ pageSize?: number;
184
+ pageToken?: string;
185
+ userId?: string;
186
+ }): Promise<Page<Memory>>;
187
+ private listPage;
188
+ search(request: MemorySearchRequest): Promise<MemorySearchResult>;
189
+ update(memoryId: string, update: MemoryUpdate, options?: {
190
+ updateMask?: string;
191
+ }): Promise<Memory>;
192
+ delete(memoryId: string): Promise<void>;
193
+ }
194
+
195
+ type EvaluationConfig = components['schemas']['EvaluationConfigDto'];
196
+ type UpdateEvaluationConfig = components['schemas']['UpdateEvaluationConfigDto'];
197
+ type EvaluationRun = components['schemas']['EvaluationRunDto'];
198
+ type EvaluationRunWithResults = components['schemas']['EvaluationRunWithResultsDto'];
199
+ type TriggerEvaluationRunResponse = components['schemas']['TriggerEvaluationRunResponseDto'];
200
+
201
+ /** Scheduled and manual skill evaluations (`/api/v1/scopes/{id}/evaluations`). */
202
+ declare class ScopeEvaluationsResource {
203
+ private readonly http;
204
+ private readonly config;
205
+ private readonly scopeId;
206
+ constructor(http: HttpClient, config: ModusConfig, scopeId: number | string);
207
+ getConfig(): Promise<EvaluationConfig>;
208
+ updateConfig(update: UpdateEvaluationConfig): Promise<EvaluationConfig>;
209
+ triggerRun(): Promise<TriggerEvaluationRunResponse>;
210
+ listRuns(options?: {
211
+ pageSize?: number;
212
+ pageToken?: string;
213
+ }): Promise<Page<EvaluationRun>>;
214
+ private listRunsPage;
215
+ getRun(runId: string): Promise<EvaluationRunWithResults>;
216
+ }
217
+
218
+ type Supervision = components['schemas']['SupervisionDto'];
219
+ type SetSupervisionRequest = components['schemas']['SetSupervisionRequestDto'];
220
+ declare class ScopeSupervisionResource {
221
+ private readonly http;
222
+ private readonly config;
223
+ private readonly scopeId;
224
+ constructor(http: HttpClient, config: ModusConfig, scopeId: number | string);
225
+ get(options?: {
226
+ view?: VariationView;
227
+ }): Promise<Supervision>;
228
+ set(request: SetSupervisionRequest): Promise<Supervision>;
229
+ setActive(request: SetSupervisionRequest): Promise<Supervision>;
230
+ private write;
231
+ }
232
+
233
+ /** The canonical `/api/v1/scopes` management operationIds. */
234
+ interface ManagementScopesOperations {
235
+ readonly list: OperationId;
236
+ readonly get: OperationId;
237
+ readonly create: OperationId;
238
+ readonly update: OperationId;
239
+ readonly deploy: OperationId;
240
+ readonly delete: OperationId;
241
+ readonly restore: OperationId;
242
+ readonly requestOwnershipTransfer: OperationId;
243
+ readonly cancelOwnershipTransfer: OperationId;
244
+ readonly acceptOwnershipTransfer: OperationId;
245
+ readonly patchMcpConfig: OperationId;
246
+ readonly getVariation: OperationId;
247
+ }
248
+ interface CreateSkillOptions {
249
+ name: string;
250
+ description?: string;
251
+ expectedOutput?: string;
252
+ instructions?: string[];
253
+ toolset?: ToolsetInput;
254
+ model?: string;
255
+ connectionSet?: JsonObjectListInput;
256
+ contextSelections?: JsonObjectListInput;
257
+ interfaces?: JsonObjectListInput;
258
+ guardrails?: string[];
259
+ }
260
+ interface UpdateSkillOptions {
261
+ name?: string;
262
+ description?: string;
263
+ expectedOutput?: string;
264
+ instructions?: string[];
265
+ toolset?: ToolsetInput;
266
+ model?: string;
267
+ connectionSet?: JsonObjectListInput;
268
+ contextSelections?: JsonObjectListInput;
269
+ interfaces?: JsonObjectListInput;
270
+ guardrails?: string[];
271
+ managerId?: string;
272
+ evaluations?: JsonObjectListInput;
273
+ supervisionSubordinateDescriptions?: Record<string, string>;
274
+ updateMask?: string;
275
+ }
276
+ /** Full CRUD and lifecycle for Modus scopes (`/api/v1/scopes`). */
277
+ declare class ManagementScopesResource {
278
+ private readonly http;
279
+ private readonly config;
280
+ protected readonly ops: ManagementScopesOperations;
281
+ constructor(http: HttpClient, config: ModusConfig);
282
+ conversations(scopeId: number | string): ScopeConversationsResource;
283
+ memories(scopeId: number | string): ScopeMemoriesResource;
284
+ evaluations(scopeId: number | string): ScopeEvaluationsResource;
285
+ supervision(scopeId: number | string): ScopeSupervisionResource;
286
+ list(options?: {
287
+ pageSize?: number;
288
+ pageToken?: string;
289
+ search?: string;
290
+ view?: VariationView;
291
+ managerId?: number;
292
+ }): Promise<Page<Skill>>;
293
+ private listPage;
294
+ get(scopeId: number | string, options?: {
295
+ view?: VariationView;
296
+ }): Promise<Skill>;
297
+ create(options: CreateSkillOptions): Promise<Skill>;
298
+ update(scopeId: number | string, options?: UpdateSkillOptions): Promise<Skill>;
299
+ deploy(scopeId: number | string): Promise<Skill>;
300
+ delete(scopeId: number | string): Promise<void>;
301
+ restore(scopeId: number | string): Promise<Skill>;
302
+ requestOwnershipTransfer(scopeId: number | string, options: {
303
+ newOwnerUserId: string;
304
+ }): Promise<Skill>;
305
+ cancelOwnershipTransfer(scopeId: number | string): Promise<Skill>;
306
+ acceptOwnershipTransfer(scopeId: number | string): Promise<Skill>;
307
+ patchMcpConfig(scopeId: number | string, options: {
308
+ mcpConfig: Record<string, unknown>;
309
+ }): Promise<void>;
310
+ getVariation(scopeId: number | string, options: {
311
+ variationUid: string;
312
+ }): Promise<Skill>;
313
+ }
314
+
315
+ type UsageReport = components['schemas']['ListUsageResponseDto'];
316
+ type UsageRollup = 'hour' | 'day';
317
+
318
+ declare class ManagementUsageResource {
319
+ private readonly http;
320
+ private readonly config;
321
+ constructor(http: HttpClient, config: ModusConfig);
322
+ list(options: {
323
+ since: string;
324
+ until: string;
325
+ rollup: UsageRollup;
326
+ model?: string;
327
+ }): Promise<UsageReport>;
328
+ }
329
+
330
+ type MemberGroup = components['schemas']['MemberGroupDto'];
331
+ type OrgMember = components['schemas']['OrgMemberDto'];
332
+ declare class ManagementUsersResource {
333
+ private readonly http;
334
+ private readonly config;
335
+ constructor(http: HttpClient, config: ModusConfig);
336
+ listMemberGroups(): Promise<MemberGroup[]>;
337
+ listOrgMembers(): Promise<OrgMember[]>;
338
+ }
339
+
340
+ /** Configure scopes, workflows, context, usage, and organization settings. */
341
+ declare class ModusManagement extends ModusClientBase {
342
+ readonly scopes: ManagementScopesResource;
343
+ readonly workflows: ManagementWorkflowsResource;
344
+ readonly context: ManagementContextResource;
345
+ readonly usage: ManagementUsageResource;
346
+ readonly organization: ManagementOrganizationResource;
347
+ readonly users: ManagementUsersResource;
348
+ constructor(options?: ModusOptions);
349
+ }
350
+
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 };
@@ -0,0 +1,351 @@
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-nx1ujbiv.js';
2
+
3
+ type AgentInterface = components['schemas']['AgentInterfaceDto'];
4
+ type AddAgentInterface = components['schemas']['AddAgentInterfaceDto'];
5
+ type UpdateAgentInterface = components['schemas']['UpdateAgentInterfaceDto'];
6
+ declare class WorkflowInterfacesResource {
7
+ private readonly http;
8
+ private readonly config;
9
+ private readonly workflowId;
10
+ constructor(http: HttpClient, config: ModusConfig, workflowId: number | string);
11
+ list(): Promise<AgentInterface[]>;
12
+ create(options: AddAgentInterface): Promise<AgentInterface>;
13
+ update(interfaceId: string, options: UpdateAgentInterface, updateMask?: string): Promise<AgentInterface>;
14
+ delete(interfaceId: string): Promise<void>;
15
+ deleteAll(): Promise<void>;
16
+ }
17
+
18
+ type TriggerInput = Record<string, unknown>;
19
+ type AgentSelectionInput = Record<string, unknown>;
20
+ type WorkflowGraphInput = Record<string, unknown>;
21
+ /** The canonical `/api/v1/workflows` management operationIds. */
22
+ interface ManagementWorkflowsOperations {
23
+ readonly list: OperationId;
24
+ readonly get: OperationId;
25
+ readonly create: OperationId;
26
+ readonly update: OperationId;
27
+ readonly deploy: OperationId;
28
+ readonly delete: OperationId;
29
+ readonly restore: OperationId;
30
+ readonly requestOwnershipTransfer: OperationId;
31
+ readonly cancelOwnershipTransfer: OperationId;
32
+ readonly acceptOwnershipTransfer: OperationId;
33
+ readonly toggle: OperationId;
34
+ }
35
+ interface CreateAgentOptions {
36
+ name: string;
37
+ type: AgentType;
38
+ description?: string;
39
+ trigger?: TriggerInput;
40
+ agentSelection?: AgentSelectionInput;
41
+ workflowStructure?: WorkflowGraphInput;
42
+ guardrails?: string[];
43
+ }
44
+ interface UpdateAgentOptions {
45
+ name?: string;
46
+ type?: AgentType;
47
+ description?: string;
48
+ trigger?: TriggerInput;
49
+ agentSelection?: AgentSelectionInput;
50
+ workflowStructure?: WorkflowGraphInput;
51
+ guardrails?: string[];
52
+ updateMask?: string;
53
+ }
54
+ declare class ManagementWorkflowsResource {
55
+ private readonly http;
56
+ private readonly config;
57
+ protected readonly ops: ManagementWorkflowsOperations;
58
+ constructor(http: HttpClient, config: ModusConfig);
59
+ list(options?: {
60
+ pageSize?: number;
61
+ pageToken?: string;
62
+ search?: string;
63
+ type?: AgentType;
64
+ view?: VariationView;
65
+ includeVariation?: boolean;
66
+ }): Promise<Page<Agent>>;
67
+ private listPage;
68
+ get(workflowId: number | string, options?: {
69
+ view?: VariationView;
70
+ }): Promise<Agent>;
71
+ interfaces(workflowId: number | string): WorkflowInterfacesResource;
72
+ create(options: CreateAgentOptions): Promise<Agent>;
73
+ update(workflowId: number | string, options?: UpdateAgentOptions): Promise<Agent>;
74
+ deploy(workflowId: number | string): Promise<Agent>;
75
+ toggle(workflowId: number | string, options: {
76
+ active: boolean;
77
+ }): Promise<Agent>;
78
+ delete(workflowId: number | string): Promise<void>;
79
+ restore(workflowId: number | string): Promise<Agent>;
80
+ requestOwnershipTransfer(workflowId: number | string, options: {
81
+ newOwnerUserId: string;
82
+ }): Promise<Agent>;
83
+ cancelOwnershipTransfer(workflowId: number | string): Promise<Agent>;
84
+ acceptOwnershipTransfer(workflowId: number | string): Promise<Agent>;
85
+ }
86
+
87
+ declare class ManagementContextItemsResource {
88
+ private readonly http;
89
+ private readonly config;
90
+ constructor(http: HttpClient, config: ModusConfig);
91
+ list(options?: {
92
+ pageSize?: number;
93
+ pageToken?: string;
94
+ contextType?: string;
95
+ }): Promise<Page<ContextItem>>;
96
+ private listPage;
97
+ get(uid: string): Promise<ContextItem>;
98
+ update(uid: string, options?: {
99
+ content?: unknown;
100
+ contextType?: string;
101
+ description?: string;
102
+ userFeedback?: UserFeedback;
103
+ topics?: string[];
104
+ updateMask?: string;
105
+ }): Promise<ContextItem>;
106
+ delete(uid: string): Promise<ContextItemDeletion>;
107
+ }
108
+
109
+ type UserFeedback = 'positive' | 'neutral' | 'negative';
110
+
111
+ declare class ManagementContextResource {
112
+ private readonly http;
113
+ private readonly config;
114
+ readonly items: ManagementContextItemsResource;
115
+ readonly customItems: CustomContextItemsResource;
116
+ constructor(http: HttpClient, config: ModusConfig);
117
+ private create;
118
+ createNote(title: string, content: string): Promise<CreatedContextItem>;
119
+ updateNote(uid: string, options: {
120
+ title: string;
121
+ body: string;
122
+ existing?: ContextItem;
123
+ description?: string;
124
+ userFeedback?: UserFeedback;
125
+ topics?: string[];
126
+ }): Promise<ContextItem>;
127
+ createSavedQuery(name: string, options: {
128
+ query?: string;
129
+ connectionId: string;
130
+ description?: string;
131
+ path?: string[];
132
+ }): Promise<CreatedContextItem>;
133
+ updateSavedQuery(uid: string, options: {
134
+ name: string;
135
+ query: string;
136
+ connectionId?: string;
137
+ path?: string[];
138
+ existing?: ContextItem;
139
+ description?: string;
140
+ userFeedback?: UserFeedback;
141
+ topics?: string[];
142
+ }): Promise<ContextItem>;
143
+ createLink(url: string, options?: {
144
+ title?: string;
145
+ isCrawl?: boolean;
146
+ pageLimit?: number;
147
+ }): Promise<CreatedContextItem>;
148
+ updateLink(uid: string, options: {
149
+ title?: string;
150
+ url?: string;
151
+ existing?: ContextItem;
152
+ description?: string;
153
+ userFeedback?: UserFeedback;
154
+ topics?: string[];
155
+ }): Promise<ContextItem>;
156
+ }
157
+
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
+ type JsonObjectInput = Record<string, unknown>;
166
+ type JsonObjectListInput = JsonObjectInput[];
167
+
168
+ /** Skill toolset wire object (integrations, sql_runner, memory, mcp, …). */
169
+ type ToolsetInput = Record<string, unknown>;
170
+
171
+ type Memory = components['schemas']['MemoryDto'];
172
+ type MemorySearchRequest = components['schemas']['SearchMemoriesRequestDto'];
173
+ type MemoryUpdate = components['schemas']['UpdateMemoryRequestDto'];
174
+ type MemorySearchResult = components['schemas']['ListMemoriesResponseDto'];
175
+
176
+ /** Long-term memory stored per scope (`/api/v1/scopes/{id}/memories`). */
177
+ declare class ScopeMemoriesResource {
178
+ private readonly http;
179
+ private readonly config;
180
+ private readonly scopeId;
181
+ constructor(http: HttpClient, config: ModusConfig, scopeId: number | string);
182
+ list(options?: {
183
+ pageSize?: number;
184
+ pageToken?: string;
185
+ userId?: string;
186
+ }): Promise<Page<Memory>>;
187
+ private listPage;
188
+ search(request: MemorySearchRequest): Promise<MemorySearchResult>;
189
+ update(memoryId: string, update: MemoryUpdate, options?: {
190
+ updateMask?: string;
191
+ }): Promise<Memory>;
192
+ delete(memoryId: string): Promise<void>;
193
+ }
194
+
195
+ type EvaluationConfig = components['schemas']['EvaluationConfigDto'];
196
+ type UpdateEvaluationConfig = components['schemas']['UpdateEvaluationConfigDto'];
197
+ type EvaluationRun = components['schemas']['EvaluationRunDto'];
198
+ type EvaluationRunWithResults = components['schemas']['EvaluationRunWithResultsDto'];
199
+ type TriggerEvaluationRunResponse = components['schemas']['TriggerEvaluationRunResponseDto'];
200
+
201
+ /** Scheduled and manual skill evaluations (`/api/v1/scopes/{id}/evaluations`). */
202
+ declare class ScopeEvaluationsResource {
203
+ private readonly http;
204
+ private readonly config;
205
+ private readonly scopeId;
206
+ constructor(http: HttpClient, config: ModusConfig, scopeId: number | string);
207
+ getConfig(): Promise<EvaluationConfig>;
208
+ updateConfig(update: UpdateEvaluationConfig): Promise<EvaluationConfig>;
209
+ triggerRun(): Promise<TriggerEvaluationRunResponse>;
210
+ listRuns(options?: {
211
+ pageSize?: number;
212
+ pageToken?: string;
213
+ }): Promise<Page<EvaluationRun>>;
214
+ private listRunsPage;
215
+ getRun(runId: string): Promise<EvaluationRunWithResults>;
216
+ }
217
+
218
+ type Supervision = components['schemas']['SupervisionDto'];
219
+ type SetSupervisionRequest = components['schemas']['SetSupervisionRequestDto'];
220
+ declare class ScopeSupervisionResource {
221
+ private readonly http;
222
+ private readonly config;
223
+ private readonly scopeId;
224
+ constructor(http: HttpClient, config: ModusConfig, scopeId: number | string);
225
+ get(options?: {
226
+ view?: VariationView;
227
+ }): Promise<Supervision>;
228
+ set(request: SetSupervisionRequest): Promise<Supervision>;
229
+ setActive(request: SetSupervisionRequest): Promise<Supervision>;
230
+ private write;
231
+ }
232
+
233
+ /** The canonical `/api/v1/scopes` management operationIds. */
234
+ interface ManagementScopesOperations {
235
+ readonly list: OperationId;
236
+ readonly get: OperationId;
237
+ readonly create: OperationId;
238
+ readonly update: OperationId;
239
+ readonly deploy: OperationId;
240
+ readonly delete: OperationId;
241
+ readonly restore: OperationId;
242
+ readonly requestOwnershipTransfer: OperationId;
243
+ readonly cancelOwnershipTransfer: OperationId;
244
+ readonly acceptOwnershipTransfer: OperationId;
245
+ readonly patchMcpConfig: OperationId;
246
+ readonly getVariation: OperationId;
247
+ }
248
+ interface CreateSkillOptions {
249
+ name: string;
250
+ description?: string;
251
+ expectedOutput?: string;
252
+ instructions?: string[];
253
+ toolset?: ToolsetInput;
254
+ model?: string;
255
+ connectionSet?: JsonObjectListInput;
256
+ contextSelections?: JsonObjectListInput;
257
+ interfaces?: JsonObjectListInput;
258
+ guardrails?: string[];
259
+ }
260
+ interface UpdateSkillOptions {
261
+ name?: string;
262
+ description?: string;
263
+ expectedOutput?: string;
264
+ instructions?: string[];
265
+ toolset?: ToolsetInput;
266
+ model?: string;
267
+ connectionSet?: JsonObjectListInput;
268
+ contextSelections?: JsonObjectListInput;
269
+ interfaces?: JsonObjectListInput;
270
+ guardrails?: string[];
271
+ managerId?: string;
272
+ evaluations?: JsonObjectListInput;
273
+ supervisionSubordinateDescriptions?: Record<string, string>;
274
+ updateMask?: string;
275
+ }
276
+ /** Full CRUD and lifecycle for Modus scopes (`/api/v1/scopes`). */
277
+ declare class ManagementScopesResource {
278
+ private readonly http;
279
+ private readonly config;
280
+ protected readonly ops: ManagementScopesOperations;
281
+ constructor(http: HttpClient, config: ModusConfig);
282
+ conversations(scopeId: number | string): ScopeConversationsResource;
283
+ memories(scopeId: number | string): ScopeMemoriesResource;
284
+ evaluations(scopeId: number | string): ScopeEvaluationsResource;
285
+ supervision(scopeId: number | string): ScopeSupervisionResource;
286
+ list(options?: {
287
+ pageSize?: number;
288
+ pageToken?: string;
289
+ search?: string;
290
+ view?: VariationView;
291
+ managerId?: number;
292
+ }): Promise<Page<Skill>>;
293
+ private listPage;
294
+ get(scopeId: number | string, options?: {
295
+ view?: VariationView;
296
+ }): Promise<Skill>;
297
+ create(options: CreateSkillOptions): Promise<Skill>;
298
+ update(scopeId: number | string, options?: UpdateSkillOptions): Promise<Skill>;
299
+ deploy(scopeId: number | string): Promise<Skill>;
300
+ delete(scopeId: number | string): Promise<void>;
301
+ restore(scopeId: number | string): Promise<Skill>;
302
+ requestOwnershipTransfer(scopeId: number | string, options: {
303
+ newOwnerUserId: string;
304
+ }): Promise<Skill>;
305
+ cancelOwnershipTransfer(scopeId: number | string): Promise<Skill>;
306
+ acceptOwnershipTransfer(scopeId: number | string): Promise<Skill>;
307
+ patchMcpConfig(scopeId: number | string, options: {
308
+ mcpConfig: Record<string, unknown>;
309
+ }): Promise<void>;
310
+ getVariation(scopeId: number | string, options: {
311
+ variationUid: string;
312
+ }): Promise<Skill>;
313
+ }
314
+
315
+ type UsageReport = components['schemas']['ListUsageResponseDto'];
316
+ type UsageRollup = 'hour' | 'day';
317
+
318
+ declare class ManagementUsageResource {
319
+ private readonly http;
320
+ private readonly config;
321
+ constructor(http: HttpClient, config: ModusConfig);
322
+ list(options: {
323
+ since: string;
324
+ until: string;
325
+ rollup: UsageRollup;
326
+ model?: string;
327
+ }): Promise<UsageReport>;
328
+ }
329
+
330
+ type MemberGroup = components['schemas']['MemberGroupDto'];
331
+ type OrgMember = components['schemas']['OrgMemberDto'];
332
+ declare class ManagementUsersResource {
333
+ private readonly http;
334
+ private readonly config;
335
+ constructor(http: HttpClient, config: ModusConfig);
336
+ listMemberGroups(): Promise<MemberGroup[]>;
337
+ listOrgMembers(): Promise<OrgMember[]>;
338
+ }
339
+
340
+ /** Configure scopes, workflows, context, usage, and organization settings. */
341
+ declare class ModusManagement extends ModusClientBase {
342
+ readonly scopes: ManagementScopesResource;
343
+ readonly workflows: ManagementWorkflowsResource;
344
+ readonly context: ManagementContextResource;
345
+ readonly usage: ManagementUsageResource;
346
+ readonly organization: ManagementOrganizationResource;
347
+ readonly users: ManagementUsersResource;
348
+ constructor(options?: ModusOptions);
349
+ }
350
+
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 };