zeitlich 0.2.33 → 0.2.35
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.
- package/README.md +17 -6
- package/dist/{activities-YBD5BaHh.d.ts → activities-BVI2lTwr.d.ts} +6 -4
- package/dist/{activities-fnX8-vhR.d.cts → activities-hd4aNnZE.d.cts} +6 -4
- package/dist/adapters/sandbox/bedrock/index.cjs +2 -0
- package/dist/adapters/sandbox/bedrock/index.cjs.map +1 -1
- package/dist/adapters/sandbox/bedrock/index.d.cts +4 -3
- package/dist/adapters/sandbox/bedrock/index.d.ts +4 -3
- package/dist/adapters/sandbox/bedrock/index.js +2 -0
- package/dist/adapters/sandbox/bedrock/index.js.map +1 -1
- package/dist/adapters/sandbox/bedrock/workflow.cjs +1 -0
- package/dist/adapters/sandbox/bedrock/workflow.cjs.map +1 -1
- package/dist/adapters/sandbox/bedrock/workflow.d.cts +2 -2
- package/dist/adapters/sandbox/bedrock/workflow.d.ts +2 -2
- package/dist/adapters/sandbox/bedrock/workflow.js +1 -0
- package/dist/adapters/sandbox/bedrock/workflow.js.map +1 -1
- package/dist/adapters/sandbox/daytona/index.cjs +2 -0
- package/dist/adapters/sandbox/daytona/index.cjs.map +1 -1
- package/dist/adapters/sandbox/daytona/index.d.cts +2 -1
- package/dist/adapters/sandbox/daytona/index.d.ts +2 -1
- package/dist/adapters/sandbox/daytona/index.js +2 -0
- package/dist/adapters/sandbox/daytona/index.js.map +1 -1
- package/dist/adapters/sandbox/daytona/workflow.cjs +1 -0
- package/dist/adapters/sandbox/daytona/workflow.cjs.map +1 -1
- package/dist/adapters/sandbox/daytona/workflow.d.cts +1 -1
- package/dist/adapters/sandbox/daytona/workflow.d.ts +1 -1
- package/dist/adapters/sandbox/daytona/workflow.js +1 -0
- package/dist/adapters/sandbox/daytona/workflow.js.map +1 -1
- package/dist/adapters/sandbox/e2b/index.cjs +3 -0
- package/dist/adapters/sandbox/e2b/index.cjs.map +1 -1
- package/dist/adapters/sandbox/e2b/index.d.cts +2 -1
- package/dist/adapters/sandbox/e2b/index.d.ts +2 -1
- package/dist/adapters/sandbox/e2b/index.js +3 -0
- package/dist/adapters/sandbox/e2b/index.js.map +1 -1
- package/dist/adapters/sandbox/e2b/workflow.cjs +1 -0
- package/dist/adapters/sandbox/e2b/workflow.cjs.map +1 -1
- package/dist/adapters/sandbox/e2b/workflow.d.cts +1 -1
- package/dist/adapters/sandbox/e2b/workflow.d.ts +1 -1
- package/dist/adapters/sandbox/e2b/workflow.js +1 -0
- package/dist/adapters/sandbox/e2b/workflow.js.map +1 -1
- package/dist/adapters/sandbox/inmemory/index.cjs +2 -0
- package/dist/adapters/sandbox/inmemory/index.cjs.map +1 -1
- package/dist/adapters/sandbox/inmemory/index.d.cts +2 -1
- package/dist/adapters/sandbox/inmemory/index.d.ts +2 -1
- package/dist/adapters/sandbox/inmemory/index.js +2 -0
- package/dist/adapters/sandbox/inmemory/index.js.map +1 -1
- package/dist/adapters/sandbox/inmemory/workflow.cjs +1 -0
- package/dist/adapters/sandbox/inmemory/workflow.cjs.map +1 -1
- package/dist/adapters/sandbox/inmemory/workflow.d.cts +1 -1
- package/dist/adapters/sandbox/inmemory/workflow.d.ts +1 -1
- package/dist/adapters/sandbox/inmemory/workflow.js +1 -0
- package/dist/adapters/sandbox/inmemory/workflow.js.map +1 -1
- package/dist/adapters/thread/anthropic/index.cjs +7 -2
- package/dist/adapters/thread/anthropic/index.cjs.map +1 -1
- package/dist/adapters/thread/anthropic/index.d.cts +5 -5
- package/dist/adapters/thread/anthropic/index.d.ts +5 -5
- package/dist/adapters/thread/anthropic/index.js +7 -2
- package/dist/adapters/thread/anthropic/index.js.map +1 -1
- package/dist/adapters/thread/anthropic/workflow.d.cts +5 -5
- package/dist/adapters/thread/anthropic/workflow.d.ts +5 -5
- package/dist/adapters/thread/google-genai/index.cjs +4 -3
- package/dist/adapters/thread/google-genai/index.cjs.map +1 -1
- package/dist/adapters/thread/google-genai/index.d.cts +5 -5
- package/dist/adapters/thread/google-genai/index.d.ts +5 -5
- package/dist/adapters/thread/google-genai/index.js +4 -3
- package/dist/adapters/thread/google-genai/index.js.map +1 -1
- package/dist/adapters/thread/google-genai/workflow.d.cts +5 -5
- package/dist/adapters/thread/google-genai/workflow.d.ts +5 -5
- package/dist/adapters/thread/langchain/index.cjs +4 -1
- package/dist/adapters/thread/langchain/index.cjs.map +1 -1
- package/dist/adapters/thread/langchain/index.d.cts +5 -5
- package/dist/adapters/thread/langchain/index.d.ts +5 -5
- package/dist/adapters/thread/langchain/index.js +4 -1
- package/dist/adapters/thread/langchain/index.js.map +1 -1
- package/dist/adapters/thread/langchain/workflow.d.cts +5 -5
- package/dist/adapters/thread/langchain/workflow.d.ts +5 -5
- package/dist/index.cjs +115 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -9
- package/dist/index.d.ts +10 -9
- package/dist/index.js +115 -31
- package/dist/index.js.map +1 -1
- package/dist/{proxy-CTCYWjkr.d.cts → proxy-7RnVaPdJ.d.cts} +1 -1
- package/dist/{proxy-Br4unLTC.d.ts → proxy-BjdFGPTm.d.ts} +1 -1
- package/dist/{thread-manager-DKWxHUzD.d.ts → thread-manager-BBzNgQWH.d.cts} +5 -2
- package/dist/{thread-manager-CUubPYPH.d.cts → thread-manager-CbpiGq1L.d.ts} +6 -3
- package/dist/{thread-manager-Cv_BR28i.d.cts → thread-manager-DjN5JYul.d.ts} +5 -2
- package/dist/{thread-manager-YJLoc1vH.d.ts → thread-manager-DzXm9eeI.d.cts} +6 -3
- package/dist/{types-Bpq5fDI5.d.cts → types-CADc5V_P.d.ts} +39 -24
- package/dist/{types-DUvEZSDe.d.cts → types-CBH54cwr.d.cts} +1 -1
- package/dist/{types-CheCTLeV.d.ts → types-DQ1l_gXL.d.cts} +39 -24
- package/dist/{types-AujBIMMn.d.cts → types-DxCpFNv_.d.cts} +4 -0
- package/dist/{types-AujBIMMn.d.ts → types-DxCpFNv_.d.ts} +4 -0
- package/dist/{types-NJDyMyUx.d.cts → types-Mc_4BCfT.d.cts} +3 -3
- package/dist/{types-DBk-C8zM.d.ts → types-wiGLvxWf.d.ts} +1 -1
- package/dist/{types-BxiT8w9d.d.ts → types-yiXmqedU.d.ts} +3 -3
- package/dist/{workflow-Od9vx5Jk.d.cts → workflow-DhtWRovz.d.cts} +3 -3
- package/dist/{workflow-D9nNERvs.d.ts → workflow-P2pTSfKu.d.ts} +3 -3
- package/dist/workflow.cjs +109 -31
- package/dist/workflow.cjs.map +1 -1
- package/dist/workflow.d.cts +3 -3
- package/dist/workflow.d.ts +3 -3
- package/dist/workflow.js +109 -31
- package/dist/workflow.js.map +1 -1
- package/package.json +1 -1
- package/src/adapters/sandbox/bedrock/index.ts +4 -0
- package/src/adapters/sandbox/bedrock/proxy.ts +1 -0
- package/src/adapters/sandbox/daytona/index.ts +4 -0
- package/src/adapters/sandbox/daytona/proxy.ts +1 -0
- package/src/adapters/sandbox/e2b/index.ts +4 -0
- package/src/adapters/sandbox/e2b/proxy.ts +1 -0
- package/src/adapters/sandbox/inmemory/index.ts +4 -0
- package/src/adapters/sandbox/inmemory/proxy.ts +1 -0
- package/src/adapters/thread/anthropic/activities.ts +2 -1
- package/src/adapters/thread/anthropic/thread-manager.ts +21 -9
- package/src/adapters/thread/google-genai/activities.ts +2 -1
- package/src/adapters/thread/google-genai/thread-manager.test.ts +1 -1
- package/src/adapters/thread/google-genai/thread-manager.ts +15 -7
- package/src/adapters/thread/langchain/activities.ts +2 -1
- package/src/adapters/thread/langchain/thread-manager.ts +12 -3
- package/src/lib/lifecycle.ts +7 -3
- package/src/lib/sandbox/manager.ts +7 -0
- package/src/lib/sandbox/types.ts +4 -0
- package/src/lib/session/session-edge-cases.integration.test.ts +194 -0
- package/src/lib/session/session.integration.test.ts +5 -0
- package/src/lib/session/session.ts +13 -1
- package/src/lib/session/types.ts +10 -2
- package/src/lib/state/manager.ts +2 -2
- package/src/lib/state/types.ts +2 -2
- package/src/lib/subagent/define.ts +1 -1
- package/src/lib/subagent/handler.ts +142 -32
- package/src/lib/subagent/index.ts +5 -1
- package/src/lib/subagent/signals.ts +8 -1
- package/src/lib/subagent/subagent.integration.test.ts +532 -25
- package/src/lib/subagent/types.ts +32 -15
- package/src/lib/subagent/workflow.ts +26 -13
- package/src/lib/thread/types.ts +2 -2
- package/src/lib/types.ts +1 -1
- package/src/lib/virtual-fs/manager.ts +1 -1
- package/src/lib/virtual-fs/types.ts +2 -2
- package/src/lib/virtual-fs/virtual-fs.test.ts +2 -2
- package/src/workflow.ts +0 -1
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import Redis from 'ioredis';
|
|
2
|
+
import { J as JsonValue } from './types-DQ1l_gXL.cjs';
|
|
2
3
|
import { MessageContent, StoredMessage, BaseMessage } from '@langchain/core/messages';
|
|
3
|
-
import { T as ThreadManagerHooks, P as ProviderThreadManager } from './types-
|
|
4
|
+
import { T as ThreadManagerHooks, P as ProviderThreadManager } from './types-Mc_4BCfT.cjs';
|
|
4
5
|
|
|
5
6
|
/** SDK-native content type for LangChain human messages */
|
|
6
7
|
type LangChainContent = string | MessageContent;
|
|
8
|
+
/** SDK-native content type for LangChain system messages */
|
|
9
|
+
type LangChainSystemContent = string | MessageContent;
|
|
7
10
|
type LangChainThreadManagerHooks = ThreadManagerHooks<StoredMessage, BaseMessage>;
|
|
8
11
|
interface LangChainThreadManagerConfig {
|
|
9
12
|
redis: Redis;
|
|
@@ -17,7 +20,7 @@ interface LangChainInvocationPayload {
|
|
|
17
20
|
messages: BaseMessage[];
|
|
18
21
|
}
|
|
19
22
|
/** Thread manager with LangChain StoredMessage convenience helpers */
|
|
20
|
-
interface LangChainThreadManager extends ProviderThreadManager<StoredMessage, LangChainContent> {
|
|
23
|
+
interface LangChainThreadManager extends ProviderThreadManager<StoredMessage, LangChainContent, JsonValue, LangChainSystemContent> {
|
|
21
24
|
appendAIMessage(id: string, content: string | MessageContent): Promise<void>;
|
|
22
25
|
prepareForInvocation(): Promise<LangChainInvocationPayload>;
|
|
23
26
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import Redis from 'ioredis';
|
|
2
2
|
import Anthropic from '@anthropic-ai/sdk';
|
|
3
|
-
import {
|
|
3
|
+
import { J as JsonValue } from './types-CADc5V_P.js';
|
|
4
|
+
import { T as ThreadManagerHooks, P as ProviderThreadManager } from './types-yiXmqedU.js';
|
|
4
5
|
|
|
5
6
|
/** SDK-native content type for Anthropic human messages */
|
|
6
7
|
type AnthropicContent = string | Anthropic.Messages.ContentBlockParam[];
|
|
8
|
+
/** SDK-native content type for Anthropic system prompts (supports cache_control blocks) */
|
|
9
|
+
type AnthropicSystemContent = string | Anthropic.Messages.TextBlockParam[];
|
|
7
10
|
/** A MessageParam with a unique ID for idempotent Redis storage */
|
|
8
11
|
interface StoredMessage {
|
|
9
12
|
id: string;
|
|
@@ -22,10 +25,10 @@ interface AnthropicThreadManagerConfig {
|
|
|
22
25
|
/** Prepared payload ready to send to the Anthropic API */
|
|
23
26
|
interface AnthropicInvocationPayload {
|
|
24
27
|
messages: Anthropic.Messages.MessageParam[];
|
|
25
|
-
system?: string;
|
|
28
|
+
system?: string | Anthropic.Messages.TextBlockParam[];
|
|
26
29
|
}
|
|
27
30
|
/** Thread manager with Anthropic MessageParam convenience helpers */
|
|
28
|
-
interface AnthropicThreadManager extends ProviderThreadManager<StoredMessage, AnthropicContent> {
|
|
31
|
+
interface AnthropicThreadManager extends ProviderThreadManager<StoredMessage, AnthropicContent, JsonValue, AnthropicSystemContent> {
|
|
29
32
|
appendAssistantMessage(id: string, content: Anthropic.Messages.ContentBlock[]): Promise<void>;
|
|
30
33
|
prepareForInvocation(): Promise<AnthropicInvocationPayload>;
|
|
31
34
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import Redis from 'ioredis';
|
|
2
|
+
import { J as JsonValue } from './types-CADc5V_P.js';
|
|
2
3
|
import { MessageContent, StoredMessage, BaseMessage } from '@langchain/core/messages';
|
|
3
|
-
import { T as ThreadManagerHooks, P as ProviderThreadManager } from './types-
|
|
4
|
+
import { T as ThreadManagerHooks, P as ProviderThreadManager } from './types-yiXmqedU.js';
|
|
4
5
|
|
|
5
6
|
/** SDK-native content type for LangChain human messages */
|
|
6
7
|
type LangChainContent = string | MessageContent;
|
|
8
|
+
/** SDK-native content type for LangChain system messages */
|
|
9
|
+
type LangChainSystemContent = string | MessageContent;
|
|
7
10
|
type LangChainThreadManagerHooks = ThreadManagerHooks<StoredMessage, BaseMessage>;
|
|
8
11
|
interface LangChainThreadManagerConfig {
|
|
9
12
|
redis: Redis;
|
|
@@ -17,7 +20,7 @@ interface LangChainInvocationPayload {
|
|
|
17
20
|
messages: BaseMessage[];
|
|
18
21
|
}
|
|
19
22
|
/** Thread manager with LangChain StoredMessage convenience helpers */
|
|
20
|
-
interface LangChainThreadManager extends ProviderThreadManager<StoredMessage, LangChainContent> {
|
|
23
|
+
interface LangChainThreadManager extends ProviderThreadManager<StoredMessage, LangChainContent, JsonValue, LangChainSystemContent> {
|
|
21
24
|
appendAIMessage(id: string, content: string | MessageContent): Promise<void>;
|
|
22
25
|
prepareForInvocation(): Promise<LangChainInvocationPayload>;
|
|
23
26
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import Redis from 'ioredis';
|
|
2
2
|
import Anthropic from '@anthropic-ai/sdk';
|
|
3
|
-
import {
|
|
3
|
+
import { J as JsonValue } from './types-DQ1l_gXL.cjs';
|
|
4
|
+
import { T as ThreadManagerHooks, P as ProviderThreadManager } from './types-Mc_4BCfT.cjs';
|
|
4
5
|
|
|
5
6
|
/** SDK-native content type for Anthropic human messages */
|
|
6
7
|
type AnthropicContent = string | Anthropic.Messages.ContentBlockParam[];
|
|
8
|
+
/** SDK-native content type for Anthropic system prompts (supports cache_control blocks) */
|
|
9
|
+
type AnthropicSystemContent = string | Anthropic.Messages.TextBlockParam[];
|
|
7
10
|
/** A MessageParam with a unique ID for idempotent Redis storage */
|
|
8
11
|
interface StoredMessage {
|
|
9
12
|
id: string;
|
|
@@ -22,10 +25,10 @@ interface AnthropicThreadManagerConfig {
|
|
|
22
25
|
/** Prepared payload ready to send to the Anthropic API */
|
|
23
26
|
interface AnthropicInvocationPayload {
|
|
24
27
|
messages: Anthropic.Messages.MessageParam[];
|
|
25
|
-
system?: string;
|
|
28
|
+
system?: string | Anthropic.Messages.TextBlockParam[];
|
|
26
29
|
}
|
|
27
30
|
/** Thread manager with Anthropic MessageParam convenience helpers */
|
|
28
|
-
interface AnthropicThreadManager extends ProviderThreadManager<StoredMessage, AnthropicContent> {
|
|
31
|
+
interface AnthropicThreadManager extends ProviderThreadManager<StoredMessage, AnthropicContent, JsonValue, AnthropicSystemContent> {
|
|
29
32
|
appendAssistantMessage(id: string, content: Anthropic.Messages.ContentBlock[]): Promise<void>;
|
|
30
33
|
prepareForInvocation(): Promise<AnthropicInvocationPayload>;
|
|
31
34
|
}
|
|
@@ -2,7 +2,7 @@ import { Duration } from '@temporalio/common';
|
|
|
2
2
|
import { ActivityFunctionWithOptions, QueryDefinition, ActivityInterfaceFor } from '@temporalio/workflow';
|
|
3
3
|
import { UpdateDefinition } from '@temporalio/common/lib/interfaces';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { a as SandboxFileSystem, F as FileStat, D as DirentEntry, g as SandboxOps } from './types-
|
|
5
|
+
import { a as SandboxFileSystem, F as FileStat, D as DirentEntry, g as SandboxOps } from './types-DxCpFNv_.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* A tool definition with a name, description, and Zod schema for arguments.
|
|
@@ -424,9 +424,9 @@ interface AgentStateManager<TCustom extends JsonSerializable<TCustom>> {
|
|
|
424
424
|
/** Get current turns */
|
|
425
425
|
getTurns(): number;
|
|
426
426
|
/** Get the system prompt */
|
|
427
|
-
getSystemPrompt():
|
|
427
|
+
getSystemPrompt(): unknown;
|
|
428
428
|
/** Set the system prompt */
|
|
429
|
-
setSystemPrompt(newSystemPrompt:
|
|
429
|
+
setSystemPrompt(newSystemPrompt: unknown): void;
|
|
430
430
|
/** Get a custom state value by key */
|
|
431
431
|
get<K extends keyof TCustom>(key: K): TCustom[K];
|
|
432
432
|
/** Set a custom state value by key */
|
|
@@ -565,11 +565,11 @@ interface VirtualFsOps<TCtx = unknown, TMeta = FileEntryMetadata> {
|
|
|
565
565
|
* @example
|
|
566
566
|
* ```typescript
|
|
567
567
|
* type Ops = PrefixedVirtualFsOps<"codingAgent">;
|
|
568
|
-
* // → {
|
|
568
|
+
* // → { virtualFsCodingAgentResolveFileTree: ... }
|
|
569
569
|
* ```
|
|
570
570
|
*/
|
|
571
571
|
type PrefixedVirtualFsOps<TPrefix extends string, TCtx = unknown, TMeta = FileEntryMetadata> = {
|
|
572
|
-
[K in keyof VirtualFsOps<TCtx, TMeta> as
|
|
572
|
+
[K in keyof VirtualFsOps<TCtx, TMeta> as `virtualFs${Capitalize<TPrefix>}${Capitalize<K & string>}`]: VirtualFsOps<TCtx, TMeta>[K];
|
|
573
573
|
};
|
|
574
574
|
/**
|
|
575
575
|
* The portion of workflow `AgentState` that the virtual filesystem reads via
|
|
@@ -608,7 +608,7 @@ interface BaseAgentState {
|
|
|
608
608
|
/** In-memory file contents keyed by path, bypassing the resolver (e.g. skill resources). */
|
|
609
609
|
inlineFiles?: Record<string, string>;
|
|
610
610
|
virtualFsCtx?: unknown;
|
|
611
|
-
systemPrompt?:
|
|
611
|
+
systemPrompt?: unknown;
|
|
612
612
|
totalInputTokens: number;
|
|
613
613
|
totalOutputTokens: number;
|
|
614
614
|
cachedWriteTokens: number;
|
|
@@ -803,8 +803,9 @@ type ThreadInit = {
|
|
|
803
803
|
* - `"new"` — create a fresh sandbox. Optionally pass `ctx` to
|
|
804
804
|
* have the {@link SandboxManager}'s resolver produce creation options
|
|
805
805
|
* (e.g. initial files) from workflow arguments.
|
|
806
|
-
* - `"continue"` —
|
|
807
|
-
*
|
|
806
|
+
* - `"continue"` — take ownership of an existing sandbox (paused or running).
|
|
807
|
+
* Paused sandboxes are automatically resumed. The shutdown policy applies
|
|
808
|
+
* on exit.
|
|
808
809
|
* - `"fork"` — fork from an existing (or paused) sandbox; a new sandbox is
|
|
809
810
|
* created and owned by this session.
|
|
810
811
|
* - `"inherit"` — use a sandbox owned by someone else (e.g. a parent agent).
|
|
@@ -837,8 +838,10 @@ type SandboxShutdown = "destroy" | "pause" | "keep";
|
|
|
837
838
|
* Includes all base {@link SandboxShutdown} values plus:
|
|
838
839
|
* - `"pause-until-parent-close"` — pause the sandbox on exit, then wait for
|
|
839
840
|
* the parent workflow to signal when to destroy it.
|
|
841
|
+
* - `"keep-until-parent-close"` — leave the sandbox running on exit, then
|
|
842
|
+
* wait for the parent workflow to signal when to destroy it.
|
|
840
843
|
*/
|
|
841
|
-
type SubagentSandboxShutdown = SandboxShutdown | "pause-until-parent-close";
|
|
844
|
+
type SubagentSandboxShutdown = SandboxShutdown | "pause-until-parent-close" | "keep-until-parent-close";
|
|
842
845
|
|
|
843
846
|
/** ToolHandlerResponse with threadId required (subagents must always surface their thread) */
|
|
844
847
|
type SubagentHandlerResponse<TResult = null, TToolResponse = JsonValue> = ToolHandlerResponse<TResult, TToolResponse> & {
|
|
@@ -872,16 +875,23 @@ type SubagentContext = Record<string, unknown> | (() => Record<string, unknown>)
|
|
|
872
875
|
/**
|
|
873
876
|
* Sandbox configuration for a subagent.
|
|
874
877
|
*
|
|
875
|
-
* String shorthands:
|
|
876
878
|
* - `"none"` — no sandbox (default).
|
|
877
|
-
* - `"inherit"` — reuse the parent's sandbox
|
|
878
|
-
*
|
|
879
|
-
*
|
|
880
|
-
*
|
|
881
|
-
*
|
|
882
|
-
|
|
883
|
-
|
|
879
|
+
* - `{ source: "inherit", continuation }` — reuse the parent's sandbox.
|
|
880
|
+
* `continuation: "continue"` shares the parent sandbox directly;
|
|
881
|
+
* `continuation: "fork"` forks from the parent on every call.
|
|
882
|
+
* - `{ source: "own", init?, continuation }` — the child gets its own sandbox.
|
|
883
|
+
* `init: "per-call"` (default) creates fresh each call (thread continuation
|
|
884
|
+
* uses the previous sandbox). `init: "once"` creates on the first call and
|
|
885
|
+
* stores it for all subsequent calls.
|
|
886
|
+
*/
|
|
887
|
+
type SubagentSandboxConfig = "none" | {
|
|
888
|
+
source: "inherit";
|
|
889
|
+
continuation: "continue" | "fork";
|
|
890
|
+
shutdown?: SubagentSandboxShutdown;
|
|
891
|
+
} | {
|
|
884
892
|
source: "own";
|
|
893
|
+
init?: "per-call" | "once";
|
|
894
|
+
continuation: "continue" | "fork";
|
|
885
895
|
shutdown?: SubagentSandboxShutdown;
|
|
886
896
|
};
|
|
887
897
|
/**
|
|
@@ -919,9 +929,6 @@ interface SubagentConfig<TResult extends z.ZodType = z.ZodType> {
|
|
|
919
929
|
/**
|
|
920
930
|
* Sandbox strategy for this subagent.
|
|
921
931
|
*
|
|
922
|
-
* String shorthands: `"none"` (default) | `"inherit"` | `"own"`.
|
|
923
|
-
* Object form: `{ source: "own", shutdown?: SubagentSandboxShutdown }`.
|
|
924
|
-
*
|
|
925
932
|
* @see {@link SubagentSandboxConfig}
|
|
926
933
|
*/
|
|
927
934
|
sandbox?: SubagentSandboxConfig;
|
|
@@ -959,10 +966,11 @@ interface SubagentHooks<TArgs = unknown, TResult = unknown> {
|
|
|
959
966
|
* Extended response from the subagent `fn` — includes optional cleanup callbacks
|
|
960
967
|
* stripped before signaling the parent.
|
|
961
968
|
*
|
|
962
|
-
* When `TSandboxShutdown` is `"pause-until-parent-close"
|
|
963
|
-
* and `sandboxId` become
|
|
969
|
+
* When `TSandboxShutdown` is `"pause-until-parent-close"` or
|
|
970
|
+
* `"keep-until-parent-close"`, both `destroySandbox` and `sandboxId` become
|
|
971
|
+
* required so the parent can coordinate cleanup.
|
|
964
972
|
*/
|
|
965
|
-
type SubagentFnResult<TResult = null, TSandboxShutdown extends SubagentSandboxShutdown = SubagentSandboxShutdown> = SubagentHandlerResponse<TResult> & (TSandboxShutdown extends "pause-until-parent-close" ? {
|
|
973
|
+
type SubagentFnResult<TResult = null, TSandboxShutdown extends SubagentSandboxShutdown = SubagentSandboxShutdown> = SubagentHandlerResponse<TResult> & (TSandboxShutdown extends "pause-until-parent-close" | "keep-until-parent-close" ? {
|
|
966
974
|
destroySandbox: () => Promise<void>;
|
|
967
975
|
sandboxId: string;
|
|
968
976
|
} : {
|
|
@@ -980,6 +988,8 @@ interface SubagentSessionInput {
|
|
|
980
988
|
sandbox?: SandboxInit;
|
|
981
989
|
/** Sandbox shutdown policy (default: "destroy") */
|
|
982
990
|
sandboxShutdown?: SubagentSandboxShutdown;
|
|
991
|
+
/** Called by the session as soon as the sandbox is created, before the agent loop starts. */
|
|
992
|
+
onSandboxReady?: (sandboxId: string) => void;
|
|
983
993
|
}
|
|
984
994
|
|
|
985
995
|
/**
|
|
@@ -1082,7 +1092,7 @@ interface ThreadOps<TContent = string> {
|
|
|
1082
1092
|
/** Append the model's response to the thread */
|
|
1083
1093
|
appendAgentMessage(threadId: string, id: string, message: unknown, threadKey?: string): Promise<void>;
|
|
1084
1094
|
/** Append a system message to the thread */
|
|
1085
|
-
appendSystemMessage(threadId: string, id: string, content:
|
|
1095
|
+
appendSystemMessage(threadId: string, id: string, content: unknown, threadKey?: string): Promise<void>;
|
|
1086
1096
|
/** Copy all messages from sourceThreadId into a new thread at targetThreadId */
|
|
1087
1097
|
forkThread(sourceThreadId: string, targetThreadId: string, threadKey?: string): Promise<void>;
|
|
1088
1098
|
}
|
|
@@ -1186,6 +1196,11 @@ interface SessionConfig<T extends ToolMap, M = unknown, TContent = string> {
|
|
|
1186
1196
|
* Has no effect when the sandbox is inherited (`sandbox.mode === "inherit"`).
|
|
1187
1197
|
*/
|
|
1188
1198
|
sandboxShutdown?: SubagentSandboxShutdown;
|
|
1199
|
+
/**
|
|
1200
|
+
* Called as soon as the sandbox is created (or resumed/forked), before the
|
|
1201
|
+
* agent loop starts. Useful for signalling sandbox readiness to a parent.
|
|
1202
|
+
*/
|
|
1203
|
+
onSandboxReady?: (sandboxId: string) => void;
|
|
1189
1204
|
virtualFsOps?: VirtualFsOps;
|
|
1190
1205
|
/**
|
|
1191
1206
|
* Virtual filesystem configuration (optional — independent of sandbox).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as SandboxFileSystem, F as FileStat, D as DirentEntry, S as Sandbox, d as SandboxCreateOptions } from './types-
|
|
1
|
+
import { a as SandboxFileSystem, F as FileStat, D as DirentEntry, S as Sandbox, d as SandboxCreateOptions } from './types-DxCpFNv_.cjs';
|
|
2
2
|
import { BedrockAgentCoreClient, BedrockAgentCoreClientConfig } from '@aws-sdk/client-bedrock-agentcore';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -2,7 +2,7 @@ import { Duration } from '@temporalio/common';
|
|
|
2
2
|
import { ActivityFunctionWithOptions, QueryDefinition, ActivityInterfaceFor } from '@temporalio/workflow';
|
|
3
3
|
import { UpdateDefinition } from '@temporalio/common/lib/interfaces';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { a as SandboxFileSystem, F as FileStat, D as DirentEntry, g as SandboxOps } from './types-
|
|
5
|
+
import { a as SandboxFileSystem, F as FileStat, D as DirentEntry, g as SandboxOps } from './types-DxCpFNv_.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* A tool definition with a name, description, and Zod schema for arguments.
|
|
@@ -424,9 +424,9 @@ interface AgentStateManager<TCustom extends JsonSerializable<TCustom>> {
|
|
|
424
424
|
/** Get current turns */
|
|
425
425
|
getTurns(): number;
|
|
426
426
|
/** Get the system prompt */
|
|
427
|
-
getSystemPrompt():
|
|
427
|
+
getSystemPrompt(): unknown;
|
|
428
428
|
/** Set the system prompt */
|
|
429
|
-
setSystemPrompt(newSystemPrompt:
|
|
429
|
+
setSystemPrompt(newSystemPrompt: unknown): void;
|
|
430
430
|
/** Get a custom state value by key */
|
|
431
431
|
get<K extends keyof TCustom>(key: K): TCustom[K];
|
|
432
432
|
/** Set a custom state value by key */
|
|
@@ -565,11 +565,11 @@ interface VirtualFsOps<TCtx = unknown, TMeta = FileEntryMetadata> {
|
|
|
565
565
|
* @example
|
|
566
566
|
* ```typescript
|
|
567
567
|
* type Ops = PrefixedVirtualFsOps<"codingAgent">;
|
|
568
|
-
* // → {
|
|
568
|
+
* // → { virtualFsCodingAgentResolveFileTree: ... }
|
|
569
569
|
* ```
|
|
570
570
|
*/
|
|
571
571
|
type PrefixedVirtualFsOps<TPrefix extends string, TCtx = unknown, TMeta = FileEntryMetadata> = {
|
|
572
|
-
[K in keyof VirtualFsOps<TCtx, TMeta> as
|
|
572
|
+
[K in keyof VirtualFsOps<TCtx, TMeta> as `virtualFs${Capitalize<TPrefix>}${Capitalize<K & string>}`]: VirtualFsOps<TCtx, TMeta>[K];
|
|
573
573
|
};
|
|
574
574
|
/**
|
|
575
575
|
* The portion of workflow `AgentState` that the virtual filesystem reads via
|
|
@@ -608,7 +608,7 @@ interface BaseAgentState {
|
|
|
608
608
|
/** In-memory file contents keyed by path, bypassing the resolver (e.g. skill resources). */
|
|
609
609
|
inlineFiles?: Record<string, string>;
|
|
610
610
|
virtualFsCtx?: unknown;
|
|
611
|
-
systemPrompt?:
|
|
611
|
+
systemPrompt?: unknown;
|
|
612
612
|
totalInputTokens: number;
|
|
613
613
|
totalOutputTokens: number;
|
|
614
614
|
cachedWriteTokens: number;
|
|
@@ -803,8 +803,9 @@ type ThreadInit = {
|
|
|
803
803
|
* - `"new"` — create a fresh sandbox. Optionally pass `ctx` to
|
|
804
804
|
* have the {@link SandboxManager}'s resolver produce creation options
|
|
805
805
|
* (e.g. initial files) from workflow arguments.
|
|
806
|
-
* - `"continue"` —
|
|
807
|
-
*
|
|
806
|
+
* - `"continue"` — take ownership of an existing sandbox (paused or running).
|
|
807
|
+
* Paused sandboxes are automatically resumed. The shutdown policy applies
|
|
808
|
+
* on exit.
|
|
808
809
|
* - `"fork"` — fork from an existing (or paused) sandbox; a new sandbox is
|
|
809
810
|
* created and owned by this session.
|
|
810
811
|
* - `"inherit"` — use a sandbox owned by someone else (e.g. a parent agent).
|
|
@@ -837,8 +838,10 @@ type SandboxShutdown = "destroy" | "pause" | "keep";
|
|
|
837
838
|
* Includes all base {@link SandboxShutdown} values plus:
|
|
838
839
|
* - `"pause-until-parent-close"` — pause the sandbox on exit, then wait for
|
|
839
840
|
* the parent workflow to signal when to destroy it.
|
|
841
|
+
* - `"keep-until-parent-close"` — leave the sandbox running on exit, then
|
|
842
|
+
* wait for the parent workflow to signal when to destroy it.
|
|
840
843
|
*/
|
|
841
|
-
type SubagentSandboxShutdown = SandboxShutdown | "pause-until-parent-close";
|
|
844
|
+
type SubagentSandboxShutdown = SandboxShutdown | "pause-until-parent-close" | "keep-until-parent-close";
|
|
842
845
|
|
|
843
846
|
/** ToolHandlerResponse with threadId required (subagents must always surface their thread) */
|
|
844
847
|
type SubagentHandlerResponse<TResult = null, TToolResponse = JsonValue> = ToolHandlerResponse<TResult, TToolResponse> & {
|
|
@@ -872,16 +875,23 @@ type SubagentContext = Record<string, unknown> | (() => Record<string, unknown>)
|
|
|
872
875
|
/**
|
|
873
876
|
* Sandbox configuration for a subagent.
|
|
874
877
|
*
|
|
875
|
-
* String shorthands:
|
|
876
878
|
* - `"none"` — no sandbox (default).
|
|
877
|
-
* - `"inherit"` — reuse the parent's sandbox
|
|
878
|
-
*
|
|
879
|
-
*
|
|
880
|
-
*
|
|
881
|
-
*
|
|
882
|
-
|
|
883
|
-
|
|
879
|
+
* - `{ source: "inherit", continuation }` — reuse the parent's sandbox.
|
|
880
|
+
* `continuation: "continue"` shares the parent sandbox directly;
|
|
881
|
+
* `continuation: "fork"` forks from the parent on every call.
|
|
882
|
+
* - `{ source: "own", init?, continuation }` — the child gets its own sandbox.
|
|
883
|
+
* `init: "per-call"` (default) creates fresh each call (thread continuation
|
|
884
|
+
* uses the previous sandbox). `init: "once"` creates on the first call and
|
|
885
|
+
* stores it for all subsequent calls.
|
|
886
|
+
*/
|
|
887
|
+
type SubagentSandboxConfig = "none" | {
|
|
888
|
+
source: "inherit";
|
|
889
|
+
continuation: "continue" | "fork";
|
|
890
|
+
shutdown?: SubagentSandboxShutdown;
|
|
891
|
+
} | {
|
|
884
892
|
source: "own";
|
|
893
|
+
init?: "per-call" | "once";
|
|
894
|
+
continuation: "continue" | "fork";
|
|
885
895
|
shutdown?: SubagentSandboxShutdown;
|
|
886
896
|
};
|
|
887
897
|
/**
|
|
@@ -919,9 +929,6 @@ interface SubagentConfig<TResult extends z.ZodType = z.ZodType> {
|
|
|
919
929
|
/**
|
|
920
930
|
* Sandbox strategy for this subagent.
|
|
921
931
|
*
|
|
922
|
-
* String shorthands: `"none"` (default) | `"inherit"` | `"own"`.
|
|
923
|
-
* Object form: `{ source: "own", shutdown?: SubagentSandboxShutdown }`.
|
|
924
|
-
*
|
|
925
932
|
* @see {@link SubagentSandboxConfig}
|
|
926
933
|
*/
|
|
927
934
|
sandbox?: SubagentSandboxConfig;
|
|
@@ -959,10 +966,11 @@ interface SubagentHooks<TArgs = unknown, TResult = unknown> {
|
|
|
959
966
|
* Extended response from the subagent `fn` — includes optional cleanup callbacks
|
|
960
967
|
* stripped before signaling the parent.
|
|
961
968
|
*
|
|
962
|
-
* When `TSandboxShutdown` is `"pause-until-parent-close"
|
|
963
|
-
* and `sandboxId` become
|
|
969
|
+
* When `TSandboxShutdown` is `"pause-until-parent-close"` or
|
|
970
|
+
* `"keep-until-parent-close"`, both `destroySandbox` and `sandboxId` become
|
|
971
|
+
* required so the parent can coordinate cleanup.
|
|
964
972
|
*/
|
|
965
|
-
type SubagentFnResult<TResult = null, TSandboxShutdown extends SubagentSandboxShutdown = SubagentSandboxShutdown> = SubagentHandlerResponse<TResult> & (TSandboxShutdown extends "pause-until-parent-close" ? {
|
|
973
|
+
type SubagentFnResult<TResult = null, TSandboxShutdown extends SubagentSandboxShutdown = SubagentSandboxShutdown> = SubagentHandlerResponse<TResult> & (TSandboxShutdown extends "pause-until-parent-close" | "keep-until-parent-close" ? {
|
|
966
974
|
destroySandbox: () => Promise<void>;
|
|
967
975
|
sandboxId: string;
|
|
968
976
|
} : {
|
|
@@ -980,6 +988,8 @@ interface SubagentSessionInput {
|
|
|
980
988
|
sandbox?: SandboxInit;
|
|
981
989
|
/** Sandbox shutdown policy (default: "destroy") */
|
|
982
990
|
sandboxShutdown?: SubagentSandboxShutdown;
|
|
991
|
+
/** Called by the session as soon as the sandbox is created, before the agent loop starts. */
|
|
992
|
+
onSandboxReady?: (sandboxId: string) => void;
|
|
983
993
|
}
|
|
984
994
|
|
|
985
995
|
/**
|
|
@@ -1082,7 +1092,7 @@ interface ThreadOps<TContent = string> {
|
|
|
1082
1092
|
/** Append the model's response to the thread */
|
|
1083
1093
|
appendAgentMessage(threadId: string, id: string, message: unknown, threadKey?: string): Promise<void>;
|
|
1084
1094
|
/** Append a system message to the thread */
|
|
1085
|
-
appendSystemMessage(threadId: string, id: string, content:
|
|
1095
|
+
appendSystemMessage(threadId: string, id: string, content: unknown, threadKey?: string): Promise<void>;
|
|
1086
1096
|
/** Copy all messages from sourceThreadId into a new thread at targetThreadId */
|
|
1087
1097
|
forkThread(sourceThreadId: string, targetThreadId: string, threadKey?: string): Promise<void>;
|
|
1088
1098
|
}
|
|
@@ -1186,6 +1196,11 @@ interface SessionConfig<T extends ToolMap, M = unknown, TContent = string> {
|
|
|
1186
1196
|
* Has no effect when the sandbox is inherited (`sandbox.mode === "inherit"`).
|
|
1187
1197
|
*/
|
|
1188
1198
|
sandboxShutdown?: SubagentSandboxShutdown;
|
|
1199
|
+
/**
|
|
1200
|
+
* Called as soon as the sandbox is created (or resumed/forked), before the
|
|
1201
|
+
* agent loop starts. Useful for signalling sandbox readiness to a parent.
|
|
1202
|
+
*/
|
|
1203
|
+
onSandboxReady?: (sandboxId: string) => void;
|
|
1189
1204
|
virtualFsOps?: VirtualFsOps;
|
|
1190
1205
|
/**
|
|
1191
1206
|
* Virtual filesystem configuration (optional — independent of sandbox).
|
|
@@ -94,6 +94,8 @@ interface SandboxProvider<TOptions extends SandboxCreateOptions = SandboxCreateO
|
|
|
94
94
|
get(sandboxId: string): Promise<TSandbox>;
|
|
95
95
|
destroy(sandboxId: string): Promise<void>;
|
|
96
96
|
pause(sandboxId: string, ttlSeconds?: number): Promise<void>;
|
|
97
|
+
/** Resume a paused sandbox. No-op if already running. */
|
|
98
|
+
resume(sandboxId: string): Promise<void>;
|
|
97
99
|
snapshot(sandboxId: string): Promise<SandboxSnapshot>;
|
|
98
100
|
restore(snapshot: SandboxSnapshot): Promise<Sandbox>;
|
|
99
101
|
fork(sandboxId: string): Promise<Sandbox>;
|
|
@@ -104,6 +106,8 @@ interface SandboxOps<TOptions extends SandboxCreateOptions = SandboxCreateOption
|
|
|
104
106
|
} | null>;
|
|
105
107
|
destroySandbox(sandboxId: string): Promise<void>;
|
|
106
108
|
pauseSandbox(sandboxId: string): Promise<void>;
|
|
109
|
+
/** Resume a paused sandbox. No-op if already running. */
|
|
110
|
+
resumeSandbox(sandboxId: string): Promise<void>;
|
|
107
111
|
snapshotSandbox(sandboxId: string): Promise<SandboxSnapshot>;
|
|
108
112
|
forkSandbox(sandboxId: string): Promise<string>;
|
|
109
113
|
}
|
|
@@ -94,6 +94,8 @@ interface SandboxProvider<TOptions extends SandboxCreateOptions = SandboxCreateO
|
|
|
94
94
|
get(sandboxId: string): Promise<TSandbox>;
|
|
95
95
|
destroy(sandboxId: string): Promise<void>;
|
|
96
96
|
pause(sandboxId: string, ttlSeconds?: number): Promise<void>;
|
|
97
|
+
/** Resume a paused sandbox. No-op if already running. */
|
|
98
|
+
resume(sandboxId: string): Promise<void>;
|
|
97
99
|
snapshot(sandboxId: string): Promise<SandboxSnapshot>;
|
|
98
100
|
restore(snapshot: SandboxSnapshot): Promise<Sandbox>;
|
|
99
101
|
fork(sandboxId: string): Promise<Sandbox>;
|
|
@@ -104,6 +106,8 @@ interface SandboxOps<TOptions extends SandboxCreateOptions = SandboxCreateOption
|
|
|
104
106
|
} | null>;
|
|
105
107
|
destroySandbox(sandboxId: string): Promise<void>;
|
|
106
108
|
pauseSandbox(sandboxId: string): Promise<void>;
|
|
109
|
+
/** Resume a paused sandbox. No-op if already running. */
|
|
110
|
+
resumeSandbox(sandboxId: string): Promise<void>;
|
|
107
111
|
snapshotSandbox(sandboxId: string): Promise<SandboxSnapshot>;
|
|
108
112
|
forkSandbox(sandboxId: string): Promise<string>;
|
|
109
113
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Redis from 'ioredis';
|
|
2
|
-
import { J as JsonValue } from './types-
|
|
2
|
+
import { J as JsonValue } from './types-DQ1l_gXL.cjs';
|
|
3
3
|
|
|
4
4
|
interface ThreadManagerConfig<T> {
|
|
5
5
|
redis: Redis;
|
|
@@ -64,9 +64,9 @@ interface ThreadManagerHooks<TStored, TPrepared = TStored> {
|
|
|
64
64
|
/** Called for each SDK-native message after all processing, right before the payload is returned */
|
|
65
65
|
onPreparedMessage?: (message: TPrepared, index: number, messages: readonly TPrepared[]) => TPrepared;
|
|
66
66
|
}
|
|
67
|
-
interface ProviderThreadManager<TStored, TContent = string, TToolContent = JsonValue> extends BaseThreadManager<TStored> {
|
|
67
|
+
interface ProviderThreadManager<TStored, TContent = string, TToolContent = JsonValue, TSystemContent = string> extends BaseThreadManager<TStored> {
|
|
68
68
|
appendUserMessage(id: string, content: TContent): Promise<void>;
|
|
69
|
-
appendSystemMessage(id: string, content:
|
|
69
|
+
appendSystemMessage(id: string, content: TSystemContent): Promise<void>;
|
|
70
70
|
appendToolResult(id: string, toolCallId: string, toolName: string, content: TToolContent): Promise<void>;
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as SandboxFileSystem, F as FileStat, D as DirentEntry, S as Sandbox, d as SandboxCreateOptions } from './types-
|
|
1
|
+
import { a as SandboxFileSystem, F as FileStat, D as DirentEntry, S as Sandbox, d as SandboxCreateOptions } from './types-DxCpFNv_.js';
|
|
2
2
|
import { BedrockAgentCoreClient, BedrockAgentCoreClientConfig } from '@aws-sdk/client-bedrock-agentcore';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Redis from 'ioredis';
|
|
2
|
-
import { J as JsonValue } from './types-
|
|
2
|
+
import { J as JsonValue } from './types-CADc5V_P.js';
|
|
3
3
|
|
|
4
4
|
interface ThreadManagerConfig<T> {
|
|
5
5
|
redis: Redis;
|
|
@@ -64,9 +64,9 @@ interface ThreadManagerHooks<TStored, TPrepared = TStored> {
|
|
|
64
64
|
/** Called for each SDK-native message after all processing, right before the payload is returned */
|
|
65
65
|
onPreparedMessage?: (message: TPrepared, index: number, messages: readonly TPrepared[]) => TPrepared;
|
|
66
66
|
}
|
|
67
|
-
interface ProviderThreadManager<TStored, TContent = string, TToolContent = JsonValue> extends BaseThreadManager<TStored> {
|
|
67
|
+
interface ProviderThreadManager<TStored, TContent = string, TToolContent = JsonValue, TSystemContent = string> extends BaseThreadManager<TStored> {
|
|
68
68
|
appendUserMessage(id: string, content: TContent): Promise<void>;
|
|
69
|
-
appendSystemMessage(id: string, content:
|
|
69
|
+
appendSystemMessage(id: string, content: TSystemContent): Promise<void>;
|
|
70
70
|
appendToolResult(id: string, toolCallId: string, toolName: string, content: TToolContent): Promise<void>;
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ao as ToolMap, _ as SessionConfig, az as ZeitlichSession, Y as SandboxShutdown, ag as ThreadInit, X as SandboxInit, t as JsonSerializable, B as BaseAgentState, o as AgentStateManager, aB as ToolRouterOptions, ar as ToolRouter, R as RouterContext, J as JsonValue, at as ToolWithHandler, v as ParsedToolCallUnion, ap as ToolNames, a6 as SubagentDefinition, a9 as SubagentHooks, aa as SubagentSandboxConfig, a5 as SubagentConfig, ab as SubagentSandboxShutdown, ac as SubagentSessionInput, a7 as SubagentFnResult, a3 as SessionStartHook, $ as SessionEndHook, D as PostToolUseHook, y as PostToolUseFailureHook, a1 as SessionExitReason, ah as TokenUsage, e as RunAgentConfig, A as AgentResponse, F as FileEntryMetadata, av as VirtualFileTree, j as TreeMutation, r as FileEntry, aw as VirtualFsOps, g as SkillMetadata, h as Skill, b as ToolHandlerResponse, am as ToolHandler, ay as WorkflowTask, c as ActivityToolHandler } from './types-
|
|
2
|
-
import { g as SandboxOps } from './types-
|
|
1
|
+
import { ao as ToolMap, _ as SessionConfig, az as ZeitlichSession, Y as SandboxShutdown, ag as ThreadInit, X as SandboxInit, t as JsonSerializable, B as BaseAgentState, o as AgentStateManager, aB as ToolRouterOptions, ar as ToolRouter, R as RouterContext, J as JsonValue, at as ToolWithHandler, v as ParsedToolCallUnion, ap as ToolNames, a6 as SubagentDefinition, a9 as SubagentHooks, aa as SubagentSandboxConfig, a5 as SubagentConfig, ab as SubagentSandboxShutdown, ac as SubagentSessionInput, a7 as SubagentFnResult, a3 as SessionStartHook, $ as SessionEndHook, D as PostToolUseHook, y as PostToolUseFailureHook, a1 as SessionExitReason, ah as TokenUsage, e as RunAgentConfig, A as AgentResponse, F as FileEntryMetadata, av as VirtualFileTree, j as TreeMutation, r as FileEntry, aw as VirtualFsOps, g as SkillMetadata, h as Skill, b as ToolHandlerResponse, am as ToolHandler, ay as WorkflowTask, c as ActivityToolHandler } from './types-DQ1l_gXL.cjs';
|
|
2
|
+
import { g as SandboxOps } from './types-DxCpFNv_.cjs';
|
|
3
3
|
import z$1, { z } from 'zod';
|
|
4
4
|
import { Sinks, proxyActivities } from '@temporalio/workflow';
|
|
5
5
|
|
|
@@ -207,7 +207,7 @@ type SubagentArgs = {
|
|
|
207
207
|
* // With parent-specific overrides
|
|
208
208
|
* export const researcher = defineSubagent(researcherWorkflow, {
|
|
209
209
|
* thread: "fork",
|
|
210
|
-
* sandbox: { source: "own", shutdown: "pause" },
|
|
210
|
+
* sandbox: { source: "own", continuation: "fork", shutdown: "pause" },
|
|
211
211
|
* hooks: {
|
|
212
212
|
* onPostExecution: ({ result }) => console.log(result),
|
|
213
213
|
* },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ao as ToolMap, _ as SessionConfig, az as ZeitlichSession, Y as SandboxShutdown, ag as ThreadInit, X as SandboxInit, t as JsonSerializable, B as BaseAgentState, o as AgentStateManager, aB as ToolRouterOptions, ar as ToolRouter, R as RouterContext, J as JsonValue, at as ToolWithHandler, v as ParsedToolCallUnion, ap as ToolNames, a6 as SubagentDefinition, a9 as SubagentHooks, aa as SubagentSandboxConfig, a5 as SubagentConfig, ab as SubagentSandboxShutdown, ac as SubagentSessionInput, a7 as SubagentFnResult, a3 as SessionStartHook, $ as SessionEndHook, D as PostToolUseHook, y as PostToolUseFailureHook, a1 as SessionExitReason, ah as TokenUsage, e as RunAgentConfig, A as AgentResponse, F as FileEntryMetadata, av as VirtualFileTree, j as TreeMutation, r as FileEntry, aw as VirtualFsOps, g as SkillMetadata, h as Skill, b as ToolHandlerResponse, am as ToolHandler, ay as WorkflowTask, c as ActivityToolHandler } from './types-
|
|
2
|
-
import { g as SandboxOps } from './types-
|
|
1
|
+
import { ao as ToolMap, _ as SessionConfig, az as ZeitlichSession, Y as SandboxShutdown, ag as ThreadInit, X as SandboxInit, t as JsonSerializable, B as BaseAgentState, o as AgentStateManager, aB as ToolRouterOptions, ar as ToolRouter, R as RouterContext, J as JsonValue, at as ToolWithHandler, v as ParsedToolCallUnion, ap as ToolNames, a6 as SubagentDefinition, a9 as SubagentHooks, aa as SubagentSandboxConfig, a5 as SubagentConfig, ab as SubagentSandboxShutdown, ac as SubagentSessionInput, a7 as SubagentFnResult, a3 as SessionStartHook, $ as SessionEndHook, D as PostToolUseHook, y as PostToolUseFailureHook, a1 as SessionExitReason, ah as TokenUsage, e as RunAgentConfig, A as AgentResponse, F as FileEntryMetadata, av as VirtualFileTree, j as TreeMutation, r as FileEntry, aw as VirtualFsOps, g as SkillMetadata, h as Skill, b as ToolHandlerResponse, am as ToolHandler, ay as WorkflowTask, c as ActivityToolHandler } from './types-CADc5V_P.js';
|
|
2
|
+
import { g as SandboxOps } from './types-DxCpFNv_.js';
|
|
3
3
|
import z$1, { z } from 'zod';
|
|
4
4
|
import { Sinks, proxyActivities } from '@temporalio/workflow';
|
|
5
5
|
|
|
@@ -207,7 +207,7 @@ type SubagentArgs = {
|
|
|
207
207
|
* // With parent-specific overrides
|
|
208
208
|
* export const researcher = defineSubagent(researcherWorkflow, {
|
|
209
209
|
* thread: "fork",
|
|
210
|
-
* sandbox: { source: "own", shutdown: "pause" },
|
|
210
|
+
* sandbox: { source: "own", continuation: "fork", shutdown: "pause" },
|
|
211
211
|
* hooks: {
|
|
212
212
|
* onPostExecution: ({ result }) => console.log(result),
|
|
213
213
|
* },
|