Skip to content

fix(core): replace browser/public enums with list-derived unions#690

Closed
rahulkarajgikar wants to merge 1 commit intotruffle-ai:mainfrom
rahulkarajgikar:browser-public-enums
Closed

fix(core): replace browser/public enums with list-derived unions#690
rahulkarajgikar wants to merge 1 commit intotruffle-ai:mainfrom
rahulkarajgikar:browser-public-enums

Conversation

@rahulkarajgikar
Copy link
Copy Markdown
Collaborator

@rahulkarajgikar rahulkarajgikar commented Mar 27, 2026

Summary

  • replace ErrorScope, ErrorType, and StorageErrorCode enums with const-list-derived union types
  • remove the enum-like runtime objects so consumers use plain string literals instead of ErrorScope.X or ErrorType.X
  • update internal OSS consumers and browser exports to match the list-plus-type-only API

Validation

  • pnpm lint
  • pnpm build

Closes #688

Summary by CodeRabbit

  • Refactor
    • Reworked the error/type system: enums replaced with string-based union types and error classification is now emitted as stable string codes, improving consistency and type safety across the platform.
  • Documentation
    • OpenAPI version bumped to 1.6.19.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

@rahulkarajgikar is attempting to deploy a commit to the Shaunak's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

📝 Walkthrough

Walkthrough

Replaces exported enums ErrorScope, ErrorType, and StorageErrorCode with const-list-derived runtime arrays (ERROR_SCOPES, ERROR_TYPES, STORAGE_ERROR_CODES) and corresponding union types. Updates ~60+ call sites and tests to use string literals for error scope/type/code while preserving existing behavior.

Changes

Cohort / File(s) Summary
Core Type Definitions
packages/core/src/errors/types.ts, packages/core/src/storage/error-codes.ts
Removed export enum declarations; added ERROR_SCOPES, ERROR_TYPES, STORAGE_ERROR_CODES as const arrays and derived union types.
Core Exports & Indexes
packages/core/src/errors/index.ts, packages/core/src/index.browser.ts, packages/core/src/storage/index.ts
Swapped runtime enum exports for const-array values (ERROR_*, STORAGE_ERROR_CODES) and added type-only re-exports of the derived union types.
Runtime Error Type Usage
packages/core/src/errors/DextoRuntimeError.ts
Converted enum value imports to type-only imports to avoid emitting enum runtime objects.
Core Error Factories & Validation
packages/core/src/.../errors.ts, packages/core/src/llm/..., packages/core/src/session/..., packages/core/src/storage/errors.ts, packages/core/src/tools/..., packages/core/src/.../schemas.ts, packages/core/src/.../resolver.ts, packages/core/src/.../validation.ts
Removed imports of ErrorScope/ErrorType/StorageErrorCode; replaced all DextoRuntimeError/validation params that used enum members with corresponding literal strings (scope/type/code).
Agent Management
packages/agent-management/src/.../errors.ts, packages/agent-management/src/.../runtime.ts
Updated all error factory calls to use literal scope/type strings; removed enum imports.
Tools Packages
packages/tools-builtins/src/..., packages/tools-filesystem/src/errors.ts, packages/tools-plan/src/errors.ts, packages/tools-process/src/errors.ts, packages/tools-scheduler/src/errors.ts, packages/tools-todo/src/errors.ts
Replaced enum-based error type/scope usage with literal strings across factories and request/tool implementations.
Storage Schemas
packages/storage/src/cache/schemas.ts, packages/storage/src/database/schemas.ts
Replaced code, scope, type Zod issue params previously sourced from enums/constants with literal strings.
Server Routes & Middleware
packages/server/src/hono/middleware/error.ts, packages/server/src/hono/routes/*
Removed enum imports; updated error classification checks and thrown error constructions to use literal strings.
Tests Updated
many files under packages/core/src/.../*.test.ts, packages/agent-management/src/.../*.test.ts, packages/tools-builtins/src/.../*.test.ts
Updated assertions and helpers to expect string-literal scope/type/code values instead of enum members.
Changeset
.changeset/tough-countries-sing.md
Added changeset entry documenting the enum→const-array + union-type patch for @dexto/core.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

  • #688: Directly matches the objective to replace ErrorScope, ErrorType, and StorageErrorCode enums with const-list-derived unions.
  • #685: Uses the same const-list + union-type pattern that this change implements.
  • #687: Tracker for removing remaining TypeScript enums; this PR completes that scope.

Possibly related PRs

Poem

🐰 I hopped through code, with lint in paw,

swapped enums for lists without a flaw.
Strings now sing where members sat,
one source of truth — tidy and flat.
A carrot clap for each updated test!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 17.65% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'fix(core): replace browser/public enums with list-derived unions' accurately summarizes the primary objective of replacing ErrorScope, ErrorType, and StorageErrorCode enums with const-list-derived unions.
Linked Issues check ✅ Passed The code changes comprehensively meet all requirements from issue #688: ErrorScope, ErrorType, and StorageErrorCode enums are replaced with const-list-derived types; const lists serve as the single source of truth; all call sites updated to use string literals; public exports and browser surfaces updated; builds/tests pass.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the enum replacement objective. Updated files are error definitions, call sites using those errors, tests validating error behavior, and type imports—all necessary for the consistent enum-to-union migration across the codebase.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dexto-docs Ready Ready Preview, Comment Mar 27, 2026 1:25pm

Request Review

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
packages/core/src/errors/types.test.ts (1)

1-18: Add one public-entrypoint/type-value smoke test.

These assertions cover the leaf module's runtime shape, but the compatibility contract here is broader: consumers should still be able to import from a public barrel and use the same symbol in both type and value positions. A small check like const scope: ErrorScope = ErrorScope.SYSTEM_PROMPT from index.browser.ts (and the storage equivalent) would catch regressions that the current direct-import tests won't.

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

In `@packages/core/src/errors/types.test.ts` around lines 1 - 18, Add a smoke test
that imports the public barrel entrypoint and verifies the symbols work in both
type and value positions: import ErrorScope and ErrorType from the public
entrypoint (index.browser) and add lines like "const scope: ErrorScope =
ErrorScope.SYSTEM_PROMPT" and "const type: ErrorType =
ErrorType.PAYMENT_REQUIRED" (and assert they equal the expected values) to
ensure consumers can use the same symbol as a type and a value; mirror the same
check for the storage/public-node barrel if applicable.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/core/src/errors/types.test.ts`:
- Around line 1-18: Add a smoke test that imports the public barrel entrypoint
and verifies the symbols work in both type and value positions: import
ErrorScope and ErrorType from the public entrypoint (index.browser) and add
lines like "const scope: ErrorScope = ErrorScope.SYSTEM_PROMPT" and "const type:
ErrorType = ErrorType.PAYMENT_REQUIRED" (and assert they equal the expected
values) to ensure consumers can use the same symbol as a type and a value;
mirror the same check for the storage/public-node barrel if applicable.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6077ca6d-5aae-467c-850e-0889f23cb22c

📥 Commits

Reviewing files that changed from the base of the PR and between 762d827 and babe8ca.

📒 Files selected for processing (8)
  • .changeset/tough-countries-sing.md
  • packages/core/src/errors/index.ts
  • packages/core/src/errors/types.test.ts
  • packages/core/src/errors/types.ts
  • packages/core/src/index.browser.ts
  • packages/core/src/storage/error-codes.test.ts
  • packages/core/src/storage/error-codes.ts
  • packages/core/src/storage/index.ts

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/core/src/storage/errors.ts (1)

12-356: 🛠️ Refactor suggestion | 🟠 Major

Keep storage/errors.ts consuming the canonical storage code definitions.

This PR is trying to make STORAGE_ERROR_CODES / StorageErrorCode the source of truth, but this file now repeats every emitted code literal inline in both DextoRuntimeError and DextoValidationError payloads. That makes packages/core/src/storage/error-codes.ts non-canonical again for this module and makes drift easy the next time a code is renamed or added. Please route these factories back through the compatibility namespace or a helper derived from the exported list instead of hardcoding the strings here.

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

In `@packages/core/src/storage/errors.ts` around lines 12 - 356, The factories in
errors.ts (e.g., connectionFailed, notConnected, managerNotInitialized,
blobInvalidConfig, blobSizeExceeded, etc.) hardcode error code string literals
instead of using the canonical STORAGE_ERROR_CODES / StorageErrorCode; update
each DextoRuntimeError and DextoValidationError construction to import and
reference the canonical code from the storage/error-codes.ts compatibility
export (or a small helper that maps enum keys to strings) so the code values
come from that single source of truth rather than inline literals; ensure both
runtime factories (connectionFailed, readFailed, blobOperationFailed, etc.) and
validation factories (databaseInvalidConfig, blobInvalidConfig,
cacheInvalidConfig) use the canonical symbol when constructing errors.
🧹 Nitpick comments (2)
packages/core/src/utils/result.ts (1)

257-258: Prefer canonical constants for fallback scope/type to avoid drift.

Line 257, Line 258, Line 270, and Line 271 hardcode 'agent' / 'user'. Since this PR establishes list-derived values as canonical, using exported compatibility constants here would keep defaults tied to the single source of truth.

♻️ Suggested refactor
-                    scope: params.scope ?? 'agent',
-                    type: params.type ?? 'user',
+                    scope: params.scope ?? ErrorScope.AGENT,
+                    type: params.type ?? ErrorType.USER,
...
-                scope: params.scope ?? 'agent',
-                type: params.type ?? 'user',
+                scope: params.scope ?? ErrorScope.AGENT,
+                type: params.type ?? ErrorType.USER,
// Add/import the runtime compatibility namespace from your errors module.

Also applies to: 270-271

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

In `@packages/core/src/utils/result.ts` around lines 257 - 258, Replace the
hardcoded fallback literals for params.scope and params.type with the canonical
runtime compatibility constants exported from your errors module: import the
runtime compatibility namespace (e.g., runtimeCompatibility or
RUNTIME_COMPATIBILITY) and use its scope and type constants instead of 'agent'
and 'user' in the assignments for scope: params.scope ?? ... and type:
params.type ?? ... (also update the same replacements at the other occurrences
around the second pair of defaults). Ensure you reference the exported constant
names from the errors module so defaults stay tied to the single source of
truth.
packages/core/src/systemPrompt/errors.ts (1)

13-72: Keep core error classifiers on the canonical runtime exports.

These raw 'system_prompt' / 'user' / 'system' literals duplicate the canonical values and, for scope, drop compiler protection because core still accepts ErrorScope | string. I’d keep packages/core on ErrorScope.SYSTEM_PROMPT / ErrorType.USER / ErrorType.SYSTEM (or module-level constants derived from them) and reserve free-form strings for out-of-core packages that actually need custom scopes.

♻️ Suggested shape
+import { ErrorScope, ErrorType } from '../errors/types.js';
 import { DextoRuntimeError } from '../errors/DextoRuntimeError.js';
 import { SystemPromptErrorCode } from './error-codes.js';
 import { safeStringify } from '../utils/safe-stringify.js';
+
+const SCOPE = ErrorScope.SYSTEM_PROMPT;

 static invalidFileType(filePath: string, allowedExtensions: string[]) {
     return new DextoRuntimeError(
         SystemPromptErrorCode.FILE_INVALID_TYPE,
-        'system_prompt',
-        'user',
+        SCOPE,
+        ErrorType.USER,
         `File ${filePath} is not a ${allowedExtensions.join(' or ')} file`,
         { filePath, allowedExtensions }
     );
 }

 static fileReadFailed(filePath: string, reason: string) {
     return new DextoRuntimeError(
         SystemPromptErrorCode.FILE_READ_FAILED,
-        'system_prompt',
-        'system',
+        SCOPE,
+        ErrorType.SYSTEM,
         `Failed to read file ${filePath}: ${reason}`,
         { filePath, reason }
     );
 }

Based on learnings: error scopes were broadened to ErrorScope | string so packages outside of core can define their own scopes without modifying the core ErrorScope enum.

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

In `@packages/core/src/systemPrompt/errors.ts` around lines 13 - 72, The error
factory functions (invalidFileType, fileTooLarge, fileReadFailed,
unknownContributorSource, invalidContributorConfig) are using raw strings for
scope/type ('system_prompt', 'user', 'system'); change those to the canonical
core enums (e.g. ErrorScope.SYSTEM_PROMPT and ErrorType.USER / ErrorType.SYSTEM)
to preserve compiler-checked values and avoid free-form strings. Update the top
of the file to import the enums (or module-level constants) and replace the
literal occurrences in each DextoRuntimeError constructor call with the
corresponding enum members, leaving the rest of each returned error object
intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@packages/core/src/storage/errors.ts`:
- Around line 12-356: The factories in errors.ts (e.g., connectionFailed,
notConnected, managerNotInitialized, blobInvalidConfig, blobSizeExceeded, etc.)
hardcode error code string literals instead of using the canonical
STORAGE_ERROR_CODES / StorageErrorCode; update each DextoRuntimeError and
DextoValidationError construction to import and reference the canonical code
from the storage/error-codes.ts compatibility export (or a small helper that
maps enum keys to strings) so the code values come from that single source of
truth rather than inline literals; ensure both runtime factories
(connectionFailed, readFailed, blobOperationFailed, etc.) and validation
factories (databaseInvalidConfig, blobInvalidConfig, cacheInvalidConfig) use the
canonical symbol when constructing errors.

---

Nitpick comments:
In `@packages/core/src/systemPrompt/errors.ts`:
- Around line 13-72: The error factory functions (invalidFileType, fileTooLarge,
fileReadFailed, unknownContributorSource, invalidContributorConfig) are using
raw strings for scope/type ('system_prompt', 'user', 'system'); change those to
the canonical core enums (e.g. ErrorScope.SYSTEM_PROMPT and ErrorType.USER /
ErrorType.SYSTEM) to preserve compiler-checked values and avoid free-form
strings. Update the top of the file to import the enums (or module-level
constants) and replace the literal occurrences in each DextoRuntimeError
constructor call with the corresponding enum members, leaving the rest of each
returned error object intact.

In `@packages/core/src/utils/result.ts`:
- Around line 257-258: Replace the hardcoded fallback literals for params.scope
and params.type with the canonical runtime compatibility constants exported from
your errors module: import the runtime compatibility namespace (e.g.,
runtimeCompatibility or RUNTIME_COMPATIBILITY) and use its scope and type
constants instead of 'agent' and 'user' in the assignments for scope:
params.scope ?? ... and type: params.type ?? ... (also update the same
replacements at the other occurrences around the second pair of defaults).
Ensure you reference the exported constant names from the errors module so
defaults stay tied to the single source of truth.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9e073f3c-6e1b-40d3-a4d7-8864dfe86364

📥 Commits

Reviewing files that changed from the base of the PR and between babe8ca and dc1d3d0.

📒 Files selected for processing (76)
  • .changeset/tough-countries-sing.md
  • packages/agent-management/src/config/errors.ts
  • packages/agent-management/src/config/loader.test.ts
  • packages/agent-management/src/plugins/errors.ts
  • packages/agent-management/src/plugins/marketplace/errors.ts
  • packages/agent-management/src/preferences/errors.ts
  • packages/agent-management/src/preferences/loader.test.ts
  • packages/agent-management/src/preferences/schemas.ts
  • packages/agent-management/src/registry/errors.ts
  • packages/agent-management/src/registry/registry.test.ts
  • packages/agent-management/src/resolver.test.ts
  • packages/agent-management/src/runtime/errors.ts
  • packages/agent-management/src/tool-factories/agent-spawner/errors.ts
  • packages/agent-management/src/tool-factories/agent-spawner/runtime.ts
  • packages/agent-management/src/writer.test.ts
  • packages/core/src/agent/DextoAgent.lifecycle.test.ts
  • packages/core/src/agent/errors.ts
  • packages/core/src/approval/errors.ts
  • packages/core/src/context/errors.ts
  • packages/core/src/errors/DextoRuntimeError.ts
  • packages/core/src/errors/index.ts
  • packages/core/src/errors/types.ts
  • packages/core/src/hooks/manager.ts
  • packages/core/src/index.browser.ts
  • packages/core/src/llm/errors.ts
  • packages/core/src/llm/executor/turn-executor.ts
  • packages/core/src/llm/providers/codex-app-server.ts
  • packages/core/src/llm/providers/local/errors.ts
  • packages/core/src/llm/registry/index.test.ts
  • packages/core/src/llm/registry/sync.ts
  • packages/core/src/llm/resolver.ts
  • packages/core/src/llm/schemas.ts
  • packages/core/src/llm/services/vercel.integration.test.ts
  • packages/core/src/llm/validation.ts
  • packages/core/src/logger/v2/errors.ts
  • packages/core/src/mcp/errors.ts
  • packages/core/src/mcp/manager.test.ts
  • packages/core/src/mcp/resolver.ts
  • packages/core/src/mcp/schemas.ts
  • packages/core/src/memory/errors.ts
  • packages/core/src/prompts/errors.ts
  • packages/core/src/resources/errors.ts
  • packages/core/src/session/chat-session.ts
  • packages/core/src/session/errors.ts
  • packages/core/src/session/history/database.test.ts
  • packages/core/src/session/session-manager.test.ts
  • packages/core/src/storage/error-codes.ts
  • packages/core/src/storage/errors.ts
  • packages/core/src/storage/index.ts
  • packages/core/src/systemPrompt/contributors.test.ts
  • packages/core/src/systemPrompt/errors.ts
  • packages/core/src/systemPrompt/manager.test.ts
  • packages/core/src/telemetry/errors.ts
  • packages/core/src/tools/errors.ts
  • packages/core/src/tools/tool-manager.integration.test.ts
  • packages/core/src/tools/tool-manager.test.ts
  • packages/core/src/tools/tool-manager.ts
  • packages/core/src/utils/result.test.ts
  • packages/core/src/utils/result.ts
  • packages/core/src/workspace/errors.ts
  • packages/server/src/hono/middleware/error.ts
  • packages/server/src/hono/routes/agents.ts
  • packages/server/src/hono/routes/llm.ts
  • packages/server/src/hono/routes/schedules.ts
  • packages/server/src/hono/routes/sessions.ts
  • packages/server/src/hono/routes/system-prompt.ts
  • packages/storage/src/cache/schemas.ts
  • packages/storage/src/database/schemas.ts
  • packages/tools-builtins/src/implementations/delegate-to-url-tool.test.ts
  • packages/tools-builtins/src/implementations/delegate-to-url-tool.ts
  • packages/tools-builtins/src/implementations/http-request-tool.ts
  • packages/tools-filesystem/src/errors.ts
  • packages/tools-plan/src/errors.ts
  • packages/tools-process/src/errors.ts
  • packages/tools-scheduler/src/errors.ts
  • packages/tools-todo/src/errors.ts
✅ Files skipped from review due to trivial changes (3)
  • packages/core/src/errors/DextoRuntimeError.ts
  • .changeset/tough-countries-sing.md
  • packages/core/src/llm/resolver.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/core/src/errors/index.ts
  • packages/core/src/storage/index.ts
  • packages/core/src/storage/error-codes.ts

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
packages/core/src/llm/schemas.ts (1)

135-136: Optional: centralize repeated issue metadata literals to reduce typo risk.

The same { scope: 'llm', type: 'user' } pair is repeated in many branches. A small shared constant/helper would improve maintainability.

♻️ Optional refactor sketch
+const LLM_USER_ISSUE_META = { scope: 'llm', type: 'user' } as const;
+const LLM_SYSTEM_ISSUE_META = { scope: 'llm', type: 'system' } as const;
...
-            params: {
-                code: LLMErrorCode.MODEL_INCOMPATIBLE,
-                scope: 'llm',
-                type: 'user',
-            },
+            params: {
+                code: LLMErrorCode.MODEL_INCOMPATIBLE,
+                ...LLM_USER_ISSUE_META,
+            },
...
-                        params: {
-                            code: LLMErrorCode.REQUEST_INVALID_SCHEMA,
-                            scope: 'llm',
-                            type: 'system',
-                        },
+                        params: {
+                            code: LLMErrorCode.REQUEST_INVALID_SCHEMA,
+                            ...LLM_SYSTEM_ISSUE_META,
+                        },

Also applies to: 151-152, 172-173, 196-197, 227-228, 250-251, 265-266, 320-321, 335-336

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

In `@packages/core/src/llm/schemas.ts` around lines 135 - 136, The repeated
literal { scope: 'llm', type: 'user' } should be centralized: add a single
shared constant (e.g., LLM_USER_METADATA) in this module and replace each inline
occurrence (the object literals shown in the branches) with that constant to
avoid typos and improve maintainability; if these metadata objects are used
outside the file, export the constant (name it clearly like
LLM_USER_ISSUE_METADATA) and update all references in this file (and imports
elsewhere if exported) so behavior is unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/core/src/llm/schemas.ts`:
- Around line 135-136: The repeated literal { scope: 'llm', type: 'user' }
should be centralized: add a single shared constant (e.g., LLM_USER_METADATA) in
this module and replace each inline occurrence (the object literals shown in the
branches) with that constant to avoid typos and improve maintainability; if
these metadata objects are used outside the file, export the constant (name it
clearly like LLM_USER_ISSUE_METADATA) and update all references in this file
(and imports elsewhere if exported) so behavior is unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: aca46cd3-2429-4f13-a5d1-cf16c0e2c817

📥 Commits

Reviewing files that changed from the base of the PR and between dc1d3d0 and 0f62817.

📒 Files selected for processing (77)
  • .changeset/tough-countries-sing.md
  • docs/static/openapi/openapi.json
  • packages/agent-management/src/config/errors.ts
  • packages/agent-management/src/config/loader.test.ts
  • packages/agent-management/src/plugins/errors.ts
  • packages/agent-management/src/plugins/marketplace/errors.ts
  • packages/agent-management/src/preferences/errors.ts
  • packages/agent-management/src/preferences/loader.test.ts
  • packages/agent-management/src/preferences/schemas.ts
  • packages/agent-management/src/registry/errors.ts
  • packages/agent-management/src/registry/registry.test.ts
  • packages/agent-management/src/resolver.test.ts
  • packages/agent-management/src/runtime/errors.ts
  • packages/agent-management/src/tool-factories/agent-spawner/errors.ts
  • packages/agent-management/src/tool-factories/agent-spawner/runtime.ts
  • packages/agent-management/src/writer.test.ts
  • packages/core/src/agent/DextoAgent.lifecycle.test.ts
  • packages/core/src/agent/errors.ts
  • packages/core/src/approval/errors.ts
  • packages/core/src/context/errors.ts
  • packages/core/src/errors/DextoRuntimeError.ts
  • packages/core/src/errors/index.ts
  • packages/core/src/errors/types.ts
  • packages/core/src/hooks/manager.ts
  • packages/core/src/index.browser.ts
  • packages/core/src/llm/errors.ts
  • packages/core/src/llm/executor/turn-executor.ts
  • packages/core/src/llm/providers/codex-app-server.ts
  • packages/core/src/llm/providers/local/errors.ts
  • packages/core/src/llm/registry/index.test.ts
  • packages/core/src/llm/registry/sync.ts
  • packages/core/src/llm/resolver.ts
  • packages/core/src/llm/schemas.ts
  • packages/core/src/llm/services/vercel.integration.test.ts
  • packages/core/src/llm/validation.ts
  • packages/core/src/logger/v2/errors.ts
  • packages/core/src/mcp/errors.ts
  • packages/core/src/mcp/manager.test.ts
  • packages/core/src/mcp/resolver.ts
  • packages/core/src/mcp/schemas.ts
  • packages/core/src/memory/errors.ts
  • packages/core/src/prompts/errors.ts
  • packages/core/src/resources/errors.ts
  • packages/core/src/session/chat-session.ts
  • packages/core/src/session/errors.ts
  • packages/core/src/session/history/database.test.ts
  • packages/core/src/session/session-manager.test.ts
  • packages/core/src/storage/error-codes.ts
  • packages/core/src/storage/errors.ts
  • packages/core/src/storage/index.ts
  • packages/core/src/systemPrompt/contributors.test.ts
  • packages/core/src/systemPrompt/errors.ts
  • packages/core/src/systemPrompt/manager.test.ts
  • packages/core/src/telemetry/errors.ts
  • packages/core/src/tools/errors.ts
  • packages/core/src/tools/tool-manager.integration.test.ts
  • packages/core/src/tools/tool-manager.test.ts
  • packages/core/src/tools/tool-manager.ts
  • packages/core/src/utils/result.test.ts
  • packages/core/src/utils/result.ts
  • packages/core/src/workspace/errors.ts
  • packages/server/src/hono/middleware/error.ts
  • packages/server/src/hono/routes/agents.ts
  • packages/server/src/hono/routes/llm.ts
  • packages/server/src/hono/routes/schedules.ts
  • packages/server/src/hono/routes/sessions.ts
  • packages/server/src/hono/routes/system-prompt.ts
  • packages/storage/src/cache/schemas.ts
  • packages/storage/src/database/schemas.ts
  • packages/tools-builtins/src/implementations/delegate-to-url-tool.test.ts
  • packages/tools-builtins/src/implementations/delegate-to-url-tool.ts
  • packages/tools-builtins/src/implementations/http-request-tool.ts
  • packages/tools-filesystem/src/errors.ts
  • packages/tools-plan/src/errors.ts
  • packages/tools-process/src/errors.ts
  • packages/tools-scheduler/src/errors.ts
  • packages/tools-todo/src/errors.ts
✅ Files skipped from review due to trivial changes (27)
  • packages/core/src/mcp/schemas.ts
  • packages/core/src/systemPrompt/contributors.test.ts
  • .changeset/tough-countries-sing.md
  • packages/core/src/memory/errors.ts
  • packages/core/src/mcp/resolver.ts
  • packages/core/src/workspace/errors.ts
  • packages/server/src/hono/routes/agents.ts
  • packages/agent-management/src/preferences/loader.test.ts
  • packages/agent-management/src/config/loader.test.ts
  • packages/core/src/errors/DextoRuntimeError.ts
  • packages/core/src/llm/registry/sync.ts
  • packages/core/src/prompts/errors.ts
  • packages/storage/src/database/schemas.ts
  • packages/tools-todo/src/errors.ts
  • packages/core/src/agent/DextoAgent.lifecycle.test.ts
  • packages/agent-management/src/resolver.test.ts
  • packages/tools-plan/src/errors.ts
  • packages/core/src/systemPrompt/errors.ts
  • packages/core/src/utils/result.ts
  • packages/agent-management/src/tool-factories/agent-spawner/errors.ts
  • packages/tools-builtins/src/implementations/delegate-to-url-tool.test.ts
  • packages/core/src/mcp/errors.ts
  • packages/core/src/telemetry/errors.ts
  • packages/core/src/resources/errors.ts
  • docs/static/openapi/openapi.json
  • packages/core/src/llm/errors.ts
  • packages/tools-builtins/src/implementations/delegate-to-url-tool.ts
🚧 Files skipped from review as they are similar to previous changes (31)
  • packages/core/src/mcp/manager.test.ts
  • packages/agent-management/src/writer.test.ts
  • packages/core/src/llm/validation.ts
  • packages/core/src/llm/registry/index.test.ts
  • packages/agent-management/src/plugins/errors.ts
  • packages/core/src/session/history/database.test.ts
  • packages/core/src/session/errors.ts
  • packages/core/src/systemPrompt/manager.test.ts
  • packages/core/src/storage/index.ts
  • packages/core/src/llm/services/vercel.integration.test.ts
  • packages/server/src/hono/routes/llm.ts
  • packages/core/src/llm/resolver.ts
  • packages/server/src/hono/middleware/error.ts
  • packages/core/src/llm/providers/local/errors.ts
  • packages/core/src/hooks/manager.ts
  • packages/core/src/llm/executor/turn-executor.ts
  • packages/server/src/hono/routes/schedules.ts
  • packages/tools-scheduler/src/errors.ts
  • packages/core/src/logger/v2/errors.ts
  • packages/core/src/errors/index.ts
  • packages/core/src/approval/errors.ts
  • packages/core/src/session/chat-session.ts
  • packages/core/src/utils/result.test.ts
  • packages/core/src/errors/types.ts
  • packages/core/src/tools/errors.ts
  • packages/agent-management/src/registry/errors.ts
  • packages/tools-builtins/src/implementations/http-request-tool.ts
  • packages/core/src/index.browser.ts
  • packages/core/src/llm/providers/codex-app-server.ts
  • packages/core/src/storage/errors.ts
  • packages/core/src/storage/error-codes.ts

@rahulkarajgikar
Copy link
Copy Markdown
Collaborator Author

Closing this one. After reviewing the actual consumer value, replacing ErrorScope / ErrorType in this form creates more churn than benefit, and the real follow-up is tightening the error-layer typing without the current string escape hatch in #691.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace remaining browser/public enums with const-list-derived unions

1 participant