chore(bolt): sync upstream dev

Merged
A-
2d ago
+1327-388

User description

Issue for this PR

No linked issue.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Syncs anomalyco/opencode:dev through 21e66f21c7 into Bolt dev. The updater conflict keeps Bolt package names and Scoop/Chocolatey behavior while preserving the upstream npm --allow-scripts safeguard. OpenCode-specific WinGet packaging is not enabled for Bolt.

How did you verify your code works?

  • cd packages/cli && bun test --timeout 30000 test/updater-install.test.ts — passed (29 passed; 5 Windows-only tests skipped on macOS).
  • cd packages/cli && bun run typecheck:tsc — passed.

Visual

Optional, for user-facing changes: a small looping animated SVG (240×72) of the change, shown in the desktop app's "What's new in beta". Replace the block below or delete this section.

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.


Summary by cubic

Syncs anomalyco/opencode:dev through 21e66f21c7 into Bolt dev. The updater conflict keeps Bolt package names and Scoop/Chocolatey behavior while preserving the upstream npm --allow-scripts safeguard; OpenCode-specific WinGet packaging stays disabled for Bolt.

  • Built-in and plugin skills now use virtual skill:// URIs instead of /builtin/*.md paths, and reads and links resolve them consistently.
  • Unparseable tool arguments go back to the model as an error result so it can retry, and a step that hits the output token limit ends without running potentially cut-off tool calls.
  • AIError exposes status, code, isRetryable, and retryAfterMs.
  • The Claude Agent plugin disables non-streaming and refusal fallbacks and reports plan usage on step metadata.
  • Compaction no longer resends a rejected conversation unchanged when triggered by an overflow.
  • The Console gets a public sitemap entry, redirects old site pages, and can share workspace instructions and skills.

PR Type

Enhancement, Bug fix, Documentation


Description

  • Introduce virtual skill:// URIs across packages

  • Refactor AI tool execution loop and errors

  • Support Console workspace instructions and skills

  • Fix context overflow compaction and npm upgrade


Diagram Walkthrough

flowchart LR
  A["Virtual skill:// URIs"] -- "Resolves in" --> B["Read Tool & GUI Handlers"]
  C["Console Library"] -- "Loads" --> D["Workspace Instructions & Skills"]
  E["AI Loop Refactor"] -- "Handles" --> F["AIError & Retry Details"]

File Walkthrough

Relevant files
Refactor
5 files
llm.tsrefactor ai loop and stream methods into helper functions +93/-201
provider-error.tsdelegate isRetryable check to AIError property                      +2/-75   
recorded-scenarios.tssimplify weather tool loop scenario runner                              +2/-37   
provider-codes.tsextract provider error code extraction helpers                      +43/-0   
discovery.tsExport path safety helper functions for skill discovery    +2/-2     
Enhancement
18 files
opencode.tsload workspace instructions and skills from Console library +153/-24
loop.tsadd tool loop execution helpers and error retries                +211/-0 
skill.tsadd support for virtual skill URIs and files                          +48/-7   
read.tshandle reading virtual skill URIs in read tool                      +61/-0   
read-filesystem.tssupport virtual skill URIs in filesystem read utility        +8/-7     
errors.tsadd status, code, retryAfterMs, and isRetryable getters to AIError +61/-0   
convert-claude-stream.tsattach plan rate limit details to step finish metadata      +7/-1     
resolve-link.tsadd skill URI support to link resolution logic                      +14/-4   
model.tsxsupport virtual skill URIs in application file model          +5/-3     
middleware.tsadd redirects for legacy console URLs                                        +17/-0   
tool-runtime.tsadd pending call dispatch utility for tool loop                    +17/-0   
skill.tsupdate built-in skill definitions to use skill URIs            +2/-2     
prompt.tspass skill files when preparing prompt skill attachments  +2/-1     
renderer.tsxsupport skill URIs in file path resolution                              +1/-1     
skill.tsUse skill:// URI schema for browser plugin path                    +1/-1     
path.tsRecognize skill:// URIs as absolute paths in workspace helper +2/-1     
skill.tsPass skill files to preparation logic in skill tool            +2/-1     
path.tsHandle skill:// URIs in GUI open-in-app path resolution    +3/-0     
Tests
16 files
loop.test.tsadd unit tests for tool loop error retries and token limits +115/-0 
tool-read.test.tsadd tests for reading virtual skill URIs                                  +122/-1 
loop-steps.test.tsadd tests for loop step utilities and usage calculations  +77/-0   
session-summary.spec.tsupdate tests to use virtual skill URIs                                      +6/-5     
skill.test.tsadd tests for virtual skill files and URIs                              +53/-4   
provider-error.test.tsadd tests for AIError property getters                                      +50/-1   
session-runner.test.tsadd test for conversation compaction behavior on context overflow +32/-0   
convert.test.tstest rate limit metadata propagation in stream conversion +16/-0   
path.test.tsadd test for open-in-app path resolution with skill URIs  +4/-0     
session-instructions.test.tsadd Skill service node to test layer                                          +3/-0     
resolve-link.test.tsadd tests for parsing skill URI links                                        +2/-0     
tools.test.tsupdate browser skill path test to use skill URI                    +5/-0     
error-partial.test.tsadd test verifying stream partial output retention              +12/-0   
fixture.tsadd InstructionDiscovery service to plugin test fixture    +2/-0     
skill.test.tsUpdate skill test assertions for skill:// URIs                      +2/-0     
tool-skill.test.tsAdd mock files method to Skill Service test mock                  +1/-0     
Bug fix
5 files
updater-install.test.tsinclude allow-scripts flag in npm update commands                +15/-3   
compaction.tsavoid resending uncompacted conversation on overflow compaction +14/-3   
open-in-app.tsxprevent opening virtual skill URIs in external applications +7/-1     
query-options.tsDisable non-streaming and refusal fallbacks for Claude Agent +2/-0     
updater.tsAllow npm upgrade scripts for global package installation +1/-0     
Documentation
4 files
README.mdDocument tool error behavior and AIError properties            +22/-2   
claude-agent-provider.mdDocument disabled fallbacks in Claude agent provider spec +2/-0     
instructions.mdxDocument Console workspace instruction sharing                      +2/-0     
skills.mdxDocument Console workspace skill sharing                                  +2/-0     
Configuration changes
1 files
robots.txtAdd console sitemap URL to robots.txt                                        +1/-0