@opengeni/db 0.16.2 → 0.18.1

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.
@@ -94,10 +94,17 @@ __export(schema_exports, {
94
94
  sessions: () => sessions,
95
95
  slackBotDeleteOperations: () => slackBotDeleteOperations,
96
96
  slackBotPostOperations: () => slackBotPostOperations,
97
+ slackBotUserLinks: () => slackBotUserLinks,
98
+ slackInteractionInbox: () => slackInteractionInbox,
99
+ slackInteractionProgressDeliveries: () => slackInteractionProgressDeliveries,
100
+ slackInteractions: () => slackInteractions,
97
101
  socialConnections: () => socialConnections,
98
102
  socialPosts: () => socialPosts,
99
103
  stripeWebhookEvents: () => stripeWebhookEvents,
100
104
  usageEvents: () => usageEvents,
105
+ workspaceArtifactEvents: () => workspaceArtifactEvents,
106
+ workspaceArtifactVersions: () => workspaceArtifactVersions,
107
+ workspaceArtifacts: () => workspaceArtifacts,
101
108
  workspaceCaptures: () => workspaceCaptures,
102
109
  workspaceControlEvents: () => workspaceControlEvents,
103
110
  workspaceInferenceControls: () => workspaceInferenceControls,
@@ -492,6 +499,152 @@ var workspaces = pgTable3(
492
499
  )
493
500
  })
494
501
  );
502
+ var workspaceArtifacts = pgTable3(
503
+ "workspace_artifacts",
504
+ {
505
+ id: uuid3("id").primaryKey().defaultRandom(),
506
+ accountId: uuid3("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
507
+ workspaceId: uuid3("workspace_id").notNull().references(() => workspaces.id, { onDelete: "cascade" }),
508
+ slug: text3("slug").notNull(),
509
+ title: text3("title").notNull(),
510
+ description: text3("description"),
511
+ status: text3("status").$type().notNull().default("active"),
512
+ // The FK to workspace_artifact_versions is installed by migration after
513
+ // that table exists. Keeping this pointer here makes reads inexpensive.
514
+ currentVersionId: uuid3("current_version_id"),
515
+ createdBySubjectId: text3("created_by_subject_id").notNull(),
516
+ createdAt: timestamp3("created_at", { withTimezone: true }).notNull().defaultNow(),
517
+ updatedAt: timestamp3("updated_at", { withTimezone: true }).notNull().defaultNow()
518
+ },
519
+ (table) => ({
520
+ workspaceAccount: foreignKey({
521
+ name: "workspace_artifacts_workspace_account_fk",
522
+ columns: [table.workspaceId, table.accountId],
523
+ foreignColumns: [workspaces.id, workspaces.accountId]
524
+ }).onDelete("cascade"),
525
+ workspaceSlug: uniqueIndex3("workspace_artifacts_workspace_slug_uq").on(
526
+ table.workspaceId,
527
+ table.slug
528
+ ),
529
+ workspaceId: uniqueIndex3("workspace_artifacts_workspace_id_uq").on(table.workspaceId, table.id),
530
+ list: index3("workspace_artifacts_list_idx").on(table.workspaceId, table.updatedAt)
531
+ })
532
+ );
533
+ var workspaceArtifactVersions = pgTable3(
534
+ "workspace_artifact_versions",
535
+ {
536
+ id: uuid3("id").primaryKey().defaultRandom(),
537
+ accountId: uuid3("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
538
+ workspaceId: uuid3("workspace_id").notNull().references(() => workspaces.id, { onDelete: "cascade" }),
539
+ artifactId: uuid3("artifact_id").notNull(),
540
+ revision: integer2("revision").notNull(),
541
+ contentKey: text3("content_key").notNull(),
542
+ contentType: text3("content_type").$type().notNull().default("text/html"),
543
+ contentSha256: text3("content_sha256").notNull(),
544
+ sizeBytes: integer2("size_bytes").notNull(),
545
+ operationKey: text3("operation_key").notNull(),
546
+ sourceSessionId: uuid3("source_session_id"),
547
+ sourceTurnId: uuid3("source_turn_id"),
548
+ sourceAttemptId: uuid3("source_attempt_id"),
549
+ sourceExecutionGeneration: integer2("source_execution_generation"),
550
+ createdBySubjectId: text3("created_by_subject_id").notNull(),
551
+ createdAt: timestamp3("created_at", { withTimezone: true }).notNull().defaultNow()
552
+ },
553
+ (table) => ({
554
+ workspaceAccount: foreignKey({
555
+ name: "workspace_artifact_versions_workspace_account_fk",
556
+ columns: [table.workspaceId, table.accountId],
557
+ foreignColumns: [workspaces.id, workspaces.accountId]
558
+ }).onDelete("cascade"),
559
+ artifact: foreignKey({
560
+ name: "workspace_artifact_versions_artifact_fk",
561
+ columns: [table.workspaceId, table.artifactId],
562
+ foreignColumns: [workspaceArtifacts.workspaceId, workspaceArtifacts.id]
563
+ }).onDelete("cascade"),
564
+ workspaceId: uniqueIndex3("workspace_artifact_versions_workspace_id_uq").on(
565
+ table.workspaceId,
566
+ table.id
567
+ ),
568
+ revision: uniqueIndex3("workspace_artifact_versions_revision_uq").on(
569
+ table.workspaceId,
570
+ table.artifactId,
571
+ table.revision
572
+ ),
573
+ operation: uniqueIndex3("workspace_artifact_versions_operation_uq").on(
574
+ table.workspaceId,
575
+ table.operationKey
576
+ ),
577
+ provenance: check3(
578
+ "workspace_artifact_versions_provenance_chk",
579
+ sql3`(
580
+ ${table.sourceSessionId} is null
581
+ and ${table.sourceTurnId} is null
582
+ and ${table.sourceAttemptId} is null
583
+ and ${table.sourceExecutionGeneration} is null
584
+ ) or (
585
+ ${table.sourceSessionId} is not null
586
+ and ${table.sourceTurnId} is not null
587
+ and ${table.sourceAttemptId} is not null
588
+ and ${table.sourceExecutionGeneration} > 0
589
+ )`
590
+ )
591
+ })
592
+ );
593
+ var workspaceArtifactEvents = pgTable3(
594
+ "workspace_artifact_events",
595
+ {
596
+ id: uuid3("id").primaryKey().defaultRandom(),
597
+ accountId: uuid3("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
598
+ workspaceId: uuid3("workspace_id").notNull().references(() => workspaces.id, { onDelete: "cascade" }),
599
+ artifactId: uuid3("artifact_id").notNull(),
600
+ type: text3("type").$type().notNull(),
601
+ fromVersionId: uuid3("from_version_id"),
602
+ toVersionId: uuid3("to_version_id").notNull(),
603
+ operationKey: text3("operation_key").notNull(),
604
+ sourceSessionId: uuid3("source_session_id"),
605
+ sourceTurnId: uuid3("source_turn_id"),
606
+ sourceAttemptId: uuid3("source_attempt_id"),
607
+ sourceExecutionGeneration: integer2("source_execution_generation"),
608
+ actorSubjectId: text3("actor_subject_id").notNull(),
609
+ reason: text3("reason").notNull(),
610
+ createdAt: timestamp3("created_at", { withTimezone: true }).notNull().defaultNow()
611
+ },
612
+ (table) => ({
613
+ workspaceAccount: foreignKey({
614
+ name: "workspace_artifact_events_workspace_account_fk",
615
+ columns: [table.workspaceId, table.accountId],
616
+ foreignColumns: [workspaces.id, workspaces.accountId]
617
+ }).onDelete("cascade"),
618
+ artifact: foreignKey({
619
+ name: "workspace_artifact_events_artifact_fk",
620
+ columns: [table.workspaceId, table.artifactId],
621
+ foreignColumns: [workspaceArtifacts.workspaceId, workspaceArtifacts.id]
622
+ }).onDelete("cascade"),
623
+ operation: uniqueIndex3("workspace_artifact_events_operation_uq").on(
624
+ table.workspaceId,
625
+ table.operationKey
626
+ ),
627
+ list: index3("workspace_artifact_events_list_idx").on(
628
+ table.workspaceId,
629
+ table.artifactId,
630
+ table.createdAt
631
+ ),
632
+ provenance: check3(
633
+ "workspace_artifact_events_provenance_chk",
634
+ sql3`(
635
+ ${table.sourceSessionId} is null
636
+ and ${table.sourceTurnId} is null
637
+ and ${table.sourceAttemptId} is null
638
+ and ${table.sourceExecutionGeneration} is null
639
+ ) or (
640
+ ${table.sourceSessionId} is not null
641
+ and ${table.sourceTurnId} is not null
642
+ and ${table.sourceAttemptId} is not null
643
+ and ${table.sourceExecutionGeneration} > 0
644
+ )`
645
+ )
646
+ })
647
+ );
495
648
  var nestedAgentDepthConfiguration = pgTable3(
496
649
  "nested_agent_depth_configuration",
497
650
  {
@@ -729,12 +882,16 @@ var codexSubscriptionCredentials = pgTable3(
729
882
  // continues to own `version`; quota/cache writes own neither counter.
730
883
  allocatorVersion: integer2("allocator_version").notNull().default(1),
731
884
  allocatorUpdatedBySubjectId: text3("allocator_updated_by_subject_id"),
732
- allocatorUpdatedAt: timestamp3("allocator_updated_at", { withTimezone: true }),
885
+ allocatorUpdatedAt: timestamp3("allocator_updated_at", {
886
+ withTimezone: true
887
+ }),
733
888
  // Authoritative count-only summary cached from /wham/usage. Detailed rows
734
889
  // are never persisted as redemption authority; every first POST preflights
735
890
  // the provider's fresh detail endpoint.
736
891
  resetCreditAvailableCount: integer2("reset_credit_available_count"),
737
- resetCreditsCheckedAt: timestamp3("reset_credits_checked_at", { withTimezone: true }),
892
+ resetCreditsCheckedAt: timestamp3("reset_credits_checked_at", {
893
+ withTimezone: true
894
+ }),
738
895
  // Set only by a direct Better Auth cookie connection/reconnection. Legacy,
739
896
  // configured, delegated, API-key, and agent-created rows remain view-only.
740
897
  connectedBySubjectId: text3("connected_by_subject_id"),
@@ -773,7 +930,9 @@ var codexResetRedemptionAttempts = pgTable3(
773
930
  outcome: text3("outcome"),
774
931
  claimHolderId: uuid3("claim_holder_id"),
775
932
  claimExpiresAt: timestamp3("claim_expires_at", { withTimezone: true }),
776
- confirmationExpiresAt: timestamp3("confirmation_expires_at", { withTimezone: true }).notNull(),
933
+ confirmationExpiresAt: timestamp3("confirmation_expires_at", {
934
+ withTimezone: true
935
+ }).notNull(),
777
936
  providerStartedAt: timestamp3("provider_started_at", { withTimezone: true }),
778
937
  completedAt: timestamp3("completed_at", { withTimezone: true }),
779
938
  lastFailureKind: text3("last_failure_kind"),
@@ -868,6 +1027,162 @@ var connections = pgTable3(
868
1027
  )
869
1028
  })
870
1029
  );
1030
+ var slackBotUserLinks = pgTable3(
1031
+ "slack_bot_user_links",
1032
+ {
1033
+ id: uuid3("id").primaryKey().defaultRandom(),
1034
+ accountId: uuid3("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
1035
+ workspaceId: uuid3("workspace_id").notNull().references(() => workspaces.id, { onDelete: "cascade" }),
1036
+ connectionId: uuid3("connection_id").notNull().references(() => connections.id, { onDelete: "cascade" }),
1037
+ slackTeamId: text3("slack_team_id").notNull(),
1038
+ slackUserId: text3("slack_user_id").notNull(),
1039
+ subjectId: text3("subject_id").notNull(),
1040
+ linkedBySubjectId: text3("linked_by_subject_id").notNull(),
1041
+ createdAt: timestamp3("created_at", { withTimezone: true }).notNull().defaultNow(),
1042
+ updatedAt: timestamp3("updated_at", { withTimezone: true }).notNull().defaultNow()
1043
+ },
1044
+ (table) => ({
1045
+ connectionUser: uniqueIndex3("slack_bot_user_links_connection_user_uq").on(
1046
+ table.connectionId,
1047
+ table.slackUserId
1048
+ ),
1049
+ workspaceSubject: index3("slack_bot_user_links_workspace_subject_idx").on(
1050
+ table.workspaceId,
1051
+ table.subjectId
1052
+ )
1053
+ })
1054
+ );
1055
+ var slackInteractionInbox = pgTable3(
1056
+ "slack_interaction_inbox",
1057
+ {
1058
+ id: uuid3("id").primaryKey().defaultRandom(),
1059
+ accountId: uuid3("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
1060
+ workspaceId: uuid3("workspace_id").notNull().references(() => workspaces.id, { onDelete: "cascade" }),
1061
+ connectionId: uuid3("connection_id").notNull().references(() => connections.id, { onDelete: "cascade" }),
1062
+ providerEventId: text3("provider_event_id").notNull(),
1063
+ providerMessageId: text3("provider_message_id").notNull(),
1064
+ slackTeamId: text3("slack_team_id").notNull(),
1065
+ slackUserId: text3("slack_user_id").notNull(),
1066
+ slackChannelId: text3("slack_channel_id").notNull(),
1067
+ slackMessageTs: text3("slack_message_ts").notNull(),
1068
+ slackThreadTs: text3("slack_thread_ts"),
1069
+ triggerKind: text3("trigger_kind").$type().notNull(),
1070
+ text: text3("text").notNull(),
1071
+ status: text3("status").$type().notNull().default("pending"),
1072
+ claimHolderId: uuid3("claim_holder_id"),
1073
+ claimExpiresAt: timestamp3("claim_expires_at", { withTimezone: true }),
1074
+ attemptCount: integer2("attempt_count").notNull().default(0),
1075
+ retryAt: timestamp3("retry_at", { withTimezone: true }),
1076
+ lastErrorCode: text3("last_error_code"),
1077
+ processedAt: timestamp3("processed_at", { withTimezone: true }),
1078
+ createdAt: timestamp3("created_at", { withTimezone: true }).notNull().defaultNow(),
1079
+ updatedAt: timestamp3("updated_at", { withTimezone: true }).notNull().defaultNow()
1080
+ },
1081
+ (table) => ({
1082
+ providerEvent: uniqueIndex3("slack_interaction_inbox_provider_event_uq").on(
1083
+ table.connectionId,
1084
+ table.providerEventId
1085
+ ),
1086
+ providerMessage: uniqueIndex3("slack_interaction_inbox_provider_message_uq").on(
1087
+ table.connectionId,
1088
+ table.providerMessageId
1089
+ ),
1090
+ pending: index3("slack_interaction_inbox_pending_idx").on(
1091
+ table.status,
1092
+ table.retryAt,
1093
+ table.createdAt,
1094
+ table.id
1095
+ )
1096
+ })
1097
+ );
1098
+ var slackInteractions = pgTable3(
1099
+ "slack_interactions",
1100
+ {
1101
+ id: uuid3("id").primaryKey().defaultRandom(),
1102
+ accountId: uuid3("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
1103
+ workspaceId: uuid3("workspace_id").notNull().references(() => workspaces.id, { onDelete: "cascade" }),
1104
+ connectionId: uuid3("connection_id").notNull().references(() => connections.id, { onDelete: "cascade" }),
1105
+ slackTeamId: text3("slack_team_id").notNull(),
1106
+ slackChannelId: text3("slack_channel_id").notNull(),
1107
+ slackThreadTs: text3("slack_thread_ts").notNull(),
1108
+ routeKey: text3("route_key").notNull(),
1109
+ triggeringProviderEventId: text3("triggering_provider_event_id").notNull(),
1110
+ owningSubjectId: text3("owning_subject_id").notNull(),
1111
+ visibility: text3("visibility").$type().notNull(),
1112
+ sessionReservationId: uuid3("session_reservation_id").notNull().defaultRandom(),
1113
+ sessionId: uuid3("session_id").references(() => sessions.id, {
1114
+ onDelete: "cascade"
1115
+ }),
1116
+ lastDeliveredSessionEventSequence: integer2("last_delivered_session_event_sequence").notNull().default(0),
1117
+ deliveryClaimHolderId: uuid3("delivery_claim_holder_id"),
1118
+ deliveryClaimExpiresAt: timestamp3("delivery_claim_expires_at", {
1119
+ withTimezone: true
1120
+ }),
1121
+ deliveryAttemptCount: integer2("delivery_attempt_count").notNull().default(0),
1122
+ deliveryRetryAt: timestamp3("delivery_retry_at", { withTimezone: true }),
1123
+ deliveryLastErrorCode: text3("delivery_last_error_code"),
1124
+ ackSlackMessageTs: text3("ack_slack_message_ts"),
1125
+ progressCount: integer2("progress_count").notNull().default(0),
1126
+ terminalDeliveryState: text3("terminal_delivery_state").$type().notNull().default("open"),
1127
+ createdAt: timestamp3("created_at", { withTimezone: true }).notNull().defaultNow(),
1128
+ updatedAt: timestamp3("updated_at", { withTimezone: true }).notNull().defaultNow()
1129
+ },
1130
+ (table) => ({
1131
+ route: uniqueIndex3("slack_interactions_route_uq").on(table.connectionId, table.routeKey),
1132
+ identity: uniqueIndex3("slack_interactions_identity_uq").on(
1133
+ table.accountId,
1134
+ table.workspaceId,
1135
+ table.id
1136
+ ),
1137
+ workspaceReservation: uniqueIndex3("slack_interactions_workspace_reservation_uq").on(
1138
+ table.workspaceId,
1139
+ table.sessionReservationId
1140
+ ),
1141
+ workspaceSession: uniqueIndex3("slack_interactions_workspace_session_uq").on(table.workspaceId, table.sessionId).where(sql3`${table.sessionId} is not null`),
1142
+ delivery: index3("slack_interactions_delivery_idx").on(
1143
+ table.terminalDeliveryState,
1144
+ table.deliveryRetryAt,
1145
+ table.updatedAt,
1146
+ table.id
1147
+ )
1148
+ })
1149
+ );
1150
+ var slackInteractionProgressDeliveries = pgTable3(
1151
+ "slack_interaction_progress_deliveries",
1152
+ {
1153
+ id: uuid3("id").primaryKey().defaultRandom(),
1154
+ accountId: uuid3("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
1155
+ workspaceId: uuid3("workspace_id").notNull().references(() => workspaces.id, { onDelete: "cascade" }),
1156
+ interactionId: uuid3("interaction_id").notNull(),
1157
+ sessionEventSequence: integer2("session_event_sequence").notNull(),
1158
+ slot: integer2("slot").notNull(),
1159
+ operationId: uuid3("operation_id").notNull(),
1160
+ createdAt: timestamp3("created_at", { withTimezone: true }).notNull().defaultNow()
1161
+ },
1162
+ (table) => ({
1163
+ interactionIdentity: foreignKey({
1164
+ columns: [table.accountId, table.workspaceId, table.interactionId],
1165
+ foreignColumns: [
1166
+ slackInteractions.accountId,
1167
+ slackInteractions.workspaceId,
1168
+ slackInteractions.id
1169
+ ],
1170
+ name: "slack_interaction_progress_deliveries_interaction_fk"
1171
+ }).onDelete("cascade"),
1172
+ event: uniqueIndex3("slack_interaction_progress_deliveries_event_uq").on(
1173
+ table.interactionId,
1174
+ table.sessionEventSequence
1175
+ ),
1176
+ slot: uniqueIndex3("slack_interaction_progress_deliveries_slot_uq").on(
1177
+ table.interactionId,
1178
+ table.slot
1179
+ ),
1180
+ operation: uniqueIndex3("slack_interaction_progress_deliveries_operation_uq").on(
1181
+ table.workspaceId,
1182
+ table.operationId
1183
+ )
1184
+ })
1185
+ );
871
1186
  var slackBotPostOperations = pgTable3(
872
1187
  "slack_bot_post_operations",
873
1188
  {
@@ -2306,8 +2621,12 @@ var sessionGoals = pgTable3(
2306
2621
  // update, timeline events, usage row, and workflow-wake outbox row.
2307
2622
  // Temporal signals and workflow history are replaceable nudges over these
2308
2623
  // monotonic revisions.
2309
- continuationWakeRevision: bigint3("continuation_wake_revision", { mode: "number" }).notNull().default(0),
2310
- continuationObservedRevision: bigint3("continuation_observed_revision", { mode: "number" }).notNull().default(0),
2624
+ continuationWakeRevision: bigint3("continuation_wake_revision", {
2625
+ mode: "number"
2626
+ }).notNull().default(0),
2627
+ continuationObservedRevision: bigint3("continuation_observed_revision", {
2628
+ mode: "number"
2629
+ }).notNull().default(0),
2311
2630
  metadata: jsonb2("metadata").$type().notNull().default({}),
2312
2631
  createdAt: timestamp3("created_at", { withTimezone: true }).notNull().defaultNow(),
2313
2632
  updatedAt: timestamp3("updated_at", { withTimezone: true }).notNull().defaultNow()
@@ -2863,8 +3182,12 @@ var sandboxLeases = pgTable3(
2863
3182
  lastMeterAt: timestamp3("last_meter_at", { withTimezone: true }),
2864
3183
  lastMeterTick: integer2("last_meter_tick").notNull().default(0),
2865
3184
  providerCreatedAt: timestamp3("provider_created_at", { withTimezone: true }),
2866
- providerDeadlineAt: timestamp3("provider_deadline_at", { withTimezone: true }),
2867
- rotationRequestedAt: timestamp3("rotation_requested_at", { withTimezone: true }),
3185
+ providerDeadlineAt: timestamp3("provider_deadline_at", {
3186
+ withTimezone: true
3187
+ }),
3188
+ rotationRequestedAt: timestamp3("rotation_requested_at", {
3189
+ withTimezone: true
3190
+ }),
2868
3191
  rotationReason: text3("rotation_reason", {
2869
3192
  enum: ["provider_deadline", "operator"]
2870
3193
  }),
@@ -2951,7 +3274,9 @@ var sandboxLeaseHolders = pgTable3(
2951
3274
  accountId: uuid3("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
2952
3275
  workspaceId: uuid3("workspace_id").notNull().references(() => workspaces.id, { onDelete: "cascade" }),
2953
3276
  leaseId: uuid3("lease_id").notNull().references(() => sandboxLeases.id, { onDelete: "cascade" }),
2954
- kind: text3("kind", { enum: ["turn", "viewer", "direct", "process"] }).notNull(),
3277
+ kind: text3("kind", {
3278
+ enum: ["turn", "viewer", "direct", "process"]
3279
+ }).notNull(),
2955
3280
  holderId: text3("holder_id").notNull(),
2956
3281
  // The attributing session within the (possibly shared) group.
2957
3282
  subjectId: uuid3("subject_id"),
@@ -2984,7 +3309,9 @@ var sandboxWorkspaceMutationAdmissions = pgTable3(
2984
3309
  leaseId: uuid3("lease_id").notNull().references(() => sandboxLeases.id, { onDelete: "cascade" }),
2985
3310
  sandboxGroupId: uuid3("sandbox_group_id").notNull(),
2986
3311
  sessionId: uuid3("session_id").notNull(),
2987
- actorKind: text3("actor_kind", { enum: sandboxWorkspaceMutationActorKindValues }).notNull(),
3312
+ actorKind: text3("actor_kind", {
3313
+ enum: sandboxWorkspaceMutationActorKindValues
3314
+ }).notNull(),
2988
3315
  actorId: uuid3("actor_id").notNull(),
2989
3316
  // Exact turn authority is present only for actor_kind='turn'. Direct HTTP
2990
3317
  // requests and retained processes never invent a turn or quiescence owner.
@@ -3122,7 +3449,9 @@ var sandboxRetainedProcesses = pgTable3(
3122
3449
  sandboxGroupId: uuid3("sandbox_group_id").notNull(),
3123
3450
  parentAdmissionId: uuid3("parent_admission_id").notNull(),
3124
3451
  holderId: text3("holder_id").notNull(),
3125
- ownerActorKind: text3("owner_actor_kind", { enum: ["turn", "direct"] }).notNull(),
3452
+ ownerActorKind: text3("owner_actor_kind", {
3453
+ enum: ["turn", "direct"]
3454
+ }).notNull(),
3126
3455
  ownerActorId: uuid3("owner_actor_id").notNull(),
3127
3456
  ownerTurnId: uuid3("owner_turn_id"),
3128
3457
  ownerAttemptId: uuid3("owner_attempt_id"),
@@ -3150,13 +3479,19 @@ var sandboxRetainedProcesses = pgTable3(
3150
3479
  // never exit/loss proof.
3151
3480
  reconcileAfter: timestamp3("reconcile_after", { withTimezone: true }).notNull().defaultNow(),
3152
3481
  reconcileClaimId: uuid3("reconcile_claim_id"),
3153
- reconcileClaimedAt: timestamp3("reconcile_claimed_at", { withTimezone: true }),
3482
+ reconcileClaimedAt: timestamp3("reconcile_claimed_at", {
3483
+ withTimezone: true
3484
+ }),
3154
3485
  reconcileAttempts: integer2("reconcile_attempts").notNull().default(0),
3155
3486
  lastReconcileOutcome: text3("last_reconcile_outcome"),
3156
- reconcileProofOutcome: text3("reconcile_proof_outcome", { enum: ["exited", "lost"] }),
3487
+ reconcileProofOutcome: text3("reconcile_proof_outcome", {
3488
+ enum: ["exited", "lost"]
3489
+ }),
3157
3490
  reconcileProofExitCode: integer2("reconcile_proof_exit_code"),
3158
3491
  reconcileProofReason: text3("reconcile_proof_reason"),
3159
- reconcileProofObservedAt: timestamp3("reconcile_proof_observed_at", { withTimezone: true })
3492
+ reconcileProofObservedAt: timestamp3("reconcile_proof_observed_at", {
3493
+ withTimezone: true
3494
+ })
3160
3495
  },
3161
3496
  (table) => ({
3162
3497
  workspaceAccount: foreignKey({
@@ -3742,8 +4077,12 @@ var githubInstallations = pgTable3(
3742
4077
  githubActorId: bigint3("github_actor_id", { mode: "number" }),
3743
4078
  githubActorLogin: text3("github_actor_login"),
3744
4079
  authorityKind: text3("authority_kind"),
3745
- authorityCheckedAt: timestamp3("authority_checked_at", { withTimezone: true }),
3746
- authorityExpiresAt: timestamp3("authority_expires_at", { withTimezone: true }),
4080
+ authorityCheckedAt: timestamp3("authority_checked_at", {
4081
+ withTimezone: true
4082
+ }),
4083
+ authorityExpiresAt: timestamp3("authority_expires_at", {
4084
+ withTimezone: true
4085
+ }),
3747
4086
  authorityNonce: text3("authority_nonce"),
3748
4087
  createdAt: timestamp3("created_at", { withTimezone: true }).notNull().defaultNow(),
3749
4088
  updatedAt: timestamp3("updated_at", { withTimezone: true }).notNull().defaultNow()
@@ -4036,7 +4375,9 @@ var hostExportOutbox = pgTable3(
4036
4375
  payload: jsonb2("payload").$type().notNull(),
4037
4376
  envelopeBytes: integer2("envelope_bytes").notNull(),
4038
4377
  occurredAt: timestamp3("occurred_at", { withTimezone: true }).notNull(),
4039
- sourceRecordedAt: timestamp3("source_recorded_at", { withTimezone: true }).notNull(),
4378
+ sourceRecordedAt: timestamp3("source_recorded_at", {
4379
+ withTimezone: true
4380
+ }).notNull(),
4040
4381
  enqueuedAt: timestamp3("enqueued_at", { withTimezone: true }).notNull()
4041
4382
  },
4042
4383
  (table) => ({
@@ -4400,6 +4741,10 @@ var socialConnections = pgTable3(
4400
4741
  status: text3("status").notNull().default("connected"),
4401
4742
  scopes: jsonb2("scopes").$type().notNull().default([]),
4402
4743
  credentialRef: text3("credential_ref"),
4744
+ // AES-256-GCM envelope (environment-crypto v1 format) holding the OAuth
4745
+ // token bundle. Never exposed through contracts or MCP tools; only the
4746
+ // host-side social API client decrypts it.
4747
+ credentialEncrypted: text3("credential_encrypted"),
4403
4748
  tokenMetadata: jsonb2("token_metadata").$type().notNull().default({}),
4404
4749
  metadata: jsonb2("metadata").$type().notNull().default({}),
4405
4750
  createdAt: timestamp3("created_at", { withTimezone: true }).notNull().defaultNow(),
@@ -4546,6 +4891,9 @@ export {
4546
4891
  preferenceRegistrySnapshots,
4547
4892
  managedAccounts,
4548
4893
  workspaces,
4894
+ workspaceArtifacts,
4895
+ workspaceArtifactVersions,
4896
+ workspaceArtifactEvents,
4549
4897
  nestedAgentDepthConfiguration,
4550
4898
  workspaceInferenceControls,
4551
4899
  workspaceSessionActivityRevisions,
@@ -4556,6 +4904,10 @@ export {
4556
4904
  codexSubscriptionCredentials,
4557
4905
  codexResetRedemptionAttempts,
4558
4906
  connections,
4907
+ slackBotUserLinks,
4908
+ slackInteractionInbox,
4909
+ slackInteractions,
4910
+ slackInteractionProgressDeliveries,
4559
4911
  slackBotPostOperations,
4560
4912
  slackBotDeleteOperations,
4561
4913
  integrationOauthClients,
@@ -4645,4 +4997,4 @@ export {
4645
4997
  rigChanges,
4646
4998
  schema_exports
4647
4999
  };
4648
- //# sourceMappingURL=chunk-HZD7KVAR.js.map
5000
+ //# sourceMappingURL=chunk-YKWJ7QJ2.js.map