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

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 (53) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +6 -6
  3. package/package.json +8 -7
  4. package/src/migrations.ts +1 -34
  5. package/src/vendor/photon/index.js +4 -2
  6. package/src/vendor/photon/photon_rs_bg.wasm.b64.js +1 -0
  7. package/src/core/python-executor-display.test.ts +0 -42
  8. package/src/core/python-executor-lifecycle.test.ts +0 -99
  9. package/src/core/python-executor-mapping.test.ts +0 -41
  10. package/src/core/python-executor-per-call.test.ts +0 -49
  11. package/src/core/python-executor-session.test.ts +0 -103
  12. package/src/core/python-executor-streaming.test.ts +0 -77
  13. package/src/core/python-executor-timeout.test.ts +0 -35
  14. package/src/core/python-executor.lifecycle.test.ts +0 -139
  15. package/src/core/python-executor.result.test.ts +0 -49
  16. package/src/core/python-executor.test.ts +0 -180
  17. package/src/core/python-kernel-display.test.ts +0 -54
  18. package/src/core/python-kernel-env.test.ts +0 -138
  19. package/src/core/python-kernel-session.test.ts +0 -87
  20. package/src/core/python-kernel-ws.test.ts +0 -104
  21. package/src/core/python-kernel.lifecycle.test.ts +0 -249
  22. package/src/core/python-kernel.test.ts +0 -461
  23. package/src/core/python-modules.test.ts +0 -102
  24. package/src/core/python-prelude.test.ts +0 -140
  25. package/src/core/settings-manager-python.test.ts +0 -23
  26. package/src/core/streaming-output.test.ts +0 -26
  27. package/src/core/system-prompt.python.test.ts +0 -17
  28. package/src/core/tools/index.test.ts +0 -212
  29. package/src/core/tools/python-execution.test.ts +0 -68
  30. package/src/core/tools/python-fallback.test.ts +0 -72
  31. package/src/core/tools/python-renderer.test.ts +0 -36
  32. package/src/core/tools/python-tool-mode.test.ts +0 -43
  33. package/src/core/tools/python.test.ts +0 -121
  34. package/src/core/tools/schema-validation.test.ts +0 -530
  35. package/src/core/tools/web-scrapers/academic.test.ts +0 -239
  36. package/src/core/tools/web-scrapers/business.test.ts +0 -82
  37. package/src/core/tools/web-scrapers/dev-platforms.test.ts +0 -254
  38. package/src/core/tools/web-scrapers/documentation.test.ts +0 -85
  39. package/src/core/tools/web-scrapers/finance-media.test.ts +0 -144
  40. package/src/core/tools/web-scrapers/git-hosting.test.ts +0 -272
  41. package/src/core/tools/web-scrapers/media.test.ts +0 -138
  42. package/src/core/tools/web-scrapers/package-managers-2.test.ts +0 -199
  43. package/src/core/tools/web-scrapers/package-managers.test.ts +0 -171
  44. package/src/core/tools/web-scrapers/package-registries.test.ts +0 -259
  45. package/src/core/tools/web-scrapers/research.test.ts +0 -107
  46. package/src/core/tools/web-scrapers/security.test.ts +0 -103
  47. package/src/core/tools/web-scrapers/social-extended.test.ts +0 -192
  48. package/src/core/tools/web-scrapers/social.test.ts +0 -259
  49. package/src/core/tools/web-scrapers/stackexchange.test.ts +0 -120
  50. package/src/core/tools/web-scrapers/standards.test.ts +0 -122
  51. package/src/core/tools/web-scrapers/wikipedia.test.ts +0 -73
  52. package/src/core/tools/web-scrapers/youtube.test.ts +0 -198
  53. 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/README.md CHANGED
@@ -52,7 +52,7 @@ Works on Linux, macOS, and Windows (requires bash; see [Windows Setup](#windows-
52
52
  **npm (recommended):**
53
53
 
54
54
  ```bash
55
- npm install -g @oh-my-pi/omp-coding-agent
55
+ npm install -g @oh-my-pi/pi-coding-agent
56
56
  ```
57
57
 
58
58
  **Standalone binary:**
@@ -617,7 +617,7 @@ Select theme via `/settings` or set in `~/.omp/agent/settings.json`.
617
617
 
618
618
  ```bash
619
619
  mkdir -p ~/.omp/agent/themes
620
- cp $(npm root -g)/@oh-my-pi/omp-coding-agent/dist/theme/dark.json ~/.omp/agent/themes/my-theme.json
620
+ cp $(npm root -g)/@oh-my-pi/pi-coding-agent/dist/theme/dark.json ~/.omp/agent/themes/my-theme.json
621
621
  ```
622
622
 
623
623
  Select with `/settings`, then edit the file. Changes apply on save.
@@ -740,7 +740,7 @@ Hooks are TypeScript modules that extend omp's behavior by subscribing to lifecy
740
740
  **Quick example** (permission gate):
741
741
 
742
742
  ```typescript
743
- import type { HookAPI } from "@oh-my-pi/omp-coding-agent/hooks";
743
+ import type { HookAPI } from "@oh-my-pi/pi-coding-agent/hooks";
744
744
 
745
745
  export default function (omp: HookAPI) {
746
746
  omp.on("tool_call", async (event, ctx) => {
@@ -759,7 +759,7 @@ Use `omp.sendMessage(message, triggerTurn?)` to inject messages into the session
759
759
 
760
760
  ```typescript
761
761
  import * as fs from "node:fs";
762
- import type { HookAPI } from "@oh-my-pi/omp-coding-agent/hooks";
762
+ import type { HookAPI } from "@oh-my-pi/pi-coding-agent/hooks";
763
763
 
764
764
  export default function (omp: HookAPI) {
765
765
  omp.on("session_start", async () => {
@@ -802,7 +802,7 @@ Custom tools let you extend the built-in toolset (read, write, edit, bash, ...)
802
802
 
803
803
  ```typescript
804
804
  import { Type } from "@sinclair/typebox";
805
- import type { CustomToolFactory } from "@oh-my-pi/omp-coding-agent";
805
+ import type { CustomToolFactory } from "@oh-my-pi/pi-coding-agent";
806
806
 
807
807
  const factory: CustomToolFactory = (omp) => ({
808
808
  name: "greet",
@@ -970,7 +970,7 @@ For adding new tools, see [Custom Tools](#custom-tools) in the Configuration sec
970
970
  For embedding omp in Node.js/TypeScript applications, use the SDK:
971
971
 
972
972
  ```typescript
973
- import { createAgentSession, discoverAuthStorage, discoverModels, SessionManager } from "@oh-my-pi/omp-coding-agent";
973
+ import { createAgentSession, discoverAuthStorage, discoverModels, SessionManager } from "@oh-my-pi/pi-coding-agent";
974
974
 
975
975
  const authStorage = discoverAuthStorage();
976
976
  const modelRegistry = discoverModels(authStorage);
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.69",
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.69",
44
+ "@oh-my-pi/pi-ai": "5.7.69",
45
+ "@oh-my-pi/pi-git-tool": "5.7.69",
46
+ "@oh-my-pi/pi-tui": "5.7.69",
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();