@code-yeongyu/senpi-codemode 2026.11.30-5 → 2026.12.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
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2026.12.1] - 2026-12-01
|
|
4
|
+
|
|
5
|
+
### Breaking Changes
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Eval kernels (js, py, rb, jl) and their children never inherit the names listed in `<BRAND>_ENGINE_ONLY_ENV`, and while such a list is set the JS kernel always runs in its own process, whatever `isolation.js` or `SENPI_CODEMODE_JS_ISOLATION` says ([#7901](https://github.com/code-yeongyu/senpi/pull/7901))
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
### Removed
|
|
16
|
+
|
|
3
17
|
## [2026.11.30-5] - 2026-11-30
|
|
4
18
|
|
|
5
19
|
### Breaking Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-yeongyu/senpi-codemode",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.12.1",
|
|
4
4
|
"description": "Source-only senpi extension package for codemode evaluation tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@babel/parser": "8.0.4",
|
|
36
|
-
"@earendil-works/pi-ai": "npm:@code-yeongyu/senpi-ai@2026.
|
|
37
|
-
"@earendil-works/pi-realm-registry": "npm:@code-yeongyu/senpi-realm-registry@2026.
|
|
36
|
+
"@earendil-works/pi-ai": "npm:@code-yeongyu/senpi-ai@2026.12.1",
|
|
37
|
+
"@earendil-works/pi-realm-registry": "npm:@code-yeongyu/senpi-realm-registry@2026.12.1",
|
|
38
38
|
"quickjs-wasi": "3.6.2",
|
|
39
39
|
"typebox": "1.3.34"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@code-yeongyu/senpi": "2026.
|
|
42
|
+
"@code-yeongyu/senpi": "2026.12.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@code-yeongyu/senpi": "2026.
|
|
45
|
+
"@code-yeongyu/senpi": "2026.12.1"
|
|
46
46
|
},
|
|
47
47
|
"keywords": [
|
|
48
48
|
"senpi",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Static } from "typebox";
|
|
2
2
|
import { Type } from "typebox";
|
|
3
|
+
import { engineOnlyEnvActive } from "@code-yeongyu/senpi";
|
|
3
4
|
import { runtimeNameOf } from "../kernels/js/runtime-name.ts";
|
|
4
5
|
|
|
5
6
|
type Environment = Readonly<Record<string, string | undefined>>;
|
|
@@ -63,13 +64,15 @@ export interface JsIsolationHost {
|
|
|
63
64
|
/** "bun" or "node" when the host's executable is that runtime; undefined for a compiled binary. */
|
|
64
65
|
readonly executable: "bun" | "node" | undefined;
|
|
65
66
|
readonly platform: NodeJS.Platform;
|
|
67
|
+
/** The engine withholds launch-listed names (`<BRAND>_ENGINE_ONLY_ENV`) from the children it starts. */
|
|
68
|
+
readonly engineOnlyEnv?: boolean;
|
|
66
69
|
}
|
|
67
70
|
|
|
68
71
|
export function currentJsIsolationHost(
|
|
69
72
|
execPath: string = process.execPath,
|
|
70
73
|
platform: NodeJS.Platform = process.platform,
|
|
71
74
|
): JsIsolationHost {
|
|
72
|
-
return { executable: runtimeNameOf(execPath), platform };
|
|
75
|
+
return { executable: runtimeNameOf(execPath), platform, engineOnlyEnv: engineOnlyEnvActive() };
|
|
73
76
|
}
|
|
74
77
|
|
|
75
78
|
/**
|
|
@@ -109,12 +112,17 @@ export function pickFeatureSettings(input: CodemodeFeatureSettings): CodemodeFea
|
|
|
109
112
|
};
|
|
110
113
|
}
|
|
111
114
|
|
|
112
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* The environment wins over the file, the file over the host default; an unknown value is ignored. An engine that
|
|
117
|
+
* withholds engine-only names always runs the kernel in its own process: a worker or inline kernel shares the engine's
|
|
118
|
+
* process, whose launch environment (`/proc/self/environ`) still holds those names whatever its `process.env` view says.
|
|
119
|
+
*/
|
|
113
120
|
export function resolveJsIsolation(
|
|
114
121
|
settings: CodemodeFeatureSettings,
|
|
115
122
|
env: Environment = process.env,
|
|
116
123
|
host: JsIsolationHost = currentJsIsolationHost(),
|
|
117
124
|
): JsIsolation {
|
|
125
|
+
if (host.engineOnlyEnv === true) return "process";
|
|
118
126
|
const fromEnv = env[JS_ISOLATION_ENVIRONMENT_FLAG];
|
|
119
127
|
if (fromEnv === "worker" || fromEnv === "process") return fromEnv;
|
|
120
128
|
return settings.isolation?.js ?? defaultJsIsolation(host);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
activeKillGuardEnvironment,
|
|
3
|
-
|
|
3
|
+
agentChildEnvironmentOf,
|
|
4
4
|
type ExtensionContext,
|
|
5
5
|
readKillGuardSetting,
|
|
6
6
|
withBundledBunCommands,
|
|
@@ -100,8 +100,8 @@ export async function createRuntime(
|
|
|
100
100
|
const jsProcessIsolation = resolveJsIsolation(settings) === "process";
|
|
101
101
|
const artifacts = resolveSessionArtifactsDir(ctx.sessionManager.getSessionFile());
|
|
102
102
|
const activeTools = reachableToolNames(pi);
|
|
103
|
-
// Kernels and their children never see the RPC host's supervisor hand-off (senpi#5635).
|
|
104
|
-
const inheritedEnv = () =>
|
|
103
|
+
// Kernels and their children never see the RPC host's supervisor hand-off (senpi#5635) or an engine-only name.
|
|
104
|
+
const inheritedEnv = () => agentChildEnvironmentOf(process.env);
|
|
105
105
|
const writtenFiles = new WrittenFiles({
|
|
106
106
|
cwd: ctx.cwd,
|
|
107
107
|
artifactsDir: artifacts.dir,
|
|
@@ -23,7 +23,7 @@ export const SESSION_ENVIRONMENT_KEYS = [
|
|
|
23
23
|
/**
|
|
24
24
|
* The environment a kernel and its children inherit from the host: `process.env` without the RPC host's
|
|
25
25
|
* supervisor hand-off, plus the origin attribution (senpi#5635). Computed once by the extension through
|
|
26
|
-
* `
|
|
26
|
+
* `agentChildEnvironmentOf` at each spawn, so a restarted kernel sees the host env as it is then; kernels
|
|
27
27
|
* default to `process.env` when none is given.
|
|
28
28
|
*/
|
|
29
29
|
export type InheritedEnvironment = () => Readonly<Record<string, string | undefined>>;
|
|
@@ -36,7 +36,8 @@ export function inheritedEnvironmentDelta(
|
|
|
36
36
|
base: Readonly<Record<string, string | undefined>>,
|
|
37
37
|
inherited: Readonly<Record<string, string | undefined>>,
|
|
38
38
|
): { removedEnv: string[]; inheritedSet: Record<string, string> } {
|
|
39
|
-
|
|
39
|
+
// An `undefined` entry is a withheld name (an engine-only variable), removed like an absent one.
|
|
40
|
+
const removedEnv = Object.keys(base).filter((name) => inherited[name] === undefined);
|
|
40
41
|
const inheritedSet: Record<string, string> = {};
|
|
41
42
|
for (const [name, value] of Object.entries(inherited)) {
|
|
42
43
|
if (value !== undefined && base[name] !== value) inheritedSet[name] = value;
|