chief-clancy 0.7.0 → 0.7.2

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 (189) hide show
  1. package/README.md +4 -1
  2. package/dist/bundle/clancy-once.js +50 -50
  3. package/package.json +5 -2
  4. package/src/roles/planner/commands/approve-plan.md +3 -0
  5. package/src/roles/planner/commands/plan.md +1 -0
  6. package/src/roles/planner/workflows/approve-plan.md +3 -1
  7. package/src/roles/planner/workflows/plan.md +5 -5
  8. package/src/roles/strategist/commands/approve-brief.md +1 -0
  9. package/src/roles/strategist/workflows/approve-brief.md +3 -1
  10. package/src/roles/strategist/workflows/brief.md +38 -20
  11. package/src/templates/.env.example.github +19 -1
  12. package/src/templates/.env.example.jira +25 -1
  13. package/src/templates/.env.example.linear +19 -1
  14. package/dist/schemas/bitbucket-pr.d.ts +0 -137
  15. package/dist/schemas/bitbucket-pr.d.ts.map +0 -1
  16. package/dist/schemas/bitbucket-pr.js +0 -75
  17. package/dist/schemas/bitbucket-pr.js.map +0 -1
  18. package/dist/schemas/env.d.ts +0 -170
  19. package/dist/schemas/env.d.ts.map +0 -1
  20. package/dist/schemas/env.js +0 -69
  21. package/dist/schemas/env.js.map +0 -1
  22. package/dist/schemas/github-issues.d.ts +0 -105
  23. package/dist/schemas/github-issues.d.ts.map +0 -1
  24. package/dist/schemas/github-issues.js +0 -54
  25. package/dist/schemas/github-issues.js.map +0 -1
  26. package/dist/schemas/gitlab-mr.d.ts +0 -73
  27. package/dist/schemas/gitlab-mr.d.ts.map +0 -1
  28. package/dist/schemas/gitlab-mr.js +0 -33
  29. package/dist/schemas/gitlab-mr.js.map +0 -1
  30. package/dist/schemas/jira.d.ts +0 -59
  31. package/dist/schemas/jira.d.ts.map +0 -1
  32. package/dist/schemas/jira.js +0 -56
  33. package/dist/schemas/jira.js.map +0 -1
  34. package/dist/schemas/linear.d.ts +0 -108
  35. package/dist/schemas/linear.d.ts.map +0 -1
  36. package/dist/schemas/linear.js +0 -84
  37. package/dist/schemas/linear.js.map +0 -1
  38. package/dist/scripts/afk/afk.d.ts +0 -21
  39. package/dist/scripts/afk/afk.d.ts.map +0 -1
  40. package/dist/scripts/afk/afk.js +0 -145
  41. package/dist/scripts/afk/afk.js.map +0 -1
  42. package/dist/scripts/afk/report/report.d.ts +0 -47
  43. package/dist/scripts/afk/report/report.d.ts.map +0 -1
  44. package/dist/scripts/afk/report/report.js +0 -194
  45. package/dist/scripts/afk/report/report.js.map +0 -1
  46. package/dist/scripts/board/github/github.d.ts +0 -104
  47. package/dist/scripts/board/github/github.d.ts.map +0 -1
  48. package/dist/scripts/board/github/github.js +0 -291
  49. package/dist/scripts/board/github/github.js.map +0 -1
  50. package/dist/scripts/board/jira/jira.d.ts +0 -139
  51. package/dist/scripts/board/jira/jira.d.ts.map +0 -1
  52. package/dist/scripts/board/jira/jira.js +0 -378
  53. package/dist/scripts/board/jira/jira.js.map +0 -1
  54. package/dist/scripts/board/linear/linear.d.ts +0 -129
  55. package/dist/scripts/board/linear/linear.d.ts.map +0 -1
  56. package/dist/scripts/board/linear/linear.js +0 -393
  57. package/dist/scripts/board/linear/linear.js.map +0 -1
  58. package/dist/scripts/once/board-ops/board-ops.d.ts +0 -26
  59. package/dist/scripts/once/board-ops/board-ops.d.ts.map +0 -1
  60. package/dist/scripts/once/board-ops/board-ops.js +0 -113
  61. package/dist/scripts/once/board-ops/board-ops.js.map +0 -1
  62. package/dist/scripts/once/cost/cost.d.ts +0 -10
  63. package/dist/scripts/once/cost/cost.d.ts.map +0 -1
  64. package/dist/scripts/once/cost/cost.js +0 -23
  65. package/dist/scripts/once/cost/cost.js.map +0 -1
  66. package/dist/scripts/once/deliver/deliver.d.ts +0 -37
  67. package/dist/scripts/once/deliver/deliver.d.ts.map +0 -1
  68. package/dist/scripts/once/deliver/deliver.js +0 -253
  69. package/dist/scripts/once/deliver/deliver.js.map +0 -1
  70. package/dist/scripts/once/fetch-ticket/fetch-ticket.d.ts +0 -22
  71. package/dist/scripts/once/fetch-ticket/fetch-ticket.d.ts.map +0 -1
  72. package/dist/scripts/once/fetch-ticket/fetch-ticket.js +0 -123
  73. package/dist/scripts/once/fetch-ticket/fetch-ticket.js.map +0 -1
  74. package/dist/scripts/once/git-token/git-token.d.ts +0 -13
  75. package/dist/scripts/once/git-token/git-token.d.ts.map +0 -1
  76. package/dist/scripts/once/git-token/git-token.js +0 -30
  77. package/dist/scripts/once/git-token/git-token.js.map +0 -1
  78. package/dist/scripts/once/lock/lock.d.ts +0 -17
  79. package/dist/scripts/once/lock/lock.d.ts.map +0 -1
  80. package/dist/scripts/once/lock/lock.js +0 -70
  81. package/dist/scripts/once/lock/lock.js.map +0 -1
  82. package/dist/scripts/once/once.d.ts +0 -12
  83. package/dist/scripts/once/once.d.ts.map +0 -1
  84. package/dist/scripts/once/once.js +0 -452
  85. package/dist/scripts/once/once.js.map +0 -1
  86. package/dist/scripts/once/pr-creation/pr-creation.d.ts +0 -11
  87. package/dist/scripts/once/pr-creation/pr-creation.d.ts.map +0 -1
  88. package/dist/scripts/once/pr-creation/pr-creation.js +0 -50
  89. package/dist/scripts/once/pr-creation/pr-creation.js.map +0 -1
  90. package/dist/scripts/once/resume/resume.d.ts +0 -24
  91. package/dist/scripts/once/resume/resume.d.ts.map +0 -1
  92. package/dist/scripts/once/resume/resume.js +0 -159
  93. package/dist/scripts/once/resume/resume.js.map +0 -1
  94. package/dist/scripts/once/rework/rework.d.ts +0 -32
  95. package/dist/scripts/once/rework/rework.d.ts.map +0 -1
  96. package/dist/scripts/once/rework/rework.js +0 -208
  97. package/dist/scripts/once/rework/rework.js.map +0 -1
  98. package/dist/scripts/once/types/types.d.ts +0 -13
  99. package/dist/scripts/once/types/types.d.ts.map +0 -1
  100. package/dist/scripts/once/types/types.js +0 -2
  101. package/dist/scripts/once/types/types.js.map +0 -1
  102. package/dist/scripts/shared/branch/branch.d.ts +0 -50
  103. package/dist/scripts/shared/branch/branch.d.ts.map +0 -1
  104. package/dist/scripts/shared/branch/branch.js +0 -61
  105. package/dist/scripts/shared/branch/branch.js.map +0 -1
  106. package/dist/scripts/shared/claude-cli/claude-cli.d.ts +0 -31
  107. package/dist/scripts/shared/claude-cli/claude-cli.d.ts.map +0 -1
  108. package/dist/scripts/shared/claude-cli/claude-cli.js +0 -60
  109. package/dist/scripts/shared/claude-cli/claude-cli.js.map +0 -1
  110. package/dist/scripts/shared/env-schema/env-schema.d.ts +0 -27
  111. package/dist/scripts/shared/env-schema/env-schema.d.ts.map +0 -1
  112. package/dist/scripts/shared/env-schema/env-schema.js +0 -47
  113. package/dist/scripts/shared/env-schema/env-schema.js.map +0 -1
  114. package/dist/scripts/shared/feasibility/feasibility.d.ts +0 -30
  115. package/dist/scripts/shared/feasibility/feasibility.d.ts.map +0 -1
  116. package/dist/scripts/shared/feasibility/feasibility.js +0 -68
  117. package/dist/scripts/shared/feasibility/feasibility.js.map +0 -1
  118. package/dist/scripts/shared/format/format.d.ts +0 -11
  119. package/dist/scripts/shared/format/format.d.ts.map +0 -1
  120. package/dist/scripts/shared/format/format.js +0 -23
  121. package/dist/scripts/shared/format/format.js.map +0 -1
  122. package/dist/scripts/shared/git-ops/git-ops.d.ts +0 -90
  123. package/dist/scripts/shared/git-ops/git-ops.d.ts.map +0 -1
  124. package/dist/scripts/shared/git-ops/git-ops.js +0 -190
  125. package/dist/scripts/shared/git-ops/git-ops.js.map +0 -1
  126. package/dist/scripts/shared/http/http.d.ts +0 -54
  127. package/dist/scripts/shared/http/http.d.ts.map +0 -1
  128. package/dist/scripts/shared/http/http.js +0 -76
  129. package/dist/scripts/shared/http/http.js.map +0 -1
  130. package/dist/scripts/shared/notify/notify.d.ts +0 -46
  131. package/dist/scripts/shared/notify/notify.d.ts.map +0 -1
  132. package/dist/scripts/shared/notify/notify.js +0 -88
  133. package/dist/scripts/shared/notify/notify.js.map +0 -1
  134. package/dist/scripts/shared/preflight/preflight.d.ts +0 -40
  135. package/dist/scripts/shared/preflight/preflight.d.ts.map +0 -1
  136. package/dist/scripts/shared/preflight/preflight.js +0 -96
  137. package/dist/scripts/shared/preflight/preflight.js.map +0 -1
  138. package/dist/scripts/shared/progress/progress.d.ts +0 -88
  139. package/dist/scripts/shared/progress/progress.d.ts.map +0 -1
  140. package/dist/scripts/shared/progress/progress.js +0 -210
  141. package/dist/scripts/shared/progress/progress.js.map +0 -1
  142. package/dist/scripts/shared/prompt/prompt.d.ts +0 -58
  143. package/dist/scripts/shared/prompt/prompt.d.ts.map +0 -1
  144. package/dist/scripts/shared/prompt/prompt.js +0 -123
  145. package/dist/scripts/shared/prompt/prompt.js.map +0 -1
  146. package/dist/scripts/shared/pull-request/bitbucket/bitbucket.d.ts +0 -82
  147. package/dist/scripts/shared/pull-request/bitbucket/bitbucket.d.ts.map +0 -1
  148. package/dist/scripts/shared/pull-request/bitbucket/bitbucket.js +0 -301
  149. package/dist/scripts/shared/pull-request/bitbucket/bitbucket.js.map +0 -1
  150. package/dist/scripts/shared/pull-request/github/github.d.ts +0 -72
  151. package/dist/scripts/shared/pull-request/github/github.d.ts.map +0 -1
  152. package/dist/scripts/shared/pull-request/github/github.js +0 -226
  153. package/dist/scripts/shared/pull-request/github/github.js.map +0 -1
  154. package/dist/scripts/shared/pull-request/gitlab/gitlab.d.ts +0 -74
  155. package/dist/scripts/shared/pull-request/gitlab/gitlab.d.ts.map +0 -1
  156. package/dist/scripts/shared/pull-request/gitlab/gitlab.js +0 -220
  157. package/dist/scripts/shared/pull-request/gitlab/gitlab.js.map +0 -1
  158. package/dist/scripts/shared/pull-request/post-pr/post-pr.d.ts +0 -31
  159. package/dist/scripts/shared/pull-request/post-pr/post-pr.d.ts.map +0 -1
  160. package/dist/scripts/shared/pull-request/post-pr/post-pr.js +0 -61
  161. package/dist/scripts/shared/pull-request/post-pr/post-pr.js.map +0 -1
  162. package/dist/scripts/shared/pull-request/pr-body/pr-body.d.ts +0 -41
  163. package/dist/scripts/shared/pull-request/pr-body/pr-body.d.ts.map +0 -1
  164. package/dist/scripts/shared/pull-request/pr-body/pr-body.js +0 -93
  165. package/dist/scripts/shared/pull-request/pr-body/pr-body.js.map +0 -1
  166. package/dist/scripts/shared/pull-request/rework-comment/rework-comment.d.ts +0 -23
  167. package/dist/scripts/shared/pull-request/rework-comment/rework-comment.d.ts.map +0 -1
  168. package/dist/scripts/shared/pull-request/rework-comment/rework-comment.js +0 -30
  169. package/dist/scripts/shared/pull-request/rework-comment/rework-comment.js.map +0 -1
  170. package/dist/scripts/shared/remote/remote.d.ts +0 -41
  171. package/dist/scripts/shared/remote/remote.d.ts.map +0 -1
  172. package/dist/scripts/shared/remote/remote.js +0 -227
  173. package/dist/scripts/shared/remote/remote.js.map +0 -1
  174. package/dist/types/board.d.ts +0 -13
  175. package/dist/types/board.d.ts.map +0 -1
  176. package/dist/types/board.js +0 -5
  177. package/dist/types/board.js.map +0 -1
  178. package/dist/types/index.d.ts +0 -4
  179. package/dist/types/index.d.ts.map +0 -1
  180. package/dist/types/index.js +0 -2
  181. package/dist/types/index.js.map +0 -1
  182. package/dist/types/remote.d.ts +0 -55
  183. package/dist/types/remote.d.ts.map +0 -1
  184. package/dist/types/remote.js +0 -5
  185. package/dist/types/remote.js.map +0 -1
  186. package/dist/utils/parse-json/parse-json.d.ts +0 -20
  187. package/dist/utils/parse-json/parse-json.d.ts.map +0 -1
  188. package/dist/utils/parse-json/parse-json.js +0 -27
  189. package/dist/utils/parse-json/parse-json.js.map +0 -1
@@ -1,60 +0,0 @@
1
- /**
2
- * Claude CLI invocation for ticket implementation.
3
- *
4
- * Spawns `claude --dangerously-skip-permissions` with the prompt piped
5
- * to stdin. Output streams live to the user's terminal.
6
- */
7
- import { spawnSync } from 'node:child_process';
8
- /**
9
- * Invoke Claude in print mode and capture the response.
10
- *
11
- * Uses `claude -p` for a single-prompt, non-interactive invocation.
12
- * Stdout is captured (not streamed) so the caller can parse it.
13
- *
14
- * @param prompt - The prompt to send.
15
- * @param model - Optional model override.
16
- * @returns The captured stdout and whether the process succeeded.
17
- */
18
- export function invokeClaudePrint(prompt, model) {
19
- const args = ['-p', '--dangerously-skip-permissions'];
20
- if (model) {
21
- args.push('--model', model);
22
- }
23
- const result = spawnSync('claude', args, {
24
- input: prompt,
25
- stdio: ['pipe', 'pipe', 'pipe'],
26
- encoding: 'utf8',
27
- });
28
- return {
29
- stdout: result.stdout ?? '',
30
- ok: result.status === 0 && !result.error,
31
- };
32
- }
33
- /**
34
- * Invoke a Claude Code session with the given prompt.
35
- *
36
- * Pipes the prompt to stdin and streams stdout/stderr live.
37
- * Uses `--dangerously-skip-permissions` for autonomous operation.
38
- *
39
- * @param prompt - The full implementation prompt.
40
- * @param model - Optional model override (e.g., `'opus'`, `'sonnet'`).
41
- * @returns `true` if Claude exited successfully (code 0), `false` otherwise.
42
- *
43
- * @example
44
- * ```ts
45
- * invokeClaudeSession('You are implementing PROJ-123...', 'opus');
46
- * ```
47
- */
48
- export function invokeClaudeSession(prompt, model) {
49
- const args = ['--dangerously-skip-permissions'];
50
- if (model) {
51
- args.push('--model', model);
52
- }
53
- const result = spawnSync('claude', args, {
54
- input: prompt,
55
- stdio: ['pipe', 'inherit', 'inherit'],
56
- encoding: 'utf8',
57
- });
58
- return result.status === 0 && !result.error;
59
- }
60
- //# sourceMappingURL=claude-cli.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"claude-cli.js","sourceRoot":"","sources":["../../../../src/scripts/shared/claude-cli/claude-cli.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAAc,EACd,KAAc;IAEd,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,gCAAgC,CAAC,CAAC;IAEtD,IAAI,KAAK,EAAE,CAAC;QACV,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE;QACvC,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;QAC/B,QAAQ,EAAE,MAAM;KACjB,CAAC,CAAC;IAEH,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE;QAC3B,EAAE,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;KACzC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAc,EAAE,KAAc;IAChE,MAAM,IAAI,GAAG,CAAC,gCAAgC,CAAC,CAAC;IAEhD,IAAI,KAAK,EAAE,CAAC;QACV,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE;QACvC,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC;QACrC,QAAQ,EAAE,MAAM;KACjB,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;AAC9C,CAAC"}
@@ -1,27 +0,0 @@
1
- /**
2
- * Board detection from raw `.clancy/.env` variables.
3
- *
4
- * Validates env vars against Zod schemas and returns a typed
5
- * discriminated union for the detected board provider.
6
- */
7
- import type { BoardConfig } from '../../../schemas/env.js';
8
- export type { BoardConfig, GitHubEnv, JiraEnv, LinearEnv, SharedEnv, } from '../../../schemas/env.js';
9
- /**
10
- * Detect which board is configured from raw env vars and return a typed config.
11
- *
12
- * Detection priority: Jira → GitHub → Linear (checked by presence of
13
- * board-specific required keys). Returns the first match.
14
- *
15
- * @param raw - The raw key-value record from `.clancy/.env`.
16
- * @returns A typed `BoardConfig` or an error string if no board is detected
17
- * or validation fails.
18
- *
19
- * @example
20
- * ```ts
21
- * const result = detectBoard({ GITHUB_TOKEN: 'ghp_xxx', GITHUB_REPO: 'acme/app' });
22
- * if (typeof result === 'string') console.error(result);
23
- * else console.log(result.provider); // 'github'
24
- * ```
25
- */
26
- export declare function detectBoard(raw: Record<string, string>): BoardConfig | string;
27
- //# sourceMappingURL=env-schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"env-schema.d.ts","sourceRoot":"","sources":["../../../../src/scripts/shared/env-schema/env-schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAQpD,YAAY,EACV,WAAW,EACX,SAAS,EACT,OAAO,EACP,SAAS,EACT,SAAS,GACV,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,WAAW,GAAG,MAAM,CAoC7E"}
@@ -1,47 +0,0 @@
1
- import { githubEnvSchema, jiraEnvSchema, linearEnvSchema, } from '../../../schemas/env.js';
2
- /**
3
- * Detect which board is configured from raw env vars and return a typed config.
4
- *
5
- * Detection priority: Jira → GitHub → Linear (checked by presence of
6
- * board-specific required keys). Returns the first match.
7
- *
8
- * @param raw - The raw key-value record from `.clancy/.env`.
9
- * @returns A typed `BoardConfig` or an error string if no board is detected
10
- * or validation fails.
11
- *
12
- * @example
13
- * ```ts
14
- * const result = detectBoard({ GITHUB_TOKEN: 'ghp_xxx', GITHUB_REPO: 'acme/app' });
15
- * if (typeof result === 'string') console.error(result);
16
- * else console.log(result.provider); // 'github'
17
- * ```
18
- */
19
- export function detectBoard(raw) {
20
- // Jira — check for JIRA_BASE_URL as the distinguishing key
21
- if (raw.JIRA_BASE_URL) {
22
- const parsed = jiraEnvSchema.safeParse(raw);
23
- if (!parsed.success) {
24
- return `✗ Jira env validation failed: ${parsed.error.message}`;
25
- }
26
- return { provider: 'jira', env: parsed.data };
27
- }
28
- // GitHub — check for GITHUB_TOKEN + GITHUB_REPO (GITHUB_TOKEN alone may be
29
- // a git host token for Jira/Linear users, not a GitHub Issues board)
30
- if (raw.GITHUB_TOKEN && raw.GITHUB_REPO) {
31
- const parsed = githubEnvSchema.safeParse(raw);
32
- if (!parsed.success) {
33
- return `✗ GitHub env validation failed: ${parsed.error.message}`;
34
- }
35
- return { provider: 'github', env: parsed.data };
36
- }
37
- // Linear — check for LINEAR_API_KEY as the distinguishing key
38
- if (raw.LINEAR_API_KEY) {
39
- const parsed = linearEnvSchema.safeParse(raw);
40
- if (!parsed.success) {
41
- return `✗ Linear env validation failed: ${parsed.error.message}`;
42
- }
43
- return { provider: 'linear', env: parsed.data };
44
- }
45
- return '✗ No board detected — set Jira, GitHub, or Linear credentials in .clancy/.env';
46
- }
47
- //# sourceMappingURL=env-schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"env-schema.js","sourceRoot":"","sources":["../../../../src/scripts/shared/env-schema/env-schema.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAW1B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,WAAW,CAAC,GAA2B;IACrD,2DAA2D;IAC3D,IAAI,GAAG,CAAC,aAAa,EAAE,CAAC;QACtB,MAAM,MAAM,GAAG,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAE5C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,iCAAiC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACjE,CAAC;QAED,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IAChD,CAAC;IAED,2EAA2E;IAC3E,qEAAqE;IACrE,IAAI,GAAG,CAAC,YAAY,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC;QACxC,MAAM,MAAM,GAAG,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAE9C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,mCAAmC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACnE,CAAC;QAED,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IAClD,CAAC;IAED,8DAA8D;IAC9D,IAAI,GAAG,CAAC,cAAc,EAAE,CAAC;QACvB,MAAM,MAAM,GAAG,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAE9C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,mCAAmC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACnE,CAAC;QAED,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IAClD,CAAC;IAED,OAAO,+EAA+E,CAAC;AACzF,CAAC"}
@@ -1,30 +0,0 @@
1
- export type FeasibilityResult = {
2
- feasible: boolean;
3
- reason?: string;
4
- };
5
- /**
6
- * Build the feasibility evaluation prompt.
7
- */
8
- export declare function buildFeasibilityPrompt(ticket: {
9
- key: string;
10
- title: string;
11
- description: string;
12
- }): string;
13
- /**
14
- * Parse the raw Claude output into a feasibility result.
15
- *
16
- * Fails open — malformed or empty output is treated as feasible.
17
- */
18
- export declare function parseFeasibilityResponse(stdout: string): FeasibilityResult;
19
- /**
20
- * Run a feasibility check for a ticket.
21
- *
22
- * @returns A result indicating whether the ticket is feasible and an
23
- * optional reason if not.
24
- */
25
- export declare function checkFeasibility(ticket: {
26
- key: string;
27
- title: string;
28
- description: string;
29
- }, model?: string): FeasibilityResult;
30
- //# sourceMappingURL=feasibility.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feasibility.d.ts","sourceRoot":"","sources":["../../../../src/scripts/shared/feasibility/feasibility.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,MAAM,CAyBT;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,CAU1E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EAC3D,KAAK,CAAC,EAAE,MAAM,GACb,iBAAiB,CAQnB"}
@@ -1,68 +0,0 @@
1
- /**
2
- * Lightweight feasibility check — evaluates whether a ticket can be
3
- * implemented as pure code changes before creating branches or
4
- * transitioning board status.
5
- *
6
- * Uses `claude -p` (print mode) for a fast, single-prompt evaluation.
7
- * Fails open: if Claude is unavailable or output is malformed the
8
- * ticket is assumed feasible so work is never silently blocked.
9
- */
10
- import { invokeClaudePrint } from '../../../scripts/shared/claude-cli/claude-cli.js';
11
- /**
12
- * Build the feasibility evaluation prompt.
13
- */
14
- export function buildFeasibilityPrompt(ticket) {
15
- return [
16
- 'You are evaluating whether a ticket can be implemented as pure code changes in a repository.',
17
- '',
18
- `Ticket: [${ticket.key}] ${ticket.title}`,
19
- 'Description:',
20
- ticket.description,
21
- '',
22
- 'Can this ticket be completed entirely through code changes committed to a git repository?',
23
- '',
24
- 'Answer INFEASIBLE if the ticket requires ANY of:',
25
- '- Manual testing or configuration in external tools or admin panels',
26
- '- Access to external services, APIs, or platforms not available in the codebase',
27
- '- Physical, hardware, or infrastructure changes',
28
- '- Design assets that do not yet exist',
29
- '- Deployment or infrastructure changes outside the repository',
30
- '- Human judgment calls that require stakeholder input',
31
- '',
32
- 'Answer with exactly one line in this format:',
33
- 'FEASIBLE',
34
- 'or',
35
- 'INFEASIBLE: one-line reason',
36
- '',
37
- 'Do not include any other text.',
38
- ].join('\n');
39
- }
40
- /**
41
- * Parse the raw Claude output into a feasibility result.
42
- *
43
- * Fails open — malformed or empty output is treated as feasible.
44
- */
45
- export function parseFeasibilityResponse(stdout) {
46
- const line = stdout.trim().split('\n').pop()?.trim() ?? '';
47
- if (/^INFEASIBLE/i.test(line)) {
48
- const reason = line.replace(/^INFEASIBLE:?\s*/i, '').trim() || undefined;
49
- return { feasible: false, reason };
50
- }
51
- // Fail open — FEASIBLE, empty, or malformed output all pass
52
- return { feasible: true };
53
- }
54
- /**
55
- * Run a feasibility check for a ticket.
56
- *
57
- * @returns A result indicating whether the ticket is feasible and an
58
- * optional reason if not.
59
- */
60
- export function checkFeasibility(ticket, model) {
61
- const prompt = buildFeasibilityPrompt(ticket);
62
- const { stdout, ok } = invokeClaudePrint(prompt, model);
63
- // Fail open — if Claude failed to run, assume feasible
64
- if (!ok)
65
- return { feasible: true };
66
- return parseFeasibilityResponse(stdout);
67
- }
68
- //# sourceMappingURL=feasibility.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feasibility.js","sourceRoot":"","sources":["../../../../src/scripts/shared/feasibility/feasibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAO9E;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAItC;IACC,OAAO;QACL,8FAA8F;QAC9F,EAAE;QACF,YAAY,MAAM,CAAC,GAAG,KAAK,MAAM,CAAC,KAAK,EAAE;QACzC,cAAc;QACd,MAAM,CAAC,WAAW;QAClB,EAAE;QACF,2FAA2F;QAC3F,EAAE;QACF,kDAAkD;QAClD,qEAAqE;QACrE,iFAAiF;QACjF,iDAAiD;QACjD,uCAAuC;QACvC,+DAA+D;QAC/D,uDAAuD;QACvD,EAAE;QACF,8CAA8C;QAC9C,UAAU;QACV,IAAI;QACJ,6BAA6B;QAC7B,EAAE;QACF,gCAAgC;KACjC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAAc;IACrD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAE3D,IAAI,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9B,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,SAAS,CAAC;QACzE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IACrC,CAAC;IAED,4DAA4D;IAC5D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC5B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAA2D,EAC3D,KAAc;IAEd,MAAM,MAAM,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC9C,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,iBAAiB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAExD,uDAAuD;IACvD,IAAI,CAAC,EAAE;QAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAEnC,OAAO,wBAAwB,CAAC,MAAM,CAAC,CAAC;AAC1C,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * Shared formatting utilities.
3
- */
4
- /**
5
- * Format a duration in milliseconds to a human-readable string.
6
- *
7
- * @param ms - Duration in milliseconds.
8
- * @returns Formatted string like `30s`, `1m 30s`, or `5m`.
9
- */
10
- export declare function formatDuration(ms: number): string;
11
- //# sourceMappingURL=format.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/scripts/shared/format/format.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAejD"}
@@ -1,23 +0,0 @@
1
- /**
2
- * Shared formatting utilities.
3
- */
4
- /**
5
- * Format a duration in milliseconds to a human-readable string.
6
- *
7
- * @param ms - Duration in milliseconds.
8
- * @returns Formatted string like `30s`, `1m 30s`, or `5m`.
9
- */
10
- export function formatDuration(ms) {
11
- const secs = Math.floor(ms / 1000);
12
- if (secs < 60)
13
- return `${secs}s`;
14
- const mins = Math.floor(secs / 60);
15
- const remSecs = secs % 60;
16
- if (mins < 60) {
17
- return remSecs > 0 ? `${mins}m ${remSecs}s` : `${mins}m`;
18
- }
19
- const hours = Math.floor(mins / 60);
20
- const remMins = mins % 60;
21
- return remMins > 0 ? `${hours}h ${remMins}m` : `${hours}h`;
22
- }
23
- //# sourceMappingURL=format.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"format.js","sourceRoot":"","sources":["../../../../src/scripts/shared/format/format.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,EAAU;IACvC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;IACnC,IAAI,IAAI,GAAG,EAAE;QAAE,OAAO,GAAG,IAAI,GAAG,CAAC;IAEjC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;IACnC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;IAE1B,IAAI,IAAI,GAAG,EAAE,EAAE,CAAC;QACd,OAAO,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC;IAC3D,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;IACpC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;IAE1B,OAAO,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC;AAC7D,CAAC"}
@@ -1,90 +0,0 @@
1
- /**
2
- * Get the name of the currently checked-out branch.
3
- *
4
- * @returns The current branch name.
5
- */
6
- export declare function currentBranch(): string;
7
- /**
8
- * Check whether the working directory has uncommitted changes.
9
- *
10
- * @returns `true` if there are staged or unstaged changes.
11
- */
12
- export declare function hasUncommittedChanges(): boolean;
13
- /**
14
- * Check whether a local branch exists.
15
- *
16
- * @param branch - The branch name to check.
17
- * @returns `true` if the branch exists locally.
18
- */
19
- export declare function branchExists(branch: string): boolean;
20
- /**
21
- * Create a branch from a base branch if it doesn't already exist.
22
- *
23
- * @param branch - The branch name to create.
24
- * @param baseBranch - The base branch to create from.
25
- */
26
- export declare function ensureBranch(branch: string, baseBranch: string): void;
27
- /**
28
- * Check out a branch. Uses `-B` flag to force-create if needed.
29
- *
30
- * @param branch - The branch name to check out.
31
- * @param force - If `true`, uses `-B` to force-create/reset the branch.
32
- */
33
- export declare function checkout(branch: string, force?: boolean): void;
34
- /**
35
- * Squash merge a source branch into the currently checked-out branch
36
- * and commit with the given message.
37
- *
38
- * @param sourceBranch - The branch to squash merge from.
39
- * @param commitMessage - The commit message for the squash merge.
40
- * @returns `true` if changes were committed, `false` if there was nothing to commit.
41
- */
42
- export declare function squashMerge(sourceBranch: string, commitMessage: string): boolean;
43
- /**
44
- * Delete a local branch (force).
45
- *
46
- * Uses `-D` because squash merges leave the branch in an "unmerged" state
47
- * from git's perspective, causing `-d` to fail.
48
- *
49
- * @param branch - The branch name to delete.
50
- */
51
- export declare function deleteBranch(branch: string): void;
52
- /**
53
- * Check whether a branch exists on the remote (without fetching it).
54
- *
55
- * Uses `git ls-remote --heads origin {branch}` for a lightweight check.
56
- *
57
- * @param branch - The branch name to check.
58
- * @returns `true` if the branch exists on the remote.
59
- */
60
- export declare function remoteBranchExists(branch: string): boolean;
61
- /**
62
- * Fetch a remote branch into a local branch of the same name.
63
- *
64
- * Runs `git fetch origin {branch}:{branch}`.
65
- *
66
- * @param branch - The branch name to fetch from the remote.
67
- * @returns `true` if the fetch succeeded, `false` if the branch doesn't exist on the remote.
68
- */
69
- export declare function fetchRemoteBranch(branch: string): boolean;
70
- /**
71
- * Get the diff stat between the current branch and a target branch.
72
- *
73
- * Returns the `--stat` summary, or `undefined` if the diff fails.
74
- * Truncated to `maxLength` characters to avoid oversized prompts.
75
- *
76
- * @param targetBranch - The branch to diff against.
77
- * @param maxLength - Maximum output length (default 8000).
78
- * @returns The diff stat output, or `undefined` on failure.
79
- */
80
- export declare function diffAgainstBranch(targetBranch: string, maxLength?: number): string | undefined;
81
- /**
82
- * Push a branch to the remote origin.
83
- *
84
- * Uses `-u` to set up upstream tracking.
85
- *
86
- * @param branch - The branch name to push.
87
- * @returns `true` if the push succeeded, `false` on failure.
88
- */
89
- export declare function pushBranch(branch: string): boolean;
90
- //# sourceMappingURL=git-ops.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"git-ops.d.ts","sourceRoot":"","sources":["../../../../src/scripts/shared/git-ops/git-ops.ts"],"names":[],"mappings":"AAkBA;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CAQ/C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAapD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAIrE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,UAAQ,GAAG,IAAI,CAE5D;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,GACpB,OAAO,CAUT;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEjD;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAW1D;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAUzD;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,MAAM,EACpB,SAAS,SAAO,GACf,MAAM,GAAG,SAAS,CAiBpB;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAUlD"}
@@ -1,190 +0,0 @@
1
- /**
2
- * Git operations shared across board scripts.
3
- *
4
- * Wraps common git commands used during the ticket lifecycle:
5
- * branch creation, checkout, squash merge, and cleanup.
6
- */
7
- import { execFileSync } from 'node:child_process';
8
- /**
9
- * Run a git command and return trimmed stdout.
10
- *
11
- * @param args - The git sub-command and its arguments.
12
- * @returns The trimmed stdout output.
13
- */
14
- function git(...args) {
15
- return execFileSync('git', args, { encoding: 'utf8' }).trim();
16
- }
17
- /**
18
- * Get the name of the currently checked-out branch.
19
- *
20
- * @returns The current branch name.
21
- */
22
- export function currentBranch() {
23
- return git('rev-parse', '--abbrev-ref', 'HEAD');
24
- }
25
- /**
26
- * Check whether the working directory has uncommitted changes.
27
- *
28
- * @returns `true` if there are staged or unstaged changes.
29
- */
30
- export function hasUncommittedChanges() {
31
- try {
32
- execFileSync('git', ['diff', '--quiet'], { stdio: 'ignore' });
33
- execFileSync('git', ['diff', '--cached', '--quiet'], { stdio: 'ignore' });
34
- return false;
35
- }
36
- catch {
37
- return true;
38
- }
39
- }
40
- /**
41
- * Check whether a local branch exists.
42
- *
43
- * @param branch - The branch name to check.
44
- * @returns `true` if the branch exists locally.
45
- */
46
- export function branchExists(branch) {
47
- try {
48
- execFileSync('git', ['show-ref', '--verify', '--quiet', `refs/heads/${branch}`], {
49
- stdio: 'ignore',
50
- });
51
- return true;
52
- }
53
- catch {
54
- return false;
55
- }
56
- }
57
- /**
58
- * Create a branch from a base branch if it doesn't already exist.
59
- *
60
- * @param branch - The branch name to create.
61
- * @param baseBranch - The base branch to create from.
62
- */
63
- export function ensureBranch(branch, baseBranch) {
64
- if (!branchExists(branch)) {
65
- git('checkout', '-b', branch, baseBranch);
66
- }
67
- }
68
- /**
69
- * Check out a branch. Uses `-B` flag to force-create if needed.
70
- *
71
- * @param branch - The branch name to check out.
72
- * @param force - If `true`, uses `-B` to force-create/reset the branch.
73
- */
74
- export function checkout(branch, force = false) {
75
- git('checkout', ...(force ? ['-B'] : []), branch);
76
- }
77
- /**
78
- * Squash merge a source branch into the currently checked-out branch
79
- * and commit with the given message.
80
- *
81
- * @param sourceBranch - The branch to squash merge from.
82
- * @param commitMessage - The commit message for the squash merge.
83
- * @returns `true` if changes were committed, `false` if there was nothing to commit.
84
- */
85
- export function squashMerge(sourceBranch, commitMessage) {
86
- git('merge', '--squash', sourceBranch);
87
- try {
88
- execFileSync('git', ['diff', '--cached', '--quiet'], { stdio: 'ignore' });
89
- return false; // nothing staged
90
- }
91
- catch {
92
- execFileSync('git', ['commit', '-m', commitMessage], { encoding: 'utf8' });
93
- return true;
94
- }
95
- }
96
- /**
97
- * Delete a local branch (force).
98
- *
99
- * Uses `-D` because squash merges leave the branch in an "unmerged" state
100
- * from git's perspective, causing `-d` to fail.
101
- *
102
- * @param branch - The branch name to delete.
103
- */
104
- export function deleteBranch(branch) {
105
- git('branch', '-D', branch);
106
- }
107
- /**
108
- * Check whether a branch exists on the remote (without fetching it).
109
- *
110
- * Uses `git ls-remote --heads origin {branch}` for a lightweight check.
111
- *
112
- * @param branch - The branch name to check.
113
- * @returns `true` if the branch exists on the remote.
114
- */
115
- export function remoteBranchExists(branch) {
116
- try {
117
- const output = execFileSync('git', ['ls-remote', '--heads', 'origin', branch], { encoding: 'utf8', timeout: 15000 }).trim();
118
- return output.length > 0;
119
- }
120
- catch {
121
- return false;
122
- }
123
- }
124
- /**
125
- * Fetch a remote branch into a local branch of the same name.
126
- *
127
- * Runs `git fetch origin {branch}:{branch}`.
128
- *
129
- * @param branch - The branch name to fetch from the remote.
130
- * @returns `true` if the fetch succeeded, `false` if the branch doesn't exist on the remote.
131
- */
132
- export function fetchRemoteBranch(branch) {
133
- try {
134
- execFileSync('git', ['fetch', 'origin', `${branch}:${branch}`], {
135
- encoding: 'utf8',
136
- stdio: ['pipe', 'pipe', 'pipe'],
137
- });
138
- return true;
139
- }
140
- catch {
141
- return false;
142
- }
143
- }
144
- /**
145
- * Get the diff stat between the current branch and a target branch.
146
- *
147
- * Returns the `--stat` summary, or `undefined` if the diff fails.
148
- * Truncated to `maxLength` characters to avoid oversized prompts.
149
- *
150
- * @param targetBranch - The branch to diff against.
151
- * @param maxLength - Maximum output length (default 8000).
152
- * @returns The diff stat output, or `undefined` on failure.
153
- */
154
- export function diffAgainstBranch(targetBranch, maxLength = 8000) {
155
- try {
156
- const output = execFileSync('git', ['diff', `${targetBranch}...HEAD`, '--stat'], {
157
- encoding: 'utf8',
158
- timeout: 10000,
159
- }).trim();
160
- if (!output)
161
- return undefined;
162
- return output.length > maxLength
163
- ? output.slice(0, maxLength) + '\n... (truncated)'
164
- : output;
165
- }
166
- catch {
167
- return undefined;
168
- }
169
- }
170
- /**
171
- * Push a branch to the remote origin.
172
- *
173
- * Uses `-u` to set up upstream tracking.
174
- *
175
- * @param branch - The branch name to push.
176
- * @returns `true` if the push succeeded, `false` on failure.
177
- */
178
- export function pushBranch(branch) {
179
- try {
180
- execFileSync('git', ['push', '-u', 'origin', branch], {
181
- encoding: 'utf8',
182
- stdio: ['pipe', 'pipe', 'pipe'],
183
- });
184
- return true;
185
- }
186
- catch {
187
- return false;
188
- }
189
- }
190
- //# sourceMappingURL=git-ops.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"git-ops.js","sourceRoot":"","sources":["../../../../src/scripts/shared/git-ops/git-ops.ts"],"names":[],"mappings":"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"}
@@ -1,54 +0,0 @@
1
- /**
2
- * Shared HTTP helpers for board scripts.
3
- *
4
- * Provides a generic ping function and header builders to reduce
5
- * boilerplate across Jira, GitHub, and Linear integrations.
6
- */
7
- /** Default GitHub API base URL. */
8
- export declare const GITHUB_API = "https://api.github.com";
9
- /** Standard error messages mapped to HTTP status codes. */
10
- type StatusErrorMap = Record<number, string>;
11
- /** Result from a ping or connectivity check. */
12
- export type PingResult = {
13
- ok: boolean;
14
- error?: string;
15
- };
16
- /**
17
- * Ping an API endpoint and map common HTTP error codes to messages.
18
- *
19
- * Returns `{ ok: true }` on success, or `{ ok: false, error }` with
20
- * a human-readable message on failure.
21
- *
22
- * @param url - The URL to ping.
23
- * @param headers - HTTP headers to send.
24
- * @param statusErrors - Map of HTTP status codes to error messages.
25
- * @param networkError - Error message for network failures.
26
- * @returns A ping result with `ok` and optional `error`.
27
- *
28
- * @example
29
- * ```ts
30
- * const result = await pingEndpoint(
31
- * 'https://api.github.com/repos/owner/repo',
32
- * { Authorization: 'Bearer tok_xxx' },
33
- * { 401: '✗ Auth failed', 404: '✗ Not found' },
34
- * '✗ Could not reach GitHub',
35
- * );
36
- * ```
37
- */
38
- export declare function pingEndpoint(url: string, headers: Record<string, string>, statusErrors: StatusErrorMap, networkError: string): Promise<PingResult>;
39
- /**
40
- * Build standard GitHub API request headers.
41
- *
42
- * @param token - The GitHub personal access token.
43
- * @returns Headers object for GitHub REST API requests.
44
- */
45
- export declare function githubHeaders(token: string): Record<string, string>;
46
- /**
47
- * Build standard Jira API request headers.
48
- *
49
- * @param auth - The Base64-encoded Basic auth string.
50
- * @returns Headers object for Jira REST API requests.
51
- */
52
- export declare function jiraHeaders(auth: string): Record<string, string>;
53
- export {};
54
- //# sourceMappingURL=http.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../../src/scripts/shared/http/http.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,mCAAmC;AACnC,eAAO,MAAM,UAAU,2BAA2B,CAAC;AAEnD,2DAA2D;AAC3D,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE7C,gDAAgD;AAChD,MAAM,MAAM,UAAU,GAAG;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,YAAY,CAChC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,YAAY,EAAE,cAAc,EAC5B,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,UAAU,CAAC,CAqBrB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMnE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAKhE"}