@markjaquith/agency 3.2.14 → 3.3.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 (75) hide show
  1. package/README.md +20 -3
  2. package/cli-main.ts +1 -0
  3. package/package.json +7 -2
  4. package/src/cli-parser.ts +13 -0
  5. package/src/commands/work.ts +70 -2
  6. package/src/services/ReadinessService.ts +20 -0
  7. package/src/workbase/execution-contract.ts +10 -1
  8. package/src/workbase/schemas.ts +12 -0
  9. package/fixtures/protocol/orchestration-recipes.json +0 -53
  10. package/pi-extensions/agency.test.ts +0 -117
  11. package/src/check-commits.test.ts +0 -58
  12. package/src/cli-parser.test.ts +0 -945
  13. package/src/cli.test.ts +0 -1889
  14. package/src/commands/act.test.ts +0 -418
  15. package/src/commands/archive.test.ts +0 -236
  16. package/src/commands/context.test.ts +0 -711
  17. package/src/commands/description.test.ts +0 -103
  18. package/src/commands/doctor.test.ts +0 -185
  19. package/src/commands/epic.test.ts +0 -196
  20. package/src/commands/init.test.ts +0 -117
  21. package/src/commands/integration.test.ts +0 -165
  22. package/src/commands/pr.test.ts +0 -248
  23. package/src/commands/push.test.ts +0 -56
  24. package/src/commands/read-only.test.ts +0 -161
  25. package/src/commands/repo.test.ts +0 -199
  26. package/src/commands/restore.test.ts +0 -106
  27. package/src/commands/status.test.ts +0 -113
  28. package/src/commands/sync.test.ts +0 -200
  29. package/src/commands/task-phase.test.ts +0 -410
  30. package/src/commands/task.test.ts +0 -281
  31. package/src/commands/validate.test.ts +0 -186
  32. package/src/commands/work.test.ts +0 -1375
  33. package/src/commands/workbase.test.ts +0 -170
  34. package/src/graph-schema.test.ts +0 -124
  35. package/src/protocol.test.ts +0 -163
  36. package/src/readiness.test.ts +0 -105
  37. package/src/services/ArchiveBulkService.test.ts +0 -384
  38. package/src/services/ArchiveService.test.ts +0 -1092
  39. package/src/services/EpicService.test.ts +0 -74
  40. package/src/services/FileSystemService.test.ts +0 -81
  41. package/src/services/GraphMutationService.test.ts +0 -486
  42. package/src/services/GraphService.test.ts +0 -494
  43. package/src/services/IntegrationService.test.ts +0 -1091
  44. package/src/services/LifecycleTransaction.test.ts +0 -145
  45. package/src/services/PullRequestService.test.ts +0 -716
  46. package/src/services/PushService.test.ts +0 -408
  47. package/src/services/ReadinessService.test.ts +0 -290
  48. package/src/services/RepositoryService.test.ts +0 -789
  49. package/src/services/ReviewService.test.ts +0 -408
  50. package/src/services/SyncService.test.ts +0 -1377
  51. package/src/services/TaskPhaseService.test.ts +0 -852
  52. package/src/services/VersionControlService.test.ts +0 -62
  53. package/src/services/WorkbaseService.test.ts +0 -910
  54. package/src/services/WorktreeLock.test.ts +0 -205
  55. package/src/services/WorktreePerformance.test.ts +0 -71
  56. package/src/services/WorktreeService.test.ts +0 -2292
  57. package/src/test-utils.ts +0 -110
  58. package/src/usage-log.test.ts +0 -188
  59. package/src/utils/chooser.test.ts +0 -192
  60. package/src/utils/effect.test.ts +0 -30
  61. package/src/utils/interactive.pty.test.ts +0 -128
  62. package/src/utils/interactive.test.tsx +0 -860
  63. package/src/utils/process.test.ts +0 -132
  64. package/src/utils/progress.test.ts +0 -37
  65. package/src/work-view.test.ts +0 -151
  66. package/src/workbase/agent-command.test.ts +0 -128
  67. package/src/workbase/checkout-command.test.ts +0 -62
  68. package/src/workbase/delivery-command.test.ts +0 -180
  69. package/src/workbase/dependency-graph.test.ts +0 -50
  70. package/src/workbase/execution-contract.test.ts +0 -161
  71. package/src/workbase/frontmatter.test.ts +0 -67
  72. package/src/workbase/repository-reference.test.ts +0 -25
  73. package/src/workbase/schemas.test.ts +0 -543
  74. package/src/workbase/work-target.test.ts +0 -108
  75. package/src/workbase/worktree-command.test.ts +0 -61
@@ -1,62 +0,0 @@
1
- import { afterEach, describe, expect, test } from "bun:test"
2
- import { Effect, Layer } from "effect"
3
- import { join } from "node:path"
4
- import { cleanupTempDir, createTempDir, runTestEffect } from "../test-utils"
5
- import {
6
- GitVersionControlService,
7
- VersionControlService,
8
- } from "./VersionControlService"
9
- import { FileSystemService } from "./FileSystemService"
10
-
11
- describe("VersionControlService", () => {
12
- const roots: string[] = []
13
-
14
- afterEach(async () => {
15
- await Promise.all(roots.splice(0).map(cleanupTempDir))
16
- })
17
-
18
- test("inspects a Git repository with one subprocess", async () => {
19
- const commands: readonly string[][] = []
20
- const fileSystem = {
21
- ...FileSystemService.Default,
22
- runCommand: (command: readonly string[]) => {
23
- ;(commands as string[][]).push([...command])
24
- return Effect.succeed({
25
- exitCode: 0,
26
- stdout:
27
- "local\tcore.bare true\nlocal\tremote.origin.url agency:agency.git\nglobal\turl.https://example.com/.insteadof agency:\n",
28
- stderr: "",
29
- })
30
- },
31
- } as unknown as Effect.Effect.Success<typeof FileSystemService>
32
- const backend = await Effect.runPromise(
33
- GitVersionControlService.pipe(
34
- Effect.provide(GitVersionControlService.Default),
35
- ),
36
- )
37
- const inspection = await Effect.runPromise(
38
- backend
39
- .inspectRepository("/repository")
40
- .pipe(Effect.provide(Layer.succeed(FileSystemService, fileSystem))),
41
- )
42
-
43
- expect(commands).toHaveLength(1)
44
- expect(commands[0]).toContain("--get-regexp")
45
- expect(inspection).toEqual({
46
- kind: "bare",
47
- remote: "https://example.com/agency.git",
48
- })
49
- })
50
-
51
- test("selects Git for legacy and explicit Git workbases", async () => {
52
- const root = await createTempDir()
53
- roots.push(root)
54
- await Bun.write(join(root, "agency.json"), JSON.stringify({ version: 2 }))
55
- const selected = await runTestEffect(
56
- VersionControlService.pipe(
57
- Effect.flatMap((service) => service.forWorkbase(root)),
58
- ),
59
- )
60
- expect(selected.kind).toBe("git")
61
- })
62
- })