Skip to content

fix(create-agentuity): dispatch through the invoking package manager#1525

Merged
Huijiro merged 2 commits into
mainfrom
fix/create-agentuity-package-manager-dispatch
Jun 3, 2026
Merged

fix(create-agentuity): dispatch through the invoking package manager#1525
Huijiro merged 2 commits into
mainfrom
fix/create-agentuity-package-manager-dispatch

Conversation

@Huijiro
Copy link
Copy Markdown
Member

@Huijiro Huijiro commented Jun 2, 2026

Summary

The create-agentuity wrapper hardcoded spawnSync('bunx', ...), making Bun a hard requirement for scaffolding even when invoked via npm create / npx. This contradicted the package README ("Bun 1.3+ or Node.js 24+") — Node/pnpm/yarn-only users hit a failure when bunx wasn't on PATH.

This change detects the invoking package manager from npm_config_user_agent and runs the underlying @agentuity/cli ... create through the matching one-off runner, falling back to npx (the wrapper runs under #!/usr/bin/env node, so Node/npx is always available).

Fixes #1522.

Changes

  • src/index.ts — two pure, testable helpers:
    • detectPackageManager(userAgent)bun / npm / pnpm / yarn / undefined
    • getCreateCommand(pm, cliPackage, args) → dispatch mapping:
      • bun → bunx <pkg> create ...
      • pnpm → pnpm dlx <pkg> create ...
      • yarn → yarn dlx <pkg> create ...
      • npm / unknown → npx --yes <pkg> create ...
  • src/bin.ts — use the helpers instead of hardcoding bunx; adds shell: true on Windows (npx/pnpm/yarn are .cmd shims there).
  • test/index.test.ts — 14 new tests for detection + command construction across all package managers and the fallbacks.
  • README.md — Usage now leads with npm and lists all four package managers, matching the (now accurate) "Bun or Node" requirement.

Verification

  • bun test → 26 pass, 0 fail
  • bun run typecheck → clean
  • bun run build → clean
  • biome check → clean
  • Compiled dispatch verified end-to-end:
    • no user agent → npx --yes ... create
    • npm/...npx --yes ... create
    • pnpm/...pnpm dlx ... create
    • yarn/...yarn dlx ... create
    • bun/...bunx ... create

Follow-up

This unblocks the related docs change (PR #1462) that overstates Bun as a blanket prerequisite — once this lands, those docs can scope the Bun requirement to "optional" and default to Node/npm.

Summary by CodeRabbit

  • New Features

    • Launcher now detects and uses your preferred package manager (npm, pnpm, yarn, or bun) when creating projects.
  • Documentation

    • README updated with usage examples for npm, pnpm, yarn, and bun; updated generated project script examples to use npm run dev/build.
  • Tests

    • Added tests for package manager detection and command construction.

The create wrapper hardcoded spawnSync('bunx', ...), which made Bun a hard
requirement for scaffolding even when invoked via npm/pnpm/yarn — contradicting
the package README ('Bun 1.3+ or Node.js 24+'). Node-only users hit a failure
when bunx was not on PATH.

Detect the invoking package manager from npm_config_user_agent and run the
underlying '@agentuity/cli ... create' through the matching one-off runner
(bunx / pnpm dlx / yarn dlx / npx), falling back to npx since the wrapper runs
under Node. Add unit tests for detection and command construction.

Fixes #1522
@agentuity-agent
Copy link
Copy Markdown

agentuity-agent Bot commented Jun 2, 2026

The latest Agentuity deployment details.

Project Deployment Preview Updated (UTC)
docs 🔴 Failed (deploy_a2bbdcb13c521713df996eb036ef4ce4) - 2026-06-02T22:49:54Z

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 2, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e3b63f9d-7032-42fe-9cdf-dab655fe3684

📥 Commits

Reviewing files that changed from the base of the PR and between 12dc0b0 and 9dfd18b.

📒 Files selected for processing (3)
  • packages/create-agentuity/README.md
  • packages/create-agentuity/src/index.ts
  • packages/create-agentuity/test/index.test.ts
✅ Files skipped from review due to trivial changes (1)
  • packages/create-agentuity/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/create-agentuity/src/index.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: Build
  • GitHub Check: Package Installation & Usage Test (node)
  • GitHub Check: Migrate Chain (v1 → v2 → v3)
  • GitHub Check: Framework Demo Tests
  • GitHub Check: Service Client Smoke Tests
  • GitHub Check: Queue CLI Tests (bun)
  • GitHub Check: Queue CLI Tests (node)
  • GitHub Check: Postgres SSL Integration Test
  • GitHub Check: Package Installation & Usage Test (bun)
  • GitHub Check: Pack & Upload
  • GitHub Check: Agentuity Deployment
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx}: Format code with Biome using tabs (width 3), single quotes, semicolons, lineWidth 100, and trailing commas es5
Use StructuredError from @agentuity/core for error handling

Files:

  • packages/create-agentuity/test/index.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript in strict mode with ESNext and bundler moduleResolution

Files:

  • packages/create-agentuity/test/index.test.ts
packages/*/test/**/*.test.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

packages/*/test/**/*.test.{ts,tsx,js,jsx}: Place tests in test/ folder parallel to src/ (never inside src/ or under __tests__/)
Import from ../src/ in test files
Use @agentuity/test-utils for shared mocks in tests

Files:

  • packages/create-agentuity/test/index.test.ts
🧠 Learnings (2)
📚 Learning: 2025-12-21T00:31:41.858Z
Learnt from: jhaynie
Repo: agentuity/sdk PR: 274
File: packages/cli/src/cmd/build/vite/server-bundler.ts:12-41
Timestamp: 2025-12-21T00:31:41.858Z
Learning: In Bun runtime, BuildMessage and ResolveMessage are global types and are not exported from the bun module. Do not import { BuildMessage } from 'bun' or similar; these types are available globally and should be used without import. This applies to all TypeScript files that target the Bun runtime within the repository.

Applied to files:

  • packages/create-agentuity/test/index.test.ts
📚 Learning: 2026-02-21T02:05:57.982Z
Learnt from: jhaynie
Repo: agentuity/sdk PR: 1010
File: packages/drizzle/test/proxy.test.ts:594-603
Timestamp: 2026-02-21T02:05:57.982Z
Learning: Do not rely on StructuredError from agentuity/core in test files or simple error handling paths. In tests and straightforward error handling, use plain Error objects to represent failures, reserving StructuredError for more complex error scenarios in application logic.

Applied to files:

  • packages/create-agentuity/test/index.test.ts
🔇 Additional comments (1)
packages/create-agentuity/test/index.test.ts (1)

2-2: LGTM!

Also applies to: 54-126


📝 Walkthrough

Walkthrough

The create-agentuity launcher detects the invoking package manager (including yarn-classic) and builds the appropriate CLI invocation (bunx, pnpm dlx, yarn dlx, or npx) at runtime; bin.ts spawns that command. Tests and README are updated accordingly.

Changes

Multi-package-manager launcher support

Layer / File(s) Summary
Package manager detection and command utilities
packages/create-agentuity/src/index.ts
Adds PackageManager (now includes yarn-classic), detectPackageManager(userAgent) to parse the first npm_config_user_agent token and map Yarn 1.x to yarn-classic, and getCreateCommand(pm, cliPackage, args) to produce {command,args} for bunx, pnpm dlx, yarn dlx, or fallback to npx --yes.
Bin entry point dynamic command dispatch
packages/create-agentuity/src/bin.ts
Imports detection and command utilities, detects package manager from environment, constructs command/args via getCreateCommand(), spawns the CLI with platform-specific shell handling, and exits with the spawned process status.
Test coverage for detection and command construction
packages/create-agentuity/test/index.test.ts
Adds tests for detectPackageManager (bun/npm/pnpm/yarn and yarn-classic mapping, undefined/unrecognized) and for getCreateCommand (bun/pnpm/yarn/yarn-classic/npm/unknown, and empty args behavior); updates test imports.
Usage documentation for multiple package managers
packages/create-agentuity/README.md
Updates Usage examples to show npm/pnpm/yarn/bun invocations and switches available scripts to npm run dev / npm run build.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed PR fully implements all objectives from #1522: detects invoking package manager, dispatches through appropriate runner (bunx/pnpm dlx/yarn dlx/npx), adds comprehensive tests, and updates README documentation.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #1522 objectives: package manager detection, command dispatch logic, tests, and README updates. No unrelated modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

📦 Canary Packages Published

version: 3.0.3-9dfd18b

Packages
Package Version URL
@agentuity/pi 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-pi-3.0.3-9dfd18b.tgz
@agentuity/task 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-task-3.0.3-9dfd18b.tgz
@agentuity/queue 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-queue-3.0.3-9dfd18b.tgz
@agentuity/sandbox 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-sandbox-3.0.3-9dfd18b.tgz
@agentuity/core 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-core-3.0.3-9dfd18b.tgz
@agentuity/db 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-db-3.0.3-9dfd18b.tgz
@agentuity/vite 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-vite-3.0.3-9dfd18b.tgz
@agentuity/adapter 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-adapter-3.0.3-9dfd18b.tgz
@agentuity/keyvalue 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-keyvalue-3.0.3-9dfd18b.tgz
@agentuity/analytics 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-analytics-3.0.3-9dfd18b.tgz
@agentuity/drizzle 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-drizzle-3.0.3-9dfd18b.tgz
@agentuity/stream 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-stream-3.0.3-9dfd18b.tgz
@agentuity/vector 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-vector-3.0.3-9dfd18b.tgz
@agentuity/server 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-server-3.0.3-9dfd18b.tgz
@agentuity/postgres 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-postgres-3.0.3-9dfd18b.tgz
@agentuity/hono 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-hono-3.0.3-9dfd18b.tgz
@agentuity/schedule 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-schedule-3.0.3-9dfd18b.tgz
@agentuity/claude-code 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-claude-code-3.0.3-9dfd18b.tgz
@agentuity/migrate 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-migrate-3.0.3-9dfd18b.tgz
@agentuity/cli 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-cli-3.0.3-9dfd18b.tgz
@agentuity/coder 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-coder-3.0.3-9dfd18b.tgz
@agentuity/local 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-local-3.0.3-9dfd18b.tgz
@agentuity/schema 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-schema-3.0.3-9dfd18b.tgz
@agentuity/storage 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-storage-3.0.3-9dfd18b.tgz
@agentuity/telemetry 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-telemetry-3.0.3-9dfd18b.tgz
@agentuity/coder-tui 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-coder-tui-3.0.3-9dfd18b.tgz
@agentuity/opencode 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-opencode-3.0.3-9dfd18b.tgz
@agentuity/runtime 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-runtime-3.0.3-9dfd18b.tgz
@agentuity/webhook 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-webhook-3.0.3-9dfd18b.tgz
create-agentuity 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/create-agentuity-3.0.3-9dfd18b.tgz
@agentuity/aigateway 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-aigateway-3.0.3-9dfd18b.tgz
@agentuity/email 3.0.3-9dfd18b https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-email-3.0.3-9dfd18b.tgz
Install

Add to your package.json:

{
  "dependencies": {
    "@agentuity/pi": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-pi-3.0.3-9dfd18b.tgz",
    "@agentuity/task": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-task-3.0.3-9dfd18b.tgz",
    "@agentuity/queue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-queue-3.0.3-9dfd18b.tgz",
    "@agentuity/sandbox": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-sandbox-3.0.3-9dfd18b.tgz",
    "@agentuity/core": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-core-3.0.3-9dfd18b.tgz",
    "@agentuity/db": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-db-3.0.3-9dfd18b.tgz",
    "@agentuity/vite": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-vite-3.0.3-9dfd18b.tgz",
    "@agentuity/adapter": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-adapter-3.0.3-9dfd18b.tgz",
    "@agentuity/keyvalue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-keyvalue-3.0.3-9dfd18b.tgz",
    "@agentuity/analytics": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-analytics-3.0.3-9dfd18b.tgz",
    "@agentuity/drizzle": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-drizzle-3.0.3-9dfd18b.tgz",
    "@agentuity/stream": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-stream-3.0.3-9dfd18b.tgz",
    "@agentuity/vector": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-vector-3.0.3-9dfd18b.tgz",
    "@agentuity/server": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-server-3.0.3-9dfd18b.tgz",
    "@agentuity/postgres": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-postgres-3.0.3-9dfd18b.tgz",
    "@agentuity/hono": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-hono-3.0.3-9dfd18b.tgz",
    "@agentuity/schedule": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-schedule-3.0.3-9dfd18b.tgz",
    "@agentuity/claude-code": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-claude-code-3.0.3-9dfd18b.tgz",
    "@agentuity/migrate": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-migrate-3.0.3-9dfd18b.tgz",
    "@agentuity/cli": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-cli-3.0.3-9dfd18b.tgz",
    "@agentuity/coder": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-coder-3.0.3-9dfd18b.tgz",
    "@agentuity/local": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-local-3.0.3-9dfd18b.tgz",
    "@agentuity/schema": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-schema-3.0.3-9dfd18b.tgz",
    "@agentuity/storage": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-storage-3.0.3-9dfd18b.tgz",
    "@agentuity/telemetry": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-telemetry-3.0.3-9dfd18b.tgz",
    "@agentuity/coder-tui": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-coder-tui-3.0.3-9dfd18b.tgz",
    "@agentuity/opencode": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-opencode-3.0.3-9dfd18b.tgz",
    "@agentuity/runtime": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-runtime-3.0.3-9dfd18b.tgz",
    "@agentuity/webhook": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-webhook-3.0.3-9dfd18b.tgz",
    "create-agentuity": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/create-agentuity-3.0.3-9dfd18b.tgz",
    "@agentuity/aigateway": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-aigateway-3.0.3-9dfd18b.tgz",
    "@agentuity/email": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-email-3.0.3-9dfd18b.tgz"
  }
}

Or install directly:

bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-pi-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-task-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-queue-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-sandbox-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-core-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-db-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-vite-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-adapter-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-keyvalue-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-analytics-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-drizzle-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-stream-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-vector-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-server-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-postgres-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-hono-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-schedule-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-claude-code-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-migrate-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-cli-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-coder-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-local-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-schema-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-storage-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-telemetry-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-coder-tui-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-opencode-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-runtime-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-webhook-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/create-agentuity-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-aigateway-3.0.3-9dfd18b.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.3-9dfd18b/agentuity-email-3.0.3-9dfd18b.tgz

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/create-agentuity/README.md (1)

49-50: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update script examples to match the npm-first approach.

The Usage section now leads with npm (line 12), but the Available scripts section still shows bun run. For consistency and to avoid implying that Bun is required, these examples should match the package manager used in the primary Usage example.

📝 Proposed fix for consistency
-bun run dev          # Run the framework's dev server with AI Gateway env
-bun run build        # Framework build
+npm run dev          # Run the framework's dev server with AI Gateway env
+npm run build        # Framework build
 agentuity deploy     # Deploy to Agentuity Cloud
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/create-agentuity/README.md` around lines 49 - 50, Update the
"Available scripts" examples that currently show "bun run dev" and "bun run
build" to the npm-first equivalents "npm run dev" and "npm run build" so they
match the Usage section which leads with npm; locate the README's Available
scripts block (the lines containing "bun run dev" and "bun run build") and
replace those commands with the npm versions to avoid implying Bun is required.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/create-agentuity/src/index.ts`:
- Around line 72-73: The yarn branch currently returns { command: 'yarn', args:
['dlx', ...create] } which breaks on Yarn 1.x; change the case 'yarn' handling
to detect the installed Yarn major version and only use 'yarn dlx' for Yarn >= 2
(Berry). For Yarn 1.x fallback to invoking npx with --yes (e.g. { command:
'npx', args: ['--yes', ...create] }). Locate the switch/case handling the
package manager (the case 'yarn' that references the create array) and implement
version detection (parse output of `yarn --version` or existing helper if
present) and branch accordingly so Yarn 1.x uses npx --yes while Yarn >=2 uses
yarn dlx.

---

Outside diff comments:
In `@packages/create-agentuity/README.md`:
- Around line 49-50: Update the "Available scripts" examples that currently show
"bun run dev" and "bun run build" to the npm-first equivalents "npm run dev" and
"npm run build" so they match the Usage section which leads with npm; locate the
README's Available scripts block (the lines containing "bun run dev" and "bun
run build") and replace those commands with the npm versions to avoid implying
Bun is required.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a5871148-5d38-4162-8daf-52e399ebe0d8

📥 Commits

Reviewing files that changed from the base of the PR and between 9943d8c and 12dc0b0.

📒 Files selected for processing (4)
  • packages/create-agentuity/README.md
  • packages/create-agentuity/src/bin.ts
  • packages/create-agentuity/src/index.ts
  • packages/create-agentuity/test/index.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: Postgres SSL Integration Test
  • GitHub Check: Framework Demo Tests
  • GitHub Check: Queue CLI Tests (node)
  • GitHub Check: Package Installation & Usage Test (node)
  • GitHub Check: Package Installation & Usage Test (bun)
  • GitHub Check: Migrate Chain (v1 → v2 → v3)
  • GitHub Check: Pack & Upload
  • GitHub Check: Service Client Smoke Tests
  • GitHub Check: Build
  • GitHub Check: Queue CLI Tests (bun)
  • GitHub Check: Agentuity Deployment
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx}: Format code with Biome using tabs (width 3), single quotes, semicolons, lineWidth 100, and trailing commas es5
Use StructuredError from @agentuity/core for error handling

Files:

  • packages/create-agentuity/src/bin.ts
  • packages/create-agentuity/test/index.test.ts
  • packages/create-agentuity/src/index.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript in strict mode with ESNext and bundler moduleResolution

Files:

  • packages/create-agentuity/src/bin.ts
  • packages/create-agentuity/test/index.test.ts
  • packages/create-agentuity/src/index.ts
packages/*/test/**/*.test.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

packages/*/test/**/*.test.{ts,tsx,js,jsx}: Place tests in test/ folder parallel to src/ (never inside src/ or under __tests__/)
Import from ../src/ in test files
Use @agentuity/test-utils for shared mocks in tests

Files:

  • packages/create-agentuity/test/index.test.ts
packages/*/src/index.ts

📄 CodeRabbit inference engine (AGENTS.md)

Use named exports from package index.ts files

Files:

  • packages/create-agentuity/src/index.ts
🧠 Learnings (2)
📚 Learning: 2025-12-21T00:31:41.858Z
Learnt from: jhaynie
Repo: agentuity/sdk PR: 274
File: packages/cli/src/cmd/build/vite/server-bundler.ts:12-41
Timestamp: 2025-12-21T00:31:41.858Z
Learning: In Bun runtime, BuildMessage and ResolveMessage are global types and are not exported from the bun module. Do not import { BuildMessage } from 'bun' or similar; these types are available globally and should be used without import. This applies to all TypeScript files that target the Bun runtime within the repository.

Applied to files:

  • packages/create-agentuity/src/bin.ts
  • packages/create-agentuity/test/index.test.ts
  • packages/create-agentuity/src/index.ts
📚 Learning: 2026-02-21T02:05:57.982Z
Learnt from: jhaynie
Repo: agentuity/sdk PR: 1010
File: packages/drizzle/test/proxy.test.ts:594-603
Timestamp: 2026-02-21T02:05:57.982Z
Learning: Do not rely on StructuredError from agentuity/core in test files or simple error handling paths. In tests and straightforward error handling, use plain Error objects to represent failures, reserving StructuredError for more complex error scenarios in application logic.

Applied to files:

  • packages/create-agentuity/test/index.test.ts
🔇 Additional comments (4)
packages/create-agentuity/README.md (1)

8-20: LGTM!

packages/create-agentuity/src/index.ts (1)

39-46: LGTM!

packages/create-agentuity/src/bin.ts (1)

6-6: LGTM!

Also applies to: 34-48

packages/create-agentuity/test/index.test.ts (1)

54-115: LGTM!

Comment thread packages/create-agentuity/src/index.ts
…ME scripts

Yarn 1.x (Classic) has no `dlx` command, so `yarn dlx` fails there.
Detect the yarn major version from npm_config_user_agent and report 1.x
as 'yarn-classic', which getCreateCommand routes through `npx --yes`
(Node/npx is always available). Yarn Berry (2+) still uses `yarn dlx`.

Also align the README 'Available scripts' block with the npm-first Usage
section (npm run dev/build instead of bun run).

Addresses CodeRabbit review on #1525.
@Huijiro
Copy link
Copy Markdown
Member Author

Huijiro commented Jun 2, 2026

Addressed both CodeRabbit findings in 9dfd18b:

  1. Yarn 1.x dlx issue (valid). Yarn Classic has no yarn dlx. Rather than probe yarn --version in a subprocess, I parse the yarn major version straight from npm_config_user_agent (which already carries it): detectPackageManager now returns yarn-classic for yarn/1.x, and getCreateCommand routes that through npx --yes. Yarn Berry (2+) still uses yarn dlx. Keeps both functions pure. Added tests for both branches.

  2. README scripts (valid). Updated the "Available scripts" block to npm run dev / npm run build to match the npm-first Usage section.

Verified end-to-end against the compiled output:

  • yarn/1.22.22npx --yes ... create
  • yarn/4.1.0yarn dlx ... create
  • pnpm → pnpm dlx, npm/none → npx --yes, bun → bunx

28 tests pass; typecheck/build/biome clean.

@Huijiro Huijiro merged commit be22fa3 into main Jun 3, 2026
27 of 28 checks passed
@Huijiro Huijiro deleted the fix/create-agentuity-package-manager-dispatch branch June 3, 2026 17:07
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.

create-agentuity wrapper hardcodes bunx, making Bun a hard requirement despite README/docs claiming Node support

1 participant