@pi-unipi/kanboard 3.0.0-alpha.0 → 3.0.0-alpha.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/index.ts CHANGED
@@ -158,6 +158,9 @@ export default function (pi: ExtensionAPI) {
158
158
  });
159
159
 
160
160
  pi.on("session_start", async (_event, ctx) => {
161
+ // Kanboard's own ambient children (summaries, --list-models) get this env:
162
+ // they must not re-sync the runtime or spawn a daemon.
163
+ if (process.env.UNIPI_KANBOARD_CHILD) return;
161
164
  initUnipiDirs();
162
165
  if (attach(ctx as unknown as ExtensionContext)) {
163
166
  const deps = buildDeps();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pi-unipi/kanboard",
3
- "version": "3.0.0-alpha.0",
4
- "description": "Kanboard v3 \u2014 deferred-work board: CLI/daemon bridge, task runner and skill",
3
+ "version": "3.0.0-alpha.2",
4
+ "description": "Kanboard v3 — deferred-work board: CLI/daemon bridge, task runner and skill",
5
5
  "type": "module",
6
6
  "main": "index.ts",
7
7
  "license": "MIT",
@@ -31,10 +31,10 @@
31
31
  "access": "public"
32
32
  },
33
33
  "dependencies": {
34
- "@pi-unipi/core": "3.0.0-alpha.0"
34
+ "@pi-unipi/core": "3.0.0-alpha.2"
35
35
  },
36
36
  "peerDependencies": {
37
- "@earendil-works/pi-coding-agent": "^0.86.0",
37
+ "@earendil-works/pi-coding-agent": "^0.87.1",
38
38
  "typebox": "^1.1.38"
39
39
  },
40
40
  "pi": {
@@ -48,10 +48,10 @@
48
48
  "themes": []
49
49
  },
50
50
  "optionalDependencies": {
51
- "@pi-unipi/kanboard-linux-x64": "3.0.0-alpha.0",
52
- "@pi-unipi/kanboard-linux-arm64": "3.0.0-alpha.0",
53
- "@pi-unipi/kanboard-darwin-x64": "3.0.0-alpha.0",
54
- "@pi-unipi/kanboard-darwin-arm64": "3.0.0-alpha.0",
55
- "@pi-unipi/kanboard-win32-x64": "3.0.0-alpha.0"
51
+ "@pi-unipi/kanboard-linux-x64": "3.0.0-alpha.2",
52
+ "@pi-unipi/kanboard-linux-arm64": "3.0.0-alpha.2",
53
+ "@pi-unipi/kanboard-darwin-x64": "3.0.0-alpha.2",
54
+ "@pi-unipi/kanboard-darwin-arm64": "3.0.0-alpha.2",
55
+ "@pi-unipi/kanboard-win32-x64": "3.0.0-alpha.2"
56
56
  }
57
57
  }
package/src/commands.ts CHANGED
@@ -781,26 +781,23 @@ export async function runStopDaemon(deps: CommandDeps, ctx: ExtensionCommandCont
781
781
 
782
782
  /**
783
783
  * Tell the daemon how to run pi for summaries: `piCommand` (this process's
784
- * argv minus flags) and `models` (the user's available list, the whitelist the
785
- * Settings dialog may pick from). Runs on session start and on `open`.
784
+ * argv minus flags). The daemon owns the model catalog itself now — it runs
785
+ * `piCommand --list-models` with the same ambient runtime as the summarizer.
786
+ * Runs on session start and on `open`; skipped inside kanboard's own child
787
+ * sessions (UNIPI_KANBOARD_CHILD) so the summarizer never rewrites the file.
786
788
  */
787
789
  export async function syncPiRuntime(
788
790
  deps: CommandDeps,
789
791
  ctx: ExtensionCommandContext | ExtensionContext,
790
792
  ): Promise<void> {
791
793
  const client = deps.cli;
792
- if (!client) return;
794
+ if (!client || process.env.UNIPI_KANBOARD_CHILD) return;
793
795
  // argv[1] is the pi script when node runs it; a compiled binary has none.
794
796
  // Keep it when it exists on disk (the coffee bin/pi shim has no extension).
795
797
  const script = process.argv[1];
796
798
  const argv = [process.execPath, ...(script && existsSync(script) ? [script] : [])];
797
- const models =
798
- (ctx as { modelRegistry?: { getAvailable?: () => Array<{ provider: string; id: string }> } })
799
- .modelRegistry?.getAvailable?.()
800
- .map((model) => `${model.provider}/${model.id}`) ?? [];
801
799
  try {
802
800
  await client.run<unknown>(["settings", "set", "pi-command", JSON.stringify(argv)], {});
803
- await client.run<unknown>(["settings", "set", "models", JSON.stringify(models)], {});
804
801
  } catch (error) {
805
802
  deps.debug(`pi runtime sync failed: ${error instanceof Error ? error.message : String(error)}`);
806
803
  }