Skip to content

Import the Chrome battery; name battery imports in the system prompt - #2

Merged
skyblanket merged 1 commit into
mainfrom
claude/ecstatic-clarke-2x3202
Sep 27, 2026
Merged

skyblanket merged 1 commit into
mainfrom
claude/ecstatic-clarke-2x3202

Conversation

@skyblanket

Copy link
Copy Markdown
Owner

Companion to skyblanket/swarmrt#6, which makes PDF, Chrome and the audio codecs batteries. swarmrt compiles them into a program only when the calling module imports Pdf, Chrome or Audio, and swc rejects a call without the import.

What changes

  • src/browser.sw gets import Chrome. It is swarm-code's only battery call (chrome_launch).
  • src/prompts.sw: the sw-writing section of the system prompt now names the imports. Programs the model writes with pdf_*, chrome_launch or audio_* then compile.

Merge order

Merge this first, or together with swarmrt#6.

  • On today's swarmrt main, import Chrome is an unresolved-import warning and the build proceeds, so this PR is safe on its own.
  • After swarmrt#6 merges, swarm-code main would fail to build without it.

Testing

Against swarmrt#6:

  • unit tests 245/245;
  • integration 43/43.

The binary now contains the Chrome launcher but no PDF engine and no audio codecs (checked with nm).

🤖 Generated with Claude Code

https://claude.ai/code/session_016jS65kn5WxDsbVU2teBZZE


Generated by Claude Code

…imports

swarmrt now compiles chrome_launch, pdf_* and the audio_* codecs into a
program only when the calling module imports Chrome / Pdf / Audio
(skyblanket/swarmrt#6). browser.sw imports Chrome, and the sw-writing
section of the system prompt names the imports so generated programs
compile.

On a swarmrt without lib/Chrome.sw the import is an unresolved-import
warning and the build proceeds, so this is safe to merge first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016jS65kn5WxDsbVU2teBZZE
@coderabbitai

coderabbitai Bot commented Sep 24, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 658d9af7-3d08-4d8b-8ef6-5cd69f1d3bbb


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@skyblanket
skyblanket merged commit 53007ab into main Sep 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants