Kit frontend
| Use | Import from | API |
|---|---|---|
| Configure transport and authentication | @kambium/kit/frontend | useRequestStore, RequestConfiguration, useSessionStore, SessionAuth |
| Read and update engine or workspace state | @kambium/kit/frontend | useSyncStore, useWorkspaceStore, useAccountStore |
| Configure provider setup | @kambium/kit/frontend | useAirtableStore, useSlackStore, useConnectionStore |
| Bind notifications and layout | @kambium/kit/frontend | notificationsKey, useNotifications, FrontendNotifications, useLayoutStore |
| Define a typed engine page | @kambium/kit/frontend | defineEngineComponent, EngineComponentProps, EnginePageRecord, engineComponentPropNames |
| Register engine routes | @kambium/kit/dashboard | createEngineRoutes, 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 from | Component | Use |
|---|---|---|
@kambium/kit/dashboard | Dashboard | Mount the shell with the host's configured stores and Auth client. See DashboardProps. |
@kambium/kit/dashboard | Sidebar, EnginePicker | Navigate and offer available engine kinds. Register routes for the kinds in SidebarEngineDefinition. |
@kambium/kit/dashboard | Settings, WorkspaceInvitation | Add account settings and an invitation route to the app router. See SettingsProps. |
@kambium/kit/frontend/ui | EnginePage, SlackChannelSelect | Use the default engine shell and provider setup controls. The host persists updates through callbacks. |
@kambium/kit/frontend/ui | TaskLogList | Render task activity. Use the operation slot for engine labels and TaskLlmCallSource to supply LLM call details. |
@kambium/kit/shared-components/components | general/StatusBadge.vue, icons/FeatherIcon.vue, icons/Activity.vue | Shared display and icon components used by generated engine pages. |
@kambium/kit/styles, @kambium/kit/tokens | Global styles and Sass tokens | Import 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()
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()
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()
function useNotifications(): FrontendNotifications;Read the host's notification callbacks during Vue setup. Throws if the provider is missing.
Variables
engineComponentPropNames
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
const notificationsKey: InjectionKey<FrontendNotifications>;Provide the host's notification callbacks under this key before mounting dashboard UI.
useAccountStore
Inferred Pinia type
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
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
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
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
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
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
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
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
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
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
auth: DashboardAuth;authCallbackRouteName?
authCallbackRouteName?: string;bootstrapPrefetch?
bootstrapPrefetch?: WorkspaceBootstrapPrefetch;connectionPrefetch?
connectionPrefetch?: EngineConnectionsPrefetch;desktopUrl?
desktopUrl?: string;hasStoredSession?
hasStoredSession?: boolean;localInboxUrl?
localInboxUrl?: string;loginRedirectUrl?
loginRedirectUrl?: string;loginScreen?
loginScreen?: Component;name?
name?: string;publicRouteNames?
publicRouteNames?: readonly string[];storageKeyPrefix?
storageKeyPrefix?: string;EngineComponentProps
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?
activityPolling?: ActivityPollingOptions;canUseAiActions?
canUseAiActions?: boolean;Undefined while authentication is unresolved; preserve existing AI flows.
connectionPrefetch?
connectionPrefetch?: EngineConnectionsPrefetch;engineStatusStepItem
engineStatusStepItem: Component;isDevelopmentTarget
isDevelopmentTarget: boolean;mockConnections?
mockConnections?: boolean;onUpdate
onUpdate: (changes: Partial<SyncRecord>) => Promise<unknown>;subscriptionUsage
subscriptionUsage: EngineSubscriptionUsage | null;sync
sync: SyncRecord;EngineFrontendRegistration
type EngineFrontendRegistration = {
children?: RouteRecordRaw[];
component: NonNullable<RouteRecordRaw["component"]>;
meta?: RouteRecordRaw["meta"];
props?: RouteRecordSingleView["props"];
};Properties
children?
children?: RouteRecordRaw[];component
component: NonNullable<RouteRecordRaw["component"]>;meta?
meta?: RouteRecordRaw["meta"];props?
props?: RouteRecordSingleView["props"];EnginePageRecord
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
type EngineRoutesOptions = {
component?: EngineFrontendRegistration["component"];
namePrefix?: string;
nested?: boolean;
};Properties
component?
component?: EngineFrontendRegistration["component"];Common host wrapper; receives engineId and kind as route props.
namePrefix?
namePrefix?: string;nested?
nested?: boolean;Render registrations beneath an existing /engine/:engine_id parent route.
FrontendNotifications
type FrontendNotifications = {
error(message: string): void;
success(message: string): void;
};Methods
error()
error(message: string): void;success()
success(message: string): void;RequestConfiguration
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()?
beforeRequest?(): PromiseLike<unknown> | undefined;getAccess()
getAccess(): RequestAccess;Properties
apiBaseUrl
apiBaseUrl: string;SessionAuth
type SessionAuth = Pick<SupabaseClient["auth"], "getSession" | "getUser" | "signOut" | "onAuthStateChange">;SettingsProps
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
auth: SettingsAuth;connectedAppsDescription?
connectedAppsDescription?: string;disconnectDescription?
disconnectDescription?: string;enableGoogleSignIn?
enableGoogleSignIn?: boolean;headerTarget?
headerTarget?: string | false;onRequestAccountDeletion?
onRequestAccountDeletion?: () => Promise<unknown>;redirectUrl?
redirectUrl?: string;showMcpConnections?
showMcpConnections?: boolean;SidebarEngine
type SidebarEngine = ReturnType<typeof useSyncStore>["syncs"][string];SidebarEngineDefinition
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?
badge?: string;description?
description?: string;icon?
icon?: Component;kind
kind: Parameters<ReturnType<typeof useSyncStore>["insert"]>[0]["kind"];label
label: string;SidebarProps
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?
addEngineLabel?: string;addingEngine?
addingEngine?: boolean;engineCatalog?
engineCatalog?: readonly SidebarEngineDefinition[];engineDetail?
engineDetail?: (engine: SidebarEngine) => string | null | undefined;engineLabel?
engineLabel?: (engine: SidebarEngine) => string;engineTo?
engineTo?: (engine: SidebarEngine) => RouteLocationRaw;homeTo?
homeTo?: RouteLocationRaw;isEngineIncluded?
isEngineIncluded?: (engine: SidebarEngine) => boolean;isEngineVisible?
isEngineVisible?: (engine: SidebarEngine) => boolean;loading?
loading?: boolean;name?
name?: string;onAddEngine?
onAddEngine?: () => void | Promise<void>;onOpenSupport?
onOpenSupport?: () => void | Promise<void>;onOpenWorkspaceSettings?
onOpenWorkspaceSettings?: (workspace: SidebarWorkspace) => void;onWorkspaceChange?
onWorkspaceChange?: () => void | Promise<void>;runtimeBadge?
runtimeBadge?: string;settingsLabel?
settingsLabel?: string;settingsTo?
settingsTo?: RouteLocationRaw;supportUnread?
supportUnread?: boolean;workspaceProduct?
workspaceProduct?: string;TaskLlmCall
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
created_at: string;descriptor
descriptor: string;duration_ms
duration_ms: number | null;id
id: number | string;input_token_count
input_token_count: number | null;model
model: string;output_token_count
output_token_count: number | null;provider
provider: string;provider_request_id
provider_request_id: string | null;sync_id
sync_id: string;task_id
task_id: number | string | null;TaskLlmCallSource
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()
includes(task: TaskActivityTask): boolean;load()
load(input: object): Promise<{
calls: TaskLlmCall[];
}>;