@lotics/app-sdk 0.51.1 → 0.51.2
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/src/config.d.ts +1 -1
- package/dist/src/config.js +1 -1
- package/docs/ai.md +1 -1
- package/docs/runtime.md +12 -11
- package/package.json +1 -1
package/dist/src/config.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AppConfigValue } from "./rpc.js";
|
|
2
2
|
/**
|
|
3
3
|
* Read the installation's customization config — the first rung of the App
|
|
4
|
-
* Packages customization ladder (see docs/
|
|
4
|
+
* Packages customization ladder (see docs/packages.md § The customization
|
|
5
5
|
* ladder). A package declares typed config knobs with defaults (labels, feature
|
|
6
6
|
* toggles, theme, column choices); each installation stores the customized values
|
|
7
7
|
* and the app reads them here. Updates flow: editing config in the product
|
package/dist/src/config.js
CHANGED
|
@@ -2,7 +2,7 @@ import { useMemo } from "react";
|
|
|
2
2
|
import { useAppContext } from "./viewer.js";
|
|
3
3
|
/**
|
|
4
4
|
* Read the installation's customization config — the first rung of the App
|
|
5
|
-
* Packages customization ladder (see docs/
|
|
5
|
+
* Packages customization ladder (see docs/packages.md § The customization
|
|
6
6
|
* ladder). A package declares typed config knobs with defaults (labels, feature
|
|
7
7
|
* toggles, theme, column choices); each installation stores the customized values
|
|
8
8
|
* and the app reads them here. Updates flow: editing config in the product
|
package/docs/ai.md
CHANGED
|
@@ -176,7 +176,7 @@ Opens the Lotics messenger on a **fresh chat**, seeded with the given payload. T
|
|
|
176
176
|
| `prompt` | **Prefills the chat composer.** The user sees it, can edit it, and sends it themselves — **nothing runs until they press send** |
|
|
177
177
|
| `file_ids` | Files to attach (ids from [`readFiles(cell)`](./files.md) or an upload). The host resolves each id itself and attaches the current version; a **single** file also opens in a preview pane beside the chat |
|
|
178
178
|
| `record_ids` | Records the chat should know about (ids from query rows). The host resolves them to table context — the agent can then read and act on them **under the signed-in member's authority** |
|
|
179
|
-
| `context` | Free-text grounding ("Order ORD-2481, customer Acme…"). The host stamps the app's identity (id + name) alongside it automatically |
|
|
179
|
+
| `context` | Free-text grounding ("Order ORD-2481, customer Acme…"). The host stamps the app's identity (id + name) alongside it automatically. **User-visible verbatim**: the chat shows it as a context pill the user can expand (and dismiss before sending) — write it as user-readable prose, never internal jargon or anything sensitive |
|
|
180
180
|
|
|
181
181
|
At least one of the four is required — an empty call rejects. The bridge carries only ids and text; the host resolves everything as the signed-in member, so the handoff can only surface what that member could already open. An unresolvable file or record is dropped with a visible toast and the rest of the handoff proceeds.
|
|
182
182
|
|
package/docs/runtime.md
CHANGED
|
@@ -408,11 +408,12 @@ contract aliases (`"tasks.title"`, `"tasks.status:to_do"`, role alias) with this
|
|
|
408
408
|
workspace's `fld_`/`opt_`/`grp_` ids as values. Exact signature:
|
|
409
409
|
`dist/src/rpc.d.ts`.
|
|
410
410
|
|
|
411
|
-
You normally never call it yourself:
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
exports plain-string `F` / `OPT` / `ROLE` maps — the same
|
|
415
|
-
bespoke app's baked codegen, but resolved per-installation
|
|
411
|
+
You normally never call it yourself: on a package installation (a published
|
|
412
|
+
origin, or an install of someone's package) `lotics app codegen` emits a
|
|
413
|
+
binding-form `.lotics/app_fields.ts` that calls it once at **module load** via
|
|
414
|
+
top-level await and exports plain-string `F` / `OPT` / `ROLE` maps — the same
|
|
415
|
+
import surface as a bespoke app's baked codegen, but resolved per-installation
|
|
416
|
+
at runtime:
|
|
416
417
|
|
|
417
418
|
```ts
|
|
418
419
|
import { OPT } from "../.lotics/app_fields";
|
|
@@ -426,16 +427,16 @@ const STATUS_DONE = OPT.TASKS.status.done; // this installation's "opt_…"
|
|
|
426
427
|
never cached — a module-load failure rejects the whole graph (blank frame),
|
|
427
428
|
so the fetch absorbs blips rather than bricking the boot on one lost request.
|
|
428
429
|
- **Requires the starter's `build.target: "es2022"`** (top-level await does not
|
|
429
|
-
exist below it).
|
|
430
|
-
|
|
430
|
+
exist below it). An app scaffolded before the starter set that target must
|
|
431
|
+
set it in `vite.config.ts` before shipping the binding form.
|
|
431
432
|
- **Fails loud.** A key missing from the binding throws at boot with the alias
|
|
432
433
|
named — the binding is verified complete at install/adopt, so a miss means
|
|
433
434
|
the generated file is stale relative to the installed contract version
|
|
434
435
|
(re-run the codegen, republish).
|
|
435
|
-
- **Bespoke apps 404.**
|
|
436
|
-
|
|
437
|
-
call this directly — import from `.lotics/app_fields` and let
|
|
438
|
-
|
|
436
|
+
- **Bespoke apps 404.** An app that is not a package installation has no
|
|
437
|
+
binding; codegen emits the baked variant for it instead. Shared code should
|
|
438
|
+
not call this directly — import from `.lotics/app_fields` and let codegen
|
|
439
|
+
pick the form.
|
|
439
440
|
|
|
440
441
|
## For package contributors
|
|
441
442
|
|