oh-my-claude-sisyphus 3.3.8 → 3.4.0

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 (298) hide show
  1. package/README.md +3 -3
  2. package/agents/explore-high.md +195 -0
  3. package/agents/qa-tester-high.md +141 -0
  4. package/agents/templates/README.md +110 -0
  5. package/agents/templates/base-agent.md +54 -0
  6. package/agents/templates/tier-instructions.md +94 -0
  7. package/commands/ecomode.md +60 -0
  8. package/commands/help.md +1 -1
  9. package/commands/mcp-setup.md +7 -6
  10. package/commands/ralplan.md +8 -1
  11. package/commands/ultrapilot.md +158 -0
  12. package/commands/ultrawork.md +1 -0
  13. package/dist/__tests__/delegation-enforcer-integration.test.d.ts +6 -0
  14. package/dist/__tests__/delegation-enforcer-integration.test.d.ts.map +1 -0
  15. package/dist/__tests__/delegation-enforcer-integration.test.js +136 -0
  16. package/dist/__tests__/delegation-enforcer-integration.test.js.map +1 -0
  17. package/dist/__tests__/delegation-enforcer.test.d.ts +5 -0
  18. package/dist/__tests__/delegation-enforcer.test.d.ts.map +1 -0
  19. package/dist/__tests__/delegation-enforcer.test.js +208 -0
  20. package/dist/__tests__/delegation-enforcer.test.js.map +1 -0
  21. package/dist/__tests__/hooks.test.js +2 -2
  22. package/dist/__tests__/hooks.test.js.map +1 -1
  23. package/dist/__tests__/installer.test.js +4 -6
  24. package/dist/__tests__/installer.test.js.map +1 -1
  25. package/dist/__tests__/ralph-prd.test.js +1 -1
  26. package/dist/__tests__/ralph-prd.test.js.map +1 -1
  27. package/dist/__tests__/ralph-progress.test.js +1 -1
  28. package/dist/__tests__/ralph-progress.test.js.map +1 -1
  29. package/dist/__tests__/skills.test.js +31 -24
  30. package/dist/__tests__/skills.test.js.map +1 -1
  31. package/dist/agents/analyst.d.ts.map +1 -1
  32. package/dist/agents/analyst.js +1 -0
  33. package/dist/agents/analyst.js.map +1 -1
  34. package/dist/agents/architect.d.ts.map +1 -1
  35. package/dist/agents/architect.js +1 -0
  36. package/dist/agents/architect.js.map +1 -1
  37. package/dist/agents/critic.d.ts.map +1 -1
  38. package/dist/agents/critic.js +1 -0
  39. package/dist/agents/critic.js.map +1 -1
  40. package/dist/agents/definitions.d.ts +5 -1
  41. package/dist/agents/definitions.d.ts.map +1 -1
  42. package/dist/agents/definitions.js +53 -155
  43. package/dist/agents/definitions.js.map +1 -1
  44. package/dist/agents/designer.d.ts.map +1 -1
  45. package/dist/agents/designer.js +1 -0
  46. package/dist/agents/designer.js.map +1 -1
  47. package/dist/agents/executor.d.ts.map +1 -1
  48. package/dist/agents/executor.js +1 -0
  49. package/dist/agents/executor.js.map +1 -1
  50. package/dist/agents/explore.d.ts.map +1 -1
  51. package/dist/agents/explore.js +1 -0
  52. package/dist/agents/explore.js.map +1 -1
  53. package/dist/agents/planner.d.ts.map +1 -1
  54. package/dist/agents/planner.js +1 -0
  55. package/dist/agents/planner.js.map +1 -1
  56. package/dist/agents/qa-tester.d.ts.map +1 -1
  57. package/dist/agents/qa-tester.js +1 -0
  58. package/dist/agents/qa-tester.js.map +1 -1
  59. package/dist/agents/researcher.d.ts.map +1 -1
  60. package/dist/agents/researcher.js +1 -0
  61. package/dist/agents/researcher.js.map +1 -1
  62. package/dist/agents/scientist.d.ts.map +1 -1
  63. package/dist/agents/scientist.js +1 -0
  64. package/dist/agents/scientist.js.map +1 -1
  65. package/dist/agents/types.d.ts +2 -0
  66. package/dist/agents/types.d.ts.map +1 -1
  67. package/dist/agents/types.js.map +1 -1
  68. package/dist/agents/vision.d.ts.map +1 -1
  69. package/dist/agents/vision.js +1 -0
  70. package/dist/agents/vision.js.map +1 -1
  71. package/dist/agents/writer.d.ts.map +1 -1
  72. package/dist/agents/writer.js +1 -0
  73. package/dist/agents/writer.js.map +1 -1
  74. package/dist/cli/index.js +0 -3
  75. package/dist/cli/index.js.map +1 -1
  76. package/dist/config/loader.d.ts.map +1 -1
  77. package/dist/config/loader.js +1 -6
  78. package/dist/config/loader.js.map +1 -1
  79. package/dist/features/delegation-enforcer.d.ts +71 -0
  80. package/dist/features/delegation-enforcer.d.ts.map +1 -0
  81. package/dist/features/delegation-enforcer.js +128 -0
  82. package/dist/features/delegation-enforcer.js.map +1 -0
  83. package/dist/features/index.d.ts +3 -0
  84. package/dist/features/index.d.ts.map +1 -1
  85. package/dist/features/index.js +18 -0
  86. package/dist/features/index.js.map +1 -1
  87. package/dist/features/state-manager/index.d.ts +100 -0
  88. package/dist/features/state-manager/index.d.ts.map +1 -0
  89. package/dist/features/state-manager/index.js +407 -0
  90. package/dist/features/state-manager/index.js.map +1 -0
  91. package/dist/features/state-manager/types.d.ts +147 -0
  92. package/dist/features/state-manager/types.d.ts.map +1 -0
  93. package/dist/features/state-manager/types.js +30 -0
  94. package/dist/features/state-manager/types.js.map +1 -0
  95. package/dist/features/task-decomposer/index.d.ts +33 -0
  96. package/dist/features/task-decomposer/index.d.ts.map +1 -0
  97. package/dist/features/task-decomposer/index.js +698 -0
  98. package/dist/features/task-decomposer/index.js.map +1 -0
  99. package/dist/features/task-decomposer/types.d.ts +133 -0
  100. package/dist/features/task-decomposer/types.d.ts.map +1 -0
  101. package/dist/features/task-decomposer/types.js +8 -0
  102. package/dist/features/task-decomposer/types.js.map +1 -0
  103. package/dist/features/verification/example.d.ts +49 -0
  104. package/dist/features/verification/example.d.ts.map +1 -0
  105. package/dist/features/verification/example.js +235 -0
  106. package/dist/features/verification/example.js.map +1 -0
  107. package/dist/features/verification/index.d.ts +97 -0
  108. package/dist/features/verification/index.d.ts.map +1 -0
  109. package/dist/features/verification/index.js +439 -0
  110. package/dist/features/verification/index.js.map +1 -0
  111. package/dist/features/verification/types.d.ts +142 -0
  112. package/dist/features/verification/types.d.ts.map +1 -0
  113. package/dist/features/verification/types.js +7 -0
  114. package/dist/features/verification/types.js.map +1 -0
  115. package/dist/hooks/agent-usage-reminder/constants.d.ts.map +1 -1
  116. package/dist/hooks/agent-usage-reminder/constants.js +0 -1
  117. package/dist/hooks/agent-usage-reminder/constants.js.map +1 -1
  118. package/dist/hooks/autopilot/__tests__/cancel.test.js +4 -4
  119. package/dist/hooks/autopilot/__tests__/cancel.test.js.map +1 -1
  120. package/dist/hooks/autopilot/__tests__/summary.test.js +1 -1
  121. package/dist/hooks/autopilot/__tests__/summary.test.js.map +1 -1
  122. package/dist/hooks/autopilot/__tests__/transition.test.js +1 -2
  123. package/dist/hooks/autopilot/__tests__/transition.test.js.map +1 -1
  124. package/dist/hooks/autopilot/cancel.js +2 -2
  125. package/dist/hooks/autopilot/cancel.js.map +1 -1
  126. package/dist/hooks/autopilot/enforcement.d.ts +16 -2
  127. package/dist/hooks/autopilot/enforcement.d.ts.map +1 -1
  128. package/dist/hooks/autopilot/enforcement.js +78 -4
  129. package/dist/hooks/autopilot/enforcement.js.map +1 -1
  130. package/dist/hooks/autopilot/index.d.ts +3 -6
  131. package/dist/hooks/autopilot/index.d.ts.map +1 -1
  132. package/dist/hooks/autopilot/index.js +6 -12
  133. package/dist/hooks/autopilot/index.js.map +1 -1
  134. package/dist/hooks/autopilot/state.d.ts +36 -2
  135. package/dist/hooks/autopilot/state.d.ts.map +1 -1
  136. package/dist/hooks/autopilot/state.js +216 -2
  137. package/dist/hooks/autopilot/state.js.map +1 -1
  138. package/dist/hooks/autopilot/validation.d.ts +23 -2
  139. package/dist/hooks/autopilot/validation.d.ts.map +1 -1
  140. package/dist/hooks/autopilot/validation.js +158 -1
  141. package/dist/hooks/autopilot/validation.js.map +1 -1
  142. package/dist/hooks/bridge.js +3 -3
  143. package/dist/hooks/bridge.js.map +1 -1
  144. package/dist/hooks/index.d.ts +5 -9
  145. package/dist/hooks/index.d.ts.map +1 -1
  146. package/dist/hooks/index.js +31 -21
  147. package/dist/hooks/index.js.map +1 -1
  148. package/dist/hooks/learner/promotion.js +1 -1
  149. package/dist/hooks/learner/promotion.js.map +1 -1
  150. package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
  151. package/dist/hooks/persistent-mode/index.js +2 -3
  152. package/dist/hooks/persistent-mode/index.js.map +1 -1
  153. package/dist/hooks/ralph/index.d.ts +11 -0
  154. package/dist/hooks/ralph/index.d.ts.map +1 -0
  155. package/dist/hooks/ralph/index.js +53 -0
  156. package/dist/hooks/ralph/index.js.map +1 -0
  157. package/dist/hooks/ralph/loop.d.ts +116 -0
  158. package/dist/hooks/ralph/loop.d.ts.map +1 -0
  159. package/dist/hooks/ralph/loop.js +322 -0
  160. package/dist/hooks/ralph/loop.js.map +1 -0
  161. package/dist/hooks/ralph/prd.d.ts +130 -0
  162. package/dist/hooks/ralph/prd.d.ts.map +1 -0
  163. package/dist/hooks/ralph/prd.js +310 -0
  164. package/dist/hooks/ralph/prd.js.map +1 -0
  165. package/dist/hooks/ralph/progress.d.ts +102 -0
  166. package/dist/hooks/ralph/progress.d.ts.map +1 -0
  167. package/dist/hooks/ralph/progress.js +408 -0
  168. package/dist/hooks/ralph/progress.js.map +1 -0
  169. package/dist/hooks/ralph/verifier.d.ts +72 -0
  170. package/dist/hooks/ralph/verifier.d.ts.map +1 -0
  171. package/dist/hooks/ralph/verifier.js +223 -0
  172. package/dist/hooks/ralph/verifier.js.map +1 -0
  173. package/dist/hooks/recovery/constants.d.ts +114 -0
  174. package/dist/hooks/recovery/constants.d.ts.map +1 -0
  175. package/dist/hooks/recovery/constants.js +227 -0
  176. package/dist/hooks/recovery/constants.js.map +1 -0
  177. package/dist/hooks/recovery/context-window.d.ts +24 -0
  178. package/dist/hooks/recovery/context-window.d.ts.map +1 -0
  179. package/dist/hooks/recovery/context-window.js +321 -0
  180. package/dist/hooks/recovery/context-window.js.map +1 -0
  181. package/dist/hooks/recovery/edit-error.d.ts +24 -0
  182. package/dist/hooks/recovery/edit-error.d.ts.map +1 -0
  183. package/dist/hooks/recovery/edit-error.js +56 -0
  184. package/dist/hooks/recovery/edit-error.js.map +1 -0
  185. package/dist/hooks/recovery/index.d.ts +102 -0
  186. package/dist/hooks/recovery/index.d.ts.map +1 -0
  187. package/dist/hooks/recovery/index.js +166 -0
  188. package/dist/hooks/recovery/index.js.map +1 -0
  189. package/dist/hooks/recovery/session-recovery.d.ts +24 -0
  190. package/dist/hooks/recovery/session-recovery.d.ts.map +1 -0
  191. package/dist/hooks/recovery/session-recovery.js +281 -0
  192. package/dist/hooks/recovery/session-recovery.js.map +1 -0
  193. package/dist/hooks/recovery/storage.d.ts +75 -0
  194. package/dist/hooks/recovery/storage.d.ts.map +1 -0
  195. package/dist/hooks/recovery/storage.js +382 -0
  196. package/dist/hooks/recovery/storage.js.map +1 -0
  197. package/dist/hooks/recovery/types.d.ts +196 -0
  198. package/dist/hooks/recovery/types.d.ts.map +1 -0
  199. package/dist/hooks/recovery/types.js +32 -0
  200. package/dist/hooks/recovery/types.js.map +1 -0
  201. package/dist/hooks/ultrapilot/index.d.ts +90 -0
  202. package/dist/hooks/ultrapilot/index.d.ts.map +1 -0
  203. package/dist/hooks/ultrapilot/index.js +310 -0
  204. package/dist/hooks/ultrapilot/index.js.map +1 -0
  205. package/dist/hooks/ultrapilot/state.d.ts +72 -0
  206. package/dist/hooks/ultrapilot/state.d.ts.map +1 -0
  207. package/dist/hooks/ultrapilot/state.js +258 -0
  208. package/dist/hooks/ultrapilot/state.js.map +1 -0
  209. package/dist/hooks/ultrapilot/types.d.ts +113 -0
  210. package/dist/hooks/ultrapilot/types.d.ts.map +1 -0
  211. package/dist/hooks/ultrapilot/types.js +36 -0
  212. package/dist/hooks/ultrapilot/types.js.map +1 -0
  213. package/dist/hooks/ultraqa/index.d.ts +94 -0
  214. package/dist/hooks/ultraqa/index.d.ts.map +1 -0
  215. package/dist/hooks/ultraqa/index.js +216 -0
  216. package/dist/hooks/ultraqa/index.js.map +1 -0
  217. package/dist/hooks/ultrawork/index.d.ts +62 -0
  218. package/dist/hooks/ultrawork/index.d.ts.map +1 -0
  219. package/dist/hooks/ultrawork/index.js +208 -0
  220. package/dist/hooks/ultrawork/index.js.map +1 -0
  221. package/dist/hud/elements/index.d.ts +1 -1
  222. package/dist/hud/elements/index.d.ts.map +1 -1
  223. package/dist/hud/elements/index.js +1 -1
  224. package/dist/hud/elements/index.js.map +1 -1
  225. package/dist/hud/elements/limits.d.ts +6 -0
  226. package/dist/hud/elements/limits.d.ts.map +1 -1
  227. package/dist/hud/elements/limits.js +31 -0
  228. package/dist/hud/elements/limits.js.map +1 -1
  229. package/dist/hud/render.d.ts.map +1 -1
  230. package/dist/hud/render.js +8 -4
  231. package/dist/hud/render.js.map +1 -1
  232. package/dist/hud/types.d.ts +1 -0
  233. package/dist/hud/types.d.ts.map +1 -1
  234. package/dist/hud/types.js +6 -0
  235. package/dist/hud/types.js.map +1 -1
  236. package/dist/hud/usage-api.d.ts.map +1 -1
  237. package/dist/hud/usage-api.js +5 -3
  238. package/dist/hud/usage-api.js.map +1 -1
  239. package/dist/index.d.ts.map +1 -1
  240. package/dist/index.js +1 -2
  241. package/dist/index.js.map +1 -1
  242. package/dist/installer/index.d.ts +1 -1
  243. package/dist/installer/index.js +1 -1
  244. package/dist/mcp/index.d.ts +1 -1
  245. package/dist/mcp/index.d.ts.map +1 -1
  246. package/dist/mcp/index.js +1 -1
  247. package/dist/mcp/index.js.map +1 -1
  248. package/dist/mcp/servers.d.ts +2 -18
  249. package/dist/mcp/servers.d.ts.map +1 -1
  250. package/dist/mcp/servers.js +4 -36
  251. package/dist/mcp/servers.js.map +1 -1
  252. package/dist/shared/types.d.ts +1 -3
  253. package/dist/shared/types.d.ts.map +1 -1
  254. package/docs/CLAUDE.md +170 -44
  255. package/docs/DELEGATION-ENFORCER.md +282 -0
  256. package/docs/FULL-README.md +1 -1
  257. package/docs/LOCAL_PLUGIN_INSTALL.md +1 -1
  258. package/docs/MIGRATION.md +298 -104
  259. package/package.json +2 -2
  260. package/scripts/test-mutual-exclusion.ts +1 -1
  261. package/skills/analyze/SKILL.md +0 -1
  262. package/skills/autopilot/SKILL.md +0 -1
  263. package/skills/cancel/SKILL.md +580 -0
  264. package/skills/cancel-autopilot/SKILL.md +0 -1
  265. package/skills/cancel-ecomode/SKILL.md +41 -0
  266. package/skills/cancel-ralph/SKILL.md +0 -1
  267. package/skills/cancel-ultraqa/SKILL.md +0 -1
  268. package/skills/cancel-ultrawork/SKILL.md +0 -1
  269. package/skills/deepinit/SKILL.md +0 -1
  270. package/skills/deepsearch/SKILL.md +0 -1
  271. package/skills/doctor/SKILL.md +0 -1
  272. package/skills/ecomode/SKILL.md +128 -0
  273. package/skills/frontend-ui-ux/SKILL.md +0 -1
  274. package/skills/git-master/SKILL.md +0 -1
  275. package/skills/help/SKILL.md +1 -2
  276. package/skills/hud/SKILL.md +0 -1
  277. package/skills/learner/SKILL.md +0 -1
  278. package/skills/mcp-setup/SKILL.md +8 -7
  279. package/skills/note/SKILL.md +0 -1
  280. package/skills/omc-default/SKILL.md +0 -1
  281. package/skills/omc-default-global/SKILL.md +0 -1
  282. package/skills/omc-setup/SKILL.md +212 -10
  283. package/skills/orchestrate/SKILL.md +0 -1
  284. package/skills/pipeline/SKILL.md +417 -0
  285. package/skills/plan/SKILL.md +138 -21
  286. package/skills/planner/SKILL.md +0 -1
  287. package/skills/ralph/SKILL.md +65 -1
  288. package/skills/ralph-init/SKILL.md +0 -1
  289. package/skills/ralplan/SKILL.md +0 -1
  290. package/skills/release/SKILL.md +0 -1
  291. package/skills/research/SKILL.md +0 -1
  292. package/skills/review/SKILL.md +0 -1
  293. package/skills/swarm/SKILL.md +349 -0
  294. package/skills/tdd/SKILL.md +0 -1
  295. package/skills/ultrapilot/SKILL.md +563 -0
  296. package/skills/ultraqa/SKILL.md +0 -1
  297. package/skills/ultrawork/SKILL.md +0 -1
  298. package/docs/MIGRATION-v3.md +0 -186
@@ -0,0 +1,407 @@
1
+ /**
2
+ * State Manager
3
+ *
4
+ * Unified state management that standardizes state file locations:
5
+ * - Local state: .omc/state/{name}.json
6
+ * - Global state: ~/.omc/state/{name}.json
7
+ *
8
+ * Features:
9
+ * - Type-safe read/write operations
10
+ * - Auto-create directories
11
+ * - Legacy location support (for migration)
12
+ * - State cleanup utilities
13
+ */
14
+ import * as fs from 'fs';
15
+ import * as path from 'path';
16
+ import * as os from 'os';
17
+ import { StateLocation, DEFAULT_STATE_CONFIG } from './types.js';
18
+ // Standard state directories
19
+ const LOCAL_STATE_DIR = '.omc/state';
20
+ const GLOBAL_STATE_DIR = path.join(os.homedir(), '.omc', 'state');
21
+ // Legacy state locations (for backward compatibility)
22
+ const LEGACY_LOCATIONS = {
23
+ // Example legacy locations that might exist
24
+ 'boulder': ['.omc/boulder.json', path.join(os.homedir(), '.omc', 'boulder.json')],
25
+ 'autopilot': ['.omc/autopilot-state.json'],
26
+ 'ralph': ['.omc/ralph-state.json'],
27
+ 'ultrawork': ['.omc/ultrawork-state.json'],
28
+ 'ultraqa': ['.omc/ultraqa-state.json']
29
+ };
30
+ /**
31
+ * Get the standard path for a state file
32
+ */
33
+ export function getStatePath(name, location) {
34
+ const baseDir = location === StateLocation.LOCAL ? LOCAL_STATE_DIR : GLOBAL_STATE_DIR;
35
+ return path.join(baseDir, `${name}.json`);
36
+ }
37
+ /**
38
+ * Get legacy paths for a state file (for migration)
39
+ */
40
+ export function getLegacyPaths(name) {
41
+ return LEGACY_LOCATIONS[name] || [];
42
+ }
43
+ /**
44
+ * Ensure state directory exists
45
+ */
46
+ export function ensureStateDir(location) {
47
+ const dir = location === StateLocation.LOCAL ? LOCAL_STATE_DIR : GLOBAL_STATE_DIR;
48
+ if (!fs.existsSync(dir)) {
49
+ fs.mkdirSync(dir, { recursive: true });
50
+ }
51
+ }
52
+ /**
53
+ * Read state from file
54
+ *
55
+ * Checks standard location first, then legacy locations if enabled.
56
+ * Returns both the data and where it was found.
57
+ */
58
+ export function readState(name, location = StateLocation.LOCAL, options) {
59
+ const checkLegacy = options?.checkLegacy ?? DEFAULT_STATE_CONFIG.checkLegacy;
60
+ const standardPath = getStatePath(name, location);
61
+ const legacyPaths = checkLegacy ? getLegacyPaths(name) : [];
62
+ // Try standard location first
63
+ if (fs.existsSync(standardPath)) {
64
+ try {
65
+ const content = fs.readFileSync(standardPath, 'utf-8');
66
+ const data = JSON.parse(content);
67
+ return {
68
+ exists: true,
69
+ data,
70
+ foundAt: standardPath,
71
+ legacyLocations: []
72
+ };
73
+ }
74
+ catch (error) {
75
+ // Invalid JSON or read error - treat as not found
76
+ console.warn(`Failed to read state from ${standardPath}:`, error);
77
+ }
78
+ }
79
+ // Try legacy locations
80
+ if (checkLegacy) {
81
+ for (const legacyPath of legacyPaths) {
82
+ // Resolve relative paths
83
+ const resolvedPath = path.isAbsolute(legacyPath)
84
+ ? legacyPath
85
+ : path.join(process.cwd(), legacyPath);
86
+ if (fs.existsSync(resolvedPath)) {
87
+ try {
88
+ const content = fs.readFileSync(resolvedPath, 'utf-8');
89
+ const data = JSON.parse(content);
90
+ return {
91
+ exists: true,
92
+ data,
93
+ foundAt: resolvedPath,
94
+ legacyLocations: legacyPaths
95
+ };
96
+ }
97
+ catch (error) {
98
+ console.warn(`Failed to read legacy state from ${resolvedPath}:`, error);
99
+ }
100
+ }
101
+ }
102
+ }
103
+ return {
104
+ exists: false,
105
+ legacyLocations: checkLegacy ? legacyPaths : []
106
+ };
107
+ }
108
+ /**
109
+ * Write state to file
110
+ *
111
+ * Always writes to the standard location.
112
+ * Creates directories if they don't exist.
113
+ */
114
+ export function writeState(name, data, location = StateLocation.LOCAL, options) {
115
+ const createDirs = options?.createDirs ?? DEFAULT_STATE_CONFIG.createDirs;
116
+ const statePath = getStatePath(name, location);
117
+ try {
118
+ // Ensure directory exists
119
+ if (createDirs) {
120
+ ensureStateDir(location);
121
+ }
122
+ // Write state
123
+ const content = JSON.stringify(data, null, 2);
124
+ fs.writeFileSync(statePath, content, 'utf-8');
125
+ return {
126
+ success: true,
127
+ path: statePath
128
+ };
129
+ }
130
+ catch (error) {
131
+ return {
132
+ success: false,
133
+ path: statePath,
134
+ error: error instanceof Error ? error.message : String(error)
135
+ };
136
+ }
137
+ }
138
+ /**
139
+ * Clear state from all locations (standard + legacy)
140
+ *
141
+ * Removes the state file from both standard and legacy locations.
142
+ * Returns information about what was removed.
143
+ */
144
+ export function clearState(name, location) {
145
+ const result = {
146
+ removed: [],
147
+ notFound: [],
148
+ errors: []
149
+ };
150
+ // Determine which locations to check
151
+ const locationsToCheck = location
152
+ ? [location]
153
+ : [StateLocation.LOCAL, StateLocation.GLOBAL];
154
+ // Remove from standard locations
155
+ for (const loc of locationsToCheck) {
156
+ const standardPath = getStatePath(name, loc);
157
+ try {
158
+ if (fs.existsSync(standardPath)) {
159
+ fs.unlinkSync(standardPath);
160
+ result.removed.push(standardPath);
161
+ }
162
+ else {
163
+ result.notFound.push(standardPath);
164
+ }
165
+ }
166
+ catch (error) {
167
+ result.errors.push({
168
+ path: standardPath,
169
+ error: error instanceof Error ? error.message : String(error)
170
+ });
171
+ }
172
+ }
173
+ // Remove from legacy locations
174
+ const legacyPaths = getLegacyPaths(name);
175
+ for (const legacyPath of legacyPaths) {
176
+ const resolvedPath = path.isAbsolute(legacyPath)
177
+ ? legacyPath
178
+ : path.join(process.cwd(), legacyPath);
179
+ try {
180
+ if (fs.existsSync(resolvedPath)) {
181
+ fs.unlinkSync(resolvedPath);
182
+ result.removed.push(resolvedPath);
183
+ }
184
+ else {
185
+ result.notFound.push(resolvedPath);
186
+ }
187
+ }
188
+ catch (error) {
189
+ result.errors.push({
190
+ path: resolvedPath,
191
+ error: error instanceof Error ? error.message : String(error)
192
+ });
193
+ }
194
+ }
195
+ return result;
196
+ }
197
+ /**
198
+ * Migrate state from legacy location to standard location
199
+ *
200
+ * Finds state in legacy locations and moves it to the standard location.
201
+ * Deletes the legacy file after successful migration.
202
+ */
203
+ export function migrateState(name, location = StateLocation.LOCAL) {
204
+ // Check if already in standard location
205
+ const standardPath = getStatePath(name, location);
206
+ if (fs.existsSync(standardPath)) {
207
+ return {
208
+ migrated: false
209
+ };
210
+ }
211
+ // Look for legacy state
212
+ const readResult = readState(name, location, { checkLegacy: true });
213
+ if (!readResult.exists || !readResult.foundAt || !readResult.data) {
214
+ return {
215
+ migrated: false,
216
+ error: 'No legacy state found'
217
+ };
218
+ }
219
+ // Check if it's actually from a legacy location
220
+ const isLegacy = readResult.foundAt !== standardPath;
221
+ if (!isLegacy) {
222
+ return {
223
+ migrated: false
224
+ };
225
+ }
226
+ // Write to standard location
227
+ const writeResult = writeState(name, readResult.data, location);
228
+ if (!writeResult.success) {
229
+ return {
230
+ migrated: false,
231
+ error: `Failed to write to standard location: ${writeResult.error}`
232
+ };
233
+ }
234
+ // Delete legacy file
235
+ try {
236
+ fs.unlinkSync(readResult.foundAt);
237
+ }
238
+ catch (error) {
239
+ // Migration succeeded but cleanup failed - not critical
240
+ console.warn(`Failed to delete legacy state at ${readResult.foundAt}:`, error);
241
+ }
242
+ return {
243
+ migrated: true,
244
+ from: readResult.foundAt,
245
+ to: writeResult.path
246
+ };
247
+ }
248
+ /**
249
+ * List all state files
250
+ *
251
+ * Returns information about all state files in the specified location(s).
252
+ */
253
+ export function listStates(options) {
254
+ const results = [];
255
+ const includeLegacy = options?.includeLegacy ?? false;
256
+ const pattern = options?.pattern;
257
+ // Helper to check if name matches pattern
258
+ const matchesPattern = (name) => {
259
+ if (!pattern)
260
+ return true;
261
+ // Simple glob: * matches anything
262
+ const regex = new RegExp('^' + pattern.replace(/\*/g, '.*') + '$');
263
+ return regex.test(name);
264
+ };
265
+ // Helper to add state files from a directory
266
+ const addStatesFromDir = (dir, location, isLegacy = false) => {
267
+ if (!fs.existsSync(dir))
268
+ return;
269
+ try {
270
+ const files = fs.readdirSync(dir);
271
+ for (const file of files) {
272
+ if (!file.endsWith('.json'))
273
+ continue;
274
+ const name = file.slice(0, -5); // Remove .json
275
+ if (!matchesPattern(name))
276
+ continue;
277
+ const filePath = path.join(dir, file);
278
+ const stats = fs.statSync(filePath);
279
+ results.push({
280
+ name,
281
+ path: filePath,
282
+ location,
283
+ size: stats.size,
284
+ modified: stats.mtime,
285
+ isLegacy
286
+ });
287
+ }
288
+ }
289
+ catch (error) {
290
+ console.warn(`Failed to list states from ${dir}:`, error);
291
+ }
292
+ };
293
+ // Check standard locations
294
+ if (!options?.location || options.location === StateLocation.LOCAL) {
295
+ addStatesFromDir(LOCAL_STATE_DIR, StateLocation.LOCAL);
296
+ }
297
+ if (!options?.location || options.location === StateLocation.GLOBAL) {
298
+ addStatesFromDir(GLOBAL_STATE_DIR, StateLocation.GLOBAL);
299
+ }
300
+ // Check legacy locations if requested
301
+ if (includeLegacy) {
302
+ // Add logic to scan legacy locations
303
+ // This would require knowing all possible legacy locations
304
+ // For now, we skip this as legacy locations are name-specific
305
+ }
306
+ return results;
307
+ }
308
+ /**
309
+ * Cleanup orphaned state files
310
+ *
311
+ * Removes state files that haven't been modified in a long time.
312
+ * Useful for cleaning up abandoned states.
313
+ */
314
+ export function cleanupOrphanedStates(options) {
315
+ const maxAgeDays = options?.maxAgeDays ?? 30;
316
+ const dryRun = options?.dryRun ?? false;
317
+ const exclude = options?.exclude ?? [];
318
+ const result = {
319
+ deleted: [],
320
+ wouldDelete: dryRun ? [] : undefined,
321
+ spaceFreed: 0,
322
+ errors: []
323
+ };
324
+ const cutoffDate = new Date();
325
+ cutoffDate.setDate(cutoffDate.getDate() - maxAgeDays);
326
+ const states = listStates({ includeLegacy: false });
327
+ for (const state of states) {
328
+ // Skip excluded patterns
329
+ if (exclude.some(pattern => {
330
+ const regex = new RegExp('^' + pattern.replace(/\*/g, '.*') + '$');
331
+ return regex.test(state.name);
332
+ })) {
333
+ continue;
334
+ }
335
+ // Check if old enough
336
+ if (state.modified > cutoffDate) {
337
+ continue;
338
+ }
339
+ // Delete or record for dry run
340
+ if (dryRun) {
341
+ result.wouldDelete?.push(state.path);
342
+ result.spaceFreed += state.size;
343
+ }
344
+ else {
345
+ try {
346
+ fs.unlinkSync(state.path);
347
+ result.deleted.push(state.path);
348
+ result.spaceFreed += state.size;
349
+ }
350
+ catch (error) {
351
+ result.errors.push({
352
+ path: state.path,
353
+ error: error instanceof Error ? error.message : String(error)
354
+ });
355
+ }
356
+ }
357
+ }
358
+ return result;
359
+ }
360
+ /**
361
+ * State Manager Class
362
+ *
363
+ * Object-oriented interface for managing a specific state.
364
+ */
365
+ export class StateManager {
366
+ name;
367
+ location;
368
+ constructor(name, location = StateLocation.LOCAL) {
369
+ this.name = name;
370
+ this.location = location;
371
+ }
372
+ read(options) {
373
+ return readState(this.name, this.location, options);
374
+ }
375
+ write(data, options) {
376
+ return writeState(this.name, data, this.location, options);
377
+ }
378
+ clear() {
379
+ return clearState(this.name, this.location);
380
+ }
381
+ migrate() {
382
+ return migrateState(this.name, this.location);
383
+ }
384
+ exists() {
385
+ return this.read({ checkLegacy: false }).exists;
386
+ }
387
+ get() {
388
+ return this.read().data;
389
+ }
390
+ set(data) {
391
+ return this.write(data).success;
392
+ }
393
+ update(updater) {
394
+ const current = this.get();
395
+ const updated = updater(current);
396
+ return this.set(updated);
397
+ }
398
+ }
399
+ /**
400
+ * Create a state manager for a specific state
401
+ */
402
+ export function createStateManager(name, location = StateLocation.LOCAL) {
403
+ return new StateManager(name, location);
404
+ }
405
+ // Re-export enum, constants, and functions from types
406
+ export { StateLocation, DEFAULT_STATE_CONFIG, isStateLocation } from './types.js';
407
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/state-manager/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EACL,aAAa,EAWb,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB,6BAA6B;AAC7B,MAAM,eAAe,GAAG,YAAY,CAAC;AACrC,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAElE,sDAAsD;AACtD,MAAM,gB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c/state/) locations.
6
+ */
7
+ /**
8
+ * Location where state should be stored
9
+ */
10
+ export declare enum StateLocation {
11
+ /** Local project state: .omc/state/{name}.json */
12
+ LOCAL = "local",
13
+ /** Global user state: ~/.omc/state/{name}.json */
14
+ GLOBAL = "global"
15
+ }
16
+ /**
17
+ * Configuration for state operations
18
+ */
19
+ export interface StateConfig {
20
+ /** State file name (without .json extension) */
21
+ name: string;
22
+ /** Where to store the state */
23
+ location: StateLocation;
24
+ /** Whether to create directories if they don't exist */
25
+ createDirs?: boolean;
26
+ /** Whether to check legacy locations when reading */
27
+ checkLegacy?: boolean;
28
+ }
29
+ /**
30
+ * Result of a state read operation
31
+ */
32
+ export interface StateReadResult<T = unknown> {
33
+ /** Whether state was found */
34
+ exists: boolean;
35
+ /** The state data (if found) */
36
+ data?: T;
37
+ /** Where the state was found */
38
+ foundAt?: string;
39
+ /** Legacy location that was checked */
40
+ legacyLocations?: string[];
41
+ }
42
+ /**
43
+ * Result of a state write operation
44
+ */
45
+ export interface StateWriteResult {
46
+ /** Whether write was successful */
47
+ success: boolean;
48
+ /** Path where state was written */
49
+ path: string;
50
+ /** Error message if failed */
51
+ error?: string;
52
+ }
53
+ /**
54
+ * Result of a state clear operation
55
+ */
56
+ export interface StateClearResult {
57
+ /** Paths that were removed */
58
+ removed: string[];
59
+ /** Paths that didn't exist */
60
+ notFound: string[];
61
+ /** Paths that failed to remove */
62
+ errors: Array<{
63
+ path: string;
64
+ error: string;
65
+ }>;
66
+ }
67
+ /**
68
+ * Result of a state migration operation
69
+ */
70
+ export interface StateMigrationResult {
71
+ /** Whether migration occurred */
72
+ migrated: boolean;
73
+ /** Source path (legacy location) */
74
+ from?: string;
75
+ /** Destination path (standard location) */
76
+ to?: string;
77
+ /** Error message if failed */
78
+ error?: string;
79
+ }
80
+ /**
81
+ * Information about a state file
82
+ */
83
+ export interface StateFileInfo {
84
+ /** State name */
85
+ name: string;
86
+ /** Full file path */
87
+ path: string;
88
+ /** Location type */
89
+ location: StateLocation;
90
+ /** File size in bytes */
91
+ size: number;
92
+ /** Last modified timestamp */
93
+ modified: Date;
94
+ /** Whether this is a legacy location */
95
+ isLegacy: boolean;
96
+ }
97
+ /**
98
+ * Options for listing states
99
+ */
100
+ export interface ListStatesOptions {
101
+ /** Filter by location */
102
+ location?: StateLocation;
103
+ /** Include legacy locations */
104
+ includeLegacy?: boolean;
105
+ /** Filter by name pattern (glob) */
106
+ pattern?: string;
107
+ }
108
+ /**
109
+ * Options for cleanup operation
110
+ */
111
+ export interface CleanupOptions {
112
+ /** Maximum age in days for orphaned states */
113
+ maxAgeDays?: number;
114
+ /** Dry run - don't actually delete */
115
+ dryRun?: boolean;
116
+ /** Patterns to exclude from cleanup */
117
+ exclude?: string[];
118
+ }
119
+ /**
120
+ * Result of cleanup operation
121
+ */
122
+ export interface CleanupResult {
123
+ /** Files that were deleted */
124
+ deleted: string[];
125
+ /** Files that would be deleted (dry run) */
126
+ wouldDelete?: string[];
127
+ /** Total space freed in bytes */
128
+ spaceFreed: number;
129
+ /** Errors encountered */
130
+ errors: Array<{
131
+ path: string;
132
+ error: string;
133
+ }>;
134
+ }
135
+ /**
136
+ * Generic state data structure
137
+ */
138
+ export type StateData = Record<string, unknown>;
139
+ /**
140
+ * Type guard for StateLocation
141
+ */
142
+ export declare function isStateLocation(value: unknown): value is StateLocation;
143
+ /**
144
+ * Default state configuration
145
+ */
146
+ export declare const DEFAULT_STATE_CONFIG: Partial<StateConfig>;
147
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/features/state-manager/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,oBAAY,aAAa;IACvB,kDAAkD;IAClD,KAAK,UAAU;IACf,kDAAkD;IAClD,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,+B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local (.omc/state/) and global (~/.omc/state/) locations.
6
+ */
7
+ /**
8
+ * Location where state should be stored
9
+ */
10
+ export var StateLocation;
11
+ (function (StateLocation) {
12
+ /** Local project state: .omc/state/{name}.json */
13
+ StateLocation["LOCAL"] = "local";
14
+ /** Global user state: ~/.omc/state/{name}.json */
15
+ StateLocation["GLOBAL"] = "global";
16
+ })(StateLocation || (StateLocation = {}));
17
+ /**
18
+ * Type guard for StateLocation
19
+ */
20
+ export function isStateLocation(value) {
21
+ return value === StateLocation.LOCAL || value === StateLocation.GLOBAL;
22
+ }
23
+ /**
24
+ * Default state configuration
25
+ */
26
+ export const DEFAULT_STATE_CONFIG = {
27
+ createDirs: true,
28
+ checkLegacy: true
29
+ };
30
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/features/state-manager/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,kDAAkD;IAClD,gCAAe,CAAA;IACf,kDAAkD;IAClD,kCAAiB,CAAA;AACnB,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAiID;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,OAAO,KAAK,KAAK,aAAa,CAAC,KAAK,IAAI,KAAK,KAAK,aAAa,CAAC,MAAM,CAAC;AACzE,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAyB;IACxD,UAAU,EAAE,IAAI;IAChB,WAAW,EAAE,IAAI;CAClB,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Task Decomposition Engine
3
+ *
4
+ * Analyzes tasks and splits them into parallelizable components
5
+ * with non-overlapping file ownership.
6
+ */
7
+ import type { TaskAnalysis, Component, Subtask, SharedFile, DecompositionResult, ProjectContext } from './types.js';
8
+ export type { TaskAnalysis, Component, Subtask, SharedFile, DecompositionResult, ProjectContext, TaskType, ComponentRole, FileOwnership, DecompositionStrategy } from './types.js';
9
+ /**
10
+ * Main entry point: decompose a task into parallelizable subtasks
11
+ */
12
+ export declare function decomposeTask(task: string, projectContext?: ProjectContext): Promise<DecompositionResult>;
13
+ /**
14
+ * Analyze task to understand structure and requirements
15
+ */
16
+ export declare function analyzeTask(task: string, context: ProjectContext): TaskAnalysis;
17
+ /**
18
+ * Identify parallelizable components from analysis
19
+ */
20
+ export declare function identifyComponents(analysis: TaskAnalysis, context: ProjectContext): Component[];
21
+ /**
22
+ * Generate subtasks from components
23
+ */
24
+ export declare function generateSubtasks(components: Component[], analysis: TaskAnalysis, context: ProjectContext): Subtask[];
25
+ /**
26
+ * Assign non-overlapping file ownership to subtasks
27
+ */
28
+ export declare function assignFileOwnership(subtasks: Subtask[], sharedFiles: SharedFile[], context: ProjectContext): void;
29
+ /**
30
+ * Identify files that should be managed by coordinator
31
+ */
32
+ export declare function identifySharedFiles(components: Component[], context: ProjectContext): SharedFile[];
33
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/task-decomposer/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,OAAO,EACP,UAAU,EACV,mBAAmB,EACnB,cAAc,EAKf,MAAM,YAAY,CAAC;AAGpB,YAAY,EACV,YAAY,EACZ,SAAS,EACT,OAAO,EACP,UAAU,EACV,mBAAmB,EACnB,cAAc,EACd,QAAQ,EACR,aAAa,EACb,aAAa,EACb,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,cAAc,GAAE,cAA2C,GAC1D,OAAO,CAAC,mBAAmB,CAAC,CA+B9B;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,cAAc,GACtB,YAAY,CAkCd;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,cAAc,GACtB,SAAS,EAAE,CAsBb;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,SAAS,EAAE,EACvB,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,cAAc,GACtB,OAAO,EAAE,CAsBX;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,OAAO,EAAE,EACnB,WAAW,EAAE,UAAU,EAAE,EACzB,OAAO,EAAE,cAAc,GACtB,IAAI,CAoCN;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,SAAS,EAAE,EACvB,OAAO,EAAE,cAAc,GACtB,UAAU,EAAE,CA4Cd"}