Skip to main content

Interface: AppContext

Defined in: packages/sdk/src/app-context.ts:66

App context provided to AI assistants

This represents the current page/state the user is in, allowing the AI to provide context-aware assistance.

Properties

appUri?

optional appUri: string

Defined in: packages/sdk/src/app-context.ts:68

Current page URI (e.g., 'app:page:workflows/123')


autoApprove?

optional autoApprove: boolean

Defined in: packages/sdk/src/app-context.ts:74

Auto-approve all tool calls without HITL interruption


deepThink?

optional deepThink: boolean

Defined in: packages/sdk/src/app-context.ts:77

Enable deep thinking mode for the current session


hasLocalBrowser?

optional hasLocalBrowser: boolean

Defined in: packages/sdk/src/app-context.ts:85

Client has a local browser the agent can drive (the Gravity Rail desktop app is running and its core is reachable). The server loads the browser_* tools ONLY when this is true, so a plain web session does not pay for tool schemas it could never use.


initialSkills?

optional initialSkills: string[]

Defined in: packages/sdk/src/app-context.ts:88

Server-validated Manager skills selected for the first Chat turn.


initialTools?

optional initialTools: string[]

Defined in: packages/sdk/src/app-context.ts:96

Toolkit tool names/URIs for this Manager turn (builtin, custom, app-connection, or MCP). When set (including []), replaces the chat's enabled toolkit tools for this and later turns. When omitted, the prior selection is kept. Concrete tool URIs only — never wildcards.


pageState?

optional pageState: object

Defined in: packages/sdk/src/app-context.ts:99

Additional structured page state

Index Signature

[key: string]: any

Any other page-specific state

dataRecord?

optional dataRecord: DataRecordContext

Data record being viewed/edited

openDrawers?

optional openDrawers: string[]

Open drawers/modals

page?

optional page: PageContext

Page being viewed/edited

routeParams?

optional routeParams: Record<string, string | string[]>

Route parameters from Next.js

selectedTabs?

optional selectedTabs: string[]

Selected tabs

site?

optional site: SiteContext

Site being viewed/edited

toolkit?

optional toolkit: ToolkitContext

Toolkit being viewed

workflow?

optional workflow: WorkflowContext

Workflow being viewed/edited


pageUrl?

optional pageUrl: string

Defined in: packages/sdk/src/app-context.ts:71

Current browser URL for linking back to this page