@axiom-lattice/local-stores 3.1.16 → 3.1.18
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +43 -0
- package/dist/index.js +19 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -16
- package/dist/index.mjs.map +1 -1
- package/jest.config.js +2 -0
- package/package.json +3 -3
- package/src/__tests__/LocalCapabilityBundleStore.test.ts +15 -6
- package/src/__tests__/LocalTaskStore.test.ts +33 -0
- package/src/__tests__/__mocks__/e2b.ts +1 -0
- package/src/stores/LocalCapabilityBundleStore.ts +1 -1
- package/src/stores/LocalTaskStore.ts +17 -12
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/local-stores@3.1.
|
|
2
|
+
> @axiom-lattice/local-stores@3.1.18 build /home/runner/work/agentic/agentic/packages/local-stores
|
|
3
3
|
> tsup src/index.ts --format cjs,esm --dts --sourcemap
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
[34mCLI[39m Target: es2020
|
|
9
9
|
[34mCJS[39m Build start
|
|
10
10
|
[34mESM[39m Build start
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
11
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m223.78 KB[39m
|
|
12
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m410.01 KB[39m
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 646ms
|
|
14
|
+
[32mCJS[39m [1mdist/index.js [22m[32m228.33 KB[39m
|
|
15
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m413.70 KB[39m
|
|
16
|
+
[32mCJS[39m ⚡️ Build success in 671ms
|
|
17
17
|
[34mDTS[39m Build start
|
|
18
|
-
[32mDTS[39m ⚡️ Build success in
|
|
18
|
+
[32mDTS[39m ⚡️ Build success in 12952ms
|
|
19
19
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m41.91 KB[39m
|
|
20
20
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m41.91 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @axiom-lattice/local-stores
|
|
2
2
|
|
|
3
|
+
## 3.1.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 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.
|
|
8
|
+
- e4a110f: mcp ui etc
|
|
9
|
+
- 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.
|
|
10
|
+
- Updated dependencies [0b7cabc]
|
|
11
|
+
- Updated dependencies [c5cd1fe]
|
|
12
|
+
- Updated dependencies [ecd28e5]
|
|
13
|
+
- Updated dependencies [8ed0255]
|
|
14
|
+
- Updated dependencies [15b7181]
|
|
15
|
+
- Updated dependencies [1cc5893]
|
|
16
|
+
- Updated dependencies [e4a110f]
|
|
17
|
+
- Updated dependencies [2fd1187]
|
|
18
|
+
- Updated dependencies [015a931]
|
|
19
|
+
- Updated dependencies [3398474]
|
|
20
|
+
- Updated dependencies [a87f880]
|
|
21
|
+
- Updated dependencies [9de0600]
|
|
22
|
+
- Updated dependencies [fbc46a4]
|
|
23
|
+
- Updated dependencies [978699d]
|
|
24
|
+
- Updated dependencies [db00edc]
|
|
25
|
+
- Updated dependencies [4f86ed4]
|
|
26
|
+
- Updated dependencies [41c6ee2]
|
|
27
|
+
- Updated dependencies [15c92a0]
|
|
28
|
+
- Updated dependencies [ad3ac4d]
|
|
29
|
+
- Updated dependencies [4c3ddbd]
|
|
30
|
+
- Updated dependencies [a0a30b3]
|
|
31
|
+
- Updated dependencies [ac6b3de]
|
|
32
|
+
- Updated dependencies [2d5682c]
|
|
33
|
+
- Updated dependencies [cb933a7]
|
|
34
|
+
- Updated dependencies [7f35e3d]
|
|
35
|
+
- @axiom-lattice/core@4.3.0
|
|
36
|
+
- @axiom-lattice/protocols@4.4.0
|
|
37
|
+
|
|
38
|
+
## 3.1.17
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- Updated dependencies [2d178cb]
|
|
43
|
+
- @axiom-lattice/core@4.2.17
|
|
44
|
+
- @axiom-lattice/protocols@4.3.2
|
|
45
|
+
|
|
3
46
|
## 3.1.16
|
|
4
47
|
|
|
5
48
|
### 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
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
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
|
|
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 >
|
|
5962
|
-
const error = new RangeError(`limit must be a safe integer between 0 and ${
|
|
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 !==
|
|
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
|
-
|
|
6083
|
-
|
|
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;
|