gnhf 0.1.7 → 0.1.8
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 +11 -6
- package/dist/cli.mjs +6 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,6 +39,8 @@
|
|
|
39
39
|
<img src="docs/splash.png" alt="gnhf — Good Night, Have Fun" width="800">
|
|
40
40
|
</p>
|
|
41
41
|
|
|
42
|
+
Never wake up empty-handed.
|
|
43
|
+
|
|
42
44
|
gnhf is a [ralph](https://ghuntley.com/ralph/), [autoresearch](https://github.com/karpathy/autoresearch)-style orchestrator that keeps your agents running while you sleep — each iteration makes one small, committed, documented change towards an objective.
|
|
43
45
|
You wake up to a branch full of clean work and a log of everything that happened.
|
|
44
46
|
|
|
@@ -80,10 +82,6 @@ npm run build
|
|
|
80
82
|
npm link
|
|
81
83
|
```
|
|
82
84
|
|
|
83
|
-
If you want to run `gnhf --agent rovodev`, install Atlassian's `acli` and authenticate it with Rovo Dev first.
|
|
84
|
-
|
|
85
|
-
If you want to run `gnhf --agent opencode`, install `opencode` and authenticate at least one provider first.
|
|
86
|
-
|
|
87
85
|
## How It Works
|
|
88
86
|
|
|
89
87
|
```
|
|
@@ -168,9 +166,16 @@ If the file does not exist yet, `gnhf` creates it on first run using the resolve
|
|
|
168
166
|
|
|
169
167
|
CLI flags override config file values. The iteration and token caps are runtime-only flags and are not persisted in `config.yml`.
|
|
170
168
|
|
|
171
|
-
|
|
169
|
+
## Agents
|
|
170
|
+
|
|
171
|
+
`gnhf` supports four agents:
|
|
172
172
|
|
|
173
|
-
|
|
173
|
+
| Agent | Flag | Requirements | Notes |
|
|
174
|
+
| ----------- | ------------------ | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
175
|
+
| Claude Code | `--agent claude` | Install Anthropic's `claude` CLI and sign in first. | `gnhf` invokes `claude` directly in non-interactive mode. |
|
|
176
|
+
| Codex | `--agent codex` | Install OpenAI's `codex` CLI and sign in first. | `gnhf` invokes `codex exec` directly in non-interactive mode. |
|
|
177
|
+
| Rovo Dev | `--agent rovodev` | Install Atlassian's `acli` and authenticate it with Rovo Dev first. | `gnhf` starts a local `acli rovodev serve --disable-session-token <port>` process automatically in the repo workspace. |
|
|
178
|
+
| OpenCode | `--agent opencode` | Install `opencode` and configure at least one usable model provider first. | `gnhf` starts a local `opencode serve --hostname 127.0.0.1 --port <port> --print-logs` process automatically, creates a per-run session, and applies a blanket allow rule so tool calls do not block on prompts. |
|
|
174
179
|
|
|
175
180
|
## Development
|
|
176
181
|
|
package/dist/cli.mjs
CHANGED
|
@@ -135,6 +135,7 @@ function resetHard(cwd) {
|
|
|
135
135
|
//#region src/core/agents/types.ts
|
|
136
136
|
const AGENT_OUTPUT_SCHEMA = {
|
|
137
137
|
type: "object",
|
|
138
|
+
additionalProperties: false,
|
|
138
139
|
properties: {
|
|
139
140
|
success: { type: "boolean" },
|
|
140
141
|
summary: { type: "string" },
|
|
@@ -156,6 +157,9 @@ const AGENT_OUTPUT_SCHEMA = {
|
|
|
156
157
|
};
|
|
157
158
|
//#endregion
|
|
158
159
|
//#region src/core/run.ts
|
|
160
|
+
function writeSchemaFile(schemaPath) {
|
|
161
|
+
writeFileSync(schemaPath, JSON.stringify(AGENT_OUTPUT_SCHEMA, null, 2), "utf-8");
|
|
162
|
+
}
|
|
159
163
|
function ensureRunMetadataIgnored(cwd) {
|
|
160
164
|
const excludePath = execFileSync("git", [
|
|
161
165
|
"rev-parse",
|
|
@@ -183,7 +187,7 @@ function setupRun(runId, prompt, baseCommit, cwd) {
|
|
|
183
187
|
const notesPath = join(runDir, "notes.md");
|
|
184
188
|
writeFileSync(notesPath, `# gnhf run: ${runId}\n\nObjective: ${prompt}\n\n## Iteration Log\n`, "utf-8");
|
|
185
189
|
const schemaPath = join(runDir, "output-schema.json");
|
|
186
|
-
|
|
190
|
+
writeSchemaFile(schemaPath);
|
|
187
191
|
const baseCommitPath = join(runDir, "base-commit");
|
|
188
192
|
const hasStoredBaseCommit = existsSync(baseCommitPath);
|
|
189
193
|
const resolvedBaseCommit = hasStoredBaseCommit ? readFileSync(baseCommitPath, "utf-8").trim() : baseCommit;
|
|
@@ -204,6 +208,7 @@ function resumeRun(runId, cwd) {
|
|
|
204
208
|
const promptPath = join(runDir, "prompt.md");
|
|
205
209
|
const notesPath = join(runDir, "notes.md");
|
|
206
210
|
const schemaPath = join(runDir, "output-schema.json");
|
|
211
|
+
writeSchemaFile(schemaPath);
|
|
207
212
|
const baseCommitPath = join(runDir, "base-commit");
|
|
208
213
|
return {
|
|
209
214
|
runId,
|