@proveanything/smartlinks 2.0.66 → 2.0.68

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.
@@ -29,7 +29,7 @@ needs to call it — a description and an input schema:
29
29
  ```jsonc
30
30
  {
31
31
  "functions": {
32
- "files": { "js": { "umd": "dist/functions.umd.js" } },
32
+ "files": { "js": { "umd": "functions.umd.js" } },
33
33
  "definitions": [
34
34
  {
35
35
  "name": "createFaq",
package/docs/ai.md CHANGED
@@ -323,7 +323,7 @@ in `input`.
323
323
  | `image.fromReference` | Image-to-image: generate guided by reference image(s). |
324
324
  | `image.searchStock` | Search real stock photos (Unsplash). |
325
325
  | `image.transform` | Resize / crop / rotate / grayscale / format-convert / compress → hosted URL. |
326
- | `pdf.create` | Render HTML → PDF → hosted URL. |
326
+ | `pdf.create` | Render HTML (or one fragment per page) → PDF, 1:1: exact `width`/`height`/`unit` for labels, `pages[]` for many pages in one render, no scripts, only SmartLinks/Google Fonts/data: resources. `return`: `url` (public), `signedUrl` (expiring), `base64`. Cached by input. |
327
327
  | `pdf.fill` | Fill an AcroForm PDF's fields (`{ field: value }`) → hosted URL. |
328
328
  | `pdf.merge` | Merge several PDFs into one, in order → hosted URL. |
329
329
  | `pdf.inspect` | Cheap, no-AI introspection: page count/sizes, which pages have a real text layer, raster present, and a routing hint (`text` vs `vision`). |
@@ -402,9 +402,11 @@ if (!ready.result.report.compliant) showFindings(ready.result.report.findings)
402
402
  - **A review UI that flags guessed fields** → `pdf.extract` with `includeConfidence` (per-field
403
403
  confidence + source) and `includeBoxes` (per-field bbox on text-native pages) in `fieldsMeta`.
404
404
  - **Produce a PDF** → `pdf.create` (HTML → PDF), `pdf.fill` (populate an AcroForm's fields),
405
- `pdf.merge` (combine several). These return a hosted `hostedUrl` (`pdf.create` also returns it as
406
- `url`). `pdf.create` loads remote `<img>` URLs before rendering and honours `page-break-inside`; pass
407
- `margin: "0"` when your HTML sets its own body margin (default page margin is 18mm/14mm).
405
+ `pdf.merge` (combine several). `pdf.create` takes an exact page size (`width`, `height`, `unit`) or a
406
+ `format`, `html` or `pages: [html, …]` (one per page, sharing `head`), and returns `url` (public),
407
+ a `signedUrl` that expires, or `base64` (`return`). JavaScript doesn't run, and images, fonts and
408
+ stylesheets load only from SmartLinks hosts, Google Fonts or `data:` URIs. From a server function:
409
+ `ctx.sl.tools.run('pdf.create', …)` with the `tools:pdf.create` capability (server-functions.md).
408
410
 
409
411
  Every tool is also directly callable without the model loop via `ai.tools.run(collectionId, name,
410
412
  args)` — e.g. render a page or extract fields straight from a UI, no agent round-trip:
@@ -428,7 +428,7 @@ this is just the manifest shape.
428
428
 
429
429
  | Field | Type | Description |
430
430
  |-------|------|-------------|
431
- | `files.js.umd` | string | UMD bundle path (e.g. `dist/functions.umd.js`) — a self-contained bundle exporting each handler by name |
431
+ | `files.js.umd` | string | UMD bundle path, relative to the published build like the other bundles (e.g. `functions.umd.js`, built to `dist/functions.umd.js`) — a self-contained bundle exporting each handler by name |
432
432
  | `definitions[]` | object[] | One entry per function |
433
433
  | `definitions[].name` | string | Function name; also the handler export name (override with `handler`) |
434
434
  | `definitions[].trigger` | object | `{ type: "http"|"event"|"cron", … }` |