@jini-ai/daemon 0.6.2 → 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
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 0.6.3 — 2026-10-13
|
|
2
|
+
|
|
3
|
+
- `createAgentExecutor` accepts `codexDisablePlugins` and `piGracefulShutdownMs`; absent, they resolve once from `hostEnv` (`CODEX_DISABLE_PLUGINS`, `PI_GRACEFUL_SHUTDOWN_MS`). Peer `@jini-ai/agent-runtime` floor is now `^0.4.7`.
|
|
4
|
+
|
|
1
5
|
## 0.6.2 — 2026-10-13
|
|
2
6
|
|
|
3
7
|
- Agent executor and host tools import `@jini-ai/platform/command` and `/process` instead of the platform root; peer `@jini-ai/platform` floor is now `^0.5.5`. No behavior change.
|
|
@@ -575,6 +575,10 @@ export interface CreateAgentExecutorOptions {
|
|
|
575
575
|
/** Host environment snapshot; baseline spawn keys and source config paths are allowlisted. */
|
|
576
576
|
readonly hostEnv?: NodeJS.ProcessEnv;
|
|
577
577
|
readonly runtimeState?: AgentRuntimeState;
|
|
578
|
+
/** Host policy; native executor composition resolves its env default when absent. */
|
|
579
|
+
readonly codexDisablePlugins?: boolean;
|
|
580
|
+
/** Post-completion pi RPC grace period, resolved once at native composition. */
|
|
581
|
+
readonly piGracefulShutdownMs?: number;
|
|
578
582
|
readonly lifecycle: RunLifecycle;
|
|
579
583
|
/** Resolves/pins the concrete starting model against the actual launch scope. */
|
|
580
584
|
readonly resolveModelForLaunch?: typeof resolveModelForLaunch;
|
|
@@ -379,6 +379,6 @@ export declare function confirmChildSpawned({ input, deps }: {
|
|
|
379
379
|
* @complexity `run()`'s own setup is O(1); steady-state cost is the chosen stream parser's.
|
|
380
380
|
* @overallScore 100/100
|
|
381
381
|
*/
|
|
382
|
-
export declare function createAgentExecutor(requiredArgs: Pick<CreateAgentExecutorOptions, "lifecycle">, optionalArgs?: Pick<CreateAgentExecutorOptions, "runtimeState" | "hostEnv" | "getAgentDef" | "resolveAgentLaunch" | "resolveModelForLaunch" | "ensureAgentCapabilities" | "applyAgentLaunchEnv" | "createCommandInvocation" | "spawn" | "attachAcpSession" | "acpPermissionHandler" | "attachPiRpcSession" | "preparePromptFileForAgent" | "prepareAgentLogFile" | "listProcessSnapshots" | "collectProcessTreePids" | "stopProcesses" | "onCleanupFailure" | "journal" | "continuation" | "classifyFailure" | "mcpJsonInjection" | "claudeConfigDirIsolation" | "claudeConfigDirIsolationEnabled" | "bufferedStdoutMaxBytes" | "promptAugmenter">): AgentExecutor;
|
|
382
|
+
export declare function createAgentExecutor(requiredArgs: Pick<CreateAgentExecutorOptions, "lifecycle">, optionalArgs?: Pick<CreateAgentExecutorOptions, "runtimeState" | "codexDisablePlugins" | "piGracefulShutdownMs" | "hostEnv" | "getAgentDef" | "resolveAgentLaunch" | "resolveModelForLaunch" | "ensureAgentCapabilities" | "applyAgentLaunchEnv" | "createCommandInvocation" | "spawn" | "attachAcpSession" | "acpPermissionHandler" | "attachPiRpcSession" | "preparePromptFileForAgent" | "prepareAgentLogFile" | "listProcessSnapshots" | "collectProcessTreePids" | "stopProcesses" | "onCleanupFailure" | "journal" | "continuation" | "classifyFailure" | "mcpJsonInjection" | "claudeConfigDirIsolation" | "claudeConfigDirIsolationEnabled" | "bufferedStdoutMaxBytes" | "promptAugmenter">): AgentExecutor;
|
|
383
383
|
export {};
|
|
384
384
|
//# sourceMappingURL=launch.d.ts.map
|
|
@@ -179,13 +179,18 @@ function resolveAgentRuntimeDeps(options) {
|
|
|
179
179
|
return {
|
|
180
180
|
getAgentDef: (input) => {
|
|
181
181
|
const def = lookupDef(input);
|
|
182
|
-
|
|
182
|
+
// Without owned state, only an enabled plugin policy needs binding; otherwise keep the published definition.
|
|
183
|
+
if (!def || (!options.runtimeState && !options.codexDisablePlugins))
|
|
184
|
+
return def;
|
|
185
|
+
return bindRuntimeAgentDef({ def, state: options.runtimeState ?? defaultRuntimeState }, options.codexDisablePlugins ? { codexDisablePlugins: true } : {});
|
|
183
186
|
},
|
|
184
187
|
resolveAgentLaunch: options.resolveAgentLaunch ?? ((input, optional = {}) => resolveAgentLaunch(input, { ...optional, ...runtimeOptions, ...envOptions })),
|
|
185
188
|
ensureAgentCapabilities: options.ensureAgentCapabilities ?? ((input) => ensureAgentCapabilities(input, runtimeOptions)),
|
|
186
189
|
applyAgentLaunchEnv: options.applyAgentLaunchEnv ?? ((input, optional = {}) => applyAgentLaunchEnv(input, { appendPathDirs: userToolchainBinDirs({}, { ...runtimeOptions, ...envOptions }), ...optional })),
|
|
187
190
|
attachAcpSession: options.attachAcpSession ?? attachAcpSession,
|
|
188
|
-
attachPiRpcSession: options.attachPiRpcSession ?? attachPiRpcSession,
|
|
191
|
+
attachPiRpcSession: (required, optional = {}) => (options.attachPiRpcSession ?? attachPiRpcSession)(required, {
|
|
192
|
+
...optional, ...(options.piGracefulShutdownMs !== undefined ? { gracefulShutdownMs: options.piGracefulShutdownMs } : {}),
|
|
193
|
+
}),
|
|
189
194
|
preparePromptFileForAgent: options.preparePromptFileForAgent ?? preparePromptFileForAgent,
|
|
190
195
|
prepareAgentLogFile: options.prepareAgentLogFile ?? prepareAgentLogFile,
|
|
191
196
|
};
|
|
@@ -628,7 +633,12 @@ export async function confirmChildSpawned({ input, deps }) {
|
|
|
628
633
|
* @overallScore 100/100
|
|
629
634
|
*/
|
|
630
635
|
export function createAgentExecutor(requiredArgs, optionalArgs = {}) {
|
|
631
|
-
|
|
636
|
+
// This native composition boundary resolves ambient defaults once, before allowlisting child env.
|
|
637
|
+
const env = optionalArgs.hostEnv ?? process.env;
|
|
638
|
+
const options = { ...requiredArgs, ...optionalArgs,
|
|
639
|
+
codexDisablePlugins: optionalArgs.codexDisablePlugins ?? (env.CODEX_DISABLE_PLUGINS === '1'),
|
|
640
|
+
piGracefulShutdownMs: optionalArgs.piGracefulShutdownMs ?? (Number(env.PI_GRACEFUL_SHUTDOWN_MS) || 5000),
|
|
641
|
+
};
|
|
632
642
|
const lifecycle = options.lifecycle;
|
|
633
643
|
const hostEnv = selectAgentExecutorHostEnv({ env: options.hostEnv ?? process.env }, options.runtimeState ? { runtimeState: options.runtimeState } : {});
|
|
634
644
|
const { getAgentDef: getAgentDefFn, resolveAgentLaunch: resolveAgentLaunchFn, ensureAgentCapabilities: ensureAgentCapabilitiesFn, applyAgentLaunchEnv: applyAgentLaunchEnvFn, attachAcpSession: attachAcpSessionFn, attachPiRpcSession: attachPiRpcSessionFn, preparePromptFileForAgent: preparePromptFileForAgentFn, prepareAgentLogFile: prepareAgentLogFileFn, } = resolveAgentRuntimeDeps({ ...options, hostEnv });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jini-ai/daemon",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
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": {
|
|
@@ -140,12 +140,12 @@
|
|
|
140
140
|
"express": "^4.21.0",
|
|
141
141
|
"@types/express": "^4.17.21",
|
|
142
142
|
"@jini-ai/http-kit": "0.4.1",
|
|
143
|
+
"@jini-ai/agent-runtime": "^0.4.7",
|
|
143
144
|
"@jini-ai/chat": "0.5.8",
|
|
144
|
-
"@jini-ai/agent-runtime": "^0.4.6",
|
|
145
145
|
"@jini-ai/core": "^0.4.4",
|
|
146
|
-
"@jini-ai/db": "0.3.3",
|
|
147
146
|
"@jini-ai/platform": "^0.5.5",
|
|
148
|
-
"@jini-ai/protocol": "^0.4.4"
|
|
147
|
+
"@jini-ai/protocol": "^0.4.4",
|
|
148
|
+
"@jini-ai/db": "0.3.3"
|
|
149
149
|
},
|
|
150
150
|
"dependencies": {
|
|
151
151
|
"@jini-ai/core": "^0.4.4",
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
"pg": "^8.23.0",
|
|
161
161
|
"@jini-ai/http-kit": "^0.4.0",
|
|
162
162
|
"express": "^4.21.0",
|
|
163
|
-
"@jini-ai/agent-runtime": "^0.4.
|
|
163
|
+
"@jini-ai/agent-runtime": "^0.4.7",
|
|
164
164
|
"@jini-ai/platform": "^0.5.5"
|
|
165
165
|
},
|
|
166
166
|
"peerDependenciesMeta": {
|