inplan 0.3.5 → 0.3.6

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.
@@ -1204,7 +1204,7 @@ function startCloudSignIn(cloudBase, timeoutMs = 5 * 6e4) {
1204
1204
  const __dirname$1 = node_path.dirname(node_url.fileURLToPath(require("url").pathToFileURL(__filename).href));
1205
1205
  widenConnectAttemptBudget();
1206
1206
  registerPluginScheme();
1207
- const pluginToken = () => runCli(["token"]).then((r) => {
1207
+ const pluginToken = () => runCli(["token"], void 0, 15e3).then((r) => {
1208
1208
  try {
1209
1209
  return JSON.parse(r.stdout.trim() || "{}").token ?? null;
1210
1210
  } catch {
@@ -1229,7 +1229,7 @@ function resolveTargetFile() {
1229
1229
  return node_fs.existsSync(abs) ? abs : null;
1230
1230
  }
1231
1231
  const nav = createNavTracker();
1232
- const pluginRefreshes = createSerialQueue((err) => console.error("[inplan] refreshing the plugin after a navigation failed", err));
1232
+ const pluginRefreshes = createSerialQueue((err) => console.error("[inplan] starting or refreshing the plugin failed", err));
1233
1233
  let session = null;
1234
1234
  let win = null;
1235
1235
  let stopWatching = null;
@@ -1749,7 +1749,9 @@ ${body.replace(/\s*$/, "")}
1749
1749
  });
1750
1750
  electron.ipcMain.handle("i18n:get", () => i18n.getSnapshot());
1751
1751
  electron.ipcMain.handle("i18n:set-locale", (_e, code) => i18n.setLocale(code));
1752
- electron.ipcMain.handle("plugin:info", () => {
1752
+ electron.ipcMain.handle("plugin:info", async () => {
1753
+ await pluginRefreshes.run(async () => {
1754
+ });
1753
1755
  const info = pluginInfo();
1754
1756
  nav.rendererActivated(info !== null);
1755
1757
  return info;
@@ -1764,8 +1766,7 @@ void electron.app.whenReady().then(async () => {
1764
1766
  session.logEditorPid(process.pid);
1765
1767
  navHistory.push(target);
1766
1768
  navIdx = 0;
1767
- await startDesktopPlugin(target, pluginToken);
1768
- nav.rendererActivated(pluginInfo() !== null);
1769
+ void pluginRefreshes.run(() => startDesktopPlugin(target, pluginToken));
1769
1770
  track("app_opened", session.getSettings().telemetry === true);
1770
1771
  }
1771
1772
  registerIpc();
@@ -49,6 +49,10 @@ function createI18nController() {
49
49
  }
50
50
  };
51
51
  }
52
+ let lastUpdate = null;
53
+ ipcRenderer.on("app:update-available", (_e, info) => {
54
+ lastUpdate = info;
55
+ });
52
56
  const api = {
53
57
  load: () => ipcRenderer.invoke("doc:load"),
54
58
  save: (content, options) => ipcRenderer.invoke("doc:save", content, options),
@@ -130,6 +134,7 @@ const api = {
130
134
  onUpdateAvailable: (cb) => {
131
135
  const h = (_e, info) => cb(info);
132
136
  ipcRenderer.on("app:update-available", h);
137
+ if (lastUpdate) cb(lastUpdate);
133
138
  return () => ipcRenderer.removeListener("app:update-available", h);
134
139
  },
135
140
  applyUpdate: () => ipcRenderer.invoke("app:apply-update"),
@@ -48662,12 +48662,15 @@ function Shell() {
48662
48662
  return /* @__PURE__ */ jsxRuntimeExports.jsx(AppRoot, {}, epoch);
48663
48663
  }
48664
48664
  async function bootstrap() {
48665
+ const el2 = document.getElementById("root");
48666
+ if (!el2) return;
48667
+ const root = createRoot(el2);
48668
+ root.render(
48669
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ap-loading", role: "status", "aria-label": "Loading", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ap-spinner", "aria-hidden": "true" }) })
48670
+ );
48665
48671
  await plugin.activate();
48666
- const root = document.getElementById("root");
48667
- if (root) {
48668
- createRoot(root).render(
48669
- /* @__PURE__ */ jsxRuntimeExports.jsx(React.StrictMode, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Shell, {}) })
48670
- );
48671
- }
48672
+ root.render(
48673
+ /* @__PURE__ */ jsxRuntimeExports.jsx(React.StrictMode, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Shell, {}) })
48674
+ );
48672
48675
  }
48673
48676
  void bootstrap();
@@ -21,7 +21,7 @@
21
21
  content="default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' inplan-plugin:; img-src 'self' file: https:; connect-src 'self' inplan-plugin: ws://127.0.0.1:* ws://localhost:*; frame-src https://inplan.ai http://127.0.0.1:* http://localhost:*"
22
22
  />
23
23
  <title>inplan</title>
24
- <script type="module" crossorigin src="./assets/index-C1AH6VQU.js"></script>
24
+ <script type="module" crossorigin src="./assets/index-Dm0uGzyR.js"></script>
25
25
  <link rel="stylesheet" crossorigin href="./assets/index-DziuyBKZ.css">
26
26
  </head>
27
27
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inplan",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
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": {