@lotics/app-sdk 0.69.0 → 0.72.0
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/hooks.d.ts +12 -0
- package/docs/ai.md +1 -0
- package/docs/queries.md +7 -4
- package/package.json +2 -2
package/dist/src/hooks.d.ts
CHANGED
|
@@ -103,6 +103,18 @@ interface PaginatedQueryState<R> extends QueryStateBase {
|
|
|
103
103
|
export interface QuerySortKey {
|
|
104
104
|
field_key: string;
|
|
105
105
|
order: "asc" | "desc";
|
|
106
|
+
/**
|
|
107
|
+
* Where rows BLANK in this column sit — `"bottom"` when omitted, which is what
|
|
108
|
+
* you want for "the ones with a value first".
|
|
109
|
+
*
|
|
110
|
+
* It earns its place on a MULTI-KEY sort over columns that are blank by
|
|
111
|
+
* position rather than by accident — a pipeline's per-step date stamps, say,
|
|
112
|
+
* where the first non-blank column IS the row's rank. Reading such a ladder
|
|
113
|
+
* from the top with blanks at the bottom orders it furthest-along-first; the
|
|
114
|
+
* reverse reading needs blanks on TOP, and with only the default there is no
|
|
115
|
+
* way to express it, so the column can be sorted one way and not the other.
|
|
116
|
+
*/
|
|
117
|
+
blank_position?: "top" | "bottom";
|
|
106
118
|
}
|
|
107
119
|
/** A filter condition over one output column (wire shape of a filter node). */
|
|
108
120
|
export interface QueryFilterCondition {
|
package/docs/ai.md
CHANGED
|
@@ -26,6 +26,7 @@ A declaration carries:
|
|
|
26
26
|
| `workflow_aliases` | The app's own workflows the agent may invoke via `run_app_workflow` — its **entire write surface** |
|
|
27
27
|
| `model_tier` | Optional model tier — `haiku` \| `sonnet` \| `opus`. Omit (preferred) to follow the platform default tier, resolved at run time. A tier names capability, not a version, so the agent tracks model generations with no rewrite. Pin only a deliberate, tested choice |
|
|
28
28
|
| `effort_level` | Optional reasoning depth for adaptive-thinking tiers. Requires an explicit `model_tier` pin — effort is tuned per tier |
|
|
29
|
+
| `prefix_cache_ttl` | Optional prompt-cache window for the agent's stable prefix (tools + system). **Omit it** — the default (`"5m"`, Anthropic's own) is right for essentially every agent. `"1h"` is a leveraged bet: it doubles the write price (2x the input rate against 1.25x, both reading back at 0.1x) to buy only the five-minute-to-one-hour band, and an entry nothing re-reads inside the hour was paid for twice over. Declining it is never "uncached" — the same prefix stays cached at the default window. Set `"1h"` only with measured cadence showing runs reliably land in that band, such as a scheduled sweep |
|
|
29
30
|
| `inputs` | Optional typed input schema for one run — the same vocabulary as workflow inputs (`text`, `number`, `file`, `member`, `record_link`, `select`, …). The server validates every run payload against it |
|
|
30
31
|
| `outputs` | Optional typed output schema. Declared → **structured agent** (the run must emit a matching result); omitted → **free-text agent** (the answer is the final prose) |
|
|
31
32
|
|
package/docs/queries.md
CHANGED
|
@@ -770,10 +770,13 @@ template as derived nodes, in this order: `filter` (narrow) → `sort` (order)
|
|
|
770
770
|
it. Record-link membership (`has_any_of` by id) **works** here; so does `is_current_member`
|
|
771
771
|
on a member column. Traversals / `locked` / `current_member` do not — bake those into the
|
|
772
772
|
template.
|
|
773
|
-
- **`sort`** — `[{ field_key, order }]` over output columns — the typed
|
|
774
|
-
|
|
775
|
-
bottom
|
|
776
|
-
|
|
773
|
+
- **`sort`** — `[{ field_key, order, blank_position? }]` over output columns — the typed
|
|
774
|
+
`QuerySortKey` the hooks accept. `blank_position` is `"top" | "bottom"`, defaulting to
|
|
775
|
+
`"bottom"`. It matters on a **multi-key** sort over columns whose blankness IS the ranking —
|
|
776
|
+
a pipeline's per-step date stamps, where the first non-blank column gives the row's rung.
|
|
777
|
+
Listing the ladder top-down with blanks at the bottom orders it furthest-along-first; the
|
|
778
|
+
ascending reading needs `blank_position: "top"` on every key, and without it that direction
|
|
779
|
+
cannot be expressed at all.
|
|
777
780
|
- **`limit` / `offset` / keyset `cursor`** — pagination. `useQuery` / `usePaginatedQuery` page by
|
|
778
781
|
`offset` (`limit` clamped to the 10,000-row cap, §10); `useInfiniteQuery` opts into **keyset
|
|
779
782
|
(seek)** by sending `keyset: true` + the prior page's `cursor`, and the server returns the next
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lotics/app-sdk",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Runtime SDK for Lotics custom-code apps
|
|
3
|
+
"version": "0.72.0",
|
|
4
|
+
"description": "Runtime SDK for Lotics custom-code apps — typed hooks, postMessage bridge, mount entry point",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|