@jini-ai/server 0.6.1 → 0.6.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.
- package/CHANGELOG.md +8 -0
- package/dist/builtin-features.js +2 -2
- package/dist/compose-jini-kernel.js +1 -1
- package/dist/create-local-node-daemon.d.ts +3 -1
- package/dist/create-local-node-daemon.js +1 -0
- package/dist/kernel-base.d.ts +3 -0
- package/dist/kernel-base.js +18 -2
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 0.6.3 — 2026-10-14
|
|
2
|
+
|
|
3
|
+
- Express 5 accepted: the optional `express` peer is now `^4.21.0 || ^5.0.0` (1442d875), so an Express 5 host no longer hits ERESOLVE.
|
|
4
|
+
|
|
5
|
+
## 0.6.2 — 2026-10-13
|
|
6
|
+
|
|
7
|
+
- Widen the optional `@jini-ai/chat` peer to `^0.5.8 || ^0.6.0` (it rejected the published chat 0.6.0).
|
|
8
|
+
|
|
1
9
|
## 0.5.1 — 2026-10-08
|
|
2
10
|
|
|
3
11
|
- Align pack contributions, bindings, HTTP mounting, retry classification, executor settings and
|
package/dist/builtin-features.js
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
import { statSync } from 'node:fs';
|
|
20
20
|
import { createRequire } from 'node:module';
|
|
21
21
|
import { definePack } from '@jini-ai/core';
|
|
22
|
-
import {
|
|
22
|
+
import { getAgentDef } from '@jini-ai/agent-runtime';
|
|
23
23
|
import { createDefaultRunStartHandler, createRemoteToolEventRecorder, isAgentExecutorSupported, createTerminalSessionManager, createTerminalToolRegistrations, } from '@jini-ai/daemon';
|
|
24
24
|
import { ensureToolCatalogTables, getToolCatalogEntry, reseedToolCatalog, searchToolCatalog, } from '@jini-ai/registry/tool-catalog/sqlite';
|
|
25
25
|
import { inspectSqliteDatabase, verifySqliteIntegrity } from '@jini-ai/db/sqlite';
|
|
@@ -247,7 +247,7 @@ export function createBuiltInFeatures(options = {}) {
|
|
|
247
247
|
compose: (context) => {
|
|
248
248
|
// Promise-cached so concurrent clients never spawn duplicate probe sets; invalidated by
|
|
249
249
|
// POST /api/agents/rescan.
|
|
250
|
-
const detector = options.agents?.detector ?? ((force) => detectAgents({}, { force }));
|
|
250
|
+
const detector = options.agents?.detector ?? ((force) => context.kernel.agentRuntime.detectAgents({}, { force }));
|
|
251
251
|
let scan = null;
|
|
252
252
|
let expiresAt = 0;
|
|
253
253
|
const scanAgents = (force) => {
|
|
@@ -86,7 +86,7 @@ export async function composeJiniKernel(config) {
|
|
|
86
86
|
});
|
|
87
87
|
const base = await createJiniKernelBase({
|
|
88
88
|
storage: config.storage,
|
|
89
|
-
|
|
89
|
+
agentExecutor: { ...config.agentExecutor, hostEnv: config.agentExecutor?.hostEnv ?? env },
|
|
90
90
|
});
|
|
91
91
|
const composed = [];
|
|
92
92
|
let featureDaemon = { services: {} };
|
|
@@ -7,7 +7,7 @@ import type { AnyPack, MissingTokenIds } from '@jini-ai/core/composition';
|
|
|
7
7
|
import type { ResolveRunInput, RunLifecycle } from '@jini-ai/daemon';
|
|
8
8
|
import { type AdapterContext } from '@jini-ai/http-kit';
|
|
9
9
|
import type { DelegatedToolExecuteRequest, RunStartHandler, WorkspaceRootResolver } from '@jini-ai/daemon/http';
|
|
10
|
-
import { type JiniKernelSecurity, type KernelBoundIds } from './compose-jini-kernel.js';
|
|
10
|
+
import { composeJiniKernel, type JiniKernelSecurity, type KernelBoundIds } from './compose-jini-kernel.js';
|
|
11
11
|
import type { CapabilityId, JiniProfileId } from './feature.js';
|
|
12
12
|
export { buildDaemonDbOperations, projectDetectedAgent } from './builtin-features.js';
|
|
13
13
|
export { classifyRunFailureForRetry } from './kernel-base.js';
|
|
@@ -89,6 +89,8 @@ export interface CreateLocalNodeDaemonConfig<Packs extends readonly AnyPack[], B
|
|
|
89
89
|
onShutdown?: () => Promise<void> | void;
|
|
90
90
|
/** Defaults to `process.env`. */
|
|
91
91
|
env?: NodeJS.ProcessEnv;
|
|
92
|
+
/** Bind the preset and custom run handlers to the same owned runtime and explicit policies. */
|
|
93
|
+
agentExecutor?: Parameters<typeof composeJiniKernel>[0]['agentExecutor'];
|
|
92
94
|
/** Optional detector override for a host with custom PATH/env policy or a deterministic test fixture. */
|
|
93
95
|
agentDetector?: () => Promise<readonly DetectedAgent[]>;
|
|
94
96
|
/**
|
|
@@ -130,6 +130,7 @@ export async function createLocalNodeDaemon(config) {
|
|
|
130
130
|
},
|
|
131
131
|
},
|
|
132
132
|
env,
|
|
133
|
+
...(config.agentExecutor ? { agentExecutor: config.agentExecutor } : {}),
|
|
133
134
|
featureOptions: {
|
|
134
135
|
health: { getVersion: () => packageVersion, isShuttingDown: () => shuttingDown },
|
|
135
136
|
runs: {
|
package/dist/kernel-base.d.ts
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* borrowing by features, is what makes the feature set genuinely independent.
|
|
15
15
|
*/
|
|
16
16
|
import { type SqliteDb, type SqliteSyncOpener } from '@jini-ai/db/sqlite';
|
|
17
|
+
import { type NativeAgentRuntime } from '@jini-ai/agent-runtime';
|
|
17
18
|
import { type ToolRegistry } from '@jini-ai/core';
|
|
18
19
|
import { createAgentExecutor, type AgentExecutor, type EventLog, type RunLifecycle, type RunRetrySideEffectState, type ToolExecutor } from '@jini-ai/daemon';
|
|
19
20
|
/** Where a composition's durable state lives. */
|
|
@@ -50,6 +51,8 @@ export interface JiniKernelBase {
|
|
|
50
51
|
readonly journalEventLog: ClosableEventLog;
|
|
51
52
|
readonly lifecycle: RunLifecycle;
|
|
52
53
|
readonly agentExecutor: AgentExecutor;
|
|
54
|
+
/** One runtime shared by this kernel's discovery and executor paths. */
|
|
55
|
+
readonly agentRuntime: NativeAgentRuntime;
|
|
53
56
|
/** The single registry every active feature's tools land in, and the only one `toolExecutor` reads. */
|
|
54
57
|
readonly registry: ToolRegistry;
|
|
55
58
|
readonly toolExecutor: ToolExecutor;
|
package/dist/kernel-base.js
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { openSqliteConnection } from '@jini-ai/db/sqlite';
|
|
17
17
|
import { join } from 'node:path';
|
|
18
|
+
import { createNativeAgentRuntime } from '@jini-ai/agent-runtime';
|
|
18
19
|
import { createToolRegistry } from '@jini-ai/core';
|
|
19
20
|
import { createAgentExecutor, createInMemoryEventLog, createRunByteJournal, createRunLifecycle, createToolExecutor, resumableFromProcessExit, } from '@jini-ai/daemon';
|
|
20
21
|
import { openSqliteEventLog } from '@jini-ai/daemon/store/event-log/sqlite';
|
|
@@ -89,8 +90,17 @@ export async function createJiniKernelBase(options) {
|
|
|
89
90
|
await Promise.allSettled(opened.map((log) => log.close?.({})));
|
|
90
91
|
throw error;
|
|
91
92
|
}
|
|
93
|
+
const agentRuntime = createNativeAgentRuntime({ env: options.agentExecutor?.hostEnv ?? process.env }, {
|
|
94
|
+
...(options.agentExecutor?.runtimeState ? { state: options.agentExecutor.runtimeState } : {}),
|
|
95
|
+
...(options.agentExecutor?.codexDisablePlugins !== undefined ? { codexDisablePlugins: options.agentExecutor.codexDisablePlugins } : {}),
|
|
96
|
+
...(options.agentExecutor?.piGracefulShutdownMs !== undefined ? { piGracefulShutdownMs: options.agentExecutor.piGracefulShutdownMs } : {}),
|
|
97
|
+
});
|
|
92
98
|
const agentExecutor = createAgentExecutor({ lifecycle }, {
|
|
93
99
|
...options.agentExecutor,
|
|
100
|
+
runtimeState: agentRuntime.state,
|
|
101
|
+
hostEnv: agentRuntime.hostEnv,
|
|
102
|
+
codexDisablePlugins: agentRuntime.codexDisablePlugins,
|
|
103
|
+
piGracefulShutdownMs: agentRuntime.piGracefulShutdownMs,
|
|
94
104
|
journal,
|
|
95
105
|
classifyFailure: classifyRunFailureForRetry,
|
|
96
106
|
});
|
|
@@ -106,16 +116,22 @@ export async function createJiniKernelBase(options) {
|
|
|
106
116
|
journalEventLog,
|
|
107
117
|
lifecycle,
|
|
108
118
|
agentExecutor,
|
|
119
|
+
agentRuntime,
|
|
109
120
|
registry,
|
|
110
121
|
toolExecutor,
|
|
111
122
|
sqlite,
|
|
112
123
|
close() {
|
|
113
124
|
closed ??= (async () => {
|
|
114
125
|
try {
|
|
115
|
-
|
|
126
|
+
await agentRuntime.dispose({});
|
|
116
127
|
}
|
|
117
128
|
finally {
|
|
118
|
-
|
|
129
|
+
try {
|
|
130
|
+
sqlite?.connection.close();
|
|
131
|
+
}
|
|
132
|
+
finally {
|
|
133
|
+
await Promise.all([eventLog.close?.({}), journalEventLog.close?.({})]);
|
|
134
|
+
}
|
|
119
135
|
}
|
|
120
136
|
})();
|
|
121
137
|
return closed;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jini-ai/server",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -65,27 +65,27 @@
|
|
|
65
65
|
"@vitest/coverage-v8": "^2.1.9",
|
|
66
66
|
"better-sqlite3": "^13.0.0",
|
|
67
67
|
"express": "^4.21.0",
|
|
68
|
-
"@jini-ai/
|
|
69
|
-
"@jini-ai/
|
|
70
|
-
"@jini-ai/
|
|
71
|
-
"@jini-ai/
|
|
72
|
-
"@jini-ai/
|
|
73
|
-
"@jini-ai/core": "0.4.
|
|
74
|
-
"@jini-ai/
|
|
75
|
-
"@jini-ai/
|
|
68
|
+
"@jini-ai/sidecar": "0.4.3",
|
|
69
|
+
"@jini-ai/daemon": "0.6.5",
|
|
70
|
+
"@jini-ai/db": "0.3.4",
|
|
71
|
+
"@jini-ai/agent-runtime": "0.4.11",
|
|
72
|
+
"@jini-ai/registry": "0.5.2",
|
|
73
|
+
"@jini-ai/core": "0.4.6",
|
|
74
|
+
"@jini-ai/http-kit": "0.4.2",
|
|
75
|
+
"@jini-ai/chat": "0.6.2"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@jini-ai/core": "^0.4.
|
|
78
|
+
"@jini-ai/core": "^0.4.6"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"better-sqlite3": "^13.0.0",
|
|
82
|
-
"@jini-ai/agent-runtime": "^0.4.
|
|
82
|
+
"@jini-ai/agent-runtime": "^0.4.7",
|
|
83
83
|
"@jini-ai/daemon": "^0.6.1",
|
|
84
84
|
"@jini-ai/http-kit": "^0.4.0",
|
|
85
85
|
"@jini-ai/sidecar": "^0.4.0",
|
|
86
|
-
"express": "^4.21.0",
|
|
86
|
+
"express": "^4.21.0 || ^5.0.0",
|
|
87
87
|
"@jini-ai/db": "^0.3.2",
|
|
88
|
-
"@jini-ai/chat": "^0.5.8",
|
|
88
|
+
"@jini-ai/chat": "^0.5.8 || ^0.6.0",
|
|
89
89
|
"@jini-ai/registry": "^0.5.1"
|
|
90
90
|
},
|
|
91
91
|
"peerDependenciesMeta": {
|