@axiom-lattice/local-stores 2.0.2 → 2.0.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiom-lattice/local-stores",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "Local SQLite-based stores for Axiom Lattice framework",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -25,8 +25,8 @@
25
25
  "@types/sql.js": "^1.4.11",
26
26
  "sql.js": "^1.14.1",
27
27
  "uuid": "^14.0.1",
28
- "@axiom-lattice/core": "3.0.2",
29
- "@axiom-lattice/protocols": "3.0.1"
28
+ "@axiom-lattice/core": "3.0.4",
29
+ "@axiom-lattice/protocols": "3.0.2"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^20.11.24",
@@ -73,6 +73,9 @@ CREATE TABLE IF NOT EXISTS lt_eval_runs (
73
73
  failed_cases INTEGER NOT NULL DEFAULT 0,
74
74
  avg_score REAL NOT NULL DEFAULT 0,
75
75
  error TEXT,
76
+ holdout INTEGER NOT NULL DEFAULT 0,
77
+ env_project_id TEXT,
78
+ env_workspace_id TEXT,
76
79
  created_at TEXT NOT NULL,
77
80
  started_at TEXT,
78
81
  completed_at TEXT,
@@ -310,9 +313,9 @@ export class LocalEvalStore implements EvalStore {
310
313
  async createRun(tenantId: string, projectId: string, id: string, data: CreateEvalRunRequest): Promise<EvalRun> {
311
314
  const actualId = id || randomUUID();
312
315
  this.db.prepare(
313
- `INSERT INTO lt_eval_runs (id, project_id, tenant_id, status, concurrency, total_cases, passed_cases, failed_cases, avg_score, created_at)
314
- VALUES (?, ?, ?, 'running', ?, ?, 0, 0, 0, ?)`,
315
- ).run(actualId, projectId, tenantId, data.concurrency, data.totalCases, nowISO());
316
+ `INSERT INTO lt_eval_runs (id, project_id, tenant_id, status, concurrency, total_cases, passed_cases, failed_cases, avg_score, holdout, env_project_id, env_workspace_id, created_at)
317
+ VALUES (?, ?, ?, 'running', ?, ?, 0, 0, 0, ?, ?, ?, ?)`,
318
+ ).run(actualId, projectId, tenantId, data.concurrency, data.totalCases, data.holdout ? 1 : 0, data.envProjectId || null, data.envWorkspaceId || null, nowISO());
316
319
  return (await this.getRunById(tenantId, actualId))!;
317
320
  }
318
321
 
@@ -492,6 +495,9 @@ export class LocalEvalStore implements EvalStore {
492
495
  failedCases: (row.failed_cases as number) ?? 0,
493
496
  avgScore: (row.avg_score as number) ?? 0,
494
497
  error: row.error as string | undefined,
498
+ holdout: row.holdout ? Boolean(row.holdout) : undefined,
499
+ envProjectId: row.env_project_id as string | undefined,
500
+ envWorkspaceId: row.env_workspace_id as string | undefined,
495
501
  createdAt: parseISO(row.created_at as string),
496
502
  startedAt: row.started_at ? parseISO(row.started_at as string) : undefined,
497
503
  completedAt: row.completed_at ? parseISO(row.completed_at as string) : undefined,