@wipcomputer/wip-ai-devops-toolbox 1.9.57 → 1.9.59

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.
Files changed (195) hide show
  1. package/.worktrees/toolbox--guard-plan/.license-guard.json +7 -0
  2. package/.worktrees/toolbox--guard-plan/.publish-skill.json +4 -0
  3. package/.worktrees/toolbox--guard-plan/CHANGELOG.md +1965 -0
  4. package/.worktrees/toolbox--guard-plan/CLA.md +19 -0
  5. package/.worktrees/toolbox--guard-plan/DEV-GUIDE-GENERAL-PUBLIC.md +949 -0
  6. package/.worktrees/toolbox--guard-plan/LICENSE +52 -0
  7. package/.worktrees/toolbox--guard-plan/README.md +238 -0
  8. package/.worktrees/toolbox--guard-plan/RELEASE-NOTES-v1-9-59.md +28 -0
  9. package/.worktrees/toolbox--guard-plan/SKILL.md +821 -0
  10. package/.worktrees/toolbox--guard-plan/TECHNICAL.md +416 -0
  11. package/.worktrees/toolbox--guard-plan/UNIVERSAL-INTERFACE.md +180 -0
  12. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-8-0.md +29 -0
  13. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-8-1.md +7 -0
  14. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-8-2.md +7 -0
  15. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-0.md +37 -0
  16. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-1.md +38 -0
  17. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-10.md +40 -0
  18. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-2.md +40 -0
  19. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-31.md +26 -0
  20. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-32.md +18 -0
  21. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-41.md +28 -0
  22. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-45.md +25 -0
  23. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-46.md +38 -0
  24. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-47.md +42 -0
  25. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-48.md +22 -0
  26. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-49.md +31 -0
  27. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-50.md +24 -0
  28. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-51.md +11 -0
  29. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-52.md +25 -0
  30. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-53.md +22 -0
  31. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-54.md +13 -0
  32. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-55.md +11 -0
  33. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-56.md +42 -0
  34. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-57.md +18 -0
  35. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-58.md +21 -0
  36. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-6.md +72 -0
  37. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-7.md +23 -0
  38. package/.worktrees/toolbox--guard-plan/_trash/RELEASE-NOTES-v1-9-9.md +75 -0
  39. package/.worktrees/toolbox--guard-plan/_trash/guide 2/DEV-GUIDE.md +487 -0
  40. package/.worktrees/toolbox--guard-plan/_trash/guide 2/scripts/deploy-public.sh +152 -0
  41. package/.worktrees/toolbox--guard-plan/package.json +27 -0
  42. package/.worktrees/toolbox--guard-plan/scripts/SKILL-deploy-public.md +61 -0
  43. package/.worktrees/toolbox--guard-plan/scripts/SKILL-post-merge-rename.md +47 -0
  44. package/.worktrees/toolbox--guard-plan/scripts/deploy-public.sh +350 -0
  45. package/.worktrees/toolbox--guard-plan/scripts/post-merge-rename.sh +210 -0
  46. package/.worktrees/toolbox--guard-plan/scripts/publish-skill.sh +134 -0
  47. package/.worktrees/toolbox--guard-plan/templates/global-claude-md.md +73 -0
  48. package/.worktrees/toolbox--guard-plan/templates/repo-claude-md.template +24 -0
  49. package/.worktrees/toolbox--guard-plan/tools/deploy-public/LICENSE +52 -0
  50. package/.worktrees/toolbox--guard-plan/tools/deploy-public/README.md +31 -0
  51. package/.worktrees/toolbox--guard-plan/tools/deploy-public/SKILL.md +71 -0
  52. package/.worktrees/toolbox--guard-plan/tools/deploy-public/deploy-public.sh +264 -0
  53. package/.worktrees/toolbox--guard-plan/tools/deploy-public/package.json +9 -0
  54. package/.worktrees/toolbox--guard-plan/tools/ldm-jobs/LICENSE +52 -0
  55. package/.worktrees/toolbox--guard-plan/tools/ldm-jobs/README.md +46 -0
  56. package/.worktrees/toolbox--guard-plan/tools/ldm-jobs/backup.sh +16 -0
  57. package/.worktrees/toolbox--guard-plan/tools/ldm-jobs/branch-protect.sh +39 -0
  58. package/.worktrees/toolbox--guard-plan/tools/ldm-jobs/crystal-capture.sh +19 -0
  59. package/.worktrees/toolbox--guard-plan/tools/ldm-jobs/setup-shell.sh +27 -0
  60. package/.worktrees/toolbox--guard-plan/tools/ldm-jobs/visibility-audit.sh +27 -0
  61. package/.worktrees/toolbox--guard-plan/tools/post-merge-rename/LICENSE +52 -0
  62. package/.worktrees/toolbox--guard-plan/tools/post-merge-rename/README.md +29 -0
  63. package/.worktrees/toolbox--guard-plan/tools/post-merge-rename/SKILL.md +57 -0
  64. package/.worktrees/toolbox--guard-plan/tools/post-merge-rename/package.json +9 -0
  65. package/.worktrees/toolbox--guard-plan/tools/post-merge-rename/post-merge-rename.sh +122 -0
  66. package/.worktrees/toolbox--guard-plan/tools/wip-branch-guard/INSTALL.md +41 -0
  67. package/.worktrees/toolbox--guard-plan/tools/wip-branch-guard/guard.mjs +477 -0
  68. package/.worktrees/toolbox--guard-plan/tools/wip-branch-guard/package.json +18 -0
  69. package/.worktrees/toolbox--guard-plan/tools/wip-file-guard/CHANGELOG.md +6 -0
  70. package/.worktrees/toolbox--guard-plan/tools/wip-file-guard/LICENSE +52 -0
  71. package/.worktrees/toolbox--guard-plan/tools/wip-file-guard/README.md +113 -0
  72. package/.worktrees/toolbox--guard-plan/tools/wip-file-guard/REFERENCE.md +86 -0
  73. package/.worktrees/toolbox--guard-plan/tools/wip-file-guard/SKILL.md +105 -0
  74. package/.worktrees/toolbox--guard-plan/tools/wip-file-guard/guard.mjs +161 -0
  75. package/.worktrees/toolbox--guard-plan/tools/wip-file-guard/openclaw.plugin.json +8 -0
  76. package/.worktrees/toolbox--guard-plan/tools/wip-file-guard/package.json +27 -0
  77. package/.worktrees/toolbox--guard-plan/tools/wip-file-guard/test.sh +119 -0
  78. package/.worktrees/toolbox--guard-plan/tools/wip-license-guard/LICENSE +52 -0
  79. package/.worktrees/toolbox--guard-plan/tools/wip-license-guard/README.md +69 -0
  80. package/.worktrees/toolbox--guard-plan/tools/wip-license-guard/SKILL.md +65 -0
  81. package/.worktrees/toolbox--guard-plan/tools/wip-license-guard/cli.mjs +472 -0
  82. package/.worktrees/toolbox--guard-plan/tools/wip-license-guard/core.mjs +310 -0
  83. package/.worktrees/toolbox--guard-plan/tools/wip-license-guard/guard.mjs +146 -0
  84. package/.worktrees/toolbox--guard-plan/tools/wip-license-guard/package.json +22 -0
  85. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/CHANGELOG.md +17 -0
  86. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/LICENSE +52 -0
  87. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/README.md +200 -0
  88. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/SKILL.md +111 -0
  89. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/dist/cli/index.d.ts +15 -0
  90. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/dist/cli/index.js +170 -0
  91. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/dist/cli/index.js.map +1 -0
  92. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/dist/core/detector.d.ts +12 -0
  93. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/dist/core/detector.js +104 -0
  94. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/dist/core/detector.js.map +1 -0
  95. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/dist/core/index.d.ts +4 -0
  96. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/dist/core/index.js +5 -0
  97. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/dist/core/index.js.map +1 -0
  98. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/dist/core/ledger.d.ts +49 -0
  99. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/dist/core/ledger.js +72 -0
  100. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/dist/core/ledger.js.map +1 -0
  101. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/dist/core/reporter.d.ts +14 -0
  102. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/dist/core/reporter.js +227 -0
  103. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/dist/core/reporter.js.map +1 -0
  104. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/dist/core/scanner.d.ts +39 -0
  105. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/dist/core/scanner.js +325 -0
  106. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/dist/core/scanner.js.map +1 -0
  107. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/hooks/pre-pull.sh +55 -0
  108. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/hooks/pre-push.sh +51 -0
  109. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/mcp-server.mjs +119 -0
  110. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/package-lock.json +54 -0
  111. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/package.json +43 -0
  112. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/src/cli/index.ts +189 -0
  113. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/src/core/detector.ts +130 -0
  114. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/src/core/index.ts +4 -0
  115. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/src/core/ledger.ts +116 -0
  116. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/src/core/reporter.ts +255 -0
  117. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/src/core/scanner.ts +367 -0
  118. package/.worktrees/toolbox--guard-plan/tools/wip-license-hook/tsconfig.json +16 -0
  119. package/.worktrees/toolbox--guard-plan/tools/wip-readme-format/README.md +49 -0
  120. package/.worktrees/toolbox--guard-plan/tools/wip-readme-format/SKILL.md +84 -0
  121. package/.worktrees/toolbox--guard-plan/tools/wip-readme-format/format.mjs +597 -0
  122. package/.worktrees/toolbox--guard-plan/tools/wip-readme-format/package.json +15 -0
  123. package/.worktrees/toolbox--guard-plan/tools/wip-release/CHANGELOG.md +42 -0
  124. package/.worktrees/toolbox--guard-plan/tools/wip-release/LICENSE +52 -0
  125. package/.worktrees/toolbox--guard-plan/tools/wip-release/README.md +45 -0
  126. package/.worktrees/toolbox--guard-plan/tools/wip-release/REFERENCE.md +100 -0
  127. package/.worktrees/toolbox--guard-plan/tools/wip-release/SKILL.md +139 -0
  128. package/.worktrees/toolbox--guard-plan/tools/wip-release/cli.js +175 -0
  129. package/.worktrees/toolbox--guard-plan/tools/wip-release/core.mjs +1664 -0
  130. package/.worktrees/toolbox--guard-plan/tools/wip-release/mcp-server.mjs +113 -0
  131. package/.worktrees/toolbox--guard-plan/tools/wip-release/package.json +36 -0
  132. package/.worktrees/toolbox--guard-plan/tools/wip-repo-init/README.md +38 -0
  133. package/.worktrees/toolbox--guard-plan/tools/wip-repo-init/SKILL.md +77 -0
  134. package/.worktrees/toolbox--guard-plan/tools/wip-repo-init/init.mjs +148 -0
  135. package/.worktrees/toolbox--guard-plan/tools/wip-repo-init/package.json +11 -0
  136. package/.worktrees/toolbox--guard-plan/tools/wip-repo-init/templates/_sort/README.md +15 -0
  137. package/.worktrees/toolbox--guard-plan/tools/wip-repo-init/templates/_trash/README.md +16 -0
  138. package/.worktrees/toolbox--guard-plan/tools/wip-repo-init/templates/dev-updates/README.md +50 -0
  139. package/.worktrees/toolbox--guard-plan/tools/wip-repo-init/templates/product/notes/README.md +26 -0
  140. package/.worktrees/toolbox--guard-plan/tools/wip-repo-init/templates/product/plans-prds/roadmap.md +77 -0
  141. package/.worktrees/toolbox--guard-plan/tools/wip-repo-init/templates/product/plans-prds/todos/README.md +63 -0
  142. package/.worktrees/toolbox--guard-plan/tools/wip-repo-init/templates/product/product-ideas/README.md +24 -0
  143. package/.worktrees/toolbox--guard-plan/tools/wip-repo-init/templates/product/readme-first-product.md +128 -0
  144. package/.worktrees/toolbox--guard-plan/tools/wip-repo-init/templates/read-me-first.md +80 -0
  145. package/.worktrees/toolbox--guard-plan/tools/wip-repo-permissions-hook/LICENSE +52 -0
  146. package/.worktrees/toolbox--guard-plan/tools/wip-repo-permissions-hook/README.md +86 -0
  147. package/.worktrees/toolbox--guard-plan/tools/wip-repo-permissions-hook/SKILL.md +73 -0
  148. package/.worktrees/toolbox--guard-plan/tools/wip-repo-permissions-hook/cli.js +93 -0
  149. package/.worktrees/toolbox--guard-plan/tools/wip-repo-permissions-hook/core.mjs +122 -0
  150. package/.worktrees/toolbox--guard-plan/tools/wip-repo-permissions-hook/guard.mjs +64 -0
  151. package/.worktrees/toolbox--guard-plan/tools/wip-repo-permissions-hook/mcp-server.mjs +92 -0
  152. package/.worktrees/toolbox--guard-plan/tools/wip-repo-permissions-hook/openclaw.plugin.json +8 -0
  153. package/.worktrees/toolbox--guard-plan/tools/wip-repo-permissions-hook/package.json +31 -0
  154. package/.worktrees/toolbox--guard-plan/tools/wip-repos/LICENSE +52 -0
  155. package/.worktrees/toolbox--guard-plan/tools/wip-repos/README.md +77 -0
  156. package/.worktrees/toolbox--guard-plan/tools/wip-repos/SKILL.md +80 -0
  157. package/.worktrees/toolbox--guard-plan/tools/wip-repos/claude.mjs +248 -0
  158. package/.worktrees/toolbox--guard-plan/tools/wip-repos/cli.mjs +191 -0
  159. package/.worktrees/toolbox--guard-plan/tools/wip-repos/core.mjs +290 -0
  160. package/.worktrees/toolbox--guard-plan/tools/wip-repos/mcp-server.mjs +157 -0
  161. package/.worktrees/toolbox--guard-plan/tools/wip-repos/package.json +34 -0
  162. package/.worktrees/toolbox--guard-plan/tools/wip-universal-installer/CHANGELOG.md +57 -0
  163. package/.worktrees/toolbox--guard-plan/tools/wip-universal-installer/LICENSE +52 -0
  164. package/.worktrees/toolbox--guard-plan/tools/wip-universal-installer/README.md +81 -0
  165. package/.worktrees/toolbox--guard-plan/tools/wip-universal-installer/REFERENCE.md +122 -0
  166. package/.worktrees/toolbox--guard-plan/tools/wip-universal-installer/SKILL.md +87 -0
  167. package/.worktrees/toolbox--guard-plan/tools/wip-universal-installer/SPEC.md +206 -0
  168. package/.worktrees/toolbox--guard-plan/tools/wip-universal-installer/detect.mjs +130 -0
  169. package/.worktrees/toolbox--guard-plan/tools/wip-universal-installer/examples/minimal/README.md +20 -0
  170. package/.worktrees/toolbox--guard-plan/tools/wip-universal-installer/examples/minimal/SKILL.md +28 -0
  171. package/.worktrees/toolbox--guard-plan/tools/wip-universal-installer/examples/minimal/cli.mjs +4 -0
  172. package/.worktrees/toolbox--guard-plan/tools/wip-universal-installer/examples/minimal/core.mjs +8 -0
  173. package/.worktrees/toolbox--guard-plan/tools/wip-universal-installer/examples/minimal/mcp-server.mjs +27 -0
  174. package/.worktrees/toolbox--guard-plan/tools/wip-universal-installer/examples/minimal/package.json +12 -0
  175. package/.worktrees/toolbox--guard-plan/tools/wip-universal-installer/install.js +930 -0
  176. package/.worktrees/toolbox--guard-plan/tools/wip-universal-installer/package.json +32 -0
  177. package/CHANGELOG.md +55 -0
  178. package/SKILL.md +1 -1
  179. package/_trash/RELEASE-NOTES-v1-9-58.md +21 -0
  180. package/_trash/RELEASE-NOTES-v1-9-59.md +28 -0
  181. package/package.json +1 -1
  182. package/scripts/deploy-public.sh +3 -0
  183. package/tools/deploy-public/package.json +1 -1
  184. package/tools/post-merge-rename/package.json +1 -1
  185. package/tools/wip-branch-guard/guard.mjs +57 -39
  186. package/tools/wip-branch-guard/package.json +1 -1
  187. package/tools/wip-file-guard/package.json +1 -1
  188. package/tools/wip-license-guard/package.json +1 -1
  189. package/tools/wip-license-hook/package.json +1 -1
  190. package/tools/wip-readme-format/package.json +1 -1
  191. package/tools/wip-release/package.json +1 -1
  192. package/tools/wip-repo-init/package.json +1 -1
  193. package/tools/wip-repo-permissions-hook/package.json +1 -1
  194. package/tools/wip-repos/package.json +1 -1
  195. package/tools/wip-universal-installer/package.json +1 -1
@@ -0,0 +1,130 @@
1
+ /**
2
+ * wip-universal-installer/detect.mjs
3
+ * Interface detection logic. Scans a repo and reports which interfaces it exposes.
4
+ * Importable by other tools. Zero dependencies.
5
+ */
6
+
7
+ import { existsSync, readFileSync, readdirSync } from 'node:fs';
8
+ import { join, basename } from 'node:path';
9
+
10
+ function readJSON(path) {
11
+ try {
12
+ return JSON.parse(readFileSync(path, 'utf8'));
13
+ } catch {
14
+ return null;
15
+ }
16
+ }
17
+
18
+ /**
19
+ * Detect all interfaces in a repo.
20
+ * Returns { interfaces, pkg } where interfaces is an object keyed by interface type.
21
+ */
22
+ export function detectInterfaces(repoPath) {
23
+ const interfaces = {};
24
+ const pkg = readJSON(join(repoPath, 'package.json'));
25
+
26
+ // 1. CLI: package.json has bin entry
27
+ if (pkg?.bin) {
28
+ interfaces.cli = { bin: pkg.bin, name: pkg.name };
29
+ }
30
+
31
+ // 2. Module: package.json has main or exports
32
+ if (pkg?.main || pkg?.exports) {
33
+ interfaces.module = { main: pkg.main || pkg.exports };
34
+ }
35
+
36
+ // 3. MCP Server: mcp-server.mjs/js/ts or dist/mcp-server.js
37
+ const mcpFiles = ['mcp-server.mjs', 'mcp-server.js', 'mcp-server.ts', 'dist/mcp-server.js'];
38
+ for (const f of mcpFiles) {
39
+ if (existsSync(join(repoPath, f))) {
40
+ interfaces.mcp = { file: f, name: pkg?.name || basename(repoPath) };
41
+ break;
42
+ }
43
+ }
44
+
45
+ // 4. OpenClaw Plugin: openclaw.plugin.json exists
46
+ const ocPlugin = join(repoPath, 'openclaw.plugin.json');
47
+ if (existsSync(ocPlugin)) {
48
+ interfaces.openclaw = { config: readJSON(ocPlugin), path: ocPlugin };
49
+ }
50
+
51
+ // 5. Skill: SKILL.md exists
52
+ if (existsSync(join(repoPath, 'SKILL.md'))) {
53
+ interfaces.skill = { path: join(repoPath, 'SKILL.md') };
54
+ }
55
+
56
+ // 6. Claude Code Hook: guard.mjs or claudeCode.hook in package.json
57
+ if (pkg?.claudeCode?.hook) {
58
+ interfaces.claudeCodeHook = pkg.claudeCode.hook;
59
+ } else if (existsSync(join(repoPath, 'guard.mjs'))) {
60
+ interfaces.claudeCodeHook = {
61
+ event: 'PreToolUse',
62
+ matcher: 'Edit|Write',
63
+ command: `node "${join(repoPath, 'guard.mjs')}"`,
64
+ timeout: 5
65
+ };
66
+ }
67
+
68
+ return { interfaces, pkg };
69
+ }
70
+
71
+ /**
72
+ * Describe detected interfaces as a human-readable summary.
73
+ */
74
+ export function describeInterfaces(interfaces) {
75
+ const lines = [];
76
+ const names = Object.keys(interfaces);
77
+
78
+ if (names.length === 0) {
79
+ return 'No interfaces detected.';
80
+ }
81
+
82
+ if (interfaces.cli) {
83
+ const bins = typeof interfaces.cli.bin === 'string' ? [interfaces.cli.name] : Object.keys(interfaces.cli.bin);
84
+ lines.push(`CLI: ${bins.join(', ')}`);
85
+ }
86
+ if (interfaces.module) lines.push(`Module: ${JSON.stringify(interfaces.module.main)}`);
87
+ if (interfaces.mcp) lines.push(`MCP Server: ${interfaces.mcp.file}`);
88
+ if (interfaces.openclaw) lines.push(`OpenClaw Plugin: ${interfaces.openclaw.config?.name || 'detected'}`);
89
+ if (interfaces.skill) lines.push(`Skill: SKILL.md`);
90
+ if (interfaces.claudeCodeHook) lines.push(`Claude Code Hook: ${interfaces.claudeCodeHook.event || 'PreToolUse'}`);
91
+
92
+ return `${names.length} interface(s): ${names.join(', ')}\n${lines.map(l => ` ${l}`).join('\n')}`;
93
+ }
94
+
95
+ /**
96
+ * Detect if a repo is a toolbox (has tools/ subdirectories with package.json).
97
+ * Returns array of { name, path } for each sub-tool, or empty array if not a toolbox.
98
+ */
99
+ export function detectToolbox(repoPath) {
100
+ const toolsDir = join(repoPath, 'tools');
101
+ if (!existsSync(toolsDir)) return [];
102
+
103
+ try {
104
+ const entries = readdirSync(toolsDir, { withFileTypes: true });
105
+ return entries
106
+ .filter(e => e.isDirectory() && existsSync(join(toolsDir, e.name, 'package.json')))
107
+ .map(e => ({ name: e.name, path: join(toolsDir, e.name) }));
108
+ } catch {
109
+ return [];
110
+ }
111
+ }
112
+
113
+ /**
114
+ * Detect interfaces and return a structured JSON-serializable result.
115
+ */
116
+ export function detectInterfacesJSON(repoPath) {
117
+ const { interfaces, pkg } = detectInterfaces(repoPath);
118
+ return {
119
+ repo: basename(repoPath),
120
+ package: pkg?.name || null,
121
+ version: pkg?.version || null,
122
+ interfaces: Object.fromEntries(
123
+ Object.entries(interfaces).map(([type, info]) => [type, {
124
+ detected: true,
125
+ ...info,
126
+ }])
127
+ ),
128
+ interfaceCount: Object.keys(interfaces).length,
129
+ };
130
+ }
@@ -0,0 +1,20 @@
1
+ # Minimal Universal Interface Template
2
+
3
+ The smallest possible agent-native tool. Four files, four interfaces.
4
+
5
+ ```
6
+ core.mjs ← your logic
7
+ cli.mjs ← thin CLI wrapper
8
+ mcp-server.mjs ← MCP server
9
+ SKILL.md ← agent instructions
10
+ package.json ← name, bin, exports
11
+ ```
12
+
13
+ Copy this folder, rename everything, replace `hello()` with your functions.
14
+
15
+ ## Test it
16
+
17
+ ```bash
18
+ node cli.mjs world # Hello, world!
19
+ wip-install --dry-run . # Detected 4 interface(s): cli, module, mcp, skill
20
+ ```
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: my-tool
3
+ version: 1.0.0
4
+ description: A minimal example tool.
5
+ metadata:
6
+ category: example
7
+ capabilities:
8
+ - hello
9
+ author:
10
+ name: Your Name
11
+ ---
12
+
13
+ # my-tool
14
+
15
+ A minimal example of the six-door pattern.
16
+
17
+ ## When to Use This Skill
18
+
19
+ Use `hello` when you need to greet someone.
20
+
21
+ ## API Reference
22
+
23
+ ### hello(options)
24
+
25
+ ```javascript
26
+ import { hello } from './core.mjs';
27
+ hello({ name: 'world' }); // "Hello, world!"
28
+ ```
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { hello } from './core.mjs';
3
+ const name = process.argv[2];
4
+ console.log(hello({ name }));
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Minimal six-door tool template.
3
+ * Replace this with your actual logic.
4
+ */
5
+
6
+ export function hello({ name = 'world' } = {}) {
7
+ return `Hello, ${name}!`;
8
+ }
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
3
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
+ import { hello } from './core.mjs';
5
+
6
+ const server = new Server(
7
+ { name: 'my-tool', version: '1.0.0' },
8
+ { capabilities: { tools: {} } }
9
+ );
10
+
11
+ server.setRequestHandler({ method: 'tools/list' }, async () => ({
12
+ tools: [{
13
+ name: 'hello',
14
+ description: 'Say hello',
15
+ inputSchema: {
16
+ type: 'object',
17
+ properties: { name: { type: 'string' } },
18
+ },
19
+ }],
20
+ }));
21
+
22
+ server.setRequestHandler({ method: 'tools/call' }, async (req) => ({
23
+ content: [{ type: 'text', text: hello(req.params.arguments) }],
24
+ }));
25
+
26
+ const transport = new StdioServerTransport();
27
+ await server.connect(transport);
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "my-tool",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "main": "core.mjs",
6
+ "bin": {
7
+ "my-tool": "./cli.mjs"
8
+ },
9
+ "exports": {
10
+ ".": "./core.mjs"
11
+ }
12
+ }