@meetopenbot/openbot 0.1.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/dist/cloud-mode.d.ts +5 -0
- package/dist/cloud-mode.js +4 -0
- package/dist/context.d.ts +11 -0
- package/dist/context.js +120 -0
- package/dist/history.d.ts +9 -0
- package/dist/history.js +145 -0
- package/dist/index.d.ts +80 -0
- package/dist/index.js +77 -0
- package/dist/model.d.ts +2 -0
- package/dist/model.js +20 -0
- package/dist/runtime.d.ts +25 -0
- package/dist/runtime.js +401 -0
- package/dist/system-prompt.d.ts +1 -0
- package/dist/system-prompt.js +57 -0
- package/dist/tools/approval.d.ts +3 -0
- package/dist/tools/approval.js +130 -0
- package/dist/tools/bash.d.ts +3 -0
- package/dist/tools/bash.js +425 -0
- package/dist/tools/delegation.d.ts +3 -0
- package/dist/tools/delegation.js +130 -0
- package/dist/tools/memory.d.ts +3 -0
- package/dist/tools/memory.js +163 -0
- package/dist/tools/preview.d.ts +4 -0
- package/dist/tools/preview.js +269 -0
- package/dist/tools/storage.d.ts +57 -0
- package/dist/tools/storage.js +335 -0
- package/dist/tools/todo-service.d.ts +28 -0
- package/dist/tools/todo-service.js +93 -0
- package/dist/tools/todo.d.ts +3 -0
- package/dist/tools/todo.js +146 -0
- package/dist/tools/ui.d.ts +9 -0
- package/dist/tools/ui.js +120 -0
- package/dist/types.d.ts +80 -0
- package/dist/types.js +12 -0
- package/dist/utils/paths.d.ts +3 -0
- package/dist/utils/paths.js +12 -0
- package/dist/utils/workspace-url.d.ts +5 -0
- package/dist/utils/workspace-url.js +6 -0
- package/package.json +32 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import { asActionBuilder } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Resolve a scope alias to a concrete scope string. Aliases let tools accept
|
|
5
|
+
* `agent`/`channel`/`global` without knowing the active ids; the bus rewrites
|
|
6
|
+
* them using `context.state`.
|
|
7
|
+
*/
|
|
8
|
+
function resolveMemoryScope(alias, state) {
|
|
9
|
+
switch (alias) {
|
|
10
|
+
case 'agent':
|
|
11
|
+
return `agent:${state.agentId}`;
|
|
12
|
+
case 'channel':
|
|
13
|
+
return `channel:${state.channelId}`;
|
|
14
|
+
case 'global':
|
|
15
|
+
case undefined:
|
|
16
|
+
return 'global';
|
|
17
|
+
default:
|
|
18
|
+
return 'global';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function resolveMemoryScopeFilter(alias, state) {
|
|
22
|
+
if (alias === 'all' || alias === undefined) {
|
|
23
|
+
return ['global', `agent:${state.agentId}`, `channel:${state.channelId}`];
|
|
24
|
+
}
|
|
25
|
+
return [resolveMemoryScope(alias, state)];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* `memory` — exposes the global memory store as agent tools and provides
|
|
29
|
+
* platform-level memory handlers.
|
|
30
|
+
*/
|
|
31
|
+
const memoryToolDefinitions = {
|
|
32
|
+
remember: {
|
|
33
|
+
description: 'Persist a durable fact, preference, or note to long-term memory so it can be recalled in future turns and runs. Use for stable information (user preferences, project conventions, contact details, decisions); avoid using it for transient chatter or per-step scratch state — that belongs in thread state. Keep entries short and self-contained.',
|
|
34
|
+
inputSchema: z.object({
|
|
35
|
+
content: z
|
|
36
|
+
.string()
|
|
37
|
+
.min(1)
|
|
38
|
+
.describe('The fact to remember, written so it makes sense out of context (e.g. "User prefers TypeScript over JavaScript.").'),
|
|
39
|
+
scope: z
|
|
40
|
+
.enum(['global', 'agent', 'channel'])
|
|
41
|
+
.optional()
|
|
42
|
+
.describe('Visibility: `global` (default, all agents everywhere), `agent` (only this agent), `channel` (only this channel).'),
|
|
43
|
+
tags: z
|
|
44
|
+
.array(z.string())
|
|
45
|
+
.optional()
|
|
46
|
+
.describe('Optional tags for filtering with `recall`.'),
|
|
47
|
+
}),
|
|
48
|
+
},
|
|
49
|
+
recall: {
|
|
50
|
+
description: 'Search long-term memory for facts you previously stored with `remember`. Returns up to `limit` matching records with their ids so you can `forget` stale ones.',
|
|
51
|
+
inputSchema: z.object({
|
|
52
|
+
query: z
|
|
53
|
+
.string()
|
|
54
|
+
.optional()
|
|
55
|
+
.describe('Case-insensitive substring filter against memory content.'),
|
|
56
|
+
tag: z.string().optional().describe('Only return memories that include this tag.'),
|
|
57
|
+
scope: z
|
|
58
|
+
.enum(['global', 'agent', 'channel', 'all'])
|
|
59
|
+
.optional()
|
|
60
|
+
.describe('Restrict the search to a single scope. Default `all` returns global + this agent + this channel.'),
|
|
61
|
+
limit: z
|
|
62
|
+
.number()
|
|
63
|
+
.int()
|
|
64
|
+
.positive()
|
|
65
|
+
.max(50)
|
|
66
|
+
.optional()
|
|
67
|
+
.describe('Maximum records to return (default 20, max 50).'),
|
|
68
|
+
}),
|
|
69
|
+
},
|
|
70
|
+
forget: {
|
|
71
|
+
description: 'Delete a memory by id. Use after the user asks to forget something or when a previously remembered fact is now wrong. Get ids from `recall`.',
|
|
72
|
+
inputSchema: z.object({
|
|
73
|
+
id: z.string().describe('The memory record id (returned by `recall`/`remember`).'),
|
|
74
|
+
}),
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
export const memoryPlugin = {
|
|
78
|
+
id: 'memory',
|
|
79
|
+
name: 'Memory',
|
|
80
|
+
description: 'Global long-term memory: remember/recall/forget facts across runs and agents.',
|
|
81
|
+
toolDefinitions: memoryToolDefinitions,
|
|
82
|
+
factory: ({ storage }) => (builder) => {
|
|
83
|
+
const store = storage;
|
|
84
|
+
const actions = asActionBuilder(builder);
|
|
85
|
+
actions.on('remember', async function* (event, context) {
|
|
86
|
+
const resultMeta = { ...(event.meta || {}), agentId: context.state.agentId };
|
|
87
|
+
try {
|
|
88
|
+
const { content, scope, tags } = event.data;
|
|
89
|
+
const record = await store.appendMemory({
|
|
90
|
+
scope: resolveMemoryScope(scope, context.state),
|
|
91
|
+
content,
|
|
92
|
+
tags,
|
|
93
|
+
});
|
|
94
|
+
yield {
|
|
95
|
+
type: 'action:remember:result',
|
|
96
|
+
data: { success: true, record },
|
|
97
|
+
meta: resultMeta,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
yield {
|
|
102
|
+
type: 'action:remember:result',
|
|
103
|
+
data: {
|
|
104
|
+
success: false,
|
|
105
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
106
|
+
},
|
|
107
|
+
meta: resultMeta,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
actions.on('recall', async function* (event, context) {
|
|
112
|
+
const resultMeta = { ...(event.meta || {}), agentId: context.state.agentId };
|
|
113
|
+
try {
|
|
114
|
+
const { query, tag, scope, limit } = event.data;
|
|
115
|
+
const records = await store.listMemories({
|
|
116
|
+
scopes: resolveMemoryScopeFilter(scope, context.state),
|
|
117
|
+
query,
|
|
118
|
+
tag,
|
|
119
|
+
limit,
|
|
120
|
+
});
|
|
121
|
+
yield {
|
|
122
|
+
type: 'action:recall:result',
|
|
123
|
+
data: { success: true, records },
|
|
124
|
+
meta: resultMeta,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
yield {
|
|
129
|
+
type: 'action:recall:result',
|
|
130
|
+
data: {
|
|
131
|
+
success: false,
|
|
132
|
+
records: [],
|
|
133
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
134
|
+
},
|
|
135
|
+
meta: resultMeta,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
actions.on('forget', async function* (event, context) {
|
|
140
|
+
const resultMeta = { ...(event.meta || {}), agentId: context.state.agentId };
|
|
141
|
+
try {
|
|
142
|
+
const deleted = await store.deleteMemory({ id: event.data.id });
|
|
143
|
+
yield {
|
|
144
|
+
type: 'action:forget:result',
|
|
145
|
+
data: { success: true, deleted },
|
|
146
|
+
meta: resultMeta,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
yield {
|
|
151
|
+
type: 'action:forget:result',
|
|
152
|
+
data: {
|
|
153
|
+
success: false,
|
|
154
|
+
deleted: false,
|
|
155
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
156
|
+
},
|
|
157
|
+
meta: resultMeta,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
export default memoryPlugin;
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { spawn } from 'node:child_process';
|
|
3
|
+
import { randomUUID } from 'node:crypto';
|
|
4
|
+
import { asActionBuilder } from '../types.js';
|
|
5
|
+
const TUNNEL_URL_PATTERN = /https:\/\/[a-z0-9-]+\.trycloudflare\.com/i;
|
|
6
|
+
const TUNNEL_READY_TIMEOUT_MS = 60000;
|
|
7
|
+
const MAX_LOG_CHARS = 8000;
|
|
8
|
+
const previewToolDefinitions = {
|
|
9
|
+
expose_port: {
|
|
10
|
+
description: 'Expose a local dev server port via a temporary public Cloudflare quick tunnel. Returns a previewUrl stored on the channel. Dev servers must listen on 0.0.0.0 or 127.0.0.1. Call after shell_exec when the server is ready.',
|
|
11
|
+
inputSchema: z.object({
|
|
12
|
+
port: z
|
|
13
|
+
.number()
|
|
14
|
+
.int()
|
|
15
|
+
.min(1024)
|
|
16
|
+
.max(65535)
|
|
17
|
+
.describe('Local port of the running dev server (e.g. 5173).'),
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
unexpose_port: {
|
|
21
|
+
description: 'Stop the active Cloudflare preview tunnel for this channel and clear previewUrl from channel state.',
|
|
22
|
+
inputSchema: z.object({}),
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
const tunnels = new Map();
|
|
26
|
+
const tunnelByChannel = new Map();
|
|
27
|
+
const blockedPorts = () => {
|
|
28
|
+
const openbotPort = Number(process.env.PORT ?? 4132);
|
|
29
|
+
return new Set([22, 80, 443, openbotPort]);
|
|
30
|
+
};
|
|
31
|
+
const appendLog = (tunnel, chunk) => {
|
|
32
|
+
tunnel.logs += chunk;
|
|
33
|
+
if (tunnel.logs.length > MAX_LOG_CHARS) {
|
|
34
|
+
tunnel.logs = tunnel.logs.slice(-MAX_LOG_CHARS);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const killTunnelProcess = (tunnel) => {
|
|
38
|
+
const { process: child } = tunnel;
|
|
39
|
+
if (!child.pid) {
|
|
40
|
+
try {
|
|
41
|
+
child.kill();
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
/* ignore */
|
|
45
|
+
}
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
child.kill('SIGTERM');
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
try {
|
|
53
|
+
child.kill();
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
/* ignore */
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const removeTunnel = (tunnelId) => {
|
|
61
|
+
const tunnel = tunnels.get(tunnelId);
|
|
62
|
+
if (!tunnel)
|
|
63
|
+
return;
|
|
64
|
+
killTunnelProcess(tunnel);
|
|
65
|
+
tunnels.delete(tunnelId);
|
|
66
|
+
if (tunnelByChannel.get(tunnel.channelId) === tunnelId) {
|
|
67
|
+
tunnelByChannel.delete(tunnel.channelId);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
export const stopPreviewForChannel = (channelId) => {
|
|
71
|
+
const tunnelId = tunnelByChannel.get(channelId);
|
|
72
|
+
if (tunnelId) {
|
|
73
|
+
removeTunnel(tunnelId);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const waitForTunnelUrl = (child, timeoutMs) => new Promise((resolve, reject) => {
|
|
77
|
+
let buffer = '';
|
|
78
|
+
let settled = false;
|
|
79
|
+
const cleanup = () => {
|
|
80
|
+
clearTimeout(timer);
|
|
81
|
+
child.stdout?.off('data', onData);
|
|
82
|
+
child.stderr?.off('data', onData);
|
|
83
|
+
child.off('exit', onExit);
|
|
84
|
+
child.off('error', onError);
|
|
85
|
+
};
|
|
86
|
+
const tryParse = () => {
|
|
87
|
+
const match = buffer.match(TUNNEL_URL_PATTERN);
|
|
88
|
+
if (match) {
|
|
89
|
+
settled = true;
|
|
90
|
+
cleanup();
|
|
91
|
+
resolve(match[0]);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const onData = (chunk) => {
|
|
95
|
+
buffer += chunk.toString();
|
|
96
|
+
if (buffer.length > 16000) {
|
|
97
|
+
buffer = buffer.slice(-16000);
|
|
98
|
+
}
|
|
99
|
+
tryParse();
|
|
100
|
+
};
|
|
101
|
+
const onExit = (code) => {
|
|
102
|
+
if (settled)
|
|
103
|
+
return;
|
|
104
|
+
settled = true;
|
|
105
|
+
cleanup();
|
|
106
|
+
reject(new Error(`cloudflared exited before providing a tunnel URL (code ${code ?? 'unknown'})`));
|
|
107
|
+
};
|
|
108
|
+
const onError = (err) => {
|
|
109
|
+
if (settled)
|
|
110
|
+
return;
|
|
111
|
+
settled = true;
|
|
112
|
+
cleanup();
|
|
113
|
+
reject(err);
|
|
114
|
+
};
|
|
115
|
+
const timer = setTimeout(() => {
|
|
116
|
+
if (settled)
|
|
117
|
+
return;
|
|
118
|
+
settled = true;
|
|
119
|
+
cleanup();
|
|
120
|
+
reject(new Error('Timed out waiting for Cloudflare tunnel URL'));
|
|
121
|
+
}, timeoutMs);
|
|
122
|
+
child.stdout?.on('data', onData);
|
|
123
|
+
child.stderr?.on('data', onData);
|
|
124
|
+
child.on('exit', onExit);
|
|
125
|
+
child.on('error', onError);
|
|
126
|
+
tryParse();
|
|
127
|
+
});
|
|
128
|
+
const startCloudflaredTunnel = async (channelId, port) => {
|
|
129
|
+
const child = spawn('cloudflared', ['tunnel', '--url', `http://127.0.0.1:${port}`, '--no-autoupdate'], {
|
|
130
|
+
env: process.env,
|
|
131
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
132
|
+
});
|
|
133
|
+
const tunnel = {
|
|
134
|
+
id: randomUUID(),
|
|
135
|
+
channelId,
|
|
136
|
+
port,
|
|
137
|
+
url: '',
|
|
138
|
+
process: child,
|
|
139
|
+
startedAt: Date.now(),
|
|
140
|
+
logs: '',
|
|
141
|
+
};
|
|
142
|
+
child.stdout?.on('data', (data) => appendLog(tunnel, data.toString()));
|
|
143
|
+
child.stderr?.on('data', (data) => appendLog(tunnel, data.toString()));
|
|
144
|
+
child.on('exit', () => {
|
|
145
|
+
tunnels.delete(tunnel.id);
|
|
146
|
+
if (tunnelByChannel.get(channelId) === tunnel.id) {
|
|
147
|
+
tunnelByChannel.delete(channelId);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
const url = await waitForTunnelUrl(child, TUNNEL_READY_TIMEOUT_MS);
|
|
151
|
+
tunnel.url = url;
|
|
152
|
+
tunnels.set(tunnel.id, tunnel);
|
|
153
|
+
tunnelByChannel.set(channelId, tunnel.id);
|
|
154
|
+
return tunnel;
|
|
155
|
+
};
|
|
156
|
+
const clearPreviewChannelState = async (storage, channelId) => {
|
|
157
|
+
await storage.patchChannelState({
|
|
158
|
+
channelId,
|
|
159
|
+
state: {
|
|
160
|
+
previewUrl: null,
|
|
161
|
+
previewPort: null,
|
|
162
|
+
previewExposedAt: null,
|
|
163
|
+
},
|
|
164
|
+
});
|
|
165
|
+
};
|
|
166
|
+
const previewPluginRuntime = (storage) => (builder) => {
|
|
167
|
+
const actions = asActionBuilder(builder);
|
|
168
|
+
actions.on('expose_port', async function* (event, context) {
|
|
169
|
+
const channelId = context.state.channelId;
|
|
170
|
+
const port = event.data?.port;
|
|
171
|
+
if (!Number.isInteger(port)) {
|
|
172
|
+
yield {
|
|
173
|
+
type: 'action:expose_port:result',
|
|
174
|
+
data: {
|
|
175
|
+
success: false,
|
|
176
|
+
output: 'port must be an integer between 1024 and 65535.',
|
|
177
|
+
},
|
|
178
|
+
meta: event.meta,
|
|
179
|
+
};
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
if (blockedPorts().has(port)) {
|
|
183
|
+
yield {
|
|
184
|
+
type: 'action:expose_port:result',
|
|
185
|
+
data: {
|
|
186
|
+
success: false,
|
|
187
|
+
output: `Port ${port} is reserved and cannot be exposed.`,
|
|
188
|
+
},
|
|
189
|
+
meta: event.meta,
|
|
190
|
+
};
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
const existingTunnelId = tunnelByChannel.get(channelId);
|
|
194
|
+
if (existingTunnelId) {
|
|
195
|
+
removeTunnel(existingTunnelId);
|
|
196
|
+
}
|
|
197
|
+
try {
|
|
198
|
+
const tunnel = await startCloudflaredTunnel(channelId, port);
|
|
199
|
+
await storage.patchChannelState({
|
|
200
|
+
channelId,
|
|
201
|
+
state: {
|
|
202
|
+
previewUrl: tunnel.url,
|
|
203
|
+
previewPort: port,
|
|
204
|
+
previewExposedAt: tunnel.startedAt,
|
|
205
|
+
},
|
|
206
|
+
});
|
|
207
|
+
if (context.state.channelDetails) {
|
|
208
|
+
context.state.channelDetails = await storage.getChannelDetails({ channelId });
|
|
209
|
+
}
|
|
210
|
+
yield {
|
|
211
|
+
type: 'action:expose_port:result',
|
|
212
|
+
data: {
|
|
213
|
+
success: true,
|
|
214
|
+
previewUrl: tunnel.url,
|
|
215
|
+
port,
|
|
216
|
+
temporary: true,
|
|
217
|
+
output: `Preview available at ${tunnel.url} (temporary Cloudflare quick tunnel).`,
|
|
218
|
+
},
|
|
219
|
+
meta: event.meta,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
catch (error) {
|
|
223
|
+
const message = error instanceof Error ? error.message : 'Failed to start Cloudflare tunnel';
|
|
224
|
+
const needsCloudflared = message.includes('ENOENT') || message.toLowerCase().includes('cloudflared');
|
|
225
|
+
const hint = needsCloudflared
|
|
226
|
+
? ' Install cloudflared and ensure it is on PATH (https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/downloads/).'
|
|
227
|
+
: '';
|
|
228
|
+
yield {
|
|
229
|
+
type: 'action:expose_port:result',
|
|
230
|
+
data: {
|
|
231
|
+
success: false,
|
|
232
|
+
error: message,
|
|
233
|
+
output: `${message}${hint}`,
|
|
234
|
+
},
|
|
235
|
+
meta: event.meta,
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
actions.on('unexpose_port', async function* (event, context) {
|
|
240
|
+
const channelId = context.state.channelId;
|
|
241
|
+
stopPreviewForChannel(channelId);
|
|
242
|
+
await clearPreviewChannelState(storage, channelId);
|
|
243
|
+
if (context.state.channelDetails) {
|
|
244
|
+
context.state.channelDetails = await storage.getChannelDetails({ channelId });
|
|
245
|
+
}
|
|
246
|
+
yield {
|
|
247
|
+
type: 'action:unexpose_port:result',
|
|
248
|
+
data: {
|
|
249
|
+
success: true,
|
|
250
|
+
output: 'Preview tunnel stopped and previewUrl cleared from channel state.',
|
|
251
|
+
},
|
|
252
|
+
meta: event.meta,
|
|
253
|
+
};
|
|
254
|
+
});
|
|
255
|
+
actions.on('delete_channel', async function* (event) {
|
|
256
|
+
const channelId = event.data?.channelId;
|
|
257
|
+
if (channelId) {
|
|
258
|
+
stopPreviewForChannel(channelId);
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
};
|
|
262
|
+
export const previewPlugin = {
|
|
263
|
+
id: 'preview',
|
|
264
|
+
name: 'Preview',
|
|
265
|
+
description: 'Temporary public preview URLs via Cloudflare quick tunnels.',
|
|
266
|
+
toolDefinitions: previewToolDefinitions,
|
|
267
|
+
factory: ({ storage }) => previewPluginRuntime(storage),
|
|
268
|
+
};
|
|
269
|
+
export default previewPlugin;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import type { PluginBuilder, PluginContext } from '../types.js';
|
|
3
|
+
export declare function registerStorageTools(context: PluginContext): (builder: PluginBuilder) => void;
|
|
4
|
+
export declare const storageToolPlugin: {
|
|
5
|
+
toolDefinitions: {
|
|
6
|
+
create_channel: {
|
|
7
|
+
description: string;
|
|
8
|
+
inputSchema: z.ZodObject<{
|
|
9
|
+
channelId: z.ZodString;
|
|
10
|
+
spec: z.ZodOptional<z.ZodString>;
|
|
11
|
+
initialState: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
12
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.z.core.$strip>;
|
|
14
|
+
};
|
|
15
|
+
patch_channel_details: {
|
|
16
|
+
description: string;
|
|
17
|
+
inputSchema: z.ZodObject<{
|
|
18
|
+
state: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
19
|
+
spec: z.ZodOptional<z.ZodString>;
|
|
20
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.z.core.$strip>;
|
|
22
|
+
};
|
|
23
|
+
patch_thread_details: {
|
|
24
|
+
description: string;
|
|
25
|
+
inputSchema: z.ZodObject<{
|
|
26
|
+
state: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
27
|
+
}, z.z.core.$strip>;
|
|
28
|
+
};
|
|
29
|
+
create_variable: {
|
|
30
|
+
description: string;
|
|
31
|
+
inputSchema: z.ZodObject<{
|
|
32
|
+
key: z.ZodString;
|
|
33
|
+
value: z.ZodString;
|
|
34
|
+
secret: z.ZodOptional<z.ZodBoolean>;
|
|
35
|
+
}, z.z.core.$strip>;
|
|
36
|
+
};
|
|
37
|
+
delete_variable: {
|
|
38
|
+
description: string;
|
|
39
|
+
inputSchema: z.ZodObject<{
|
|
40
|
+
key: z.ZodString;
|
|
41
|
+
}, z.z.core.$strip>;
|
|
42
|
+
};
|
|
43
|
+
delete_channel: {
|
|
44
|
+
description: string;
|
|
45
|
+
inputSchema: z.ZodObject<{
|
|
46
|
+
channelId: z.ZodString;
|
|
47
|
+
}, z.z.core.$strip>;
|
|
48
|
+
};
|
|
49
|
+
get_workspace_file_url: {
|
|
50
|
+
description: string;
|
|
51
|
+
inputSchema: z.ZodObject<{
|
|
52
|
+
path: z.ZodString;
|
|
53
|
+
}, z.z.core.$strip>;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
register: typeof registerStorageTools;
|
|
57
|
+
};
|