@axiom-lattice/local-stores 3.1.17 → 3.1.19

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/local-stores@3.1.17 build /home/runner/work/agentic/agentic/packages/local-stores
2
+ > @axiom-lattice/local-stores@3.1.19 build /home/runner/work/agentic/agentic/packages/local-stores
3
3
  > tsup src/index.ts --format cjs,esm --dts --sourcemap
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,13 +8,13 @@
8
8
  CLI Target: es2020
9
9
  CJS Build start
10
10
  ESM Build start
11
- ESM dist/index.mjs 223.79 KB
12
- ESM dist/index.mjs.map 410.00 KB
13
- ESM ⚡️ Build success in 867ms
14
- CJS dist/index.js 228.32 KB
15
- CJS dist/index.js.map 413.67 KB
16
- CJS ⚡️ Build success in 896ms
11
+ CJS dist/index.js 228.33 KB
12
+ CJS dist/index.js.map 413.70 KB
13
+ CJS ⚡️ Build success in 887ms
14
+ ESM dist/index.mjs 223.78 KB
15
+ ESM dist/index.mjs.map 410.01 KB
16
+ ESM ⚡️ Build success in 922ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 17946ms
18
+ DTS ⚡️ Build success in 12229ms
19
19
  DTS dist/index.d.ts 41.91 KB
20
20
  DTS dist/index.d.mts 41.91 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,55 @@
1
1
  # @axiom-lattice/local-stores
2
2
 
3
+ ## 3.1.19
4
+
5
+ ### Patch Changes
6
+
7
+ - 26fecff: task refactor
8
+ - 910bd08: enhance tasks
9
+ - Updated dependencies [5549689]
10
+ - Updated dependencies [26fecff]
11
+ - Updated dependencies [4ace187]
12
+ - Updated dependencies [910bd08]
13
+ - Updated dependencies [12e7ba9]
14
+ - Updated dependencies [0279b82]
15
+ - @axiom-lattice/core@4.4.0
16
+ - @axiom-lattice/protocols@4.4.1
17
+
18
+ ## 3.1.18
19
+
20
+ ### Patch Changes
21
+
22
+ - 1cc5893: Repair the drifted test baseline, authenticate Lark webhook ingress with the verification token and request signature, require CAS revisions on capability bundle updates, and fix SandboxRegistry process-lifetime issues.
23
+ - e4a110f: mcp ui etc
24
+ - a87f880: Add `metadataFilter` to the `manage_task` `list` action and a shared `normalizeTaskMetadataScalar` helper so task metadata filtering has one type-tolerant JSON-value equality contract (number `1` matches string `"1"`; boolean `true` matches `"true"` but never `1`) across InMemory, Local SQLite, and PostgreSQL task stores.
25
+ - Updated dependencies [0b7cabc]
26
+ - Updated dependencies [c5cd1fe]
27
+ - Updated dependencies [ecd28e5]
28
+ - Updated dependencies [8ed0255]
29
+ - Updated dependencies [15b7181]
30
+ - Updated dependencies [1cc5893]
31
+ - Updated dependencies [e4a110f]
32
+ - Updated dependencies [2fd1187]
33
+ - Updated dependencies [015a931]
34
+ - Updated dependencies [3398474]
35
+ - Updated dependencies [a87f880]
36
+ - Updated dependencies [9de0600]
37
+ - Updated dependencies [fbc46a4]
38
+ - Updated dependencies [978699d]
39
+ - Updated dependencies [db00edc]
40
+ - Updated dependencies [4f86ed4]
41
+ - Updated dependencies [41c6ee2]
42
+ - Updated dependencies [15c92a0]
43
+ - Updated dependencies [ad3ac4d]
44
+ - Updated dependencies [4c3ddbd]
45
+ - Updated dependencies [a0a30b3]
46
+ - Updated dependencies [ac6b3de]
47
+ - Updated dependencies [2d5682c]
48
+ - Updated dependencies [cb933a7]
49
+ - Updated dependencies [7f35e3d]
50
+ - @axiom-lattice/core@4.3.0
51
+ - @axiom-lattice/protocols@4.4.0
52
+
3
53
  ## 3.1.17
4
54
 
5
55
  ### Patch Changes
package/dist/index.js CHANGED
@@ -4977,6 +4977,7 @@ function mapRowToTask(row) {
4977
4977
  }
4978
4978
 
4979
4979
  // src/stores/LocalTaskStore.ts
4980
+ var import_protocols5 = require("@axiom-lattice/protocols");
4980
4981
  var import_crypto6 = require("crypto");
4981
4982
  var MAX_CANONICAL_TASK_TIME = "9999-12-31T23:59:59.999Z";
4982
4983
  var TASK_STATUSES = /* @__PURE__ */ new Set([
@@ -5161,15 +5162,18 @@ var LocalTaskStore = class {
5161
5162
  if (filter.metadata) {
5162
5163
  for (const [key, value] of Object.entries(filter.metadata)) {
5163
5164
  const safeKey = key.replace(/[^a-zA-Z0-9_]/g, "");
5164
- if (safeKey) {
5165
- const strVal = String(value);
5166
- if (strVal === "true" || strVal === "false") {
5167
- conditions.push(`(json_extract(metadata, '$.${safeKey}') = ? OR json_extract(metadata, '$.${safeKey}') = ?)`);
5168
- params.push(strVal, strVal === "true" ? 1 : 0);
5169
- } else {
5170
- conditions.push(`json_extract(metadata, '$.${safeKey}') = ?`);
5171
- params.push(strVal);
5172
- }
5165
+ const expected = (0, import_protocols5.normalizeTaskMetadataScalar)(value);
5166
+ if (!safeKey || expected === void 0) continue;
5167
+ if (expected === "true" || expected === "false") {
5168
+ conditions.push(
5169
+ `(json_type(metadata, '$.${safeKey}') = ? OR CAST(json_extract(metadata, '$.${safeKey}') AS TEXT) = ?)`
5170
+ );
5171
+ params.push(expected, expected);
5172
+ } else {
5173
+ conditions.push(
5174
+ `(json_type(metadata, '$.${safeKey}') NOT IN ('true', 'false') AND CAST(json_extract(metadata, '$.${safeKey}') AS TEXT) = ?)`
5175
+ );
5176
+ params.push(expected);
5173
5177
  }
5174
5178
  }
5175
5179
  }
@@ -5733,7 +5737,7 @@ var LocalTaskStore = class {
5733
5737
  };
5734
5738
 
5735
5739
  // src/stores/LocalTaskWorkItemStore.ts
5736
- var import_protocols5 = require("@axiom-lattice/protocols");
5740
+ var import_protocols6 = require("@axiom-lattice/protocols");
5737
5741
  var import_uuid2 = require("uuid");
5738
5742
  var PROJECT_LIFECYCLE_ACTIONS = /* @__PURE__ */ new Set([
5739
5743
  "in_progress",
@@ -5958,8 +5962,8 @@ var LocalTaskWorkItemStore = class {
5958
5962
  }
5959
5963
  /** List pending execution results using one bounded SQLite anti-join query. */
5960
5964
  async listPendingExecutionResults(params) {
5961
- if (!Number.isSafeInteger(params.limit) || params.limit < 0 || params.limit > import_protocols5.MAX_PENDING_EXECUTION_RESULTS_LIMIT) {
5962
- const error = new RangeError(`limit must be a safe integer between 0 and ${import_protocols5.MAX_PENDING_EXECUTION_RESULTS_LIMIT}`);
5965
+ if (!Number.isSafeInteger(params.limit) || params.limit < 0 || params.limit > import_protocols6.MAX_PENDING_EXECUTION_RESULTS_LIMIT) {
5966
+ const error = new RangeError(`limit must be a safe integer between 0 and ${import_protocols6.MAX_PENDING_EXECUTION_RESULTS_LIMIT}`);
5963
5967
  error.code = "INVALID_LIMIT";
5964
5968
  throw error;
5965
5969
  }
@@ -6064,7 +6068,7 @@ var LocalCapabilityBundleStore = class {
6064
6068
  async update(tenantId, id, input) {
6065
6069
  const existing = await this.getById(tenantId, id);
6066
6070
  if (!existing) return null;
6067
- if (input.expectedUpdatedAt !== void 0 && input.expectedUpdatedAt !== existing.updatedAt) return { status: "conflict" };
6071
+ if (input.expectedUpdatedAt !== existing.updatedAt) return { status: "conflict" };
6068
6072
  const fields = [];
6069
6073
  const values = [];
6070
6074
  const add = (field, value) => {
@@ -6079,12 +6083,8 @@ var LocalCapabilityBundleStore = class {
6079
6083
  fields.push("updated_at = ?");
6080
6084
  values.push(now, tenantId, id);
6081
6085
  try {
6082
- if (input.expectedUpdatedAt !== void 0) {
6083
- const result = this.db.prepare(`UPDATE lt_capability_bundles SET ${fields.join(", ")} WHERE tenant_id = ? AND id = ? AND updated_at = ?`).run(...values, input.expectedUpdatedAt);
6084
- if (result.changes === 0) return { status: "conflict" };
6085
- } else {
6086
- this.db.prepare(`UPDATE lt_capability_bundles SET ${fields.join(", ")} WHERE tenant_id = ? AND id = ?`).run(...values);
6087
- }
6086
+ const result = this.db.prepare(`UPDATE lt_capability_bundles SET ${fields.join(", ")} WHERE tenant_id = ? AND id = ? AND updated_at = ?`).run(...values, input.expectedUpdatedAt);
6087
+ if (result.changes === 0) return { status: "conflict" };
6088
6088
  } catch (error) {
6089
6089
  if (isConstraint(error)) throw new Error(duplicateMessage);
6090
6090
  throw error;