@onkeiki/agents 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,6 +34,13 @@ export interface SandboxHandle {
34
34
  * credentials) use it as a backup/restore target across sandbox recreation.
35
35
  */
36
36
  readonly getPersistentExecutorDataDir?: () => Promise<string | null>
37
+
38
+ /**
39
+ * Whether the sandbox is running right now. A provider whose sandboxes
40
+ * auto-stop reports `false` once stopped, so background work (e.g. a
41
+ * periodic backup) can skip it instead of failing against it.
42
+ */
43
+ readonly isStarted?: () => Promise<boolean>
37
44
  }
38
45
 
39
46
  /**
@@ -15,7 +15,7 @@ export type HarnessConfig = {
15
15
  readonly type: 'flue' | 'hermes' | 'external'
16
16
  readonly dispatchUrl?: string
17
17
  readonly timeoutMs?: DurationInput
18
- readonly connectivity?: 'push' | 'relay'
18
+ readonly connectivity?: 'push' | 'relay' | 'inbox'
19
19
  }
20
20
 
21
21
  export type PromptContext = {
@@ -149,7 +149,7 @@ export type McpConfig = {
149
149
  readonly userCanAdd?: boolean
150
150
  /**
151
151
  * Developer-declared per-user connections. Each entry names an OpenAPI
152
- * provider (e.g. Gmail) that every conversation user authorizes
152
+ * provider (e.g. Gmail) or MCP server that every conversation user authorizes
153
153
  * individually: the agent texts them a fresh connect link, they complete
154
154
  * OAuth in the browser, and the resulting credential lives in that user's
155
155
  * own Executor daemon — never shared across users or exposed to the model.
@@ -186,7 +186,7 @@ export type UserConnectionHealthCheck = {
186
186
  readonly identityField?: string
187
187
  }
188
188
 
189
- export type UserConnectionDefinition = {
189
+ type UserConnectionDetails = {
190
190
  /** Stable connection name, also the Executor source slug (e.g. "gmail"). */
191
191
  readonly name: string
192
192
  /** Shown to the model so it knows when to offer connecting this provider. */
@@ -205,6 +205,10 @@ export type UserConnectionDefinition = {
205
205
  * plus what it needs ("google", "calendar") resolve without being asked.
206
206
  */
207
207
  readonly capabilities?: ReadonlyArray<string>
208
+ }
209
+
210
+ export type OpenApiUserConnectionDefinition = UserConnectionDetails & {
211
+ readonly kind?: 'openapi'
208
212
  /** OpenAPI spec URL registered as the Executor source. */
209
213
  readonly spec: string
210
214
  /** Override for the API base URL when the spec's `servers` entry is wrong. */
@@ -213,6 +217,19 @@ export type UserConnectionDefinition = {
213
217
  readonly healthCheck?: UserConnectionHealthCheck
214
218
  }
215
219
 
220
+ export type McpUserConnectionDefinition = UserConnectionDetails & {
221
+ /** MCP connection names must match `^[a-z][a-z0-9_]*$` (hyphens are not allowed). */
222
+ readonly kind: 'mcp'
223
+ /** Remote MCP server URL. */
224
+ readonly endpoint: string
225
+ /** RFC 7009 revocation endpoint, for servers whose metadata doesn't advertise one. */
226
+ readonly revocationUrl?: string
227
+ /** Pre-registered OAuth app, for servers that only grant some scopes to approved clients. Omit to use dynamic client registration. Values are developer-secret names. */
228
+ readonly oauth?: { readonly clientIdSecret: string; readonly clientSecretSecret?: string }
229
+ }
230
+
231
+ export type UserConnectionDefinition = OpenApiUserConnectionDefinition | McpUserConnectionDefinition
232
+
216
233
  export type SteeringConfig = {
217
234
  readonly debounceWindow: DurationInput
218
235
  readonly midTurnStrategy: 'interrupt' | 'append' | 'queue'
@@ -408,8 +425,15 @@ export type CapabilityManifest = {
408
425
  /** Hosts the `http` namespace may reach, `host` (port 443) or `host:port` (required with `uses: ["http"]`). */
409
426
  readonly http?: { readonly allow: ReadonlyArray<string> }
410
427
  } & (R extends 'render-template' ? { readonly templates?: ReadonlyArray<CapabilityTemplate> } : { readonly templates?: never })
428
+ & (R extends 'mcp' ? { readonly mcp: CapabilityMcpConfig } : { readonly mcp?: never })
411
429
  }[CapabilityRuntime]
412
430
 
431
+ export type CapabilityMcpConfig = {
432
+ readonly url: string
433
+ readonly auth?: 'none' | 'headers' | 'oauth'
434
+ readonly headers?: Readonly<Record<string, string>>
435
+ }
436
+
413
437
  export type CapabilityInput = CapabilityRef | CapabilityManifest
414
438
 
415
439
  export type AgentConfig = {
@@ -418,6 +442,14 @@ export type AgentConfig = {
418
442
  readonly historyLimit: number
419
443
  readonly systemPrompt: (ctx: PromptContext) => string
420
444
  readonly tools: ReadonlyArray<ToolDefinition<any, any>>
445
+ /** Thinking budget per model call. Omit to leave the agent's current setting alone (new agents get 'low'). */
446
+ readonly reasoningEffort?: 'none' | 'low' | 'medium' | 'high'
447
+ /** Web search + page scraping tools. */
448
+ readonly scrape?: boolean
449
+ /** Reply guards: outbound sanitizer, send guards, repeated-failure stop. */
450
+ readonly guards?: boolean
451
+ /** ZeroLeaks Shield screens inbound text for prompt injection. */
452
+ readonly promptGuard?: boolean
421
453
  readonly alerts?: ReadonlyArray<AlertDefinition>
422
454
  readonly hooks?: TurnHooks
423
455