@shepai/cli 1.16.0 → 1.17.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 (102) hide show
  1. package/dist/src/application/ports/output/agents/agent-executor-provider.interface.d.ts +5 -0
  2. package/dist/src/application/ports/output/agents/agent-executor-provider.interface.d.ts.map +1 -0
  3. package/dist/src/application/ports/output/agents/agent-executor-provider.interface.js +1 -0
  4. package/dist/src/application/ports/output/agents/feature-agent-process.interface.d.ts +2 -0
  5. package/dist/src/application/ports/output/agents/feature-agent-process.interface.d.ts.map +1 -1
  6. package/dist/src/application/ports/output/agents/index.d.ts +1 -0
  7. package/dist/src/application/ports/output/agents/index.d.ts.map +1 -1
  8. package/dist/src/application/ports/output/index.d.ts +1 -1
  9. package/dist/src/application/ports/output/index.d.ts.map +1 -1
  10. package/dist/src/application/use-cases/features/create-feature.use-case.d.ts +3 -3
  11. package/dist/src/application/use-cases/features/create-feature.use-case.d.ts.map +1 -1
  12. package/dist/src/application/use-cases/features/create-feature.use-case.js +9 -7
  13. package/dist/src/application/use-cases/features/resume-feature.use-case.d.ts.map +1 -1
  14. package/dist/src/application/use-cases/features/resume-feature.use-case.js +6 -1
  15. package/dist/src/infrastructure/di/container.d.ts.map +1 -1
  16. package/dist/src/infrastructure/di/container.js +9 -2
  17. package/dist/src/infrastructure/services/agents/common/agent-executor-factory.service.d.ts +1 -1
  18. package/dist/src/infrastructure/services/agents/common/agent-executor-factory.service.d.ts.map +1 -1
  19. package/dist/src/infrastructure/services/agents/common/agent-executor-factory.service.js +6 -2
  20. package/dist/src/infrastructure/services/agents/common/agent-executor-provider.service.d.ts +9 -0
  21. package/dist/src/infrastructure/services/agents/common/agent-executor-provider.service.d.ts.map +1 -0
  22. package/dist/src/infrastructure/services/agents/common/agent-executor-provider.service.js +11 -0
  23. package/dist/src/infrastructure/services/agents/common/agent-runner.service.d.ts +3 -3
  24. package/dist/src/infrastructure/services/agents/common/agent-runner.service.d.ts.map +1 -1
  25. package/dist/src/infrastructure/services/agents/common/agent-runner.service.js +4 -4
  26. package/dist/src/infrastructure/services/agents/common/agent-validator.service.d.ts +1 -9
  27. package/dist/src/infrastructure/services/agents/common/agent-validator.service.d.ts.map +1 -1
  28. package/dist/src/infrastructure/services/agents/common/agent-validator.service.js +1 -0
  29. package/dist/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts +1 -7
  30. package/dist/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts.map +1 -1
  31. package/dist/src/infrastructure/services/agents/common/executors/cursor-executor.service.d.ts +38 -0
  32. package/dist/src/infrastructure/services/agents/common/executors/cursor-executor.service.d.ts.map +1 -0
  33. package/dist/src/infrastructure/services/agents/common/executors/cursor-executor.service.js +296 -0
  34. package/dist/src/infrastructure/services/agents/common/types.d.ts +23 -0
  35. package/dist/src/infrastructure/services/agents/common/types.d.ts.map +1 -0
  36. package/dist/src/infrastructure/services/agents/common/types.js +7 -0
  37. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts +2 -0
  38. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts.map +1 -1
  39. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.js +6 -0
  40. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts +2 -0
  41. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
  42. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +32 -12
  43. package/dist/src/infrastructure/services/agents/feature-agent/nodes/implement.node.d.ts.map +1 -1
  44. package/dist/src/infrastructure/services/agents/feature-agent/nodes/implement.node.js +7 -8
  45. package/dist/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts +6 -0
  46. package/dist/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
  47. package/dist/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +29 -5
  48. package/dist/src/presentation/cli/commands/feat/ls.command.d.ts.map +1 -1
  49. package/dist/src/presentation/cli/commands/feat/ls.command.js +42 -7
  50. package/dist/src/presentation/tui/prompts/agent-select.prompt.d.ts +1 -1
  51. package/dist/src/presentation/tui/prompts/agent-select.prompt.js +1 -1
  52. package/dist/tsconfig.build.tsbuildinfo +1 -1
  53. package/package.json +1 -1
  54. package/web/.next/BUILD_ID +1 -1
  55. package/web/.next/build-manifest.json +2 -2
  56. package/web/.next/cache/.previewinfo +1 -1
  57. package/web/.next/cache/.rscinfo +1 -1
  58. package/web/.next/cache/config.json +3 -3
  59. package/web/.next/fallback-build-manifest.json +2 -2
  60. package/web/.next/prerender-manifest.json +3 -3
  61. package/web/.next/required-server-files.js +1 -1
  62. package/web/.next/required-server-files.json +1 -1
  63. package/web/.next/server/app/_global-error.html +2 -2
  64. package/web/.next/server/app/_global-error.rsc +1 -1
  65. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  66. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  67. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  68. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  69. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  70. package/web/.next/server/app/_not-found.html +2 -2
  71. package/web/.next/server/app/_not-found.rsc +1 -1
  72. package/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  73. package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  74. package/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  75. package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  76. package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  77. package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  78. package/web/.next/server/app/index.html +2 -2
  79. package/web/.next/server/app/index.rsc +1 -1
  80. package/web/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  81. package/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
  82. package/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
  83. package/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
  84. package/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  85. package/web/.next/server/app/version.html +2 -2
  86. package/web/.next/server/app/version.rsc +1 -1
  87. package/web/.next/server/app/version.segments/_full.segment.rsc +1 -1
  88. package/web/.next/server/app/version.segments/_head.segment.rsc +1 -1
  89. package/web/.next/server/app/version.segments/_index.segment.rsc +1 -1
  90. package/web/.next/server/app/version.segments/_tree.segment.rsc +1 -1
  91. package/web/.next/server/app/version.segments/version/__PAGE__.segment.rsc +1 -1
  92. package/web/.next/server/app/version.segments/version.segment.rsc +1 -1
  93. package/web/.next/server/chunks/ssr/_19be0743._.js +1 -1
  94. package/web/.next/server/pages/404.html +2 -2
  95. package/web/.next/server/pages/500.html +2 -2
  96. package/web/.next/server/server-reference-manifest.js +1 -1
  97. package/web/.next/server/server-reference-manifest.json +1 -1
  98. package/web/.next/trace +1 -1
  99. package/web/.next/trace-build +1 -1
  100. /package/web/.next/static/{KqMr5DLdrvbaA-agLuHP1 → Wgd1DC_QfVhpAi62LjpwI}/_buildManifest.js +0 -0
  101. /package/web/.next/static/{KqMr5DLdrvbaA-agLuHP1 → Wgd1DC_QfVhpAi62LjpwI}/_clientMiddlewareManifest.json +0 -0
  102. /package/web/.next/static/{KqMr5DLdrvbaA-agLuHP1 → Wgd1DC_QfVhpAi62LjpwI}/_ssgManifest.js +0 -0
@@ -10,6 +10,7 @@
10
10
  * $ shep feat ls
11
11
  * $ shep feat ls --repo /path/to/project
12
12
  */
13
+ import path from 'node:path';
13
14
  import { Command } from 'commander';
14
15
  import { container } from '../../../../infrastructure/di/container.js';
15
16
  import { ListFeaturesUseCase } from '../../../../application/use-cases/features/list-features.use-case.js';
@@ -65,6 +66,39 @@ function isProcessAlive(pid) {
65
66
  return false;
66
67
  }
67
68
  }
69
+ /** Format a duration in ms to a compact human-readable string. */
70
+ function formatDuration(ms) {
71
+ const seconds = Math.floor(ms / 1000);
72
+ if (seconds < 60)
73
+ return `${seconds}s`;
74
+ const minutes = Math.floor(seconds / 60);
75
+ if (minutes < 60)
76
+ return `${minutes}m`;
77
+ const hours = Math.floor(minutes / 60);
78
+ const remMin = minutes % 60;
79
+ if (hours < 24)
80
+ return remMin > 0 ? `${hours}h ${remMin}m` : `${hours}h`;
81
+ const days = Math.floor(hours / 24);
82
+ return `${days}d`;
83
+ }
84
+ /** Format the time column based on run status. */
85
+ function formatTime(feature, run) {
86
+ const now = Date.now();
87
+ if (run) {
88
+ const isRunning = run.status === 'running' || run.status === 'pending';
89
+ if (isRunning && run.startedAt) {
90
+ const started = new Date(run.startedAt).getTime();
91
+ return colors.info(formatDuration(now - started));
92
+ }
93
+ if (run.status === 'completed' && run.completedAt) {
94
+ const completed = new Date(run.completedAt).getTime();
95
+ return colors.muted(`${formatDuration(now - completed)} ago`);
96
+ }
97
+ }
98
+ // Fallback to updatedAt
99
+ const updated = new Date(feature.updatedAt).getTime();
100
+ return colors.muted(`${formatDuration(now - updated)} ago`);
101
+ }
68
102
  export function createLsCommand() {
69
103
  return new Command('ls')
70
104
  .description('List features')
@@ -79,15 +113,15 @@ export function createLsCommand() {
79
113
  const runs = await Promise.all(features.map((f) => f.agentRunId ? runRepo.findById(f.agentRunId) : Promise.resolve(null)));
80
114
  const rows = features.map((feature, i) => {
81
115
  const run = runs[i];
82
- const updated = feature.updatedAt instanceof Date
83
- ? feature.updatedAt.toLocaleDateString()
84
- : String(feature.updatedAt);
116
+ const repo = path.basename(feature.repositoryPath);
117
+ const agent = run?.agentType ?? colors.muted('—');
85
118
  return [
86
119
  feature.id.slice(0, 8),
87
120
  feature.name.slice(0, 30),
88
121
  formatStatus(feature, run),
89
- colors.muted(feature.branch),
90
- colors.muted(updated),
122
+ colors.muted(repo),
123
+ agent,
124
+ formatTime(feature, run),
91
125
  ];
92
126
  });
93
127
  renderListView({
@@ -96,8 +130,9 @@ export function createLsCommand() {
96
130
  { label: 'ID', width: 10 },
97
131
  { label: 'Name', width: 32 },
98
132
  { label: 'Status', width: 20 },
99
- { label: 'Branch', width: 28 },
100
- { label: 'Updated', width: 12 },
133
+ { label: 'Repo', width: 20 },
134
+ { label: 'Agent', width: 14 },
135
+ { label: 'Time', width: 12 },
101
136
  ],
102
137
  rows,
103
138
  emptyMessage: 'No features found',
@@ -32,7 +32,7 @@ export declare function createAgentSelectConfig(): {
32
32
  }, {
33
33
  readonly name: "Cursor";
34
34
  readonly value: AgentType.Cursor;
35
- readonly disabled: "(Coming Soon)";
35
+ readonly description: "Cursor AI coding agent";
36
36
  }];
37
37
  readonly theme: {
38
38
  readonly prefix: {
@@ -39,7 +39,7 @@ export function createAgentSelectConfig() {
39
39
  {
40
40
  name: 'Cursor',
41
41
  value: AgentType.Cursor,
42
- disabled: '(Coming Soon)',
42
+ description: 'Cursor AI coding agent',
43
43
  },
44
44
  ],
45
45
  theme: shepTheme,