chore: bump mill-bun-plugin to 0.2.0 with bun macro + CLAUDE.md rewrite#35
chore: bump mill-bun-plugin to 0.2.0 with bun macro + CLAUDE.md rewrite#35
Conversation
Adopt compile-time validated dependency specifiers via the bun"" string interpolator and add BunPublishModule for transitive dep manifests in published JARs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Demonstrates that a project depending on the published Scalagent JAR gets all npm dependencies (claude-agent-sdk, zod, a2a-js, codex-sdk) resolved automatically via BunPublishModule's embedded manifest — no package.json, no bunDeps, no manual bun install needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Switch from convenience API (Claude.ask) to the provider-independent DSL (ClaudeInterpreter.string + ExecutionPolicy + TraceSummary) which is the central Scalagent API path. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Document the mill-bun-plugin v0.2.0 build dependency pattern and the standalone consumer example that demonstrates automatic JAR manifest dep resolution. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comprehensive always-applied project guide covering: - Philosophy principles (the "zen") - Type algebra (Agent[-P,-I,+O], AgentRun, ExecutionPolicy, TypedAgent) - DSL patterns (convenience API, builder, structured output, tools, delegation, directory scoping, evaluation) - Build commands, dependency management, and examples Replaces the previous conditional Bun-only context file. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR Review — chore: bump mill-bun-plugin to 0.2.0 with bun macro + standalone exampleOverall this is a clean, well-scoped PR. The
|
| Area | Verdict |
|---|---|
npmDeps → bunDeps / bun"" macro |
✅ Clean migration |
BunPublishModule + JAR manifest |
✅ Good design |
| Standalone example | ✅ Demonstrates the feature well, SNAPSHOT caveat noted |
| CLAUDE.md rewrite | ✅ Substantially better, minor scope concern |
| Tests | ✅ Existing suite passes; standalone acts as integration test |
The SNAPSHOT and event-ordering points are worth addressing before merge; the rest are low-priority suggestions.
🤖 Generated with Claude Code
- Add TODO comment for SNAPSHOT → release version after publish - Add comment explaining moduleDir override in standalone example - Drop redundant ZIO type annotation in Main.scala - Note publishLocal prerequisite in CLAUDE.md standalone section Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Code ReviewOverall this is a clean, well-structured PR. The mill-bun-plugin upgrade is straightforward, the standalone example is a great addition for demonstrating JAR-embedded npm dep resolution, and the CLAUDE.md rewrite is a significant improvement in project documentation. ✅ Positives
Issues / Suggestions1. SNAPSHOT dependency in standalone example (
|
| Area | Status |
|---|---|
build.mill migration |
✅ Clean |
BunPublishModule |
✅ Good addition |
| Standalone example (build) | ✅ Works, SNAPSHOT note above |
| Standalone example (Main.scala) | ✅ Good demo, minor ordering note |
| CLAUDE.md rewrite | ✅ Excellent |
.gitignore for standalone |
The SNAPSHOT TODO and missing .gitignore are the two concrete items worth addressing before merge. The rest are suggestions.
Deferring standalone consumer example to a follow-up after the next Scalagent release. This PR focuses on the mill-bun-plugin bump and CLAUDE.md rewrite. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR Review: mill-bun-plugin 0.2.0 + CLAUDE.md rewriteOverall this is a clean, well-scoped PR. The build.millPositive:
Minor: trait linearization order object agent extends BunScalaJSModule with BunPublishModule with PublishModule
Observation:
CLAUDE.mdPositive:
Bug: missing The section currently shows: val answer <- Claude.ask("What is 2 + 2?", options)
val chunks <- Claude.query("Count to 5.", options).textOnly.runCollect
val result <- Claude.conversation(options) { session => ... }These use for
answer <- Claude.ask("What is 2 + 2?", options)
chunks <- Claude.query("Count to 5.", options).textOnly.runCollect
yield ...Or at minimum add a comment: Minor: ~300 lines loaded on every Claude Code invocation vs ~120 before. Reasonable trade-off; if context pressure becomes an issue later, the "Bun / JS Context" section could be split into a separate conditional file since it is rarely relevant compared to the Scala DSL sections. Minor: CLAUDE.md shows Test CoverageSolid test plan:
Gap: does Summary
The |
Summary
bun""string interpolator for compile-time validated dependency specifiers andBunPublishModulefor embeddingMETA-INF/bun/bun-dependencies.jsonin published JARsKey Changes
build.mill
npmDeps/npmDevDeps→bunDeps/bunDevDepswithbun""macroBunPublishModuletrait toagentmoduleimport mill.bun.bunCLAUDE.md
alwaysApply: true(was conditional on JS/TS globs)Follow-up
Test plan
./mill agent.compile— bun macro fires correctly./mill agent.test— 49 suites, 0 failures./mill examples.compile— transitive deps resolve🤖 Generated with Claude Code