@nylorun/runtime 0.36.1-beta → 0.38.0-beta

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.
Files changed (71) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/README.md +10 -0
  3. package/dist/api/a2a/card.d.ts +10 -4
  4. package/dist/api/a2a/card.js +18 -6
  5. package/dist/api/a2a/endpoint.d.ts +5 -2
  6. package/dist/api/a2a/endpoint.js +31 -9
  7. package/dist/api/a2a/extensions.d.ts +41 -0
  8. package/dist/api/a2a/extensions.js +92 -0
  9. package/dist/api/a2a/list.d.ts +60 -0
  10. package/dist/api/a2a/list.js +169 -0
  11. package/dist/api/a2a/protocol.d.ts +105 -9
  12. package/dist/api/a2a/protocol.js +169 -18
  13. package/dist/api/a2a/push.d.ts +76 -0
  14. package/dist/api/a2a/push.js +305 -0
  15. package/dist/api/a2a/routes.d.ts +12 -6
  16. package/dist/api/a2a/routes.js +409 -112
  17. package/dist/api/a2a/tasks.d.ts +72 -4
  18. package/dist/api/a2a/tasks.js +305 -27
  19. package/dist/api/components.d.ts +538 -0
  20. package/dist/api/components.js +3 -1
  21. package/dist/api/http/app.js +2 -0
  22. package/dist/api/http/routes/artifacts.js +19 -0
  23. package/dist/api/http/routes/turns.d.ts +18 -0
  24. package/dist/api/http/routes/turns.js +67 -0
  25. package/dist/api/inbound-files.d.ts +12 -1
  26. package/dist/api/inbound-files.js +44 -0
  27. package/dist/api/openapi.js +7 -2
  28. package/dist/harness/image-engine.d.ts +14 -0
  29. package/dist/harness/image-engine.js +16 -0
  30. package/dist/harness/pod.d.ts +2 -0
  31. package/dist/harness/pod.js +5 -0
  32. package/dist/harness-api/ws-server.js +7 -1
  33. package/dist/host/config-for.d.ts +2 -0
  34. package/dist/host/config-for.js +1 -0
  35. package/dist/host/main.js +1 -0
  36. package/dist/host/stack-config.d.ts +16 -0
  37. package/dist/host/stack-config.js +30 -0
  38. package/dist/management-openapi.json +37 -2
  39. package/dist/openapi.json +1485 -738
  40. package/dist/reads/types.d.ts +19 -0
  41. package/dist/sandbox/join.d.ts +7 -1
  42. package/dist/sandbox/join.js +5 -1
  43. package/dist/sandbox/pods/builtin.d.ts +18 -0
  44. package/dist/sandbox/pods/builtin.js +33 -0
  45. package/dist/sandbox/pods/client.d.ts +5 -4
  46. package/dist/sandbox/pods/spec.js +14 -1
  47. package/dist/store/postgres/drizzle/0039_a2a_push.sql +32 -0
  48. package/dist/store/postgres/drizzle/0040_turn_index.sql +23 -0
  49. package/dist/store/postgres/drizzle/0041_turn_index_backfill.sql +88 -0
  50. package/dist/store/postgres/drizzle/0042_worker_engine_image.sql +1 -0
  51. package/dist/store/postgres/drizzle/meta/_journal.json +28 -0
  52. package/dist/store/postgres/reads.js +41 -1
  53. package/dist/store/postgres/schema.d.ts +1314 -533
  54. package/dist/store/postgres/schema.js +94 -0
  55. package/dist/store/postgres/store.js +135 -3
  56. package/dist/store/postgres/turns.d.ts +62 -0
  57. package/dist/store/postgres/turns.js +153 -0
  58. package/dist/store/types.d.ts +82 -3
  59. package/dist/tenant/runtime.js +7 -5
  60. package/dist/tenant/session-model.d.ts +11 -1
  61. package/dist/tenant/session-model.js +34 -5
  62. package/dist/tenant/sessions.d.ts +2 -1
  63. package/dist/tenant/sessions.js +8 -2
  64. package/dist/tenant/sweep.d.ts +3 -0
  65. package/dist/tenant/sweep.js +39 -11
  66. package/dist/tenant/types.d.ts +23 -0
  67. package/dist/tuning.d.ts +9 -0
  68. package/dist/tuning.js +11 -0
  69. package/dist/version.d.ts +1 -1
  70. package/dist/version.js +1 -1
  71. package/package.json +3 -3
@@ -1302,6 +1302,25 @@ export declare const agents: import("drizzle-orm/pg-core").PgTableWithColumns<{
1302
1302
  }, {}, {
1303
1303
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
1304
1304
  }>;
1305
+ engineImage: import("drizzle-orm/pg-core").PgColumn<{
1306
+ name: "engineImage";
1307
+ tableName: "agents";
1308
+ dataType: "custom";
1309
+ columnType: "PgCustomColumn";
1310
+ data: unknown;
1311
+ driverParam: unknown;
1312
+ notNull: false;
1313
+ hasDefault: false;
1314
+ isPrimaryKey: false;
1315
+ isAutoincrement: false;
1316
+ hasRuntimeDefault: false;
1317
+ enumValues: undefined;
1318
+ baseColumn: never;
1319
+ identity: undefined;
1320
+ generated: undefined;
1321
+ }, {}, {
1322
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
1323
+ }>;
1305
1324
  diskOp: import("drizzle-orm/pg-core").PgColumn<{
1306
1325
  name: "diskOp";
1307
1326
  tableName: "agents";
@@ -4001,24 +4020,27 @@ export declare const modelBudgets: import("drizzle-orm/pg-core").PgTableWithColu
4001
4020
  dialect: 'pg';
4002
4021
  }>;
4003
4022
  /**
4004
- * Each session's queue (protocol 17, D76): messages that arrived while its turn ran or waited, in
4005
- * order (`seq`), until a turn takes them. A row holds the command as sent, the turn input its
4006
- * message gives the engine (file parts pinned when it was queued), and who sent it.
4023
+ * The turn index (A2A design §9, Host feature `turns`): one row per turn, written by `Tx.event`
4024
+ * in the transaction of each event that changes the turn (`store/postgres/turns.ts`), so it
4025
+ * agrees with the session's log. The session's Agent, owner and A2A context are copied in when
4026
+ * the turn starts. `txid` is the transaction that last changed the row: the change feed reads
4027
+ * rows in its order, only below every transaction still running (`pg_snapshot_xmin`), as the
4028
+ * model call export does. `firstSeq` and `lastSeq` bound the turn's lifecycle events in the log.
4007
4029
  */
4008
- export declare const sessionQueue: import("drizzle-orm/pg-core").PgTableWithColumns<{
4009
- name: "session_queue";
4030
+ export declare const turns: import("drizzle-orm/pg-core").PgTableWithColumns<{
4031
+ name: "turns";
4010
4032
  schema: "nylorun";
4011
4033
  columns: {
4012
- id: import("drizzle-orm/pg-core").PgColumn<{
4013
- name: "id";
4014
- tableName: "session_queue";
4034
+ sessionId: import("drizzle-orm/pg-core").PgColumn<{
4035
+ name: "sessionId";
4036
+ tableName: "turns";
4015
4037
  dataType: "custom";
4016
4038
  columnType: "PgCustomColumn";
4017
4039
  data: string;
4018
4040
  driverParam: string;
4019
4041
  notNull: true;
4020
4042
  hasDefault: false;
4021
- isPrimaryKey: true;
4043
+ isPrimaryKey: false;
4022
4044
  isAutoincrement: false;
4023
4045
  hasRuntimeDefault: false;
4024
4046
  enumValues: undefined;
@@ -4028,9 +4050,9 @@ export declare const sessionQueue: import("drizzle-orm/pg-core").PgTableWithColu
4028
4050
  }, {}, {
4029
4051
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4030
4052
  }>;
4031
- sessionId: import("drizzle-orm/pg-core").PgColumn<{
4032
- name: "sessionId";
4033
- tableName: "session_queue";
4053
+ turnId: import("drizzle-orm/pg-core").PgColumn<{
4054
+ name: "turnId";
4055
+ tableName: "turns";
4034
4056
  dataType: "custom";
4035
4057
  columnType: "PgCustomColumn";
4036
4058
  data: string;
@@ -4047,30 +4069,13 @@ export declare const sessionQueue: import("drizzle-orm/pg-core").PgTableWithColu
4047
4069
  }, {}, {
4048
4070
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4049
4071
  }>;
4050
- seq: import("drizzle-orm/pg-core").PgColumn<{
4051
- name: "seq";
4052
- tableName: "session_queue";
4053
- dataType: "number";
4054
- columnType: "PgBigInt53";
4055
- data: number;
4056
- driverParam: string | number;
4057
- notNull: true;
4058
- hasDefault: false;
4059
- isPrimaryKey: false;
4060
- isAutoincrement: false;
4061
- hasRuntimeDefault: false;
4062
- enumValues: undefined;
4063
- baseColumn: never;
4064
- identity: undefined;
4065
- generated: undefined;
4066
- }, {}, {}>;
4067
- command: import("drizzle-orm/pg-core").PgColumn<{
4068
- name: "command";
4069
- tableName: "session_queue";
4072
+ agentId: import("drizzle-orm/pg-core").PgColumn<{
4073
+ name: "agentId";
4074
+ tableName: "turns";
4070
4075
  dataType: "custom";
4071
4076
  columnType: "PgCustomColumn";
4072
- data: unknown;
4073
- driverParam: unknown;
4077
+ data: string;
4078
+ driverParam: string;
4074
4079
  notNull: true;
4075
4080
  hasDefault: false;
4076
4081
  isPrimaryKey: false;
@@ -4083,14 +4088,14 @@ export declare const sessionQueue: import("drizzle-orm/pg-core").PgTableWithColu
4083
4088
  }, {}, {
4084
4089
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4085
4090
  }>;
4086
- input: import("drizzle-orm/pg-core").PgColumn<{
4087
- name: "input";
4088
- tableName: "session_queue";
4091
+ ownerUserId: import("drizzle-orm/pg-core").PgColumn<{
4092
+ name: "ownerUserId";
4093
+ tableName: "turns";
4089
4094
  dataType: "custom";
4090
4095
  columnType: "PgCustomColumn";
4091
- data: unknown;
4092
- driverParam: unknown;
4093
- notNull: true;
4096
+ data: string;
4097
+ driverParam: string;
4098
+ notNull: false;
4094
4099
  hasDefault: false;
4095
4100
  isPrimaryKey: false;
4096
4101
  isAutoincrement: false;
@@ -4102,14 +4107,14 @@ export declare const sessionQueue: import("drizzle-orm/pg-core").PgTableWithColu
4102
4107
  }, {}, {
4103
4108
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4104
4109
  }>;
4105
- fileArtifacts: import("drizzle-orm/pg-core").PgColumn<{
4106
- name: "fileArtifacts";
4107
- tableName: "session_queue";
4110
+ a2aContextId: import("drizzle-orm/pg-core").PgColumn<{
4111
+ name: "a2aContextId";
4112
+ tableName: "turns";
4108
4113
  dataType: "custom";
4109
4114
  columnType: "PgCustomColumn";
4110
- data: unknown;
4111
- driverParam: unknown;
4112
- notNull: true;
4115
+ data: string;
4116
+ driverParam: string;
4117
+ notNull: false;
4113
4118
  hasDefault: false;
4114
4119
  isPrimaryKey: false;
4115
4120
  isAutoincrement: false;
@@ -4121,33 +4126,31 @@ export declare const sessionQueue: import("drizzle-orm/pg-core").PgTableWithColu
4121
4126
  }, {}, {
4122
4127
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4123
4128
  }>;
4124
- writer: import("drizzle-orm/pg-core").PgColumn<{
4125
- name: "writer";
4126
- tableName: "session_queue";
4127
- dataType: "custom";
4128
- columnType: "PgCustomColumn";
4129
- data: unknown;
4130
- driverParam: unknown;
4129
+ status: import("drizzle-orm/pg-core").PgColumn<{
4130
+ name: "status";
4131
+ tableName: "turns";
4132
+ dataType: "string";
4133
+ columnType: "PgText";
4134
+ data: "cancelled" | "completed" | "failed" | "paused" | "running";
4135
+ driverParam: string;
4131
4136
  notNull: true;
4132
4137
  hasDefault: false;
4133
4138
  isPrimaryKey: false;
4134
4139
  isAutoincrement: false;
4135
4140
  hasRuntimeDefault: false;
4136
- enumValues: undefined;
4141
+ enumValues: ["running", "paused", "completed", "failed", "cancelled"];
4137
4142
  baseColumn: never;
4138
4143
  identity: undefined;
4139
4144
  generated: undefined;
4140
- }, {}, {
4141
- pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4142
- }>;
4143
- trace: import("drizzle-orm/pg-core").PgColumn<{
4144
- name: "trace";
4145
- tableName: "session_queue";
4145
+ }, {}, {}>;
4146
+ startedAt: import("drizzle-orm/pg-core").PgColumn<{
4147
+ name: "startedAt";
4148
+ tableName: "turns";
4146
4149
  dataType: "custom";
4147
4150
  columnType: "PgCustomColumn";
4148
- data: unknown;
4149
- driverParam: unknown;
4150
- notNull: false;
4151
+ data: string;
4152
+ driverParam: string;
4153
+ notNull: true;
4151
4154
  hasDefault: false;
4152
4155
  isPrimaryKey: false;
4153
4156
  isAutoincrement: false;
@@ -4159,13 +4162,13 @@ export declare const sessionQueue: import("drizzle-orm/pg-core").PgTableWithColu
4159
4162
  }, {}, {
4160
4163
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4161
4164
  }>;
4162
- cause: import("drizzle-orm/pg-core").PgColumn<{
4163
- name: "cause";
4164
- tableName: "session_queue";
4165
+ endedAt: import("drizzle-orm/pg-core").PgColumn<{
4166
+ name: "endedAt";
4167
+ tableName: "turns";
4165
4168
  dataType: "custom";
4166
4169
  columnType: "PgCustomColumn";
4167
- data: unknown;
4168
- driverParam: unknown;
4170
+ data: string;
4171
+ driverParam: string;
4169
4172
  notNull: false;
4170
4173
  hasDefault: false;
4171
4174
  isPrimaryKey: false;
@@ -4178,9 +4181,9 @@ export declare const sessionQueue: import("drizzle-orm/pg-core").PgTableWithColu
4178
4181
  }, {}, {
4179
4182
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4180
4183
  }>;
4181
- createdAt: import("drizzle-orm/pg-core").PgColumn<{
4182
- name: "createdAt";
4183
- tableName: "session_queue";
4184
+ changedAt: import("drizzle-orm/pg-core").PgColumn<{
4185
+ name: "changedAt";
4186
+ tableName: "turns";
4184
4187
  dataType: "custom";
4185
4188
  columnType: "PgCustomColumn";
4186
4189
  data: string;
@@ -4197,30 +4200,16 @@ export declare const sessionQueue: import("drizzle-orm/pg-core").PgTableWithColu
4197
4200
  }, {}, {
4198
4201
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4199
4202
  }>;
4200
- };
4201
- dialect: 'pg';
4202
- }>;
4203
- /**
4204
- * The Tool Gate's keyed MCP calls (F4.1 G3): one row per call, written by the gates service
4205
- * before it calls the server and given the answer after. A re-send whose row has an answer
4206
- * gets it; one whose row has none, and that the gateway no longer runs, was lost with an
4207
- * earlier gateway and answers `uncertain`, so a call is never run twice. Rows are deleted a
4208
- * day after they settle.
4209
- */
4210
- export declare const toolCrossings: import("drizzle-orm/pg-core").PgTableWithColumns<{
4211
- name: "tool_crossings";
4212
- schema: "nylorun";
4213
- columns: {
4214
- key: import("drizzle-orm/pg-core").PgColumn<{
4215
- name: "key";
4216
- tableName: "tool_crossings";
4203
+ totals: import("drizzle-orm/pg-core").PgColumn<{
4204
+ name: "totals";
4205
+ tableName: "turns";
4217
4206
  dataType: "custom";
4218
4207
  columnType: "PgCustomColumn";
4219
- data: string;
4220
- driverParam: string;
4221
- notNull: true;
4208
+ data: unknown;
4209
+ driverParam: unknown;
4210
+ notNull: false;
4222
4211
  hasDefault: false;
4223
- isPrimaryKey: true;
4212
+ isPrimaryKey: false;
4224
4213
  isAutoincrement: false;
4225
4214
  hasRuntimeDefault: false;
4226
4215
  enumValues: undefined;
@@ -4230,30 +4219,73 @@ export declare const toolCrossings: import("drizzle-orm/pg-core").PgTableWithCol
4230
4219
  }, {}, {
4231
4220
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4232
4221
  }>;
4233
- hash: import("drizzle-orm/pg-core").PgColumn<{
4234
- name: "hash";
4235
- tableName: "tool_crossings";
4222
+ waitingFor: import("drizzle-orm/pg-core").PgColumn<{
4223
+ name: "waitingFor";
4224
+ tableName: "turns";
4236
4225
  dataType: "string";
4237
4226
  columnType: "PgText";
4238
- data: string;
4227
+ data: "approval" | "connection" | "question";
4239
4228
  driverParam: string;
4240
- notNull: true;
4229
+ notNull: false;
4241
4230
  hasDefault: false;
4242
4231
  isPrimaryKey: false;
4243
4232
  isAutoincrement: false;
4244
4233
  hasRuntimeDefault: false;
4245
- enumValues: [string, ...string[]];
4234
+ enumValues: ["question", "approval", "connection"];
4246
4235
  baseColumn: never;
4247
4236
  identity: undefined;
4248
4237
  generated: undefined;
4249
4238
  }, {}, {}>;
4250
- startedAt: import("drizzle-orm/pg-core").PgColumn<{
4251
- name: "startedAt";
4252
- tableName: "tool_crossings";
4253
- dataType: "custom";
4254
- columnType: "PgCustomColumn";
4255
- data: string;
4256
- driverParam: string;
4239
+ queuedMessageIds: import("drizzle-orm/pg-core").PgColumn<{
4240
+ name: "queuedMessageIds";
4241
+ tableName: "turns";
4242
+ dataType: "array";
4243
+ columnType: "PgArray";
4244
+ data: string[];
4245
+ driverParam: string | string[];
4246
+ notNull: true;
4247
+ hasDefault: true;
4248
+ isPrimaryKey: false;
4249
+ isAutoincrement: false;
4250
+ hasRuntimeDefault: false;
4251
+ enumValues: [string, ...string[]];
4252
+ baseColumn: import("drizzle-orm").Column<{
4253
+ name: "";
4254
+ tableName: "turns";
4255
+ dataType: "string";
4256
+ columnType: "PgText";
4257
+ data: string;
4258
+ driverParam: string;
4259
+ notNull: false;
4260
+ hasDefault: false;
4261
+ isPrimaryKey: false;
4262
+ isAutoincrement: false;
4263
+ hasRuntimeDefault: false;
4264
+ enumValues: [string, ...string[]];
4265
+ baseColumn: never;
4266
+ identity: undefined;
4267
+ generated: undefined;
4268
+ }, {}, {}>;
4269
+ identity: undefined;
4270
+ generated: undefined;
4271
+ }, {}, {
4272
+ baseBuilder: import("drizzle-orm/pg-core").PgColumnBuilder<{
4273
+ name: "";
4274
+ dataType: 'string';
4275
+ columnType: 'PgText';
4276
+ data: string;
4277
+ enumValues: [string, ...string[]];
4278
+ driverParam: string;
4279
+ }, {}, {}, import("drizzle-orm").ColumnBuilderExtraConfig>;
4280
+ size: undefined;
4281
+ }>;
4282
+ firstSeq: import("drizzle-orm/pg-core").PgColumn<{
4283
+ name: "firstSeq";
4284
+ tableName: "turns";
4285
+ dataType: "number";
4286
+ columnType: "PgBigInt53";
4287
+ data: number;
4288
+ driverParam: string | number;
4257
4289
  notNull: true;
4258
4290
  hasDefault: false;
4259
4291
  isPrimaryKey: false;
@@ -4263,17 +4295,15 @@ export declare const toolCrossings: import("drizzle-orm/pg-core").PgTableWithCol
4263
4295
  baseColumn: never;
4264
4296
  identity: undefined;
4265
4297
  generated: undefined;
4266
- }, {}, {
4267
- pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4268
- }>;
4269
- settledAt: import("drizzle-orm/pg-core").PgColumn<{
4270
- name: "settledAt";
4271
- tableName: "tool_crossings";
4272
- dataType: "custom";
4273
- columnType: "PgCustomColumn";
4274
- data: string;
4275
- driverParam: string;
4276
- notNull: false;
4298
+ }, {}, {}>;
4299
+ lastSeq: import("drizzle-orm/pg-core").PgColumn<{
4300
+ name: "lastSeq";
4301
+ tableName: "turns";
4302
+ dataType: "number";
4303
+ columnType: "PgBigInt53";
4304
+ data: number;
4305
+ driverParam: string | number;
4306
+ notNull: true;
4277
4307
  hasDefault: false;
4278
4308
  isPrimaryKey: false;
4279
4309
  isAutoincrement: false;
@@ -4282,18 +4312,16 @@ export declare const toolCrossings: import("drizzle-orm/pg-core").PgTableWithCol
4282
4312
  baseColumn: never;
4283
4313
  identity: undefined;
4284
4314
  generated: undefined;
4285
- }, {}, {
4286
- pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4287
- }>;
4288
- answer: import("drizzle-orm/pg-core").PgColumn<{
4289
- name: "answer";
4290
- tableName: "tool_crossings";
4315
+ }, {}, {}>;
4316
+ txid: import("drizzle-orm/pg-core").PgColumn<{
4317
+ name: "txid";
4318
+ tableName: "turns";
4291
4319
  dataType: "custom";
4292
4320
  columnType: "PgCustomColumn";
4293
- data: unknown;
4321
+ data: string;
4294
4322
  driverParam: unknown;
4295
- notNull: false;
4296
- hasDefault: false;
4323
+ notNull: true;
4324
+ hasDefault: true;
4297
4325
  isPrimaryKey: false;
4298
4326
  isAutoincrement: false;
4299
4327
  hasRuntimeDefault: false;
@@ -4308,18 +4336,17 @@ export declare const toolCrossings: import("drizzle-orm/pg-core").PgTableWithCol
4308
4336
  dialect: 'pg';
4309
4337
  }>;
4310
4338
  /**
4311
- * Artifacts (blueprint D35, F8.1 and F8.2): an id, a name and numbered versions. The bytes are in
4312
- * the Object store under each version's `blobKey` (a folder's: its manifest); a blob counts only
4313
- * once its version row commits. `sessionId` is the session the artifact belongs to, or null for
4314
- * a Tenant-wide one an application made. `latestVersion` is the newest version's number.
4339
+ * Each session's queue (protocol 17, D76): messages that arrived while its turn ran or waited, in
4340
+ * order (`seq`), until a turn takes them. A row holds the command as sent, the turn input its
4341
+ * message gives the engine (file parts pinned when it was queued), and who sent it.
4315
4342
  */
4316
- export declare const artifacts: import("drizzle-orm/pg-core").PgTableWithColumns<{
4317
- name: "artifacts";
4343
+ export declare const sessionQueue: import("drizzle-orm/pg-core").PgTableWithColumns<{
4344
+ name: "session_queue";
4318
4345
  schema: "nylorun";
4319
4346
  columns: {
4320
4347
  id: import("drizzle-orm/pg-core").PgColumn<{
4321
4348
  name: "id";
4322
- tableName: "artifacts";
4349
+ tableName: "session_queue";
4323
4350
  dataType: "custom";
4324
4351
  columnType: "PgCustomColumn";
4325
4352
  data: string;
@@ -4336,65 +4363,69 @@ export declare const artifacts: import("drizzle-orm/pg-core").PgTableWithColumns
4336
4363
  }, {}, {
4337
4364
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4338
4365
  }>;
4339
- kind: import("drizzle-orm/pg-core").PgColumn<{
4340
- name: "kind";
4341
- tableName: "artifacts";
4342
- dataType: "string";
4343
- columnType: "PgText";
4344
- data: "file" | "folder";
4366
+ sessionId: import("drizzle-orm/pg-core").PgColumn<{
4367
+ name: "sessionId";
4368
+ tableName: "session_queue";
4369
+ dataType: "custom";
4370
+ columnType: "PgCustomColumn";
4371
+ data: string;
4345
4372
  driverParam: string;
4346
4373
  notNull: true;
4347
4374
  hasDefault: false;
4348
4375
  isPrimaryKey: false;
4349
4376
  isAutoincrement: false;
4350
4377
  hasRuntimeDefault: false;
4351
- enumValues: ["file", "folder"];
4378
+ enumValues: undefined;
4352
4379
  baseColumn: never;
4353
4380
  identity: undefined;
4354
4381
  generated: undefined;
4355
- }, {}, {}>;
4356
- name: import("drizzle-orm/pg-core").PgColumn<{
4357
- name: "name";
4358
- tableName: "artifacts";
4359
- dataType: "string";
4360
- columnType: "PgText";
4361
- data: string;
4362
- driverParam: string;
4382
+ }, {}, {
4383
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4384
+ }>;
4385
+ seq: import("drizzle-orm/pg-core").PgColumn<{
4386
+ name: "seq";
4387
+ tableName: "session_queue";
4388
+ dataType: "number";
4389
+ columnType: "PgBigInt53";
4390
+ data: number;
4391
+ driverParam: string | number;
4363
4392
  notNull: true;
4364
4393
  hasDefault: false;
4365
4394
  isPrimaryKey: false;
4366
4395
  isAutoincrement: false;
4367
4396
  hasRuntimeDefault: false;
4368
- enumValues: [string, ...string[]];
4397
+ enumValues: undefined;
4369
4398
  baseColumn: never;
4370
4399
  identity: undefined;
4371
4400
  generated: undefined;
4372
4401
  }, {}, {}>;
4373
- contentType: import("drizzle-orm/pg-core").PgColumn<{
4374
- name: "contentType";
4375
- tableName: "artifacts";
4376
- dataType: "string";
4377
- columnType: "PgText";
4378
- data: string;
4379
- driverParam: string;
4402
+ command: import("drizzle-orm/pg-core").PgColumn<{
4403
+ name: "command";
4404
+ tableName: "session_queue";
4405
+ dataType: "custom";
4406
+ columnType: "PgCustomColumn";
4407
+ data: unknown;
4408
+ driverParam: unknown;
4380
4409
  notNull: true;
4381
4410
  hasDefault: false;
4382
4411
  isPrimaryKey: false;
4383
4412
  isAutoincrement: false;
4384
4413
  hasRuntimeDefault: false;
4385
- enumValues: [string, ...string[]];
4414
+ enumValues: undefined;
4386
4415
  baseColumn: never;
4387
4416
  identity: undefined;
4388
4417
  generated: undefined;
4389
- }, {}, {}>;
4390
- sessionId: import("drizzle-orm/pg-core").PgColumn<{
4391
- name: "sessionId";
4392
- tableName: "artifacts";
4418
+ }, {}, {
4419
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4420
+ }>;
4421
+ input: import("drizzle-orm/pg-core").PgColumn<{
4422
+ name: "input";
4423
+ tableName: "session_queue";
4393
4424
  dataType: "custom";
4394
4425
  columnType: "PgCustomColumn";
4395
- data: string;
4396
- driverParam: string;
4397
- notNull: false;
4426
+ data: unknown;
4427
+ driverParam: unknown;
4428
+ notNull: true;
4398
4429
  hasDefault: false;
4399
4430
  isPrimaryKey: false;
4400
4431
  isAutoincrement: false;
@@ -4406,13 +4437,13 @@ export declare const artifacts: import("drizzle-orm/pg-core").PgTableWithColumns
4406
4437
  }, {}, {
4407
4438
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4408
4439
  }>;
4409
- latestVersion: import("drizzle-orm/pg-core").PgColumn<{
4410
- name: "latestVersion";
4411
- tableName: "artifacts";
4412
- dataType: "number";
4413
- columnType: "PgInteger";
4414
- data: number;
4415
- driverParam: string | number;
4440
+ fileArtifacts: import("drizzle-orm/pg-core").PgColumn<{
4441
+ name: "fileArtifacts";
4442
+ tableName: "session_queue";
4443
+ dataType: "custom";
4444
+ columnType: "PgCustomColumn";
4445
+ data: unknown;
4446
+ driverParam: unknown;
4416
4447
  notNull: true;
4417
4448
  hasDefault: false;
4418
4449
  isPrimaryKey: false;
@@ -4422,32 +4453,36 @@ export declare const artifacts: import("drizzle-orm/pg-core").PgTableWithColumns
4422
4453
  baseColumn: never;
4423
4454
  identity: undefined;
4424
4455
  generated: undefined;
4425
- }, {}, {}>;
4426
- labelsJson: import("drizzle-orm/pg-core").PgColumn<{
4427
- name: "labelsJson";
4428
- tableName: "artifacts";
4429
- dataType: "string";
4430
- columnType: "PgText";
4431
- data: string;
4432
- driverParam: string;
4433
- notNull: false;
4456
+ }, {}, {
4457
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4458
+ }>;
4459
+ writer: import("drizzle-orm/pg-core").PgColumn<{
4460
+ name: "writer";
4461
+ tableName: "session_queue";
4462
+ dataType: "custom";
4463
+ columnType: "PgCustomColumn";
4464
+ data: unknown;
4465
+ driverParam: unknown;
4466
+ notNull: true;
4434
4467
  hasDefault: false;
4435
4468
  isPrimaryKey: false;
4436
4469
  isAutoincrement: false;
4437
4470
  hasRuntimeDefault: false;
4438
- enumValues: [string, ...string[]];
4471
+ enumValues: undefined;
4439
4472
  baseColumn: never;
4440
4473
  identity: undefined;
4441
4474
  generated: undefined;
4442
- }, {}, {}>;
4443
- createdAt: import("drizzle-orm/pg-core").PgColumn<{
4444
- name: "createdAt";
4445
- tableName: "artifacts";
4475
+ }, {}, {
4476
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4477
+ }>;
4478
+ trace: import("drizzle-orm/pg-core").PgColumn<{
4479
+ name: "trace";
4480
+ tableName: "session_queue";
4446
4481
  dataType: "custom";
4447
4482
  columnType: "PgCustomColumn";
4448
- data: string;
4449
- driverParam: string;
4450
- notNull: true;
4483
+ data: unknown;
4484
+ driverParam: unknown;
4485
+ notNull: false;
4451
4486
  hasDefault: false;
4452
4487
  isPrimaryKey: false;
4453
4488
  isAutoincrement: false;
@@ -4459,31 +4494,33 @@ export declare const artifacts: import("drizzle-orm/pg-core").PgTableWithColumns
4459
4494
  }, {}, {
4460
4495
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4461
4496
  }>;
4462
- updatedAt: import("drizzle-orm/pg-core").PgColumn<{
4463
- name: "updatedAt";
4464
- tableName: "artifacts";
4465
- dataType: "string";
4466
- columnType: "PgText";
4467
- data: string;
4468
- driverParam: string;
4469
- notNull: true;
4497
+ cause: import("drizzle-orm/pg-core").PgColumn<{
4498
+ name: "cause";
4499
+ tableName: "session_queue";
4500
+ dataType: "custom";
4501
+ columnType: "PgCustomColumn";
4502
+ data: unknown;
4503
+ driverParam: unknown;
4504
+ notNull: false;
4470
4505
  hasDefault: false;
4471
4506
  isPrimaryKey: false;
4472
4507
  isAutoincrement: false;
4473
4508
  hasRuntimeDefault: false;
4474
- enumValues: [string, ...string[]];
4509
+ enumValues: undefined;
4475
4510
  baseColumn: never;
4476
4511
  identity: undefined;
4477
4512
  generated: undefined;
4478
- }, {}, {}>;
4479
- environmentId: import("drizzle-orm/pg-core").PgColumn<{
4480
- name: "environmentId";
4481
- tableName: "artifacts";
4513
+ }, {}, {
4514
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4515
+ }>;
4516
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
4517
+ name: "createdAt";
4518
+ tableName: "session_queue";
4482
4519
  dataType: "custom";
4483
4520
  columnType: "PgCustomColumn";
4484
4521
  data: string;
4485
4522
  driverParam: string;
4486
- notNull: false;
4523
+ notNull: true;
4487
4524
  hasDefault: false;
4488
4525
  isPrimaryKey: false;
4489
4526
  isAutoincrement: false;
@@ -4498,21 +4535,27 @@ export declare const artifacts: import("drizzle-orm/pg-core").PgTableWithColumns
4498
4535
  };
4499
4536
  dialect: 'pg';
4500
4537
  }>;
4501
- /** The versions of an artifact, immutable once written. */
4502
- export declare const artifactVersions: import("drizzle-orm/pg-core").PgTableWithColumns<{
4503
- name: "artifact_versions";
4538
+ /**
4539
+ * The Tool Gate's keyed MCP calls (F4.1 G3): one row per call, written by the gates service
4540
+ * before it calls the server and given the answer after. A re-send whose row has an answer
4541
+ * gets it; one whose row has none, and that the gateway no longer runs, was lost with an
4542
+ * earlier gateway and answers `uncertain`, so a call is never run twice. Rows are deleted a
4543
+ * day after they settle.
4544
+ */
4545
+ export declare const toolCrossings: import("drizzle-orm/pg-core").PgTableWithColumns<{
4546
+ name: "tool_crossings";
4504
4547
  schema: "nylorun";
4505
4548
  columns: {
4506
- artifactId: import("drizzle-orm/pg-core").PgColumn<{
4507
- name: "artifactId";
4508
- tableName: "artifact_versions";
4549
+ key: import("drizzle-orm/pg-core").PgColumn<{
4550
+ name: "key";
4551
+ tableName: "tool_crossings";
4509
4552
  dataType: "custom";
4510
4553
  columnType: "PgCustomColumn";
4511
4554
  data: string;
4512
4555
  driverParam: string;
4513
4556
  notNull: true;
4514
4557
  hasDefault: false;
4515
- isPrimaryKey: false;
4558
+ isPrimaryKey: true;
4516
4559
  isAutoincrement: false;
4517
4560
  hasRuntimeDefault: false;
4518
4561
  enumValues: undefined;
@@ -4522,60 +4565,9 @@ export declare const artifactVersions: import("drizzle-orm/pg-core").PgTableWith
4522
4565
  }, {}, {
4523
4566
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4524
4567
  }>;
4525
- version: import("drizzle-orm/pg-core").PgColumn<{
4526
- name: "version";
4527
- tableName: "artifact_versions";
4528
- dataType: "number";
4529
- columnType: "PgInteger";
4530
- data: number;
4531
- driverParam: string | number;
4532
- notNull: true;
4533
- hasDefault: false;
4534
- isPrimaryKey: false;
4535
- isAutoincrement: false;
4536
- hasRuntimeDefault: false;
4537
- enumValues: undefined;
4538
- baseColumn: never;
4539
- identity: undefined;
4540
- generated: undefined;
4541
- }, {}, {}>;
4542
- blobKey: import("drizzle-orm/pg-core").PgColumn<{
4543
- name: "blobKey";
4544
- tableName: "artifact_versions";
4545
- dataType: "string";
4546
- columnType: "PgText";
4547
- data: string;
4548
- driverParam: string;
4549
- notNull: true;
4550
- hasDefault: false;
4551
- isPrimaryKey: false;
4552
- isAutoincrement: false;
4553
- hasRuntimeDefault: false;
4554
- enumValues: [string, ...string[]];
4555
- baseColumn: never;
4556
- identity: undefined;
4557
- generated: undefined;
4558
- }, {}, {}>;
4559
- size: import("drizzle-orm/pg-core").PgColumn<{
4560
- name: "size";
4561
- tableName: "artifact_versions";
4562
- dataType: "number";
4563
- columnType: "PgBigInt53";
4564
- data: number;
4565
- driverParam: string | number;
4566
- notNull: true;
4567
- hasDefault: false;
4568
- isPrimaryKey: false;
4569
- isAutoincrement: false;
4570
- hasRuntimeDefault: false;
4571
- enumValues: undefined;
4572
- baseColumn: never;
4573
- identity: undefined;
4574
- generated: undefined;
4575
- }, {}, {}>;
4576
- sha256: import("drizzle-orm/pg-core").PgColumn<{
4577
- name: "sha256";
4578
- tableName: "artifact_versions";
4568
+ hash: import("drizzle-orm/pg-core").PgColumn<{
4569
+ name: "hash";
4570
+ tableName: "tool_crossings";
4579
4571
  dataType: "string";
4580
4572
  columnType: "PgText";
4581
4573
  data: string;
@@ -4590,11 +4582,11 @@ export declare const artifactVersions: import("drizzle-orm/pg-core").PgTableWith
4590
4582
  identity: undefined;
4591
4583
  generated: undefined;
4592
4584
  }, {}, {}>;
4593
- contentType: import("drizzle-orm/pg-core").PgColumn<{
4594
- name: "contentType";
4595
- tableName: "artifact_versions";
4596
- dataType: "string";
4597
- columnType: "PgText";
4585
+ startedAt: import("drizzle-orm/pg-core").PgColumn<{
4586
+ name: "startedAt";
4587
+ tableName: "tool_crossings";
4588
+ dataType: "custom";
4589
+ columnType: "PgCustomColumn";
4598
4590
  data: string;
4599
4591
  driverParam: string;
4600
4592
  notNull: true;
@@ -4602,36 +4594,21 @@ export declare const artifactVersions: import("drizzle-orm/pg-core").PgTableWith
4602
4594
  isPrimaryKey: false;
4603
4595
  isAutoincrement: false;
4604
4596
  hasRuntimeDefault: false;
4605
- enumValues: [string, ...string[]];
4606
- baseColumn: never;
4607
- identity: undefined;
4608
- generated: undefined;
4609
- }, {}, {}>;
4610
- source: import("drizzle-orm/pg-core").PgColumn<{
4611
- name: "source";
4612
- tableName: "artifact_versions";
4613
- dataType: "string";
4614
- columnType: "PgText";
4615
- data: "engine" | "export" | "snapshot" | "upload";
4616
- driverParam: string;
4617
- notNull: true;
4618
- hasDefault: false;
4619
- isPrimaryKey: false;
4620
- isAutoincrement: false;
4621
- hasRuntimeDefault: false;
4622
- enumValues: ["upload", "engine", "export", "snapshot"];
4597
+ enumValues: undefined;
4623
4598
  baseColumn: never;
4624
4599
  identity: undefined;
4625
4600
  generated: undefined;
4626
- }, {}, {}>;
4627
- createdAt: import("drizzle-orm/pg-core").PgColumn<{
4628
- name: "createdAt";
4629
- tableName: "artifact_versions";
4601
+ }, {}, {
4602
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4603
+ }>;
4604
+ settledAt: import("drizzle-orm/pg-core").PgColumn<{
4605
+ name: "settledAt";
4606
+ tableName: "tool_crossings";
4630
4607
  dataType: "custom";
4631
4608
  columnType: "PgCustomColumn";
4632
4609
  data: string;
4633
4610
  driverParam: string;
4634
- notNull: true;
4611
+ notNull: false;
4635
4612
  hasDefault: false;
4636
4613
  isPrimaryKey: false;
4637
4614
  isAutoincrement: false;
@@ -4643,13 +4620,13 @@ export declare const artifactVersions: import("drizzle-orm/pg-core").PgTableWith
4643
4620
  }, {}, {
4644
4621
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4645
4622
  }>;
4646
- writeKey: import("drizzle-orm/pg-core").PgColumn<{
4647
- name: "writeKey";
4648
- tableName: "artifact_versions";
4623
+ answer: import("drizzle-orm/pg-core").PgColumn<{
4624
+ name: "answer";
4625
+ tableName: "tool_crossings";
4649
4626
  dataType: "custom";
4650
4627
  columnType: "PgCustomColumn";
4651
- data: string;
4652
- driverParam: string;
4628
+ data: unknown;
4629
+ driverParam: unknown;
4653
4630
  notNull: false;
4654
4631
  hasDefault: false;
4655
4632
  isPrimaryKey: false;
@@ -4666,24 +4643,94 @@ export declare const artifactVersions: import("drizzle-orm/pg-core").PgTableWith
4666
4643
  dialect: 'pg';
4667
4644
  }>;
4668
4645
  /**
4669
- * The content-addressed files each folder version references (F8.2), one row per distinct
4670
- * SHA-256: the index that says which `blobs/sha256/<hex>` objects are still in use, so deleting
4671
- * a folder removes only the files no other version names, and the Tenant total counts each file
4672
- * once. The manifest itself stays the source of truth for paths.
4646
+ * Artifacts (blueprint D35, F8.1 and F8.2): an id, a name and numbered versions. The bytes are in
4647
+ * the Object store under each version's `blobKey` (a folder's: its manifest); a blob counts only
4648
+ * once its version row commits. `sessionId` is the session the artifact belongs to, or null for
4649
+ * a Tenant-wide one an application made. `latestVersion` is the newest version's number.
4673
4650
  */
4674
- export declare const artifactContent: import("drizzle-orm/pg-core").PgTableWithColumns<{
4675
- name: "artifact_content";
4651
+ export declare const artifacts: import("drizzle-orm/pg-core").PgTableWithColumns<{
4652
+ name: "artifacts";
4676
4653
  schema: "nylorun";
4677
4654
  columns: {
4678
- artifactId: import("drizzle-orm/pg-core").PgColumn<{
4679
- name: "artifactId";
4680
- tableName: "artifact_content";
4655
+ id: import("drizzle-orm/pg-core").PgColumn<{
4656
+ name: "id";
4657
+ tableName: "artifacts";
4681
4658
  dataType: "custom";
4682
4659
  columnType: "PgCustomColumn";
4683
4660
  data: string;
4684
4661
  driverParam: string;
4685
4662
  notNull: true;
4686
4663
  hasDefault: false;
4664
+ isPrimaryKey: true;
4665
+ isAutoincrement: false;
4666
+ hasRuntimeDefault: false;
4667
+ enumValues: undefined;
4668
+ baseColumn: never;
4669
+ identity: undefined;
4670
+ generated: undefined;
4671
+ }, {}, {
4672
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4673
+ }>;
4674
+ kind: import("drizzle-orm/pg-core").PgColumn<{
4675
+ name: "kind";
4676
+ tableName: "artifacts";
4677
+ dataType: "string";
4678
+ columnType: "PgText";
4679
+ data: "file" | "folder";
4680
+ driverParam: string;
4681
+ notNull: true;
4682
+ hasDefault: false;
4683
+ isPrimaryKey: false;
4684
+ isAutoincrement: false;
4685
+ hasRuntimeDefault: false;
4686
+ enumValues: ["file", "folder"];
4687
+ baseColumn: never;
4688
+ identity: undefined;
4689
+ generated: undefined;
4690
+ }, {}, {}>;
4691
+ name: import("drizzle-orm/pg-core").PgColumn<{
4692
+ name: "name";
4693
+ tableName: "artifacts";
4694
+ dataType: "string";
4695
+ columnType: "PgText";
4696
+ data: string;
4697
+ driverParam: string;
4698
+ notNull: true;
4699
+ hasDefault: false;
4700
+ isPrimaryKey: false;
4701
+ isAutoincrement: false;
4702
+ hasRuntimeDefault: false;
4703
+ enumValues: [string, ...string[]];
4704
+ baseColumn: never;
4705
+ identity: undefined;
4706
+ generated: undefined;
4707
+ }, {}, {}>;
4708
+ contentType: import("drizzle-orm/pg-core").PgColumn<{
4709
+ name: "contentType";
4710
+ tableName: "artifacts";
4711
+ dataType: "string";
4712
+ columnType: "PgText";
4713
+ data: string;
4714
+ driverParam: string;
4715
+ notNull: true;
4716
+ hasDefault: false;
4717
+ isPrimaryKey: false;
4718
+ isAutoincrement: false;
4719
+ hasRuntimeDefault: false;
4720
+ enumValues: [string, ...string[]];
4721
+ baseColumn: never;
4722
+ identity: undefined;
4723
+ generated: undefined;
4724
+ }, {}, {}>;
4725
+ sessionId: import("drizzle-orm/pg-core").PgColumn<{
4726
+ name: "sessionId";
4727
+ tableName: "artifacts";
4728
+ dataType: "custom";
4729
+ columnType: "PgCustomColumn";
4730
+ data: string;
4731
+ driverParam: string;
4732
+ notNull: false;
4733
+ hasDefault: false;
4687
4734
  isPrimaryKey: false;
4688
4735
  isAutoincrement: false;
4689
4736
  hasRuntimeDefault: false;
@@ -4694,9 +4741,9 @@ export declare const artifactContent: import("drizzle-orm/pg-core").PgTableWithC
4694
4741
  }, {}, {
4695
4742
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4696
4743
  }>;
4697
- version: import("drizzle-orm/pg-core").PgColumn<{
4698
- name: "version";
4699
- tableName: "artifact_content";
4744
+ latestVersion: import("drizzle-orm/pg-core").PgColumn<{
4745
+ name: "latestVersion";
4746
+ tableName: "artifacts";
4700
4747
  dataType: "number";
4701
4748
  columnType: "PgInteger";
4702
4749
  data: number;
@@ -4711,9 +4758,26 @@ export declare const artifactContent: import("drizzle-orm/pg-core").PgTableWithC
4711
4758
  identity: undefined;
4712
4759
  generated: undefined;
4713
4760
  }, {}, {}>;
4714
- sha256: import("drizzle-orm/pg-core").PgColumn<{
4715
- name: "sha256";
4716
- tableName: "artifact_content";
4761
+ labelsJson: import("drizzle-orm/pg-core").PgColumn<{
4762
+ name: "labelsJson";
4763
+ tableName: "artifacts";
4764
+ dataType: "string";
4765
+ columnType: "PgText";
4766
+ data: string;
4767
+ driverParam: string;
4768
+ notNull: false;
4769
+ hasDefault: false;
4770
+ isPrimaryKey: false;
4771
+ isAutoincrement: false;
4772
+ hasRuntimeDefault: false;
4773
+ enumValues: [string, ...string[]];
4774
+ baseColumn: never;
4775
+ identity: undefined;
4776
+ generated: undefined;
4777
+ }, {}, {}>;
4778
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
4779
+ name: "createdAt";
4780
+ tableName: "artifacts";
4717
4781
  dataType: "custom";
4718
4782
  columnType: "PgCustomColumn";
4719
4783
  data: string;
@@ -4730,46 +4794,60 @@ export declare const artifactContent: import("drizzle-orm/pg-core").PgTableWithC
4730
4794
  }, {}, {
4731
4795
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4732
4796
  }>;
4733
- size: import("drizzle-orm/pg-core").PgColumn<{
4734
- name: "size";
4735
- tableName: "artifact_content";
4736
- dataType: "number";
4737
- columnType: "PgBigInt53";
4738
- data: number;
4739
- driverParam: string | number;
4797
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
4798
+ name: "updatedAt";
4799
+ tableName: "artifacts";
4800
+ dataType: "string";
4801
+ columnType: "PgText";
4802
+ data: string;
4803
+ driverParam: string;
4740
4804
  notNull: true;
4741
4805
  hasDefault: false;
4742
4806
  isPrimaryKey: false;
4743
4807
  isAutoincrement: false;
4744
4808
  hasRuntimeDefault: false;
4745
- enumValues: undefined;
4809
+ enumValues: [string, ...string[]];
4746
4810
  baseColumn: never;
4747
4811
  identity: undefined;
4748
4812
  generated: undefined;
4749
4813
  }, {}, {}>;
4814
+ environmentId: import("drizzle-orm/pg-core").PgColumn<{
4815
+ name: "environmentId";
4816
+ tableName: "artifacts";
4817
+ dataType: "custom";
4818
+ columnType: "PgCustomColumn";
4819
+ data: string;
4820
+ driverParam: string;
4821
+ notNull: false;
4822
+ hasDefault: false;
4823
+ isPrimaryKey: false;
4824
+ isAutoincrement: false;
4825
+ hasRuntimeDefault: false;
4826
+ enumValues: undefined;
4827
+ baseColumn: never;
4828
+ identity: undefined;
4829
+ generated: undefined;
4830
+ }, {}, {
4831
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4832
+ }>;
4750
4833
  };
4751
4834
  dialect: 'pg';
4752
4835
  }>;
4753
- /**
4754
- * The definition files the Tenant holds (track R2 M4): files a definition names by the SHA-256
4755
- * of their bytes (a skill's folder), uploaded with `PUT /v1/files/sha256:<hex>`. The bytes are
4756
- * in the Object store at `definitions/sha256/<hex>`; a row counts them only once they are
4757
- * stored. `sha256` is `sha256:<hex>`.
4758
- */
4759
- export declare const definitionFiles: import("drizzle-orm/pg-core").PgTableWithColumns<{
4760
- name: "definition_files";
4836
+ /** The versions of an artifact, immutable once written. */
4837
+ export declare const artifactVersions: import("drizzle-orm/pg-core").PgTableWithColumns<{
4838
+ name: "artifact_versions";
4761
4839
  schema: "nylorun";
4762
4840
  columns: {
4763
- sha256: import("drizzle-orm/pg-core").PgColumn<{
4764
- name: "sha256";
4765
- tableName: "definition_files";
4841
+ artifactId: import("drizzle-orm/pg-core").PgColumn<{
4842
+ name: "artifactId";
4843
+ tableName: "artifact_versions";
4766
4844
  dataType: "custom";
4767
4845
  columnType: "PgCustomColumn";
4768
4846
  data: string;
4769
4847
  driverParam: string;
4770
4848
  notNull: true;
4771
4849
  hasDefault: false;
4772
- isPrimaryKey: true;
4850
+ isPrimaryKey: false;
4773
4851
  isAutoincrement: false;
4774
4852
  hasRuntimeDefault: false;
4775
4853
  enumValues: undefined;
@@ -4779,9 +4857,26 @@ export declare const definitionFiles: import("drizzle-orm/pg-core").PgTableWithC
4779
4857
  }, {}, {
4780
4858
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4781
4859
  }>;
4782
- kind: import("drizzle-orm/pg-core").PgColumn<{
4783
- name: "kind";
4784
- tableName: "definition_files";
4860
+ version: import("drizzle-orm/pg-core").PgColumn<{
4861
+ name: "version";
4862
+ tableName: "artifact_versions";
4863
+ dataType: "number";
4864
+ columnType: "PgInteger";
4865
+ data: number;
4866
+ driverParam: string | number;
4867
+ notNull: true;
4868
+ hasDefault: false;
4869
+ isPrimaryKey: false;
4870
+ isAutoincrement: false;
4871
+ hasRuntimeDefault: false;
4872
+ enumValues: undefined;
4873
+ baseColumn: never;
4874
+ identity: undefined;
4875
+ generated: undefined;
4876
+ }, {}, {}>;
4877
+ blobKey: import("drizzle-orm/pg-core").PgColumn<{
4878
+ name: "blobKey";
4879
+ tableName: "artifact_versions";
4785
4880
  dataType: "string";
4786
4881
  columnType: "PgText";
4787
4882
  data: string;
@@ -4798,7 +4893,7 @@ export declare const definitionFiles: import("drizzle-orm/pg-core").PgTableWithC
4798
4893
  }, {}, {}>;
4799
4894
  size: import("drizzle-orm/pg-core").PgColumn<{
4800
4895
  name: "size";
4801
- tableName: "definition_files";
4896
+ tableName: "artifact_versions";
4802
4897
  dataType: "number";
4803
4898
  columnType: "PgBigInt53";
4804
4899
  data: number;
@@ -4813,14 +4908,14 @@ export declare const definitionFiles: import("drizzle-orm/pg-core").PgTableWithC
4813
4908
  identity: undefined;
4814
4909
  generated: undefined;
4815
4910
  }, {}, {}>;
4816
- contentType: import("drizzle-orm/pg-core").PgColumn<{
4817
- name: "contentType";
4818
- tableName: "definition_files";
4911
+ sha256: import("drizzle-orm/pg-core").PgColumn<{
4912
+ name: "sha256";
4913
+ tableName: "artifact_versions";
4819
4914
  dataType: "string";
4820
4915
  columnType: "PgText";
4821
4916
  data: string;
4822
4917
  driverParam: string;
4823
- notNull: false;
4918
+ notNull: true;
4824
4919
  hasDefault: false;
4825
4920
  isPrimaryKey: false;
4826
4921
  isAutoincrement: false;
@@ -4830,11 +4925,11 @@ export declare const definitionFiles: import("drizzle-orm/pg-core").PgTableWithC
4830
4925
  identity: undefined;
4831
4926
  generated: undefined;
4832
4927
  }, {}, {}>;
4833
- createdAt: import("drizzle-orm/pg-core").PgColumn<{
4834
- name: "createdAt";
4835
- tableName: "definition_files";
4836
- dataType: "custom";
4837
- columnType: "PgCustomColumn";
4928
+ contentType: import("drizzle-orm/pg-core").PgColumn<{
4929
+ name: "contentType";
4930
+ tableName: "artifact_versions";
4931
+ dataType: "string";
4932
+ columnType: "PgText";
4838
4933
  data: string;
4839
4934
  driverParam: string;
4840
4935
  notNull: true;
@@ -4842,47 +4937,31 @@ export declare const definitionFiles: import("drizzle-orm/pg-core").PgTableWithC
4842
4937
  isPrimaryKey: false;
4843
4938
  isAutoincrement: false;
4844
4939
  hasRuntimeDefault: false;
4845
- enumValues: undefined;
4940
+ enumValues: [string, ...string[]];
4846
4941
  baseColumn: never;
4847
4942
  identity: undefined;
4848
4943
  generated: undefined;
4849
- }, {}, {
4850
- pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4851
- }>;
4852
- };
4853
- dialect: 'pg';
4854
- }>;
4855
- /**
4856
- * Which agent manifest version names which definition file: one row per owner
4857
- * (`agent-manifest:<name>`), manifest hash and file, written when the version is saved. A later
4858
- * sweep deletes the files no version uses.
4859
- */
4860
- export declare const definitionFileUses: import("drizzle-orm/pg-core").PgTableWithColumns<{
4861
- name: "definition_file_uses";
4862
- schema: "nylorun";
4863
- columns: {
4864
- agentId: import("drizzle-orm/pg-core").PgColumn<{
4865
- name: "agentId";
4866
- tableName: "definition_file_uses";
4867
- dataType: "custom";
4868
- columnType: "PgCustomColumn";
4869
- data: string;
4944
+ }, {}, {}>;
4945
+ source: import("drizzle-orm/pg-core").PgColumn<{
4946
+ name: "source";
4947
+ tableName: "artifact_versions";
4948
+ dataType: "string";
4949
+ columnType: "PgText";
4950
+ data: "engine" | "export" | "snapshot" | "upload";
4870
4951
  driverParam: string;
4871
4952
  notNull: true;
4872
4953
  hasDefault: false;
4873
4954
  isPrimaryKey: false;
4874
4955
  isAutoincrement: false;
4875
4956
  hasRuntimeDefault: false;
4876
- enumValues: undefined;
4957
+ enumValues: ["upload", "engine", "export", "snapshot"];
4877
4958
  baseColumn: never;
4878
4959
  identity: undefined;
4879
4960
  generated: undefined;
4880
- }, {}, {
4881
- pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4882
- }>;
4883
- manifestHash: import("drizzle-orm/pg-core").PgColumn<{
4884
- name: "manifestHash";
4885
- tableName: "definition_file_uses";
4961
+ }, {}, {}>;
4962
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
4963
+ name: "createdAt";
4964
+ tableName: "artifact_versions";
4886
4965
  dataType: "custom";
4887
4966
  columnType: "PgCustomColumn";
4888
4967
  data: string;
@@ -4899,8 +4978,226 @@ export declare const definitionFileUses: import("drizzle-orm/pg-core").PgTableWi
4899
4978
  }, {}, {
4900
4979
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4901
4980
  }>;
4902
- sha256: import("drizzle-orm/pg-core").PgColumn<{
4981
+ writeKey: import("drizzle-orm/pg-core").PgColumn<{
4982
+ name: "writeKey";
4983
+ tableName: "artifact_versions";
4984
+ dataType: "custom";
4985
+ columnType: "PgCustomColumn";
4986
+ data: string;
4987
+ driverParam: string;
4988
+ notNull: false;
4989
+ hasDefault: false;
4990
+ isPrimaryKey: false;
4991
+ isAutoincrement: false;
4992
+ hasRuntimeDefault: false;
4993
+ enumValues: undefined;
4994
+ baseColumn: never;
4995
+ identity: undefined;
4996
+ generated: undefined;
4997
+ }, {}, {
4998
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4999
+ }>;
5000
+ };
5001
+ dialect: 'pg';
5002
+ }>;
5003
+ /**
5004
+ * The content-addressed files each folder version references (F8.2), one row per distinct
5005
+ * SHA-256: the index that says which `blobs/sha256/<hex>` objects are still in use, so deleting
5006
+ * a folder removes only the files no other version names, and the Tenant total counts each file
5007
+ * once. The manifest itself stays the source of truth for paths.
5008
+ */
5009
+ export declare const artifactContent: import("drizzle-orm/pg-core").PgTableWithColumns<{
5010
+ name: "artifact_content";
5011
+ schema: "nylorun";
5012
+ columns: {
5013
+ artifactId: import("drizzle-orm/pg-core").PgColumn<{
5014
+ name: "artifactId";
5015
+ tableName: "artifact_content";
5016
+ dataType: "custom";
5017
+ columnType: "PgCustomColumn";
5018
+ data: string;
5019
+ driverParam: string;
5020
+ notNull: true;
5021
+ hasDefault: false;
5022
+ isPrimaryKey: false;
5023
+ isAutoincrement: false;
5024
+ hasRuntimeDefault: false;
5025
+ enumValues: undefined;
5026
+ baseColumn: never;
5027
+ identity: undefined;
5028
+ generated: undefined;
5029
+ }, {}, {
5030
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5031
+ }>;
5032
+ version: import("drizzle-orm/pg-core").PgColumn<{
5033
+ name: "version";
5034
+ tableName: "artifact_content";
5035
+ dataType: "number";
5036
+ columnType: "PgInteger";
5037
+ data: number;
5038
+ driverParam: string | number;
5039
+ notNull: true;
5040
+ hasDefault: false;
5041
+ isPrimaryKey: false;
5042
+ isAutoincrement: false;
5043
+ hasRuntimeDefault: false;
5044
+ enumValues: undefined;
5045
+ baseColumn: never;
5046
+ identity: undefined;
5047
+ generated: undefined;
5048
+ }, {}, {}>;
5049
+ sha256: import("drizzle-orm/pg-core").PgColumn<{
4903
5050
  name: "sha256";
5051
+ tableName: "artifact_content";
5052
+ dataType: "custom";
5053
+ columnType: "PgCustomColumn";
5054
+ data: string;
5055
+ driverParam: string;
5056
+ notNull: true;
5057
+ hasDefault: false;
5058
+ isPrimaryKey: false;
5059
+ isAutoincrement: false;
5060
+ hasRuntimeDefault: false;
5061
+ enumValues: undefined;
5062
+ baseColumn: never;
5063
+ identity: undefined;
5064
+ generated: undefined;
5065
+ }, {}, {
5066
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5067
+ }>;
5068
+ size: import("drizzle-orm/pg-core").PgColumn<{
5069
+ name: "size";
5070
+ tableName: "artifact_content";
5071
+ dataType: "number";
5072
+ columnType: "PgBigInt53";
5073
+ data: number;
5074
+ driverParam: string | number;
5075
+ notNull: true;
5076
+ hasDefault: false;
5077
+ isPrimaryKey: false;
5078
+ isAutoincrement: false;
5079
+ hasRuntimeDefault: false;
5080
+ enumValues: undefined;
5081
+ baseColumn: never;
5082
+ identity: undefined;
5083
+ generated: undefined;
5084
+ }, {}, {}>;
5085
+ };
5086
+ dialect: 'pg';
5087
+ }>;
5088
+ /**
5089
+ * The definition files the Tenant holds (track R2 M4): files a definition names by the SHA-256
5090
+ * of their bytes (a skill's folder), uploaded with `PUT /v1/files/sha256:<hex>`. The bytes are
5091
+ * in the Object store at `definitions/sha256/<hex>`; a row counts them only once they are
5092
+ * stored. `sha256` is `sha256:<hex>`.
5093
+ */
5094
+ export declare const definitionFiles: import("drizzle-orm/pg-core").PgTableWithColumns<{
5095
+ name: "definition_files";
5096
+ schema: "nylorun";
5097
+ columns: {
5098
+ sha256: import("drizzle-orm/pg-core").PgColumn<{
5099
+ name: "sha256";
5100
+ tableName: "definition_files";
5101
+ dataType: "custom";
5102
+ columnType: "PgCustomColumn";
5103
+ data: string;
5104
+ driverParam: string;
5105
+ notNull: true;
5106
+ hasDefault: false;
5107
+ isPrimaryKey: true;
5108
+ isAutoincrement: false;
5109
+ hasRuntimeDefault: false;
5110
+ enumValues: undefined;
5111
+ baseColumn: never;
5112
+ identity: undefined;
5113
+ generated: undefined;
5114
+ }, {}, {
5115
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5116
+ }>;
5117
+ kind: import("drizzle-orm/pg-core").PgColumn<{
5118
+ name: "kind";
5119
+ tableName: "definition_files";
5120
+ dataType: "string";
5121
+ columnType: "PgText";
5122
+ data: string;
5123
+ driverParam: string;
5124
+ notNull: true;
5125
+ hasDefault: false;
5126
+ isPrimaryKey: false;
5127
+ isAutoincrement: false;
5128
+ hasRuntimeDefault: false;
5129
+ enumValues: [string, ...string[]];
5130
+ baseColumn: never;
5131
+ identity: undefined;
5132
+ generated: undefined;
5133
+ }, {}, {}>;
5134
+ size: import("drizzle-orm/pg-core").PgColumn<{
5135
+ name: "size";
5136
+ tableName: "definition_files";
5137
+ dataType: "number";
5138
+ columnType: "PgBigInt53";
5139
+ data: number;
5140
+ driverParam: string | number;
5141
+ notNull: true;
5142
+ hasDefault: false;
5143
+ isPrimaryKey: false;
5144
+ isAutoincrement: false;
5145
+ hasRuntimeDefault: false;
5146
+ enumValues: undefined;
5147
+ baseColumn: never;
5148
+ identity: undefined;
5149
+ generated: undefined;
5150
+ }, {}, {}>;
5151
+ contentType: import("drizzle-orm/pg-core").PgColumn<{
5152
+ name: "contentType";
5153
+ tableName: "definition_files";
5154
+ dataType: "string";
5155
+ columnType: "PgText";
5156
+ data: string;
5157
+ driverParam: string;
5158
+ notNull: false;
5159
+ hasDefault: false;
5160
+ isPrimaryKey: false;
5161
+ isAutoincrement: false;
5162
+ hasRuntimeDefault: false;
5163
+ enumValues: [string, ...string[]];
5164
+ baseColumn: never;
5165
+ identity: undefined;
5166
+ generated: undefined;
5167
+ }, {}, {}>;
5168
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
5169
+ name: "createdAt";
5170
+ tableName: "definition_files";
5171
+ dataType: "custom";
5172
+ columnType: "PgCustomColumn";
5173
+ data: string;
5174
+ driverParam: string;
5175
+ notNull: true;
5176
+ hasDefault: false;
5177
+ isPrimaryKey: false;
5178
+ isAutoincrement: false;
5179
+ hasRuntimeDefault: false;
5180
+ enumValues: undefined;
5181
+ baseColumn: never;
5182
+ identity: undefined;
5183
+ generated: undefined;
5184
+ }, {}, {
5185
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5186
+ }>;
5187
+ };
5188
+ dialect: 'pg';
5189
+ }>;
5190
+ /**
5191
+ * Which agent manifest version names which definition file: one row per owner
5192
+ * (`agent-manifest:<name>`), manifest hash and file, written when the version is saved. A later
5193
+ * sweep deletes the files no version uses.
5194
+ */
5195
+ export declare const definitionFileUses: import("drizzle-orm/pg-core").PgTableWithColumns<{
5196
+ name: "definition_file_uses";
5197
+ schema: "nylorun";
5198
+ columns: {
5199
+ agentId: import("drizzle-orm/pg-core").PgColumn<{
5200
+ name: "agentId";
4904
5201
  tableName: "definition_file_uses";
4905
5202
  dataType: "custom";
4906
5203
  columnType: "PgCustomColumn";
@@ -4918,63 +5215,553 @@ export declare const definitionFileUses: import("drizzle-orm/pg-core").PgTableWi
4918
5215
  }, {}, {
4919
5216
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4920
5217
  }>;
5218
+ manifestHash: import("drizzle-orm/pg-core").PgColumn<{
5219
+ name: "manifestHash";
5220
+ tableName: "definition_file_uses";
5221
+ dataType: "custom";
5222
+ columnType: "PgCustomColumn";
5223
+ data: string;
5224
+ driverParam: string;
5225
+ notNull: true;
5226
+ hasDefault: false;
5227
+ isPrimaryKey: false;
5228
+ isAutoincrement: false;
5229
+ hasRuntimeDefault: false;
5230
+ enumValues: undefined;
5231
+ baseColumn: never;
5232
+ identity: undefined;
5233
+ generated: undefined;
5234
+ }, {}, {
5235
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5236
+ }>;
5237
+ sha256: import("drizzle-orm/pg-core").PgColumn<{
5238
+ name: "sha256";
5239
+ tableName: "definition_file_uses";
5240
+ dataType: "custom";
5241
+ columnType: "PgCustomColumn";
5242
+ data: string;
5243
+ driverParam: string;
5244
+ notNull: true;
5245
+ hasDefault: false;
5246
+ isPrimaryKey: false;
5247
+ isAutoincrement: false;
5248
+ hasRuntimeDefault: false;
5249
+ enumValues: undefined;
5250
+ baseColumn: never;
5251
+ identity: undefined;
5252
+ generated: undefined;
5253
+ }, {}, {
5254
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5255
+ }>;
5256
+ };
5257
+ dialect: 'pg';
5258
+ }>;
5259
+ /**
5260
+ * The control bus (D21, D48): signals between the processes that have the Tenant open,
5261
+ * written in the transaction that commits what they announce and notified on
5262
+ * `nylorun_control` at commit (`control.ts`). A row outlives its notification so a process
5263
+ * whose listener was down catches up; the Tenant sweep deletes old ones. `created_at` is the
5264
+ * insert's own clock (`clock_timestamp()`), not its transaction's start. `sandbox_id` and
5265
+ * `epoch` are a `host.revoked` signal's.
5266
+ */
5267
+ export declare const controlSignals: import("drizzle-orm/pg-core").PgTableWithColumns<{
5268
+ name: "control_signals";
5269
+ schema: "nylorun";
5270
+ columns: {
5271
+ id: import("drizzle-orm/pg-core").PgColumn<{
5272
+ name: "id";
5273
+ tableName: "control_signals";
5274
+ dataType: "number";
5275
+ columnType: "PgBigInt53";
5276
+ data: number;
5277
+ driverParam: string | number;
5278
+ notNull: true;
5279
+ hasDefault: true;
5280
+ isPrimaryKey: true;
5281
+ isAutoincrement: false;
5282
+ hasRuntimeDefault: false;
5283
+ enumValues: undefined;
5284
+ baseColumn: never;
5285
+ identity: "always";
5286
+ generated: undefined;
5287
+ }, {}, {}>;
5288
+ kind: import("drizzle-orm/pg-core").PgColumn<{
5289
+ name: "kind";
5290
+ tableName: "control_signals";
5291
+ dataType: "string";
5292
+ columnType: "PgText";
5293
+ data: string;
5294
+ driverParam: string;
5295
+ notNull: true;
5296
+ hasDefault: false;
5297
+ isPrimaryKey: false;
5298
+ isAutoincrement: false;
5299
+ hasRuntimeDefault: false;
5300
+ enumValues: [string, ...string[]];
5301
+ baseColumn: never;
5302
+ identity: undefined;
5303
+ generated: undefined;
5304
+ }, {}, {}>;
5305
+ sessionId: import("drizzle-orm/pg-core").PgColumn<{
5306
+ name: "sessionId";
5307
+ tableName: "control_signals";
5308
+ dataType: "custom";
5309
+ columnType: "PgCustomColumn";
5310
+ data: string;
5311
+ driverParam: string;
5312
+ notNull: false;
5313
+ hasDefault: false;
5314
+ isPrimaryKey: false;
5315
+ isAutoincrement: false;
5316
+ hasRuntimeDefault: false;
5317
+ enumValues: undefined;
5318
+ baseColumn: never;
5319
+ identity: undefined;
5320
+ generated: undefined;
5321
+ }, {}, {
5322
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5323
+ }>;
5324
+ turnId: import("drizzle-orm/pg-core").PgColumn<{
5325
+ name: "turnId";
5326
+ tableName: "control_signals";
5327
+ dataType: "custom";
5328
+ columnType: "PgCustomColumn";
5329
+ data: string;
5330
+ driverParam: string;
5331
+ notNull: false;
5332
+ hasDefault: false;
5333
+ isPrimaryKey: false;
5334
+ isAutoincrement: false;
5335
+ hasRuntimeDefault: false;
5336
+ enumValues: undefined;
5337
+ baseColumn: never;
5338
+ identity: undefined;
5339
+ generated: undefined;
5340
+ }, {}, {
5341
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5342
+ }>;
5343
+ generation: import("drizzle-orm/pg-core").PgColumn<{
5344
+ name: "generation";
5345
+ tableName: "control_signals";
5346
+ dataType: "number";
5347
+ columnType: "PgInteger";
5348
+ data: number;
5349
+ driverParam: string | number;
5350
+ notNull: false;
5351
+ hasDefault: false;
5352
+ isPrimaryKey: false;
5353
+ isAutoincrement: false;
5354
+ hasRuntimeDefault: false;
5355
+ enumValues: undefined;
5356
+ baseColumn: never;
5357
+ identity: undefined;
5358
+ generated: undefined;
5359
+ }, {}, {}>;
5360
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
5361
+ name: "createdAt";
5362
+ tableName: "control_signals";
5363
+ dataType: "string";
5364
+ columnType: "PgTimestampString";
5365
+ data: string;
5366
+ driverParam: string;
5367
+ notNull: true;
5368
+ hasDefault: true;
5369
+ isPrimaryKey: false;
5370
+ isAutoincrement: false;
5371
+ hasRuntimeDefault: false;
5372
+ enumValues: undefined;
5373
+ baseColumn: never;
5374
+ identity: undefined;
5375
+ generated: undefined;
5376
+ }, {}, {}>;
5377
+ sandboxId: import("drizzle-orm/pg-core").PgColumn<{
5378
+ name: "sandboxId";
5379
+ tableName: "control_signals";
5380
+ dataType: "custom";
5381
+ columnType: "PgCustomColumn";
5382
+ data: string;
5383
+ driverParam: string;
5384
+ notNull: false;
5385
+ hasDefault: false;
5386
+ isPrimaryKey: false;
5387
+ isAutoincrement: false;
5388
+ hasRuntimeDefault: false;
5389
+ enumValues: undefined;
5390
+ baseColumn: never;
5391
+ identity: undefined;
5392
+ generated: undefined;
5393
+ }, {}, {
5394
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5395
+ }>;
5396
+ epoch: import("drizzle-orm/pg-core").PgColumn<{
5397
+ name: "epoch";
5398
+ tableName: "control_signals";
5399
+ dataType: "number";
5400
+ columnType: "PgInteger";
5401
+ data: number;
5402
+ driverParam: string | number;
5403
+ notNull: false;
5404
+ hasDefault: false;
5405
+ isPrimaryKey: false;
5406
+ isAutoincrement: false;
5407
+ hasRuntimeDefault: false;
5408
+ enumValues: undefined;
5409
+ baseColumn: never;
5410
+ identity: undefined;
5411
+ generated: undefined;
5412
+ }, {}, {}>;
5413
+ };
5414
+ dialect: 'pg';
5415
+ }>;
5416
+ /**
5417
+ * The wake outbox (architecture §12.3): one row per wake a committed transaction asked for
5418
+ * (`Tx.wake`), written in that transaction, so a commit never loses its wake. The row is
5419
+ * deleted once Durable Session Execution has accepted the wake; until then the Tenant sweep
5420
+ * delivers it again, with the same idempotency key (`dedupe_key`, or `wake:<id>` without
5421
+ * one). `created_at` is the insert's own clock (`clock_timestamp()`). `attempts` counts the
5422
+ * sweep's failed deliveries, `retry_at` is when it tries the row again, and a row
5423
+ * `parked_at` is never tried again: it stays for an operator (`Tx.failOutbox`).
5424
+ */
5425
+ export declare const wakes: import("drizzle-orm/pg-core").PgTableWithColumns<{
5426
+ name: "wakes";
5427
+ schema: "nylorun";
5428
+ columns: {
5429
+ id: import("drizzle-orm/pg-core").PgColumn<{
5430
+ name: "id";
5431
+ tableName: "wakes";
5432
+ dataType: "custom";
5433
+ columnType: "PgCustomColumn";
5434
+ data: string;
5435
+ driverParam: string;
5436
+ notNull: true;
5437
+ hasDefault: false;
5438
+ isPrimaryKey: true;
5439
+ isAutoincrement: false;
5440
+ hasRuntimeDefault: false;
5441
+ enumValues: undefined;
5442
+ baseColumn: never;
5443
+ identity: undefined;
5444
+ generated: undefined;
5445
+ }, {}, {
5446
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5447
+ }>;
5448
+ sessionId: import("drizzle-orm/pg-core").PgColumn<{
5449
+ name: "sessionId";
5450
+ tableName: "wakes";
5451
+ dataType: "custom";
5452
+ columnType: "PgCustomColumn";
5453
+ data: string;
5454
+ driverParam: string;
5455
+ notNull: true;
5456
+ hasDefault: false;
5457
+ isPrimaryKey: false;
5458
+ isAutoincrement: false;
5459
+ hasRuntimeDefault: false;
5460
+ enumValues: undefined;
5461
+ baseColumn: never;
5462
+ identity: undefined;
5463
+ generated: undefined;
5464
+ }, {}, {
5465
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5466
+ }>;
5467
+ reason: import("drizzle-orm/pg-core").PgColumn<{
5468
+ name: "reason";
5469
+ tableName: "wakes";
5470
+ dataType: "string";
5471
+ columnType: "PgText";
5472
+ data: string;
5473
+ driverParam: string;
5474
+ notNull: true;
5475
+ hasDefault: false;
5476
+ isPrimaryKey: false;
5477
+ isAutoincrement: false;
5478
+ hasRuntimeDefault: false;
5479
+ enumValues: [string, ...string[]];
5480
+ baseColumn: never;
5481
+ identity: undefined;
5482
+ generated: undefined;
5483
+ }, {}, {}>;
5484
+ dedupeKey: import("drizzle-orm/pg-core").PgColumn<{
5485
+ name: "dedupeKey";
5486
+ tableName: "wakes";
5487
+ dataType: "string";
5488
+ columnType: "PgText";
5489
+ data: string;
5490
+ driverParam: string;
5491
+ notNull: false;
5492
+ hasDefault: false;
5493
+ isPrimaryKey: false;
5494
+ isAutoincrement: false;
5495
+ hasRuntimeDefault: false;
5496
+ enumValues: [string, ...string[]];
5497
+ baseColumn: never;
5498
+ identity: undefined;
5499
+ generated: undefined;
5500
+ }, {}, {}>;
5501
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
5502
+ name: "createdAt";
5503
+ tableName: "wakes";
5504
+ dataType: "date";
5505
+ columnType: "PgTimestamp";
5506
+ data: Date;
5507
+ driverParam: string;
5508
+ notNull: true;
5509
+ hasDefault: true;
5510
+ isPrimaryKey: false;
5511
+ isAutoincrement: false;
5512
+ hasRuntimeDefault: false;
5513
+ enumValues: undefined;
5514
+ baseColumn: never;
5515
+ identity: undefined;
5516
+ generated: undefined;
5517
+ }, {}, {}>;
5518
+ attempts: import("drizzle-orm/pg-core").PgColumn<{
5519
+ name: "attempts";
5520
+ tableName: "wakes";
5521
+ dataType: "number";
5522
+ columnType: "PgInteger";
5523
+ data: number;
5524
+ driverParam: string | number;
5525
+ notNull: true;
5526
+ hasDefault: true;
5527
+ isPrimaryKey: false;
5528
+ isAutoincrement: false;
5529
+ hasRuntimeDefault: false;
5530
+ enumValues: undefined;
5531
+ baseColumn: never;
5532
+ identity: undefined;
5533
+ generated: undefined;
5534
+ }, {}, {}>;
5535
+ retryAt: import("drizzle-orm/pg-core").PgColumn<{
5536
+ name: "retryAt";
5537
+ tableName: "wakes";
5538
+ dataType: "date";
5539
+ columnType: "PgTimestamp";
5540
+ data: Date;
5541
+ driverParam: string;
5542
+ notNull: false;
5543
+ hasDefault: false;
5544
+ isPrimaryKey: false;
5545
+ isAutoincrement: false;
5546
+ hasRuntimeDefault: false;
5547
+ enumValues: undefined;
5548
+ baseColumn: never;
5549
+ identity: undefined;
5550
+ generated: undefined;
5551
+ }, {}, {}>;
5552
+ parkedAt: import("drizzle-orm/pg-core").PgColumn<{
5553
+ name: "parkedAt";
5554
+ tableName: "wakes";
5555
+ dataType: "date";
5556
+ columnType: "PgTimestamp";
5557
+ data: Date;
5558
+ driverParam: string;
5559
+ notNull: false;
5560
+ hasDefault: false;
5561
+ isPrimaryKey: false;
5562
+ isAutoincrement: false;
5563
+ hasRuntimeDefault: false;
5564
+ enumValues: undefined;
5565
+ baseColumn: never;
5566
+ identity: undefined;
5567
+ generated: undefined;
5568
+ }, {}, {}>;
4921
5569
  };
4922
5570
  dialect: 'pg';
4923
5571
  }>;
4924
5572
  /**
4925
- * The control bus (D21, D48): signals between the processes that have the Tenant open,
4926
- * written in the transaction that commits what they announce and notified on
4927
- * `nylorun_control` at commit (`control.ts`). A row outlives its notification so a process
4928
- * whose listener was down catches up; the Tenant sweep deletes old ones. `created_at` is the
4929
- * insert's own clock (`clock_timestamp()`), not its transaction's start. `sandbox_id` and
4930
- * `epoch` are a `host.revoked` signal's.
5573
+ * The sandbox signal outbox (F7.2): one row per pod sandbox reconcile or timer a committed
5574
+ * transaction asked for (`Tx.signalSandbox`), kept and delivered as the wake outbox's rows are
5575
+ * (`attempts`, `retry_at`, `parked_at`). A reconcile is sent with the idempotency key
5576
+ * `signal:<id>`; a timer (`kind` `arm`) is its `timer` at `at` (ms since the epoch). Not in
5577
+ * `wakes`, so a Runtime that delivers only wakes never reads one.
4931
5578
  */
4932
- export declare const controlSignals: import("drizzle-orm/pg-core").PgTableWithColumns<{
4933
- name: "control_signals";
5579
+ export declare const sandboxSignals: import("drizzle-orm/pg-core").PgTableWithColumns<{
5580
+ name: "sandbox_signals";
4934
5581
  schema: "nylorun";
4935
5582
  columns: {
4936
5583
  id: import("drizzle-orm/pg-core").PgColumn<{
4937
5584
  name: "id";
4938
- tableName: "control_signals";
5585
+ tableName: "sandbox_signals";
5586
+ dataType: "custom";
5587
+ columnType: "PgCustomColumn";
5588
+ data: string;
5589
+ driverParam: string;
5590
+ notNull: true;
5591
+ hasDefault: false;
5592
+ isPrimaryKey: true;
5593
+ isAutoincrement: false;
5594
+ hasRuntimeDefault: false;
5595
+ enumValues: undefined;
5596
+ baseColumn: never;
5597
+ identity: undefined;
5598
+ generated: undefined;
5599
+ }, {}, {
5600
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5601
+ }>;
5602
+ sandboxId: import("drizzle-orm/pg-core").PgColumn<{
5603
+ name: "sandboxId";
5604
+ tableName: "sandbox_signals";
5605
+ dataType: "custom";
5606
+ columnType: "PgCustomColumn";
5607
+ data: string;
5608
+ driverParam: string;
5609
+ notNull: true;
5610
+ hasDefault: false;
5611
+ isPrimaryKey: false;
5612
+ isAutoincrement: false;
5613
+ hasRuntimeDefault: false;
5614
+ enumValues: undefined;
5615
+ baseColumn: never;
5616
+ identity: undefined;
5617
+ generated: undefined;
5618
+ }, {}, {
5619
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5620
+ }>;
5621
+ kind: import("drizzle-orm/pg-core").PgColumn<{
5622
+ name: "kind";
5623
+ tableName: "sandbox_signals";
5624
+ dataType: "string";
5625
+ columnType: "PgText";
5626
+ data: string;
5627
+ driverParam: string;
5628
+ notNull: true;
5629
+ hasDefault: false;
5630
+ isPrimaryKey: false;
5631
+ isAutoincrement: false;
5632
+ hasRuntimeDefault: false;
5633
+ enumValues: [string, ...string[]];
5634
+ baseColumn: never;
5635
+ identity: undefined;
5636
+ generated: undefined;
5637
+ }, {}, {}>;
5638
+ timer: import("drizzle-orm/pg-core").PgColumn<{
5639
+ name: "timer";
5640
+ tableName: "sandbox_signals";
5641
+ dataType: "string";
5642
+ columnType: "PgText";
5643
+ data: string;
5644
+ driverParam: string;
5645
+ notNull: false;
5646
+ hasDefault: false;
5647
+ isPrimaryKey: false;
5648
+ isAutoincrement: false;
5649
+ hasRuntimeDefault: false;
5650
+ enumValues: [string, ...string[]];
5651
+ baseColumn: never;
5652
+ identity: undefined;
5653
+ generated: undefined;
5654
+ }, {}, {}>;
5655
+ at: import("drizzle-orm/pg-core").PgColumn<{
5656
+ name: "at";
5657
+ tableName: "sandbox_signals";
4939
5658
  dataType: "number";
4940
5659
  columnType: "PgBigInt53";
4941
5660
  data: number;
4942
5661
  driverParam: string | number;
5662
+ notNull: false;
5663
+ hasDefault: false;
5664
+ isPrimaryKey: false;
5665
+ isAutoincrement: false;
5666
+ hasRuntimeDefault: false;
5667
+ enumValues: undefined;
5668
+ baseColumn: never;
5669
+ identity: undefined;
5670
+ generated: undefined;
5671
+ }, {}, {}>;
5672
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
5673
+ name: "createdAt";
5674
+ tableName: "sandbox_signals";
5675
+ dataType: "date";
5676
+ columnType: "PgTimestamp";
5677
+ data: Date;
5678
+ driverParam: string;
5679
+ notNull: true;
5680
+ hasDefault: true;
5681
+ isPrimaryKey: false;
5682
+ isAutoincrement: false;
5683
+ hasRuntimeDefault: false;
5684
+ enumValues: undefined;
5685
+ baseColumn: never;
5686
+ identity: undefined;
5687
+ generated: undefined;
5688
+ }, {}, {}>;
5689
+ attempts: import("drizzle-orm/pg-core").PgColumn<{
5690
+ name: "attempts";
5691
+ tableName: "sandbox_signals";
5692
+ dataType: "number";
5693
+ columnType: "PgInteger";
5694
+ data: number;
5695
+ driverParam: string | number;
4943
5696
  notNull: true;
4944
5697
  hasDefault: true;
4945
- isPrimaryKey: true;
5698
+ isPrimaryKey: false;
5699
+ isAutoincrement: false;
5700
+ hasRuntimeDefault: false;
5701
+ enumValues: undefined;
5702
+ baseColumn: never;
5703
+ identity: undefined;
5704
+ generated: undefined;
5705
+ }, {}, {}>;
5706
+ retryAt: import("drizzle-orm/pg-core").PgColumn<{
5707
+ name: "retryAt";
5708
+ tableName: "sandbox_signals";
5709
+ dataType: "date";
5710
+ columnType: "PgTimestamp";
5711
+ data: Date;
5712
+ driverParam: string;
5713
+ notNull: false;
5714
+ hasDefault: false;
5715
+ isPrimaryKey: false;
4946
5716
  isAutoincrement: false;
4947
5717
  hasRuntimeDefault: false;
4948
5718
  enumValues: undefined;
4949
5719
  baseColumn: never;
4950
- identity: "always";
5720
+ identity: undefined;
4951
5721
  generated: undefined;
4952
5722
  }, {}, {}>;
4953
- kind: import("drizzle-orm/pg-core").PgColumn<{
4954
- name: "kind";
4955
- tableName: "control_signals";
4956
- dataType: "string";
4957
- columnType: "PgText";
4958
- data: string;
5723
+ parkedAt: import("drizzle-orm/pg-core").PgColumn<{
5724
+ name: "parkedAt";
5725
+ tableName: "sandbox_signals";
5726
+ dataType: "date";
5727
+ columnType: "PgTimestamp";
5728
+ data: Date;
4959
5729
  driverParam: string;
4960
- notNull: true;
5730
+ notNull: false;
4961
5731
  hasDefault: false;
4962
5732
  isPrimaryKey: false;
4963
5733
  isAutoincrement: false;
4964
5734
  hasRuntimeDefault: false;
4965
- enumValues: [string, ...string[]];
5735
+ enumValues: undefined;
4966
5736
  baseColumn: never;
4967
5737
  identity: undefined;
4968
5738
  generated: undefined;
4969
5739
  }, {}, {}>;
5740
+ };
5741
+ dialect: 'pg';
5742
+ }>;
5743
+ /**
5744
+ * A2A push notification configs (Host feature `a2a-profile-v2`): where a task's updates go, one
5745
+ * row per task and config id (`taskId`: the A2A id its caller knows, a queued message's own until
5746
+ * a turn takes it; `turnId`: the turn it follows). The push translator (`api/a2a/push.ts`) reads
5747
+ * the session's events from `nextSeq` on and writes each update as an `a2a_pushes` row in one
5748
+ * transaction; `doneAt` is set once the task's turn ended, and the row is deleted after the
5749
+ * Host tuning's `a2a.pushConfigRetentionMs`. `extensions` are the profile extensions the caller
5750
+ * activated when it gave the config; `baseUrl` is the Runtime's URL as that caller reached it,
5751
+ * for file URLs; `traceId` is `telemetry/v1`'s.
5752
+ */
5753
+ export declare const a2aPushConfigs: import("drizzle-orm/pg-core").PgTableWithColumns<{
5754
+ name: "a2a_push_configs";
5755
+ schema: "nylorun";
5756
+ columns: {
4970
5757
  sessionId: import("drizzle-orm/pg-core").PgColumn<{
4971
5758
  name: "sessionId";
4972
- tableName: "control_signals";
5759
+ tableName: "a2a_push_configs";
4973
5760
  dataType: "custom";
4974
5761
  columnType: "PgCustomColumn";
4975
5762
  data: string;
4976
5763
  driverParam: string;
4977
- notNull: false;
5764
+ notNull: true;
4978
5765
  hasDefault: false;
4979
5766
  isPrimaryKey: false;
4980
5767
  isAutoincrement: false;
@@ -4986,14 +5773,14 @@ export declare const controlSignals: import("drizzle-orm/pg-core").PgTableWithCo
4986
5773
  }, {}, {
4987
5774
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
4988
5775
  }>;
4989
- turnId: import("drizzle-orm/pg-core").PgColumn<{
4990
- name: "turnId";
4991
- tableName: "control_signals";
5776
+ taskId: import("drizzle-orm/pg-core").PgColumn<{
5777
+ name: "taskId";
5778
+ tableName: "a2a_push_configs";
4992
5779
  dataType: "custom";
4993
5780
  columnType: "PgCustomColumn";
4994
5781
  data: string;
4995
5782
  driverParam: string;
4996
- notNull: false;
5783
+ notNull: true;
4997
5784
  hasDefault: false;
4998
5785
  isPrimaryKey: false;
4999
5786
  isAutoincrement: false;
@@ -5005,14 +5792,14 @@ export declare const controlSignals: import("drizzle-orm/pg-core").PgTableWithCo
5005
5792
  }, {}, {
5006
5793
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5007
5794
  }>;
5008
- generation: import("drizzle-orm/pg-core").PgColumn<{
5009
- name: "generation";
5010
- tableName: "control_signals";
5011
- dataType: "number";
5012
- columnType: "PgInteger";
5013
- data: number;
5014
- driverParam: string | number;
5015
- notNull: false;
5795
+ configId: import("drizzle-orm/pg-core").PgColumn<{
5796
+ name: "configId";
5797
+ tableName: "a2a_push_configs";
5798
+ dataType: "custom";
5799
+ columnType: "PgCustomColumn";
5800
+ data: string;
5801
+ driverParam: string;
5802
+ notNull: true;
5016
5803
  hasDefault: false;
5017
5804
  isPrimaryKey: false;
5018
5805
  isAutoincrement: false;
@@ -5021,32 +5808,34 @@ export declare const controlSignals: import("drizzle-orm/pg-core").PgTableWithCo
5021
5808
  baseColumn: never;
5022
5809
  identity: undefined;
5023
5810
  generated: undefined;
5024
- }, {}, {}>;
5025
- createdAt: import("drizzle-orm/pg-core").PgColumn<{
5026
- name: "createdAt";
5027
- tableName: "control_signals";
5811
+ }, {}, {
5812
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5813
+ }>;
5814
+ contextId: import("drizzle-orm/pg-core").PgColumn<{
5815
+ name: "contextId";
5816
+ tableName: "a2a_push_configs";
5028
5817
  dataType: "string";
5029
- columnType: "PgTimestampString";
5818
+ columnType: "PgText";
5030
5819
  data: string;
5031
5820
  driverParam: string;
5032
5821
  notNull: true;
5033
- hasDefault: true;
5822
+ hasDefault: false;
5034
5823
  isPrimaryKey: false;
5035
5824
  isAutoincrement: false;
5036
5825
  hasRuntimeDefault: false;
5037
- enumValues: undefined;
5826
+ enumValues: [string, ...string[]];
5038
5827
  baseColumn: never;
5039
5828
  identity: undefined;
5040
5829
  generated: undefined;
5041
5830
  }, {}, {}>;
5042
- sandboxId: import("drizzle-orm/pg-core").PgColumn<{
5043
- name: "sandboxId";
5044
- tableName: "control_signals";
5831
+ turnId: import("drizzle-orm/pg-core").PgColumn<{
5832
+ name: "turnId";
5833
+ tableName: "a2a_push_configs";
5045
5834
  dataType: "custom";
5046
5835
  columnType: "PgCustomColumn";
5047
5836
  data: string;
5048
5837
  driverParam: string;
5049
- notNull: false;
5838
+ notNull: true;
5050
5839
  hasDefault: false;
5051
5840
  isPrimaryKey: false;
5052
5841
  isAutoincrement: false;
@@ -5058,66 +5847,48 @@ export declare const controlSignals: import("drizzle-orm/pg-core").PgTableWithCo
5058
5847
  }, {}, {
5059
5848
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5060
5849
  }>;
5061
- epoch: import("drizzle-orm/pg-core").PgColumn<{
5062
- name: "epoch";
5063
- tableName: "control_signals";
5064
- dataType: "number";
5065
- columnType: "PgInteger";
5066
- data: number;
5067
- driverParam: string | number;
5068
- notNull: false;
5850
+ url: import("drizzle-orm/pg-core").PgColumn<{
5851
+ name: "url";
5852
+ tableName: "a2a_push_configs";
5853
+ dataType: "string";
5854
+ columnType: "PgText";
5855
+ data: string;
5856
+ driverParam: string;
5857
+ notNull: true;
5069
5858
  hasDefault: false;
5070
5859
  isPrimaryKey: false;
5071
5860
  isAutoincrement: false;
5072
5861
  hasRuntimeDefault: false;
5073
- enumValues: undefined;
5862
+ enumValues: [string, ...string[]];
5074
5863
  baseColumn: never;
5075
5864
  identity: undefined;
5076
5865
  generated: undefined;
5077
5866
  }, {}, {}>;
5078
- };
5079
- dialect: 'pg';
5080
- }>;
5081
- /**
5082
- * The wake outbox (architecture §12.3): one row per wake a committed transaction asked for
5083
- * (`Tx.wake`), written in that transaction, so a commit never loses its wake. The row is
5084
- * deleted once Durable Session Execution has accepted the wake; until then the Tenant sweep
5085
- * delivers it again, with the same idempotency key (`dedupe_key`, or `wake:<id>` without
5086
- * one). `created_at` is the insert's own clock (`clock_timestamp()`). `attempts` counts the
5087
- * sweep's failed deliveries, `retry_at` is when it tries the row again, and a row
5088
- * `parked_at` is never tried again: it stays for an operator (`Tx.failOutbox`).
5089
- */
5090
- export declare const wakes: import("drizzle-orm/pg-core").PgTableWithColumns<{
5091
- name: "wakes";
5092
- schema: "nylorun";
5093
- columns: {
5094
- id: import("drizzle-orm/pg-core").PgColumn<{
5095
- name: "id";
5096
- tableName: "wakes";
5097
- dataType: "custom";
5098
- columnType: "PgCustomColumn";
5867
+ token: import("drizzle-orm/pg-core").PgColumn<{
5868
+ name: "token";
5869
+ tableName: "a2a_push_configs";
5870
+ dataType: "string";
5871
+ columnType: "PgText";
5099
5872
  data: string;
5100
5873
  driverParam: string;
5101
- notNull: true;
5874
+ notNull: false;
5102
5875
  hasDefault: false;
5103
- isPrimaryKey: true;
5876
+ isPrimaryKey: false;
5104
5877
  isAutoincrement: false;
5105
5878
  hasRuntimeDefault: false;
5106
- enumValues: undefined;
5879
+ enumValues: [string, ...string[]];
5107
5880
  baseColumn: never;
5108
5881
  identity: undefined;
5109
5882
  generated: undefined;
5110
- }, {}, {
5111
- pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5112
- }>;
5113
- sessionId: import("drizzle-orm/pg-core").PgColumn<{
5114
- name: "sessionId";
5115
- tableName: "wakes";
5883
+ }, {}, {}>;
5884
+ authentication: import("drizzle-orm/pg-core").PgColumn<{
5885
+ name: "authentication";
5886
+ tableName: "a2a_push_configs";
5116
5887
  dataType: "custom";
5117
5888
  columnType: "PgCustomColumn";
5118
- data: string;
5119
- driverParam: string;
5120
- notNull: true;
5889
+ data: unknown;
5890
+ driverParam: unknown;
5891
+ notNull: false;
5121
5892
  hasDefault: false;
5122
5893
  isPrimaryKey: false;
5123
5894
  isAutoincrement: false;
@@ -5129,9 +5900,9 @@ export declare const wakes: import("drizzle-orm/pg-core").PgTableWithColumns<{
5129
5900
  }, {}, {
5130
5901
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5131
5902
  }>;
5132
- reason: import("drizzle-orm/pg-core").PgColumn<{
5133
- name: "reason";
5134
- tableName: "wakes";
5903
+ baseUrl: import("drizzle-orm/pg-core").PgColumn<{
5904
+ name: "baseUrl";
5905
+ tableName: "a2a_push_configs";
5135
5906
  dataType: "string";
5136
5907
  columnType: "PgText";
5137
5908
  data: string;
@@ -5146,49 +5917,51 @@ export declare const wakes: import("drizzle-orm/pg-core").PgTableWithColumns<{
5146
5917
  identity: undefined;
5147
5918
  generated: undefined;
5148
5919
  }, {}, {}>;
5149
- dedupeKey: import("drizzle-orm/pg-core").PgColumn<{
5150
- name: "dedupeKey";
5151
- tableName: "wakes";
5152
- dataType: "string";
5153
- columnType: "PgText";
5154
- data: string;
5155
- driverParam: string;
5156
- notNull: false;
5920
+ extensions: import("drizzle-orm/pg-core").PgColumn<{
5921
+ name: "extensions";
5922
+ tableName: "a2a_push_configs";
5923
+ dataType: "custom";
5924
+ columnType: "PgCustomColumn";
5925
+ data: unknown;
5926
+ driverParam: unknown;
5927
+ notNull: true;
5157
5928
  hasDefault: false;
5158
5929
  isPrimaryKey: false;
5159
5930
  isAutoincrement: false;
5160
5931
  hasRuntimeDefault: false;
5161
- enumValues: [string, ...string[]];
5932
+ enumValues: undefined;
5162
5933
  baseColumn: never;
5163
5934
  identity: undefined;
5164
5935
  generated: undefined;
5165
- }, {}, {}>;
5166
- createdAt: import("drizzle-orm/pg-core").PgColumn<{
5167
- name: "createdAt";
5168
- tableName: "wakes";
5169
- dataType: "date";
5170
- columnType: "PgTimestamp";
5171
- data: Date;
5936
+ }, {}, {
5937
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5938
+ }>;
5939
+ traceId: import("drizzle-orm/pg-core").PgColumn<{
5940
+ name: "traceId";
5941
+ tableName: "a2a_push_configs";
5942
+ dataType: "string";
5943
+ columnType: "PgText";
5944
+ data: string;
5172
5945
  driverParam: string;
5173
- notNull: true;
5174
- hasDefault: true;
5946
+ notNull: false;
5947
+ hasDefault: false;
5175
5948
  isPrimaryKey: false;
5176
5949
  isAutoincrement: false;
5177
5950
  hasRuntimeDefault: false;
5178
- enumValues: undefined;
5951
+ enumValues: [string, ...string[]];
5179
5952
  baseColumn: never;
5180
5953
  identity: undefined;
5181
5954
  generated: undefined;
5182
5955
  }, {}, {}>;
5183
- attempts: import("drizzle-orm/pg-core").PgColumn<{
5184
- name: "attempts";
5185
- tableName: "wakes";
5956
+ nextSeq: import("drizzle-orm/pg-core").PgColumn<{
5957
+ name: "nextSeq";
5958
+ tableName: "a2a_push_configs";
5186
5959
  dataType: "number";
5187
- columnType: "PgInteger";
5960
+ columnType: "PgBigInt53";
5188
5961
  data: number;
5189
5962
  driverParam: string | number;
5190
5963
  notNull: true;
5191
- hasDefault: true;
5964
+ hasDefault: false;
5192
5965
  isPrimaryKey: false;
5193
5966
  isAutoincrement: false;
5194
5967
  hasRuntimeDefault: false;
@@ -5197,15 +5970,15 @@ export declare const wakes: import("drizzle-orm/pg-core").PgTableWithColumns<{
5197
5970
  identity: undefined;
5198
5971
  generated: undefined;
5199
5972
  }, {}, {}>;
5200
- retryAt: import("drizzle-orm/pg-core").PgColumn<{
5201
- name: "retryAt";
5202
- tableName: "wakes";
5973
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
5974
+ name: "createdAt";
5975
+ tableName: "a2a_push_configs";
5203
5976
  dataType: "date";
5204
5977
  columnType: "PgTimestamp";
5205
5978
  data: Date;
5206
5979
  driverParam: string;
5207
- notNull: false;
5208
- hasDefault: false;
5980
+ notNull: true;
5981
+ hasDefault: true;
5209
5982
  isPrimaryKey: false;
5210
5983
  isAutoincrement: false;
5211
5984
  hasRuntimeDefault: false;
@@ -5214,9 +5987,9 @@ export declare const wakes: import("drizzle-orm/pg-core").PgTableWithColumns<{
5214
5987
  identity: undefined;
5215
5988
  generated: undefined;
5216
5989
  }, {}, {}>;
5217
- parkedAt: import("drizzle-orm/pg-core").PgColumn<{
5218
- name: "parkedAt";
5219
- tableName: "wakes";
5990
+ doneAt: import("drizzle-orm/pg-core").PgColumn<{
5991
+ name: "doneAt";
5992
+ tableName: "a2a_push_configs";
5220
5993
  dataType: "date";
5221
5994
  columnType: "PgTimestamp";
5222
5995
  data: Date;
@@ -5235,19 +6008,20 @@ export declare const wakes: import("drizzle-orm/pg-core").PgTableWithColumns<{
5235
6008
  dialect: 'pg';
5236
6009
  }>;
5237
6010
  /**
5238
- * The sandbox signal outbox (F7.2): one row per pod sandbox reconcile or timer a committed
5239
- * transaction asked for (`Tx.signalSandbox`), kept and delivered as the wake outbox's rows are
5240
- * (`attempts`, `retry_at`, `parked_at`). A reconcile is sent with the idempotency key
5241
- * `signal:<id>`; a timer (`kind` `arm`) is its `timer` at `at` (ms since the epoch). Not in
5242
- * `wakes`, so a Runtime that delivers only wakes never reads one.
6011
+ * The push outbox (outbox kind `push`): one row per A2A update a push config is owed, its body
6012
+ * the exact JSON sent (a `StreamResponse`), delivered after commit and by the Tenant sweep as the
6013
+ * other outbox rows are (`attempts`, `retry_at`, `parked_at`). The row id is the Standard
6014
+ * Webhooks `webhook-id`, the same on every attempt. A row whose config is gone, or that kept
6015
+ * failing for the Host tuning's `a2a.pushMaxAgeMs` (24 hours), is deleted: the change feed
6016
+ * covers what it would have said.
5243
6017
  */
5244
- export declare const sandboxSignals: import("drizzle-orm/pg-core").PgTableWithColumns<{
5245
- name: "sandbox_signals";
6018
+ export declare const a2aPushes: import("drizzle-orm/pg-core").PgTableWithColumns<{
6019
+ name: "a2a_pushes";
5246
6020
  schema: "nylorun";
5247
6021
  columns: {
5248
6022
  id: import("drizzle-orm/pg-core").PgColumn<{
5249
6023
  name: "id";
5250
- tableName: "sandbox_signals";
6024
+ tableName: "a2a_pushes";
5251
6025
  dataType: "custom";
5252
6026
  columnType: "PgCustomColumn";
5253
6027
  data: string;
@@ -5264,9 +6038,9 @@ export declare const sandboxSignals: import("drizzle-orm/pg-core").PgTableWithCo
5264
6038
  }, {}, {
5265
6039
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5266
6040
  }>;
5267
- sandboxId: import("drizzle-orm/pg-core").PgColumn<{
5268
- name: "sandboxId";
5269
- tableName: "sandbox_signals";
6041
+ sessionId: import("drizzle-orm/pg-core").PgColumn<{
6042
+ name: "sessionId";
6043
+ tableName: "a2a_pushes";
5270
6044
  dataType: "custom";
5271
6045
  columnType: "PgCustomColumn";
5272
6046
  data: string;
@@ -5283,11 +6057,11 @@ export declare const sandboxSignals: import("drizzle-orm/pg-core").PgTableWithCo
5283
6057
  }, {}, {
5284
6058
  pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
5285
6059
  }>;
5286
- kind: import("drizzle-orm/pg-core").PgColumn<{
5287
- name: "kind";
5288
- tableName: "sandbox_signals";
5289
- dataType: "string";
5290
- columnType: "PgText";
6060
+ taskId: import("drizzle-orm/pg-core").PgColumn<{
6061
+ name: "taskId";
6062
+ tableName: "a2a_pushes";
6063
+ dataType: "custom";
6064
+ columnType: "PgCustomColumn";
5291
6065
  data: string;
5292
6066
  driverParam: string;
5293
6067
  notNull: true;
@@ -5295,48 +6069,52 @@ export declare const sandboxSignals: import("drizzle-orm/pg-core").PgTableWithCo
5295
6069
  isPrimaryKey: false;
5296
6070
  isAutoincrement: false;
5297
6071
  hasRuntimeDefault: false;
5298
- enumValues: [string, ...string[]];
6072
+ enumValues: undefined;
5299
6073
  baseColumn: never;
5300
6074
  identity: undefined;
5301
6075
  generated: undefined;
5302
- }, {}, {}>;
5303
- timer: import("drizzle-orm/pg-core").PgColumn<{
5304
- name: "timer";
5305
- tableName: "sandbox_signals";
5306
- dataType: "string";
5307
- columnType: "PgText";
6076
+ }, {}, {
6077
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
6078
+ }>;
6079
+ configId: import("drizzle-orm/pg-core").PgColumn<{
6080
+ name: "configId";
6081
+ tableName: "a2a_pushes";
6082
+ dataType: "custom";
6083
+ columnType: "PgCustomColumn";
5308
6084
  data: string;
5309
6085
  driverParam: string;
5310
- notNull: false;
6086
+ notNull: true;
5311
6087
  hasDefault: false;
5312
6088
  isPrimaryKey: false;
5313
6089
  isAutoincrement: false;
5314
6090
  hasRuntimeDefault: false;
5315
- enumValues: [string, ...string[]];
6091
+ enumValues: undefined;
5316
6092
  baseColumn: never;
5317
6093
  identity: undefined;
5318
6094
  generated: undefined;
5319
- }, {}, {}>;
5320
- at: import("drizzle-orm/pg-core").PgColumn<{
5321
- name: "at";
5322
- tableName: "sandbox_signals";
5323
- dataType: "number";
5324
- columnType: "PgBigInt53";
5325
- data: number;
5326
- driverParam: string | number;
5327
- notNull: false;
6095
+ }, {}, {
6096
+ pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
6097
+ }>;
6098
+ body: import("drizzle-orm/pg-core").PgColumn<{
6099
+ name: "body";
6100
+ tableName: "a2a_pushes";
6101
+ dataType: "string";
6102
+ columnType: "PgText";
6103
+ data: string;
6104
+ driverParam: string;
6105
+ notNull: true;
5328
6106
  hasDefault: false;
5329
6107
  isPrimaryKey: false;
5330
6108
  isAutoincrement: false;
5331
6109
  hasRuntimeDefault: false;
5332
- enumValues: undefined;
6110
+ enumValues: [string, ...string[]];
5333
6111
  baseColumn: never;
5334
6112
  identity: undefined;
5335
6113
  generated: undefined;
5336
6114
  }, {}, {}>;
5337
6115
  createdAt: import("drizzle-orm/pg-core").PgColumn<{
5338
6116
  name: "createdAt";
5339
- tableName: "sandbox_signals";
6117
+ tableName: "a2a_pushes";
5340
6118
  dataType: "date";
5341
6119
  columnType: "PgTimestamp";
5342
6120
  data: Date;
@@ -5353,7 +6131,7 @@ export declare const sandboxSignals: import("drizzle-orm/pg-core").PgTableWithCo
5353
6131
  }, {}, {}>;
5354
6132
  attempts: import("drizzle-orm/pg-core").PgColumn<{
5355
6133
  name: "attempts";
5356
- tableName: "sandbox_signals";
6134
+ tableName: "a2a_pushes";
5357
6135
  dataType: "number";
5358
6136
  columnType: "PgInteger";
5359
6137
  data: number;
@@ -5370,7 +6148,7 @@ export declare const sandboxSignals: import("drizzle-orm/pg-core").PgTableWithCo
5370
6148
  }, {}, {}>;
5371
6149
  retryAt: import("drizzle-orm/pg-core").PgColumn<{
5372
6150
  name: "retryAt";
5373
- tableName: "sandbox_signals";
6151
+ tableName: "a2a_pushes";
5374
6152
  dataType: "date";
5375
6153
  columnType: "PgTimestamp";
5376
6154
  data: Date;
@@ -5387,7 +6165,7 @@ export declare const sandboxSignals: import("drizzle-orm/pg-core").PgTableWithCo
5387
6165
  }, {}, {}>;
5388
6166
  parkedAt: import("drizzle-orm/pg-core").PgColumn<{
5389
6167
  name: "parkedAt";
5390
- tableName: "sandbox_signals";
6168
+ tableName: "a2a_pushes";
5391
6169
  dataType: "date";
5392
6170
  columnType: "PgTimestamp";
5393
6171
  data: Date;
@@ -5736,6 +6514,9 @@ export type ModelUsageRow = typeof modelUsage.$inferSelect;
5736
6514
  export type ModelBudgetRow = typeof modelBudgets.$inferSelect;
5737
6515
  export type ToolCrossingRow = typeof toolCrossings.$inferSelect;
5738
6516
  export type QueuedMessageRow = typeof sessionQueue.$inferSelect;
6517
+ export type TurnRow = typeof turns.$inferSelect;
6518
+ export type A2aPushConfigRow = typeof a2aPushConfigs.$inferSelect;
6519
+ export type A2aPushRow = typeof a2aPushes.$inferSelect;
5739
6520
  export type AgentTriggerRow = typeof agentTriggers.$inferSelect;
5740
6521
  export type TriggerRunRow = typeof triggerRuns.$inferSelect;
5741
6522
  export type MemoryRow = typeof memories.$inferSelect;