zilmate 1.0.0 → 1.0.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/.env.example +5 -0
- package/README.md +82 -4
- package/dist/agents/automation-planner.agent.d.ts +103 -0
- package/dist/agents/automation-planner.agent.d.ts.map +1 -0
- package/dist/agents/automation-planner.agent.js +28 -0
- package/dist/agents/automation-planner.agent.js.map +1 -0
- package/dist/agents/chat.agent.d.ts +8 -0
- package/dist/agents/chat.agent.d.ts.map +1 -1
- package/dist/agents/chat.agent.js +5 -2
- package/dist/agents/chat.agent.js.map +1 -1
- package/dist/agents/developer-helper.agent.d.ts +94 -0
- package/dist/agents/developer-helper.agent.d.ts.map +1 -0
- package/dist/agents/developer-helper.agent.js +34 -0
- package/dist/agents/developer-helper.agent.js.map +1 -0
- package/dist/agents/docs-research.agent.d.ts +8 -0
- package/dist/agents/docs-research.agent.d.ts.map +1 -1
- package/dist/agents/docs-research.agent.js +5 -2
- package/dist/agents/docs-research.agent.js.map +1 -1
- package/dist/agents/image.agent.d.ts.map +1 -1
- package/dist/agents/image.agent.js +2 -1
- package/dist/agents/image.agent.js.map +1 -1
- package/dist/agents/manager.d.ts +36 -0
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/manager.js +39 -1
- package/dist/agents/manager.js.map +1 -1
- package/dist/agents/personal-assistant.agent.d.ts +30 -0
- package/dist/agents/personal-assistant.agent.d.ts.map +1 -0
- package/dist/agents/personal-assistant.agent.js +25 -0
- package/dist/agents/personal-assistant.agent.js.map +1 -0
- package/dist/agents/post.agent.d.ts.map +1 -1
- package/dist/agents/post.agent.js +2 -1
- package/dist/agents/post.agent.js.map +1 -1
- package/dist/agents/quick-help.agent.d.ts +8 -0
- package/dist/agents/quick-help.agent.d.ts.map +1 -1
- package/dist/agents/quick-help.agent.js +5 -2
- package/dist/agents/quick-help.agent.js.map +1 -1
- package/dist/cli/apps.d.ts +16 -0
- package/dist/cli/apps.d.ts.map +1 -0
- package/dist/cli/apps.js +19 -0
- package/dist/cli/apps.js.map +1 -0
- package/dist/cli/confirm.d.ts.map +1 -1
- package/dist/cli/confirm.js +20 -2
- package/dist/cli/confirm.js.map +1 -1
- package/dist/cli/doctor.d.ts +8 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +24 -1
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/format.d.ts +5 -0
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +96 -0
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/health.d.ts +3 -0
- package/dist/cli/health.d.ts.map +1 -0
- package/dist/cli/health.js +23 -0
- package/dist/cli/health.js.map +1 -0
- package/dist/cli/interactive.js +2 -2
- package/dist/cli/interactive.js.map +1 -1
- package/dist/cli/jobs.d.ts +19 -0
- package/dist/cli/jobs.d.ts.map +1 -0
- package/dist/cli/jobs.js +68 -0
- package/dist/cli/jobs.js.map +1 -0
- package/dist/cli/memory.d.ts +3 -0
- package/dist/cli/memory.d.ts.map +1 -0
- package/dist/cli/memory.js +14 -0
- package/dist/cli/memory.js.map +1 -0
- package/dist/cli/menu.d.ts +2 -0
- package/dist/cli/menu.d.ts.map +1 -0
- package/dist/cli/menu.js +75 -0
- package/dist/cli/menu.js.map +1 -0
- package/dist/cli/setup.d.ts +5 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +88 -3
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/triggers.d.ts.map +1 -1
- package/dist/cli/triggers.js +11 -0
- package/dist/cli/triggers.js.map +1 -1
- package/dist/cli/welcome.d.ts +2 -0
- package/dist/cli/welcome.d.ts.map +1 -0
- package/dist/cli/welcome.js +24 -0
- package/dist/cli/welcome.js.map +1 -0
- package/dist/config/env.d.ts +6 -0
- package/dist/config/env.d.ts.map +1 -1
- package/dist/config/env.js +8 -0
- package/dist/config/env.js.map +1 -1
- package/dist/index.js +180 -18
- package/dist/index.js.map +1 -1
- package/dist/jobs/qstash.d.ts +3 -0
- package/dist/jobs/qstash.d.ts.map +1 -0
- package/dist/jobs/qstash.js +37 -0
- package/dist/jobs/qstash.js.map +1 -0
- package/dist/jobs/runner.d.ts +14 -0
- package/dist/jobs/runner.d.ts.map +1 -0
- package/dist/jobs/runner.js +101 -0
- package/dist/jobs/runner.js.map +1 -0
- package/dist/jobs/schedule.d.ts +5 -0
- package/dist/jobs/schedule.d.ts.map +1 -0
- package/dist/jobs/schedule.js +72 -0
- package/dist/jobs/schedule.js.map +1 -0
- package/dist/jobs/store.d.ts +9 -0
- package/dist/jobs/store.d.ts.map +1 -0
- package/dist/jobs/store.js +133 -0
- package/dist/jobs/store.js.map +1 -0
- package/dist/jobs/types.d.ts +54 -0
- package/dist/jobs/types.d.ts.map +1 -0
- package/dist/jobs/types.js +2 -0
- package/dist/jobs/types.js.map +1 -0
- package/dist/jobs/workflows.d.ts +4 -0
- package/dist/jobs/workflows.d.ts.map +1 -0
- package/dist/jobs/workflows.js +50 -0
- package/dist/jobs/workflows.js.map +1 -0
- package/dist/safety/limits.js +2 -2
- package/dist/safety/limits.js.map +1 -1
- package/dist/server.d.ts +13 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +11 -0
- package/dist/server.js.map +1 -1
- package/dist/tools/composio.tool.d.ts.map +1 -1
- package/dist/tools/composio.tool.js +21 -5
- package/dist/tools/composio.tool.js.map +1 -1
- package/dist/tools/jobs.tool.d.ts +22 -0
- package/dist/tools/jobs.tool.d.ts.map +1 -0
- package/dist/tools/jobs.tool.js +105 -0
- package/dist/tools/jobs.tool.js.map +1 -0
- package/dist/tools/time.tool.d.ts +11 -0
- package/dist/tools/time.tool.d.ts.map +1 -0
- package/dist/tools/time.tool.js +35 -0
- package/dist/tools/time.tool.js.map +1 -0
- package/package.json +4 -2
package/.env.example
CHANGED
|
@@ -4,6 +4,11 @@ ZILMATE_USER_ID=
|
|
|
4
4
|
TAVILY_API_KEY=
|
|
5
5
|
UPSTASH_REDIS_REST_URL=
|
|
6
6
|
UPSTASH_REDIS_REST_TOKEN=
|
|
7
|
+
ZILMATE_JOBS_ENABLED=false
|
|
8
|
+
UPSTASH_QSTASH_TOKEN=
|
|
9
|
+
ZILMATE_PUBLIC_JOB_WEBHOOK_URL=
|
|
10
|
+
ZILMATE_JOB_WEBHOOK_SECRET=
|
|
11
|
+
ZILMATE_TRIGGER_WORKFLOWS_ENABLED=false
|
|
7
12
|
ZILO_MANAGER_MODEL=minimax/minimax-m3
|
|
8
13
|
ZILO_HELP_MODEL=alibaba/qwen3.7-plus
|
|
9
14
|
ZILO_POST_MODEL=alibaba/qwen3.7-plus
|
package/README.md
CHANGED
|
@@ -37,8 +37,8 @@ iwr https://raw.githubusercontent.com/zester4/zilo-manager/main/install.ps1 | ie
|
|
|
37
37
|
The installer runs the full first-use flow:
|
|
38
38
|
|
|
39
39
|
1. Installs ZilMate globally.
|
|
40
|
-
2. Runs `zilmate setup` to collect `AI_GATEWAY_API_KEY
|
|
41
|
-
3. Lets users skip Composio, Tavily, and
|
|
40
|
+
2. Runs `zilmate setup` to collect `AI_GATEWAY_API_KEY`.
|
|
41
|
+
3. Lets users skip optional Composio, Tavily, Redis, background jobs, QStash, and trigger workflows.
|
|
42
42
|
4. Runs `zilmate ping` to verify the key.
|
|
43
43
|
5. Starts `zilmate talk`.
|
|
44
44
|
|
|
@@ -78,7 +78,16 @@ The easiest path is:
|
|
|
78
78
|
zilmate setup
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
It asks for `AI_GATEWAY_API_KEY`,
|
|
81
|
+
It asks for `AI_GATEWAY_API_KEY`, then guides users through optional features:
|
|
82
|
+
|
|
83
|
+
- Composio external app tools.
|
|
84
|
+
- Tavily web research.
|
|
85
|
+
- Upstash Redis memory/job storage.
|
|
86
|
+
- Local background jobs and schedules.
|
|
87
|
+
- Upstash QStash hosted schedules.
|
|
88
|
+
- Composio trigger-to-job workflows.
|
|
89
|
+
|
|
90
|
+
Every optional feature can be skipped. If users only want chat, they only need the AI Gateway key.
|
|
82
91
|
|
|
83
92
|
You can also create `.env` manually:
|
|
84
93
|
|
|
@@ -89,6 +98,11 @@ ZILMATE_USER_ID=zilmate-generated-local-user-id
|
|
|
89
98
|
TAVILY_API_KEY=your_tavily_key
|
|
90
99
|
UPSTASH_REDIS_REST_URL=
|
|
91
100
|
UPSTASH_REDIS_REST_TOKEN=
|
|
101
|
+
ZILMATE_JOBS_ENABLED=false
|
|
102
|
+
UPSTASH_QSTASH_TOKEN=
|
|
103
|
+
ZILMATE_PUBLIC_JOB_WEBHOOK_URL=
|
|
104
|
+
ZILMATE_JOB_WEBHOOK_SECRET=
|
|
105
|
+
ZILMATE_TRIGGER_WORKFLOWS_ENABLED=false
|
|
92
106
|
ZILO_MANAGER_MODEL=minimax/minimax-m3
|
|
93
107
|
ZILO_HELP_MODEL=alibaba/qwen3.7-plus
|
|
94
108
|
ZILO_POST_MODEL=alibaba/qwen3.7-plus
|
|
@@ -102,6 +116,16 @@ Composio is optional. If `COMPOSIO_API_KEY` is set, ZilMate creates a stable loc
|
|
|
102
116
|
|
|
103
117
|
Redis is optional. If `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN` are set, chat turns, scratchpads, and Composio session ids use Redis. If they are missing, ZilMate falls back to local files under `.zilo-manager/`.
|
|
104
118
|
|
|
119
|
+
Background jobs are optional. Setup explains the difference between local jobs and hosted schedules. Local jobs and local schedules run while `zilmate jobs worker` is running. They do not keep running after a laptop sleeps, shuts down, or loses internet. For hosted schedules that can fire while the local machine is closed, configure QStash plus a public job webhook URL.
|
|
120
|
+
|
|
121
|
+
For unattended setup or installers, pass the options directly:
|
|
122
|
+
|
|
123
|
+
```powershell
|
|
124
|
+
zilmate setup --yes --ai-gateway-key <key> --jobs-enabled true
|
|
125
|
+
zilmate setup --yes --ai-gateway-key <key> --composio-key <key> --trigger-workflows-enabled true
|
|
126
|
+
zilmate setup --yes --ai-gateway-key <key> --qstash-token <token> --job-webhook-url https://example.com/api/zilmate/jobs
|
|
127
|
+
```
|
|
128
|
+
|
|
105
129
|
## Development Commands
|
|
106
130
|
|
|
107
131
|
Use these while working inside the project folder:
|
|
@@ -117,6 +141,9 @@ npm run zilmate -- apps status
|
|
|
117
141
|
npm run zilmate -- triggers listen
|
|
118
142
|
npm run zilmate -- triggers types github
|
|
119
143
|
npm run zilmate -- triggers list
|
|
144
|
+
npm run zilmate -- jobs create "Research today's priority updates and summarize them"
|
|
145
|
+
npm run zilmate -- jobs list
|
|
146
|
+
npm run zilmate -- jobs worker --once
|
|
120
147
|
npm run zilmate -- remember "Prefers concise support replies"
|
|
121
148
|
npm run zilmate -- recall support
|
|
122
149
|
npm run zilmate -- memory list
|
|
@@ -163,6 +190,14 @@ zilmate triggers types github
|
|
|
163
190
|
zilmate triggers create GITHUB_BRANCH_CREATED_TRIGGER --dry-run --owner zester4 --repo zilo-manager
|
|
164
191
|
zilmate triggers create GITHUB_COMMIT_EVENT --owner zester4 --repo zilo-manager
|
|
165
192
|
zilmate triggers list
|
|
193
|
+
zilmate jobs create "Research today's priority updates and summarize them"
|
|
194
|
+
zilmate jobs create "Prepare my weekday morning briefing" --schedule "daily"
|
|
195
|
+
zilmate jobs list
|
|
196
|
+
zilmate jobs status job_xxx
|
|
197
|
+
zilmate jobs logs job_xxx
|
|
198
|
+
zilmate jobs run job_xxx
|
|
199
|
+
zilmate jobs worker
|
|
200
|
+
zilmate jobs cancel job_xxx
|
|
166
201
|
zilmate remember "Use a warm but concise support tone"
|
|
167
202
|
zilmate recall support
|
|
168
203
|
zilmate memory list
|
|
@@ -213,6 +248,7 @@ Available SDK methods:
|
|
|
213
248
|
- `research({ query | message })`: local docs and web research.
|
|
214
249
|
- `image({ prompt, provider, size, outputDir })`: image generation.
|
|
215
250
|
- `remember({ text, tags })`, `recall({ query, limit })`, `listMemories()`, `forget(id)`, `clearMemories()`: durable memory helpers.
|
|
251
|
+
- `createJob({ task, schedule, source, metadata })`, `listJobs({ status, limit })`, `getJob(id)`, `getJobLogs(id)`, `runJob(id)`, `runDueJobs()`, `handleJobWebhook({ jobId, secret }, expectedSecret)`, `cancelJob(id)`: background job and hosted webhook helpers.
|
|
216
252
|
|
|
217
253
|
For UI integrations, pass `onProgress` to render agent/tool progress and `confirm` to approve or block external write-like Composio actions.
|
|
218
254
|
|
|
@@ -233,6 +269,13 @@ For UI integrations, pass `onProgress` to render agent/tool progress and `confir
|
|
|
233
269
|
- `triggers info <trigger>`: show trigger config and payload schemas.
|
|
234
270
|
- `triggers create <trigger> --flag value`: create a trigger instance; unknown flags become trigger config.
|
|
235
271
|
- `triggers list`: list trigger instances.
|
|
272
|
+
- `jobs create "<task>"`: queue a background job, optionally with `--schedule "daily"` or `--schedule "every 15 minutes"`.
|
|
273
|
+
- `jobs list`: list queued/running/completed jobs.
|
|
274
|
+
- `jobs status <id>`: inspect one job.
|
|
275
|
+
- `jobs logs <id>`: inspect job progress, output, and errors.
|
|
276
|
+
- `jobs run <id>`: run a queued job immediately.
|
|
277
|
+
- `jobs worker`: run the local job processor and local scheduler.
|
|
278
|
+
- `jobs cancel <id>`: cancel one job.
|
|
236
279
|
- `help`: fast troubleshooting and app guidance.
|
|
237
280
|
- `chat`: one-shot natural dialogue about ZiloShift workflows.
|
|
238
281
|
- `post`: WhatsApp/status/social copy generation.
|
|
@@ -251,8 +294,12 @@ ZilMate uses a manager agent that delegates to focused subagents and external to
|
|
|
251
294
|
- Post: launch messages, WhatsApp statuses, captions, and outreach copy.
|
|
252
295
|
- Research: local Zilo docs first, then external docs/web research when needed.
|
|
253
296
|
- Image: image generation through Gateway image models.
|
|
297
|
+
- Automation Planner: background jobs, schedules, trigger workflows, QStash/webhook planning, monitoring, and follow-up automations.
|
|
298
|
+
- Personal Assistant: daily planning, reminders, briefings, prioritization, follow-ups, summaries, and memory-aware organization.
|
|
299
|
+
- Developer Helper: CLI/SDK usage, Next.js integration, publishing, QStash, Cloudflare tunnels, webhooks, Composio setup, and debugging.
|
|
254
300
|
- Composio: external app discovery, auth links, schemas, and execution, attached only to the manager.
|
|
255
301
|
- Memory: durable ZilMate facts and preferences saved locally or in Redis, available through CLI commands and manager tools.
|
|
302
|
+
- Jobs: background task creation, schedule setup, status checks, logs, and cancellation available through CLI, SDK, and manager tools.
|
|
256
303
|
|
|
257
304
|
Local ZiloShift docs live under `src/doc/`. ZilMate reads them on demand through dedicated tools instead of dumping all docs into every prompt. The manager prefers these local docs for ZiloShift support, worker, venue, payment, verification, SMS, and dispute questions.
|
|
258
305
|
|
|
@@ -287,7 +334,7 @@ zilmate triggers listen --trigger ti_abc123
|
|
|
287
334
|
zilmate triggers listen --trigger-slug GMAIL_NEW_EMAIL_EVENT --once
|
|
288
335
|
```
|
|
289
336
|
|
|
290
|
-
This is terminal-local.
|
|
337
|
+
This is terminal-local. When `ZILMATE_TRIGGER_WORKFLOWS_ENABLED=true`, trigger events handled by `zilmate triggers listen` also create background jobs. ZilMate includes generic workflow prompts for Gmail, GitHub, Slack, and calendar-style events, and falls back to a general external-app summary task for other toolkits.
|
|
291
338
|
|
|
292
339
|
The manager agent also has trigger tools. In `zilmate talk`, you can ask:
|
|
293
340
|
|
|
@@ -299,6 +346,37 @@ create that trigger
|
|
|
299
346
|
|
|
300
347
|
ZilMate should discover current trigger slugs first, inspect the trigger schema, prefer a dry-run payload, and ask for confirmation before creating a real trigger.
|
|
301
348
|
|
|
349
|
+
## Background Jobs And Schedules
|
|
350
|
+
|
|
351
|
+
Use jobs when ZilMate should keep working after a chat turn ends:
|
|
352
|
+
|
|
353
|
+
```powershell
|
|
354
|
+
zilmate jobs create "Research AI assistant scheduling patterns and save a summary"
|
|
355
|
+
zilmate jobs create "Prepare my morning briefing" --schedule daily
|
|
356
|
+
zilmate jobs worker
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
Local job storage uses `.zilo-manager/jobs.json` and `.zilo-manager/job-logs.json` unless Redis is configured. With Redis, jobs and logs use the same Upstash REST connection as memory.
|
|
360
|
+
|
|
361
|
+
Schedules supported locally include `hourly`, `daily`, `every 15 minutes`, `every 2 hours`, `every 1 day`, and ISO date/time strings. QStash schedules can use `cron:<expression>` when `UPSTASH_QSTASH_TOKEN` and `ZILMATE_PUBLIC_JOB_WEBHOOK_URL` are configured.
|
|
362
|
+
|
|
363
|
+
Hosted apps can expose a webhook route and call:
|
|
364
|
+
|
|
365
|
+
```ts
|
|
366
|
+
import { createZilMate } from 'zilmate/server';
|
|
367
|
+
|
|
368
|
+
export async function POST(req: Request) {
|
|
369
|
+
const body = await req.json();
|
|
370
|
+
const zilmate = createZilMate();
|
|
371
|
+
const result = await zilmate.handleJobWebhook(
|
|
372
|
+
{ jobId: body.jobId, secret: req.headers.get('ZilMate-Webhook-Secret') ?? undefined },
|
|
373
|
+
process.env.ZILMATE_JOB_WEBHOOK_SECRET,
|
|
374
|
+
);
|
|
375
|
+
|
|
376
|
+
return Response.json(result);
|
|
377
|
+
}
|
|
378
|
+
```
|
|
379
|
+
|
|
302
380
|
## Model Notes
|
|
303
381
|
|
|
304
382
|
- Manager/orchestration default: `minimax/minimax-m3`.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { ToolLoopAgent } from 'ai';
|
|
2
|
+
export declare function createAutomationPlannerAgent(): ToolLoopAgent<never, {
|
|
3
|
+
appKnowledge: import("ai").Tool<{
|
|
4
|
+
key: "agent-docs" | "readme";
|
|
5
|
+
}, string>;
|
|
6
|
+
listTriggerTypes: import("ai").Tool<{
|
|
7
|
+
toolkit?: string | undefined;
|
|
8
|
+
limit?: number | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
items: {
|
|
11
|
+
slug: string;
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
toolkit: {
|
|
15
|
+
slug: string;
|
|
16
|
+
name: string;
|
|
17
|
+
logo: string;
|
|
18
|
+
};
|
|
19
|
+
payload: Record<string, unknown>;
|
|
20
|
+
config: Record<string, unknown>;
|
|
21
|
+
version?: string | undefined;
|
|
22
|
+
instructions?: string | undefined;
|
|
23
|
+
}[];
|
|
24
|
+
totalPages: number;
|
|
25
|
+
nextCursor?: string | null | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
showTriggerType: import("ai").Tool<{
|
|
28
|
+
triggerSlug: string;
|
|
29
|
+
}, {
|
|
30
|
+
slug: string;
|
|
31
|
+
name: string;
|
|
32
|
+
description: string;
|
|
33
|
+
toolkit: {
|
|
34
|
+
slug: string;
|
|
35
|
+
name: string;
|
|
36
|
+
logo: string;
|
|
37
|
+
};
|
|
38
|
+
payload: Record<string, unknown>;
|
|
39
|
+
config: Record<string, unknown>;
|
|
40
|
+
version?: string | undefined;
|
|
41
|
+
instructions?: string | undefined;
|
|
42
|
+
}>;
|
|
43
|
+
listTriggers: import("ai").Tool<{
|
|
44
|
+
limit?: number | undefined;
|
|
45
|
+
showDisabled?: boolean | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
items: {
|
|
48
|
+
connectedAccountId: string;
|
|
49
|
+
id: string;
|
|
50
|
+
updatedAt: string;
|
|
51
|
+
disabledAt: string | null;
|
|
52
|
+
state: Record<string, unknown>;
|
|
53
|
+
triggerConfig: Record<string, unknown>;
|
|
54
|
+
triggerName: string;
|
|
55
|
+
uuid?: string | undefined;
|
|
56
|
+
triggerData?: string | undefined;
|
|
57
|
+
}[];
|
|
58
|
+
nextCursor: string | null;
|
|
59
|
+
totalPages: number;
|
|
60
|
+
}>;
|
|
61
|
+
createTrigger: import("ai").Tool<{
|
|
62
|
+
triggerSlug: string;
|
|
63
|
+
triggerConfig?: Record<string, unknown> | undefined;
|
|
64
|
+
connectedAccountId?: string | undefined;
|
|
65
|
+
dryRun?: boolean | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
triggerId: string;
|
|
68
|
+
} | {
|
|
69
|
+
triggerConfig?: Record<string, unknown>;
|
|
70
|
+
connectedAccountId?: string;
|
|
71
|
+
userId: string;
|
|
72
|
+
triggerSlug: string;
|
|
73
|
+
dryRun: boolean;
|
|
74
|
+
}>;
|
|
75
|
+
createJob: import("ai").Tool<{
|
|
76
|
+
task: string;
|
|
77
|
+
schedule?: string | undefined;
|
|
78
|
+
runAt?: string | undefined;
|
|
79
|
+
metadata?: Record<string, unknown> | undefined;
|
|
80
|
+
}, import("../server.js").ZilMateJob>;
|
|
81
|
+
listJobs: import("ai").Tool<{
|
|
82
|
+
status?: "running" | "failed" | "queued" | "succeeded" | "cancelled" | undefined;
|
|
83
|
+
limit?: number | undefined;
|
|
84
|
+
}, import("../server.js").ZilMateJob[]>;
|
|
85
|
+
showJob: import("ai").Tool<{
|
|
86
|
+
id: string;
|
|
87
|
+
}, import("../server.js").ZilMateJob | null>;
|
|
88
|
+
listJobLogs: import("ai").Tool<{
|
|
89
|
+
id: string;
|
|
90
|
+
}, import("../server.js").JobLog[]>;
|
|
91
|
+
cancelJob: import("ai").Tool<{
|
|
92
|
+
id: string;
|
|
93
|
+
}, import("../server.js").ZilMateJob | null>;
|
|
94
|
+
getCurrentTime: import("ai").Tool<{
|
|
95
|
+
timeZone?: string | undefined;
|
|
96
|
+
}, {
|
|
97
|
+
iso: string;
|
|
98
|
+
unixMs: number;
|
|
99
|
+
timeZone: string;
|
|
100
|
+
formatted: string;
|
|
101
|
+
}>;
|
|
102
|
+
}, never>;
|
|
103
|
+
//# sourceMappingURL=automation-planner.agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"automation-planner.agent.d.ts","sourceRoot":"","sources":["../../src/agents/automation-planner.agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,IAAI,CAAC;AAQhD,wBAAgB,4BAA4B;;;;;;;;;;;;;;;;;;;mBAoBw7zG,CAAC;wBAAsC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAAz2S,CAAC;uBAAqC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UADzshG"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { stepCountIs, ToolLoopAgent } from 'ai';
|
|
2
|
+
import { models } from '../config/models.js';
|
|
3
|
+
import { appKnowledgeTool } from '../tools/app-knowledge.tool.js';
|
|
4
|
+
import { jobTools } from '../tools/jobs.tool.js';
|
|
5
|
+
import { timeTools } from '../tools/time.tool.js';
|
|
6
|
+
import { triggerTools } from '../tools/triggers.tool.js';
|
|
7
|
+
import { limits } from '../safety/limits.js';
|
|
8
|
+
export function createAutomationPlannerAgent() {
|
|
9
|
+
return new ToolLoopAgent({
|
|
10
|
+
model: models.manager,
|
|
11
|
+
instructions: [
|
|
12
|
+
'You are ZilMate Automation Planner. Design practical automations, schedules, background jobs, trigger workflows, and follow-up flows.',
|
|
13
|
+
'Use time tools for current date/time and schedule-relative wording.',
|
|
14
|
+
'Use job tools to inspect existing jobs and logs. Create or cancel jobs only when the user clearly asks and approval is available through the manager.',
|
|
15
|
+
'Use trigger tools to discover Composio trigger types, inspect schemas, and reason about trigger setup. Prefer dry-run thinking before real creation.',
|
|
16
|
+
'Explain local worker limits clearly: local jobs need `zilmate jobs worker`; laptop-closed automation needs QStash plus a public job webhook.',
|
|
17
|
+
'Return concise plans with exact commands or setup steps when useful.',
|
|
18
|
+
].join(' '),
|
|
19
|
+
tools: {
|
|
20
|
+
...timeTools,
|
|
21
|
+
...jobTools,
|
|
22
|
+
...triggerTools,
|
|
23
|
+
appKnowledge: appKnowledgeTool,
|
|
24
|
+
},
|
|
25
|
+
stopWhen: stepCountIs(limits.subagentSteps),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=automation-planner.agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"automation-planner.agent.js","sourceRoot":"","sources":["../../src/agents/automation-planner.agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,MAAM,UAAU,4BAA4B;IAC1C,OAAO,IAAI,aAAa,CAAC;QACvB,KAAK,EAAE,MAAM,CAAC,OAAO;QACrB,YAAY,EAAE;YACZ,uIAAuI;YACvI,qEAAqE;YACrE,uJAAuJ;YACvJ,sJAAsJ;YACtJ,8IAA8I;YAC9I,sEAAsE;SACvE,CAAC,IAAI,CAAC,GAAG,CAAC;QACX,KAAK,EAAE;YACL,GAAG,SAAS;YACZ,GAAG,QAAQ;YACX,GAAG,YAAY;YACf,YAAY,EAAE,gBAAgB;SAC/B;QACD,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,aAAa,CAAC;KAC5C,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -3,6 +3,14 @@ export declare function createChatAgent(): ToolLoopAgent<never, {
|
|
|
3
3
|
appKnowledge: import("ai").Tool<{
|
|
4
4
|
key: "agent-docs" | "readme";
|
|
5
5
|
}, string>;
|
|
6
|
+
getCurrentTime: import("ai").Tool<{
|
|
7
|
+
timeZone?: string | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
iso: string;
|
|
10
|
+
unixMs: number;
|
|
11
|
+
timeZone: string;
|
|
12
|
+
formatted: string;
|
|
13
|
+
}>;
|
|
6
14
|
listZiloDocs: import("ai").Tool<Record<string, never>, {
|
|
7
15
|
key: string;
|
|
8
16
|
title: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.agent.d.ts","sourceRoot":"","sources":["../../src/agents/chat.agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"chat.agent.d.ts","sourceRoot":"","sources":["../../src/agents/chat.agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,IAAI,CAAC;AAOhD,wBAAgB,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAW9B"}
|
|
@@ -2,15 +2,18 @@ import { stepCountIs, ToolLoopAgent } from 'ai';
|
|
|
2
2
|
import { models } from '../config/models.js';
|
|
3
3
|
import { appKnowledgeTool } from '../tools/app-knowledge.tool.js';
|
|
4
4
|
import { ziloDocsTools } from '../tools/zilo-docs.tool.js';
|
|
5
|
+
import { timeTools } from '../tools/time.tool.js';
|
|
6
|
+
import { limits } from '../safety/limits.js';
|
|
5
7
|
export function createChatAgent() {
|
|
6
8
|
return new ToolLoopAgent({
|
|
7
9
|
model: models.chat,
|
|
8
|
-
instructions: 'You are the ZiloShift conversational app guide. Explain workflows for workers, venues, admin operations, payments, disputes, shifts, onboarding, and launch tasks in a calm practical tone. Use local ZiloShift docs on demand for accurate product behavior instead of guessing. Keep answers practical and do not dump long docs into the response.',
|
|
10
|
+
instructions: 'You are the ZiloShift conversational app guide. Explain workflows for workers, venues, admin operations, payments, disputes, shifts, onboarding, and launch tasks in a calm practical tone. Use local ZiloShift docs on demand for accurate product behavior instead of guessing. Use getCurrentTime when the user asks for current date/time or relative schedule wording. Keep answers practical and do not dump long docs into the response.',
|
|
9
11
|
tools: {
|
|
10
12
|
...ziloDocsTools,
|
|
13
|
+
...timeTools,
|
|
11
14
|
appKnowledge: appKnowledgeTool,
|
|
12
15
|
},
|
|
13
|
-
stopWhen: stepCountIs(
|
|
16
|
+
stopWhen: stepCountIs(limits.subagentSteps),
|
|
14
17
|
});
|
|
15
18
|
}
|
|
16
19
|
//# sourceMappingURL=chat.agent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.agent.js","sourceRoot":"","sources":["../../src/agents/chat.agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"chat.agent.js","sourceRoot":"","sources":["../../src/agents/chat.agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,MAAM,UAAU,eAAe;IAC7B,OAAO,IAAI,aAAa,CAAC;QACvB,KAAK,EAAE,MAAM,CAAC,IAAI;QAClB,YAAY,EAAE,ibAAib;QAC/b,KAAK,EAAE;YACL,GAAG,aAAa;YAChB,GAAG,SAAS;YACZ,YAAY,EAAE,gBAAgB;SAC/B;QACD,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,aAAa,CAAC;KAC5C,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { ToolLoopAgent } from 'ai';
|
|
2
|
+
export declare function createDeveloperHelperAgent(runId?: string): ToolLoopAgent<never, {
|
|
3
|
+
readScratchpad: import("ai").Tool<Record<string, never>, string>;
|
|
4
|
+
appendScratchpad: import("ai").Tool<{
|
|
5
|
+
note: string;
|
|
6
|
+
}, string>;
|
|
7
|
+
docsSearch: import("ai").Tool<{
|
|
8
|
+
query: string;
|
|
9
|
+
}, import("../tools/web-search.tool.js").WebSearchResult[]>;
|
|
10
|
+
docsFetch: import("ai").Tool<{
|
|
11
|
+
url: string;
|
|
12
|
+
}, string>;
|
|
13
|
+
webSearch: import("ai").Tool<{
|
|
14
|
+
query: string;
|
|
15
|
+
maxResults?: number | undefined;
|
|
16
|
+
searchDepth?: "basic" | "advanced" | undefined;
|
|
17
|
+
includeAnswer?: boolean | undefined;
|
|
18
|
+
includeRawContent?: "text" | "markdown" | undefined;
|
|
19
|
+
includeDomains?: string[] | undefined;
|
|
20
|
+
excludeDomains?: string[] | undefined;
|
|
21
|
+
topic?: "general" | "news" | "finance" | undefined;
|
|
22
|
+
timeRange?: "day" | "week" | "month" | "year" | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
answer: string | undefined;
|
|
25
|
+
results: {
|
|
26
|
+
title: string;
|
|
27
|
+
url: string;
|
|
28
|
+
content: string;
|
|
29
|
+
rawContent: string | undefined;
|
|
30
|
+
score: number | undefined;
|
|
31
|
+
publishedDate: string | undefined;
|
|
32
|
+
}[];
|
|
33
|
+
}>;
|
|
34
|
+
webExtract: import("ai").Tool<{
|
|
35
|
+
urls: string[];
|
|
36
|
+
query?: string | undefined;
|
|
37
|
+
extractDepth?: "basic" | "advanced" | undefined;
|
|
38
|
+
format?: "text" | "markdown" | undefined;
|
|
39
|
+
chunksPerSource?: number | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
results: {
|
|
42
|
+
url: string;
|
|
43
|
+
title: string;
|
|
44
|
+
rawContent: string;
|
|
45
|
+
}[];
|
|
46
|
+
failedResults: {
|
|
47
|
+
url: string;
|
|
48
|
+
error: string;
|
|
49
|
+
}[];
|
|
50
|
+
}>;
|
|
51
|
+
webMap: import("ai").Tool<{
|
|
52
|
+
url: string;
|
|
53
|
+
instructions?: string | undefined;
|
|
54
|
+
maxDepth?: number | undefined;
|
|
55
|
+
limit?: number | undefined;
|
|
56
|
+
allowExternal?: boolean | undefined;
|
|
57
|
+
}, {
|
|
58
|
+
baseUrl: string;
|
|
59
|
+
results: string[];
|
|
60
|
+
}>;
|
|
61
|
+
deepResearch: import("ai").Tool<{
|
|
62
|
+
input: string;
|
|
63
|
+
model?: "mini" | "pro" | undefined;
|
|
64
|
+
timeoutSeconds?: number | undefined;
|
|
65
|
+
pollIntervalSeconds?: number | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
requestId: string;
|
|
68
|
+
status: string;
|
|
69
|
+
content: string;
|
|
70
|
+
sources: {
|
|
71
|
+
title: string;
|
|
72
|
+
url: string;
|
|
73
|
+
}[];
|
|
74
|
+
message?: never;
|
|
75
|
+
} | {
|
|
76
|
+
requestId: string;
|
|
77
|
+
status: string;
|
|
78
|
+
message: string;
|
|
79
|
+
content?: never;
|
|
80
|
+
sources?: never;
|
|
81
|
+
}>;
|
|
82
|
+
appKnowledge: import("ai").Tool<{
|
|
83
|
+
key: "agent-docs" | "readme";
|
|
84
|
+
}, string>;
|
|
85
|
+
getCurrentTime: import("ai").Tool<{
|
|
86
|
+
timeZone?: string | undefined;
|
|
87
|
+
}, {
|
|
88
|
+
iso: string;
|
|
89
|
+
unixMs: number;
|
|
90
|
+
timeZone: string;
|
|
91
|
+
formatted: string;
|
|
92
|
+
}>;
|
|
93
|
+
}, never>;
|
|
94
|
+
//# sourceMappingURL=developer-helper.agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"developer-helper.agent.d.ts","sourceRoot":"","sources":["../../src/agents/developer-helper.agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,IAAI,CAAC;AAUhD,wBAAgB,0BAA0B,CAAC,KAAK,SAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAuB3D"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { stepCountIs, ToolLoopAgent } from 'ai';
|
|
2
|
+
import { models } from '../config/models.js';
|
|
3
|
+
import { appKnowledgeTool } from '../tools/app-knowledge.tool.js';
|
|
4
|
+
import { docsFetchTool } from '../tools/docs-fetch.tool.js';
|
|
5
|
+
import { docsSearchTool } from '../tools/docs-search.tool.js';
|
|
6
|
+
import { createScratchpadTools } from '../tools/scratchpad.tool.js';
|
|
7
|
+
import { timeTools } from '../tools/time.tool.js';
|
|
8
|
+
import { deepResearchTool, webExtractTool, webMapTool, webSearchTool } from '../tools/web-search.tool.js';
|
|
9
|
+
import { limits } from '../safety/limits.js';
|
|
10
|
+
export function createDeveloperHelperAgent(runId = 'default') {
|
|
11
|
+
const scratchpadTools = createScratchpadTools(runId);
|
|
12
|
+
return new ToolLoopAgent({
|
|
13
|
+
model: models.research,
|
|
14
|
+
instructions: [
|
|
15
|
+
'You are ZilMate Developer Helper. Help developers integrate ZilMate through the CLI, SDK, Next.js server routes, background jobs, QStash webhooks, Cloudflare tunnels, Composio, package publishing, and troubleshooting.',
|
|
16
|
+
'Prefer local app/package knowledge first. For external technical facts, prefer official docs and primary sources.',
|
|
17
|
+
'Use time tools for current versions, release timing, date-sensitive debugging, or schedule-relative wording.',
|
|
18
|
+
'Return exact commands, minimal code snippets, and clear verification steps. Do not invent credentials or claim external setup succeeded without tool evidence.',
|
|
19
|
+
].join(' '),
|
|
20
|
+
tools: {
|
|
21
|
+
...timeTools,
|
|
22
|
+
docsSearch: docsSearchTool,
|
|
23
|
+
docsFetch: docsFetchTool,
|
|
24
|
+
webSearch: webSearchTool,
|
|
25
|
+
webExtract: webExtractTool,
|
|
26
|
+
webMap: webMapTool,
|
|
27
|
+
deepResearch: deepResearchTool,
|
|
28
|
+
appKnowledge: appKnowledgeTool,
|
|
29
|
+
...scratchpadTools,
|
|
30
|
+
},
|
|
31
|
+
stopWhen: stepCountIs(limits.subagentSteps),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=developer-helper.agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"developer-helper.agent.js","sourceRoot":"","sources":["../../src/agents/developer-helper.agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC1G,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,MAAM,UAAU,0BAA0B,CAAC,KAAK,GAAG,SAAS;IAC1D,MAAM,eAAe,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;IACrD,OAAO,IAAI,aAAa,CAAC;QACvB,KAAK,EAAE,MAAM,CAAC,QAAQ;QACtB,YAAY,EAAE;YACZ,2NAA2N;YAC3N,mHAAmH;YACnH,8GAA8G;YAC9G,gKAAgK;SACjK,CAAC,IAAI,CAAC,GAAG,CAAC;QACX,KAAK,EAAE;YACL,GAAG,SAAS;YACZ,UAAU,EAAE,cAAc;YAC1B,SAAS,EAAE,aAAa;YACxB,SAAS,EAAE,aAAa;YACxB,UAAU,EAAE,cAAc;YAC1B,MAAM,EAAE,UAAU;YAClB,YAAY,EAAE,gBAAgB;YAC9B,YAAY,EAAE,gBAAgB;YAC9B,GAAG,eAAe;SACnB;QACD,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,aAAa,CAAC;KAC5C,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -100,6 +100,14 @@ export declare function createDocsResearchAgent(runId?: string): ToolLoopAgent<n
|
|
|
100
100
|
appKnowledge: import("ai").Tool<{
|
|
101
101
|
key: "agent-docs" | "readme";
|
|
102
102
|
}, string>;
|
|
103
|
+
getCurrentTime: import("ai").Tool<{
|
|
104
|
+
timeZone?: string | undefined;
|
|
105
|
+
}, {
|
|
106
|
+
iso: string;
|
|
107
|
+
unixMs: number;
|
|
108
|
+
timeZone: string;
|
|
109
|
+
formatted: string;
|
|
110
|
+
}>;
|
|
103
111
|
listZiloDocs: import("ai").Tool<Record<string, never>, {
|
|
104
112
|
key: string;
|
|
105
113
|
title: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-research.agent.d.ts","sourceRoot":"","sources":["../../src/agents/docs-research.agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"docs-research.agent.d.ts","sourceRoot":"","sources":["../../src/agents/docs-research.agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,IAAI,CAAC;AAWhD,wBAAgB,uBAAuB,CAAC,KAAK,SAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAoBxD"}
|
|
@@ -6,13 +6,16 @@ import { appKnowledgeTool } from '../tools/app-knowledge.tool.js';
|
|
|
6
6
|
import { createScratchpadTools } from '../tools/scratchpad.tool.js';
|
|
7
7
|
import { ziloDocsTools } from '../tools/zilo-docs.tool.js';
|
|
8
8
|
import { deepResearchTool, webCrawlTool, webExtractTool, webMapTool, webSearchTool } from '../tools/web-search.tool.js';
|
|
9
|
+
import { timeTools } from '../tools/time.tool.js';
|
|
10
|
+
import { limits } from '../safety/limits.js';
|
|
9
11
|
export function createDocsResearchAgent(runId = 'default') {
|
|
10
12
|
const scratchpadTools = createScratchpadTools(runId);
|
|
11
13
|
return new ToolLoopAgent({
|
|
12
14
|
model: models.research,
|
|
13
|
-
instructions: 'You are a focused docs research subagent. For ZiloShift product behavior, search/read local Zilo docs first. For external facts, prefer official or primary docs: search lightly, extract known URLs deeply, map before crawling, crawl only small docs sections, and use deepResearch only for broad synthesis where the user clearly benefits from a heavier task. Return compact answers with source URLs. Use the scratchpad for compact intermediate notes only when research spans multiple sources.',
|
|
15
|
+
instructions: 'You are a focused docs research subagent. For ZiloShift product behavior, search/read local Zilo docs first. For external facts, prefer official or primary docs: search lightly, extract known URLs deeply, map before crawling, crawl only small docs sections, and use deepResearch only for broad synthesis where the user clearly benefits from a heavier task. Use getCurrentTime for current date/time or relative-date research framing. Return compact answers with source URLs. Use the scratchpad for compact intermediate notes only when research spans multiple sources.',
|
|
14
16
|
tools: {
|
|
15
17
|
...ziloDocsTools,
|
|
18
|
+
...timeTools,
|
|
16
19
|
docsSearch: docsSearchTool,
|
|
17
20
|
docsFetch: docsFetchTool,
|
|
18
21
|
webSearch: webSearchTool,
|
|
@@ -23,7 +26,7 @@ export function createDocsResearchAgent(runId = 'default') {
|
|
|
23
26
|
appKnowledge: appKnowledgeTool,
|
|
24
27
|
...scratchpadTools,
|
|
25
28
|
},
|
|
26
|
-
stopWhen: stepCountIs(
|
|
29
|
+
stopWhen: stepCountIs(limits.subagentSteps),
|
|
27
30
|
});
|
|
28
31
|
}
|
|
29
32
|
//# sourceMappingURL=docs-research.agent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-research.agent.js","sourceRoot":"","sources":["../../src/agents/docs-research.agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"docs-research.agent.js","sourceRoot":"","sources":["../../src/agents/docs-research.agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACxH,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,MAAM,UAAU,uBAAuB,CAAC,KAAK,GAAG,SAAS;IACvD,MAAM,eAAe,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;IACrD,OAAO,IAAI,aAAa,CAAC;QACvB,KAAK,EAAE,MAAM,CAAC,QAAQ;QACtB,YAAY,EAAE,wjBAAwjB;QACtkB,KAAK,EAAE;YACL,GAAG,aAAa;YAChB,GAAG,SAAS;YACZ,UAAU,EAAE,cAAc;YAC1B,SAAS,EAAE,aAAa;YACxB,SAAS,EAAE,aAAa;YACxB,UAAU,EAAE,cAAc;YAC1B,MAAM,EAAE,UAAU;YAClB,QAAQ,EAAE,YAAY;YACtB,YAAY,EAAE,gBAAgB;YAC9B,YAAY,EAAE,gBAAgB;YAC9B,GAAG,eAAe;SACnB;QACD,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,aAAa,CAAC;KAC5C,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.agent.d.ts","sourceRoot":"","sources":["../../src/agents/image.agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"image.agent.d.ts","sourceRoot":"","sources":["../../src/agents/image.agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,IAAI,CAAC;AAKhD,wBAAgB,gBAAgB;;;;;;UAO/B"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { stepCountIs, ToolLoopAgent } from 'ai';
|
|
2
2
|
import { models } from '../config/models.js';
|
|
3
3
|
import { imageGenerateTool } from '../tools/image-generate.tool.js';
|
|
4
|
+
import { limits } from '../safety/limits.js';
|
|
4
5
|
export function createImageAgent() {
|
|
5
6
|
return new ToolLoopAgent({
|
|
6
7
|
model: models.manager,
|
|
7
8
|
instructions: 'You are the ZiloShift image agent. Improve the user image prompt when useful, then call generateImage. Use Gemini 3 Pro Image via Gateway. Do not claim GPT-2 can generate images.',
|
|
8
9
|
tools: { generateImage: imageGenerateTool },
|
|
9
|
-
stopWhen: stepCountIs(
|
|
10
|
+
stopWhen: stepCountIs(limits.subagentSteps),
|
|
10
11
|
});
|
|
11
12
|
}
|
|
12
13
|
//# sourceMappingURL=image.agent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.agent.js","sourceRoot":"","sources":["../../src/agents/image.agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"image.agent.js","sourceRoot":"","sources":["../../src/agents/image.agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,MAAM,UAAU,gBAAgB;IAC9B,OAAO,IAAI,aAAa,CAAC;QACvB,KAAK,EAAE,MAAM,CAAC,OAAO;QACrB,YAAY,EAAE,oLAAoL;QAClM,KAAK,EAAE,EAAE,aAAa,EAAE,iBAAiB,EAAE;QAC3C,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,aAAa,CAAC;KAC5C,CAAC,CAAC;AACL,CAAC"}
|
package/dist/agents/manager.d.ts
CHANGED
|
@@ -77,6 +77,33 @@ export declare function createManagerAgent(runId?: string, options?: {
|
|
|
77
77
|
triggerSlug: string;
|
|
78
78
|
dryRun: boolean;
|
|
79
79
|
}>;
|
|
80
|
+
createJob: import("ai").Tool<{
|
|
81
|
+
task: string;
|
|
82
|
+
schedule?: string | undefined;
|
|
83
|
+
runAt?: string | undefined;
|
|
84
|
+
metadata?: Record<string, unknown> | undefined;
|
|
85
|
+
}, import("../server.js").ZilMateJob>;
|
|
86
|
+
listJobs: import("ai").Tool<{
|
|
87
|
+
status?: "running" | "failed" | "queued" | "succeeded" | "cancelled" | undefined;
|
|
88
|
+
limit?: number | undefined;
|
|
89
|
+
}, import("../server.js").ZilMateJob[]>;
|
|
90
|
+
showJob: import("ai").Tool<{
|
|
91
|
+
id: string;
|
|
92
|
+
}, import("../server.js").ZilMateJob | null>;
|
|
93
|
+
listJobLogs: import("ai").Tool<{
|
|
94
|
+
id: string;
|
|
95
|
+
}, import("../server.js").JobLog[]>;
|
|
96
|
+
cancelJob: import("ai").Tool<{
|
|
97
|
+
id: string;
|
|
98
|
+
}, import("../server.js").ZilMateJob | null>;
|
|
99
|
+
getCurrentTime: import("ai").Tool<{
|
|
100
|
+
timeZone?: string | undefined;
|
|
101
|
+
}, {
|
|
102
|
+
iso: string;
|
|
103
|
+
unixMs: number;
|
|
104
|
+
timeZone: string;
|
|
105
|
+
formatted: string;
|
|
106
|
+
}>;
|
|
80
107
|
rememberMemory: import("ai").Tool<{
|
|
81
108
|
text: string;
|
|
82
109
|
tags?: string[] | undefined;
|
|
@@ -130,6 +157,15 @@ export declare function createManagerAgent(runId?: string, options?: {
|
|
|
130
157
|
research: import("ai").Tool<{
|
|
131
158
|
prompt: string;
|
|
132
159
|
}, string>;
|
|
160
|
+
automationPlanner: import("ai").Tool<{
|
|
161
|
+
prompt: string;
|
|
162
|
+
}, string>;
|
|
163
|
+
personalAssistant: import("ai").Tool<{
|
|
164
|
+
prompt: string;
|
|
165
|
+
}, string>;
|
|
166
|
+
developerHelper: import("ai").Tool<{
|
|
167
|
+
prompt: string;
|
|
168
|
+
}, string>;
|
|
133
169
|
}, never>>;
|
|
134
170
|
export declare function runManager(prompt: string, options?: {
|
|
135
171
|
progress?: (event: ProgressEvent) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/agents/manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,aAAa,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/agents/manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,aAAa,EAAE,MAAM,IAAI,CAAC;AAatD,OAAO,EAAgB,KAAK,aAAa,EAAwB,MAAM,wBAAwB,CAAC;AAChG,OAAO,EAAE,KAAK,mBAAmB,EAA2B,MAAM,uBAAuB,CAAC;AAuE1F,wBAAsB,kBAAkB,CAAC,KAAK,GAAE,MAAqB,EAAE,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO;;;;;;;;;;;;;;;;;;;;mBA8Gg4/F,CAAC;wBAAsC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAAz2S,CAAC;uBAAqC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAjChttF;AAOD,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAAO,mBAsB9K"}
|