@markjaquith/agency 3.2.13 → 3.2.15

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 (69) hide show
  1. package/package.json +7 -2
  2. package/src/workbase/schemas.ts +12 -0
  3. package/fixtures/protocol/orchestration-recipes.json +0 -53
  4. package/pi-extensions/agency.test.ts +0 -117
  5. package/src/check-commits.test.ts +0 -58
  6. package/src/cli-parser.test.ts +0 -945
  7. package/src/cli.test.ts +0 -1889
  8. package/src/commands/act.test.ts +0 -418
  9. package/src/commands/archive.test.ts +0 -236
  10. package/src/commands/context.test.ts +0 -665
  11. package/src/commands/description.test.ts +0 -103
  12. package/src/commands/doctor.test.ts +0 -185
  13. package/src/commands/epic.test.ts +0 -196
  14. package/src/commands/init.test.ts +0 -117
  15. package/src/commands/integration.test.ts +0 -165
  16. package/src/commands/pr.test.ts +0 -248
  17. package/src/commands/push.test.ts +0 -56
  18. package/src/commands/read-only.test.ts +0 -161
  19. package/src/commands/repo.test.ts +0 -199
  20. package/src/commands/restore.test.ts +0 -106
  21. package/src/commands/status.test.ts +0 -113
  22. package/src/commands/sync.test.ts +0 -200
  23. package/src/commands/task-phase.test.ts +0 -410
  24. package/src/commands/task.test.ts +0 -281
  25. package/src/commands/validate.test.ts +0 -186
  26. package/src/commands/work.test.ts +0 -1375
  27. package/src/commands/workbase.test.ts +0 -170
  28. package/src/graph-schema.test.ts +0 -124
  29. package/src/protocol.test.ts +0 -163
  30. package/src/readiness.test.ts +0 -105
  31. package/src/services/ArchiveBulkService.test.ts +0 -384
  32. package/src/services/ArchiveService.test.ts +0 -1092
  33. package/src/services/EpicService.test.ts +0 -74
  34. package/src/services/FileSystemService.test.ts +0 -81
  35. package/src/services/GraphMutationService.test.ts +0 -486
  36. package/src/services/GraphService.test.ts +0 -494
  37. package/src/services/IntegrationService.test.ts +0 -1091
  38. package/src/services/LifecycleTransaction.test.ts +0 -145
  39. package/src/services/PullRequestService.test.ts +0 -716
  40. package/src/services/PushService.test.ts +0 -408
  41. package/src/services/ReadinessService.test.ts +0 -290
  42. package/src/services/RepositoryService.test.ts +0 -789
  43. package/src/services/ReviewService.test.ts +0 -408
  44. package/src/services/SyncService.test.ts +0 -1377
  45. package/src/services/TaskPhaseService.test.ts +0 -852
  46. package/src/services/VersionControlService.test.ts +0 -62
  47. package/src/services/WorkbaseService.test.ts +0 -910
  48. package/src/services/WorktreeLock.test.ts +0 -205
  49. package/src/services/WorktreePerformance.test.ts +0 -71
  50. package/src/services/WorktreeService.test.ts +0 -2292
  51. package/src/test-utils.ts +0 -110
  52. package/src/usage-log.test.ts +0 -188
  53. package/src/utils/chooser.test.ts +0 -192
  54. package/src/utils/effect.test.ts +0 -30
  55. package/src/utils/interactive.pty.test.ts +0 -128
  56. package/src/utils/interactive.test.tsx +0 -860
  57. package/src/utils/process.test.ts +0 -132
  58. package/src/utils/progress.test.ts +0 -37
  59. package/src/work-view.test.ts +0 -151
  60. package/src/workbase/agent-command.test.ts +0 -128
  61. package/src/workbase/checkout-command.test.ts +0 -62
  62. package/src/workbase/delivery-command.test.ts +0 -180
  63. package/src/workbase/dependency-graph.test.ts +0 -50
  64. package/src/workbase/execution-contract.test.ts +0 -161
  65. package/src/workbase/frontmatter.test.ts +0 -67
  66. package/src/workbase/repository-reference.test.ts +0 -25
  67. package/src/workbase/schemas.test.ts +0 -543
  68. package/src/workbase/work-target.test.ts +0 -108
  69. 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
- })