From e464fd310e7a599dc54117612e96fff765565ca4 Mon Sep 17 00:00:00 2001 From: Sawyer Date: Wed, 2 Sep 2026 16:49:59 -0700 Subject: [PATCH 1/3] Extract seeding into @corbits/seeding (CL-7383) --- apps/hub/package.json | 1 + apps/hub/src/index.ts | 6 +- apps/hub/src/system-seed.ts | 2 +- bun.lock | 41 ++-- packages/bench/tsconfig.json | 33 +++- packages/bench/tsconfig.src.json | 29 +++ packages/commands/tsconfig.json | 27 ++- packages/commands/tsconfig.src.json | 23 +++ packages/connections/package.json | 1 + .../connect-github-credential-link.test.ts | 2 +- packages/connections/src/mcp-oauth-routes.ts | 2 +- packages/connections/src/mcp-server-routes.ts | 2 +- .../src/persist-credential.test.ts | 2 +- .../connections/src/persist-credential.ts | 8 +- packages/connections/src/routes.ts | 4 +- .../test/github-oauth-connect.test.ts | 2 +- packages/evals/package.json | 1 + packages/evals/src/targets/real-target.ts | 6 +- packages/hub-client/package.json | 14 +- packages/hub-client/src/index.ts | 51 +---- packages/hub-client/tsconfig.json | 21 ++- packages/hub-client/tsconfig.src.json | 17 ++ packages/inference-catalog/tsconfig.json | 39 +++- packages/inference-catalog/tsconfig.src.json | 35 ++++ packages/inference-settings/tsconfig.json | 26 ++- packages/inference-settings/tsconfig.src.json | 22 +++ packages/insights/tsconfig.json | 39 +++- packages/insights/tsconfig.src.json | 35 ++++ packages/onboarding/package.json | 1 + packages/onboarding/src/bench-provisioning.ts | 2 +- .../onboarding/src/complete-credential.ts | 10 +- .../onboarding/src/plant-env-credentials.ts | 8 +- packages/onboarding/src/provision.ts | 4 +- packages/onboarding/src/routes.ts | 8 +- .../test/bench-provisioning.test.ts | 2 +- .../test/complete-credential.test.ts | 9 +- .../test/complete-setup-routes.test.ts | 2 +- .../test/connect-deploys-nothing.test.ts | 2 +- .../test/plant-env-credentials.test.ts | 2 +- packages/onboarding/test/provision.test.ts | 4 +- packages/preferences/tsconfig.json | 33 +++- packages/preferences/tsconfig.src.json | 29 +++ packages/presence/tsconfig.json | 27 ++- packages/presence/tsconfig.src.json | 23 +++ packages/provider-pricing/tsconfig.json | 21 ++- packages/provider-pricing/tsconfig.src.json | 17 ++ packages/run-key-history/tsconfig.json | 30 ++- packages/run-key-history/tsconfig.src.json | 26 +++ packages/seeding/LICENSE | 176 ++++++++++++++++++ packages/seeding/package.json | 35 ++++ .../src/catalog-seed-data.ts | 2 +- .../src/default-routines.ts | 0 .../src/default-skills.test.ts | 0 .../src/default-skills.ts | 0 packages/seeding/src/index.ts | 50 +++++ packages/{hub-client => seeding}/src/seed.ts | 4 +- .../src/workflow-push.test.ts | 0 .../src/workflow-push.ts | 0 .../test/catalog-seed-data.test.ts | 2 +- .../test/default-routines.test.ts | 0 .../{hub-client => seeding}/test/helpers.ts | 0 .../test/routine-launchability.test.ts | 0 .../{hub-client => seeding}/test/seed.test.ts | 0 .../test/tool-registry-coverage.test.ts | 0 packages/seeding/tsconfig.json | 8 + packages/sidecar-placement/tsconfig.json | 33 +++- packages/sidecar-placement/tsconfig.src.json | 29 +++ packages/skills/tsconfig.json | 33 +++- packages/skills/tsconfig.src.json | 29 +++ scripts/checks/browser-safe-subpaths.ts | 1 - scripts/e2e/browser/walkthrough.ts | 2 +- scripts/e2e/channel-reconnect.test.ts | 2 +- scripts/e2e/chat.test.ts | 2 +- scripts/e2e/cl-6324-launch-proof.ts | 2 +- scripts/e2e/cl-6329-turn-swap-proof.ts | 2 +- scripts/e2e/cl-6451-single-run-proof.ts | 2 +- scripts/e2e/greeting-delivery.test.ts | 2 +- scripts/e2e/harness.ts | 2 +- scripts/e2e/local-rip.test.ts | 2 +- scripts/e2e/play.ts | 2 +- tsconfig.build.json | 36 ++++ 81 files changed, 1019 insertions(+), 190 deletions(-) create mode 100644 packages/bench/tsconfig.src.json create mode 100644 packages/commands/tsconfig.src.json create mode 100644 packages/hub-client/tsconfig.src.json create mode 100644 packages/inference-catalog/tsconfig.src.json create mode 100644 packages/inference-settings/tsconfig.src.json create mode 100644 packages/insights/tsconfig.src.json create mode 100644 packages/preferences/tsconfig.src.json create mode 100644 packages/presence/tsconfig.src.json create mode 100644 packages/provider-pricing/tsconfig.src.json create mode 100644 packages/run-key-history/tsconfig.src.json create mode 100644 packages/seeding/LICENSE create mode 100644 packages/seeding/package.json rename packages/{hub-client => seeding}/src/catalog-seed-data.ts (99%) rename packages/{hub-client => seeding}/src/default-routines.ts (100%) rename packages/{hub-client => seeding}/src/default-skills.test.ts (100%) rename packages/{hub-client => seeding}/src/default-skills.ts (100%) create mode 100644 packages/seeding/src/index.ts rename packages/{hub-client => seeding}/src/seed.ts (99%) rename packages/{hub-client => seeding}/src/workflow-push.test.ts (100%) rename packages/{hub-client => seeding}/src/workflow-push.ts (100%) rename packages/{hub-client => seeding}/test/catalog-seed-data.test.ts (99%) rename packages/{hub-client => seeding}/test/default-routines.test.ts (100%) rename packages/{hub-client => seeding}/test/helpers.ts (100%) rename packages/{hub-client => seeding}/test/routine-launchability.test.ts (100%) rename packages/{hub-client => seeding}/test/seed.test.ts (100%) rename packages/{hub-client => seeding}/test/tool-registry-coverage.test.ts (100%) create mode 100644 packages/seeding/tsconfig.json create mode 100644 packages/sidecar-placement/tsconfig.src.json create mode 100644 packages/skills/tsconfig.src.json diff --git a/apps/hub/package.json b/apps/hub/package.json index ef031625b..80040fc3a 100644 --- a/apps/hub/package.json +++ b/apps/hub/package.json @@ -65,6 +65,7 @@ "@workbench/access-policy": "workspace:*", "@workbench/connections": "workspace:*", "@corbits/hub-api-client": "workspace:*", + "@corbits/seeding": "workspace:*", "@workbench/hub-client": "workspace:*", "@workbench/onboarding": "workspace:*", "@workbench/templates": "workspace:*", diff --git a/apps/hub/src/index.ts b/apps/hub/src/index.ts index b4d858900..95c549ab3 100644 --- a/apps/hub/src/index.ts +++ b/apps/hub/src/index.ts @@ -287,10 +287,8 @@ import { createPresenceRoutes, type PresenceRoomKey, } from "@corbits/presence"; -import { - createGitWorkflowPusher, - supportedCredentialProviders, -} from "@workbench/hub-client"; +import { supportedCredentialProviders } from "@workbench/hub-client"; +import { createGitWorkflowPusher } from "@corbits/seeding"; import { createHubAPI } from "@corbits/hub-api-client"; import { createDrizzlePendingSeedStore, diff --git a/apps/hub/src/system-seed.ts b/apps/hub/src/system-seed.ts index 2e0102148..92a0c8cf6 100644 --- a/apps/hub/src/system-seed.ts +++ b/apps/hub/src/system-seed.ts @@ -28,7 +28,7 @@ import { DEFAULT_WORKFLOWS, PLACEHOLDER_CATALOG_API_KEY, type ModelSource, -} from "@workbench/hub-client"; +} from "@corbits/seeding"; import { createHubAPI, signIn, type ApiCall } from "@corbits/hub-api-client"; import { findPersonalTenant } from "@workbench/onboarding"; diff --git a/bun.lock b/bun.lock index b63d5426f..96c562ad0 100644 --- a/bun.lock +++ b/bun.lock @@ -64,6 +64,7 @@ "@corbits/routines": "workspace:*", "@corbits/run-key-history": "workspace:*", "@corbits/run-scope": "workspace:*", + "@corbits/seeding": "workspace:*", "@corbits/sidecar-placement": "workspace:*", "@corbits/skills": "workspace:*", "@corbits/slack-tag": "workspace:*", @@ -564,6 +565,7 @@ "@corbits/hub-api-client": "workspace:*", "@corbits/inference-settings": "workspace:*", "@corbits/mcp-tools": "workspace:*", + "@corbits/seeding": "workspace:*", "@intx/crypto": "0.3.0", "@intx/db": "workspace:*", "@intx/hub-api": "workspace:*", @@ -674,6 +676,7 @@ "@corbits/hub-api-client": "workspace:*", "@corbits/migration-runner": "workspace:*", "@corbits/routines": "workspace:*", + "@corbits/seeding": "workspace:*", "@corbits/webhook-triggers": "workspace:*", "@intx/agent": "workspace:*", "@intx/db": "workspace:*", @@ -806,18 +809,7 @@ "name": "@workbench/hub-client", "version": "0.0.1", "dependencies": { - "@corbits/assistant-workflow": "workspace:*", - "@corbits/echo-workflow": "workspace:*", - "@corbits/heartbeat-workflow": "workspace:*", - "@corbits/hub-api-client": "workspace:*", - "@corbits/inference-catalog": "workspace:*", - "@corbits/last-30-days-research-workflow": "workspace:*", - "@corbits/tool-registry-publish": "workspace:*", - "@corbits/workbench-digest-workflow": "workspace:*", - "@corbits/workflows": "workspace:*", - "@intx/inference": "workspace:*", "@intx/types": "workspace:*", - "@workbench/templates": "workspace:*", "arktype": "catalog:", }, "devDependencies": { @@ -1090,6 +1082,7 @@ "@corbits/collections": "workspace:*", "@corbits/error-sink": "workspace:*", "@corbits/hub-api-client": "workspace:*", + "@corbits/seeding": "workspace:*", "@intx/crypto": "0.3.0", "@intx/hub-api": "workspace:*", "@intx/types": "workspace:*", @@ -1297,6 +1290,30 @@ "typescript": "catalog:", }, }, + "packages/seeding": { + "name": "@corbits/seeding", + "version": "0.0.1", + "dependencies": { + "@corbits/assistant-workflow": "workspace:*", + "@corbits/echo-workflow": "workspace:*", + "@corbits/heartbeat-workflow": "workspace:*", + "@corbits/hub-api-client": "workspace:*", + "@corbits/inference-catalog": "workspace:*", + "@corbits/last-30-days-research-workflow": "workspace:*", + "@corbits/tool-registry-publish": "workspace:*", + "@corbits/workbench-digest-workflow": "workspace:*", + "@corbits/workflows": "workspace:*", + "@intx/inference": "workspace:*", + "@intx/types": "workspace:*", + "@workbench/hub-client": "workspace:*", + "@workbench/templates": "workspace:*", + "arktype": "catalog:", + }, + "devDependencies": { + "@types/bun": "catalog:", + "typescript": "catalog:", + }, + }, "packages/settings-ui": { "name": "@corbits/settings-ui", "version": "0.0.1", @@ -2299,6 +2316,8 @@ "@corbits/scout-agent": ["@corbits/scout-agent@workspace:packages/scout-agent"], + "@corbits/seeding": ["@corbits/seeding@workspace:packages/seeding"], + "@corbits/settings-ui": ["@corbits/settings-ui@workspace:packages/settings-ui"], "@corbits/shell-layout": ["@corbits/shell-layout@workspace:packages/shell-layout"], diff --git a/packages/bench/tsconfig.json b/packages/bench/tsconfig.json index d7611c122..0a981930f 100644 --- a/packages/bench/tsconfig.json +++ b/packages/bench/tsconfig.json @@ -1,8 +1,31 @@ { - "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": "../hub-client/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..573063af3 --- /dev/null +++ b/packages/bench/tsconfig.src.json @@ -0,0 +1,29 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "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": "../hub-client/tsconfig.src.json" + }, + { + "path": "../migration-runner/tsconfig.src.json" + } + ] +} diff --git a/packages/commands/tsconfig.json b/packages/commands/tsconfig.json index d7611c122..2292acf3a 100644 --- a/packages/commands/tsconfig.json +++ b/packages/commands/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/hub-api/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + }, + { + "path": "../hub-client/tsconfig.src.json" + } + ] } diff --git a/packages/commands/tsconfig.src.json b/packages/commands/tsconfig.src.json new file mode 100644 index 000000000..f4bb20362 --- /dev/null +++ b/packages/commands/tsconfig.src.json @@ -0,0 +1,23 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "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" + }, + { + "path": "../hub-client/tsconfig.src.json" + } + ] +} diff --git a/packages/connections/package.json b/packages/connections/package.json index 82154dd91..2e6f25f9b 100644 --- a/packages/connections/package.json +++ b/packages/connections/package.json @@ -33,6 +33,7 @@ "@intx/types": "workspace:*", "@modelcontextprotocol/sdk": "catalog:", "@corbits/hub-api-client": "workspace:*", + "@corbits/seeding": "workspace:*", "@workbench/hub-client": "workspace:*", "@workbench/templates": "workspace:*", "arktype": "catalog:", diff --git a/packages/connections/src/connect-github-credential-link.test.ts b/packages/connections/src/connect-github-credential-link.test.ts index 7c8e41006..ad0fe28a9 100644 --- a/packages/connections/src/connect-github-credential-link.test.ts +++ b/packages/connections/src/connect-github-credential-link.test.ts @@ -13,7 +13,7 @@ import { describe, expect, test } from "bun:test"; import { Hono } from "hono"; import type { MiddlewareHandler } from "hono"; import type { RequireGrant, TenantEnv } from "@intx/hub-api"; -import type { EnsureCredentialArgs } from "@workbench/hub-client"; +import type { EnsureCredentialArgs } from "@corbits/seeding"; import type { ApiCall } from "@corbits/hub-api-client"; import { CONNECTOR_REGISTRY, diff --git a/packages/connections/src/mcp-oauth-routes.ts b/packages/connections/src/mcp-oauth-routes.ts index e5db3c5d7..796321e4e 100644 --- a/packages/connections/src/mcp-oauth-routes.ts +++ b/packages/connections/src/mcp-oauth-routes.ts @@ -22,7 +22,7 @@ import { type } from "arktype"; import type { RequireGrant, TenantEnv } from "@intx/hub-api"; import type { CredentialCipher } from "@intx/types"; import { MCP_STREAMABLE_HTTP_PROVIDER_KEY } from "@corbits/credential-providers"; -import { ensureCredential, ensureProvider } from "@workbench/hub-client"; +import { ensureCredential, ensureProvider } from "@corbits/seeding"; import { cookiesFromHeader, createHubAPI, diff --git a/packages/connections/src/mcp-server-routes.ts b/packages/connections/src/mcp-server-routes.ts index 1f8817ee0..46c460c46 100644 --- a/packages/connections/src/mcp-server-routes.ts +++ b/packages/connections/src/mcp-server-routes.ts @@ -20,7 +20,7 @@ import { ProviderResponse, paginatedSchema, } from "@intx/types"; -import { ensureCredential, ensureProvider } from "@workbench/hub-client"; +import { ensureCredential, ensureProvider } from "@corbits/seeding"; import { cookiesFromHeader, createHubAPI, diff --git a/packages/connections/src/persist-credential.test.ts b/packages/connections/src/persist-credential.test.ts index 712ffbc05..39e90c59d 100644 --- a/packages/connections/src/persist-credential.test.ts +++ b/packages/connections/src/persist-credential.test.ts @@ -8,7 +8,7 @@ import type { EnsureCredentialArgs, EnsureProviderArgs, SeedCatalogArgs, -} from "@workbench/hub-client"; +} from "@corbits/seeding"; import type { ConnectorDescriptor } from "./descriptor"; import { isInferenceProvider, diff --git a/packages/connections/src/persist-credential.ts b/packages/connections/src/persist-credential.ts index f1e8479d8..78be4c6e8 100644 --- a/packages/connections/src/persist-credential.ts +++ b/packages/connections/src/persist-credential.ts @@ -14,16 +14,18 @@ // Plugins gallery's resolver looks up. `seedCatalog` is passed that same // `credentialName` so its own internal `ensureCredential` resolves to // the row planted here rather than a second `-default` row. +import { + PROVIDER_TEST_CONFIG, + type SupportedCredentialProvider, +} from "@workbench/hub-client"; import { ensureCredential, ensureProvider, - PROVIDER_TEST_CONFIG, seedCatalog, type EnsureCredentialArgs, type EnsureProviderArgs, type SeedCatalogArgs, - type SupportedCredentialProvider, -} from "@workbench/hub-client"; +} from "@corbits/seeding"; import type { ApiCall } from "@corbits/hub-api-client"; import type { ConnectorDescriptor } from "./descriptor"; diff --git a/packages/connections/src/routes.ts b/packages/connections/src/routes.ts index 83db4562a..55a1db51d 100644 --- a/packages/connections/src/routes.ts +++ b/packages/connections/src/routes.ts @@ -23,15 +23,15 @@ import { import type { RequireGrant, TenantEnv } from "@intx/hub-api"; import { hasUsableModel } from "@corbits/inference-settings"; import { makeErrorEnvelope, reportError } from "@corbits/error-sink"; +import { OLLAMA_PLACEHOLDER_SECRET } from "@workbench/hub-client"; import { ensureCredential, ensureProvider, - OLLAMA_PLACEHOLDER_SECRET, seedCatalog, type EnsureCredentialArgs, type EnsureProviderArgs, type SeedCatalogArgs, -} from "@workbench/hub-client"; +} from "@corbits/seeding"; import { cookiesFromHeader, createHubAPI, diff --git a/packages/connections/test/github-oauth-connect.test.ts b/packages/connections/test/github-oauth-connect.test.ts index 1abffcff6..1c84d2588 100644 --- a/packages/connections/test/github-oauth-connect.test.ts +++ b/packages/connections/test/github-oauth-connect.test.ts @@ -19,7 +19,7 @@ import type { EnsureCredentialArgs, EnsureProviderArgs, SeedCatalogArgs, -} from "@workbench/hub-client"; +} from "@corbits/seeding"; import type { ConnectorDescriptor } from "../src/descriptor"; import { exchangeCodeForGithubToken, diff --git a/packages/evals/package.json b/packages/evals/package.json index b9cf8f23c..b948576de 100644 --- a/packages/evals/package.json +++ b/packages/evals/package.json @@ -30,6 +30,7 @@ "@modelcontextprotocol/sdk": "catalog:", "@workbench/connections": "workspace:*", "@corbits/hub-api-client": "workspace:*", + "@corbits/seeding": "workspace:*", "@workbench/hub-client": "workspace:*", "@workbench/onboarding": "workspace:*", "arktype": "catalog:", diff --git a/packages/evals/src/targets/real-target.ts b/packages/evals/src/targets/real-target.ts index fe7c61766..a8055298f 100644 --- a/packages/evals/src/targets/real-target.ts +++ b/packages/evals/src/targets/real-target.ts @@ -21,10 +21,8 @@ import { mkdtemp, rm } from "node:fs/promises"; import { tmpdir } from "node:os"; import path from "node:path"; -import { - createGitWorkflowPusher, - OLLAMA_PLACEHOLDER_SECRET, -} from "@workbench/hub-client"; +import { OLLAMA_PLACEHOLDER_SECRET } from "@workbench/hub-client"; +import { createGitWorkflowPusher } from "@corbits/seeding"; import { createHubAPI, type ApiCall } from "@corbits/hub-api-client"; import { getLogger } from "@intx/log"; import { completeCredentialSetup } from "@workbench/onboarding"; diff --git a/packages/hub-client/package.json b/packages/hub-client/package.json index 9d8ebb3b7..f94ebc0ce 100644 --- a/packages/hub-client/package.json +++ b/packages/hub-client/package.json @@ -1,14 +1,13 @@ { "name": "@workbench/hub-client", "private": true, - "description": "The hub's native HTTP API as a typed client, plus tenant seeding: authenticate, deploy the default workflow set, and confirm every deployment answers", + "description": "Credential probing and completion-capability filtering shared by onboarding, connections, and tenant seeding", "version": "0.0.1", "license": "LGPL-2.1-or-later", "type": "module", "exports": { ".": "./src/index.ts", "./credential-test": "./src/credential-test.ts", - "./catalog-seed-data": "./src/catalog-seed-data.ts", "./model-capability": "./src/model-capability.ts" }, "scripts": { @@ -16,17 +15,6 @@ "test": "bun test" }, "dependencies": { - "@corbits/assistant-workflow": "workspace:*", - "@corbits/echo-workflow": "workspace:*", - "@corbits/heartbeat-workflow": "workspace:*", - "@corbits/hub-api-client": "workspace:*", - "@corbits/inference-catalog": "workspace:*", - "@corbits/last-30-days-research-workflow": "workspace:*", - "@corbits/tool-registry-publish": "workspace:*", - "@corbits/workbench-digest-workflow": "workspace:*", - "@workbench/templates": "workspace:*", - "@corbits/workflows": "workspace:*", - "@intx/inference": "workspace:*", "@intx/types": "workspace:*", "arktype": "catalog:" }, diff --git a/packages/hub-client/src/index.ts b/packages/hub-client/src/index.ts index 61272672f..a72129a90 100644 --- a/packages/hub-client/src/index.ts +++ b/packages/hub-client/src/index.ts @@ -1,52 +1,7 @@ -// The library entry for `@workbench/hub-client`: the hub's native HTTP -// API as a typed client, plus tenant seeding. Both the CLI's own `seed` -// verb and the first-login provisioning hook consume this so the -// tenant-seeding logic is implemented once. +// The library entry for `@workbench/hub-client`: credential probing and +// completion-capability filtering shared by onboarding, connections, and +// tenant seeding (`@corbits/seeding`). -export type { - DefaultWorkflow, - EnsureCredentialArgs, - EnsureProviderArgs, - ModelSource, - PushOutcome, - SeedCatalogArgs, - SeedCatalogResult, - SeedTenant, - SeedTenantArgs, - ToolRegistryPublisher, - WorkflowPusher, -} from "./seed"; -export { - CATALOG_TEST_WORKFLOWS, - DEFAULT_WORKFLOWS, - SEED_GRANTS, - inferenceCredentialName, - PLACEHOLDER_CATALOG_API_KEY, - ensureCredential, - ensureProvider, - reconcileSeedGrants, - seedCatalog, - seedTenant, - isLiveDeploymentStatus, - SETUP_AGENT_ASSET_NAME, -} from "./seed"; -export { - publishCorbitsToolsRegistry, - type PublishCorbitsToolsRegistryArgs, - type PublishSummary, -} from "@corbits/tool-registry-publish"; -export { - CATALOG_SEEDS, - deriveWorkbenchHostInferencePreferences, -} from "./catalog-seed-data"; -export type { - CatalogModelSpec, - CatalogProviderSeed, - CatalogProviderSpec, - WorkbenchHostInferencePreference, -} from "./catalog-seed-data"; -export { createGitWorkflowPusher } from "./workflow-push"; -export { ensureDefaultRoutines } from "./default-routines"; export { fetchOllamaModelCatalog, ollamaApiRoot, diff --git a/packages/hub-client/tsconfig.json b/packages/hub-client/tsconfig.json index d7611c122..495d046ac 100644 --- a/packages/hub-client/tsconfig.json +++ b/packages/hub-client/tsconfig.json @@ -1,8 +1,19 @@ { - "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/types/tsconfig.src.json" + } + ] } diff --git a/packages/hub-client/tsconfig.src.json b/packages/hub-client/tsconfig.src.json new file mode 100644 index 000000000..fb751701a --- /dev/null +++ b/packages/hub-client/tsconfig.src.json @@ -0,0 +1,17 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "composite": true, + "emitDeclarationOnly": true, + "outDir": "dist", + "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" + }, + "references": [ + { + "path": "../../vendor/intx/types/tsconfig.src.json" + } + ] +} diff --git a/packages/inference-catalog/tsconfig.json b/packages/inference-catalog/tsconfig.json index d7611c122..68741f7e7 100644 --- a/packages/inference-catalog/tsconfig.json +++ b/packages/inference-catalog/tsconfig.json @@ -1,8 +1,37 @@ { - "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": "../hub-client/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..e2c7adab2 --- /dev/null +++ b/packages/inference-catalog/tsconfig.src.json @@ -0,0 +1,35 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "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": "../hub-client/tsconfig.src.json" + }, + { + "path": "../migration-runner/tsconfig.src.json" + }, + { + "path": "../ollama-adapter/tsconfig.src.json" + } + ] +} diff --git a/packages/inference-settings/tsconfig.json b/packages/inference-settings/tsconfig.json index 68035e9a3..aac6ce2d2 100644 --- a/packages/inference-settings/tsconfig.json +++ b/packages/inference-settings/tsconfig.json @@ -1,10 +1,22 @@ { - "extends": "../../tsconfig.base.json", - "include": ["src", "test"], + "extends": "./tsconfig.src.json", "compilerOptions": { - "jsx": "react-jsx", - "lib": ["ESNext", "DOM", "DOM.Iterable"], - "types": ["bun"], - "noEmit": true - } + "composite": false, + "noEmit": true, + "disableSourceOfProjectReferenceRedirect": true, + "declaration": false, + "declarationMap": false, + "emitDeclarationOnly": false, + "rootDir": "../.." + }, + "include": ["src"], + "exclude": [], + "references": [ + { + "path": "../../vendor/intx/types/tsconfig.src.json" + }, + { + "path": "../hub-client/tsconfig.src.json" + } + ] } diff --git a/packages/inference-settings/tsconfig.src.json b/packages/inference-settings/tsconfig.src.json new file mode 100644 index 000000000..b35e5a406 --- /dev/null +++ b/packages/inference-settings/tsconfig.src.json @@ -0,0 +1,22 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "jsx": "react-jsx", + "lib": ["ESNext", "DOM", "DOM.Iterable"], + "types": ["bun"], + "composite": true, + "emitDeclarationOnly": true, + "outDir": "dist", + "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" + }, + "references": [ + { + "path": "../../vendor/intx/types/tsconfig.src.json" + }, + { + "path": "../hub-client/tsconfig.src.json" + } + ] +} diff --git a/packages/insights/tsconfig.json b/packages/insights/tsconfig.json index d7611c122..727b03ee4 100644 --- a/packages/insights/tsconfig.json +++ b/packages/insights/tsconfig.json @@ -1,8 +1,37 @@ { - "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": "../hub-client/tsconfig.src.json" + }, + { + "path": "../migration-runner/tsconfig.src.json" + }, + { + "path": "../provider-pricing/tsconfig.src.json" + } + ] } diff --git a/packages/insights/tsconfig.src.json b/packages/insights/tsconfig.src.json new file mode 100644 index 000000000..830952c08 --- /dev/null +++ b/packages/insights/tsconfig.src.json @@ -0,0 +1,35 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "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": "../hub-client/tsconfig.src.json" + }, + { + "path": "../migration-runner/tsconfig.src.json" + }, + { + "path": "../provider-pricing/tsconfig.src.json" + } + ] +} diff --git a/packages/onboarding/package.json b/packages/onboarding/package.json index bdeccc591..b775578f1 100644 --- a/packages/onboarding/package.json +++ b/packages/onboarding/package.json @@ -22,6 +22,7 @@ "@workbench/access-policy": "workspace:*", "@workbench/connections": "workspace:*", "@corbits/hub-api-client": "workspace:*", + "@corbits/seeding": "workspace:*", "@workbench/hub-client": "workspace:*", "arktype": "catalog:", "drizzle-orm": "catalog:", diff --git a/packages/onboarding/src/bench-provisioning.ts b/packages/onboarding/src/bench-provisioning.ts index c15b62d6d..4a14c80d3 100644 --- a/packages/onboarding/src/bench-provisioning.ts +++ b/packages/onboarding/src/bench-provisioning.ts @@ -32,7 +32,7 @@ // module stays out of the auth mechanism entirely. import { reportError } from "@corbits/error-sink"; -import { type WorkflowPusher } from "@workbench/hub-client"; +import { type WorkflowPusher } from "@corbits/seeding"; import { type ApiCall } from "@corbits/hub-api-client"; import { ensureSeeded } from "./complete-credential"; import { isFullySeeded } from "./provision"; diff --git a/packages/onboarding/src/complete-credential.ts b/packages/onboarding/src/complete-credential.ts index 138864478..255477c96 100644 --- a/packages/onboarding/src/complete-credential.ts +++ b/packages/onboarding/src/complete-credential.ts @@ -60,17 +60,19 @@ import { TenantResponse, paginatedSchema, } from "@intx/types"; +import { + ollamaOpenAICompatBaseURL, + type SupportedCredentialProvider, +} from "@workbench/hub-client"; +import { preferCompletionCapable } from "@workbench/hub-client/model-capability"; import { CATALOG_SEEDS, DEFAULT_WORKFLOWS, - ollamaOpenAICompatBaseURL, seedTenant, type ModelSource, type SeedTenantArgs, - type SupportedCredentialProvider, type WorkflowPusher, -} from "@workbench/hub-client"; -import { preferCompletionCapable } from "@workbench/hub-client/model-capability"; +} from "@corbits/seeding"; import { isSidecarUnavailableError, parseAs, diff --git a/packages/onboarding/src/plant-env-credentials.ts b/packages/onboarding/src/plant-env-credentials.ts index 82a1832d7..46db6b6ee 100644 --- a/packages/onboarding/src/plant-env-credentials.ts +++ b/packages/onboarding/src/plant-env-credentials.ts @@ -28,14 +28,16 @@ import { } from "@intx/types"; import { reportError } from "@corbits/error-sink"; import { - inferenceCredentialName, OLLAMA_PLACEHOLDER_SECRET, - seedCatalog, testProviderCredential, - type SeedCatalogArgs, type SupportedCredentialProvider, type TestProviderCredentialArgs, } from "@workbench/hub-client"; +import { + inferenceCredentialName, + seedCatalog, + type SeedCatalogArgs, +} from "@corbits/seeding"; import { parseAs, type ApiCall } from "@corbits/hub-api-client"; /** diff --git a/packages/onboarding/src/provision.ts b/packages/onboarding/src/provision.ts index cdfc1febb..b904fa953 100644 --- a/packages/onboarding/src/provision.ts +++ b/packages/onboarding/src/provision.ts @@ -4,7 +4,7 @@ // parented under the operator tenant when one is configured, and // seeded with the default workflow set when the hub carries a seed // model credential. Every step reuses a native route or -// `@workbench/hub-client`; nothing here re-implements tenant creation, +// `@corbits/seeding`; nothing here re-implements tenant creation, // grant planting, or workflow deployment. import { @@ -23,7 +23,7 @@ import { type ToolRegistryPublisher, type WorkflowPusher, isLiveDeploymentStatus, -} from "@workbench/hub-client"; +} from "@corbits/seeding"; import { parseAs, type ApiCall } from "@corbits/hub-api-client"; import { reportError } from "@corbits/error-sink"; import { diff --git a/packages/onboarding/src/routes.ts b/packages/onboarding/src/routes.ts index 16d6f6b0c..ad5f8d729 100644 --- a/packages/onboarding/src/routes.ts +++ b/packages/onboarding/src/routes.ts @@ -9,14 +9,16 @@ import { createExpiringMap } from "@corbits/collections"; import { createNoopCredentialCipher } from "@intx/crypto"; import { CredentialResponse, paginatedSchema } from "@intx/types"; import type { CredentialCipher } from "@intx/types"; +import { + supportedCredentialProviders, + type SupportedCredentialProvider, +} from "@workbench/hub-client"; import { inferenceCredentialName, SETUP_AGENT_ASSET_NAME, - supportedCredentialProviders, type ModelSource, - type SupportedCredentialProvider, type WorkflowPusher, -} from "@workbench/hub-client"; +} from "@corbits/seeding"; import { cookiesFromHeader, createHubAPI, diff --git a/packages/onboarding/test/bench-provisioning.test.ts b/packages/onboarding/test/bench-provisioning.test.ts index 7ae452bd9..0bb4a8ad0 100644 --- a/packages/onboarding/test/bench-provisioning.test.ts +++ b/packages/onboarding/test/bench-provisioning.test.ts @@ -9,7 +9,7 @@ import { describe, expect, test } from "bun:test"; import { createEnvKeyCredentialCipher } from "@intx/crypto"; import type { CredentialCipher } from "@intx/types"; -import { DEFAULT_WORKFLOWS } from "@workbench/hub-client"; +import { DEFAULT_WORKFLOWS } from "@corbits/seeding"; import { createBenchProvisioner, type BenchProvisionerDeps, diff --git a/packages/onboarding/test/complete-credential.test.ts b/packages/onboarding/test/complete-credential.test.ts index 658b879a3..807321e19 100644 --- a/packages/onboarding/test/complete-credential.test.ts +++ b/packages/onboarding/test/complete-credential.test.ts @@ -1,7 +1,10 @@ import { describe, expect, test } from "bun:test"; -import type { WorkflowPusher } from "@workbench/hub-client"; -import { CATALOG_SEEDS, SETUP_AGENT_ASSET_NAME } from "@workbench/hub-client"; -import { type ApiCall, SidecarUnavailableError } from "@corbits/hub-api-client"; +import type { WorkflowPusher } from "@corbits/seeding"; +import { CATALOG_SEEDS, SETUP_AGENT_ASSET_NAME } from "@corbits/seeding"; +import { + type ApiCall, + SidecarUnavailableError, +} from "@corbits/hub-api-client"; import { completeCredentialSetup, ensureSeeded, diff --git a/packages/onboarding/test/complete-setup-routes.test.ts b/packages/onboarding/test/complete-setup-routes.test.ts index cebd4b129..c23a5328f 100644 --- a/packages/onboarding/test/complete-setup-routes.test.ts +++ b/packages/onboarding/test/complete-setup-routes.test.ts @@ -28,7 +28,7 @@ import type { MiddlewareHandler } from "hono"; import { Hono } from "hono"; import { createEnvKeyCredentialCipher } from "@intx/crypto"; import type { CredentialCipher } from "@intx/types"; -import { DEFAULT_WORKFLOWS } from "@workbench/hub-client"; +import { DEFAULT_WORKFLOWS } from "@corbits/seeding"; import { createOnboardingRoutes } from "../src/routes"; import { createInMemoryPendingSeedStore, diff --git a/packages/onboarding/test/connect-deploys-nothing.test.ts b/packages/onboarding/test/connect-deploys-nothing.test.ts index 4f98d3565..53b33e2db 100644 --- a/packages/onboarding/test/connect-deploys-nothing.test.ts +++ b/packages/onboarding/test/connect-deploys-nothing.test.ts @@ -15,7 +15,7 @@ import type { CredentialCipher } from "@intx/types"; import { DEFAULT_WORKFLOWS, SETUP_AGENT_ASSET_NAME, -} from "@workbench/hub-client"; +} from "@corbits/seeding"; import { createOnboardingRoutes } from "../src/routes"; import { createInMemoryPendingSeedStore, diff --git a/packages/onboarding/test/plant-env-credentials.test.ts b/packages/onboarding/test/plant-env-credentials.test.ts index 35e1d3fe9..61eab8f1e 100644 --- a/packages/onboarding/test/plant-env-credentials.test.ts +++ b/packages/onboarding/test/plant-env-credentials.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from "bun:test"; -import type { SeedCatalogArgs } from "@workbench/hub-client"; +import type { SeedCatalogArgs } from "@corbits/seeding"; import type { ApiCall } from "@corbits/hub-api-client"; import { envProviderBaseUrlsFrom, diff --git a/packages/onboarding/test/provision.test.ts b/packages/onboarding/test/provision.test.ts index 282498071..e162f25c7 100644 --- a/packages/onboarding/test/provision.test.ts +++ b/packages/onboarding/test/provision.test.ts @@ -3,8 +3,8 @@ import { DEFAULT_WORKFLOWS, SEED_GRANTS, SETUP_AGENT_ASSET_NAME, -} from "@workbench/hub-client"; -import type { WorkflowPusher } from "@workbench/hub-client"; +} from "@corbits/seeding"; +import type { WorkflowPusher } from "@corbits/seeding"; import type { ApiCall } from "@corbits/hub-api-client"; import { isFullySeeded, diff --git a/packages/preferences/tsconfig.json b/packages/preferences/tsconfig.json index d7611c122..0a981930f 100644 --- a/packages/preferences/tsconfig.json +++ b/packages/preferences/tsconfig.json @@ -1,8 +1,31 @@ { - "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": "../hub-client/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..573063af3 --- /dev/null +++ b/packages/preferences/tsconfig.src.json @@ -0,0 +1,29 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "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": "../hub-client/tsconfig.src.json" + }, + { + "path": "../migration-runner/tsconfig.src.json" + } + ] +} diff --git a/packages/presence/tsconfig.json b/packages/presence/tsconfig.json index d7611c122..2292acf3a 100644 --- a/packages/presence/tsconfig.json +++ b/packages/presence/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/hub-api/tsconfig.src.json" + }, + { + "path": "../error-sink/tsconfig.src.json" + }, + { + "path": "../hub-client/tsconfig.src.json" + } + ] } diff --git a/packages/presence/tsconfig.src.json b/packages/presence/tsconfig.src.json new file mode 100644 index 000000000..f4bb20362 --- /dev/null +++ b/packages/presence/tsconfig.src.json @@ -0,0 +1,23 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "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" + }, + { + "path": "../hub-client/tsconfig.src.json" + } + ] +} diff --git a/packages/provider-pricing/tsconfig.json b/packages/provider-pricing/tsconfig.json index d7611c122..c5186efbd 100644 --- a/packages/provider-pricing/tsconfig.json +++ b/packages/provider-pricing/tsconfig.json @@ -1,8 +1,19 @@ { - "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": "../hub-client/tsconfig.src.json" + } + ] } diff --git a/packages/provider-pricing/tsconfig.src.json b/packages/provider-pricing/tsconfig.src.json new file mode 100644 index 000000000..a4dee963f --- /dev/null +++ b/packages/provider-pricing/tsconfig.src.json @@ -0,0 +1,17 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "composite": true, + "emitDeclarationOnly": true, + "outDir": "dist", + "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" + }, + "references": [ + { + "path": "../hub-client/tsconfig.src.json" + } + ] +} diff --git a/packages/run-key-history/tsconfig.json b/packages/run-key-history/tsconfig.json index d7611c122..381f78404 100644 --- a/packages/run-key-history/tsconfig.json +++ b/packages/run-key-history/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": "../error-sink/tsconfig.src.json" + }, + { + "path": "../hub-client/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..0d4dfdd21 --- /dev/null +++ b/packages/run-key-history/tsconfig.src.json @@ -0,0 +1,26 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "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" + }, + { + "path": "../hub-client/tsconfig.src.json" + } + ] +} diff --git a/packages/seeding/LICENSE b/packages/seeding/LICENSE new file mode 100644 index 000000000..c6487f4fd --- /dev/null +++ b/packages/seeding/LICENSE @@ -0,0 +1,176 @@ +GNU LESSER GENERAL PUBLIC LICENSE + +Version 2.1, February 1999 + +Copyright (C) 1991, 1999 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] + +Preamble + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. + +This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. + +When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. + +To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. + +For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. + +We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. + +To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. + +Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. + +Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. + +When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. + +We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. + +For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. + +In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. + +Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. + +The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. + +GNU LESSER GENERAL PUBLIC LICENSE +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". + +A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. + +The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) + +"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. + +1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. + +(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. + +Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. + +This option is useful when you wish to copy part of the code of the Library into a program that is not a library. + +4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. + +If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. + +5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. + +However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. + +When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. + +If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) + +Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. + +6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. + +You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: + + a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. + + e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. + +For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. + +7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. + + b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. + +8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. + +10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. + +11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. + +14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Libraries + +If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). + +To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + + one line to give the library's name and an idea of what it does. + Copyright (C) year name of author + + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: + +Yoyodyne, Inc., hereby disclaims all copyright interest in +the library `Frob' (a library for tweaking knobs) written +by James Random Hacker. + +signature of Ty Coon, 1 April 1990 +Ty Coon, President of Vice +That's all there is to it! diff --git a/packages/seeding/package.json b/packages/seeding/package.json new file mode 100644 index 000000000..2a784fdec --- /dev/null +++ b/packages/seeding/package.json @@ -0,0 +1,35 @@ +{ + "name": "@corbits/seeding", + "private": true, + "description": "Tenant seeding: deploy the default workflow set, plant preset routines and skills, and confirm every deployment answers", + "version": "0.0.1", + "license": "LGPL-2.1-or-later", + "type": "module", + "exports": { + ".": "./src/index.ts" + }, + "scripts": { + "typecheck": "tsc --noEmit", + "test": "bun test" + }, + "dependencies": { + "@corbits/assistant-workflow": "workspace:*", + "@corbits/echo-workflow": "workspace:*", + "@corbits/heartbeat-workflow": "workspace:*", + "@corbits/hub-api-client": "workspace:*", + "@corbits/inference-catalog": "workspace:*", + "@corbits/last-30-days-research-workflow": "workspace:*", + "@corbits/tool-registry-publish": "workspace:*", + "@corbits/workbench-digest-workflow": "workspace:*", + "@corbits/workflows": "workspace:*", + "@intx/inference": "workspace:*", + "@intx/types": "workspace:*", + "@workbench/hub-client": "workspace:*", + "@workbench/templates": "workspace:*", + "arktype": "catalog:" + }, + "devDependencies": { + "@types/bun": "catalog:", + "typescript": "catalog:" + } +} diff --git a/packages/hub-client/src/catalog-seed-data.ts b/packages/seeding/src/catalog-seed-data.ts similarity index 99% rename from packages/hub-client/src/catalog-seed-data.ts rename to packages/seeding/src/catalog-seed-data.ts index 25d52038b..f5d0614c9 100644 --- a/packages/hub-client/src/catalog-seed-data.ts +++ b/packages/seeding/src/catalog-seed-data.ts @@ -15,7 +15,7 @@ import type { AdapterPluginId, SupportedCredentialProvider, -} from "./credential-test"; +} from "@workbench/hub-client/credential-test"; export type CatalogModelSpec = { readonly canonicalName: string; diff --git a/packages/hub-client/src/default-routines.ts b/packages/seeding/src/default-routines.ts similarity index 100% rename from packages/hub-client/src/default-routines.ts rename to packages/seeding/src/default-routines.ts diff --git a/packages/hub-client/src/default-skills.test.ts b/packages/seeding/src/default-skills.test.ts similarity index 100% rename from packages/hub-client/src/default-skills.test.ts rename to packages/seeding/src/default-skills.test.ts diff --git a/packages/hub-client/src/default-skills.ts b/packages/seeding/src/default-skills.ts similarity index 100% rename from packages/hub-client/src/default-skills.ts rename to packages/seeding/src/default-skills.ts diff --git a/packages/seeding/src/index.ts b/packages/seeding/src/index.ts new file mode 100644 index 000000000..d79e5ab90 --- /dev/null +++ b/packages/seeding/src/index.ts @@ -0,0 +1,50 @@ +// The library entry for `@corbits/seeding`: deploys the default workflow +// set for an already-known tenant, plants preset routines and skills, and +// confirms every deployment answers. Both the boot-time root-tenant seed +// and the first-login provisioning hook consume this so the tenant-seeding +// logic is implemented once. + +export type { + DefaultWorkflow, + EnsureCredentialArgs, + EnsureProviderArgs, + ModelSource, + PushOutcome, + SeedCatalogArgs, + SeedCatalogResult, + SeedTenant, + SeedTenantArgs, + ToolRegistryPublisher, + WorkflowPusher, +} from "./seed"; +export { + CATALOG_TEST_WORKFLOWS, + DEFAULT_WORKFLOWS, + SEED_GRANTS, + inferenceCredentialName, + PLACEHOLDER_CATALOG_API_KEY, + ensureCredential, + ensureProvider, + reconcileSeedGrants, + seedCatalog, + seedTenant, + isLiveDeploymentStatus, + SETUP_AGENT_ASSET_NAME, +} from "./seed"; +export { + publishCorbitsToolsRegistry, + type PublishCorbitsToolsRegistryArgs, + type PublishSummary, +} from "@corbits/tool-registry-publish"; +export { + CATALOG_SEEDS, + deriveWorkbenchHostInferencePreferences, +} from "./catalog-seed-data"; +export type { + CatalogModelSpec, + CatalogProviderSeed, + CatalogProviderSpec, + WorkbenchHostInferencePreference, +} from "./catalog-seed-data"; +export { createGitWorkflowPusher } from "./workflow-push"; +export { ensureDefaultRoutines } from "./default-routines"; diff --git a/packages/hub-client/src/seed.ts b/packages/seeding/src/seed.ts similarity index 99% rename from packages/hub-client/src/seed.ts rename to packages/seeding/src/seed.ts index e4938ed88..8f3be7023 100644 --- a/packages/hub-client/src/seed.ts +++ b/packages/seeding/src/seed.ts @@ -62,8 +62,8 @@ import { fetchOllamaModelCatalog, ollamaOpenAICompatBaseURL, type SupportedCredentialProvider, -} from "./credential-test"; -import { hasCompletionCapableModel } from "./model-capability"; +} from "@workbench/hub-client/credential-test"; +import { hasCompletionCapableModel } from "@workbench/hub-client/model-capability"; const GIT_TOKEN_TTL_MS = 10 * 60 * 1000; const ECHO_TURN_TIMEOUT_MS = 2 * 60 * 1000; diff --git a/packages/hub-client/src/workflow-push.test.ts b/packages/seeding/src/workflow-push.test.ts similarity index 100% rename from packages/hub-client/src/workflow-push.test.ts rename to packages/seeding/src/workflow-push.test.ts diff --git a/packages/hub-client/src/workflow-push.ts b/packages/seeding/src/workflow-push.ts similarity index 100% rename from packages/hub-client/src/workflow-push.ts rename to packages/seeding/src/workflow-push.ts diff --git a/packages/hub-client/test/catalog-seed-data.test.ts b/packages/seeding/test/catalog-seed-data.test.ts similarity index 99% rename from packages/hub-client/test/catalog-seed-data.test.ts rename to packages/seeding/test/catalog-seed-data.test.ts index 18da04833..915332363 100644 --- a/packages/hub-client/test/catalog-seed-data.test.ts +++ b/packages/seeding/test/catalog-seed-data.test.ts @@ -14,7 +14,7 @@ import { import { supportedCredentialProviders, type SupportedCredentialProvider, -} from "../src/credential-test"; +} from "@workbench/hub-client/credential-test"; describe("CATALOG_SEEDS", () => { test("has one seed for every supported credential provider", () => { diff --git a/packages/hub-client/test/default-routines.test.ts b/packages/seeding/test/default-routines.test.ts similarity index 100% rename from packages/hub-client/test/default-routines.test.ts rename to packages/seeding/test/default-routines.test.ts diff --git a/packages/hub-client/test/helpers.ts b/packages/seeding/test/helpers.ts similarity index 100% rename from packages/hub-client/test/helpers.ts rename to packages/seeding/test/helpers.ts diff --git a/packages/hub-client/test/routine-launchability.test.ts b/packages/seeding/test/routine-launchability.test.ts similarity index 100% rename from packages/hub-client/test/routine-launchability.test.ts rename to packages/seeding/test/routine-launchability.test.ts diff --git a/packages/hub-client/test/seed.test.ts b/packages/seeding/test/seed.test.ts similarity index 100% rename from packages/hub-client/test/seed.test.ts rename to packages/seeding/test/seed.test.ts diff --git a/packages/hub-client/test/tool-registry-coverage.test.ts b/packages/seeding/test/tool-registry-coverage.test.ts similarity index 100% rename from packages/hub-client/test/tool-registry-coverage.test.ts rename to packages/seeding/test/tool-registry-coverage.test.ts diff --git a/packages/seeding/tsconfig.json b/packages/seeding/tsconfig.json new file mode 100644 index 000000000..d7611c122 --- /dev/null +++ b/packages/seeding/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "test"], + "compilerOptions": { + "types": ["bun"], + "noEmit": true + } +} diff --git a/packages/sidecar-placement/tsconfig.json b/packages/sidecar-placement/tsconfig.json index d7611c122..4477c7bfd 100644 --- a/packages/sidecar-placement/tsconfig.json +++ b/packages/sidecar-placement/tsconfig.json @@ -1,8 +1,31 @@ { - "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": "../hub-client/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..09996b549 --- /dev/null +++ b/packages/sidecar-placement/tsconfig.src.json @@ -0,0 +1,29 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "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": "../hub-client/tsconfig.src.json" + } + ] +} diff --git a/packages/skills/tsconfig.json b/packages/skills/tsconfig.json index d7611c122..86a4dfe79 100644 --- a/packages/skills/tsconfig.json +++ b/packages/skills/tsconfig.json @@ -1,8 +1,31 @@ { - "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" + }, + { + "path": "../hub-client/tsconfig.src.json" + } + ] } diff --git a/packages/skills/tsconfig.src.json b/packages/skills/tsconfig.src.json new file mode 100644 index 000000000..8d38f4db6 --- /dev/null +++ b/packages/skills/tsconfig.src.json @@ -0,0 +1,29 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "package.json", "src/**/*.json"], + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], + "compilerOptions": { + "types": ["bun"], + "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" + }, + { + "path": "../hub-client/tsconfig.src.json" + } + ] +} diff --git a/scripts/checks/browser-safe-subpaths.ts b/scripts/checks/browser-safe-subpaths.ts index 4b2653e6a..8ebb95ccc 100644 --- a/scripts/checks/browser-safe-subpaths.ts +++ b/scripts/checks/browser-safe-subpaths.ts @@ -65,7 +65,6 @@ export const ENTRIES: readonly BrowserSafeEntry[] = [ // CL-6099: the Inference settings section (packages/inference-settings) // imports this for its known-provider base URL seeds — plain data, no // HTTP, so it is safe alongside the other browser-facing subpaths above. - { package: "@workbench/hub-client", subpath: "./catalog-seed-data" }, // @corbits/presence's "." export reaches ./routes, and through it the // whole @intx/hub-api server graph. Its two browser halves — the // transport client and the pure per-principal color function — are diff --git a/scripts/e2e/browser/walkthrough.ts b/scripts/e2e/browser/walkthrough.ts index d26f6b18a..3772d8e37 100644 --- a/scripts/e2e/browser/walkthrough.ts +++ b/scripts/e2e/browser/walkthrough.ts @@ -37,7 +37,7 @@ import { type HubHandle, type SpawnedApp, } from "../harness.ts"; -import { createGitWorkflowPusher } from "../../../packages/hub-client/src/index.ts"; +import { createGitWorkflowPusher } from "../../../packages/seeding/src/index.ts"; import { createHubAPI } from "../../../packages/hub-api-client/src/index.ts"; import { ensureSeeded, diff --git a/scripts/e2e/channel-reconnect.test.ts b/scripts/e2e/channel-reconnect.test.ts index 04474a827..59e254c19 100644 --- a/scripts/e2e/channel-reconnect.test.ts +++ b/scripts/e2e/channel-reconnect.test.ts @@ -16,7 +16,7 @@ import { beforeAll, describe, expect, test } from "bun:test"; -import { seedCatalog } from "../../packages/hub-client/src/index.ts"; +import { seedCatalog } from "../../packages/seeding/src/index.ts"; import { createHubAPI, type ApiCall, diff --git a/scripts/e2e/chat.test.ts b/scripts/e2e/chat.test.ts index ca8328e7b..dfba8315a 100644 --- a/scripts/e2e/chat.test.ts +++ b/scripts/e2e/chat.test.ts @@ -29,7 +29,7 @@ import { beforeAll, describe, expect, test } from "bun:test"; -import { seedCatalog } from "../../packages/hub-client/src/index.ts"; +import { seedCatalog } from "../../packages/seeding/src/index.ts"; import { createHubAPI, type ApiCall, diff --git a/scripts/e2e/cl-6324-launch-proof.ts b/scripts/e2e/cl-6324-launch-proof.ts index a697ccf18..bc7a03d7a 100644 --- a/scripts/e2e/cl-6324-launch-proof.ts +++ b/scripts/e2e/cl-6324-launch-proof.ts @@ -34,7 +34,7 @@ import { createGitWorkflowPusher, DEFAULT_WORKFLOWS, seedTenant, -} from "../../packages/hub-client/src/index.ts"; +} from "../../packages/seeding/src/index.ts"; import { createHubAPI, type ApiCall, diff --git a/scripts/e2e/cl-6329-turn-swap-proof.ts b/scripts/e2e/cl-6329-turn-swap-proof.ts index 5ef2d66f5..6e4389039 100644 --- a/scripts/e2e/cl-6329-turn-swap-proof.ts +++ b/scripts/e2e/cl-6329-turn-swap-proof.ts @@ -31,7 +31,7 @@ import { createGitWorkflowPusher, DEFAULT_WORKFLOWS, seedTenant, -} from "../../packages/hub-client/src/index.ts"; +} from "../../packages/seeding/src/index.ts"; import { createHubAPI, type ApiCall, diff --git a/scripts/e2e/cl-6451-single-run-proof.ts b/scripts/e2e/cl-6451-single-run-proof.ts index 3ed5dadf7..e18e53aeb 100644 --- a/scripts/e2e/cl-6451-single-run-proof.ts +++ b/scripts/e2e/cl-6451-single-run-proof.ts @@ -37,7 +37,7 @@ import { createGitWorkflowPusher, DEFAULT_WORKFLOWS, seedTenant, -} from "../../packages/hub-client/src/index.ts"; +} from "../../packages/seeding/src/index.ts"; import { createHubAPI, type ApiCall, diff --git a/scripts/e2e/greeting-delivery.test.ts b/scripts/e2e/greeting-delivery.test.ts index b73a93bb6..430775592 100644 --- a/scripts/e2e/greeting-delivery.test.ts +++ b/scripts/e2e/greeting-delivery.test.ts @@ -22,7 +22,7 @@ import { createGitWorkflowPusher, DEFAULT_WORKFLOWS, seedTenant, -} from "../../packages/hub-client/src/index.ts"; +} from "../../packages/seeding/src/index.ts"; import { createHubAPI, type ApiCall, diff --git a/scripts/e2e/harness.ts b/scripts/e2e/harness.ts index 91482c33e..099a7a210 100644 --- a/scripts/e2e/harness.ts +++ b/scripts/e2e/harness.ts @@ -9,7 +9,7 @@ import { readFileSync } from "node:fs"; import { mkdtemp, rm } from "node:fs/promises"; import { tmpdir } from "node:os"; import path from "node:path"; -import { createGitWorkflowPusher } from "../../packages/hub-client/src/index.ts"; +import { createGitWorkflowPusher } from "../../packages/seeding/src/index.ts"; import { WORKFLOW_SOURCE_ENTRY } from "../../packages/workflows/src/source.ts"; import { assertDatabaseConfigured } from "./db-gate.ts"; diff --git a/scripts/e2e/local-rip.test.ts b/scripts/e2e/local-rip.test.ts index acaffe882..46e01f915 100644 --- a/scripts/e2e/local-rip.test.ts +++ b/scripts/e2e/local-rip.test.ts @@ -60,7 +60,7 @@ import { isLiveDeploymentStatus, publishCorbitsToolsRegistry, seedTenant, -} from "../../packages/hub-client/src/index.ts"; +} from "../../packages/seeding/src/index.ts"; import { createHubAPI, parseAs, diff --git a/scripts/e2e/play.ts b/scripts/e2e/play.ts index 90d1de657..97f96b14e 100644 --- a/scripts/e2e/play.ts +++ b/scripts/e2e/play.ts @@ -19,7 +19,7 @@ import { createGitWorkflowPusher, DEFAULT_WORKFLOWS, seedTenant, -} from "../../packages/hub-client/src/index.ts"; +} from "../../packages/seeding/src/index.ts"; import { createHubAPI, type ApiCall, diff --git a/tsconfig.build.json b/tsconfig.build.json index 917e7bcad..227605239 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -25,6 +25,9 @@ { "path": "./packages/artifact-ui/tsconfig.src.json" }, + { + "path": "./packages/bench/tsconfig.src.json" + }, { "path": "./packages/bench-ui/tsconfig.src.json" }, @@ -43,6 +46,9 @@ { "path": "./packages/command-palette/tsconfig.src.json" }, + { + "path": "./packages/commands/tsconfig.src.json" + }, { "path": "./packages/context-menu/tsconfig.src.json" }, @@ -70,12 +76,24 @@ { "path": "./packages/hub-api-client/tsconfig.src.json" }, + { + "path": "./packages/hub-client/tsconfig.src.json" + }, { "path": "./packages/icons/tsconfig.src.json" }, { "path": "./packages/inbox/tsconfig.src.json" }, + { + "path": "./packages/inference-catalog/tsconfig.src.json" + }, + { + "path": "./packages/inference-settings/tsconfig.src.json" + }, + { + "path": "./packages/insights/tsconfig.src.json" + }, { "path": "./packages/interaction-tools/tsconfig.src.json" }, @@ -106,9 +124,21 @@ { "path": "./packages/ollama-adapter/tsconfig.src.json" }, + { + "path": "./packages/preferences/tsconfig.src.json" + }, + { + "path": "./packages/presence/tsconfig.src.json" + }, + { + "path": "./packages/provider-pricing/tsconfig.src.json" + }, { "path": "./packages/reddit-tools/tsconfig.src.json" }, + { + "path": "./packages/run-key-history/tsconfig.src.json" + }, { "path": "./packages/sandbox-sidecar/tsconfig.src.json" }, @@ -118,6 +148,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" }, From c27d6a0d3358c37e785015e10e1c98585755e820 Mon Sep 17 00:00:00 2001 From: Sawyer Date: Wed, 2 Sep 2026 17:10:26 -0700 Subject: [PATCH 2/3] Fix formatting and regenerate report-error baseline --- packages/onboarding/test/complete-credential.test.ts | 5 +---- scripts/checks/report-error-baseline.txt | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/onboarding/test/complete-credential.test.ts b/packages/onboarding/test/complete-credential.test.ts index 807321e19..87349592c 100644 --- a/packages/onboarding/test/complete-credential.test.ts +++ b/packages/onboarding/test/complete-credential.test.ts @@ -1,10 +1,7 @@ import { describe, expect, test } from "bun:test"; import type { WorkflowPusher } from "@corbits/seeding"; import { CATALOG_SEEDS, SETUP_AGENT_ASSET_NAME } from "@corbits/seeding"; -import { - type ApiCall, - SidecarUnavailableError, -} from "@corbits/hub-api-client"; +import { type ApiCall, SidecarUnavailableError } from "@corbits/hub-api-client"; import { completeCredentialSetup, ensureSeeded, diff --git a/scripts/checks/report-error-baseline.txt b/scripts/checks/report-error-baseline.txt index 6aa7d7d49..e60797ec2 100644 --- a/scripts/checks/report-error-baseline.txt +++ b/scripts/checks/report-error-baseline.txt @@ -177,7 +177,6 @@ packages/hub-client/src/credential-test.ts 1 // Not JSON, or didn't match either packages/hub-client/src/credential-test.ts 1 return []; packages/hub-client/src/credential-test.ts 1 return undefined; packages/hub-client/src/credential-test.ts 1 return { -packages/hub-client/src/workflow-push.ts 1 existing = null; packages/inbox/src/routes.ts 1 publishLog.error( packages/interaction-tools/src/tool.ts 1 if (err instanceof NoOwnChannelError) { packages/jimmy-agent/src/gif-search-tool.ts 1 return false; @@ -238,6 +237,7 @@ packages/sandbox-sidecar/src/provisioner.ts 1 return rejected(...classify(error, packages/sandbox-sidecar/src/provisioner.ts 1 return rejected(...classify(error, "start_unit_failed")); packages/scout-agent/src/artifact-tool.ts 1 return { packages/scout-agent/src/artifact-tool.ts 2 return { +packages/seeding/src/workflow-push.ts 1 existing = null; packages/settings-ui/src/account-section.tsx 1 toast(SETTINGS_STRINGS.accountEmailCopyError); packages/skills-tools/src/tool.ts 1 return errorResult(call.id, err); packages/skills-tools/src/tool.ts 2 return errorResult(call.id, err); From 2c9e88a83e58b2c55ddc6f840940d4e1cc5ab437 Mon Sep 17 00:00:00 2001 From: Sawyer Date: Wed, 2 Sep 2026 17:14:46 -0700 Subject: [PATCH 3/3] Fix formatting (CL-7383) --- packages/onboarding/test/connect-deploys-nothing.test.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/onboarding/test/connect-deploys-nothing.test.ts b/packages/onboarding/test/connect-deploys-nothing.test.ts index 53b33e2db..4219fc837 100644 --- a/packages/onboarding/test/connect-deploys-nothing.test.ts +++ b/packages/onboarding/test/connect-deploys-nothing.test.ts @@ -12,10 +12,7 @@ import type { MiddlewareHandler } from "hono"; import { Hono } from "hono"; import { createEnvKeyCredentialCipher } from "@intx/crypto"; import type { CredentialCipher } from "@intx/types"; -import { - DEFAULT_WORKFLOWS, - SETUP_AGENT_ASSET_NAME, -} from "@corbits/seeding"; +import { DEFAULT_WORKFLOWS, SETUP_AGENT_ASSET_NAME } from "@corbits/seeding"; import { createOnboardingRoutes } from "../src/routes"; import { createInMemoryPendingSeedStore,