Skip to content

Commit 13ba72d

Browse files
Merge branch 'Zoo-Code-Org:main' into main
2 parents 6926916 + 6bcd398 commit 13ba72d

262 files changed

Lines changed: 12560 additions & 2866 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
"zoo-code": patch
3+
---
4+
5+
Fix command auto-approval for multi-line shell constructs that must be treated as a single command.
6+
7+
**Quoted multi-line arguments** (`sh -c '...'`, `sh -c $'...'`, `sh -c "..."`): the parser previously split on every newline before handling quotes, so newlines inside a quoted argument were treated as separate commands, defeating allowlist auto-approval. Single-quoted, ANSI-C (`$'...'`), and double-quoted strings are now masked before the newline split so embedded newlines and operators stay within their command.
8+
9+
**Heredocs** (`<< EOF`, `<< 'EOF'`, `<< "EOF"`, `<<- EOF`): the entire heredoc -- opener line, body, and terminator -- is now treated as a single quoted region. Body lines are not split into independent sub-commands. All heredoc delimiter quoting styles (unquoted, single-quoted, double-quoted, backslash-escaped) are supported. An unterminated heredoc (missing terminator) is treated as malformed and returned as a single opaque token.
10+
11+
**Locale quoting** (`$"..."`): treated as a distinct token analogous to ANSI-C quoting, preserving the `$` prefix and preventing the double-quote handler from stripping it.
12+
13+
Quote masking is comment-aware: a quote character inside a `#` comment is not paired with a quote on a later line, so a comment cannot hide a real newline separator and merge two distinct commands. Commands with an unterminated quote are detected with a quote-aware scanner and returned as a single opaque token, preventing a line inside the unclosed quote from surfacing as an independently auto-approvable command. Genuine unquoted newlines still split into separate sub-commands, each of which must be allowlisted for auto-approval.
14+
15+
**Pattern selector (UI)**: the command pattern breakdown shown after execution now uses the same heredoc- and quote-aware parser (`parseCommand`) before extracting patterns, so an unterminated or terminated heredoc no longer produces spurious tokens like `EOF`, body-line words, or `<<` fragments in the allow/deny selector.
16+
17+
Note: this change only prevents *auto-approval* of fragments from a malformed command; it does not reject malformed commands before execution, which will be addressed in a separate PR to keep the scope focused here.

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747

4848
# Initializes the CodeQL tools for scanning.
4949
- name: Initialize CodeQL
50-
uses: github/codeql-action/init@03e4368ac7daa2bd82b3e85262f3bf87ee112f57 # v3
50+
uses: github/codeql-action/init@dd903d2e4f5405488e5ef1422510ee31c8b32357 # v3
5151
with:
5252
languages: ${{ matrix.language }}
5353
build-mode: ${{ matrix.build-mode }}
@@ -75,6 +75,6 @@ jobs:
7575
exit 1
7676
7777
- name: Perform CodeQL Analysis
78-
uses: github/codeql-action/analyze@03e4368ac7daa2bd82b3e85262f3bf87ee112f57 # v3
78+
uses: github/codeql-action/analyze@dd903d2e4f5405488e5ef1422510ee31c8b32357 # v3
7979
with:
8080
category: "/language:${{matrix.language}}"

.github/workflows/marketplace-publish.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,53 @@ on:
77
workflow_dispatch:
88

99
jobs:
10+
check-pr-approval:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: read
14+
steps:
15+
- name: Check PR approval status
16+
env:
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
REPO: ${{ github.repository }}
19+
SHA: ${{ github.sha }}
20+
run: |
21+
pr_number=$(gh api "repos/${REPO}/commits/${SHA}/pulls" \
22+
--header "Accept: application/vnd.github+json" \
23+
--jq '.[0].number // empty')
24+
25+
if [ -z "$pr_number" ]; then
26+
echo "No PR found for commit ${SHA}. Deployment requires an approved PR."
27+
exit 1
28+
fi
29+
30+
review_decision=$(gh api graphql \
31+
-f owner="${REPO%%/*}" \
32+
-f name="${REPO#*/}" \
33+
-F number="$pr_number" \
34+
-f query='
35+
query($owner: String!, $name: String!, $number: Int!) {
36+
repository(owner: $owner, name: $name) {
37+
pullRequest(number: $number) {
38+
reviewDecision
39+
}
40+
}
41+
}' \
42+
--jq '.data.repository.pullRequest.reviewDecision // "NONE"')
43+
44+
echo "PR #${pr_number} review_decision: ${review_decision}"
45+
46+
if [ "$review_decision" != "APPROVED" ]; then
47+
echo "PR #${pr_number} is not approved (state: ${review_decision}). Deployment blocked."
48+
exit 1
49+
fi
50+
51+
echo "PR #${pr_number} is approved. Proceeding."
52+
1053
publish-stable:
54+
needs: [check-pr-approval]
1155
runs-on: ubuntu-latest
56+
environment: marketplace-production
1257
permissions:
1358
contents: write
1459

@@ -29,6 +74,13 @@ jobs:
2974
test "$package_name" = "zoo-code"
3075
test "$publisher" = "ZooCodeOrganization"
3176
77+
- name: Validate publish ref
78+
run: |
79+
if [ "$GITHUB_EVENT_NAME" = "workflow_dispatch" ] && [ "$GITHUB_REF_NAME" != "main" ]; then
80+
echo "Manual stable publishes must run from main, not ${GITHUB_REF_NAME}."
81+
exit 1
82+
fi
83+
3284
- name: Validate release tag
3385
if: github.event_name == 'push'
3486
run: |

.github/workflows/nightly-publish.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ concurrency:
1515
jobs:
1616
publish-prerelease:
1717
runs-on: ubuntu-latest
18+
environment: marketplace-prerelease
1819

1920
steps:
2021
- name: Checkout code
@@ -33,6 +34,13 @@ jobs:
3334
test "$package_name" = "zoo-code"
3435
test "$publisher" = "ZooCodeOrganization"
3536
37+
- name: Validate publish ref
38+
run: |
39+
if [ "$GITHUB_REF_NAME" != "main" ]; then
40+
echo "Pre-release publishes must run from main, not ${GITHUB_REF_NAME}."
41+
exit 1
42+
fi
43+
3644
- name: Set pre-release version
3745
id: version
3846
env:

.roo/commands/release.md

Lines changed: 26 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,9 @@ mode: code
3636
- Do not manually edit `src/README.md`; the extension bundle step copies root `README.md` into `src/README.md`.
3737
- Check for stale upstream Roo Code wording that should now say Zoo Code.
3838

39-
6. Create the release notes as a changeset file at `.changeset/v[version].md`, then run `pnpm changeset:version` on the release branch before opening the PR.
40-
41-
```md
42-
---
43-
"zoo-code": patch|minor|major
44-
---
45-
46-
[list of changes]
47-
```
39+
6. Write the release notes directly into `CHANGELOG.md` on the release branch.
4840

41+
- Use the heading format `## [version]` (with square brackets) — e.g. `## [3.58.1]`. The publish workflow at `.github/workflows/marketplace-publish.yml` extracts release notes by matching this exact pattern; headings without brackets will be missed and the GitHub release will fall back to a generic message.
4942
- Always include contributor attribution and the PR number: use `(PR #<prNumber> by @username)`.
5043
- For PRs that close issues, include both issue and PR authors: `- Fix: Description (#123 by @reporter, PR #456 by @contributor)`.
5144
- For PRs without linked issues, include the PR number and author: `- Add support for feature (PR #456 by @contributor)`.
@@ -58,21 +51,19 @@ mode: code
5851
- Ask the user what three areas should be highlighted.
5952
- Update relevant announcement files and documentation, including `webview-ui/src/components/chat/Announcement.tsx`, `README.md`, and the `latestAnnouncementId` in `src/core/webview/ClineProvider.ts`.
6053
- Ask the user to confirm the English announcement before proceeding.
61-
- Arrange translation updates for all supported locales affected by README, announcement, or package localization changes.
54+
- Arrange translation updates for all supported locales affected by README, announcement, or package localization changes. Use the `/roo-translate` skill to propagate the updated `chat.json` announcement highlight keys and the "What's New" section to all supported locales.
55+
- All 17 locale READMEs should contain a translated "What's New" section. Check each one and add a translated section where missing.
6256
6357
8. Create the release branch:
6458
6559
```bash
6660
git checkout -b release/v[version]
6761
```
6862
69-
9. Generate the final release state on that branch:
70-
71-
```bash
72-
pnpm changeset:version
73-
```
63+
9. Bump the version in `src/package.json` to the target release version and ensure `CHANGELOG.md` and `src/CHANGELOG.md` are up to date.
7464
75-
- This should update `src/package.json`, `CHANGELOG.md`, and `src/CHANGELOG.md`, then consume the `.changeset` file.
65+
- Verify the `CHANGELOG.md` heading uses `## [version]` (with brackets).
66+
- Copy or sync `CHANGELOG.md` to `src/CHANGELOG.md` if the project keeps both.
7667
- Review the generated version and changelog before opening the PR.
7768
7869
10. Open a single release PR with the fully generated release state.
@@ -91,32 +82,31 @@ mode: code
9182
- If the release includes translated README or package-localization updates, include those files in the same PR.
9283
- Let the release validation workflow and normal PR checks run before merge.
9384
94-
11. After the release PR is merged, stop for a release review on the resulting `main` commit.
95-
96-
```bash
97-
git switch main
98-
git pull origin main
99-
REVIEWED_SHA=$(git rev-parse HEAD)
100-
git rev-parse --short "$REVIEWED_SHA"
101-
```
85+
11. Once the release PR is open and passing checks, get it approved by a reviewer before proceeding.
10286
103-
- Review the merged release state before any publish step.
104-
- Confirm that `src/package.json`, `CHANGELOG.md`, `src/CHANGELOG.md`, and the Marketplace-facing `README.md` all reflect the intended release.
105-
- Check that the release PR checks passed and that the merged commit is the one you want to ship.
106-
- Share that review summary, including `REVIEWED_SHA`, with the user and wait for explicit confirmation before creating the tag.
107-
- Do not create the tag or trigger publishing until the user says to proceed.
87+
- Do not create the tag until the PR has at least one approval — the publish workflow enforces this automatically and will fail if no approved PR is found for the tagged commit.
10888
109-
12. Only after explicit confirmation, create the release tag on that reviewed `main` commit:
89+
12. After the PR is approved, create the release tag on the release branch tip and push it:
11090
11191
```bash
112-
git tag v[version] "$REVIEWED_SHA"
92+
git tag v[version]
11393
git push origin v[version]
11494
```
11595
116-
- If `main` advances after the review pause, keep using the pinned `REVIEWED_SHA` for the tag instead of silently tagging a newer commit.
96+
- Tag the branch tip as-is. Do not rebase or merge additional commits into the release branch before tagging — doing so changes the commit SHA and may pull in unreviewed changes that weren't part of the approval.
97+
- The publish workflow validates that the tag version matches `src/package.json`.
98+
99+
13. The tag push triggers the stable publish workflow.
117100
118-
13. The stable publish workflow runs from the `v[version]` tag.
101+
- The workflow first checks that the tagged commit belongs to an approved PR. If the PR is not yet approved this step fails — approve the PR first, then retrigger by recreating and pushing the tag: `git tag -d v[version] && git push origin :refs/tags/v[version] && git tag v[version] && git push origin v[version]`.
102+
- Once the approval check passes, the `marketplace-production` environment gate fires and notifies the configured approvers.
103+
- A human approver must then approve the deployment before the extension is published to VS Code Marketplace and Open VSX.
119104
120-
- Do not create the tag before the release PR is merged.
121-
- The publish workflow validates that the tag version matches `src/package.json`.
122-
- Marketplace and Open VSX publishing use the configured CI secrets.
105+
14. After a successful deployment, add the release PR to the merge queue.
106+
107+
```bash
108+
gh pr merge [pr-number] --auto --squash
109+
```
110+
111+
- Do not merge before the deployment succeeds — merging first and then discovering a publish failure leaves `main` ahead of what was actually shipped.
112+
- The merge queue runs all required checks against the release branch before merging to `main`.

CHANGELOG.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,62 @@
11
# Zoo Code Changelog
22

3+
## [3.60.0]
4+
5+
### Minor Changes
6+
7+
- Add Claude Fable 5 support across Anthropic, Bedrock, and Vertex providers (PR #555 by @taltas)
8+
- Add OpenAI GPT-5.5 support (PR #537 by @scream4ik)
9+
- Add per-mode MCP server restrictions — configure an allowlist to restrict which MCP servers are active per mode (PR #453 by @simurg79)
10+
- Add workspace `rootResolution` setting for controlling path resolution in multi-root workspaces (PR #538 by @simurg79)
11+
- Add LiteLLM support for `reasoning_content` and `reasoning` fields in streaming responses (PR #449 by @daewoongoh)
12+
- Add Show Ripgrep Diagnostic command for easier ripgrep troubleshooting (PR #281 by @0xMink)
13+
- Redesign terminal profile settings UX — unified dropdown, consistent layout, and improved styling (#119 by @chenyuanrun, #321 by @F915, PR #533 by @F915)
14+
- Fix chat window running out of memory when transcript grows large (PR #153 by @app/roomote)
15+
- Fix relative symlinks in rules files not resolving correctly using realpath of parent directory (PR #442 by @p12tic)
16+
- Fix command approval buttons not clearing when auto-executed (PR #480 by @awschmeder)
17+
- Fix multi-line quoted command parsing, auto-approval behavior, and malformed-command error surfacing (PR #483 by @awschmeder)
18+
- Fix `list-files` tool to validate directory exists before spawning ripgrep (#557 by @edelauna, PR #558 by @edelauna)
19+
- Fix child tasks returning to parent when parent status is active in AttemptCompletionTool (PR #510 by @edelauna)
20+
- Fix surface in-stream errors from Zoo and Vercel AI gateways (PR #569 by @JamesRobert20)
21+
- Gate marketplace publish behind PR approval check (PR #516 by @edelauna)
22+
- Stabilize flaky e2e provider suite ordering and zai requestCapture race (#512 by @edelauna, #514 by @edelauna, PR #45 by @app/roomote)
23+
- Fix flaky e2e subtasks fixture collision and task identity prompt (#561, PR #563 by @simurg79)
24+
- Add contributing guidelines: PR expectations and AI-assisted contribution policy (PR #562 by @edelauna)
25+
- Configure knip and remove dead code (PR #225 by @app/roomote)
26+
- Pin dependencies (PR #423 by @app/renovate)
27+
28+
## [3.58.1]
29+
30+
### Patch Changes
31+
32+
- Fix: Remove unsupported `--no-absolute-filenames` tar argument (#491 by @kazenshi, PR #492 by @kazenshi)
33+
34+
## 3.58.0
35+
36+
### Minor Changes
37+
38+
- Add Zoo Gateway provider with auth callback and multi-profile token sync (PR #344 by @JamesRobert20, PR #345 by @JamesRobert20, PR #347 by @JamesRobert20)
39+
- Add Gemini 3.5 Flash support (PR #331 by @jeanbispo)
40+
- Add Semble as a local on-the-fly embedding provider for code indexing (PR #399 by @navedmerchant)
41+
- Remove extension-side LLM telemetry; server logs only through gateway (PR #346 by @JamesRobert20)
42+
- Add VS Code integrated terminal shell override (PR #277 by @proyectoauraorg)
43+
- Add configurable chat font size (#157 by @duvw, PR #276 by @proyectoauraorg)
44+
- Render GitHub-style alerts in the webview (#258 by @melck, PR #275 by @proyectoauraorg)
45+
- Add configurable max output tokens for GLM models (#161 by @app/roomote, PR #274 by @proyectoauraorg)
46+
- Introduce WorkspacePathResolver for async symlink-aware path canonicalization (#389 by @edelauna, PR #428 by @proyectoauraorg)
47+
- Better secure release workflows and GitHub Actions (PR #482 by @edelauna)
48+
- Fix React crash from malformed follow-up suggestion mode (PR #414 by @edelauna)
49+
- Fix OpenAI temperature omitted when no custom value is set (#242 by @brunocasado, PR #247 by @proyectoauraorg)
50+
- Handle per-key failures during settings import (PR #401 by @taltas)
51+
- Add comprehensive test coverage for ReadFileTool (PR #222 by @proyectoauraorg)
52+
- Unskip VS Code e2e replay for subtasks (PR #94 by @app/roomote)
53+
- Fix e2e cache: replace paths filter with content-hash cache skip (PR #268 by @app/roomote)
54+
- Remove deprecated requestRooCreditBalance handler (PR #385 by @JamesRobert20)
55+
- Update mermaid to v11.15.0 for a security fix (PR #235 by @app/renovate)
56+
- Update axios to v1.16.0 for a security fix (PR #400 by @app/renovate)
57+
- Pin dependencies (PR #353 by @app/renovate)
58+
- Remove unused tmp dependency and other unused packages (PR #341 by @app/renovate)
59+
360
## 3.56.0
461

562
### Minor Changes

CONTRIBUTING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Zoo Code is a community-driven project, and we deeply value every contribution.
2020
- [Before You Contribute](#before-you-contribute)
2121
- [Finding & Planning Your Contribution](#finding--planning-your-contribution)
2222
- [Development & Submission Process](#development--submission-process)
23+
- [Pull Request Expectations](#pull-request-expectations)
24+
- [AI-Assisted Contributions](#ai-assisted-contributions)
2325
- [Legal](#legal)
2426

2527
## Before You Contribute
@@ -136,6 +138,32 @@ pnpm install
136138
- **Weekly In-depth Review:** Comprehensive assessment.
137139
- **Iterate promptly** based on feedback.
138140

141+
### Pull Request Expectations
142+
143+
Pull requests should be reviewable, tested, and maintainable. Before opening a PR, please make sure that:
144+
145+
- The change is scoped to a specific issue, bug, or improvement.
146+
- You can explain what the change does and why it is correct.
147+
- You have tested the change locally where practical.
148+
- You are willing to respond to review feedback and make reasonable follow-up changes.
149+
- The PR does not require maintainers to substantially rewrite, redesign, or take ownership of the implementation before it can be merged.
150+
151+
Maintainers may close PRs that are incomplete, too broad, inactive, not aligned with the project direction, or that create disproportionate review or maintenance burden. Closing a PR is not a judgment on the contributor; it is a maintainer decision that the change cannot be accepted in its present form.
152+
153+
### AI-Assisted Contributions
154+
155+
Use of AI tools is allowed, but contributors remain fully responsible for their submissions.
156+
157+
If you use AI tools to help create a PR, you must:
158+
159+
- Review and understand every meaningful change.
160+
- Be able to explain the implementation and tradeoffs in your own words.
161+
- Test the change yourself. If testing is impractical for your environment, explain why in the PR description and describe how reviewers can verify the change instead.
162+
- Verify that generated code is correct, necessary, and compatible with the project license.
163+
- Consider disclosing AI assistance in the PR description when it materially shaped the code, tests, or design — this helps reviewers give better feedback.
164+
165+
Please do not submit AI-generated changes that you do not understand or cannot maintain through review. Maintainers may close PRs that appear substantially AI-assisted but lack human verification, clear rationale, or review follow-through.
166+
139167
## Legal
140168

141169
By contributing, you agree your contributions will be licensed under the Apache 2.0 License, consistent with Zoo Code's licensing.

PRIVACY.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,6 @@ go—and, importantly, where they don't.
4040
We retain telemetry only as long as needed for product analytics and debugging.
4141
Telemetry does **not** collect your code or AI prompts, and you can opt out at
4242
any time through the settings.
43-
- **Zoo Code Observability (Authenticated Subscribers Only):** If you sign in to
44-
Zoo Code and have an active subscription, Zoo Code will send LLM usage
45-
telemetry to the Zoo Code backend (zoocode.dev). This includes task ID, AI
46-
provider name, model name, token counts (input/output/cache), and estimated
47-
cost. This data is linked to your authenticated Zoo Code account. You can stop
48-
this collection at any time by signing out via the Zoo Code badge in the chat
49-
area.
5043
- **Marketplace Requests**: When you browse or search the Marketplace for Model
5144
Configuration Profiles (MCPs) or Custom Modes, Zoo Code makes a secure API
5245
call to Zoo Code's backend servers to retrieve listing information. These

0 commit comments

Comments
 (0)