@nodetool-ai/base-nodes 0.7.0-rc.23 → 0.8.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/README.md +21 -0
- package/dist/.nodetool-build-stamp +1 -0
- package/dist/index.d.ts +61 -67
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +179 -173
- package/dist/index.js.map +1 -1
- package/dist/platforms/browser.d.ts +19 -0
- package/dist/platforms/browser.d.ts.map +1 -0
- package/dist/platforms/browser.js +29 -0
- package/dist/platforms/browser.js.map +1 -0
- package/package.json +53 -65
- package/dist/lib/audio-wav.d.ts +0 -66
- package/dist/lib/audio-wav.d.ts.map +0 -1
- package/dist/lib/audio-wav.js +0 -215
- package/dist/lib/audio-wav.js.map +0 -1
- package/dist/nodes/agent-tool-hydration.d.ts +0 -10
- package/dist/nodes/agent-tool-hydration.d.ts.map +0 -1
- package/dist/nodes/agent-tool-hydration.js +0 -43
- package/dist/nodes/agent-tool-hydration.js.map +0 -1
- package/dist/nodes/agents.d.ts +0 -262
- package/dist/nodes/agents.d.ts.map +0 -1
- package/dist/nodes/agents.js +0 -2856
- package/dist/nodes/agents.js.map +0 -1
- package/dist/nodes/anthropic.d.ts +0 -26
- package/dist/nodes/anthropic.d.ts.map +0 -1
- package/dist/nodes/anthropic.js +0 -133
- package/dist/nodes/anthropic.js.map +0 -1
- package/dist/nodes/apify.d.ts +0 -120
- package/dist/nodes/apify.d.ts.map +0 -1
- package/dist/nodes/apify.js +0 -618
- package/dist/nodes/apify.js.map +0 -1
- package/dist/nodes/audio.d.ts +0 -301
- package/dist/nodes/audio.d.ts.map +0 -1
- package/dist/nodes/audio.js +0 -1274
- package/dist/nodes/audio.js.map +0 -1
- package/dist/nodes/code-node.d.ts +0 -34
- package/dist/nodes/code-node.d.ts.map +0 -1
- package/dist/nodes/code-node.js +0 -343
- package/dist/nodes/code-node.js.map +0 -1
- package/dist/nodes/code.d.ts +0 -301
- package/dist/nodes/code.d.ts.map +0 -1
- package/dist/nodes/code.js +0 -850
- package/dist/nodes/code.js.map +0 -1
- package/dist/nodes/compare.d.ts +0 -18
- package/dist/nodes/compare.d.ts.map +0 -1
- package/dist/nodes/compare.js +0 -122
- package/dist/nodes/compare.js.map +0 -1
- package/dist/nodes/constant.d.ts +0 -315
- package/dist/nodes/constant.d.ts.map +0 -1
- package/dist/nodes/constant.js +0 -715
- package/dist/nodes/constant.js.map +0 -1
- package/dist/nodes/control.d.ts +0 -83
- package/dist/nodes/control.d.ts.map +0 -1
- package/dist/nodes/control.js +0 -212
- package/dist/nodes/control.js.map +0 -1
- package/dist/nodes/data.d.ts +0 -369
- package/dist/nodes/data.d.ts.map +0 -1
- package/dist/nodes/data.js +0 -1590
- package/dist/nodes/data.js.map +0 -1
- package/dist/nodes/document.d.ts +0 -134
- package/dist/nodes/document.d.ts.map +0 -1
- package/dist/nodes/document.js +0 -984
- package/dist/nodes/document.js.map +0 -1
- package/dist/nodes/extended-placeholders.d.ts +0 -6
- package/dist/nodes/extended-placeholders.d.ts.map +0 -1
- package/dist/nodes/extended-placeholders.js +0 -19
- package/dist/nodes/extended-placeholders.js.map +0 -1
- package/dist/nodes/gemini.d.ts +0 -110
- package/dist/nodes/gemini.d.ts.map +0 -1
- package/dist/nodes/gemini.js +0 -871
- package/dist/nodes/gemini.js.map +0 -1
- package/dist/nodes/generators.d.ts +0 -84
- package/dist/nodes/generators.d.ts.map +0 -1
- package/dist/nodes/generators.js +0 -968
- package/dist/nodes/generators.js.map +0 -1
- package/dist/nodes/image.d.ts +0 -232
- package/dist/nodes/image.d.ts.map +0 -1
- package/dist/nodes/image.js +0 -1395
- package/dist/nodes/image.js.map +0 -1
- package/dist/nodes/input.d.ts +0 -445
- package/dist/nodes/input.d.ts.map +0 -1
- package/dist/nodes/input.js +0 -1459
- package/dist/nodes/input.js.map +0 -1
- package/dist/nodes/kie-dynamic.d.ts +0 -31
- package/dist/nodes/kie-dynamic.d.ts.map +0 -1
- package/dist/nodes/kie-dynamic.js +0 -270
- package/dist/nodes/kie-dynamic.js.map +0 -1
- package/dist/nodes/lib-audio-dsp.d.ts +0 -85
- package/dist/nodes/lib-audio-dsp.d.ts.map +0 -1
- package/dist/nodes/lib-audio-dsp.js +0 -450
- package/dist/nodes/lib-audio-dsp.js.map +0 -1
- package/dist/nodes/lib-audio-effects.d.ts +0 -116
- package/dist/nodes/lib-audio-effects.d.ts.map +0 -1
- package/dist/nodes/lib-audio-effects.js +0 -905
- package/dist/nodes/lib-audio-effects.js.map +0 -1
- package/dist/nodes/lib-browser.d.ts +0 -99
- package/dist/nodes/lib-browser.d.ts.map +0 -1
- package/dist/nodes/lib-browser.js +0 -692
- package/dist/nodes/lib-browser.js.map +0 -1
- package/dist/nodes/lib-charts.d.ts +0 -20
- package/dist/nodes/lib-charts.d.ts.map +0 -1
- package/dist/nodes/lib-charts.js +0 -245
- package/dist/nodes/lib-charts.js.map +0 -1
- package/dist/nodes/lib-datetime.d.ts +0 -108
- package/dist/nodes/lib-datetime.d.ts.map +0 -1
- package/dist/nodes/lib-datetime.js +0 -421
- package/dist/nodes/lib-datetime.js.map +0 -1
- package/dist/nodes/lib-doc-convert.d.ts +0 -19
- package/dist/nodes/lib-doc-convert.d.ts.map +0 -1
- package/dist/nodes/lib-doc-convert.js +0 -257
- package/dist/nodes/lib-doc-convert.js.map +0 -1
- package/dist/nodes/lib-doc-transform.d.ts +0 -39
- package/dist/nodes/lib-doc-transform.d.ts.map +0 -1
- package/dist/nodes/lib-doc-transform.js +0 -335
- package/dist/nodes/lib-doc-transform.js.map +0 -1
- package/dist/nodes/lib-docx.d.ts +0 -106
- package/dist/nodes/lib-docx.d.ts.map +0 -1
- package/dist/nodes/lib-docx.js +0 -595
- package/dist/nodes/lib-docx.js.map +0 -1
- package/dist/nodes/lib-epub.d.ts +0 -55
- package/dist/nodes/lib-epub.d.ts.map +0 -1
- package/dist/nodes/lib-epub.js +0 -220
- package/dist/nodes/lib-epub.js.map +0 -1
- package/dist/nodes/lib-excel.d.ts +0 -74
- package/dist/nodes/lib-excel.d.ts.map +0 -1
- package/dist/nodes/lib-excel.js +0 -448
- package/dist/nodes/lib-excel.js.map +0 -1
- package/dist/nodes/lib-graphql.d.ts +0 -66
- package/dist/nodes/lib-graphql.d.ts.map +0 -1
- package/dist/nodes/lib-graphql.js +0 -333
- package/dist/nodes/lib-graphql.js.map +0 -1
- package/dist/nodes/lib-grid.d.ts +0 -27
- package/dist/nodes/lib-grid.d.ts.map +0 -1
- package/dist/nodes/lib-grid.js +0 -172
- package/dist/nodes/lib-grid.js.map +0 -1
- package/dist/nodes/lib-html-parse.d.ts +0 -108
- package/dist/nodes/lib-html-parse.d.ts.map +0 -1
- package/dist/nodes/lib-html-parse.js +0 -365
- package/dist/nodes/lib-html-parse.js.map +0 -1
- package/dist/nodes/lib-http.d.ts +0 -98
- package/dist/nodes/lib-http.d.ts.map +0 -1
- package/dist/nodes/lib-http.js +0 -267
- package/dist/nodes/lib-http.js.map +0 -1
- package/dist/nodes/lib-image-color-grading.d.ts +0 -3
- package/dist/nodes/lib-image-color-grading.d.ts.map +0 -1
- package/dist/nodes/lib-image-color-grading.js +0 -1386
- package/dist/nodes/lib-image-color-grading.js.map +0 -1
- package/dist/nodes/lib-image-draw.d.ts +0 -3
- package/dist/nodes/lib-image-draw.d.ts.map +0 -1
- package/dist/nodes/lib-image-draw.js +0 -470
- package/dist/nodes/lib-image-draw.js.map +0 -1
- package/dist/nodes/lib-image-enhance.d.ts +0 -3
- package/dist/nodes/lib-image-enhance.d.ts.map +0 -1
- package/dist/nodes/lib-image-enhance.js +0 -731
- package/dist/nodes/lib-image-enhance.js.map +0 -1
- package/dist/nodes/lib-image-filter.d.ts +0 -3
- package/dist/nodes/lib-image-filter.d.ts.map +0 -1
- package/dist/nodes/lib-image-filter.js +0 -684
- package/dist/nodes/lib-image-filter.js.map +0 -1
- package/dist/nodes/lib-image-utils.d.ts +0 -24
- package/dist/nodes/lib-image-utils.d.ts.map +0 -1
- package/dist/nodes/lib-image-utils.js +0 -150
- package/dist/nodes/lib-image-utils.js.map +0 -1
- package/dist/nodes/lib-mail.d.ts +0 -74
- package/dist/nodes/lib-mail.d.ts.map +0 -1
- package/dist/nodes/lib-mail.js +0 -452
- package/dist/nodes/lib-mail.js.map +0 -1
- package/dist/nodes/lib-markdown.d.ts +0 -70
- package/dist/nodes/lib-markdown.d.ts.map +0 -1
- package/dist/nodes/lib-markdown.js +0 -236
- package/dist/nodes/lib-markdown.js.map +0 -1
- package/dist/nodes/lib-nlp.d.ts +0 -98
- package/dist/nodes/lib-nlp.d.ts.map +0 -1
- package/dist/nodes/lib-nlp.js +0 -374
- package/dist/nodes/lib-nlp.js.map +0 -1
- package/dist/nodes/lib-notion.d.ts +0 -99
- package/dist/nodes/lib-notion.d.ts.map +0 -1
- package/dist/nodes/lib-notion.js +0 -601
- package/dist/nodes/lib-notion.js.map +0 -1
- package/dist/nodes/lib-ocr.d.ts +0 -31
- package/dist/nodes/lib-ocr.d.ts.map +0 -1
- package/dist/nodes/lib-ocr.js +0 -143
- package/dist/nodes/lib-ocr.js.map +0 -1
- package/dist/nodes/lib-os.d.ts +0 -312
- package/dist/nodes/lib-os.d.ts.map +0 -1
- package/dist/nodes/lib-os.js +0 -909
- package/dist/nodes/lib-os.js.map +0 -1
- package/dist/nodes/lib-pdf.d.ts +0 -142
- package/dist/nodes/lib-pdf.d.ts.map +0 -1
- package/dist/nodes/lib-pdf.js +0 -871
- package/dist/nodes/lib-pdf.js.map +0 -1
- package/dist/nodes/lib-pptx.d.ts +0 -29
- package/dist/nodes/lib-pptx.d.ts.map +0 -1
- package/dist/nodes/lib-pptx.js +0 -122
- package/dist/nodes/lib-pptx.js.map +0 -1
- package/dist/nodes/lib-rss.d.ts +0 -31
- package/dist/nodes/lib-rss.d.ts.map +0 -1
- package/dist/nodes/lib-rss.js +0 -163
- package/dist/nodes/lib-rss.js.map +0 -1
- package/dist/nodes/lib-s3.d.ts +0 -112
- package/dist/nodes/lib-s3.d.ts.map +0 -1
- package/dist/nodes/lib-s3.js +0 -521
- package/dist/nodes/lib-s3.js.map +0 -1
- package/dist/nodes/lib-secret.d.ts +0 -15
- package/dist/nodes/lib-secret.d.ts.map +0 -1
- package/dist/nodes/lib-secret.js +0 -42
- package/dist/nodes/lib-secret.js.map +0 -1
- package/dist/nodes/lib-sqlite.d.ts +0 -102
- package/dist/nodes/lib-sqlite.d.ts.map +0 -1
- package/dist/nodes/lib-sqlite.js +0 -532
- package/dist/nodes/lib-sqlite.js.map +0 -1
- package/dist/nodes/lib-supabase.d.ts +0 -86
- package/dist/nodes/lib-supabase.d.ts.map +0 -1
- package/dist/nodes/lib-supabase.js +0 -425
- package/dist/nodes/lib-supabase.js.map +0 -1
- package/dist/nodes/lib-svg.d.ts +0 -199
- package/dist/nodes/lib-svg.d.ts.map +0 -1
- package/dist/nodes/lib-svg.js +0 -1027
- package/dist/nodes/lib-svg.js.map +0 -1
- package/dist/nodes/lib-tensorflow.d.ts +0 -71
- package/dist/nodes/lib-tensorflow.d.ts.map +0 -1
- package/dist/nodes/lib-tensorflow.js +0 -351
- package/dist/nodes/lib-tensorflow.js.map +0 -1
- package/dist/nodes/lib-twilio.d.ts +0 -71
- package/dist/nodes/lib-twilio.d.ts.map +0 -1
- package/dist/nodes/lib-twilio.js +0 -469
- package/dist/nodes/lib-twilio.js.map +0 -1
- package/dist/nodes/lib-validate.d.ts +0 -84
- package/dist/nodes/lib-validate.d.ts.map +0 -1
- package/dist/nodes/lib-validate.js +0 -215
- package/dist/nodes/lib-validate.js.map +0 -1
- package/dist/nodes/lib-video-download.d.ts +0 -26
- package/dist/nodes/lib-video-download.d.ts.map +0 -1
- package/dist/nodes/lib-video-download.js +0 -299
- package/dist/nodes/lib-video-download.js.map +0 -1
- package/dist/nodes/messaging.d.ts +0 -88
- package/dist/nodes/messaging.d.ts.map +0 -1
- package/dist/nodes/messaging.js +0 -418
- package/dist/nodes/messaging.js.map +0 -1
- package/dist/nodes/mistral.d.ts +0 -83
- package/dist/nodes/mistral.d.ts.map +0 -1
- package/dist/nodes/mistral.js +0 -450
- package/dist/nodes/mistral.js.map +0 -1
- package/dist/nodes/model3d/analysis.d.ts +0 -13
- package/dist/nodes/model3d/analysis.d.ts.map +0 -1
- package/dist/nodes/model3d/analysis.js +0 -36
- package/dist/nodes/model3d/analysis.js.map +0 -1
- package/dist/nodes/model3d/base.d.ts +0 -11
- package/dist/nodes/model3d/base.d.ts.map +0 -1
- package/dist/nodes/model3d/base.js +0 -20
- package/dist/nodes/model3d/base.js.map +0 -1
- package/dist/nodes/model3d/boolean-ops.d.ts +0 -2
- package/dist/nodes/model3d/boolean-ops.d.ts.map +0 -1
- package/dist/nodes/model3d/boolean-ops.js +0 -172
- package/dist/nodes/model3d/boolean-ops.js.map +0 -1
- package/dist/nodes/model3d/cleanup.d.ts +0 -47
- package/dist/nodes/model3d/cleanup.d.ts.map +0 -1
- package/dist/nodes/model3d/cleanup.js +0 -136
- package/dist/nodes/model3d/cleanup.js.map +0 -1
- package/dist/nodes/model3d/convert.d.ts +0 -14
- package/dist/nodes/model3d/convert.d.ts.map +0 -1
- package/dist/nodes/model3d/convert.js +0 -64
- package/dist/nodes/model3d/convert.js.map +0 -1
- package/dist/nodes/model3d/defaults.d.ts +0 -34
- package/dist/nodes/model3d/defaults.d.ts.map +0 -1
- package/dist/nodes/model3d/defaults.js +0 -28
- package/dist/nodes/model3d/defaults.js.map +0 -1
- package/dist/nodes/model3d/document-ops.d.ts +0 -4
- package/dist/nodes/model3d/document-ops.d.ts.map +0 -1
- package/dist/nodes/model3d/document-ops.js +0 -40
- package/dist/nodes/model3d/document-ops.js.map +0 -1
- package/dist/nodes/model3d/generation.d.ts +0 -39
- package/dist/nodes/model3d/generation.d.ts.map +0 -1
- package/dist/nodes/model3d/generation.js +0 -179
- package/dist/nodes/model3d/generation.js.map +0 -1
- package/dist/nodes/model3d/glb.d.ts +0 -29
- package/dist/nodes/model3d/glb.d.ts.map +0 -1
- package/dist/nodes/model3d/glb.js +0 -255
- package/dist/nodes/model3d/glb.js.map +0 -1
- package/dist/nodes/model3d/index.d.ts +0 -20
- package/dist/nodes/model3d/index.d.ts.map +0 -1
- package/dist/nodes/model3d/index.js +0 -38
- package/dist/nodes/model3d/index.js.map +0 -1
- package/dist/nodes/model3d/io.d.ts +0 -38
- package/dist/nodes/model3d/io.d.ts.map +0 -1
- package/dist/nodes/model3d/io.js +0 -162
- package/dist/nodes/model3d/io.js.map +0 -1
- package/dist/nodes/model3d/mesh-ops.d.ts +0 -40
- package/dist/nodes/model3d/mesh-ops.d.ts.map +0 -1
- package/dist/nodes/model3d/mesh-ops.js +0 -775
- package/dist/nodes/model3d/mesh-ops.js.map +0 -1
- package/dist/nodes/model3d/nodes.d.ts +0 -2
- package/dist/nodes/model3d/nodes.d.ts.map +0 -1
- package/dist/nodes/model3d/nodes.js +0 -2
- package/dist/nodes/model3d/nodes.js.map +0 -1
- package/dist/nodes/model3d/ops.d.ts +0 -37
- package/dist/nodes/model3d/ops.d.ts.map +0 -1
- package/dist/nodes/model3d/ops.js +0 -137
- package/dist/nodes/model3d/ops.js.map +0 -1
- package/dist/nodes/model3d/transforms.d.ts +0 -49
- package/dist/nodes/model3d/transforms.d.ts.map +0 -1
- package/dist/nodes/model3d/transforms.js +0 -142
- package/dist/nodes/model3d/transforms.js.map +0 -1
- package/dist/nodes/model3d/types.d.ts +0 -81
- package/dist/nodes/model3d/types.d.ts.map +0 -1
- package/dist/nodes/model3d/types.js +0 -2
- package/dist/nodes/model3d/types.js.map +0 -1
- package/dist/nodes/model3d/utils.d.ts +0 -34
- package/dist/nodes/model3d/utils.d.ts.map +0 -1
- package/dist/nodes/model3d/utils.js +0 -185
- package/dist/nodes/model3d/utils.js.map +0 -1
- package/dist/nodes/model3d.d.ts +0 -2
- package/dist/nodes/model3d.d.ts.map +0 -1
- package/dist/nodes/model3d.js +0 -2
- package/dist/nodes/model3d.js.map +0 -1
- package/dist/nodes/openai.d.ts +0 -172
- package/dist/nodes/openai.d.ts.map +0 -1
- package/dist/nodes/openai.js +0 -1294
- package/dist/nodes/openai.js.map +0 -1
- package/dist/nodes/output.d.ts +0 -29
- package/dist/nodes/output.d.ts.map +0 -1
- package/dist/nodes/output.js +0 -87
- package/dist/nodes/output.js.map +0 -1
- package/dist/nodes/sandbox.d.ts +0 -63
- package/dist/nodes/sandbox.d.ts.map +0 -1
- package/dist/nodes/sandbox.js +0 -633
- package/dist/nodes/sandbox.js.map +0 -1
- package/dist/nodes/search.d.ts +0 -117
- package/dist/nodes/search.d.ts.map +0 -1
- package/dist/nodes/search.js +0 -607
- package/dist/nodes/search.js.map +0 -1
- package/dist/nodes/team.d.ts +0 -74
- package/dist/nodes/team.d.ts.map +0 -1
- package/dist/nodes/team.js +0 -309
- package/dist/nodes/team.js.map +0 -1
- package/dist/nodes/text-extra.d.ts +0 -633
- package/dist/nodes/text-extra.d.ts.map +0 -1
- package/dist/nodes/text-extra.js +0 -2226
- package/dist/nodes/text-extra.js.map +0 -1
- package/dist/nodes/tool-agents.d.ts +0 -334
- package/dist/nodes/tool-agents.d.ts.map +0 -1
- package/dist/nodes/tool-agents.js +0 -1861
- package/dist/nodes/tool-agents.js.map +0 -1
- package/dist/nodes/triggers.d.ts +0 -107
- package/dist/nodes/triggers.d.ts.map +0 -1
- package/dist/nodes/triggers.js +0 -706
- package/dist/nodes/triggers.js.map +0 -1
- package/dist/nodes/vector.d.ts +0 -168
- package/dist/nodes/vector.d.ts.map +0 -1
- package/dist/nodes/vector.js +0 -1121
- package/dist/nodes/vector.js.map +0 -1
- package/dist/nodes/video.d.ts +0 -387
- package/dist/nodes/video.d.ts.map +0 -1
- package/dist/nodes/video.js +0 -2383
- package/dist/nodes/video.js.map +0 -1
- package/dist/nodes/workflow.d.ts +0 -24
- package/dist/nodes/workflow.d.ts.map +0 -1
- package/dist/nodes/workflow.js +0 -146
- package/dist/nodes/workflow.js.map +0 -1
- package/dist/nodes/workspace.d.ts +0 -203
- package/dist/nodes/workspace.d.ts.map +0 -1
- package/dist/nodes/workspace.js +0 -795
- package/dist/nodes/workspace.js.map +0 -1
|
@@ -1,1861 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tool-agent nodes for prompt-driven task execution.
|
|
3
|
-
*
|
|
4
|
-
* Each agent node runs an agent loop: the LLM can call tools (execute_bash,
|
|
5
|
-
* set_output_image, etc.), see results, and iterate until it produces output.
|
|
6
|
-
* Uses runAgentLoop() from agents.ts for the loop mechanics.
|
|
7
|
-
*/
|
|
8
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
9
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
10
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
11
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
12
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
13
|
-
};
|
|
14
|
-
import { BaseNode, prop } from "@nodetool-ai/node-sdk";
|
|
15
|
-
import { runAgentLoop } from "./agents.js";
|
|
16
|
-
import { exec } from "node:child_process";
|
|
17
|
-
import { access, mkdir, readFile } from "node:fs/promises";
|
|
18
|
-
import path from "node:path";
|
|
19
|
-
import { tmpdir } from "node:os";
|
|
20
|
-
import { pathToFileURL } from "node:url";
|
|
21
|
-
// ---------------------------------------------------------------------------
|
|
22
|
-
// Secret / key resolution helpers
|
|
23
|
-
// ---------------------------------------------------------------------------
|
|
24
|
-
// ---------------------------------------------------------------------------
|
|
25
|
-
// Asset extraction helpers
|
|
26
|
-
// ---------------------------------------------------------------------------
|
|
27
|
-
function isAssetRef(v) {
|
|
28
|
-
if (!v || typeof v !== "object" || Array.isArray(v))
|
|
29
|
-
return false;
|
|
30
|
-
const obj = v;
|
|
31
|
-
// Match objects with explicit type field (ImageRef from UI properties)
|
|
32
|
-
// OR objects with data/uri but no type (imageRef() output from upstream nodes)
|
|
33
|
-
const hasType = typeof obj.type === "string" && obj.type.length > 0;
|
|
34
|
-
const hasData = obj.data != null;
|
|
35
|
-
const hasUri = typeof obj.uri === "string" && obj.uri.length > 0;
|
|
36
|
-
return (hasType && (hasUri || hasData)) || (!hasType && (hasData || hasUri));
|
|
37
|
-
}
|
|
38
|
-
/** Infer the asset kind from type field, field name context, uri, or mimeType. */
|
|
39
|
-
function inferAssetKind(asset, fieldHint) {
|
|
40
|
-
// Check explicit type field
|
|
41
|
-
const t = (asset.type || "").toLowerCase();
|
|
42
|
-
if (t.includes("image"))
|
|
43
|
-
return "image";
|
|
44
|
-
if (t.includes("audio"))
|
|
45
|
-
return "audio";
|
|
46
|
-
if (t.includes("video"))
|
|
47
|
-
return "video";
|
|
48
|
-
// Check mimeType field (set by image nodes)
|
|
49
|
-
const mime = String(asset.mimeType ?? "").toLowerCase();
|
|
50
|
-
if (mime.startsWith("image/"))
|
|
51
|
-
return "image";
|
|
52
|
-
if (mime.startsWith("audio/"))
|
|
53
|
-
return "audio";
|
|
54
|
-
if (mime.startsWith("video/"))
|
|
55
|
-
return "video";
|
|
56
|
-
// Check URI extension
|
|
57
|
-
const uri = (asset.uri ?? "").toLowerCase();
|
|
58
|
-
if (/\.(png|jpe?g|gif|webp|bmp|tiff?|svg)(\?|$)/.test(uri))
|
|
59
|
-
return "image";
|
|
60
|
-
if (/\.(wav|mp3|flac|ogg|aac|m4a)(\?|$)/.test(uri))
|
|
61
|
-
return "audio";
|
|
62
|
-
if (/\.(mp4|mov|avi|mkv|webm)(\?|$)/.test(uri))
|
|
63
|
-
return "video";
|
|
64
|
-
// Fall back to field name hint
|
|
65
|
-
if (fieldHint) {
|
|
66
|
-
const h = fieldHint.toLowerCase();
|
|
67
|
-
if (h.includes("image"))
|
|
68
|
-
return "image";
|
|
69
|
-
if (h.includes("audio"))
|
|
70
|
-
return "audio";
|
|
71
|
-
if (h.includes("video"))
|
|
72
|
-
return "video";
|
|
73
|
-
}
|
|
74
|
-
return "unknown";
|
|
75
|
-
}
|
|
76
|
-
function guessMime(asset, fieldHint) {
|
|
77
|
-
// Use explicit mimeType if present
|
|
78
|
-
const explicit = String(asset.mimeType ?? "").trim();
|
|
79
|
-
if (explicit && explicit.includes("/"))
|
|
80
|
-
return explicit;
|
|
81
|
-
const kind = inferAssetKind(asset, fieldHint);
|
|
82
|
-
if (kind === "image")
|
|
83
|
-
return "image/png";
|
|
84
|
-
if (kind === "audio")
|
|
85
|
-
return "audio/wav";
|
|
86
|
-
if (kind === "video")
|
|
87
|
-
return "video/mp4";
|
|
88
|
-
return "application/octet-stream";
|
|
89
|
-
}
|
|
90
|
-
/** Read asset bytes from inline data, data: URI, file:// URI, or storage. */
|
|
91
|
-
async function getAssetBytes(asset, context) {
|
|
92
|
-
// Inline base64 data (string or Uint8Array)
|
|
93
|
-
if (asset.data) {
|
|
94
|
-
if (asset.data instanceof Uint8Array)
|
|
95
|
-
return asset.data;
|
|
96
|
-
if (typeof asset.data === "string" && asset.data.length > 0) {
|
|
97
|
-
// Handle data: URI format
|
|
98
|
-
const dataUriMatch = asset.data.match(/^data:[^;]*;base64,(.+)$/s);
|
|
99
|
-
if (dataUriMatch) {
|
|
100
|
-
return Buffer.from(dataUriMatch[1], "base64");
|
|
101
|
-
}
|
|
102
|
-
// Plain base64 string
|
|
103
|
-
try {
|
|
104
|
-
return Buffer.from(asset.data, "base64");
|
|
105
|
-
}
|
|
106
|
-
catch {
|
|
107
|
-
/* fall through */
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
// Handle data: URIs in the uri field
|
|
112
|
-
if (asset.uri) {
|
|
113
|
-
const uriDataMatch = asset.uri.match(/^data:[^;]*;base64,(.+)$/s);
|
|
114
|
-
if (uriDataMatch) {
|
|
115
|
-
return Buffer.from(uriDataMatch[1], "base64");
|
|
116
|
-
}
|
|
117
|
-
// Handle file:// URIs directly (no storage adapter needed)
|
|
118
|
-
if (asset.uri.startsWith("file://")) {
|
|
119
|
-
try {
|
|
120
|
-
const { readFile } = await import("node:fs/promises");
|
|
121
|
-
const { fileURLToPath } = await import("node:url");
|
|
122
|
-
const filePath = fileURLToPath(asset.uri);
|
|
123
|
-
return await readFile(filePath);
|
|
124
|
-
}
|
|
125
|
-
catch {
|
|
126
|
-
/* fall through */
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
// Handle /api/storage/ paths — resolve to local asset files on disk
|
|
130
|
-
if (asset.uri.startsWith("/api/storage/")) {
|
|
131
|
-
try {
|
|
132
|
-
const { getDefaultAssetsPath } = await import("@nodetool-ai/config");
|
|
133
|
-
const isTemp = asset.uri.startsWith("/api/storage/temp/");
|
|
134
|
-
const key = isTemp
|
|
135
|
-
? asset.uri.slice("/api/storage/temp/".length)
|
|
136
|
-
: asset.uri.slice("/api/storage/".length);
|
|
137
|
-
const rootDir = isTemp
|
|
138
|
-
? (process.env.TEMP_STORAGE_PATH ??
|
|
139
|
-
path.join(tmpdir(), "nodetool", "temp"))
|
|
140
|
-
: getDefaultAssetsPath();
|
|
141
|
-
return await readFile(path.join(rootDir, key));
|
|
142
|
-
}
|
|
143
|
-
catch {
|
|
144
|
-
/* fall through */
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
// Fetch from https:// URLs
|
|
148
|
-
if (asset.uri.startsWith("https://")) {
|
|
149
|
-
try {
|
|
150
|
-
const res = await fetch(asset.uri);
|
|
151
|
-
if (res.ok)
|
|
152
|
-
return new Uint8Array(await res.arrayBuffer());
|
|
153
|
-
}
|
|
154
|
-
catch {
|
|
155
|
-
/* fall through */
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
// Load from storage via URI (if storage adapter available)
|
|
160
|
-
if (asset.uri && context?.storage) {
|
|
161
|
-
try {
|
|
162
|
-
return await context.storage.retrieve(asset.uri);
|
|
163
|
-
}
|
|
164
|
-
catch {
|
|
165
|
-
/* fall through */
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
return null;
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Collect all asset refs from known fields on the node instance.
|
|
172
|
-
*/
|
|
173
|
-
function collectAssets(self) {
|
|
174
|
-
const assets = [];
|
|
175
|
-
const assetFields = [
|
|
176
|
-
"image",
|
|
177
|
-
"audio",
|
|
178
|
-
"video",
|
|
179
|
-
"document",
|
|
180
|
-
"images",
|
|
181
|
-
"audios",
|
|
182
|
-
"videos",
|
|
183
|
-
"documents"
|
|
184
|
-
];
|
|
185
|
-
for (const field of assetFields) {
|
|
186
|
-
const val = self[field];
|
|
187
|
-
if (!val)
|
|
188
|
-
continue;
|
|
189
|
-
if (Array.isArray(val)) {
|
|
190
|
-
for (const item of val) {
|
|
191
|
-
if (isAssetRef(item))
|
|
192
|
-
assets.push(item);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
else if (isAssetRef(val)) {
|
|
196
|
-
assets.push(val);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
return assets;
|
|
200
|
-
}
|
|
201
|
-
/** Build multimodal content parts from assets. */
|
|
202
|
-
async function buildAssetContentParts(assets, context, fieldHint) {
|
|
203
|
-
const parts = [];
|
|
204
|
-
for (const asset of assets) {
|
|
205
|
-
const bytes = await getAssetBytes(asset, context);
|
|
206
|
-
if (!bytes || bytes.length === 0)
|
|
207
|
-
continue;
|
|
208
|
-
const kind = inferAssetKind(asset, fieldHint);
|
|
209
|
-
const mime = guessMime(asset, fieldHint);
|
|
210
|
-
const base64 = Buffer.from(bytes).toString("base64");
|
|
211
|
-
if (kind === "image" || kind === "unknown") {
|
|
212
|
-
// Default unknown assets to image (most common multimodal case)
|
|
213
|
-
parts.push({
|
|
214
|
-
type: "image",
|
|
215
|
-
image: {
|
|
216
|
-
data: base64,
|
|
217
|
-
mimeType: mime === "application/octet-stream" ? "image/png" : mime
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
else if (kind === "audio") {
|
|
222
|
-
parts.push({ type: "audio", audio: { data: base64, mimeType: mime } });
|
|
223
|
-
}
|
|
224
|
-
// Video and document are described in text rather than sent as content
|
|
225
|
-
}
|
|
226
|
-
return parts;
|
|
227
|
-
}
|
|
228
|
-
// ---------------------------------------------------------------------------
|
|
229
|
-
// Tool factories for skill agent loop
|
|
230
|
-
// ---------------------------------------------------------------------------
|
|
231
|
-
export function makeExecuteBashTool(workspaceDir, timeoutMs = 120_000) {
|
|
232
|
-
return {
|
|
233
|
-
name: "execute_bash",
|
|
234
|
-
description: "Execute a bash command in the workspace directory.",
|
|
235
|
-
inputSchema: {
|
|
236
|
-
type: "object",
|
|
237
|
-
properties: {
|
|
238
|
-
command: { type: "string", description: "Bash command to execute" }
|
|
239
|
-
},
|
|
240
|
-
required: ["command"]
|
|
241
|
-
},
|
|
242
|
-
process: async (_context, params) => {
|
|
243
|
-
const command = String(params.command ?? "");
|
|
244
|
-
if (!command)
|
|
245
|
-
return { success: false, error: "No command provided" };
|
|
246
|
-
return new Promise((resolve) => {
|
|
247
|
-
exec(command, {
|
|
248
|
-
cwd: workspaceDir,
|
|
249
|
-
timeout: timeoutMs,
|
|
250
|
-
maxBuffer: 10 * 1024 * 1024
|
|
251
|
-
}, (error, stdout, stderr) => {
|
|
252
|
-
resolve({
|
|
253
|
-
success: !error,
|
|
254
|
-
stdout: stdout ?? "",
|
|
255
|
-
stderr: stderr ?? "",
|
|
256
|
-
...(error ? { error: error.message } : {})
|
|
257
|
-
});
|
|
258
|
-
});
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
export function makeSetOutputTool(toolName, description, outputSink, workspaceDir) {
|
|
264
|
-
return {
|
|
265
|
-
name: toolName,
|
|
266
|
-
description,
|
|
267
|
-
inputSchema: {
|
|
268
|
-
type: "object",
|
|
269
|
-
properties: {
|
|
270
|
-
path: {
|
|
271
|
-
type: "string",
|
|
272
|
-
description: "Workspace-relative path to the output file."
|
|
273
|
-
}
|
|
274
|
-
},
|
|
275
|
-
required: ["path"]
|
|
276
|
-
},
|
|
277
|
-
process: async (_context, params) => {
|
|
278
|
-
const relPath = String(params.path ?? "");
|
|
279
|
-
if (!relPath)
|
|
280
|
-
return { success: false, error: "No path provided" };
|
|
281
|
-
const absPath = path.resolve(workspaceDir, relPath);
|
|
282
|
-
if (!absPath.startsWith(path.resolve(workspaceDir) + path.sep) &&
|
|
283
|
-
absPath !== path.resolve(workspaceDir)) {
|
|
284
|
-
return { success: false, error: "Path is outside workspace directory" };
|
|
285
|
-
}
|
|
286
|
-
try {
|
|
287
|
-
await access(absPath);
|
|
288
|
-
}
|
|
289
|
-
catch {
|
|
290
|
-
return { success: false, error: `File not found: ${relPath}` };
|
|
291
|
-
}
|
|
292
|
-
outputSink.push(relPath);
|
|
293
|
-
return { success: true, path: relPath };
|
|
294
|
-
}
|
|
295
|
-
};
|
|
296
|
-
}
|
|
297
|
-
// ---------------------------------------------------------------------------
|
|
298
|
-
// Base tool-agent node
|
|
299
|
-
// ---------------------------------------------------------------------------
|
|
300
|
-
class ToolAgentNode extends BaseNode {
|
|
301
|
-
static description = "Base tool-agent node (not directly usable).";
|
|
302
|
-
/** Override in subclasses with the skill-specific system prompt. */
|
|
303
|
-
static _systemPrompt = "You are a helpful assistant. Complete the task described by the user.";
|
|
304
|
-
/** Override in subclasses to declare output sinks. Keys are output handle names, values are tool names. */
|
|
305
|
-
static _outputSinkConfig = {};
|
|
306
|
-
/** Transient storage for output paths set during agent loop. */
|
|
307
|
-
_outputSinks = {};
|
|
308
|
-
/** Build tools for the agent loop. Includes execute_bash + any output sink tools. */
|
|
309
|
-
getTools(workspaceDir) {
|
|
310
|
-
const tools = [
|
|
311
|
-
makeExecuteBashTool(workspaceDir, (this.timeout_seconds ?? 120) * 1000)
|
|
312
|
-
];
|
|
313
|
-
const config = this.constructor._outputSinkConfig;
|
|
314
|
-
this._outputSinks = {};
|
|
315
|
-
for (const [outputName, toolName] of Object.entries(config)) {
|
|
316
|
-
const sink = [];
|
|
317
|
-
this._outputSinks[outputName] = sink;
|
|
318
|
-
tools.push(makeSetOutputTool(toolName, `Set the ${outputName} output file path.`, sink, workspaceDir));
|
|
319
|
-
}
|
|
320
|
-
return tools;
|
|
321
|
-
}
|
|
322
|
-
/** Read output sinks and load files as asset refs. */
|
|
323
|
-
async readOutputSinks(workspaceDir) {
|
|
324
|
-
const result = {};
|
|
325
|
-
for (const [outputName, sink] of Object.entries(this._outputSinks)) {
|
|
326
|
-
if (sink.length === 0)
|
|
327
|
-
continue;
|
|
328
|
-
const absPath = path.resolve(workspaceDir, sink[0]);
|
|
329
|
-
try {
|
|
330
|
-
const bytes = await readFile(absPath);
|
|
331
|
-
const base64 = Buffer.from(bytes).toString("base64");
|
|
332
|
-
result[outputName] = {
|
|
333
|
-
type: outputName,
|
|
334
|
-
data: base64,
|
|
335
|
-
uri: pathToFileURL(absPath).toString()
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
catch {
|
|
339
|
-
// File doesn't exist or can't be read — skip
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
return result;
|
|
343
|
-
}
|
|
344
|
-
async process(context) {
|
|
345
|
-
const prompt = String(this.prompt ?? "").trim();
|
|
346
|
-
if (!prompt)
|
|
347
|
-
throw new Error("Prompt is required");
|
|
348
|
-
const model = (this.model ?? {});
|
|
349
|
-
const providerId = String(model.provider || "").toLowerCase();
|
|
350
|
-
const modelId = String(model.id || "");
|
|
351
|
-
if (!providerId || !modelId) {
|
|
352
|
-
throw new Error("Select a model for this skill.");
|
|
353
|
-
}
|
|
354
|
-
if (!context || typeof context.getProvider !== "function") {
|
|
355
|
-
throw new Error("Processing context with provider access is required");
|
|
356
|
-
}
|
|
357
|
-
// Determine workspace directory
|
|
358
|
-
const workspaceDir = context.workspaceDir ??
|
|
359
|
-
path.join(tmpdir(), `nodetool-skill-${Date.now()}`);
|
|
360
|
-
await mkdir(workspaceDir, { recursive: true });
|
|
361
|
-
// Collect multimodal asset inputs
|
|
362
|
-
const self = this;
|
|
363
|
-
const assets = collectAssets(self);
|
|
364
|
-
const assetParts = await buildAssetContentParts(assets, context, "image");
|
|
365
|
-
// Copy asset files into workspace so the agent can access them via bash
|
|
366
|
-
const { writeFile: writeFileAsync } = await import("node:fs/promises");
|
|
367
|
-
const workspaceFiles = [];
|
|
368
|
-
for (let i = 0; i < assets.length; i++) {
|
|
369
|
-
const bytes = await getAssetBytes(assets[i], context);
|
|
370
|
-
if (!bytes || bytes.length === 0)
|
|
371
|
-
continue;
|
|
372
|
-
const kind = inferAssetKind(assets[i], "image");
|
|
373
|
-
const mime = guessMime(assets[i], "image");
|
|
374
|
-
const ext = mime.split("/")[1]?.replace("jpeg", "jpg") ?? "bin";
|
|
375
|
-
const fileName = `input_${kind}_${i}.${ext}`;
|
|
376
|
-
await writeFileAsync(path.join(workspaceDir, fileName), bytes);
|
|
377
|
-
workspaceFiles.push(fileName);
|
|
378
|
-
}
|
|
379
|
-
// Build tools
|
|
380
|
-
const tools = this.getTools(workspaceDir);
|
|
381
|
-
// Convert skills-local MessageContentPart[] to runtime MessageContent[] format
|
|
382
|
-
const contentParts = assetParts.map((part) => {
|
|
383
|
-
if (part.type === "image") {
|
|
384
|
-
return {
|
|
385
|
-
type: "image_url",
|
|
386
|
-
image: { data: part.image.data, mimeType: part.image.mimeType }
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
if (part.type === "audio") {
|
|
390
|
-
return {
|
|
391
|
-
type: "audio",
|
|
392
|
-
audio: { data: part.audio.data, mimeType: part.audio.mimeType }
|
|
393
|
-
};
|
|
394
|
-
}
|
|
395
|
-
return { type: "text", text: part.text ?? "" };
|
|
396
|
-
});
|
|
397
|
-
// Augment prompt with workspace file info
|
|
398
|
-
let augmentedPrompt = prompt;
|
|
399
|
-
if (workspaceFiles.length > 0) {
|
|
400
|
-
augmentedPrompt += `\n\nInput files available in the workspace directory:\n${workspaceFiles.map((f) => `- ${f}`).join("\n")}`;
|
|
401
|
-
}
|
|
402
|
-
const systemPrompt = this.constructor
|
|
403
|
-
._systemPrompt;
|
|
404
|
-
const { text } = await runAgentLoop({
|
|
405
|
-
context,
|
|
406
|
-
providerId,
|
|
407
|
-
modelId,
|
|
408
|
-
systemPrompt,
|
|
409
|
-
prompt: augmentedPrompt,
|
|
410
|
-
tools,
|
|
411
|
-
contentParts: contentParts.length > 0 ? contentParts : undefined,
|
|
412
|
-
maxTokens: 4096,
|
|
413
|
-
maxIterations: 10
|
|
414
|
-
});
|
|
415
|
-
return { text, ...(await this.readOutputSinks(workspaceDir)) };
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
// ---------------------------------------------------------------------------
|
|
419
|
-
// ShellAgentSkill
|
|
420
|
-
// ---------------------------------------------------------------------------
|
|
421
|
-
export class ShellAgentNode extends ToolAgentNode {
|
|
422
|
-
static nodeType = "nodetool.agents.ShellAgent";
|
|
423
|
-
static title = "Shell Agent";
|
|
424
|
-
static description = "Reusable prompt-driven skill backed by execute_bash.";
|
|
425
|
-
static metadataOutputTypes = {
|
|
426
|
-
text: "str"
|
|
427
|
-
};
|
|
428
|
-
static _systemPrompt = "You are a bounded workspace agent. Use execute_bash for concrete actions. " +
|
|
429
|
-
"Ground all claims in command output and keep results concise.";
|
|
430
|
-
}
|
|
431
|
-
__decorate([
|
|
432
|
-
prop({
|
|
433
|
-
type: "language_model",
|
|
434
|
-
default: {
|
|
435
|
-
type: "language_model",
|
|
436
|
-
provider: "empty",
|
|
437
|
-
id: "",
|
|
438
|
-
name: "",
|
|
439
|
-
path: null,
|
|
440
|
-
supported_tasks: []
|
|
441
|
-
},
|
|
442
|
-
title: "Model",
|
|
443
|
-
description: "Model used for task planning and execution reasoning."
|
|
444
|
-
})
|
|
445
|
-
], ShellAgentNode.prototype, "model", void 0);
|
|
446
|
-
__decorate([
|
|
447
|
-
prop({
|
|
448
|
-
type: "str",
|
|
449
|
-
default: "",
|
|
450
|
-
title: "Prompt",
|
|
451
|
-
description: "Prompt describing the requested task."
|
|
452
|
-
})
|
|
453
|
-
], ShellAgentNode.prototype, "prompt", void 0);
|
|
454
|
-
__decorate([
|
|
455
|
-
prop({
|
|
456
|
-
type: "int",
|
|
457
|
-
default: 180,
|
|
458
|
-
title: "Timeout Seconds",
|
|
459
|
-
description: "Maximum runtime for agent execution.",
|
|
460
|
-
min: 1,
|
|
461
|
-
max: 3600
|
|
462
|
-
})
|
|
463
|
-
], ShellAgentNode.prototype, "timeout_seconds", void 0);
|
|
464
|
-
__decorate([
|
|
465
|
-
prop({
|
|
466
|
-
type: "int",
|
|
467
|
-
default: 200000,
|
|
468
|
-
title: "Max Output Chars",
|
|
469
|
-
description: "Maximum serialized output chars before truncation.",
|
|
470
|
-
min: 1000,
|
|
471
|
-
max: 2000000
|
|
472
|
-
})
|
|
473
|
-
], ShellAgentNode.prototype, "max_output_chars", void 0);
|
|
474
|
-
// ---------------------------------------------------------------------------
|
|
475
|
-
// BrowserSkill
|
|
476
|
-
// ---------------------------------------------------------------------------
|
|
477
|
-
export class BrowserAgentNode extends ToolAgentNode {
|
|
478
|
-
static nodeType = "nodetool.agents.BrowserAgent";
|
|
479
|
-
static title = "Browser Agent";
|
|
480
|
-
static description = "Prompt-driven browser skill with bounded tool validation and schema outputs.\n Supports extraction and browser automation workflows.\n skills, browser, scrape, extraction, automation";
|
|
481
|
-
static metadataOutputTypes = {
|
|
482
|
-
text: "str"
|
|
483
|
-
};
|
|
484
|
-
static _systemPrompt = "You are a browser automation and extraction agent using Playwright-backed browser tools. " +
|
|
485
|
-
"Use `browser` to fetch page content and metadata, `take_screenshot` for screenshots, " +
|
|
486
|
-
"and DOM tools (`dom_examine`, `dom_search`, `dom_extract`) for structured inspection. " +
|
|
487
|
-
"The `browser` tool returns JSON fields like `success`, `url`, `content`, `metadata`, or `error`. " +
|
|
488
|
-
"Do not browse search engine result pages directly; explain that direct SERP browsing is disabled.";
|
|
489
|
-
}
|
|
490
|
-
__decorate([
|
|
491
|
-
prop({
|
|
492
|
-
type: "language_model",
|
|
493
|
-
default: {
|
|
494
|
-
type: "language_model",
|
|
495
|
-
provider: "empty",
|
|
496
|
-
id: "",
|
|
497
|
-
name: "",
|
|
498
|
-
path: null,
|
|
499
|
-
supported_tasks: []
|
|
500
|
-
},
|
|
501
|
-
title: "Model",
|
|
502
|
-
description: "Model used for free-form browsing tasks."
|
|
503
|
-
})
|
|
504
|
-
], BrowserAgentNode.prototype, "model", void 0);
|
|
505
|
-
__decorate([
|
|
506
|
-
prop({
|
|
507
|
-
type: "str",
|
|
508
|
-
default: "",
|
|
509
|
-
title: "Prompt",
|
|
510
|
-
description: "Prompt for browser navigation/extraction."
|
|
511
|
-
})
|
|
512
|
-
], BrowserAgentNode.prototype, "prompt", void 0);
|
|
513
|
-
__decorate([
|
|
514
|
-
prop({
|
|
515
|
-
type: "int",
|
|
516
|
-
default: 150,
|
|
517
|
-
title: "Timeout Seconds",
|
|
518
|
-
description: "Maximum runtime for agent execution.",
|
|
519
|
-
min: 1,
|
|
520
|
-
max: 3600
|
|
521
|
-
})
|
|
522
|
-
], BrowserAgentNode.prototype, "timeout_seconds", void 0);
|
|
523
|
-
__decorate([
|
|
524
|
-
prop({
|
|
525
|
-
type: "int",
|
|
526
|
-
default: 180000,
|
|
527
|
-
title: "Max Output Chars",
|
|
528
|
-
description: "Maximum serialized output chars before truncation.",
|
|
529
|
-
min: 1000,
|
|
530
|
-
max: 2000000
|
|
531
|
-
})
|
|
532
|
-
], BrowserAgentNode.prototype, "max_output_chars", void 0);
|
|
533
|
-
// ---------------------------------------------------------------------------
|
|
534
|
-
// SQLiteSkill
|
|
535
|
-
// ---------------------------------------------------------------------------
|
|
536
|
-
export class SQLiteAgentNode extends ToolAgentNode {
|
|
537
|
-
static nodeType = "nodetool.agents.SQLiteAgent";
|
|
538
|
-
static title = "SQLite Agent";
|
|
539
|
-
static description = "Prompt-driven SQLite skill with guarded query execution.\n skills, data, sqlite, query";
|
|
540
|
-
static metadataOutputTypes = {
|
|
541
|
-
text: "str",
|
|
542
|
-
json: "dict[str, any]",
|
|
543
|
-
dataframe: "dataframe"
|
|
544
|
-
};
|
|
545
|
-
static _systemPrompt = "You are a data analysis skill. Use tools to run queries and ground every " +
|
|
546
|
-
"answer in tool outputs. Keep answers concise and factual.";
|
|
547
|
-
}
|
|
548
|
-
__decorate([
|
|
549
|
-
prop({
|
|
550
|
-
type: "language_model",
|
|
551
|
-
default: {
|
|
552
|
-
type: "language_model",
|
|
553
|
-
provider: "empty",
|
|
554
|
-
id: "",
|
|
555
|
-
name: "",
|
|
556
|
-
path: null,
|
|
557
|
-
supported_tasks: []
|
|
558
|
-
},
|
|
559
|
-
title: "Model",
|
|
560
|
-
description: "Model used for optional agent reasoning over query results."
|
|
561
|
-
})
|
|
562
|
-
], SQLiteAgentNode.prototype, "model", void 0);
|
|
563
|
-
__decorate([
|
|
564
|
-
prop({
|
|
565
|
-
type: "str",
|
|
566
|
-
default: "",
|
|
567
|
-
title: "Prompt",
|
|
568
|
-
description: "Prompt for data query/transform task."
|
|
569
|
-
})
|
|
570
|
-
], SQLiteAgentNode.prototype, "prompt", void 0);
|
|
571
|
-
__decorate([
|
|
572
|
-
prop({
|
|
573
|
-
type: "int",
|
|
574
|
-
default: 120,
|
|
575
|
-
title: "Timeout Seconds",
|
|
576
|
-
description: "Maximum runtime for agent execution.",
|
|
577
|
-
min: 1,
|
|
578
|
-
max: 3600
|
|
579
|
-
})
|
|
580
|
-
], SQLiteAgentNode.prototype, "timeout_seconds", void 0);
|
|
581
|
-
__decorate([
|
|
582
|
-
prop({
|
|
583
|
-
type: "int",
|
|
584
|
-
default: 200000,
|
|
585
|
-
title: "Max Output Chars",
|
|
586
|
-
description: "Maximum serialized output chars before truncation.",
|
|
587
|
-
min: 1000,
|
|
588
|
-
max: 2000000
|
|
589
|
-
})
|
|
590
|
-
], SQLiteAgentNode.prototype, "max_output_chars", void 0);
|
|
591
|
-
__decorate([
|
|
592
|
-
prop({
|
|
593
|
-
type: "str",
|
|
594
|
-
default: "memory.db",
|
|
595
|
-
title: "Db Path",
|
|
596
|
-
description: "Path to SQLite database relative to workspace."
|
|
597
|
-
})
|
|
598
|
-
], SQLiteAgentNode.prototype, "db_path", void 0);
|
|
599
|
-
__decorate([
|
|
600
|
-
prop({
|
|
601
|
-
type: "bool",
|
|
602
|
-
default: false,
|
|
603
|
-
title: "Allow Mutation",
|
|
604
|
-
description: "Allow INSERT/UPDATE/DELETE/DDL statements when enabled."
|
|
605
|
-
})
|
|
606
|
-
], SQLiteAgentNode.prototype, "allow_mutation", void 0);
|
|
607
|
-
// ---------------------------------------------------------------------------
|
|
608
|
-
// SupabaseSkill
|
|
609
|
-
// ---------------------------------------------------------------------------
|
|
610
|
-
export class SupabaseAgentNode extends ToolAgentNode {
|
|
611
|
-
static nodeType = "nodetool.agents.SupabaseAgent";
|
|
612
|
-
static title = "Supabase Agent";
|
|
613
|
-
static description = "Prompt-driven Supabase skill with guarded SELECT execution.\n skills, data, supabase, query";
|
|
614
|
-
static metadataOutputTypes = {
|
|
615
|
-
text: "str",
|
|
616
|
-
json: "dict[str, any]",
|
|
617
|
-
dataframe: "dataframe"
|
|
618
|
-
};
|
|
619
|
-
static _systemPrompt = "You are a data analysis skill. Use tools to run queries and ground every " +
|
|
620
|
-
"answer in tool outputs. Keep answers concise and factual.";
|
|
621
|
-
}
|
|
622
|
-
__decorate([
|
|
623
|
-
prop({
|
|
624
|
-
type: "language_model",
|
|
625
|
-
default: {
|
|
626
|
-
type: "language_model",
|
|
627
|
-
provider: "empty",
|
|
628
|
-
id: "",
|
|
629
|
-
name: "",
|
|
630
|
-
path: null,
|
|
631
|
-
supported_tasks: []
|
|
632
|
-
},
|
|
633
|
-
title: "Model",
|
|
634
|
-
description: "Model used for optional agent reasoning over query results."
|
|
635
|
-
})
|
|
636
|
-
], SupabaseAgentNode.prototype, "model", void 0);
|
|
637
|
-
__decorate([
|
|
638
|
-
prop({
|
|
639
|
-
type: "str",
|
|
640
|
-
default: "",
|
|
641
|
-
title: "Prompt",
|
|
642
|
-
description: "Prompt for data query/transform task."
|
|
643
|
-
})
|
|
644
|
-
], SupabaseAgentNode.prototype, "prompt", void 0);
|
|
645
|
-
__decorate([
|
|
646
|
-
prop({
|
|
647
|
-
type: "int",
|
|
648
|
-
default: 120,
|
|
649
|
-
title: "Timeout Seconds",
|
|
650
|
-
description: "Maximum runtime for agent execution.",
|
|
651
|
-
min: 1,
|
|
652
|
-
max: 3600
|
|
653
|
-
})
|
|
654
|
-
], SupabaseAgentNode.prototype, "timeout_seconds", void 0);
|
|
655
|
-
__decorate([
|
|
656
|
-
prop({
|
|
657
|
-
type: "int",
|
|
658
|
-
default: 200000,
|
|
659
|
-
title: "Max Output Chars",
|
|
660
|
-
description: "Maximum serialized output chars before truncation.",
|
|
661
|
-
min: 1000,
|
|
662
|
-
max: 2000000
|
|
663
|
-
})
|
|
664
|
-
], SupabaseAgentNode.prototype, "max_output_chars", void 0);
|
|
665
|
-
// ---------------------------------------------------------------------------
|
|
666
|
-
// DocumentSkill
|
|
667
|
-
// ---------------------------------------------------------------------------
|
|
668
|
-
export class DocumentAgentNode extends ToolAgentNode {
|
|
669
|
-
static nodeType = "nodetool.agents.DocumentAgent";
|
|
670
|
-
static title = "Document Agent";
|
|
671
|
-
static description = "Prompt-driven document skill for model-based document analysis.\n skills, document, extraction, conversion, markdown";
|
|
672
|
-
static metadataOutputTypes = {
|
|
673
|
-
text: "str",
|
|
674
|
-
document: "document"
|
|
675
|
-
};
|
|
676
|
-
static _outputSinkConfig = { document: "set_output_document" };
|
|
677
|
-
static _systemPrompt = "You are a document skill. Use attached document/text inputs and return concise results.";
|
|
678
|
-
}
|
|
679
|
-
__decorate([
|
|
680
|
-
prop({
|
|
681
|
-
type: "language_model",
|
|
682
|
-
default: {
|
|
683
|
-
type: "language_model",
|
|
684
|
-
provider: "empty",
|
|
685
|
-
id: "",
|
|
686
|
-
name: "",
|
|
687
|
-
path: null,
|
|
688
|
-
supported_tasks: []
|
|
689
|
-
},
|
|
690
|
-
title: "Model",
|
|
691
|
-
description: "Model used for free-form document tasks."
|
|
692
|
-
})
|
|
693
|
-
], DocumentAgentNode.prototype, "model", void 0);
|
|
694
|
-
__decorate([
|
|
695
|
-
prop({
|
|
696
|
-
type: "str",
|
|
697
|
-
default: "",
|
|
698
|
-
title: "Prompt",
|
|
699
|
-
description: "Prompt describing the document task."
|
|
700
|
-
})
|
|
701
|
-
], DocumentAgentNode.prototype, "prompt", void 0);
|
|
702
|
-
__decorate([
|
|
703
|
-
prop({
|
|
704
|
-
type: "int",
|
|
705
|
-
default: 120,
|
|
706
|
-
title: "Timeout Seconds",
|
|
707
|
-
description: "Maximum runtime for agent execution.",
|
|
708
|
-
min: 1,
|
|
709
|
-
max: 3600
|
|
710
|
-
})
|
|
711
|
-
], DocumentAgentNode.prototype, "timeout_seconds", void 0);
|
|
712
|
-
__decorate([
|
|
713
|
-
prop({
|
|
714
|
-
type: "int",
|
|
715
|
-
default: 150000,
|
|
716
|
-
title: "Max Output Chars",
|
|
717
|
-
description: "Maximum serialized output chars before truncation.",
|
|
718
|
-
min: 1000,
|
|
719
|
-
max: 2000000
|
|
720
|
-
})
|
|
721
|
-
], DocumentAgentNode.prototype, "max_output_chars", void 0);
|
|
722
|
-
// ---------------------------------------------------------------------------
|
|
723
|
-
// DocxSkill
|
|
724
|
-
// ---------------------------------------------------------------------------
|
|
725
|
-
export class DocxAgentNode extends ToolAgentNode {
|
|
726
|
-
static nodeType = "nodetool.agents.DocxAgent";
|
|
727
|
-
static title = "DOCX Agent";
|
|
728
|
-
static description = "Prompt-driven DOCX creation skill.\n skills, docx, word, document creation, docx-js";
|
|
729
|
-
static metadataOutputTypes = {
|
|
730
|
-
document: "document",
|
|
731
|
-
text: "str"
|
|
732
|
-
};
|
|
733
|
-
static _outputSinkConfig = { document: "set_output_document" };
|
|
734
|
-
static _systemPrompt = "You are a DOCX creation specialist. This skill is creation-only.\n\n" +
|
|
735
|
-
"Scope:\n" +
|
|
736
|
-
"- Create new .docx files (reports, memos, letters, templates, styled docs).\n" +
|
|
737
|
-
"- Use docx-js (npm package `docx`) for document generation.\n" +
|
|
738
|
-
"- Do not perform editing/analysis of existing DOCX files in this skill.\n\n" +
|
|
739
|
-
"Execution policy:\n" +
|
|
740
|
-
"1) Use execute_bash for shell and Node.js commands.\n" +
|
|
741
|
-
"2) Keep outputs workspace-relative.\n" +
|
|
742
|
-
"3) Validate generated DOCX when feasible.\n" +
|
|
743
|
-
"4) Final step is mandatory: call set_output_document with output .docx path.\n\n" +
|
|
744
|
-
"Critical docx-js creation rules:\n" +
|
|
745
|
-
"- Set page size explicitly (docx-js defaults to A4).\n" +
|
|
746
|
-
" US Letter: width 12240, height 15840 DXA with 1-inch margins (1440 DXA).\n" +
|
|
747
|
-
"- For landscape, pass portrait dimensions and set orientation LANDSCAPE (library swaps).\n" +
|
|
748
|
-
"- Override built-in heading style IDs exactly ('Heading1', 'Heading2', ...).\n" +
|
|
749
|
-
"- Include outlineLevel on heading paragraph styles for TOC support.\n" +
|
|
750
|
-
"- Never use '\\n' for line breaks; use separate Paragraph elements.\n" +
|
|
751
|
-
"- Never use unicode bullet characters directly; use numbering with LevelFormat.BULLET.\n" +
|
|
752
|
-
"- PageBreak must be inside a Paragraph.\n" +
|
|
753
|
-
"- ImageRun requires explicit type (png/jpg/jpeg/gif/bmp/svg).\n" +
|
|
754
|
-
"- Prefer WidthType.DXA for tables; do not use WidthType.PERCENTAGE.\n" +
|
|
755
|
-
"- Tables need dual widths: table columnWidths and matching cell widths.\n" +
|
|
756
|
-
"- Table width must equal sum(columnWidths).\n" +
|
|
757
|
-
"- Use ShadingType.CLEAR for table shading (not SOLID).\n" +
|
|
758
|
-
"- For TOC, headings should use HeadingLevel and headingStyleRange.\n" +
|
|
759
|
-
"- Use headers/footers and PageNumber for professional layouts.\n\n" +
|
|
760
|
-
"Recommended workflow:\n" +
|
|
761
|
-
"- Create JS script (for example scripts/build_docx.js) with `docx` imports.\n" +
|
|
762
|
-
"- Build Document with sections/styles/numbering/tables/images as requested.\n" +
|
|
763
|
-
"- Write output .docx to workspace path (for example out/document.docx).\n" +
|
|
764
|
-
"- Optionally validate with available validator command.\n" +
|
|
765
|
-
"- Call set_output_document with final .docx path.\n\n" +
|
|
766
|
-
"Output rules:\n" +
|
|
767
|
-
"- Keep response concise and include output path.\n" +
|
|
768
|
-
"- If no DOCX was produced, clearly explain why.";
|
|
769
|
-
}
|
|
770
|
-
__decorate([
|
|
771
|
-
prop({
|
|
772
|
-
type: "language_model",
|
|
773
|
-
default: {
|
|
774
|
-
type: "language_model",
|
|
775
|
-
provider: "empty",
|
|
776
|
-
id: "",
|
|
777
|
-
name: "",
|
|
778
|
-
path: null,
|
|
779
|
-
supported_tasks: []
|
|
780
|
-
},
|
|
781
|
-
title: "Model",
|
|
782
|
-
description: "Model used for DOCX creation planning and execution."
|
|
783
|
-
})
|
|
784
|
-
], DocxAgentNode.prototype, "model", void 0);
|
|
785
|
-
__decorate([
|
|
786
|
-
prop({
|
|
787
|
-
type: "str",
|
|
788
|
-
default: "",
|
|
789
|
-
title: "Prompt",
|
|
790
|
-
description: "Prompt describing what DOCX to create."
|
|
791
|
-
})
|
|
792
|
-
], DocxAgentNode.prototype, "prompt", void 0);
|
|
793
|
-
__decorate([
|
|
794
|
-
prop({
|
|
795
|
-
type: "int",
|
|
796
|
-
default: 300,
|
|
797
|
-
title: "Timeout Seconds",
|
|
798
|
-
description: "Maximum runtime for agent execution.",
|
|
799
|
-
min: 1,
|
|
800
|
-
max: 3600
|
|
801
|
-
})
|
|
802
|
-
], DocxAgentNode.prototype, "timeout_seconds", void 0);
|
|
803
|
-
__decorate([
|
|
804
|
-
prop({
|
|
805
|
-
type: "int",
|
|
806
|
-
default: 220000,
|
|
807
|
-
title: "Max Output Chars",
|
|
808
|
-
description: "Maximum serialized output chars before truncation.",
|
|
809
|
-
min: 1000,
|
|
810
|
-
max: 2000000
|
|
811
|
-
})
|
|
812
|
-
], DocxAgentNode.prototype, "max_output_chars", void 0);
|
|
813
|
-
// ---------------------------------------------------------------------------
|
|
814
|
-
// EmailSkill
|
|
815
|
-
// ---------------------------------------------------------------------------
|
|
816
|
-
export class EmailAgentNode extends ToolAgentNode {
|
|
817
|
-
static nodeType = "nodetool.agents.EmailAgent";
|
|
818
|
-
static title = "Email Agent";
|
|
819
|
-
static description = "Prompt-driven email skill for IMAP/SMTP and message processing tasks.\n skills, email, imap, smtp, messaging";
|
|
820
|
-
static metadataOutputTypes = {
|
|
821
|
-
text: "str"
|
|
822
|
-
};
|
|
823
|
-
static _systemPrompt = "You are an email automation specialist. Use execute_bash for mailbox tasks " +
|
|
824
|
-
"(parse RFC822/EML, summarize threads, draft content, IMAP/SMTP workflows). " +
|
|
825
|
-
"Protect sensitive data and redact secrets or private message content unless requested. " +
|
|
826
|
-
"For outbound actions, clearly state recipients, subject, and intent before execution.";
|
|
827
|
-
}
|
|
828
|
-
__decorate([
|
|
829
|
-
prop({
|
|
830
|
-
type: "language_model",
|
|
831
|
-
default: {
|
|
832
|
-
type: "language_model",
|
|
833
|
-
provider: "empty",
|
|
834
|
-
id: "",
|
|
835
|
-
name: "",
|
|
836
|
-
path: null,
|
|
837
|
-
supported_tasks: []
|
|
838
|
-
},
|
|
839
|
-
title: "Model",
|
|
840
|
-
description: "Model used for task planning and execution reasoning."
|
|
841
|
-
})
|
|
842
|
-
], EmailAgentNode.prototype, "model", void 0);
|
|
843
|
-
__decorate([
|
|
844
|
-
prop({
|
|
845
|
-
type: "str",
|
|
846
|
-
default: "",
|
|
847
|
-
title: "Prompt",
|
|
848
|
-
description: "Prompt describing the requested task."
|
|
849
|
-
})
|
|
850
|
-
], EmailAgentNode.prototype, "prompt", void 0);
|
|
851
|
-
__decorate([
|
|
852
|
-
prop({
|
|
853
|
-
type: "int",
|
|
854
|
-
default: 180,
|
|
855
|
-
title: "Timeout Seconds",
|
|
856
|
-
description: "Maximum runtime for agent execution.",
|
|
857
|
-
min: 1,
|
|
858
|
-
max: 3600
|
|
859
|
-
})
|
|
860
|
-
], EmailAgentNode.prototype, "timeout_seconds", void 0);
|
|
861
|
-
__decorate([
|
|
862
|
-
prop({
|
|
863
|
-
type: "int",
|
|
864
|
-
default: 200000,
|
|
865
|
-
title: "Max Output Chars",
|
|
866
|
-
description: "Maximum serialized output chars before truncation.",
|
|
867
|
-
min: 1000,
|
|
868
|
-
max: 2000000
|
|
869
|
-
})
|
|
870
|
-
], EmailAgentNode.prototype, "max_output_chars", void 0);
|
|
871
|
-
// ---------------------------------------------------------------------------
|
|
872
|
-
// FfmpegSkill
|
|
873
|
-
// ---------------------------------------------------------------------------
|
|
874
|
-
export class FfmpegAgentNode extends ToolAgentNode {
|
|
875
|
-
static nodeType = "nodetool.agents.FfmpegAgent";
|
|
876
|
-
static requiredRuntimes = ["ffmpeg"];
|
|
877
|
-
static title = "FFmpeg Agent";
|
|
878
|
-
static description = "Prompt-driven FFmpeg skill for audio/video editing, conversion, and packaging.\n skills, ffmpeg, media, video, audio, transcode, remux";
|
|
879
|
-
static metadataOutputTypes = {
|
|
880
|
-
video: "video",
|
|
881
|
-
audio: "audio",
|
|
882
|
-
text: "str"
|
|
883
|
-
};
|
|
884
|
-
static _outputSinkConfig = {
|
|
885
|
-
audio: "set_output_audio",
|
|
886
|
-
video: "set_output_video"
|
|
887
|
-
};
|
|
888
|
-
static _systemPrompt = "You are an FFmpeg specialist skill for audio/video processing. " +
|
|
889
|
-
"Use attached media inputs when provided and return concise results.\n\n" +
|
|
890
|
-
"Execution rules:\n" +
|
|
891
|
-
"1) Use execute_bash for ffmpeg/ffprobe commands.\n" +
|
|
892
|
-
"2) Keep generated files under workspace-relative paths.\n" +
|
|
893
|
-
"3) Publish final outputs using set_output_audio and/or set_output_video.\n" +
|
|
894
|
-
"4) Explain failures clearly and include the exact command that failed.\n\n" +
|
|
895
|
-
"FFmpeg reference (https://ffmpeg.org/ffmpeg.html):\n" +
|
|
896
|
-
"- Canonical form: ffmpeg [global_options] {input_opts -i input}... {output_opts output}...\n" +
|
|
897
|
-
"- Option order matters; input options apply to next -i, output options to next output file.\n" +
|
|
898
|
-
"- Use explicit stream mapping for deterministic results: -map 0:v:0 -map 0:a:0.\n" +
|
|
899
|
-
"- Streamcopy/remux: -c copy for fast container changes with no re-encode.\n" +
|
|
900
|
-
"- Transcoding baseline: -c:v libx264 -preset medium -crf 23 -c:a aac -b:a 192k.\n" +
|
|
901
|
-
"- Video filters: -vf scale=1280:-2,fps=30,crop=...,pad=....\n" +
|
|
902
|
-
"- Audio filters: -af loudnorm,highpass=80,aresample=48000.\n" +
|
|
903
|
-
"- Multi-input graphs: use -filter_complex for concat, overlays, mixdown, subtitles burn-in.\n" +
|
|
904
|
-
"- Trimming: use -ss before -i for fast seek; use -ss/-to after -i for precise cut.\n" +
|
|
905
|
-
"- Subtitle handling: map subtitle streams when possible; burn in with subtitles=... when needed.\n" +
|
|
906
|
-
"- Metadata/chapters: -map_metadata, -map_chapters, -metadata key=value.\n" +
|
|
907
|
-
"- Overwrite behavior: -y overwrite, -n never overwrite.\n" +
|
|
908
|
-
"- Diagnostics: -hide_banner with -loglevel info|warning|error and optional -stats.\n\n" +
|
|
909
|
-
"Common recipes:\n" +
|
|
910
|
-
"- Remux: ffmpeg -i in.mkv -map 0 -c copy out.mp4\n" +
|
|
911
|
-
"- Normalize playback: ffmpeg -i in.ext -map 0:v:0 -map 0:a:0 -c:v libx264 -crf 23 -c:a aac -b:a 192k out.mp4\n" +
|
|
912
|
-
"- 720p derivative: ffmpeg -i in.ext -vf scale=1280:-2 -c:v libx264 -crf 23 -c:a copy out_720p.mp4\n" +
|
|
913
|
-
"- Clip segment: ffmpeg -ss 00:00:30 -to 00:01:00 -i in.ext -c copy clip.ext\n" +
|
|
914
|
-
"- Extract MP3: ffmpeg -i in.ext -vn -c:a libmp3lame -b:a 192k out.mp3\n" +
|
|
915
|
-
"- Burn subtitles: ffmpeg -i in.ext -vf subtitles=subs.srt -c:v libx264 -c:a copy out_subbed.mp4";
|
|
916
|
-
}
|
|
917
|
-
__decorate([
|
|
918
|
-
prop({
|
|
919
|
-
type: "language_model",
|
|
920
|
-
default: {
|
|
921
|
-
type: "language_model",
|
|
922
|
-
provider: "empty",
|
|
923
|
-
id: "",
|
|
924
|
-
name: "",
|
|
925
|
-
path: null,
|
|
926
|
-
supported_tasks: []
|
|
927
|
-
},
|
|
928
|
-
title: "Model",
|
|
929
|
-
description: "Model used for media prompts."
|
|
930
|
-
})
|
|
931
|
-
], FfmpegAgentNode.prototype, "model", void 0);
|
|
932
|
-
__decorate([
|
|
933
|
-
prop({
|
|
934
|
-
type: "audio",
|
|
935
|
-
default: {
|
|
936
|
-
type: "audio",
|
|
937
|
-
uri: "",
|
|
938
|
-
asset_id: null,
|
|
939
|
-
data: null,
|
|
940
|
-
metadata: null
|
|
941
|
-
},
|
|
942
|
-
title: "Audio",
|
|
943
|
-
description: "Optional audio input for media reasoning tasks."
|
|
944
|
-
})
|
|
945
|
-
], FfmpegAgentNode.prototype, "audio", void 0);
|
|
946
|
-
__decorate([
|
|
947
|
-
prop({
|
|
948
|
-
type: "video",
|
|
949
|
-
default: {
|
|
950
|
-
type: "video",
|
|
951
|
-
uri: "",
|
|
952
|
-
asset_id: null,
|
|
953
|
-
data: null,
|
|
954
|
-
metadata: null,
|
|
955
|
-
duration: null,
|
|
956
|
-
format: null
|
|
957
|
-
},
|
|
958
|
-
title: "Video",
|
|
959
|
-
description: "Optional video input for media reasoning tasks."
|
|
960
|
-
})
|
|
961
|
-
], FfmpegAgentNode.prototype, "video", void 0);
|
|
962
|
-
__decorate([
|
|
963
|
-
prop({
|
|
964
|
-
type: "str",
|
|
965
|
-
default: "",
|
|
966
|
-
title: "Prompt",
|
|
967
|
-
description: "Prompt for media task execution."
|
|
968
|
-
})
|
|
969
|
-
], FfmpegAgentNode.prototype, "prompt", void 0);
|
|
970
|
-
__decorate([
|
|
971
|
-
prop({
|
|
972
|
-
type: "int",
|
|
973
|
-
default: 180,
|
|
974
|
-
title: "Timeout Seconds",
|
|
975
|
-
description: "Maximum runtime for agent execution.",
|
|
976
|
-
min: 1,
|
|
977
|
-
max: 3600
|
|
978
|
-
})
|
|
979
|
-
], FfmpegAgentNode.prototype, "timeout_seconds", void 0);
|
|
980
|
-
__decorate([
|
|
981
|
-
prop({
|
|
982
|
-
type: "int",
|
|
983
|
-
default: 200000,
|
|
984
|
-
title: "Max Output Chars",
|
|
985
|
-
description: "Maximum serialized output chars before truncation.",
|
|
986
|
-
min: 1000,
|
|
987
|
-
max: 2000000
|
|
988
|
-
})
|
|
989
|
-
], FfmpegAgentNode.prototype, "max_output_chars", void 0);
|
|
990
|
-
// ---------------------------------------------------------------------------
|
|
991
|
-
// FilesystemSkill
|
|
992
|
-
// ---------------------------------------------------------------------------
|
|
993
|
-
export class FilesystemAgentNode extends ToolAgentNode {
|
|
994
|
-
static nodeType = "nodetool.agents.FilesystemAgent";
|
|
995
|
-
static title = "Filesystem Agent";
|
|
996
|
-
static description = "Prompt-driven filesystem skill for file inspection and transformations.\n skills, filesystem, files, directories, io";
|
|
997
|
-
static metadataOutputTypes = {
|
|
998
|
-
text: "str"
|
|
999
|
-
};
|
|
1000
|
-
static _systemPrompt = "You are a filesystem operations specialist constrained to the workspace. " +
|
|
1001
|
-
"Use execute_bash for listing, searching, creating, moving, copying, and deleting files. " +
|
|
1002
|
-
"Prefer reversible actions and confirm paths before mutating data. " +
|
|
1003
|
-
"When changing files, summarize what changed and where.";
|
|
1004
|
-
}
|
|
1005
|
-
__decorate([
|
|
1006
|
-
prop({
|
|
1007
|
-
type: "language_model",
|
|
1008
|
-
default: {
|
|
1009
|
-
type: "language_model",
|
|
1010
|
-
provider: "empty",
|
|
1011
|
-
id: "",
|
|
1012
|
-
name: "",
|
|
1013
|
-
path: null,
|
|
1014
|
-
supported_tasks: []
|
|
1015
|
-
},
|
|
1016
|
-
title: "Model",
|
|
1017
|
-
description: "Model used for task planning and execution reasoning."
|
|
1018
|
-
})
|
|
1019
|
-
], FilesystemAgentNode.prototype, "model", void 0);
|
|
1020
|
-
__decorate([
|
|
1021
|
-
prop({
|
|
1022
|
-
type: "str",
|
|
1023
|
-
default: "",
|
|
1024
|
-
title: "Prompt",
|
|
1025
|
-
description: "Prompt describing the requested task."
|
|
1026
|
-
})
|
|
1027
|
-
], FilesystemAgentNode.prototype, "prompt", void 0);
|
|
1028
|
-
__decorate([
|
|
1029
|
-
prop({
|
|
1030
|
-
type: "int",
|
|
1031
|
-
default: 180,
|
|
1032
|
-
title: "Timeout Seconds",
|
|
1033
|
-
description: "Maximum runtime for agent execution.",
|
|
1034
|
-
min: 1,
|
|
1035
|
-
max: 3600
|
|
1036
|
-
})
|
|
1037
|
-
], FilesystemAgentNode.prototype, "timeout_seconds", void 0);
|
|
1038
|
-
__decorate([
|
|
1039
|
-
prop({
|
|
1040
|
-
type: "int",
|
|
1041
|
-
default: 200000,
|
|
1042
|
-
title: "Max Output Chars",
|
|
1043
|
-
description: "Maximum serialized output chars before truncation.",
|
|
1044
|
-
min: 1000,
|
|
1045
|
-
max: 2000000
|
|
1046
|
-
})
|
|
1047
|
-
], FilesystemAgentNode.prototype, "max_output_chars", void 0);
|
|
1048
|
-
// ---------------------------------------------------------------------------
|
|
1049
|
-
// GitSkill
|
|
1050
|
-
// ---------------------------------------------------------------------------
|
|
1051
|
-
export class GitAgentNode extends ToolAgentNode {
|
|
1052
|
-
static nodeType = "nodetool.agents.GitAgent";
|
|
1053
|
-
static title = "Git Agent";
|
|
1054
|
-
static description = "Prompt-driven Git skill for repository inspection and change management.\n skills, git, repository, version-control";
|
|
1055
|
-
static metadataOutputTypes = {
|
|
1056
|
-
text: "str"
|
|
1057
|
-
};
|
|
1058
|
-
static _systemPrompt = "You are a Git workflow specialist. Use execute_bash for all repository actions. " +
|
|
1059
|
-
"Prefer non-destructive commands (status, diff, log, branch, add, commit, fetch, pull). " +
|
|
1060
|
-
"Do not run destructive history-rewriting commands unless explicitly requested. " +
|
|
1061
|
-
"Report exact files, commit IDs, and branch names from command output.";
|
|
1062
|
-
}
|
|
1063
|
-
__decorate([
|
|
1064
|
-
prop({
|
|
1065
|
-
type: "language_model",
|
|
1066
|
-
default: {
|
|
1067
|
-
type: "language_model",
|
|
1068
|
-
provider: "empty",
|
|
1069
|
-
id: "",
|
|
1070
|
-
name: "",
|
|
1071
|
-
path: null,
|
|
1072
|
-
supported_tasks: []
|
|
1073
|
-
},
|
|
1074
|
-
title: "Model",
|
|
1075
|
-
description: "Model used for task planning and execution reasoning."
|
|
1076
|
-
})
|
|
1077
|
-
], GitAgentNode.prototype, "model", void 0);
|
|
1078
|
-
__decorate([
|
|
1079
|
-
prop({
|
|
1080
|
-
type: "str",
|
|
1081
|
-
default: "",
|
|
1082
|
-
title: "Prompt",
|
|
1083
|
-
description: "Prompt describing the requested task."
|
|
1084
|
-
})
|
|
1085
|
-
], GitAgentNode.prototype, "prompt", void 0);
|
|
1086
|
-
__decorate([
|
|
1087
|
-
prop({
|
|
1088
|
-
type: "int",
|
|
1089
|
-
default: 180,
|
|
1090
|
-
title: "Timeout Seconds",
|
|
1091
|
-
description: "Maximum runtime for agent execution.",
|
|
1092
|
-
min: 1,
|
|
1093
|
-
max: 3600
|
|
1094
|
-
})
|
|
1095
|
-
], GitAgentNode.prototype, "timeout_seconds", void 0);
|
|
1096
|
-
__decorate([
|
|
1097
|
-
prop({
|
|
1098
|
-
type: "int",
|
|
1099
|
-
default: 200000,
|
|
1100
|
-
title: "Max Output Chars",
|
|
1101
|
-
description: "Maximum serialized output chars before truncation.",
|
|
1102
|
-
min: 1000,
|
|
1103
|
-
max: 2000000
|
|
1104
|
-
})
|
|
1105
|
-
], GitAgentNode.prototype, "max_output_chars", void 0);
|
|
1106
|
-
// ---------------------------------------------------------------------------
|
|
1107
|
-
// HtmlSkill
|
|
1108
|
-
// ---------------------------------------------------------------------------
|
|
1109
|
-
export class HtmlAgentNode extends ToolAgentNode {
|
|
1110
|
-
static nodeType = "nodetool.agents.HtmlAgent";
|
|
1111
|
-
static title = "HTML Agent";
|
|
1112
|
-
static description = "Prompt-driven HTML creation skill.\n skills, html, web, template, static-site";
|
|
1113
|
-
static metadataOutputTypes = {
|
|
1114
|
-
html: "html",
|
|
1115
|
-
text: "str"
|
|
1116
|
-
};
|
|
1117
|
-
static _outputSinkConfig = { html: "set_output_html" };
|
|
1118
|
-
static _systemPrompt = "You are an HTML creation specialist.\n\n" +
|
|
1119
|
-
"Scope:\n" +
|
|
1120
|
-
"- Create or generate HTML files and related inline CSS/JS when requested.\n" +
|
|
1121
|
-
"- Use execute_bash for shell/file operations.\n" +
|
|
1122
|
-
"- Keep output paths workspace-relative.\n" +
|
|
1123
|
-
"- Final step is mandatory: call set_output_html with the final HTML file path.\n\n" +
|
|
1124
|
-
"Authoring rules:\n" +
|
|
1125
|
-
"- Produce valid UTF-8 HTML5 documents (`<!doctype html>`).\n" +
|
|
1126
|
-
"- Include semantic structure (header/main/section/footer) when appropriate.\n" +
|
|
1127
|
-
"- Prefer accessible markup (labels, alt text, heading hierarchy).\n" +
|
|
1128
|
-
"- Keep JS/CSS straightforward unless the user asks for complexity.\n" +
|
|
1129
|
-
"- If external dependencies are needed, explain them briefly.\n\n" +
|
|
1130
|
-
"Output rules:\n" +
|
|
1131
|
-
"- Keep response concise and include final save path.\n" +
|
|
1132
|
-
"- If no HTML file was produced, clearly explain why.";
|
|
1133
|
-
}
|
|
1134
|
-
__decorate([
|
|
1135
|
-
prop({
|
|
1136
|
-
type: "language_model",
|
|
1137
|
-
default: {
|
|
1138
|
-
type: "language_model",
|
|
1139
|
-
provider: "empty",
|
|
1140
|
-
id: "",
|
|
1141
|
-
name: "",
|
|
1142
|
-
path: null,
|
|
1143
|
-
supported_tasks: []
|
|
1144
|
-
},
|
|
1145
|
-
title: "Model",
|
|
1146
|
-
description: "Model used for HTML generation planning/execution."
|
|
1147
|
-
})
|
|
1148
|
-
], HtmlAgentNode.prototype, "model", void 0);
|
|
1149
|
-
__decorate([
|
|
1150
|
-
prop({
|
|
1151
|
-
type: "str",
|
|
1152
|
-
default: "",
|
|
1153
|
-
title: "Prompt",
|
|
1154
|
-
description: "Prompt describing HTML to create."
|
|
1155
|
-
})
|
|
1156
|
-
], HtmlAgentNode.prototype, "prompt", void 0);
|
|
1157
|
-
__decorate([
|
|
1158
|
-
prop({
|
|
1159
|
-
type: "int",
|
|
1160
|
-
default: 180,
|
|
1161
|
-
title: "Timeout Seconds",
|
|
1162
|
-
description: "Maximum runtime for agent execution.",
|
|
1163
|
-
min: 1,
|
|
1164
|
-
max: 3600
|
|
1165
|
-
})
|
|
1166
|
-
], HtmlAgentNode.prototype, "timeout_seconds", void 0);
|
|
1167
|
-
__decorate([
|
|
1168
|
-
prop({
|
|
1169
|
-
type: "int",
|
|
1170
|
-
default: 180000,
|
|
1171
|
-
title: "Max Output Chars",
|
|
1172
|
-
description: "Maximum serialized output chars before truncation.",
|
|
1173
|
-
min: 1000,
|
|
1174
|
-
max: 2000000
|
|
1175
|
-
})
|
|
1176
|
-
], HtmlAgentNode.prototype, "max_output_chars", void 0);
|
|
1177
|
-
// ---------------------------------------------------------------------------
|
|
1178
|
-
// HttpApiSkill
|
|
1179
|
-
// ---------------------------------------------------------------------------
|
|
1180
|
-
export class HttpApiAgentNode extends ToolAgentNode {
|
|
1181
|
-
static nodeType = "nodetool.agents.HttpApiAgent";
|
|
1182
|
-
static title = "HTTP API Agent";
|
|
1183
|
-
static description = "Prompt-driven HTTP API skill for calling REST/GraphQL endpoints.\n skills, http, api, rest, graphql";
|
|
1184
|
-
static metadataOutputTypes = {
|
|
1185
|
-
text: "str"
|
|
1186
|
-
};
|
|
1187
|
-
static _systemPrompt = "You are an HTTP API integration specialist. " +
|
|
1188
|
-
"You can use exactly one tool: `http_request`. " +
|
|
1189
|
-
"Do not use shell commands or any non-HTTP tooling. " +
|
|
1190
|
-
"Plan requests explicitly (method, URL, headers, query, body), " +
|
|
1191
|
-
"call `http_request`, and ground conclusions in returned status/body. " +
|
|
1192
|
-
"Treat secrets as sensitive and never echo tokens verbatim. " +
|
|
1193
|
-
"If a request fails, explain the failure and propose the next request. " +
|
|
1194
|
-
"Always return a final user-facing answer, not just tool dumps. " +
|
|
1195
|
-
"Final response format: " +
|
|
1196
|
-
"1) Direct answer in 1-3 sentences. " +
|
|
1197
|
-
"2) Evidence: status code(s) and key response fields used. " +
|
|
1198
|
-
"3) If unresolved, the exact missing data needed.";
|
|
1199
|
-
}
|
|
1200
|
-
__decorate([
|
|
1201
|
-
prop({
|
|
1202
|
-
type: "language_model",
|
|
1203
|
-
default: {
|
|
1204
|
-
type: "language_model",
|
|
1205
|
-
provider: "empty",
|
|
1206
|
-
id: "",
|
|
1207
|
-
name: "",
|
|
1208
|
-
path: null,
|
|
1209
|
-
supported_tasks: []
|
|
1210
|
-
},
|
|
1211
|
-
title: "Model",
|
|
1212
|
-
description: "Model used for API planning and response interpretation."
|
|
1213
|
-
})
|
|
1214
|
-
], HttpApiAgentNode.prototype, "model", void 0);
|
|
1215
|
-
__decorate([
|
|
1216
|
-
prop({
|
|
1217
|
-
type: "str",
|
|
1218
|
-
default: "",
|
|
1219
|
-
title: "Prompt",
|
|
1220
|
-
description: "Prompt describing the HTTP API task."
|
|
1221
|
-
})
|
|
1222
|
-
], HttpApiAgentNode.prototype, "prompt", void 0);
|
|
1223
|
-
__decorate([
|
|
1224
|
-
prop({
|
|
1225
|
-
type: "int",
|
|
1226
|
-
default: 180,
|
|
1227
|
-
title: "Timeout Seconds",
|
|
1228
|
-
description: "Maximum runtime for agent execution.",
|
|
1229
|
-
min: 1,
|
|
1230
|
-
max: 3600
|
|
1231
|
-
})
|
|
1232
|
-
], HttpApiAgentNode.prototype, "timeout_seconds", void 0);
|
|
1233
|
-
__decorate([
|
|
1234
|
-
prop({
|
|
1235
|
-
type: "int",
|
|
1236
|
-
default: 200000,
|
|
1237
|
-
title: "Max Output Chars",
|
|
1238
|
-
description: "Maximum serialized output chars before truncation.",
|
|
1239
|
-
min: 1000,
|
|
1240
|
-
max: 2000000
|
|
1241
|
-
})
|
|
1242
|
-
], HttpApiAgentNode.prototype, "max_output_chars", void 0);
|
|
1243
|
-
// ---------------------------------------------------------------------------
|
|
1244
|
-
// ImageSkill
|
|
1245
|
-
// ---------------------------------------------------------------------------
|
|
1246
|
-
export class ImageAgentNode extends ToolAgentNode {
|
|
1247
|
-
static nodeType = "nodetool.agents.ImageAgent";
|
|
1248
|
-
static title = "Image Agent";
|
|
1249
|
-
static description = "Prompt-driven image skill for model-based image reasoning.\n skills, image, agent, transform, extraction";
|
|
1250
|
-
static metadataOutputTypes = {
|
|
1251
|
-
image: "image",
|
|
1252
|
-
text: "str"
|
|
1253
|
-
};
|
|
1254
|
-
static _outputSinkConfig = { image: "set_output_image" };
|
|
1255
|
-
static _systemPrompt = "You are an image skill. Use attached inputs and return concise results. " +
|
|
1256
|
-
"Use execute_bash when shell-based processing is needed. " +
|
|
1257
|
-
"When you create a final output image file, call set_output_image with that path.";
|
|
1258
|
-
}
|
|
1259
|
-
__decorate([
|
|
1260
|
-
prop({
|
|
1261
|
-
type: "language_model",
|
|
1262
|
-
default: {
|
|
1263
|
-
type: "language_model",
|
|
1264
|
-
provider: "empty",
|
|
1265
|
-
id: "",
|
|
1266
|
-
name: "",
|
|
1267
|
-
path: null,
|
|
1268
|
-
supported_tasks: []
|
|
1269
|
-
},
|
|
1270
|
-
title: "Model",
|
|
1271
|
-
description: "Model used for image prompts."
|
|
1272
|
-
})
|
|
1273
|
-
], ImageAgentNode.prototype, "model", void 0);
|
|
1274
|
-
__decorate([
|
|
1275
|
-
prop({
|
|
1276
|
-
type: "image",
|
|
1277
|
-
default: {
|
|
1278
|
-
type: "image",
|
|
1279
|
-
uri: "",
|
|
1280
|
-
asset_id: null,
|
|
1281
|
-
data: null,
|
|
1282
|
-
metadata: null
|
|
1283
|
-
},
|
|
1284
|
-
title: "Image",
|
|
1285
|
-
description: "Optional image input for image reasoning tasks."
|
|
1286
|
-
})
|
|
1287
|
-
], ImageAgentNode.prototype, "image", void 0);
|
|
1288
|
-
__decorate([
|
|
1289
|
-
prop({
|
|
1290
|
-
type: "str",
|
|
1291
|
-
default: "",
|
|
1292
|
-
title: "Prompt",
|
|
1293
|
-
description: "Prompt describing the image task."
|
|
1294
|
-
})
|
|
1295
|
-
], ImageAgentNode.prototype, "prompt", void 0);
|
|
1296
|
-
__decorate([
|
|
1297
|
-
prop({
|
|
1298
|
-
type: "int",
|
|
1299
|
-
default: 90,
|
|
1300
|
-
title: "Timeout Seconds",
|
|
1301
|
-
description: "Maximum runtime for agent execution.",
|
|
1302
|
-
min: 1,
|
|
1303
|
-
max: 3600
|
|
1304
|
-
})
|
|
1305
|
-
], ImageAgentNode.prototype, "timeout_seconds", void 0);
|
|
1306
|
-
__decorate([
|
|
1307
|
-
prop({
|
|
1308
|
-
type: "int",
|
|
1309
|
-
default: 120000,
|
|
1310
|
-
title: "Max Output Chars",
|
|
1311
|
-
description: "Maximum serialized output chars before truncation.",
|
|
1312
|
-
min: 1000,
|
|
1313
|
-
max: 2000000
|
|
1314
|
-
})
|
|
1315
|
-
], ImageAgentNode.prototype, "max_output_chars", void 0);
|
|
1316
|
-
// ---------------------------------------------------------------------------
|
|
1317
|
-
// MediaSkill
|
|
1318
|
-
// ---------------------------------------------------------------------------
|
|
1319
|
-
export class MediaAgentNode extends ToolAgentNode {
|
|
1320
|
-
static nodeType = "nodetool.agents.MediaAgent";
|
|
1321
|
-
static title = "Media Agent";
|
|
1322
|
-
static description = "Prompt-driven media skill for model-based audio/video reasoning.\n skills, media, audio, video, agent";
|
|
1323
|
-
static metadataOutputTypes = {
|
|
1324
|
-
video: "video",
|
|
1325
|
-
audio: "audio",
|
|
1326
|
-
text: "str"
|
|
1327
|
-
};
|
|
1328
|
-
static _outputSinkConfig = {
|
|
1329
|
-
audio: "set_output_audio",
|
|
1330
|
-
video: "set_output_video"
|
|
1331
|
-
};
|
|
1332
|
-
static _systemPrompt = "You are a media skill for audio/video tasks. " +
|
|
1333
|
-
"Use attached media inputs when provided and return concise results. " +
|
|
1334
|
-
"Use execute_bash for shell-based operations. " +
|
|
1335
|
-
"When you create final media files, call set_output_audio and/or " +
|
|
1336
|
-
"set_output_video using workspace-relative paths.";
|
|
1337
|
-
}
|
|
1338
|
-
__decorate([
|
|
1339
|
-
prop({
|
|
1340
|
-
type: "language_model",
|
|
1341
|
-
default: {
|
|
1342
|
-
type: "language_model",
|
|
1343
|
-
provider: "empty",
|
|
1344
|
-
id: "",
|
|
1345
|
-
name: "",
|
|
1346
|
-
path: null,
|
|
1347
|
-
supported_tasks: []
|
|
1348
|
-
},
|
|
1349
|
-
title: "Model",
|
|
1350
|
-
description: "Model used for media prompts."
|
|
1351
|
-
})
|
|
1352
|
-
], MediaAgentNode.prototype, "model", void 0);
|
|
1353
|
-
__decorate([
|
|
1354
|
-
prop({
|
|
1355
|
-
type: "audio",
|
|
1356
|
-
default: {
|
|
1357
|
-
type: "audio",
|
|
1358
|
-
uri: "",
|
|
1359
|
-
asset_id: null,
|
|
1360
|
-
data: null,
|
|
1361
|
-
metadata: null
|
|
1362
|
-
},
|
|
1363
|
-
title: "Audio",
|
|
1364
|
-
description: "Optional audio input for media reasoning tasks."
|
|
1365
|
-
})
|
|
1366
|
-
], MediaAgentNode.prototype, "audio", void 0);
|
|
1367
|
-
__decorate([
|
|
1368
|
-
prop({
|
|
1369
|
-
type: "video",
|
|
1370
|
-
default: {
|
|
1371
|
-
type: "video",
|
|
1372
|
-
uri: "",
|
|
1373
|
-
asset_id: null,
|
|
1374
|
-
data: null,
|
|
1375
|
-
metadata: null,
|
|
1376
|
-
duration: null,
|
|
1377
|
-
format: null
|
|
1378
|
-
},
|
|
1379
|
-
title: "Video",
|
|
1380
|
-
description: "Optional video input for media reasoning tasks."
|
|
1381
|
-
})
|
|
1382
|
-
], MediaAgentNode.prototype, "video", void 0);
|
|
1383
|
-
__decorate([
|
|
1384
|
-
prop({
|
|
1385
|
-
type: "str",
|
|
1386
|
-
default: "",
|
|
1387
|
-
title: "Prompt",
|
|
1388
|
-
description: "Prompt for media task execution."
|
|
1389
|
-
})
|
|
1390
|
-
], MediaAgentNode.prototype, "prompt", void 0);
|
|
1391
|
-
__decorate([
|
|
1392
|
-
prop({
|
|
1393
|
-
type: "int",
|
|
1394
|
-
default: 180,
|
|
1395
|
-
title: "Timeout Seconds",
|
|
1396
|
-
description: "Maximum runtime for agent execution.",
|
|
1397
|
-
min: 1,
|
|
1398
|
-
max: 3600
|
|
1399
|
-
})
|
|
1400
|
-
], MediaAgentNode.prototype, "timeout_seconds", void 0);
|
|
1401
|
-
__decorate([
|
|
1402
|
-
prop({
|
|
1403
|
-
type: "int",
|
|
1404
|
-
default: 200000,
|
|
1405
|
-
title: "Max Output Chars",
|
|
1406
|
-
description: "Maximum serialized output chars before truncation.",
|
|
1407
|
-
min: 1000,
|
|
1408
|
-
max: 2000000
|
|
1409
|
-
})
|
|
1410
|
-
], MediaAgentNode.prototype, "max_output_chars", void 0);
|
|
1411
|
-
// ---------------------------------------------------------------------------
|
|
1412
|
-
// PdfLibSkill
|
|
1413
|
-
// ---------------------------------------------------------------------------
|
|
1414
|
-
export class PdfLibAgentNode extends ToolAgentNode {
|
|
1415
|
-
static nodeType = "nodetool.agents.PdfLibAgent";
|
|
1416
|
-
static title = "PDF-lib Agent";
|
|
1417
|
-
static description = "Prompt-driven PDF processing skill with pdf-lib and complementary tooling.\n skills, pdf, pdf-lib, qpdf, poppler, pdfjs, pypdfium2";
|
|
1418
|
-
static metadataOutputTypes = {
|
|
1419
|
-
document: "document",
|
|
1420
|
-
text: "str"
|
|
1421
|
-
};
|
|
1422
|
-
static _outputSinkConfig = { document: "set_output_document" };
|
|
1423
|
-
static _systemPrompt = "You are a PDF processing specialist. Focus on robust, reproducible PDF workflows.\n\n" +
|
|
1424
|
-
"Primary scope:\n" +
|
|
1425
|
-
"- JavaScript pdf-lib for creating/modifying/splitting/merging PDFs.\n" +
|
|
1426
|
-
"- Python ecosystem for extraction/analysis: pypdf, pdfplumber, pypdfium2, reportlab.\n" +
|
|
1427
|
-
"- CLI tooling for performance/repair: poppler-utils (pdftotext/pdftoppm/pdfimages), qpdf.\n\n" +
|
|
1428
|
-
"Execution policy:\n" +
|
|
1429
|
-
"1) Use execute_bash for shell commands and script execution.\n" +
|
|
1430
|
-
"2) Before running any Node script that imports pdf-lib, bootstrap dependency availability with:\n" +
|
|
1431
|
-
" npm -s ls pdf-lib >/dev/null 2>&1 || npm install --no-save pdf-lib\n" +
|
|
1432
|
-
" Then verify with: node -e \"require.resolve('pdf-lib')\".\n" +
|
|
1433
|
-
"3) Keep all outputs workspace-relative.\n" +
|
|
1434
|
-
"4) If you produce a final PDF file, call set_output_document with its path.\n" +
|
|
1435
|
-
"5) For extraction-only requests, return concise text and artifact locations.\n" +
|
|
1436
|
-
"6) Include exact commands/scripts used when reporting.\n\n" +
|
|
1437
|
-
"Advanced PDF reference:\n" +
|
|
1438
|
-
"- pypdfium2: fast rendering/text extraction.\n" +
|
|
1439
|
-
" Example render: page.render(scale=2.0).to_pil().save('page_1.png').\n" +
|
|
1440
|
-
" Example text: page.get_text().\n" +
|
|
1441
|
-
"- pdf-lib (JS): PDFDocument.load/create, copyPages, addPage, drawText, drawRectangle, save.\n" +
|
|
1442
|
-
" Use Node scripts for merge/split/edit and form-safe updates.\n" +
|
|
1443
|
-
"- @llamaindex/liteparse (JS): LiteParse class, parse() for text/OCR extraction with bounding boxes.\n" +
|
|
1444
|
-
"- poppler-utils:\n" +
|
|
1445
|
-
" pdftotext -bbox-layout for coordinates;\n" +
|
|
1446
|
-
" pdftoppm for rasterization;\n" +
|
|
1447
|
-
" pdfimages -all for embedded image extraction.\n" +
|
|
1448
|
-
"- qpdf:\n" +
|
|
1449
|
-
" --split-pages, --pages for page selection/merge;\n" +
|
|
1450
|
-
" --linearize and --optimize-level for optimization;\n" +
|
|
1451
|
-
" --check for validation and structure diagnostics.\n" +
|
|
1452
|
-
"- pdfplumber: coordinate-aware extraction and table extraction tuning.\n" +
|
|
1453
|
-
"- reportlab: structured PDF generation and styled tables.\n\n" +
|
|
1454
|
-
"Performance and reliability guidelines:\n" +
|
|
1455
|
-
"- For large PDFs, process pages/chunks instead of loading everything at once.\n" +
|
|
1456
|
-
"- Prefer pdfimages for image extraction speed, pdftotext for plain text speed.\n" +
|
|
1457
|
-
"- Use OCR fallback only for scanned/image PDFs.\n" +
|
|
1458
|
-
"- Validate encrypted/corrupt files with qpdf before deep processing.\n\n" +
|
|
1459
|
-
"Common command examples:\n" +
|
|
1460
|
-
"- Text with coordinates: pdftotext -bbox-layout document.pdf output.xml\n" +
|
|
1461
|
-
"- Render 300 DPI pages: pdftoppm -png -r 300 document.pdf out\n" +
|
|
1462
|
-
"- Extract embedded images: pdfimages -all document.pdf images/img\n" +
|
|
1463
|
-
"- Merge selected pages: qpdf --empty --pages a.pdf 1-3 b.pdf 2,4 -- merged.pdf\n" +
|
|
1464
|
-
"- Linearize for web: qpdf --linearize input.pdf optimized.pdf\n" +
|
|
1465
|
-
"- Check integrity: qpdf --check input.pdf\n\n" +
|
|
1466
|
-
"Output rules:\n" +
|
|
1467
|
-
"- Keep responses concise.\n" +
|
|
1468
|
-
"- If a final PDF was produced, publish it with set_output_document.\n" +
|
|
1469
|
-
"- If no PDF was produced, clearly explain why.";
|
|
1470
|
-
}
|
|
1471
|
-
__decorate([
|
|
1472
|
-
prop({
|
|
1473
|
-
type: "language_model",
|
|
1474
|
-
default: {
|
|
1475
|
-
type: "language_model",
|
|
1476
|
-
provider: "empty",
|
|
1477
|
-
id: "",
|
|
1478
|
-
name: "",
|
|
1479
|
-
path: null,
|
|
1480
|
-
supported_tasks: []
|
|
1481
|
-
},
|
|
1482
|
-
title: "Model",
|
|
1483
|
-
description: "Model used for PDF task planning and execution reasoning."
|
|
1484
|
-
})
|
|
1485
|
-
], PdfLibAgentNode.prototype, "model", void 0);
|
|
1486
|
-
__decorate([
|
|
1487
|
-
prop({
|
|
1488
|
-
type: "document",
|
|
1489
|
-
default: {
|
|
1490
|
-
type: "document",
|
|
1491
|
-
uri: "",
|
|
1492
|
-
asset_id: null,
|
|
1493
|
-
data: null,
|
|
1494
|
-
metadata: null
|
|
1495
|
-
},
|
|
1496
|
-
title: "Document",
|
|
1497
|
-
description: "Optional PDF/document input for transformation or analysis."
|
|
1498
|
-
})
|
|
1499
|
-
], PdfLibAgentNode.prototype, "document", void 0);
|
|
1500
|
-
__decorate([
|
|
1501
|
-
prop({
|
|
1502
|
-
type: "str",
|
|
1503
|
-
default: "",
|
|
1504
|
-
title: "Prompt",
|
|
1505
|
-
description: "Prompt describing the PDF processing task."
|
|
1506
|
-
})
|
|
1507
|
-
], PdfLibAgentNode.prototype, "prompt", void 0);
|
|
1508
|
-
__decorate([
|
|
1509
|
-
prop({
|
|
1510
|
-
type: "int",
|
|
1511
|
-
default: 300,
|
|
1512
|
-
title: "Timeout Seconds",
|
|
1513
|
-
description: "Maximum runtime for agent execution.",
|
|
1514
|
-
min: 1,
|
|
1515
|
-
max: 3600
|
|
1516
|
-
})
|
|
1517
|
-
], PdfLibAgentNode.prototype, "timeout_seconds", void 0);
|
|
1518
|
-
__decorate([
|
|
1519
|
-
prop({
|
|
1520
|
-
type: "int",
|
|
1521
|
-
default: 220000,
|
|
1522
|
-
title: "Max Output Chars",
|
|
1523
|
-
description: "Maximum serialized output chars before truncation.",
|
|
1524
|
-
min: 1000,
|
|
1525
|
-
max: 2000000
|
|
1526
|
-
})
|
|
1527
|
-
], PdfLibAgentNode.prototype, "max_output_chars", void 0);
|
|
1528
|
-
// ---------------------------------------------------------------------------
|
|
1529
|
-
// PptxSkill
|
|
1530
|
-
// ---------------------------------------------------------------------------
|
|
1531
|
-
export class PptxAgentNode extends ToolAgentNode {
|
|
1532
|
-
static nodeType = "nodetool.agents.PptxAgent";
|
|
1533
|
-
static title = "PPTX Agent";
|
|
1534
|
-
static description = "Prompt-driven PowerPoint generation skill with PptxGenJS.\n skills, pptx, powerpoint, pptxgenjs, slides";
|
|
1535
|
-
static metadataOutputTypes = {
|
|
1536
|
-
document: "document",
|
|
1537
|
-
text: "str"
|
|
1538
|
-
};
|
|
1539
|
-
static _outputSinkConfig = { document: "set_output_document" };
|
|
1540
|
-
static _systemPrompt = "You are a PptxGenJS specialist for creating and editing .pptx presentations.\n\n" +
|
|
1541
|
-
"Execution policy:\n" +
|
|
1542
|
-
"1) Use execute_bash to run Node.js scripts and shell commands.\n" +
|
|
1543
|
-
"2) Keep outputs workspace-relative.\n" +
|
|
1544
|
-
"3) If you produce a final PPTX, call set_output_document with its path.\n" +
|
|
1545
|
-
"4) Return concise status and key file paths.\n\n" +
|
|
1546
|
-
"PptxGenJS fundamentals:\n" +
|
|
1547
|
-
"- Use fresh pptxgen() instance per presentation.\n" +
|
|
1548
|
-
"- Common layouts: LAYOUT_16x9 (10x5.625), LAYOUT_16x10, LAYOUT_4x3, LAYOUT_WIDE.\n" +
|
|
1549
|
-
"- Coordinates are inches.\n" +
|
|
1550
|
-
"- Text supports rich runs, bullets, breakLine, align/valign, font styling.\n" +
|
|
1551
|
-
"- Use charSpacing (not letterSpacing).\n" +
|
|
1552
|
-
"- Use margin: 0 when precise alignment with shapes/icons is required.\n" +
|
|
1553
|
-
"- Bullets: use bullet: true; never insert unicode bullet characters manually.\n" +
|
|
1554
|
-
"- For multi-line runs in arrays, set breakLine: true between lines.\n" +
|
|
1555
|
-
"- Avoid lineSpacing with bullets; prefer paraSpaceAfter.\n" +
|
|
1556
|
-
"- Shapes/charts/tables/images are supported, including shadows and transparency.\n" +
|
|
1557
|
-
"- Image sources: path/url/base64; use sizing contain/cover/crop patterns.\n" +
|
|
1558
|
-
"- For crisp icons, render high-res SVG->PNG then place with addImage.\n" +
|
|
1559
|
-
"- Slide masters can define reusable placeholders/background objects.\n\n" +
|
|
1560
|
-
"Critical pitfalls to avoid:\n" +
|
|
1561
|
-
"- NEVER include '#' in hex colors. Use 'FF0000', not '#FF0000'.\n" +
|
|
1562
|
-
"- NEVER use 8-char hex for opacity in colors (e.g. 00000020). Use opacity field.\n" +
|
|
1563
|
-
"- Shadow offset must be non-negative.\n" +
|
|
1564
|
-
"- Do not reuse option objects across calls because PptxGenJS may mutate them.\n" +
|
|
1565
|
-
"- Do not rely on RECTANGLE overlays to hide rounded corners on ROUNDED_RECTANGLE.\n\n" +
|
|
1566
|
-
"Example baseline workflow:\n" +
|
|
1567
|
-
"- Create script file (e.g. scripts/build_pptx.js) using pptxgenjs.\n" +
|
|
1568
|
-
"- Add slides/text/shapes/tables/charts/images as requested.\n" +
|
|
1569
|
-
"- pres.writeFile({ fileName: 'out/deck.pptx' }).\n" +
|
|
1570
|
-
"- Call set_output_document with out/deck.pptx.";
|
|
1571
|
-
}
|
|
1572
|
-
__decorate([
|
|
1573
|
-
prop({
|
|
1574
|
-
type: "language_model",
|
|
1575
|
-
default: {
|
|
1576
|
-
type: "language_model",
|
|
1577
|
-
provider: "empty",
|
|
1578
|
-
id: "",
|
|
1579
|
-
name: "",
|
|
1580
|
-
path: null,
|
|
1581
|
-
supported_tasks: []
|
|
1582
|
-
},
|
|
1583
|
-
title: "Model",
|
|
1584
|
-
description: "Model used for PPTX planning and generation reasoning."
|
|
1585
|
-
})
|
|
1586
|
-
], PptxAgentNode.prototype, "model", void 0);
|
|
1587
|
-
__decorate([
|
|
1588
|
-
prop({
|
|
1589
|
-
type: "document",
|
|
1590
|
-
default: {
|
|
1591
|
-
type: "document",
|
|
1592
|
-
uri: "",
|
|
1593
|
-
asset_id: null,
|
|
1594
|
-
data: null,
|
|
1595
|
-
metadata: null
|
|
1596
|
-
},
|
|
1597
|
-
title: "Document",
|
|
1598
|
-
description: "Optional source PPTX/document input."
|
|
1599
|
-
})
|
|
1600
|
-
], PptxAgentNode.prototype, "document", void 0);
|
|
1601
|
-
__decorate([
|
|
1602
|
-
prop({
|
|
1603
|
-
type: "str",
|
|
1604
|
-
default: "",
|
|
1605
|
-
title: "Prompt",
|
|
1606
|
-
description: "Prompt describing PPTX task."
|
|
1607
|
-
})
|
|
1608
|
-
], PptxAgentNode.prototype, "prompt", void 0);
|
|
1609
|
-
__decorate([
|
|
1610
|
-
prop({
|
|
1611
|
-
type: "int",
|
|
1612
|
-
default: 300,
|
|
1613
|
-
title: "Timeout Seconds",
|
|
1614
|
-
description: "Maximum runtime for agent execution.",
|
|
1615
|
-
min: 1,
|
|
1616
|
-
max: 3600
|
|
1617
|
-
})
|
|
1618
|
-
], PptxAgentNode.prototype, "timeout_seconds", void 0);
|
|
1619
|
-
__decorate([
|
|
1620
|
-
prop({
|
|
1621
|
-
type: "int",
|
|
1622
|
-
default: 220000,
|
|
1623
|
-
title: "Max Output Chars",
|
|
1624
|
-
description: "Maximum serialized output chars before truncation.",
|
|
1625
|
-
min: 1000,
|
|
1626
|
-
max: 2000000
|
|
1627
|
-
})
|
|
1628
|
-
], PptxAgentNode.prototype, "max_output_chars", void 0);
|
|
1629
|
-
// ---------------------------------------------------------------------------
|
|
1630
|
-
// SpreadsheetSkill
|
|
1631
|
-
// ---------------------------------------------------------------------------
|
|
1632
|
-
export class SpreadsheetAgentNode extends ToolAgentNode {
|
|
1633
|
-
static nodeType = "nodetool.agents.SpreadsheetAgent";
|
|
1634
|
-
static title = "Spreadsheet Agent";
|
|
1635
|
-
static description = "Prompt-driven spreadsheet skill for CSV/XLSX processing.\n skills, spreadsheet, csv, xlsx, tabular";
|
|
1636
|
-
static metadataOutputTypes = {
|
|
1637
|
-
text: "str"
|
|
1638
|
-
};
|
|
1639
|
-
static _systemPrompt = "You are a spreadsheet and tabular data specialist. Use execute_bash for transformations " +
|
|
1640
|
-
"using tools like Python/pandas, csvkit, or shell utilities. Preserve data fidelity and " +
|
|
1641
|
-
"call out schema/column assumptions before applying formulas or joins. " +
|
|
1642
|
-
"Return concise summaries plus output file paths for generated tables.";
|
|
1643
|
-
}
|
|
1644
|
-
__decorate([
|
|
1645
|
-
prop({
|
|
1646
|
-
type: "language_model",
|
|
1647
|
-
default: {
|
|
1648
|
-
type: "language_model",
|
|
1649
|
-
provider: "empty",
|
|
1650
|
-
id: "",
|
|
1651
|
-
name: "",
|
|
1652
|
-
path: null,
|
|
1653
|
-
supported_tasks: []
|
|
1654
|
-
},
|
|
1655
|
-
title: "Model",
|
|
1656
|
-
description: "Model used for task planning and execution reasoning."
|
|
1657
|
-
})
|
|
1658
|
-
], SpreadsheetAgentNode.prototype, "model", void 0);
|
|
1659
|
-
__decorate([
|
|
1660
|
-
prop({
|
|
1661
|
-
type: "str",
|
|
1662
|
-
default: "",
|
|
1663
|
-
title: "Prompt",
|
|
1664
|
-
description: "Prompt describing the requested task."
|
|
1665
|
-
})
|
|
1666
|
-
], SpreadsheetAgentNode.prototype, "prompt", void 0);
|
|
1667
|
-
__decorate([
|
|
1668
|
-
prop({
|
|
1669
|
-
type: "int",
|
|
1670
|
-
default: 180,
|
|
1671
|
-
title: "Timeout Seconds",
|
|
1672
|
-
description: "Maximum runtime for agent execution.",
|
|
1673
|
-
min: 1,
|
|
1674
|
-
max: 3600
|
|
1675
|
-
})
|
|
1676
|
-
], SpreadsheetAgentNode.prototype, "timeout_seconds", void 0);
|
|
1677
|
-
__decorate([
|
|
1678
|
-
prop({
|
|
1679
|
-
type: "int",
|
|
1680
|
-
default: 200000,
|
|
1681
|
-
title: "Max Output Chars",
|
|
1682
|
-
description: "Maximum serialized output chars before truncation.",
|
|
1683
|
-
min: 1000,
|
|
1684
|
-
max: 2000000
|
|
1685
|
-
})
|
|
1686
|
-
], SpreadsheetAgentNode.prototype, "max_output_chars", void 0);
|
|
1687
|
-
// ---------------------------------------------------------------------------
|
|
1688
|
-
// VectorStoreSkill
|
|
1689
|
-
// ---------------------------------------------------------------------------
|
|
1690
|
-
export class VectorStoreAgentNode extends ToolAgentNode {
|
|
1691
|
-
static nodeType = "nodetool.agents.VectorStoreAgent";
|
|
1692
|
-
static title = "Vector Store Agent";
|
|
1693
|
-
static description = "Prompt-driven vector store skill for indexing and similarity search workflows.\n skills, vectorstore, embeddings, rag, retrieval";
|
|
1694
|
-
static metadataOutputTypes = {
|
|
1695
|
-
text: "str"
|
|
1696
|
-
};
|
|
1697
|
-
static _systemPrompt = "You are a vector retrieval specialist. Use execute_bash to run embedding/indexing/search " +
|
|
1698
|
-
"operations with local or remote vector stores. Be explicit about embedding model, chunking, " +
|
|
1699
|
-
"distance metric, and top-k parameters. Ground retrieval quality claims in measurable outputs.";
|
|
1700
|
-
}
|
|
1701
|
-
__decorate([
|
|
1702
|
-
prop({
|
|
1703
|
-
type: "language_model",
|
|
1704
|
-
default: {
|
|
1705
|
-
type: "language_model",
|
|
1706
|
-
provider: "empty",
|
|
1707
|
-
id: "",
|
|
1708
|
-
name: "",
|
|
1709
|
-
path: null,
|
|
1710
|
-
supported_tasks: []
|
|
1711
|
-
},
|
|
1712
|
-
title: "Model",
|
|
1713
|
-
description: "Model used for task planning and execution reasoning."
|
|
1714
|
-
})
|
|
1715
|
-
], VectorStoreAgentNode.prototype, "model", void 0);
|
|
1716
|
-
__decorate([
|
|
1717
|
-
prop({
|
|
1718
|
-
type: "str",
|
|
1719
|
-
default: "",
|
|
1720
|
-
title: "Prompt",
|
|
1721
|
-
description: "Prompt describing the requested task."
|
|
1722
|
-
})
|
|
1723
|
-
], VectorStoreAgentNode.prototype, "prompt", void 0);
|
|
1724
|
-
__decorate([
|
|
1725
|
-
prop({
|
|
1726
|
-
type: "int",
|
|
1727
|
-
default: 180,
|
|
1728
|
-
title: "Timeout Seconds",
|
|
1729
|
-
description: "Maximum runtime for agent execution.",
|
|
1730
|
-
min: 1,
|
|
1731
|
-
max: 3600
|
|
1732
|
-
})
|
|
1733
|
-
], VectorStoreAgentNode.prototype, "timeout_seconds", void 0);
|
|
1734
|
-
__decorate([
|
|
1735
|
-
prop({
|
|
1736
|
-
type: "int",
|
|
1737
|
-
default: 200000,
|
|
1738
|
-
title: "Max Output Chars",
|
|
1739
|
-
description: "Maximum serialized output chars before truncation.",
|
|
1740
|
-
min: 1000,
|
|
1741
|
-
max: 2000000
|
|
1742
|
-
})
|
|
1743
|
-
], VectorStoreAgentNode.prototype, "max_output_chars", void 0);
|
|
1744
|
-
// ---------------------------------------------------------------------------
|
|
1745
|
-
// YtDlpDownloaderSkill
|
|
1746
|
-
// ---------------------------------------------------------------------------
|
|
1747
|
-
export class YtDlpDownloaderAgentNode extends ToolAgentNode {
|
|
1748
|
-
static nodeType = "nodetool.agents.YtDlpDownloaderAgent";
|
|
1749
|
-
static title = "yt-dlp Downloader Agent";
|
|
1750
|
-
static description = "Download videos from YouTube/Bilibili/Twitter and other sites via yt-dlp.\n skills, media, yt-dlp, downloader, youtube, bilibili, twitter";
|
|
1751
|
-
static metadataOutputTypes = {
|
|
1752
|
-
video: "video",
|
|
1753
|
-
text: "str"
|
|
1754
|
-
};
|
|
1755
|
-
static requiredRuntimes = ["yt-dlp", "ffmpeg"];
|
|
1756
|
-
static _outputSinkConfig = { video: "set_output_video" };
|
|
1757
|
-
static _systemPrompt = "You are yt-dlp-downloader.\n" +
|
|
1758
|
-
"Goal: download web videos with yt-dlp and publish the resulting video file path.\n\n" +
|
|
1759
|
-
"Workflow:\n" +
|
|
1760
|
-
"1) Verify prerequisites with shell commands:\n" +
|
|
1761
|
-
" - which yt-dlp || echo 'yt-dlp not installed. Install with: pip install yt-dlp'\n" +
|
|
1762
|
-
" - which ffmpeg || echo 'ffmpeg not installed. Install with: brew install ffmpeg'\n" +
|
|
1763
|
-
"2) If URL is YouTube, prefer --cookies-from-browser chrome to avoid 403.\n" +
|
|
1764
|
-
"3) Build yt-dlp command matching request (download/extract/subtitles/quality).\n" +
|
|
1765
|
-
"4) Use execute_bash for all commands.\n" +
|
|
1766
|
-
"5) Handle failures:\n" +
|
|
1767
|
-
" - 403: retry with --cookies-from-browser chrome\n" +
|
|
1768
|
-
" - unavailable format: use -F, then choose a format id\n" +
|
|
1769
|
-
"6) Final step is mandatory: call set_output_video with the final video file path.\n\n" +
|
|
1770
|
-
"Scope boundary:\n" +
|
|
1771
|
-
"- This skill is for yt-dlp downloading tasks only.\n" +
|
|
1772
|
-
"- For standalone ffmpeg editing/transcoding workflows, use the dedicated FFmpeg Skill.\n\n" +
|
|
1773
|
-
"Output rules:\n" +
|
|
1774
|
-
"- Keep response concise and include final save location.\n" +
|
|
1775
|
-
"- Always save outputs under workspace-relative output_dir.\n" +
|
|
1776
|
-
"- If no video file is produced, clearly explain why.";
|
|
1777
|
-
}
|
|
1778
|
-
__decorate([
|
|
1779
|
-
prop({
|
|
1780
|
-
type: "language_model",
|
|
1781
|
-
default: {
|
|
1782
|
-
type: "language_model",
|
|
1783
|
-
provider: "empty",
|
|
1784
|
-
id: "",
|
|
1785
|
-
name: "",
|
|
1786
|
-
path: null,
|
|
1787
|
-
supported_tasks: []
|
|
1788
|
-
},
|
|
1789
|
-
title: "Model",
|
|
1790
|
-
description: "Model used for yt-dlp planning and execution reasoning."
|
|
1791
|
-
})
|
|
1792
|
-
], YtDlpDownloaderAgentNode.prototype, "model", void 0);
|
|
1793
|
-
__decorate([
|
|
1794
|
-
prop({
|
|
1795
|
-
type: "str",
|
|
1796
|
-
default: "",
|
|
1797
|
-
title: "Prompt",
|
|
1798
|
-
description: "Prompt describing what to download."
|
|
1799
|
-
})
|
|
1800
|
-
], YtDlpDownloaderAgentNode.prototype, "prompt", void 0);
|
|
1801
|
-
__decorate([
|
|
1802
|
-
prop({
|
|
1803
|
-
type: "str",
|
|
1804
|
-
default: "",
|
|
1805
|
-
title: "Url",
|
|
1806
|
-
description: "Optional explicit video URL to download."
|
|
1807
|
-
})
|
|
1808
|
-
], YtDlpDownloaderAgentNode.prototype, "url", void 0);
|
|
1809
|
-
__decorate([
|
|
1810
|
-
prop({
|
|
1811
|
-
type: "str",
|
|
1812
|
-
default: "downloads/yt-dlp",
|
|
1813
|
-
title: "Output Dir",
|
|
1814
|
-
description: "Workspace-relative output directory for downloads."
|
|
1815
|
-
})
|
|
1816
|
-
], YtDlpDownloaderAgentNode.prototype, "output_dir", void 0);
|
|
1817
|
-
__decorate([
|
|
1818
|
-
prop({
|
|
1819
|
-
type: "int",
|
|
1820
|
-
default: 300,
|
|
1821
|
-
title: "Timeout Seconds",
|
|
1822
|
-
description: "Maximum runtime for agent execution.",
|
|
1823
|
-
min: 1,
|
|
1824
|
-
max: 3600
|
|
1825
|
-
})
|
|
1826
|
-
], YtDlpDownloaderAgentNode.prototype, "timeout_seconds", void 0);
|
|
1827
|
-
__decorate([
|
|
1828
|
-
prop({
|
|
1829
|
-
type: "int",
|
|
1830
|
-
default: 220000,
|
|
1831
|
-
title: "Max Output Chars",
|
|
1832
|
-
description: "Maximum serialized output chars before truncation.",
|
|
1833
|
-
min: 1000,
|
|
1834
|
-
max: 2000000
|
|
1835
|
-
})
|
|
1836
|
-
], YtDlpDownloaderAgentNode.prototype, "max_output_chars", void 0);
|
|
1837
|
-
// ---------------------------------------------------------------------------
|
|
1838
|
-
// Export
|
|
1839
|
-
// ---------------------------------------------------------------------------
|
|
1840
|
-
export const TOOL_AGENT_NODES = [
|
|
1841
|
-
ShellAgentNode,
|
|
1842
|
-
BrowserAgentNode,
|
|
1843
|
-
SQLiteAgentNode,
|
|
1844
|
-
SupabaseAgentNode,
|
|
1845
|
-
DocumentAgentNode,
|
|
1846
|
-
DocxAgentNode,
|
|
1847
|
-
EmailAgentNode,
|
|
1848
|
-
FfmpegAgentNode,
|
|
1849
|
-
FilesystemAgentNode,
|
|
1850
|
-
GitAgentNode,
|
|
1851
|
-
HtmlAgentNode,
|
|
1852
|
-
HttpApiAgentNode,
|
|
1853
|
-
ImageAgentNode,
|
|
1854
|
-
MediaAgentNode,
|
|
1855
|
-
PdfLibAgentNode,
|
|
1856
|
-
PptxAgentNode,
|
|
1857
|
-
SpreadsheetAgentNode,
|
|
1858
|
-
VectorStoreAgentNode,
|
|
1859
|
-
YtDlpDownloaderAgentNode
|
|
1860
|
-
];
|
|
1861
|
-
//# sourceMappingURL=tool-agents.js.map
|