@astrosheep/keiyaku 0.1.87 → 1.0.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 +74 -65
- package/build/.tsbuildinfo +1 -1
- package/build/agents/effective-policy.js +32 -0
- package/build/agents/harness/event-channel.js +178 -0
- package/build/agents/harness/execution-handle.js +117 -0
- package/build/agents/harness/index.js +622 -0
- package/build/agents/harness/pump.js +152 -0
- package/build/agents/harness/runtime.js +68 -0
- package/build/agents/index.js +104 -213
- package/build/agents/opencode-sdk.js +12 -18
- package/build/agents/providers/claude-agent-sdk.js +529 -0
- package/build/agents/providers/codex-app-server.js +656 -0
- package/build/agents/providers/codex-sdk.js +193 -0
- package/build/agents/providers/opencode-sdk.js +257 -0
- package/build/agents/providers/pi.js +345 -0
- package/build/agents/selector.js +15 -6
- package/build/agents/session.js +29 -0
- package/build/agents/types.js +5 -11
- package/build/cli/commands/akuma.js +79 -0
- package/build/cli/completion.js +71 -0
- package/build/cli/draft-artifact.js +50 -0
- package/build/cli/flags.js +96 -0
- package/build/cli/help.js +119 -0
- package/build/cli/index.js +204 -912
- package/build/cli/parse.js +280 -0
- package/build/cli/render/arc.js +63 -0
- package/build/{responses/tool-errors.js → cli/render/errors.js} +15 -16
- package/build/cli/render/format.js +199 -0
- package/build/cli/render/misc.js +40 -0
- package/build/cli/render/petition.js +32 -0
- package/build/{responses → cli/render}/response-style.js +4 -4
- package/build/cli/render/shared.js +122 -0
- package/build/cli/render/status.js +69 -0
- package/build/cli/render/summon.js +17 -0
- package/build/cli/render/tell.js +11 -0
- package/build/cli/skills-install.js +237 -0
- package/build/cli/subagent-guard.js +6 -3
- package/build/config/akuma-loader.js +268 -0
- package/build/config/env-keys.js +0 -10
- package/build/config/{schema.js → env.js} +117 -23
- package/build/config/settings.js +137 -260
- package/build/core/amend.js +120 -0
- package/build/core/arc.js +225 -0
- package/build/core/atomic-publish.js +64 -0
- package/build/core/bind.js +281 -0
- package/build/core/claim.js +360 -0
- package/build/core/command-io.js +174 -0
- package/build/core/context.js +108 -0
- package/build/core/contract.js +14 -0
- package/build/core/draft.js +82 -0
- package/build/core/entry.js +203 -0
- package/build/core/forfeit.js +60 -0
- package/build/core/hints.js +108 -0
- package/build/core/ids.js +70 -0
- package/build/core/ledger.js +117 -0
- package/build/core/log.js +24 -0
- package/build/{protocol → core}/markdown/parser.js +68 -0
- package/build/{protocol → core}/markdown/sections.js +2 -28
- package/build/core/markdown/titles.js +9 -0
- package/build/{tools/petition/claim-gates.js → core/petition-claim-gates.js} +43 -29
- package/build/core/petition-claim.js +116 -0
- package/build/core/petition-forfeit.js +39 -0
- package/build/{tools/round/head-guard.js → core/petition-head-guard.js} +2 -2
- package/build/core/petition-run.js +81 -0
- package/build/core/petition.js +96 -0
- package/build/core/places.js +82 -0
- package/build/core/projection-core.js +541 -0
- package/build/core/projection-mint.js +79 -0
- package/build/core/projection-status.js +179 -0
- package/build/core/projection-wake.js +252 -0
- package/build/core/queue.js +73 -0
- package/build/core/ref-log.js +94 -0
- package/build/core/registry.js +96 -0
- package/build/core/render.js +326 -0
- package/build/core/renew.js +195 -0
- package/build/core/scope.js +163 -0
- package/build/core/seal.js +195 -0
- package/build/core/status.js +476 -0
- package/build/{tools/summon/persist.js → core/summon-persist.js} +10 -9
- package/build/core/summon.js +377 -0
- package/build/{protocol/response-history.js → core/transcripts.js} +83 -39
- package/build/core/verdict.js +96 -0
- package/build/core/worktree-path.js +134 -0
- package/build/flow-error.js +80 -4
- package/build/generated/version.js +1 -1
- package/build/git/branches.js +8 -9
- package/build/git/core.js +1 -1
- package/build/git/diff/pathspec.js +2 -3
- package/build/git/diff/preview.js +7 -2
- package/build/git/diff/read.js +4 -3
- package/build/git/staging.js +1 -1
- package/build/index.js +12 -6
- package/build/keiyaku.js +17 -13
- package/build/telemetry/debug-log.js +1 -1
- package/package.json +16 -9
- package/skills/keiyaku/SKILL.md +16 -13
- package/build/agents/claude-agent-sdk-exec.js +0 -352
- package/build/agents/codex-cli-exec.js +0 -237
- package/build/agents/codex-sdk-exec.js +0 -291
- package/build/agents/gemini-cli-core-exec.js +0 -499
- package/build/agents/opencode-exec.js +0 -297
- package/build/agents/process-runner.js +0 -239
- package/build/agents/progress-reporter.js +0 -137
- package/build/agents/round-runner.js +0 -53
- package/build/config/apply-argument-descriptions.js +0 -16
- package/build/config/architect-hints.js +0 -374
- package/build/config/base-rules.js +0 -23
- package/build/config/config.js +0 -50
- package/build/config/dotenv.js +0 -61
- package/build/config/keiyaku-home.js +0 -9
- package/build/config/path-utils.js +0 -11
- package/build/config/render-template.js +0 -8
- package/build/git/diff/filter.js +0 -67
- package/build/git/keiyaku-state.js +0 -58
- package/build/git/snapshot.js +0 -41
- package/build/git/stash.js +0 -62
- package/build/protocol/bind-draft.js +0 -195
- package/build/protocol/draft-artifacts.js +0 -99
- package/build/protocol/file-guards.js +0 -24
- package/build/protocol/keiyaku-draft.js +0 -168
- package/build/protocol/ledger.js +0 -374
- package/build/protocol/markdown/index.js +0 -14
- package/build/protocol/markdown/normalization.js +0 -71
- package/build/protocol/markdown/render.js +0 -68
- package/build/protocol/oath.js +0 -36
- package/build/protocol/render-keiyaku.js +0 -37
- package/build/protocol/review.js +0 -1
- package/build/protocol/status-previews.js +0 -68
- package/build/responses/responses.js +0 -515
- package/build/tools/amend/index.js +0 -18
- package/build/tools/amend/run.js +0 -44
- package/build/tools/bind/index.js +0 -44
- package/build/tools/bind/run.js +0 -237
- package/build/tools/contracts.js +0 -1
- package/build/tools/create-handler.js +0 -31
- package/build/tools/help.js +0 -9
- package/build/tools/petition/claim.js +0 -174
- package/build/tools/petition/forfeit.js +0 -100
- package/build/tools/petition/index.js +0 -83
- package/build/tools/petition/run.js +0 -66
- package/build/tools/round/guidance.js +0 -7
- package/build/tools/round/prompt.js +0 -70
- package/build/tools/round/report.js +0 -153
- package/build/tools/round/worktree.js +0 -55
- package/build/tools/round-close/index.js +0 -19
- package/build/tools/round-close/run.js +0 -98
- package/build/tools/round-open/index.js +0 -20
- package/build/tools/round-open/run.js +0 -77
- package/build/tools/schema.js +0 -69
- package/build/tools/status/index.js +0 -16
- package/build/tools/status/read.js +0 -155
- package/build/tools/summon/index.js +0 -27
- package/build/tools/summon/run.js +0 -80
- /package/build/{config/toml.js → agents/harness/events.js} +0 -0
- /package/build/{git/diff/contracts.js → cli/render/types.js} +0 -0
- /package/build/{protocol/bind-input.js → cli/types.js} +0 -0
- /package/build/{protocol → core}/markdown/lex.js +0 -0
- /package/build/{protocol → core}/markdown/types.js +0 -0
package/README.md
CHANGED
|
@@ -13,20 +13,20 @@ npm install -g @astrosheep/keiyaku
|
|
|
13
13
|
Missing any of these? Don't come crying.
|
|
14
14
|
|
|
15
15
|
- **Git repo.** Clean worktree. Dirty = refused.
|
|
16
|
-
- **Supported providers.** `codex-
|
|
16
|
+
- **Supported providers.** `codex-sdk`, `codex-app-server`, `claude-agent-sdk`, `opencode-sdk`, and `pi`.
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
20
|
## Setup
|
|
21
21
|
|
|
22
|
-
Open a git repo. Run `keiyaku guide` and `keiyaku
|
|
22
|
+
Open a git repo. Run `keiyaku guide` and `keiyaku akuma list`. Then use `keiyaku <command> --help` for exact command formats.
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
26
26
|
## Flow
|
|
27
27
|
|
|
28
28
|
```
|
|
29
|
-
bind →
|
|
29
|
+
bind → arc → [summon/ask | amend | delivery work] → arc | renew | petition
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
---
|
|
@@ -51,11 +51,11 @@ keiyaku resume .keiyaku/response/previous.md "Continue from here"
|
|
|
51
51
|
|
|
52
52
|
---
|
|
53
53
|
|
|
54
|
-
**`
|
|
54
|
+
**`akuma list` / `akuma show <name>`** — Inspect available helpers before choosing `keiyaku summon NAME`.
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
keiyaku
|
|
58
|
-
keiyaku
|
|
57
|
+
keiyaku akuma list
|
|
58
|
+
keiyaku akuma show akuma-codex
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
---
|
|
@@ -76,7 +76,7 @@ bind:
|
|
|
76
76
|
|
|
77
77
|
---
|
|
78
78
|
|
|
79
|
-
**`
|
|
79
|
+
**`arc`** — Frame the next delivery arc. An existing open arc is sealed first.
|
|
80
80
|
|
|
81
81
|
```
|
|
82
82
|
# Retry backoff
|
|
@@ -85,19 +85,7 @@ bind:
|
|
|
85
85
|
Implement retries with exponential backoff.
|
|
86
86
|
|
|
87
87
|
## Brief
|
|
88
|
-
Keep the public API unchanged. Commit the delivery work before
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
**`round close`** — Record a completed round from git commits.
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
## Commits
|
|
97
|
-
- abc1234
|
|
98
|
-
|
|
99
|
-
## Report
|
|
100
|
-
Retry tests pass and backoff is now 2x.
|
|
88
|
+
Keep the public API unchanged. Commit the delivery work before sealing the arc.
|
|
101
89
|
```
|
|
102
90
|
|
|
103
91
|
---
|
|
@@ -112,7 +100,7 @@ Oath required unless you explicitly bypass gates. Configured verification and re
|
|
|
112
100
|
|
|
113
101
|
**`status`** — Current state and what's blocking you.
|
|
114
102
|
|
|
115
|
-
**`keiyaku guide`** —
|
|
103
|
+
**`keiyaku guide`** — Workflow guide.
|
|
116
104
|
|
|
117
105
|
---
|
|
118
106
|
|
|
@@ -133,63 +121,84 @@ Don't want these tracked:
|
|
|
133
121
|
|
|
134
122
|
---
|
|
135
123
|
|
|
136
|
-
##
|
|
124
|
+
## Configuration
|
|
125
|
+
|
|
126
|
+
Keiyaku works with its builtin `akuma-codex` and `akuma-claude` profiles without a settings file. Inspect the effective catalog before launching an Akuma:
|
|
137
127
|
|
|
138
128
|
```bash
|
|
139
|
-
keiyaku
|
|
129
|
+
keiyaku akuma list
|
|
130
|
+
keiyaku akuma show akuma-codex
|
|
140
131
|
```
|
|
141
132
|
|
|
142
|
-
|
|
133
|
+
### Akuma profiles
|
|
134
|
+
|
|
135
|
+
Akuma profiles are Markdown files. The filename is the profile name, YAML frontmatter configures the provider, and the Markdown body supplies the Akuma instructions.
|
|
136
|
+
|
|
137
|
+
| Layer | Location | Precedence |
|
|
138
|
+
|---|---|---|
|
|
139
|
+
| Builtin | packaged with Keiyaku | lowest |
|
|
140
|
+
| User | `<KEIYAKU_HOME>/akuma/<name>.md` | replaces the same builtin name |
|
|
141
|
+
| Project | `.keiyaku/akuma/<name>.md` | highest |
|
|
142
|
+
|
|
143
|
+
`KEIYAKU_HOME` defaults to `~/.keiyaku`. A higher layer replaces the whole file; layers are not field-merged.
|
|
144
|
+
|
|
145
|
+
Minimal project profile:
|
|
146
|
+
|
|
147
|
+
```markdown
|
|
148
|
+
---
|
|
149
|
+
provider: codex-sdk
|
|
150
|
+
description: Repository implementation agent
|
|
151
|
+
model: gpt-5.4
|
|
152
|
+
effort: high
|
|
153
|
+
accessPolicy: write
|
|
154
|
+
networkPolicy: disabled
|
|
155
|
+
webSearchPolicy: disabled
|
|
156
|
+
threadOptions.sandboxMode: workspace-write
|
|
157
|
+
---
|
|
158
|
+
Follow the repository instructions, make scoped changes, and run relevant tests.
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Provider fields:
|
|
162
|
+
|
|
163
|
+
| Provider | Supported profile fields |
|
|
164
|
+
|---|---|
|
|
165
|
+
| `codex-sdk` | `description`, `model`, `profile`, `executable`, `effort`, `accessPolicy`, `networkPolicy`, `webSearchPolicy`, `threadOptions.*`, `config.*` |
|
|
166
|
+
| `codex-app-server` | `description`, `model`, `profile`, `executable`, `config.*` |
|
|
167
|
+
| `claude-agent-sdk` | `description`, `model`, `executable`, `effort`, `permissionMode`, `settingSources` |
|
|
168
|
+
| `opencode-sdk` | `description`, `model`, `executable` |
|
|
169
|
+
| `pi` | `description`, `model` |
|
|
170
|
+
|
|
171
|
+
For `threadOptions.*`, JSON values such as arrays and objects are accepted. Keiyaku owns `workingDirectory` and `skipGitRepoCheck`, so profiles cannot set those paths.
|
|
172
|
+
|
|
173
|
+
### Settings
|
|
174
|
+
|
|
175
|
+
Settings select roles and workflow knobs; provider definitions do not belong in settings. Keiyaku loads user settings first and overlays project settings:
|
|
176
|
+
|
|
177
|
+
- User: `<KEIYAKU_HOME>/settings.json`
|
|
178
|
+
- Project: `.keiyaku/settings.json`
|
|
143
179
|
|
|
144
180
|
```json
|
|
145
181
|
{
|
|
146
|
-
"
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
"
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
"codex": {
|
|
155
|
-
"provider": "codex-sdk",
|
|
156
|
-
"executable": "codex",
|
|
157
|
-
"description": "Default Codex-side Zako.",
|
|
158
|
-
"config": {
|
|
159
|
-
"developer_instructions": "Adapter-level instructions appended to Codex sessions."
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
"gemini": {
|
|
163
|
-
"provider": "gemini-cli-core",
|
|
164
|
-
"model": "gemini-2.5-pro",
|
|
165
|
-
"description": "Gemini-side Zako for preview and synthesis.",
|
|
166
|
-
"systemPromptFile": ".keiyaku/gemini-system.md"
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
"default": "codex",
|
|
170
|
-
"reviewer": "codex"
|
|
182
|
+
"default": "akuma-codex",
|
|
183
|
+
"reviewer": "akuma-claude",
|
|
184
|
+
"defaultBranch": "main",
|
|
185
|
+
"gate": {
|
|
186
|
+
"commands": [
|
|
187
|
+
{ "label": "tests", "command": "npm", "args": ["test"] }
|
|
188
|
+
]
|
|
189
|
+
}
|
|
171
190
|
}
|
|
172
191
|
```
|
|
173
192
|
|
|
174
|
-
|
|
175
|
-
- `settingSources: ["project"]`
|
|
176
|
-
- `permissionMode: "bypassPermissions"`
|
|
177
|
-
- `keiyaku resume RESPONSE_PATH` resumes via persisted provider session metadata
|
|
178
|
-
|
|
179
|
-
Codex SDK notes:
|
|
180
|
-
- `config` is passed through to Codex. Use `developer_instructions` for adapter-level instructions.
|
|
181
|
-
- `model_instructions_file` is also accepted through `config`, but it replaces Codex built-in instructions.
|
|
193
|
+
The only settings keys are `default`, `reviewer`, `defaultBranch`, and `gate`. The former `agents` key is invalid; define profiles in an `akuma/` directory instead. `keiyaku status` reports invalid settings without hiding the rest of the board.
|
|
182
194
|
|
|
183
|
-
|
|
184
|
-
- `systemPromptFile` is passed to Gemini CLI core as `GEMINI_SYSTEM_MD`, which replaces Gemini's base system prompt.
|
|
195
|
+
### Environment
|
|
185
196
|
|
|
186
|
-
|
|
197
|
+
```bash
|
|
198
|
+
keiyaku dump-env
|
|
199
|
+
```
|
|
187
200
|
|
|
188
|
-
|
|
189
|
-
|----------|---------|--|
|
|
190
|
-
| `KEIYAKU_SUBAGENT_EXEC_TIMEOUT_MS` | — | Execution timeout |
|
|
191
|
-
| `KEIYAKU_SUBAGENT_EXEC_IDLE_TIMEOUT_MS` | — | Idle timeout |
|
|
192
|
-
| `KEIYAKU_FAKE_SUBAGENT` | `0` | `1` = test stub |
|
|
201
|
+
Keiyaku loads `<KEIYAKU_HOME>/.env`, then `.keiyaku/.env`; values already present in the process environment take precedence. `dump-env` is the authoritative template for supported keys and defaults.
|
|
193
202
|
|
|
194
203
|
---
|
|
195
204
|
|