@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,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sandbox-pptxgen
|
|
3
|
+
description: Build PowerPoint files in a Code node or CodeAct action, with PptxGenJS running on the host
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PowerPoint writing in the sandbox
|
|
7
|
+
|
|
8
|
+
Specifier: `@nodetool-ai/sandbox-pptxgen`. Import it at the top of the body.
|
|
9
|
+
|
|
10
|
+
This pack **writes** PPTX files. To extract text from an existing deck, use
|
|
11
|
+
`@nodetool-ai/sandbox-pptx` instead.
|
|
12
|
+
|
|
13
|
+
## build — slides to PPTX bytes
|
|
14
|
+
|
|
15
|
+
Positions are **inches from the top-left**. A widescreen slide is 13.33×7.5.
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import { build } from "@nodetool-ai/sandbox-pptxgen";
|
|
19
|
+
|
|
20
|
+
const bytes = await build({
|
|
21
|
+
title: "Q3 Review",
|
|
22
|
+
author: "NodeTool",
|
|
23
|
+
slides: [
|
|
24
|
+
{
|
|
25
|
+
background: "#0f172a",
|
|
26
|
+
items: [
|
|
27
|
+
{ type: "text", x: 0.5, y: 0.4, w: 12, h: 1, text: "Q3 Review", fontSize: 36, color: "#ffffff", bold: true },
|
|
28
|
+
{ type: "shape", shape: "rect", x: 0.5, y: 1.6, w: 4, h: 0.15, fill: "#38bdf8" },
|
|
29
|
+
{ type: "image", x: 8, y: 2.5, w: 4, h: 3, data: inputs.chart }
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
await workspace.writeBytes("q3.pptx", bytes);
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Item types:
|
|
38
|
+
|
|
39
|
+
- `text` — `x`, `y`, `w`/`h` (or `width`/`height`), `text`, `fontSize`,
|
|
40
|
+
`color` (hex), `bold`, `align` (`left`/`center`/`right`)
|
|
41
|
+
- `image` — `x`, `y`, `w`/`h`, `data` (`Uint8Array` PNG or JPEG)
|
|
42
|
+
- `shape` — `shape` (PptxGenJS name, default `rect`), `x`, `y`, `w`/`h`,
|
|
43
|
+
`fill` (hex)
|
|
44
|
+
|
|
45
|
+
## Gotchas
|
|
46
|
+
|
|
47
|
+
- **Host module.** `build` is async and returns a `Uint8Array`.
|
|
48
|
+
- **At most 200 slides.**
|
|
49
|
+
- **Hex colors** may include a leading `#`.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nodetool-ai/sandbox-pptxgen",
|
|
3
|
+
"version": "0.8.4",
|
|
4
|
+
"description": "Build PowerPoint files inside the NodeTool sandbox, with PptxGenJS running on the host",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"nodetool": {
|
|
7
|
+
"apiVersion": 1,
|
|
8
|
+
"recommended": true,
|
|
9
|
+
"sandboxModules": [
|
|
10
|
+
{
|
|
11
|
+
"name": ".",
|
|
12
|
+
"kind": "host",
|
|
13
|
+
"host": "pptxgen"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/nodetool-ai/nodetool.git",
|
|
20
|
+
"directory": "packages/sandbox-packs/sandbox-pptxgen"
|
|
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
|
+
"pptx"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sandbox-qr
|
|
3
|
+
description: Encode text into a QR matrix or SVG inside a Code node or CodeAct action, with uqr running in the guest
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# QR codes in the sandbox
|
|
7
|
+
|
|
8
|
+
Specifier: `@nodetool-ai/sandbox-qr`. One module, the `uqr` root export.
|
|
9
|
+
Import it at the top of the body.
|
|
10
|
+
|
|
11
|
+
## encode — text to a QR matrix
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import { encode } from "@nodetool-ai/sandbox-qr";
|
|
15
|
+
|
|
16
|
+
const qr = encode(inputs.text);
|
|
17
|
+
return { size: qr.size, data: qr.data };
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
`data` is a boolean matrix (`true` is a dark module). `size` is the module count.
|
|
21
|
+
|
|
22
|
+
## encode — text to SVG
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { encode } from "@nodetool-ai/sandbox-qr";
|
|
26
|
+
|
|
27
|
+
const qr = encode(inputs.text);
|
|
28
|
+
const cells = [];
|
|
29
|
+
for (let y = 0; y < qr.size; y++) {
|
|
30
|
+
for (let x = 0; x < qr.size; x++) {
|
|
31
|
+
if (qr.data[y][x]) cells.push(`<rect x="${x}" y="${y}" width="1" height="1"/>`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${qr.size} ${qr.size}" shape-rendering="crispEdges">${cells.join("")}</svg>`;
|
|
35
|
+
return { svg, size: qr.size };
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Or pass the matrix to `@nodetool-ai/sandbox-fabric` if you already have that pack.
|
|
39
|
+
|
|
40
|
+
## Gotchas
|
|
41
|
+
|
|
42
|
+
- **Guest only.** No canvas, no PNG encoder. Build SVG yourself or rasterize with Fabric.
|
|
43
|
+
- **Named export.** `import { encode } from "@nodetool-ai/sandbox-qr"`.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nodetool-ai/sandbox-qr",
|
|
3
|
+
"version": "0.8.4",
|
|
4
|
+
"description": "Encode QR codes as a matrix or SVG inside the NodeTool sandbox, from uqr",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"uqr": "^0.1.3"
|
|
8
|
+
},
|
|
9
|
+
"nodetool": {
|
|
10
|
+
"apiVersion": 1,
|
|
11
|
+
"recommended": true,
|
|
12
|
+
"sandboxModules": [
|
|
13
|
+
{
|
|
14
|
+
"name": ".",
|
|
15
|
+
"kind": "js",
|
|
16
|
+
"npm": "uqr"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/nodetool-ai/nodetool.git",
|
|
23
|
+
"directory": "packages/sandbox-packs/sandbox-qr"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://nodetool.ai",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/nodetool-ai/nodetool/issues"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"SKILL.md"
|
|
34
|
+
],
|
|
35
|
+
"keywords": [
|
|
36
|
+
"nodetool",
|
|
37
|
+
"nodetool-sandbox-pack",
|
|
38
|
+
"sandbox",
|
|
39
|
+
"qr",
|
|
40
|
+
"barcode"
|
|
41
|
+
]
|
|
42
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sandbox-rrule
|
|
3
|
+
description: Expand iCalendar recurrence rules inside a Code node or CodeAct action, with rrule running in the guest
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Recurrence in the sandbox
|
|
7
|
+
|
|
8
|
+
Specifier: `@nodetool-ai/sandbox-rrule`. One module, rrule. Import it at the top of the body.
|
|
9
|
+
|
|
10
|
+
## Build a rule and expand it
|
|
11
|
+
|
|
12
|
+
```js
|
|
13
|
+
import { RRule } from "@nodetool-ai/sandbox-rrule";
|
|
14
|
+
|
|
15
|
+
const rule = new RRule({
|
|
16
|
+
freq: RRule.WEEKLY,
|
|
17
|
+
interval: 1,
|
|
18
|
+
count: 4,
|
|
19
|
+
dtstart: new Date(inputs.start)
|
|
20
|
+
});
|
|
21
|
+
return { dates: rule.all().map((d) => d.toISOString()) };
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Parse an RRULE string
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { rrulestr } from "@nodetool-ai/sandbox-rrule";
|
|
28
|
+
|
|
29
|
+
const rule = rrulestr(inputs.rrule);
|
|
30
|
+
return { dates: rule.between(new Date(inputs.from), new Date(inputs.to)).map((d) => d.toISOString()) };
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Gotchas
|
|
34
|
+
|
|
35
|
+
- **UTC.** Same guest limit as date-fns.
|
|
36
|
+
- **Cap `count` / `between`.** An unbounded `all()` can allocate
|
|
37
|
+
without end.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nodetool-ai/sandbox-rrule",
|
|
3
|
+
"version": "0.8.4",
|
|
4
|
+
"description": "Recurrence rules (iCalendar RRULE) inside the NodeTool sandbox",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"rrule": "^2.8.1"
|
|
8
|
+
},
|
|
9
|
+
"nodetool": {
|
|
10
|
+
"apiVersion": 1,
|
|
11
|
+
"recommended": true,
|
|
12
|
+
"sandboxModules": [
|
|
13
|
+
{
|
|
14
|
+
"name": ".",
|
|
15
|
+
"kind": "js",
|
|
16
|
+
"npm": "rrule"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/nodetool-ai/nodetool.git",
|
|
23
|
+
"directory": "packages/sandbox-packs/sandbox-rrule"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://nodetool.ai",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/nodetool-ai/nodetool/issues"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"SKILL.md"
|
|
34
|
+
],
|
|
35
|
+
"keywords": [
|
|
36
|
+
"nodetool",
|
|
37
|
+
"nodetool-sandbox-pack",
|
|
38
|
+
"sandbox",
|
|
39
|
+
"rrule",
|
|
40
|
+
"recurrence",
|
|
41
|
+
"calendar"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sandbox-stats
|
|
3
|
+
description: Mean, median, quantiles, and linear regression inside a Code node or CodeAct action, with simple-statistics running in the guest
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Statistics in the sandbox
|
|
7
|
+
|
|
8
|
+
Specifier: `@nodetool-ai/sandbox-stats`. One module, simple-statistics.
|
|
9
|
+
Import it at the top of the body.
|
|
10
|
+
|
|
11
|
+
## Column summaries
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import { mean, median, standardDeviation, quantile } from "@nodetool-ai/sandbox-stats";
|
|
15
|
+
|
|
16
|
+
const xs = inputs.values;
|
|
17
|
+
return {
|
|
18
|
+
mean: mean(xs),
|
|
19
|
+
median: median(xs),
|
|
20
|
+
sd: standardDeviation(xs),
|
|
21
|
+
p90: quantile(xs, 0.9)
|
|
22
|
+
};
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Linear regression
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { linearRegression, linearRegressionLine } from "@nodetool-ai/sandbox-stats";
|
|
29
|
+
|
|
30
|
+
const fit = linearRegression(inputs.points);
|
|
31
|
+
const line = linearRegressionLine(fit);
|
|
32
|
+
return { m: fit.m, b: fit.b, at10: line(10) };
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`inputs.points` is `[[x, y], ...]`.
|
|
36
|
+
|
|
37
|
+
## Gotchas
|
|
38
|
+
|
|
39
|
+
- **Named imports.** Import only the functions you use.
|
|
40
|
+
- **Empty arrays throw.** Guard before `mean([])`.
|
|
41
|
+
- **This is not TFJS.** Classification and embeddings stay on
|
|
42
|
+
`@nodetool-ai/sandbox-tfjs`.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nodetool-ai/sandbox-stats",
|
|
3
|
+
"version": "0.8.4",
|
|
4
|
+
"description": "Descriptive statistics and simple regression inside the NodeTool sandbox, from simple-statistics",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"simple-statistics": "^7.10.1"
|
|
8
|
+
},
|
|
9
|
+
"nodetool": {
|
|
10
|
+
"apiVersion": 1,
|
|
11
|
+
"recommended": true,
|
|
12
|
+
"sandboxModules": [
|
|
13
|
+
{
|
|
14
|
+
"name": ".",
|
|
15
|
+
"kind": "js",
|
|
16
|
+
"npm": "simple-statistics"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/nodetool-ai/nodetool.git",
|
|
23
|
+
"directory": "packages/sandbox-packs/sandbox-stats"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://nodetool.ai",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/nodetool-ai/nodetool/issues"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"SKILL.md"
|
|
34
|
+
],
|
|
35
|
+
"keywords": [
|
|
36
|
+
"nodetool",
|
|
37
|
+
"nodetool-sandbox-pack",
|
|
38
|
+
"sandbox",
|
|
39
|
+
"statistics",
|
|
40
|
+
"regression",
|
|
41
|
+
"mean"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sandbox-subtitle
|
|
3
|
+
description: Parse and stringify SRT/WebVTT captions in a Code node or CodeAct action, with subtitle running on the host
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Captions in the sandbox
|
|
7
|
+
|
|
8
|
+
Specifier: `@nodetool-ai/sandbox-subtitle`. Import it at the top of the body.
|
|
9
|
+
|
|
10
|
+
The published subtitle bundle uses streams the guest refuses, so this pack
|
|
11
|
+
is a **host module**. You work with plain cue objects.
|
|
12
|
+
|
|
13
|
+
## parse — SRT or VTT to cues
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import { parse } from "@nodetool-ai/sandbox-subtitle";
|
|
17
|
+
|
|
18
|
+
const cues = await parse(inputs.captions);
|
|
19
|
+
return { cues };
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Each cue is `{ start, end, text }` with times in milliseconds.
|
|
23
|
+
|
|
24
|
+
## stringify — cues to SRT or VTT
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { stringify } from "@nodetool-ai/sandbox-subtitle";
|
|
28
|
+
|
|
29
|
+
const srt = await stringify(inputs.cues, { format: "SRT" });
|
|
30
|
+
return { srt };
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Pass `{ format: "WebVTT" }` for VTT.
|
|
34
|
+
|
|
35
|
+
## Gotchas
|
|
36
|
+
|
|
37
|
+
- **Async host calls.** Always `await`.
|
|
38
|
+
- **Cue text keeps newlines.** Split on `\n` if you need lines.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nodetool-ai/sandbox-subtitle",
|
|
3
|
+
"version": "0.8.4",
|
|
4
|
+
"description": "Parse and write SRT and WebVTT captions inside the NodeTool sandbox",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"nodetool": {
|
|
7
|
+
"apiVersion": 1,
|
|
8
|
+
"recommended": true,
|
|
9
|
+
"sandboxModules": [
|
|
10
|
+
{
|
|
11
|
+
"name": ".",
|
|
12
|
+
"kind": "host",
|
|
13
|
+
"host": "subtitle"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/nodetool-ai/nodetool.git",
|
|
20
|
+
"directory": "packages/sandbox-packs/sandbox-subtitle"
|
|
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
|
+
"srt",
|
|
37
|
+
"vtt",
|
|
38
|
+
"captions",
|
|
39
|
+
"subtitle"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sandbox-supabase
|
|
3
|
+
description: Read and write Supabase tables from a Code node or CodeAct action, with NodeTool's PostgREST request builder running on the host
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Supabase in the sandbox
|
|
7
|
+
|
|
8
|
+
Specifier: `@nodetool-ai/sandbox-supabase`. Import it at the top of the body.
|
|
9
|
+
|
|
10
|
+
Supabase's REST surface is PostgREST: the whole query lives in the URL and the
|
|
11
|
+
write semantics live in a `Prefer` header. Both are easy to get subtly wrong —
|
|
12
|
+
an upsert without `resolution=merge-duplicates` is just a failed insert — so
|
|
13
|
+
this pack does the encoding.
|
|
14
|
+
|
|
15
|
+
**Nothing here sends a request.** Both exports build one; the guest's own
|
|
16
|
+
`fetch` sends it, under the run's fetch cap and SSRF guard.
|
|
17
|
+
|
|
18
|
+
## from — one table
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
import { from } from "@nodetool-ai/sandbox-supabase";
|
|
22
|
+
|
|
23
|
+
const url = await nodetool.secrets.get("SUPABASE_URL");
|
|
24
|
+
const key = await nodetool.secrets.get("SUPABASE_KEY");
|
|
25
|
+
|
|
26
|
+
const req = await from({
|
|
27
|
+
url, key,
|
|
28
|
+
table: "issues",
|
|
29
|
+
select: "id,title,status",
|
|
30
|
+
filters: { status: "eq.open" },
|
|
31
|
+
order: "created_at.desc",
|
|
32
|
+
limit: 20
|
|
33
|
+
});
|
|
34
|
+
const res = await fetch(req.url, req);
|
|
35
|
+
if (!res.ok) throw new Error(`Supabase select failed: ${res.status}`);
|
|
36
|
+
return { rows: res.json };
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
`method` picks the operation:
|
|
40
|
+
|
|
41
|
+
| method | operation |
|
|
42
|
+
|---|---|
|
|
43
|
+
| `GET` (default) | select |
|
|
44
|
+
| `POST` | insert, or upsert with `onConflict` |
|
|
45
|
+
| `PATCH` | update the rows the filters match |
|
|
46
|
+
| `DELETE` | delete the rows the filters match |
|
|
47
|
+
|
|
48
|
+
Options: `url` and `key` (required), `table` (required), `method`, `select`,
|
|
49
|
+
`filters`, `order`, `limit`, `offset`, `body`, `onConflict`, `count`,
|
|
50
|
+
`returning`, `query`.
|
|
51
|
+
|
|
52
|
+
**Filters** take either form:
|
|
53
|
+
|
|
54
|
+
```js
|
|
55
|
+
filters: { status: "eq.open", priority: "in.(high,urgent)" } // raw PostgREST
|
|
56
|
+
filters: { age: { gte: 18, lt: 65 } } // operator object
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Insert**
|
|
60
|
+
|
|
61
|
+
```js
|
|
62
|
+
const req = await from({ url, key, table: "events", method: "POST", body: inputs.rows });
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Update the matching rows**
|
|
66
|
+
|
|
67
|
+
```js
|
|
68
|
+
const req = await from({
|
|
69
|
+
url, key, table: "issues", method: "PATCH",
|
|
70
|
+
filters: { id: `eq.${inputs.id}` },
|
|
71
|
+
body: { status: "closed" }
|
|
72
|
+
});
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Upsert** — `onConflict` names the unique column and turns the insert into a
|
|
76
|
+
merge:
|
|
77
|
+
|
|
78
|
+
```js
|
|
79
|
+
const req = await from({
|
|
80
|
+
url, key, table: "users", method: "POST",
|
|
81
|
+
onConflict: "email", body: inputs.users
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
A write returns the affected rows. Pass `returning: "minimal"` when you do not
|
|
86
|
+
want them back.
|
|
87
|
+
|
|
88
|
+
## rpc — a Postgres function
|
|
89
|
+
|
|
90
|
+
```js
|
|
91
|
+
import { rpc } from "@nodetool-ai/sandbox-supabase";
|
|
92
|
+
|
|
93
|
+
const req = await rpc({ url, key, fn: "search_issues", args: { term: inputs.term } });
|
|
94
|
+
return { rows: (await fetch(req.url, req)).json };
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Gotchas
|
|
98
|
+
|
|
99
|
+
- **Every export is async.** A host call is a round trip.
|
|
100
|
+
- **A `DELETE` or `PATCH` with no filters hits every row.** PostgREST does not
|
|
101
|
+
refuse it. Pass the filters.
|
|
102
|
+
- **The anon key obeys row-level security.** A select that returns `[]` against
|
|
103
|
+
a table with rows usually means RLS, not an empty table. The service-role key
|
|
104
|
+
bypasses it — and bypasses it for every row, so keep it out of anything a
|
|
105
|
+
user's prompt can steer.
|
|
106
|
+
- **Errors arrive as JSON with a non-2xx status.** Check `res.ok` and read
|
|
107
|
+
`res.json.message`; PostgREST says exactly what it disliked.
|
|
108
|
+
- **Supabase caps a page at 1000 rows.** Page with `limit` and `offset`.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nodetool-ai/sandbox-supabase",
|
|
3
|
+
"version": "0.8.4",
|
|
4
|
+
"description": "Build Supabase REST and RPC requests inside the NodeTool sandbox, from NodeTool's PostgREST helper running on the host",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"nodetool": {
|
|
7
|
+
"apiVersion": 1,
|
|
8
|
+
"recommended": true,
|
|
9
|
+
"sandboxModules": [
|
|
10
|
+
{
|
|
11
|
+
"name": ".",
|
|
12
|
+
"kind": "host",
|
|
13
|
+
"host": "supabase"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/nodetool-ai/nodetool.git",
|
|
20
|
+
"directory": "packages/sandbox-packs/sandbox-supabase"
|
|
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
|
+
"supabase",
|
|
37
|
+
"postgrest"
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sandbox-tfjs
|
|
3
|
+
description: Classify and embed images, detect objects, and answer from a passage in a Code node or CodeAct action, with TensorFlow.js running on the host
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# TensorFlow.js models in the sandbox
|
|
7
|
+
|
|
8
|
+
Specifier: `@nodetool-ai/sandbox-tfjs`. Import it at the top of the body.
|
|
9
|
+
|
|
10
|
+
The models are tens of megabytes of weights, fetched over the network and kept
|
|
11
|
+
between calls. The guest has neither the heap for them nor a way to keep
|
|
12
|
+
anything alive past a run, so this pack is a **host module**: the import
|
|
13
|
+
resolves to a generated facade over NodeTool's own implementation, and each
|
|
14
|
+
model loads once per process.
|
|
15
|
+
|
|
16
|
+
These models are small, local, and free — that is the whole reason to reach for
|
|
17
|
+
them. For anything a description or a caption would answer better, use a vision
|
|
18
|
+
model through `nodetool.media` instead.
|
|
19
|
+
|
|
20
|
+
## classify — ImageNet labels
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
import { classify } from "@nodetool-ai/sandbox-tfjs";
|
|
24
|
+
|
|
25
|
+
const labels = await classify(await workspace.readBytes("photo.jpg"), { topK: 3 });
|
|
26
|
+
return { best: labels[0].className, probability: labels[0].probability };
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
MobileNet v2 over the 1000 ImageNet classes, most likely first. `topK` defaults
|
|
30
|
+
to 5.
|
|
31
|
+
|
|
32
|
+
## embed — a feature vector for an image
|
|
33
|
+
|
|
34
|
+
```js
|
|
35
|
+
import { embed } from "@nodetool-ai/sandbox-tfjs";
|
|
36
|
+
|
|
37
|
+
const vector = await embed(bytes); // 1280 numbers
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The MobileNet penultimate layer. Compare two vectors by cosine similarity for
|
|
41
|
+
near-duplicate detection or nearest-neighbour search.
|
|
42
|
+
|
|
43
|
+
## detect — objects with boxes
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
import { detect } from "@nodetool-ai/sandbox-tfjs";
|
|
47
|
+
|
|
48
|
+
const objects = await detect(bytes, { maxBoxes: 10, minScore: 0.6 });
|
|
49
|
+
// [{ className: "person", score: 0.91, bbox: { x, y, width, height } }, …]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
COCO-SSD over the 80 COCO classes. The box is in image pixels. `maxBoxes`
|
|
53
|
+
defaults to 20 and `minScore` to 0.5.
|
|
54
|
+
|
|
55
|
+
## answer — extractive question answering
|
|
56
|
+
|
|
57
|
+
```js
|
|
58
|
+
import { answer } from "@nodetool-ai/sandbox-tfjs";
|
|
59
|
+
|
|
60
|
+
const spans = await answer("When was it founded?", inputs.article);
|
|
61
|
+
return { answer: spans[0]?.text ?? null };
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
BERT QnA quotes the passage — it never writes prose. Each span carries a
|
|
65
|
+
`score` and its `startIndex`/`endIndex` in the passage.
|
|
66
|
+
|
|
67
|
+
## Gotchas
|
|
68
|
+
|
|
69
|
+
- **Every export is async**, and the first call to each model waits for its
|
|
70
|
+
weights to download.
|
|
71
|
+
- **Images go in as encoded bytes** (PNG/JPEG/WebP), decoded through the
|
|
72
|
+
sandbox's own `image` backend — so the same pixel caps `image.decode`
|
|
73
|
+
enforces apply, and 10 MB is the input limit.
|
|
74
|
+
- **The models see pixels, nothing else.** `classify` on a screenshot of text
|
|
75
|
+
answers with an ImageNet class, not with the text; that is
|
|
76
|
+
`@nodetool-ai/sandbox-ocr`.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nodetool-ai/sandbox-tfjs",
|
|
3
|
+
"version": "0.8.4",
|
|
4
|
+
"description": "Classify images, detect objects and answer questions inside the NodeTool sandbox, from TensorFlow.js running on the host",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"nodetool": {
|
|
7
|
+
"apiVersion": 1,
|
|
8
|
+
"recommended": true,
|
|
9
|
+
"sandboxModules": [
|
|
10
|
+
{
|
|
11
|
+
"name": ".",
|
|
12
|
+
"kind": "host",
|
|
13
|
+
"host": "tfjs"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/nodetool-ai/nodetool.git",
|
|
20
|
+
"directory": "packages/sandbox-packs/sandbox-tfjs"
|
|
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
|
+
"tensorflow",
|
|
37
|
+
"tfjs",
|
|
38
|
+
"machine-learning",
|
|
39
|
+
"image-classification",
|
|
40
|
+
"object-detection"
|
|
41
|
+
]
|
|
42
|
+
}
|