Skip to content

Add inspect for offline imported-project detection - #1628

Merged
parteeksingh24 merged 13 commits into
mainfrom
feat/tac-760-project-inspect
Jul 29, 2026
Merged

Add inspect for offline imported-project detection#1628
parteeksingh24 merged 13 commits into
mainfrom
feat/tac-760-project-inspect

Conversation

@parteeksingh24

@parteeksingh24 parteeksingh24 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds agentuity inspect --dir <path> --json, a read-only, offline project-inspection command. It reports detector-level facts without authentication, cloud linking, or an agentuity.json file. The response is versioned so Genesis and other callers can consume it without duplicating the CLI's framework detection.

Fixes TAC-851.

Related: TAC-760, the umbrella for completing the source-fact contract and adopting it in Genesis.

local source
    │
    ▼
agentuity inspect --json
    │
    ▼
versioned offline facts
    │
    ▼
Genesis import and preview (follow-up)

Why

Genesis currently mirrors framework detection and guesses some source-layout facts. That creates drift between what the SDK can build and what Genesis thinks it can preview.

This PR establishes the first half of a single-source-of-truth boundary. It answers what the detector knows before a build. It does not claim to know the final adapter-resolved launch entrypoint.

Implementation

Offline command boundary

inspect opts out of update checks, internal logging, and config loading. This keeps its output independent of local profiles and auth state.

skipUpgradeCheck: true,
skipInternalLogging: true,
skipConfigLoad: true,

The optional directory now has the same default in runtime parsing and generated command metadata:

dir: z.string().default('.').describe('Project directory to inspect'),

Honest build-command provenance

The public response distinguishes a package script from a terminal-ready command. Projects with no build step return null; the internal sentinel never crosses the boundary.

if (framework.buildCommandKind === 'none') return null;
if (framework.buildCommandKind === 'package-script') {
	return { kind: 'package-script' as const, name: framework.buildCommand };
}
return { kind: 'command' as const, command: framework.buildCommand };

Selected response fields:

{
  "schemaVersion": 1,
  "framework": "vite",
  "runtime": "node",
  "packageManager": "bun",
  "detectedServerEntry": null,
  "commands": {
    "build": { "kind": "command", "command": "vite build" }
  }
}

Validated launch overrides

launch.json is parsed with Zod instead of being cast from untrusted JSON. Invalid JSON and invalid field shapes become CONFIG_INVALID errors with field paths. Unknown keys remain allowed, and historically nullable optional fields remain compatible.

The review follow-up also moved override reads to the repository's async filesystem helpers. Packaging and its tests now await that work. Packed-install smoke failures retain the complete inspect log.

How to review

Concern Start here Contract to verify
Offline execution src/main.ts, src/types.ts No profile, auth, logging, or update-check dependency
Response shape src/cmd/inspect.ts Versioned facts; detector-level entry and build provenance
Detection src/cmd/build/detect/ Every producer assigns the correct build-command kind
Overrides src/cmd/build/package/launch.ts Async read, structural validation, actionable errors
Installed CLI scripts/test-package-install.sh Packed Node and Bun executables inspect without network or auth

Scope and follow-ups

This PR ships the offline inspection surface. It intentionally leaves two child tasks under TAC-760:

  • TAC-852: add config-resolved source facts such as public assets and HTML shell location.
  • TAC-853: consume the contract in Genesis and remove its mirrored detector and public/ heuristic.

Azure container packaging, deployment, visibility, and rollback are outside this command's boundary. They consume build artifacts after inspection.

Known gap: cloud deploy --pack-only and the shared step runner still translate malformed launch.json failures into INTERNAL_ERROR. inspect and build return CONFIG_INVALID; deploy error translation belongs in a separate step-runner change.

Sources

  • TanStack Start hosting: the final server entry varies by build and adapter, so this API reports detectedServerEntry rather than claiming a final entrypoint.
  • Vercel framework definitions: package-script participation is preserved as explicit framework metadata.
  • Cloudflare autoconfig: detected framework commands are normalized before downstream use. This PR instead preserves whether a value is a package script or a raw command.

Verification

  • bun test test/cmd/inspect.test.ts test/cmd/build/package/launch.test.ts test/cmd/build/buildpack-contract.test.ts test/cmd/build/static-assets.test.ts: 73 pass, 0 fail on the final head.
  • bun run typecheck: pass.
  • bun run build: pass.
  • Built node bin/cli.js --json inspect --describe: dir.required is false and dir.default is ".".
  • CLI_RUNTIME=node bash scripts/test-package-install.sh: pass, including packed-tarball inspect with an isolated profile.
  • CLI_RUNTIME=bun bash scripts/test-package-install.sh: pass, including packed-tarball inspect with an isolated profile.
  • Full bun test before the final schema-metadata correction: 831 pass, 4 fail. All four failures are pre-existing, unrelated upgrade/spawn timeout tests; the current-head focused suite above is green.
  • GitHub Actions: all checks pass after one transient registry-resolution retry and one transient Bun-upgrade retry.
  • Agentuity docs preview: pass on retry (4m27s). The first run built and packaged successfully but failed during cloud warmup with exit 17 and no runtime logs; the identical retry succeeding confirms that failure was transient.

Summary by CodeRabbit

  • New Features

    • Added an inspect command that analyzes local projects and reports framework, runtime, package manager, server, build, port, and monorepo details.
    • Added JSON output for automation and human-readable results for interactive use.
    • Added support for inspecting a specified project directory without requiring authentication or project configuration.
  • Bug Fixes

    • Improved validation and error reporting for invalid launch.json files.
    • Corrected handling of projects without build steps and optional configuration values.

- Reuse framework and monorepo detection for JSON output
- Bypass auth, update checks, and local CLI delegation
@agentuity-agent

agentuity-agent Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest Agentuity deployment details. Learn more about Agentuity.

Project Deployment Preview Updated (UTC)
docs 🟢 Ready Preview Jul 27, 2026 10:18 PM

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@parteeksingh24, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 16 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 370b770c-846d-472f-82b8-9298c951edfd

📥 Commits

Reviewing files that changed from the base of the PR and between e02c232 and 668e52c.

📒 Files selected for processing (12)
  • packages/cli/src/cmd/build/detect/index.ts
  • packages/cli/src/cmd/build/package/index.ts
  • packages/cli/src/cmd/build/package/launch.ts
  • packages/cli/src/cmd/build/run.ts
  • packages/cli/src/cmd/inspect.ts
  • packages/cli/test/cmd/build/buildpack-contract.test.ts
  • packages/cli/test/cmd/build/package/launch.test.ts
  • packages/cli/test/cmd/build/static-assets.test.ts
  • packages/cli/test/cmd/build/wsl-smoke-layout.test.ts
  • packages/cli/test/cmd/build/wsl-smoke-local-validate.ts
  • packages/cli/test/cmd/inspect.test.ts
  • scripts/test-package-install.sh
📝 Walkthrough

Walkthrough

The CLI adds an offline inspect command with structured detection output, local routing, configuration-independent startup, validated launch.json handling, standardized build metadata, and Bun/Node integration and package-install tests.

Changes

Inspect command

Layer / File(s) Summary
Inspect command contract and execution
packages/cli/src/cmd/inspect.ts, packages/cli/src/cmd/index.ts
Defines validated inspect options and responses, performs framework and monorepo detection, formats output, returns structured results, and registers the command.
Inspection routing and configuration bypass
packages/cli/src/local-delegate.ts, packages/cli/src/types.ts, packages/cli/src/main.ts
Bypasses local delegation for inspect and allows commands to skip configuration and authentication loading.
Build metadata and launch configuration validation
packages/cli/src/cmd/build/...
Classifies build commands, centralizes the no-build sentinel, validates launch.json, normalizes process defaults, and reports invalid launch configuration as structured errors.
Offline inspection validation
packages/cli/test/cmd/inspect.test.ts, packages/cli/test/cmd/build/package/launch.test.ts, scripts/test-package-install.sh, packages/cli/package.json
Adds fixture-based Bun and Node coverage for inspect routing, detection output, configuration errors, and packed-install execution, with test-script registration.
🚥 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 27, 2026

Copy link
Copy Markdown

📦 Canary Packages Published

version: 3.1.14-668e52c

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

Add to your package.json:

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

Or install directly:

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

🧹 Nitpick comments (1)
packages/cli/scripts/test-inspect.ts (1)

65-80: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Assert the advertised runtime result.

runtime is parsed but never checked, so a runtime-detection regression still passes. Assert the expected Vite runtime at minimum.

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

In `@packages/cli/scripts/test-inspect.ts` around lines 65 - 80, Update the
assertions in the test-inspect result validation to check the parsed
result.runtime field and require the expected Vite runtime value, following the
existing framework and command assertions.
🤖 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/inspect.ts`:
- Around line 95-104: Update the output branch in the inspect command handler to
use the shared isJSONMode() helper instead of reading ctx.options.json directly,
while preserving the existing human-readable output behavior and command
details.

In `@packages/cli/src/local-delegate.ts`:
- Around line 46-57: The global value-bearing option set
GLOBAL_OPTIONS_WITH_VALUES must include --profile so local delegation skips its
argument and preserves offline inspect detection. Update
packages/cli/src/local-delegate.ts lines 46-57 accordingly, and add an assertion
in packages/cli/scripts/test-inspect.ts lines 28-33 that ['--profile', 'work',
'--json', 'inspect'] is recognized as an inspect invocation.

---

Nitpick comments:
In `@packages/cli/scripts/test-inspect.ts`:
- Around line 65-80: Update the assertions in the test-inspect result validation
to check the parsed result.runtime field and require the expected Vite runtime
value, following the existing framework and command assertions.
🪄 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: 655c188c-c884-46d6-bf04-d00a7cdabd17

📥 Commits

Reviewing files that changed from the base of the PR and between 38184ca and 8724e23.

📒 Files selected for processing (6)
  • packages/cli/package.json
  • packages/cli/scripts/test-inspect.ts
  • packages/cli/src/cmd/index.ts
  • packages/cli/src/cmd/inspect.ts
  • packages/cli/src/local-delegate.ts
  • packages/cli/src/main.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (20)
  • GitHub Check: Bun version checks
  • GitHub Check: Linux distro install smoke
  • GitHub Check: Native install (Linux)
  • GitHub Check: Native install (macOS)
  • GitHub Check: Installer scenarios
  • GitHub Check: Agentuity - docs-docs
  • GitHub Check: Queue CLI Tests (bun)
  • GitHub Check: Package Installation & Usage Test (bun)
  • GitHub Check: Migrate Chain (v1 → v2 → v3)
  • GitHub Check: Queue CLI Tests (node)
  • GitHub Check: Package Installation & Usage Test (node)
  • GitHub Check: Testing Apps (local tests)
  • GitHub Check: Postgres SSL Integration Test
  • GitHub Check: Framework Demo Tests
  • GitHub Check: Service Client Smoke Tests
  • GitHub Check: Pack & Upload
  • GitHub Check: Windows WSL CLI Smoke Test
  • GitHub Check: actionlint
  • GitHub Check: OSV Scanner PR
  • 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/index.ts
  • packages/cli/src/cmd/inspect.ts
  • packages/cli/scripts/test-inspect.ts
  • packages/cli/src/local-delegate.ts
  • packages/cli/src/main.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/index.ts
  • packages/cli/src/cmd/inspect.ts
  • packages/cli/scripts/test-inspect.ts
  • packages/cli/src/local-delegate.ts
  • packages/cli/src/main.ts
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 in src/cmd/ with an index.ts entry point
Always define interfaces for command options using Zod schemas; never use any for type safety

Files:

  • packages/cli/src/cmd/index.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/index.ts
  • packages/cli/src/cmd/inspect.ts
  • packages/cli/src/local-delegate.ts
  • packages/cli/src/main.ts
🧠 Learnings (3)
📚 Learning: 2026-03-27T23:18:58.450Z
Learnt from: jhaynie
Repo: agentuity/sdk PR: 1292
File: packages/keyvalue/package.json:3-3
Timestamp: 2026-03-27T23:18:58.450Z
Learning: In the agentuity/sdk monorepo, subpackage `package.json` files under `packages/` (e.g., `packages/keyvalue`) are allowed to depend on other workspace packages (such as `agentuity/server`) and are not limited to only `agentuity/core` and `zod`. Also, if a subpackage uses `bunx tsc --build --force` as its build script, treat it as a valid/intentional build command and do not flag it as a dependency/build-script violation.

Applied to files:

  • packages/cli/package.json
📚 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/index.ts
  • packages/cli/src/cmd/inspect.ts
  • packages/cli/scripts/test-inspect.ts
  • packages/cli/src/local-delegate.ts
  • packages/cli/src/main.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/index.ts
  • packages/cli/src/cmd/inspect.ts
  • packages/cli/src/local-delegate.ts
  • packages/cli/src/main.ts
🔇 Additional comments (4)
packages/cli/src/cmd/index.ts (1)

15-15: LGTM!

packages/cli/src/local-delegate.ts (1)

19-21: LGTM!

Also applies to: 242-245

packages/cli/src/main.ts (1)

301-311: LGTM!

packages/cli/package.json (1)

30-30: LGTM!

Also applies to: 39-39

Comment thread packages/cli/src/cmd/inspect.ts Outdated
Comment thread packages/cli/src/local-delegate.ts
@parteeksingh24

Copy link
Copy Markdown
Contributor Author

Investigated the two failed install checks. No PR code change is needed.

Bun version checks failed in run 30304769593 at ✗ Failed to upgrade Bun and install; Install test summary only propagated that job failure. This is an existing flaky install check, not an inspect regression:

  • The same Bun version checks job failed on unrelated PR CLI: add project add keyvalue command #1569 in run 27964296992, between passing runs 27963302032 and 27983244189. Those intervening changes did not touch the installer, Bun test, or workflow.
  • This PR does not change install.sh, scripts/test-bun-check.sh, or .github/workflows/test-install.yaml; all three match main byte-for-byte.
  • The failing Debian test copies only install.sh and installs the published @agentuity/cli. It never runs the package test script or scripts/test-inspect.ts.
  • I reproduced the exact Bun 1.3.0 to 1.3.14 upgrade and published CLI install path twice in a fresh debian:latest container, including the CI and pseudo-TTY invocation. Both runs passed.

Recommendation: rerun the failed checks and merge #1628 once required checks are green. The failure is unrelated installer/network flakiness exposed because CLI changes cause the install workflow to run.

@parteeksingh24

parteeksingh24 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the review and contract findings in 258b7759a and 98f8d2785.

  • Added schemaVersion: 1 so programmatic consumers can reject incompatible future inspect contracts.
  • Added --profile <name> handling to the early inspect routing guard, preventing a profile value from being mistaken for the command and triggering local CLI delegation or installation.
  • Switched the human-output branch to the shared isJSONMode() helper.
  • Changed non-project failures to the standard JSON error envelope with PROJECT_NOT_FOUND and exit code 12.
  • Added assertions for profile-prefixed routing, schema version, detected Node runtime, and empty-directory error behavior.

Verification:

  • cd packages/cli && bun run typecheck: passed
  • cd packages/cli && bun run test: passed
  • cd packages/cli && bun run build: passed
  • bun run lint: blocked before source linting by pre-existing untracked nested root configs under .agents/tmp/worktree/*/biome.json
  • bunx biome lint packages/cli/src/cmd/inspect.ts packages/cli/src/local-delegate.ts packages/cli/scripts/test-inspect.ts: passed

@parteeksingh24 parteeksingh24 changed the title Add offline CLI project inspection Add inspect for imported project detection Jul 27, 2026
@agentuity-agent

agentuity-agent Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest Agentuity deployment details.

Project Deployment Preview Updated (UTC)
docs 🟢 Ready (deploy_7c1833df9fb3b92e4a015c1141071da8) - 2026-07-29T19:10:06Z

View deployment logs with the Agentuity CLI:

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

@parteeksingh24

Copy link
Copy Markdown
Contributor Author

Updated the wording to separate the durable Genesis contract from current implementation details.

  • CLI help and delegation comments now explain that Genesis runs inspect before the user authenticates, adds agentuity.json, or links a cloud project.
  • Removed the offline tag and permanent network-free wording. Detection still uses local files today, but the PR no longer promises that it must stay that way.
  • Clarified that schemaVersion versions the JSON response shape. Version 1 does not freeze every field for future versions.

No runtime behavior changed. CLI typecheck, tests, build, targeted lint, and formatting pass. Repo-root lint remains blocked by the pre-existing nested Biome configs under .agents/tmp/worktree/*.

@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

🧹 Nitpick comments (1)
packages/cli/scripts/test-inspect.ts (1)

100-173: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider extracting a shared fixture/assert helper for the three framework scenarios.

The vite/tanstack/legacy blocks each write a package.json fixture, call runInspect, check exitCode === 0, JSON.parse stdout, then assert framework/confidence/warnings/port. Factoring this into a small expectInspect(dir, pkgJson, assertions) helper would cut the duplication and make it easy to add future framework fixtures.

♻️ Sketch of a shared helper
async function expectInspectFixture(
	dir: string,
	pkgJson: Record<string, unknown>,
	check: (result: Record<string, unknown>) => void
) {
	mkdirSync(dir);
	writeFileSync(join(dir, 'package.json'), JSON.stringify(pkgJson));
	const { exitCode, stdout } = await runInspect(dir);
	if (exitCode !== 0) throw new Error(`inspect exited ${exitCode} for ${dir}`);
	check(JSON.parse(stdout));
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/scripts/test-inspect.ts` around lines 100 - 173, Extract a
shared helper near the test scenarios, such as expectInspectFixture, to create
the fixture directory and package.json, invoke runInspect, validate a zero exit
code, parse stdout, and pass the result to scenario-specific assertions.
Refactor the vite, tanstack-start, and agentuity-legacy blocks to use this
helper while preserving all existing framework, confidence, warning, and port
checks.
🤖 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/scripts/test-inspect.ts`:
- Around line 22-39: Update the Bun.spawn call in runInspect to include a native
timeout option, using an appropriate duration for the inspect command, so
awaiting cli.exited cannot hang indefinitely. Preserve the existing stdout,
stderr, exitCode collection and process configuration.

---

Nitpick comments:
In `@packages/cli/scripts/test-inspect.ts`:
- Around line 100-173: Extract a shared helper near the test scenarios, such as
expectInspectFixture, to create the fixture directory and package.json, invoke
runInspect, validate a zero exit code, parse stdout, and pass the result to
scenario-specific assertions. Refactor the vite, tanstack-start, and
agentuity-legacy blocks to use this helper while preserving all existing
framework, confidence, warning, and port checks.
🪄 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: 64ba5af4-507a-4481-8c18-567ad4711a4a

📥 Commits

Reviewing files that changed from the base of the PR and between 258b775 and 2c62cb4.

📒 Files selected for processing (3)
  • packages/cli/scripts/test-inspect.ts
  • packages/cli/src/cmd/inspect.ts
  • packages/cli/src/local-delegate.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/cli/src/cmd/inspect.ts
  • packages/cli/src/local-delegate.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (19)
  • 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: Windows WSL CLI Smoke Test
  • GitHub Check: Framework Demo Tests
  • GitHub Check: Build
  • GitHub Check: Service Client Smoke Tests
  • GitHub Check: Postgres SSL Integration Test
  • GitHub Check: Package Installation & Usage Test (bun)
  • GitHub Check: Queue CLI Tests (bun)
  • GitHub Check: Package Installation & Usage Test (node)
  • GitHub Check: Migrate Chain (v1 → v2 → v3)
  • GitHub Check: Queue CLI Tests (node)
  • GitHub Check: Testing Apps (local tests)
  • GitHub Check: OSV Scanner PR
  • GitHub Check: Pack & Upload
  • GitHub Check: Agentuity - docs-docs
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{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/scripts/test-inspect.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/scripts/test-inspect.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/scripts/test-inspect.ts
🔇 Additional comments (4)
packages/cli/scripts/test-inspect.ts (4)

12-20: LGTM!


67-67: LGTM!

Also applies to: 83-85


198-201: LGTM!


174-197: 🎯 Functional Correctness

No change needed. The invalidResult type assertion contains a single error property definition.

Comment thread packages/cli/scripts/test-inspect.ts Outdated
parteeksingh24 and others added 5 commits July 27, 2026 16:35
- Stop the inspect subprocess after 15 seconds.
- Share setup and validation across framework fixtures.
- Zod-parse launch.json; derive UserLaunchOverride from schema
- throw LaunchConfigError with per-field issue paths
- build maps it to CONFIG_INVALID (exit 10), not INTERNAL_ERROR
- tolerate JSON null as absent; keep unknown keys passthrough

Co-authored-by: Cursor <cursoragent@cursor.com>
- gate pre-dispatch loadConfig and getAuth in main.ts
- getAuth() re-loads config internally, so both need the gate

Co-authored-by: Cursor <cursoragent@cursor.com>
- add DetectedFramework.buildCommandKind at all producers
- extract NO_BUILD_SENTINEL const; adapters unchanged

Co-authored-by: Cursor <cursoragent@cursor.com>
- skipConfigLoad: identical output for any profile config state
- commands.build: discriminated union; sentinel never public
- entrypoints -> detectedServerEntry (singular detector hint)
- validate launch.json even when a framework matches
- move tests to test/cmd/inspect.test.ts; run in CI test chain
- add packed-tarball inspect smoke to install matrix

Co-authored-by: Cursor <cursoragent@cursor.com>
@parteeksingh24 parteeksingh24 changed the title Add inspect for imported project detection Add inspect for offline imported-project detection Jul 29, 2026

@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: 2

🤖 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/build/package/launch.ts`:
- Around line 132-163: Convert readUserLaunchOverride to async, replace
existsSync/readFileSync with pathExists and await readFile from the mandated
async I/O modules, and preserve the existing parsing and LaunchConfigError
behavior. Update its async callers, including detectCustomLauncher and the
inspect handler, to await the result.

In `@scripts/test-package-install.sh`:
- Around line 147-155: Update all inspect failure paths in
scripts/test-package-install.sh, including the inspect_exit non-zero branch and
sentinel/framework validation failures, to print the complete inspect-output.log
contents before exiting. Preserve the existing error handling while ensuring cat
inspect-output.log runs for every inspect-related failure, tolerating a missing
log file as currently done.
🪄 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: 6c27371c-da70-4295-a549-dde643f28adf

📥 Commits

Reviewing files that changed from the base of the PR and between 2c62cb4 and e02c232.

📒 Files selected for processing (15)
  • packages/cli/package.json
  • packages/cli/src/cmd/build/adapters/generic.ts
  • packages/cli/src/cmd/build/detect/agentuity-legacy.ts
  • packages/cli/src/cmd/build/detect/generic.ts
  • packages/cli/src/cmd/build/detect/index.ts
  • packages/cli/src/cmd/build/detect/types.ts
  • packages/cli/src/cmd/build/detect/util.ts
  • packages/cli/src/cmd/build/index.ts
  • packages/cli/src/cmd/build/package/launch.ts
  • packages/cli/src/cmd/inspect.ts
  • packages/cli/src/main.ts
  • packages/cli/src/types.ts
  • packages/cli/test/cmd/build/package/launch.test.ts
  • packages/cli/test/cmd/inspect.test.ts
  • scripts/test-package-install.sh
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/cli/package.json
  • packages/cli/src/cmd/inspect.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (7)
  • GitHub Check: Installer scenarios
  • GitHub Check: Native install (macOS)
  • GitHub Check: Linux distro install smoke
  • GitHub Check: Windows WSL CLI Smoke Test
  • GitHub Check: Framework Demo Tests
  • GitHub Check: Build
  • GitHub Check: Agentuity - docs-docs
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{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/build/detect/types.ts
  • packages/cli/test/cmd/build/package/launch.test.ts
  • packages/cli/src/cmd/build/detect/agentuity-legacy.ts
  • packages/cli/src/cmd/build/detect/util.ts
  • packages/cli/src/cmd/build/adapters/generic.ts
  • packages/cli/src/main.ts
  • packages/cli/src/cmd/build/index.ts
  • packages/cli/src/cmd/build/detect/index.ts
  • packages/cli/src/cmd/build/detect/generic.ts
  • packages/cli/src/cmd/build/package/launch.ts
  • packages/cli/src/types.ts
  • packages/cli/test/cmd/inspect.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/build/detect/types.ts
  • packages/cli/test/cmd/build/package/launch.test.ts
  • packages/cli/src/cmd/build/detect/agentuity-legacy.ts
  • packages/cli/src/cmd/build/detect/util.ts
  • packages/cli/src/cmd/build/adapters/generic.ts
  • packages/cli/src/main.ts
  • packages/cli/src/cmd/build/index.ts
  • packages/cli/src/cmd/build/detect/index.ts
  • packages/cli/src/cmd/build/detect/generic.ts
  • packages/cli/src/cmd/build/package/launch.ts
  • packages/cli/src/types.ts
  • packages/cli/test/cmd/inspect.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/build/detect/types.ts
  • packages/cli/src/cmd/build/detect/agentuity-legacy.ts
  • packages/cli/src/cmd/build/detect/util.ts
  • packages/cli/src/cmd/build/adapters/generic.ts
  • packages/cli/src/main.ts
  • packages/cli/src/cmd/build/index.ts
  • packages/cli/src/cmd/build/detect/index.ts
  • packages/cli/src/cmd/build/detect/generic.ts
  • packages/cli/src/cmd/build/package/launch.ts
  • packages/cli/src/types.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/build/package/launch.test.ts
  • packages/cli/test/cmd/inspect.test.ts
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 in src/cmd/ with an index.ts entry point
Always define interfaces for command options using Zod schemas; never use any for type safety

Files:

  • packages/cli/src/cmd/build/index.ts
  • packages/cli/src/cmd/build/detect/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/build/detect/types.ts
  • packages/cli/test/cmd/build/package/launch.test.ts
  • packages/cli/src/cmd/build/detect/agentuity-legacy.ts
  • packages/cli/src/cmd/build/detect/util.ts
  • packages/cli/src/cmd/build/adapters/generic.ts
  • packages/cli/src/main.ts
  • packages/cli/src/cmd/build/index.ts
  • packages/cli/src/cmd/build/detect/index.ts
  • packages/cli/src/cmd/build/detect/generic.ts
  • packages/cli/src/cmd/build/package/launch.ts
  • packages/cli/src/types.ts
  • packages/cli/test/cmd/inspect.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/build/detect/types.ts
  • packages/cli/src/cmd/build/detect/agentuity-legacy.ts
  • packages/cli/src/cmd/build/detect/util.ts
  • packages/cli/src/cmd/build/adapters/generic.ts
  • packages/cli/src/main.ts
  • packages/cli/src/cmd/build/index.ts
  • packages/cli/src/cmd/build/detect/index.ts
  • packages/cli/src/cmd/build/detect/generic.ts
  • packages/cli/src/cmd/build/package/launch.ts
  • packages/cli/src/types.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/build/package/launch.test.ts
  • packages/cli/test/cmd/inspect.test.ts
🔇 Additional comments (13)
packages/cli/test/cmd/build/package/launch.test.ts (1)

7-7: LGTM!

Also applies to: 371-423

packages/cli/test/cmd/inspect.test.ts (1)

1-474: LGTM!

packages/cli/src/types.ts (1)

368-368: LGTM!

Also applies to: 412-412, 434-434

packages/cli/src/main.ts (1)

257-262: LGTM!

Also applies to: 305-322

packages/cli/src/cmd/build/detect/util.ts (1)

10-16: LGTM!

packages/cli/src/cmd/build/detect/types.ts (1)

50-57: LGTM!

packages/cli/src/cmd/build/detect/index.ts (1)

16-21: LGTM!

Also applies to: 65-78, 250-268, 277-290

packages/cli/src/cmd/build/detect/generic.ts (1)

86-97: LGTM!

packages/cli/src/cmd/build/detect/agentuity-legacy.ts (1)

100-118: LGTM!

packages/cli/src/cmd/build/adapters/generic.ts (1)

16-16: LGTM!

Also applies to: 194-212, 426-438

packages/cli/src/cmd/build/package/launch.ts (1)

22-121: LGTM!

Also applies to: 249-255

packages/cli/src/cmd/build/index.ts (2)

190-198: 🩺 Stability & Availability

Confirm exitWithError halts execution before the fallthrough handler runs.

No return/throw follows the exitWithError call, so if exitWithError doesn't terminate synchronously (e.g. isn't typed never / doesn't call process.exit), execution would continue into the generic AggregateError/tui.fatal fallback below and double-report the error. This matches the pre-existing FrameworkDetectionError/TypecheckError branches' convention, so likely safe, but worth confirming given errors.ts isn't in scope here.


5-5: LGTM!

Also applies to: 14-14

Comment thread packages/cli/src/cmd/build/package/launch.ts Outdated
Comment thread scripts/test-package-install.sh
- Read launch overrides with async filesystem helpers
- Await packaging across build and test callers
- Preserve inspect logs when packed smoke checks fail
Mark --dir optional in generated command metadata.\n\nCover the built schema contract with a regression test.
@parteeksingh24
parteeksingh24 merged commit 7059f85 into main Jul 29, 2026
29 checks passed
@parteeksingh24
parteeksingh24 deleted the feat/tac-760-project-inspect branch July 29, 2026 19:12
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