@code-yeongyu/senpi-codemode 2026.8.11-3 → 2026.8.11-5

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
@@ -12,6 +12,35 @@
12
12
 
13
13
  ### Removed
14
14
 
15
+ ## [2026.8.11-5] - 2026-08-11
16
+
17
+ ### Breaking Changes
18
+
19
+ ### Added
20
+
21
+ ### Changed
22
+
23
+ ### Fixed
24
+
25
+ ### Removed
26
+
27
+ ## [2026.8.11-4] - 2026-08-11
28
+
29
+ ### Breaking Changes
30
+
31
+ ### Added
32
+
33
+ ### Changed
34
+
35
+ ### Fixed
36
+
37
+ - Ruby and Julia `eval` kernels launched from standalone Bun binaries now
38
+ resolve their external runner files from the shipped codemode sidecar when
39
+ the embedded `$bunfs` module path has no physical asset
40
+ ([#818](https://github.com/code-yeongyu/senpi/pull/818)).
41
+
42
+ ### Removed
43
+
15
44
  ## [2026.8.11-3] - 2026-08-11
16
45
 
17
46
  ### Breaking Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/senpi-codemode",
3
- "version": "2026.8.11-3",
3
+ "version": "2026.8.11-5",
4
4
  "description": "Source-only senpi extension package for codemode evaluation tools",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -30,14 +30,14 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@babel/parser": "8.0.4",
33
- "@earendil-works/pi-ai": "npm:@code-yeongyu/senpi-ai@2026.8.11-3",
33
+ "@earendil-works/pi-ai": "npm:@code-yeongyu/senpi-ai@2026.8.11-5",
34
34
  "typebox": "1.3.8"
35
35
  },
36
36
  "peerDependencies": {
37
- "@code-yeongyu/senpi": "2026.8.11-3"
37
+ "@code-yeongyu/senpi": "2026.8.11-5"
38
38
  },
39
39
  "devDependencies": {
40
- "@code-yeongyu/senpi": "2026.8.11-3"
40
+ "@code-yeongyu/senpi": "2026.8.11-5"
41
41
  },
42
42
  "keywords": [
43
43
  "senpi",
@@ -1,5 +1,6 @@
1
1
  import { join } from "node:path";
2
2
  import type { BridgeConnectionConfig, KernelToHostMessage } from "../../bridge/protocol.ts";
3
+ import { type CodemodeRuntimeAssetEnvironment, resolveCodemodeRuntimeAsset } from "../shared/runtime-asset.ts";
3
4
  import { SubprocessKernel, type SubprocessSpawn } from "../shared/subprocess-kernel.ts";
4
5
 
5
6
  export interface JuliaKernelStartOptions {
@@ -11,6 +12,18 @@ export interface JuliaKernelStartOptions {
11
12
  readonly onMessage?: (message: KernelToHostMessage) => void;
12
13
  }
13
14
 
15
+ export interface JuliaRunnerPathOptions extends CodemodeRuntimeAssetEnvironment {
16
+ readonly localPath?: string;
17
+ }
18
+
19
+ export function resolveJuliaRunnerPath(options: JuliaRunnerPathOptions = {}): string {
20
+ return resolveCodemodeRuntimeAsset(
21
+ options.localPath ?? join(import.meta.dirname, "runner.jl"),
22
+ join("kernels", "jl", "runner.jl"),
23
+ options,
24
+ );
25
+ }
26
+
14
27
  export class JuliaKernel extends SubprocessKernel {
15
28
  static start(options: JuliaKernelStartOptions): JuliaKernel {
16
29
  return new JuliaKernel({
@@ -25,7 +38,7 @@ export class JuliaKernel extends SubprocessKernel {
25
38
  "--color=no",
26
39
  "--compile=min",
27
40
  "--optimize=0",
28
- join(import.meta.dirname, "runner.jl"),
41
+ resolveJuliaRunnerPath(),
29
42
  ],
30
43
  cwd: options.cwd,
31
44
  sessionId: options.sessionId,
@@ -1,5 +1,6 @@
1
1
  import { join } from "node:path";
2
2
  import type { BridgeConnectionConfig, KernelToHostMessage } from "../../bridge/protocol.ts";
3
+ import { type CodemodeRuntimeAssetEnvironment, resolveCodemodeRuntimeAsset } from "../shared/runtime-asset.ts";
3
4
  import { SubprocessKernel, type SubprocessSpawn } from "../shared/subprocess-kernel.ts";
4
5
 
5
6
  export interface RubyKernelStartOptions {
@@ -11,11 +12,23 @@ export interface RubyKernelStartOptions {
11
12
  readonly onMessage?: (message: KernelToHostMessage) => void;
12
13
  }
13
14
 
15
+ export interface RubyRunnerPathOptions extends CodemodeRuntimeAssetEnvironment {
16
+ readonly localPath?: string;
17
+ }
18
+
19
+ export function resolveRubyRunnerPath(options: RubyRunnerPathOptions = {}): string {
20
+ return resolveCodemodeRuntimeAsset(
21
+ options.localPath ?? join(import.meta.dirname, "runner.rb"),
22
+ join("kernels", "rb", "runner.rb"),
23
+ options,
24
+ );
25
+ }
26
+
14
27
  export class RubyKernel extends SubprocessKernel {
15
28
  static start(options: RubyKernelStartOptions): RubyKernel {
16
29
  return new RubyKernel({
17
30
  command: options.command ?? "ruby",
18
- args: [join(import.meta.dirname, "runner.rb")],
31
+ args: [resolveRubyRunnerPath()],
19
32
  cwd: options.cwd,
20
33
  sessionId: options.sessionId,
21
34
  connection: options.connection,
@@ -0,0 +1,31 @@
1
+ import { existsSync } from "node:fs";
2
+ import { dirname, join } from "node:path";
3
+
4
+ export interface CodemodeRuntimeAssetEnvironment {
5
+ readonly bunVersion?: string;
6
+ readonly executablePath?: string;
7
+ }
8
+
9
+ export function resolveCodemodeRuntimeAsset(
10
+ localPath: string,
11
+ packageRelativePath: string,
12
+ { bunVersion = process.versions.bun, executablePath = process.execPath }: CodemodeRuntimeAssetEnvironment = {},
13
+ ): string {
14
+ if (existsSync(localPath)) {
15
+ return localPath;
16
+ }
17
+ if (bunVersion) {
18
+ const sidecarPath = join(
19
+ dirname(executablePath),
20
+ "node_modules",
21
+ "@code-yeongyu",
22
+ "senpi-codemode",
23
+ "src",
24
+ packageRelativePath,
25
+ );
26
+ if (existsSync(sidecarPath)) {
27
+ return sidecarPath;
28
+ }
29
+ }
30
+ return localPath;
31
+ }