Skip to content

Commit 4d4697e

Browse files
committed
chore: stage pre-existing staging WIP
Work that was already uncommitted on the staging branch when the proxy bootstrap began. Committing faithfully — no behavior changes from me. Buckets: hermes-agent devcontainer feature (new) - container/.devcontainer/features/hermes-agent/ - devcontainer-feature.json, install.sh, README.md settings profile generation (new) - container/.devcontainer/scripts/generate-settings-profiles.js - container/.devcontainer/defaults/codeforge/config/settings.base.json - container/.devcontainer/defaults/codeforge/config/settings-profiles/ (opus-45-200k, opus-46-200k, opus-46-1m-400k, opus-47-200k, opus-47-1m-400k) - container/.devcontainer/defaults/codeforge/config/settings-opus-*.json (generated outputs for the above profiles) oh-my-claude feature tweaks (modified) - README.md, devcontainer-feature.json, install.sh, poststart-hook.sh container plumbing (modified) - .secrets.example, AGENTS.md, CHANGELOG.md, README.md - devcontainer.json, file-manifest.json, settings.json - scripts/{check-setup.sh, setup-aliases.sh, setup-config.sh} - test.js docs site (modified) - package.json - src/content/docs/customize/optional-components.md - src/content/docs/reference/{changelog,cli-tools,commands}.md Grouped by package per CLAUDE.md cross-package rules. None of this is related to the proxy work landed in the previous commit.
1 parent 12c86e1 commit 4d4697e

34 files changed

Lines changed: 1824 additions & 344 deletions

container/.devcontainer/.secrets.example

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,14 @@ OPENROUTER_API_KEY=
2727
# oh-my-claude — Chinese LLM provider API keys
2828
KIMI_API_KEY=
2929
ZHIPU_API_KEY=
30+
ZAI_API_KEY=
3031
ALIYUN_API_KEY=
3132
MINIMAX_API_KEY=
33+
MINIMAX_CN_API_KEY=
34+
35+
# oh-my-claude — optional local/embedding providers
36+
OLLAMA_HOST=
37+
EMBEDDING_API_BASE=
38+
EMBEDDING_MODEL=
39+
EMBEDDING_API_KEY=
40+
EMBEDDING_DIMENSIONS=

container/.devcontainer/AGENTS.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ CodeForge devcontainer for AI-assisted development with Claude Code.
66

77
| File | Purpose |
88
|------|---------|
9-
| `defaults/codeforge/config/settings.json` | Model, tokens, permissions, plugins, env vars |
9+
| `defaults/codeforge/config/settings.base.json` | Shared Claude Code settings: permissions, plugins, env vars |
10+
| `defaults/codeforge/config/settings-profiles/*.json` | Model/context/thinking overlays used to generate deployed settings profiles |
11+
| `defaults/codeforge/config/settings*.json` | Generated Claude Code settings profiles deployed to `~/.claude/` |
1012
| `defaults/codeforge/config/main-system-prompt.md` | System prompt defining assistant behavior |
1113
| `defaults/codeforge/config/orchestrator-system-prompt.md` | Orchestrator mode prompt (delegation-first) |
1214
| `defaults/codeforge/config/ccstatusline-settings.json` | Status bar widget layout (deployed to ~/.config/ccstatusline/) |
@@ -22,13 +24,14 @@ Config files deploy via `defaults/codeforge/file-manifest.json` on every contain
2224

2325
| Command | Purpose |
2426
|---------|---------|
25-
| `cc` / `claude` | Run Claude Code with auto-configuration (opus-4-5, 200k context) |
27+
| `cc` / `claude` / `cc7` | Run Claude Code with auto-configuration (opus-4-7, 200k context) |
2628
| `codeforge config apply` | Deploy config files to `~/.claude/` (same as container start) |
2729
| `ccraw` | Vanilla Claude Code (bypasses config) |
28-
| `ccw` | Claude Code with writing system prompt (opus-4-5, 200k context) |
29-
| `cc-orc` | Claude Code in orchestrator mode, delegation-first (opus-4-5, 200k context) |
30-
| `cc7` / `ccw7` / `cc-orc7` | Claude Code on opus-4-7 with 400k context (main / writing / orchestrator modes) |
30+
| `cc5` / `cc6` / `cc61` / `cc71` | Main prompt profiles for opus-4-5 200k, opus-4-6 200k, opus-4-6 1M bounded to 400k, opus-4-7 1M bounded to 400k |
31+
| `ccw*` | Same profile matrix with the writing system prompt |
32+
| `cc-orc*` | Same profile matrix in orchestrator mode, delegation-first |
3133
| `codex` | OpenAI Codex CLI terminal coding agent |
34+
| `hermes` | Nous Research Hermes Agent CLI (run `hermes setup` on first use) |
3235
| `ccms` | Session history search _(disabled — requires Rust toolchain; uncomment in devcontainer.json to enable)_ |
3336
| `codeforge proxy` | Launch Claude Code through mitmproxy — inspect API traffic in browser (port 8081) |
3437
| `ccr start` / `ccr stop` | Claude Code Router daemon control |
@@ -79,9 +82,11 @@ Codex CLI credentials (`~/.codex/`) are backed by a separate Docker named volume
7982

8083
**Claude Code Router:** Set provider API keys (`ANTHROPIC_API_KEY`, `DEEPSEEK_API_KEY`, `GEMINI_API_KEY`, `OPENROUTER_API_KEY`) in `.devcontainer/.secrets`. Keys are exported as env vars on container start and read at runtime by the router's `$ENV_VAR` interpolation in `~/.claude-code-router/config.json`. Edit routing rules in `defaults/codeforge/config/claude-code-router.json` and run `ccr-apply` to redeploy.
8184

85+
**oh-my-claude:** The local `features/oh-my-claude` feature is opt-in. It installs the OMC CLI and generated agents, skips OMC hooks/MCP/statusline, and preserves CodeForge-managed `~/.claude/settings.json`. OMC proxy sessions are launched per session with `omc cc` or the `omc-cc` helper; do not add a post-start OMC daemon.
86+
8287
## Modifying Behavior
8388

84-
1. **Change model**: Edit `defaults/codeforge/config/settings.json``"model"` field
89+
1. **Change shared Claude settings**: Edit `defaults/codeforge/config/settings.base.json`, then run `node scripts/generate-settings-profiles.js`
8590
2. **Change system prompt**: Edit `defaults/codeforge/config/main-system-prompt.md`
8691
3. **Add config file**: Place in `defaults/codeforge/config/`, add entry to `defaults/codeforge/file-manifest.json`
8792
4. **Add features**: Add to `"features"` in `devcontainer.json`

container/.devcontainer/CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# CodeForge Devcontainer Changelog
22

3+
## Unreleased
4+
5+
### Hermes Agent
6+
7+
- **New feature: `hermes-agent`** — installs [Nous Research's Hermes Agent](https://hermes-agent.nousresearch.com/) CLI via the upstream `curl | bash` installer with `--skip-setup`. Hermes uses the plain `anthropic` / `openai` Python SDKs directly and supports any compatible provider (Anthropic, OpenAI, MiniMax, local models). Enabled by default; set `"version": "none"` in `devcontainer.json` to disable.
8+
- **Hermes persistence** — dedicated Docker named volume (`codeforge-hermes-config-${devcontainerId}`) for `~/.hermes/`, surviving container rebuilds so `hermes setup` is a one-time cost per devcontainer instance.
9+
- **No credential seeding** — the interactive `hermes setup` wizard is intentionally skipped during image build. Run `hermes setup` on first use to pick a provider and paste an API key (e.g. from `$MINIMAX_API_KEY`, which already has a slot in `.secrets.example`). Claude OAuth / Codex ChatGPT OAuth cannot be reused — Hermes needs its own provider auth.
10+
11+
### Configuration
12+
13+
- **Claude settings profiles** — replaced the single hand-edited default with `settings.base.json` plus model overlays that generate five deployed settings files: opus-4-7 200k default, opus-4-7 1M bounded to 400k, opus-4-6 200k, opus-4-6 1M bounded to 400k, and opus-4-5 200k.
14+
- **Profile aliases**`cc`, `claude`, `cc7`, `ccw`, `ccw7`, `cc-orc`, and `cc-orc7` now use the opus-4-7 200k settings profile. Added `cc5`, `cc6`, `cc61`, `cc71` plus matching `ccw*` and `cc-orc*` variants.
15+
- **Settings-based context bounds** — Claude launchers now pass `--settings` profile files instead of inline context env vars or `--model`, so model, context, and thinking controls stay in settings JSON.
16+
- **Router features disabled by default**`claude-code-router` and `oh-my-claude` are both present but configured with `version: "none"` in `devcontainer.json`; CCR autostart is also false.
17+
18+
### oh-my-claude
19+
20+
- **StatusLine protection hardened** — install.sh now explicitly resets `statusLine` to ccstatusline after `omc install` completes, since OMC lacks a `--skip-statusline` flag. This prevents OMC from overwriting CodeForge's statusline config.
21+
- **Feature completed as opt-in**`features/oh-my-claude` now installs the OMC CLI with hooks/MCP skipped, preserves CodeForge-managed `settings.json`, and keeps OMC proxy lifecycle per-session via `omc cc` instead of a post-start daemon.
22+
- **Alias cleanup** — default CodeForge `cc` aliases no longer pass OMC MCP `--disallowedTools`; OMC helpers are exposed separately (`omc-cc`, `omc-doctor`, provider shortcuts) when OMC is installed.
23+
- **Provider env coverage** — added Z.AI, MiniMax CN, Ollama, and embedding provider env placeholders to `.secrets.example`.
24+
- **Robust agent generation**`omc install` now retries up to 3 times with 2-second backoff if the initial install fails during container build.
25+
- **Post-start agent cleanup** — role agents (sisyphus, prometheus, etc.) are now filtered on every container start, ensuring provider-only mode even when `omc install` is run manually.
26+
- **Shell helpers ownership clarified** — install.sh no longer writes shell aliases; CodeForge's `setup-aliases.sh` owns all OMC helper aliases (`omc-cc`, `omc-deepseek`, etc.). Legacy OMC shell blocks are cleaned up on install.
27+
- **Install order guaranteed** — oh-my-claude added to `overrideFeatureInstallOrder` in devcontainer.json.
28+
- **Documentation** — added Known Limitations section covering expected `omc doctor` failures, missing slash commands (upstream issue), and role agent filtering.
29+
330
## v2.2.1 — 2026-04-16
431

532
### Configuration

container/.devcontainer/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ claude --resume # Resume previous session
216216
| `hadolint` | Dockerfile linter |
217217
| `agent-browser` | Headless browser automation for AI agents |
218218
| `codex` | OpenAI Codex CLI terminal coding agent |
219+
| `hermes` | Nous Research Hermes Agent CLI (run `hermes setup` on first use) |
219220

220221
### Code Intelligence
221222
| Tool | Description |
@@ -320,6 +321,7 @@ CodeForge includes custom devcontainer features. Any feature can be disabled by
320321
| `ccms` | Claude Code session history search |
321322
| `claude-session-dashboard` | Local session analytics dashboard with web UI |
322323
| `codex-cli` | OpenAI Codex CLI terminal coding agent |
324+
| `hermes-agent` | Nous Research Hermes Agent CLI (interactive `hermes setup` on first use) |
323325
| `notify-hook` | Desktop notifications on Claude completion |
324326
| `mcp-qdrant` | Qdrant vector database MCP server (optional) |
325327

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
{
2+
"cleanupPeriodDays": 60,
3+
"autoCompact": true,
4+
"alwaysThinkingEnabled": true,
5+
"env": {
6+
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
7+
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001",
8+
"BASH_DEFAULT_TIMEOUT_MS": "120000",
9+
"BASH_MAX_TIMEOUT_MS": "300000",
10+
"CLAUDE_CODE_MAX_OUTPUT_TOKENS": "64000",
11+
"MAX_MCP_OUTPUT_TOKENS": "10000",
12+
"CLAUDE_CODE_EFFORT_LEVEL": "high",
13+
"MCP_TIMEOUT": "120000",
14+
"MCP_TOOL_TIMEOUT": "30000",
15+
"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "80",
16+
"FORCE_AUTOUPDATE_PLUGINS": "1",
17+
"CLAUDE_CODE_SCROLL_SPEED": "3",
18+
"ENABLE_TOOL_SEARCH": "auto:5",
19+
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "0",
20+
"CLAUDE_CODE_ENABLE_TASKS": "1",
21+
"CLAUDE_CODE_DISABLE_AUTO_MEMORY": "0",
22+
"ENABLE_CLAUDE_CODE_SM_COMPACT": "1",
23+
"CLAUDE_CODE_FORCE_GLOBAL_CACHE": "1",
24+
"CLAUDE_CODE_PLAN_MODE_INTERVIEW_PHASE": "true",
25+
"CLAUDE_CODE_PLAN_V2_AGENT_COUNT": "5",
26+
"CLAUDE_CODE_PLAN_MODE_REQUIRED": "true",
27+
"CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR": "true",
28+
"CLAUDE_AUTO_BACKGROUND_TASKS": "1",
29+
"CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION": "false",
30+
"CLAUDE_CODE_NO_FLICKER": "1",
31+
"CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY": "10",
32+
"CLAUDE_CODE_MAX_RETRIES": "1",
33+
"BASH_MAX_OUTPUT_LENGTH": "15000",
34+
"TASK_MAX_OUTPUT_LENGTH": "64000",
35+
"DISABLE_AUTOUPDATER": "1",
36+
"ANTHROPIC_MODEL": "claude-opus-4-5",
37+
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-5",
38+
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "200000",
39+
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "200000",
40+
"MAX_THINKING_TOKENS": "31999",
41+
"CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING": "1"
42+
},
43+
"teammateMode": "auto",
44+
"showClearContextOnPlanAccept": true,
45+
"showThinkingSummaries": true,
46+
"attribution": {
47+
"commit": "",
48+
"pr": ""
49+
},
50+
"autoMemoryDirectory": "./.claude/memory",
51+
"plansDirectory": "./.claude/plans",
52+
"viewMode": "focus",
53+
"spinnerVerbs": {
54+
"mode": "replace",
55+
"verbs": [
56+
"Butchering",
57+
"Mangling",
58+
"Wrecking",
59+
"Botching",
60+
"Misreading",
61+
"Derailing",
62+
"Overcomplicating",
63+
"Hallucinating",
64+
"Breaking",
65+
"Fumbling",
66+
"Sabotaging",
67+
"Shredding",
68+
"Confusing",
69+
"Corrupting",
70+
"Ruining",
71+
"Winging",
72+
"Guessing",
73+
"Misinterpreting",
74+
"Overengineering",
75+
"Improvising Poorly",
76+
"Making It Worse",
77+
"Massacring",
78+
"Mutilating",
79+
"Annihilating",
80+
"Trashing",
81+
"Destroying",
82+
"Misfiring",
83+
"Ignoring",
84+
"Unthinking",
85+
"Wondering",
86+
"Draining",
87+
"Exhausting",
88+
"Petering Out"
89+
]
90+
},
91+
"permissions": {
92+
"allow": [
93+
"Read(/workspaces/*)",
94+
"WebFetch(domain:*)"
95+
],
96+
"deny": [],
97+
"ask": [],
98+
"defaultMode": "plan",
99+
"additionalDirectories": []
100+
},
101+
"enabledMcpjsonServers": [],
102+
"disabledMcpjsonServers": [],
103+
"hooks": {},
104+
"statusLine": {
105+
"type": "command",
106+
"command": "/usr/local/bin/ccstatusline-wrapper"
107+
},
108+
"enabledPlugins": {
109+
"frontend-design@anthropics/claude-code": true,
110+
"code-review@anthropics/claude-code": true,
111+
"feature-dev@anthropics/claude-code": true,
112+
"pr-review-toolkit@anthropics/claude-code": true,
113+
"codeforge-lsp@devs-marketplace": false,
114+
"ticket-workflow@devs-marketplace": false,
115+
"notify-hook@devs-marketplace": false,
116+
"dangerous-command-blocker@devs-marketplace": false,
117+
"protected-files-guard@devs-marketplace": true,
118+
"agent-system@devs-marketplace": true,
119+
"skill-engine@devs-marketplace": false,
120+
"spec-workflow@devs-marketplace": false,
121+
"session-context@devs-marketplace": false,
122+
"auto-code-quality@devs-marketplace": true,
123+
"workspace-scope-guard@devs-marketplace": true,
124+
"prompt-snippets@devs-marketplace": true,
125+
"git-workflow@devs-marketplace": false
126+
},
127+
"autoUpdatesChannel": "latest",
128+
"model": "claude-opus-4-5",
129+
"autoCompactWindow": 200000
130+
}
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
{
2+
"cleanupPeriodDays": 60,
3+
"autoCompact": true,
4+
"alwaysThinkingEnabled": true,
5+
"env": {
6+
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
7+
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001",
8+
"BASH_DEFAULT_TIMEOUT_MS": "120000",
9+
"BASH_MAX_TIMEOUT_MS": "300000",
10+
"CLAUDE_CODE_MAX_OUTPUT_TOKENS": "64000",
11+
"MAX_MCP_OUTPUT_TOKENS": "10000",
12+
"CLAUDE_CODE_EFFORT_LEVEL": "high",
13+
"MCP_TIMEOUT": "120000",
14+
"MCP_TOOL_TIMEOUT": "30000",
15+
"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "80",
16+
"FORCE_AUTOUPDATE_PLUGINS": "1",
17+
"CLAUDE_CODE_SCROLL_SPEED": "3",
18+
"ENABLE_TOOL_SEARCH": "auto:5",
19+
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "0",
20+
"CLAUDE_CODE_ENABLE_TASKS": "1",
21+
"CLAUDE_CODE_DISABLE_AUTO_MEMORY": "0",
22+
"ENABLE_CLAUDE_CODE_SM_COMPACT": "1",
23+
"CLAUDE_CODE_FORCE_GLOBAL_CACHE": "1",
24+
"CLAUDE_CODE_PLAN_MODE_INTERVIEW_PHASE": "true",
25+
"CLAUDE_CODE_PLAN_V2_AGENT_COUNT": "5",
26+
"CLAUDE_CODE_PLAN_MODE_REQUIRED": "true",
27+
"CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR": "true",
28+
"CLAUDE_AUTO_BACKGROUND_TASKS": "1",
29+
"CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION": "false",
30+
"CLAUDE_CODE_NO_FLICKER": "1",
31+
"CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY": "10",
32+
"CLAUDE_CODE_MAX_RETRIES": "1",
33+
"BASH_MAX_OUTPUT_LENGTH": "15000",
34+
"TASK_MAX_OUTPUT_LENGTH": "64000",
35+
"DISABLE_AUTOUPDATER": "1",
36+
"ANTHROPIC_MODEL": "claude-opus-4-6[1m]",
37+
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-6[1m]",
38+
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "400000",
39+
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "400000",
40+
"MAX_THINKING_TOKENS": "31999",
41+
"CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING": "1"
42+
},
43+
"teammateMode": "auto",
44+
"showClearContextOnPlanAccept": true,
45+
"showThinkingSummaries": true,
46+
"attribution": {
47+
"commit": "",
48+
"pr": ""
49+
},
50+
"autoMemoryDirectory": "./.claude/memory",
51+
"plansDirectory": "./.claude/plans",
52+
"viewMode": "focus",
53+
"spinnerVerbs": {
54+
"mode": "replace",
55+
"verbs": [
56+
"Butchering",
57+
"Mangling",
58+
"Wrecking",
59+
"Botching",
60+
"Misreading",
61+
"Derailing",
62+
"Overcomplicating",
63+
"Hallucinating",
64+
"Breaking",
65+
"Fumbling",
66+
"Sabotaging",
67+
"Shredding",
68+
"Confusing",
69+
"Corrupting",
70+
"Ruining",
71+
"Winging",
72+
"Guessing",
73+
"Misinterpreting",
74+
"Overengineering",
75+
"Improvising Poorly",
76+
"Making It Worse",
77+
"Massacring",
78+
"Mutilating",
79+
"Annihilating",
80+
"Trashing",
81+
"Destroying",
82+
"Misfiring",
83+
"Ignoring",
84+
"Unthinking",
85+
"Wondering",
86+
"Draining",
87+
"Exhausting",
88+
"Petering Out"
89+
]
90+
},
91+
"permissions": {
92+
"allow": [
93+
"Read(/workspaces/*)",
94+
"WebFetch(domain:*)"
95+
],
96+
"deny": [],
97+
"ask": [],
98+
"defaultMode": "plan",
99+
"additionalDirectories": []
100+
},
101+
"enabledMcpjsonServers": [],
102+
"disabledMcpjsonServers": [],
103+
"hooks": {},
104+
"statusLine": {
105+
"type": "command",
106+
"command": "/usr/local/bin/ccstatusline-wrapper"
107+
},
108+
"enabledPlugins": {
109+
"frontend-design@anthropics/claude-code": true,
110+
"code-review@anthropics/claude-code": true,
111+
"feature-dev@anthropics/claude-code": true,
112+
"pr-review-toolkit@anthropics/claude-code": true,
113+
"codeforge-lsp@devs-marketplace": false,
114+
"ticket-workflow@devs-marketplace": false,
115+
"notify-hook@devs-marketplace": false,
116+
"dangerous-command-blocker@devs-marketplace": false,
117+
"protected-files-guard@devs-marketplace": true,
118+
"agent-system@devs-marketplace": true,
119+
"skill-engine@devs-marketplace": false,
120+
"spec-workflow@devs-marketplace": false,
121+
"session-context@devs-marketplace": false,
122+
"auto-code-quality@devs-marketplace": true,
123+
"workspace-scope-guard@devs-marketplace": true,
124+
"prompt-snippets@devs-marketplace": true,
125+
"git-workflow@devs-marketplace": false
126+
},
127+
"autoUpdatesChannel": "latest",
128+
"model": "claude-opus-4-6[1m]",
129+
"autoCompactWindow": 400000
130+
}

0 commit comments

Comments
 (0)