devworkspace 0.5.1 → 0.5.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.
Files changed (380) hide show
  1. package/CHANGELOG.md +30 -2
  2. package/README.md +57 -509
  3. package/dist/agents/claude/adapter.js +0 -1
  4. package/dist/agents/claude/content.js +0 -1
  5. package/dist/agents/codex/adapter.js +0 -1
  6. package/dist/agents/copilot/adapter.js +0 -1
  7. package/dist/agents/cursor/adapter.js +0 -1
  8. package/dist/agents/index.js +0 -1
  9. package/dist/agents/shared.js +0 -1
  10. package/dist/agents/types.js +0 -1
  11. package/dist/cli/args.d.ts +16 -0
  12. package/dist/cli/args.js +5 -1
  13. package/dist/cli/help.js +59 -17
  14. package/dist/cli/main.js +0 -1
  15. package/dist/cli/prompt.d.ts +15 -0
  16. package/dist/cli/prompt.js +113 -0
  17. package/dist/cli/render.d.ts +10 -0
  18. package/dist/cli/render.js +174 -4
  19. package/dist/cli/run.d.ts +3 -0
  20. package/dist/cli/run.js +366 -17
  21. package/dist/config/feature-gate.d.ts +15 -0
  22. package/dist/config/feature-gate.js +77 -0
  23. package/dist/config/feature-registry.d.ts +49 -0
  24. package/dist/config/feature-registry.js +451 -0
  25. package/dist/config/schemas.js +0 -1
  26. package/dist/config/settings.d.ts +54 -0
  27. package/dist/config/settings.js +293 -0
  28. package/dist/config/validate.js +0 -1
  29. package/dist/core/artifacts.js +0 -1
  30. package/dist/core/contracts.js +0 -1
  31. package/dist/core/migrations.js +0 -1
  32. package/dist/core/version.js +0 -1
  33. package/dist/core/versioned.js +0 -1
  34. package/dist/core/workspace.d.ts +1 -0
  35. package/dist/core/workspace.js +1 -1
  36. package/dist/decisions/decision.js +0 -1
  37. package/dist/discovery/cache.js +0 -1
  38. package/dist/discovery/commands.js +0 -1
  39. package/dist/discovery/detect.js +0 -1
  40. package/dist/discovery/docs.js +0 -1
  41. package/dist/discovery/entrypoints.js +0 -1
  42. package/dist/discovery/ignore.js +0 -1
  43. package/dist/discovery/scan.js +0 -1
  44. package/dist/discovery/types.js +0 -1
  45. package/dist/dx/dashboard.js +2 -1
  46. package/dist/dx/guidance.js +0 -1
  47. package/dist/dx/guided-setup.d.ts +102 -0
  48. package/dist/dx/guided-setup.js +508 -0
  49. package/dist/dx/index.js +0 -1
  50. package/dist/dx/onboarding.js +0 -1
  51. package/dist/dx/types.js +0 -1
  52. package/dist/errors/index.js +0 -1
  53. package/dist/features/schema.js +0 -1
  54. package/dist/features/types.js +0 -1
  55. package/dist/features/validate.js +0 -1
  56. package/dist/git/git.js +0 -1
  57. package/dist/index.d.ts +15 -5
  58. package/dist/index.js +10 -2
  59. package/dist/integrations/adapters/agent-skills.js +0 -1
  60. package/dist/integrations/adapters/claudePlugin.js +0 -1
  61. package/dist/integrations/adapters/graphify.js +0 -1
  62. package/dist/integrations/adapters/omniroute.js +0 -1
  63. package/dist/integrations/adapters/pluginSkill.js +0 -1
  64. package/dist/integrations/adapters/ponytail.js +0 -1
  65. package/dist/integrations/exec.js +0 -1
  66. package/dist/integrations/index.js +0 -1
  67. package/dist/integrations/manager.d.ts +2 -1
  68. package/dist/integrations/manager.js +22 -3
  69. package/dist/integrations/notices.js +0 -1
  70. package/dist/integrations/persistentPath.js +0 -1
  71. package/dist/integrations/protect.js +0 -1
  72. package/dist/integrations/state.js +0 -1
  73. package/dist/integrations/types.d.ts +1 -1
  74. package/dist/integrations/types.js +1 -1
  75. package/dist/intelligence/agents/profiles.js +0 -1
  76. package/dist/intelligence/agents/registry.js +0 -1
  77. package/dist/intelligence/agents/types.js +0 -1
  78. package/dist/intelligence/observability/tracer.js +0 -1
  79. package/dist/intelligence/observability/types.js +0 -1
  80. package/dist/intelligence/orchestration/engine.d.ts +13 -4
  81. package/dist/intelligence/orchestration/engine.js +332 -54
  82. package/dist/intelligence/orchestration/lock-manager.js +0 -1
  83. package/dist/intelligence/orchestration/store.js +0 -1
  84. package/dist/intelligence/orchestration/types.d.ts +28 -1
  85. package/dist/intelligence/orchestration/types.js +0 -1
  86. package/dist/intelligence/routing/matcher.js +0 -1
  87. package/dist/intelligence/routing/router.js +0 -1
  88. package/dist/intelligence/routing/types.js +0 -1
  89. package/dist/intelligence/runtime/adk/adapter.js +1 -2
  90. package/dist/intelligence/runtime/adk/detector.js +0 -1
  91. package/dist/intelligence/runtime/auth-provider.d.ts +63 -0
  92. package/dist/intelligence/runtime/auth-provider.js +201 -0
  93. package/dist/intelligence/runtime/boundary.d.ts +118 -6
  94. package/dist/intelligence/runtime/boundary.js +720 -38
  95. package/dist/intelligence/runtime/changes.d.ts +59 -0
  96. package/dist/intelligence/runtime/changes.js +362 -0
  97. package/dist/intelligence/runtime/external.d.ts +1 -0
  98. package/dist/intelligence/runtime/external.js +9 -6
  99. package/dist/intelligence/runtime/native.js +0 -1
  100. package/dist/intelligence/runtime/types.d.ts +64 -2
  101. package/dist/intelligence/runtime/types.js +0 -1
  102. package/dist/intelligence/security/audit.js +8 -2
  103. package/dist/intelligence/security/policy.js +0 -1
  104. package/dist/intelligence/security/types.d.ts +8 -0
  105. package/dist/intelligence/security/types.js +0 -1
  106. package/dist/intelligence/skills/builtins.js +0 -1
  107. package/dist/intelligence/skills/loader.js +0 -1
  108. package/dist/intelligence/skills/registry.js +0 -1
  109. package/dist/intelligence/skills/types.js +0 -1
  110. package/dist/intelligence/verification/engine.d.ts +10 -2
  111. package/dist/intelligence/verification/engine.js +53 -9
  112. package/dist/intelligence/verification/reviewer.d.ts +18 -2
  113. package/dist/intelligence/verification/reviewer.js +356 -4
  114. package/dist/intelligence/verification/types.d.ts +60 -0
  115. package/dist/intelligence/verification/types.js +0 -1
  116. package/dist/knowledge/facts.js +0 -1
  117. package/dist/mcp/protocol.js +0 -1
  118. package/dist/mcp/server.js +38 -2
  119. package/dist/mcp/setup.js +5 -2
  120. package/dist/mcp/tools.js +0 -1
  121. package/dist/mcp/types.js +0 -1
  122. package/dist/mcp/verify.js +0 -1
  123. package/dist/portability/bundle.js +0 -1
  124. package/dist/prompts/onboarding.js +0 -1
  125. package/dist/prompts/refresh.js +0 -1
  126. package/dist/prompts/requirements.js +0 -1
  127. package/dist/security/files.js +0 -1
  128. package/dist/security/redact.js +0 -1
  129. package/dist/services/agent.js +2 -1
  130. package/dist/services/analysis.js +0 -1
  131. package/dist/services/common.js +0 -1
  132. package/dist/services/doctor.js +13 -2
  133. package/dist/services/drift.js +0 -1
  134. package/dist/services/features.js +5 -1
  135. package/dist/services/graph.js +4 -1
  136. package/dist/services/init.js +0 -1
  137. package/dist/services/integrations.d.ts +2 -1
  138. package/dist/services/integrations.js +29 -6
  139. package/dist/services/intelligence.d.ts +2 -2
  140. package/dist/services/intelligence.js +38 -36
  141. package/dist/services/knowledge.js +0 -1
  142. package/dist/services/migrate.js +0 -1
  143. package/dist/services/modules.d.ts +85 -0
  144. package/dist/services/modules.js +313 -0
  145. package/dist/services/portability.js +0 -1
  146. package/dist/services/records.js +5 -1
  147. package/dist/services/refresh.js +0 -1
  148. package/dist/services/reset.js +0 -1
  149. package/dist/services/settings.d.ts +36 -0
  150. package/dist/services/settings.js +102 -0
  151. package/dist/services/setup.d.ts +4 -5
  152. package/dist/services/setup.js +40 -28
  153. package/dist/services/standards.js +10 -1
  154. package/dist/services/status.js +0 -1
  155. package/dist/services/taskContext.js +0 -1
  156. package/dist/services/tasks.js +9 -1
  157. package/dist/services/verify.js +7 -2
  158. package/dist/sessions/session.js +0 -1
  159. package/dist/standards/acquisition/ingest.js +0 -1
  160. package/dist/standards/applicability/engine.js +0 -1
  161. package/dist/standards/builtin/code-quality.js +0 -1
  162. package/dist/standards/builtin/database-safety.js +0 -1
  163. package/dist/standards/builtin/index.js +0 -1
  164. package/dist/standards/builtin/security-baseline.js +0 -1
  165. package/dist/standards/builtin/testing-contracts.js +0 -1
  166. package/dist/standards/builtin/undo-kit.js +0 -1
  167. package/dist/standards/config/config.js +0 -1
  168. package/dist/standards/distribution/cache.js +0 -1
  169. package/dist/standards/distribution/index.js +0 -1
  170. package/dist/standards/distribution/keys.js +0 -1
  171. package/dist/standards/distribution/package.js +0 -1
  172. package/dist/standards/distribution/server.js +0 -1
  173. package/dist/standards/distribution/sync.js +0 -1
  174. package/dist/standards/distribution/types.js +0 -1
  175. package/dist/standards/engine/compliance.js +0 -1
  176. package/dist/standards/engine/engine.js +0 -1
  177. package/dist/standards/engine/reporter.js +0 -1
  178. package/dist/standards/index.js +0 -1
  179. package/dist/standards/registry/registry.js +0 -1
  180. package/dist/standards/schema/types.js +0 -1
  181. package/dist/standards/schema/validate.js +0 -1
  182. package/dist/standards/templates/index.js +0 -1
  183. package/dist/standards/validators/database.js +0 -1
  184. package/dist/standards/validators/quality.js +0 -1
  185. package/dist/standards/validators/registry.js +0 -1
  186. package/dist/standards/validators/security.js +0 -1
  187. package/dist/standards/validators/testing.js +0 -1
  188. package/dist/standards/validators/types.js +0 -1
  189. package/dist/standards/validators/undo-kit.js +0 -1
  190. package/dist/tasks/routing.js +0 -1
  191. package/dist/tasks/task.js +0 -1
  192. package/dist/utils/cleanup.js +0 -1
  193. package/dist/utils/fs.js +0 -1
  194. package/dist/utils/lock.js +92 -49
  195. package/dist/utils/logger.js +0 -1
  196. package/dist/utils/paths.js +0 -1
  197. package/dist/utils/proc.d.ts +8 -0
  198. package/dist/utils/proc.js +54 -46
  199. package/dist/verification/safety.js +0 -1
  200. package/dist/verification/scope.js +0 -1
  201. package/docs/architecture/global-standards-architecture.md +287 -0
  202. package/docs/archive/global-standards/GLOBAL_STANDARDS_AUDIT.md +99 -0
  203. package/docs/archive/global-standards/GLOBAL_STANDARDS_FINAL_STATUS.md +138 -0
  204. package/docs/archive/global-standards/GLOBAL_STANDARDS_IMPLEMENTATION_PLAN.md +100 -0
  205. package/docs/archive/global-standards/GLOBAL_STANDARDS_INDEPENDENT_AUDIT.md +219 -0
  206. package/docs/archive/global-standards/GLOBAL_STANDARDS_SECURITY_REPORT.md +184 -0
  207. package/docs/configuration.md +67 -0
  208. package/docs/contributing.md +15 -4
  209. package/docs/development/EXECUTION_STATE.md +50 -0
  210. package/docs/features.md +80 -0
  211. package/docs/getting-started.md +69 -111
  212. package/docs/guides/global-standards-migration.md +100 -0
  213. package/docs/integrations.md +7 -0
  214. package/docs/security/THIRD_PARTY_LICENSES.md +41 -0
  215. package/docs/testing/FINAL_CORRECTION_AND_CLEANUP_REPORT.md +92 -0
  216. package/docs/testing/global-standards-real-project-tests.md +218 -0
  217. package/docs/testing/global-standards-test-report.md +89 -0
  218. package/docs/testing/global-standards-verification-matrix.md +174 -0
  219. package/docs/troubleshooting.md +3 -0
  220. package/package.json +1 -1
  221. package/dist/agents/claude/adapter.js.map +0 -1
  222. package/dist/agents/claude/content.js.map +0 -1
  223. package/dist/agents/codex/adapter.js.map +0 -1
  224. package/dist/agents/copilot/adapter.js.map +0 -1
  225. package/dist/agents/cursor/adapter.js.map +0 -1
  226. package/dist/agents/index.js.map +0 -1
  227. package/dist/agents/shared.js.map +0 -1
  228. package/dist/agents/types.js.map +0 -1
  229. package/dist/cli/args.js.map +0 -1
  230. package/dist/cli/help.js.map +0 -1
  231. package/dist/cli/main.js.map +0 -1
  232. package/dist/cli/render.js.map +0 -1
  233. package/dist/cli/run.js.map +0 -1
  234. package/dist/config/schemas.js.map +0 -1
  235. package/dist/config/validate.js.map +0 -1
  236. package/dist/core/artifacts.js.map +0 -1
  237. package/dist/core/contracts.js.map +0 -1
  238. package/dist/core/migrations.js.map +0 -1
  239. package/dist/core/version.js.map +0 -1
  240. package/dist/core/versioned.js.map +0 -1
  241. package/dist/core/workspace.js.map +0 -1
  242. package/dist/decisions/decision.js.map +0 -1
  243. package/dist/discovery/cache.js.map +0 -1
  244. package/dist/discovery/commands.js.map +0 -1
  245. package/dist/discovery/detect.js.map +0 -1
  246. package/dist/discovery/docs.js.map +0 -1
  247. package/dist/discovery/entrypoints.js.map +0 -1
  248. package/dist/discovery/ignore.js.map +0 -1
  249. package/dist/discovery/scan.js.map +0 -1
  250. package/dist/discovery/types.js.map +0 -1
  251. package/dist/dx/dashboard.js.map +0 -1
  252. package/dist/dx/guidance.js.map +0 -1
  253. package/dist/dx/index.js.map +0 -1
  254. package/dist/dx/onboarding.js.map +0 -1
  255. package/dist/dx/types.js.map +0 -1
  256. package/dist/errors/index.js.map +0 -1
  257. package/dist/features/schema.js.map +0 -1
  258. package/dist/features/types.js.map +0 -1
  259. package/dist/features/validate.js.map +0 -1
  260. package/dist/git/git.js.map +0 -1
  261. package/dist/index.js.map +0 -1
  262. package/dist/integrations/adapters/agent-skills.js.map +0 -1
  263. package/dist/integrations/adapters/claudePlugin.js.map +0 -1
  264. package/dist/integrations/adapters/graphify.js.map +0 -1
  265. package/dist/integrations/adapters/omniroute.js.map +0 -1
  266. package/dist/integrations/adapters/pluginSkill.js.map +0 -1
  267. package/dist/integrations/adapters/ponytail.js.map +0 -1
  268. package/dist/integrations/exec.js.map +0 -1
  269. package/dist/integrations/index.js.map +0 -1
  270. package/dist/integrations/manager.js.map +0 -1
  271. package/dist/integrations/notices.js.map +0 -1
  272. package/dist/integrations/persistentPath.js.map +0 -1
  273. package/dist/integrations/protect.js.map +0 -1
  274. package/dist/integrations/state.js.map +0 -1
  275. package/dist/integrations/types.js.map +0 -1
  276. package/dist/intelligence/agents/profiles.js.map +0 -1
  277. package/dist/intelligence/agents/registry.js.map +0 -1
  278. package/dist/intelligence/agents/types.js.map +0 -1
  279. package/dist/intelligence/observability/tracer.js.map +0 -1
  280. package/dist/intelligence/observability/types.js.map +0 -1
  281. package/dist/intelligence/orchestration/engine.js.map +0 -1
  282. package/dist/intelligence/orchestration/lock-manager.js.map +0 -1
  283. package/dist/intelligence/orchestration/store.js.map +0 -1
  284. package/dist/intelligence/orchestration/types.js.map +0 -1
  285. package/dist/intelligence/routing/matcher.js.map +0 -1
  286. package/dist/intelligence/routing/router.js.map +0 -1
  287. package/dist/intelligence/routing/types.js.map +0 -1
  288. package/dist/intelligence/runtime/adk/adapter.js.map +0 -1
  289. package/dist/intelligence/runtime/adk/detector.js.map +0 -1
  290. package/dist/intelligence/runtime/boundary.js.map +0 -1
  291. package/dist/intelligence/runtime/external.js.map +0 -1
  292. package/dist/intelligence/runtime/native.js.map +0 -1
  293. package/dist/intelligence/runtime/types.js.map +0 -1
  294. package/dist/intelligence/security/audit.js.map +0 -1
  295. package/dist/intelligence/security/policy.js.map +0 -1
  296. package/dist/intelligence/security/types.js.map +0 -1
  297. package/dist/intelligence/skills/builtins.js.map +0 -1
  298. package/dist/intelligence/skills/loader.js.map +0 -1
  299. package/dist/intelligence/skills/registry.js.map +0 -1
  300. package/dist/intelligence/skills/types.js.map +0 -1
  301. package/dist/intelligence/verification/engine.js.map +0 -1
  302. package/dist/intelligence/verification/reviewer.js.map +0 -1
  303. package/dist/intelligence/verification/types.js.map +0 -1
  304. package/dist/knowledge/facts.js.map +0 -1
  305. package/dist/mcp/protocol.js.map +0 -1
  306. package/dist/mcp/server.js.map +0 -1
  307. package/dist/mcp/setup.js.map +0 -1
  308. package/dist/mcp/tools.js.map +0 -1
  309. package/dist/mcp/types.js.map +0 -1
  310. package/dist/mcp/verify.js.map +0 -1
  311. package/dist/portability/bundle.js.map +0 -1
  312. package/dist/prompts/onboarding.js.map +0 -1
  313. package/dist/prompts/refresh.js.map +0 -1
  314. package/dist/prompts/requirements.js.map +0 -1
  315. package/dist/security/files.js.map +0 -1
  316. package/dist/security/redact.js.map +0 -1
  317. package/dist/services/agent.js.map +0 -1
  318. package/dist/services/analysis.js.map +0 -1
  319. package/dist/services/common.js.map +0 -1
  320. package/dist/services/doctor.js.map +0 -1
  321. package/dist/services/drift.js.map +0 -1
  322. package/dist/services/features.js.map +0 -1
  323. package/dist/services/graph.js.map +0 -1
  324. package/dist/services/init.js.map +0 -1
  325. package/dist/services/integrations.js.map +0 -1
  326. package/dist/services/intelligence.js.map +0 -1
  327. package/dist/services/knowledge.js.map +0 -1
  328. package/dist/services/migrate.js.map +0 -1
  329. package/dist/services/portability.js.map +0 -1
  330. package/dist/services/records.js.map +0 -1
  331. package/dist/services/refresh.js.map +0 -1
  332. package/dist/services/reset.js.map +0 -1
  333. package/dist/services/setup.js.map +0 -1
  334. package/dist/services/standards.js.map +0 -1
  335. package/dist/services/status.js.map +0 -1
  336. package/dist/services/taskContext.js.map +0 -1
  337. package/dist/services/tasks.js.map +0 -1
  338. package/dist/services/verify.js.map +0 -1
  339. package/dist/sessions/session.js.map +0 -1
  340. package/dist/standards/acquisition/ingest.js.map +0 -1
  341. package/dist/standards/applicability/engine.js.map +0 -1
  342. package/dist/standards/builtin/code-quality.js.map +0 -1
  343. package/dist/standards/builtin/database-safety.js.map +0 -1
  344. package/dist/standards/builtin/index.js.map +0 -1
  345. package/dist/standards/builtin/security-baseline.js.map +0 -1
  346. package/dist/standards/builtin/testing-contracts.js.map +0 -1
  347. package/dist/standards/builtin/undo-kit.js.map +0 -1
  348. package/dist/standards/config/config.js.map +0 -1
  349. package/dist/standards/distribution/cache.js.map +0 -1
  350. package/dist/standards/distribution/index.js.map +0 -1
  351. package/dist/standards/distribution/keys.js.map +0 -1
  352. package/dist/standards/distribution/package.js.map +0 -1
  353. package/dist/standards/distribution/server.js.map +0 -1
  354. package/dist/standards/distribution/sync.js.map +0 -1
  355. package/dist/standards/distribution/types.js.map +0 -1
  356. package/dist/standards/engine/compliance.js.map +0 -1
  357. package/dist/standards/engine/engine.js.map +0 -1
  358. package/dist/standards/engine/reporter.js.map +0 -1
  359. package/dist/standards/index.js.map +0 -1
  360. package/dist/standards/registry/registry.js.map +0 -1
  361. package/dist/standards/schema/types.js.map +0 -1
  362. package/dist/standards/schema/validate.js.map +0 -1
  363. package/dist/standards/templates/index.js.map +0 -1
  364. package/dist/standards/validators/database.js.map +0 -1
  365. package/dist/standards/validators/quality.js.map +0 -1
  366. package/dist/standards/validators/registry.js.map +0 -1
  367. package/dist/standards/validators/security.js.map +0 -1
  368. package/dist/standards/validators/testing.js.map +0 -1
  369. package/dist/standards/validators/types.js.map +0 -1
  370. package/dist/standards/validators/undo-kit.js.map +0 -1
  371. package/dist/tasks/routing.js.map +0 -1
  372. package/dist/tasks/task.js.map +0 -1
  373. package/dist/utils/cleanup.js.map +0 -1
  374. package/dist/utils/fs.js.map +0 -1
  375. package/dist/utils/lock.js.map +0 -1
  376. package/dist/utils/logger.js.map +0 -1
  377. package/dist/utils/paths.js.map +0 -1
  378. package/dist/utils/proc.js.map +0 -1
  379. package/dist/verification/safety.js.map +0 -1
  380. package/dist/verification/scope.js.map +0 -1
@@ -59,4 +59,3 @@ export const copilotAdapter = {
59
59
  ];
60
60
  },
61
61
  };
62
- //# sourceMappingURL=adapter.js.map
@@ -124,4 +124,3 @@ export const cursorAdapter = {
124
124
  return changes;
125
125
  },
126
126
  };
127
- //# sourceMappingURL=adapter.js.map
@@ -51,4 +51,3 @@ export async function detectActiveAgents(root) {
51
51
  }
52
52
  return active;
53
53
  }
54
- //# sourceMappingURL=index.js.map
@@ -73,4 +73,3 @@ export function removeManagedSection(text) {
73
73
  const trimmed = next.trim();
74
74
  return { content: trimmed === '' ? '' : trimmed + eol, empty: trimmed === '' };
75
75
  }
76
- //# sourceMappingURL=shared.js.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=types.js.map
@@ -314,6 +314,22 @@ export declare const OPTIONS: {
314
314
  readonly 'no-standards': {
315
315
  readonly type: "boolean";
316
316
  };
317
+ readonly preset: {
318
+ readonly type: "string";
319
+ };
320
+ readonly features: {
321
+ readonly type: "string";
322
+ readonly multiple: true;
323
+ };
324
+ readonly edit: {
325
+ readonly type: "boolean";
326
+ };
327
+ readonly interactive: {
328
+ readonly type: "boolean";
329
+ };
330
+ readonly 'non-interactive': {
331
+ readonly type: "boolean";
332
+ };
317
333
  };
318
334
  export interface ParsedArgs {
319
335
  positionals: string[];
package/dist/cli/args.js CHANGED
@@ -99,6 +99,11 @@ export const OPTIONS = {
99
99
  privacy: { type: 'string' },
100
100
  save: { type: 'boolean' },
101
101
  'no-standards': { type: 'boolean' },
102
+ preset: { type: 'string' },
103
+ features: { type: 'string', multiple: true },
104
+ edit: { type: 'boolean' },
105
+ interactive: { type: 'boolean' },
106
+ 'non-interactive': { type: 'boolean' },
102
107
  };
103
108
  export function parseCli(argv) {
104
109
  try {
@@ -146,4 +151,3 @@ export function int(v, k) {
146
151
  throw new DevWorkspaceError('USAGE', `--${k} must be an integer (got "${s}").`);
147
152
  return n;
148
153
  }
149
- //# sourceMappingURL=args.js.map
package/dist/cli/help.js CHANGED
@@ -19,44 +19,88 @@ export const COMMANDS = [
19
19
  },
20
20
  {
21
21
  name: 'setup',
22
- summary: 'Single-command repository setup (inspect, initialize, discover contract & validate)',
22
+ summary: 'Guided first-run setup (interactive wizard in terminal, deterministic flags in CI)',
23
23
  usage: [
24
24
  'devworkspace setup',
25
+ 'devworkspace setup --preset minimal|recommended|full|custom [--agent <id>] [--features <ids>] [--dry-run] [--yes]',
26
+ 'devworkspace setup --edit',
25
27
  'devworkspace setup --agent claude-code|codex|antigravity|all|auto [--check] [--no-verify] [--launcher auto|direct|npx] [--package-version <v>]',
26
28
  'devworkspace setup --integrations [--yes] [--dry-run] [--scope project|user] [--only graphify,agent-skills,ponytail]',
27
29
  ],
28
30
  options: [
29
- ['--agent <name>', 'initialize if needed, configure MCP for agent (claude-code, codex, antigravity, all, auto = detect) and verify the server starts'],
31
+ ['--preset <name>', 'choose minimal, recommended, full, or custom'],
32
+ ['--features <ids>', 'with --preset custom: comma-separated capability IDs'],
33
+ ['--edit', 're-open setup with current project settings pre-selected'],
34
+ ['--non-interactive', 'never prompt interactively (use explicit flags or safe minimal default)'],
35
+ ['--agent <name>', 'configure coding agent (claude-code, codex, cursor, copilot, antigravity, all, auto, none)'],
30
36
  ['--check', 'with --agent: validate and plan without writing files'],
31
37
  ['--no-verify', 'with --agent: skip starting the MCP server to verify it'],
32
38
  ['--launcher auto|direct|npx', 'how agents start the server (default auto: PATH binary if version-matched, else npx)'],
33
39
  ['--package-version <v>', 'pin the npx launcher to devworkspace@<v>'],
34
- ['--integrations', 'set up external integrations (Graphify, Agent Skills, Ponytail)'],
40
+ ['--integrations', 'set up optional external integrations (Graphify, Agent Skills, Ponytail)'],
35
41
  ['--dry-run', 'show exactly what would run; changes nothing'],
36
- ['--yes', 'with --integrations: approve machine-level and third-party installs'],
37
- ['--scope project|user', 'where to install (default: project; user needs --yes)'],
38
- ['--only <ids>', 'comma-separated: graphify, agent-skills, ponytail'],
42
+ ['--yes', 'confirm explicit consent when applying selected integrations or user-scope writes'],
43
+ ['--scope project|user', 'where to configure (default: project; user needs explicit consent)'],
44
+ ['--only <ids>', 'comma-separated external tools: graphify, agent-skills, ponytail, omniroute'],
39
45
  ...COMMON,
40
46
  ],
41
47
  examples: [
42
48
  'devworkspace setup',
43
- 'devworkspace setup --agent claude-code',
44
- 'devworkspace setup --agent antigravity --check',
45
- 'devworkspace setup --json',
46
- 'devworkspace setup --integrations --yes',
49
+ 'devworkspace setup --preset minimal --dry-run',
50
+ 'devworkspace setup --preset recommended --agent claude-code',
51
+ 'devworkspace setup --preset custom --features workflow.tasks,workflow.decisions',
52
+ 'devworkspace setup --edit',
53
+ 'devworkspace setup --integrations --yes --only graphify',
54
+ ],
55
+ },
56
+ {
57
+ name: 'settings',
58
+ summary: 'Inspect or modify DevWorkspace project setup choices and enabled capabilities',
59
+ usage: ['devworkspace settings [show|edit] [--json]'],
60
+ options: [
61
+ ['show', 'display current preset, agent, capability states, and integration statuses (default)'],
62
+ ['edit', 're-run guided setup to adjust choices safely without losing project knowledge'],
63
+ ...COMMON,
64
+ ],
65
+ examples: ['devworkspace settings', 'devworkspace settings show --json', 'devworkspace settings edit'],
66
+ },
67
+ {
68
+ name: 'modules',
69
+ summary: 'Inspect, enable, disable, or configure optional DevWorkspace capability modules',
70
+ usage: [
71
+ 'devworkspace modules list [--json]',
72
+ 'devworkspace modules show <id>',
73
+ 'devworkspace modules enable <id> [--yes] [--dry-run]',
74
+ 'devworkspace modules disable <id> [--force] [--dry-run]',
75
+ 'devworkspace modules configure <id> --key <key> --value <val> [--dry-run]',
76
+ ],
77
+ options: [
78
+ ['--yes, -y', 'confirm explicit consent for optional third-party external integrations'],
79
+ ['--force, -f', 'when disabling, also disable dependent optional modules safely without deleting data'],
80
+ ['--key <name>', 'module configuration key (e.g. launcher, scope, autoDetect, maxRetries)'],
81
+ ['--value <val>', 'non-secret configuration value'],
82
+ ...COMMON,
83
+ ],
84
+ examples: [
85
+ 'devworkspace modules list',
86
+ 'devworkspace modules show intelligence.graph',
87
+ 'devworkspace modules enable workflow.standards',
88
+ 'devworkspace modules disable dx.dashboard --dry-run',
89
+ 'devworkspace modules configure agent.mcp --key scope --value project',
47
90
  ],
48
91
  },
49
92
  {
50
93
  name: 'integrations',
51
94
  summary: 'Show or repair the integration installation (observed, not assumed)',
52
95
  usage: [
53
- 'devworkspace integrations status [--quick] [--restarted] [--strict]',
96
+ 'devworkspace integrations status [--quick] [--restarted] [--all] [--strict]',
54
97
  'devworkspace integrations repair [--yes] [--dry-run] [--only <ids>] [--scope project|user]',
55
98
  ],
56
99
  options: [
57
100
  ['--quick', 'only look at files and PATH (fast, but nothing can show VERIFIED)'],
58
101
  ['--restarted', 'record that you restarted Claude Code, clearing RESTART_REQUIRED'],
59
- ['--strict', 'exit 3 unless every required integration is VERIFIED'],
102
+ ['--all', 'diagnostic override: also inspect disabled integration modules'],
103
+ ['--strict', 'exit 3 unless every enabled required integration is VERIFIED'],
60
104
  ...COMMON,
61
105
  ],
62
106
  examples: ['devworkspace integrations status', 'devworkspace integrations repair --yes'],
@@ -448,12 +492,11 @@ export function topHelp(version) {
448
492
  '',
449
493
  'Quick start:',
450
494
  ' cd my-project',
451
- ' npx devworkspace init',
452
- ' npx devworkspace analyze',
453
- ' # paste .devworkspace/analysis/onboarding-prompt.md into Claude Code',
495
+ ' npx devworkspace setup',
496
+ ' # Interactive wizard in your terminal; non-interactive/CI supports --preset minimal|recommended|full --agent <id> --dry-run',
454
497
  '',
455
498
  'Global options: --json --cwd <dir> --debug --no-color --ascii --help --version',
456
- '(DevWorkspace never prompts interactively; destructive commands such as reset require --yes.)',
499
+ '(Non-interactive/CI runs never prompt; external tool installs, user-level changes, and reset require explicit consent.)',
457
500
  'Exit codes: 0 ok · 1 failure · 2 usage error or approval needed · 3 warnings (--strict) or setup finished but not fully verified · 130 interrupted',
458
501
  'Run "devworkspace <command> --help" for details.',
459
502
  ].join('\n');
@@ -473,4 +516,3 @@ export function commandHelp(c) {
473
516
  ...c.examples.map((e) => ` ${e}`),
474
517
  ].join('\n');
475
518
  }
476
- //# sourceMappingURL=help.js.map
package/dist/cli/main.js CHANGED
@@ -16,4 +16,3 @@ run(process.argv.slice(2)).then((code) => {
16
16
  process.stderr.write(`✗ Fatal: ${e instanceof Error ? e.message : String(e)}\n`);
17
17
  process.exitCode = EXIT.FAILURE;
18
18
  });
19
- //# sourceMappingURL=main.js.map
@@ -0,0 +1,15 @@
1
+ export interface PromptChoiceOption {
2
+ value: string;
3
+ label: string;
4
+ description?: string;
5
+ }
6
+ export interface PromptAdapter {
7
+ selectOne(question: string, options: PromptChoiceOption[], defaultValue: string, allowBack?: boolean): Promise<string | 'BACK' | 'CANCEL'>;
8
+ confirm(question: string, defaultYes?: boolean): Promise<boolean | 'BACK' | 'CANCEL'>;
9
+ selectMany?(question: string, options: PromptChoiceOption[], defaults: string[], allowBack?: boolean): Promise<string[] | 'BACK' | 'CANCEL'>;
10
+ }
11
+ /**
12
+ * Lightweight zero-dependency TTY prompter built on node:readline/promises.
13
+ * Never touches stdin when not interactive; handles Ctrl+C / EOF cleanly as CANCEL.
14
+ */
15
+ export declare function createReadlinePromptAdapter(stdout: (s: string) => void, input?: NodeJS.ReadableStream, output?: NodeJS.WritableStream): PromptAdapter;
@@ -0,0 +1,113 @@
1
+ import readline from 'node:readline/promises';
2
+ /**
3
+ * Lightweight zero-dependency TTY prompter built on node:readline/promises.
4
+ * Never touches stdin when not interactive; handles Ctrl+C / EOF cleanly as CANCEL.
5
+ */
6
+ export function createReadlinePromptAdapter(stdout, input = process.stdin, output = process.stderr) {
7
+ const askRaw = async (promptText) => {
8
+ const rl = readline.createInterface({ input, output });
9
+ let sigintHit = false;
10
+ const onSigint = () => {
11
+ sigintHit = true;
12
+ rl.close();
13
+ };
14
+ rl.once('SIGINT', onSigint);
15
+ try {
16
+ const answer = await rl.question(promptText);
17
+ return sigintHit ? null : answer.trim();
18
+ }
19
+ catch {
20
+ return null;
21
+ }
22
+ finally {
23
+ rl.removeListener('SIGINT', onSigint);
24
+ rl.close();
25
+ }
26
+ };
27
+ return {
28
+ async selectOne(question, options, defaultValue, allowBack = false) {
29
+ stdout(`\n${question}\n`);
30
+ options.forEach((opt, idx) => {
31
+ const mark = opt.value === defaultValue ? ' (default)' : '';
32
+ const desc = opt.description ? ` — ${opt.description}` : '';
33
+ stdout(` ${idx + 1}. ${opt.label}${mark}${desc}\n`);
34
+ });
35
+ const nav = allowBack ? ' [b=back, q=cancel]' : ' [q=cancel]';
36
+ const defaultIdx = Math.max(1, options.findIndex((o) => o.value === defaultValue) + 1);
37
+ for (;;) {
38
+ const raw = await askRaw(`Choose [1-${options.length}] (default ${defaultIdx})${nav}: `);
39
+ if (raw === null)
40
+ return 'CANCEL';
41
+ const lower = raw.toLowerCase();
42
+ if (lower === 'q' || lower === 'cancel' || lower === 'exit')
43
+ return 'CANCEL';
44
+ if (allowBack && (lower === 'b' || lower === 'back'))
45
+ return 'BACK';
46
+ if (raw === '')
47
+ return defaultValue;
48
+ const num = Number.parseInt(raw, 10);
49
+ if (Number.isInteger(num) && num >= 1 && num <= options.length) {
50
+ return options[num - 1].value;
51
+ }
52
+ const byValue = options.find((o) => o.value.toLowerCase() === lower || o.label.toLowerCase() === lower);
53
+ if (byValue)
54
+ return byValue.value;
55
+ stdout(`Please enter a number from 1 to ${options.length}${allowBack ? ', b to go back,' : ''} or q to cancel.\n`);
56
+ }
57
+ },
58
+ async confirm(question, defaultYes = true) {
59
+ const hint = defaultYes ? '[Y/n/q]' : '[y/N/q]';
60
+ for (;;) {
61
+ const raw = await askRaw(`${question} ${hint}: `);
62
+ if (raw === null)
63
+ return 'CANCEL';
64
+ const lower = raw.toLowerCase();
65
+ if (lower === 'q' || lower === 'cancel' || lower === 'exit')
66
+ return 'CANCEL';
67
+ if (lower === 'b' || lower === 'back')
68
+ return 'BACK';
69
+ if (raw === '')
70
+ return defaultYes;
71
+ if (lower === 'y' || lower === 'yes')
72
+ return true;
73
+ if (lower === 'n' || lower === 'no')
74
+ return false;
75
+ stdout('Please enter y, n, or q to cancel.\n');
76
+ }
77
+ },
78
+ async selectMany(question, options, defaults, allowBack = false) {
79
+ stdout(`\n${question}\n`);
80
+ options.forEach((opt, idx) => {
81
+ const checked = defaults.includes(opt.value) ? '[x]' : '[ ]';
82
+ const desc = opt.description ? ` — ${opt.description}` : '';
83
+ stdout(` ${idx + 1}. ${checked} ${opt.label}${desc}\n`);
84
+ });
85
+ const nav = allowBack ? ' (b=back, q=cancel)' : ' (q=cancel)';
86
+ const raw = await askRaw(`Enter comma-separated numbers, "none", or press Enter to keep defaults${nav}: `);
87
+ if (raw === null)
88
+ return 'CANCEL';
89
+ const lower = raw.toLowerCase();
90
+ if (lower === 'q' || lower === 'cancel' || lower === 'exit')
91
+ return 'CANCEL';
92
+ if (allowBack && (lower === 'b' || lower === 'back'))
93
+ return 'BACK';
94
+ if (raw === '')
95
+ return [...defaults];
96
+ if (lower === 'none')
97
+ return [];
98
+ const chosen = [];
99
+ for (const token of raw.split(',').map((s) => s.trim()).filter(Boolean)) {
100
+ const num = Number.parseInt(token, 10);
101
+ if (Number.isInteger(num) && num >= 1 && num <= options.length) {
102
+ chosen.push(options[num - 1].value);
103
+ }
104
+ else {
105
+ const match = options.find((o) => o.value.toLowerCase() === token.toLowerCase());
106
+ if (match)
107
+ chosen.push(match.value);
108
+ }
109
+ }
110
+ return [...new Set(chosen)];
111
+ },
112
+ };
113
+ }
@@ -17,6 +17,9 @@ import type { IntegrationsStatus } from '../services/integrations.js';
17
17
  import type { FeatureItem, FeatureValidationReport } from '../features/types.js';
18
18
  import type { FeatureSummary } from '../services/features.js';
19
19
  import type { ProjectSetupResult } from '../services/setup.js';
20
+ import type { GuidedSetupPreview, GuidedSetupResult } from '../dx/guided-setup.js';
21
+ import type { SettingsSummaryResult } from '../services/settings.js';
22
+ import type { ModuleConfigureResult, ModuleDetailResult, ModulesListResult, ModuleToggleResult } from '../services/modules.js';
20
23
  import type { GraphGenerateResult, GraphStatusResult, GraphTraceResult } from '../services/graph.js';
21
24
  import type { McpSetupResult } from '../mcp/setup.js';
22
25
  import type { EngineeringStandard, StandardsAuditReport, RegistryValidationResult } from '../standards/schema/types.js';
@@ -67,6 +70,13 @@ export declare function renderFeature(s: Style, f: FeatureItem): string;
67
70
  export declare function renderFeatureList(s: Style, features: FeatureSummary[]): string;
68
71
  export declare function renderFeatureValidation(s: Style, rep: FeatureValidationReport): string;
69
72
  export declare function renderProjectSetup(s: Style, r: ProjectSetupResult): string;
73
+ export declare function renderGuidedPreview(s: Style, p: GuidedSetupPreview): string;
74
+ export declare function renderGuidedSetup(s: Style, r: GuidedSetupResult): string;
75
+ export declare function renderSettingsSummary(s: Style, r: SettingsSummaryResult): string;
76
+ export declare function renderModulesList(s: Style, r: ModulesListResult): string;
77
+ export declare function renderModuleDetail(s: Style, r: ModuleDetailResult): string;
78
+ export declare function renderModuleToggle(s: Style, r: ModuleToggleResult): string;
79
+ export declare function renderModuleConfigure(s: Style, r: ModuleConfigureResult): string;
70
80
  export declare function renderGraphStatus(s: Style, res: GraphStatusResult): string;
71
81
  export declare function renderGraphTrace(s: Style, trace: GraphTraceResult): string;
72
82
  export declare function renderGraphGenerate(s: Style, res: GraphGenerateResult): string;
@@ -14,6 +14,8 @@ function statusMark(s, r) {
14
14
  switch (r.status) {
15
15
  case 'VERIFIED':
16
16
  return s.ok(s.sym.ok);
17
+ case 'DISABLED':
18
+ return s.dim(s.sym.info);
17
19
  case 'FAILED':
18
20
  case 'PREREQUISITES_MISSING':
19
21
  return s.fail(s.sym.fail);
@@ -42,7 +44,7 @@ function integrationDetails(s, r, indent = ' ') {
42
44
  }
43
45
  /** What to suggest after a quick (shallow) integration check. Never tells the user to install what is already present. */
44
46
  export function integrationAdvice(items) {
45
- const required = items.filter((i) => i.required);
47
+ const required = items.filter((i) => i.required && i.status !== 'DISABLED');
46
48
  const missing = required.filter((i) => i.status === 'NOT_INSTALLED' || i.status === 'PREREQUISITES_MISSING' || i.status === 'FAILED');
47
49
  if (missing.length > 0)
48
50
  return ['Install and verify them with: devworkspace setup --integrations --yes'];
@@ -112,7 +114,7 @@ export function renderDoctor(s, r) {
112
114
  L.push('', 'Integrations (observed by running the tools):');
113
115
  for (const i of r.integrations) {
114
116
  L.push(` ${integrationLine(s, i)}`);
115
- if (i.status !== 'VERIFIED' && (i.required || i.status !== 'NOT_INSTALLED'))
117
+ if (i.status !== 'VERIFIED' && i.status !== 'DISABLED' && (i.required || i.status !== 'NOT_INSTALLED'))
116
118
  L.push(...integrationDetails(s, i, ' ').filter((_, k) => k < 6));
117
119
  }
118
120
  const coreText = !r.healthy ? 'core workspace has problems' : r.ready ? 'core ready' : 'core healthy, onboarding incomplete';
@@ -585,7 +587,11 @@ export function renderProjectSetup(s, r) {
585
587
  }
586
588
  L.push(s.bold('Integrations:'));
587
589
  for (const i of r.integrations) {
588
- const mark = i.status === 'VERIFIED' ? s.ok(s.sym.ok) : i.status === 'NOT_INSTALLED' ? s.dim('-') : s.warn(s.sym.warn);
590
+ const mark = i.status === 'VERIFIED'
591
+ ? s.ok(s.sym.ok)
592
+ : i.status === 'NOT_INSTALLED' || i.status === 'DISABLED'
593
+ ? s.dim('-')
594
+ : s.warn(s.sym.warn);
589
595
  L.push(` ${mark} ${i.name.padEnd(16)} ${i.status} ${i.required ? '(recommended)' : '(optional)'}`);
590
596
  }
591
597
  L.push('');
@@ -599,6 +605,171 @@ export function renderProjectSetup(s, r) {
599
605
  }
600
606
  return L.join('\n');
601
607
  }
608
+ export function renderGuidedPreview(s, p) {
609
+ const L = [
610
+ '',
611
+ s.bold('Review Setup Plan:'),
612
+ ` Workspace: ${p.root}${p.alreadyInitialized ? ' (existing — knowledge preserved)' : ' (new .devworkspace/)'}`,
613
+ ` Preset: ${p.preset}`,
614
+ ` Coding agent: ${p.agent ?? 'none (skip for now)'}${p.agent ? ` (${p.agentMethod}, ${p.scope} scope)` : ''}`,
615
+ ` Capabilities: ${p.enabledFeatures.join(', ')}`,
616
+ ' Will create/update:',
617
+ ];
618
+ for (const f of p.plannedFiles) {
619
+ L.push(` - [${f.kind.toUpperCase()}] ${f.path} (${f.note})`);
620
+ }
621
+ L.push(p.externalInstalls.length > 0
622
+ ? ` Will install external tools: ${p.externalInstalls.map((e) => `${e.name} (${e.scope})`).join(', ')}`
623
+ : ' Will install external tools: none');
624
+ L.push(p.userLevelChanges.length > 0
625
+ ? ` User/global changes: ${p.userLevelChanges.join(', ')}`
626
+ : ' User/global changes: none');
627
+ L.push(` ${s.dim(p.untouchedNotice)}`);
628
+ for (const w of p.warnings) {
629
+ L.push(` ${s.warn(s.sym.warn)} ${w}`);
630
+ }
631
+ return L.join('\n');
632
+ }
633
+ export function renderGuidedSetup(s, r) {
634
+ if (r.cancelled) {
635
+ return `${s.sym.info} Setup cancelled. No changes were written.`;
636
+ }
637
+ if (r.dryRun) {
638
+ return [
639
+ `${s.sym.info} Dry run (${r.preset}): preview only — nothing written or installed.`,
640
+ renderGuidedPreview(s, r.preview),
641
+ '',
642
+ `${s.sym.arrow} Next: ${r.nextStep}`,
643
+ ].join('\n');
644
+ }
645
+ const L = [
646
+ `${s.ok(s.sym.ok)} DevWorkspace Setup complete (${r.preset}).`,
647
+ ` Workspace: ${r.root}`,
648
+ ` Agent: ${r.agent ?? 'none'}${r.agent ? ` (${r.agentMethod}, ${r.scope})` : ''}`,
649
+ ` Settings: .devworkspace/settings.json`,
650
+ ];
651
+ if (r.mcpResult?.verification) {
652
+ const ok = r.mcpResult.verification.ok;
653
+ L.push(` MCP check: ${ok ? s.ok('local server verified (stdio initialize + tools)') : s.warn(`failed (${r.mcpResult.verification.failedStage ?? 'verify'})`)}`);
654
+ }
655
+ if (r.integrationsResult) {
656
+ for (const out of r.integrationsResult.outcomes.filter((x) => x.action !== 'not-selected')) {
657
+ L.push(` Tool ${out.name}: ${out.report.status}`);
658
+ }
659
+ }
660
+ if (r.doctor) {
661
+ L.push(` Health: ${r.doctor.healthy ? s.ok('READY') : s.warn('NEEDS ATTENTION')} (${r.doctor.counts.pass} pass, ${r.doctor.counts.warn} warn, ${r.doctor.counts.fail} fail)`);
662
+ }
663
+ L.push('');
664
+ L.push(`${s.bold('Next step:')} ${r.nextStep}`);
665
+ L.push(`${s.dim('Inspect or change anytime: devworkspace settings')}`);
666
+ return L.join('\n');
667
+ }
668
+ export function renderSettingsSummary(s, r) {
669
+ const L = [s.bold('DevWorkspace Settings')];
670
+ if (!r.initialized) {
671
+ L.push(` Workspace: Not initialized (${r.root})`);
672
+ for (const h of r.howToChange)
673
+ L.push(` ${s.sym.arrow} ${h}`);
674
+ return L.join('\n');
675
+ }
676
+ if (r.recoveryWarning) {
677
+ L.push(` ${s.warn(s.sym.warn)} ${r.recoveryWarning}`);
678
+ }
679
+ L.push(` Preset: ${r.preset}${r.persisted ? '' : r.migratedFromLegacy ? ' (inferred from existing workspace)' : ' (fallback default)'}`);
680
+ L.push(` Coding agent: ${r.agent.selected ?? 'None configured'}${r.agent.selected ? ` (${r.agent.method}, ${r.agent.scope} scope)` : ''}`);
681
+ L.push(` Restart needed: ${r.restartRequired ? s.warn('YES (reload coding agent)') : 'No'}`);
682
+ L.push('');
683
+ L.push(s.bold('Capabilities:'));
684
+ for (const cap of r.capabilities) {
685
+ const tag = cap.state === 'ENABLED' ? s.ok('Enabled') : s.dim('Disabled');
686
+ L.push(` - ${cap.label}: ${tag}`);
687
+ }
688
+ L.push('');
689
+ L.push(s.bold('Optional Integrations:'));
690
+ for (const intg of r.integrations) {
691
+ L.push(` - ${intg.name}: ${intg.status}`);
692
+ }
693
+ L.push('');
694
+ L.push(s.bold('How to change:'));
695
+ for (const h of r.howToChange)
696
+ L.push(` ${s.sym.arrow} ${h}`);
697
+ return L.join('\n');
698
+ }
699
+ export function renderModulesList(s, r) {
700
+ const L = [s.bold(`DevWorkspace Modules (preset: ${r.preset})`)];
701
+ if (!r.initialized) {
702
+ L.push(` Workspace: Not initialized (${r.root})`);
703
+ }
704
+ if (r.recoveryWarning) {
705
+ L.push(` ${s.warn(s.sym.warn)} ${r.recoveryWarning}`);
706
+ }
707
+ const categories = ['core', 'agent', 'workflow', 'intelligence', 'experience', 'integration'];
708
+ for (const cat of categories) {
709
+ const items = r.modules.filter((m) => m.category === cat);
710
+ if (items.length === 0)
711
+ continue;
712
+ L.push('');
713
+ L.push(s.bold(`${cat[0].toUpperCase()}${cat.slice(1)}:`));
714
+ for (const m of items) {
715
+ const badge = m.enabled ? s.ok('[ON ]') : s.dim('[OFF]');
716
+ const lock = !m.canDisable ? s.dim(' (core)') : m.dataPolicy === 'external-tool-may-run' ? s.warn(' (external consent)') : '';
717
+ L.push(` ${badge} ${s.bold(m.id.padEnd(28))} ${m.name}${lock}`);
718
+ }
719
+ }
720
+ L.push('');
721
+ L.push(s.dim('Inspect details: devworkspace modules show <id> | Toggle: devworkspace modules enable|disable <id>'));
722
+ return L.join('\n');
723
+ }
724
+ export function renderModuleDetail(s, r) {
725
+ const m = r.module;
726
+ const L = [
727
+ `${s.bold(m.name)} (${m.id}) ${m.enabled ? s.ok('[ENABLED]') : s.dim('[DISABLED]')}`,
728
+ ` Description: ${m.description}`,
729
+ ` Category: ${m.category} (${m.availability})`,
730
+ ` Install kind: ${m.installKind}`,
731
+ ` Data policy: ${m.dataPolicy}`,
732
+ ` Disableable: ${m.canDisable ? 'Yes (existing data preserved)' : 'No (mandatory core capability)'}`,
733
+ ` Entry points: ${m.entryPoints.join(', ') || 'none'}`,
734
+ ` Data paths: ${m.dataPaths.join(', ') || 'none'}`,
735
+ ];
736
+ if (m.prerequisites.length > 0) {
737
+ L.push(` Prerequisites: ${m.prerequisites.join('; ')}`);
738
+ }
739
+ if (r.dependencyStatus.length > 0) {
740
+ L.push(` Requires: ${r.dependencyStatus.map((d) => `${d.id} (${d.enabled ? 'on' : 'off'})`).join(', ')}`);
741
+ }
742
+ if (r.dependents.length > 0) {
743
+ L.push(` Used by: ${r.dependents.map((d) => `${d.id} (${d.enabled ? 'on' : 'off'})`).join(', ')}`);
744
+ }
745
+ if (m.configKeys.length > 0) {
746
+ L.push(` Config keys: ${m.configKeys.join(', ')}`);
747
+ }
748
+ return L.join('\n');
749
+ }
750
+ export function renderModuleToggle(s, r) {
751
+ const L = [];
752
+ const prefix = r.dryRun ? `${s.sym.info} Dry-run: ` : '';
753
+ const verb = r.action === 'enable' ? 'Enabled' : 'Disabled';
754
+ L.push(`${prefix}${s.ok(s.sym.ok)} ${verb} ${r.moduleId} (preset: ${r.preset})`);
755
+ if (r.autoEnabledDependencies.length > 0) {
756
+ L.push(` Auto-enabled dependencies: ${r.autoEnabledDependencies.join(', ')}`);
757
+ }
758
+ if (r.autoDisabledDependents.length > 0) {
759
+ L.push(` Auto-disabled dependents: ${r.autoDisabledDependents.join(', ')}`);
760
+ }
761
+ for (const w of r.warnings) {
762
+ L.push(` ${s.warn(s.sym.warn)} ${w}`);
763
+ }
764
+ for (const step of r.nextSteps) {
765
+ L.push(` ${s.sym.arrow} ${step}`);
766
+ }
767
+ return L.join('\n');
768
+ }
769
+ export function renderModuleConfigure(s, r) {
770
+ const prefix = r.dryRun ? `${s.sym.info} Dry-run: ` : '';
771
+ return `${prefix}${s.ok(s.sym.ok)} Configured ${r.moduleId}.${r.key} = ${String(r.value)}`;
772
+ }
602
773
  export function renderGraphStatus(s, res) {
603
774
  const L = [];
604
775
  L.push(s.bold('Graphify Knowledge Graph:'));
@@ -782,4 +953,3 @@ export function renderRegistryValidation(s, result) {
782
953
  }
783
954
  return L.join('\n');
784
955
  }
785
- //# sourceMappingURL=render.js.map
package/dist/cli/run.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { type PromptAdapter } from './prompt.js';
1
2
  import type { SetupResult } from '../integrations/manager.js';
2
3
  import type { Runner } from '../integrations/types.js';
3
4
  export interface CliIO {
@@ -8,6 +9,8 @@ export interface CliIO {
8
9
  isTTY: boolean;
9
10
  /** Process runner used by the integration manager (tests inject a fake; the default runs real processes). */
10
11
  runner?: Runner;
12
+ /** Optional prompt adapter for deterministic interactive wizard testing in non-raw TTY harnesses. */
13
+ prompt?: PromptAdapter;
11
14
  }
12
15
  export declare function defaultIO(): CliIO;
13
16
  /** Exit code for a setup run: 0 verified/awaiting restart, 1 failed or blocked, 2 approval needed, 3 finished but not fully verified. */