diff --git a/.oxlintrc.json b/.oxlintrc.json index 2fc8671f55..a2b1ca2e33 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -45,7 +45,7 @@ "excludeFiles": [ "**/src/**/*.test.ts", "**/src/**/*.test.tsx", - "packages/client-log/src/index.ts" + "apps/web/src/lib/client-log/index.ts" ], "rules": { "no-console": "error" @@ -53,7 +53,7 @@ }, { "files": ["**/*.ts", "**/*.tsx"], - "excludeFiles": ["packages/icons/src/**"], + "excludeFiles": ["apps/web/src/lib/icons/**"], "rules": { "no-restricted-imports": [ "error", @@ -61,17 +61,17 @@ "paths": [ { "name": "lucide-react", - "message": "lucide-react is retired — import from @corbits/icons instead." + "message": "lucide-react is retired — import from @/lib/icons instead." }, { "name": "@phosphor-icons/react", - "message": "Import icons from @corbits/icons, not @phosphor-icons/react directly." + "message": "Import icons from @/lib/icons, not @phosphor-icons/react directly." } ], "patterns": [ { "group": ["@phosphor-icons/react/*"], - "message": "Import icons from @corbits/icons, not @phosphor-icons/react directly." + "message": "Import icons from @/lib/icons, not @phosphor-icons/react directly." } ] } diff --git a/DESIGN.md b/DESIGN.md index 6e15770a18..74da00fe63 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -103,7 +103,7 @@ grid: This is a default, not a mandate. A directory that scans better as dense grouped rows than as a table — Settings > Connections is the standing example (`ConnectorRow` / `OAuthConnectorRow`, -`packages/settings-ui/src/connections-section.tsx`) — keeps that idiom. +`apps/web/src/settings/connections-section.tsx`) — keeps that idiom. Density over cards: one row per item, a small logo tile, name, a single-line outcome sentence, a status/provenance caption, and one honest action button that reflects the item's actual state. A browseable catalog @@ -179,7 +179,7 @@ monospace (code, IDs, numeric/tabular contexts). Both are declared once in `font-mono`, never a font-family override. **Icons.** Phosphor, bold weight only, imported exclusively through -`@corbits/icons` (`packages/icons/src/index.tsx`) — never straight from +`@/lib/icons` (`apps/web/src/lib/icons/index.tsx`) — never straight from `@phosphor-icons/react` or from any other icon package. That module is a curated re-export: only glyphs the product actually uses are named there, so a stray import can't reach for an off-list icon or a different weight. diff --git a/apps/web/README.md b/apps/web/README.md index 349f7e8952..06b76ec126 100644 --- a/apps/web/README.md +++ b/apps/web/README.md @@ -46,7 +46,7 @@ cannot appear in one without the other. The contextual column no longer reads `NAV_ROUTES` at all: it has nothing to do with which pages exist. Running routines in the contextual column are sourced today from -`@corbits/chat-ui`'s workflow-run listing (`src/shell/routine-activity.ts`) +`@/chat`'s workflow-run listing (`src/shell/routine-activity.ts`) — the column depends only on that file's `RoutineActivityItem` shape. ## Screens @@ -78,7 +78,7 @@ open, inline in that workbench). The `/approvals` route is gone. `/library` (`src/pages/library-page.tsx`) is the artifact gallery: search, sort, a grid/rows view toggle, kind-colored cards, and upload, built -against the `ArtifactSummary` type from `@corbits/artifact-ui`. +against the `ArtifactSummary` type from `@/library`. `LibraryRoute` reads and searches the tenant's artifacts from the real `/api/tenants/:id/artifacts` (list/detail) endpoint; a chat artifact chip's "Open in Library" link (`/library/a/:id`) deep-links into the same diff --git a/apps/web/package.json b/apps/web/package.json index de02c71498..76dcebf498 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -18,28 +18,16 @@ }, "dependencies": { "@corbits/agent-directory": "workspace:*", - "@corbits/api-query": "workspace:*", "@corbits/approvals": "workspace:*", "@corbits/artifact-ui": "workspace:*", "@corbits/assistant-workflow": "workspace:*", - "@corbits/bench-ui": "workspace:*", - "@corbits/chat-ui": "workspace:*", - "@corbits/client-log": "workspace:*", - "@corbits/command-palette": "workspace:*", "@corbits/connections": "workspace:*", - "@corbits/context-menu": "workspace:*", "@corbits/error-sink": "workspace:*", - "@corbits/icons": "workspace:*", - "@corbits/inference-settings": "workspace:*", - "@corbits/plugins-ui": "workspace:*", "@corbits/react-ui": "github:corbitsdev/react-ui#3b122812a307ccb35be31386f7696020c5a84635", - "@corbits/settings-ui": "workspace:*", - "@corbits/shell-layout": "workspace:*", - "@corbits/slug": "workspace:*", - "@corbits/text-diff": "workspace:*", "@corbits/url-path": "workspace:*", "@corbits/workflows": "workspace:*", "@intx/types": "workspace:*", + "@phosphor-icons/react": "^2.1.10", "@radix-ui/react-dialog": "^1.1.15", "@radix-ui/react-slot": "^1.2.3", "@tanstack/react-query": "catalog:", @@ -49,6 +37,7 @@ }, "devDependencies": { "@happy-dom/global-registrator": "^20.11.2", + "@intx/inference": "workspace:*", "@tailwindcss/vite": "^4.3.3", "@types/bun": "catalog:", "@types/react": "^19.2.2", diff --git a/apps/web/src/agent-chat-launch.ts b/apps/web/src/agent-chat-launch.ts index 74ec787595..ba5772fd27 100644 --- a/apps/web/src/agent-chat-launch.ts +++ b/apps/web/src/agent-chat-launch.ts @@ -7,7 +7,7 @@ // Always creates — never the `reuseExisting` land-hop path, // which is `default-agent-workbench.ts`'s own call, not this one. -import { createWorkbench } from "@corbits/chat-ui"; +import { createWorkbench } from "@/chat"; import { workbenchPath } from "./workbench-path"; diff --git a/apps/web/src/agent-dm-launch.ts b/apps/web/src/agent-dm-launch.ts index 4d28fa0bda..3f5c892588 100644 --- a/apps/web/src/agent-dm-launch.ts +++ b/apps/web/src/agent-dm-launch.ts @@ -7,7 +7,7 @@ // (`findExistingAgentChat` in `packages/chat/src/routes.ts`) instead of // spawning a new one each time. -import { openAgentDm } from "@corbits/chat-ui"; +import { openAgentDm } from "@/chat"; import { workbenchPath } from "./workbench-path"; diff --git a/apps/web/src/agents-api.ts b/apps/web/src/agents-api.ts index b76f4446b7..e7279517ed 100644 --- a/apps/web/src/agents-api.ts +++ b/apps/web/src/agents-api.ts @@ -17,8 +17,8 @@ import { type } from "arktype"; import type { ArkErrors } from "arktype"; import { useQuery } from "@tanstack/react-query"; -import type { APIQuery } from "@corbits/api-query"; -import { ApiQueryError, UnauthenticatedError, toAPIQuery } from "@corbits/api-query"; +import type { APIQuery } from "@/lib/api-query"; +import { ApiQueryError, UnauthenticatedError, toAPIQuery } from "@/lib/api-query"; import { isChatPickerModelName } from "@corbits/connections/model-capability"; import { parseErrorEnvelope } from "@corbits/error-sink"; import { tenantKeys } from "./query-client"; @@ -210,7 +210,7 @@ const AgentCapabilitiesResponse = type({ export type AgentCapabilities = typeof AgentCapabilitiesResponse.infer; /** `GET /api/tenants/:t/agent-definitions/:id` — the same route - * `@corbits/chat-ui`'s per-workbench Agents section reads for its model + * `@/chat`'s per-workbench Agents section reads for its model * picker. Fetched lazily, per definition, only once its row is expanded on * the Agents roster — the paginated definitions list itself carries no * model field. */ diff --git a/apps/web/src/api.ts b/apps/web/src/api.ts index f7e4b97693..c0e42ad2ec 100644 --- a/apps/web/src/api.ts +++ b/apps/web/src/api.ts @@ -15,8 +15,8 @@ import { useQuery } from "@tanstack/react-query"; import { type } from "arktype"; import type { ArkErrors } from "arktype"; -import type { APIQuery } from "@corbits/api-query"; -import { ApiQueryError, UnauthenticatedError, toAPIQuery } from "@corbits/api-query"; +import type { APIQuery } from "@/lib/api-query"; +import { ApiQueryError, UnauthenticatedError, toAPIQuery } from "@/lib/api-query"; import { pathToQueryKey } from "./query-client"; export const ProfileSchema = UserProfile; diff --git a/apps/web/src/app-error-boundary.tsx b/apps/web/src/app-error-boundary.tsx index 6357eb76db..b544d644b3 100644 --- a/apps/web/src/app-error-boundary.tsx +++ b/apps/web/src/app-error-boundary.tsx @@ -5,7 +5,7 @@ import { reportError } from "@corbits/error-sink"; import { Button, EmptyState } from "@corbits/react-ui"; -import { BoldIconProvider, WarningCircle } from "@corbits/icons"; +import { BoldIconProvider, WarningCircle } from "@/lib/icons"; import { Component, type ErrorInfo, type ReactNode } from "react"; export class AppErrorBoundary extends Component< diff --git a/apps/web/src/app.css b/apps/web/src/app.css index a86dda60b4..dce92e08c3 100644 --- a/apps/web/src/app.css +++ b/apps/web/src/app.css @@ -2,13 +2,12 @@ prebuilt stylesheet; the rules here arrange its pieces into the app frame and reach for the theme's tokens where a color is unavoidable. */ -/* @corbits/chat-ui ships its own stylesheet the same way - @corbits/react-ui does (see main.tsx's `@corbits/react-ui/styles.css` - import); main.tsx is out of scope for this change, so it is pulled - in here via a CSS @import instead of a second entry-point import. */ -@import "@corbits/chat-ui/styles.css"; -@import "@corbits/bench-ui/styles.css"; -@import "@corbits/settings-ui/styles.css"; +/* main.tsx already imports `@corbits/react-ui/styles.css` as a second + entry-point import; these stylesheets are pulled in here via a CSS + @import instead. */ +@import "./chat/styles.css"; +@import "./bench/styles.css"; +@import "./settings/styles.css"; /* react-ui's `.corbits-toast` ships a hardcoded horizontal-center transform (`left: 50%; transform: translateX(-50%) !important`) regardless of the diff --git a/apps/web/src/app.tsx b/apps/web/src/app.tsx index 5ae5ec25f5..29ab149f1f 100644 --- a/apps/web/src/app.tsx +++ b/apps/web/src/app.tsx @@ -4,9 +4,9 @@ // a signed-out browser fires no authenticated request anywhere. import { Button, EmptyState } from "@corbits/react-ui"; -import { WorkbenchLoadingState } from "@corbits/chat-ui"; +import { WorkbenchLoadingState } from "@/chat"; import { QueryClientProvider } from "@tanstack/react-query"; -import { BoldIconProvider, WarningCircle } from "@corbits/icons"; +import { BoldIconProvider, WarningCircle } from "@/lib/icons"; import { useEffect, useMemo } from "react"; import { AuthScreen } from "./auth-screen"; diff --git a/apps/web/src/approval-actions.test.ts b/apps/web/src/approval-actions.test.ts index 5724bed730..192125f0eb 100644 --- a/apps/web/src/approval-actions.test.ts +++ b/apps/web/src/approval-actions.test.ts @@ -1,6 +1,6 @@ import { afterEach, describe, expect, test } from "bun:test"; import { QueryClient } from "@tanstack/react-query"; -import { CHAT_STRINGS } from "@corbits/chat-ui"; +import { CHAT_STRINGS } from "@/chat"; import { createChatApprovalActions } from "./approval-actions"; diff --git a/apps/web/src/approval-actions.ts b/apps/web/src/approval-actions.ts index 963ebf7989..0759350714 100644 --- a/apps/web/src/approval-actions.ts +++ b/apps/web/src/approval-actions.ts @@ -1,4 +1,4 @@ -// Builds the `ApprovalActions` port `ChatWorkspace` (`@corbits/chat-ui`) +// Builds the `ApprovalActions` port `ChatWorkspace` (`@/chat`) // calls for its in-chat approve card. Reuses the exact reads and writes // every other approval surface uses -- `getApprovalDetail` in // `pending-approvals.ts`, `approveApproval`/`rejectApproval` in `api.ts` -- @@ -8,9 +8,9 @@ // run here. import type { QueryClient } from "@tanstack/react-query"; -import type { ApprovalActions, ApprovalDecisionResult } from "@corbits/chat-ui"; -import { CHAT_STRINGS } from "@corbits/chat-ui"; -import { ApiQueryError } from "@corbits/api-query"; +import type { ApprovalActions, ApprovalDecisionResult } from "@/chat"; +import { CHAT_STRINGS } from "@/chat"; +import { ApiQueryError } from "@/lib/api-query"; import { approveApproval, rejectApproval } from "./api"; import type { Approval } from "./api"; diff --git a/apps/web/src/bench-context.tsx b/apps/web/src/bench-context.tsx index 314e29503e..e4605fe5b9 100644 --- a/apps/web/src/bench-context.tsx +++ b/apps/web/src/bench-context.tsx @@ -4,12 +4,12 @@ // bench (the chat page, the benches page, the header switcher) reads this // context instead of re-deriving "membership[0]" on its own. -import { isRawIdentifier } from "@corbits/bench-ui"; +import { isRawIdentifier } from "@/bench"; import { useQueryClient } from "@tanstack/react-query"; import { createContext, useContext, useEffect, useMemo, useState } from "react"; import type { ReactNode } from "react"; -import type { APIQuery } from "@corbits/api-query"; +import type { APIQuery } from "@/lib/api-query"; import { PrincipalsSchema, useAPIQuery } from "./api"; import type { Principal, PrincipalsPage } from "./api"; diff --git a/packages/bench-ui/src/index.ts b/apps/web/src/bench/index.ts similarity index 100% rename from packages/bench-ui/src/index.ts rename to apps/web/src/bench/index.ts diff --git a/packages/bench-ui/src/membership.ts b/apps/web/src/bench/membership.ts similarity index 100% rename from packages/bench-ui/src/membership.ts rename to apps/web/src/bench/membership.ts diff --git a/packages/bench-ui/src/styles.css b/apps/web/src/bench/styles.css similarity index 100% rename from packages/bench-ui/src/styles.css rename to apps/web/src/bench/styles.css diff --git a/packages/bench-ui/src/tenancy-contracts.test.ts b/apps/web/src/bench/tenancy-contracts.test.ts similarity index 100% rename from packages/bench-ui/src/tenancy-contracts.test.ts rename to apps/web/src/bench/tenancy-contracts.test.ts diff --git a/packages/bench-ui/src/tenancy-contracts.ts b/apps/web/src/bench/tenancy-contracts.ts similarity index 100% rename from packages/bench-ui/src/tenancy-contracts.ts rename to apps/web/src/bench/tenancy-contracts.ts diff --git a/apps/web/src/chat-artifact-open.ts b/apps/web/src/chat-artifact-open.ts index 33805b1455..56ab3db03e 100644 --- a/apps/web/src/chat-artifact-open.ts +++ b/apps/web/src/chat-artifact-open.ts @@ -11,7 +11,7 @@ import { isTextDecodableMediaType, resolveArtifactRendererKind, resolveRendererKindFromMediaType, -} from "@corbits/artifact-ui"; +} from "@/library"; import { artifactPreviewPath, type ArtifactDetail } from "./api"; import type { CanvasArtifactContent } from "./shell/canvas-availability"; diff --git a/packages/chat-ui/src/agent-display-names.ts b/apps/web/src/chat/agent-display-names.ts similarity index 100% rename from packages/chat-ui/src/agent-display-names.ts rename to apps/web/src/chat/agent-display-names.ts diff --git a/packages/chat-ui/src/agent-part-adapter.test.ts b/apps/web/src/chat/agent-part-adapter.test.ts similarity index 100% rename from packages/chat-ui/src/agent-part-adapter.test.ts rename to apps/web/src/chat/agent-part-adapter.test.ts diff --git a/packages/chat-ui/src/agent-part-adapter.ts b/apps/web/src/chat/agent-part-adapter.ts similarity index 100% rename from packages/chat-ui/src/agent-part-adapter.ts rename to apps/web/src/chat/agent-part-adapter.ts diff --git a/packages/chat-ui/src/api.ts b/apps/web/src/chat/api.ts similarity index 98% rename from packages/chat-ui/src/api.ts rename to apps/web/src/chat/api.ts index 905a05c6a5..5bda41cf52 100644 --- a/packages/chat-ui/src/api.ts +++ b/apps/web/src/chat/api.ts @@ -14,8 +14,8 @@ import type { ArkErrors } from "arktype"; import { Part } from "./wire/parts"; import { parseParticipants } from "./wire/participants"; import type { ParticipantRecord } from "./wire/participants"; -import { UnauthenticatedError } from "@corbits/api-query"; -import { InferenceSettingsApiError } from "@corbits/inference-settings"; +import { UnauthenticatedError } from "@/lib/api-query"; +import { InferenceSettingsApiError } from "@/settings/inference"; import { CHAT_STRINGS } from "./strings"; export { @@ -62,7 +62,7 @@ const WorkbenchWire = type({ "preview?": "string", // `GET /workbenches` sets this server-side (see // `packages/chat/src/routes.ts`) only for a workbench projected into - // this tenant via shared-workbench machinery: "shared via + // this tenant via the shared-workbench machinery: "shared via // parent · " for true siblings, "shared · " otherwise. Absent for every ordinary, non-projected workbench. "sharedLabel?": "string", @@ -421,7 +421,7 @@ export function fetchWorkbenchBlob( } // The wire response of `@corbits/mailbox`'s `POST /me/inbox/send` -//: the Sent-folder copy's own RFC 5322 `Message-ID` and its +// The Sent-folder copy's own RFC 5322 `Message-ID` and its // mailbox uid, the same uid `mailbox-timeline.ts`'s `threadTreeToTimeline` // keys every timeline row by. const SentInboxMessage = type({ @@ -899,6 +899,12 @@ export function patchWorkbenchSettings( ); } +// Hub-zero T3: the room card's live state read and +// start-reviewing write lived here, backed by the hub's now-deleted +// workbench-scoped GitHub mount. GitHub connect/disconnect +// itself stays native `connections/*` (`@/settings`); the card's +// state/start rebind is a connections follow-up. + // `GET`/`PATCH /bench/settings` (see `packages/chat/src/routes.ts`): the // bench-wide chat defaults every workbench inherits unless it sets its own // override. Currently just the default context window. diff --git a/packages/chat-ui/src/artifact-chip.tsx b/apps/web/src/chat/artifact-chip.tsx similarity index 97% rename from packages/chat-ui/src/artifact-chip.tsx rename to apps/web/src/chat/artifact-chip.tsx index a5183b8c52..b247d5b569 100644 --- a/packages/chat-ui/src/artifact-chip.tsx +++ b/apps/web/src/chat/artifact-chip.tsx @@ -12,7 +12,7 @@ // ever renders when `artifactId` is present, since a blob-only part has no // Library row to deep-link to. -import { FileText, FolderOpen } from "@corbits/icons"; +import { FileText, FolderOpen } from "@/lib/icons"; import type { Part } from "./api"; import { CHAT_STRINGS } from "./strings"; diff --git a/packages/chat-ui/src/avatar.test.tsx b/apps/web/src/chat/avatar.test.tsx similarity index 100% rename from packages/chat-ui/src/avatar.test.tsx rename to apps/web/src/chat/avatar.test.tsx diff --git a/packages/chat-ui/src/avatar.tsx b/apps/web/src/chat/avatar.tsx similarity index 100% rename from packages/chat-ui/src/avatar.tsx rename to apps/web/src/chat/avatar.tsx diff --git a/packages/chat-ui/src/blocks/approval-actions.ts b/apps/web/src/chat/blocks/approval-actions.ts similarity index 98% rename from packages/chat-ui/src/blocks/approval-actions.ts rename to apps/web/src/chat/blocks/approval-actions.ts index 9a408bf17e..387a00e54a 100644 --- a/packages/chat-ui/src/blocks/approval-actions.ts +++ b/apps/web/src/chat/blocks/approval-actions.ts @@ -1,5 +1,5 @@ // The in-chat approve card's one seam to the platform approval it -// references. `@corbits/chat-ui` owns no session and no query cache, so it +// references. `@/chat` owns no session and no query cache, so it // never fetches or mutates approvals itself -- the host (the same app that // already resolves `tenantId` for `ChatWorkspace`) supplies this port, // mirroring how `onOpenArtifact`/`onOpenProfile` thread host callbacks diff --git a/packages/chat-ui/src/blocks/approve-block.tsx b/apps/web/src/chat/blocks/approve-block.tsx similarity index 100% rename from packages/chat-ui/src/blocks/approve-block.tsx rename to apps/web/src/chat/blocks/approve-block.tsx diff --git a/packages/chat-ui/src/blocks/approve-card-state.test.ts b/apps/web/src/chat/blocks/approve-card-state.test.ts similarity index 100% rename from packages/chat-ui/src/blocks/approve-card-state.test.ts rename to apps/web/src/chat/blocks/approve-card-state.test.ts diff --git a/packages/chat-ui/src/blocks/approve-card-state.ts b/apps/web/src/chat/blocks/approve-card-state.ts similarity index 100% rename from packages/chat-ui/src/blocks/approve-card-state.ts rename to apps/web/src/chat/blocks/approve-card-state.ts diff --git a/packages/chat-ui/src/blocks/block-card.tsx b/apps/web/src/chat/blocks/block-card.tsx similarity index 100% rename from packages/chat-ui/src/blocks/block-card.tsx rename to apps/web/src/chat/blocks/block-card.tsx diff --git a/packages/chat-ui/src/blocks/connect-service-actions.ts b/apps/web/src/chat/blocks/connect-service-actions.ts similarity index 100% rename from packages/chat-ui/src/blocks/connect-service-actions.ts rename to apps/web/src/chat/blocks/connect-service-actions.ts diff --git a/packages/chat-ui/src/blocks/connect-service-block-container.tsx b/apps/web/src/chat/blocks/connect-service-block-container.tsx similarity index 100% rename from packages/chat-ui/src/blocks/connect-service-block-container.tsx rename to apps/web/src/chat/blocks/connect-service-block-container.tsx diff --git a/packages/chat-ui/src/blocks/connect-service-block.tsx b/apps/web/src/chat/blocks/connect-service-block.tsx similarity index 99% rename from packages/chat-ui/src/blocks/connect-service-block.tsx rename to apps/web/src/chat/blocks/connect-service-block.tsx index 6223bda40e..e61427d16a 100644 --- a/packages/chat-ui/src/blocks/connect-service-block.tsx +++ b/apps/web/src/chat/blocks/connect-service-block.tsx @@ -9,7 +9,7 @@ import { useState } from "react"; import { Button, Input } from "@corbits/react-ui"; -import { Check } from "@corbits/icons"; +import { Check } from "@/lib/icons"; import { CHAT_STRINGS } from "../strings"; import type { ConnectAffordance, ConnectServiceResult } from "./connect-service-actions"; diff --git a/packages/chat-ui/src/blocks/metrics-block.tsx b/apps/web/src/chat/blocks/metrics-block.tsx similarity index 100% rename from packages/chat-ui/src/blocks/metrics-block.tsx rename to apps/web/src/chat/blocks/metrics-block.tsx diff --git a/packages/chat-ui/src/blocks/registry.tsx b/apps/web/src/chat/blocks/registry.tsx similarity index 100% rename from packages/chat-ui/src/blocks/registry.tsx rename to apps/web/src/chat/blocks/registry.tsx diff --git a/packages/chat-ui/src/blocks/steps-block.tsx b/apps/web/src/chat/blocks/steps-block.tsx similarity index 100% rename from packages/chat-ui/src/blocks/steps-block.tsx rename to apps/web/src/chat/blocks/steps-block.tsx diff --git a/packages/chat-ui/src/blocks/stream-block.tsx b/apps/web/src/chat/blocks/stream-block.tsx similarity index 100% rename from packages/chat-ui/src/blocks/stream-block.tsx rename to apps/web/src/chat/blocks/stream-block.tsx diff --git a/packages/chat-ui/src/chat-workspace.test.ts b/apps/web/src/chat/chat-workspace.test.ts similarity index 100% rename from packages/chat-ui/src/chat-workspace.test.ts rename to apps/web/src/chat/chat-workspace.test.ts diff --git a/packages/chat-ui/src/chat-workspace.tsx b/apps/web/src/chat/chat-workspace.tsx similarity index 99% rename from packages/chat-ui/src/chat-workspace.tsx rename to apps/web/src/chat/chat-workspace.tsx index febdc74ed9..311f495c04 100644 --- a/packages/chat-ui/src/chat-workspace.tsx +++ b/apps/web/src/chat/chat-workspace.tsx @@ -14,8 +14,8 @@ import { isAgentAddress } from "./wire/mentions"; import { Button, EmptyState, toast } from "@corbits/react-ui"; import { reportError } from "@corbits/error-sink"; -import { getResolvedCatalog } from "@corbits/inference-settings"; -import { CaretDown, ChatCircle, SlidersHorizontal, WarningCircle } from "@corbits/icons"; +import { getResolvedCatalog } from "@/settings/inference"; +import { CaretDown, ChatCircle, SlidersHorizontal, WarningCircle } from "@/lib/icons"; import { useQuery, useQueryClient } from "@tanstack/react-query"; import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import type { ReactNode } from "react"; @@ -553,7 +553,7 @@ function ChatWorkspaceInner({ * back to no action at all (never "Try again" for a session that's gone). */ readonly onSignIn?: () => void; /** Whether this tenant can actually run inference right now — the - * host's read of `hasUsableModel` (`@corbits/inference-settings`) + * host's read of `hasUsableModel` (`@/settings/inference`) * against its resolved catalog, never mere `model_provider` row * presence. `undefined` while that read is still in flight: * the banner stays hidden rather than flashing "no model" before the diff --git a/packages/chat-ui/src/clock.ts b/apps/web/src/chat/clock.ts similarity index 100% rename from packages/chat-ui/src/clock.ts rename to apps/web/src/chat/clock.ts diff --git a/packages/chat-ui/src/composer.test.tsx b/apps/web/src/chat/composer.test.tsx similarity index 100% rename from packages/chat-ui/src/composer.test.tsx rename to apps/web/src/chat/composer.test.tsx diff --git a/packages/chat-ui/src/composer.tsx b/apps/web/src/chat/composer.tsx similarity index 99% rename from packages/chat-ui/src/composer.tsx rename to apps/web/src/chat/composer.tsx index f228c04d75..0628f3a34a 100644 --- a/packages/chat-ui/src/composer.tsx +++ b/apps/web/src/chat/composer.tsx @@ -7,7 +7,7 @@ // does not compose with an inline mention popover. import { Button } from "@corbits/react-ui"; -import { ArrowUp, CircleNotch, Microphone, Paperclip, Stop, X } from "@corbits/icons"; +import { ArrowUp, CircleNotch, Microphone, Paperclip, Stop, X } from "@/lib/icons"; import { reportError } from "@corbits/error-sink"; import { forwardRef, diff --git a/packages/chat-ui/src/default-agent-workbench.test.ts b/apps/web/src/chat/default-agent-workbench.test.ts similarity index 100% rename from packages/chat-ui/src/default-agent-workbench.test.ts rename to apps/web/src/chat/default-agent-workbench.test.ts diff --git a/packages/chat-ui/src/default-agent-workbench.ts b/apps/web/src/chat/default-agent-workbench.ts similarity index 100% rename from packages/chat-ui/src/default-agent-workbench.ts rename to apps/web/src/chat/default-agent-workbench.ts diff --git a/packages/chat-ui/src/direct-workbench.test.ts b/apps/web/src/chat/direct-workbench.test.ts similarity index 100% rename from packages/chat-ui/src/direct-workbench.test.ts rename to apps/web/src/chat/direct-workbench.test.ts diff --git a/packages/chat-ui/src/direct-workbench.ts b/apps/web/src/chat/direct-workbench.ts similarity index 100% rename from packages/chat-ui/src/direct-workbench.ts rename to apps/web/src/chat/direct-workbench.ts diff --git a/packages/chat-ui/src/failed-turn-models.test.ts b/apps/web/src/chat/failed-turn-models.test.ts similarity index 96% rename from packages/chat-ui/src/failed-turn-models.test.ts rename to apps/web/src/chat/failed-turn-models.test.ts index 17f7b49bb5..2254e81ee0 100644 --- a/packages/chat-ui/src/failed-turn-models.test.ts +++ b/apps/web/src/chat/failed-turn-models.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from "bun:test"; -import type { ModelInfo } from "@corbits/inference-settings"; +import type { ModelInfo } from "@/settings/inference"; import { failedTurnModelChoices, failedTurnToolCapableModelChoices } from "./failed-turn-models"; diff --git a/packages/chat-ui/src/failed-turn-models.ts b/apps/web/src/chat/failed-turn-models.ts similarity index 93% rename from packages/chat-ui/src/failed-turn-models.ts rename to apps/web/src/chat/failed-turn-models.ts index 7ccfa90ad2..7b1fcc9031 100644 --- a/packages/chat-ui/src/failed-turn-models.ts +++ b/apps/web/src/chat/failed-turn-models.ts @@ -1,5 +1,5 @@ -import { chatCapableModels, providerDisplayName } from "@corbits/inference-settings"; -import type { ModelInfo } from "@corbits/inference-settings"; +import { chatCapableModels, providerDisplayName } from "@/settings/inference"; +import type { ModelInfo } from "@/settings/inference"; import { CHAT_STRINGS } from "./strings"; diff --git a/packages/chat-ui/src/index.ts b/apps/web/src/chat/index.ts similarity index 100% rename from packages/chat-ui/src/index.ts rename to apps/web/src/chat/index.ts diff --git a/packages/chat-ui/src/inference-failure.test.ts b/apps/web/src/chat/inference-failure.test.ts similarity index 100% rename from packages/chat-ui/src/inference-failure.test.ts rename to apps/web/src/chat/inference-failure.test.ts diff --git a/packages/chat-ui/src/inference-failure.ts b/apps/web/src/chat/inference-failure.ts similarity index 100% rename from packages/chat-ui/src/inference-failure.ts rename to apps/web/src/chat/inference-failure.ts diff --git a/packages/chat-ui/src/loading-state.tsx b/apps/web/src/chat/loading-state.tsx similarity index 100% rename from packages/chat-ui/src/loading-state.tsx rename to apps/web/src/chat/loading-state.tsx diff --git a/packages/chat-ui/src/mailbox-timeline.test.ts b/apps/web/src/chat/mailbox-timeline.test.ts similarity index 100% rename from packages/chat-ui/src/mailbox-timeline.test.ts rename to apps/web/src/chat/mailbox-timeline.test.ts diff --git a/packages/chat-ui/src/mailbox-timeline.ts b/apps/web/src/chat/mailbox-timeline.ts similarity index 100% rename from packages/chat-ui/src/mailbox-timeline.ts rename to apps/web/src/chat/mailbox-timeline.ts diff --git a/packages/chat-ui/src/markdown.test.tsx b/apps/web/src/chat/markdown.test.tsx similarity index 100% rename from packages/chat-ui/src/markdown.test.tsx rename to apps/web/src/chat/markdown.test.tsx diff --git a/packages/chat-ui/src/markdown.tsx b/apps/web/src/chat/markdown.tsx similarity index 100% rename from packages/chat-ui/src/markdown.tsx rename to apps/web/src/chat/markdown.tsx diff --git a/packages/chat-ui/src/mentions.ts b/apps/web/src/chat/mentions.ts similarity index 100% rename from packages/chat-ui/src/mentions.ts rename to apps/web/src/chat/mentions.ts diff --git a/packages/chat-ui/src/no-usable-model-banner.tsx b/apps/web/src/chat/no-usable-model-banner.tsx similarity index 90% rename from packages/chat-ui/src/no-usable-model-banner.tsx rename to apps/web/src/chat/no-usable-model-banner.tsx index de4dd4e485..6c8334531a 100644 --- a/packages/chat-ui/src/no-usable-model-banner.tsx +++ b/apps/web/src/chat/no-usable-model-banner.tsx @@ -4,9 +4,9 @@ // may still want to leave a note), but this banner says so before they // invest a long message in a reply that was never coming, and leads // straight into the connect flow that already works -// (`@corbits/settings-ui`'s `ConnectionsSection`). +// (`@/settings`'s `ConnectionsSection`). import { Button } from "@corbits/react-ui"; -import { WarningCircle } from "@corbits/icons"; +import { WarningCircle } from "@/lib/icons"; import { CHAT_STRINGS } from "./strings"; export function NoUsableModelBanner({ onConnectModel }: { readonly onConnectModel: () => void }) { diff --git a/packages/chat-ui/src/pr-thread-view.tsx b/apps/web/src/chat/pr-thread-view.tsx similarity index 100% rename from packages/chat-ui/src/pr-thread-view.tsx rename to apps/web/src/chat/pr-thread-view.tsx diff --git a/packages/chat-ui/src/profile-subject.ts b/apps/web/src/chat/profile-subject.ts similarity index 100% rename from packages/chat-ui/src/profile-subject.ts rename to apps/web/src/chat/profile-subject.ts diff --git a/packages/chat-ui/src/relative-time.ts b/apps/web/src/chat/relative-time.ts similarity index 100% rename from packages/chat-ui/src/relative-time.ts rename to apps/web/src/chat/relative-time.ts diff --git a/packages/chat-ui/src/resume-failed-banner.tsx b/apps/web/src/chat/resume-failed-banner.tsx similarity index 94% rename from packages/chat-ui/src/resume-failed-banner.tsx rename to apps/web/src/chat/resume-failed-banner.tsx index 6c024d9236..48486bf102 100644 --- a/packages/chat-ui/src/resume-failed-banner.tsx +++ b/apps/web/src/chat/resume-failed-banner.tsx @@ -3,7 +3,7 @@ // quotes a `reportError` ref id, and offers Retry — never a silent // `.catch(() => undefined)`. import { Button } from "@corbits/react-ui"; -import { WarningCircle } from "@corbits/icons"; +import { WarningCircle } from "@/lib/icons"; import { CHAT_STRINGS } from "./strings"; export function ResumeFailedBanner({ diff --git a/packages/chat-ui/src/shared-workbenches.test.ts b/apps/web/src/chat/shared-workbenches.test.ts similarity index 100% rename from packages/chat-ui/src/shared-workbenches.test.ts rename to apps/web/src/chat/shared-workbenches.test.ts diff --git a/packages/chat-ui/src/shared-workbenches.ts b/apps/web/src/chat/shared-workbenches.ts similarity index 100% rename from packages/chat-ui/src/shared-workbenches.ts rename to apps/web/src/chat/shared-workbenches.ts diff --git a/packages/chat-ui/src/sidebar.tsx b/apps/web/src/chat/sidebar.tsx similarity index 100% rename from packages/chat-ui/src/sidebar.tsx rename to apps/web/src/chat/sidebar.tsx diff --git a/packages/chat-ui/src/streaming-reply.test.ts b/apps/web/src/chat/streaming-reply.test.ts similarity index 100% rename from packages/chat-ui/src/streaming-reply.test.ts rename to apps/web/src/chat/streaming-reply.test.ts diff --git a/packages/chat-ui/src/streaming-reply.ts b/apps/web/src/chat/streaming-reply.ts similarity index 100% rename from packages/chat-ui/src/streaming-reply.ts rename to apps/web/src/chat/streaming-reply.ts diff --git a/packages/chat-ui/src/strings.test.ts b/apps/web/src/chat/strings.test.ts similarity index 100% rename from packages/chat-ui/src/strings.test.ts rename to apps/web/src/chat/strings.test.ts diff --git a/packages/chat-ui/src/strings.ts b/apps/web/src/chat/strings.ts similarity index 100% rename from packages/chat-ui/src/strings.ts rename to apps/web/src/chat/strings.ts diff --git a/packages/chat-ui/src/styles.css b/apps/web/src/chat/styles.css similarity index 100% rename from packages/chat-ui/src/styles.css rename to apps/web/src/chat/styles.css diff --git a/packages/chat-ui/src/thread-feed.test.ts b/apps/web/src/chat/thread-feed.test.ts similarity index 100% rename from packages/chat-ui/src/thread-feed.test.ts rename to apps/web/src/chat/thread-feed.test.ts diff --git a/packages/chat-ui/src/thread-feed.ts b/apps/web/src/chat/thread-feed.ts similarity index 100% rename from packages/chat-ui/src/thread-feed.ts rename to apps/web/src/chat/thread-feed.ts diff --git a/packages/chat-ui/src/timeline.test.ts b/apps/web/src/chat/timeline.test.ts similarity index 100% rename from packages/chat-ui/src/timeline.test.ts rename to apps/web/src/chat/timeline.test.ts diff --git a/packages/chat-ui/src/timeline.tsx b/apps/web/src/chat/timeline.tsx similarity index 99% rename from packages/chat-ui/src/timeline.tsx rename to apps/web/src/chat/timeline.tsx index ff5669cbb3..b0c5c99b4f 100644 --- a/packages/chat-ui/src/timeline.tsx +++ b/apps/web/src/chat/timeline.tsx @@ -15,8 +15,8 @@ import { contextMenuItem, isContextMenuEmpty, useContextMenuState, -} from "@corbits/context-menu"; -import type { ContextMenu, ContextMenuEntry } from "@corbits/context-menu"; +} from "@/shell/context-menu/lib"; +import type { ContextMenu, ContextMenuEntry } from "@/shell/context-menu/lib"; import { Avatar, Button, EmptyState, PartsRenderer, toast } from "@corbits/react-ui"; import { toReactUiReasoning } from "./agent-part-adapter"; import { displayNameForAddress, type AgentDisplayNames } from "./agent-display-names"; @@ -31,7 +31,7 @@ import { Copy, DotsThree, PencilSimple, -} from "@corbits/icons"; +} from "@/lib/icons"; import { memo } from "react"; import { useEffect, useRef, useState } from "react"; import type { MouseEvent as ReactMouseEvent, ReactNode } from "react"; @@ -62,7 +62,7 @@ import type { FailedTurnModelChoice } from "./failed-turn-models"; * Slack doesn't have"). The two-level cap is enforced server-side; this * UI never needs to reason about depth itself. * - * No `@corbits/context-menu` message target exists yet (see + * No `@/shell/context-menu/lib` message target exists yet (see * `apps/web/src/shell/context-menu/targets.ts`) — this row is the * fallback surface for both actions until that seam is wired for * messages. diff --git a/packages/chat-ui/src/tool-activity-view.tsx b/apps/web/src/chat/tool-activity-view.tsx similarity index 99% rename from packages/chat-ui/src/tool-activity-view.tsx rename to apps/web/src/chat/tool-activity-view.tsx index d73cfe707b..f5fd94e877 100644 --- a/packages/chat-ui/src/tool-activity-view.tsx +++ b/apps/web/src/chat/tool-activity-view.tsx @@ -20,7 +20,7 @@ import { PencilSimple, Users, WarningCircle, -} from "@corbits/icons"; +} from "@/lib/icons"; import type { ReactNode } from "react"; import { useState } from "react"; diff --git a/packages/chat-ui/src/tool-activity.test.ts b/apps/web/src/chat/tool-activity.test.ts similarity index 100% rename from packages/chat-ui/src/tool-activity.test.ts rename to apps/web/src/chat/tool-activity.test.ts diff --git a/packages/chat-ui/src/tool-activity.ts b/apps/web/src/chat/tool-activity.ts similarity index 99% rename from packages/chat-ui/src/tool-activity.ts rename to apps/web/src/chat/tool-activity.ts index 93b9cc5c69..fbaf948e5c 100644 --- a/packages/chat-ui/src/tool-activity.ts +++ b/apps/web/src/chat/tool-activity.ts @@ -1,7 +1,7 @@ // Turning a turn's tool calls into something a person can read. // // The wire carries a tool call as an identifier plus an argument bag plus -// whatever the tool handed back (`ToolTracePart` in `@corbits/chat-ui/wire/parts`, +// whatever the tool handed back (`ToolTracePart` in `@/chat/wire/parts`, // assembled by the chat orchestrator from `inferenceDoneBlocks` / // `toolDoneResult`). None of those three is fit to show anyone: the // identifier is a symbol (`slack__post_message`, or an Interchange qualified diff --git a/packages/chat-ui/src/turn-activity.test.ts b/apps/web/src/chat/turn-activity.test.ts similarity index 100% rename from packages/chat-ui/src/turn-activity.test.ts rename to apps/web/src/chat/turn-activity.test.ts diff --git a/packages/chat-ui/src/turn-activity.tsx b/apps/web/src/chat/turn-activity.tsx similarity index 100% rename from packages/chat-ui/src/turn-activity.tsx rename to apps/web/src/chat/turn-activity.tsx diff --git a/packages/chat-ui/src/typing-indicator.tsx b/apps/web/src/chat/typing-indicator.tsx similarity index 100% rename from packages/chat-ui/src/typing-indicator.tsx rename to apps/web/src/chat/typing-indicator.tsx diff --git a/packages/chat-ui/src/use-optimistic-sends.ts b/apps/web/src/chat/use-optimistic-sends.ts similarity index 100% rename from packages/chat-ui/src/use-optimistic-sends.ts rename to apps/web/src/chat/use-optimistic-sends.ts diff --git a/packages/chat-ui/src/use-thread-navigation.ts b/apps/web/src/chat/use-thread-navigation.ts similarity index 100% rename from packages/chat-ui/src/use-thread-navigation.ts rename to apps/web/src/chat/use-thread-navigation.ts diff --git a/packages/chat-ui/src/use-workbench-feed.ts b/apps/web/src/chat/use-workbench-feed.ts similarity index 100% rename from packages/chat-ui/src/use-workbench-feed.ts rename to apps/web/src/chat/use-workbench-feed.ts diff --git a/packages/chat-ui/src/use-workbench-stream.ts b/apps/web/src/chat/use-workbench-stream.ts similarity index 100% rename from packages/chat-ui/src/use-workbench-stream.ts rename to apps/web/src/chat/use-workbench-stream.ts diff --git a/packages/chat-ui/src/wire/agent-address.ts b/apps/web/src/chat/wire/agent-address.ts similarity index 66% rename from packages/chat-ui/src/wire/agent-address.ts rename to apps/web/src/chat/wire/agent-address.ts index 0778c03ef3..06d4699c21 100644 --- a/packages/chat-ui/src/wire/agent-address.ts +++ b/apps/web/src/chat/wire/agent-address.ts @@ -1,8 +1,11 @@ -// Mirrored from packages/chat/src: apps/web and @corbits/chat-ui must not -// import @corbits/chat, a server-only package. +// Mirrored from packages/chat/src: apps/web and @/chat +// must not import @corbits/chat, a server-only package. This is the browser- +// facing half of the same wire contract the hub's chat routes still speak; +// once the hub moves onto native mail threads (T5a/T5c) this file becomes +// the one source of truth and packages/chat's copy goes away. // Agent-address helpers shared by this package's own fan-out -// (`routes.ts`) and by `@corbits/chat-ui`'s composer: splitting an +// (`routes.ts`) and by `@/chat`'s composer: splitting an // address into its local part and domain. Mirrors the split // `@intx/types/src/agent-address.ts`'s `parseAgentAddress` does, // but stays permissive about the left-hand side on purpose — the diff --git a/packages/chat-ui/src/wire/blocks.ts b/apps/web/src/chat/wire/blocks.ts similarity index 93% rename from packages/chat-ui/src/wire/blocks.ts rename to apps/web/src/chat/wire/blocks.ts index 7df16ec2c0..5acf5bb428 100644 --- a/packages/chat-ui/src/wire/blocks.ts +++ b/apps/web/src/chat/wire/blocks.ts @@ -1,5 +1,8 @@ -// Mirrored from packages/chat/src: apps/web and @corbits/chat-ui must not -// import @corbits/chat, a server-only package. +// Mirrored from packages/chat/src: apps/web and @/chat +// must not import @corbits/chat, a server-only package. This is the browser- +// facing half of the same wire contract the hub's chat routes still speak; +// once the hub moves onto native mail threads (T5a/T5c) this file becomes +// the one source of truth and packages/chat's copy goes away. import { type } from "arktype"; diff --git a/packages/chat-ui/src/wire/consumer-inference-text.ts b/apps/web/src/chat/wire/consumer-inference-text.ts similarity index 86% rename from packages/chat-ui/src/wire/consumer-inference-text.ts rename to apps/web/src/chat/wire/consumer-inference-text.ts index 82bcf961e4..3f24310187 100644 --- a/packages/chat-ui/src/wire/consumer-inference-text.ts +++ b/apps/web/src/chat/wire/consumer-inference-text.ts @@ -1,5 +1,8 @@ -// Mirrored from packages/chat/src: apps/web and @corbits/chat-ui must not -// import @corbits/chat, a server-only package. +// Mirrored from packages/chat/src: apps/web and @/chat +// must not import @corbits/chat, a server-only package. This is the browser- +// facing half of the same wire contract the hub's chat routes still speak; +// once the hub moves onto native mail threads (T5a/T5c) this file becomes +// the one source of truth and packages/chat's copy goes away. /** * Person-facing inference copy. HTTP status, raw provider dumps, and @@ -22,7 +25,7 @@ export const CONSUMER_INFERENCE_FAILURE_NOTICE = * Byte-for-byte copies of the two preambles `@intx/inference`'s * `formatInferenceError` writes for `credential_failure` and * `quota_exhausted`. Kept here so the bench-list preview path - * can refuse them without depending on `@corbits/chat-ui`. The chat-ui + * can refuse them without depending on `@/chat`. The chat-ui * drift guard still owns matching these against the published director. */ export const CLASSIFIED_INFERENCE_FAILURE_PREAMBLES: readonly string[] = [ diff --git a/packages/chat-ui/src/wire/display-name.ts b/apps/web/src/chat/wire/display-name.ts similarity index 90% rename from packages/chat-ui/src/wire/display-name.ts rename to apps/web/src/chat/wire/display-name.ts index a70205f549..e0dc5c3857 100644 --- a/packages/chat-ui/src/wire/display-name.ts +++ b/apps/web/src/chat/wire/display-name.ts @@ -1,12 +1,15 @@ -// Mirrored from packages/chat/src: apps/web and @corbits/chat-ui must not -// import @corbits/chat, a server-only package. +// Mirrored from packages/chat/src: apps/web and @/chat +// must not import @corbits/chat, a server-only package. This is the browser- +// facing half of the same wire contract the hub's chat routes still speak; +// once the hub moves onto native mail threads (T5a/T5c) this file becomes +// the one source of truth and packages/chat's copy goes away. // A workflow definition's person-facing display name, derived once here // so every caller that decides "what does this agent look like to a // person" reads it the same way — never a scattered `description ?? name` // (or worse, a raw address/run id) reimplemented per call site. // -// Lives in `@corbits/chat-ui/wire` (mirrored from `@corbits/chat`, which +// Lives in `@/chat/wire` (mirrored from `@corbits/chat`, which // `@corbits/agent-directory` still depends on for its own copy of // `workbench-host-naming`) so this browser-facing surface never needs a // server-only chat import; `@corbits/agent-directory/client.ts` keeps its diff --git a/packages/chat-ui/src/wire/id-leak-guard.ts b/apps/web/src/chat/wire/id-leak-guard.ts similarity index 76% rename from packages/chat-ui/src/wire/id-leak-guard.ts rename to apps/web/src/chat/wire/id-leak-guard.ts index 3049da6aac..fb0b1c5b99 100644 --- a/packages/chat-ui/src/wire/id-leak-guard.ts +++ b/apps/web/src/chat/wire/id-leak-guard.ts @@ -1,23 +1,26 @@ -// Mirrored from packages/chat/src: apps/web and @corbits/chat-ui must not -// import @corbits/chat, a server-only package. +// Mirrored from packages/chat/src: apps/web and @/chat +// must not import @corbits/chat, a server-only package. This is the browser- +// facing half of the same wire contract the hub's chat routes still speak; +// once the hub moves onto native mail threads (T5a/T5c) this file becomes +// the one source of truth and packages/chat's copy goes away. -// The systemic guard this module enforces: a person never sees an internal +// The guard: a person never sees an internal // identifier — not as a participant's name, not in a join/system line, // not in a greeting, not in a chat title. This has recurred repeatedly // (a raw definitionId/runId in insights, a `writing_systems` id in a -// Myra reply, and its own "Run 737a058d…" / "I'm run_737a…") each +// Myra reply, and the "Run 737a058d…" / "I'm run_737a…") each // time as a one-off display-time patch; this module is the one place // every id-generating prefix is named, so a new leak is a missed test // run rather than a missed grep. // // Prefix words mirror `@intx/hub-common`'s `generateId` (vendored; // upstream source: `packages/hub-common/src/ids.ts`'s `PREFIXES`) for -// the six kinds this guard names explicitly — a workflow run, a workflow +// the six kinds named explicitly — a workflow run, a workflow // definition, a tenant, a principal, an asset, and a git token — each // normally followed by `_` and 32 lowercase hex characters (`run_737a…`). // // Matched with either `_`, a space, or `-` as the separator, not just -// `_`: `humanizeSlug`'s Title Case reading of a leaked id (own +// `_`: `humanizeSlug`'s Title Case reading of a leaked id (its own // "Run 737a058d48006e2bde12559576f422e0") replaces the underscore with a // space, so the raw and the humanized-leak forms both need to trip this. const ID_PREFIX_WORDS = ["run", "wfd", "tnt", "prn", "ast", "gtk"] as const; diff --git a/packages/chat-ui/src/wire/mentions.ts b/apps/web/src/chat/wire/mentions.ts similarity index 84% rename from packages/chat-ui/src/wire/mentions.ts rename to apps/web/src/chat/wire/mentions.ts index 61789f04d6..cd682057f3 100644 --- a/packages/chat-ui/src/wire/mentions.ts +++ b/apps/web/src/chat/wire/mentions.ts @@ -1,8 +1,11 @@ -// Mirrored from packages/chat/src: apps/web and @corbits/chat-ui must not -// import @corbits/chat, a server-only package. +// Mirrored from packages/chat/src: apps/web and @/chat +// must not import @corbits/chat, a server-only package. This is the browser- +// facing half of the same wire contract the hub's chat routes still speak; +// once the hub moves onto native mail threads (T5a/T5c) this file becomes +// the one source of truth and packages/chat's copy goes away. // The "@ + handle" mention rule: the single wire-level contract between -// the composer (`@corbits/chat-ui`'s `mentions.ts`, which derives +// the composer (`@/chat`'s `mentions.ts`, which derives // candidates from a workbench's participant records and splices the // picked handle into the draft) and this package's own fan-out // (`routes.ts`'s `POST /workbenches/:id/messages`). Both sides work off diff --git a/packages/chat-ui/src/wire/participants.ts b/apps/web/src/chat/wire/participants.ts similarity index 92% rename from packages/chat-ui/src/wire/participants.ts rename to apps/web/src/chat/wire/participants.ts index 3884fb41ec..f9f4d989b3 100644 --- a/packages/chat-ui/src/wire/participants.ts +++ b/apps/web/src/chat/wire/participants.ts @@ -1,5 +1,8 @@ -// Mirrored from packages/chat/src: apps/web and @corbits/chat-ui must not -// import @corbits/chat, a server-only package. +// Mirrored from packages/chat/src: apps/web and @/chat +// must not import @corbits/chat, a server-only package. This is the browser- +// facing half of the same wire contract the hub's chat routes still speak; +// once the hub moves onto native mail threads (T5a/T5c) this file becomes +// the one source of truth and packages/chat's copy goes away. // Workbench participant records: the settings-backed source of mention // handles. `chat/participants` (see `routes.ts`'s `ChatNamespaceSchemas`) diff --git a/packages/chat-ui/src/wire/parts.ts b/apps/web/src/chat/wire/parts.ts similarity index 92% rename from packages/chat-ui/src/wire/parts.ts rename to apps/web/src/chat/wire/parts.ts index 18dba35f55..83d20a519e 100644 --- a/packages/chat-ui/src/wire/parts.ts +++ b/apps/web/src/chat/wire/parts.ts @@ -1,5 +1,8 @@ -// Mirrored from packages/chat/src: apps/web and @corbits/chat-ui must not -// import @corbits/chat, a server-only package. +// Mirrored from packages/chat/src: apps/web and @/chat +// must not import @corbits/chat, a server-only package. This is the browser- +// facing half of the same wire contract the hub's chat routes still speak; +// once the hub moves onto native mail threads (T5a/T5c) this file becomes +// the one source of truth and packages/chat's copy goes away. import { type } from "arktype"; diff --git a/packages/chat-ui/src/wire/stream-events.ts b/apps/web/src/chat/wire/stream-events.ts similarity index 91% rename from packages/chat-ui/src/wire/stream-events.ts rename to apps/web/src/chat/wire/stream-events.ts index d643ba0ff5..4a8098f264 100644 --- a/packages/chat-ui/src/wire/stream-events.ts +++ b/apps/web/src/chat/wire/stream-events.ts @@ -1,5 +1,8 @@ -// Mirrored from packages/chat/src: apps/web and @corbits/chat-ui must not -// import @corbits/chat, a server-only package. +// Mirrored from packages/chat/src: apps/web and @/chat +// must not import @corbits/chat, a server-only package. This is the browser- +// facing half of the same wire contract the hub's chat routes still speak; +// once the hub moves onto native mail threads (T5a/T5c) this file becomes +// the one source of truth and packages/chat's copy goes away. // The wire contract for every event a workbench's `/stream` SSE // connection carries — arktype schemas so a payload is validated at the diff --git a/packages/chat-ui/src/wire/tools-unsupported.ts b/apps/web/src/chat/wire/tools-unsupported.ts similarity index 79% rename from packages/chat-ui/src/wire/tools-unsupported.ts rename to apps/web/src/chat/wire/tools-unsupported.ts index 998135aa3d..6611c58868 100644 --- a/packages/chat-ui/src/wire/tools-unsupported.ts +++ b/apps/web/src/chat/wire/tools-unsupported.ts @@ -1,5 +1,8 @@ -// Mirrored from packages/chat/src: apps/web and @corbits/chat-ui must not -// import @corbits/chat, a server-only package. +// Mirrored from packages/chat/src: apps/web and @/chat +// must not import @corbits/chat, a server-only package. This is the browser- +// facing half of the same wire contract the hub's chat routes still speak; +// once the hub moves onto native mail threads (T5a/T5c) this file becomes +// the one source of truth and packages/chat's copy goes away. /** * Named consumer copy for an inference failure whose real cause is that diff --git a/packages/chat-ui/src/workbench-display-title.test.ts b/apps/web/src/chat/workbench-display-title.test.ts similarity index 100% rename from packages/chat-ui/src/workbench-display-title.test.ts rename to apps/web/src/chat/workbench-display-title.test.ts diff --git a/packages/chat-ui/src/workbench-display-title.ts b/apps/web/src/chat/workbench-display-title.ts similarity index 100% rename from packages/chat-ui/src/workbench-display-title.ts rename to apps/web/src/chat/workbench-display-title.ts diff --git a/packages/chat-ui/src/workbench-presence.ts b/apps/web/src/chat/workbench-presence.ts similarity index 100% rename from packages/chat-ui/src/workbench-presence.ts rename to apps/web/src/chat/workbench-presence.ts diff --git a/packages/chat-ui/src/workbench-settings/agents-section.test.ts b/apps/web/src/chat/workbench-settings/agents-section.test.ts similarity index 100% rename from packages/chat-ui/src/workbench-settings/agents-section.test.ts rename to apps/web/src/chat/workbench-settings/agents-section.test.ts diff --git a/packages/chat-ui/src/workbench-settings/agents-section.tsx b/apps/web/src/chat/workbench-settings/agents-section.tsx similarity index 99% rename from packages/chat-ui/src/workbench-settings/agents-section.tsx rename to apps/web/src/chat/workbench-settings/agents-section.tsx index a2efc89fc3..157b584a0f 100644 --- a/packages/chat-ui/src/workbench-settings/agents-section.tsx +++ b/apps/web/src/chat/workbench-settings/agents-section.tsx @@ -29,13 +29,9 @@ import { formatRelativeTime, toast, } from "@corbits/react-ui"; -import { - chatCapableModels, - getResolvedCatalog, - providerDisplayName, -} from "@corbits/inference-settings"; -import type { ModelInfo } from "@corbits/inference-settings"; -import { ArrowLeft, CaretRight, WarningCircle } from "@corbits/icons"; +import { chatCapableModels, getResolvedCatalog, providerDisplayName } from "@/settings/inference"; +import type { ModelInfo } from "@/settings/inference"; +import { ArrowLeft, CaretRight, WarningCircle } from "@/lib/icons"; import { CorbitAvatar } from "../avatar"; import { diff --git a/packages/chat-ui/src/workbench-settings/context-window.test.ts b/apps/web/src/chat/workbench-settings/context-window.test.ts similarity index 100% rename from packages/chat-ui/src/workbench-settings/context-window.test.ts rename to apps/web/src/chat/workbench-settings/context-window.test.ts diff --git a/packages/chat-ui/src/workbench-settings/context-window.ts b/apps/web/src/chat/workbench-settings/context-window.ts similarity index 100% rename from packages/chat-ui/src/workbench-settings/context-window.ts rename to apps/web/src/chat/workbench-settings/context-window.ts diff --git a/packages/chat-ui/src/workbench-settings/danger-section.tsx b/apps/web/src/chat/workbench-settings/danger-section.tsx similarity index 100% rename from packages/chat-ui/src/workbench-settings/danger-section.tsx rename to apps/web/src/chat/workbench-settings/danger-section.tsx diff --git a/packages/chat-ui/src/workbench-settings/general-section.tsx b/apps/web/src/chat/workbench-settings/general-section.tsx similarity index 100% rename from packages/chat-ui/src/workbench-settings/general-section.tsx rename to apps/web/src/chat/workbench-settings/general-section.tsx diff --git a/packages/chat-ui/src/workbench-settings/index.ts b/apps/web/src/chat/workbench-settings/index.ts similarity index 100% rename from packages/chat-ui/src/workbench-settings/index.ts rename to apps/web/src/chat/workbench-settings/index.ts diff --git a/packages/chat-ui/src/workbench-settings/members-section.tsx b/apps/web/src/chat/workbench-settings/members-section.tsx similarity index 100% rename from packages/chat-ui/src/workbench-settings/members-section.tsx rename to apps/web/src/chat/workbench-settings/members-section.tsx diff --git a/packages/chat-ui/src/workbench-settings/model.test.ts b/apps/web/src/chat/workbench-settings/model.test.ts similarity index 100% rename from packages/chat-ui/src/workbench-settings/model.test.ts rename to apps/web/src/chat/workbench-settings/model.test.ts diff --git a/packages/chat-ui/src/workbench-settings/model.ts b/apps/web/src/chat/workbench-settings/model.ts similarity index 100% rename from packages/chat-ui/src/workbench-settings/model.ts rename to apps/web/src/chat/workbench-settings/model.ts diff --git a/packages/chat-ui/src/workbench-settings/surface.tsx b/apps/web/src/chat/workbench-settings/surface.tsx similarity index 99% rename from packages/chat-ui/src/workbench-settings/surface.tsx rename to apps/web/src/chat/workbench-settings/surface.tsx index 217a00fc4e..5ae5dbedf0 100644 --- a/packages/chat-ui/src/workbench-settings/surface.tsx +++ b/apps/web/src/chat/workbench-settings/surface.tsx @@ -12,8 +12,8 @@ import { Button, toast } from "@corbits/react-ui"; import { isAgentAddress } from "../wire/mentions"; import { useEffect, useState } from "react"; -import type { APIQuery } from "@corbits/api-query"; -import { QueryView, UnauthenticatedError, describeQueryError } from "@corbits/api-query"; +import type { APIQuery } from "@/lib/api-query"; +import { QueryView, UnauthenticatedError, describeQueryError } from "@/lib/api-query"; import { getBenchChatSettings, getWorkbenchSettings, patchWorkbenchSettings } from "../api"; import type { WorkbenchSettings } from "../api"; import { WorkbenchLoadingState } from "../loading-state"; diff --git a/packages/chat-ui/src/workbench-timeline-view.ts b/apps/web/src/chat/workbench-timeline-view.ts similarity index 100% rename from packages/chat-ui/src/workbench-timeline-view.ts rename to apps/web/src/chat/workbench-timeline-view.ts diff --git a/apps/web/src/client-bootstrap.test.ts b/apps/web/src/client-bootstrap.test.ts index 620da6821f..aa2cb69b9d 100644 --- a/apps/web/src/client-bootstrap.test.ts +++ b/apps/web/src/client-bootstrap.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from "bun:test"; -import type { ClientLogger } from "@corbits/client-log"; +import type { ClientLogger } from "@/lib/client-log"; import { bootstrapClientSession, logBootstrapResult, logBootstrapThrown } from "./client-bootstrap"; import type { ClientBootstrapResult } from "./client-bootstrap"; diff --git a/apps/web/src/client-bootstrap.ts b/apps/web/src/client-bootstrap.ts index 8064d5b625..fa2913c102 100644 --- a/apps/web/src/client-bootstrap.ts +++ b/apps/web/src/client-bootstrap.ts @@ -13,7 +13,7 @@ import { WORKFLOW_CATALOG } from "@corbits/workflows/catalog"; -import type { ClientLogger } from "@corbits/client-log"; +import type { ClientLogger } from "@/lib/client-log"; import { buildNeedsList, diff --git a/apps/web/src/command-palette-actions.ts b/apps/web/src/command-palette-actions.ts index b45e22beab..41849e2817 100644 --- a/apps/web/src/command-palette-actions.ts +++ b/apps/web/src/command-palette-actions.ts @@ -18,8 +18,8 @@ // said and did the same thing was dropped. "New thread" is out // of scope (killed by owner decision). -import { createPendingDialogRequest } from "@corbits/shell-layout"; -import { CHAT_STRINGS } from "@corbits/chat-ui"; +import { createPendingDialogRequest } from "@/shell/layout"; +import { CHAT_STRINGS } from "@/chat"; import { WORKBENCH_PATH_PREFIX } from "./workbench-path"; import { NEW_WORKBENCH_PATH } from "./routes"; import { listAgentDefinitions } from "./agents-api"; diff --git a/apps/web/src/command-palette-provider.tsx b/apps/web/src/command-palette-provider.tsx index c9f54d5afd..ffb2e8281d 100644 --- a/apps/web/src/command-palette-provider.tsx +++ b/apps/web/src/command-palette-provider.tsx @@ -1,7 +1,7 @@ import { artifactKindLabel, CommandPalette, useCommandShortcut, useTheme } from "@corbits/react-ui"; import type { CommandPaletteGroup } from "@corbits/react-ui"; -import { listWorkbenches } from "@corbits/chat-ui"; -import { libraryArtifactPath } from "@corbits/artifact-ui"; +import { listWorkbenches } from "@/chat"; +import { libraryArtifactPath } from "@/library"; import { reportError } from "@corbits/error-sink"; import { buildCommandPaletteGroups, @@ -13,7 +13,7 @@ import { type PaletteResultItem, type PaletteSource, type RecentEntry, -} from "@corbits/command-palette"; +} from "@/command-palette"; import { useQueryClient } from "@tanstack/react-query"; import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from "react"; @@ -32,7 +32,7 @@ import { NAV_ROUTES } from "./routes"; import { ArtifactListPageSchema, useAPIQuery } from "./api"; import { isBenchMembership, useBench } from "./bench-context"; import { useCloseCanvas } from "./shell/canvas-availability"; -import { listMcpServers } from "@corbits/plugins-ui"; +import { listMcpServers } from "@/tools"; import { AGENTS_PATH_PREFIX, PLUGINS_PATH_PREFIX, SKILLS_PATH_PREFIX } from "./path-ids"; import { listScheduledWorkflows, runScheduledWorkflowNow, useTenantQuery } from "./routines-api"; import { listSkills } from "./skills-api"; @@ -52,7 +52,7 @@ const STATIC_COMMANDS = buildStaticCommands( * matches no page and renders no stage top bar of its own. * * Grouping, `#`/`@`/`>`/`/` scope parsing, and the Recents rule live in - * `@corbits/command-palette` (`buildCommandPaletteGroups`) — this file only + * `@/command-palette` (`buildCommandPaletteGroups`) — this file only * assembles the app's own sources (routes, workbenches, agents, routines, * skills, library artifacts) and maps a selection back to a real route or * action. Entity results for workbenches/runs/agents still come off the same diff --git a/apps/web/src/command-palette-recents.ts b/apps/web/src/command-palette-recents.ts index 8541fe9733..c3789d1516 100644 --- a/apps/web/src/command-palette-recents.ts +++ b/apps/web/src/command-palette-recents.ts @@ -1,14 +1,10 @@ // A localStorage-backed Recents store per bench, built on -// `@corbits/command-palette`'s generic `createRecentsStore`. Mirrors the +// `@/command-palette`'s generic `createRecentsStore`. Mirrors the // defensive try/catch localStorage access `bench-context.tsx` already uses — // a private-browsing tab with storage disabled loses persistence, not // function. -import { - createRecentsStore, - type RecentsStorage, - type RecentsStore, -} from "@corbits/command-palette"; +import { createRecentsStore, type RecentsStorage, type RecentsStore } from "@/command-palette"; const STORAGE_PREFIX = "workbench.cmdk-recents"; diff --git a/packages/command-palette/src/command-groups.ts b/apps/web/src/command-palette/command-groups.ts similarity index 100% rename from packages/command-palette/src/command-groups.ts rename to apps/web/src/command-palette/command-groups.ts diff --git a/packages/command-palette/src/detail-paths.test.ts b/apps/web/src/command-palette/detail-paths.test.ts similarity index 100% rename from packages/command-palette/src/detail-paths.test.ts rename to apps/web/src/command-palette/detail-paths.test.ts diff --git a/packages/command-palette/src/detail-paths.ts b/apps/web/src/command-palette/detail-paths.ts similarity index 96% rename from packages/command-palette/src/detail-paths.ts rename to apps/web/src/command-palette/detail-paths.ts index 58ad14c2f6..a68e57d5e0 100644 --- a/packages/command-palette/src/detail-paths.ts +++ b/apps/web/src/command-palette/detail-paths.ts @@ -10,7 +10,7 @@ // back to its own opaque id, which every roster still resolves as a deep // link into that row. -import { isValidSlug } from "@corbits/slug"; +import { isValidSlug } from "@/lib/slug"; export type DetailAddressable = { /** The entity's own minted slug, as the server returned it. */ diff --git a/packages/command-palette/src/entity-search.ts b/apps/web/src/command-palette/entity-search.ts similarity index 100% rename from packages/command-palette/src/entity-search.ts rename to apps/web/src/command-palette/entity-search.ts diff --git a/packages/command-palette/src/index.ts b/apps/web/src/command-palette/index.ts similarity index 96% rename from packages/command-palette/src/index.ts rename to apps/web/src/command-palette/index.ts index 30e7ea0a3f..2aca0d9f40 100644 --- a/packages/command-palette/src/index.ts +++ b/apps/web/src/command-palette/index.ts @@ -1,4 +1,4 @@ -// `@corbits/command-palette`: what the global command palette can show. +// `@/command-palette`: what the global command palette can show. // `buildStaticCommands` turns the app shell's own route table into commands. // `searchEntities` is the pure match/paginate core over already-fetched // entity lists (workbenches, routines, agents — any source the consumer wires); diff --git a/packages/command-palette/src/recents.ts b/apps/web/src/command-palette/recents.ts similarity index 100% rename from packages/command-palette/src/recents.ts rename to apps/web/src/command-palette/recents.ts diff --git a/packages/command-palette/src/scope.ts b/apps/web/src/command-palette/scope.ts similarity index 100% rename from packages/command-palette/src/scope.ts rename to apps/web/src/command-palette/scope.ts diff --git a/packages/command-palette/src/static-commands.ts b/apps/web/src/command-palette/static-commands.ts similarity index 100% rename from packages/command-palette/src/static-commands.ts rename to apps/web/src/command-palette/static-commands.ts diff --git a/packages/command-palette/src/use-entity-search.ts b/apps/web/src/command-palette/use-entity-search.ts similarity index 100% rename from packages/command-palette/src/use-entity-search.ts rename to apps/web/src/command-palette/use-entity-search.ts diff --git a/apps/web/src/connect-service-actions.ts b/apps/web/src/connect-service-actions.ts index cc2dfc2cd6..deed7cea6d 100644 --- a/apps/web/src/connect-service-actions.ts +++ b/apps/web/src/connect-service-actions.ts @@ -1,4 +1,4 @@ -// Builds the `ConnectServiceActions` port `ChatWorkspace` (`@corbits/chat-ui`) +// Builds the `ConnectServiceActions` port `ChatWorkspace` (`@/chat`) // calls for the generic in-room connect card — the room // connect-github binding's shape (hub-zero T3, deleted with the // workbench-scoped mount) generalized to every connector and @@ -15,15 +15,15 @@ // Plugins page) publishes `chat.settings`; ChatWorkspace parses that // event and calls `notifySettingsChanged` so a mounted card flips // without remounting. -import type { ConnectServiceActions, ConnectServiceQuery } from "@corbits/chat-ui"; +import type { ConnectServiceActions, ConnectServiceQuery } from "@/chat"; import { completeConnectorCredential, ConnectionsApiError, fetchOAuthConfigured, listProviders, oauthStartHref, -} from "@corbits/settings-ui"; -import { connectMcpPreset, listMcpPresets, McpServersApiError } from "@corbits/plugins-ui"; +} from "@/settings"; +import { connectMcpPreset, listMcpPresets, McpServersApiError } from "@/tools"; import { mcpPresetBySlug, MCP_PRESETS } from "@corbits/connections/mcp-presets"; import { CONNECTOR_REGISTRY } from "@corbits/connections/registry"; diff --git a/apps/web/src/global-routines.ts b/apps/web/src/global-routines.ts index 33fa6ef01e..9006175622 100644 --- a/apps/web/src/global-routines.ts +++ b/apps/web/src/global-routines.ts @@ -5,8 +5,8 @@ import { toast } from "@corbits/react-ui"; import { reportError } from "@corbits/error-sink"; import { useMemo } from "react"; import { useQueries, useQueryClient } from "@tanstack/react-query"; -import { describeApiError } from "@corbits/api-query"; -import type { APIQuery } from "@corbits/api-query"; +import { describeApiError } from "@/lib/api-query"; +import type { APIQuery } from "@/lib/api-query"; import type { Principal } from "./api"; import { isBenchMembership, useBench } from "./bench-context"; diff --git a/apps/web/src/insights-workbench-scope.test.ts b/apps/web/src/insights-workbench-scope.test.ts index 316b057e56..f5512dfbc6 100644 --- a/apps/web/src/insights-workbench-scope.test.ts +++ b/apps/web/src/insights-workbench-scope.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from "bun:test"; -import type { Workbench } from "@corbits/chat-ui"; +import type { Workbench } from "@/chat"; import { resolveWorkbenchInsightsScope } from "./insights-workbench-scope"; diff --git a/apps/web/src/insights-workbench-scope.ts b/apps/web/src/insights-workbench-scope.ts index d05cad4768..53d17e01b6 100644 --- a/apps/web/src/insights-workbench-scope.ts +++ b/apps/web/src/insights-workbench-scope.ts @@ -1,7 +1,7 @@ // Insights is scoped per workbench: `/insights/workbench/:workbenchId` // resolves to that workbench's OWN workbench tenant — every workbench minted // through POST /workbenches carries a tenancy link (see `WorkbenchWire.tenancy` -// in @corbits/chat-ui) — never the workbench id itself and never the bench's +// in @/chat) — never the workbench id itself and never the bench's // root tenant. That lookup goes through this one pure function over the SAME // cached workbench rows the shell's sidebar already fetches, rather than a // bespoke endpoint. deleted the reverse lookup @@ -9,7 +9,7 @@ // "activity by workbench" chart and scope switcher, both dropped along with // packages/insights. -import type { Workbench } from "@corbits/chat-ui"; +import type { Workbench } from "@/chat"; export type WorkbenchInsightsResolution = | { readonly kind: "not-found" } diff --git a/apps/web/src/instant-agent-create.ts b/apps/web/src/instant-agent-create.ts index 2895ef1ac0..36fe693de9 100644 --- a/apps/web/src/instant-agent-create.ts +++ b/apps/web/src/instant-agent-create.ts @@ -17,7 +17,7 @@ import { patchWorkbenchSettings, sendInboxMessage, workbenchesQueryKeyPrefix, -} from "@corbits/chat-ui"; +} from "@/chat"; import { reportError } from "@corbits/error-sink"; import { listAgentDefinitions } from "./agents-api"; diff --git a/packages/api-query/src/envelope.test.ts b/apps/web/src/lib/api-query/envelope.test.ts similarity index 100% rename from packages/api-query/src/envelope.test.ts rename to apps/web/src/lib/api-query/envelope.test.ts diff --git a/packages/api-query/src/envelope.ts b/apps/web/src/lib/api-query/envelope.ts similarity index 100% rename from packages/api-query/src/envelope.ts rename to apps/web/src/lib/api-query/envelope.ts diff --git a/packages/api-query/src/index.ts b/apps/web/src/lib/api-query/index.ts similarity index 100% rename from packages/api-query/src/index.ts rename to apps/web/src/lib/api-query/index.ts diff --git a/packages/api-query/src/query-view.test.tsx b/apps/web/src/lib/api-query/query-view.test.tsx similarity index 100% rename from packages/api-query/src/query-view.test.tsx rename to apps/web/src/lib/api-query/query-view.test.tsx diff --git a/packages/api-query/src/query-view.tsx b/apps/web/src/lib/api-query/query-view.tsx similarity index 97% rename from packages/api-query/src/query-view.tsx rename to apps/web/src/lib/api-query/query-view.tsx index a9d7d8d067..54cf383104 100644 --- a/packages/api-query/src/query-view.tsx +++ b/apps/web/src/lib/api-query/query-view.tsx @@ -3,7 +3,7 @@ // them invents placeholder content. import { Button, EmptyState, Skeleton } from "@corbits/react-ui"; -import { Lock, WarningCircle } from "@corbits/icons"; +import { Lock, WarningCircle } from "@/lib/icons"; import type { ReactNode } from "react"; import type { APIQuery } from "./envelope"; @@ -83,7 +83,7 @@ export function QueryView({ /** Overrides the loading render entirely — a page-level wait (a whole * stage or panel's primary content, not a row hint) should pass its own * warm loader here rather than take the `"block"` skeleton slab, which - * this package can't render itself: `@corbits/chat-ui`'s + * this package can't render itself: `@/chat`'s * `WorkbenchLoadingState` depends on this package, so `QueryView` can * never import it back without a cycle. */ readonly loadingContent?: ReactNode; diff --git a/packages/client-log/src/index.test.ts b/apps/web/src/lib/client-log/index.test.ts similarity index 100% rename from packages/client-log/src/index.test.ts rename to apps/web/src/lib/client-log/index.test.ts diff --git a/packages/client-log/src/index.ts b/apps/web/src/lib/client-log/index.ts similarity index 100% rename from packages/client-log/src/index.ts rename to apps/web/src/lib/client-log/index.ts diff --git a/packages/icons/src/index.test.tsx b/apps/web/src/lib/icons/index.test.tsx similarity index 96% rename from packages/icons/src/index.test.tsx rename to apps/web/src/lib/icons/index.test.tsx index e28a2fd633..961dea8722 100644 --- a/packages/icons/src/index.test.tsx +++ b/apps/web/src/lib/icons/index.test.tsx @@ -2,7 +2,7 @@ import { describe, expect, test } from "bun:test"; import * as icons from "./index"; -describe("@corbits/icons", () => { +describe("@/lib/icons", () => { test("never exports a Sparkle glyph", () => { const names = Object.keys(icons); const sparkleNames = names.filter((name) => /sparkle/i.test(name)); diff --git a/packages/icons/src/index.tsx b/apps/web/src/lib/icons/index.tsx similarity index 100% rename from packages/icons/src/index.tsx rename to apps/web/src/lib/icons/index.tsx diff --git a/packages/slug/src/index.ts b/apps/web/src/lib/slug/index.ts similarity index 100% rename from packages/slug/src/index.ts rename to apps/web/src/lib/slug/index.ts diff --git a/packages/slug/src/slug.test.ts b/apps/web/src/lib/slug/slug.test.ts similarity index 100% rename from packages/slug/src/slug.test.ts rename to apps/web/src/lib/slug/slug.test.ts diff --git a/packages/slug/src/slug.ts b/apps/web/src/lib/slug/slug.ts similarity index 100% rename from packages/slug/src/slug.ts rename to apps/web/src/lib/slug/slug.ts diff --git a/packages/text-diff/src/index.ts b/apps/web/src/lib/text-diff/index.ts similarity index 100% rename from packages/text-diff/src/index.ts rename to apps/web/src/lib/text-diff/index.ts diff --git a/packages/text-diff/src/line-diff.test.ts b/apps/web/src/lib/text-diff/line-diff.test.ts similarity index 100% rename from packages/text-diff/src/line-diff.test.ts rename to apps/web/src/lib/text-diff/line-diff.test.ts diff --git a/packages/text-diff/src/line-diff.ts b/apps/web/src/lib/text-diff/line-diff.ts similarity index 100% rename from packages/text-diff/src/line-diff.ts rename to apps/web/src/lib/text-diff/line-diff.ts diff --git a/apps/web/src/library-workbench-scope.test.ts b/apps/web/src/library-workbench-scope.test.ts index 228a4c16c3..17d614dddf 100644 --- a/apps/web/src/library-workbench-scope.test.ts +++ b/apps/web/src/library-workbench-scope.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from "bun:test"; -import type { Workbench } from "@corbits/chat-ui"; +import type { Workbench } from "@/chat"; import { resolveLibraryWorkbenchScope } from "./library-workbench-scope"; diff --git a/apps/web/src/library-workbench-scope.ts b/apps/web/src/library-workbench-scope.ts index 7af3dd003d..6f5a13a10a 100644 --- a/apps/web/src/library-workbench-scope.ts +++ b/apps/web/src/library-workbench-scope.ts @@ -3,7 +3,7 @@ // `insights-workbench-scope.ts` scopes Insights on — never the workbench id // itself and never the bench's root tenant. -import type { Workbench } from "@corbits/chat-ui"; +import type { Workbench } from "@/chat"; export type LibraryWorkbenchScope = { readonly tenantId: string; diff --git a/packages/artifact-ui/src/artifact-card.tsx b/apps/web/src/library/artifact-card.tsx similarity index 97% rename from packages/artifact-ui/src/artifact-card.tsx rename to apps/web/src/library/artifact-card.tsx index 80ee81f275..91dcb1ee96 100644 --- a/packages/artifact-ui/src/artifact-card.tsx +++ b/apps/web/src/library/artifact-card.tsx @@ -5,7 +5,7 @@ import { Badge, artifactKindLabel, formatRelativeTime } from "@corbits/react-ui"; import type { ReactNode } from "react"; -import type { ArtifactSummary } from "./types"; +import type { ArtifactSummary } from "@corbits/artifact-ui/types"; export type ArtifactCardMeta = { readonly sourceChannel?: string | null; diff --git a/packages/artifact-ui/src/artifact-renderer.tsx b/apps/web/src/library/artifact-renderer.tsx similarity index 99% rename from packages/artifact-ui/src/artifact-renderer.tsx rename to apps/web/src/library/artifact-renderer.tsx index 96ad936d6a..ec4fb9c19a 100644 --- a/packages/artifact-ui/src/artifact-renderer.tsx +++ b/apps/web/src/library/artifact-renderer.tsx @@ -8,7 +8,7 @@ // multiplayer-editing half is substrate to build on top of this. import { CsvTable } from "@corbits/react-ui"; -import { FileDashed } from "@corbits/icons"; +import { FileDashed } from "@/lib/icons"; import type { ArtifactRendererKind } from "./renderer-kind"; export type ArtifactRenderProps = { diff --git a/packages/artifact-ui/src/artifact-text-editor.tsx b/apps/web/src/library/artifact-text-editor.tsx similarity index 100% rename from packages/artifact-ui/src/artifact-text-editor.tsx rename to apps/web/src/library/artifact-text-editor.tsx diff --git a/packages/artifact-ui/src/index.ts b/apps/web/src/library/index.ts similarity index 86% rename from packages/artifact-ui/src/index.ts rename to apps/web/src/library/index.ts index 09e9408926..bae14b6b83 100644 --- a/packages/artifact-ui/src/index.ts +++ b/apps/web/src/library/index.ts @@ -1,4 +1,4 @@ -export * from "./types"; +export * from "@corbits/artifact-ui/types"; export { sortArtifacts, filterArtifacts } from "./sort-filter"; export type { ArtifactSort } from "./sort-filter"; export { ArtifactCard } from "./artifact-card"; @@ -9,8 +9,8 @@ export { libraryKindSegmentFromPath, libraryArtifactPath, libraryArtifactIdFromPath, -} from "./kind-filter"; -export type { LibraryKindSegment } from "./kind-filter"; +} from "@corbits/artifact-ui/kind-filter"; +export type { LibraryKindSegment } from "@corbits/artifact-ui/kind-filter"; export { workflowRunIdFromSource } from "./provenance"; export { ARTIFACT_RENDERER_KINDS, diff --git a/packages/artifact-ui/src/provenance.test.ts b/apps/web/src/library/provenance.test.ts similarity index 100% rename from packages/artifact-ui/src/provenance.test.ts rename to apps/web/src/library/provenance.test.ts diff --git a/packages/artifact-ui/src/provenance.ts b/apps/web/src/library/provenance.ts similarity index 100% rename from packages/artifact-ui/src/provenance.ts rename to apps/web/src/library/provenance.ts diff --git a/packages/artifact-ui/src/renderer-kind.test.ts b/apps/web/src/library/renderer-kind.test.ts similarity index 100% rename from packages/artifact-ui/src/renderer-kind.test.ts rename to apps/web/src/library/renderer-kind.test.ts diff --git a/packages/artifact-ui/src/renderer-kind.ts b/apps/web/src/library/renderer-kind.ts similarity index 97% rename from packages/artifact-ui/src/renderer-kind.ts rename to apps/web/src/library/renderer-kind.ts index 985b3aec50..e50062f847 100644 --- a/packages/artifact-ui/src/renderer-kind.ts +++ b/apps/web/src/library/renderer-kind.ts @@ -4,7 +4,7 @@ // the renderer itself never has to know whether it was picked by a Library // `kind` string or a chat `Part`'s MIME type. -import { titleExtension } from "./title-extension"; +import { titleExtension } from "@corbits/artifact-ui/title-extension"; export const ARTIFACT_RENDERER_KINDS = ["doc", "sheet", "pdf", "html", "unsupported"] as const; diff --git a/packages/artifact-ui/src/save-state.test.ts b/apps/web/src/library/save-state.test.ts similarity index 100% rename from packages/artifact-ui/src/save-state.test.ts rename to apps/web/src/library/save-state.test.ts diff --git a/packages/artifact-ui/src/save-state.ts b/apps/web/src/library/save-state.ts similarity index 100% rename from packages/artifact-ui/src/save-state.ts rename to apps/web/src/library/save-state.ts diff --git a/packages/artifact-ui/src/sort-filter.ts b/apps/web/src/library/sort-filter.ts similarity index 93% rename from packages/artifact-ui/src/sort-filter.ts rename to apps/web/src/library/sort-filter.ts index af51708d1e..0e953f7420 100644 --- a/packages/artifact-ui/src/sort-filter.ts +++ b/apps/web/src/library/sort-filter.ts @@ -1,4 +1,4 @@ -import type { ArtifactSummary } from "./types"; +import type { ArtifactSummary } from "@corbits/artifact-ui/types"; export type ArtifactSort = "newest" | "oldest"; diff --git a/apps/web/src/main.tsx b/apps/web/src/main.tsx index 856d00aeb0..58f61df7df 100644 --- a/apps/web/src/main.tsx +++ b/apps/web/src/main.tsx @@ -6,7 +6,7 @@ import { ThemeProvider, Toaster, toast } from "@corbits/react-ui"; import { StrictMode, useCallback, useEffect, useState } from "react"; import { createRoot } from "react-dom/client"; -import { getLogger } from "@corbits/client-log"; +import { getLogger } from "@/lib/client-log"; import { AppErrorBoundary } from "./app-error-boundary"; import { App } from "./app"; import { validatedNextPath } from "./login-next"; diff --git a/apps/web/src/myra-workbench.ts b/apps/web/src/myra-workbench.ts index 9bb8db431f..7e7118ebed 100644 --- a/apps/web/src/myra-workbench.ts +++ b/apps/web/src/myra-workbench.ts @@ -1,9 +1,9 @@ // Default Myra chat: the product land surface. Composition only — the -// find-or-create logic itself is `@corbits/chat-ui`'s generic +// find-or-create logic itself is `@/chat`'s generic // `createDefaultAgentWorkbench`; this file's job is to name Myra as the // configured agent and wire it to this app's agent-definitions fetch. -import { createDefaultAgentWorkbench, findDefinitionByAssetName } from "@corbits/chat-ui"; +import { createDefaultAgentWorkbench, findDefinitionByAssetName } from "@/chat"; import { WORKFLOW_CATALOG } from "@corbits/workflows/catalog"; import { listAgentDefinitions, type AgentDefinition } from "./agents-api"; @@ -18,7 +18,7 @@ const MYRA_ASSET_NAME = WORKFLOW_CATALOG.find( (entry) => entry.displayName === MYRA_WORKBENCH_TITLE, )?.assetName; -export type { EnsureDefaultAgentWorkbenchResult as EnsureMyraWorkbenchResult } from "@corbits/chat-ui"; +export type { EnsureDefaultAgentWorkbenchResult as EnsureMyraWorkbenchResult } from "@/chat"; const myraWorkbench = createDefaultAgentWorkbench({ title: MYRA_WORKBENCH_TITLE, diff --git a/apps/web/src/onboarding/provider-connect-step.tsx b/apps/web/src/onboarding/provider-connect-step.tsx index ae95b6a1d1..8c17215783 100644 --- a/apps/web/src/onboarding/provider-connect-step.tsx +++ b/apps/web/src/onboarding/provider-connect-step.tsx @@ -1,6 +1,6 @@ // The credential + model-offering step this onboarding page runs before // installing Myra: connects a provider credential through the -// stock native credentials/providers routes (`@corbits/inference-settings`' +// stock native credentials/providers routes (`@/settings/inference`' // `shadowOffering`), then derives the exactly-one offering it mints into // `sourceOfferingIds`/`defaultSourceOfferingId` — no separate offering // picker, because a freshly connected provider names exactly one model. @@ -8,7 +8,7 @@ // an earlier run of this same step) skips this UI entirely: see // `resolveExistingOffering` in `onboarding-page.tsx`. import { Button, Input, RadioGroup, RadioOption } from "@corbits/react-ui"; -import { getResolvedCatalog, shadowOffering } from "@corbits/inference-settings"; +import { getResolvedCatalog, shadowOffering } from "@/settings/inference"; import { reportError } from "@corbits/error-sink"; import { useState } from "react"; import type { FormEvent } from "react"; diff --git a/apps/web/src/pages/agent-detail-page.tsx b/apps/web/src/pages/agent-detail-page.tsx index e83db78e02..290e969686 100644 --- a/apps/web/src/pages/agent-detail-page.tsx +++ b/apps/web/src/pages/agent-detail-page.tsx @@ -53,12 +53,12 @@ import { Textarea, } from "@corbits/react-ui"; import type { BadgeTone } from "@corbits/react-ui"; -import { Copy, Robot } from "@corbits/icons"; +import { Copy, Robot } from "@/lib/icons"; import { useEffect, useState, type ReactNode } from "react"; import { useQueryClient } from "@tanstack/react-query"; -import { ApiQueryError, describeApiError, QueryView } from "@corbits/api-query"; -import { slugify } from "@corbits/slug"; +import { ApiQueryError, describeApiError, QueryView } from "@/lib/api-query"; +import { slugify } from "@/lib/slug"; import type { AgentDefinition, diff --git a/apps/web/src/pages/agent-skills-picker.tsx b/apps/web/src/pages/agent-skills-picker.tsx index c24f7ef465..e1d2c48d4b 100644 --- a/apps/web/src/pages/agent-skills-picker.tsx +++ b/apps/web/src/pages/agent-skills-picker.tsx @@ -7,7 +7,7 @@ // yet", because attaching nothing because the read failed and attaching // nothing because there is nothing are very different outcomes. -import { WorkbenchLoadingState } from "@corbits/chat-ui"; +import { WorkbenchLoadingState } from "@/chat"; import { Button, Checkbox } from "@corbits/react-ui"; import { useEffect, useState } from "react"; diff --git a/apps/web/src/pages/agents-page.tsx b/apps/web/src/pages/agents-page.tsx index a809bb38d3..7ff750170c 100644 --- a/apps/web/src/pages/agents-page.tsx +++ b/apps/web/src/pages/agents-page.tsx @@ -5,7 +5,7 @@ // Assistant editor reads). Create runs through `CreateAgentPanel`, the // same `createAgentDefinition` (`@corbits/agent-directory`) call the // per-workbench Assistant tab uses. Editing instructions/capabilities -// stays there (`@corbits/chat-ui`'s `AgentsSection`) — this page is +// stays there (`@/chat`'s `AgentsSection`) — this page is // roster-only, never a second instructions editor. import { @@ -27,12 +27,12 @@ import { useListSelection, } from "@corbits/react-ui"; import type { BadgeTone, SelectionCheckboxState } from "@corbits/react-ui"; -import { Archive, ArrowSquareOut, Plus, Robot } from "@corbits/icons"; -import { detailPath } from "@corbits/command-palette"; +import { Archive, ArrowSquareOut, Plus, Robot } from "@/lib/icons"; +import { detailPath } from "@/command-palette"; import { useEffect, useMemo, useState } from "react"; import { useQuery, useQueryClient } from "@tanstack/react-query"; -import { describeApiError, QueryView } from "@corbits/api-query"; +import { describeApiError, QueryView } from "@/lib/api-query"; import { getAgentCapabilities, diff --git a/apps/web/src/pages/chat-page.tsx b/apps/web/src/pages/chat-page.tsx index d8f7447f0e..9db180586f 100644 --- a/apps/web/src/pages/chat-page.tsx +++ b/apps/web/src/pages/chat-page.tsx @@ -3,13 +3,10 @@ // Canvas stays auxiliary (profiles and similar) and opens on demand from // this workspace. -import { libraryArtifactPath } from "@corbits/artifact-ui"; -import { describeApiError } from "@corbits/api-query"; -import { ChatWorkspace, fetchWorkbenchBlob, type Part } from "@corbits/chat-ui"; -import { - getResolvedCatalog, - hasUsableModel as computeHasUsableModel, -} from "@corbits/inference-settings"; +import { libraryArtifactPath } from "@/library"; +import { describeApiError } from "@/lib/api-query"; +import { ChatWorkspace, fetchWorkbenchBlob, type Part } from "@/chat"; +import { getResolvedCatalog, hasUsableModel as computeHasUsableModel } from "@/settings/inference"; import { useQuery, useQueryClient } from "@tanstack/react-query"; import { useCallback, useEffect, useMemo } from "react"; diff --git a/apps/web/src/pages/create-agent-panel.tsx b/apps/web/src/pages/create-agent-panel.tsx index 0c6857c767..91a4ae76c9 100644 --- a/apps/web/src/pages/create-agent-panel.tsx +++ b/apps/web/src/pages/create-agent-panel.tsx @@ -43,25 +43,20 @@ import { } from "@corbits/react-ui"; import type { IntakeField } from "@corbits/react-ui"; import { useEffect, useState } from "react"; -import { - AVATAR_COLORS, - avatarColorClass, - CORBIT_DEFAULT_COLOR, - CorbitAvatar, -} from "@corbits/chat-ui"; -import type { AvatarColor } from "@corbits/chat-ui"; +import { AVATAR_COLORS, avatarColorClass, CORBIT_DEFAULT_COLOR, CorbitAvatar } from "@/chat"; +import type { AvatarColor } from "@/chat"; -import { ApiQueryError } from "@corbits/api-query"; +import { ApiQueryError } from "@/lib/api-query"; import type { AgentDefinition, CatalogModel } from "../agents-api"; import { createAgentDefinition, draftAgentDefinition, listCatalogModels } from "../agents-api"; -import { isValidSlug, slugify } from "@corbits/slug"; +import { isValidSlug, slugify } from "@/lib/slug"; import { AgentSkillsPicker } from "./agent-skills-picker"; // A handle IS the agent's slug — the immutable name `/agents/` is // addressed by (DESIGN.md → Detail Pages). Minting and validating it through -// `@corbits/slug` rather than a local regex and a local slugify is what keeps +// `@/lib/slug` rather than a local regex and a local slugify is what keeps // that true: one implementation, so a handle suggested or accepted here can // never be a shape the router refuses to resolve. diff --git a/apps/web/src/pages/diff-view.tsx b/apps/web/src/pages/diff-view.tsx index 47a8be934e..3cba1b8172 100644 --- a/apps/web/src/pages/diff-view.tsx +++ b/apps/web/src/pages/diff-view.tsx @@ -1,13 +1,13 @@ // One diff renderer for every surface that shows "what changed": the // save-confirmation step and the version comparison on a detail page both // mount this, so a diff always reads the same way. The line script comes -// from `@corbits/text-diff`; this file is only its presentation, and it +// from `@/lib/text-diff`; this file is only its presentation, and it // computes the script exactly once per render — the change summary is read // off the same result the rows come from. import { Badge, Table, TableBody, TableCell, TableRow } from "@corbits/react-ui"; -import { diffText } from "@corbits/text-diff"; -import type { DiffLine } from "@corbits/text-diff"; +import { diffText } from "@/lib/text-diff"; +import type { DiffLine } from "@/lib/text-diff"; import { useMemo } from "react"; const MARKER: Record = { diff --git a/apps/web/src/pages/home-page.tsx b/apps/web/src/pages/home-page.tsx index fd5134f366..f6f796f3bb 100644 --- a/apps/web/src/pages/home-page.tsx +++ b/apps/web/src/pages/home-page.tsx @@ -25,11 +25,11 @@ // the honest next step (connect a provider) instead of spinning forever. import { Button, EmptyState, PageShell } from "@corbits/react-ui"; -import { Clock, WarningCircle } from "@corbits/icons"; +import { Clock, WarningCircle } from "@/lib/icons"; import { useEffect, useState } from "react"; -import { listAllWorkbenches, WorkbenchLoadingState } from "@corbits/chat-ui"; -import { describeApiError } from "@corbits/api-query"; +import { listAllWorkbenches, WorkbenchLoadingState } from "@/chat"; +import { describeApiError } from "@/lib/api-query"; import { hasActiveCredential } from "../onboarding"; import { listAgentDefinitions } from "../agents-api"; diff --git a/apps/web/src/pages/insights-page-render.test.tsx b/apps/web/src/pages/insights-page-render.test.tsx index 5b8a184ab1..69f5d71230 100644 --- a/apps/web/src/pages/insights-page-render.test.tsx +++ b/apps/web/src/pages/insights-page-render.test.tsx @@ -13,7 +13,7 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import type { APIQuery } from "@corbits/api-query"; +import type { APIQuery } from "@/lib/api-query"; import { InsightsPage } from "./insights-page"; import { BenchContext } from "../bench-context"; diff --git a/apps/web/src/pages/insights-page.tsx b/apps/web/src/pages/insights-page.tsx index 7882bce6e3..b9c1d32487 100644 --- a/apps/web/src/pages/insights-page.tsx +++ b/apps/web/src/pages/insights-page.tsx @@ -26,14 +26,14 @@ import { type BadgeTone, type RunStatus, } from "@corbits/react-ui"; -import { ChartBar } from "@corbits/icons"; +import { ChartBar } from "@/lib/icons"; import { runOutcomeStatus, runStatusLabel, withListingAbandoned } from "@corbits/workflows/client"; import type * as React from "react"; import { useEffect, useState } from "react"; import { workflowRunStatuses, type WorkflowRunStatus } from "@intx/types"; -import { SignedOutNotice, type APIQuery } from "@corbits/api-query"; -import { workbenchesQueryKey, listWorkbenches } from "@corbits/chat-ui"; +import { SignedOutNotice, type APIQuery } from "@/lib/api-query"; +import { workbenchesQueryKey, listWorkbenches } from "@/chat"; import { useBench } from "../bench-context"; import { resolveWorkbenchInsightsScope } from "../insights-workbench-scope"; diff --git a/apps/web/src/pages/library-page.tsx b/apps/web/src/pages/library-page.tsx index 75fcd56434..853d3c00ce 100644 --- a/apps/web/src/pages/library-page.tsx +++ b/apps/web/src/pages/library-page.tsx @@ -33,13 +33,13 @@ import { resolveArtifactRendererKind, sortArtifacts, workflowRunIdFromSource, -} from "@corbits/artifact-ui"; -import type { ArtifactSort, ArtifactSummary } from "@corbits/artifact-ui"; +} from "@/library"; +import type { ArtifactSort, ArtifactSummary } from "@/library"; import { useQueryClient } from "@tanstack/react-query"; -import { ArrowsDownUp, ArrowSquareOut, LinkSimple as LinkIcon, Stack, X } from "@corbits/icons"; +import { ArrowsDownUp, ArrowSquareOut, LinkSimple as LinkIcon, Stack, X } from "@/lib/icons"; import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import type { MouseEvent as ReactMouseEvent } from "react"; -import { describeApiError, ListSkeleton, QueryView, SignedOutNotice } from "@corbits/api-query"; +import { describeApiError, ListSkeleton, QueryView, SignedOutNotice } from "@/lib/api-query"; import { artifactPreviewPath, diff --git a/apps/web/src/pages/mission-control-page.tsx b/apps/web/src/pages/mission-control-page.tsx index 1af30f79a3..805608d388 100644 --- a/apps/web/src/pages/mission-control-page.tsx +++ b/apps/web/src/pages/mission-control-page.tsx @@ -28,11 +28,11 @@ import { toast, } from "@corbits/react-ui"; import type { BadgeTone } from "@corbits/react-ui"; -import { ChatCircleDots, Plus, Robot } from "@corbits/icons"; +import { ChatCircleDots, Plus, Robot } from "@/lib/icons"; import { useState } from "react"; import { useQueryClient } from "@tanstack/react-query"; -import { CHAT_STRINGS, type Workbench } from "@corbits/chat-ui"; +import { CHAT_STRINGS, type Workbench } from "@/chat"; import { runOutcomeStatus, runStatusLabel, withListingAbandoned } from "@corbits/workflows/client"; import { approveApproval, rejectApproval } from "../api"; diff --git a/apps/web/src/pages/new-workbench-picker.tsx b/apps/web/src/pages/new-workbench-picker.tsx index 4d26eff589..755afea4f7 100644 --- a/apps/web/src/pages/new-workbench-picker.tsx +++ b/apps/web/src/pages/new-workbench-picker.tsx @@ -5,18 +5,18 @@ import { Button, toast } from "@corbits/react-ui"; import { useDismissablePopover } from "@corbits/react-ui/hooks/use-dismissable-popover"; -import { PaperPlaneRight } from "@corbits/icons"; +import { PaperPlaneRight } from "@/lib/icons"; import { ChatApiError, CHAT_STRINGS, describeChatError, listTenantInvitableDefinitions, WorkbenchLoadingState, -} from "@corbits/chat-ui"; -import { humanizeSlug } from "@corbits/chat-ui/wire/display-name"; +} from "@/chat"; +import { humanizeSlug } from "@/chat/wire/display-name"; import { useEffect, useRef, useState } from "react"; import { useQuery, useQueryClient } from "@tanstack/react-query"; -import { ApiQueryError, describeApiError } from "@corbits/api-query"; +import { ApiQueryError, describeApiError } from "@/lib/api-query"; import { reportError } from "@corbits/error-sink"; import { CreateAgentPanel } from "./create-agent-panel"; diff --git a/apps/web/src/pages/not-found-page.tsx b/apps/web/src/pages/not-found-page.tsx index ba6caafdbc..2dfb8364a0 100644 --- a/apps/web/src/pages/not-found-page.tsx +++ b/apps/web/src/pages/not-found-page.tsx @@ -1,5 +1,5 @@ import { Button, EmptyState, PageShell } from "@corbits/react-ui"; -import { Compass } from "@corbits/icons"; +import { Compass } from "@/lib/icons"; import { Link } from "../navigation"; diff --git a/apps/web/src/pages/onboarding-page.tsx b/apps/web/src/pages/onboarding-page.tsx index 2be66fb256..8c68b88aae 100644 --- a/apps/web/src/pages/onboarding-page.tsx +++ b/apps/web/src/pages/onboarding-page.tsx @@ -19,8 +19,8 @@ // not anticipate, or a hard failure at any step, renders here with a // retry — a gap is not "ready". import { Button, EmptyState } from "@corbits/react-ui"; -import { WarningCircle } from "@corbits/icons"; -import { WorkbenchLoadingState } from "@corbits/chat-ui"; +import { WarningCircle } from "@/lib/icons"; +import { WorkbenchLoadingState } from "@/chat"; import { useCallback, useEffect, useState } from "react"; import { ensurePrimaryTenant, runPortableClientBootstrap } from "../client-bootstrap"; diff --git a/apps/web/src/pages/plugins-page.tsx b/apps/web/src/pages/plugins-page.tsx index 403395a0cd..08dc376319 100644 --- a/apps/web/src/pages/plugins-page.tsx +++ b/apps/web/src/pages/plugins-page.tsx @@ -1,6 +1,6 @@ // The Plugins gallery route — a thin composition, same shape as // `library-page.tsx`: page-level data fetching and wiring live here, -// presentation lives in `@corbits/plugins-ui`. This page reads the +// presentation lives in `@/tools`. This page reads the // currently selected bench tenant the same way every other Settings // surface does (`useBench().selectedTenantId`) — the owner's "PARENT // (account/root) tenant" framing maps onto whichever tenant that is: the @@ -15,18 +15,18 @@ // uses. Mutations live there; this gallery never mounts a twin editor. import { Button, PageShell, RichEmptyState } from "@corbits/react-ui"; -import { WorkbenchLoadingState } from "@corbits/chat-ui"; +import { WorkbenchLoadingState } from "@/chat"; import { PluginsGallery, PluginConnectPanel, type PluginsGalleryTab, type PluginPanelSubject, -} from "@corbits/plugins-ui"; +} from "@/tools"; import type { ResolvedPlugin } from "@corbits/connections/plugins"; import { listPluginsForTenant } from "@corbits/connections/plugins"; import { CONNECTOR_REGISTRY } from "@corbits/connections/registry"; import { MCP_PRESETS } from "@corbits/connections/mcp-presets"; -import { Plus, SquaresFour, Warning } from "@corbits/icons"; +import { Plus, SquaresFour, Warning } from "@/lib/icons"; import { useCallback, useEffect, useRef, useState } from "react"; import { useBench } from "../bench-context"; diff --git a/apps/web/src/pages/provisioning-error-page.tsx b/apps/web/src/pages/provisioning-error-page.tsx index ffed077d26..7d448618d1 100644 --- a/apps/web/src/pages/provisioning-error-page.tsx +++ b/apps/web/src/pages/provisioning-error-page.tsx @@ -4,7 +4,7 @@ // whole shell rather than a toast a user could miss or dismiss past. import { Button, EmptyState, PageShell } from "@corbits/react-ui"; -import { WarningCircle } from "@corbits/icons"; +import { WarningCircle } from "@/lib/icons"; export function ProvisioningErrorPage({ message, diff --git a/apps/web/src/pages/routines-page.tsx b/apps/web/src/pages/routines-page.tsx index 0b1ca6b03c..dbb2ab11d5 100644 --- a/apps/web/src/pages/routines-page.tsx +++ b/apps/web/src/pages/routines-page.tsx @@ -18,7 +18,7 @@ import { TableHeader, TableRow, } from "@corbits/react-ui"; -import { Clock } from "@corbits/icons"; +import { Clock } from "@/lib/icons"; import { cronSentence } from "@corbits/workflows/client"; import { useGlobalRoutines, useRoutineActions } from "../global-routines"; diff --git a/apps/web/src/pages/settings-nav.tsx b/apps/web/src/pages/settings-nav.tsx index 0cb2bd8e83..6747d9f479 100644 --- a/apps/web/src/pages/settings-nav.tsx +++ b/apps/web/src/pages/settings-nav.tsx @@ -1,12 +1,12 @@ // Settings section nav: the master list of the settings surface, rendered // inside the stage beside the active section (master-detail — the list is // never repeated in the section panel). Grouping, gating, and icons come -// from `@corbits/settings-ui`'s section registry +// from `@/settings`'s section registry // (`resolveSettingsSectionGroups`); this component only adapts the app's // scope context and router around it. import { SidebarItemRow } from "@corbits/react-ui"; -import { SETTINGS_STRINGS } from "@corbits/settings-ui"; +import { SETTINGS_STRINGS } from "@/settings"; import { useBench } from "../bench-context"; import { SETTINGS_PATH_PREFIX, settingsSectionIdFromPath } from "../path-ids"; diff --git a/apps/web/src/pages/settings-page.tsx b/apps/web/src/pages/settings-page.tsx index 3d0b5799c9..feb04ddf56 100644 --- a/apps/web/src/pages/settings-page.tsx +++ b/apps/web/src/pages/settings-page.tsx @@ -1,4 +1,4 @@ -// Thin mount of `@corbits/settings-ui`'s shell: the package owns the section +// Thin mount of `@/settings`'s shell: the package owns the section // registry (Account / Everyone groups, icons, tenancy gates — see // `resolveSettingsSectionGroups`); this file only adapts the app's // bench-selection state (see ../bench-context.tsx) and the URL into the @@ -7,7 +7,7 @@ // renders here in the stage, beside the active section (`settings-nav.tsx`) // — master-detail, the list is never repeated in the section panel. -import { flattenSettingsSections, resolveActiveSection, SettingsShell } from "@corbits/settings-ui"; +import { flattenSettingsSections, resolveActiveSection, SettingsShell } from "@/settings"; import { PageShell } from "@corbits/react-ui"; import { useEffect } from "react"; diff --git a/apps/web/src/pages/skill-detail-page.tsx b/apps/web/src/pages/skill-detail-page.tsx index 618aba2d37..91bbfce764 100644 --- a/apps/web/src/pages/skill-detail-page.tsx +++ b/apps/web/src/pages/skill-detail-page.tsx @@ -14,9 +14,9 @@ // stock routes actually carry until one exists — see the PR body // for the gap. import { PageShell, RichEmptyState, Section, formatRelativeTime } from "@corbits/react-ui"; -import { Lightning } from "@corbits/icons"; -import { WorkbenchLoadingState } from "@corbits/chat-ui"; -import { ApiQueryError, describeApiError } from "@corbits/api-query"; +import { Lightning } from "@/lib/icons"; +import { WorkbenchLoadingState } from "@/chat"; +import { ApiQueryError, describeApiError } from "@/lib/api-query"; import { useCallback, useEffect, useState, type ReactNode } from "react"; import { useBench } from "../bench-context"; diff --git a/apps/web/src/pages/skills-page.tsx b/apps/web/src/pages/skills-page.tsx index e51abc6c37..3c96555d3c 100644 --- a/apps/web/src/pages/skills-page.tsx +++ b/apps/web/src/pages/skills-page.tsx @@ -27,8 +27,8 @@ import { TableHeader, TableRow, } from "@corbits/react-ui"; -import { Lightning, Plus } from "@corbits/icons"; -import { WorkbenchLoadingState } from "@corbits/chat-ui"; +import { Lightning, Plus } from "@/lib/icons"; +import { WorkbenchLoadingState } from "@/chat"; import { useCallback, useEffect, useState, type ReactNode } from "react"; import { rowActivationProps } from "../activatable-row"; diff --git a/apps/web/src/pages/workbench-timeline.tsx b/apps/web/src/pages/workbench-timeline.tsx index 1ff15783f9..016fa52398 100644 --- a/apps/web/src/pages/workbench-timeline.tsx +++ b/apps/web/src/pages/workbench-timeline.tsx @@ -6,8 +6,8 @@ // `../workbench-timeline-merge.ts`'s pure merge, plus this render. import { Badge, RichEmptyState, Skeleton } from "@corbits/react-ui"; -import { listMessages, listThreads } from "@corbits/chat-ui"; -import { Clock } from "@corbits/icons"; +import { listMessages, listThreads } from "@/chat"; +import { Clock } from "@/lib/icons"; import { useMemo, useState } from "react"; import { usePendingApprovals } from "../pending-approvals"; diff --git a/apps/web/src/pages/workflow-detail-page.tsx b/apps/web/src/pages/workflow-detail-page.tsx index 3efc075a2d..202741346c 100644 --- a/apps/web/src/pages/workflow-detail-page.tsx +++ b/apps/web/src/pages/workflow-detail-page.tsx @@ -4,7 +4,7 @@ // and timestamps, so this renders exactly that. import { Badge, EmptyState, PageShell } from "@corbits/react-ui"; import type { BadgeTone } from "@corbits/react-ui"; -import { Clock, FlowArrow } from "@corbits/icons"; +import { Clock, FlowArrow } from "@/lib/icons"; import { useBench } from "../bench-context"; import { WORKFLOWS_PATH_PREFIX, workflowDefinitionAssetIdFromPath } from "../path-ids"; diff --git a/apps/web/src/path-ids.ts b/apps/web/src/path-ids.ts index a12ecdbcb0..add732a41a 100644 --- a/apps/web/src/path-ids.ts +++ b/apps/web/src/path-ids.ts @@ -7,7 +7,7 @@ // `/agents/:id` and `/skills/:id`, via `agentIdFromPath`/`skillIdFromPath` // below. -import { isValidSlug, type Slug } from "@corbits/slug"; +import { isValidSlug, type Slug } from "@/lib/slug"; import { decodedOrNull } from "@corbits/url-path"; export const SETTINGS_PATH_PREFIX = "/settings"; diff --git a/apps/web/src/pending-approvals.ts b/apps/web/src/pending-approvals.ts index 0d2a45a24d..986b433e14 100644 --- a/apps/web/src/pending-approvals.ts +++ b/apps/web/src/pending-approvals.ts @@ -11,7 +11,7 @@ import { ApprovalResponse, WorkflowRunResponse } from "@intx/types"; import { useQueries } from "@tanstack/react-query"; import { type } from "arktype"; -import type { APIQuery } from "@corbits/api-query"; +import type { APIQuery } from "@/lib/api-query"; import { headlineFor } from "@corbits/approvals/headline"; import { TenantApprovalsSchema, useAPIQuery } from "./api"; diff --git a/apps/web/src/profile-relations.test.ts b/apps/web/src/profile-relations.test.ts index 65cca3af99..3a8c2d73e3 100644 --- a/apps/web/src/profile-relations.test.ts +++ b/apps/web/src/profile-relations.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from "bun:test"; -import type { ProfileSubject } from "@corbits/chat-ui"; +import type { ProfileSubject } from "@/chat"; import { dmCreateInputFor } from "./profile-relations"; diff --git a/apps/web/src/profile-relations.ts b/apps/web/src/profile-relations.ts index 281d05300f..2a56250f25 100644 --- a/apps/web/src/profile-relations.ts +++ b/apps/web/src/profile-relations.ts @@ -4,7 +4,7 @@ // participant instead of by a fixed title, and fall back to creating one — // to any profile subject rather than one hardcoded agent. -import { localPartOf } from "@corbits/chat-ui/wire/agent-address"; +import { localPartOf } from "@/chat/wire/agent-address"; import { createWorkbench, findDirectWorkbenchWith, @@ -13,7 +13,7 @@ import { type CreateWorkbenchInput, type ProfileSubject, type SharedWorkbenchSummary, -} from "@corbits/chat-ui"; +} from "@/chat"; import { listAgentInstances } from "./agents-api"; diff --git a/apps/web/src/query-client.test.ts b/apps/web/src/query-client.test.ts index e61b213110..d8c8bb4a02 100644 --- a/apps/web/src/query-client.test.ts +++ b/apps/web/src/query-client.test.ts @@ -1,7 +1,7 @@ import { describe, expect, mock, test } from "bun:test"; import { QueryClient } from "@tanstack/react-query"; -import { ApiQueryError, UnauthenticatedError } from "@corbits/api-query"; +import { ApiQueryError, UnauthenticatedError } from "@/lib/api-query"; import { createAppQueryClient, diff --git a/apps/web/src/query-client.ts b/apps/web/src/query-client.ts index d9f25a08c8..e41c61ad35 100644 --- a/apps/web/src/query-client.ts +++ b/apps/web/src/query-client.ts @@ -4,9 +4,9 @@ import { MutationCache, QueryCache, QueryClient } from "@tanstack/react-query"; -import { ApiQueryError, UnauthenticatedError } from "@corbits/api-query"; -import { workbenchesQueryKey } from "@corbits/chat-ui"; -import type { WorkbenchKind } from "@corbits/chat-ui"; +import { ApiQueryError, UnauthenticatedError } from "@/lib/api-query"; +import { workbenchesQueryKey } from "@/chat"; +import type { WorkbenchKind } from "@/chat"; /** * Retry policy shared by every query in the app: no session and a @@ -107,7 +107,7 @@ export const tenantKeys = { * subtrees — share one cached probe instead of each firing its own. */ settingsAccess: (tenantId: string, principalId: string) => ["tenant", tenantId, "settings-access", principalId] as const, - /** Delegates to `@corbits/chat-ui`'s own key builder — that package owns + /** Delegates to `@/chat`'s own key builder — that package owns * both the workbenches endpoint and `WorkbenchKind`, so this is the one array * shape every workbench-listing surface (bench-activity, command palette, * the Routines picker, `ChatWorkspace`'s own sidebar) keys against, diff --git a/apps/web/src/routes.tsx b/apps/web/src/routes.tsx index 0337bd464c..418a94b140 100644 --- a/apps/web/src/routes.tsx +++ b/apps/web/src/routes.tsx @@ -27,9 +27,9 @@ import { Robot, SlidersHorizontal, SquaresFour, -} from "@corbits/icons"; -import { CHAT_STRINGS } from "@corbits/chat-ui"; -import type { Slug } from "@corbits/slug"; +} from "@/lib/icons"; +import { CHAT_STRINGS } from "@/chat"; +import type { Slug } from "@/lib/slug"; import { lazy, useEffect, type ReactElement, type ReactNode } from "react"; import { diff --git a/apps/web/src/routines-api.ts b/apps/web/src/routines-api.ts index 9dcc31761e..45d23cd3db 100644 --- a/apps/web/src/routines-api.ts +++ b/apps/web/src/routines-api.ts @@ -20,8 +20,8 @@ import { type } from "arktype"; import { useQuery } from "@tanstack/react-query"; -import type { APIQuery } from "@corbits/api-query"; -import { ApiQueryError, UnauthenticatedError, toAPIQuery } from "@corbits/api-query"; +import type { APIQuery } from "@/lib/api-query"; +import { ApiQueryError, UnauthenticatedError, toAPIQuery } from "@/lib/api-query"; import { setAgentDefinitionStatus } from "./agents-api"; diff --git a/apps/web/src/settings-access.ts b/apps/web/src/settings-access.ts index 6b5f61ed4f..e882495656 100644 --- a/apps/web/src/settings-access.ts +++ b/apps/web/src/settings-access.ts @@ -1,14 +1,14 @@ // Settings section-nav gating, deduplicated: col2's nav band and the // settings stage both mount independently and both need the same four // tenancy probes (People/Roles/Grants/Credentials). Riding the app's shared -// QueryClient — instead of each mount calling `@corbits/settings-ui`'s bare +// QueryClient — instead of each mount calling `@/settings`'s bare // `useTenancyAccess`, which fetches on every mount with no cache — means // two mounted consumers share one in-flight request and one cached result. // The package stays free of TanStack Query: this only injects the // package's probe into the app's cache, the package never imports Query. -import { coalesceSectionAccess, probeSectionAccess } from "@corbits/settings-ui"; -import type { TenancyAccess } from "@corbits/settings-ui"; +import { coalesceSectionAccess, probeSectionAccess } from "@/settings"; +import type { TenancyAccess } from "@/settings"; import { useQuery, useQueryClient } from "@tanstack/react-query"; import { tenantKeys } from "./query-client"; @@ -35,7 +35,7 @@ function coalesceTenancyAccess( /** One shared probe per (tenant, principal), not one per mounted consumer. * `null` ids report `loading` — the same "not shown yet, never disabled" - * contract `@corbits/settings-ui`'s own hook holds. A thrown evaluate + * contract `@/settings`'s own hook holds. A thrown evaluate * (network/5xx) is `error`, not `denied`; a refetch failure keeps the * last allow/deny so gated nav does not vanish as if unauthorized. */ export function useSettingsAccess( diff --git a/apps/web/src/settings-groups.ts b/apps/web/src/settings-groups.ts index 852143df68..e38a63d9f1 100644 --- a/apps/web/src/settings-groups.ts +++ b/apps/web/src/settings-groups.ts @@ -7,8 +7,8 @@ // directly, so the two can never drift if this app ever splices something // else in again. -import { resolveSettingsSectionGroups } from "@corbits/settings-ui"; -import type { SettingsSectionGroup, TenancyAccess } from "@corbits/settings-ui"; +import { resolveSettingsSectionGroups } from "@/settings"; +import type { SettingsSectionGroup, TenancyAccess } from "@/settings"; export function resolveAppSettingsSectionGroups( access: TenancyAccess, diff --git a/packages/settings-ui/src/access.ts b/apps/web/src/settings/access.ts similarity index 100% rename from packages/settings-ui/src/access.ts rename to apps/web/src/settings/access.ts diff --git a/packages/settings-ui/src/account-section.tsx b/apps/web/src/settings/account-section.tsx similarity index 97% rename from packages/settings-ui/src/account-section.tsx rename to apps/web/src/settings/account-section.tsx index ddb111f4da..7e99777466 100644 --- a/packages/settings-ui/src/account-section.tsx +++ b/apps/web/src/settings/account-section.tsx @@ -17,12 +17,12 @@ import { useTheme, } from "@corbits/react-ui"; import { Select } from "@corbits/react-ui/ui/select"; -import { Copy, SignOut } from "@corbits/icons"; +import { Copy, SignOut } from "@/lib/icons"; import { useCallback, useEffect, useState } from "react"; -import type { APIQuery } from "@corbits/api-query"; -import { QueryView, UnauthenticatedError, describeQueryError } from "@corbits/api-query"; -import { resolveAvatarFill } from "@corbits/chat-ui"; +import type { APIQuery } from "@/lib/api-query"; +import { QueryView, UnauthenticatedError, describeQueryError } from "@/lib/api-query"; +import { resolveAvatarFill } from "@/chat"; import { getAccount, type Account } from "./api"; import { SETTINGS_STRINGS } from "./strings"; diff --git a/packages/settings-ui/src/api-request.ts b/apps/web/src/settings/api-request.ts similarity index 100% rename from packages/settings-ui/src/api-request.ts rename to apps/web/src/settings/api-request.ts diff --git a/packages/settings-ui/src/api.ts b/apps/web/src/settings/api.ts similarity index 93% rename from packages/settings-ui/src/api.ts rename to apps/web/src/settings/api.ts index 959256e7da..9ecc63e51e 100644 --- a/packages/settings-ui/src/api.ts +++ b/apps/web/src/settings/api.ts @@ -3,13 +3,13 @@ // `vendor/intx/hub-api/src/routes/tenants.ts`) and reading the signed-in // account's profile (`GET /api/me`). Workbench settings and bench membership // listings are not reimplemented here — they come straight from -// `@corbits/chat-ui` and `@corbits/bench-ui`, the packages that already own +// `@/chat` and `@/bench`, the packages that already own // those seams. import { type } from "arktype"; import type { ArkErrors } from "arktype"; import { TenantResponse, UserProfile } from "@intx/types"; -import { UnauthenticatedError } from "@corbits/api-query"; +import { UnauthenticatedError } from "@/lib/api-query"; export type Bench = typeof TenantResponse.infer; export type Account = typeof UserProfile.infer; diff --git a/packages/settings-ui/src/audit-section.tsx b/apps/web/src/settings/audit-section.tsx similarity index 100% rename from packages/settings-ui/src/audit-section.tsx rename to apps/web/src/settings/audit-section.tsx diff --git a/packages/settings-ui/src/connections-api.ts b/apps/web/src/settings/connections-api.ts similarity index 100% rename from packages/settings-ui/src/connections-api.ts rename to apps/web/src/settings/connections-api.ts diff --git a/packages/settings-ui/src/connections-pinned-by.test.ts b/apps/web/src/settings/connections-pinned-by.test.ts similarity index 100% rename from packages/settings-ui/src/connections-pinned-by.test.ts rename to apps/web/src/settings/connections-pinned-by.test.ts diff --git a/packages/settings-ui/src/connections-pinned-by.ts b/apps/web/src/settings/connections-pinned-by.ts similarity index 100% rename from packages/settings-ui/src/connections-pinned-by.ts rename to apps/web/src/settings/connections-pinned-by.ts diff --git a/packages/settings-ui/src/connections-section.tsx b/apps/web/src/settings/connections-section.tsx similarity index 99% rename from packages/settings-ui/src/connections-section.tsx rename to apps/web/src/settings/connections-section.tsx index aa711690ba..fe1631a3b0 100644 --- a/packages/settings-ui/src/connections-section.tsx +++ b/apps/web/src/settings/connections-section.tsx @@ -37,13 +37,13 @@ import { providerDisplayName, updateOwnOffering, type EffectiveInferenceRow, -} from "@corbits/inference-settings"; +} from "@/settings/inference"; import type { ModelInfo } from "@intx/types"; -import { ArrowDown, ArrowUp, Cpu, Plugs, Robot } from "@corbits/icons"; +import { ArrowDown, ArrowUp, Cpu, Plugs, Robot } from "@/lib/icons"; import { useEffect, useState } from "react"; -import type { APIQuery } from "@corbits/api-query"; -import { QueryView, UnauthenticatedError, describeQueryError } from "@corbits/api-query"; +import type { APIQuery } from "@/lib/api-query"; +import { QueryView, UnauthenticatedError, describeQueryError } from "@/lib/api-query"; import { ConnectionsApiError, completeConnectorCredential, diff --git a/packages/settings-ui/src/connections-status.test.ts b/apps/web/src/settings/connections-status.test.ts similarity index 100% rename from packages/settings-ui/src/connections-status.test.ts rename to apps/web/src/settings/connections-status.test.ts diff --git a/packages/settings-ui/src/connections-status.ts b/apps/web/src/settings/connections-status.ts similarity index 100% rename from packages/settings-ui/src/connections-status.ts rename to apps/web/src/settings/connections-status.ts diff --git a/packages/settings-ui/src/credentials-api.ts b/apps/web/src/settings/credentials-api.ts similarity index 100% rename from packages/settings-ui/src/credentials-api.ts rename to apps/web/src/settings/credentials-api.ts diff --git a/packages/settings-ui/src/granola-webhook-api.ts b/apps/web/src/settings/granola-webhook-api.ts similarity index 100% rename from packages/settings-ui/src/granola-webhook-api.ts rename to apps/web/src/settings/granola-webhook-api.ts diff --git a/packages/settings-ui/src/granola-webhook-card.tsx b/apps/web/src/settings/granola-webhook-card.tsx similarity index 99% rename from packages/settings-ui/src/granola-webhook-card.tsx rename to apps/web/src/settings/granola-webhook-card.tsx index 7d987172eb..f5b97c8ef7 100644 --- a/packages/settings-ui/src/granola-webhook-card.tsx +++ b/apps/web/src/settings/granola-webhook-card.tsx @@ -27,8 +27,8 @@ import { import type { ConnectorDescriptor } from "@corbits/connections/registry"; import { useEffect, useRef, useState } from "react"; -import type { APIQuery } from "@corbits/api-query"; -import { QueryView, UnauthenticatedError, describeQueryError } from "@corbits/api-query"; +import type { APIQuery } from "@/lib/api-query"; +import { QueryView, UnauthenticatedError, describeQueryError } from "@/lib/api-query"; import { createGranolaWebhookTrigger, listGranolaWebhookTriggers, diff --git a/packages/settings-ui/src/grant-preview.ts b/apps/web/src/settings/grant-preview.ts similarity index 100% rename from packages/settings-ui/src/grant-preview.ts rename to apps/web/src/settings/grant-preview.ts diff --git a/packages/settings-ui/src/grants-section.tsx b/apps/web/src/settings/grants-section.tsx similarity index 99% rename from packages/settings-ui/src/grants-section.tsx rename to apps/web/src/settings/grants-section.tsx index 7371dff6a9..28fde53be4 100644 --- a/packages/settings-ui/src/grants-section.tsx +++ b/apps/web/src/settings/grants-section.tsx @@ -30,8 +30,8 @@ import { grantEffects, grantOrigins } from "@intx/types"; import type { GrantEffect, GrantOrigin } from "@intx/types"; import { useEffect, useMemo, useState } from "react"; -import type { APIQuery } from "@corbits/api-query"; -import { QueryView, UnauthenticatedError, describeQueryError } from "@corbits/api-query"; +import type { APIQuery } from "@/lib/api-query"; +import { QueryView, UnauthenticatedError, describeQueryError } from "@/lib/api-query"; import { PRINCIPAL_KIND_LABEL, PRINCIPAL_KIND_ORDER, principalLabel } from "./identity"; import { expiryIsoFromPreset, expiryLabelFromPreset, grantPreviewSentence } from "./grant-preview"; import { KindCards } from "./kind-cards"; diff --git a/packages/settings-ui/src/identity.ts b/apps/web/src/settings/identity.ts similarity index 100% rename from packages/settings-ui/src/identity.ts rename to apps/web/src/settings/identity.ts diff --git a/packages/settings-ui/src/index.ts b/apps/web/src/settings/index.ts similarity index 100% rename from packages/settings-ui/src/index.ts rename to apps/web/src/settings/index.ts diff --git a/packages/inference-settings/src/api.test.ts b/apps/web/src/settings/inference/api.test.ts similarity index 100% rename from packages/inference-settings/src/api.test.ts rename to apps/web/src/settings/inference/api.test.ts diff --git a/packages/inference-settings/src/api.ts b/apps/web/src/settings/inference/api.ts similarity index 100% rename from packages/inference-settings/src/api.ts rename to apps/web/src/settings/inference/api.ts diff --git a/packages/inference-settings/src/effective-list.test.ts b/apps/web/src/settings/inference/effective-list.test.ts similarity index 100% rename from packages/inference-settings/src/effective-list.test.ts rename to apps/web/src/settings/inference/effective-list.test.ts diff --git a/packages/inference-settings/src/effective-list.ts b/apps/web/src/settings/inference/effective-list.ts similarity index 100% rename from packages/inference-settings/src/effective-list.ts rename to apps/web/src/settings/inference/effective-list.ts diff --git a/packages/inference-settings/src/index.ts b/apps/web/src/settings/inference/index.ts similarity index 100% rename from packages/inference-settings/src/index.ts rename to apps/web/src/settings/inference/index.ts diff --git a/packages/inference-settings/src/usable-model.test.ts b/apps/web/src/settings/inference/usable-model.test.ts similarity index 100% rename from packages/inference-settings/src/usable-model.test.ts rename to apps/web/src/settings/inference/usable-model.test.ts diff --git a/packages/inference-settings/src/usable-model.ts b/apps/web/src/settings/inference/usable-model.ts similarity index 100% rename from packages/inference-settings/src/usable-model.ts rename to apps/web/src/settings/inference/usable-model.ts diff --git a/packages/settings-ui/src/kind-cards.tsx b/apps/web/src/settings/kind-cards.tsx similarity index 100% rename from packages/settings-ui/src/kind-cards.tsx rename to apps/web/src/settings/kind-cards.tsx diff --git a/packages/settings-ui/src/notifications-section.tsx b/apps/web/src/settings/notifications-section.tsx similarity index 96% rename from packages/settings-ui/src/notifications-section.tsx rename to apps/web/src/settings/notifications-section.tsx index 1b9313fc34..797bc0565f 100644 --- a/packages/settings-ui/src/notifications-section.tsx +++ b/apps/web/src/settings/notifications-section.tsx @@ -9,11 +9,11 @@ // `SETTINGS_SECTION_GROUPS`'s "account" group only once a per-user // preference store exists for these fields and Save actually persists // them, not before. (Workbench-scoped mute/mentions prefs live on -// `@corbits/chat-ui`'s workbench settings surface and already persist — +// `@/chat`'s workbench settings surface and already persist — // that is a different surface.) import { Button, SettingsPanel } from "@corbits/react-ui"; -import { Check } from "@corbits/icons"; +import { Check } from "@/lib/icons"; import { useState } from "react"; import { SETTINGS_STRINGS } from "./strings"; diff --git a/packages/settings-ui/src/people-section.tsx b/apps/web/src/settings/people-section.tsx similarity index 99% rename from packages/settings-ui/src/people-section.tsx rename to apps/web/src/settings/people-section.tsx index 057ae58a8c..e47f27fc39 100644 --- a/packages/settings-ui/src/people-section.tsx +++ b/apps/web/src/settings/people-section.tsx @@ -22,8 +22,8 @@ import { } from "@corbits/react-ui"; import { useEffect, useState } from "react"; -import type { APIQuery } from "@corbits/api-query"; -import { QueryView, UnauthenticatedError, describeQueryError } from "@corbits/api-query"; +import type { APIQuery } from "@/lib/api-query"; +import { QueryView, UnauthenticatedError, describeQueryError } from "@/lib/api-query"; import { reportError } from "@corbits/error-sink"; import { PRINCIPAL_KIND_LABEL, principalLabel } from "./identity"; diff --git a/packages/settings-ui/src/resource-vocabulary.ts b/apps/web/src/settings/resource-vocabulary.ts similarity index 100% rename from packages/settings-ui/src/resource-vocabulary.ts rename to apps/web/src/settings/resource-vocabulary.ts diff --git a/packages/settings-ui/src/roles-section.tsx b/apps/web/src/settings/roles-section.tsx similarity index 99% rename from packages/settings-ui/src/roles-section.tsx rename to apps/web/src/settings/roles-section.tsx index a11515c9db..67a7b01260 100644 --- a/packages/settings-ui/src/roles-section.tsx +++ b/apps/web/src/settings/roles-section.tsx @@ -26,8 +26,8 @@ import { } from "@corbits/react-ui"; import { useEffect, useState } from "react"; -import type { APIQuery } from "@corbits/api-query"; -import { QueryView, UnauthenticatedError, describeQueryError } from "@corbits/api-query"; +import type { APIQuery } from "@/lib/api-query"; +import { QueryView, UnauthenticatedError, describeQueryError } from "@/lib/api-query"; import { principalLabel } from "./identity"; import { SETTINGS_STRINGS } from "./strings"; import { diff --git a/packages/settings-ui/src/section-registry.tsx b/apps/web/src/settings/section-registry.tsx similarity index 80% rename from packages/settings-ui/src/section-registry.tsx rename to apps/web/src/settings/section-registry.tsx index 8fbe5a0fd1..46fb4a1977 100644 --- a/packages/settings-ui/src/section-registry.tsx +++ b/apps/web/src/settings/section-registry.tsx @@ -1,20 +1,24 @@ -// The Personal Settings / Shared Settings section registry: the grouping, -// ordering, icons, and tenancy gates every Interchange deployment gets -// when it mounts this package's settings surface. There is one workbench -// per account, so a "workspace-scoped" setting and an "account-scoped" -// one are the same tenant's settings. Shared Settings is the -// multiplayer-sharing surface: it leads with what everyone inherits -// (shared keys/connections, then People), and tucks the access-control -// mechanics (Roles, Grants, Audit) under a collapsed Advanced disclosure -// — nobody should have to parse grants and roles just to find where a -// shared API key lives. Conversation-scoped settings (agent, -// capabilities, history) live on the workbench's own settings surface -// (`@corbits/chat-ui`'s `WorkbenchSettingsSurface`) — not here. +// The Personal Settings / Shared Settings section registry: the +// grouping, ordering, icons, and tenancy gates every Interchange +// deployment gets when it mounts this package's settings surface. The +// single-concept collapse folded Personal/Workspace into one account-scoped +// group and one shared group — there is one workbench per account now, so +// a "workspace-scoped" setting and an "account-scoped" one are the same +// tenant's settings. Shared Settings is the multiplayer-sharing surface: +// it leads with what everyone inherits (shared keys/connections, then +// People), and tucks the access-control mechanics (Roles, Grants, Audit) +// under a collapsed Advanced disclosure — nobody should have to parse +// grants and roles just to find where a shared API key lives. Bench dies +// outright — there is no longer a second thing to name, distinct from the +// account, so its rename/purpose/icon form and member list have no home to +// keep them separate in. Conversation-scoped settings (agent, capabilities, +// history) live on the workbench's own settings surface +// (`@/chat`'s `WorkbenchSettingsSurface`) — not here. // Consuming apps compose bench context and routing around // `resolveSettingsSectionGroups` — the domain model of "what settings // exist and who can see them" lives here, not in an app. -import { Key, ListBullets, Shield, Star, User, Users } from "@corbits/icons"; +import { Key, ListBullets, Shield, Star, User, Users } from "@/lib/icons"; import { AccountSection } from "./account-section"; import type { TenancyAccess } from "./access"; @@ -66,8 +70,8 @@ const SETTINGS_SECTION_GROUPS: readonly SettingsSectionGroupDef[] = [ { // Plugins (`/plugins`) is the canonical surface for discovering // and connecting a key; this section is management-only for keys - // that already exist (rotate, name, revoke) — see - // connections-section.tsx. + // that already exist (rotate, name, revoke) — see connections- + // section.tsx and the audit this reorganization follows. // Leads Shared Settings: a key added here is the thing everyone // creating workbenches in this tenancy inherits. id: "connections", diff --git a/packages/settings-ui/src/shell.tsx b/apps/web/src/settings/shell.tsx similarity index 99% rename from packages/settings-ui/src/shell.tsx rename to apps/web/src/settings/shell.tsx index 70b3585639..f68bd4b430 100644 --- a/packages/settings-ui/src/shell.tsx +++ b/apps/web/src/settings/shell.tsx @@ -5,7 +5,7 @@ // section's own `render`, never here. import { EmptyState } from "@corbits/react-ui"; -import type { Icon } from "@corbits/icons"; +import type { Icon } from "@/lib/icons"; import type { ReactElement } from "react"; import { SETTINGS_STRINGS } from "./strings"; diff --git a/packages/settings-ui/src/strings.ts b/apps/web/src/settings/strings.ts similarity index 100% rename from packages/settings-ui/src/strings.ts rename to apps/web/src/settings/strings.ts diff --git a/packages/settings-ui/src/styles.css b/apps/web/src/settings/styles.css similarity index 100% rename from packages/settings-ui/src/styles.css rename to apps/web/src/settings/styles.css diff --git a/packages/settings-ui/src/tenancy-api.ts b/apps/web/src/settings/tenancy-api.ts similarity index 98% rename from packages/settings-ui/src/tenancy-api.ts rename to apps/web/src/settings/tenancy-api.ts index bbb237c9ce..2fc19037b6 100644 --- a/packages/settings-ui/src/tenancy-api.ts +++ b/apps/web/src/settings/tenancy-api.ts @@ -2,7 +2,7 @@ // tenancy routes (see vendor/intx/hub-api/src/routes/{principals,roles, // grants}.ts). Every fetch goes through a function here, and every response // is parsed with an arktype schema from `@intx/types` at the boundary — the -// same convention `@corbits/bench-ui`'s api.ts already holds. +// same convention `@/bench`'s api.ts already holds. import { type } from "arktype"; import type { ArkErrors } from "arktype"; @@ -16,7 +16,7 @@ import { type GrantOrigin, type UpdatablePrincipalStatus, } from "@intx/types"; -import { UnauthenticatedError } from "@corbits/api-query"; +import { UnauthenticatedError } from "@/lib/api-query"; export type Principal = typeof PrincipalResponse.infer; export type Role = typeof RoleResponse.infer; diff --git a/packages/settings-ui/src/webhook-secret-panel.tsx b/apps/web/src/settings/webhook-secret-panel.tsx similarity index 99% rename from packages/settings-ui/src/webhook-secret-panel.tsx rename to apps/web/src/settings/webhook-secret-panel.tsx index df9fcd4e15..6caad23b12 100644 --- a/packages/settings-ui/src/webhook-secret-panel.tsx +++ b/apps/web/src/settings/webhook-secret-panel.tsx @@ -9,7 +9,7 @@ // second hand-rolled copy. import { Button } from "@corbits/react-ui"; -import { Copy } from "@corbits/icons"; +import { Copy } from "@/lib/icons"; import { useEffect, useRef, useState } from "react"; /** Copies `value` to the clipboard, showing "Copied" for 1.5s. */ diff --git a/apps/web/src/shell/app-shell.tsx b/apps/web/src/shell/app-shell.tsx index f3d46840a9..03cbf84e4a 100644 --- a/apps/web/src/shell/app-shell.tsx +++ b/apps/web/src/shell/app-shell.tsx @@ -12,9 +12,9 @@ // already uses. import { lazy, Suspense, useEffect, useRef, useState, type ReactNode } from "react"; -import type { ArtifactSaveState } from "@corbits/artifact-ui"; +import type { ArtifactSaveState } from "@/library"; -import { WorkbenchLoadingState } from "@corbits/chat-ui"; +import { WorkbenchLoadingState } from "@/chat"; import { usePendingApprovalCount } from "../pending-approvals"; import { useBench } from "../bench-context"; @@ -23,7 +23,7 @@ import { saveArtifactContent } from "./library-artifacts"; import { APP_ROUTES, matchesRoute } from "../routes"; import type { SessionUser } from "../session"; import { StageTopBar } from "./stage-top-bar"; -import { useScrollReset } from "@corbits/shell-layout"; +import { useScrollReset } from "@/shell/layout"; import { useCanvasColumnArtifact, useCanvasColumnAvailable, diff --git a/apps/web/src/shell/bench-activity.ts b/apps/web/src/shell/bench-activity.ts index 4aacfb5533..02b44b076e 100644 --- a/apps/web/src/shell/bench-activity.ts +++ b/apps/web/src/shell/bench-activity.ts @@ -1,6 +1,6 @@ // The sidebar's one data source: everything happening in the currently // selected bench right now. Workbenches and chats come from -// `@corbits/chat-ui`'s own validated fetches; running routines come through +// `@/chat`'s own validated fetches; running routines come through // the seam in `./routine-activity.ts`. Notifications have no backing // feature in the hub yet, so they are not fetched here at all — the // column renders an honest empty state for that section instead of a @@ -22,8 +22,8 @@ import { workbenchesQueryKeyPrefix, listWorkbenches, listVisibleAgentDefinitions, -} from "@corbits/chat-ui"; -import type { Workbench, VisibleAgentDefinition } from "@corbits/chat-ui"; +} from "@/chat"; +import type { Workbench, VisibleAgentDefinition } from "@/chat"; import { tenantKeys } from "../query-client"; import { listRoutineActivity } from "./routine-activity"; diff --git a/apps/web/src/shell/canvas-availability.tsx b/apps/web/src/shell/canvas-availability.tsx index 5c06fa7106..c2e00eb2f5 100644 --- a/apps/web/src/shell/canvas-availability.tsx +++ b/apps/web/src/shell/canvas-availability.tsx @@ -5,12 +5,12 @@ // column is actually showing right now. import { createContext, useContext, type ReactNode } from "react"; -import type { ProfileSubject } from "@corbits/chat-ui"; -import type { ArtifactRendererKind } from "@corbits/artifact-ui"; -import type { CanvasColumnState } from "@corbits/shell-layout"; +import type { ProfileSubject } from "@/chat"; +import type { ArtifactRendererKind } from "@/library"; +import type { CanvasColumnState } from "@/shell/layout"; /** The canvas's typed-artifact pane: a title, the already-resolved - * renderer selection (see `@corbits/artifact-ui`'s `resolveArtifactRendererKind` + * renderer selection (see `@/library`'s `resolveArtifactRendererKind` * / `resolveRendererKindFromMediaType`), and the content string those * renderers read. * @@ -74,7 +74,7 @@ export type RoutinePanelSubject = { readonly preselectedAssetId?: string; }; -/** Workbench's concrete instantiation of `@corbits/shell-layout`'s generic +/** Workbench's concrete instantiation of `@/shell/layout`'s generic * canvas state — a `ProfileSubject` for the profile pane, this app's own * `CanvasArtifactContent` for the artifact pane, `RoutinePanelSubject` for * the routine pane. */ diff --git a/apps/web/src/shell/canvas-column.tsx b/apps/web/src/shell/canvas-column.tsx index e197c667b8..775c2f23d9 100644 --- a/apps/web/src/shell/canvas-column.tsx +++ b/apps/web/src/shell/canvas-column.tsx @@ -5,7 +5,7 @@ // conversation lives in the main stage, not here. // // co-edit presence is gone. A "doc"-kind, editable artifact -// renders `@corbits/artifact-ui`'s `ArtifactTextEditor` as a plain +// renders `@/library`'s `ArtifactTextEditor` as a plain // single-user controlled textarea, debounced-saved through the artifacts // HTTP route; every other kind stays the read-only `ArtifactRenderer`. No // co-viewer cursors, no shared doc — that capability returns, if it does, @@ -29,9 +29,9 @@ import { // published from a separate repo, not part of this rename. type ProfileCardChannel, } from "@corbits/react-ui"; -import { ArtifactRenderer, ArtifactTextEditor, type ArtifactSaveState } from "@corbits/artifact-ui"; -import type { ProfileSubject, SharedWorkbenchSummary } from "@corbits/chat-ui"; -import { ArrowsIn, ArrowsOut, ArrowSquareOut, CaretLeft, UserCircle, X } from "@corbits/icons"; +import { ArtifactRenderer, ArtifactTextEditor, type ArtifactSaveState } from "@/library"; +import type { ProfileSubject, SharedWorkbenchSummary } from "@/chat"; +import { ArrowsIn, ArrowsOut, ArrowSquareOut, CaretLeft, UserCircle, X } from "@/lib/icons"; import { useEffect, useState } from "react"; import type { ReactNode } from "react"; diff --git a/apps/web/src/shell/composer-insertion.tsx b/apps/web/src/shell/composer-insertion.tsx index 3862d92c17..a50b3cfbd7 100644 --- a/apps/web/src/shell/composer-insertion.tsx +++ b/apps/web/src/shell/composer-insertion.tsx @@ -1,6 +1,6 @@ // A shell-level seam between two independent surfaces: the canvas column's // ProfileCard (this app) and the active workbench's composer (mounted deep -// inside `@corbits/chat-ui`'s `ChatWorkspace`, a sibling tree). The profile +// inside `@/chat`'s `ChatWorkspace`, a sibling tree). The profile // card's Mention action needs to land `@handle` in whatever // composer is on screen without either side importing the other — the same // "shell context exposing a callback hook" shape `canvas-availability.tsx` diff --git a/apps/web/src/shell/context-menu/items.test.tsx b/apps/web/src/shell/context-menu/items.test.tsx index bfe5a3deeb..de053cb1ee 100644 --- a/apps/web/src/shell/context-menu/items.test.tsx +++ b/apps/web/src/shell/context-menu/items.test.tsx @@ -1,8 +1,8 @@ import { beforeEach, describe, expect, mock, spyOn, test } from "bun:test"; import { spyOnReactUiToast } from "../../../test/react-ui-toast-mock"; -import type { ContextMenuEntry } from "@corbits/context-menu"; -import { WORKBENCHES_MUTATED_EVENT } from "@corbits/chat-ui"; +import type { ContextMenuEntry } from "@/shell/context-menu/lib"; +import { WORKBENCHES_MUTATED_EVENT } from "@/chat"; import * as errorSink from "@corbits/error-sink"; const toastMock = spyOnReactUiToast(); diff --git a/apps/web/src/shell/context-menu/items.tsx b/apps/web/src/shell/context-menu/items.tsx index 600f76178e..953ebd8747 100644 --- a/apps/web/src/shell/context-menu/items.tsx +++ b/apps/web/src/shell/context-menu/items.tsx @@ -7,10 +7,10 @@ import { patchWorkbenchSettings, profileSubjectFromParticipant, WORKBENCHES_MUTATED_EVENT, -} from "@corbits/chat-ui"; -import type { ProfileSubject } from "@corbits/chat-ui"; -import { contextMenuItem, contextMenuSeparator } from "@corbits/context-menu"; -import type { ContextMenu, ContextMenuEntry } from "@corbits/context-menu"; +} from "@/chat"; +import type { ProfileSubject } from "@/chat"; +import { contextMenuItem, contextMenuSeparator } from "@/shell/context-menu/lib"; +import type { ContextMenu, ContextMenuEntry } from "@/shell/context-menu/lib"; import { reportError } from "@corbits/error-sink"; import { ArrowSquareOut, @@ -25,7 +25,7 @@ import { SignOut, SlidersHorizontal, UserCircle, -} from "@corbits/icons"; +} from "@/lib/icons"; import { toast } from "@corbits/react-ui"; import { diff --git a/packages/context-menu/src/context-menu-view.tsx b/apps/web/src/shell/context-menu/lib/context-menu-view.tsx similarity index 100% rename from packages/context-menu/src/context-menu-view.tsx rename to apps/web/src/shell/context-menu/lib/context-menu-view.tsx diff --git a/packages/context-menu/src/dialog-guard.ts b/apps/web/src/shell/context-menu/lib/dialog-guard.ts similarity index 100% rename from packages/context-menu/src/dialog-guard.ts rename to apps/web/src/shell/context-menu/lib/dialog-guard.ts diff --git a/packages/context-menu/src/focus-restore.ts b/apps/web/src/shell/context-menu/lib/focus-restore.ts similarity index 100% rename from packages/context-menu/src/focus-restore.ts rename to apps/web/src/shell/context-menu/lib/focus-restore.ts diff --git a/packages/context-menu/src/index.ts b/apps/web/src/shell/context-menu/lib/index.ts similarity index 95% rename from packages/context-menu/src/index.ts rename to apps/web/src/shell/context-menu/lib/index.ts index 10e765b1d3..1299b62c23 100644 --- a/packages/context-menu/src/index.ts +++ b/apps/web/src/shell/context-menu/lib/index.ts @@ -1,4 +1,4 @@ -// `@corbits/context-menu`: the deployment-agnostic half of the global +// `@/shell/context-menu/lib`: the deployment-agnostic half of the global // right-click context-menu system. Resolving a DOM event to a typed target // (`target-resolver`), deciding whether a modal overlay should suppress it // (`dialog-guard`), the open/position state machine diff --git a/packages/context-menu/src/menu.test.ts b/apps/web/src/shell/context-menu/lib/menu.test.ts similarity index 100% rename from packages/context-menu/src/menu.test.ts rename to apps/web/src/shell/context-menu/lib/menu.test.ts diff --git a/packages/context-menu/src/menu.ts b/apps/web/src/shell/context-menu/lib/menu.ts similarity index 100% rename from packages/context-menu/src/menu.ts rename to apps/web/src/shell/context-menu/lib/menu.ts diff --git a/packages/context-menu/src/target-resolver.ts b/apps/web/src/shell/context-menu/lib/target-resolver.ts similarity index 100% rename from packages/context-menu/src/target-resolver.ts rename to apps/web/src/shell/context-menu/lib/target-resolver.ts diff --git a/packages/context-menu/src/use-context-menu-state.ts b/apps/web/src/shell/context-menu/lib/use-context-menu-state.ts similarity index 100% rename from packages/context-menu/src/use-context-menu-state.ts rename to apps/web/src/shell/context-menu/lib/use-context-menu-state.ts diff --git a/packages/context-menu/src/use-document-context-menu-trigger.ts b/apps/web/src/shell/context-menu/lib/use-document-context-menu-trigger.ts similarity index 100% rename from packages/context-menu/src/use-document-context-menu-trigger.ts rename to apps/web/src/shell/context-menu/lib/use-document-context-menu-trigger.ts diff --git a/apps/web/src/shell/context-menu/shell-context-menu.tsx b/apps/web/src/shell/context-menu/shell-context-menu.tsx index 202a537578..09d0d19a22 100644 --- a/apps/web/src/shell/context-menu/shell-context-menu.tsx +++ b/apps/web/src/shell/context-menu/shell-context-menu.tsx @@ -8,7 +8,7 @@ import { resolveTarget, useContextMenuState, useDocumentContextMenuTrigger, -} from "@corbits/context-menu"; +} from "@/shell/context-menu/lib"; import { useQueryClient } from "@tanstack/react-query"; import { useCallback } from "react"; diff --git a/apps/web/src/shell/context-menu/targets.test.ts b/apps/web/src/shell/context-menu/targets.test.ts index 88cd5f75d6..bdacea5d4c 100644 --- a/apps/web/src/shell/context-menu/targets.test.ts +++ b/apps/web/src/shell/context-menu/targets.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from "bun:test"; -import { resolveTarget } from "@corbits/context-menu"; +import { resolveTarget } from "@/shell/context-menu/lib"; import { SHELL_CONTEXT_MENU_FALLBACK, SHELL_CONTEXT_MENU_TARGETS } from "./targets"; diff --git a/apps/web/src/shell/context-menu/targets.ts b/apps/web/src/shell/context-menu/targets.ts index e34eaa63e2..eb8bbd49a9 100644 --- a/apps/web/src/shell/context-menu/targets.ts +++ b/apps/web/src/shell/context-menu/targets.ts @@ -2,7 +2,7 @@ // shell. New target types register a selector here and an item builder in // `items.tsx` — that's the whole surface for adding one. -import type { TargetDefinition } from "@corbits/context-menu"; +import type { TargetDefinition } from "@/shell/context-menu/lib"; export type ShellContextMenuTarget = | { readonly type: "shell" } diff --git a/packages/shell-layout/src/breakpoints-and-canvas.test.ts b/apps/web/src/shell/layout/breakpoints-and-canvas.test.ts similarity index 100% rename from packages/shell-layout/src/breakpoints-and-canvas.test.ts rename to apps/web/src/shell/layout/breakpoints-and-canvas.test.ts diff --git a/packages/shell-layout/src/breakpoints.test.ts b/apps/web/src/shell/layout/breakpoints.test.ts similarity index 100% rename from packages/shell-layout/src/breakpoints.test.ts rename to apps/web/src/shell/layout/breakpoints.test.ts diff --git a/packages/shell-layout/src/breakpoints.ts b/apps/web/src/shell/layout/breakpoints.ts similarity index 100% rename from packages/shell-layout/src/breakpoints.ts rename to apps/web/src/shell/layout/breakpoints.ts diff --git a/packages/shell-layout/src/canvas-column-state.test.ts b/apps/web/src/shell/layout/canvas-column-state.test.ts similarity index 100% rename from packages/shell-layout/src/canvas-column-state.test.ts rename to apps/web/src/shell/layout/canvas-column-state.test.ts diff --git a/packages/shell-layout/src/canvas-column-state.ts b/apps/web/src/shell/layout/canvas-column-state.ts similarity index 100% rename from packages/shell-layout/src/canvas-column-state.ts rename to apps/web/src/shell/layout/canvas-column-state.ts diff --git a/packages/shell-layout/src/index.ts b/apps/web/src/shell/layout/index.ts similarity index 93% rename from packages/shell-layout/src/index.ts rename to apps/web/src/shell/layout/index.ts index be48588dd5..ad3a55a2f6 100644 --- a/packages/shell-layout/src/index.ts +++ b/apps/web/src/shell/layout/index.ts @@ -1,4 +1,4 @@ -// `@corbits/shell-layout`: the generic shell mechanics a second Interchange +// `@/shell/layout`: the generic shell mechanics a second Interchange // deployment needs — the responsive breakpoint rules and the hook that reads // them, the canvas column state machine, per-route scroll reset, and the // pending-dialog-request pattern for cross-route dialog triggers. Route diff --git a/packages/shell-layout/src/pending-dialog-request.test.ts b/apps/web/src/shell/layout/pending-dialog-request.test.ts similarity index 100% rename from packages/shell-layout/src/pending-dialog-request.test.ts rename to apps/web/src/shell/layout/pending-dialog-request.test.ts diff --git a/packages/shell-layout/src/pending-dialog-request.ts b/apps/web/src/shell/layout/pending-dialog-request.ts similarity index 100% rename from packages/shell-layout/src/pending-dialog-request.ts rename to apps/web/src/shell/layout/pending-dialog-request.ts diff --git a/packages/shell-layout/src/use-scroll-reset.ts b/apps/web/src/shell/layout/use-scroll-reset.ts similarity index 100% rename from packages/shell-layout/src/use-scroll-reset.ts rename to apps/web/src/shell/layout/use-scroll-reset.ts diff --git a/packages/shell-layout/src/use-shell-layout.ts b/apps/web/src/shell/layout/use-shell-layout.ts similarity index 100% rename from packages/shell-layout/src/use-shell-layout.ts rename to apps/web/src/shell/layout/use-shell-layout.ts diff --git a/apps/web/src/shell/library-artifacts.ts b/apps/web/src/shell/library-artifacts.ts index 2385199861..7acf492807 100644 --- a/apps/web/src/shell/library-artifacts.ts +++ b/apps/web/src/shell/library-artifacts.ts @@ -7,8 +7,8 @@ // This module owns pure mapping + upload helper so the page stays thin and // the shape contract has its own tests. The old asset-shim path is gone. -import type { ArtifactSummary } from "@corbits/artifact-ui"; -import { ApiQueryError, UnauthenticatedError } from "@corbits/api-query"; +import type { ArtifactSummary } from "@/library"; +import { ApiQueryError, UnauthenticatedError } from "@/lib/api-query"; import { FILES_PATH_PREFIX } from "../path-ids"; diff --git a/apps/web/src/shell/provider-health-banner.tsx b/apps/web/src/shell/provider-health-banner.tsx index e1d5ebd0a0..46bb0fcbab 100644 --- a/apps/web/src/shell/provider-health-banner.tsx +++ b/apps/web/src/shell/provider-health-banner.tsx @@ -17,7 +17,7 @@ import { Button } from "@corbits/react-ui"; import { connectorDescriptors } from "@corbits/connections/registry"; import type { ClassifiedInferenceFailureCategory } from "@corbits/connections/provider-health"; import { CONNECTOR_REGISTRY } from "@corbits/connections/registry"; -import { Warning, X } from "@corbits/icons"; +import { Warning, X } from "@/lib/icons"; import { useEffect, useState } from "react"; import { useNavigate } from "../navigation"; diff --git a/apps/web/src/shell/shell-chrome-provider.tsx b/apps/web/src/shell/shell-chrome-provider.tsx index 24731ea772..1733a7ce19 100644 --- a/apps/web/src/shell/shell-chrome-provider.tsx +++ b/apps/web/src/shell/shell-chrome-provider.tsx @@ -10,7 +10,7 @@ import { useCallback, useEffect, useRef, useState, type ReactNode } from "react"; -import type { ProfileSubject } from "@corbits/chat-ui"; +import type { ProfileSubject } from "@/chat"; import { canvasColumnAllowed, clearCanvasForTenantSwitch, @@ -22,7 +22,7 @@ import { resolveCanvasVisibility, toggleCanvasFocus, useShellLayoutMode, -} from "@corbits/shell-layout"; +} from "@/shell/layout"; import { useBench } from "../bench-context"; import { workbenchIdFromPath, workbenchPath, isWorkbenchPath } from "../workbench-path"; import { diff --git a/apps/web/src/shell/sidebar-rows.test.ts b/apps/web/src/shell/sidebar-rows.test.ts index 53eb827c2d..f973871bef 100644 --- a/apps/web/src/shell/sidebar-rows.test.ts +++ b/apps/web/src/shell/sidebar-rows.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from "bun:test"; -import type { Workbench } from "@corbits/chat-ui"; +import type { Workbench } from "@/chat"; import { buildSidebarRows } from "./sidebar-rows"; import type { SidebarRow } from "./sidebar-rows"; diff --git a/apps/web/src/shell/sidebar-rows.ts b/apps/web/src/shell/sidebar-rows.ts index 643eb09ad1..c483a34579 100644 --- a/apps/web/src/shell/sidebar-rows.ts +++ b/apps/web/src/shell/sidebar-rows.ts @@ -4,7 +4,7 @@ // Unopened agent definitions do not get a synthetic row — opening a DM is // a conversation act, not a standing nav item. -import type { Workbench } from "@corbits/chat-ui"; +import type { Workbench } from "@/chat"; export type SidebarRow = { readonly kind: "workbench"; diff --git a/apps/web/src/shell/sidebar.tsx b/apps/web/src/shell/sidebar.tsx index 5ae1fca791..79a9843b16 100644 --- a/apps/web/src/shell/sidebar.tsx +++ b/apps/web/src/shell/sidebar.tsx @@ -43,9 +43,9 @@ import { Repeat, SlidersHorizontal, SquaresFour, -} from "@corbits/icons"; +} from "@/lib/icons"; -import { CHAT_STRINGS, avatarClassForPrincipal } from "@corbits/chat-ui"; +import { CHAT_STRINGS, avatarClassForPrincipal } from "@/chat"; import webPackage from "../../package.json"; import { useAPIQuery } from "../api"; diff --git a/apps/web/src/shell/stage-search.tsx b/apps/web/src/shell/stage-search.tsx index 5959a893b2..f3790d3931 100644 --- a/apps/web/src/shell/stage-search.tsx +++ b/apps/web/src/shell/stage-search.tsx @@ -15,7 +15,7 @@ // needs nothing here: react-ui's stylesheet already collapses every // transition duration under `prefers-reduced-motion`. -import { MagnifyingGlass } from "@corbits/icons"; +import { MagnifyingGlass } from "@/lib/icons"; import { useEffect, useRef, useState } from "react"; export type StageSearchProps = { diff --git a/apps/web/src/shell/tenant-resolution.ts b/apps/web/src/shell/tenant-resolution.ts index cf5a84e2ad..820852a512 100644 --- a/apps/web/src/shell/tenant-resolution.ts +++ b/apps/web/src/shell/tenant-resolution.ts @@ -2,7 +2,7 @@ // Chat mounts (main-pane fallback and canvas column) share this so they never // diverge on empty/loading/ready handling. -import type { TenantResolution } from "@corbits/chat-ui"; +import type { TenantResolution } from "@/chat"; import type { useBench } from "../bench-context"; diff --git a/apps/web/src/shell/workbench-list.test.ts b/apps/web/src/shell/workbench-list.test.ts index 5f02db6685..1adc1ad344 100644 --- a/apps/web/src/shell/workbench-list.test.ts +++ b/apps/web/src/shell/workbench-list.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from "bun:test"; -import type { Workbench } from "@corbits/chat-ui"; +import type { Workbench } from "@/chat"; import type { SidebarRow } from "./sidebar-rows"; import { diff --git a/apps/web/src/shell/workbench-list.tsx b/apps/web/src/shell/workbench-list.tsx index 19f501734d..830390c50e 100644 --- a/apps/web/src/shell/workbench-list.tsx +++ b/apps/web/src/shell/workbench-list.tsx @@ -21,10 +21,10 @@ import { displayWorkbenchTitle, workbenchesQueryKeyPrefix, patchWorkbenchSettings, -} from "@corbits/chat-ui"; -import type { Workbench } from "@corbits/chat-ui"; +} from "@/chat"; +import type { Workbench } from "@/chat"; import { useQueryClient } from "@tanstack/react-query"; -import { ChatCircle, Check, DotsThree, Hash, MagnifyingGlass, PushPin } from "@corbits/icons"; +import { ChatCircle, Check, DotsThree, Hash, MagnifyingGlass, PushPin } from "@/lib/icons"; import { useEffect, useState } from "react"; import type { KeyboardEvent } from "react"; diff --git a/apps/web/src/skill-display-name.ts b/apps/web/src/skill-display-name.ts index c1384aef2a..23c041f904 100644 --- a/apps/web/src/skill-display-name.ts +++ b/apps/web/src/skill-display-name.ts @@ -3,7 +3,7 @@ // `displayTitle` (or the native skill asset's `displayName`, which the // stock asset routes carry as of) or a Title Case reading of that // slug. -import { humanizeSlug } from "@corbits/chat-ui/wire/display-name"; +import { humanizeSlug } from "@/chat/wire/display-name"; export function skillDisplayName(skill: { readonly name: string; diff --git a/apps/web/src/skills-api.ts b/apps/web/src/skills-api.ts index 0add93afe2..1dfb91224e 100644 --- a/apps/web/src/skills-api.ts +++ b/apps/web/src/skills-api.ts @@ -14,7 +14,7 @@ import { type } from "arktype"; import type { ArkErrors } from "arktype"; -import { ApiQueryError } from "@corbits/api-query"; +import { ApiQueryError } from "@/lib/api-query"; const SkillSummary = type({ assetId: "string", diff --git a/packages/plugins-ui/src/index.ts b/apps/web/src/tools/index.ts similarity index 100% rename from packages/plugins-ui/src/index.ts rename to apps/web/src/tools/index.ts diff --git a/packages/plugins-ui/src/installed-strip.tsx b/apps/web/src/tools/installed-strip.tsx similarity index 100% rename from packages/plugins-ui/src/installed-strip.tsx rename to apps/web/src/tools/installed-strip.tsx diff --git a/packages/plugins-ui/src/mcp-preset-cards.tsx b/apps/web/src/tools/mcp-preset-cards.tsx similarity index 100% rename from packages/plugins-ui/src/mcp-preset-cards.tsx rename to apps/web/src/tools/mcp-preset-cards.tsx diff --git a/packages/plugins-ui/src/mcp-servers-api.ts b/apps/web/src/tools/mcp-servers-api.ts similarity index 98% rename from packages/plugins-ui/src/mcp-servers-api.ts rename to apps/web/src/tools/mcp-servers-api.ts index 7f78b7125d..9bdd1be352 100644 --- a/packages/plugins-ui/src/mcp-servers-api.ts +++ b/apps/web/src/tools/mcp-servers-api.ts @@ -1,7 +1,7 @@ // Tenant-scoped MCP server connections: drop a server URL in and // its tools become usable by any agent in the workbench. Same // fetch+parse+error-envelope convention every other plugins-ui/settings-ui -// API seam uses (see `@corbits/settings-ui`'s `connections-api.ts`), kept +// API seam uses (see `@/settings`'s `connections-api.ts`), kept // local to this package rather than importing that package's internal // `api-request.ts`, which isn't part of its public surface. diff --git a/packages/plugins-ui/src/mcp-servers-section.tsx b/apps/web/src/tools/mcp-servers-section.tsx similarity index 98% rename from packages/plugins-ui/src/mcp-servers-section.tsx rename to apps/web/src/tools/mcp-servers-section.tsx index b104ba4bf5..a7be548209 100644 --- a/packages/plugins-ui/src/mcp-servers-section.tsx +++ b/apps/web/src/tools/mcp-servers-section.tsx @@ -10,7 +10,7 @@ import { ConfirmButton, toast } from "@corbits/react-ui"; import { MCP_PRESETS } from "@corbits/connections/mcp-presets"; -import { PuzzlePiece } from "@corbits/icons"; +import { PuzzlePiece } from "@/lib/icons"; import { useEffect, useState } from "react"; import { disconnectMcpServer, listMcpServers, type McpServer } from "./mcp-servers-api"; diff --git a/packages/plugins-ui/src/plugin-card.tsx b/apps/web/src/tools/plugin-card.tsx similarity index 98% rename from packages/plugins-ui/src/plugin-card.tsx rename to apps/web/src/tools/plugin-card.tsx index 3545bd5275..05a8b16477 100644 --- a/packages/plugins-ui/src/plugin-card.tsx +++ b/apps/web/src/tools/plugin-card.tsx @@ -7,7 +7,7 @@ import { Button } from "@corbits/react-ui"; import type { ResolvedPlugin } from "@corbits/connections/plugins"; -import { oauthStartHref } from "@corbits/settings-ui"; +import { oauthStartHref } from "@/settings"; import { pluginIcon, pluginOutcome } from "./plugin-meta"; import { PluginLogo } from "./plugin-logo"; diff --git a/packages/plugins-ui/src/plugin-connect-panel.tsx b/apps/web/src/tools/plugin-connect-panel.tsx similarity index 99% rename from packages/plugins-ui/src/plugin-connect-panel.tsx rename to apps/web/src/tools/plugin-connect-panel.tsx index 6b3c684566..ccc37cf7f6 100644 --- a/packages/plugins-ui/src/plugin-connect-panel.tsx +++ b/apps/web/src/tools/plugin-connect-panel.tsx @@ -1,6 +1,6 @@ // The shared configuration surface keeps credential and management // controls out of the catalog grid. It reuses the exact mutations -// `@corbits/settings-ui`'s own +// `@/settings`'s own // Connections section already calls (`completeConnectorCredential`, // `deleteCredential`, `oauthStartHref`) and, // for Granola's webhook half, mounts `GranolaWebhookCard` wholesale rather @@ -30,7 +30,7 @@ import { deleteCredential, fetchOAuthConfigured, oauthStartHref, -} from "@corbits/settings-ui"; +} from "@/settings"; import { CONNECTOR_REGISTRY } from "@corbits/connections/registry"; import type { ResolvedPlugin } from "@corbits/connections/plugins"; import { useEffect, useState } from "react"; diff --git a/packages/plugins-ui/src/plugin-logo.tsx b/apps/web/src/tools/plugin-logo.tsx similarity index 95% rename from packages/plugins-ui/src/plugin-logo.tsx rename to apps/web/src/tools/plugin-logo.tsx index 38ace2de20..827f95e671 100644 --- a/packages/plugins-ui/src/plugin-logo.tsx +++ b/apps/web/src/tools/plugin-logo.tsx @@ -1,4 +1,4 @@ -import type { Icon } from "@corbits/icons"; +import type { Icon } from "@/lib/icons"; export type PluginBrandIcon = { readonly path: string; diff --git a/packages/plugins-ui/src/plugin-meta.ts b/apps/web/src/tools/plugin-meta.ts similarity index 95% rename from packages/plugins-ui/src/plugin-meta.ts rename to apps/web/src/tools/plugin-meta.ts index f71a3185a5..718eb1fe67 100644 --- a/packages/plugins-ui/src/plugin-meta.ts +++ b/apps/web/src/tools/plugin-meta.ts @@ -1,5 +1,5 @@ // Presentation-only sidecar lookups keyed by connector id — the same -// convention `@corbits/settings-ui`'s `INFERENCE_PROVIDER_DOCS_URL` and +// convention `@/settings`'s `INFERENCE_PROVIDER_DOCS_URL` and // `CONNECTOR_PINNED_WORKFLOWS` already use rather than growing // `ConnectorDescriptor` itself with UI-only fields. `CONNECTOR_REGISTRY` // knows nothing about icons, categories, or outcome copy — this module is @@ -14,7 +14,7 @@ import { MagnifyingGlass, Microphone, Stack, -} from "@corbits/icons"; +} from "@/lib/icons"; export type PluginCategory = | "Communication" @@ -77,7 +77,7 @@ const OUTCOME_BY_ID: Readonly> = { github: "Lets agents read and open pull requests in your GitHub repos.", }; -// No brand mark for GitHub or Linear ships in @corbits/icons — `GitPullRequest` +// No brand mark for GitHub or Linear ships in @/lib/icons — `GitPullRequest` // and `GitBranch` read as their nearest honest generic equivalents rather // than reaching for a third-party brand icon set. const ICON_BY_ID: Readonly> = { diff --git a/packages/plugins-ui/src/plugins-gallery.tsx b/apps/web/src/tools/plugins-gallery.tsx similarity index 99% rename from packages/plugins-ui/src/plugins-gallery.tsx rename to apps/web/src/tools/plugins-gallery.tsx index 914c98af51..b067ccf4b3 100644 --- a/packages/plugins-ui/src/plugins-gallery.tsx +++ b/apps/web/src/tools/plugins-gallery.tsx @@ -1,6 +1,6 @@ import { useEffect, useMemo, useRef, useState } from "react"; -import { Lightning } from "@corbits/icons"; +import { Lightning } from "@/lib/icons"; import { EmptyState, FilterChip, Tabs } from "@corbits/react-ui"; import type { ConnectorDescriptor } from "@corbits/connections/registry"; import type { ResolvedPlugin } from "@corbits/connections/plugins"; diff --git a/packages/plugins-ui/src/skill-card.tsx b/apps/web/src/tools/skill-card.tsx similarity index 97% rename from packages/plugins-ui/src/skill-card.tsx rename to apps/web/src/tools/skill-card.tsx index 6aeb9f0f2c..b70cc9d78b 100644 --- a/packages/plugins-ui/src/skill-card.tsx +++ b/apps/web/src/tools/skill-card.tsx @@ -7,7 +7,7 @@ // groups. import { Button } from "@corbits/react-ui"; -import { Lightning } from "@corbits/icons"; +import { Lightning } from "@/lib/icons"; export type SkillCardData = { readonly assetId: string; diff --git a/packages/plugins-ui/src/strings.ts b/apps/web/src/tools/strings.ts similarity index 100% rename from packages/plugins-ui/src/strings.ts rename to apps/web/src/tools/strings.ts diff --git a/apps/web/src/webhook-triggers-api.ts b/apps/web/src/webhook-triggers-api.ts index d912818158..9d272a8b66 100644 --- a/apps/web/src/webhook-triggers-api.ts +++ b/apps/web/src/webhook-triggers-api.ts @@ -12,7 +12,7 @@ import { type } from "arktype"; import type { ArkErrors } from "arktype"; -import { ApiQueryError, UnauthenticatedError } from "@corbits/api-query"; +import { ApiQueryError, UnauthenticatedError } from "@/lib/api-query"; export const WebhookTrigger = type({ id: "string", diff --git a/apps/web/src/workbench-path.ts b/apps/web/src/workbench-path.ts index 532d41f541..f26115ef4e 100644 --- a/apps/web/src/workbench-path.ts +++ b/apps/web/src/workbench-path.ts @@ -8,7 +8,7 @@ // `/settings/:section` and `settingsEntityIdFromPath` for the app-level // Settings page. -import { isWorkbenchSettingsSectionId, type WorkbenchSettingsSectionId } from "@corbits/chat-ui"; +import { isWorkbenchSettingsSectionId, type WorkbenchSettingsSectionId } from "@/chat"; import { decodedOrNull } from "@corbits/url-path"; export const WORKBENCH_PATH_PREFIX = "/w"; diff --git a/apps/web/src/workbench-timeline-merge.test.ts b/apps/web/src/workbench-timeline-merge.test.ts index 2677923f25..701d807169 100644 --- a/apps/web/src/workbench-timeline-merge.test.ts +++ b/apps/web/src/workbench-timeline-merge.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from "bun:test"; -import type { WorkbenchThread, MessageItem } from "@corbits/chat-ui"; +import type { WorkbenchThread, MessageItem } from "@/chat"; import type { PendingApproval } from "./pending-approvals"; import { diff --git a/apps/web/src/workbench-timeline-merge.ts b/apps/web/src/workbench-timeline-merge.ts index 9d5ae1bfc2..a7872b4a2c 100644 --- a/apps/web/src/workbench-timeline-merge.ts +++ b/apps/web/src/workbench-timeline-merge.ts @@ -4,9 +4,9 @@ // array. No new backend: every input here is already fetched by an // existing page (chat-ui, api.ts). -import { isAgentAddress } from "@corbits/chat-ui/wire/mentions"; -import { localPartOf } from "@corbits/chat-ui/wire/agent-address"; -import type { WorkbenchThread, MessageItem } from "@corbits/chat-ui"; +import { isAgentAddress } from "@/chat/wire/mentions"; +import { localPartOf } from "@/chat/wire/agent-address"; +import type { WorkbenchThread, MessageItem } from "@/chat"; import type { PendingApproval } from "./pending-approvals"; diff --git a/apps/web/src/workflow-detail-api.ts b/apps/web/src/workflow-detail-api.ts index 19e837a15f..a332e772f8 100644 --- a/apps/web/src/workflow-detail-api.ts +++ b/apps/web/src/workflow-detail-api.ts @@ -8,7 +8,7 @@ // definitions listing — this file is fetch composition only. import { type } from "arktype"; import type { ArkErrors } from "arktype"; -import { ApiQueryError, UnauthenticatedError } from "@corbits/api-query"; +import { ApiQueryError, UnauthenticatedError } from "@/lib/api-query"; import { WorkflowDefinitionDetail } from "@corbits/workflows/client"; import type { WorkflowDefinitionDetail as WorkflowDefinitionDetailT } from "@corbits/workflows/client"; diff --git a/apps/web/test/agents-api.test.ts b/apps/web/test/agents-api.test.ts index 1ccff88b6f..28d0e7b07a 100644 --- a/apps/web/test/agents-api.test.ts +++ b/apps/web/test/agents-api.test.ts @@ -3,7 +3,7 @@ import { afterEach, describe, expect, test } from "bun:test"; -import { ApiQueryError } from "@corbits/api-query"; +import { ApiQueryError } from "@/lib/api-query"; import { clearAgentModel, diff --git a/apps/web/test/api.test.tsx b/apps/web/test/api.test.tsx index bf720e8a46..b67e3710ef 100644 --- a/apps/web/test/api.test.tsx +++ b/apps/web/test/api.test.tsx @@ -11,8 +11,8 @@ import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; import { type } from "arktype"; -import type { APIQuery } from "@corbits/api-query"; -import { ApiQueryError } from "@corbits/api-query"; +import type { APIQuery } from "@/lib/api-query"; +import { ApiQueryError } from "@/lib/api-query"; import { approveApproval, rejectApproval, useAPIQuery } from "../src/api"; import { TestQueryProvider } from "./test-query-provider"; diff --git a/apps/web/test/bench-activity.test.tsx b/apps/web/test/bench-activity.test.tsx index fa1ef7c3a6..51f21d00cf 100644 --- a/apps/web/test/bench-activity.test.tsx +++ b/apps/web/test/bench-activity.test.tsx @@ -9,7 +9,7 @@ import { afterEach, describe, expect, test } from "bun:test"; import { act } from "react"; import { createRoot, type Root } from "react-dom/client"; -import { WORKBENCHES_MUTATED_EVENT } from "@corbits/chat-ui"; +import { WORKBENCHES_MUTATED_EVENT } from "@/chat"; import { useBenchActivity } from "../src/shell/bench-activity"; import type { BenchActivityQuery } from "../src/shell/bench-activity"; diff --git a/packages/bench-ui/test/membership.test.ts b/apps/web/test/bench/membership.test.ts similarity index 91% rename from packages/bench-ui/test/membership.test.ts rename to apps/web/test/bench/membership.test.ts index 5046eaf16d..5c13b385cb 100644 --- a/packages/bench-ui/test/membership.test.ts +++ b/apps/web/test/bench/membership.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from "bun:test"; -import { isRawIdentifier } from "../src/membership"; +import { isRawIdentifier } from "../../src/bench/membership"; describe("isRawIdentifier", () => { test("recognizes every platform id prefix this surface must never render", () => { diff --git a/apps/web/test/chat-header-toggle.test.tsx b/apps/web/test/chat-header-toggle.test.tsx index 0ffffb4570..fd2bb69039 100644 --- a/apps/web/test/chat-header-toggle.test.tsx +++ b/apps/web/test/chat-header-toggle.test.tsx @@ -8,7 +8,7 @@ import { afterEach, beforeEach, describe, expect, test } from "bun:test"; import { act } from "react"; import { createRoot, type Root } from "react-dom/client"; -import { ChatWorkspace } from "@corbits/chat-ui"; +import { ChatWorkspace } from "@/chat"; import { TestQueryProvider } from "./test-query-provider"; diff --git a/packages/chat-ui/test/agent-display-names.test.ts b/apps/web/test/chat/agent-display-names.test.ts similarity index 92% rename from packages/chat-ui/test/agent-display-names.test.ts rename to apps/web/test/chat/agent-display-names.test.ts index db0aaa6b1d..ccffac90ed 100644 --- a/packages/chat-ui/test/agent-display-names.test.ts +++ b/apps/web/test/chat/agent-display-names.test.ts @@ -1,6 +1,9 @@ import { describe, expect, test } from "bun:test"; -import { agentDisplayNamesFromAgents, displayNameForAddress } from "../src/agent-display-names"; +import { + agentDisplayNamesFromAgents, + displayNameForAddress, +} from "../../src/chat/agent-display-names"; describe("agentDisplayNamesFromAgents", () => { test("keys each agent's display name by its participant address", () => { diff --git a/packages/chat-ui/test/agent-typing-indicator.test.tsx b/apps/web/test/chat/agent-typing-indicator.test.tsx similarity index 96% rename from packages/chat-ui/test/agent-typing-indicator.test.tsx rename to apps/web/test/chat/agent-typing-indicator.test.tsx index 6ec95132ab..0f6513c3d6 100644 --- a/packages/chat-ui/test/agent-typing-indicator.test.tsx +++ b/apps/web/test/chat/agent-typing-indicator.test.tsx @@ -6,7 +6,7 @@ import { describe, expect, test } from "bun:test"; import { act, createElement } from "react"; import { createRoot } from "react-dom/client"; -import { AgentTypingIndicator } from "../src/typing-indicator"; +import { AgentTypingIndicator } from "../../src/chat/typing-indicator"; function render(names: readonly string[]) { const container = document.createElement("div"); diff --git a/packages/chat-ui/test/agents-section.test.tsx b/apps/web/test/chat/agents-section.test.tsx similarity index 99% rename from packages/chat-ui/test/agents-section.test.tsx rename to apps/web/test/chat/agents-section.test.tsx index 8d64a4096a..7cf70a9555 100644 --- a/packages/chat-ui/test/agents-section.test.tsx +++ b/apps/web/test/chat/agents-section.test.tsx @@ -14,7 +14,7 @@ import { act, createElement } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import { WorkbenchSettingsSurface } from "../src/workbench-settings"; +import { WorkbenchSettingsSurface } from "../../src/chat/workbench-settings"; const realFetch = globalThis.fetch; diff --git a/packages/chat-ui/test/approve-block.test.tsx b/apps/web/test/chat/approve-block.test.tsx similarity index 98% rename from packages/chat-ui/test/approve-block.test.tsx rename to apps/web/test/chat/approve-block.test.tsx index 982fc5e594..270152404a 100644 --- a/packages/chat-ui/test/approve-block.test.tsx +++ b/apps/web/test/chat/approve-block.test.tsx @@ -18,9 +18,9 @@ import type { ApprovalLiveStatus, ApprovalStatusQuery, PlatformApprovalDetail, -} from "../src/blocks/approval-actions"; -import type { MessageItem } from "../src/api"; -import { WorkbenchTimeline } from "../src/timeline"; +} from "../../src/chat/blocks/approval-actions"; +import type { MessageItem } from "../../src/chat/api"; +import { WorkbenchTimeline } from "../../src/chat/timeline"; const PLATFORM_DETAIL: PlatformApprovalDetail = { agentName: "Payments Bot", diff --git a/packages/chat-ui/test/artifact-chip.test.tsx b/apps/web/test/chat/artifact-chip.test.tsx similarity index 96% rename from packages/chat-ui/test/artifact-chip.test.tsx rename to apps/web/test/chat/artifact-chip.test.tsx index 56e906b3cf..4b61ba1673 100644 --- a/packages/chat-ui/test/artifact-chip.test.tsx +++ b/apps/web/test/chat/artifact-chip.test.tsx @@ -4,8 +4,8 @@ import { describe, expect, test } from "bun:test"; import { renderToStaticMarkup } from "react-dom/server"; -import { ArtifactChip } from "../src/artifact-chip"; -import type { Part } from "../src/api"; +import { ArtifactChip } from "../../src/chat/artifact-chip"; +import type { Part } from "../../src/chat/api"; function filePart(overrides: Partial): Part & { kind: "file"; diff --git a/packages/chat-ui/test/avatar-composition.test.tsx b/apps/web/test/chat/avatar-composition.test.tsx similarity index 99% rename from packages/chat-ui/test/avatar-composition.test.tsx rename to apps/web/test/chat/avatar-composition.test.tsx index fc6e0c7718..56c903c15b 100644 --- a/packages/chat-ui/test/avatar-composition.test.tsx +++ b/apps/web/test/chat/avatar-composition.test.tsx @@ -8,7 +8,7 @@ import { avatarClassForPrincipal, avatarColorForPrincipal, resolveAvatarFill, -} from "../src"; +} from "../../src/chat"; describe("avatar composition and identity resolution", () => { test("agent Corbit avatar is distinct from human initials avatar", () => { diff --git a/packages/chat-ui/test/blocks.test.tsx b/apps/web/test/chat/blocks.test.tsx similarity index 97% rename from packages/chat-ui/test/blocks.test.tsx rename to apps/web/test/chat/blocks.test.tsx index 18ca9ae509..d51ac88a74 100644 --- a/packages/chat-ui/test/blocks.test.tsx +++ b/apps/web/test/chat/blocks.test.tsx @@ -5,8 +5,8 @@ import { describe, expect, test } from "bun:test"; import { renderToStaticMarkup } from "react-dom/server"; -import type { MessageItem } from "../src/api"; -import { WorkbenchTimeline } from "../src/timeline"; +import type { MessageItem } from "../../src/chat/api"; +import { WorkbenchTimeline } from "../../src/chat/timeline"; function messageWithBlock(type: string, data: unknown): MessageItem[] { return [ diff --git a/packages/chat-ui/test/chat-bubble-flat.test.ts b/apps/web/test/chat/chat-bubble-flat.test.ts similarity index 94% rename from packages/chat-ui/test/chat-bubble-flat.test.ts rename to apps/web/test/chat/chat-bubble-flat.test.ts index 877be3205f..7b00c33a09 100644 --- a/packages/chat-ui/test/chat-bubble-flat.test.ts +++ b/apps/web/test/chat/chat-bubble-flat.test.ts @@ -6,7 +6,7 @@ import { dirname, join } from "node:path"; import { fileURLToPath } from "node:url"; const css = readFileSync( - join(dirname(fileURLToPath(import.meta.url)), "../src/styles.css"), + join(dirname(fileURLToPath(import.meta.url)), "../../src/chat/styles.css"), "utf8", ); diff --git a/packages/chat-ui/test/chat-workspace.test.tsx b/apps/web/test/chat/chat-workspace.test.tsx similarity index 97% rename from packages/chat-ui/test/chat-workspace.test.tsx rename to apps/web/test/chat/chat-workspace.test.tsx index 551c18f7eb..15167c756d 100644 --- a/packages/chat-ui/test/chat-workspace.test.tsx +++ b/apps/web/test/chat/chat-workspace.test.tsx @@ -1,5 +1,5 @@ // Composition tests for `ChatWorkspace`'s settings-surface wiring: it -// mounts against a registered DOM (see dom-setup.ts) because these prove +// mounts against a registered DOM (see dom-environment.ts) because these prove // real effect-driven sequencing — the two-step "workbenches resolve, then the // settings surface renders" load a direct `/c/:id/settings` URL drives — // which static markup rendering cannot exercise. @@ -50,7 +50,7 @@ const WORKBENCH_WIRE = { participants: [] as { address: string; handle: string }[], }; -const { ChatWorkspace } = await import("../src/chat-workspace"); +const { ChatWorkspace } = await import("../../src/chat/chat-workspace"); const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); diff --git a/packages/chat-ui/test/components.test.tsx b/apps/web/test/chat/components.test.tsx similarity index 98% rename from packages/chat-ui/test/components.test.tsx rename to apps/web/test/chat/components.test.tsx index 814a58cef3..26d31bf534 100644 --- a/packages/chat-ui/test/components.test.tsx +++ b/apps/web/test/chat/components.test.tsx @@ -5,19 +5,19 @@ import { describe, expect, test } from "bun:test"; import { renderToStaticMarkup } from "react-dom/server"; -import type { MessageItem } from "../src/api"; -import { Composer } from "../src/composer"; -import { profileSubjectFromParticipant } from "../src/profile-subject"; -import { renamePayload, rowMenuLabels } from "../src/sidebar"; +import type { MessageItem } from "../../src/chat/api"; +import { Composer } from "../../src/chat/composer"; +import { profileSubjectFromParticipant } from "../../src/chat/profile-subject"; +import { renamePayload, rowMenuLabels } from "../../src/chat/sidebar"; import { isTypingStateExpired, nextTypingState, parseTypingEvent, typingLabel, TypingIndicator, -} from "../src/typing-indicator"; +} from "../../src/chat/typing-indicator"; -import { WorkbenchTimeline } from "../src/timeline"; +import { WorkbenchTimeline } from "../../src/chat/timeline"; /** The floor: no rendered text may ever contain a raw identifier. */ const RAW_ID_PATTERN = /\b(prn_|ins_|tnt_)[a-z0-9]/i; diff --git a/packages/chat-ui/test/composer-synchronous-double-send.test.tsx b/apps/web/test/chat/composer-synchronous-double-send.test.tsx similarity index 95% rename from packages/chat-ui/test/composer-synchronous-double-send.test.tsx rename to apps/web/test/chat/composer-synchronous-double-send.test.tsx index 29b19ab045..0e36126cd6 100644 --- a/packages/chat-ui/test/composer-synchronous-double-send.test.tsx +++ b/apps/web/test/chat/composer-synchronous-double-send.test.tsx @@ -10,8 +10,8 @@ import { act, createElement, createRef } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import { Composer } from "../src/composer"; -import type { ComposerHandle, ComposerSendPayload } from "../src/composer"; +import { Composer } from "../../src/chat/composer"; +import type { ComposerHandle, ComposerSendPayload } from "../../src/chat/composer"; let container: HTMLDivElement | null = null; let root: Root | null = null; diff --git a/packages/chat-ui/test/composer.test.tsx b/apps/web/test/chat/composer.test.tsx similarity index 99% rename from packages/chat-ui/test/composer.test.tsx rename to apps/web/test/chat/composer.test.tsx index 5f25a702c5..b84651a148 100644 --- a/packages/chat-ui/test/composer.test.tsx +++ b/apps/web/test/chat/composer.test.tsx @@ -4,8 +4,8 @@ import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; import * as errorSink from "@corbits/error-sink"; -import { Composer } from "../src/composer"; -import type { ComposerHandle, ComposerSendPayload } from "../src/composer"; +import { Composer } from "../../src/chat/composer"; +import type { ComposerHandle, ComposerSendPayload } from "../../src/chat/composer"; // The in-flight send contract survives the icon-only UI: its accessible name // announces progress and the action remains unavailable until sending ends. diff --git a/packages/chat-ui/test/connect-service-block.test.tsx b/apps/web/test/chat/connect-service-block.test.tsx similarity index 96% rename from packages/chat-ui/test/connect-service-block.test.tsx rename to apps/web/test/chat/connect-service-block.test.tsx index 4708eed701..f3a6c760e9 100644 --- a/packages/chat-ui/test/connect-service-block.test.tsx +++ b/apps/web/test/chat/connect-service-block.test.tsx @@ -12,8 +12,8 @@ import type { ReactElement } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import type { ConnectServiceCardProps } from "../src/blocks/connect-service-block"; -import { ConnectServiceBlockView } from "../src/blocks/connect-service-block"; +import type { ConnectServiceCardProps } from "../../src/chat/blocks/connect-service-block"; +import { ConnectServiceBlockView } from "../../src/chat/blocks/connect-service-block"; let container: HTMLDivElement | null = null; let root: Root | null = null; diff --git a/packages/chat-ui/test/connect-service-flow.test.tsx b/apps/web/test/chat/connect-service-flow.test.tsx similarity index 95% rename from packages/chat-ui/test/connect-service-flow.test.tsx rename to apps/web/test/chat/connect-service-flow.test.tsx index 63c045cf9a..7c401134e0 100644 --- a/packages/chat-ui/test/connect-service-flow.test.tsx +++ b/apps/web/test/chat/connect-service-flow.test.tsx @@ -14,8 +14,8 @@ import type { Root } from "react-dom/client"; import type { ConnectServiceActions, ConnectServiceQuery, -} from "../src/blocks/connect-service-actions"; -import { ConnectServiceBlockContainer } from "../src/blocks/connect-service-block-container"; +} from "../../src/chat/blocks/connect-service-actions"; +import { ConnectServiceBlockContainer } from "../../src/chat/blocks/connect-service-block-container"; let container: HTMLDivElement | null = null; let root: Root | null = null; diff --git a/packages/chat-ui/test/failed-turn-strip.test.tsx b/apps/web/test/chat/failed-turn-strip.test.tsx similarity index 99% rename from packages/chat-ui/test/failed-turn-strip.test.tsx rename to apps/web/test/chat/failed-turn-strip.test.tsx index 9bc9946e67..086ad3e039 100644 --- a/packages/chat-ui/test/failed-turn-strip.test.tsx +++ b/apps/web/test/chat/failed-turn-strip.test.tsx @@ -9,8 +9,8 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import type { MessageItem } from "../src/api"; -import { WorkbenchTimeline } from "../src/timeline"; +import type { MessageItem } from "../../src/chat/api"; +import { WorkbenchTimeline } from "../../src/chat/timeline"; if (typeof document === "undefined") { GlobalRegistrator.register(); diff --git a/packages/chat-ui/test/fake-clock.ts b/apps/web/test/chat/fake-clock.ts similarity index 97% rename from packages/chat-ui/test/fake-clock.ts rename to apps/web/test/chat/fake-clock.ts index 00817c22f0..8f6b9244c6 100644 --- a/packages/chat-ui/test/fake-clock.ts +++ b/apps/web/test/chat/fake-clock.ts @@ -2,7 +2,7 @@ // fires every due timer against a virtual clock with no real sleep, so a // test asserting a 30ms backstop actually fired takes 0ms of wall time // instead of racing CI's CPU-contended shards for those 30ms. -import type { Clock } from "../src/clock"; +import type { Clock } from "../../src/chat/clock"; export type FakeClock = { readonly clock: Clock; diff --git a/packages/chat-ui/test/inference-preamble-drift.test.ts b/apps/web/test/chat/inference-preamble-drift.test.ts similarity index 93% rename from packages/chat-ui/test/inference-preamble-drift.test.ts rename to apps/web/test/chat/inference-preamble-drift.test.ts index fa76d1dffc..bea91aa0a2 100644 --- a/packages/chat-ui/test/inference-preamble-drift.test.ts +++ b/apps/web/test/chat/inference-preamble-drift.test.ts @@ -14,7 +14,7 @@ import { readFileSync } from "node:fs"; import { dirname, extname, join } from "node:path"; import { fileURLToPath } from "node:url"; -import { CLASSIFIED_INFERENCE_FAILURE_PREAMBLES } from "../src/inference-failure"; +import { CLASSIFIED_INFERENCE_FAILURE_PREAMBLES } from "../../src/chat/inference-failure"; test("chat-ui's classified-failure preambles match the published director's exact strings", () => { const entry = fileURLToPath(import.meta.resolve("@intx/inference")); diff --git a/packages/chat-ui/test/loading-state.test.tsx b/apps/web/test/chat/loading-state.test.tsx similarity index 95% rename from packages/chat-ui/test/loading-state.test.tsx rename to apps/web/test/chat/loading-state.test.tsx index de30733f61..367877ff21 100644 --- a/packages/chat-ui/test/loading-state.test.tsx +++ b/apps/web/test/chat/loading-state.test.tsx @@ -9,8 +9,8 @@ import type { ReactElement } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import { WorkbenchLoadingState } from "../src/loading-state"; -import { CHAT_STRINGS } from "../src/strings"; +import { WorkbenchLoadingState } from "../../src/chat/loading-state"; +import { CHAT_STRINGS } from "../../src/chat/strings"; let container: HTMLDivElement | null = null; let root: Root | null = null; diff --git a/packages/chat-ui/test/members-section.test.tsx b/apps/web/test/chat/members-section.test.tsx similarity index 98% rename from packages/chat-ui/test/members-section.test.tsx rename to apps/web/test/chat/members-section.test.tsx index 8b5bca480c..6cac8b28dd 100644 --- a/packages/chat-ui/test/members-section.test.tsx +++ b/apps/web/test/chat/members-section.test.tsx @@ -11,7 +11,7 @@ import { act, createElement } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import { WorkbenchSettingsSurface } from "../src/workbench-settings"; +import { WorkbenchSettingsSurface } from "../../src/chat/workbench-settings"; const realFetch = globalThis.fetch; diff --git a/packages/chat-ui/test/mentions.test.ts b/apps/web/test/chat/mentions.test.ts similarity index 99% rename from packages/chat-ui/test/mentions.test.ts rename to apps/web/test/chat/mentions.test.ts index 2b0ac61237..11ae93ba57 100644 --- a/packages/chat-ui/test/mentions.test.ts +++ b/apps/web/test/chat/mentions.test.ts @@ -5,7 +5,7 @@ import { filterMentionCandidates, insertMention, mentionCandidatesFromParticipants, -} from "../src/mentions"; +} from "../../src/chat/mentions"; describe("activeMentionQuery", () => { test("detects an open mention right after the @", () => { diff --git a/packages/chat-ui/test/message-grouping-and-failed-polish.test.tsx b/apps/web/test/chat/message-grouping-and-failed-polish.test.tsx similarity index 98% rename from packages/chat-ui/test/message-grouping-and-failed-polish.test.tsx rename to apps/web/test/chat/message-grouping-and-failed-polish.test.tsx index 674564b612..a7d133220a 100644 --- a/packages/chat-ui/test/message-grouping-and-failed-polish.test.tsx +++ b/apps/web/test/chat/message-grouping-and-failed-polish.test.tsx @@ -8,9 +8,9 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import type { MessageItem } from "../src/api"; -import type { PendingActions, TimelineMessageItem } from "../src/timeline"; -import { WorkbenchTimeline } from "../src/timeline"; +import type { MessageItem } from "../../src/chat/api"; +import type { PendingActions, TimelineMessageItem } from "../../src/chat/timeline"; +import { WorkbenchTimeline } from "../../src/chat/timeline"; let container: HTMLDivElement | null = null; let root: Root | null = null; diff --git a/packages/chat-ui/test/message-hover-toolbar.test.tsx b/apps/web/test/chat/message-hover-toolbar.test.tsx similarity index 97% rename from packages/chat-ui/test/message-hover-toolbar.test.tsx rename to apps/web/test/chat/message-hover-toolbar.test.tsx index 56d4994887..ccade71598 100644 --- a/packages/chat-ui/test/message-hover-toolbar.test.tsx +++ b/apps/web/test/chat/message-hover-toolbar.test.tsx @@ -9,13 +9,13 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import { WorkbenchTimeline } from "../src/timeline"; -import type { CurrentUser, TimelineMessageItem } from "../src/timeline"; +import { WorkbenchTimeline } from "../../src/chat/timeline"; +import type { CurrentUser, TimelineMessageItem } from "../../src/chat/timeline"; const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); const chatUiCss = readFileSync( - join(dirname(fileURLToPath(import.meta.url)), "../src/styles.css"), + join(dirname(fileURLToPath(import.meta.url)), "../../src/chat/styles.css"), "utf8", ); @@ -28,7 +28,7 @@ function cssRuleBodies(selector: string): string[] { /** Radix's exit-animation handling runs through a couple of microtasks even * with no real CSS animation configured — see the identical helper in - * `@corbits/context-menu`'s own `context-menu-view.test.tsx`. */ + * `@/shell/context-menu/lib`'s own `context-menu-view.test.tsx`. */ async function flush(): Promise { await act(async () => { await sleep(0); diff --git a/packages/chat-ui/test/no-usable-model-banner.test.tsx b/apps/web/test/chat/no-usable-model-banner.test.tsx similarity index 94% rename from packages/chat-ui/test/no-usable-model-banner.test.tsx rename to apps/web/test/chat/no-usable-model-banner.test.tsx index d9e2ca0c8f..b9c004f59b 100644 --- a/packages/chat-ui/test/no-usable-model-banner.test.tsx +++ b/apps/web/test/chat/no-usable-model-banner.test.tsx @@ -6,7 +6,7 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import { NoUsableModelBanner } from "../src/no-usable-model-banner"; +import { NoUsableModelBanner } from "../../src/chat/no-usable-model-banner"; let container: HTMLDivElement | null = null; let root: Root | null = null; diff --git a/packages/chat-ui/test/own-message-alignment.test.tsx b/apps/web/test/chat/own-message-alignment.test.tsx similarity index 97% rename from packages/chat-ui/test/own-message-alignment.test.tsx rename to apps/web/test/chat/own-message-alignment.test.tsx index 2dde4f47d8..43d0c15e7e 100644 --- a/packages/chat-ui/test/own-message-alignment.test.tsx +++ b/apps/web/test/chat/own-message-alignment.test.tsx @@ -11,9 +11,9 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import type { MessageItem } from "../src/api"; -import type { CurrentUser } from "../src/timeline"; -import { WorkbenchTimeline } from "../src/timeline"; +import type { MessageItem } from "../../src/chat/api"; +import type { CurrentUser } from "../../src/chat/timeline"; +import { WorkbenchTimeline } from "../../src/chat/timeline"; let container: HTMLDivElement | null = null; let root: Root | null = null; diff --git a/packages/chat-ui/test/pending-send-lifecycle.test.tsx b/apps/web/test/chat/pending-send-lifecycle.test.tsx similarity index 96% rename from packages/chat-ui/test/pending-send-lifecycle.test.tsx rename to apps/web/test/chat/pending-send-lifecycle.test.tsx index ea1cb90a96..35cbe8dafb 100644 --- a/packages/chat-ui/test/pending-send-lifecycle.test.tsx +++ b/apps/web/test/chat/pending-send-lifecycle.test.tsx @@ -7,8 +7,8 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import type { PendingActions, TimelineMessageItem } from "../src/timeline"; -import { WorkbenchTimeline } from "../src/timeline"; +import type { PendingActions, TimelineMessageItem } from "../../src/chat/timeline"; +import { WorkbenchTimeline } from "../../src/chat/timeline"; let container: HTMLDivElement | null = null; let root: Root | null = null; diff --git a/packages/chat-ui/test/pr-thread-view.test.tsx b/apps/web/test/chat/pr-thread-view.test.tsx similarity index 98% rename from packages/chat-ui/test/pr-thread-view.test.tsx rename to apps/web/test/chat/pr-thread-view.test.tsx index 748cc6cd0f..52309076e5 100644 --- a/packages/chat-ui/test/pr-thread-view.test.tsx +++ b/apps/web/test/chat/pr-thread-view.test.tsx @@ -13,8 +13,12 @@ import type { ReactElement } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import type { PrThreadFailedTurn, PrThreadReply, PrThreadViewProps } from "../src/pr-thread-view"; -import { PrQueuedStrip, PrThreadView } from "../src/pr-thread-view"; +import type { + PrThreadFailedTurn, + PrThreadReply, + PrThreadViewProps, +} from "../../src/chat/pr-thread-view"; +import { PrQueuedStrip, PrThreadView } from "../../src/chat/pr-thread-view"; let container: HTMLDivElement | null = null; let root: Root | null = null; diff --git a/packages/chat-ui/test/presence-stack.test.tsx b/apps/web/test/chat/presence-stack.test.tsx similarity index 99% rename from packages/chat-ui/test/presence-stack.test.tsx rename to apps/web/test/chat/presence-stack.test.tsx index 46063c79b3..d95753007b 100644 --- a/packages/chat-ui/test/presence-stack.test.tsx +++ b/apps/web/test/chat/presence-stack.test.tsx @@ -79,7 +79,7 @@ function stubFetch() { }) as typeof fetch; } -const { ChatWorkspace, TEAM_AVATAR_STACK_LIMIT } = await import("../src/chat-workspace"); +const { ChatWorkspace, TEAM_AVATAR_STACK_LIMIT } = await import("../../src/chat/chat-workspace"); const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); diff --git a/packages/chat-ui/test/refresh-and-send.test.ts b/apps/web/test/chat/refresh-and-send.test.ts similarity index 98% rename from packages/chat-ui/test/refresh-and-send.test.ts rename to apps/web/test/chat/refresh-and-send.test.ts index 44936af8a0..fa02b1b76c 100644 --- a/packages/chat-ui/test/refresh-and-send.test.ts +++ b/apps/web/test/chat/refresh-and-send.test.ts @@ -12,8 +12,8 @@ import { mergePendingSends, mergeStreamingReply, withScrollSnapshot, -} from "../src/chat-workspace"; -import type { PendingSend } from "../src/chat-workspace"; +} from "../../src/chat/chat-workspace"; +import type { PendingSend } from "../../src/chat/chat-workspace"; import { attachmentsAfterSend, attachmentBytesOnComposer, @@ -27,10 +27,10 @@ import { draftAfterSend, partsForSend, validateAttachmentPick, -} from "../src/composer"; -import type { ComposerAttachment } from "../src/composer"; -import { CHAT_STRINGS } from "../src/strings"; -import { backoffDelayMs, shouldConnect } from "../src/use-workbench-stream"; +} from "../../src/chat/composer"; +import type { ComposerAttachment } from "../../src/chat/composer"; +import { CHAT_STRINGS } from "../../src/chat/strings"; +import { backoffDelayMs, shouldConnect } from "../../src/chat/use-workbench-stream"; describe("draftAfterSend (B2: a failed send keeps the draft)", () => { test("clears the draft once the send succeeds", () => { diff --git a/packages/chat-ui/test/resume-failed-banner.test.tsx b/apps/web/test/chat/resume-failed-banner.test.tsx similarity index 95% rename from packages/chat-ui/test/resume-failed-banner.test.tsx rename to apps/web/test/chat/resume-failed-banner.test.tsx index 146195ebbe..2927a15a51 100644 --- a/packages/chat-ui/test/resume-failed-banner.test.tsx +++ b/apps/web/test/chat/resume-failed-banner.test.tsx @@ -6,7 +6,7 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import { ResumeFailedBanner } from "../src/resume-failed-banner"; +import { ResumeFailedBanner } from "../../src/chat/resume-failed-banner"; let container: HTMLDivElement | null = null; let root: Root | null = null; diff --git a/packages/chat-ui/test/single-message-list-reconciliation.test.tsx b/apps/web/test/chat/single-message-list-reconciliation.test.tsx similarity index 96% rename from packages/chat-ui/test/single-message-list-reconciliation.test.tsx rename to apps/web/test/chat/single-message-list-reconciliation.test.tsx index b13f21ec28..ad746f03a4 100644 --- a/packages/chat-ui/test/single-message-list-reconciliation.test.tsx +++ b/apps/web/test/chat/single-message-list-reconciliation.test.tsx @@ -11,9 +11,9 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import type { MessageItem } from "../src/api"; -import type { TimelineMessageItem } from "../src/timeline"; -import { WorkbenchTimeline } from "../src/timeline"; +import type { MessageItem } from "../../src/chat/api"; +import type { TimelineMessageItem } from "../../src/chat/timeline"; +import { WorkbenchTimeline } from "../../src/chat/timeline"; let container: HTMLDivElement | null = null; let root: Root | null = null; diff --git a/packages/chat-ui/test/stream-apply.test.ts b/apps/web/test/chat/stream-apply.test.ts similarity index 93% rename from packages/chat-ui/test/stream-apply.test.ts rename to apps/web/test/chat/stream-apply.test.ts index 2e73d0c025..6b5998633b 100644 --- a/packages/chat-ui/test/stream-apply.test.ts +++ b/apps/web/test/chat/stream-apply.test.ts @@ -4,8 +4,8 @@ import { describe, expect, test } from "bun:test"; -import { ensureReplyThreadRow } from "../src/use-workbench-feed"; -import type { WorkbenchThreadRow } from "../src/api"; +import { ensureReplyThreadRow } from "../../src/chat/use-workbench-feed"; +import type { WorkbenchThreadRow } from "../../src/chat/api"; describe("ensureReplyThreadRow", () => { const empty: { diff --git a/packages/chat-ui/test/system-join-edge.test.tsx b/apps/web/test/chat/system-join-edge.test.tsx similarity index 95% rename from packages/chat-ui/test/system-join-edge.test.tsx rename to apps/web/test/chat/system-join-edge.test.tsx index b2cfe05ea0..e0e48b097f 100644 --- a/packages/chat-ui/test/system-join-edge.test.tsx +++ b/apps/web/test/chat/system-join-edge.test.tsx @@ -8,9 +8,9 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import type { MessageItem } from "../src/api"; -import type { CurrentUser } from "../src/timeline"; -import { WorkbenchTimeline } from "../src/timeline"; +import type { MessageItem } from "../../src/chat/api"; +import type { CurrentUser } from "../../src/chat/timeline"; +import { WorkbenchTimeline } from "../../src/chat/timeline"; let container: HTMLDivElement | null = null; let root: Root | null = null; @@ -103,7 +103,7 @@ describe("join / system notices stay on the left edge", () => { }); test("event-line CSS anchors left under the message gutter, not centered", () => { - const cssPath = join(dirname(fileURLToPath(import.meta.url)), "../src/styles.css"); + const cssPath = join(dirname(fileURLToPath(import.meta.url)), "../../src/chat/styles.css"); const css = readFileSync(cssPath, "utf8"); const block = css.match(/\.chat-event-line\s*\{[^}]+\}/); expect(block).not.toBeNull(); diff --git a/packages/chat-ui/test/system-row-chrome.test.tsx b/apps/web/test/chat/system-row-chrome.test.tsx similarity index 98% rename from packages/chat-ui/test/system-row-chrome.test.tsx rename to apps/web/test/chat/system-row-chrome.test.tsx index 4e2466d95c..e1f8446f5e 100644 --- a/packages/chat-ui/test/system-row-chrome.test.tsx +++ b/apps/web/test/chat/system-row-chrome.test.tsx @@ -6,8 +6,8 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import type { MessageItem } from "../src/api"; -import { WorkbenchTimeline } from "../src/timeline"; +import type { MessageItem } from "../../src/chat/api"; +import { WorkbenchTimeline } from "../../src/chat/timeline"; let container: HTMLDivElement | null = null; let root: Root | null = null; diff --git a/packages/chat-ui/test/team-avatar-stack.test.tsx b/apps/web/test/chat/team-avatar-stack.test.tsx similarity index 99% rename from packages/chat-ui/test/team-avatar-stack.test.tsx rename to apps/web/test/chat/team-avatar-stack.test.tsx index 0283541bfc..a9ed6bb779 100644 --- a/packages/chat-ui/test/team-avatar-stack.test.tsx +++ b/apps/web/test/chat/team-avatar-stack.test.tsx @@ -95,7 +95,7 @@ function stubFetch(workbenchWire: { }) as typeof fetch; } -const { ChatWorkspace } = await import("../src/chat-workspace"); +const { ChatWorkspace } = await import("../../src/chat/chat-workspace"); const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); diff --git a/packages/chat-ui/test/timeline-jump-to-latest.test.tsx b/apps/web/test/chat/timeline-jump-to-latest.test.tsx similarity index 97% rename from packages/chat-ui/test/timeline-jump-to-latest.test.tsx rename to apps/web/test/chat/timeline-jump-to-latest.test.tsx index 6f6038c8ec..27f571c992 100644 --- a/packages/chat-ui/test/timeline-jump-to-latest.test.tsx +++ b/apps/web/test/chat/timeline-jump-to-latest.test.tsx @@ -8,8 +8,8 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import type { MessageItem } from "../src/api"; -import { WorkbenchTimeline } from "../src/timeline"; +import type { MessageItem } from "../../src/chat/api"; +import { WorkbenchTimeline } from "../../src/chat/timeline"; const realResizeObserver = globalThis.ResizeObserver; diff --git a/packages/chat-ui/test/timeline-scroll-pin.test.tsx b/apps/web/test/chat/timeline-scroll-pin.test.tsx similarity index 97% rename from packages/chat-ui/test/timeline-scroll-pin.test.tsx rename to apps/web/test/chat/timeline-scroll-pin.test.tsx index 6726b6c028..abcbec7357 100644 --- a/packages/chat-ui/test/timeline-scroll-pin.test.tsx +++ b/apps/web/test/chat/timeline-scroll-pin.test.tsx @@ -16,8 +16,8 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import type { MessageItem } from "../src/api"; -import { WorkbenchTimeline } from "../src/timeline"; +import type { MessageItem } from "../../src/chat/api"; +import { WorkbenchTimeline } from "../../src/chat/timeline"; const realResizeObserver = globalThis.ResizeObserver; diff --git a/packages/chat-ui/test/tool-activity-view.test.tsx b/apps/web/test/chat/tool-activity-view.test.tsx similarity index 97% rename from packages/chat-ui/test/tool-activity-view.test.tsx rename to apps/web/test/chat/tool-activity-view.test.tsx index 24e30d53bc..ceb345dcff 100644 --- a/packages/chat-ui/test/tool-activity-view.test.tsx +++ b/apps/web/test/chat/tool-activity-view.test.tsx @@ -8,9 +8,9 @@ import { fileURLToPath } from "node:url"; import { act } from "react"; import { createRoot, type Root } from "react-dom/client"; -import type { ToolTracePart } from "../src/wire/parts"; -import { toToolActivityRow, type ToolActivityRow } from "../src/tool-activity"; -import { LiveToolActivity, ToolActivityGroup } from "../src/tool-activity-view"; +import type { ToolTracePart } from "../../src/chat/wire/parts"; +import { toToolActivityRow, type ToolActivityRow } from "../../src/chat/tool-activity"; +import { LiveToolActivity, ToolActivityGroup } from "../../src/chat/tool-activity-view"; function trace(part: Partial): ToolTracePart { return { @@ -283,7 +283,7 @@ describe("LiveToolActivity", () => { }); const css = readFileSync( - join(dirname(fileURLToPath(import.meta.url)), "../src/styles.css"), + join(dirname(fileURLToPath(import.meta.url)), "../../src/chat/styles.css"), "utf8", ); diff --git a/packages/chat-ui/test/use-streaming-reply.test.tsx b/apps/web/test/chat/use-streaming-reply.test.tsx similarity index 98% rename from packages/chat-ui/test/use-streaming-reply.test.tsx rename to apps/web/test/chat/use-streaming-reply.test.tsx index cd645de99c..4ffec23e07 100644 --- a/packages/chat-ui/test/use-streaming-reply.test.tsx +++ b/apps/web/test/chat/use-streaming-reply.test.tsx @@ -1,5 +1,5 @@ // Real React wiring for `useStreamingReply`, mounted against a DOM (see -// dom-setup.ts) rather than reasoned about via `nextStreamingReplyState` +// dom-environment.ts) rather than reasoned about via `nextStreamingReplyState` // alone — the pure reducer is only "correct" if the effect around it // actually resets on workbench switch, same as `use-typing-indicator.test.tsx` // verifies for `useTypingIndicator`. @@ -8,8 +8,8 @@ import { describe, expect, test } from "bun:test"; import { act, createElement, useState } from "react"; import { createRoot } from "react-dom/client"; -import { useStreamingReply } from "../src/streaming-reply"; -import type { StreamingReplyState } from "../src/streaming-reply"; +import { useStreamingReply } from "../../src/chat/streaming-reply"; +import type { StreamingReplyState } from "../../src/chat/streaming-reply"; import { createFakeClock } from "./fake-clock"; function mount(initialWorkbenchId: string | null, clearMs?: number, minVisibleMs = 0) { diff --git a/packages/chat-ui/test/use-turn-activity.test.tsx b/apps/web/test/chat/use-turn-activity.test.tsx similarity index 97% rename from packages/chat-ui/test/use-turn-activity.test.tsx rename to apps/web/test/chat/use-turn-activity.test.tsx index 29ff770b16..1714d62111 100644 --- a/packages/chat-ui/test/use-turn-activity.test.tsx +++ b/apps/web/test/chat/use-turn-activity.test.tsx @@ -1,5 +1,5 @@ // Real React wiring for `useTurnActivity` + `TurnActivityStrip`, mounted -// against a DOM (see dom-setup.ts) the same way +// against a DOM (see dom-environment.ts) the same way // `test/use-streaming-reply.test.tsx` proves `useStreamingReply`'s effect // wiring rather than reasoning about `nextTurnActivityState` alone — this // proves a live tool call actually renders a chip, and that the strip @@ -9,7 +9,7 @@ import { describe, expect, test } from "bun:test"; import { act, createElement, useState } from "react"; import { createRoot } from "react-dom/client"; -import { useTurnActivity, TurnActivityStrip } from "../src/turn-activity"; +import { useTurnActivity, TurnActivityStrip } from "../../src/chat/turn-activity"; import { createFakeClock } from "./fake-clock"; function mount(initialWorkbenchId: string | null, staleMs?: number) { diff --git a/packages/chat-ui/test/use-typing-indicator.test.tsx b/apps/web/test/chat/use-typing-indicator.test.tsx similarity index 95% rename from packages/chat-ui/test/use-typing-indicator.test.tsx rename to apps/web/test/chat/use-typing-indicator.test.tsx index 55209605de..d695d3cfbb 100644 --- a/packages/chat-ui/test/use-typing-indicator.test.tsx +++ b/apps/web/test/chat/use-typing-indicator.test.tsx @@ -1,5 +1,5 @@ // Real-timer wiring for `useTypingIndicator`, mounted against a DOM (see -// dom-setup.ts) rather than reasoned about via `nextTypingState` alone — +// dom-environment.ts) rather than reasoned about via `nextTypingState` alone — // the pure function is only "correct" if the effects around it actually // arm, re-arm, reset on workbench switch, and tear down a real timer. @@ -7,8 +7,8 @@ import { describe, expect, test } from "bun:test"; import { act, createElement, useState } from "react"; import { createRoot } from "react-dom/client"; -import { useTypingIndicator } from "../src/typing-indicator"; -import type { TypingState } from "../src/typing-indicator"; +import { useTypingIndicator } from "../../src/chat/typing-indicator"; +import type { TypingState } from "../../src/chat/typing-indicator"; const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); diff --git a/packages/chat-ui/test/use-workbench-feed-refresh-scoping.test.tsx b/apps/web/test/chat/use-workbench-feed-refresh-scoping.test.tsx similarity index 97% rename from packages/chat-ui/test/use-workbench-feed-refresh-scoping.test.tsx rename to apps/web/test/chat/use-workbench-feed-refresh-scoping.test.tsx index 19574f0700..bd78ed9c23 100644 --- a/packages/chat-ui/test/use-workbench-feed-refresh-scoping.test.tsx +++ b/apps/web/test/chat/use-workbench-feed-refresh-scoping.test.tsx @@ -10,7 +10,7 @@ import { act, createElement, useState } from "react"; import { createRoot } from "react-dom/client"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import { chatFeedQueryKeyPrefix, useWorkbenchFeed } from "../src/use-workbench-feed"; +import { chatFeedQueryKeyPrefix, useWorkbenchFeed } from "../../src/chat/use-workbench-feed"; const realFetch = globalThis.fetch; diff --git a/packages/chat-ui/test/use-workbench-stream.test.tsx b/apps/web/test/chat/use-workbench-stream.test.tsx similarity index 97% rename from packages/chat-ui/test/use-workbench-stream.test.tsx rename to apps/web/test/chat/use-workbench-stream.test.tsx index a9c82dace2..41fa0d5f2f 100644 --- a/packages/chat-ui/test/use-workbench-stream.test.tsx +++ b/apps/web/test/chat/use-workbench-stream.test.tsx @@ -1,5 +1,5 @@ // Real-timer wiring for `useWorkbenchStream`, mounted against a DOM (see -// dom-setup.ts) with a controllable `EventSource` stand-in so the hook's +// dom-environment.ts) with a controllable `EventSource` stand-in so the hook's // actual reconnect/poll effects run rather than being reasoned about in the // abstract. `backoffDelayMs` itself is covered as a pure function in // test/refresh-and-send.test.ts; this suite proves the wiring around it: @@ -11,7 +11,7 @@ import { afterEach, describe, expect, test } from "bun:test"; import { act, createElement } from "react"; import { createRoot } from "react-dom/client"; -import { parseStreamEventJson, useWorkbenchStream } from "../src/use-workbench-stream"; +import { parseStreamEventJson, useWorkbenchStream } from "../../src/chat/use-workbench-stream"; const realEventSource = globalThis.EventSource; const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); diff --git a/packages/chat-ui/test/workbench-loading-tip.test.tsx b/apps/web/test/chat/workbench-loading-tip.test.tsx similarity index 96% rename from packages/chat-ui/test/workbench-loading-tip.test.tsx rename to apps/web/test/chat/workbench-loading-tip.test.tsx index 995a17924f..260c334b8d 100644 --- a/packages/chat-ui/test/workbench-loading-tip.test.tsx +++ b/apps/web/test/chat/workbench-loading-tip.test.tsx @@ -9,8 +9,8 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import { WorkbenchTimeline } from "../src/timeline"; -import { CHAT_STRINGS } from "../src/strings"; +import { WorkbenchTimeline } from "../../src/chat/timeline"; +import { CHAT_STRINGS } from "../../src/chat/strings"; let container: HTMLDivElement | null = null; let root: Root | null = null; diff --git a/packages/chat-ui/test/workbench-presence.test.ts b/apps/web/test/chat/workbench-presence.test.ts similarity index 98% rename from packages/chat-ui/test/workbench-presence.test.ts rename to apps/web/test/chat/workbench-presence.test.ts index e067ba8475..5164f19b61 100644 --- a/packages/chat-ui/test/workbench-presence.test.ts +++ b/apps/web/test/chat/workbench-presence.test.ts @@ -8,7 +8,7 @@ import { nextPresenceRoster, parsePresenceEvent, parsePresenceSnapshotEvent, -} from "../src/workbench-presence"; +} from "../../src/chat/workbench-presence"; describe("parsePresenceEvent", () => { test("parses a well-formed chat.presence payload", () => { diff --git a/packages/chat-ui/test/workbench-settings-retry.test.tsx b/apps/web/test/chat/workbench-settings-retry.test.tsx similarity index 95% rename from packages/chat-ui/test/workbench-settings-retry.test.tsx rename to apps/web/test/chat/workbench-settings-retry.test.tsx index b6a4b7e9c4..be08e52ba4 100644 --- a/packages/chat-ui/test/workbench-settings-retry.test.tsx +++ b/apps/web/test/chat/workbench-settings-retry.test.tsx @@ -1,5 +1,5 @@ // WorkbenchSettingsSurface moved off a hand-rolled retry-less state -// onto `@corbits/api-query`'s `APIQuery` + `QueryView` — a failed settings +// onto `@/lib/api-query`'s `APIQuery` + `QueryView` — a failed settings // load now offers the shared Retry affordance, and a 401 renders as // sign-in-required rather than the generic error copy. This stands in for // both this package's LoadState consumers (surface.tsx and @@ -10,7 +10,7 @@ import { act, createElement } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import { WorkbenchSettingsSurface } from "../src/workbench-settings"; +import { WorkbenchSettingsSurface } from "../../src/chat/workbench-settings"; const realFetch = globalThis.fetch; afterEach(() => { diff --git a/packages/chat-ui/test/workbenches-mutated-event.test.ts b/apps/web/test/chat/workbenches-mutated-event.test.ts similarity index 99% rename from packages/chat-ui/test/workbenches-mutated-event.test.ts rename to apps/web/test/chat/workbenches-mutated-event.test.ts index 6691c8b411..d36c6e76ff 100644 --- a/packages/chat-ui/test/workbenches-mutated-event.test.ts +++ b/apps/web/test/chat/workbenches-mutated-event.test.ts @@ -5,7 +5,7 @@ import { WORKBENCHES_MUTATED_EVENT, applyStreamWorkbenchesMutated, createWorkbench, -} from "../src/api"; +} from "../../src/chat/api"; if (typeof document === "undefined") { GlobalRegistrator.register(); diff --git a/packages/command-palette/test/bare-prefix-entity-scope.test.ts b/apps/web/test/command-palette/bare-prefix-entity-scope.test.ts similarity index 91% rename from packages/command-palette/test/bare-prefix-entity-scope.test.ts rename to apps/web/test/command-palette/bare-prefix-entity-scope.test.ts index 339cc575d4..9552956273 100644 --- a/packages/command-palette/test/bare-prefix-entity-scope.test.ts +++ b/apps/web/test/command-palette/bare-prefix-entity-scope.test.ts @@ -1,8 +1,8 @@ import { describe, expect, test } from "bun:test"; -import { isBareScopeQuery, parsePaletteQuery } from "../src/scope"; -import { searchEntities } from "../src/entity-search"; -import { buildCommandPaletteGroups } from "../src/command-groups"; +import { isBareScopeQuery, parsePaletteQuery } from "../../src/command-palette/scope"; +import { searchEntities } from "../../src/command-palette/entity-search"; +import { buildCommandPaletteGroups } from "../../src/command-palette/command-groups"; describe("bare `#` scope against entity-search-backed sources", () => { test("a bare # prefix strips to an empty query, and searchEntities returns nothing for an empty query", () => { diff --git a/packages/command-palette/test/command-groups.test.ts b/apps/web/test/command-palette/command-groups.test.ts similarity index 97% rename from packages/command-palette/test/command-groups.test.ts rename to apps/web/test/command-palette/command-groups.test.ts index 67ef8985e4..d89cd33623 100644 --- a/packages/command-palette/test/command-groups.test.ts +++ b/apps/web/test/command-palette/command-groups.test.ts @@ -1,6 +1,9 @@ import { describe, expect, test } from "bun:test"; -import { buildCommandPaletteGroups, type PaletteSource } from "../src/command-groups"; +import { + buildCommandPaletteGroups, + type PaletteSource, +} from "../../src/command-palette/command-groups"; const actions: PaletteSource = { id: "actions", diff --git a/packages/command-palette/test/entity-search.test.ts b/apps/web/test/command-palette/entity-search.test.ts similarity index 97% rename from packages/command-palette/test/entity-search.test.ts rename to apps/web/test/command-palette/entity-search.test.ts index 8199867dc5..d1927aa578 100644 --- a/packages/command-palette/test/entity-search.test.ts +++ b/apps/web/test/command-palette/entity-search.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from "bun:test"; -import { searchEntities } from "../src/entity-search"; +import { searchEntities } from "../../src/command-palette/entity-search"; describe("searchEntities", () => { const sources = [ diff --git a/packages/command-palette/test/recents.test.ts b/apps/web/test/command-palette/recents.test.ts similarity index 99% rename from packages/command-palette/test/recents.test.ts rename to apps/web/test/command-palette/recents.test.ts index 75c84ae95b..33c92e8c9a 100644 --- a/packages/command-palette/test/recents.test.ts +++ b/apps/web/test/command-palette/recents.test.ts @@ -6,7 +6,7 @@ import { removeRecentEntry, type RecentEntry, type RecentsStorage, -} from "../src/recents"; +} from "../../src/command-palette/recents"; function entry(id: string, title = id): RecentEntry { return { kind: "workbench", id, title }; diff --git a/packages/command-palette/test/scope.test.ts b/apps/web/test/command-palette/scope.test.ts similarity index 96% rename from packages/command-palette/test/scope.test.ts rename to apps/web/test/command-palette/scope.test.ts index d791ff5422..3db2455b46 100644 --- a/packages/command-palette/test/scope.test.ts +++ b/apps/web/test/command-palette/scope.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from "bun:test"; -import { isBareScopeQuery, parsePaletteQuery } from "../src/scope"; +import { isBareScopeQuery, parsePaletteQuery } from "../../src/command-palette/scope"; describe("parsePaletteQuery", () => { test("no prefix leaves the whole string unscoped", () => { diff --git a/packages/command-palette/test/static-commands.test.ts b/apps/web/test/command-palette/static-commands.test.ts similarity index 92% rename from packages/command-palette/test/static-commands.test.ts rename to apps/web/test/command-palette/static-commands.test.ts index 7704eeeed1..124633a25b 100644 --- a/packages/command-palette/test/static-commands.test.ts +++ b/apps/web/test/command-palette/static-commands.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from "bun:test"; -import { buildStaticCommands, matchesQuery } from "../src/static-commands"; +import { buildStaticCommands, matchesQuery } from "../../src/command-palette/static-commands"; describe("buildStaticCommands", () => { test("maps real routes to commands, one per route, in order", () => { diff --git a/packages/command-palette/test/use-entity-search.test.tsx b/apps/web/test/command-palette/use-entity-search.test.tsx similarity index 96% rename from packages/command-palette/test/use-entity-search.test.tsx rename to apps/web/test/command-palette/use-entity-search.test.tsx index dc94123a25..e9f48a8fd1 100644 --- a/packages/command-palette/test/use-entity-search.test.tsx +++ b/apps/web/test/command-palette/use-entity-search.test.tsx @@ -2,9 +2,9 @@ import { describe, expect, test } from "bun:test"; import { act, createElement, useState } from "react"; import { createRoot } from "react-dom/client"; -import { useEntitySearch } from "../src/use-entity-search"; -import type { UseEntitySearchResult } from "../src/use-entity-search"; -import type { SearchableEntity } from "../src/entity-search"; +import { useEntitySearch } from "../../src/command-palette/use-entity-search"; +import type { UseEntitySearchResult } from "../../src/command-palette/use-entity-search"; +import type { SearchableEntity } from "../../src/command-palette/entity-search"; const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); diff --git a/packages/context-menu/test/context-menu-view.test.tsx b/apps/web/test/context-menu/context-menu-view.test.tsx similarity index 96% rename from packages/context-menu/test/context-menu-view.test.tsx rename to apps/web/test/context-menu/context-menu-view.test.tsx index 66e8cad373..1cd4cdd401 100644 --- a/packages/context-menu/test/context-menu-view.test.tsx +++ b/apps/web/test/context-menu/context-menu-view.test.tsx @@ -3,9 +3,9 @@ import { act, createElement, useState } from "react"; import { createRoot } from "react-dom/client"; import { Dialog, DialogContent, DialogTitle } from "@corbits/react-ui"; -import { contextMenuItem } from "../src/menu"; -import { ContextMenuView } from "../src/context-menu-view"; -import type { ContextMenu } from "../src/menu"; +import { contextMenuItem } from "../../src/shell/context-menu/lib/menu"; +import { ContextMenuView } from "../../src/shell/context-menu/lib/context-menu-view"; +import type { ContextMenu } from "../../src/shell/context-menu/lib/menu"; const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); diff --git a/packages/context-menu/test/dialog-guard.test.ts b/apps/web/test/context-menu/dialog-guard.test.ts similarity index 93% rename from packages/context-menu/test/dialog-guard.test.ts rename to apps/web/test/context-menu/dialog-guard.test.ts index 9f9872b65b..236f50fb21 100644 --- a/packages/context-menu/test/dialog-guard.test.ts +++ b/apps/web/test/context-menu/dialog-guard.test.ts @@ -1,6 +1,9 @@ import { afterEach, describe, expect, test } from "bun:test"; -import { isBlockingOverlayOpen, isInsideInteractiveInput } from "../src/dialog-guard"; +import { + isBlockingOverlayOpen, + isInsideInteractiveInput, +} from "../../src/shell/context-menu/lib/dialog-guard"; afterEach(() => { document.body.innerHTML = ""; diff --git a/packages/context-menu/test/target-resolver.test.ts b/apps/web/test/context-menu/target-resolver.test.ts similarity index 93% rename from packages/context-menu/test/target-resolver.test.ts rename to apps/web/test/context-menu/target-resolver.test.ts index d2db373154..7744775b33 100644 --- a/packages/context-menu/test/target-resolver.test.ts +++ b/apps/web/test/context-menu/target-resolver.test.ts @@ -1,7 +1,7 @@ import { describe, expect, test } from "bun:test"; -import { resolveTarget } from "../src/target-resolver"; -import type { TargetDefinition } from "../src/target-resolver"; +import { resolveTarget } from "../../src/shell/context-menu/lib/target-resolver"; +import type { TargetDefinition } from "../../src/shell/context-menu/lib/target-resolver"; type Target = | { readonly type: "channel"; readonly id: string } diff --git a/packages/context-menu/test/use-context-menu-state.test.tsx b/apps/web/test/context-menu/use-context-menu-state.test.tsx similarity index 90% rename from packages/context-menu/test/use-context-menu-state.test.tsx rename to apps/web/test/context-menu/use-context-menu-state.test.tsx index f3dd216920..9fcb8b5275 100644 --- a/packages/context-menu/test/use-context-menu-state.test.tsx +++ b/apps/web/test/context-menu/use-context-menu-state.test.tsx @@ -2,9 +2,9 @@ import { describe, expect, test } from "bun:test"; import { act, createElement } from "react"; import { createRoot } from "react-dom/client"; -import { contextMenuItem } from "../src/menu"; -import { useContextMenuState } from "../src/use-context-menu-state"; -import type { ContextMenuState } from "../src/use-context-menu-state"; +import { contextMenuItem } from "../../src/shell/context-menu/lib/menu"; +import { useContextMenuState } from "../../src/shell/context-menu/lib/use-context-menu-state"; +import type { ContextMenuState } from "../../src/shell/context-menu/lib/use-context-menu-state"; function mount() { const container = document.createElement("div"); diff --git a/packages/context-menu/test/use-document-context-menu-trigger.test.tsx b/apps/web/test/context-menu/use-document-context-menu-trigger.test.tsx similarity index 92% rename from packages/context-menu/test/use-document-context-menu-trigger.test.tsx rename to apps/web/test/context-menu/use-document-context-menu-trigger.test.tsx index 72f1e127bc..4089a255fe 100644 --- a/packages/context-menu/test/use-document-context-menu-trigger.test.tsx +++ b/apps/web/test/context-menu/use-document-context-menu-trigger.test.tsx @@ -2,9 +2,9 @@ import { afterEach, describe, expect, test } from "bun:test"; import { act, createElement } from "react"; import { createRoot } from "react-dom/client"; -import { contextMenuItem } from "../src/menu"; -import { useDocumentContextMenuTrigger } from "../src/use-document-context-menu-trigger"; -import type { ContextMenu } from "../src/menu"; +import { contextMenuItem } from "../../src/shell/context-menu/lib/menu"; +import { useDocumentContextMenuTrigger } from "../../src/shell/context-menu/lib/use-document-context-menu-trigger"; +import type { ContextMenu } from "../../src/shell/context-menu/lib/menu"; const MENU: ContextMenu = { entries: [contextMenuItem({ id: "open", label: "Open", onSelect: () => undefined })], diff --git a/apps/web/test/library-artifacts.test.ts b/apps/web/test/library-artifacts.test.ts index 070ed29bf2..6dfe20171a 100644 --- a/apps/web/test/library-artifacts.test.ts +++ b/apps/web/test/library-artifacts.test.ts @@ -1,6 +1,6 @@ import { afterEach, describe, expect, test } from "bun:test"; -import { UnauthenticatedError } from "@corbits/api-query"; +import { UnauthenticatedError } from "@/lib/api-query"; import { artifactListRowToSummary, isArtifactsUnavailableStatus, diff --git a/packages/artifact-ui/test/artifact-card.test.tsx b/apps/web/test/library/artifact-card.test.tsx similarity index 90% rename from packages/artifact-ui/test/artifact-card.test.tsx rename to apps/web/test/library/artifact-card.test.tsx index a0ab265b06..78b2d899e5 100644 --- a/packages/artifact-ui/test/artifact-card.test.tsx +++ b/apps/web/test/library/artifact-card.test.tsx @@ -5,8 +5,8 @@ import { describe, expect, test } from "bun:test"; import { renderToStaticMarkup } from "react-dom/server"; -import { ArtifactCard } from "../src/artifact-card"; -import type { ArtifactSummary } from "../src/types"; +import { ArtifactCard } from "../../src/library/artifact-card"; +import type { ArtifactSummary } from "@corbits/artifact-ui/types"; function artifact(overrides: Partial & { readonly id: string }): ArtifactSummary { return { diff --git a/packages/artifact-ui/test/artifact-renderer.test.tsx b/apps/web/test/library/artifact-renderer.test.tsx similarity index 98% rename from packages/artifact-ui/test/artifact-renderer.test.tsx rename to apps/web/test/library/artifact-renderer.test.tsx index 2cb2921804..b8fed649d1 100644 --- a/packages/artifact-ui/test/artifact-renderer.test.tsx +++ b/apps/web/test/library/artifact-renderer.test.tsx @@ -8,7 +8,7 @@ import { describe, expect, test } from "bun:test"; import { renderToStaticMarkup } from "react-dom/server"; import { CSV_ROW_CAP } from "@corbits/react-ui"; -import { ArtifactRenderer } from "../src/artifact-renderer"; +import { ArtifactRenderer } from "../../src/library/artifact-renderer"; function oversizedCsv(rowCount: number): string { const header = "id,name\n"; diff --git a/packages/artifact-ui/test/artifacts.test.ts b/apps/web/test/library/artifacts.test.ts similarity index 98% rename from packages/artifact-ui/test/artifacts.test.ts rename to apps/web/test/library/artifacts.test.ts index 3fc4d11fd6..e1466d663c 100644 --- a/packages/artifact-ui/test/artifacts.test.ts +++ b/apps/web/test/library/artifacts.test.ts @@ -4,7 +4,7 @@ import { describe, expect, test } from "bun:test"; -import { ArtifactSummary, filterArtifacts, sortArtifacts } from "../src/index"; +import { ArtifactSummary, filterArtifacts, sortArtifacts } from "../../src/library/index"; function artifact(overrides: Partial & { readonly id: string }): ArtifactSummary { return { diff --git a/apps/web/test/mission-control-page.test.tsx b/apps/web/test/mission-control-page.test.tsx index 17ce1b91e5..43d2c826a3 100644 --- a/apps/web/test/mission-control-page.test.tsx +++ b/apps/web/test/mission-control-page.test.tsx @@ -3,7 +3,7 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import type { Workbench } from "@corbits/chat-ui"; +import type { Workbench } from "@/chat"; import { FIRE_RUNNING_WINDOW_MS } from "@corbits/workflows/client"; import { BenchContext, type BenchState } from "../src/bench-context"; diff --git a/apps/web/test/page-type-drift.ts b/apps/web/test/page-type-drift.ts index a15fae1ec5..e45f68e96d 100644 --- a/apps/web/test/page-type-drift.ts +++ b/apps/web/test/page-type-drift.ts @@ -4,7 +4,7 @@ // below stop compiling. import { PrincipalSummary, paginatedSchema } from "@intx/types"; -import type { APIQuery } from "@corbits/api-query"; +import type { APIQuery } from "@/lib/api-query"; import type { PrincipalsPage, Principal } from "../src/api"; const _schema = paginatedSchema(PrincipalSummary); diff --git a/apps/web/test/pages.test.tsx b/apps/web/test/pages.test.tsx index 6c8d30a104..1a8c4e4fc2 100644 --- a/apps/web/test/pages.test.tsx +++ b/apps/web/test/pages.test.tsx @@ -4,7 +4,7 @@ import { describe, expect, test } from "bun:test"; import { renderToStaticMarkup } from "react-dom/server"; -import type { ArtifactSummary } from "@corbits/artifact-ui"; +import type { ArtifactSummary } from "@/library"; import { BenchProvider } from "../src/bench-context"; import { NavigationProvider } from "../src/navigation"; diff --git a/apps/web/test/plugins-page.test.tsx b/apps/web/test/plugins-page.test.tsx index 7857168855..49149f28cb 100644 --- a/apps/web/test/plugins-page.test.tsx +++ b/apps/web/test/plugins-page.test.tsx @@ -2,7 +2,7 @@ // wiring through `listPluginsForTenant` (chain-aware credential resolve, // not the tenant-local list route) and `../skills-api.ts`, rendered // through `PluginsGallery`. Card/search/tab behavior itself is covered in -// `@corbits/plugins-ui`'s own tests — this proves the page composes real +// `@/tools`'s own tests — this proves the page composes real // data into that component correctly. import { afterEach, describe, expect, spyOn, test } from "bun:test"; diff --git a/apps/web/test/query-client.test.ts b/apps/web/test/query-client.test.ts index 459eb29d13..89540cd3cf 100644 --- a/apps/web/test/query-client.test.ts +++ b/apps/web/test/query-client.test.ts @@ -1,6 +1,6 @@ // Query-key helpers — pure unit coverage so the TanStack cutover does not // depend only on page-level smoke. The APIQuery adapter itself -// (`toAPIQuery`) is covered in `@corbits/api-query`. +// (`toAPIQuery`) is covered in `@/lib/api-query`. import { describe, expect, test } from "bun:test"; diff --git a/apps/web/test/settings-access.test.tsx b/apps/web/test/settings-access.test.tsx index 19f2da0938..21c5781714 100644 --- a/apps/web/test/settings-access.test.tsx +++ b/apps/web/test/settings-access.test.tsx @@ -1,11 +1,11 @@ // The app's cached settings-access probe must agree with -// `@corbits/settings-ui`'s mapping: evaluate effect !== allow is deny; +// `@/settings`'s mapping: evaluate effect !== allow is deny; // a thrown probe is error, not deny. import { afterEach, describe, expect, test } from "bun:test"; import { act } from "react"; import { createRoot, type Root } from "react-dom/client"; -import type { TenancyAccess } from "@corbits/settings-ui"; +import type { TenancyAccess } from "@/settings"; import { useSettingsAccess } from "../src/settings-access"; import { createTestQueryClient, TestQueryProvider } from "./test-query-provider"; diff --git a/apps/web/test/settings-page.test.tsx b/apps/web/test/settings-page.test.tsx index 5bc7a6d8a0..4fe78f6d3b 100644 --- a/apps/web/test/settings-page.test.tsx +++ b/apps/web/test/settings-page.test.tsx @@ -7,7 +7,7 @@ import { afterEach, describe, expect, test } from "bun:test"; import { act } from "react"; import { createRoot, type Root } from "react-dom/client"; import { QueryClient } from "@tanstack/react-query"; -import { SETTINGS_STRINGS, type TenancyAccess } from "@corbits/settings-ui"; +import { SETTINGS_STRINGS, type TenancyAccess } from "@/settings"; import type { PrincipalsPage } from "../src/api"; import { BenchProvider } from "../src/bench-context"; diff --git a/packages/settings-ui/test/access.test.ts b/apps/web/test/settings/access.test.ts similarity index 96% rename from packages/settings-ui/test/access.test.ts rename to apps/web/test/settings/access.test.ts index b8828dd3aa..e382e43846 100644 --- a/packages/settings-ui/test/access.test.ts +++ b/apps/web/test/settings/access.test.ts @@ -5,7 +5,7 @@ import { afterEach, describe, expect, test } from "bun:test"; -import { coalesceSectionAccess, probeSectionAccess } from "../src/access"; +import { coalesceSectionAccess, probeSectionAccess } from "../../src/settings/access"; const realFetch = globalThis.fetch; diff --git a/packages/settings-ui/test/account-section.test.tsx b/apps/web/test/settings/account-section.test.tsx similarity index 98% rename from packages/settings-ui/test/account-section.test.tsx rename to apps/web/test/settings/account-section.test.tsx index aa121517ce..ce3d3a9e57 100644 --- a/packages/settings-ui/test/account-section.test.tsx +++ b/apps/web/test/settings/account-section.test.tsx @@ -9,7 +9,7 @@ import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; import { ThemeProvider } from "@corbits/react-ui"; -import { AccountSectionView, AppearanceSection } from "../src/account-section"; +import { AccountSectionView, AppearanceSection } from "../../src/settings/account-section"; let container: HTMLDivElement | null = null; let root: Root | null = null; diff --git a/packages/settings-ui/test/api-request.test.ts b/apps/web/test/settings/api-request.test.ts similarity index 97% rename from packages/settings-ui/test/api-request.test.ts rename to apps/web/test/settings/api-request.test.ts index f0062b67aa..30323b0cd4 100644 --- a/packages/settings-ui/test/api-request.test.ts +++ b/apps/web/test/settings/api-request.test.ts @@ -4,7 +4,7 @@ import { describe, expect, test } from "bun:test"; -import { apiRequest, readErrorEnvelope } from "../src/api-request"; +import { apiRequest, readErrorEnvelope } from "../../src/settings/api-request"; class FakeApiError extends Error { constructor( diff --git a/packages/settings-ui/test/api.test.ts b/apps/web/test/settings/api.test.ts similarity index 94% rename from packages/settings-ui/test/api.test.ts rename to apps/web/test/settings/api.test.ts index 1d775bc86a..92cc236f82 100644 --- a/packages/settings-ui/test/api.test.ts +++ b/apps/web/test/settings/api.test.ts @@ -4,8 +4,8 @@ import { afterEach, describe, expect, test } from "bun:test"; -import { UnauthenticatedError } from "@corbits/api-query"; -import { SettingsApiError, getAccount, renameBench } from "../src/api"; +import { UnauthenticatedError } from "@/lib/api-query"; +import { SettingsApiError, getAccount, renameBench } from "../../src/settings/api"; const realFetch = globalThis.fetch; diff --git a/packages/settings-ui/test/connections-api.test.ts b/apps/web/test/settings/connections-api.test.ts similarity index 99% rename from packages/settings-ui/test/connections-api.test.ts rename to apps/web/test/settings/connections-api.test.ts index d9575ca688..f99a998c5c 100644 --- a/packages/settings-ui/test/connections-api.test.ts +++ b/apps/web/test/settings/connections-api.test.ts @@ -8,7 +8,7 @@ import { completeConnectorCredential, disconnectConnector, fetchOAuthConfigured, -} from "../src/connections-api"; +} from "../../src/settings/connections-api"; const realFetch = globalThis.fetch; diff --git a/packages/settings-ui/test/connections-default-model-pick.test.tsx b/apps/web/test/settings/connections-default-model-pick.test.tsx similarity index 99% rename from packages/settings-ui/test/connections-default-model-pick.test.tsx rename to apps/web/test/settings/connections-default-model-pick.test.tsx index a839ef5164..ac47fb6f23 100644 --- a/packages/settings-ui/test/connections-default-model-pick.test.tsx +++ b/apps/web/test/settings/connections-default-model-pick.test.tsx @@ -9,7 +9,7 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import { ConnectionsSection } from "../src/connections-section"; +import { ConnectionsSection } from "../../src/settings/connections-section"; const realFetch = globalThis.fetch; afterEach(() => { diff --git a/packages/settings-ui/test/connections-disconnect-flow.test.tsx b/apps/web/test/settings/connections-disconnect-flow.test.tsx similarity index 98% rename from packages/settings-ui/test/connections-disconnect-flow.test.tsx rename to apps/web/test/settings/connections-disconnect-flow.test.tsx index fe6e048961..afdd8fc6a2 100644 --- a/packages/settings-ui/test/connections-disconnect-flow.test.tsx +++ b/apps/web/test/settings/connections-disconnect-flow.test.tsx @@ -11,7 +11,7 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import { ConnectionsSection } from "../src/connections-section"; +import { ConnectionsSection } from "../../src/settings/connections-section"; const realFetch = globalThis.fetch; afterEach(() => { diff --git a/packages/settings-ui/test/connections-pinned-tooltip.test.tsx b/apps/web/test/settings/connections-pinned-tooltip.test.tsx similarity index 96% rename from packages/settings-ui/test/connections-pinned-tooltip.test.tsx rename to apps/web/test/settings/connections-pinned-tooltip.test.tsx index cc2a6a518f..1765e571ad 100644 --- a/packages/settings-ui/test/connections-pinned-tooltip.test.tsx +++ b/apps/web/test/settings/connections-pinned-tooltip.test.tsx @@ -6,7 +6,7 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import { ConnectionsSection } from "../src/connections-section"; +import { ConnectionsSection } from "../../src/settings/connections-section"; const realFetch = globalThis.fetch; afterEach(() => { diff --git a/packages/settings-ui/test/connections-refresh-on-visibility.test.tsx b/apps/web/test/settings/connections-refresh-on-visibility.test.tsx similarity index 98% rename from packages/settings-ui/test/connections-refresh-on-visibility.test.tsx rename to apps/web/test/settings/connections-refresh-on-visibility.test.tsx index ec1e6f3654..cae6669e9c 100644 --- a/packages/settings-ui/test/connections-refresh-on-visibility.test.tsx +++ b/apps/web/test/settings/connections-refresh-on-visibility.test.tsx @@ -8,7 +8,7 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import { ConnectionsSection } from "../src/connections-section"; +import { ConnectionsSection } from "../../src/settings/connections-section"; const realFetch = globalThis.fetch; afterEach(() => { diff --git a/packages/settings-ui/test/connections-status-visuals.test.tsx b/apps/web/test/settings/connections-status-visuals.test.tsx similarity index 97% rename from packages/settings-ui/test/connections-status-visuals.test.tsx rename to apps/web/test/settings/connections-status-visuals.test.tsx index 293ab6611e..d9e9131f07 100644 --- a/packages/settings-ui/test/connections-status-visuals.test.tsx +++ b/apps/web/test/settings/connections-status-visuals.test.tsx @@ -8,7 +8,7 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import { ConnectionsSection } from "../src/connections-section"; +import { ConnectionsSection } from "../../src/settings/connections-section"; const realFetch = globalThis.fetch; afterEach(() => { diff --git a/packages/settings-ui/test/connector-credential-dialog.test.tsx b/apps/web/test/settings/connector-credential-dialog.test.tsx similarity index 97% rename from packages/settings-ui/test/connector-credential-dialog.test.tsx rename to apps/web/test/settings/connector-credential-dialog.test.tsx index cdaa880f57..22162f78c0 100644 --- a/packages/settings-ui/test/connector-credential-dialog.test.tsx +++ b/apps/web/test/settings/connector-credential-dialog.test.tsx @@ -13,8 +13,8 @@ import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; import type { ConnectorDescriptor } from "@corbits/connections/registry"; -import { ConnectorCredentialDialog } from "../src/connections-section"; -import { SETTINGS_STRINGS } from "../src/strings"; +import { ConnectorCredentialDialog } from "../../src/settings/connections-section"; +import { SETTINGS_STRINGS } from "../../src/settings/strings"; const realFetch = globalThis.fetch; afterEach(() => { diff --git a/packages/settings-ui/test/credentials-api.test.ts b/apps/web/test/settings/credentials-api.test.ts similarity index 98% rename from packages/settings-ui/test/credentials-api.test.ts rename to apps/web/test/settings/credentials-api.test.ts index 5e3fbd9c27..e1c711f736 100644 --- a/packages/settings-ui/test/credentials-api.test.ts +++ b/apps/web/test/settings/credentials-api.test.ts @@ -8,7 +8,7 @@ import { deleteCredential, listCredentials, listProviders, -} from "../src/credentials-api"; +} from "../../src/settings/credentials-api"; const realFetch = globalThis.fetch; diff --git a/packages/settings-ui/test/granola-webhook-api.test.ts b/apps/web/test/settings/granola-webhook-api.test.ts similarity index 99% rename from packages/settings-ui/test/granola-webhook-api.test.ts rename to apps/web/test/settings/granola-webhook-api.test.ts index d27af3d925..002e184d28 100644 --- a/packages/settings-ui/test/granola-webhook-api.test.ts +++ b/apps/web/test/settings/granola-webhook-api.test.ts @@ -14,7 +14,7 @@ import { rotateGranolaWebhookTriggerSecret, sampleGranolaWebhookPayload, webhookTriggerUrl, -} from "../src/granola-webhook-api"; +} from "../../src/settings/granola-webhook-api"; const realFetch = globalThis.fetch; afterEach(() => { diff --git a/packages/settings-ui/test/granola-webhook-card.test.tsx b/apps/web/test/settings/granola-webhook-card.test.tsx similarity index 99% rename from packages/settings-ui/test/granola-webhook-card.test.tsx rename to apps/web/test/settings/granola-webhook-card.test.tsx index f7285d8187..72cdb90640 100644 --- a/packages/settings-ui/test/granola-webhook-card.test.tsx +++ b/apps/web/test/settings/granola-webhook-card.test.tsx @@ -10,7 +10,7 @@ import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; import type { ConnectorDescriptor } from "@corbits/connections/registry"; -import { GranolaWebhookCard } from "../src/granola-webhook-card"; +import { GranolaWebhookCard } from "../../src/settings/granola-webhook-card"; const realFetch = globalThis.fetch; afterEach(() => { diff --git a/packages/settings-ui/test/granola-webhook-manage-state.test.tsx b/apps/web/test/settings/granola-webhook-manage-state.test.tsx similarity index 97% rename from packages/settings-ui/test/granola-webhook-manage-state.test.tsx rename to apps/web/test/settings/granola-webhook-manage-state.test.tsx index 51fbc7d196..a8b8ee56f9 100644 --- a/packages/settings-ui/test/granola-webhook-manage-state.test.tsx +++ b/apps/web/test/settings/granola-webhook-manage-state.test.tsx @@ -10,7 +10,7 @@ import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; import type { ConnectorDescriptor } from "@corbits/connections/registry"; -import { GranolaWebhookCard } from "../src/granola-webhook-card"; +import { GranolaWebhookCard } from "../../src/settings/granola-webhook-card"; const realFetch = globalThis.fetch; afterEach(() => { diff --git a/packages/settings-ui/test/grant-preview.test.ts b/apps/web/test/settings/grant-preview.test.ts similarity index 97% rename from packages/settings-ui/test/grant-preview.test.ts rename to apps/web/test/settings/grant-preview.test.ts index 8e24a7103d..2b2d6aa663 100644 --- a/packages/settings-ui/test/grant-preview.test.ts +++ b/apps/web/test/settings/grant-preview.test.ts @@ -4,7 +4,7 @@ import { expiryIsoFromPreset, expiryLabelFromPreset, grantPreviewSentence, -} from "../src/grant-preview"; +} from "../../src/settings/grant-preview"; describe("grantPreviewSentence", () => { test("defaults the subject when no target is chosen", () => { diff --git a/packages/settings-ui/test/grants-section.test.tsx b/apps/web/test/settings/grants-section.test.tsx similarity index 96% rename from packages/settings-ui/test/grants-section.test.tsx rename to apps/web/test/settings/grants-section.test.tsx index b949e0fcd3..3299527cd9 100644 --- a/packages/settings-ui/test/grants-section.test.tsx +++ b/apps/web/test/settings/grants-section.test.tsx @@ -15,8 +15,8 @@ import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; import { renderToStaticMarkup } from "react-dom/server"; -import { CreateGrantDialog, GrantsTable } from "../src/grants-section"; -import { PRINCIPAL_KIND_LABEL, PRINCIPAL_KIND_ORDER } from "../src/identity"; +import { CreateGrantDialog, GrantsTable } from "../../src/settings/grants-section"; +import { PRINCIPAL_KIND_LABEL, PRINCIPAL_KIND_ORDER } from "../../src/settings/identity"; const timestamps = { createdAt: "2026-01-01T00:00:00.000Z", diff --git a/packages/settings-ui/test/identity.test.ts b/apps/web/test/settings/identity.test.ts similarity index 95% rename from packages/settings-ui/test/identity.test.ts rename to apps/web/test/settings/identity.test.ts index 73cb433391..ed027db57b 100644 --- a/packages/settings-ui/test/identity.test.ts +++ b/apps/web/test/settings/identity.test.ts @@ -3,7 +3,11 @@ import { describe, expect, test } from "bun:test"; -import { PRINCIPAL_KIND_LABEL, PRINCIPAL_KIND_ORDER, principalLabel } from "../src/identity"; +import { + PRINCIPAL_KIND_LABEL, + PRINCIPAL_KIND_ORDER, + principalLabel, +} from "../../src/settings/identity"; describe("principalLabel", () => { test("passes through an already-humane display name unchanged", () => { diff --git a/packages/settings-ui/test/oauth-start-href.test.ts b/apps/web/test/settings/oauth-start-href.test.ts similarity index 93% rename from packages/settings-ui/test/oauth-start-href.test.ts rename to apps/web/test/settings/oauth-start-href.test.ts index 0b9bc1b89f..e940f127c4 100644 --- a/packages/settings-ui/test/oauth-start-href.test.ts +++ b/apps/web/test/settings/oauth-start-href.test.ts @@ -5,7 +5,7 @@ // github-oauth-connect suite drives this same literal end to end, so a // change here that isn't mirrored there fails one side or the other. import { describe, expect, test } from "bun:test"; -import { oauthStartHref } from "../src/connections-section"; +import { oauthStartHref } from "../../src/settings/connections-section"; describe("oauthStartHref", () => { test("targets the tenant-scoped connections/oauth mount", () => { diff --git a/packages/settings-ui/test/people-section.test.tsx b/apps/web/test/settings/people-section.test.tsx similarity index 94% rename from packages/settings-ui/test/people-section.test.tsx rename to apps/web/test/settings/people-section.test.tsx index eeeb4f47f9..6c034b0487 100644 --- a/packages/settings-ui/test/people-section.test.tsx +++ b/apps/web/test/settings/people-section.test.tsx @@ -9,25 +9,35 @@ // The People table's Actions cells must not inherit page-fill's // nowrap+ellipsis clip, or Suspend/Remove controls get truncated. -import { afterEach, describe, expect, mock, test } from "bun:test"; +import { afterAll, afterEach, describe, expect, spyOn, test } from "bun:test"; import { readFileSync } from "node:fs"; import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; import { renderToStaticMarkup } from "react-dom/server"; +import * as errorSink from "@corbits/error-sink"; + const reportErrorCalls: { error: unknown; context: Record; }[] = []; -mock.module("@corbits/error-sink", () => ({ - reportError: (error: unknown, context: Record) => { +// A `spyOn` mock is per-property and restorable — unlike `mock.module`, +// which patches the shared module registry for the whole test process and +// would otherwise leak this fake "ref_test" id into every other suite that +// imports `@corbits/error-sink` (e.g. useStreamingReply's ref-id tests). +const reportErrorSpy = spyOn(errorSink, "reportError").mockImplementation( + (error: unknown, context: Record) => { reportErrorCalls.push({ error, context }); return "ref_test"; }, -})); +); + +const { PeopleSection, PeopleTable } = await import("../../src/settings/people-section"); -const { PeopleSection, PeopleTable } = await import("../src/people-section"); +afterAll(() => { + reportErrorSpy.mockRestore(); +}); const realFetch = globalThis.fetch; afterEach(() => { @@ -440,7 +450,7 @@ describe("PeopleTable Actions column", () => { expect(actionsCellOpenTag(markup)).toContain("settings-actions-cell"); expect(markup).toContain("Remove"); - const css = readFileSync(new URL("../src/styles.css", import.meta.url), "utf8"); + const css = readFileSync(new URL("../../src/settings/styles.css", import.meta.url), "utf8"); const cell = ruleFor(css, "settings-actions-cell"); expect(cell).toContain("overflow: visible"); expect(cell).toContain("min-width"); diff --git a/packages/settings-ui/test/query-retry.test.tsx b/apps/web/test/settings/query-retry.test.tsx similarity index 94% rename from packages/settings-ui/test/query-retry.test.tsx rename to apps/web/test/settings/query-retry.test.tsx index ea5ccd96a8..54d140df8a 100644 --- a/packages/settings-ui/test/query-retry.test.tsx +++ b/apps/web/test/settings/query-retry.test.tsx @@ -1,5 +1,5 @@ -// Settings-ui's sections moved off the retry-less `LoadState` onto -// `@corbits/api-query`'s `APIQuery` + `QueryView`, so a failed section load +// settings-ui's sections moved off the retry-less `LoadState` onto +// `@/lib/api-query`'s `APIQuery` + `QueryView`, so a failed section load // now offers the same Retry affordance every other query in the app does. // One section (PeopleSection) stands in for every section here — each one // wires the same `describeQueryError`/retry pattern, so this is a check on @@ -10,7 +10,7 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import { PeopleSection } from "../src/people-section"; +import { PeopleSection } from "../../src/settings/people-section"; const realFetch = globalThis.fetch; afterEach(() => { diff --git a/packages/settings-ui/test/raw-id-sweep.test.tsx b/apps/web/test/settings/raw-id-sweep.test.tsx similarity index 92% rename from packages/settings-ui/test/raw-id-sweep.test.tsx rename to apps/web/test/settings/raw-id-sweep.test.tsx index 9110b6cebe..b790244e38 100644 --- a/packages/settings-ui/test/raw-id-sweep.test.tsx +++ b/apps/web/test/settings/raw-id-sweep.test.tsx @@ -9,10 +9,10 @@ import { describe, expect, test } from "bun:test"; import { renderToStaticMarkup } from "react-dom/server"; -import { AccountSectionView } from "../src/account-section"; -import { GrantsTable } from "../src/grants-section"; -import { PeopleTable } from "../src/people-section"; -import { RolesTable } from "../src/roles-section"; +import { AccountSectionView } from "../../src/settings/account-section"; +import { GrantsTable } from "../../src/settings/grants-section"; +import { PeopleTable } from "../../src/settings/people-section"; +import { RolesTable } from "../../src/settings/roles-section"; const AGENT_REF_ID = "agt_8f14e45fceea167a5a36dedd4bea2543"; const UUID_PATTERN = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i; diff --git a/packages/settings-ui/test/resource-vocabulary.test.ts b/apps/web/test/settings/resource-vocabulary.test.ts similarity index 94% rename from packages/settings-ui/test/resource-vocabulary.test.ts rename to apps/web/test/settings/resource-vocabulary.test.ts index 1066a3aeba..f43d2df19a 100644 --- a/packages/settings-ui/test/resource-vocabulary.test.ts +++ b/apps/web/test/settings/resource-vocabulary.test.ts @@ -5,7 +5,7 @@ import { describe, expect, test } from "bun:test"; -import { GRANT_RESOURCES, GRANT_RESOURCE_LABEL } from "../src/resource-vocabulary"; +import { GRANT_RESOURCES, GRANT_RESOURCE_LABEL } from "../../src/settings/resource-vocabulary"; describe("GRANT_RESOURCE_LABEL", () => { test("covers every resource in GRANT_RESOURCES with a distinct, plain-language label", () => { diff --git a/packages/settings-ui/test/roles-section.test.tsx b/apps/web/test/settings/roles-section.test.tsx similarity index 96% rename from packages/settings-ui/test/roles-section.test.tsx rename to apps/web/test/settings/roles-section.test.tsx index 7d0fc9a2ba..487cecfeeb 100644 --- a/packages/settings-ui/test/roles-section.test.tsx +++ b/apps/web/test/settings/roles-section.test.tsx @@ -11,7 +11,7 @@ import { describe, expect, test } from "bun:test"; import { readFileSync } from "node:fs"; import { renderToStaticMarkup } from "react-dom/server"; -import { RoleAssignments, RolesTable } from "../src/roles-section"; +import { RoleAssignments, RolesTable } from "../../src/settings/roles-section"; const timestamps = { createdAt: "2026-01-01T00:00:00.000Z", @@ -154,7 +154,7 @@ describe("RolesTable Actions column", () => { expect(actionsCellOpenTag(markup)).toContain("settings-actions-cell"); - const css = readFileSync(new URL("../src/styles.css", import.meta.url), "utf8"); + const css = readFileSync(new URL("../../src/settings/styles.css", import.meta.url), "utf8"); const cell = ruleFor(css, "settings-actions-cell"); expect(cell).toContain("overflow: visible"); expect(cell).toContain("min-width"); diff --git a/packages/settings-ui/test/section-registry.test.tsx b/apps/web/test/settings/section-registry.test.tsx similarity index 95% rename from packages/settings-ui/test/section-registry.test.tsx rename to apps/web/test/settings/section-registry.test.tsx index 11eb620241..4e0f2e9a2d 100644 --- a/packages/settings-ui/test/section-registry.test.tsx +++ b/apps/web/test/settings/section-registry.test.tsx @@ -9,11 +9,14 @@ // account. import { describe, expect, test } from "bun:test"; -import { Robot } from "@corbits/icons"; - -import { insertEveryoneSections, resolveSettingsSectionGroups } from "../src/section-registry"; -import type { TenancyAccess } from "../src/access"; -import type { SettingsSection } from "../src/shell"; +import { Robot } from "@/lib/icons"; + +import { + insertEveryoneSections, + resolveSettingsSectionGroups, +} from "../../src/settings/section-registry"; +import type { TenancyAccess } from "../../src/settings/access"; +import type { SettingsSection } from "../../src/settings/shell"; const denied: TenancyAccess = { people: "denied", diff --git a/packages/settings-ui/test/shell.test.tsx b/apps/web/test/settings/shell.test.tsx similarity index 94% rename from packages/settings-ui/test/shell.test.tsx rename to apps/web/test/settings/shell.test.tsx index f4b52a4da8..e0392157d8 100644 --- a/packages/settings-ui/test/shell.test.tsx +++ b/apps/web/test/settings/shell.test.tsx @@ -3,10 +3,10 @@ // an empty registry is its own distinct outcome. import { describe, expect, test } from "bun:test"; -import { Bell } from "@corbits/icons"; +import { Bell } from "@/lib/icons"; -import { flattenSettingsSections, resolveActiveSection } from "../src/shell"; -import type { SettingsSection, SettingsSectionGroup } from "../src/shell"; +import { flattenSettingsSections, resolveActiveSection } from "../../src/settings/shell"; +import type { SettingsSection, SettingsSectionGroup } from "../../src/settings/shell"; function section(id: string): SettingsSection { return { id, title: id, icon: Bell, render: () =>
{id}
}; diff --git a/packages/settings-ui/test/strings.test.ts b/apps/web/test/settings/strings.test.ts similarity index 93% rename from packages/settings-ui/test/strings.test.ts rename to apps/web/test/settings/strings.test.ts index 9eae3fd4d4..6d3c3ad5dd 100644 --- a/packages/settings-ui/test/strings.test.ts +++ b/apps/web/test/settings/strings.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from "bun:test"; -import { SETTINGS_STRINGS } from "../src/strings"; +import { SETTINGS_STRINGS } from "../../src/settings/strings"; function stringValues(value: unknown): string[] { if (typeof value === "string") return [value]; diff --git a/packages/settings-ui/test/tenancy-api.test.ts b/apps/web/test/settings/tenancy-api.test.ts similarity index 98% rename from packages/settings-ui/test/tenancy-api.test.ts rename to apps/web/test/settings/tenancy-api.test.ts index e151589016..65a55c9f5e 100644 --- a/packages/settings-ui/test/tenancy-api.test.ts +++ b/apps/web/test/settings/tenancy-api.test.ts @@ -4,7 +4,7 @@ import { afterEach, describe, expect, test } from "bun:test"; -import { UnauthenticatedError } from "@corbits/api-query"; +import { UnauthenticatedError } from "@/lib/api-query"; import { TenancyApiError, assignRole, @@ -18,7 +18,7 @@ import { revokeGrant, unassignRole, updatePrincipalStatus, -} from "../src/tenancy-api"; +} from "../../src/settings/tenancy-api"; const realFetch = globalThis.fetch; diff --git a/packages/settings-ui/test/webhook-secret-panel.test.tsx b/apps/web/test/settings/webhook-secret-panel.test.tsx similarity index 97% rename from packages/settings-ui/test/webhook-secret-panel.test.tsx rename to apps/web/test/settings/webhook-secret-panel.test.tsx index c70394c082..f8163bdd74 100644 --- a/packages/settings-ui/test/webhook-secret-panel.test.tsx +++ b/apps/web/test/settings/webhook-secret-panel.test.tsx @@ -8,7 +8,7 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import { WebhookSecretPanel } from "../src/webhook-secret-panel"; +import { WebhookSecretPanel } from "../../src/settings/webhook-secret-panel"; function mount(element: React.ReactElement): { container: HTMLDivElement; diff --git a/packages/shell-layout/test/shell-layout-hook.test.tsx b/apps/web/test/shell-layout/shell-layout-hook.test.tsx similarity index 93% rename from packages/shell-layout/test/shell-layout-hook.test.tsx rename to apps/web/test/shell-layout/shell-layout-hook.test.tsx index 9bf69592f1..83c01e891d 100644 --- a/packages/shell-layout/test/shell-layout-hook.test.tsx +++ b/apps/web/test/shell-layout/shell-layout-hook.test.tsx @@ -1,7 +1,7 @@ // The first tests in this package that need a live DOM: `useShellLayoutMode` // subscribes to media queries, and that behaviour does not exist under // `renderToStaticMarkup` — effects never run -// there. `test/dom-setup.ts` (preloaded via bunfig.toml) supplies the DOM; +// there. `dom-environment.ts` (preloaded via bunfig.toml) supplies the DOM; // `window.matchMedia` is stubbed here because the point is to control when a // query flips, which resizing a simulated viewport cannot do // deterministically. @@ -10,8 +10,12 @@ import { afterEach, beforeEach, describe, expect, test } from "bun:test"; import { act } from "react"; import { createRoot, type Root } from "react-dom/client"; -import { COMPACT_MAX_WIDTH, NARROW_MAX_WIDTH, type ShellLayoutMode } from "../src/breakpoints"; -import { useShellLayoutMode } from "../src/use-shell-layout"; +import { + COMPACT_MAX_WIDTH, + NARROW_MAX_WIDTH, + type ShellLayoutMode, +} from "../../src/shell/layout/breakpoints"; +import { useShellLayoutMode } from "../../src/shell/layout/use-shell-layout"; type StubQuery = { matches: boolean; diff --git a/packages/shell-layout/test/use-scroll-reset.test.tsx b/apps/web/test/shell-layout/use-scroll-reset.test.tsx similarity index 95% rename from packages/shell-layout/test/use-scroll-reset.test.tsx rename to apps/web/test/shell-layout/use-scroll-reset.test.tsx index 02d830703c..17fe4ed76d 100644 --- a/packages/shell-layout/test/use-scroll-reset.test.tsx +++ b/apps/web/test/shell-layout/use-scroll-reset.test.tsx @@ -3,7 +3,7 @@ import { act, createElement, useRef, useState } from "react"; import { createRoot } from "react-dom/client"; import type { RefObject } from "react"; -import { useScrollReset } from "../src/use-scroll-reset"; +import { useScrollReset } from "../../src/shell/layout/use-scroll-reset"; function mount(initialPath: string) { const container = document.createElement("div"); diff --git a/packages/plugins-ui/test/mcp-preset-cards.test.tsx b/apps/web/test/tools/mcp-preset-cards.test.tsx similarity index 99% rename from packages/plugins-ui/test/mcp-preset-cards.test.tsx rename to apps/web/test/tools/mcp-preset-cards.test.tsx index e01cc2fa4b..c57cfd6e6b 100644 --- a/packages/plugins-ui/test/mcp-preset-cards.test.tsx +++ b/apps/web/test/tools/mcp-preset-cards.test.tsx @@ -10,8 +10,8 @@ import type { Root } from "react-dom/client"; import { MCP_PRESETS } from "@corbits/connections/mcp-presets"; -import { McpPresetCard, useMcpPresetCatalog } from "../src/mcp-preset-cards"; -import type { McpPreset } from "../src/mcp-servers-api"; +import { McpPresetCard, useMcpPresetCatalog } from "../../src/tools/mcp-preset-cards"; +import type { McpPreset } from "../../src/tools/mcp-servers-api"; const realFetch = globalThis.fetch; let mountedRoots: Root[] = []; diff --git a/packages/plugins-ui/test/mcp-servers-section.test.tsx b/apps/web/test/tools/mcp-servers-section.test.tsx similarity index 95% rename from packages/plugins-ui/test/mcp-servers-section.test.tsx rename to apps/web/test/tools/mcp-servers-section.test.tsx index 0adf06aa46..6a4672842c 100644 --- a/packages/plugins-ui/test/mcp-servers-section.test.tsx +++ b/apps/web/test/tools/mcp-servers-section.test.tsx @@ -8,7 +8,7 @@ import { act } from "react"; import { createRoot } from "react-dom/client"; import type { Root } from "react-dom/client"; -import { McpServersSection } from "../src/mcp-servers-section"; +import { McpServersSection } from "../../src/tools/mcp-servers-section"; const realFetch = globalThis.fetch; let mountedRoots: Root[] = []; diff --git a/packages/plugins-ui/test/plugin-connect-panel.test.tsx b/apps/web/test/tools/plugin-connect-panel.test.tsx similarity index 98% rename from packages/plugins-ui/test/plugin-connect-panel.test.tsx rename to apps/web/test/tools/plugin-connect-panel.test.tsx index ef31b856ab..27852deaa5 100644 --- a/packages/plugins-ui/test/plugin-connect-panel.test.tsx +++ b/apps/web/test/tools/plugin-connect-panel.test.tsx @@ -12,9 +12,9 @@ import type { Root } from "react-dom/client"; import type { ConnectorDescriptor } from "@corbits/connections/registry"; import type { ResolvedPlugin } from "@corbits/connections/plugins"; -import { PluginConnectPanel, type PluginPanelSubject } from "../src/plugin-connect-panel"; -import type { McpPreset } from "../src/mcp-servers-api"; -import { PLUGINS_STRINGS } from "../src/strings"; +import { PluginConnectPanel, type PluginPanelSubject } from "../../src/tools/plugin-connect-panel"; +import type { McpPreset } from "../../src/tools/mcp-servers-api"; +import { PLUGINS_STRINGS } from "../../src/tools/strings"; const realFetch = globalThis.fetch; let mountedRoots: Root[] = []; diff --git a/packages/plugins-ui/test/plugin-meta.test.ts b/apps/web/test/tools/plugin-meta.test.ts similarity index 88% rename from packages/plugins-ui/test/plugin-meta.test.ts rename to apps/web/test/tools/plugin-meta.test.ts index 5404303a94..8345963021 100644 --- a/packages/plugins-ui/test/plugin-meta.test.ts +++ b/apps/web/test/tools/plugin-meta.test.ts @@ -1,10 +1,10 @@ import { expect, test } from "bun:test"; -import { Stack } from "@corbits/icons"; +import { Stack } from "@/lib/icons"; import { connectorDescriptors, CONNECTOR_REGISTRY } from "@corbits/connections/registry"; import { MCP_PRESETS } from "@corbits/connections/mcp-presets"; -import { pluginCategory, pluginIcon, pluginOutcome } from "../src/plugin-meta"; -import { isNativePluginCatalogDescriptor } from "../src/plugins-gallery"; +import { pluginCategory, pluginIcon, pluginOutcome } from "../../src/tools/plugin-meta"; +import { isNativePluginCatalogDescriptor } from "../../src/tools/plugins-gallery"; test("manus is a productivity plugin whose outcome names tasks and slide-deck files", () => { expect(pluginCategory("manus")).toBe("Productivity"); diff --git a/packages/plugins-ui/test/plugins-gallery.test.tsx b/apps/web/test/tools/plugins-gallery.test.tsx similarity index 99% rename from packages/plugins-ui/test/plugins-gallery.test.tsx rename to apps/web/test/tools/plugins-gallery.test.tsx index d0ea1bd8b5..15ab23c504 100644 --- a/packages/plugins-ui/test/plugins-gallery.test.tsx +++ b/apps/web/test/tools/plugins-gallery.test.tsx @@ -7,8 +7,8 @@ import type { ConnectorDescriptor } from "@corbits/connections/registry"; import type { ResolvedPlugin } from "@corbits/connections/plugins"; import { MCP_PRESETS } from "@corbits/connections/mcp-presets"; -import { PluginsGallery } from "../src/plugins-gallery"; -import type { SkillCardData } from "../src/skill-card"; +import { PluginsGallery } from "../../src/tools/plugins-gallery"; +import type { SkillCardData } from "../../src/tools/skill-card"; function descriptor( id: string, diff --git a/apps/web/test/webhook-triggers-api.test.ts b/apps/web/test/webhook-triggers-api.test.ts index 8cf6806bde..bc0f1fdab9 100644 --- a/apps/web/test/webhook-triggers-api.test.ts +++ b/apps/web/test/webhook-triggers-api.test.ts @@ -6,7 +6,7 @@ import { afterEach, describe, expect, test } from "bun:test"; -import { ApiQueryError, UnauthenticatedError } from "@corbits/api-query"; +import { ApiQueryError, UnauthenticatedError } from "@/lib/api-query"; import { createWebhookTrigger, deleteWebhookTrigger, diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json index 8ed799e4f4..c6fb970cbd 100644 --- a/apps/web/tsconfig.json +++ b/apps/web/tsconfig.json @@ -5,6 +5,9 @@ "jsx": "react-jsx", "lib": ["ESNext", "DOM", "DOM.Iterable"], "types": ["bun"], - "noEmit": true + "noEmit": true, + "paths": { + "@/*": ["./src/*"] + } } } diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts index 5ead14341f..bc4396e823 100644 --- a/apps/web/vite.config.ts +++ b/apps/web/vite.config.ts @@ -4,6 +4,8 @@ // // `vite dev` proxies /api to a locally running hub so the interface can be // developed against real data without a build step. +import path from "node:path"; + import react from "@vitejs/plugin-react"; import tailwindcss from "@tailwindcss/vite"; import { defineConfig } from "vite"; @@ -21,6 +23,11 @@ function manualChunks(id: string): string | undefined { export default defineConfig({ plugins: [react(), tailwindcss()], + resolve: { + alias: { + "@": path.resolve(__dirname, "src"), + }, + }, build: { rollupOptions: { output: { diff --git a/bun.lock b/bun.lock index 33f37ff122..afd1a1d739 100644 --- a/bun.lock +++ b/bun.lock @@ -142,28 +142,16 @@ "version": "0.0.1", "dependencies": { "@corbits/agent-directory": "workspace:*", - "@corbits/api-query": "workspace:*", "@corbits/approvals": "workspace:*", "@corbits/artifact-ui": "workspace:*", "@corbits/assistant-workflow": "workspace:*", - "@corbits/bench-ui": "workspace:*", - "@corbits/chat-ui": "workspace:*", - "@corbits/client-log": "workspace:*", - "@corbits/command-palette": "workspace:*", "@corbits/connections": "workspace:*", - "@corbits/context-menu": "workspace:*", "@corbits/error-sink": "workspace:*", - "@corbits/icons": "workspace:*", - "@corbits/inference-settings": "workspace:*", - "@corbits/plugins-ui": "workspace:*", "@corbits/react-ui": "github:corbitsdev/react-ui#3b122812a307ccb35be31386f7696020c5a84635", - "@corbits/settings-ui": "workspace:*", - "@corbits/shell-layout": "workspace:*", - "@corbits/slug": "workspace:*", - "@corbits/text-diff": "workspace:*", "@corbits/url-path": "workspace:*", "@corbits/workflows": "workspace:*", "@intx/types": "workspace:*", + "@phosphor-icons/react": "^2.1.10", "@radix-ui/react-dialog": "^1.1.15", "@radix-ui/react-slot": "^1.2.3", "@tanstack/react-query": "catalog:", @@ -173,6 +161,7 @@ }, "devDependencies": { "@happy-dom/global-registrator": "^20.11.2", + "@intx/inference": "workspace:*", "@tailwindcss/vite": "^4.3.3", "@types/bun": "catalog:", "@types/react": "^19.2.2", @@ -224,22 +213,6 @@ "typescript": "catalog:", }, }, - "packages/api-query": { - "name": "@corbits/api-query", - "version": "0.0.1", - "dependencies": { - "@corbits/icons": "workspace:*", - "@corbits/react-ui": "github:corbitsdev/react-ui#3b122812a307ccb35be31386f7696020c5a84635", - "react": "^19.2.0", - }, - "devDependencies": { - "@types/bun": "catalog:", - "@types/react": "^19.2.2", - "@types/react-dom": "catalog:", - "react-dom": "^19.2.0", - "typescript": "catalog:", - }, - }, "packages/approvals": { "name": "@corbits/approvals", "version": "0.0.1", @@ -263,61 +236,9 @@ "name": "@corbits/artifact-ui", "version": "0.0.1", "dependencies": { - "@corbits/icons": "workspace:*", - "@corbits/react-ui": "github:corbitsdev/react-ui#3b122812a307ccb35be31386f7696020c5a84635", "@corbits/url-path": "workspace:*", "arktype": "catalog:", - "react": "^19.2.0", - }, - "devDependencies": { - "@types/bun": "catalog:", - "@types/react": "^19.2.2", - "@types/react-dom": "catalog:", - "react-dom": "^19.2.0", - "typescript": "catalog:", - }, - }, - "packages/bench-ui": { - "name": "@corbits/bench-ui", - "version": "0.0.1", - "dependencies": { - "@corbits/api-query": "workspace:*", - "@intx/types": "workspace:*", - "arktype": "catalog:", - }, - "devDependencies": { - "@types/bun": "catalog:", - "typescript": "catalog:", - }, - }, - "packages/chat-ui": { - "name": "@corbits/chat-ui", - "version": "0.0.1", - "dependencies": { - "@corbits/api-query": "workspace:*", - "@corbits/connections": "workspace:*", - "@corbits/context-menu": "workspace:*", - "@corbits/error-sink": "workspace:*", - "@corbits/icons": "workspace:*", - "@corbits/inference-settings": "workspace:*", - "@corbits/react-ui": "github:corbitsdev/react-ui#3b122812a307ccb35be31386f7696020c5a84635", - "@tanstack/react-query": "catalog:", - "arktype": "catalog:", - "react": "^19.2.0", - "react-dom": "^19.2.0", - }, - "devDependencies": { - "@happy-dom/global-registrator": "^20.11.2", - "@intx/inference": "workspace:*", - "@types/bun": "catalog:", - "@types/react": "^19.2.2", - "@types/react-dom": "catalog:", - "typescript": "catalog:", }, - }, - "packages/client-log": { - "name": "@corbits/client-log", - "version": "0.0.1", "devDependencies": { "@types/bun": "catalog:", "typescript": "catalog:", @@ -346,22 +267,6 @@ "typescript": "catalog:", }, }, - "packages/command-palette": { - "name": "@corbits/command-palette", - "version": "0.0.1", - "dependencies": { - "@corbits/slug": "workspace:*", - "react": "^19.2.0", - }, - "devDependencies": { - "@happy-dom/global-registrator": "^20.11.2", - "@types/bun": "catalog:", - "@types/react": "^19.2.2", - "@types/react-dom": "catalog:", - "react-dom": "^19.2.0", - "typescript": "catalog:", - }, - }, "packages/connections": { "name": "@corbits/connections", "version": "0.0.1", @@ -373,7 +278,6 @@ "@corbits/github-tools": "workspace:*", "@corbits/hub-api-client": "workspace:*", "@corbits/inference-catalog": "workspace:*", - "@corbits/inference-settings": "workspace:*", "@corbits/mcp-tools": "workspace:*", "@corbits/oauth-core": "github:corbitsdev/corbits-oauth-core#v0.1.1", "@corbits/workflows": "workspace:*", @@ -395,22 +299,6 @@ "typescript": "catalog:", }, }, - "packages/context-menu": { - "name": "@corbits/context-menu", - "version": "0.0.1", - "dependencies": { - "@corbits/react-ui": "github:corbitsdev/react-ui#3b122812a307ccb35be31386f7696020c5a84635", - "react": "^19.2.0", - }, - "devDependencies": { - "@happy-dom/global-registrator": "^20.11.2", - "@types/bun": "catalog:", - "@types/react": "^19.2.2", - "@types/react-dom": "catalog:", - "react-dom": "^19.2.0", - "typescript": "catalog:", - }, - }, "packages/credential-providers": { "name": "@corbits/credential-providers", "version": "0.0.1", @@ -523,19 +411,6 @@ "typescript": "catalog:", }, }, - "packages/icons": { - "name": "@corbits/icons", - "version": "0.0.1", - "dependencies": { - "@phosphor-icons/react": "^2.1.10", - "react": "^19.2.0", - }, - "devDependencies": { - "@types/bun": "catalog:", - "@types/react": "^19.2.2", - "typescript": "catalog:", - }, - }, "packages/inference-catalog": { "name": "@corbits/inference-catalog", "version": "0.1.0", @@ -552,19 +427,6 @@ "@intx/types": "0.3.0", }, }, - "packages/inference-settings": { - "name": "@corbits/inference-settings", - "version": "0.0.1", - "dependencies": { - "@corbits/connections": "workspace:*", - "@intx/types": "workspace:*", - "arktype": "catalog:", - }, - "devDependencies": { - "@types/bun": "catalog:", - "typescript": "catalog:", - }, - }, "packages/migration-runner": { "name": "@corbits/migration-runner", "version": "0.0.1", @@ -592,28 +454,6 @@ "@intx/types": "0.3.0", }, }, - "packages/plugins-ui": { - "name": "@corbits/plugins-ui", - "version": "0.0.1", - "dependencies": { - "@corbits/connections": "workspace:*", - "@corbits/error-sink": "workspace:*", - "@corbits/icons": "workspace:*", - "@corbits/react-ui": "github:corbitsdev/react-ui#3b122812a307ccb35be31386f7696020c5a84635", - "@corbits/settings-ui": "workspace:*", - "arktype": "catalog:", - "react": "^19.2.0", - "react-dom": "^19.2.0", - }, - "devDependencies": { - "@happy-dom/global-registrator": "^20.11.2", - "@types/bun": "catalog:", - "@types/react": "^19.2.2", - "@types/react-dom": "catalog:", - "react-dom": "^19.2.0", - "typescript": "catalog:", - }, - }, "packages/process-provisioner": { "name": "@corbits/process-provisioner", "version": "0.0.1", @@ -643,64 +483,6 @@ "typescript": "catalog:", }, }, - "packages/settings-ui": { - "name": "@corbits/settings-ui", - "version": "0.0.1", - "dependencies": { - "@corbits/api-query": "workspace:*", - "@corbits/bench-ui": "workspace:*", - "@corbits/chat-ui": "workspace:*", - "@corbits/connections": "workspace:*", - "@corbits/error-sink": "workspace:*", - "@corbits/icons": "workspace:*", - "@corbits/inference-settings": "workspace:*", - "@corbits/react-ui": "github:corbitsdev/react-ui#3b122812a307ccb35be31386f7696020c5a84635", - "@corbits/workflows": "workspace:*", - "@intx/types": "workspace:*", - "arktype": "catalog:", - "react": "^19.2.0", - "react-dom": "^19.2.0", - }, - "devDependencies": { - "@happy-dom/global-registrator": "^20.11.2", - "@types/bun": "catalog:", - "@types/react": "^19.2.2", - "@types/react-dom": "catalog:", - "react-dom": "^19.2.0", - "typescript": "catalog:", - }, - }, - "packages/shell-layout": { - "name": "@corbits/shell-layout", - "version": "0.0.1", - "dependencies": { - "react": "^19.2.0", - }, - "devDependencies": { - "@happy-dom/global-registrator": "^20.11.2", - "@types/bun": "catalog:", - "@types/react": "^19.2.2", - "@types/react-dom": "catalog:", - "react-dom": "^19.2.0", - "typescript": "catalog:", - }, - }, - "packages/slug": { - "name": "@corbits/slug", - "version": "0.0.1", - "devDependencies": { - "@types/bun": "catalog:", - "typescript": "catalog:", - }, - }, - "packages/text-diff": { - "name": "@corbits/text-diff", - "version": "0.0.1", - "devDependencies": { - "@types/bun": "catalog:", - "typescript": "catalog:", - }, - }, "packages/tool-registry-publish": { "name": "@corbits/tool-registry-publish", "version": "0.0.1", @@ -1429,8 +1211,6 @@ "@corbits/agent-events": ["@corbits/agent-events@workspace:packages/agent-events"], - "@corbits/api-query": ["@corbits/api-query@workspace:packages/api-query"], - "@corbits/approvals": ["@corbits/approvals@workspace:packages/approvals"], "@corbits/artifact-ui": ["@corbits/artifact-ui@workspace:packages/artifact-ui"], @@ -1439,30 +1219,20 @@ "@corbits/assistant-workflow": ["@corbits/assistant-workflow@workspace:agents/assistant"], - "@corbits/bench-ui": ["@corbits/bench-ui@workspace:packages/bench-ui"], - "@corbits/capability-tools": ["@corbits/capability-tools@workspace:tools/capability"], "@corbits/catalog-tools": ["@corbits/catalog-tools@workspace:tools/catalog"], - "@corbits/chat-ui": ["@corbits/chat-ui@workspace:packages/chat-ui"], - - "@corbits/client-log": ["@corbits/client-log@workspace:packages/client-log"], - "@corbits/code-review": ["@corbits/code-review@workspace:packages/code-review"], "@corbits/codex-provider": ["@corbits/codex-provider@github:corbitsdev/corbits-codex-provider#a1f475f", { "dependencies": { "@corbits/oauth-core": "github:corbitsdev/corbits-oauth-core", "@corbits/openai-responses": "github:corbitsdev/corbits-openai-responses", "arktype": "2.2.3" }, "peerDependencies": { "@intx/inference": ">=0.3.0", "@intx/types": ">=0.3.0" } }, "corbitsdev-corbits-codex-provider-a1f475f", "sha512-D6d0lblWx/4KudfLwQoQGrLB8GKRLP/HVp1cx08L2/hOGZAgH6txLPpeEtBqjl+R520qXSSPfM0kDC+3XNaAfw=="], "@corbits/collections": ["@corbits/collections@workspace:packages/collections"], - "@corbits/command-palette": ["@corbits/command-palette@workspace:packages/command-palette"], - "@corbits/connections": ["@corbits/connections@workspace:packages/connections"], "@corbits/connections-tools": ["@corbits/connections-tools@workspace:tools/connections"], - "@corbits/context-menu": ["@corbits/context-menu@workspace:packages/context-menu"], - "@corbits/credential-providers": ["@corbits/credential-providers@workspace:packages/credential-providers"], "@corbits/cron": ["@corbits/cron@workspace:packages/cron"], @@ -1481,12 +1251,8 @@ "@corbits/hub-api-client": ["@corbits/hub-api-client@workspace:packages/hub-api-client"], - "@corbits/icons": ["@corbits/icons@workspace:packages/icons"], - "@corbits/inference-catalog": ["@corbits/inference-catalog@workspace:packages/inference-catalog"], - "@corbits/inference-settings": ["@corbits/inference-settings@workspace:packages/inference-settings"], - "@corbits/interaction-tools": ["@corbits/interaction-tools@workspace:tools/interaction"], "@corbits/linear-tools": ["@corbits/linear-tools@workspace:tools/linear"], @@ -1507,8 +1273,6 @@ "@corbits/openai-responses": ["@corbits/openai-responses@github:corbitsdev/corbits-openai-responses#7efe000", { "dependencies": { "arktype": "2.2.3" }, "peerDependencies": { "@intx/inference": ">=0.3.0", "@intx/types": ">=0.3.0" } }, "corbitsdev-corbits-openai-responses-7efe000", "sha512-pH6C8T1WDJjqM+YbnQpofd7HgP5krEj48JCCQK16KI98a6kaz+gffpgdOdQpU3aNVZnFlyADXod1Z4tqUG/3ww=="], - "@corbits/plugins-ui": ["@corbits/plugins-ui@workspace:packages/plugins-ui"], - "@corbits/process-provisioner": ["@corbits/process-provisioner@workspace:packages/process-provisioner"], "@corbits/react-ui": ["@corbits/react-ui@github:corbitsdev/react-ui#3b12281", { "dependencies": { "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "tailwind-merge": "^3.3.1" }, "peerDependencies": { "@radix-ui/react-dialog": "^1.1.15", "@radix-ui/react-dropdown-menu": "^2.1.16", "@radix-ui/react-slot": "^1.2.3", "@radix-ui/react-tooltip": "^1.2.8", "@tanstack/react-query": "^5.90.2", "lucide-react": "^0.545.0 || ^1.0.0", "react": "^18.2.0 || ^19.0.0", "react-dom": "^18.2.0 || ^19.0.0", "sonner": "^2.0.7" }, "optionalPeers": ["@tanstack/react-query"] }, "corbitsdev-react-ui-3b12281", "sha512-Abvm/DO0Gqg0ITHGT9355ZxyKRPMVJLSSQSjpd3a8qt4JPrSMOLIOS4sX8ZMNNaArIbnY9F+VKrOWkUJUyO4Nw=="], @@ -1517,18 +1281,10 @@ "@corbits/sandbox-sidecar": ["@corbits/sandbox-sidecar@workspace:packages/sandbox-sidecar"], - "@corbits/settings-ui": ["@corbits/settings-ui@workspace:packages/settings-ui"], - - "@corbits/shell-layout": ["@corbits/shell-layout@workspace:packages/shell-layout"], - "@corbits/skills": ["@corbits/skills@workspace:skills/skills"], "@corbits/skills-tools": ["@corbits/skills-tools@workspace:tools/skills-tools"], - "@corbits/slug": ["@corbits/slug@workspace:packages/slug"], - - "@corbits/text-diff": ["@corbits/text-diff@workspace:packages/text-diff"], - "@corbits/tool-registry-publish": ["@corbits/tool-registry-publish@workspace:packages/tool-registry-publish"], "@corbits/tools-skills": ["@corbits/tools-skills@workspace:tools/tools-skills"], @@ -2723,10 +2479,12 @@ "@babel/helper-compilation-targets/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "@corbits/artifact-ui/@corbits/react-ui": ["@corbits/react-ui@github:corbitsdev/react-ui#3b12281", { "dependencies": { "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "tailwind-merge": "^3.3.1" }, "peerDependencies": { "@radix-ui/react-dialog": "^1.1.15", "@radix-ui/react-dropdown-menu": "^2.1.16", "@radix-ui/react-slot": "^1.2.3", "@radix-ui/react-tooltip": "^1.2.8", "@tanstack/react-query": "^5.90.2", "lucide-react": "^0.545.0 || ^1.0.0", "react": "^18.2.0 || ^19.0.0", "react-dom": "^18.2.0 || ^19.0.0", "sonner": "^2.0.7" }, "optionalPeers": ["@tanstack/react-query"] }, "corbitsdev-react-ui-3b12281", "sha512-Abvm/DO0Gqg0ITHGT9355ZxyKRPMVJLSSQSjpd3a8qt4JPrSMOLIOS4sX8ZMNNaArIbnY9F+VKrOWkUJUyO4Nw=="], - "@corbits/codex-provider/@corbits/oauth-core": ["@corbits/oauth-core@github:corbitsdev/corbits-oauth-core#1b7f9fb", { "dependencies": { "arktype": "2.2.3" } }, "corbitsdev-corbits-oauth-core-1b7f9fb", "sha512-PscyiDAl46umTM44NQPN1q5+PsGUV53Rxr4Wz/Ofz+k9LOOz6FBKamRFtWR8YWdKJt9I8sPOLOyEcMNNN2i+YQ=="], + "@corbits/connections/@corbits/codex-provider": ["@corbits/codex-provider@github:corbitsdev/corbits-codex-provider#a1f475f", { "dependencies": { "@corbits/oauth-core": "github:corbitsdev/corbits-oauth-core", "@corbits/openai-responses": "github:corbitsdev/corbits-openai-responses", "arktype": "2.2.3" }, "peerDependencies": { "@intx/inference": ">=0.3.0", "@intx/types": ">=0.3.0" } }, "corbitsdev-corbits-codex-provider-a1f475f", "sha512-D6d0lblWx/4KudfLwQoQGrLB8GKRLP/HVp1cx08L2/hOGZAgH6txLPpeEtBqjl+R520qXSSPfM0kDC+3XNaAfw=="], + + "@corbits/connections/@corbits/xai-provider": ["@corbits/xai-provider@github:corbitsdev/corbits-xai-provider#9f2d4ba", { "dependencies": { "@corbits/oauth-core": "github:corbitsdev/corbits-oauth-core", "@corbits/openai-responses": "github:corbitsdev/corbits-openai-responses", "arktype": "2.2.3" }, "peerDependencies": { "@intx/inference": ">=0.3.0", "@intx/types": ">=0.3.0" } }, "corbitsdev-corbits-xai-provider-9f2d4ba", "sha512-ZjvKxGcp+QzCh8zeXHg7kNbtkpR/itZkmQAcdG1aOAOjHaNwfGVpkPc/c/XtwPNsQyaDjF8W9CHb4rH1xI2uCA=="], + "@corbits/mailbox/hono-openapi": ["hono-openapi@1.3.1", "", { "peerDependencies": { "@hono/standard-validator": "^0.2.0", "@standard-community/standard-json": "^0.3.5", "@standard-community/standard-openapi": "^0.2.9", "@types/json-schema": "^7.0.15", "hono": "^4.11.2", "openapi-types": "^12.1.3" }, "optionalPeers": ["@hono/standard-validator", "hono"] }, "sha512-NLVeVkhKZ3drmQNEIPac8HX8Y54uf1hJAgIM/7MfDsaeVVmB+QILWQxx5x3R3NvRHgedcbEbOCGY2uR7WQYyMw=="], "@corbits/xai-provider/@corbits/oauth-core": ["@corbits/oauth-core@github:corbitsdev/corbits-oauth-core#1b7f9fb", { "dependencies": { "arktype": "2.2.3" } }, "corbitsdev-corbits-oauth-core-1b7f9fb", "sha512-PscyiDAl46umTM44NQPN1q5+PsGUV53Rxr4Wz/Ofz+k9LOOz6FBKamRFtWR8YWdKJt9I8sPOLOyEcMNNN2i+YQ=="], @@ -2745,8 +2503,6 @@ "@tailwindcss/oxide-wasm32-wasi/tslib": ["tslib@2.8.1", "", { "bundled": true }, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], - "@workbench/hub/@corbits/artifacts": ["@corbits/artifacts@github:corbitsdev/corbits-artifacts#5309a15", { "dependencies": { "@hono/standard-validator": "^0.2.3" }, "peerDependencies": { "@intx/hub-api": "^0.3.0", "@intx/types": "^0.3.0", "arktype": "^2.1.29", "drizzle-orm": "^0.45.2", "hono": "^4.12.32", "hono-openapi": "^1.2.0", "postgres": "^3.4.9" } }, "corbitsdev-corbits-artifacts-5309a15", "sha512-zGHkq++juclUrOd0O8/Z5ziTldmJZ6gqyH/c9cs5S10UPU4gqn8CHwq174SiJXY0ujJ3cNpJXnrr+0fcqlfQ1w=="], - "@workbench/hub/@corbits/memory": ["@corbits/memory@github:corbitsdev/corbits-memory#e74da20", { "dependencies": { "@intx/agent": "0.2.2", "@intx/authz": "0.2.2", "@intx/hub-api": "0.2.2", "@intx/log": "0.2.2", "@intx/workflow": "0.2.2", "arktype": "^2.1.29", "drizzle-orm": "^0.45.1", "hono": "^4.9.0", "hono-openapi": "^1.3.1", "postgres": "^3.4.7" } }, "corbitsdev-corbits-memory-e74da20", "sha512-/uA9xTcF7XwMXgnR8OZamierzkLG4g4mhw3u9Fl3Uj6ait8pH3wcoQ6V32on1nMdaqtPRdYVFnxof5O+4ZacGA=="], "better-call/@better-auth/utils": ["@better-auth/utils@0.5.0", "", { "dependencies": { "@noble/hashes": "^2.0.1" } }, "sha512-BL8W4EfIZFwlu0r54m3v1ztjDhu6dDe/amLTm0xybmbZaNgYUqhD3SjpAsnq0q8YD6/ki4iwIgxJNLP/N3TxiA=="], @@ -2793,6 +2549,14 @@ "@babel/helper-compilation-targets/lru-cache/yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="], + "@corbits/connections/@corbits/codex-provider/@corbits/oauth-core": ["@corbits/oauth-core@github:corbitsdev/corbits-oauth-core#1b7f9fb", { "dependencies": { "arktype": "2.2.3" } }, "corbitsdev-corbits-oauth-core-1b7f9fb", "sha512-PscyiDAl46umTM44NQPN1q5+PsGUV53Rxr4Wz/Ofz+k9LOOz6FBKamRFtWR8YWdKJt9I8sPOLOyEcMNNN2i+YQ=="], + + "@corbits/connections/@corbits/codex-provider/@corbits/openai-responses": ["@corbits/openai-responses@github:corbitsdev/corbits-openai-responses#7efe000", { "dependencies": { "arktype": "2.2.3" }, "peerDependencies": { "@intx/inference": ">=0.3.0", "@intx/types": ">=0.3.0" } }, "corbitsdev-corbits-openai-responses-7efe000", "sha512-pH6C8T1WDJjqM+YbnQpofd7HgP5krEj48JCCQK16KI98a6kaz+gffpgdOdQpU3aNVZnFlyADXod1Z4tqUG/3ww=="], + + "@corbits/connections/@corbits/xai-provider/@corbits/oauth-core": ["@corbits/oauth-core@github:corbitsdev/corbits-oauth-core#1b7f9fb", { "dependencies": { "arktype": "2.2.3" } }, "corbitsdev-corbits-oauth-core-1b7f9fb", "sha512-PscyiDAl46umTM44NQPN1q5+PsGUV53Rxr4Wz/Ofz+k9LOOz6FBKamRFtWR8YWdKJt9I8sPOLOyEcMNNN2i+YQ=="], + + "@corbits/connections/@corbits/xai-provider/@corbits/openai-responses": ["@corbits/openai-responses@github:corbitsdev/corbits-openai-responses#7efe000", { "dependencies": { "arktype": "2.2.3" }, "peerDependencies": { "@intx/inference": ">=0.3.0", "@intx/types": ">=0.3.0" } }, "corbitsdev-corbits-openai-responses-7efe000", "sha512-pH6C8T1WDJjqM+YbnQpofd7HgP5krEj48JCCQK16KI98a6kaz+gffpgdOdQpU3aNVZnFlyADXod1Z4tqUG/3ww=="], + "@esbuild-kit/core-utils/esbuild/@esbuild/android-arm": ["@esbuild/android-arm@0.18.20", "", { "os": "android", "cpu": "arm" }, "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw=="], "@esbuild-kit/core-utils/esbuild/@esbuild/android-arm64": ["@esbuild/android-arm64@0.18.20", "", { "os": "android", "cpu": "arm64" }, "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ=="], diff --git a/packages/api-query/LICENSE b/packages/api-query/LICENSE deleted file mode 100644 index 173c3a21d0..0000000000 --- a/packages/api-query/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ -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; version 2.1 of the License. - - 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/api-query/README.md b/packages/api-query/README.md deleted file mode 100644 index 580679256c..0000000000 --- a/packages/api-query/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# @corbits/api-query - -The shared hub-query envelope — `loading` / `unauthenticated` / `error` / -`ready` — and `QueryView`, the one component that renders those four -outcomes. Every page that fetches from a hub route reports through this -contract instead of inventing its own loading state or error copy. -`QueryView`'s non-`ready` states render with `@corbits/react-ui` -([corbitsdev/react-ui](https://github.com/corbitsdev/react-ui)) primitives -(`Button`, `EmptyState`, `Skeleton`); this package holds the workbench -composition and the envelope logic around them. - -## Contract - -**Owns:** - -- `APIQuery`, the four-state discriminated union a query result reports. -- `toAPIQuery`, which adapts any TanStack-Query-shaped result (`isLoading`, - `isError`, `error`, `data`, `isPending`, `fetchStatus`, `refetch`) onto - `APIQuery`. -- `UnauthenticatedError`, the sentinel a host throws from a queryFn on HTTP - 401 so `toAPIQuery` maps the failure to `kind: "unauthenticated"`. -- `ApiQueryError`, the one HTTP-query error shape (`message` + optional - `status`) a host throws for every other request failure. -- `describeQueryError`, human, actionable copy for a failed query — never - the raw technical message. -- `QueryView`, generic over the data type `T`: it switches on an - `APIQuery` and calls `children(data)` only in the `ready` case. Loading, - unauthenticated, and error rendering are built in (with a `skeleton` - prop — `"block" | "rows" | "detail"` — for the loading placeholder's - shape); a host never re-implements them. -- `SignedOutNotice`, `ListSkeleton`, `DetailSkeleton` — the pieces - `QueryView` composes, exported for a host that needs one standalone. - -**A host injects:** - -- The actual fetch: its own query hook (TanStack Query or otherwise) that - produces the shape `toAPIQuery` expects, and its own request/schema - validation before that. -- `label`, the noun `QueryView`'s failure copy names ("Couldn't load - `label`"). -- `children`, the render function for the `ready` state. - -**Never imports:** - -- No app-specific API client, hub route, or fetch call — this package - never issues a request. -- No `@tanstack/react-query` — `toAPIQuery`'s parameter is a structural - type, not that library's `UseQueryResult`, so a host is free to adapt any - query library onto it. -- No workbench-specific state (`bench-context`, `query-client`'s tenant - keys, etc.) — this package has no notion of a tenant, a bench, or a - session beyond "authenticated or not." - -## Running tests - -``` -cd packages/api-query && bun test -``` - -Suites render with `react-dom/server`'s `renderToStaticMarkup` rather than -a mounted DOM, so no `bunfig.toml` preload is needed here. diff --git a/packages/api-query/package.json b/packages/api-query/package.json deleted file mode 100644 index b638547684..0000000000 --- a/packages/api-query/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "@corbits/api-query", - "version": "0.0.1", - "private": true, - "description": "The shared hub-query envelope (loading/unauthenticated/error/ready) and its QueryView renderer, so every page reports a fetch the same way", - "license": "LGPL-2.1-only", - "type": "module", - "exports": { - ".": "./src/index.ts", - "./envelope": "./src/envelope.ts" - }, - "scripts": { - "typecheck": "tsc --noEmit", - "test": "bun test" - }, - "dependencies": { - "@corbits/icons": "workspace:*", - "@corbits/react-ui": "github:corbitsdev/react-ui#3b122812a307ccb35be31386f7696020c5a84635", - "react": "^19.2.0" - }, - "devDependencies": { - "@types/bun": "catalog:", - "@types/react": "^19.2.2", - "@types/react-dom": "catalog:", - "react-dom": "^19.2.0", - "typescript": "catalog:" - } -} diff --git a/packages/api-query/tsconfig.json b/packages/api-query/tsconfig.json deleted file mode 100644 index e0ca0f1f4a..0000000000 --- a/packages/api-query/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "./tsconfig.src.json", - "compilerOptions": { - "composite": false, - "noEmit": true, - "disableSourceOfProjectReferenceRedirect": true, - "declaration": false, - "declarationMap": false, - "emitDeclarationOnly": false, - "tsBuildInfoFile": "tsconfig.tsbuildinfo", - "rootDir": "../.." - }, - "include": ["src"], - "exclude": [], - "references": [ - { - "path": "../icons/tsconfig.src.json" - } - ] -} diff --git a/packages/api-query/tsconfig.src.json b/packages/api-query/tsconfig.src.json deleted file mode 100644 index b05bbaaeb3..0000000000 --- a/packages/api-query/tsconfig.src.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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": "../icons/tsconfig.src.json" - } - ] -} diff --git a/packages/artifact-ui/package.json b/packages/artifact-ui/package.json index d2d6236b7c..f5eb61c6cb 100644 --- a/packages/artifact-ui/package.json +++ b/packages/artifact-ui/package.json @@ -2,31 +2,26 @@ "name": "@corbits/artifact-ui", "version": "0.0.1", "private": true, - "description": "The artifact library's domain seam: the ArtifactSummary type a Library page renders, plus the sort and filter rules every artifact surface shares", - "license": "LGPL-2.1-only", + "description": "The artifact library's server-reachable seam: the ArtifactSummary type and the Files kind-nav mapping the hub uses to compute per-kind counts", + "license": "LGPL-2.1-or-later", "type": "module", "sideEffects": false, "exports": { - ".": "./src/index.ts", + ".": "./src/types.ts", "./kind-filter": "./src/kind-filter.ts", - "./renderer-kind": "./src/renderer-kind.ts" + "./title-extension": "./src/title-extension.ts", + "./types": "./src/types.ts" }, "scripts": { "typecheck": "tsc --noEmit", "test": "bun test" }, "dependencies": { - "@corbits/icons": "workspace:*", - "@corbits/react-ui": "github:corbitsdev/react-ui#3b122812a307ccb35be31386f7696020c5a84635", "@corbits/url-path": "workspace:*", - "arktype": "catalog:", - "react": "^19.2.0" + "arktype": "catalog:" }, "devDependencies": { "@types/bun": "catalog:", - "@types/react": "^19.2.2", - "@types/react-dom": "catalog:", - "react-dom": "^19.2.0", "typescript": "catalog:" } } diff --git a/packages/artifact-ui/tsconfig.json b/packages/artifact-ui/tsconfig.json index 92e7856fde..3c80a88bc7 100644 --- a/packages/artifact-ui/tsconfig.json +++ b/packages/artifact-ui/tsconfig.json @@ -10,12 +10,9 @@ "tsBuildInfoFile": "tsconfig.tsbuildinfo", "rootDir": "../.." }, - "include": ["src", "test"], + "include": ["src"], "exclude": [], "references": [ - { - "path": "../icons/tsconfig.src.json" - }, { "path": "../url-path/tsconfig.src.json" } diff --git a/packages/artifact-ui/tsconfig.src.json b/packages/artifact-ui/tsconfig.src.json index 8a262d2669..851531bc4d 100644 --- a/packages/artifact-ui/tsconfig.src.json +++ b/packages/artifact-ui/tsconfig.src.json @@ -3,8 +3,7 @@ "include": ["src", "package.json", "src/**/*.json"], "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], "compilerOptions": { - "jsx": "react-jsx", - "lib": ["ESNext", "DOM", "DOM.Iterable"], + "lib": ["ESNext"], "types": ["bun"], "composite": true, "emitDeclarationOnly": true, @@ -12,9 +11,6 @@ "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" }, "references": [ - { - "path": "../icons/tsconfig.src.json" - }, { "path": "../url-path/tsconfig.src.json" } diff --git a/packages/bench-ui/LICENSE b/packages/bench-ui/LICENSE deleted file mode 100644 index 173c3a21d0..0000000000 --- a/packages/bench-ui/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ -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; version 2.1 of the License. - - 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/bench-ui/README.md b/packages/bench-ui/README.md deleted file mode 100644 index 92966ad972..0000000000 --- a/packages/bench-ui/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# @corbits/bench-ui - -Bench tenancy helpers over Interchange's native tenant model: spotting raw -platform identifiers that must never render as bench names, and the shared -tenancy contracts (roles, DM naming, parent -cycle checks). Creation lives at `/new`; people management lives in -`@corbits/settings-ui`'s PeopleSection — this package no longer ships -switcher / create / members UI. - -## Key modules - -- `membership.ts` — `isRawIdentifier` (raw platform ids must never render) -- `tenancy-contracts.ts` — shared tenancy constants and validation (roles, - DM workbench naming, parent-tenant cycle checks) - -## Running tests - -``` -cd packages/bench-ui && bun test -``` diff --git a/packages/bench-ui/package.json b/packages/bench-ui/package.json deleted file mode 100644 index d4c2a6899d..0000000000 --- a/packages/bench-ui/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "@corbits/bench-ui", - "version": "0.0.1", - "private": true, - "description": "Bench tenancy helpers: raw-identifier guard and shared tenancy contracts over Interchange's native tenant model", - "license": "LGPL-2.1-only", - "type": "module", - "exports": { - ".": "./src/index.ts", - "./styles.css": "./src/styles.css" - }, - "scripts": { - "typecheck": "tsc --noEmit", - "test": "bun test" - }, - "dependencies": { - "@corbits/api-query": "workspace:*", - "@intx/types": "workspace:*", - "arktype": "catalog:" - }, - "devDependencies": { - "@types/bun": "catalog:", - "typescript": "catalog:" - } -} diff --git a/packages/bench-ui/tsconfig.json b/packages/bench-ui/tsconfig.json deleted file mode 100644 index 46973b7c8f..0000000000 --- a/packages/bench-ui/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "extends": "./tsconfig.src.json", - "compilerOptions": { - "composite": false, - "noEmit": true, - "disableSourceOfProjectReferenceRedirect": true, - "declaration": false, - "declarationMap": false, - "emitDeclarationOnly": false, - "tsBuildInfoFile": "tsconfig.tsbuildinfo", - "rootDir": "../.." - }, - "include": ["src", "test"], - "exclude": [], - "references": [ - { - "path": "../../vendor/intx/types/tsconfig.src.json" - }, - { - "path": "../api-query/tsconfig.src.json" - } - ] -} diff --git a/packages/bench-ui/tsconfig.src.json b/packages/bench-ui/tsconfig.src.json deleted file mode 100644 index 850e89f662..0000000000 --- a/packages/bench-ui/tsconfig.src.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "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": "../api-query/tsconfig.src.json" - } - ] -} diff --git a/packages/chat-ui/LICENSE b/packages/chat-ui/LICENSE deleted file mode 100644 index 173c3a21d0..0000000000 --- a/packages/chat-ui/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ -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; version 2.1 of the License. - - 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/chat-ui/README.md b/packages/chat-ui/README.md deleted file mode 100644 index 0490043191..0000000000 --- a/packages/chat-ui/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# @corbits/chat-ui - -The chat surface's UI: the active-conversation workspace, message timeline, -composer, and the pure helpers behind workbench settings, mentions, slash -commands, and typing indicators. Presentational primitives (buttons, -dialogs, menus) come from `@corbits/react-ui` -([corbitsdev/react-ui](https://github.com/corbitsdev/react-ui)); this -package holds the workbench-specific composition on top of them, plus the -HTTP client for the chat API. - -Today's shape is single-column: `ChatWorkspace` renders the active -conversation only — the workbench list lives in the host shell's own -contextual panel, not in a package-owned sidebar (`sidebar.tsx` now holds -only the row-menu helpers the shell's panel calls into). - -## Key modules - -- `chat-workspace.tsx` — resolves the signed-in account's workbenches and - deployed agents, wires the timeline and composer for the selected workbench -- `timeline.tsx` / `composer.tsx` — the message list and the send box, - including attachment validation and mention/slash-command autocomplete -- `workbench-settings/` — the per-workbench settings surface (`WorkbenchSettingsSurface`), - including context-window controls -- `blocks/` — typed rendering for approval, poll, and form message parts -- `api.ts` — the chat HTTP client: workbenches, messages, threads, reactions, - pins, runs, and invitable agent definitions -- `default-agent-workbench.ts` / `shared-workbenches.ts` / `direct-workbench.ts` — - pure lookup and workbench-provisioning helpers -- `use-workbench-stream.ts` — the live-update hook for an open workbench - -## Running tests - -``` -cd packages/chat-ui && bun test -``` - -Several suites mount into a real DOM (see `test/dom-setup.ts`); running from -the package directory picks up `bunfig.toml`'s preload. diff --git a/packages/chat-ui/bunfig.toml b/packages/chat-ui/bunfig.toml deleted file mode 100644 index 7cd3f7e047..0000000000 --- a/packages/chat-ui/bunfig.toml +++ /dev/null @@ -1,2 +0,0 @@ -[test] -preload = ["./test/dom-setup.ts"] diff --git a/packages/chat-ui/package.json b/packages/chat-ui/package.json deleted file mode 100644 index c300392342..0000000000 --- a/packages/chat-ui/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@corbits/chat-ui", - "version": "0.0.1", - "private": true, - "description": "The chat surface's UI: the workspace, timeline, composer, and sidebar composed from the published component library", - "license": "LGPL-2.1-only", - "type": "module", - "sideEffects": false, - "exports": { - ".": "./src/index.ts", - "./styles.css": "./src/styles.css", - "./wire/parts": "./src/wire/parts.ts", - "./wire/blocks": "./src/wire/blocks.ts", - "./wire/mentions": "./src/wire/mentions.ts", - "./wire/participants": "./src/wire/participants.ts", - "./wire/display-name": "./src/wire/display-name.ts", - "./wire/agent-address": "./src/wire/agent-address.ts", - "./wire/workbench-host-naming": "./src/wire/workbench-host-naming.ts", - "./wire/stream-events": "./src/wire/stream-events.ts", - "./wire/consumer-inference-text": "./src/wire/consumer-inference-text.ts" - }, - "scripts": { - "typecheck": "tsc --noEmit", - "test": "bun test" - }, - "dependencies": { - "@corbits/api-query": "workspace:*", - "@corbits/connections": "workspace:*", - "@corbits/context-menu": "workspace:*", - "@corbits/error-sink": "workspace:*", - "@corbits/icons": "workspace:*", - "@corbits/inference-settings": "workspace:*", - "@corbits/react-ui": "github:corbitsdev/react-ui#3b122812a307ccb35be31386f7696020c5a84635", - "@tanstack/react-query": "catalog:", - "arktype": "catalog:", - "react": "^19.2.0", - "react-dom": "^19.2.0" - }, - "devDependencies": { - "@happy-dom/global-registrator": "^20.11.2", - "@intx/inference": "workspace:*", - "@types/bun": "catalog:", - "@types/react": "^19.2.2", - "@types/react-dom": "catalog:", - "typescript": "catalog:" - } -} diff --git a/packages/chat-ui/test/dom-setup.ts b/packages/chat-ui/test/dom-setup.ts deleted file mode 100644 index 43e8227ca0..0000000000 --- a/packages/chat-ui/test/dom-setup.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Registers a happy-dom global DOM before DOM-dependent suites run. -// -// Every other suite in this package renders with `renderToStaticMarkup`, -// which never runs an effect. `chat-workspace.test.tsx` mounts -// `ChatWorkspace` to prove real effect-driven sequencing (the -// workbenches-then-settings load order), and `use-typing-indicator.test.tsx` -// drives real timers off real effects — both need a registered DOM the -// same way `@corbits/command-palette`'s suites do. -import { GlobalRegistrator } from "@happy-dom/global-registrator"; - -GlobalRegistrator.register(); - -// React's `act(...)` warns unless the environment explicitly opts in — see -// `@corbits/command-palette`'s `test/dom-setup.ts` for the same flag. Every -// suite here that mounts a component (rather than calling -// `renderToStaticMarkup`) already wraps its state-driving calls in `act(...)`; -// this just tells React those wrappers are real. -declare global { - var IS_REACT_ACT_ENVIRONMENT: boolean; -} -globalThis.IS_REACT_ACT_ENVIRONMENT = true; diff --git a/packages/chat-ui/tsconfig.json b/packages/chat-ui/tsconfig.json deleted file mode 100644 index 68035e9a3b..0000000000 --- a/packages/chat-ui/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "include": ["src", "test"], - "compilerOptions": { - "jsx": "react-jsx", - "lib": ["ESNext", "DOM", "DOM.Iterable"], - "types": ["bun"], - "noEmit": true - } -} diff --git a/packages/client-log/LICENSE b/packages/client-log/LICENSE deleted file mode 100644 index 173c3a21d0..0000000000 --- a/packages/client-log/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ -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; version 2.1 of the License. - - 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/client-log/package.json b/packages/client-log/package.json deleted file mode 100644 index 4d55e8db0a..0000000000 --- a/packages/client-log/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@corbits/client-log", - "version": "0.0.1", - "private": true, - "description": "The one browser-side logger apps/web and chat-ui use in place of raw console calls: category + level, a ring buffer a devtools panel or a future beacon can flush, and a console sink gated by level so noisy debug/info lines don't ship to a real user's console.", - "license": "LGPL-2.1-only", - "type": "module", - "exports": { - ".": "./src/index.ts" - }, - "scripts": { - "typecheck": "tsc --noEmit", - "test": "bun test" - }, - "devDependencies": { - "@types/bun": "catalog:", - "typescript": "catalog:" - } -} diff --git a/packages/client-log/tsconfig.json b/packages/client-log/tsconfig.json deleted file mode 100644 index e125e90614..0000000000 --- a/packages/client-log/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.src.json", - "compilerOptions": { - "composite": false, - "noEmit": true, - "disableSourceOfProjectReferenceRedirect": true, - "declaration": false, - "declarationMap": false, - "emitDeclarationOnly": false, - "tsBuildInfoFile": "tsconfig.tsbuildinfo", - "rootDir": "../.." - }, - "include": ["src"], - "exclude": [] -} diff --git a/packages/client-log/tsconfig.src.json b/packages/client-log/tsconfig.src.json deleted file mode 100644 index 50abef4ff0..0000000000 --- a/packages/client-log/tsconfig.src.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "include": ["src", "package.json", "src/**/*.json"], - "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"], - "compilerOptions": { - "lib": ["ESNext", "DOM", "DOM.Iterable"], - "types": ["bun"], - "composite": true, - "emitDeclarationOnly": true, - "outDir": "dist", - "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" - } -} diff --git a/packages/command-palette/LICENSE b/packages/command-palette/LICENSE deleted file mode 100644 index 173c3a21d0..0000000000 --- a/packages/command-palette/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ -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; version 2.1 of the License. - - 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/command-palette/README.md b/packages/command-palette/README.md deleted file mode 100644 index 23efccd37d..0000000000 --- a/packages/command-palette/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# @corbits/command-palette - -The global command-palette registry: static navigation commands built from -the host app's own route table, plus debounced, paginated entity search -over whatever entity sources (channels, routines, agents) the host wires -in. Rendering — the overlay, keyboard contract, grouped/loading/empty/ -load-more states — is a `@corbits/react-ui` -([corbitsdev/react-ui](https://github.com/corbitsdev/react-ui)) concern; -this package owns only the data and matching logic behind it. - -## Key modules - -- `static-commands.ts` — `buildStaticCommands` turns a route table into - palette commands; `matchesQuery` is the match rule -- `entity-search.ts` — `searchEntities`, the pure match/paginate core over - already-fetched entity lists -- `use-entity-search.ts` — the one React hook this package owns: debounces - a typed query and fetches entity pages, since that timing is inseparable - from the pagination it resets -- `scope.ts` — `parsePaletteQuery`/`PALETTE_SCOPES`, the prefix-scope rules - (e.g. `#` for channels) -- `command-groups.ts` — `buildCommandPaletteGroups`, the grouping rules the - palette UI renders from -- `recents.ts` — the small Recents store - -## Running tests - -``` -cd packages/command-palette && bun test -``` - -Some suites mount into a real DOM (see `test/dom-setup.ts`); running from -the package directory picks up `bunfig.toml`'s preload. diff --git a/packages/command-palette/bunfig.toml b/packages/command-palette/bunfig.toml deleted file mode 100644 index 7cd3f7e047..0000000000 --- a/packages/command-palette/bunfig.toml +++ /dev/null @@ -1,2 +0,0 @@ -[test] -preload = ["./test/dom-setup.ts"] diff --git a/packages/command-palette/package.json b/packages/command-palette/package.json deleted file mode 100644 index bbb9e658a1..0000000000 --- a/packages/command-palette/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@corbits/command-palette", - "version": "0.0.1", - "private": true, - "description": "The global command-palette registry: static navigation commands and debounced, paginated entity search, so any surface can render them", - "license": "LGPL-2.1-only", - "type": "module", - "exports": { - ".": "./src/index.ts" - }, - "scripts": { - "typecheck": "tsc --noEmit", - "test": "bun test" - }, - "dependencies": { - "@corbits/slug": "workspace:*", - "react": "^19.2.0" - }, - "devDependencies": { - "@happy-dom/global-registrator": "^20.11.2", - "@types/bun": "catalog:", - "@types/react": "^19.2.2", - "@types/react-dom": "catalog:", - "react-dom": "^19.2.0", - "typescript": "catalog:" - } -} diff --git a/packages/command-palette/test/dom-setup.ts b/packages/command-palette/test/dom-setup.ts deleted file mode 100644 index c9b4f20c1a..0000000000 --- a/packages/command-palette/test/dom-setup.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { GlobalRegistrator } from "@happy-dom/global-registrator"; - -// This package's other tests are pure functions of plain data and need no -// DOM. `useEntitySearch` is the exception — it debounces on a real timer and -// drives state off real effects, so it is exercised against a registered DOM -// rather than mocked piecemeal. -GlobalRegistrator.register(); - -declare global { - var IS_REACT_ACT_ENVIRONMENT: boolean; -} -globalThis.IS_REACT_ACT_ENVIRONMENT = true; diff --git a/packages/command-palette/tsconfig.json b/packages/command-palette/tsconfig.json deleted file mode 100644 index 979ca91e51..0000000000 --- a/packages/command-palette/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "./tsconfig.src.json", - "compilerOptions": { - "composite": false, - "noEmit": true, - "disableSourceOfProjectReferenceRedirect": true, - "declaration": false, - "declarationMap": false, - "emitDeclarationOnly": false, - "tsBuildInfoFile": "tsconfig.tsbuildinfo", - "rootDir": "../.." - }, - "include": ["src", "test"], - "exclude": [], - "references": [ - { - "path": "../slug/tsconfig.src.json" - } - ] -} diff --git a/packages/command-palette/tsconfig.src.json b/packages/command-palette/tsconfig.src.json deleted file mode 100644 index 4cbde5b3da..0000000000 --- a/packages/command-palette/tsconfig.src.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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": "../slug/tsconfig.src.json" - } - ] -} diff --git a/packages/connections/package.json b/packages/connections/package.json index b964d964b6..78048f8715 100644 --- a/packages/connections/package.json +++ b/packages/connections/package.json @@ -40,7 +40,6 @@ "@corbits/github-tools": "workspace:*", "@corbits/hub-api-client": "workspace:*", "@corbits/inference-catalog": "workspace:*", - "@corbits/inference-settings": "workspace:*", "@corbits/mcp-tools": "workspace:*", "@corbits/oauth-core": "github:corbitsdev/corbits-oauth-core#v0.1.1", "@corbits/workflows": "workspace:*", diff --git a/packages/context-menu/LICENSE b/packages/context-menu/LICENSE deleted file mode 100644 index 173c3a21d0..0000000000 --- a/packages/context-menu/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ -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; version 2.1 of the License. - - 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/context-menu/README.md b/packages/context-menu/README.md deleted file mode 100644 index cc08fa00e9..0000000000 --- a/packages/context-menu/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# @corbits/context-menu - -The deployment-agnostic half of the global right-click context-menu -system: resolving a DOM event to a typed target, deciding whether an open -modal should suppress the menu, the open/position state machine, the -single document-level listener that drives it, and returning focus to the -right-clicked row on close. Presentation renders through `@corbits/react-ui` -([corbitsdev/react-ui](https://github.com/corbitsdev/react-ui))'s `Menu` -family via `ContextMenuView`. What counts as a target and which items it -offers is product-specific and stays with the host app. - -## Key modules - -- `target-resolver.ts` — `resolveTarget`, mapping a DOM event to a typed - `TargetDefinition` -- `dialog-guard.ts` — `isBlockingOverlayOpen`/`isInsideInteractiveInput`, - the checks that suppress the menu under an open modal or inside an input -- `use-context-menu-state.ts` — the open/position state hook -- `use-document-context-menu-trigger.ts` — the single document listener a - host mounts once -- `focus-restore.ts` — `findFocusable`/`restoreFocus`, returning focus to - the triggering row on close -- `menu.ts` — `contextMenuItem`/`contextMenuSeparator`, the pure menu-shape - builders a host composes into a `ContextMenu` -- `context-menu-view.tsx` — the react-ui-backed presentation, `ContextMenuView` - -## Running tests - -``` -cd packages/context-menu && bun test -``` - -Some suites mount into a real DOM (see `test/dom-setup.ts`); running from -the package directory picks up `bunfig.toml`'s preload. diff --git a/packages/context-menu/bunfig.toml b/packages/context-menu/bunfig.toml deleted file mode 100644 index 7cd3f7e047..0000000000 --- a/packages/context-menu/bunfig.toml +++ /dev/null @@ -1,2 +0,0 @@ -[test] -preload = ["./test/dom-setup.ts"] diff --git a/packages/context-menu/package.json b/packages/context-menu/package.json deleted file mode 100644 index 5ce15eed4d..0000000000 --- a/packages/context-menu/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@corbits/context-menu", - "version": "0.0.1", - "private": true, - "description": "The global right-click context-menu system: resolving a DOM event to a typed target, deciding whether a modal overlay should suppress it, and the open/position state a react-ui Menu renders from", - "license": "LGPL-2.1-only", - "type": "module", - "exports": { - ".": "./src/index.ts" - }, - "scripts": { - "typecheck": "tsc --noEmit", - "test": "bun test" - }, - "dependencies": { - "@corbits/react-ui": "github:corbitsdev/react-ui#3b122812a307ccb35be31386f7696020c5a84635", - "react": "^19.2.0" - }, - "devDependencies": { - "@happy-dom/global-registrator": "^20.11.2", - "@types/bun": "catalog:", - "@types/react": "^19.2.2", - "@types/react-dom": "catalog:", - "react-dom": "^19.2.0", - "typescript": "catalog:" - } -} diff --git a/packages/context-menu/test/dom-setup.ts b/packages/context-menu/test/dom-setup.ts deleted file mode 100644 index 99f9d3b4a4..0000000000 --- a/packages/context-menu/test/dom-setup.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { GlobalRegistrator } from "@happy-dom/global-registrator"; - -// Target resolution walks real `Element.closest()` chains and the trigger -// hook listens for real `contextmenu` DOM events, so these suites run -// against a registered DOM rather than mocked piecemeal. -GlobalRegistrator.register(); - -declare global { - var IS_REACT_ACT_ENVIRONMENT: boolean; -} -globalThis.IS_REACT_ACT_ENVIRONMENT = true; diff --git a/packages/context-menu/tsconfig.json b/packages/context-menu/tsconfig.json deleted file mode 100644 index a8c2b9966d..0000000000 --- a/packages/context-menu/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.src.json", - "compilerOptions": { - "composite": false, - "noEmit": true, - "disableSourceOfProjectReferenceRedirect": true, - "declaration": false, - "declarationMap": false, - "emitDeclarationOnly": false, - "tsBuildInfoFile": "tsconfig.tsbuildinfo", - "rootDir": "../.." - }, - "include": ["src", "test"], - "exclude": [] -} diff --git a/packages/context-menu/tsconfig.src.json b/packages/context-menu/tsconfig.src.json deleted file mode 100644 index c01ffd21b0..0000000000 --- a/packages/context-menu/tsconfig.src.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "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" - } -} diff --git a/packages/error-sink/README.md b/packages/error-sink/README.md index f8237d80e0..3686a4c644 100644 --- a/packages/error-sink/README.md +++ b/packages/error-sink/README.md @@ -79,7 +79,7 @@ Out of scope for this unit, but the plan: migrate `apps/web`'s four `getLogger` call sites (`instant-agent-create.ts`, `auth-screen.tsx`, `main.tsx`, `app-error-boundary.tsx`) onto `@intx/log` directly, confirm LogTape's browser sink covers the same "visible in devtools" bar -`client-log`'s console mirror does, then delete `packages/client-log`. +`client-log`'s console mirror does, then delete `apps/web/src/lib/client-log`. Small enough for one follow-up PR; the only open question is whether `client-log`'s in-memory ring buffer (for a future devtools panel) has any real consumer yet, or can be dropped outright. diff --git a/packages/icons/LICENSE b/packages/icons/LICENSE deleted file mode 100644 index 173c3a21d0..0000000000 --- a/packages/icons/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ -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; version 2.1 of the License. - - 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/icons/README.md b/packages/icons/README.md deleted file mode 100644 index 1817bafa5e..0000000000 --- a/packages/icons/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# @corbits/icons - -The one Phosphor icon surface every app/package imports glyphs through. -Owner ruling: Phosphor (`@phosphor-icons/react`) replaced lucide-react -everywhere, bold is the only weight, and the Sparkle/Sparkles glyph is -banned outright. - -- `src/index.tsx` — the curated re-export list (only glyphs the product - actually uses are named) plus `BoldIconProvider`, the `IconContext` - wrapper that defaults every icon under it to `weight="bold"`. Mounted - once at each app's root (`apps/web/src/app.tsx`). -- Nothing else imports `@phosphor-icons/react` or `lucide-react` directly — - enforced by the `no-restricted-imports` oxlint rule in `.oxlintrc.json`. - The Sparkle/Sparkles glyph ban (previously an ESLint `no-restricted-syntax` - selector, which oxlint has no equivalent for) is unenforced by tooling for - now — reviewers should still reject it by eye. - -Extraction-ready: this package is deliberately just re-exports plus one -context provider, no app-specific logic, so it can move into -[corbitsdev/react-ui](https://github.com/corbitsdev/react-ui) as its icon -surface without any call site changing. - -## Running tests - -``` -cd packages/icons && bun test -``` diff --git a/packages/icons/package.json b/packages/icons/package.json deleted file mode 100644 index 5ee8cf8788..0000000000 --- a/packages/icons/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "@corbits/icons", - "version": "0.0.1", - "private": true, - "description": "The one Phosphor icon surface every app/package imports glyphs through — bold weight, curated names, no lucide-react and no Sparkle anywhere", - "license": "LGPL-2.1-only", - "type": "module", - "sideEffects": false, - "exports": { - ".": "./src/index.tsx" - }, - "scripts": { - "typecheck": "tsc --noEmit", - "test": "bun test" - }, - "dependencies": { - "@phosphor-icons/react": "^2.1.10", - "react": "^19.2.0" - }, - "devDependencies": { - "@types/bun": "catalog:", - "@types/react": "^19.2.2", - "typescript": "catalog:" - } -} diff --git a/packages/icons/tsconfig.json b/packages/icons/tsconfig.json deleted file mode 100644 index e125e90614..0000000000 --- a/packages/icons/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.src.json", - "compilerOptions": { - "composite": false, - "noEmit": true, - "disableSourceOfProjectReferenceRedirect": true, - "declaration": false, - "declarationMap": false, - "emitDeclarationOnly": false, - "tsBuildInfoFile": "tsconfig.tsbuildinfo", - "rootDir": "../.." - }, - "include": ["src"], - "exclude": [] -} diff --git a/packages/icons/tsconfig.src.json b/packages/icons/tsconfig.src.json deleted file mode 100644 index c01ffd21b0..0000000000 --- a/packages/icons/tsconfig.src.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "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" - } -} diff --git a/packages/inference-settings/LICENSE b/packages/inference-settings/LICENSE deleted file mode 100644 index 173c3a21d0..0000000000 --- a/packages/inference-settings/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ -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; version 2.1 of the License. - - 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/inference-settings/package.json b/packages/inference-settings/package.json deleted file mode 100644 index 4efea46464..0000000000 --- a/packages/inference-settings/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@corbits/inference-settings", - "version": "0.0.1", - "private": true, - "description": "Per-workbench inference settings: the effective ordered model/provider catalog with inherited-vs-set-here provenance, and the native catalog writes (priority reorder, restrict, bring-your-own-key shadowing) a workbench tenant can make against it.", - "license": "LGPL-2.1-only", - "type": "module", - "exports": { - ".": "./src/index.ts", - "./api": "./src/api.ts", - "./effective-list": "./src/effective-list.ts" - }, - "scripts": { - "typecheck": "tsc --noEmit", - "test": "bun test" - }, - "dependencies": { - "@corbits/connections": "workspace:*", - "@intx/types": "workspace:*", - "arktype": "catalog:" - }, - "devDependencies": { - "@types/bun": "catalog:", - "typescript": "catalog:" - } -} diff --git a/packages/inference-settings/tsconfig.json b/packages/inference-settings/tsconfig.json deleted file mode 100644 index 68035e9a3b..0000000000 --- a/packages/inference-settings/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "include": ["src", "test"], - "compilerOptions": { - "jsx": "react-jsx", - "lib": ["ESNext", "DOM", "DOM.Iterable"], - "types": ["bun"], - "noEmit": true - } -} diff --git a/packages/plugins-ui/LICENSE b/packages/plugins-ui/LICENSE deleted file mode 100644 index 173c3a21d0..0000000000 --- a/packages/plugins-ui/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ -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; version 2.1 of the License. - - 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/plugins-ui/README.md b/packages/plugins-ui/README.md deleted file mode 100644 index 3e28e06046..0000000000 --- a/packages/plugins-ui/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# @corbits/plugins-ui - -The Plugins gallery: connector and skill cards, search, an installed strip, -and a one-flow connect panel — presentational components composed from the -connections registry and skill registry the Settings surfaces already -read. Every list arrives already loaded; the composing page (`apps/web`) -owns fetching data and passes it down. - -## How it composes - -- Reads `ResolvedPlugin` from `@corbits/connections/plugins` — the - tenant-inheritance-aware resolver — rather than re-deriving connection - status itself. -- `PluginConnectPanel` reuses the exact mutations `@corbits/settings-ui`'s - own Connections section calls (`completeConnectorCredential`, - `deleteCredential`, `oauthStartHref`), - and mounts `@corbits/settings-ui`'s `GranolaWebhookCard` wholesale for - Granola's key-plus-webhook connect rather than forking its dialog. -- Built on `@corbits/react-ui` primitives (`Card`, `Badge`, `Dialog`, - `Tabs`, `EmptyState`, `LibrarySearchInput`) — see - [corbitsdev/react-ui](https://github.com/corbitsdev/react-ui) for the - underlying design system; this package only adds workbench-specific - composition. - -## Key modules - -- `plugins-gallery.tsx` — Plugins | Skills tabs over one search box, an - installed strip, and a Featured-then-category card grid. -- `plugin-card.tsx` — one plugin's icon, name, outcome sentence, and a - single action that reads honestly off the connector's real status. -- `skill-card.tsx` — a skill given the same card treatment (no - scope badge — the stock asset routes carry no scope/visibility flag). -- `installed-strip.tsx` — the at-a-glance row of already-connected - plugins above the search/category grid. -- `plugin-connect-panel.tsx` — the right-docked connect flow for every - connector kind (OAuth, api-key, Granola's key-plus-webhook). -- `plugin-meta.ts` — presentation-only sidecar lookups (icon, category, - outcome copy) keyed by connector id; the connector set itself - (`templates/connectors.ts`'s `CONNECTOR_REGISTRY`) stays UI-agnostic. - -## Running tests - -``` -cd packages/plugins-ui && bun test -``` - -Tests run in a DOM environment (`@happy-dom/global-registrator`, preloaded -via `bunfig.toml`); no live database or external credentials required. diff --git a/packages/plugins-ui/bunfig.toml b/packages/plugins-ui/bunfig.toml deleted file mode 100644 index 564f98dac7..0000000000 --- a/packages/plugins-ui/bunfig.toml +++ /dev/null @@ -1,2 +0,0 @@ -[test] -preload = ["./test/dom-environment.ts"] diff --git a/packages/plugins-ui/package.json b/packages/plugins-ui/package.json deleted file mode 100644 index 50008026c0..0000000000 --- a/packages/plugins-ui/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "@corbits/plugins-ui", - "version": "0.0.1", - "private": true, - "description": "The Plugins gallery: connector and skill cards, search, the installed strip, and the one-flow connect panel — composed from the connections registry and skill registry the Settings surfaces already read.", - "license": "LGPL-2.1-only", - "type": "module", - "exports": { - ".": "./src/index.ts" - }, - "scripts": { - "typecheck": "tsc --noEmit", - "test": "bun test" - }, - "dependencies": { - "@corbits/connections": "workspace:*", - "@corbits/error-sink": "workspace:*", - "@corbits/icons": "workspace:*", - "@corbits/react-ui": "github:corbitsdev/react-ui#3b122812a307ccb35be31386f7696020c5a84635", - "@corbits/settings-ui": "workspace:*", - "arktype": "catalog:", - "react": "^19.2.0", - "react-dom": "^19.2.0" - }, - "devDependencies": { - "@happy-dom/global-registrator": "^20.11.2", - "@types/bun": "catalog:", - "@types/react": "^19.2.2", - "@types/react-dom": "catalog:", - "react-dom": "^19.2.0", - "typescript": "catalog:" - } -} diff --git a/packages/plugins-ui/test/dom-environment.ts b/packages/plugins-ui/test/dom-environment.ts deleted file mode 100644 index fe347af014..0000000000 --- a/packages/plugins-ui/test/dom-environment.ts +++ /dev/null @@ -1,18 +0,0 @@ -// A DOM for the tests that need one. Without it, UI tests in this package -// are limited to `renderToStaticMarkup`, which never runs an effect — so -// hooks, listeners, and stateful re-renders could only be reasoned about, -// not asserted. Registered through `bunfig.toml`'s preload so it is in -// place before any test module imports React. - -import { GlobalRegistrator } from "@happy-dom/global-registrator"; - -GlobalRegistrator.register({ url: "https://workbench.test/" }); - -// React only lets `act()` flush effects when it is told it is in a test -// environment; without this every effect-driven assertion silently sees a -// half-rendered tree. -globalThis.IS_REACT_ACT_ENVIRONMENT = true; - -declare global { - var IS_REACT_ACT_ENVIRONMENT: boolean; -} diff --git a/packages/plugins-ui/tsconfig.json b/packages/plugins-ui/tsconfig.json deleted file mode 100644 index 68035e9a3b..0000000000 --- a/packages/plugins-ui/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "include": ["src", "test"], - "compilerOptions": { - "jsx": "react-jsx", - "lib": ["ESNext", "DOM", "DOM.Iterable"], - "types": ["bun"], - "noEmit": true - } -} diff --git a/packages/settings-ui/LICENSE b/packages/settings-ui/LICENSE deleted file mode 100644 index 173c3a21d0..0000000000 --- a/packages/settings-ui/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ -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; version 2.1 of the License. - - 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/settings-ui/README.md b/packages/settings-ui/README.md deleted file mode 100644 index 5a835fadeb..0000000000 --- a/packages/settings-ui/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# @corbits/settings-ui - -The settings surface: `SettingsShell` renders the active section's panel -only — section nav is a master-detail list that lives in the host's own -col2 (`resolveSettingsSectionGroups`), never repeated in the stage. -Presentational primitives come from `@corbits/react-ui` -([corbitsdev/react-ui](https://github.com/corbitsdev/react-ui)); this -package holds the workbench-specific section composition, HTTP clients, -and the domain model of which sections exist and who can see them. - -Sections are grouped Account (personal: account) and Everyone -(account-wide: connections, people, roles, grants, audit) — the -single-concept collapse of the old Personal/Workspace split, since -there is one workbench per account today. `resolveSettingsSectionGroups` -is the one source of truth a host reads for both the settings stage and -its own section nav, so the two never drift; `insertEveryoneSections` lets -a host splice in its own account-wide sections (e.g. Agents/Skills) -alongside these. Notifications and "Your agent" stay out of the registry -until a preference store backs them (honest absence over draft-only -toggles). - -## Key modules - -- `shell.tsx` — the section-panel shell and `resolveActiveSection` -- `section-registry.tsx` — the Account/Everyone grouping, ordering, icons, - and tenancy gates -- `people-section.tsx` / `roles-section.tsx` / `grants-section.tsx` / - `connections-section.tsx` — the Everyone-group and account-scoped - management surfaces, each with its own API module -- `account-section.tsx` / `audit-section.tsx` — the Account-group and - Advanced surfaces (`notifications-section.tsx` remains as a dormant - draft until a preference store exists) -- `access.ts` / `tenancy-api.ts` — tenancy-gate resolution and the - principals/roles/grants HTTP client - -## Running tests - -``` -cd packages/settings-ui && bun test -``` - -Several suites mount into a real DOM (see `test/dom-environment.ts`); -running from the package directory picks up `bunfig.toml`'s preload. diff --git a/packages/settings-ui/bunfig.toml b/packages/settings-ui/bunfig.toml deleted file mode 100644 index 564f98dac7..0000000000 --- a/packages/settings-ui/bunfig.toml +++ /dev/null @@ -1,2 +0,0 @@ -[test] -preload = ["./test/dom-environment.ts"] diff --git a/packages/settings-ui/package.json b/packages/settings-ui/package.json deleted file mode 100644 index 08c8891044..0000000000 --- a/packages/settings-ui/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@corbits/settings-ui", - "version": "0.0.1", - "private": true, - "description": "The settings surface's shell: a section-nav layout that packages contribute sections into, plus the Bench, Chats & channels, and Account sections shipped today", - "license": "LGPL-2.1-only", - "type": "module", - "sideEffects": [ - "**/*.css" - ], - "exports": { - ".": "./src/index.ts", - "./styles.css": "./src/styles.css" - }, - "scripts": { - "typecheck": "tsc --noEmit", - "test": "bun test" - }, - "dependencies": { - "@corbits/api-query": "workspace:*", - "@corbits/bench-ui": "workspace:*", - "@corbits/chat-ui": "workspace:*", - "@corbits/connections": "workspace:*", - "@corbits/error-sink": "workspace:*", - "@corbits/icons": "workspace:*", - "@corbits/inference-settings": "workspace:*", - "@corbits/react-ui": "github:corbitsdev/react-ui#3b122812a307ccb35be31386f7696020c5a84635", - "@corbits/workflows": "workspace:*", - "@intx/types": "workspace:*", - "arktype": "catalog:", - "react": "^19.2.0", - "react-dom": "^19.2.0" - }, - "devDependencies": { - "@happy-dom/global-registrator": "^20.11.2", - "@types/bun": "catalog:", - "@types/react": "^19.2.2", - "@types/react-dom": "catalog:", - "react-dom": "^19.2.0", - "typescript": "catalog:" - } -} diff --git a/packages/settings-ui/test/dom-environment.ts b/packages/settings-ui/test/dom-environment.ts deleted file mode 100644 index fe347af014..0000000000 --- a/packages/settings-ui/test/dom-environment.ts +++ /dev/null @@ -1,18 +0,0 @@ -// A DOM for the tests that need one. Without it, UI tests in this package -// are limited to `renderToStaticMarkup`, which never runs an effect — so -// hooks, listeners, and stateful re-renders could only be reasoned about, -// not asserted. Registered through `bunfig.toml`'s preload so it is in -// place before any test module imports React. - -import { GlobalRegistrator } from "@happy-dom/global-registrator"; - -GlobalRegistrator.register({ url: "https://workbench.test/" }); - -// React only lets `act()` flush effects when it is told it is in a test -// environment; without this every effect-driven assertion silently sees a -// half-rendered tree. -globalThis.IS_REACT_ACT_ENVIRONMENT = true; - -declare global { - var IS_REACT_ACT_ENVIRONMENT: boolean; -} diff --git a/packages/settings-ui/tsconfig.json b/packages/settings-ui/tsconfig.json deleted file mode 100644 index 68035e9a3b..0000000000 --- a/packages/settings-ui/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "include": ["src", "test"], - "compilerOptions": { - "jsx": "react-jsx", - "lib": ["ESNext", "DOM", "DOM.Iterable"], - "types": ["bun"], - "noEmit": true - } -} diff --git a/packages/shell-layout/LICENSE b/packages/shell-layout/LICENSE deleted file mode 100644 index 173c3a21d0..0000000000 --- a/packages/shell-layout/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ -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; version 2.1 of the License. - - 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/shell-layout/README.md b/packages/shell-layout/README.md deleted file mode 100644 index 6b3c904710..0000000000 --- a/packages/shell-layout/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# @corbits/shell-layout - -The generic shell mechanics a second Interchange deployment needs to -compose its own shell frame (sidebar, main stage, canvas) without -inheriting workbench's product policy. This package owns state machines -and hooks; the host app owns what its sidebar lists, which routes exist, -and the concrete types its canvas renders. - -## What a host app injects - -**Canvas profile and artifact types** — `CanvasColumnState` and its transition functions (`openProfileInCanvas`, -`openArtifactInCanvas`, `closeCanvasContent`, `toggleCanvasFocus`, …) are -generic over whatever a host's canvas renders: - -```ts -import { initialCanvasColumnState, type CanvasColumnState } from "@corbits/shell-layout"; - -type HostProfile = { id: string; displayName: string }; -type HostArtifact = { id: string; title: string; body: string }; - -const [state, setState] = useState>( - initialCanvasColumnState, -); -``` - -This package never imports the host's concrete subject or artifact -types — it only ever touches `.profile`/`.artifact` as opaque `TProfile`/ -`TArtifact` values. - -**Breakpoint config** — `shellLayoutModeForWidth`/`shellLayoutModeFromMatches` -take raw pixel widths; the compact/narrow thresholds (`COMPACT_MAX_WIDTH`, -`NARROW_MAX_WIDTH`) are exported constants a host can read but not -override — one breakpoint contract for every consumer. The one per-mode -column rule is `canvasColumnAllowed` (the canvas needs "expanded"); the -sidebar is always present and has no mode rule. - -**Dialog-request handling** — `createPendingDialogRequest()` returns an -isolated `{ request, consumePending, resetPending }` instance per call; a -host wires its own dialog trigger and target-route mount effect around it -(see `command-palette-actions.ts` / the target page's mount effect for the -pattern). - -## What this package never knows about - -- **Routes.** No route table, no path constants. -- **Sidebar content.** What the sidebar lists is 100% host policy. -- **Workbench's concrete types.** `ProfileSubject` (`@corbits/chat-ui`) and - `ArtifactRendererKind` (`@corbits/artifact-ui`) are never imported here; - the canvas state machine is generic precisely so a different host can - plug in its own subject and artifact shapes. - -## Modules - -| Module | Owns | -| --------------------------- | ---------------------------------------------------------- | -| `breakpoints.ts` | Pixel-width → `ShellLayoutMode` and the canvas's mode rule | -| `use-shell-layout.ts` | The `matchMedia`-driven hook reading those breakpoints | -| `canvas-column-state.ts` | The canvas's open/profile/artifact/focus state machine | -| `use-scroll-reset.ts` | Per-route scroll reset | -| `pending-dialog-request.ts` | The cross-route "open this dialog" pattern | - -## Where the workbench build's concrete types live - -`apps/web/src/shell/canvas-availability.tsx` defines this app's -`CanvasArtifactContent` (with `rendererKind: ArtifactRendererKind`, -`canEdit`, …) and instantiates `CanvasColumnState` as `AppCanvasColumnState` — the one place workbench -policy meets this package's generic mechanism. A different host defines -its own equivalent file with its own types. - -## Running tests - -``` -cd packages/shell-layout && bun test -``` - -Some suites mount into a real DOM (see `test/dom-setup.ts`); running from -the package directory picks up `bunfig.toml`'s preload. diff --git a/packages/shell-layout/bunfig.toml b/packages/shell-layout/bunfig.toml deleted file mode 100644 index 7cd3f7e047..0000000000 --- a/packages/shell-layout/bunfig.toml +++ /dev/null @@ -1,2 +0,0 @@ -[test] -preload = ["./test/dom-setup.ts"] diff --git a/packages/shell-layout/package.json b/packages/shell-layout/package.json deleted file mode 100644 index a3814a98a1..0000000000 --- a/packages/shell-layout/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@corbits/shell-layout", - "version": "0.0.1", - "private": true, - "description": "The generic shell layout mechanics a second Interchange deployment needs: responsive breakpoints, the canvas column state machine, per-route scroll reset, and the pending-dialog-request pattern. Composition (routes, sidebar content, app policy) stays in the consuming app.", - "license": "LGPL-2.1-only", - "type": "module", - "exports": { - ".": "./src/index.ts" - }, - "scripts": { - "typecheck": "tsc --noEmit", - "test": "bun test" - }, - "dependencies": { - "react": "^19.2.0" - }, - "devDependencies": { - "@happy-dom/global-registrator": "^20.11.2", - "@types/bun": "catalog:", - "@types/react": "^19.2.2", - "@types/react-dom": "catalog:", - "react-dom": "^19.2.0", - "typescript": "catalog:" - } -} diff --git a/packages/shell-layout/test/dom-setup.ts b/packages/shell-layout/test/dom-setup.ts deleted file mode 100644 index 268bc40a62..0000000000 --- a/packages/shell-layout/test/dom-setup.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { GlobalRegistrator } from "@happy-dom/global-registrator"; - -// `useShellLayoutMode` and `useScrollReset` are effect-driven — a real DOM -// is what lets `act()` flush those effects, so the other (pure) tests in -// this package need no preload but these do. -GlobalRegistrator.register(); - -declare global { - var IS_REACT_ACT_ENVIRONMENT: boolean; -} -globalThis.IS_REACT_ACT_ENVIRONMENT = true; diff --git a/packages/shell-layout/tsconfig.json b/packages/shell-layout/tsconfig.json deleted file mode 100644 index a8c2b9966d..0000000000 --- a/packages/shell-layout/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.src.json", - "compilerOptions": { - "composite": false, - "noEmit": true, - "disableSourceOfProjectReferenceRedirect": true, - "declaration": false, - "declarationMap": false, - "emitDeclarationOnly": false, - "tsBuildInfoFile": "tsconfig.tsbuildinfo", - "rootDir": "../.." - }, - "include": ["src", "test"], - "exclude": [] -} diff --git a/packages/shell-layout/tsconfig.src.json b/packages/shell-layout/tsconfig.src.json deleted file mode 100644 index c01ffd21b0..0000000000 --- a/packages/shell-layout/tsconfig.src.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "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" - } -} diff --git a/packages/slug/LICENSE b/packages/slug/LICENSE deleted file mode 100644 index 173c3a21d0..0000000000 --- a/packages/slug/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ -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; version 2.1 of the License. - - 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/slug/README.md b/packages/slug/README.md deleted file mode 100644 index 65e8aa294e..0000000000 --- a/packages/slug/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# @corbits/slug - -The URL-facing name of an entity. Agents, skills, plugins, and routines are -addressed by slug (`/agents/triage-bot`), not by opaque id, so the two -directions of that mapping live in one place: `slugify` derives a slug from -a display name, `isValidSlug` says whether a string read off a URL is a -slug at all. - -Pure string functions, no dependencies — safe in the browser bundle and in -hub code alike. - -## Composition with @intx/\* - -None. Ids belong to Interchange (`@intx/*`); a slug is the human-readable -name beside an id, never a replacement for one. - -## Key modules - -- `src/slug.ts` — `slugify` (accents folded to ASCII, non-alphanumerics - collapsed to single hyphens, capped at `SLUG_MAX_LENGTH`), `isValidSlug` - (exactly the shape `slugify` produces). -- `src/index.ts` — re-exports both plus `SLUG_MAX_LENGTH`. - -Uniqueness is not a property of a string: a slug is unique per tenant per -entity kind, enforced by the owning table's constraint, not here. - -## Running tests - -``` -cd packages/slug && bun test -``` diff --git a/packages/slug/package.json b/packages/slug/package.json deleted file mode 100644 index fed2c2aa14..0000000000 --- a/packages/slug/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@corbits/slug", - "version": "0.0.1", - "private": true, - "description": "Human-readable URL slugs for named entities: slugify a display name, validate a slug read off a URL", - "license": "LGPL-2.1-only", - "type": "module", - "exports": { - ".": "./src/index.ts" - }, - "scripts": { - "typecheck": "tsc --noEmit", - "test": "bun test" - }, - "devDependencies": { - "@types/bun": "catalog:", - "typescript": "catalog:" - } -} diff --git a/packages/slug/tsconfig.json b/packages/slug/tsconfig.json deleted file mode 100644 index e125e90614..0000000000 --- a/packages/slug/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.src.json", - "compilerOptions": { - "composite": false, - "noEmit": true, - "disableSourceOfProjectReferenceRedirect": true, - "declaration": false, - "declarationMap": false, - "emitDeclarationOnly": false, - "tsBuildInfoFile": "tsconfig.tsbuildinfo", - "rootDir": "../.." - }, - "include": ["src"], - "exclude": [] -} diff --git a/packages/slug/tsconfig.src.json b/packages/slug/tsconfig.src.json deleted file mode 100644 index fc8724305f..0000000000 --- a/packages/slug/tsconfig.src.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "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" - } -} diff --git a/packages/text-diff/LICENSE b/packages/text-diff/LICENSE deleted file mode 100644 index 173c3a21d0..0000000000 --- a/packages/text-diff/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ -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; version 2.1 of the License. - - 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/text-diff/package.json b/packages/text-diff/package.json deleted file mode 100644 index 25f7938d2a..0000000000 --- a/packages/text-diff/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@corbits/text-diff", - "version": "0.0.1", - "private": true, - "description": "Line-level text diff: the shortest add/remove script between two revisions of a document, for review surfaces that show what a save is about to change", - "license": "LGPL-2.1-only", - "type": "module", - "exports": { - ".": "./src/index.ts" - }, - "scripts": { - "typecheck": "tsc --noEmit", - "test": "bun test" - }, - "devDependencies": { - "@types/bun": "catalog:", - "typescript": "catalog:" - } -} diff --git a/packages/text-diff/tsconfig.json b/packages/text-diff/tsconfig.json deleted file mode 100644 index e125e90614..0000000000 --- a/packages/text-diff/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.src.json", - "compilerOptions": { - "composite": false, - "noEmit": true, - "disableSourceOfProjectReferenceRedirect": true, - "declaration": false, - "declarationMap": false, - "emitDeclarationOnly": false, - "tsBuildInfoFile": "tsconfig.tsbuildinfo", - "rootDir": "../.." - }, - "include": ["src"], - "exclude": [] -} diff --git a/packages/text-diff/tsconfig.src.json b/packages/text-diff/tsconfig.src.json deleted file mode 100644 index fc8724305f..0000000000 --- a/packages/text-diff/tsconfig.src.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "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" - } -} diff --git a/tools/connections/src/tool.ts b/tools/connections/src/tool.ts index 07ccb87ee8..22939b4341 100644 --- a/tools/connections/src/tool.ts +++ b/tools/connections/src/tool.ts @@ -94,7 +94,7 @@ function connectDeepLink(connectorId: string): string { /** There is no fixed id — and no generic add-custom-MCP-server form at * all — to deep-link to (; see - * `packages/plugins-ui/src/mcp-servers-section.tsx`'s header for why: + * `apps/web/src/tools/mcp-servers-section.tsx`'s header for why: * only curated presets are self-serve installable, an MCP server has * no id before it's tenant-minted at connect time). So this stays * plain prose pointed at the Plugins page's own connector list rather diff --git a/tools/mcp/README.md b/tools/mcp/README.md index 459c6a4292..81ef33c636 100644 --- a/tools/mcp/README.md +++ b/tools/mcp/README.md @@ -9,7 +9,7 @@ without a bespoke tool package per MCP server. Plugins → Add MCP server takes a full endpoint URL (stored as-is, not just its origin — see `packages/connections/src/mcp-server-routes.ts`) and an optional bearer credential. Granola, Exa, and Linear render as one-click -preset cards (`packages/plugins-ui/src/mcp-preset-cards.tsx`) that connect +preset cards (`apps/web/src/tools/mcp-preset-cards.tsx`) that connect via the same routes without the person typing a URL. ## Tools diff --git a/tsconfig.build.json b/tsconfig.build.json index 8369e56e27..cf329ed96f 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -10,33 +10,18 @@ { "path": "./packages/agent-events/tsconfig.src.json" }, - { - "path": "./packages/api-query/tsconfig.src.json" - }, { "path": "./packages/approvals/tsconfig.src.json" }, { "path": "./packages/artifact-ui/tsconfig.src.json" }, - { - "path": "./packages/bench-ui/tsconfig.src.json" - }, - { - "path": "./packages/client-log/tsconfig.src.json" - }, { "path": "./packages/code-review/tsconfig.src.json" }, { "path": "./packages/collections/tsconfig.src.json" }, - { - "path": "./packages/command-palette/tsconfig.src.json" - }, - { - "path": "./packages/context-menu/tsconfig.src.json" - }, { "path": "./packages/credential-providers/tsconfig.src.json" }, @@ -55,9 +40,6 @@ { "path": "./packages/hub-api-client/tsconfig.src.json" }, - { - "path": "./packages/icons/tsconfig.src.json" - }, { "path": "./packages/inference-catalog/tsconfig.src.json" }, @@ -73,15 +55,6 @@ { "path": "./packages/sandbox-sidecar/tsconfig.src.json" }, - { - "path": "./packages/shell-layout/tsconfig.src.json" - }, - { - "path": "./packages/slug/tsconfig.src.json" - }, - { - "path": "./packages/text-diff/tsconfig.src.json" - }, { "path": "./packages/tool-registry-publish/tsconfig.src.json" },