@getmodus/sdk 0.2.0 → 0.2.2
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 +12 -3
- package/README.md +186 -39
- package/assets/modus-logo.png +0 -0
- package/assets/modus-logo.svg +13 -0
- package/dist/{chunk-7IOU7BOU.js → chunk-OUFN2O5C.js} +124 -93
- package/dist/chunk-OUFN2O5C.js.map +1 -0
- package/dist/{conversations-DoyTcWk6.d.cts → conversations-BP2sI3Q5.d.cts} +108 -90
- package/dist/{conversations-DoyTcWk6.d.ts → conversations-BP2sI3Q5.d.ts} +108 -90
- package/dist/index.cjs +237 -125
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -10
- package/dist/index.d.ts +26 -10
- package/dist/index.js +114 -34
- package/dist/index.js.map +1 -1
- package/dist/management/index.cjs +129 -93
- package/dist/management/index.cjs.map +1 -1
- package/dist/management/index.d.cts +1 -1
- package/dist/management/index.d.ts +1 -1
- package/dist/management/index.js +7 -2
- package/dist/management/index.js.map +1 -1
- package/package.json +4 -2
- package/dist/chunk-7IOU7BOU.js.map +0 -1
|
@@ -4,7 +4,7 @@ var OPERATIONS = {
|
|
|
4
4
|
method: "GET",
|
|
5
5
|
path: "/api/v1/connections",
|
|
6
6
|
service: "modus-api",
|
|
7
|
-
serverUrl: "https://api.
|
|
7
|
+
serverUrl: "https://api.getmodus.com",
|
|
8
8
|
pathParams: [],
|
|
9
9
|
queryParams: ["pageToken", "pageSize", "type"],
|
|
10
10
|
requestSchema: null,
|
|
@@ -14,7 +14,7 @@ var OPERATIONS = {
|
|
|
14
14
|
method: "POST",
|
|
15
15
|
path: "/api/v1/context/links",
|
|
16
16
|
service: "modus-api",
|
|
17
|
-
serverUrl: "https://api.
|
|
17
|
+
serverUrl: "https://api.getmodus.com",
|
|
18
18
|
pathParams: [],
|
|
19
19
|
queryParams: [],
|
|
20
20
|
requestSchema: "CreateLinkDto",
|
|
@@ -24,7 +24,7 @@ var OPERATIONS = {
|
|
|
24
24
|
method: "POST",
|
|
25
25
|
path: "/api/v1/context/notes",
|
|
26
26
|
service: "modus-api",
|
|
27
|
-
serverUrl: "https://api.
|
|
27
|
+
serverUrl: "https://api.getmodus.com",
|
|
28
28
|
pathParams: [],
|
|
29
29
|
queryParams: [],
|
|
30
30
|
requestSchema: "CreateNoteDto",
|
|
@@ -34,7 +34,7 @@ var OPERATIONS = {
|
|
|
34
34
|
method: "POST",
|
|
35
35
|
path: "/api/v1/context/saved-queries",
|
|
36
36
|
service: "modus-api",
|
|
37
|
-
serverUrl: "https://api.
|
|
37
|
+
serverUrl: "https://api.getmodus.com",
|
|
38
38
|
pathParams: [],
|
|
39
39
|
queryParams: [],
|
|
40
40
|
requestSchema: "CreateSavedQueryDto",
|
|
@@ -44,7 +44,7 @@ var OPERATIONS = {
|
|
|
44
44
|
method: "DELETE",
|
|
45
45
|
path: "/api/v1/context/items/{uid}",
|
|
46
46
|
service: "modus-api",
|
|
47
|
-
serverUrl: "https://api.
|
|
47
|
+
serverUrl: "https://api.getmodus.com",
|
|
48
48
|
pathParams: ["uid"],
|
|
49
49
|
queryParams: [],
|
|
50
50
|
requestSchema: null,
|
|
@@ -54,7 +54,7 @@ var OPERATIONS = {
|
|
|
54
54
|
method: "GET",
|
|
55
55
|
path: "/api/v1/context/items/{uid}",
|
|
56
56
|
service: "modus-api",
|
|
57
|
-
serverUrl: "https://api.
|
|
57
|
+
serverUrl: "https://api.getmodus.com",
|
|
58
58
|
pathParams: ["uid"],
|
|
59
59
|
queryParams: [],
|
|
60
60
|
requestSchema: null,
|
|
@@ -64,7 +64,7 @@ var OPERATIONS = {
|
|
|
64
64
|
method: "GET",
|
|
65
65
|
path: "/api/v1/context/items",
|
|
66
66
|
service: "modus-api",
|
|
67
|
-
serverUrl: "https://api.
|
|
67
|
+
serverUrl: "https://api.getmodus.com",
|
|
68
68
|
pathParams: [],
|
|
69
69
|
queryParams: ["pageToken", "pageSize", "contextTypes", "verificationStatuses", "searchQuery", "topics"],
|
|
70
70
|
requestSchema: null,
|
|
@@ -74,7 +74,7 @@ var OPERATIONS = {
|
|
|
74
74
|
method: "GET",
|
|
75
75
|
path: "/api/v1/context/items/{uid}/values",
|
|
76
76
|
service: "modus-api",
|
|
77
|
-
serverUrl: "https://api.
|
|
77
|
+
serverUrl: "https://api.getmodus.com",
|
|
78
78
|
pathParams: ["uid"],
|
|
79
79
|
queryParams: ["contextType", "contentKeyPath", "pageSize", "offset", "pageToken", "searchQuery", "dataPathPrefix"],
|
|
80
80
|
requestSchema: null,
|
|
@@ -84,7 +84,7 @@ var OPERATIONS = {
|
|
|
84
84
|
method: "POST",
|
|
85
85
|
path: "/api/v1/context/items/lookup",
|
|
86
86
|
service: "modus-api",
|
|
87
|
-
serverUrl: "https://api.
|
|
87
|
+
serverUrl: "https://api.getmodus.com",
|
|
88
88
|
pathParams: [],
|
|
89
89
|
queryParams: [],
|
|
90
90
|
requestSchema: "LookupContextItemDto",
|
|
@@ -94,7 +94,7 @@ var OPERATIONS = {
|
|
|
94
94
|
method: "PATCH",
|
|
95
95
|
path: "/api/v1/context/items/{uid}",
|
|
96
96
|
service: "modus-api",
|
|
97
|
-
serverUrl: "https://api.
|
|
97
|
+
serverUrl: "https://api.getmodus.com",
|
|
98
98
|
pathParams: ["uid"],
|
|
99
99
|
queryParams: ["updateMask"],
|
|
100
100
|
requestSchema: "UpdateContextItemDto",
|
|
@@ -104,7 +104,7 @@ var OPERATIONS = {
|
|
|
104
104
|
method: "POST",
|
|
105
105
|
path: "/api/v1/context/custom-items/batch",
|
|
106
106
|
service: "modus-api",
|
|
107
|
-
serverUrl: "https://api.
|
|
107
|
+
serverUrl: "https://api.getmodus.com",
|
|
108
108
|
pathParams: [],
|
|
109
109
|
queryParams: [],
|
|
110
110
|
requestSchema: "BatchCreateCustomContextItemsDto",
|
|
@@ -114,7 +114,7 @@ var OPERATIONS = {
|
|
|
114
114
|
method: "POST",
|
|
115
115
|
path: "/api/v1/context/custom-items",
|
|
116
116
|
service: "modus-api",
|
|
117
|
-
serverUrl: "https://api.
|
|
117
|
+
serverUrl: "https://api.getmodus.com",
|
|
118
118
|
pathParams: [],
|
|
119
119
|
queryParams: [],
|
|
120
120
|
requestSchema: "CreateCustomContextItemDto",
|
|
@@ -124,7 +124,7 @@ var OPERATIONS = {
|
|
|
124
124
|
method: "DELETE",
|
|
125
125
|
path: "/api/v1/context/custom-items/{uid}",
|
|
126
126
|
service: "modus-api",
|
|
127
|
-
serverUrl: "https://api.
|
|
127
|
+
serverUrl: "https://api.getmodus.com",
|
|
128
128
|
pathParams: ["uid"],
|
|
129
129
|
queryParams: [],
|
|
130
130
|
requestSchema: null,
|
|
@@ -134,7 +134,7 @@ var OPERATIONS = {
|
|
|
134
134
|
method: "GET",
|
|
135
135
|
path: "/api/v1/context/custom-items/{uid}",
|
|
136
136
|
service: "modus-api",
|
|
137
|
-
serverUrl: "https://api.
|
|
137
|
+
serverUrl: "https://api.getmodus.com",
|
|
138
138
|
pathParams: ["uid"],
|
|
139
139
|
queryParams: [],
|
|
140
140
|
requestSchema: null,
|
|
@@ -144,7 +144,7 @@ var OPERATIONS = {
|
|
|
144
144
|
method: "GET",
|
|
145
145
|
path: "/api/v1/context/custom-items",
|
|
146
146
|
service: "modus-api",
|
|
147
|
-
serverUrl: "https://api.
|
|
147
|
+
serverUrl: "https://api.getmodus.com",
|
|
148
148
|
pathParams: [],
|
|
149
149
|
queryParams: ["pageToken", "pageSize", "contextTypes", "verificationStatuses", "searchQuery", "topics"],
|
|
150
150
|
requestSchema: null,
|
|
@@ -154,7 +154,7 @@ var OPERATIONS = {
|
|
|
154
154
|
method: "PATCH",
|
|
155
155
|
path: "/api/v1/context/custom-items/{uid}",
|
|
156
156
|
service: "modus-api",
|
|
157
|
-
serverUrl: "https://api.
|
|
157
|
+
serverUrl: "https://api.getmodus.com",
|
|
158
158
|
pathParams: ["uid"],
|
|
159
159
|
queryParams: [],
|
|
160
160
|
requestSchema: "UpdateCustomContextItemDto",
|
|
@@ -164,7 +164,7 @@ var OPERATIONS = {
|
|
|
164
164
|
method: "GET",
|
|
165
165
|
path: "/api/v1/scopes/{id}/evaluations/config",
|
|
166
166
|
service: "modus-api",
|
|
167
|
-
serverUrl: "https://api.
|
|
167
|
+
serverUrl: "https://api.getmodus.com",
|
|
168
168
|
pathParams: ["id"],
|
|
169
169
|
queryParams: [],
|
|
170
170
|
requestSchema: null,
|
|
@@ -174,7 +174,7 @@ var OPERATIONS = {
|
|
|
174
174
|
method: "GET",
|
|
175
175
|
path: "/api/v1/scopes/{id}/evaluations/runs/{runId}",
|
|
176
176
|
service: "modus-api",
|
|
177
|
-
serverUrl: "https://api.
|
|
177
|
+
serverUrl: "https://api.getmodus.com",
|
|
178
178
|
pathParams: ["id", "runId"],
|
|
179
179
|
queryParams: [],
|
|
180
180
|
requestSchema: null,
|
|
@@ -184,7 +184,7 @@ var OPERATIONS = {
|
|
|
184
184
|
method: "GET",
|
|
185
185
|
path: "/api/v1/scopes/{id}/evaluations/runs",
|
|
186
186
|
service: "modus-api",
|
|
187
|
-
serverUrl: "https://api.
|
|
187
|
+
serverUrl: "https://api.getmodus.com",
|
|
188
188
|
pathParams: ["id"],
|
|
189
189
|
queryParams: ["pageSize", "pageToken"],
|
|
190
190
|
requestSchema: null,
|
|
@@ -194,7 +194,7 @@ var OPERATIONS = {
|
|
|
194
194
|
method: "POST",
|
|
195
195
|
path: "/api/v1/scopes/{id}/evaluations/runs",
|
|
196
196
|
service: "modus-api",
|
|
197
|
-
serverUrl: "https://api.
|
|
197
|
+
serverUrl: "https://api.getmodus.com",
|
|
198
198
|
pathParams: ["id"],
|
|
199
199
|
queryParams: [],
|
|
200
200
|
requestSchema: null,
|
|
@@ -204,7 +204,7 @@ var OPERATIONS = {
|
|
|
204
204
|
method: "PUT",
|
|
205
205
|
path: "/api/v1/scopes/{id}/evaluations/config",
|
|
206
206
|
service: "modus-api",
|
|
207
|
-
serverUrl: "https://api.
|
|
207
|
+
serverUrl: "https://api.getmodus.com",
|
|
208
208
|
pathParams: ["id"],
|
|
209
209
|
queryParams: [],
|
|
210
210
|
requestSchema: "UpdateEvaluationConfigDto",
|
|
@@ -214,7 +214,7 @@ var OPERATIONS = {
|
|
|
214
214
|
method: "GET",
|
|
215
215
|
path: "/api/v1/users/member-groups",
|
|
216
216
|
service: "modus-api",
|
|
217
|
-
serverUrl: "https://api.
|
|
217
|
+
serverUrl: "https://api.getmodus.com",
|
|
218
218
|
pathParams: [],
|
|
219
219
|
queryParams: ["pageSize", "pageToken"],
|
|
220
220
|
requestSchema: null,
|
|
@@ -224,7 +224,7 @@ var OPERATIONS = {
|
|
|
224
224
|
method: "POST",
|
|
225
225
|
path: "/api/v1/modus/chat",
|
|
226
226
|
service: "modus-api",
|
|
227
|
-
serverUrl: "https://api.
|
|
227
|
+
serverUrl: "https://api.getmodus.com",
|
|
228
228
|
pathParams: [],
|
|
229
229
|
queryParams: [],
|
|
230
230
|
requestSchema: "ModusChatRequestDto",
|
|
@@ -234,7 +234,7 @@ var OPERATIONS = {
|
|
|
234
234
|
method: "POST",
|
|
235
235
|
path: "/api/v1/modus/conversations/{threadId}/chat",
|
|
236
236
|
service: "modus-api",
|
|
237
|
-
serverUrl: "https://api.
|
|
237
|
+
serverUrl: "https://api.getmodus.com",
|
|
238
238
|
pathParams: ["threadId"],
|
|
239
239
|
queryParams: [],
|
|
240
240
|
requestSchema: "ModusChatRequestDto",
|
|
@@ -244,7 +244,7 @@ var OPERATIONS = {
|
|
|
244
244
|
method: "POST",
|
|
245
245
|
path: "/api/v1/modus/context",
|
|
246
246
|
service: "modus-api",
|
|
247
|
-
serverUrl: "https://api.
|
|
247
|
+
serverUrl: "https://api.getmodus.com",
|
|
248
248
|
pathParams: [],
|
|
249
249
|
queryParams: [],
|
|
250
250
|
requestSchema: "ModusContextRequestDto",
|
|
@@ -254,7 +254,7 @@ var OPERATIONS = {
|
|
|
254
254
|
method: "GET",
|
|
255
255
|
path: "/api/v1/modus/conversations/{threadId}",
|
|
256
256
|
service: "modus-api",
|
|
257
|
-
serverUrl: "https://api.
|
|
257
|
+
serverUrl: "https://api.getmodus.com",
|
|
258
258
|
pathParams: ["threadId"],
|
|
259
259
|
queryParams: [],
|
|
260
260
|
requestSchema: null,
|
|
@@ -264,7 +264,7 @@ var OPERATIONS = {
|
|
|
264
264
|
method: "GET",
|
|
265
265
|
path: "/api/v1/modus/conversations",
|
|
266
266
|
service: "modus-api",
|
|
267
|
-
serverUrl: "https://api.
|
|
267
|
+
serverUrl: "https://api.getmodus.com",
|
|
268
268
|
pathParams: [],
|
|
269
269
|
queryParams: ["pageToken", "page", "pageSize", "userId", "toolName", "timeframe", "includeTools", "kind"],
|
|
270
270
|
requestSchema: null,
|
|
@@ -274,7 +274,7 @@ var OPERATIONS = {
|
|
|
274
274
|
method: "POST",
|
|
275
275
|
path: "/agent/v1/modus/runs",
|
|
276
276
|
service: "agent-service",
|
|
277
|
-
serverUrl: "https://agent.
|
|
277
|
+
serverUrl: "https://agent.getmodus.com",
|
|
278
278
|
pathParams: [],
|
|
279
279
|
queryParams: [],
|
|
280
280
|
requestSchema: "ModusRunDto",
|
|
@@ -284,7 +284,7 @@ var OPERATIONS = {
|
|
|
284
284
|
method: "GET",
|
|
285
285
|
path: "/api/v1/users/org-members",
|
|
286
286
|
service: "modus-api",
|
|
287
|
-
serverUrl: "https://api.
|
|
287
|
+
serverUrl: "https://api.getmodus.com",
|
|
288
288
|
pathParams: [],
|
|
289
289
|
queryParams: ["pageSize", "pageToken"],
|
|
290
290
|
requestSchema: null,
|
|
@@ -294,7 +294,7 @@ var OPERATIONS = {
|
|
|
294
294
|
method: "DELETE",
|
|
295
295
|
path: "/api/v1/users/organization",
|
|
296
296
|
service: "modus-api",
|
|
297
|
-
serverUrl: "https://api.
|
|
297
|
+
serverUrl: "https://api.getmodus.com",
|
|
298
298
|
pathParams: [],
|
|
299
299
|
queryParams: [],
|
|
300
300
|
requestSchema: null,
|
|
@@ -304,7 +304,7 @@ var OPERATIONS = {
|
|
|
304
304
|
method: "POST",
|
|
305
305
|
path: "/agent/v1/runs/{runId}/resume",
|
|
306
306
|
service: "agent-service",
|
|
307
|
-
serverUrl: "https://agent.
|
|
307
|
+
serverUrl: "https://agent.getmodus.com",
|
|
308
308
|
pathParams: ["runId"],
|
|
309
309
|
queryParams: [],
|
|
310
310
|
requestSchema: "ResumeRunDto",
|
|
@@ -314,7 +314,7 @@ var OPERATIONS = {
|
|
|
314
314
|
method: "GET",
|
|
315
315
|
path: "/agent/v1/runs/active",
|
|
316
316
|
service: "agent-service",
|
|
317
|
-
serverUrl: "https://agent.
|
|
317
|
+
serverUrl: "https://agent.getmodus.com",
|
|
318
318
|
pathParams: [],
|
|
319
319
|
queryParams: ["pageToken", "pageSize"],
|
|
320
320
|
requestSchema: null,
|
|
@@ -324,7 +324,7 @@ var OPERATIONS = {
|
|
|
324
324
|
method: "POST",
|
|
325
325
|
path: "/agent/v1/runs/active-by-session",
|
|
326
326
|
service: "agent-service",
|
|
327
|
-
serverUrl: "https://agent.
|
|
327
|
+
serverUrl: "https://agent.getmodus.com",
|
|
328
328
|
pathParams: [],
|
|
329
329
|
queryParams: [],
|
|
330
330
|
requestSchema: "ActiveRunsBySessionDto",
|
|
@@ -334,7 +334,7 @@ var OPERATIONS = {
|
|
|
334
334
|
method: "POST",
|
|
335
335
|
path: "/agent/v1/runs/{runId}/cancel",
|
|
336
336
|
service: "agent-service",
|
|
337
|
-
serverUrl: "https://agent.
|
|
337
|
+
serverUrl: "https://agent.getmodus.com",
|
|
338
338
|
pathParams: ["runId"],
|
|
339
339
|
queryParams: [],
|
|
340
340
|
requestSchema: "CancelRunDto",
|
|
@@ -344,7 +344,7 @@ var OPERATIONS = {
|
|
|
344
344
|
method: "POST",
|
|
345
345
|
path: "/agent/v1/runs/{runId}/queue-edit",
|
|
346
346
|
service: "agent-service",
|
|
347
|
-
serverUrl: "https://agent.
|
|
347
|
+
serverUrl: "https://agent.getmodus.com",
|
|
348
348
|
pathParams: ["runId"],
|
|
349
349
|
queryParams: [],
|
|
350
350
|
requestSchema: "EditQueuedRunDto",
|
|
@@ -354,7 +354,7 @@ var OPERATIONS = {
|
|
|
354
354
|
method: "GET",
|
|
355
355
|
path: "/agent/v1/runs/{runId}/events",
|
|
356
356
|
service: "agent-service",
|
|
357
|
-
serverUrl: "https://agent.
|
|
357
|
+
serverUrl: "https://agent.getmodus.com",
|
|
358
358
|
pathParams: ["runId"],
|
|
359
359
|
queryParams: [],
|
|
360
360
|
requestSchema: null,
|
|
@@ -364,7 +364,7 @@ var OPERATIONS = {
|
|
|
364
364
|
method: "POST",
|
|
365
365
|
path: "/agent/v1/runs/{runId}/interrupt",
|
|
366
366
|
service: "agent-service",
|
|
367
|
-
serverUrl: "https://agent.
|
|
367
|
+
serverUrl: "https://agent.getmodus.com",
|
|
368
368
|
pathParams: ["runId"],
|
|
369
369
|
queryParams: [],
|
|
370
370
|
requestSchema: "InterruptRunDto",
|
|
@@ -374,7 +374,7 @@ var OPERATIONS = {
|
|
|
374
374
|
method: "GET",
|
|
375
375
|
path: "/agent/v1/runs/{runId}/stream",
|
|
376
376
|
service: "agent-service",
|
|
377
|
-
serverUrl: "https://agent.
|
|
377
|
+
serverUrl: "https://agent.getmodus.com",
|
|
378
378
|
pathParams: ["runId"],
|
|
379
379
|
queryParams: [],
|
|
380
380
|
requestSchema: null,
|
|
@@ -384,7 +384,7 @@ var OPERATIONS = {
|
|
|
384
384
|
method: "POST",
|
|
385
385
|
path: "/api/v1/scopes/{id}/chat",
|
|
386
386
|
service: "modus-api",
|
|
387
|
-
serverUrl: "https://api.
|
|
387
|
+
serverUrl: "https://api.getmodus.com",
|
|
388
388
|
pathParams: ["id"],
|
|
389
389
|
queryParams: [],
|
|
390
390
|
requestSchema: "SkillChatRequestDto",
|
|
@@ -394,7 +394,7 @@ var OPERATIONS = {
|
|
|
394
394
|
method: "POST",
|
|
395
395
|
path: "/api/v1/scopes/{id}/conversations/{threadId}/chat",
|
|
396
396
|
service: "modus-api",
|
|
397
|
-
serverUrl: "https://api.
|
|
397
|
+
serverUrl: "https://api.getmodus.com",
|
|
398
398
|
pathParams: ["id", "threadId"],
|
|
399
399
|
queryParams: [],
|
|
400
400
|
requestSchema: "SkillChatRequestDto",
|
|
@@ -404,7 +404,7 @@ var OPERATIONS = {
|
|
|
404
404
|
method: "POST",
|
|
405
405
|
path: "/api/v1/scopes/{id}/context",
|
|
406
406
|
service: "modus-api",
|
|
407
|
-
serverUrl: "https://api.
|
|
407
|
+
serverUrl: "https://api.getmodus.com",
|
|
408
408
|
pathParams: ["id"],
|
|
409
409
|
queryParams: [],
|
|
410
410
|
requestSchema: "ComposeSkillContextRequestDto",
|
|
@@ -414,7 +414,7 @@ var OPERATIONS = {
|
|
|
414
414
|
method: "GET",
|
|
415
415
|
path: "/api/v1/scopes/{id}/conversations/{threadId}",
|
|
416
416
|
service: "modus-api",
|
|
417
|
-
serverUrl: "https://api.
|
|
417
|
+
serverUrl: "https://api.getmodus.com",
|
|
418
418
|
pathParams: ["id", "threadId"],
|
|
419
419
|
queryParams: ["messageLimit", "beforeMessageIndex"],
|
|
420
420
|
requestSchema: null,
|
|
@@ -424,7 +424,7 @@ var OPERATIONS = {
|
|
|
424
424
|
method: "GET",
|
|
425
425
|
path: "/api/v1/scopes/{id}/conversations",
|
|
426
426
|
service: "modus-api",
|
|
427
|
-
serverUrl: "https://api.
|
|
427
|
+
serverUrl: "https://api.getmodus.com",
|
|
428
428
|
pathParams: ["id"],
|
|
429
429
|
queryParams: ["pageToken", "page", "pageSize", "userId", "toolName", "timeframe", "includeTools"],
|
|
430
430
|
requestSchema: null,
|
|
@@ -434,7 +434,7 @@ var OPERATIONS = {
|
|
|
434
434
|
method: "DELETE",
|
|
435
435
|
path: "/api/v1/scopes/{id}/memories/{memoryId}",
|
|
436
436
|
service: "modus-api",
|
|
437
|
-
serverUrl: "https://api.
|
|
437
|
+
serverUrl: "https://api.getmodus.com",
|
|
438
438
|
pathParams: ["id", "memoryId"],
|
|
439
439
|
queryParams: [],
|
|
440
440
|
requestSchema: null,
|
|
@@ -444,7 +444,7 @@ var OPERATIONS = {
|
|
|
444
444
|
method: "GET",
|
|
445
445
|
path: "/api/v1/scopes/{id}/memories",
|
|
446
446
|
service: "modus-api",
|
|
447
|
-
serverUrl: "https://api.
|
|
447
|
+
serverUrl: "https://api.getmodus.com",
|
|
448
448
|
pathParams: ["id"],
|
|
449
449
|
queryParams: ["pageToken", "pageSize", "userId", "limit"],
|
|
450
450
|
requestSchema: null,
|
|
@@ -454,7 +454,7 @@ var OPERATIONS = {
|
|
|
454
454
|
method: "POST",
|
|
455
455
|
path: "/api/v1/scopes/{id}/memories/search",
|
|
456
456
|
service: "modus-api",
|
|
457
|
-
serverUrl: "https://api.
|
|
457
|
+
serverUrl: "https://api.getmodus.com",
|
|
458
458
|
pathParams: ["id"],
|
|
459
459
|
queryParams: [],
|
|
460
460
|
requestSchema: "SearchMemoriesRequestDto",
|
|
@@ -464,7 +464,7 @@ var OPERATIONS = {
|
|
|
464
464
|
method: "PATCH",
|
|
465
465
|
path: "/api/v1/scopes/{id}/memories/{memoryId}",
|
|
466
466
|
service: "modus-api",
|
|
467
|
-
serverUrl: "https://api.
|
|
467
|
+
serverUrl: "https://api.getmodus.com",
|
|
468
468
|
pathParams: ["id", "memoryId"],
|
|
469
469
|
queryParams: ["updateMask"],
|
|
470
470
|
requestSchema: "UpdateMemoryRequestDto",
|
|
@@ -474,7 +474,7 @@ var OPERATIONS = {
|
|
|
474
474
|
method: "POST",
|
|
475
475
|
path: "/agent/v1/scopes/{id}/runs",
|
|
476
476
|
service: "agent-service",
|
|
477
|
-
serverUrl: "https://agent.
|
|
477
|
+
serverUrl: "https://agent.getmodus.com",
|
|
478
478
|
pathParams: ["id"],
|
|
479
479
|
queryParams: [],
|
|
480
480
|
requestSchema: "SkillRunDto",
|
|
@@ -484,7 +484,7 @@ var OPERATIONS = {
|
|
|
484
484
|
method: "GET",
|
|
485
485
|
path: "/api/v1/scopes/{id}/supervision",
|
|
486
486
|
service: "modus-api",
|
|
487
|
-
serverUrl: "https://api.
|
|
487
|
+
serverUrl: "https://api.getmodus.com",
|
|
488
488
|
pathParams: ["id"],
|
|
489
489
|
queryParams: ["view"],
|
|
490
490
|
requestSchema: null,
|
|
@@ -494,7 +494,7 @@ var OPERATIONS = {
|
|
|
494
494
|
method: "PUT",
|
|
495
495
|
path: "/api/v1/scopes/{id}/supervision",
|
|
496
496
|
service: "modus-api",
|
|
497
|
-
serverUrl: "https://api.
|
|
497
|
+
serverUrl: "https://api.getmodus.com",
|
|
498
498
|
pathParams: ["id"],
|
|
499
499
|
queryParams: [],
|
|
500
500
|
requestSchema: "SetSupervisionRequestDto",
|
|
@@ -504,7 +504,7 @@ var OPERATIONS = {
|
|
|
504
504
|
method: "PUT",
|
|
505
505
|
path: "/api/v1/scopes/{id}/supervision/active",
|
|
506
506
|
service: "modus-api",
|
|
507
|
-
serverUrl: "https://api.
|
|
507
|
+
serverUrl: "https://api.getmodus.com",
|
|
508
508
|
pathParams: ["id"],
|
|
509
509
|
queryParams: [],
|
|
510
510
|
requestSchema: "SetSupervisionRequestDto",
|
|
@@ -514,7 +514,7 @@ var OPERATIONS = {
|
|
|
514
514
|
method: "POST",
|
|
515
515
|
path: "/api/v1/scopes/{id}/transfer-ownership/accept",
|
|
516
516
|
service: "modus-api",
|
|
517
|
-
serverUrl: "https://api.
|
|
517
|
+
serverUrl: "https://api.getmodus.com",
|
|
518
518
|
pathParams: ["id"],
|
|
519
519
|
queryParams: [],
|
|
520
520
|
requestSchema: null,
|
|
@@ -524,7 +524,7 @@ var OPERATIONS = {
|
|
|
524
524
|
method: "DELETE",
|
|
525
525
|
path: "/api/v1/scopes/{id}/transfer-ownership",
|
|
526
526
|
service: "modus-api",
|
|
527
|
-
serverUrl: "https://api.
|
|
527
|
+
serverUrl: "https://api.getmodus.com",
|
|
528
528
|
pathParams: ["id"],
|
|
529
529
|
queryParams: [],
|
|
530
530
|
requestSchema: null,
|
|
@@ -534,7 +534,7 @@ var OPERATIONS = {
|
|
|
534
534
|
method: "POST",
|
|
535
535
|
path: "/api/v1/scopes",
|
|
536
536
|
service: "modus-api",
|
|
537
|
-
serverUrl: "https://api.
|
|
537
|
+
serverUrl: "https://api.getmodus.com",
|
|
538
538
|
pathParams: [],
|
|
539
539
|
queryParams: [],
|
|
540
540
|
requestSchema: "CreateSkillDto",
|
|
@@ -544,7 +544,7 @@ var OPERATIONS = {
|
|
|
544
544
|
method: "DELETE",
|
|
545
545
|
path: "/api/v1/scopes/{id}",
|
|
546
546
|
service: "modus-api",
|
|
547
|
-
serverUrl: "https://api.
|
|
547
|
+
serverUrl: "https://api.getmodus.com",
|
|
548
548
|
pathParams: ["id"],
|
|
549
549
|
queryParams: [],
|
|
550
550
|
requestSchema: null,
|
|
@@ -554,7 +554,7 @@ var OPERATIONS = {
|
|
|
554
554
|
method: "POST",
|
|
555
555
|
path: "/api/v1/scopes/{id}/deploy",
|
|
556
556
|
service: "modus-api",
|
|
557
|
-
serverUrl: "https://api.
|
|
557
|
+
serverUrl: "https://api.getmodus.com",
|
|
558
558
|
pathParams: ["id"],
|
|
559
559
|
queryParams: [],
|
|
560
560
|
requestSchema: "DeploySkillDto",
|
|
@@ -564,7 +564,7 @@ var OPERATIONS = {
|
|
|
564
564
|
method: "GET",
|
|
565
565
|
path: "/api/v1/scopes/{id}",
|
|
566
566
|
service: "modus-api",
|
|
567
|
-
serverUrl: "https://api.
|
|
567
|
+
serverUrl: "https://api.getmodus.com",
|
|
568
568
|
pathParams: ["id"],
|
|
569
569
|
queryParams: ["view"],
|
|
570
570
|
requestSchema: null,
|
|
@@ -574,7 +574,7 @@ var OPERATIONS = {
|
|
|
574
574
|
method: "GET",
|
|
575
575
|
path: "/api/v1/scopes/{id}/variations/{variationUid}",
|
|
576
576
|
service: "modus-api",
|
|
577
|
-
serverUrl: "https://api.
|
|
577
|
+
serverUrl: "https://api.getmodus.com",
|
|
578
578
|
pathParams: ["id", "variationUid"],
|
|
579
579
|
queryParams: [],
|
|
580
580
|
requestSchema: null,
|
|
@@ -584,7 +584,7 @@ var OPERATIONS = {
|
|
|
584
584
|
method: "GET",
|
|
585
585
|
path: "/api/v1/scopes",
|
|
586
586
|
service: "modus-api",
|
|
587
|
-
serverUrl: "https://api.
|
|
587
|
+
serverUrl: "https://api.getmodus.com",
|
|
588
588
|
pathParams: [],
|
|
589
589
|
queryParams: ["pageToken", "pageSize", "view", "search", "managerId", "includeVariation"],
|
|
590
590
|
requestSchema: null,
|
|
@@ -594,7 +594,7 @@ var OPERATIONS = {
|
|
|
594
594
|
method: "PATCH",
|
|
595
595
|
path: "/api/v1/scopes/{id}/mcp-config",
|
|
596
596
|
service: "modus-api",
|
|
597
|
-
serverUrl: "https://api.
|
|
597
|
+
serverUrl: "https://api.getmodus.com",
|
|
598
598
|
pathParams: ["id"],
|
|
599
599
|
queryParams: [],
|
|
600
600
|
requestSchema: "PatchSkillMcpConfigDto",
|
|
@@ -604,7 +604,7 @@ var OPERATIONS = {
|
|
|
604
604
|
method: "POST",
|
|
605
605
|
path: "/api/v1/scopes/{id}/transfer-ownership",
|
|
606
606
|
service: "modus-api",
|
|
607
|
-
serverUrl: "https://api.
|
|
607
|
+
serverUrl: "https://api.getmodus.com",
|
|
608
608
|
pathParams: ["id"],
|
|
609
609
|
queryParams: [],
|
|
610
610
|
requestSchema: "TransferOwnershipDto",
|
|
@@ -614,7 +614,7 @@ var OPERATIONS = {
|
|
|
614
614
|
method: "POST",
|
|
615
615
|
path: "/api/v1/scopes/{id}/restore",
|
|
616
616
|
service: "modus-api",
|
|
617
|
-
serverUrl: "https://api.
|
|
617
|
+
serverUrl: "https://api.getmodus.com",
|
|
618
618
|
pathParams: ["id"],
|
|
619
619
|
queryParams: [],
|
|
620
620
|
requestSchema: null,
|
|
@@ -624,7 +624,7 @@ var OPERATIONS = {
|
|
|
624
624
|
method: "PATCH",
|
|
625
625
|
path: "/api/v1/scopes/{id}",
|
|
626
626
|
service: "modus-api",
|
|
627
|
-
serverUrl: "https://api.
|
|
627
|
+
serverUrl: "https://api.getmodus.com",
|
|
628
628
|
pathParams: ["id"],
|
|
629
629
|
queryParams: ["updateMask"],
|
|
630
630
|
requestSchema: "UpdateSkillDto",
|
|
@@ -634,7 +634,7 @@ var OPERATIONS = {
|
|
|
634
634
|
method: "GET",
|
|
635
635
|
path: "/api/v1/suggestions/questions",
|
|
636
636
|
service: "modus-api",
|
|
637
|
-
serverUrl: "https://api.
|
|
637
|
+
serverUrl: "https://api.getmodus.com",
|
|
638
638
|
pathParams: [],
|
|
639
639
|
queryParams: ["pageToken", "pageSize", "skill_id", "skill_ids"],
|
|
640
640
|
requestSchema: null,
|
|
@@ -644,7 +644,7 @@ var OPERATIONS = {
|
|
|
644
644
|
method: "POST",
|
|
645
645
|
path: "/api/v1/suggestions/questions/{id}/events",
|
|
646
646
|
service: "modus-api",
|
|
647
|
-
serverUrl: "https://api.
|
|
647
|
+
serverUrl: "https://api.getmodus.com",
|
|
648
648
|
pathParams: ["id"],
|
|
649
649
|
queryParams: [],
|
|
650
650
|
requestSchema: "RecordSuggestionEventDto",
|
|
@@ -654,7 +654,7 @@ var OPERATIONS = {
|
|
|
654
654
|
method: "GET",
|
|
655
655
|
path: "/api/v1/usage",
|
|
656
656
|
service: "modus-api",
|
|
657
|
-
serverUrl: "https://api.
|
|
657
|
+
serverUrl: "https://api.getmodus.com",
|
|
658
658
|
pathParams: [],
|
|
659
659
|
queryParams: ["since", "until", "rollup", "model", "group_by", "skill_id", "agent_id", "user_id", "interface"],
|
|
660
660
|
requestSchema: null,
|
|
@@ -664,7 +664,7 @@ var OPERATIONS = {
|
|
|
664
664
|
method: "POST",
|
|
665
665
|
path: "/agent/v1/workflow-actions/{runId}/cancel",
|
|
666
666
|
service: "agent-service",
|
|
667
|
-
serverUrl: "https://agent.
|
|
667
|
+
serverUrl: "https://agent.getmodus.com",
|
|
668
668
|
pathParams: ["runId"],
|
|
669
669
|
queryParams: [],
|
|
670
670
|
requestSchema: "CancelRunDto",
|
|
@@ -674,7 +674,7 @@ var OPERATIONS = {
|
|
|
674
674
|
method: "POST",
|
|
675
675
|
path: "/agent/v1/workflow-actions",
|
|
676
676
|
service: "agent-service",
|
|
677
|
-
serverUrl: "https://agent.
|
|
677
|
+
serverUrl: "https://agent.getmodus.com",
|
|
678
678
|
pathParams: [],
|
|
679
679
|
queryParams: [],
|
|
680
680
|
requestSchema: "WorkflowActionDto",
|
|
@@ -684,7 +684,7 @@ var OPERATIONS = {
|
|
|
684
684
|
method: "POST",
|
|
685
685
|
path: "/api/v1/workflows/{id}/interfaces",
|
|
686
686
|
service: "modus-api",
|
|
687
|
-
serverUrl: "https://api.
|
|
687
|
+
serverUrl: "https://api.getmodus.com",
|
|
688
688
|
pathParams: ["id"],
|
|
689
689
|
queryParams: [],
|
|
690
690
|
requestSchema: "AddAgentInterfaceDto",
|
|
@@ -694,7 +694,7 @@ var OPERATIONS = {
|
|
|
694
694
|
method: "DELETE",
|
|
695
695
|
path: "/api/v1/workflows/{id}/interfaces/{interfaceId}",
|
|
696
696
|
service: "modus-api",
|
|
697
|
-
serverUrl: "https://api.
|
|
697
|
+
serverUrl: "https://api.getmodus.com",
|
|
698
698
|
pathParams: ["id", "interfaceId"],
|
|
699
699
|
queryParams: [],
|
|
700
700
|
requestSchema: null,
|
|
@@ -704,7 +704,7 @@ var OPERATIONS = {
|
|
|
704
704
|
method: "DELETE",
|
|
705
705
|
path: "/api/v1/workflows/{id}/interfaces",
|
|
706
706
|
service: "modus-api",
|
|
707
|
-
serverUrl: "https://api.
|
|
707
|
+
serverUrl: "https://api.getmodus.com",
|
|
708
708
|
pathParams: ["id"],
|
|
709
709
|
queryParams: [],
|
|
710
710
|
requestSchema: null,
|
|
@@ -714,7 +714,7 @@ var OPERATIONS = {
|
|
|
714
714
|
method: "GET",
|
|
715
715
|
path: "/api/v1/workflows/{id}/interfaces",
|
|
716
716
|
service: "modus-api",
|
|
717
|
-
serverUrl: "https://api.
|
|
717
|
+
serverUrl: "https://api.getmodus.com",
|
|
718
718
|
pathParams: ["id"],
|
|
719
719
|
queryParams: ["pageSize", "pageToken"],
|
|
720
720
|
requestSchema: null,
|
|
@@ -724,7 +724,7 @@ var OPERATIONS = {
|
|
|
724
724
|
method: "PATCH",
|
|
725
725
|
path: "/api/v1/workflows/{id}/interfaces/{interfaceId}",
|
|
726
726
|
service: "modus-api",
|
|
727
|
-
serverUrl: "https://api.
|
|
727
|
+
serverUrl: "https://api.getmodus.com",
|
|
728
728
|
pathParams: ["id", "interfaceId"],
|
|
729
729
|
queryParams: ["updateMask"],
|
|
730
730
|
requestSchema: "UpdateAgentInterfaceDto",
|
|
@@ -734,7 +734,7 @@ var OPERATIONS = {
|
|
|
734
734
|
method: "POST",
|
|
735
735
|
path: "/agent/v1/workflows/{id}/runs",
|
|
736
736
|
service: "agent-service",
|
|
737
|
-
serverUrl: "https://agent.
|
|
737
|
+
serverUrl: "https://agent.getmodus.com",
|
|
738
738
|
pathParams: ["id"],
|
|
739
739
|
queryParams: [],
|
|
740
740
|
requestSchema: "AgentRunDto",
|
|
@@ -744,7 +744,7 @@ var OPERATIONS = {
|
|
|
744
744
|
method: "GET",
|
|
745
745
|
path: "/api/v1/workflows/{id}/runs/{runId}",
|
|
746
746
|
service: "modus-api",
|
|
747
|
-
serverUrl: "https://api.
|
|
747
|
+
serverUrl: "https://api.getmodus.com",
|
|
748
748
|
pathParams: ["id", "runId"],
|
|
749
749
|
queryParams: ["temporalRunId"],
|
|
750
750
|
requestSchema: null,
|
|
@@ -754,7 +754,7 @@ var OPERATIONS = {
|
|
|
754
754
|
method: "GET",
|
|
755
755
|
path: "/api/v1/workflows/{id}/runs",
|
|
756
756
|
service: "modus-api",
|
|
757
|
-
serverUrl: "https://api.
|
|
757
|
+
serverUrl: "https://api.getmodus.com",
|
|
758
758
|
pathParams: ["id"],
|
|
759
759
|
queryParams: ["status", "timeframe", "approvalScope", "search", "pageSize", "pageToken"],
|
|
760
760
|
requestSchema: null,
|
|
@@ -764,7 +764,7 @@ var OPERATIONS = {
|
|
|
764
764
|
method: "POST",
|
|
765
765
|
path: "/api/v1/workflows/{id}/transfer-ownership/accept",
|
|
766
766
|
service: "modus-api",
|
|
767
|
-
serverUrl: "https://api.
|
|
767
|
+
serverUrl: "https://api.getmodus.com",
|
|
768
768
|
pathParams: ["id"],
|
|
769
769
|
queryParams: [],
|
|
770
770
|
requestSchema: null,
|
|
@@ -774,7 +774,7 @@ var OPERATIONS = {
|
|
|
774
774
|
method: "DELETE",
|
|
775
775
|
path: "/api/v1/workflows/{id}/transfer-ownership",
|
|
776
776
|
service: "modus-api",
|
|
777
|
-
serverUrl: "https://api.
|
|
777
|
+
serverUrl: "https://api.getmodus.com",
|
|
778
778
|
pathParams: ["id"],
|
|
779
779
|
queryParams: [],
|
|
780
780
|
requestSchema: null,
|
|
@@ -784,7 +784,7 @@ var OPERATIONS = {
|
|
|
784
784
|
method: "POST",
|
|
785
785
|
path: "/api/v1/workflows",
|
|
786
786
|
service: "modus-api",
|
|
787
|
-
serverUrl: "https://api.
|
|
787
|
+
serverUrl: "https://api.getmodus.com",
|
|
788
788
|
pathParams: [],
|
|
789
789
|
queryParams: [],
|
|
790
790
|
requestSchema: "CreateAgentDto",
|
|
@@ -794,7 +794,7 @@ var OPERATIONS = {
|
|
|
794
794
|
method: "DELETE",
|
|
795
795
|
path: "/api/v1/workflows/{id}",
|
|
796
796
|
service: "modus-api",
|
|
797
|
-
serverUrl: "https://api.
|
|
797
|
+
serverUrl: "https://api.getmodus.com",
|
|
798
798
|
pathParams: ["id"],
|
|
799
799
|
queryParams: [],
|
|
800
800
|
requestSchema: null,
|
|
@@ -804,7 +804,7 @@ var OPERATIONS = {
|
|
|
804
804
|
method: "POST",
|
|
805
805
|
path: "/api/v1/workflows/{id}/deploy",
|
|
806
806
|
service: "modus-api",
|
|
807
|
-
serverUrl: "https://api.
|
|
807
|
+
serverUrl: "https://api.getmodus.com",
|
|
808
808
|
pathParams: ["id"],
|
|
809
809
|
queryParams: [],
|
|
810
810
|
requestSchema: "DeployAgentDto",
|
|
@@ -814,7 +814,7 @@ var OPERATIONS = {
|
|
|
814
814
|
method: "GET",
|
|
815
815
|
path: "/api/v1/workflows/{id}",
|
|
816
816
|
service: "modus-api",
|
|
817
|
-
serverUrl: "https://api.
|
|
817
|
+
serverUrl: "https://api.getmodus.com",
|
|
818
818
|
pathParams: ["id"],
|
|
819
819
|
queryParams: ["view"],
|
|
820
820
|
requestSchema: null,
|
|
@@ -824,7 +824,7 @@ var OPERATIONS = {
|
|
|
824
824
|
method: "GET",
|
|
825
825
|
path: "/api/v1/workflows",
|
|
826
826
|
service: "modus-api",
|
|
827
|
-
serverUrl: "https://api.
|
|
827
|
+
serverUrl: "https://api.getmodus.com",
|
|
828
828
|
pathParams: [],
|
|
829
829
|
queryParams: ["pageToken", "pageSize", "view", "type", "search", "includeVariation"],
|
|
830
830
|
requestSchema: null,
|
|
@@ -834,7 +834,7 @@ var OPERATIONS = {
|
|
|
834
834
|
method: "POST",
|
|
835
835
|
path: "/api/v1/workflows/{id}/transfer-ownership",
|
|
836
836
|
service: "modus-api",
|
|
837
|
-
serverUrl: "https://api.
|
|
837
|
+
serverUrl: "https://api.getmodus.com",
|
|
838
838
|
pathParams: ["id"],
|
|
839
839
|
queryParams: [],
|
|
840
840
|
requestSchema: "TransferOwnershipDto",
|
|
@@ -844,7 +844,7 @@ var OPERATIONS = {
|
|
|
844
844
|
method: "POST",
|
|
845
845
|
path: "/api/v1/workflows/{id}/restore",
|
|
846
846
|
service: "modus-api",
|
|
847
|
-
serverUrl: "https://api.
|
|
847
|
+
serverUrl: "https://api.getmodus.com",
|
|
848
848
|
pathParams: ["id"],
|
|
849
849
|
queryParams: [],
|
|
850
850
|
requestSchema: null,
|
|
@@ -854,7 +854,7 @@ var OPERATIONS = {
|
|
|
854
854
|
method: "POST",
|
|
855
855
|
path: "/api/v1/workflows/{id}/toggle",
|
|
856
856
|
service: "modus-api",
|
|
857
|
-
serverUrl: "https://api.
|
|
857
|
+
serverUrl: "https://api.getmodus.com",
|
|
858
858
|
pathParams: ["id"],
|
|
859
859
|
queryParams: [],
|
|
860
860
|
requestSchema: "ToggleAgentDto",
|
|
@@ -864,7 +864,7 @@ var OPERATIONS = {
|
|
|
864
864
|
method: "PATCH",
|
|
865
865
|
path: "/api/v1/workflows/{id}",
|
|
866
866
|
service: "modus-api",
|
|
867
|
-
serverUrl: "https://api.
|
|
867
|
+
serverUrl: "https://api.getmodus.com",
|
|
868
868
|
pathParams: ["id"],
|
|
869
869
|
queryParams: ["updateMask"],
|
|
870
870
|
requestSchema: "UpdateAgentDto",
|
|
@@ -1022,6 +1022,8 @@ function buildAipPage(data, itemsKey, mapItem, fetchPage) {
|
|
|
1022
1022
|
// src/_auth.ts
|
|
1023
1023
|
var ENV_API_KEY = "MODUS_API_KEY";
|
|
1024
1024
|
var ENV_BASE_URL = "MODUS_BASE_URL";
|
|
1025
|
+
var ENV_AGENT_HOST = "MODUS_AGENT_HOST";
|
|
1026
|
+
var ENV_ORGANIZATION_ID = "MODUS_ORGANIZATION_ID";
|
|
1025
1027
|
var ENV_TIMEOUT = "MODUS_TIMEOUT";
|
|
1026
1028
|
var ENV_MAX_RETRIES = "MODUS_MAX_RETRIES";
|
|
1027
1029
|
var KEY_PREFIX = "modus_";
|
|
@@ -1029,12 +1031,12 @@ function resolveApiKey(apiKey) {
|
|
|
1029
1031
|
const key = apiKey ?? process.env[ENV_API_KEY];
|
|
1030
1032
|
if (!key) {
|
|
1031
1033
|
throw new AuthenticationError(
|
|
1032
|
-
`No API key provided. Pass apiKey or set the ${ENV_API_KEY} environment variable. Create a token at app.
|
|
1034
|
+
`No API key provided. Pass apiKey or set the ${ENV_API_KEY} environment variable. Create a token at app.getmodus.com \u2192 Settings \u2192 API Tokens.`
|
|
1033
1035
|
);
|
|
1034
1036
|
}
|
|
1035
1037
|
if (!key.startsWith(KEY_PREFIX)) {
|
|
1036
1038
|
throw new AuthenticationError(
|
|
1037
|
-
`Invalid API key format. Modus API keys start with '${KEY_PREFIX}'. Create a token at app.
|
|
1039
|
+
`Invalid API key format. Modus API keys start with '${KEY_PREFIX}'. Create a token at app.getmodus.com \u2192 Settings \u2192 API Tokens.`
|
|
1038
1040
|
);
|
|
1039
1041
|
}
|
|
1040
1042
|
return key;
|
|
@@ -1042,6 +1044,15 @@ function resolveApiKey(apiKey) {
|
|
|
1042
1044
|
function resolveBaseUrl(baseUrl) {
|
|
1043
1045
|
return baseUrl ?? process.env[ENV_BASE_URL] ?? void 0;
|
|
1044
1046
|
}
|
|
1047
|
+
function resolveAgentHost(agentHost) {
|
|
1048
|
+
return agentHost ?? process.env[ENV_AGENT_HOST] ?? void 0;
|
|
1049
|
+
}
|
|
1050
|
+
function resolveOrganizationId(organizationId) {
|
|
1051
|
+
const raw = organizationId ?? process.env[ENV_ORGANIZATION_ID];
|
|
1052
|
+
if (raw === void 0) return void 0;
|
|
1053
|
+
const stripped = raw.trim();
|
|
1054
|
+
return stripped || void 0;
|
|
1055
|
+
}
|
|
1045
1056
|
function resolveTimeoutMs(explicitMs) {
|
|
1046
1057
|
if (explicitMs !== void 0) return explicitMs;
|
|
1047
1058
|
const raw = process.env[ENV_TIMEOUT];
|
|
@@ -1064,7 +1075,8 @@ function authHeaders(apiKey) {
|
|
|
1064
1075
|
}
|
|
1065
1076
|
|
|
1066
1077
|
// src/_config.ts
|
|
1067
|
-
var DEFAULT_BASE_URL = "https://api.
|
|
1078
|
+
var DEFAULT_BASE_URL = "https://api.getmodus.com";
|
|
1079
|
+
var DEFAULT_AGENT_HOST = "https://agent.getmodus.com";
|
|
1068
1080
|
var DEFAULT_TIMEOUT_MS = 3e5;
|
|
1069
1081
|
var DEFAULT_MAX_RETRIES = 2;
|
|
1070
1082
|
function normalizeBaseUrl(baseUrl) {
|
|
@@ -1084,16 +1096,30 @@ function createModusConfig(options = {}) {
|
|
|
1084
1096
|
throw new Error(`max_retries must be a non-negative int, got ${maxRetries}`);
|
|
1085
1097
|
}
|
|
1086
1098
|
const baseUrl = normalizeBaseUrl(resolveBaseUrl(options.baseUrl) ?? DEFAULT_BASE_URL);
|
|
1099
|
+
const baseUrlOverrides = normalizeBaseUrls(options.baseUrls);
|
|
1100
|
+
const agentHost = normalizeBaseUrl(
|
|
1101
|
+
baseUrlOverrides["agent-service"] ?? resolveAgentHost(options.agentHost) ?? DEFAULT_AGENT_HOST
|
|
1102
|
+
);
|
|
1103
|
+
const organizationId = resolveOrganizationId(options.organizationId);
|
|
1087
1104
|
return Object.freeze({
|
|
1088
1105
|
apiKey: resolveApiKey(options.apiKey),
|
|
1089
1106
|
baseUrl,
|
|
1090
|
-
|
|
1107
|
+
agentHost,
|
|
1108
|
+
...organizationId !== void 0 ? { organizationId } : {},
|
|
1109
|
+
baseUrls: Object.freeze({
|
|
1110
|
+
"modus-api": baseUrl,
|
|
1111
|
+
"agent-service": agentHost,
|
|
1112
|
+
...baseUrlOverrides
|
|
1113
|
+
}),
|
|
1091
1114
|
timeoutMs: resolveTimeoutMs(options.timeoutMs) ?? DEFAULT_TIMEOUT_MS,
|
|
1092
1115
|
maxRetries,
|
|
1093
1116
|
fetch: options.fetch ?? globalThis.fetch.bind(globalThis)
|
|
1094
1117
|
});
|
|
1095
1118
|
}
|
|
1096
1119
|
function resolveServiceBaseUrl(config, service, generatedBaseUrl) {
|
|
1120
|
+
if (service === "agent-service") {
|
|
1121
|
+
return config.baseUrls["agent-service"] ?? config.agentHost ?? generatedBaseUrl ?? config.baseUrl;
|
|
1122
|
+
}
|
|
1097
1123
|
return config.baseUrls[service] ?? generatedBaseUrl ?? config.baseUrl;
|
|
1098
1124
|
}
|
|
1099
1125
|
function formatConfigForLog(config) {
|
|
@@ -1102,7 +1128,7 @@ function formatConfigForLog(config) {
|
|
|
1102
1128
|
}
|
|
1103
1129
|
|
|
1104
1130
|
// src/_http.ts
|
|
1105
|
-
var USER_AGENT = `modus-typescript/${"0.2.
|
|
1131
|
+
var USER_AGENT = `modus-typescript/${"0.2.2"} (node/${process.version}; ${process.platform})`;
|
|
1106
1132
|
function buildUrl(baseUrl, path, params) {
|
|
1107
1133
|
const url = new URL(path.startsWith("/") ? path : `/${path}`, baseUrl);
|
|
1108
1134
|
if (params) {
|
|
@@ -1237,6 +1263,9 @@ var HttpClient = class {
|
|
|
1237
1263
|
post(path, json, options = {}) {
|
|
1238
1264
|
return this.request("POST", path, { json, ...options });
|
|
1239
1265
|
}
|
|
1266
|
+
put(path, json, options = {}) {
|
|
1267
|
+
return this.request("PUT", path, { json, ...options });
|
|
1268
|
+
}
|
|
1240
1269
|
patch(path, json, params, options = {}) {
|
|
1241
1270
|
return this.request("PATCH", path, { json, params, ...options });
|
|
1242
1271
|
}
|
|
@@ -1452,6 +1481,8 @@ async function invokeOperation(http, operationId, options = {}) {
|
|
|
1452
1481
|
return http.get(path, params, requestOptions);
|
|
1453
1482
|
case "POST":
|
|
1454
1483
|
return http.post(path, options.jsonBody, requestOptions);
|
|
1484
|
+
case "PUT":
|
|
1485
|
+
return http.put(path, options.jsonBody, requestOptions);
|
|
1455
1486
|
case "PATCH":
|
|
1456
1487
|
return http.patch(path, options.jsonBody, params, requestOptions);
|
|
1457
1488
|
case "DELETE":
|
|
@@ -1678,4 +1709,4 @@ export {
|
|
|
1678
1709
|
CustomContextItemsResource,
|
|
1679
1710
|
ScopeConversationsResource
|
|
1680
1711
|
};
|
|
1681
|
-
//# sourceMappingURL=chunk-
|
|
1712
|
+
//# sourceMappingURL=chunk-OUFN2O5C.js.map
|