@jini-ai/daemon 0.6.17 → 0.6.22
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 +10 -0
- package/dist/agent-executor/claude/mcp-config.d.ts +17 -0
- package/dist/agent-executor/claude/mcp-config.js +29 -0
- package/dist/agent-executor/codex/home-config.d.ts +7 -6
- package/dist/agent-executor/codex/home-config.js +15 -3
- package/dist/agent-executor/codex/home-staging.d.ts +4 -2
- package/dist/agent-executor/codex/home-staging.js +5 -3
- package/dist/agent-executor/contracts.d.ts +15 -0
- package/dist/agent-executor/event-translation.js +3 -0
- package/dist/agent-executor/events.d.ts +6 -4
- package/dist/agent-executor/events.js +29 -7
- package/dist/agent-executor/gemini/tool-calls.d.ts +7 -0
- package/dist/agent-executor/gemini/tool-calls.js +9 -0
- package/dist/agent-executor/http-mcp.d.ts +23 -0
- package/dist/agent-executor/http-mcp.js +74 -0
- package/dist/agent-executor/launch.js +43 -11
- package/dist/agent-executor/mcp-bridge.d.ts +10 -2
- package/dist/agent-executor/mcp-bridge.js +2 -2
- package/dist/agent-executor/opencode/mcp-config.d.ts +10 -0
- package/dist/agent-executor/opencode/mcp-config.js +11 -0
- package/dist/agent-executor/opencode/tool-calls.d.ts +7 -0
- package/dist/agent-executor/opencode/tool-calls.js +12 -0
- package/dist/agent-executor/sanitized-line-stream.d.ts +24 -0
- package/dist/agent-executor/sanitized-line-stream.js +45 -0
- package/dist/agent-executor/tool-call-receipts.d.ts +7 -0
- package/dist/agent-executor/tool-call-receipts.js +9 -0
- package/dist/core/read-only-tools.d.ts +2 -0
- package/dist/core/read-only-tools.js +19 -3
- package/dist/delegated-tool-bridge.js +6 -1
- package/dist/http/attachments.d.ts +2 -101
- package/dist/http/attachments.js +13 -1
- package/dist/http/connectors.js +3 -1
- package/dist/http/db-ops.js +3 -1
- package/dist/http/delegated-tools.d.ts +13 -1
- package/dist/http/delegated-tools.js +23 -6
- package/dist/http/frontend-control.d.ts +0 -36
- package/dist/http/frontend-control.js +39 -1
- package/dist/http/frontend-sessions.js +4 -2
- package/dist/http/index.d.ts +2 -1
- package/dist/http/index.js +1 -0
- package/dist/http/media.js +3 -1
- package/dist/http/model-proxy.js +4 -2
- package/dist/http/remote-run-events.js +3 -1
- package/dist/http/research.js +3 -2
- package/dist/http/runs.js +3 -1
- package/dist/http/surface-restoration.d.ts +17 -0
- package/dist/http/surface-restoration.js +50 -0
- package/dist/http/terminals.js +3 -1
- package/dist/http/tool-catalog.d.ts +15 -1
- package/dist/http/tool-execution-routes.d.ts +3 -1
- package/dist/http/tool-execution-routes.js +4 -3
- package/dist/http/xai.js +3 -2
- package/dist/idle-monitor.d.ts +29 -0
- package/dist/idle-monitor.js +64 -0
- package/dist/image-prompt-delivery.d.ts +1 -1
- package/dist/image-prompt-delivery.js +4 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/legacy-data-migration.js +3 -1
- package/dist/remote-attachment-lookup.d.ts +3 -1
- package/dist/remote-attachment-lookup.js +2 -2
- package/dist/routines/scheduler.js +6 -4
- package/dist/routing-tool-executor.d.ts +6 -1
- package/dist/routing-tool-executor.js +15 -2
- package/dist/run-lifecycle.d.ts +0 -16
- package/dist/run-lifecycle.js +24 -6
- package/dist/surface-exchanges.d.ts +5 -1
- package/dist/surface-exchanges.js +41 -7
- package/dist/surface-restoration.d.ts +38 -0
- package/dist/surface-restoration.js +152 -0
- package/dist/tool-recovery/index.d.ts +1 -0
- package/dist/tool-recovery/index.js +1 -0
- package/dist/tool-recovery/redaction.d.ts +1 -0
- package/dist/tool-recovery/redaction.js +4 -1
- package/dist/tool-recovery/stack.js +2 -1
- package/dist/tool-recovery/surface-lifetime.d.ts +11 -0
- package/dist/tool-recovery/surface-lifetime.js +41 -0
- package/package.json +14 -14
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
|
+
/** Bind every card type to the executing call, and make restoration re-enter this same stack.
|
|
3
|
+
* No submitted answer is captured here: input is the original model-supplied invocation only.
|
|
4
|
+
* @param required.inner The complete authorization, recovery and audit stack.
|
|
5
|
+
* @returns An executor with the same cancellation and audit ports.
|
|
6
|
+
* @complexity O(input size) to snapshot public arguments; O(1) lifecycle state per call.
|
|
7
|
+
*/
|
|
8
|
+
export function withSurfaceExchangeLifetime({ inner }, _options = {}) {
|
|
9
|
+
const execute = async (required, options = {}) => {
|
|
10
|
+
if (!options.emitSurface)
|
|
11
|
+
return inner.execute(required, options);
|
|
12
|
+
const invocation = { ...required, principal: structuredClone(required.principal),
|
|
13
|
+
run: { ...required.run }, input: structuredClone(required.input) };
|
|
14
|
+
// Remote execution adapters establish trusted site/run context around this call. A later
|
|
15
|
+
// authenticated answer arrives in another async chain; restore that context before re-gating.
|
|
16
|
+
const withinInvocation = AsyncLocalStorage.snapshot();
|
|
17
|
+
const controller = new AbortController();
|
|
18
|
+
const abort = () => controller.abort();
|
|
19
|
+
options.signal?.addEventListener('abort', abort, { once: true });
|
|
20
|
+
if (options.signal?.aborted)
|
|
21
|
+
abort();
|
|
22
|
+
const emit = Object.assign((emission) => options.emitSurface(emission), { exchangeLifetime: {
|
|
23
|
+
signal: controller.signal, runId: required.run.id, toolId: required.toolId, principalId: required.principal.id,
|
|
24
|
+
retry: async ({ emit: replacement, signal }) => {
|
|
25
|
+
await withinInvocation(() => execute({ ...invocation, input: structuredClone(invocation.input) }, {
|
|
26
|
+
...options, signal, emitSurface: replacement,
|
|
27
|
+
}));
|
|
28
|
+
},
|
|
29
|
+
} });
|
|
30
|
+
try {
|
|
31
|
+
return await inner.execute(required, { ...options, signal: controller.signal, emitSurface: emit });
|
|
32
|
+
}
|
|
33
|
+
finally {
|
|
34
|
+
options.signal?.removeEventListener('abort', abort);
|
|
35
|
+
controller.abort();
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
return { execute, cancel: inner.cancel.bind(inner), resumeConfirmation: inner.resumeConfirmation.bind(inner),
|
|
39
|
+
getAuditRecord: inner.getAuditRecord.bind(inner) };
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=surface-lifetime.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jini-ai/daemon",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.22",
|
|
4
4
|
"description": "The stateful agent daemon runtime: run lifecycle, durable event-log port, the tool-execution boundary, agent executor, terminal sessions, and routines.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -152,23 +152,23 @@
|
|
|
152
152
|
"@types/pg": "8.23.1",
|
|
153
153
|
"express": "^4.21.0",
|
|
154
154
|
"@types/express": "^4.17.21",
|
|
155
|
-
"@jini-ai/
|
|
156
|
-
"@jini-ai/
|
|
157
|
-
"@jini-ai/
|
|
158
|
-
"@jini-ai/core": "^0.6.
|
|
159
|
-
"@jini-ai/
|
|
160
|
-
"@jini-ai/platform": "^0.6.
|
|
161
|
-
"@jini-ai/
|
|
155
|
+
"@jini-ai/db": "0.6.19",
|
|
156
|
+
"@jini-ai/agent-runtime": "^0.6.22",
|
|
157
|
+
"@jini-ai/chat": "0.6.22",
|
|
158
|
+
"@jini-ai/core": "^0.6.22",
|
|
159
|
+
"@jini-ai/protocol": "^0.6.19",
|
|
160
|
+
"@jini-ai/platform": "^0.6.22",
|
|
161
|
+
"@jini-ai/http-kit": "0.6.22"
|
|
162
162
|
},
|
|
163
163
|
"dependencies": {
|
|
164
164
|
"smol-toml": "1.9.1",
|
|
165
165
|
"kysely": "^0.29.6",
|
|
166
|
-
"@jini-ai/core": "^0.6.
|
|
167
|
-
"@jini-ai/
|
|
168
|
-
"@jini-ai/
|
|
169
|
-
"@jini-ai/agent-runtime": "^0.6.
|
|
170
|
-
"@jini-ai/
|
|
171
|
-
"@jini-ai/http-kit": "^0.6.
|
|
166
|
+
"@jini-ai/core": "^0.6.22",
|
|
167
|
+
"@jini-ai/protocol": "^0.6.19",
|
|
168
|
+
"@jini-ai/db": "^0.6.19",
|
|
169
|
+
"@jini-ai/agent-runtime": "^0.6.22",
|
|
170
|
+
"@jini-ai/platform": "^0.6.22",
|
|
171
|
+
"@jini-ai/http-kit": "^0.6.22"
|
|
172
172
|
},
|
|
173
173
|
"peerDependencies": {
|
|
174
174
|
"node-pty": "^1.1.0",
|