refactor: rename @crema/arcadia-client → @crema/arcadia-core-client
Disambiguates the Phoenix/auth client lib from lib-arcadia-agents-client. Dir lib-arcadia-client → lib-arcadia-core-client; alias updated in tsconfig paths, vite config, app.css @source, imports, CI and docs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ This file is a quick map, not a duplication of upstream docs.
|
|||||||
|
|
||||||
- **Arcadia Admin** is the operator/admin UI for [arcadia-core](../reference/arcadia-app), a multi-tenant Phoenix backend. Surfaces tenant management, user/role admin, billing, audit logs, storage configs, scheduled tasks, feature flags, and platform monitoring on top of arcadia's `/api/v1` and `/admin/*` endpoints.
|
- **Arcadia Admin** is the operator/admin UI for [arcadia-core](../reference/arcadia-app), a multi-tenant Phoenix backend. Surfaces tenant management, user/role admin, billing, audit logs, storage configs, scheduled tasks, feature flags, and platform monitoring on top of arcadia's `/api/v1` and `/admin/*` endpoints.
|
||||||
- **Cloned from** [Vibespace](../vibespace) — the starter for webapps in this style. Vibespace and Skyrise are the upstream sources of truth for the shell and the theme; don't backport arcadia-admin-specific changes into Vibespace unless they're broadly applicable.
|
- **Cloned from** [Vibespace](../vibespace) — the starter for webapps in this style. Vibespace and Skyrise are the upstream sources of truth for the shell and the theme; don't backport arcadia-admin-specific changes into Vibespace unless they're broadly applicable.
|
||||||
- **Backend reference** lives at `../reference/arcadia-app/`. Treat it as read-only documentation — it's the Phoenix umbrella app that owns the OpenAPI spec, controllers, schemas, and seed data. Spec is regenerated from a running arcadia at `http://localhost:4000/api/openapi` via `node ../lib-arcadia-client/scripts/sync-spec.mjs` (run from this directory).
|
- **Backend reference** lives at `../reference/arcadia-app/`. Treat it as read-only documentation — it's the Phoenix umbrella app that owns the OpenAPI spec, controllers, schemas, and seed data. Spec is regenerated from a running arcadia at `http://localhost:4000/api/openapi` via `node ../lib-arcadia-core-client/scripts/sync-spec.mjs` (run from this directory).
|
||||||
- **Skyrise** (`lib-theme-skyrise`) is the canonical theme — premium AI-first glass, iridescent body, vivid text, Apple-spring motion. Theme tweaks belong upstream in Vibespace + Skyrise, not here.
|
- **Skyrise** (`lib-theme-skyrise`) is the canonical theme — premium AI-first glass, iridescent body, vivid text, Apple-spring motion. Theme tweaks belong upstream in Vibespace + Skyrise, not here.
|
||||||
- The brand string lives in **one place**: `app/lib/identity.ts` (`useBrand()` / `getBrand()`). Don't hardcode "Arcadia Admin" in components, page titles, or copy.
|
- The brand string lives in **one place**: `app/lib/identity.ts` (`useBrand()` / `getBrand()`). Don't hardcode "Arcadia Admin" in components, page titles, or copy.
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ To use it for real:
|
|||||||
`app/components/layout/app-shell.tsx` — left rail + appbar + avatar dropdown. Brand identity in `app/lib/identity.ts` (`name: "Arcadia Admin"`, icon: `Shield`). The shell is **template code, not a lib** — fork it freely as admin features are added.
|
`app/components/layout/app-shell.tsx` — left rail + appbar + avatar dropdown. Brand identity in `app/lib/identity.ts` (`name: "Arcadia Admin"`, icon: `Shield`). The shell is **template code, not a lib** — fork it freely as admin features are added.
|
||||||
|
|
||||||
### Arcadia client + auth UI
|
### Arcadia client + auth UI
|
||||||
- [`@crema/arcadia-client`](../lib-arcadia-client) — typed HTTP client (generic + openapi-fetch-backed `client.typed`), Phoenix Channels realtime, error normalization. Mounted at the root via `<ArcadiaProvider>`.
|
- [`@crema/arcadia-core-client`](../lib-arcadia-core-client) — typed HTTP client (generic + openapi-fetch-backed `client.typed`), Phoenix Channels realtime, error normalization. Mounted at the root via `<ArcadiaProvider>`.
|
||||||
- [`@crema/arcadia-auth-ui`](../lib-arcadia-auth-ui) — login / signup / password reset / 2FA forms, themed via Skyrise tokens. The `/login` route renders `<LoginForm>`.
|
- [`@crema/arcadia-auth-ui`](../lib-arcadia-auth-ui) — login / signup / password reset / 2FA forms, themed via Skyrise tokens. The `/login` route renders `<LoginForm>`.
|
||||||
|
|
||||||
### Skyrise theme
|
### Skyrise theme
|
||||||
@@ -51,7 +51,7 @@ your-workspace/
|
|||||||
arcadia-admin/ ← this repo
|
arcadia-admin/ ← this repo
|
||||||
vibespace/ ← starter that this was cloned from
|
vibespace/ ← starter that this was cloned from
|
||||||
reference/arcadia-app/ ← Phoenix backend (read-only reference)
|
reference/arcadia-app/ ← Phoenix backend (read-only reference)
|
||||||
lib-arcadia-client/
|
lib-arcadia-core-client/
|
||||||
lib-arcadia-auth-ui/
|
lib-arcadia-auth-ui/
|
||||||
lib-action-bus/
|
lib-action-bus/
|
||||||
lib-aifirst-ui/
|
lib-aifirst-ui/
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
@source "../../lib-aifirst-ui/src";
|
@source "../../lib-aifirst-ui/src";
|
||||||
@source "../../lib-llm-ui/src";
|
@source "../../lib-llm-ui/src";
|
||||||
@source "../../lib-action-bus/src";
|
@source "../../lib-action-bus/src";
|
||||||
@source "../../lib-arcadia-client/src";
|
@source "../../lib-arcadia-core-client/src";
|
||||||
@source "../../lib-arcadia-auth-ui/src";
|
@source "../../lib-arcadia-auth-ui/src";
|
||||||
@source "../../lib-table-ui/src";
|
@source "../../lib-table-ui/src";
|
||||||
@source "../../lib-search-ui/src";
|
@source "../../lib-search-ui/src";
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
import { useCallback, useEffect, useMemo, useState } from "react"
|
import { useCallback, useEffect, useMemo, useState } from "react"
|
||||||
import { Pencil, Plus, Sparkles, Star, Trash2, Upload } from "lucide-react"
|
import { Pencil, Plus, Sparkles, Star, Trash2, Upload } from "lucide-react"
|
||||||
import { useArcadiaClient } from "@crema/arcadia-client"
|
import { useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import {
|
import {
|
||||||
loadSettings as loadActiveSettings,
|
loadSettings as loadActiveSettings,
|
||||||
saveSettings as saveActiveSettings,
|
saveSettings as saveActiveSettings,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import {
|
|||||||
X,
|
X,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
|
|
||||||
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-client"
|
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import { AlertBanner, ConfirmDialog } from "@crema/feedback-ui"
|
import { AlertBanner, ConfirmDialog } from "@crema/feedback-ui"
|
||||||
|
|
||||||
import { Badge } from "~/components/ui/badge"
|
import { Badge } from "~/components/ui/badge"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
// Each tool is a named function with documented args. The LLM never sees
|
// Each tool is a named function with documented args. The LLM never sees
|
||||||
// raw HTTP — only the menu below.
|
// raw HTTP — only the menu below.
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import {
|
import {
|
||||||
createToolRuntime,
|
createToolRuntime,
|
||||||
type ToolDef,
|
type ToolDef,
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ Things to keep in mind when assisting:
|
|||||||
- Writes are auditable. Suggest the user double-check tenant slug and impact before suspend/deactivate. Deactivate is harsher than suspend — only use when clearly intended.
|
- Writes are auditable. Suggest the user double-check tenant slug and impact before suspend/deactivate. Deactivate is harsher than suspend — only use when clearly intended.
|
||||||
- The operator can impersonate tenant users for debugging (POST /api/v1/admin/impersonate/:user_id) — surface this when they ask "why can't user X log in".
|
- The operator can impersonate tenant users for debugging (POST /api/v1/admin/impersonate/:user_id) — surface this when they ask "why can't user X log in".
|
||||||
- Quotas / rate cards / billing config errors usually surface as 402/403 from /api/v1 endpoints — diagnose by checking the tenant's billing-config and api-metering quotas.
|
- Quotas / rate cards / billing config errors usually surface as 402/403 from /api/v1 endpoints — diagnose by checking the tenant's billing-config and api-metering quotas.
|
||||||
- The reference Phoenix app lives at \`reference/arcadia-app/\` in the workspace; its OpenAPI spec is at /api/openapi (sync via \`node ../lib-arcadia-client/scripts/sync-spec.mjs\`).
|
- The reference Phoenix app lives at \`reference/arcadia-app/\` in the workspace; its OpenAPI spec is at /api/openapi (sync via \`node ../lib-arcadia-core-client/scripts/sync-spec.mjs\`).
|
||||||
- Search admin (arcadia-search) is a separate service. Manage tenants/corpora at \`/search\`. Use \`list_search_corpora\` if you don't know what's indexed; \`rebuild_search_corpus\` after uploads or when results look stale; \`search_kb\` / \`read_chunk\` to query.
|
- Search admin (arcadia-search) is a separate service. Manage tenants/corpora at \`/search\`. Use \`list_search_corpora\` if you don't know what's indexed; \`rebuild_search_corpus\` after uploads or when results look stale; \`search_kb\` / \`read_chunk\` to query.
|
||||||
|
|
||||||
When the user asks something that maps to a tool, call it. When they ask about a concept, explain it from this primer in plain language. Write tools (suspend_tenant, activate_tenant) prompt the operator with an inline confirm card before they actually run — you do not need to ask in prose first; just call the tool and the user will see the confirmation UI. If the user denies a write, do not retry it; ask what they'd like to do differently.
|
When the user asks something that maps to a tool, call it. When they ask about a concept, explain it from this primer in plain language. Write tools (suspend_tenant, activate_tenant) prompt the operator with an inline confirm card before they actually run — you do not need to ask in prose first; just call the tool and the user will see the confirmation UI. If the user denies a write, do not retry it; ask what they'd like to do differently.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Platform announcements helpers.
|
// Platform announcements helpers.
|
||||||
// Backend: /api/v1/admin/announcements (admin CRUD).
|
// Backend: /api/v1/admin/announcements (admin CRUD).
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export type AnnouncementType =
|
export type AnnouncementType =
|
||||||
| "info"
|
| "info"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
// once — list/show endpoints only return the prefix. Callers must surface
|
// once — list/show endpoints only return the prefix. Callers must surface
|
||||||
// the value to the user immediately on create.
|
// the value to the user immediately on create.
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export interface ApiKey {
|
export interface ApiKey {
|
||||||
id: string
|
id: string
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Audit log + observability helpers.
|
// Audit log + observability helpers.
|
||||||
// All endpoints are read-only; the backend writes audit events itself.
|
// All endpoints are read-only; the backend writes audit events itself.
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export type AuditSeverity = "info" | "warning" | "error" | "critical" | string
|
export type AuditSeverity = "info" | "warning" | "error" | "critical" | string
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// Backend: /api/v1/platform/buckets/*. All operations require a
|
// Backend: /api/v1/platform/buckets/*. All operations require a
|
||||||
// storage_config_id pointing at a credential row in /api/v1/storage_configs.
|
// storage_config_id pointing at a credential row in /api/v1/storage_configs.
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export interface Bucket {
|
export interface Bucket {
|
||||||
name: string
|
name: string
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// used by the avatar uploader. The full digital-objects API is much
|
// used by the avatar uploader. The full digital-objects API is much
|
||||||
// larger; add endpoints here as we wire more features.
|
// larger; add endpoints here as we wire more features.
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export interface DigitalObject {
|
export interface DigitalObject {
|
||||||
id: string
|
id: string
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
// independently; the overall endpoint aggregates and returns 503 if any
|
// independently; the overall endpoint aggregates and returns 503 if any
|
||||||
// subsystem is not "ok". See arcadia-app commit f427892.
|
// subsystem is not "ok". See arcadia-app commit f427892.
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export type HealthSubsystem = "api" | "db" | "workers" | "storage"
|
export type HealthSubsystem = "api" | "db" | "workers" | "storage"
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
// arcadia-console's tenant surface); this file just exposes operator-idiomatic
|
// arcadia-console's tenant surface); this file just exposes operator-idiomatic
|
||||||
// names so the page reads naturally.
|
// names so the page reads naturally.
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import {
|
import {
|
||||||
createIntegrationsApi,
|
createIntegrationsApi,
|
||||||
type CredentialInput,
|
type CredentialInput,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Arcadia invitations API helpers.
|
// Arcadia invitations API helpers.
|
||||||
// Backed by /api/v1/invitations.
|
// Backed by /api/v1/invitations.
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export interface InvitationRole {
|
export interface InvitationRole {
|
||||||
id: string
|
id: string
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
// `tenant_id: null` configurations are platform-defaults visible to
|
// `tenant_id: null` configurations are platform-defaults visible to
|
||||||
// every tenant. Names are unique within (tenant, name).
|
// every tenant. Names are unique within (tenant, name).
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export type LlmProvider = "openai" | "anthropic" | "deepseek" | "qwen" | "lmstudio"
|
export type LlmProvider = "openai" | "anthropic" | "deepseek" | "qwen" | "lmstudio"
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
// the proxy round-trips end-to-end (auth → secret resolution → upstream
|
// the proxy round-trips end-to-end (auth → secret resolution → upstream
|
||||||
// dispatch → response shape).
|
// dispatch → response shape).
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export type LLMProxyProvider =
|
export type LLMProxyProvider =
|
||||||
| "openai"
|
| "openai"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Tenant memberships — the M:N glue between users and tenants.
|
// Tenant memberships — the M:N glue between users and tenants.
|
||||||
// Backend: /api/v1/admin/memberships (admin) + /api/v1/me/tenants (self).
|
// Backend: /api/v1/admin/memberships (admin) + /api/v1/me/tenants (self).
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export type MembershipStatus = "active" | "suspended" | "deactivated" | string
|
export type MembershipStatus = "active" | "suspended" | "deactivated" | string
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// Wraps /api/v1/admin/monitoring/* + /api/v1/platform/* + a few observability
|
// Wraps /api/v1/admin/monitoring/* + /api/v1/platform/* + a few observability
|
||||||
// endpoints used by the monitoring dashboard.
|
// endpoints used by the monitoring dashboard.
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
// --- Rate limits ---------------------------------------------------------
|
// --- Rate limits ---------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Networking helpers: firewalls, VPCs, domains + DNS records, floating IPs.
|
// Networking helpers: firewalls, VPCs, domains + DNS records, floating IPs.
|
||||||
// Backend: /api/v1/platform/{firewalls,vpcs,domains,floating_ips,...}.
|
// Backend: /api/v1/platform/{firewalls,vpcs,domains,floating_ips,...}.
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
const BASE = "/api/v1/platform"
|
const BASE = "/api/v1/platform"
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
// `OrganizationContext` plug, so the same per-org routes used by end-users
|
// `OrganizationContext` plug, so the same per-org routes used by end-users
|
||||||
// are used here to mutate any org in the tenant.
|
// are used here to mutate any org in the tenant.
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export type OrgStatus = "active" | "frozen" | "pending_deletion" | string
|
export type OrgStatus = "active" | "frozen" | "pending_deletion" | string
|
||||||
export type OnOwnerRemoval =
|
export type OnOwnerRemoval =
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// profile fields. The "profile" here is the per-tenant profile row, not
|
// profile fields. The "profile" here is the per-tenant profile row, not
|
||||||
// the auth account.
|
// the auth account.
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export interface Profile {
|
export interface Profile {
|
||||||
id: string
|
id: string
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Arcadia roles API helpers.
|
// Arcadia roles API helpers.
|
||||||
// Backed by /api/v1/roles (resources route, except :new and :edit).
|
// Backed by /api/v1/roles (resources route, except :new and :edit).
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export interface Role {
|
export interface Role {
|
||||||
id: string
|
id: string
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Scheduled tasks (cron) helpers.
|
// Scheduled tasks (cron) helpers.
|
||||||
// Backend: /api/v1/admin/scheduled-tasks (CRUD + runs/enable/disable/trigger).
|
// Backend: /api/v1/admin/scheduled-tasks (CRUD + runs/enable/disable/trigger).
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export type ScheduledTaskAction = "webhook" | "event"
|
export type ScheduledTaskAction = "webhook" | "event"
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
// exposed by these endpoints. Tenant-side resolution (returning the value)
|
// exposed by these endpoints. Tenant-side resolution (returning the value)
|
||||||
// goes through a separate runtime endpoint that's not used by the admin UI.
|
// goes through a separate runtime endpoint that's not used by the admin UI.
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export type SecretCategory =
|
export type SecretCategory =
|
||||||
| "api_key"
|
| "api_key"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// Backend: /api/v1/sso/identity-providers (tenant CRUD) + /sessions.
|
// Backend: /api/v1/sso/identity-providers (tenant CRUD) + /sessions.
|
||||||
// Note: certificates are large and write-only.
|
// Note: certificates are large and write-only.
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export interface IdentityProvider {
|
export interface IdentityProvider {
|
||||||
id: string
|
id: string
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Status page helpers — components, incidents, subscribers.
|
// Status page helpers — components, incidents, subscribers.
|
||||||
// Backend: /api/v1/admin/status-page/* (admin CRUD).
|
// Backend: /api/v1/admin/status-page/* (admin CRUD).
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export type ComponentStatus =
|
export type ComponentStatus =
|
||||||
| "operational"
|
| "operational"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
// generic `arcadia.GET<T>` / `arcadia.POST<T>` / etc. — same pattern as
|
// generic `arcadia.GET<T>` / `arcadia.POST<T>` / etc. — same pattern as
|
||||||
// `tenants.ts`. Switch to `arcadia.typed.*` when the spec gains coverage.
|
// `tenants.ts`. Switch to `arcadia.typed.*` when the spec gains coverage.
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export type StorageBackend = "s3" | "local" | "gcs"
|
export type StorageBackend = "s3" | "local" | "gcs"
|
||||||
export type StorageStatus = "active" | "inactive" | "degraded" | "maintenance"
|
export type StorageStatus = "active" | "inactive" | "degraded" | "maintenance"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
// gains coverage, switch to `arcadia.typed.GET("/api/v1/admin/tenants", ...)`
|
// gains coverage, switch to `arcadia.typed.GET("/api/v1/admin/tenants", ...)`
|
||||||
// and drop these manual types.
|
// and drop these manual types.
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export type TenantStatus = "active" | "suspended" | "deactivated" | string
|
export type TenantStatus = "active" | "suspended" | "deactivated" | string
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Per-user usage + quota helpers.
|
// Per-user usage + quota helpers.
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export interface UserUsage {
|
export interface UserUsage {
|
||||||
storage_used_bytes: number
|
storage_used_bytes: number
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
// describe these operations as typed paths, so we hand-roll types and use
|
// describe these operations as typed paths, so we hand-roll types and use
|
||||||
// the generic verb methods on the client. Same pattern as tenants.ts.
|
// the generic verb methods on the client. Same pattern as tenants.ts.
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export type UserStatus = "active" | "inactive" | "suspended"
|
export type UserStatus = "active" | "inactive" | "suspended"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Outbound webhook helpers.
|
// Outbound webhook helpers.
|
||||||
// Backend: /api/v1/webhooks (CRUD + pause/resume/regenerate-secret/deliveries/stats/test).
|
// Backend: /api/v1/webhooks (CRUD + pause/resume/regenerate-secret/deliveries/stats/test).
|
||||||
|
|
||||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
export type WebhookStatus = "active" | "paused" | "disabled"
|
export type WebhookStatus = "active" | "paused" | "disabled"
|
||||||
export type WebhookRetryStrategy = "linear" | "exponential"
|
export type WebhookRetryStrategy = "linear" | "exponential"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
// same 401 cleanup. The gateway's CORS already allows localhost + any
|
// same 401 cleanup. The gateway's CORS already allows localhost + any
|
||||||
// *.sky-ai.com origin, so the browser calls it directly.
|
// *.sky-ai.com origin, so the browser calls it directly.
|
||||||
|
|
||||||
import { createArcadiaClient, type ArcadiaClient } from "@crema/arcadia-client"
|
import { createArcadiaClient, type ArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
const GATEWAY_URL = import.meta.env.VITE_LLM_GATEWAY_URL ?? "http://localhost:4015"
|
const GATEWAY_URL = import.meta.env.VITE_LLM_GATEWAY_URL ?? "http://localhost:4015"
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
// panel remains the place to switch between configs.
|
// panel remains the place to switch between configs.
|
||||||
|
|
||||||
import { useEffect } from "react"
|
import { useEffect } from "react"
|
||||||
import { useArcadiaClient } from "@crema/arcadia-client"
|
import { useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import {
|
import {
|
||||||
loadSettings,
|
loadSettings,
|
||||||
saveSettings,
|
saveSettings,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// immediately, without waiting for the user to navigate to /profile.
|
// immediately, without waiting for the user to navigate to /profile.
|
||||||
|
|
||||||
import { useEffect } from "react"
|
import { useEffect } from "react"
|
||||||
import { useArcadiaClient } from "@crema/arcadia-client"
|
import { useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
import { fetchDigitalObjectAsBlobUrl } from "~/lib/arcadia/digital-objects"
|
import { fetchDigitalObjectAsBlobUrl } from "~/lib/arcadia/digital-objects"
|
||||||
import { getProfile, pickAvatarUrl } from "~/lib/arcadia/profiles"
|
import { getProfile, pickAvatarUrl } from "~/lib/arcadia/profiles"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import "./app.css"
|
|||||||
|
|
||||||
import { ToastProvider, Toaster } from "@crema/notification-ui"
|
import { ToastProvider, Toaster } from "@crema/notification-ui"
|
||||||
import { CommandBusProvider } from "@crema/action-bus"
|
import { CommandBusProvider } from "@crema/action-bus"
|
||||||
import { ArcadiaProvider } from "@crema/arcadia-client"
|
import { ArcadiaProvider } from "@crema/arcadia-core-client"
|
||||||
import { LlmConfigBootstrap } from "~/lib/llm-config-bootstrap"
|
import { LlmConfigBootstrap } from "~/lib/llm-config-bootstrap"
|
||||||
import { ProfileBootstrap } from "~/lib/profile-bootstrap"
|
import { ProfileBootstrap } from "~/lib/profile-bootstrap"
|
||||||
// CREMA:PROVIDERS-IMPORTS
|
// CREMA:PROVIDERS-IMPORTS
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useCallback, useEffect, useMemo, useState } from "react"
|
import { useCallback, useEffect, useMemo, useState } from "react"
|
||||||
import { Activity, Eye, RefreshCw } from "lucide-react"
|
import { Activity, Eye, RefreshCw } from "lucide-react"
|
||||||
|
|
||||||
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-client"
|
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import {
|
import {
|
||||||
ActionsCell,
|
ActionsCell,
|
||||||
BadgeCell,
|
BadgeCell,
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ import {
|
|||||||
import { addLibraryItem } from "~/lib/library"
|
import { addLibraryItem } from "~/lib/library"
|
||||||
import { Avatar, AvatarFallback } from "~/components/ui/avatar"
|
import { Avatar, AvatarFallback } from "~/components/ui/avatar"
|
||||||
import { pageTitle } from "~/lib/page-meta"
|
import { pageTitle } from "~/lib/page-meta"
|
||||||
import { useArcadiaClient } from "@crema/arcadia-client"
|
import { useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import type { Message as LLMMessage, ToolCall } from "@crema/llm-ui"
|
import type { Message as LLMMessage, ToolCall } from "@crema/llm-ui"
|
||||||
// Shape of a single hit returned by the `search_docs` tool. Defined here
|
// Shape of a single hit returned by the `search_docs` tool. Defined here
|
||||||
// rather than imported from the lib because the tool wrapper in
|
// rather than imported from the lib because the tool wrapper in
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
Trash2,
|
Trash2,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
|
|
||||||
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-client"
|
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import {
|
import {
|
||||||
ActionsCell,
|
ActionsCell,
|
||||||
BadgeCell,
|
BadgeCell,
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ import {
|
|||||||
runLLMToolCalls,
|
runLLMToolCalls,
|
||||||
} from "~/lib/admin-tools"
|
} from "~/lib/admin-tools"
|
||||||
import { ARCADIA_KNOWLEDGE } from "~/lib/arcadia-knowledge"
|
import { ARCADIA_KNOWLEDGE } from "~/lib/arcadia-knowledge"
|
||||||
import { useArcadiaClient } from "@crema/arcadia-client"
|
import { useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import { ConfirmCard } from "~/components/assistant/confirm-card"
|
import { ConfirmCard } from "~/components/assistant/confirm-card"
|
||||||
import type { ToolCall } from "@crema/llm-ui"
|
import type { ToolCall } from "@crema/llm-ui"
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import {
|
|||||||
Trash2,
|
Trash2,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
|
|
||||||
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-client"
|
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import {
|
import {
|
||||||
ActionsCell,
|
ActionsCell,
|
||||||
DataTable,
|
DataTable,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
Users as UsersIcon,
|
Users as UsersIcon,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
|
|
||||||
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-client"
|
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import { AlertBanner } from "@crema/feedback-ui"
|
import { AlertBanner } from "@crema/feedback-ui"
|
||||||
|
|
||||||
import { AppShell } from "~/components/layout/app-shell"
|
import { AppShell } from "~/components/layout/app-shell"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
Plus,
|
Plus,
|
||||||
Trash2,
|
Trash2,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
import { ArcadiaError } from "@crema/arcadia-client"
|
import { ArcadiaError } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
import { AppShell } from "~/components/layout/app-shell"
|
import { AppShell } from "~/components/layout/app-shell"
|
||||||
import { Badge } from "~/components/ui/badge"
|
import { Badge } from "~/components/ui/badge"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
Trash2,
|
Trash2,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
|
|
||||||
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-client"
|
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import {
|
import {
|
||||||
ActionsCell,
|
ActionsCell,
|
||||||
BadgeCell,
|
BadgeCell,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
Zap,
|
Zap,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
|
|
||||||
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-client"
|
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import { AlertBanner } from "@crema/feedback-ui"
|
import { AlertBanner } from "@crema/feedback-ui"
|
||||||
import {
|
import {
|
||||||
BarChart,
|
BarChart,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
Wifi,
|
Wifi,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
|
|
||||||
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-client"
|
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import { AlertBanner, ConfirmDialog, EmptyState, LoadingOverlay } from "@crema/feedback-ui"
|
import { AlertBanner, ConfirmDialog, EmptyState, LoadingOverlay } from "@crema/feedback-ui"
|
||||||
|
|
||||||
import { AppShell } from "~/components/layout/app-shell"
|
import { AppShell } from "~/components/layout/app-shell"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
Users as UsersIcon,
|
Users as UsersIcon,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
|
|
||||||
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-client"
|
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import {
|
import {
|
||||||
ActionsCell,
|
ActionsCell,
|
||||||
BadgeCell,
|
BadgeCell,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useCallback, useEffect, useState } from "react"
|
import { useCallback, useEffect, useState } from "react"
|
||||||
import { Check, RefreshCw, Trash2 } from "lucide-react"
|
import { Check, RefreshCw, Trash2 } from "lucide-react"
|
||||||
|
|
||||||
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-client"
|
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import { AlertBanner } from "@crema/feedback-ui"
|
import { AlertBanner } from "@crema/feedback-ui"
|
||||||
|
|
||||||
import { AppShell } from "~/components/layout/app-shell"
|
import { AppShell } from "~/components/layout/app-shell"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
Zap,
|
Zap,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
|
|
||||||
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-client"
|
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import {
|
import {
|
||||||
ActionsCell,
|
ActionsCell,
|
||||||
BadgeCell,
|
BadgeCell,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
Trash2,
|
Trash2,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
|
|
||||||
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-client"
|
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import {
|
import {
|
||||||
ActionsCell,
|
ActionsCell,
|
||||||
BadgeCell,
|
BadgeCell,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import {
|
|||||||
useSettings as useProviderSettings,
|
useSettings as useProviderSettings,
|
||||||
type LLMProvidersSettings,
|
type LLMProvidersSettings,
|
||||||
} from "@crema/llm-providers-ui"
|
} from "@crema/llm-providers-ui"
|
||||||
import { useArcadiaClient } from "@crema/arcadia-client"
|
import { useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
|
|
||||||
import { probeProxy, type LLMProxyProvider } from "~/lib/arcadia/llm-proxy"
|
import { probeProxy, type LLMProxyProvider } from "~/lib/arcadia/llm-proxy"
|
||||||
import { LlmConfigurationsPanel } from "~/components/settings/llm-configurations-panel"
|
import { LlmConfigurationsPanel } from "~/components/settings/llm-configurations-panel"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
X,
|
X,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
|
|
||||||
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-client"
|
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import {
|
import {
|
||||||
ActionsCell,
|
ActionsCell,
|
||||||
BadgeCell,
|
BadgeCell,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
Trash2,
|
Trash2,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
|
|
||||||
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-client"
|
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import { AlertBanner, ConfirmDialog, EmptyState, LoadingOverlay } from "@crema/feedback-ui"
|
import { AlertBanner, ConfirmDialog, EmptyState, LoadingOverlay } from "@crema/feedback-ui"
|
||||||
import {
|
import {
|
||||||
IncidentTimeline,
|
IncidentTimeline,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
Wrench,
|
Wrench,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
|
|
||||||
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-client"
|
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import {
|
import {
|
||||||
ActionsCell,
|
ActionsCell,
|
||||||
BadgeCell,
|
BadgeCell,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useCallback, useEffect, useMemo, useState, type FormEvent } from "react"
|
import { useCallback, useEffect, useMemo, useState, type FormEvent } from "react"
|
||||||
import { Pause, Play, Plus, RefreshCw } from "lucide-react"
|
import { Pause, Play, Plus, RefreshCw } from "lucide-react"
|
||||||
|
|
||||||
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-client"
|
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import {
|
import {
|
||||||
ActionsCell,
|
ActionsCell,
|
||||||
BadgeCell,
|
BadgeCell,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
X,
|
X,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
|
|
||||||
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-client"
|
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import {
|
import {
|
||||||
ActionsCell,
|
ActionsCell,
|
||||||
BadgeCell,
|
BadgeCell,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import {
|
|||||||
Webhook as WebhookIcon,
|
Webhook as WebhookIcon,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
|
|
||||||
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-client"
|
import { ArcadiaError, useArcadiaClient } from "@crema/arcadia-core-client"
|
||||||
import {
|
import {
|
||||||
ActionsCell,
|
ActionsCell,
|
||||||
BadgeCell,
|
BadgeCell,
|
||||||
|
|||||||
@@ -26,8 +26,8 @@
|
|||||||
"@crema/llm-ui/*": ["../lib-llm-ui/src/*"],
|
"@crema/llm-ui/*": ["../lib-llm-ui/src/*"],
|
||||||
"@crema/action-bus": ["../lib-action-bus/src/index.tsx"],
|
"@crema/action-bus": ["../lib-action-bus/src/index.tsx"],
|
||||||
"@crema/action-bus/*": ["../lib-action-bus/src/*"],
|
"@crema/action-bus/*": ["../lib-action-bus/src/*"],
|
||||||
"@crema/arcadia-client": ["../lib-arcadia-client/src/index.tsx"],
|
"@crema/arcadia-core-client": ["../lib-arcadia-core-client/src/index.tsx"],
|
||||||
"@crema/arcadia-client/*": ["../lib-arcadia-client/src/*"],
|
"@crema/arcadia-core-client/*": ["../lib-arcadia-core-client/src/*"],
|
||||||
"@crema/integration-registry-client": ["../lib-integration-registry-client/src/index.tsx"],
|
"@crema/integration-registry-client": ["../lib-integration-registry-client/src/index.tsx"],
|
||||||
"@crema/integration-registry-client/*": ["../lib-integration-registry-client/src/*"],
|
"@crema/integration-registry-client/*": ["../lib-integration-registry-client/src/*"],
|
||||||
"@crema/arcadia-auth-ui": ["../lib-arcadia-auth-ui/src/index.tsx"],
|
"@crema/arcadia-auth-ui": ["../lib-arcadia-auth-ui/src/index.tsx"],
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ const searchUiSrc = fileURLToPath(
|
|||||||
new URL("../lib-search-ui/src", import.meta.url),
|
new URL("../lib-search-ui/src", import.meta.url),
|
||||||
)
|
)
|
||||||
const arcadiaClientSrc = fileURLToPath(
|
const arcadiaClientSrc = fileURLToPath(
|
||||||
new URL("../lib-arcadia-client/src", import.meta.url),
|
new URL("../lib-arcadia-core-client/src", import.meta.url),
|
||||||
)
|
)
|
||||||
const integrationRegistryClientSrc = fileURLToPath(
|
const integrationRegistryClientSrc = fileURLToPath(
|
||||||
new URL("../lib-integration-registry-client/src", import.meta.url),
|
new URL("../lib-integration-registry-client/src", import.meta.url),
|
||||||
@@ -175,7 +175,7 @@ export default defineConfig({
|
|||||||
{ find: "@crema/auth-ui", replacement: `${authUiSrc}/index.tsx` },
|
{ find: "@crema/auth-ui", replacement: `${authUiSrc}/index.tsx` },
|
||||||
{ find: "@crema/table-ui", replacement: `${tableUiSrc}/index.tsx` },
|
{ find: "@crema/table-ui", replacement: `${tableUiSrc}/index.tsx` },
|
||||||
{ find: "@crema/search-ui", replacement: `${searchUiSrc}/index.tsx` },
|
{ find: "@crema/search-ui", replacement: `${searchUiSrc}/index.tsx` },
|
||||||
{ find: "@crema/arcadia-client", replacement: `${arcadiaClientSrc}/index.tsx` },
|
{ find: "@crema/arcadia-core-client", replacement: `${arcadiaClientSrc}/index.tsx` },
|
||||||
{
|
{
|
||||||
find: "@crema/integration-registry-client",
|
find: "@crema/integration-registry-client",
|
||||||
replacement: `${integrationRegistryClientSrc}/index.tsx`,
|
replacement: `${integrationRegistryClientSrc}/index.tsx`,
|
||||||
|
|||||||
Reference in New Issue
Block a user