Skip to content

Kit frontend ​

UseImport fromAPI
Configure transport and authentication@kambium/kit/frontenduseRequestStore, RequestConfiguration, useSessionStore, SessionAuth
Read and update engine or workspace state@kambium/kit/frontenduseSyncStore, useWorkspaceStore, useAccountStore
Configure provider setup@kambium/kit/frontenduseAirtableStore, useSlackStore, useConnectionStore
Bind notifications and layout@kambium/kit/frontendnotificationsKey, useNotifications, FrontendNotifications, useLayoutStore
Define a typed engine page@kambium/kit/frontenddefineEngineComponent, EngineComponentProps, EnginePageRecord, engineComponentPropNames
Register engine routes@kambium/kit/dashboardcreateEngineRoutes, EngineFrontendRegistration

Use the same installed Pinia throughout the dashboard. The dashboard integration guide shows the host wiring and default setup flow.

The focused frontend/request, frontend/session, frontend/sync, frontend/workspace, and frontend/layout subpaths export the same store definitions.

Vue components ​

Import fromComponentUse
@kambium/kit/dashboardDashboardMount the shell with the host's configured stores and Auth client. See DashboardProps.
@kambium/kit/dashboardSidebar, EnginePickerNavigate and offer available engine kinds. Register routes for the kinds in SidebarEngineDefinition.
@kambium/kit/dashboardSettings, WorkspaceInvitationAdd account settings and an invitation route to the app router. See SettingsProps.
@kambium/kit/frontend/uiEnginePage, SlackChannelSelectUse the default engine shell and provider setup controls. The host persists updates through callbacks.
@kambium/kit/frontend/uiTaskLogListRender task activity. Use the operation slot for engine labels and TaskLlmCallSource to supply LLM call details.
@kambium/kit/shared-components/componentsgeneral/StatusBadge.vue, icons/FeatherIcon.vue, icons/Activity.vueShared display and icon components used by generated engine pages.
@kambium/kit/styles, @kambium/kit/tokensGlobal styles and Sass tokensImport styles once in the host. Forward tokens from the Sass variables entry supplied by the host.

Generated for Kit 0.8.0 and Core 0.10.1.

Functions ​

createEngineRoutes() ​

ts
function createEngineRoutes(registrations: Record<string, EngineFrontendRegistration>, options?: EngineRoutesOptions): RouteRecordRaw[];

Build Vue Router records from an engine catalog keyed by runtime kind.

Remarks ​

Use nested mode below an existing /engine/:engine_id parent. A host wrapper component receives engineId and kind as route props. Register the returned routes before exposing the same kinds in the engine picker.


defineEngineComponent() ​

ts
function defineEngineComponent<Runtime extends EngineRuntimeConfig, Page extends EnginePage>(definition: {
  component: Page & (EngineComponentProps extends InstanceType<Page>["$props"] ? unknown : never);
  runtime: Runtime;
}): {
  component: Page & (EngineComponentProps extends InstanceType<Page>["$props"] ? unknown : never);
  runtime: Runtime;
};

Match a Vue page to its browser-safe runtime declaration. The page must accept the standard EngineComponentProps without extra required props. Register the page in the dashboard router separately.


useNotifications() ​

ts
function useNotifications(): FrontendNotifications;

Read the host's notification callbacks during Vue setup. Throws if the provider is missing.

Variables ​

engineComponentPropNames ​

ts
const engineComponentPropNames: (
  | "sync"
  | "isDevelopmentTarget"
  | "onUpdate"
  | "subscriptionUsage"
  | "engineStatusStepItem"
  | "connectionPrefetch"
  | "mockConnections"
  | "activityPolling"
  | "canUseAiActions")[];

Runtime prop names for hosts that bind an engine component with a setup function.


notificationsKey ​

ts
const notificationsKey: InjectionKey<FrontendNotifications>;

Provide the host's notification callbacks under this key before mounting dashboard UI.


useAccountStore ​

Inferred Pinia type
ts
const useAccountStore: StoreDefinition<"engine-connections", Pick<{
  forEngine: (engineId: string) => EngineConnection[];
  loadForEngine: (engineId: string, options?: FrontendStoreRequestOptions & object) => Promise<EngineConnection[]>;
  remove: (engineId: string, connectionId: string) => void;
  setIdentity: (id: string | null) => void;
}, never>, Pick<{
  forEngine: (engineId: string) => EngineConnection[];
  loadForEngine: (engineId: string, options?: FrontendStoreRequestOptions & object) => Promise<EngineConnection[]>;
  remove: (engineId: string, connectionId: string) => void;
  setIdentity: (id: string | null) => void;
}, never>, Pick<{
  forEngine: (engineId: string) => EngineConnection[];
  loadForEngine: (engineId: string, options?: FrontendStoreRequestOptions & object) => Promise<EngineConnection[]>;
  remove: (engineId: string, connectionId: string) => void;
  setIdentity: (id: string | null) => void;
}, "remove" | "forEngine" | "loadForEngine" | "setIdentity">>;

Read the provider connections configured for an engine. The store shares in-flight reads for the same engine and clears state when the user changes. Startup prefetch is single-use. Reload after a connection change to start a fresh read even if a previous request is still pending.


useAirtableStore ​

Inferred Pinia type
ts
const useAirtableStore: StoreDefinition<"airtable", Pick<{
  baseIdsByAccount: Ref<Record<string, string[]>, Record<string, string[]>>;
  basesById: Ref<Record<string, any>, Record<string, any>>;
  createFieldTask: Task<any, [data: object]>;
  createTableTask: Task<any, [data: object]>;
  fetchWebhooks: (accountId: string, baseId: string) => Promise<any[]>;
  fieldsByTable: Ref<Record<string, Field[]>, Record<string, Field[]>>;
  getBases: (accountId: string) => any[];
  getFields: (tableId: string) => Field[];
  getFieldsById: (baseId: string, tableIds?: readonly string[]) => Map<string, Field>;
  getMetadata: (baseId: string, tableIds?: readonly string[]) => AirtableMetadata;
  getTableNamesById: (baseId: string, tableIds?: readonly string[]) => Map<string, string>;
  getTables: (baseId: string) => AirtableTableRecord[];
  loadBasesTask: Task<any[], [accountId: string, options: {
     refresh: boolean;
  }]>;
  loadFields: (accountId: string, baseId: string, tableId: string, force: boolean, syncId?: string) => Promise<Field[]>;
  loadFieldsTask: Task<any, [accountId: string, baseId: string, tableId: string, force: any, syncId?: string]>;
  loadMetadata: (options: AirtableMetadataLoadOptions) => Promise<AirtableMetadata>;
  loadTablesTask: Task<AirtableTableRecord[], [_accountId: string, baseId: string, force: any, syncId?: string]>;
  pruneMappings: (mappings: Record<string, any>, tableId: string) => Record<string, any>;
  pruneValidationCondition: (rule: ValidationCondition, tableId: string) => ValidationCondition;
  refreshAll: (accountId: string, baseId?: string, syncId?: string) => Promise<void>;
  tableIdsByBase: Ref<Record<string, string[]>, Record<string, string[]>>;
  tablesById: Ref<Record<string, AirtableTableRecord>, Record<string, AirtableTableRecord>>;
}, 
  | "basesById"
  | "baseIdsByAccount"
  | "tablesById"
  | "tableIdsByBase"
  | "fieldsByTable"
  | "loadBasesTask"
  | "createFieldTask"
  | "loadTablesTask"
  | "loadFieldsTask"
  | "createTableTask">, Pick<{
  baseIdsByAccount: Ref<Record<string, string[]>, Record<string, string[]>>;
  basesById: Ref<Record<string, any>, Record<string, any>>;
  createFieldTask: Task<any, [data: object]>;
  createTableTask: Task<any, [data: object]>;
  fetchWebhooks: (accountId: string, baseId: string) => Promise<any[]>;
  fieldsByTable: Ref<Record<string, Field[]>, Record<string, Field[]>>;
  getBases: (accountId: string) => any[];
  getFields: (tableId: string) => Field[];
  getFieldsById: (baseId: string, tableIds?: readonly string[]) => Map<string, Field>;
  getMetadata: (baseId: string, tableIds?: readonly string[]) => AirtableMetadata;
  getTableNamesById: (baseId: string, tableIds?: readonly string[]) => Map<string, string>;
  getTables: (baseId: string) => AirtableTableRecord[];
  loadBasesTask: Task<any[], [accountId: string, options: {
     refresh: boolean;
  }]>;
  loadFields: (accountId: string, baseId: string, tableId: string, force: boolean, syncId?: string) => Promise<Field[]>;
  loadFieldsTask: Task<any, [accountId: string, baseId: string, tableId: string, force: any, syncId?: string]>;
  loadMetadata: (options: AirtableMetadataLoadOptions) => Promise<AirtableMetadata>;
  loadTablesTask: Task<AirtableTableRecord[], [_accountId: string, baseId: string, force: any, syncId?: string]>;
  pruneMappings: (mappings: Record<string, any>, tableId: string) => Record<string, any>;
  pruneValidationCondition: (rule: ValidationCondition, tableId: string) => ValidationCondition;
  refreshAll: (accountId: string, baseId?: string, syncId?: string) => Promise<void>;
  tableIdsByBase: Ref<Record<string, string[]>, Record<string, string[]>>;
  tablesById: Ref<Record<string, AirtableTableRecord>, Record<string, AirtableTableRecord>>;
}, never>, Pick<{
  baseIdsByAccount: Ref<Record<string, string[]>, Record<string, string[]>>;
  basesById: Ref<Record<string, any>, Record<string, any>>;
  createFieldTask: Task<any, [data: object]>;
  createTableTask: Task<any, [data: object]>;
  fetchWebhooks: (accountId: string, baseId: string) => Promise<any[]>;
  fieldsByTable: Ref<Record<string, Field[]>, Record<string, Field[]>>;
  getBases: (accountId: string) => any[];
  getFields: (tableId: string) => Field[];
  getFieldsById: (baseId: string, tableIds?: readonly string[]) => Map<string, Field>;
  getMetadata: (baseId: string, tableIds?: readonly string[]) => AirtableMetadata;
  getTableNamesById: (baseId: string, tableIds?: readonly string[]) => Map<string, string>;
  getTables: (baseId: string) => AirtableTableRecord[];
  loadBasesTask: Task<any[], [accountId: string, options: {
     refresh: boolean;
  }]>;
  loadFields: (accountId: string, baseId: string, tableId: string, force: boolean, syncId?: string) => Promise<Field[]>;
  loadFieldsTask: Task<any, [accountId: string, baseId: string, tableId: string, force: any, syncId?: string]>;
  loadMetadata: (options: AirtableMetadataLoadOptions) => Promise<AirtableMetadata>;
  loadTablesTask: Task<AirtableTableRecord[], [_accountId: string, baseId: string, force: any, syncId?: string]>;
  pruneMappings: (mappings: Record<string, any>, tableId: string) => Record<string, any>;
  pruneValidationCondition: (rule: ValidationCondition, tableId: string) => ValidationCondition;
  refreshAll: (accountId: string, baseId?: string, syncId?: string) => Promise<void>;
  tableIdsByBase: Ref<Record<string, string[]>, Record<string, string[]>>;
  tablesById: Ref<Record<string, AirtableTableRecord>, Record<string, AirtableTableRecord>>;
}, 
  | "fetchWebhooks"
  | "getBases"
  | "getTables"
  | "getFields"
  | "getTableNamesById"
  | "getFieldsById"
  | "getMetadata"
  | "loadFields"
  | "loadMetadata"
  | "pruneMappings"
  | "pruneValidationCondition"
| "refreshAll">>;

Load Airtable base, table and field metadata using the current dashboard access. The cache resets when identity or read access changes.


useConnectionStore ​

Inferred Pinia type
ts
const useConnectionStore: StoreDefinition<"connection-flows", Pick<{
  completeAirtableConnection: (input: Pick<ConnectionInput, "message" | "onSuccess"> & {
     appName?: string;
  }) => Promise<void>;
  completeSlackConnection: (input: Pick<ConnectionInput, "message" | "onSuccess"> & {
     appName?: string;
  }) => Promise<void>;
  connectAirtableTask: Task<void, [input: ConnectionInput]>;
  connectNangoTask: Task<void, [input: ConnectionInput]>;
  connectSlackTask: Task<void, [input: ConnectionInput]>;
  isConnecting: (syncId: string | undefined, appName: string) => boolean;
}, "connectSlackTask" | "connectAirtableTask" | "connectNangoTask">, Pick<{
  completeAirtableConnection: (input: Pick<ConnectionInput, "message" | "onSuccess"> & {
     appName?: string;
  }) => Promise<void>;
  completeSlackConnection: (input: Pick<ConnectionInput, "message" | "onSuccess"> & {
     appName?: string;
  }) => Promise<void>;
  connectAirtableTask: Task<void, [input: ConnectionInput]>;
  connectNangoTask: Task<void, [input: ConnectionInput]>;
  connectSlackTask: Task<void, [input: ConnectionInput]>;
  isConnecting: (syncId: string | undefined, appName: string) => boolean;
}, never>, Pick<{
  completeAirtableConnection: (input: Pick<ConnectionInput, "message" | "onSuccess"> & {
     appName?: string;
  }) => Promise<void>;
  completeSlackConnection: (input: Pick<ConnectionInput, "message" | "onSuccess"> & {
     appName?: string;
  }) => Promise<void>;
  connectAirtableTask: Task<void, [input: ConnectionInput]>;
  connectNangoTask: Task<void, [input: ConnectionInput]>;
  connectSlackTask: Task<void, [input: ConnectionInput]>;
  isConnecting: (syncId: string | undefined, appName: string) => boolean;
}, 
  | "completeSlackConnection"
  | "completeAirtableConnection"
| "isConnecting">>;

Start provider connection flows from dashboard setup UI. A custom host must install the router, configure requests and provide notifications before creating this store.


useLayoutStore ​

Inferred Pinia type
ts
const useLayoutStore: StoreDefinition<"layout", Pick<{
  assistantPushOpen: Ref<boolean, boolean>;
  assistantWidth: Ref<number, number>;
  beginDrag: (rail: SidebarRail, startX: number, initialWidth?: number) => void;
  collapseRail: (rail: SidebarRail, shouldPersist: boolean) => void;
  draggingRail: Ref<SidebarRail | null, SidebarRail | null>;
  endDrag: () => void;
  engineCollapsed: ComputedRef<boolean>;
  engineWidth: Ref<number, number>;
  expandRail: (rail: SidebarRail, shouldPersist: boolean) => void;
  getWidth: (rail: SidebarRail) => number;
  isCollapsed: (rail: SidebarRail) => boolean;
  setAssistantPushOpen: (isOpen: boolean) => void;
  setWidth: (rail: SidebarRail, width: number, shouldPersist: boolean) => void;
  toggleRail: (rail: SidebarRail) => void;
  updateDrag: (clientX: number) => boolean | undefined;
  workspaceCollapsed: ComputedRef<boolean>;
  workspaceWidth: Ref<number, number>;
}, 
  | "engineWidth"
  | "workspaceWidth"
  | "assistantWidth"
  | "assistantPushOpen"
  | "draggingRail">, Pick<{
  assistantPushOpen: Ref<boolean, boolean>;
  assistantWidth: Ref<number, number>;
  beginDrag: (rail: SidebarRail, startX: number, initialWidth?: number) => void;
  collapseRail: (rail: SidebarRail, shouldPersist: boolean) => void;
  draggingRail: Ref<SidebarRail | null, SidebarRail | null>;
  endDrag: () => void;
  engineCollapsed: ComputedRef<boolean>;
  engineWidth: Ref<number, number>;
  expandRail: (rail: SidebarRail, shouldPersist: boolean) => void;
  getWidth: (rail: SidebarRail) => number;
  isCollapsed: (rail: SidebarRail) => boolean;
  setAssistantPushOpen: (isOpen: boolean) => void;
  setWidth: (rail: SidebarRail, width: number, shouldPersist: boolean) => void;
  toggleRail: (rail: SidebarRail) => void;
  updateDrag: (clientX: number) => boolean | undefined;
  workspaceCollapsed: ComputedRef<boolean>;
  workspaceWidth: Ref<number, number>;
}, "engineCollapsed" | "workspaceCollapsed">, Pick<{
  assistantPushOpen: Ref<boolean, boolean>;
  assistantWidth: Ref<number, number>;
  beginDrag: (rail: SidebarRail, startX: number, initialWidth?: number) => void;
  collapseRail: (rail: SidebarRail, shouldPersist: boolean) => void;
  draggingRail: Ref<SidebarRail | null, SidebarRail | null>;
  endDrag: () => void;
  engineCollapsed: ComputedRef<boolean>;
  engineWidth: Ref<number, number>;
  expandRail: (rail: SidebarRail, shouldPersist: boolean) => void;
  getWidth: (rail: SidebarRail) => number;
  isCollapsed: (rail: SidebarRail) => boolean;
  setAssistantPushOpen: (isOpen: boolean) => void;
  setWidth: (rail: SidebarRail, width: number, shouldPersist: boolean) => void;
  toggleRail: (rail: SidebarRail) => void;
  updateDrag: (clientX: number) => boolean | undefined;
  workspaceCollapsed: ComputedRef<boolean>;
  workspaceWidth: Ref<number, number>;
}, 
  | "getWidth"
  | "isCollapsed"
  | "setWidth"
  | "toggleRail"
  | "collapseRail"
  | "expandRail"
  | "setAssistantPushOpen"
  | "beginDrag"
  | "updateDrag"
| "endDrag">>;

Share sidebar and dock state across the dashboard shell and its engine pages. Use the same Pinia instance to share state and apply the saved browser widths.


useRequestStore ​

Inferred Pinia type
ts
const useRequestStore: StoreDefinition<"frontend-request", Pick<{
  apiUrl: (path: string) => string;
  configure: (input: RequestConfiguration) => void;
  delete: <T>(url: string, options: Omit<RequestOptions, "body">) => Promise<T>;
  get: <T>(url: string, options?: Omit<RequestOptions, "body">) => Promise<T>;
  getAccess: () => object;
  getAuthHeaders: () => Headers;
  isConfigured: Ref<boolean, boolean>;
  post: <T>(url: string, body?: JsonBody, options: Omit<RequestOptions, "body">) => Promise<T>;
  prepareAuthHeaders: () => Promise<Headers>;
}, "isConfigured">, Pick<{
  apiUrl: (path: string) => string;
  configure: (input: RequestConfiguration) => void;
  delete: <T>(url: string, options: Omit<RequestOptions, "body">) => Promise<T>;
  get: <T>(url: string, options?: Omit<RequestOptions, "body">) => Promise<T>;
  getAccess: () => object;
  getAuthHeaders: () => Headers;
  isConfigured: Ref<boolean, boolean>;
  post: <T>(url: string, body?: JsonBody, options: Omit<RequestOptions, "body">) => Promise<T>;
  prepareAuthHeaders: () => Promise<Headers>;
}, never>, Pick<{
  apiUrl: (path: string) => string;
  configure: (input: RequestConfiguration) => void;
  delete: <T>(url: string, options: Omit<RequestOptions, "body">) => Promise<T>;
  get: <T>(url: string, options?: Omit<RequestOptions, "body">) => Promise<T>;
  getAccess: () => object;
  getAuthHeaders: () => Headers;
  isConfigured: Ref<boolean, boolean>;
  post: <T>(url: string, body?: JsonBody, options: Omit<RequestOptions, "body">) => Promise<T>;
  prepareAuthHeaders: () => Promise<Headers>;
}, 
  | "get"
  | "post"
  | "delete"
  | "configure"
  | "getAccess"
  | "getAuthHeaders"
  | "prepareAuthHeaders"
| "apiUrl">>;

Access dashboard HTTP transport in the host's Pinia.

Remarks ​

Configure once before creating dependent stores. The store reads the current token for each authenticated request. Use prepareAuthHeaders for an external transport that must wait for the same session initialization.


useSessionStore ​

Inferred Pinia type
ts
const useSessionStore: StoreDefinition<"session", Pick<{
  configure: (input: SessionAuth) => void;
  error: Ref<string, string>;
  loadSession: () => 
     | TaskInstance<void>
     | Promise<
     | {
   }
    | null>;
  loadUser: () => Promise<any>;
  logoutTask: Task<void, []>;
  session: Ref<
     | {
   }
     | null, 
     | Session
     | {
   }
    | null>;
  sessionTask: Task<void, []>;
  token: Ref<string | null, string | null>;
  user: Ref<
     | {
   }
     | null, 
     | User
     | {
   }
    | null>;
  userTask: Task<void, []>;
}, 
  | "error"
  | "session"
  | "token"
  | "user"
  | "sessionTask"
  | "logoutTask"
  | "userTask">, Pick<{
  configure: (input: SessionAuth) => void;
  error: Ref<string, string>;
  loadSession: () => 
     | TaskInstance<void>
     | Promise<
     | {
   }
    | null>;
  loadUser: () => Promise<any>;
  logoutTask: Task<void, []>;
  session: Ref<
     | {
   }
     | null, 
     | Session
     | {
   }
    | null>;
  sessionTask: Task<void, []>;
  token: Ref<string | null, string | null>;
  user: Ref<
     | {
   }
     | null, 
     | User
     | {
   }
    | null>;
  userTask: Task<void, []>;
}, never>, Pick<{
  configure: (input: SessionAuth) => void;
  error: Ref<string, string>;
  loadSession: () => 
     | TaskInstance<void>
     | Promise<
     | {
   }
    | null>;
  loadUser: () => Promise<any>;
  logoutTask: Task<void, []>;
  session: Ref<
     | {
   }
     | null, 
     | Session
     | {
   }
    | null>;
  sessionTask: Task<void, []>;
  token: Ref<string | null, string | null>;
  user: Ref<
     | {
   }
     | null, 
     | User
     | {
   }
    | null>;
  userTask: Task<void, []>;
}, "configure" | "loadSession" | "loadUser">>;

Restore dashboard auth and keep the workspace, engine and connection stores in sync with the signed-in user.

Remarks ​

Configure once with the host's existing Auth client after configuring requests. Call loadSession to restore a session or loadUser when you need verified user data. Disposing the store removes its auth listener.


useSlackStore ​

Inferred Pinia type
ts
const useSlackStore: StoreDefinition<"slack", Pick<{
  channelsByAccount: ComputedRef<Record<string, SlackChannel[]>>;
  loadChannelsTask: Task<SlackChannel[], [accountId: string, options: {
     refresh?: boolean;
  }]>;
  refreshChannels: (accountId: string) => Promise<SlackChannel[]>;
}, "loadChannelsTask">, Pick<{
  channelsByAccount: ComputedRef<Record<string, SlackChannel[]>>;
  loadChannelsTask: Task<SlackChannel[], [accountId: string, options: {
     refresh?: boolean;
  }]>;
  refreshChannels: (accountId: string) => Promise<SlackChannel[]>;
}, "channelsByAccount">, Pick<{
  channelsByAccount: ComputedRef<Record<string, SlackChannel[]>>;
  loadChannelsTask: Task<SlackChannel[], [accountId: string, options: {
     refresh?: boolean;
  }]>;
  refreshChannels: (accountId: string) => Promise<SlackChannel[]>;
}, "refreshChannels">>;

Load Slack channels using the configured dashboard request store. Cached channel lists are scoped to the signed-in identity and connection.


useSyncStore ​

Inferred Pinia type
ts
const useSyncStore: StoreDefinition<"engines", Pick<{
  add: (rows: EngineRow[]) => EngineRow[];
  bootstrap: (options: Omit<WorkspaceBootstrapRequest, "preferred_workspace_id">, earlyBootstrap?: WorkspaceBootstrapPrefetch) => Promise<boolean>;
  find: (id: string, options?: {
     reload?: boolean;
  } & ApiStoreRequestOptions) => Promise<EngineRow>;
  hasUnassignedEngines: Ref<boolean, boolean>;
  insert: (data: Pick<CreateEngineData, "kind">, options?: ApiStoreRequestOptions) => Promise<EngineRow>;
  invalidate: () => void;
  isLoading: ComputedRef<boolean>;
  loadError: ComputedRef<string>;
  moveWorkspace: (id: string, workspaceId: string) => Promise<EngineRow>;
  orloiAccess: Ref<
     | {
     email: string | null;
     hasAccess: boolean;
     status: "active" | "revoked" | null;
   }
     | null
     | undefined, 
     | OrloiWorkspaceAccess
     | {
     email: string | null;
     hasAccess: boolean;
     status: "active" | "revoked" | null;
   }
     | null
    | undefined>;
  ownedEngines: ComputedRef<EngineRow[]>;
  peek: (id: any) => EngineRow;
  peekAll: () => EngineRow[];
  remove: (id: string) => void;
  resolveWorkspace: (id: string, options?: ApiStoreRequestOptions) => Promise<string>;
  select: (options?: object & ApiStoreRequestOptions) => Promise<EngineRow[]>;
  selectAllWorkspaces: () => Promise<EngineRow[]>;
  setIdentity: (id: string | null) => void;
  syncs: ComputedRef<{
   [k: string]: EngineRow;
  }>;
  update: (id: any, patch: Partial<Update>, options: UpdateOptions) => Promise<EngineRow>;
}, "hasUnassignedEngines" | "orloiAccess">, Pick<{
  add: (rows: EngineRow[]) => EngineRow[];
  bootstrap: (options: Omit<WorkspaceBootstrapRequest, "preferred_workspace_id">, earlyBootstrap?: WorkspaceBootstrapPrefetch) => Promise<boolean>;
  find: (id: string, options?: {
     reload?: boolean;
  } & ApiStoreRequestOptions) => Promise<EngineRow>;
  hasUnassignedEngines: Ref<boolean, boolean>;
  insert: (data: Pick<CreateEngineData, "kind">, options?: ApiStoreRequestOptions) => Promise<EngineRow>;
  invalidate: () => void;
  isLoading: ComputedRef<boolean>;
  loadError: ComputedRef<string>;
  moveWorkspace: (id: string, workspaceId: string) => Promise<EngineRow>;
  orloiAccess: Ref<
     | {
     email: string | null;
     hasAccess: boolean;
     status: "active" | "revoked" | null;
   }
     | null
     | undefined, 
     | OrloiWorkspaceAccess
     | {
     email: string | null;
     hasAccess: boolean;
     status: "active" | "revoked" | null;
   }
     | null
    | undefined>;
  ownedEngines: ComputedRef<EngineRow[]>;
  peek: (id: any) => EngineRow;
  peekAll: () => EngineRow[];
  remove: (id: string) => void;
  resolveWorkspace: (id: string, options?: ApiStoreRequestOptions) => Promise<string>;
  select: (options?: object & ApiStoreRequestOptions) => Promise<EngineRow[]>;
  selectAllWorkspaces: () => Promise<EngineRow[]>;
  setIdentity: (id: string | null) => void;
  syncs: ComputedRef<{
   [k: string]: EngineRow;
  }>;
  update: (id: any, patch: Partial<Update>, options: UpdateOptions) => Promise<EngineRow>;
}, "syncs" | "ownedEngines" | "isLoading" | "loadError">, Pick<{
  add: (rows: EngineRow[]) => EngineRow[];
  bootstrap: (options: Omit<WorkspaceBootstrapRequest, "preferred_workspace_id">, earlyBootstrap?: WorkspaceBootstrapPrefetch) => Promise<boolean>;
  find: (id: string, options?: {
     reload?: boolean;
  } & ApiStoreRequestOptions) => Promise<EngineRow>;
  hasUnassignedEngines: Ref<boolean, boolean>;
  insert: (data: Pick<CreateEngineData, "kind">, options?: ApiStoreRequestOptions) => Promise<EngineRow>;
  invalidate: () => void;
  isLoading: ComputedRef<boolean>;
  loadError: ComputedRef<string>;
  moveWorkspace: (id: string, workspaceId: string) => Promise<EngineRow>;
  orloiAccess: Ref<
     | {
     email: string | null;
     hasAccess: boolean;
     status: "active" | "revoked" | null;
   }
     | null
     | undefined, 
     | OrloiWorkspaceAccess
     | {
     email: string | null;
     hasAccess: boolean;
     status: "active" | "revoked" | null;
   }
     | null
    | undefined>;
  ownedEngines: ComputedRef<EngineRow[]>;
  peek: (id: any) => EngineRow;
  peekAll: () => EngineRow[];
  remove: (id: string) => void;
  resolveWorkspace: (id: string, options?: ApiStoreRequestOptions) => Promise<string>;
  select: (options?: object & ApiStoreRequestOptions) => Promise<EngineRow[]>;
  selectAllWorkspaces: () => Promise<EngineRow[]>;
  setIdentity: (id: string | null) => void;
  syncs: ComputedRef<{
   [k: string]: EngineRow;
  }>;
  update: (id: any, patch: Partial<Update>, options: UpdateOptions) => Promise<EngineRow>;
}, 
  | "update"
  | "find"
  | "remove"
  | "setIdentity"
  | "add"
  | "select"
  | "insert"
  | "invalidate"
  | "peek"
  | "peekAll"
  | "bootstrap"
  | "selectAllWorkspaces"
  | "moveWorkspace"
| "resolveWorkspace">>;

Read and update engine instances in the selected workspace. With a custom dashboard host, configure requests first and bootstrap for the current user before relying on the engine list.


useWorkspaceStore ​

Inferred Pinia type
ts
const useWorkspaceStore: StoreDefinition<"workspaces", Pick<{
  applyBootstrap: (response: Pick<WorkspaceBootstrapResponse, "workspaces" | "workspaces_next_cursor" | "selected_workspace_id">) => void;
  createWorkspace: (name: string) => Promise<WorkspaceRow>;
  deleteWorkspace: (workspaceId: string, signal?: AbortSignal) => Promise<void>;
  getRole: (workspace: WorkspaceRow) => "owner" | "member";
  isMemberWorkspace: ComputedRef<boolean>;
  isUiEnabled: Ref<boolean, boolean>;
  leaveWorkspace: (workspaceId: string, signal?: AbortSignal) => Promise<void>;
  load: (options?: {
     reload?: boolean;
  }) => Promise<void>;
  ownedWorkspaces: ComputedRef<object[]>;
  preferredWorkspaceId: Ref<string | null | undefined, string | null | undefined>;
  readEnginePage: (workspaceId: string, afterId?: string, signal?: AbortSignal) => Promise<WorkspaceEngineResponse>;
  renameWorkspace: (workspaceId: string, name: string, abortSignal?: AbortSignal) => Promise<string>;
  selectedWorkspace: ComputedRef<
     | {
     created_at: string;
     has_invitations: boolean;
     has_other_members: boolean;
     id: string;
     name: string;
     owner_user_id: string;
   }
    | null>;
  selectedWorkspaceRole: ComputedRef<"owner" | "member" | null>;
  selectWorkspace: (id: string | null) => void;
  setIdentity: (id: string | null) => void;
  transferOwnership: (workspaceId: string, targetUserId: string, options: object) => Promise<WorkspaceMembersResponse>;
  workspaces: Ref<object[], WorkspaceRow[] | object[]>;
}, "workspaces" | "isUiEnabled" | "preferredWorkspaceId">, Pick<{
  applyBootstrap: (response: Pick<WorkspaceBootstrapResponse, "workspaces" | "workspaces_next_cursor" | "selected_workspace_id">) => void;
  createWorkspace: (name: string) => Promise<WorkspaceRow>;
  deleteWorkspace: (workspaceId: string, signal?: AbortSignal) => Promise<void>;
  getRole: (workspace: WorkspaceRow) => "owner" | "member";
  isMemberWorkspace: ComputedRef<boolean>;
  isUiEnabled: Ref<boolean, boolean>;
  leaveWorkspace: (workspaceId: string, signal?: AbortSignal) => Promise<void>;
  load: (options?: {
     reload?: boolean;
  }) => Promise<void>;
  ownedWorkspaces: ComputedRef<object[]>;
  preferredWorkspaceId: Ref<string | null | undefined, string | null | undefined>;
  readEnginePage: (workspaceId: string, afterId?: string, signal?: AbortSignal) => Promise<WorkspaceEngineResponse>;
  renameWorkspace: (workspaceId: string, name: string, abortSignal?: AbortSignal) => Promise<string>;
  selectedWorkspace: ComputedRef<
     | {
     created_at: string;
     has_invitations: boolean;
     has_other_members: boolean;
     id: string;
     name: string;
     owner_user_id: string;
   }
    | null>;
  selectedWorkspaceRole: ComputedRef<"owner" | "member" | null>;
  selectWorkspace: (id: string | null) => void;
  setIdentity: (id: string | null) => void;
  transferOwnership: (workspaceId: string, targetUserId: string, options: object) => Promise<WorkspaceMembersResponse>;
  workspaces: Ref<object[], WorkspaceRow[] | object[]>;
}, 
  | "ownedWorkspaces"
  | "selectedWorkspaceRole"
  | "isMemberWorkspace"
  | "selectedWorkspace">, Pick<{
  applyBootstrap: (response: Pick<WorkspaceBootstrapResponse, "workspaces" | "workspaces_next_cursor" | "selected_workspace_id">) => void;
  createWorkspace: (name: string) => Promise<WorkspaceRow>;
  deleteWorkspace: (workspaceId: string, signal?: AbortSignal) => Promise<void>;
  getRole: (workspace: WorkspaceRow) => "owner" | "member";
  isMemberWorkspace: ComputedRef<boolean>;
  isUiEnabled: Ref<boolean, boolean>;
  leaveWorkspace: (workspaceId: string, signal?: AbortSignal) => Promise<void>;
  load: (options?: {
     reload?: boolean;
  }) => Promise<void>;
  ownedWorkspaces: ComputedRef<object[]>;
  preferredWorkspaceId: Ref<string | null | undefined, string | null | undefined>;
  readEnginePage: (workspaceId: string, afterId?: string, signal?: AbortSignal) => Promise<WorkspaceEngineResponse>;
  renameWorkspace: (workspaceId: string, name: string, abortSignal?: AbortSignal) => Promise<string>;
  selectedWorkspace: ComputedRef<
     | {
     created_at: string;
     has_invitations: boolean;
     has_other_members: boolean;
     id: string;
     name: string;
     owner_user_id: string;
   }
    | null>;
  selectedWorkspaceRole: ComputedRef<"owner" | "member" | null>;
  selectWorkspace: (id: string | null) => void;
  setIdentity: (id: string | null) => void;
  transferOwnership: (workspaceId: string, targetUserId: string, options: object) => Promise<WorkspaceMembersResponse>;
  workspaces: Ref<object[], WorkspaceRow[] | object[]>;
}, 
  | "setIdentity"
  | "getRole"
  | "load"
  | "applyBootstrap"
  | "readEnginePage"
  | "selectWorkspace"
  | "createWorkspace"
  | "renameWorkspace"
  | "transferOwnership"
  | "leaveWorkspace"
| "deleteWorkspace">>;

Manage workspace selection and membership data for the signed-in dashboard user. Selection preferences are scoped to that user in browser storage.

Type Aliases ​

DashboardProps ​

ts
type DashboardProps = {
  auth: DashboardAuth;
  authCallbackRouteName?: string;
  bootstrapPrefetch?: WorkspaceBootstrapPrefetch;
  connectionPrefetch?: EngineConnectionsPrefetch;
  desktopUrl?: string;
  hasStoredSession?: boolean;
  localInboxUrl?: string;
  loginRedirectUrl?: string;
  loginScreen?: Component;
  name?: string;
  publicRouteNames?: readonly string[];
  storageKeyPrefix?: string;
};

Host inputs to the dashboard shell. Pass the existing Auth client and configure the request and session stores on the host's Pinia before mounting.

Properties ​

auth ​
ts
auth: DashboardAuth;
authCallbackRouteName? ​
ts
authCallbackRouteName?: string;
bootstrapPrefetch? ​
ts
bootstrapPrefetch?: WorkspaceBootstrapPrefetch;
connectionPrefetch? ​
ts
connectionPrefetch?: EngineConnectionsPrefetch;
desktopUrl? ​
ts
desktopUrl?: string;
hasStoredSession? ​
ts
hasStoredSession?: boolean;
localInboxUrl? ​
ts
localInboxUrl?: string;
loginRedirectUrl? ​
ts
loginRedirectUrl?: string;
loginScreen? ​
ts
loginScreen?: Component;
name? ​
ts
name?: string;
publicRouteNames? ​
ts
publicRouteNames?: readonly string[];
storageKeyPrefix? ​
ts
storageKeyPrefix?: string;

EngineComponentProps ​

ts
type EngineComponentProps = {
  activityPolling?: ActivityPollingOptions;
  canUseAiActions?: boolean;
  connectionPrefetch?: EngineConnectionsPrefetch;
  engineStatusStepItem: Component;
  isDevelopmentTarget: boolean;
  mockConnections?: boolean;
  onUpdate: (changes: Partial<SyncRecord>) => Promise<unknown>;
  subscriptionUsage: EngineSubscriptionUsage | null;
  sync: SyncRecord;
};

Props supplied by the host to an engine page. Submit saved changes through onUpdate so they pass through the host's persistence and access checks.

Properties ​

activityPolling? ​
ts
activityPolling?: ActivityPollingOptions;
canUseAiActions? ​
ts
canUseAiActions?: boolean;

Undefined while authentication is unresolved; preserve existing AI flows.

connectionPrefetch? ​
ts
connectionPrefetch?: EngineConnectionsPrefetch;
engineStatusStepItem ​
ts
engineStatusStepItem: Component;
isDevelopmentTarget ​
ts
isDevelopmentTarget: boolean;
mockConnections? ​
ts
mockConnections?: boolean;
onUpdate ​
ts
onUpdate: (changes: Partial<SyncRecord>) => Promise<unknown>;
subscriptionUsage ​
ts
subscriptionUsage: EngineSubscriptionUsage | null;
sync ​
ts
sync: SyncRecord;

EngineFrontendRegistration ​

ts
type EngineFrontendRegistration = {
  children?: RouteRecordRaw[];
  component: NonNullable<RouteRecordRaw["component"]>;
  meta?: RouteRecordRaw["meta"];
  props?: RouteRecordSingleView["props"];
};

Properties ​

children? ​
ts
children?: RouteRecordRaw[];
component ​
ts
component: NonNullable<RouteRecordRaw["component"]>;
meta? ​
ts
meta?: RouteRecordRaw["meta"];
props? ​
ts
props?: RouteRecordSingleView["props"];

EnginePageRecord ​

ts
type EnginePageRecord = Pick<SyncRecord, "id" | "kind" | "active" | "selected_base" | "selected_table"> & Partial<Pick<SyncRecord, "slack_channel_id">>;

Public state needed by the default engine page; full legacy records remain valid inputs.


EngineRoutesOptions ​

ts
type EngineRoutesOptions = {
  component?: EngineFrontendRegistration["component"];
  namePrefix?: string;
  nested?: boolean;
};

Properties ​

component? ​
ts
component?: EngineFrontendRegistration["component"];

Common host wrapper; receives engineId and kind as route props.

namePrefix? ​
ts
namePrefix?: string;
nested? ​
ts
nested?: boolean;

Render registrations beneath an existing /engine/:engine_id parent route.


FrontendNotifications ​

ts
type FrontendNotifications = {
  error(message: string): void;
  success(message: string): void;
};

Methods ​

error() ​
ts
error(message: string): void;
success() ​
ts
success(message: string): void;

RequestConfiguration ​

ts
type RequestConfiguration = {
  apiBaseUrl: string;
  beforeRequest?(): PromiseLike<unknown> | undefined;
  getAccess(): RequestAccess;
};

Host-supplied API base and live authentication getter. Use beforeRequest to await session restoration when a request starts before auth is ready.

Methods ​

beforeRequest()? ​
ts
beforeRequest?(): PromiseLike<unknown> | undefined;
getAccess() ​
ts
getAccess(): RequestAccess;

Properties ​

apiBaseUrl ​
ts
apiBaseUrl: string;

SessionAuth ​

ts
type SessionAuth = Pick<SupabaseClient["auth"], "getSession" | "getUser" | "signOut" | "onAuthStateChange">;

SettingsProps ​

ts
type SettingsProps = {
  auth: SettingsAuth;
  connectedAppsDescription?: string;
  disconnectDescription?: string;
  enableGoogleSignIn?: boolean;
  headerTarget?: string | false;
  onRequestAccountDeletion?: () => Promise<unknown>;
  redirectUrl?: string;
  showMcpConnections?: boolean;
};

Account settings inputs for the host dashboard. Pass the existing Auth client. The host supplies account-deletion behavior when that action is available.

Properties ​

auth ​
ts
auth: SettingsAuth;
connectedAppsDescription? ​
ts
connectedAppsDescription?: string;
disconnectDescription? ​
ts
disconnectDescription?: string;
enableGoogleSignIn? ​
ts
enableGoogleSignIn?: boolean;
headerTarget? ​
ts
headerTarget?: string | false;
onRequestAccountDeletion? ​
ts
onRequestAccountDeletion?: () => Promise<unknown>;
redirectUrl? ​
ts
redirectUrl?: string;
showMcpConnections? ​
ts
showMcpConnections?: boolean;

SidebarEngine ​

ts
type SidebarEngine = ReturnType<typeof useSyncStore>["syncs"][string];

SidebarEngineDefinition ​

ts
type SidebarEngineDefinition = {
  badge?: string;
  description?: string;
  icon?: Component;
  kind: Parameters<ReturnType<typeof useSyncStore>["insert"]>[0]["kind"];
  label: string;
};

An engine kind available in the sidebar's creation picker. Supply a kind with a registered frontend route. The server still authorizes creation.

Properties ​

badge? ​
ts
badge?: string;
description? ​
ts
description?: string;
icon? ​
ts
icon?: Component;
kind ​
ts
kind: Parameters<ReturnType<typeof useSyncStore>["insert"]>[0]["kind"];
label ​
ts
label: string;

SidebarProps ​

ts
type SidebarProps = {
  addEngineLabel?: string;
  addingEngine?: boolean;
  engineCatalog?: readonly SidebarEngineDefinition[];
  engineDetail?: (engine: SidebarEngine) => string | null | undefined;
  engineLabel?: (engine: SidebarEngine) => string;
  engineTo?: (engine: SidebarEngine) => RouteLocationRaw;
  homeTo?: RouteLocationRaw;
  isEngineIncluded?: (engine: SidebarEngine) => boolean;
  isEngineVisible?: (engine: SidebarEngine) => boolean;
  loading?: boolean;
  name?: string;
  onAddEngine?: () => void | Promise<void>;
  onOpenSupport?: () => void | Promise<void>;
  onOpenWorkspaceSettings?: (workspace: SidebarWorkspace) => void;
  onWorkspaceChange?: () => void | Promise<void>;
  runtimeBadge?: string;
  settingsLabel?: string;
  settingsTo?: RouteLocationRaw;
  supportUnread?: boolean;
  workspaceProduct?: string;
};

Navigation and creation policy for the dashboard sidebar. The host may supply routes and callbacks for engine navigation, settings and workspace changes.

Properties ​

addEngineLabel? ​
ts
addEngineLabel?: string;
addingEngine? ​
ts
addingEngine?: boolean;
engineCatalog? ​
ts
engineCatalog?: readonly SidebarEngineDefinition[];
engineDetail? ​
ts
engineDetail?: (engine: SidebarEngine) => string | null | undefined;
engineLabel? ​
ts
engineLabel?: (engine: SidebarEngine) => string;
engineTo? ​
ts
engineTo?: (engine: SidebarEngine) => RouteLocationRaw;
homeTo? ​
ts
homeTo?: RouteLocationRaw;
isEngineIncluded? ​
ts
isEngineIncluded?: (engine: SidebarEngine) => boolean;
isEngineVisible? ​
ts
isEngineVisible?: (engine: SidebarEngine) => boolean;
loading? ​
ts
loading?: boolean;
name? ​
ts
name?: string;
onAddEngine? ​
ts
onAddEngine?: () => void | Promise<void>;
onOpenSupport? ​
ts
onOpenSupport?: () => void | Promise<void>;
onOpenWorkspaceSettings? ​
ts
onOpenWorkspaceSettings?: (workspace: SidebarWorkspace) => void;
onWorkspaceChange? ​
ts
onWorkspaceChange?: () => void | Promise<void>;
runtimeBadge? ​
ts
runtimeBadge?: string;
settingsLabel? ​
ts
settingsLabel?: string;
settingsTo? ​
ts
settingsTo?: RouteLocationRaw;
supportUnread? ​
ts
supportUnread?: boolean;
workspaceProduct? ​
ts
workspaceProduct?: string;

TaskLlmCall ​

ts
type TaskLlmCall = {
  created_at: string;
  descriptor: string;
  duration_ms: number | null;
  id: number | string;
  input_token_count: number | null;
  model: string;
  output_token_count: number | null;
  provider: string;
  provider_request_id: string | null;
  sync_id: string;
  task_id: number | string | null;
};

Properties ​

created_at ​
ts
created_at: string;
descriptor ​
ts
descriptor: string;
duration_ms ​
ts
duration_ms: number | null;
id ​
ts
id: number | string;
input_token_count ​
ts
input_token_count: number | null;
model ​
ts
model: string;
output_token_count ​
ts
output_token_count: number | null;
provider ​
ts
provider: string;
provider_request_id ​
ts
provider_request_id: string | null;
sync_id ​
ts
sync_id: string;
task_id ​
ts
task_id: number | string | null;

TaskLlmCallSource ​

ts
type TaskLlmCallSource = {
  includes(task: TaskActivityTask): boolean;
  load(input: object): Promise<{
     calls: TaskLlmCall[];
  }>;
};

The engine selects eligible rows and loads calls for an expanded task timeline.

Methods ​

includes() ​
ts
includes(task: TaskActivityTask): boolean;
load() ​
ts
load(input: object): Promise<{
  calls: TaskLlmCall[];
}>;