@markjaquith/agency 3.2.1 → 3.2.3

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 (54) hide show
  1. package/README.md +30 -60
  2. package/cli-main.ts +38 -72
  3. package/fixtures/protocol/orchestration-recipes.json +9 -34
  4. package/package.json +1 -4
  5. package/schemas/agency-graph-v1.schema.json +2 -31
  6. package/src/cli-parser.test.ts +13 -132
  7. package/src/cli-parser.ts +10 -101
  8. package/src/cli.test.ts +12 -111
  9. package/src/commands/act.ts +2 -6
  10. package/src/commands/push.test.ts +4 -2
  11. package/src/commands/push.ts +2 -0
  12. package/src/commands/sync.ts +3 -3
  13. package/src/commands/validate.ts +3 -1
  14. package/src/commands/work.test.ts +70 -8
  15. package/src/commands/work.ts +15 -8
  16. package/src/graph-schema.ts +0 -2
  17. package/src/protocol.test.ts +24 -25
  18. package/src/protocol.ts +56 -15
  19. package/src/readiness.test.ts +2 -2
  20. package/src/services/ArchiveBulkService.test.ts +0 -88
  21. package/src/services/ArchiveService.ts +0 -32
  22. package/src/services/FileSystemService.ts +2 -0
  23. package/src/services/GraphMutationService.ts +0 -26
  24. package/src/services/GraphService.test.ts +1 -1
  25. package/src/services/IntegrationService.test.ts +4 -4
  26. package/src/services/LifecycleTransaction.ts +5 -1
  27. package/src/services/PhaseService.ts +1 -8
  28. package/src/services/PushService.test.ts +110 -4
  29. package/src/services/PushService.ts +435 -85
  30. package/src/services/ReadinessService.test.ts +0 -34
  31. package/src/services/ReadinessService.ts +1 -20
  32. package/src/services/ReviewService.test.ts +0 -64
  33. package/src/services/ReviewService.ts +0 -5
  34. package/src/services/SyncService.test.ts +75 -88
  35. package/src/services/SyncService.ts +52 -123
  36. package/src/services/TaskPhaseService.test.ts +13 -1
  37. package/src/services/TaskService.ts +1 -7
  38. package/src/services/WorkbaseService.ts +0 -3
  39. package/src/services/WorktreeService.test.ts +192 -1
  40. package/src/services/WorktreeService.ts +169 -34
  41. package/src/test-utils.ts +0 -2
  42. package/src/usage-log.test.ts +11 -1
  43. package/src/usage-log.ts +22 -4
  44. package/src/utils/process.test.ts +10 -0
  45. package/src/utils/process.ts +59 -6
  46. package/src/workbase/AGENTS.md +9 -15
  47. package/src/workbase/agent-command.test.ts +0 -3
  48. package/src/workbase/agent-command.ts +0 -6
  49. package/src/workbase/document-revision.ts +0 -4
  50. package/src/workbase/schemas.test.ts +12 -25
  51. package/src/workbase/schemas.ts +0 -16
  52. package/src/commands/claim.ts +0 -122
  53. package/src/services/ClaimService.test.ts +0 -415
  54. package/src/services/ClaimService.ts +0 -608
package/README.md CHANGED
@@ -336,19 +336,18 @@ Custom agents are direct argv commands, never shell snippets:
336
336
  ```
337
337
 
338
338
  Available placeholders are `{prompt}`, `{workbase}`, `{target}`, `{task}`,
339
- `{phase}`, `{claimant}`, `{sessionId}`, and `{claimRevision}`. Task and phase
339
+ `{phase}`, and `{sessionId}`. Task and phase
340
340
  placeholders are empty when they do not apply. `{prompt}` is empty unless
341
341
  `--auto` is set. If `resumeCommand` is omitted, the fresh command is also used
342
342
  for resumed sessions. If `autoResumeCommand` is omitted, `autoCommand` is used;
343
343
  configured agents without `autoCommand` reject `--auto`.
344
344
 
345
- Every agent receives the same `AGENCY_AGENT`, `AGENCY_CLAIMANT`,
346
- `AGENCY_SESSION_ID`, `AGENCY_CLAIM_REVISION`, `AGENCY_WORKBASE`, `AGENCY_TARGET`,
345
+ Every agent receives the same `AGENCY_AGENT`, `AGENCY_SESSION_ID`,
346
+ `AGENCY_WORKBASE`, `AGENCY_TARGET`,
347
347
  `AGENCY_TASK_ID`, `AGENCY_PHASE_ID`, and `AGENCY_PROMPT` environment. Configured
348
348
  environment is added without overriding these normalized values.
349
349
  Execution-unit agents also receive `AGENCY_WRITABLE_CHECKOUT` with the
350
350
  authoritative writable checkout path.
351
- `AGENCY_CLAIM_REVISION` is empty for local `agency work` launches.
352
351
  `AGENCY_PROMPT` is empty unless `--auto` is set.
353
352
  Autonomous prompts begin `Agency worker launch target: <target>.`, carrying the
354
353
  same canonical target as `AGENCY_TARGET`. This is the process-local fallback for
@@ -624,8 +623,8 @@ untargeted `agency pr` invocations leave command semantics to `gh`.
624
623
 
625
624
  `agency sync` first compares portable repository declarations with local
626
625
  materializations, then compares every execution declaration with local branch
627
- and worktree registration, checkout dirtiness, resolved reference commits, claim
628
- expiry, and pull request state, merge state, and mergeability. It reports
626
+ and worktree registration, checkout dirtiness, resolved reference commits, and
627
+ pull request state, merge state, and mergeability. It reports
629
628
  structured `changes`, `warnings`, `unresolved`, and per-execution evidence. The
630
629
  default mode applies safe reconciliation transitions; `--dry-run` is explicitly
631
630
  observational.
@@ -639,13 +638,12 @@ phase. Scoped sync does not query, materialize, or reconcile unrelated work.
639
638
  - materialize declared but missing repositories from their canonical remotes;
640
639
  - adopt legacy materializations only when they have an unambiguous portable origin;
641
640
  - materialize missing checkouts when no registration, branch, or path conflicts;
642
- - release an active claim only after its declared expiry has passed;
643
641
  - record or refresh a single PR whose head and base match the declaration; and
644
- - mark work done after its authoritative PR is merged and no active claim remains.
642
+ - mark work done after its authoritative PR is merged.
645
643
 
646
644
  Apply never overwrites linked or invalid repositories, repairs remote drift,
647
645
  modifies dirty checkouts, moves worktrees, switches branches, resets reference
648
- commits, chooses among conflicting remotes or PRs, or bypasses active claims.
646
+ commits, or chooses among conflicting remotes or PRs.
649
647
  Those conditions remain visible in `warnings` or `unresolved` with a suggested
650
648
  action.
651
649
 
@@ -836,8 +834,8 @@ fork pull requests exposed through that ref. Review workspaces contain one
836
834
  detached checkout and no writable branch. Source movement is observed separately
837
835
  from the pin and applied only by `review refresh`; sync, doctor, work, cleanup,
838
836
  and archive never move the pin implicitly. Dirty or structurally unexpected
839
- review checkouts block refresh and cleanup. Review tasks support normal status
840
- and claim lifecycle, but reject phase conversion and delivery PR operations.
837
+ review checkouts block refresh and cleanup. Review tasks support the normal status
838
+ lifecycle, but reject phase conversion and delivery PR operations.
841
839
  Each active or archived review task owns one internal task-scoped pin ref. A
842
840
  refresh advances that ref transactionally; failed creation removes it. Archiving
843
841
  retains the pin so a deleted source can still be restored and inspected.
@@ -926,23 +924,20 @@ writing anything.
926
924
 
927
925
  Single-phase tasks and phases store status in YAML. New execution units start
928
926
  `open`, and `agency work` marks the selected execution unit `working` immediately
929
- before launch. Running `agency work` again can relaunch unclaimed `working` work.
927
+ before launch. Running `agency work` again can relaunch `working` work.
930
928
  By default, `done` requires an authoritative merged pull request and is applied
931
929
  by `agency sync`. Work whose intended outcome genuinely requires no pull
932
930
  request may instead use an explicit `--no-pull-request --summary <text>` status
933
931
  transition. Agency records the summary, completion time, and optional evidence
934
932
  URL durably; reopening removes that evidence. This exceptional path refuses work
935
933
  that already has a recorded pull request.
936
- Use explicit claims only when an external orchestrator needs coordinated
937
- ownership. The interactive work selector displays status markers before
938
- execution units. Existing working and delegated work may be released to `open`
939
- or assigned a terminal outcome. Done and dropped work are terminal and may only
934
+ The interactive work selector displays status markers before execution units.
935
+ Existing working and delegated work may be returned to `open` or assigned a
936
+ terminal outcome. Done and dropped work are terminal and may only
940
937
  remain unchanged or transition to open; reopen terminal work before changing its
941
938
  outcome.
942
939
 
943
940
  `delegated` remains readable for existing workbases but cannot be newly assigned.
944
- Delegation is now explicit: the claimant identifies the orchestrator and the
945
- agent identifies the assigned agent.
946
941
 
947
942
  Human list output is a compact table with lifecycle, readiness, parent,
948
943
  repository, branch, recorded PR, and worktree state where applicable. List and
@@ -951,37 +946,6 @@ filters, plus `--ready`, `--blocked`, `--pr`, and `--no-pr`. Status and reposito
951
946
  filters are repeatable. Rows follow task and phase declaration order; plain text
952
947
  labels remain complete without color or icon fonts.
953
948
 
954
- ### Claims
955
-
956
- Claim mutations require the SHA-256 revision exposed by `agency context` or
957
- `agency graph`. Every operation compares that revision while holding an exclusive
958
- document lock and atomically replaces the execution document.
959
-
960
- ```text
961
- agency claim <task-id> [phase-id] --claimant <id> --agent <id>
962
- --session-id <id> --revision <sha256> [--expires-at <timestamp>] [--json]
963
- agency release <task-id> [phase-id] --session-id <id>
964
- --revision <sha256> [--json]
965
- agency finish <task-id> [phase-id] --session-id <id>
966
- --revision <sha256> --outcome <done|dropped>
967
- [--no-pull-request --summary <text> [--evidence-url <url>]] [--json]
968
- ```
969
-
970
- An active claim sets status to `working`. Release returns it to `open`. Finish
971
- records the claim outcome and ownership history; a `done` claim outcome leaves
972
- the execution unit `working` until its pull request is merged, while `dropped`
973
- remains terminal. For a genuine non-PR outcome, `--no-pull-request` atomically
974
- records completion evidence, finishes the claim, and sets the execution unit to
975
- `done`; `--summary` is required and `--evidence-url` is optional. Conflicts return
976
- the current revision and complete ownership record in the machine error envelope
977
- rather than overwriting it. Expired claims may be replaced with a
978
- revision-guarded claim.
979
-
980
- `agency work` does not claim execution units. It refuses active explicit claims,
981
- marks open execution work `working`, and launches the agent. External
982
- orchestrators use `agency claim`, launch and monitor their agent separately, and
983
- later call `agency release` or `agency finish`.
984
-
985
949
  ### Archive
986
950
 
987
951
  ```text
@@ -1012,8 +976,8 @@ default; `--dry-run` performs the same preflight without mutation. A dependency
1012
976
  is work required by a candidate, while a dependent is work that requires the
1013
977
  candidate. Dependencies within the selected cohort can be archived together,
1014
978
  but a retained dependent excludes its dependency, including exclusions that
1015
- propagate through a dependency chain. Active claims, dirty or otherwise unsafe
1016
- managed checkouts, and occupied archive destinations are reported as per-task
979
+ propagate through a dependency chain. Dirty or otherwise unsafe managed
980
+ checkouts and occupied archive destinations are reported as per-task
1017
981
  skips. Invalid workbase structure and infrastructure failures abort the command.
1018
982
 
1019
983
  Task and phase archiving update active parent documents. Agency removes
@@ -1047,7 +1011,8 @@ promptless by default; use `--auto` to send Agency's generated context prompt.
1047
1011
 
1048
1012
  `agency work prepare` resolves an execution unit and creates or reuses its
1049
1013
  writable and reference worktrees, or its single pinned review checkout, without
1050
- launching an agent or changing status.
1014
+ launching an agent or changing status. Its target may be a task ID or any path
1015
+ inside the task or phase, including its `TASK.md` or `PHASE.md` document.
1051
1016
  Managed workbase guidance provides exact fast paths for 15 common intents:
1052
1017
  single-phase creation; create-and-start; materialization; remote PR sync; phase
1053
1018
  conversion; archive; review creation and start; status inspection; drop;
@@ -1065,8 +1030,8 @@ either. Use `--dry-run` to report planned fetch, branch, and worktree changes
1065
1030
  without applying them. Use `--force` to prepare work blocked by readiness, such
1066
1031
  as a follow-on phase whose dependency is still active; preparation still does
1067
1032
  not launch an agent or change lifecycle status. Validation reuse never skips
1068
- readiness, active-claim, repository, ownership, reference-drift, dirty-workspace,
1069
- or worktree safety checks.
1033
+ readiness, repository, ownership, reference-drift, dirty-workspace, or worktree
1034
+ safety checks.
1070
1035
 
1071
1036
  The authoritative implementation locations for this contract are
1072
1037
  `src/commands/task.ts` (creation output),
@@ -1107,13 +1072,21 @@ without creating a pull request. It requires a valid, registered writable
1107
1072
  checkout in `working` state, fetches the configured delivery remote, verifies
1108
1073
  that the declared base is in the publication history, validates every outgoing
1109
1074
  commit's description, author, and conflict state, and refuses non-fast-forward
1110
- updates.
1075
+ updates. Local commit validation runs before network access when cached remote
1076
+ state is available, and the network fetch is limited to the declared base and
1077
+ delivery branch.
1111
1078
 
1112
1079
  YAML `branch` must exactly match the checked-out local branch, the worktree must
1113
1080
  be clean, and `HEAD` is pushed with upstream tracking. Missing commit descriptions
1114
1081
  or authors stop publication with exact commits and remediation commands. Push
1115
1082
  reports deterministic fetch, inspection, validation, and publication progress on
1116
- stderr, including while `--json` reserves stdout for one machine result.
1083
+ stderr, including while `--json` reserves stdout for one machine result. Git
1084
+ authentication is non-interactive. Fetch defaults to a 30-second deadline and
1085
+ one retry for transient failures; push defaults to a 120-second deadline. Set
1086
+ `AGENCY_PUSH_FETCH_TIMEOUT_MS` or `AGENCY_PUSH_TIMEOUT_MS` to positive millisecond
1087
+ values to override them. After a failed or timed-out push, Agency compares the
1088
+ exact remote delivery ref with the expected tip before reporting success, a safe
1089
+ retryable failure, or an unknown publication outcome.
1117
1090
 
1118
1091
  Task-aware `agency pr create <task-id> [phase-id]` uses Agency's delivery flow,
1119
1092
  including readiness checks and durable PR recording. It accepts draft, title,
@@ -1185,10 +1158,7 @@ recovery action. Version 1 defines these codes:
1185
1158
  | `EPIC_ERROR` | Epic operation failed |
1186
1159
  | `TASK_ERROR` | Task operation failed |
1187
1160
  | `PHASE_ERROR` | Phase operation failed |
1188
- | `CLAIM_ERROR` | Claim input or lifecycle state is invalid |
1189
- | `CLAIM_CONFLICT` | Active or legacy ownership conflicts with an operation |
1190
1161
  | `REVISION_CONFLICT` | A durable document changed since inspection |
1191
- | `CLAIM_OWNERSHIP` | The session does not own the active claim |
1192
1162
  | `ARCHIVE_ERROR` | Archive operation failed |
1193
1163
  | `WORKTREE_ERROR` | Worktree operation failed |
1194
1164
  | `PULL_REQUEST_ERROR` | Pull request operation failed |
@@ -1211,7 +1181,7 @@ Success, help, and version output exit `0`; usage and command failures exit `1`.
1211
1181
  There are no error-specific exit statuses. `graph --jsonl` streams versioned
1212
1182
  records on success instead of wrapping them in an envelope; JSONL failures still
1213
1183
  use one error envelope. Revision and concurrency behavior is documented under
1214
- Tasks, Phases, and Claims; selector behavior under Noninteractive Use; projection
1184
+ Tasks and Phases; selector behavior under Noninteractive Use; projection
1215
1185
  behavior under Target Context and Workbase Graph; and retry behavior in the
1216
1186
  machine error contract above.
1217
1187
 
package/cli-main.ts CHANGED
@@ -40,7 +40,6 @@ import { ArchiveService } from "./src/services/ArchiveService"
40
40
  import { IntegrationService } from "./src/services/IntegrationService"
41
41
  import { ContextService } from "./src/services/ContextService"
42
42
  import { GraphService } from "./src/services/GraphService"
43
- import { ClaimService } from "./src/services/ClaimService"
44
43
  import { SyncService } from "./src/services/SyncService"
45
44
  import { ReadinessService } from "./src/services/ReadinessService"
46
45
  import { GraphMutationService } from "./src/services/GraphMutationService"
@@ -52,12 +51,6 @@ import {
52
51
  } from "./src/services/VersionControlService"
53
52
  import { review, help as reviewHelp } from "./src/commands/review"
54
53
  import { act, help as actHelp } from "./src/commands/act"
55
- import {
56
- claimCommand,
57
- claimHelp,
58
- releaseHelp,
59
- finishHelp,
60
- } from "./src/commands/claim"
61
54
  import {
62
55
  collectCommandResult,
63
56
  errorEnvelope,
@@ -83,7 +76,6 @@ const CliLayer = Layer.mergeAll(
83
76
  IntegrationService.Default,
84
77
  ContextService.Default,
85
78
  GraphService.Default,
86
- ClaimService.Default,
87
79
  SyncService.Default,
88
80
  ReadinessService.Default,
89
81
  GraphMutationService.Default,
@@ -199,67 +191,6 @@ const commands: Record<string, Command> = {
199
191
  )
200
192
  },
201
193
  },
202
- claim: {
203
- run: async (args: string[], options: Record<string, any>) => {
204
- if (options.help) return console.log(claimHelp)
205
- await runCommand(
206
- claimCommand({
207
- operation: "claim",
208
- taskId: args[0],
209
- phaseId: args[1],
210
- claimant: options.claimant,
211
- agent: options.agent,
212
- sessionId: options["session-id"],
213
- revision: options.revision,
214
- expiresAt: options["expires-at"],
215
- json: options.json,
216
- silent: options.silent,
217
- verbose: options.verbose,
218
- cwd: options.cwd,
219
- }),
220
- )
221
- },
222
- },
223
- release: {
224
- run: async (args: string[], options: Record<string, any>) => {
225
- if (options.help) return console.log(releaseHelp)
226
- await runCommand(
227
- claimCommand({
228
- operation: "release",
229
- taskId: args[0],
230
- phaseId: args[1],
231
- sessionId: options["session-id"],
232
- revision: options.revision,
233
- json: options.json,
234
- silent: options.silent,
235
- verbose: options.verbose,
236
- cwd: options.cwd,
237
- }),
238
- )
239
- },
240
- },
241
- finish: {
242
- run: async (args: string[], options: Record<string, any>) => {
243
- if (options.help) return console.log(finishHelp)
244
- await runCommand(
245
- claimCommand({
246
- operation: "finish",
247
- taskId: args[0],
248
- phaseId: args[1],
249
- sessionId: options["session-id"],
250
- revision: options.revision,
251
- outcome: options.outcome,
252
- noPullRequest: options["no-pull-request"],
253
- summary: options.summary,
254
- evidenceUrl: options["evidence-url"],
255
- json: options.json,
256
- silent: options.silent,
257
- verbose: options.verbose,
258
- cwd: options.cwd,
259
- }),
260
- )
261
- },
262
- },
263
194
  init: {
264
195
  run: async (args: string[], options: Record<string, any>) => {
265
196
  if (options.help) {
@@ -779,9 +710,6 @@ Commands:
779
710
  usage export Export local usage events as JSON Lines
780
711
  epic <subcommand> Manage epics
781
712
  phase <subcommand> Manage task phases
782
- claim <task> [phase] Claim an execution unit
783
- release <task> [phase] Release an execution unit
784
- finish <task> [phase] Finish an execution unit
785
713
  archive <type> Archive a work item
786
714
  task <subcommand> Manage tasks
787
715
  work [directory|task] Work on an epic, task, or phase
@@ -828,6 +756,42 @@ let usageFlagNames = rawArguments
828
756
  .filter((argument) => argument.startsWith("--"))
829
757
  .map((argument) => argument.slice(2).split("=", 1)[0]!)
830
758
 
759
+ const pushUsageDetails = (error?: unknown) => {
760
+ if (usageCommandPath !== "push") return {}
761
+ const seen = new Set<object>()
762
+ const visit = (
763
+ value: unknown,
764
+ ): { stage?: string; category?: string } | null => {
765
+ if (typeof value !== "object" || value === null || seen.has(value))
766
+ return null
767
+ seen.add(value)
768
+ if (
769
+ "stage" in value &&
770
+ typeof value.stage === "string" &&
771
+ "category" in value &&
772
+ typeof value.category === "string"
773
+ ) {
774
+ return { stage: value.stage, category: value.category }
775
+ }
776
+ for (const nestedValue of [
777
+ ...Object.values(value),
778
+ ...Object.getOwnPropertySymbols(value).map(
779
+ (symbol) => (value as Record<symbol, unknown>)[symbol],
780
+ ),
781
+ ]) {
782
+ const nested = visit(nestedValue)
783
+ if (nested) return nested
784
+ }
785
+ return null
786
+ }
787
+ const details = error ? visit(error) : null
788
+ return {
789
+ vcs: "git" as const,
790
+ terminalStage: details?.stage ?? (error ? "unknown" : "publish"),
791
+ category: details?.category ?? (error ? "unknown" : "success"),
792
+ }
793
+ }
794
+
831
795
  try {
832
796
  const {
833
797
  commandName,
@@ -921,6 +885,7 @@ try {
921
885
  durationMs: performance.now() - invocationStartedAt,
922
886
  outcome: exitStatus === 0 ? "success" : "failure",
923
887
  exitStatus,
888
+ ...pushUsageDetails(),
924
889
  },
925
890
  VERSION,
926
891
  )
@@ -932,6 +897,7 @@ try {
932
897
  durationMs: performance.now() - invocationStartedAt,
933
898
  outcome: "failure",
934
899
  exitStatus: 1,
900
+ ...pushUsageDetails(error),
935
901
  },
936
902
  VERSION,
937
903
  )
@@ -22,20 +22,6 @@
22
22
  "agency",
23
23
  "--json"
24
24
  ],
25
- [
26
- "claim",
27
- "checkout",
28
- "ui",
29
- "--claimant",
30
- "orchestrator-1",
31
- "--agent",
32
- "opencode",
33
- "--session-id",
34
- "session-123",
35
- "--revision",
36
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37
- "--json"
38
- ],
39
25
  [
40
26
  "work",
41
27
  "prepare",
@@ -50,29 +36,18 @@
50
36
  ["work", "tasks/checkout/phases/ui", "--agent", "opencode"],
51
37
  ["sync", "--dry-run", "--json"],
52
38
  ["sync", "--json"],
53
- ["pr", "create", "checkout", "ui", "--json"],
54
39
  [
55
- "finish",
56
- "checkout",
57
- "ui",
58
- "--session-id",
59
- "session-123",
60
- "--revision",
61
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
62
- "--outcome",
40
+ "task",
41
+ "status",
42
+ "implement-checkout",
63
43
  "done",
44
+ "--no-pull-request",
45
+ "--summary",
46
+ "Completed without a pull request",
64
47
  "--json"
65
48
  ],
49
+ ["pr", "create", "checkout", "ui", "--json"],
50
+ ["sync", "checkout", "ui", "--json"],
66
51
  ["doctor", "--json"],
67
- ["worktree", "repair", "checkout", "ui", "--dry-run", "--json"],
68
- [
69
- "release",
70
- "checkout",
71
- "ui",
72
- "--session-id",
73
- "session-123",
74
- "--revision",
75
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
76
- "--json"
77
- ]
52
+ ["worktree", "repair", "checkout", "ui", "--dry-run", "--json"]
78
53
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markjaquith/agency",
3
- "version": "3.2.1",
3
+ "version": "3.2.3",
4
4
  "description": "Manage agentic work across repositories with durable workbases",
5
5
  "keywords": [
6
6
  "agents",
@@ -67,7 +67,6 @@
67
67
  "preuninstall": "bun scripts/install-pi-extension.ts uninstall",
68
68
  "benchmark:act": "bun scripts/benchmark-act.ts",
69
69
  "benchmark:pr": "bun scripts/benchmark-pr.ts",
70
- "benchmark:release": "bun scripts/benchmark-release.ts",
71
70
  "benchmark:repositories": "bun scripts/benchmark-repositories.ts",
72
71
  "benchmark:status": "bun scripts/benchmark-status.ts",
73
72
  "benchmark:next": "bun scripts/benchmark-next.ts",
@@ -76,8 +75,6 @@
76
75
  "benchmark:workbase": "bun scripts/benchmark-workbase.ts",
77
76
  "benchmark:doctor": "bun scripts/benchmark-doctor.ts",
78
77
  "benchmark:context": "bun scripts/benchmark-context.ts",
79
- "benchmark:claim": "bun scripts/benchmark-claim.ts",
80
- "benchmark:finish": "bun scripts/benchmark-finish.ts",
81
78
  "benchmark:epic": "bun scripts/benchmark-epic.ts",
82
79
  "benchmark:phase": "bun scripts/benchmark-phase.ts",
83
80
  "benchmark:graph": "bun scripts/benchmark-graph.ts",
@@ -344,7 +344,6 @@
344
344
  "base": { "type": "string" },
345
345
  "pr": { "type": ["string", "null"] },
346
346
  "status": { "$ref": "#/$defs/status" },
347
- "claim": { "$ref": "#/$defs/claim" },
348
347
  "sha256": { "type": "string" }
349
348
  }
350
349
  },
@@ -424,7 +423,6 @@
424
423
  "handoff": { "$ref": "#/$defs/taskHandoff" },
425
424
  "review": { "$ref": "#/$defs/reviewRecord" },
426
425
  "status": { "$ref": "#/$defs/status" },
427
- "claim": { "$ref": "#/$defs/claim" },
428
426
  "sha256": { "type": "string" }
429
427
  }
430
428
  },
@@ -443,7 +441,6 @@
443
441
  "base": { "type": "string" },
444
442
  "pr": { "type": ["string", "null"] },
445
443
  "status": { "$ref": "#/$defs/status" },
446
- "claim": { "$ref": "#/$defs/claim" },
447
444
  "sha256": { "type": "string" }
448
445
  }
449
446
  },
@@ -469,8 +466,7 @@
469
466
  "branch": { "type": "string" },
470
467
  "base": { "type": "string" },
471
468
  "pr": { "type": ["string", "null"] },
472
- "status": { "$ref": "#/$defs/status" },
473
- "claim": { "$ref": "#/$defs/claim" }
469
+ "status": { "$ref": "#/$defs/status" }
474
470
  }
475
471
  },
476
472
  {
@@ -485,8 +481,7 @@
485
481
  "purpose": { "$ref": "#/$defs/taskPurpose" },
486
482
  "handoff": { "$ref": "#/$defs/taskHandoff" },
487
483
  "review": { "$ref": "#/$defs/reviewRecord" },
488
- "status": { "$ref": "#/$defs/status" },
489
- "claim": { "$ref": "#/$defs/claim" }
484
+ "status": { "$ref": "#/$defs/status" }
490
485
  }
491
486
  }
492
487
  ]
@@ -534,30 +529,6 @@
534
529
  "sourceRevision": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
535
530
  }
536
531
  },
537
- "claim": {
538
- "type": "object",
539
- "additionalProperties": false,
540
- "required": [
541
- "claimant",
542
- "agent",
543
- "sessionId",
544
- "startedAt",
545
- "targetRevision",
546
- "state"
547
- ],
548
- "properties": {
549
- "claimant": { "type": "string", "minLength": 1 },
550
- "agent": { "type": "string", "minLength": 1 },
551
- "sessionId": { "type": "string", "minLength": 1 },
552
- "startedAt": { "type": "string", "format": "date-time" },
553
- "targetRevision": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
554
- "expiresAt": { "type": "string", "format": "date-time" },
555
- "state": { "enum": ["active", "released", "finished"] },
556
- "releasedAt": { "type": "string", "format": "date-time" },
557
- "finishedAt": { "type": "string", "format": "date-time" },
558
- "outcome": { "enum": ["done", "dropped"] }
559
- }
560
- },
561
532
  "repositoryData": {
562
533
  "type": "object",
563
534
  "additionalProperties": false,