Skip to content

feat(cli): add task comment management commands#1363

Open
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin/1775696373-task-comments-cli
Open

feat(cli): add task comment management commands#1363
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin/1775696373-task-comments-cli

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot commented Apr 9, 2026

Summary

Adds a new cloud task comment command group to the CLI with full CRUD support for task comments. The backend APIs and web app already support comments, but the CLI was missing this functionality.

New subcommands:

  • create — Add a comment to a task (supports optional --user-id, --user-name, --user-type for author override)
  • get — Retrieve a single comment by ID
  • update — Edit a comment's body text
  • delete — Remove a comment
  • list — List comments on a task with --limit/--offset pagination

All commands delegate to existing TaskStorageService methods from @agentuity/core. The implementation follows the same patterns as the existing attachment.ts subcommand group (parent command with subcommands, Zod schemas, TUI table output, --json support).

Review & Testing Checklist for Human

  • Verify author EntityRef compatibility in createComment: The create handler constructs an author object { id, name, type? } and passes it to storage.createComment(). Confirm this matches the EntityRef type the service expects — a mismatch would fail at runtime but not at compile time since the parameter is typed loosely.
  • Test create command author resolution path: The handler resolves the current user's name via cached info or whoami() fallback. If both fail, it passes undefined for author. Verify this produces correct results with the API.
  • End-to-end test all 5 subcommands against a live API: Build the CLI and run each command (create, get, update, list, delete) against real tasks to confirm the API calls work and output renders correctly.

Notes

  • bun all fails in CI due to a pre-existing integration-suite Bun version requirement (needs >=1.3.3, environment has 1.3.1). The CLI package itself builds and typechecks cleanly (bun run --filter='./packages/cli' build and bunx tsc --build both pass).
  • The get command uses createStorageAdapterOptionalOrg (matching the pattern in other read-only-by-ID commands), while mutating commands use createStorageAdapter.

Link to Devin session: https://app.devin.ai/sessions/049f4834582f4ee7a108385ef64fdd20

Summary by CodeRabbit

  • New Features
    • Added a cloud task comment CLI with subcommands to create, get, update, delete, and list task comments.
    • Allows specifying comment author via flags or automatic detection from the user profile.
    • Supports pagination for comment lists and optional JSON output for automated use.

Add create, get, update, delete, and list subcommands for task comments
under 'cloud task comment'. Uses existing TaskStorageService comment APIs.

Supports:
- create: Add a comment to a task (with optional author override)
- get: Get a comment by ID
- update: Update a comment body
- delete: Delete a comment
- list: List comments on a task (with pagination)

Co-Authored-By: Rick Blalock <rickblalock@mac.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 9, 2026

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: 612d1921-ada7-46f1-851f-b0b698e62916

📥 Commits

Reviewing files that changed from the base of the PR and between 9eddf0a and 7176fe9.

📒 Files selected for processing (1)
  • packages/cli/src/cmd/cloud/task/comment.ts
✅ Files skipped from review due to trivial changes (1)
  • packages/cli/src/cmd/cloud/task/comment.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). (15)
  • GitHub Check: Framework Integration Tests (TanStack & Next.js)
  • GitHub Check: Queue SDK Tests
  • GitHub Check: Queue CLI Tests
  • GitHub Check: Playwright E2E Smoke Test
  • GitHub Check: Cloud Deployment Tests
  • GitHub Check: Postgres SSL Integration Test
  • GitHub Check: Sandbox CLI Tests
  • GitHub Check: Standalone Agent Test
  • GitHub Check: Storage CLI Tests
  • GitHub Check: SDK Integration Test Suite
  • GitHub Check: Package Installation & Usage Test
  • GitHub Check: Template Integration Tests
  • GitHub Check: Windows WSL CLI Smoke Test
  • GitHub Check: Build
  • GitHub Check: Pack & Upload

📝 Walkthrough

Walkthrough

Adds a new cloud task comment CLI command with subcommands create, get, update, delete, and list; implements author resolution, storage interactions, execution timing, and TUI/JSON output modes; integrates the command into the parent cloud task command.

Changes

Cohort / File(s) Summary
Task Comment Command
packages/cli/src/cmd/cloud/task/comment.ts
New CLI module adding comment parent command with subcommands create, get, update, delete, list. Each handler records durationMs, returns { success, ... }, supports --json output, uses createStorageAdapter/createStorageAdapterOptionalOrg for storage, and implements author resolution and caching logic for create. list supports --limit/--offset pagination and tabular TUI output.
Task Command Integration
packages/cli/src/cmd/cloud/task/index.ts
Imports and registers commentSubcommand under cloud task; updates examples and subcommand listings to include cloud task comment create and cloud task comment list.
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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 Apr 9, 2026

📦 Canary Packages Published

version: 2.0.9-7176fe9

Packages
Package Version URL
@agentuity/schema 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-schema-2.0.9-7176fe9.tgz
@agentuity/db 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-db-2.0.9-7176fe9.tgz
@agentuity/auth 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-auth-2.0.9-7176fe9.tgz
@agentuity/react 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-react-2.0.9-7176fe9.tgz
@agentuity/email 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-email-2.0.9-7176fe9.tgz
@agentuity/vector 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-vector-2.0.9-7176fe9.tgz
@agentuity/schedule 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-schedule-2.0.9-7176fe9.tgz
@agentuity/keyvalue 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-keyvalue-2.0.9-7176fe9.tgz
@agentuity/runtime 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-runtime-2.0.9-7176fe9.tgz
@agentuity/migrate 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-migrate-2.0.9-7176fe9.tgz
@agentuity/workbench 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-workbench-2.0.9-7176fe9.tgz
@agentuity/claude-code 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-claude-code-2.0.9-7176fe9.tgz
@agentuity/drizzle 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-drizzle-2.0.9-7176fe9.tgz
@agentuity/evals 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-evals-2.0.9-7176fe9.tgz
@agentuity/queue 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-queue-2.0.9-7176fe9.tgz
@agentuity/coder-tui 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-coder-tui-2.0.9-7176fe9.tgz
@agentuity/frontend 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-frontend-2.0.9-7176fe9.tgz
@agentuity/core 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-core-2.0.9-7176fe9.tgz
@agentuity/coder 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-coder-2.0.9-7176fe9.tgz
@agentuity/opencode 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-opencode-2.0.9-7176fe9.tgz
@agentuity/sandbox 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-sandbox-2.0.9-7176fe9.tgz
@agentuity/postgres 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-postgres-2.0.9-7176fe9.tgz
@agentuity/server 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-server-2.0.9-7176fe9.tgz
@agentuity/cli 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-cli-2.0.9-7176fe9.tgz
@agentuity/webhook 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-webhook-2.0.9-7176fe9.tgz
@agentuity/task 2.0.9-7176fe9 https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-task-2.0.9-7176fe9.tgz
Install

Add to your package.json:

{
  "dependencies": {
    "@agentuity/schema": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-schema-2.0.9-7176fe9.tgz",
    "@agentuity/db": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-db-2.0.9-7176fe9.tgz",
    "@agentuity/auth": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-auth-2.0.9-7176fe9.tgz",
    "@agentuity/react": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-react-2.0.9-7176fe9.tgz",
    "@agentuity/email": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-email-2.0.9-7176fe9.tgz",
    "@agentuity/vector": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-vector-2.0.9-7176fe9.tgz",
    "@agentuity/schedule": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-schedule-2.0.9-7176fe9.tgz",
    "@agentuity/keyvalue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-keyvalue-2.0.9-7176fe9.tgz",
    "@agentuity/runtime": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-runtime-2.0.9-7176fe9.tgz",
    "@agentuity/migrate": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-migrate-2.0.9-7176fe9.tgz",
    "@agentuity/workbench": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-workbench-2.0.9-7176fe9.tgz",
    "@agentuity/claude-code": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-claude-code-2.0.9-7176fe9.tgz",
    "@agentuity/drizzle": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-drizzle-2.0.9-7176fe9.tgz",
    "@agentuity/evals": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-evals-2.0.9-7176fe9.tgz",
    "@agentuity/queue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-queue-2.0.9-7176fe9.tgz",
    "@agentuity/coder-tui": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-coder-tui-2.0.9-7176fe9.tgz",
    "@agentuity/frontend": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-frontend-2.0.9-7176fe9.tgz",
    "@agentuity/core": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-core-2.0.9-7176fe9.tgz",
    "@agentuity/coder": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-coder-2.0.9-7176fe9.tgz",
    "@agentuity/opencode": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-opencode-2.0.9-7176fe9.tgz",
    "@agentuity/sandbox": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-sandbox-2.0.9-7176fe9.tgz",
    "@agentuity/postgres": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-postgres-2.0.9-7176fe9.tgz",
    "@agentuity/server": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-server-2.0.9-7176fe9.tgz",
    "@agentuity/cli": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-cli-2.0.9-7176fe9.tgz",
    "@agentuity/webhook": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-webhook-2.0.9-7176fe9.tgz",
    "@agentuity/task": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-task-2.0.9-7176fe9.tgz"
  }
}

Or install directly:

bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-schema-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-db-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-auth-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-react-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-email-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-vector-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-schedule-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-keyvalue-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-runtime-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-migrate-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-workbench-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-claude-code-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-drizzle-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-evals-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-queue-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-coder-tui-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-frontend-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-core-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-coder-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-opencode-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-sandbox-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-postgres-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-server-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-cli-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-webhook-2.0.9-7176fe9.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-7176fe9/agentuity-task-2.0.9-7176fe9.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: 2

🧹 Nitpick comments (1)
packages/cli/src/cmd/cloud/task/comment.ts (1)

98-110: Use isJSONMode(options) instead of !options.json for consistency with the framework's output gating pattern.

The codebase defines a standard isJSONMode() helper in packages/cli/src/output.ts that checks options.json === true, and other CLI commands consistently use it (e.g., upgrade/index.ts, project/hostname/get.ts, ai/opencode/dashboard.ts). This file should use the same helper for consistency across the codebase.

Applies to lines 98, 175, 245, 305, and 379.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/src/cmd/cloud/task/comment.ts` around lines 98 - 110, Replace
direct checks of options.json with the shared helper: change occurrences like if
(!options.json) to if (!isJSONMode(options)) so the command uses the standard
output gating; update each block that currently guards interactive output (the
ones calling tui.success, tui.table, etc. around comment.id, comment.task_id,
comment.body, comment.author, comment.created_at) to use !isJSONMode(options)
instead of !options.json to match the framework pattern.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/cli/src/cmd/cloud/task/comment.ts`:
- Around line 421-456: Move the exported commentSubcommand (and its associated
subcommand symbols createCommentSubcommand, getCommentSubcommand,
updateCommentSubcommand, deleteCommentSubcommand, listCommentsSubcommand) out of
the flat comment.ts file and make that file the directory entrypoint by placing
the same export in a new index.ts inside a comment directory; ensure index.ts
re-exports or imports the existing subcommand implementations and preserves the
createCommand call, name, aliases, description, tags, requires, examples and
subcommands array so the CLI layout follows the established command-as-directory
structure.
- Around line 367-375: The handler currently calls createStorageAdapter(ctx)
which hard-fails when no org is configured; swap it to use
createStorageAdapterOptionalOrg(ctx) in the same handler so the read-only
listComments call doesn't exit early. Update the storage acquisition in the
handler that calls storage.listComments(args.taskId, { limit: opts.limit,
offset: opts.offset }) to use createStorageAdapterOptionalOrg instead of
createStorageAdapter, keeping the rest of the logic unchanged.

---

Nitpick comments:
In `@packages/cli/src/cmd/cloud/task/comment.ts`:
- Around line 98-110: Replace direct checks of options.json with the shared
helper: change occurrences like if (!options.json) to if (!isJSONMode(options))
so the command uses the standard output gating; update each block that currently
guards interactive output (the ones calling tui.success, tui.table, etc. around
comment.id, comment.task_id, comment.body, comment.author, comment.created_at)
to use !isJSONMode(options) instead of !options.json to match the framework
pattern.
🪄 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: f90930e4-aea1-46b8-bd8d-fd49451fd3bb

📥 Commits

Reviewing files that changed from the base of the PR and between a8a1c3d and 9eddf0a.

📒 Files selected for processing (2)
  • packages/cli/src/cmd/cloud/task/comment.ts
  • packages/cli/src/cmd/cloud/task/index.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). (15)
  • GitHub Check: Queue CLI Tests
  • GitHub Check: Playwright E2E Smoke Test
  • GitHub Check: Queue SDK Tests
  • GitHub Check: Sandbox CLI Tests
  • GitHub Check: Storage CLI Tests
  • GitHub Check: Framework Integration Tests (TanStack & Next.js)
  • GitHub Check: Cloud Deployment Tests
  • GitHub Check: Template Integration Tests
  • GitHub Check: Standalone Agent Test
  • GitHub Check: Package Installation & Usage Test
  • GitHub Check: SDK Integration Test Suite
  • GitHub Check: Postgres SSL Integration Test
  • GitHub Check: Windows WSL CLI Smoke Test
  • GitHub Check: Build
  • GitHub Check: Pack & Upload
🧰 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 structured as a directory in src/cmd/ with an index.ts file as the entry point
Always define interfaces or Zod schemas for command options; never use any type for type safety
Use tui.* helpers (header, info, success, warning, error, table, progress) for formatted TUI output instead of raw console methods
Use ctx.logger for logging instead of console methods; use logger.fatal() for fatal errors which logs and exits with code 1
Always check isJSONMode() before outputting data and provide machine-readable output when in JSON mode
Use requireAuth(ctx) for commands that require authentication or optionalAuth(ctx) for commands that support optional authentication

Files:

  • packages/cli/src/cmd/cloud/task/index.ts
packages/cli/**/*.ts

📄 CodeRabbit inference engine (packages/cli/AGENTS.md)

Use Bun.file(f).exists() instead of existsSync(f) for file existence checks

Files:

  • packages/cli/src/cmd/cloud/task/index.ts
  • packages/cli/src/cmd/cloud/task/comment.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use Biome as code formatter with tabs (width 3), single quotes, semicolons, lineWidth 100, and trailingCommas es5

Files:

  • packages/cli/src/cmd/cloud/task/index.ts
  • packages/cli/src/cmd/cloud/task/comment.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use TypeScript Strict mode with ESNext target and bundler moduleResolution
Use StructuredError from @agentuity/core for error handling

Files:

  • packages/cli/src/cmd/cloud/task/index.ts
  • packages/cli/src/cmd/cloud/task/comment.ts
**/index.ts

📄 CodeRabbit inference engine (AGENTS.md)

Use named exports from package index.ts files

Files:

  • packages/cli/src/cmd/cloud/task/index.ts
🧠 Learnings (3)
📚 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/cloud/task/index.ts
  • packages/cli/src/cmd/cloud/task/comment.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/task/index.ts
  • packages/cli/src/cmd/cloud/task/comment.ts
📚 Learning: 2026-02-17T14:23:15.448Z
Learnt from: potofpie
Repo: agentuity/sdk PR: 974
File: packages/cli/src/cmd/git/account/list.ts:39-40
Timestamp: 2026-02-17T14:23:15.448Z
Learning: In the Agentuity CLI framework (packages/cli), when a subcommand declares requires: { auth: true }, the framework will automatically call requireAuth() before invoking the handler. Do not call requireAuth(ctx) manually inside command handlers. This applies to all TypeScript command files under packages/cli/src, including paths like packages/cli/src/cmd/git/account/list.ts.

Applied to files:

  • packages/cli/src/cmd/cloud/task/index.ts
  • packages/cli/src/cmd/cloud/task/comment.ts

Comment thread packages/cli/src/cmd/cloud/task/comment.ts
Comment on lines +421 to +456
export const commentSubcommand = createCommand({
name: 'comment',
aliases: ['comments', 'cmt'],
description: 'Manage task comments',
tags: ['requires-auth'],
requires: { auth: true },
examples: [
{
command: getCommand('cloud task comment create task_abc123 "Looks good"'),
description: 'Add a comment to a task',
},
{
command: getCommand('cloud task comment list task_abc123'),
description: 'List comments on a task',
},
{
command: getCommand('cloud task comment get cmt_abc123'),
description: 'Get a comment by ID',
},
{
command: getCommand('cloud task comment update cmt_abc123 "Updated text"'),
description: 'Update a comment',
},
{
command: getCommand('cloud task comment delete cmt_abc123'),
description: 'Delete a comment',
},
],
subcommands: [
createCommentSubcommand,
getCommentSubcommand,
updateCommentSubcommand,
deleteCommentSubcommand,
listCommentsSubcommand,
],
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Place this command group under comment/index.ts.

This new CLI command is introduced as a flat comment.ts file, but command groups in src/cmd/ are supposed to live in their own directory entrypoint. Moving this to packages/cli/src/cmd/cloud/task/comment/index.ts keeps the command layout consistent with the rest of the tree.

As per coding guidelines, "Each command must be structured as a directory in src/cmd/ with an index.ts file as the entry point".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/src/cmd/cloud/task/comment.ts` around lines 421 - 456, Move the
exported commentSubcommand (and its associated subcommand symbols
createCommentSubcommand, getCommentSubcommand, updateCommentSubcommand,
deleteCommentSubcommand, listCommentsSubcommand) out of the flat comment.ts file
and make that file the directory entrypoint by placing the same export in a new
index.ts inside a comment directory; ensure index.ts re-exports or imports the
existing subcommand implementations and preserves the createCommand call, name,
aliases, description, tags, requires, examples and subcommands array so the CLI
layout follows the established command-as-directory structure.

Co-Authored-By: Rick Blalock <rickblalock@mac.com>
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.

0 participants