@shepai/cli 1.49.1 → 1.51.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 (124) hide show
  1. package/apis/json-schema/AgentType.yaml +1 -0
  2. package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts +11 -0
  3. package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts.map +1 -1
  4. package/dist/packages/core/src/application/use-cases/agents/configure-agent.use-case.d.ts.map +1 -1
  5. package/dist/packages/core/src/application/use-cases/agents/configure-agent.use-case.js +6 -4
  6. package/dist/packages/core/src/domain/generated/output.d.ts +2 -1
  7. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  8. package/dist/packages/core/src/domain/generated/output.js +1 -0
  9. package/dist/packages/core/src/infrastructure/services/agents/common/agent-executor-factory.service.d.ts.map +1 -1
  10. package/dist/packages/core/src/infrastructure/services/agents/common/agent-executor-factory.service.js +10 -1
  11. package/dist/packages/core/src/infrastructure/services/agents/common/agent-validator.service.d.ts.map +1 -1
  12. package/dist/packages/core/src/infrastructure/services/agents/common/agent-validator.service.js +3 -0
  13. package/dist/packages/core/src/infrastructure/services/agents/common/executors/dev-executor.service.d.ts +12 -0
  14. package/dist/packages/core/src/infrastructure/services/agents/common/executors/dev-executor.service.d.ts.map +1 -0
  15. package/dist/packages/core/src/infrastructure/services/agents/common/executors/dev-executor.service.js +128 -0
  16. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/plan.fixture.d.ts +8 -0
  17. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/plan.fixture.d.ts.map +1 -0
  18. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/plan.fixture.js +94 -0
  19. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/research.fixture.d.ts +8 -0
  20. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/research.fixture.d.ts.map +1 -0
  21. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/research.fixture.js +140 -0
  22. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/spec-analyze.fixture.d.ts +8 -0
  23. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/spec-analyze.fixture.d.ts.map +1 -0
  24. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/spec-analyze.fixture.js +81 -0
  25. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/spec-requirements.fixture.d.ts +8 -0
  26. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/spec-requirements.fixture.d.ts.map +1 -0
  27. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/spec-requirements.fixture.js +131 -0
  28. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/tasks.fixture.d.ts +6 -0
  29. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/tasks.fixture.d.ts.map +1 -0
  30. package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/tasks.fixture.js +146 -0
  31. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
  32. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +1 -0
  33. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge.node.d.ts +5 -0
  34. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge.node.d.ts.map +1 -1
  35. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge.node.js +16 -4
  36. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.d.ts +1 -1
  37. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.d.ts.map +1 -1
  38. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.js +3 -2
  39. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts +1 -0
  40. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts.map +1 -1
  41. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.js +11 -0
  42. package/dist/packages/core/src/infrastructure/services/notifications/notification-watcher.service.d.ts +1 -0
  43. package/dist/packages/core/src/infrastructure/services/notifications/notification-watcher.service.d.ts.map +1 -1
  44. package/dist/packages/core/src/infrastructure/services/notifications/notification-watcher.service.js +20 -11
  45. package/dist/src/presentation/cli/commands/feat/ls.command.d.ts.map +1 -1
  46. package/dist/src/presentation/cli/commands/feat/ls.command.js +92 -39
  47. package/dist/src/presentation/cli/commands/feat/show.command.js +10 -10
  48. package/dist/src/presentation/cli/commands/settings/agent.command.js +3 -3
  49. package/dist/src/presentation/tui/prompts/agent-select.prompt.d.ts +8 -4
  50. package/dist/src/presentation/tui/prompts/agent-select.prompt.d.ts.map +1 -1
  51. package/dist/src/presentation/tui/prompts/agent-select.prompt.js +10 -5
  52. package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.d.ts +1 -1
  53. package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.d.ts.map +1 -1
  54. package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.js +6 -0
  55. package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.stories.d.ts +1 -0
  56. package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.stories.d.ts.map +1 -1
  57. package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.stories.js +7 -0
  58. package/dist/tsconfig.build.tsbuildinfo +1 -1
  59. package/package.json +1 -1
  60. package/web/.next/BUILD_ID +1 -1
  61. package/web/.next/build-manifest.json +2 -2
  62. package/web/.next/cache/.previewinfo +1 -1
  63. package/web/.next/cache/.rscinfo +1 -1
  64. package/web/.next/cache/.tsbuildinfo +1 -1
  65. package/web/.next/cache/config.json +3 -3
  66. package/web/.next/fallback-build-manifest.json +2 -2
  67. package/web/.next/prerender-manifest.json +3 -3
  68. package/web/.next/required-server-files.js +1 -1
  69. package/web/.next/required-server-files.json +1 -1
  70. package/web/.next/server/app/_global-error.html +2 -2
  71. package/web/.next/server/app/_global-error.rsc +1 -1
  72. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  73. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  74. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  75. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  76. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  77. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  78. package/web/.next/server/app/page/server-reference-manifest.json +14 -14
  79. package/web/.next/server/app/page_client-reference-manifest.js +1 -1
  80. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  81. package/web/.next/server/chunks/ssr/[root-of-the-server]__03a0dba7._.js +4 -4
  82. package/web/.next/server/chunks/ssr/[root-of-the-server]__03a0dba7._.js.map +1 -1
  83. package/web/.next/server/chunks/ssr/[root-of-the-server]__249c74f6._.js +1 -1
  84. package/web/.next/server/chunks/ssr/[root-of-the-server]__2d1a8e37._.js +2 -2
  85. package/web/.next/server/chunks/ssr/_1fafa9db._.js +1 -1
  86. package/web/.next/server/chunks/ssr/_1fafa9db._.js.map +1 -1
  87. package/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js +1 -1
  88. package/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js.map +1 -1
  89. package/web/.next/server/pages/500.html +2 -2
  90. package/web/.next/server/server-reference-manifest.js +1 -1
  91. package/web/.next/server/server-reference-manifest.json +15 -15
  92. package/web/.next/standalone/src/presentation/web/.next/BUILD_ID +1 -1
  93. package/web/.next/standalone/src/presentation/web/.next/build-manifest.json +2 -2
  94. package/web/.next/standalone/src/presentation/web/.next/prerender-manifest.json +3 -3
  95. package/web/.next/standalone/src/presentation/web/.next/required-server-files.json +1 -1
  96. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.html +2 -2
  97. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.rsc +1 -1
  98. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  99. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  100. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  101. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  102. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  103. package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  104. package/web/.next/standalone/src/presentation/web/.next/server/app/page/server-reference-manifest.json +14 -14
  105. package/web/.next/standalone/src/presentation/web/.next/server/app/page_client-reference-manifest.js +1 -1
  106. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  107. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__03a0dba7._.js +4 -4
  108. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__249c74f6._.js +1 -1
  109. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__2d1a8e37._.js +2 -2
  110. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_1fafa9db._.js +1 -1
  111. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js +1 -1
  112. package/web/.next/standalone/src/presentation/web/.next/server/pages/500.html +2 -2
  113. package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.js +1 -1
  114. package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.json +15 -15
  115. package/web/.next/standalone/src/presentation/web/components/common/feature-node/agent-type-icons.stories.tsx +16 -0
  116. package/web/.next/standalone/src/presentation/web/components/common/feature-node/agent-type-icons.tsx +8 -1
  117. package/web/.next/standalone/src/presentation/web/server.js +1 -1
  118. package/web/.next/static/chunks/{25cab79117866d51.js → 52930750dd593d0c.js} +4 -4
  119. package/web/.next/static/chunks/{0da7a9860fa6ae05.js → f9953dad6d0c239c.js} +1 -1
  120. package/web/.next/trace +1 -1
  121. package/web/.next/trace-build +1 -1
  122. /package/web/.next/static/{y92RZZcCAiudDG54kYSQf → xkINn0kUHKOhvEvbvlh-B}/_buildManifest.js +0 -0
  123. /package/web/.next/static/{y92RZZcCAiudDG54kYSQf → xkINn0kUHKOhvEvbvlh-B}/_clientMiddlewareManifest.json +0 -0
  124. /package/web/.next/static/{y92RZZcCAiudDG54kYSQf → xkINn0kUHKOhvEvbvlh-B}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"merge-prompts.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAqCxD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GACjB,MAAM,CAyDR;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GACjB,MAAM,CAiER"}
1
+ {"version":3,"file":"merge-prompts.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAqCxD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GACjB,MAAM,CAyDR;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,UAAQ,GAChB,MAAM,CAkER"}
@@ -104,7 +104,7 @@ ${steps.join('\n')}
104
104
  * When no PR exists, performs a local merge in the ORIGINAL repo directory
105
105
  * (not the worktree, which IS the feature branch).
106
106
  */
107
- export function buildMergeSquashPrompt(state, branch, baseBranch) {
107
+ export function buildMergeSquashPrompt(state, branch, baseBranch, hasRemote = false) {
108
108
  if (state.prUrl && state.prNumber) {
109
109
  // PR path: remote merge via GitHub CLI — no local merge needed
110
110
  return `You are merging a pull request via the GitHub CLI.
@@ -127,7 +127,6 @@ export function buildMergeSquashPrompt(state, branch, baseBranch) {
127
127
  }
128
128
  // Non-PR path: local merge in the ORIGINAL repo (not the worktree)
129
129
  const originalRepo = state.repositoryPath;
130
- const hasRemote = state.push || state.openPr;
131
130
  const fetchSteps = hasRemote
132
131
  ? `2. Fetch latest: \`git fetch origin\`
133
132
  3. Checkout the base branch: \`git checkout ${baseBranch}\`
@@ -163,6 +162,8 @@ ${fetchSteps}
163
162
 
164
163
  - Use squash merge strategy to keep history clean
165
164
  - All commands MUST run in \`${originalRepo}\` (the original repo), NOT in the worktree
165
+ - NEVER remove, modify, or prune git worktrees — they are managed by the system
166
+ - Do NOT try to \`git checkout\` the feature branch — \`git merge --squash\` reads from it without checking it out
166
167
  - If conflicts arise during merge, attempt to resolve them intelligently
167
168
  - Do NOT modify any source code beyond what is needed for conflict resolution
168
169
  - Report the merge result clearly`;
@@ -22,6 +22,7 @@ export declare class GitPrService implements IGitPrService {
22
22
  watchCi(cwd: string, branch: string, timeoutMs?: number): Promise<CiStatusResult>;
23
23
  deleteBranch(cwd: string, branch: string, deleteRemote?: boolean): Promise<void>;
24
24
  getPrDiffSummary(cwd: string, baseBranch: string): Promise<DiffSummary>;
25
+ verifyMerge(cwd: string, featureBranch: string, baseBranch: string): Promise<boolean>;
25
26
  private parseGitError;
26
27
  private parseGhError;
27
28
  private parsePrNumberFromUrl;
@@ -1 +1 @@
1
- {"version":3,"file":"git-pr.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/git-pr.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wEAAwE,CAAC;AAC5G,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,aAAa,EACb,cAAc,EACf,MAAM,wEAAwE,CAAC;AAOhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBACa,YAAa,YAAW,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKxC,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAuC9C,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKpD,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAWxD,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAYvE,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAuClE,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAE,aAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IAUzF,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUnF,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAkBjE,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAuBjF,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAWhF,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAe7E,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,aAAa;CAiBtB"}
1
+ {"version":3,"file":"git-pr.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/git-pr.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wEAAwE,CAAC;AAC5G,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,aAAa,EACb,cAAc,EACf,MAAM,wEAAwE,CAAC;AAOhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBACa,YAAa,YAAW,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKxC,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAuC9C,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKpD,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAWxD,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAYvE,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAuClE,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAE,aAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IAUzF,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUnF,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAkBjE,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAuBjF,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAWhF,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAevE,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAW3F,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,aAAa;CAiBtB"}
@@ -191,6 +191,17 @@ let GitPrService = class GitPrService {
191
191
  const { stdout: logOutput } = await this.execFile('git', ['log', '--oneline', `${baseBranch}...HEAD`], { cwd });
192
192
  return this.parseDiffStat(diffStat, logOutput);
193
193
  }
194
+ async verifyMerge(cwd, featureBranch, baseBranch) {
195
+ try {
196
+ await this.execFile('git', ['merge-base', '--is-ancestor', featureBranch, baseBranch], {
197
+ cwd,
198
+ });
199
+ return true;
200
+ }
201
+ catch {
202
+ return false;
203
+ }
204
+ }
194
205
  parseGitError(error) {
195
206
  const message = error instanceof Error ? error.message : String(error);
196
207
  const cause = error instanceof Error ? error : undefined;
@@ -22,6 +22,7 @@ export declare class NotificationWatcherService {
22
22
  private readonly pollIntervalMs;
23
23
  private readonly trackedRuns;
24
24
  private intervalId;
25
+ private isBootstrapped;
25
26
  constructor(runRepository: IAgentRunRepository, phaseTimingRepository: IPhaseTimingRepository, notificationService: INotificationService, pollIntervalMs?: number);
26
27
  isRunning(): boolean;
27
28
  start(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"notification-watcher.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/notifications/notification-watcher.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAQH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4EAA4E,CAAC;AACtH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+EAA+E,CAAC;AAC5H,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8EAA8E,CAAC;AAmDzH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAsB;IACpD,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAyB;IAC/D,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAuB;IAC3D,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IACxC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAmC;IAC/D,OAAO,CAAC,UAAU,CAA+C;gBAG/D,aAAa,EAAE,mBAAmB,EAClC,qBAAqB,EAAE,sBAAsB,EAC7C,mBAAmB,EAAE,oBAAoB,EACzC,cAAc,GAAE,MAAiC;IAQnD,SAAS,IAAI,OAAO;IAIpB,KAAK,IAAI,IAAI;IAWb,IAAI,IAAI,IAAI;YAOE,IAAI;YAUJ,WAAW;IAoDzB,OAAO,CAAC,eAAe;YAgBT,qBAAqB;IAsBnC,OAAO,CAAC,kBAAkB;CAS3B;AAMD;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,aAAa,EAAE,mBAAmB,EAClC,qBAAqB,EAAE,sBAAsB,EAC7C,mBAAmB,EAAE,oBAAoB,EACzC,cAAc,CAAC,EAAE,MAAM,GACtB,IAAI,CAWN;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,0BAA0B,CAQnE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAK/C"}
1
+ {"version":3,"file":"notification-watcher.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/notifications/notification-watcher.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAQH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4EAA4E,CAAC;AACtH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+EAA+E,CAAC;AAC5H,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8EAA8E,CAAC;AAmDzH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAsB;IACpD,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAyB;IAC/D,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAuB;IAC3D,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IACxC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAmC;IAC/D,OAAO,CAAC,UAAU,CAA+C;IAEjE,OAAO,CAAC,cAAc,CAAS;gBAG7B,aAAa,EAAE,mBAAmB,EAClC,qBAAqB,EAAE,sBAAsB,EAC7C,mBAAmB,EAAE,oBAAoB,EACzC,cAAc,GAAE,MAAiC;IAQnD,SAAS,IAAI,OAAO;IAIpB,KAAK,IAAI,IAAI;IAWb,IAAI,IAAI,IAAI;YAOE,IAAI;YAUJ,WAAW;IA0DzB,OAAO,CAAC,eAAe;YAgBT,qBAAqB;IAwBnC,OAAO,CAAC,kBAAkB;CAS3B;AAMD;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,aAAa,EAAE,mBAAmB,EAClC,qBAAqB,EAAE,sBAAsB,EAC7C,mBAAmB,EAAE,oBAAoB,EACzC,cAAc,CAAC,EAAE,MAAM,GACtB,IAAI,CAWN;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,0BAA0B,CAQnE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAK/C"}
@@ -56,6 +56,8 @@ export class NotificationWatcherService {
56
56
  pollIntervalMs;
57
57
  trackedRuns = new Map();
58
58
  intervalId = null;
59
+ // Suppresses notifications on the first poll to avoid replaying historical state
60
+ isBootstrapped = false;
59
61
  constructor(runRepository, phaseTimingRepository, notificationService, pollIntervalMs = DEFAULT_POLL_INTERVAL_MS) {
60
62
  this.runRepository = runRepository;
61
63
  this.phaseTimingRepository = phaseTimingRepository;
@@ -108,7 +110,9 @@ export class NotificationWatcherService {
108
110
  featureName,
109
111
  };
110
112
  this.trackedRuns.set(run.id, newState);
111
- this.emitStatusEvent(run, newState);
113
+ if (this.isBootstrapped) {
114
+ this.emitStatusEvent(run, newState);
115
+ }
112
116
  // Check for completed phases on first observation
113
117
  await this.checkPhaseCompletions(run.id, newState);
114
118
  }
@@ -130,6 +134,9 @@ export class NotificationWatcherService {
130
134
  await this.checkPhaseCompletions(run.id, prevState);
131
135
  }
132
136
  }
137
+ if (!this.isBootstrapped) {
138
+ this.isBootstrapped = true;
139
+ }
133
140
  // Clean up tracking for runs that disappeared from the list
134
141
  for (const trackedId of this.trackedRuns.keys()) {
135
142
  if (!currentRunIds.has(trackedId)) {
@@ -156,16 +163,18 @@ export class NotificationWatcherService {
156
163
  for (const timing of timings) {
157
164
  if (timing.completedAt && !state.completedPhases.has(timing.phase)) {
158
165
  state.completedPhases.add(timing.phase);
159
- const event = {
160
- eventType: NotificationEventType.PhaseCompleted,
161
- agentRunId: runId,
162
- featureName: state.featureName,
163
- phaseName: timing.phase,
164
- message: `Completed ${timing.phase} phase`,
165
- severity: NotificationSeverity.Info,
166
- timestamp: new Date().toISOString(),
167
- };
168
- this.notificationService.notify(event);
166
+ if (this.isBootstrapped) {
167
+ const event = {
168
+ eventType: NotificationEventType.PhaseCompleted,
169
+ agentRunId: runId,
170
+ featureName: state.featureName,
171
+ phaseName: timing.phase,
172
+ message: `Completed ${timing.phase} phase`,
173
+ severity: NotificationSeverity.Info,
174
+ timestamp: new Date().toISOString(),
175
+ };
176
+ this.notificationService.notify(event);
177
+ }
169
178
  }
170
179
  }
171
180
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ls.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/ls.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+GpC,wBAAgB,eAAe,IAAI,OAAO,CAqDzC"}
1
+ {"version":3,"file":"ls.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/ls.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8JpC,wBAAgB,eAAe,IAAI,OAAO,CA8DzC"}
@@ -23,13 +23,23 @@ const NODE_TO_PHASE = {
23
23
  plan: 'Planning',
24
24
  implement: 'Implementing',
25
25
  };
26
- /** Map graph node names to approval action labels. */
27
- const NODE_TO_APPROVE = {
28
- analyze: 'Approve Analysis',
29
- requirements: 'Approve PRD',
30
- research: 'Approve Research',
31
- plan: 'Approve Plan',
32
- implement: 'Approve Merge',
26
+ /** Map graph node names to review action labels. */
27
+ const NODE_TO_REVIEW = {
28
+ analyze: 'Review Analysis',
29
+ requirements: 'Review Requirements',
30
+ research: 'Review Research',
31
+ plan: 'Review Plan',
32
+ implement: 'Review Merge',
33
+ merge: 'Review Merge',
34
+ };
35
+ /** Status priority for sorting (lower = higher priority). */
36
+ const STATUS_PRIORITY = {
37
+ running: 0,
38
+ pending: 0,
39
+ waiting_approval: 1,
40
+ failed: 2,
41
+ interrupted: 2,
42
+ completed: 3,
33
43
  };
34
44
  /**
35
45
  * Derive the display status from the agent run.
@@ -37,16 +47,14 @@ const NODE_TO_APPROVE = {
37
47
  */
38
48
  function formatStatus(feature, run) {
39
49
  if (!run) {
40
- // No agent run — fall back to static lifecycle
41
50
  return `${colors.muted(symbols.dotEmpty)} ${colors.muted(feature.lifecycle)}`;
42
51
  }
43
52
  const isRunning = run.status === 'running' || run.status === 'pending';
44
53
  const nodeName = run.result?.startsWith('node:') ? run.result.slice(5) : undefined;
45
54
  const phase = nodeName ? (NODE_TO_PHASE[nodeName] ?? nodeName) : feature.lifecycle;
46
55
  if (isRunning) {
47
- // Check PID liveness for running agents
48
56
  if (run.pid && !isProcessAlive(run.pid)) {
49
- return `${colors.error(symbols.error)} ${colors.error('crashed')}`;
57
+ return `${colors.error(symbols.error)} ${colors.error('Crashed')}`;
50
58
  }
51
59
  return `${colors.info(symbols.spinner[0])} ${colors.info(phase)}`;
52
60
  }
@@ -57,8 +65,8 @@ function formatStatus(feature, run) {
57
65
  return `${colors.error(symbols.error)} ${colors.error('Failed')}`;
58
66
  }
59
67
  if (run.status === 'waiting_approval') {
60
- const action = nodeName ? (NODE_TO_APPROVE[nodeName] ?? phase) : phase;
61
- return `${colors.warning(symbols.warning)} ${colors.warning(action)}`;
68
+ const action = nodeName ? (NODE_TO_REVIEW[nodeName] ?? phase) : phase;
69
+ return `${colors.brand(symbols.pointer)} ${colors.brand(action)}`;
62
70
  }
63
71
  if (run.status === 'interrupted') {
64
72
  return `${colors.error(symbols.error)} ${colors.error('Interrupted')}`;
@@ -74,6 +82,12 @@ function isProcessAlive(pid) {
74
82
  return false;
75
83
  }
76
84
  }
85
+ /** Truncate a string to maxLen, appending ellipsis if needed. */
86
+ function truncate(text, maxLen) {
87
+ if (text.length <= maxLen)
88
+ return text;
89
+ return text.slice(0, maxLen - 1) + symbols.ellipsis;
90
+ }
77
91
  /** Format a duration in ms to a compact human-readable string. */
78
92
  function formatDuration(ms) {
79
93
  const seconds = Math.floor(ms / 1000);
@@ -89,23 +103,54 @@ function formatDuration(ms) {
89
103
  const days = Math.floor(hours / 24);
90
104
  return `${days}d`;
91
105
  }
92
- /** Format the time column based on run status. */
93
- function formatTime(feature, run) {
94
- const now = Date.now();
95
- if (run) {
96
- const isRunning = run.status === 'running' || run.status === 'pending';
97
- if (isRunning && run.startedAt) {
98
- const started = new Date(run.startedAt).getTime();
99
- return colors.info(formatDuration(now - started));
100
- }
101
- if (run.status === 'completed' && run.completedAt) {
102
- const completed = new Date(run.completedAt).getTime();
103
- return colors.muted(`${formatDuration(now - completed)} ago`);
104
- }
106
+ /** Compute total elapsed from phase timings (sum of all phases, including live delta). */
107
+ function formatElapsed(run, phaseTimings) {
108
+ if (phaseTimings.length > 0) {
109
+ const now = Date.now();
110
+ const totalMs = phaseTimings.reduce((sum, pt) => {
111
+ if (pt.durationMs != null)
112
+ return sum + Number(pt.durationMs);
113
+ // Phase still running — add live delta
114
+ if (pt.startedAt)
115
+ return sum + (now - new Date(pt.startedAt).getTime());
116
+ return sum;
117
+ }, 0);
118
+ const isRunning = run?.status === 'running' || run?.status === 'pending';
119
+ return isRunning ? colors.info(formatDuration(totalMs)) : colors.muted(formatDuration(totalMs));
105
120
  }
106
- // Fallback to updatedAt
107
- const updated = new Date(feature.updatedAt).getTime();
108
- return colors.muted(`${formatDuration(now - updated)} ago`);
121
+ // Fallback to run timestamps if no phase timings
122
+ if (!run?.startedAt)
123
+ return '';
124
+ const started = new Date(run.startedAt).getTime();
125
+ const isRunning = run.status === 'running' || run.status === 'pending';
126
+ const end = isRunning
127
+ ? Date.now()
128
+ : run.completedAt
129
+ ? new Date(run.completedAt).getTime()
130
+ : Date.now();
131
+ return isRunning
132
+ ? colors.info(formatDuration(end - started))
133
+ : colors.muted(formatDuration(end - started));
134
+ }
135
+ /** Format when the feature finished (only for completed runs). */
136
+ function formatDone(run) {
137
+ if (!run?.completedAt || run.status !== 'completed')
138
+ return '';
139
+ const completed = new Date(run.completedAt).getTime();
140
+ return colors.muted(`${formatDuration(Date.now() - completed)} ago`);
141
+ }
142
+ /** Format approval gates and push flag as compact checkboxes: R P M ↑ */
143
+ function formatGates(feature) {
144
+ const { allowPrd, allowPlan, allowMerge } = feature.approvalGates;
145
+ const gate = (on) => (on ? colors.success('■') : colors.muted('□'));
146
+ const push = feature.push ? colors.accent('■') : colors.muted('□');
147
+ return `${gate(allowPrd)} ${gate(allowPlan)} ${gate(allowMerge)} ${push}`;
148
+ }
149
+ /** Get sort priority for a run status (lower = shown first). */
150
+ function getStatusPriority(run) {
151
+ if (!run)
152
+ return 4;
153
+ return STATUS_PRIORITY[run.status] ?? 4;
109
154
  }
110
155
  export function createLsCommand() {
111
156
  return new Command('ls')
@@ -115,21 +160,28 @@ export function createLsCommand() {
115
160
  try {
116
161
  const useCase = container.resolve(ListFeaturesUseCase);
117
162
  const runRepo = container.resolve('IAgentRunRepository');
163
+ const phaseRepo = container.resolve('IPhaseTimingRepository');
118
164
  const filters = options.repo ? { repositoryPath: options.repo } : undefined;
119
165
  const features = await useCase.execute(filters);
120
- // Load agent runs for all features in parallel
121
- const runs = await Promise.all(features.map((f) => f.agentRunId ? runRepo.findById(f.agentRunId) : Promise.resolve(null)));
122
- const rows = features.map((feature, i) => {
123
- const run = runs[i];
166
+ // Load agent runs and phase timings for all features in parallel
167
+ const [runs, timings] = await Promise.all([
168
+ Promise.all(features.map((f) => f.agentRunId ? runRepo.findById(f.agentRunId) : Promise.resolve(null))),
169
+ Promise.all(features.map((f) => phaseRepo.findByFeatureId(f.id))),
170
+ ]);
171
+ // Pair features with runs/timings and sort by status priority
172
+ const paired = features
173
+ .map((feature, i) => ({ feature, run: runs[i], phases: timings[i] }))
174
+ .sort((a, b) => getStatusPriority(a.run) - getStatusPriority(b.run));
175
+ const rows = paired.map(({ feature, run, phases }) => {
124
176
  const repo = path.basename(feature.repositoryPath);
125
- const agent = run?.agentType ?? colors.muted('—');
126
177
  return [
127
178
  feature.id.slice(0, 8),
128
- feature.name.slice(0, 30),
179
+ truncate(feature.name, 30),
129
180
  formatStatus(feature, run),
130
181
  colors.muted(repo),
131
- agent,
132
- formatTime(feature, run),
182
+ formatGates(feature),
183
+ formatElapsed(run, phases),
184
+ formatDone(run),
133
185
  ];
134
186
  });
135
187
  renderListView({
@@ -137,10 +189,11 @@ export function createLsCommand() {
137
189
  columns: [
138
190
  { label: 'ID', width: 10 },
139
191
  { label: 'Name', width: 32 },
140
- { label: 'Status', width: 20 },
192
+ { label: 'Status', width: 21 },
141
193
  { label: 'Repo', width: 20 },
142
- { label: 'Agent', width: 14 },
143
- { label: 'Time', width: 12 },
194
+ { label: 'R P M ↑', width: 10 },
195
+ { label: 'Elapsed', width: 10 },
196
+ { label: 'Done', width: 12 },
144
197
  ],
145
198
  rows,
146
199
  emptyMessage: 'No features found',
@@ -23,14 +23,14 @@ const NODE_TO_PHASE = {
23
23
  implement: 'Implementing',
24
24
  merge: 'Merging',
25
25
  };
26
- /** Map graph node names to approval action labels. */
27
- const NODE_TO_APPROVE = {
28
- analyze: 'Approve Analysis',
29
- requirements: 'Approve PRD',
30
- research: 'Approve Research',
31
- plan: 'Approve Plan',
32
- implement: 'Approve Implementation',
33
- merge: 'Approve Merge',
26
+ /** Map graph node names to review action labels. */
27
+ const NODE_TO_REVIEW = {
28
+ analyze: 'Review Analysis',
29
+ requirements: 'Review Requirements',
30
+ research: 'Review Research',
31
+ plan: 'Review Plan',
32
+ implement: 'Review Merge',
33
+ merge: 'Review Merge',
34
34
  };
35
35
  /** Map lifecycle event phases to display labels and symbols. */
36
36
  const LIFECYCLE_EVENTS = {
@@ -63,8 +63,8 @@ function formatStatus(feature, run) {
63
63
  if (run.status === 'failed')
64
64
  return `${colors.error(symbols.error)} ${colors.error('Failed')}`;
65
65
  if (run.status === 'waiting_approval') {
66
- const action = nodeName ? (NODE_TO_APPROVE[nodeName] ?? phase) : phase;
67
- return `${colors.warning(symbols.warning)} ${colors.warning(action)}`;
66
+ const action = nodeName ? (NODE_TO_REVIEW[nodeName] ?? phase) : phase;
67
+ return `${colors.brand(symbols.pointer)} ${colors.brand(action)}`;
68
68
  }
69
69
  if (run.status === 'interrupted')
70
70
  return `${colors.error(symbols.error)} ${colors.error('Interrupted')}`;
@@ -33,15 +33,15 @@ Examples:
33
33
  const isNonInteractive = options.agent !== undefined;
34
34
  let input;
35
35
  if (isNonInteractive) {
36
- // Non-interactive: require --auth when --agent is provided
37
- if (!options.auth) {
36
+ // Non-interactive: require --auth when --agent is provided (dev type defaults to session)
37
+ if (!options.auth && options.agent !== 'dev') {
38
38
  messages.error('--auth is required when using --agent flag');
39
39
  process.exitCode = 1;
40
40
  return;
41
41
  }
42
42
  input = {
43
43
  type: options.agent,
44
- authMethod: options.auth,
44
+ authMethod: options.auth ?? 'session',
45
45
  ...(options.token !== undefined && { token: options.token }),
46
46
  };
47
47
  }
@@ -21,6 +21,14 @@ export declare function createAgentSelectConfig(): {
21
21
  readonly name: "Gemini CLI";
22
22
  readonly value: AgentType.GeminiCli;
23
23
  readonly description: "Google Gemini CLI";
24
+ }, {
25
+ readonly name: "Cursor";
26
+ readonly value: AgentType.Cursor;
27
+ readonly description: "Cursor AI coding agent";
28
+ }, {
29
+ readonly name: "Dev (Mock)";
30
+ readonly value: AgentType.Dev;
31
+ readonly description: "Local development mock — no agent binary required";
24
32
  }, {
25
33
  readonly name: "Aider";
26
34
  readonly value: AgentType.Aider;
@@ -29,10 +37,6 @@ export declare function createAgentSelectConfig(): {
29
37
  readonly name: "Continue";
30
38
  readonly value: AgentType.Continue;
31
39
  readonly disabled: "(Coming Soon)";
32
- }, {
33
- readonly name: "Cursor";
34
- readonly value: AgentType.Cursor;
35
- readonly description: "Cursor AI coding agent";
36
40
  }];
37
41
  readonly theme: {
38
42
  readonly prefix: {
@@ -1 +1 @@
1
- {"version":3,"file":"agent-select.prompt.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/tui/prompts/agent-select.prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD;;;;;GAKG;AACH,wBAAgB,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCtC"}
1
+ {"version":3,"file":"agent-select.prompt.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/tui/prompts/agent-select.prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD;;;;;GAKG;AACH,wBAAgB,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqCtC"}
@@ -26,6 +26,16 @@ export function createAgentSelectConfig() {
26
26
  value: AgentType.GeminiCli,
27
27
  description: 'Google Gemini CLI',
28
28
  },
29
+ {
30
+ name: 'Cursor',
31
+ value: AgentType.Cursor,
32
+ description: 'Cursor AI coding agent',
33
+ },
34
+ {
35
+ name: 'Dev (Mock)',
36
+ value: AgentType.Dev,
37
+ description: 'Local development mock — no agent binary required',
38
+ },
29
39
  {
30
40
  name: 'Aider',
31
41
  value: AgentType.Aider,
@@ -36,11 +46,6 @@ export function createAgentSelectConfig() {
36
46
  value: AgentType.Continue,
37
47
  disabled: '(Coming Soon)',
38
48
  },
39
- {
40
- name: 'Cursor',
41
- value: AgentType.Cursor,
42
- description: 'Cursor AI coding agent',
43
- },
44
49
  ],
45
50
  theme: shepTheme,
46
51
  };
@@ -1,6 +1,6 @@
1
1
  import type { ComponentType, SVGProps } from 'react';
2
2
  /** Agent type values mirroring the TypeSpec AgentType enum. */
3
- export type AgentTypeValue = 'claude-code' | 'cursor' | 'gemini-cli' | 'aider' | 'continue';
3
+ export type AgentTypeValue = 'claude-code' | 'cursor' | 'gemini-cli' | 'aider' | 'continue' | 'dev';
4
4
  type IconProps = SVGProps<SVGSVGElement> & {
5
5
  className?: string;
6
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"agent-type-icons.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/agent-type-icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIrD,+DAA+D;AAC/D,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,QAAQ,GAAG,YAAY,GAAG,OAAO,GAAG,UAAU,CAAC;AAE5F,KAAK,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAmBlE,6DAA6D;AAC7D,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,2CAOhD;AAUD,wEAAwE;AACxE,wBAAgB,gBAAgB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC,SAAS,CAAC,CAK7E"}
1
+ {"version":3,"file":"agent-type-icons.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/agent-type-icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAKrD,+DAA+D;AAC/D,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,QAAQ,GAAG,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,KAAK,CAAC;AAEpG,KAAK,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAmBlE,6DAA6D;AAC7D,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,2CAOhD;AAgBD,wEAAwE;AACxE,wBAAgB,gBAAgB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC,SAAS,CAAC,CAK7E"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import Image from 'next/image';
3
+ import { Beaker } from 'lucide-react';
3
4
  import { cn } from '../../../lib/utils.js';
4
5
  /** Create a stable image-based icon component for a brand. */
5
6
  function createBrandIcon(src, alt) {
@@ -13,12 +14,17 @@ function createBrandIcon(src, alt) {
13
14
  export function DefaultAgentIcon(props) {
14
15
  return (_jsxs("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [_jsx("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "2" }), _jsx("circle", { cx: "12", cy: "12", r: "3", fill: "currentColor" })] }));
15
16
  }
17
+ function DevAgentIcon({ className, ...props }) {
18
+ return _jsx(Beaker, { className: cn('h-6 w-6', className), ...props });
19
+ }
20
+ DevAgentIcon.displayName = 'DevAgentIcon';
16
21
  const agentTypeIconMap = {
17
22
  'claude-code': createBrandIcon('/icons/agents/claude-ai-icon.svg', 'Claude Code'),
18
23
  cursor: createBrandIcon('/icons/agents/cursor.jpeg', 'Cursor'),
19
24
  'gemini-cli': createBrandIcon('/icons/agents/gemini-cli.jpeg', 'Gemini CLI'),
20
25
  aider: createBrandIcon('/icons/agents/aider.png', 'Aider'),
21
26
  continue: createBrandIcon('/icons/agents/continue.jpeg', 'Continue'),
27
+ dev: DevAgentIcon,
22
28
  };
23
29
  /** Resolve an agent type string to its corresponding icon component. */
24
30
  export function getAgentTypeIcon(agentType) {
@@ -5,4 +5,5 @@ type Story = StoryObj;
5
5
  export declare const AllIcons: Story;
6
6
  export declare const SmallIcons: Story;
7
7
  export declare const LargeIcons: Story;
8
+ export declare const DevAgentIcon: Story;
8
9
  //# sourceMappingURL=agent-type-icons.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-type-icons.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/agent-type-icons.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAwCvD,QAAA,MAAM,IAAI,EAAE,IAIX,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC"}
1
+ {"version":3,"file":"agent-type-icons.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/agent-type-icons.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAyCvD,QAAA,MAAM,IAAI,EAAE,IAIX,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAa1B,CAAC"}
@@ -6,6 +6,7 @@ const allAgentTypes = [
6
6
  { type: 'gemini-cli', label: 'Gemini CLI' },
7
7
  { type: 'aider', label: 'Aider' },
8
8
  { type: 'continue', label: 'Continue' },
9
+ { type: 'dev', label: 'Dev (Mock)' },
9
10
  ];
10
11
  function AgentIconGallery({ size }) {
11
12
  return (_jsxs("div", { className: "flex flex-wrap gap-6", children: [allAgentTypes.map(({ type, label }) => {
@@ -28,3 +29,9 @@ export const SmallIcons = {
28
29
  export const LargeIcons = {
29
30
  render: () => _jsx(AgentIconGallery, { size: 16 }),
30
31
  };
32
+ export const DevAgentIcon = {
33
+ render: () => {
34
+ const Icon = getAgentTypeIcon('dev');
35
+ return (_jsxs("div", { className: "flex flex-col items-center gap-2", children: [_jsx("div", { className: "border-border bg-muted/30 rounded-md border p-3", children: _jsx(Icon, { style: { width: 40, height: 40 } }) }), _jsx("span", { className: "text-sm font-medium", children: "Dev (Mock)" }), _jsx("code", { className: "text-muted-foreground text-xs", children: "dev" })] }));
36
+ },
37
+ };