@uchibeke/gallivant 0.0.0-stage → 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.
Files changed (168) hide show
  1. package/CONTRIBUTING.md +26 -0
  2. package/LICENSE +204 -0
  3. package/README.md +239 -2
  4. package/SECURITY.md +19 -0
  5. package/bin/gallivant.mjs +261 -0
  6. package/bin/package-plugin.mjs +16 -0
  7. package/bin/release-live.mjs +29 -0
  8. package/bin/release-package.mjs +23 -0
  9. package/bin/session-runtime.mjs +13 -0
  10. package/bin/task-delivery-state.mjs +12 -0
  11. package/docs/README.md +72 -0
  12. package/docs/agent-setup.md +228 -0
  13. package/docs/app.md +111 -0
  14. package/docs/architecture.md +265 -0
  15. package/docs/chains.md +102 -0
  16. package/docs/codex-cloud.md +284 -0
  17. package/docs/commands.md +649 -0
  18. package/docs/config.md +437 -0
  19. package/docs/execution.md +796 -0
  20. package/docs/guardrails.md +311 -0
  21. package/docs/install.md +398 -0
  22. package/docs/launch.md +45 -0
  23. package/docs/learning.md +369 -0
  24. package/docs/network-recovery.md +101 -0
  25. package/docs/openai-agents.md +457 -0
  26. package/docs/prd.md +246 -0
  27. package/docs/preparation.md +110 -0
  28. package/docs/release-qualification.md +196 -0
  29. package/docs/releasing.md +149 -0
  30. package/docs/runtime-environment.md +113 -0
  31. package/docs/task-delivery.md +476 -0
  32. package/docs/tasks.md +739 -0
  33. package/lib/aport.mjs +95 -0
  34. package/lib/attribution.mjs +95 -0
  35. package/lib/block.mjs +89 -0
  36. package/lib/capabilities.mjs +3 -0
  37. package/lib/chains.mjs +222 -0
  38. package/lib/codex_cloud.mjs +160 -0
  39. package/lib/codex_cloud_config.mjs +20 -0
  40. package/lib/codex_cloud_input.mjs +49 -0
  41. package/lib/codex_cloud_result.mjs +74 -0
  42. package/lib/commands/doctor.mjs +466 -0
  43. package/lib/commands/init.mjs +245 -0
  44. package/lib/commands/learn.mjs +54 -0
  45. package/lib/commands/new.mjs +47 -0
  46. package/lib/commands/ready.mjs +45 -0
  47. package/lib/commands/register.mjs +249 -0
  48. package/lib/commands/resume.mjs +224 -0
  49. package/lib/commands/serve.mjs +349 -0
  50. package/lib/commands/start.mjs +247 -0
  51. package/lib/commands/start_services.mjs +22 -0
  52. package/lib/commands/status.mjs +150 -0
  53. package/lib/commands/task.mjs +73 -0
  54. package/lib/commands/up.mjs +228 -0
  55. package/lib/commands/why.mjs +143 -0
  56. package/lib/config.mjs +461 -0
  57. package/lib/context.mjs +102 -0
  58. package/lib/control.mjs +202 -0
  59. package/lib/control_contract.mjs +16 -0
  60. package/lib/coordinator.mjs +19 -0
  61. package/lib/credential.mjs +161 -0
  62. package/lib/daemon.mjs +156 -0
  63. package/lib/deliverable.mjs +357 -0
  64. package/lib/events.mjs +261 -0
  65. package/lib/executable.mjs +31 -0
  66. package/lib/execution.mjs +707 -0
  67. package/lib/execution_contract.mjs +15 -0
  68. package/lib/execution_input.mjs +4 -0
  69. package/lib/execution_io.mjs +94 -0
  70. package/lib/execution_journal.mjs +69 -0
  71. package/lib/execution_preparation.mjs +29 -0
  72. package/lib/execution_result.mjs +266 -0
  73. package/lib/fs.mjs +140 -0
  74. package/lib/gh.mjs +289 -0
  75. package/lib/git.mjs +434 -0
  76. package/lib/harness.mjs +521 -0
  77. package/lib/harness_log.mjs +432 -0
  78. package/lib/hash.mjs +16 -0
  79. package/lib/identity.mjs +98 -0
  80. package/lib/learning.mjs +654 -0
  81. package/lib/learning_contract.mjs +2 -0
  82. package/lib/learning_data.mjs +135 -0
  83. package/lib/learning_input.mjs +111 -0
  84. package/lib/learning_qualification.mjs +67 -0
  85. package/lib/learning_signer.mjs +151 -0
  86. package/lib/learning_store.mjs +88 -0
  87. package/lib/log.mjs +53 -0
  88. package/lib/network_diagnostics.mjs +64 -0
  89. package/lib/network_recovery.mjs +42 -0
  90. package/lib/notify.mjs +58 -0
  91. package/lib/openai_agents.mjs +373 -0
  92. package/lib/openai_agents_config.mjs +14 -0
  93. package/lib/openai_agents_http.mjs +87 -0
  94. package/lib/openai_agents_input.mjs +15 -0
  95. package/lib/openai_agents_sources.mjs +112 -0
  96. package/lib/owner_delivery.mjs +443 -0
  97. package/lib/plugin_package.mjs +340 -0
  98. package/lib/prd.mjs +635 -0
  99. package/lib/preparation_agents.mjs +33 -0
  100. package/lib/preparation_codex.mjs +212 -0
  101. package/lib/probe.mjs +126 -0
  102. package/lib/prompt.mjs +238 -0
  103. package/lib/provider_health.mjs +55 -0
  104. package/lib/public-format.mjs +31 -0
  105. package/lib/public_output.mjs +49 -0
  106. package/lib/release_package.mjs +154 -0
  107. package/lib/repository_files.mjs +86 -0
  108. package/lib/run.mjs +385 -0
  109. package/lib/run_log.mjs +94 -0
  110. package/lib/runtime-environment.mjs +87 -0
  111. package/lib/runtime_dependencies.mjs +15 -0
  112. package/lib/runtime_node.mjs +107 -0
  113. package/lib/runtime_state.mjs +174 -0
  114. package/lib/sources/index.mjs +27 -0
  115. package/lib/sources/prd.mjs +50 -0
  116. package/lib/start_contract.mjs +37 -0
  117. package/lib/state.mjs +246 -0
  118. package/lib/task_allowance.mjs +31 -0
  119. package/lib/task_completion.mjs +61 -0
  120. package/lib/task_contract.mjs +450 -0
  121. package/lib/task_delivery.mjs +219 -0
  122. package/lib/task_delivery_cancel.mjs +34 -0
  123. package/lib/task_delivery_contract.mjs +61 -0
  124. package/lib/task_delivery_mcp.mjs +40 -0
  125. package/lib/task_delivery_store.mjs +43 -0
  126. package/lib/task_delivery_view.mjs +88 -0
  127. package/lib/task_environment.mjs +281 -0
  128. package/lib/task_prepare.mjs +224 -0
  129. package/lib/task_store.mjs +38 -0
  130. package/lib/tasks.mjs +513 -0
  131. package/lib/tick.mjs +1654 -0
  132. package/lib/time.mjs +36 -0
  133. package/lib/tracker/assets.mjs +43 -0
  134. package/lib/tracker/pages.mjs +320 -0
  135. package/lib/tracker/runs.mjs +102 -0
  136. package/lib/tracker/stream.mjs +74 -0
  137. package/lib/tracker_process.mjs +107 -0
  138. package/lib/verification_sandbox.mjs +181 -0
  139. package/node_modules/smol-toml/LICENSE +24 -0
  140. package/node_modules/smol-toml/README.md +605 -0
  141. package/node_modules/smol-toml/dist/date.d.ts +41 -0
  142. package/node_modules/smol-toml/dist/date.js +156 -0
  143. package/node_modules/smol-toml/dist/error.d.ts +37 -0
  144. package/node_modules/smol-toml/dist/error.js +67 -0
  145. package/node_modules/smol-toml/dist/extract.js +289 -0
  146. package/node_modules/smol-toml/dist/index.cjs +770 -0
  147. package/node_modules/smol-toml/dist/index.d.ts +44 -0
  148. package/node_modules/smol-toml/dist/index.js +34 -0
  149. package/node_modules/smol-toml/dist/parse.d.ts +73 -0
  150. package/node_modules/smol-toml/dist/parse.js +164 -0
  151. package/node_modules/smol-toml/dist/primitive.js +151 -0
  152. package/node_modules/smol-toml/dist/stringify.d.ts +32 -0
  153. package/node_modules/smol-toml/dist/stringify.js +219 -0
  154. package/node_modules/smol-toml/dist/struct.js +156 -0
  155. package/node_modules/smol-toml/dist/util.d.ts +43 -0
  156. package/node_modules/smol-toml/dist/util.js +57 -0
  157. package/node_modules/smol-toml/package.json +68 -0
  158. package/npm-shrinkwrap.json +1823 -0
  159. package/package.json +105 -4
  160. package/templates/claude-settings.json +18 -0
  161. package/templates/passport.gallivant.json +83 -0
  162. package/templates/plugin/bundled-runtime.json +26 -0
  163. package/templates/plugin/schemas/mcp.schema.json +120 -0
  164. package/templates/plugin/schemas/plugin.schema.json +65 -0
  165. package/templates/plugin/task-delivery.SKILL.md +60 -0
  166. package/templates/prd.md +32 -0
  167. package/templates/tracker/tracker.css +301 -0
  168. package/templates/tracker/tracker.js +721 -0
@@ -0,0 +1,398 @@
1
+ # Install
2
+
3
+ Get one repository task from a brief to a reviewed pull request. One command sets
4
+ up a repository; `doctor` tells you what still needs your decision or login; then
5
+ you start a small task. Gallivant keeps the implementation and review loop moving
6
+ and you review and merge.
7
+
8
+ **Using a coding agent to set this up?** Give it the [agent setup guide](agent-setup.md).
9
+ It includes a copy/paste prompt, the setup checks and the point where a real run starts.
10
+
11
+ ## 1. Prerequisites
12
+
13
+ Requirements shared by the coordinator: macOS or Linux, Node 22 or newer, Git,
14
+ `gh` signed in, and `jq`. For the recommended local path, use signed-in Codex CLI
15
+ 0.160.0+ or Claude Code 2.1.263+ (Codex implementation accepts 0.158.0+, but
16
+ plain-language preparation needs 0.160.0+). Hosted OpenAI Agents execution has a
17
+ separate setup below and needs no local Codex or Claude binary. See the
18
+ [capability matrix](../README.md#harness-support) before choosing another harness.
19
+
20
+ | Prerequisite | Check | If it fails |
21
+ | --- | --- | --- |
22
+ | Node 22+ | `node --version` | install Node from your package manager or a version manager |
23
+ | Git and jq | `git --version`, `jq --version` | `brew install git jq`, `apt install git jq` or `dnf install git jq` |
24
+ | GitHub CLI signed in | `gh auth status` | `gh auth login` |
25
+ | Codex CLI signed in | `codex login status` | `codex login` |
26
+ | Claude Code signed in | `claude auth status` | `claude auth login` |
27
+ | Git identity | `git config --get user.name`, `git config --get user.email` | `git config --global user.name "..."` and `user.email` |
28
+
29
+ Each login belongs to that tool's own flow. Nothing in Gallivant asks for a
30
+ password, token or browser cookie, and `init` stops before writing anything when
31
+ `gh` or the selected harness is signed out.
32
+
33
+ Linux installations need process inspection through `ps` with `lstart`, `command`,
34
+ PID and process-group fields (normally the `procps`/`procps-ng` package). Minimal
35
+ containers may omit it. Keep process inspection available: uncertain ownership
36
+ blocks safe restart rather than allowing overlapping agents. The CI baseline is
37
+ Ubuntu with Node 22/24; other distributions must also satisfy their harness and
38
+ sandbox prerequisites.
39
+
40
+ For DNS errors or stalled provider calls, see [network diagnosis and recovery](network-recovery.md).
41
+ The diagnostic command works before configuration or login, on Linux and macOS.
42
+
43
+ ## 2. The command
44
+
45
+ Inside the Git checkout you want Gallivant to work in:
46
+
47
+ ```bash
48
+ cd /path/to/your/repository
49
+ npx --yes @uchibeke/gallivant init --harness codex # or: --harness claude
50
+ ```
51
+
52
+ This setup flow requires **0.2.1 or newer**. On 2026-10-20, npm's `latest` was
53
+ still 0.2.0: its `init` creates the config only, so repository registration and
54
+ `doctor` must be done separately. A maintainer must [publish 0.2.1](releasing.md)
55
+ before the command above provides the flow below; setup does not publish it.
56
+
57
+ `npx` downloads the published `@uchibeke/gallivant` package into npm's cache and
58
+ runs its `gallivant` command. Nothing is installed globally, no `gallivant`
59
+ command is added to your PATH, and this repository is not cloned. The command
60
+ ends by saying so and printing both the next `npx` command and the optional
61
+ persistent install:
62
+
63
+ ```bash
64
+ npm install -g @uchibeke/gallivant # optional; then use plain `gallivant`
65
+ gallivant --version
66
+ ```
67
+
68
+ If the shell cannot find `gallivant` after a global install, the `bin` directory
69
+ under `npm prefix -g` is not on your PATH. Avoid `sudo npm install`; use a
70
+ user-owned Node installation or prefix. The rest of this guide writes
71
+ `gallivant`; with `npx`, read that as `npx --yes @uchibeke/gallivant`.
72
+
73
+ ### What `init` does
74
+
75
+ 1. Refuses to continue, writing nothing, when the directory is not a Git
76
+ checkout, its `origin` remote is not a github.com repository, `gh` is signed
77
+ out, the selected harness is missing, too old or signed out, or the resolved
78
+ run credential cannot see or push to the repository. Each refusal names the
79
+ command that fixes it. Classic credentials also need `public_repo` or `repo`
80
+ scope; a failed scope lookup stops setup before writing and asks you to retry.
81
+ 2. Creates `~/.gallivant/config.json` (mode 600) with your authenticated GitHub
82
+ login in `trusted_authors`, the selected installed harness, notifications
83
+ disabled and a separate `~/.gallivant-worktrees` directory for task checkouts.
84
+ Use `--worktrees /absolute/path` to put checkouts elsewhere, outside the
85
+ config home.
86
+ 3. Records the repository in `repos` once, by its lowercased `owner/name`.
87
+ 4. Prints the `doctor` report and exits with its status: `0` when every check
88
+ passes, `1` while something still needs you.
89
+
90
+ Running it again is safe. An existing config keeps every key as written,
91
+ including custom harness binaries, `github_token_file`, `repos` entries with
92
+ their base branches, `notify` and `worktrees`; the only change is the one `repos`
93
+ entry for the current repository, and a repository already listed is not
94
+ duplicated. `--worktrees` is refused when it differs from the configured
95
+ directory, so edit the config to move checkouts. `--harness` adds the named
96
+ harness when it is not configured yet and leaves the others alone.
97
+ If both Codex and Claude are configured, pass `--harness codex` or
98
+ `--harness claude` explicitly. Setup rechecks settings changed by another command
99
+ before writing, so concurrent repository registrations preserve each other's entries.
100
+
101
+ ### What `init` leaves to you
102
+
103
+ `doctor` reports these with the exact fix. `init` does not perform them:
104
+
105
+ - **Reviewer.** The default reviewer is the Codex GitHub integration. Enable it
106
+ on the repository, configure another supported bot, or set `"reviewer": null`
107
+ to rely on CI and trusted human feedback. Without one of these, the default
108
+ loop waits for a review that cannot arrive. See [the reviewer key](config.md#the-reviewer-object).
109
+ - **Branch protection.** Section 5 below. `doctor` prints the `gh api` call; you
110
+ run it.
111
+ - **Harness guardrails.** Sections 7 and 8 below. APort's installer writes the
112
+ hook, and Codex asks you to trust it interactively.
113
+ - **Credentials and notifications.** Sections 4 and 6 below are optional and
114
+ need your own token or ntfy topic.
115
+ - **Starting work.** Setup never prepares or starts a task, so it spends nothing
116
+ on inference. Section 9 covers the first task and what `--run` authorizes.
117
+
118
+ Global configuration lives in `~/.gallivant/config.json` (or
119
+ `$GALLIVANT_HOME/config.json` when explicitly set). See [config.md](config.md)
120
+ for every key. Task commands still need a target checkout: run inside it, pass
121
+ `--dir` for natural-language tasks, or pass the PRD path for a written brief.
122
+
123
+ ### Install from source
124
+
125
+ Contributors who want to run the checkout they are editing:
126
+
127
+ ```bash
128
+ git clone https://github.com/uchibeke/gallivant && cd gallivant
129
+ npm ci --ignore-scripts
130
+ npm link
131
+ gallivant --version
132
+ ```
133
+
134
+ The package has locked runtime dependencies; `npm ci` installs them for a source
135
+ checkout. `npm i -g .` copies instead of linking. This is not the path for using
136
+ Gallivant; the published package is.
137
+
138
+ ### Hosted Agents API instead of a local CLI
139
+
140
+ `init --harness` currently supports only `codex` and `claude`. For a hosted-only
141
+ installation, create the config manually; do not install a local agent just to
142
+ satisfy `init`. Create `~/.gallivant` privately, save the following as
143
+ `~/.gallivant/config.json` with mode `600`, and replace the example account,
144
+ project, model, repository, username and API-key path with your authorized values:
145
+
146
+ ```json
147
+ {
148
+ "trusted_authors": ["YOUR_GITHUB_LOGIN"],
149
+ "worktrees": "~/.gallivant-worktrees",
150
+ "repos": ["YOUR_OWNER/YOUR_REPO"],
151
+ "harness": {
152
+ "openai-agents": {
153
+ "account": "my-service-account",
154
+ "organization": "org-selected",
155
+ "project": "proj-selected",
156
+ "api_key_file": "/absolute/path/to/private/agents-key",
157
+ "model": "YOUR_AUTHORIZED_MODEL",
158
+ "environment": "openai_hosted",
159
+ "container_size": "small",
160
+ "network": { "access": "disabled" },
161
+ "allowance": { "remainingUsd": 1, "reservedUsd": 0.2 }
162
+ }
163
+ },
164
+ "notify": null
165
+ }
166
+ ```
167
+
168
+ Keep existing config keys if you are adding this adapter to an existing install.
169
+ The allowance is an illustrative local reservation, not a provider-enforced
170
+ spend cap. API inference and hosted compute use API billing, independently of a
171
+ ChatGPT subscription. Read the [Agents API guide](openai-agents.md) for scoped
172
+ API permissions, packages, restricted networking and cancellation limitations.
173
+
174
+ Run `gallivant doctor` before starting. Hosted results are verified locally in an
175
+ OS sandbox: macOS needs `sandbox-exec` and Command Line Tools; Linux needs
176
+ `/usr/bin/bwrap` and the supported namespaces. Missing sandbox support blocks
177
+ execution/publication. Read-only account probes do not prove inference entitlement
178
+ or a successful full lifecycle. Local APort hooks are not installed into hosted
179
+ sessions; mandatory local-only policies cause a refusal.
180
+
181
+ Use `--harness openai-agents` with `gallivant task`, or `harness: openai-agents`
182
+ in your PRD. Keep the coordinator machine awake and online even though the agent
183
+ runs remotely. **Codex Cloud is a different adapter:** its new dispatch is
184
+ currently disabled because repository ownership of the selected environment
185
+ cannot be verified. See [the Cloud gate](codex-cloud.md); local Codex and Claude
186
+ remain available.
187
+
188
+ ## 3. Read the report
189
+
190
+ `init` ends with the `doctor` report; `gallivant doctor` prints it again at any
191
+ time. Every failing line carries the command or file that fixes it. Work through
192
+ them in order, then rerun `doctor`. `doctor` without flags checks configuration,
193
+ credentials and repository access without launching a model run; `doctor --probe`
194
+ runs a real Claude sandbox test and `doctor --send` sends a real notification,
195
+ so use those only when you mean to.
196
+
197
+ ## 4. GitHub auth
198
+
199
+ By default Gallivant uses the login you already have, however you set it up. Nothing to configure beyond `gh auth status` passing. There is no file to copy for this: every git setting a run needs, the credential helper included, is passed in the run's environment.
200
+
201
+ For local CLI runs, the coordinator resolves GitHub credentials before launching
202
+ the harness. Supported sandbox settings restrict native credential-store access,
203
+ so the run receives `GH_TOKEN` and an environment-carried Git helper. Sandbox
204
+ coverage differs by harness; see [guardrails](guardrails.md). The token is not
205
+ placed in command arguments or persisted by Gallivant, but the child process
206
+ can read it. For hosted Agents execution, GitHub credentials stay with the local
207
+ coordinator, which verifies and publishes returned artifacts.
208
+
209
+ Do not create a separate `~/.gallivant/gitconfig` or override `GIT_CONFIG_GLOBAL`
210
+ for a run. Current versions carry Git configuration in the run environment.
211
+ `doctor` checks that transport with `git ls-remote` in an isolated home;
212
+ a successful read does not by itself prove push permission.
213
+
214
+ Where the credential comes from, first answer wins:
215
+
216
+ 1. `github_token_file`, if you set one in config.
217
+ 2. `GH_TOKEN` or `GITHUB_TOKEN` in the environment the daemon was started in.
218
+ 3. `gh auth token`. This is why any login works: `gh` answers from whichever store it used, whether that is a keyring, a secret service, or a plain `hosts.yml` on a machine with neither.
219
+
220
+ If none of the three answers, `gallivant start` refuses and names all three. It does not start a session that would spend money and then fail to push.
221
+
222
+ Optional, and recommended once the loop runs on repos that matter: a fine-grained personal access token limited to the participating repos, so an escaped run cannot reach every repository your login can. Create one at GitHub, Settings, Developer settings, Fine-grained tokens, with Contents, Pull requests and Issues read and write, Checks, Actions and Metadata read, and **no Workflows permission**. Save it and point config at it:
223
+
224
+ ```bash
225
+ umask 077
226
+ cat > ~/.gallivant/gh-token
227
+ # Paste the token, then press Ctrl-D. Do not paste it into a shell command.
228
+ # config.json: "github_token_file": "~/.gallivant/gh-token"
229
+ ```
230
+
231
+ With the file set it wins over both of the other two. A missing, unreadable or empty
232
+ file refuses the operation instead of falling back to a wider login. Restore it,
233
+ or explicitly set `github_token_file` to `null` and restart the daemon to choose ambient authentication. `doctor` reports which source a run would use, whether the token is classic or fine-grained, and repository access and protection checks. Its Git credential-transport check uses
234
+ `git ls-remote`; a successful read does not by itself prove push permission.
235
+
236
+ This installation guide targets github.com repositories. The credential resolver
237
+ recognizes enterprise hosts on an existing checkout, but new-task repository
238
+ resolution and clone URLs currently use github.com. An enterprise login or token
239
+ alone does not establish supported end-to-end operation.
240
+
241
+ ## 5. A ruleset on each repo
242
+
243
+ The one control that stops a push to the default branch is GitHub's. `doctor` prints the exact `gh api` call for every repo in `repos`; it creates a ruleset that blocks deletion and force pushes on the default branch and requires a pull request, with no bypass actors. Gallivant never merges, so the ruleset costs nothing in the loop.
244
+
245
+ ## 6. Notifications
246
+
247
+ Optional: create a topic on [ntfy.sh](https://ntfy.sh) or your own server, install the ntfy app, and set
248
+ `"notify": { "ntfy": "https://ntfy.sh/<unguessable-topic>", "email": null }`.
249
+ Set `notify.email` to also get each message by email through ntfy's `Email` header.
250
+ With `"notify": null`, use the dashboard or `status`; there are no push notifications.
251
+
252
+ ```bash
253
+ gallivant doctor --send # sends one test message
254
+ ```
255
+
256
+ Three kinds of message exist: `ready for a human`, `needs you: <reason>`, and a throttled `gallivant: <error>` when the daemon itself cannot work (gh not authenticated, a harness signed out). Nothing on merge. Nothing per round.
257
+
258
+ ## 7. APort on Claude Code
259
+
260
+ APort's installer writes a PreToolUse hook with matcher `*` into whichever settings file it is pointed at, and the hook enforces one passport. Gallivant's passport is strict on purpose: writes only under the worktrees directory, control-plane directories blocked. Installed into `~/.claude/settings.json`, that policy would apply to every interactive Claude session you run and block your normal work. So the installer goes into a Gallivant-owned directory, and every run loads it with `--settings` plus `APORT_CLAUDE_CODE_CONFIG_DIR`. Nothing about the sandbox requires this; it is only about keeping Gallivant's policy separate from yours.
261
+
262
+ If you would rather have one policy everywhere, point `harness.claude.settings` at `~/.claude/settings.json` and install APort there; the sandbox block then applies to your interactive sessions too.
263
+
264
+ ```bash
265
+ APORT_CLAUDE_CODE_CONFIG_DIR=~/.gallivant/claude npx @aporthq/aport-agent-guardrails claude-code
266
+ # choose "Create local passport file"; no hosted account is needed
267
+ # init and doctor print the absolute path to the packaged passport template.
268
+ cp /absolute/path/printed/by/init/passport.gallivant.json ~/.gallivant/claude/aport/passport.json
269
+ # then edit it: replace {{worktrees}} with your worktrees path and {{home}} with your home directory
270
+ ```
271
+
272
+ Merge the sandbox block from the packaged `claude-settings.json` path printed by
273
+ `init` into `~/.gallivant/claude/settings.json` next to the hooks the installer wrote.
274
+ Those absolute template paths work after either source or npm installation.
275
+ Every Claude run loads that file with `--settings` and sets `APORT_CLAUDE_CODE_CONFIG_DIR`, so the hook and the sandbox apply only to Gallivant runs.
276
+
277
+ On macOS the template enables `sandbox.enableWeakerNetworkIsolation` so `gh` can use Apple's certificate verification service. Without it, a valid GitHub login can fail inside the sandbox with `x509: OSStatus -26276`. This grants access to `com.apple.trustd.agent` and opens a potential exfiltration route through that service; review the [security tradeoff](guardrails.md#claude-on-macos-needs-certificate-verification) before applying it. The setting has no effect on Linux. `doctor` detects the missing setting on macOS and explains the repair; it does not change settings automatically.
278
+
279
+ Any APort passport option works: a hosted passport created by the installer, an existing hosted `agent_id`, or a local file. With a hosted passport the limits live in the aport.io dashboard, so set `data.file.write` `allowed_paths` there to your worktrees directory and `blocked_paths` to the control-plane directories listed in `templates/passport.gallivant.json`; with a local passport, copy the template. `doctor` reports which mode is in use.
280
+
281
+ ```bash
282
+ gallivant doctor --probe # a real run: a write inside the checkout succeeds, a write outside is denied
283
+ ```
284
+
285
+ The probe reads the APort audit log to tell apart a hook that never ran from a passport that allowed the write, and prints the fix for each.
286
+
287
+ ## 8. APort on Codex
288
+
289
+ ```bash
290
+ npx @aporthq/aport-agent-guardrails codex --global --enforcement=warn
291
+ codex # once: run /hooks and trust the APort hook. This step cannot be automated.
292
+ ```
293
+
294
+ APort's Codex hook is beta. Warn mode may downgrade policy denials, but adapter
295
+ failures can still block calls such as unsupported multi-file `apply_patch`;
296
+ check the installed guardrails version's support before unattended use. The
297
+ other controls are `workspace-write`, Codex's automatic approval reviewer for
298
+ Git metadata writes and escalations, the scoped token and the ruleset. Gallivant
299
+ sets the approval mode on start and resume. A denial must be diagnosed, not
300
+ bypassed. See [guardrails.md](guardrails.md#codex-git-writes-need-automatic-approval).
301
+
302
+ ## 9. First task
303
+
304
+ Before dispatch, confirm the repository, target branch, permitted changes and
305
+ spending limits. The default `max_iterations` is 30 automatic fix rounds;
306
+ `max_budget_usd` defaults to 5 and gives Claude a native per-run dollar cap.
307
+ Other local harnesses do not enforce an equivalent dollar cap. Use your provider's
308
+ spend controls and review [budget semantics](config.md) before unattended work.
309
+ A paid preparation call is different from the local `ready --check` validator.
310
+
311
+ You can deliver code, documentation, research or content, provided the outcome
312
+ is a repository change with concrete acceptance criteria and checks. You do not
313
+ need to write a PRD by hand.
314
+
315
+ ### From plain language
316
+
317
+ Inside the target repository:
318
+
319
+ ```sh
320
+ gallivant task "Document how to run the existing tests in CONTRIBUTING.md. Use the commands already defined in the repository. Change documentation only." \
321
+ --harness codex --verify 'git diff --check'
322
+ ```
323
+
324
+ Choose `claude` or `openai-agents` instead when configured. This first command
325
+ uses inference to prepare a brief but does not start implementation. Inspect the
326
+ returned draft and assumptions. If it needs answers, use its printed question
327
+ IDs and `Next` action. Once ready, substitute your returned ID and revision:
328
+
329
+ ```sh
330
+ gallivant task start TASK_ID --revision REVISION --run
331
+ gallivant start
332
+ ```
333
+
334
+ Alternatively, add `--run` to the original `task` request to authorize
335
+ implementation as soon as preparation and any clarifications succeed. The task
336
+ service starts the daemon; `gallivant start` with no path also opens the dashboard.
337
+ Read [task operations](tasks.md) for selected context, revisions, recovery and costs.
338
+
339
+ ### From a written brief
340
+
341
+ `new` uses the first configured harness. Pass `--harness` with another configured
342
+ harness only when you intend to select it.
343
+
344
+ ```sh
345
+ gallivant new widget-export
346
+ # Fill in docs/prds/widget-export.md, including every required section.
347
+ gallivant ready docs/prds/widget-export.md --check
348
+ gallivant ready docs/prds/widget-export.md
349
+ gallivant start docs/prds/widget-export.md
350
+ gallivant status
351
+ ```
352
+
353
+ `new` writes a complete template. Fill in its Problem, User stories, Acceptance
354
+ criteria, Verify, Where to look and Out of scope sections. Empty section headings
355
+ are not a runnable brief. [The PRD contract](prd.md) explains the rules and
356
+ noncoding verification. `ready --check` is a local, read-only validation;
357
+ `ready` records readiness and updates the file without committing it.
358
+
359
+ `start` starts the background daemon and dashboard and opens the browser when
360
+ available. Do not run a second `up`. `--no-open` suppresses browser launch;
361
+ `--no-server` starts the task and daemon without the dashboard. `gallivant start`
362
+ with no path starts/reuses the services without submitting a task. `serve` uses
363
+ the same startup; supervisors can use `serve --foreground --no-open --no-daemon`
364
+ for a tracker whose daemon is managed separately. `gallivant down` stops both
365
+ standalone services, preserving active agent processes.
366
+
367
+ On macOS the daemon starts `caffeinate` for its lifetime to prevent idle sleep.
368
+ Closing a laptop lid, losing network or shutting down still interrupts monitoring.
369
+ There is no automatic login/reboot service installer yet.
370
+
371
+ ### Completion verification
372
+
373
+ APort readiness/completion verification is separate from harness pre-tool hooks.
374
+ By default, the built-in contract checks are confirmed by APort's hosted endpoint;
375
+ this needs network access and unauthenticated requests have an IP rate limit.
376
+ An installed APort Claude API key is used when available. To deliberately use
377
+ only the local completion evaluator, set `"deliverable": { "evaluator": "local" }`
378
+ in config; the local acceptance criteria and receipt checks still apply. See
379
+ [the completion contract](prd.md#the-completion-receipt) for details.
380
+
381
+ ## Verifying the first real PR
382
+
383
+ Watch `gallivant status` after the start run ends: the entry moves from `implementing` to `waiting on reviewer` once the PR is open. When the reviewer's review lands, the next tick shows `fixing`, then a round comment appears on the PR, and after the re-review either a `ready for a human` notification arrives or `status` shows why not.
384
+
385
+ ## Where things live
386
+
387
+ | Path | What |
388
+ |---|---|
389
+ | `~/.gallivant/config.json` | your config, mode 600 |
390
+ | `~/.gallivant/state.json` | the registry; preserve it and its snapshots for exact local recovery |
391
+ | `~/.gallivant/runs/<entry>/<run>/` | `job.json`, redacted `job.log`, private raw `provider.log` for local runs, local `cmd.json` or hosted execution/artifact records |
392
+ | `~/.gallivant/daemon.json` | daemon health, read by `status` |
393
+ | `~/.gallivant/tracker.json`, `tracker.lock`, `tracker.log` | standalone dashboard ownership, port and output |
394
+ | `~/.gallivant/errors.log` | every warning and error |
395
+ | `~/.gallivant/claude/` | Gallivant's Claude settings, APort hook runtime, passport, audit log |
396
+ | `<worktrees>/<repo>/<prd>` | one partial clone per PRD; durable until you delete it |
397
+
398
+ Override the home directory with `GALLIVANT_HOME` to run a second instance.
package/docs/launch.md ADDED
@@ -0,0 +1,45 @@
1
+ # Announcement drafts
2
+
3
+ Publish these only after [the release checks](releasing.md#verify-before-announcing)
4
+ pass for the version being announced. The package is published as
5
+ `@uchibeke/gallivant`; the setup command to advertise is
6
+ `npx --yes @uchibeke/gallivant init --harness codex` (or `--harness claude`),
7
+ run inside the target checkout. Check that the behavior the README describes is
8
+ in the released version before quoting it. Add a genuine dashboard screenshot or
9
+ recording of a task reaching a reviewed PR. Fixture tests are not live provider
10
+ evidence.
11
+
12
+ ## X
13
+
14
+ Give an agent a task. Let the review loop run. Go outside.
15
+
16
+ Gallivant turns requests into reviewed PRs: code, docs or research. Local or
17
+ hosted agents, review/CI fixes, and a dashboard for corrections. You choose
18
+ what merges.
19
+
20
+ https://github.com/uchibeke/gallivant
21
+
22
+ ## LinkedIn
23
+
24
+ I built Gallivant to reduce the time spent checking whether an agent has
25
+ finished, collecting review feedback, and sending it back for the next fix.
26
+
27
+ Start with a plain-language request or a written brief. Gallivant keeps the
28
+ requirements, implementation, tests and PR review together. It watches reviews
29
+ and CI, continues the same session for corrections, and reports when the result
30
+ is ready for you or needs help. A local dashboard lets you follow progress and
31
+ message the agent.
32
+
33
+ This also works for research, documentation and content delivered as repository
34
+ files. For longer plans, merge one milestone and the next starts from that base.
35
+ You retain the merge decision.
36
+
37
+ Claude Code and local Codex are the recommended starting points. An explicit
38
+ OpenAI Agents API integration supports hosted preparation and execution with
39
+ separate account, permission and billing requirements. The support table
40
+ separates implemented adapters from live qualification; Codex Cloud dispatch
41
+ remains disabled until its repository binding can be verified.
42
+
43
+ Gallivant runs on macOS and Linux. Its coordinator still needs to stay online,
44
+ even when the agent runs remotely. Setup, examples and operating boundaries:
45
+ https://github.com/uchibeke/gallivant