@heidi-dang/oh-my-opencode 3.12.4 → 3.12.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.
Files changed (2) hide show
  1. package/dist/cli/index.js +49 -16
  2. package/package.json +15 -15
package/dist/cli/index.js CHANGED
@@ -8633,7 +8633,7 @@ var {
8633
8633
  // package.json
8634
8634
  var package_default = {
8635
8635
  name: "@heidi-dang/oh-my-opencode",
8636
- version: "3.12.4",
8636
+ version: "3.12.5",
8637
8637
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
8638
8638
  main: "dist/index.js",
8639
8639
  types: "dist/index.d.ts",
@@ -8699,27 +8699,27 @@ var package_default = {
8699
8699
  picocolors: "^1.1.1",
8700
8700
  picomatch: "^4.0.2",
8701
8701
  "vscode-jsonrpc": "^8.2.0",
8702
- zod: "^4.1.8"
8702
+ zod: "^4.1.8",
8703
+ playwright: "^1.58.2"
8703
8704
  },
8704
8705
  devDependencies: {
8705
8706
  "@types/js-yaml": "^4.0.9",
8706
8707
  "@types/picomatch": "^3.0.2",
8707
8708
  "bun-types": "1.3.6",
8708
- typescript: "^5.7.3",
8709
- playwright: "^1.58.2"
8709
+ typescript: "^5.7.3"
8710
8710
  },
8711
8711
  optionalDependencies: {
8712
- "@heidi-dang/oh-my-opencode-darwin-arm64": "3.12.4",
8713
- "@heidi-dang/oh-my-opencode-darwin-x64": "3.12.4",
8714
- "@heidi-dang/oh-my-opencode-darwin-x64-baseline": "3.12.4",
8715
- "@heidi-dang/oh-my-opencode-linux-arm64": "3.12.4",
8716
- "@heidi-dang/oh-my-opencode-linux-arm64-musl": "3.12.4",
8717
- "@heidi-dang/oh-my-opencode-linux-x64": "3.12.4",
8718
- "@heidi-dang/oh-my-opencode-linux-x64-baseline": "3.12.4",
8719
- "@heidi-dang/oh-my-opencode-linux-x64-musl": "3.12.4",
8720
- "@heidi-dang/oh-my-opencode-linux-x64-musl-baseline": "3.12.4",
8721
- "@heidi-dang/oh-my-opencode-windows-x64": "3.12.4",
8722
- "@heidi-dang/oh-my-opencode-windows-x64-baseline": "3.12.4"
8712
+ "@heidi-dang/oh-my-opencode-darwin-arm64": "3.12.5",
8713
+ "@heidi-dang/oh-my-opencode-darwin-x64": "3.12.5",
8714
+ "@heidi-dang/oh-my-opencode-darwin-x64-baseline": "3.12.5",
8715
+ "@heidi-dang/oh-my-opencode-linux-arm64": "3.12.5",
8716
+ "@heidi-dang/oh-my-opencode-linux-arm64-musl": "3.12.5",
8717
+ "@heidi-dang/oh-my-opencode-linux-x64": "3.12.5",
8718
+ "@heidi-dang/oh-my-opencode-linux-x64-baseline": "3.12.5",
8719
+ "@heidi-dang/oh-my-opencode-linux-x64-musl": "3.12.5",
8720
+ "@heidi-dang/oh-my-opencode-linux-x64-musl-baseline": "3.12.5",
8721
+ "@heidi-dang/oh-my-opencode-windows-x64": "3.12.5",
8722
+ "@heidi-dang/oh-my-opencode-windows-x64-baseline": "3.12.5"
8723
8723
  },
8724
8724
  overrides: {
8725
8725
  "@opencode-ai/sdk": "^1.2.17"
@@ -29432,6 +29432,28 @@ var import_picocolors23 = __toESM(require_picocolors(), 1);
29432
29432
  import { writeFileSync as writeFileSync12, mkdirSync as mkdirSync8, existsSync as existsSync30 } from "fs";
29433
29433
  import { join as join29, dirname as dirname11 } from "path";
29434
29434
  import * as os5 from "os";
29435
+ import { createRequire as createRequire2 } from "module";
29436
+ async function resolvePlaywright() {
29437
+ try {
29438
+ return await import("playwright");
29439
+ } catch (e2) {}
29440
+ const binaryDir = dirname11(process.execPath);
29441
+ let currentDir = binaryDir;
29442
+ for (let i2 = 0;i2 < 6; i2++) {
29443
+ const potentialPath = join29(currentDir, "node_modules", "playwright");
29444
+ if (existsSync30(potentialPath)) {
29445
+ try {
29446
+ const require2 = createRequire2(join29(currentDir, "index.js"));
29447
+ return require2("playwright");
29448
+ } catch (e2) {}
29449
+ }
29450
+ const parent = dirname11(currentDir);
29451
+ if (parent === currentDir)
29452
+ break;
29453
+ currentDir = parent;
29454
+ }
29455
+ throw new Error("Cannot find package 'playwright'. Please ensure it's installed via 'npm install -g @heidi-dang/oh-my-opencode'.");
29456
+ }
29435
29457
  async function masterLogin(options) {
29436
29458
  const configPath = join29(os5.homedir(), ".ygka_config.json");
29437
29459
  if (existsSync30(configPath) && !options.force) {
@@ -29439,10 +29461,21 @@ async function masterLogin(options) {
29439
29461
  console.log(import_picocolors23.default.dim("YGKA config already exists. Use --force to overwrite."));
29440
29462
  return 0;
29441
29463
  }
29464
+ let playwrightModule;
29465
+ try {
29466
+ playwrightModule = await resolvePlaywright();
29467
+ } catch (err) {
29468
+ console.error(import_picocolors23.default.red(`
29469
+ [error] Playwright not found.`));
29470
+ console.log(import_picocolors23.default.dim("This command requires Playwright to automate the login process."));
29471
+ console.log(import_picocolors23.default.dim("Please try running: npm install -g @heidi-dang/oh-my-opencode"));
29472
+ console.log(import_picocolors23.default.dim(`Diagnostic: looked for 'playwright' in ${dirname11(process.execPath)} and parents.`));
29473
+ return 1;
29474
+ }
29442
29475
  console.log(import_picocolors23.default.cyan("\uD83D\uDE80 Launching browser for ChatGPT login..."));
29443
29476
  console.log(import_picocolors23.default.dim("Please log in to chat.openai.com in the window that appears."));
29444
29477
  console.log(import_picocolors23.default.dim("Once logged in, return here. I will automatically detect the session."));
29445
- const { chromium } = await import("playwright");
29478
+ const { chromium } = playwrightModule;
29446
29479
  const browser = await chromium.launch({ headless: false });
29447
29480
  const context = await browser.newContext();
29448
29481
  const page = await context.newPage();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heidi-dang/oh-my-opencode",
3
- "version": "3.12.4",
3
+ "version": "3.12.5",
4
4
  "description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -66,27 +66,27 @@
66
66
  "picocolors": "^1.1.1",
67
67
  "picomatch": "^4.0.2",
68
68
  "vscode-jsonrpc": "^8.2.0",
69
- "zod": "^4.1.8"
69
+ "zod": "^4.1.8",
70
+ "playwright": "^1.58.2"
70
71
  },
71
72
  "devDependencies": {
72
73
  "@types/js-yaml": "^4.0.9",
73
74
  "@types/picomatch": "^3.0.2",
74
75
  "bun-types": "1.3.6",
75
- "typescript": "^5.7.3",
76
- "playwright": "^1.58.2"
76
+ "typescript": "^5.7.3"
77
77
  },
78
78
  "optionalDependencies": {
79
- "@heidi-dang/oh-my-opencode-darwin-arm64": "3.12.4",
80
- "@heidi-dang/oh-my-opencode-darwin-x64": "3.12.4",
81
- "@heidi-dang/oh-my-opencode-darwin-x64-baseline": "3.12.4",
82
- "@heidi-dang/oh-my-opencode-linux-arm64": "3.12.4",
83
- "@heidi-dang/oh-my-opencode-linux-arm64-musl": "3.12.4",
84
- "@heidi-dang/oh-my-opencode-linux-x64": "3.12.4",
85
- "@heidi-dang/oh-my-opencode-linux-x64-baseline": "3.12.4",
86
- "@heidi-dang/oh-my-opencode-linux-x64-musl": "3.12.4",
87
- "@heidi-dang/oh-my-opencode-linux-x64-musl-baseline": "3.12.4",
88
- "@heidi-dang/oh-my-opencode-windows-x64": "3.12.4",
89
- "@heidi-dang/oh-my-opencode-windows-x64-baseline": "3.12.4"
79
+ "@heidi-dang/oh-my-opencode-darwin-arm64": "3.12.5",
80
+ "@heidi-dang/oh-my-opencode-darwin-x64": "3.12.5",
81
+ "@heidi-dang/oh-my-opencode-darwin-x64-baseline": "3.12.5",
82
+ "@heidi-dang/oh-my-opencode-linux-arm64": "3.12.5",
83
+ "@heidi-dang/oh-my-opencode-linux-arm64-musl": "3.12.5",
84
+ "@heidi-dang/oh-my-opencode-linux-x64": "3.12.5",
85
+ "@heidi-dang/oh-my-opencode-linux-x64-baseline": "3.12.5",
86
+ "@heidi-dang/oh-my-opencode-linux-x64-musl": "3.12.5",
87
+ "@heidi-dang/oh-my-opencode-linux-x64-musl-baseline": "3.12.5",
88
+ "@heidi-dang/oh-my-opencode-windows-x64": "3.12.5",
89
+ "@heidi-dang/oh-my-opencode-windows-x64-baseline": "3.12.5"
90
90
  },
91
91
  "overrides": {
92
92
  "@opencode-ai/sdk": "^1.2.17"