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
|
@@ -7,6 +7,10 @@ existing setup works without changes. There's no import step and nothing
|
|
|
7
7
|
to convert. Open a project that already has a `.claude/` directory, and One
|
|
8
8
|
Code picks up each of the following as it is.
|
|
9
9
|
|
|
10
|
+
That's the default, Claude-compatible mode. If you'd rather One Code ignore
|
|
11
|
+
your Claude Code setup entirely, switch to independent mode. See
|
|
12
|
+
[Run One Code on its own setup](#run-one-code-on-its-own-setup).
|
|
13
|
+
|
|
10
14
|
## Project instructions: CLAUDE.md
|
|
11
15
|
|
|
12
16
|
One Code loads `CLAUDE.md` files and includes them in the model's context
|
|
@@ -15,17 +19,25 @@ exactly as Claude Code does: your global `~/.claude/CLAUDE.md`, then the
|
|
|
15
19
|
directory, plus any `CLAUDE.local.md` beside them for private instructions.
|
|
16
20
|
`@path` imports are expanded in place.
|
|
17
21
|
|
|
18
|
-
If
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
If the project has no `CLAUDE.md` or `CLAUDE.local.md` anywhere on that
|
|
23
|
+
path, One Code loads its `AGENTS.md` files instead, in the same places, plus
|
|
24
|
+
any `.claude/AGENTS.md`. So a repository that standardized on `AGENTS.md`
|
|
25
|
+
works too. Once a `CLAUDE.md` exists, the `AGENTS.md` files are left out,
|
|
26
|
+
the same rule Claude Code follows.
|
|
27
|
+
|
|
28
|
+
Claude Code's `instructionFiles` option changes that rule, and One Code
|
|
29
|
+
honours it: `claude-md` never loads `AGENTS.md`, `claude-md-and-agents-md`
|
|
30
|
+
loads it beside `CLAUDE.md`, and `managed-only` drops your own and the
|
|
31
|
+
project's instruction files.
|
|
21
32
|
|
|
22
33
|
To give One Code instructions that Claude Code shouldn't read, add an
|
|
23
34
|
`ONECODE.md`. See [ONECODE.md](sessions-and-context.md#onecodemd).
|
|
24
35
|
|
|
25
|
-
To generate a `CLAUDE.md` for a project that lacks one, run `/init`. It
|
|
26
|
-
the model
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
To generate a `CLAUDE.md` for a project that lacks one, run `/init`. It sends
|
|
37
|
+
the prompt Claude Code's `/init` sends: the model reads the project and writes
|
|
38
|
+
down how to build, lint, and test it and the big-picture architecture, folding
|
|
39
|
+
in your README and any Cursor, Copilot, or `AGENTS.md` rules. If the project
|
|
40
|
+
already has a `CLAUDE.md`, it suggests improvements instead.
|
|
29
41
|
|
|
30
42
|
## Skills, commands, and agents
|
|
31
43
|
|
|
@@ -78,14 +90,17 @@ The keys One Code honors:
|
|
|
78
90
|
| `permissions.allow`, `permissions.deny`, `permissions.ask` | All | Project allow rules need one-time approval. See [Permissions](permissions-modes-and-auto-mode.md#permission-rules). |
|
|
79
91
|
| `permissions.defaultMode` | All | A project file can't select `auto` or `bypassPermissions`. |
|
|
80
92
|
| `permissions.disableBypassPermissionsMode` | All | `"disable"` refuses bypass mode from any source. |
|
|
93
|
+
| `permissions.blockReadsOutsideWorkingDirectories` | All | `true` makes the read tools refuse paths outside the working directories. See [Reads outside the working directories](permissions-modes-and-auto-mode.md#reads-outside-the-working-directories). |
|
|
94
|
+
| `permissions.additionalDirectories` | All | Project directories need one-time approval. See [Workspace directories](permissions-modes-and-auto-mode.md#workspace-directories). |
|
|
81
95
|
| `autoMode.*` | User, managed | Never read from project files. See [Configure auto mode](permissions-modes-and-auto-mode.md#configure-auto-mode). |
|
|
82
96
|
| `hooks` | All | Project hooks need one-time approval. See [Hooks](hooks.md). |
|
|
83
97
|
| `env.CLAUDE_CODE_SUBAGENT_MODEL` | User, managed | The only `env` key read. |
|
|
84
98
|
| `enabledPlugins` | All | Later scope wins per plugin. |
|
|
85
|
-
| `enabledMcpjsonServers`, `
|
|
99
|
+
| `enabledMcpjsonServers`, `enableAllProjectMcpServers` | User | Never from a project file, local included. |
|
|
100
|
+
| `disabledMcpjsonServers` | User, local | |
|
|
86
101
|
| `mcpServers` | `~/.claude.json`, `.claude/settings.local.json` | |
|
|
87
102
|
|
|
88
|
-
Not honored:
|
|
103
|
+
Not honored: other `env` keys,
|
|
89
104
|
`includeCoAuthoredBy`, `apiKeyHelper`, `forceLoginMethod`,
|
|
90
105
|
`cleanupPeriodDays`, and `spinnerTipsEnabled`. Run `/doctor report` to see,
|
|
91
106
|
for every file found, which keys were used, ignored, or refused.
|
|
@@ -112,6 +127,42 @@ memories. This is the one place One Code writes under `~/.claude`. Run
|
|
|
112
127
|
`/memory` to open memory and instruction files. See
|
|
113
128
|
[Memory](sessions-and-context.md#memory).
|
|
114
129
|
|
|
130
|
+
## Run One Code on its own setup
|
|
131
|
+
|
|
132
|
+
Maybe you don't use Claude Code at all, or you want One Code's
|
|
133
|
+
instructions, agents and memory kept apart from it. Independent mode does
|
|
134
|
+
that: One Code stops reading anything of Claude Code's. No `~/.claude`, no
|
|
135
|
+
project `.claude/`, no `CLAUDE.md`, no `~/.claude.json` or `.mcp.json`, and
|
|
136
|
+
no managed settings either.
|
|
137
|
+
|
|
138
|
+
To switch, run `/memory`, press **↑** to reach the **Config sources** row,
|
|
139
|
+
and press **Enter**. One Code asks first, since this changes everywhere it
|
|
140
|
+
reads configuration from: press **Enter** again to switch, or **Esc** to
|
|
141
|
+
keep the mode you have. The row shows **(from next start)** until you restart
|
|
142
|
+
One Code, because the switch applies to the next session, not the one
|
|
143
|
+
you're in. `/doctor` shows which mode is running.
|
|
144
|
+
|
|
145
|
+
Here's where each mode looks:
|
|
146
|
+
|
|
147
|
+
| What | Claude-compatible (default) | Independent |
|
|
148
|
+
|---|---|---|
|
|
149
|
+
| Instructions | `CLAUDE.md` family, or `AGENTS.md` when there's none; `ONECODE.md` | `AGENTS.md` in every directory; `ONECODE.md` |
|
|
150
|
+
| Skills | `.claude/skills/`, `~/.claude/skills/`, `.agents/skills/`, `~/.agents/skills/`, pi's skills | `.agents/skills/`, `~/.agents/skills/`, pi's skills |
|
|
151
|
+
| Commands, agents, workflows | `.claude/` and `~/.claude/` | `.onecode/` and `~/.onecode/` (`commands/`, `agents/`, `workflows/`) |
|
|
152
|
+
| Settings, hooks, permissions | Claude Code's settings files, managed settings, and One Code's files | One Code's files only: `~/.onecode/settings.json` and the per-repository one |
|
|
153
|
+
| MCP servers | `~/.claude.json`, `.mcp.json`, `.claude/settings.local.json`, pi's `mcp.json` files | pi's `mcp.json` files |
|
|
154
|
+
| Memory | `~/.claude/projects/<slug>/memory/` | `~/.onecode/projects/<slug>/memory/` |
|
|
155
|
+
| Worktrees | `.claude/worktrees/` | `.onecode/worktrees/` |
|
|
156
|
+
|
|
157
|
+
In independent mode, the settings you'd put in `~/.claude/settings.json`
|
|
158
|
+
(permissions, `defaultMode`, hooks, the `env` block, `autoMode`) go in
|
|
159
|
+
`~/.onecode/settings.json` instead, with the same keys. Memories don't move
|
|
160
|
+
between modes, so each mode starts with its own.
|
|
161
|
+
|
|
162
|
+
Independent mode skips managed settings too. If your organization manages
|
|
163
|
+
Claude Code with a policy file, that policy doesn't apply to One Code in
|
|
164
|
+
this mode.
|
|
165
|
+
|
|
115
166
|
## What stays separate
|
|
116
167
|
|
|
117
168
|
One Code's own state lives in `~/.onecode`. Everything it saves (a chosen
|
|
@@ -23,11 +23,15 @@ Code reads but never writes.
|
|
|
23
23
|
| Claude Code user configuration that One Code reads | `~/.claude/settings.json` |
|
|
24
24
|
| Claude Code project configuration that One Code reads | `.claude/settings.json`, `.claude/settings.local.json` |
|
|
25
25
|
|
|
26
|
+
In independent mode One Code doesn't read either Claude Code file; Claude
|
|
27
|
+
Code's settings keys, such as `permissions`, `hooks` and `env`, go in One
|
|
28
|
+
Code's two files instead.
|
|
29
|
+
|
|
26
30
|
The per-repository slug is derived from the repository root, so worktrees
|
|
27
31
|
and subdirectories of one repository share one file.
|
|
28
32
|
|
|
29
|
-
Commands such as `/allow`, `/subagent`, `/auto-mode model`, and the
|
|
30
|
-
|
|
33
|
+
Commands such as `/allow`, `/subagent`, `/auto-mode model`, and the `/mcp`
|
|
34
|
+
panel write to One Code's files. Both One Code files are written
|
|
31
35
|
atomically; a malformed file is reported rather than overwritten.
|
|
32
36
|
|
|
33
37
|
### Relocating directories
|
|
@@ -35,10 +39,14 @@ atomically; a malformed file is reported rather than overwritten.
|
|
|
35
39
|
| Variable | Moves |
|
|
36
40
|
|---|---|
|
|
37
41
|
| `ONECODE_STATE_DIR` | One Code's state (default `~/.onecode`). |
|
|
38
|
-
| `
|
|
42
|
+
| `ONECODE_AGENT_DIR` | pi's agent directory under the bundled app (default `~/.onecode/agent`). |
|
|
43
|
+
| `PI_CODING_AGENT_DIR` | pi's agent directory on your own pi. The bundled app ignores it, so it never touches your own pi's settings. |
|
|
39
44
|
| `CLAUDE_CONFIG_DIR` | Where Claude Code's user configuration is read from (default `~/.claude`). |
|
|
40
45
|
|
|
41
|
-
Setting one doesn't move the others.
|
|
46
|
+
Setting one doesn't move the others. Commands the bundled app runs for you
|
|
47
|
+
(the `bash` tool, `!` commands, hooks, MCP servers, and language servers)
|
|
48
|
+
get your own `PI_CODING_AGENT_DIR` back, so a `pi` started from inside a
|
|
49
|
+
session is your own pi, not the app.
|
|
42
50
|
|
|
43
51
|
## What is stored under ~/.onecode
|
|
44
52
|
|
|
@@ -46,13 +54,16 @@ Setting one doesn't move the others.
|
|
|
46
54
|
|---|---|
|
|
47
55
|
| `settings.json` | User-wide One Code settings. |
|
|
48
56
|
| `projects/<slug>/settings.json` | Per-repository settings. |
|
|
57
|
+
| `projects/<slug>/memory/` | Per-repository memory, in independent mode. |
|
|
58
|
+
| `agents/`, `commands/`, `workflows/` | Your agents, slash commands and saved workflows, in independent mode. |
|
|
49
59
|
| `agent/` | pi's own state under the bundled app: credentials, model catalog, sessions, pi's settings, and One Code's plugin directory (`agent/plugins/`). |
|
|
50
60
|
| `plans/<name>.md` | Plan files from plan mode. |
|
|
61
|
+
| `artifacts/` | Pages published with the `artifact` tool: `index.html` is the gallery; each `<id>/` holds the current page, its details, and `versions/` with every earlier version. |
|
|
51
62
|
| `hooks/project-approvals.json` | Which projects' hooks you approved. |
|
|
52
63
|
| `mcp/project-approvals.json` | Which projects' MCP servers you approved. |
|
|
53
64
|
| `permissions/project-allow-approvals.json` | Which projects' allow rules you trusted. |
|
|
54
|
-
| `mcp-auth/<server>.json` | OAuth tokens for MCP servers, owner-readable only. |
|
|
55
|
-
| `cache/
|
|
65
|
+
| `mcp-auth/<server>-<hash>.json` | OAuth tokens for MCP servers, one file per server name, URL and headers, owner-readable only. |
|
|
66
|
+
| `cache/model-catalog/` | The daily copy of the models.dev, OpenRouter and Hugging Face catalogs behind the model tiers. |
|
|
56
67
|
| `hooks/hooks-decisions.jsonl` | A hook decision log, written only while `CC_HOOKS_DEBUG` is set. |
|
|
57
68
|
|
|
58
69
|
The bundled app also keeps a timestamp of its last update check at
|
|
@@ -66,20 +77,27 @@ appear in `projects/<slug>/settings.json`.
|
|
|
66
77
|
| Key | Type | Set by | Effect |
|
|
67
78
|
|---|---|---|---|
|
|
68
79
|
| `subagentModel` | string | `/subagent` | Default model for subagents and workflow agents: `provider/model-id`, a short alias, or `inherit`. |
|
|
80
|
+
| `suggestNewerModels` | boolean | By hand | Suggest a newer model in the same line at a similar or lower price. Defaults to `true`; `false` turns off notices and the `/doctor` suggestion. |
|
|
81
|
+
| `modelTiers` | object | By hand (user settings only) | Your own tier for a model, keyed by `provider/id` or by the provider's model id alone: `frontier`, `workhorse`, `cheap` or `tiny`. See [Prompting adapts to the model](providers-and-models.md#prompting-adapts-to-the-model). |
|
|
82
|
+
| `refreshModelCatalog` | boolean | By hand | `false` stops the daily refresh of the model catalogs behind the tiers; the copy on disk stays in use. Defaults to `true`. |
|
|
69
83
|
| `permissions.allow` | string array | `/allow` (per repository) or `/allow … global` | Allow rules in Claude Code's format. |
|
|
70
84
|
| `autoMode.environment` | string array | `/auto-mode setup` | Describes your environment to the classifier. |
|
|
71
85
|
| `autoMode.hard_deny`, `autoMode.soft_deny`, `autoMode.allow` | string array | `/auto-mode setup` | Extra classifier rules, appended to the built-ins. |
|
|
72
|
-
| `autoMode.classifierModel` | string | `/auto-mode model` | The classifier model. |
|
|
73
86
|
| `autoMode.classifyAllShell` | boolean | By hand | Send every shell command to the classifier. |
|
|
87
|
+
| `autoMode.classifierModel` | string | `/auto-mode model` | The classifier model, `provider/model-id`, instead of the automatic pick. Read from this file and managed settings only, never from `~/.claude` or a project. |
|
|
74
88
|
| `autoMode.logDecisions` | boolean | By hand | Log every gate decision next to the session files. |
|
|
75
89
|
| `webSearch.apiKeys.brave`, `webSearch.apiKeys.tavily` | string | By hand | Search keys when the environment variables are not set. |
|
|
76
90
|
| `webSearch.order` | string array | By hand | Order of the fallback search backends: `brave`, `tavily`, `exa-free`. |
|
|
77
|
-
| `capabilityIndex.artificialAnalysisApiKey` | string | By hand | Artificial Analysis key for measured model selection. |
|
|
78
91
|
| `disabledMcpServers` | string array | `/mcp` (user or per repository) | MCP servers kept disabled. |
|
|
92
|
+
| `artifacts.autoOpen` | boolean | By hand | `false` stops the browser opening when the model publishes a new artifact. Defaults to `true`. |
|
|
93
|
+
| `enableWorkflows` | boolean | By hand (user or per repository) | `false` turns the `workflow` tool off. Defaults to `true`. |
|
|
94
|
+
| `disableWorkflows` | boolean | By hand (user or per repository) | `true` turns the `workflow` tool off, whatever `enableWorkflows` says. |
|
|
95
|
+
| `workflowSizeGuideline` | string | By hand (user or per repository) | How big the model keeps a workflow: `small` (under 5 agents), `medium` (under 10, the default), `large` (under 50) or `unrestricted`. A guideline, not a limit. |
|
|
96
|
+
| `configMode` | string | `/memory` | `claude-compatible` (the default) or `independent`. Applies from the next start. See [Run One Code on its own setup](bring-your-claude-code-setup.md#run-one-code-on-its-own-setup). |
|
|
79
97
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
on; leave them alone.
|
|
98
|
+
`subagentModelSetFor` and `autoMode.classifierModelSetFor` are stamped
|
|
99
|
+
alongside the subagent and classifier choices to record the provider each
|
|
100
|
+
was made on; leave them alone.
|
|
83
101
|
|
|
84
102
|
The main model chosen with `/model` is saved in pi's own settings file as
|
|
85
103
|
`defaultProvider` and `defaultModel`, not in One Code's.
|
|
@@ -90,15 +108,20 @@ The bundled app starts in full-screen mode with the `onecode` theme and
|
|
|
90
108
|
quiet startup. It sets these on first run in pi's settings and never
|
|
91
109
|
overrides a value you change later.
|
|
92
110
|
|
|
93
|
-
On your own pi,
|
|
111
|
+
On your own pi, 1.0 and later start in full-screen mode. On an older pi,
|
|
112
|
+
to use full-screen mode for one session:
|
|
94
113
|
|
|
95
114
|
```bash
|
|
96
115
|
pi --tui-mode fullscreen
|
|
97
116
|
```
|
|
98
117
|
|
|
118
|
+
To keep the terminal's normal screen and scrollback instead, use
|
|
119
|
+
`--tui-mode regular`, or set `"tuiMode": "regular"` in pi's settings.
|
|
120
|
+
|
|
99
121
|
For a persistent setting, merge these keys into pi's settings file (the
|
|
100
122
|
first two rows of the table under [Where settings live](#where-settings-live)),
|
|
101
|
-
preserving its other keys such as `packages
|
|
123
|
+
preserving its other keys such as `packages`. On pi 1.0 and later you can
|
|
124
|
+
leave out `tuiMode`, since full-screen is already the default:
|
|
102
125
|
|
|
103
126
|
```json
|
|
104
127
|
{
|
|
@@ -122,9 +145,20 @@ Set the subagent default with `/subagent`, or apply a preset with
|
|
|
122
145
|
[Providers and models](providers-and-models.md) and
|
|
123
146
|
[Choose the subagent model](subagents-and-workflows.md#choose-the-subagent-model).
|
|
124
147
|
|
|
148
|
+
If you pick a model that has a newer version in the same line, say Qwen 3.6
|
|
149
|
+
27B when Qwen 3.8 27B exists, One Code tells you when the session starts or
|
|
150
|
+
when you switch models. It only suggests a model you can use with your
|
|
151
|
+
credentials, released later, and priced at most 10% higher (blending three
|
|
152
|
+
input tokens to one output token, since coding work is input-heavy).
|
|
153
|
+
|
|
154
|
+
The notice shows once per session and model, with the `/model` command to
|
|
155
|
+
switch. It never switches for you and never enters the conversation, and
|
|
156
|
+
`/doctor` reports the same suggestion. Print and JSON runs don't show it. To
|
|
157
|
+
turn it off, add `"suggestNewerModels": false` to `~/.onecode/settings.json`.
|
|
158
|
+
|
|
125
159
|
## Permission settings
|
|
126
160
|
|
|
127
|
-
`/permissions`
|
|
161
|
+
`/permissions` opens the permissions panel, `/allow` adds a rule, and
|
|
128
162
|
`/auto-mode setup` configures the classifier. **ctrl+q** (**alt+m** on Windows and WSL) cycles modes. To
|
|
129
163
|
start a session in a given mode:
|
|
130
164
|
|
|
@@ -29,8 +29,16 @@ so nothing surprises you.
|
|
|
29
29
|
| Models | Anthropic models. | Any provider pi supports, switchable mid-session, with a different model per role. |
|
|
30
30
|
| Tool names on the wire | PascalCase (`Read`, `Bash`). | snake_case (`read`, `bash`); `Agent` and `SendMessage` keep their names. Claude Code names still work in rules and hook matchers. |
|
|
31
31
|
| Permission-mode key | shift+tab. | ctrl+q; alt+m on Windows and WSL. pi reserves shift+tab for the reasoning-effort dial and, on Windows, ctrl+q for queuing a follow-up. |
|
|
32
|
-
|
|
|
33
|
-
|
|
|
32
|
+
| Send queued messages now (**ctrl+x ctrl+s**) | Running tools move to the background, and **ctrl+enter** works too where the terminal sends it. | Running tools are cancelled, and only **ctrl+x ctrl+s** is bound. |
|
|
33
|
+
| Task-list key | ctrl+t. | alt+t; ctrl+\\ on macOS. pi reserves ctrl+t for thinking blocks, and macOS terminals type a character for option+t. |
|
|
34
|
+
| Where auto mode's classifier runs | On Anthropic's API server, through a request field the endpoint must support; the local classifier is a fallback only until about October 23, 2026 ([LiteLLM's notes](https://docs.litellm.ai/blog/claude-code-server-side-auto-mode)). | In the harness, on a model from your own provider, so auto mode works with any provider. |
|
|
35
|
+
| Permission shortcuts by model | One set for every model; auto mode needs a Sonnet- or Opus-class model. | Claude Code's shortcuts for frontier and workhorse models. Cheap and tiny models, which Claude Code can't run in auto mode, get stricter checks. |
|
|
36
|
+
| Deleting files in auto mode | An in-project `rm` runs without the classifier; `git reset --hard` is classified. | The same with frontier and workhorse models. With cheap and tiny models, every delete goes to the classifier. |
|
|
37
|
+
| Reading outside the working directories in auto mode | Runs without the classifier after a one-time question. | The same with frontier and workhorse models, except credential files, which are classified. With cheap and tiny models, the classifier decides. |
|
|
38
|
+
| A path in the project that is a symlink to somewhere outside it, in auto mode | The classifier judges the command as written. | The classifier is also told where the path really leads, so a write to `notes.txt` that lands in `~/.ssh/authorized_keys` is judged as that write. |
|
|
39
|
+
| Approving a call auto mode denied | `/permissions` tells the model permission was granted; the retry is judged again. | The approval lets that exact call run once without the classifier. |
|
|
40
|
+
| Auto-mode built-in rules | A section's built-in rules can be switched off. | Always in effect; your rules only add to them. |
|
|
41
|
+
| Workspace directories | Reads, edits in accept-edits mode, and auto-mode writes. | The same, except that credential files there still prompt. With cheap and tiny models, auto-mode writes there go to the classifier. |
|
|
34
42
|
| Bypass mode | Protected paths stay protected. | Bypass mode bypasses everything, including protected paths. |
|
|
35
43
|
| First-run consent for auto mode | Asked once. | Not asked. Auto mode is on from the first session. |
|
|
36
44
|
| OS sandbox | Paired with auto mode. | None. Run One Code in a container for OS-level isolation. |
|
|
@@ -44,11 +52,15 @@ so nothing surprises you.
|
|
|
44
52
|
## Tools that are not provided
|
|
45
53
|
|
|
46
54
|
These Claude Code tools depend on Anthropic-hosted or desktop services and
|
|
47
|
-
have no equivalent here: `
|
|
48
|
-
`
|
|
49
|
-
`
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
have no equivalent here: `ReportFindings`, `ShareOnboardingGuide`,
|
|
56
|
+
`PushNotification`, `RemoteTrigger`, `DesignSync`, `EndConversation`, and
|
|
57
|
+
`SendFeedback`. `Artifact` is local: One Code saves the page on your
|
|
58
|
+
machine and opens it in your browser instead of publishing it to claude.ai.
|
|
59
|
+
The page has no runtime capabilities (no shared data, comments, or calls
|
|
60
|
+
back to the model), and there are no artifact types such as slide decks.
|
|
61
|
+
See [Artifacts](tools.md#artifacts). Scheduling within a session is
|
|
62
|
+
available through the cron tools, `/loop`, and `schedule_wakeup`;
|
|
63
|
+
scheduled cloud sessions aren't.
|
|
52
64
|
|
|
53
65
|
The `Agent` tool's remote isolation option isn't implemented.
|
|
54
66
|
|
|
@@ -56,17 +68,18 @@ The `Agent` tool's remote isolation option isn't implemented.
|
|
|
56
68
|
|
|
57
69
|
Claude Code commands with no One Code or pi counterpart: `/cost` (the
|
|
58
70
|
footer shows cost instead), `/status`, `/vim`, `/terminal-setup`, `/bug`,
|
|
59
|
-
`/help`, `/rewind`, `/
|
|
71
|
+
`/help`, `/rewind`, `/hooks`, `/ide`, `/install-github-app`,
|
|
60
72
|
`/statusline`, `/privacy-settings`, and `/upgrade`. pi's `/changelog` and
|
|
61
73
|
`/settings` cover part of `/release-notes` and `/config`. `/review` is
|
|
62
74
|
available through the `commit-commands` plugin when installed.
|
|
63
75
|
|
|
64
76
|
## Skills that are not bundled
|
|
65
77
|
|
|
66
|
-
One Code bundles
|
|
67
|
-
`code-review`, `security-review`,
|
|
68
|
-
|
|
69
|
-
(`design`, `dataviz`,
|
|
78
|
+
One Code bundles six of Claude Code's built-in skills: `loop`, `simplify`,
|
|
79
|
+
`code-review`, `security-review`, `fewer-permission-prompts`, and
|
|
80
|
+
`artifact-design` (adapted to local artifacts). It does not bundle the skills
|
|
81
|
+
that need Claude Code's hosted or desktop surfaces (`design`, `dataviz`,
|
|
82
|
+
`artifact-capabilities`, `artifact-diagramming`, and the publishers), the
|
|
70
83
|
account and desktop skills (`update-config`, `keybindings-help`,
|
|
71
84
|
`claude-in-chrome`, `debug`, `usage`, `schedule`, `batch`,
|
|
72
85
|
`claude-code-guide`), the run-skill generators, or the `claude-api`
|
|
@@ -83,9 +96,8 @@ action but never pre-approve one. See [Hooks](hooks.md).
|
|
|
83
96
|
|
|
84
97
|
## Settings keys that are ignored
|
|
85
98
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
scope. `includeCoAuthoredBy`, `apiKeyHelper`, `forceLoginMethod`,
|
|
99
|
+
The `env` block is read only for `CLAUDE_CODE_SUBAGENT_MODEL`, and only
|
|
100
|
+
from user and managed scope. `includeCoAuthoredBy`, `apiKeyHelper`, `forceLoginMethod`,
|
|
89
101
|
`cleanupPeriodDays`, and `spinnerTipsEnabled` aren't read. Run
|
|
90
102
|
`/doctor report` to see, per file, which keys were used, ignored, or
|
|
91
103
|
refused.
|
|
@@ -106,11 +118,11 @@ every model. The content is the same; only the placement differs.
|
|
|
106
118
|
default on Windows, `CLAUDE_CODE_USE_POWERSHELL_TOOL=0` turns it off), and
|
|
107
119
|
your `PowerShell(...)` rules, `CLAUDE_CODE_GIT_BASH_PATH`, and per-hook
|
|
108
120
|
`shell` field work unchanged. The PowerShell tool's description is Claude
|
|
109
|
-
Code's own text.
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
121
|
+
Code's own text. PowerShell commands are judged from PowerShell's own
|
|
122
|
+
parse, as in Claude Code. What differs: native commands run from
|
|
123
|
+
PowerShell (`git status`, `npm test`) always go to the classifier in auto
|
|
124
|
+
mode, where Claude Code approves some of them itself. Read-only uses of
|
|
125
|
+
Windows' own `findstr` and `where.exe` are the exceptions. Verified on CI runners and through a `pwsh` on
|
|
114
126
|
macOS; a real Windows desktop has not been driven end to end yet. See
|
|
115
127
|
[Windows](windows.md).
|
|
116
128
|
|
|
@@ -138,9 +150,6 @@ every model. The content is the same; only the placement differs.
|
|
|
138
150
|
- Running a skill in a one-shot run (`-p '/simplify'`) delivers the skill
|
|
139
151
|
but starts no model turn, so the process exits without doing anything.
|
|
140
152
|
Interactive sessions are unaffected.
|
|
141
|
-
- The reasoning effort set with `/effort` doesn't persist across
|
|
142
|
-
restarts; the model chosen with `/model` does. To save a level, open
|
|
143
|
-
pi's `/thinking` picker and press **ctrl+s**, or pass `--thinking`.
|
|
144
153
|
- A subagent spawn that is blocked before it starts can leave its requested
|
|
145
154
|
run name reserved; a retry with the same name is renamed automatically.
|
|
146
155
|
- Under pi's RPC transport, `SessionStart` hooks fire twice per `/clear`.
|
package/docs/guide/doctor.md
CHANGED
|
@@ -28,10 +28,13 @@ the findings.
|
|
|
28
28
|
offers, and where the credential came from. An error when none is
|
|
29
29
|
ready, with the free options named.
|
|
30
30
|
3. **Models.** The main model with its price and context window, the
|
|
31
|
-
prompt tier it gets, the reasoning effort, the
|
|
32
|
-
was chosen, the auto-mode classifier model
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
prompt tier it gets and the rule that set it, the reasoning effort, the
|
|
32
|
+
subagent model and how it was chosen, the auto-mode classifier model and
|
|
33
|
+
your `/auto-mode model` setting, the reader model used by web fetch and
|
|
34
|
+
recaps, how fresh the model catalogs behind the tiers are, and the
|
|
35
|
+
permission mode. A model you chose by hand gets a warning when a newer one
|
|
36
|
+
is available in its line or it's far weaker than your main model, and the
|
|
37
|
+
classifier one also when its context window is smaller than your session's.
|
|
35
38
|
4. **Presets.** The three model presets for your provider and the model
|
|
36
39
|
each role would get under each.
|
|
37
40
|
5. **Imported configuration.** Every settings file found, with the keys One
|
|
@@ -53,22 +56,26 @@ In the panel, press **f** to run the checkup on the report you're reading.
|
|
|
53
56
|
|
|
54
57
|
## Model presets
|
|
55
58
|
|
|
56
|
-
A preset sets the main model
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
A preset sets the main model and subagent model from the provider you're
|
|
60
|
+
connected to, and returns the classifier to the automatic pick. Each preset's
|
|
61
|
+
preview shows the classifier its main model would get (see
|
|
62
|
+
[Automatic model selection](providers-and-models.md#automatic-model-selection)).
|
|
63
|
+
A preset only recommends a main model that's priced, can call tools, and isn't
|
|
64
|
+
replaced by a newer model this provider serves. It also skips any model
|
|
65
|
+
`/doctor` would flag as having a newer version at about the same price, so a
|
|
66
|
+
preset never points you at a model the same report calls outdated.
|
|
59
67
|
|
|
60
68
|
| Preset | Main model | Subagents | Classifier |
|
|
61
69
|
|---|---|---|---|
|
|
62
|
-
| `economical` | The cheapest
|
|
63
|
-
| `balanced` | The cheapest
|
|
70
|
+
| `economical` | The cheapest cheap-tier model, else the cheapest workhorse or frontier one. | Inherit the main model. | Automatic. |
|
|
71
|
+
| `balanced` | The cheapest workhorse- or frontier-tier model. | Chosen automatically (a cheaper model in the main model's tier or above when one exists, else the main model). | Automatic. |
|
|
64
72
|
| `quality` | The most capable model available. | Inherit the main model. | Automatic. |
|
|
65
73
|
|
|
66
74
|
`/doctor presets` shows what each preset would pick. `/doctor preset balanced`
|
|
67
75
|
applies one; the aliases `economy`, `cheap`, `balance`, `max`, `maximum`,
|
|
68
|
-
and `best` also work. Applying a preset writes the subagent
|
|
69
|
-
|
|
70
|
-
default. Undo
|
|
71
|
-
`/auto-mode model clear`.
|
|
76
|
+
and `best` also work. Applying a preset writes the subagent choice to
|
|
77
|
+
`~/.onecode/settings.json` and remembers the main model as pi's
|
|
78
|
+
default. Undo the changes with `/model`, `/subagent clear` or `/auto-mode model`.
|
|
72
79
|
|
|
73
80
|
## The command-line form
|
|
74
81
|
|
package/docs/guide/hooks.md
CHANGED
|
@@ -24,6 +24,12 @@ stored in `~/.onecode/hooks/project-approvals.json` with a hash of the hook
|
|
|
24
24
|
configuration, so any change asks again. Declining is remembered for the
|
|
25
25
|
session only. User, managed, and plugin hooks never prompt.
|
|
26
26
|
|
|
27
|
+
Set `disableAllHooks: true` in your user settings to skip user, project, and
|
|
28
|
+
plugin hooks. Managed hooks still run unless managed settings also disable
|
|
29
|
+
hooks, and a managed value always takes precedence. In a project's
|
|
30
|
+
`.claude/settings.json` or `.claude/settings.local.json`, the setting skips only
|
|
31
|
+
that project's own hooks, so a repository you clone can't switch off yours.
|
|
32
|
+
|
|
27
33
|
Only command hooks are supported. Hook entries of type `http`, `prompt`, or
|
|
28
34
|
`agent` are skipped with a diagnostic.
|
|
29
35
|
|
|
@@ -71,7 +77,10 @@ The hook's standard input is a JSON object with these fields:
|
|
|
71
77
|
| `reason` | `SessionEnd` | `clear`, `logout`, `prompt_input_exit`, or `other`. |
|
|
72
78
|
| `agent_id`, `agent_type` | Inside a subagent | Identify the subagent making the call. |
|
|
73
79
|
|
|
74
|
-
The hook's environment also carries `CLAUDE_PROJECT_DIR
|
|
80
|
+
The hook's environment also carries `CLAUDE_PROJECT_DIR`, the parent project
|
|
81
|
+
root. A worktree-isolated child's hooks run in the child's working directory,
|
|
82
|
+
while settings and project-hook approval still come from the parent project.
|
|
83
|
+
Cancelling a turn stops its running hooks and their descendant processes.
|
|
75
84
|
|
|
76
85
|
Hook matchers match on the tool name. Claude Code's PascalCase names work.
|
|
77
86
|
|
|
@@ -84,13 +93,14 @@ Hook matchers match on the tool name. Claude Code's PascalCase names work.
|
|
|
84
93
|
| Exit code 2 | The action is blocked. Standard error is the reason. |
|
|
85
94
|
| Any other exit code | The hook passes and its output is ignored. |
|
|
86
95
|
| Timeout | `PreToolUse` and `UserPromptSubmit` block (fail closed). Other events pass. |
|
|
96
|
+
| Output exceeds 1,000,000 bytes on either stream | The command stops. `PreToolUse` and `UserPromptSubmit` block; other events show a notice. Incomplete output is not used as a verdict or context. |
|
|
87
97
|
| The command could not be started | The hook passes; this is an environment problem, not a verdict. |
|
|
88
98
|
|
|
89
99
|
Envelope fields honored in a JSON result:
|
|
90
100
|
|
|
91
101
|
| Field | Effect |
|
|
92
102
|
|---|---|
|
|
93
|
-
| `continue: false` | Blocks, with `stopReason` as the reason. |
|
|
103
|
+
| `continue: false` | Blocks, with `stopReason` as the reason. For `Stop`, ends the turn without requesting another response. |
|
|
94
104
|
| `decision: "block"` | Blocks, with `reason` as the reason. |
|
|
95
105
|
| `hookSpecificOutput.permissionDecision` | `"deny"` and `"ask"` both block, with `permissionDecisionReason`. `"allow"` is read but never honored; a hook can't pre-approve an action, and the permission gate still runs. |
|
|
96
106
|
| `hookSpecificOutput.updatedInput` | Replaces the tool's input (`PreToolUse`). |
|
|
@@ -99,7 +109,12 @@ Envelope fields honored in a JSON result:
|
|
|
99
109
|
| `systemMessage` | Shown to you. |
|
|
100
110
|
|
|
101
111
|
A `PreToolUse` block stops the call before the permission gate runs, so no
|
|
102
|
-
approval prompt appears for a hook-blocked call.
|
|
112
|
+
approval prompt appears for a hook-blocked call. A malformed response from one
|
|
113
|
+
hook does not discard another hook's denial.
|
|
114
|
+
|
|
115
|
+
A blocking `Stop` hook can request at most eight consecutive continuations per
|
|
116
|
+
user turn. The ninth block ends the turn with a notice. Hooks still receive
|
|
117
|
+
`stop_hook_active` so they can stop requesting continuations earlier.
|
|
103
118
|
|
|
104
119
|
## Debugging hooks
|
|
105
120
|
|
|
@@ -102,9 +102,31 @@ pi install npm:one-code-extension
|
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
Use `pi` in place of `onecode` for every command in this guide. The
|
|
105
|
-
extension is tested against pi 0.
|
|
106
|
-
your pi is outside that range.
|
|
107
|
-
|
|
105
|
+
extension is tested against pi 0.84.3 through 1.3 and warns at startup when
|
|
106
|
+
your pi is outside that range. It doesn't load on a pi older than 0.84.3;
|
|
107
|
+
update pi first with `pi update`. pi 1.0 and later start in full-screen mode;
|
|
108
|
+
on an older pi it's opt-in. See
|
|
109
|
+
[Full-screen mode and themes](configuration.md#full-screen-mode-and-themes).
|
|
110
|
+
|
|
111
|
+
pi 0.99 and later ship their own tool search and MCP as built-in
|
|
112
|
+
extensions. One Code brings its own versions of both, so pi skips the
|
|
113
|
+
built-ins and prints a warning about each at every start. The warnings tell
|
|
114
|
+
you to remove the extension that replaced them. Don't: that's One Code. To
|
|
115
|
+
hide them, run `pi config` and turn off `tool-search` and `mcp` under
|
|
116
|
+
Built-in, or add this to `~/.pi/agent/settings.json`:
|
|
117
|
+
|
|
118
|
+
```json
|
|
119
|
+
{
|
|
120
|
+
"extensions": ["-builtin:tool-search", "-builtin:mcp"]
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
On the first start where the built-ins are still on, One Code asks whether
|
|
125
|
+
to turn them off for you and explains why. Say yes and it adds those two
|
|
126
|
+
entries to your settings; the warnings stop from the next start. Say no and
|
|
127
|
+
it won't ask again, but it shows a short notice under pi's warnings, and
|
|
128
|
+
`/doctor` can still make the change. The bundled app turns both off on its
|
|
129
|
+
own.
|
|
108
130
|
|
|
109
131
|
A few interface refinements are applied only by the bundled app, because
|
|
110
132
|
they patch pi internals the extension API can't reach: a clean exit that
|
|
@@ -149,7 +171,8 @@ A Homebrew install sees the notice a day after the npm release, because
|
|
|
149
171
|
Homebrew refuses packages younger than that and `brew upgrade` would find
|
|
150
172
|
nothing sooner. Set `ONECODE_NO_UPDATE_CHECK=1` to skip the check;
|
|
151
173
|
`--offline` skips it too.
|
|
152
|
-
On your own pi, update with `pi update
|
|
174
|
+
On your own pi, update the extension with `pi update npm:one-code-extension`.
|
|
175
|
+
A bare `pi update` updates pi itself and skips extensions.
|
|
153
176
|
|
|
154
177
|
Both packages are released together with the same version number.
|
|
155
178
|
|