jeo-code 0.1.0 → 0.4.4
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.ja.md +160 -0
- package/README.ko.md +160 -0
- package/README.md +115 -297
- package/README.zh.md +160 -0
- package/package.json +11 -6
- package/scripts/install.sh +28 -28
- package/scripts/uninstall.sh +17 -15
- package/src/AGENTS.md +50 -0
- package/src/agent/AGENTS.md +49 -0
- package/src/agent/bash-fixups.ts +103 -0
- package/src/agent/compaction.ts +410 -19
- package/src/agent/config-schema.ts +119 -5
- package/src/agent/context-files.ts +314 -17
- package/src/agent/dev/AGENTS.md +36 -0
- package/src/agent/dev/advanced-analyzer.ts +12 -0
- package/src/agent/dev/evolution-bridge.ts +82 -0
- package/src/agent/dev/evolution-logger.ts +41 -0
- package/src/agent/dev/self-analysis.ts +64 -0
- package/src/agent/dev/self-improve.ts +24 -0
- package/src/agent/dev/spec-automation.ts +49 -0
- package/src/agent/engine.ts +804 -54
- package/src/agent/hooks.ts +273 -0
- package/src/agent/loop.ts +21 -1
- package/src/agent/memory.ts +201 -0
- package/src/agent/model-recency.ts +32 -0
- package/src/agent/output-minimizer.ts +108 -0
- package/src/agent/output-util.ts +64 -0
- package/src/agent/plan.ts +187 -0
- package/src/agent/seed.ts +52 -0
- package/src/agent/session.ts +235 -21
- package/src/agent/state.ts +286 -39
- package/src/agent/step-budget.ts +232 -0
- package/src/agent/subagents.ts +223 -26
- package/src/agent/task-tool.ts +272 -0
- package/src/agent/todo-tool.ts +87 -0
- package/src/agent/tokenizer.ts +117 -0
- package/src/agent/tool-registry.ts +54 -0
- package/src/agent/tools.ts +562 -103
- package/src/agent/web-search.ts +538 -0
- package/src/ai/AGENTS.md +44 -0
- package/src/ai/index.ts +1 -0
- package/src/ai/model-catalog-compat.ts +3 -1
- package/src/ai/model-catalog.ts +74 -9
- package/src/ai/model-discovery.ts +215 -17
- package/src/ai/model-manager.ts +346 -32
- package/src/ai/model-picker.ts +1 -1
- package/src/ai/model-registry.ts +4 -2
- package/src/ai/pricing.ts +84 -0
- package/src/ai/provider-registry.ts +23 -0
- package/src/ai/provider-status.ts +60 -16
- package/src/ai/providers/AGENTS.md +42 -0
- package/src/ai/providers/anthropic.ts +250 -31
- package/src/ai/providers/antigravity.ts +219 -0
- package/src/ai/providers/errors.ts +15 -1
- package/src/ai/providers/gemini.ts +196 -13
- package/src/ai/providers/ollama.ts +37 -7
- package/src/ai/providers/openai-responses.ts +173 -0
- package/src/ai/providers/openai.ts +64 -12
- package/src/ai/sse.ts +4 -1
- package/src/ai/types.ts +18 -1
- package/src/auth/AGENTS.md +41 -0
- package/src/auth/callback-server.ts +6 -1
- package/src/auth/flows/AGENTS.md +32 -0
- package/src/auth/flows/antigravity.ts +151 -0
- package/src/auth/flows/google-project.ts +190 -0
- package/src/auth/flows/google.ts +39 -18
- package/src/auth/flows/index.ts +15 -5
- package/src/auth/flows/openai.ts +2 -2
- package/src/auth/oauth.ts +8 -0
- package/src/auth/refresh.ts +44 -27
- package/src/auth/storage.ts +149 -26
- package/src/auth/types.ts +1 -1
- package/src/autopilot.ts +362 -0
- package/src/bun-imports.d.ts +4 -0
- package/src/cli/AGENTS.md +39 -0
- package/src/cli/runner.ts +148 -14
- package/src/cli.ts +13 -4
- package/src/commands/AGENTS.md +40 -0
- package/src/commands/approve.ts +62 -3
- package/src/commands/auth.ts +167 -25
- package/src/commands/chat.ts +37 -8
- package/src/commands/deep-interview.ts +633 -175
- package/src/commands/doctor.ts +84 -37
- package/src/commands/evolve-core.ts +18 -0
- package/src/commands/evolve.ts +2 -1
- package/src/commands/export.ts +176 -0
- package/src/commands/gjc.ts +52 -0
- package/src/commands/launch.ts +3549 -240
- package/src/commands/mcp.ts +3 -3
- package/src/commands/ooo-seed.ts +19 -0
- package/src/commands/ralplan.ts +253 -35
- package/src/commands/resume.ts +1 -1
- package/src/commands/session.ts +183 -0
- package/src/commands/setup-helpers.ts +10 -3
- package/src/commands/setup.ts +57 -16
- package/src/commands/skills.ts +78 -18
- package/src/commands/state.ts +198 -0
- package/src/commands/status.ts +84 -0
- package/src/commands/team.ts +340 -212
- package/src/commands/ultragoal.ts +122 -61
- package/src/commands/update.ts +244 -0
- package/src/ledger.ts +270 -0
- package/src/mcp/AGENTS.md +38 -0
- package/src/mcp/server.ts +115 -14
- package/src/mcp/tools.ts +42 -22
- package/src/md-modules.d.ts +4 -0
- package/src/prompts/AGENTS.md +41 -0
- package/src/prompts/agents/AGENTS.md +35 -0
- package/src/prompts/agents/architect.md +35 -0
- package/src/prompts/agents/critic.md +37 -0
- package/src/prompts/agents/executor.md +36 -0
- package/src/prompts/agents/planner.md +37 -0
- package/src/prompts/skills/AGENTS.md +36 -0
- package/src/prompts/skills/deep-dive/AGENTS.md +31 -0
- package/src/prompts/skills/deep-dive/SKILL.md +13 -0
- package/src/prompts/skills/deep-interview/AGENTS.md +31 -0
- package/src/prompts/skills/deep-interview/SKILL.md +12 -0
- package/src/prompts/skills/gjc/AGENTS.md +31 -0
- package/src/prompts/skills/gjc/SKILL.md +15 -0
- package/src/prompts/skills/ralplan/AGENTS.md +31 -0
- package/src/prompts/skills/ralplan/SKILL.md +11 -0
- package/src/prompts/skills/team/AGENTS.md +31 -0
- package/src/prompts/skills/team/SKILL.md +11 -0
- package/src/prompts/skills/ultragoal/AGENTS.md +31 -0
- package/src/prompts/skills/ultragoal/SKILL.md +11 -0
- package/src/skills/AGENTS.md +38 -0
- package/src/skills/catalog.ts +565 -31
- package/src/tui/AGENTS.md +43 -0
- package/src/tui/app.ts +1181 -92
- package/src/tui/components/AGENTS.md +42 -0
- package/src/tui/components/ascii-art.ts +257 -15
- package/src/tui/components/autocomplete.ts +98 -16
- package/src/tui/components/autopilot-status.ts +65 -0
- package/src/tui/components/category-index.ts +49 -0
- package/src/tui/components/code-view.ts +54 -11
- package/src/tui/components/color.ts +171 -2
- package/src/tui/components/config-panel.ts +82 -15
- package/src/tui/components/duration.ts +38 -0
- package/src/tui/components/evolution.ts +3 -3
- package/src/tui/components/footer.ts +91 -42
- package/src/tui/components/forge.ts +426 -31
- package/src/tui/components/hints.ts +54 -0
- package/src/tui/components/hud.ts +73 -0
- package/src/tui/components/index.ts +4 -0
- package/src/tui/components/input-box.ts +150 -0
- package/src/tui/components/layout.ts +11 -3
- package/src/tui/components/live-model-picker.ts +108 -0
- package/src/tui/components/markdown-table.ts +140 -0
- package/src/tui/components/markdown-text.ts +97 -0
- package/src/tui/components/meter.ts +4 -1
- package/src/tui/components/model-picker.ts +3 -2
- package/src/tui/components/provider-picker.ts +3 -2
- package/src/tui/components/section.ts +70 -0
- package/src/tui/components/select-list.ts +40 -10
- package/src/tui/components/skill-picker.ts +25 -0
- package/src/tui/components/slash.ts +244 -21
- package/src/tui/components/status.ts +272 -11
- package/src/tui/components/step-timeline.ts +218 -0
- package/src/tui/components/stream.ts +26 -9
- package/src/tui/components/themes.ts +212 -6
- package/src/tui/components/todo-card.ts +47 -0
- package/src/tui/components/tool-list.ts +58 -12
- package/src/tui/components/transcript.ts +120 -0
- package/src/tui/components/update-box.ts +31 -0
- package/src/tui/components/welcome.ts +162 -0
- package/src/tui/components/width.ts +163 -0
- package/src/tui/monitoring/AGENTS.md +31 -0
- package/src/tui/monitoring/hud-view.ts +55 -0
- package/src/tui/renderer.ts +112 -3
- package/src/tui/terminal.ts +40 -33
- package/src/util/AGENTS.md +39 -0
- package/src/util/clipboard-image.ts +118 -0
- package/src/util/env.ts +12 -0
- package/src/util/provider-error.ts +78 -0
- package/src/util/retry.ts +91 -6
- package/src/util/update-check.ts +64 -0
- package/src/commands/models.ts +0 -104
package/README.md
CHANGED
|
@@ -1,342 +1,160 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
[](https://opensource.org/licenses/MIT)
|
|
5
|
-
[]()
|
|
6
|
-
[]()
|
|
7
|
-
|
|
8
|
-
> An interactive AI coding agent **and** a disciplined spec-first pipeline — one
|
|
9
|
-
> lean, pure-TypeScript CLI on Bun.
|
|
10
|
-
`jeo-code` is a single-package coding agent (binary `joc`) that you can use two ways:
|
|
11
|
-
|
|
12
|
-
- **Interactive agent** — run bare `joc` to chat with an agent that reads, writes,
|
|
13
|
-
edits, and runs commands in a loop until your request is done (with a live TUI).
|
|
14
|
-
- **Spec-first pipeline** — `deep-interview → ralplan → team → ultragoal`: crystallize
|
|
15
|
-
requirements before any code changes, plan, execute, then verify against acceptance criteria.
|
|
16
|
-
|
|
17
|
-
It re-implements the [`gajae-code`](https://github.com/Yeachan-Heo/gajae-code) (`gjc`)
|
|
18
|
-
workflow contract and adopts [`pi-mono`](https://github.com/badlogic/pi-mono) runtime
|
|
19
|
-
ergonomics (minimal tool loop, persistent sessions, compaction, project context) — with
|
|
20
|
-
**no native deps**: just Bun + TypeScript.
|
|
21
|
-
|
|
22
|
-
```text
|
|
23
|
-
joc → interactive coding agent (TUI: live tools + status footer)
|
|
24
|
-
|
|
25
|
-
joc deep-interview → joc ralplan → joc approve → joc team → joc ultragoal
|
|
26
|
-
(Socratic clarify) (blueprint) (gate) (execute) (verify)
|
|
27
|
-
│
|
|
28
|
-
[Mutation Lock] — file edits blocked until ambiguity ≤ 20%
|
|
29
|
-
```
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/hero.png" alt="jeo-code autonomous coding-agent hero illustration" width="100%" />
|
|
3
|
+
</p>
|
|
30
4
|
|
|
31
|
-
|
|
5
|
+
<h1 align="center">jeo-code (jeo)</h1>
|
|
32
6
|
|
|
33
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>Encode intention. Decode software.</strong><br />
|
|
9
|
+
A Bun-based AI coding-agent CLI — interviews, reviewed plans, gated execution, honest verification.
|
|
10
|
+
</p>
|
|
34
11
|
|
|
35
|
-
|
|
36
|
-
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://github.com/akillness/jeo-code"><img alt="license" src="https://img.shields.io/badge/license-MIT-green?style=flat-square"></a>
|
|
14
|
+
<img alt="runtime" src="https://img.shields.io/badge/runtime-Bun%20%E2%89%A5%201.3.14-f9f1e1?style=flat-square&logo=bun&logoColor=black">
|
|
15
|
+
<img alt="zero native deps" src="https://img.shields.io/badge/native%20deps-0-blue?style=flat-square">
|
|
16
|
+
</p>
|
|
37
17
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
bun install -g github:akillness/jeo-code # GitHub shorthand
|
|
42
|
-
bun install -g git+https://github.com/akillness/jeo-code.git # explicit Git URL
|
|
43
|
-
# …or bootstrap Bun + install from the Git URL in one shot:
|
|
44
|
-
curl -fsSL https://raw.githubusercontent.com/akillness/jeo-code/main/scripts/install.sh | sh
|
|
45
|
-
|
|
46
|
-
# 2. Configure a provider + default model (interactive)
|
|
47
|
-
joc setup
|
|
48
|
-
# …or go fully local with Ollama, no key:
|
|
49
|
-
ollama pull qwen2.5:0.5b
|
|
50
|
-
export JOC_DEFAULT_MODEL=ollama/qwen2.5:0.5b
|
|
18
|
+
<p align="center">
|
|
19
|
+
<img src="assets/character.png" alt="jeo-code character mascot" width="320" />
|
|
20
|
+
</p>
|
|
51
21
|
|
|
52
|
-
|
|
53
|
-
|
|
22
|
+
<p align="center">
|
|
23
|
+
<b>English</b> ·
|
|
24
|
+
<a href="README.ko.md">한국어</a> ·
|
|
25
|
+
<a href="README.ja.md">日本語</a> ·
|
|
26
|
+
<a href="README.zh.md">中文</a>
|
|
27
|
+
</p>
|
|
54
28
|
|
|
55
|
-
|
|
56
|
-
joc # interactive agent in the current checkout
|
|
57
|
-
joc --tmux # create/attach a joc-managed tmux session
|
|
58
|
-
joc --tmux --worktree ../joc-feature # isolate work in a dedicated git worktree
|
|
59
|
-
joc "add a /health route to server.ts and run the tests" # one-shot request
|
|
60
|
-
```
|
|
29
|
+
Run `jeo` inside a repository and it reads files, edits them, runs commands, and drives the task to completion — streaming every step live in an inline, scrollback-friendly TUI.
|
|
61
30
|
|
|
62
|
-
|
|
31
|
+
## Highlights
|
|
63
32
|
|
|
64
|
-
|
|
33
|
+
- **Multi-provider, one loop** — Anthropic / OpenAI (+Codex) / Gemini / Antigravity / Ollama behind a uniform JSON tool loop. OAuth login from the input box (`/provider login`), every model pick persists as the new default.
|
|
34
|
+
- **Edit integrity** — read output carries content anchors (`42ab|`); anchored edits are verified against the current file, re-mapped when lines shifted, and rejected with fresh content instead of corrupting.
|
|
35
|
+
- **Self-correcting verification loop** — configure a post-edit hook (tsc / eslint / tests) and the agent *sees* the diagnostics and fixes them in-loop; a red hook blocks `done` until resolved.
|
|
36
|
+
- **Real gates, no theater** — `ralplan` consensus is a repo-grounded critic subagent whose `[OKAY]` verdict is persisted and *required* by `jeo approve`; `ultragoal` reports honestly (a suite run is a global signal, never fabricated per-criterion passes).
|
|
37
|
+
- **Crash-durable, local-first** — all state under `.jeo/` with atomic writes, cross-process run locks, failed-task markers with partial-edit warnings on resume.
|
|
38
|
+
- **Dynamic step budget** — turns extend while the tool window shows novel progress and consolidate gracefully when stalled; subagents keep exact step contracts.
|
|
39
|
+
- **Inline TUI** — completed work flushes into real scrollback (tmux wheel works mid-turn), the normal query input box stays visible and editable while the agent runs, Ctrl+O toggles full detail, themes, clipboard image paste (Ctrl+V), CJK/emoji-safe width math.
|
|
65
40
|
|
|
66
|
-
##
|
|
41
|
+
## Install
|
|
67
42
|
|
|
68
|
-
|
|
69
|
-
`joc` binary in `~/.bun/bin`. The installer also drops a compatibility symlink at
|
|
70
|
-
`~/.local/bin/joc` and auto-installs Bun (enforcing the `1.3.14` floor) when it is missing.
|
|
43
|
+
Requires Bun `1.3.14+`.
|
|
71
44
|
|
|
72
45
|
```bash
|
|
73
|
-
bun install -g jeo-code
|
|
74
|
-
|
|
75
|
-
bun install -g git+https://github.com/akillness/jeo-code.git # explicit Git URL
|
|
76
|
-
sh scripts/install.sh --repo https://github.com/akillness/jeo-code.git
|
|
77
|
-
sh scripts/install.sh --ref v0.1.0 # global install of a specific tag
|
|
78
|
-
sh scripts/install.sh --binary # compile a standalone binary (no bun at runtime)
|
|
79
|
-
sh scripts/uninstall.sh [--purge] # remove the bin + bun registry entry (--purge also wipes ~/.joc/)
|
|
46
|
+
bun install -g jeo-code
|
|
47
|
+
jeo --version
|
|
80
48
|
```
|
|
81
49
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
`joc` does **not** mutate your npm registry by default. Use `--registry` for a one-shot
|
|
85
|
-
Bun install, and add `--persist-registry` only when you intentionally want the installer
|
|
86
|
-
to run `npm config set ...`.
|
|
50
|
+
## Quick start
|
|
87
51
|
|
|
88
52
|
```bash
|
|
89
|
-
#
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
# Persist globally via npm config (official registry restore / mirror / private)
|
|
95
|
-
sh scripts/install.sh --npm --registry https://registry.npmjs.org/ --persist-registry
|
|
96
|
-
sh scripts/install.sh --npm --registry https://npmjs.co.kr --persist-registry
|
|
97
|
-
sh scripts/install.sh --npm --registry https://your-company-registry.com --persist-registry
|
|
98
|
-
|
|
99
|
-
# Scope-only registry (writes @my-org:registry, not the global registry)
|
|
100
|
-
sh scripts/install.sh --npm --scope @my-org --registry https://your-company-registry.com --persist-registry
|
|
101
|
-
|
|
102
|
-
# Project-pinned .npmrc instead of global npm config
|
|
103
|
-
sh scripts/install.sh --npm --registry https://registry.npmjs.org/ --project-npmrc
|
|
104
|
-
|
|
105
|
-
# Inspect / reset npm registry config
|
|
106
|
-
sh scripts/install.sh --print-registry
|
|
107
|
-
sh scripts/install.sh --delete-registry
|
|
53
|
+
jeo # interactive agent in the current repo
|
|
54
|
+
jeo "Tidy the README and run the tests" # one-shot request
|
|
55
|
+
jeo doctor # config + live model connectivity check
|
|
56
|
+
jeo setup # API keys / OAuth / local models
|
|
57
|
+
jeo --tmux # run inside an isolated tmux session
|
|
108
58
|
```
|
|
109
59
|
|
|
110
|
-
|
|
60
|
+
## Slash commands
|
|
61
|
+
|
|
62
|
+
Inside the `jeo` REPL (Tab autocompletes; `/` opens the palette).
|
|
111
63
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
64
|
+
| Command | Description |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| `/model` · `/provider` | Pick model/provider; `/model` shows default/role badges, Ralph-style nested Set-as-role thinking choices, and the OpenAI Codex role preset in one flow |
|
|
67
|
+
| `/provider login <name>` · `/logout` | OAuth login/logout from the input box |
|
|
68
|
+
| `/agents [role]` · `/subagent` | Per-role (executor/planner/architect/critic) model · thinking · step config |
|
|
69
|
+
| `/thinking [level]` | Show/set default reasoning budget (minimal…xhigh) |
|
|
70
|
+
| `/fast [on|off|status]` | Toggle fast thinking mode when the active model advertises minimal/low reasoning |
|
|
71
|
+
| `/skill` · `$<skill> [intent]` | List/run workflow skills (`$team "task"` style) |
|
|
72
|
+
| `/view` · `/diff` · `/find` · `/search` | Code view, git diff, file/pattern search |
|
|
73
|
+
| `/new` · `/resume` · `/sessions` | Session management |
|
|
74
|
+
| `/history [n|all]` · `/export` | Reprint readable worked activity history into scrollback · transcript export |
|
|
75
|
+
| `/retry` · `/btw <q>` | Retry last request · side question without touching history |
|
|
76
|
+
| `/usage` · `/context` · `/compact` | Token usage, context breakdown, manual compaction |
|
|
77
|
+
| `/theme` · `/config` · `/help` | Theme, runtime config, help |
|
|
78
|
+
| `jeo autopilot status` | Ratchet status field with score direction, keep/revert counts, and next action |
|
|
79
|
+
|
|
80
|
+
## Spec-first workflow
|
|
81
|
+
|
|
82
|
+
Requirements → plan → approval → execution → verification, carried through `.jeo/state/` with **real, blocking gates** at every handoff:
|
|
116
83
|
|
|
117
84
|
```bash
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
85
|
+
jeo deep-interview "Describe what you want to build"
|
|
86
|
+
jeo ralplan
|
|
87
|
+
jeo approve <plan-path>
|
|
88
|
+
jeo team
|
|
89
|
+
jeo ultragoal
|
|
123
90
|
```
|
|
124
91
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
92
|
+
- **deep-interview** — Socratic loop with ambiguity scoring; freezes a seed only when criteria are concrete (vague-only criteria are refused) and the seed round-trips its own parser. A new idea never silently reuses a completed interview.
|
|
93
|
+
- **ralplan** — drafting passes plus a **repo-grounded critic subagent gate**: the critic reads the actual repository, must return `[OKAY]`/`[ITERATE]`/`[REJECT]`, and the verdict is persisted. Invalid plans (schema, unknown roles) are never marked complete.
|
|
94
|
+
- **approve** — validates the exact contract `team` executes (schema + roles) *and* requires the persisted `[OKAY]` consensus verdict.
|
|
95
|
+
- **team** — serial plan executor with a cross-process run lock, stale-plan reset, per-task subagent contracts, a parent-side mutation audit (a "completed" task with zero observed writes is flagged), and failed-task markers that warn about partial edits on resume.
|
|
96
|
+
- **ultragoal** — honest verification: the suite runs once as a global signal; criteria are recorded, never fabricated as individually passed.
|
|
129
97
|
|
|
130
|
-
|
|
98
|
+
## Verification hooks (self-correction)
|
|
131
99
|
|
|
132
|
-
|
|
133
|
-
a **Granular Access Token** with package publish/read-write permission.
|
|
134
|
-
2. If the npm account has 2FA enabled, the token must be allowed to **bypass 2FA for
|
|
135
|
-
publishing**. A read-only token or granular token without 2FA bypass fails with:
|
|
136
|
-
`Two-factor authentication or granular access token with bypass 2fa enabled is required`.
|
|
137
|
-
3. GitHub repo → Settings → Secrets and variables → Actions → set `NPM_TOKEN` to that token.
|
|
138
|
-
4. Re-run the `Publish npm package` workflow. After it succeeds, verify:
|
|
100
|
+
Enable hooks once globally (`"hooks": { "enabled": true }` in `~/.jeo/config.json`), then add a post-edit check per project; the agent sees failures and fixes them before it may call `done`:
|
|
139
101
|
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
102
|
+
```jsonc
|
|
103
|
+
// .jeo/hooks.json
|
|
104
|
+
{
|
|
105
|
+
"enabled": true,
|
|
106
|
+
"hooks": [
|
|
107
|
+
{ "event": "post-turn", "match": { "tool": "edit|write" }, "run": "bun x tsc --noEmit" }
|
|
108
|
+
]
|
|
109
|
+
}
|
|
144
110
|
```
|
|
145
111
|
|
|
146
|
-
|
|
147
|
-
take effect immediately; `scripts/install.sh --help` lists every mode.
|
|
112
|
+
Non-zero hook output is appended to the tool result the model reads (deduped per batch); a still-red hook triggers a `done` pushback naming the hook.
|
|
148
113
|
|
|
149
|
-
|
|
150
|
-
./install.sh # dev install from this clone (= scripts/install.sh --local)
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
Local dev without installing (from the repo root):
|
|
114
|
+
## Local models
|
|
154
115
|
|
|
155
116
|
```bash
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
117
|
+
ollama pull qwen2.5:0.5b
|
|
118
|
+
export JEO_DEFAULT_MODEL=ollama/qwen2.5:0.5b
|
|
119
|
+
jeo doctor && jeo
|
|
159
120
|
```
|
|
160
121
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
## Commands
|
|
122
|
+
## Configuration
|
|
164
123
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
| `joc` / `joc launch ["request"]` | Interactive coding agent (TUI REPL, one-shot, or piped). `--tmux` (create/attach a joc tmux session), `--worktree <path>` (run in a dedicated git worktree), `--resume [id]`, `--list`, `--no-tui`, `--no-session`. |
|
|
168
|
-
| `joc setup` | Interactive provider/model picker (API key / browser OAuth / local), with live model probing. |
|
|
169
|
-
| `joc auth [login\|logout\|refresh\|status] [provider] [--token <bearer>]` | Real OAuth (PKCE) login + token storage with auto-refresh. |
|
|
170
|
-
| `joc doctor [--strict] [--json]` | Probe provider connectivity, credentials, and OAuth expiry; report if the default model is reachable. Colorized status on a TTY. `--strict` exits non-zero when it isn't; `--json` emits a machine-readable report for CI. |
|
|
171
|
-
| `joc deep-interview "<idea>" [--auto]` | Socratic requirements interview; freezes a spec when ambiguity ≤ 20%. `--auto` runs non-interactively (CI/pipes). |
|
|
172
|
-
| `joc ralplan` | Planner/Architect/Critic blueprint from the frozen seed. |
|
|
173
|
-
| `joc approve <plan-path>` | Approve the active plan blueprint; gates execution (`team` refuses to run until approved). Idempotent. |
|
|
174
|
-
| `joc team` | Per-task executor loop (shared tool engine) against the plan. |
|
|
175
|
-
| `joc ultragoal` | Verify acceptance criteria and write a report. |
|
|
176
|
-
| `joc models [name] [--catalog] [--caps] [--check]` | Live model list from logged-in (OAuth/API) accounts + aliases & provider credentials. `--catalog` shows the capability catalog (context/out/thinking/images), `--caps` merges live models with capabilities (`--thinking=<lvl>`/`--images`/`--long` filters), `--check` is a per-provider auth/reachability probe. |
|
|
177
|
-
| `joc skills [name]` | List bundled workflow skills; `joc skills <name>` prints details. |
|
|
178
|
-
| `joc resume [id]` | Resume the latest interactive session (or a specific id). |
|
|
179
|
-
| `joc chat "<msg>"` | Single-shot streaming chat (no tools) — renders the reply token-by-token. |
|
|
180
|
-
| `joc mcp [serve\|tools]` | Run `joc` as an MCP stdio server (set `JOC_MCP_PIPELINE=1` to also expose the pipeline tools). |
|
|
181
|
-
| `joc evolve [--step N] [--max M] [--animate] [--loop N] [--theme cosmic\|matrix\|solar\|mono] [--gradient] [--ascii] [--fit] [--width W] [--list] [--list-themes] [--json] [--no-color]` | Preview the **evolution TUI** identity — five ASCII-art stages with track + stage meter. `--gradient` truecolor (256/16/plain downgrade), `--theme` palettes, `--ascii` legacy-terminal fallback, `--fit`/`--width` terminal sizing, `--list`/`--list-themes`/`--json` for tooling. |
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
## Interactive agent
|
|
186
|
-
|
|
187
|
-
Run bare `joc` (or `joc launch`) for a conversational coding agent built on a shared,
|
|
188
|
-
hardened tool-call engine (`src/agent/engine.ts`). It calls `read` / `write` / `edit` /
|
|
189
|
-
`bash` / `find` / `search` in a loop until it signals done.
|
|
190
|
-
|
|
191
|
-
- **TUI** — on a TTY it renders a differential UI (live tool-call list, `joc thinking`
|
|
192
|
-
progress status, `joc forge` tool stats, and boxed previews for `bash` / `write` /
|
|
193
|
-
`read` / `edit` calls); `--no-tui`, piped input, and non-TTY fall back to a
|
|
194
|
-
plain `stream:complete` / `stream:error` event stream.
|
|
195
|
-
- **Evolution TUI** — the live view evolves with the agent's progress through five stages
|
|
196
|
-
(**Primordial Cell → Double Helix → Tool User → AI Coding Agent → Singularity**). The ASCII
|
|
197
|
-
art, spinner, progress meter, and footer track all advance in lockstep from one canonical
|
|
198
|
-
stage model (`src/tui/components/evolution.ts`); `finish()` records `Evolved to: <stage>`.
|
|
199
|
-
Preview it any time with `joc evolve` (try `--theme matrix --gradient --fit`). On a TTY the
|
|
200
|
-
live frame **fills the terminal** — art centered to the width, footer pinned to the bottom row —
|
|
201
|
-
and downgrades gracefully (truecolor→256→16→plain, unicode→ASCII) per terminal capability.
|
|
202
|
-
- **Model & provider control (live)** — `<Tab>` autocompletes slash commands and their
|
|
203
|
-
arguments: model ids, providers, and subagent roles. `/model` and `/models` pull the
|
|
204
|
-
**real model list from your logged-in (OAuth / API-key) accounts** via live discovery —
|
|
205
|
-
pick by id or `#N`, set the session model or save it as default. `/provider` switches
|
|
206
|
-
providers (and lists that provider's live models), and `/agents <role> [model]` pins a per-role
|
|
207
|
-
model for the `executor` / `planner` / `architect` / `critic` subagents. `/roles [tier model]`
|
|
208
|
-
sets the `smol`/`slow`/`plan` model tiers; `/thinking` spans `minimal`→`xhigh`; `/view` / `/diff`
|
|
209
|
-
/ `/find` / `/search` give an in-TUI code view.
|
|
210
|
-
- **Sessions** — every turn is appended to `.joc/sessions/<id>.jsonl`; `joc launch --list`
|
|
211
|
-
and `joc launch --resume [id]` resume past conversations.
|
|
212
|
-
- **tmux orchestration (gjc parity)** — `joc --tmux` creates/attaches a leader session named
|
|
213
|
-
`joc-<branch>`; add `--worktree <path>` to run inside a dedicated git worktree (auto-created
|
|
214
|
-
on a branch named after the path) so edits and evidence stay isolated from your main checkout.
|
|
215
|
-
- **Project context** — the prompt auto-loads the first of `JEO.md` / `AGENTS.md` /
|
|
216
|
-
`.joc/context.md` / `CLAUDE.md`.
|
|
217
|
-
- **Compaction** — long conversations are summarized automatically to stay within the context window.
|
|
218
|
-
- **Progress guards** — if a (weak/local) model repeats the same tool call 3× or racks up 5
|
|
219
|
-
consecutive tool failures without signalling done, the loop stops with a clear message instead of burning steps.
|
|
220
|
-
- **Token usage** — each turn prints a `(N in / M out tokens)` footer; all four provider
|
|
221
|
-
adapters report usage in both blocking `call` and streaming modes.
|
|
124
|
+
- Global config: `~/.jeo/config.json` (model picks are MRU-persisted)
|
|
125
|
+
- Project state/sessions: `<project>/.jeo/`
|
|
222
126
|
|
|
223
127
|
```bash
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
128
|
+
ANTHROPIC_API_KEY=... OPENAI_API_KEY=... GEMINI_API_KEY=...
|
|
129
|
+
JEO_DEFAULT_MODEL=... # e.g. ollama/qwen2.5:0.5b
|
|
130
|
+
OLLAMA_HOST=http://localhost:11434
|
|
131
|
+
JEO_TUI_THEME=cosmic # cosmic/matrix/solar/red-claw/blue-crab/mono/aurora/synthwave/sakura
|
|
132
|
+
JEO_TUI_ALT_SCREEN=1 # legacy alt-screen turn (default: inline scrollback)
|
|
133
|
+
JEO_STEP_BASE=24 # dynamic step budget: rolling base
|
|
134
|
+
JEO_STEP_HARD_CAP=600 # absolute termination guarantee
|
|
135
|
+
JEO_STREAM_MAX_MS=300000 # opt-in overall stream deadline (default off; bounds slow-drip streams)
|
|
136
|
+
JEO_TOOL_OUTPUT_MAX=4000 # model-visible tool output cap (full output spills to artifacts)
|
|
230
137
|
```
|
|
231
138
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
## Spec-first pipeline
|
|
235
|
-
|
|
236
|
-
Crystallize requirements before touching code. While a `deep-interview` is active, the
|
|
237
|
-
**MutationGuard** blocks code-mutating tools — `write`/`edit` outside `.joc/`, and `bash`
|
|
238
|
-
entirely — releasing once ambiguity ≤ 20%.
|
|
239
|
-
|
|
240
|
-
1. **`joc deep-interview "<idea>"`** — Socratic loop scoring ambiguity across Goal clarity,
|
|
241
|
-
Constraint completeness, and Success/Acceptance criteria. Freezes a seed to
|
|
242
|
-
`.joc/seeds/seed-<slug>.yaml`.
|
|
243
|
-
2. **`joc ralplan`** — multi-role (Planner/Architect/Critic) blueprint → `.joc/plans/plan-<slug>.yaml`.
|
|
244
|
-
3. **`joc approve <plan-path>`** — approval gate: marks the plan approved so `team` will execute it.
|
|
245
|
-
4. **`joc team`** — executes plan tasks via the shared tool engine; checkpoints to `.joc/state/team-state.json`.
|
|
246
|
-
5. **`joc ultragoal`** — runs acceptance checks and writes `.joc/state/ultragoal-report.md`.
|
|
247
|
-
|
|
248
|
-
---
|
|
249
|
-
|
|
250
|
-
## Providers, OAuth & local models
|
|
251
|
-
|
|
252
|
-
Routing is inferred from the model id; credentials resolve from `~/.joc/config.json` (or env).
|
|
253
|
-
|
|
254
|
-
| Provider | Model id example | Credential |
|
|
255
|
-
| --- | --- | --- |
|
|
256
|
-
| Anthropic | `claude-3-5-sonnet` | `ANTHROPIC_API_KEY` or OAuth (`ANTHROPIC_OAUTH_TOKEN` / `CLAUDE_CODE_OAUTH_TOKEN`) |
|
|
257
|
-
| OpenAI | `gpt-4o` / `openai/<model>` | `OPENAI_API_KEY` or `OPENAI_OAUTH_TOKEN` |
|
|
258
|
-
| Gemini | `gemini-2.5-flash` | `GEMINI_API_KEY` or `GEMINI_OAUTH_TOKEN` |
|
|
259
|
-
| Ollama (local) | `ollama/qwen2.5:0.5b` | none — offline via `OLLAMA_HOST` (default `http://localhost:11434`) |
|
|
260
|
-
| OpenAI-compatible (LM Studio / vLLM / llama.cpp) | `openai/<model>` | optional key; set `openaiBaseUrl` / `OPENAI_BASE_URL` |
|
|
139
|
+
Retry behavior is tunable via `retry` in `~/.jeo/config.json` (`requestMaxRetries`, `streamMaxRetries`, `rateLimitRetries`, `failFastStatuses`, …). The step budget is dynamic by default — it extends while recent tool calls show novel progress and consolidates with a wrap-up when stalled; `--max-steps N` restores a bounded flow.
|
|
261
140
|
|
|
262
|
-
|
|
263
|
-
authorize URL, runs a local callback server (Anthropic `:54545`, OpenAI `:1455`,
|
|
264
|
-
Google `:8085`), exchanges the code, and stores `access` + `refresh` + `expires`. Tokens
|
|
265
|
-
**auto-refresh** on expiry (single-flight); `joc auth refresh <provider>` forces it. On
|
|
266
|
-
headless boxes, paste the redirect URL/code when prompted, or use
|
|
267
|
-
`joc auth login <provider> --token <bearer>` for a manual (non-refreshing) token.
|
|
268
|
-
- **Compatibility:** OAuth beats API keys for the same provider, **except** the bundled
|
|
269
|
-
adapters fall back to the API key when the OAuth flow isn't end-to-end compatible.
|
|
270
|
-
Anthropic OAuth is verified e2e with the Messages adapter; OpenAI/Google OAuth tokens
|
|
271
|
-
target the Codex / Cloud-Code-Assist backends, so the bundled chat / generativelanguage
|
|
272
|
-
adapters prefer an API key (the CLI warns you up front).
|
|
273
|
-
- **Local/offline:** set `JOC_DEFAULT_MODEL=ollama/<model>` after `ollama pull <model>` — no
|
|
274
|
-
key required. Any OpenAI-compatible endpoint works via `openaiBaseUrl`.
|
|
141
|
+
## Publishing
|
|
275
142
|
|
|
276
|
-
|
|
143
|
+
CI publishes via `.github/workflows/npm-publish.yml` — triggered by a published GitHub release, or manually with `workflow_dispatch` (optional dry-run). The workflow typechecks, tests, verifies the token (`npm whoami`), then runs `npm publish --provenance`.
|
|
277
144
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
| What | Where |
|
|
281
|
-
| --- | --- |
|
|
282
|
-
| Global config | `~/.joc/config.json` (dir `0700`, file `0600`); override dir with `JOC_CONFIG_DIR` |
|
|
283
|
-
| Per-project runtime | `<cwd>/.joc/` → `seeds/`, `plans/`, `state/`, `sessions/` |
|
|
284
|
-
|
|
285
|
-
`config.json` fields: `providers`, `oauth`, `defaultModel`, `ollamaBaseUrl`, `openaiBaseUrl`,
|
|
286
|
-
`thinkingLevel` (`minimal`/`low`/`medium`/`high`/`xhigh`), `modelAliases`, `roles` (`smol`/`slow`/`plan`
|
|
287
|
-
model tiers), `subagents` (per-role model/maxSteps), `retry`. Env vars (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`,
|
|
288
|
-
`GEMINI_API_KEY`, the `*_OAUTH_TOKEN` bearers, `OLLAMA_HOST`, `OPENAI_BASE_URL`,
|
|
289
|
-
`JOC_DEFAULT_MODEL`) fill gaps but never override on-disk values. Verify everything with `joc doctor`.
|
|
290
|
-
|
|
291
|
-
**Provider retry budgets (gjc parity).** `retry.requestMaxRetries` sets how many times a failed
|
|
292
|
-
provider request is retried (the initial request is not counted); `retry.maxDelayMs` caps the
|
|
293
|
-
exponential backoff. `retry.streamMaxRetries` / `retry.maxRetries` are accepted for gjc-config
|
|
294
|
-
compatibility. Retries apply only to transient failures (network errors, `408/425/429/5xx/529`),
|
|
295
|
-
honoring a server `Retry-After`; auth, bad-model, and malformed-request errors stay fail-fast.
|
|
296
|
-
|
|
297
|
-
```json
|
|
298
|
-
{ "defaultModel": "claude-3-5-sonnet", "retry": { "requestMaxRetries": 4, "maxDelayMs": 300000 } }
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
---
|
|
302
|
-
|
|
303
|
-
## Project structure
|
|
304
|
-
|
|
305
|
-
```text
|
|
306
|
-
jeo-code/
|
|
307
|
-
├── package.json # name: jeo-code, bin: { joc: src/cli.ts }, bun scripts
|
|
308
|
-
├── tsconfig.json # strict typecheck config
|
|
309
|
-
├── install.sh # top-level shim → scripts/install.sh --local
|
|
310
|
-
├── src/
|
|
311
|
-
│ ├── cli.ts # entry: Bun version guard + dispatch
|
|
312
|
-
│ ├── cli/runner.ts # lazy command registry (bare joc → launch)
|
|
313
|
-
│ ├── commands/ # launch, setup, auth, deep-interview, ralplan, approve, team, ultragoal, doctor, mcp, models, skills, resume, chat
|
|
314
|
-
│ ├── agent/ # engine (tool loop), loop, json, tools (+MutationGuard), session, compaction, context-files, state
|
|
315
|
-
│ ├── ai/ # provider adapters (anthropic/openai/gemini/ollama) + model-manager
|
|
316
|
-
│ ├── auth/ # storage (+auto-refresh), pkce, callback-server, refresh, flows/{anthropic,openai,google}
|
|
317
|
-
│ ├── mcp/ # MCP protocol + tools + stdio server
|
|
318
|
-
│ └── tui/ # differential renderer + components + LaunchTui
|
|
319
|
-
├── scripts/ # install.sh / uninstall.sh (bun install + bun link)
|
|
320
|
-
├── test/ # 61 suites (372 tests): oauth, engine, tools-fs, retry, config-schema, cli-runner, mutation-guard, approve, team-schema, session, compaction, streaming, evolution, ascii-art, footer, evolve, meter, install, model-discovery/picker/catalog/enrich/roles, provider-status, config-panel, code-view, tui-*
|
|
321
|
-
├── docs/improvements.md # architectural analysis & changelog (ralph passes)
|
|
322
|
-
├── plan/ # long-horizon work plans (TUI, features, install, model, provider)
|
|
323
|
-
└── README.md
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
---
|
|
327
|
-
|
|
328
|
-
## Development
|
|
145
|
+
Required npm token permissions (repository secret `NPM_TOKEN`):
|
|
329
146
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
bun run typecheck # tsc -p tsconfig.json --noEmit
|
|
333
|
-
bun test # full suite
|
|
334
|
-
GEMINI_OAUTH_CLIENT_SECRET=<x> bun test # Google OAuth flow tests need this env var
|
|
335
|
-
```
|
|
147
|
+
- A **Granular Access Token** with Read/Write access to the `jeo-code` package, or a classic **Automation** token
|
|
148
|
+
- "**bypass 2FA** for publishing" must be allowed — Automation tokens always bypass; granular tokens need the option enabled
|
|
336
149
|
|
|
337
|
-
|
|
338
|
-
live in [`plan/`](./plan/README.md); the running changelog is [`docs/improvements.md`](./docs/improvements.md).
|
|
150
|
+
## Changelog
|
|
339
151
|
|
|
340
|
-
|
|
152
|
+
<!-- CHANGELOG:START (auto-generated from CHANGELOG.md — run `bun run changelog:sync`) -->
|
|
153
|
+
- **[0.4.4]** (2026-06-13) — Live subagent status mirroring, always-useful Ctrl+O activity tail, read lineRange crash guard.
|
|
154
|
+
- **[0.4.3]** (2026-06-13) — Readability pass for autopilot, subagent activity, and worked-history review.
|
|
155
|
+
- **[0.4.2]** (2026-06-13) — Thinking-loop termination guarantees (cycle guard + turn wall-clock budget), unboxed live status without step counters, self-contained `.jeo` namespace, live next-prompt input card, role-targeted model/thinking picker.
|
|
156
|
+
- **[0.4.1]** (2026-06-12) — TUI card parity polish + done-time todo reconciliation.
|
|
157
|
+
- **[0.4.0]** (2026-06-12) — Verified TUI, resilient engine, batch input, multilingual docs.
|
|
341
158
|
|
|
342
|
-
|
|
159
|
+
See [CHANGELOG.md](CHANGELOG.md) for the full history.
|
|
160
|
+
<!-- CHANGELOG:END -->
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/hero.png" alt="jeo-code 自主编码代理主视觉插图" width="100%" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">jeo-code (jeo)</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>Encode intention. Decode software.</strong><br />
|
|
9
|
+
基于 Bun 的 AI 编码代理 CLI — 需求访谈、经评审的计划、带门禁的执行、诚实的验证。
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://github.com/akillness/jeo-code"><img alt="license" src="https://img.shields.io/badge/license-MIT-green?style=flat-square"></a>
|
|
14
|
+
<img alt="runtime" src="https://img.shields.io/badge/runtime-Bun%20%E2%89%A5%201.3.14-f9f1e1?style=flat-square&logo=bun&logoColor=black">
|
|
15
|
+
<img alt="zero native deps" src="https://img.shields.io/badge/native%20deps-0-blue?style=flat-square">
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
<img src="assets/character.png" alt="jeo-code 吉祥物" width="320" />
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
<p align="center">
|
|
23
|
+
<a href="README.md">English</a> ·
|
|
24
|
+
<a href="README.ko.md">한국어</a> ·
|
|
25
|
+
<a href="README.ja.md">日本語</a> ·
|
|
26
|
+
<b>中文</b>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
在仓库内运行 `jeo`,它会读取文件、编辑代码、执行命令,并把任务推进到完成 — 每一步都通过滚动友好的内联 TUI 实时呈现。
|
|
30
|
+
|
|
31
|
+
## 亮点
|
|
32
|
+
|
|
33
|
+
- **多提供商、单一循环** — Anthropic / OpenAI(+Codex) / Gemini / Antigravity / Ollama 统一在一个 JSON 工具循环中。输入框内直接 OAuth 登录(`/provider login`),模型选择即刻持久化为默认值。
|
|
34
|
+
- **编辑完整性** — read 输出携带内容锚点(`42ab|`);带锚点的编辑会与当前文件校验、行移动时自动重映射、不匹配时连同最新内容一起拒绝 — 绝不污染文件。
|
|
35
|
+
- **自我修正的验证循环** — 配置 post-edit 钩子(tsc / eslint / 测试),代理会*亲自读取*诊断并在循环内修复;钩子未通过时 `done` 会被阻断。
|
|
36
|
+
- **没有表演的真实门禁** — `ralplan` 共识由真正读取仓库的 critic 子代理执行,`[OKAY]` 裁决被持久化且 `jeo approve` *强制要求*它;`ultragoal` 诚实报告(套件运行只是全局信号,绝不伪造逐条通过)。
|
|
37
|
+
- **崩溃耐久、本地优先** — 全部状态位于 `.jeo/`,原子写入、跨进程运行锁、失败任务标记 + 恢复时的部分编辑警告。
|
|
38
|
+
- **动态步数预算** — 只要近期工具调用展现新的进展就持续延长,停滞时优雅收敛为总结;子代理保持精确的步数契约。
|
|
39
|
+
- **内联 TUI** — 已完成的工作流入真实滚动缓冲区(回合中也可用 tmux 滚轮),代理运行时普通查询输入框仍保持可见并可编辑。Ctrl+O 详细信息切换、主题、剪贴板图片粘贴(Ctrl+V)、CJK/表情安全的宽度计算。
|
|
40
|
+
|
|
41
|
+
## 安装
|
|
42
|
+
|
|
43
|
+
需要 Bun `1.3.14+`。
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
bun install -g jeo-code
|
|
47
|
+
jeo --version
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 快速开始
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
jeo # 在当前仓库启动交互式代理
|
|
54
|
+
jeo "整理 README 并跑测试" # 单次请求
|
|
55
|
+
jeo doctor # 配置 + 模型连通性实测
|
|
56
|
+
jeo setup # API 密钥 / OAuth / 本地模型配置
|
|
57
|
+
jeo --tmux # 在独立 tmux 会话中运行
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## 斜杠命令
|
|
61
|
+
|
|
62
|
+
在 `jeo` REPL 中使用(Tab 补全,输入 `/` 打开面板)。
|
|
63
|
+
|
|
64
|
+
| 命令 | 说明 |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| `/model` · `/provider` | 选择模型/提供商;`/model` 在一个流程内显示默认/角色徽章、Ralph 风格嵌套角色·thinking 选择与 OpenAI Codex 角色预设 |
|
|
67
|
+
| `/provider login <name>` · `/logout` | 在输入框内 OAuth 登录/登出 |
|
|
68
|
+
| `/agents [role]` · `/subagent` | 按角色(executor/planner/architect/critic)配置模型·thinking·步数 |
|
|
69
|
+
| `/thinking [level]` | 查看/设置默认推理预算(minimal…xhigh) |
|
|
70
|
+
| `/fast [on|off|status]` | 当前模型支持 minimal/low 推理时切换 fast thinking 模式 |
|
|
71
|
+
| `/skill` · `$<skill> [intent]` | 列出/运行工作流技能(`$team "任务"` 风格) |
|
|
72
|
+
| `/view` · `/diff` · `/find` · `/search` | 代码查看、git diff、文件/模式搜索 |
|
|
73
|
+
| `/new` · `/resume` · `/sessions` | 会话管理 |
|
|
74
|
+
| `/history [n|all]` · `/export` | 将可读的工作活动历史重新输出到滚动区 · 导出记录 |
|
|
75
|
+
| `/retry` · `/btw <问题>` | 重试上次请求 · 不写入历史的旁路提问 |
|
|
76
|
+
| `/usage` · `/context` · `/compact` | Token 用量、上下文明细、手动压缩 |
|
|
77
|
+
| `/theme` · `/config` · `/help` | 主题、运行时配置、帮助 |
|
|
78
|
+
| `jeo autopilot status` | 显示分数方向、keep/revert 次数和下一步动作的 ratchet 状态字段 |
|
|
79
|
+
|
|
80
|
+
## Spec-first 工作流
|
|
81
|
+
|
|
82
|
+
需求 → 计划 → 批准 → 执行 → 验证,经由 `.jeo/state/` 串联,每次交接都有**可阻断的真实门禁**:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
jeo deep-interview "描述你想构建的东西"
|
|
86
|
+
jeo ralplan
|
|
87
|
+
jeo approve <计划路径>
|
|
88
|
+
jeo team
|
|
89
|
+
jeo ultragoal
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
- **deep-interview** — 基于歧义度评分的苏格拉底循环;只有标准足够具体才冻结种子(纯含糊标准会被拒绝),且种子必须通过自身解析器的往返校验。新想法绝不会静默复用已完成的访谈。
|
|
93
|
+
- **ralplan** — 起草阶段 + **真正读取仓库的 critic 子代理门禁**: 强制并持久化 `[OKAY]`/`[ITERATE]`/`[REJECT]` 裁决。无效计划(schema、未知角色)不会被标记为 complete。
|
|
94
|
+
- **approve** — 校验 `team` 执行的确切契约(schema+角色),并要求持久化的 `[OKAY]` 共识裁决。
|
|
95
|
+
- **team** — 串行计划执行器: 跨进程运行锁、过期计划重置、按任务的子代理契约、父侧变更审计(零写入的"完成"会被标记)、失败标记 + 恢复时的部分编辑警告。
|
|
96
|
+
- **ultragoal** — 诚实验证: 套件作为全局信号只运行一次,标准只被记录,绝不伪造为逐条通过。
|
|
97
|
+
|
|
98
|
+
## 验证钩子(自我修正)
|
|
99
|
+
|
|
100
|
+
先全局启用一次(在 `~/.jeo/config.json` 中设置 `"hooks": { "enabled": true }`),再为项目添加 post-edit 检查,代理会读取失败并在 `done` 之前修复:
|
|
101
|
+
|
|
102
|
+
```jsonc
|
|
103
|
+
// .jeo/hooks.json
|
|
104
|
+
{
|
|
105
|
+
"enabled": true,
|
|
106
|
+
"hooks": [
|
|
107
|
+
{ "event": "post-turn", "match": { "tool": "edit|write" }, "run": "bun x tsc --noEmit" }
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
非零退出钩子的输出会附加到模型读取的工具结果中(批内去重);钩子未通过就调用 `done` 会收到带钩子名称的回推。
|
|
113
|
+
|
|
114
|
+
## 本地模型
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
ollama pull qwen2.5:0.5b
|
|
118
|
+
export JEO_DEFAULT_MODEL=ollama/qwen2.5:0.5b
|
|
119
|
+
jeo doctor && jeo
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## 配置
|
|
123
|
+
|
|
124
|
+
- 全局配置: `~/.jeo/config.json`(模型选择 MRU 持久化)
|
|
125
|
+
- 项目状态/会话: `<project>/.jeo/`
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
ANTHROPIC_API_KEY=... OPENAI_API_KEY=... GEMINI_API_KEY=...
|
|
129
|
+
JEO_DEFAULT_MODEL=... # 例: ollama/qwen2.5:0.5b
|
|
130
|
+
OLLAMA_HOST=http://localhost:11434
|
|
131
|
+
JEO_TUI_THEME=cosmic # cosmic/matrix/solar/red-claw/blue-crab/mono/aurora/synthwave/sakura
|
|
132
|
+
JEO_TUI_ALT_SCREEN=1 # 旧版 alt-screen 回合(默认: 内联滚动缓冲)
|
|
133
|
+
JEO_STEP_BASE=24 # 动态步数预算的滚动基数
|
|
134
|
+
JEO_STEP_HARD_CAP=600 # 绝对终止保证
|
|
135
|
+
JEO_STREAM_MAX_MS=300000 # 可选的整体流截止(默认关闭; 约束慢滴流)
|
|
136
|
+
JEO_TOOL_OUTPUT_MAX=4000 # 模型可见的工具输出上限(全文溢出到 artifacts)
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
重试行为通过 `~/.jeo/config.json` 的 `retry` 调整(`requestMaxRetries`、`streamMaxRetries`、`rateLimitRetries`、`failFastStatuses` 等)。步数预算默认动态 — 只要看到新的进展就延长,停滞时收敛为总结;`--max-steps N` 恢复有界流程。
|
|
140
|
+
|
|
141
|
+
## 发布 (Publishing)
|
|
142
|
+
|
|
143
|
+
CI 通过 `.github/workflows/npm-publish.yml` 发布 — GitHub 发布 release 时自动触发,或手动 `workflow_dispatch`(可选 dry-run)。工作流执行类型检查、测试、令牌校验(`npm whoami`)后运行 `npm publish --provenance`。
|
|
144
|
+
|
|
145
|
+
所需 npm 令牌权限(仓库 secret `NPM_TOKEN`):
|
|
146
|
+
|
|
147
|
+
- 对 `jeo-code` 包具有 Read/Write 权限的 **Granular Access Token**,或经典 **Automation** 令牌
|
|
148
|
+
- 必须允许"发布时 **bypass 2FA**" — Automation 令牌始终绕过,granular 令牌需启用该选项
|
|
149
|
+
|
|
150
|
+
## 更新日志 (Changelog)
|
|
151
|
+
|
|
152
|
+
<!-- CHANGELOG:START (auto-generated from CHANGELOG.md — run `bun run changelog:sync`) -->
|
|
153
|
+
- **[0.4.4]** (2026-06-13) — Live subagent status mirroring, always-useful Ctrl+O activity tail, read lineRange crash guard.
|
|
154
|
+
- **[0.4.3]** (2026-06-13) — Readability pass for autopilot, subagent activity, and worked-history review.
|
|
155
|
+
- **[0.4.2]** (2026-06-13) — Thinking-loop termination guarantees (cycle guard + turn wall-clock budget), unboxed live status without step counters, self-contained `.jeo` namespace, live next-prompt input card, role-targeted model/thinking picker.
|
|
156
|
+
- **[0.4.1]** (2026-06-12) — TUI card parity polish + done-time todo reconciliation.
|
|
157
|
+
- **[0.4.0]** (2026-06-12) — Verified TUI, resilient engine, batch input, multilingual docs.
|
|
158
|
+
|
|
159
|
+
See [CHANGELOG.md](CHANGELOG.md) for the full history.
|
|
160
|
+
<!-- CHANGELOG:END -->
|