heyio 3.4.0 → 4.0.1

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 (289) hide show
  1. package/CODE_OF_CONDUCT.md +83 -0
  2. package/LICENSE +21 -0
  3. package/README.md +203 -151
  4. package/dist/daemon/cli.js +84366 -0
  5. package/dist/daemon/index.js +82899 -0
  6. package/dist/web/assets/index-CbptHIYU.js +520 -0
  7. package/{public → dist/web}/index.html +1 -1
  8. package/package.json +48 -47
  9. package/dist/api/middleware/auth.d.ts +0 -14
  10. package/dist/api/middleware/auth.d.ts.map +0 -1
  11. package/dist/api/middleware/auth.js +0 -130
  12. package/dist/api/middleware/auth.js.map +0 -1
  13. package/dist/api/notifications.d.ts +0 -14
  14. package/dist/api/notifications.d.ts.map +0 -1
  15. package/dist/api/notifications.js +0 -114
  16. package/dist/api/notifications.js.map +0 -1
  17. package/dist/api/routes/activity.d.ts +0 -3
  18. package/dist/api/routes/activity.d.ts.map +0 -1
  19. package/dist/api/routes/activity.js +0 -28
  20. package/dist/api/routes/activity.js.map +0 -1
  21. package/dist/api/routes/attachments.d.ts +0 -3
  22. package/dist/api/routes/attachments.d.ts.map +0 -1
  23. package/dist/api/routes/attachments.js +0 -83
  24. package/dist/api/routes/attachments.js.map +0 -1
  25. package/dist/api/routes/config.d.ts +0 -3
  26. package/dist/api/routes/config.d.ts.map +0 -1
  27. package/dist/api/routes/config.js +0 -107
  28. package/dist/api/routes/config.js.map +0 -1
  29. package/dist/api/routes/conversations.d.ts +0 -3
  30. package/dist/api/routes/conversations.d.ts.map +0 -1
  31. package/dist/api/routes/conversations.js +0 -25
  32. package/dist/api/routes/conversations.js.map +0 -1
  33. package/dist/api/routes/health.d.ts +0 -3
  34. package/dist/api/routes/health.d.ts.map +0 -1
  35. package/dist/api/routes/health.js +0 -39
  36. package/dist/api/routes/health.js.map +0 -1
  37. package/dist/api/routes/inbox.d.ts +0 -3
  38. package/dist/api/routes/inbox.d.ts.map +0 -1
  39. package/dist/api/routes/inbox.js +0 -139
  40. package/dist/api/routes/inbox.js.map +0 -1
  41. package/dist/api/routes/schedules.d.ts +0 -3
  42. package/dist/api/routes/schedules.d.ts.map +0 -1
  43. package/dist/api/routes/schedules.js +0 -116
  44. package/dist/api/routes/schedules.js.map +0 -1
  45. package/dist/api/routes/skills.d.ts +0 -2
  46. package/dist/api/routes/skills.d.ts.map +0 -1
  47. package/dist/api/routes/skills.js +0 -127
  48. package/dist/api/routes/skills.js.map +0 -1
  49. package/dist/api/routes/squads.d.ts +0 -3
  50. package/dist/api/routes/squads.d.ts.map +0 -1
  51. package/dist/api/routes/squads.js +0 -578
  52. package/dist/api/routes/squads.js.map +0 -1
  53. package/dist/api/routes/usage.d.ts +0 -3
  54. package/dist/api/routes/usage.d.ts.map +0 -1
  55. package/dist/api/routes/usage.js +0 -55
  56. package/dist/api/routes/usage.js.map +0 -1
  57. package/dist/api/routes/wiki.d.ts +0 -2
  58. package/dist/api/routes/wiki.d.ts.map +0 -1
  59. package/dist/api/routes/wiki.js +0 -75
  60. package/dist/api/routes/wiki.js.map +0 -1
  61. package/dist/api/server.d.ts +0 -7
  62. package/dist/api/server.d.ts.map +0 -1
  63. package/dist/api/server.js +0 -183
  64. package/dist/api/server.js.map +0 -1
  65. package/dist/config.d.ts +0 -3
  66. package/dist/config.d.ts.map +0 -1
  67. package/dist/config.js +0 -3
  68. package/dist/config.js.map +0 -1
  69. package/dist/copilot/client.d.ts +0 -5
  70. package/dist/copilot/client.d.ts.map +0 -1
  71. package/dist/copilot/client.js +0 -38
  72. package/dist/copilot/client.js.map +0 -1
  73. package/dist/copilot/health-monitor.d.ts +0 -14
  74. package/dist/copilot/health-monitor.d.ts.map +0 -1
  75. package/dist/copilot/health-monitor.js +0 -70
  76. package/dist/copilot/health-monitor.js.map +0 -1
  77. package/dist/copilot/orchestrator.d.ts +0 -5
  78. package/dist/copilot/orchestrator.d.ts.map +0 -1
  79. package/dist/copilot/orchestrator.js +0 -227
  80. package/dist/copilot/orchestrator.js.map +0 -1
  81. package/dist/copilot/tools.d.ts +0 -80
  82. package/dist/copilot/tools.d.ts.map +0 -1
  83. package/dist/copilot/tools.js +0 -1067
  84. package/dist/copilot/tools.js.map +0 -1
  85. package/dist/index.d.ts +0 -3
  86. package/dist/index.d.ts.map +0 -1
  87. package/dist/index.js +0 -94
  88. package/dist/index.js.map +0 -1
  89. package/dist/logging/logger.d.ts +0 -6
  90. package/dist/logging/logger.d.ts.map +0 -1
  91. package/dist/logging/logger.js +0 -33
  92. package/dist/logging/logger.js.map +0 -1
  93. package/dist/models/index.d.ts +0 -6
  94. package/dist/models/index.d.ts.map +0 -1
  95. package/dist/models/index.js +0 -4
  96. package/dist/models/index.js.map +0 -1
  97. package/dist/models/pricing.d.ts +0 -25
  98. package/dist/models/pricing.d.ts.map +0 -1
  99. package/dist/models/pricing.js +0 -96
  100. package/dist/models/pricing.js.map +0 -1
  101. package/dist/models/registry.d.ts +0 -34
  102. package/dist/models/registry.d.ts.map +0 -1
  103. package/dist/models/registry.js +0 -109
  104. package/dist/models/registry.js.map +0 -1
  105. package/dist/models/token-tracker.d.ts +0 -41
  106. package/dist/models/token-tracker.d.ts.map +0 -1
  107. package/dist/models/token-tracker.js +0 -103
  108. package/dist/models/token-tracker.js.map +0 -1
  109. package/dist/scheduler/engine.d.ts +0 -12
  110. package/dist/scheduler/engine.d.ts.map +0 -1
  111. package/dist/scheduler/engine.js +0 -128
  112. package/dist/scheduler/engine.js.map +0 -1
  113. package/dist/skills/discover.d.ts +0 -22
  114. package/dist/skills/discover.d.ts.map +0 -1
  115. package/dist/skills/discover.js +0 -228
  116. package/dist/skills/discover.js.map +0 -1
  117. package/dist/skills/index.d.ts +0 -5
  118. package/dist/skills/index.d.ts.map +0 -1
  119. package/dist/skills/index.js +0 -3
  120. package/dist/skills/index.js.map +0 -1
  121. package/dist/skills/store.d.ts +0 -56
  122. package/dist/skills/store.d.ts.map +0 -1
  123. package/dist/skills/store.js +0 -154
  124. package/dist/skills/store.js.map +0 -1
  125. package/dist/squad/agent.d.ts +0 -65
  126. package/dist/squad/agent.d.ts.map +0 -1
  127. package/dist/squad/agent.js +0 -544
  128. package/dist/squad/agent.js.map +0 -1
  129. package/dist/squad/autonomy.d.ts +0 -16
  130. package/dist/squad/autonomy.d.ts.map +0 -1
  131. package/dist/squad/autonomy.js +0 -63
  132. package/dist/squad/autonomy.js.map +0 -1
  133. package/dist/squad/event-bus.d.ts +0 -22
  134. package/dist/squad/event-bus.d.ts.map +0 -1
  135. package/dist/squad/event-bus.js +0 -56
  136. package/dist/squad/event-bus.js.map +0 -1
  137. package/dist/squad/execution/index.d.ts +0 -14
  138. package/dist/squad/execution/index.d.ts.map +0 -1
  139. package/dist/squad/execution/index.js +0 -8
  140. package/dist/squad/execution/index.js.map +0 -1
  141. package/dist/squad/execution/instance.d.ts +0 -45
  142. package/dist/squad/execution/instance.d.ts.map +0 -1
  143. package/dist/squad/execution/instance.js +0 -165
  144. package/dist/squad/execution/instance.js.map +0 -1
  145. package/dist/squad/execution/planning.d.ts +0 -20
  146. package/dist/squad/execution/planning.d.ts.map +0 -1
  147. package/dist/squad/execution/planning.js +0 -62
  148. package/dist/squad/execution/planning.js.map +0 -1
  149. package/dist/squad/execution/pr.d.ts +0 -15
  150. package/dist/squad/execution/pr.d.ts.map +0 -1
  151. package/dist/squad/execution/pr.js +0 -109
  152. package/dist/squad/execution/pr.js.map +0 -1
  153. package/dist/squad/execution/review.d.ts +0 -21
  154. package/dist/squad/execution/review.d.ts.map +0 -1
  155. package/dist/squad/execution/review.js +0 -157
  156. package/dist/squad/execution/review.js.map +0 -1
  157. package/dist/squad/execution/runner.d.ts +0 -52
  158. package/dist/squad/execution/runner.d.ts.map +0 -1
  159. package/dist/squad/execution/runner.js +0 -93
  160. package/dist/squad/execution/runner.js.map +0 -1
  161. package/dist/squad/execution/tasks.d.ts +0 -22
  162. package/dist/squad/execution/tasks.d.ts.map +0 -1
  163. package/dist/squad/execution/tasks.js +0 -111
  164. package/dist/squad/execution/tasks.js.map +0 -1
  165. package/dist/squad/execution/worktree.d.ts +0 -27
  166. package/dist/squad/execution/worktree.d.ts.map +0 -1
  167. package/dist/squad/execution/worktree.js +0 -141
  168. package/dist/squad/execution/worktree.js.map +0 -1
  169. package/dist/squad/hiring.d.ts +0 -57
  170. package/dist/squad/hiring.d.ts.map +0 -1
  171. package/dist/squad/hiring.js +0 -588
  172. package/dist/squad/hiring.js.map +0 -1
  173. package/dist/squad/index.d.ts +0 -8
  174. package/dist/squad/index.d.ts.map +0 -1
  175. package/dist/squad/index.js +0 -6
  176. package/dist/squad/index.js.map +0 -1
  177. package/dist/squad/manager.d.ts +0 -58
  178. package/dist/squad/manager.d.ts.map +0 -1
  179. package/dist/squad/manager.js +0 -351
  180. package/dist/squad/manager.js.map +0 -1
  181. package/dist/squad/model-selector.d.ts +0 -29
  182. package/dist/squad/model-selector.d.ts.map +0 -1
  183. package/dist/squad/model-selector.js +0 -64
  184. package/dist/squad/model-selector.js.map +0 -1
  185. package/dist/squad/name-generator.d.ts +0 -16
  186. package/dist/squad/name-generator.d.ts.map +0 -1
  187. package/dist/squad/name-generator.js +0 -111
  188. package/dist/squad/name-generator.js.map +0 -1
  189. package/dist/squad/roles/templates.d.ts +0 -7
  190. package/dist/squad/roles/templates.d.ts.map +0 -1
  191. package/dist/squad/roles/templates.js +0 -104
  192. package/dist/squad/roles/templates.js.map +0 -1
  193. package/dist/squad/skill-parser.d.ts +0 -36
  194. package/dist/squad/skill-parser.d.ts.map +0 -1
  195. package/dist/squad/skill-parser.js +0 -90
  196. package/dist/squad/skill-parser.js.map +0 -1
  197. package/dist/squad/source-resolver.d.ts +0 -20
  198. package/dist/squad/source-resolver.d.ts.map +0 -1
  199. package/dist/squad/source-resolver.js +0 -51
  200. package/dist/squad/source-resolver.js.map +0 -1
  201. package/dist/store/activity.d.ts +0 -51
  202. package/dist/store/activity.d.ts.map +0 -1
  203. package/dist/store/activity.js +0 -197
  204. package/dist/store/activity.js.map +0 -1
  205. package/dist/store/conversations.d.ts +0 -25
  206. package/dist/store/conversations.d.ts.map +0 -1
  207. package/dist/store/conversations.js +0 -76
  208. package/dist/store/conversations.js.map +0 -1
  209. package/dist/store/db.d.ts +0 -5
  210. package/dist/store/db.d.ts.map +0 -1
  211. package/dist/store/db.js +0 -290
  212. package/dist/store/db.js.map +0 -1
  213. package/dist/store/inbox.d.ts +0 -67
  214. package/dist/store/inbox.d.ts.map +0 -1
  215. package/dist/store/inbox.js +0 -192
  216. package/dist/store/inbox.js.map +0 -1
  217. package/dist/store/schedules.d.ts +0 -53
  218. package/dist/store/schedules.d.ts.map +0 -1
  219. package/dist/store/schedules.js +0 -160
  220. package/dist/store/schedules.js.map +0 -1
  221. package/dist/wiki/index.d.ts +0 -3
  222. package/dist/wiki/index.d.ts.map +0 -1
  223. package/dist/wiki/index.js +0 -2
  224. package/dist/wiki/index.js.map +0 -1
  225. package/dist/wiki/store.d.ts +0 -81
  226. package/dist/wiki/store.d.ts.map +0 -1
  227. package/dist/wiki/store.js +0 -270
  228. package/dist/wiki/store.js.map +0 -1
  229. package/node_modules/@io/shared/dist/config.d.ts +0 -26
  230. package/node_modules/@io/shared/dist/config.d.ts.map +0 -1
  231. package/node_modules/@io/shared/dist/config.js +0 -53
  232. package/node_modules/@io/shared/dist/config.js.map +0 -1
  233. package/node_modules/@io/shared/dist/constants.d.ts +0 -19
  234. package/node_modules/@io/shared/dist/constants.d.ts.map +0 -1
  235. package/node_modules/@io/shared/dist/constants.js +0 -51
  236. package/node_modules/@io/shared/dist/constants.js.map +0 -1
  237. package/node_modules/@io/shared/dist/index.d.ts +0 -12
  238. package/node_modules/@io/shared/dist/index.d.ts.map +0 -1
  239. package/node_modules/@io/shared/dist/index.js +0 -3
  240. package/node_modules/@io/shared/dist/index.js.map +0 -1
  241. package/node_modules/@io/shared/dist/types/agents.d.ts +0 -3
  242. package/node_modules/@io/shared/dist/types/agents.d.ts.map +0 -1
  243. package/node_modules/@io/shared/dist/types/agents.js +0 -2
  244. package/node_modules/@io/shared/dist/types/agents.js.map +0 -1
  245. package/node_modules/@io/shared/dist/types/api.d.ts +0 -33
  246. package/node_modules/@io/shared/dist/types/api.d.ts.map +0 -1
  247. package/node_modules/@io/shared/dist/types/api.js +0 -2
  248. package/node_modules/@io/shared/dist/types/api.js.map +0 -1
  249. package/node_modules/@io/shared/dist/types/attachments.d.ts +0 -10
  250. package/node_modules/@io/shared/dist/types/attachments.d.ts.map +0 -1
  251. package/node_modules/@io/shared/dist/types/attachments.js +0 -2
  252. package/node_modules/@io/shared/dist/types/attachments.js.map +0 -1
  253. package/node_modules/@io/shared/dist/types/events.d.ts +0 -44
  254. package/node_modules/@io/shared/dist/types/events.d.ts.map +0 -1
  255. package/node_modules/@io/shared/dist/types/events.js +0 -2
  256. package/node_modules/@io/shared/dist/types/events.js.map +0 -1
  257. package/node_modules/@io/shared/dist/types/history.d.ts +0 -33
  258. package/node_modules/@io/shared/dist/types/history.d.ts.map +0 -1
  259. package/node_modules/@io/shared/dist/types/history.js +0 -2
  260. package/node_modules/@io/shared/dist/types/history.js.map +0 -1
  261. package/node_modules/@io/shared/dist/types/messages.d.ts +0 -15
  262. package/node_modules/@io/shared/dist/types/messages.d.ts.map +0 -1
  263. package/node_modules/@io/shared/dist/types/messages.js +0 -2
  264. package/node_modules/@io/shared/dist/types/messages.js.map +0 -1
  265. package/node_modules/@io/shared/dist/types/squads.d.ts +0 -46
  266. package/node_modules/@io/shared/dist/types/squads.d.ts.map +0 -1
  267. package/node_modules/@io/shared/dist/types/squads.js +0 -2
  268. package/node_modules/@io/shared/dist/types/squads.js.map +0 -1
  269. package/node_modules/@io/shared/dist/types/tokens.d.ts +0 -19
  270. package/node_modules/@io/shared/dist/types/tokens.d.ts.map +0 -1
  271. package/node_modules/@io/shared/dist/types/tokens.js +0 -2
  272. package/node_modules/@io/shared/dist/types/tokens.js.map +0 -1
  273. package/node_modules/@io/shared/package.json +0 -18
  274. package/node_modules/@io/shared/src/config.ts +0 -85
  275. package/node_modules/@io/shared/src/constants.ts +0 -54
  276. package/node_modules/@io/shared/src/index.ts +0 -46
  277. package/node_modules/@io/shared/src/types/agents.ts +0 -3
  278. package/node_modules/@io/shared/src/types/api.ts +0 -35
  279. package/node_modules/@io/shared/src/types/attachments.ts +0 -9
  280. package/node_modules/@io/shared/src/types/events.ts +0 -86
  281. package/node_modules/@io/shared/src/types/history.ts +0 -37
  282. package/node_modules/@io/shared/src/types/messages.ts +0 -15
  283. package/node_modules/@io/shared/src/types/squads.ts +0 -56
  284. package/node_modules/@io/shared/src/types/tokens.ts +0 -19
  285. package/node_modules/@io/shared/tsconfig.json +0 -9
  286. package/node_modules/@io/shared/tsconfig.tsbuildinfo +0 -1
  287. package/public/assets/index-CoSJG-14.js +0 -510
  288. package/public/assets/index-CoSJG-14.js.map +0 -1
  289. /package/{public → dist/web}/assets/index-B6F0UZkW.css +0 -0
@@ -1,111 +0,0 @@
1
- import { getClient } from '../copilot/client.js';
2
- import { createChildLogger } from '../logging/logger.js';
3
- const logger = () => createChildLogger('name-generator');
4
- const NAME_GENERATION_PROMPT = `You are a creative casting director. Your job is to assign pop-culture character names and personalities to a team of senior AI engineering agents.
5
-
6
- Rules:
7
- - Each character must be UNIQUE within the team
8
- - Match character personalities to the role's nature:
9
- - A methodical, detail-obsessed character for QA/testing roles
10
- - A creative, fast-moving character for frontend/UI roles
11
- - A wise, strategic character for the Technical PM
12
- - A steady, reliable character for backend/infrastructure roles
13
- - A curious, analytical character for data/AI roles
14
- - The persona must be 2-3 sentences describing how this character communicates — their tone, quirks, catchphrases, and communication style. These personas will be used as system prompts for AI agents, so make them vivid and actionable.
15
- - Characters should match the SENIORITY of the roles (these are senior/principal engineers, not juniors)
16
- - Return ONLY valid JSON, no markdown fencing
17
-
18
- Respond with this exact JSON structure:
19
- {
20
- "universe": "<the universe name>",
21
- "assignments": [
22
- { "role": "<exact role title as given>", "displayName": "<character name>", "persona": "<2-3 sentence persona description>" }
23
- ]
24
- }`;
25
- /**
26
- * Generate character names and persona blurbs for squad members using the LLM.
27
- * If a universe is provided, names come from that universe.
28
- * If not, the LLM picks a fun universe on its own.
29
- */
30
- export async function generateSquadNames(roles, universe) {
31
- const log = logger();
32
- const roleList = roles.map((r) => `- ${r}`).join('\n');
33
- const userPrompt = universe
34
- ? `Assign character names from the "${universe}" universe to these senior engineering team roles:\n${roleList}\n\nPick characters whose personalities genuinely match each role's responsibilities. Explain in the persona how that character's traits manifest in technical communication.`
35
- : `Pick a fun pop-culture universe and assign character names to these senior engineering team roles:\n${roleList}\n\nPick characters whose personalities genuinely match each role's responsibilities. Explain in the persona how that character's traits manifest in technical communication.`;
36
- try {
37
- const client = await getClient();
38
- const session = await client.createSession({
39
- systemMessage: { mode: 'replace', content: NAME_GENERATION_PROMPT },
40
- });
41
- const response = await session.sendAndWait({ prompt: userPrompt }, 60_000);
42
- const accumulated = response?.data?.content ?? '';
43
- // Parse the JSON response
44
- const parsed = extractJson(accumulated);
45
- if (!parsed || !parsed.universe || !Array.isArray(parsed.assignments)) {
46
- throw new Error('Invalid response structure from LLM');
47
- }
48
- // Validate all roles are covered
49
- const result = {
50
- universe: parsed.universe,
51
- assignments: [],
52
- };
53
- for (const role of roles) {
54
- const match = parsed.assignments.find((a) => a.role?.toLowerCase() === role.toLowerCase());
55
- if (match) {
56
- result.assignments.push({
57
- role,
58
- displayName: match.displayName || match.display_name || role,
59
- persona: match.persona || '',
60
- });
61
- }
62
- else {
63
- // Role wasn't in LLM response — use role name as fallback
64
- result.assignments.push({ role, displayName: role, persona: '' });
65
- }
66
- }
67
- log.info({ universe: result.universe, count: result.assignments.length }, 'Names generated');
68
- return result;
69
- }
70
- catch (err) {
71
- log.error({ err, roles, universe }, 'Failed to generate names, falling back to role names');
72
- return fallback(roles, universe);
73
- }
74
- }
75
- /** Fallback: use role names as display names with no persona */
76
- function fallback(roles, universe) {
77
- return {
78
- universe: universe ?? 'none',
79
- assignments: roles.map((role) => ({ role, displayName: role, persona: '' })),
80
- };
81
- }
82
- /** Extract JSON from LLM response (handles possible markdown fencing) */
83
- function extractJson(text) {
84
- try {
85
- return JSON.parse(text.trim());
86
- }
87
- catch {
88
- // Try extracting from markdown code fence
89
- const match = text.match(/```(?:json)?\s*\n?([\s\S]*?)\n?```/);
90
- if (match) {
91
- try {
92
- return JSON.parse(match[1].trim());
93
- }
94
- catch {
95
- return null;
96
- }
97
- }
98
- // Try finding JSON object in text
99
- const braceMatch = text.match(/\{[\s\S]*\}/);
100
- if (braceMatch) {
101
- try {
102
- return JSON.parse(braceMatch[0]);
103
- }
104
- catch {
105
- return null;
106
- }
107
- }
108
- return null;
109
- }
110
- }
111
- //# sourceMappingURL=name-generator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"name-generator.js","sourceRoot":"","sources":["../../src/squad/name-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;AAazD,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;EAoB7B,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACvC,KAAe,EACf,QAAiB;IAEjB,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IAErB,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvD,MAAM,UAAU,GAAG,QAAQ;QAC1B,CAAC,CAAC,oCAAoC,QAAQ,uDAAuD,QAAQ,+KAA+K;QAC5R,CAAC,CAAC,uGAAuG,QAAQ,+KAA+K,CAAC;IAElS,IAAI,CAAC;QACJ,MAAM,MAAM,GAAG,MAAM,SAAS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IAAI,CAAC;YACb,CAAC;QACF,CAAC;QACD,kCAAkC;QAClC,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAC7C,IAAI,UAAU,EAAE,CAAC;YAChB,IAAI,CAAC;gBACJ,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YAClC,CAAC;YAAC,MAAM,CAAC;gBACR,OAAO,IAAI,CAAC;YACb,CAAC;QACF,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC;AACF,CAAC"}
@@ -1,7 +0,0 @@
1
- /** Built-in SKILL.md templates for core squad roles */
2
- export declare const TECHNICAL_PM_SKILL = "---\nrole: technical-pm\ntools:\n - read_file\n - search_code\nveto: true\n---\n\n# Technical PM\n\n## Identity\nYou are the Technical PM \u2014 a principal-level engineering leader who understands architecture deeply and coordinates the team. You are NOT a generic manager \u2014 you read code, understand system design, and make informed technical calls.\n\n## Responsibilities\n- Analyze incoming tasks, assess architectural impact, and break them into actionable work items\n- Assign tasks to the appropriate specialist agents based on their strengths\n- Coordinate round-table meetings for complex decisions\n- Review completed work for architectural consistency before it becomes a PR\n- Maintain project direction, technical standards, and system integrity\n- Report progress and blockers back to the orchestrator\n- Make scope and priority calls when requirements are ambiguous\n\n## Boundaries\n- You do NOT write or edit code directly\n- You do NOT run commands\n- You delegate all implementation work to specialists\n- You focus on planning, coordination, architecture, and quality assurance\n\n## Communication Style\n- Be concise and structured in task descriptions\n- Include acceptance criteria for every task\n- Reference relevant files, code patterns, and architectural decisions when assigning work\n- Speak with authority on technical trade-offs \u2014 you understand the codebase\n";
3
- /** @deprecated Use TECHNICAL_PM_SKILL instead */
4
- export declare const TEAM_LEAD_SKILL = "---\nrole: technical-pm\ntools:\n - read_file\n - search_code\nveto: true\n---\n\n# Technical PM\n\n## Identity\nYou are the Technical PM \u2014 a principal-level engineering leader who understands architecture deeply and coordinates the team. You are NOT a generic manager \u2014 you read code, understand system design, and make informed technical calls.\n\n## Responsibilities\n- Analyze incoming tasks, assess architectural impact, and break them into actionable work items\n- Assign tasks to the appropriate specialist agents based on their strengths\n- Coordinate round-table meetings for complex decisions\n- Review completed work for architectural consistency before it becomes a PR\n- Maintain project direction, technical standards, and system integrity\n- Report progress and blockers back to the orchestrator\n- Make scope and priority calls when requirements are ambiguous\n\n## Boundaries\n- You do NOT write or edit code directly\n- You do NOT run commands\n- You delegate all implementation work to specialists\n- You focus on planning, coordination, architecture, and quality assurance\n\n## Communication Style\n- Be concise and structured in task descriptions\n- Include acceptance criteria for every task\n- Reference relevant files, code patterns, and architectural decisions when assigning work\n- Speak with authority on technical trade-offs \u2014 you understand the codebase\n";
5
- export declare const SCRIBE_SKILL = "---\nrole: scribe\ntools: []\nveto: false\n---\n\n# Scribe\n\n## Identity\nYou are the Scribe \u2014 a silent observer who records decisions and important knowledge to the wiki.\n\n## Responsibilities\n- Record key decisions made during meetings with rationale (use write_wiki)\n- Maintain a decisions log that all team members can reference\n- Document architectural choices and trade-offs in the wiki\n\n## Boundaries\n- You NEVER speak in meetings or give opinions \u2014 you only observe and record\n- You NEVER modify source code, test files, or any non-wiki content\n- You NEVER create commits, branches, or pull requests\n- You NEVER get assigned work tasks \u2014 you are not a worker\n- You ONLY use read_wiki and write_wiki tools\n- You are activated ONLY when there is something important to record in the wiki\n\n## Output Format\nWiki entries should follow this format:\n- **Decision**: What was decided\n- **Context**: Why this was needed\n- **Rationale**: Why this option was chosen over alternatives\n- **Consequences**: What this means going forward\n";
6
- export declare const QA_TESTER_SKILL = "---\nrole: qa-tester\ntools:\n - read_file\n - edit_file\n - run_command\n - search_code\nveto: true\n---\n\n# QA / Test Engineer\n\n## Identity\nYou are the QA/Test Engineer \u2014 the quality gate for all code changes.\n\n## Responsibilities\n- Write comprehensive tests for new features (unit, integration)\n- Run existing test suites and report failures\n- Review code for edge cases, error handling, and security issues\n- Verify changes don't break existing functionality\n- Block merges that don't meet quality standards\n\n## Boundaries\n- You focus on test code, not feature implementation\n- You veto changes that reduce test coverage or break tests\n- You report issues clearly with reproduction steps\n- You suggest fixes but don't implement production features\n\n## Quality Standards\n- All new code must have corresponding tests\n- No PR should reduce overall test coverage\n- All tests must pass before approval\n- Edge cases (empty inputs, null values, errors) must be covered\n- Async code must have timeout and error handling tests\n";
7
- //# sourceMappingURL=templates.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/squad/roles/templates.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAEvD,eAAO,MAAM,kBAAkB,g4CAiC9B,CAAC;AAEF,iDAAiD;AACjD,eAAO,MAAM,eAAe,g4CAAqB,CAAC;AAElD,eAAO,MAAM,YAAY,ijCA8BxB,CAAC;AAEF,eAAO,MAAM,eAAe,qiCAkC3B,CAAC"}
@@ -1,104 +0,0 @@
1
- /** Built-in SKILL.md templates for core squad roles */
2
- export const TECHNICAL_PM_SKILL = `---
3
- role: technical-pm
4
- tools:
5
- - read_file
6
- - search_code
7
- veto: true
8
- ---
9
-
10
- # Technical PM
11
-
12
- ## Identity
13
- You are the Technical PM — a principal-level engineering leader who understands architecture deeply and coordinates the team. You are NOT a generic manager — you read code, understand system design, and make informed technical calls.
14
-
15
- ## Responsibilities
16
- - Analyze incoming tasks, assess architectural impact, and break them into actionable work items
17
- - Assign tasks to the appropriate specialist agents based on their strengths
18
- - Coordinate round-table meetings for complex decisions
19
- - Review completed work for architectural consistency before it becomes a PR
20
- - Maintain project direction, technical standards, and system integrity
21
- - Report progress and blockers back to the orchestrator
22
- - Make scope and priority calls when requirements are ambiguous
23
-
24
- ## Boundaries
25
- - You do NOT write or edit code directly
26
- - You do NOT run commands
27
- - You delegate all implementation work to specialists
28
- - You focus on planning, coordination, architecture, and quality assurance
29
-
30
- ## Communication Style
31
- - Be concise and structured in task descriptions
32
- - Include acceptance criteria for every task
33
- - Reference relevant files, code patterns, and architectural decisions when assigning work
34
- - Speak with authority on technical trade-offs — you understand the codebase
35
- `;
36
- /** @deprecated Use TECHNICAL_PM_SKILL instead */
37
- export const TEAM_LEAD_SKILL = TECHNICAL_PM_SKILL;
38
- export const SCRIBE_SKILL = `---
39
- role: scribe
40
- tools: []
41
- veto: false
42
- ---
43
-
44
- # Scribe
45
-
46
- ## Identity
47
- You are the Scribe — a silent observer who records decisions and important knowledge to the wiki.
48
-
49
- ## Responsibilities
50
- - Record key decisions made during meetings with rationale (use write_wiki)
51
- - Maintain a decisions log that all team members can reference
52
- - Document architectural choices and trade-offs in the wiki
53
-
54
- ## Boundaries
55
- - You NEVER speak in meetings or give opinions — you only observe and record
56
- - You NEVER modify source code, test files, or any non-wiki content
57
- - You NEVER create commits, branches, or pull requests
58
- - You NEVER get assigned work tasks — you are not a worker
59
- - You ONLY use read_wiki and write_wiki tools
60
- - You are activated ONLY when there is something important to record in the wiki
61
-
62
- ## Output Format
63
- Wiki entries should follow this format:
64
- - **Decision**: What was decided
65
- - **Context**: Why this was needed
66
- - **Rationale**: Why this option was chosen over alternatives
67
- - **Consequences**: What this means going forward
68
- `;
69
- export const QA_TESTER_SKILL = `---
70
- role: qa-tester
71
- tools:
72
- - read_file
73
- - edit_file
74
- - run_command
75
- - search_code
76
- veto: true
77
- ---
78
-
79
- # QA / Test Engineer
80
-
81
- ## Identity
82
- You are the QA/Test Engineer — the quality gate for all code changes.
83
-
84
- ## Responsibilities
85
- - Write comprehensive tests for new features (unit, integration)
86
- - Run existing test suites and report failures
87
- - Review code for edge cases, error handling, and security issues
88
- - Verify changes don't break existing functionality
89
- - Block merges that don't meet quality standards
90
-
91
- ## Boundaries
92
- - You focus on test code, not feature implementation
93
- - You veto changes that reduce test coverage or break tests
94
- - You report issues clearly with reproduction steps
95
- - You suggest fixes but don't implement production features
96
-
97
- ## Quality Standards
98
- - All new code must have corresponding tests
99
- - No PR should reduce overall test coverage
100
- - All tests must pass before approval
101
- - Edge cases (empty inputs, null values, errors) must be covered
102
- - Async code must have timeout and error handling tests
103
- `;
104
- //# sourceMappingURL=templates.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../src/squad/roles/templates.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAEvD,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCjC,CAAC;AAEF,iDAAiD;AACjD,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B3B,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC9B,CAAC"}
@@ -1,36 +0,0 @@
1
- export interface SkillDefinition {
2
- role: string;
3
- tools: string[];
4
- veto: boolean;
5
- systemPrompt: string;
6
- rawMarkdown: string;
7
- filePath: string;
8
- }
9
- /**
10
- * Parse a SKILL.md file into a structured SkillDefinition.
11
- * Format:
12
- * ---
13
- * role: react-developer
14
- * tools:
15
- * - edit_file
16
- * - read_file
17
- * veto: false
18
- * ---
19
- * # Role Name
20
- * System prompt markdown content...
21
- */
22
- export declare function parseSkillFile(filePath: string): SkillDefinition;
23
- /**
24
- * Parse SKILL.md content string into a SkillDefinition.
25
- */
26
- export declare function parseSkillContent(content: string, filePath?: string): SkillDefinition;
27
- /**
28
- * Compile a SkillDefinition into a full system message string for the LLM.
29
- * Injects role identity, boundaries, and tool context.
30
- */
31
- export declare function compileSystemPrompt(skill: SkillDefinition, squadContext?: string, squadName?: string, squadId?: string, identity?: {
32
- displayName: string;
33
- persona?: string;
34
- universe?: string;
35
- }): Promise<string>;
36
- //# sourceMappingURL=skill-parser.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skill-parser.d.ts","sourceRoot":"","sources":["../../src/squad/skill-parser.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAQD;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,CAOhE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,SAAa,GAAG,eAAe,CAgBzF;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACxC,KAAK,EAAE,eAAe,EACtB,YAAY,CAAC,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GACrE,OAAO,CAAC,MAAM,CAAC,CAsDjB"}
@@ -1,90 +0,0 @@
1
- import { existsSync, readFileSync } from 'node:fs';
2
- import matter from 'gray-matter';
3
- import { getActiveSkillsContent } from '../skills/index.js';
4
- import { getPageListing, getSquadScopes, readSquadRules } from '../wiki/index.js';
5
- /**
6
- * Parse a SKILL.md file into a structured SkillDefinition.
7
- * Format:
8
- * ---
9
- * role: react-developer
10
- * tools:
11
- * - edit_file
12
- * - read_file
13
- * veto: false
14
- * ---
15
- * # Role Name
16
- * System prompt markdown content...
17
- */
18
- export function parseSkillFile(filePath) {
19
- if (!existsSync(filePath)) {
20
- throw new Error(`SKILL.md not found: ${filePath}`);
21
- }
22
- const raw = readFileSync(filePath, 'utf-8');
23
- return parseSkillContent(raw, filePath);
24
- }
25
- /**
26
- * Parse SKILL.md content string into a SkillDefinition.
27
- */
28
- export function parseSkillContent(content, filePath = '<inline>') {
29
- const { data, content: body } = matter(content);
30
- const frontmatter = data;
31
- if (!frontmatter.role) {
32
- throw new Error(`SKILL.md missing required 'role' in frontmatter: ${filePath}`);
33
- }
34
- return {
35
- role: frontmatter.role,
36
- tools: frontmatter.tools ?? [],
37
- veto: frontmatter.veto ?? false,
38
- systemPrompt: body.trim(),
39
- rawMarkdown: content,
40
- filePath,
41
- };
42
- }
43
- /**
44
- * Compile a SkillDefinition into a full system message string for the LLM.
45
- * Injects role identity, boundaries, and tool context.
46
- */
47
- export async function compileSystemPrompt(skill, squadContext, squadName, squadId, identity) {
48
- const parts = [];
49
- if (identity?.displayName && identity.displayName !== skill.role) {
50
- const intro = `You are ${identity.displayName}${identity.universe ? ` from ${identity.universe}` : ''}, the ${skill.role} agent in an IO squad.`;
51
- parts.push(intro);
52
- if (identity.persona) {
53
- parts.push(identity.persona);
54
- }
55
- }
56
- else {
57
- parts.push(`You are the ${skill.role} agent in an IO squad.`);
58
- }
59
- if (squadContext) {
60
- parts.push(`\n## Squad Context\n${squadContext}`);
61
- }
62
- parts.push(`\n## Your Role\n${skill.systemPrompt}`);
63
- if (skill.tools.length > 0) {
64
- parts.push(`\n## Allowed Tools\nYou may ONLY use: ${skill.tools.join(', ')}`);
65
- }
66
- if (skill.veto) {
67
- parts.push('\n## Veto Power\nYou have veto power in meetings. Use it when you identify critical issues.');
68
- }
69
- // Inject squad rules from _rules.md (hard requirements for agents)
70
- if (squadName) {
71
- const rules = readSquadRules(squadName);
72
- if (rules) {
73
- parts.push(`\n## Rules\nThe following rules MUST be followed at all times:\n\n${rules}`);
74
- }
75
- }
76
- // Inject wiki page listing so agents know what knowledge is available
77
- if (squadName) {
78
- const wikiListing = getPageListing(getSquadScopes(squadName));
79
- parts.push(`\n## Wiki Knowledge\n${wikiListing}\n\nUse read_wiki to access page content. Use write_wiki to record important project knowledge.`);
80
- }
81
- // Inject active skills for this squad
82
- if (squadId) {
83
- const skillsContent = await getActiveSkillsContent('squad', squadId);
84
- if (skillsContent) {
85
- parts.push(skillsContent);
86
- }
87
- }
88
- return parts.join('\n');
89
- }
90
- //# sourceMappingURL=skill-parser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skill-parser.js","sourceRoot":"","sources":["../../src/squad/skill-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiBlF;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,cAAc,CAAC,QAAgB;IAC9C,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,uBAAuB,QAAQ,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,GAAG,GAAG,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC5C,OAAO,iBAAiB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe,EAAE,QAAQ,GAAG,UAAU;IACvE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAChD,MAAM,WAAW,GAAG,IAAwB,CAAC;IAE7C,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,oDAAoD,QAAQ,EAAE,CAAC,CAAC;IACjF,CAAC;IAED,OAAO;QACN,IAAI,EAAE,WAAW,CAAC,IAAI;QACtB,KAAK,EAAE,WAAW,CAAC,KAAK,IAAI,EAAE;QAC9B,IAAI,EAAE,WAAW,CAAC,IAAI,IAAI,KAAK;QAC/B,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE;QACzB,WAAW,EAAE,OA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ACnE,IAAI,SAAS,EAAE,CAAC;QACf,MAAM,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;QACxC,IAAI,KAAK,EAAE,CAAC;YACX,KAAK,CAAC,IAAI,CAAC,qEAAqE,KAAK,EAAE,CAAC,CAAC;QAC1F,CAAC;IACF,CAAC;IAED,sEAAsE;IACtE,IAAI,SAAS,EAAE,CAAC;QACf,MAAM,WAAW,GAAG,cAAc,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC;QAC9D,KAAK,CAAC,IAAI,CACT,wBAAwB,WAAW,iGAAiG,CACpI,CAAC;IACH,CAAC;IAED,sCAAsC;IACtC,IAAI,OAAO,EAAE,CAAC;QACb,MAAM,aAAa,GAAG,MAAM,sBAAsB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACrE,IAAI,aAAa,EAAE,CAAC;YACnB,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,CAAC;IACF,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC"}
@@ -1,20 +0,0 @@
1
- /**
2
- * Parse a GitHub URL into owner/repo parts.
3
- * Supports https://github.com/owner/repo and https://github.com/owner/repo.git
4
- */
5
- export declare function parseGitHubUrl(url: string): {
6
- owner: string;
7
- repo: string;
8
- } | null;
9
- /**
10
- * Get the local source directory for a given GitHub repo URL.
11
- * Convention: ~/.io/source/{owner}/{repo}
12
- */
13
- export declare function getSourcePath(repoUrl: string): string | null;
14
- /**
15
- * Ensure a repo is cloned locally. If the directory already exists and contains
16
- * a .git folder, it is assumed valid and left alone. Otherwise, it clones the repo.
17
- * Returns the absolute path to the local clone.
18
- */
19
- export declare function ensureCloned(repoUrl: string): Promise<string>;
20
- //# sourceMappingURL=source-resolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"source-resolver.d.ts","sourceRoot":"","sources":["../../src/squad/source-resolver.ts"],"names":[],"mappings":"AAUA;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAIlF;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK5D;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAmBnE"}
@@ -1,51 +0,0 @@
1
- import { exec as execCb } from 'node:child_process';
2
- import { existsSync, mkdirSync } from 'node:fs';
3
- import { join } from 'node:path';
4
- import { promisify } from 'node:util';
5
- import { loadConfig } from '@io/shared';
6
- import { createChildLogger } from '../logging/logger.js';
7
- const exec = promisify(execCb);
8
- const logger = () => createChildLogger('source-resolver');
9
- /**
10
- * Parse a GitHub URL into owner/repo parts.
11
- * Supports https://github.com/owner/repo and https://github.com/owner/repo.git
12
- */
13
- export function parseGitHubUrl(url) {
14
- const match = url.match(/github\.com\/([^/]+)\/([^/.]+)/);
15
- if (!match)
16
- return null;
17
- return { owner: match[1], repo: match[2] };
18
- }
19
- /**
20
- * Get the local source directory for a given GitHub repo URL.
21
- * Convention: ~/.io/source/{owner}/{repo}
22
- */
23
- export function getSourcePath(repoUrl) {
24
- const parsed = parseGitHubUrl(repoUrl);
25
- if (!parsed)
26
- return null;
27
- const config = loadConfig();
28
- return join(config.dataDir, 'source', parsed.owner, parsed.repo);
29
- }
30
- /**
31
- * Ensure a repo is cloned locally. If the directory already exists and contains
32
- * a .git folder, it is assumed valid and left alone. Otherwise, it clones the repo.
33
- * Returns the absolute path to the local clone.
34
- */
35
- export async function ensureCloned(repoUrl) {
36
- const log = logger();
37
- const sourcePath = getSourcePath(repoUrl);
38
- if (!sourcePath) {
39
- throw new Error(`Cannot parse GitHub URL: ${repoUrl}`);
40
- }
41
- if (existsSync(join(sourcePath, '.git'))) {
42
- log.debug({ sourcePath }, 'Repo already cloned');
43
- return sourcePath;
44
- }
45
- log.info({ repoUrl, sourcePath }, 'Cloning repository');
46
- mkdirSync(sourcePath, { recursive: true });
47
- await exec(`git clone "${repoUrl}" "${sourcePath}"`, { timeout: 120_000 });
48
- log.info({ sourcePath }, 'Clone complete');
49
- return sourcePath;
50
- }
51
- //# sourceMappingURL=source-resolver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"source-resolver.js","sourceRoot":"","sources":["../../src/squad/source-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,IAAI,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;AAC/B,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;AAE1D;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,GAAW;IACzC,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;IAC1D,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAC5C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC5C,MAAM,MAAM,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IACvC,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACzB,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;IAC5B,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;AAClE,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAAe;IACjD,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IAC1C,IAAI,CAAC,UAAU,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,4BAA4B,OAAO,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,IAAI,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;QAC1C,GAAG,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,EAAE,qBAAqB,CAAC,CAAC;QACjD,OAAO,UAAU,CAAC;IACnB,CAAC;IAED,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,oBAAoB,CAAC,CAAC;IACxD,SAAS,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE3C,MAAM,IAAI,CAAC,cAAc,OAAO,MAAM,UAAU,GAAG,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IAE3E,GAAG,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,EAAE,gBAAgB,CAAC,CAAC;IAC3C,OAAO,UAAU,CAAC;AACnB,CAAC"}
@@ -1,51 +0,0 @@
1
- import type { IOEvent, WorkEventKind } from '@io/shared';
2
- export type ActivityType = 'thought' | 'tool_call' | 'tool_result' | 'message' | 'decision' | 'meeting_contribution' | 'task_start' | 'task_complete' | 'error';
3
- export interface ActivityEntry {
4
- id: number;
5
- squadId: string | null;
6
- instanceId: string | null;
7
- agentRole: string;
8
- activityType: ActivityType;
9
- modelUsed: string | null;
10
- content: string | null;
11
- tokensUsed: number | null;
12
- label: string | null;
13
- status: 'ok' | 'error' | null;
14
- timestamp: string;
15
- }
16
- /**
17
- * Log an activity to the agent_activity table.
18
- */
19
- export declare function logActivity(entry: {
20
- squadId?: string;
21
- instanceId?: string;
22
- agentRole: string;
23
- activityType: ActivityType;
24
- modelUsed?: string;
25
- content?: unknown;
26
- tokensUsed?: number;
27
- label?: string;
28
- status?: 'ok' | 'error';
29
- }): Promise<void>;
30
- /**
31
- * Query activity entries with optional filters.
32
- */
33
- export declare function queryActivity(filters: {
34
- squadId?: string;
35
- instanceId?: string;
36
- agentRole?: string;
37
- activityType?: ActivityType;
38
- limit?: number;
39
- offset?: number;
40
- }): Promise<ActivityEntry[]>;
41
- /**
42
- * Subscribe to the event bus and auto-log relevant events.
43
- */
44
- export declare function initActivityLogger(eventBus: {
45
- onAny: (handler: (event: IOEvent) => void) => () => void;
46
- }): () => void;
47
- /**
48
- * Map legacy ActivityType values to WorkEventKind for the history API.
49
- */
50
- export declare function activityTypeToEventKind(activityType: ActivityType): WorkEventKind;
51
- //# sourceMappingURL=activity.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../src/store/activity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAMzD,MAAM,MAAM,YAAY,GACrB,SAAS,GACT,WAAW,GACX,aAAa,GACb,SAAS,GACT,UAAU,GAEV,sBAAsB,GACtB,YAAY,GACZ,eAAe,GACf,OAAO,CAAC;AAEX,MAAM,WAAW,aAAa;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,YAAY,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,C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