@proveanything/smartlinks 2.0.5 → 2.0.9
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/api/ai.d.ts +1 -1
- package/dist/api/ai.js +1 -1
- package/dist/api/analytics.d.ts +1 -1
- package/dist/api/analytics.js +1 -1
- package/dist/api/appConfiguration.d.ts +3 -3
- package/dist/api/appConfiguration.js +3 -3
- package/dist/api/appObjects.d.ts +1 -1
- package/dist/api/appObjects.js +1 -1
- package/dist/api/asset.d.ts +1 -1
- package/dist/api/asset.js +2 -2
- package/dist/api/async.d.ts +1 -1
- package/dist/api/async.js +1 -1
- package/dist/api/attestation.d.ts +1 -1
- package/dist/api/attestation.js +1 -1
- package/dist/api/attestations.d.ts +1 -1
- package/dist/api/attestations.js +1 -1
- package/dist/api/auth.d.ts +2 -2
- package/dist/api/auth.js +2 -2
- package/dist/api/authKit.d.ts +1 -1
- package/dist/api/authKit.js +1 -1
- package/dist/api/batch.d.ts +1 -1
- package/dist/api/batch.js +1 -1
- package/dist/api/broadcasts.d.ts +2 -2
- package/dist/api/broadcasts.js +1 -1
- package/dist/api/claimSet.d.ts +1 -1
- package/dist/api/claimSet.js +1 -1
- package/dist/api/collection.d.ts +1 -1
- package/dist/api/collection.js +1 -1
- package/dist/api/comms.d.ts +15 -15
- package/dist/api/comms.js +1 -1
- package/dist/api/config.d.ts +1 -1
- package/dist/api/config.js +1 -1
- package/dist/api/contact.d.ts +1 -1
- package/dist/api/contact.js +1 -1
- package/dist/api/containers.d.ts +1 -1
- package/dist/api/containers.js +1 -1
- package/dist/api/crate.d.ts +1 -1
- package/dist/api/crate.js +1 -1
- package/dist/api/facets.d.ts +1 -1
- package/dist/api/facets.js +1 -1
- package/dist/api/form.js +1 -1
- package/dist/api/http.js +1 -1
- package/dist/api/index.d.ts +46 -46
- package/dist/api/index.js +46 -46
- package/dist/api/integrations.d.ts +1 -1
- package/dist/api/integrations.js +1 -1
- package/dist/api/interactions.d.ts +1 -1
- package/dist/api/interactions.js +1 -1
- package/dist/api/jobs.d.ts +1 -1
- package/dist/api/jobs.js +1 -1
- package/dist/api/journeys.d.ts +1 -1
- package/dist/api/journeys.js +1 -1
- package/dist/api/journeysAnalytics.d.ts +1 -1
- package/dist/api/journeysAnalytics.js +1 -1
- package/dist/api/location.d.ts +1 -1
- package/dist/api/location.js +1 -1
- package/dist/api/lots.d.ts +1 -1
- package/dist/api/lots.js +1 -1
- package/dist/api/loyalty.d.ts +1 -1
- package/dist/api/loyalty.js +1 -1
- package/dist/api/navigation.d.ts +1 -1
- package/dist/api/navigation.js +1 -1
- package/dist/api/nfc.d.ts +1 -1
- package/dist/api/nfc.js +1 -1
- package/dist/api/order.d.ts +1 -1
- package/dist/api/order.js +1 -1
- package/dist/api/product.d.ts +1 -1
- package/dist/api/product.js +1 -1
- package/dist/api/products.d.ts +1 -1
- package/dist/api/products.js +1 -1
- package/dist/api/proof.d.ts +1 -1
- package/dist/api/proof.js +1 -1
- package/dist/api/qr.d.ts +1 -1
- package/dist/api/qr.js +1 -1
- package/dist/api/realtime.d.ts +1 -1
- package/dist/api/realtime.js +1 -1
- package/dist/api/research.d.ts +1 -1
- package/dist/api/research.js +1 -1
- package/dist/api/secrets.d.ts +1 -1
- package/dist/api/secrets.js +1 -1
- package/dist/api/segments.d.ts +1 -1
- package/dist/api/segments.js +1 -1
- package/dist/api/sequence.js +1 -1
- package/dist/api/tags.d.ts +1 -1
- package/dist/api/tags.js +1 -1
- package/dist/api/template.d.ts +1 -1
- package/dist/api/template.js +1 -1
- package/dist/api/translations.d.ts +1 -1
- package/dist/api/translations.js +2 -2
- package/dist/api/variant.d.ts +1 -1
- package/dist/api/variant.js +1 -1
- package/dist/containers/types.d.ts +1 -1
- package/dist/docs/API_SUMMARY.md +7 -7
- package/dist/docs/agent-tools.md +111 -0
- package/dist/docs/ai.md +14 -520
- package/dist/docs/analytics.md +41 -2
- package/dist/docs/app-data-storage.md +0 -38
- package/dist/docs/app-manifest.md +104 -7
- package/dist/docs/app-objects.md +0 -148
- package/dist/docs/app-records-pattern.md +2 -2
- package/dist/docs/building-react-components.md +6 -14
- package/dist/docs/caching.md +20 -21
- package/dist/docs/container-tracking.md +2 -0
- package/dist/docs/containers.md +14 -66
- package/dist/docs/deploying-apps.md +8 -3
- package/dist/docs/executor.md +4 -4
- package/dist/docs/host-dependency-contract.md +159 -0
- package/dist/docs/iframe-responder.md +308 -0
- package/dist/docs/item-context.md +0 -2
- package/dist/docs/manifests.md +3 -3
- package/dist/docs/mobile-admin-container.md +4 -4
- package/dist/docs/mpa.md +5 -5
- package/dist/docs/native-facade.md +1 -1
- package/dist/docs/overview.md +36 -15
- package/dist/docs/portal-back-button.md +2 -3
- package/dist/docs/sequences.md +1 -1
- package/dist/docs/server-functions.md +2 -3
- package/dist/docs/widgets.md +11 -69
- package/dist/http.d.ts +24 -8
- package/dist/http.js +32 -14
- package/dist/iframe.d.ts +2 -2
- package/dist/iframe.js +1 -1
- package/dist/iframeResponder.d.ts +7 -1
- package/dist/iframeResponder.js +45 -4
- package/dist/index.d.ts +30 -27
- package/dist/index.js +10 -8
- package/dist/mobile-admin/errors.d.ts +1 -1
- package/dist/mobile-admin/types.d.ts +2 -2
- package/dist/openapi.yaml +12 -0
- package/dist/shared-dependencies.d.ts +37 -0
- package/dist/shared-dependencies.js +79 -0
- package/dist/testing/index.d.ts +1 -1
- package/dist/translationCache.d.ts +1 -1
- package/dist/types/appManifest.d.ts +23 -0
- package/dist/types/broadcasts.d.ts +1 -1
- package/dist/types/collection.d.ts +2 -2
- package/dist/types/comms.d.ts +5 -5
- package/dist/types/contact.d.ts +1 -1
- package/dist/types/facets.d.ts +1 -1
- package/dist/types/iframeResponder.d.ts +3 -3
- package/dist/types/index.d.ts +44 -44
- package/dist/types/index.js +44 -44
- package/dist/types/interaction.d.ts +1 -1
- package/dist/types/itemContext.d.ts +1 -1
- package/dist/types/journeysAnalytics.d.ts +1 -1
- package/dist/types/navigation.d.ts +1 -1
- package/dist/types/product.d.ts +1 -1
- package/dist/types/proof.d.ts +1 -1
- package/dist/types/segments.d.ts +1 -1
- package/dist/types/widgets.d.ts +2 -2
- package/dist/utils/conditions.d.ts +1 -1
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +3 -3
- package/dist/utils/paths.d.ts +4 -4
- package/docs/API_SUMMARY.md +7 -7
- package/docs/agent-tools.md +111 -0
- package/docs/ai.md +14 -520
- package/docs/analytics.md +41 -2
- package/docs/app-data-storage.md +0 -38
- package/docs/app-manifest.md +104 -7
- package/docs/app-objects.md +0 -148
- package/docs/app-records-pattern.md +2 -2
- package/docs/building-react-components.md +6 -14
- package/docs/caching.md +20 -21
- package/docs/container-tracking.md +2 -0
- package/docs/containers.md +14 -66
- package/docs/deploying-apps.md +8 -3
- package/docs/executor.md +4 -4
- package/docs/host-dependency-contract.md +159 -0
- package/docs/iframe-responder.md +308 -0
- package/docs/item-context.md +0 -2
- package/docs/mobile-admin-container.md +4 -4
- package/docs/mpa.md +5 -5
- package/docs/native-facade.md +1 -1
- package/docs/overview.md +36 -15
- package/docs/portal-back-button.md +2 -3
- package/docs/sequences.md +1 -1
- package/docs/server-functions.md +2 -3
- package/docs/widgets.md +11 -69
- package/openapi.yaml +12 -0
- package/package.json +17 -6
- package/scripts/doctor.mjs +171 -0
- package/docs/analytics-metadata-conventions.md +0 -88
- package/docs/iframe-streaming-parent-changes.md +0 -308
- package/docs/manifests.md +0 -204
package/dist/types/segments.d.ts
CHANGED
package/dist/types/widgets.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TagContext } from './nfc';
|
|
2
|
-
import type { ItemContext } from './itemContext';
|
|
1
|
+
import type { TagContext } from './nfc.js';
|
|
2
|
+
import type { ItemContext } from './itemContext.js';
|
|
3
3
|
/**
|
|
4
4
|
* Structured navigation request emitted via the `onNavigate` prop when a
|
|
5
5
|
* widget or container needs to navigate the parent platform shell to another
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* Utility functions and helpers for working with smartlinks data.
|
|
3
3
|
* @module utils
|
|
4
4
|
*/
|
|
5
|
-
export * from './paths';
|
|
6
|
-
export * from './conditions';
|
|
7
|
-
export * from './anonId';
|
|
5
|
+
export * from './paths.js';
|
|
6
|
+
export * from './conditions.js';
|
|
7
|
+
export * from './anonId.js';
|
package/dist/utils/index.js
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* Utility functions and helpers for working with smartlinks data.
|
|
4
4
|
* @module utils
|
|
5
5
|
*/
|
|
6
|
-
export * from './paths';
|
|
7
|
-
export * from './conditions';
|
|
8
|
-
export * from './anonId';
|
|
6
|
+
export * from './paths.js';
|
|
7
|
+
export * from './conditions.js';
|
|
8
|
+
export * from './anonId.js';
|
package/dist/utils/paths.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Product } from '../types/product';
|
|
2
|
-
import type { Collection } from '../types/collection';
|
|
3
|
-
import type { BatchResponse } from '../types/batch';
|
|
4
|
-
import type { Proof } from '../types/proof';
|
|
1
|
+
import type { Product } from '../types/product.js';
|
|
2
|
+
import type { Collection } from '../types/collection.js';
|
|
3
|
+
import type { BatchResponse } from '../types/batch.js';
|
|
4
|
+
import type { Proof } from '../types/proof.js';
|
|
5
5
|
/**
|
|
6
6
|
* Parameters for building a portal path.
|
|
7
7
|
* Pass in objects where available - the function will extract the needed properties.
|
package/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.9 | Generated: 2026-09-21T16:23:55.650Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -17,15 +17,13 @@ For detailed guides on specific features:
|
|
|
17
17
|
- **[Containers](containers.md)** - Building full-app embeddable containers (lazy-loaded)
|
|
18
18
|
- **[Mobile Admin Container](mobile-admin-container.md)** - Building mobile-optimised operator/admin containers as a separate bundle
|
|
19
19
|
- **[Container Tracking](container-tracking.md)** - Hierarchical physical/logical container groupings with item membership
|
|
20
|
-
- **[Scanner Containers](scanner-container.md)** - Building scanner microapps for the SmartLinks Scanner Android host (RFID, NFC, QR, key events)
|
|
21
20
|
- **[Multi-Page App Architecture](mpa.md)** - Vite MPA build pipeline: public/admin entry points, widget/container/executor bundles, content-hashed CDN assets
|
|
22
21
|
- **[App Configuration Files](app-manifest.md)** - `app.manifest.json` and `app.admin.json` reference — bundles, components, setup questions, import schemas, tunable fields, and metrics
|
|
23
22
|
- **[Executor Model](executor.md)** - Programmatic JS bundles for AI-driven setup, server-side SEO metadata generation, and LLM content for AI crawlers
|
|
24
23
|
- **[Server Functions](server-functions.md)** - App-authored server-side "edge functions" (`async (ctx, event) => result`): http/event/cron triggers, the visibility/authority/capabilities security model, and the pre-scoped `ctx` (authority-scoped SDK, capability-gated secrets + fetch)
|
|
25
24
|
- **[Deploying & Registering an App](deploying-apps.md)** - Publish → build → register: the app CDN layout (smartlinks.app), dev/beta/prod channels, channel-scoped deploy keys, the `POST /apps/:appId/releases` registration endpoint + validation, and how to wire it into your build so a bad manifest fails the deploy
|
|
26
25
|
- **[Realtime](realtime.md)** - Real-time data updates and WebSocket connections
|
|
27
|
-
- **[iframe Responder](iframe-responder.md)** - iframe integration and cross-origin communication
|
|
28
|
-
- **[iframe Streaming Parent Changes](iframe-streaming-parent-changes.md)** - Parent-side changes required to support AI streaming in iframe proxy mode
|
|
26
|
+
- **[iframe Responder](iframe-responder.md)** - iframe integration and cross-origin communication (incl. hand-rolled streaming protocol)
|
|
29
27
|
- **[Utilities](utils.md)** - Helper functions for building portal paths, URLs, and common tasks
|
|
30
28
|
- **[UI Utils](ui-utils.md)** - Reusable, themeable admin UI React component library for microapps
|
|
31
29
|
- **[Caching](caching.md)** - Multi-tier caching strategy (in-memory, SessionStorage, IndexedDB) used by the SDK
|
|
@@ -63,7 +61,6 @@ For detailed guides on specific features:
|
|
|
63
61
|
- **[Integrations](integrations.md)** - Inbound/outbound integration flows + the sealed-secret store; triggers (manual/event/schedule), field mappings, and the Syndigo/Event Hub outbound path
|
|
64
62
|
- **[AI Tools & Skills](ai-tools-and-skills.md)** - The AI capability catalog: skills apps invoke by name (e.g. research.brand), the tools the AI reaches for (web fetch/screenshot/brand assets/image gen), the agent loop, and how apps discover them
|
|
65
63
|
- **[Deep Link Discovery](deep-link-discovery.md)** - Registering and discovering navigable app states for portal menus and AI orchestration
|
|
66
|
-
- **[AI-Native App Manifests](manifests.md)** - How AI workflows discover, configure, and import apps via structured manifests and prose guides
|
|
67
64
|
- **[AI Guide Template](ai-guide-template.md)** - A sample for an app on how to build an AI setup guide
|
|
68
65
|
|
|
69
66
|
## Choosing App Storage
|
|
@@ -220,8 +217,8 @@ Returns true if the SDK currently has any auth credential set (bearer token or A
|
|
|
220
217
|
}) → `void`
|
|
221
218
|
Configure the SDK's built-in in-memory GET cache. The cache is transparent — it sits inside the HTTP layer and requires no changes to your existing API calls. All GET requests benefit automatically. Per-resource rules (collections/products → 1 h, proofs → 30 s, etc.) override this value. in-memory only (`'none'`, default). Ignored in Node.js. fallback, from the original fetch time (default: 7 days). `SmartlinksOfflineError` with stale data instead of propagating the network error. caches on page load/refresh. IndexedDB persists for offline. ```ts // Enable IndexedDB persistence for offline support configureSdkCache({ persistence: 'indexeddb' }) // Disable cache entirely in test environments configureSdkCache({ enabled: false }) // Keep caches across page refreshes (not recommended for production) configureSdkCache({ clearOnPageLoad: false }) ```
|
|
222
219
|
|
|
223
|
-
**invalidateCache**(urlPattern?: string) → `void`
|
|
224
|
-
Manually invalidate entries in the SDK's GET cache. *contains* this string is removed.
|
|
220
|
+
**invalidateCache**(urlPattern?: string, options?: InvalidateCacheOptions) → `void`
|
|
221
|
+
Manually invalidate entries in the SDK's GET cache. Note: the GET cache is **in-memory, per page load** (with an optional L2 IndexedDB layer when persistence is enabled) — it does not persist across reloads unless you opt into persistence, so it rarely needs disabling "for correctness". *contains* this string is removed). With `{ exact: true }`, matches the path precisely. Omit to wipe the entire cache. ```ts invalidateCache() // clear everything invalidateCache('/collection/abc123') // that collection AND everything under it invalidateCache('/collection/abc123', { exact: true }) // ONLY that collection entry invalidateCache('/products/') // all canonical plural product responses ```
|
|
225
222
|
|
|
226
223
|
**proxyUploadFormData**(path: string,
|
|
227
224
|
formData: FormData,
|
|
@@ -1841,6 +1838,9 @@ interface AppManifest {
|
|
|
1841
1838
|
version: string;
|
|
1842
1839
|
platformRevision?: string;
|
|
1843
1840
|
appId: string;
|
|
1841
|
+
moduleFormat?: 'umd' | 'esm' | 'dual';
|
|
1842
|
+
sharedDependencies?: string;
|
|
1843
|
+
globals?: Record<string, string>;
|
|
1844
1844
|
seo?: {
|
|
1845
1845
|
strategy?: 'executor' | string;
|
|
1846
1846
|
priority?: number;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Agent tools — exposing your app's actions to the SmartLinks agent
|
|
2
|
+
|
|
3
|
+
> **SmartLinks SDK 2.x.** Redraft of the earlier "Agent Skills & Tools" RFC, now built on
|
|
4
|
+
> [server functions](server-functions.md). **Staged rollout:** the *declaration + discovery* ship in
|
|
5
|
+
> V2 (do them now); the *live agent loop* (a parent chat agent calling your tools) lights up when the
|
|
6
|
+
> platform agent can consume them. Everything you declare is useful before then — a tool is a server
|
|
7
|
+
> function, already invocable via http/event.
|
|
8
|
+
|
|
9
|
+
## The model: app-authored capabilities
|
|
10
|
+
|
|
11
|
+
An app declares **capabilities** — app-authored logic the platform runs, each with a declared
|
|
12
|
+
security envelope (`visibility` / `authority` / `capabilities`). There is **one engine** (the
|
|
13
|
+
server-functions runtime) and several **triggers** into it: `http`, `event`, `cron`, and **`agent`**.
|
|
14
|
+
|
|
15
|
+
**An agent tool is not a new runtime — it's an MCP-shaped facade over a capability.** By default a
|
|
16
|
+
tool *is a server function*: the agent's `tools/call` routes into the same `(ctx, event) => result`
|
|
17
|
+
with the same capability envelope. You author the logic once; the agent is just another caller.
|
|
18
|
+
|
|
19
|
+
Use a **client tool** (a `postMessage` handler in your live admin iframe) only for genuinely
|
|
20
|
+
UI-coupled actions that must run in the open app. It is **not** the default — headless server
|
|
21
|
+
functions are, because they work whether or not your UI is mounted.
|
|
22
|
+
|
|
23
|
+
## Declaring a tool
|
|
24
|
+
|
|
25
|
+
You already declare server functions in `app.manifest.json` (see
|
|
26
|
+
[server-functions.md](server-functions.md)). Mark one **agent-invocable** and give the agent what it
|
|
27
|
+
needs to call it — a description and an input schema:
|
|
28
|
+
|
|
29
|
+
```jsonc
|
|
30
|
+
{
|
|
31
|
+
"functions": {
|
|
32
|
+
"files": { "js": { "umd": "dist/functions.umd.js" } },
|
|
33
|
+
"definitions": [
|
|
34
|
+
{
|
|
35
|
+
"name": "createFaq",
|
|
36
|
+
"trigger": { "type": "http", "methods": ["POST"] },
|
|
37
|
+
"visibility": "admin",
|
|
38
|
+
"authority": "collection",
|
|
39
|
+
"capabilities": ["sl:records:write"],
|
|
40
|
+
|
|
41
|
+
// ── makes it an agent tool ──
|
|
42
|
+
"agent": {
|
|
43
|
+
"tool": true,
|
|
44
|
+
"title": "Create an FAQ entry",
|
|
45
|
+
"description": "Add a question/answer to this collection's FAQ. Use when the user asks to add or draft an FAQ.",
|
|
46
|
+
"input": { /* JSON Schema for the arguments the agent supplies as event.body */ },
|
|
47
|
+
"approval": "auto" // auto | require (require = human confirmation before the call)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The handler is an ordinary server function — the agent-supplied arguments arrive as `event.body`:
|
|
56
|
+
|
|
57
|
+
```js
|
|
58
|
+
export async function createFaq(ctx, event) {
|
|
59
|
+
const { question, answer } = event.body || {}
|
|
60
|
+
// validate, then act with your declared authority/capabilities:
|
|
61
|
+
const rec = await ctx.sl.appRecords.create({ recordType: 'faq', data: { question, answer } })
|
|
62
|
+
return { id: rec.id }
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## What the agent sees (MCP shape)
|
|
67
|
+
|
|
68
|
+
The platform derives an **MCP tool list** from your manifest and drives the standard flow — `tools/list`
|
|
69
|
+
→ `tools/call` → structured result — with streaming, cancellation, and approval layered on. You don't
|
|
70
|
+
implement the wire protocol; you declare tools and write handlers. (The live loop is the staged part.)
|
|
71
|
+
|
|
72
|
+
## Security
|
|
73
|
+
|
|
74
|
+
Identical to server functions — nothing new to reason about:
|
|
75
|
+
- **`visibility`** — who may call (admin/public).
|
|
76
|
+
- **`authority`** — whose identity `ctx.sl` carries (`caller` vs `collection`).
|
|
77
|
+
- **`capabilities`** — least-privilege, capped even when elevated.
|
|
78
|
+
- **`agent.approval: "require"`** — the agent must get human confirmation before invoking (use for
|
|
79
|
+
destructive or public-facing actions).
|
|
80
|
+
|
|
81
|
+
Untrusted third-party tools run in the platform's isolated runner — the same boundary as untrusted
|
|
82
|
+
server functions.
|
|
83
|
+
|
|
84
|
+
## Replacing `app.admin.json` AI setup
|
|
85
|
+
|
|
86
|
+
This supersedes the `app.admin.json` "AI setup" schema-extraction model (the outer agent reading a
|
|
87
|
+
schema and handing back JSON blobs). Instead the app owns its domain logic and exposes **real,
|
|
88
|
+
capability-scoped actions** the agent invokes — with multi-turn and streaming. The AI-schema path is
|
|
89
|
+
**deprecated as of V2** (still works through the V2 line; removed later).
|
|
90
|
+
|
|
91
|
+
## What ships now vs staged
|
|
92
|
+
|
|
93
|
+
| Now (V2) | Staged (on the platform agent) |
|
|
94
|
+
|---|---|
|
|
95
|
+
| The `agent` declaration in the manifest | The live agent conversation calling your tools |
|
|
96
|
+
| SDK types for it; tool descriptors surfaced for discovery | `tools/call` streaming, cancellation, cross-app toolbelt arbitration |
|
|
97
|
+
| Your handlers run today via http/event | Human-approval UX for `approval: "require"` |
|
|
98
|
+
|
|
99
|
+
## Adopting this in an existing app
|
|
100
|
+
|
|
101
|
+
Do it in order — each step is a drop-in migration prompt (see the migration steps that ship with the
|
|
102
|
+
SDK). Roughly:
|
|
103
|
+
|
|
104
|
+
1. **Server functions** — add the `functions` block + build target + test harness (if the app
|
|
105
|
+
doesn't have them). See [server-functions.md](server-functions.md).
|
|
106
|
+
2. **Expose tools** — add the `agent` block to the functions you want the agent to call; give each a
|
|
107
|
+
title/description/input schema and an approval mode.
|
|
108
|
+
3. **Retire `app.admin.json` AI setup** — move any AI-authoring behaviour to tools; drop the
|
|
109
|
+
AI-schema block.
|
|
110
|
+
|
|
111
|
+
Steps 1–2 are safe to ship now; step 3 as you migrate each app off the old AI path.
|