@gajae-code/coding-agent 0.5.4 → 0.6.1
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 +23 -0
- package/dist/types/cli/web-search-cli.d.ts +12 -0
- package/dist/types/commands/rlm.d.ts +10 -0
- package/dist/types/commands/web-search.d.ts +54 -0
- package/dist/types/config/keybindings.d.ts +10 -0
- package/dist/types/config/model-profiles.d.ts +2 -1
- package/dist/types/config/model-registry.d.ts +3 -0
- package/dist/types/config/models-config-schema.d.ts +3 -0
- package/dist/types/config/settings-schema.d.ts +61 -3
- package/dist/types/edit/notebook.d.ts +3 -0
- package/dist/types/eval/py/executor.d.ts +3 -0
- package/dist/types/eval/py/kernel.d.ts +3 -1
- package/dist/types/eval/py/runtime.d.ts +9 -1
- package/dist/types/exec/bash-executor.d.ts +4 -0
- package/dist/types/extensibility/custom-tools/types.d.ts +2 -0
- package/dist/types/extensibility/custom-tools/wrapper.d.ts +1 -0
- package/dist/types/extensibility/extensions/types.d.ts +2 -0
- package/dist/types/extensibility/extensions/wrapper.d.ts +1 -0
- package/dist/types/gjc-runtime/launch-tmux.d.ts +6 -0
- package/dist/types/gjc-runtime/session-state-sidecar.d.ts +14 -0
- package/dist/types/gjc-runtime/tmux-common.d.ts +6 -0
- package/dist/types/gjc-runtime/tmux-gc.d.ts +3 -3
- package/dist/types/gjc-runtime/tmux-sessions.d.ts +4 -0
- package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +18 -0
- package/dist/types/goals/state.d.ts +1 -1
- package/dist/types/goals/tools/goal-tool.d.ts +2 -0
- package/dist/types/main.d.ts +11 -0
- package/dist/types/modes/components/custom-editor.d.ts +4 -2
- package/dist/types/modes/components/custom-model-preset-wizard.d.ts +12 -0
- package/dist/types/modes/components/model-selector.d.ts +5 -2
- package/dist/types/modes/components/status-line.d.ts +4 -1
- package/dist/types/modes/controllers/input-controller.d.ts +3 -0
- package/dist/types/modes/controllers/selector-controller.d.ts +1 -0
- package/dist/types/modes/print-mode.d.ts +6 -0
- package/dist/types/modes/rpc/rpc-client.d.ts +21 -0
- package/dist/types/modes/rpc/rpc-socket-security.d.ts +7 -0
- package/dist/types/modes/rpc/rpc-types.d.ts +13 -0
- package/dist/types/modes/shared/agent-wire/command-dispatch.d.ts +2 -0
- package/dist/types/modes/shared/agent-wire/unattended-session.d.ts +1 -0
- package/dist/types/rlm/artifacts.d.ts +9 -0
- package/dist/types/rlm/complete-research-tool.d.ts +35 -0
- package/dist/types/rlm/data-context.d.ts +6 -0
- package/dist/types/rlm/index.d.ts +35 -0
- package/dist/types/rlm/notebook.d.ts +12 -0
- package/dist/types/rlm/preset.d.ts +23 -0
- package/dist/types/rlm/python-tool.d.ts +16 -0
- package/dist/types/rlm/report.d.ts +14 -0
- package/dist/types/rlm/types.d.ts +37 -0
- package/dist/types/sdk.d.ts +7 -0
- package/dist/types/session/agent-session.d.ts +21 -0
- package/dist/types/tools/bash-allowed-prefixes.d.ts +6 -1
- package/dist/types/tools/browser/attach.d.ts +19 -3
- package/dist/types/tools/browser/registry.d.ts +15 -0
- package/dist/types/tools/browser/render.d.ts +3 -0
- package/dist/types/tools/browser.d.ts +18 -1
- package/dist/types/tools/computer/render.d.ts +17 -0
- package/dist/types/tools/computer.d.ts +465 -0
- package/dist/types/tools/index.d.ts +24 -1
- package/dist/types/tools/job.d.ts +13 -0
- package/dist/types/tools/tool-timeouts.d.ts +5 -0
- package/dist/types/web/search/index.d.ts +32 -2
- package/dist/types/web/search/providers/base.d.ts +22 -0
- package/dist/types/web/search/providers/xai.d.ts +64 -0
- package/dist/types/web/search/types.d.ts +11 -3
- package/package.json +7 -7
- package/src/cli/web-search-cli.ts +123 -8
- package/src/cli.ts +2 -0
- package/src/commands/rlm.ts +19 -0
- package/src/commands/web-search.ts +66 -0
- package/src/config/keybindings.ts +11 -0
- package/src/config/model-profiles.ts +11 -3
- package/src/config/model-registry.ts +55 -1
- package/src/config/models-config-schema.ts +1 -0
- package/src/config/settings-schema.ts +67 -1
- package/src/edit/notebook.ts +6 -2
- package/src/eval/py/executor.ts +8 -1
- package/src/eval/py/kernel.ts +9 -4
- package/src/eval/py/runtime.ts +153 -32
- package/src/exec/bash-executor.ts +10 -4
- package/src/extensibility/custom-tools/types.ts +2 -0
- package/src/extensibility/custom-tools/wrapper.ts +2 -0
- package/src/extensibility/extensions/types.ts +2 -0
- package/src/extensibility/extensions/wrapper.ts +1 -0
- package/src/gjc-runtime/launch-tmux.ts +129 -1
- package/src/gjc-runtime/session-state-sidecar.ts +61 -1
- package/src/gjc-runtime/tmux-common.ts +26 -2
- package/src/gjc-runtime/tmux-gc.ts +40 -27
- package/src/gjc-runtime/tmux-sessions.ts +13 -1
- package/src/gjc-runtime/ultragoal-runtime.ts +340 -18
- package/src/goals/runtime.ts +4 -3
- package/src/goals/state.ts +1 -1
- package/src/goals/tools/goal-tool.ts +16 -3
- package/src/internal-urls/docs-index.generated.ts +13 -9
- package/src/main.ts +28 -3
- package/src/modes/components/custom-editor.ts +13 -4
- package/src/modes/components/custom-model-preset-wizard.ts +293 -0
- package/src/modes/components/hook-selector.ts +1 -1
- package/src/modes/components/model-selector.ts +72 -29
- package/src/modes/components/skill-message.ts +62 -8
- package/src/modes/components/status-line.ts +13 -1
- package/src/modes/controllers/input-controller.ts +60 -11
- package/src/modes/controllers/selector-controller.ts +39 -0
- package/src/modes/interactive-mode.ts +1 -1
- package/src/modes/print-mode.ts +14 -4
- package/src/modes/rpc/rpc-client.ts +250 -80
- package/src/modes/rpc/rpc-mode.ts +6 -12
- package/src/modes/rpc/rpc-socket-security.ts +103 -0
- package/src/modes/rpc/rpc-types.ts +10 -0
- package/src/modes/shared/agent-wire/command-dispatch.ts +7 -0
- package/src/modes/shared/agent-wire/command-validation.ts +1 -0
- package/src/modes/shared/agent-wire/scopes.ts +1 -0
- package/src/modes/shared/agent-wire/unattended-session.ts +9 -0
- package/src/modes/utils/hotkeys-markdown.ts +4 -2
- package/src/modes/utils/ui-helpers.ts +2 -2
- package/src/prompts/goals/goal-continuation.md +1 -0
- package/src/prompts/goals/goal-mode-active.md +1 -0
- package/src/prompts/system/rlm-report-command.md +1 -0
- package/src/prompts/system/rlm-research.md +23 -0
- package/src/prompts/tools/bash.md +23 -2
- package/src/prompts/tools/browser.md +7 -3
- package/src/prompts/tools/computer.md +74 -0
- package/src/prompts/tools/goal.md +3 -0
- package/src/prompts/tools/job.md +9 -1
- package/src/prompts/tools/web-search.md +7 -0
- package/src/rlm/artifacts.ts +60 -0
- package/src/rlm/complete-research-tool.ts +163 -0
- package/src/rlm/data-context.ts +26 -0
- package/src/rlm/index.ts +339 -0
- package/src/rlm/notebook.ts +108 -0
- package/src/rlm/preset.ts +76 -0
- package/src/rlm/python-tool.ts +68 -0
- package/src/rlm/report.ts +70 -0
- package/src/rlm/types.ts +40 -0
- package/src/sdk.ts +12 -0
- package/src/session/agent-session.ts +48 -3
- package/src/slash-commands/builtin-registry.ts +17 -0
- package/src/tools/bash-allowed-prefixes.ts +84 -1
- package/src/tools/bash.ts +80 -13
- package/src/tools/browser/attach.ts +103 -3
- package/src/tools/browser/registry.ts +176 -2
- package/src/tools/browser/render.ts +9 -1
- package/src/tools/browser.ts +33 -0
- package/src/tools/computer/render.ts +78 -0
- package/src/tools/computer.ts +640 -0
- package/src/tools/index.ts +41 -1
- package/src/tools/job.ts +88 -5
- package/src/tools/json-tree.ts +42 -29
- package/src/tools/renderers.ts +2 -0
- package/src/tools/tool-timeouts.ts +1 -0
- package/src/web/search/index.ts +27 -2
- package/src/web/search/provider.ts +16 -1
- package/src/web/search/providers/base.ts +22 -0
- package/src/web/search/providers/xai.ts +511 -0
- package/src/web/search/render.ts +7 -0
- package/src/web/search/types.ts +11 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Component } from "@gajae-code/tui";
|
|
2
|
+
import type { RenderResultOptions } from "../../extensibility/custom-tools/types";
|
|
3
|
+
import type { Theme } from "../../modes/theme/theme";
|
|
4
|
+
import type { ComputerToolDetails } from "../computer";
|
|
5
|
+
export declare function summarizeComputerDetails(details: ComputerToolDetails | undefined, isError: boolean, theme: Theme): string;
|
|
6
|
+
export declare const computerToolRenderer: {
|
|
7
|
+
renderCall(args: unknown, _options: RenderResultOptions, theme: Theme): Component;
|
|
8
|
+
renderResult(result: {
|
|
9
|
+
content: Array<{
|
|
10
|
+
type: string;
|
|
11
|
+
text?: string;
|
|
12
|
+
}>;
|
|
13
|
+
details?: unknown;
|
|
14
|
+
isError?: boolean;
|
|
15
|
+
}, _options: RenderResultOptions, theme: Theme): Component;
|
|
16
|
+
mergeCallAndResult: boolean;
|
|
17
|
+
};
|
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@gajae-code/agent-core";
|
|
2
|
+
import * as z from "zod/v4";
|
|
3
|
+
import type { ToolSession } from "./index";
|
|
4
|
+
import type { OutputMeta } from "./output-meta";
|
|
5
|
+
export declare const singleComputerSchema: z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
6
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
action: z.ZodLiteral<"screenshot">;
|
|
9
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
action: z.ZodLiteral<"click">;
|
|
13
|
+
x: z.ZodNumber;
|
|
14
|
+
y: z.ZodNumber;
|
|
15
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
16
|
+
left: "left";
|
|
17
|
+
middle: "middle";
|
|
18
|
+
right: "right";
|
|
19
|
+
}>>;
|
|
20
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
21
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
+
action: z.ZodLiteral<"double_click">;
|
|
24
|
+
x: z.ZodNumber;
|
|
25
|
+
y: z.ZodNumber;
|
|
26
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
27
|
+
left: "left";
|
|
28
|
+
middle: "middle";
|
|
29
|
+
right: "right";
|
|
30
|
+
}>>;
|
|
31
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
32
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
action: z.ZodLiteral<"move">;
|
|
35
|
+
x: z.ZodNumber;
|
|
36
|
+
y: z.ZodNumber;
|
|
37
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
38
|
+
left: "left";
|
|
39
|
+
middle: "middle";
|
|
40
|
+
right: "right";
|
|
41
|
+
}>>;
|
|
42
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
43
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
action: z.ZodLiteral<"drag">;
|
|
46
|
+
x: z.ZodNumber;
|
|
47
|
+
y: z.ZodNumber;
|
|
48
|
+
to_x: z.ZodNumber;
|
|
49
|
+
to_y: z.ZodNumber;
|
|
50
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
51
|
+
left: "left";
|
|
52
|
+
middle: "middle";
|
|
53
|
+
right: "right";
|
|
54
|
+
}>>;
|
|
55
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
56
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
+
action: z.ZodLiteral<"scroll">;
|
|
59
|
+
x: z.ZodNumber;
|
|
60
|
+
y: z.ZodNumber;
|
|
61
|
+
scroll_x: z.ZodNumber;
|
|
62
|
+
scroll_y: z.ZodNumber;
|
|
63
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
64
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
65
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
action: z.ZodLiteral<"type">;
|
|
67
|
+
text: z.ZodString;
|
|
68
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
69
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
+
action: z.ZodLiteral<"keypress">;
|
|
72
|
+
keys: z.ZodArray<z.ZodString>;
|
|
73
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
74
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
76
|
+
action: z.ZodLiteral<"wait">;
|
|
77
|
+
ms: z.ZodNumber;
|
|
78
|
+
}, z.core.$strict>], "action">;
|
|
79
|
+
export declare const computerSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
80
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
82
|
+
action: z.ZodLiteral<"screenshot">;
|
|
83
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
84
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
86
|
+
action: z.ZodLiteral<"click">;
|
|
87
|
+
x: z.ZodNumber;
|
|
88
|
+
y: z.ZodNumber;
|
|
89
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
90
|
+
left: "left";
|
|
91
|
+
middle: "middle";
|
|
92
|
+
right: "right";
|
|
93
|
+
}>>;
|
|
94
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
95
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
97
|
+
action: z.ZodLiteral<"double_click">;
|
|
98
|
+
x: z.ZodNumber;
|
|
99
|
+
y: z.ZodNumber;
|
|
100
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
101
|
+
left: "left";
|
|
102
|
+
middle: "middle";
|
|
103
|
+
right: "right";
|
|
104
|
+
}>>;
|
|
105
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
106
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
108
|
+
action: z.ZodLiteral<"move">;
|
|
109
|
+
x: z.ZodNumber;
|
|
110
|
+
y: z.ZodNumber;
|
|
111
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
112
|
+
left: "left";
|
|
113
|
+
middle: "middle";
|
|
114
|
+
right: "right";
|
|
115
|
+
}>>;
|
|
116
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
117
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
+
action: z.ZodLiteral<"drag">;
|
|
120
|
+
x: z.ZodNumber;
|
|
121
|
+
y: z.ZodNumber;
|
|
122
|
+
to_x: z.ZodNumber;
|
|
123
|
+
to_y: z.ZodNumber;
|
|
124
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
125
|
+
left: "left";
|
|
126
|
+
middle: "middle";
|
|
127
|
+
right: "right";
|
|
128
|
+
}>>;
|
|
129
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
130
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
131
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
132
|
+
action: z.ZodLiteral<"scroll">;
|
|
133
|
+
x: z.ZodNumber;
|
|
134
|
+
y: z.ZodNumber;
|
|
135
|
+
scroll_x: z.ZodNumber;
|
|
136
|
+
scroll_y: z.ZodNumber;
|
|
137
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
138
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
140
|
+
action: z.ZodLiteral<"type">;
|
|
141
|
+
text: z.ZodString;
|
|
142
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
143
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
144
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
145
|
+
action: z.ZodLiteral<"keypress">;
|
|
146
|
+
keys: z.ZodArray<z.ZodString>;
|
|
147
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
148
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
149
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
150
|
+
action: z.ZodLiteral<"wait">;
|
|
151
|
+
ms: z.ZodNumber;
|
|
152
|
+
}, z.core.$strict>], "action">, z.ZodObject<{
|
|
153
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
154
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
155
|
+
action: z.ZodLiteral<"batch">;
|
|
156
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
157
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
159
|
+
action: z.ZodLiteral<"screenshot">;
|
|
160
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
161
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
162
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
163
|
+
action: z.ZodLiteral<"click">;
|
|
164
|
+
x: z.ZodNumber;
|
|
165
|
+
y: z.ZodNumber;
|
|
166
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
167
|
+
left: "left";
|
|
168
|
+
middle: "middle";
|
|
169
|
+
right: "right";
|
|
170
|
+
}>>;
|
|
171
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
172
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
173
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
174
|
+
action: z.ZodLiteral<"double_click">;
|
|
175
|
+
x: z.ZodNumber;
|
|
176
|
+
y: z.ZodNumber;
|
|
177
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
178
|
+
left: "left";
|
|
179
|
+
middle: "middle";
|
|
180
|
+
right: "right";
|
|
181
|
+
}>>;
|
|
182
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
183
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
184
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
185
|
+
action: z.ZodLiteral<"move">;
|
|
186
|
+
x: z.ZodNumber;
|
|
187
|
+
y: z.ZodNumber;
|
|
188
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
189
|
+
left: "left";
|
|
190
|
+
middle: "middle";
|
|
191
|
+
right: "right";
|
|
192
|
+
}>>;
|
|
193
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
194
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
196
|
+
action: z.ZodLiteral<"drag">;
|
|
197
|
+
x: z.ZodNumber;
|
|
198
|
+
y: z.ZodNumber;
|
|
199
|
+
to_x: z.ZodNumber;
|
|
200
|
+
to_y: z.ZodNumber;
|
|
201
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
202
|
+
left: "left";
|
|
203
|
+
middle: "middle";
|
|
204
|
+
right: "right";
|
|
205
|
+
}>>;
|
|
206
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
207
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
208
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
209
|
+
action: z.ZodLiteral<"scroll">;
|
|
210
|
+
x: z.ZodNumber;
|
|
211
|
+
y: z.ZodNumber;
|
|
212
|
+
scroll_x: z.ZodNumber;
|
|
213
|
+
scroll_y: z.ZodNumber;
|
|
214
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
215
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
216
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
217
|
+
action: z.ZodLiteral<"type">;
|
|
218
|
+
text: z.ZodString;
|
|
219
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
220
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
221
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
222
|
+
action: z.ZodLiteral<"keypress">;
|
|
223
|
+
keys: z.ZodArray<z.ZodString>;
|
|
224
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
225
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
226
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
227
|
+
action: z.ZodLiteral<"wait">;
|
|
228
|
+
ms: z.ZodNumber;
|
|
229
|
+
}, z.core.$strict>], "action">>;
|
|
230
|
+
}, z.core.$strict>]>;
|
|
231
|
+
export type SingleComputerParams = z.infer<typeof singleComputerSchema>;
|
|
232
|
+
export type ComputerParams = z.infer<typeof computerSchema>;
|
|
233
|
+
export type ComputerActionName = ComputerParams["action"];
|
|
234
|
+
export interface ComputerScreenshotDetails {
|
|
235
|
+
widthPx: number;
|
|
236
|
+
heightPx: number;
|
|
237
|
+
scaleX?: number;
|
|
238
|
+
scaleY?: number;
|
|
239
|
+
originX?: number;
|
|
240
|
+
originY?: number;
|
|
241
|
+
displayEpoch?: string;
|
|
242
|
+
captureId?: string;
|
|
243
|
+
pngBytes?: number;
|
|
244
|
+
path?: string;
|
|
245
|
+
}
|
|
246
|
+
export interface ComputerToolDetails {
|
|
247
|
+
action: ComputerActionName;
|
|
248
|
+
status: "success" | "disabled" | "error";
|
|
249
|
+
code?: string;
|
|
250
|
+
message?: string;
|
|
251
|
+
x?: number;
|
|
252
|
+
y?: number;
|
|
253
|
+
toX?: number;
|
|
254
|
+
toY?: number;
|
|
255
|
+
scrollX?: number;
|
|
256
|
+
scrollY?: number;
|
|
257
|
+
button?: string;
|
|
258
|
+
keys?: string[];
|
|
259
|
+
ms?: number;
|
|
260
|
+
screenshot?: ComputerScreenshotDetails;
|
|
261
|
+
supervisor?: string;
|
|
262
|
+
steps?: ComputerToolDetails[];
|
|
263
|
+
meta?: OutputMeta;
|
|
264
|
+
}
|
|
265
|
+
type NativeController = {
|
|
266
|
+
screenshot?: () => Promise<NativeScreenshot> | NativeScreenshot;
|
|
267
|
+
click?: (expectedEpoch: number | undefined, x: number, y: number, button?: string) => void;
|
|
268
|
+
doubleClick?: (expectedEpoch: number | undefined, x: number, y: number, button?: string) => void;
|
|
269
|
+
move?: (expectedEpoch: number | undefined, x: number, y: number) => void;
|
|
270
|
+
drag?: (expectedEpoch: number | undefined, x: number, y: number, toX: number, toY: number, button?: string) => void;
|
|
271
|
+
scroll?: (expectedEpoch: number | undefined, x: number, y: number, scrollX: number, scrollY: number) => void;
|
|
272
|
+
type?: (expectedEpoch: number | undefined, text: string) => void;
|
|
273
|
+
keypress?: (expectedEpoch: number | undefined, keys: string[]) => void;
|
|
274
|
+
wait?: (expectedEpoch: number | undefined, ms: number) => void;
|
|
275
|
+
};
|
|
276
|
+
type NativeScreenshot = {
|
|
277
|
+
png?: Uint8Array | Buffer | ArrayBuffer | string;
|
|
278
|
+
widthPx?: number;
|
|
279
|
+
heightPx?: number;
|
|
280
|
+
scaleX?: number;
|
|
281
|
+
scaleY?: number;
|
|
282
|
+
originX?: number;
|
|
283
|
+
originY?: number;
|
|
284
|
+
displayEpoch?: string;
|
|
285
|
+
captureId?: string;
|
|
286
|
+
};
|
|
287
|
+
export type ComputerControllerFactory = () => NativeController;
|
|
288
|
+
export declare const COMPUTER_DISABLED_CODE = "COMPUTER_DISABLED";
|
|
289
|
+
export declare function setComputerControllerFactoryForTests(factory: ComputerControllerFactory | undefined): void;
|
|
290
|
+
export declare function setComputerPlatformForTests(platform: NodeJS.Platform | undefined): void;
|
|
291
|
+
export declare function setComputerArchForTests(arch: NodeJS.Architecture | undefined): void;
|
|
292
|
+
export declare function isComputerSupportedPlatform(platform?: NodeJS.Platform, arch?: NodeJS.Architecture): boolean;
|
|
293
|
+
/**
|
|
294
|
+
* Whether the computer capability is loaded/advertised at all on this platform.
|
|
295
|
+
* macOS is callable; Linux is listable (support planned); Windows is fully absent.
|
|
296
|
+
*/
|
|
297
|
+
export declare function isComputerLoadablePlatform(platform?: NodeJS.Platform): boolean;
|
|
298
|
+
export declare function isComputerEnabled(session: Pick<ToolSession, "settings">): boolean;
|
|
299
|
+
export declare function isComputerCallable(session: Pick<ToolSession, "settings">, platform?: NodeJS.Platform, arch?: NodeJS.Architecture): boolean;
|
|
300
|
+
export declare class ComputerTool implements AgentTool<typeof computerSchema, ComputerToolDetails> {
|
|
301
|
+
#private;
|
|
302
|
+
private readonly session;
|
|
303
|
+
readonly name = "computer";
|
|
304
|
+
readonly label = "Computer";
|
|
305
|
+
readonly loadMode = "discoverable";
|
|
306
|
+
readonly summary = "Control the macOS desktop (Apple Silicon) with screenshot, pointer, keyboard, scroll, and wait actions; available by default on supported hosts and supervisor-gated";
|
|
307
|
+
readonly parameters: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
308
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
309
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
310
|
+
action: z.ZodLiteral<"screenshot">;
|
|
311
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
312
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
313
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
314
|
+
action: z.ZodLiteral<"click">;
|
|
315
|
+
x: z.ZodNumber;
|
|
316
|
+
y: z.ZodNumber;
|
|
317
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
318
|
+
left: "left";
|
|
319
|
+
middle: "middle";
|
|
320
|
+
right: "right";
|
|
321
|
+
}>>;
|
|
322
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
323
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
324
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
325
|
+
action: z.ZodLiteral<"double_click">;
|
|
326
|
+
x: z.ZodNumber;
|
|
327
|
+
y: z.ZodNumber;
|
|
328
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
329
|
+
left: "left";
|
|
330
|
+
middle: "middle";
|
|
331
|
+
right: "right";
|
|
332
|
+
}>>;
|
|
333
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
334
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
335
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
336
|
+
action: z.ZodLiteral<"move">;
|
|
337
|
+
x: z.ZodNumber;
|
|
338
|
+
y: z.ZodNumber;
|
|
339
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
340
|
+
left: "left";
|
|
341
|
+
middle: "middle";
|
|
342
|
+
right: "right";
|
|
343
|
+
}>>;
|
|
344
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
345
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
346
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
347
|
+
action: z.ZodLiteral<"drag">;
|
|
348
|
+
x: z.ZodNumber;
|
|
349
|
+
y: z.ZodNumber;
|
|
350
|
+
to_x: z.ZodNumber;
|
|
351
|
+
to_y: z.ZodNumber;
|
|
352
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
353
|
+
left: "left";
|
|
354
|
+
middle: "middle";
|
|
355
|
+
right: "right";
|
|
356
|
+
}>>;
|
|
357
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
358
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
359
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
360
|
+
action: z.ZodLiteral<"scroll">;
|
|
361
|
+
x: z.ZodNumber;
|
|
362
|
+
y: z.ZodNumber;
|
|
363
|
+
scroll_x: z.ZodNumber;
|
|
364
|
+
scroll_y: z.ZodNumber;
|
|
365
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
366
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
367
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
368
|
+
action: z.ZodLiteral<"type">;
|
|
369
|
+
text: z.ZodString;
|
|
370
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
371
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
372
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
373
|
+
action: z.ZodLiteral<"keypress">;
|
|
374
|
+
keys: z.ZodArray<z.ZodString>;
|
|
375
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
376
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
377
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
378
|
+
action: z.ZodLiteral<"wait">;
|
|
379
|
+
ms: z.ZodNumber;
|
|
380
|
+
}, z.core.$strict>], "action">, z.ZodObject<{
|
|
381
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
382
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
383
|
+
action: z.ZodLiteral<"batch">;
|
|
384
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
385
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
386
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
387
|
+
action: z.ZodLiteral<"screenshot">;
|
|
388
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
389
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
390
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
391
|
+
action: z.ZodLiteral<"click">;
|
|
392
|
+
x: z.ZodNumber;
|
|
393
|
+
y: z.ZodNumber;
|
|
394
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
395
|
+
left: "left";
|
|
396
|
+
middle: "middle";
|
|
397
|
+
right: "right";
|
|
398
|
+
}>>;
|
|
399
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
400
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
401
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
402
|
+
action: z.ZodLiteral<"double_click">;
|
|
403
|
+
x: z.ZodNumber;
|
|
404
|
+
y: z.ZodNumber;
|
|
405
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
406
|
+
left: "left";
|
|
407
|
+
middle: "middle";
|
|
408
|
+
right: "right";
|
|
409
|
+
}>>;
|
|
410
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
411
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
412
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
413
|
+
action: z.ZodLiteral<"move">;
|
|
414
|
+
x: z.ZodNumber;
|
|
415
|
+
y: z.ZodNumber;
|
|
416
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
417
|
+
left: "left";
|
|
418
|
+
middle: "middle";
|
|
419
|
+
right: "right";
|
|
420
|
+
}>>;
|
|
421
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
422
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
423
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
424
|
+
action: z.ZodLiteral<"drag">;
|
|
425
|
+
x: z.ZodNumber;
|
|
426
|
+
y: z.ZodNumber;
|
|
427
|
+
to_x: z.ZodNumber;
|
|
428
|
+
to_y: z.ZodNumber;
|
|
429
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
430
|
+
left: "left";
|
|
431
|
+
middle: "middle";
|
|
432
|
+
right: "right";
|
|
433
|
+
}>>;
|
|
434
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
435
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
436
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
437
|
+
action: z.ZodLiteral<"scroll">;
|
|
438
|
+
x: z.ZodNumber;
|
|
439
|
+
y: z.ZodNumber;
|
|
440
|
+
scroll_x: z.ZodNumber;
|
|
441
|
+
scroll_y: z.ZodNumber;
|
|
442
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
443
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
444
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
445
|
+
action: z.ZodLiteral<"type">;
|
|
446
|
+
text: z.ZodString;
|
|
447
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
448
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
449
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
450
|
+
action: z.ZodLiteral<"keypress">;
|
|
451
|
+
keys: z.ZodArray<z.ZodString>;
|
|
452
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
453
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
454
|
+
include_screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
455
|
+
action: z.ZodLiteral<"wait">;
|
|
456
|
+
ms: z.ZodNumber;
|
|
457
|
+
}, z.core.$strict>], "action">>;
|
|
458
|
+
}, z.core.$strict>]>;
|
|
459
|
+
readonly strict = true;
|
|
460
|
+
constructor(session: ToolSession);
|
|
461
|
+
static createIf(session: ToolSession): ComputerTool | null;
|
|
462
|
+
get description(): string;
|
|
463
|
+
execute(_toolCallId: string, params: ComputerParams, signal?: AbortSignal, _onUpdate?: AgentToolUpdateCallback<ComputerToolDetails>, _ctx?: AgentToolContext): Promise<AgentToolResult<ComputerToolDetails>>;
|
|
464
|
+
}
|
|
465
|
+
export {};
|
|
@@ -18,6 +18,7 @@ import type { AgentOutputManager } from "../task/output-manager";
|
|
|
18
18
|
import type { DiscoverableTool, DiscoverableToolSearchIndex } from "../tool-discovery/tool-index";
|
|
19
19
|
import type { EventBus } from "../utils/event-bus";
|
|
20
20
|
import type { WorkspaceTree } from "../workspace-tree";
|
|
21
|
+
import type { BashRestrictionProfile } from "./bash-allowed-prefixes";
|
|
21
22
|
import { type CheckpointState } from "./checkpoint";
|
|
22
23
|
import { type TodoPhase } from "./todo-write";
|
|
23
24
|
export * from "../edit";
|
|
@@ -33,6 +34,7 @@ export * from "./bash";
|
|
|
33
34
|
export * from "./browser";
|
|
34
35
|
export * from "./calculator";
|
|
35
36
|
export * from "./checkpoint";
|
|
37
|
+
export * from "./computer";
|
|
36
38
|
export * from "./cron";
|
|
37
39
|
export * from "./debug";
|
|
38
40
|
export * from "./eval";
|
|
@@ -110,6 +112,12 @@ export interface ToolSession {
|
|
|
110
112
|
assertEvalExecutionAllowed?: () => void;
|
|
111
113
|
/** Track tool-owned eval work so session disposal can await/abort it like direct session eval runs. */
|
|
112
114
|
trackEvalExecution?<T>(execution: Promise<T>, abortController: AbortController): Promise<T>;
|
|
115
|
+
/** Register a safe request handler that asks a managed foreground bash call to fold into a background job. */
|
|
116
|
+
registerForegroundBashBackgroundRequestHandler?: (handler: () => void) => () => void;
|
|
117
|
+
/** Whether a managed foreground bash call is currently foldable into a background job. */
|
|
118
|
+
hasForegroundBashBackgroundRequestHandler?: () => boolean;
|
|
119
|
+
/** Request that the active managed foreground bash call fold into a background job, if supported. */
|
|
120
|
+
requestForegroundBashBackground?: () => boolean;
|
|
113
121
|
/** Get session ID */
|
|
114
122
|
getSessionId?: () => string | null;
|
|
115
123
|
/** Get Hindsight runtime state for this agent session. */
|
|
@@ -122,8 +130,12 @@ export interface ToolSession {
|
|
|
122
130
|
getToolByName?: (name: string) => AgentTool | undefined;
|
|
123
131
|
/** Agent registry for IRC routing across live sessions. */
|
|
124
132
|
agentRegistry?: AgentRegistry;
|
|
125
|
-
/** Optional restricted bash command prefixes for read-only role agents. */
|
|
133
|
+
/** Optional restricted bash command prefixes for read-only role agents and constrained modes. */
|
|
126
134
|
bashAllowedPrefixes?: string[];
|
|
135
|
+
/** Restriction policy for sessions that deliberately expose a narrow bash surface. */
|
|
136
|
+
bashRestrictionProfile?: BashRestrictionProfile;
|
|
137
|
+
/** Optional per-session allowlist for tools exposed through search_tool_bm25. */
|
|
138
|
+
discoverableToolAllowedNames?: readonly string[];
|
|
127
139
|
/** Get artifacts directory for artifact:// URLs */
|
|
128
140
|
getArtifactsDir?: () => string | null;
|
|
129
141
|
/** Get the ArtifactManager backing this session (shared across parent + subagents). */
|
|
@@ -155,6 +167,8 @@ export interface ToolSession {
|
|
|
155
167
|
getGoalModeState?: () => GoalModeState | undefined;
|
|
156
168
|
/** Unattended workflow-gate emitter (present only when unattended mode is negotiated). */
|
|
157
169
|
getWorkflowGateEmitter?: () => WorkflowGateEmitter | undefined;
|
|
170
|
+
/** Optional per-session restriction for goal tool operations. */
|
|
171
|
+
goalToolAllowedOps?: readonly ("create" | "get" | "complete" | "resume" | "drop" | "pause")[];
|
|
158
172
|
/** Goal runtime for the active agent session. */
|
|
159
173
|
getGoalRuntime?: () => GoalRuntime | undefined;
|
|
160
174
|
/** Bridge to the connected client (e.g. ACP editor host). Tools should route fs/terminal/permission requests through this when available. */
|
|
@@ -254,6 +268,15 @@ export declare function computeEssentialBuiltinNames(settings: Settings): string
|
|
|
254
268
|
* Hindsight memory helpers are intentionally excluded: memory is a private backend
|
|
255
269
|
* integration, not a public gajae-code tool surface.
|
|
256
270
|
*/
|
|
271
|
+
export interface BuiltinCapabilityCatalogEntry {
|
|
272
|
+
name: string;
|
|
273
|
+
label: string;
|
|
274
|
+
summary: string;
|
|
275
|
+
docsPath: string;
|
|
276
|
+
callableBuiltin: boolean;
|
|
277
|
+
defaultEnabled: boolean;
|
|
278
|
+
}
|
|
279
|
+
export declare const BUILTIN_CAPABILITY_CATALOG: readonly BuiltinCapabilityCatalogEntry[];
|
|
257
280
|
export declare const BUILTIN_TOOLS: Record<string, ToolFactory>;
|
|
258
281
|
export declare const HIDDEN_TOOLS: Record<string, ToolFactory>;
|
|
259
282
|
export type ToolName = keyof typeof BUILTIN_TOOLS;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@gajae-code/agent-core";
|
|
2
2
|
import type { Component } from "@gajae-code/tui";
|
|
3
3
|
import * as z from "zod/v4";
|
|
4
|
+
import { type AsyncJob } from "../async";
|
|
4
5
|
import type { RenderResultOptions } from "../extensibility/custom-tools/types";
|
|
5
6
|
import type { Theme } from "../modes/theme/theme";
|
|
6
7
|
import type { ToolSession } from "./index";
|
|
@@ -8,6 +9,7 @@ declare const jobSchema: z.ZodObject<{
|
|
|
8
9
|
poll: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
10
|
cancel: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
11
|
list: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
tail: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
11
13
|
}, z.core.$strip>;
|
|
12
14
|
type JobParams = z.infer<typeof jobSchema>;
|
|
13
15
|
interface JobSnapshot {
|
|
@@ -20,12 +22,21 @@ interface JobSnapshot {
|
|
|
20
22
|
errorText?: string;
|
|
21
23
|
}
|
|
22
24
|
type CancelStatus = "cancelled" | "not_found" | "already_completed" | "already_cancelled";
|
|
25
|
+
export interface JobOutputTail {
|
|
26
|
+
id: string;
|
|
27
|
+
status: AsyncJob["status"];
|
|
28
|
+
text: string;
|
|
29
|
+
startOffset: number;
|
|
30
|
+
nextOffset: number;
|
|
31
|
+
truncated: boolean;
|
|
32
|
+
}
|
|
23
33
|
export interface JobToolDetails {
|
|
24
34
|
jobs: JobSnapshot[];
|
|
25
35
|
cancelled?: {
|
|
26
36
|
id: string;
|
|
27
37
|
status: CancelStatus;
|
|
28
38
|
}[];
|
|
39
|
+
output?: JobOutputTail[];
|
|
29
40
|
}
|
|
30
41
|
export declare class JobTool implements AgentTool<typeof jobSchema, JobToolDetails> {
|
|
31
42
|
#private;
|
|
@@ -38,6 +49,7 @@ export declare class JobTool implements AgentTool<typeof jobSchema, JobToolDetai
|
|
|
38
49
|
poll: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
39
50
|
cancel: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
51
|
list: z.ZodOptional<z.ZodBoolean>;
|
|
52
|
+
tail: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
53
|
}, z.core.$strip>;
|
|
42
54
|
readonly strict = true;
|
|
43
55
|
readonly loadMode = "discoverable";
|
|
@@ -48,6 +60,7 @@ export declare class JobTool implements AgentTool<typeof jobSchema, JobToolDetai
|
|
|
48
60
|
interface JobRenderArgs {
|
|
49
61
|
poll?: string[];
|
|
50
62
|
cancel?: string[];
|
|
63
|
+
tail?: string[];
|
|
51
64
|
}
|
|
52
65
|
export declare const jobToolRenderer: {
|
|
53
66
|
inline: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Unified Web Search Tool
|
|
3
3
|
*
|
|
4
|
-
* Single tool supporting Anthropic, Perplexity, Exa, Brave, Jina, Kimi, Gemini, OpenAI code backend, Tavily, Kagi, Z.AI, SearXNG, and Synthetic
|
|
4
|
+
* Single tool supporting Anthropic, Perplexity, Exa, Brave, Jina, Kimi, Gemini, OpenAI code backend, xAI, Tavily, Kagi, Z.AI, SearXNG, and Synthetic
|
|
5
5
|
* providers with provider-specific parameters exposed conditionally.
|
|
6
6
|
*/
|
|
7
7
|
import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@gajae-code/agent-core";
|
|
@@ -24,6 +24,21 @@ export declare const webSearchSchema: z.ZodObject<{
|
|
|
24
24
|
max_tokens: z.ZodOptional<z.ZodNumber>;
|
|
25
25
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
26
26
|
num_search_results: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
xai_search_mode: z.ZodOptional<z.ZodEnum<{
|
|
28
|
+
web: "web";
|
|
29
|
+
web_and_x: "web_and_x";
|
|
30
|
+
x: "x";
|
|
31
|
+
}>>;
|
|
32
|
+
allowed_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
33
|
+
excluded_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
34
|
+
allowed_x_handles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
35
|
+
excluded_x_handles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36
|
+
from_date: z.ZodOptional<z.ZodString>;
|
|
37
|
+
to_date: z.ZodOptional<z.ZodString>;
|
|
38
|
+
enable_image_understanding: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
enable_image_search: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
enable_video_understanding: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
+
no_inline_citations: z.ZodOptional<z.ZodBoolean>;
|
|
27
42
|
}, z.core.$strip>;
|
|
28
43
|
export type SearchToolParams = z.infer<typeof webSearchSchema>;
|
|
29
44
|
export interface SearchQueryParams extends SearchToolParams {
|
|
@@ -51,7 +66,7 @@ export declare function runSearchQuery(params: SearchQueryParams, options?: {
|
|
|
51
66
|
/**
|
|
52
67
|
* Web search tool implementation.
|
|
53
68
|
*
|
|
54
|
-
* Supports Anthropic, Perplexity, Exa, Brave, Jina, Kimi, Gemini, OpenAI code backend, Z.AI, SearXNG, and Synthetic providers with automatic fallback.
|
|
69
|
+
* Supports Anthropic, Perplexity, Exa, Brave, Jina, Kimi, Gemini, OpenAI code backend, xAI, Z.AI, SearXNG, and Synthetic providers with automatic fallback.
|
|
55
70
|
*/
|
|
56
71
|
export declare class WebSearchTool implements AgentTool<typeof webSearchSchema, SearchRenderDetails> {
|
|
57
72
|
#private;
|
|
@@ -70,6 +85,21 @@ export declare class WebSearchTool implements AgentTool<typeof webSearchSchema,
|
|
|
70
85
|
max_tokens: z.ZodOptional<z.ZodNumber>;
|
|
71
86
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
72
87
|
num_search_results: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
xai_search_mode: z.ZodOptional<z.ZodEnum<{
|
|
89
|
+
web: "web";
|
|
90
|
+
web_and_x: "web_and_x";
|
|
91
|
+
x: "x";
|
|
92
|
+
}>>;
|
|
93
|
+
allowed_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
94
|
+
excluded_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
95
|
+
allowed_x_handles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
96
|
+
excluded_x_handles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
97
|
+
from_date: z.ZodOptional<z.ZodString>;
|
|
98
|
+
to_date: z.ZodOptional<z.ZodString>;
|
|
99
|
+
enable_image_understanding: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
+
enable_image_search: z.ZodOptional<z.ZodBoolean>;
|
|
101
|
+
enable_video_understanding: z.ZodOptional<z.ZodBoolean>;
|
|
102
|
+
no_inline_citations: z.ZodOptional<z.ZodBoolean>;
|
|
73
103
|
}, z.core.$strip>;
|
|
74
104
|
readonly strict = true;
|
|
75
105
|
readonly loadMode = "discoverable";
|