@deepagents/context 4.3.0 → 6.0.0
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 +51 -7
- package/dist/browser.d.ts +5 -3
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +69 -43
- package/dist/browser.js.map +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3615 -2905
- package/dist/index.js.map +4 -4
- package/dist/lib/advisor.d.ts +2 -2
- package/dist/lib/agent.d.ts +22 -10
- package/dist/lib/agent.d.ts.map +1 -1
- package/dist/lib/chain-summary.d.ts +8 -0
- package/dist/lib/chain-summary.d.ts.map +1 -1
- package/dist/lib/chat.d.ts +2 -2
- package/dist/lib/chat.d.ts.map +1 -1
- package/dist/lib/engine.d.ts +45 -75
- package/dist/lib/engine.d.ts.map +1 -1
- package/dist/lib/fragments/plan.d.ts +13 -0
- package/dist/lib/fragments/plan.d.ts.map +1 -0
- package/dist/lib/fragments/reminders/src/evaluate.d.ts +1 -1
- package/dist/lib/fragments/reminders/src/index.d.ts +1 -1
- package/dist/lib/fragments/reminders/src/index.d.ts.map +1 -1
- package/dist/lib/fragments/reminders/src/predicates/combinators.d.ts +8 -8
- package/dist/lib/fragments/reminders/src/predicates/combinators.d.ts.map +1 -1
- package/dist/lib/fragments/reminders/src/predicates/once.d.ts +1 -1
- package/dist/lib/fragments/reminders/src/predicates/once.d.ts.map +1 -1
- package/dist/lib/fragments/reminders/src/predicates/tool.d.ts +35 -2
- package/dist/lib/fragments/reminders/src/predicates/tool.d.ts.map +1 -1
- package/dist/lib/fragments/reminders/src/reminders.d.ts +9 -29
- package/dist/lib/fragments/reminders/src/reminders.d.ts.map +1 -1
- package/dist/lib/fragments/reminders/src/types.d.ts +42 -15
- package/dist/lib/fragments/reminders/src/types.d.ts.map +1 -1
- package/dist/lib/guardrail.d.ts +2 -2
- package/dist/lib/guardrail.d.ts.map +1 -1
- package/dist/lib/repair.d.ts +2 -2
- package/dist/lib/sandbox/agent-os-sandbox.d.ts +1 -1
- package/dist/lib/sandbox/agent-os-sandbox.d.ts.map +1 -1
- package/dist/lib/sandbox/apple-container-sandbox.d.ts +2 -0
- package/dist/lib/sandbox/apple-container-sandbox.d.ts.map +1 -1
- package/dist/lib/sandbox/bash-exception.d.ts +1 -1
- package/dist/lib/sandbox/bash-exception.d.ts.map +1 -1
- package/dist/lib/sandbox/bash-tool.d.ts +7 -42
- package/dist/lib/sandbox/bash-tool.d.ts.map +1 -1
- package/dist/lib/sandbox/container-sandbox.d.ts +2 -2
- package/dist/lib/sandbox/container-sandbox.d.ts.map +1 -1
- package/dist/lib/sandbox/daytona-sandbox.d.ts.map +1 -1
- package/dist/lib/sandbox/docker-sandbox.d.ts +2 -3
- package/dist/lib/sandbox/docker-sandbox.d.ts.map +1 -1
- package/dist/lib/sandbox/index.d.ts +0 -3
- package/dist/lib/sandbox/index.d.ts.map +1 -1
- package/dist/lib/sandbox/installers/installer.d.ts +1 -1
- package/dist/lib/sandbox/installers/installer.d.ts.map +1 -1
- package/dist/lib/sandbox/microsandbox-sandbox.d.ts.map +1 -1
- package/dist/lib/sandbox/strace/file-changes.d.ts +4 -10
- package/dist/lib/sandbox/strace/file-changes.d.ts.map +1 -1
- package/dist/lib/sandbox/types.d.ts +79 -32
- package/dist/lib/sandbox/types.d.ts.map +1 -1
- package/dist/lib/skills/fragments.d.ts +11 -10
- package/dist/lib/skills/fragments.d.ts.map +1 -1
- package/dist/lib/skills/frontmatter.d.ts +16 -0
- package/dist/lib/skills/frontmatter.d.ts.map +1 -0
- package/dist/lib/skills/index.d.ts +11 -10
- package/dist/lib/skills/index.d.ts.map +1 -1
- package/dist/lib/skills/skill-reminder.d.ts +2 -2
- package/dist/lib/skills/skill-reminder.d.ts.map +1 -1
- package/dist/lib/skills/types.d.ts +5 -23
- package/dist/lib/skills/types.d.ts.map +1 -1
- package/dist/lib/store/postgres.store.d.ts +2 -2
- package/dist/lib/store/postgres.store.d.ts.map +1 -1
- package/dist/lib/store/sqlite.store.d.ts +2 -2
- package/dist/lib/store/sqlite.store.d.ts.map +1 -1
- package/dist/lib/store/sqlserver.store.d.ts +2 -2
- package/dist/lib/store/sqlserver.store.d.ts.map +1 -1
- package/dist/lib/store/store.d.ts +5 -4
- package/dist/lib/store/store.d.ts.map +1 -1
- package/dist/lib/stream/postgres.stream-store.d.ts +2 -1
- package/dist/lib/stream/postgres.stream-store.d.ts.map +1 -1
- package/dist/lib/stream/sqlite.stream-store.d.ts +2 -1
- package/dist/lib/stream/sqlite.stream-store.d.ts.map +1 -1
- package/dist/lib/stream/stream-manager.d.ts +4 -0
- package/dist/lib/stream/stream-manager.d.ts.map +1 -1
- package/dist/lib/stream/stream-store.d.ts +16 -0
- package/dist/lib/stream/stream-store.d.ts.map +1 -1
- package/dist/lib/telemetry/console-telemetry.d.ts +8 -0
- package/dist/lib/telemetry/console-telemetry.d.ts.map +1 -0
- package/dist/lib/telemetry/create-telemetry-integration.d.ts +6 -0
- package/dist/lib/telemetry/create-telemetry-integration.d.ts.map +1 -0
- package/dist/lib/telemetry/file/file-telemetry.d.ts +9 -0
- package/dist/lib/telemetry/file/file-telemetry.d.ts.map +1 -0
- package/dist/lib/telemetry/file/index.d.ts +2 -0
- package/dist/lib/telemetry/file/index.d.ts.map +1 -0
- package/dist/lib/telemetry/file/index.js +307 -0
- package/dist/lib/telemetry/file/index.js.map +7 -0
- package/dist/lib/telemetry/index.d.ts +3 -0
- package/dist/lib/telemetry/index.d.ts.map +1 -0
- package/dist/lib/telemetry/index.js +291 -0
- package/dist/lib/telemetry/index.js.map +7 -0
- package/dist/lib/telemetry/redact-telemetry-event.d.ts +2 -0
- package/dist/lib/telemetry/redact-telemetry-event.d.ts.map +1 -0
- package/dist/lib/telemetry/safe-serialize.d.ts +8 -0
- package/dist/lib/telemetry/safe-serialize.d.ts.map +1 -0
- package/dist/lib/tracing/index.js +47 -113
- package/dist/lib/tracing/index.js.map +2 -2
- package/dist/lib/tracing/openai-traces-integration.d.ts +2 -2
- package/dist/lib/tracing/openai-traces-integration.d.ts.map +1 -1
- package/dist/lib/tracing/serialization.d.ts.map +1 -1
- package/package.json +33 -22
- package/dist/lib/sandbox/abort.d.ts +0 -24
- package/dist/lib/sandbox/abort.d.ts.map +0 -1
- package/dist/lib/sandbox/bash-meta.d.ts +0 -10
- package/dist/lib/sandbox/bash-meta.d.ts.map +0 -1
- package/dist/lib/sandbox/upload-skills.d.ts +0 -20
- package/dist/lib/sandbox/upload-skills.d.ts.map +0 -1
- package/dist/lib/sandbox/walk.d.ts +0 -17
- package/dist/lib/sandbox/walk.d.ts.map +0 -1
- package/dist/lib/skills/loader.d.ts +0 -28
- package/dist/lib/skills/loader.d.ts.map +0 -1
- package/dist/spec/test/global-setup.d.ts +0 -4
- package/dist/spec/test/global-setup.d.ts.map +0 -1
- package/dist/spec/test/helpers/sqlite-container.d.ts +0 -19
- package/dist/spec/test/helpers/sqlite-container.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reminders.d.ts","sourceRoot":"","sources":["../../../../../src/lib/fragments/reminders/src/reminders.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"reminders.d.ts","sourceRoot":"","sources":["../../../../../src/lib/fragments/reminders/src/reminders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAc,MAAM,IAAI,CAAC;AAEhD,OAAO,EAAE,KAAK,eAAe,EAAc,MAAM,uBAAuB,CAAC;AAGzE,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,aAAa,EACb,kBAAkB,EAElB,YAAY,EACZ,gBAAgB,EAChB,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,eAAe,GACxB,QAAQ,IAAI,eAAe,GAAG;IAC/B,QAAQ,EAAE;QAAE,QAAQ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1
|
import type { LanguageModelUsage, UIMessage } from 'ai';
|
|
2
2
|
import type { ContextFragment } from '../../../fragments.ts';
|
|
3
|
+
import type { AgentSandbox } from '../../../sandbox/types.ts';
|
|
3
4
|
import type { StoredChatData } from '../../../store/store.ts';
|
|
4
5
|
export interface ReminderContext {
|
|
5
6
|
content: string;
|
|
7
|
+
sandbox?: AgentSandbox;
|
|
6
8
|
turn?: number;
|
|
7
9
|
lastMessageAt?: number;
|
|
8
10
|
lastMessage?: UIMessage;
|
|
@@ -13,16 +15,44 @@ export interface ReminderContext {
|
|
|
13
15
|
elapsed?: number;
|
|
14
16
|
messageCount?: number;
|
|
15
17
|
lastAssistantMessage?: UIMessage;
|
|
18
|
+
/**
|
|
19
|
+
* Every assistant segment in the chain. A firing steer/tool-output reminder
|
|
20
|
+
* carves the assistant message at its boundary, so `lastAssistantMessage`
|
|
21
|
+
* only holds the parts since the last fire — read this when deriving a
|
|
22
|
+
* counter from history (e.g. a tool-failure streak).
|
|
23
|
+
*/
|
|
24
|
+
lastAssistantMessages?: UIMessage[];
|
|
25
|
+
/** One entry per assistant REPLY, with its carved segments merged back. */
|
|
26
|
+
lastAssistantReplies?: UIMessage[];
|
|
27
|
+
toolOutcome?: ToolOutcome;
|
|
16
28
|
}
|
|
17
29
|
export interface ReminderResolution {
|
|
18
30
|
text: string;
|
|
19
31
|
metadata?: Record<string, unknown>;
|
|
20
32
|
}
|
|
33
|
+
export type ToolOutcome = {
|
|
34
|
+
state: 'output-available';
|
|
35
|
+
name: string;
|
|
36
|
+
input: unknown;
|
|
37
|
+
output: unknown;
|
|
38
|
+
} | {
|
|
39
|
+
state: 'output-error';
|
|
40
|
+
name: string;
|
|
41
|
+
input: unknown;
|
|
42
|
+
error: unknown;
|
|
43
|
+
errorText: string;
|
|
44
|
+
} | {
|
|
45
|
+
state: 'output-denied';
|
|
46
|
+
name: string;
|
|
47
|
+
input: unknown;
|
|
48
|
+
reason?: string;
|
|
49
|
+
};
|
|
21
50
|
export type SyncReminderText = string | ((ctx: ReminderContext) => string | ReminderResolution);
|
|
22
51
|
export type ReminderText = string | ((ctx: ReminderContext) => string | ReminderResolution | Promise<string | ReminderResolution>);
|
|
23
52
|
export interface WhenContext {
|
|
24
53
|
turn: number;
|
|
25
54
|
content: string;
|
|
55
|
+
sandbox?: AgentSandbox;
|
|
26
56
|
lastMessageAt?: number;
|
|
27
57
|
lastMessage?: UIMessage;
|
|
28
58
|
currentMessage: UIMessage;
|
|
@@ -32,23 +62,20 @@ export interface WhenContext {
|
|
|
32
62
|
elapsed?: number;
|
|
33
63
|
messageCount: number;
|
|
34
64
|
lastAssistantMessage?: UIMessage;
|
|
65
|
+
/** Every assistant SEGMENT — a firing reminder carves a reply into several. */
|
|
35
66
|
lastAssistantMessages?: UIMessage[];
|
|
36
67
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* prior, already-completed calls). Read it directly in a predicate to gate on
|
|
41
|
-
* the executing tool's name/input/result. Undefined for `user` / `steer`.
|
|
68
|
+
* One entry per assistant REPLY, with its carved segments merged back
|
|
69
|
+
* together. Window predicates (`withinLastN`, `everyOfLastN`) count these, so
|
|
70
|
+
* their answer does not shift when an unrelated reminder starts firing.
|
|
42
71
|
*/
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
output: unknown;
|
|
47
|
-
};
|
|
72
|
+
lastAssistantReplies?: UIMessage[];
|
|
73
|
+
/** The terminal tool outcome currently being evaluated. */
|
|
74
|
+
toolOutcome?: ToolOutcome;
|
|
48
75
|
/**
|
|
49
76
|
* Ids that a fire-once latch has already fired for in this conversation
|
|
50
|
-
* (persisted synth onceIds ∪ this stream's fires).
|
|
51
|
-
*
|
|
77
|
+
* (persisted synth onceIds ∪ this stream's fires). `once(id)` reads it to
|
|
78
|
+
* suppress a second fire.
|
|
52
79
|
*/
|
|
53
80
|
firedOnceIds?: ReadonlySet<string>;
|
|
54
81
|
/**
|
|
@@ -63,11 +90,11 @@ export interface WhenContext {
|
|
|
63
90
|
* specific carrier message. Callers add `content`/`currentMessage`/the
|
|
64
91
|
* last-assistant fields once they have located the message being evaluated.
|
|
65
92
|
*/
|
|
66
|
-
export type BaseWhenCtx = Omit<WhenContext, 'content' | 'currentMessage' | 'lastAssistantMessage' | 'lastAssistantMessages'>;
|
|
93
|
+
export type BaseWhenCtx = Omit<WhenContext, 'content' | 'currentMessage' | 'lastAssistantMessage' | 'lastAssistantMessages' | 'lastAssistantReplies'>;
|
|
67
94
|
export type WhenPredicate = (ctx: WhenContext) => boolean | Promise<boolean>;
|
|
68
95
|
export type ReminderTarget = 'user' | 'tool-output' | 'steer';
|
|
69
|
-
export interface
|
|
70
|
-
source: '
|
|
96
|
+
export interface SyntheticReminderMetadata {
|
|
97
|
+
source: 'reminder';
|
|
71
98
|
firedAt: number;
|
|
72
99
|
onceIds?: string[];
|
|
73
100
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/fragments/reminders/src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAExD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,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G,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpE,MAAM,MAAM,gBAAgB,GAAG,eAAe,GAAG;IAC/C,QAAQ,EAAE;QAAE,QAAQ,EAAE,mBAAmB,CAAA;KAAE,CAAC;CAC7C,CAAC"}
|
package/dist/lib/guardrail.d.ts
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
* });
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
import type {
|
|
37
|
+
import type { AvailableSkill } from './skills/types.ts';
|
|
38
38
|
import type { StreamPart } from './stream/types.ts';
|
|
39
39
|
export type { StreamPart } from './stream/types.ts';
|
|
40
40
|
/**
|
|
@@ -61,7 +61,7 @@ export interface GuardrailContext {
|
|
|
61
61
|
/** Names of tools available to the agent */
|
|
62
62
|
availableTools: string[];
|
|
63
63
|
/** Skills available in context (for detecting skill/tool confusion) */
|
|
64
|
-
availableSkills:
|
|
64
|
+
availableSkills: AvailableSkill[];
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* A guardrail that inspects streaming parts.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guardrail.d.ts","sourceRoot":"","sources":["../../src/lib/guardrail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"guardrail.d.ts","sourceRoot":"","sources":["../../src/lib/guardrail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,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ejB"}
|
package/dist/lib/repair.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type LanguageModelV4 } from '@ai-sdk/provider';
|
|
2
2
|
import { type ToolCallRepairFunction, type ToolSet } from 'ai';
|
|
3
|
-
export declare function createRepairToolCall(model:
|
|
3
|
+
export declare function createRepairToolCall(model: LanguageModelV4, abortSignal?: AbortSignal): ToolCallRepairFunction<ToolSet>;
|
|
4
4
|
//# sourceMappingURL=repair.d.ts.map
|
|
@@ -55,7 +55,7 @@ export interface AgentOsSandboxOptions extends SandboxReadinessOptions {
|
|
|
55
55
|
*
|
|
56
56
|
* @example With createBashTool (AI SDK integration)
|
|
57
57
|
* ```typescript
|
|
58
|
-
* import { createBashTool } from '
|
|
58
|
+
* import { createBashTool } from '@deepagents/context';
|
|
59
59
|
* import common from '@rivet-dev/agent-os-common';
|
|
60
60
|
*
|
|
61
61
|
* const sandbox = await createAgentOsSandbox({ software: [common] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-os-sandbox.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/agent-os-sandbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-os-sandbox.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/agent-os-sandbox.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,iBAAiB,EAGjB,uBAAuB,EAExB,MAAM,YAAY,CAAC;AAgCpB,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,wBAAyB,SAAQ,mBAAmB;gBACnD,KAAK,CAAC,EAAE,KAAK;CAO1B;AAED,qBAAa,oBAAqB,SAAQ,mBAAmB;gBAC/C,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAK3C;AAED,MAAM,WAAW,qBAAsB,SAAQ,uBAAuB;IACpE,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,sCAAsC;IACtC,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACtE,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,gDAAgD;IAChD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AA8FD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,iBAAiB,CAAC,CAiI5B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EACvC,OAAO,EAAE,qBAAqB,EAC9B,EAAE,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,CAAC,CAAC,GAC7C,OAAO,CAAC,CAAC,CAAC,CAOZ"}
|
|
@@ -50,6 +50,8 @@ type StableContainerName = string;
|
|
|
50
50
|
export interface AppleContainerCommonOptions {
|
|
51
51
|
volumes?: AppleContainerVolume[];
|
|
52
52
|
resources?: AppleContainerResources;
|
|
53
|
+
/** DNS nameservers passed to `container run --dns`. */
|
|
54
|
+
dns?: readonly string[];
|
|
53
55
|
env?: Record<string, string>;
|
|
54
56
|
name?: StableContainerName;
|
|
55
57
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apple-container-sandbox.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/apple-container-sandbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apple-container-sandbox.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/apple-container-sandbox.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,eAAe,EAG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"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"bash-exception.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/bash-exception.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,8BAAsB,aAAc,SAAQ,KAAK;IAC/C,QAAQ,CAAC,MAAM,IAAI,aAAa;CACjC"}
|
|
@@ -1,45 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface CreateBashToolWithSkillsOptions extends Omit<CreateBashToolOptions, 'sandbox'> {
|
|
4
|
-
/**
|
|
5
|
-
* Backend satisfying `DisposableSandbox`. Callers pick the backend
|
|
6
|
-
* explicitly via `createVirtualSandbox`, `createDockerSandbox`, or
|
|
7
|
-
* `createAgentOsSandbox`. `@vercel/sandbox` is intentionally not
|
|
8
|
-
* accepted; if it's needed, wrap it to `DisposableSandbox` first.
|
|
9
|
-
*/
|
|
10
|
-
sandbox: DisposableSandbox;
|
|
11
|
-
/**
|
|
12
|
-
* Skill directories to upload into the sandbox at startup. Each entry's
|
|
13
|
-
* contents are copied to `sandbox` (files + subdirectories) and each
|
|
14
|
-
* subdirectory containing a SKILL.md is parsed into `sandbox.skills`.
|
|
15
|
-
*/
|
|
16
|
-
skills?: SkillUploadInput[];
|
|
17
|
-
/**
|
|
18
|
-
* Working directory passed to upstream `bash-tool`. Defaults to `/workspace`.
|
|
19
|
-
* File-change tracking is no longer wired here — compose
|
|
20
|
-
* `withStraceFileChanges(backend, { destination, onFileChanges })` on the
|
|
21
|
-
* backend yourself and pass the result as `sandbox`.
|
|
22
|
-
*/
|
|
23
|
-
destination?: string;
|
|
24
|
-
}
|
|
1
|
+
import type { AgentSandbox, CreateBashToolOptions } from './types.ts';
|
|
2
|
+
declare const DEFAULT_MAX_OUTPUT_LENGTH = 30000;
|
|
25
3
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* File-change tracking is not composed here — a caller that wants it wraps the
|
|
31
|
-
* backend with `withStraceFileChanges` first, so the tracer sits innermost
|
|
32
|
-
* (backend → withStraceFileChanges → withBashExceptionCatch → withAbortSignal).
|
|
33
|
-
*
|
|
34
|
-
* The composed sandbox is handed to upstream `bash-tool`; upstream's
|
|
35
|
-
* internal `bash` / `readFile` / `writeFile` tools therefore close over
|
|
36
|
-
* the decorated methods. The outer `bash` tool adds:
|
|
37
|
-
*
|
|
38
|
-
* - `reasoning` input on the schema.
|
|
39
|
-
* - Host-only meta channel (`useBashMeta().setHidden(patch)`): attaches
|
|
40
|
-
* metadata that `toModelOutput` strips from the model-facing result.
|
|
41
|
-
* Model-visible nudges are declared as `target: 'tool-output'` reminders.
|
|
42
|
-
* - Single-shot `skills` upload populating `sandbox.skills`.
|
|
4
|
+
* Build the DeepAgents-owned bash/readFile/writeFile toolkit around a sandbox.
|
|
5
|
+
* The sandbox provides isolation and execution; these tools only translate AI
|
|
6
|
+
* SDK tool calls into that backend contract.
|
|
43
7
|
*/
|
|
44
|
-
export declare function createBashTool(options:
|
|
8
|
+
export declare function createBashTool(options: CreateBashToolOptions): Promise<AgentSandbox>;
|
|
9
|
+
export { DEFAULT_MAX_OUTPUT_LENGTH };
|
|
45
10
|
//# sourceMappingURL=bash-tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bash-tool.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/bash-tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bash-tool.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/bash-tool.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,YAAY,EAGZ,qBAAqB,EAKtB,MAAM,YAAY,CAAC;AAIpB,QAAA,MAAM,yBAAyB,QAAS,CAAC;AAmRzC;;;;GAIG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,YAAY,CAAC,CAwHvB;AAED,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { type CommandResult } from 'bash-tool';
|
|
2
1
|
import type { CommonSandboxOptions, ContainerEngine, SandboxVolume } from './container-engine.ts';
|
|
3
2
|
import { type Installer } from './installers/installer.ts';
|
|
4
|
-
import type { DisposableSandbox, ExecuteCommandOptions, SandboxProcess, SpawnOptions } from './types.ts';
|
|
3
|
+
import type { CommandResult, DisposableSandbox, ExecuteCommandOptions, SandboxProcess, SpawnOptions } from './types.ts';
|
|
5
4
|
interface StrategyContext {
|
|
6
5
|
containerId: string;
|
|
7
6
|
image: string;
|
|
@@ -29,6 +28,7 @@ export declare abstract class ContainerSandboxStrategy<TOpts extends CommonSandb
|
|
|
29
28
|
containerId: string;
|
|
30
29
|
attached: boolean;
|
|
31
30
|
}>;
|
|
31
|
+
private waitForRacedContainer;
|
|
32
32
|
private startStoppedContainer;
|
|
33
33
|
protected inspectContainer(containerId: string): Promise<'running' | 'stopped' | 'absent'>;
|
|
34
34
|
protected prepareVolumes(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-sandbox.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/container-sandbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"container-sandbox.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/container-sandbox.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,EAEf,aAAa,EACd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,YAAY,EACb,MAAM,YAAY,CAAC;AAEpB,UAAU,eAAe;IACvB,WAAW,EAAE,MAAM,CAAC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Ae,CAAC,KAAK,CAAC,EAC9B,IAAI,EAAE;QACJ,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,aAAa,EAAE,OAAO,CAAC;QACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;cASa,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;cAuB3B,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;CAC3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daytona-sandbox.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/daytona-sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,OAAO,EAER,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"daytona-sandbox.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/daytona-sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,OAAO,EAER,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAEV,iBAAiB,EAIjB,uBAAuB,EAExB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,2BAA2B,kBAAkB,CAAC;AAM3D,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,qBAAsB,SAAQ,uBAAuB;IACpE;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAA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
1
|
-
import { type CommandResult } from 'bash-tool';
|
|
2
1
|
import type { CommonSandboxOptions, ContainerEngine, SandboxResources, SandboxVolume } from './container-engine.ts';
|
|
3
2
|
import { ContainerSandboxStrategy } from './container-sandbox.ts';
|
|
4
3
|
import { type Installer } from './installers/installer.ts';
|
|
5
|
-
import type { DisposableSandbox, ExecuteCommandOptions, SandboxProcess, SpawnOptions } from './types.ts';
|
|
6
|
-
export type { CommandResult as ExecResult, Sandbox } from '
|
|
4
|
+
import type { CommandResult, DisposableSandbox, ExecuteCommandOptions, SandboxProcess, SpawnOptions } from './types.ts';
|
|
5
|
+
export type { CommandResult as ExecResult, Sandbox } from './types.ts';
|
|
7
6
|
export type { SandboxBindVolume as DockerBindVolume, SandboxNamedVolume as DockerNamedVolume, SandboxVolume as DockerSandboxVolume, } from './container-engine.ts';
|
|
8
7
|
export { ComposeStartError, ContainerCreationError, DockerNotAvailableError, DockerSandboxError, DockerfileBuildError, type InstallErrorOptions, type InstallKind, InstallError, MissingRuntimeError, PackageInstallError, VolumeCreateError, VolumeInspectError, VolumePathError, VolumeRemoveError, } from './docker-sandbox-errors.ts';
|
|
9
8
|
export interface DockerResources extends SandboxResources {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker-sandbox.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/docker-sandbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"docker-sandbox.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/docker-sandbox.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,EAGf,gBAAgB,EAChB,aAAa,EACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,wBAAwB,EAGzB,MAAM,wBAAwB,CAAC;AAYhC,OAAO,EACL,KAAK,SAAS,EAEf,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EAC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,EACf,OAAO,CAAC,EAAE,YAAY,GACrB,cAAc;cAkBQ,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAc5E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,iBAAiB,CAAC,CAoB5B;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAAC,CAAC,EAChC,OAAO,EAAE,oBAAoB,EAC7B,EAAE,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,CAAC,CAAC,GAC7C,OAAO,CAAC,CAAC,CAAC,CAOZ"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
export * from './abort.ts';
|
|
2
1
|
export * from './agent-os-sandbox.ts';
|
|
3
2
|
export * from './apple-container-sandbox.ts';
|
|
4
3
|
export * from './bash-exception.ts';
|
|
5
|
-
export * from './bash-meta.ts';
|
|
6
4
|
export * from './bash-tool.ts';
|
|
7
5
|
export * from './binary-bridges.ts';
|
|
8
6
|
export * from './container-engine.ts';
|
|
@@ -17,6 +15,5 @@ export * from './microsandbox-sandbox.ts';
|
|
|
17
15
|
export * from './shell-quote.ts';
|
|
18
16
|
export * from './subcommand.ts';
|
|
19
17
|
export * from './types.ts';
|
|
20
|
-
export * from './upload-skills.ts';
|
|
21
18
|
export * from './virtual-sandbox.ts';
|
|
22
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../../../src/lib/sandbox/installers/installer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../../../src/lib/sandbox/installers/installer.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,SAAS,CAAC;AAE/C;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACxB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAC9C;;;;OAIG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD;;;;;;OAMG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpE;AAED,8BAAsB,SAAS;IAC7B,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CACvD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAKpD;AAED,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,GACZ,gBAAgB,CAyGlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"microsandbox-sandbox.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/microsandbox-sandbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"microsandbox-sandbox.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/microsandbox-sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,cAAc,EAEf,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAEV,iBAAiB,EAIjB,uBAAuB,EAExB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,gCAAgC,eAAe,CAAC;AAO7D,MAAM,WAAW,0BAA2B,SAAQ,uBAAuB;IACzE;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gEAAgE;IAChE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,cAAc,CAAC;CACzD;AAED;;;;GAIG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAK3C;AAED,qBAAa,6BAA8B,SAAQ,wBAAwB;gBAC7D,KAAK,CAAC,EAAE,KAAK;CAO1B;AAED,qBAAa,yBAA0B,SAAQ,wBAAwB;gBACzD,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAI3C;AAED,qBAAa,wBAAyB,SAAQ,wBAAwB;gBACxD,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAI3C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAAC,iBAAiB,CAAC,CAiC5B"}
|
|
@@ -29,15 +29,9 @@ export interface WithStraceFileChangesOptions {
|
|
|
29
29
|
* A `with*` decorator that wraps the sandbox so each `executeCommand` is traced
|
|
30
30
|
* and its filesystem mutations parsed into a per-call `FileChange[]`. Per-call
|
|
31
31
|
* attribution is structural — one UUID-keyed trace file per call — so it is safe under
|
|
32
|
-
* concurrent tool calls. Each call's manifest is surfaced two stateless ways:
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* This decorator lives on the main barrel (not the lean `./sandbox/strace`
|
|
37
|
-
* leaf) on purpose: the `meta.fileChanges` channel works by sharing one
|
|
38
|
-
* `bash-meta` AsyncLocalStorage with `createBashTool`, and AsyncLocalStorage
|
|
39
|
-
* context does not cross bundle boundaries — so the decorator must be bundled
|
|
40
|
-
* with `createBashTool`. The leaf carries only the self-contained probe.
|
|
32
|
+
* concurrent tool calls. Each call's manifest is surfaced two stateless ways:
|
|
33
|
+
* attached directly to the command result as `meta.fileChanges` and passed to
|
|
34
|
+
* `onFileChanges`. No buffer is retained.
|
|
41
35
|
*
|
|
42
36
|
* This decorator TRUSTS that strace tracing works in the sandbox; it does not
|
|
43
37
|
* self-test. "strace works here" is an invariant of the (image + host kernel +
|
|
@@ -54,7 +48,7 @@ export interface WithStraceFileChangesOptions {
|
|
|
54
48
|
* `dispose` also sweeps the trace
|
|
55
49
|
* dir. `spawn` is traced the same way — its trace is read when the process exits
|
|
56
50
|
* (strace is the top process, so the trace is fully flushed by then). `spawn`
|
|
57
|
-
*
|
|
51
|
+
* has no command result, so its changes go to `onFileChanges` only.
|
|
58
52
|
*
|
|
59
53
|
* The trace file is always swept once parsed. A throwing `onFileChanges` on the
|
|
60
54
|
* tool-call path propagates to `withBashExceptionCatch` one level up: a caller's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-changes.d.ts","sourceRoot":"","sources":["../../../../src/lib/sandbox/strace/file-changes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-changes.d.ts","sourceRoot":"","sources":["../../../../src/lib/sandbox/strace/file-changes.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAiB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AASnD,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAajE,MAAM,WAAW,4BAA4B;IAC3C;;;;;OAKG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE;;;;;OAKG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AASD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,iBAAiB,CAAC,CAmJ5B"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import type { Tool } from 'ai';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export interface CommandResult {
|
|
3
|
+
stdout: string;
|
|
4
|
+
stderr: string;
|
|
5
|
+
exitCode: number;
|
|
6
|
+
/** Host-only data omitted from model-facing tool output. */
|
|
7
|
+
meta?: Record<string, unknown>;
|
|
8
|
+
teeFiles?: Array<{
|
|
9
|
+
command: string;
|
|
10
|
+
stdoutFile: string;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
4
13
|
/**
|
|
5
14
|
* Options accepted by `DisposableSandbox.executeCommand`. Currently only
|
|
6
15
|
* `signal` (cooperative cancellation); shaped as an object so we can add
|
|
@@ -9,6 +18,14 @@ import type { SkillPathMapping } from '../skills/types.ts';
|
|
|
9
18
|
export interface ExecuteCommandOptions {
|
|
10
19
|
signal?: AbortSignal;
|
|
11
20
|
}
|
|
21
|
+
export interface Sandbox {
|
|
22
|
+
executeCommand(command: string, options?: ExecuteCommandOptions): Promise<CommandResult>;
|
|
23
|
+
readFile(path: string): Promise<string>;
|
|
24
|
+
writeFiles(files: Array<{
|
|
25
|
+
path: string;
|
|
26
|
+
content: string | Buffer;
|
|
27
|
+
}>): Promise<void>;
|
|
28
|
+
}
|
|
12
29
|
export interface SpawnOptions {
|
|
13
30
|
signal?: AbortSignal;
|
|
14
31
|
env?: Record<string, string>;
|
|
@@ -26,9 +43,8 @@ export interface SandboxProcess {
|
|
|
26
43
|
readonly exit: Promise<ExitInfo>;
|
|
27
44
|
}
|
|
28
45
|
/**
|
|
29
|
-
* Sandbox contract used throughout this package:
|
|
30
|
-
*
|
|
31
|
-
* optional cancellation. Every backend (virtual, docker, agent-os)
|
|
46
|
+
* Sandbox contract used throughout this package: buffered command execution,
|
|
47
|
+
* file IO, and a lifecycle hook. Every backend (virtual, docker, agent-os)
|
|
32
48
|
* implements this so callers can dispose uniformly. Backends that honor
|
|
33
49
|
* `options.signal` forward it to their runner; others ignore. Pure
|
|
34
50
|
* backends with no external resources (e.g. virtual-sandbox) supply a
|
|
@@ -39,8 +55,7 @@ export interface SandboxProcess {
|
|
|
39
55
|
* feature-detect with `if (!sandbox.spawn) ...` — no silent fallback that
|
|
40
56
|
* aggregates output and flushes on completion.
|
|
41
57
|
*/
|
|
42
|
-
export interface DisposableSandbox extends
|
|
43
|
-
executeCommand(command: string, options?: ExecuteCommandOptions): Promise<CommandResult>;
|
|
58
|
+
export interface DisposableSandbox extends Sandbox, AsyncDisposable {
|
|
44
59
|
spawn?(command: string, options?: SpawnOptions): SandboxProcess;
|
|
45
60
|
/**
|
|
46
61
|
* Release the backend's external resources. Called explicitly, or
|
|
@@ -69,39 +84,71 @@ export interface SandboxReadinessOptions {
|
|
|
69
84
|
readiness?: (sandbox: DisposableSandbox) => void | Promise<void>;
|
|
70
85
|
}
|
|
71
86
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* and exposes the result on `sandbox.skills`.
|
|
75
|
-
*/
|
|
76
|
-
export interface SkillUploadInput {
|
|
77
|
-
/** Host directory containing skill subdirectories (each with a SKILL.md). */
|
|
78
|
-
host: string;
|
|
79
|
-
/** Destination inside the sandbox (e.g. `/workspace/skills`). */
|
|
80
|
-
sandbox: string;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Input schema exposed by the wrapped bash tool — adds a required `reasoning`
|
|
84
|
-
* field on top of the upstream `{ command }` shape.
|
|
87
|
+
* Input schema exposed by the bash tool. `reasoning` is required for an
|
|
88
|
+
* auditable explanation of every model-initiated command.
|
|
85
89
|
*/
|
|
86
90
|
export interface BashToolInput {
|
|
87
91
|
command: string;
|
|
88
92
|
reasoning: string;
|
|
89
93
|
}
|
|
90
|
-
|
|
91
|
-
export
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
94
|
+
export type BashToolResult = CommandResult;
|
|
95
|
+
export interface ReadFileToolInput {
|
|
96
|
+
path: string;
|
|
97
|
+
}
|
|
98
|
+
export interface ReadFileToolResult {
|
|
99
|
+
content: string;
|
|
100
|
+
}
|
|
101
|
+
export interface WriteFileToolInput {
|
|
102
|
+
path: string;
|
|
103
|
+
content: string;
|
|
104
|
+
}
|
|
105
|
+
export type WriteFileToolResult = {
|
|
106
|
+
success: true;
|
|
107
|
+
} | CommandResult;
|
|
108
|
+
export interface BeforeBashCallInput {
|
|
109
|
+
command: string;
|
|
110
|
+
}
|
|
111
|
+
export interface BeforeBashCallOutput {
|
|
112
|
+
command: string;
|
|
113
|
+
}
|
|
114
|
+
export interface AfterBashCallInput {
|
|
115
|
+
command: string;
|
|
116
|
+
result: CommandResult;
|
|
117
|
+
}
|
|
118
|
+
export interface AfterBashCallOutput {
|
|
119
|
+
result?: CommandResult;
|
|
120
|
+
meta?: Record<string, unknown>;
|
|
121
|
+
}
|
|
122
|
+
export interface CreateBashToolOptions {
|
|
123
|
+
sandbox: DisposableSandbox;
|
|
124
|
+
destination?: string;
|
|
125
|
+
files?: Record<string, string>;
|
|
126
|
+
uploadDirectory?: {
|
|
127
|
+
source: string;
|
|
128
|
+
include?: string;
|
|
129
|
+
};
|
|
130
|
+
extraInstructions?: string;
|
|
131
|
+
promptOptions?: {
|
|
132
|
+
toolPrompt?: string;
|
|
133
|
+
};
|
|
134
|
+
onBeforeBashCall?: (input: BeforeBashCallInput) => BeforeBashCallOutput | undefined;
|
|
135
|
+
onAfterBashCall?: (input: AfterBashCallInput) => AfterBashCallOutput | undefined;
|
|
136
|
+
maxOutputLength?: number;
|
|
137
|
+
maxFiles?: number;
|
|
138
|
+
experimentalTeeTransform?: boolean;
|
|
139
|
+
}
|
|
140
|
+
export type WrappedBashTool = Tool<BashToolInput, BashToolResult>;
|
|
141
|
+
export type ReadFileTool = Tool<ReadFileToolInput, ReadFileToolResult>;
|
|
142
|
+
export type WriteFileTool = Tool<WriteFileToolInput, WriteFileToolResult>;
|
|
143
|
+
export interface BashToolkit {
|
|
101
144
|
bash: WrappedBashTool;
|
|
102
|
-
tools:
|
|
145
|
+
tools: {
|
|
103
146
|
bash: WrappedBashTool;
|
|
147
|
+
readFile: ReadFileTool;
|
|
148
|
+
writeFile: WriteFileTool;
|
|
104
149
|
};
|
|
105
150
|
sandbox: DisposableSandbox;
|
|
106
151
|
}
|
|
152
|
+
/** Bash/read/write tools and their underlying sandbox for use by an agent. */
|
|
153
|
+
export type AgentSandbox = BashToolkit;
|
|
107
154
|
//# sourceMappingURL=types.d.ts.map
|