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:
@@ -5,7 +5,7 @@
|
||||
// Each tool is a named function with documented args. The LLM never sees
|
||||
// raw HTTP — only the menu below.
|
||||
|
||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
||||
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||
import {
|
||||
createToolRuntime,
|
||||
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.
|
||||
- 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.
|
||||
- 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.
|
||||
|
||||
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.
|
||||
// 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 =
|
||||
| "info"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// once — list/show endpoints only return the prefix. Callers must surface
|
||||
// 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 {
|
||||
id: string
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Audit log + observability helpers.
|
||||
// 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
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Backend: /api/v1/platform/buckets/*. All operations require a
|
||||
// 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 {
|
||||
name: string
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// used by the avatar uploader. The full digital-objects API is much
|
||||
// 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 {
|
||||
id: string
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// independently; the overall endpoint aggregates and returns 503 if any
|
||||
// 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"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// arcadia-console's tenant surface); this file just exposes operator-idiomatic
|
||||
// names so the page reads naturally.
|
||||
|
||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
||||
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||
import {
|
||||
createIntegrationsApi,
|
||||
type CredentialInput,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Arcadia invitations API helpers.
|
||||
// Backed by /api/v1/invitations.
|
||||
|
||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
||||
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||
|
||||
export interface InvitationRole {
|
||||
id: string
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// `tenant_id: null` configurations are platform-defaults visible to
|
||||
// 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"
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// the proxy round-trips end-to-end (auth → secret resolution → upstream
|
||||
// dispatch → response shape).
|
||||
|
||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
||||
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||
|
||||
export type LLMProxyProvider =
|
||||
| "openai"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Tenant memberships — the M:N glue between users and tenants.
|
||||
// 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
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Wraps /api/v1/admin/monitoring/* + /api/v1/platform/* + a few observability
|
||||
// endpoints used by the monitoring dashboard.
|
||||
|
||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
||||
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||
|
||||
// --- Rate limits ---------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Networking helpers: firewalls, VPCs, domains + DNS records, 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"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// `OrganizationContext` plug, so the same per-org routes used by end-users
|
||||
// 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 OnOwnerRemoval =
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// profile fields. The "profile" here is the per-tenant profile row, not
|
||||
// the auth account.
|
||||
|
||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
||||
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||
|
||||
export interface Profile {
|
||||
id: string
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Arcadia roles API helpers.
|
||||
// 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 {
|
||||
id: string
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Scheduled tasks (cron) helpers.
|
||||
// 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"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// exposed by these endpoints. Tenant-side resolution (returning the value)
|
||||
// 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 =
|
||||
| "api_key"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Backend: /api/v1/sso/identity-providers (tenant CRUD) + /sessions.
|
||||
// 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 {
|
||||
id: string
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Status page helpers — components, incidents, subscribers.
|
||||
// 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 =
|
||||
| "operational"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// generic `arcadia.GET<T>` / `arcadia.POST<T>` / etc. — same pattern as
|
||||
// `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 StorageStatus = "active" | "inactive" | "degraded" | "maintenance"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// gains coverage, switch to `arcadia.typed.GET("/api/v1/admin/tenants", ...)`
|
||||
// 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
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Per-user usage + quota helpers.
|
||||
|
||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
||||
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||
|
||||
export interface UserUsage {
|
||||
storage_used_bytes: number
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// 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.
|
||||
|
||||
import type { ArcadiaClient } from "@crema/arcadia-client"
|
||||
import type { ArcadiaClient } from "@crema/arcadia-core-client"
|
||||
|
||||
export type UserStatus = "active" | "inactive" | "suspended"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Outbound webhook helpers.
|
||||
// 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 WebhookRetryStrategy = "linear" | "exponential"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// same 401 cleanup. The gateway's CORS already allows localhost + any
|
||||
// *.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"
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
// panel remains the place to switch between configs.
|
||||
|
||||
import { useEffect } from "react"
|
||||
import { useArcadiaClient } from "@crema/arcadia-client"
|
||||
import { useArcadiaClient } from "@crema/arcadia-core-client"
|
||||
import {
|
||||
loadSettings,
|
||||
saveSettings,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// immediately, without waiting for the user to navigate to /profile.
|
||||
|
||||
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 { getProfile, pickAvatarUrl } from "~/lib/arcadia/profiles"
|
||||
|
||||
Reference in New Issue
Block a user