-
Notifications
You must be signed in to change notification settings - Fork 1
Remove native executable build, use bun global install #692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Remove bun build --compile native executable building - Switch to bun add -g @agentuity/cli for installation - Rewrite install.sh to use bun global package install - Add installation type detection (global/local/source) - Simplify upgrade command to use bun add -g - Remove executable-related CI workflows and tests - Update canary command to use npm tarballs - Add --verbose flag and AGENTUITY_VERBOSE env var to install.sh - Keep legacy shim at ~/.agentuity/bin for backward compatibility Files deleted: - packages/cli/scripts/build-executables.ts - packages/cli/scripts/entitlements.plist - packages/cli/scripts/test-bundled-create.ts - packages/cli/ALPINE.md - scripts/test-upgrade.sh This eliminates Bun compilation issues while simplifying the installation and upgrade flow. Users need Bun installed anyway to run project commands. Amp-Thread-ID: https://ampcode.com/threads/T-019be5da-0ee0-73cb-bc43-9bb161c9571e Co-authored-by: Amp <amp@ampcode.com>
📝 WalkthroughWalkthroughThis PR removes compiled-executable build/signing/tests and related CI outputs, shifts installer/upgrade/canary flows to Bun (global Changes
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (2)packages/cli/src/**/*.ts📄 CodeRabbit inference engine (packages/cli/AGENTS.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (1)📚 Learning: 2025-12-21T00:31:41.858ZApplied to files:
🧬 Code graph analysis (1)packages/cli/src/banner.ts (1)
⏰ 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). (9)
🔇 Additional comments (1)
✏️ Tip: You can disable this entire section by setting Comment |
📦 Canary Packages Publishedversion: PackagesInstallAdd to your {
"dependencies": {
"@agentuity/opencode": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-opencode-0.1.24-063b972.tgz",
"@agentuity/runtime": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-runtime-0.1.24-063b972.tgz",
"@agentuity/evals": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-evals-0.1.24-063b972.tgz",
"@agentuity/frontend": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-frontend-0.1.24-063b972.tgz",
"@agentuity/cli": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-cli-0.1.24-063b972.tgz",
"@agentuity/core": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-core-0.1.24-063b972.tgz",
"@agentuity/react": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-react-0.1.24-063b972.tgz",
"@agentuity/auth": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-auth-0.1.24-063b972.tgz",
"@agentuity/schema": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-schema-0.1.24-063b972.tgz",
"@agentuity/server": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-server-0.1.24-063b972.tgz",
"@agentuity/workbench": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-workbench-0.1.24-063b972.tgz"
}
}Or install directly: bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-opencode-0.1.24-063b972.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-runtime-0.1.24-063b972.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-evals-0.1.24-063b972.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-frontend-0.1.24-063b972.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-cli-0.1.24-063b972.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-core-0.1.24-063b972.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-react-0.1.24-063b972.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-auth-0.1.24-063b972.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-schema-0.1.24-063b972.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-server-0.1.24-063b972.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.24-063b972/agentuity-workbench-0.1.24-063b972.tgz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🤖 Fix all issues with AI agents
In `@install.sh`:
- Around line 248-265: The create_legacy_shim function declares an unused
variable bun_bin which triggers Shellcheck SC2034; remove the line setting
bun_bin="$HOME/.bun/bin/agentuity" from the function (leave legacy_dir and
legacy_bin as-is) so the shim creation still writes exec
"$HOME/.bun/bin/agentuity" into the generated script but no unused shell
variable remains.
- Around line 205-243: The install_cli function's command substitutions
(install_output=$(bun ...)) can trigger set -e and cause the script to exit
before your custom error handling runs; surround the bun install invocations
with a temporary disable of errexit so failures are captured instead of
aborting: just disable set -e before running the bun add command, capture output
and exit code into install_output and install_result, then re-enable set -e (or
restore original errexit state) before evaluating install_result in both the
requested_version and latest branches. Ensure you apply this change for both the
"@agentuity/cli@$version" and "@agentuity/cli" install paths so the subsequent
error printing and exit logic executes as intended.
In `@packages/cli/src/cmd/canary/index.ts`:
- Around line 63-73: In the canary command block where you handle a URL target
(the isUrl branch that sets tarballUrl/version), validate that target uses
HTTPS: if the URL does not start with "https://" (or its URL.protocol !==
'https:' when using the URL API), reject it by logging an error and exiting (or
throwing) instead of accepting an http:// URL; update the code around
tarballUrl, version and CANARY_BASE_URL handling so only HTTPS URLs are allowed
and non-HTTPS targets are rejected early with a clear message.
In `@packages/cli/src/cmd/setup/index.ts`:
- Around line 40-41: The current map replaces every argv entry equal to 'setup',
potentially corrupting option values; instead locate the specific command
argument and replace only that one (e.g., find the index via const idx =
process.argv.findIndex(x => x === 'setup') and if idx !== -1 clone argv and set
cmd[idx] = 'login'), then use the new cmd array — update the code that sets cmd
(currently using process.argv.map) to perform a targeted replacement of the
single command token.
In `@packages/cli/src/utils/installation-type.ts`:
- Around line 14-28: The getInstallationType function uses Bun.main path checks
that assume POSIX separators; normalize Bun.main first (e.g., convert
backslashes to forward slashes or use path normalization and toPosix) into a
local variable like normalizedMain before running the includes checks so Windows
backslash paths match the '/.bun/install/global/' and
'/node_modules/@agentuity/cli/' tests; update references in the function to use
normalizedMain for the three checks.
🧹 Nitpick comments (1)
scripts/publish.ts (1)
536-542: Usepath.basenamefor cross-platform asset names.
split('/')won’t handle Windows path separators.♻️ Suggested refactor
-import { join } from 'node:path'; +import { join, basename } from 'node:path'; @@ - const assetName = vsixPath.split('/').pop(); + const assetName = basename(vsixPath);
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (21)
.github/workflows/build.yaml.github/workflows/canary.yaml.github/workflows/test-install.yamlinstall.shpackages/cli/ALPINE.mdpackages/cli/scripts/build-executables.tspackages/cli/scripts/entitlements.plistpackages/cli/scripts/test-bundled-create.tspackages/cli/src/cmd/canary/index.tspackages/cli/src/cmd/cloud/deploy.tspackages/cli/src/cmd/index.tspackages/cli/src/cmd/setup/index.tspackages/cli/src/cmd/upgrade/index.tspackages/cli/src/command-prefix.tspackages/cli/src/utils/installation-type.tspackages/cli/src/version-check.tspackages/cli/src/version.tspackages/cli/test/upgrade.test.tsscripts/canary.tsscripts/publish.tsscripts/test-upgrade.sh
💤 Files with no reviewable changes (8)
- .github/workflows/build.yaml
- packages/cli/ALPINE.md
- packages/cli/scripts/test-bundled-create.ts
- .github/workflows/canary.yaml
- scripts/test-upgrade.sh
- packages/cli/scripts/build-executables.ts
- packages/cli/src/cmd/index.ts
- packages/cli/scripts/entitlements.plist
🧰 Additional context used
📓 Path-based instructions (5)
packages/cli/src/cmd/*/index.ts
📄 CodeRabbit inference engine (packages/cli/AGENTS.md)
packages/cli/src/cmd/*/index.ts: Each command must be a directory insrc/cmd/with anindex.tsfile as the main entry point
Always define interfaces for command options instead of usinganytype
Files:
packages/cli/src/cmd/setup/index.tspackages/cli/src/cmd/upgrade/index.tspackages/cli/src/cmd/canary/index.ts
packages/cli/src/cmd/**/*.ts
📄 CodeRabbit inference engine (packages/cli/AGENTS.md)
packages/cli/src/cmd/**/*.ts: Usetui.*helpers for formatted output instead of raw console logs
Usectx.loggerfor logging; calllogger.fatal()to log and exit with code 1
Files:
packages/cli/src/cmd/setup/index.tspackages/cli/src/cmd/cloud/deploy.tspackages/cli/src/cmd/upgrade/index.tspackages/cli/src/cmd/canary/index.ts
packages/cli/src/**/*.ts
📄 CodeRabbit inference engine (packages/cli/AGENTS.md)
Use
Bun.file(f).exists()instead ofexistsSync(f)for file existence checks
Files:
packages/cli/src/cmd/setup/index.tspackages/cli/src/version.tspackages/cli/src/utils/installation-type.tspackages/cli/src/command-prefix.tspackages/cli/src/version-check.tspackages/cli/src/cmd/cloud/deploy.tspackages/cli/src/cmd/upgrade/index.tspackages/cli/src/cmd/canary/index.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Use Prettier formatter with tabs (width 3), single quotes, and semicolons for TypeScript files
Use TypeScript strict mode with ESNext target and bundler moduleResolution
UseStructuredErrorfrom@agentuity/corefor error handling
Files:
packages/cli/src/cmd/setup/index.tspackages/cli/src/version.tsscripts/canary.tspackages/cli/src/utils/installation-type.tspackages/cli/src/command-prefix.tspackages/cli/src/version-check.tspackages/cli/src/cmd/cloud/deploy.tspackages/cli/src/cmd/upgrade/index.tsscripts/publish.tspackages/cli/test/upgrade.test.tspackages/cli/src/cmd/canary/index.ts
packages/*/test/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
packages/*/test/**/*.{ts,tsx}: Place test files intest/folder (never insrc/or__tests__/)
Import from../src/in test files to reference source code
Use@agentuity/test-utilsfor mocks and test helpers
Files:
packages/cli/test/upgrade.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/cli/src/cmd/setup/index.tspackages/cli/src/version.tsscripts/canary.tspackages/cli/src/utils/installation-type.tspackages/cli/src/command-prefix.tspackages/cli/src/version-check.tspackages/cli/src/cmd/cloud/deploy.tspackages/cli/src/cmd/upgrade/index.tsscripts/publish.tspackages/cli/test/upgrade.test.tspackages/cli/src/cmd/canary/index.ts
📚 Learning: 2026-01-13T04:32:02.691Z
Learnt from: jhaynie
Repo: agentuity/sdk PR: 565
File: packages/cli/src/cmd/cloud/region-lookup.ts:14-26
Timestamp: 2026-01-13T04:32:02.691Z
Learning: Enforce sandbox identifier prefixes in new code within the CLI cloud region lookup: new sandboxes must use the sbx_ prefix. The snbx_ prefix may appear in legacy code or examples, but do not use snbx_ for new sandboxes. When reviewing changes in packages/cli/src/cmd/cloud/, ensure any created sandbox identifiers use sbx_ and remove or migrate any snbx_ usages in newly added code.
Applied to files:
packages/cli/src/cmd/cloud/deploy.ts
🧬 Code graph analysis (5)
packages/cli/src/utils/installation-type.ts (1)
packages/cli/src/cmd/upgrade/index.ts (3)
InstallationType(25-25)getInstallationType(25-25)isGlobalInstall(31-33)
packages/cli/src/command-prefix.ts (1)
packages/cli/src/utils/installation-type.ts (1)
getInstallationType(14-29)
packages/cli/src/version-check.ts (2)
packages/cli/src/cmd/upgrade/index.ts (1)
getInstallationType(25-25)packages/cli/src/utils/installation-type.ts (1)
getInstallationType(14-29)
packages/cli/src/cmd/upgrade/index.ts (2)
packages/cli/src/utils/installation-type.ts (2)
isGlobalInstall(34-36)getInstallationType(14-29)packages/cli/src/version.ts (1)
getVersion(18-20)
packages/cli/test/upgrade.test.ts (1)
packages/cli/src/utils/installation-type.ts (2)
getInstallationType(14-29)isGlobalInstall(34-36)
🪛 Shellcheck (0.11.0)
install.sh
[warning] 252-252: bun_bin appears unused. Verify use (or export if used externally).
(SC2034)
⏰ 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). (6)
- GitHub Check: Framework Integration Tests (TanStack & Next.js)
- GitHub Check: Queue CLI Tests
- GitHub Check: Sandbox CLI Tests
- GitHub Check: Playwright E2E Smoke Test
- GitHub Check: Template Integration Tests
- GitHub Check: Build
🔇 Additional comments (35)
packages/cli/src/cmd/canary/index.ts (3)
6-12: LGTM: clear base URL and usage description.Looks good and keeps the canary guidance straightforward.
42-52: LGTM: usage prompt and examples are clear.No concerns with the early-return help flow.
104-113: No action needed—Bun's$template correctly expands arrays into separate arguments.Bun's
$tagged template treats array interpolations asShellExpressionvalues and expands each array element into a separate command argument. The current codeawait $\agentuity ${forwardArgs}`.nothrow()correctly passesforwardArgsas individual arguments, not a comma-joined string. No refactoring toBun.spawn` is required.packages/cli/src/version.ts (1)
18-19: LGTM: version now sourced from package.json.packages/cli/src/cmd/cloud/deploy.ts (1)
660-662: LGTM: bounded concurrency simplification is clear.packages/cli/src/command-prefix.ts (1)
15-23: LGTM: centralized install-type prefix is straightforward.packages/cli/src/version-check.ts (4)
2-3: LGTM: centralizing install-type and version lookup.
Keeps version-check aligned with the new upgrade path.
26-29: Good guard for non‑global installs.
Prevents update prompts where auto-upgrade isn’t supported.
139-171: Upgrade restart flow looks solid.
Global install + re-spawn keeps the experience consistent.
239-239: Passing the latest version through is clear.scripts/canary.ts (3)
167-176: Package-only summary table is clean.
222-223: Help text now matches the streamlined workflow.
281-281: Using the packed set for reporting makes sense.packages/cli/src/cmd/upgrade/index.ts (5)
8-33: Back-compat re-export + isGlobalInstall helper are clear.
65-99: Upgrade/verify helpers are straightforward and robust.
105-155: Installation-type gating gives users actionable guidance.
210-233: Install + verify flow with user feedback is well composed.
241-244: Including installationType in error details improves diagnostics.install.sh (12)
2-24: Verbose flag wiring is tidy and discoverable.Also applies to: 49-52
86-99: Debug gating keeps output noise under control.
102-160: Prereq checks and version gating are well structured.
163-188: Legacy Homebrew handling is clear and user-friendly.
193-203: Legacy binary detection helps with migration clarity.
268-357: PATH updates are idempotent and shell-aware.
359-365: CI PATH setup is a nice touch.
367-379: Path reminder UX is clear and prominent.
382-395: Post-install setup flow is sensible.
397-414: Progress indicator keeps long installs readable.
416-434: Beta banner messaging is consistent and helpful.
436-473: Main flow sequencing is clean and easy to follow..github/workflows/test-install.yaml (4)
45-75: Native install test flow updates look good.
133-163: Container flow now validates the new install path end-to-end.
203-241: Scenario coverage aligns well with the new installer behavior.Also applies to: 248-268, 276-299
317-317: Summary job dependencies updated appropriately.packages/cli/test/upgrade.test.ts (1)
2-15: Tests now align with installation-type behavior.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
- install.sh now auto-installs Bun in CI/non-interactive mode - install.sh prompts user to install/upgrade Bun in interactive mode - Fix 'Upgrade command available' test to check main help for upgrade command - Fix test-bun-check.sh to look for agentuity at ~/.bun/bin/ not ~/.agentuity/bin/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/cli/src/cmd/canary/index.ts (1)
46-56: Uselogger.fatal()andStructuredErrorfor all error paths instead of returning error objects.The canary command currently returns error response objects at lines 46, 65, 96, and 129, which doesn't guarantee a non-zero exit status. Replace these with
logger.fatal()calls usingStructuredError, following the pattern used throughout the codebase (e.g., in auth, project, and cloud commands). This ensures consistent error handling and proper exit codes per coding guidelines.
🧹 Nitpick comments (6)
packages/cli/src/cmd/setup/index.ts (1)
40-47:indexOfmay match the wrong element if the executable path contains 'setup'.The current implementation uses
argv.indexOf('setup')which searches from index 0. If the script path or executable name contains 'setup' (e.g.,/home/setup-user/.bun/bin/agentuity), it could incorrectly match that instead of the command argument.Consider starting the search from index 2 to skip the interpreter and script path:
🔧 Suggested fix
// Re-run the CLI with 'login' instead of 'setup' // Only replace the first occurrence of 'setup' to avoid replacing user data const argv = process.argv; - const setupIndex = argv.indexOf('setup'); + const setupIndex = argv.findIndex((arg, idx) => idx >= 2 && arg === 'setup'); const cmd = setupIndex >= 0 ? [...argv.slice(0, setupIndex), 'login', ...argv.slice(setupIndex + 1)] : argv;install.sh (5)
76-77: Use%sformat specifier to prevent format string injection.Directly interpolating variables into
printfformat strings can cause issues if the variable contains format specifiers like%sor%d.🔧 Suggested fix
- printf "${RED}Windows is not directly supported. Please use WSL (Windows Subsystem for Linux)${NC}\n" + printf "%s\n" "${RED}Windows is not directly supported. Please use WSL (Windows Subsystem for Linux)${NC}"
99-99: Format string vulnerability in print_message.If
$_pm_messagecontains%characters (e.g.,"50% complete"), printf will interpret them as format specifiers, potentially causing unexpected output or errors.🔧 Suggested fix
- printf "${_pm_color}${_pm_message}${NC}\n" + printf "%s%s%s\n" "$_pm_color" "$_pm_message" "$NC"
116-131: Arithmetic comparison may fail on malformed version strings.If a version string is malformed (e.g.,
"1.0"missing patch, or empty),cutreturns an empty string, causing-gt/-ltcomparisons to fail with "integer expression expected".🔧 Suggested fix — default empty components to 0
version_gte() { - v1_major=$(echo "$1" | cut -d. -f1) - v1_minor=$(echo "$1" | cut -d. -f2) - v1_patch=$(echo "$1" | cut -d. -f3 | cut -d- -f1) - v2_major=$(echo "$2" | cut -d. -f1) - v2_minor=$(echo "$2" | cut -d. -f2) - v2_patch=$(echo "$2" | cut -d. -f3 | cut -d- -f1) + v1_major=$(echo "$1" | cut -d. -f1 | grep -E '^[0-9]+$' || echo 0) + v1_minor=$(echo "$1" | cut -d. -f2 | grep -E '^[0-9]+$' || echo 0) + v1_patch=$(echo "$1" | cut -d. -f3 | cut -d- -f1 | grep -E '^[0-9]+$' || echo 0) + v2_major=$(echo "$2" | cut -d. -f1 | grep -E '^[0-9]+$' || echo 0) + v2_minor=$(echo "$2" | cut -d. -f2 | grep -E '^[0-9]+$' || echo 0) + v2_patch=$(echo "$2" | cut -d. -f3 | cut -d- -f1 | grep -E '^[0-9]+$' || echo 0) if [ "$v1_major" -gt "$v2_major" ]; then return 0; fi
366-372: Guard against unsetGITHUB_PATHvariable.If
GITHUB_ACTIONS=truebutGITHUB_PATHis unset or empty (edge case in some CI setups), the>>redirect will fail or create an unexpected file.🔧 Suggested fix
setup_github_actions() { - if [ -n "${GITHUB_ACTIONS-}" ] && [ "${GITHUB_ACTIONS}" = "true" ]; then + if [ -n "${GITHUB_ACTIONS-}" ] && [ "${GITHUB_ACTIONS}" = "true" ] && [ -n "${GITHUB_PATH-}" ]; then printf "%s\n" "$HOME/.bun/bin" >>"$GITHUB_PATH" print_message info "Added $HOME/.bun/bin to \$GITHUB_PATH" fi }
374-387: Path reminder shows hardcoded~/.bashrcregardless of actual shell.The reminder always suggests
source ~/.bashrc, but if the user's shell is zsh or fish, this is incorrect. Consider making the suggestion dynamic or more generic.🔧 Suggested fix — use generic guidance
show_path_reminder() { if [ "$path_modified" = true ]; then printf "\n" printf "${RED}╭────────────────────────────────────────────────────╮${NC}\n" printf "${RED}│${NC} ${RED}⚠ ACTION REQUIRED${NC} ${RED}│${NC}\n" printf "${RED}│${NC} ${RED}│${NC}\n" printf "${RED}│${NC}${MUTED} Your shell configuration has been updated. ${RED}│${NC}\n" printf "${RED}│${NC} ${RED}│${NC}\n" - printf "${RED}│ Please restart your terminal or run: │${NC}\n" - printf "${RED}│${NC} ${RED}│${NC}\n" - printf "${RED}│${NC} ${CYAN}source ~/.bashrc${NC} ${RED}│${NC}\n" + printf "${RED}│ Please restart your terminal to apply changes. │${NC}\n" printf "${RED}╰────────────────────────────────────────────────────╯${NC}\n" fi }
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
install.shpackages/cli/src/cmd/canary/index.tspackages/cli/src/cmd/setup/index.tspackages/cli/src/utils/installation-type.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/cli/src/utils/installation-type.ts
🧰 Additional context used
📓 Path-based instructions (4)
packages/cli/src/cmd/*/index.ts
📄 CodeRabbit inference engine (packages/cli/AGENTS.md)
packages/cli/src/cmd/*/index.ts: Each command must be a directory insrc/cmd/with anindex.tsfile as the main entry point
Always define interfaces for command options instead of usinganytype
Files:
packages/cli/src/cmd/canary/index.tspackages/cli/src/cmd/setup/index.ts
packages/cli/src/cmd/**/*.ts
📄 CodeRabbit inference engine (packages/cli/AGENTS.md)
packages/cli/src/cmd/**/*.ts: Usetui.*helpers for formatted output instead of raw console logs
Usectx.loggerfor logging; calllogger.fatal()to log and exit with code 1
Files:
packages/cli/src/cmd/canary/index.tspackages/cli/src/cmd/setup/index.ts
packages/cli/src/**/*.ts
📄 CodeRabbit inference engine (packages/cli/AGENTS.md)
Use
Bun.file(f).exists()instead ofexistsSync(f)for file existence checks
Files:
packages/cli/src/cmd/canary/index.tspackages/cli/src/cmd/setup/index.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Use Prettier formatter with tabs (width 3), single quotes, and semicolons for TypeScript files
Use TypeScript strict mode with ESNext target and bundler moduleResolution
UseStructuredErrorfrom@agentuity/corefor error handling
Files:
packages/cli/src/cmd/canary/index.tspackages/cli/src/cmd/setup/index.ts
🧠 Learnings (1)
📚 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/cli/src/cmd/canary/index.tspackages/cli/src/cmd/setup/index.ts
⏰ 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). (8)
- GitHub Check: Playwright E2E Smoke Test
- GitHub Check: Framework Integration Tests (TanStack & Next.js)
- GitHub Check: Queue CLI Tests
- GitHub Check: SDK Integration Test Suite
- GitHub Check: Template Integration Tests
- GitHub Check: Sandbox CLI Tests
- GitHub Check: Cloud Deployment Tests
- GitHub Check: Build
🔇 Additional comments (6)
install.sh (4)
205-254: LGTM!The
set +e/set -epattern correctly handles the error capture issue flagged in previous reviews. The error handling now properly captures and displays installation failures.
256-273: LGTM!The legacy shim creation is well-implemented. Using
'EOF'(quoted) correctly prevents premature variable expansion in the heredoc, and the shim properly forwards all arguments.
389-402: LGTM!The
|| truepattern appropriately prevents setup failures from failing the entire installation, and the fallback guidance is helpful.
443-480: LGTM!The main function provides a clear, well-structured orchestration of the installation flow with appropriate prerequisite checks before installation.
packages/cli/src/cmd/canary/index.ts (2)
6-12: Base URL constant and args description update look good.
No concerns with these updates.
20-87: HTTPS-only gate and tarball derivation look solid.
The URL handling and version fallback behavior are clear and aligned with the new install flow.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
The ensure_bun_on_path function returns 1 when bun is not found, which with set -e causes immediate script exit. Use || true to prevent early termination and let check_bun handle the case properly.
There was a problem hiding this 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
🤖 Fix all issues with AI agents
In `@install.sh`:
- Around line 102-114: The script hardcodes $HOME/.bun/bin which breaks setups
using BUN_INSTALL; define a single BUN_BIN_DIR variable like
BUN_BIN_DIR="${BUN_INSTALL:-$HOME/.bun}/bin" near the top and use it everywhere
instead of $HOME/.bun/bin: update ensure_bun_on_path() to check command -v bun
and then test "$BUN_BIN_DIR/bun" and export PATH="$BUN_BIN_DIR:$PATH"; update
configure_path() to set and export bun_bin_dir from BUN_BIN_DIR, update
create_legacy_shim() to forward to "$BUN_BIN_DIR/agentuity" (or the correct
binary name), update setup_github_actions() to write BUN_BIN_DIR to GITHUB_PATH,
and update run_setup() to locate the agentuity binary via BUN_BIN_DIR; ensure
all PATH exports and checks reuse the single BUN_BIN_DIR variable.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
install.sh
🧰 Additional context used
🧬 Code graph analysis (1)
install.sh (1)
apps/testing/nextjs-app/agentuity/.agentuity/app.js (2)
bun(168280-168280)file(11614-11618)
⏰ 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). (8)
- GitHub Check: Queue CLI Tests
- GitHub Check: Framework Integration Tests (TanStack & Next.js)
- GitHub Check: Template Integration Tests
- GitHub Check: Playwright E2E Smoke Test
- GitHub Check: Sandbox CLI Tests
- GitHub Check: SDK Integration Test Suite
- GitHub Check: Cloud Deployment Tests
- GitHub Check: Build
🔇 Additional comments (7)
install.sh (7)
2-100: Verbose mode + debug gating look clean.
116-131: Version comparison helper is clear and readable.
133-152: Install/upgrade/check flow is well-structured.Also applies to: 156-252
254-295: Legacy install detection is sensible and user-friendly.
297-346: CLI install flow looks solid.
367-385: PATH write helper is clean and idempotent.
466-479: Progress/reminder UI and main flow look good.Also applies to: 496-574
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Define BUN_BIN_DIR=${BUN_INSTALL:-$HOME/.bun}/bin at the top and use it
everywhere instead of hardcoding $HOME/.bun/bin. This supports setups
using custom BUN_INSTALL locations.
There was a problem hiding this 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
🤖 Fix all issues with AI agents
In `@install.sh`:
- Around line 467-480: The reminder in show_path_reminder always prints "source
~/.bashrc" which is wrong for non-Bash shells; modify show_path_reminder to
accept the actual config file path (e.g., show_path_reminder config_file) and,
when path_modified is true, print the correct "source <config_file>" command
using that parameter; then update the callers (where configure_path is used) to
pass the config file returned/used by configure_path so the displayed command
matches the file that was modified.
🧹 Nitpick comments (1)
install.sh (1)
117-132: Consider adding default values for robustness.If a malformed version string is passed (e.g., missing minor/patch),
cutreturns empty strings causing arithmetic errors. Whilebun --versionshould always return valid output, adding defaults would make this more defensive.♻️ Suggested hardening
version_gte() { v1_major=$(echo "$1" | cut -d. -f1) v1_minor=$(echo "$1" | cut -d. -f2) v1_patch=$(echo "$1" | cut -d. -f3 | cut -d- -f1) v2_major=$(echo "$2" | cut -d. -f1) v2_minor=$(echo "$2" | cut -d. -f2) v2_patch=$(echo "$2" | cut -d. -f3 | cut -d- -f1) + + # Default empty values to 0 + v1_major=${v1_major:-0} + v1_minor=${v1_minor:-0} + v1_patch=${v1_patch:-0} + v2_major=${v2_major:-0} + v2_minor=${v2_minor:-0} + v2_patch=${v2_patch:-0} if [ "$v1_major" -gt "$v2_major" ]; then return 0; fi
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
install.sh
⏰ 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). (8)
- GitHub Check: Build
- GitHub Check: Framework Integration Tests (TanStack & Next.js)
- GitHub Check: Cloud Deployment Tests
- GitHub Check: Queue CLI Tests
- GitHub Check: Template Integration Tests
- GitHub Check: Playwright E2E Smoke Test
- GitHub Check: Sandbox CLI Tests
- GitHub Check: SDK Integration Test Suite
🔇 Additional comments (8)
install.sh (8)
12-14: LGTM on initialization and BUN_INSTALL support.The
BUN_BIN_DIRderivation correctly respects customBUN_INSTALLpaths, addressing prior feedback. The constants and verbose mode initialization are well-structured.
134-158: LGTM on Bun installation logic.The
set +e/set -epattern correctly handles errors without triggering early exit, addressing the prior review feedback. Output is captured and only shown on failure or verbose mode.
183-253: LGTM on Bun prerequisite checking.The function handles all scenarios well: missing Bun, outdated Bun, interactive vs CI modes, and verification after install/upgrade. The flow is clear and defensive.
298-347: LGTM on CLI installation.The error handling with
set +e/set -eaddresses prior feedback. Both versioned and latest installation paths are handled correctly with proper output suppression in non-verbose mode.
349-366: LGTM on legacy shim creation.The shim correctly forwards to the Bun-installed binary using the
BUN_BIN_DIRvariable, maintaining backward compatibility for users with~/.agentuity/binin their PATH.
459-465: LGTM on GitHub Actions integration.The function correctly checks
GITHUB_ACTIONSbefore appending toGITHUB_PATH. Both environment variables are guaranteed to be set in the GitHub Actions runner environment.
536-575: LGTM on main orchestration.The main function provides a clear, logical flow: prerequisites → legacy checks → installation → compatibility shim → PATH configuration → CI setup → user notification → post-install setup. Well-structured entry point.
286-296: LGTM on legacy binary detection.The function correctly identifies compiled binaries (vs shims) using the
filecommand and provides helpful debug output. The actual migration happens increate_legacy_shim.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
- show_path_reminder now accepts the config file path as parameter - configure_path sets modified_config_file for use by show_path_reminder - Displays the actual config file that was modified instead of hardcoded ~/.bashrc
There was a problem hiding this 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
🤖 Fix all issues with AI agents
In `@install.sh`:
- Around line 490-491: The printed box line for the command (the printf that
uses "${_source_cmd}") is missing the trailing column border and fixed-width
padding; update the printf format string used with "${_source_cmd}" (the printf
call that currently prints "${RED}│${NC} ${CYAN}%s${NC}\n") to match the other
box lines by allocating the same fixed width/padding for the command and
appending the closing "│" (and any required spaces) so the line aligns and the
right border prints consistently with the surrounding box borders.
🧹 Nitpick comments (1)
install.sh (1)
72-80: Unusedosvariable is dead code.The
osvariable is assigned based onunameoutput but is never referenced elsewhere in the script. This was likely leftover from the previous native executable download logic.🧹 Suggested cleanup
raw_os=$(uname -s) case "$raw_os" in -Darwin*) os="darwin" ;; -Linux*) os="linux" ;; +Darwin*) ;; +Linux*) ;; MINGW* | MSYS* | CYGWIN*) printf "${RED}Windows is not directly supported. Please use WSL (Windows Subsystem for Linux)${NC}\n" exit 1 ;; esac
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
install.sh
⏰ 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). (9)
- GitHub Check: Queue CLI Tests
- GitHub Check: Package Installation & Usage Test
- GitHub Check: Playwright E2E Smoke Test
- GitHub Check: Template Integration Tests
- GitHub Check: Sandbox CLI Tests
- GitHub Check: Framework Integration Tests (TanStack & Next.js)
- GitHub Check: Cloud Deployment Tests
- GitHub Check: SDK Integration Test Suite
- GitHub Check: Build
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Add fixed-width padding (%-50s) and closing border to the source command line so it matches the surrounding box formatting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@install.sh`:
- Around line 14-15: The script currently hardcodes BUN_BIN_DIR from BUN_INSTALL
only; change it to respect a separate global bin override by reading
BUN_INSTALL_BIN first, e.g. set BUN_BIN_DIR using the BUN_INSTALL_BIN
environment variable with a fallback to BUN_INSTALL (and then $HOME/.bun/bin),
and propagate that variable usage wherever the script references the bun CLI
path (legacy shim creation, PATH updates, GitHub Actions setup, and run_setup).
Ensure any places that previously derived the bin path from BUN_INSTALL are
updated to use BUN_BIN_DIR so the custom globalBinDir is honored consistently.
- Around line 471-490: The show_path_reminder function currently sets
_source_cmd to use "source $_config_file" which is non-POSIX; update the logic
that builds _source_cmd (using _config_file and the case block around the
extension) to emit ". $_config_file" for POSIX shell config files (e.g.,
filenames like .profile, .ashrc, or other sh-compatible configs) while keeping
"source $_config_file" for shells that require it (e.g., fish); ensure the
printed command later uses the updated _source_cmd variable so the reminder
shows the correct dot-notation for POSIX shells.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
install.sh
⏰ 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). (12)
- GitHub Check: Standalone Agent Test
- GitHub Check: Playwright E2E Smoke Test
- GitHub Check: Framework Integration Tests (TanStack & Next.js)
- GitHub Check: SDK Integration Test Suite
- GitHub Check: Storage CLI Tests
- GitHub Check: Cloud Deployment Tests
- GitHub Check: Package Installation & Usage Test
- GitHub Check: Queue SDK Tests
- GitHub Check: Queue CLI Tests
- GitHub Check: Sandbox CLI Tests
- GitHub Check: Template Integration Tests
- GitHub Check: Build
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
- BUN_BIN_DIR now checks BUN_INSTALL_BIN first, then BUN_INSTALL/bin, then ~/.bun/bin - show_path_reminder uses POSIX '. file' for sh-compatible shells - Keep 'source file' only for fish shell configs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@install.sh`:
- Around line 414-416: The case branch matching "ash | sh)" currently sets
config_files="$HOME/.ashrc $HOME/.profile /etc/profile" which allows the install
loop to pick the system file /etc/profile and fail to write; update the logic to
prefer user-level files first and avoid choosing /etc/profile as the auto-edit
target by reordering or filtering config_files so user config paths
($HOME/.ashrc, $HOME/.profile) come before /etc/profile and only select
/etc/profile as a last resort when writable; additionally, when no user file
exists create or select $HOME/.profile (or $HOME/.ashrc) and ensure the chosen
file is writable before attempting to write in the loop that iterates over
config_files.
- Around line 14-16: The script conflates the bun executable location and the
global package bin dir; introduce a separate variable (e.g., BUN_EXEC_DIR =
"${BUN_INSTALL:-$HOME/.bun}/bin") to point to the bun executable and keep
BUN_INSTALL_BIN for globally installed package binaries (defaulting to
BUN_EXEC_DIR if unset), then update all checks/usages (ensure_bun_on_path(),
install_bun(), and any other references) to use BUN_EXEC_DIR when
locating/running the bun binary and BUN_INSTALL_BIN when dealing with global
package installs or PATH manipulation; apply this change consistently to the
blocks identified in the comment so the bun executable is never looked for in a
custom BUN_INSTALL_BIN directory.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
install.sh
⏰ 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). (8)
- GitHub Check: Build
- GitHub Check: Template Integration Tests
- GitHub Check: Playwright E2E Smoke Test
- GitHub Check: Queue CLI Tests
- GitHub Check: Framework Integration Tests (TanStack & Next.js)
- GitHub Check: SDK Integration Test Suite
- GitHub Check: Cloud Deployment Tests
- GitHub Check: Sandbox CLI Tests
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
- BUN_EXEC_DIR: where bun executable lives (used by ensure_bun_on_path, install_bun) - BUN_INSTALL_BIN: where globally installed packages go (used for agentuity binary, PATH config, GitHub Actions, legacy shim) - ash/sh config_files: removed /etc/profile, prefer user-level files only - Loop now checks writability before selecting config file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
install.sh (1)
38-56: Guard--versionagainst missing values underset -u.
If--versionis passed without a value,$2is unbound and the script exits abruptly. Add a small check for a missing argument.🛠️ Proposed fix
--version) + if [ $# -lt 2 ]; then + printf "${RED}Error: --version requires a value${NC}\n" >&2 + exit 1 + fi requested_version="$2" shift 2 ;;
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
install.sh
⏰ 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). (9)
- GitHub Check: Template Integration Tests
- GitHub Check: Queue CLI Tests
- GitHub Check: Cloud Deployment Tests
- GitHub Check: Sandbox CLI Tests
- GitHub Check: SDK Integration Test Suite
- GitHub Check: Package Installation & Usage Test
- GitHub Check: Framework Integration Tests (TanStack & Next.js)
- GitHub Check: Playwright E2E Smoke Test
- GitHub Check: Build
🔇 Additional comments (16)
install.sh (16)
12-28: Clean separation of Bun exec vs global bin + verbose wiring.
Nice to seeBUN_EXEC_DIRandBUN_INSTALL_BINclearly separated and verbose mode supported via env and flag.
85-104: Logging gate for debug output is clear.
The debug-only path keeps normal output clean while still supporting verbose troubleshooting.
106-135: PATH detection and version comparison look solid.
Theensure_bun_on_pathfallback andversion_gtehelper are straightforward and readable.
137-184: Install/upgrade flows handle failures cleanly.
Capturing outputs with temporaryset +eand showing verbose output only when needed is a nice touch.
186-256: Bun prerequisite flow is robust.
Interactive vs CI behavior and the upgrade check are well structured.
258-287: Homebrew legacy handling is user-friendly.
Clear messaging and safe uninstall prompts.
289-299: Legacy binary detection is sensible.
Good to detect and warn before replacing with a shim.
301-350: CLI install paths are well handled.
Both pinned and latest installs capture output safely and respect verbose mode.
352-369: Backward-compat shim creation looks good.
Only creating the shim when legacy paths exist keeps behavior conservative.
371-466: Path configuration logic is thorough.
Shell-aware config targeting and safe fallback behavior look solid.
468-474: GitHub Actions PATH hookup is clear.
Straightforward and matches the new global bin location.
476-502: Path reminder UX is clean and portable.
Using.for POSIX shells andsourcefor fish is spot-on.
504-517: Post-install setup invocation is safe.
Gracefully handles missing binary and avoids hard failures.
519-536: Progress indicator behavior is appropriate.
TTY vs non-TTY output handling is sensible.
538-556: Beta banner formatting is consistent.
Nice, readable banner layout.
558-595: Main flow reads well and is orderly.
The step-wise orchestration is easy to follow and maintain.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@packages/cli/docs/api-errors.md`:
- Around line 64-67: The Markdown examples contain hard tab characters in the
JSON code blocks (e.g., the object with "code": "UPGRADE_REQUIRED" and the later
similar block) which triggers MD010; replace all hard tabs with spaces (use
consistent indentation, e.g., 2 or 4 spaces) in those code fences covering the
examples at the two occurrences so the JSON lines use spaces instead of tab
characters.
In `@packages/cli/src/api-errors.md`:
- Around line 64-67: Replace hard tab characters in the Markdown code examples
that contain the JSON snippet (the block with "success": false, "code":
"UPGRADE_REQUIRED", "message": "...") with spaces to satisfy MD010; locate the
fenced code blocks in api-errors.md that include those keys and the other
similar block at the later occurrence, convert each leading tab to two or four
spaces consistently, and ensure no tabs remain in those example blocks.
In `@packages/cli/src/banner.ts`:
- Around line 37-39: The displayed link text in docsLink is incorrect: when
LINKS is truthy the link() call shows "preview.agentuity.dev" while the URL is
"https://agentuity.dev"; update the docsLink construction so the link() visible
text matches the new domain (use "agentuity.dev" instead of
"preview.agentuity.dev") while preserving the existing fallback that
concatenates WHITE and RESET; locate docsLink and the use of link(...) and
adjust the visible text argument accordingly.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (20)
apps/docs/src/agent/chat/agent.tsapps/docs/src/agent/context/agent.tsapps/docs/src/agent/evals/agent.tsapps/docs/src/agent/hello/agent.tsapps/docs/src/agent/kv/agent.tsapps/docs/src/agent/model-arena/agent.tsapps/docs/src/agent/objectstore/agent.tsapps/docs/src/agent/sse-stream/agent.tsapps/docs/src/agent/vector/agent.tsapps/docs/src/agent/websocket/agent.tsapps/docs/src/web/App.tsxapps/testing/auth-package-app/README.mdpackages/cli/docs/api-errors.mdpackages/cli/src/api-errors.mdpackages/cli/src/banner.tspackages/cli/src/cmd/auth/signup.tspackages/cli/src/legacy-check.tspackages/server/src/api/api.tspackages/vscode/src/extension.tspackages/vscode/src/features/chat/agentuityParticipant.ts
✅ Files skipped from review due to trivial changes (6)
- apps/docs/src/agent/model-arena/agent.ts
- packages/server/src/api/api.ts
- apps/docs/src/agent/context/agent.ts
- apps/docs/src/agent/objectstore/agent.ts
- apps/testing/auth-package-app/README.md
- apps/docs/src/agent/kv/agent.ts
🧰 Additional context used
📓 Path-based instructions (10)
packages/cli/src/**/*.ts
📄 CodeRabbit inference engine (packages/cli/AGENTS.md)
Use
Bun.file(f).exists()instead ofexistsSync(f)for file existence checks
Files:
packages/cli/src/legacy-check.tspackages/cli/src/cmd/auth/signup.tspackages/cli/src/banner.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Use Prettier formatter with tabs (width 3), single quotes, and semicolons for TypeScript files
Use TypeScript strict mode with ESNext target and bundler moduleResolution
UseStructuredErrorfrom@agentuity/corefor error handling
Files:
packages/cli/src/legacy-check.tsapps/docs/src/agent/websocket/agent.tsapps/docs/src/agent/chat/agent.tspackages/vscode/src/features/chat/agentuityParticipant.tsapps/docs/src/agent/vector/agent.tsapps/docs/src/agent/sse-stream/agent.tsapps/docs/src/agent/hello/agent.tspackages/vscode/src/extension.tspackages/cli/src/cmd/auth/signup.tsapps/docs/src/web/App.tsxapps/docs/src/agent/evals/agent.tspackages/cli/src/banner.ts
apps/docs/src/agent/**
📄 CodeRabbit inference engine (apps/docs/AGENTS.md)
Agent implementations should be organized in separate subdirectories within src/agent/ (hello, chat, kv, vector, evals, model-arena, etc.)
Files:
apps/docs/src/agent/websocket/agent.tsapps/docs/src/agent/chat/agent.tsapps/docs/src/agent/vector/agent.tsapps/docs/src/agent/sse-stream/agent.tsapps/docs/src/agent/hello/agent.tsapps/docs/src/agent/evals/agent.ts
apps/docs/src/**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (apps/docs/AGENTS.md)
Support hot module reloading in dev mode using import.meta.hot
Files:
apps/docs/src/agent/websocket/agent.tsapps/docs/src/agent/chat/agent.tsapps/docs/src/agent/vector/agent.tsapps/docs/src/agent/sse-stream/agent.tsapps/docs/src/agent/hello/agent.tsapps/docs/src/web/App.tsxapps/docs/src/agent/evals/agent.ts
packages/cli/src/cmd/**/*.ts
📄 CodeRabbit inference engine (packages/cli/AGENTS.md)
packages/cli/src/cmd/**/*.ts: Usetui.*helpers for formatted output instead of raw console logs
Usectx.loggerfor logging; calllogger.fatal()to log and exit with code 1
Files:
packages/cli/src/cmd/auth/signup.ts
apps/docs/src/web/**/*.{tsx,jsx}
📄 CodeRabbit inference engine (apps/docs/AGENTS.md)
Use Tailwind CSS for styling in React components
Files:
apps/docs/src/web/App.tsx
apps/docs/src/web/App.tsx
📄 CodeRabbit inference engine (apps/docs/AGENTS.md)
The main React component should be implemented in App.tsx and configure demos according to the application structure
Files:
apps/docs/src/web/App.tsx
apps/docs/src/web/**/*.{tsx,ts}
📄 CodeRabbit inference engine (apps/docs/AGENTS.md)
Use TypeScript/TSX syntax in React components; the Agentuity build system handles compilation automatically
Files:
apps/docs/src/web/App.tsx
apps/docs/src/web/**/App.tsx
📄 CodeRabbit inference engine (apps/docs/src/web/AGENTS.md)
App.tsx must export a function named
App
Files:
apps/docs/src/web/App.tsx
apps/docs/src/web/**/*.{ts,tsx}
📄 CodeRabbit inference engine (apps/docs/src/web/AGENTS.md)
apps/docs/src/web/**/*.{ts,tsx}: Use TypeScript for type safety in React components
Wrap your app with AgentuityProvider for hooks to work
Place reusable components in separate files
Handle loading and error states in UI components
Use useAgent hook for one-off agent calls
Use useAgentWebsocket hook for bidirectional real-time communication
Use useAgentEventStream hook for server-to-client streaming
All agents are accessible via useAgent hook using agent name
Files:
apps/docs/src/web/App.tsx
🧠 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/cli/src/legacy-check.tsapps/docs/src/agent/websocket/agent.tsapps/docs/src/agent/chat/agent.tspackages/vscode/src/features/chat/agentuityParticipant.tsapps/docs/src/agent/vector/agent.tsapps/docs/src/agent/sse-stream/agent.tsapps/docs/src/agent/hello/agent.tspackages/vscode/src/extension.tspackages/cli/src/cmd/auth/signup.tsapps/docs/src/agent/evals/agent.tspackages/cli/src/banner.ts
📚 Learning: 2026-01-09T16:26:51.893Z
Learnt from: jhaynie
Repo: agentuity/sdk PR: 523
File: templates/_base/src/web/frontend.tsx:13-35
Timestamp: 2026-01-09T16:26:51.893Z
Learning: In web frontend code, prefer using the built-in Error class for runtime errors. Do not throw or re-export StructuredError from agentuity/core in web app code. Replace instances of StructuredError with new Error or custom error types that extend Error; ensure error handling logic remains intact and that error messages are descriptive. This guideline applies to all web UI TypeScript/TSX files that run in the browser and import StructuredError from agentuity/core.
Applied to files:
apps/docs/src/web/App.tsx
🧬 Code graph analysis (1)
packages/cli/src/banner.ts (1)
packages/cli/src/tui.ts (1)
link(337-346)
🪛 markdownlint-cli2 (0.18.1)
packages/cli/docs/api-errors.md
66-66: Hard tabs
Column: 1
(MD010, no-hard-tabs)
87-87: Hard tabs
Column: 1
(MD010, no-hard-tabs)
packages/cli/src/api-errors.md
66-66: Hard tabs
Column: 1
(MD010, no-hard-tabs)
87-87: Hard tabs
Column: 1
(MD010, no-hard-tabs)
⏰ 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). (10)
- GitHub Check: Storage CLI Tests
- GitHub Check: Framework Integration Tests (TanStack & Next.js)
- GitHub Check: Playwright E2E Smoke Test
- GitHub Check: Sandbox CLI Tests
- GitHub Check: Cloud Deployment Tests
- GitHub Check: Package Installation & Usage Test
- GitHub Check: Queue CLI Tests
- GitHub Check: Template Integration Tests
- GitHub Check: SDK Integration Test Suite
- GitHub Check: Build
🔇 Additional comments (12)
packages/vscode/src/features/chat/agentuityParticipant.ts (2)
75-75: Doc link update looks good.
Simple URL refresh; no behavior change.
391-391: Doc link update looks good.
Consistent with the new quickstart documentation.packages/cli/src/legacy-check.ts (1)
133-133: LGTM — URL updated to production domain.The migration guide link has been correctly updated from the preview domain to the production
agentuity.devdomain, consistent with the broader URL updates in this PR.apps/docs/src/agent/vector/agent.ts (1)
17-17: Docs link update looks good.Thanks for aligning this doc URL to the production domain.
apps/docs/src/agent/hello/agent.ts (1)
13-13: Docs link update looks good.Nice to see the production URL here.
apps/docs/src/agent/websocket/agent.ts (1)
17-17: Docs link update looks good.Production URL is correct here.
apps/docs/src/agent/chat/agent.ts (1)
16-16: Docs link update looks good.Thanks for pointing to the production doc path.
apps/docs/src/agent/evals/agent.ts (1)
19-19: Docs link update looks good.Aligned to the production docs.
apps/docs/src/agent/sse-stream/agent.ts (1)
16-16: Docs link update looks good.Production URL is correct.
apps/docs/src/web/App.tsx (1)
629-629: LGTM — Documentation URLs updated to production domain.All
docsUrlvalues consistently migrated frompreview.agentuity.devtoagentuity.dev. The paths remain unchanged and align with the broader PR objective of switching to production documentation URLs.Also applies to: 670-670, 700-700, 733-733, 762-762, 783-783, 813-813, 841-841, 870-870, 892-892, 922-922, 951-951, 979-979, 1002-1002
packages/vscode/src/extension.ts (1)
189-193: LGTM! URL update aligns with the new installation documentation.The URL change from
/Introduction/getting-startedto/Get-Started/quickstartis consistent with the broader documentation restructuring in this PR. The new URL is accessible and the legacy path is no longer available.packages/cli/src/cmd/auth/signup.ts (1)
54-55: LGTM — production docs URL update looks correct.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| "success": false, | ||
| "code": "UPGRADE_REQUIRED", | ||
| "message": "Please upgrade to the latest version of the CLI. Instructions at https://agentuity.dev/CLI/installation" | ||
| "message": "Please upgrade to the latest version of the CLI. Instructions at https://agentuity.dev/Get-Started/installation" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace hard tabs in Markdown examples (MD010).
markdownlint flags tabs in the updated lines; replace with spaces for consistent formatting.
🔧 Suggested fix
- "message": "Please upgrade to the latest version of the CLI. Instructions at https://agentuity.dev/Get-Started/installation"
+ "message": "Please upgrade to the latest version of the CLI. Instructions at https://agentuity.dev/Get-Started/installation"- logger.error('Visit: https://agentuity.dev/Get-Started/installation');
+ logger.error('Visit: https://agentuity.dev/Get-Started/installation');Also applies to: 85-88
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
64-64: Hard tabs
Column: 1
(MD010, no-hard-tabs)
65-65: Hard tabs
Column: 1
(MD010, no-hard-tabs)
66-66: Hard tabs
Column: 1
(MD010, no-hard-tabs)
🤖 Prompt for AI Agents
In `@packages/cli/docs/api-errors.md` around lines 64 - 67, The Markdown examples
contain hard tab characters in the JSON code blocks (e.g., the object with
"code": "UPGRADE_REQUIRED" and the later similar block) which triggers MD010;
replace all hard tabs with spaces (use consistent indentation, e.g., 2 or 4
spaces) in those code fences covering the examples at the two occurrences so the
JSON lines use spaces instead of tab characters.
| "success": false, | ||
| "code": "UPGRADE_REQUIRED", | ||
| "message": "Please upgrade to the latest version of the CLI. Instructions at https://agentuity.dev/CLI/installation" | ||
| "message": "Please upgrade to the latest version of the CLI. Instructions at https://agentuity.dev/Get-Started/installation" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace hard tabs in Markdown examples (MD010).
markdownlint flags tabs in the updated lines; replace with spaces for consistent formatting.
🔧 Suggested fix
- "message": "Please upgrade to the latest version of the CLI. Instructions at https://agentuity.dev/Get-Started/installation"
+ "message": "Please upgrade to the latest version of the CLI. Instructions at https://agentuity.dev/Get-Started/installation"- logger.error('Visit: https://agentuity.dev/Get-Started/installation');
+ logger.error('Visit: https://agentuity.dev/Get-Started/installation');Also applies to: 85-88
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
64-64: Hard tabs
Column: 1
(MD010, no-hard-tabs)
65-65: Hard tabs
Column: 1
(MD010, no-hard-tabs)
66-66: Hard tabs
Column: 1
(MD010, no-hard-tabs)
🤖 Prompt for AI Agents
In `@packages/cli/src/api-errors.md` around lines 64 - 67, Replace hard tab
characters in the Markdown code examples that contain the JSON snippet (the
block with "success": false, "code": "UPGRADE_REQUIRED", "message": "...") with
spaces to satisfy MD010; locate the fenced code blocks in api-errors.md that
include those keys and the other similar block at the later occurrence, convert
each leading tab to two or four spaces consistently, and ensure no tabs remain
in those example blocks.
Summary
This PR removes the
bun build --compilenative executable building and switches to using Bun's global package installation (bun add -g @agentuity/cli).Motivation
bun installand other project commandsChanges
Installation Flow
~/.agentuity/bin/bun add -g @agentuity/cli→~/.bun/bin/agentuityUpgrade Flow
bun add -g @agentuity/cli@<version>Files Deleted
packages/cli/scripts/build-executables.ts- Native executable build scriptpackages/cli/scripts/entitlements.plist- macOS code signing entitlementspackages/cli/scripts/test-bundled-create.ts- Bundled template testspackages/cli/ALPINE.md- Documentation about musl/Alpine issuesscripts/test-upgrade.sh- Executable-based upgrade testsNew Features
packages/cli/src/utils/installation-type.ts- Detects global/local/source installationinstall.shnow supports--verboseflag andAGENTUITY_VERBOSEenv var~/.agentuity/bin/agentuityfor backward compatibilityUpdated Files
install.sh- Complete rewrite to use bun global installsrc/cmd/upgrade/index.ts- Usesbun add -ginstead of binary downloadsrc/version-check.ts- Uses new installation type detectionsrc/command-prefix.ts- Simplified detection logicsrc/cmd/cloud/deploy.ts- Removed parallel fetch workaroundscripts/publish.ts- Removed executable build/uploadscripts/canary.ts- Removed executable build/uploadTesting
bun run typecheck✅bun run build✅bun run lint✅bun run format✅Migration Notes
Existing users with the compiled binary at
~/.agentuity/bin/agentuity:install.shwill migrate them to the new bun-based installation~/.bun/binSummary by CodeRabbit
New Features
Improvements
Removed
Tests / CI
✏️ Tip: You can customize this high-level summary in your review settings.