@lotics/app-sdk 0.106.0 → 0.106.1

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.
Files changed (2) hide show
  1. package/dist/index.js +14 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -24536,6 +24536,8 @@ var TOOL_INPUT_SEMANTICS = {
24536
24536
  // Also `{fld_*: value}` — a signed number rather than an item array, but the
24537
24537
  // key half is what this classification governs, so it validates the same way.
24538
24538
  increment: { kind: "record_data", table_from: "table_id" },
24539
+ // `{fld_*: [document template id, ...]}` — the key half is a field of the table, as the ops above.
24540
+ remove_made: { kind: "record_data", table_from: "table_id" },
24539
24541
  // Per-record mode — field_keys names the columns; rows holds values
24540
24542
  // positionally. Each cell's semantic depends on field_keys[i], so the
24541
24543
  // tool resolves option names at execute time. Annotated `dynamic` so the
@@ -24662,6 +24664,12 @@ var TOOL_INPUT_SEMANTICS = {
24662
24664
  aggregations: { kind: "dynamic" },
24663
24665
  group_by: { kind: "field_key_ref", table_from: "table_id" }
24664
24666
  },
24667
+ evaluate_formula: {
24668
+ table_id: { kind: "table_ref", rows: "none" },
24669
+ record_id: { kind: "record_ref" },
24670
+ // `{fld_…}` tokens of `table_id`, resolved against its fields at execute time.
24671
+ expression: { kind: "dynamic" }
24672
+ },
24665
24673
  get_record: {
24666
24674
  // Schema only takes `record_id`; table_id is optional/derived.
24667
24675
  record_id: { kind: "record_ref" },
@@ -27049,6 +27057,10 @@ function adjusted(current, items, op) {
27049
27057
  const gone = new Set(given.map(keyOf));
27050
27058
  return held2.filter((item) => !gone.has(keyOf(item)));
27051
27059
  }
27060
+ function withoutMade(current, templates) {
27061
+ const gone = new Set(asList(templates));
27062
+ return asList(current).filter((item) => !(item !== null && typeof item === "object" && "document_template_id" in item && gone.has(item.document_template_id)));
27063
+ }
27052
27064
  function note(walk, effect) {
27053
27065
  if (walk.unsure && effect.kind !== "unknown") {
27054
27066
  walk.effects.push({ kind: "unknown", table_id: effect.table_id });
@@ -27081,6 +27093,7 @@ async function predictUpdate(walk, input) {
27081
27093
  const removed = await fieldValues(walk, input.remove_from);
27082
27094
  const increments = await fieldValues(walk, input.increment);
27083
27095
  const replaced = await fieldValues(walk, input.replace);
27096
+ const unmade = await fieldValues(walk, input.remove_made);
27084
27097
  for (const id of ids) {
27085
27098
  const before = recordOf(walk, id);
27086
27099
  const cells = {};
@@ -27107,6 +27120,7 @@ async function predictUpdate(walk, input) {
27107
27120
  };
27108
27121
  relative(added, (current, given) => adjusted(current, given, "add_to"));
27109
27122
  relative(removed, (current, given) => adjusted(current, given, "remove_from"));
27123
+ relative(unmade, (current, templates) => withoutMade(current, templates));
27110
27124
  relative(increments, (current, given) => typeof given === "number" ? (typeof current === "number" ? current : 0) + given : current);
27111
27125
  if (unknown2.includes("*")) {
27112
27126
  note(walk, { kind: "unknown", table_id: table });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/app-sdk",
3
- "version": "0.106.0",
3
+ "version": "0.106.1",
4
4
  "description": "The SDK a Lotics custom-code app reads and writes through \u2014 typed hooks over the host bridge, cell readers, mount() and AppRouter",
5
5
  "type": "module",
6
6
  "exports": {