@markjaquith/agency 2.17.0 → 2.18.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/README.md +18 -4
- package/cli.ts +74 -8
- package/package.json +1 -1
- package/skills/agency/SKILL.md +13 -6
- package/src/cli-parser.test.ts +74 -0
- package/src/cli-parser.ts +208 -27
- package/src/cli.test.ts +94 -4
- package/src/commands/context.ts +3 -0
- package/src/commands/init.ts +3 -1
- package/src/commands/validate.test.ts +2 -0
- package/src/commands/work.test.ts +1 -0
- package/src/commands/work.ts +15 -7
- package/src/commands/workbase.test.ts +63 -2
- package/src/commands/workbase.ts +77 -10
- package/src/services/WorkbaseService.test.ts +147 -4
- package/src/services/WorkbaseService.ts +214 -12
- package/src/workbase/schemas.test.ts +17 -6
- package/src/workbase/schemas.ts +16 -1
- package/src/workbase/workbase-choice.ts +2 -0
package/src/workbase/schemas.ts
CHANGED
|
@@ -54,11 +54,23 @@ export const WorkbaseConfig = Schema.Struct({
|
|
|
54
54
|
worktreeCreateCommand: Schema.optional(Schema.NonEmptyArray(NonEmptyString)),
|
|
55
55
|
})
|
|
56
56
|
|
|
57
|
-
export const
|
|
57
|
+
export const LegacyWorkbaseRegistry = Schema.Struct({
|
|
58
58
|
version: Schema.Literal(1),
|
|
59
59
|
workbases: Schema.Array(NonEmptyString),
|
|
60
60
|
})
|
|
61
61
|
|
|
62
|
+
export const WorkbaseRegistration = Schema.Struct({
|
|
63
|
+
id: EntityId,
|
|
64
|
+
name: Schema.optional(EntityId),
|
|
65
|
+
path: NonEmptyString,
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
export const WorkbaseRegistry = Schema.Struct({
|
|
69
|
+
version: Schema.Literal(2),
|
|
70
|
+
workbases: Schema.Array(WorkbaseRegistration),
|
|
71
|
+
defaultId: Schema.optional(EntityId),
|
|
72
|
+
})
|
|
73
|
+
|
|
62
74
|
export const Dependency = Schema.Struct({
|
|
63
75
|
id: EntityId,
|
|
64
76
|
dependsOn: Schema.optional(Schema.Array(EntityId)),
|
|
@@ -107,6 +119,9 @@ export const PhaseFrontmatter = Schema.Struct({
|
|
|
107
119
|
|
|
108
120
|
export type WorkbaseConfig = Schema.Schema.Type<typeof WorkbaseConfig>
|
|
109
121
|
export type WorkbaseRegistry = Schema.Schema.Type<typeof WorkbaseRegistry>
|
|
122
|
+
export type WorkbaseRegistration = Schema.Schema.Type<
|
|
123
|
+
typeof WorkbaseRegistration
|
|
124
|
+
>
|
|
110
125
|
export type Dependency = Schema.Schema.Type<typeof Dependency>
|
|
111
126
|
export type RepositoryReference = Schema.Schema.Type<typeof RepositoryReference>
|
|
112
127
|
export type WorkStatus = Schema.Schema.Type<typeof WorkStatus>
|
|
@@ -30,6 +30,8 @@ export const resolveWorkbase = (
|
|
|
30
30
|
return yield* workbase.discover(startPath).pipe(
|
|
31
31
|
Effect.catchTag("WorkbaseNotFoundError", () =>
|
|
32
32
|
Effect.gen(function* () {
|
|
33
|
+
const defaultWorkbase = yield* workbase.getDefault()
|
|
34
|
+
if (defaultWorkbase) return defaultWorkbase.path
|
|
33
35
|
const registered = yield* workbase.listRegistered()
|
|
34
36
|
if (registered.length === 0) {
|
|
35
37
|
return yield* Effect.fail(
|