diff --git a/bun.lock b/bun.lock index dec333b15..6c1c57b8e 100644 --- a/bun.lock +++ b/bun.lock @@ -225,7 +225,6 @@ "@intx/log": "0.3.0", "@intx/types": "workspace:*", "@intx/workflow": "workspace:*", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", @@ -241,7 +240,7 @@ }, "packages/agent-directory-tools": { "name": "@corbits/agent-directory-tools", - "version": "0.0.5", + "version": "0.0.6", "dependencies": { "@intx/agent": "workspace:*", "@intx/types": "workspace:*", @@ -291,11 +290,11 @@ "name": "@corbits/agent-workflow-authoring", "version": "0.1.0", "dependencies": { + "@corbits/error-sink": "workspace:*", "@intx/authz": "0.3.0", "@intx/db": "workspace:*", "@intx/hub-sessions": "workspace:*", "@intx/types": "workspace:*", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", @@ -366,12 +365,12 @@ "@corbits/artifact-ui": "workspace:*", "@corbits/artifacts": "github:corbitsdev/corbits-artifacts#81049ed24a64e927498c7238bda6ffa66b63d2ab", "@corbits/collections": "workspace:*", + "@corbits/error-sink": "workspace:*", "@corbits/folded-runs": "workspace:*", "@intx/crypto": "0.3.0", "@intx/db": "workspace:*", "@intx/hub-api": "workspace:*", "@intx/types": "workspace:*", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", @@ -386,9 +385,9 @@ "version": "0.0.1", "dependencies": { "@corbits/api-query": "workspace:*", + "@corbits/error-sink": "workspace:*", "@corbits/migration-runner": "workspace:*", "@intx/hub-api": "workspace:*", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", @@ -414,7 +413,7 @@ }, "packages/capability-tools": { "name": "@corbits/capability-tools", - "version": "0.0.3", + "version": "0.0.4", "dependencies": { "@intx/agent": "workspace:*", "@intx/types": "workspace:*", @@ -427,7 +426,7 @@ }, "packages/catalog-tools": { "name": "@corbits/catalog-tools", - "version": "0.0.1", + "version": "0.0.2", "dependencies": { "@intx/agent": "workspace:*", "@intx/types": "workspace:*", @@ -573,8 +572,8 @@ "name": "@corbits/commands", "version": "0.0.1", "dependencies": { + "@corbits/error-sink": "workspace:*", "@intx/hub-api": "workspace:*", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "hono": "^4.11.9", }, @@ -707,6 +706,7 @@ "dependencies": { "@corbits/agent-directory": "workspace:*", "@corbits/assistant-workflow": "workspace:*", + "@corbits/error-sink": "workspace:*", "@corbits/migration-runner": "workspace:*", "@corbits/routines": "workspace:*", "@corbits/webhook-triggers": "workspace:*", @@ -887,13 +887,13 @@ "name": "@corbits/inference-catalog", "version": "0.0.1", "dependencies": { + "@corbits/error-sink": "workspace:*", "@corbits/migration-runner": "workspace:*", "@corbits/ollama-adapter": "workspace:*", "@intx/db": "workspace:*", "@intx/hub-api": "workspace:*", "@intx/inference-catalog": "0.3.0", "@intx/types": "workspace:*", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", @@ -921,6 +921,7 @@ "name": "@corbits/insights", "version": "0.0.1", "dependencies": { + "@corbits/error-sink": "workspace:*", "@corbits/migration-runner": "workspace:*", "@corbits/provider-pricing": "workspace:*", "@intx/db": "workspace:*", @@ -928,7 +929,6 @@ "@intx/hub-common": "0.3.0", "@intx/log": "0.3.0", "@intx/types": "workspace:*", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", @@ -1028,8 +1028,8 @@ "version": "0.0.1", "dependencies": { "@corbits/artifacts-hub": "workspace:*", + "@corbits/error-sink": "workspace:*", "@corbits/memory": "github:corbitsdev/corbits-memory#9e6f213fa2c002b531d3f6af1aa0abd737b8afe3", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "hono": "^4.11.9", }, @@ -1153,9 +1153,9 @@ "version": "0.0.1", "dependencies": { "@corbits/api-query": "workspace:*", + "@corbits/error-sink": "workspace:*", "@corbits/migration-runner": "workspace:*", "@intx/hub-api": "workspace:*", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", @@ -1170,8 +1170,8 @@ "name": "@corbits/presence", "version": "0.0.1", "dependencies": { + "@corbits/error-sink": "workspace:*", "@intx/hub-api": "workspace:*", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "hono": "^4.11.9", "y-protocols": "^1.0.7", @@ -1211,6 +1211,7 @@ "name": "@corbits/routines", "version": "0.0.1", "dependencies": { + "@corbits/error-sink": "workspace:*", "@corbits/folded-run-one-shot": "workspace:*", "@corbits/migration-runner": "workspace:*", "@corbits/slug": "workspace:*", @@ -1219,7 +1220,6 @@ "@intx/hub-api": "workspace:*", "@intx/hub-common": "0.3.0", "@intx/log": "0.3.0", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "cronstrue": "^3.24.0", "drizzle-orm": "catalog:", @@ -1233,7 +1233,7 @@ }, "packages/routines-tools": { "name": "@corbits/routines-tools", - "version": "0.0.5", + "version": "0.0.6", "dependencies": { "@intx/agent": "workspace:*", "@intx/types": "workspace:*", @@ -1248,10 +1248,10 @@ "name": "@corbits/run-key-history", "version": "0.0.1", "dependencies": { + "@corbits/error-sink": "workspace:*", "@intx/db": "workspace:*", "@intx/hub-api": "workspace:*", "@intx/log": "0.3.0", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", @@ -1266,11 +1266,11 @@ "name": "@corbits/run-scope", "version": "0.0.1", "dependencies": { + "@corbits/error-sink": "workspace:*", "@corbits/folded-runs": "workspace:*", "@intx/db": "workspace:*", "@intx/hub-api": "workspace:*", "@intx/types": "workspace:*", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", @@ -1354,10 +1354,10 @@ "name": "@corbits/sidecar-placement", "version": "0.0.1", "dependencies": { + "@corbits/error-sink": "workspace:*", "@intx/db": "workspace:*", "@intx/hub-api": "workspace:*", "@intx/types": "workspace:*", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", @@ -1371,10 +1371,10 @@ "name": "@corbits/skills", "version": "0.0.1", "dependencies": { + "@corbits/error-sink": "workspace:*", "@intx/db": "workspace:*", "@intx/hub-api": "workspace:*", "@intx/hub-sessions": "workspace:*", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", @@ -1508,7 +1508,6 @@ "@intx/hub-sessions": "workspace:*", "@intx/log": "0.3.0", "@intx/types": "workspace:*", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", diff --git a/packages/access-policy/src/routes.ts b/packages/access-policy/src/routes.ts index eb7ea98bf..02719fca2 100644 --- a/packages/access-policy/src/routes.ts +++ b/packages/access-policy/src/routes.ts @@ -10,11 +10,8 @@ import { Hono } from "hono"; import { type } from "arktype"; import type { RequireGrant, TenantEnv } from "@intx/hub-api"; import { reportError } from "@corbits/error-sink"; -import { - cookiesFromHeader, - makeErrorEnvelope, - type ApiCall, -} from "@workbench/hub-client"; +import { cookiesFromHeader, type ApiCall } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; import { canCreateTenancy } from "./policy"; import type { AccessPolicyStore } from "./store"; diff --git a/packages/agent-directory/package.json b/packages/agent-directory/package.json index 61f72e536..815a1858a 100644 --- a/packages/agent-directory/package.json +++ b/packages/agent-directory/package.json @@ -28,7 +28,6 @@ "@intx/log": "0.3.0", "@intx/types": "workspace:*", "@intx/workflow": "workspace:*", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", diff --git a/packages/agent-directory/src/agent-definition-draft-routes.ts b/packages/agent-directory/src/agent-definition-draft-routes.ts index 7d3ac64a5..da14e64f0 100644 --- a/packages/agent-directory/src/agent-definition-draft-routes.ts +++ b/packages/agent-directory/src/agent-definition-draft-routes.ts @@ -20,7 +20,7 @@ import { FoldedRunFailedError, FoldedRunTimedOutError, } from "@corbits/folded-run-one-shot"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; import { AgentDefinitionDraftReferenceOutOfInventoryError, AgentDefinitionDraftReplyUnparseableError, diff --git a/packages/agent-directory/src/routes.ts b/packages/agent-directory/src/routes.ts index d22b32b60..17628f0a6 100644 --- a/packages/agent-directory/src/routes.ts +++ b/packages/agent-directory/src/routes.ts @@ -69,7 +69,7 @@ import { import type { DefinitionAssetHistory } from "./definition-history"; import { listVisibleAgentDefinitions } from "./visible-definitions"; import { reportError } from "@corbits/error-sink"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; /** * Resolves the pinned skill names a definition carries into the diff --git a/packages/agent-directory/src/workflow-capability-routes.ts b/packages/agent-directory/src/workflow-capability-routes.ts index 58fcafd60..561d1ea82 100644 --- a/packages/agent-directory/src/workflow-capability-routes.ts +++ b/packages/agent-directory/src/workflow-capability-routes.ts @@ -69,7 +69,7 @@ import { } from "./definition-asset"; import type { PinnedSkillIndexResolver } from "./routes"; import type { DefinitionSkillsStore } from "./skills-store"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; /** * The tenant + principal + run a presented sidecar token and run diff --git a/packages/agent-directory/src/workflow-create-routes.ts b/packages/agent-directory/src/workflow-create-routes.ts index 5e92b412d..0794e5a30 100644 --- a/packages/agent-directory/src/workflow-create-routes.ts +++ b/packages/agent-directory/src/workflow-create-routes.ts @@ -55,7 +55,7 @@ import { CapabilityOutOfInventoryError, type CapabilityInventoryProvider, } from "./capability-inventory"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; import type { WorkflowCapabilityRunScope, WorkflowRunAuthenticator, diff --git a/packages/agent-directory/src/workflow-skill-pin-routes.ts b/packages/agent-directory/src/workflow-skill-pin-routes.ts index 979384e4a..dae41fa25 100644 --- a/packages/agent-directory/src/workflow-skill-pin-routes.ts +++ b/packages/agent-directory/src/workflow-skill-pin-routes.ts @@ -41,7 +41,7 @@ import { } from "./definition-asset"; import type { PinnedSkillIndexResolver } from "./routes"; import type { DefinitionSkillsStore } from "./skills-store"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; import type { WorkflowCapabilityRunScope, WorkflowRunAuthenticator as WorkflowCapabilityRunAuthenticator, diff --git a/packages/agent-workflow-authoring/package.json b/packages/agent-workflow-authoring/package.json index c51e7119b..cb1de078e 100644 --- a/packages/agent-workflow-authoring/package.json +++ b/packages/agent-workflow-authoring/package.json @@ -17,7 +17,7 @@ "@intx/db": "workspace:*", "@intx/hub-sessions": "workspace:*", "@intx/types": "workspace:*", - "@workbench/hub-client": "workspace:*", + "@corbits/error-sink": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9" diff --git a/packages/agent-workflow-authoring/src/workflow-routes.ts b/packages/agent-workflow-authoring/src/workflow-routes.ts index 38dc74d0d..9babf41dd 100644 --- a/packages/agent-workflow-authoring/src/workflow-routes.ts +++ b/packages/agent-workflow-authoring/src/workflow-routes.ts @@ -15,7 +15,7 @@ // deliberately out of scope here — see `./registry.ts`'s doc comment. import { type } from "arktype"; import { Hono } from "hono"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; import { WorkflowAuthorError, type WorkflowAuthorRegistry } from "./registry"; diff --git a/packages/agent-workflow-authoring/tsconfig.json b/packages/agent-workflow-authoring/tsconfig.json index d7611c122..194769611 100644 --- a/packages/agent-workflow-authoring/tsconfig.json +++ b/packages/agent-workflow-authoring/tsconfig.json @@ -1,8 +1,28 @@ { - "extends": "../../tsconfig.base.json", - "include": ["src", "test"], + "extends": "./tsconfig.src.json", "compilerOptions": { - "types": ["bun"], - "noEmit": true - } + "composite": false, + "noEmit": true, + "disableSourceOfProjectReferenceRedirect": true, + "declaration": false, + "declarationMap": false, + "emitDeclarationOnly": false, + "rootDir": "../.." + }, + "include": ["src"], + "exclude": [], + "references": [ + { + "path": "../../vendor/intx/db/tsconfig.src.json" + }, + { + "path": "../../vendor/intx/hub-sessions/tsconfig.src.json" + }, + { + "path": "../../vendor/intx/types/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + } + ] } diff --git a/packages/agent-workflow-authoring/tsconfig.src.json b/packages/agent-workflow-authoring/tsconfig.src.json new file mode 100644 index 000000000..37545279f --- /dev/null +++ b/packages/agent-workflow-authoring/tsconfig.src.json @@ -0,0 +1,27 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "noEmit": true, + "composite": true, + "emitDeclarationOnly": true, + "outDir": "dist", + "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" + }, + "references": [ + { + "path": "../../vendor/intx/db/tsconfig.src.json" + }, + { + "path": "../../vendor/intx/hub-sessions/tsconfig.src.json" + }, + { + "path": "../../vendor/intx/types/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + } + ] +} diff --git a/packages/artifacts-hub/package.json b/packages/artifacts-hub/package.json index 3afa65fd9..d7a795e67 100644 --- a/packages/artifacts-hub/package.json +++ b/packages/artifacts-hub/package.json @@ -21,7 +21,7 @@ "@intx/db": "workspace:*", "@intx/hub-api": "workspace:*", "@intx/types": "workspace:*", - "@workbench/hub-client": "workspace:*", + "@corbits/error-sink": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9" diff --git a/packages/artifacts-hub/src/routes.ts b/packages/artifacts-hub/src/routes.ts index 19008bf2b..c787b78cc 100644 --- a/packages/artifacts-hub/src/routes.ts +++ b/packages/artifacts-hub/src/routes.ts @@ -33,7 +33,7 @@ import { import { isTextDecodableMediaType } from "@corbits/artifact-ui/renderer-kind"; import type { RequireGrant, TenantEnv } from "@intx/hub-api"; import { Hono } from "hono"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; const DEFAULT_LIMIT = 50; const MAX_LIMIT = 100; diff --git a/packages/artifacts-hub/src/template-library.ts b/packages/artifacts-hub/src/template-library.ts index 1b2f604e4..406778431 100644 --- a/packages/artifacts-hub/src/template-library.ts +++ b/packages/artifacts-hub/src/template-library.ts @@ -41,7 +41,7 @@ import type { RequireGrant, TenantEnv } from "@intx/hub-api"; import { hexEncode } from "@intx/types"; import { and, eq, sql } from "drizzle-orm"; import { Hono } from "hono"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; export const WORKBENCH_TEMPLATE_ARTIFACT_KIND = "workbench-template"; diff --git a/packages/artifacts-hub/src/workflow-routes.ts b/packages/artifacts-hub/src/workflow-routes.ts index dc65fb769..07341f58f 100644 --- a/packages/artifacts-hub/src/workflow-routes.ts +++ b/packages/artifacts-hub/src/workflow-routes.ts @@ -41,7 +41,7 @@ import { type SerializedArtifactListItem, } from "@corbits/artifacts"; import { Hono } from "hono"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; import type { ResolvedWorkflowRunScope, diff --git a/packages/bench/package.json b/packages/bench/package.json index a3cc68444..f9195ab4c 100644 --- a/packages/bench/package.json +++ b/packages/bench/package.json @@ -18,7 +18,7 @@ "@corbits/api-query": "workspace:*", "@corbits/migration-runner": "workspace:*", "@intx/hub-api": "workspace:*", - "@workbench/hub-client": "workspace:*", + "@corbits/error-sink": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", diff --git a/packages/bench/src/routes.ts b/packages/bench/src/routes.ts index 72480c99d..a259653e0 100644 --- a/packages/bench/src/routes.ts +++ b/packages/bench/src/routes.ts @@ -7,7 +7,7 @@ import { type } from "arktype"; import type { RequireGrant, TenantEnv } from "@intx/hub-api"; import type { BenchSettingsStore } from "./store"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; // `BenchCreateType` in packages/bench-ui/src/create-bench-dialog.tsx allows // exactly "global" | "sub" today; validated strictly here rather than as a diff --git a/packages/bench/tsconfig.json b/packages/bench/tsconfig.json index d7611c122..859618998 100644 --- a/packages/bench/tsconfig.json +++ b/packages/bench/tsconfig.json @@ -1,8 +1,28 @@ { - "extends": "../../tsconfig.base.json", - "include": ["src", "test"], + "extends": "./tsconfig.src.json", "compilerOptions": { - "types": ["bun"], - "noEmit": true - } + "composite": false, + "noEmit": true, + "disableSourceOfProjectReferenceRedirect": true, + "declaration": false, + "declarationMap": false, + "emitDeclarationOnly": false, + "rootDir": "../.." + }, + "include": ["src", "test"], + "exclude": [], + "references": [ + { + "path": "../../vendor/intx/hub-api/tsconfig.src.json" + }, + { + "path": "../api-query/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + }, + { + "path": "../migration-runner/tsconfig.src.json" + } + ] } diff --git a/packages/bench/tsconfig.src.json b/packages/bench/tsconfig.src.json new file mode 100644 index 000000000..abeb47a06 --- /dev/null +++ b/packages/bench/tsconfig.src.json @@ -0,0 +1,27 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "noEmit": true, + "composite": true, + "emitDeclarationOnly": true, + "outDir": "dist", + "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" + }, + "references": [ + { + "path": "../../vendor/intx/hub-api/tsconfig.src.json" + }, + { + "path": "../api-query/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + }, + { + "path": "../migration-runner/tsconfig.src.json" + } + ] +} diff --git a/packages/chat/src/routes.ts b/packages/chat/src/routes.ts index 417c79015..df896ab2a 100644 --- a/packages/chat/src/routes.ts +++ b/packages/chat/src/routes.ts @@ -110,7 +110,8 @@ import { DefinitionProjectionMissingError, } from "@corbits/folded-runs"; import type { WorkbenchTenancyStore } from "./workbench-tenancy"; -import { cookiesFromHeader, makeErrorEnvelope } from "@workbench/hub-client"; +import { cookiesFromHeader } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; import type { AgentTurnStore } from "./agent-turns"; import type { ThreadStore } from "./threads"; import { ThreadDepthCapError } from "./threads"; diff --git a/packages/chat/src/workbench-tenancy-routes.ts b/packages/chat/src/workbench-tenancy-routes.ts index be0405e02..148297710 100644 --- a/packages/chat/src/workbench-tenancy-routes.ts +++ b/packages/chat/src/workbench-tenancy-routes.ts @@ -9,7 +9,7 @@ import type { AppEnv } from "@intx/hub-api"; import { Hono } from "hono"; import { type } from "arktype"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; import type { WorkbenchTenancyStore } from "./workbench-tenancy"; diff --git a/packages/chat/src/workflow-participant-routes.ts b/packages/chat/src/workflow-participant-routes.ts index 06bab8c62..f04312bb1 100644 --- a/packages/chat/src/workflow-participant-routes.ts +++ b/packages/chat/src/workflow-participant-routes.ts @@ -68,7 +68,7 @@ import { import type { WorkbenchTenancyStore } from "./workbench-tenancy"; import { MODEL_UNAVAILABLE_CONSUMER_MESSAGE } from "./model-unavailable"; import { reportError } from "@corbits/error-sink"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; /** * The tenant + principal + run a presented sidecar token and run diff --git a/packages/commands/package.json b/packages/commands/package.json index d881adc0e..c0cc1fc24 100644 --- a/packages/commands/package.json +++ b/packages/commands/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@intx/hub-api": "workspace:*", - "@workbench/hub-client": "workspace:*", + "@corbits/error-sink": "workspace:*", "arktype": "catalog:", "hono": "^4.11.9" }, diff --git a/packages/commands/src/routes.ts b/packages/commands/src/routes.ts index 63987dab1..f406e7677 100644 --- a/packages/commands/src/routes.ts +++ b/packages/commands/src/routes.ts @@ -14,7 +14,7 @@ import type { TenantEnv } from "@intx/hub-api"; import type { RequireGrant } from "@intx/hub-api"; import { dispatchSlashCommand } from "./dispatch"; import type { CommandListing, CommandRegistry } from "./registry"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; export type CreateCommandRoutesDeps = { registry: CommandRegistry; diff --git a/packages/commands/tsconfig.json b/packages/commands/tsconfig.json index d7611c122..6e7e759ce 100644 --- a/packages/commands/tsconfig.json +++ b/packages/commands/tsconfig.json @@ -1,8 +1,22 @@ { - "extends": "../../tsconfig.base.json", - "include": ["src", "test"], + "extends": "./tsconfig.src.json", "compilerOptions": { - "types": ["bun"], - "noEmit": true - } + "composite": false, + "noEmit": true, + "disableSourceOfProjectReferenceRedirect": true, + "declaration": false, + "declarationMap": false, + "emitDeclarationOnly": false, + "rootDir": "../.." + }, + "include": ["src", "test"], + "exclude": [], + "references": [ + { + "path": "../../vendor/intx/hub-api/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + } + ] } diff --git a/packages/commands/tsconfig.src.json b/packages/commands/tsconfig.src.json new file mode 100644 index 000000000..a4492b477 --- /dev/null +++ b/packages/commands/tsconfig.src.json @@ -0,0 +1,21 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "noEmit": true, + "composite": true, + "emitDeclarationOnly": true, + "outDir": "dist", + "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" + }, + "references": [ + { + "path": "../../vendor/intx/hub-api/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + } + ] +} diff --git a/packages/error-sink/src/error-envelope.ts b/packages/error-sink/src/error-envelope.ts new file mode 100644 index 000000000..77eda3275 --- /dev/null +++ b/packages/error-sink/src/error-envelope.ts @@ -0,0 +1,42 @@ +// The one shape every hub route uses to answer a failure a user can see: +// a stable `code` a client can branch on, a `userMessage` written in +// consumer language, and a `refId` a person can quote in a support +// message or a bug report. The raw failure — stack text, file paths, +// upstream error prose — never crosses the wire; it belongs in the +// hub's own logger, keyed by the same `refId`, so an operator can find +// it without the client ever having seen it. See CL-6360. + +import { generateRefId } from "./ref-id"; +import { type } from "arktype"; + +export const ErrorEnvelopeShape = type({ + error: { + code: "string", + userMessage: "string", + refId: "string", + }, +}); + +export type ErrorEnvelope = typeof ErrorEnvelopeShape.infer; + +export function makeErrorEnvelope(args: { + code: string; + userMessage: string; + refId?: string; +}): ErrorEnvelope { + return { + error: { + code: args.code, + userMessage: args.userMessage, + refId: args.refId ?? generateRefId(), + }, + }; +} + +/** Parses a hub error response body against `ErrorEnvelopeShape`. Returns + * `undefined` for anything that doesn't match — malformed or legacy + * bodies never crash a client that expected the envelope. */ +export function parseErrorEnvelope(body: unknown): ErrorEnvelope | undefined { + const parsed = ErrorEnvelopeShape(body); + return parsed instanceof type.errors ? undefined : parsed; +} diff --git a/packages/error-sink/src/index.ts b/packages/error-sink/src/index.ts index 66d9ce767..57bfe0385 100644 --- a/packages/error-sink/src/index.ts +++ b/packages/error-sink/src/index.ts @@ -87,3 +87,9 @@ export function reportError( export type { ErrorContext } from "./context"; export { generateRefId } from "./ref-id"; +export { + ErrorEnvelopeShape, + makeErrorEnvelope, + parseErrorEnvelope, +} from "./error-envelope"; +export type { ErrorEnvelope } from "./error-envelope"; diff --git a/packages/evals/package.json b/packages/evals/package.json index 85a46e4c8..ff56f5dce 100644 --- a/packages/evals/package.json +++ b/packages/evals/package.json @@ -27,6 +27,7 @@ "@intx/types": "workspace:*", "@intx/workflow": "workspace:*", "@modelcontextprotocol/sdk": "catalog:", + "@corbits/error-sink": "workspace:*", "@workbench/connections": "workspace:*", "@workbench/hub-client": "workspace:*", "@workbench/onboarding": "workspace:*", diff --git a/packages/evals/src/routes.ts b/packages/evals/src/routes.ts index ab4ef62bf..7d2916610 100644 --- a/packages/evals/src/routes.ts +++ b/packages/evals/src/routes.ts @@ -16,7 +16,7 @@ import type { RequireGrant, TenantEnv } from "@intx/hub-api"; import { ALL_EVALS } from "./cases/index.ts"; import type { EvalRunRecord, EvalRunStore } from "./store/store.ts"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; const DEFAULT_LIMIT = 20; const MAX_LIMIT = 100; diff --git a/packages/hub-client/src/error-envelope.ts b/packages/hub-client/src/error-envelope.ts index 32249120c..b07b188d2 100644 --- a/packages/hub-client/src/error-envelope.ts +++ b/packages/hub-client/src/error-envelope.ts @@ -1,44 +1,11 @@ -// The one shape every hub route uses to answer a failure a user can see: -// a stable `code` a client can branch on, a `userMessage` written in -// consumer language, and a `refId` a person can quote in a support -// message or a bug report. The raw failure — stack text, file paths, -// upstream error prose — never crosses the wire; it belongs in the -// hub's own logger, keyed by the same `refId`, so an operator can find -// it without the client ever having seen it. See CL-6360. - -import { generateRefId } from "@corbits/error-sink"; -import { type } from "arktype"; - -export { generateRefId }; - -export const ErrorEnvelopeShape = type({ - error: { - code: "string", - userMessage: "string", - refId: "string", - }, -}); - -export type ErrorEnvelope = typeof ErrorEnvelopeShape.infer; - -export function makeErrorEnvelope(args: { - code: string; - userMessage: string; - refId?: string; -}): ErrorEnvelope { - return { - error: { - code: args.code, - userMessage: args.userMessage, - refId: args.refId ?? generateRefId(), - }, - }; -} - -/** Parses a hub error response body against `ErrorEnvelopeShape`. Returns - * `undefined` for anything that doesn't match — malformed or legacy - * bodies never crash a client that expected the envelope. */ -export function parseErrorEnvelope(body: unknown): ErrorEnvelope | undefined { - const parsed = ErrorEnvelopeShape(body); - return parsed instanceof type.errors ? undefined : parsed; -} +// Re-export the canonical envelope helpers from @corbits/error-sink. +// Consumers should import directly from @corbits/error-sink; this file +// exists only for backward compatibility with code that still imports +// from @workbench/hub-client root. +export { + ErrorEnvelopeShape, + generateRefId, + makeErrorEnvelope, + parseErrorEnvelope, +} from "@corbits/error-sink"; +export type { ErrorEnvelope } from "@corbits/error-sink"; diff --git a/packages/inference-catalog/package.json b/packages/inference-catalog/package.json index ad19a38e2..4264b4685 100644 --- a/packages/inference-catalog/package.json +++ b/packages/inference-catalog/package.json @@ -18,13 +18,13 @@ "test": "bun test" }, "dependencies": { + "@corbits/error-sink": "workspace:*", "@corbits/migration-runner": "workspace:*", "@corbits/ollama-adapter": "workspace:*", "@intx/db": "workspace:*", "@intx/hub-api": "workspace:*", "@intx/inference-catalog": "0.3.0", "@intx/types": "workspace:*", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", diff --git a/packages/inference-catalog/src/workflow-catalog-routes.ts b/packages/inference-catalog/src/workflow-catalog-routes.ts index 732db1985..a38848422 100644 --- a/packages/inference-catalog/src/workflow-catalog-routes.ts +++ b/packages/inference-catalog/src/workflow-catalog-routes.ts @@ -13,7 +13,7 @@ import { Hono } from "hono"; import { type } from "arktype"; import type { ModelPricingRow, ResolvedOffering } from "@intx/db"; import { Capability } from "@intx/types"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; import { CONCEPTS } from "./concepts"; import { EMPTY_POLICY, type BenchModelPolicy } from "./policy"; diff --git a/packages/inference-catalog/tsconfig.json b/packages/inference-catalog/tsconfig.json index d7611c122..f5311ba6a 100644 --- a/packages/inference-catalog/tsconfig.json +++ b/packages/inference-catalog/tsconfig.json @@ -1,8 +1,34 @@ { - "extends": "../../tsconfig.base.json", - "include": ["src", "test"], + "extends": "./tsconfig.src.json", "compilerOptions": { - "types": ["bun"], - "noEmit": true - } + "composite": false, + "noEmit": true, + "disableSourceOfProjectReferenceRedirect": true, + "declaration": false, + "declarationMap": false, + "emitDeclarationOnly": false, + "rootDir": "../.." + }, + "include": ["src", "test"], + "exclude": [], + "references": [ + { + "path": "../../vendor/intx/db/tsconfig.src.json" + }, + { + "path": "../../vendor/intx/hub-api/tsconfig.src.json" + }, + { + "path": "../../vendor/intx/types/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + }, + { + "path": "../migration-runner/tsconfig.src.json" + }, + { + "path": "../ollama-adapter/tsconfig.src.json" + } + ] } diff --git a/packages/inference-catalog/tsconfig.src.json b/packages/inference-catalog/tsconfig.src.json new file mode 100644 index 000000000..96d805118 --- /dev/null +++ b/packages/inference-catalog/tsconfig.src.json @@ -0,0 +1,33 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "noEmit": true, + "composite": true, + "emitDeclarationOnly": true, + "outDir": "dist", + "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" + }, + "references": [ + { + "path": "../../vendor/intx/db/tsconfig.src.json" + }, + { + "path": "../../vendor/intx/hub-api/tsconfig.src.json" + }, + { + "path": "../../vendor/intx/types/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + }, + { + "path": "../migration-runner/tsconfig.src.json" + }, + { + "path": "../ollama-adapter/tsconfig.src.json" + } + ] +} diff --git a/packages/insights/package.json b/packages/insights/package.json index 71672591c..5cb826afa 100644 --- a/packages/insights/package.json +++ b/packages/insights/package.json @@ -22,7 +22,7 @@ "@intx/hub-common": "0.3.0", "@intx/log": "0.3.0", "@intx/types": "workspace:*", - "@workbench/hub-client": "workspace:*", + "@corbits/error-sink": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", diff --git a/packages/insights/src/routes.ts b/packages/insights/src/routes.ts index 928c4c235..a5b86c265 100644 --- a/packages/insights/src/routes.ts +++ b/packages/insights/src/routes.ts @@ -28,7 +28,7 @@ import { } from "./queries"; import type { UsageStore } from "./store"; import type { TurnLatencyStore } from "./latency-store"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; const RangeQuery = type({ "from?": "string", diff --git a/packages/memory-hub/package.json b/packages/memory-hub/package.json index 328d11641..85f00af4f 100644 --- a/packages/memory-hub/package.json +++ b/packages/memory-hub/package.json @@ -15,7 +15,7 @@ "dependencies": { "@corbits/artifacts-hub": "workspace:*", "@corbits/memory": "github:corbitsdev/corbits-memory#9e6f213fa2c002b531d3f6af1aa0abd737b8afe3", - "@workbench/hub-client": "workspace:*", + "@corbits/error-sink": "workspace:*", "arktype": "catalog:", "hono": "^4.11.9" }, diff --git a/packages/memory-hub/src/workflow-routes.ts b/packages/memory-hub/src/workflow-routes.ts index 5a6b1e507..ab99f4980 100644 --- a/packages/memory-hub/src/workflow-routes.ts +++ b/packages/memory-hub/src/workflow-routes.ts @@ -24,7 +24,7 @@ */ import { type } from "arktype"; import { Hono } from "hono"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; import type { ResolvedWorkflowRunScope, WorkflowRunAuthenticator, diff --git a/packages/onboarding/src/routes.ts b/packages/onboarding/src/routes.ts index d4814cc4c..0a68003a4 100644 --- a/packages/onboarding/src/routes.ts +++ b/packages/onboarding/src/routes.ts @@ -24,7 +24,7 @@ import { import { Hono } from "hono"; import { type } from "arktype"; import type { AccessPolicyStore } from "@workbench/access-policy"; -import { generateRefId, makeErrorEnvelope } from "@workbench/hub-client"; +import { generateRefId, makeErrorEnvelope } from "@corbits/error-sink"; import { reportError } from "@corbits/error-sink"; import { diff --git a/packages/preferences/package.json b/packages/preferences/package.json index 030091158..298eab1bd 100644 --- a/packages/preferences/package.json +++ b/packages/preferences/package.json @@ -18,7 +18,7 @@ "@corbits/api-query": "workspace:*", "@corbits/migration-runner": "workspace:*", "@intx/hub-api": "workspace:*", - "@workbench/hub-client": "workspace:*", + "@corbits/error-sink": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", diff --git a/packages/preferences/src/routes.ts b/packages/preferences/src/routes.ts index 9e1e23198..f3553fbac 100644 --- a/packages/preferences/src/routes.ts +++ b/packages/preferences/src/routes.ts @@ -9,7 +9,7 @@ import { type } from "arktype"; import type { RequireGrant, TenantEnv } from "@intx/hub-api"; import type { PreferencesStore } from "./store"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; const PatchBody = type("Record"); diff --git a/packages/preferences/tsconfig.json b/packages/preferences/tsconfig.json index d7611c122..859618998 100644 --- a/packages/preferences/tsconfig.json +++ b/packages/preferences/tsconfig.json @@ -1,8 +1,28 @@ { - "extends": "../../tsconfig.base.json", - "include": ["src", "test"], + "extends": "./tsconfig.src.json", "compilerOptions": { - "types": ["bun"], - "noEmit": true - } + "composite": false, + "noEmit": true, + "disableSourceOfProjectReferenceRedirect": true, + "declaration": false, + "declarationMap": false, + "emitDeclarationOnly": false, + "rootDir": "../.." + }, + "include": ["src", "test"], + "exclude": [], + "references": [ + { + "path": "../../vendor/intx/hub-api/tsconfig.src.json" + }, + { + "path": "../api-query/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + }, + { + "path": "../migration-runner/tsconfig.src.json" + } + ] } diff --git a/packages/preferences/tsconfig.src.json b/packages/preferences/tsconfig.src.json new file mode 100644 index 000000000..abeb47a06 --- /dev/null +++ b/packages/preferences/tsconfig.src.json @@ -0,0 +1,27 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "noEmit": true, + "composite": true, + "emitDeclarationOnly": true, + "outDir": "dist", + "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" + }, + "references": [ + { + "path": "../../vendor/intx/hub-api/tsconfig.src.json" + }, + { + "path": "../api-query/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + }, + { + "path": "../migration-runner/tsconfig.src.json" + } + ] +} diff --git a/packages/presence/package.json b/packages/presence/package.json index 3be8b6209..554ccede3 100644 --- a/packages/presence/package.json +++ b/packages/presence/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@intx/hub-api": "workspace:*", - "@workbench/hub-client": "workspace:*", + "@corbits/error-sink": "workspace:*", "arktype": "catalog:", "hono": "^4.11.9", "y-protocols": "^1.0.7", diff --git a/packages/presence/src/routes.ts b/packages/presence/src/routes.ts index 037d995ba..da1179eb8 100644 --- a/packages/presence/src/routes.ts +++ b/packages/presence/src/routes.ts @@ -21,7 +21,7 @@ import { type PresenceState, type PresenceStatePatch, } from "./room-registry"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; import { MAX_DOC_UPDATE_BYTES, maxBase64LengthFor, diff --git a/packages/presence/tsconfig.json b/packages/presence/tsconfig.json index d7611c122..6e7e759ce 100644 --- a/packages/presence/tsconfig.json +++ b/packages/presence/tsconfig.json @@ -1,8 +1,22 @@ { - "extends": "../../tsconfig.base.json", - "include": ["src", "test"], + "extends": "./tsconfig.src.json", "compilerOptions": { - "types": ["bun"], - "noEmit": true - } + "composite": false, + "noEmit": true, + "disableSourceOfProjectReferenceRedirect": true, + "declaration": false, + "declarationMap": false, + "emitDeclarationOnly": false, + "rootDir": "../.." + }, + "include": ["src", "test"], + "exclude": [], + "references": [ + { + "path": "../../vendor/intx/hub-api/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + } + ] } diff --git a/packages/presence/tsconfig.src.json b/packages/presence/tsconfig.src.json new file mode 100644 index 000000000..a4492b477 --- /dev/null +++ b/packages/presence/tsconfig.src.json @@ -0,0 +1,21 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "noEmit": true, + "composite": true, + "emitDeclarationOnly": true, + "outDir": "dist", + "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" + }, + "references": [ + { + "path": "../../vendor/intx/hub-api/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + } + ] +} diff --git a/packages/routines/package.json b/packages/routines/package.json index e4e5de902..95273699c 100644 --- a/packages/routines/package.json +++ b/packages/routines/package.json @@ -25,7 +25,7 @@ "@intx/hub-api": "workspace:*", "@intx/hub-common": "0.3.0", "@intx/log": "0.3.0", - "@workbench/hub-client": "workspace:*", + "@corbits/error-sink": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "catalog:", diff --git a/packages/routines/src/routes.ts b/packages/routines/src/routes.ts index 49a1d4f43..e0a6180d5 100644 --- a/packages/routines/src/routes.ts +++ b/packages/routines/src/routes.ts @@ -29,7 +29,7 @@ import type { RoutineStore, UpdateRoutineInput, } from "./store"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; import { MyraRoutineDraftingUnavailableError, RoutineDraftReferenceOutOfInventoryError, diff --git a/packages/routines/src/workflow-routine-routes.ts b/packages/routines/src/workflow-routine-routes.ts index 0cdd13820..4e41c6a2a 100644 --- a/packages/routines/src/workflow-routine-routes.ts +++ b/packages/routines/src/workflow-routine-routes.ts @@ -30,7 +30,7 @@ import { type } from "arktype"; import { RoutineTrigger } from "./trigger"; import type { RoutineStore, UpdateRoutineInput } from "./store"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; import { fireOnceTriggerIfNeeded, isDeliveryWorkbenchRequired, diff --git a/packages/run-key-history/package.json b/packages/run-key-history/package.json index a23b0fc03..14fe87d2c 100644 --- a/packages/run-key-history/package.json +++ b/packages/run-key-history/package.json @@ -17,7 +17,7 @@ "@intx/db": "workspace:*", "@intx/hub-api": "workspace:*", "@intx/log": "0.3.0", - "@workbench/hub-client": "workspace:*", + "@corbits/error-sink": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", diff --git a/packages/run-key-history/src/routes.ts b/packages/run-key-history/src/routes.ts index 3d7c9d336..c4904b6be 100644 --- a/packages/run-key-history/src/routes.ts +++ b/packages/run-key-history/src/routes.ts @@ -9,7 +9,7 @@ import { type } from "arktype"; import type { DB } from "@intx/db"; import type { RequireGrant, TenantEnv } from "@intx/hub-api"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; import { countRunIdentityStates, diff --git a/packages/run-key-history/tsconfig.json b/packages/run-key-history/tsconfig.json index d7611c122..87d19ffd0 100644 --- a/packages/run-key-history/tsconfig.json +++ b/packages/run-key-history/tsconfig.json @@ -1,8 +1,25 @@ { - "extends": "../../tsconfig.base.json", - "include": ["src", "test"], + "extends": "./tsconfig.src.json", "compilerOptions": { - "types": ["bun"], - "noEmit": true - } + "composite": false, + "noEmit": true, + "disableSourceOfProjectReferenceRedirect": true, + "declaration": false, + "declarationMap": false, + "emitDeclarationOnly": false, + "rootDir": "../.." + }, + "include": ["src", "test"], + "exclude": [], + "references": [ + { + "path": "../../vendor/intx/db/tsconfig.src.json" + }, + { + "path": "../../vendor/intx/hub-api/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + } + ] } diff --git a/packages/run-key-history/tsconfig.src.json b/packages/run-key-history/tsconfig.src.json new file mode 100644 index 000000000..3651ab1fc --- /dev/null +++ b/packages/run-key-history/tsconfig.src.json @@ -0,0 +1,24 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "noEmit": true, + "composite": true, + "emitDeclarationOnly": true, + "outDir": "dist", + "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" + }, + "references": [ + { + "path": "../../vendor/intx/db/tsconfig.src.json" + }, + { + "path": "../../vendor/intx/hub-api/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + } + ] +} diff --git a/packages/run-scope/package.json b/packages/run-scope/package.json index b0ca484f5..29ecea4af 100644 --- a/packages/run-scope/package.json +++ b/packages/run-scope/package.json @@ -17,7 +17,7 @@ "@intx/db": "workspace:*", "@intx/hub-api": "workspace:*", "@intx/types": "workspace:*", - "@workbench/hub-client": "workspace:*", + "@corbits/error-sink": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9" diff --git a/packages/run-scope/src/scope-routes.ts b/packages/run-scope/src/scope-routes.ts index 537369e56..204a57a16 100644 --- a/packages/run-scope/src/scope-routes.ts +++ b/packages/run-scope/src/scope-routes.ts @@ -33,7 +33,7 @@ import { getDescendantTenants, type DB } from "@intx/db"; import { workflowDefinition, workflowRun } from "@intx/db/schema"; import type { WorkflowRunStatus } from "@intx/types"; import { foldedRun } from "@corbits/folded-runs"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; /** A routine fire's parent, resolved by `resolveRoutineFires` below. */ export type RoutineFireInfo = { diff --git a/packages/sidecar-placement/package.json b/packages/sidecar-placement/package.json index 6b3871cfe..34225c042 100644 --- a/packages/sidecar-placement/package.json +++ b/packages/sidecar-placement/package.json @@ -16,7 +16,7 @@ "@intx/db": "workspace:*", "@intx/hub-api": "workspace:*", "@intx/types": "workspace:*", - "@workbench/hub-client": "workspace:*", + "@corbits/error-sink": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9" diff --git a/packages/sidecar-placement/src/routes.ts b/packages/sidecar-placement/src/routes.ts index 3ed31642a..e8468c281 100644 --- a/packages/sidecar-placement/src/routes.ts +++ b/packages/sidecar-placement/src/routes.ts @@ -6,7 +6,7 @@ import { Hono } from "hono"; import { type } from "arktype"; import type { RequireGrant, TenantEnv } from "@intx/hub-api"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; import type { SidecarPlacementStore } from "./store"; diff --git a/packages/sidecar-placement/tsconfig.json b/packages/sidecar-placement/tsconfig.json index d7611c122..af53fca71 100644 --- a/packages/sidecar-placement/tsconfig.json +++ b/packages/sidecar-placement/tsconfig.json @@ -1,8 +1,28 @@ { - "extends": "../../tsconfig.base.json", - "include": ["src", "test"], + "extends": "./tsconfig.src.json", "compilerOptions": { - "types": ["bun"], - "noEmit": true - } + "composite": false, + "noEmit": true, + "disableSourceOfProjectReferenceRedirect": true, + "declaration": false, + "declarationMap": false, + "emitDeclarationOnly": false, + "rootDir": "../.." + }, + "include": ["src", "test"], + "exclude": [], + "references": [ + { + "path": "../../vendor/intx/db/tsconfig.src.json" + }, + { + "path": "../../vendor/intx/hub-api/tsconfig.src.json" + }, + { + "path": "../../vendor/intx/types/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + } + ] } diff --git a/packages/sidecar-placement/tsconfig.src.json b/packages/sidecar-placement/tsconfig.src.json new file mode 100644 index 000000000..95e459345 --- /dev/null +++ b/packages/sidecar-placement/tsconfig.src.json @@ -0,0 +1,27 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "noEmit": true, + "composite": true, + "emitDeclarationOnly": true, + "outDir": "dist", + "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" + }, + "references": [ + { + "path": "../../vendor/intx/db/tsconfig.src.json" + }, + { + "path": "../../vendor/intx/hub-api/tsconfig.src.json" + }, + { + "path": "../../vendor/intx/types/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + } + ] +} diff --git a/packages/skills/package.json b/packages/skills/package.json index 6d98095af..0552e3b6a 100644 --- a/packages/skills/package.json +++ b/packages/skills/package.json @@ -17,7 +17,7 @@ "@intx/db": "workspace:*", "@intx/hub-api": "workspace:*", "@intx/hub-sessions": "workspace:*", - "@workbench/hub-client": "workspace:*", + "@corbits/error-sink": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", diff --git a/packages/skills/src/routes.ts b/packages/skills/src/routes.ts index 73fdee539..ed6fd8cbe 100644 --- a/packages/skills/src/routes.ts +++ b/packages/skills/src/routes.ts @@ -15,7 +15,7 @@ import { type SkillRegistryErrorReason, } from "./registry"; import { parseSkillMd, SkillContentError } from "./skill-md"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; /** Which workflow definitions pin a given skill. */ export type PinnedByResolver = { diff --git a/packages/skills/src/workflow-routes.ts b/packages/skills/src/workflow-routes.ts index 3dd83533a..0ee6892e7 100644 --- a/packages/skills/src/workflow-routes.ts +++ b/packages/skills/src/workflow-routes.ts @@ -12,7 +12,7 @@ // skill. import { type } from "arktype"; import { Hono } from "hono"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; import { SkillRegistryError, type SkillRegistry } from "./registry"; diff --git a/packages/skills/tsconfig.json b/packages/skills/tsconfig.json index d7611c122..964cd4a19 100644 --- a/packages/skills/tsconfig.json +++ b/packages/skills/tsconfig.json @@ -1,8 +1,28 @@ { - "extends": "../../tsconfig.base.json", - "include": ["src", "test"], + "extends": "./tsconfig.src.json", "compilerOptions": { - "types": ["bun"], - "noEmit": true - } + "composite": false, + "noEmit": true, + "disableSourceOfProjectReferenceRedirect": true, + "declaration": false, + "declarationMap": false, + "emitDeclarationOnly": false, + "rootDir": "../.." + }, + "include": ["src", "test"], + "exclude": [], + "references": [ + { + "path": "../../vendor/intx/db/tsconfig.src.json" + }, + { + "path": "../../vendor/intx/hub-api/tsconfig.src.json" + }, + { + "path": "../../vendor/intx/hub-sessions/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + } + ] } diff --git a/packages/skills/tsconfig.src.json b/packages/skills/tsconfig.src.json new file mode 100644 index 000000000..b2d14a17e --- /dev/null +++ b/packages/skills/tsconfig.src.json @@ -0,0 +1,27 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "noEmit": true, + "composite": true, + "emitDeclarationOnly": true, + "outDir": "dist", + "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" + }, + "references": [ + { + "path": "../../vendor/intx/db/tsconfig.src.json" + }, + { + "path": "../../vendor/intx/hub-api/tsconfig.src.json" + }, + { + "path": "../../vendor/intx/hub-sessions/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + } + ] +} diff --git a/packages/webhook-triggers/package.json b/packages/webhook-triggers/package.json index aa0dd474e..bc1fe4620 100644 --- a/packages/webhook-triggers/package.json +++ b/packages/webhook-triggers/package.json @@ -23,7 +23,6 @@ "@intx/hub-sessions": "workspace:*", "@intx/log": "0.3.0", "@intx/types": "workspace:*", - "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", "hono": "^4.11.9", diff --git a/packages/webhook-triggers/src/ingress-routes.ts b/packages/webhook-triggers/src/ingress-routes.ts index 622255c2e..2cb5a34ba 100644 --- a/packages/webhook-triggers/src/ingress-routes.ts +++ b/packages/webhook-triggers/src/ingress-routes.ts @@ -24,7 +24,7 @@ import { } from "./signature"; import type { WebhookTriggerRow } from "./schema"; import type { WebhookTriggerStore } from "./store"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; const log = getLogger(["webhook-triggers", "ingress"]); diff --git a/packages/webhook-triggers/src/management-routes.ts b/packages/webhook-triggers/src/management-routes.ts index c1ff0f2a1..544a91568 100644 --- a/packages/webhook-triggers/src/management-routes.ts +++ b/packages/webhook-triggers/src/management-routes.ts @@ -20,7 +20,7 @@ import { pgErrorCode, PG_UNIQUE_VIOLATION } from "@intx/db"; import { generateWebhookSecret } from "./signature"; import type { WebhookTriggerRow } from "./schema"; import type { WebhookTriggerStore } from "./store"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; /** * True for a Postgres unique-violation (`23505`) — the shape a duplicate diff --git a/packages/workflow-catalog/src/connect-github-routes.ts b/packages/workflow-catalog/src/connect-github-routes.ts index 1880bf95d..30f1a6f99 100644 --- a/packages/workflow-catalog/src/connect-github-routes.ts +++ b/packages/workflow-catalog/src/connect-github-routes.ts @@ -25,7 +25,8 @@ import { Hono } from "hono"; import { type } from "arktype"; import type { RequireGrant, TenantEnv } from "@intx/hub-api"; -import { cookiesFromHeader, makeErrorEnvelope } from "@workbench/hub-client"; +import { cookiesFromHeader } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; import { reportError } from "@corbits/error-sink"; import { diff --git a/packages/workflow-catalog/src/template-block-routes.ts b/packages/workflow-catalog/src/template-block-routes.ts index f03f18fda..e3728b69b 100644 --- a/packages/workflow-catalog/src/template-block-routes.ts +++ b/packages/workflow-catalog/src/template-block-routes.ts @@ -10,7 +10,7 @@ // `AssetService` are touched and this stays testable with plain fakes. import { Hono } from "hono"; import type { RequireGrant, TenantEnv } from "@intx/hub-api"; -import { makeErrorEnvelope } from "@workbench/hub-client"; +import { makeErrorEnvelope } from "@corbits/error-sink"; import { buildBlockWorkflowSource, diff --git a/scripts/checks/error-envelope.ts b/scripts/checks/error-envelope.ts index aa72932a7..420c659c4 100644 --- a/scripts/checks/error-envelope.ts +++ b/scripts/checks/error-envelope.ts @@ -72,7 +72,7 @@ export function auditLocalErrorEnvelopeFactories( if (!arrow && !fn) continue; report.violations.push( `${relPath}: defines a local { error: { code, message } } factory. ` + - `Hub routes must use makeErrorEnvelope from @workbench/hub-client ` + + `Hub routes must use makeErrorEnvelope from @corbits/error-sink ` + `so every failure carries code, userMessage, and refId.`, ); } diff --git a/tsconfig.build.json b/tsconfig.build.json index cb98dcaa1..4149945da 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -16,6 +16,9 @@ { "path": "./packages/agent-runtime/tsconfig.src.json" }, + { + "path": "./packages/agent-workflow-authoring/tsconfig.src.json" + }, { "path": "./packages/api-query/tsconfig.src.json" }, @@ -25,6 +28,9 @@ { "path": "./packages/artifact-ui/tsconfig.src.json" }, + { + "path": "./packages/bench/tsconfig.src.json" + }, { "path": "./packages/bench-ui/tsconfig.src.json" }, @@ -46,6 +52,9 @@ { "path": "./packages/command-palette/tsconfig.src.json" }, + { + "path": "./packages/commands/tsconfig.src.json" + }, { "path": "./packages/context-menu/tsconfig.src.json" }, @@ -79,6 +88,9 @@ { "path": "./packages/inbox/tsconfig.src.json" }, + { + "path": "./packages/inference-catalog/tsconfig.src.json" + }, { "path": "./packages/interaction-tools/tsconfig.src.json" }, @@ -109,12 +121,21 @@ { "path": "./packages/ollama-adapter/tsconfig.src.json" }, + { + "path": "./packages/preferences/tsconfig.src.json" + }, + { + "path": "./packages/presence/tsconfig.src.json" + }, { "path": "./packages/reddit-tools/tsconfig.src.json" }, { "path": "./packages/routines-tools/tsconfig.src.json" }, + { + "path": "./packages/run-key-history/tsconfig.src.json" + }, { "path": "./packages/sandbox-sidecar/tsconfig.src.json" }, @@ -124,6 +145,12 @@ { "path": "./packages/shell-layout/tsconfig.src.json" }, + { + "path": "./packages/sidecar-placement/tsconfig.src.json" + }, + { + "path": "./packages/skills/tsconfig.src.json" + }, { "path": "./packages/skills-tools/tsconfig.src.json" },