@pellux/goodvibes-daemon-sdk 0.18.3 → 0.30.1
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/README.md +13 -7
- package/dist/api-router.d.ts +8 -1
- package/dist/api-router.d.ts.map +1 -1
- package/dist/api-router.js +12 -3
- package/dist/artifact-upload.d.ts +26 -0
- package/dist/artifact-upload.d.ts.map +1 -0
- package/dist/artifact-upload.js +535 -0
- package/dist/automation.d.ts +2 -2
- package/dist/automation.d.ts.map +1 -1
- package/dist/channel-route-types.d.ts.map +1 -1
- package/dist/channel-routes.d.ts +2 -2
- package/dist/channel-routes.d.ts.map +1 -1
- package/dist/channel-routes.js +28 -3
- package/dist/context.d.ts +151 -51
- package/dist/context.d.ts.map +1 -1
- package/dist/control-routes.d.ts +2 -2
- package/dist/control-routes.d.ts.map +1 -1
- package/dist/error-response.d.ts.map +1 -1
- package/dist/error-response.js +172 -12
- package/dist/http-policy.d.ts +1 -1
- package/dist/http-policy.d.ts.map +1 -1
- package/dist/http-policy.js +0 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/integration-route-types.d.ts +3 -1
- package/dist/integration-route-types.d.ts.map +1 -1
- package/dist/integration-routes.d.ts +2 -2
- package/dist/integration-routes.d.ts.map +1 -1
- package/dist/integration-routes.js +3 -0
- package/dist/knowledge-refinement-routes.d.ts +4 -0
- package/dist/knowledge-refinement-routes.d.ts.map +1 -0
- package/dist/knowledge-refinement-routes.js +58 -0
- package/dist/knowledge-route-types.d.ts +11 -1
- package/dist/knowledge-route-types.d.ts.map +1 -1
- package/dist/knowledge-routes.d.ts +2 -2
- package/dist/knowledge-routes.d.ts.map +1 -1
- package/dist/knowledge-routes.js +156 -13
- package/dist/media-route-types.d.ts +10 -0
- package/dist/media-route-types.d.ts.map +1 -1
- package/dist/media-routes.d.ts +2 -2
- package/dist/media-routes.d.ts.map +1 -1
- package/dist/media-routes.js +134 -15
- package/dist/operator.d.ts +2 -2
- package/dist/operator.d.ts.map +1 -1
- package/dist/operator.js +49 -15
- package/dist/otlp-protobuf.d.ts +3 -0
- package/dist/otlp-protobuf.d.ts.map +1 -0
- package/dist/otlp-protobuf.js +977 -0
- package/dist/remote-routes.d.ts +2 -2
- package/dist/remote-routes.d.ts.map +1 -1
- package/dist/remote-routes.js +146 -13
- package/dist/remote.d.ts +2 -2
- package/dist/remote.d.ts.map +1 -1
- package/dist/route-helpers.d.ts +8 -0
- package/dist/route-helpers.d.ts.map +1 -1
- package/dist/route-helpers.js +24 -0
- package/dist/runtime-automation-routes.d.ts +2 -2
- package/dist/runtime-automation-routes.d.ts.map +1 -1
- package/dist/runtime-automation-routes.js +4 -1
- package/dist/runtime-route-types.d.ts +46 -3
- package/dist/runtime-route-types.d.ts.map +1 -1
- package/dist/runtime-routes.d.ts +2 -2
- package/dist/runtime-routes.d.ts.map +1 -1
- package/dist/runtime-routes.js +1 -0
- package/dist/runtime-session-routes.d.ts +13 -3
- package/dist/runtime-session-routes.d.ts.map +1 -1
- package/dist/runtime-session-routes.js +102 -10
- package/dist/sessions.d.ts +2 -2
- package/dist/sessions.d.ts.map +1 -1
- package/dist/sessions.js +3 -0
- package/dist/system-route-types.d.ts +19 -0
- package/dist/system-route-types.d.ts.map +1 -1
- package/dist/system-routes.d.ts +2 -2
- package/dist/system-routes.d.ts.map +1 -1
- package/dist/system-routes.js +18 -0
- package/dist/tasks.d.ts +2 -2
- package/dist/tasks.d.ts.map +1 -1
- package/dist/telemetry-routes.d.ts +25 -2
- package/dist/telemetry-routes.d.ts.map +1 -1
- package/dist/telemetry-routes.js +131 -15
- package/package.json +128 -5
package/dist/operator.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { readBoundedPositiveInteger } from './route-helpers.js';
|
|
1
2
|
export async function dispatchOperatorRoutes(req, handlers) {
|
|
2
3
|
const url = new URL(req.url);
|
|
3
4
|
const { pathname } = url;
|
|
4
5
|
const method = req.method;
|
|
5
6
|
if (pathname === '/status' && method === 'GET')
|
|
6
7
|
return handlers.getStatus();
|
|
7
|
-
if (
|
|
8
|
+
if (pathname === '/api/control-plane/auth' && method === 'GET')
|
|
8
9
|
return handlers.getCurrentAuth(req);
|
|
9
10
|
if (pathname === '/api/control-plane' && method === 'GET')
|
|
10
11
|
return handlers.getControlPlaneSnapshot();
|
|
@@ -13,31 +14,37 @@ export async function dispatchOperatorRoutes(req, handlers) {
|
|
|
13
14
|
if (pathname === '/api/control-plane/web' && method === 'GET')
|
|
14
15
|
return handlers.getControlPlaneWeb();
|
|
15
16
|
if (pathname === '/api/control-plane/recent-events' && method === 'GET') {
|
|
16
|
-
const limit =
|
|
17
|
+
const limit = readBoundedPositiveInteger(url.searchParams.get('limit'), 100);
|
|
17
18
|
return handlers.getControlPlaneRecentEvents(limit);
|
|
18
19
|
}
|
|
19
20
|
if (pathname === '/api/control-plane/messages' && method === 'GET')
|
|
20
21
|
return handlers.getControlPlaneMessages();
|
|
21
22
|
if (pathname === '/api/control-plane/clients' && method === 'GET')
|
|
22
23
|
return handlers.getControlPlaneClients();
|
|
23
|
-
if (
|
|
24
|
+
if (pathname === '/api/v1/telemetry' && method === 'GET')
|
|
24
25
|
return handlers.getTelemetrySnapshot(req);
|
|
25
|
-
if (
|
|
26
|
+
if (pathname === '/api/v1/telemetry/events' && method === 'GET')
|
|
26
27
|
return handlers.getTelemetryEvents(req);
|
|
27
|
-
if (
|
|
28
|
+
if (pathname === '/api/v1/telemetry/errors' && method === 'GET')
|
|
28
29
|
return handlers.getTelemetryErrors(req);
|
|
29
|
-
if (
|
|
30
|
+
if (pathname === '/api/v1/telemetry/traces' && method === 'GET')
|
|
30
31
|
return handlers.getTelemetryTraces(req);
|
|
31
|
-
if (
|
|
32
|
+
if (pathname === '/api/v1/telemetry/metrics' && method === 'GET')
|
|
32
33
|
return handlers.getTelemetryMetrics(req);
|
|
33
|
-
if (
|
|
34
|
+
if (pathname === '/api/v1/telemetry/stream' && method === 'GET')
|
|
34
35
|
return handlers.createTelemetryEventStream(req);
|
|
35
|
-
if (
|
|
36
|
+
if (pathname === '/api/v1/telemetry/otlp/v1/traces' && method === 'GET')
|
|
36
37
|
return handlers.getTelemetryOtlpTraces(req);
|
|
37
|
-
if (
|
|
38
|
+
if (pathname === '/api/v1/telemetry/otlp/v1/logs' && method === 'GET')
|
|
38
39
|
return handlers.getTelemetryOtlpLogs(req);
|
|
39
|
-
if (
|
|
40
|
+
if (pathname === '/api/v1/telemetry/otlp/v1/metrics' && method === 'GET')
|
|
40
41
|
return handlers.getTelemetryOtlpMetrics(req);
|
|
42
|
+
if (pathname === '/api/v1/telemetry/otlp/v1/logs' && method === 'POST')
|
|
43
|
+
return handlers.postTelemetryOtlpLogs(req);
|
|
44
|
+
if (pathname === '/api/v1/telemetry/otlp/v1/traces' && method === 'POST')
|
|
45
|
+
return handlers.postTelemetryOtlpTraces(req);
|
|
46
|
+
if (pathname === '/api/v1/telemetry/otlp/v1/metrics' && method === 'POST')
|
|
47
|
+
return handlers.postTelemetryOtlpMetrics(req);
|
|
41
48
|
if (pathname === '/api/control-plane/methods' && method === 'GET')
|
|
42
49
|
return handlers.getGatewayMethods(url);
|
|
43
50
|
const gatewayMethodInvokeMatch = pathname.match(/^\/api\/control-plane\/methods\/([^/]+)\/invoke$/);
|
|
@@ -145,8 +152,10 @@ export async function dispatchOperatorRoutes(req, handlers) {
|
|
|
145
152
|
const channelPolicyMatch = pathname.match(/^\/api\/channels\/policies\/([^/]+)$/);
|
|
146
153
|
if (channelPolicyMatch && method === 'POST')
|
|
147
154
|
return handlers.postChannelPolicy(channelPolicyMatch[1], req);
|
|
155
|
+
if (channelPolicyMatch && method === 'PATCH')
|
|
156
|
+
return handlers.patchChannelPolicy(channelPolicyMatch[1], req);
|
|
148
157
|
if (pathname === '/api/channels/policies/audit' && method === 'GET') {
|
|
149
|
-
const limit =
|
|
158
|
+
const limit = readBoundedPositiveInteger(url.searchParams.get('limit'), 100);
|
|
150
159
|
return handlers.getChannelPolicyAudit(limit);
|
|
151
160
|
}
|
|
152
161
|
if (pathname === '/api/channels/status' && method === 'GET')
|
|
@@ -193,9 +202,7 @@ export async function dispatchOperatorRoutes(req, handlers) {
|
|
|
193
202
|
if (approvalActionMatch && method === 'POST') {
|
|
194
203
|
return handlers.approvalAction(approvalActionMatch[1], approvalActionMatch[2], req);
|
|
195
204
|
}
|
|
196
|
-
if (pathname === '/api/remote' && method === 'GET')
|
|
197
|
-
return handlers.getRemote();
|
|
198
|
-
if ((pathname === '/api/remote/node-host/contract' || pathname === '/api/remote/device/contract') && method === 'GET') {
|
|
205
|
+
if (pathname === '/api/remote/node-host/contract' && method === 'GET') {
|
|
199
206
|
return handlers.getRemoteNodeHostContract();
|
|
200
207
|
}
|
|
201
208
|
if (pathname === '/api/health' && method === 'GET')
|
|
@@ -212,6 +219,8 @@ export async function dispatchOperatorRoutes(req, handlers) {
|
|
|
212
219
|
return handlers.getProvider(decodeURIComponent(providerMatch[1]));
|
|
213
220
|
if (pathname === '/api/settings' && method === 'GET')
|
|
214
221
|
return handlers.getSettings();
|
|
222
|
+
if (pathname === '/api/security-settings' && method === 'GET')
|
|
223
|
+
return handlers.getSecuritySettings();
|
|
215
224
|
if (pathname === '/api/continuity' && method === 'GET')
|
|
216
225
|
return handlers.getContinuity();
|
|
217
226
|
if (pathname === '/api/worktrees' && method === 'GET')
|
|
@@ -252,10 +261,16 @@ export async function dispatchOperatorRoutes(req, handlers) {
|
|
|
252
261
|
return handlers.getKnowledgeJobs();
|
|
253
262
|
if (pathname === '/api/knowledge/job-runs' && method === 'GET')
|
|
254
263
|
return handlers.getKnowledgeJobRuns(url);
|
|
264
|
+
if (pathname === '/api/knowledge/refinement/tasks' && method === 'GET')
|
|
265
|
+
return handlers.getKnowledgeRefinementTasks(url);
|
|
266
|
+
if (pathname === '/api/knowledge/refinement/run' && method === 'POST')
|
|
267
|
+
return handlers.postKnowledgeRunRefinement(req);
|
|
255
268
|
if (pathname === '/api/knowledge/schedules' && method === 'GET')
|
|
256
269
|
return handlers.getKnowledgeSchedules(url);
|
|
257
270
|
if (pathname === '/api/knowledge/projections' && method === 'GET')
|
|
258
271
|
return handlers.getKnowledgeProjectionTargets(url);
|
|
272
|
+
if (pathname === '/api/knowledge/map' && method === 'GET')
|
|
273
|
+
return handlers.getKnowledgeMap(url);
|
|
259
274
|
if (pathname === '/api/knowledge/graphql/schema' && method === 'GET')
|
|
260
275
|
return handlers.getKnowledgeGraphqlSchema();
|
|
261
276
|
if (pathname === '/api/knowledge/graphql' && (method === 'GET' || method === 'POST'))
|
|
@@ -264,6 +279,8 @@ export async function dispatchOperatorRoutes(req, handlers) {
|
|
|
264
279
|
return handlers.postKnowledgeIngestUrl(req);
|
|
265
280
|
if (pathname === '/api/knowledge/ingest/artifact' && method === 'POST')
|
|
266
281
|
return handlers.postKnowledgeIngestArtifact(req);
|
|
282
|
+
if (pathname === '/api/knowledge/ingest/browser-history' && method === 'POST')
|
|
283
|
+
return handlers.postKnowledgeSyncBrowserHistory(req);
|
|
267
284
|
if (pathname === '/api/knowledge/ingest/bookmarks' && method === 'POST')
|
|
268
285
|
return handlers.postKnowledgeImportBookmarks(req);
|
|
269
286
|
if (pathname === '/api/knowledge/ingest/urls' && method === 'POST')
|
|
@@ -272,6 +289,8 @@ export async function dispatchOperatorRoutes(req, handlers) {
|
|
|
272
289
|
return handlers.postKnowledgeIngestConnector(req);
|
|
273
290
|
if (pathname === '/api/knowledge/search' && method === 'POST')
|
|
274
291
|
return handlers.postKnowledgeSearch(req);
|
|
292
|
+
if (pathname === '/api/knowledge/ask' && method === 'POST')
|
|
293
|
+
return handlers.postKnowledgeAsk(req);
|
|
275
294
|
if (pathname === '/api/knowledge/packet' && method === 'POST')
|
|
276
295
|
return handlers.postKnowledgePacket(req);
|
|
277
296
|
if (pathname === '/api/knowledge/lint' && method === 'POST')
|
|
@@ -293,6 +312,9 @@ export async function dispatchOperatorRoutes(req, handlers) {
|
|
|
293
312
|
const knowledgeExtractionMatch = pathname.match(/^\/api\/knowledge\/extractions\/([^/]+)$/);
|
|
294
313
|
if (knowledgeExtractionMatch && method === 'GET')
|
|
295
314
|
return handlers.getKnowledgeExtraction(decodeURIComponent(knowledgeExtractionMatch[1]));
|
|
315
|
+
const knowledgeIssueReviewMatch = pathname.match(/^\/api\/knowledge\/issues\/([^/]+)\/review$/);
|
|
316
|
+
if (knowledgeIssueReviewMatch && method === 'POST')
|
|
317
|
+
return handlers.postKnowledgeReviewIssue(decodeURIComponent(knowledgeIssueReviewMatch[1]), req);
|
|
296
318
|
const knowledgeCandidateDecideMatch = pathname.match(/^\/api\/knowledge\/candidates\/([^/]+)\/decide$/);
|
|
297
319
|
if (knowledgeCandidateDecideMatch && method === 'POST')
|
|
298
320
|
return handlers.postKnowledgeDecideCandidate(decodeURIComponent(knowledgeCandidateDecideMatch[1]), req);
|
|
@@ -311,6 +333,12 @@ export async function dispatchOperatorRoutes(req, handlers) {
|
|
|
311
333
|
const knowledgeJobMatch = pathname.match(/^\/api\/knowledge\/jobs\/([^/]+)$/);
|
|
312
334
|
if (knowledgeJobMatch && method === 'GET')
|
|
313
335
|
return handlers.getKnowledgeJob(decodeURIComponent(knowledgeJobMatch[1]));
|
|
336
|
+
const knowledgeRefinementTaskCancelMatch = pathname.match(/^\/api\/knowledge\/refinement\/tasks\/([^/]+)\/cancel$/);
|
|
337
|
+
if (knowledgeRefinementTaskCancelMatch && method === 'POST')
|
|
338
|
+
return handlers.postKnowledgeCancelRefinementTask(decodeURIComponent(knowledgeRefinementTaskCancelMatch[1]), req);
|
|
339
|
+
const knowledgeRefinementTaskMatch = pathname.match(/^\/api\/knowledge\/refinement\/tasks\/([^/]+)$/);
|
|
340
|
+
if (knowledgeRefinementTaskMatch && method === 'GET')
|
|
341
|
+
return handlers.getKnowledgeRefinementTask(decodeURIComponent(knowledgeRefinementTaskMatch[1]));
|
|
314
342
|
const knowledgeScheduleEnabledMatch = pathname.match(/^\/api\/knowledge\/schedules\/([^/]+)\/enabled$/);
|
|
315
343
|
if (knowledgeScheduleEnabledMatch && method === 'POST')
|
|
316
344
|
return handlers.postKnowledgeSetScheduleEnabled(decodeURIComponent(knowledgeScheduleEnabledMatch[1]), req);
|
|
@@ -328,6 +356,8 @@ export async function dispatchOperatorRoutes(req, handlers) {
|
|
|
328
356
|
return handlers.getVoiceProviders();
|
|
329
357
|
if (pathname === '/api/voice/voices' && method === 'GET')
|
|
330
358
|
return handlers.getVoiceVoices(url);
|
|
359
|
+
if (pathname === '/api/voice/tts/stream' && method === 'POST')
|
|
360
|
+
return handlers.postVoiceTtsStream(req);
|
|
331
361
|
if (pathname === '/api/voice/tts' && method === 'POST')
|
|
332
362
|
return handlers.postVoiceTts(req);
|
|
333
363
|
if (pathname === '/api/voice/stt' && method === 'POST')
|
|
@@ -381,6 +411,10 @@ export async function dispatchOperatorRoutes(req, handlers) {
|
|
|
381
411
|
return handlers.deleteLocalAuthSession(decodeURIComponent(sessionMatch[1]));
|
|
382
412
|
if (pathname === '/api/local-auth/bootstrap-file' && method === 'DELETE')
|
|
383
413
|
return handlers.deleteBootstrapFile();
|
|
414
|
+
if (pathname === '/api/runtime/scheduler' && method === 'GET')
|
|
415
|
+
return handlers.getSchedulerCapacity();
|
|
416
|
+
if (pathname === '/api/runtime/metrics' && method === 'GET')
|
|
417
|
+
return handlers.getRuntimeMetrics();
|
|
384
418
|
if (pathname === '/api/panels' && method === 'GET')
|
|
385
419
|
return handlers.getPanels();
|
|
386
420
|
if (pathname === '/api/panels/open' && method === 'POST')
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otlp-protobuf.d.ts","sourceRoot":"","sources":["../src/otlp-protobuf.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAi6B7D,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASrG"}
|