@jini-ai/daemon 0.3.8 → 0.5.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/CHANGELOG.md +124 -0
- package/README.md +50 -8
- package/dist/agent-executor/contracts.d.ts +736 -0
- package/dist/agent-executor/contracts.js +28 -0
- package/dist/agent-executor/event-translation.d.ts +87 -0
- package/dist/agent-executor/event-translation.js +230 -0
- package/dist/agent-executor/events.d.ts +190 -0
- package/dist/agent-executor/events.js +848 -0
- package/dist/agent-executor/handoff.d.ts +18 -0
- package/dist/agent-executor/handoff.js +16 -0
- package/dist/agent-executor/index.d.ts +98 -0
- package/dist/agent-executor/index.js +98 -0
- package/dist/agent-executor/launch.d.ts +375 -0
- package/dist/agent-executor/launch.js +1001 -0
- package/dist/agent-executor/mcp-bridge.d.ts +338 -0
- package/dist/agent-executor/mcp-bridge.js +835 -0
- package/dist/agent-executor/values.d.ts +5 -0
- package/dist/agent-executor/values.js +13 -0
- package/dist/agent-executor.d.ts +375 -176
- package/dist/agent-executor.js +388 -335
- package/dist/close-status.d.ts +11 -8
- package/dist/close-status.js +31 -19
- package/dist/continuation/continuation-transport.d.ts +3 -1
- package/dist/continuation/continuation-transport.js +1 -1
- package/dist/continuation/journal.d.ts +12 -5
- package/dist/continuation/journal.js +4 -4
- package/dist/continuation/run-scoped-context-store.d.ts +13 -4
- package/dist/continuation/run-scoped-context-store.js +6 -6
- package/dist/continuation/run-start-handler.d.ts +1 -1
- package/dist/continuation/run-start-handler.js +3 -16
- package/dist/delegated-tool-bridge.d.ts +7 -3
- package/dist/delegated-tool-bridge.js +32 -31
- package/dist/event-log.d.ts +7 -5
- package/dist/event-log.js +12 -11
- package/dist/frontend-capability-tools.d.ts +1 -1
- package/dist/frontend-capability-tools.js +3 -2
- package/dist/frontend-session-registry.d.ts +32 -9
- package/dist/frontend-session-registry.js +12 -11
- package/dist/http/active-context.d.ts +105 -0
- package/dist/http/active-context.js +67 -0
- package/dist/http/agents.d.ts +68 -0
- package/dist/http/agents.js +12 -0
- package/dist/http/attachments.d.ts +618 -0
- package/dist/http/attachments.js +1034 -0
- package/dist/http/cancel-owned-runs.d.ts +49 -0
- package/dist/http/cancel-owned-runs.js +35 -0
- package/dist/http/component-catalog.d.ts +84 -0
- package/dist/http/component-catalog.js +64 -0
- package/dist/http/connectors.d.ts +209 -0
- package/dist/http/connectors.js +409 -0
- package/dist/http/daemon-status.d.ts +76 -0
- package/dist/http/daemon-status.js +55 -0
- package/dist/http/db-ops.d.ts +123 -0
- package/dist/http/db-ops.js +189 -0
- package/dist/http/delegated-tools.d.ts +113 -0
- package/dist/http/delegated-tools.js +230 -0
- package/dist/http/frontend-control.d.ts +136 -0
- package/dist/http/frontend-control.js +79 -0
- package/dist/http/frontend-sessions.d.ts +110 -0
- package/dist/http/frontend-sessions.js +180 -0
- package/dist/http/health.d.ts +95 -0
- package/dist/http/health.js +40 -0
- package/dist/http/host-tools.d.ts +214 -0
- package/dist/http/host-tools.js +329 -0
- package/dist/http/index.d.ts +52 -0
- package/dist/http/index.js +27 -0
- package/dist/http/media.d.ts +146 -0
- package/dist/http/media.js +346 -0
- package/dist/http/memory.d.ts +265 -0
- package/dist/http/memory.js +328 -0
- package/dist/http/model-proxy.d.ts +49 -0
- package/dist/http/model-proxy.js +642 -0
- package/dist/http/remote-run-events.d.ts +70 -0
- package/dist/http/remote-run-events.js +224 -0
- package/dist/http/research.d.ts +48 -0
- package/dist/http/research.js +315 -0
- package/dist/http/route-manifest.d.ts +35 -0
- package/dist/http/route-manifest.js +103 -0
- package/dist/http/routines.d.ts +120 -0
- package/dist/http/routines.js +298 -0
- package/dist/http/run-credentials.d.ts +73 -0
- package/dist/http/run-credentials.js +71 -0
- package/dist/http/runs.d.ts +91 -0
- package/dist/http/runs.js +221 -0
- package/dist/http/terminals.d.ts +138 -0
- package/dist/http/terminals.js +325 -0
- package/dist/http/tool-catalog.d.ts +78 -0
- package/dist/http/tool-catalog.js +66 -0
- package/dist/http/workspace-root.d.ts +77 -0
- package/dist/http/workspace-root.js +63 -0
- package/dist/http/xai.d.ts +90 -0
- package/dist/http/xai.js +655 -0
- package/dist/image-prompt-delivery.d.ts +13 -3
- package/dist/image-prompt-delivery.js +5 -5
- package/dist/index.d.ts +556 -4
- package/dist/index.js +556 -4
- package/dist/legacy-data-migration.d.ts +59 -8
- package/dist/legacy-data-migration.js +38 -33
- package/dist/read-only-tools.d.ts +130 -0
- package/dist/read-only-tools.js +115 -0
- package/dist/remote-tool-bridge.d.ts +11 -5
- package/dist/remote-tool-bridge.js +15 -15
- package/dist/routines/index.d.ts +1 -1
- package/dist/routines/index.js +1 -1
- package/dist/routines/routine-store.d.ts +34 -12
- package/dist/routines/routine-store.js +21 -20
- package/dist/routines/schedule.d.ts +48 -10
- package/dist/routines/schedule.js +21 -21
- package/dist/routines/scheduler.d.ts +32 -11
- package/dist/routines/scheduler.js +61 -57
- package/dist/routines/types.d.ts +10 -3
- package/dist/run/core/result.d.ts +6 -2
- package/dist/run/core/result.js +3 -3
- package/dist/run/core/retry.d.ts +17 -4
- package/dist/run/core/retry.js +7 -11
- package/dist/run/diagnostics/diagnostics.d.ts +14 -4
- package/dist/run/diagnostics/diagnostics.js +7 -7
- package/dist/run/index.d.ts +1 -1
- package/dist/run/index.js +1 -1
- package/dist/run-credentials.d.ts +138 -0
- package/dist/run-credentials.js +152 -0
- package/dist/run-lifecycle.d.ts +92 -33
- package/dist/run-lifecycle.js +81 -74
- package/dist/scheduler.d.ts +8 -0
- package/dist/scheduler.js +2 -0
- package/dist/session-coordination.d.ts +115 -0
- package/dist/session-coordination.js +111 -0
- package/dist/store/agent-sessions/errors.d.ts +8 -0
- package/dist/store/agent-sessions/errors.js +10 -0
- package/dist/store/agent-sessions/index.d.ts +12 -0
- package/dist/store/agent-sessions/index.js +19 -0
- package/dist/store/agent-sessions/pglite.d.ts +12 -0
- package/dist/store/agent-sessions/pglite.js +7 -0
- package/dist/store/agent-sessions/ports.d.ts +24 -0
- package/dist/store/agent-sessions/ports.js +2 -0
- package/dist/store/agent-sessions/postgres.d.ts +12 -0
- package/dist/store/agent-sessions/postgres.js +7 -0
- package/dist/store/agent-sessions/schema.d.ts +3 -0
- package/dist/store/agent-sessions/schema.js +23 -0
- package/dist/store/agent-sessions/sql.d.ts +35 -0
- package/dist/store/agent-sessions/sql.js +59 -0
- package/dist/store/agent-sessions/sqlite.d.ts +117 -0
- package/dist/store/agent-sessions/sqlite.js +128 -0
- package/dist/store/event-log/sqlite.d.ts +75 -0
- package/dist/store/event-log/sqlite.js +230 -0
- package/dist/surface-exchanges.d.ts +97 -0
- package/dist/surface-exchanges.js +153 -0
- package/dist/terminal-session.d.ts +43 -11
- package/dist/terminal-session.js +22 -20
- package/dist/tokens.js +4 -4
- package/dist/tool-audit.d.ts +114 -0
- package/dist/tool-audit.js +95 -0
- package/dist/tool-executor.d.ts +22 -7
- package/dist/tool-executor.js +16 -16
- package/dist/tool-result-media.d.ts +3 -1
- package/dist/tool-result-media.js +1 -1
- package/dist/tool-result-surfaces.d.ts +3 -1
- package/dist/tool-result-surfaces.js +1 -1
- package/package.json +127 -9
|
@@ -19,7 +19,10 @@ export interface ImagePromptDelivery {
|
|
|
19
19
|
* @complexity O(n) in the number of images — one line rendered per path, no I/O.
|
|
20
20
|
* @overallScore 100
|
|
21
21
|
*/
|
|
22
|
-
export declare function augmentPromptWithImageAttachments(prompt
|
|
22
|
+
export declare function augmentPromptWithImageAttachments({ prompt, imagePaths }: {
|
|
23
|
+
readonly prompt: string;
|
|
24
|
+
readonly imagePaths: readonly string[];
|
|
25
|
+
}): string;
|
|
23
26
|
/**
|
|
24
27
|
* Directories a 'prompt-path' def's CLI must be allowed to read from so it
|
|
25
28
|
* can actually open the files the augmented prompt just told it about — the
|
|
@@ -33,7 +36,9 @@ export declare function augmentPromptWithImageAttachments(prompt: string, imageP
|
|
|
33
36
|
* @complexity O(n) in the number of images.
|
|
34
37
|
* @overallScore 100
|
|
35
38
|
*/
|
|
36
|
-
export declare function deriveImageAllowedDirs(imagePaths
|
|
39
|
+
export declare function deriveImageAllowedDirs({ imagePaths }: {
|
|
40
|
+
readonly imagePaths: readonly string[];
|
|
41
|
+
}): string[];
|
|
37
42
|
/**
|
|
38
43
|
* Applies `'prompt-path'` image delivery when — and only when — `def`
|
|
39
44
|
* declares it and `imagePaths` is non-empty. Every other combination
|
|
@@ -52,5 +57,10 @@ export declare function deriveImageAllowedDirs(imagePaths: readonly string[]): s
|
|
|
52
57
|
* @complexity O(n) in the number of images; O(1) when delivery is not `'prompt-path'` or there are no images.
|
|
53
58
|
* @overallScore 100
|
|
54
59
|
*/
|
|
55
|
-
export declare function applyImagePromptDelivery(
|
|
60
|
+
export declare function applyImagePromptDelivery({ imageDelivery, prompt, imagePaths, extraAllowedDirs }: {
|
|
61
|
+
readonly imageDelivery: RuntimeAgentDef['imageDelivery'];
|
|
62
|
+
readonly prompt: string;
|
|
63
|
+
readonly imagePaths: readonly string[] | undefined;
|
|
64
|
+
readonly extraAllowedDirs: readonly string[] | undefined;
|
|
65
|
+
}): ImagePromptDelivery;
|
|
56
66
|
//# sourceMappingURL=image-prompt-delivery.d.ts.map
|
|
@@ -45,7 +45,7 @@ import path from 'node:path';
|
|
|
45
45
|
* @complexity O(n) in the number of images — one line rendered per path, no I/O.
|
|
46
46
|
* @overallScore 100
|
|
47
47
|
*/
|
|
48
|
-
export function augmentPromptWithImageAttachments(prompt, imagePaths) {
|
|
48
|
+
export function augmentPromptWithImageAttachments({ prompt, imagePaths }) {
|
|
49
49
|
const list = imagePaths.map((imagePath, index) => `${index + 1}. ${imagePath}`).join('\n');
|
|
50
50
|
const plural = imagePaths.length === 1;
|
|
51
51
|
return (`${prompt}\n\n---\n` +
|
|
@@ -66,7 +66,7 @@ export function augmentPromptWithImageAttachments(prompt, imagePaths) {
|
|
|
66
66
|
* @complexity O(n) in the number of images.
|
|
67
67
|
* @overallScore 100
|
|
68
68
|
*/
|
|
69
|
-
export function deriveImageAllowedDirs(imagePaths) {
|
|
69
|
+
export function deriveImageAllowedDirs({ imagePaths }) {
|
|
70
70
|
return [...new Set(imagePaths.map((imagePath) => path.dirname(imagePath)))];
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
@@ -87,17 +87,17 @@ export function deriveImageAllowedDirs(imagePaths) {
|
|
|
87
87
|
* @complexity O(n) in the number of images; O(1) when delivery is not `'prompt-path'` or there are no images.
|
|
88
88
|
* @overallScore 100
|
|
89
89
|
*/
|
|
90
|
-
export function applyImagePromptDelivery(imageDelivery, prompt, imagePaths, extraAllowedDirs) {
|
|
90
|
+
export function applyImagePromptDelivery({ imageDelivery, prompt, imagePaths, extraAllowedDirs }) {
|
|
91
91
|
if (imageDelivery !== 'prompt-path')
|
|
92
92
|
return { prompt, extraAllowedDirs };
|
|
93
93
|
const paths = (imagePaths ?? []).filter((p) => typeof p === 'string' && p.length > 0);
|
|
94
94
|
if (paths.length === 0)
|
|
95
95
|
return { prompt, extraAllowedDirs };
|
|
96
96
|
const mergedDirs = new Set(extraAllowedDirs ?? []);
|
|
97
|
-
for (const dir of deriveImageAllowedDirs(paths))
|
|
97
|
+
for (const dir of deriveImageAllowedDirs({ imagePaths: paths }))
|
|
98
98
|
mergedDirs.add(dir);
|
|
99
99
|
return {
|
|
100
|
-
prompt: augmentPromptWithImageAttachments(prompt, paths),
|
|
100
|
+
prompt: augmentPromptWithImageAttachments({ prompt: prompt, imagePaths: paths }),
|
|
101
101
|
extraAllowedDirs: [...mergedDirs],
|
|
102
102
|
};
|
|
103
103
|
}
|