oneie 2.0.1 → 2.0.3

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 (406) hide show
  1. package/AGENTS.md +245 -0
  2. package/CLAUDE.md +534 -0
  3. package/README.md +61 -4
  4. package/one/.obsidian/app.json +1 -0
  5. package/one/.obsidian/appearance.json +1 -0
  6. package/one/.obsidian/core-plugins.json +33 -0
  7. package/one/.obsidian/workspace.json +211 -0
  8. package/one/connections/a2a.md +551 -0
  9. package/one/connections/acp.md +761 -0
  10. package/one/connections/acps.md +731 -0
  11. package/one/connections/agui.md +767 -0
  12. package/one/connections/any-backend.md +1702 -0
  13. package/one/connections/ap2.md +998 -0
  14. package/one/connections/api-docs.md +1891 -0
  15. package/one/connections/api.md +2190 -0
  16. package/one/connections/architecture-diagram.md +94 -0
  17. package/one/connections/communications.md +449 -0
  18. package/one/connections/connections.md +339 -0
  19. package/one/connections/cryptonetworks.md +781 -0
  20. package/one/connections/documentation.md +1120 -0
  21. package/one/connections/effect.md +279 -0
  22. package/one/connections/elizaos.md +1290 -0
  23. package/one/connections/inference.md +58 -0
  24. package/one/connections/kyc.md +632 -0
  25. package/one/connections/mcp.md +842 -0
  26. package/one/connections/membership.md +1152 -0
  27. package/one/connections/middleware.md +1067 -0
  28. package/one/connections/multitenant.md +1341 -0
  29. package/one/connections/n8n.md +1015 -0
  30. package/one/connections/patterns.md +89 -0
  31. package/one/connections/protocols.md +279 -0
  32. package/one/connections/relationships.md +107 -0
  33. package/one/connections/schema.md +587 -0
  34. package/one/connections/service-layer.md +550 -0
  35. package/one/connections/structure.md +0 -0
  36. package/one/connections/vectors.md +207 -0
  37. package/one/connections/wordpress.md +1302 -0
  38. package/one/connections/workflow-copy.md +905 -0
  39. package/one/connections/workflow-examples.md +741 -0
  40. package/one/connections/workflow.md +905 -0
  41. package/one/connections/workflows/delegation.md +885 -0
  42. package/one/connections/workflows/frontend.md +1037 -0
  43. package/one/connections/workflows/strategy.md +903 -0
  44. package/one/connections/workflows/tasks.md +698 -0
  45. package/one/connections/x402.md +1249 -0
  46. package/one/events/events.md +545 -0
  47. package/one/knowledge/ai-platform.md +305 -0
  48. package/one/knowledge/architecture-diagram.md +94 -0
  49. package/one/knowledge/architecture-frontend.md +930 -0
  50. package/one/knowledge/architecture.md +2077 -0
  51. package/one/knowledge/crypto.md +960 -0
  52. package/one/knowledge/dsl.md +1660 -0
  53. package/one/knowledge/files.md +2471 -0
  54. package/one/knowledge/frontend.md +1038 -0
  55. package/one/knowledge/hono.md +2109 -0
  56. package/one/knowledge/implementation-examples.md +2536 -0
  57. package/one/knowledge/inference-score.md +159 -0
  58. package/one/knowledge/knowledge.md +642 -0
  59. package/one/knowledge/language.md +980 -0
  60. package/one/knowledge/lessons-learned.md +70 -0
  61. package/one/knowledge/ontology-6-dimensions.md +0 -0
  62. package/one/knowledge/ontology-documentation.md +356 -0
  63. package/one/knowledge/ontology-engineering-specification.md +1292 -0
  64. package/one/knowledge/ontology-engineering.md +1652 -0
  65. package/one/knowledge/ontology-frontend-copy-2.md +1492 -0
  66. package/one/knowledge/ontology-frontend-copy.md +753 -0
  67. package/one/knowledge/ontology-frontend-specifications.md +2188 -0
  68. package/one/knowledge/ontology-frontend.md +2427 -0
  69. package/one/knowledge/ontology-minimal.yaml +299 -0
  70. package/one/knowledge/ontology.md +2819 -0
  71. package/one/knowledge/ontology.yaml +1165 -0
  72. package/one/knowledge/patterns/backend/convex-mutation-pattern.md +100 -0
  73. package/one/knowledge/patterns/backend/convex-query-pattern.md +88 -0
  74. package/one/knowledge/patterns/backend/mutation-template.md +231 -0
  75. package/one/knowledge/patterns/backend/query-template.md +267 -0
  76. package/one/knowledge/patterns/backend/service-template.md +237 -0
  77. package/one/knowledge/patterns/design/component-architecture.md +399 -0
  78. package/one/knowledge/patterns/design/test-driven-design-pattern.md +162 -0
  79. package/one/knowledge/patterns/design/wireframe-template.md +216 -0
  80. package/one/knowledge/patterns/frontend/component-template.md +195 -0
  81. package/one/knowledge/patterns/frontend/form-template.md +276 -0
  82. package/one/knowledge/patterns/frontend/page-template.md +178 -0
  83. package/one/knowledge/patterns/frontend/react-component-pattern.md +128 -0
  84. package/one/knowledge/patterns/test/acceptance-criteria-template.md +378 -0
  85. package/one/knowledge/patterns/test/technical-test-template.md +544 -0
  86. package/one/knowledge/patterns/test/test-driven-pattern.md +140 -0
  87. package/one/knowledge/patterns/test/user-flow-template.md +254 -0
  88. package/one/knowledge/quality-loop.md +401 -0
  89. package/one/knowledge/readme.md +131 -0
  90. package/one/knowledge/rules.md +626 -0
  91. package/one/knowledge/score.md +67 -0
  92. package/one/knowledge/specifications.md +855 -0
  93. package/one/knowledge/tags.md +130 -0
  94. package/one/organisation/one.md +599 -0
  95. package/one/organisation/organisation.md +438 -0
  96. package/one/organisation/revenue.md +673 -0
  97. package/one/organisation/strategy.md +869 -0
  98. package/one/organisation/vision.md +98 -0
  99. package/one/people/anthony-o-connell.md +440 -0
  100. package/one/people/people.md +567 -0
  101. package/one/repomix-output.md +92634 -0
  102. package/one/things/agentkit.md +349 -0
  103. package/one/things/agents/agent-backend.md +1401 -0
  104. package/one/things/agents/agent-builder.md +955 -0
  105. package/one/things/agents/agent-clean.md +709 -0
  106. package/one/things/agents/agent-clone.md +1341 -0
  107. package/one/things/agents/agent-designer.md +2177 -0
  108. package/one/things/agents/agent-director.md +1508 -0
  109. package/one/things/agents/agent-documenter.md +1049 -0
  110. package/one/things/agents/agent-frontend.md +1119 -0
  111. package/one/things/agents/agent-integrator.md +1192 -0
  112. package/one/things/agents/agent-problem-solver.md +1379 -0
  113. package/one/things/agents/agent-quality.md +1353 -0
  114. package/one/things/agents/agent-sales.md +986 -0
  115. package/one/things/cascade/cascade.yaml +464 -0
  116. package/one/things/cascade/docs/examples/1-1-agent-prompts/design.md +470 -0
  117. package/one/things/cascade/docs/examples/1-1-agent-prompts/tests.md +264 -0
  118. package/one/things/cascade/docs/examples/1-1-agent-prompts.md +486 -0
  119. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/design.md +497 -0
  120. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/tests.md +227 -0
  121. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator.md +516 -0
  122. package/one/things/cascade/docs/examples/1-3-event-coordination/design.md +544 -0
  123. package/one/things/cascade/docs/examples/1-3-event-coordination/tests.md +223 -0
  124. package/one/things/cascade/docs/examples/1-3-event-coordination.md +508 -0
  125. package/one/things/cascade/docs/examples/1-4-knowledge-management/design.md +609 -0
  126. package/one/things/cascade/docs/examples/1-4-knowledge-management/tests.md +195 -0
  127. package/one/things/cascade/docs/examples/1-4-knowledge-management.md +577 -0
  128. package/one/things/cascade/docs/examples/1-5-quality-loops/design.md +797 -0
  129. package/one/things/cascade/docs/examples/1-5-quality-loops/tests.md +212 -0
  130. package/one/things/cascade/docs/examples/1-5-quality-loops.md +641 -0
  131. package/one/things/cascade/docs/examples/1-6-numbering-structure/design.md +610 -0
  132. package/one/things/cascade/docs/examples/1-6-numbering-structure/tests.md +213 -0
  133. package/one/things/cascade/docs/examples/1-6-numbering-structure.md +575 -0
  134. package/one/things/cascade/docs/examples/readme.md +222 -0
  135. package/one/things/cascade/docs/getting-started.md +515 -0
  136. package/one/things/cascade/docs/workflow.md +1372 -0
  137. package/one/things/cascade/readme.md +336 -0
  138. package/one/things/cascade/templates/feature-template.md +267 -0
  139. package/one/things/claude/agents/advocacy-activation-manager.md +685 -0
  140. package/one/things/claude/agents/advocacy-campaign-designer.md +663 -0
  141. package/one/things/claude/agents/analyst.md +483 -0
  142. package/one/things/claude/agents/architect.md +480 -0
  143. package/one/things/claude/agents/brand-identity-specialist.md +513 -0
  144. package/one/things/claude/agents/bstp-token-strategist.md +667 -0
  145. package/one/things/claude/agents/builder-repo.md +489 -0
  146. package/one/things/claude/agents/bullstamp-community-builder.md +574 -0
  147. package/one/things/claude/agents/bullstamp-marketing-orchestrator.md +506 -0
  148. package/one/things/claude/agents/bulltilt-platform-growth.md +567 -0
  149. package/one/things/claude/agents/company-bullstamp-character.md +587 -0
  150. package/one/things/claude/agents/company-bullstamp-community.md +292 -0
  151. package/one/things/claude/agents/company-bullstamp-marketing.md +292 -0
  152. package/one/things/claude/agents/company-bullstamp-token.md +292 -0
  153. package/one/things/claude/agents/company-bulltilt-growth.md +292 -0
  154. package/one/things/claude/agents/content-bibliography-formatter.md +381 -0
  155. package/one/things/claude/agents/content-calendar-planner.md +448 -0
  156. package/one/things/claude/agents/content-chapter-formatter.md +488 -0
  157. package/one/things/claude/agents/content-formatter.md +546 -0
  158. package/one/things/claude/agents/content-hook-specialist.md +462 -0
  159. package/one/things/claude/agents/content-image-formatter.md +535 -0
  160. package/one/things/claude/agents/content-introduction-formatter.md +485 -0
  161. package/one/things/claude/agents/content-multiplication-engine.md +556 -0
  162. package/one/things/claude/agents/content-playbook-writer.md +448 -0
  163. package/one/things/claude/agents/content-team-manager.md +622 -0
  164. package/one/things/claude/agents/content-toc-formatter.md +522 -0
  165. package/one/things/claude/agents/convex-backend-specialist.md +2561 -0
  166. package/one/things/claude/agents/core-manager.md +582 -0
  167. package/one/things/claude/agents/core-master.md +403 -0
  168. package/one/things/claude/agents/cross-functional-manager.md +471 -0
  169. package/one/things/claude/agents/crypto-airdrop-strategist.md +602 -0
  170. package/one/things/claude/agents/crypto-analytics-educator.md +553 -0
  171. package/one/things/claude/agents/crypto-architecture-specialist.md +466 -0
  172. package/one/things/claude/agents/crypto-community-analyst.md +298 -0
  173. package/one/things/claude/agents/crypto-community-psychologist.md +509 -0
  174. package/one/things/claude/agents/crypto-dex-optimization-expert.md +538 -0
  175. package/one/things/claude/agents/crypto-dex-optimizer.md +292 -0
  176. package/one/things/claude/agents/crypto-diamond-formation-specialist.md +513 -0
  177. package/one/things/claude/agents/crypto-diamond-hands.md +292 -0
  178. package/one/things/claude/agents/crypto-ecosystem-expansion-manager.md +554 -0
  179. package/one/things/claude/agents/crypto-engagement-specialist.md +540 -0
  180. package/one/things/claude/agents/crypto-market-researcher.md +292 -0
  181. package/one/things/claude/agents/crypto-marketing-orchestrator.md +523 -0
  182. package/one/things/claude/agents/crypto-network-effect-amplifier.md +569 -0
  183. package/one/things/claude/agents/crypto-optimization-analyst.md +554 -0
  184. package/one/things/claude/agents/crypto-strategic-synthesizer.md +517 -0
  185. package/one/things/claude/agents/crypto-team-manager.md +387 -0
  186. package/one/things/claude/agents/crypto-token-analyst.md +278 -0
  187. package/one/things/claude/agents/crypto-viral-content-creator.md +546 -0
  188. package/one/things/claude/agents/crypto-wallet-identification-expert.md +517 -0
  189. package/one/things/claude/agents/crypto-wallet-identifier.md +292 -0
  190. package/one/things/claude/agents/customer-journey-designer.md +481 -0
  191. package/one/things/claude/agents/customer-success-manager.md +581 -0
  192. package/one/things/claude/agents/dev.md +413 -0
  193. package/one/things/claude/agents/documenter.md +546 -0
  194. package/one/things/claude/agents/elevate-marketing-orchestrator.md +410 -0
  195. package/one/things/claude/agents/engagement-specialist.md +509 -0
  196. package/one/things/claude/agents/engineering-architect.md +387 -0
  197. package/one/things/claude/agents/engineering-business-analyst.md +537 -0
  198. package/one/things/claude/agents/engineering-developer.md +387 -0
  199. package/one/things/claude/agents/engineering-director.md +282 -0
  200. package/one/things/claude/agents/engineering-ingestor.md +649 -0
  201. package/one/things/claude/agents/engineering-product-manager.md +537 -0
  202. package/one/things/claude/agents/engineering-product-owner.md +537 -0
  203. package/one/things/claude/agents/engineering-project-coordinator.md +537 -0
  204. package/one/things/claude/agents/engineering-quality-assurance.md +393 -0
  205. package/one/things/claude/agents/engineering-team-manager.md +512 -0
  206. package/one/things/claude/agents/engineering-user-experience.md +387 -0
  207. package/one/things/claude/agents/framework-elevate-manager.md +294 -0
  208. package/one/things/claude/agents/improver.md +763 -0
  209. package/one/things/claude/agents/intelligence-team-manager.md +385 -0
  210. package/one/things/claude/agents/lead-capture-expert.md +466 -0
  211. package/one/things/claude/agents/lead-magnet-creator.md +453 -0
  212. package/one/things/claude/agents/market-research-analyst.md +412 -0
  213. package/one/things/claude/agents/marketing-brand-identity.md +314 -0
  214. package/one/things/claude/agents/marketing-content-hooks.md +450 -0
  215. package/one/things/claude/agents/marketing-content-multiplier.md +326 -0
  216. package/one/things/claude/agents/marketing-content-poster.md +361 -0
  217. package/one/things/claude/agents/marketing-customer-journey.md +326 -0
  218. package/one/things/claude/agents/marketing-director.md +397 -0
  219. package/one/things/claude/agents/marketing-engagement.md +326 -0
  220. package/one/things/claude/agents/marketing-lead-capture.md +326 -0
  221. package/one/things/claude/agents/marketing-lead-magnet.md +326 -0
  222. package/one/things/claude/agents/marketing-network-effects.md +326 -0
  223. package/one/things/claude/agents/marketing-nurture-campaigns.md +326 -0
  224. package/one/things/claude/agents/marketing-share-optimizer.md +326 -0
  225. package/one/things/claude/agents/marketing-team-manager.md +446 -0
  226. package/one/things/claude/agents/marketing-viral-growth.md +201 -0
  227. package/one/things/claude/agents/mission-commander.md +373 -0
  228. package/one/things/claude/agents/network-effect-analyst.md +587 -0
  229. package/one/things/claude/agents/nextjs-15-specialist.md +1547 -0
  230. package/one/things/claude/agents/npx.md +890 -0
  231. package/one/things/claude/agents/nurture-campaign-manager.md +531 -0
  232. package/one/things/claude/agents/one-master.md +355 -0
  233. package/one/things/claude/agents/one-orchestrator.md +315 -0
  234. package/one/things/claude/agents/one.md +601 -0
  235. package/one/things/claude/agents/playbook-generator.md +503 -0
  236. package/one/things/claude/agents/pm.md +326 -0
  237. package/one/things/claude/agents/po.md +345 -0
  238. package/one/things/claude/agents/qa.md +336 -0
  239. package/one/things/claude/agents/research-foundation-analyst.md +307 -0
  240. package/one/things/claude/agents/research-intelligence-gatherer.md +408 -0
  241. package/one/things/claude/agents/research-market-analyst.md +307 -0
  242. package/one/things/claude/agents/research-team-manager.md +482 -0
  243. package/one/things/claude/agents/sales-environment-optimizer.md +494 -0
  244. package/one/things/claude/agents/sales-team-manager.md +400 -0
  245. package/one/things/claude/agents/sales-upsell-strategist.md +307 -0
  246. package/one/things/claude/agents/service-advocacy-campaigns.md +307 -0
  247. package/one/things/claude/agents/service-advocacy-manager.md +307 -0
  248. package/one/things/claude/agents/service-success-manager.md +307 -0
  249. package/one/things/claude/agents/service-team-manager.md +400 -0
  250. package/one/things/claude/agents/shadcn-ui-design-system-specialist.md +2302 -0
  251. package/one/things/claude/agents/share-optimization-specialist.md +551 -0
  252. package/one/things/claude/agents/sm.md +327 -0
  253. package/one/things/claude/agents/story-teller.md +473 -0
  254. package/one/things/claude/agents/task-master.md +596 -0
  255. package/one/things/claude/agents/tauri-cross-platform-specialist.md +1827 -0
  256. package/one/things/claude/agents/tester.md +556 -0
  257. package/one/things/claude/agents/the-bull-character-manager.md +580 -0
  258. package/one/things/claude/agents/tools-playbook-generator.md +489 -0
  259. package/one/things/claude/agents/turbo-repo-builder.md +316 -0
  260. package/one/things/claude/agents/upsell-strategist.md +480 -0
  261. package/one/things/claude/agents/ux-expert.md +335 -0
  262. package/one/things/claude/agents/viral-growth-orchestrator.md +497 -0
  263. package/one/things/claude/claude-code-hooks-development.json +21 -0
  264. package/one/things/claude/claude-code-hooks-production.json +21 -0
  265. package/one/things/claude/claude-code-hooks.json +25 -0
  266. package/one/things/claude/commands/agent.md +104 -0
  267. package/one/things/claude/commands/cascade-status.md +128 -0
  268. package/one/things/claude/commands/ingest.md +290 -0
  269. package/one/things/claude/commands/ingestor.md +136 -0
  270. package/one/things/claude/commands/mission.md +83 -0
  271. package/one/things/claude/commands/npx.md +133 -0
  272. package/one/things/claude/commands/one.md +440 -0
  273. package/one/things/claude/commands/quality-check.md +204 -0
  274. package/one/things/claude/commands/smart-route.md +220 -0
  275. package/one/things/claude/commands/start.md +121 -0
  276. package/one/things/claude/commands/story.md +83 -0
  277. package/one/things/claude/commands/task.md +173 -0
  278. package/one/things/claude/hook-bypass.json +32 -0
  279. package/one/things/claude/hooks/agent-hook-config.json +427 -0
  280. package/one/things/claude/hooks/agent-hook-manager.js +525 -0
  281. package/one/things/claude/hooks/agent-load-balancer.js +271 -0
  282. package/one/things/claude/hooks/agent-request-interceptor.js +70 -0
  283. package/one/things/claude/hooks/build-hook.sh +156 -0
  284. package/one/things/claude/hooks/cascade-feedback.js +297 -0
  285. package/one/things/claude/hooks/cascade-integration-hooks.js +648 -0
  286. package/one/things/claude/hooks/cleanup-hook.sh +201 -0
  287. package/one/things/claude/hooks/continuous-improvement-monitor.js +510 -0
  288. package/one/things/claude/hooks/file-organization-engine.js +427 -0
  289. package/one/things/claude/hooks/file-organization-hook.sh +80 -0
  290. package/one/things/claude/hooks/file-organization-monitor.js +269 -0
  291. package/one/things/claude/hooks/format-hook.sh +43 -0
  292. package/one/things/claude/hooks/hook-bypass.sh +293 -0
  293. package/one/things/claude/hooks/hook-config-manager.js +202 -0
  294. package/one/things/claude/hooks/hook-debouncer.sh +62 -0
  295. package/one/things/claude/hooks/hook-logger.sh +89 -0
  296. package/one/things/claude/hooks/hook-orchestrator.js +662 -0
  297. package/one/things/claude/hooks/hook-performance-report.js +120 -0
  298. package/one/things/claude/hooks/lint-hook.sh +140 -0
  299. package/one/things/claude/hooks/mcp-cascade-integration.js +816 -0
  300. package/one/things/claude/hooks/memory-optimizer.js +510 -0
  301. package/one/things/claude/hooks/notification-hook.sh +204 -0
  302. package/one/things/claude/hooks/ontology-compliance.js +394 -0
  303. package/one/things/claude/hooks/ontology-hook-manager.js +316 -0
  304. package/one/things/claude/hooks/ontology-validation-engine.js +317 -0
  305. package/one/things/claude/hooks/ontology-validation-hook.sh +86 -0
  306. package/one/things/claude/hooks/performance-metrics.json +25 -0
  307. package/one/things/claude/hooks/performance-monitoring-hook.js +422 -0
  308. package/one/things/claude/hooks/quality-scoring-engine.js +834 -0
  309. package/one/things/claude/hooks/security-hook.sh +256 -0
  310. package/one/things/claude/hooks/simple-load-balancer.js +238 -0
  311. package/one/things/claude/hooks/startup-optimizer.js +625 -0
  312. package/one/things/claude/hooks/story-scoring-system.js +445 -0
  313. package/one/things/claude/hooks/story-validation-engine.js +473 -0
  314. package/one/things/claude/hooks/story-validation-hook-enhanced.sh +210 -0
  315. package/one/things/claude/hooks/story-validation-hook.sh +145 -0
  316. package/one/things/claude/hooks/structure-synchronizer.js +194 -0
  317. package/one/things/claude/hooks/sub-agent-output-validator.js +647 -0
  318. package/one/things/claude/hooks/sub-agent-validation-hook.js +343 -0
  319. package/one/things/claude/hooks/test-hook.sh +145 -0
  320. package/one/things/claude/hooks/test-story-validation.sh +170 -0
  321. package/one/things/claude/hooks/trinity-validation-system.js +392 -0
  322. package/one/things/claude/settings-local.json +86 -0
  323. package/one/things/cli-code.md +652 -0
  324. package/one/things/cli-compiler-code.md +652 -0
  325. package/one/things/cli.md +1045 -0
  326. package/one/things/components/card-shadcn.md +929 -0
  327. package/one/things/components/card.md +1050 -0
  328. package/one/things/components.md +1669 -0
  329. package/one/things/componets.md +4 -0
  330. package/one/things/copilotkit.md +1559 -0
  331. package/one/things/creator-diagram.md +166 -0
  332. package/one/things/examples/children/lemonade-stand.md +366 -0
  333. package/one/things/examples/enterprise/crm-saas.md +1429 -0
  334. package/one/things/features/1-1-agent-prompts/design.md +470 -0
  335. package/one/things/features/1-1-agent-prompts/tests.md +264 -0
  336. package/one/things/features/1-1-agent-prompts.md +486 -0
  337. package/one/things/features/1-2-yaml-orchestrator/design.md +497 -0
  338. package/one/things/features/1-2-yaml-orchestrator/tests.md +227 -0
  339. package/one/things/features/1-2-yaml-orchestrator.md +516 -0
  340. package/one/things/features/1-3-event-coordination/design.md +544 -0
  341. package/one/things/features/1-3-event-coordination/tests.md +223 -0
  342. package/one/things/features/1-3-event-coordination.md +508 -0
  343. package/one/things/features/1-4-knowledge-management/design.md +609 -0
  344. package/one/things/features/1-4-knowledge-management/tests.md +195 -0
  345. package/one/things/features/1-4-knowledge-management.md +577 -0
  346. package/one/things/features/1-5-quality-loops/design.md +797 -0
  347. package/one/things/features/1-5-quality-loops/tests.md +212 -0
  348. package/one/things/features/1-5-quality-loops.md +641 -0
  349. package/one/things/features/1-6-numbering-structure/design.md +610 -0
  350. package/one/things/features/1-6-numbering-structure/tests.md +213 -0
  351. package/one/things/features/1-6-numbering-structure.md +575 -0
  352. package/one/things/features/2-cli.md +1235 -0
  353. package/one/things/features/use-one-backend.md +1180 -0
  354. package/one/things/ideas/1-create-workflow.md +189 -0
  355. package/one/things/plans/1-create-workflow-status.md +555 -0
  356. package/one/things/plans/1-create-workflow.md +713 -0
  357. package/one/things/plans/app.md +761 -0
  358. package/one/things/plans/better-auth-any-backend-revised.md +1065 -0
  359. package/one/things/plans/better-auth-any-backend.md +1852 -0
  360. package/one/things/plans/better-auth-available-features.md +235 -0
  361. package/one/things/plans/big-plan.md +38 -0
  362. package/one/things/plans/convex-better-auth.md +1109 -0
  363. package/one/things/plans/convex-on-off.md +389 -0
  364. package/one/things/plans/desktop.md +1121 -0
  365. package/one/things/plans/effect-components.md +1669 -0
  366. package/one/things/plans/effect.md +973 -0
  367. package/one/things/plans/email.md +953 -0
  368. package/one/things/plans/enhance-auth.md +1669 -0
  369. package/one/things/plans/install-components.md +198 -0
  370. package/one/things/plans/landing.md +728 -0
  371. package/one/things/plans/layout.md +205 -0
  372. package/one/things/plans/mail-backend.md +1308 -0
  373. package/one/things/plans/mail.md +2624 -0
  374. package/one/things/plans/next-features.md +83 -0
  375. package/one/things/plans/one.md +658 -0
  376. package/one/things/plans/ontology-6-dimensions.md +2216 -0
  377. package/one/things/plans/ontology-driven-strategy.md +866 -0
  378. package/one/things/plans/ontology-ui-approach.md +357 -0
  379. package/one/things/plans/open-agent.md +785 -0
  380. package/one/things/plans/performace.md +90 -0
  381. package/one/things/plans/releases.md +809 -0
  382. package/one/things/plans/repos.md +76 -0
  383. package/one/things/plans/separate-copy-2.md +1293 -0
  384. package/one/things/plans/separate-copy-3.md +2458 -0
  385. package/one/things/plans/separate-copy.md +1293 -0
  386. package/one/things/plans/separate.md +1983 -0
  387. package/one/things/plans/shadcn-integration-summary.md +450 -0
  388. package/one/things/plans/sidebar.md +172 -0
  389. package/one/things/plans/small-fixes.md +5 -0
  390. package/one/things/plans/test-backend-connection.md +476 -0
  391. package/one/things/plans/workflow-files.md +1196 -0
  392. package/one/things/plans/workflow.md +1372 -0
  393. package/one/things/products/cascade-landing-page.md +737 -0
  394. package/one/things/products/cascade.md +1518 -0
  395. package/one/things/products/context-engineering.md +1427 -0
  396. package/one/things/products/onthology.md +0 -0
  397. package/one/things/products/ontology-ui-shadcn.md +1280 -0
  398. package/one/things/products/ontology-ui.md +1387 -0
  399. package/one/things/products/ontology.md +717 -0
  400. package/one/things/products/sdk.md +557 -0
  401. package/one/things/promptkit.md +903 -0
  402. package/one/things/service-providers-new.md +982 -0
  403. package/one/things/service-providers.md +1092 -0
  404. package/one/things/things.md +349 -0
  405. package/one/things/todo.md +1248 -0
  406. package/package.json +5 -2
@@ -0,0 +1,662 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Advanced Hook Orchestration and Coordination System
5
+ * Manages complex workflows, parallel execution, and hook dependencies
6
+ */
7
+
8
+ import fs from 'fs';
9
+ import path from 'path';
10
+ import { EventEmitter } from 'events';
11
+ import AgentHookManager from './agent-hook-manager.js';
12
+ import QualityScoringEngine from './quality-scoring-engine.js';
13
+ import { PerformanceMonitor } from './performance-monitoring-hook.js';
14
+
15
+ class HookOrchestrator extends EventEmitter {
16
+ constructor() {
17
+ super();
18
+ this.agentHookManager = new AgentHookManager();
19
+ this.qualityEngine = new QualityScoringEngine();
20
+ this.performanceMonitor = new PerformanceMonitor();
21
+
22
+ this.activeExecutions = new Map(); // executionId -> execution context
23
+ this.executionQueue = [];
24
+ this.maxConcurrentExecutions = 3;
25
+ this.executionHistory = [];
26
+ this.dependencies = new Map(); // hookType -> dependencies
27
+
28
+ this.initializeDependencies();
29
+ this.startExecutionProcessor();
30
+ }
31
+
32
+ initializeDependencies() {
33
+ // Define hook execution dependencies
34
+ this.dependencies.set('securityValidation', []);
35
+ this.dependencies.set('storyValidation', ['securityValidation']);
36
+ this.dependencies.set('qualityScoring', ['storyValidation']);
37
+ this.dependencies.set('performanceMonitoring', []);
38
+ this.dependencies.set('notifications', ['qualityScoring', 'performanceMonitoring']);
39
+ }
40
+
41
+ startExecutionProcessor() {
42
+ // Process execution queue every 100ms
43
+ setInterval(() => {
44
+ this.processExecutionQueue();
45
+ }, 100);
46
+ }
47
+
48
+ async orchestrateAgentWorkflow(agentName, workflowContext = {}) {
49
+ const executionId = this.generateExecutionId();
50
+ const startTime = Date.now();
51
+
52
+ const execution = {
53
+ id: executionId,
54
+ agentName,
55
+ context: workflowContext,
56
+ status: 'pending',
57
+ startTime,
58
+ endTime: null,
59
+ results: {},
60
+ dependencies: new Map(),
61
+ completedHooks: new Set(),
62
+ failedHooks: new Set(),
63
+ totalDuration: 0
64
+ };
65
+
66
+ this.activeExecutions.set(executionId, execution);
67
+ this.emit('executionStarted', { executionId, agentName });
68
+
69
+ try {
70
+ // Get hook execution order based on dependencies
71
+ const executionPlan = this.createExecutionPlan(agentName);
72
+ execution.executionPlan = executionPlan;
73
+
74
+ // Execute hooks according to plan
75
+ const results = await this.executeWorkflowPlan(execution);
76
+
77
+ execution.status = results.success ? 'completed' : 'failed';
78
+ execution.endTime = Date.now();
79
+ execution.totalDuration = execution.endTime - execution.startTime;
80
+ execution.results = results;
81
+
82
+ this.executionHistory.push({
83
+ executionId,
84
+ agentName,
85
+ success: results.success,
86
+ duration: execution.totalDuration,
87
+ timestamp: new Date().toISOString()
88
+ });
89
+
90
+ this.emit('executionCompleted', { executionId, agentName, results });
91
+ return results;
92
+
93
+ } catch (error) {
94
+ execution.status = 'error';
95
+ execution.endTime = Date.now();
96
+ execution.totalDuration = execution.endTime - execution.startTime;
97
+ execution.error = error.message;
98
+
99
+ this.emit('executionError', { executionId, agentName, error });
100
+ throw error;
101
+ } finally {
102
+ this.activeExecutions.delete(executionId);
103
+ }
104
+ }
105
+
106
+ createExecutionPlan(agentName) {
107
+ const config = this.agentHookManager.getAgentConfiguration(agentName);
108
+ const enabledHooks = Object.keys(config.hooks).filter(
109
+ hookType => config.hooks[hookType].enabled
110
+ );
111
+
112
+ // Create dependency graph
113
+ const dependencyGraph = new Map();
114
+ const inDegree = new Map();
115
+
116
+ // Initialize graph
117
+ enabledHooks.forEach(hook => {
118
+ dependencyGraph.set(hook, []);
119
+ inDegree.set(hook, 0);
120
+ });
121
+
122
+ // Build dependency edges
123
+ enabledHooks.forEach(hook => {
124
+ const deps = this.dependencies.get(hook) || [];
125
+ deps.forEach(dep => {
126
+ if (enabledHooks.includes(dep)) {
127
+ dependencyGraph.get(dep).push(hook);
128
+ inDegree.set(hook, inDegree.get(hook) + 1);
129
+ }
130
+ });
131
+ });
132
+
133
+ // Topological sort to determine execution order
134
+ const executionOrder = [];
135
+ const queue = [];
136
+
137
+ // Find hooks with no dependencies
138
+ inDegree.forEach((degree, hook) => {
139
+ if (degree === 0) {
140
+ queue.push(hook);
141
+ }
142
+ });
143
+
144
+ while (queue.length > 0) {
145
+ const currentHook = queue.shift();
146
+ executionOrder.push(currentHook);
147
+
148
+ // Update dependent hooks
149
+ dependencyGraph.get(currentHook).forEach(dependentHook => {
150
+ inDegree.set(dependentHook, inDegree.get(dependentHook) - 1);
151
+ if (inDegree.get(dependentHook) === 0) {
152
+ queue.push(dependentHook);
153
+ }
154
+ });
155
+ }
156
+
157
+ // Check for circular dependencies
158
+ if (executionOrder.length !== enabledHooks.length) {
159
+ throw new Error(`Circular dependency detected in hooks for agent ${agentName}`);
160
+ }
161
+
162
+ return {
163
+ hooks: executionOrder,
164
+ parallelGroups: this.identifyParallelGroups(executionOrder, dependencyGraph),
165
+ estimatedDuration: this.estimateExecutionDuration(agentName, executionOrder)
166
+ };
167
+ }
168
+
169
+ identifyParallelGroups(executionOrder, dependencyGraph) {
170
+ const parallelGroups = [];
171
+ let currentGroup = [];
172
+ const processed = new Set();
173
+
174
+ for (const hook of executionOrder) {
175
+ const deps = this.dependencies.get(hook) || [];
176
+ const hasUnmetDependencies = deps.some(dep => !processed.has(dep));
177
+
178
+ if (!hasUnmetDependencies && currentGroup.length === 0) {
179
+ currentGroup.push(hook);
180
+ } else if (!hasUnmetDependencies) {
181
+ // Can run in parallel with current group
182
+ currentGroup.push(hook);
183
+ } else {
184
+ // Start new group
185
+ if (currentGroup.length > 0) {
186
+ parallelGroups.push([...currentGroup]);
187
+ currentGroup.forEach(h => processed.add(h));
188
+ currentGroup = [];
189
+ }
190
+ currentGroup.push(hook);
191
+ }
192
+ }
193
+
194
+ if (currentGroup.length > 0) {
195
+ parallelGroups.push(currentGroup);
196
+ }
197
+
198
+ return parallelGroups;
199
+ }
200
+
201
+ estimateExecutionDuration(agentName, hooks) {
202
+ const baseDurations = {
203
+ 'securityValidation': 200,
204
+ 'storyValidation': 1500,
205
+ 'qualityScoring': 800,
206
+ 'performanceMonitoring': 100,
207
+ 'notifications': 300
208
+ };
209
+
210
+ let totalEstimate = 0;
211
+ hooks.forEach(hook => {
212
+ totalEstimate += baseDurations[hook] || 500;
213
+ });
214
+
215
+ return totalEstimate;
216
+ }
217
+
218
+ async executeWorkflowPlan(execution) {
219
+ const { agentName, context, executionPlan } = execution;
220
+ const results = {
221
+ executionId: execution.id,
222
+ agentName,
223
+ success: true,
224
+ hookResults: {},
225
+ parallelGroupResults: [],
226
+ totalDuration: 0,
227
+ errors: []
228
+ };
229
+
230
+ const startTime = Date.now();
231
+
232
+ try {
233
+ // Execute hooks in parallel groups
234
+ for (let i = 0; i < executionPlan.parallelGroups.length; i++) {
235
+ const group = executionPlan.parallelGroups[i];
236
+ const groupResults = await this.executeParallelGroup(agentName, group, context);
237
+
238
+ results.parallelGroupResults.push({
239
+ groupIndex: i,
240
+ hooks: group,
241
+ results: groupResults,
242
+ success: groupResults.every(r => r.success)
243
+ });
244
+
245
+ // Update execution tracking
246
+ group.forEach(hook => {
247
+ const hookResult = groupResults.find(r => r.hookType === hook);
248
+ if (hookResult) {
249
+ results.hookResults[hook] = hookResult;
250
+ if (hookResult.success) {
251
+ execution.completedHooks.add(hook);
252
+ } else {
253
+ execution.failedHooks.add(hook);
254
+ results.errors.push(`${hook}: ${hookResult.error || hookResult.message}`);
255
+ }
256
+ }
257
+ });
258
+
259
+ // Check if we should continue after failures
260
+ const groupSuccess = results.parallelGroupResults[i].success;
261
+ if (!groupSuccess) {
262
+ const criticalFailures = groupResults.filter(r => !r.success && r.blocking);
263
+ if (criticalFailures.length > 0) {
264
+ results.success = false;
265
+ this.emit('executionBlocked', {
266
+ executionId: execution.id,
267
+ agentName,
268
+ blockingHooks: criticalFailures.map(f => f.hookType)
269
+ });
270
+ break;
271
+ }
272
+ }
273
+ }
274
+
275
+ results.totalDuration = Date.now() - startTime;
276
+
277
+ // Update performance metrics
278
+ this.performanceMonitor.recordAgentMetrics(agentName, {
279
+ responseTime: results.totalDuration,
280
+ error: !results.success,
281
+ qualityScore: results.hookResults.qualityScoring?.score,
282
+ delegated: context.delegated || false
283
+ });
284
+
285
+ return results;
286
+
287
+ } catch (error) {
288
+ results.success = false;
289
+ results.error = error.message;
290
+ results.totalDuration = Date.now() - startTime;
291
+ results.errors.push(`Execution error: ${error.message}`);
292
+
293
+ throw error;
294
+ }
295
+ }
296
+
297
+ async executeParallelGroup(agentName, hooks, context) {
298
+ const promises = hooks.map(async (hookType) => {
299
+ const hookStartTime = Date.now();
300
+
301
+ try {
302
+ const result = await this.executeHook(agentName, hookType, context);
303
+ return {
304
+ hookType,
305
+ success: true,
306
+ result,
307
+ duration: Date.now() - hookStartTime,
308
+ blocking: result.blocking || false
309
+ };
310
+ } catch (error) {
311
+ return {
312
+ hookType,
313
+ success: false,
314
+ error: error.message,
315
+ duration: Date.now() - hookStartTime,
316
+ blocking: true
317
+ };
318
+ }
319
+ });
320
+
321
+ return await Promise.all(promises);
322
+ }
323
+
324
+ async executeHook(agentName, hookType, context) {
325
+ const config = this.agentHookManager.getHookConfiguration(agentName, hookType);
326
+
327
+ // Route to appropriate hook implementation
328
+ switch (hookType) {
329
+ case 'securityValidation':
330
+ return await this.executeSecurityValidation(agentName, config, context);
331
+ case 'storyValidation':
332
+ return await this.executeStoryValidation(agentName, config, context);
333
+ case 'qualityScoring':
334
+ return await this.executeQualityScoring(agentName, config, context);
335
+ case 'performanceMonitoring':
336
+ return await this.executePerformanceMonitoring(agentName, config, context);
337
+ case 'notifications':
338
+ return await this.executeNotifications(agentName, config, context);
339
+ default:
340
+ throw new Error(`Unknown hook type: ${hookType}`);
341
+ }
342
+ }
343
+
344
+ async executeSecurityValidation(agentName, config, context) {
345
+ // Tool validation
346
+ if (context.toolRequested) {
347
+ const validation = this.agentHookManager.validateToolUsage(agentName, context.toolRequested);
348
+ if (!validation.allowed) {
349
+ return {
350
+ success: false,
351
+ message: validation.reason,
352
+ blocking: true,
353
+ allowedTools: validation.allowedTools
354
+ };
355
+ }
356
+ }
357
+
358
+ // Path validation
359
+ if (context.filePath) {
360
+ const sensitivePatterns = [
361
+ /.*\/secrets\/.*/,
362
+ /.*\.env.*/,
363
+ /.*\/credentials\/.*/,
364
+ /.*private.*key.*/
365
+ ];
366
+
367
+ const isSensitive = sensitivePatterns.some(pattern => pattern.test(context.filePath));
368
+ if (isSensitive && !config.allowSensitiveFiles) {
369
+ return {
370
+ success: false,
371
+ message: `Access to sensitive file blocked: ${context.filePath}`,
372
+ blocking: true
373
+ };
374
+ }
375
+ }
376
+
377
+ return {
378
+ success: true,
379
+ message: 'Security validation passed',
380
+ blocking: false
381
+ };
382
+ }
383
+
384
+ async executeStoryValidation(agentName, config, context) {
385
+ if (!context.storyContent) {
386
+ return {
387
+ success: true,
388
+ message: 'No story content to validate',
389
+ blocking: false
390
+ };
391
+ }
392
+
393
+ // Simulate story validation with R.O.C.K.E.T. framework
394
+ const score = this.calculateStoryScore(context.storyContent, agentName);
395
+ const threshold = config.qualityThreshold || 7.0;
396
+
397
+ return {
398
+ success: score >= threshold,
399
+ message: `Story validation ${score >= threshold ? 'passed' : 'failed'}: ${score}/${threshold}`,
400
+ score,
401
+ threshold,
402
+ blocking: score < 5.0 // Block if critically poor
403
+ };
404
+ }
405
+
406
+ async executeQualityScoring(agentName, config, context) {
407
+ if (!context.content) {
408
+ return {
409
+ success: true,
410
+ message: 'No content to score',
411
+ score: 0,
412
+ blocking: false
413
+ };
414
+ }
415
+
416
+ try {
417
+ const contentType = context.contentType || 'general';
418
+ const scoreResult = await this.qualityEngine.scoreOutput(context.content, {
419
+ agentType: agentName,
420
+ contentType
421
+ });
422
+
423
+ const threshold = config.qualityThreshold || 7.0;
424
+
425
+ return {
426
+ success: scoreResult.adjustedScore >= threshold,
427
+ message: `Quality score: ${scoreResult.adjustedScore.toFixed(1)}/${threshold}`,
428
+ score: scoreResult.adjustedScore,
429
+ threshold,
430
+ qualityBand: scoreResult.qualityBand,
431
+ blocking: scoreResult.adjustedScore < 5.0
432
+ };
433
+ } catch (error) {
434
+ return {
435
+ success: false,
436
+ message: `Quality scoring failed: ${error.message}`,
437
+ blocking: false
438
+ };
439
+ }
440
+ }
441
+
442
+ async executePerformanceMonitoring(agentName, config, context) {
443
+ const responseTime = context.responseTime || Date.now() - (context.startTime || Date.now());
444
+ const threshold = config.responseTimeThreshold || 2000;
445
+
446
+ // Record metrics
447
+ this.performanceMonitor.recordAgentMetrics(agentName, {
448
+ responseTime,
449
+ error: context.hasError || false,
450
+ qualityScore: context.qualityScore,
451
+ toolUsed: context.toolUsed,
452
+ delegated: context.delegated
453
+ });
454
+
455
+ return {
456
+ success: responseTime <= threshold,
457
+ message: `Performance: ${responseTime}ms (threshold: ${threshold}ms)`,
458
+ responseTime,
459
+ threshold,
460
+ blocking: false
461
+ };
462
+ }
463
+
464
+ async executeNotifications(agentName, config, context) {
465
+ const channels = config.channels || ['console'];
466
+
467
+ if (context.notifications && context.notifications.length > 0) {
468
+ for (const notification of context.notifications) {
469
+ if (channels.includes('console')) {
470
+ console.log(`[${agentName.toUpperCase()}] ${notification.message}`);
471
+ }
472
+
473
+ if (channels.includes('file')) {
474
+ const logPath = path.join(__dirname, 'notifications.log');
475
+ const timestamp = new Date().toISOString();
476
+ const logEntry = `[${timestamp}] [${agentName}] ${notification.message}\n`;
477
+ fs.appendFileSync(logPath, logEntry);
478
+ }
479
+ }
480
+ }
481
+
482
+ return {
483
+ success: true,
484
+ message: `Notifications sent via: ${channels.join(', ')}`,
485
+ blocking: false
486
+ };
487
+ }
488
+
489
+ calculateStoryScore(content, agentName) {
490
+ let score = 7.0; // Base score
491
+
492
+ // Check for user story format
493
+ if (/\*\*As a\*\*.*\*\*I want\*\*.*\*\*so that\*\*/i.test(content)) {
494
+ score += 1.0;
495
+ } else {
496
+ score -= 1.5;
497
+ }
498
+
499
+ // Check for acceptance criteria
500
+ if (/acceptance criteria/i.test(content) && /\d+\./g.test(content)) {
501
+ score += 0.5;
502
+ } else {
503
+ score -= 1.0;
504
+ }
505
+
506
+ // Check for tasks/subtasks
507
+ if (/- \[ \]/g.test(content)) {
508
+ score += 0.5;
509
+ } else {
510
+ score -= 0.5;
511
+ }
512
+
513
+ // Agent-specific scoring adjustments
514
+ const agentConfig = this.agentHookManager.getAgentConfiguration(agentName);
515
+ if (agentConfig.specialization === 'technical-leadership' && /architecture|technical/i.test(content)) {
516
+ score += 0.5;
517
+ }
518
+
519
+ if (agentConfig.specialization === 'strategic-marketing' && /strategy|marketing|campaign/i.test(content)) {
520
+ score += 0.5;
521
+ }
522
+
523
+ return Math.max(0, Math.min(10, score));
524
+ }
525
+
526
+ processExecutionQueue() {
527
+ // Process queued executions if we have capacity
528
+ while (this.executionQueue.length > 0 && this.activeExecutions.size < this.maxConcurrentExecutions) {
529
+ const queuedExecution = this.executionQueue.shift();
530
+ this.orchestrateAgentWorkflow(queuedExecution.agentName, queuedExecution.context)
531
+ .then(queuedExecution.resolve)
532
+ .catch(queuedExecution.reject);
533
+ }
534
+ }
535
+
536
+ async queueExecution(agentName, context = {}) {
537
+ return new Promise((resolve, reject) => {
538
+ this.executionQueue.push({
539
+ agentName,
540
+ context,
541
+ resolve,
542
+ reject,
543
+ queuedAt: Date.now()
544
+ });
545
+ });
546
+ }
547
+
548
+ generateExecutionId() {
549
+ return `exec_${Date.now()}_${Math.random().toString(36).substring(7)}`;
550
+ }
551
+
552
+ getExecutionStatus(executionId) {
553
+ const execution = this.activeExecutions.get(executionId);
554
+ if (!execution) {
555
+ return null;
556
+ }
557
+
558
+ return {
559
+ id: execution.id,
560
+ agentName: execution.agentName,
561
+ status: execution.status,
562
+ progress: {
563
+ completed: execution.completedHooks.size,
564
+ failed: execution.failedHooks.size,
565
+ total: execution.executionPlan?.hooks.length || 0
566
+ },
567
+ duration: execution.endTime ?
568
+ execution.totalDuration :
569
+ Date.now() - execution.startTime
570
+ };
571
+ }
572
+
573
+ getSystemMetrics() {
574
+ return {
575
+ activeExecutions: this.activeExecutions.size,
576
+ queuedExecutions: this.executionQueue.length,
577
+ maxConcurrentExecutions: this.maxConcurrentExecutions,
578
+ totalExecutionsCompleted: this.executionHistory.length,
579
+ averageExecutionTime: this.executionHistory.length > 0 ?
580
+ this.executionHistory.reduce((sum, exec) => sum + exec.duration, 0) / this.executionHistory.length :
581
+ 0,
582
+ successRate: this.executionHistory.length > 0 ?
583
+ this.executionHistory.filter(exec => exec.success).length / this.executionHistory.length :
584
+ 0
585
+ };
586
+ }
587
+
588
+ emergencyStop() {
589
+ // Cancel all active executions
590
+ this.activeExecutions.forEach((execution, executionId) => {
591
+ execution.status = 'cancelled';
592
+ execution.endTime = Date.now();
593
+ execution.totalDuration = execution.endTime - execution.startTime;
594
+ this.emit('executionCancelled', { executionId, agentName: execution.agentName });
595
+ });
596
+
597
+ this.activeExecutions.clear();
598
+ this.executionQueue.length = 0;
599
+
600
+ this.emit('emergencyStop', { timestamp: new Date().toISOString() });
601
+ }
602
+ }
603
+
604
+ // CLI interface
605
+ async function main() {
606
+ const orchestrator = new HookOrchestrator();
607
+ const command = process.argv[2];
608
+
609
+ switch (command) {
610
+ case 'execute':
611
+ const agentName = process.argv[3];
612
+ const contextStr = process.argv[4] || '{}';
613
+
614
+ if (!agentName) {
615
+ console.error('Agent name required');
616
+ process.exit(1);
617
+ }
618
+
619
+ try {
620
+ const context = JSON.parse(contextStr);
621
+ const results = await orchestrator.orchestrateAgentWorkflow(agentName, context);
622
+ console.log(JSON.stringify(results, null, 2));
623
+ } catch (error) {
624
+ console.error('Execution failed:', error.message);
625
+ process.exit(1);
626
+ }
627
+ break;
628
+
629
+ case 'status':
630
+ const executionId = process.argv[3];
631
+ if (executionId) {
632
+ const status = orchestrator.getExecutionStatus(executionId);
633
+ console.log(JSON.stringify(status, null, 2));
634
+ } else {
635
+ const metrics = orchestrator.getSystemMetrics();
636
+ console.log(JSON.stringify(metrics, null, 2));
637
+ }
638
+ break;
639
+
640
+ case 'metrics':
641
+ const systemMetrics = orchestrator.getSystemMetrics();
642
+ console.log(JSON.stringify(systemMetrics, null, 2));
643
+ break;
644
+
645
+ default:
646
+ console.log('Usage: hook-orchestrator.js <command> [args...]');
647
+ console.log('Commands:');
648
+ console.log(' execute <agent-name> [context-json] - Execute workflow for agent');
649
+ console.log(' status [execution-id] - Get execution status or system metrics');
650
+ console.log(' metrics - Get system performance metrics');
651
+ process.exit(1);
652
+ }
653
+ }
654
+
655
+ if (import.meta.url === `file://${process.argv[1]}`) {
656
+ main().catch(error => {
657
+ console.error('Error:', error);
658
+ process.exit(1);
659
+ });
660
+ }
661
+
662
+ export default HookOrchestrator;