@opengeni/db 3.6.0 → 3.7.3-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canonical-human-identities.js +3 -3
- package/dist/{chunk-744DFC65.js → chunk-4NAR7FBA.js} +92 -6
- package/dist/chunk-4NAR7FBA.js.map +1 -0
- package/dist/{chunk-IW6O6G7R.js → chunk-5NNCGFQY.js} +2 -2
- package/dist/{chunk-G3732M3T.js → chunk-DZCYW2WT.js} +2 -2
- package/dist/{chunk-WW7AJ5IC.js → chunk-F6PBS6WE.js} +5 -7
- package/dist/chunk-F6PBS6WE.js.map +1 -0
- package/dist/{chunk-UJ2EW3QI.js → chunk-O56DM5GZ.js} +340 -85
- package/dist/chunk-O56DM5GZ.js.map +1 -0
- package/dist/{chunk-CDMMSUWJ.js → chunk-S3TDDCS2.js} +3 -3
- package/dist/{chunk-Q5YUGQVK.js → chunk-SZAWDXQC.js} +3 -3
- package/dist/{chunk-UGDVSQ6U.js → chunk-U4WPPEBH.js} +2 -2
- package/dist/{chunk-2NT476HD.js → chunk-US4IS6IV.js} +2 -2
- package/dist/codex-token-resolver.d.ts +12 -1
- package/dist/company-profile-agent-admin.d.ts +4 -2
- package/dist/company-profile-agent-policy.d.ts +20 -0
- package/dist/company-profile-schema.d.ts +573 -0
- package/dist/editable-artifact-durable-export.js +2 -2
- package/dist/editable-artifacts.js +3 -3
- package/dist/index.d.ts +382 -18
- package/dist/index.js +4513 -2065
- package/dist/index.js.map +1 -1
- package/dist/managed-auth-session-sets.js +3 -3
- package/dist/managed-human-provisioning.d.ts +3 -3
- package/dist/memory-domain.d.ts +5 -3
- package/dist/provision-roles.js +1 -1
- package/dist/runtime-posture.d.ts +5 -5
- package/dist/schema.d.ts +725 -4
- package/dist/schema.js +13 -1
- package/dist/session-background-commands.js +3 -3
- package/dist/session-control.d.ts +40 -5
- package/dist/session-queue-commands.d.ts +2 -0
- package/dist/session-tenancy.js +3 -3
- package/dist/user-resource-authority.d.ts +8 -0
- package/dist/video-generation.js +3 -3
- package/drizzle/0369_local_human_personal_authority.sql +350 -0
- package/drizzle/0370_workspace_member_management_scope.sql +98 -0
- package/drizzle/0371_workspace_member_candidate_inventory.sql +128 -0
- package/drizzle/0372_ordered_variable_set_runtime_authority.sql +287 -0
- package/drizzle/0373_sandbox_shared_preparation.sql +59 -0
- package/drizzle/0374_session_event_cursors.sql +315 -0
- package/drizzle/0375_session_recovery_observability.sql +73 -0
- package/drizzle/0376_organization_workspace_inventory.sql +88 -0
- package/drizzle/0377_scoped_rig_health_projection.sql +80 -0
- package/drizzle/0378_scoped_rig_health_audit_timestamp.sql +77 -0
- package/drizzle/0379_session_event_raw_lane_activation.sql +518 -0
- package/drizzle/0380_autonomous_company_profile_agent_policy.sql +829 -0
- package/drizzle/0381_organization_codex_subscription_inheritance.sql +720 -0
- package/drizzle/0382_organization_api_key_provenance.sql +91 -0
- package/drizzle/0383_codex_cooldown_reconciliation.sql +51 -0
- package/drizzle/0384_codex_cooldown_revision_guard_privileges.sql +6 -0
- package/drizzle/0385_connected_machine_legacy_tilde_workdirs.sql +25 -0
- package/drizzle/0386_local_organization_administration.sql +157 -0
- package/package.json +6 -6
- package/src/codex-token-resolver.ts +26 -1
- package/src/company-brain-governed-writes.ts +30 -1
- package/src/company-profile-agent-admin.ts +68 -1
- package/src/company-profile-agent-policy.ts +126 -0
- package/src/company-profile-schema.ts +115 -1
- package/src/database.ts +3 -5
- package/src/index.ts +3626 -456
- package/src/managed-human-provisioning.ts +3 -3
- package/src/memory-domain.ts +9 -4
- package/src/organization-membership-lifecycle.ts +0 -1
- package/src/provision-roles.ts +83 -4
- package/src/runtime-posture.ts +22 -0
- package/src/schema.ts +161 -8
- package/src/session-control.ts +177 -59
- package/src/session-queue-commands.ts +146 -40
- package/src/session-tool-call-settlement.ts +34 -7
- package/src/user-resource-authority.ts +56 -0
- package/dist/chunk-744DFC65.js.map +0 -1
- package/dist/chunk-UJ2EW3QI.js.map +0 -1
- package/dist/chunk-WW7AJ5IC.js.map +0 -1
- /package/dist/{chunk-IW6O6G7R.js.map → chunk-5NNCGFQY.js.map} +0 -0
- /package/dist/{chunk-G3732M3T.js.map → chunk-DZCYW2WT.js.map} +0 -0
- /package/dist/{chunk-CDMMSUWJ.js.map → chunk-S3TDDCS2.js.map} +0 -0
- /package/dist/{chunk-Q5YUGQVK.js.map → chunk-SZAWDXQC.js.map} +0 -0
- /package/dist/{chunk-UGDVSQ6U.js.map → chunk-U4WPPEBH.js.map} +0 -0
- /package/dist/{chunk-2NT476HD.js.map → chunk-US4IS6IV.js.map} +0 -0
|
@@ -52,6 +52,7 @@ __export(schema_exports, {
|
|
|
52
52
|
companyBrainContextSelectionReceipts: () => companyBrainContextSelectionReceipts,
|
|
53
53
|
companyBrainTurnContextSnapshots: () => companyBrainTurnContextSnapshots,
|
|
54
54
|
companyProfileActivationEvents: () => companyProfileActivationEvents,
|
|
55
|
+
companyProfileAgentAutomaticActivationReceipts: () => companyProfileAgentAutomaticActivationReceipts,
|
|
55
56
|
companyProfileAgentConfirmationReceipts: () => companyProfileAgentConfirmationReceipts,
|
|
56
57
|
companyProfileAgentProposalReceipts: () => companyProfileAgentProposalReceipts,
|
|
57
58
|
companyProfileHeads: () => companyProfileHeads,
|
|
@@ -166,6 +167,9 @@ __export(schema_exports, {
|
|
|
166
167
|
nestedAgentDepthConfiguration: () => nestedAgentDepthConfiguration,
|
|
167
168
|
networkRoutes: () => networkRoutes,
|
|
168
169
|
newSessionDrafts: () => newSessionDrafts,
|
|
170
|
+
organizationCodexRotationSettings: () => organizationCodexRotationSettings,
|
|
171
|
+
organizationCompanyProfileAgentPolicies: () => organizationCompanyProfileAgentPolicies,
|
|
172
|
+
organizationCompanyProfileAgentPolicyEvents: () => organizationCompanyProfileAgentPolicyEvents,
|
|
169
173
|
organizationInvitationBindingEvents: () => organizationInvitationBindingEvents,
|
|
170
174
|
organizationMembershipInvitations: () => organizationMembershipInvitations,
|
|
171
175
|
organizationMembershipLifecycleEvents: () => organizationMembershipLifecycleEvents,
|
|
@@ -230,6 +234,7 @@ __export(schema_exports, {
|
|
|
230
234
|
sessionAttemptToolCatalogs: () => sessionAttemptToolCatalogs,
|
|
231
235
|
sessionBackgroundCommands: () => sessionBackgroundCommands,
|
|
232
236
|
sessionCommandReceipts: () => sessionCommandReceipts,
|
|
237
|
+
sessionEventCursors: () => sessionEventCursors,
|
|
233
238
|
sessionEvents: () => sessionEvents,
|
|
234
239
|
sessionGoalRevisions: () => sessionGoalRevisions,
|
|
235
240
|
sessionGoals: () => sessionGoals,
|
|
@@ -309,6 +314,7 @@ __export(schema_exports, {
|
|
|
309
314
|
workspaceArtifactVersions: () => workspaceArtifactVersions,
|
|
310
315
|
workspaceArtifacts: () => workspaceArtifacts,
|
|
311
316
|
workspaceCaptures: () => workspaceCaptures,
|
|
317
|
+
workspaceCodexSubscriptionPreferences: () => workspaceCodexSubscriptionPreferences,
|
|
312
318
|
workspaceControlEvents: () => workspaceControlEvents,
|
|
313
319
|
workspaceInferenceControls: () => workspaceInferenceControls,
|
|
314
320
|
workspaceInstructionPolicyActivationEvents: () => workspaceInstructionPolicyActivationEvents,
|
|
@@ -342,7 +348,7 @@ import { WORKSPACE_XAI_PROVIDER_ACCOUNT_AUTHORITY_SNAPSHOT_V1 } from "@opengeni/
|
|
|
342
348
|
import { sql as sql16 } from "drizzle-orm";
|
|
343
349
|
import {
|
|
344
350
|
bigint as bigint14,
|
|
345
|
-
boolean as
|
|
351
|
+
boolean as boolean11,
|
|
346
352
|
check as check11,
|
|
347
353
|
customType as customType5,
|
|
348
354
|
foreignKey,
|
|
@@ -2198,6 +2204,7 @@ var workspaceInstructionPolicySnapshots = pgTable4(
|
|
|
2198
2204
|
import { sql as sql5 } from "drizzle-orm";
|
|
2199
2205
|
import {
|
|
2200
2206
|
bigint as bigint5,
|
|
2207
|
+
boolean as boolean3,
|
|
2201
2208
|
check as check3,
|
|
2202
2209
|
index as index5,
|
|
2203
2210
|
integer as integer6,
|
|
@@ -2298,6 +2305,55 @@ var companyProfileActivationEvents = pgTable5(
|
|
|
2298
2305
|
type: check3("company_profile_events_type_chk", sql5`${table.type} in ('activate', 'rollback')`)
|
|
2299
2306
|
})
|
|
2300
2307
|
);
|
|
2308
|
+
var organizationCompanyProfileAgentPolicies = pgTable5(
|
|
2309
|
+
"organization_company_profile_agent_policies",
|
|
2310
|
+
{
|
|
2311
|
+
accountId: uuid5("account_id").primaryKey(),
|
|
2312
|
+
mode: text5("mode").$type().notNull().default("suggest"),
|
|
2313
|
+
version: bigint5("version", { mode: "number" }).notNull().default(0),
|
|
2314
|
+
updatedByMembershipId: uuid5("updated_by_membership_id"),
|
|
2315
|
+
updatedAt: timestamp5("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
2316
|
+
},
|
|
2317
|
+
(table) => ({
|
|
2318
|
+
mode: check3(
|
|
2319
|
+
"organization_company_profile_agent_policies_mode_check",
|
|
2320
|
+
sql5`${table.mode} in ('off', 'suggest', 'automatic')`
|
|
2321
|
+
),
|
|
2322
|
+
version: check3(
|
|
2323
|
+
"organization_company_profile_agent_policies_version_check",
|
|
2324
|
+
sql5`${table.version} >= 0`
|
|
2325
|
+
)
|
|
2326
|
+
})
|
|
2327
|
+
);
|
|
2328
|
+
var organizationCompanyProfileAgentPolicyEvents = pgTable5(
|
|
2329
|
+
"organization_company_profile_agent_policy_events",
|
|
2330
|
+
{
|
|
2331
|
+
id: uuid5("id").primaryKey(),
|
|
2332
|
+
accountId: uuid5("account_id").notNull(),
|
|
2333
|
+
actorMembershipId: uuid5("actor_membership_id").notNull(),
|
|
2334
|
+
requestedMode: text5("requested_mode").$type().notNull(),
|
|
2335
|
+
expectedVersion: bigint5("expected_version", { mode: "number" }).notNull(),
|
|
2336
|
+
resultMode: text5("result_mode").$type().notNull(),
|
|
2337
|
+
resultVersion: bigint5("result_version", { mode: "number" }).notNull(),
|
|
2338
|
+
resultUpdatedAt: timestamp5("result_updated_at", { withTimezone: true }).notNull(),
|
|
2339
|
+
changed: boolean3("changed").notNull()
|
|
2340
|
+
},
|
|
2341
|
+
(table) => ({
|
|
2342
|
+
accountTimeline: index5("organization_company_profile_agent_policy_events_account_idx").on(
|
|
2343
|
+
table.accountId,
|
|
2344
|
+
table.resultVersion
|
|
2345
|
+
),
|
|
2346
|
+
modes: check3(
|
|
2347
|
+
"organization_company_profile_agent_policy_events_mode_check",
|
|
2348
|
+
sql5`${table.requestedMode} in ('off', 'suggest', 'automatic')
|
|
2349
|
+
and ${table.resultMode} in ('off', 'suggest', 'automatic')`
|
|
2350
|
+
),
|
|
2351
|
+
versions: check3(
|
|
2352
|
+
"organization_company_profile_agent_policy_events_version_check",
|
|
2353
|
+
sql5`${table.expectedVersion} >= 0 and ${table.resultVersion} > 0`
|
|
2354
|
+
)
|
|
2355
|
+
})
|
|
2356
|
+
);
|
|
2301
2357
|
var companyProfileSnapshots = pgTable5(
|
|
2302
2358
|
"company_profile_snapshots",
|
|
2303
2359
|
{
|
|
@@ -2350,6 +2406,8 @@ var companyProfileAgentProposalReceipts = pgTable5(
|
|
|
2350
2406
|
revisionId: uuid5("revision_id").notNull(),
|
|
2351
2407
|
expectedCurrentRevisionId: uuid5("expected_current_revision_id"),
|
|
2352
2408
|
expectedActivationVersion: bigint5("expected_activation_version", { mode: "number" }).notNull(),
|
|
2409
|
+
policyMode: text5("policy_mode").$type().notNull(),
|
|
2410
|
+
policyVersion: bigint5("policy_version", { mode: "number" }).notNull(),
|
|
2353
2411
|
reason: text5("reason").notNull(),
|
|
2354
2412
|
humanInput: jsonb5("human_input").$type().notNull(),
|
|
2355
2413
|
createdAt: timestamp5("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
@@ -2379,7 +2437,9 @@ var companyProfileAgentProposalReceipts = pgTable5(
|
|
|
2379
2437
|
),
|
|
2380
2438
|
generation: check3(
|
|
2381
2439
|
"company_profile_agent_proposals_generation_check",
|
|
2382
|
-
sql5`${table.executionGeneration} > 0
|
|
2440
|
+
sql5`${table.executionGeneration} > 0
|
|
2441
|
+
and ${table.expectedActivationVersion} >= 0
|
|
2442
|
+
and ${table.policyVersion} >= 0`
|
|
2383
2443
|
),
|
|
2384
2444
|
subject: check3(
|
|
2385
2445
|
"company_profile_agent_proposals_subject_check",
|
|
@@ -2390,6 +2450,10 @@ var companyProfileAgentProposalReceipts = pgTable5(
|
|
|
2390
2450
|
sql5`char_length(btrim(${table.reason})) between 1 and 4096
|
|
2391
2451
|
and octet_length(convert_to(btrim(${table.reason}), 'UTF8')) <= 16384`
|
|
2392
2452
|
),
|
|
2453
|
+
policyMode: check3(
|
|
2454
|
+
"company_profile_agent_proposals_policy_mode_check",
|
|
2455
|
+
sql5`${table.policyMode} in ('suggest', 'automatic')`
|
|
2456
|
+
),
|
|
2393
2457
|
humanInputShape: check3(
|
|
2394
2458
|
"company_profile_agent_proposals_human_input_check",
|
|
2395
2459
|
sql5`jsonb_typeof(${table.humanInput}) = 'object'
|
|
@@ -2446,6 +2510,58 @@ var companyProfileAgentConfirmationReceipts = pgTable5(
|
|
|
2446
2510
|
)
|
|
2447
2511
|
})
|
|
2448
2512
|
);
|
|
2513
|
+
var companyProfileAgentAutomaticActivationReceipts = pgTable5(
|
|
2514
|
+
"company_profile_agent_automatic_activation_receipts",
|
|
2515
|
+
{
|
|
2516
|
+
id: uuid5("id").primaryKey().defaultRandom(),
|
|
2517
|
+
operationId: uuid5("operation_id").notNull(),
|
|
2518
|
+
inputHash: text5("input_hash").notNull(),
|
|
2519
|
+
accountId: uuid5("account_id").notNull(),
|
|
2520
|
+
workspaceId: uuid5("workspace_id").notNull(),
|
|
2521
|
+
sessionId: uuid5("session_id").notNull(),
|
|
2522
|
+
turnId: uuid5("turn_id").notNull(),
|
|
2523
|
+
activationAttemptId: uuid5("activation_attempt_id").notNull(),
|
|
2524
|
+
executionGeneration: integer6("execution_generation").notNull(),
|
|
2525
|
+
proposalReceiptId: uuid5("proposal_receipt_id").notNull(),
|
|
2526
|
+
proposalRevisionId: uuid5("proposal_revision_id").notNull(),
|
|
2527
|
+
initiatingHumanSubjectId: text5("initiating_human_subject_id").notNull(),
|
|
2528
|
+
initiatingMembershipId: uuid5("initiating_membership_id").notNull(),
|
|
2529
|
+
policyVersion: bigint5("policy_version", { mode: "number" }).notNull(),
|
|
2530
|
+
activationEventId: uuid5("activation_event_id").notNull(),
|
|
2531
|
+
createdAt: timestamp5("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
2532
|
+
},
|
|
2533
|
+
(table) => ({
|
|
2534
|
+
accountOperation: uniqueIndex5(
|
|
2535
|
+
"company_profile_agent_automatic_activations_account_operation_uq"
|
|
2536
|
+
).on(table.accountId, table.operationId),
|
|
2537
|
+
proposal: uniqueIndex5("company_profile_agent_automatic_activations_proposal_uq").on(
|
|
2538
|
+
table.accountId,
|
|
2539
|
+
table.proposalReceiptId
|
|
2540
|
+
),
|
|
2541
|
+
activationEvent: uniqueIndex5("company_profile_agent_automatic_activations_event_uq").on(
|
|
2542
|
+
table.accountId,
|
|
2543
|
+
table.activationEventId
|
|
2544
|
+
),
|
|
2545
|
+
turn: index5("company_profile_agent_automatic_activations_turn_idx").on(
|
|
2546
|
+
table.workspaceId,
|
|
2547
|
+
table.sessionId,
|
|
2548
|
+
table.turnId,
|
|
2549
|
+
table.executionGeneration
|
|
2550
|
+
),
|
|
2551
|
+
hash: check3(
|
|
2552
|
+
"company_profile_agent_automatic_activations_input_hash_check",
|
|
2553
|
+
sql5`${table.inputHash} ~ '^[0-9a-f]{64}$'`
|
|
2554
|
+
),
|
|
2555
|
+
generation: check3(
|
|
2556
|
+
"company_profile_agent_automatic_activations_generation_check",
|
|
2557
|
+
sql5`${table.executionGeneration} > 0 and ${table.policyVersion} >= 0`
|
|
2558
|
+
),
|
|
2559
|
+
subject: check3(
|
|
2560
|
+
"company_profile_agent_automatic_activations_subject_check",
|
|
2561
|
+
sql5`octet_length(btrim(${table.initiatingHumanSubjectId})) between 1 and 1024`
|
|
2562
|
+
)
|
|
2563
|
+
})
|
|
2564
|
+
);
|
|
2449
2565
|
|
|
2450
2566
|
// src/workspace-learning-policy-schema.ts
|
|
2451
2567
|
import { sql as sql6 } from "drizzle-orm";
|
|
@@ -2713,7 +2829,7 @@ var slackSharedTaskOrigins = pgTable7(
|
|
|
2713
2829
|
import { sql as sql8 } from "drizzle-orm";
|
|
2714
2830
|
import {
|
|
2715
2831
|
bigint as bigint8,
|
|
2716
|
-
boolean as
|
|
2832
|
+
boolean as boolean4,
|
|
2717
2833
|
check as check6,
|
|
2718
2834
|
index as index8,
|
|
2719
2835
|
integer as integer8,
|
|
@@ -2845,7 +2961,7 @@ var preferenceRegistrySnapshots = pgTable8(
|
|
|
2845
2961
|
initiatingHumanSubjectId: text8("initiating_human_subject_id").notNull(),
|
|
2846
2962
|
descriptors: jsonb8("descriptors").$type().notNull(),
|
|
2847
2963
|
descriptorHash: text8("descriptor_hash").notNull(),
|
|
2848
|
-
truncated:
|
|
2964
|
+
truncated: boolean4("truncated").notNull().default(false),
|
|
2849
2965
|
createdAt: timestamp8("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
2850
2966
|
},
|
|
2851
2967
|
(table) => ({
|
|
@@ -3023,7 +3139,7 @@ var knowledgeMemoryLifecycleEvents = pgTable9(
|
|
|
3023
3139
|
import { sql as sql10 } from "drizzle-orm";
|
|
3024
3140
|
import {
|
|
3025
3141
|
bigint as bigint9,
|
|
3026
|
-
boolean as
|
|
3142
|
+
boolean as boolean5,
|
|
3027
3143
|
index as index10,
|
|
3028
3144
|
integer as integer10,
|
|
3029
3145
|
jsonb as jsonb10,
|
|
@@ -3161,7 +3277,7 @@ var knowledgeSourceAclVersions = pgTable10(
|
|
|
3161
3277
|
generation: bigint9("generation", { mode: "number" }).notNull(),
|
|
3162
3278
|
aclVersion: text10("acl_version"),
|
|
3163
3279
|
aclHash: text10("acl_hash").notNull(),
|
|
3164
|
-
agentAccess:
|
|
3280
|
+
agentAccess: boolean5("agent_access").notNull().default(true),
|
|
3165
3281
|
operationId: text10("operation_id").notNull(),
|
|
3166
3282
|
inputHash: text10("input_hash").notNull(),
|
|
3167
3283
|
...actorColumns(),
|
|
@@ -3935,7 +4051,7 @@ var sessionWorkClaimWriteCapabilities = pgTable12(
|
|
|
3935
4051
|
|
|
3936
4052
|
// src/company-brain-context-selection-schema.ts
|
|
3937
4053
|
import {
|
|
3938
|
-
boolean as
|
|
4054
|
+
boolean as boolean6,
|
|
3939
4055
|
index as index13,
|
|
3940
4056
|
integer as integer13,
|
|
3941
4057
|
jsonb as jsonb11,
|
|
@@ -3958,9 +4074,9 @@ var companyBrainContextSelectionReceipts = pgTable13(
|
|
|
3958
4074
|
createdByExecutionGeneration: integer13("created_by_execution_generation").notNull(),
|
|
3959
4075
|
acceptedAt: timestamp13("accepted_at", { withTimezone: true }).notNull(),
|
|
3960
4076
|
sessionRole: text13("session_role").notNull(),
|
|
3961
|
-
memoryEnabled:
|
|
4077
|
+
memoryEnabled: boolean6("memory_enabled").notNull(),
|
|
3962
4078
|
memoryPromptMode: text13("memory_prompt_mode").notNull(),
|
|
3963
|
-
companyProfileIncluded:
|
|
4079
|
+
companyProfileIncluded: boolean6("company_profile_included").notNull(),
|
|
3964
4080
|
instructionPolicyEntryHash: text13("instruction_policy_entry_hash").notNull(),
|
|
3965
4081
|
preferenceDescriptorHash: text13("preference_descriptor_hash"),
|
|
3966
4082
|
companyProfileSnapshotHash: text13("company_profile_snapshot_hash").notNull(),
|
|
@@ -3994,13 +4110,13 @@ var companyBrainTurnContextSnapshots = pgTable13(
|
|
|
3994
4110
|
rootSessionId: uuid13("root_session_id").notNull(),
|
|
3995
4111
|
turnId: uuid13("turn_id").notNull(),
|
|
3996
4112
|
acceptedAt: timestamp13("accepted_at", { withTimezone: true }).notNull(),
|
|
3997
|
-
memoryEnabled:
|
|
4113
|
+
memoryEnabled: boolean6("memory_enabled").notNull(),
|
|
3998
4114
|
memoryPromptMode: text13("memory_prompt_mode").notNull(),
|
|
3999
4115
|
legacyWorkspaceInstructions: text13("legacy_workspace_instructions"),
|
|
4000
4116
|
legacyWorkspaceInstructionsOriginalUtf8Bytes: integer13(
|
|
4001
4117
|
"legacy_workspace_instructions_original_utf8_bytes"
|
|
4002
4118
|
),
|
|
4003
|
-
legacyWorkspaceInstructionsTruncated:
|
|
4119
|
+
legacyWorkspaceInstructionsTruncated: boolean6(
|
|
4004
4120
|
"legacy_workspace_instructions_truncated"
|
|
4005
4121
|
).notNull(),
|
|
4006
4122
|
snapshotSource: text13("snapshot_source").notNull(),
|
|
@@ -4022,7 +4138,7 @@ var companyBrainTurnContextSnapshots = pgTable13(
|
|
|
4022
4138
|
// src/governed-learning-evaluator-schema.ts
|
|
4023
4139
|
import {
|
|
4024
4140
|
bigint as bigint10,
|
|
4025
|
-
boolean as
|
|
4141
|
+
boolean as boolean7,
|
|
4026
4142
|
index as index14,
|
|
4027
4143
|
integer as integer14,
|
|
4028
4144
|
pgTable as pgTable14,
|
|
@@ -4066,7 +4182,7 @@ var governedLearningDecisionReceipts = pgTable14(
|
|
|
4066
4182
|
conflictCount: integer14("conflict_count").notNull(),
|
|
4067
4183
|
outcome: text14("outcome").notNull(),
|
|
4068
4184
|
reasonCodes: text14("reason_codes").array().$type().notNull(),
|
|
4069
|
-
automaticEligible:
|
|
4185
|
+
automaticEligible: boolean7("automatic_eligible").notNull(),
|
|
4070
4186
|
confidenceFloorBps: integer14("confidence_floor_bps").notNull(),
|
|
4071
4187
|
createdAt: timestamp14("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
4072
4188
|
},
|
|
@@ -4210,7 +4326,7 @@ var governedLearningActivationUndoReceipts = pgTable15(
|
|
|
4210
4326
|
// src/knowledge-source-sync-schema.ts
|
|
4211
4327
|
import {
|
|
4212
4328
|
bigint as bigint12,
|
|
4213
|
-
boolean as
|
|
4329
|
+
boolean as boolean8,
|
|
4214
4330
|
index as index16,
|
|
4215
4331
|
integer as integer15,
|
|
4216
4332
|
jsonb as jsonb12,
|
|
@@ -4250,9 +4366,9 @@ var knowledgeSourceSyncStates = pgTable16(
|
|
|
4250
4366
|
pendingWakeCount: integer15("pending_wake_count").notNull().default(0),
|
|
4251
4367
|
leaseId: uuid16("lease_id"),
|
|
4252
4368
|
leaseUntil: timestamp16("lease_until", { withTimezone: true }),
|
|
4253
|
-
bufferedWake:
|
|
4369
|
+
bufferedWake: boolean8("buffered_wake").notNull().default(false),
|
|
4254
4370
|
bufferedScheduledTaskRunId: uuid16("buffered_scheduled_task_run_id"),
|
|
4255
|
-
reconnectRequired:
|
|
4371
|
+
reconnectRequired: boolean8("reconnect_required").notNull().default(false),
|
|
4256
4372
|
lastSuccessAt: timestamp16("last_success_at", { withTimezone: true }),
|
|
4257
4373
|
lastCompletedAt: timestamp16("last_completed_at", { withTimezone: true }),
|
|
4258
4374
|
lastSummary: jsonb12("last_summary").$type(),
|
|
@@ -4343,7 +4459,7 @@ var knowledgeSourceSyncWakes = pgTable16(
|
|
|
4343
4459
|
producerKey: text16("producer_key").notNull(),
|
|
4344
4460
|
sourceConfigGeneration: bigint12("source_config_generation", { mode: "number" }).notNull(),
|
|
4345
4461
|
sourceLifecycleGeneration: bigint12("source_lifecycle_generation", { mode: "number" }).notNull(),
|
|
4346
|
-
coalesced:
|
|
4462
|
+
coalesced: boolean8("coalesced").notNull().default(false),
|
|
4347
4463
|
claimedAt: timestamp16("claimed_at", { withTimezone: true }),
|
|
4348
4464
|
completedAt: timestamp16("completed_at", { withTimezone: true }),
|
|
4349
4465
|
createdAt: timestamp16("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
@@ -4458,8 +4574,8 @@ var googleDriveObjectAclPrincipals = pgTable16(
|
|
|
4458
4574
|
emailHash: text16("email_hash"),
|
|
4459
4575
|
domainHash: text16("domain_hash"),
|
|
4460
4576
|
role: text16("role").notNull(),
|
|
4461
|
-
inherited:
|
|
4462
|
-
allowFileDiscovery:
|
|
4577
|
+
inherited: boolean8("inherited").notNull().default(false),
|
|
4578
|
+
allowFileDiscovery: boolean8("allow_file_discovery"),
|
|
4463
4579
|
expirationTime: timestamp16("expiration_time", { withTimezone: true }),
|
|
4464
4580
|
createdAt: timestamp16("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
4465
4581
|
},
|
|
@@ -4478,7 +4594,7 @@ var googleDriveObjectAclPrincipals = pgTable16(
|
|
|
4478
4594
|
// src/transcription-recordings-schema.ts
|
|
4479
4595
|
import { sql as sql14 } from "drizzle-orm";
|
|
4480
4596
|
import {
|
|
4481
|
-
boolean as
|
|
4597
|
+
boolean as boolean9,
|
|
4482
4598
|
check as check9,
|
|
4483
4599
|
index as index17,
|
|
4484
4600
|
integer as integer16,
|
|
@@ -4527,7 +4643,7 @@ var transcriptionRecordings = pgTable17(
|
|
|
4527
4643
|
transcriptTextCodecVersion: losslessCodecVersion("transcript_text_codec_version"),
|
|
4528
4644
|
languages: jsonb13("languages").$type().notNull().default([]),
|
|
4529
4645
|
errorCode: text17("error_code"),
|
|
4530
|
-
retryable:
|
|
4646
|
+
retryable: boolean9("retryable").notNull().default(false),
|
|
4531
4647
|
providerId: text17("provider_id"),
|
|
4532
4648
|
processingGeneration: integer16("processing_generation").notNull().default(0),
|
|
4533
4649
|
processingOwner: uuid17("processing_owner"),
|
|
@@ -4676,7 +4792,7 @@ var transcriptionRecordingSegments = pgTable17(
|
|
|
4676
4792
|
languages: jsonb13("languages").$type().notNull().default([]),
|
|
4677
4793
|
providerId: text17("provider_id"),
|
|
4678
4794
|
errorCode: text17("error_code"),
|
|
4679
|
-
retryable:
|
|
4795
|
+
retryable: boolean9("retryable").notNull().default(false),
|
|
4680
4796
|
createdAt: timestamp17("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
4681
4797
|
updatedAt: timestamp17("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
4682
4798
|
},
|
|
@@ -4716,7 +4832,7 @@ var transcriptionRecordingSegments = pgTable17(
|
|
|
4716
4832
|
import { sql as sql15 } from "drizzle-orm";
|
|
4717
4833
|
import {
|
|
4718
4834
|
bigint as bigint13,
|
|
4719
|
-
boolean as
|
|
4835
|
+
boolean as boolean10,
|
|
4720
4836
|
check as check10,
|
|
4721
4837
|
index as index18,
|
|
4722
4838
|
integer as integer17,
|
|
@@ -4831,8 +4947,8 @@ var browserRevisions = pgTable18(
|
|
|
4831
4947
|
expectedHeadGeneration: bigint13("expected_head_generation", {
|
|
4832
4948
|
mode: "number"
|
|
4833
4949
|
}).notNull(),
|
|
4834
|
-
advanceDefaultRequested:
|
|
4835
|
-
defaultAdvanced:
|
|
4950
|
+
advanceDefaultRequested: boolean10("advance_default_requested").notNull(),
|
|
4951
|
+
defaultAdvanced: boolean10("default_advanced").notNull(),
|
|
4836
4952
|
resultHeadGeneration: bigint13("result_head_generation", {
|
|
4837
4953
|
mode: "number"
|
|
4838
4954
|
}).notNull(),
|
|
@@ -5247,7 +5363,7 @@ var browserSessions = pgTable18(
|
|
|
5247
5363
|
enum: ["chromium", "chrome", "firefox", "webkit", "lightpanda", "external"]
|
|
5248
5364
|
}).notNull(),
|
|
5249
5365
|
engineVersion: text18("engine_version"),
|
|
5250
|
-
headless:
|
|
5366
|
+
headless: boolean10("headless").notNull(),
|
|
5251
5367
|
identityId: uuid18("identity_id"),
|
|
5252
5368
|
baseRevisionId: uuid18("base_revision_id"),
|
|
5253
5369
|
linkedComputerSessionId: uuid18("linked_computer_session_id"),
|
|
@@ -6161,7 +6277,7 @@ var interactionOperations = pgTable18(
|
|
|
6161
6277
|
controllerGeneration: text18("controller_generation"),
|
|
6162
6278
|
errorCode: text18("error_code"),
|
|
6163
6279
|
errorMessage: text18("error_message"),
|
|
6164
|
-
errorRetryable:
|
|
6280
|
+
errorRetryable: boolean10("error_retryable"),
|
|
6165
6281
|
errorDetails: jsonb14("error_details").$type(),
|
|
6166
6282
|
actorSubjectId: text18("actor_subject_id").notNull(),
|
|
6167
6283
|
createdAt: timestamp18("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
@@ -6460,7 +6576,7 @@ var workspaceArtifactEvents = pgTable19(
|
|
|
6460
6576
|
var nestedAgentDepthConfiguration = pgTable19(
|
|
6461
6577
|
"nested_agent_depth_configuration",
|
|
6462
6578
|
{
|
|
6463
|
-
singleton:
|
|
6579
|
+
singleton: boolean11("singleton").primaryKey().notNull().default(true),
|
|
6464
6580
|
maxNestedAgentDepth: integer18("max_nested_agent_depth").notNull(),
|
|
6465
6581
|
policySource: text19("policy_source").$type().notNull(),
|
|
6466
6582
|
updatedAt: timestamp19("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
@@ -6677,7 +6793,7 @@ var organizationPrivateSessionSettings = pgTable19(
|
|
|
6677
6793
|
"organization_private_session_settings",
|
|
6678
6794
|
{
|
|
6679
6795
|
accountId: uuid19("account_id").primaryKey().references(() => managedAccounts.id, { onDelete: "cascade" }),
|
|
6680
|
-
enabled:
|
|
6796
|
+
enabled: boolean11("enabled").notNull().default(false),
|
|
6681
6797
|
version: bigint14("version", { mode: "number" }).notNull().default(1),
|
|
6682
6798
|
updatedByMembershipId: uuid19("updated_by_membership_id"),
|
|
6683
6799
|
updatedAt: timestamp19("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
@@ -6700,12 +6816,12 @@ var organizationPrivateSessionSettingEvents = pgTable19(
|
|
|
6700
6816
|
id: uuid19("id").primaryKey(),
|
|
6701
6817
|
accountId: uuid19("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
|
|
6702
6818
|
actorMembershipId: uuid19("actor_membership_id").notNull(),
|
|
6703
|
-
requestedEnabled:
|
|
6819
|
+
requestedEnabled: boolean11("requested_enabled").notNull(),
|
|
6704
6820
|
expectedVersion: bigint14("expected_version", { mode: "number" }).notNull(),
|
|
6705
|
-
resultEnabled:
|
|
6821
|
+
resultEnabled: boolean11("result_enabled").notNull(),
|
|
6706
6822
|
resultVersion: bigint14("result_version", { mode: "number" }).notNull(),
|
|
6707
6823
|
resultUpdatedAt: timestamp19("result_updated_at", { withTimezone: true }).notNull(),
|
|
6708
|
-
changed:
|
|
6824
|
+
changed: boolean11("changed").notNull(),
|
|
6709
6825
|
createdAt: timestamp19("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
6710
6826
|
},
|
|
6711
6827
|
(table) => ({
|
|
@@ -7159,6 +7275,7 @@ var apiKeys = pgTable19(
|
|
|
7159
7275
|
}),
|
|
7160
7276
|
name: text19("name").notNull(),
|
|
7161
7277
|
description: text19("description"),
|
|
7278
|
+
credentialKind: text19("credential_kind").$type().notNull(),
|
|
7162
7279
|
prefix: text19("prefix").notNull(),
|
|
7163
7280
|
keyHash: text19("key_hash").notNull(),
|
|
7164
7281
|
permissions: jsonb15("permissions").$type().notNull().default([]),
|
|
@@ -7176,6 +7293,20 @@ var apiKeys = pgTable19(
|
|
|
7176
7293
|
descriptionValid: check11(
|
|
7177
7294
|
"api_keys_description_check",
|
|
7178
7295
|
sql16`${table.description} is null or length(${table.description}) between 1 and 500`
|
|
7296
|
+
),
|
|
7297
|
+
credentialKindValid: check11(
|
|
7298
|
+
"api_keys_credential_kind_check",
|
|
7299
|
+
sql16`(
|
|
7300
|
+
${table.workspaceId} is not null
|
|
7301
|
+
and ${table.credentialKind} = 'workspace'
|
|
7302
|
+
) or (
|
|
7303
|
+
${table.workspaceId} is null
|
|
7304
|
+
and ${table.credentialKind} = 'organization'
|
|
7305
|
+
) or (
|
|
7306
|
+
${table.workspaceId} is null
|
|
7307
|
+
and ${table.credentialKind} = 'legacy_account'
|
|
7308
|
+
and ${table.revokedAt} is not null
|
|
7309
|
+
)`
|
|
7179
7310
|
)
|
|
7180
7311
|
})
|
|
7181
7312
|
);
|
|
@@ -7279,7 +7410,18 @@ var codexSubscriptionCredentials = pgTable19(
|
|
|
7279
7410
|
{
|
|
7280
7411
|
id: uuid19("id").primaryKey().defaultRandom(),
|
|
7281
7412
|
accountId: uuid19("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
|
|
7282
|
-
workspaceId: uuid19("workspace_id").
|
|
7413
|
+
workspaceId: uuid19("workspace_id").references(() => workspaces.id, { onDelete: "cascade" }),
|
|
7414
|
+
organizationId: uuid19("organization_id").references(() => managedAccounts.id, {
|
|
7415
|
+
onDelete: "cascade"
|
|
7416
|
+
}),
|
|
7417
|
+
authorityScope: text19("authority_scope").notNull().default("workspace"),
|
|
7418
|
+
ownerOrganizationMembershipId: uuid19("owner_organization_membership_id"),
|
|
7419
|
+
organizationUserResourceAuthorityId: uuid19("organization_user_resource_authority_id"),
|
|
7420
|
+
organizationUserResourceKind: text19("organization_user_resource_kind"),
|
|
7421
|
+
organizationUserResourceAuthorityGeneration: bigint14(
|
|
7422
|
+
"organization_user_resource_authority_generation",
|
|
7423
|
+
{ mode: "number" }
|
|
7424
|
+
),
|
|
7283
7425
|
// Format: v1:<base64 iv>:<base64 ciphertext||gcm-tag>. JSON {access_token, refresh_token, id_token}. Never returned by any API.
|
|
7284
7426
|
credentialEncrypted: text19("credential_encrypted").notNull(),
|
|
7285
7427
|
chatgptAccountId: text19("chatgpt_account_id"),
|
|
@@ -7287,7 +7429,7 @@ var codexSubscriptionCredentials = pgTable19(
|
|
|
7287
7429
|
scopes: text19("scopes"),
|
|
7288
7430
|
// space-delimited, as granted
|
|
7289
7431
|
planType: text19("plan_type"),
|
|
7290
|
-
isFedramp:
|
|
7432
|
+
isFedramp: boolean11("is_fedramp").notNull().default(false),
|
|
7291
7433
|
expiresAt: timestamp19("expires_at", { withTimezone: true }),
|
|
7292
7434
|
// derived from access-token JWT exp
|
|
7293
7435
|
lastRefreshAt: timestamp19("last_refresh_at", { withTimezone: true }),
|
|
@@ -7308,17 +7450,21 @@ var codexSubscriptionCredentials = pgTable19(
|
|
|
7308
7450
|
secondaryResetAt: timestamp19("secondary_reset_at", { withTimezone: true }),
|
|
7309
7451
|
usageCheckedAt: timestamp19("usage_checked_at", { withTimezone: true }),
|
|
7310
7452
|
// snapshot freshness → cache TTL clock
|
|
7311
|
-
// P3 rotation cooldown (plaintext metadata; NEVER a token).
|
|
7312
|
-
//
|
|
7313
|
-
//
|
|
7453
|
+
// P3 rotation cooldown (plaintext metadata; NEVER a token). The kind keeps
|
|
7454
|
+
// quota refusals distinct from generic provider backpressure. The independent
|
|
7455
|
+
// revision fences a live usage response against a concurrently newer refusal;
|
|
7456
|
+
// neither field participates in token-refresh OCC.
|
|
7314
7457
|
exhaustedUntil: timestamp19("exhausted_until", { withTimezone: true }),
|
|
7458
|
+
exhaustedKind: text19("exhausted_kind"),
|
|
7459
|
+
// quota | rate_limit | null (legacy/cleared)
|
|
7460
|
+
exhaustedRevision: bigint14("exhausted_revision", { mode: "number" }).notNull().default(0),
|
|
7315
7461
|
// Workspace-local, server-held fairness cursor. Provider usage headers are
|
|
7316
7462
|
// capacity hints, never the sole allocator: live lease count is ranked first
|
|
7317
7463
|
// and this cursor deterministically breaks equal-load/equal-capacity ties.
|
|
7318
7464
|
// This flag controls NEW automatic allocations only. Credential health,
|
|
7319
7465
|
// refresh, encrypted material, and an already-leased in-flight turn are
|
|
7320
7466
|
// intentionally independent. account eligibility policy owns toggle OCC/audit and product UI.
|
|
7321
|
-
allocatorEnabled:
|
|
7467
|
+
allocatorEnabled: boolean11("allocator_enabled").notNull().default(true),
|
|
7322
7468
|
// Independent OCC/audit sequence for the allocator toggle. Token refresh
|
|
7323
7469
|
// continues to own `version`; quota/cache writes own neither counter.
|
|
7324
7470
|
allocatorVersion: integer18("allocator_version").notNull().default(1),
|
|
@@ -7356,7 +7502,58 @@ var codexSubscriptionCredentials = pgTable19(
|
|
|
7356
7502
|
),
|
|
7357
7503
|
workspaceAccountIdentity: uniqueIndex19(
|
|
7358
7504
|
"codex_subscription_credentials_workspace_account_id_idx"
|
|
7359
|
-
).on(table.workspaceId, table.accountId, table.id)
|
|
7505
|
+
).on(table.workspaceId, table.accountId, table.id),
|
|
7506
|
+
accountIdentity: uniqueIndex19("codex_subscription_credentials_account_id_idx").on(
|
|
7507
|
+
table.accountId,
|
|
7508
|
+
table.id
|
|
7509
|
+
),
|
|
7510
|
+
organizationAccount: uniqueIndex19("codex_subscription_credentials_organization_account_idx").on(table.organizationId, table.chatgptAccountId).where(
|
|
7511
|
+
sql16`${table.authorityScope} = 'organization' and ${table.chatgptAccountId} is not null`
|
|
7512
|
+
),
|
|
7513
|
+
organizationLookup: index19("codex_subscription_credentials_organization_lookup_idx").on(table.organizationId, table.createdAt, table.id).where(sql16`${table.authorityScope} = 'organization'`)
|
|
7514
|
+
})
|
|
7515
|
+
);
|
|
7516
|
+
var workspaceCodexSubscriptionPreferences = pgTable19(
|
|
7517
|
+
"workspace_codex_subscription_preferences",
|
|
7518
|
+
{
|
|
7519
|
+
workspaceId: uuid19("workspace_id").primaryKey().references(() => workspaces.id, { onDelete: "cascade" }),
|
|
7520
|
+
accountId: uuid19("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
|
|
7521
|
+
mode: text19("mode").notNull().default("automatic"),
|
|
7522
|
+
updatedBySubjectId: text19("updated_by_subject_id"),
|
|
7523
|
+
createdAt: timestamp19("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
7524
|
+
updatedAt: timestamp19("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
7525
|
+
},
|
|
7526
|
+
(table) => ({
|
|
7527
|
+
workspaceAccount: foreignKey({
|
|
7528
|
+
name: "workspace_codex_subscription_preferences_workspace_account_fk",
|
|
7529
|
+
columns: [table.workspaceId, table.accountId],
|
|
7530
|
+
foreignColumns: [workspaces.id, workspaces.accountId]
|
|
7531
|
+
}).onDelete("cascade"),
|
|
7532
|
+
modeValid: check11(
|
|
7533
|
+
"workspace_codex_subscription_preferences_mode_chk",
|
|
7534
|
+
sql16`${table.mode} in ('automatic', 'workspace', 'organization', 'disabled')`
|
|
7535
|
+
)
|
|
7536
|
+
})
|
|
7537
|
+
);
|
|
7538
|
+
var organizationCodexRotationSettings = pgTable19(
|
|
7539
|
+
"organization_codex_rotation_settings",
|
|
7540
|
+
{
|
|
7541
|
+
id: uuid19("id").primaryKey().defaultRandom(),
|
|
7542
|
+
accountId: uuid19("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
|
|
7543
|
+
activeCredentialId: uuid19("active_credential_id"),
|
|
7544
|
+
rotationEnabled: boolean11("rotation_enabled").notNull().default(false),
|
|
7545
|
+
leaseRotationEnabled: boolean11("lease_rotation_enabled").notNull().default(false),
|
|
7546
|
+
rotationStrategy: text19("rotation_strategy").notNull().default("sharded"),
|
|
7547
|
+
createdAt: timestamp19("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
7548
|
+
updatedAt: timestamp19("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
7549
|
+
},
|
|
7550
|
+
(table) => ({
|
|
7551
|
+
account: uniqueIndex19("organization_codex_rotation_settings_account_idx").on(table.accountId),
|
|
7552
|
+
activeCredential: foreignKey({
|
|
7553
|
+
name: "organization_codex_rotation_settings_active_fk",
|
|
7554
|
+
columns: [table.activeCredentialId],
|
|
7555
|
+
foreignColumns: [codexSubscriptionCredentials.id]
|
|
7556
|
+
}).onDelete("set null")
|
|
7360
7557
|
})
|
|
7361
7558
|
);
|
|
7362
7559
|
var codexAppsSettings = pgTable19(
|
|
@@ -7619,9 +7816,9 @@ var personalGitHubRepositorySelections = pgTable19(
|
|
|
7619
7816
|
canonicalHttpsUri: text19("canonical_https_uri").notNull(),
|
|
7620
7817
|
defaultBranch: text19("default_branch").notNull(),
|
|
7621
7818
|
visibility: text19("visibility").notNull(),
|
|
7622
|
-
private:
|
|
7623
|
-
archived:
|
|
7624
|
-
disabled:
|
|
7819
|
+
private: boolean11("private").notNull(),
|
|
7820
|
+
archived: boolean11("archived").notNull(),
|
|
7821
|
+
disabled: boolean11("disabled").notNull(),
|
|
7625
7822
|
permissions: jsonb15("permissions").$type().notNull(),
|
|
7626
7823
|
selectedAccess: text19("selected_access").notNull(),
|
|
7627
7824
|
selectionGeneration: bigint14("selection_generation", {
|
|
@@ -7915,7 +8112,7 @@ var slackRoutePrompts = pgTable19(
|
|
|
7915
8112
|
providerEventId: text19("provider_event_id").notNull(),
|
|
7916
8113
|
triggerKind: text19("trigger_kind").$type().notNull(),
|
|
7917
8114
|
requestText: text19("request_text").notNull(),
|
|
7918
|
-
hasFiles:
|
|
8115
|
+
hasFiles: boolean11("has_files").notNull().default(false),
|
|
7919
8116
|
slackThreadTs: text19("slack_thread_ts"),
|
|
7920
8117
|
messageOperationId: uuid19("message_operation_id").notNull(),
|
|
7921
8118
|
status: text19("status").$type().notNull().default("pending"),
|
|
@@ -8312,7 +8509,7 @@ var slackInteractionInbox = pgTable19(
|
|
|
8312
8509
|
slackThreadTs: text19("slack_thread_ts"),
|
|
8313
8510
|
triggerKind: text19("trigger_kind").$type().notNull(),
|
|
8314
8511
|
text: text19("text").notNull(),
|
|
8315
|
-
hasFiles:
|
|
8512
|
+
hasFiles: boolean11("has_files").notNull().default(false),
|
|
8316
8513
|
status: text19("status").$type().notNull().default("pending"),
|
|
8317
8514
|
claimHolderId: uuid19("claim_holder_id"),
|
|
8318
8515
|
claimExpiresAt: timestamp19("claim_expires_at", { withTimezone: true }),
|
|
@@ -8441,7 +8638,7 @@ var slackInteractions = pgTable19(
|
|
|
8441
8638
|
ackSlackMessageTs: text19("ack_slack_message_ts"),
|
|
8442
8639
|
// Frozen once: whether this interaction's acknowledgement renders the
|
|
8443
8640
|
// one-time onboarding hint. NULL means the decision has not been resolved.
|
|
8444
|
-
firstTaskHint:
|
|
8641
|
+
firstTaskHint: boolean11("first_task_hint"),
|
|
8445
8642
|
// The routed workspace's display name, frozen when the interaction binds.
|
|
8446
8643
|
// A live lookup at post time would be wrong: a workspace rename between the
|
|
8447
8644
|
// original post and a reconciliation makes `reconcilePostMessage`'s
|
|
@@ -8679,7 +8876,7 @@ var memorySlackPublicationConfigurations = pgTable19(
|
|
|
8679
8876
|
accountId: uuid19("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
|
|
8680
8877
|
workspaceId: uuid19("workspace_id").notNull().references(() => workspaces.id, { onDelete: "cascade" }),
|
|
8681
8878
|
revision: integer18("revision").notNull(),
|
|
8682
|
-
enabled:
|
|
8879
|
+
enabled: boolean11("enabled").notNull(),
|
|
8683
8880
|
connectionId: uuid19("connection_id"),
|
|
8684
8881
|
slackTeamId: text19("slack_team_id"),
|
|
8685
8882
|
slackChannelId: text19("slack_channel_id"),
|
|
@@ -9033,11 +9230,11 @@ var codexRotationSettings = pgTable19(
|
|
|
9033
9230
|
// Legacy selector bit. Keep false as the DB default forever: an old worker
|
|
9034
9231
|
// only understands this column, so a schema-first rollout or binary
|
|
9035
9232
|
// rollback must never make it enter the non-atomic rotation path.
|
|
9036
|
-
rotationEnabled:
|
|
9233
|
+
rotationEnabled: boolean11("rotation_enabled").notNull().default(false),
|
|
9037
9234
|
// Revision-aware allocator cutover. Only migration-compatible API/worker
|
|
9038
9235
|
// code reads this bit; old binaries safely ignore it and keep the legacy
|
|
9039
9236
|
// pin/rotation policy.
|
|
9040
|
-
leaseRotationEnabled:
|
|
9237
|
+
leaseRotationEnabled: boolean11("lease_rotation_enabled").notNull().default(false),
|
|
9041
9238
|
rotationStrategy: text19("rotation_strategy").notNull().default("sharded"),
|
|
9042
9239
|
// sharded-rotation policy: legacy residue; behavior is always sharded
|
|
9043
9240
|
createdAt: timestamp19("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
@@ -9108,7 +9305,7 @@ var xaiSubscriptionCredentials = pgTable19(
|
|
|
9108
9305
|
lastRefreshAt: timestamp19("last_refresh_at", { withTimezone: true }),
|
|
9109
9306
|
lastError: text19("last_error"),
|
|
9110
9307
|
version: integer18("version").notNull().default(1),
|
|
9111
|
-
allocatorEnabled:
|
|
9308
|
+
allocatorEnabled: boolean11("allocator_enabled").notNull().default(true),
|
|
9112
9309
|
allocatorVersion: integer18("allocator_version").notNull().default(1),
|
|
9113
9310
|
allocatorUpdatedAt: timestamp19("allocator_updated_at", {
|
|
9114
9311
|
withTimezone: true
|
|
@@ -9195,7 +9392,7 @@ var xaiRotationSettings = pgTable19(
|
|
|
9195
9392
|
authorityScope: text19("authority_scope").notNull().default("workspace"),
|
|
9196
9393
|
ownerOrganizationMembershipId: uuid19("owner_organization_membership_id"),
|
|
9197
9394
|
activeCredentialId: uuid19("active_credential_id"),
|
|
9198
|
-
rotationEnabled:
|
|
9395
|
+
rotationEnabled: boolean11("rotation_enabled").notNull().default(true),
|
|
9199
9396
|
fairnessCursor: bigint14("fairness_cursor", { mode: "number" }).notNull().default(0),
|
|
9200
9397
|
version: integer18("version").notNull().default(1),
|
|
9201
9398
|
createdAt: timestamp19("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
@@ -9261,7 +9458,7 @@ var channels = pgTable19(
|
|
|
9261
9458
|
workspaceId: uuid19("workspace_id").notNull().references(() => workspaces.id, { onDelete: "cascade" }),
|
|
9262
9459
|
name: text19("name").notNull(),
|
|
9263
9460
|
description: text19("description"),
|
|
9264
|
-
pinned:
|
|
9461
|
+
pinned: boolean11("pinned").notNull().default(false),
|
|
9265
9462
|
// Explicit user order within the pinned and unpinned project groups.
|
|
9266
9463
|
sortOrder: integer18("sort_order").notNull().default(0),
|
|
9267
9464
|
// Attribution string: 'user:<subject>' | 'session:<id>' | 'system'.
|
|
@@ -9448,7 +9645,7 @@ var sessions = pgTable19(
|
|
|
9448
9645
|
// it true; the worker honors it BEFORE the next turn's model call by forcing
|
|
9449
9646
|
// a compaction, then clears it. A durable flag (not a transient signal) so
|
|
9450
9647
|
// the trigger survives a worker restart and converges before the next turn.
|
|
9451
|
-
compactRequested:
|
|
9648
|
+
compactRequested: boolean11("compact_requested").notNull().default(false),
|
|
9452
9649
|
queueVersion: integer18("queue_version").notNull().default(0),
|
|
9453
9650
|
queueHeadPosition: bigint14("queue_head_position", { mode: "number" }).notNull().default(0),
|
|
9454
9651
|
queueTailPosition: bigint14("queue_tail_position", { mode: "number" }).notNull().default(0),
|
|
@@ -10120,16 +10317,16 @@ var sessionPins = pgTable19(
|
|
|
10120
10317
|
// deleting it. That preserves a monotonic version and prevents an ABA race:
|
|
10121
10318
|
// a stale client that saw pin version 1 cannot silently overwrite a later
|
|
10122
10319
|
// unpin+re-pin that would otherwise recreate version 1.
|
|
10123
|
-
pinned:
|
|
10320
|
+
pinned: boolean11("pinned").notNull().default(true),
|
|
10124
10321
|
pinnedAt: timestamp19("pinned_at", { withTimezone: true }).defaultNow(),
|
|
10125
10322
|
version: integer18("version").notNull().default(1),
|
|
10126
10323
|
// A session is unread for this subject whenever its durable event sequence
|
|
10127
10324
|
// has advanced beyond this explicit acknowledgment fence. Merely opening a
|
|
10128
10325
|
// route never changes the fence.
|
|
10129
10326
|
acknowledgedSequence: integer18("acknowledged_sequence").notNull().default(0),
|
|
10130
|
-
activelyWorking:
|
|
10327
|
+
activelyWorking: boolean11("actively_working").notNull().default(false),
|
|
10131
10328
|
attentionVersion: integer18("attention_version").notNull().default(0),
|
|
10132
|
-
archived:
|
|
10329
|
+
archived: boolean11("archived").notNull().default(false),
|
|
10133
10330
|
archivedAt: timestamp19("archived_at", { withTimezone: true }),
|
|
10134
10331
|
archiveVersion: integer18("archive_version").notNull().default(0)
|
|
10135
10332
|
},
|
|
@@ -10246,7 +10443,7 @@ var sessionMcpServers = pgTable19(
|
|
|
10246
10443
|
url: text19("url").notNull(),
|
|
10247
10444
|
allowedTools: jsonb15("allowed_tools").$type(),
|
|
10248
10445
|
timeoutMs: integer18("timeout_ms"),
|
|
10249
|
-
cacheToolsList:
|
|
10446
|
+
cacheToolsList: boolean11("cache_tools_list").notNull().default(false),
|
|
10250
10447
|
// Human-approval policy: `true` = every tool requires approval, a string[] of
|
|
10251
10448
|
// UNPREFIXED tool names = only those require it, null/absent = auto-run.
|
|
10252
10449
|
requireApproval: jsonb15("require_approval").$type(),
|
|
@@ -10757,7 +10954,7 @@ var generatedVideoArtifacts = pgTable19(
|
|
|
10757
10954
|
fpsMilli: integer18("fps_milli").notNull(),
|
|
10758
10955
|
videoCodec: text19("video_codec").notNull(),
|
|
10759
10956
|
audioCodec: text19("audio_codec"),
|
|
10760
|
-
hasAudio:
|
|
10957
|
+
hasAudio: boolean11("has_audio").notNull(),
|
|
10761
10958
|
sandboxFilename: text19("sandbox_filename").notNull(),
|
|
10762
10959
|
deletedAt: timestamp19("deleted_at", { withTimezone: true }),
|
|
10763
10960
|
readyAt: timestamp19("ready_at", { withTimezone: true }).notNull().defaultNow(),
|
|
@@ -10983,7 +11180,7 @@ var documents = pgTable19(
|
|
|
10983
11180
|
// document from agent retrieval surfaces (docs MCP) while humans keep REST.
|
|
10984
11181
|
visibility: text19("visibility").notNull().default("workspace"),
|
|
10985
11182
|
createdBy: text19("created_by"),
|
|
10986
|
-
agentAccess:
|
|
11183
|
+
agentAccess: boolean11("agent_access").notNull().default(true),
|
|
10987
11184
|
// Auto-curation output (knowledge drops).
|
|
10988
11185
|
summary: text19("summary"),
|
|
10989
11186
|
topics: jsonb15("topics").$type().notNull().default([]),
|
|
@@ -11160,7 +11357,7 @@ var knowledgeMemories = pgTable19(
|
|
|
11160
11357
|
// (embedder unavailable) persist keyword-searchable rows without a vector.
|
|
11161
11358
|
embedding: vector("embedding"),
|
|
11162
11359
|
embeddingModel: text19("embedding_model"),
|
|
11163
|
-
pinned:
|
|
11360
|
+
pinned: boolean11("pinned").notNull().default(false),
|
|
11164
11361
|
usageCount: integer18("usage_count").notNull().default(0),
|
|
11165
11362
|
lastUsedAt: timestamp19("last_used_at", { withTimezone: true }),
|
|
11166
11363
|
// Self-referential supersession chain. FKs live in migration 0045 (ON DELETE SET
|
|
@@ -11261,7 +11458,7 @@ var sessionTurns = pgTable19(
|
|
|
11261
11458
|
tools: jsonb15("tools").$type().notNull().default([]),
|
|
11262
11459
|
// false = inherit the durable session policy; true = this turn explicitly
|
|
11263
11460
|
// replaces it with `tools` after the core subset fence.
|
|
11264
|
-
toolsProvided:
|
|
11461
|
+
toolsProvided: boolean11("tools_provided").notNull().default(false),
|
|
11265
11462
|
model: text19("model").notNull(),
|
|
11266
11463
|
reasoningEffort: text19("reasoning_effort").notNull(),
|
|
11267
11464
|
// Peer of model + reasoning_effort for Fast/priority inheritance.
|
|
@@ -11362,7 +11559,7 @@ var turnPersonalResourceAttachmentReceipts = pgTable19(
|
|
|
11362
11559
|
sessionAuthorityEpoch: integer18("session_authority_epoch").notNull(),
|
|
11363
11560
|
grantMode: text19("grant_mode").notNull(),
|
|
11364
11561
|
sharedOutputWarningVersion: integer18("shared_output_warning_version").notNull(),
|
|
11365
|
-
sharedOutputAcknowledged:
|
|
11562
|
+
sharedOutputAcknowledged: boolean11("shared_output_acknowledged").notNull(),
|
|
11366
11563
|
requestDigest: bytea2("request_digest").notNull(),
|
|
11367
11564
|
resourceCount: integer18("resource_count").notNull(),
|
|
11368
11565
|
createdAt: timestamp19("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
@@ -12257,7 +12454,7 @@ var workspaceControlEvents = pgTable19(
|
|
|
12257
12454
|
scope: text19("scope").notNull(),
|
|
12258
12455
|
rootSessionId: uuid19("root_session_id"),
|
|
12259
12456
|
action: text19("action").notNull(),
|
|
12260
|
-
automatic:
|
|
12457
|
+
automatic: boolean11("automatic").notNull().default(false),
|
|
12261
12458
|
reason: text19("reason"),
|
|
12262
12459
|
reasonOriginalBytes: integer18("reason_original_bytes"),
|
|
12263
12460
|
actor: text19("actor").notNull(),
|
|
@@ -12359,7 +12556,7 @@ var composerDrafts = pgTable19(
|
|
|
12359
12556
|
annotations: jsonb15("annotations").$type().notNull().default([]),
|
|
12360
12557
|
resources: jsonb15("resources").$type().notNull().default([]),
|
|
12361
12558
|
tools: jsonb15("tools").$type().notNull().default([]),
|
|
12362
|
-
toolsProvided:
|
|
12559
|
+
toolsProvided: boolean11("tools_provided").notNull().default(false),
|
|
12363
12560
|
model: text19("model").notNull(),
|
|
12364
12561
|
reasoningEffort: text19("reasoning_effort").notNull(),
|
|
12365
12562
|
latencyMode: text19("latency_mode").notNull().default("standard"),
|
|
@@ -12929,6 +13126,36 @@ var xaiCapacityWaiters = pgTable19(
|
|
|
12929
13126
|
)
|
|
12930
13127
|
})
|
|
12931
13128
|
);
|
|
13129
|
+
var sessionEventCursors = pgTable19(
|
|
13130
|
+
"session_event_cursors",
|
|
13131
|
+
{
|
|
13132
|
+
sessionId: uuid19("session_id").primaryKey().references(() => sessions.id, { onDelete: "cascade" }),
|
|
13133
|
+
accountId: uuid19("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
|
|
13134
|
+
workspaceId: uuid19("workspace_id").notNull().references(() => workspaces.id, { onDelete: "cascade" }),
|
|
13135
|
+
lastSequence: integer18("last_sequence").notNull().default(0),
|
|
13136
|
+
revision: bigint14("revision", { mode: "number" }).notNull().default(0),
|
|
13137
|
+
createdAt: timestamp19("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
13138
|
+
updatedAt: timestamp19("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
13139
|
+
},
|
|
13140
|
+
(table) => ({
|
|
13141
|
+
workspaceAccount: foreignKey({
|
|
13142
|
+
name: "session_event_cursors_workspace_account_fk",
|
|
13143
|
+
columns: [table.workspaceId, table.accountId],
|
|
13144
|
+
foreignColumns: [workspaces.id, workspaces.accountId]
|
|
13145
|
+
}).onDelete("cascade"),
|
|
13146
|
+
workspaceSession: foreignKey({
|
|
13147
|
+
name: "session_event_cursors_workspace_session_fk",
|
|
13148
|
+
columns: [table.workspaceId, table.sessionId],
|
|
13149
|
+
foreignColumns: [sessions.workspaceId, sessions.id]
|
|
13150
|
+
}).onDelete("cascade"),
|
|
13151
|
+
workspaceIdentity: uniqueIndex19("session_event_cursors_workspace_session_idx").on(
|
|
13152
|
+
table.workspaceId,
|
|
13153
|
+
table.sessionId
|
|
13154
|
+
),
|
|
13155
|
+
sequenceValid: check11("session_event_cursors_sequence_check", sql16`${table.lastSequence} >= 0`),
|
|
13156
|
+
revisionValid: check11("session_event_cursors_revision_check", sql16`${table.revision} >= 0`)
|
|
13157
|
+
})
|
|
13158
|
+
);
|
|
12932
13159
|
var sessionEvents = pgTable19(
|
|
12933
13160
|
"session_events",
|
|
12934
13161
|
{
|
|
@@ -13074,7 +13301,7 @@ var sessionHumanInputRequests = pgTable19(
|
|
|
13074
13301
|
toolCallId: text19("tool_call_id").notNull(),
|
|
13075
13302
|
status: text19("status").notNull().default("pending"),
|
|
13076
13303
|
questions: jsonb15("questions").$type().notNull(),
|
|
13077
|
-
allowSkip:
|
|
13304
|
+
allowSkip: boolean11("allow_skip").notNull().default(false),
|
|
13078
13305
|
response: jsonb15("response").$type(),
|
|
13079
13306
|
respondedBy: text19("responded_by"),
|
|
13080
13307
|
respondedAt: timestamp19("responded_at", { withTimezone: true }),
|
|
@@ -13158,7 +13385,7 @@ var sessionHistoryItems = pgTable19(
|
|
|
13158
13385
|
// false — never deletes, so the full transcript stays as an audit trail) and
|
|
13159
13386
|
// inserts ONE synthetic active summary row at the boundary. Defaults true so
|
|
13160
13387
|
// every existing and normally-appended row is live.
|
|
13161
|
-
active:
|
|
13388
|
+
active: boolean11("active").notNull().default(true),
|
|
13162
13389
|
// An exact provider 400 can prove that the request's active opaque artifact
|
|
13163
13390
|
// set is no longer usable. Keep each canonical item immutable, but record the
|
|
13164
13391
|
// attempt-fenced rejection on the exact candidate row IDs so later model
|
|
@@ -13432,12 +13659,12 @@ var sandboxLeases = pgTable19(
|
|
|
13432
13659
|
// archiveCaptureProviderRequestId resumes the same physical capture. This is
|
|
13433
13660
|
// deliberately explicit rather than inferred from backend/id equality so a
|
|
13434
13661
|
// rolling old worker can never be mistaken for an idempotent caller.
|
|
13435
|
-
archiveCaptureProviderReplaySafe:
|
|
13662
|
+
archiveCaptureProviderReplaySafe: boolean11("archive_capture_provider_replay_safe").notNull().default(false),
|
|
13436
13663
|
// Provider-neutral takeover proof. True means the registered adapter has
|
|
13437
13664
|
// proven either same-request idempotency or an independently repeatable,
|
|
13438
13665
|
// read-only capture. It is distinct from providerReplaySafe so portable tar
|
|
13439
13666
|
// can recover immediately without pretending it resumes one provider RPC.
|
|
13440
|
-
archiveCaptureTakeoverSafe:
|
|
13667
|
+
archiveCaptureTakeoverSafe: boolean11("archive_capture_takeover_safe").notNull().default(false),
|
|
13441
13668
|
archiveCaptureAttempt: integer18("archive_capture_attempt"),
|
|
13442
13669
|
archiveCaptureGeneration: integer18("archive_capture_generation"),
|
|
13443
13670
|
archiveCaptureStartedAt: timestamp19("archive_capture_started_at", {
|
|
@@ -13483,6 +13710,28 @@ var sandboxLeases = pgTable19(
|
|
|
13483
13710
|
// these remain bare UUIDs here rather than generating a stricter wrong FK.
|
|
13484
13711
|
currentCheckpointArtifactId: uuid19("current_checkpoint_artifact_id"),
|
|
13485
13712
|
previousCheckpointArtifactId: uuid19("previous_checkpoint_artifact_id"),
|
|
13713
|
+
// Durable single-flight for immutable machine setup (currently exact rig
|
|
13714
|
+
// setup only). Per-turn credentials, repositories, files, and cloud login
|
|
13715
|
+
// deliberately remain outside this lease-scoped receipt.
|
|
13716
|
+
sharedPreparationLeaseEpoch: integer18("shared_preparation_lease_epoch"),
|
|
13717
|
+
sharedPreparationInstanceId: text19("shared_preparation_instance_id"),
|
|
13718
|
+
sharedPreparationSpecHash: text19("shared_preparation_spec_hash"),
|
|
13719
|
+
sharedPreparationStatus: text19("shared_preparation_status", {
|
|
13720
|
+
enum: ["running", "completed", "failed"]
|
|
13721
|
+
}),
|
|
13722
|
+
sharedPreparationClaimId: uuid19("shared_preparation_claim_id"),
|
|
13723
|
+
sharedPreparationOwnerAttemptId: uuid19("shared_preparation_owner_attempt_id"),
|
|
13724
|
+
sharedPreparationAttempt: integer18("shared_preparation_attempt"),
|
|
13725
|
+
sharedPreparationRevision: integer18("shared_preparation_revision").notNull().default(0),
|
|
13726
|
+
sharedPreparationStartedAt: timestamp19("shared_preparation_started_at", {
|
|
13727
|
+
withTimezone: true
|
|
13728
|
+
}),
|
|
13729
|
+
sharedPreparationDeadlineAt: timestamp19("shared_preparation_deadline_at", {
|
|
13730
|
+
withTimezone: true
|
|
13731
|
+
}),
|
|
13732
|
+
sharedPreparationSettledAt: timestamp19("shared_preparation_settled_at", {
|
|
13733
|
+
withTimezone: true
|
|
13734
|
+
}),
|
|
13486
13735
|
expiresAt: timestamp19("expires_at", { withTimezone: true }).notNull(),
|
|
13487
13736
|
createdAt: timestamp19("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
13488
13737
|
updatedAt: timestamp19("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
@@ -14451,10 +14700,10 @@ var enrollments = pgTable19(
|
|
|
14451
14700
|
// The agent's ed25519 public key (the machine identity).
|
|
14452
14701
|
pubkey: text19("pubkey").notNull(),
|
|
14453
14702
|
exposure: text19("exposure", { enum: enrollmentExposureValues }).notNull().default("whole-machine"),
|
|
14454
|
-
hasDisplay:
|
|
14703
|
+
hasDisplay: boolean11("has_display").notNull().default(false),
|
|
14455
14704
|
// Refreshed from every connect Hello (Capabilities.op_stream); false for
|
|
14456
14705
|
// agents predating the op-stream engine.
|
|
14457
|
-
opStream:
|
|
14706
|
+
opStream: boolean11("op_stream").notNull().default(false),
|
|
14458
14707
|
// When the machine has a display it CANNOT capture (macOS Screen Recording / TCC
|
|
14459
14708
|
// not granted), the agent reports has_display=false AND a human, actionable reason
|
|
14460
14709
|
// here (e.g. "grant Screen Recording in System Settings"). NULL means capture is
|
|
@@ -14463,7 +14712,7 @@ var enrollments = pgTable19(
|
|
|
14463
14712
|
// so the Machines dashboard / VM picker can surface the specific hint. Refreshed
|
|
14464
14713
|
// from every connect Hello alongside has_display.
|
|
14465
14714
|
desktopUnavailableReason: text19("desktop_unavailable_reason"),
|
|
14466
|
-
allowScreenControl:
|
|
14715
|
+
allowScreenControl: boolean11("allow_screen_control").notNull().default(false),
|
|
14467
14716
|
// Optional per-connection command policy. NULL is the unrestricted default.
|
|
14468
14717
|
// Values remain within JavaScript's exact-integer wire range; local runner and
|
|
14469
14718
|
// ancestor host policy may only tighten them at execution.
|
|
@@ -14532,8 +14781,8 @@ var enrollments = pgTable19(
|
|
|
14532
14781
|
agentUpdateTargetVersion: text19("agent_update_target_version"),
|
|
14533
14782
|
agentUpdateExpectedBinarySha256: text19("agent_update_expected_binary_sha256"),
|
|
14534
14783
|
agentUpdateErrorCode: text19("agent_update_error_code"),
|
|
14535
|
-
agentUpdateRetryable:
|
|
14536
|
-
agentUpdateRolledBack:
|
|
14784
|
+
agentUpdateRetryable: boolean11("agent_update_retryable").notNull().default(false),
|
|
14785
|
+
agentUpdateRolledBack: boolean11("agent_update_rolled_back").notNull().default(false),
|
|
14537
14786
|
agentUpdateConnectionInstanceId: text19("agent_update_connection_instance_id"),
|
|
14538
14787
|
agentUpdateConnectionGeneration: integer18("agent_update_connection_generation"),
|
|
14539
14788
|
agentUpdateRequestedAt: timestamp19("agent_update_requested_at", {
|
|
@@ -14736,17 +14985,17 @@ var deviceEnrollmentRequests = pgTable19(
|
|
|
14736
14985
|
// The agent CAN offer a display (a real screen / Xvfb is available) — gates
|
|
14737
14986
|
// whether screen-control consent is even meaningful. has_display on the
|
|
14738
14987
|
// resulting enrollment is derived from this.
|
|
14739
|
-
canOfferDisplay:
|
|
14988
|
+
canOfferDisplay: boolean11("can_offer_display").notNull().default(false),
|
|
14740
14989
|
// The agent REQUESTS screen control (computer-use). The user's allow_screen_control
|
|
14741
14990
|
// at approve is the AUTHORITATIVE consent; this is only the agent's request.
|
|
14742
|
-
requestsScreenControl:
|
|
14991
|
+
requestsScreenControl: boolean11("requests_screen_control").notNull().default(false),
|
|
14743
14992
|
status: text19("status", { enum: deviceEnrollmentStatusValues }).notNull().default("pending"),
|
|
14744
14993
|
// ── LOUD CONSENT capture (who/when/what), stamped at approve ──────────────
|
|
14745
14994
|
approvedBySubjectId: text19("approved_by_subject_id"),
|
|
14746
14995
|
approvedBySubjectLabel: text19("approved_by_subject_label"),
|
|
14747
14996
|
// The user's screen-control consent decision (whole-machine is mandatory at
|
|
14748
14997
|
// approve; screen-control is opt-in per this flag).
|
|
14749
|
-
allowScreenControl:
|
|
14998
|
+
allowScreenControl: boolean11("allow_screen_control").notNull().default(false),
|
|
14750
14999
|
approvedAt: timestamp19("approved_at", { withTimezone: true }),
|
|
14751
15000
|
// The enrollment + sandbox the approve produced (acceptance #2: an enrollment
|
|
14752
15001
|
// row AND a sandbox row appear). Null until approved.
|
|
@@ -15541,8 +15790,8 @@ var hostExportConfig = pgTable19(
|
|
|
15541
15790
|
"host_export_config",
|
|
15542
15791
|
{
|
|
15543
15792
|
id: integer18("id").primaryKey().default(1),
|
|
15544
|
-
sessionEventsEnabled:
|
|
15545
|
-
usageEventsEnabled:
|
|
15793
|
+
sessionEventsEnabled: boolean11("session_events_enabled").notNull().default(false),
|
|
15794
|
+
usageEventsEnabled: boolean11("usage_events_enabled").notNull().default(false),
|
|
15546
15795
|
updatedAt: timestamp19("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
15547
15796
|
},
|
|
15548
15797
|
(table) => ({
|
|
@@ -15634,7 +15883,7 @@ var hostExportConsumers = pgTable19(
|
|
|
15634
15883
|
consumerId: text19("consumer_id").notNull(),
|
|
15635
15884
|
exportKind: text19("export_kind").notNull(),
|
|
15636
15885
|
checkpoint: bigint14("checkpoint", { mode: "bigint" }).notNull().default(0n),
|
|
15637
|
-
enabled:
|
|
15886
|
+
enabled: boolean11("enabled").notNull().default(true),
|
|
15638
15887
|
leaseToken: uuid19("lease_token"),
|
|
15639
15888
|
leaseHolderId: text19("lease_holder_id"),
|
|
15640
15889
|
leaseExpiresAt: timestamp19("lease_expires_at", { withTimezone: true }),
|
|
@@ -16257,7 +16506,7 @@ var capabilityCatalogItems = pgTable19(
|
|
|
16257
16506
|
importBatchId: uuid19("import_batch_id").references(() => importBatches.id, {
|
|
16258
16507
|
onDelete: "set null"
|
|
16259
16508
|
}),
|
|
16260
|
-
stale:
|
|
16509
|
+
stale: boolean11("stale").notNull().default(false),
|
|
16261
16510
|
staleAt: timestamp19("stale_at", { withTimezone: true }),
|
|
16262
16511
|
metadata: jsonb15("metadata").$type().notNull().default({}),
|
|
16263
16512
|
createdAt: timestamp19("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
@@ -16381,7 +16630,7 @@ var capabilityFacets = pgTable19(
|
|
|
16381
16630
|
facetKey: text19("facet_key").notNull(),
|
|
16382
16631
|
kind: text19("kind").notNull(),
|
|
16383
16632
|
activationMode: text19("activation_mode").notNull(),
|
|
16384
|
-
required:
|
|
16633
|
+
required: boolean11("required").notNull().default(true),
|
|
16385
16634
|
createdAt: timestamp19("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
16386
16635
|
},
|
|
16387
16636
|
(table) => ({
|
|
@@ -16537,7 +16786,7 @@ var capabilityComponentOwners = pgTable19(
|
|
|
16537
16786
|
}),
|
|
16538
16787
|
ownerKind: text19("owner_kind").notNull(),
|
|
16539
16788
|
ownerId: text19("owner_id").notNull(),
|
|
16540
|
-
removable:
|
|
16789
|
+
removable: boolean11("removable").notNull().default(true),
|
|
16541
16790
|
createdAt: timestamp19("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
16542
16791
|
},
|
|
16543
16792
|
(table) => ({
|
|
@@ -16588,7 +16837,7 @@ var integrationTools = pgTable19(
|
|
|
16588
16837
|
inputSchema: jsonb15("input_schema").$type().notNull().default({}),
|
|
16589
16838
|
outputSchema: jsonb15("output_schema").$type(),
|
|
16590
16839
|
effect: text19("effect").notNull().default("read"),
|
|
16591
|
-
active:
|
|
16840
|
+
active: boolean11("active").notNull().default(true),
|
|
16592
16841
|
createdAt: timestamp19("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
16593
16842
|
updatedAt: timestamp19("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
16594
16843
|
},
|
|
@@ -16671,7 +16920,7 @@ var integrationFacetBindingOwners = pgTable19(
|
|
|
16671
16920
|
bindingId: uuid19("binding_id").notNull().references(() => integrationFacetBindings.id, { onDelete: "cascade" }),
|
|
16672
16921
|
ownerKind: text19("owner_kind").notNull(),
|
|
16673
16922
|
ownerId: text19("owner_id").notNull(),
|
|
16674
|
-
removable:
|
|
16923
|
+
removable: boolean11("removable").notNull().default(true),
|
|
16675
16924
|
createdAt: timestamp19("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
16676
16925
|
},
|
|
16677
16926
|
(table) => ({
|
|
@@ -16879,7 +17128,7 @@ var rigVersions = pgTable19(
|
|
|
16879
17128
|
// session state, or process state.
|
|
16880
17129
|
providerImages: jsonb15("provider_images").$type().notNull().default({}),
|
|
16881
17130
|
createdBy: text19("created_by"),
|
|
16882
|
-
active:
|
|
17131
|
+
active: boolean11("active").notNull().default(false),
|
|
16883
17132
|
createdAt: timestamp19("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
16884
17133
|
},
|
|
16885
17134
|
(table) => ({
|
|
@@ -16978,9 +17227,12 @@ export {
|
|
|
16978
17227
|
companyProfileRevisions,
|
|
16979
17228
|
companyProfileHeads,
|
|
16980
17229
|
companyProfileActivationEvents,
|
|
17230
|
+
organizationCompanyProfileAgentPolicies,
|
|
17231
|
+
organizationCompanyProfileAgentPolicyEvents,
|
|
16981
17232
|
companyProfileSnapshots,
|
|
16982
17233
|
companyProfileAgentProposalReceipts,
|
|
16983
17234
|
companyProfileAgentConfirmationReceipts,
|
|
17235
|
+
companyProfileAgentAutomaticActivationReceipts,
|
|
16984
17236
|
workspaceLearningPolicyRevisions,
|
|
16985
17237
|
workspaceLearningPolicyHeads,
|
|
16986
17238
|
workspaceLearningPolicyActivationEvents,
|
|
@@ -17088,6 +17340,8 @@ export {
|
|
|
17088
17340
|
workspaceVariableSets,
|
|
17089
17341
|
workspaceVariableSetVariables,
|
|
17090
17342
|
codexSubscriptionCredentials,
|
|
17343
|
+
workspaceCodexSubscriptionPreferences,
|
|
17344
|
+
organizationCodexRotationSettings,
|
|
17091
17345
|
codexAppsSettings,
|
|
17092
17346
|
codexResetRedemptionAttempts,
|
|
17093
17347
|
connections,
|
|
@@ -17175,6 +17429,7 @@ export {
|
|
|
17175
17429
|
codexCapacityWaiters,
|
|
17176
17430
|
xaiSessionAccountPins,
|
|
17177
17431
|
xaiCapacityWaiters,
|
|
17432
|
+
sessionEventCursors,
|
|
17178
17433
|
sessionEvents,
|
|
17179
17434
|
automaticSessionTitleFanoutOutboxV1,
|
|
17180
17435
|
agentRunStates,
|
|
@@ -17270,4 +17525,4 @@ export {
|
|
|
17270
17525
|
rigChanges,
|
|
17271
17526
|
schema_exports
|
|
17272
17527
|
};
|
|
17273
|
-
//# sourceMappingURL=chunk-
|
|
17528
|
+
//# sourceMappingURL=chunk-O56DM5GZ.js.map
|