@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.
- package/package.json +7 -2
- package/src/workbase/schemas.ts +12 -0
- package/fixtures/protocol/orchestration-recipes.json +0 -53
- package/pi-extensions/agency.test.ts +0 -117
- package/src/check-commits.test.ts +0 -58
- package/src/cli-parser.test.ts +0 -945
- package/src/cli.test.ts +0 -1889
- package/src/commands/act.test.ts +0 -418
- package/src/commands/archive.test.ts +0 -236
- package/src/commands/context.test.ts +0 -665
- package/src/commands/description.test.ts +0 -103
- package/src/commands/doctor.test.ts +0 -185
- package/src/commands/epic.test.ts +0 -196
- package/src/commands/init.test.ts +0 -117
- package/src/commands/integration.test.ts +0 -165
- package/src/commands/pr.test.ts +0 -248
- package/src/commands/push.test.ts +0 -56
- package/src/commands/read-only.test.ts +0 -161
- package/src/commands/repo.test.ts +0 -199
- package/src/commands/restore.test.ts +0 -106
- package/src/commands/status.test.ts +0 -113
- package/src/commands/sync.test.ts +0 -200
- package/src/commands/task-phase.test.ts +0 -410
- package/src/commands/task.test.ts +0 -281
- package/src/commands/validate.test.ts +0 -186
- package/src/commands/work.test.ts +0 -1375
- package/src/commands/workbase.test.ts +0 -170
- package/src/graph-schema.test.ts +0 -124
- package/src/protocol.test.ts +0 -163
- package/src/readiness.test.ts +0 -105
- package/src/services/ArchiveBulkService.test.ts +0 -384
- package/src/services/ArchiveService.test.ts +0 -1092
- package/src/services/EpicService.test.ts +0 -74
- package/src/services/FileSystemService.test.ts +0 -81
- package/src/services/GraphMutationService.test.ts +0 -486
- package/src/services/GraphService.test.ts +0 -494
- package/src/services/IntegrationService.test.ts +0 -1091
- package/src/services/LifecycleTransaction.test.ts +0 -145
- package/src/services/PullRequestService.test.ts +0 -716
- package/src/services/PushService.test.ts +0 -408
- package/src/services/ReadinessService.test.ts +0 -290
- package/src/services/RepositoryService.test.ts +0 -789
- package/src/services/ReviewService.test.ts +0 -408
- package/src/services/SyncService.test.ts +0 -1377
- package/src/services/TaskPhaseService.test.ts +0 -852
- package/src/services/VersionControlService.test.ts +0 -62
- package/src/services/WorkbaseService.test.ts +0 -910
- package/src/services/WorktreeLock.test.ts +0 -205
- package/src/services/WorktreePerformance.test.ts +0 -71
- package/src/services/WorktreeService.test.ts +0 -2292
- package/src/test-utils.ts +0 -110
- package/src/usage-log.test.ts +0 -188
- package/src/utils/chooser.test.ts +0 -192
- package/src/utils/effect.test.ts +0 -30
- package/src/utils/interactive.pty.test.ts +0 -128
- package/src/utils/interactive.test.tsx +0 -860
- package/src/utils/process.test.ts +0 -132
- package/src/utils/progress.test.ts +0 -37
- package/src/work-view.test.ts +0 -151
- package/src/workbase/agent-command.test.ts +0 -128
- package/src/workbase/checkout-command.test.ts +0 -62
- package/src/workbase/delivery-command.test.ts +0 -180
- package/src/workbase/dependency-graph.test.ts +0 -50
- package/src/workbase/execution-contract.test.ts +0 -161
- package/src/workbase/frontmatter.test.ts +0 -67
- package/src/workbase/repository-reference.test.ts +0 -25
- package/src/workbase/schemas.test.ts +0 -543
- package/src/workbase/work-target.test.ts +0 -108
- 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
|
-
})
|