@chief-clancy/terminal 0.1.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 (217) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +62 -0
  3. package/dist/hooks/clancy-branch-guard.js +1 -0
  4. package/dist/hooks/clancy-check-update.js +2 -0
  5. package/dist/hooks/clancy-context-monitor.js +9 -0
  6. package/dist/hooks/clancy-credential-guard.js +2 -0
  7. package/dist/hooks/clancy-drift-detector.js +1 -0
  8. package/dist/hooks/clancy-notification.js +1 -0
  9. package/dist/hooks/clancy-post-compact.js +2 -0
  10. package/dist/hooks/clancy-statusline.js +1 -0
  11. package/dist/index.d.ts +24 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +23 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/installer/file-ops/file-ops.d.ts +35 -0
  16. package/dist/installer/file-ops/file-ops.d.ts.map +1 -0
  17. package/dist/installer/file-ops/file-ops.js +95 -0
  18. package/dist/installer/file-ops/file-ops.js.map +1 -0
  19. package/dist/installer/file-ops/index.d.ts +2 -0
  20. package/dist/installer/file-ops/index.d.ts.map +1 -0
  21. package/dist/installer/file-ops/index.js +2 -0
  22. package/dist/installer/file-ops/index.js.map +1 -0
  23. package/dist/installer/hook-installer/hook-installer.d.ts +22 -0
  24. package/dist/installer/hook-installer/hook-installer.d.ts.map +1 -0
  25. package/dist/installer/hook-installer/hook-installer.js +213 -0
  26. package/dist/installer/hook-installer/hook-installer.js.map +1 -0
  27. package/dist/installer/hook-installer/index.d.ts +2 -0
  28. package/dist/installer/hook-installer/index.d.ts.map +1 -0
  29. package/dist/installer/hook-installer/index.js +2 -0
  30. package/dist/installer/hook-installer/index.js.map +1 -0
  31. package/dist/installer/install/index.d.ts +3 -0
  32. package/dist/installer/install/index.d.ts.map +1 -0
  33. package/dist/installer/install/index.js +2 -0
  34. package/dist/installer/install/index.js.map +1 -0
  35. package/dist/installer/install/install.d.ts +124 -0
  36. package/dist/installer/install/install.d.ts.map +1 -0
  37. package/dist/installer/install/install.js +255 -0
  38. package/dist/installer/install/install.js.map +1 -0
  39. package/dist/installer/manifest/index.d.ts +2 -0
  40. package/dist/installer/manifest/index.d.ts.map +1 -0
  41. package/dist/installer/manifest/index.js +2 -0
  42. package/dist/installer/manifest/index.js.map +1 -0
  43. package/dist/installer/manifest/manifest.d.ts +46 -0
  44. package/dist/installer/manifest/manifest.d.ts.map +1 -0
  45. package/dist/installer/manifest/manifest.js +180 -0
  46. package/dist/installer/manifest/manifest.js.map +1 -0
  47. package/dist/installer/prompts/index.d.ts +2 -0
  48. package/dist/installer/prompts/index.d.ts.map +1 -0
  49. package/dist/installer/prompts/index.js +2 -0
  50. package/dist/installer/prompts/index.js.map +1 -0
  51. package/dist/installer/prompts/prompts.d.ts +34 -0
  52. package/dist/installer/prompts/prompts.d.ts.map +1 -0
  53. package/dist/installer/prompts/prompts.js +28 -0
  54. package/dist/installer/prompts/prompts.js.map +1 -0
  55. package/dist/installer/role-filter/index.d.ts +2 -0
  56. package/dist/installer/role-filter/index.d.ts.map +1 -0
  57. package/dist/installer/role-filter/index.js +2 -0
  58. package/dist/installer/role-filter/index.js.map +1 -0
  59. package/dist/installer/role-filter/role-filter.d.ts +33 -0
  60. package/dist/installer/role-filter/role-filter.d.ts.map +1 -0
  61. package/dist/installer/role-filter/role-filter.js +91 -0
  62. package/dist/installer/role-filter/role-filter.js.map +1 -0
  63. package/dist/installer/shared/fs-errors/fs-errors.d.ts +3 -0
  64. package/dist/installer/shared/fs-errors/fs-errors.d.ts.map +1 -0
  65. package/dist/installer/shared/fs-errors/fs-errors.js +7 -0
  66. package/dist/installer/shared/fs-errors/fs-errors.js.map +1 -0
  67. package/dist/installer/shared/fs-errors/index.d.ts +2 -0
  68. package/dist/installer/shared/fs-errors/index.d.ts.map +1 -0
  69. package/dist/installer/shared/fs-errors/index.js +2 -0
  70. package/dist/installer/shared/fs-errors/index.js.map +1 -0
  71. package/dist/installer/shared/fs-guards/fs-guards.d.ts +3 -0
  72. package/dist/installer/shared/fs-guards/fs-guards.d.ts.map +1 -0
  73. package/dist/installer/shared/fs-guards/fs-guards.js +18 -0
  74. package/dist/installer/shared/fs-guards/fs-guards.js.map +1 -0
  75. package/dist/installer/shared/fs-guards/index.d.ts +2 -0
  76. package/dist/installer/shared/fs-guards/index.d.ts.map +1 -0
  77. package/dist/installer/shared/fs-guards/index.js +2 -0
  78. package/dist/installer/shared/fs-guards/index.js.map +1 -0
  79. package/dist/installer/shared/type-guards/index.d.ts +2 -0
  80. package/dist/installer/shared/type-guards/index.d.ts.map +1 -0
  81. package/dist/installer/shared/type-guards/index.js +2 -0
  82. package/dist/installer/shared/type-guards/index.js.map +1 -0
  83. package/dist/installer/shared/type-guards/type-guards.d.ts +8 -0
  84. package/dist/installer/shared/type-guards/type-guards.d.ts.map +1 -0
  85. package/dist/installer/shared/type-guards/type-guards.js +10 -0
  86. package/dist/installer/shared/type-guards/type-guards.js.map +1 -0
  87. package/dist/installer/ui/index.d.ts +2 -0
  88. package/dist/installer/ui/index.d.ts.map +1 -0
  89. package/dist/installer/ui/index.js +2 -0
  90. package/dist/installer/ui/index.js.map +1 -0
  91. package/dist/installer/ui/ui.d.ts +23 -0
  92. package/dist/installer/ui/ui.d.ts.map +1 -0
  93. package/dist/installer/ui/ui.js +121 -0
  94. package/dist/installer/ui/ui.js.map +1 -0
  95. package/dist/runner/autopilot/autopilot.d.ts +71 -0
  96. package/dist/runner/autopilot/autopilot.d.ts.map +1 -0
  97. package/dist/runner/autopilot/autopilot.js +206 -0
  98. package/dist/runner/autopilot/autopilot.js.map +1 -0
  99. package/dist/runner/autopilot/index.d.ts +2 -0
  100. package/dist/runner/autopilot/index.d.ts.map +1 -0
  101. package/dist/runner/autopilot/index.js +2 -0
  102. package/dist/runner/autopilot/index.js.map +1 -0
  103. package/dist/runner/cli-bridge/cli-bridge.d.ts +34 -0
  104. package/dist/runner/cli-bridge/cli-bridge.d.ts.map +1 -0
  105. package/dist/runner/cli-bridge/cli-bridge.js +53 -0
  106. package/dist/runner/cli-bridge/cli-bridge.js.map +1 -0
  107. package/dist/runner/cli-bridge/index.d.ts +2 -0
  108. package/dist/runner/cli-bridge/index.d.ts.map +1 -0
  109. package/dist/runner/cli-bridge/index.js +2 -0
  110. package/dist/runner/cli-bridge/index.js.map +1 -0
  111. package/dist/runner/dep-factory/deliver-phase.d.ts +24 -0
  112. package/dist/runner/dep-factory/deliver-phase.d.ts.map +1 -0
  113. package/dist/runner/dep-factory/deliver-phase.js +57 -0
  114. package/dist/runner/dep-factory/deliver-phase.js.map +1 -0
  115. package/dist/runner/dep-factory/dep-factory.d.ts +38 -0
  116. package/dist/runner/dep-factory/dep-factory.d.ts.map +1 -0
  117. package/dist/runner/dep-factory/dep-factory.js +193 -0
  118. package/dist/runner/dep-factory/dep-factory.js.map +1 -0
  119. package/dist/runner/dep-factory/index.d.ts +2 -0
  120. package/dist/runner/dep-factory/index.d.ts.map +1 -0
  121. package/dist/runner/dep-factory/index.js +2 -0
  122. package/dist/runner/dep-factory/index.js.map +1 -0
  123. package/dist/runner/dep-factory/invoke-phase.d.ts +20 -0
  124. package/dist/runner/dep-factory/invoke-phase.d.ts.map +1 -0
  125. package/dist/runner/dep-factory/invoke-phase.js +45 -0
  126. package/dist/runner/dep-factory/invoke-phase.js.map +1 -0
  127. package/dist/runner/implement/implement.d.ts +38 -0
  128. package/dist/runner/implement/implement.d.ts.map +1 -0
  129. package/dist/runner/implement/implement.js +61 -0
  130. package/dist/runner/implement/implement.js.map +1 -0
  131. package/dist/runner/implement/index.d.ts +2 -0
  132. package/dist/runner/implement/index.d.ts.map +1 -0
  133. package/dist/runner/implement/index.js +2 -0
  134. package/dist/runner/implement/index.js.map +1 -0
  135. package/dist/runner/notify/index.d.ts +2 -0
  136. package/dist/runner/notify/index.d.ts.map +1 -0
  137. package/dist/runner/notify/index.js +2 -0
  138. package/dist/runner/notify/index.js.map +1 -0
  139. package/dist/runner/notify/notify.d.ts +49 -0
  140. package/dist/runner/notify/notify.d.ts.map +1 -0
  141. package/dist/runner/notify/notify.js +90 -0
  142. package/dist/runner/notify/notify.js.map +1 -0
  143. package/dist/runner/prompt-builder/index.d.ts +2 -0
  144. package/dist/runner/prompt-builder/index.d.ts.map +1 -0
  145. package/dist/runner/prompt-builder/index.js +2 -0
  146. package/dist/runner/prompt-builder/index.js.map +1 -0
  147. package/dist/runner/prompt-builder/prompt-builder.d.ts +53 -0
  148. package/dist/runner/prompt-builder/prompt-builder.d.ts.map +1 -0
  149. package/dist/runner/prompt-builder/prompt-builder.js +122 -0
  150. package/dist/runner/prompt-builder/prompt-builder.js.map +1 -0
  151. package/dist/runner/session-report/index.d.ts +2 -0
  152. package/dist/runner/session-report/index.d.ts.map +1 -0
  153. package/dist/runner/session-report/index.js +2 -0
  154. package/dist/runner/session-report/index.js.map +1 -0
  155. package/dist/runner/session-report/session-report.d.ts +81 -0
  156. package/dist/runner/session-report/session-report.d.ts.map +1 -0
  157. package/dist/runner/session-report/session-report.js +227 -0
  158. package/dist/runner/session-report/session-report.js.map +1 -0
  159. package/dist/runner/shared/types.d.ts +30 -0
  160. package/dist/runner/shared/types.d.ts.map +1 -0
  161. package/dist/runner/shared/types.js +2 -0
  162. package/dist/runner/shared/types.js.map +1 -0
  163. package/dist/shared/ansi/ansi.d.ts +59 -0
  164. package/dist/shared/ansi/ansi.d.ts.map +1 -0
  165. package/dist/shared/ansi/ansi.js +59 -0
  166. package/dist/shared/ansi/ansi.js.map +1 -0
  167. package/dist/shared/ansi/index.d.ts +2 -0
  168. package/dist/shared/ansi/index.d.ts.map +1 -0
  169. package/dist/shared/ansi/index.js +2 -0
  170. package/dist/shared/ansi/index.js.map +1 -0
  171. package/package.json +52 -0
  172. package/src/agents/agents.test.ts +57 -0
  173. package/src/agents/arch-agent.md +80 -0
  174. package/src/agents/concerns-agent.md +96 -0
  175. package/src/agents/design-agent.md +146 -0
  176. package/src/agents/devils-advocate.md +54 -0
  177. package/src/agents/quality-agent.md +178 -0
  178. package/src/agents/tech-agent.md +101 -0
  179. package/src/agents/verification-gate.md +128 -0
  180. package/src/roles/implementer/commands/autopilot.md +11 -0
  181. package/src/roles/implementer/commands/dry-run.md +15 -0
  182. package/src/roles/implementer/commands/implement.md +19 -0
  183. package/src/roles/implementer/workflows/autopilot.md +136 -0
  184. package/src/roles/implementer/workflows/implement.md +161 -0
  185. package/src/roles/planner/commands/approve-plan.md +11 -0
  186. package/src/roles/planner/commands/plan.md +22 -0
  187. package/src/roles/planner/workflows/approve-plan.md +970 -0
  188. package/src/roles/planner/workflows/plan.md +868 -0
  189. package/src/roles/reviewer/commands/logs.md +7 -0
  190. package/src/roles/reviewer/commands/review.md +9 -0
  191. package/src/roles/reviewer/commands/status.md +9 -0
  192. package/src/roles/reviewer/workflows/logs.md +109 -0
  193. package/src/roles/reviewer/workflows/review.md +197 -0
  194. package/src/roles/reviewer/workflows/status.md +142 -0
  195. package/src/roles/roles.test.ts +87 -0
  196. package/src/roles/setup/commands/doctor.md +7 -0
  197. package/src/roles/setup/commands/help.md +80 -0
  198. package/src/roles/setup/commands/init.md +7 -0
  199. package/src/roles/setup/commands/map-codebase.md +17 -0
  200. package/src/roles/setup/commands/settings.md +7 -0
  201. package/src/roles/setup/commands/uninstall.md +5 -0
  202. package/src/roles/setup/commands/update-docs.md +9 -0
  203. package/src/roles/setup/commands/update.md +13 -0
  204. package/src/roles/setup/workflows/doctor.md +131 -0
  205. package/src/roles/setup/workflows/init.md +1096 -0
  206. package/src/roles/setup/workflows/map-codebase.md +130 -0
  207. package/src/roles/setup/workflows/scaffold.md +872 -0
  208. package/src/roles/setup/workflows/settings.md +958 -0
  209. package/src/roles/setup/workflows/uninstall.md +170 -0
  210. package/src/roles/setup/workflows/update-docs.md +95 -0
  211. package/src/roles/setup/workflows/update.md +287 -0
  212. package/src/roles/strategist/commands/approve-brief.md +23 -0
  213. package/src/roles/strategist/commands/brief.md +29 -0
  214. package/src/roles/strategist/workflows/approve-brief.md +1540 -0
  215. package/src/roles/strategist/workflows/brief.md +1330 -0
  216. package/src/templates/CLAUDE.md +101 -0
  217. package/src/templates/templates.test.ts +53 -0
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Dep factory — wire all PipelineDeps fields.
3
+ *
4
+ * Single entry point that takes shared I/O resources and returns
5
+ * fully wired {@link PipelineDeps}. Each field is a closure that
6
+ * captures the shared resources and delegates to the corresponding
7
+ * core phase function.
8
+ */
9
+ import type { SpawnSyncFn } from '../shared/types.js';
10
+ import type { CostFs, EnvFileSystem, ExecGit, FetchFn, LockFs, PipelineDeps, ProgressFs, QualityFs, RunContext } from '@chief-clancy/core';
11
+ /** Options for building the pipeline dependency object. */
12
+ type DepFactoryOpts = {
13
+ readonly projectRoot: string;
14
+ readonly exec: ExecGit;
15
+ readonly lockFs: LockFs;
16
+ readonly progressFs: ProgressFs;
17
+ readonly costFs: CostFs;
18
+ readonly envFs: EnvFileSystem;
19
+ readonly qualityFs: QualityFs;
20
+ readonly spawn: SpawnSyncFn;
21
+ readonly fetch: FetchFn;
22
+ };
23
+ /**
24
+ * Resolve the build label: CLANCY_LABEL_BUILD → CLANCY_LABEL → default.
25
+ *
26
+ * @param ctx - Pipeline context (config may be undefined before preflight).
27
+ * @returns The resolved build label string.
28
+ */
29
+ export declare function resolveBuildLabel(ctx: RunContext): string;
30
+ /**
31
+ * Build the complete PipelineDeps object from shared I/O resources.
32
+ *
33
+ * @param opts - Shared I/O resources for all phases.
34
+ * @returns Fully wired pipeline dependencies.
35
+ */
36
+ export declare function buildPipelineDeps(opts: DepFactoryOpts): PipelineDeps;
37
+ export {};
38
+ //# sourceMappingURL=dep-factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dep-factory.d.ts","sourceRoot":"","sources":["../../../src/runner/dep-factory/dep-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAY,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAGV,MAAM,EACN,aAAa,EACb,OAAO,EAEP,OAAO,EACP,MAAM,EACN,YAAY,EAEZ,UAAU,EACV,SAAS,EAET,UAAU,EACX,MAAM,oBAAoB,CAAC;AAiD5B,2DAA2D;AAC3D,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB,CAAC;AAYF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,CAGzD;AA2ND;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,YAAY,CAUpE"}
@@ -0,0 +1,193 @@
1
+ import { appendCostEntry, appendProgress, attemptPrCreation, branchSetup, buildPrBody, checkFeasibility, checkout, cleanupPhase, computeTargetBranch, computeTicketBranch, costPhase, countReworkCycles, createBoard, deleteLock, deleteVerifyAttempt, deliverEpicToBase, detectBoard, detectRemote, detectResume, ensureBranch, ensureEpicBranch, epicCompletion, executeResume, feasibilityPhase, fetchRemoteBranch, fetchReworkFromPrReview, findEntriesWithStatus, currentBranch as gitCurrentBranch, lockCheck, preflightPhase, prRetry, readLock, resolveCommitType, resolvePlatformHandlers, reworkDetection, runPreflight, ticketFetch, transition, writeLock, } from '@chief-clancy/core';
2
+ import { invokeClaudePrint } from '../cli-bridge/index.js';
3
+ import { sendNotification } from '../notify/index.js';
4
+ import { wireDeliver } from './deliver-phase.js';
5
+ import { makeInvokePhase } from './invoke-phase.js';
6
+ function makeAppendProgress(progressFs, projectRoot) {
7
+ return (opts) => appendProgress(progressFs, projectRoot, opts);
8
+ }
9
+ /** Default build-queue label when no env var is configured. */
10
+ const DEFAULT_BUILD_LABEL = 'clancy:build';
11
+ /**
12
+ * Resolve the build label: CLANCY_LABEL_BUILD → CLANCY_LABEL → default.
13
+ *
14
+ * @param ctx - Pipeline context (config may be undefined before preflight).
15
+ * @returns The resolved build label string.
16
+ */
17
+ export function resolveBuildLabel(ctx) {
18
+ const env = ctx.config?.env;
19
+ return env?.CLANCY_LABEL_BUILD ?? env?.CLANCY_LABEL ?? DEFAULT_BUILD_LABEL;
20
+ }
21
+ function hasParent(entry) {
22
+ return entry.parent !== undefined;
23
+ }
24
+ function makeFindCompletedEpics(progressFs, projectRoot) {
25
+ return () => {
26
+ const entries = findEntriesWithStatus(progressFs, projectRoot, 'DONE');
27
+ const pairs = entries
28
+ .filter(hasParent)
29
+ .map((e) => [e.parent, e.key]);
30
+ return new Map(pairs);
31
+ };
32
+ }
33
+ function makeRetryEntry(fetchFn) {
34
+ return async (entry, remote, ctx) => {
35
+ // Safe: prRetry runs after preflight, which sets config
36
+ const config = ctx.config;
37
+ const baseBranch = config.env.CLANCY_BASE_BRANCH ?? 'main';
38
+ const parent = hasParent(entry) ? entry.parent : undefined;
39
+ const ticketBranch = computeTicketBranch(config.provider, entry.key);
40
+ const targetBranch = computeTargetBranch(config.provider, baseBranch, parent);
41
+ const commitType = resolveCommitType(entry.ticketType);
42
+ const prTitle = `${commitType}(${entry.key}): ${entry.summary}`;
43
+ // Retry uses summary as description — full ticket data unavailable from progress
44
+ const prBody = buildPrBody({
45
+ config,
46
+ ticket: {
47
+ key: entry.key,
48
+ title: entry.summary,
49
+ description: entry.summary,
50
+ provider: config.provider,
51
+ },
52
+ targetBranch,
53
+ });
54
+ return attemptPrCreation({
55
+ fetchFn,
56
+ env: config.env,
57
+ remote,
58
+ sourceBranch: ticketBranch,
59
+ targetBranch,
60
+ title: prTitle,
61
+ body: prBody,
62
+ });
63
+ };
64
+ }
65
+ function wireEarlyPhases(opts, progress) {
66
+ const { projectRoot, exec, lockFs, progressFs } = opts;
67
+ return {
68
+ lockCheck: (ctx) => lockCheck(ctx, {
69
+ lockFs,
70
+ exec,
71
+ progressFs,
72
+ detectResume: (resumeOpts) => detectResume(resumeOpts),
73
+ executeResume: (resumeOpts) => executeResume(resumeOpts),
74
+ }),
75
+ preflight: (ctx) => preflightPhase(ctx, {
76
+ runPreflight: (root) => runPreflight(root, {
77
+ exec: (file, args) => exec([file, ...args]),
78
+ envFs: opts.envFs,
79
+ }),
80
+ detectBoard: (env) => detectBoard(env),
81
+ createBoard: (config) => createBoard(config, (url, init) => opts.fetch(url, init ?? {})),
82
+ }),
83
+ epicCompletion: (ctx) => epicCompletion(ctx, {
84
+ findCompletedEpics: makeFindCompletedEpics(progressFs, projectRoot),
85
+ deliverEpicToBase: (epicOpts) => deliverEpicToBase({
86
+ ...epicOpts,
87
+ exec,
88
+ fetchFn: opts.fetch,
89
+ progressFs,
90
+ projectRoot,
91
+ // Safe: epicCompletion runs after preflight, which sets config
92
+ config: epicOpts.config,
93
+ }),
94
+ }),
95
+ prRetry: (ctx) => prRetry(ctx, {
96
+ findRetryable: () => findEntriesWithStatus(progressFs, projectRoot, 'PUSHED'),
97
+ detectRemote: () => detectRemote(exec),
98
+ retryEntry: makeRetryEntry(opts.fetch),
99
+ appendProgress: progress,
100
+ }),
101
+ };
102
+ }
103
+ function wireTicketPhases(opts, progress) {
104
+ const { projectRoot, exec, progressFs, spawn, fetch: fetchFn } = opts;
105
+ return {
106
+ reworkDetection: (ctx) => reworkDetection(ctx, {
107
+ fetchRework: async (config) => {
108
+ const remote = detectRemote(exec);
109
+ const handlers = resolvePlatformHandlers({
110
+ fetchFn,
111
+ env: config.env,
112
+ remote,
113
+ });
114
+ if (!handlers)
115
+ return undefined;
116
+ return fetchReworkFromPrReview({
117
+ progressFs,
118
+ projectRoot,
119
+ provider: config.provider,
120
+ handlers,
121
+ });
122
+ },
123
+ }),
124
+ ticketFetch: (ctx) => ticketFetch(ctx, {
125
+ fetchTicket: (board) => board.fetchTicket({ buildLabel: resolveBuildLabel(ctx) }),
126
+ countReworkCycles: (key) => countReworkCycles(progressFs, projectRoot, key),
127
+ appendProgress: progress,
128
+ computeTicketBranch: (provider, key) => computeTicketBranch(provider, key),
129
+ computeTargetBranch: (provider, baseBranch, parent) => computeTargetBranch(provider, baseBranch, parent),
130
+ }),
131
+ feasibility: (ctx) => feasibilityPhase(ctx, {
132
+ checkFeasibility: (ticket, model) => {
133
+ const result = checkFeasibility((prompt) => invokeClaudePrint({ prompt, model, spawn }), ticket, model);
134
+ return Promise.resolve(result);
135
+ },
136
+ appendProgress: progress,
137
+ }),
138
+ };
139
+ }
140
+ function wireGitAndInvoke(opts) {
141
+ const { projectRoot, exec, lockFs, spawn } = opts;
142
+ return {
143
+ branchSetup: (ctx) => branchSetup(ctx, {
144
+ currentBranch: () => gitCurrentBranch(exec),
145
+ checkout: (branch, create) => checkout(exec, branch, create),
146
+ fetchRemoteBranch: (branch) => fetchRemoteBranch(exec, branch),
147
+ ensureBranch: (branch, baseBranch) => ensureBranch(exec, branch, baseBranch),
148
+ ensureEpicBranch: (epicBranch, baseBranch) => ensureEpicBranch({ exec, epicBranch, baseBranch }),
149
+ fetchChildrenStatus: (ticket) =>
150
+ // Safe: branchSetup runs after preflight, which sets board
151
+ ctx.board.fetchChildrenStatus(ticket.key, ticket.issueId),
152
+ writeLock: (data) => writeLock(lockFs, projectRoot, { ...data, pid: process.pid }),
153
+ }),
154
+ transition: (ctx) => transition(ctx, {
155
+ transitionTicket: (ticket, status) =>
156
+ // Safe: transition runs after preflight, which sets board
157
+ ctx.board.transitionTicket(ticket, status),
158
+ }),
159
+ invoke: makeInvokePhase(spawn),
160
+ };
161
+ }
162
+ function wireFinalization(opts) {
163
+ const { projectRoot, exec, lockFs, costFs, fetch: fetchFn } = opts;
164
+ return {
165
+ cost: (ctx) => costPhase(ctx, {
166
+ readLock: () => readLock(lockFs, projectRoot),
167
+ appendCostEntry: (args) => appendCostEntry(costFs, projectRoot, { ...args, now: Date.now() }),
168
+ }),
169
+ cleanup: (ctx) => cleanupPhase(ctx, {
170
+ notify: (webhook, message) => sendNotification({ webhookUrl: webhook, message, fetch: fetchFn }),
171
+ }),
172
+ checkout: (branch) => checkout(exec, branch),
173
+ deleteLock: () => deleteLock(lockFs, projectRoot),
174
+ deleteVerifyAttempt: () => deleteVerifyAttempt(lockFs, projectRoot),
175
+ };
176
+ }
177
+ /**
178
+ * Build the complete PipelineDeps object from shared I/O resources.
179
+ *
180
+ * @param opts - Shared I/O resources for all phases.
181
+ * @returns Fully wired pipeline dependencies.
182
+ */
183
+ export function buildPipelineDeps(opts) {
184
+ const progress = makeAppendProgress(opts.progressFs, opts.projectRoot);
185
+ return {
186
+ ...wireEarlyPhases(opts, progress),
187
+ ...wireTicketPhases(opts, progress),
188
+ ...wireGitAndInvoke(opts),
189
+ ...wireDeliver(opts, progress),
190
+ ...wireFinalization(opts),
191
+ };
192
+ }
193
+ //# sourceMappingURL=dep-factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dep-factory.js","sourceRoot":"","sources":["../../../src/runner/dep-factory/dep-factory.ts"],"names":[],"mappings":"AA0BA,OAAO,EACL,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,aAAa,IAAI,gBAAgB,EACjC,SAAS,EACT,c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","sources":["../../../src/runner/dep-factory/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { buildPipelineDeps } from './dep-factory.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runner/dep-factory/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Invoke phase wiring — build prompt and run Claude session.
3
+ *
4
+ * Extracted from the dep factory to stay within file-length limits.
5
+ */
6
+ import type { SpawnSyncFn } from '../shared/types.js';
7
+ import type { RunContext } from '@chief-clancy/core';
8
+ /**
9
+ * Create the invoke phase closure.
10
+ *
11
+ * Builds the appropriate prompt (fresh or rework) from context,
12
+ * then delegates to `invokeClaudeSession`.
13
+ *
14
+ * @param spawn - Injected process spawner.
15
+ * @returns An invoke phase function matching PipelineDeps.invoke.
16
+ */
17
+ export declare function makeInvokePhase(spawn: SpawnSyncFn): (ctx: RunContext) => Promise<{
18
+ readonly ok: boolean;
19
+ }>;
20
+ //# sourceMappingURL=invoke-phase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invoke-phase.d.ts","sourceRoot":"","sources":["../../../src/runner/dep-factory/invoke-phase.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKrD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,WAAW,GACjB,CAAC,GAAG,EAAE,UAAU,KAAK,OAAO,CAAC;IAAE,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAA;CAAE,CAAC,CAkCxD"}
@@ -0,0 +1,45 @@
1
+ import { invokeClaudeSession } from '../cli-bridge/index.js';
2
+ import { buildPrompt, buildReworkPrompt } from '../prompt-builder/index.js';
3
+ /**
4
+ * Create the invoke phase closure.
5
+ *
6
+ * Builds the appropriate prompt (fresh or rework) from context,
7
+ * then delegates to `invokeClaudeSession`.
8
+ *
9
+ * @param spawn - Injected process spawner.
10
+ * @returns An invoke phase function matching PipelineDeps.invoke.
11
+ */
12
+ export function makeInvokePhase(spawn) {
13
+ return async (ctx) => {
14
+ // Safe: invoke runs after preflight (config) and ticketFetch (ticket)
15
+ const config = ctx.config;
16
+ const ticket = ctx.ticket;
17
+ const tdd = config.env.CLANCY_TDD === 'true';
18
+ const prompt = ctx.isRework
19
+ ? buildReworkPrompt({
20
+ provider: config.provider,
21
+ key: ticket.key,
22
+ title: ticket.title,
23
+ description: ticket.description,
24
+ feedbackComments: ctx.prFeedback ?? [],
25
+ tdd,
26
+ })
27
+ : buildPrompt({
28
+ provider: config.provider,
29
+ key: ticket.key,
30
+ title: ticket.title,
31
+ description: ticket.description,
32
+ parentInfo: ticket.parentInfo,
33
+ blockers: ticket.blockers,
34
+ tdd,
35
+ });
36
+ return {
37
+ ok: invokeClaudeSession({
38
+ prompt,
39
+ model: config.env.CLANCY_MODEL,
40
+ spawn,
41
+ }),
42
+ };
43
+ };
44
+ }
45
+ //# sourceMappingURL=invoke-phase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invoke-phase.js","sourceRoot":"","sources":["../../../src/runner/dep-factory/invoke-phase.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE5E;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAC7B,KAAkB;IAElB,OAAO,KAAK,EAAE,GAAG,EAAE,EAAE;QACnB,sEAAsE;QACtE,MAAM,MAAM,GAAG,GAAG,CAAC,MAAO,CAAC;QAC3B,MAAM,MAAM,GAAG,GAAG,CAAC,MAAO,CAAC;QAC3B,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,KAAK,MAAM,CAAC;QAE7C,MAAM,MAAM,GAAG,GAAG,CAAC,QAAQ;YACzB,CAAC,CAAC,iBAAiB,CAAC;gBAChB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,GAAG,EAAE,MAAM,CAAC,GAAG;gBACf,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,gBAAgB,EAAE,GAAG,CAAC,UAAU,IAAI,EAAE;gBACtC,GAAG;aACJ,CAAC;YACJ,CAAC,CAAC,WAAW,CAAC;gBACV,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,GAAG,EAAE,MAAM,CAAC,GAAG;gBACf,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,GAAG;aACJ,CAAC,CAAC;QAEP,OAAO;YACL,EAAE,EAAE,mBAAmB,CAAC;gBACtB,MAAM;gBACN,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY;gBAC9B,KAAK;aACN,CAAC;SACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Implement entry point — parse args, create context, run pipeline, display result.
3
+ *
4
+ * Thin orchestration layer over the core pipeline. All business logic
5
+ * lives in core phases; this module wires dependencies and formats output.
6
+ * All exit paths use exit code 0 — the autopilot runner detects stop
7
+ * conditions by parsing stdout, not exit codes.
8
+ */
9
+ import type { ConsoleLike, SpawnSyncFn } from '../shared/types.js';
10
+ import type { CostFs, EnvFileSystem, ExecGit, FetchFn, LockFs, PipelineDeps, PipelineResult, ProgressFs, QualityFs, RunContext } from '@chief-clancy/core';
11
+ type RunPipelineFn = (ctx: RunContext, deps: PipelineDeps) => Promise<PipelineResult>;
12
+ /** Options for running the implement orchestrator. */
13
+ type ImplementOpts = {
14
+ readonly argv: readonly string[];
15
+ readonly projectRoot: string;
16
+ readonly isAfk: boolean;
17
+ readonly exec: ExecGit;
18
+ readonly lockFs: LockFs;
19
+ readonly progressFs: ProgressFs;
20
+ readonly costFs: CostFs;
21
+ readonly envFs: EnvFileSystem;
22
+ readonly qualityFs: QualityFs;
23
+ readonly spawn: SpawnSyncFn;
24
+ readonly fetch: FetchFn;
25
+ readonly runPipeline: RunPipelineFn;
26
+ readonly console: ConsoleLike;
27
+ readonly now?: number;
28
+ readonly clock?: () => number;
29
+ };
30
+ /**
31
+ * Implement a single ticket — full lifecycle from pickup to PR delivery.
32
+ *
33
+ * @param opts - Injected I/O resources and configuration.
34
+ * @returns Resolves when the pipeline run and result display are complete.
35
+ */
36
+ export declare function runImplement(opts: ImplementOpts): Promise<void>;
37
+ export {};
38
+ //# sourceMappingURL=implement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"implement.d.ts","sourceRoot":"","sources":["../../../src/runner/implement/implement.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EACV,MAAM,EACN,aAAa,EACb,OAAO,EACP,OAAO,EACP,MAAM,EACN,YAAY,EACZ,cAAc,EACd,UAAU,EACV,SAAS,EACT,UAAU,EACX,MAAM,oBAAoB,CAAC;AAS5B,KAAK,aAAa,GAAG,CACnB,GAAG,EAAE,UAAU,EACf,IAAI,EAAE,YAAY,KACf,OAAO,CAAC,cAAc,CAAC,CAAC;AAE7B,sDAAsD;AACtD,KAAK,aAAa,GAAG;IACnB,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,MAAM,CAAC;CAC/B,CAAC;AA+CF;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBrE"}
@@ -0,0 +1,61 @@
1
+ import { createContext, formatDuration } from '@chief-clancy/core';
2
+ import { dim, green, red } from '../../shared/ansi/index.js';
3
+ import { buildPipelineDeps } from '../dep-factory/index.js';
4
+ // ─── Display ─────────────────────────────────────────────────────────────────
5
+ function displayResult(result, startTime, io) {
6
+ const elapsed = formatDuration(io.clock() - startTime);
7
+ const { out } = io;
8
+ switch (result.status) {
9
+ case 'completed':
10
+ out.log(green('✅ Ticket completed') + dim(` (${elapsed})`));
11
+ break;
12
+ case 'aborted':
13
+ out.log(dim(`⏹ Pipeline aborted at ${result.phase ?? 'unknown'}`) +
14
+ dim(` (${elapsed})`));
15
+ break;
16
+ case 'resumed':
17
+ out.log(dim(`↩ Resumed previous session`) + dim(` (${elapsed})`));
18
+ break;
19
+ case 'dry-run':
20
+ out.log(dim(`🏁 Dry run complete`) + dim(` (${elapsed})`));
21
+ break;
22
+ case 'error':
23
+ out.error(red('❌ Clancy stopped') + dim(` (${elapsed})`));
24
+ out.error(red(` ${result.error ?? 'Unknown error'}`));
25
+ break;
26
+ default: {
27
+ const _exhaustive = result.status;
28
+ return _exhaustive;
29
+ }
30
+ }
31
+ }
32
+ // ─── Entry point ─────────────────────────────────────────────────────────────
33
+ /**
34
+ * Implement a single ticket — full lifecycle from pickup to PR delivery.
35
+ *
36
+ * @param opts - Injected I/O resources and configuration.
37
+ * @returns Resolves when the pipeline run and result display are complete.
38
+ */
39
+ export async function runImplement(opts) {
40
+ const ctx = createContext({
41
+ projectRoot: opts.projectRoot,
42
+ argv: opts.argv,
43
+ isAfk: opts.isAfk,
44
+ now: opts.now,
45
+ });
46
+ const deps = buildPipelineDeps({
47
+ projectRoot: opts.projectRoot,
48
+ exec: opts.exec,
49
+ lockFs: opts.lockFs,
50
+ progressFs: opts.progressFs,
51
+ costFs: opts.costFs,
52
+ envFs: opts.envFs,
53
+ qualityFs: opts.qualityFs,
54
+ spawn: opts.spawn,
55
+ fetch: opts.fetch,
56
+ });
57
+ const result = await opts.runPipeline(ctx, deps);
58
+ const clock = opts.clock ?? Date.now;
59
+ displayResult(result, ctx.startTime, { out: opts.console, clock });
60
+ }
61
+ //# sourceMappingURL=implement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"implement.js","sourceRoot":"","sources":["../../../src/runner/implement/implement.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AA4B5D,gFAAgF;AAEhF,SAAS,aAAa,CACpB,MAAsB,EACtB,SAAiB,EACjB,EAA+D;IAE/D,MAAM,OAAO,GAAG,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,SAAS,CAAC,C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I,EAAE,IAAI,CAAC,IAAI;QACf,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,GAAG,EAAE,IAAI,CAAC,GAAG;KACd,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,iBAAiB,CAAC;QAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,KAAK,EAAE,IAAI,CAAC,KAAK;KAClB,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAEjD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC;IACrC,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;AACrE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { runImplement } from './implement.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runner/implement/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { runImplement } from './implement.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runner/implement/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { sendNotification } from './notify.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runner/notify/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { sendNotification } from './notify.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runner/notify/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Webhook notification sender for Slack and Microsoft Teams.
3
+ *
4
+ * Sends completion notifications after a ticket is processed.
5
+ * Best-effort — never throws on failure.
6
+ */
7
+ /**
8
+ * Detect whether a webhook URL is for Slack (vs Teams/other).
9
+ *
10
+ * Parses the URL and checks the hostname to avoid substring false
11
+ * positives (e.g., `evil.com/?hooks.slack.com`).
12
+ *
13
+ * @param url - The webhook URL to check.
14
+ * @returns `true` if the hostname ends with `hooks.slack.com`.
15
+ */
16
+ export declare function isSlackWebhook(url: string): boolean;
17
+ /**
18
+ * Build a Slack webhook payload.
19
+ *
20
+ * @param message - The notification message text.
21
+ * @returns The JSON payload string for a Slack incoming webhook.
22
+ */
23
+ export declare function buildSlackPayload(message: string): string;
24
+ /**
25
+ * Build a Microsoft Teams webhook payload using an adaptive card.
26
+ *
27
+ * @param message - The notification message text.
28
+ * @returns The JSON payload string for a Teams incoming webhook.
29
+ */
30
+ export declare function buildTeamsPayload(message: string): string;
31
+ /** Options for sending a webhook notification. */
32
+ type NotifyOptions = {
33
+ readonly webhookUrl: string;
34
+ readonly message: string;
35
+ readonly fetch: (url: string, init: RequestInit) => Promise<Response>;
36
+ readonly warn?: (message: string) => void;
37
+ };
38
+ /**
39
+ * Send a notification to a webhook URL.
40
+ *
41
+ * Automatically detects Slack vs Teams format based on the URL.
42
+ * Best-effort — logs a warning on failure but never throws.
43
+ *
44
+ * @param options - The notification options with injected fetch.
45
+ * @returns Resolves when the notification attempt completes (never rejects).
46
+ */
47
+ export declare function sendNotification(options: NotifyOptions): Promise<void>;
48
+ export {};
49
+ //# sourceMappingURL=notify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notify.d.ts","sourceRoot":"","sources":["../../../src/runner/notify/notify.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CASnD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAqBzD;AAED,kDAAkD;AAClD,KAAK,aAAa,GAAG;IACnB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IACtE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAmB5E"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Webhook notification sender for Slack and Microsoft Teams.
3
+ *
4
+ * Sends completion notifications after a ticket is processed.
5
+ * Best-effort — never throws on failure.
6
+ */
7
+ /**
8
+ * Detect whether a webhook URL is for Slack (vs Teams/other).
9
+ *
10
+ * Parses the URL and checks the hostname to avoid substring false
11
+ * positives (e.g., `evil.com/?hooks.slack.com`).
12
+ *
13
+ * @param url - The webhook URL to check.
14
+ * @returns `true` if the hostname ends with `hooks.slack.com`.
15
+ */
16
+ export function isSlackWebhook(url) {
17
+ try {
18
+ const { hostname } = new URL(url);
19
+ return (hostname === 'hooks.slack.com' || hostname.endsWith('.hooks.slack.com'));
20
+ }
21
+ catch {
22
+ return false;
23
+ }
24
+ }
25
+ /**
26
+ * Build a Slack webhook payload.
27
+ *
28
+ * @param message - The notification message text.
29
+ * @returns The JSON payload string for a Slack incoming webhook.
30
+ */
31
+ export function buildSlackPayload(message) {
32
+ return JSON.stringify({ text: message });
33
+ }
34
+ /**
35
+ * Build a Microsoft Teams webhook payload using an adaptive card.
36
+ *
37
+ * @param message - The notification message text.
38
+ * @returns The JSON payload string for a Teams incoming webhook.
39
+ */
40
+ export function buildTeamsPayload(message) {
41
+ return JSON.stringify({
42
+ type: 'message',
43
+ attachments: [
44
+ {
45
+ contentType: 'application/vnd.microsoft.card.adaptive',
46
+ content: {
47
+ $schema: 'http://adaptivecards.io/schemas/adaptive-card.json',
48
+ type: 'AdaptiveCard',
49
+ version: '1.4',
50
+ body: [
51
+ {
52
+ type: 'TextBlock',
53
+ text: message,
54
+ wrap: true,
55
+ },
56
+ ],
57
+ },
58
+ },
59
+ ],
60
+ });
61
+ }
62
+ /**
63
+ * Send a notification to a webhook URL.
64
+ *
65
+ * Automatically detects Slack vs Teams format based on the URL.
66
+ * Best-effort — logs a warning on failure but never throws.
67
+ *
68
+ * @param options - The notification options with injected fetch.
69
+ * @returns Resolves when the notification attempt completes (never rejects).
70
+ */
71
+ export async function sendNotification(options) {
72
+ const { webhookUrl, message, fetch: fetchFn, warn = console.warn } = options;
73
+ const payload = isSlackWebhook(webhookUrl)
74
+ ? buildSlackPayload(message)
75
+ : buildTeamsPayload(message);
76
+ try {
77
+ const response = await fetchFn(webhookUrl, {
78
+ method: 'POST',
79
+ headers: { 'Content-Type': 'application/json' },
80
+ body: payload,
81
+ });
82
+ if (!response.ok) {
83
+ warn(`⚠ Notification failed: HTTP ${response.status}`);
84
+ }
85
+ }
86
+ catch {
87
+ warn('⚠ Notification failed: could not reach webhook');
88
+ }
89
+ }
90
+ //# sourceMappingURL=notify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notify.js","sourceRoot":"","sources":["../../../src/runner/notify/notify.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,IAAI,CAAC;QACH,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QAClC,OAAO,CACL,QAAQ,KAAK,iBAAiB,IAAI,QAAQ,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CACxE,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,OAAO,IAAI,CAAC,SAAS,CAAC;QACpB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACX;gBACE,WAAW,EAAE,yCAAyC;gBACtD,OAAO,EAAE;oBACP,OAAO,EAAE,oDAAoD;oBAC7D,IAAI,EAAE,cAAc;oBACpB,OAAO,EAAE,KAAK;oBACd,IAAI,EAAE;wBACJ;4BACE,IAAI,EAAE,WAAW;4BACjB,IAAI,EAAE,OAAO;4BACb,IAAI,EAAE,IAAI;yBACX;qBACF;iBACF;aACF;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAUD;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,OAAsB;IAC3D,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC;IAC7E,MAAM,OAAO,GAAG,cAAc,CAAC,UAAU,CAAC;QACxC,CAAC,CAAC,iBAAiB,CAAC,OAAO,CAAC;QAC5B,CAAC,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAE/B,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,UAAU,EAAE;YACzC,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,OAAO;SACd,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,IAAI,CAAC,+BAA+B,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,IAAI,CAAC,gDAAgD,CAAC,CAAC;IACzD,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { buildPrompt, buildReworkPrompt } from './prompt-builder.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runner/prompt-builder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}