devworkspace 0.5.0 → 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 (384) hide show
  1. package/CHANGELOG.md +44 -0
  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 +21 -3
  81. package/dist/intelligence/orchestration/engine.js +486 -48
  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 +40 -2
  85. package/dist/intelligence/orchestration/types.js +2 -3
  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 +21 -33
  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 +142 -0
  94. package/dist/intelligence/runtime/boundary.js +845 -0
  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 +38 -61
  99. package/dist/intelligence/runtime/native.js +23 -56
  100. package/dist/intelligence/runtime/types.d.ts +91 -1
  101. package/dist/intelligence/runtime/types.js +11 -2
  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 +30 -8
  111. package/dist/intelligence/verification/engine.js +126 -21
  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 +71 -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.d.ts +1 -0
  169. package/dist/standards/distribution/cache.js +199 -186
  170. package/dist/standards/distribution/index.js +0 -1
  171. package/dist/standards/distribution/keys.js +0 -1
  172. package/dist/standards/distribution/package.js +6 -1
  173. package/dist/standards/distribution/server.js +0 -1
  174. package/dist/standards/distribution/sync.d.ts +7 -2
  175. package/dist/standards/distribution/sync.js +41 -9
  176. package/dist/standards/distribution/types.js +0 -1
  177. package/dist/standards/engine/compliance.js +0 -1
  178. package/dist/standards/engine/engine.js +0 -1
  179. package/dist/standards/engine/reporter.js +0 -1
  180. package/dist/standards/index.js +0 -1
  181. package/dist/standards/registry/registry.js +0 -1
  182. package/dist/standards/schema/types.js +0 -1
  183. package/dist/standards/schema/validate.js +0 -1
  184. package/dist/standards/templates/index.js +0 -1
  185. package/dist/standards/validators/database.js +0 -1
  186. package/dist/standards/validators/quality.js +0 -1
  187. package/dist/standards/validators/registry.js +0 -1
  188. package/dist/standards/validators/security.js +0 -1
  189. package/dist/standards/validators/testing.js +0 -1
  190. package/dist/standards/validators/types.js +0 -1
  191. package/dist/standards/validators/undo-kit.js +0 -1
  192. package/dist/tasks/routing.js +0 -1
  193. package/dist/tasks/task.js +0 -1
  194. package/dist/utils/cleanup.js +0 -1
  195. package/dist/utils/fs.js +0 -1
  196. package/dist/utils/lock.js +92 -49
  197. package/dist/utils/logger.js +0 -1
  198. package/dist/utils/paths.js +0 -1
  199. package/dist/utils/proc.d.ts +12 -0
  200. package/dist/utils/proc.js +106 -44
  201. package/dist/verification/safety.js +0 -1
  202. package/dist/verification/scope.js +0 -1
  203. package/docs/agents.md +15 -0
  204. package/docs/architecture/global-standards-architecture.md +287 -0
  205. package/docs/archive/global-standards/GLOBAL_STANDARDS_AUDIT.md +99 -0
  206. package/docs/archive/global-standards/GLOBAL_STANDARDS_FINAL_STATUS.md +138 -0
  207. package/docs/archive/global-standards/GLOBAL_STANDARDS_IMPLEMENTATION_PLAN.md +100 -0
  208. package/docs/archive/global-standards/GLOBAL_STANDARDS_INDEPENDENT_AUDIT.md +219 -0
  209. package/docs/archive/global-standards/GLOBAL_STANDARDS_SECURITY_REPORT.md +184 -0
  210. package/docs/configuration.md +67 -0
  211. package/docs/contributing.md +15 -5
  212. package/docs/development/EXECUTION_STATE.md +50 -0
  213. package/docs/features.md +80 -0
  214. package/docs/getting-started.md +69 -111
  215. package/docs/guides/global-standards-migration.md +100 -0
  216. package/docs/integrations.md +7 -0
  217. package/docs/mcp.md +13 -0
  218. package/docs/security/THIRD_PARTY_LICENSES.md +41 -0
  219. package/docs/security.md +8 -2
  220. package/docs/testing/FINAL_CORRECTION_AND_CLEANUP_REPORT.md +92 -0
  221. package/docs/testing/global-standards-real-project-tests.md +218 -0
  222. package/docs/testing/global-standards-test-report.md +89 -0
  223. package/docs/testing/global-standards-verification-matrix.md +174 -0
  224. package/docs/troubleshooting.md +3 -0
  225. package/package.json +1 -1
  226. package/dist/agents/claude/adapter.js.map +0 -1
  227. package/dist/agents/claude/content.js.map +0 -1
  228. package/dist/agents/codex/adapter.js.map +0 -1
  229. package/dist/agents/copilot/adapter.js.map +0 -1
  230. package/dist/agents/cursor/adapter.js.map +0 -1
  231. package/dist/agents/index.js.map +0 -1
  232. package/dist/agents/shared.js.map +0 -1
  233. package/dist/agents/types.js.map +0 -1
  234. package/dist/cli/args.js.map +0 -1
  235. package/dist/cli/help.js.map +0 -1
  236. package/dist/cli/main.js.map +0 -1
  237. package/dist/cli/render.js.map +0 -1
  238. package/dist/cli/run.js.map +0 -1
  239. package/dist/config/schemas.js.map +0 -1
  240. package/dist/config/validate.js.map +0 -1
  241. package/dist/core/artifacts.js.map +0 -1
  242. package/dist/core/contracts.js.map +0 -1
  243. package/dist/core/migrations.js.map +0 -1
  244. package/dist/core/version.js.map +0 -1
  245. package/dist/core/versioned.js.map +0 -1
  246. package/dist/core/workspace.js.map +0 -1
  247. package/dist/decisions/decision.js.map +0 -1
  248. package/dist/discovery/cache.js.map +0 -1
  249. package/dist/discovery/commands.js.map +0 -1
  250. package/dist/discovery/detect.js.map +0 -1
  251. package/dist/discovery/docs.js.map +0 -1
  252. package/dist/discovery/entrypoints.js.map +0 -1
  253. package/dist/discovery/ignore.js.map +0 -1
  254. package/dist/discovery/scan.js.map +0 -1
  255. package/dist/discovery/types.js.map +0 -1
  256. package/dist/dx/dashboard.js.map +0 -1
  257. package/dist/dx/guidance.js.map +0 -1
  258. package/dist/dx/index.js.map +0 -1
  259. package/dist/dx/onboarding.js.map +0 -1
  260. package/dist/dx/types.js.map +0 -1
  261. package/dist/errors/index.js.map +0 -1
  262. package/dist/features/schema.js.map +0 -1
  263. package/dist/features/types.js.map +0 -1
  264. package/dist/features/validate.js.map +0 -1
  265. package/dist/git/git.js.map +0 -1
  266. package/dist/index.js.map +0 -1
  267. package/dist/integrations/adapters/agent-skills.js.map +0 -1
  268. package/dist/integrations/adapters/claudePlugin.js.map +0 -1
  269. package/dist/integrations/adapters/graphify.js.map +0 -1
  270. package/dist/integrations/adapters/omniroute.js.map +0 -1
  271. package/dist/integrations/adapters/pluginSkill.js.map +0 -1
  272. package/dist/integrations/adapters/ponytail.js.map +0 -1
  273. package/dist/integrations/exec.js.map +0 -1
  274. package/dist/integrations/index.js.map +0 -1
  275. package/dist/integrations/manager.js.map +0 -1
  276. package/dist/integrations/notices.js.map +0 -1
  277. package/dist/integrations/persistentPath.js.map +0 -1
  278. package/dist/integrations/protect.js.map +0 -1
  279. package/dist/integrations/state.js.map +0 -1
  280. package/dist/integrations/types.js.map +0 -1
  281. package/dist/intelligence/agents/profiles.js.map +0 -1
  282. package/dist/intelligence/agents/registry.js.map +0 -1
  283. package/dist/intelligence/agents/types.js.map +0 -1
  284. package/dist/intelligence/observability/tracer.js.map +0 -1
  285. package/dist/intelligence/observability/types.js.map +0 -1
  286. package/dist/intelligence/orchestration/engine.js.map +0 -1
  287. package/dist/intelligence/orchestration/lock-manager.js.map +0 -1
  288. package/dist/intelligence/orchestration/store.js.map +0 -1
  289. package/dist/intelligence/orchestration/types.js.map +0 -1
  290. package/dist/intelligence/routing/matcher.js.map +0 -1
  291. package/dist/intelligence/routing/router.js.map +0 -1
  292. package/dist/intelligence/routing/types.js.map +0 -1
  293. package/dist/intelligence/runtime/adk/adapter.js.map +0 -1
  294. package/dist/intelligence/runtime/adk/detector.js.map +0 -1
  295. package/dist/intelligence/runtime/external.js.map +0 -1
  296. package/dist/intelligence/runtime/native.js.map +0 -1
  297. package/dist/intelligence/runtime/types.js.map +0 -1
  298. package/dist/intelligence/security/audit.js.map +0 -1
  299. package/dist/intelligence/security/policy.js.map +0 -1
  300. package/dist/intelligence/security/types.js.map +0 -1
  301. package/dist/intelligence/skills/builtins.js.map +0 -1
  302. package/dist/intelligence/skills/loader.js.map +0 -1
  303. package/dist/intelligence/skills/registry.js.map +0 -1
  304. package/dist/intelligence/skills/types.js.map +0 -1
  305. package/dist/intelligence/verification/engine.js.map +0 -1
  306. package/dist/intelligence/verification/reviewer.js.map +0 -1
  307. package/dist/intelligence/verification/types.js.map +0 -1
  308. package/dist/knowledge/facts.js.map +0 -1
  309. package/dist/mcp/protocol.js.map +0 -1
  310. package/dist/mcp/server.js.map +0 -1
  311. package/dist/mcp/setup.js.map +0 -1
  312. package/dist/mcp/tools.js.map +0 -1
  313. package/dist/mcp/types.js.map +0 -1
  314. package/dist/mcp/verify.js.map +0 -1
  315. package/dist/portability/bundle.js.map +0 -1
  316. package/dist/prompts/onboarding.js.map +0 -1
  317. package/dist/prompts/refresh.js.map +0 -1
  318. package/dist/prompts/requirements.js.map +0 -1
  319. package/dist/security/files.js.map +0 -1
  320. package/dist/security/redact.js.map +0 -1
  321. package/dist/services/agent.js.map +0 -1
  322. package/dist/services/analysis.js.map +0 -1
  323. package/dist/services/common.js.map +0 -1
  324. package/dist/services/doctor.js.map +0 -1
  325. package/dist/services/drift.js.map +0 -1
  326. package/dist/services/features.js.map +0 -1
  327. package/dist/services/graph.js.map +0 -1
  328. package/dist/services/init.js.map +0 -1
  329. package/dist/services/integrations.js.map +0 -1
  330. package/dist/services/intelligence.js.map +0 -1
  331. package/dist/services/knowledge.js.map +0 -1
  332. package/dist/services/migrate.js.map +0 -1
  333. package/dist/services/portability.js.map +0 -1
  334. package/dist/services/records.js.map +0 -1
  335. package/dist/services/refresh.js.map +0 -1
  336. package/dist/services/reset.js.map +0 -1
  337. package/dist/services/setup.js.map +0 -1
  338. package/dist/services/standards.js.map +0 -1
  339. package/dist/services/status.js.map +0 -1
  340. package/dist/services/taskContext.js.map +0 -1
  341. package/dist/services/tasks.js.map +0 -1
  342. package/dist/services/verify.js.map +0 -1
  343. package/dist/sessions/session.js.map +0 -1
  344. package/dist/standards/acquisition/ingest.js.map +0 -1
  345. package/dist/standards/applicability/engine.js.map +0 -1
  346. package/dist/standards/builtin/code-quality.js.map +0 -1
  347. package/dist/standards/builtin/database-safety.js.map +0 -1
  348. package/dist/standards/builtin/index.js.map +0 -1
  349. package/dist/standards/builtin/security-baseline.js.map +0 -1
  350. package/dist/standards/builtin/testing-contracts.js.map +0 -1
  351. package/dist/standards/builtin/undo-kit.js.map +0 -1
  352. package/dist/standards/config/config.js.map +0 -1
  353. package/dist/standards/distribution/cache.js.map +0 -1
  354. package/dist/standards/distribution/index.js.map +0 -1
  355. package/dist/standards/distribution/keys.js.map +0 -1
  356. package/dist/standards/distribution/package.js.map +0 -1
  357. package/dist/standards/distribution/server.js.map +0 -1
  358. package/dist/standards/distribution/sync.js.map +0 -1
  359. package/dist/standards/distribution/types.js.map +0 -1
  360. package/dist/standards/engine/compliance.js.map +0 -1
  361. package/dist/standards/engine/engine.js.map +0 -1
  362. package/dist/standards/engine/reporter.js.map +0 -1
  363. package/dist/standards/index.js.map +0 -1
  364. package/dist/standards/registry/registry.js.map +0 -1
  365. package/dist/standards/schema/types.js.map +0 -1
  366. package/dist/standards/schema/validate.js.map +0 -1
  367. package/dist/standards/templates/index.js.map +0 -1
  368. package/dist/standards/validators/database.js.map +0 -1
  369. package/dist/standards/validators/quality.js.map +0 -1
  370. package/dist/standards/validators/registry.js.map +0 -1
  371. package/dist/standards/validators/security.js.map +0 -1
  372. package/dist/standards/validators/testing.js.map +0 -1
  373. package/dist/standards/validators/types.js.map +0 -1
  374. package/dist/standards/validators/undo-kit.js.map +0 -1
  375. package/dist/tasks/routing.js.map +0 -1
  376. package/dist/tasks/task.js.map +0 -1
  377. package/dist/utils/cleanup.js.map +0 -1
  378. package/dist/utils/fs.js.map +0 -1
  379. package/dist/utils/lock.js.map +0 -1
  380. package/dist/utils/logger.js.map +0 -1
  381. package/dist/utils/paths.js.map +0 -1
  382. package/dist/utils/proc.js.map +0 -1
  383. package/dist/verification/safety.js.map +0 -1
  384. package/dist/verification/scope.js.map +0 -1
@@ -1,6 +1,7 @@
1
1
  import path from 'node:path';
2
2
  import { AGENTS, getAgentAdapter, listAgentAdapters, detectAllAgentFiles, } from '../agents/index.js';
3
3
  import { DevWorkspaceError } from '../errors/index.js';
4
+ import { assertModuleEnabled } from '../config/feature-gate.js';
4
5
  import { atomicWriteFile, readTextBounded } from '../utils/fs.js';
5
6
  import { assertNoSymlinkEscape, resolveInside } from '../utils/paths.js';
6
7
  import { loadProject, saveProject, requireWorkspace } from '../core/workspace.js';
@@ -17,6 +18,7 @@ const strip = (c) => ({
17
18
  export async function installAgent(o, agentId = 'claude') {
18
19
  const normId = agentId.toLowerCase();
19
20
  const ws = await requireWorkspace(o.cwd);
21
+ await assertModuleEnabled(ws.root, 'agent.instructions', 'Install managed agent instruction files');
20
22
  const project = await loadProject(ws);
21
23
  if (normId === 'all') {
22
24
  const adapters = listAgentAdapters();
@@ -121,4 +123,3 @@ export async function listAgents(o) {
121
123
  export function relPath(root, p) {
122
124
  return path.relative(root, p).replace(/\\/g, '/');
123
125
  }
124
- //# sourceMappingURL=agent.js.map
@@ -159,4 +159,3 @@ export async function analyzeWorkspace(ws, o) {
159
159
  export function newProjectId() {
160
160
  return randomUUID();
161
161
  }
162
- //# sourceMappingURL=analysis.js.map
@@ -12,4 +12,3 @@ export async function mutate(o, fn) {
12
12
  const ws = await requireWorkspace(o.cwd);
13
13
  return withLock(ws.dir, () => fn(ws));
14
14
  }
15
- //# sourceMappingURL=common.js.map
@@ -1,6 +1,7 @@
1
1
  import { promises as fs } from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import { SCHEMA_VERSION, validateAnalysisState, validateCommands } from '../config/schemas.js';
4
+ import { loadWorkspaceSettingsStrict } from '../config/settings.js';
4
5
  import { findWorkspaceRoot, LOCAL_GITIGNORE, loadProject, wsPaths } from '../core/workspace.js';
5
6
  import { readVersioned } from '../core/versioned.js';
6
7
  import { resolveGraphifyGraph } from '../core/artifacts.js';
@@ -66,6 +67,16 @@ export async function runDoctor(o) {
66
67
  const code = e.code;
67
68
  add('project', 'fail', e.message.split('\n')[0], code === 'SCHEMA_TOO_NEW' ? 'Upgrade DevWorkspace: npm install -g devworkspace@latest' : 'Restore .devworkspace/project.json from Git, or re-run "devworkspace init" after moving the broken file away.');
68
69
  }
70
+ if (await pathExists(ws.settings)) {
71
+ try {
72
+ const loadedSettings = await loadWorkspaceSettingsStrict(ws);
73
+ add('settings', 'pass', `settings.json valid (preset: ${loadedSettings.settings.preset})`);
74
+ }
75
+ catch (e) {
76
+ const err = e;
77
+ add('settings', 'fail', (err.message ?? String(e)).split('\n')[0], err.hint ?? 'Fix .devworkspace/settings.json or re-run: devworkspace setup --preset minimal');
78
+ }
79
+ }
69
80
  // Layout.
70
81
  const dirs = [ws.contextDir, ws.decisionsDir, ws.tasksActive, ws.tasksCompleted, ws.sessionsDir, ws.analysisDir, ws.stateDir];
71
82
  const missingDirs = [];
@@ -298,7 +309,8 @@ async function finish(root, checks, fixed, ws, o) {
298
309
  if (ws)
299
310
  ready = counts.fail === 0 && discoveryOk && (await instructionsInstalled(ws)) && (await knowledgeWritten(ws));
300
311
  // Integrations are observed (tools are run), and reported separately: a missing optional tool never makes the core workspace unhealthy.
301
- const integrations = root && ws ? await inspectAll(ws, managerEnv(o, root), { deep: true }) : [];
312
+ const settingsInvalid = checks.some((c) => c.id === 'settings' && c.status === 'fail');
313
+ const integrations = root && ws && !settingsInvalid ? await inspectAll(ws, managerEnv(o, root), { deep: true }) : [];
302
314
  const s = summarize(integrations);
303
315
  return { root, checks, counts, healthy: counts.fail === 0, ready, fixed, integrations, integrationSummary: { complete: integrations.length > 0 && s.complete, required: s.required, verified: s.verified } };
304
316
  }
@@ -493,4 +505,3 @@ async function checkMcpLauncher(root, add) {
493
505
  add('mcp-launcher', 'pass', `Configured MCP launcher is resolvable (${launchers})`);
494
506
  }
495
507
  }
496
- //# sourceMappingURL=doctor.js.map
@@ -86,4 +86,3 @@ export async function detectContractDrift(root, commands) {
86
86
  }
87
87
  return { hasDrift: issues.length > 0, issues };
88
88
  }
89
- //# sourceMappingURL=drift.js.map
@@ -2,6 +2,7 @@ import { FEATURE_SCHEMA_VERSION, validateFeatures } from '../features/schema.js'
2
2
  import { readVersioned, writeVersioned } from '../core/versioned.js';
3
3
  import { requireWorkspace } from '../core/workspace.js';
4
4
  import { DevWorkspaceError } from '../errors/index.js';
5
+ import { assertModuleEnabled } from '../config/feature-gate.js';
5
6
  import { pathExists } from '../utils/fs.js';
6
7
  import { validateFeature, validateFeatureMap } from '../features/validate.js';
7
8
  import { isoNow, mutate } from './common.js';
@@ -37,6 +38,7 @@ function countComponents(f) {
37
38
  }
38
39
  export async function listFeaturesService(o) {
39
40
  const ws = await requireWorkspace(o.cwd);
41
+ await assertModuleEnabled(ws.root, 'intelligence.features', 'List feature maps');
40
42
  const file = await loadFeatures(ws);
41
43
  return file.features.map((f) => {
42
44
  const counts = countComponents(f);
@@ -54,6 +56,7 @@ export async function listFeaturesService(o) {
54
56
  }
55
57
  export async function getFeatureService(o, id) {
56
58
  const ws = await requireWorkspace(o.cwd);
59
+ await assertModuleEnabled(ws.root, 'intelligence.features', `Show feature "${id}"`);
57
60
  const file = await loadFeatures(ws);
58
61
  const target = file.features.find((f) => f.id.toLowerCase() === id.toLowerCase());
59
62
  if (!target) {
@@ -65,11 +68,13 @@ export async function getFeatureService(o, id) {
65
68
  }
66
69
  export async function validateFeatureMapService(o) {
67
70
  const ws = await requireWorkspace(o.cwd);
71
+ await assertModuleEnabled(ws.root, 'intelligence.features', 'Validate feature maps');
68
72
  const file = await loadFeatures(ws);
69
73
  return validateFeatureMap(ws.root, file.features);
70
74
  }
71
75
  export async function saveFeatureService(o, input) {
72
76
  const ws = await requireWorkspace(o.cwd);
77
+ await assertModuleEnabled(ws.root, 'intelligence.features', `Save feature "${input.id}"`);
73
78
  const now = isoNow(o);
74
79
  const item = {
75
80
  id: input.id.trim(),
@@ -102,4 +107,3 @@ export async function saveFeatureService(o, input) {
102
107
  });
103
108
  return item;
104
109
  }
105
- //# sourceMappingURL=features.js.map
@@ -5,6 +5,7 @@ import { findSymbolInText } from '../features/validate.js';
5
5
  import { requireWorkspace } from '../core/workspace.js';
6
6
  import { resolveGraphifyGraph } from '../core/artifacts.js';
7
7
  import { DevWorkspaceError } from '../errors/index.js';
8
+ import { assertModuleEnabled } from '../config/feature-gate.js';
8
9
  /**
9
10
  * Resolves the location of Graphify's output graph in the repository.
10
11
  */
@@ -59,6 +60,7 @@ export async function loadGraphData(root) {
59
60
  */
60
61
  export async function getGraphStatusService(o) {
61
62
  const ws = await requireWorkspace(o.cwd);
63
+ await assertModuleEnabled(ws.root, 'intelligence.graph', 'Inspect dependency graph status');
62
64
  const loaded = await loadGraphData(ws.root);
63
65
  if (!loaded.exists || !loaded.data) {
64
66
  return {
@@ -108,6 +110,7 @@ const IGNORED_SCAN_DIRS = new Set([
108
110
  */
109
111
  export async function generateOfflineGraphService(o, options = {}) {
110
112
  const ws = await requireWorkspace(o.cwd);
113
+ await assertModuleEnabled(ws.root, 'intelligence.graph', 'Generate offline dependency graph');
111
114
  const dest = options.out ? path.resolve(ws.root, options.out) : path.join(ws.root, 'graphify-out', 'graph.json');
112
115
  let alreadyExists = false;
113
116
  if (await pathExists(dest)) {
@@ -590,6 +593,7 @@ async function checkEdgeSource(root, e, symbols, cache) {
590
593
  */
591
594
  export async function traceGraphService(o, query, options = {}) {
592
595
  const ws = await requireWorkspace(o.cwd);
596
+ await assertModuleEnabled(ws.root, 'intelligence.graph', `Trace symbol "${query}"`);
593
597
  const loaded = await loadGraphData(ws.root);
594
598
  const depthLimit = Math.min(Math.max(options.depth ?? 2, 1), 10);
595
599
  const maxNodes = Math.max(1, Math.min(options.maxNodes ?? 150, 500));
@@ -709,4 +713,3 @@ export async function traceGraphService(o, query, options = {}) {
709
713
  truncated, nodes: tracedNodes, edges: tracedEdges, warnings,
710
714
  };
711
715
  }
712
- //# sourceMappingURL=graph.js.map
@@ -139,4 +139,3 @@ export async function initWorkspace(o) {
139
139
  return result({ gitignoreUpdated: gi === 'updated', integrations: setup ? setup.outcomes.map((x) => x.report) : await shallow(), ...(setup ? { setup } : {}) });
140
140
  });
141
141
  }
142
- //# sourceMappingURL=init.js.map
@@ -19,8 +19,9 @@ export interface IntegrationsStatus {
19
19
  };
20
20
  acknowledged?: string[];
21
21
  }
22
- /** Observed state (never the saved file alone). `deep` runs the tools; shallow only looks at files and PATH. */
22
+ /** Observed state (never the saved file alone). Disabled integrations report DISABLED without running commands unless `includeDisabled` is set. */
23
23
  export declare function integrationsStatus(o: ServiceOptions, opts?: {
24
24
  deep?: boolean;
25
25
  restarted?: boolean;
26
+ includeDisabled?: boolean;
26
27
  }): Promise<IntegrationsStatus>;
@@ -1,6 +1,8 @@
1
1
  import { DevWorkspaceError } from '../errors/index.js';
2
2
  import { requireWorkspace } from '../core/workspace.js';
3
- import { INTEGRATION_IDS, acknowledgeRestart, inspectAll, runSetup, summarize, } from '../integrations/index.js';
3
+ import { assertModuleEnabled, checkModuleEnabled } from '../config/feature-gate.js';
4
+ import { pathExists } from '../utils/fs.js';
5
+ import { INTEGRATION_IDS, REQUIRED_INTEGRATIONS, acknowledgeRestart, inspectAll, runSetup, summarize, } from '../integrations/index.js';
4
6
  import { isoNow, managerEnv } from './common.js';
5
7
  export function parseOnly(only) {
6
8
  if (!only || only.length === 0)
@@ -16,20 +18,41 @@ export function parseOnly(only) {
16
18
  /** Install and verify the integrations. Without `yes`, only project-local, non-executing steps may run. */
17
19
  export async function setupIntegrations(o, req = {}, onEvent) {
18
20
  const ws = await requireWorkspace(o.cwd);
19
- return runSetup(ws, managerEnv(o, ws.root), { scope: req.scope ?? 'project', yes: !!req.yes, dryRun: !!o.dryRun, repair: !!req.repair, only: parseOnly(req.only) }, onEvent);
21
+ let effectiveOnly = parseOnly(req.only);
22
+ if (await pathExists(ws.settings)) {
23
+ if (effectiveOnly) {
24
+ for (const id of effectiveOnly) {
25
+ await assertModuleEnabled(ws.root, `integration.${id}`, `Run integration setup for "${id}"`);
26
+ }
27
+ }
28
+ else {
29
+ const enabledIds = [];
30
+ for (const id of REQUIRED_INTEGRATIONS) {
31
+ const check = await checkModuleEnabled(ws.root, `integration.${id}`);
32
+ if (check.enabled)
33
+ enabledIds.push(id);
34
+ }
35
+ if (enabledIds.length === 0) {
36
+ throw new DevWorkspaceError('USAGE', 'No optional third-party integration modules are enabled in .devworkspace/settings.json.', {
37
+ hint: 'Enable an integration with explicit consent first, e.g.: devworkspace modules enable integration.graphify --yes',
38
+ });
39
+ }
40
+ effectiveOnly = enabledIds;
41
+ }
42
+ }
43
+ return runSetup(ws, managerEnv(o, ws.root), { scope: req.scope ?? 'project', yes: !!req.yes, dryRun: !!o.dryRun, repair: !!req.repair, only: effectiveOnly }, onEvent);
20
44
  }
21
- /** Observed state (never the saved file alone). `deep` runs the tools; shallow only looks at files and PATH. */
45
+ /** Observed state (never the saved file alone). Disabled integrations report DISABLED without running commands unless `includeDisabled` is set. */
22
46
  export async function integrationsStatus(o, opts = {}) {
23
47
  const ws = await requireWorkspace(o.cwd);
24
48
  const env = managerEnv(o, ws.root);
25
49
  let acknowledged;
26
50
  if (opts.restarted) {
27
- const before = await inspectAll(ws, env, { deep: false });
51
+ const before = await inspectAll(ws, env, { deep: false, includeDisabled: opts.includeDisabled });
28
52
  acknowledged = before.filter((r) => r.status === 'RESTART_REQUIRED').map((r) => r.id);
29
53
  await acknowledgeRestart(ws, acknowledged, isoNow(o));
30
54
  }
31
- const reports = await inspectAll(ws, env, { deep: opts.deep ?? true });
55
+ const reports = await inspectAll(ws, env, { deep: opts.deep ?? true, includeDisabled: opts.includeDisabled });
32
56
  const s = summarize(reports);
33
57
  return { deep: opts.deep ?? true, reports, summary: { complete: s.complete, required: s.required, verified: s.verified }, ...(acknowledged ? { acknowledged } : {}) };
34
58
  }
35
- //# sourceMappingURL=integrations.js.map
@@ -8,7 +8,7 @@ import { SecurityPolicyEvaluator } from '../intelligence/security/policy.js';
8
8
  import { SecurityAuditLogger } from '../intelligence/security/audit.js';
9
9
  import type { AgentProfile } from '../intelligence/agents/types.js';
10
10
  import type { SkillManifest } from '../intelligence/skills/types.js';
11
- import type { OrchestrationRun, PlanOptions, RunOptions } from '../intelligence/orchestration/types.js';
11
+ import type { ApproveRunOptions, OrchestrationRun, PlanOptions, RunOptions } from '../intelligence/orchestration/types.js';
12
12
  import type { PerformanceMetrics } from '../intelligence/observability/types.js';
13
13
  export interface IntelligenceContext {
14
14
  agentRegistry: AgentRegistry;
@@ -32,7 +32,7 @@ export declare function installSkillService(workspaceRoot: string, manifest: Ski
32
32
  export declare function removeSkillService(workspaceRoot: string, id: string): Promise<boolean>;
33
33
  export declare function planOrchestrationService(workspaceRoot: string, options: PlanOptions): Promise<OrchestrationRun>;
34
34
  export declare function runOrchestrationService(workspaceRoot: string, options: RunOptions): Promise<OrchestrationRun>;
35
- export declare function approveOrchestrationService(workspaceRoot: string, runId: string, approvedBy?: string): Promise<OrchestrationRun>;
35
+ export declare function approveOrchestrationService(workspaceRoot: string, runId: string, options?: Partial<ApproveRunOptions>): Promise<OrchestrationRun>;
36
36
  export declare function cancelOrchestrationService(workspaceRoot: string, runId: string, reason?: string): Promise<OrchestrationRun>;
37
37
  export declare function getOrchestrationRunService(workspaceRoot: string, runId: string): Promise<OrchestrationRun | null>;
38
38
  export declare function listOrchestrationHistoryService(workspaceRoot: string): Promise<OrchestrationRun[]>;
@@ -6,13 +6,17 @@ import { OrchestrationStore } from '../intelligence/orchestration/store.js';
6
6
  import { LocalTracer } from '../intelligence/observability/tracer.js';
7
7
  import { SecurityPolicyEvaluator } from '../intelligence/security/policy.js';
8
8
  import { SecurityAuditLogger } from '../intelligence/security/audit.js';
9
+ import { createEnvApprovalAuthProvider, getEnvApproverCredentials, } from '../intelligence/runtime/auth-provider.js';
10
+ import { DevWorkspaceError } from '../errors/index.js';
9
11
  import { requireWorkspace } from '../core/workspace.js';
12
+ import { assertModuleEnabled } from '../config/feature-gate.js';
10
13
  export function createIntelligenceContext(workspaceRoot) {
11
14
  const agentRegistry = new AgentRegistry(workspaceRoot);
12
15
  const skillRegistry = new SkillRegistry(workspaceRoot);
13
16
  const router = new IntelligentRouter(agentRegistry, skillRegistry);
14
17
  const store = new OrchestrationStore(workspaceRoot);
15
- const engine = new OrchestrationEngine(router, store);
18
+ const authProvider = createEnvApprovalAuthProvider() ?? undefined;
19
+ const engine = new OrchestrationEngine(router, store, authProvider);
16
20
  const tracer = new LocalTracer(workspaceRoot);
17
21
  const security = new SecurityPolicyEvaluator(workspaceRoot);
18
22
  const audit = new SecurityAuditLogger(workspaceRoot);
@@ -27,84 +31,83 @@ export function createIntelligenceContext(workspaceRoot) {
27
31
  audit,
28
32
  };
29
33
  }
30
- export async function listAgentsService(workspaceRoot) {
34
+ async function openOrchestrationContext(workspaceRoot, action) {
31
35
  const ws = await requireWorkspace(workspaceRoot);
32
- const ctx = createIntelligenceContext(ws.root);
36
+ await assertModuleEnabled(ws.root, 'intelligence.orchestration', action);
37
+ return { root: ws.root, ctx: createIntelligenceContext(ws.root) };
38
+ }
39
+ export async function listAgentsService(workspaceRoot) {
40
+ const { ctx } = await openOrchestrationContext(workspaceRoot, 'List specialist agents');
33
41
  return ctx.agentRegistry.listAllAgents();
34
42
  }
35
43
  export async function getAgentService(workspaceRoot, id) {
36
- const ws = await requireWorkspace(workspaceRoot);
37
- const ctx = createIntelligenceContext(ws.root);
44
+ const { ctx } = await openOrchestrationContext(workspaceRoot, 'Inspect specialist agent');
38
45
  return ctx.agentRegistry.getAgent(id);
39
46
  }
40
47
  export async function registerAgentService(workspaceRoot, profile) {
41
- const ws = await requireWorkspace(workspaceRoot);
42
- const ctx = createIntelligenceContext(ws.root);
48
+ const { ctx } = await openOrchestrationContext(workspaceRoot, 'Register specialist agent');
43
49
  return ctx.agentRegistry.registerAgent(profile);
44
50
  }
45
51
  export async function removeAgentService(workspaceRoot, id) {
46
- const ws = await requireWorkspace(workspaceRoot);
47
- const ctx = createIntelligenceContext(ws.root);
52
+ const { ctx } = await openOrchestrationContext(workspaceRoot, 'Remove specialist agent');
48
53
  return ctx.agentRegistry.removeAgent(id);
49
54
  }
50
55
  export async function listSkillsService(workspaceRoot) {
51
- const ws = await requireWorkspace(workspaceRoot);
52
- const ctx = createIntelligenceContext(ws.root);
56
+ const { ctx } = await openOrchestrationContext(workspaceRoot, 'List portable skills');
53
57
  return ctx.skillRegistry.listAllSkills();
54
58
  }
55
59
  export async function searchSkillsService(workspaceRoot, query) {
56
- const ws = await requireWorkspace(workspaceRoot);
57
- const ctx = createIntelligenceContext(ws.root);
60
+ const { ctx } = await openOrchestrationContext(workspaceRoot, 'Search portable skills');
58
61
  return ctx.skillRegistry.searchSkills(query);
59
62
  }
60
63
  export async function getSkillService(workspaceRoot, id) {
61
- const ws = await requireWorkspace(workspaceRoot);
62
- const ctx = createIntelligenceContext(ws.root);
64
+ const { ctx } = await openOrchestrationContext(workspaceRoot, 'Inspect portable skill');
63
65
  return ctx.skillRegistry.getSkill(id);
64
66
  }
65
67
  export async function installSkillService(workspaceRoot, manifest) {
66
- const ws = await requireWorkspace(workspaceRoot);
67
- const ctx = createIntelligenceContext(ws.root);
68
+ const { ctx } = await openOrchestrationContext(workspaceRoot, 'Install portable skill');
68
69
  return ctx.skillRegistry.installSkill(manifest);
69
70
  }
70
71
  export async function removeSkillService(workspaceRoot, id) {
71
- const ws = await requireWorkspace(workspaceRoot);
72
- const ctx = createIntelligenceContext(ws.root);
72
+ const { ctx } = await openOrchestrationContext(workspaceRoot, 'Remove portable skill');
73
73
  return ctx.skillRegistry.removeSkill(id);
74
74
  }
75
75
  export async function planOrchestrationService(workspaceRoot, options) {
76
- const ws = await requireWorkspace(workspaceRoot);
77
- const ctx = createIntelligenceContext(ws.root);
76
+ const { ctx } = await openOrchestrationContext(workspaceRoot, 'Plan multi-agent orchestration');
78
77
  return ctx.engine.plan(options);
79
78
  }
80
79
  export async function runOrchestrationService(workspaceRoot, options) {
81
- const ws = await requireWorkspace(workspaceRoot);
82
- const ctx = createIntelligenceContext(ws.root);
80
+ const { ctx } = await openOrchestrationContext(workspaceRoot, 'Execute multi-agent orchestration');
83
81
  return ctx.engine.run(options);
84
82
  }
85
- export async function approveOrchestrationService(workspaceRoot, runId, approvedBy) {
86
- const ws = await requireWorkspace(workspaceRoot);
87
- const ctx = createIntelligenceContext(ws.root);
88
- return ctx.engine.approve(runId, approvedBy);
83
+ export async function approveOrchestrationService(workspaceRoot, runId, options) {
84
+ const { root, ctx } = await openOrchestrationContext(workspaceRoot, 'Approve multi-agent orchestration');
85
+ const authProvider = options?.authProvider ?? createEnvApprovalAuthProvider();
86
+ const credentials = options?.credentials ?? getEnvApproverCredentials();
87
+ if (!authProvider || !credentials) {
88
+ throw new DevWorkspaceError('SECURITY', 'No ApprovalAuthProvider or approver credentials are configured (fail-closed).');
89
+ }
90
+ return ctx.engine.approve(runId, {
91
+ authProvider,
92
+ credentials,
93
+ grants: options?.grants,
94
+ workspaceRoot: options?.workspaceRoot ?? root,
95
+ });
89
96
  }
90
97
  export async function cancelOrchestrationService(workspaceRoot, runId, reason) {
91
- const ws = await requireWorkspace(workspaceRoot);
92
- const ctx = createIntelligenceContext(ws.root);
98
+ const { ctx } = await openOrchestrationContext(workspaceRoot, 'Cancel multi-agent orchestration');
93
99
  return ctx.engine.cancel(runId, reason);
94
100
  }
95
101
  export async function getOrchestrationRunService(workspaceRoot, runId) {
96
- const ws = await requireWorkspace(workspaceRoot);
97
- const ctx = createIntelligenceContext(ws.root);
102
+ const { ctx } = await openOrchestrationContext(workspaceRoot, 'Get orchestration run');
98
103
  return ctx.store.getRun(runId);
99
104
  }
100
105
  export async function listOrchestrationHistoryService(workspaceRoot) {
101
- const ws = await requireWorkspace(workspaceRoot);
102
- const ctx = createIntelligenceContext(ws.root);
106
+ const { ctx } = await openOrchestrationContext(workspaceRoot, 'List orchestration history');
103
107
  return ctx.store.listRuns();
104
108
  }
105
109
  export async function getIntelligenceStatusService(workspaceRoot) {
106
- const ws = await requireWorkspace(workspaceRoot);
107
- const ctx = createIntelligenceContext(ws.root);
110
+ const { ctx } = await openOrchestrationContext(workspaceRoot, 'Get intelligence status');
108
111
  const agents = await ctx.agentRegistry.listAllAgents();
109
112
  const skills = await ctx.skillRegistry.listAllSkills();
110
113
  const runs = await ctx.store.listRuns();
@@ -116,4 +119,3 @@ export async function getIntelligenceStatusService(workspaceRoot) {
116
119
  metrics,
117
120
  };
118
121
  }
119
- //# sourceMappingURL=intelligence.js.map
@@ -95,4 +95,3 @@ export async function getContext(o, opts = {}) {
95
95
  ...(opts.full ? { content } : {}),
96
96
  };
97
97
  }
98
- //# sourceMappingURL=knowledge.js.map
@@ -51,4 +51,3 @@ export async function migrateWorkspace(o, registry = MIGRATIONS, target = SCHEMA
51
51
  };
52
52
  });
53
53
  }
54
- //# sourceMappingURL=migrate.js.map
@@ -0,0 +1,85 @@
1
+ import { type FeatureCategory, type FeatureDefinition } from '../config/feature-registry.js';
2
+ import { type SetupPreset } from '../config/settings.js';
3
+ import { type ServiceOptions } from './common.js';
4
+ export interface ModuleListEntry {
5
+ id: string;
6
+ name: string;
7
+ description: string;
8
+ category: FeatureCategory;
9
+ availability: FeatureDefinition['availability'];
10
+ enabled: boolean;
11
+ canDisable: boolean;
12
+ preserveDataOnDisable: boolean;
13
+ installKind: FeatureDefinition['installKind'];
14
+ dataPolicy: FeatureDefinition['dataPolicy'];
15
+ requires: readonly string[];
16
+ prerequisites: readonly string[];
17
+ entryPoints: readonly string[];
18
+ dataPaths: readonly string[];
19
+ configKeys: readonly string[];
20
+ config: Record<string, string | number | boolean>;
21
+ runtimeGated: boolean;
22
+ }
23
+ export interface ModulesListResult {
24
+ initialized: boolean;
25
+ root: string;
26
+ preset: SetupPreset;
27
+ persisted: boolean;
28
+ migratedFromLegacy: boolean;
29
+ recoveryWarning?: string;
30
+ modules: ModuleListEntry[];
31
+ }
32
+ export interface ModuleDetailResult {
33
+ initialized: boolean;
34
+ root: string;
35
+ preset: SetupPreset;
36
+ persisted: boolean;
37
+ recoveryWarning?: string;
38
+ module: ModuleListEntry;
39
+ dependents: Array<{
40
+ id: string;
41
+ name: string;
42
+ enabled: boolean;
43
+ }>;
44
+ dependencyStatus: Array<{
45
+ id: string;
46
+ name: string;
47
+ enabled: boolean;
48
+ }>;
49
+ }
50
+ export interface ModuleToggleResult {
51
+ action: 'enable' | 'disable';
52
+ moduleId: string;
53
+ dryRun: boolean;
54
+ changed: boolean;
55
+ preset: SetupPreset;
56
+ enabled: boolean;
57
+ autoEnabledDependencies: string[];
58
+ autoDisabledDependents: string[];
59
+ preservedDataPaths: string[];
60
+ consentRequired: boolean;
61
+ nextSteps: string[];
62
+ warnings: string[];
63
+ }
64
+ export interface ModuleConfigureResult {
65
+ moduleId: string;
66
+ key: string;
67
+ value: string | number | boolean;
68
+ dryRun: boolean;
69
+ config: Record<string, string | number | boolean>;
70
+ persisted: boolean;
71
+ }
72
+ /** List all registered DevWorkspace modules with live enablement and gating status. */
73
+ export declare function listModulesService(o: ServiceOptions): Promise<ModulesListResult>;
74
+ /** Inspect a single module, its prerequisites, dependencies, dependents, and data paths. */
75
+ export declare function showModuleService(o: ServiceOptions, moduleId: string): Promise<ModuleDetailResult>;
76
+ /** Enable a module and its required dependencies safely, enforcing consent for external helpers. */
77
+ export declare function enableModuleService(o: ServiceOptions, moduleId: string, opts?: {
78
+ yes?: boolean;
79
+ }): Promise<ModuleToggleResult>;
80
+ /** Disable an optional module (optionally cascading dependents with --force) while preserving user data. */
81
+ export declare function disableModuleService(o: ServiceOptions, moduleId: string, opts?: {
82
+ force?: boolean;
83
+ }): Promise<ModuleToggleResult>;
84
+ /** Configure non-secret module preferences inside .devworkspace/settings.json. */
85
+ export declare function configureModuleService(o: ServiceOptions, moduleId: string, key: string, rawValue: string): Promise<ModuleConfigureResult>;