@pellux/goodvibes-daemon-sdk 0.18.3

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.
Files changed (86) hide show
  1. package/README.md +32 -0
  2. package/dist/api-router.d.ts +3 -0
  3. package/dist/api-router.d.ts.map +1 -0
  4. package/dist/api-router.js +13 -0
  5. package/dist/automation.d.ts +3 -0
  6. package/dist/automation.d.ts.map +1 -0
  7. package/dist/automation.js +56 -0
  8. package/dist/channel-route-types.d.ts +78 -0
  9. package/dist/channel-route-types.d.ts.map +1 -0
  10. package/dist/channel-route-types.js +1 -0
  11. package/dist/channel-routes.d.ts +4 -0
  12. package/dist/channel-routes.d.ts.map +1 -0
  13. package/dist/channel-routes.js +264 -0
  14. package/dist/context.d.ts +207 -0
  15. package/dist/context.d.ts.map +1 -0
  16. package/dist/context.js +1 -0
  17. package/dist/control-routes.d.ts +57 -0
  18. package/dist/control-routes.d.ts.map +1 -0
  19. package/dist/control-routes.js +120 -0
  20. package/dist/error-response.d.ts +10 -0
  21. package/dist/error-response.d.ts.map +1 -0
  22. package/dist/error-response.js +84 -0
  23. package/dist/http-policy.d.ts +33 -0
  24. package/dist/http-policy.d.ts.map +1 -0
  25. package/dist/http-policy.js +30 -0
  26. package/dist/index.d.ts +30 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +20 -0
  29. package/dist/integration-route-types.d.ts +64 -0
  30. package/dist/integration-route-types.d.ts.map +1 -0
  31. package/dist/integration-route-types.js +1 -0
  32. package/dist/integration-routes.d.ts +4 -0
  33. package/dist/integration-routes.d.ts.map +1 -0
  34. package/dist/integration-routes.js +172 -0
  35. package/dist/knowledge-route-types.d.ts +114 -0
  36. package/dist/knowledge-route-types.d.ts.map +1 -0
  37. package/dist/knowledge-route-types.js +1 -0
  38. package/dist/knowledge-routes.d.ts +4 -0
  39. package/dist/knowledge-routes.d.ts.map +1 -0
  40. package/dist/knowledge-routes.js +582 -0
  41. package/dist/media-route-types.d.ts +66 -0
  42. package/dist/media-route-types.d.ts.map +1 -0
  43. package/dist/media-route-types.js +1 -0
  44. package/dist/media-routes.d.ts +4 -0
  45. package/dist/media-routes.d.ts.map +1 -0
  46. package/dist/media-routes.js +328 -0
  47. package/dist/operator.d.ts +3 -0
  48. package/dist/operator.d.ts.map +1 -0
  49. package/dist/operator.js +395 -0
  50. package/dist/remote-routes.d.ts +40 -0
  51. package/dist/remote-routes.d.ts.map +1 -0
  52. package/dist/remote-routes.js +238 -0
  53. package/dist/remote.d.ts +3 -0
  54. package/dist/remote.d.ts.map +1 -0
  55. package/dist/remote.js +35 -0
  56. package/dist/route-helpers.d.ts +11 -0
  57. package/dist/route-helpers.d.ts.map +1 -0
  58. package/dist/route-helpers.js +54 -0
  59. package/dist/runtime-automation-routes.d.ts +4 -0
  60. package/dist/runtime-automation-routes.d.ts.map +1 -0
  61. package/dist/runtime-automation-routes.js +165 -0
  62. package/dist/runtime-route-types.d.ts +240 -0
  63. package/dist/runtime-route-types.d.ts.map +1 -0
  64. package/dist/runtime-route-types.js +1 -0
  65. package/dist/runtime-routes.d.ts +5 -0
  66. package/dist/runtime-routes.d.ts.map +1 -0
  67. package/dist/runtime-routes.js +8 -0
  68. package/dist/runtime-session-routes.d.ts +4 -0
  69. package/dist/runtime-session-routes.d.ts.map +1 -0
  70. package/dist/runtime-session-routes.js +387 -0
  71. package/dist/sessions.d.ts +3 -0
  72. package/dist/sessions.d.ts.map +1 -0
  73. package/dist/sessions.js +37 -0
  74. package/dist/system-route-types.d.ts +124 -0
  75. package/dist/system-route-types.d.ts.map +1 -0
  76. package/dist/system-route-types.js +1 -0
  77. package/dist/system-routes.d.ts +4 -0
  78. package/dist/system-routes.d.ts.map +1 -0
  79. package/dist/system-routes.js +327 -0
  80. package/dist/tasks.d.ts +3 -0
  81. package/dist/tasks.d.ts.map +1 -0
  82. package/dist/tasks.js +22 -0
  83. package/dist/telemetry-routes.d.ts +44 -0
  84. package/dist/telemetry-routes.d.ts.map +1 -0
  85. package/dist/telemetry-routes.js +227 -0
  86. package/package.json +42 -0
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
1
+ export { dispatchAutomationRoutes } from './automation.js';
2
+ export { dispatchSessionRoutes } from './sessions.js';
3
+ export { dispatchTaskRoutes } from './tasks.js';
4
+ export { dispatchOperatorRoutes } from './operator.js';
5
+ export { dispatchRemoteRoutes } from './remote.js';
6
+ export { dispatchDaemonApiRoutes } from './api-router.js';
7
+ export { buildMissingScopeBody, resolveAuthenticatedPrincipal, resolvePrivateHostFetchOptions, } from './http-policy.js';
8
+ export { isJsonRecord, missingScopes, readChannelConversationKind, readChannelLifecycleAction, scopeMatches, } from './route-helpers.js';
9
+ export { createDaemonControlRouteHandlers } from './control-routes.js';
10
+ export { createDaemonTelemetryRouteHandlers } from './telemetry-routes.js';
11
+ export { createDaemonChannelRouteHandlers } from './channel-routes.js';
12
+ export { createDaemonIntegrationRouteHandlers } from './integration-routes.js';
13
+ export { createDaemonSystemRouteHandlers } from './system-routes.js';
14
+ export { createDaemonKnowledgeRouteHandlers } from './knowledge-routes.js';
15
+ export { createDaemonMediaRouteHandlers } from './media-routes.js';
16
+ export { createDaemonRuntimeAutomationRouteHandlers } from './runtime-automation-routes.js';
17
+ export { createDaemonRuntimeSessionRouteHandlers } from './runtime-session-routes.js';
18
+ export { createDaemonRuntimeRouteHandlers } from './runtime-routes.js';
19
+ export { createDaemonRemoteRouteHandlers, handleRemotePairRequest, handleRemotePairVerify, handleRemotePeerHeartbeat, handleRemotePeerWorkPull, handleRemotePeerWorkComplete, } from './remote-routes.js';
20
+ export { buildErrorResponseBody, jsonErrorResponse, summarizeErrorForRecord } from './error-response.js';
@@ -0,0 +1,64 @@
1
+ import type { JsonRecord } from './route-helpers.js';
2
+ export type RuntimeEventDomain = string;
3
+ export interface IntegrationRuntimeStoreLike {
4
+ getState(): {
5
+ readonly deliveries: {
6
+ readonly deliveryAttempts: Map<string, unknown>;
7
+ };
8
+ };
9
+ }
10
+ export interface IntegrationHelperServiceLike {
11
+ buildReview(): unknown;
12
+ getSessionSnapshot(): unknown;
13
+ getTaskSnapshot(): unknown;
14
+ getAutomationSnapshot(): unknown;
15
+ getSessionBrokerSnapshot(): unknown;
16
+ getDeliverySnapshot(): unknown;
17
+ getRouteSnapshot(): unknown;
18
+ getRemoteSnapshot(): unknown;
19
+ getHealthSnapshot(): unknown;
20
+ getAccountsSnapshot(): Promise<Record<string, unknown>>;
21
+ getSettingsSnapshot(): unknown;
22
+ getContinuitySnapshot(): unknown;
23
+ getWorktreeSnapshot(): unknown;
24
+ getIntelligenceSnapshot(): unknown;
25
+ getLocalAuthSnapshot(): unknown;
26
+ listPanels(): readonly unknown[];
27
+ openPanel(panelId: string, pane: 'top' | 'bottom'): boolean;
28
+ createEventStream(req: Request, domains: readonly RuntimeEventDomain[]): Response | Promise<Response>;
29
+ getRuntimeStore(): IntegrationRuntimeStoreLike | null;
30
+ }
31
+ export interface ChannelAccountRegistryLike {
32
+ listAccounts(): Promise<unknown[]>;
33
+ }
34
+ export interface ProviderRuntimeSnapshotServiceLike {
35
+ listSnapshots(): Promise<readonly unknown[]>;
36
+ getSnapshot(providerId: string): Promise<unknown | null>;
37
+ getUsageSnapshot(providerId: string): Promise<unknown | null>;
38
+ }
39
+ export interface MemoryRegistryLike {
40
+ doctor(): Promise<unknown>;
41
+ vectorStats(): unknown;
42
+ rebuildVectorsAsync(): Promise<unknown>;
43
+ }
44
+ export interface MemoryEmbeddingRegistryLike {
45
+ setDefaultProvider(providerId: string): void;
46
+ }
47
+ export interface UserAuthManagerLike {
48
+ addUser(username: string, password: string, roles: readonly string[]): unknown;
49
+ deleteUser(username: string): boolean;
50
+ rotatePassword(username: string, password: string): void;
51
+ revokeSession(sessionId: string): boolean;
52
+ clearBootstrapCredentialFile(): boolean;
53
+ }
54
+ export interface DaemonIntegrationRouteContext {
55
+ readonly channelPlugins: ChannelAccountRegistryLike;
56
+ readonly integrationHelpers: IntegrationHelperServiceLike | null;
57
+ readonly memoryEmbeddingRegistry: MemoryEmbeddingRegistryLike;
58
+ readonly memoryRegistry: MemoryRegistryLike;
59
+ readonly parseJsonBody: (req: Request) => Promise<JsonRecord | Response>;
60
+ readonly providerRuntime: ProviderRuntimeSnapshotServiceLike;
61
+ readonly requireAdmin: (req: Request) => Response | null;
62
+ readonly userAuth: UserAuthManagerLike;
63
+ }
64
+ //# sourceMappingURL=integration-route-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-route-types.d.ts","sourceRoot":"","sources":["../src/integration-route-types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAExC,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,IAAI;QACV,QAAQ,CAAC,UAAU,EAAE;YACnB,QAAQ,CAAC,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;SACjD,CAAC;KACH,CAAC;CACH;AAED,MAAM,WAAW,4BAA4B;IAC3C,WAAW,IAAI,OAAO,CAAC;IACvB,kBAAkB,IAAI,OAAO,CAAC;IAC9B,eAAe,IAAI,OAAO,CAAC;IAC3B,qBAAqB,IAAI,OAAO,CAAC;IACjC,wBAAwB,IAAI,OAAO,CAAC;IACpC,mBAAmB,IAAI,OAAO,CAAC;IAC/B,gBAAgB,IAAI,OAAO,CAAC;IAC5B,iBAAiB,IAAI,OAAO,CAAC;IAC7B,iBAAiB,IAAI,OAAO,CAAC;IAC7B,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACxD,mBAAmB,IAAI,OAAO,CAAC;IAC/B,qBAAqB,IAAI,OAAO,CAAC;IACjC,mBAAmB,IAAI,OAAO,CAAC;IAC/B,uBAAuB,IAAI,OAAO,CAAC;IACnC,oBAAoB,IAAI,OAAO,CAAC;IAChC,UAAU,IAAI,SAAS,O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AA4B,IAAI,OAAO,CAAC;CACzC;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,cAAc,EAAE,0BAA0B,CAAC;IACpD,QAAQ,CAAC,kBAAkB,EAAE,4BAA4B,GAAG,IAAI,CAAC;IACjE,QAAQ,CAAC,uBAAuB,EAAE,2BAA2B,CAAC;IAC9D,QAAQ,CAAC,cAAc,EAAE,kBAAkB,CAAC;IAC5C,QAAQ,CAAC,aAAa,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,UAAU,GAAG,QAAQ,CAAC,CAAC;IACzE,QAAQ,CAAC,eAAe,EAAE,kCAAkC,CAAC;IAC7D,QAAQ,CAAC,YAAY,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,QAAQ,GAAG,IAAI,CAAC;IACzD,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;CACxC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { DaemonApiRouteHandlers } from './context.js';
2
+ import type { DaemonIntegrationRouteContext } from './integration-route-types.js';
3
+ export declare function createDaemonIntegrationRouteHandlers(context: DaemonIntegrationRouteContext, request: Request): Pick<DaemonApiRouteHandlers, 'getReview' | 'getIntegrationSession' | 'getIntegrationTasks' | 'getIntegrationAutomation' | 'getIntegrationSessions' | 'getDeliveries' | 'getDelivery' | 'getRoutesSnapshot' | 'getRemote' | 'getHealth' | 'getAccounts' | 'getProviders' | 'getProvider' | 'getProviderUsage' | 'getSettings' | 'getContinuity' | 'getWorktrees' | 'getIntelligence' | 'getMemoryDoctor' | 'getMemoryVectorStats' | 'postMemoryVectorRebuild' | 'postMemoryEmbeddingDefault' | 'getLocalAuth' | 'postLocalAuthUser' | 'deleteLocalAuthUser' | 'postLocalAuthPassword' | 'deleteLocalAuthSession' | 'deleteBootstrapFile' | 'getPanels' | 'postPanelOpen' | 'getEvents'>;
4
+ //# sourceMappingURL=integration-routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-routes.d.ts","sourceRoot":"","sources":["../src/integration-routes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,KAAK,EAAE,6BAA6B,EAAoD,MAAM,8BAA8B,CAAC;AAEpI,wBAAgB,oCAAoC,CAClD,OAAO,EAAE,6BAA6B,EACtC,OAAO,EAAE,OAAO,GACf,IAAI,CACL,sBAAsB,EACpB,WAAW,GACX,uBAAuB,GACvB,qBAAqB,GACrB,0BAA0B,GAC1B,wBAAwB,GACxB,eAAe,GACf,aAAa,GACb,mBAAmB,GACnB,WAAW,GACX,WAAW,GACX,aAAa,GACb,cAAc,GACd,aAAa,GACb,kBAAkB,GAClB,aAAa,GACb,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,iBAAiB,GACjB,sBAAsB,GACtB,yBAAyB,GACzB,4BAA4B,GAC5B,cAAc,GACd,mBAAmB,GACnB,qBAAqB,GACrB,uBAAuB,GACvB,wBAAwB,GACxB,qBAAqB,GACrB,WAAW,GACX,eAAe,GACf,WAAW,CACd,CAkJA"}
@@ -0,0 +1,172 @@
1
+ import { jsonErrorResponse } from './error-response.js';
2
+ export function createDaemonIntegrationRouteHandlers(context, request) {
3
+ return {
4
+ getReview: () => withHelpers(context.integrationHelpers, (helpers) => Response.json(helpers.buildReview())),
5
+ getIntegrationSession: () => withHelpers(context.integrationHelpers, (helpers) => Response.json(helpers.getSessionSnapshot())),
6
+ getIntegrationTasks: () => withHelpers(context.integrationHelpers, (helpers) => Response.json(helpers.getTaskSnapshot())),
7
+ getIntegrationAutomation: () => withHelpers(context.integrationHelpers, (helpers) => Response.json(helpers.getAutomationSnapshot())),
8
+ getIntegrationSessions: () => withHelpers(context.integrationHelpers, (helpers) => Response.json(helpers.getSessionBrokerSnapshot())),
9
+ getDeliveries: () => withHelpers(context.integrationHelpers, (helpers) => Response.json(helpers.getDeliverySnapshot())),
10
+ getDelivery: (deliveryId) => {
11
+ const runtimeStore = context.integrationHelpers?.getRuntimeStore() ?? null;
12
+ const delivery = runtimeStore?.getState().deliveries.deliveryAttempts.get(deliveryId);
13
+ if (!delivery) {
14
+ return Response.json({ error: 'Unknown delivery' }, { status: 404 });
15
+ }
16
+ return Response.json({ delivery });
17
+ },
18
+ getRoutesSnapshot: () => withHelpers(context.integrationHelpers, (helpers) => Response.json(helpers.getRouteSnapshot())),
19
+ getRemote: () => withHelpers(context.integrationHelpers, (helpers) => Response.json(helpers.getRemoteSnapshot())),
20
+ getHealth: () => withHelpers(context.integrationHelpers, (helpers) => Response.json(helpers.getHealthSnapshot())),
21
+ getAccounts: async () => {
22
+ if (!context.integrationHelpers) {
23
+ return Response.json({ error: 'Integration helper service unavailable' }, { status: 503 });
24
+ }
25
+ const [snapshot, channelAccounts] = await Promise.all([
26
+ context.integrationHelpers.getAccountsSnapshot(),
27
+ context.channelPlugins.listAccounts(),
28
+ ]);
29
+ return Response.json({
30
+ ...snapshot,
31
+ channelCount: channelAccounts.length,
32
+ channels: channelAccounts,
33
+ });
34
+ },
35
+ getProviders: async () => Response.json({ providers: await context.providerRuntime.listSnapshots() }),
36
+ getProvider: async (providerId) => {
37
+ const provider = await context.providerRuntime.getSnapshot(providerId);
38
+ return provider
39
+ ? Response.json(provider)
40
+ : Response.json({ error: 'Unknown provider' }, { status: 404 });
41
+ },
42
+ getProviderUsage: async (providerId) => {
43
+ const usage = await context.providerRuntime.getUsageSnapshot(providerId);
44
+ return usage
45
+ ? Response.json(usage)
46
+ : Response.json({ error: 'Unknown provider' }, { status: 404 });
47
+ },
48
+ getSettings: () => withHelpers(context.integrationHelpers, (helpers) => Response.json(helpers.getSettingsSnapshot())),
49
+ getContinuity: () => withHelpers(context.integrationHelpers, (helpers) => Response.json(helpers.getContinuitySnapshot())),
50
+ getWorktrees: () => withHelpers(context.integrationHelpers, (helpers) => Response.json(helpers.getWorktreeSnapshot())),
51
+ getIntelligence: () => withHelpers(context.integrationHelpers, (helpers) => Response.json(helpers.getIntelligenceSnapshot())),
52
+ getMemoryDoctor: async () => Response.json(await context.memoryRegistry.doctor()),
53
+ getMemoryVectorStats: () => Response.json({ vector: context.memoryRegistry.vectorStats() }),
54
+ postMemoryVectorRebuild: async (req) => {
55
+ const admin = context.requireAdmin(req);
56
+ if (admin)
57
+ return admin;
58
+ return Response.json({ vector: await context.memoryRegistry.rebuildVectorsAsync() });
59
+ },
60
+ postMemoryEmbeddingDefault: async (req) => {
61
+ const admin = context.requireAdmin(req);
62
+ if (admin)
63
+ return admin;
64
+ const body = await context.parseJsonBody(req);
65
+ if (body instanceof Response)
66
+ return body;
67
+ const providerId = typeof body.providerId === 'string' ? body.providerId : '';
68
+ if (!providerId)
69
+ return Response.json({ error: 'Missing providerId' }, { status: 400 });
70
+ try {
71
+ context.memoryEmbeddingRegistry.setDefaultProvider(providerId);
72
+ return Response.json(await context.memoryRegistry.doctor());
73
+ }
74
+ catch (error) {
75
+ return jsonErrorResponse(error, { status: 400 });
76
+ }
77
+ },
78
+ getLocalAuth: () => {
79
+ const admin = context.requireAdmin(request);
80
+ if (admin)
81
+ return admin;
82
+ return withHelpers(context.integrationHelpers, (helpers) => Response.json(helpers.getLocalAuthSnapshot()));
83
+ },
84
+ postLocalAuthUser: async (req) => {
85
+ const admin = context.requireAdmin(req);
86
+ if (admin)
87
+ return admin;
88
+ const body = await context.parseJsonBody(req);
89
+ if (body instanceof Response)
90
+ return body;
91
+ const username = typeof body.username === 'string' ? body.username : '';
92
+ const password = typeof body.password === 'string' ? body.password : '';
93
+ const roles = Array.isArray(body.roles) ? body.roles.filter((value) => typeof value === 'string') : ['admin'];
94
+ try {
95
+ return Response.json({ user: context.userAuth.addUser(username, password, roles) }, { status: 201 });
96
+ }
97
+ catch (error) {
98
+ return jsonErrorResponse(error, { status: 400 });
99
+ }
100
+ },
101
+ deleteLocalAuthUser: (username) => {
102
+ const admin = context.requireAdmin(request);
103
+ if (admin)
104
+ return admin;
105
+ try {
106
+ const removed = context.userAuth.deleteUser(username);
107
+ return removed
108
+ ? Response.json({ deleted: true })
109
+ : Response.json({ error: 'Unknown user' }, { status: 404 });
110
+ }
111
+ catch (error) {
112
+ return jsonErrorResponse(error, { status: 400 });
113
+ }
114
+ },
115
+ postLocalAuthPassword: async (username, req) => {
116
+ const admin = context.requireAdmin(req);
117
+ if (admin)
118
+ return admin;
119
+ const body = await context.parseJsonBody(req);
120
+ if (body instanceof Response)
121
+ return body;
122
+ const password = typeof body.password === 'string' ? body.password : '';
123
+ try {
124
+ context.userAuth.rotatePassword(username, password);
125
+ return Response.json({ rotated: true });
126
+ }
127
+ catch (error) {
128
+ return jsonErrorResponse(error, { status: 400 });
129
+ }
130
+ },
131
+ deleteLocalAuthSession: (sessionId) => {
132
+ const admin = context.requireAdmin(request);
133
+ if (admin)
134
+ return admin;
135
+ return context.userAuth.revokeSession(sessionId)
136
+ ? Response.json({ revoked: true })
137
+ : Response.json({ error: 'Unknown session' }, { status: 404 });
138
+ },
139
+ deleteBootstrapFile: () => {
140
+ const admin = context.requireAdmin(request);
141
+ if (admin)
142
+ return admin;
143
+ return Response.json({ removed: context.userAuth.clearBootstrapCredentialFile() });
144
+ },
145
+ getPanels: () => withHelpers(context.integrationHelpers, (helpers) => Response.json({ panels: helpers.listPanels() })),
146
+ postPanelOpen: async (req) => {
147
+ const body = await context.parseJsonBody(req);
148
+ if (body instanceof Response)
149
+ return body;
150
+ const panelId = typeof body.id === 'string' ? body.id : '';
151
+ const pane = body.pane === 'bottom' ? 'bottom' : 'top';
152
+ if (!panelId)
153
+ return Response.json({ error: 'Missing panel id' }, { status: 400 });
154
+ const ok = context.integrationHelpers?.openPanel(panelId, pane) ?? false;
155
+ return ok
156
+ ? Response.json({ opened: true, id: panelId, pane })
157
+ : Response.json({ error: `Unknown panel: ${panelId}` }, { status: 404 });
158
+ },
159
+ getEvents: (req) => {
160
+ const url = new URL(req.url);
161
+ const rawDomains = url.searchParams.get('domains');
162
+ const domains = (rawDomains ? rawDomains.split(',').map((value) => value.trim()).filter(Boolean) : []);
163
+ return withHelpers(context.integrationHelpers, (helpers) => helpers.createEventStream(req, domains));
164
+ },
165
+ };
166
+ }
167
+ function withHelpers(helpers, run) {
168
+ if (!helpers) {
169
+ return Response.json({ error: 'Integration helper service unavailable' }, { status: 503 });
170
+ }
171
+ return run(helpers);
172
+ }
@@ -0,0 +1,114 @@
1
+ export type AutomationScheduleDefinition = unknown;
2
+ export type KnowledgeProjectionTargetKind = 'overview' | 'bundle' | 'source' | 'node' | 'issue';
3
+ export type KnowledgeUsageKind = string;
4
+ export type KnowledgeCandidateStatus = string;
5
+ export type KnowledgeSourceType = string;
6
+ export type KnowledgePacketDetail = string;
7
+ export interface AuthenticatedPrincipalLike {
8
+ readonly principalId: string;
9
+ readonly principalKind: string;
10
+ readonly admin: boolean;
11
+ readonly scopes: readonly string[];
12
+ }
13
+ export interface KnowledgeGraphqlAccessLike {
14
+ readonly requiredScopes: readonly string[];
15
+ readonly adminRequired?: boolean;
16
+ }
17
+ export interface KnowledgeGraphqlResultLike {
18
+ readonly data?: unknown;
19
+ readonly errors?: readonly unknown[];
20
+ }
21
+ export interface KnowledgeGraphqlServiceLike {
22
+ readonly schemaText: string;
23
+ execute(input: {
24
+ readonly query: string;
25
+ readonly operationName?: string;
26
+ readonly variables?: Record<string, unknown>;
27
+ readonly admin: boolean;
28
+ readonly scopes: readonly string[];
29
+ }): Promise<KnowledgeGraphqlResultLike>;
30
+ }
31
+ export interface KnowledgeServiceLike {
32
+ getStatus(): Promise<unknown>;
33
+ listSources(limit: number): readonly unknown[];
34
+ listNodes(limit: number): readonly unknown[];
35
+ listIssues(limit: number): readonly unknown[];
36
+ getItem(id: string): unknown | null;
37
+ listConnectors(): readonly unknown[];
38
+ getConnector(id: string): unknown | null;
39
+ doctorConnector(id: string): Promise<unknown | null>;
40
+ listProjectionTargets(limit: number): Promise<readonly unknown[]>;
41
+ listExtractions(limit: number, sourceId?: string): readonly unknown[];
42
+ listUsageRecords(limit: number, filter: {
43
+ targetKind?: 'source' | 'node' | 'issue';
44
+ targetId?: string;
45
+ usageKind?: KnowledgeUsageKind;
46
+ }): readonly unknown[];
47
+ listConsolidationCandidates(limit: number, filter: {
48
+ status?: KnowledgeCandidateStatus;
49
+ subjectKind?: 'source' | 'node' | 'issue';
50
+ subjectId?: string;
51
+ }): readonly unknown[];
52
+ getConsolidationCandidate(id: string): unknown | null;
53
+ listConsolidationReports(limit: number): readonly unknown[];
54
+ getConsolidationReport(id: string): unknown | null;
55
+ getExtraction(id: string): unknown | null;
56
+ getSourceExtraction(id: string): unknown | null;
57
+ listJobs(): readonly unknown[];
58
+ getJob(jobId: string): unknown | null;
59
+ listJobRuns(limit: number, jobId?: string): readonly unknown[];
60
+ listSchedules(limit: number): readonly unknown[];
61
+ getSchedule(id: string): unknown | null;
62
+ ingestUrl(input: Record<string, unknown>): Promise<unknown>;
63
+ ingestArtifact(input: Record<string, unknown>): Promise<unknown>;
64
+ importBookmarksFromFile(input: Record<string, unknown>): Promise<unknown>;
65
+ importUrlsFromFile(input: Record<string, unknown>): Promise<unknown>;
66
+ ingestConnectorInput(input: Record<string, unknown>): Promise<unknown>;
67
+ search(query: string, limit: number): readonly unknown[];
68
+ buildPacket(task: string, writeScope: readonly string[], limit: number, options: {
69
+ detail?: KnowledgePacketDetail;
70
+ budgetLimit?: number;
71
+ }): Promise<unknown> | unknown;
72
+ decideConsolidationCandidate(id: string, decision: 'accept' | 'reject' | 'supersede', input: Record<string, unknown>): Promise<unknown>;
73
+ runJob(jobId: string, input: Record<string, unknown>): Promise<unknown>;
74
+ lint(): Promise<readonly unknown[]>;
75
+ reindex(): Promise<unknown>;
76
+ saveSchedule(input: {
77
+ readonly id?: string;
78
+ readonly jobId: string;
79
+ readonly schedule: AutomationScheduleDefinition;
80
+ readonly label?: string;
81
+ readonly enabled?: boolean;
82
+ readonly metadata?: Record<string, unknown>;
83
+ }): Promise<unknown>;
84
+ deleteSchedule(id: string): Promise<boolean>;
85
+ setScheduleEnabled(id: string, enabled: boolean): Promise<unknown | null>;
86
+ renderProjection(input: {
87
+ kind: KnowledgeProjectionTargetKind;
88
+ id?: string;
89
+ limit?: number;
90
+ }): Promise<unknown>;
91
+ materializeProjection(input: {
92
+ kind: KnowledgeProjectionTargetKind;
93
+ id?: string;
94
+ limit?: number;
95
+ filename?: string;
96
+ }): Promise<unknown>;
97
+ }
98
+ export interface DaemonKnowledgeRouteContext {
99
+ readonly configManager: {
100
+ get(key: string): unknown;
101
+ };
102
+ readonly inspectGraphqlAccess: (query: string, operationName?: string) => KnowledgeGraphqlAccessLike;
103
+ readonly normalizeAtSchedule: (at: number) => AutomationScheduleDefinition;
104
+ readonly normalizeCronSchedule: (expression: string, timezone?: string, staggerMs?: unknown) => AutomationScheduleDefinition;
105
+ readonly normalizeEverySchedule: (interval: number | string, anchorAt?: number) => AutomationScheduleDefinition;
106
+ readonly parseJsonBody: (req: Request) => Promise<Record<string, unknown> | Response>;
107
+ readonly parseOptionalJsonBody: (req: Request) => Promise<Record<string, unknown> | null | Response>;
108
+ readonly parseJsonText: (raw: string) => Record<string, unknown> | Response;
109
+ readonly requireAdmin: (req: Request) => Response | null;
110
+ readonly resolveAuthenticatedPrincipal: (req: Request) => AuthenticatedPrincipalLike | null;
111
+ readonly knowledgeService: KnowledgeServiceLike;
112
+ readonly knowledgeGraphqlService: KnowledgeGraphqlServiceLike;
113
+ }
114
+ //# sourceMappingURL=knowledge-route-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"knowledge-route-types.d.ts","sourceRoot":"","sources":["../src/knowledge-route-types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,4BAA4B,GAAG,OAAO,CAAC;AACnD,MAAM,MAAM,6BAA6B,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAChG,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AACxC,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAC9C,MA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,GAAG,IAAI,CAAC;IACzD,QAAQ,CAAC,6BAA6B,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,0BAA0B,GAAG,IAAI,CAAC;IAC5F,QAAQ,CAAC,gBAAgB,EAAE,oBAAoB,CAAC;IAChD,QAAQ,CAAC,uBAAuB,EAAE,2BAA2B,CAAC;CAC/D"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { DaemonApiRouteHandlers } from './context.js';
2
+ import type { DaemonKnowledgeRouteContext } from './knowledge-route-types.js';
3
+ export declare function createDaemonKnowledgeRouteHandlers(context: DaemonKnowledgeRouteContext): Pick<DaemonApiRouteHandlers, 'getKnowledgeStatus' | 'getKnowledgeSources' | 'getKnowledgeNodes' | 'getKnowledgeIssues' | 'getKnowledgeItem' | 'getKnowledgeConnectors' | 'getKnowledgeConnector' | 'getKnowledgeConnectorDoctor' | 'getKnowledgeProjectionTargets' | 'getKnowledgeGraphqlSchema' | 'getKnowledgeExtractions' | 'getKnowledgeUsage' | 'getKnowledgeCandidates' | 'getKnowledgeCandidate' | 'getKnowledgeReports' | 'getKnowledgeReport' | 'getKnowledgeExtraction' | 'getKnowledgeSourceExtraction' | 'getKnowledgeJobs' | 'getKnowledgeJob' | 'getKnowledgeJobRuns' | 'getKnowledgeSchedules' | 'getKnowledgeSchedule' | 'postKnowledgeIngestUrl' | 'postKnowledgeIngestArtifact' | 'postKnowledgeImportBookmarks' | 'postKnowledgeImportUrls' | 'postKnowledgeIngestConnector' | 'postKnowledgeSearch' | 'postKnowledgePacket' | 'postKnowledgeDecideCandidate' | 'postKnowledgeRunJob' | 'postKnowledgeLint' | 'postKnowledgeReindex' | 'postKnowledgeSaveSchedule' | 'deleteKnowledgeSchedule' | 'postKnowledgeSetScheduleEnabled' | 'postKnowledgeRenderProjection' | 'postKnowledgeMaterializeProjection' | 'executeKnowledgeGraphql'>;
4
+ //# sourceMappingURL=knowledge-routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"knowledge-routes.d.ts","sourceRoot":"","sources":["../src/knowledge-routes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAM3D,OAAO,KAAK,EAEV,2BAA2B,EAM5B,MAAM,4BAA4B,CAAC;AAIpC,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,2BAA2B,GACnC,IAAI,CACL,sBAAsB,EACpB,oBAAoB,GACpB,qBAAqB,GACrB,mBAAmB,GACnB,oBAAoB,GACpB,kBAAkB,GAClB,wBAAwB,GACxB,uBAAuB,GACvB,6BAA6B,GAC7B,+BAA+B,GAC/B,2BAA2B,GAC3B,yBAAyB,GACzB,mBAAmB,GACnB,wBAAwB,GACxB,uBAAuB,GACvB,qBAAqB,GACrB,oBAAoB,GACpB,wBAAwB,GACxB,8BAA8B,GAC9B,kBAAkB,GAClB,iBAAiB,GACjB,qBAAqB,GACrB,uBAAuB,GACvB,sBAAsB,GACtB,wBAAwB,GACxB,6BAA6B,GAC7B,8BAA8B,GAC9B,yBAAyB,GACzB,8BAA8B,GAC9B,qBAAqB,GACrB,qBAAqB,GACrB,8BAA8B,GAC9B,qBAAqB,GACrB,mBAAmB,GACnB,sBAAsB,GACtB,2BAA2B,GAC3B,yBAAyB,GACzB,iCAAiC,GACjC,+BAA+B,GAC/B,oCAAoC,GACpC,yBAAyB,CAC5B,CAuIA"}