docks-kit 0.1.1 → 0.1.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.
@@ -332,6 +332,31 @@ function syncClaudeJson(ctx: Ctx): void {
332
332
  // -------------------------------------------------------- connector env ----
333
333
 
334
334
  function syncConnectorEnv(ctx: Ctx): void {
335
+ // win32: Claude Code launches from PowerShell/GUI, so the flag must be a
336
+ // real user env var (setx), not a Git-Bash-only shell-rc export. Never
337
+ // clobbers an existing value (set =true yourself to keep connectors).
338
+ if (process.platform === "win32") {
339
+ const existing = spawnSync("reg", ["query", "HKCU\\Environment", "/v", "ENABLE_CLAUDEAI_MCP_SERVERS"], {
340
+ stdio: "ignore"
341
+ })
342
+ if (existing.error === undefined && existing.status === 0) {
343
+ if (ctx.dryRun) echo("[dry-run] ENABLE_CLAUDEAI_MCP_SERVERS already in user environment — would skip")
344
+ else log("claude.ai connectors: ENABLE_CLAUDEAI_MCP_SERVERS already set in user environment (left as-is)")
345
+ return
346
+ }
347
+ if (ctx.dryRun) {
348
+ echo("[dry-run] setx ENABLE_CLAUDEAI_MCP_SERVERS false (user environment)")
349
+ return
350
+ }
351
+ const res = spawnSync("setx", ["ENABLE_CLAUDEAI_MCP_SERVERS", "false"], { stdio: "ignore" })
352
+ if (res.error === undefined && res.status === 0) {
353
+ log("claude.ai connectors disabled via setx (open a new terminal to apply)")
354
+ } else {
355
+ warn("setx ENABLE_CLAUDEAI_MCP_SERVERS false failed — set it manually in System Properties > Environment Variables")
356
+ }
357
+ return
358
+ }
359
+
335
360
  const line = "export ENABLE_CLAUDEAI_MCP_SERVERS=false"
336
361
  const marker = "# docks-kit: disable claude.ai cloud MCP connectors (set =true to keep them)"
337
362
  const candidates = [".zshrc", ".bashrc", ".bash_profile", ".profile", ".zshenv"].map((f) => p(ctx.home, f))
@@ -182,7 +182,12 @@ export function parseArgs(ctx: Ctx, args: ReadonlyArray<string>): void {
182
182
  export function preflight(ctx: Ctx): void {
183
183
  if (ctx.syncClaude || ctx.syncCodex) {
184
184
  if (!commandExists("jq")) {
185
- err("jq is required. Install: sudo apt install -y jq (or brew install jq)")
185
+ const hint = process.platform === "win32"
186
+ ? "winget install jqlang.jq (then open a new terminal)"
187
+ : process.platform === "darwin"
188
+ ? "brew install jq"
189
+ : "sudo apt install -y jq"
190
+ err(`jq is required (deployed statusline/hooks call it). Install: ${hint}`)
186
191
  throw new ExitError(1)
187
192
  }
188
193
  }
@@ -288,6 +288,15 @@ export function effectSolutionsInstall(ctx: Ctx): (mode: "install" | "upgrade",
288
288
  }
289
289
 
290
290
  const gbin = capture(bun, ["pm", "-g", "bin"])
291
+ // win32: bun writes an .exe shim (not the bare Unix name), and the
292
+ // ~/.local/bin link step below is Unix-only plumbing (non-interactive
293
+ // agent PATH) — bun's global bin is already the Windows PATH entry.
294
+ if (process.platform === "win32") {
295
+ const found = gbin !== "" && ["exe", "cmd", "bunx"].some((ext) => existsSync(p(gbin, `effect-solutions.${ext}`)))
296
+ if (found) log(`effect-solutions CLI ready (${gbin})`)
297
+ else warn(`effect-solutions installed but no shim found under '${gbin !== "" ? gbin : "<unknown>"}' — check bun pm -g bin`)
298
+ return 0
299
+ }
291
300
  if (gbin !== "" && isExecutable(p(gbin, "effect-solutions"))) {
292
301
  mkdirSync(p(ctx.home, ".local", "bin"), { recursive: true })
293
302
  linkOrCopy(bun, p(ctx.home, ".local", "bin", "bun"))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docks-kit",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Portable AI coding agent config kit — SoT sync engine + typed CLI for Claude Code, Codex, and universal agent skills",
5
5
  "type": "module",
6
6
  "license": "MIT",