@nodetool-ai/node-sdk 0.8.4-a24.2 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.nodetool-build-stamp +1 -1
- package/dist/_sandbox/README.md +176 -0
- package/dist/_sandbox/sandbox-aws/SKILL.md +98 -0
- package/dist/_sandbox/sandbox-aws/package.json +40 -0
- package/dist/_sandbox/sandbox-chrono/SKILL.md +39 -0
- package/dist/_sandbox/sandbox-chrono/package.json +40 -0
- package/dist/_sandbox/sandbox-color/SKILL.md +35 -0
- package/dist/_sandbox/sandbox-color/package.json +43 -0
- package/dist/_sandbox/sandbox-csv/SKILL.md +50 -0
- package/dist/_sandbox/sandbox-csv/package.json +39 -0
- package/dist/_sandbox/sandbox-dates/SKILL.md +47 -0
- package/dist/_sandbox/sandbox-dates/package.json +41 -0
- package/dist/_sandbox/sandbox-decimal/SKILL.md +36 -0
- package/dist/_sandbox/sandbox-decimal/package.json +43 -0
- package/dist/_sandbox/sandbox-diff/SKILL.md +36 -0
- package/dist/_sandbox/sandbox-diff/package.json +39 -0
- package/dist/_sandbox/sandbox-docx/SKILL.md +53 -0
- package/dist/_sandbox/sandbox-docx/package.json +40 -0
- package/dist/_sandbox/sandbox-dsl/SKILL.md +137 -0
- package/dist/_sandbox/sandbox-dsl/package.json +413 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/authoring.js +382 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/core.js +382 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/gemini.audio.js +12 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/gemini.image.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/gemini.text.js +12 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/gemini.video.js +12 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/index.js +149 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/kie.dynamic_schema.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.audio.js +68 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.browser.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.charts.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.comfy.js +16 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.grid.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.image.channel.js +12 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.image.color.js +32 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.image.color_grading.js +44 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.image.draw.js +36 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.image.effects.js +24 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.image.enhance.js +28 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.image.filter.js +64 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.image.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.image.keyer.js +12 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.image.mask.js +16 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.image.warp.js +36 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.pdf.js +32 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.sqlite.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.stable_diffusion_cpp.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.svg.js +12 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/lib.video.download.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/messaging.discord.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/messaging.telegram.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/mistral.embeddings.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/mistral.text.js +12 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/mistral.vision.js +12 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.agents.js +32 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.audio.js +104 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.audio.realtime.js +28 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.audio.synth.js +40 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.blender.js +28 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.code.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.compare.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.constant.js +132 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.control.js +96 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.creative.js +24 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.data.js +12 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.document.js +16 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.entity.js +16 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.fake.js +12 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.game.js +36 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.generators.js +24 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.image.js +120 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.input.js +140 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.manimgx.js +16 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.model3d.js +76 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.output.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.script.js +28 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.sketch.js +16 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.storyboard.js +32 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.text.js +56 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.timeline.js +24 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.triggers.js +24 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.variable.js +12 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.video.js +136 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.workflows.app_node.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.workflows.base_node.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.workflows.subgraph.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/nodetool.workflows.workflow_node.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/openai.agents.js +16 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/openai.audio.js +16 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/openai.image.js +16 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/openai.text.js +16 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/vector.js +56 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/whisper_cpp.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/xai.image.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/xai.text.js +12 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/generated/xai.vision.js +8 -0
- package/dist/_sandbox/sandbox-dsl/sandbox/index.js +13 -0
- package/dist/_sandbox/sandbox-dsl/scripts/build.mjs +116 -0
- package/dist/_sandbox/sandbox-epub/SKILL.md +61 -0
- package/dist/_sandbox/sandbox-epub/package.json +40 -0
- package/dist/_sandbox/sandbox-exif/SKILL.md +30 -0
- package/dist/_sandbox/sandbox-exif/package.json +40 -0
- package/dist/_sandbox/sandbox-expr/SKILL.md +28 -0
- package/dist/_sandbox/sandbox-expr/package.json +40 -0
- package/dist/_sandbox/sandbox-fabric/SKILL.md +113 -0
- package/dist/_sandbox/sandbox-fabric/package.json +40 -0
- package/dist/_sandbox/sandbox-flow/SKILL.md +131 -0
- package/dist/_sandbox/sandbox-flow/package.json +411 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/gemini.audio.js +12 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/gemini.image.js +8 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/gemini.text.js +12 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/gemini.video.js +12 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/kie.dynamic_schema.js +8 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.audio.js +68 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.browser.js +8 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.charts.js +8 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.comfy.js +25 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.grid.js +8 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.image.channel.js +12 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.image.color.js +32 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.image.color_grading.js +44 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.image.draw.js +36 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.image.effects.js +24 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.image.enhance.js +28 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.image.filter.js +64 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.image.js +8 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.image.keyer.js +12 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.image.mask.js +16 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.image.warp.js +36 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.pdf.js +32 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.sqlite.js +8 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.stable_diffusion_cpp.js +8 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.svg.js +12 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/lib.video.download.js +8 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/messaging.discord.js +11 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/messaging.telegram.js +11 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/mistral.embeddings.js +8 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/mistral.text.js +12 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/mistral.vision.js +12 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.agents.js +41 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.audio.js +110 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.audio.realtime.js +46 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.audio.synth.js +67 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.blender.js +28 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.code.js +11 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.compare.js +8 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.constant.js +132 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.control.js +165 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.creative.js +27 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.data.js +18 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.document.js +19 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.entity.js +19 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.fake.js +12 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.game.js +39 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.generators.js +30 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.image.js +126 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.input.js +143 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.manimgx.js +16 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.model3d.js +76 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.output.js +11 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.script.js +28 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.sketch.js +16 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.storyboard.js +35 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.text.js +68 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.timeline.js +24 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.triggers.js +33 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.variable.js +15 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.video.js +145 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.workflows.app_node.js +11 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.workflows.base_node.js +8 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.workflows.subgraph.js +11 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/nodetool.workflows.workflow_node.js +11 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/openai.agents.js +25 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/openai.audio.js +16 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/openai.image.js +16 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/openai.text.js +16 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/vector.js +56 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/whisper_cpp.js +11 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/xai.image.js +8 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/xai.text.js +12 -0
- package/dist/_sandbox/sandbox-flow/sandbox/generated/xai.vision.js +8 -0
- package/dist/_sandbox/sandbox-flow/sandbox/guest-core.js +35 -0
- package/dist/_sandbox/sandbox-flow/sandbox/index.js +10 -0
- package/dist/_sandbox/sandbox-flow/scripts/build.mjs +120 -0
- package/dist/_sandbox/sandbox-game/SKILL.md +116 -0
- package/dist/_sandbox/sandbox-game/package.json +36 -0
- package/dist/_sandbox/sandbox-game/sandbox/index.js +208 -0
- package/dist/_sandbox/sandbox-gif/SKILL.md +36 -0
- package/dist/_sandbox/sandbox-gif/package.json +43 -0
- package/dist/_sandbox/sandbox-html/SKILL.md +107 -0
- package/dist/_sandbox/sandbox-html/package.json +40 -0
- package/dist/_sandbox/sandbox-ics/SKILL.md +41 -0
- package/dist/_sandbox/sandbox-ics/package.json +40 -0
- package/dist/_sandbox/sandbox-jmespath/SKILL.md +26 -0
- package/dist/_sandbox/sandbox-jmespath/package.json +43 -0
- package/dist/_sandbox/sandbox-mammoth/SKILL.md +46 -0
- package/dist/_sandbox/sandbox-mammoth/package.json +41 -0
- package/dist/_sandbox/sandbox-markdown/SKILL.md +123 -0
- package/dist/_sandbox/sandbox-markdown/package.json +41 -0
- package/dist/_sandbox/sandbox-notion/SKILL.md +101 -0
- package/dist/_sandbox/sandbox-notion/package.json +38 -0
- package/dist/_sandbox/sandbox-ocr/SKILL.md +47 -0
- package/dist/_sandbox/sandbox-ocr/package.json +40 -0
- package/dist/_sandbox/sandbox-pdf/SKILL.md +47 -0
- package/dist/_sandbox/sandbox-pdf/package.json +39 -0
- package/dist/_sandbox/sandbox-pdflib/SKILL.md +56 -0
- package/dist/_sandbox/sandbox-pdflib/package.json +38 -0
- package/dist/_sandbox/sandbox-pptx/SKILL.md +42 -0
- package/dist/_sandbox/sandbox-pptx/package.json +40 -0
- package/dist/_sandbox/sandbox-pptxgen/SKILL.md +49 -0
- package/dist/_sandbox/sandbox-pptxgen/package.json +38 -0
- package/dist/_sandbox/sandbox-qr/SKILL.md +43 -0
- package/dist/_sandbox/sandbox-qr/package.json +42 -0
- package/dist/_sandbox/sandbox-rrule/SKILL.md +37 -0
- package/dist/_sandbox/sandbox-rrule/package.json +43 -0
- package/dist/_sandbox/sandbox-stats/SKILL.md +42 -0
- package/dist/_sandbox/sandbox-stats/package.json +43 -0
- package/dist/_sandbox/sandbox-subtitle/SKILL.md +38 -0
- package/dist/_sandbox/sandbox-subtitle/package.json +41 -0
- package/dist/_sandbox/sandbox-supabase/SKILL.md +108 -0
- package/dist/_sandbox/sandbox-supabase/package.json +39 -0
- package/dist/_sandbox/sandbox-tfjs/SKILL.md +76 -0
- package/dist/_sandbox/sandbox-tfjs/package.json +42 -0
- package/dist/_sandbox/sandbox-timeline/SKILL.md +647 -0
- package/dist/_sandbox/sandbox-timeline/package.json +46 -0
- package/dist/_sandbox/sandbox-timeline/sandbox/charts.js +356 -0
- package/dist/_sandbox/sandbox-timeline/sandbox/components.js +171 -0
- package/dist/_sandbox/sandbox-timeline/sandbox/index.d.ts +700 -0
- package/dist/_sandbox/sandbox-timeline/sandbox/index.js +1658 -0
- package/dist/_sandbox/sandbox-tokens/SKILL.md +46 -0
- package/dist/_sandbox/sandbox-tokens/package.json +40 -0
- package/dist/_sandbox/sandbox-twilio/SKILL.md +93 -0
- package/dist/_sandbox/sandbox-twilio/package.json +39 -0
- package/dist/_sandbox/sandbox-xlsx/SKILL.md +74 -0
- package/dist/_sandbox/sandbox-xlsx/package.json +40 -0
- package/dist/_sandbox/sandbox-xml/SKILL.md +36 -0
- package/dist/_sandbox/sandbox-xml/package.json +40 -0
- package/dist/_sandbox/sandbox-yaml/SKILL.md +48 -0
- package/dist/_sandbox/sandbox-yaml/package.json +41 -0
- package/dist/_sandbox/sandbox-zip/SKILL.md +54 -0
- package/dist/_sandbox/sandbox-zip/package.json +40 -0
- package/dist/code-node-validation.d.ts +2 -0
- package/dist/code-node-validation.d.ts.map +1 -1
- package/dist/code-node-validation.js +1 -1
- package/dist/code-node-validation.js.map +1 -1
- package/dist/pack-loader.d.ts +1 -0
- package/dist/pack-loader.d.ts.map +1 -1
- package/dist/pack-loader.js +1 -0
- package/dist/pack-loader.js.map +1 -1
- package/dist/sandbox-catalog-host.js +1 -1
- package/dist/sandbox-catalog-host.js.map +1 -1
- package/dist/sandbox-pack-discovery.d.ts +3 -0
- package/dist/sandbox-pack-discovery.d.ts.map +1 -1
- package/dist/sandbox-pack-discovery.js +7 -3
- package/dist/sandbox-pack-discovery.js.map +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sandbox-expr
|
|
3
|
+
description: Evaluate a math formula without eval in a Code node or CodeAct action, with expr-eval running on the host
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Formulas in the sandbox
|
|
7
|
+
|
|
8
|
+
Specifier: `@nodetool-ai/sandbox-expr`. Import it at the top of the body.
|
|
9
|
+
|
|
10
|
+
The published expr-eval bundle trips the guest scanner, so this pack is a
|
|
11
|
+
**host module**.
|
|
12
|
+
|
|
13
|
+
## evaluate — formula plus variables
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import { evaluate } from "@nodetool-ai/sandbox-expr";
|
|
17
|
+
|
|
18
|
+
const value = await evaluate(inputs.formula, inputs.vars);
|
|
19
|
+
return { value };
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`inputs.formula` is a string such as `"2 * qty + fee"`. `inputs.vars` is
|
|
23
|
+
`{ qty: 3, fee: 1.5 }`.
|
|
24
|
+
|
|
25
|
+
## Gotchas
|
|
26
|
+
|
|
27
|
+
- **Not JavaScript.** `^` is power. Unknown names throw.
|
|
28
|
+
- **Do not use `eval`.** The guest deletes it. This pack is the formula path.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nodetool-ai/sandbox-expr",
|
|
3
|
+
"version": "0.8.4",
|
|
4
|
+
"description": "Evaluate a math expression without eval, inside the NodeTool sandbox, from expr-eval",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"nodetool": {
|
|
7
|
+
"apiVersion": 1,
|
|
8
|
+
"recommended": true,
|
|
9
|
+
"sandboxModules": [
|
|
10
|
+
{
|
|
11
|
+
"name": ".",
|
|
12
|
+
"kind": "host",
|
|
13
|
+
"host": "expr"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/nodetool-ai/nodetool.git",
|
|
20
|
+
"directory": "packages/sandbox-packs/sandbox-expr"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://nodetool.ai",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/nodetool-ai/nodetool/issues"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"SKILL.md"
|
|
31
|
+
],
|
|
32
|
+
"keywords": [
|
|
33
|
+
"nodetool",
|
|
34
|
+
"nodetool-sandbox-pack",
|
|
35
|
+
"sandbox",
|
|
36
|
+
"expression",
|
|
37
|
+
"formula",
|
|
38
|
+
"eval"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sandbox-fabric
|
|
3
|
+
description: Build, parse, and rasterize SVG with Fabric.js (renderSVG, loadSVG, render)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Fabric.js in the sandbox
|
|
7
|
+
|
|
8
|
+
Specifier: `@nodetool-ai/sandbox-fabric`. Import it at the top of the body.
|
|
9
|
+
|
|
10
|
+
## render — Canvas spec / JSON to image bytes
|
|
11
|
+
|
|
12
|
+
Renders a scene description (objects, dimensions, background color) to raster
|
|
13
|
+
image bytes (`Uint8Array`):
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import { render } from "@nodetool-ai/sandbox-fabric";
|
|
17
|
+
|
|
18
|
+
const imageBytes = await render({
|
|
19
|
+
width: 800,
|
|
20
|
+
height: 600,
|
|
21
|
+
backgroundColor: "#f8fafc",
|
|
22
|
+
objects: [
|
|
23
|
+
{
|
|
24
|
+
type: "rect",
|
|
25
|
+
left: 100,
|
|
26
|
+
top: 100,
|
|
27
|
+
width: 200,
|
|
28
|
+
height: 120,
|
|
29
|
+
fill: "#3b82f6",
|
|
30
|
+
rx: 10,
|
|
31
|
+
ry: 10
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: "textbox",
|
|
35
|
+
left: 120,
|
|
36
|
+
top: 140,
|
|
37
|
+
text: "NodeTool & Fabric.js",
|
|
38
|
+
fontSize: 20,
|
|
39
|
+
fill: "#ffffff"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}, { format: "png", multiplier: 1 });
|
|
43
|
+
|
|
44
|
+
return { image: imageBytes };
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## renderSVG — Canvas spec / JSON to SVG string
|
|
48
|
+
|
|
49
|
+
Renders a scene specification directly into an SVG string:
|
|
50
|
+
|
|
51
|
+
```js
|
|
52
|
+
import { renderSVG } from "@nodetool-ai/sandbox-fabric";
|
|
53
|
+
|
|
54
|
+
const svgString = await renderSVG({
|
|
55
|
+
width: 500,
|
|
56
|
+
height: 500,
|
|
57
|
+
backgroundColor: "#ffffff",
|
|
58
|
+
objects: [
|
|
59
|
+
{
|
|
60
|
+
type: "circle",
|
|
61
|
+
left: 250,
|
|
62
|
+
top: 250,
|
|
63
|
+
radius: 100,
|
|
64
|
+
fill: "#ef4444"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
return { svg: svgString };
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## toDataURL — Canvas spec to Data URL
|
|
73
|
+
|
|
74
|
+
Exports the scene as a base64 Data URL string:
|
|
75
|
+
|
|
76
|
+
```js
|
|
77
|
+
import { toDataURL } from "@nodetool-ai/sandbox-fabric";
|
|
78
|
+
|
|
79
|
+
const dataUrl = await toDataURL({
|
|
80
|
+
width: 400,
|
|
81
|
+
height: 300,
|
|
82
|
+
objects: [
|
|
83
|
+
{ type: "rect", left: 50, top: 50, width: 100, height: 100, fill: "green" }
|
|
84
|
+
]
|
|
85
|
+
}, { format: "png" });
|
|
86
|
+
|
|
87
|
+
return { dataUrl };
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## loadSVG — Parse SVG string into Fabric objects
|
|
91
|
+
|
|
92
|
+
Parses an SVG document into Fabric objects and canvas options:
|
|
93
|
+
|
|
94
|
+
```js
|
|
95
|
+
import { loadSVG, render } from "@nodetool-ai/sandbox-fabric";
|
|
96
|
+
|
|
97
|
+
const parsed = await loadSVG("<svg ...>...</svg>");
|
|
98
|
+
const imageBytes = await render({
|
|
99
|
+
width: 600,
|
|
100
|
+
height: 400,
|
|
101
|
+
objects: parsed.objects
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
return { image: imageBytes };
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Gotchas
|
|
108
|
+
|
|
109
|
+
- **Host execution.** Fabric.js depends on canvas and DOM APIs that do not exist
|
|
110
|
+
in the pure WebAssembly QuickJS guest. It runs on the host and passes plain
|
|
111
|
+
serializable data across the sandbox boundary.
|
|
112
|
+
- **Dimensions are bounded.** Canvas dimensions are clamped to a maximum of 8192
|
|
113
|
+
pixels to prevent excessive memory consumption.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nodetool-ai/sandbox-fabric",
|
|
3
|
+
"version": "0.8.4",
|
|
4
|
+
"description": "Build, parse, and rasterize SVG with Fabric.js (renderSVG, loadSVG, render)",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"nodetool": {
|
|
7
|
+
"apiVersion": 1,
|
|
8
|
+
"recommended": true,
|
|
9
|
+
"sandboxModules": [
|
|
10
|
+
{
|
|
11
|
+
"name": ".",
|
|
12
|
+
"kind": "host",
|
|
13
|
+
"host": "fabric"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/nodetool-ai/nodetool.git",
|
|
20
|
+
"directory": "packages/sandbox-packs/sandbox-fabric"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://nodetool.ai",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/nodetool-ai/nodetool/issues"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"SKILL.md"
|
|
31
|
+
],
|
|
32
|
+
"keywords": [
|
|
33
|
+
"nodetool",
|
|
34
|
+
"nodetool-sandbox-pack",
|
|
35
|
+
"sandbox",
|
|
36
|
+
"fabric",
|
|
37
|
+
"canvas",
|
|
38
|
+
"svg"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sandbox-flow
|
|
3
|
+
description: Call NodeTool nodes as typed async functions from sandbox code, one importable module per node namespace, with streaming and plain JavaScript control flow
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Calling nodes from the sandbox
|
|
7
|
+
|
|
8
|
+
Specifier: `@nodetool-ai/sandbox-flow`. Each node namespace is its own module —
|
|
9
|
+
`@nodetool-ai/sandbox-flow/nodetool.text`,
|
|
10
|
+
`@nodetool-ai/sandbox-flow/lib.audio`, and so on for all 69. Every node type is
|
|
11
|
+
a generated async function whose name and inputs come from the node's own
|
|
12
|
+
metadata, so a type this pack does not export has no import to resolve.
|
|
13
|
+
|
|
14
|
+
This is not the graph DSL. Nothing is built, saved, or scheduled: the call runs
|
|
15
|
+
the node and resolves to its outputs. `await` is the edge, a variable is the
|
|
16
|
+
wire, `Promise.all` is the fan-out, and `if`/`for`/`try` are themselves.
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
import { concat } from "@nodetool-ai/sandbox-flow/nodetool.text";
|
|
20
|
+
|
|
21
|
+
const r = await concat({ a: "hello ", b: "world" });
|
|
22
|
+
return r.output;
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
These examples are chat code actions, where `return` is the action's result.
|
|
26
|
+
In a Code node or a JS script document, `return` is control flow only: hand a
|
|
27
|
+
value on with `await output(name, value)` or stream it with `emit`. A script
|
|
28
|
+
document that returns its outputs fails, and a Code node accepts that old
|
|
29
|
+
contract only with a deprecation warning.
|
|
30
|
+
|
|
31
|
+
## Two imports, both required
|
|
32
|
+
|
|
33
|
+
1. `import { … } from "@nodetool-ai/sandbox-flow/<namespace>";` — the nodes.
|
|
34
|
+
2. `import "@nodetool-ai/sandbox-nodetool/flow";` — the capability module.
|
|
35
|
+
|
|
36
|
+
The second one is not decoration. The host mounts a capability module by
|
|
37
|
+
reading the **body's** static imports, and this pack's guest code calls into
|
|
38
|
+
`@nodetool-ai/sandbox-nodetool/flow`. Without the body-side import the facade
|
|
39
|
+
is never mounted and the pack's own import of it is refused by name.
|
|
40
|
+
|
|
41
|
+
```js
|
|
42
|
+
import "@nodetool-ai/sandbox-nodetool/flow";
|
|
43
|
+
import { concat } from "@nodetool-ai/sandbox-flow/nodetool.text";
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Streaming
|
|
47
|
+
|
|
48
|
+
A node that streams its output carries a `.stream` member; a one-shot node does
|
|
49
|
+
not, so the surface tells you which is which. Awaiting the plain call on a
|
|
50
|
+
streaming node still works — it drains the node and returns the last value per
|
|
51
|
+
slot.
|
|
52
|
+
|
|
53
|
+
```js
|
|
54
|
+
import "@nodetool-ai/sandbox-nodetool/flow";
|
|
55
|
+
import { agent } from "@nodetool-ai/sandbox-flow/nodetool.agents";
|
|
56
|
+
|
|
57
|
+
let text = "";
|
|
58
|
+
for await (const chunk of agent.stream({ prompt: "Summarize the file" })) {
|
|
59
|
+
text += chunk.chunk ?? "";
|
|
60
|
+
if (text.length > 2000) break; // closes the stream; the node stops
|
|
61
|
+
}
|
|
62
|
+
return text;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Breaking early releases the stream on the host. Read it to the end, or break —
|
|
66
|
+
both are fine; abandoning the loop object without either is what leaks.
|
|
67
|
+
|
|
68
|
+
A node written against the streaming-input contract streams `{slot, value}`
|
|
69
|
+
instead of partial outputs, one item per emission, and its inputs accept an
|
|
70
|
+
array wherever a single value goes:
|
|
71
|
+
|
|
72
|
+
```js
|
|
73
|
+
import { take } from "@nodetool-ai/sandbox-flow/nodetool.control";
|
|
74
|
+
|
|
75
|
+
const kept = [];
|
|
76
|
+
for await (const { slot, value } of take.stream({ input_item: [1, 2, 3], n: 2 })) {
|
|
77
|
+
if (slot === "output") kept.push(value);
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Arrays are the whole of streaming input in this version. An async iterable on
|
|
82
|
+
an input handle is not accepted.
|
|
83
|
+
|
|
84
|
+
## Errors
|
|
85
|
+
|
|
86
|
+
A node that fails rejects the call with its own error. There is no verdict
|
|
87
|
+
machinery and no per-node error stream — your `try`/`catch` is the supervisor,
|
|
88
|
+
and retry, fallback, and timeout are yours to write:
|
|
89
|
+
|
|
90
|
+
```js
|
|
91
|
+
import "@nodetool-ai/sandbox-nodetool/flow";
|
|
92
|
+
import { textToSpeech } from "@nodetool-ai/sandbox-flow/gemini.audio";
|
|
93
|
+
|
|
94
|
+
try {
|
|
95
|
+
return await textToSpeech({ text: draft });
|
|
96
|
+
} catch (error) {
|
|
97
|
+
return { error: String(error) };
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Fan-out
|
|
102
|
+
|
|
103
|
+
Concurrency is `Promise.all`, and it is real: the calls run at once.
|
|
104
|
+
|
|
105
|
+
```js
|
|
106
|
+
const summaries = await Promise.all(
|
|
107
|
+
documents.map((document) => summarizer({ text: document }))
|
|
108
|
+
);
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Nothing throttles this. A hundred items is a hundred concurrent model calls —
|
|
112
|
+
batch them yourself when that matters.
|
|
113
|
+
|
|
114
|
+
## The untyped root
|
|
115
|
+
|
|
116
|
+
`import { callNode } from "@nodetool-ai/sandbox-flow"` takes a node type as a
|
|
117
|
+
string and checks nothing until the host answers. Use it when the type is
|
|
118
|
+
decided at run time; otherwise import the namespace, where a wrong name is an
|
|
119
|
+
import error rather than a failed call.
|
|
120
|
+
|
|
121
|
+
## Gotchas
|
|
122
|
+
|
|
123
|
+
- **Inputs are values, not handles.** There is nothing to wire and no
|
|
124
|
+
`.output()` — the call returns the outputs record.
|
|
125
|
+
- **No graph comes out of this.** Nothing opens in the editor, validates, or
|
|
126
|
+
replays. When the artifact matters, build a graph with
|
|
127
|
+
`@nodetool-ai/sandbox-dsl` instead.
|
|
128
|
+
- **A missing property is the node's default**, exactly as in a graph run.
|
|
129
|
+
- **Names follow the node class**: `nodetool.text.Concat` is `concat`,
|
|
130
|
+
`nodetool.constant.Integer` is `integer`. Reserved words take a trailing
|
|
131
|
+
underscore (`if_`).
|