agent-enderun 1.1.2 → 1.1.4

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 (533) hide show
  1. package/{.enderun/ENDERUN.md → ENDERUN.md} +25 -25
  2. package/README.md +10 -6
  3. package/bin/compile.js +13 -14
  4. package/bin/enderun-dashboard.js +866 -0
  5. package/bin/generate-cursor-rules.js +78 -0
  6. package/bin/test-init-run.js +37 -26
  7. package/bin/validate-agent-army.js +65 -67
  8. package/bin/watch-memory.js +54 -0
  9. package/dist/framework-mcp/src/index.js +1 -1
  10. package/dist/framework-mcp/src/tools/control_plane/locking.d.ts +15 -0
  11. package/dist/framework-mcp/src/tools/control_plane/locking.js +65 -0
  12. package/dist/framework-mcp/src/tools/control_plane/locking.js.map +1 -0
  13. package/dist/framework-mcp/src/tools/control_plane/registry.d.ts +12 -0
  14. package/dist/framework-mcp/src/tools/control_plane/registry.js +35 -0
  15. package/dist/framework-mcp/src/tools/control_plane/registry.js.map +1 -0
  16. package/dist/framework-mcp/src/tools/definitions.js +46 -7
  17. package/dist/framework-mcp/src/tools/definitions.js.map +1 -1
  18. package/dist/framework-mcp/src/tools/file_system/write_file.js +16 -2
  19. package/dist/framework-mcp/src/tools/file_system/write_file.js.map +1 -1
  20. package/dist/framework-mcp/src/tools/index.d.ts +1 -1
  21. package/dist/framework-mcp/src/tools/index.js +5 -0
  22. package/dist/framework-mcp/src/tools/index.js.map +1 -1
  23. package/dist/framework-mcp/src/tools/messaging/send_message.d.ts +1 -1
  24. package/dist/framework-mcp/src/tools/messaging/send_message.js +2 -4
  25. package/dist/framework-mcp/src/tools/messaging/send_message.js.map +1 -1
  26. package/dist/framework-mcp/src/utils/metrics.d.ts +10 -0
  27. package/dist/framework-mcp/src/utils/metrics.js +39 -0
  28. package/dist/framework-mcp/src/utils/metrics.js.map +1 -0
  29. package/dist/framework-mcp/src/utils/security.js +7 -3
  30. package/dist/framework-mcp/src/utils/security.js.map +1 -1
  31. package/dist/src/cli/adapters/types.d.ts +14 -0
  32. package/dist/src/cli/adapters/types.js +2 -0
  33. package/dist/src/cli/adapters/types.js.map +1 -0
  34. package/dist/src/cli/adapters.d.ts +4 -22
  35. package/dist/src/cli/adapters.js +123 -141
  36. package/dist/src/cli/adapters.js.map +1 -1
  37. package/dist/src/cli/commands/check.d.ts +0 -5
  38. package/dist/src/cli/commands/check.js +64 -76
  39. package/dist/src/cli/commands/check.js.map +1 -1
  40. package/dist/src/cli/commands/init.d.ts +1 -1
  41. package/dist/src/cli/commands/init.js +154 -319
  42. package/dist/src/cli/commands/init.js.map +1 -1
  43. package/dist/src/cli/commands/log.d.ts +1 -0
  44. package/dist/src/cli/commands/log.js.map +1 -1
  45. package/dist/src/cli/commands/memory.js +2 -69
  46. package/dist/src/cli/commands/memory.js.map +1 -1
  47. package/dist/src/cli/commands/orchestrate.d.ts +19 -9
  48. package/dist/src/cli/commands/orchestrate.js +56 -77
  49. package/dist/src/cli/commands/orchestrate.js.map +1 -1
  50. package/dist/src/cli/index.js +112 -30
  51. package/dist/src/cli/index.js.map +1 -1
  52. package/dist/src/cli/utils/app.d.ts +1 -2
  53. package/dist/src/cli/utils/app.js +2 -2
  54. package/dist/src/cli/utils/app.js.map +1 -1
  55. package/dist/src/cli/utils/config-schema.d.ts +139 -0
  56. package/dist/src/cli/utils/config-schema.js +43 -0
  57. package/dist/src/cli/utils/config-schema.js.map +1 -0
  58. package/dist/src/cli/utils/fs.d.ts +2 -4
  59. package/dist/src/cli/utils/fs.js +9 -26
  60. package/dist/src/cli/utils/fs.js.map +1 -1
  61. package/dist/src/cli/utils/memory.d.ts +4 -3
  62. package/dist/src/cli/utils/memory.js +135 -116
  63. package/dist/src/cli/utils/memory.js.map +1 -1
  64. package/dist/src/cli/utils/pkg.js +4 -4
  65. package/dist/src/cli/utils/pkg.js.map +1 -1
  66. package/dist/src/cli/utils/ui.d.ts +30 -0
  67. package/dist/src/cli/utils/ui.js +56 -0
  68. package/dist/src/cli/utils/ui.js.map +1 -0
  69. package/dist/src/modules/adapters/antigravity-cli.d.ts +3 -0
  70. package/dist/src/modules/adapters/antigravity-cli.js +21 -0
  71. package/dist/src/modules/adapters/antigravity-cli.js.map +1 -0
  72. package/dist/src/modules/adapters/claude.d.ts +3 -0
  73. package/dist/src/modules/adapters/claude.js +36 -0
  74. package/dist/src/modules/adapters/claude.js.map +1 -0
  75. package/dist/src/modules/adapters/codex.d.ts +3 -0
  76. package/dist/src/modules/adapters/codex.js +20 -0
  77. package/dist/src/modules/adapters/codex.js.map +1 -0
  78. package/dist/src/modules/adapters/cursor.d.ts +3 -0
  79. package/dist/src/modules/adapters/cursor.js +20 -0
  80. package/dist/src/modules/adapters/cursor.js.map +1 -0
  81. package/dist/src/modules/adapters/gemini.d.ts +3 -0
  82. package/dist/src/modules/adapters/gemini.js +23 -0
  83. package/dist/src/modules/adapters/gemini.js.map +1 -0
  84. package/dist/src/modules/adapters/grok.d.ts +3 -0
  85. package/dist/src/modules/adapters/grok.js +18 -0
  86. package/dist/src/modules/adapters/grok.js.map +1 -0
  87. package/dist/src/modules/adapters/shared.d.ts +1 -0
  88. package/dist/src/modules/adapters/shared.js +79 -0
  89. package/dist/src/modules/adapters/shared.js.map +1 -0
  90. package/dist/src/modules/adapters/types.d.ts +14 -0
  91. package/dist/src/modules/adapters/types.js +2 -0
  92. package/dist/src/modules/adapters/types.js.map +1 -0
  93. package/dist/src/modules/agents/definitions.d.ts +13 -0
  94. package/dist/src/modules/agents/definitions.js +169 -0
  95. package/dist/src/modules/agents/definitions.js.map +1 -0
  96. package/dist/src/modules/skills/definitions.d.ts +31 -0
  97. package/dist/src/modules/skills/definitions.js +32 -0
  98. package/dist/src/modules/skills/definitions.js.map +1 -0
  99. package/dist/src/shared/fs.d.ts +3 -0
  100. package/dist/src/shared/fs.js +24 -0
  101. package/dist/src/shared/fs.js.map +1 -0
  102. package/eslint.config.js +1 -0
  103. package/framework-mcp/dist/index.js +1 -1
  104. package/framework-mcp/dist/tools/control_plane/locking.js +64 -0
  105. package/framework-mcp/dist/tools/control_plane/registry.js +34 -0
  106. package/framework-mcp/dist/tools/definitions.js +49 -8
  107. package/framework-mcp/dist/tools/file_system/read_file.js +20 -0
  108. package/framework-mcp/dist/tools/file_system/write_file.js +16 -2
  109. package/framework-mcp/dist/tools/index.js +5 -0
  110. package/framework-mcp/dist/tools/messaging/send_message.js +36 -15
  111. package/framework-mcp/dist/utils/metrics.js +38 -0
  112. package/framework-mcp/dist/utils/security.js +7 -3
  113. package/framework-mcp/package.json +1 -1
  114. package/framework-mcp/src/index.ts +1 -1
  115. package/framework-mcp/src/tools/control_plane/locking.ts +77 -0
  116. package/framework-mcp/src/tools/control_plane/registry.ts +44 -0
  117. package/framework-mcp/src/tools/definitions.ts +46 -7
  118. package/framework-mcp/src/tools/file_system/write_file.ts +19 -2
  119. package/framework-mcp/src/tools/index.ts +6 -1
  120. package/framework-mcp/src/tools/messaging/send_message.ts +2 -3
  121. package/framework-mcp/src/utils/metrics.ts +53 -0
  122. package/framework-mcp/src/utils/security.ts +8 -3
  123. package/framework-mcp/tests/tools/file_system/file_system_tools.test.ts +164 -0
  124. package/framework-mcp/tsconfig.json +4 -2
  125. package/package.json +12 -11
  126. package/src/cli/adapters/types.ts +16 -0
  127. package/src/cli/adapters.ts +130 -156
  128. package/src/cli/commands/check.ts +61 -77
  129. package/src/cli/commands/init.ts +163 -312
  130. package/src/cli/commands/log.ts +1 -1
  131. package/src/cli/commands/memory.ts +3 -80
  132. package/src/cli/commands/orchestrate.ts +76 -90
  133. package/src/cli/index.ts +121 -29
  134. package/src/cli/utils/app.ts +3 -3
  135. package/src/cli/utils/config-schema.ts +48 -0
  136. package/src/cli/utils/fs.ts +10 -27
  137. package/src/cli/utils/memory.ts +143 -112
  138. package/src/cli/utils/pkg.ts +4 -4
  139. package/src/cli/utils/ui.ts +63 -0
  140. package/src/modules/adapters/antigravity-cli.ts +25 -0
  141. package/src/modules/adapters/claude.ts +36 -0
  142. package/src/modules/adapters/codex.ts +22 -0
  143. package/src/modules/adapters/cursor.ts +22 -0
  144. package/src/modules/adapters/gemini.ts +27 -0
  145. package/src/modules/adapters/grok.ts +20 -0
  146. package/src/modules/adapters/shared.ts +90 -0
  147. package/src/modules/adapters/types.ts +16 -0
  148. package/src/modules/agents/definitions.ts +182 -0
  149. package/src/modules/skills/definitions.ts +32 -0
  150. package/src/shared/fs.ts +25 -0
  151. package/.enderun/BRAIN_DASHBOARD.md +0 -46
  152. package/.enderun/STATUS.md +0 -61
  153. package/.enderun/agents/agent_army_schema.json +0 -101
  154. package/.enderun/agents/analyst.json +0 -32
  155. package/.enderun/agents/backend.json +0 -32
  156. package/.enderun/agents/database.json +0 -32
  157. package/.enderun/agents/devops.json +0 -32
  158. package/.enderun/agents/explorer.json +0 -32
  159. package/.enderun/agents/frontend.json +0 -32
  160. package/.enderun/agents/git.json +0 -32
  161. package/.enderun/agents/manager.json +0 -32
  162. package/.enderun/agents/mobile.json +0 -32
  163. package/.enderun/agents/native.json +0 -32
  164. package/.enderun/agents/quality.json +0 -32
  165. package/.enderun/agents/schema/agent-lifecycle-schema.json +0 -41
  166. package/.enderun/agents/security.json +0 -32
  167. package/.enderun/benchmarks/.gitkeep +0 -0
  168. package/.enderun/cli-commands.json +0 -76
  169. package/.enderun/config.json +0 -13
  170. package/.enderun/knowledge/ARCHITECTURE.md +0 -1
  171. package/.enderun/knowledge/SECURITY.md +0 -1
  172. package/.enderun/knowledge/SHIM_TEMPLATE.md +0 -36
  173. package/.enderun/knowledge/analyst_reference_guide.md +0 -31
  174. package/.enderun/knowledge/async_error_handling.md +0 -27
  175. package/.enderun/knowledge/backend_reference_guide.md +0 -165
  176. package/.enderun/knowledge/blueprint_driven_construction.md +0 -22
  177. package/.enderun/knowledge/context_boundary_rules.md +0 -57
  178. package/.enderun/knowledge/corporate-governance/analyst-contract-integrity-guide.md +0 -92
  179. package/.enderun/knowledge/corporate-governance/audit-logging-standard.md +0 -59
  180. package/.enderun/knowledge/corporate-governance/backend-high-risk-endpoint-guide.md +0 -125
  181. package/.enderun/knowledge/corporate-governance/branded-types-law.md +0 -77
  182. package/.enderun/knowledge/corporate-governance/contract-drift-detection-simulation.md +0 -92
  183. package/.enderun/knowledge/corporate-governance/corporate-governance-playbook.md +0 -89
  184. package/.enderun/knowledge/corporate-governance/corporate-project-kickoff-checklist.md +0 -56
  185. package/.enderun/knowledge/corporate-governance/corporate-project-kickoff-simulation.md +0 -144
  186. package/.enderun/knowledge/corporate-governance/corporate-project-scaffolding-sop.md +0 -103
  187. package/.enderun/knowledge/corporate-governance/domain-error-handling-standard.md +0 -75
  188. package/.enderun/knowledge/corporate-governance/frontend-high-risk-modal-guide.md +0 -211
  189. package/.enderun/knowledge/corporate-governance/governance-baseline-briefing-template.md +0 -54
  190. package/.enderun/knowledge/corporate-governance/high-risk-action-approval-flow-simulation.md +0 -167
  191. package/.enderun/knowledge/corporate-governance/high-risk-action-approval-flow.md +0 -29
  192. package/.enderun/knowledge/corporate-governance/high-risk-actions-managerapproval.md +0 -76
  193. package/.enderun/knowledge/corporate-governance/high-risk-security-modal-hermes-flow.md +0 -49
  194. package/.enderun/knowledge/corporate-governance/manager-first-30-days-guide.md +0 -112
  195. package/.enderun/knowledge/corporate-governance/manager-first-three-briefings.md +0 -79
  196. package/.enderun/knowledge/database_reference_guide.md +0 -38
  197. package/.enderun/knowledge/devops_reference_guide.md +0 -43
  198. package/.enderun/knowledge/documentation_ownership.md +0 -53
  199. package/.enderun/knowledge/eslint-standards.md +0 -63
  200. package/.enderun/knowledge/evaluation_engine.md +0 -26
  201. package/.enderun/knowledge/explorer_reference_guide.md +0 -34
  202. package/.enderun/knowledge/framework_vs_user_project_boundary.md +0 -52
  203. package/.enderun/knowledge/frontend_professionalization_guidelines.md +0 -108
  204. package/.enderun/knowledge/frontend_reference_guide.md +0 -64
  205. package/.enderun/knowledge/git_reference_guide.md +0 -51
  206. package/.enderun/knowledge/hermes_live_test_guidelines.md +0 -90
  207. package/.enderun/knowledge/hermes_protocol.md +0 -59
  208. package/.enderun/knowledge/legacy_onboarding.md +0 -18
  209. package/.enderun/knowledge/lessons-learned.md +0 -14
  210. package/.enderun/knowledge/manager_authority_audit_enforcement.md +0 -104
  211. package/.enderun/knowledge/manager_reference_guide.md +0 -55
  212. package/.enderun/knowledge/mobile_reference_guide.md +0 -35
  213. package/.enderun/knowledge/native_reference_guide.md +0 -34
  214. package/.enderun/knowledge/project_scaffold_guidelines.md +0 -110
  215. package/.enderun/knowledge/quality_reference_guide.md +0 -42
  216. package/.enderun/knowledge/reference_application_guidelines.md +0 -101
  217. package/.enderun/knowledge/responsive_design_standards.md +0 -27
  218. package/.enderun/knowledge/router_logic.md +0 -29
  219. package/.enderun/knowledge/security_reference_guide.md +0 -35
  220. package/.enderun/knowledge/token_economy_and_memory.md +0 -129
  221. package/.enderun/knowledge/zero_ui_library_policy.md +0 -13
  222. package/.enderun/logs/manager.json +0 -52
  223. package/.enderun/mcp_config.json +0 -11
  224. package/.enderun/memory/BUSINESS_CONTEXT.md +0 -17
  225. package/.enderun/memory/DECISIONS.md +0 -24
  226. package/.enderun/memory/LESSONS_LEARNED.md +0 -12
  227. package/.enderun/memory/PATTERNS.md +0 -17
  228. package/.enderun/memory/PROJECT_MEMORY.md +0 -69
  229. package/.enderun/memory-graph/agent-contexts/analyst.json +0 -1
  230. package/.enderun/memory-graph/agent-contexts/backend.json +0 -1
  231. package/.enderun/memory-graph/agent-contexts/devops.json +0 -1
  232. package/.enderun/memory-graph/agent-contexts/explorer.json +0 -1
  233. package/.enderun/memory-graph/agent-contexts/frontend.json +0 -1
  234. package/.enderun/memory-graph/agent-contexts/git.json +0 -1
  235. package/.enderun/memory-graph/agent-contexts/manager.json +0 -1
  236. package/.enderun/memory-graph/agent-contexts/mobile.json +0 -1
  237. package/.enderun/memory-graph/agent-contexts/native.json +0 -1
  238. package/.enderun/memory-graph/agent-contexts/quality.json +0 -1
  239. package/.enderun/memory-graph/agent-contexts/security.json +0 -1
  240. package/.enderun/memory-graph/graph.json +0 -133
  241. package/.enderun/memory-graph/shared-facts.json +0 -46
  242. package/.enderun/monitoring/.gitkeep +0 -0
  243. package/.enderun/observability/AUDIT_LOG.md +0 -9
  244. package/.enderun/observability/METRICS.md +0 -10
  245. package/.enderun/observability/README.md +0 -19
  246. package/.enderun/observability/TRACE_LOG.md +0 -10
  247. package/.enderun/queue/README.md +0 -36
  248. package/.enderun/registry/agents.yaml +0 -69
  249. package/.enderun/skills/agent_handshake.md +0 -37
  250. package/.enderun/skills/multi_agent_coordination.md +0 -64
  251. package/.enderun/skills/subagent_lifecycle.md +0 -48
  252. package/CLAUDE.md +0 -21
  253. package/GEMINI.md +0 -24
  254. package/GROK.md +0 -20
  255. package/agent.md +0 -25
  256. package/dist/.keep +0 -1
  257. package/dist/tests/adapter.test.d.ts +0 -1
  258. package/dist/tests/adapter.test.js +0 -82
  259. package/dist/tests/adapter.test.js.map +0 -1
  260. package/dist/tests/gemini.test.d.ts +0 -1
  261. package/dist/tests/gemini.test.js +0 -39
  262. package/dist/tests/gemini.test.js.map +0 -1
  263. package/dist/tests/initial.test.d.ts +0 -1
  264. package/dist/tests/initial.test.js +0 -7
  265. package/dist/tests/initial.test.js.map +0 -1
  266. package/docs/project_analysis_report.md +0 -69
  267. package/framework-mcp/dist/src/index.js +0 -70
  268. package/framework-mcp/dist/src/tools/definitions.js +0 -112
  269. package/framework-mcp/dist/src/tools/file_system/patch_file.js +0 -18
  270. package/framework-mcp/dist/src/tools/file_system/read_file.js +0 -27
  271. package/framework-mcp/dist/src/tools/file_system/replace_text.js +0 -31
  272. package/framework-mcp/dist/src/tools/file_system/write_file.js +0 -9
  273. package/framework-mcp/dist/src/tools/framework/get_status.js +0 -5
  274. package/framework-mcp/dist/src/tools/framework/orchestrate.js +0 -5
  275. package/framework-mcp/dist/src/tools/framework/update_contract_hash.js +0 -5
  276. package/framework-mcp/dist/src/tools/framework/update_memory.js +0 -8
  277. package/framework-mcp/dist/src/tools/index.js +0 -25
  278. package/framework-mcp/dist/src/tools/messaging/log_action.js +0 -22
  279. package/framework-mcp/dist/src/tools/messaging/send_message.js +0 -46
  280. package/framework-mcp/dist/src/tools/types.js +0 -1
  281. package/framework-mcp/dist/src/utils/cli.js +0 -20
  282. package/framework-mcp/dist/src/utils/security.js +0 -53
  283. package/framework-mcp/dist/tests/tools/file_system/replace_text.test.js +0 -68
  284. package/framework-mcp/node_modules/@types/node/LICENSE +0 -21
  285. package/framework-mcp/node_modules/@types/node/README.md +0 -15
  286. package/framework-mcp/node_modules/@types/node/assert/strict.d.ts +0 -111
  287. package/framework-mcp/node_modules/@types/node/assert.d.ts +0 -1078
  288. package/framework-mcp/node_modules/@types/node/async_hooks.d.ts +0 -603
  289. package/framework-mcp/node_modules/@types/node/buffer.buffer.d.ts +0 -472
  290. package/framework-mcp/node_modules/@types/node/buffer.d.ts +0 -1934
  291. package/framework-mcp/node_modules/@types/node/child_process.d.ts +0 -1476
  292. package/framework-mcp/node_modules/@types/node/cluster.d.ts +0 -578
  293. package/framework-mcp/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
  294. package/framework-mcp/node_modules/@types/node/compatibility/index.d.ts +0 -9
  295. package/framework-mcp/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  296. package/framework-mcp/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
  297. package/framework-mcp/node_modules/@types/node/console.d.ts +0 -452
  298. package/framework-mcp/node_modules/@types/node/constants.d.ts +0 -21
  299. package/framework-mcp/node_modules/@types/node/crypto.d.ts +0 -4545
  300. package/framework-mcp/node_modules/@types/node/dgram.d.ts +0 -600
  301. package/framework-mcp/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
  302. package/framework-mcp/node_modules/@types/node/dns/promises.d.ts +0 -503
  303. package/framework-mcp/node_modules/@types/node/dns.d.ts +0 -923
  304. package/framework-mcp/node_modules/@types/node/domain.d.ts +0 -170
  305. package/framework-mcp/node_modules/@types/node/events.d.ts +0 -976
  306. package/framework-mcp/node_modules/@types/node/fs/promises.d.ts +0 -1295
  307. package/framework-mcp/node_modules/@types/node/fs.d.ts +0 -4461
  308. package/framework-mcp/node_modules/@types/node/globals.d.ts +0 -172
  309. package/framework-mcp/node_modules/@types/node/globals.typedarray.d.ts +0 -38
  310. package/framework-mcp/node_modules/@types/node/http.d.ts +0 -2089
  311. package/framework-mcp/node_modules/@types/node/http2.d.ts +0 -2721
  312. package/framework-mcp/node_modules/@types/node/https.d.ts +0 -579
  313. package/framework-mcp/node_modules/@types/node/index.d.ts +0 -97
  314. package/framework-mcp/node_modules/@types/node/inspector.d.ts +0 -253
  315. package/framework-mcp/node_modules/@types/node/inspector.generated.d.ts +0 -4052
  316. package/framework-mcp/node_modules/@types/node/module.d.ts +0 -891
  317. package/framework-mcp/node_modules/@types/node/net.d.ts +0 -1076
  318. package/framework-mcp/node_modules/@types/node/os.d.ts +0 -506
  319. package/framework-mcp/node_modules/@types/node/package.json +0 -145
  320. package/framework-mcp/node_modules/@types/node/path.d.ts +0 -200
  321. package/framework-mcp/node_modules/@types/node/perf_hooks.d.ts +0 -968
  322. package/framework-mcp/node_modules/@types/node/process.d.ts +0 -2084
  323. package/framework-mcp/node_modules/@types/node/punycode.d.ts +0 -117
  324. package/framework-mcp/node_modules/@types/node/querystring.d.ts +0 -152
  325. package/framework-mcp/node_modules/@types/node/readline/promises.d.ts +0 -161
  326. package/framework-mcp/node_modules/@types/node/readline.d.ts +0 -594
  327. package/framework-mcp/node_modules/@types/node/repl.d.ts +0 -428
  328. package/framework-mcp/node_modules/@types/node/sea.d.ts +0 -153
  329. package/framework-mcp/node_modules/@types/node/sqlite.d.ts +0 -721
  330. package/framework-mcp/node_modules/@types/node/stream/consumers.d.ts +0 -38
  331. package/framework-mcp/node_modules/@types/node/stream/promises.d.ts +0 -90
  332. package/framework-mcp/node_modules/@types/node/stream/web.d.ts +0 -622
  333. package/framework-mcp/node_modules/@types/node/stream.d.ts +0 -1687
  334. package/framework-mcp/node_modules/@types/node/string_decoder.d.ts +0 -67
  335. package/framework-mcp/node_modules/@types/node/test.d.ts +0 -2163
  336. package/framework-mcp/node_modules/@types/node/timers/promises.d.ts +0 -108
  337. package/framework-mcp/node_modules/@types/node/timers.d.ts +0 -287
  338. package/framework-mcp/node_modules/@types/node/tls.d.ts +0 -1319
  339. package/framework-mcp/node_modules/@types/node/trace_events.d.ts +0 -197
  340. package/framework-mcp/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -468
  341. package/framework-mcp/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -34
  342. package/framework-mcp/node_modules/@types/node/ts5.6/index.d.ts +0 -97
  343. package/framework-mcp/node_modules/@types/node/tty.d.ts +0 -208
  344. package/framework-mcp/node_modules/@types/node/url.d.ts +0 -984
  345. package/framework-mcp/node_modules/@types/node/util.d.ts +0 -2606
  346. package/framework-mcp/node_modules/@types/node/v8.d.ts +0 -920
  347. package/framework-mcp/node_modules/@types/node/vm.d.ts +0 -1000
  348. package/framework-mcp/node_modules/@types/node/wasi.d.ts +0 -181
  349. package/framework-mcp/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
  350. package/framework-mcp/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  351. package/framework-mcp/node_modules/@types/node/web-globals/events.d.ts +0 -97
  352. package/framework-mcp/node_modules/@types/node/web-globals/fetch.d.ts +0 -55
  353. package/framework-mcp/node_modules/@types/node/web-globals/navigator.d.ts +0 -22
  354. package/framework-mcp/node_modules/@types/node/web-globals/storage.d.ts +0 -24
  355. package/framework-mcp/node_modules/@types/node/worker_threads.d.ts +0 -784
  356. package/framework-mcp/node_modules/@types/node/zlib.d.ts +0 -747
  357. package/framework-mcp/node_modules/typescript/LICENSE.txt +0 -55
  358. package/framework-mcp/node_modules/typescript/README.md +0 -50
  359. package/framework-mcp/node_modules/typescript/SECURITY.md +0 -41
  360. package/framework-mcp/node_modules/typescript/ThirdPartyNoticeText.txt +0 -193
  361. package/framework-mcp/node_modules/typescript/bin/tsc +0 -2
  362. package/framework-mcp/node_modules/typescript/bin/tsserver +0 -2
  363. package/framework-mcp/node_modules/typescript/lib/_tsc.js +0 -133818
  364. package/framework-mcp/node_modules/typescript/lib/_tsserver.js +0 -659
  365. package/framework-mcp/node_modules/typescript/lib/_typingsInstaller.js +0 -222
  366. package/framework-mcp/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +0 -2122
  367. package/framework-mcp/node_modules/typescript/lib/de/diagnosticMessages.generated.json +0 -2122
  368. package/framework-mcp/node_modules/typescript/lib/es/diagnosticMessages.generated.json +0 -2122
  369. package/framework-mcp/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +0 -2122
  370. package/framework-mcp/node_modules/typescript/lib/it/diagnosticMessages.generated.json +0 -2122
  371. package/framework-mcp/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +0 -2122
  372. package/framework-mcp/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +0 -2122
  373. package/framework-mcp/node_modules/typescript/lib/lib.d.ts +0 -22
  374. package/framework-mcp/node_modules/typescript/lib/lib.decorators.d.ts +0 -384
  375. package/framework-mcp/node_modules/typescript/lib/lib.decorators.legacy.d.ts +0 -22
  376. package/framework-mcp/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +0 -41
  377. package/framework-mcp/node_modules/typescript/lib/lib.dom.d.ts +0 -39429
  378. package/framework-mcp/node_modules/typescript/lib/lib.dom.iterable.d.ts +0 -571
  379. package/framework-mcp/node_modules/typescript/lib/lib.es2015.collection.d.ts +0 -147
  380. package/framework-mcp/node_modules/typescript/lib/lib.es2015.core.d.ts +0 -597
  381. package/framework-mcp/node_modules/typescript/lib/lib.es2015.d.ts +0 -28
  382. package/framework-mcp/node_modules/typescript/lib/lib.es2015.generator.d.ts +0 -77
  383. package/framework-mcp/node_modules/typescript/lib/lib.es2015.iterable.d.ts +0 -605
  384. package/framework-mcp/node_modules/typescript/lib/lib.es2015.promise.d.ts +0 -81
  385. package/framework-mcp/node_modules/typescript/lib/lib.es2015.proxy.d.ts +0 -128
  386. package/framework-mcp/node_modules/typescript/lib/lib.es2015.reflect.d.ts +0 -144
  387. package/framework-mcp/node_modules/typescript/lib/lib.es2015.symbol.d.ts +0 -46
  388. package/framework-mcp/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -326
  389. package/framework-mcp/node_modules/typescript/lib/lib.es2016.array.include.d.ts +0 -116
  390. package/framework-mcp/node_modules/typescript/lib/lib.es2016.d.ts +0 -21
  391. package/framework-mcp/node_modules/typescript/lib/lib.es2016.full.d.ts +0 -23
  392. package/framework-mcp/node_modules/typescript/lib/lib.es2016.intl.d.ts +0 -31
  393. package/framework-mcp/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +0 -21
  394. package/framework-mcp/node_modules/typescript/lib/lib.es2017.d.ts +0 -26
  395. package/framework-mcp/node_modules/typescript/lib/lib.es2017.date.d.ts +0 -31
  396. package/framework-mcp/node_modules/typescript/lib/lib.es2017.full.d.ts +0 -23
  397. package/framework-mcp/node_modules/typescript/lib/lib.es2017.intl.d.ts +0 -44
  398. package/framework-mcp/node_modules/typescript/lib/lib.es2017.object.d.ts +0 -49
  399. package/framework-mcp/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +0 -135
  400. package/framework-mcp/node_modules/typescript/lib/lib.es2017.string.d.ts +0 -45
  401. package/framework-mcp/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +0 -53
  402. package/framework-mcp/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -77
  403. package/framework-mcp/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +0 -53
  404. package/framework-mcp/node_modules/typescript/lib/lib.es2018.d.ts +0 -24
  405. package/framework-mcp/node_modules/typescript/lib/lib.es2018.full.d.ts +0 -24
  406. package/framework-mcp/node_modules/typescript/lib/lib.es2018.intl.d.ts +0 -83
  407. package/framework-mcp/node_modules/typescript/lib/lib.es2018.promise.d.ts +0 -30
  408. package/framework-mcp/node_modules/typescript/lib/lib.es2018.regexp.d.ts +0 -37
  409. package/framework-mcp/node_modules/typescript/lib/lib.es2019.array.d.ts +0 -79
  410. package/framework-mcp/node_modules/typescript/lib/lib.es2019.d.ts +0 -24
  411. package/framework-mcp/node_modules/typescript/lib/lib.es2019.full.d.ts +0 -24
  412. package/framework-mcp/node_modules/typescript/lib/lib.es2019.intl.d.ts +0 -23
  413. package/framework-mcp/node_modules/typescript/lib/lib.es2019.object.d.ts +0 -33
  414. package/framework-mcp/node_modules/typescript/lib/lib.es2019.string.d.ts +0 -37
  415. package/framework-mcp/node_modules/typescript/lib/lib.es2019.symbol.d.ts +0 -24
  416. package/framework-mcp/node_modules/typescript/lib/lib.es2020.bigint.d.ts +0 -765
  417. package/framework-mcp/node_modules/typescript/lib/lib.es2020.d.ts +0 -27
  418. package/framework-mcp/node_modules/typescript/lib/lib.es2020.date.d.ts +0 -42
  419. package/framework-mcp/node_modules/typescript/lib/lib.es2020.full.d.ts +0 -24
  420. package/framework-mcp/node_modules/typescript/lib/lib.es2020.intl.d.ts +0 -474
  421. package/framework-mcp/node_modules/typescript/lib/lib.es2020.number.d.ts +0 -28
  422. package/framework-mcp/node_modules/typescript/lib/lib.es2020.promise.d.ts +0 -47
  423. package/framework-mcp/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +0 -99
  424. package/framework-mcp/node_modules/typescript/lib/lib.es2020.string.d.ts +0 -44
  425. package/framework-mcp/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -41
  426. package/framework-mcp/node_modules/typescript/lib/lib.es2021.d.ts +0 -23
  427. package/framework-mcp/node_modules/typescript/lib/lib.es2021.full.d.ts +0 -24
  428. package/framework-mcp/node_modules/typescript/lib/lib.es2021.intl.d.ts +0 -166
  429. package/framework-mcp/node_modules/typescript/lib/lib.es2021.promise.d.ts +0 -48
  430. package/framework-mcp/node_modules/typescript/lib/lib.es2021.string.d.ts +0 -33
  431. package/framework-mcp/node_modules/typescript/lib/lib.es2021.weakref.d.ts +0 -78
  432. package/framework-mcp/node_modules/typescript/lib/lib.es2022.array.d.ts +0 -121
  433. package/framework-mcp/node_modules/typescript/lib/lib.es2022.d.ts +0 -25
  434. package/framework-mcp/node_modules/typescript/lib/lib.es2022.error.d.ts +0 -75
  435. package/framework-mcp/node_modules/typescript/lib/lib.es2022.full.d.ts +0 -24
  436. package/framework-mcp/node_modules/typescript/lib/lib.es2022.intl.d.ts +0 -145
  437. package/framework-mcp/node_modules/typescript/lib/lib.es2022.object.d.ts +0 -26
  438. package/framework-mcp/node_modules/typescript/lib/lib.es2022.regexp.d.ts +0 -39
  439. package/framework-mcp/node_modules/typescript/lib/lib.es2022.string.d.ts +0 -25
  440. package/framework-mcp/node_modules/typescript/lib/lib.es2023.array.d.ts +0 -924
  441. package/framework-mcp/node_modules/typescript/lib/lib.es2023.collection.d.ts +0 -21
  442. package/framework-mcp/node_modules/typescript/lib/lib.es2023.d.ts +0 -22
  443. package/framework-mcp/node_modules/typescript/lib/lib.es2023.full.d.ts +0 -24
  444. package/framework-mcp/node_modules/typescript/lib/lib.es2023.intl.d.ts +0 -56
  445. package/framework-mcp/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +0 -65
  446. package/framework-mcp/node_modules/typescript/lib/lib.es2024.collection.d.ts +0 -29
  447. package/framework-mcp/node_modules/typescript/lib/lib.es2024.d.ts +0 -26
  448. package/framework-mcp/node_modules/typescript/lib/lib.es2024.full.d.ts +0 -24
  449. package/framework-mcp/node_modules/typescript/lib/lib.es2024.object.d.ts +0 -29
  450. package/framework-mcp/node_modules/typescript/lib/lib.es2024.promise.d.ts +0 -35
  451. package/framework-mcp/node_modules/typescript/lib/lib.es2024.regexp.d.ts +0 -25
  452. package/framework-mcp/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +0 -68
  453. package/framework-mcp/node_modules/typescript/lib/lib.es2024.string.d.ts +0 -29
  454. package/framework-mcp/node_modules/typescript/lib/lib.es5.d.ts +0 -4601
  455. package/framework-mcp/node_modules/typescript/lib/lib.es6.d.ts +0 -23
  456. package/framework-mcp/node_modules/typescript/lib/lib.esnext.array.d.ts +0 -35
  457. package/framework-mcp/node_modules/typescript/lib/lib.esnext.collection.d.ts +0 -96
  458. package/framework-mcp/node_modules/typescript/lib/lib.esnext.d.ts +0 -29
  459. package/framework-mcp/node_modules/typescript/lib/lib.esnext.decorators.d.ts +0 -28
  460. package/framework-mcp/node_modules/typescript/lib/lib.esnext.disposable.d.ts +0 -193
  461. package/framework-mcp/node_modules/typescript/lib/lib.esnext.error.d.ts +0 -24
  462. package/framework-mcp/node_modules/typescript/lib/lib.esnext.float16.d.ts +0 -445
  463. package/framework-mcp/node_modules/typescript/lib/lib.esnext.full.d.ts +0 -24
  464. package/framework-mcp/node_modules/typescript/lib/lib.esnext.intl.d.ts +0 -21
  465. package/framework-mcp/node_modules/typescript/lib/lib.esnext.iterator.d.ts +0 -148
  466. package/framework-mcp/node_modules/typescript/lib/lib.esnext.promise.d.ts +0 -34
  467. package/framework-mcp/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +0 -25
  468. package/framework-mcp/node_modules/typescript/lib/lib.scripthost.d.ts +0 -322
  469. package/framework-mcp/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +0 -41
  470. package/framework-mcp/node_modules/typescript/lib/lib.webworker.d.ts +0 -13150
  471. package/framework-mcp/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +0 -23
  472. package/framework-mcp/node_modules/typescript/lib/lib.webworker.iterable.d.ts +0 -340
  473. package/framework-mcp/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +0 -2122
  474. package/framework-mcp/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +0 -2122
  475. package/framework-mcp/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +0 -2122
  476. package/framework-mcp/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +0 -2122
  477. package/framework-mcp/node_modules/typescript/lib/tsc.js +0 -8
  478. package/framework-mcp/node_modules/typescript/lib/tsserver.js +0 -8
  479. package/framework-mcp/node_modules/typescript/lib/tsserverlibrary.d.ts +0 -17
  480. package/framework-mcp/node_modules/typescript/lib/tsserverlibrary.js +0 -21
  481. package/framework-mcp/node_modules/typescript/lib/typesMap.json +0 -497
  482. package/framework-mcp/node_modules/typescript/lib/typescript.d.ts +0 -11437
  483. package/framework-mcp/node_modules/typescript/lib/typescript.js +0 -200276
  484. package/framework-mcp/node_modules/typescript/lib/typingsInstaller.js +0 -8
  485. package/framework-mcp/node_modules/typescript/lib/watchGuard.js +0 -53
  486. package/framework-mcp/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +0 -2122
  487. package/framework-mcp/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +0 -2122
  488. package/framework-mcp/node_modules/typescript/package.json +0 -120
  489. package/framework-mcp/node_modules/undici-types/LICENSE +0 -21
  490. package/framework-mcp/node_modules/undici-types/README.md +0 -6
  491. package/framework-mcp/node_modules/undici-types/agent.d.ts +0 -31
  492. package/framework-mcp/node_modules/undici-types/api.d.ts +0 -43
  493. package/framework-mcp/node_modules/undici-types/balanced-pool.d.ts +0 -29
  494. package/framework-mcp/node_modules/undici-types/cache.d.ts +0 -36
  495. package/framework-mcp/node_modules/undici-types/client.d.ts +0 -108
  496. package/framework-mcp/node_modules/undici-types/connector.d.ts +0 -34
  497. package/framework-mcp/node_modules/undici-types/content-type.d.ts +0 -21
  498. package/framework-mcp/node_modules/undici-types/cookies.d.ts +0 -28
  499. package/framework-mcp/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  500. package/framework-mcp/node_modules/undici-types/dispatcher.d.ts +0 -256
  501. package/framework-mcp/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  502. package/framework-mcp/node_modules/undici-types/errors.d.ts +0 -149
  503. package/framework-mcp/node_modules/undici-types/eventsource.d.ts +0 -61
  504. package/framework-mcp/node_modules/undici-types/fetch.d.ts +0 -209
  505. package/framework-mcp/node_modules/undici-types/file.d.ts +0 -39
  506. package/framework-mcp/node_modules/undici-types/filereader.d.ts +0 -54
  507. package/framework-mcp/node_modules/undici-types/formdata.d.ts +0 -108
  508. package/framework-mcp/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  509. package/framework-mcp/node_modules/undici-types/global-origin.d.ts +0 -7
  510. package/framework-mcp/node_modules/undici-types/handlers.d.ts +0 -15
  511. package/framework-mcp/node_modules/undici-types/header.d.ts +0 -4
  512. package/framework-mcp/node_modules/undici-types/index.d.ts +0 -71
  513. package/framework-mcp/node_modules/undici-types/interceptors.d.ts +0 -17
  514. package/framework-mcp/node_modules/undici-types/mock-agent.d.ts +0 -50
  515. package/framework-mcp/node_modules/undici-types/mock-client.d.ts +0 -25
  516. package/framework-mcp/node_modules/undici-types/mock-errors.d.ts +0 -12
  517. package/framework-mcp/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  518. package/framework-mcp/node_modules/undici-types/mock-pool.d.ts +0 -25
  519. package/framework-mcp/node_modules/undici-types/package.json +0 -55
  520. package/framework-mcp/node_modules/undici-types/patch.d.ts +0 -33
  521. package/framework-mcp/node_modules/undici-types/pool-stats.d.ts +0 -19
  522. package/framework-mcp/node_modules/undici-types/pool.d.ts +0 -39
  523. package/framework-mcp/node_modules/undici-types/proxy-agent.d.ts +0 -28
  524. package/framework-mcp/node_modules/undici-types/readable.d.ts +0 -65
  525. package/framework-mcp/node_modules/undici-types/retry-agent.d.ts +0 -8
  526. package/framework-mcp/node_modules/undici-types/retry-handler.d.ts +0 -116
  527. package/framework-mcp/node_modules/undici-types/util.d.ts +0 -18
  528. package/framework-mcp/node_modules/undici-types/webidl.d.ts +0 -228
  529. package/framework-mcp/node_modules/undici-types/websocket.d.ts +0 -150
  530. package/framework-mcp/tests/tools/file_system/replace_text.test.js +0 -68
  531. package/framework-mcp/tests/tools/file_system/replace_text.test.ts +0 -77
  532. package/mcp.json +0 -11
  533. package/panda.config.ts +0 -100
@@ -1,167 +0,0 @@
1
- # High-Risk Action Approval Flow Simulation
2
-
3
- **Purpose**: This simulation demonstrates the complete end-to-end flow of a high-risk administrative action in a corporate project, from the moment the user clicks the button in the UI until the action is executed and audited.
4
-
5
- **Scenario**: A company administrator wants to promote a regular user to SuperAdmin. This action is classified as high-risk.
6
-
7
- ---
8
-
9
- ## Step 1 – User Triggers the Action (Frontend)
10
-
11
- **UI Context**: Admin dashboard → User list → “Promote to SuperAdmin” button next to a user named “Alice”.
12
-
13
- **User clicks the button.**
14
-
15
- **Frontend behavior** (as per `high-risk-security-modal-hermes-flow.md`):
16
-
17
- - Immediately opens a prominent, non-dismissible `HighRiskSecurityModal`.
18
- - Modal displays:
19
- - Clear warning: “This action will grant full system privileges to the selected user.”
20
- - Required “Reason” textarea.
21
- - Buttons: “Cancel” and “Request Manager Approval via Hermes”.
22
-
23
- **User enters the reason**:
24
- “Alice needs SuperAdmin access to handle critical production incidents during the migration period. Security team has reviewed and approved.”
25
-
26
- User clicks “Request Manager Approval via Hermes”.
27
-
28
- ---
29
-
30
- ## Step 2 – Hermes Briefing to @manager
31
-
32
- **Frontend** constructs and sends a Hermes message to @manager:
33
-
34
- ```json
35
- {
36
- "type": "high_risk_approval_request",
37
- "traceId": "TRACE-20260525-USER-PROMO-042",
38
- "payload": {
39
- "action": "PROMOTE_TO_SUPERADMIN",
40
- "targetUserId": "user_0192",
41
- "proposedBy": "admin_007",
42
- "reason": "Alice needs SuperAdmin access to handle critical production incidents during the migration period. Security team has reviewed and approved."
43
- }
44
- }
45
- ```
46
-
47
- **@manager receives the briefing.**
48
-
49
- **@manager internal process** (as per corporate-governance knowledge):
50
-
51
- - Reads `high-risk-actions-managerapproval.md`
52
- - Reads `audit-logging-standard.md`
53
- - Assesses risk level (very high – SuperAdmin elevation)
54
- - Checks current project context and any existing policies
55
-
56
- **@manager response** (sent back via Hermes):
57
-
58
- ```json
59
- {
60
- "type": "high_risk_approval_response",
61
- "traceId": "TRACE-20260525-USER-PROMO-042",
62
- "status": "approved",
63
- "managerApproval": {
64
- "approvalId": "approval_88471",
65
- "traceId": "TRACE-20260525-USER-PROMO-042",
66
- "approvedBy": "manager",
67
- "approvedAt": "2026-05-25T00:31:12Z",
68
- "signature": "mgr-sig-20260525-88471",
69
- "reason": "Approved for production incident handling during migration window. 30-day time-limited approval recommended."
70
- }
71
- }
72
- ```
73
-
74
- ---
75
-
76
- ## Step 3 – Frontend Receives Approval and Dispatches Request
77
-
78
- **Frontend**:
79
- - Receives the signed `managerApproval` token.
80
- - Closes the security modal.
81
- - Shows temporary status: “Manager approval received. Executing action…”
82
- - Attaches the token to the API request:
83
-
84
- ```ts
85
- const payload = {
86
- userId: "user_0192" as UserID,
87
- newRole: "SuperAdmin",
88
- isHighRiskAdminAction: true,
89
- managerApproval: {
90
- approvalId: "approval_88471",
91
- traceId: "TRACE-20260525-USER-PROMO-042",
92
- approvedBy: "manager",
93
- approvedAt: "2026-05-25T00:31:12Z",
94
- signature: "mgr-sig-20260525-88471",
95
- reason: "Approved for production incident handling during migration window. 30-day time-limited approval recommended."
96
- }
97
- };
98
-
99
- await fetch(`/api/v1/users/${userId}/role`, {
100
- method: "POST",
101
- body: JSON.stringify(payload)
102
- });
103
- ```
104
-
105
- ---
106
-
107
- ## Step 4 – Backend Validation and Execution
108
-
109
- **@backend** receives the request.
110
-
111
- **Validation steps** (mandatory per `high-risk-actions-managerapproval.md` and `domain-error-handling-standard.md`):
112
-
113
- 1. Checks `isHighRiskAdminAction === true`
114
- 2. Validates presence and structure of `managerApproval`
115
- 3. Verifies `managerApproval.approvedBy === "manager"`
116
- 4. (In real system) Validates cryptographic signature or secure reference
117
-
118
- If any check fails → throws `HighRiskActionRequiresApprovalError`
119
-
120
- **Execution**:
121
-
122
- - Updates user role in database
123
- - Creates audit log entry (see `audit-logging-standard.md`):
124
-
125
- ```ts
126
- await auditLogRepository.create({
127
- traceId: "TRACE-20260525-USER-PROMO-042",
128
- actorId: "admin_007" as UserID,
129
- action: "USER_ROLE_ELEVATED_TO_SUPERADMIN",
130
- targetId: "user_0192" as UserID,
131
- beforeState: { role: "Admin" },
132
- afterState: { role: "SuperAdmin" },
133
- managerApprovalId: "approval_88471",
134
- reason: "Approved for production incident handling during migration window..."
135
- });
136
- ```
137
-
138
- - Returns success response with the used `approvalId`
139
-
140
- ---
141
-
142
- ## Step 5 – Frontend Feedback and Audit Visibility
143
-
144
- **Frontend**:
145
- - Shows success message: “Alice has been promoted to SuperAdmin. Action recorded with approval ID: approval_88471”
146
- - (Optional but recommended) Shows link to view the audit trail entry for this action
147
-
148
- **Audit log entry** is now queryable by authorized personnel (themselves subject to high-risk approval if they want to view full details).
149
-
150
- ---
151
-
152
- ## Key Governance Elements Demonstrated
153
-
154
- - User cannot bypass the security modal
155
- - Reason is mandatory and travels with the approval
156
- - @manager performs explicit risk assessment before issuing the token
157
- - Backend strictly validates the token before any state change
158
- - Full audit trail is created with reference to the approval
159
- - Trace ID connects the entire flow (UI → Hermes → Backend → Audit)
160
-
161
- This is the expected behavior for any high-risk action in a corporate project using Agent Enderun.
162
-
163
- **Anti-patterns shown as forbidden in this simulation**:
164
- - Frontend directly calling the API without the modal and approval
165
- - Backend executing the role change without validating `managerApproval`
166
- - Skipping audit logging for a privileged action
167
- - Re-using an old approval token without fresh @manager review
@@ -1,29 +0,0 @@
1
- # High-Risk Action Approval Protocol
2
-
3
- This protocol defines the non-negotiable process for executing high-risk operations (e.g., database schema changes, production environment configuration, user permission management, bulk data deletion) within the Agent Enderun framework.
4
-
5
- ## 1. Scope Definition
6
- Any action that meets the following criteria is classified as "High-Risk":
7
- - Modifies production database schema.
8
- - Changes system-wide security policies or IAM permissions.
9
- - Triggers destructive data operations (bulk delete, purge).
10
- - Modifies production-level configuration files (e.g., `.env.prod`).
11
-
12
- ## 2. Mandatory Approval Flow
13
-
14
- All high-risk actions MUST follow the "Three-Key" principle:
15
-
16
- 1. **Initiation:** The requesting specialist agent MUST brief `@manager` using the `send_agent_message` Hermes protocol, explicitly stating the intent and risk.
17
- 2. **Analysis:** `@manager` logs the intent to `.enderun/logs/manager.json` and updates `PROJECT_MEMORY.md` with a new Trace ID status: `PENDING_APPROVAL`.
18
- 3. **Quality/Security Gate:** `@manager` delegates the task to `@quality` via Hermes with a `SECURITY_AND_IMPACT_AUDIT` category.
19
- - `@quality` MUST run `analyze_procedural_continuity` and `security_audit_scan`.
20
- - `@quality` MUST issue a formal `APPROVAL` or `REJECTION` Hermes message back to `@manager`.
21
- 4. **Execution:** ONLY upon receiving an `APPROVAL` Hermes message, `@manager` is authorized to execute the action via internal tools.
22
-
23
- ## 3. Tool Enforcement (MCP)
24
- - Specialists must NOT have direct MCP tool permissions for high-risk actions.
25
- - These tools MUST be wrapped in a decorator that forces the request through the `@manager` approval flow.
26
-
27
- ## 4. Audit Trail (Non-Negotiable)
28
- - All steps must be recorded in `.enderun/logs/governance.json`.
29
- - Missing audit trails for any high-risk action constitute a "Critical Rule Violation" and trigger an automatic system-wide lock.
@@ -1,76 +0,0 @@
1
- # High-Risk Administrative Actions & ManagerApproval Pattern
2
-
3
- **Applies to:** Any operation that changes user roles/permissions, system configuration, bulk data operations, or audit access.
4
-
5
- ## Core Principle
6
- From ENDERUN.md Corporate CRUD Governance:
7
- > High-risk administrative operations are strictly under @manager control. Specialist agents must refuse and immediately redirect such requests to @manager.
8
-
9
- ## Required Payload Shape
10
- Every high-risk request **must** include:
11
-
12
- ```ts
13
- interface HighRiskActionPayload {
14
- isHighRiskAdminAction: true; // Explicit boolean flag
15
- managerApproval: ManagerApproval; // Cryptographically or procedurally signed token
16
- }
17
-
18
- interface ManagerApproval {
19
- approvalId: ApprovalID;
20
- traceId: TraceID;
21
- approvedBy: 'manager';
22
- approvedAt: string; // ISO-8601
23
- signature: string; // In real systems: cryptographic signature or secure reference
24
- reason: string; // Human-readable justification (mandatory)
25
- }
26
- ```
27
-
28
- ## Backend Enforcement Rules (@backend)
29
- 1. If the action affects roles/permissions at Admin level or higher → treat as high-risk.
30
- 2. Reject the request immediately (403) if either `isHighRiskAdminAction` or `managerApproval` is missing.
31
- 3. Validate that `managerApproval.approvedBy === 'manager'`.
32
- 4. Log the full approval token for audit.
33
- 5. Never perform the state change before validation.
34
-
35
- ## Frontend Requirements (@frontend)
36
- 1. Any button or flow that can trigger a high-risk action must first open a **prominent, non-dismissible security modal**.
37
- 2. The modal must:
38
- - Clearly explain the risk and consequences.
39
- - Require the user to enter a "reason".
40
- - Only then initiate the Hermes briefing to @manager.
41
- 3. The actual API call may only be made **after** a valid `managerApproval` token is returned from the briefing flow.
42
-
43
- ## Hermes Coordination
44
- - @frontend → Hermes briefing to @manager with proposed action + reason.
45
- - @manager performs risk assessment and either:
46
- - Issues a signed `managerApproval` token, or
47
- - Rejects the request.
48
- - Only after receiving the token does the frontend dispatch the high-risk request to backend.
49
-
50
- ## Concrete Payload Example (TypeScript)
51
-
52
- ```ts
53
- // Request body for elevating a user to SuperAdmin
54
- interface PromoteToSuperAdminRequest {
55
- userId: UserID;
56
- newRole: 'SuperAdmin';
57
- isHighRiskAdminAction: true;
58
- managerApproval: {
59
- approvalId: ApprovalID;
60
- traceId: TraceID;
61
- approvedBy: 'manager';
62
- approvedAt: string;
63
- signature: string;
64
- reason: string;
65
- };
66
- }
67
- ```
68
-
69
- ## Example High-Risk Actions (Non-Exhaustive)
70
- - Elevating any user to Admin or SuperAdmin
71
- - Resetting system-wide configuration
72
- - Bulk user deletion or data purge
73
- - Exporting full audit logs containing PII
74
- - Changing authentication providers or security policies
75
-
76
- This pattern is the foundation of trustworthy enterprise governance in Agent Enderun.
@@ -1,49 +0,0 @@
1
- # High-Risk Security Modal + Hermes Briefing Flow (Frontend Pattern)
2
-
3
- **Owner:** @frontend
4
- **Related:** high-risk-actions-managerapproval.md
5
-
6
- ## When to Use
7
- Any UI action that can result in a high-risk backend operation (see list in high-risk-actions document).
8
-
9
- ## Required UI Behavior
10
-
11
- 1. **Trigger Detection**
12
- - The component must recognize that the intended action is high-risk (role elevation, bulk ops, etc.).
13
-
14
- 2. **Security Modal (Mandatory)**
15
- - Modal must be prominent (red/danger styling, large title "High-Risk Administrative Action").
16
- - Must clearly state what is about to happen and the potential impact.
17
- - Must contain a required free-text "Reason" field (this becomes part of the approval token).
18
- - Must have clear "Cancel" and "Request Manager Approval" actions.
19
- - Should not be dismissible by clicking outside while the request is in flight.
20
-
21
- 3. **Hermes Briefing Flow**
22
- - On "Request Manager Approval":
23
- - Frontend sends a Hermes message to @manager containing:
24
- - Proposed action
25
- - Affected entities (e.g. userId)
26
- - User-entered reason
27
- - Current user context
28
- - UI enters "Awaiting @manager approval" state (loading indicator + clear message).
29
-
30
- 4. **Approval Reception**
31
- - When @manager responds with a valid `managerApproval` token (via Hermes or secure channel), the frontend:
32
- - Attaches the token to the request payload (`isHighRiskAdminAction: true`, `managerApproval`).
33
- - Dispatches the actual API call.
34
- - Shows success/failure feedback.
35
-
36
- 5. **Audit & Traceability**
37
- - The Trace ID from the approval must be visible or logged in the UI success state.
38
- - The full approval reason must be recorded.
39
-
40
- ## Anti-Patterns (Forbidden)
41
- - Performing the high-risk API call without the modal + reason.
42
- - Faking or locally generating the `managerApproval` object in the browser.
43
- - Hiding the risk from the user ("just click confirm").
44
- - Re-using old approval tokens.
45
-
46
- ## Recommended Component Location
47
- `apps/web/src/components/ui/HighRiskSecurityModal.tsx` (or similar compound component).
48
-
49
- This pattern ensures that high-risk actions are never accidental and always carry a full audit trail through @manager.
@@ -1,112 +0,0 @@
1
- # First 30 Days Corporate Project Management Guide (@manager)
2
-
3
- **Purpose**: A practical playbook for @manager covering the critical first 30 days of any new corporate/enterprise project. It combines the Scaffolding SOP, checklists, and briefings into a day-by-day and week-by-week operating rhythm.
4
-
5
- ---
6
-
7
- ## Week 0 – Project Initiation (Days 1–3)
8
-
9
- ### Day 1 – Governance Baseline
10
- - Deliver the **Governance Baseline Briefing** (use `governance-baseline-briefing-template.md`)
11
- - Walk the user through the **Corporate Project Kickoff Checklist**
12
- - Get explicit acknowledgment of the standards
13
- - Record the decision in `PROJECT_MEMORY.md`
14
-
15
- ### Day 2 – Team Alignment
16
- - Brief all active agents using `corporate-project-scaffolding-sop.md`
17
- - Assign initial responsibilities:
18
- - @backend: Type foundation
19
- - @frontend: Type copies + modal skeleton
20
- - @analyst: Contract verification process
21
- - Create the first Architecture Decision Record (ADR) for governance baseline
22
-
23
- ### Day 3 – Foundation Kickoff
24
- - Officially start **Phase 1** (Contract Foundation)
25
- - Set up the first Hermes channels and trace ID convention
26
-
27
- ---
28
-
29
- ## Week 1 – Foundation Layer
30
-
31
- **Primary Focus**: Contracts before code.
32
-
33
- **Key Activities**:
34
- - Ensure `branded-types-law.md` and core identifiers are implemented
35
- - `ManagerApproval` and `HighRiskActionPayload` are defined
36
- - `contract.version.json` is initialized
37
- - @frontend has matching type copies
38
- - First version of `domain-error-handling-standard.md` is in place
39
-
40
- **@manager Checkpoints** (end of Week 1):
41
- - [ ] All Phase 1 items from Kickoff Checklist completed
42
- - [ ] User has seen the type foundation
43
- - [ ] No feature implementation has started yet
44
-
45
- ---
46
-
47
- ## Week 2 – High-Risk Infrastructure
48
-
49
- **Primary Focus**: Build the protection layer before any privileged features.
50
-
51
- **Key Activities**:
52
- - @backend designs high-risk validation logic
53
- - @frontend builds `HighRiskSecurityModal` + Hermes briefing hook
54
- - Audit logging strategy is defined
55
- - Reference: `high-risk-action-approval-flow-simulation.md`
56
-
57
- **@manager Checkpoints** (end of Week 2):
58
- - [ ] High-risk endpoint pattern approved
59
- - [ ] Security modal + Hermes flow reviewed
60
- - [ ] Audit logging approach signed off
61
-
62
- ---
63
-
64
- ## Week 3 – First Real Features (Under Strict Governance)
65
-
66
- Only after Weeks 1–2 are complete:
67
-
68
- - Begin implementing the first non-privileged features using proper contracts and typed errors
69
- - First privileged feature may only start after infrastructure from Week 2 is approved
70
- - Use `backend-high-risk-endpoint-guide.md` and `frontend-high-risk-modal-guide.md` as implementation references
71
-
72
- ---
73
-
74
- ## Week 4 – Reinforcement & Early Habits
75
-
76
- **Focus**: Make governance second nature.
77
-
78
- **Activities**:
79
- - Run the first **Contract Drift** simulation exercise with the team (`contract-drift-detection-simulation.md`)
80
- - Review the first audit logs of any privileged actions
81
- - Conduct a mid-project governance retrospective
82
- - Update `PROJECT_MEMORY.md` with lessons learned
83
-
84
- ---
85
-
86
- ## Ongoing Rhythm (After Day 30)
87
-
88
- - Every new feature involving users, roles, permissions, or configuration → Re-read relevant governance files
89
- - Every contract change → @analyst verification + Hermes notification
90
- - Every high-risk action in production → Review the approval + audit trail
91
- - Monthly: Light governance health check using the Kickoff Checklist as a template
92
-
93
- ---
94
-
95
- ## Anti-Patterns in the First 30 Days
96
-
97
- - Starting feature coding before governance baseline is acknowledged
98
- - Promising “we’ll add controls later”
99
- - Letting @backend or @frontend implement high-risk logic without @manager approval of the pattern
100
- - Skipping documentation of governance decisions
101
-
102
- ---
103
-
104
- ## Reference Documents (Read in Order)
105
-
106
- 1. `corporate-project-scaffolding-sop.md`
107
- 2. `corporate-project-kickoff-checklist.md`
108
- 3. `governance-baseline-briefing-template.md`
109
- 4. `manager-first-three-briefings.md`
110
- 5. `corporate-governance-playbook.md`
111
-
112
- This 30-day guide replaces ad-hoc project starts with a disciplined, repeatable process.
@@ -1,79 +0,0 @@
1
- # @manager – First Three Critical Briefings (Templates)
2
-
3
- This document provides ready-to-adapt briefing content that @manager should deliver in the early stages of any corporate/enterprise project.
4
-
5
- ---
6
-
7
- ## Briefing 1: Governance Baseline (Day 0 / Project Kickoff)
8
-
9
- **Audience:** User + all active agents
10
-
11
- **Key Message:**
12
-
13
- Before we write a single line of feature code, we must lock in the governance foundation.
14
-
15
- We will follow these non-negotiable standards:
16
- - Branded Types for every identifier
17
- - High-risk actions protected by explicit `managerApproval` + Hermes flow
18
- - Contract-first development
19
- - Proper audit logging for all privileged operations
20
- - Typed Domain Errors instead of generic exceptions
21
-
22
- These rules exist to protect the project from technical debt, security holes, and audit failures at scale.
23
-
24
- I will personally enforce these standards in every briefing and delegation. If we encounter pressure to “skip governance for speed”, we will slow down instead.
25
-
26
- Do you accept these terms as the operating rules for this project?
27
-
28
- ---
29
-
30
- ## Briefing 2: Contract & Type Foundation (After User Accepts Governance)
31
-
32
- **Audience:** @backend + @frontend + @analyst
33
-
34
- **Key Message:**
35
-
36
- We will now establish the single source of truth for all types.
37
-
38
- 1. Create `apps/backend/src/types` with:
39
- - Branded type utility
40
- - Core identifiers (UserID, RoleID, ApprovalID, etc.)
41
- - `ManagerApproval` and `HighRiskActionPayload`
42
- - Initial domain entities and API contracts
43
-
44
- 2. Initialize `contract.version.json`.
45
-
46
- 3. @frontend will immediately create matching type copies.
47
-
48
- 4. No routes, no components, and no database work may begin until this foundation is approved by me.
49
-
50
- @analyst will be responsible for detecting any future contract drift.
51
-
52
- ---
53
-
54
- ## Briefing 3: High-Risk Infrastructure (Before Any Privileged Feature)
55
-
56
- **Audience:** @backend + @frontend
57
-
58
- **Key Message:**
59
-
60
- If this project will contain user/role management, configuration changes, or any privileged operations, we must build the governance infrastructure **before** implementing those features.
61
-
62
- Required deliverables:
63
-
64
- **@backend:**
65
- - High-risk endpoint validation logic that rejects requests missing `isHighRiskAdminAction` + valid `managerApproval`.
66
- - Audit logging integration for every privileged action (see audit-logging-standard.md).
67
-
68
- **@frontend:**
69
- - Reusable `HighRiskSecurityModal` component.
70
- - Hermes briefing flow that collects a reason and only then dispatches the approved request.
71
-
72
- Only after these two layers are in place and tested may we begin implementing actual privileged user stories.
73
-
74
- ---
75
-
76
- **Usage for @manager:**
77
- - Copy and adapt these briefings at the appropriate moments.
78
- - Always reference the exact knowledge files in `.agents/knowledge/corporate-governance/`.
79
- - Document the user’s and agents’ acknowledgments in `PROJECT_MEMORY.md`.
@@ -1,38 +0,0 @@
1
- # @database — Reference & Implementation Guide
2
-
3
- This guide contains detailed database architectural patterns, engine-specific tuning, and seeding standards for Agent Enderun projects. Reference this file via `read_file` only when designing schemas, tuning performance, or managing complex migrations.
4
-
5
- ---
6
-
7
- ## 🏗️ Database Migration Standards (Mandatory)
8
- - **Tooling:** Kysely migrations only.
9
- - **Immutability:** Never modify an existing migration. Create a new one.
10
- - **Rollback:** Always include a `down` function.
11
- - **Naming:** `YYYYMMDD_action_description.ts`.
12
-
13
- ---
14
-
15
- ## ⚙️ Performance Tuning & Multi-Engine Guidelines
16
-
17
- ### 1. PostgreSQL Optimization
18
- - Use **BRIN** indexes for large time-series data.
19
- - Use **GIN** for JSONB and full-text search.
20
- - Configure `shared_buffers` and `effective_cache_size` based on system RAM.
21
-
22
- ### 2. MySQL / MariaDB Optimization
23
- - Tune `innodb_buffer_pool_size`.
24
- - Use `EXPLAIN FORMAT=JSON` for detailed query plan analysis.
25
-
26
- ---
27
-
28
- ## 📊 Seeding Standards
29
- - **Contract-Aware:** Seeds must match the Branded Types in the application.
30
- - **Realistic Data:** Use Faker or similar libraries to generate non-mock, production-quality data.
31
- - **Idempotency:** Seeding scripts should be runnable multiple times without duplication.
32
-
33
- ---
34
-
35
- ## 🔍 Performance Audit
36
- - Analyze `EXPLAIN ANALYZE` reports.
37
- - Identify "Sequential Scans" on large tables and propose index coverage.
38
- - Monitor connection pool saturation.
@@ -1,43 +0,0 @@
1
- # @devops — Infrastructure & Deployment Reference Guide
2
-
3
- Detailed CI/CD pipeline designs, deployment strategies, and rollback protocols. Reference this file when designing workflows or troubleshooting deployments.
4
-
5
- ---
6
-
7
- ## 🏗️ CI/CD Pipeline Design (Standard)
8
-
9
- Standard stages for every project:
10
- 1. **Lint & Type Check** — ESLint + TypeScript compiler.
11
- 2. **Unit Tests** — Vitest.
12
- 3. **Security Scan** — `security_audit_scan` tool.
13
- 4. **Build** — `tsc` + bundler.
14
- 5. **Health Check** — Post-deploy verification.
15
-
16
- ---
17
-
18
- ## 🚀 Deployment Strategies
19
-
20
- ### 1. Blue-Green Deployment
21
- - Preferred for stateful services.
22
- - Keep old version on standby for 30 minutes.
23
-
24
- ### 2. Rolling Deployment
25
- - Preferred for stateless services.
26
- - Replace instances one by one with health checks.
27
-
28
- ---
29
-
30
- ## 🛡️ Monitoring & Telemetry (Standard)
31
- - **Log Level:** `info/warn` in prod, `debug` in dev.
32
- - **Alerting:** Trigger alerts on 5xx errors or >85% memory usage.
33
- - **Key Metrics:** API latency, DB connection pool, CPU/Memory profiles.
34
-
35
- ---
36
-
37
- ## 🔄 Rollback Protocol (Mandatory)
38
- Every deploy must have a documented rollback plan in `docs/`:
39
- ```markdown
40
- - **Trigger:** Health failure or error spike.
41
- - **Steps:** [numbered steps]
42
- - **Time:** {N} minutes.
43
- ```
@@ -1,53 +0,0 @@
1
- # Documentation Ownership Standard
2
-
3
- > **Trace ID:** 01HGT8J5E2N0W0W0W0W0W0W0W4
4
- > **Status:** ACTIVE
5
- > **Applicability:** All Agent Enderun Framework Components and Subagents
6
-
7
- ---
8
-
9
- ## 🏛️ 1. Overview & Core Philosophy
10
-
11
- In a high-integrity agentic development environment, keeping a strict separation of concerns between the **Agent Enderun Framework** and the **User's Application Codebase** is critical. Documentation is no exception.
12
-
13
- This standard defines the boundary of where documentation can and must be written. Any deviation from this policy is treated as a major architectural governance violation and will be flagged immediately by `@manager`.
14
-
15
- ---
16
-
17
- ## 🚫 2. The Framework Boundary
18
-
19
- To maintain portability and avoid cluttering the core framework directory, agents must strictly follow the directory permissions:
20
-
21
- 1. **Framework Directories (`.enderun/` or `{{FRAMEWORK_DIR}}`)**:
22
- - **Allowed**: Core system configurations, internal agent instructions, status metrics, and global, generic framework-level architectural patterns.
23
- - **Strictly Prohibited**: Any user-project specific research, implementation details, API guides, component documentation, database schemas, or deployment instructions.
24
-
25
- 2. **User Application Directories (e.g., `docs/`, `apps/`, `src/`)**:
26
- - **Mandatory**: All project-specific architectural decisions (ADRs), layout specs, technical guides, system integration plans, API specifications, and research findings must be written **exclusively** into the user's own `docs/` directory.
27
-
28
- ```mermaid
29
- graph TD
30
- A[Agent Produces Documentation] --> B{Is it Framework Internal?}
31
- B -->|Yes| C[Write to .enderun/knowledge/ or .enderun/agents/]
32
- B -->|No - Project Specific| D[Write exclusively to user's docs/ directory]
33
- C --> E[Enterprise Framework Knowledge Base]
34
- D --> F[User Project Documentation Assets]
35
- ```
36
-
37
- ---
38
-
39
- ## 📝 3. User Project `docs/` Structure
40
-
41
- When producing user-facing documentation, agents must use a clean, logical structure inside the user's `docs/` directory:
42
-
43
- - `/docs/architecture/` — Architectural Decision Records (ADRs), system designs, database schemas.
44
- - `/docs/api/` — API route documentation, contract hashes, payload structures.
45
- - `/docs/guides/` — Developer onboarding, building, running, and troubleshooting the specific application.
46
- - `/docs/research/` — Third-party library evaluations, performance benchmarks, and exploration logs.
47
-
48
- ---
49
-
50
- ## 🚨 4. Enforcement & Governance
51
-
52
- - **Zero-Tolerance Audit**: During any code review or check command (e.g., `agent-enderun check`), `@manager` or `@quality` will verify if any files have been erroneously created in `.enderun/knowledge/`.
53
- - **Auto-Correction**: Any violating file will be immediately moved to the appropriate user-project `docs/` directory, and a warning log carrying the active Trace ID will be raised.