@axiom-lattice/pg-stores 2.0.7 → 2.0.8

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/pg-stores@2.0.7 build /home/runner/work/agentic/agentic/packages/pg-stores
2
+ > @axiom-lattice/pg-stores@2.0.8 build /home/runner/work/agentic/agentic/packages/pg-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 270.57 KB
12
- ESM dist/index.mjs.map 516.16 KB
13
- ESM ⚡️ Build success in 665ms
14
- CJS dist/index.js 277.18 KB
15
- CJS dist/index.js.map 516.45 KB
16
- CJS ⚡️ Build success in 698ms
11
+ CJS dist/index.js 278.86 KB
12
+ CJS dist/index.js.map 519.45 KB
13
+ CJS ⚡️ Build success in 723ms
14
+ ESM dist/index.mjs 272.21 KB
15
+ ESM dist/index.mjs.map 519.16 KB
16
+ ESM ⚡️ Build success in 726ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 16004ms
19
- DTS dist/index.d.ts 61.92 KB
20
- DTS dist/index.d.mts 61.92 KB
18
+ DTS ⚡️ Build success in 17671ms
19
+ DTS dist/index.d.ts 62.06 KB
20
+ DTS dist/index.d.mts 62.06 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @axiom-lattice/pg-stores
2
2
 
3
+ ## 2.0.8
4
+
5
+ ### Patch Changes
6
+
7
+ - ecc456c: add agent workstation
8
+ - Updated dependencies [b4a8f17]
9
+ - Updated dependencies [ecc456c]
10
+ - @axiom-lattice/core@3.1.0
11
+ - @axiom-lattice/protocols@3.0.3
12
+
3
13
  ## 2.0.7
4
14
 
5
15
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1804,6 +1804,8 @@ declare const addInterruptColumnsToEval: Migration;
1804
1804
  declare const addInterruptPolicyToEvalCases: Migration;
1805
1805
  /** Enforce unique eval project name per tenant (eval-{agent-id} convention) */
1806
1806
  declare const enforceUniqueEvalProjectName: Migration;
1807
+ /** Add task_id to eval runs (training round association, 1 task : N runs) */
1808
+ declare const addTaskIdToEvalRuns: Migration;
1807
1809
  /** All eval migrations in version order */
1808
1810
  declare const evalMigrations: Migration[];
1809
1811
 
@@ -1817,4 +1819,4 @@ declare const addFileContentType: Migration;
1817
1819
 
1818
1820
  declare const createCollectionsTable: Migration;
1819
1821
 
1820
- export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ThreadMessageQueueStore, addAssistantTenantId, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
1822
+ export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ThreadMessageQueueStore, addAssistantTenantId, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addTaskIdToEvalRuns, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
package/dist/index.d.ts CHANGED
@@ -1804,6 +1804,8 @@ declare const addInterruptColumnsToEval: Migration;
1804
1804
  declare const addInterruptPolicyToEvalCases: Migration;
1805
1805
  /** Enforce unique eval project name per tenant (eval-{agent-id} convention) */
1806
1806
  declare const enforceUniqueEvalProjectName: Migration;
1807
+ /** Add task_id to eval runs (training round association, 1 task : N runs) */
1808
+ declare const addTaskIdToEvalRuns: Migration;
1807
1809
  /** All eval migrations in version order */
1808
1810
  declare const evalMigrations: Migration[];
1809
1811
 
@@ -1817,4 +1819,4 @@ declare const addFileContentType: Migration;
1817
1819
 
1818
1820
  declare const createCollectionsTable: Migration;
1819
1821
 
1820
- export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ThreadMessageQueueStore, addAssistantTenantId, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
1822
+ export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ThreadMessageQueueStore, addAssistantTenantId, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addTaskIdToEvalRuns, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
package/dist/index.js CHANGED
@@ -66,6 +66,7 @@ __export(index_exports, {
66
66
  addScheduleTenantId: () => addScheduleTenantId,
67
67
  addSkillTenantId: () => addSkillTenantId,
68
68
  addStepThreadId: () => addStepThreadId,
69
+ addTaskIdToEvalRuns: () => addTaskIdToEvalRuns,
69
70
  addThreadTenantId: () => addThreadTenantId,
70
71
  addWorkflowRunsTenantStatusUpdatedIndex: () => addWorkflowRunsTenantStatusUpdatedIndex,
71
72
  alterChannelInstallationsTable: () => alterChannelInstallationsTable,
@@ -4122,6 +4123,26 @@ var enforceUniqueEvalProjectName = {
4122
4123
  `);
4123
4124
  }
4124
4125
  };
4126
+ var addTaskIdToEvalRuns = {
4127
+ version: 164,
4128
+ name: "add_task_id_to_eval_runs",
4129
+ up: async (client) => {
4130
+ await client.query(`
4131
+ ALTER TABLE lattice_eval_runs
4132
+ ADD COLUMN IF NOT EXISTS task_id TEXT
4133
+ `);
4134
+ await client.query(`
4135
+ CREATE INDEX IF NOT EXISTS idx_lattice_eval_runs_task_id
4136
+ ON lattice_eval_runs(task_id)
4137
+ `);
4138
+ },
4139
+ down: async (client) => {
4140
+ await client.query(`DROP INDEX IF EXISTS idx_lattice_eval_runs_task_id`);
4141
+ await client.query(`
4142
+ ALTER TABLE lattice_eval_runs DROP COLUMN IF EXISTS task_id
4143
+ `);
4144
+ }
4145
+ };
4125
4146
  var evalMigrations = [
4126
4147
  createEvalProjectsTable,
4127
4148
  createEvalSuitesTable,
@@ -4132,7 +4153,8 @@ var evalMigrations = [
4132
4153
  addEnvToEvalRuns,
4133
4154
  addInterruptColumnsToEval,
4134
4155
  addInterruptPolicyToEvalCases,
4135
- enforceUniqueEvalProjectName
4156
+ enforceUniqueEvalProjectName,
4157
+ addTaskIdToEvalRuns
4136
4158
  ];
4137
4159
 
4138
4160
  // src/stores/PostgreSQLEvalStore.ts
@@ -4260,6 +4282,7 @@ var PostgreSQLEvalStore = class {
4260
4282
  holdout: row.holdout,
4261
4283
  envProjectId: row.env_project_id,
4262
4284
  envWorkspaceId: row.env_workspace_id,
4285
+ taskId: row.task_id,
4263
4286
  createdAt: new Date(row.created_at),
4264
4287
  startedAt: row.started_at ? new Date(row.started_at) : void 0,
4265
4288
  completedAt: row.completed_at ? new Date(row.completed_at) : void 0
@@ -4627,7 +4650,7 @@ var PostgreSQLEvalStore = class {
4627
4650
  `SELECT id, project_id, tenant_id,
4628
4651
  status, concurrency, total_cases,
4629
4652
  passed_cases, failed_cases, interrupted_cases, avg_score,
4630
- error, holdout, env_project_id, env_workspace_id, created_at, started_at, completed_at
4653
+ error, holdout, env_project_id, env_workspace_id, task_id, created_at, started_at, completed_at
4631
4654
  FROM lattice_eval_runs
4632
4655
  WHERE ${conditions.join(" AND ")}
4633
4656
  ORDER BY created_at DESC`,
@@ -4642,7 +4665,7 @@ var PostgreSQLEvalStore = class {
4642
4665
  `SELECT id, project_id, tenant_id,
4643
4666
  status, concurrency, total_cases,
4644
4667
  passed_cases, failed_cases, interrupted_cases, avg_score,
4645
- error, holdout, env_project_id, env_workspace_id, created_at, started_at, completed_at
4668
+ error, holdout, env_project_id, env_workspace_id, task_id, created_at, started_at, completed_at
4646
4669
  FROM lattice_eval_runs
4647
4670
  WHERE id = $1 AND tenant_id = $2`,
4648
4671
  [id, tenantId]
@@ -4655,12 +4678,12 @@ var PostgreSQLEvalStore = class {
4655
4678
  const actualId = id || (0, import_uuid2.v4)();
4656
4679
  const { rows } = await this.pool.query(
4657
4680
  `INSERT INTO lattice_eval_runs
4658
- (id, project_id, tenant_id, status, concurrency, total_cases, passed_cases, failed_cases, avg_score, holdout, env_project_id, env_workspace_id, started_at)
4659
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)
4681
+ (id, project_id, tenant_id, status, concurrency, total_cases, passed_cases, failed_cases, avg_score, holdout, env_project_id, env_workspace_id, task_id, started_at)
4682
+ VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14)
4660
4683
  RETURNING id, project_id, tenant_id,
4661
4684
  status, concurrency, total_cases,
4662
4685
  passed_cases, failed_cases, interrupted_cases, avg_score,
4663
- error, holdout, env_project_id, env_workspace_id, created_at, started_at, completed_at`,
4686
+ error, holdout, env_project_id, env_workspace_id, task_id, created_at, started_at, completed_at`,
4664
4687
  [
4665
4688
  actualId,
4666
4689
  projectId,
@@ -4674,6 +4697,7 @@ var PostgreSQLEvalStore = class {
4674
4697
  data.holdout ?? false,
4675
4698
  data.envProjectId || null,
4676
4699
  data.envWorkspaceId || null,
4700
+ data.taskId || null,
4677
4701
  /* @__PURE__ */ new Date()
4678
4702
  ]
4679
4703
  );
@@ -4721,7 +4745,7 @@ var PostgreSQLEvalStore = class {
4721
4745
  RETURNING id, project_id, tenant_id,
4722
4746
  status, concurrency, total_cases,
4723
4747
  passed_cases, failed_cases, interrupted_cases, avg_score,
4724
- error, holdout, env_project_id, env_workspace_id, created_at, started_at, completed_at`,
4748
+ error, holdout, env_project_id, env_workspace_id, task_id, created_at, started_at, completed_at`,
4725
4749
  vals
4726
4750
  );
4727
4751
  return rows.length ? this.mapRowToRun(rows[0]) : null;
@@ -6675,9 +6699,40 @@ var addTaskProjectFieldsMigration = {
6675
6699
  `);
6676
6700
  }
6677
6701
  };
6702
+ var addFilesToTasks = {
6703
+ version: 141,
6704
+ name: "add_files_to_tasks",
6705
+ up: async (client) => {
6706
+ await client.query(`
6707
+ ALTER TABLE lattice_tasks
6708
+ ADD COLUMN IF NOT EXISTS files JSONB
6709
+ `);
6710
+ },
6711
+ down: async (client) => {
6712
+ await client.query(`
6713
+ ALTER TABLE lattice_tasks DROP COLUMN IF EXISTS files
6714
+ `);
6715
+ }
6716
+ };
6717
+ var taskMigrations = [
6718
+ createTasksTable,
6719
+ addTaskFieldsMigration,
6720
+ addTaskProjectFieldsMigration,
6721
+ addFilesToTasks
6722
+ ];
6678
6723
 
6679
6724
  // src/stores/PostgreSQLTaskStore.ts
6680
6725
  var import_uuid3 = require("uuid");
6726
+ function parseTaskFiles(raw) {
6727
+ if (!raw) return void 0;
6728
+ try {
6729
+ const parsed = typeof raw === "string" ? JSON.parse(raw) : raw;
6730
+ if (!Array.isArray(parsed)) return void 0;
6731
+ return parsed;
6732
+ } catch {
6733
+ return void 0;
6734
+ }
6735
+ }
6681
6736
  function mapRowToTask(row) {
6682
6737
  return {
6683
6738
  id: row.id,
@@ -6699,6 +6754,7 @@ function mapRowToTask(row) {
6699
6754
  failureReason: row.failure_reason ?? void 0,
6700
6755
  workspaceId: row.workspace_id ?? void 0,
6701
6756
  projectId: row.project_id ?? void 0,
6757
+ files: parseTaskFiles(row.files),
6702
6758
  createdAt: new Date(row.created_at),
6703
6759
  updatedAt: new Date(row.updated_at)
6704
6760
  };
@@ -6725,6 +6781,7 @@ var PostgreSQLTaskStore = class {
6725
6781
  this.migrationManager.register(createTasksTable);
6726
6782
  this.migrationManager.register(addTaskFieldsMigration);
6727
6783
  this.migrationManager.register(addTaskProjectFieldsMigration);
6784
+ this.migrationManager.register(addFilesToTasks);
6728
6785
  if (options.autoMigrate !== false) {
6729
6786
  this.initialize().catch((error) => {
6730
6787
  console.error("Failed to initialize PostgreSQLTaskStore:", error);
@@ -6754,8 +6811,8 @@ var PostgreSQLTaskStore = class {
6754
6811
  const id = (0, import_uuid3.v4)();
6755
6812
  const now = (/* @__PURE__ */ new Date()).toISOString();
6756
6813
  await this.pool.query(
6757
- `INSERT INTO lattice_tasks (id, tenant_id, owner_type, owner_id, title, description, status, priority, due_date, metadata, parent_id, source_id, context, require_review, dependencies, result, failure_reason, workspace_id, project_id, created_at, updated_at)
6758
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21)`,
6814
+ `INSERT INTO lattice_tasks (id, tenant_id, owner_type, owner_id, title, description, status, priority, due_date, metadata, parent_id, source_id, context, require_review, dependencies, result, failure_reason, workspace_id, project_id, files, created_at, updated_at)
6815
+ VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22)`,
6759
6816
  [
6760
6817
  id,
6761
6818
  params.tenantId,
@@ -6776,6 +6833,7 @@ var PostgreSQLTaskStore = class {
6776
6833
  params.failureReason ?? null,
6777
6834
  params.workspaceId || null,
6778
6835
  params.projectId || null,
6836
+ params.files ? JSON.stringify(params.files) : null,
6779
6837
  now,
6780
6838
  now
6781
6839
  ]
@@ -6880,6 +6938,10 @@ var PostgreSQLTaskStore = class {
6880
6938
  setClauses.push(`metadata = $${paramIndex++}`);
6881
6939
  params.push(JSON.stringify(updates.metadata));
6882
6940
  }
6941
+ if (updates.files !== void 0) {
6942
+ setClauses.push(`files = $${paramIndex++}`);
6943
+ params.push(JSON.stringify(updates.files));
6944
+ }
6883
6945
  if (updates.parentId !== void 0) {
6884
6946
  setClauses.push(`parent_id = $${paramIndex++}`);
6885
6947
  params.push(updates.parentId);
@@ -8059,14 +8121,14 @@ async function createPgStoreConfig(connectionString) {
8059
8121
  mm.register(createA2AApiKeysTable);
8060
8122
  mm.register(addWorkspaceProjectToQueue);
8061
8123
  mm.register(addAssistantOwnerUserId);
8062
- mm.register(createTasksTable);
8124
+ for (const m of taskMigrations) {
8125
+ mm.register(m);
8126
+ }
8063
8127
  mm.register(createMenuItemsTable);
8064
8128
  mm.register(createSharedResourcesTable);
8065
8129
  mm.register(addFileContentType);
8066
8130
  mm.register(createCollectionsTable);
8067
- mm.register(addTaskFieldsMigration);
8068
8131
  mm.register(createTaskWorkItemsMigration);
8069
- mm.register(addTaskProjectFieldsMigration);
8070
8132
  mm.register(addWorkItemProjectFieldsMigration);
8071
8133
  mm.register(createConnectionConfigsTable);
8072
8134
  mm.register(addWorkflowRunsTenantStatusUpdatedIndex);
@@ -8691,6 +8753,7 @@ function mapRowToChannelIdentityMapping(row) {
8691
8753
  addScheduleTenantId,
8692
8754
  addSkillTenantId,
8693
8755
  addStepThreadId,
8756
+ addTaskIdToEvalRuns,
8694
8757
  addThreadTenantId,
8695
8758
  addWorkflowRunsTenantStatusUpdatedIndex,
8696
8759
  alterChannelInstallationsTable,