one-code-extension 0.4.0 → 0.5.0
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 +219 -219
- package/agents/general-purpose.md +2 -2
- package/docs/guide/README.md +2 -1
- package/docs/guide/bring-your-claude-code-setup.md +60 -9
- package/docs/guide/configuration.md +48 -14
- package/docs/guide/differences-from-claude-code.md +32 -23
- package/docs/guide/doctor.md +20 -13
- package/docs/guide/hooks.md +18 -3
- package/docs/guide/installation.md +27 -4
- package/docs/guide/permissions-modes-and-auto-mode.md +225 -49
- package/docs/guide/providers-and-models.md +137 -54
- package/docs/guide/reference.md +27 -15
- package/docs/guide/sessions-and-context.md +69 -16
- package/docs/guide/skills-plugins-and-mcp.md +57 -20
- package/docs/guide/subagents-and-workflows.md +95 -29
- package/docs/guide/tasks-and-background-work.md +101 -26
- package/docs/guide/terminal-interface.md +24 -12
- package/docs/guide/tools.md +46 -5
- package/docs/guide/troubleshooting.md +13 -9
- package/docs/guide/windows.md +66 -34
- package/extensions/artifacts/gallery.ts +227 -0
- package/extensions/artifacts/index.ts +288 -0
- package/extensions/artifacts/store.ts +570 -0
- package/extensions/artifacts/viewer.ts +199 -0
- package/extensions/ask-user/description.ts +67 -0
- package/extensions/ask-user/dialogs.ts +80 -0
- package/extensions/ask-user/index.ts +37 -33
- package/extensions/ask-user/questions.ts +32 -7
- package/extensions/ask-user/widget.ts +45 -25
- package/extensions/auto-mode/actions.ts +6 -0
- package/extensions/auto-mode/cache.ts +88 -0
- package/extensions/auto-mode/classifier-prompt.ts +5 -4
- package/extensions/auto-mode/classifier.ts +290 -65
- package/extensions/auto-mode/config.ts +72 -20
- package/extensions/auto-mode/decision-log.ts +2 -0
- package/extensions/auto-mode/defaults.ts +1 -1
- package/extensions/auto-mode/denials.ts +123 -0
- package/extensions/auto-mode/git-checkout-programs.ts +187 -0
- package/extensions/auto-mode/git-status-meta.ts +159 -0
- package/extensions/auto-mode/history.ts +189 -0
- package/extensions/auto-mode/instructions.ts +58 -52
- package/extensions/auto-mode/model-select.ts +159 -134
- package/extensions/auto-mode/paths.ts +57 -5
- package/extensions/auto-mode/pause.ts +57 -2
- package/extensions/auto-mode/prompt.ts +37 -21
- package/extensions/auto-mode/read-only-options.ts +724 -0
- package/extensions/auto-mode/resolved-paths-meta.ts +133 -0
- package/extensions/auto-mode/rules.ts +18 -1
- package/extensions/auto-mode/safety-floor.ts +361 -18
- package/extensions/auto-mode/setup-run.ts +20 -14
- package/extensions/auto-mode/shell-analysis.ts +764 -490
- package/extensions/auto-mode/shell-parse.ts +885 -0
- package/extensions/auto-mode/system-note.ts +33 -0
- package/extensions/auto-mode/transcript.ts +80 -51
- package/extensions/background/cron.ts +515 -0
- package/extensions/background/index.ts +514 -236
- package/extensions/background/loop-fire.ts +136 -0
- package/extensions/background/loop-preamble.ts +59 -0
- package/extensions/background/loop-skill.ts +163 -0
- package/extensions/background/monitor-batch.ts +53 -0
- package/extensions/background/noop-fold.ts +128 -0
- package/extensions/background/switch-guard.ts +52 -0
- package/extensions/background/wakeup.ts +159 -55
- package/extensions/bash/background.ts +53 -17
- package/extensions/bash/child.ts +7 -0
- package/extensions/bash/description.ts +188 -0
- package/extensions/bash/guards.ts +15 -67
- package/extensions/bash/index.ts +88 -35
- package/extensions/branding/compaction-keep.ts +63 -0
- package/extensions/branding/declined.ts +22 -0
- package/extensions/branding/index.ts +133 -9
- package/extensions/branding/prompt-editor.ts +53 -6
- package/extensions/branding/queued-edit.ts +31 -0
- package/extensions/branding/replaced-builtins.ts +68 -0
- package/extensions/branding/startup.ts +33 -71
- package/extensions/btw/index.ts +229 -71
- package/extensions/btw/panel.ts +228 -100
- package/extensions/btw/prompt.ts +41 -4
- package/extensions/claude-compat/index.ts +7 -11
- package/extensions/claude-context/index.ts +446 -58
- package/extensions/compaction/cut.ts +157 -0
- package/extensions/compaction/index.ts +216 -75
- package/extensions/compaction/kept-thinking.ts +62 -0
- package/extensions/compaction/prompt.ts +15 -12
- package/extensions/context-budget/index.ts +24 -5
- package/extensions/context-management/index.ts +25 -0
- package/extensions/doctor/build.ts +59 -8
- package/extensions/doctor/builtins.ts +84 -0
- package/extensions/doctor/cli.ts +7 -1
- package/extensions/doctor/compat.ts +88 -23
- package/extensions/doctor/dependencies.ts +41 -5
- package/extensions/doctor/fix-prompt.ts +9 -2
- package/extensions/doctor/index.ts +102 -58
- package/extensions/doctor/models.ts +102 -63
- package/extensions/doctor/presets.ts +42 -27
- package/extensions/doctor/report.ts +19 -2
- package/extensions/doctor/viewer.ts +49 -27
- package/extensions/effort/index.ts +72 -19
- package/extensions/effort/settings.ts +21 -0
- package/extensions/effort/slider.ts +24 -20
- package/extensions/exit/index.ts +32 -1
- package/extensions/file-tracker/index.ts +337 -26
- package/extensions/file-tracker/replay.ts +96 -10
- package/extensions/file-tracker/restore.ts +63 -0
- package/extensions/file-tracker/results.ts +66 -0
- package/extensions/file-tracker/shell-reads.ts +211 -0
- package/extensions/file-tracker/tracker.ts +32 -15
- package/extensions/footer/footer-line.ts +45 -24
- package/extensions/footer/index.ts +47 -2
- package/extensions/footer/pr.ts +34 -5
- package/extensions/hooks/compaction.ts +7 -0
- package/extensions/hooks/executor.ts +32 -30
- package/extensions/hooks/index.ts +198 -31
- package/extensions/hooks/matcher.ts +3 -0
- package/extensions/hooks/protocol.ts +41 -3
- package/extensions/hooks/settings.ts +50 -19
- package/extensions/hooks/subagent-bridge.ts +2 -0
- package/extensions/hooks/trust.ts +13 -5
- package/extensions/idle-compact/index.ts +119 -0
- package/extensions/idle-compact/policy.ts +143 -0
- package/extensions/init/index.ts +11 -10
- package/extensions/init/prompt.ts +25 -32
- package/extensions/interrupted/index.ts +13 -1
- package/extensions/kept-thinking/index.ts +27 -0
- package/extensions/lib/agent-cron.ts +130 -0
- package/extensions/lib/agent-loader.ts +15 -1
- package/extensions/lib/agent-view.ts +85 -0
- package/extensions/lib/anthropic-payload.ts +82 -1
- package/extensions/lib/anthropic-server-call.ts +230 -0
- package/extensions/lib/anthropic-server-tools.ts +485 -0
- package/extensions/lib/app-launch.mjs +94 -0
- package/extensions/lib/argument-hints.ts +190 -0
- package/extensions/lib/atomic-write.ts +6 -2
- package/extensions/lib/auto-memory.ts +75 -0
- package/extensions/lib/bash-parser.ts +84 -0
- package/extensions/lib/btw-fork.ts +93 -0
- package/extensions/lib/child-extensions.ts +42 -0
- package/extensions/lib/child-writes.ts +45 -0
- package/extensions/lib/claude-context.ts +515 -100
- package/extensions/lib/claude-external-includes.ts +68 -0
- package/extensions/lib/claude-id.ts +22 -0
- package/extensions/lib/claude-rules.ts +323 -0
- package/extensions/lib/claude-settings.ts +76 -4
- package/extensions/lib/compaction-boundary.ts +36 -0
- package/extensions/lib/compaction-keep.mjs +83 -0
- package/extensions/lib/config-mode.ts +112 -0
- package/extensions/lib/consent-dialogs.ts +63 -0
- package/extensions/lib/consent-preview.ts +5 -1
- package/extensions/lib/consent-stores.ts +48 -0
- package/extensions/lib/context-facts.ts +78 -0
- package/extensions/lib/context-stack.ts +81 -0
- package/extensions/lib/deferred.ts +219 -25
- package/extensions/lib/dock-rows.ts +60 -0
- package/extensions/lib/empty-tool-result.ts +27 -0
- package/extensions/lib/environment-block.ts +76 -0
- package/extensions/lib/fetch-timeout.ts +24 -6
- package/extensions/{system-prompt → lib}/git-status.ts +51 -13
- package/extensions/lib/git.ts +75 -13
- package/extensions/lib/grammars/LICENSE-tree-sitter-bash +21 -0
- package/extensions/lib/grammars/README.md +2 -0
- package/extensions/lib/grammars/tree-sitter-bash.wasm +0 -0
- package/extensions/lib/guide-docs.ts +45 -0
- package/extensions/lib/headless-output.ts +46 -0
- package/extensions/lib/hook-gate.ts +7 -7
- package/extensions/lib/interrupt.ts +20 -4
- package/extensions/lib/key-input.ts +455 -0
- package/extensions/lib/keys.ts +14 -1
- package/extensions/lib/local-command.ts +47 -13
- package/extensions/lib/mcp-overrides.ts +1 -1
- package/extensions/lib/mcp-share.ts +46 -0
- package/extensions/lib/memory-content.ts +146 -0
- package/extensions/lib/memory-index.ts +18 -0
- package/extensions/lib/memory.ts +134 -123
- package/extensions/lib/model-catalog/huggingface.json +174 -0
- package/extensions/lib/model-catalog/models-dev.json +18297 -0
- package/extensions/lib/model-catalog/openrouter.json +5252 -0
- package/extensions/lib/model-catalog-data.ts +513 -0
- package/extensions/lib/model-catalog.ts +462 -0
- package/extensions/lib/model-choice-warnings.ts +137 -0
- package/extensions/lib/model-pairings.ts +152 -0
- package/extensions/{auto-mode → lib}/model-picker.ts +26 -43
- package/extensions/lib/model-policy.ts +112 -15
- package/extensions/lib/model-tier.ts +283 -355
- package/extensions/lib/model-unusable.ts +1 -1
- package/extensions/lib/newer-model.ts +100 -0
- package/extensions/lib/notices.ts +87 -0
- package/extensions/lib/notifications.ts +308 -64
- package/extensions/lib/one-code-settings.ts +74 -8
- package/extensions/lib/open-browser.ts +63 -0
- package/extensions/lib/openrouter-generation.ts +94 -0
- package/extensions/lib/operation-deadline.ts +30 -0
- package/extensions/lib/original-command.ts +4 -4
- package/extensions/lib/package-version.ts +1 -1
- package/extensions/lib/panel-focus.ts +134 -0
- package/extensions/lib/paths.ts +17 -2
- package/extensions/lib/permission-gate.ts +72 -6
- package/extensions/lib/persisted-output.ts +60 -8
- package/extensions/lib/pi-ai-estimate.ts +19 -3
- package/extensions/lib/pi-version.ts +21 -2
- package/extensions/lib/plan-mode-channels.ts +20 -5
- package/extensions/lib/plugins.ts +26 -17
- package/extensions/lib/powershell-parse-script.ts +208 -0
- package/extensions/lib/powershell-parser.ts +344 -0
- package/extensions/lib/process-tree.ts +131 -8
- package/extensions/lib/prompt-options.ts +82 -0
- package/extensions/lib/queued-delivery.ts +44 -0
- package/extensions/lib/reminders.ts +364 -58
- package/extensions/lib/replaced-builtins.mjs +199 -0
- package/extensions/lib/replay-call.ts +70 -0
- package/extensions/lib/request-replay.ts +439 -0
- package/extensions/lib/scratchpad.ts +81 -14
- package/extensions/lib/send-now-channel.ts +7 -0
- package/extensions/lib/session-model-tier.ts +51 -0
- package/extensions/lib/session-work.ts +64 -0
- package/extensions/lib/settings-channels.ts +4 -4
- package/extensions/lib/shell-exit-semantics.ts +170 -0
- package/extensions/lib/shell-quote.ts +11 -0
- package/extensions/lib/shell-result.ts +70 -0
- package/extensions/lib/shell-spawn.ts +70 -6
- package/extensions/lib/shell-tool.ts +75 -25
- package/extensions/lib/side-call-cache.ts +124 -0
- package/extensions/lib/side-call-run.ts +96 -0
- package/extensions/lib/side-call-usage.ts +38 -0
- package/extensions/lib/side-call.ts +13 -1
- package/extensions/lib/single-flight.ts +18 -0
- package/extensions/lib/skill-body.ts +42 -0
- package/extensions/lib/skill-scan.ts +63 -24
- package/extensions/lib/spill-file.ts +140 -0
- package/extensions/lib/subagent-handback.ts +113 -0
- package/extensions/lib/system-role.ts +156 -0
- package/extensions/lib/terminal-text.ts +114 -0
- package/extensions/lib/text-width.ts +47 -16
- package/extensions/lib/timer-ops.ts +20 -0
- package/extensions/lib/tool-additions.ts +149 -0
- package/extensions/lib/tool-call-corruption.ts +134 -0
- package/extensions/lib/tool-path.ts +66 -0
- package/extensions/lib/tool-variants.ts +69 -0
- package/extensions/lib/tui-render.ts +255 -27
- package/extensions/lib/turn-budget-layout.ts +143 -0
- package/extensions/lib/update-check.mjs +15 -2
- package/extensions/lib/usage-bus.ts +1 -1
- package/extensions/lib/user-denial.ts +38 -0
- package/extensions/lib/workspace-channel.ts +16 -0
- package/extensions/lib/worktree-channel.ts +31 -3
- package/extensions/lib/worktree-isolation.ts +40 -10
- package/extensions/lsp/client.ts +8 -9
- package/extensions/lsp/index.ts +70 -4
- package/extensions/lsp/keep-alive.ts +1 -1
- package/extensions/lsp/trust.ts +119 -0
- package/extensions/lsp/watcher.ts +1 -1
- package/extensions/mcp/announce.ts +87 -5
- package/extensions/mcp/client.ts +161 -48
- package/extensions/mcp/config.ts +132 -8
- package/extensions/mcp/discovery.ts +19 -0
- package/extensions/mcp/index.ts +209 -71
- package/extensions/mcp/oauth/browser.ts +38 -17
- package/extensions/mcp/oauth/flow.ts +25 -17
- package/extensions/mcp/oauth/provider.ts +14 -8
- package/extensions/mcp/oauth/store.ts +34 -16
- package/extensions/mcp/panel/keys.ts +12 -11
- package/extensions/mcp/panel/render.ts +9 -6
- package/extensions/mcp/schema.ts +104 -5
- package/extensions/mcp/trust.ts +151 -67
- package/extensions/memory/entries.ts +23 -14
- package/extensions/memory/index.ts +134 -28
- package/extensions/memory/open-external.ts +33 -18
- package/extensions/memory/panel.ts +135 -26
- package/extensions/newer-model/index.ts +31 -0
- package/extensions/notebook/description.ts +18 -0
- package/extensions/notebook/index.ts +6 -5
- package/extensions/notebook/notebook.ts +1 -1
- package/extensions/permissions/index.ts +1300 -381
- package/extensions/permissions/matcher.ts +425 -74
- package/extensions/permissions/modes.ts +6 -4
- package/extensions/permissions/panel/host.ts +130 -0
- package/extensions/permissions/panel/keys.ts +48 -0
- package/extensions/permissions/panel/render.ts +450 -0
- package/extensions/permissions/panel/state.ts +550 -0
- package/extensions/permissions/powershell-cmdlets.ts +198 -0
- package/extensions/permissions/powershell-paths.ts +197 -0
- package/extensions/permissions/powershell-rules.ts +207 -280
- package/extensions/permissions/powershell-tree.ts +557 -0
- package/extensions/permissions/project-trust.ts +27 -11
- package/extensions/permissions/protected-paths.ts +14 -2
- package/extensions/permissions/session-grant.ts +6 -0
- package/extensions/permissions/settings.ts +166 -31
- package/extensions/permissions/subagent-gate.ts +25 -0
- package/extensions/permissions/workspace.ts +78 -0
- package/extensions/plan-mode/index.ts +156 -69
- package/extensions/plan-mode/reminder.ts +89 -21
- package/extensions/plan-mode/texts.ts +177 -0
- package/extensions/plan-mode/viewer.ts +92 -27
- package/extensions/plugins/counts.ts +3 -3
- package/extensions/plugins/index.ts +61 -46
- package/extensions/plugins/install/install.ts +16 -0
- package/extensions/plugins/marketplace/sync.ts +9 -3
- package/extensions/plugins/marketplace/types.ts +3 -1
- package/extensions/plugins/panel/keys.ts +21 -24
- package/extensions/plugins/panel/render.ts +12 -6
- package/extensions/plugins/shell-expand.ts +107 -0
- package/extensions/plugins/template.ts +32 -15
- package/extensions/powershell/child.ts +7 -0
- package/extensions/powershell/description.ts +38 -6
- package/extensions/powershell/guards.ts +1 -1
- package/extensions/powershell/index.ts +12 -7
- package/extensions/recap/index.ts +65 -60
- package/extensions/recap/prompt.ts +2 -2
- package/extensions/recap/scheduler.ts +3 -5
- package/extensions/search-tools/grep-merge.ts +39 -0
- package/extensions/search-tools/index.ts +0 -0
- package/extensions/send-now/chord.ts +62 -0
- package/extensions/send-now/index.ts +133 -0
- package/extensions/session-title/index.ts +3 -0
- package/extensions/session-title/title.ts +4 -1
- package/extensions/skill/code-review.ts +97 -0
- package/extensions/skill/index.ts +421 -101
- package/extensions/skill/invoke.ts +128 -18
- package/extensions/skill/listing.ts +133 -9
- package/extensions/skill/panel/keys.ts +15 -16
- package/extensions/skill/panel/render.ts +5 -2
- package/extensions/skill/panel/state.ts +12 -1
- package/extensions/subagents/agent-args.ts +39 -0
- package/extensions/subagents/agent-description.ts +132 -0
- package/extensions/subagents/agents.ts +116 -23
- package/extensions/subagents/announce.ts +69 -0
- package/extensions/subagents/default-model.ts +2 -3
- package/extensions/subagents/delegation-steer.ts +4 -4
- package/extensions/subagents/fork-cache.ts +76 -0
- package/extensions/subagents/guide-agent.ts +189 -0
- package/extensions/subagents/hand-back-review.ts +3 -0
- package/extensions/subagents/index.ts +1493 -824
- package/extensions/subagents/live-runs.ts +26 -6
- package/extensions/subagents/model-select.ts +38 -25
- package/extensions/subagents/outcome.ts +2 -2
- package/extensions/subagents/panel-keys.ts +73 -31
- package/extensions/subagents/panel-render.ts +120 -96
- package/extensions/subagents/panel-widget.ts +60 -89
- package/extensions/subagents/runner.ts +108 -80
- package/extensions/subagents/runs.ts +39 -5
- package/extensions/subagents/send-to-main-tool.ts +1 -1
- package/extensions/subagents/session-turns.ts +32 -8
- package/extensions/subagents/shell-panel.ts +36 -178
- package/extensions/subagents/tasks-dialog.ts +170 -0
- package/extensions/subagents/viewport-mirror.ts +95 -0
- package/extensions/subagents/worktree.ts +57 -13
- package/extensions/system-prompt/environment.ts +19 -19
- package/extensions/system-prompt/idle-turn.ts +65 -0
- package/extensions/system-prompt/index.ts +131 -47
- package/extensions/system-prompt/template.ts +24 -50
- package/extensions/system-prompt/tiers/common.ts +23 -64
- package/extensions/system-prompt/tiers/frontier.ts +32 -11
- package/extensions/system-prompt/tiers/low.ts +67 -45
- package/extensions/system-prompt/tiers/mid.ts +96 -38
- package/extensions/system-reminder/index.ts +175 -13
- package/extensions/tasks/descriptions.ts +190 -0
- package/extensions/tasks/index.ts +120 -41
- package/extensions/tasks/store.ts +83 -16
- package/extensions/tool-call-corruption/child.ts +7 -0
- package/extensions/tool-call-corruption/index.ts +237 -0
- package/extensions/tool-search/announce.ts +16 -0
- package/extensions/tool-search/index.ts +189 -41
- package/extensions/tool-style/index.ts +68 -10
- package/extensions/tool-style/write-description.ts +40 -0
- package/extensions/tool-style/write-render.ts +237 -0
- package/extensions/turn-duration/index.ts +7 -3
- package/extensions/turn-duration/line.ts +47 -4
- package/extensions/web/backends.ts +6 -9
- package/extensions/web/description.ts +50 -0
- package/extensions/web/index.ts +118 -53
- package/extensions/web/native-call.ts +15 -0
- package/extensions/web/native-results.ts +41 -0
- package/extensions/web-fetch/description.ts +42 -0
- package/extensions/web-fetch/extract.ts +53 -6
- package/extensions/web-fetch/index.ts +125 -76
- package/extensions/web-fetch/page-content.ts +19 -0
- package/extensions/web-fetch/response.ts +49 -0
- package/extensions/web-fetch/summarize.ts +9 -10
- package/extensions/workflow/agent-session.ts +105 -18
- package/extensions/workflow/args.ts +24 -0
- package/extensions/workflow/description.ts +67 -0
- package/extensions/workflow/globals.ts +17 -3
- package/extensions/workflow/index.ts +145 -162
- package/extensions/workflow/records.ts +1 -0
- package/extensions/workflow/run-manager.ts +29 -6
- package/extensions/workflow/saved-workflows.ts +3 -2
- package/extensions/workflow/types.ts +22 -1
- package/extensions/workflow/viewer.ts +54 -24
- package/extensions/workflow/widget.ts +20 -0
- package/extensions/worktree/descriptions.ts +91 -0
- package/extensions/worktree/guards.ts +316 -54
- package/extensions/worktree/index.ts +121 -39
- package/extensions/worktree/powershell-guards.ts +167 -0
- package/extensions/worktree/rewrite.ts +14 -16
- package/package.json +19 -7
- package/skills/artifact-design/SKILL.md +85 -0
- package/skills/code-review/SKILL.md +20 -20
- package/skills/code-review/cells/arguments-and-flags.md +19 -0
- package/skills/code-review/cells/high-3x5-recall-verify.md +137 -0
- package/skills/code-review/cells/high-8-inline.md +122 -0
- package/skills/code-review/cells/low-1-pass-max4.md +27 -0
- package/skills/code-review/cells/low-1-pass-min-files-4.md +28 -0
- package/skills/code-review/cells/max-5x5-verify-sweep.md +162 -0
- package/skills/code-review/cells/medium-3x5-verify.md +132 -0
- package/skills/code-review/cells/minimal-prompt.md +32 -0
- package/skills/code-review/cells/xhigh-10-inline-sweep.md +149 -0
- package/skills/code-review/cells/xhigh-5x5-verify-sweep.md +162 -0
- package/skills/fewer-permission-prompts/SKILL.md +1 -1
- package/skills/loop/SKILL.md +11 -0
- package/skills/security-review/SKILL.md +2 -5
- package/skills/simplify/SKILL.md +7 -5
- package/skills/workflow-authoring/SKILL.md +143 -0
- package/themes/onecode-light.json +1 -1
- package/themes/onecode.json +1 -1
- package/types/app.d.ts +58 -0
- package/types/community-packages.d.ts +26 -1
- package/extensions/auto-mode/recoverability.ts +0 -229
- package/extensions/lib/capability-index.ts +0 -466
- package/extensions/lib/model-facts.generated.json +0 -2675
- package/extensions/lib/model-facts.ts +0 -162
package/README.md
CHANGED
|
@@ -4,114 +4,34 @@
|
|
|
4
4
|
|
|
5
5
|
**Claude Code with the model slot left open. The full workflow, open source, on any model or provider.**
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
One Code rebuilds the Claude Code workflow around the model you choose.
|
|
8
|
+
Subagents, Git worktrees, auto mode, plan mode, permissions, and context
|
|
9
|
+
management all live in the harness, so they come along whatever model you
|
|
10
|
+
put in it. Your `CLAUDE.md`, skills, commands, agents, and permission rules
|
|
11
|
+
carry over with no import step.
|
|
12
|
+
|
|
13
|
+
If you already use Claude Code, nothing here needs relearning. Pick a model,
|
|
14
|
+
give it a task, review its plan, and let it work. Switch models mid-session,
|
|
15
|
+
or give each subagent its own model and provider: a frontier model on the
|
|
16
|
+
main task, a cheaper one for exploration and tests.
|
|
17
|
+
|
|
18
|
+
One Code is an independent, open-source implementation built on
|
|
19
|
+
[pi](https://github.com/earendil-works/pi). It recreates the coding workflow;
|
|
20
|
+
features that depend on Claude Code's hosted or desktop services are outside
|
|
21
|
+
its scope.
|
|
16
22
|
|
|
17
23
|
<p align="center">
|
|
18
|
-
<img src="demo/onecode.gif" alt="One Code
|
|
24
|
+
<img src="demo/onecode.gif" alt="One Code terminal showing permission modes, a model switch, an approved edit, a side question, diagnostics, and a running subagent" width="820">
|
|
19
25
|
</p>
|
|
20
26
|
|
|
21
27
|
[User guide](docs/guide/README.md) ·
|
|
22
|
-
[
|
|
28
|
+
[Reuse your Claude Code setup](docs/guide/bring-your-claude-code-setup.md) ·
|
|
23
29
|
[Differences from Claude Code](docs/guide/differences-from-claude-code.md) ·
|
|
24
30
|
[Command reference](docs/guide/reference.md)
|
|
25
31
|
|
|
26
|
-
## ✨ What you get
|
|
27
|
-
|
|
28
|
-
- **Any model, any provider.** Anthropic, OpenAI, Gemini, OpenRouter, or a
|
|
29
|
-
local model. Bring your own and switch mid-session with `/model`. Nothing
|
|
30
|
-
stops you.
|
|
31
|
-
- **Mix providers in one session.** The parent and each subagent pick their own
|
|
32
|
-
model and provider, so an ultracode workflow can fan out to a cheap tier while
|
|
33
|
-
the parent stays on a frontier model. A single-gateway setup cannot do this,
|
|
34
|
-
which is usually the reason people switch.
|
|
35
|
-
- **Your Claude Code setup runs unchanged.** `CLAUDE.md`, `.claude/commands`,
|
|
36
|
-
`.claude/skills`, `.claude/agents`, `.mcp.json`, plugins, and permission rules
|
|
37
|
-
are picked up as they are. No migration, and no second config file to keep in
|
|
38
|
-
sync. A directory with no `CLAUDE.md` falls back to its `AGENTS.md`, the
|
|
39
|
-
cross-tool convention Claude Code now reads too, so a repo written for another
|
|
40
|
-
agent works here with nothing to change.
|
|
41
|
-
- **Capability-tiered prompting.** A weaker model gets more guidance, not less.
|
|
42
|
-
Not out of politeness; it is how you get output you can use.
|
|
43
|
-
- **A package, not a fork.** One Code is a [pi](https://github.com/earendil-works/pi)
|
|
44
|
-
package, so you extend it with your own extensions, themes, and settings.
|
|
45
|
-
Forks go stale; packages do not have to.
|
|
46
|
-
- **Free and open source** under the MIT license.
|
|
47
|
-
|
|
48
|
-
## 🤔 "But I can already point Claude Code at Ollama"
|
|
49
|
-
|
|
50
|
-
You can:
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
export ANTHROPIC_BASE_URL="http://localhost:11434"
|
|
54
|
-
claude --model kimi-k2.7-code:cloud
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Claude Code will happily talk to whoever picks up the phone. If one model
|
|
58
|
-
behind Claude Code's interface is all you want, enjoy it.
|
|
59
|
-
|
|
60
|
-
The catch: you swapped the brain and told the body nothing. Claude Code's
|
|
61
|
-
prompts, caching, and side calls all assume a current Claude is on the other
|
|
62
|
-
end, and that assumption doesn't come off with an environment variable.
|
|
63
|
-
|
|
64
|
-
One Code started as the experiment that follows from that. My
|
|
65
|
-
[Harness Engineering 101](https://isuruwijesiri.com/harness-engineering-101/)
|
|
66
|
-
series argues the model is the brain and the harness is the body, and the good
|
|
67
|
-
parts live in the body. So: rebuild the body from scratch on a model-neutral
|
|
68
|
-
runtime and put any brain in it. This repository is that rebuild, and here's
|
|
69
|
-
what it does that a base URL can't.
|
|
70
|
-
|
|
71
|
-
- **One phone line.** You can rename the subagent model in Claude Code, but
|
|
72
|
-
every call, main agent, subagents, classifier, compaction, still dials the one
|
|
73
|
-
endpoint behind that URL. Mixing providers means running a routing gateway
|
|
74
|
-
and maintaining it. One Code gives each seat its own brain on its own
|
|
75
|
-
provider, natively. A frontier model in charge, DeepSeek V4 Flash running
|
|
76
|
-
twelve subagents. That's the setup this was built for.
|
|
77
|
-
- **Subscriptions don't fit behind a base URL.** A gateway wants API keys. One
|
|
78
|
-
Code signs you in with the account you already pay for: Claude Pro and Max,
|
|
79
|
-
ChatGPT, GitHub Copilot, OpenRouter, Kimi, xAI, and Radius all have native
|
|
80
|
-
OAuth logins, and you can mix them in one session.
|
|
81
|
-
- **Someone else's prompt.** Claude Code's prompt is about 8k characters,
|
|
82
|
-
because Claude 5 doesn't need hand-holding. Give it to a smaller model and
|
|
83
|
-
you get a stranger reading Claude's notes. One Code sizes the prompt to the
|
|
84
|
-
model in four tiers, down to playbooks and strict-schema search tools for
|
|
85
|
-
flash-class and local models. Weaker brains need more body.
|
|
86
|
-
- **Cache misses, billed to you.** Anthropic caches at explicit `cache_control`
|
|
87
|
-
markers; most other providers cache on an exact prefix, and the two do not
|
|
88
|
-
line up. A gateway that translates between them silently maps the markers
|
|
89
|
-
wrong, so the cache sticks at the system prompt and never advances, or never
|
|
90
|
-
forms at all. Nothing errors. You just pay full price every turn. This is not
|
|
91
|
-
hypothetical: users report proxies where the cache-creation count is zero on
|
|
92
|
-
every turn and half the turns re-bill the whole context, and Claude Code's own
|
|
93
|
-
attribution header defeats caching behind a base URL unless you know the flag
|
|
94
|
-
to turn off. One Code speaks each provider's native API, keeps the prefix
|
|
95
|
-
byte-stable, and shows the live hit rate in the footer, because one careless
|
|
96
|
-
byte up top is a tenfold price increase.
|
|
97
|
-
- **Anthropic-only parts.** Deferred tools, server-side web search, the
|
|
98
|
-
thinking block. A foreign endpoint drops them. One Code has a
|
|
99
|
-
provider-neutral version of each.
|
|
100
|
-
- **Side jobs that ask for Haiku by name.** Your gateway had better know who
|
|
101
|
-
that is. One Code picks side models from your provider's own catalog, with
|
|
102
|
-
a capability floor.
|
|
103
|
-
- **A knob, not a toolbox.** Claude Code isn't open source; the base URL is
|
|
104
|
-
the one knob. One Code is pi extensions all the way down, so anything
|
|
105
|
-
missing is one more extension.
|
|
106
|
-
|
|
107
|
-
The base URL trick swaps the brain and hopes the body doesn't notice. One Code
|
|
108
|
-
is the body that was built to notice.
|
|
109
|
-
|
|
110
32
|
## 🚀 Get started
|
|
111
33
|
|
|
112
|
-
|
|
113
|
-
Linux; WSL works too. Native Windows runs in Claude Code's shape (Git Bash
|
|
114
|
-
optional, PowerShell tool) — see the [Windows guide](docs/guide/windows.md).
|
|
34
|
+
Install **Node.js 22.19 or later**, then run:
|
|
115
35
|
|
|
116
36
|
```bash
|
|
117
37
|
npm install -g @one-ai/one-code
|
|
@@ -119,194 +39,271 @@ cd your-project
|
|
|
119
39
|
onecode
|
|
120
40
|
```
|
|
121
41
|
|
|
122
|
-
Inside One Code, run `/login` to connect a provider, then `/model` to
|
|
123
|
-
model. You can also
|
|
42
|
+
Inside One Code, run `/login` to connect a provider, then `/model` to choose a
|
|
43
|
+
model. You can also supply an API key through an environment variable such as
|
|
124
44
|
`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, or `OPENROUTER_API_KEY`.
|
|
125
45
|
|
|
126
|
-
|
|
127
|
-
|
|
46
|
+
One Code reads an existing `CLAUDE.md` and `.claude/` configuration directly.
|
|
47
|
+
If a directory has no `CLAUDE.md`, it falls back to `AGENTS.md`. For a new
|
|
48
|
+
project, run `/init` to draft a `CLAUDE.md`.
|
|
49
|
+
|
|
50
|
+
To check your setup, run `onecode doctor` or `/doctor report` inside a session.
|
|
51
|
+
The report lists provider credentials, model assignments, detected configuration,
|
|
52
|
+
and missing programs. Run `/doctor` for a checkup with agent-assisted fixes.
|
|
128
53
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
are missing. `/doctor` runs the full checkup and has the model fix what it finds.
|
|
54
|
+
One Code is developed on macOS and verified on macOS, Linux, and Windows.
|
|
55
|
+
WSL works too. For the native Windows setup and what has been checked there,
|
|
56
|
+
see the [Windows guide](docs/guide/windows.md).
|
|
133
57
|
|
|
134
|
-
One Code is free. Model access, usage charges, and rate
|
|
135
|
-
|
|
136
|
-
for connection options.
|
|
58
|
+
One Code is free under the MIT license. Model access, usage charges, and rate
|
|
59
|
+
limits depend on your provider. See
|
|
60
|
+
[Providers and models](docs/guide/providers-and-models.md) for connection options.
|
|
137
61
|
|
|
138
|
-
### Other
|
|
62
|
+
### Other installation options
|
|
139
63
|
|
|
140
|
-
**Homebrew
|
|
64
|
+
**Homebrew**, which installs Node.js for you:
|
|
141
65
|
|
|
142
66
|
```bash
|
|
143
67
|
brew install isurumaduranga/one-ai/onecode
|
|
144
68
|
```
|
|
145
69
|
|
|
146
|
-
**Windows
|
|
70
|
+
**Windows installer**, which installs Node.js and One Code:
|
|
147
71
|
|
|
148
72
|
```powershell
|
|
149
73
|
powershell -c "irm https://raw.githubusercontent.com/IsuruMaduranga/one-code/master/install.ps1 | iex"
|
|
150
74
|
```
|
|
151
75
|
|
|
152
|
-
**
|
|
76
|
+
**Existing pi installation**:
|
|
153
77
|
|
|
154
78
|
```bash
|
|
155
79
|
pi install npm:one-code-extension
|
|
156
80
|
```
|
|
157
81
|
|
|
158
|
-
The
|
|
159
|
-
bundles a pinned pi and
|
|
160
|
-
[`one-code-extension`](https://www.npmjs.com/package/one-code-extension)
|
|
161
|
-
your
|
|
162
|
-
|
|
82
|
+
The [`@one-ai/one-code`](https://www.npmjs.com/package/@one-ai/one-code)
|
|
83
|
+
app package bundles a pinned version of pi and provides the `onecode` command.
|
|
84
|
+
The [`one-code-extension`](https://www.npmjs.com/package/one-code-extension)
|
|
85
|
+
package uses your existing pi installation and is tested against pi versions
|
|
86
|
+
0.84.3 through 1.3. For the extension package, use `pi` in place of `onecode`.
|
|
163
87
|
|
|
164
88
|
The app opens in a full-screen terminal interface by default. See the
|
|
165
|
-
[installation guide](docs/guide/installation.md) for display settings and more
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
89
|
+
[installation guide](docs/guide/installation.md) for display settings and more
|
|
90
|
+
installation details.
|
|
91
|
+
|
|
92
|
+
## ✨ Why One Code?
|
|
93
|
+
|
|
94
|
+
- **Choose models by task.** Use Anthropic, OpenAI, Gemini, OpenRouter, or a
|
|
95
|
+
local model. Switch the main model mid-session with `/model`.
|
|
96
|
+
- **Mix providers in one session.** Give the main agent and each subagent
|
|
97
|
+
their own model and provider, without configuring a routing gateway.
|
|
98
|
+
- **Reuse your Claude Code configuration.** One Code reads project
|
|
99
|
+
instructions, skills, commands, agents, plugins, permission rules, and
|
|
100
|
+
Model Context Protocol (MCP) server configuration. There is no import step.
|
|
101
|
+
- **Adapt guidance to the model.** Four capability tiers adjust prompting
|
|
102
|
+
and tool guidance, with more explicit instructions for smaller models.
|
|
103
|
+
- **Extend the harness.** One Code is a
|
|
104
|
+
[pi](https://github.com/earendil-works/pi) package built from extensions.
|
|
105
|
+
Add your own extensions, themes, and settings.
|
|
106
|
+
- **Inspect and change the code.** The project is open source under the
|
|
107
|
+
[MIT license](LICENSE).
|
|
108
|
+
|
|
109
|
+
## 🤔 Why not use Claude Code with a URL override?
|
|
110
|
+
|
|
111
|
+
You can point Claude Code at another endpoint with `ANTHROPIC_BASE_URL`.
|
|
112
|
+
If that endpoint supports the API Claude Code expects, this can be enough
|
|
113
|
+
to use an alternative model in a familiar interface.
|
|
114
|
+
|
|
115
|
+
The override changes where requests go. It does not, by itself, adapt the
|
|
116
|
+
prompts, provider features, authentication, or supporting model calls to
|
|
117
|
+
the model receiving them. Your endpoint or gateway has to bridge those gaps.
|
|
118
|
+
|
|
119
|
+
One Code builds that adaptation into the harness:
|
|
120
|
+
|
|
121
|
+
- **Different providers for different agents.** A URL override points
|
|
122
|
+
requests at one endpoint. To route those requests across providers, you
|
|
123
|
+
need a gateway. One Code connects each agent to its own provider directly.
|
|
124
|
+
The main agent can use a frontier model while subagents use a cheaper
|
|
125
|
+
model elsewhere.
|
|
126
|
+
- **Prompts matched to the model.** Changing the endpoint does not change
|
|
127
|
+
the instructions sent to the model. One Code uses four capability tiers
|
|
128
|
+
to adjust prompting and tool guidance. Smaller and local models receive
|
|
129
|
+
more explicit playbooks and structured search tools.
|
|
130
|
+
- **Native caching support.** Providers use different caching mechanisms.
|
|
131
|
+
An API-compatible response alone does not establish that a gateway
|
|
132
|
+
preserves caching behavior. One Code uses native provider integrations,
|
|
133
|
+
keeps prompt prefixes stable, and shows the cache hit rate in the footer.
|
|
134
|
+
- **Account sign-ins as well as API keys.** Changing a URL does not add
|
|
135
|
+
a provider's sign-in flow. One Code signs in with the accounts you
|
|
136
|
+
already have (Claude Pro and Max, ChatGPT, GitHub Copilot, OpenRouter,
|
|
137
|
+
Kimi, xAI, and Radius), and you can mix them with API-key connections in
|
|
138
|
+
the same session.
|
|
139
|
+
- **Tools and supporting calls that account for the provider.** Web search,
|
|
140
|
+
deferred tools, reasoning, and background model calls need more than an
|
|
141
|
+
endpoint change. One Code provides shared tool interfaces and selects
|
|
142
|
+
supporting models from the provider's catalog, subject to capability
|
|
143
|
+
requirements.
|
|
144
|
+
- **Auto mode on any provider.** Claude Code's auto mode now sends each
|
|
145
|
+
tool call to the API server for a safety check, using a request field
|
|
146
|
+
the endpoint has to support. Claude Code keeps its local classifier as a
|
|
147
|
+
fallback only for a while ([LiteLLM's notes](https://docs.litellm.ai/blog/claude-code-server-side-auto-mode)
|
|
148
|
+
give October 23, 2026), so an endpoint without that support can leave
|
|
149
|
+
auto mode unavailable. One Code runs its own two-stage classifier on a
|
|
150
|
+
model from your provider, so auto mode works wherever your models run.
|
|
151
|
+
- **An open harness you can change.** One Code's prompts, tools, and
|
|
152
|
+
workflows are implemented as pi extensions. You can inspect them,
|
|
153
|
+
change their behavior, and add your own.
|
|
154
|
+
|
|
155
|
+
Use a URL override when one compatible endpoint covers your needs. Use
|
|
156
|
+
One Code when you want the Claude Code workflow with model choice built
|
|
157
|
+
into the prompts, tools, authentication, and agent coordination.
|
|
158
|
+
|
|
159
|
+
See [Differences from Claude Code](docs/guide/differences-from-claude-code.md)
|
|
160
|
+
for the full comparison and compatibility boundaries.
|
|
161
|
+
|
|
162
|
+
## 🎛️ Use different models in one session
|
|
163
|
+
|
|
164
|
+
Keep your preferred model on the main task and delegate exploration, tests,
|
|
165
|
+
or review to another model or provider.
|
|
172
166
|
|
|
173
167
|
1. Choose the main model with `/model`.
|
|
174
|
-
2. Set the default for subagents and workflow agents with
|
|
168
|
+
2. Set the default model for subagents and workflow agents with
|
|
175
169
|
`/subagent <provider/model-id>`.
|
|
176
|
-
3. Ask for delegated work
|
|
170
|
+
3. Ask for delegated work. For example:
|
|
177
171
|
|
|
178
172
|
> Use subagents to investigate the authentication code and its tests.
|
|
179
173
|
> Have them report their findings, then make the fix in the main session.
|
|
180
174
|
|
|
181
|
-
Agent definitions in `.claude/agents/` can
|
|
182
|
-
instructions. Use `/agents` to follow their progress and `/model` to
|
|
183
|
-
main model as the task changes.
|
|
175
|
+
Agent definitions in `.claude/agents/` can specify their own model, tools,
|
|
176
|
+
and instructions. Use `/agents` to follow their progress and `/model` to
|
|
177
|
+
change the main model as the task changes.
|
|
184
178
|
|
|
185
|
-
|
|
186
|
-
|
|
179
|
+
Cost and output quality depend on the models, the task, and how much work
|
|
180
|
+
you delegate. See [Subagents and workflows](docs/guide/subagents-and-workflows.md)
|
|
181
|
+
for configuration details.
|
|
187
182
|
|
|
188
|
-
|
|
183
|
+
## ♻️ Reuse your Claude Code setup
|
|
189
184
|
|
|
190
|
-
|
|
185
|
+
One Code reads Claude Code configuration directly and keeps its own settings
|
|
186
|
+
separately. It treats `~/.claude` as read-only, with one deliberate exception:
|
|
187
|
+
per-repository memory is written to Claude Code's own memory folder, so both
|
|
188
|
+
tools share it.
|
|
191
189
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
| Your configuration | How One Code uses it |
|
|
190
|
+
| Configuration | How One Code uses it |
|
|
195
191
|
|---|---|
|
|
196
192
|
| `CLAUDE.md` | Project instructions, including nested files and `@path` imports. Falls back to `AGENTS.md` when a directory has no `CLAUDE.md`. |
|
|
197
193
|
| `.claude/skills/` and `.claude/commands/` | Discoverable skills and slash commands. |
|
|
198
|
-
| `.claude/agents/` | Subagent definitions with
|
|
194
|
+
| `.claude/agents/` | Subagent definitions with model, tool, and instruction settings. |
|
|
199
195
|
| `.claude/settings.json` | `allow`, `deny`, and `ask` permission rules, plus supported command hooks. |
|
|
200
|
-
| `.mcp.json` | MCP servers with tools loaded on demand. |
|
|
196
|
+
| `.mcp.json` | MCP servers, with tools loaded on demand. |
|
|
201
197
|
| Installed Claude Code plugins | Plugin agents, skills, commands, and MCP servers, namespaced by plugin. |
|
|
202
198
|
|
|
203
199
|
Claude Code tool names such as `Read`, `Bash`, `Edit`, and `Task` work in
|
|
204
|
-
permission rules and hook matchers.
|
|
205
|
-
|
|
200
|
+
permission rules and hook matchers.
|
|
201
|
+
|
|
202
|
+
Compatibility covers configuration and workflows. Features and skills that
|
|
203
|
+
depend on Claude Code's hosted or desktop services are not included.
|
|
206
204
|
|
|
207
|
-
|
|
208
|
-
|
|
205
|
+
See [Configuration compatibility](docs/guide/bring-your-claude-code-setup.md)
|
|
206
|
+
and [Skills, plugins, and MCP](docs/guide/skills-plugins-and-mcp.md).
|
|
209
207
|
|
|
210
|
-
|
|
211
|
-
[Skills, plugins, and MCP →](docs/guide/skills-plugins-and-mcp.md)
|
|
208
|
+
## ⚙️ Plan and delegate work
|
|
212
209
|
|
|
213
|
-
|
|
210
|
+
### Subagents and Git worktrees
|
|
214
211
|
|
|
215
|
-
|
|
212
|
+
Give an investigation its own context window and bring the results back to
|
|
213
|
+
the main conversation. Subagents run in the background, accept follow-up
|
|
214
|
+
messages, and can fork the conversation when they need its context.
|
|
216
215
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
can fork the current conversation when they need its context. Three agent
|
|
220
|
-
definitions ship with One Code: `general-purpose`, `explore`, and `plan`.
|
|
216
|
+
One Code includes three agent definitions: `general-purpose`, `explore`,
|
|
217
|
+
and `plan`.
|
|
221
218
|
|
|
222
|
-
For parallel edits, give agents
|
|
223
|
-
whole session into a worktree with `enter_worktree` and leave it with
|
|
219
|
+
For parallel edits, give agents separate Git worktrees. You can also move
|
|
220
|
+
the whole session into a worktree with `enter_worktree` and leave it with
|
|
224
221
|
`exit_worktree`.
|
|
225
222
|
|
|
226
223
|
### Ultracode workflows
|
|
227
224
|
|
|
228
|
-
|
|
229
|
-
model writes a JavaScript workflow
|
|
230
|
-
progress
|
|
231
|
-
|
|
225
|
+
Include **`ultracode`** in a request for a broad audit, migration, or review.
|
|
226
|
+
The model writes a JavaScript workflow to coordinate agents in parallel.
|
|
227
|
+
Follow progress in `/workflows`, or use `/effort ultracode` to keep this
|
|
228
|
+
behavior enabled across turns.
|
|
229
|
+
|
|
230
|
+
When you resume an interrupted run, completed agent calls can be reused if
|
|
231
|
+
their inputs still match. Save reusable scripts in `.claude/workflows/` to
|
|
232
|
+
call them by name.
|
|
232
233
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
Optional output-token targets stop new and queued agents once reached;
|
|
236
|
-
agents already running can finish above the target.
|
|
234
|
+
Optional output-token targets stop new and queued agents when the target
|
|
235
|
+
is reached. Agents already running can finish above the target.
|
|
237
236
|
|
|
238
237
|
### Permissions and planning
|
|
239
238
|
|
|
240
|
-
**Auto mode is the default.** A classifier
|
|
241
|
-
while permission rules and deterministic checks enforce the
|
|
242
|
-
|
|
243
|
-
and allow rules.
|
|
239
|
+
**Auto mode is the default.** A classifier evaluates actions that need
|
|
240
|
+
review, while permission rules and deterministic checks enforce the remaining
|
|
241
|
+
controls. `deny` rules take precedence over `allow` rules.
|
|
244
242
|
|
|
245
|
-
|
|
246
|
-
Plan mode lets the agent investigate and write a plan file before you approve
|
|
247
|
-
implementation. Use `/permissions` to inspect rules and `/auto-mode` to
|
|
248
|
-
configure the classifier.
|
|
243
|
+
Project-provided hooks, MCP servers, and allow rules require trust approval.
|
|
249
244
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
245
|
+
Press **ctrl+q**, or **alt+m** on Windows and WSL, to cycle through manual,
|
|
246
|
+
accept-edits, plan, and auto modes. In plan mode, the agent investigates and
|
|
247
|
+
writes a plan file before you approve implementation.
|
|
253
248
|
|
|
254
|
-
|
|
255
|
-
|
|
249
|
+
Use `/permissions` to manage rules and approve calls auto mode blocked, and
|
|
250
|
+
`/auto-mode` to configure the classifier.
|
|
251
|
+
|
|
252
|
+
The permission system provides application-level controls. For operating
|
|
253
|
+
system isolation, run One Code inside a container. See
|
|
254
|
+
[Permissions and modes](docs/guide/permissions-modes-and-auto-mode.md) for
|
|
255
|
+
guarantees and known limitations, and [Hooks](docs/guide/hooks.md) for
|
|
256
|
+
hook configuration.
|
|
256
257
|
|
|
257
258
|
## 🧰 Everyday tools
|
|
258
259
|
|
|
259
|
-
| Capability |
|
|
260
|
+
| Capability | Included features |
|
|
260
261
|
|---|---|
|
|
261
|
-
| Code and files |
|
|
262
|
-
| Web | Search and fetch,
|
|
263
|
-
| Diagnostics | Language
|
|
262
|
+
| Code and files | File reading, writing, and editing; shell commands; background processes; repository search; and notebook editing. |
|
|
263
|
+
| Web | Search and fetch, using provider search or Brave, Tavily, and Exa fallbacks. |
|
|
264
|
+
| Diagnostics | Language server diagnostics after edits. Install the relevant server on your `PATH`. |
|
|
264
265
|
| Long sessions | Per-repository memory, a session scratchpad, and context compaction. |
|
|
265
266
|
| Task tracking | A pinned progress widget, background monitors, and scheduled wake-ups. |
|
|
266
|
-
| Tool discovery |
|
|
267
|
-
|
|
|
268
|
-
|
|
|
267
|
+
| Tool discovery | Tools loaded on demand to reduce prompt overhead. |
|
|
268
|
+
| Artifacts | HTML pages the model writes (reports, dashboards, small tools), saved in `~/.onecode/artifacts/` with every version kept, and opened in your browser. |
|
|
269
|
+
| Reasoning and appearance | `/effort` or **shift+tab** to set reasoning effort; `onecode` and `onecode-light` themes. |
|
|
270
|
+
| Customization | pi extensions, themes, and settings. |
|
|
269
271
|
|
|
270
|
-
|
|
271
|
-
`fewer-permission-prompts`. A project skill with the
|
|
272
|
+
Bundled skills include `simplify`, `code-review`, `security-review`,
|
|
273
|
+
`fewer-permission-prompts`, and `artifact-design`. A project skill with the
|
|
274
|
+
same name takes precedence.
|
|
272
275
|
|
|
273
276
|
For scripting and session management:
|
|
274
277
|
|
|
275
278
|
```bash
|
|
276
279
|
onecode -p "Explain how authentication works in this repository"
|
|
277
|
-
onecode -c #
|
|
278
|
-
onecode --mode json # JSON
|
|
279
|
-
onecode --permission-mode plan #
|
|
280
|
+
onecode -c # Continue the previous session.
|
|
281
|
+
onecode --mode json # Output JSON events.
|
|
282
|
+
onecode --permission-mode plan # Start in plan mode.
|
|
280
283
|
```
|
|
281
284
|
|
|
282
|
-
See [Tools](docs/guide/tools.md) for
|
|
283
|
-
[command reference](docs/guide/reference.md) for
|
|
284
|
-
and environment
|
|
285
|
-
|
|
286
|
-
##
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
without native search. With neither key, the fallback is Exa's rate-limited
|
|
301
|
-
keyless endpoint, and One Code labels those results.
|
|
302
|
-
- **Native Windows:** shells, hooks, and the PowerShell tool follow Claude
|
|
303
|
-
Code's behavior and pass on Windows CI runners, but a real Windows desktop
|
|
304
|
-
session hasn't been driven end to end yet. Expect rough edges around
|
|
305
|
-
drive-letter paths in permission rules; WSL remains the safest route.
|
|
285
|
+
See [Tools](docs/guide/tools.md) for available tools and the
|
|
286
|
+
[command reference](docs/guide/reference.md) for commands, shortcuts, flags,
|
|
287
|
+
and environment variables.
|
|
288
|
+
|
|
289
|
+
## 💡 Platform and provider notes
|
|
290
|
+
|
|
291
|
+
- **Provider coverage:** End-to-end testing focuses on Anthropic, OpenAI,
|
|
292
|
+
and OpenRouter. Other providers have less test coverage.
|
|
293
|
+
- **Web search:** For providers without native search, set
|
|
294
|
+
`BRAVE_SEARCH_API_KEY` or `TAVILY_API_KEY`. Without either key, One Code
|
|
295
|
+
falls back to Exa's rate-limited keyless endpoint and labels those results.
|
|
296
|
+
- **Native Windows:** The shells, hooks, and the PowerShell tool follow
|
|
297
|
+
Claude Code's behavior. They pass on the Windows CI runner, where a real
|
|
298
|
+
model drives both shell tools, and they have been checked by hand on a
|
|
299
|
+
Windows Server 2025 machine: the interface in Windows Terminal, permission
|
|
300
|
+
prompts, plan mode, the PowerShell tool, background shells, and `/doctor`.
|
|
301
|
+
Windows 10 and 11 desktops have had less time in the field, so report what
|
|
302
|
+
you hit. WSL remains the longest-tested route.
|
|
306
303
|
|
|
307
304
|
## 🔧 Install from source
|
|
308
305
|
|
|
309
|
-
|
|
306
|
+
To install the local extensions into an existing pi installation, run:
|
|
310
307
|
|
|
311
308
|
```bash
|
|
312
309
|
git clone https://github.com/IsuruMaduranga/one-code
|
|
@@ -317,15 +314,18 @@ pi install ./one-code
|
|
|
317
314
|
pi list
|
|
318
315
|
```
|
|
319
316
|
|
|
320
|
-
##
|
|
317
|
+
## 📚 Documentation and background
|
|
318
|
+
|
|
319
|
+
The [user guide](docs/guide/README.md) covers setup, configuration, providers,
|
|
320
|
+
permissions, workflows, tools, session management, and troubleshooting.
|
|
321
|
+
If you want to change One Code itself, the [developer docs](docs/dev/README.md)
|
|
322
|
+
cover the architecture, the rules extensions follow, and how to test.
|
|
321
323
|
|
|
322
|
-
|
|
323
|
-
[Harness Engineering 101](https://isuruwijesiri.com/harness-engineering-101/)
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
how a ~300-line toy agent grows into the patterns you see here. The series
|
|
327
|
-
points at this repository wherever it needs a grown-up example.
|
|
324
|
+
For the ideas behind the project, read
|
|
325
|
+
[Harness Engineering 101](https://isuruwijesiri.com/harness-engineering-101/).
|
|
326
|
+
The sixteen-chapter series starts with a small coding agent and develops the
|
|
327
|
+
harness patterns used in One Code, with examples from this repository.
|
|
328
328
|
|
|
329
329
|
## 📄 License
|
|
330
330
|
|
|
331
|
-
[MIT](LICENSE). Contributions welcome.
|
|
331
|
+
[MIT](LICENSE). Contributions are welcome.
|
|
@@ -9,8 +9,8 @@ You have the project's full tool set. Work autonomously: the agent that delegate
|
|
|
9
9
|
to you cannot answer follow-up questions, so make reasonable decisions and state
|
|
10
10
|
the assumptions you made.
|
|
11
11
|
|
|
12
|
-
Your
|
|
13
|
-
human watching your progress. So:
|
|
12
|
+
Your report is the entire result: hand it back with SubagentHandback. It is
|
|
13
|
+
read by another agent, not by a human watching your progress. So:
|
|
14
14
|
|
|
15
15
|
- Lead with the answer or outcome, not a description of your process.
|
|
16
16
|
- Include the concrete details the caller needs: file paths with line numbers,
|
package/docs/guide/README.md
CHANGED
|
@@ -46,7 +46,8 @@ If you've never run One Code, read these in order:
|
|
|
46
46
|
- [Every One Code settings key](configuration.md#settings-reference)
|
|
47
47
|
- [Provider API keys](providers-and-models.md#store-keys-as-environment-variables)
|
|
48
48
|
- [Web-search providers and fallback order](providers-and-models.md#web-search-on-providers-without-a-search-api)
|
|
49
|
-
- [Subagent
|
|
49
|
+
- [Subagent model selection](subagents-and-workflows.md#choose-the-subagent-model)
|
|
50
|
+
- [Automatic classifier model selection](permissions-modes-and-auto-mode.md#the-classifier-model)
|
|
50
51
|
- [Default permission mode](permissions-modes-and-auto-mode.md#choose-the-starting-mode)
|
|
51
52
|
- [Auto-mode configuration keys](permissions-modes-and-auto-mode.md#configure-auto-mode)
|
|
52
53
|
- [Language-server setup](configuration.md#language-server-diagnostics)
|