@shepai/cli 1.44.1 → 1.45.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.
- package/apis/json-schema/AcceptanceCriteria.yaml +16 -0
- package/apis/json-schema/ActionItem.yaml +32 -0
- package/apis/json-schema/AgentAuthMethod.yaml +7 -0
- package/apis/json-schema/AgentConfig.yaml +19 -0
- package/apis/json-schema/AgentDefinition.yaml +14 -0
- package/apis/json-schema/AgentFeature.yaml +10 -0
- package/apis/json-schema/AgentInstance.yaml +23 -0
- package/apis/json-schema/AgentRun.yaml +63 -0
- package/apis/json-schema/AgentRunEvent.yaml +25 -0
- package/apis/json-schema/AgentRunStatus.yaml +12 -0
- package/apis/json-schema/AgentStatus.yaml +9 -0
- package/apis/json-schema/AgentType.yaml +10 -0
- package/apis/json-schema/ApprovalGates.yaml +18 -0
- package/apis/json-schema/Artifact.yaml +36 -0
- package/apis/json-schema/ArtifactCategory.yaml +9 -0
- package/apis/json-schema/ArtifactFormat.yaml +9 -0
- package/apis/json-schema/ArtifactState.yaml +8 -0
- package/apis/json-schema/AskRequest.yaml +10 -0
- package/apis/json-schema/AskResponse.yaml +14 -0
- package/apis/json-schema/AuditableEntity.yaml +13 -0
- package/apis/json-schema/BaseEntity.yaml +20 -0
- package/apis/json-schema/CiStatus.yaml +8 -0
- package/apis/json-schema/DeployMethod.yaml +10 -0
- package/apis/json-schema/DeploySkill.yaml +29 -0
- package/apis/json-schema/DeployTarget.yaml +10 -0
- package/apis/json-schema/DeployTargetActionItem.yaml +15 -0
- package/apis/json-schema/DeployTargetTask.yaml +15 -0
- package/apis/json-schema/DeployTargetTasks.yaml +17 -0
- package/apis/json-schema/Deployment.yaml +33 -0
- package/apis/json-schema/DeploymentState.yaml +8 -0
- package/apis/json-schema/EditorType.yaml +10 -0
- package/apis/json-schema/EnvironmentConfig.yaml +16 -0
- package/apis/json-schema/Feature.yaml +77 -0
- package/apis/json-schema/FeatureAgent.yaml +29 -0
- package/apis/json-schema/FeatureAgentState.yaml +11 -0
- package/apis/json-schema/FeatureArtifact.yaml +35 -0
- package/apis/json-schema/FeatureCheckpoint.yaml +18 -0
- package/apis/json-schema/FeatureErrors.yaml +15 -0
- package/apis/json-schema/FeatureIdentity.yaml +32 -0
- package/apis/json-schema/FeatureSpec.yaml +30 -0
- package/apis/json-schema/FeatureStatus.yaml +40 -0
- package/apis/json-schema/FeatureStatusInfo.yaml +30 -0
- package/apis/json-schema/FeatureStatusProgress.yaml +24 -0
- package/apis/json-schema/FeatureTaskTracking.yaml +21 -0
- package/apis/json-schema/FeatureValidation.yaml +21 -0
- package/apis/json-schema/GanttTask.yaml +34 -0
- package/apis/json-schema/GanttViewData.yaml +22 -0
- package/apis/json-schema/InstallationSuggestion.yaml +21 -0
- package/apis/json-schema/LocalDeployAgent.yaml +18 -0
- package/apis/json-schema/Message.yaml +29 -0
- package/apis/json-schema/MessageRole.yaml +7 -0
- package/apis/json-schema/ModelConfiguration.yaml +26 -0
- package/apis/json-schema/NotificationChannelConfig.yaml +11 -0
- package/apis/json-schema/NotificationEvent.yaml +34 -0
- package/apis/json-schema/NotificationEventConfig.yaml +31 -0
- package/apis/json-schema/NotificationEventType.yaml +10 -0
- package/apis/json-schema/NotificationPreferences.yaml +22 -0
- package/apis/json-schema/NotificationSeverity.yaml +9 -0
- package/apis/json-schema/OpenQuestion.yaml +25 -0
- package/apis/json-schema/PhaseTiming.yaml +35 -0
- package/apis/json-schema/Plan.yaml +37 -0
- package/apis/json-schema/PlanPhase.yaml +26 -0
- package/apis/json-schema/PlanSpec.yaml +26 -0
- package/apis/json-schema/PlanState.yaml +8 -0
- package/apis/json-schema/PortMap.yaml +19 -0
- package/apis/json-schema/PortProtocol.yaml +7 -0
- package/apis/json-schema/PrStatus.yaml +8 -0
- package/apis/json-schema/PrdApprovalPayload.yaml +15 -0
- package/apis/json-schema/PrdFinalAction.yaml +18 -0
- package/apis/json-schema/PrdOption.yaml +24 -0
- package/apis/json-schema/PrdQuestion.yaml +25 -0
- package/apis/json-schema/PrdQuestionnaireData.yaml +24 -0
- package/apis/json-schema/PrdRejectionPayload.yaml +20 -0
- package/apis/json-schema/PrdReviewResult.yaml +19 -0
- package/apis/json-schema/PullRequest.yaml +26 -0
- package/apis/json-schema/QuestionOption.yaml +18 -0
- package/apis/json-schema/QuestionSelectionChange.yaml +14 -0
- package/apis/json-schema/RejectionFeedbackEntry.yaml +21 -0
- package/apis/json-schema/Requirement.yaml +26 -0
- package/apis/json-schema/RequirementType.yaml +7 -0
- package/apis/json-schema/Research.yaml +26 -0
- package/apis/json-schema/ResearchArtifact.yaml +14 -0
- package/apis/json-schema/ResearchSpec.yaml +14 -0
- package/apis/json-schema/ResearchState.yaml +8 -0
- package/apis/json-schema/ReviewQuestion.yaml +24 -0
- package/apis/json-schema/SdlcLifecycle.yaml +13 -0
- package/apis/json-schema/Settings.yaml +36 -0
- package/apis/json-schema/SoftDeletableEntity.yaml +11 -0
- package/apis/json-schema/SpecArtifactBase.yaml +44 -0
- package/apis/json-schema/SpecTask.yaml +45 -0
- package/apis/json-schema/SystemConfig.yaml +16 -0
- package/apis/json-schema/Task.yaml +38 -0
- package/apis/json-schema/TaskState.yaml +9 -0
- package/apis/json-schema/TasksArtifact.yaml +18 -0
- package/apis/json-schema/TasksSpec.yaml +18 -0
- package/apis/json-schema/TddCycle.yaml +24 -0
- package/apis/json-schema/TechDecision.yaml +24 -0
- package/apis/json-schema/TechnicalPlanArtifact.yaml +26 -0
- package/apis/json-schema/TimelineEvent.yaml +17 -0
- package/apis/json-schema/Tool.yaml +23 -0
- package/apis/json-schema/ToolInstallCommand.yaml +28 -0
- package/apis/json-schema/ToolInstallationStatus.yaml +28 -0
- package/apis/json-schema/ToolType.yaml +12 -0
- package/apis/json-schema/UUID.yaml +4 -0
- package/apis/json-schema/UserProfile.yaml +14 -0
- package/apis/json-schema/WorkflowConfig.yaml +31 -0
- package/apis/openapi/openapi.yaml +7 -0
- package/dist/packages/core/src/application/ports/output/services/worktree-service.interface.d.ts +8 -0
- package/dist/packages/core/src/application/ports/output/services/worktree-service.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/create/slug-resolver.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/create/slug-resolver.js +3 -2
- package/dist/packages/core/src/domain/factories/spec-yaml-parser.d.ts.map +1 -1
- package/dist/packages/core/src/domain/factories/spec-yaml-parser.js +16 -4
- package/dist/packages/core/src/infrastructure/services/git/worktree.service.d.ts +1 -0
- package/dist/packages/core/src/infrastructure/services/git/worktree.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/git/worktree.service.js +11 -0
- package/dist/src/presentation/cli/commands/repo/index.d.ts +18 -0
- package/dist/src/presentation/cli/commands/repo/index.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/repo/index.js +25 -0
- package/dist/src/presentation/cli/commands/repo/ls.command.d.ts +11 -0
- package/dist/src/presentation/cli/commands/repo/ls.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/repo/ls.command.js +64 -0
- package/dist/src/presentation/cli/commands/repo/resolve-repository.d.ts +10 -0
- package/dist/src/presentation/cli/commands/repo/resolve-repository.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/repo/resolve-repository.js +24 -0
- package/dist/src/presentation/cli/commands/repo/show.command.d.ts +11 -0
- package/dist/src/presentation/cli/commands/repo/show.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/repo/show.command.js +95 -0
- package/dist/src/presentation/cli/index.d.ts +1 -0
- package/dist/src/presentation/cli/index.d.ts.map +1 -1
- package/dist/src/presentation/cli/index.js +3 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/cache/.previewinfo +1 -1
- package/web/.next/cache/.rscinfo +1 -1
- package/web/.next/cache/.tsbuildinfo +1 -1
- package/web/.next/cache/config.json +3 -3
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +1 -1
- package/web/.next/required-server-files.json +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__03a0dba7._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__03a0dba7._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__249c74f6._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4e8ca89c._.js +2 -2
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +12 -12
- package/web/.next/standalone/src/presentation/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/src/presentation/web/.next/build-manifest.json +2 -2
- package/web/.next/standalone/src/presentation/web/.next/prerender-manifest.json +3 -3
- package/web/.next/standalone/src/presentation/web/.next/required-server-files.json +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/page/server-reference-manifest.json +11 -11
- package/web/.next/standalone/src/presentation/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__03a0dba7._.js +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__249c74f6._.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__4e8ca89c._.js +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/pages/500.html +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.json +12 -12
- package/web/.next/standalone/src/presentation/web/server.js +1 -1
- package/web/.next/static/chunks/{631933b137e91fb2.js → 22f9e39aab128063.js} +2 -2
- package/web/.next/trace +1 -1
- package/web/.next/trace-build +1 -1
- /package/web/.next/static/{aWm2zr_Js7tN6yFqI9qT- → z34pr57Jw4sBfoDeMMuGn}/_buildManifest.js +0 -0
- /package/web/.next/static/{aWm2zr_Js7tN6yFqI9qT- → z34pr57Jw4sBfoDeMMuGn}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{aWm2zr_Js7tN6yFqI9qT- → z34pr57Jw4sBfoDeMMuGn}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
$schema: https://json-schema.org/draft/2020-12/schema
|
|
2
|
+
$id: Task.yaml
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
title:
|
|
6
|
+
type: string
|
|
7
|
+
description: Optional human-readable title for the task
|
|
8
|
+
description:
|
|
9
|
+
type: string
|
|
10
|
+
description: Optional detailed description of what the task entails
|
|
11
|
+
dependsOn:
|
|
12
|
+
type: array
|
|
13
|
+
items:
|
|
14
|
+
$ref: Task.yaml
|
|
15
|
+
description: Tasks that must be completed before this task can begin
|
|
16
|
+
actionItems:
|
|
17
|
+
type: array
|
|
18
|
+
items:
|
|
19
|
+
$ref: ActionItem.yaml
|
|
20
|
+
description: Granular action items that comprise this task
|
|
21
|
+
baseBranch:
|
|
22
|
+
type: string
|
|
23
|
+
description: The base branch from which this task's working branch was created
|
|
24
|
+
state:
|
|
25
|
+
$ref: TaskState.yaml
|
|
26
|
+
description: Current state of task execution (Todo, WIP, Review, Done)
|
|
27
|
+
branch:
|
|
28
|
+
type: string
|
|
29
|
+
description: Git branch where work for this task is performed
|
|
30
|
+
required:
|
|
31
|
+
- dependsOn
|
|
32
|
+
- actionItems
|
|
33
|
+
- baseBranch
|
|
34
|
+
- state
|
|
35
|
+
- branch
|
|
36
|
+
allOf:
|
|
37
|
+
- $ref: BaseEntity.yaml
|
|
38
|
+
description: A discrete unit of work within an implementation plan
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
$schema: https://json-schema.org/draft/2020-12/schema
|
|
2
|
+
$id: TasksArtifact.yaml
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
tasks:
|
|
6
|
+
type: array
|
|
7
|
+
items:
|
|
8
|
+
$ref: SpecTask.yaml
|
|
9
|
+
description: Structured task list with acceptance criteria and TDD phases
|
|
10
|
+
totalEstimate:
|
|
11
|
+
type: string
|
|
12
|
+
description: Overall effort estimate for all tasks combined
|
|
13
|
+
required:
|
|
14
|
+
- tasks
|
|
15
|
+
- totalEstimate
|
|
16
|
+
allOf:
|
|
17
|
+
- $ref: SpecArtifactBase.yaml
|
|
18
|
+
description: Task breakdown artifact defining implementation tasks grouped into phases
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
$schema: https://json-schema.org/draft/2020-12/schema
|
|
2
|
+
$id: TasksSpec.yaml
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
tasks:
|
|
6
|
+
type: array
|
|
7
|
+
items:
|
|
8
|
+
$ref: SpecTask.yaml
|
|
9
|
+
description: Structured task list with acceptance criteria and TDD phases
|
|
10
|
+
totalEstimate:
|
|
11
|
+
type: string
|
|
12
|
+
description: Overall effort estimate for all tasks combined
|
|
13
|
+
required:
|
|
14
|
+
- tasks
|
|
15
|
+
- totalEstimate
|
|
16
|
+
allOf:
|
|
17
|
+
- $ref: SpecArtifactBase.yaml
|
|
18
|
+
description: Task breakdown artifact defining implementation tasks
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
$schema: https://json-schema.org/draft/2020-12/schema
|
|
2
|
+
$id: TddCycle.yaml
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
red:
|
|
6
|
+
type: array
|
|
7
|
+
items:
|
|
8
|
+
type: string
|
|
9
|
+
description: "RED phase: tests to write FIRST (before implementation)"
|
|
10
|
+
green:
|
|
11
|
+
type: array
|
|
12
|
+
items:
|
|
13
|
+
type: string
|
|
14
|
+
description: "GREEN phase: minimal implementation to pass tests"
|
|
15
|
+
refactor:
|
|
16
|
+
type: array
|
|
17
|
+
items:
|
|
18
|
+
type: string
|
|
19
|
+
description: "REFACTOR phase: code improvements while keeping tests green"
|
|
20
|
+
required:
|
|
21
|
+
- red
|
|
22
|
+
- green
|
|
23
|
+
- refactor
|
|
24
|
+
description: Test-Driven Development cycle phases for a task
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
$schema: https://json-schema.org/draft/2020-12/schema
|
|
2
|
+
$id: TechDecision.yaml
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
title:
|
|
6
|
+
type: string
|
|
7
|
+
description: Title or name of the decision being made
|
|
8
|
+
chosen:
|
|
9
|
+
type: string
|
|
10
|
+
description: The chosen technology, library, or approach
|
|
11
|
+
rejected:
|
|
12
|
+
type: array
|
|
13
|
+
items:
|
|
14
|
+
type: string
|
|
15
|
+
description: Alternative options that were considered but rejected
|
|
16
|
+
rationale:
|
|
17
|
+
type: string
|
|
18
|
+
description: Rationale explaining why the chosen option was selected
|
|
19
|
+
required:
|
|
20
|
+
- title
|
|
21
|
+
- chosen
|
|
22
|
+
- rejected
|
|
23
|
+
- rationale
|
|
24
|
+
description: Technology or approach decision with rationale
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
$schema: https://json-schema.org/draft/2020-12/schema
|
|
2
|
+
$id: TechnicalPlanArtifact.yaml
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
phases:
|
|
6
|
+
type: array
|
|
7
|
+
items:
|
|
8
|
+
$ref: PlanPhase.yaml
|
|
9
|
+
description: Structured implementation phases
|
|
10
|
+
filesToCreate:
|
|
11
|
+
type: array
|
|
12
|
+
items:
|
|
13
|
+
type: string
|
|
14
|
+
description: New files planned to be created
|
|
15
|
+
filesToModify:
|
|
16
|
+
type: array
|
|
17
|
+
items:
|
|
18
|
+
type: string
|
|
19
|
+
description: Existing files planned to be modified
|
|
20
|
+
required:
|
|
21
|
+
- phases
|
|
22
|
+
- filesToCreate
|
|
23
|
+
- filesToModify
|
|
24
|
+
allOf:
|
|
25
|
+
- $ref: SpecArtifactBase.yaml
|
|
26
|
+
description: Technical implementation plan artifact defining strategy and file changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
$schema: https://json-schema.org/draft/2020-12/schema
|
|
2
|
+
$id: TimelineEvent.yaml
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
userQuery:
|
|
6
|
+
type: string
|
|
7
|
+
description: The user query or action that triggered this timeline event
|
|
8
|
+
timestamp:
|
|
9
|
+
type: string
|
|
10
|
+
format: date-time
|
|
11
|
+
description: Timestamp when this event occurred (read-only, set by system)
|
|
12
|
+
required:
|
|
13
|
+
- userQuery
|
|
14
|
+
- timestamp
|
|
15
|
+
allOf:
|
|
16
|
+
- $ref: BaseEntity.yaml
|
|
17
|
+
description: A significant event in the feature's timeline tracking user interactions and milestones
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
$schema: https://json-schema.org/draft/2020-12/schema
|
|
2
|
+
$id: Tool.yaml
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
toolName:
|
|
6
|
+
type: string
|
|
7
|
+
description: Display name of the tool
|
|
8
|
+
type:
|
|
9
|
+
$ref: ToolType.yaml
|
|
10
|
+
description: Tool type classification
|
|
11
|
+
installedVersion:
|
|
12
|
+
type: string
|
|
13
|
+
description: Installed version number
|
|
14
|
+
installedAt:
|
|
15
|
+
type: string
|
|
16
|
+
format: date-time
|
|
17
|
+
description: Tool installation timestamp
|
|
18
|
+
required:
|
|
19
|
+
- toolName
|
|
20
|
+
- type
|
|
21
|
+
allOf:
|
|
22
|
+
- $ref: BaseEntity.yaml
|
|
23
|
+
description: IDE or CLI tool entity with installation tracking
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
$schema: https://json-schema.org/draft/2020-12/schema
|
|
2
|
+
$id: ToolInstallCommand.yaml
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
command:
|
|
6
|
+
type: string
|
|
7
|
+
description: Shell command string to execute
|
|
8
|
+
platform:
|
|
9
|
+
type: string
|
|
10
|
+
description: Target platform identifier
|
|
11
|
+
timeout:
|
|
12
|
+
type: integer
|
|
13
|
+
minimum: -2147483648
|
|
14
|
+
maximum: 2147483647
|
|
15
|
+
description: Execution timeout in milliseconds
|
|
16
|
+
toolName:
|
|
17
|
+
type: string
|
|
18
|
+
description: Tool name
|
|
19
|
+
packageManager:
|
|
20
|
+
type: string
|
|
21
|
+
description: Package manager identifier
|
|
22
|
+
required:
|
|
23
|
+
- command
|
|
24
|
+
- platform
|
|
25
|
+
- timeout
|
|
26
|
+
- toolName
|
|
27
|
+
- packageManager
|
|
28
|
+
description: Executable installation command for a tool
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
$schema: https://json-schema.org/draft/2020-12/schema
|
|
2
|
+
$id: ToolInstallationStatus.yaml
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
status:
|
|
6
|
+
anyOf:
|
|
7
|
+
- type: string
|
|
8
|
+
const: available
|
|
9
|
+
- type: string
|
|
10
|
+
const: missing
|
|
11
|
+
- type: string
|
|
12
|
+
const: error
|
|
13
|
+
description: Current installation status
|
|
14
|
+
toolName:
|
|
15
|
+
type: string
|
|
16
|
+
description: Tool name
|
|
17
|
+
errorMessage:
|
|
18
|
+
type: string
|
|
19
|
+
description: Error message if status is error
|
|
20
|
+
suggestions:
|
|
21
|
+
type: array
|
|
22
|
+
items:
|
|
23
|
+
$ref: InstallationSuggestion.yaml
|
|
24
|
+
description: Installation suggestions
|
|
25
|
+
required:
|
|
26
|
+
- status
|
|
27
|
+
- toolName
|
|
28
|
+
description: Installation status and suggestions for a tool
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
$schema: https://json-schema.org/draft/2020-12/schema
|
|
2
|
+
$id: UserProfile.yaml
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
name:
|
|
6
|
+
type: string
|
|
7
|
+
description: User's display name (optional)
|
|
8
|
+
email:
|
|
9
|
+
type: string
|
|
10
|
+
description: User's email address (optional)
|
|
11
|
+
githubUsername:
|
|
12
|
+
type: string
|
|
13
|
+
description: GitHub username (optional, for PR attribution)
|
|
14
|
+
description: User profile information
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
$schema: https://json-schema.org/draft/2020-12/schema
|
|
2
|
+
$id: WorkflowConfig.yaml
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
openPrOnImplementationComplete:
|
|
6
|
+
type: boolean
|
|
7
|
+
default: false
|
|
8
|
+
description: "Create PR on implementation complete (default: false)"
|
|
9
|
+
pushOnImplementationComplete:
|
|
10
|
+
type: boolean
|
|
11
|
+
default: false
|
|
12
|
+
description: "Push branch on implementation complete (default: false)"
|
|
13
|
+
allowPrd:
|
|
14
|
+
type: boolean
|
|
15
|
+
default: false
|
|
16
|
+
description: "Auto-approve requirements phase (default: false)"
|
|
17
|
+
allowPlan:
|
|
18
|
+
type: boolean
|
|
19
|
+
default: false
|
|
20
|
+
description: "Auto-approve planning phase (default: false)"
|
|
21
|
+
autoMergeOnImplementationComplete:
|
|
22
|
+
type: boolean
|
|
23
|
+
default: false
|
|
24
|
+
description: "Auto-merge on implementation complete (default: false)"
|
|
25
|
+
required:
|
|
26
|
+
- openPrOnImplementationComplete
|
|
27
|
+
- pushOnImplementationComplete
|
|
28
|
+
- allowPrd
|
|
29
|
+
- allowPlan
|
|
30
|
+
- autoMergeOnImplementationComplete
|
|
31
|
+
description: Global workflow configuration defaults
|
package/dist/packages/core/src/application/ports/output/services/worktree-service.interface.d.ts
CHANGED
|
@@ -71,6 +71,14 @@ export interface IWorktreeService {
|
|
|
71
71
|
* @returns True if a worktree for this branch exists
|
|
72
72
|
*/
|
|
73
73
|
exists(repoPath: string, branch: string): Promise<boolean>;
|
|
74
|
+
/**
|
|
75
|
+
* Check if a git branch exists in the repository.
|
|
76
|
+
*
|
|
77
|
+
* @param repoPath - Path to the git repository
|
|
78
|
+
* @param branch - Branch name to check
|
|
79
|
+
* @returns True if the branch exists
|
|
80
|
+
*/
|
|
81
|
+
branchExists(repoPath: string, branch: string): Promise<boolean>;
|
|
74
82
|
/**
|
|
75
83
|
* Get the conventional worktree path for a branch.
|
|
76
84
|
*
|
package/dist/packages/core/src/application/ports/output/services/worktree-service.interface.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/worktree-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,oBAAY,iBAAiB;IAC3B,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,cAAc,mBAAmB;IACjC,SAAS,cAAc;CACxB;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK;aAGpB,IAAI,EAAE,iBAAiB;aACvB,KAAK,CAAC,EAAE,KAAK;gBAF7B,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,iBAAiB,EACvB,KAAK,CAAC,EAAE,KAAK,YAAA;CAKhC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;OAQG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEtF;;;;;OAKG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5C;;;;;OAKG;IACH,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAEhD;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE3D;;;;;;OAMG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3D"}
|
|
1
|
+
{"version":3,"file":"worktree-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/worktree-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,oBAAY,iBAAiB;IAC3B,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,cAAc,mBAAmB;IACjC,SAAS,cAAc;CACxB;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK;aAGpB,IAAI,EAAE,iBAAiB;aACvB,KAAK,CAAC,EAAE,KAAK;gBAF7B,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,iBAAiB,EACvB,KAAK,CAAC,EAAE,KAAK,YAAA;CAKhC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;OAQG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEtF;;;;;OAKG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5C;;;;;OAKG;IACH,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAEhD;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE3D;;;;;;OAMG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEjE;;;;;;OAMG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slug-resolver.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/use-cases/features/create/slug-resolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oEAAoE,CAAC;AAC7G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AAKrG,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBACa,YAAY;IAGrB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE5B,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAFf,WAAW,EAAE,kBAAkB,EAE/B,eAAe,EAAE,gBAAgB;IAGpD;;;OAGG;IACG,iBAAiB,CACrB,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"slug-resolver.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/use-cases/features/create/slug-resolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oEAAoE,CAAC;AAC7G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AAKrG,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBACa,YAAY;IAGrB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE5B,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAFf,WAAW,EAAE,kBAAkB,EAE/B,eAAe,EAAE,gBAAgB;IAGpD;;;OAGG;IACG,iBAAiB,CACrB,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,oBAAoB,CAAC;CAgCjC"}
|
|
@@ -41,9 +41,10 @@ let SlugResolver = class SlugResolver {
|
|
|
41
41
|
continue; // try suffixed version
|
|
42
42
|
continue;
|
|
43
43
|
}
|
|
44
|
-
// Check if the git branch already exists (
|
|
44
|
+
// Check if the git branch already exists (worktree or standalone branch)
|
|
45
45
|
const branchInUse = await this.worktreeService.exists(repositoryPath, branch);
|
|
46
|
-
|
|
46
|
+
const branchExists = await this.worktreeService.branchExists(repositoryPath, branch);
|
|
47
|
+
if (branchInUse || branchExists)
|
|
47
48
|
continue;
|
|
48
49
|
if (suffix > 0) {
|
|
49
50
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec-yaml-parser.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/domain/factories/spec-yaml-parser.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"spec-yaml-parser.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/domain/factories/spec-yaml-parser.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,EACb,aAAa,EACd,MAAM,qBAAqB,CAAC;AA0F7B;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,CAI9D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAInE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,qBAAqB,CAIpE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAI7D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAIrE"}
|
|
@@ -8,15 +8,27 @@
|
|
|
8
8
|
import Ajv2020 from 'ajv/dist/2020.js';
|
|
9
9
|
import addFormats from 'ajv-formats';
|
|
10
10
|
import yaml from 'js-yaml';
|
|
11
|
-
import { readdirSync, readFileSync } from 'node:fs';
|
|
11
|
+
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
|
12
12
|
import { randomUUID } from 'node:crypto';
|
|
13
|
-
import { join } from 'node:path';
|
|
13
|
+
import { dirname, join } from 'node:path';
|
|
14
|
+
import { fileURLToPath } from 'node:url';
|
|
14
15
|
// ---------------------------------------------------------------------------
|
|
15
16
|
// Schema loader — loads all JSON Schema YAML files from apis/json-schema/
|
|
16
17
|
// ---------------------------------------------------------------------------
|
|
17
|
-
/** Resolve the apis/json-schema directory relative to the
|
|
18
|
+
/** Resolve the apis/json-schema directory relative to the package root */
|
|
18
19
|
function resolveSchemaDir() {
|
|
19
|
-
|
|
20
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
21
|
+
let dir = __dirname;
|
|
22
|
+
for (let i = 0; i < 10; i++) {
|
|
23
|
+
const candidate = join(dir, 'apis', 'json-schema');
|
|
24
|
+
if (existsSync(candidate))
|
|
25
|
+
return candidate;
|
|
26
|
+
const parent = dirname(dir);
|
|
27
|
+
if (parent === dir)
|
|
28
|
+
break;
|
|
29
|
+
dir = parent;
|
|
30
|
+
}
|
|
31
|
+
throw new Error(`Could not find apis/json-schema directory (searched from ${__dirname})`);
|
|
20
32
|
}
|
|
21
33
|
function createValidator() {
|
|
22
34
|
const ajv = new Ajv2020({ allErrors: true, strict: false });
|
|
@@ -21,6 +21,7 @@ export declare class WorktreeService implements IWorktreeService {
|
|
|
21
21
|
remove(worktreePath: string): Promise<void>;
|
|
22
22
|
list(repoPath: string): Promise<WorktreeInfo[]>;
|
|
23
23
|
exists(repoPath: string, branch: string): Promise<boolean>;
|
|
24
|
+
branchExists(repoPath: string, branch: string): Promise<boolean>;
|
|
24
25
|
getWorktreePath(repoPath: string, branch: string): string;
|
|
25
26
|
private parseWorktreeOutput;
|
|
26
27
|
private parseGitError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/worktree.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACb,MAAM,0EAA0E,CAAC;AAOlF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE,MAAM,KACb,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEjD,qBACa,eAAgB,YAAW,gBAAgB;IAClB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAqBrF,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3C,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAO/C,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"worktree.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/worktree.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACb,MAAM,0EAA0E,CAAC;AAOlF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE,MAAM,KACb,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEjD,qBACa,eAAgB,YAAW,gBAAgB;IAClB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAqBrF,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3C,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAO/C,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK1D,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWtE,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAMzD,OAAO,CAAC,mBAAmB;IA2B3B,OAAO,CAAC,aAAa;IAgCrB,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,qBAAqB;CAU9B"}
|
|
@@ -62,6 +62,17 @@ let WorktreeService = class WorktreeService {
|
|
|
62
62
|
const worktrees = await this.list(repoPath);
|
|
63
63
|
return worktrees.some((w) => w.branch === branch);
|
|
64
64
|
}
|
|
65
|
+
async branchExists(repoPath, branch) {
|
|
66
|
+
try {
|
|
67
|
+
const { stdout } = await this.execFile('git', ['branch', '--list', branch], {
|
|
68
|
+
cwd: repoPath,
|
|
69
|
+
});
|
|
70
|
+
return stdout.trim().length > 0;
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
65
76
|
getWorktreePath(repoPath, branch) {
|
|
66
77
|
const repoHash = createHash('sha256').update(repoPath).digest('hex').slice(0, 16);
|
|
67
78
|
const slug = branch.replace(/\//g, '-');
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repo Command
|
|
3
|
+
*
|
|
4
|
+
* Top-level repo command with subcommands for managing tracked repositories.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* shep repo [subcommand]
|
|
8
|
+
*
|
|
9
|
+
* Subcommands:
|
|
10
|
+
* shep repo ls List tracked repositories
|
|
11
|
+
* shep repo show <id> Display details of a tracked repository
|
|
12
|
+
*/
|
|
13
|
+
import { Command } from 'commander';
|
|
14
|
+
/**
|
|
15
|
+
* Create the repo command with all subcommands
|
|
16
|
+
*/
|
|
17
|
+
export declare function createRepoCommand(): Command;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/repo/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAO3C"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repo Command
|
|
3
|
+
*
|
|
4
|
+
* Top-level repo command with subcommands for managing tracked repositories.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* shep repo [subcommand]
|
|
8
|
+
*
|
|
9
|
+
* Subcommands:
|
|
10
|
+
* shep repo ls List tracked repositories
|
|
11
|
+
* shep repo show <id> Display details of a tracked repository
|
|
12
|
+
*/
|
|
13
|
+
import { Command } from 'commander';
|
|
14
|
+
import { createShowCommand } from './show.command.js';
|
|
15
|
+
import { createLsCommand } from './ls.command.js';
|
|
16
|
+
/**
|
|
17
|
+
* Create the repo command with all subcommands
|
|
18
|
+
*/
|
|
19
|
+
export function createRepoCommand() {
|
|
20
|
+
const repo = new Command('repo')
|
|
21
|
+
.description('Manage tracked repositories')
|
|
22
|
+
.addCommand(createLsCommand())
|
|
23
|
+
.addCommand(createShowCommand());
|
|
24
|
+
return repo;
|
|
25
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repo List Command
|
|
3
|
+
*
|
|
4
|
+
* List all tracked repositories in a formatted table.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* shep repo ls
|
|
8
|
+
*/
|
|
9
|
+
import { Command } from 'commander';
|
|
10
|
+
export declare function createLsCommand(): Command;
|
|
11
|
+
//# sourceMappingURL=ls.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ls.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/repo/ls.command.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBpC,wBAAgB,eAAe,IAAI,OAAO,CAuCzC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repo List Command
|
|
3
|
+
*
|
|
4
|
+
* List all tracked repositories in a formatted table.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* shep repo ls
|
|
8
|
+
*/
|
|
9
|
+
import { Command } from 'commander';
|
|
10
|
+
import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
|
|
11
|
+
import { ListRepositoriesUseCase } from '../../../../../packages/core/src/application/use-cases/repositories/list-repositories.use-case.js';
|
|
12
|
+
import { colors, messages, renderListView } from '../../ui/index.js';
|
|
13
|
+
/** Format a duration in ms to a compact human-readable string. */
|
|
14
|
+
function formatDuration(ms) {
|
|
15
|
+
const seconds = Math.floor(ms / 1000);
|
|
16
|
+
if (seconds < 60)
|
|
17
|
+
return `${seconds}s`;
|
|
18
|
+
const minutes = Math.floor(seconds / 60);
|
|
19
|
+
if (minutes < 60)
|
|
20
|
+
return `${minutes}m`;
|
|
21
|
+
const hours = Math.floor(minutes / 60);
|
|
22
|
+
const remMin = minutes % 60;
|
|
23
|
+
if (hours < 24)
|
|
24
|
+
return remMin > 0 ? `${hours}h ${remMin}m` : `${hours}h`;
|
|
25
|
+
const days = Math.floor(hours / 24);
|
|
26
|
+
return `${days}d`;
|
|
27
|
+
}
|
|
28
|
+
export function createLsCommand() {
|
|
29
|
+
return new Command('ls').description('List tracked repositories').action(async () => {
|
|
30
|
+
try {
|
|
31
|
+
const useCase = container.resolve(ListRepositoriesUseCase);
|
|
32
|
+
const featureRepo = container.resolve('IFeatureRepository');
|
|
33
|
+
const repositories = await useCase.execute();
|
|
34
|
+
const now = Date.now();
|
|
35
|
+
const rows = await Promise.all(repositories.map(async (repo) => {
|
|
36
|
+
const features = await featureRepo.list({ repositoryPath: repo.path });
|
|
37
|
+
return [
|
|
38
|
+
repo.id.substring(0, 8),
|
|
39
|
+
repo.name,
|
|
40
|
+
String(features.length),
|
|
41
|
+
repo.path,
|
|
42
|
+
colors.muted(`${formatDuration(now - new Date(repo.createdAt).getTime())} ago`),
|
|
43
|
+
];
|
|
44
|
+
}));
|
|
45
|
+
renderListView({
|
|
46
|
+
title: 'Repositories',
|
|
47
|
+
columns: [
|
|
48
|
+
{ label: 'ID', width: 10 },
|
|
49
|
+
{ label: 'Name', width: 28 },
|
|
50
|
+
{ label: 'Features', width: 10 },
|
|
51
|
+
{ label: 'Path', width: 36 },
|
|
52
|
+
{ label: 'Created', width: 12 },
|
|
53
|
+
],
|
|
54
|
+
rows,
|
|
55
|
+
emptyMessage: 'No repositories found',
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
60
|
+
messages.error('Failed to list repositories', err);
|
|
61
|
+
process.exitCode = 1;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared helper: resolve a repository by exact or prefix ID.
|
|
3
|
+
*/
|
|
4
|
+
import type { Repository } from '../../../../../packages/core/src/domain/generated/output.js';
|
|
5
|
+
export declare function resolveRepository(id: string): Promise<{
|
|
6
|
+
repository: Repository;
|
|
7
|
+
} | {
|
|
8
|
+
error: string;
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=resolve-repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-repository.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/repo/resolve-repository.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,wBAAsB,iBAAiB,CACrC,EAAE,EAAE,MAAM,GACT,OAAO,CAAC;IAAE,UAAU,EAAE,UAAU,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAqBzD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared helper: resolve a repository by exact or prefix ID.
|
|
3
|
+
*/
|
|
4
|
+
import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
|
|
5
|
+
export async function resolveRepository(id) {
|
|
6
|
+
const repo = container.resolve('IRepositoryRepository');
|
|
7
|
+
// Try exact match first
|
|
8
|
+
const exact = await repo.findById(id);
|
|
9
|
+
if (exact)
|
|
10
|
+
return { repository: exact };
|
|
11
|
+
// Try prefix match
|
|
12
|
+
if (id.length < 36) {
|
|
13
|
+
const all = await repo.list();
|
|
14
|
+
const matches = all.filter((r) => r.id.startsWith(id));
|
|
15
|
+
if (matches.length === 1)
|
|
16
|
+
return { repository: matches[0] };
|
|
17
|
+
if (matches.length > 1) {
|
|
18
|
+
return {
|
|
19
|
+
error: `Multiple repositories match prefix "${id}": ${matches.map((m) => m.id.substring(0, 8)).join(', ')}`,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return { error: `Repository not found: ${id}` };
|
|
24
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repo Show Command
|
|
3
|
+
*
|
|
4
|
+
* Display details of a specific tracked repository.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* shep repo show <id>
|
|
8
|
+
*/
|
|
9
|
+
import { Command } from 'commander';
|
|
10
|
+
export declare function createShowCommand(): Command;
|
|
11
|
+
//# sourceMappingURL=show.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/repo/show.command.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoCpC,wBAAgB,iBAAiB,IAAI,OAAO,CAsD3C"}
|