90e86a5e3d
* tweak: use theme tokens for debug bar surface * chore: update nix node_modules hashes * feat(tui): add heap snapshot functionality for TUI and server (#19028) * ci * change model for changelog * release: v1.3.2 * fix(opencode): skip typechecking generated models snapshot (#19018) * Revert "fix(app): more startup efficiency (#18985)" This reverts commit98b3340cee. * Revert "fix(app): startup efficiency (#18854)" This reverts commit546748a461. * effectify Worktree service (#18679) * fix: increase operations-per-run to 1000 and pin stale action to v10.2.0 The stale-issues workflow was hitting the default 30 operations limit, preventing it from processing all 2900+ issues/PRs. Increased to 1000 to handle the full backlog. Also pinned to exact v10.2.0 for reproducibility. * Add close-issues script and GitHub Action - Create script/github/close-issues.ts to close stale issues after 60 days - Add GitHub Action workflow to run daily at 2 AM - Remove old stale-issues workflow to avoid conflicts * Fix close-issues workflow permissions - Add contents: read permission for checkout - Use github.token instead of secrets.GITHUB_TOKEN * Process issues sequentially to avoid rate limits * Change issue close reason from not_planned to completed * fix(opencode): avoid snapshotting files over 2MB (#19043) * fix: provide merge context to beta conflict resolver (#19055) * tweak: only spawn lsp servers for files in current instance (or cwd if instance is global) (#19058) * fix: beta resolver typecheck + build smoke check (#19060) * fix: unblock beta conflict recovery (#19068) * electron: add createDirectory to open directory picker (#19071) * electron: remove file extension from electron-store wrapper (#19082) * app: pre-warm project globalSync state when navigate project via keybind (#19088) * fix(app): move message navigation off cmd+arrow (#18728) * Reapply "fix(app): startup efficiency (#18854)" This reverts commita379eb3867. * Reapply "fix(app): more startup efficiency (#18985)" This reverts commitcbe1337f24. * fix(app): hash inline script for csp * Revert "fix(app): startup efficiency" * Reapply "fix(app): startup efficiency" This reverts commit898456a25c. * fix(app): opencode web server url * chore(app): markdown playground in storyboard * chore(app): markdown playground in storyboard * feat(core): initial implementation of syncing (#17814) * chore: generate * chore: bump modelcontextprotocol/sdk to 1.27.1 (#19064) * chore: storybook tweaks * feat: restore git-backed review modes with effectful git service (#18900) * chore: generate * chore: update nix node_modules hashes * chore: cleanup * chore: remove dead code for todoread tool (#19128) * chore: storybook tweaks * fix(opencode): classify ZlibError from Bun fetch as retryable instead of unknown (#19104) Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> * fix(task): respect agent permission config for todowrite tool (#19125) * fix(app): agent normalization (#19169) * fix: Windows e2e stability (CrossSpawnSpawner, snapshot isolation, session race guards) (#19163) * fix+refactor(mcp): lifecycle tests, cancelPending fix, Effect migration (#19042) * effectify Bus service: migrate to Effect PubSub + InstanceState (#18579) * file: use Effect.cached for scan deduplication (#19164) * ignore: update disavowed list (#19184) * skill: use Effect.cached for load deduplication (#19165) * chore: generate * fix: bump gitlab-ai-provider to 5.3.3 for DWS tool approval support (#19185) * test: restore 5 workers on Windows e2e (#19188) * fix(opencode): image paste on Windows Terminal 1.25+ with kitty keyboard (#17674) * chore: update nix node_modules hashes * wip: zen * wip: zen * go: do not respect disabled zen models * fix: ensure enterprise url is set properly during auth flow (#19212) * revert: roll back git-backed review modes (#19295) * chore: generate * tui: bypass local SSE event streaming in worker (#19183) * feat: embed WebUI in binary with proxy flags (#19299) Co-authored-by: BlankParticle <blankparticle@gmail.com> * release: v1.3.3 * chore: generate * changelog ci tweaks * refactor(lsp): effectify LSP service with InstanceState (#19150) * chore: generate * feat: add gpt prompt so non codex gpt models have their own system prompt modeled after codex cli (#19220) * feat(core): remove workspace server, WorkspaceContext, start work towards better routing (#19316) * effectify Config service (#19139) * chore: generate * refactor(config): use cachedInvalidateWithTTL, bump effect to beta.37 (#19322) * fix(mcp): close transport on failed/timed-out connections (#19200) * fix(app): more startup perf (#19288) * chore: generate * chore: update nix node_modules hashes * fix(app): don't bundle fonts (#19329) * chore: generate * fix(app): default shell tool to collapsed * fix(app): remove fork session button * fix(ui): reduce markdown jank while responses stream (#19304) * fix: web ui bundle build on windows (#19337) * refactor(effect): yield services instead of promise facades (#19325) * chore: generate * refactor(vcs): replace async git() with ChildProcessSpawner (#19361) * fix(opencode): ignore generated models snapshot files (#19362) * fix(ui): keep partial markdown readable while responses stream (#19403) * chore: update nix node_modules hashes * fix(app): persist queued followups across project switches (#19421) * refactor(tool-registry): yield Config/Plugin services, use Effect.forEach (#19363) * chore: generate * tui plugins (#19347) * chore: generate * effectify Skill service internals (#19364) * chore: update nix node_modules hashes * effectify Plugin service internals (#19365) * refactor(core): split out instance and route through workspaces (#19335) * chore(app): more spacing controls * fix(ui): make streamed markdown feel more continuous (#19404) * fix(app): resize layout viewport when mobile keyboard appears (#15841) * fix(desktop-electron): match dev dock icon inset on macOS (#19429) * fix(app): default file tree to closed with minimum width (#19426) * fix flaky plugin tests (no mock.module for bun) (#19445) * tweak: add additional overflow error patterns (#19446) * no theme override in dev (#19456) * feat: AI SDK v6 support (#18433) * refactor(session): effectify Session service (#19449) * refactor(core): move more responsibility to workspace routing (#19455) * chore: update nix node_modules hashes * refactor(format): use ChildProcessSpawner instead of Process.spawn (#19457) * chore: generate * Single target plugin entrypoints (#19467) * refactor(session): effectify SessionCompaction service (#19459) * feat(ci): use Azure Artifact Signing for Windows releases (#15201) * fix(app): more startup efficiency (#19454) * update effect to 4.0.0-beta.42 (#19484) * chore: update nix node_modules hashes * tweak: adjust bash tool description to increase cache hit rates between projects (#19487) * refactor(session): move context into prompt footer (#19486) * refactor(prompt): remove variant cycle display from footer (#19489) * feat: add model variant selection dialog (#19488) * fix: restore subagent footer and fix style guide violations (#19491) * tweak(session): add top spacing and remove obsolete docs prompt * upgrade opentui to 0.1.91 (#19440) * refactor(file): use AppFileSystem instead of raw Filesystem (#19458) * chore: generate * chore: update nix node_modules hashes * kv theme before default fallback (#19523) * feat: open dialog for model variant selection instead of cycling (#19534) * refactor(session): effectify session processor (#19485) * feat: dialog variant menu and subagent improvements (#19537) * use theme color for prompt placeholder (#19535) * fix: update opencode-gitlab-auth to 2.0.1 (#19552) * chore: update nix node_modules hashes * prompt slot (#19563) * fix: respect semver build identifiers for nix (#11915) * fix: nix embedded web-ui support (#19561) * ignore: kill todo (#19566) * chore: update nix node_modules hashes * wip: zen * wip: zen * zen: ZDR policy * ci: cancel stale nix-hashes runs (#19571) * release: v1.3.4 * refactor: kilo compat for v1.3.4 * fix: migration types * refactor: upgrade kilo-gateway to ai sdk v6 * refactor: improve upstream merge script * fix: fix some tests * style(kilo-vscode): adjust indentation and formatting in parts-util and PopupSelector Normalize boolean expression indentation in isCompletionResult to use consistent 4-space alignment and reformat PopupSelectorProps generic interface declaration to split the Omit type across multiple lines. * docs(kilo-docs): update auto-generated source links Remove outdated URLs and add new bug report issue link pointing to anomalyco/opencode repository. Drop references to kilocode bug report template and config precedence order docs, reducing total unique URLs from 262 to 261. * fix(kilo-ui): remove unused NerdFonts story and MONO_NERD_FONTS import Drop the NerdFonts story from font.stories.tsx along with the unused MONO_NERD_FONTS import, as the exported constant is no longer available from the @opencode-ai/ui/font module. * chore: update visual regression baselines * fix(opencode): move Show conditional wrapper outside box in home onboarding Relocate the Show component to wrap the box element instead of being nested inside it, preventing the empty box from rendering when the onboarding tip is not visible. --------- Co-authored-by: Jay V <air@live.ca> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: Dax <mail@thdxr.com> Co-authored-by: Dax Raad <d@ironbay.co> Co-authored-by: opencode <opencode@sst.dev> Co-authored-by: Kit Langton <kit.langton@gmail.com> Co-authored-by: Adam <2363879+adamdotdevin@users.noreply.github.com> Co-authored-by: Luke Parker <10430890+Hona@users.noreply.github.com> Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Co-authored-by: Brendan Allan <brendonovich@outlook.com> Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com> Co-authored-by: James Long <longster@gmail.com> Co-authored-by: André Cruz <acruz@cloudflare.com> Co-authored-by: Ariane Emory <97994360+ariane-emory@users.noreply.github.com> Co-authored-by: Vladimir Glafirov <vglafirov@gitlab.com> Co-authored-by: Frank <frank@anoma.ly> Co-authored-by: BlankParticle <blankparticle@gmail.com> Co-authored-by: Sebastian <hasta84@gmail.com> Co-authored-by: Burak Yigit Kaya <byk@sentry.io> Co-authored-by: Caleb Norton <n0603919@outlook.com> Co-authored-by: Imanol Maiztegui <imanol.mzd@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
118 lines
9.1 KiB
Plaintext
118 lines
9.1 KiB
Plaintext
Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.
|
|
|
|
Be aware: OS: ${os}, Shell: ${shell}
|
|
|
|
All commands run in the current working directory by default. Use the `workdir` parameter if you need to run a command in a different directory. AVOID using `cd <directory> && <command>` patterns - use `workdir` instead.
|
|
|
|
IMPORTANT: This tool is for terminal operations like git, npm, docker, etc. DO NOT use it for file operations (reading, writing, editing, searching, finding files) - use the specialized tools for this instead.
|
|
|
|
Before executing the command, please follow these steps:
|
|
|
|
1. Directory Verification:
|
|
- If the command will create new directories or files, first use `ls` to verify the parent directory exists and is the correct location
|
|
- For example, before running "mkdir foo/bar", first use `ls foo` to check that "foo" exists and is the intended parent directory
|
|
|
|
2. Command Execution:
|
|
- Always quote file paths that contain spaces with double quotes (e.g., rm "path with spaces/file.txt")
|
|
- Examples of proper quoting:
|
|
- mkdir "/Users/name/My Documents" (correct)
|
|
- mkdir /Users/name/My Documents (incorrect - will fail)
|
|
- python "/path/with spaces/script.py" (correct)
|
|
- python /path/with spaces/script.py (incorrect - will fail)
|
|
- After ensuring proper quoting, execute the command.
|
|
- Capture the output of the command.
|
|
|
|
Usage notes:
|
|
- The command argument is required.
|
|
- You can specify an optional timeout in milliseconds. If not specified, commands will time out after 120000ms (2 minutes).
|
|
- It is very helpful if you write a clear, concise description of what this command does in 5-10 words.
|
|
- If the output exceeds ${maxLines} lines or ${maxBytes} bytes, it will be truncated and the full output will be written to a file. You can use Read with offset/limit to read specific sections or Grep to search the full content. Do NOT use `head`, `tail`, or other truncation commands to limit output; the full output will already be captured to a file for more precise searching.
|
|
|
|
- Avoid using Bash with the `find`, `grep`, `cat`, `head`, `tail`, `sed`, `awk`, or `echo` commands, unless explicitly instructed or when these commands are truly necessary for the task. Instead, always prefer using the dedicated tools for these commands:
|
|
- File search: Use Glob (NOT find or ls)
|
|
- Content search: Use Grep (NOT grep or rg)
|
|
- Read files: Use Read (NOT cat/head/tail)
|
|
- Edit files: Use Edit (NOT sed/awk)
|
|
- Write files: Use Write (NOT echo >/cat <<EOF)
|
|
- Communication: Output text directly (NOT echo/printf)
|
|
- When issuing multiple commands:
|
|
- If the commands are independent and can run in parallel, make multiple Bash tool calls in a single message. For example, if you need to run "git status" and "git diff", send a single message with two Bash tool calls in parallel.
|
|
- ${chaining}
|
|
- Use ';' only when you need to run commands sequentially but don't care if earlier commands fail
|
|
- DO NOT use newlines to separate commands (newlines are ok in quoted strings)
|
|
- AVOID using `cd <directory> && <command>`. Use the `workdir` parameter to change directories instead.
|
|
<good-example>
|
|
Use workdir="/foo/bar" with command: pytest tests
|
|
</good-example>
|
|
<bad-example>
|
|
cd /foo/bar && pytest tests
|
|
</bad-example>
|
|
|
|
# Committing changes with git
|
|
|
|
Only create commits when requested by the user. If unclear, ask first. When the user asks you to create a new git commit, follow these steps carefully:
|
|
|
|
Git Safety Protocol:
|
|
- NEVER update the git config
|
|
- NEVER run destructive/irreversible git commands (like push --force, hard reset, etc) unless the user explicitly requests them
|
|
- NEVER skip hooks (--no-verify, --no-gpg-sign, etc) unless the user explicitly requests it
|
|
- NEVER run force push to main/master, warn the user if they request it
|
|
- Avoid git commit --amend. ONLY use --amend when ALL conditions are met:
|
|
(1) User explicitly requested amend, OR commit SUCCEEDED but pre-commit hook auto-modified files that need including
|
|
(2) HEAD commit was created by you in this conversation (verify: git log -1 --format='%an %ae')
|
|
(3) Commit has NOT been pushed to remote (verify: git status shows "Your branch is ahead")
|
|
- CRITICAL: If commit FAILED or was REJECTED by hook, NEVER amend - fix the issue and create a NEW commit
|
|
- CRITICAL: If you already pushed to remote, NEVER amend unless user explicitly requests it (requires force push)
|
|
- NEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive.
|
|
|
|
1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following bash commands in parallel, each using the Bash tool:
|
|
- Run a git status command to see all untracked files.
|
|
- Run a git diff command to see both staged and unstaged changes that will be committed.
|
|
- Run a git log command to see recent commit messages, so that you can follow this repository's commit message style.
|
|
2. Analyze all staged changes (both previously staged and newly added) and draft a commit message:
|
|
- Summarize the nature of the changes (eg. new feature, enhancement to an existing feature, bug fix, refactoring, test, docs, etc.). Ensure the message accurately reflects the changes and their purpose (i.e. "add" means a wholly new feature, "update" means an enhancement to an existing feature, "fix" means a bug fix, etc.).
|
|
- Do not commit files that likely contain secrets (.env, credentials.json, etc.). Warn the user if they specifically request to commit those files
|
|
- Draft a concise (1-2 sentences) commit message that focuses on the "why" rather than the "what"
|
|
- Ensure it accurately reflects the changes and their purpose
|
|
3. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following commands:
|
|
- Add relevant untracked files to the staging area.
|
|
- Create the commit with a message
|
|
- Run git status after the commit completes to verify success.
|
|
Note: git status depends on the commit completing, so run it sequentially after the commit.
|
|
4. If the commit fails due to pre-commit hook, fix the issue and create a NEW commit (see amend rules above)
|
|
|
|
Important notes:
|
|
- NEVER run additional commands to read or explore code, besides git bash commands
|
|
- NEVER use the TodoWrite or Task tools
|
|
- DO NOT push to the remote repository unless the user explicitly asks you to do so
|
|
- IMPORTANT: Never use git commands with the -i flag (like git rebase -i or git add -i) since they require interactive input which is not supported.
|
|
- If there are no changes to commit (i.e., no untracked files and no modifications), do not create an empty commit
|
|
|
|
# Creating pull requests
|
|
Use the gh command via the Bash tool for ALL GitHub-related tasks including working with issues, pull requests, checks, and releases. If given a GitHub URL use the gh command to get the information needed.
|
|
|
|
IMPORTANT: When the user asks you to create a pull request, follow these steps carefully:
|
|
|
|
1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following bash commands in parallel using the Bash tool, in order to understand the current state of the branch since it diverged from the main branch:
|
|
- Run a git status command to see all untracked files
|
|
- Run a git diff command to see both staged and unstaged changes that will be committed
|
|
- Check if the current branch tracks a remote branch and is up to date with the remote, so you know if you need to push to the remote
|
|
- Run a git log command and `git diff [base-branch]...HEAD` to understand the full commit history for the current branch (from the time it diverged from the base branch)
|
|
2. Analyze all changes that will be included in the pull request, making sure to look at all relevant commits (NOT just the latest commit, but ALL commits that will be included in the pull request!!!), and draft a pull request summary
|
|
3. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following commands in parallel:
|
|
- Create new branch if needed
|
|
- Push to remote with -u flag if needed
|
|
- Create PR using gh pr create with the format below. Use a HEREDOC to pass the body to ensure correct formatting.
|
|
<example>
|
|
gh pr create --title "the pr title" --body "$(cat <<'EOF'
|
|
## Summary
|
|
<1-3 bullet points>
|
|
</example>
|
|
|
|
Important:
|
|
- DO NOT use the TodoWrite or Task tools
|
|
- Return the PR URL when you're done, so the user can see it
|
|
|
|
# Other common operations
|
|
- View comments on a GitHub PR: gh api repos/foo/bar/pulls/123/comments
|