Skip to content

Honor --dry-run in project deletion - #1630

Merged
parteeksingh24 merged 4 commits into
mainfrom
fix/project-delete-dry-run
Jul 30, 2026
Merged

Honor --dry-run in project deletion#1630
parteeksingh24 merged 4 commits into
mainfrom
fix/project-delete-dry-run

Conversation

@parteeksingh24

@parteeksingh24 parteeksingh24 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

agentuity --dry-run project delete <id> now resolves the project, prints the exact target, and exits before confirmation or DELETE /cli/project.

[DRY RUN] Would delete project: Example Project (proj_example)

ℹ [DRY RUN] Project deletion skipped

This PR:

  • adds full CLI regression coverage with a fake local API
  • covers dry runs with and without --confirm
  • uses the shared JSON-mode guard
  • updates the dry-run help text to describe the preview behavior

Why

The global --dry-run option reached the command through ctx.options, but the project delete handler never checked it. After its read-only project lookup, the handler continued into the non-interactive confirmation guard and, when --confirm was present, called the deletion API.

The dry-run guard belongs after target resolution, so the preview can name the project, and before confirmation and mutation, so both destructive paths are unreachable.

Flow

--dry-run project delete <id>
              │
              ▼
       resolve project
       GET /cli/project/:id
              │
              ▼
       print exact target
              │
              ▼
       return successfully
       no prompt, no DELETE

The normal command keeps its existing path:

project delete <id>
        │
        ▼
 resolve project → confirm if needed → DELETE /cli/project

Implementation

Guard the mutation boundary

if (isDryRunMode(options)) {
	const projectLabel = projectsToDelete.length === 1 ? 'project' : 'projects';
	const projectDisplay = projectsToDelete.map(formatProjectDisplay).join(', ');
	outputDryRun(`Would delete ${projectLabel}: ${projectDisplay}`, options);
	if (!isJSONMode(options)) {
		tui.newline();
		tui.info('[DRY RUN] Project deletion skipped');
	}
	return { success: false, projectIds: [], count: 0 };
}

The command uses the shared isJSONMode() helper, preserving the existing JSON-output guard while centralizing mode detection.

Test the CLI boundary

const result = await runCLI(['--dry-run', 'project', 'delete', PROJECT_ID]);

expect(result).toEqual(expect.objectContaining({ exitCode: 0 }));
expect(result.stderr).not.toContain('no TTY and --confirm is false');
expect(requests).toEqual([
	{ method: 'GET', pathname: `/cli/project/${PROJECT_ID}` },
]);

The test runs the real CLI entry point against a fake API and records every request. A dry run may resolve the target with GET; it must never send DELETE.

Research and rationale

First-party CLI implementations use the same boundary:

The common rule is explicit: resolve enough state to show an accurate plan, then return from the handler before confirmation or mutation.

Verification

  • bun test packages/cli/test/cmd/project/delete.test.ts: 2 passed, 0 failed
  • bunx bun@1.3.11 run lint: passed
  • bunx bun@1.3.11 run build: passed
  • bunx bun@1.3.11 run typecheck:packages: passed
  • bunx bun@1.3.11 run all: passed, including package tests, CLI tests, docs tests, install smokes, service builds, and standalone backend tests
  • Live disposable-project smoke: dry run without --confirm printed the exact target and returned successfully; a follow-up lookup confirmed the project still existed

Documentation impact

No standalone documentation change is needed. The existing CLI docs already describe the global --dry-run option; this PR updates the command’s own help text to say: “Preview project deletion without making changes.”

@agentuity-agent

agentuity-agent Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest Agentuity deployment details.

Project Deployment Preview Updated (UTC)
docs 🟢 Ready (deploy_d86881a0d584e47782c6831e76b40633) - 2026-07-30T18:18:15Z

View deployment logs with the Agentuity CLI:

agentuity cloud deployment logs deploy_d86881a0d584e47782c6831e76b40633 --project-id=proj_5ed7da797bef771d65e1bd6946a052b1

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

The project delete command now supports dry-run execution, displaying selected projects without prompting or calling the deletion API. New CLI tests use a local mock server to verify output, request behavior, exit status, and confirmation handling.

Changes

Project delete dry-run

Layer / File(s) Summary
Dry-run command flow
packages/cli/src/cmd/project/delete.ts
The handler detects dry-run mode, reports the selected projects, and returns before confirmation or deletion requests.
Dry-run CLI validation
packages/cli/test/cmd/project/delete.test.ts
Tests build and run the CLI against a mock server, verifying dry-run output, GET-only requests, successful exit status, and skipped confirmation.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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.

❤️ Share

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

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

📦 Canary Packages Published

version: 3.1.15-5067220

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

Add to your package.json:

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

Or install directly:

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

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/cli/src/cmd/project/delete.ts`:
- Line 143: Update the dry-run output guard in the delete command around the
options.json check to import isJSONMode from ../../output.ts and use
isJSONMode() instead, preserving the existing guard behavior while centralizing
JSON-mode detection.
🪄 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 Plus

Run ID: 038d65cf-85c1-4877-b86d-363e57fd1777

📥 Commits

Reviewing files that changed from the base of the PR and between 606861b and 7574de4.

📒 Files selected for processing (2)
  • packages/cli/src/cmd/project/delete.ts
  • packages/cli/test/cmd/project/delete.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (17)
  • GitHub Check: Bun version checks
  • GitHub Check: Native install (macOS)
  • GitHub Check: Installer scenarios
  • GitHub Check: Native install (Linux)
  • GitHub Check: Linux distro install smoke
  • GitHub Check: Pack & Upload
  • GitHub Check: Agentuity - docs-docs
  • GitHub Check: Windows WSL CLI Smoke Test
  • GitHub Check: Package Installation & Usage Test (node)
  • GitHub Check: Queue CLI Tests (bun)
  • GitHub Check: Package Installation & Usage Test (bun)
  • GitHub Check: Postgres SSL Integration Test
  • GitHub Check: Service Client Smoke Tests
  • GitHub Check: Framework Demo Tests
  • GitHub Check: Queue CLI Tests (node)
  • GitHub Check: Migrate Chain (v1 → v2 → v3)
  • GitHub Check: Build
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Run bun run format using Biome with tabs (width 3), single quotes, semicolons, lineWidth 100, and trailingCommas es5

Files:

  • packages/cli/src/cmd/project/delete.ts
  • packages/cli/test/cmd/project/delete.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • packages/cli/src/cmd/project/delete.ts
  • packages/cli/test/cmd/project/delete.test.ts
packages/cli/src/**/*.ts

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

packages/cli/src/**/*.ts: Use tui.* helpers for formatted output (header, info, success, warning, error, table, progress)
Use ctx.logger for logging; logger.fatal() logs and exits with code 1
Use await readFile(p, 'utf-8') and await writeFile(p, content) from node:fs/promises for file I/O
Import pathExists from node-compat/fs for file existence checks instead of using Node's built-in
Do not use Bun globals (Bun.file, Bun.spawn, Bun.color, Bun.stringWidth, etc.) in production source code; tsconfig.json type checking enforces this
Imports must use explicit .ts extensions for relative paths (e.g., from './foo.ts', not from './foo'); TypeScript's rewriteRelativeImportExtensions will rewrite them to .js in output
Always check isJSONMode() for machine-readable output in command handlers
Use requireAuth(ctx) or optionalAuth(ctx) for authenticated commands

Files:

  • packages/cli/src/cmd/project/delete.ts
**/packages/*/test/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

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

Applied to files:

  • packages/cli/test/cmd/project/delete.test.ts
🔇 Additional comments (2)
packages/cli/src/cmd/project/delete.ts (1)

7-7: LGTM!

Also applies to: 57-57

packages/cli/test/cmd/project/delete.test.ts (1)

1-124: LGTM!

Comment thread packages/cli/src/cmd/project/delete.ts Outdated
@parteeksingh24 parteeksingh24 changed the title Honor dry-run in project deletion Honor --dry-run in project deletion Jul 30, 2026
@parteeksingh24
parteeksingh24 merged commit edb47d1 into main Jul 30, 2026
29 checks passed
@parteeksingh24
parteeksingh24 deleted the fix/project-delete-dry-run branch July 30, 2026 18:19
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.

1 participant