@agentskit/harness 0.11.0 → 0.13.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.
@@ -86,15 +86,16 @@ modules, not a provider dependency.
86
86
  | `src/loop/routing.ts` | Composition | Tiered role → provider/model selection over provider availability | `model-policy`, `providers` (type-only), `config` | None |
87
87
  | `src/loop/cooldown.ts` | Composition | Provider cooldown store with exponential backoff | stdlib, `providers` | `<stateDir>/provider-cooldowns.json` |
88
88
  | `src/loop/doctor.ts` | Composition | Loop readiness report: Orca, providers, routing, slots, workers, queue | adapters, `config`, `cooldown`, `routing`, `slots` | Orca CLI via runner |
89
- | `src/loop/contract.ts` | Composition | Task contract schema, orchestrator prompt (issue text as untrusted data), marked-JSON parsing, dispatchability assessment, candidate fallback with auth/quota classification, contract cache | `errors`, `hash`, `resilience`, `doc-bridge`, `config`, `routing` (type-only), `zod` | Headless coding-agent CLI via runner |
89
+ | `src/loop/contract.ts` | Composition | Task contract schema, orchestrator prompt (issue text as untrusted data), marked-JSON parsing, dispatchability assessment, candidate fallback with auth/quota classification, contract cache | `errors`, `hash`, `resilience`, `doc-bridge`, `config`, `fs-atomic`, `routing` (type-only), `zod` | Headless coding-agent CLI via runner |
90
90
  | `src/loop/brief.ts` | Composition | Worker prompt: frozen contract + repository rules + protected paths + done signal | `contract`, `config`, `linear-orca` (type-only) | None |
91
91
  | `src/loop/resilience-state.ts` | Composition | Per-issue consecutive-failure counter + pause/resume, and per-stage (`tick`/`deliver`) crash-loop pause/resume | stdlib | `<stateDir>/issues/<id>/failures.json`, `<stateDir>/paused.json` |
92
92
  | `src/loop/skills.ts` | Composition | `brief.skills` file loading: sha256 digest, truncation at `maxSkillChars`, fail-closed on a missing file | stdlib (`crypto`) | Local Markdown files under `project.root` |
93
93
  | `src/loop/github-intake.ts` | Composition | GitHub label-based intake: discovers open PRs carrying `github.intakeLabel` and tracks them as `pr-<n>` (no Linear issue) | `github-cli` | GitHub via the injected runner; `<stateDir>/issues/pr-<n>/intake.json` |
94
94
  | `src/loop/event-bus.ts` | Composition | Local pub/sub over the loop's event vocabulary plus orchestration lifecycle hooks (`beforeDispatch`, `beforeReview`, `beforeMerge`, …); loads local `plugins.modules` files | stdlib (`node:path`, `node:url`, dynamic `import()`) | Local `.mjs` files under `project.root`, never fetched over a network |
95
95
  | `src/loop/progress.ts` | Composition | Best-effort read of `progress.json` from a worktree — the worker's optional, dynamic outcome-progress report | stdlib | The worktree filesystem only |
96
- | `src/loop/tick.ts` | Composition | One keep-pushing tick: intake, admit (slots + dispatch ledger claim), contract, optional worktree setup command, skills pinning, dispatch into an Orca worktree, Linear transition, escalation, per-issue failure tracking, precheck | adapters, `coordination`, `errors`, `brief`, `config`, `contract`, `cooldown`, `doctor`, `resilience-state`, `routing`, `skills`, `slots` | Orca CLI + Linear via runner; `<stateDir>` files |
97
- | `src/loop/deliver.ts` | Composition | Deliver stage per dispatched issue and per label-intake PR: PR detection, self-edit hold, conflict/CI/review fix rounds via terminal (or PR comment for intake), review at head, optimistic squash-merge (dispatched issues only intake is review + comment, never merge), Linear Done, cleanup, stuck/abandoned escalation | adapters, `coordination`, `errors`, `config`, `cooldown`, `doctor`, `github-intake`, `routing`, `tick` | Orca, Linear, GitHub, agentskit-review via runner; `<stateDir>` files |
96
+ | `src/loop/fs-atomic.ts` | Composition | Atomic JSON write (temp file + rename) so a reader of `dispatch.json`/`delivery.json`/`contract.json` never observes a truncated file from a crash mid-write or a concurrent read | stdlib | The target file's own directory (temp file created and renamed there) |
97
+ | `src/loop/tick.ts` | Composition | One keep-pushing tick: intake, admit (slots + dispatch ledger claim), contract, optional worktree setup command, skills pinning, dispatch into an Orca worktree, Linear transition, escalation, per-issue failure tracking, precheck | adapters, `coordination`, `errors`, `brief`, `config`, `contract`, `cooldown`, `doctor`, `fs-atomic`, `resilience-state`, `routing`, `skills`, `slots` | Orca CLI + Linear via runner; `<stateDir>` files |
98
+ | `src/loop/deliver.ts` | Composition | Deliver stage per dispatched issue and per label-intake PR: PR detection, self-edit hold, conflict/CI/review fix rounds via terminal (or PR comment for intake), review at head, optimistic squash-merge (dispatched issues only — intake is review + comment, never merge), Linear Done, cleanup, stuck/abandoned escalation | adapters, `coordination`, `errors`, `config`, `cooldown`, `doctor`, `fs-atomic`, `github-intake`, `routing`, `tick` | Orca, Linear, GitHub, agentskit-review via runner; `<stateDir>` files |
98
99
  | `src/loop/install.ts` | Composition | Orca automation specs (`<prefix>-tick`, `<prefix>-deliver`) with read-only prechecks, idempotent create/edit by name, uninstall, status and the SessionStart hook line | `command`, `orca-cli`, `providers`, `errors`, `config`, `cooldown`, `doctor`, `routing` | Orca automations via runner |
99
100
  | `src/loop/guided-install.ts` | Composition | Interactive install: doctor + environment preflight, dry-run rehearsal, confirmation, install, status; readline IO injected | `command`, `orca-cli`, `config`, `doctor`, `install`, `tick`, stdlib readline | Terminal prompts; Orca via runner |
100
101
  | `src/loop/local-config.ts` | Composition | Per-machine overlay wizard: Linear team members via Orca, queue owner and machine tuning answers, YAML rendering and reload | `orca-cli`, `config`, `yaml` | Orca via runner; writes `loop.config.local.yaml` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentskit/harness",
3
- "version": "0.11.0",
3
+ "version": "0.13.0",
4
4
  "description": "Portable, evidence-backed development harness for coding agents.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -38,6 +38,7 @@
38
38
  "build": "tsup && node -e \"console.log(JSON.stringify({status:'passed',criteria:['package']}))\"",
39
39
  "typecheck": "tsc -p tsconfig.json --noEmit",
40
40
  "test": "pnpm typecheck && vitest run --config vitest.config.ts test && node -e \"console.log(JSON.stringify({status:'passed',criteria:['package']}))\"",
41
+ "test:coverage": "vitest run --config vitest.config.ts --coverage test",
41
42
  "test:contract": "pnpm typecheck && vitest run --config vitest.config.ts test/contract.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['protocol']}))\"",
42
43
  "test:extensibility": "pnpm typecheck && vitest run --config vitest.config.ts test/extensibility.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['extensibility']}))\"",
43
44
  "test:event-log": "pnpm typecheck && vitest run --config vitest.config.ts test/extensibility.test.ts test/harness.test.ts -t \"ordered append-only lifecycle log|complete typed task through human approval|authorization only when tracking|human rejection\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['event-log','verification-attestation','approval-attestation']}))\"",
@@ -67,6 +68,7 @@
67
68
  "test:boundaries": "pnpm typecheck && vitest run --config vitest.config.ts test/boundaries.test.ts && node scripts/verify-dependency-directions.mjs",
68
69
  "test:phase-executor": "pnpm typecheck && vitest run --config vitest.config.ts test/phase-executor.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['phase-executor']}))\"",
69
70
  "test:artifacts": "pnpm typecheck && vitest run --config vitest.config.ts test/artifacts.test.ts && node scripts/verify-artifact-cli.mjs",
71
+ "test:loop-watch-sigint": "pnpm typecheck && pnpm build >/dev/null && node scripts/verify-loop-watch-sigint.mjs",
70
72
  "test:adapters": "pnpm typecheck && vitest run --config vitest.config.ts test/adapters.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['adapters']}))\"",
71
73
  "test:loop": "pnpm typecheck && vitest run --config vitest.config.ts test/loop.test.ts test/loop-adapters.test.ts test/loop-tick.test.ts test/loop-deliver.test.ts test/loop-install.test.ts test/loop-guided-install.test.ts test/loop-retro.test.ts test/loop-debrief.test.ts test/loop-watch.test.ts test/loop-observability.test.ts test/loop-agent-registry.test.ts test/loop-memory.test.ts test/loop-contract-failure.test.ts test/loop-resilience-state.test.ts test/loop-skills.test.ts test/loop-github-intake.test.ts test/loop-event-bus.test.ts test/loop-progress.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['loop-config','loop-providers','loop-routing','loop-doctor','loop-adapters','loop-tick','loop-deliver','loop-install','loop-debrief','loop-watch','loop-observability','loop-agent-registry','loop-memory','loop-contract-failure','loop-resilience-state','loop-skills','loop-github-intake','loop-event-bus','loop-progress']}))\"",
72
74
  "test:review": "pnpm typecheck && vitest run --config vitest.config.ts test/review.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['review-delivery']}))\"",
@@ -94,6 +96,8 @@
94
96
  "devDependencies": {
95
97
  "@types/node": "^22.10.0",
96
98
  "@types/react": "^19.3.0",
99
+ "@vitest/coverage-v8": "4.1.11",
100
+ "ink-testing-library": "4.0.0",
97
101
  "tsup": "^8.5.0",
98
102
  "typescript": "^5.7.2",
99
103
  "vitest": "^4.1.10"
@@ -2,9 +2,9 @@
2
2
  "type": "agentskit-harness-release-manifest",
3
3
  "schemaVersion": 1,
4
4
  "package": "@agentskit/harness",
5
- "version": "0.11.0",
5
+ "version": "0.13.0",
6
6
  "channel": "latest",
7
- "sourceRevision": "b8cfe596e5f30f2c373b89f00f271079b296feaf",
7
+ "sourceRevision": "7eed0dcb3162a8808a27e38290356cf005d7c94e",
8
8
  "requiredChecks": [
9
9
  "typecheck",
10
10
  "test",
@@ -32,5 +32,5 @@
32
32
  "pilot-benchmark"
33
33
  ],
34
34
  "nextBaseline": "benchmarks/harness-0.4.0-baseline.json",
35
- "digest": "9fd3e219da299dab39477062cb3c17296e18cc6b707bceb42436cdb75afd281b"
35
+ "digest": "599670762fa2f8b1c4bd6bf1a0aa9c0dfa40cffbf77781d6cf15ee048cc79000"
36
36
  }
package/release/notes.md CHANGED
@@ -1,3 +1,28 @@
1
+ # 0.13.0 release candidate
2
+
3
+ A full-codebase test-coverage sweep (every module in `src/kernel/`, `src/execution/`, `src/adapters/`, and most of
4
+ `src/loop/` brought to 90%+ statements/branches) that surfaced eight real bugs, each fixed in its own focused PR:
5
+ atomic writes for per-issue state files (`dispatch.json`/`delivery.json`/`contract.json`), a lock around
6
+ `events.ndjson` rotation, PII-scanner coverage for current-format secrets (OpenAI project keys, fine-grained GitHub
7
+ PATs, Google/Stripe keys, PEM blocks, AWS secret keys), a fixed `Ctrl-C` for `loop watch`, raw throws in
8
+ `retro.ts`/`doc-bridge.ts` reclassified as `HarnessError`, two `execution/agent.ts` session-recorder bugs (dead
9
+ code; a swallowed invalid-runtime-result error), an execute-bit check in `findExecutable`, and a `loop debrief
10
+ --issue X` fix for a normal not-yet-dispatched issue. Everything else in this release is test-only. Publication
11
+ remains gated on a merge to `main` through npm Trusted Publishing.
12
+
13
+ # 0.12.0 release candidate
14
+
15
+ Reuses Orca instead of reinventing it, where Orca's own tooling gives a better answer than the harness's own
16
+ heuristics: `loop deliver` escalations now fold in the dispatched worker's own terminal output (best-effort,
17
+ `terminal read --screen`) so a human sees the worker's own diagnosis instead of a generic idle/no-PR message; slot
18
+ assessment prefers Orca's `diagnostics memory` (macOS's real memory-pressure reading) and real per-session RSS over
19
+ the harness's own `vm_stat` approximation and static per-agent guess, which were measured roughly 2x more
20
+ conservative at the same instant. Also ships an installable `ak-harness-loop` Orca Skill documenting the loop's
21
+ commands and the operational constraints this release's investigation confirmed (Orca's orchestration mutations —
22
+ `run-create`/`task-create`/`worker-start`/`send` — require a live coordinator terminal pane and cannot be called
23
+ from the loop's headless `tick`/`deliver`, verified from every angle tried). Publication remains gated on a merge
24
+ to `main` through npm Trusted Publishing.
25
+
1
26
  # 0.11.0 release candidate
2
27
 
3
28
  Read-only loop observability for the keep-pushing SDLC loop: deterministic anomaly detection and operating metrics