@axiom-lattice/pg-stores 1.0.33 → 1.0.34

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@1.0.33 build /home/runner/work/agentic/agentic/packages/pg-stores
2
+ > @axiom-lattice/pg-stores@1.0.34 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
- CJS dist/index.js 130.75 KB
12
- CJS dist/index.js.map 243.67 KB
13
- CJS ⚡️ Build success in 327ms
14
- ESM dist/index.mjs 127.43 KB
15
- ESM dist/index.mjs.map 243.62 KB
16
- ESM ⚡️ Build success in 329ms
11
+ CJS dist/index.js 132.35 KB
12
+ CJS dist/index.js.map 245.86 KB
13
+ CJS ⚡️ Build success in 373ms
14
+ ESM dist/index.mjs 128.40 KB
15
+ ESM dist/index.mjs.map 245.79 KB
16
+ ESM ⚡️ Build success in 377ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 11993ms
19
- DTS dist/index.d.ts 34.53 KB
20
- DTS dist/index.d.mts 34.53 KB
18
+ DTS ⚡️ Build success in 11712ms
19
+ DTS dist/index.d.ts 34.60 KB
20
+ DTS dist/index.d.mts 34.60 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @axiom-lattice/pg-stores
2
2
 
3
+ ## 1.0.34
4
+
5
+ ### Patch Changes
6
+
7
+ - e8fc7ec: fix subagent issue
8
+ - Updated dependencies [e8fc7ec]
9
+ - @axiom-lattice/core@2.1.44
10
+
3
11
  ## 1.0.33
4
12
 
5
13
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1113,7 +1113,7 @@ declare class ThreadMessageQueueStore implements IMessageQueueStore {
1113
1113
  * Add message at head of queue (high priority, e.g., STEER/Command messages)
1114
1114
  * Uses priority=100 to ensure message is processed first
1115
1115
  */
1116
- addMessageAtHead(threadId: string, content: any, type?: "human" | "system"): Promise<PendingMessage>;
1116
+ addMessageAtHead(threadId: string, content: PendingMessage["content"], type?: "human" | "system", id?: string, command?: PendingMessage["command"]): Promise<PendingMessage>;
1117
1117
  /**
1118
1118
  * Get pending messages for thread
1119
1119
  */
package/dist/index.d.ts CHANGED
@@ -1113,7 +1113,7 @@ declare class ThreadMessageQueueStore implements IMessageQueueStore {
1113
1113
  * Add message at head of queue (high priority, e.g., STEER/Command messages)
1114
1114
  * Uses priority=100 to ensure message is processed first
1115
1115
  */
1116
- addMessageAtHead(threadId: string, content: any, type?: "human" | "system"): Promise<PendingMessage>;
1116
+ addMessageAtHead(threadId: string, content: PendingMessage["content"], type?: "human" | "system", id?: string, command?: PendingMessage["command"]): Promise<PendingMessage>;
1117
1117
  /**
1118
1118
  * Get pending messages for thread
1119
1119
  */
package/dist/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/index.ts
@@ -4067,6 +4077,7 @@ var createThreadMessageQueueTable = {
4067
4077
  };
4068
4078
 
4069
4079
  // src/stores/ThreadMessageQueueStore.ts
4080
+ var import_crypto = __toESM(require("crypto"));
4070
4081
  var import_core4 = require("@axiom-lattice/core");
4071
4082
 
4072
4083
  // src/migrations/add_priority_command_columns.ts
@@ -4094,6 +4105,31 @@ var addPriorityAndCommandColumns = {
4094
4105
  }
4095
4106
  };
4096
4107
 
4108
+ // src/migrations/alter_message_queue_id_column.ts
4109
+ var alterMessageQueueIdColumn = {
4110
+ version: 102,
4111
+ name: "alter_message_queue_id_column",
4112
+ up: async (client) => {
4113
+ await client.query(`
4114
+ ALTER TABLE lattice_thread_message_queue
4115
+ ALTER COLUMN id DROP DEFAULT
4116
+ `);
4117
+ await client.query(`
4118
+ COMMENT ON COLUMN lattice_thread_message_queue.id IS
4119
+ 'Message ID - must be provided explicitly (UUID format). Used for consistent ID across client and server.'
4120
+ `);
4121
+ },
4122
+ down: async (client) => {
4123
+ await client.query(`
4124
+ ALTER TABLE lattice_thread_message_queue
4125
+ ALTER COLUMN id SET DEFAULT gen_random_uuid()
4126
+ `);
4127
+ await client.query(`
4128
+ COMMENT ON COLUMN lattice_thread_message_queue.id IS NULL
4129
+ `);
4130
+ }
4131
+ };
4132
+
4097
4133
  // src/stores/ThreadMessageQueueStore.ts
4098
4134
  var ThreadMessageQueueStore = class _ThreadMessageQueueStore {
4099
4135
  constructor() {
@@ -4117,6 +4153,7 @@ var ThreadMessageQueueStore = class _ThreadMessageQueueStore {
4117
4153
  const migrationManager = new MigrationManager(pool);
4118
4154
  migrationManager.register(createThreadMessageQueueTable);
4119
4155
  migrationManager.register(addPriorityAndCommandColumns);
4156
+ migrationManager.register(alterMessageQueueIdColumn);
4120
4157
  await migrationManager.migrate();
4121
4158
  this.initialized = true;
4122
4159
  }
@@ -4132,7 +4169,7 @@ var ThreadMessageQueueStore = class _ThreadMessageQueueStore {
4132
4169
  */
4133
4170
  async addMessage(params) {
4134
4171
  const pool = this.getPool();
4135
- const { threadId, tenantId, assistantId, content, type = "human", priority = 0, command } = params;
4172
+ const { threadId, tenantId, assistantId, content, type = "human", priority = 0, command, id } = params;
4136
4173
  const seqResult = await pool.query(
4137
4174
  `SELECT COALESCE(MAX(sequence_order), 0) + 1 as next_seq
4138
4175
  FROM lattice_thread_message_queue
@@ -4142,10 +4179,10 @@ var ThreadMessageQueueStore = class _ThreadMessageQueueStore {
4142
4179
  const nextSeq = seqResult.rows[0].next_seq;
4143
4180
  const result = await pool.query(
4144
4181
  `INSERT INTO lattice_thread_message_queue
4145
- (thread_id, tenant_id, assistant_id, message_content, message_type, sequence_order, priority, command)
4146
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8)
4182
+ (id, thread_id, tenant_id, assistant_id, message_content, message_type, sequence_order, priority, command)
4183
+ VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)
4147
4184
  RETURNING *`,
4148
- [threadId, tenantId, assistantId, JSON.stringify(content), type, nextSeq, priority, command ? JSON.stringify(command) : null]
4185
+ [id || import_crypto.default.randomUUID(), threadId, tenantId, assistantId, JSON.stringify(content), type, nextSeq, priority, command ? JSON.stringify(command) : null]
4149
4186
  );
4150
4187
  return this.rowToMessage(result.rows[0]);
4151
4188
  }
@@ -4153,7 +4190,7 @@ var ThreadMessageQueueStore = class _ThreadMessageQueueStore {
4153
4190
  * Add message at head of queue (high priority, e.g., STEER/Command messages)
4154
4191
  * Uses priority=100 to ensure message is processed first
4155
4192
  */
4156
- async addMessageAtHead(threadId, content, type = "system") {
4193
+ async addMessageAtHead(threadId, content, type = "system", id, command) {
4157
4194
  const pool = this.getPool();
4158
4195
  const threadResult = await pool.query(
4159
4196
  `SELECT tenant_id, assistant_id
@@ -4177,10 +4214,10 @@ var ThreadMessageQueueStore = class _ThreadMessageQueueStore {
4177
4214
  const nextSeq = seqResult.rows[0].next_seq;
4178
4215
  const result = await pool.query(
4179
4216
  `INSERT INTO lattice_thread_message_queue
4180
- (thread_id, tenant_id, assistant_id, message_content, message_type, sequence_order, priority)
4181
- VALUES ($1, $2, $3, $4, $5, $6, 100)
4217
+ (id, thread_id, tenant_id, assistant_id, message_content, message_type, sequence_order, priority, command)
4218
+ VALUES ($1, $2, $3, $4, $5, $6, $7, 100, $8)
4182
4219
  RETURNING *`,
4183
- [threadId, tenantId, assistantId, JSON.stringify(content), type, nextSeq]
4220
+ [id || import_crypto.default.randomUUID(), threadId, tenantId, assistantId, JSON.stringify(content), type, nextSeq, command ? JSON.stringify(command) : null]
4184
4221
  );
4185
4222
  return this.rowToMessage(result.rows[0]);
4186
4223
  }