@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.
@@ -54,11 +54,23 @@ export const WorkbaseConfig = Schema.Struct({
54
54
  worktreeCreateCommand: Schema.optional(Schema.NonEmptyArray(NonEmptyString)),
55
55
  })
56
56
 
57
- export const WorkbaseRegistry = Schema.Struct({
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(