CLI onboarding UX, colored output, build + docs cleanup#984
Conversation
- Clearer, actionable first-run guidance with an honest recovery path when startup can't proceed automatically. - Quieter boot: collapse the no-provider-key notice to a single dim line. - Colored CLI output across boot, status, demo, connect, and errors (adds picocolors to deps; panels stay aligned; color auto-disables on non-TTY). - Build warnings: migrate tsdown deps config, silence per-entry plugin-timings, make dynamic imports consistent. Only the node20 deprecation remains. - Docs: correct install instructions and pin install paths to the supported version across README and 11 translations; bump deploy Dockerfile version to 0.9.27.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a startup version check for attached iii engines, applies picocolors-based CLI formatting, refactors image helper imports, updates tsdown and deploy version pins, and rewrites README guidance for the pinned v0.11.2 engine. ChangesPinned engine gate and release docs
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Align the README recovery note with the CLI: stop the other engine, then run agentmemory (installs the pinned engine). --instance does not relocate the engine's config-bound port, so it was misleading.
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/functions/observe.ts (1)
154-158: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winMake image save/ref updates rollback-safe.
incrementImageRef()runs beforekv.set(), but the catch path callsdeleteImage(raw.imageData)directly. SincedeleteImage()does not check refcounts, a failed observation write can delete an existing deduped image, or leave stale refs after deleting a newly written image. Roll back the image ref first, then unlink only when no refs remain.Also applies to: 182-183
🤖 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 `@src/functions/observe.ts` around lines 154 - 158, The image persistence flow in observe() is not rollback-safe because incrementImageRef() happens before kv.set() and the catch path later calls deleteImage(raw.imageData) directly. Update the observe() write/rollback logic so that on failure it first undoes the ref change for the saved image, then only removes the file when the refcount drops to zero; use the existing observe(), incrementImageRef(), and deleteImage() flow to ensure failed writes do not delete shared deduped images or leave stale refs.
🤖 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 `@deploy/coolify/Dockerfile`:
- Line 7: The Coolify deployment still pins an older AGENTMEMORY_VERSION in the
compose override, so update the Coolify override to match the new Dockerfile
default. Adjust the value passed from the docker-compose setup used by Coolify
so builds pick up the same version as the ARG in Dockerfile, and verify the
version flow remains consistent through the compose override.
In `@deploy/render/Dockerfile`:
- Line 7: Update the version pin consistently across both deployment configs:
the change to the Dockerfile’s AGENTMEMORY_VERSION is not enough because the
Render blueprint still hardcodes the older value in render.yaml. Adjust the
AGENTMEMORY_VERSION setting in the Render blueprint to match the Dockerfile so
Render deployments use the same package version; use the AGENTMEMORY_VERSION
symbol in both files to locate the mismatch.
In `@src/cli.ts`:
- Around line 1241-1246: The compatibility check in the running-engine adoption
path relies on `whichBinary("iii")`/`fallbackIiiPaths()` and
`iiiBinVersion(...)`, which can misidentify the already-bound process and
incorrectly treat unknown versions as compatible. Update the gate around
`adoptRunningEngine()` in `src/cli.ts` to use the running engine’s own reported
version/state instead of inferring from a local binary, and make the default
behavior fail closed when version compatibility cannot be proven; also treat the
`detected === null` case as incompatible unless the running engine explicitly
confirms a supported version.
---
Outside diff comments:
In `@src/functions/observe.ts`:
- Around line 154-158: The image persistence flow in observe() is not
rollback-safe because incrementImageRef() happens before kv.set() and the catch
path later calls deleteImage(raw.imageData) directly. Update the observe()
write/rollback logic so that on failure it first undoes the ref change for the
saved image, then only removes the file when the refcount drops to zero; use the
existing observe(), incrementImageRef(), and deleteImage() flow to ensure failed
writes do not delete shared deduped images or leave stale refs.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 6677e752-e231-4e40-bac8-c21a4494bdfa
📒 Files selected for processing (23)
README.mdREADMEs/README.de-DE.mdREADMEs/README.es-ES.mdREADMEs/README.fr-FR.mdREADMEs/README.hi-IN.mdREADMEs/README.ja-JP.mdREADMEs/README.ko-KR.mdREADMEs/README.pt-BR.mdREADMEs/README.ru-RU.mdREADMEs/README.tr-TR.mdREADMEs/README.zh-CN.mdREADMEs/README.zh-TW.mddeploy/coolify/Dockerfiledeploy/fly/Dockerfiledeploy/railway/Dockerfiledeploy/render/Dockerfilepackage.jsonsrc/cli.tssrc/cli/connect/index.tssrc/config.tssrc/functions/image-quota-cleanup.tssrc/functions/observe.tstsdown.config.ts
Install runbook now uses npm install -g @agentmemory/agentmemory@latest (agent + future sessions get newest), removes the misleading --instance/--port port suggestions (neither relocates the config-bound engine), and adds an engine-conflict troubleshooting step (stop the other engine, re-run, pinned engine installs into ~/.agentmemory/bin).
- cli.ts: only adopt a running engine when its version positively matches the pin; treat unknown/unverifiable as incompatible (fail closed) instead of adopting and risking a reconnect loop. Message handles the unknown-version case. - observe.ts: on a failed observation write, roll back via decrementImageRef (deletes the file only when no other observation references it) instead of deleteImage, so a failed write can't orphan a deduped image or leave a stale ref. - deploy: bump AGENTMEMORY_VERSION to 0.9.27 in the Coolify compose override and the Render blueprint to match the Dockerfile default.
- observe.ts: wrap the image-ref rollback in try/catch and log on failure so the original observation-write error is still thrown (not masked by a rollback error). - INSTALL_FOR_AGENTS: port-conflict bullet now lists 3112/3113 too (matches prerequisites). - README: engine-conflict note uses npx -y ...@latest (matches the runbook). - Drop redundant @latest from npm install -g (global install already resolves latest); keep @latest only on npx, which caches per version.
What
picocolorsto dependencies; panels stay aligned (clack strips ANSI for width) and color auto-disables on non-TTY.Notes
npm run build,npm run skills:check, and the full test suite (7097) pass.Summary by CodeRabbit
Bug Fixes
Documentation
iiidev/iii:0.11.2install details.Chores
0.9.27.