feat(ext): add systemInstruction to ExecuteConfig

Expose a serializable `systemInstruction` string field on the
page-facing ExecuteConfig, mapped to `instructions.system` when
creating MultiPageAgent. Functions cannot cross the postMessage
boundary, so this flat string field replaces the object form.

Closes #359
This commit is contained in:
Simon
2026-04-02 16:34:57 +08:00
parent 5ea2edd13c
commit ec08b05da1
4 changed files with 20 additions and 1 deletions

View File

@@ -118,6 +118,10 @@ export interface ExecuteConfig {
model: string
apiKey?: string
// Global system-level instructions for the agent.
// Equivalent to AgentConfig.instructions.system.
systemInstruction?: string
// Include the initial tab where page JS starts. Default: true.
includeInitialTab?: boolean
@@ -212,6 +216,9 @@ interface ExecuteConfig {
baseURL: string
model: string
apiKey?: string
systemInstruction?: string
includeInitialTab?: boolean
experimentalIncludeAllTabs?: boolean
onStatusChange?: (status: AgentStatus) => void