@plannotator/opencode 0.5.0-beta.2 → 0.5.0-beta.3

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/index.js +5 -35
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7,19 +7,12 @@ import { mkdirSync as mkdirSync2 } from "fs";
7
7
 
8
8
  // ../../packages/server/remote.ts
9
9
  var DEFAULT_REMOTE_PORT = 19432;
10
- var deprecationWarned = false;
11
10
  function isRemoteSession() {
12
11
  const remote = process.env.PLANNOTATOR_REMOTE;
13
12
  if (remote === "1" || remote?.toLowerCase() === "true") {
14
13
  return true;
15
14
  }
16
15
  if (process.env.SSH_TTY || process.env.SSH_CONNECTION) {
17
- if (!deprecationWarned) {
18
- console.error("[Plannotator] Deprecation warning: SSH_TTY/SSH_CONNECTION detection is deprecated.");
19
- console.error(`[Plannotator] Use PLANNOTATOR_REMOTE=1 instead for remote/devcontainer sessions.
20
- `);
21
- deprecationWarned = true;
22
- }
23
16
  return true;
24
17
  }
25
18
  return false;
@@ -378,19 +371,12 @@ async function startPlannotatorServer(options) {
378
371
  } catch (err) {
379
372
  const isAddressInUse = err instanceof Error && err.message.includes("EADDRINUSE");
380
373
  if (isAddressInUse && attempt < MAX_RETRIES) {
381
- console.error(`Port ${configuredPort} in use, retrying in ${RETRY_DELAY_MS}ms... (${attempt}/${MAX_RETRIES})`);
382
374
  await Bun.sleep(RETRY_DELAY_MS);
383
375
  continue;
384
376
  }
385
377
  if (isAddressInUse) {
386
- console.error(`
387
- Error: Port ${configuredPort} is already in use after ${MAX_RETRIES} retries.`);
388
- if (isRemote) {
389
- console.error(`Another Plannotator session may be running.`);
390
- console.error(`To use a different port, set PLANNOTATOR_PORT environment variable.
391
- `);
392
- }
393
- throw new Error(`Port ${configuredPort} is already in use`);
378
+ const hint = isRemote ? " (set PLANNOTATOR_PORT to use different port)" : "";
379
+ throw new Error(`Port ${configuredPort} in use after ${MAX_RETRIES} retries${hint}`);
394
380
  }
395
381
  throw err;
396
382
  }
@@ -411,25 +397,9 @@ Error: Port ${configuredPort} is already in use after ${MAX_RETRIES} retries.`);
411
397
  };
412
398
  }
413
399
  async function handleServerReady(url, isRemote, port) {
414
- console.error(`
415
- Plannotator server running on ${url}`);
416
- if (isRemote) {
417
- console.error(`
418
- [Remote Session Detected]`);
419
- console.error(`Add this to your local ~/.ssh/config to access Plannotator:
420
- `);
421
- console.error(` Host your-server-alias`);
422
- console.error(` LocalForward ${port} localhost:${port}
423
- `);
424
- console.error(`Or if using a devcontainer, ensure port ${port} is forwarded.
425
- `);
426
- console.error(`Then open ${url} in your local browser.
427
- `);
428
- } else {
429
- const opened = await openBrowser(url);
430
- if (!opened) {
431
- console.error(`Open browser manually: ${url}`);
432
- }
400
+ console.error(`Plannotator: ${url}`);
401
+ if (!isRemote) {
402
+ await openBrowser(url);
433
403
  }
434
404
  }
435
405
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plannotator/opencode",
3
- "version": "0.5.0-beta.2",
3
+ "version": "0.5.0-beta.3",
4
4
  "description": "Plannotator plugin for OpenCode - interactive plan review with visual annotation",
5
5
  "author": "backnotprop",
6
6
  "license": "BSL-1.1",