inplan 0.1.1 → 0.1.2

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/app/main/index.js CHANGED
@@ -497,24 +497,25 @@ const i18n = createI18nController({
497
497
  cloudBase: CLOUD_BASE,
498
498
  onChange: () => win?.webContents.send("i18n:changed")
499
499
  });
500
- let cloudReachable = false;
500
+ let cloudLinkEnabled = false;
501
501
  let lastCloudProbe = 0;
502
502
  const CLOUD_PROBE_TTL_MS = 6e4;
503
503
  async function probeCloud() {
504
504
  lastCloudProbe = Date.now();
505
505
  const ctrl = new AbortController();
506
506
  const timer = setTimeout(() => ctrl.abort(), 2500);
507
- let ok = false;
507
+ let enabled = false;
508
508
  try {
509
509
  const res = await fetch(`${CLOUD_BASE}/api/v1/healthz`, { signal: ctrl.signal });
510
- ok = res.ok;
510
+ const body = res.ok ? await res.json().catch(() => null) : null;
511
+ enabled = body?.link_enabled === true;
511
512
  } catch {
512
- ok = false;
513
+ enabled = false;
513
514
  } finally {
514
515
  clearTimeout(timer);
515
516
  }
516
- if (ok !== cloudReachable) {
517
- cloudReachable = ok;
517
+ if (enabled !== cloudLinkEnabled) {
518
+ cloudLinkEnabled = enabled;
518
519
  win?.webContents.send("profile:changed");
519
520
  }
520
521
  }
@@ -523,6 +524,7 @@ function ensureCloudProbe() {
523
524
  }
524
525
  async function readProfile() {
525
526
  ensureCloudProbe();
527
+ if (!cloudLinkEnabled) return { user: null, agentLocation: null, actions: [] };
526
528
  const r = await runCli(["whoami"]);
527
529
  let who = {};
528
530
  try {
@@ -540,7 +542,7 @@ async function readProfile() {
540
542
  ]
541
543
  };
542
544
  }
543
- return { user: null, agentLocation: null, actions: cloudReachable ? [{ id: "signin", label: "Sign in…" }] : [] };
545
+ return { user: null, agentLocation: null, actions: [{ id: "signin", label: "Sign in…" }] };
544
546
  }
545
547
  async function collaborateOnCloud() {
546
548
  if (!session) return;
package/bin/cli.js CHANGED
@@ -866,7 +866,7 @@ function waitForActions(opts) {
866
866
  }
867
867
 
868
868
  // src/cli.ts
869
- var VERSION = "0.1.1";
869
+ var VERSION = "0.1.2";
870
870
  function output(obj) {
871
871
  process.stdout.write(JSON.stringify(obj) + "\n");
872
872
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inplan",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "inplan — a Markdown editor for human ⇄ coding-agent planning. CLI + desktop editor.",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "repository": {
@@ -19,7 +19,7 @@
19
19
  "LICENSE"
20
20
  ],
21
21
  "engines": {
22
- "node": ">=20"
22
+ "node": ">=22"
23
23
  },
24
24
  "scripts": {
25
25
  "postinstall": "node bin/cli.js install-skill --quiet || true"