@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/local-stores@1.0.21 build /home/runner/work/agentic/agentic/packages/local-stores
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
  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 120.87 KB
12
- ESM dist/index.mjs.map 229.59 KB
13
- ESM ⚡️ Build success in 323ms
14
- CJS dist/index.js 124.21 KB
15
- CJS dist/index.js.map 232.26 KB
16
- CJS ⚡️ Build success in 350ms
11
+ ESM dist/index.mjs 121.34 KB
12
+ ESM dist/index.mjs.map 230.45 KB
13
+ ESM ⚡️ Build success in 443ms
14
+ CJS dist/index.js 124.67 KB
15
+ CJS dist/index.js.map 233.13 KB
16
+ CJS ⚡️ Build success in 449ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 13776ms
19
- DTS dist/index.d.ts 27.83 KB
20
- DTS dist/index.d.mts 27.83 KB
18
+ DTS ⚡️ Build success in 15081ms
19
+ DTS dist/index.d.ts 27.96 KB
20
+ DTS dist/index.d.mts 27.96 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @axiom-lattice/local-stores
2
2
 
3
+ ## 1.0.22
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [2feab5c]
8
+ - @axiom-lattice/core@2.1.100
9
+
3
10
  ## 1.0.21
4
11
 
5
12
  ### Patch Changes
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
  // -------------------------------------------------------------------------