@oh-my-pi/pi-coding-agent 5.7.67 → 5.7.68

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/package.json +8 -7
  3. package/src/migrations.ts +1 -34
  4. package/src/vendor/photon/index.js +4 -2
  5. package/src/vendor/photon/photon_rs_bg.wasm.b64.js +1 -0
  6. package/src/core/python-executor-display.test.ts +0 -42
  7. package/src/core/python-executor-lifecycle.test.ts +0 -99
  8. package/src/core/python-executor-mapping.test.ts +0 -41
  9. package/src/core/python-executor-per-call.test.ts +0 -49
  10. package/src/core/python-executor-session.test.ts +0 -103
  11. package/src/core/python-executor-streaming.test.ts +0 -77
  12. package/src/core/python-executor-timeout.test.ts +0 -35
  13. package/src/core/python-executor.lifecycle.test.ts +0 -139
  14. package/src/core/python-executor.result.test.ts +0 -49
  15. package/src/core/python-executor.test.ts +0 -180
  16. package/src/core/python-kernel-display.test.ts +0 -54
  17. package/src/core/python-kernel-env.test.ts +0 -138
  18. package/src/core/python-kernel-session.test.ts +0 -87
  19. package/src/core/python-kernel-ws.test.ts +0 -104
  20. package/src/core/python-kernel.lifecycle.test.ts +0 -249
  21. package/src/core/python-kernel.test.ts +0 -461
  22. package/src/core/python-modules.test.ts +0 -102
  23. package/src/core/python-prelude.test.ts +0 -140
  24. package/src/core/settings-manager-python.test.ts +0 -23
  25. package/src/core/streaming-output.test.ts +0 -26
  26. package/src/core/system-prompt.python.test.ts +0 -17
  27. package/src/core/tools/index.test.ts +0 -212
  28. package/src/core/tools/python-execution.test.ts +0 -68
  29. package/src/core/tools/python-fallback.test.ts +0 -72
  30. package/src/core/tools/python-renderer.test.ts +0 -36
  31. package/src/core/tools/python-tool-mode.test.ts +0 -43
  32. package/src/core/tools/python.test.ts +0 -121
  33. package/src/core/tools/schema-validation.test.ts +0 -530
  34. package/src/core/tools/web-scrapers/academic.test.ts +0 -239
  35. package/src/core/tools/web-scrapers/business.test.ts +0 -82
  36. package/src/core/tools/web-scrapers/dev-platforms.test.ts +0 -254
  37. package/src/core/tools/web-scrapers/documentation.test.ts +0 -85
  38. package/src/core/tools/web-scrapers/finance-media.test.ts +0 -144
  39. package/src/core/tools/web-scrapers/git-hosting.test.ts +0 -272
  40. package/src/core/tools/web-scrapers/media.test.ts +0 -138
  41. package/src/core/tools/web-scrapers/package-managers-2.test.ts +0 -199
  42. package/src/core/tools/web-scrapers/package-managers.test.ts +0 -171
  43. package/src/core/tools/web-scrapers/package-registries.test.ts +0 -259
  44. package/src/core/tools/web-scrapers/research.test.ts +0 -107
  45. package/src/core/tools/web-scrapers/security.test.ts +0 -103
  46. package/src/core/tools/web-scrapers/social-extended.test.ts +0 -192
  47. package/src/core/tools/web-scrapers/social.test.ts +0 -259
  48. package/src/core/tools/web-scrapers/stackexchange.test.ts +0 -120
  49. package/src/core/tools/web-scrapers/standards.test.ts +0 -122
  50. package/src/core/tools/web-scrapers/wikipedia.test.ts +0 -73
  51. package/src/core/tools/web-scrapers/youtube.test.ts +0 -198
  52. package/src/discovery/helpers.test.ts +0 -131
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [5.7.68] - 2026-01-18
6
+ ### Changed
7
+
8
+ - Updated WASM loading to use base64-encoded WASM for better compatibility with compiled binaries
9
+
10
+ ### Fixed
11
+
12
+ - Fixed WASM loading issues in compiled binary builds
13
+
5
14
  ## [5.7.67] - 2026-01-18
6
15
  ### Changed
7
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-coding-agent",
3
- "version": "5.7.67",
3
+ "version": "5.7.68",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "ompConfig": {
@@ -32,17 +32,18 @@
32
32
  "check": "tsgo -p tsconfig.check.json",
33
33
  "clean": "rm -rf dist",
34
34
  "build": "tsgo -p tsconfig.build.json && chmod +x dist/cli.js",
35
- "build:binary": "bun build --compile ./src/cli.ts --outfile dist/omp",
35
+ "build:binary": "bun run generate-wasm-b64 && bun build --compile ./src/cli.ts --outfile dist/omp",
36
+ "generate-wasm-b64": "bun scripts/generate-wasm-b64.ts",
36
37
  "generate-template": "bun scripts/generate-template.ts",
37
- "postinstall": "[ -f scripts/generate-template.ts ] && bun run generate-template || true",
38
+ "postinstall": "[ -f scripts/generate-wasm-b64.ts ] && bun run generate-wasm-b64 && bun run generate-template || true",
38
39
  "test": "bun test",
39
40
  "prepublishOnly": "bun run generate-template && bun run clean && bun run build"
40
41
  },
41
42
  "dependencies": {
42
- "@oh-my-pi/pi-agent-core": "5.7.67",
43
- "@oh-my-pi/pi-ai": "5.7.67",
44
- "@oh-my-pi/pi-git-tool": "5.7.67",
45
- "@oh-my-pi/pi-tui": "5.7.67",
43
+ "@oh-my-pi/pi-agent-core": "5.7.68",
44
+ "@oh-my-pi/pi-ai": "5.7.68",
45
+ "@oh-my-pi/pi-git-tool": "5.7.68",
46
+ "@oh-my-pi/pi-tui": "5.7.68",
46
47
  "@openai/agents": "^0.3.7",
47
48
  "@sinclair/typebox": "^0.34.46",
48
49
  "ajv": "^8.17.1",
package/src/migrations.ts CHANGED
@@ -10,27 +10,6 @@ import { AgentStorage } from "./core/agent-storage";
10
10
  import type { AuthCredential } from "./core/auth-storage";
11
11
  import { logger } from "./core/logger";
12
12
 
13
- /**
14
- * Migrate PI_* environment variables to OMP_* equivalents.
15
- * If PI_XX is set and OMP_XX is not, set OMP_XX to PI_XX's value.
16
- * This provides backwards compatibility for users with existing PI_* env vars.
17
- *
18
- * @returns Array of PI_* env var names that were migrated
19
- */
20
- export function migrateEnvVars(): string[] {
21
- const migrated: string[] = [];
22
- for (const [key, value] of Object.entries(process.env)) {
23
- if (key.startsWith("PI_") && value !== undefined) {
24
- const ompKey = `OMP_${key.slice(3)}`; // PI_FOO -> OMP_FOO
25
- if (process.env[ompKey] === undefined) {
26
- process.env[ompKey] = value;
27
- migrated.push(key);
28
- }
29
- }
30
- }
31
- return migrated;
32
- }
33
-
34
13
  /**
35
14
  * Migrate legacy oauth.json and settings.json apiKeys to agent.db.
36
15
  *
@@ -199,24 +178,12 @@ export async function runMigrations(_cwd: string): Promise<{
199
178
  migratedAuthProviders: string[];
200
179
  deprecationWarnings: string[];
201
180
  }> {
202
- // First: migrate env vars (before anything else reads them)
203
- const migratedEnvVars = migrateEnvVars();
204
-
205
181
  // Then: run data migrations
206
182
  const migratedAuthProviders = migrateAuthToAgentDb();
207
183
  migrateSessionsFromAgentRoot();
208
184
  migrateToolsToBin();
209
185
 
210
- // Collect deprecation warnings
211
- const deprecationWarnings: string[] = [];
212
- if (migratedEnvVars.length > 0) {
213
- for (const envVar of migratedEnvVars) {
214
- const ompVar = `OMP_${envVar.slice(3)}`;
215
- deprecationWarnings.push(`${envVar} is deprecated. Use ${ompVar} instead.`);
216
- }
217
- }
218
-
219
- return { migratedAuthProviders, deprecationWarnings };
186
+ return { migratedAuthProviders, deprecationWarnings: [] };
220
187
  }
221
188
 
222
189
  /**
@@ -1,4 +1,5 @@
1
1
  /* @ts-self-types="./photon_rs.d.ts" */
2
+ import wasmBase64 from "./photon_rs_bg.wasm.b64.js";
2
3
 
3
4
  /**
4
5
  * Provides the image's height, width, and contains the image's raw pixels.
@@ -4453,7 +4454,8 @@ const cachedTextEncoder = new TextEncoder();
4453
4454
 
4454
4455
  let WASM_VECTOR_LEN = 0;
4455
4456
 
4456
- const wasmUrl = new URL('photon_rs_bg.wasm', import.meta.url);
4457
- const wasmInstantiated = await WebAssembly.instantiateStreaming(fetch(wasmUrl), __wbg_get_imports());
4457
+ // Decode base64 WASM (works in both dev and compiled binary)
4458
+ const wasmBytes = Uint8Array.from(atob(wasmBase64), c => c.charCodeAt(0));
4459
+ const wasmInstantiated = await WebAssembly.instantiate(wasmBytes, __wbg_get_imports());
4458
4460
  const wasm = wasmInstantiated.instance.exports;
4459
4461
  wasm.__wbindgen_start();