refactor: service package isolation (3.1.0)#1533
Conversation
|
The latest Agentuity deployment details.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR adds shared adapter, config, client, and api packages, rewires service packages and consumers to package-owned exports, narrows core and server surfaces, updates docs generation to REST API catalogs, and changes installer and tooling paths around the isolation plan. ChangesService package isolation
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
📦 Canary Packages Publishedversion: PackagesInstallAdd to your {
"dependencies": {
"@agentuity/analytics": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-analytics-3.0.11-796ec43.tgz",
"@agentuity/pi": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-pi-3.0.11-796ec43.tgz",
"@agentuity/coder-tui": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-coder-tui-3.0.11-796ec43.tgz",
"@agentuity/config": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-config-3.0.11-796ec43.tgz",
"@agentuity/cli": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-cli-3.0.11-796ec43.tgz",
"@agentuity/vector": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-vector-3.0.11-796ec43.tgz",
"@agentuity/sandbox": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-sandbox-3.0.11-796ec43.tgz",
"@agentuity/keyvalue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-keyvalue-3.0.11-796ec43.tgz",
"@agentuity/vite": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-vite-3.0.11-796ec43.tgz",
"@agentuity/hono": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-hono-3.0.11-796ec43.tgz",
"@agentuity/opencode": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-opencode-3.0.11-796ec43.tgz",
"@agentuity/coder": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-coder-3.0.11-796ec43.tgz",
"@agentuity/api": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-api-3.0.11-796ec43.tgz",
"@agentuity/webhook": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-webhook-3.0.11-796ec43.tgz",
"@agentuity/aigateway": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-aigateway-3.0.11-796ec43.tgz",
"@agentuity/task": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-task-3.0.11-796ec43.tgz",
"@agentuity/migrate": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-migrate-3.0.11-796ec43.tgz",
"@agentuity/storage": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-storage-3.0.11-796ec43.tgz",
"@agentuity/claude-code": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-claude-code-3.0.11-796ec43.tgz",
"@agentuity/email": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-email-3.0.11-796ec43.tgz",
"@agentuity/core": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-core-3.0.11-796ec43.tgz",
"@agentuity/stream": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-stream-3.0.11-796ec43.tgz",
"@agentuity/adapter": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-adapter-3.0.11-796ec43.tgz",
"@agentuity/db": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-db-3.0.11-796ec43.tgz",
"@agentuity/schedule": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-schedule-3.0.11-796ec43.tgz",
"@agentuity/server": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-server-3.0.11-796ec43.tgz",
"@agentuity/telemetry": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-telemetry-3.0.11-796ec43.tgz",
"create-agentuity": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/create-agentuity-3.0.11-796ec43.tgz",
"@agentuity/postgres": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-postgres-3.0.11-796ec43.tgz",
"@agentuity/schema": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-schema-3.0.11-796ec43.tgz",
"@agentuity/drizzle": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-drizzle-3.0.11-796ec43.tgz",
"@agentuity/runtime": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-runtime-3.0.11-796ec43.tgz",
"@agentuity/queue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-queue-3.0.11-796ec43.tgz",
"@agentuity/client": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-client-3.0.11-796ec43.tgz"
}
}Or install directly: bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-analytics-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-pi-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-coder-tui-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-config-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-cli-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-vector-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-sandbox-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-keyvalue-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-vite-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-hono-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-opencode-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-coder-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-api-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-webhook-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-aigateway-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-task-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-migrate-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-storage-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-claude-code-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-email-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-core-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-stream-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-adapter-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-db-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-schedule-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-server-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-telemetry-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/create-agentuity-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-postgres-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-schema-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-drizzle-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-runtime-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-queue-3.0.11-796ec43.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.11-796ec43/agentuity-client-3.0.11-796ec43.tgz |
183aaae to
39e0dbf
Compare
There was a problem hiding this comment.
Actionable comments posted: 14
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
packages/sandbox/src/resolve.ts (1)
65-65:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winEncode
sandboxIdin the resolve endpoint path.Line 65 uses raw
sandboxIdin the URL path; reserved characters can alter route resolution.Suggested fix
- `/cli/sandbox/${sandboxId}`, + `/cli/sandbox/${encodeURIComponent(sandboxId)}`,🤖 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/sandbox/src/resolve.ts` at line 65, The sandboxId variable is used directly in the URL path template `/cli/sandbox/${sandboxId}` without encoding, which can cause route resolution issues if it contains reserved characters. Encode the sandboxId using encodeURIComponent before interpolating it into the path string to ensure special characters are properly escaped and the route resolves correctly.packages/sandbox/src/destroy.ts (1)
31-31:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winEncode
sandboxIdin the delete path.Line 31 interpolates
sandboxIddirectly into the URL path, which can break endpoint routing for reserved characters.Suggested fix
- const url = `/sandbox/${sandboxId}${queryString ? `?${queryString}` : ''}`; + const url = `/sandbox/${encodeURIComponent(sandboxId)}${queryString ? `?${queryString}` : ''}`;🤖 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/sandbox/src/destroy.ts` at line 31, The sandboxId variable on line 31 is being directly interpolated into the URL path without encoding, which can cause routing issues when the ID contains reserved characters. Wrap the sandboxId variable with encodeURIComponent() before interpolating it into the template literal for the url variable to ensure any special characters are properly encoded and do not break the endpoint routing.packages/cli/src/cmd/coder/skill/delete.ts (1)
41-42:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUse
isJSONMode()for JSON output branching in the handler.
options.jsononly covers the explicit flag path; this command should use the shared JSON-mode helper to keep machine-readable behavior consistent.As per coding guidelines,
packages/cli/src/**/*.ts: “Always checkisJSONMode()for machine-readable output in command handlers”.Also applies to: 60-61
🤖 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/src/cmd/coder/skill/delete.ts` around lines 41 - 42, The code is directly checking options.json instead of using the shared isJSONMode() helper function for JSON output branching. Replace the condition `!options.json` with `!isJSONMode()` in the delete command handler at lines 41-42 and also at lines 60-61 as mentioned in the comment. This ensures consistent machine-readable output behavior across the CLI handlers as per the coding guidelines.Source: Coding guidelines
packages/sandbox/src/run.ts (1)
424-430:⚠️ Potential issue | 🟠 Major | ⚡ Quick winAbort the losing completion waiter after
Promise.race.On Line 424, the losing branch (
waitForExecutionCompletionorwaitForSandboxStatusCompletion) is never cancelled. That leaves background polling/timers running after completion, creating avoidable request churn and async leakage.Proposed fix
async function waitForRunCompletion( client: APIClient, sandboxId: string, executionId: string, orgId: string | undefined, signal: AbortSignal | undefined, logger: Logger | undefined, started: number ): Promise<{ exitCode?: number; status: string }> { const completionAbortController = new AbortController(); let onAbort: (() => void) | undefined; @@ try { const completionSignal = completionAbortController.signal; @@ const result = await Promise.race([executionPromise, statusPromise]); return result; } finally { + // Ensure the non-winning waiter is cancelled to stop background polling. + completionAbortController.abort(); if (onAbort && signal) { signal.removeEventListener('abort', onAbort); } } }Also applies to: 469-517
🤖 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/sandbox/src/run.ts` around lines 424 - 430, After the Promise.race on line 424 completes and returns a result, the losing branch (either waitForExecutionCompletion or waitForSandboxStatusCompletion) continues running in the background with its polling/timers never cancelled. To fix this, create an AbortController for each of the two promises being raced, pass the abort signal from each controller to their respective functions, and after Promise.race returns, immediately abort the controller corresponding to the losing branch so that any background polling or timers are properly cleaned up and prevent async leakage. Apply the same fix to the similar Promise.race pattern that also appears in the file (lines 469-517).
🧹 Nitpick comments (5)
packages/config/src/config.ts (1)
61-67: 💤 Low valueConsider making
regionrequired inbuildRegionalURL.The
regionparameter is marked optional, but if called withundefined, it would produce a malformed URL (https://hostname-undefined.agentuity.cloud). SincegetServiceUrlsalways passes a resolved region, this is safe in practice, but the signature is misleading.♻️ Suggested clarification
-function buildRegionalURL(region?: string, hostname?: string) { +function buildRegionalURL(region: string, hostname: string) {🤖 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/config/src/config.ts` around lines 61 - 67, The `region` parameter in the `buildRegionalURL` function is marked as optional with the `?` modifier, but it is always required to generate a valid URL and will produce malformed output if undefined. Remove the optional markers (`?`) from both the `region` and `hostname` parameters in the `buildRegionalURL` function signature to make them required parameters, since they are always expected to be provided by the caller (getServiceUrls always passes a resolved region).packages/coder/src/index.ts (1)
1-1: 🏗️ Heavy liftReplace wildcard exports in the package entrypoint.
Line 1, Lines 47-51, and Line 88 still use
export *, which makes the public surface less explicit and breaks the package-index export convention used in this repo. Please convert these to named re-exports.As per coding guidelines,
**/packages/*/src/index.ts: “Use named exports from packageindex.tsfiles”.Also applies to: 47-51, 88-88
🤖 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/coder/src/index.ts` at line 1, The package entrypoint uses wildcard exports with `export *` statements which violates the repository's convention requiring explicit named exports in package index.ts files. Replace the wildcard exports (at the `export * from './types.ts'` statement on line 1, the wildcard exports in lines 47-51, and the wildcard export on line 88) with explicit named re-exports by identifying what each module exports and converting them to named export syntax like `export { ExportName1, ExportName2 } from './module'`.Source: Coding guidelines
packages/queue/src/index.ts (1)
1-1: ⚡ Quick winReplace wildcard export with explicit named exports (Line 1).
Using
export *in packagesrc/index.tsmakes the public surface implicit; prefer explicit named exports here.As per coding guidelines,
**/packages/*/src/index.ts: Use named exports from packageindex.tsfiles.🤖 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/queue/src/index.ts` at line 1, The wildcard export statement in the packages/queue/src/index.ts file makes the public API surface implicit rather than explicit. Replace the `export * from './service.ts'` statement with explicit named exports by identifying all the exports available in service.ts and explicitly listing them in the export statement, for example exporting only the named items that should be part of the public API instead of re-exporting everything. This makes the package's public surface clear and intentional.Source: Coding guidelines
packages/email/src/index.ts (1)
1-2: ⚡ Quick winUse explicit named exports instead of wildcard exports (Lines 1-2).
For package entrypoints, keep exports explicit to control API surface and avoid accidental export drift.
As per coding guidelines,
**/packages/*/src/index.ts: Use named exports from packageindex.tsfiles.🤖 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/email/src/index.ts` around lines 1 - 2, Replace the wildcard exports (export * from './service.ts' and export * from './types.ts') with explicit named exports to maintain control over the public API surface. First, identify all the specific exports available from service.ts and types.ts that should be part of the public API, then replace the wildcard export statements with explicit named export statements that only include those intended symbols. This ensures accidental exports are prevented and the API surface remains intentional and controlled.Source: Coding guidelines
packages/keyvalue/src/service.ts (1)
1-1: Use a type-only import forFetchAdapter.
FetchAdapteris imported but used only as a type annotation. Usingimport typemakes this intent explicit and aligns with TypeScript best practices.Suggested fix
-import { FetchAdapter, buildUrl, toPayload, toServiceException } from '`@agentuity/adapter`'; +import { buildUrl, toPayload, toServiceException } from '`@agentuity/adapter`'; +import type { FetchAdapter } from '`@agentuity/adapter`';🤖 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/keyvalue/src/service.ts` at line 1, The import statement for FetchAdapter should be separated from the runtime value imports (buildUrl, toPayload, toServiceException). Create a separate type-only import using import type syntax for FetchAdapter while keeping the other functions in the regular import statement from '`@agentuity/adapter`'. This makes it explicit that FetchAdapter is used only as a type annotation and follows TypeScript best practices for type-only imports.
🤖 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 `@docs/scripts/api-reference/registry.ts`:
- Around line 33-151: Remove all `as Service` type assertions from each entry in
the apiReferenceRegistry array. Currently, each service property (such as
aiGatewayService, apiKeysService, coderService, and all others through to
workflowsService) is explicitly cast with `as Service`, which bypasses
TypeScript's compile-time type checking. Delete the `as Service` portion from
each entry so that TypeScript can properly verify at compile time that each
imported service object actually conforms to the Service type structure,
preventing malformed service objects from entering the documentation generation
without a type error.
In `@packages/adapter/src/fetch.ts`:
- Around line 16-27: The FetchErrorResponseSchema contains a data field defined
with z.never() which rejects all values and causes error response validation to
fail. Replace the z.never() definition on the data field with z.undefined()
since error responses should have undefined data rather than no valid parsing
path. This ensures that error responses with ok: false can be properly validated
in the FetchResponseSchema union.
In `@packages/adapter/src/http-util.ts`:
- Around line 164-166: The code in the Uint8Array handling block returns the
underlying buffer directly via data.buffer, which includes all bytes in the
buffer even if the Uint8Array is a sliced or subarray view. This will send
unintended data beyond the view's boundaries. Fix this by ensuring only the
bytes represented by the Uint8Array view are sent. Create a new Uint8Array from
the data to copy just the relevant bytes, then access its buffer property, or
alternatively slice the original buffer using data.byteOffset and
data.byteLength to extract only the bytes within the view's range.
- Around line 192-194: The fromResponse function unconditionally calls
response.json() for JSON content types, which fails on responses with no body
such as HTTP 204, 205, or 304 status codes. Before calling response.json() on
the response object in the contentType check, first verify that the response has
a non-empty body by checking the response status code or content length, and
return an appropriate empty or default value (such as null or an empty object)
for status codes that should not have body content, allowing the function to
handle these valid responses without crashing.
- Around line 143-185: The Function handling code within the toPayload function
is unreachable because it sits under the case 'object' branch, but typeof
function returns 'function', not 'object'. Add a separate case 'function' to the
switch statement that calls toPayload on the result of invoking the function,
moving the logic that currently checks data instanceof Function out of the case
'object' block and into its own dedicated case to ensure function inputs are
properly processed instead of falling through to the default empty text payload.
In `@packages/api/src/index.ts`:
- Around line 454-456: The automatic retry logic currently does not consider the
HTTP method when deciding whether a request can be safely retried. Extend the
canRetry check (currently only checking for ReadableStream bodies) to also
verify that the HTTP method is idempotent before allowing retries. Only allow
retries for safe methods like GET, HEAD, PUT, and DELETE, while preventing
retries for non-idempotent methods such as POST and PATCH. Apply this
idempotency check to the canRetry condition at the initial check and ensure it
is also enforced at the retry logic locations (the retry loop and any other
retry decision points).
- Around line 675-680: The logging statements using this.#logger.debug around
lines 675-680 are exposing sensitive data by logging the full responseBody
without sanitization, which can leak tokens, secrets, or PII. Remove the line
that logs the raw responseBody (the debug call logging 'Response:' and
responseBody), or alternatively sanitize the responseBody similar to how
sanitizedHeaders is being processed before logging it at a non-default log level
to prevent sensitive information exposure.
In `@packages/client/src/logger.ts`:
- Around line 15-18: The fatal method always creates a new Error instance,
losing the original error class and properties when an Error object is passed as
an argument. Fix this by checking if the first argument (args[0]) is already an
instance of Error - if it is, throw it directly; otherwise, create a new Error
with the string representation of the first argument. This preserves the
original error type and fields for proper instanceof checks and structured error
handling in downstream code.
In `@packages/coder/package.json`:
- Around line 28-33: The dependencies `@agentuity/adapter` and `@agentuity/api`
declared in the package.json file (lines 28-29) violate the coding guideline
that restricts packages/coder/**/package.json to only `@agentuity/core`,
`@agentuity/config`, `@agentuity/client`, `@agentuity/sandbox`, and zod. Since these
packages are actively imported across multiple files (util.ts, websocket.ts,
sse.ts, and 10+ others), choose one of two approaches: either update the coding
guideline documentation to explicitly permit `@agentuity/adapter` and
`@agentuity/api` as valid dependencies for the coder package, or refactor the
codebase to remove all imports of these packages from the affected files and
remove them from package.json dependencies.
In `@packages/coder/src/sessions.ts`:
- Line 2: The import statement for APIClient from `@agentuity/api` violates the
coder package's defined boundary policy which only allows imports from
`@agentuity/core`, `@agentuity/config`, `@agentuity/client`, `@agentuity/sandbox`, and
zod. Remove the import of APIClient from `@agentuity/api` on line 2 and either
refactor the code to use an equivalent type or utility from the allowed
dependencies (such as `@agentuity/client` if it exports the necessary
functionality), or if the architectural decision requires `@agentuity/api`, update
the package boundary policy in the coder package configuration to explicitly
allow this dependency. Check all 11+ files in the coder package that use this
pattern and apply the same resolution consistently across the codebase.
In `@packages/config/tsconfig.json`:
- Around line 1-9: The packages/config/ directory is missing the required
tsconfig.test.json file. Create a new tsconfig.test.json file in
packages/config/ that extends the same ../../tsconfig.base.json like the
existing tsconfig.json does, but override the include property to cover both src
and test directories (such as src/**/* and tests/**/* or appropriate test file
patterns used in your project) to allow proper TypeScript compilation for
testing scenarios while the main tsconfig.json continues to exclude tests.
In `@packages/db/src/util.ts`:
- Line 1: The import statement for StructuredError is currently pulling from
`@agentuity/adapter` but should be imported from `@agentuity/core` per the
TypeScript coding guideline. First, add `@agentuity/core` as a dependency in
packages/db/package.json. Then update the import statement at the top of the
file to change the source of the StructuredError import from `@agentuity/adapter`
to `@agentuity/core`.
In `@packages/keyvalue/package.json`:
- Around line 29-30: Remove the disallowed dependencies from the package.json
dependencies section by deleting the two lines declaring `@agentuity/client` and
`@agentuity/config`. Then update the imports in packages/keyvalue/src/index.ts
to import config utilities from `@agentuity/core` instead of
`@agentuity/config`, and remove the import of `@agentuity/client` from both
index.ts (line 17) and packages/keyvalue/src/service.ts, replacing them with
allowed dependencies or removing them if they are not actually used. Ensure the
package only declares dependencies on `@agentuity/adapter`, `@agentuity/core`,
and zod.
In `@PLAN.md`:
- Around line 67-74: The fenced code block containing the `@agentuity` package
list is missing a language tag, which triggers markdownlint rule MD040. Add
"text" as the language identifier immediately after the opening triple backticks
(before the newline that precedes the line starting with `@agentuity/adapter`).
This satisfies the markdown linting requirement that fenced code blocks must
have an explicit language tag.
---
Outside diff comments:
In `@packages/cli/src/cmd/coder/skill/delete.ts`:
- Around line 41-42: The code is directly checking options.json instead of using
the shared isJSONMode() helper function for JSON output branching. Replace the
condition `!options.json` with `!isJSONMode()` in the delete command handler at
lines 41-42 and also at lines 60-61 as mentioned in the comment. This ensures
consistent machine-readable output behavior across the CLI handlers as per the
coding guidelines.
In `@packages/sandbox/src/destroy.ts`:
- Line 31: The sandboxId variable on line 31 is being directly interpolated into
the URL path without encoding, which can cause routing issues when the ID
contains reserved characters. Wrap the sandboxId variable with
encodeURIComponent() before interpolating it into the template literal for the
url variable to ensure any special characters are properly encoded and do not
break the endpoint routing.
In `@packages/sandbox/src/resolve.ts`:
- Line 65: The sandboxId variable is used directly in the URL path template
`/cli/sandbox/${sandboxId}` without encoding, which can cause route resolution
issues if it contains reserved characters. Encode the sandboxId using
encodeURIComponent before interpolating it into the path string to ensure
special characters are properly escaped and the route resolves correctly.
In `@packages/sandbox/src/run.ts`:
- Around line 424-430: After the Promise.race on line 424 completes and returns
a result, the losing branch (either waitForExecutionCompletion or
waitForSandboxStatusCompletion) continues running in the background with its
polling/timers never cancelled. To fix this, create an AbortController for each
of the two promises being raced, pass the abort signal from each controller to
their respective functions, and after Promise.race returns, immediately abort
the controller corresponding to the losing branch so that any background polling
or timers are properly cleaned up and prevent async leakage. Apply the same fix
to the similar Promise.race pattern that also appears in the file (lines
469-517).
---
Nitpick comments:
In `@packages/coder/src/index.ts`:
- Line 1: The package entrypoint uses wildcard exports with `export *`
statements which violates the repository's convention requiring explicit named
exports in package index.ts files. Replace the wildcard exports (at the `export
* from './types.ts'` statement on line 1, the wildcard exports in lines 47-51,
and the wildcard export on line 88) with explicit named re-exports by
identifying what each module exports and converting them to named export syntax
like `export { ExportName1, ExportName2 } from './module'`.
In `@packages/config/src/config.ts`:
- Around line 61-67: The `region` parameter in the `buildRegionalURL` function
is marked as optional with the `?` modifier, but it is always required to
generate a valid URL and will produce malformed output if undefined. Remove the
optional markers (`?`) from both the `region` and `hostname` parameters in the
`buildRegionalURL` function signature to make them required parameters, since
they are always expected to be provided by the caller (getServiceUrls always
passes a resolved region).
In `@packages/email/src/index.ts`:
- Around line 1-2: Replace the wildcard exports (export * from './service.ts'
and export * from './types.ts') with explicit named exports to maintain control
over the public API surface. First, identify all the specific exports available
from service.ts and types.ts that should be part of the public API, then replace
the wildcard export statements with explicit named export statements that only
include those intended symbols. This ensures accidental exports are prevented
and the API surface remains intentional and controlled.
In `@packages/keyvalue/src/service.ts`:
- Line 1: The import statement for FetchAdapter should be separated from the
runtime value imports (buildUrl, toPayload, toServiceException). Create a
separate type-only import using import type syntax for FetchAdapter while
keeping the other functions in the regular import statement from
'`@agentuity/adapter`'. This makes it explicit that FetchAdapter is used only as a
type annotation and follows TypeScript best practices for type-only imports.
In `@packages/queue/src/index.ts`:
- Line 1: The wildcard export statement in the packages/queue/src/index.ts file
makes the public API surface implicit rather than explicit. Replace the `export
* from './service.ts'` statement with explicit named exports by identifying all
the exports available in service.ts and explicitly listing them in the export
statement, for example exporting only the named items that should be part of the
public API instead of re-exporting everything. This makes the package's public
surface clear and intentional.
🪄 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: 4a8cfc8e-8649-4f4f-813a-3be7ec4d49c5
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (299)
.gitignorePLAN.mdREADME.mddocs/package.jsondocs/scripts/api-reference/framework.tsdocs/scripts/api-reference/registry.tsdocs/scripts/generate-api-reference.tsdocs/src/api/schedules/route.tsdocs/src/lib/ai-gateway-stream.tsdocs/src/services/docs-sync/docs-processor.tsdocs/src/web/code-examples.tsdocs/src/web/content/AGENTS.mddocs/src/web/content/reference/api/ai-gateway.mdxdocs/src/web/content/reference/api/api-keys.mdxdocs/src/web/content/reference/api/coder.mdxdocs/src/web/content/reference/api/database.mdxdocs/src/web/content/reference/api/email.mdxdocs/src/web/content/reference/api/index.mdxdocs/src/web/content/reference/api/key-value.mdxdocs/src/web/content/reference/api/machines.mdxdocs/src/web/content/reference/api/oauth.mdxdocs/src/web/content/reference/api/object-storage.mdxdocs/src/web/content/reference/api/organizations.mdxdocs/src/web/content/reference/api/projects.mdxdocs/src/web/content/reference/api/queues.mdxdocs/src/web/content/reference/api/regions.mdxdocs/src/web/content/reference/api/sandboxes.mdxdocs/src/web/content/reference/api/schedules.mdxdocs/src/web/content/reference/api/sessions.mdxdocs/src/web/content/reference/api/streams.mdxdocs/src/web/content/reference/api/tasks.mdxdocs/src/web/content/reference/api/threads.mdxdocs/src/web/content/reference/api/user.mdxdocs/src/web/content/reference/api/vector.mdxdocs/src/web/content/reference/api/webhooks.mdxdocs/src/web/content/reference/api/workflows.mdxdocs/src/web/content/services/oidc-provider.mdxdocs/src/web/content/services/storage/custom.mdxdocs/src/web/content/services/storage/key-value.mdxknip.jsonpackages/adapter/package.jsonpackages/adapter/src/error.tspackages/adapter/src/exception.tspackages/adapter/src/fetch.tspackages/adapter/src/http-util.tspackages/adapter/src/index.tspackages/adapter/src/json.tspackages/adapter/src/logger.tspackages/adapter/tsconfig.jsonpackages/aigateway/package.jsonpackages/aigateway/src/api-reference.tspackages/aigateway/src/index.tspackages/aigateway/src/service.tspackages/aigateway/tsconfig.jsonpackages/api/README.mdpackages/api/package.jsonpackages/api/src/index.tspackages/api/tsconfig.jsonpackages/cli/package.jsonpackages/cli/src/cmd/cloud/aigateway/complete.tspackages/cli/src/cmd/cloud/aigateway/modalities.tspackages/cli/src/cmd/cloud/aigateway/model-cache.tspackages/cli/src/cmd/cloud/aigateway/util.tspackages/cli/src/cmd/cloud/db/get.tspackages/cli/src/cmd/cloud/db/logs.tspackages/cli/src/cmd/cloud/db/sql.tspackages/cli/src/cmd/cloud/email/send.tspackages/cli/src/cmd/cloud/email/util.tspackages/cli/src/cmd/cloud/keyvalue/repl.tspackages/cli/src/cmd/cloud/keyvalue/util.tspackages/cli/src/cmd/cloud/monitor.tspackages/cli/src/cmd/cloud/oidc/activity.tspackages/cli/src/cmd/cloud/oidc/create.tspackages/cli/src/cmd/cloud/oidc/delete.tspackages/cli/src/cmd/cloud/oidc/get.tspackages/cli/src/cmd/cloud/oidc/list.tspackages/cli/src/cmd/cloud/oidc/rotate-secret.tspackages/cli/src/cmd/cloud/oidc/users.tspackages/cli/src/cmd/cloud/oidc/util.tspackages/cli/src/cmd/cloud/region-lookup.tspackages/cli/src/cmd/cloud/sandbox/fs/cp.tspackages/cli/src/cmd/cloud/sandbox/snapshot/get.tspackages/cli/src/cmd/cloud/sandbox/util.tspackages/cli/src/cmd/cloud/schedule/util.tspackages/cli/src/cmd/cloud/stream/list.tspackages/cli/src/cmd/cloud/stream/util.tspackages/cli/src/cmd/cloud/task/attachment.tspackages/cli/src/cmd/cloud/task/close.tspackages/cli/src/cmd/cloud/task/create.tspackages/cli/src/cmd/cloud/task/delete.tspackages/cli/src/cmd/cloud/task/list.tspackages/cli/src/cmd/cloud/task/update.tspackages/cli/src/cmd/cloud/task/util.tspackages/cli/src/cmd/cloud/vector/upsert.tspackages/cli/src/cmd/cloud/vector/util.tspackages/cli/src/cmd/cloud/workflow/get.tspackages/cli/src/cmd/cloud/workflow/list.tspackages/cli/src/cmd/cloud/workflow/util.tspackages/cli/src/cmd/coder/archive.tspackages/cli/src/cmd/coder/create.tspackages/cli/src/cmd/coder/delete.tspackages/cli/src/cmd/coder/events.tspackages/cli/src/cmd/coder/get.tspackages/cli/src/cmd/coder/list.tspackages/cli/src/cmd/coder/loop.tspackages/cli/src/cmd/coder/participants.tspackages/cli/src/cmd/coder/replay.tspackages/cli/src/cmd/coder/resolve-repo.tspackages/cli/src/cmd/coder/skill/buckets.tspackages/cli/src/cmd/coder/skill/create.tspackages/cli/src/cmd/coder/skill/delete.tspackages/cli/src/cmd/coder/skill/list.tspackages/cli/src/cmd/coder/skill/save.tspackages/cli/src/cmd/coder/start.tspackages/cli/src/cmd/coder/update.tspackages/cli/src/cmd/coder/users.tspackages/cli/src/cmd/coder/workspace/common.tspackages/cli/src/cmd/coder/workspace/create.tspackages/cli/src/cmd/coder/workspace/delete.tspackages/cli/src/cmd/coder/workspace/get.tspackages/cli/src/cmd/coder/workspace/list.tspackages/cli/tsconfig.jsonpackages/client/package.jsonpackages/client/src/index.tspackages/client/src/logger.tspackages/client/src/pagination.tspackages/client/tsconfig.jsonpackages/coder/AGENTS.mdpackages/coder/package.jsonpackages/coder/src/agents.tspackages/coder/src/api-reference.tspackages/coder/src/client.tspackages/coder/src/close-codes.tspackages/coder/src/discover.tspackages/coder/src/github.tspackages/coder/src/index.tspackages/coder/src/loop-state.tspackages/coder/src/protocol.tspackages/coder/src/session-data.tspackages/coder/src/sessions.tspackages/coder/src/skills.tspackages/coder/src/sse.tspackages/coder/src/types.tspackages/coder/src/users.tspackages/coder/src/util.tspackages/coder/src/websocket.tspackages/coder/src/workspaces.tspackages/coder/tsconfig.jsonpackages/config/package.jsonpackages/config/src/config.tspackages/config/src/env.tspackages/config/src/index.tspackages/config/tsconfig.jsonpackages/core/README.mdpackages/core/package.jsonpackages/core/src/error.tspackages/core/src/json.tspackages/core/src/logger.tspackages/core/src/services/aigateway/index.tspackages/core/src/services/api.tspackages/core/src/services/coder/index.tspackages/core/src/services/config.tspackages/core/src/services/db/index.tspackages/core/src/services/email/index.tspackages/core/src/services/env.tspackages/core/src/services/index.tspackages/core/src/services/keyvalue/index.tspackages/core/src/services/org/env-delete.tspackages/core/src/services/org/env-get.tspackages/core/src/services/org/env-update.tspackages/core/src/services/project/get.tspackages/core/src/services/project/list.tspackages/core/src/services/project/malware.tspackages/core/src/services/region/create.tspackages/core/src/services/sandbox/index.tspackages/core/src/services/schedule/index.tspackages/core/src/services/task/index.tspackages/core/src/services/user/whoami.tspackages/core/src/services/vector/index.tspackages/core/test/aigateway.test.tspackages/core/test/coder-client.test.tspackages/core/test/coder-sse.test.tspackages/core/test/coder-websocket.test.tspackages/core/test/keyvalue.test.tspackages/core/test/queue.test.tspackages/core/test/stream.test.tspackages/core/test/vector.test.tspackages/core/tsconfig.jsonpackages/core/tsconfig.test.jsonpackages/db/AGENTS.mdpackages/db/package.jsonpackages/db/src/api-reference.tspackages/db/src/index.tspackages/db/src/logs.tspackages/db/src/query.tspackages/db/src/stats.tspackages/db/src/tables.tspackages/db/src/types.tspackages/db/src/util.tspackages/db/tsconfig.jsonpackages/email/AGENTS.mdpackages/email/package.jsonpackages/email/src/api-reference.tspackages/email/src/index.tspackages/email/src/service.tspackages/email/src/types.tspackages/email/tsconfig.jsonpackages/keyvalue/AGENTS.mdpackages/keyvalue/package.jsonpackages/keyvalue/src/api-reference.tspackages/keyvalue/src/index.tspackages/keyvalue/src/service.tspackages/keyvalue/src/types.tspackages/keyvalue/tsconfig.jsonpackages/local/src/bun/db.tspackages/local/src/bun/email.tspackages/local/src/bun/index.tspackages/local/src/bun/kv.tspackages/local/src/bun/queue.tspackages/local/src/bun/stream.tspackages/local/src/bun/task.tspackages/local/src/bun/util.tspackages/local/src/bun/vector.tspackages/local/src/index.tspackages/local/src/runtime.tspackages/opencode/src/plugin/hooks/compaction-utils.tspackages/pi/src/index.tspackages/queue/AGENTS.mdpackages/queue/package.jsonpackages/queue/src/index.tspackages/queue/src/service.tspackages/queue/tsconfig.jsonpackages/sandbox/AGENTS.mdpackages/sandbox/package.jsonpackages/sandbox/src/api-reference.tspackages/sandbox/src/base64.tspackages/sandbox/src/client.tspackages/sandbox/src/create.tspackages/sandbox/src/destroy.tspackages/sandbox/src/disk-checkpoint.tspackages/sandbox/src/events.tspackages/sandbox/src/execute.tspackages/sandbox/src/execution.tspackages/sandbox/src/files.tspackages/sandbox/src/get.tspackages/sandbox/src/getStatus.tspackages/sandbox/src/index.tspackages/sandbox/src/job.tspackages/sandbox/src/list.tspackages/sandbox/src/pause.tspackages/sandbox/src/resolve.tspackages/sandbox/src/resume.tspackages/sandbox/src/run.tspackages/sandbox/src/runtime.tspackages/sandbox/src/snapshot-build.tspackages/sandbox/src/snapshot.tspackages/sandbox/src/types.tspackages/sandbox/src/util.tspackages/sandbox/tsconfig.jsonpackages/schedule/AGENTS.mdpackages/schedule/package.jsonpackages/schedule/src/api-reference.tspackages/schedule/src/index.tspackages/schedule/src/service.tspackages/schedule/src/types.tspackages/schedule/tsconfig.jsonpackages/server/AGENTS.mdpackages/server/package.jsonpackages/server/src/api-reference/apikey.tspackages/server/src/api-reference/machine.tspackages/server/src/api-reference/oauth.tspackages/server/src/api-reference/org.tspackages/server/src/api-reference/project.tspackages/server/src/api-reference/queue.tspackages/server/src/api-reference/region.tspackages/server/src/api-reference/session.tspackages/server/src/api-reference/storage.tspackages/server/src/api-reference/stream.tspackages/server/src/api-reference/thread.tspackages/server/src/api-reference/user.tspackages/server/src/api-reference/webhook.tspackages/server/src/api-reference/workflow.tspackages/server/src/api/api.tspackages/server/src/api/apikey/create.tspackages/server/src/api/apikey/delete.tspackages/server/src/api/apikey/get.tspackages/server/src/api/apikey/index.tspackages/server/src/api/apikey/list.tspackages/server/src/api/apikey/util.tspackages/server/src/api/index.tspackages/server/src/api/machine/index.tspackages/server/src/api/machine/machine.tspackages/server/src/api/machine/types.tspackages/server/src/api/machine/util.tspackages/server/src/api/monitoring/index.tspackages/server/src/api/monitoring/service.tspackages/server/src/api/monitoring/types.tspackages/server/src/api/oauth/activity.tspackages/server/src/api/oauth/clients.ts
💤 Files with no reviewable changes (32)
- README.md
- packages/core/src/services/schedule/index.ts
- packages/local/src/bun/db.ts
- packages/local/src/bun/email.ts
- packages/core/src/services/task/index.ts
- packages/core/src/services/project/list.ts
- packages/local/src/bun/stream.ts
- packages/core/src/services/org/env-delete.ts
- packages/core/src/services/db/index.ts
- packages/core/src/services/org/env-get.ts
- packages/core/src/services/user/whoami.ts
- packages/local/src/bun/vector.ts
- packages/local/src/index.ts
- packages/core/src/services/org/env-update.ts
- packages/core/src/services/index.ts
- packages/local/src/runtime.ts
- packages/core/src/services/email/index.ts
- packages/local/src/bun/index.ts
- packages/local/src/bun/kv.ts
- packages/core/src/services/keyvalue/index.ts
- packages/local/src/bun/task.ts
- packages/core/src/services/project/get.ts
- packages/core/src/services/region/create.ts
- packages/local/src/bun/queue.ts
- packages/core/src/services/vector/index.ts
- packages/server/src/api/apikey/index.ts
- packages/core/src/services/coder/index.ts
- docs/scripts/api-reference/framework.ts
- packages/local/src/bun/util.ts
- packages/core/src/services/project/malware.ts
- packages/core/src/services/sandbox/index.ts
- packages/core/src/services/aigateway/index.ts
There was a problem hiding this comment.
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 `@install.sh`:
- Line 342: The install_root variable assignment at line 342 uses a simple
default expansion that references $BUN_INSTALL directly, which causes unbound
variable errors when set -u is enabled and BUN_INSTALL is unset. Fix this by
using nested default expansion syntax similar to what is used on line 15,
wrapping the BUN_INSTALL reference with its own default expansion fallback
(e.g., ${BUN_INSTALL:-/default/path}). This ensures that if BUN_INSTALL is
unset, the inner expansion provides a safe fallback before attempting to use it,
preventing the pipeline failure.
🪄 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: ddafd976-0086-4fb4-bfc0-404b8f49c48d
📒 Files selected for processing (1)
install.sh
📜 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). (2)
- GitHub Check: Windows WSL CLI Smoke Test
- GitHub Check: Agentuity Deployment
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:27.127Z
Learning: Every new documentation page requires three things: MDX content file in `src/web/content/`, route file in `src/web/routes/_docs/`, and meta.json entry in the same content directory
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:27.127Z
Learning: When writing service documentation, verify the package that owns the feature being documented. Do not use a neighboring helper package as proof that another service works
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:27.127Z
Learning: Relational database helpers belong in database-specific, migration, or reference pages. They should not be the default state example for unrelated services
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:27.127Z
Learning: Agentuity is infrastructure for deploying apps, APIs, static sites, backend work, and agents. Start from the thing the reader is building: a framework app, backend API, static site, background job, or model-backed agent
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:27.127Z
Learning: Treat existing app tools and Agentuity-native services as complementary in documentation. Readers can keep their framework logger, OpenTelemetry collector, database client or ORM, provider SDKs, and framework conventions
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:27.127Z
Learning: In documentation, an agent is model-backed app code with a clear task. It can live in a route, server function, queue consumer, schedule target, script, or shared module
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:27.127Z
Learning: When a documentation page is not about migration, explain the current app shape directly. Do not frame normal docs as a v2-to-v3 comparison
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:27.127Z
Learning: SDK Explorer explanations should answer the question the demo raises at that moment: what the concept is, when to use it, what to notice in the live demo or code, and where to go next. Do not assume the reader already knows routes, services, streaming, or agents
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:27.127Z
Learning: Use one clear server shape in SDK Explorer examples. Hono is the default because route and service boundaries are visible. Mention a few transferable framework shapes only when useful (Next.js route handlers, SvelteKit `+server.ts`, TanStack Start server routes), then link to Frameworks docs
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:27.127Z
Learning: Keep feature documentation provider-agnostic where possible. Use current model names in code examples; verify they are up to date before publishing
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:27.127Z
Learning: The sidebar navigation is auto-generated at build time by `scripts/generate-nav-data.ts`. Page ordering within each section is controlled by the `meta.json` file. When adding a new page, add its slug to the `pages` array in the relevant `meta.json`
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:27.127Z
Learning: Run `bun run scripts/validate-routes.ts` during prebuild to auto-generate missing route files for new documentation pages
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:33.822Z
Learning: Clean build artifacts using `rm -rf dist`
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:33.822Z
Learning: Publish this package only after publishing agentuity/adapter, agentuity/api, agentuity/client, agentuity/config, and agentuity/sandbox
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:39.285Z
Learning: Clean build artifacts with `rm -rf dist`
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:39.285Z
Learning: Publish agentuity/db after agentuity/adapter, agentuity/api, agentuity/client, and agentuity/config have been published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:44.930Z
Learning: Build the package using `bun run build` command
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:44.930Z
Learning: Run `bun run typecheck` to verify TypeScript type correctness
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:44.930Z
Learning: Maintain Node.js and Bun runtime compatibility
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:44.930Z
Learning: Only depend on agentuity/adapter, agentuity/client, agentuity/config, and zod; do not add agentuity/core as a dependency
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:44.930Z
Learning: Publish the package only after agentuity/adapter, agentuity/client, and agentuity/config have been published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:50.065Z
Learning: Dependencies must be limited to agentuity/adapter, agentuity/core (env/config/pagination only), and zod
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:50.065Z
Learning: Package must be published after agentuity/core
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:54.423Z
Learning: Clean build artifacts with `rm -rf dist`
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:54.423Z
Learning: Publish the package only after agentuity/core has been published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:59.510Z
Learning: Build the package using `bun run build`
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:59.510Z
Learning: Run `bun run typecheck` to verify TypeScript types
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:59.510Z
Learning: Clean build artifacts using `rm -rf dist`
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:59.510Z
Learning: Export SandboxClient and sandbox types/API from agentuity/sandbox package; keep cli-list in agentuity/server core
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:33:59.510Z
Learning: Publish this package after agentuity/adapter, agentuity/api, agentuity/client, and agentuity/config have been published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:34:05.337Z
Learning: Build the agentuity/schedule package using `bun run build` command
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:34:05.337Z
Learning: Typecheck the agentuity/schedule package using `bun run typecheck` command
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:34:05.337Z
Learning: Maintain compatibility with both Node.js and Bun runtimes
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:34:05.337Z
Learning: Publish agentuity/schedule package only after agentuity/core has been published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:34:12.578Z
Learning: Ensure compatibility with both Node.js and Bun runtimes
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:34:12.578Z
Learning: These utilities are consumed primarily by agentuity/cli and are not intended for use in deployed user code
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T03:34:12.578Z
Learning: Publish agentuity/server after agentuity/core has been published
🪛 GitHub Actions: Test Install Script / 4_Linux distro install smoke.txt
install.sh
[error] 342-342: Installing Agentuity CLI failed. ./install.sh:342: BUN_INSTALL parameter not set (caused process to exit with code 1).
🪛 GitHub Actions: Test Install Script / 5_Native install (Linux).txt
install.sh
[error] 342-342: Command ' ./install.sh -y ' failed. /bin/sh reported: "BUN_INSTALL: parameter not set".
[error] 1-1: CI step failed with exit code 2.
🪛 GitHub Actions: Test Install Script / Linux distro install smoke
install.sh
[error] 342-342: Install failed while installing Bun/Agentuity CLI: ./install.sh: 342: BUN_INSTALL: parameter not set
🪛 GitHub Actions: Test Install Script / Native install (Linux)
install.sh
[error] 342-342: Install step failed: BUN_INSTALL parameter not set. Command: ./install.sh -y
🔇 Additional comments (2)
install.sh (2)
339-341: LGTM!Also applies to: 343-406
408-463: LGTM!
44c7c31 to
291240f
Compare
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 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 `@docs/scripts/generate-api-reference.ts`:
- Around line 211-216: The generated JSX attributes in the CardLink component
are interpolating entry.routeTitle and entry.service.description directly
without escaping special characters. If these values contain double quotes or
newlines, they will break the generated MDX/TSX output. Escape both
entry.routeTitle and entry.service.description before inserting them into the
title and description attributes by replacing double quotes with escaped quotes
and handling newlines appropriately, so that any problematic characters in the
registry text are safely encoded in the output string.
In `@install.sh`:
- Around line 345-380: The bun command that generates the package.json file from
the manifest (starting with INSTALL_DIR and TARBALL_DIR environment variables
and the bun -e inline script) does not check its exit status before proceeding
to run bun install. Add an error check immediately after the closing quote of
the bun -e command to capture and verify the result, and exit the script if the
manifest generation fails. This prevents the script from attempting to install
packages when the package.json has not been properly created.
In `@packages/adapter/src/http-util.ts`:
- Around line 195-204: The condition on line 195 that checks `!contentType ||
contentType.includes('json')` incorrectly treats missing or undefined
content-type headers as JSON. This causes JSON.parse() on line 203 to fail when
responses have no content-type header or are plain text. Fix this by changing
the condition to only return true when contentType is both present AND
explicitly includes 'json', removing the `!contentType ||` part of the condition
so that only responses with explicit JSON content-type headers are parsed as
JSON.
- Around line 143-189: The toPayload function's switch statement does not handle
bigint and symbol types, causing them to silently fall through and return an
empty string payload instead of signaling an error. Add explicit case statements
for 'bigint' and 'symbol' types in the switch statement (after the 'object'
case) that throw an informative error, or add a default case that throws an
error for any unsupported types encountered. This ensures that attempting to
send unsupported primitive types will fail loudly rather than silently sending
an incorrect empty payload.
In `@packages/sandbox/src/types.ts`:
- Line 2: Update the import statement for StructuredError in the types.ts file
to import from `@agentuity/core` instead of `@agentuity/adapter`. Change the import
source package name while keeping the imported symbol name (StructuredError) the
same.
🪄 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: 3c25f051-8207-4636-b800-1bc90ce0c4ae
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (299)
.gitignorePLAN.mdREADME.mddocs/package.jsondocs/scripts/api-reference/framework.tsdocs/scripts/api-reference/registry.tsdocs/scripts/generate-api-reference.tsdocs/src/api/schedules/route.tsdocs/src/lib/ai-gateway-stream.tsdocs/src/services/docs-sync/docs-processor.tsdocs/src/web/code-examples.tsdocs/src/web/content/AGENTS.mddocs/src/web/content/reference/api/ai-gateway.mdxdocs/src/web/content/reference/api/api-keys.mdxdocs/src/web/content/reference/api/coder.mdxdocs/src/web/content/reference/api/database.mdxdocs/src/web/content/reference/api/email.mdxdocs/src/web/content/reference/api/index.mdxdocs/src/web/content/reference/api/key-value.mdxdocs/src/web/content/reference/api/machines.mdxdocs/src/web/content/reference/api/oauth.mdxdocs/src/web/content/reference/api/object-storage.mdxdocs/src/web/content/reference/api/organizations.mdxdocs/src/web/content/reference/api/projects.mdxdocs/src/web/content/reference/api/queues.mdxdocs/src/web/content/reference/api/regions.mdxdocs/src/web/content/reference/api/sandboxes.mdxdocs/src/web/content/reference/api/schedules.mdxdocs/src/web/content/reference/api/sessions.mdxdocs/src/web/content/reference/api/streams.mdxdocs/src/web/content/reference/api/tasks.mdxdocs/src/web/content/reference/api/threads.mdxdocs/src/web/content/reference/api/user.mdxdocs/src/web/content/reference/api/vector.mdxdocs/src/web/content/reference/api/webhooks.mdxdocs/src/web/content/reference/api/workflows.mdxdocs/src/web/content/services/oidc-provider.mdxdocs/src/web/content/services/storage/custom.mdxdocs/src/web/content/services/storage/key-value.mdxinstall.shknip.jsonpackages/adapter/package.jsonpackages/adapter/src/error.tspackages/adapter/src/exception.tspackages/adapter/src/fetch.tspackages/adapter/src/http-util.tspackages/adapter/src/index.tspackages/adapter/src/json.tspackages/adapter/src/logger.tspackages/adapter/tsconfig.jsonpackages/aigateway/package.jsonpackages/aigateway/src/api-reference.tspackages/aigateway/src/index.tspackages/aigateway/src/service.tspackages/aigateway/tsconfig.jsonpackages/api/README.mdpackages/api/package.jsonpackages/api/src/index.tspackages/api/tsconfig.jsonpackages/cli/package.jsonpackages/cli/src/cmd/cloud/aigateway/complete.tspackages/cli/src/cmd/cloud/aigateway/modalities.tspackages/cli/src/cmd/cloud/aigateway/model-cache.tspackages/cli/src/cmd/cloud/aigateway/util.tspackages/cli/src/cmd/cloud/db/get.tspackages/cli/src/cmd/cloud/db/logs.tspackages/cli/src/cmd/cloud/db/sql.tspackages/cli/src/cmd/cloud/email/send.tspackages/cli/src/cmd/cloud/email/util.tspackages/cli/src/cmd/cloud/keyvalue/repl.tspackages/cli/src/cmd/cloud/keyvalue/util.tspackages/cli/src/cmd/cloud/monitor.tspackages/cli/src/cmd/cloud/oidc/activity.tspackages/cli/src/cmd/cloud/oidc/create.tspackages/cli/src/cmd/cloud/oidc/delete.tspackages/cli/src/cmd/cloud/oidc/get.tspackages/cli/src/cmd/cloud/oidc/list.tspackages/cli/src/cmd/cloud/oidc/rotate-secret.tspackages/cli/src/cmd/cloud/oidc/users.tspackages/cli/src/cmd/cloud/oidc/util.tspackages/cli/src/cmd/cloud/region-lookup.tspackages/cli/src/cmd/cloud/sandbox/fs/cp.tspackages/cli/src/cmd/cloud/sandbox/snapshot/get.tspackages/cli/src/cmd/cloud/sandbox/util.tspackages/cli/src/cmd/cloud/schedule/util.tspackages/cli/src/cmd/cloud/stream/list.tspackages/cli/src/cmd/cloud/stream/util.tspackages/cli/src/cmd/cloud/task/attachment.tspackages/cli/src/cmd/cloud/task/close.tspackages/cli/src/cmd/cloud/task/create.tspackages/cli/src/cmd/cloud/task/delete.tspackages/cli/src/cmd/cloud/task/list.tspackages/cli/src/cmd/cloud/task/update.tspackages/cli/src/cmd/cloud/task/util.tspackages/cli/src/cmd/cloud/vector/upsert.tspackages/cli/src/cmd/cloud/vector/util.tspackages/cli/src/cmd/cloud/workflow/get.tspackages/cli/src/cmd/cloud/workflow/list.tspackages/cli/src/cmd/cloud/workflow/util.tspackages/cli/src/cmd/coder/archive.tspackages/cli/src/cmd/coder/create.tspackages/cli/src/cmd/coder/delete.tspackages/cli/src/cmd/coder/events.tspackages/cli/src/cmd/coder/get.tspackages/cli/src/cmd/coder/list.tspackages/cli/src/cmd/coder/loop.tspackages/cli/src/cmd/coder/participants.tspackages/cli/src/cmd/coder/replay.tspackages/cli/src/cmd/coder/resolve-repo.tspackages/cli/src/cmd/coder/skill/buckets.tspackages/cli/src/cmd/coder/skill/create.tspackages/cli/src/cmd/coder/skill/delete.tspackages/cli/src/cmd/coder/skill/list.tspackages/cli/src/cmd/coder/skill/save.tspackages/cli/src/cmd/coder/start.tspackages/cli/src/cmd/coder/update.tspackages/cli/src/cmd/coder/users.tspackages/cli/src/cmd/coder/workspace/common.tspackages/cli/src/cmd/coder/workspace/create.tspackages/cli/src/cmd/coder/workspace/delete.tspackages/cli/src/cmd/coder/workspace/get.tspackages/cli/src/cmd/coder/workspace/list.tspackages/cli/tsconfig.jsonpackages/client/package.jsonpackages/client/src/index.tspackages/client/src/logger.tspackages/client/src/pagination.tspackages/client/tsconfig.jsonpackages/coder/AGENTS.mdpackages/coder/package.jsonpackages/coder/src/agents.tspackages/coder/src/api-reference.tspackages/coder/src/client.tspackages/coder/src/close-codes.tspackages/coder/src/discover.tspackages/coder/src/github.tspackages/coder/src/index.tspackages/coder/src/loop-state.tspackages/coder/src/protocol.tspackages/coder/src/session-data.tspackages/coder/src/sessions.tspackages/coder/src/skills.tspackages/coder/src/sse.tspackages/coder/src/types.tspackages/coder/src/users.tspackages/coder/src/util.tspackages/coder/src/websocket.tspackages/coder/src/workspaces.tspackages/coder/tsconfig.jsonpackages/config/package.jsonpackages/config/src/config.tspackages/config/src/env.tspackages/config/src/index.tspackages/config/tsconfig.jsonpackages/config/tsconfig.test.jsonpackages/core/README.mdpackages/core/package.jsonpackages/core/src/error.tspackages/core/src/json.tspackages/core/src/logger.tspackages/core/src/services/aigateway/index.tspackages/core/src/services/api.tspackages/core/src/services/coder/index.tspackages/core/src/services/config.tspackages/core/src/services/db/index.tspackages/core/src/services/email/index.tspackages/core/src/services/env.tspackages/core/src/services/index.tspackages/core/src/services/keyvalue/index.tspackages/core/src/services/org/env-delete.tspackages/core/src/services/org/env-get.tspackages/core/src/services/org/env-update.tspackages/core/src/services/project/get.tspackages/core/src/services/project/list.tspackages/core/src/services/project/malware.tspackages/core/src/services/region/create.tspackages/core/src/services/sandbox/index.tspackages/core/src/services/schedule/index.tspackages/core/src/services/task/index.tspackages/core/src/services/user/whoami.tspackages/core/src/services/vector/index.tspackages/core/test/aigateway.test.tspackages/core/test/coder-client.test.tspackages/core/test/coder-sse.test.tspackages/core/test/coder-websocket.test.tspackages/core/test/keyvalue.test.tspackages/core/test/queue.test.tspackages/core/test/stream.test.tspackages/core/test/vector.test.tspackages/core/tsconfig.jsonpackages/core/tsconfig.test.jsonpackages/db/AGENTS.mdpackages/db/package.jsonpackages/db/src/api-reference.tspackages/db/src/index.tspackages/db/src/logs.tspackages/db/src/query.tspackages/db/src/stats.tspackages/db/src/tables.tspackages/db/src/types.tspackages/db/src/util.tspackages/db/tsconfig.jsonpackages/email/AGENTS.mdpackages/email/package.jsonpackages/email/src/api-reference.tspackages/email/src/index.tspackages/email/src/service.tspackages/email/src/types.tspackages/email/tsconfig.jsonpackages/keyvalue/AGENTS.mdpackages/keyvalue/package.jsonpackages/keyvalue/src/api-reference.tspackages/keyvalue/src/index.tspackages/keyvalue/src/service.tspackages/keyvalue/src/types.tspackages/keyvalue/tsconfig.jsonpackages/local/src/bun/db.tspackages/local/src/bun/email.tspackages/local/src/bun/index.tspackages/local/src/bun/kv.tspackages/local/src/bun/queue.tspackages/local/src/bun/stream.tspackages/local/src/bun/task.tspackages/local/src/bun/util.tspackages/local/src/bun/vector.tspackages/local/src/index.tspackages/local/src/runtime.tspackages/opencode/src/plugin/hooks/compaction-utils.tspackages/pi/src/index.tspackages/queue/AGENTS.mdpackages/queue/package.jsonpackages/queue/src/index.tspackages/queue/src/service.tspackages/queue/tsconfig.jsonpackages/sandbox/AGENTS.mdpackages/sandbox/package.jsonpackages/sandbox/src/api-reference.tspackages/sandbox/src/base64.tspackages/sandbox/src/client.tspackages/sandbox/src/create.tspackages/sandbox/src/destroy.tspackages/sandbox/src/disk-checkpoint.tspackages/sandbox/src/events.tspackages/sandbox/src/execute.tspackages/sandbox/src/execution.tspackages/sandbox/src/files.tspackages/sandbox/src/get.tspackages/sandbox/src/getStatus.tspackages/sandbox/src/index.tspackages/sandbox/src/job.tspackages/sandbox/src/list.tspackages/sandbox/src/pause.tspackages/sandbox/src/resolve.tspackages/sandbox/src/resume.tspackages/sandbox/src/run.tspackages/sandbox/src/runtime.tspackages/sandbox/src/snapshot-build.tspackages/sandbox/src/snapshot.tspackages/sandbox/src/types.tspackages/sandbox/src/util.tspackages/sandbox/tsconfig.jsonpackages/schedule/AGENTS.mdpackages/schedule/package.jsonpackages/schedule/src/api-reference.tspackages/schedule/src/index.tspackages/schedule/src/service.tspackages/schedule/src/types.tspackages/schedule/tsconfig.jsonpackages/server/AGENTS.mdpackages/server/package.jsonpackages/server/src/api-reference/apikey.tspackages/server/src/api-reference/machine.tspackages/server/src/api-reference/oauth.tspackages/server/src/api-reference/org.tspackages/server/src/api-reference/project.tspackages/server/src/api-reference/queue.tspackages/server/src/api-reference/region.tspackages/server/src/api-reference/session.tspackages/server/src/api-reference/storage.tspackages/server/src/api-reference/stream.tspackages/server/src/api-reference/thread.tspackages/server/src/api-reference/user.tspackages/server/src/api-reference/webhook.tspackages/server/src/api-reference/workflow.tspackages/server/src/api/api.tspackages/server/src/api/apikey/create.tspackages/server/src/api/apikey/delete.tspackages/server/src/api/apikey/get.tspackages/server/src/api/apikey/index.tspackages/server/src/api/apikey/list.tspackages/server/src/api/apikey/util.tspackages/server/src/api/index.tspackages/server/src/api/machine/index.tspackages/server/src/api/machine/machine.tspackages/server/src/api/machine/types.tspackages/server/src/api/machine/util.tspackages/server/src/api/monitoring/index.tspackages/server/src/api/monitoring/service.tspackages/server/src/api/monitoring/types.ts
💤 Files with no reviewable changes (32)
- packages/server/src/api/apikey/index.ts
- packages/core/src/services/vector/index.ts
- packages/local/src/bun/queue.ts
- packages/core/src/services/index.ts
- docs/scripts/api-reference/framework.ts
- packages/core/src/services/task/index.ts
- packages/core/src/services/org/env-get.ts
- packages/local/src/bun/kv.ts
- packages/local/src/bun/db.ts
- packages/core/src/services/project/malware.ts
- packages/core/src/services/project/get.ts
- packages/core/src/services/user/whoami.ts
- packages/local/src/bun/index.ts
- packages/local/src/bun/util.ts
- packages/core/src/services/email/index.ts
- README.md
- packages/core/src/services/sandbox/index.ts
- packages/local/src/runtime.ts
- packages/core/src/services/coder/index.ts
- packages/core/src/services/org/env-update.ts
- packages/core/src/services/org/env-delete.ts
- packages/core/src/services/db/index.ts
- packages/core/src/services/region/create.ts
- packages/local/src/bun/email.ts
- packages/local/src/bun/task.ts
- packages/core/src/services/aigateway/index.ts
- packages/local/src/bun/vector.ts
- packages/local/src/index.ts
- packages/core/src/services/project/list.ts
- packages/local/src/bun/stream.ts
- packages/core/src/services/keyvalue/index.ts
- packages/core/src/services/schedule/index.ts
✅ Files skipped from review due to trivial changes (118)
- packages/cli/src/cmd/cloud/email/send.ts
- packages/cli/src/cmd/cloud/aigateway/complete.ts
- packages/adapter/package.json
- packages/cli/src/cmd/cloud/oidc/get.ts
- packages/cli/src/cmd/cloud/sandbox/snapshot/get.ts
- packages/cli/src/cmd/cloud/task/close.ts
- packages/email/AGENTS.md
- docs/src/web/content/reference/api/schedules.mdx
- docs/src/web/content/reference/api/user.mdx
- packages/cli/src/cmd/coder/workspace/get.ts
- docs/src/web/content/reference/api/webhooks.mdx
- docs/src/web/content/reference/api/vector.mdx
- packages/cli/src/cmd/cloud/aigateway/model-cache.ts
- .gitignore
- docs/src/web/content/reference/api/sessions.mdx
- packages/cli/src/cmd/coder/replay.ts
- packages/cli/src/cmd/coder/create.ts
- packages/cli/src/cmd/coder/list.ts
- packages/coder/src/workspaces.ts
- docs/src/web/content/reference/api/email.mdx
- packages/db/src/query.ts
- docs/src/web/content/reference/api/object-storage.mdx
- docs/src/web/content/AGENTS.md
- docs/src/web/content/reference/api/machines.mdx
- packages/coder/src/loop-state.ts
- packages/sandbox/src/execution.ts
- packages/cli/src/cmd/cloud/vector/upsert.ts
- packages/sandbox/src/resume.ts
- packages/cli/src/cmd/cloud/region-lookup.ts
- packages/cli/src/cmd/cloud/monitor.ts
- packages/core/tsconfig.test.json
- docs/src/web/content/reference/api/database.mdx
- packages/sandbox/src/destroy.ts
- packages/cli/src/cmd/coder/participants.ts
- docs/src/web/content/reference/api/index.mdx
- packages/server/src/api/apikey/create.ts
- packages/coder/src/discover.ts
- packages/coder/src/protocol.ts
- packages/sandbox/src/disk-checkpoint.ts
- docs/src/web/content/reference/api/threads.mdx
- packages/api/README.md
- packages/cli/src/cmd/coder/skill/list.ts
- packages/server/src/api/apikey/delete.ts
- docs/src/web/content/reference/api/api-keys.mdx
- packages/cli/src/cmd/coder/skill/save.ts
- packages/cli/src/cmd/cloud/sandbox/util.ts
- packages/coder/src/close-codes.ts
- docs/src/web/content/reference/api/tasks.mdx
- docs/src/web/content/reference/api/oauth.mdx
- packages/cli/src/cmd/cloud/task/list.ts
- packages/keyvalue/AGENTS.md
- packages/cli/src/cmd/cloud/task/util.ts
- packages/cli/src/cmd/cloud/task/update.ts
- packages/cli/src/cmd/cloud/aigateway/modalities.ts
- docs/src/web/content/reference/api/workflows.mdx
- docs/src/web/content/reference/api/key-value.mdx
- packages/cli/src/cmd/cloud/task/delete.ts
- packages/cli/src/cmd/cloud/aigateway/util.ts
- packages/server/src/api/machine/machine.ts
- docs/src/services/docs-sync/docs-processor.ts
- packages/pi/src/index.ts
- packages/sandbox/AGENTS.md
- packages/sandbox/src/execute.ts
- packages/cli/src/cmd/cloud/task/attachment.ts
- packages/cli/src/cmd/cloud/stream/list.ts
- packages/core/test/coder-websocket.test.ts
- docs/src/web/content/services/storage/key-value.mdx
- packages/coder/src/util.ts
- packages/cli/src/cmd/cloud/stream/util.ts
- docs/src/web/content/reference/api/regions.mdx
- packages/adapter/tsconfig.json
- packages/keyvalue/tsconfig.json
- docs/src/web/content/reference/api/ai-gateway.mdx
- packages/email/tsconfig.json
- packages/server/src/api/monitoring/service.ts
- packages/coder/src/session-data.ts
- packages/queue/tsconfig.json
- docs/src/web/content/reference/api/streams.mdx
- packages/aigateway/src/service.ts
- packages/coder/src/sessions.ts
- packages/db/AGENTS.md
- packages/cli/src/cmd/coder/workspace/common.ts
- docs/src/web/content/reference/api/coder.mdx
- docs/src/web/content/services/storage/custom.mdx
- packages/server/src/api/apikey/util.ts
- packages/cli/src/cmd/coder/delete.ts
- packages/db/src/stats.ts
- docs/src/web/content/reference/api/queues.mdx
- packages/sandbox/src/events.ts
- packages/cli/src/cmd/cloud/oidc/delete.ts
- packages/server/AGENTS.md
- packages/coder/src/websocket.ts
- packages/core/test/keyvalue.test.ts
- packages/coder/AGENTS.md
- packages/cli/src/cmd/cloud/oidc/util.ts
- packages/coder/src/users.ts
- packages/server/src/api/apikey/list.ts
- packages/queue/AGENTS.md
- docs/src/web/content/reference/api/organizations.mdx
- packages/cli/src/cmd/coder/skill/delete.ts
- packages/schedule/AGENTS.md
- packages/cli/src/cmd/cloud/db/logs.ts
- packages/cli/src/cmd/coder/update.ts
- packages/schedule/src/service.ts
- packages/email/src/service.ts
- packages/core/test/aigateway.test.ts
- packages/cli/src/cmd/coder/events.ts
- packages/core/test/coder-client.test.ts
- docs/src/web/content/services/oidc-provider.mdx
- docs/src/web/content/reference/api/projects.mdx
- packages/core/test/queue.test.ts
- packages/coder/src/agents.ts
- docs/src/lib/ai-gateway-stream.ts
- packages/coder/src/skills.ts
- packages/sandbox/src/create.ts
- packages/cli/src/cmd/coder/resolve-repo.ts
- packages/core/README.md
- packages/email/src/api-reference.ts
🚧 Files skipped from review as they are similar to previous changes (129)
- packages/cli/src/cmd/cloud/sandbox/fs/cp.ts
- packages/cli/src/cmd/coder/start.ts
- packages/db/src/logs.ts
- packages/sandbox/src/job.ts
- packages/cli/src/cmd/cloud/oidc/rotate-secret.ts
- packages/client/src/logger.ts
- packages/aigateway/package.json
- packages/server/src/api/apikey/get.ts
- packages/sandbox/src/list.ts
- packages/db/src/util.ts
- packages/cli/src/cmd/coder/get.ts
- packages/cli/tsconfig.json
- packages/cli/src/cmd/cloud/db/sql.ts
- packages/server/src/api-reference/storage.ts
- packages/db/tsconfig.json
- packages/server/src/api/machine/index.ts
- packages/cli/src/cmd/cloud/oidc/users.ts
- packages/core/tsconfig.json
- packages/adapter/src/logger.ts
- packages/cli/src/cmd/cloud/schedule/util.ts
- packages/adapter/src/json.ts
- packages/cli/src/cmd/coder/skill/buckets.ts
- packages/server/src/api-reference/user.ts
- packages/sandbox/src/pause.ts
- packages/api/tsconfig.json
- packages/cli/src/cmd/cloud/vector/util.ts
- packages/sandbox/src/snapshot.ts
- packages/config/src/env.ts
- packages/cli/src/cmd/cloud/oidc/activity.ts
- packages/core/test/vector.test.ts
- packages/keyvalue/src/service.ts
- packages/server/src/api/index.ts
- packages/aigateway/tsconfig.json
- packages/coder/src/github.ts
- packages/core/src/error.ts
- packages/core/src/json.ts
- packages/sandbox/tsconfig.json
- packages/cli/src/cmd/coder/skill/create.ts
- packages/coder/package.json
- packages/cli/src/cmd/coder/archive.ts
- packages/sandbox/src/runtime.ts
- packages/server/src/api/api.ts
- packages/cli/src/cmd/cloud/workflow/get.ts
- packages/db/package.json
- packages/server/src/api-reference/webhook.ts
- packages/server/src/api-reference/session.ts
- packages/core/src/services/api.ts
- packages/client/tsconfig.json
- packages/cli/src/cmd/cloud/oidc/create.ts
- packages/server/src/api-reference/queue.ts
- packages/core/test/coder-sse.test.ts
- packages/sandbox/src/get.ts
- packages/keyvalue/src/api-reference.ts
- packages/sandbox/src/api-reference.ts
- packages/queue/src/service.ts
- packages/server/src/api-reference/project.ts
- packages/cli/src/cmd/cloud/workflow/list.ts
- packages/cli/src/cmd/coder/loop.ts
- packages/server/src/api-reference/apikey.ts
- docs/package.json
- packages/server/src/api-reference/org.ts
- packages/config/tsconfig.json
- packages/cli/src/cmd/cloud/workflow/util.ts
- packages/core/src/logger.ts
- packages/cli/src/cmd/coder/workspace/delete.ts
- packages/server/src/api-reference/machine.ts
- packages/sandbox/src/client.ts
- packages/cli/src/cmd/cloud/oidc/list.ts
- packages/schedule/package.json
- packages/server/src/api-reference/oauth.ts
- packages/cli/src/cmd/cloud/email/util.ts
- packages/adapter/src/index.ts
- packages/adapter/src/exception.ts
- packages/server/src/api-reference/thread.ts
- docs/src/web/code-examples.ts
- packages/cli/src/cmd/coder/workspace/create.ts
- packages/queue/package.json
- packages/schedule/src/api-reference.ts
- packages/sandbox/src/getStatus.ts
- packages/cli/src/cmd/cloud/keyvalue/repl.ts
- packages/cli/src/cmd/cloud/task/create.ts
- packages/server/src/api/machine/util.ts
- packages/coder/tsconfig.json
- packages/schedule/tsconfig.json
- packages/sandbox/package.json
- packages/cli/package.json
- packages/config/src/index.ts
- packages/sandbox/src/resolve.ts
- packages/sandbox/src/files.ts
- docs/src/api/schedules/route.ts
- packages/server/src/api-reference/stream.ts
- packages/config/src/config.ts
- packages/server/package.json
- packages/server/src/api-reference/region.ts
- packages/api/package.json
- packages/keyvalue/package.json
- docs/src/web/content/reference/api/sandboxes.mdx
- packages/client/src/index.ts
- packages/cli/src/cmd/cloud/keyvalue/util.ts
- packages/coder/src/index.ts
- packages/aigateway/src/index.ts
- packages/sandbox/src/index.ts
- packages/coder/src/types.ts
- packages/db/src/api-reference.ts
- packages/cli/src/cmd/coder/workspace/list.ts
- packages/client/src/pagination.ts
- packages/server/src/api-reference/workflow.ts
- packages/core/test/stream.test.ts
- packages/core/src/services/config.ts
- packages/adapter/src/error.ts
- knip.json
- packages/cli/src/cmd/cloud/db/get.ts
- packages/cli/src/cmd/coder/users.ts
- packages/coder/src/client.ts
- packages/db/src/index.ts
- packages/client/package.json
- packages/coder/src/sse.ts
- packages/queue/src/index.ts
- packages/coder/src/api-reference.ts
- packages/opencode/src/plugin/hooks/compaction-utils.ts
- packages/keyvalue/src/index.ts
- packages/schedule/src/index.ts
- docs/scripts/api-reference/registry.ts
- packages/aigateway/src/api-reference.ts
- packages/api/src/index.ts
- packages/email/src/index.ts
- packages/core/package.json
- packages/sandbox/src/util.ts
- packages/sandbox/src/run.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). (4)
- GitHub Check: Installer scenarios
- GitHub Check: Linux distro install smoke
- GitHub Check: Windows WSL CLI Smoke Test
- GitHub Check: Agentuity Deployment
🧰 Additional context used
📓 Path-based instructions (7)
packages/core/src/**/*.ts
📄 CodeRabbit inference engine (packages/core/AGENTS.md)
packages/core/src/**/*.ts: Build TypeScript code usingbun run buildwhich compiles with tsc
Run TypeScript type checking withbun run typecheck
Ensure runtime compatibility with both Browser and Node/Bun environments - no runtime-specific code
Use ESNext as build target with TypeScript declaration files
Use TypeScript-first development - all code must be TypeScript
Prefer interfaces for public APIs
Use generics for reusable type utilities
Ensure no framework coupling - code must work in any JavaScript environment
Many exports aretypeorinterfaceonly - usetypekeyword for type-only exports
Ensure all exports are pure with no side effects or global mutations
All relative imports in TypeScript files MUST include the.tsextension for proper ESM module resolution
Files:
packages/core/src/services/env.ts
packages/core/src/services/**/*.ts
📄 CodeRabbit inference engine (packages/core/AGENTS.md)
packages/core/src/services/**/*.ts: Follow StandardSchemaV1 spec for validation interfaces
Storage services must take a FetchAdapter for HTTP abstraction
Files:
packages/core/src/services/env.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Run
bun run formatusing Biome with tabs (width 3), single quotes, semicolons, lineWidth 100, and trailingCommas es5
Files:
packages/core/src/services/env.tspackages/db/src/tables.tspackages/sandbox/src/types.tsdocs/scripts/generate-api-reference.tspackages/adapter/src/fetch.tspackages/adapter/src/http-util.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Use TypeScript in strict mode with ESNext target and bundler moduleResolution
UseStructuredErrorfrom@agentuity/corefor error handling
Files:
packages/core/src/services/env.tspackages/db/src/tables.tspackages/sandbox/src/types.tsdocs/scripts/generate-api-reference.tspackages/adapter/src/fetch.tspackages/adapter/src/http-util.ts
packages/sandbox/**/*.{ts,tsx,js,mjs}
📄 CodeRabbit inference engine (packages/sandbox/AGENTS.md)
Ensure runtime compatibility with both Node.js and Bun
Files:
packages/sandbox/src/types.ts
packages/email/**/{package.json,bunfig.toml,Makefile,*.mk}
📄 CodeRabbit inference engine (packages/email/AGENTS.md)
packages/email/**/{package.json,bunfig.toml,Makefile,*.mk}: Build the package usingbun run buildcommand
Clean build artifacts by runningrm -rf dist
Files:
packages/email/package.json
packages/email/**/package.json
📄 CodeRabbit inference engine (packages/email/AGENTS.md)
packages/email/**/package.json: Ensure dependencies on@agentuity/adapter,@agentuity/client,@agentuity/config, and zod are declared
Do not add a dependency on@agentuity/core
Files:
packages/email/package.json
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:02.918Z
Learning: Update REST API reference documentation by editing the owning package catalog or Zod schemas, then run `bun run scripts/generate-api-reference.ts` to regenerate MDX files
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:02.918Z
Learning: Route file generation is handled automatically by `scripts/validate-routes.ts` during prebuild; run with `--check` flag to validate without generating
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:02.918Z
Learning: Sidebar navigation is auto-generated by `scripts/generate-nav-data.ts`; control page ordering within sections using the `meta.json` file in the same directory
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:02.918Z
Learning: Every new documentation page requires three things: an MDX content file in `src/web/content/`, a route file in `src/web/routes/_docs/`, and a meta.json entry in the content directory
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:02.918Z
Learning: Treat existing app tools and Agentuity-native services as complementary; readers can keep their framework logger, OpenTelemetry collector, database client or ORM, provider SDKs, and framework conventions
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:02.918Z
Learning: Start documentation from the thing the reader is building: a framework app, backend API, static site, background job, or model-backed agent
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:02.918Z
Learning: When a page is not about migration, explain the current app shape directly; do not frame normal docs as a v2-to-v3 comparison
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:02.918Z
Learning: SDK Explorer demos teach with just-in-time learning; each explanation answers the question the demo raises and includes context, when to use it, what to notice, and where to go next
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:02.918Z
Learning: Use one clear server shape in Explorer examples with Hono as the default; mention a few transferable framework shapes only when useful and link to [Frameworks](/frameworks) instead of listing every framework
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:02.918Z
Learning: Keep provider documentation provider-agnostic where possible; use current model names in code examples and verify they're up to date before publishing
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:02.918Z
Learning: When writing service docs, verify the package that owns the feature being documented; do not use a neighboring helper package as proof that another service works
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:02.918Z
Learning: Test service clients directly (e.g., KeyValueClient, not SQL helpers for key-value docs) to verify service functionality; relational database helpers belong in database-specific, migration, or reference pages
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:07.972Z
Learning: Publish this package only after agentuity/adapter, agentuity/api, agentuity/client, agentuity/config, and agentuity/sandbox have been published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:13.649Z
Learning: Use Node.js and Bun compatible runtime for agentuity/db package
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:13.649Z
Learning: Depend on agentuity/adapter, agentuity/api, agentuity/client, agentuity/config, and zod packages
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:13.649Z
Learning: Publish agentuity/db after agentuity/adapter, agentuity/api, agentuity/client, and agentuity/config have been published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:18.996Z
Learning: Publish the package only after agentuity/adapter, agentuity/client, and agentuity/config have been published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:23.164Z
Learning: Publish after agentuity/adapter, agentuity/client, and agentuity/config are published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:28.537Z
Learning: Build the package using `bun run build` before distribution
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:28.537Z
Learning: Run typecheck using `bun run typecheck` to validate TypeScript types
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:28.537Z
Learning: Ensure the package is compatible with both Node.js and Bun runtimes
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:28.537Z
Learning: Publish to npm only after agentuity/core has been published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:33.241Z
Learning: Publish this package only after `agentuity/adapter`, `agentuity/api`, `agentuity/client`, and `agentuity/config` have been published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:41.719Z
Learning: Build the agentuity/schedule package using `bun run build`
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:41.719Z
Learning: Run `bun run typecheck` to perform type checking
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:41.719Z
Learning: Clean build artifacts using `rm -rf dist`
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:41.719Z
Learning: Ensure runtime compatibility with both Node.js and Bun
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:41.719Z
Learning: Maintain dependencies on agentuity/core, agentuity/server, and zod
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:41.719Z
Learning: Publish the agentuity/schedule package only after agentuity/core has been published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:48.256Z
Learning: Package must be published after agentuity/core is published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:48.256Z
Learning: These utilities are intended for CLI consumption via agentuity/cli and should not be used in deployed user code
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T04:02:48.256Z
Learning: Runtime must be compatible with both Node.js and Bun
📚 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/core/src/services/env.tspackages/db/src/tables.tspackages/sandbox/src/types.tsdocs/scripts/generate-api-reference.tspackages/adapter/src/fetch.tspackages/adapter/src/http-util.ts
📚 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/email/package.jsonpackages/config/package.json
🪛 LanguageTool
PLAN.md
[style] ~123-~123: This phrase is redundant. Consider writing “duplicates” or “copies”.
Context: ...toServiceException`) - [x] Core retains duplicate copies until Phase 5 deletes them (adapter own...
(DUPLICATE_COPY)
🪛 OpenGrep (1.22.0)
packages/adapter/src/http-util.ts
[ERROR] 12-12: Dynamic command passed to child_process.exec/execSync. Use child_process.execFile or spawn with an argument array instead.
(coderabbit.command-injection.exec-js)
[ERROR] 15-15: Dynamic command passed to child_process.exec/execSync. Use child_process.execFile or spawn with an argument array instead.
(coderabbit.command-injection.exec-js)
[ERROR] 18-18: Dynamic command passed to child_process.exec/execSync. Use child_process.execFile or spawn with an argument array instead.
(coderabbit.command-injection.exec-js)
🔇 Additional comments (7)
PLAN.md (1)
1-261: LGTM!packages/db/src/tables.ts (1)
2-2: LGTM!packages/email/package.json (1)
29-30: LGTM!packages/core/src/services/env.ts (1)
1-1: LGTM!packages/adapter/src/fetch.ts (1)
1-86: LGTM!packages/config/package.json (1)
2-3: LGTM!Also applies to: 6-6, 12-13, 17-18, 21-23, 26-26, 30-30, 39-39
packages/config/tsconfig.test.json (1)
1-11: LGTM!
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/adapter/src/http-util.ts (1)
112-121:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFallback when the error body is empty.
Line [116] can set
messageto''for empty error responses, hiding the usefulstatusText. Use a non-empty fallback.Proposed fix
const body = await response.text(); - const message = extractMessageFromBody(body); + const message = extractMessageFromBody(body).trim() || response.statusText || `HTTP ${response.status}`; return new ServiceException({ message,🤖 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/adapter/src/http-util.ts` around lines 112 - 121, The extractMessageFromBody function can return an empty string for empty error responses, which loses useful debugging information from the response statusText. After the message variable is assigned from extractMessageFromBody(body), add a check to use response.statusText as a fallback when the message is empty or falsy. This ensures the ServiceException always has meaningful error information in its message property.
🤖 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.
Outside diff comments:
In `@packages/adapter/src/http-util.ts`:
- Around line 112-121: The extractMessageFromBody function can return an empty
string for empty error responses, which loses useful debugging information from
the response statusText. After the message variable is assigned from
extractMessageFromBody(body), add a check to use response.statusText as a
fallback when the message is empty or falsy. This ensures the ServiceException
always has meaningful error information in its message property.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 169598d7-b727-4cd0-aa9d-ec8e10907bf0
📒 Files selected for processing (5)
docs/scripts/generate-api-reference.tsinstall.shpackages/adapter/src/http-util.tspackages/sandbox/package.jsonpackages/sandbox/src/types.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- packages/sandbox/src/types.ts
- install.sh
- docs/scripts/generate-api-reference.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). (2)
- GitHub Check: Windows WSL CLI Smoke Test
- GitHub Check: Agentuity Deployment
🧰 Additional context used
📓 Path-based instructions (3)
packages/sandbox/**/package.json
📄 CodeRabbit inference engine (packages/sandbox/AGENTS.md)
packages/sandbox/**/package.json: Dependencies for@agentuity/sandboxshould include:@agentuity/adapter,@agentuity/api,@agentuity/config,@agentuity/client, and zod
Build process usesbun run buildcommand
Type checking usesbun run typecheckcommand
Files:
packages/sandbox/package.json
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Run
bun run formatusing Biome with tabs (width 3), single quotes, semicolons, lineWidth 100, and trailingCommas es5
Files:
packages/adapter/src/http-util.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Use TypeScript in strict mode with ESNext target and bundler moduleResolution
UseStructuredErrorfrom@agentuity/corefor error handling
Files:
packages/adapter/src/http-util.ts
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:19.364Z
Learning: Every new documentation page requires three things: MDX content file in `src/web/content/`, route file in `src/web/routes/_docs/`, and meta.json entry in the content directory
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:19.364Z
Learning: Use `bun run scripts/validate-routes.ts` to generate missing route files and validate frontmatter metadata; run with `--check` to validate without generating
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:25.720Z
Learning: Build package using `bun run build` command
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:25.720Z
Learning: Run typecheck using `bun run typecheck` command
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:25.720Z
Learning: Ensure runtime compatibility with both Node.js and Bun
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:25.720Z
Learning: Export CoderClient, WebSocket/SSE clients, and types from the agentuity/coder package
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:25.720Z
Learning: Keep `api-reference` in the core package, not in agentuity/coder
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:25.720Z
Learning: Publish agentuity/coder after publishing agentuity/adapter, agentuity/api, agentuity/client, agentuity/config, and agentuity/sandbox
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:30.901Z
Learning: Build the package using `bun run build` command
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:30.901Z
Learning: Run `bun run typecheck` for type validation in the agentuity/db package
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:30.901Z
Learning: Ensure runtime compatibility with both Node.js and Bun in the agentuity/db package
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:30.901Z
Learning: Publish agentuity/db only after agentuity/adapter, agentuity/api, agentuity/client, and agentuity/config have been published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:34.684Z
Learning: Ensure runtime compatibility with both Node.js and Bun
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:34.684Z
Learning: Publish after agentuity/adapter, agentuity/client, and agentuity/config packages
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:39.514Z
Learning: Run build process with 'bun run build' before publishing
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:39.514Z
Learning: Publish after agentuity/adapter, agentuity/client, and agentuity/config are published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:44.730Z
Learning: Build the package using the command `bun run build` before publishing to npm
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:44.730Z
Learning: Run `bun run typecheck` to verify TypeScript types
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:44.730Z
Learning: Publish to npm only after agentuity/core has been published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:49.949Z
Learning: Runtime should be compatible with both Node.js and Bun
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:49.949Z
Learning: Publishing order: agentuity/sandbox should be published after agentuity/adapter, agentuity/api, agentuity/client, and agentuity/config
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:55.091Z
Learning: Use `bun run build` command to build the agentuity/schedule package
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:55.091Z
Learning: Ensure runtime compatibility with both Node.js and Bun
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:12:55.091Z
Learning: Publish agentuity/schedule only after agentuity/core has been published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:13:03.022Z
Learning: Use zod for runtime validation of data
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:13:03.022Z
Learning: API client implementations should be organized in `src/api/` directory with subdirectories for each domain (user, org, project, region, session, thread, apikey, oauth, machine, monitoring, storage, workflow, queue, stream, webhook, sandbox)
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:13:03.022Z
Learning: Build output must be generated using `bun run build` command
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:13:03.022Z
Learning: Type checking must be performed using `bun run typecheck` command
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T15:13:03.022Z
Learning: Package must be published after agentuity/core is published
📚 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/sandbox/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/adapter/src/http-util.ts
🔇 Additional comments (2)
packages/adapter/src/http-util.ts (1)
160-163: LGTM!Also applies to: 192-192, 207-214
packages/sandbox/package.json (1)
27-34: LGTM!
Document the phased migration to move service implementations out of @agentuity/core and make standalone service packages self-contained. Co-authored-by: Cursor <cursoragent@cursor.com>
Move fetch types, ServiceException, and HTTP helpers into @agentuity/adapter. Move KeyValueStorageService into @agentuity/keyvalue so the standalone package owns its API. Core retains duplicate copies until Phase 5 shim removal. Co-authored-by: Cursor <cursoragent@cursor.com>
Route local KV storage interfaces through the standalone keyvalue package instead of @agentuity/core. Co-authored-by: Cursor <cursoragent@cursor.com>
Add @agentuity/config with getEnv, getServiceUrls, and resolveRegion. Core re-exports through shims for backward compatibility. Wire keyvalue client to depend on config instead of @agentuity/core/config. Co-authored-by: Cursor <cursoragent@cursor.com>
…onfig Switch all standalone service clients from @agentuity/core/config to @agentuity/config for getEnv and getServiceUrls imports. Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce @agentuity/client with createServiceAdapter, resolveApiKey, resolveRegion, and isLogger. Refactor KeyValueClient to use the shared helpers as the pilot for deduplicating client constructors. Co-authored-by: Cursor <cursoragent@cursor.com>
Centralize API key, region, URL, and adapter setup in @agentuity/client across every service package and switch CLI keyvalue commands to KeyValueClient. Co-authored-by: Cursor <cursoragent@cursor.com>
Add shared pagination helpers to @agentuity/client, route keyvalue through them without @agentuity/core, and relocate stream service sources into @agentuity/stream with CLI util wired to the package. Co-authored-by: Cursor <cursoragent@cursor.com>
Declare adapter's dependency on core in tsconfig references so clean tsc --build runs core first, wire CLI to keyvalue/stream packages, and narrow getAllStats union in the kv REPL. Co-authored-by: Cursor <cursoragent@cursor.com>
Relocate vector service sources from core, wire CLI cloud commands to the package, and keep the core copy as a backward-compat shim for now. Co-authored-by: Cursor <cursoragent@cursor.com>
Add a standalone package for APIClient and Pulse-style platform errors, mirroring the adapter duplicate-until-Phase-4 pattern. Core keeps its copy because api→core (StructuredError) blocks a shim without creating incompatible duplicate class types across packages. Co-authored-by: Cursor <cursoragent@cursor.com>
EmailStorageService and types now live in the email package with adapter imports; core retains its copy until Phase 5. CLI email util imports from @agentuity/email, matching the vector/stream migration pattern. Co-authored-by: Cursor <cursoragent@cursor.com>
ScheduleService now lives in the schedule package with adapter-only deps; core keeps its copy until Phase 5. CLI imports from @agentuity/schedule. Co-authored-by: Cursor <cursoragent@cursor.com>
Storage client, types, and domain errors now live in the webhook package; platform APIClient helpers remain in core until Phase 4. Co-authored-by: Cursor <cursoragent@cursor.com>
dbQuery, dbTables, dbLogs, and dbLogStats now live in the db package with APIClient from @agentuity/core/api; core retains its copy until Phase 5. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep only StreamStorageService and StreamClient in the stream package; streamList/streamGet and related APIClient code remain in core for @agentuity/server until Phase 4. Co-authored-by: Cursor <cursoragent@cursor.com>
Copy core sandbox client module into the standalone package with config/client/core imports; keep cli-list and api-reference in core for server and docs. Co-authored-by: Cursor <cursoragent@cursor.com>
Copy core coder module into the standalone package with sandbox/config/client/core imports; export base64Encode from sandbox; point CLI at @agentuity/coder; keep api-reference in core. Co-authored-by: Cursor <cursoragent@cursor.com>
Move user, org env, project get/list/malware, and region create into @agentuity/server; point sandbox API stubs at @agentuity/sandbox; trim migrated symbols from core barrel exports. Co-authored-by: Cursor <cursoragent@cursor.com>
…rver Copy platform session/thread/apikey modules into server with core/client imports; export via api/index for tests; trim migrated domains from core barrel. Co-authored-by: Cursor <cursoragent@cursor.com>
Move oauth, machine, monitoring, storage, workflow, stats, and remaining org/project/region modules into @agentuity/server; slim core main barrel to foundation plus service copies; point CLI oauth/workflow/monitor imports at server. Co-authored-by: Cursor <cursoragent@cursor.com>
Prevent accidental workspace copies from showing up in git status. Co-authored-by: Cursor <cursoragent@cursor.com>
Move platform admin modules into @agentuity/server, slim core main barrel to runtime services only, wire sandbox via @agentuity/sandbox, and align PLAN.md with 3.1.0 semver (internal core subpaths are not a user compat surface). Co-authored-by: Cursor <cursoragent@cursor.com>
Point task, email, vector, and stream CLI commands at @agentuity/{service} instead of @agentuity/core, and fix Amazon Linux 2023 install smoke SETUP to use dnf with curl.
Co-authored-by: Cursor <cursoragent@cursor.com>
Move service runtime into standalone packages with adapter/api shims so supported app imports stay unchanged while core drops duplicate implementations. Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the Bun SQLite local service shims and update docs to point at the managed services and agentuity dev instead. Co-authored-by: Cursor <cursoragent@cursor.com>
…ackages. Drop re-exports and duplicate service code from @agentuity/core, relocate REST API reference metadata into per-service packages and @agentuity/server, and drive docs generation from a docs-owned registry so single-service apps no longer pull the full core tarball transitively. Co-authored-by: Cursor <cursoragent@cursor.com>
Import database helpers from @agentuity/db and use StreamListItem for cloud stream list so the CLI typechecks against the post-isolation package boundaries. Co-authored-by: Cursor <cursoragent@cursor.com>
Wire @agentuity/db into the CLI tsconfig and add @agentuity/keyvalue as a core dependency so tsc --build resolves imports after the service package isolation refactor. Co-authored-by: Cursor <cursoragent@cursor.com>
Add workspace devDependencies and tsconfig.test.json project references so core tests can import @agentuity/{aigateway,coder,queue,stream,vector} after service isolation.
Co-authored-by: Cursor <cursoragent@cursor.com>
Remove platform admin API copies from @agentuity/core now that @agentuity/server owns them. Trim core subpath exports to foundation only (adapter, api, config, exception, pagination, error). Move session event tests to @agentuity/server, update OAuth docs and integration test imports to @agentuity/server, and rebase onto main.
Install tests failed after adding unpublished packages (@agentuity/config, api, client) because pack-cli-for-install-test.sh rewrote workspace deps to semver strings that are not on npm. Pack the full CLI dependency closure with per-package versions, emit a flat-install manifest, and install via bun overrides when AGENTUITY_CLI_PACKAGE is set.
Harden adapter fetch/http helpers, gate API retries on idempotent methods, redact error response bodies in logs, fix package boundary docs/deps, and use satisfies for api-reference registry compile-time checks.
macOS CI runners ship Bash 3.2 without mapfile; replace with a read loop so Pack CLI for install tests succeeds on macOS jobs.
CI install tests use a temp HOME with bun on PATH but no BUN_INSTALL env var. The flat-manifest install path referenced $BUN_INSTALL under set -u, aborting before install could run. Co-authored-by: Cursor <cursoragent@cursor.com>
Escape API index card JSX attributes, check manifest prep exit status, harden adapter payload/response handling, and import StructuredError from @agentuity/core in sandbox types.
Packing @agentuity/coder removed agentuity-coder-tui-*.tgz via the overlapping agentuity-coder-*.tgz glob, leaving the install manifest pointing at a missing tarball and breaking all install CI jobs.
Co-authored-by: Cursor <cursoragent@cursor.com>
16695c9 to
bf1b81d
Compare
|
The latest Agentuity deployment details.
View deployment logs with the Agentuity CLI: |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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 `@docs/src/api/schedules/route.ts`:
- Around line 83-95: Replace the string-based error classification fallback (the
message.includes('404') and message.includes('not found') checks) with proper
error type checking using StructuredError from `@agentuity/core`, as per coding
guidelines. Import StructuredError from `@agentuity/core` and update the fallback
logic in the return statement to use appropriate StructuredError error type
checks instead of relying on string pattern matching, which can cause false
positives and misclassify unrelated errors that happen to contain "404" or "not
found" in their messages.
In `@packages/adapter/src/http-util.ts`:
- Around line 32-37: The buildUrl function can create double slashes when
joining path and subpath because path may end with a forward slash and subpath
always starts with one (after normalization on line 35). Before appending
subpath to url, remove the trailing slash from path, or alternatively remove the
leading slash from subpath before concatenation. Add a normalization step in the
conditional block that handles subpath to ensure only a single forward slash
exists between path and subpath when they are joined.
In `@packages/sandbox/src/resolve.ts`:
- Line 1: The import statement for StructuredError is sourced from the incorrect
package. Change the import source from `@agentuity/adapter` to `@agentuity/core` to
comply with the repository's TypeScript coding standard for all ts and tsx
files. Locate the import statement at the top of the resolve.ts file and update
the import path accordingly.
In `@PLAN.md`:
- Around line 220-229: The publish order described in the "Publish order
complexity" line at line 220 conflicts with the "Publish Order (target)" section
that follows it. The complexity line suggests core first, but the target section
lists adapter first and core fourth. Remove the conflicting publish order
sequence from the "Publish order complexity" line and keep only the detailed
"Publish Order (target)" section as the single canonical reference to avoid
confusion about the actual release sequence.
🪄 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: 8c32dd76-4cc3-4e54-beb7-26025aa2b433
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (282)
.gitignorePLAN.mdREADME.mddocs/package.jsondocs/scripts/api-reference/framework.tsdocs/scripts/api-reference/registry.tsdocs/scripts/generate-api-reference.tsdocs/src/api/schedules/route.tsdocs/src/lib/ai-gateway-stream.tsdocs/src/services/docs-sync/docs-processor.tsdocs/src/web/code-examples.tsdocs/src/web/content/AGENTS.mddocs/src/web/content/reference/api/ai-gateway.mdxdocs/src/web/content/reference/api/api-keys.mdxdocs/src/web/content/reference/api/coder.mdxdocs/src/web/content/reference/api/database.mdxdocs/src/web/content/reference/api/email.mdxdocs/src/web/content/reference/api/index.mdxdocs/src/web/content/reference/api/key-value.mdxdocs/src/web/content/reference/api/machines.mdxdocs/src/web/content/reference/api/oauth.mdxdocs/src/web/content/reference/api/object-storage.mdxdocs/src/web/content/reference/api/organizations.mdxdocs/src/web/content/reference/api/projects.mdxdocs/src/web/content/reference/api/queues.mdxdocs/src/web/content/reference/api/regions.mdxdocs/src/web/content/reference/api/sandboxes.mdxdocs/src/web/content/reference/api/schedules.mdxdocs/src/web/content/reference/api/sessions.mdxdocs/src/web/content/reference/api/streams.mdxdocs/src/web/content/reference/api/tasks.mdxdocs/src/web/content/reference/api/threads.mdxdocs/src/web/content/reference/api/user.mdxdocs/src/web/content/reference/api/vector.mdxdocs/src/web/content/reference/api/webhooks.mdxdocs/src/web/content/reference/api/workflows.mdxdocs/src/web/content/services/oidc-provider.mdxdocs/src/web/content/services/storage/custom.mdxdocs/src/web/content/services/storage/key-value.mdxinstall.shknip.jsonpackages/adapter/package.jsonpackages/adapter/src/error.tspackages/adapter/src/exception.tspackages/adapter/src/fetch.tspackages/adapter/src/http-util.tspackages/adapter/src/index.tspackages/adapter/src/json.tspackages/adapter/src/logger.tspackages/adapter/tsconfig.jsonpackages/aigateway/package.jsonpackages/aigateway/src/api-reference.tspackages/aigateway/src/index.tspackages/aigateway/src/service.tspackages/aigateway/tsconfig.jsonpackages/api/README.mdpackages/api/package.jsonpackages/api/src/index.tspackages/api/tsconfig.jsonpackages/cli/package.jsonpackages/cli/src/cmd/cloud/aigateway/complete.tspackages/cli/src/cmd/cloud/aigateway/modalities.tspackages/cli/src/cmd/cloud/aigateway/model-cache.tspackages/cli/src/cmd/cloud/aigateway/util.tspackages/cli/src/cmd/cloud/db/get.tspackages/cli/src/cmd/cloud/db/logs.tspackages/cli/src/cmd/cloud/db/sql.tspackages/cli/src/cmd/cloud/email/send.tspackages/cli/src/cmd/cloud/email/util.tspackages/cli/src/cmd/cloud/keyvalue/repl.tspackages/cli/src/cmd/cloud/keyvalue/util.tspackages/cli/src/cmd/cloud/monitor.tspackages/cli/src/cmd/cloud/oidc/activity.tspackages/cli/src/cmd/cloud/oidc/create.tspackages/cli/src/cmd/cloud/oidc/delete.tspackages/cli/src/cmd/cloud/oidc/get.tspackages/cli/src/cmd/cloud/oidc/list.tspackages/cli/src/cmd/cloud/oidc/rotate-secret.tspackages/cli/src/cmd/cloud/oidc/users.tspackages/cli/src/cmd/cloud/oidc/util.tspackages/cli/src/cmd/cloud/region-lookup.tspackages/cli/src/cmd/cloud/sandbox/fs/cp.tspackages/cli/src/cmd/cloud/sandbox/snapshot/get.tspackages/cli/src/cmd/cloud/sandbox/util.tspackages/cli/src/cmd/cloud/schedule/util.tspackages/cli/src/cmd/cloud/stream/list.tspackages/cli/src/cmd/cloud/stream/util.tspackages/cli/src/cmd/cloud/task/attachment.tspackages/cli/src/cmd/cloud/task/close.tspackages/cli/src/cmd/cloud/task/create.tspackages/cli/src/cmd/cloud/task/delete.tspackages/cli/src/cmd/cloud/task/list.tspackages/cli/src/cmd/cloud/task/update.tspackages/cli/src/cmd/cloud/task/util.tspackages/cli/src/cmd/cloud/vector/upsert.tspackages/cli/src/cmd/cloud/vector/util.tspackages/cli/src/cmd/cloud/workflow/get.tspackages/cli/src/cmd/cloud/workflow/list.tspackages/cli/src/cmd/cloud/workflow/util.tspackages/cli/src/cmd/coder/archive.tspackages/cli/src/cmd/coder/create.tspackages/cli/src/cmd/coder/delete.tspackages/cli/src/cmd/coder/events.tspackages/cli/src/cmd/coder/get.tspackages/cli/src/cmd/coder/list.tspackages/cli/src/cmd/coder/loop.tspackages/cli/src/cmd/coder/participants.tspackages/cli/src/cmd/coder/replay.tspackages/cli/src/cmd/coder/resolve-repo.tspackages/cli/src/cmd/coder/skill/buckets.tspackages/cli/src/cmd/coder/skill/create.tspackages/cli/src/cmd/coder/skill/delete.tspackages/cli/src/cmd/coder/skill/list.tspackages/cli/src/cmd/coder/skill/save.tspackages/cli/src/cmd/coder/start.tspackages/cli/src/cmd/coder/update.tspackages/cli/src/cmd/coder/users.tspackages/cli/src/cmd/coder/workspace/common.tspackages/cli/src/cmd/coder/workspace/create.tspackages/cli/src/cmd/coder/workspace/delete.tspackages/cli/src/cmd/coder/workspace/get.tspackages/cli/src/cmd/coder/workspace/list.tspackages/cli/tsconfig.jsonpackages/client/package.jsonpackages/client/src/index.tspackages/client/src/logger.tspackages/client/src/pagination.tspackages/client/tsconfig.jsonpackages/coder/AGENTS.mdpackages/coder/package.jsonpackages/coder/src/agents.tspackages/coder/src/api-reference.tspackages/coder/src/client.tspackages/coder/src/close-codes.tspackages/coder/src/discover.tspackages/coder/src/github.tspackages/coder/src/index.tspackages/coder/src/loop-state.tspackages/coder/src/protocol.tspackages/coder/src/session-data.tspackages/coder/src/sessions.tspackages/coder/src/skills.tspackages/coder/src/sse.tspackages/coder/src/types.tspackages/coder/src/users.tspackages/coder/src/util.tspackages/coder/src/websocket.tspackages/coder/src/workspaces.tspackages/coder/tsconfig.jsonpackages/config/package.jsonpackages/config/src/config.tspackages/config/src/env.tspackages/config/src/index.tspackages/config/tsconfig.jsonpackages/config/tsconfig.test.jsonpackages/core/README.mdpackages/core/package.jsonpackages/core/src/error.tspackages/core/src/json.tspackages/core/src/logger.tspackages/core/src/services/aigateway/index.tspackages/core/src/services/api.tspackages/core/src/services/coder/index.tspackages/core/src/services/config.tspackages/core/src/services/db/index.tspackages/core/src/services/email/index.tspackages/core/src/services/env.tspackages/core/src/services/index.tspackages/core/src/services/keyvalue/index.tspackages/core/src/services/org/env-delete.tspackages/core/src/services/org/env-get.tspackages/core/src/services/org/env-update.tspackages/core/src/services/project/get.tspackages/core/src/services/project/list.tspackages/core/src/services/project/malware.tspackages/core/src/services/region/create.tspackages/core/src/services/sandbox/index.tspackages/core/src/services/schedule/index.tspackages/core/src/services/task/index.tspackages/core/src/services/user/whoami.tspackages/core/src/services/vector/index.tspackages/core/test/aigateway.test.tspackages/core/test/coder-client.test.tspackages/core/test/coder-sse.test.tspackages/core/test/coder-websocket.test.tspackages/core/test/keyvalue.test.tspackages/core/test/queue.test.tspackages/core/test/stream.test.tspackages/core/test/vector.test.tspackages/core/tsconfig.jsonpackages/core/tsconfig.test.jsonpackages/db/AGENTS.mdpackages/db/package.jsonpackages/db/src/api-reference.tspackages/db/src/index.tspackages/db/src/logs.tspackages/db/src/query.tspackages/db/src/stats.tspackages/db/src/tables.tspackages/db/src/types.tspackages/db/src/util.tspackages/db/tsconfig.jsonpackages/email/AGENTS.mdpackages/email/package.jsonpackages/email/src/api-reference.tspackages/email/src/index.tspackages/email/src/service.tspackages/email/src/types.tspackages/email/tsconfig.jsonpackages/keyvalue/AGENTS.mdpackages/keyvalue/package.jsonpackages/keyvalue/src/api-reference.tspackages/keyvalue/src/index.tspackages/keyvalue/src/service.tspackages/keyvalue/src/types.tspackages/keyvalue/tsconfig.jsonpackages/local/src/bun/db.tspackages/local/src/bun/email.tspackages/local/src/bun/index.tspackages/local/src/bun/kv.tspackages/local/src/bun/queue.tspackages/local/src/bun/stream.tspackages/local/src/bun/task.tspackages/local/src/bun/util.tspackages/local/src/bun/vector.tspackages/local/src/index.tspackages/local/src/runtime.tspackages/opencode/src/plugin/hooks/compaction-utils.tspackages/pi/src/index.tspackages/queue/AGENTS.mdpackages/queue/package.jsonpackages/queue/src/index.tspackages/queue/src/service.tspackages/queue/tsconfig.jsonpackages/sandbox/AGENTS.mdpackages/sandbox/package.jsonpackages/sandbox/src/api-reference.tspackages/sandbox/src/base64.tspackages/sandbox/src/client.tspackages/sandbox/src/create.tspackages/sandbox/src/destroy.tspackages/sandbox/src/disk-checkpoint.tspackages/sandbox/src/events.tspackages/sandbox/src/execute.tspackages/sandbox/src/execution.tspackages/sandbox/src/files.tspackages/sandbox/src/get.tspackages/sandbox/src/getStatus.tspackages/sandbox/src/index.tspackages/sandbox/src/job.tspackages/sandbox/src/list.tspackages/sandbox/src/pause.tspackages/sandbox/src/resolve.tspackages/sandbox/src/resume.tspackages/sandbox/src/run.tspackages/sandbox/src/runtime.tspackages/sandbox/src/snapshot-build.tspackages/sandbox/src/snapshot.tspackages/sandbox/src/types.tspackages/sandbox/src/util.tspackages/sandbox/tsconfig.jsonpackages/schedule/AGENTS.mdpackages/schedule/package.jsonpackages/schedule/src/api-reference.tspackages/schedule/src/index.tspackages/schedule/src/service.tspackages/schedule/src/types.tspackages/schedule/tsconfig.jsonpackages/server/AGENTS.mdpackages/server/package.jsonpackages/server/src/api-reference/apikey.tspackages/server/src/api-reference/machine.tspackages/server/src/api-reference/oauth.tspackages/server/src/api-reference/org.tspackages/server/src/api-reference/project.tspackages/server/src/api-reference/queue.tspackages/server/src/api-reference/region.tspackages/server/src/api-reference/session.tspackages/server/src/api-reference/storage.tspackages/server/src/api-reference/stream.tspackages/server/src/api-reference/thread.tspackages/server/src/api-reference/user.ts
💤 Files with no reviewable changes (31)
- packages/core/src/services/index.ts
- docs/scripts/api-reference/framework.ts
- packages/core/src/services/task/index.ts
- packages/core/src/services/keyvalue/index.ts
- packages/core/src/services/project/get.ts
- packages/local/src/bun/kv.ts
- packages/core/src/services/db/index.ts
- packages/core/src/services/org/env-update.ts
- packages/core/src/services/schedule/index.ts
- packages/local/src/runtime.ts
- packages/core/src/services/aigateway/index.ts
- packages/core/src/services/project/list.ts
- packages/core/src/services/project/malware.ts
- packages/core/src/services/sandbox/index.ts
- packages/local/src/bun/index.ts
- README.md
- packages/local/src/bun/email.ts
- packages/core/src/services/vector/index.ts
- packages/core/src/services/region/create.ts
- packages/core/src/services/org/env-get.ts
- packages/local/src/bun/vector.ts
- packages/local/src/bun/queue.ts
- packages/core/src/services/coder/index.ts
- packages/core/src/services/email/index.ts
- packages/local/src/bun/util.ts
- packages/core/src/services/user/whoami.ts
- packages/local/src/bun/task.ts
- packages/local/src/bun/db.ts
- packages/local/src/bun/stream.ts
- packages/local/src/index.ts
- packages/core/src/services/org/env-delete.ts
✅ Files skipped from review due to trivial changes (113)
- .gitignore
- docs/src/services/docs-sync/docs-processor.ts
- docs/src/web/content/reference/api/workflows.mdx
- packages/coder/src/workspaces.ts
- docs/src/web/content/reference/api/object-storage.mdx
- packages/coder/src/loop-state.ts
- packages/api/README.md
- docs/src/web/content/reference/api/api-keys.mdx
- packages/sandbox/tsconfig.json
- packages/cli/src/cmd/coder/skill/save.ts
- docs/src/web/content/reference/api/sessions.mdx
- packages/sandbox/src/disk-checkpoint.ts
- packages/config/src/env.ts
- packages/cli/src/cmd/coder/skill/delete.ts
- packages/sandbox/src/destroy.ts
- packages/db/src/query.ts
- packages/sandbox/src/events.ts
- packages/cli/src/cmd/coder/archive.ts
- packages/coder/src/close-codes.ts
- packages/cli/src/cmd/cloud/stream/util.ts
- packages/cli/src/cmd/coder/create.ts
- packages/cli/src/cmd/cloud/oidc/util.ts
- packages/coder/src/users.ts
- packages/cli/src/cmd/coder/delete.ts
- docs/src/web/content/reference/api/projects.mdx
- packages/cli/src/cmd/cloud/oidc/delete.ts
- docs/src/web/content/reference/api/email.mdx
- docs/src/web/content/reference/api/index.mdx
- packages/cli/src/cmd/coder/replay.ts
- packages/core/test/coder-client.test.ts
- packages/cli/src/cmd/coder/workspace/common.ts
- packages/cli/src/cmd/coder/workspace/get.ts
- packages/coder/AGENTS.md
- docs/src/lib/ai-gateway-stream.ts
- packages/cli/src/cmd/cloud/oidc/users.ts
- packages/cli/src/cmd/coder/events.ts
- packages/coder/src/sessions.ts
- packages/cli/src/cmd/coder/workspace/create.ts
- packages/coder/src/agents.ts
- packages/sandbox/src/getStatus.ts
- packages/core/test/coder-websocket.test.ts
- docs/src/web/content/reference/api/streams.mdx
- packages/schedule/AGENTS.md
- packages/queue/tsconfig.json
- packages/cli/src/cmd/cloud/oidc/list.ts
- packages/core/test/vector.test.ts
- packages/sandbox/src/execution.ts
- packages/cli/src/cmd/coder/participants.ts
- packages/sandbox/AGENTS.md
- packages/cli/src/cmd/cloud/aigateway/util.ts
- packages/aigateway/src/service.ts
- packages/cli/src/cmd/cloud/task/attachment.ts
- packages/cli/src/cmd/cloud/sandbox/snapshot/get.ts
- packages/email/tsconfig.json
- packages/keyvalue/AGENTS.md
- docs/src/web/content/reference/api/user.mdx
- docs/src/web/content/AGENTS.md
- docs/src/web/content/reference/api/key-value.mdx
- packages/email/AGENTS.md
- packages/cli/src/cmd/coder/resolve-repo.ts
- packages/aigateway/src/api-reference.ts
- packages/cli/src/cmd/cloud/task/close.ts
- packages/db/src/logs.ts
- docs/src/web/content/reference/api/webhooks.mdx
- packages/config/tsconfig.test.json
- packages/core/test/stream.test.ts
- packages/db/src/stats.ts
- docs/src/web/content/reference/api/ai-gateway.mdx
- docs/src/web/code-examples.ts
- packages/cli/src/cmd/cloud/task/list.ts
- docs/src/web/content/reference/api/queues.mdx
- docs/src/web/content/reference/api/schedules.mdx
- docs/src/web/content/reference/api/organizations.mdx
- packages/cli/src/cmd/cloud/stream/list.ts
- packages/sandbox/src/get.ts
- packages/cli/src/cmd/cloud/sandbox/util.ts
- packages/coder/src/util.ts
- docs/src/web/content/reference/api/threads.mdx
- packages/client/package.json
- packages/client/tsconfig.json
- packages/queue/AGENTS.md
- packages/coder/tsconfig.json
- packages/cli/src/cmd/cloud/task/util.ts
- packages/coder/src/github.ts
- packages/sandbox/src/snapshot.ts
- docs/src/web/content/reference/api/database.mdx
- packages/cli/src/cmd/cloud/sandbox/fs/cp.ts
- packages/cli/src/cmd/cloud/task/delete.ts
- packages/sandbox/src/list.ts
- packages/schedule/src/service.ts
- packages/server/AGENTS.md
- docs/src/web/content/reference/api/regions.mdx
- packages/coder/src/protocol.ts
- packages/cli/src/cmd/coder/update.ts
- packages/cli/src/cmd/cloud/aigateway/modalities.ts
- packages/cli/src/cmd/cloud/aigateway/complete.ts
- packages/cli/src/cmd/cloud/aigateway/model-cache.ts
- packages/config/src/index.ts
- docs/src/web/content/reference/api/machines.mdx
- packages/db/AGENTS.md
- packages/pi/src/index.ts
- packages/sandbox/src/create.ts
- docs/src/web/content/reference/api/oauth.mdx
- packages/coder/src/client.ts
- docs/src/web/content/reference/api/tasks.mdx
- packages/keyvalue/src/service.ts
- packages/core/tsconfig.test.json
- packages/schedule/tsconfig.json
- packages/db/src/api-reference.ts
- packages/core/README.md
- packages/cli/src/cmd/cloud/vector/upsert.ts
- packages/cli/src/cmd/cloud/region-lookup.ts
- packages/client/src/index.ts
🚧 Files skipped from review as they are similar to previous changes (107)
- packages/cli/package.json
- packages/cli/src/cmd/cloud/oidc/create.ts
- packages/core/test/coder-sse.test.ts
- packages/email/package.json
- packages/core/test/keyvalue.test.ts
- packages/cli/src/cmd/coder/skill/buckets.ts
- packages/core/src/logger.ts
- packages/server/src/api-reference/thread.ts
- packages/cli/src/cmd/cloud/keyvalue/repl.ts
- packages/cli/src/cmd/cloud/vector/util.ts
- packages/aigateway/tsconfig.json
- packages/cli/src/cmd/coder/skill/create.ts
- packages/adapter/src/json.ts
- packages/sandbox/src/resume.ts
- packages/cli/src/cmd/cloud/oidc/rotate-secret.ts
- packages/cli/src/cmd/cloud/task/create.ts
- packages/email/src/api-reference.ts
- packages/config/tsconfig.json
- packages/adapter/package.json
- packages/sandbox/package.json
- packages/core/src/services/config.ts
- packages/api/tsconfig.json
- packages/coder/src/types.ts
- packages/db/src/util.ts
- packages/core/test/aigateway.test.ts
- packages/schedule/src/api-reference.ts
- packages/coder/src/discover.ts
- packages/core/src/error.ts
- packages/server/src/api-reference/apikey.ts
- knip.json
- packages/sandbox/src/pause.ts
- packages/cli/src/cmd/coder/loop.ts
- packages/cli/src/cmd/cloud/db/logs.ts
- packages/cli/src/cmd/cloud/db/sql.ts
- packages/core/src/json.ts
- packages/keyvalue/tsconfig.json
- packages/server/src/api-reference/storage.ts
- packages/cli/src/cmd/cloud/db/get.ts
- packages/server/src/api-reference/user.ts
- packages/adapter/src/logger.ts
- packages/db/tsconfig.json
- packages/cli/src/cmd/cloud/workflow/util.ts
- docs/src/web/content/services/storage/key-value.mdx
- packages/sandbox/src/files.ts
- packages/cli/src/cmd/coder/workspace/delete.ts
- packages/coder/src/websocket.ts
- packages/keyvalue/src/api-reference.ts
- docs/src/web/content/reference/api/coder.mdx
- packages/server/src/api-reference/region.ts
- packages/server/package.json
- packages/server/src/api-reference/session.ts
- packages/sandbox/src/runtime.ts
- packages/db/src/tables.ts
- packages/coder/package.json
- packages/coder/src/session-data.ts
- packages/api/package.json
- packages/coder/src/api-reference.ts
- packages/core/src/services/env.ts
- packages/sandbox/src/client.ts
- docs/scripts/api-reference/registry.ts
- packages/cli/src/cmd/cloud/workflow/list.ts
- packages/cli/src/cmd/coder/skill/list.ts
- packages/queue/src/service.ts
- packages/cli/src/cmd/cloud/monitor.ts
- packages/sandbox/src/job.ts
- packages/db/package.json
- packages/adapter/tsconfig.json
- packages/cli/src/cmd/cloud/oidc/activity.ts
- packages/cli/src/cmd/cloud/workflow/get.ts
- packages/core/src/services/api.ts
- packages/keyvalue/package.json
- packages/cli/src/cmd/cloud/email/util.ts
- docs/package.json
- packages/cli/src/cmd/coder/get.ts
- packages/client/src/logger.ts
- packages/cli/src/cmd/cloud/schedule/util.ts
- packages/sandbox/src/api-reference.ts
- packages/adapter/src/exception.ts
- packages/cli/src/cmd/cloud/keyvalue/util.ts
- packages/client/src/pagination.ts
- install.sh
- packages/schedule/package.json
- packages/sandbox/src/types.ts
- packages/opencode/src/plugin/hooks/compaction-utils.ts
- docs/src/web/content/services/oidc-provider.mdx
- packages/server/src/api-reference/machine.ts
- packages/config/src/config.ts
- packages/coder/src/sse.ts
- packages/db/src/index.ts
- packages/server/src/api-reference/project.ts
- docs/scripts/generate-api-reference.ts
- packages/adapter/src/index.ts
- packages/adapter/src/fetch.ts
- packages/server/src/api-reference/org.ts
- docs/src/web/content/services/storage/custom.mdx
- packages/keyvalue/src/index.ts
- packages/adapter/src/error.ts
- packages/cli/tsconfig.json
- docs/src/web/content/reference/api/sandboxes.mdx
- packages/aigateway/package.json
- packages/aigateway/src/index.ts
- packages/sandbox/src/util.ts
- packages/sandbox/src/index.ts
- packages/queue/src/index.ts
- packages/coder/src/index.ts
- packages/sandbox/src/run.ts
- packages/api/src/index.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (15)
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Run
bun run formatusing Biome with tabs (width 3), single quotes, semicolons, lineWidth 100, and trailingCommas es5
Files:
packages/cli/src/cmd/cloud/email/send.tspackages/sandbox/src/resolve.tspackages/sandbox/src/execute.tspackages/cli/src/cmd/cloud/oidc/get.tspackages/cli/src/cmd/coder/start.tspackages/cli/src/cmd/cloud/task/update.tspackages/core/test/queue.test.tsdocs/src/api/schedules/route.tspackages/email/src/service.tspackages/server/src/api-reference/queue.tspackages/cli/src/cmd/coder/workspace/list.tspackages/cli/src/cmd/coder/users.tspackages/coder/src/skills.tspackages/server/src/api-reference/stream.tspackages/server/src/api-reference/oauth.tspackages/cli/src/cmd/coder/list.tspackages/email/src/index.tspackages/schedule/src/index.tspackages/adapter/src/http-util.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Use TypeScript in strict mode with ESNext target and bundler moduleResolution
UseStructuredErrorfrom@agentuity/corefor error handling
Files:
packages/cli/src/cmd/cloud/email/send.tspackages/sandbox/src/resolve.tspackages/sandbox/src/execute.tspackages/cli/src/cmd/cloud/oidc/get.tspackages/cli/src/cmd/coder/start.tspackages/cli/src/cmd/cloud/task/update.tspackages/core/test/queue.test.tsdocs/src/api/schedules/route.tspackages/email/src/service.tspackages/server/src/api-reference/queue.tspackages/cli/src/cmd/coder/workspace/list.tspackages/cli/src/cmd/coder/users.tspackages/coder/src/skills.tspackages/server/src/api-reference/stream.tspackages/server/src/api-reference/oauth.tspackages/cli/src/cmd/coder/list.tspackages/email/src/index.tspackages/schedule/src/index.tspackages/adapter/src/http-util.ts
packages/cli/src/**/*.ts
📄 CodeRabbit inference engine (packages/cli/AGENTS.md)
packages/cli/src/**/*.ts: Usetui.*helpers for formatted output (header,info,success,warning,error,table,progress)
Usectx.loggerfor logging;logger.fatal()logs and exits with code 1
Useawait readFile(p, 'utf-8')andawait writeFile(p, content)fromnode:fs/promisesfor file I/O
ImportpathExistsfromnode-compat/fsfor 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.jsontype checking enforces this
Imports must use explicit.tsextensions for relative paths (e.g.,from './foo.ts', notfrom './foo'); TypeScript'srewriteRelativeImportExtensionswill rewrite them to.jsin output
Always checkisJSONMode()for machine-readable output in command handlers
UserequireAuth(ctx)oroptionalAuth(ctx)for authenticated commands
Files:
packages/cli/src/cmd/cloud/email/send.tspackages/cli/src/cmd/cloud/oidc/get.tspackages/cli/src/cmd/coder/start.tspackages/cli/src/cmd/cloud/task/update.tspackages/cli/src/cmd/coder/workspace/list.tspackages/cli/src/cmd/coder/users.tspackages/cli/src/cmd/coder/list.ts
docs/src/web/content/**/*.mdx
📄 CodeRabbit inference engine (docs/AGENTS.md)
Treat
src/web/content/**/*.mdxas the source for docs content; add docs pages through coordinated changes to content, route, andmeta.jsonfiles
docs/src/web/content/**/*.mdx: Context-then-code: start with 1-2 sentences of motivation, then working code immediately
Avoid walls of text; use progressive disclosure with basic concepts first, advanced topics later
Standalone code examples must include imports and be runnable; short inline references are fine without imports
Use headings, callouts, and inline comments that explain 'why' not 'what' to keep documentation scannable
Use benefit-focused language without hollow adjectives; explain why someone would use a feature instead of using salesy language
Read SDK source and AGENTS.md files before documenting APIs or CLI flags to ensure source-verified documentation
Check current upstream framework docs before documenting framework examples; local Agentuity verification is required, and working code is not enough if the framework shape is not idiomatic
Use action-oriented page titles (e.g., 'Calling Other Agents' not 'Agent Communication') and provide one-sentence descriptions in frontmatter
Page introductions should be 1-2 sentences, problem-focused, and add value beyond the frontmatter description
Use Title Case for short, chapter-like headings and sentence case for questions and explanatory headings; preserve exact casing for product names, acronyms, API names, config keys, CLI commands, file names, model IDs, and code identifiers
Cross-links must include context explaining why the reader should follow the link, not generic link text
Link to external tools on first mention only; do not re-link on the same page
Use callout type 'info' for context and clarifications, 'warning' for gotchas and required setup, and 'tip' for optimizations and advanced patterns
Do not start with feature descriptions; lead with the use case instead. Don't document defaults as features
Do not use generic cross-links without context. Alw...
Files:
docs/src/web/content/reference/api/vector.mdx
**/packages/*/tsconfig.json
📄 CodeRabbit inference engine (AGENTS.md)
Each package must have
tsconfig.json(excludestest/) and a separatetsconfig.test.json(includes both)
Files:
packages/core/tsconfig.json
packages/core/**/*.test.ts
📄 CodeRabbit inference engine (packages/core/AGENTS.md)
Use Bun's built-in test runner with
bun testwhen adding tests
Files:
packages/core/test/queue.test.ts
**/packages/*/test/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/packages/*/test/**/*.{ts,tsx}: Place tests intest/folder parallel tosrc/directory, never insidesrc/or under__tests__/
Import from../src/in test files
Use@agentuity/test-utilsfor shared mocks in tests
Files:
packages/core/test/queue.test.ts
docs/src/api/**/*.ts
📄 CodeRabbit inference engine (docs/AGENTS.md)
Structure API routes under
src/api/following the pattern of existing endpoints (hello, chat, streaming, sse-stream, sandbox)
Files:
docs/src/api/schedules/route.ts
packages/email/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (packages/email/AGENTS.md)
Ensure the package runtime is compatible with Node.js and Bun
Files:
packages/email/src/service.tspackages/email/src/index.ts
packages/server/src/**/*.ts
📄 CodeRabbit inference engine (packages/server/AGENTS.md)
packages/server/src/**/*.ts: All code must be written in TypeScript
Use zod for runtime validation of data
Always use.tsextensions in relative imports (e.g.,from '../api.ts', notfrom '../api') for Node.js ESM compatibility
Files:
packages/server/src/api-reference/queue.tspackages/server/src/api-reference/stream.tspackages/server/src/api-reference/oauth.ts
packages/coder/**/*.{ts,tsx}
📄 CodeRabbit inference engine (packages/coder/AGENTS.md)
Ensure CoderClient, WebSocket/SSE clients, and types are exported from the
@agentuity/coderpackage
Files:
packages/coder/src/skills.ts
packages/queue/**/package.json
📄 CodeRabbit inference engine (packages/queue/AGENTS.md)
Dependencies include
@agentuity/adapter,@agentuity/client,@agentuity/config, and zod
Files:
packages/queue/package.json
**/packages/*/src/index.ts
📄 CodeRabbit inference engine (AGENTS.md)
Use named exports from package
index.tsfiles
Files:
packages/email/src/index.tspackages/schedule/src/index.ts
packages/email/src/index.ts
📄 CodeRabbit inference engine (packages/email/AGENTS.md)
Export EmailClient and all types from
@agentuity/emailmain entry point
Files:
packages/email/src/index.ts
packages/schedule/**/index.{ts,tsx}
📄 CodeRabbit inference engine (packages/schedule/AGENTS.md)
Export ScheduleClient and all types from
@agentuity/schedulein the main entry point
Files:
packages/schedule/src/index.ts
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:16.426Z
Learning: Agentuity is infrastructure for deploying apps, APIs, static sites, backend work, and agents. Start documentation from the thing the reader is building
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:16.426Z
Learning: Treat existing app tools and Agentuity-native services as complementary; readers can keep their framework logger, database client, provider SDKs, and framework conventions. Use Agentuity services when built-in credentials, managed resources, inspection surfaces, or coding-agent-friendly composition reduce setup
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:16.426Z
Learning: An agent is model-backed app code with a clear task. It can live in a route, server function, queue consumer, schedule target, script, or shared module. Agentuity also deploys apps, APIs, services, and static sites that are not themselves agents
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:16.426Z
Learning: When a page is not about migration, explain the current app shape directly; do not frame normal docs as a v2-to-v3 comparison
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:16.426Z
Learning: SDK Explorer demos teach with just-in-time learning. Each explanation answers the question the demo raises at that moment: what the concept is, when to use it, what to notice in the live demo or code, and where to go next
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:16.426Z
Learning: Do not assume the reader already knows routes, services, streaming, or agents. Tie the explanation to the behavior on the page. Keep the explanation smaller than a guide, then link to the canonical docs page for setup or reference
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:16.426Z
Learning: Use one clear server shape in Explorer examples. Hono is the default because route and service boundaries are visible. Mention a few transferable framework shapes only when useful, for example Next.js route handlers, SvelteKit `+server.ts`, or TanStack Start server routes. Link to Frameworks instead of listing every framework
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:16.426Z
Learning: Keep feature docs provider-agnostic where possible; use current model names in code examples and verify they're up to date before publishing. When listing providers or models in tables, link to each provider's model page
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:16.426Z
Learning: When writing service docs, verify the package that owns the feature being documented; do not use a neighboring helper package as proof that another service works
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:16.426Z
Learning: Relational database helpers belong in database-specific, migration, or reference pages. They should not be the default state example for unrelated services, and they should not stand in for testing storage, messaging, execution, observability, identity, or other dedicated service clients
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:16.426Z
Learning: Framework and Build pages need the same depth as feature and service docs: when-to-use guidance, a complete example, validation steps, gotchas, and source links. Do not ship pages that are only setup commands plus a trivial route snippet
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:16.426Z
Learning: SDK Reference pages use a hybrid format: narrative intro followed by structured method documentation. Each method gets: parameters + return type + example. Mark optional parameters explicitly. Use param tables for methods with many parameters
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:16.426Z
Learning: The sidebar is auto-generated at build time by `scripts/generate-nav-data.ts`. Page ordering within each section is controlled by the `meta.json` file in the same directory
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:16.426Z
Learning: Every new documentation page requires three things: (1) MDX content file in `src/web/content/`, (2) Route file in `src/web/routes/_docs/`, and (3) `meta.json` entry in the same content directory. The `scripts/validate-routes.ts` script auto-generates missing route files
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:20.727Z
Learning: Maintain Node.js and Bun runtime compatibility
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:20.727Z
Learning: Build the package using the 'bun run build' command
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:20.727Z
Learning: Run typecheck using 'bun run typecheck' command
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:20.727Z
Learning: Publish agentuity/coder only after publishing agentuity/adapter, agentuity/api, agentuity/client, agentuity/config, and agentuity/sandbox
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:25.432Z
Learning: Build the agentuity/db package using `bun run build`
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:25.432Z
Learning: Run `bun run typecheck` to typecheck the agentuity/db package
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:25.432Z
Learning: Ensure agentuity/db exports DBClient and all types from the package
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:25.432Z
Learning: Maintain runtime compatibility with both Node.js and Bun
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:25.432Z
Learning: Ensure agentuity/db has dependencies on agentuity/adapter, agentuity/api, agentuity/client, agentuity/config, and zod
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:25.432Z
Learning: Publish agentuity/db only after publishing agentuity/adapter, agentuity/api, agentuity/client, and agentuity/config
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:30.962Z
Learning: Publish after agentuity/adapter, agentuity/client, and agentuity/config have been published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:36.619Z
Learning: Build the package using `bun run build` command
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:36.619Z
Learning: Run typecheck using `bun run typecheck` command
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:36.619Z
Learning: Ensure runtime compatibility with both Node.js and Bun
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:36.619Z
Learning: Export KeyValueClient, KeyValueStorageService, and all KV types/schemas from the package entry point
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:36.619Z
Learning: Publish this package after agentuity/adapter, agentuity/client, and agentuity/config have been published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:41.700Z
Learning: Must publish agentuity/queue after agentuity/core has been published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:41.700Z
Learning: Package must be compatible with both Node.js and Bun runtimes
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:41.700Z
Learning: Use QueueClient for publishing messages to queues with ergonomic client interface
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:47.043Z
Learning: Build the package using `bun run build` command
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:47.043Z
Learning: Run `bun run typecheck` for TypeScript type checking
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:47.043Z
Learning: Clean build artifacts with `rm -rf dist` command
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:47.043Z
Learning: Ensure runtime compatibility with both Node.js and Bun
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:47.043Z
Learning: Publish the package after `agentuity/adapter`, `agentuity/api`, `agentuity/client`, and `agentuity/config` have been published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:51.676Z
Learning: Build the package using `bun run build` command
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:51.676Z
Learning: Run `bun run typecheck` for type checking
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:51.676Z
Learning: Clean build artifacts using `rm -rf dist`
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:51.676Z
Learning: Ensure the package is Node.js and Bun compatible at runtime
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:51.676Z
Learning: Import ScheduleClient from agentuity/schedule in client code examples
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:51.676Z
Learning: Publish package only after agentuity/core is published
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:57.654Z
Learning: Re-export agentuity/core types and `z` from zod in public APIs
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:57.654Z
Learning: Platform CLI APIs are owned by agentuity/server and should be organized in the `api/` directory with subdirectories for each resource type (user/, org/, project/, region/, session/, thread/, apikey/, oauth/, machine/, monitoring/, storage/, workflow/, queue/, stream/, webhook/)
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:57.654Z
Learning: The package is CLI-facing and consumed primarily by agentuity/cli; it is not intended for use in deployed user code
Learnt from: CR
Repo: agentuity/sdk
Timestamp: 2026-06-17T23:07:57.654Z
Learning: Must publish agentuity/server after agentuity/core due to dependency order
📚 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/email/send.tspackages/sandbox/src/resolve.tspackages/sandbox/src/execute.tspackages/cli/src/cmd/cloud/oidc/get.tspackages/cli/src/cmd/coder/start.tspackages/cli/src/cmd/cloud/task/update.tspackages/core/test/queue.test.tsdocs/src/api/schedules/route.tspackages/email/src/service.tspackages/server/src/api-reference/queue.tspackages/cli/src/cmd/coder/workspace/list.tspackages/cli/src/cmd/coder/users.tspackages/coder/src/skills.tspackages/server/src/api-reference/stream.tspackages/server/src/api-reference/oauth.tspackages/cli/src/cmd/coder/list.tspackages/email/src/index.tspackages/schedule/src/index.tspackages/adapter/src/http-util.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/email/send.tspackages/cli/src/cmd/cloud/oidc/get.tspackages/cli/src/cmd/cloud/task/update.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/email/send.tspackages/cli/src/cmd/cloud/oidc/get.tspackages/cli/src/cmd/coder/start.tspackages/cli/src/cmd/cloud/task/update.tspackages/cli/src/cmd/coder/workspace/list.tspackages/cli/src/cmd/coder/users.tspackages/cli/src/cmd/coder/list.ts
📚 Learning: 2026-01-09T20:33:30.464Z
Learnt from: jhaynie
Repo: agentuity/sdk PR: 515
File: apps/testing/nextjs-app/agentuity/tsconfig.json:0-0
Timestamp: 2026-01-09T20:33:30.464Z
Learning: In TypeScript tsconfig.json files used by Agentuity projects, when a generated type file (e.g. .agentuity/.agentuity_types.ts) must be included while its parent directory is excluded, use include with an explicit file path (or a precise glob) instead of files. The files array requires files to exist at parse time and will fail for generated files; include with a suitable pattern allows the file to be picked up once generated without failing if it doesn't exist yet.
Applied to files:
packages/core/tsconfig.json
📚 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/core/test/queue.test.ts
📚 Learning: 2025-12-19T14:19:33.765Z
Learnt from: jhaynie
Repo: agentuity/sdk PR: 259
File: packages/cli/src/cmd/build/vite/registry-generator.ts:306-312
Timestamp: 2025-12-19T14:19:33.765Z
Learning: Route files under src/api should use the .ts extension only (no .tsx) and regex patterns for such paths should anchor to \.ts$ (e.g., /\/.ts$/). Agent files may support both .ts and .tsx, but route files in the Agentuity SDK codebase are restricted to .ts. This guideline applies to all similar route files under src/api across the repository.
Applied to files:
docs/src/api/schedules/route.ts
📚 Learning: 2026-02-25T22:13:01.823Z
Learnt from: Huijiro
Repo: agentuity/sdk PR: 1063
File: apps/testing/vite-rsc-app/agentuity/src/api/index.ts:26-26
Timestamp: 2026-02-25T22:13:01.823Z
Learning: Agentuity SDK requires default exports for API route files (e.g., src/api/**/index.ts and src/api/**/route.ts) because the CLI's generateRouteRegistry relies on default exports to discover routes. Using named exports will skip route generation and lead to runtime 500 errors. This overrides typical guidance about named exports in index.ts files; ensure a default export is present in all relevant API route files under src/api/**/.
Applied to files:
docs/src/api/schedules/route.ts
📚 Learning: 2025-12-30T00:13:37.849Z
Learnt from: jhaynie
Repo: agentuity/sdk PR: 355
File: packages/server/src/api/sandbox/util.ts:2-6
Timestamp: 2025-12-30T00:13:37.849Z
Learning: In the packages/server tree, treat code as runtime-agnostic between Node.js and Bun. Ensure TypeScript files (e.g., util.ts) import and use APIs in a way that works under both runtimes. It is acceptable to rely on Bun’s Node.js compatibility for built-ins accessed via the node: namespace (e.g., node:events, node:stream, node:buffer). During reviews, prefer patterns and imports that remain compatible with Bun's environment, and flag any hard dependencies on runtime-specific globals or non-portable Node APIs.
Applied to files:
packages/server/src/api-reference/queue.tspackages/server/src/api-reference/stream.tspackages/server/src/api-reference/oauth.ts
📚 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/queue/package.jsonpackages/config/package.jsonpackages/core/package.json
🪛 LanguageTool
PLAN.md
[style] ~123-~123: This phrase is redundant. Consider writing “duplicates” or “copies”.
Context: ...toServiceException`) - [x] Core retains duplicate copies until Phase 5 deletes them (adapter own...
(DUPLICATE_COPY)
🪛 OpenGrep (1.22.0)
packages/adapter/src/http-util.ts
[ERROR] 12-12: Dynamic command passed to child_process.exec/execSync. Use child_process.execFile or spawn with an argument array instead.
(coderabbit.command-injection.exec-js)
[ERROR] 15-15: Dynamic command passed to child_process.exec/execSync. Use child_process.execFile or spawn with an argument array instead.
(coderabbit.command-injection.exec-js)
[ERROR] 18-18: Dynamic command passed to child_process.exec/execSync. Use child_process.execFile or spawn with an argument array instead.
(coderabbit.command-injection.exec-js)
🔇 Additional comments (21)
docs/src/web/content/reference/api/vector.mdx (1)
7-7: LGTM!packages/config/package.json (1)
2-3: LGTM!Also applies to: 6-7, 12-13, 17-18, 21-23, 26-27, 30-31, 39-40
packages/coder/src/skills.ts (1)
2-2: LGTM!packages/sandbox/src/execute.ts (1)
3-3: LGTM!packages/email/src/index.ts (1)
1-50: LGTM!packages/email/src/service.ts (1)
1-3: LGTM!packages/queue/package.json (1)
27-32: LGTM!packages/core/package.json (1)
74-91: LGTM!packages/core/test/queue.test.ts (1)
1-9: LGTM!packages/core/tsconfig.json (1)
11-16: LGTM!packages/schedule/src/index.ts (1)
1-2: LGTM!Also applies to: 15-24, 40-47, 49-49
packages/server/src/api-reference/oauth.ts (1)
16-16: LGTM!Also applies to: 18-18
packages/server/src/api-reference/queue.ts (1)
17-17: LGTM!Also applies to: 19-19
packages/server/src/api-reference/stream.ts (1)
7-7: LGTM!Also applies to: 9-9
packages/cli/src/cmd/coder/users.ts (1)
2-2: LGTM!packages/cli/src/cmd/coder/workspace/list.ts (1)
6-6: LGTM!packages/cli/src/cmd/cloud/email/send.ts (1)
3-3: LGTM!packages/cli/src/cmd/cloud/oidc/get.ts (1)
1-1: LGTM!packages/cli/src/cmd/cloud/task/update.ts (1)
6-6: LGTM!packages/cli/src/cmd/coder/list.ts (1)
3-6: LGTM!packages/cli/src/cmd/coder/start.ts (1)
6-6: LGTM!
Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Service package isolation: move service implementations out of
@agentuity/coreinto standalone@agentuity/{service}packages and platform admin APIs into@agentuity/server. Target release 3.1.0 (minor) — supported app imports (@agentuity/{service},@agentuity/hono,@agentuity/runtime) are unchanged; this is internal monorepo layout + slimmer installs.Done
Shared infrastructure (Phase 1)
@agentuity/adapter— HTTP fetch adapter, exceptions, URL helpers@agentuity/config— env + service URL resolution@agentuity/client— shared*Clientfactory / pagination@agentuity/api— platformAPIClientService packages (Phase 2–3) — each owns
*Service+*Clientin its package:keyvalue,vector,stream,email,schedule,webhook,db,queue,task,aigateway,sandbox,coderPlatform APIs (Phase 4) — moved to
@agentuity/server:user,org,project,region,session,thread,apikey,oauth,machine,monitoring,storage,workflow,statsqueue,stream,webhookplatform admin APIs; sandbox runtime via@agentuity/sandbox+cliSandboxListon server*Serviceonly for queue/stream/webhook; sandbox removed from core barrel; platform removed from core barrelOther
@agentuity/serverPLAN.mdtracks milestones; semver policy: 3.1.0, not 4.0.0;@agentuity/core/{service}subpaths are internal-only (not a user compat surface)Remaining (Phase 5 / 3.1.0 checklist)
packages/core/src/services/{service}/@agentuity/core/{service}subpath exports once monorepo imports are clean@agentuity/corepathsexport * from '@agentuity/keyvalue') — blocked on adapter/core cycleArchitecture (current)
Test plan
@agentuity/serverunit tests (191 pass on latest batch)bun run allbefore 3.1.0 tagtests/services/Summary by CodeRabbit
@agentuity/{service}), reducing reliance on the full@agentuity/corecatalog.@agentuity/apiSDK client, typed pagination utilities, and adapter utilities for structured errors and HTTP/fetch handling.