@agentskit/harness 0.13.0 → 0.14.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.
- package/CHANGELOG.md +58 -0
- package/README.md +8 -3
- package/dist/cli.js +223 -32
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +145 -6
- package/dist/index.js +193 -20
- package/dist/index.js.map +1 -1
- package/docs/ADR-0019-human-decision-attestation.md +9 -4
- package/docs/MODULE-BOUNDARIES.md +1 -1
- package/loop.config.example.yaml +29 -2
- package/package.json +8 -8
|
@@ -13,7 +13,10 @@ Record `approval.recorded` and `authorization.recorded` events in the existing
|
|
|
13
13
|
hash-chained lifecycle log. Each event contains the decision, resulting state,
|
|
14
14
|
verification digest, source revision, contract hash, and human actor; tracking
|
|
15
15
|
authorization also contains its declared target. Rejections are recorded too,
|
|
16
|
-
so every human terminal decision is auditable.
|
|
16
|
+
so every human terminal decision is auditable. The default tracking mode is
|
|
17
|
+
goal-scoped: one human approval covers the declared tracking effect and emits
|
|
18
|
+
both events. A project may set `tracking.authorization: "separate"` when an
|
|
19
|
+
independent tracking decision is required.
|
|
17
20
|
|
|
18
21
|
The existing freshness and verification-attestation checks run before either
|
|
19
22
|
decision is accepted. The `run.json` fields remain a convenient projection,
|
|
@@ -22,6 +25,8 @@ but the event is the audit record.
|
|
|
22
25
|
## Consequences
|
|
23
26
|
|
|
24
27
|
Consumers can independently prove which verified result was approved and which
|
|
25
|
-
external tracking target was authorized.
|
|
26
|
-
|
|
27
|
-
audit
|
|
28
|
+
external tracking target was authorized. Humans do not need to copy a run ID or
|
|
29
|
+
digest: approval commands resolve the latest pending run, while the identifiers
|
|
30
|
+
remain in the audit record. Legacy logs remain readable and are reported as
|
|
31
|
+
legacy until they contain the new hashed event protocol. This is an audit
|
|
32
|
+
attestation, not a digital signature or external notarization.
|
|
@@ -164,7 +164,7 @@ How these seams are wired into the keep-pushing loop (and what is still only a k
|
|
|
164
164
|
| --- | --- | --- | --- |
|
|
165
165
|
| Doc Bridge | `src/adapters/doc-bridge.ts` | Reads a local index | Keep behind `ContextProvider`; measure context hit/quality separately. |
|
|
166
166
|
| Orca | `src/adapters/orca.ts` | None; produces argv and lifecycle projections only | Keep lease/worktree/issue-lock/SHA planning provider-neutral; execution belongs to the orchestrator. |
|
|
167
|
-
| Linear/GitHub/other tracker | `src/adapters/tracking.ts` callback | Caller-owned network mutation | Require idempotency key
|
|
167
|
+
| Linear/GitHub/other tracker | `src/adapters/tracking.ts` callback | Caller-owned network mutation | Require idempotency key; goal approval covers declared tracking by default, with `tracking.authorization: "separate"` as an explicit opt-out. |
|
|
168
168
|
| Orca CLI (loop) | `src/adapters/orca-cli.ts`, `src/adapters/linear-orca.ts` via `CommandRunner` | Read-only `--json` calls in the doctor; dispatch/mutation arrive in later loop phases | Argv only, never a shell string; every call bounded by a timeout; envelope `ok:false` fails closed. |
|
|
169
169
|
| Coding-agent CLIs | `src/adapters/providers.ts` | PATH lookup and optional probe command | Env keys are names only; usage comes from Orca, never from provider SDKs. |
|
|
170
170
|
| GitHub | `src/adapters/github-cli.ts` via `CommandRunner` | `gh pr view/list` (optionally `--label`), `gh api PUT …/merge` with `sha=<reviewed head>`, `gh pr comment`, `gh pr edit --remove-label` | Merge is refused by GitHub when the head moved; every call argv-based and bounded; label intake never calls the merge argv. |
|
package/loop.config.example.yaml
CHANGED
|
@@ -23,10 +23,33 @@ orca:
|
|
|
23
23
|
minVersion: 1.4.200
|
|
24
24
|
timeoutMs: 20000
|
|
25
25
|
|
|
26
|
+
# Revisão mais rigorosa só nas fatias que pedem, por label. A revisão É o gate quando não há CI, e um
|
|
27
|
+
# contrato que congela evidência não deve ser julgado com o mesmo orçamento de um ajuste de copy.
|
|
28
|
+
# Primeira entrada que casa vence, e só os campos nomeados são trocados.
|
|
29
|
+
# reviewOverrides:
|
|
30
|
+
# - anyLabels: [layer:L2, layer:L3]
|
|
31
|
+
# votes: 2
|
|
32
|
+
# minSeverity: nit
|
|
33
|
+
# reason: caminho crítico do MVP
|
|
34
|
+
|
|
35
|
+
# Suítes já vermelhas na branch base. O harness NÃO roda o verifyCommand — o worker roda, na worktree
|
|
36
|
+
# dele — então tolerar falha conhecida é informação no briefing, não parsing de saída. A issue de
|
|
37
|
+
# rastreamento é obrigatória: quarentena sem dono vira permanente.
|
|
38
|
+
# knownFailures:
|
|
39
|
+
# - path: packages/foo/tests/bar.test.ts
|
|
40
|
+
# issue: ENG-123
|
|
41
|
+
# reason: corrida de escrita em arquivo, pré-existente
|
|
42
|
+
|
|
26
43
|
linear:
|
|
27
44
|
workspaceId: <linear-workspace-id> # orca linear team list --workspace all --json
|
|
28
45
|
teamKey: ENG
|
|
29
|
-
person: my-linear-display-name # the
|
|
46
|
+
person: my-linear-display-name # the queue this machine drains (and, under unassigned ownership, the name it claims with)
|
|
47
|
+
queueOwnership: person # person = the issues assigned to `person`. unassigned = the issues nobody holds,
|
|
48
|
+
# with the assignee as a transient claim the loop writes on dispatch and clears on
|
|
49
|
+
# return, so several machines share one priority-ordered queue.
|
|
50
|
+
# Switching to unassigned REQUIRES clearing the backlog's assignees: with `person`
|
|
51
|
+
# and an unassigned backlog the queue comes back empty and the loop looks healthy
|
|
52
|
+
# while doing nothing.
|
|
30
53
|
people: # display name -> Linear user id (orca linear team members …)
|
|
31
54
|
my-linear-display-name: <linear-user-id>
|
|
32
55
|
rotation:
|
|
@@ -35,7 +58,11 @@ linear:
|
|
|
35
58
|
advanceWhenEmpty: true # never switch while an implementation lease remains
|
|
36
59
|
states: [Todo, Ready] # dispatchable states; anything already started is left alone
|
|
37
60
|
excludeLabels: [blocked, needs-info]
|
|
38
|
-
requireLabels: []
|
|
61
|
+
requireLabels: [] # ALL of these (AND); empty = no constraint
|
|
62
|
+
anyLabels: [] # at least ONE of these (OR) — how a machine declares the slices it
|
|
63
|
+
# drains, e.g. [layer:L2, layer:L3]. requireLabels cannot say this:
|
|
64
|
+
# it demands every label on the same issue, so two layers there
|
|
65
|
+
# match nothing and the queue comes back silently empty.
|
|
39
66
|
projects: [] # empty = all projects
|
|
40
67
|
order: [priority, updatedAt] # urgent first; priority 0 (none) sorts last
|
|
41
68
|
maxQueue: 50
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentskit/harness",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Portable, evidence-backed development harness for coding agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -87,20 +87,20 @@
|
|
|
87
87
|
"prepublishOnly": "pnpm typecheck && pnpm build && pnpm test"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"commander": "^14.0.
|
|
90
|
+
"commander": "^14.0.3",
|
|
91
91
|
"ink": "7.1.1",
|
|
92
92
|
"react": "19.3.0",
|
|
93
|
-
"yaml": "^2.9.
|
|
94
|
-
"zod": "^4.6.
|
|
93
|
+
"yaml": "^2.9.1",
|
|
94
|
+
"zod": "^4.6.5"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
|
-
"@types/node": "^22.
|
|
97
|
+
"@types/node": "^22.20.3",
|
|
98
98
|
"@types/react": "^19.3.0",
|
|
99
99
|
"@vitest/coverage-v8": "4.1.11",
|
|
100
100
|
"ink-testing-library": "4.0.0",
|
|
101
|
-
"tsup": "^8.5.
|
|
102
|
-
"typescript": "^5.
|
|
103
|
-
"vitest": "^4.1.
|
|
101
|
+
"tsup": "^8.5.1",
|
|
102
|
+
"typescript": "^5.9.3",
|
|
103
|
+
"vitest": "^4.1.11"
|
|
104
104
|
},
|
|
105
105
|
"license": "MIT",
|
|
106
106
|
"packageManager": "pnpm@10.34.4",
|