agentbox-sdk 0.1.508 → 0.1.512

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.
@@ -1,4 +1,4 @@
1
- export { A as AISDKEvent, U as MessageCompletedEvent, V as MessageInjectedEvent, W as MessageStartedEvent, X as NativePlanEvent, Y as NormalizedAgentEvent, Z as NormalizedAgentEventBase, _ as NormalizedAgentEventType, a5 as PermissionRequestedEvent, a6 as PermissionResolvedEvent, a7 as RawAgentEvent, a8 as ReasoningDeltaEvent, aa as RunCancelledEvent, ab as RunCompletedEvent, ac as RunErrorEvent, ad as RunStartedEvent, af as TextDeltaEvent, ah as ToolCallCompletedEvent, ai as ToolCallDeltaEvent, aj as ToolCallStartedEvent, am as createNormalizedEvent, an as normalizeRawAgentEvent, ao as toAISDKEvent, ap as toAISDKStream } from '../types-BQ-_AUfY.js';
1
+ export { A as AISDKEvent, C as BackgroundTask, D as BackgroundTasksEvent, W as MessageCompletedEvent, X as MessageInjectedEvent, Y as MessageStartedEvent, Z as NativePlanEvent, _ as NormalizedAgentEvent, $ as NormalizedAgentEventBase, a0 as NormalizedAgentEventType, a7 as PermissionRequestedEvent, a8 as PermissionResolvedEvent, a9 as RawAgentEvent, aa as ReasoningDeltaEvent, ac as RunCancelledEvent, ad as RunCompletedEvent, ae as RunErrorEvent, af as RunStartedEvent, ah as TextDeltaEvent, aj as ToolCallCompletedEvent, ak as ToolCallDeltaEvent, al as ToolCallStartedEvent, ao as createNormalizedEvent, ap as normalizeRawAgentEvent, aq as toAISDKEvent, ar as toAISDKStream } from '../types-VT1LMbLW.js';
2
2
  import { AgentProvider } from '../enums.js';
3
3
  import '../Sandbox-DcKAU-E3.js';
4
4
  import 'e2b';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as AISDKEvent, a as AgentApprovalMode, b as AgentAttachRequest, c as AgentCommandConfig, d as AgentCostData, e as AgentExecutionRequest, f as AgentLocalMcpConfig, g as AgentMcpConfig, h as AgentOptions, i as AgentOptionsBase, j as AgentOptionsMap, k as AgentPermissionDecision, l as AgentPermissionKind, m as AgentPermissionResponse, n as AgentProviderAdapter, o as AgentProviderName, p as AgentReasoningEffort, q as AgentRemoteMcpConfig, r as AgentResult, s as AgentRun, t as AgentRunConfig, u as AgentRunSink, v as AgentSetupRequest, w as AgentSkillConfig, x as AgentSubAgentConfig, y as AgentUserAnswer, z as AgentUserQuestion, B as AttachedRun, C as ClaudeCodeAgentOptions, D as ClaudeCodeHookConfig, E as ClaudeCodeHookEvent, F as ClaudeCodeHookHandler, G as ClaudeCodeHookMatcherGroup, H as ClaudeCodeHooksConfig, I as ClaudeCodeProviderOptions, J as CodexAgentOptions, K as CodexCommandHook, L as CodexHookEvent, M as CodexHookMatcherGroup, N as CodexHooksConfig, O as CodexModelProviderConfig, P as CodexProviderOptions, Q as DataContent, R as EmbeddedSkillConfig, S as FilePart, T as ImagePart, U as MessageCompletedEvent, V as MessageInjectedEvent, W as MessageStartedEvent, X as NativePlanEvent, Y as NormalizedAgentEvent, Z as NormalizedAgentEventBase, _ as NormalizedAgentEventType, $ as OpenCodeAgentOptions, a0 as OpenCodePluginConfig, a1 as OpenCodePluginEvent, a2 as OpenCodePluginHookConfig, a3 as OpenCodeProviderOptions, a4 as OpenRouterPlugin, a5 as PermissionRequestedEvent, a6 as PermissionResolvedEvent, a7 as RawAgentEvent, a8 as ReasoningDeltaEvent, a9 as RepoSkillConfig, aa as RunCancelledEvent, ab as RunCompletedEvent, ac as RunErrorEvent, ad as RunStartedEvent, ae as SetupLayout, af as TextDeltaEvent, ag as TextPart, ah as ToolCallCompletedEvent, ai as ToolCallDeltaEvent, aj as ToolCallStartedEvent, ak as UserContent, al as UserContentPart, am as createNormalizedEvent, an as normalizeRawAgentEvent, ao as toAISDKEvent, ap as toAISDKStream } from './types-BQ-_AUfY.js';
1
+ export { A as AISDKEvent, a as AgentApprovalMode, b as AgentAttachRequest, c as AgentCommandConfig, d as AgentCostData, e as AgentExecutionRequest, f as AgentLocalMcpConfig, g as AgentMcpConfig, h as AgentOptions, i as AgentOptionsBase, j as AgentOptionsMap, k as AgentPermissionDecision, l as AgentPermissionKind, m as AgentPermissionResponse, n as AgentProviderAdapter, o as AgentProviderName, p as AgentReasoningEffort, q as AgentRemoteMcpConfig, r as AgentResult, s as AgentRun, t as AgentRunConfig, u as AgentRunSink, v as AgentSetupRequest, w as AgentSkillConfig, x as AgentSubAgentConfig, y as AgentUserAnswer, z as AgentUserQuestion, B as AttachedRun, C as BackgroundTask, D as BackgroundTasksEvent, E as ClaudeCodeAgentOptions, F as ClaudeCodeHookConfig, G as ClaudeCodeHookEvent, H as ClaudeCodeHookHandler, I as ClaudeCodeHookMatcherGroup, J as ClaudeCodeHooksConfig, K as ClaudeCodeProviderOptions, L as CodexAgentOptions, M as CodexCommandHook, N as CodexHookEvent, O as CodexHookMatcherGroup, P as CodexHooksConfig, Q as CodexModelProviderConfig, R as CodexProviderOptions, S as DataContent, T as EmbeddedSkillConfig, U as FilePart, V as ImagePart, W as MessageCompletedEvent, X as MessageInjectedEvent, Y as MessageStartedEvent, Z as NativePlanEvent, _ as NormalizedAgentEvent, $ as NormalizedAgentEventBase, a0 as NormalizedAgentEventType, a1 as OpenCodeAgentOptions, a2 as OpenCodePluginConfig, a3 as OpenCodePluginEvent, a4 as OpenCodePluginHookConfig, a5 as OpenCodeProviderOptions, a6 as OpenRouterPlugin, a7 as PermissionRequestedEvent, a8 as PermissionResolvedEvent, a9 as RawAgentEvent, aa as ReasoningDeltaEvent, ab as RepoSkillConfig, ac as RunCancelledEvent, ad as RunCompletedEvent, ae as RunErrorEvent, af as RunStartedEvent, ag as SetupLayout, ah as TextDeltaEvent, ai as TextPart, aj as ToolCallCompletedEvent, ak as ToolCallDeltaEvent, al as ToolCallStartedEvent, am as UserContent, an as UserContentPart, ao as createNormalizedEvent, ap as normalizeRawAgentEvent, aq as toAISDKEvent, ar as toAISDKStream } from './types-VT1LMbLW.js';
2
2
  export { AGENT_RESERVED_PORTS, Agent, HarnessCapabilities, HarnessCommand, agentboxRoot, collectAllAgentReservedPorts, getAgentLayout, harnessCapabilities, resolveHarnessCommand } from './agents/index.js';
3
3
  export { A as AsyncCommandHandle, C as CommandEvent, a as CommandOptions, b as CommandResult, D as DaytonaProviderOptions, c as DaytonaSandboxOptions, E as E2bProviderOptions, d as E2bSandboxOptions, G as GitCloneOptions, L as LocalDockerProviderOptions, e as LocalDockerSandboxOptions, M as ModalProviderOptions, f as ModalSandboxOptions, S as Sandbox, g as SandboxDescriptor, h as SandboxListOptions, i as SandboxOptions, j as SandboxOptionsBase, k as SandboxOptionsMap, l as SandboxProviderName, m as SandboxRaw, n as SandboxRawMap, o as SandboxResourceSpec, T as TarballEntry, V as VercelGitSource, p as VercelProviderOptions, q as VercelSandboxOptions } from './Sandbox-DcKAU-E3.js';
4
4
  export { SandboxAdapter, buildGitCloneCommand } from './sandboxes/index.js';
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  getAgentLayout,
5
5
  harnessCapabilities,
6
6
  resolveHarnessCommand
7
- } from "./chunk-BO4J4KSM.js";
7
+ } from "./chunk-4DADE7TF.js";
8
8
  import {
9
9
  ProviderLogAssembler,
10
10
  createNormalizedEvent,
@@ -9,7 +9,7 @@ interface RawAgentEvent<TPayload = unknown> {
9
9
  payload: TPayload;
10
10
  }
11
11
 
12
- type NormalizedAgentEventType = "plan.completed" | "run.started" | "message.started" | "message.injected" | "text.delta" | "reasoning.delta" | "tool.call.started" | "tool.call.delta" | "tool.call.completed" | "permission.requested" | "permission.resolved" | "message.completed" | "run.completed" | "run.cancelled" | "run.error";
12
+ type NormalizedAgentEventType = "plan.completed" | "run.started" | "message.started" | "message.injected" | "text.delta" | "reasoning.delta" | "tool.call.started" | "tool.call.delta" | "tool.call.completed" | "permission.requested" | "permission.resolved" | "message.completed" | "background.tasks" | "run.completed" | "run.cancelled" | "run.error";
13
13
  interface NormalizedAgentEventBase {
14
14
  provider: string;
15
15
  runId: string;
@@ -96,6 +96,21 @@ interface MessageCompletedEvent extends NormalizedAgentEventBase {
96
96
  */
97
97
  messageId?: string;
98
98
  }
99
+ /** Work the harness left running past its turn (background shell, monitor,
100
+ * background subagent, scheduled wakeup). */
101
+ interface BackgroundTask {
102
+ id: string;
103
+ /** Harness task type, e.g. `local_bash`, `local_agent`, `scheduled_wakeup`. */
104
+ type: string;
105
+ description: string;
106
+ }
107
+ interface BackgroundTasksEvent extends NormalizedAgentEventBase {
108
+ type: "background.tasks";
109
+ /** Every live background task after the change (replace semantics). */
110
+ tasks: BackgroundTask[];
111
+ /** True once the harness ended its turn and the run stays open only for these tasks. */
112
+ waiting: boolean;
113
+ }
99
114
  interface RunCompletedEvent extends NormalizedAgentEventBase {
100
115
  type: "run.completed";
101
116
  text?: string;
@@ -112,7 +127,7 @@ interface NativePlanEvent extends NormalizedAgentEventBase {
112
127
  type: "plan.completed";
113
128
  text: string;
114
129
  }
115
- type NormalizedAgentEvent = NativePlanEvent | RunStartedEvent | MessageStartedEvent | MessageInjectedEvent | TextDeltaEvent | ReasoningDeltaEvent | ToolCallStartedEvent | ToolCallDeltaEvent | ToolCallCompletedEvent | PermissionRequestedEvent | PermissionResolvedEvent | MessageCompletedEvent | RunCompletedEvent | RunCancelledEvent | RunErrorEvent;
130
+ type NormalizedAgentEvent = NativePlanEvent | RunStartedEvent | MessageStartedEvent | MessageInjectedEvent | TextDeltaEvent | ReasoningDeltaEvent | ToolCallStartedEvent | ToolCallDeltaEvent | ToolCallCompletedEvent | PermissionRequestedEvent | PermissionResolvedEvent | MessageCompletedEvent | BackgroundTasksEvent | RunCompletedEvent | RunCancelledEvent | RunErrorEvent;
116
131
  declare function createNormalizedEvent<TType extends NormalizedAgentEventType>(type: TType, base: Omit<NormalizedAgentEventBase, "type" | "timestamp"> & {
117
132
  timestamp?: string;
118
133
  }, extra?: Record<string, unknown>): NormalizedAgentEvent;
@@ -362,7 +377,8 @@ interface FilePart {
362
377
  }
363
378
  type UserContentPart = TextPart | ImagePart | FilePart;
364
379
  type UserContent = string | UserContentPart[];
365
- type AgentReasoningEffort = "low" | "medium" | "high" | "xhigh";
380
+ /** `max` and `ultra` are Codex-only and require a supporting model/runtime. */
381
+ type AgentReasoningEffort = "low" | "medium" | "high" | "xhigh" | "max" | "ultra";
366
382
  interface AgentRunConfig {
367
383
  input: UserContent;
368
384
  runId?: string;
@@ -467,6 +483,24 @@ interface AgentOptionsBase {
467
483
  * in particular are subject to upstream support.
468
484
  */
469
485
  customHeaders?: Record<string, string>;
486
+ /**
487
+ * Max time a run may spend waiting, after turn ends, for background work
488
+ * (background shells, monitors, background subagents, scheduled wakeups)
489
+ * that will wake the model again. Counted across the whole run — time
490
+ * spent in follow-up turns does not count — so re-arming a monitor on
491
+ * every wake-up cannot extend it. Default 30 minutes. `0` restores the
492
+ * legacy behaviour (settle at the first turn end and abandon background
493
+ * work); `Infinity` waits forever. On expiry the tasks are stopped
494
+ * best-effort and the run completes with the last turn's text. Progress
495
+ * is reported through `background.tasks` events.
496
+ * For Codex, only gaps between active native goal turns use this budget
497
+ * (also bounded by the idle grace). Ordinary turns finish on turn/completed,
498
+ * regardless of live shell processes. No synthetic command-result turn is
499
+ * injected, and goal-wait expiry does not terminate remote shell processes.
500
+ * Inactive goals settle after their final turn; clearing a goal while idle
501
+ * settles immediately.
502
+ */
503
+ backgroundTaskTimeoutMs?: number;
470
504
  approvalMode?: AgentApprovalMode;
471
505
  /** Route questions and plan approvals to the caller even with automatic tool approval. */
472
506
  interactiveQuestions?: boolean;
@@ -478,6 +512,10 @@ interface AgentOptionsBase {
478
512
  commands?: AgentCommandConfig[];
479
513
  }
480
514
  interface CodexProviderOptions {
515
+ /** Native service tier; "default" explicitly selects standard speed. */
516
+ serviceTier?: string;
517
+ /** Explicit policy for new, resumed, and forked native sessions. */
518
+ approvalPolicy?: "untrusted" | "on-request" | "never";
481
519
  /** Managed host execution defaults to read-only; native configuration uses the CLI's settings. */
482
520
  sandboxMode?: "read-only" | "workspace-write" | "danger-full-access";
483
521
  /** Additional task worktrees permitted by native Codex's write sandbox. */
@@ -535,6 +573,8 @@ interface OpenCodeProviderOptions {
535
573
  plugins?: OpenCodePluginConfig[];
536
574
  }
537
575
  interface ClaudeCodeProviderOptions {
576
+ /** Request fast mode explicitly; false overrides inherited fast settings. */
577
+ fastMode?: boolean;
538
578
  binary?: string;
539
579
  args?: string[];
540
580
  hooks?: ClaudeCodeHooksConfig;
@@ -782,4 +822,4 @@ interface AgentProviderAdapter<P extends AgentProviderName = AgentProviderName>
782
822
  attachSendMessage(request: AgentAttachRequest<P>, content: UserContent): Promise<void>;
783
823
  }
784
824
 
785
- export { type OpenCodeAgentOptions as $, type AISDKEvent as A, type AttachedRun as B, type ClaudeCodeAgentOptions as C, type ClaudeCodeHookConfig as D, type ClaudeCodeHookEvent as E, type ClaudeCodeHookHandler as F, type ClaudeCodeHookMatcherGroup as G, type ClaudeCodeHooksConfig as H, type ClaudeCodeProviderOptions as I, type CodexAgentOptions as J, type CodexCommandHook as K, type CodexHookEvent as L, type CodexHookMatcherGroup as M, type CodexHooksConfig as N, type CodexModelProviderConfig as O, type CodexProviderOptions as P, type DataContent as Q, type EmbeddedSkillConfig as R, type FilePart as S, type ImagePart as T, type MessageCompletedEvent as U, type MessageInjectedEvent as V, type MessageStartedEvent as W, type NativePlanEvent as X, type NormalizedAgentEvent as Y, type NormalizedAgentEventBase as Z, type NormalizedAgentEventType as _, type AgentApprovalMode as a, type OpenCodePluginConfig as a0, type OpenCodePluginEvent as a1, type OpenCodePluginHookConfig as a2, type OpenCodeProviderOptions as a3, type OpenRouterPlugin as a4, type PermissionRequestedEvent as a5, type PermissionResolvedEvent as a6, type RawAgentEvent as a7, type ReasoningDeltaEvent as a8, type RepoSkillConfig as a9, type RunCancelledEvent as aa, type RunCompletedEvent as ab, type RunErrorEvent as ac, type RunStartedEvent as ad, type SetupLayout as ae, type TextDeltaEvent as af, type TextPart as ag, type ToolCallCompletedEvent as ah, type ToolCallDeltaEvent as ai, type ToolCallStartedEvent as aj, type UserContent as ak, type UserContentPart as al, createNormalizedEvent as am, normalizeRawAgentEvent as an, toAISDKEvent as ao, toAISDKStream as ap, type AgentAttachRequest as b, type AgentCommandConfig as c, type AgentCostData as d, type AgentExecutionRequest as e, type AgentLocalMcpConfig as f, type AgentMcpConfig as g, type AgentOptions as h, type AgentOptionsBase as i, type AgentOptionsMap as j, type AgentPermissionDecision as k, type AgentPermissionKind as l, type AgentPermissionResponse as m, type AgentProviderAdapter as n, type AgentProviderName as o, type AgentReasoningEffort as p, type AgentRemoteMcpConfig as q, type AgentResult as r, type AgentRun as s, type AgentRunConfig as t, type AgentRunSink as u, type AgentSetupRequest as v, type AgentSkillConfig as w, type AgentSubAgentConfig as x, type AgentUserAnswer as y, type AgentUserQuestion as z };
825
+ export { type NormalizedAgentEventBase as $, type AISDKEvent as A, type AttachedRun as B, type BackgroundTask as C, type BackgroundTasksEvent as D, type ClaudeCodeAgentOptions as E, type ClaudeCodeHookConfig as F, type ClaudeCodeHookEvent as G, type ClaudeCodeHookHandler as H, type ClaudeCodeHookMatcherGroup as I, type ClaudeCodeHooksConfig as J, type ClaudeCodeProviderOptions as K, type CodexAgentOptions as L, type CodexCommandHook as M, type CodexHookEvent as N, type CodexHookMatcherGroup as O, type CodexHooksConfig as P, type CodexModelProviderConfig as Q, type CodexProviderOptions as R, type DataContent as S, type EmbeddedSkillConfig as T, type FilePart as U, type ImagePart as V, type MessageCompletedEvent as W, type MessageInjectedEvent as X, type MessageStartedEvent as Y, type NativePlanEvent as Z, type NormalizedAgentEvent as _, type AgentApprovalMode as a, type NormalizedAgentEventType as a0, type OpenCodeAgentOptions as a1, type OpenCodePluginConfig as a2, type OpenCodePluginEvent as a3, type OpenCodePluginHookConfig as a4, type OpenCodeProviderOptions as a5, type OpenRouterPlugin as a6, type PermissionRequestedEvent as a7, type PermissionResolvedEvent as a8, type RawAgentEvent as a9, type ReasoningDeltaEvent as aa, type RepoSkillConfig as ab, type RunCancelledEvent as ac, type RunCompletedEvent as ad, type RunErrorEvent as ae, type RunStartedEvent as af, type SetupLayout as ag, type TextDeltaEvent as ah, type TextPart as ai, type ToolCallCompletedEvent as aj, type ToolCallDeltaEvent as ak, type ToolCallStartedEvent as al, type UserContent as am, type UserContentPart as an, createNormalizedEvent as ao, normalizeRawAgentEvent as ap, toAISDKEvent as aq, toAISDKStream as ar, type AgentAttachRequest as b, type AgentCommandConfig as c, type AgentCostData as d, type AgentExecutionRequest as e, type AgentLocalMcpConfig as f, type AgentMcpConfig as g, type AgentOptions as h, type AgentOptionsBase as i, type AgentOptionsMap as j, type AgentPermissionDecision as k, type AgentPermissionKind as l, type AgentPermissionResponse as m, type AgentProviderAdapter as n, type AgentProviderName as o, type AgentReasoningEffort as p, type AgentRemoteMcpConfig as q, type AgentResult as r, type AgentRun as s, type AgentRunConfig as t, type AgentRunSink as u, type AgentSetupRequest as v, type AgentSkillConfig as w, type AgentSubAgentConfig as x, type AgentUserAnswer as y, type AgentUserQuestion as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentbox-sdk",
3
- "version": "0.1.508",
3
+ "version": "0.1.512",
4
4
  "description": "Swappable coding agents and sandbox providers for Bun and TypeScript.",
5
5
  "license": "MIT",
6
6
  "repository": {