@infinitedusky/indusk-mcp 1.0.0 → 1.0.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.
@@ -1,5 +1,5 @@
1
1
  import { execSync } from "node:child_process";
2
- import { cpSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
2
+ import { cpSync, existsSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
3
3
  import { dirname, join } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { globSync } from "glob";
@@ -113,23 +113,35 @@ export async function extensionsAdd(projectRoot, name, from) {
113
113
  ensureExtensionsDirs(projectRoot);
114
114
  let manifestContent = null;
115
115
  if (from.startsWith("npm:")) {
116
- // Fetch from npm package
116
+ // Fetch from npm package by downloading tarball and extracting the manifest
117
117
  const pkg = from.slice(4);
118
118
  try {
119
- const result = execSync(`npm pack ${pkg} --dry-run --json 2>/dev/null || echo "[]"`, {
119
+ // npm pack downloads the tarball to cwd
120
+ const tmpDir = join(projectRoot, ".indusk/tmp");
121
+ mkdirSync(tmpDir, { recursive: true });
122
+ execSync(`npm pack ${pkg} --pack-destination "${tmpDir}"`, {
120
123
  encoding: "utf-8",
121
124
  timeout: 30000,
125
+ stdio: ["ignore", "pipe", "pipe"],
122
126
  });
123
- // Try to read the manifest from the installed package
124
- const npmRoot = execSync(`npm root`, { encoding: "utf-8", cwd: projectRoot }).trim();
125
- const manifestPath = join(npmRoot, pkg, "indusk-extension.json");
126
- if (existsSync(manifestPath)) {
127
- manifestContent = readFileSync(manifestPath, "utf-8");
127
+ // Find the tarball
128
+ const tarballs = readdirSync(tmpDir).filter((f) => f.endsWith(".tgz"));
129
+ if (tarballs.length === 0) {
130
+ console.info(` ${name}: failed to download ${pkg}`);
131
+ return;
132
+ }
133
+ // Extract indusk-extension.json from the tarball
134
+ try {
135
+ manifestContent = execSync(`tar -xzf "${join(tmpDir, tarballs[tarballs.length - 1])}" -O package/indusk-extension.json`, { encoding: "utf-8", timeout: 10000 });
128
136
  }
129
- else {
137
+ catch {
130
138
  console.info(` ${name}: no indusk-extension.json found in ${pkg}`);
139
+ // Cleanup
140
+ rmSync(tmpDir, { recursive: true, force: true });
131
141
  return;
132
142
  }
143
+ // Cleanup
144
+ rmSync(tmpDir, { recursive: true, force: true });
133
145
  }
134
146
  catch {
135
147
  console.info(` ${name}: failed to fetch from npm:${pkg}`);
@@ -0,0 +1,7 @@
1
+ # Always add new docs pages to the sidebar
2
+
3
+ When you create a new documentation page, you must also add it to the VitePress sidebar configuration in `.vitepress/config.ts`. If you don't, the page exists but is invisible — no one can navigate to it.
4
+
5
+ This is the single most common documentation mistake. The page is written, the content is good, but it's orphaned because the sidebar wasn't updated.
6
+
7
+ The fix is simple: every time you create a page, immediately open `.vitepress/config.ts` and add the entry to the correct sidebar section. Do it in the same edit, not as a follow-up.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infinitedusky/indusk-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "InDusk development system — skills, MCP tools, and CLI for structured AI-assisted development",
5
5
  "type": "module",
6
6
  "files": [
@@ -63,6 +63,16 @@ apps/indusk-docs/src/
63
63
  └── lessons/ # Distilled from retrospective insights during archival
64
64
  ```
65
65
 
66
+ **CRITICAL: Every new page must be added to the sidebar.** The sidebar is configured in a single file: `apps/indusk-docs/src/.vitepress/config.ts` under `themeConfig.sidebar`. If you create a page but don't add it to the sidebar, it is invisible — users cannot navigate to it. This is the most common documentation mistake.
67
+
68
+ When you create or move a page:
69
+ 1. Write the page content
70
+ 2. **Immediately** open `.vitepress/config.ts`
71
+ 3. Add the page to the correct sidebar section
72
+ 4. Verify the page appears in navigation
73
+
74
+ Never consider a documentation item complete until the sidebar entry exists.
75
+
66
76
  **Pipeline:** Document skill writes/updates docs during impl → retrospective skill archives planning artifacts and distills ADRs into decisions/ and insights into lessons/. Don't manually populate decisions/ or lessons/ during impl work — that's the retrospective's job.
67
77
 
68
78
  ### What Goes Where