zilmate 1.7.2 → 1.7.6
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 +36 -36
- package/README.md +503 -503
- package/SDK.md +320 -320
- package/agent-docs.md +276 -276
- package/dist/agents/automation-planner.agent.d.ts.map +1 -1
- package/dist/agents/coding.agent.d.ts +18 -0
- package/dist/agents/coding.agent.d.ts.map +1 -1
- package/dist/agents/finance.agent.d.ts +60 -0
- package/dist/agents/finance.agent.d.ts.map +1 -0
- package/dist/agents/finance.agent.js +30 -0
- package/dist/agents/finance.agent.js.map +1 -0
- package/dist/agents/manager.d.ts +94 -1
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/manager.js +102 -36
- package/dist/agents/manager.js.map +1 -1
- package/dist/agents/swarm/engineering/qa.d.ts +3 -0
- package/dist/agents/swarm/engineering/qa.d.ts.map +1 -0
- package/dist/agents/swarm/engineering/qa.js +19 -0
- package/dist/agents/swarm/engineering/qa.js.map +1 -0
- package/dist/agents/swarm/growth/seo.d.ts +3 -0
- package/dist/agents/swarm/growth/seo.d.ts.map +1 -0
- package/dist/agents/swarm/growth/seo.js +19 -0
- package/dist/agents/swarm/growth/seo.js.map +1 -0
- package/dist/agents/swarm/main.d.ts +22 -0
- package/dist/agents/swarm/main.d.ts.map +1 -0
- package/dist/agents/swarm/main.js +65 -0
- package/dist/agents/swarm/main.js.map +1 -0
- package/dist/agents/swarm/operations/finance.d.ts +3 -0
- package/dist/agents/swarm/operations/finance.d.ts.map +1 -0
- package/dist/agents/swarm/operations/finance.js +19 -0
- package/dist/agents/swarm/operations/finance.js.map +1 -0
- package/dist/agents/swarm/registry.d.ts +4 -0
- package/dist/agents/swarm/registry.d.ts.map +1 -0
- package/dist/agents/swarm/registry.js +361 -0
- package/dist/agents/swarm/registry.js.map +1 -0
- package/dist/cli/chat.d.ts +2 -0
- package/dist/cli/chat.d.ts.map +1 -0
- package/dist/cli/chat.js +61 -0
- package/dist/cli/chat.js.map +1 -0
- package/dist/cli/composer.d.ts.map +1 -1
- package/dist/cli/composer.js +54 -4
- package/dist/cli/composer.js.map +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +13 -0
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +46 -53
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/interactive.d.ts.map +1 -1
- package/dist/cli/interactive.js +51 -6
- package/dist/cli/interactive.js.map +1 -1
- package/dist/cli/models.d.ts +1 -1
- package/dist/cli/models.d.ts.map +1 -1
- package/dist/cli/models.js +21 -21
- package/dist/cli/models.js.map +1 -1
- package/dist/cli/prompt.d.ts +2 -2
- package/dist/cli/prompt.d.ts.map +1 -1
- package/dist/cli/prompt.js +58 -14
- package/dist/cli/prompt.js.map +1 -1
- package/dist/cli/render.d.ts.map +1 -1
- package/dist/cli/render.js +25 -17
- package/dist/cli/render.js.map +1 -1
- package/dist/cli/setup.d.ts +1 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +74 -2
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/swarm.d.ts +4 -0
- package/dist/cli/swarm.d.ts.map +1 -0
- package/dist/cli/swarm.js +21 -0
- package/dist/cli/swarm.js.map +1 -0
- package/dist/cli/theme.d.ts +67 -1
- package/dist/cli/theme.d.ts.map +1 -1
- package/dist/cli/theme.js +66 -4
- package/dist/cli/theme.js.map +1 -1
- package/dist/cli/tunnel.d.ts.map +1 -1
- package/dist/cli/tunnel.js +2 -1
- package/dist/cli/tunnel.js.map +1 -1
- package/dist/cli/voice.js +11 -11
- package/dist/cli/welcome.d.ts.map +1 -1
- package/dist/cli/welcome.js +2 -0
- package/dist/cli/welcome.js.map +1 -1
- package/dist/config/model-store.d.ts +1 -1
- package/dist/config/model-store.d.ts.map +1 -1
- package/dist/config/model-store.js +14 -1
- package/dist/config/model-store.js.map +1 -1
- package/dist/config/models.d.ts +7 -0
- package/dist/config/models.d.ts.map +1 -1
- package/dist/config/models.js +30 -6
- package/dist/config/models.js.map +1 -1
- package/dist/documents/pdf.d.ts.map +1 -1
- package/dist/documents/pdf.js +143 -41
- package/dist/documents/pdf.js.map +1 -1
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/dist/jobs/anomaly.js +5 -5
- package/dist/memory/heal.js +43 -43
- package/dist/observability/doctor.d.ts +3 -0
- package/dist/observability/doctor.d.ts.map +1 -0
- package/dist/observability/doctor.js +33 -0
- package/dist/observability/doctor.js.map +1 -0
- package/dist/observability/usage.d.ts +13 -0
- package/dist/observability/usage.d.ts.map +1 -0
- package/dist/observability/usage.js +34 -0
- package/dist/observability/usage.js.map +1 -0
- package/dist/runtime/chat-bridge.d.ts +32 -0
- package/dist/runtime/chat-bridge.d.ts.map +1 -0
- package/dist/runtime/chat-bridge.js +92 -0
- package/dist/runtime/chat-bridge.js.map +1 -0
- package/dist/runtime/confirm.d.ts.map +1 -1
- package/dist/runtime/confirm.js +12 -2
- package/dist/runtime/confirm.js.map +1 -1
- package/dist/runtime/progress.d.ts.map +1 -1
- package/dist/runtime/progress.js +3 -1
- package/dist/runtime/progress.js.map +1 -1
- package/dist/runtime/prompts/builder.d.ts +11 -0
- package/dist/runtime/prompts/builder.d.ts.map +1 -0
- package/dist/runtime/prompts/builder.js +29 -0
- package/dist/runtime/prompts/builder.js.map +1 -0
- package/dist/runtime/registry.d.ts +14 -0
- package/dist/runtime/registry.d.ts.map +1 -0
- package/dist/runtime/registry.js +39 -0
- package/dist/runtime/registry.js.map +1 -0
- package/dist/runtime/storage/interface.d.ts +16 -0
- package/dist/runtime/storage/interface.d.ts.map +1 -0
- package/dist/runtime/storage/interface.js +19 -0
- package/dist/runtime/storage/interface.js.map +1 -0
- package/dist/runtime/storage/local.d.ts +12 -0
- package/dist/runtime/storage/local.d.ts.map +1 -0
- package/dist/runtime/storage/local.js +48 -0
- package/dist/runtime/storage/local.js.map +1 -0
- package/dist/runtime/storage/redis.d.ts +11 -0
- package/dist/runtime/storage/redis.d.ts.map +1 -0
- package/dist/runtime/storage/redis.js +21 -0
- package/dist/runtime/storage/redis.js.map +1 -0
- package/dist/runtime/swarm/reports.d.ts +9 -0
- package/dist/runtime/swarm/reports.d.ts.map +1 -0
- package/dist/runtime/swarm/reports.js +43 -0
- package/dist/runtime/swarm/reports.js.map +1 -0
- package/dist/runtime/swarm.d.ts +38 -0
- package/dist/runtime/swarm.d.ts.map +1 -0
- package/dist/runtime/swarm.js +110 -0
- package/dist/runtime/swarm.js.map +1 -0
- package/dist/runtime/telemetry.d.ts +15 -0
- package/dist/runtime/telemetry.d.ts.map +1 -0
- package/dist/runtime/telemetry.js +25 -0
- package/dist/runtime/telemetry.js.map +1 -0
- package/dist/runtime/tool-utils.d.ts +12 -0
- package/dist/runtime/tool-utils.d.ts.map +1 -0
- package/dist/runtime/tool-utils.js +31 -0
- package/dist/runtime/tool-utils.js.map +1 -0
- package/dist/tools/browser.tool.d.ts +54 -0
- package/dist/tools/browser.tool.d.ts.map +1 -0
- package/dist/tools/browser.tool.js +193 -0
- package/dist/tools/browser.tool.js.map +1 -0
- package/dist/tools/business-apps.tool.d.ts +18 -0
- package/dist/tools/business-apps.tool.d.ts.map +1 -0
- package/dist/tools/business-apps.tool.js +43 -0
- package/dist/tools/business-apps.tool.js.map +1 -0
- package/dist/tools/computer-use.tool.js +66 -66
- package/dist/tools/cross-app-ledger.tool.d.ts +7 -0
- package/dist/tools/cross-app-ledger.tool.d.ts.map +1 -0
- package/dist/tools/cross-app-ledger.tool.js +70 -0
- package/dist/tools/cross-app-ledger.tool.js.map +1 -0
- package/dist/tools/daytona-browser.tool.d.ts +113 -0
- package/dist/tools/daytona-browser.tool.d.ts.map +1 -0
- package/dist/tools/daytona-browser.tool.js +348 -0
- package/dist/tools/daytona-browser.tool.js.map +1 -0
- package/dist/tools/desktop.tool.js +10 -10
- package/dist/tools/documents.tool.js +5 -5
- package/dist/tools/finance.tool.d.ts +18 -0
- package/dist/tools/finance.tool.d.ts.map +1 -0
- package/dist/tools/finance.tool.js +88 -0
- package/dist/tools/finance.tool.js.map +1 -0
- package/dist/tools/image-intelligence.tool.d.ts +12 -0
- package/dist/tools/image-intelligence.tool.d.ts.map +1 -0
- package/dist/tools/image-intelligence.tool.js +62 -0
- package/dist/tools/image-intelligence.tool.js.map +1 -0
- package/dist/tools/notify.tool.js +8 -8
- package/dist/tools/osint-install.tool.js +8 -8
- package/dist/tools/pentest-install.tool.js +6 -6
- package/dist/tools/setup-assistant.tool.d.ts +1 -1
- package/dist/tools/shell.tool.d.ts +18 -0
- package/dist/tools/shell.tool.d.ts.map +1 -1
- package/dist/tools/shell.tool.js +34 -0
- package/dist/tools/shell.tool.js.map +1 -1
- package/dist/tools/swarm-collaboration.tool.d.ts +29 -0
- package/dist/tools/swarm-collaboration.tool.d.ts.map +1 -0
- package/dist/tools/swarm-collaboration.tool.js +88 -0
- package/dist/tools/swarm-collaboration.tool.js.map +1 -0
- package/dist/tools/swarm-memory.tool.d.ts +16 -0
- package/dist/tools/swarm-memory.tool.d.ts.map +1 -0
- package/dist/tools/swarm-memory.tool.js +31 -0
- package/dist/tools/swarm-memory.tool.js.map +1 -0
- package/dist/tools/swarm-ops.tool.d.ts +20 -0
- package/dist/tools/swarm-ops.tool.d.ts.map +1 -0
- package/dist/tools/swarm-ops.tool.js +55 -0
- package/dist/tools/swarm-ops.tool.js.map +1 -0
- package/dist/tools/triggers.tool.d.ts.map +1 -1
- package/dist/tools/visual-audit.tool.d.ts +24 -0
- package/dist/tools/visual-audit.tool.d.ts.map +1 -0
- package/dist/tools/visual-audit.tool.js +48 -0
- package/dist/tools/visual-audit.tool.js.map +1 -0
- package/dist/tools/web-intelligence.tool.d.ts +12 -0
- package/dist/tools/web-intelligence.tool.d.ts.map +1 -0
- package/dist/tools/web-intelligence.tool.js +27 -0
- package/dist/tools/web-intelligence.tool.js.map +1 -0
- package/dist/workspace/init.js +18 -18
- package/dist/workspace/output-paths.d.ts +1 -1
- package/dist/workspace/output-paths.d.ts.map +1 -1
- package/dist/workspace/output-paths.js +1 -0
- package/dist/workspace/output-paths.js.map +1 -1
- package/dist/workspace/paths.d.ts +1 -0
- package/dist/workspace/paths.d.ts.map +1 -1
- package/dist/workspace/paths.js +1 -0
- package/dist/workspace/paths.js.map +1 -1
- package/install.ps1 +62 -62
- package/package.json +107 -103
- package/scripts/postinstall.mjs +42 -42
- package/scripts/release-github.mjs +91 -91
- package/src/doc/README.md +49 -49
- package/src/doc/admin-tools-and-sms-campaigns.md +99 -99
- package/src/doc/escalation-checklist.md +97 -97
- package/src/doc/payments-and-payouts.md +82 -82
- package/src/doc/shift-lifecycle-and-disputes.md +95 -95
- package/src/doc/support-macros.md +40 -40
- package/src/doc/venue-support-playbook.md +145 -145
- package/src/doc/verification-and-trust.md +88 -88
- package/src/doc/worker-support-playbook.md +159 -159
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ToolLoopAgent } from 'ai';
|
|
2
|
+
export declare function createFinanceAgent(runId?: string): ToolLoopAgent<never, {
|
|
3
|
+
readNotebook: import("ai").Tool<{
|
|
4
|
+
limitChars?: number | undefined;
|
|
5
|
+
}, {
|
|
6
|
+
paths: {
|
|
7
|
+
markdown: string;
|
|
8
|
+
json: string;
|
|
9
|
+
};
|
|
10
|
+
content: string;
|
|
11
|
+
}>;
|
|
12
|
+
appendNotebook: import("ai").Tool<{
|
|
13
|
+
title: string;
|
|
14
|
+
body: string;
|
|
15
|
+
tags?: string[] | undefined;
|
|
16
|
+
}, import("../memory/notebook.js").NotebookEntry>;
|
|
17
|
+
searchNotebook: import("ai").Tool<{
|
|
18
|
+
query: string;
|
|
19
|
+
limit?: number | undefined;
|
|
20
|
+
}, import("../memory/notebook.js").NotebookEntry[]>;
|
|
21
|
+
listNotebookEntries: import("ai").Tool<{
|
|
22
|
+
limit?: number | undefined;
|
|
23
|
+
}, import("../memory/notebook.js").NotebookEntry[]>;
|
|
24
|
+
quickNotebookNote: import("ai").Tool<{
|
|
25
|
+
section: string;
|
|
26
|
+
content: string;
|
|
27
|
+
}, {
|
|
28
|
+
path: string;
|
|
29
|
+
section: string;
|
|
30
|
+
appendedAt: string;
|
|
31
|
+
}>;
|
|
32
|
+
readScratchpad: import("ai").Tool<Record<string, never>, string>;
|
|
33
|
+
appendScratchpad: import("ai").Tool<{
|
|
34
|
+
note: string;
|
|
35
|
+
}, string>;
|
|
36
|
+
getCurrentTime: import("ai").Tool<{
|
|
37
|
+
timeZone?: string | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
iso: string;
|
|
40
|
+
unixMs: number;
|
|
41
|
+
timeZone: string;
|
|
42
|
+
formatted: string;
|
|
43
|
+
}>;
|
|
44
|
+
getTickerQuote: import("ai").Tool<{
|
|
45
|
+
symbol: string;
|
|
46
|
+
}, any>;
|
|
47
|
+
getHistoricalData: import("ai").Tool<{
|
|
48
|
+
symbol: string;
|
|
49
|
+
period1: string;
|
|
50
|
+
interval: "1d" | "1wk" | "1mo";
|
|
51
|
+
period2?: string | undefined;
|
|
52
|
+
}, any>;
|
|
53
|
+
searchCompany: import("ai").Tool<{
|
|
54
|
+
query: string;
|
|
55
|
+
}, any>;
|
|
56
|
+
getTickerSummary: import("ai").Tool<{
|
|
57
|
+
symbol: string;
|
|
58
|
+
}, any>;
|
|
59
|
+
}, never>;
|
|
60
|
+
//# sourceMappingURL=finance.agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finance.agent.d.ts","sourceRoot":"","sources":["../../src/agents/finance.agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,IAAI,CAAC;AAQhD,wBAAgB,kBAAkB,CAAC,KAAK,SAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAsBnD"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { stepCountIs, ToolLoopAgent } from 'ai';
|
|
2
|
+
import { models } from '../config/models.js';
|
|
3
|
+
import { financeTools } from '../tools/finance.tool.js';
|
|
4
|
+
import { timeTools } from '../tools/time.tool.js';
|
|
5
|
+
import { limits } from '../safety/limits.js';
|
|
6
|
+
import { createScratchpadTools } from '../tools/scratchpad.tool.js';
|
|
7
|
+
import { notebookTools } from '../tools/notebook.tool.js';
|
|
8
|
+
export function createFinanceAgent(runId = 'default') {
|
|
9
|
+
const scratchpadTools = createScratchpadTools(`${runId}:finance`);
|
|
10
|
+
return new ToolLoopAgent({
|
|
11
|
+
model: models.research,
|
|
12
|
+
instructions: [
|
|
13
|
+
'You are ZilMate Financial Analyst, a specialist subagent for market research, ticker analysis, and business financial reporting.',
|
|
14
|
+
'Use Yahoo Finance tools to fetch real-time quotes, historical data, and company fundamentals.',
|
|
15
|
+
'Provide clear, data-driven insights. Group findings by ticker and include relevant metrics like price change, market cap, and recent trends.',
|
|
16
|
+
'Use the scratchpad to compile data from multiple tickers before synthesizing a final report.',
|
|
17
|
+
'When asked for business health, correlate market data with any provided internal metrics (like Stripe revenue if available via Composio).',
|
|
18
|
+
'Always include dates and timestamps for financial data to ensure context on market volatility.',
|
|
19
|
+
'Return a concise but comprehensive financial brief: current state, historical context, and identified risks or opportunities.',
|
|
20
|
+
].join('\n'),
|
|
21
|
+
tools: {
|
|
22
|
+
...financeTools,
|
|
23
|
+
...timeTools,
|
|
24
|
+
...scratchpadTools,
|
|
25
|
+
...notebookTools,
|
|
26
|
+
},
|
|
27
|
+
stopWhen: stepCountIs(limits.subagentSteps),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=finance.agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finance.agent.js","sourceRoot":"","sources":["../../src/agents/finance.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,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,MAAM,UAAU,kBAAkB,CAAC,KAAK,GAAG,SAAS;IAClD,MAAM,eAAe,GAAG,qBAAqB,CAAC,GAAG,KAAK,UAAU,CAAC,CAAC;IAElE,OAAO,IAAI,aAAa,CAAC;QACvB,KAAK,EAAE,MAAM,CAAC,QAAQ;QACtB,YAAY,EAAE;YACZ,kIAAkI;YAClI,+FAA+F;YAC/F,8IAA8I;YAC9I,8FAA8F;YAC9F,2IAA2I;YAC3I,gGAAgG;YAChG,+HAA+H;SAChI,CAAC,IAAI,CAAC,IAAI,CAAC;QACZ,KAAK,EAAE;YACL,GAAG,YAAY;YACf,GAAG,SAAS;YACZ,GAAG,eAAe;YAClB,GAAG,aAAa;SACjB;QACD,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,aAAa,CAAC;KAC5C,CAAC,CAAC;AACL,CAAC"}
|
package/dist/agents/manager.d.ts
CHANGED
|
@@ -5,6 +5,75 @@ import { type AskHandler } from '../runtime/ask.js';
|
|
|
5
5
|
export declare function createManagerAgent(runId?: string, options?: {
|
|
6
6
|
sessionId?: string;
|
|
7
7
|
}): Promise<ToolLoopAgent<never, {
|
|
8
|
+
autonomousMarketResearch: import("ai").Tool<{
|
|
9
|
+
url: string;
|
|
10
|
+
focus?: string | undefined;
|
|
11
|
+
}, {
|
|
12
|
+
url: string;
|
|
13
|
+
focus: string;
|
|
14
|
+
recommendedSteps: string[];
|
|
15
|
+
message: string;
|
|
16
|
+
}>;
|
|
17
|
+
removeBackground: import("ai").Tool<{
|
|
18
|
+
imagePath: string;
|
|
19
|
+
outputFileName?: string | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
inputPath: string;
|
|
22
|
+
outputPath: string;
|
|
23
|
+
format: string;
|
|
24
|
+
status: string;
|
|
25
|
+
}>;
|
|
26
|
+
browserNavigate: import("ai").Tool<{
|
|
27
|
+
url: string;
|
|
28
|
+
waitUntil: "commit" | "load" | "domcontentloaded" | "networkidle";
|
|
29
|
+
}, {
|
|
30
|
+
url: string;
|
|
31
|
+
title: string;
|
|
32
|
+
status: string;
|
|
33
|
+
}>;
|
|
34
|
+
browserClick: import("ai").Tool<{
|
|
35
|
+
selector: string;
|
|
36
|
+
timeout: number;
|
|
37
|
+
}, {
|
|
38
|
+
selector: string;
|
|
39
|
+
result: string;
|
|
40
|
+
}>;
|
|
41
|
+
browserType: import("ai").Tool<{
|
|
42
|
+
selector: string;
|
|
43
|
+
text: string;
|
|
44
|
+
delay: number;
|
|
45
|
+
pressEnter: boolean;
|
|
46
|
+
}, {
|
|
47
|
+
selector: string;
|
|
48
|
+
result: string;
|
|
49
|
+
}>;
|
|
50
|
+
browserExtractContent: import("ai").Tool<{
|
|
51
|
+
mode: "text" | "markdown" | "html" | "links";
|
|
52
|
+
selector?: string | undefined;
|
|
53
|
+
}, {
|
|
54
|
+
mode: "text" | "markdown" | "html" | "links";
|
|
55
|
+
result: any;
|
|
56
|
+
}>;
|
|
57
|
+
browserTakeScreenshot: import("ai").Tool<{
|
|
58
|
+
fullPage: boolean;
|
|
59
|
+
}, {
|
|
60
|
+
filePath: string;
|
|
61
|
+
}>;
|
|
62
|
+
browserExecuteScript: import("ai").Tool<{
|
|
63
|
+
script: string;
|
|
64
|
+
}, {
|
|
65
|
+
result: unknown;
|
|
66
|
+
}>;
|
|
67
|
+
browserClose: import("ai").Tool<Record<string, never>, {
|
|
68
|
+
status: string;
|
|
69
|
+
}>;
|
|
70
|
+
visualBrowserAudit: import("ai").Tool<{
|
|
71
|
+
focus?: string | undefined;
|
|
72
|
+
}, {
|
|
73
|
+
screenshotPath: string;
|
|
74
|
+
auditPrompt: string;
|
|
75
|
+
message: string;
|
|
76
|
+
}>;
|
|
8
77
|
getSessionHandoff: import("ai").Tool<{
|
|
9
78
|
sessionId?: string | undefined;
|
|
10
79
|
}, {
|
|
@@ -283,7 +352,7 @@ export declare function createManagerAgent(runId?: string, options?: {
|
|
|
283
352
|
secureSetupHint: string;
|
|
284
353
|
}>;
|
|
285
354
|
launchSecureSetup: import("ai").Tool<{
|
|
286
|
-
section?: "gateway" | "redis" | "jobs" | "all" | "
|
|
355
|
+
section?: "gateway" | "redis" | "jobs" | "all" | "tavily" | "composio" | "qstash" | "voice" | "workspace" | undefined;
|
|
287
356
|
}, {
|
|
288
357
|
instruction: string;
|
|
289
358
|
command: string;
|
|
@@ -380,6 +449,24 @@ export declare function createManagerAgent(runId?: string, options?: {
|
|
|
380
449
|
stderr: any;
|
|
381
450
|
command: string;
|
|
382
451
|
}>;
|
|
452
|
+
executeAndSelfHeal: import("ai").Tool<{
|
|
453
|
+
command: string;
|
|
454
|
+
context?: string | undefined;
|
|
455
|
+
}, {
|
|
456
|
+
success: boolean;
|
|
457
|
+
stdout: string;
|
|
458
|
+
command: string;
|
|
459
|
+
error?: never;
|
|
460
|
+
diagnosisHint?: never;
|
|
461
|
+
context?: never;
|
|
462
|
+
} | {
|
|
463
|
+
success: boolean;
|
|
464
|
+
command: string;
|
|
465
|
+
error: any;
|
|
466
|
+
diagnosisHint: string;
|
|
467
|
+
context: string;
|
|
468
|
+
stdout?: never;
|
|
469
|
+
}>;
|
|
383
470
|
installDependencies: import("ai").Tool<{
|
|
384
471
|
command: string;
|
|
385
472
|
manager?: "npm" | "pnpm" | "yarn" | undefined;
|
|
@@ -1015,6 +1102,12 @@ export declare function createManagerAgent(runId?: string, options?: {
|
|
|
1015
1102
|
goalManager: import("ai").Tool<{
|
|
1016
1103
|
prompt: string;
|
|
1017
1104
|
}, string>;
|
|
1105
|
+
finance: import("ai").Tool<{
|
|
1106
|
+
prompt: string;
|
|
1107
|
+
}, string>;
|
|
1108
|
+
digitalCorporation: import("ai").Tool<{
|
|
1109
|
+
prompt: string;
|
|
1110
|
+
}, string>;
|
|
1018
1111
|
}, never>>;
|
|
1019
1112
|
export declare function runManager(prompt: string, options?: {
|
|
1020
1113
|
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;AAiBtD,OAAO,EAAgB,KAAK,aAAa,EAAwB,MAAM,wBAAwB,CAAC;AAChG,OAAO,EAAE,KAAK,mBAAmB,EAA2B,MAAM,uBAAuB,CAAC;AAyB1F,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAoOpE,wBAAsB,kBAAkB,CAAC,KAAK,GAAE,MAAqB,EAAE,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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js
CHANGED
|
@@ -13,6 +13,8 @@ import { createDeveloperHelperAgent } from './developer-helper.agent.js';
|
|
|
13
13
|
import { createSecurityAgent } from './security.agent.js';
|
|
14
14
|
import { createCodingAgent } from './coding.agent.js';
|
|
15
15
|
import { createGoalManagerAgent } from './goal-manager.agent.js';
|
|
16
|
+
import { createFinanceAgent } from './finance.agent.js';
|
|
17
|
+
import { createDigitalCorporationMain } from './swarm/main.js';
|
|
16
18
|
import { limits } from '../safety/limits.js';
|
|
17
19
|
import { emitProgress, withProgressListener } from '../runtime/progress.js';
|
|
18
20
|
import { withConfirmationHandler } from '../runtime/confirm.js';
|
|
@@ -43,6 +45,9 @@ import { askTools } from '../tools/ask.tool.js';
|
|
|
43
45
|
import { withAskHandler } from '../runtime/ask.js';
|
|
44
46
|
import { situationalAwarenessTools } from '../tools/situational-awareness.tool.js';
|
|
45
47
|
import { sessionContinuityTools } from '../tools/session-continuity.tool.js';
|
|
48
|
+
import { trackUsage } from '../observability/usage.js';
|
|
49
|
+
import { runProactiveDoctor } from '../observability/doctor.js';
|
|
50
|
+
import { SystemPromptBuilder } from '../runtime/prompts/builder.js';
|
|
46
51
|
function agentInput(prompt, abortSignal) {
|
|
47
52
|
return abortSignal ? { prompt, abortSignal } : { prompt };
|
|
48
53
|
}
|
|
@@ -162,65 +167,110 @@ function codingStepTools(step) {
|
|
|
162
167
|
const toolCalls = step.toolCalls || [];
|
|
163
168
|
return toolCalls.map((call) => call.toolName).filter((name) => Boolean(name));
|
|
164
169
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
const composioTools = await createComposioTools(options.sessionId || 'default');
|
|
179
|
-
return new ToolLoopAgent({
|
|
180
|
-
model: models.manager,
|
|
181
|
-
instructions: [
|
|
182
|
-
'You are ZilMate, a general CLI assistant with deep built-in ZiloShift expertise.',
|
|
170
|
+
import { browserTools } from '../tools/browser.tool.js';
|
|
171
|
+
import { imageIntelligenceTools } from '../tools/image-intelligence.tool.js';
|
|
172
|
+
import { webIntelligenceTools } from '../tools/web-intelligence.tool.js';
|
|
173
|
+
function buildManagerInstructions() {
|
|
174
|
+
const builder = new SystemPromptBuilder();
|
|
175
|
+
builder.addSection({
|
|
176
|
+
id: 'core',
|
|
177
|
+
content: [
|
|
178
|
+
'You are ZilMate CEO, the lead orchestrator of a hierarchical business swarm. You have been upgraded to manage a "Digital Corporation" sub-department.',
|
|
179
|
+
'You manage five core departments: Strategy, Engineering, Growth, Operations, and Data. Each department has specialized subagents with unique KPIs and tools.',
|
|
180
|
+
'Your goal is to scale ZilMate from a personal assistant into an autonomous digital workforce capable of running an online business end-to-end.',
|
|
181
|
+
'Always delegate complex business goals (SaaS management, marketing campaigns, engineering sprints) to the "digitalCorporation" subagent.',
|
|
182
|
+
'You have access to "Super Tools" for cross-app financial correlation, visual UI auditing, autonomous market research, and self-healing terminal execution.',
|
|
183
183
|
'Know your current capabilities: you have text chat, realtime voice mode with speech input and spoken replies, shared session history, long-term memory, background jobs, scheduled tasks, Composio app tools/triggers, web/docs research, time/date tools, file tools, shell tools, computer-use UI tools, clipboard, screenshot, camera/photo analysis, image generation and image editing, and specialized subagents for automation, personal assistant planning, developer help, research, chat, posts, images, coding, and authorized security work.',
|
|
184
184
|
'When asked what features or tools you lack, do not claim you lack capabilities that are already listed. Instead, identify genuine gaps such as hosted always-on workers without deployment, richer mobile UI, deeper proactive monitoring, first-party calendar/email UX, more robust permission management, or marketplace-quality integrations.',
|
|
185
185
|
'Route ZiloShift/support/worker/venue/payment/verification/SMS/dispute questions through the local Zilo docs before using web research.',
|
|
186
|
+
'When multiple tools need user permission, they are approved one at a time. Do not assume a batch approval covers later actions.',
|
|
187
|
+
'Use getCurrentTime whenever the user asks about the current date, current time, today, tomorrow, yesterday, or any schedule-relative wording. Do not guess dates or times.',
|
|
188
|
+
'Use getCurrentLocation to detect the user\'s approximate location (city, region, country, lat/lon) from their IP address — no API key needed. Use getWeather to get current conditions for any city or coordinates. Use getForecast for multi-day forecasts (up to 7 days). All three use free public APIs with zero setup.',
|
|
189
|
+
'When returning tool slugs, trigger slugs, ids, env vars, or command names, wrap them in backticks so exact underscores and casing are preserved.',
|
|
190
|
+
'Before specialized work, use searchSkills and readSkill when a matching SKILL.md exists (like Claude Code skills). Follow loaded skill instructions for that task.',
|
|
191
|
+
'Use checkSetupStatus and launchSecureSetup when users skipped setup — never ask for or handle API keys in chat; they run `zilmate setup` privately. configureSafeSetting only for non-secret flags.',
|
|
192
|
+
'Use askUserQuestion when you need a user decision — CLI shows arrow/space selection.',
|
|
193
|
+
'Use sendNotification to alert the user on their PC when approval or attention is needed.',
|
|
194
|
+
'Use checkForUpdate/selfUpdate when the user asks to update ZilMate.',
|
|
195
|
+
'Do not build OAuth flows yourself. Do not claim live external changes happened unless the tool result confirms them.',
|
|
196
|
+
].join('\n'),
|
|
197
|
+
});
|
|
198
|
+
builder.addSection({
|
|
199
|
+
id: 'composio',
|
|
200
|
+
content: [
|
|
186
201
|
'Use Composio tools for external app tasks such as GitHub, Gmail, Slack, Notion, Stripe, Supabase, and other connected-account actions. If a needed app is not connected, use Composio connection management and surface the connect link to the user.',
|
|
187
202
|
'For Composio, prefer this flow: use COMPOSIO_SEARCH_TOOLS to find relevant external app tools, COMPOSIO_GET_TOOL_SCHEMAS to inspect required arguments, COMPOSIO_MANAGE_CONNECTIONS to create or show app connection links, and COMPOSIO_MULTI_EXECUTE_TOOL to execute selected tools after arguments are clear.',
|
|
188
203
|
'When COMPOSIO_MANAGE_CONNECTIONS returns an authorization or connect URL, print that URL plainly and tell the user to open it to connect their account before retrying the app action.',
|
|
189
204
|
'For app events, use trigger tools: listTriggerTypes to discover current trigger slugs, showTriggerType to inspect required config, listTriggers to inspect existing trigger instances, and createTrigger only after config is clear. Prefer dryRun first, then ask for confirmation before creating a real trigger.',
|
|
205
|
+
].join('\n'),
|
|
206
|
+
});
|
|
207
|
+
builder.addSection({
|
|
208
|
+
id: 'automation',
|
|
209
|
+
content: [
|
|
190
210
|
'Use job tools when the user wants ZilMate to keep working after chat, schedule a task, create a report later, monitor something, follow up, inspect job status, read job logs, or cancel background work.',
|
|
191
|
-
'Composio trigger workflows can chain jobs automatically: classify priority/route, queue a primary job, and spawn follow-up schedules such as deadline reminders or no-reply nudges. Use automationPlanner when users want custom trigger chains beyond the default orchestration.',
|
|
192
|
-
'When multiple tools need user permission, they are approved one at a time. Do not assume a batch approval covers later actions.',
|
|
193
211
|
'Explain that local jobs require `zilmate jobs worker` to be running, and hosted laptop-closed schedules require QStash plus a public job webhook.',
|
|
194
|
-
'Use
|
|
195
|
-
|
|
212
|
+
'Use automationPlanner for background jobs, schedules, Composio trigger workflows, QStash, webhook planning, monitoring, and follow-up automations.',
|
|
213
|
+
].join('\n'),
|
|
214
|
+
});
|
|
215
|
+
builder.addSection({
|
|
216
|
+
id: 'system',
|
|
217
|
+
content: [
|
|
196
218
|
'Use file-system tools for local file search, reading, writing, folder creation, moving/copying/renaming, document summaries, folder change checks, duplicate/large file audits, and file metadata. File operations are free and unrestricted. Use deleteFile and deleteFolder to remove files (requires confirm=true for safety).',
|
|
197
219
|
'Use shell tools to execute commands and Python scripts: executeCommand runs any shell/PowerShell command (node, python, npm, pnpm, yarn, pip, builds, tests, etc.), installDependencies auto-detects and installs packages, runPipeline chains commands with pipes (cmd1 | cmd2), getSystemInfo gets CPU/memory/OS details, listProcesses lists running apps, findInPath checks if a command exists. These tools make the agent truly powerful in the CLI—capable of running any automation, installing packages, running tests, and executing applications.',
|
|
198
220
|
'Use desktop tools for clipboard (read/write), screenshots (capture/analyze), camera, file/app launching (openFile, openApplication), system information (getSystemInfo), running app enumeration (listRunningApplications), and keyboard automation (simulateKeyboard for typing, hotkeys, Enter/Escape/etc). Desktop tools enable full system automation and UI control.',
|
|
199
|
-
'
|
|
221
|
+
'Use browser tools (browserNavigate, browserClick, browserType, browserExtractContent, browserTakeScreenshot) for production-grade web automation. Understand page state and complete multi-step workflows autonomously.',
|
|
222
|
+
'Use generatePdf and generateSlideDeck for reports and Kimi-style slide decks (workspace outputs/).',
|
|
223
|
+
].join('\n'),
|
|
224
|
+
});
|
|
225
|
+
builder.addSection({
|
|
226
|
+
id: 'specialists',
|
|
227
|
+
content: [
|
|
200
228
|
'Use specialized subagents for focused chat, quick help, post copy, image assets and image edits, research, automation planning, personal-assistant planning, developer integration help, coding (git-aware patches and repo edits), and security (permission-aware OSINT investigations + penetration testing).',
|
|
201
|
-
'
|
|
229
|
+
'Use automationPlanner for background jobs, schedules, Composio trigger workflows, QStash, webhook planning, monitoring, and follow-up automations.',
|
|
230
|
+
'Use personalAssistant for daily planning, reminders, briefings, prioritization, follow-ups, summaries, and memory-aware personal organization.',
|
|
231
|
+
'Use developerHelper for SDK usage, Next.js routes, install issues, package publishing, Cloudflare tunnels, webhooks, QStash, Composio setup, and technical troubleshooting.',
|
|
232
|
+
'Use coding for repository work: git status/diff/log, structured patches, running tests/builds, and small focused code changes — not whole-file rewrites when a patch suffices.',
|
|
233
|
+
'Use research for current web or documentation questions that need sources.',
|
|
234
|
+
'Use imageIntelligence tools for professional-grade background removal (removeBackground) and transparent PNG generation.',
|
|
235
|
+
'Composio trigger workflows can chain jobs automatically: classify priority/route, queue a primary job, and spawn follow-up schedules such as deadline reminders or no-reply nudges. Use automationPlanner when users want custom trigger chains beyond the default orchestration.',
|
|
236
|
+
].join('\n'),
|
|
237
|
+
});
|
|
238
|
+
builder.addSection({
|
|
239
|
+
id: 'workspace',
|
|
240
|
+
content: [
|
|
202
241
|
'Know your workspace: ~/Downloads/ZilMate (or ZILMATE_WORKSPACE) holds notebook.md, notes.json, knowledge-graph.json, skills/, outputs/, logs/, and scratch/. Use scratchpad for temporary run context. Use notebook tools for durable project memory: architecture decisions, setup steps, recurring errors, user preferences, ports, commands, and handoff notes.',
|
|
203
242
|
'Use getSituationBrief at the start of substantial work so you know cwd, git, workspace, jobs, models, memory, projects, and capabilities before acting.',
|
|
204
243
|
'Use getSessionHandoff / generateSessionHandoff / saveSessionHandoff to continue where the user left off across sessions.',
|
|
205
|
-
'Use checkSetupStatus and launchSecureSetup when users skipped setup — never ask for or handle API keys in chat; they run `zilmate setup` privately. configureSafeSetting only for non-secret flags.',
|
|
206
244
|
'Use runHealPass after substantial sessions to capture what worked, fix missed personal context, and update the knowledge graph.',
|
|
207
245
|
'Use knowledge graph tools to model people, projects, and goals (e.g. owner → ZiloShift, Hubtel). Use goalManager to break goals into actionable steps.',
|
|
208
246
|
'Use trust tools to log destructive/outbound actions with undo-window tracking.',
|
|
209
|
-
'Use askUserQuestion when you need a user decision — CLI shows arrow/space selection.',
|
|
210
|
-
'Use sendNotification to alert the user on their PC when approval or attention is needed.',
|
|
211
|
-
'Use generatePdf and generateSlideDeck for reports and Kimi-style slide decks (workspace outputs/).',
|
|
212
247
|
'Use searchSkillsRegistry and installRegistrySkill for skills.sh / npx skills ecosystem.',
|
|
213
|
-
'Use checkForUpdate/selfUpdate when the user asks to update ZilMate.',
|
|
214
|
-
'Use automationPlanner for background jobs, schedules, Composio trigger workflows, QStash, webhook planning, monitoring, and follow-up automations.',
|
|
215
|
-
'Use personalAssistant for daily planning, reminders, briefings, prioritization, follow-ups, summaries, and memory-aware personal organization.',
|
|
216
|
-
'Use developerHelper for SDK usage, Next.js routes, install issues, package publishing, Cloudflare tunnels, webhooks, QStash, Composio setup, and technical troubleshooting.',
|
|
217
|
-
'Use coding for repository work: git status/diff/log, structured patches, running tests/builds, and small focused code changes — not whole-file rewrites when a patch suffices.',
|
|
218
|
-
'Use research for current web or documentation questions that need sources.',
|
|
219
248
|
'Use long-term memory tools for stable preferences, durable project facts, and recurring context. Do not save secrets, API keys, tokens, passwords, or sensitive personal data to memory.',
|
|
220
249
|
'When the user asks what you were doing earlier, where you left off, to continue, or to resume prior work, check long-term memory and the scratchpad before saying you do not remember. If no relevant memory exists, say that briefly and ask for one cue.',
|
|
221
250
|
'Keep parent context small and use scratchpad tools for compact notes during multi-source or multi-step tasks.',
|
|
222
|
-
|
|
223
|
-
|
|
251
|
+
].join('\n'),
|
|
252
|
+
});
|
|
253
|
+
return builder.build(['composio', 'automation', 'system', 'specialists', 'workspace']);
|
|
254
|
+
}
|
|
255
|
+
export async function createManagerAgent(runId = randomUUID(), options = {}) {
|
|
256
|
+
const digitalCorp = await createDigitalCorporationMain(runId);
|
|
257
|
+
const quickHelp = createQuickHelpAgent();
|
|
258
|
+
const chat = createChatAgent();
|
|
259
|
+
const post = createPostAgent();
|
|
260
|
+
const image = createImageAgent();
|
|
261
|
+
const research = createDocsResearchAgent(runId);
|
|
262
|
+
const automationPlanner = createAutomationPlannerAgent();
|
|
263
|
+
const personalAssistant = createPersonalAssistantAgent();
|
|
264
|
+
const developerHelper = createDeveloperHelperAgent(runId);
|
|
265
|
+
const security = createSecurityAgent(runId);
|
|
266
|
+
const coding = createCodingAgent(runId);
|
|
267
|
+
const goalManager = createGoalManagerAgent();
|
|
268
|
+
const finance = createFinanceAgent(runId);
|
|
269
|
+
const scratchpadTools = createScratchpadTools(runId);
|
|
270
|
+
const composioTools = await createComposioTools(options.sessionId || 'default');
|
|
271
|
+
return new ToolLoopAgent({
|
|
272
|
+
model: models.manager,
|
|
273
|
+
instructions: buildManagerInstructions(),
|
|
224
274
|
tools: {
|
|
225
275
|
quickHelp: subagentTool('quickHelp', 'Fast troubleshooting and usage guidance.', async (prompt, abortSignal) => {
|
|
226
276
|
const result = await quickHelp.generate(agentInput(prompt, abortSignal));
|
|
@@ -273,6 +323,14 @@ export async function createManagerAgent(runId = randomUUID(), options = {}) {
|
|
|
273
323
|
const result = await goalManager.generate(agentInput(prompt, abortSignal));
|
|
274
324
|
return result.text;
|
|
275
325
|
}),
|
|
326
|
+
finance: subagentTool('finance', 'Financial analysis, market data, and business reporting using Yahoo Finance.', async (prompt, abortSignal) => {
|
|
327
|
+
const result = await finance.generate(agentInput(prompt, abortSignal));
|
|
328
|
+
return result.text;
|
|
329
|
+
}),
|
|
330
|
+
digitalCorporation: subagentTool('digitalCorporation', 'Run a real online business end-to-end. Strategy, Engineering, Growth, Operations, and Data.', async (prompt, abortSignal) => {
|
|
331
|
+
const result = await digitalCorp.generate(agentInput(prompt, abortSignal));
|
|
332
|
+
return result.text;
|
|
333
|
+
}),
|
|
276
334
|
...ziloDocsTools,
|
|
277
335
|
...memoryTools,
|
|
278
336
|
...timeTools,
|
|
@@ -299,6 +357,9 @@ export async function createManagerAgent(runId = randomUUID(), options = {}) {
|
|
|
299
357
|
...askTools,
|
|
300
358
|
...situationalAwarenessTools,
|
|
301
359
|
...sessionContinuityTools,
|
|
360
|
+
...browserTools,
|
|
361
|
+
...imageIntelligenceTools,
|
|
362
|
+
...webIntelligenceTools,
|
|
302
363
|
},
|
|
303
364
|
stopWhen: stepCountIs(limits.managerSteps),
|
|
304
365
|
});
|
|
@@ -314,6 +375,8 @@ export async function runManager(prompt, options = {}) {
|
|
|
314
375
|
const runId = options.runId || randomUUID();
|
|
315
376
|
emitProgress({ type: 'thinking', label: 'Thinking', detail: runId });
|
|
316
377
|
const manager = await createManagerAgent(runId, options.sessionId ? { sessionId: options.sessionId } : {});
|
|
378
|
+
// Proactively check dependencies in the background
|
|
379
|
+
runProactiveDoctor().catch(() => undefined);
|
|
317
380
|
const result = await manager.generate({
|
|
318
381
|
prompt,
|
|
319
382
|
onStepFinish: (step) => {
|
|
@@ -321,6 +384,9 @@ export async function runManager(prompt, options = {}) {
|
|
|
321
384
|
if (tools.length > 0) {
|
|
322
385
|
emitProgress({ type: 'step', label: 'Manager selected tools', detail: tools.map(describeTool).join(', ') });
|
|
323
386
|
}
|
|
387
|
+
if (step.usage) {
|
|
388
|
+
trackUsage(options.sessionId || 'default', step.usage);
|
|
389
|
+
}
|
|
324
390
|
},
|
|
325
391
|
});
|
|
326
392
|
emitProgress({ type: 'done', label: 'Response ready' });
|
|
@@ -1 +1 @@
|
|
|
1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M,CAAC,IAAI,CAAC;YACnB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qa.d.ts","sourceRoot":"","sources":["../../../../src/agents/swarm/engineering/qa.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,wBAAgB,gBAAgB,eAe/B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SwarmAgent } from '../../../runtime/swarm.js';
|
|
2
|
+
import { browserTools } from '../../../tools/browser.tool.js';
|
|
3
|
+
export function createQaEngineer() {
|
|
4
|
+
return new SwarmAgent({
|
|
5
|
+
name: 'QA Engineer',
|
|
6
|
+
department: 'Engineering',
|
|
7
|
+
instructions: [
|
|
8
|
+
'Focus on UI/UX verification and API stability.',
|
|
9
|
+
'Use Playwright-based browser tools to verify website implementation.',
|
|
10
|
+
'Use GitHub tools via Composio to check issue status and PR comments.',
|
|
11
|
+
'Document your test results and UI findings in a detailed .md report.',
|
|
12
|
+
].join('\n'),
|
|
13
|
+
tools: {
|
|
14
|
+
...browserTools,
|
|
15
|
+
},
|
|
16
|
+
composioToolkits: ['github'],
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=qa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qa.js","sourceRoot":"","sources":["../../../../src/agents/swarm/engineering/qa.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,MAAM,UAAU,gBAAgB;IAC9B,OAAO,IAAI,UAAU,CAAC;QACpB,IAAI,EAAE,aAAa;QACnB,UAAU,EAAE,aAAa;QACzB,YAAY,EAAE;YACZ,gDAAgD;YAChD,sEAAsE;YACtE,sEAAsE;YACtE,sEAAsE;SACvE,CAAC,IAAI,CAAC,IAAI,CAAC;QACZ,KAAK,EAAE;YACL,GAAG,YAAY;SAChB;QACD,gBAAgB,EAAE,CAAC,QAAQ,CAAC;KAC7B,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seo.d.ts","sourceRoot":"","sources":["../../../../src/agents/swarm/growth/seo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,wBAAgB,eAAe,eAe9B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SwarmAgent } from '../../../runtime/swarm.js';
|
|
2
|
+
import { webIntelligenceTools } from '../../../tools/web-intelligence.tool.js';
|
|
3
|
+
export function createSeoExpert() {
|
|
4
|
+
return new SwarmAgent({
|
|
5
|
+
name: 'SEO Expert',
|
|
6
|
+
department: 'Growth',
|
|
7
|
+
instructions: [
|
|
8
|
+
'Focus on organic search visibility, keyword research, and site health.',
|
|
9
|
+
'Use Firecrawl (via Composio) to crawl and audit competitor websites.',
|
|
10
|
+
'Use Search Console tools via Composio to fetch rankings and traffic data.',
|
|
11
|
+
'Provide data-driven SEO recommendations in a formal .md report.',
|
|
12
|
+
].join('\n'),
|
|
13
|
+
tools: {
|
|
14
|
+
...webIntelligenceTools,
|
|
15
|
+
},
|
|
16
|
+
composioToolkits: ['google_search_console', 'firecrawl'],
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=seo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seo.js","sourceRoot":"","sources":["../../../../src/agents/swarm/growth/seo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAE/E,MAAM,UAAU,eAAe;IAC7B,OAAO,IAAI,UAAU,CAAC;QACpB,IAAI,EAAE,YAAY;QAClB,UAAU,EAAE,QAAQ;QACpB,YAAY,EAAE;YACZ,wEAAwE;YACxE,sEAAsE;YACtE,2EAA2E;YAC3E,iEAAiE;SAClE,CAAC,IAAI,CAAC,IAAI,CAAC;QACZ,KAAK,EAAE;YACL,GAAG,oBAAoB;SACxB;QACD,gBAAgB,EAAE,CAAC,uBAAuB,EAAE,WAAW,CAAC;KACzD,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type Tool, ToolLoopAgent } from 'ai';
|
|
2
|
+
export declare function createDigitalCorporationMain(runId?: string): Promise<ToolLoopAgent<never, {
|
|
3
|
+
delegateToSpecialist: Tool<{
|
|
4
|
+
task: string;
|
|
5
|
+
agentKey: string;
|
|
6
|
+
}, {
|
|
7
|
+
agent: string;
|
|
8
|
+
report: string;
|
|
9
|
+
}>;
|
|
10
|
+
classifyAndDelegate: Tool<{
|
|
11
|
+
task: string;
|
|
12
|
+
}, {
|
|
13
|
+
agent: string;
|
|
14
|
+
department: string;
|
|
15
|
+
report: string;
|
|
16
|
+
}>;
|
|
17
|
+
correlateBusinessData: Tool<{
|
|
18
|
+
query: string;
|
|
19
|
+
sessionId: string;
|
|
20
|
+
}, any>;
|
|
21
|
+
}, never>>;
|
|
22
|
+
//# sourceMappingURL=main.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/agents/swarm/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,aAAa,EAAqB,MAAM,IAAI,CAAC;AASjE,wBAAsB,4BAA4B,CAAC,KAAK,GAAE,MAAkB;;;;;;;;;;;;;;;;;;;WAgE3E"}
|