@denizokcu/haze 0.9.0 → 0.10.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/CHANGELOG.md +57 -17
- package/README.md +119 -64
- package/dist/cli/chat/chatMetrics.d.ts +17 -1
- package/dist/cli/chat/chatMetrics.js +22 -5
- package/dist/cli/chat/contextReport.d.ts +11 -0
- package/dist/cli/chat/contextReport.js +44 -0
- package/dist/cli/chat/fileMentionSuggestions.d.ts +29 -0
- package/dist/cli/chat/fileMentionSuggestions.js +91 -0
- package/dist/cli/chat/inputSuggestions.d.ts +5 -0
- package/dist/cli/chat/inputSuggestions.js +17 -3
- package/dist/cli/chat/sessionLifecycle.d.ts +58 -0
- package/dist/cli/chat/sessionLifecycle.js +155 -0
- package/dist/cli/chat/sessionRecorder.js +7 -9
- package/dist/cli/chat/startupInfo.d.ts +1 -0
- package/dist/cli/chat/startupInfo.js +11 -0
- package/dist/cli/chat/tips.d.ts +21 -0
- package/dist/cli/chat/tips.js +43 -0
- package/dist/cli/chat/wizardDispatch.d.ts +64 -0
- package/dist/cli/chat/wizardDispatch.js +645 -0
- package/dist/cli/commands/chat.d.ts +1 -0
- package/dist/cli/commands/chat.js +181 -700
- package/dist/cli/commands/chatModes.d.ts +1 -1
- package/dist/cli/commands/chatModes.js +7 -2
- package/dist/cli/commands/commandHelp.js +5 -3
- package/dist/cli/commands/commands.d.ts +3 -2
- package/dist/cli/commands/commands.js +12 -13
- package/dist/cli/commands/fleetCommand.d.ts +14 -0
- package/dist/cli/commands/fleetCommand.js +46 -0
- package/dist/cli/commands/formatters.d.ts +5 -0
- package/dist/cli/commands/formatters.js +33 -6
- package/dist/cli/commands/logsCommand.js +1 -7
- package/dist/cli/commands/modelCommand.js +1 -1
- package/dist/cli/commands/providerWizard.d.ts +1 -0
- package/dist/cli/commands/providerWizard.js +13 -0
- package/dist/cli/commands/runCommand.d.ts +1 -0
- package/dist/cli/commands/runCommand.js +25 -5
- package/dist/cli/commands/sessionPicker.d.ts +9 -0
- package/dist/cli/commands/sessionPicker.js +29 -0
- package/dist/cli/commands/settingsSummary.js +6 -4
- package/dist/cli/commands/skillConfirmRemove.js +4 -3
- package/dist/cli/commands/skillWizard.d.ts +2 -0
- package/dist/cli/commands/skillWizard.js +16 -6
- package/dist/cli/commands/streaming/idleTimer.d.ts +26 -0
- package/dist/cli/commands/streaming/idleTimer.js +24 -0
- package/dist/cli/commands/streaming/toolGroupRenderer.d.ts +2 -0
- package/dist/cli/commands/streaming/toolGroupRenderer.js +4 -2
- package/dist/cli/commands/streaming/turnRuntime.js +6 -4
- package/dist/cli/commands/streaming.d.ts +13 -1
- package/dist/cli/commands/streaming.js +42 -19
- package/dist/cli/commands/wizardActions.d.ts +6 -0
- package/dist/cli/commands/wizardActions.js +6 -0
- package/dist/cli/commands/wizardSuggestions.d.ts +8 -0
- package/dist/cli/commands/wizardSuggestions.js +60 -12
- package/dist/cli/commands/wizardTransition.d.ts +4 -0
- package/dist/cli/commands/wizardTransition.js +1 -2
- package/dist/cli/index.js +17 -3
- package/dist/cli/terminalTitle.d.ts +6 -0
- package/dist/cli/terminalTitle.js +36 -0
- package/dist/config/inputHistory.d.ts +3 -3
- package/dist/config/inputHistory.js +12 -18
- package/dist/config/modelDiscovery.d.ts +20 -0
- package/dist/config/modelDiscovery.js +51 -0
- package/dist/config/providerPresets.d.ts +16 -4
- package/dist/config/providerPresets.js +263 -34
- package/dist/config/providers.d.ts +2 -0
- package/dist/config/providers.js +7 -0
- package/dist/config/settings.d.ts +22 -0
- package/dist/config/settings.js +29 -1
- package/dist/config/skillSettings.d.ts +6 -13
- package/dist/config/skillSettings.js +20 -19
- package/dist/core/agent/budgets.d.ts +26 -0
- package/dist/core/agent/budgets.js +34 -0
- package/dist/core/agent/compaction.js +17 -3
- package/dist/core/agent/contextBudget.d.ts +8 -0
- package/dist/core/agent/contextBudget.js +29 -0
- package/dist/core/agent/errors.js +6 -2
- package/dist/core/agent/events.d.ts +12 -0
- package/dist/core/agent/toolOutputStore.d.ts +5 -0
- package/dist/core/agent/toolOutputStore.js +18 -1
- package/dist/core/agent/workState.d.ts +1 -1
- package/dist/core/agent/workState.js +0 -4
- package/dist/core/attachments/imageAttachments.d.ts +90 -0
- package/dist/core/attachments/imageAttachments.js +245 -0
- package/dist/core/attachments/readBlessings.d.ts +37 -0
- package/dist/core/attachments/readBlessings.js +79 -0
- package/dist/core/goal/requestClassifier.d.ts +0 -3
- package/dist/core/goal/requestClassifier.js +0 -13
- package/dist/core/io/boundedRead.js +76 -29
- package/dist/core/limits/byteBudgets.d.ts +5 -0
- package/dist/core/limits/byteBudgets.js +5 -0
- package/dist/core/limits/textBudgets.d.ts +23 -0
- package/dist/core/limits/textBudgets.js +23 -0
- package/dist/core/process/backgroundRegistry.d.ts +35 -0
- package/dist/core/process/backgroundRegistry.js +194 -0
- package/dist/core/process/runBoundedProcess.d.ts +3 -0
- package/dist/core/process/runBoundedProcess.js +65 -29
- package/dist/core/safety/urlGuard.d.ts +2 -1
- package/dist/core/safety/urlGuard.js +3 -2
- package/dist/core/session/sessionSlimming.js +47 -4
- package/dist/core/session/sessionStore.d.ts +37 -0
- package/dist/core/session/sessionStore.js +95 -9
- package/dist/core/subagent/contracts.d.ts +116 -0
- package/dist/core/subagent/contracts.js +54 -0
- package/dist/core/subagent/executionProfiles.d.ts +28 -0
- package/dist/core/subagent/executionProfiles.js +45 -0
- package/dist/core/subagent/subagentCoordinator.d.ts +74 -0
- package/dist/core/subagent/subagentCoordinator.js +134 -0
- package/dist/core/subagent/subagentRunner.d.ts +211 -145
- package/dist/core/subagent/subagentRunner.js +228 -98
- package/dist/core/subagent/workspaceMutationPolicy.d.ts +11 -0
- package/dist/core/subagent/workspaceMutationPolicy.js +52 -0
- package/dist/core/tasks/taskStorage.js +12 -1
- package/dist/llm/client.d.ts +20 -29
- package/dist/llm/client.js +29 -28
- package/dist/llm/hazeTools.d.ts +2013 -78
- package/dist/llm/hazeTools.js +16 -7
- package/dist/llm/lsp.d.ts +2 -0
- package/dist/llm/lsp.js +18 -3
- package/dist/llm/requestContext.d.ts +22 -1
- package/dist/llm/requestContext.js +45 -5
- package/dist/llm/systemPrompt.d.ts +4 -1
- package/dist/llm/systemPrompt.js +14 -4
- package/dist/llm/toolResultTypes.d.ts +1 -1
- package/dist/llm/tools/bashTool.d.ts +874 -32
- package/dist/llm/tools/bashTool.js +25 -4
- package/dist/llm/tools/fetchTool.d.ts +26 -26
- package/dist/llm/tools/fetchTool.js +1 -1
- package/dist/llm/tools/fileToolShared.d.ts +2 -1
- package/dist/llm/tools/fileToolShared.js +5 -5
- package/dist/llm/tools/grepRunner.d.ts +5 -0
- package/dist/llm/tools/grepRunner.js +52 -71
- package/dist/llm/tools/outputCap.d.ts +2 -6
- package/dist/llm/tools/outputCap.js +2 -6
- package/dist/llm/tools/processTool.d.ts +1077 -0
- package/dist/llm/tools/processTool.js +41 -0
- package/dist/llm/tools/toolContext.d.ts +8 -0
- package/dist/llm/tools/toolContext.js +22 -11
- package/dist/llm/tools/workspaceFile.d.ts +9 -1
- package/dist/llm/tools/workspaceFile.js +33 -4
- package/dist/llm/webFetch.js +24 -11
- package/dist/llm/workerContext.d.ts +18 -0
- package/dist/llm/workerContext.js +55 -0
- package/dist/skills/SkillLoader.d.ts +2 -2
- package/dist/skills/SkillRegistry.d.ts +3 -2
- package/dist/skills/SkillRegistry.js +43 -13
- package/dist/skills/builder/SkillBuilder.d.ts +3 -0
- package/dist/skills/builder/SkillBuilder.js +23 -5
- package/dist/skills/skillTools.js +11 -4
- package/dist/skills/types.d.ts +6 -1
- package/dist/ui/components/TextInput.d.ts +5 -2
- package/dist/ui/components/TextInput.js +76 -8
- package/dist/utils/format.d.ts +2 -0
- package/dist/utils/format.js +8 -0
- package/dist/utils/fs.d.ts +0 -1
- package/dist/utils/fs.js +0 -4
- package/dist/utils/openPath.d.ts +2 -0
- package/dist/utils/openPath.js +9 -0
- package/package.json +1 -1
|
@@ -1,93 +1,112 @@
|
|
|
1
|
-
import { streamText } from 'ai';
|
|
2
|
-
import { type PromptSession } from '../../llm/systemPrompt.js';
|
|
3
|
-
import { toolOnlyStepCount } from '../agent/turnPolicy.js';
|
|
4
1
|
import type { ContextFile } from '../../config/contextFiles.js';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
out: number;
|
|
17
|
-
};
|
|
18
|
-
durationMs: number;
|
|
19
|
-
error?: string;
|
|
20
|
-
}
|
|
21
|
-
declare function toolSummary(output: unknown): string;
|
|
22
|
-
export declare const internals: {
|
|
23
|
-
toolSummary: typeof toolSummary;
|
|
24
|
-
toolOnlyStepCount: typeof toolOnlyStepCount;
|
|
2
|
+
import { toolOnlyStepCount } from '../agent/turnPolicy.js';
|
|
3
|
+
import { type WorkerContextBundle } from '../../llm/workerContext.js';
|
|
4
|
+
import type { PromptSession } from '../../llm/systemPrompt.js';
|
|
5
|
+
import { type HazeToolContext } from '../../llm/tools/toolContext.js';
|
|
6
|
+
import { type SubagentExecutionResult, type SubagentTaskCapsule, type WorkerRuntime } from './contracts.js';
|
|
7
|
+
import { type SubagentExecutionProfile } from './executionProfiles.js';
|
|
8
|
+
import { SubagentCoordinator } from './subagentCoordinator.js';
|
|
9
|
+
import { WorkspaceMutationPolicy } from './workspaceMutationPolicy.js';
|
|
10
|
+
type SubagentStep = {
|
|
11
|
+
toolCalls: unknown[];
|
|
12
|
+
text: string;
|
|
25
13
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
14
|
+
declare function toolSummary(output: unknown): string;
|
|
15
|
+
declare function shouldForceSynthesis(steps: SubagentStep[], maxSteps: number, maxToolCalls?: number): boolean;
|
|
16
|
+
declare function validationFromOutput(name: string, output: unknown): {
|
|
17
|
+
command: string;
|
|
18
|
+
ok: boolean;
|
|
19
|
+
} | undefined;
|
|
20
|
+
export type SubagentResult = SubagentExecutionResult;
|
|
21
|
+
export declare function runSubagent(taskInput: string | SubagentTaskCapsule, options: {
|
|
22
|
+
model?: WorkerRuntime['model'];
|
|
23
|
+
runtime?: WorkerRuntime;
|
|
24
|
+
profile?: SubagentExecutionProfile;
|
|
25
|
+
contextFiles?: ContextFile[];
|
|
26
|
+
contextBundle?: WorkerContextBundle;
|
|
29
27
|
allowedTools?: readonly string[];
|
|
30
28
|
maxSteps?: number;
|
|
31
29
|
abortSignal?: AbortSignal;
|
|
30
|
+
deadlineExpired?: () => boolean;
|
|
31
|
+
queueMs?: number;
|
|
32
32
|
session?: PromptSession;
|
|
33
|
-
|
|
33
|
+
mutationPolicy?: WorkspaceMutationPolicy;
|
|
34
|
+
}): Promise<SubagentExecutionResult>;
|
|
34
35
|
export declare function createSubagentTool(options: {
|
|
35
|
-
model
|
|
36
|
-
|
|
36
|
+
model?: WorkerRuntime['model'];
|
|
37
|
+
runtime?: WorkerRuntime;
|
|
38
|
+
profile?: SubagentExecutionProfile;
|
|
39
|
+
coordinator?: SubagentCoordinator;
|
|
40
|
+
mutationPolicy?: WorkspaceMutationPolicy;
|
|
41
|
+
blockedReason?: string;
|
|
42
|
+
forceMode?: 'inspect';
|
|
43
|
+
contextFiles?: ContextFile[];
|
|
37
44
|
session?: PromptSession;
|
|
38
45
|
}): ({
|
|
39
46
|
title?: string;
|
|
40
47
|
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
41
48
|
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
42
49
|
inputSchema: import("ai").FlexibleSchema<{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
objective: string;
|
|
51
|
+
deliverable: string;
|
|
52
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
53
|
+
scope?: string[] | undefined;
|
|
54
|
+
acceptanceCriteria?: string[] | undefined;
|
|
46
55
|
}>;
|
|
47
|
-
contextSchema?: import("ai").FlexibleSchema<
|
|
56
|
+
contextSchema?: import("ai").FlexibleSchema<HazeToolContext> | undefined;
|
|
48
57
|
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
58
|
+
objective: string;
|
|
59
|
+
deliverable: string;
|
|
60
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
61
|
+
scope?: string[] | undefined;
|
|
62
|
+
acceptanceCriteria?: string[] | undefined;
|
|
63
|
+
}, NoInfer<HazeToolContext>> | undefined;
|
|
64
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<HazeToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
54
65
|
onInputDelta?: ((options: {
|
|
55
66
|
inputTextDelta: string;
|
|
56
|
-
} & import("ai").ToolExecutionOptions<NoInfer<
|
|
67
|
+
} & import("ai").ToolExecutionOptions<NoInfer<HazeToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
57
68
|
onInputAvailable?: ((options: {
|
|
58
69
|
input: {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
70
|
+
objective: string;
|
|
71
|
+
deliverable: string;
|
|
72
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
73
|
+
scope?: string[] | undefined;
|
|
74
|
+
acceptanceCriteria?: string[] | undefined;
|
|
62
75
|
};
|
|
63
|
-
} & import("ai").ToolExecutionOptions<NoInfer<
|
|
76
|
+
} & import("ai").ToolExecutionOptions<NoInfer<HazeToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
64
77
|
toModelOutput?: ((options: {
|
|
65
78
|
toolCallId: string;
|
|
66
79
|
input: {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
80
|
+
objective: string;
|
|
81
|
+
deliverable: string;
|
|
82
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
83
|
+
scope?: string[] | undefined;
|
|
84
|
+
acceptanceCriteria?: string[] | undefined;
|
|
70
85
|
};
|
|
71
|
-
output: NoInfer<
|
|
86
|
+
output: NoInfer<SubagentExecutionResult>;
|
|
72
87
|
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
73
88
|
} & {
|
|
74
|
-
outputSchema?: import("ai").FlexibleSchema<
|
|
89
|
+
outputSchema?: import("ai").FlexibleSchema<SubagentExecutionResult> | undefined;
|
|
75
90
|
execute: import("ai").ToolExecuteFunction<{
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
91
|
+
objective: string;
|
|
92
|
+
deliverable: string;
|
|
93
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
94
|
+
scope?: string[] | undefined;
|
|
95
|
+
acceptanceCriteria?: string[] | undefined;
|
|
96
|
+
}, SubagentExecutionResult, NoInfer<HazeToolContext>>;
|
|
80
97
|
} & {
|
|
81
98
|
description?: string | ((options: {
|
|
82
|
-
context: NoInfer<
|
|
99
|
+
context: NoInfer<HazeToolContext>;
|
|
83
100
|
experimental_sandbox?: import("ai").Experimental_SandboxSession;
|
|
84
101
|
}) => string) | undefined;
|
|
85
102
|
strict?: boolean;
|
|
86
103
|
inputExamples?: {
|
|
87
104
|
input: NoInfer<{
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
105
|
+
objective: string;
|
|
106
|
+
deliverable: string;
|
|
107
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
108
|
+
scope?: string[] | undefined;
|
|
109
|
+
acceptanceCriteria?: string[] | undefined;
|
|
91
110
|
}>;
|
|
92
111
|
}[] | undefined;
|
|
93
112
|
id?: never;
|
|
@@ -98,63 +117,77 @@ export declare function createSubagentTool(options: {
|
|
|
98
117
|
type?: undefined | "function";
|
|
99
118
|
} & {
|
|
100
119
|
execute: import("ai").ToolExecuteFunction<{
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
120
|
+
objective: string;
|
|
121
|
+
deliverable: string;
|
|
122
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
123
|
+
scope?: string[] | undefined;
|
|
124
|
+
acceptanceCriteria?: string[] | undefined;
|
|
125
|
+
}, SubagentExecutionResult, NoInfer<HazeToolContext>>;
|
|
105
126
|
}) | ({
|
|
106
127
|
title?: string;
|
|
107
128
|
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
108
129
|
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
109
130
|
inputSchema: import("ai").FlexibleSchema<{
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
131
|
+
objective: string;
|
|
132
|
+
deliverable: string;
|
|
133
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
134
|
+
scope?: string[] | undefined;
|
|
135
|
+
acceptanceCriteria?: string[] | undefined;
|
|
113
136
|
}>;
|
|
114
|
-
contextSchema?: import("ai").FlexibleSchema<
|
|
137
|
+
contextSchema?: import("ai").FlexibleSchema<HazeToolContext> | undefined;
|
|
115
138
|
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
139
|
+
objective: string;
|
|
140
|
+
deliverable: string;
|
|
141
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
142
|
+
scope?: string[] | undefined;
|
|
143
|
+
acceptanceCriteria?: string[] | undefined;
|
|
144
|
+
}, NoInfer<HazeToolContext>> | undefined;
|
|
145
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<HazeToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
121
146
|
onInputDelta?: ((options: {
|
|
122
147
|
inputTextDelta: string;
|
|
123
|
-
} & import("ai").ToolExecutionOptions<NoInfer<
|
|
148
|
+
} & import("ai").ToolExecutionOptions<NoInfer<HazeToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
124
149
|
onInputAvailable?: ((options: {
|
|
125
150
|
input: {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
151
|
+
objective: string;
|
|
152
|
+
deliverable: string;
|
|
153
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
154
|
+
scope?: string[] | undefined;
|
|
155
|
+
acceptanceCriteria?: string[] | undefined;
|
|
129
156
|
};
|
|
130
|
-
} & import("ai").ToolExecutionOptions<NoInfer<
|
|
157
|
+
} & import("ai").ToolExecutionOptions<NoInfer<HazeToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
131
158
|
toModelOutput?: ((options: {
|
|
132
159
|
toolCallId: string;
|
|
133
160
|
input: {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
161
|
+
objective: string;
|
|
162
|
+
deliverable: string;
|
|
163
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
164
|
+
scope?: string[] | undefined;
|
|
165
|
+
acceptanceCriteria?: string[] | undefined;
|
|
137
166
|
};
|
|
138
|
-
output: NoInfer<
|
|
167
|
+
output: NoInfer<SubagentExecutionResult>;
|
|
139
168
|
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
140
169
|
} & {
|
|
141
|
-
outputSchema?: import("ai").FlexibleSchema<
|
|
170
|
+
outputSchema?: import("ai").FlexibleSchema<SubagentExecutionResult> | undefined;
|
|
142
171
|
execute: import("ai").ToolExecuteFunction<{
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
172
|
+
objective: string;
|
|
173
|
+
deliverable: string;
|
|
174
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
175
|
+
scope?: string[] | undefined;
|
|
176
|
+
acceptanceCriteria?: string[] | undefined;
|
|
177
|
+
}, SubagentExecutionResult, NoInfer<HazeToolContext>>;
|
|
147
178
|
} & {
|
|
148
179
|
description?: string | ((options: {
|
|
149
|
-
context: NoInfer<
|
|
180
|
+
context: NoInfer<HazeToolContext>;
|
|
150
181
|
experimental_sandbox?: import("ai").Experimental_SandboxSession;
|
|
151
182
|
}) => string) | undefined;
|
|
152
183
|
strict?: boolean;
|
|
153
184
|
inputExamples?: {
|
|
154
185
|
input: NoInfer<{
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
186
|
+
objective: string;
|
|
187
|
+
deliverable: string;
|
|
188
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
189
|
+
scope?: string[] | undefined;
|
|
190
|
+
acceptanceCriteria?: string[] | undefined;
|
|
158
191
|
}>;
|
|
159
192
|
}[] | undefined;
|
|
160
193
|
id?: never;
|
|
@@ -165,52 +198,64 @@ export declare function createSubagentTool(options: {
|
|
|
165
198
|
type: "dynamic";
|
|
166
199
|
} & {
|
|
167
200
|
execute: import("ai").ToolExecuteFunction<{
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
201
|
+
objective: string;
|
|
202
|
+
deliverable: string;
|
|
203
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
204
|
+
scope?: string[] | undefined;
|
|
205
|
+
acceptanceCriteria?: string[] | undefined;
|
|
206
|
+
}, SubagentExecutionResult, NoInfer<HazeToolContext>>;
|
|
172
207
|
}) | ({
|
|
173
208
|
title?: string;
|
|
174
209
|
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
175
210
|
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
176
211
|
inputSchema: import("ai").FlexibleSchema<{
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
212
|
+
objective: string;
|
|
213
|
+
deliverable: string;
|
|
214
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
215
|
+
scope?: string[] | undefined;
|
|
216
|
+
acceptanceCriteria?: string[] | undefined;
|
|
180
217
|
}>;
|
|
181
|
-
contextSchema?: import("ai").FlexibleSchema<
|
|
218
|
+
contextSchema?: import("ai").FlexibleSchema<HazeToolContext> | undefined;
|
|
182
219
|
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
220
|
+
objective: string;
|
|
221
|
+
deliverable: string;
|
|
222
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
223
|
+
scope?: string[] | undefined;
|
|
224
|
+
acceptanceCriteria?: string[] | undefined;
|
|
225
|
+
}, NoInfer<HazeToolContext>> | undefined;
|
|
226
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<HazeToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
188
227
|
onInputDelta?: ((options: {
|
|
189
228
|
inputTextDelta: string;
|
|
190
|
-
} & import("ai").ToolExecutionOptions<NoInfer<
|
|
229
|
+
} & import("ai").ToolExecutionOptions<NoInfer<HazeToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
191
230
|
onInputAvailable?: ((options: {
|
|
192
231
|
input: {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
232
|
+
objective: string;
|
|
233
|
+
deliverable: string;
|
|
234
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
235
|
+
scope?: string[] | undefined;
|
|
236
|
+
acceptanceCriteria?: string[] | undefined;
|
|
196
237
|
};
|
|
197
|
-
} & import("ai").ToolExecutionOptions<NoInfer<
|
|
238
|
+
} & import("ai").ToolExecutionOptions<NoInfer<HazeToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
198
239
|
toModelOutput?: ((options: {
|
|
199
240
|
toolCallId: string;
|
|
200
241
|
input: {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
242
|
+
objective: string;
|
|
243
|
+
deliverable: string;
|
|
244
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
245
|
+
scope?: string[] | undefined;
|
|
246
|
+
acceptanceCriteria?: string[] | undefined;
|
|
204
247
|
};
|
|
205
|
-
output: NoInfer<
|
|
248
|
+
output: NoInfer<SubagentExecutionResult>;
|
|
206
249
|
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
207
250
|
} & {
|
|
208
|
-
outputSchema?: import("ai").FlexibleSchema<
|
|
251
|
+
outputSchema?: import("ai").FlexibleSchema<SubagentExecutionResult> | undefined;
|
|
209
252
|
execute: import("ai").ToolExecuteFunction<{
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
253
|
+
objective: string;
|
|
254
|
+
deliverable: string;
|
|
255
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
256
|
+
scope?: string[] | undefined;
|
|
257
|
+
acceptanceCriteria?: string[] | undefined;
|
|
258
|
+
}, SubagentExecutionResult, NoInfer<HazeToolContext>>;
|
|
214
259
|
} & {
|
|
215
260
|
type: "provider";
|
|
216
261
|
id: `${string}.${string}`;
|
|
@@ -223,52 +268,64 @@ export declare function createSubagentTool(options: {
|
|
|
223
268
|
supportsDeferredResults?: never;
|
|
224
269
|
} & {
|
|
225
270
|
execute: import("ai").ToolExecuteFunction<{
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
271
|
+
objective: string;
|
|
272
|
+
deliverable: string;
|
|
273
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
274
|
+
scope?: string[] | undefined;
|
|
275
|
+
acceptanceCriteria?: string[] | undefined;
|
|
276
|
+
}, SubagentExecutionResult, NoInfer<HazeToolContext>>;
|
|
230
277
|
}) | ({
|
|
231
278
|
title?: string;
|
|
232
279
|
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
233
280
|
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
234
281
|
inputSchema: import("ai").FlexibleSchema<{
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
282
|
+
objective: string;
|
|
283
|
+
deliverable: string;
|
|
284
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
285
|
+
scope?: string[] | undefined;
|
|
286
|
+
acceptanceCriteria?: string[] | undefined;
|
|
238
287
|
}>;
|
|
239
|
-
contextSchema?: import("ai").FlexibleSchema<
|
|
288
|
+
contextSchema?: import("ai").FlexibleSchema<HazeToolContext> | undefined;
|
|
240
289
|
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
290
|
+
objective: string;
|
|
291
|
+
deliverable: string;
|
|
292
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
293
|
+
scope?: string[] | undefined;
|
|
294
|
+
acceptanceCriteria?: string[] | undefined;
|
|
295
|
+
}, NoInfer<HazeToolContext>> | undefined;
|
|
296
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<HazeToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
246
297
|
onInputDelta?: ((options: {
|
|
247
298
|
inputTextDelta: string;
|
|
248
|
-
} & import("ai").ToolExecutionOptions<NoInfer<
|
|
299
|
+
} & import("ai").ToolExecutionOptions<NoInfer<HazeToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
249
300
|
onInputAvailable?: ((options: {
|
|
250
301
|
input: {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
302
|
+
objective: string;
|
|
303
|
+
deliverable: string;
|
|
304
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
305
|
+
scope?: string[] | undefined;
|
|
306
|
+
acceptanceCriteria?: string[] | undefined;
|
|
254
307
|
};
|
|
255
|
-
} & import("ai").ToolExecutionOptions<NoInfer<
|
|
308
|
+
} & import("ai").ToolExecutionOptions<NoInfer<HazeToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
256
309
|
toModelOutput?: ((options: {
|
|
257
310
|
toolCallId: string;
|
|
258
311
|
input: {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
312
|
+
objective: string;
|
|
313
|
+
deliverable: string;
|
|
314
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
315
|
+
scope?: string[] | undefined;
|
|
316
|
+
acceptanceCriteria?: string[] | undefined;
|
|
262
317
|
};
|
|
263
|
-
output: NoInfer<
|
|
318
|
+
output: NoInfer<SubagentExecutionResult>;
|
|
264
319
|
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
265
320
|
} & {
|
|
266
|
-
outputSchema?: import("ai").FlexibleSchema<
|
|
321
|
+
outputSchema?: import("ai").FlexibleSchema<SubagentExecutionResult> | undefined;
|
|
267
322
|
execute: import("ai").ToolExecuteFunction<{
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
323
|
+
objective: string;
|
|
324
|
+
deliverable: string;
|
|
325
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
326
|
+
scope?: string[] | undefined;
|
|
327
|
+
acceptanceCriteria?: string[] | undefined;
|
|
328
|
+
}, SubagentExecutionResult, NoInfer<HazeToolContext>>;
|
|
272
329
|
} & {
|
|
273
330
|
type: "provider";
|
|
274
331
|
id: `${string}.${string}`;
|
|
@@ -281,9 +338,18 @@ export declare function createSubagentTool(options: {
|
|
|
281
338
|
supportsDeferredResults?: boolean;
|
|
282
339
|
} & {
|
|
283
340
|
execute: import("ai").ToolExecuteFunction<{
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
341
|
+
objective: string;
|
|
342
|
+
deliverable: string;
|
|
343
|
+
mode: "inspect" | "research" | "implement" | "validate";
|
|
344
|
+
scope?: string[] | undefined;
|
|
345
|
+
acceptanceCriteria?: string[] | undefined;
|
|
346
|
+
}, SubagentExecutionResult, NoInfer<HazeToolContext>>;
|
|
288
347
|
});
|
|
348
|
+
export declare const internals: {
|
|
349
|
+
toolSummary: typeof toolSummary;
|
|
350
|
+
toolOnlyStepCount: typeof toolOnlyStepCount;
|
|
351
|
+
shouldForceSynthesis: typeof shouldForceSynthesis;
|
|
352
|
+
validationFromOutput: typeof validationFromOutput;
|
|
353
|
+
SYNTHESIS_DIRECTIVE: string;
|
|
354
|
+
};
|
|
289
355
|
export {};
|