@axiom-lattice/local-stores 1.0.21 → 1.0.22
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 +10 -10
- package/CHANGELOG.md +7 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/stores/LocalConnectionStore.ts +7 -0
- package/src/stores/LocalEvalStore.ts +8 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/local-stores@1.0.
|
|
2
|
+
> @axiom-lattice/local-stores@1.0.22 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
|
-
[32mESM[39m [1mdist/index.mjs [22m[
|
|
12
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[
|
|
13
|
-
[32mESM[39m ⚡️ Build success in
|
|
14
|
-
[32mCJS[39m [1mdist/index.js [22m[32m124.
|
|
15
|
-
[32mCJS[39m [1mdist/index.js.map [22m[
|
|
16
|
-
[32mCJS[39m ⚡️ Build success in
|
|
11
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m121.34 KB[39m
|
|
12
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m230.45 KB[39m
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 443ms
|
|
14
|
+
[32mCJS[39m [1mdist/index.js [22m[32m124.67 KB[39m
|
|
15
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m233.13 KB[39m
|
|
16
|
+
[32mCJS[39m ⚡️ Build success in 449ms
|
|
17
17
|
[34mDTS[39m Build start
|
|
18
|
-
[32mDTS[39m ⚡️ Build success in
|
|
19
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m27.
|
|
20
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m27.
|
|
18
|
+
[32mDTS[39m ⚡️ Build success in 15081ms
|
|
19
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m27.96 KB[39m
|
|
20
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m27.96 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -315,6 +315,7 @@ declare class LocalDatabaseConfigStore implements DatabaseConfigStore {
|
|
|
315
315
|
declare class LocalConnectionStore implements ConnectionStore {
|
|
316
316
|
private db;
|
|
317
317
|
constructor(db: DatabaseWrapper);
|
|
318
|
+
listByTenant(tenantId: string): Promise<ConnectionEntry[]>;
|
|
318
319
|
listByType(tenantId: string, type: string): Promise<ConnectionEntry[]>;
|
|
319
320
|
getByKey(tenantId: string, type: string, key: string): Promise<ConnectionEntry | null>;
|
|
320
321
|
create(entry: Omit<ConnectionEntry, "id" | "createdAt" | "updatedAt">): Promise<ConnectionEntry>;
|
|
@@ -422,6 +423,7 @@ declare class LocalEvalStore implements EvalStore {
|
|
|
422
423
|
private getRunResultById;
|
|
423
424
|
createRunResult(tenantId: string, runId: string, id: string, data: Omit<EvalRunResult, "id" | "runId" | "createdAt">): Promise<EvalRunResult>;
|
|
424
425
|
updateRunResult(tenantId: string, id: string, updates: Partial<EvalRunResult>): Promise<EvalRunResult | null>;
|
|
426
|
+
deleteRunResult(tenantId: string, id: string): Promise<boolean>;
|
|
425
427
|
getProjectReport(tenantId: string, projectId: string): Promise<EvalProjectReport | null>;
|
|
426
428
|
private mapRowToProject;
|
|
427
429
|
private mapRowToSuite;
|
package/dist/index.d.ts
CHANGED
|
@@ -315,6 +315,7 @@ declare class LocalDatabaseConfigStore implements DatabaseConfigStore {
|
|
|
315
315
|
declare class LocalConnectionStore implements ConnectionStore {
|
|
316
316
|
private db;
|
|
317
317
|
constructor(db: DatabaseWrapper);
|
|
318
|
+
listByTenant(tenantId: string): Promise<ConnectionEntry[]>;
|
|
318
319
|
listByType(tenantId: string, type: string): Promise<ConnectionEntry[]>;
|
|
319
320
|
getByKey(tenantId: string, type: string, key: string): Promise<ConnectionEntry | null>;
|
|
320
321
|
create(entry: Omit<ConnectionEntry, "id" | "createdAt" | "updatedAt">): Promise<ConnectionEntry>;
|
|
@@ -422,6 +423,7 @@ declare class LocalEvalStore implements EvalStore {
|
|
|
422
423
|
private getRunResultById;
|
|
423
424
|
createRunResult(tenantId: string, runId: string, id: string, data: Omit<EvalRunResult, "id" | "runId" | "createdAt">): Promise<EvalRunResult>;
|
|
424
425
|
updateRunResult(tenantId: string, id: string, updates: Partial<EvalRunResult>): Promise<EvalRunResult | null>;
|
|
426
|
+
deleteRunResult(tenantId: string, id: string): Promise<boolean>;
|
|
425
427
|
getProjectReport(tenantId: string, projectId: string): Promise<EvalProjectReport | null>;
|
|
426
428
|
private mapRowToProject;
|
|
427
429
|
private mapRowToSuite;
|
package/dist/index.js
CHANGED
|
@@ -1222,6 +1222,12 @@ var LocalConnectionStore = class {
|
|
|
1222
1222
|
this.db = db;
|
|
1223
1223
|
ensureTable(db, DDL9);
|
|
1224
1224
|
}
|
|
1225
|
+
async listByTenant(tenantId) {
|
|
1226
|
+
const rows = this.db.prepare(
|
|
1227
|
+
`SELECT * FROM connection_configs WHERE tenant_id = ? ORDER BY created_at`
|
|
1228
|
+
).all(tenantId);
|
|
1229
|
+
return rows.map((r) => this.mapRow(r));
|
|
1230
|
+
}
|
|
1225
1231
|
async listByType(tenantId, type) {
|
|
1226
1232
|
const rows = this.db.prepare(
|
|
1227
1233
|
`SELECT * FROM connection_configs WHERE tenant_id = ? AND type = ? ORDER BY created_at`
|
|
@@ -2413,6 +2419,13 @@ var LocalEvalStore = class {
|
|
|
2413
2419
|
).run(...vals);
|
|
2414
2420
|
return this.getRunResultById(tenantId, id);
|
|
2415
2421
|
}
|
|
2422
|
+
async deleteRunResult(tenantId, id) {
|
|
2423
|
+
const result = this.db.prepare(
|
|
2424
|
+
`DELETE FROM lt_eval_run_results
|
|
2425
|
+
WHERE id = ? AND run_id IN (SELECT id FROM lt_eval_runs WHERE tenant_id = ?)`
|
|
2426
|
+
).run(id, tenantId);
|
|
2427
|
+
return result.changes > 0;
|
|
2428
|
+
}
|
|
2416
2429
|
// -------------------------------------------------------------------------
|
|
2417
2430
|
// Reports
|
|
2418
2431
|
// -------------------------------------------------------------------------
|