agent-hitch 0.1.1 → 0.2.1
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/README.md +235 -132
- package/README.zh-CN.md +335 -0
- package/dist/bin/hitch.js +9 -0
- package/dist/bin/hitch.js.map +1 -0
- package/dist/scripts/check-architecture.js +159 -0
- package/dist/scripts/check-architecture.js.map +1 -0
- package/dist/scripts/check-release.js +25 -0
- package/dist/scripts/check-release.js.map +1 -0
- package/dist/scripts/check-syntax.js +32 -0
- package/dist/scripts/check-syntax.js.map +1 -0
- package/dist/src/adapters/catalog.js +55 -0
- package/dist/src/adapters/catalog.js.map +1 -0
- package/dist/src/adapters/contract.js +2 -0
- package/dist/src/adapters/contract.js.map +1 -0
- package/dist/src/adapters/discovery.js +22 -0
- package/dist/src/adapters/discovery.js.map +1 -0
- package/dist/src/adapters/index.js +3 -0
- package/dist/src/adapters/index.js.map +1 -0
- package/dist/src/adapters/providers/claude.js +69 -0
- package/dist/src/adapters/providers/claude.js.map +1 -0
- package/dist/src/adapters/providers/codex.js +74 -0
- package/dist/src/adapters/providers/codex.js.map +1 -0
- package/dist/src/adapters/providers/deepseek.js +51 -0
- package/dist/src/adapters/providers/deepseek.js.map +1 -0
- package/dist/src/adapters/providers/opencode.js +73 -0
- package/dist/src/adapters/providers/opencode.js.map +1 -0
- package/dist/src/adapters/providers/pi.js +82 -0
- package/dist/src/adapters/providers/pi.js.map +1 -0
- package/dist/src/adapters/providers/shared.js +82 -0
- package/dist/src/adapters/providers/shared.js.map +1 -0
- package/dist/src/artifacts/index.js +3 -0
- package/dist/src/artifacts/index.js.map +1 -0
- package/dist/src/artifacts/integrity.js +188 -0
- package/dist/src/artifacts/integrity.js.map +1 -0
- package/dist/src/artifacts/preparer.js +379 -0
- package/dist/src/artifacts/preparer.js.map +1 -0
- package/dist/src/artifacts/store.js +87 -0
- package/dist/src/artifacts/store.js.map +1 -0
- package/dist/src/artifacts/types.js +2 -0
- package/dist/src/artifacts/types.js.map +1 -0
- package/dist/src/backends/contract.js +2 -0
- package/dist/src/backends/contract.js.map +1 -0
- package/dist/src/backends/harbor/backend.js +305 -0
- package/dist/src/backends/harbor/backend.js.map +1 -0
- package/dist/src/backends/harbor/index.js +4 -0
- package/dist/src/backends/harbor/index.js.map +1 -0
- package/dist/src/backends/harbor/local-git-transport.js +447 -0
- package/dist/src/backends/harbor/local-git-transport.js.map +1 -0
- package/dist/src/backends/harbor/tools.js +314 -0
- package/dist/src/backends/harbor/tools.js.map +1 -0
- package/dist/src/backends/index.js +4 -0
- package/dist/src/backends/index.js.map +1 -0
- package/dist/src/cli/arguments.js +123 -0
- package/dist/src/cli/arguments.js.map +1 -0
- package/dist/src/cli/commands/compare.js +55 -0
- package/dist/src/cli/commands/compare.js.map +1 -0
- package/dist/src/cli/commands/daemon.js +106 -0
- package/dist/src/cli/commands/daemon.js.map +1 -0
- package/dist/src/cli/commands/eval.js +126 -0
- package/dist/src/cli/commands/eval.js.map +1 -0
- package/dist/src/cli/commands/feedback.js +84 -0
- package/dist/src/cli/commands/feedback.js.map +1 -0
- package/dist/src/cli/commands/inspect.js +20 -0
- package/dist/src/cli/commands/inspect.js.map +1 -0
- package/dist/src/cli/commands/list.js +17 -0
- package/dist/src/cli/commands/list.js.map +1 -0
- package/dist/src/cli/commands/prepare.js +21 -0
- package/dist/src/cli/commands/prepare.js.map +1 -0
- package/dist/src/cli/commands/resolve.js +17 -0
- package/dist/src/cli/commands/resolve.js.map +1 -0
- package/dist/src/cli/commands/run.js +83 -0
- package/dist/src/cli/commands/run.js.map +1 -0
- package/dist/src/cli/commands/runs.js +45 -0
- package/dist/src/cli/commands/runs.js.map +1 -0
- package/dist/src/cli/commands/trajectory.js +31 -0
- package/dist/src/cli/commands/trajectory.js.map +1 -0
- package/dist/src/cli/commands/workspace.js +44 -0
- package/dist/src/cli/commands/workspace.js.map +1 -0
- package/dist/src/cli/index.js +2 -0
- package/dist/src/cli/index.js.map +1 -0
- package/dist/src/cli/main.js +48 -0
- package/dist/src/cli/main.js.map +1 -0
- package/dist/src/cli/output.js +96 -0
- package/dist/src/cli/output.js.map +1 -0
- package/dist/src/controller-runtime/hash.js +353 -0
- package/dist/src/controller-runtime/hash.js.map +1 -0
- package/dist/src/controller-runtime/index.js +3 -0
- package/dist/src/controller-runtime/index.js.map +1 -0
- package/dist/src/controller-runtime/store.js +318 -0
- package/dist/src/controller-runtime/store.js.map +1 -0
- package/dist/src/daemon/auth.js +108 -0
- package/dist/src/daemon/auth.js.map +1 -0
- package/dist/src/daemon/client.js +76 -0
- package/dist/src/daemon/client.js.map +1 -0
- package/dist/src/daemon/index.js +5 -0
- package/dist/src/daemon/index.js.map +1 -0
- package/dist/src/daemon/launcher.js +24 -0
- package/dist/src/daemon/launcher.js.map +1 -0
- package/dist/src/daemon/scheduler.js +161 -0
- package/dist/src/daemon/scheduler.js.map +1 -0
- package/dist/src/daemon/server.js +316 -0
- package/dist/src/daemon/server.js.map +1 -0
- package/dist/src/domain/artifacts.js +2 -0
- package/dist/src/domain/artifacts.js.map +1 -0
- package/dist/src/domain/controller-runtime.js +2 -0
- package/dist/src/domain/controller-runtime.js.map +1 -0
- package/dist/src/domain/eval-records.js +2 -0
- package/dist/src/domain/eval-records.js.map +1 -0
- package/dist/src/domain/evals.js +2 -0
- package/dist/src/domain/evals.js.map +1 -0
- package/dist/src/domain/feedback.js +2 -0
- package/dist/src/domain/feedback.js.map +1 -0
- package/dist/src/domain/ids.js +10 -0
- package/dist/src/domain/ids.js.map +1 -0
- package/dist/src/domain/index.js +11 -0
- package/dist/src/domain/index.js.map +1 -0
- package/dist/src/domain/revisions.js +2 -0
- package/dist/src/domain/revisions.js.map +1 -0
- package/dist/src/domain/runs.js +3 -0
- package/dist/src/domain/runs.js.map +1 -0
- package/dist/src/domain/trajectories.js +2 -0
- package/dist/src/domain/trajectories.js.map +1 -0
- package/dist/src/domain/validation.js +429 -0
- package/dist/src/domain/validation.js.map +1 -0
- package/dist/src/domain/workspaces.js +2 -0
- package/dist/src/domain/workspaces.js.map +1 -0
- package/dist/src/evals/events.js +67 -0
- package/dist/src/evals/events.js.map +1 -0
- package/dist/src/evals/index.js +5 -0
- package/dist/src/evals/index.js.map +1 -0
- package/dist/src/evals/records.js +55 -0
- package/dist/src/evals/records.js.map +1 -0
- package/dist/src/evals/request.js +109 -0
- package/dist/src/evals/request.js.map +1 -0
- package/dist/src/evals/service.js +227 -0
- package/dist/src/evals/service.js.map +1 -0
- package/dist/src/evals/trial-import.js +394 -0
- package/dist/src/evals/trial-import.js.map +1 -0
- package/dist/src/feedback/index.js +2 -0
- package/dist/src/feedback/index.js.map +1 -0
- package/dist/src/feedback/service.js +314 -0
- package/dist/src/feedback/service.js.map +1 -0
- package/dist/src/foundation/config.js +54 -0
- package/dist/src/foundation/config.js.map +1 -0
- package/dist/src/foundation/errors.js +14 -0
- package/dist/src/foundation/errors.js.map +1 -0
- package/dist/src/foundation/executable.js +135 -0
- package/dist/src/foundation/executable.js.map +1 -0
- package/dist/src/foundation/fs.js +45 -0
- package/dist/src/foundation/fs.js.map +1 -0
- package/dist/src/foundation/hash.js +24 -0
- package/dist/src/foundation/hash.js.map +1 -0
- package/dist/src/foundation/index.js +11 -0
- package/dist/src/foundation/index.js.map +1 -0
- package/dist/src/foundation/line-stream.js +20 -0
- package/dist/src/foundation/line-stream.js.map +1 -0
- package/dist/src/foundation/locks.js +114 -0
- package/dist/src/foundation/locks.js.map +1 -0
- package/dist/src/foundation/package-root.js +41 -0
- package/dist/src/foundation/package-root.js.map +1 -0
- package/dist/src/foundation/process.js +50 -0
- package/dist/src/foundation/process.js.map +1 -0
- package/dist/src/revisions/index.js +4 -0
- package/dist/src/revisions/index.js.map +1 -0
- package/dist/src/revisions/reference.js +97 -0
- package/dist/src/revisions/reference.js.map +1 -0
- package/dist/src/revisions/resolver.js +25 -0
- package/dist/src/revisions/resolver.js.map +1 -0
- package/dist/src/revisions/sources/git.js +180 -0
- package/dist/src/revisions/sources/git.js.map +1 -0
- package/dist/src/revisions/sources/installed.js +45 -0
- package/dist/src/revisions/sources/installed.js.map +1 -0
- package/dist/src/revisions/sources/npm.js +97 -0
- package/dist/src/revisions/sources/npm.js.map +1 -0
- package/dist/src/runs/compare.js +132 -0
- package/dist/src/runs/compare.js.map +1 -0
- package/dist/src/runs/events.js +79 -0
- package/dist/src/runs/events.js.map +1 -0
- package/dist/src/runs/executor.js +480 -0
- package/dist/src/runs/executor.js.map +1 -0
- package/dist/src/runs/finalizer.js +22 -0
- package/dist/src/runs/finalizer.js.map +1 -0
- package/dist/src/runs/identity.js +35 -0
- package/dist/src/runs/identity.js.map +1 -0
- package/dist/src/runs/index.js +11 -0
- package/dist/src/runs/index.js.map +1 -0
- package/dist/src/runs/manifest.js +70 -0
- package/dist/src/runs/manifest.js.map +1 -0
- package/dist/src/runs/outcome.js +49 -0
- package/dist/src/runs/outcome.js.map +1 -0
- package/dist/src/runs/query.js +104 -0
- package/dist/src/runs/query.js.map +1 -0
- package/dist/src/runs/queued.js +54 -0
- package/dist/src/runs/queued.js.map +1 -0
- package/dist/src/runs/records.js +288 -0
- package/dist/src/runs/records.js.map +1 -0
- package/dist/src/runs/request.js +169 -0
- package/dist/src/runs/request.js.map +1 -0
- package/dist/src/trajectories/contract.js +17 -0
- package/dist/src/trajectories/contract.js.map +1 -0
- package/dist/src/trajectories/format.js +127 -0
- package/dist/src/trajectories/format.js.map +1 -0
- package/dist/src/trajectories/index.js +7 -0
- package/dist/src/trajectories/index.js.map +1 -0
- package/dist/src/trajectories/projector.js +385 -0
- package/dist/src/trajectories/projector.js.map +1 -0
- package/dist/src/trajectories/provider-capture.js +133 -0
- package/dist/src/trajectories/provider-capture.js.map +1 -0
- package/dist/src/trajectories/providers/deepseek.js +179 -0
- package/dist/src/trajectories/providers/deepseek.js.map +1 -0
- package/dist/src/trajectories/store.js +421 -0
- package/dist/src/trajectories/store.js.map +1 -0
- package/dist/src/workspaces/copy.js +142 -0
- package/dist/src/workspaces/copy.js.map +1 -0
- package/dist/src/workspaces/digest.js +47 -0
- package/dist/src/workspaces/digest.js.map +1 -0
- package/dist/src/workspaces/git.js +164 -0
- package/dist/src/workspaces/git.js.map +1 -0
- package/dist/src/workspaces/index.js +6 -0
- package/dist/src/workspaces/index.js.map +1 -0
- package/dist/src/workspaces/lifecycle.js +313 -0
- package/dist/src/workspaces/lifecycle.js.map +1 -0
- package/dist/src/workspaces/planner.js +80 -0
- package/dist/src/workspaces/planner.js.map +1 -0
- package/dist/src/workspaces/store.js +25 -0
- package/dist/src/workspaces/store.js.map +1 -0
- package/dist/src/workspaces/types.js +4 -0
- package/dist/src/workspaces/types.js.map +1 -0
- package/dist/src/workspaces/utils.js +56 -0
- package/dist/src/workspaces/utils.js.map +1 -0
- package/docs/schemas/controller-runtime-manifest.schema.json +57 -0
- package/docs/schemas/controller-runtime-ref.schema.json +16 -0
- package/docs/schemas/eval-request.schema.json +2 -0
- package/docs/schemas/eval-result.schema.json +36 -1
- package/docs/schemas/local-git-transport-manifest.schema.json +34 -0
- package/docs/schemas/message-feedback.schema.json +37 -0
- package/docs/schemas/result.schema.json +9 -0
- package/docs/schemas/run-context.schema.json +39 -0
- package/docs/schemas/run-manifest.schema.json +81 -0
- package/docs/schemas/run-request.schema.json +16 -1
- package/docs/schemas/trajectory-ref.schema.json +73 -0
- package/integrations/harbor/hitch_harbor_agent.py +551 -5
- package/package.json +37 -11
- package/bin/hitch.js +0 -9
- package/src/adapters.js +0 -435
- package/src/artifacts.js +0 -949
- package/src/cli.js +0 -505
- package/src/config.js +0 -51
- package/src/daemon.js +0 -416
- package/src/engine.js +0 -400
- package/src/errors.js +0 -12
- package/src/eval-tools.js +0 -334
- package/src/evals.js +0 -276
- package/src/events.js +0 -69
- package/src/fs.js +0 -43
- package/src/harbor-backend.js +0 -285
- package/src/harness-reference.js +0 -78
- package/src/line-stream.js +0 -17
- package/src/locks.js +0 -33
- package/src/process.js +0 -49
- package/src/registry.js +0 -84
- package/src/scheduler.js +0 -156
- package/src/workspaces.js +0 -893
package/README.md
CHANGED
|
@@ -4,46 +4,68 @@
|
|
|
4
4
|
[](https://github.com/rsi-gear/agent-hitch/releases)
|
|
5
5
|
[](https://discord.gg/cZ4NBbHDk)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[English](README.md) | [简体中文](README.zh-CN.md)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
an agent-first CLI and daemon for discovering and running native coding agents
|
|
11
|
-
through one stable, machine-oriented interface.
|
|
9
|
+
**Content-addressed version control and evidence storage for agent harnesses.**
|
|
12
10
|
|
|
13
|
-
Hitch
|
|
14
|
-
|
|
11
|
+
Hitch makes every agent run traceable to an exact harness revision. It resolves
|
|
12
|
+
harness references to immutable identities, prepares content-addressed runnable
|
|
13
|
+
artifacts, executes them through a stable interface, and preserves the
|
|
14
|
+
trajectory and evaluation evidence produced by each run.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
> agent evals are implemented.
|
|
16
|
+
Git can identify the harness source that changed. Hitch carries that identity
|
|
17
|
+
through build and execution:
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
```text
|
|
20
|
+
Harness ref
|
|
21
|
+
-> resolved revision
|
|
22
|
+
-> prepared artifact
|
|
23
|
+
-> run / eval
|
|
24
|
+
-> trajectory
|
|
25
|
+
-> feedback and evaluation evidence
|
|
26
|
+
|
|
27
|
+
Hitch controller
|
|
28
|
+
-> content-addressed runtime bundle
|
|
29
|
+
-> referenced by containerized evals
|
|
30
|
+
```
|
|
21
31
|
|
|
22
|
-
|
|
32
|
+
Hitch is infrastructure for systems that develop, compare, and evolve agent
|
|
33
|
+
harnesses. It owns version resolution, runnable artifacts, execution records,
|
|
34
|
+
and evidence. Candidate generation, comparison policy, and promotion decisions
|
|
35
|
+
belong to the system using Hitch.
|
|
23
36
|
|
|
24
|
-
|
|
37
|
+
> **Status:** pre-alpha. The core identity and evidence path is implemented,
|
|
38
|
+
> including immutable revision resolution, prepared artifact caching, direct and
|
|
39
|
+
> daemon-backed runs, Harbor-backed evals, content-addressed controller runtimes,
|
|
40
|
+
> DSH-compatible canonical trajectories, and message feedback.
|
|
25
41
|
|
|
26
|
-
|
|
27
|
-
Harness adapters. It provides:
|
|
42
|
+
## Why harness version control?
|
|
28
43
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- a persistent local daemon with bounded concurrency;
|
|
34
|
-
- queued and active-run cancellation, timeouts, and process-tree cleanup;
|
|
35
|
-
- managed shared, Git worktree, and independent-copy workspace modes;
|
|
36
|
-
- Harbor-backed evaluation in Docker with normalized reward summaries;
|
|
37
|
-
- atomic manifests/results plus raw stdout and stderr logs; and
|
|
38
|
-
- conservative recovery of interrupted records after daemon restart.
|
|
44
|
+
An agent harness is more than a source commit. What actually ran can also depend
|
|
45
|
+
on the package release, build output, controller code, workspace mode, native
|
|
46
|
+
adapter, and mutable executable installed on a machine. A score or transcript
|
|
47
|
+
without those identities is difficult to audit and harder to reproduce.
|
|
39
48
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
49
|
+
Hitch preserves an explicit chain from a requested harness reference to the
|
|
50
|
+
evidence generated by its execution:
|
|
51
|
+
|
|
52
|
+
| Record | What it identifies |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| Harness reference | The version, commit, local source, or installed executable requested by the caller |
|
|
55
|
+
| Resolved revision | The immutable source identity selected for the run |
|
|
56
|
+
| Prepared artifact | The validated, content-addressed runnable build |
|
|
57
|
+
| Controller runtime | The exact Hitch runtime uploaded for a containerized eval |
|
|
58
|
+
| Run or eval record | The request, workspace, lifecycle, result, and links between identities |
|
|
59
|
+
| Canonical trajectory | The agent messages and tool activity in a stable DSH-compatible format |
|
|
60
|
+
| Feedback and eval evidence | Message-level feedback, verifier output, rewards, and backend records |
|
|
61
|
+
|
|
62
|
+
This is a local versioning and evidence layer, not a replacement for Git and not
|
|
63
|
+
yet a remote artifact registry. Hitch does not currently provide branches,
|
|
64
|
+
tags, diffs, candidate promotion, or rollback policy.
|
|
43
65
|
|
|
44
|
-
##
|
|
66
|
+
## Quick start
|
|
45
67
|
|
|
46
|
-
Hitch requires Node.js 22 or newer. Install
|
|
68
|
+
Hitch requires Node.js 22 or newer. Install it from npm:
|
|
47
69
|
|
|
48
70
|
```bash
|
|
49
71
|
npm install --global agent-hitch
|
|
@@ -51,25 +73,18 @@ hitch --version
|
|
|
51
73
|
hitch list --json
|
|
52
74
|
```
|
|
53
75
|
|
|
54
|
-
|
|
76
|
+
Resolve and prepare an exact harness version:
|
|
55
77
|
|
|
56
78
|
```bash
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
For development from a checkout:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
npm test
|
|
64
|
-
npm link
|
|
65
|
-
hitch list --json
|
|
79
|
+
hitch resolve codex@version:0.92.0 --json
|
|
80
|
+
hitch prepare codex@version:0.92.0 --json
|
|
66
81
|
```
|
|
67
82
|
|
|
68
|
-
Run
|
|
83
|
+
Run that exact version in an isolated Git worktree:
|
|
69
84
|
|
|
70
85
|
```bash
|
|
71
86
|
hitch run \
|
|
72
|
-
--harness codex@
|
|
87
|
+
--harness codex@version:0.92.0 \
|
|
73
88
|
--model gpt-5.6-terra \
|
|
74
89
|
--cwd /workspace/project \
|
|
75
90
|
--workspace-mode worktree \
|
|
@@ -77,42 +92,96 @@ hitch run \
|
|
|
77
92
|
--output jsonl
|
|
78
93
|
```
|
|
79
94
|
|
|
80
|
-
|
|
95
|
+
Every run writes an atomic manifest and result, raw process logs, normalized
|
|
96
|
+
events, and a canonical trajectory below `~/.hitch/runs/RUN_ID`. Inspect the
|
|
97
|
+
trajectory through the CLI:
|
|
81
98
|
|
|
82
99
|
```bash
|
|
83
|
-
hitch
|
|
100
|
+
hitch trajectory inspect RUN_ID --json
|
|
101
|
+
```
|
|
84
102
|
|
|
85
|
-
|
|
86
|
-
--daemon \
|
|
87
|
-
--harness codex@installed \
|
|
88
|
-
--model gpt-5.6-terra \
|
|
89
|
-
--cwd /workspace/project \
|
|
90
|
-
--prompt-file task.md \
|
|
91
|
-
--output jsonl
|
|
103
|
+
For development from a checkout:
|
|
92
104
|
|
|
93
|
-
|
|
94
|
-
|
|
105
|
+
```bash
|
|
106
|
+
npm install
|
|
107
|
+
npm run check
|
|
108
|
+
npm link
|
|
109
|
+
hitch list --json
|
|
95
110
|
```
|
|
96
111
|
|
|
97
|
-
|
|
112
|
+
## Harness references
|
|
113
|
+
|
|
114
|
+
Harness selection is explicit for every run. Exact package versions and Git
|
|
115
|
+
commits resolve to immutable identities and are prepared in Hitch's artifact
|
|
116
|
+
store.
|
|
98
117
|
|
|
99
118
|
```bash
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
119
|
+
# Use and fingerprint the executable already installed on this machine.
|
|
120
|
+
hitch run --harness codex@installed --prompt "Inspect this repository"
|
|
121
|
+
|
|
122
|
+
# Resolve, prepare, or run an exact published version.
|
|
123
|
+
hitch resolve codex@version:0.92.0 --json
|
|
124
|
+
hitch prepare codex@version:0.92.0 --json
|
|
125
|
+
hitch run --harness codex@version:0.92.0 --prompt "Inspect this repository"
|
|
126
|
+
|
|
127
|
+
# Build a commit from the registered upstream repository.
|
|
128
|
+
hitch run --harness codex@commit:0123456789abcdef --prompt "Inspect this repository"
|
|
104
129
|
|
|
105
|
-
|
|
130
|
+
# Build a clean commit from a local harness repository.
|
|
131
|
+
hitch run \
|
|
132
|
+
--harness 'pi@git+file:///workspace/pi#0123456789abcdef' \
|
|
133
|
+
--prompt "Inspect this repository"
|
|
106
134
|
```
|
|
107
135
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
136
|
+
Bare names such as `codex` are compatibility aliases for `codex@installed`.
|
|
137
|
+
Installed executables are useful for local work, but exact version or commit
|
|
138
|
+
references should be preferred when portability matters.
|
|
139
|
+
|
|
140
|
+
Version selectors require exact semantic versions; ranges and mutable tags such
|
|
141
|
+
as `latest` are not accepted. Short commit IDs are expanded and must be
|
|
142
|
+
unambiguous. Local Git repositories must be clean. Codex, Pi, and DeepSeek
|
|
143
|
+
Harness support source-commit preparation; Claude Code and OpenCode currently
|
|
144
|
+
support installed and exact-version sources.
|
|
145
|
+
|
|
146
|
+
Preparation executes registered package lifecycle or source-build commands with
|
|
147
|
+
the permissions of the Hitch process. Content addressing makes an artifact
|
|
148
|
+
auditable and cacheable; it does not make untrusted build code safe.
|
|
149
|
+
|
|
150
|
+
## Evidence from every run
|
|
151
|
+
|
|
152
|
+
Hitch keeps lifecycle events and agent trajectories as two related but distinct
|
|
153
|
+
records:
|
|
154
|
+
|
|
155
|
+
- normalized JSONL events describe Hitch's control plane, including resolution,
|
|
156
|
+
preparation, process lifecycle, cancellation, and terminal status;
|
|
157
|
+
- supported adapters preserve redacted provider-native events before any
|
|
158
|
+
translation, while a DSH-compatible canonical trajectory remains available
|
|
159
|
+
as a derived view;
|
|
160
|
+
- `trajectory.ref.json` V2 binds every trajectory file by relative path, byte
|
|
161
|
+
size, role, and SHA-256 digest; and
|
|
162
|
+
- feedback sidecars attach versioned positive or negative ratings and notes to
|
|
163
|
+
assistant messages without rewriting the immutable trajectory.
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
hitch trajectory inspect RUN_ID
|
|
167
|
+
hitch runs list --context-kind benchmark_task --json
|
|
168
|
+
hitch compare model --benchmark BENCHMARK --task TASK --json
|
|
169
|
+
hitch feedback list RUN_ID --json
|
|
170
|
+
hitch feedback put RUN_ID \
|
|
171
|
+
--message MESSAGE_ID \
|
|
172
|
+
--rating positive \
|
|
173
|
+
--note "Kept the change focused" \
|
|
174
|
+
--json
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Machine-contract schemas are versioned in [`docs/schemas`](docs/schemas).
|
|
178
|
+
Runtime validation rejects unknown request fields and preserves typed errors
|
|
179
|
+
across the daemon HTTP boundary.
|
|
112
180
|
|
|
113
181
|
## Harbor-backed evals
|
|
114
182
|
|
|
115
|
-
|
|
183
|
+
Hitch can evaluate an exact, portable harness revision with
|
|
184
|
+
[Harbor](https://github.com/harbor-framework/harbor):
|
|
116
185
|
|
|
117
186
|
```bash
|
|
118
187
|
# Installs pinned Harbor into ~/.hitch/tools without changing system Python.
|
|
@@ -128,104 +197,138 @@ hitch eval run \
|
|
|
128
197
|
--max-concurrent 4
|
|
129
198
|
|
|
130
199
|
hitch eval list
|
|
131
|
-
hitch eval inspect
|
|
200
|
+
hitch eval inspect EVAL_ID --json
|
|
132
201
|
```
|
|
133
202
|
|
|
134
|
-
`hitch eval setup harbor` requires Python 3.12+ and creates an isolated virtual
|
|
135
|
-
environment at `~/.hitch/tools/harbor-<version>`. It does not install or start
|
|
136
|
-
Docker. `hitch eval doctor` checks Python, the selected Harbor installation,
|
|
137
|
-
the Docker daemon, and whether a common provider credential is present. Hitch
|
|
138
|
-
automatically prefers the managed Harbor installation for subsequent evals;
|
|
139
|
-
`--harbor` and `HITCH_HARBOR_PATH` remain explicit overrides.
|
|
140
|
-
|
|
141
203
|
Harbor owns task discovery, Docker lifecycle, verification, and rewards. Its
|
|
142
|
-
custom Hitch agent uploads a minimal Hitch runtime
|
|
143
|
-
|
|
144
|
-
|
|
204
|
+
custom Hitch agent uploads a minimal, SHA-256-addressed Hitch controller runtime
|
|
205
|
+
into each task container and executes the selected harness revision in `/app`.
|
|
206
|
+
The resulting eval record links the request, resolved revision, controller
|
|
207
|
+
runtime, backend configuration and logs, normalized result, reward summary, and
|
|
208
|
+
trajectory evidence.
|
|
209
|
+
|
|
210
|
+
Eval accepts exact `version:` refs, registered `commit:` refs, and explicit
|
|
211
|
+
local `git+file:///absolute/repo#<full-lowercase-commit>` refs. For local Git,
|
|
212
|
+
Hitch transports a verified exact-commit object pack into each Harbor trial;
|
|
213
|
+
uncommitted files, Git config, credentials, and unrelated history are excluded.
|
|
214
|
+
The local repository must be clean and abbreviated commits, branches, tags,
|
|
215
|
+
`HEAD`, and installed executables are rejected. Common provider credentials are
|
|
216
|
+
forwarded by environment-variable reference; use `--pass-env NAME` for an
|
|
217
|
+
additional variable.
|
|
218
|
+
|
|
219
|
+
See [Harbor-backed agent evals](docs/evals.md) for setup, portability rules, and
|
|
220
|
+
the execution boundary.
|
|
221
|
+
|
|
222
|
+
## Stable execution layer
|
|
223
|
+
|
|
224
|
+
Versioned artifacts still need a consistent way to run. Hitch provides adapters
|
|
225
|
+
for Codex CLI, Claude Code, Pi, OpenCode, and DeepSeek Harness and normalizes
|
|
226
|
+
their invocation and lifecycle behavior behind one machine-oriented contract.
|
|
227
|
+
|
|
228
|
+
```text
|
|
229
|
+
caller -> Hitch CLI / daemon -> shared run engine -> Codex CLI
|
|
230
|
+
\----> Claude Code
|
|
231
|
+
\----> Pi
|
|
232
|
+
\----> OpenCode
|
|
233
|
+
\----> DeepSeek Harness
|
|
234
|
+
```
|
|
145
235
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
credentials are forwarded by environment-variable reference; use
|
|
150
|
-
`--pass-env NAME` for an additional variable. Eval records are stored under
|
|
151
|
-
`~/.hitch/evals` and include the request, resolved revision, plan, generated
|
|
152
|
-
Harbor config, raw backend logs/result, normalized result, and JSONL events.
|
|
236
|
+
The direct CLI and persistent daemon use the same run engine, so revision
|
|
237
|
+
resolution, records, timeout, cancellation, and event behavior do not drift.
|
|
238
|
+
The runtime currently provides:
|
|
153
239
|
|
|
154
|
-
|
|
240
|
+
- executable discovery, version probing, and executable fingerprints;
|
|
241
|
+
- exact package-version and Git-commit resolution;
|
|
242
|
+
- immutable prepared artifacts with integrity-aware caching;
|
|
243
|
+
- direct execution with normalized JSONL events;
|
|
244
|
+
- a persistent local daemon with bounded concurrency;
|
|
245
|
+
- queued and active-run cancellation, timeouts, and process-tree cleanup;
|
|
246
|
+
- managed shared, Git worktree, and independent-copy workspace modes;
|
|
247
|
+
- atomic manifests and results plus raw stdout and stderr logs; and
|
|
248
|
+
- conservative recovery of interrupted records after daemon restart.
|
|
155
249
|
|
|
156
|
-
|
|
157
|
-
executable behavior; exact published versions and Git commits resolve to
|
|
158
|
-
immutable identities and are prepared in Hitch's artifact store.
|
|
250
|
+
Run through the daemon when a long-lived queue is useful:
|
|
159
251
|
|
|
160
252
|
```bash
|
|
161
|
-
|
|
162
|
-
hitch run --harness codex --prompt "Inspect this repository"
|
|
253
|
+
hitch daemon start --max-concurrent 4
|
|
163
254
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
255
|
+
hitch run \
|
|
256
|
+
--daemon \
|
|
257
|
+
--harness codex@version:0.92.0 \
|
|
258
|
+
--cwd /workspace/project \
|
|
259
|
+
--prompt-file task.md \
|
|
260
|
+
--output jsonl
|
|
168
261
|
|
|
169
|
-
|
|
170
|
-
hitch
|
|
262
|
+
hitch daemon status --json
|
|
263
|
+
hitch daemon stop
|
|
264
|
+
```
|
|
171
265
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
266
|
+
Asynchronous submission and cancellation are also available:
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
hitch daemon submit \
|
|
270
|
+
--harness claude@version:EXACT_VERSION \
|
|
271
|
+
--cwd /workspace/project \
|
|
272
|
+
--prompt-file task.md
|
|
273
|
+
|
|
274
|
+
hitch daemon cancel RUN_ID
|
|
176
275
|
```
|
|
177
276
|
|
|
178
|
-
|
|
179
|
-
accepted. Short commit IDs are expanded and must be unambiguous. Local Git
|
|
180
|
-
repositories must be clean. Codex, Pi, and DeepSeek Harness support
|
|
181
|
-
source-commit preparation; Claude Code and OpenCode currently support installed
|
|
182
|
-
and exact-version sources.
|
|
277
|
+
## State and isolation
|
|
183
278
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
279
|
+
State is stored below `~/.hitch` by default. Use `--root <path>` or
|
|
280
|
+
`HITCH_ROOT` to relocate it. Each root owns its artifact store, controller
|
|
281
|
+
runtime store, run and eval records, daemon token, and queue.
|
|
187
282
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
auditable and cacheable; it is not a security sandbox.
|
|
283
|
+
Native executable overrides use `HITCH_CODEX_PATH`, `HITCH_CLAUDE_PATH`,
|
|
284
|
+
`HITCH_PI_PATH`, `HITCH_OPENCODE_PATH`, and `HITCH_DEEPSEEK_PATH`.
|
|
191
285
|
|
|
192
|
-
|
|
286
|
+
Workspace modes make mutation boundaries explicit:
|
|
193
287
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
runtime.
|
|
288
|
+
- `shared` runs directly in the source directory;
|
|
289
|
+
- `worktree` creates a detached Git worktree from a clean `HEAD`; and
|
|
290
|
+
- `copy` creates an independent filesystem copy.
|
|
198
291
|
|
|
199
|
-
|
|
200
|
-
caller -> Hitch CLI / daemon -> shared run engine -> Codex CLI
|
|
201
|
-
\----> Claude Code
|
|
202
|
-
\----> Pi
|
|
203
|
-
\----> OpenCode
|
|
204
|
-
\----> DeepSeek Harness
|
|
205
|
-
```
|
|
292
|
+
Workspace isolation is not a process security sandbox.
|
|
206
293
|
|
|
207
|
-
|
|
208
|
-
|
|
294
|
+
## Design principles
|
|
295
|
+
|
|
296
|
+
- **Traceable by default:** every run links the requested reference, resolved
|
|
297
|
+
revision, runnable artifact, execution record, and evidence.
|
|
298
|
+
- **Immutable resolution:** mutable input is resolved before preparation or
|
|
299
|
+
execution, then recorded by identity.
|
|
300
|
+
- **Content-addressed reuse:** validated artifacts and controller runtimes are
|
|
301
|
+
reused by digest rather than copied per run.
|
|
302
|
+
- **Evidence without lossy abstraction:** stable canonical records coexist with
|
|
303
|
+
raw harness output and explicit trajectory fidelity.
|
|
304
|
+
- **Machine-first contracts:** structured output, versioned schemas, and typed
|
|
305
|
+
failures are the public interface.
|
|
306
|
+
- **Policy lives above Hitch:** mutation, ranking, promotion, and rollback remain
|
|
307
|
+
explicit decisions for the calling system.
|
|
308
|
+
- **Safe interruption:** cancellation targets the complete subprocess tree, and
|
|
309
|
+
interrupted workspace-mutating runs are never replayed implicitly.
|
|
209
310
|
|
|
210
311
|
## Planned work
|
|
211
312
|
|
|
313
|
+
- [x] Strict model/harness comparison primitives over run evidence
|
|
314
|
+
- [ ] Named candidate and champion references
|
|
315
|
+
- [ ] Promotion and rollback records without embedding promotion policy
|
|
316
|
+
- [ ] Remote artifact and evidence synchronization
|
|
212
317
|
- [ ] Additional harness adapters
|
|
213
318
|
- [ ] Additional API provider support
|
|
214
319
|
- [ ] Local model inference support
|
|
215
320
|
|
|
216
|
-
##
|
|
321
|
+
## News
|
|
217
322
|
|
|
218
|
-
- **
|
|
219
|
-
|
|
220
|
-
-
|
|
221
|
-
|
|
222
|
-
- **
|
|
223
|
-
records.
|
|
224
|
-
- **Safe interruption:** cancellation targets the complete subprocess tree.
|
|
225
|
-
- **No implicit replay:** interrupted workspace-mutating runs fail visibly.
|
|
323
|
+
- **2026-08-20:** Hitch 0.2 development moved the project to strict TypeScript
|
|
324
|
+
compiled to ESM, added a shared SHA-256 controller runtime cache, recorded a
|
|
325
|
+
DSH-compatible canonical trajectory for every run, and introduced
|
|
326
|
+
lifecycle-bound message feedback.
|
|
327
|
+
- **2026-08-13:** Hitch added DeepSeek Harness support.
|
|
226
328
|
|
|
227
329
|
## Documentation
|
|
228
330
|
|
|
331
|
+
- [Hitch 0.2 development spec](docs/hitch-0.2-development-spec.md)
|
|
229
332
|
- [Design document](docs/design.md)
|
|
230
333
|
- [Agent daemon analysis and port](docs/daemon.md)
|
|
231
334
|
- [Workspace isolation](docs/workspaces.md)
|
|
@@ -235,7 +338,7 @@ cancellation, and event behavior do not drift.
|
|
|
235
338
|
## Community
|
|
236
339
|
|
|
237
340
|
Join the [Hitch community on Discord](https://discord.gg/cZ4NBbHDk) to ask
|
|
238
|
-
questions, share feedback, and discuss
|
|
341
|
+
questions, share feedback, and discuss agent-harness infrastructure.
|
|
239
342
|
|
|
240
343
|
## Acknowledgements
|
|
241
344
|
|