@opengeni/db 4.2.2 → 4.3.2-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-S4Y42VSX.js → chunk-AI4NC6XW.js} +212 -7
- package/dist/chunk-AI4NC6XW.js.map +1 -0
- package/dist/{chunk-SNLIKELL.js → chunk-DVSLOUEI.js} +2 -2
- package/dist/{chunk-6GAPAYZR.js → chunk-F4BIHJ7J.js} +562 -86
- package/dist/chunk-F4BIHJ7J.js.map +1 -0
- package/dist/{chunk-B2KR3TEM.js → chunk-I4ITNMX2.js} +2 -2
- package/dist/{chunk-MGVOYVPS.js → chunk-PFBUHOI5.js} +3 -3
- package/dist/{chunk-6Y7ZDVJ5.js → chunk-UUPY6IGP.js} +2 -2
- package/dist/{chunk-FPTI4NP4.js → chunk-UVBPOGA7.js} +2 -2
- package/dist/{chunk-7WX3R3YL.js → chunk-XBXANJQS.js} +7 -2
- package/dist/chunk-XBXANJQS.js.map +1 -0
- package/dist/{chunk-6IQ4X35Y.js → chunk-YVYBAWBU.js} +46 -1
- package/dist/chunk-YVYBAWBU.js.map +1 -0
- package/dist/connect-attempts.d.ts +60 -0
- package/dist/connection-setup-authority.d.ts +10 -0
- package/dist/connection-token-resolver.d.ts +11 -2
- package/dist/editable-artifact-durable-export.js +2 -2
- package/dist/editable-artifacts.js +3 -3
- package/dist/external-identities.d.ts +16 -0
- package/dist/external-identity-links.d.ts +74 -0
- package/dist/external-link-work.d.ts +51 -0
- package/dist/host-mcp-binding-match.d.ts +5 -0
- package/dist/host-mcp-bindings.d.ts +73 -0
- package/dist/host-mcp-task-authority.d.ts +47 -0
- package/dist/host-selection-identity.d.ts +6 -0
- package/dist/index.d.ts +60 -35
- package/dist/index.js +15247 -13793
- package/dist/index.js.map +1 -1
- package/dist/live-session-attempt.d.ts +275 -0
- package/dist/managed-auth-session-sets.js +3 -3
- package/dist/memory-domain.d.ts +3 -3
- package/dist/provision-roles.js +1 -1
- package/dist/retained-provider-commands.js +2 -2
- package/dist/runtime-posture.d.ts +6 -6
- package/dist/scheduled-task-revision-authority.d.ts +11 -0
- package/dist/schema.d.ts +1279 -9
- package/dist/schema.js +11 -1
- package/dist/session-background-commands.js +4 -4
- package/dist/session-command-output.js +4 -4
- package/dist/session-event-slices.js +2 -2
- package/dist/session-queue-commands.d.ts +7 -0
- package/dist/session-tenancy.d.ts +2 -0
- package/dist/session-tenancy.js +3 -3
- package/dist/video-generation.js +3 -3
- package/dist/workspace-authority.d.ts +4 -4
- package/dist/workspace-tool-defaults.js +4 -4
- package/drizzle/0437_organization_scoped_external_workspaces.sql +71 -0
- package/drizzle/0438_durable_connect_attempts.sql +95 -0
- package/drizzle/0439_external_identity_provisioning.sql +128 -0
- package/drizzle/0440_external_workspace_member_removal.sql +59 -0
- package/drizzle/0441_external_identity_membership_lifecycle.sql +163 -0
- package/drizzle/0442_external_owning_user_authority.sql +81 -0
- package/drizzle/0443_host_mcp_binding_registry.sql +93 -0
- package/drizzle/0444_host_mcp_delegations.sql +129 -0
- package/drizzle/0445_host_mcp_turn_authorities.sql +145 -0
- package/drizzle/0446_host_mcp_causal_continuation.sql +126 -0
- package/drizzle/0447_host_mcp_task_authorities.sql +264 -0
- package/drizzle/0448_host_mcp_child_authority.sql +115 -0
- package/drizzle/0449_external_identity_link_lifecycle.sql +107 -0
- package/drizzle/0450_external_identity_link_work.sql +179 -0
- package/drizzle/0451_external_link_preview_and_permission_ceiling.sql +82 -0
- package/drizzle/0452_external_link_scheduled_origin.sql +34 -0
- package/drizzle/0453_host_mcp_native_owner.sql +35 -0
- package/drizzle/0454_connect_origin_authority.sql +42 -0
- package/drizzle/0455_external_link_inventory_labels.sql +44 -0
- package/drizzle/0456_social_connection_versions.sql +14 -0
- package/drizzle/0457_canonical_session_scope_subject.sql +46 -0
- package/drizzle/0458_skill_review_wire_compatibility.sql +36 -0
- package/package.json +6 -6
- package/src/connect-attempts.ts +317 -0
- package/src/connection-authority.ts +9 -0
- package/src/connection-setup-authority.ts +35 -0
- package/src/connection-token-resolver.ts +177 -48
- package/src/external-identities.ts +70 -0
- package/src/external-identity-links.ts +364 -0
- package/src/external-link-work.ts +228 -0
- package/src/host-mcp-binding-match.ts +33 -0
- package/src/host-mcp-bindings.ts +741 -0
- package/src/host-mcp-task-authority.ts +383 -0
- package/src/host-selection-identity.ts +29 -0
- package/src/index.ts +481 -151
- package/src/live-session-attempt.ts +85 -0
- package/src/managed-human-provisioning.ts +6 -1
- package/src/memory-domain.ts +6 -11
- package/src/provision-roles.ts +3 -0
- package/src/runtime-posture.ts +47 -0
- package/src/scheduled-task-revision-authority.ts +30 -0
- package/src/schema.ts +233 -7
- package/src/session-control.ts +14 -0
- package/src/session-queue-commands.ts +11 -0
- package/src/session-tenancy.ts +7 -0
- package/src/workspace-artifacts.ts +10 -4
- package/src/workspace-authority.ts +5 -5
- package/dist/chunk-6GAPAYZR.js.map +0 -1
- package/dist/chunk-6IQ4X35Y.js.map +0 -1
- package/dist/chunk-7WX3R3YL.js.map +0 -1
- package/dist/chunk-S4Y42VSX.js.map +0 -1
- /package/dist/{chunk-SNLIKELL.js.map → chunk-DVSLOUEI.js.map} +0 -0
- /package/dist/{chunk-B2KR3TEM.js.map → chunk-I4ITNMX2.js.map} +0 -0
- /package/dist/{chunk-MGVOYVPS.js.map → chunk-PFBUHOI5.js.map} +0 -0
- /package/dist/{chunk-6Y7ZDVJ5.js.map → chunk-UUPY6IGP.js.map} +0 -0
- /package/dist/{chunk-FPTI4NP4.js.map → chunk-UVBPOGA7.js.map} +0 -0
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
getCanonicalHumanIdentityProjection,
|
|
12
12
|
synchronizeCanonicalHumanLoginBindings,
|
|
13
13
|
validateCanonicalHumanSession
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-DVSLOUEI.js";
|
|
15
|
+
import "./chunk-I4ITNMX2.js";
|
|
16
|
+
import "./chunk-AI4NC6XW.js";
|
|
17
17
|
import "./chunk-PZ5AY32C.js";
|
|
18
18
|
export {
|
|
19
19
|
CanonicalHumanIdentityAuthorityError,
|
|
@@ -61,6 +61,7 @@ __export(schema_exports, {
|
|
|
61
61
|
composerDrafts: () => composerDrafts,
|
|
62
62
|
computerSessionAssociations: () => computerSessionAssociations,
|
|
63
63
|
computerSessions: () => computerSessions,
|
|
64
|
+
connectAttempts: () => connectAttempts,
|
|
64
65
|
connectionDisconnectOperations: () => connectionDisconnectOperations,
|
|
65
66
|
connectionUseAuditFacts: () => connectionUseAuditFacts,
|
|
66
67
|
connectionUseOnceConsumptionReceipts: () => connectionUseOnceConsumptionReceipts,
|
|
@@ -93,6 +94,7 @@ __export(schema_exports, {
|
|
|
93
94
|
enrollmentOsValues: () => enrollmentOsValues,
|
|
94
95
|
enrollmentStatusValues: () => enrollmentStatusValues,
|
|
95
96
|
enrollments: () => enrollments,
|
|
97
|
+
externalIdentities: () => externalIdentities,
|
|
96
98
|
feedbackSubmissions: () => feedbackSubmissions,
|
|
97
99
|
fileUploads: () => fileUploads,
|
|
98
100
|
files: () => files,
|
|
@@ -110,6 +112,9 @@ __export(schema_exports, {
|
|
|
110
112
|
hostExportCursorState: () => hostExportCursorState,
|
|
111
113
|
hostExportDeadLetters: () => hostExportDeadLetters,
|
|
112
114
|
hostExportOutbox: () => hostExportOutbox,
|
|
115
|
+
hostMcpBindings: () => hostMcpBindings,
|
|
116
|
+
hostMcpDelegations: () => hostMcpDelegations,
|
|
117
|
+
hostMcpTurnAuthorities: () => hostMcpTurnAuthorities,
|
|
113
118
|
imageGenerationOperations: () => imageGenerationOperations,
|
|
114
119
|
importBatches: () => importBatches,
|
|
115
120
|
integrationFacetBindingOwners: () => integrationFacetBindingOwners,
|
|
@@ -6504,7 +6509,11 @@ var workspaces = pgTable20(
|
|
|
6504
6509
|
(table) => ({
|
|
6505
6510
|
account: index19("workspaces_account_idx").on(table.accountId),
|
|
6506
6511
|
accountSlug: uniqueIndex20("workspaces_account_slug_idx").on(table.accountId, table.slug).where(sql16`${table.slug} is not null`),
|
|
6507
|
-
external: uniqueIndex20("workspaces_external_idx").on(
|
|
6512
|
+
external: uniqueIndex20("workspaces_external_idx").on(
|
|
6513
|
+
table.accountId,
|
|
6514
|
+
table.externalSource,
|
|
6515
|
+
table.externalId
|
|
6516
|
+
),
|
|
6508
6517
|
sandboxViewerForceDrain: index19("workspaces_sandbox_viewer_force_drain_idx").on(table.id).where(sql16`${table.sandboxViewerForceDrainReason} is not null`),
|
|
6509
6518
|
sandboxViewerForceDrainValid: check11(
|
|
6510
6519
|
"workspaces_sandbox_viewer_force_drain_check",
|
|
@@ -6819,6 +6828,41 @@ var workspaceMemberships = pgTable20(
|
|
|
6819
6828
|
account: index19("workspace_memberships_account_idx").on(table.accountId)
|
|
6820
6829
|
})
|
|
6821
6830
|
);
|
|
6831
|
+
var externalIdentities = pgTable20(
|
|
6832
|
+
"external_identities",
|
|
6833
|
+
{
|
|
6834
|
+
id: uuid20("id").primaryKey(),
|
|
6835
|
+
accountId: uuid20("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
|
|
6836
|
+
source: text20("source").notNull(),
|
|
6837
|
+
externalId: text20("external_id").notNull(),
|
|
6838
|
+
subjectId: text20("subject_id").notNull(),
|
|
6839
|
+
organizationMembershipId: uuid20("organization_membership_id").notNull(),
|
|
6840
|
+
personalWorkspaceId: uuid20("personal_workspace_id").notNull(),
|
|
6841
|
+
status: text20("status").notNull().default("active"),
|
|
6842
|
+
authorizationRevision: bigint14("authorization_revision", { mode: "number" }).notNull().default(1),
|
|
6843
|
+
createdAt: timestamp20("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
6844
|
+
updatedAt: timestamp20("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
6845
|
+
},
|
|
6846
|
+
(table) => ({
|
|
6847
|
+
mapping: uniqueIndex20("external_identities_account_id_source_external_id_key").on(
|
|
6848
|
+
table.accountId,
|
|
6849
|
+
table.source,
|
|
6850
|
+
table.externalId
|
|
6851
|
+
),
|
|
6852
|
+
subject: uniqueIndex20("external_identities_account_id_subject_id_key").on(
|
|
6853
|
+
table.accountId,
|
|
6854
|
+
table.subjectId
|
|
6855
|
+
),
|
|
6856
|
+
membership: foreignKey({
|
|
6857
|
+
columns: [table.organizationMembershipId, table.accountId],
|
|
6858
|
+
foreignColumns: [organizationMemberships.id, organizationMemberships.accountId]
|
|
6859
|
+
}),
|
|
6860
|
+
personalWorkspace: foreignKey({
|
|
6861
|
+
columns: [table.personalWorkspaceId, table.accountId],
|
|
6862
|
+
foreignColumns: [workspaces.id, workspaces.accountId]
|
|
6863
|
+
})
|
|
6864
|
+
})
|
|
6865
|
+
);
|
|
6822
6866
|
var organizationMemberships = pgTable20(
|
|
6823
6867
|
"organization_memberships",
|
|
6824
6868
|
{
|
|
@@ -7147,7 +7191,8 @@ var organizationMembershipLifecycleEvents = pgTable20(
|
|
|
7147
7191
|
id: uuid20("id").primaryKey().defaultRandom(),
|
|
7148
7192
|
accountId: uuid20("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
|
|
7149
7193
|
operationId: uuid20("operation_id").notNull(),
|
|
7150
|
-
actorMembershipId: uuid20("actor_membership_id")
|
|
7194
|
+
actorMembershipId: uuid20("actor_membership_id"),
|
|
7195
|
+
actorServiceSubject: text20("actor_service_subject"),
|
|
7151
7196
|
targetMembershipId: uuid20("target_membership_id"),
|
|
7152
7197
|
kind: text20("kind").notNull(),
|
|
7153
7198
|
priorAuthorizationRevision: bigint14("prior_authorization_revision", {
|
|
@@ -7177,6 +7222,10 @@ var organizationMembershipLifecycleEvents = pgTable20(
|
|
|
7177
7222
|
kindValid: check11(
|
|
7178
7223
|
"organization_membership_lifecycle_events_kind_check",
|
|
7179
7224
|
sql16`${table.kind} in ('invite', 'accept', 'revoke_invitation', 'change_role', 'suspend', 'reactivate', 'offboard', 'retention')`
|
|
7225
|
+
),
|
|
7226
|
+
actorKindValid: check11(
|
|
7227
|
+
"organization_membership_lifecycle_events_actor_kind_check",
|
|
7228
|
+
sql16`(${table.actorMembershipId} is not null and ${table.actorServiceSubject} is null) or (${table.actorMembershipId} is null and ${table.actorServiceSubject} is not null and ${table.actorServiceSubject} ~ '^api_key:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$')`
|
|
7180
7229
|
)
|
|
7181
7230
|
})
|
|
7182
7231
|
);
|
|
@@ -9376,6 +9425,36 @@ var integrationOauthClients = pgTable20(
|
|
|
9376
9425
|
authorizationServer: index19("integration_oauth_clients_as_idx").on(table.authorizationServer)
|
|
9377
9426
|
})
|
|
9378
9427
|
);
|
|
9428
|
+
var hostMcpTurnAuthorities = pgTable20(
|
|
9429
|
+
"host_mcp_turn_authorities",
|
|
9430
|
+
{
|
|
9431
|
+
turnId: uuid20("turn_id").notNull().references(() => sessionTurns.id, { onDelete: "cascade" }),
|
|
9432
|
+
serverId: text20("server_id").notNull(),
|
|
9433
|
+
accountId: uuid20("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
|
|
9434
|
+
workspaceId: uuid20("workspace_id").notNull(),
|
|
9435
|
+
sessionId: uuid20("session_id").notNull().references(() => sessions.id, { onDelete: "cascade" }),
|
|
9436
|
+
ownerSubjectId: text20("owner_subject_id").notNull(),
|
|
9437
|
+
bindingId: uuid20("binding_id").notNull().references(() => hostMcpBindings.id),
|
|
9438
|
+
delegationId: uuid20("delegation_id").notNull().references(() => hostMcpDelegations.id),
|
|
9439
|
+
canonicalSnapshot: jsonb16("canonical_snapshot").$type().notNull(),
|
|
9440
|
+
createdAt: timestamp20("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
9441
|
+
},
|
|
9442
|
+
(table) => ({
|
|
9443
|
+
pk: primaryKey9({ columns: [table.turnId, table.serverId] }),
|
|
9444
|
+
workspaceAccount: foreignKey({
|
|
9445
|
+
columns: [table.workspaceId, table.accountId],
|
|
9446
|
+
foreignColumns: [workspaces.id, workspaces.accountId]
|
|
9447
|
+
}).onDelete("cascade"),
|
|
9448
|
+
serverBounds: check11(
|
|
9449
|
+
"host_mcp_turn_authorities_server_id_check",
|
|
9450
|
+
sql16`octet_length(${table.serverId}) between 1 and 1024`
|
|
9451
|
+
),
|
|
9452
|
+
snapshotBounds: check11(
|
|
9453
|
+
"host_mcp_turn_authorities_canonical_snapshot_check",
|
|
9454
|
+
sql16`jsonb_typeof(${table.canonicalSnapshot}) = 'object' and octet_length(${table.canonicalSnapshot}::text) <= 262144`
|
|
9455
|
+
)
|
|
9456
|
+
})
|
|
9457
|
+
);
|
|
9379
9458
|
var integrationOauthStateNonces = pgTable20(
|
|
9380
9459
|
"integration_oauth_state_nonces",
|
|
9381
9460
|
{
|
|
@@ -9392,6 +9471,122 @@ var integrationOauthStateNonces = pgTable20(
|
|
|
9392
9471
|
expires: index19("integration_oauth_state_nonces_expires_idx").on(table.expiresAt)
|
|
9393
9472
|
})
|
|
9394
9473
|
);
|
|
9474
|
+
var hostMcpBindings = pgTable20(
|
|
9475
|
+
"host_mcp_bindings",
|
|
9476
|
+
{
|
|
9477
|
+
id: uuid20("id").primaryKey(),
|
|
9478
|
+
accountId: uuid20("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
|
|
9479
|
+
workspaceId: uuid20("workspace_id").notNull(),
|
|
9480
|
+
ownerSubjectId: text20("owner_subject_id").notNull(),
|
|
9481
|
+
authorizationRevision: bigint14("authorization_revision", { mode: "number" }).notNull(),
|
|
9482
|
+
operationId: uuid20("operation_id").notNull(),
|
|
9483
|
+
requestDigest: text20("request_digest").notNull(),
|
|
9484
|
+
definition: jsonb16("definition").notNull(),
|
|
9485
|
+
generation: bigint14("generation", { mode: "number" }).notNull().default(1),
|
|
9486
|
+
status: text20("status").notNull().default("active"),
|
|
9487
|
+
createdAt: timestamp20("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
9488
|
+
revokedAt: timestamp20("revoked_at", { withTimezone: true })
|
|
9489
|
+
},
|
|
9490
|
+
(table) => ({
|
|
9491
|
+
workspace: foreignKey({
|
|
9492
|
+
name: "host_mcp_bindings_workspace_account_fk",
|
|
9493
|
+
columns: [table.workspaceId, table.accountId],
|
|
9494
|
+
foreignColumns: [workspaces.id, workspaces.accountId]
|
|
9495
|
+
}).onDelete("cascade"),
|
|
9496
|
+
owner: foreignKey({
|
|
9497
|
+
name: "host_mcp_bindings_member_owner_fk",
|
|
9498
|
+
columns: [table.accountId, table.ownerSubjectId],
|
|
9499
|
+
foreignColumns: [organizationMemberships.accountId, organizationMemberships.subjectId]
|
|
9500
|
+
}),
|
|
9501
|
+
operation: uniqueIndex20("host_mcp_bindings_workspace_id_owner_subject_id_operation_id_key").on(
|
|
9502
|
+
table.workspaceId,
|
|
9503
|
+
table.ownerSubjectId,
|
|
9504
|
+
table.operationId
|
|
9505
|
+
),
|
|
9506
|
+
inventory: index19("host_mcp_bindings_owner_idx").on(
|
|
9507
|
+
table.workspaceId,
|
|
9508
|
+
table.ownerSubjectId,
|
|
9509
|
+
table.createdAt,
|
|
9510
|
+
table.id
|
|
9511
|
+
)
|
|
9512
|
+
})
|
|
9513
|
+
);
|
|
9514
|
+
var hostMcpDelegations = pgTable20(
|
|
9515
|
+
"host_mcp_delegations",
|
|
9516
|
+
{
|
|
9517
|
+
id: uuid20("id").primaryKey(),
|
|
9518
|
+
accountId: uuid20("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
|
|
9519
|
+
workspaceId: uuid20("workspace_id").notNull(),
|
|
9520
|
+
ownerSubjectId: text20("owner_subject_id").notNull(),
|
|
9521
|
+
ownerAuthorizationRevision: bigint14("owner_authorization_revision", {
|
|
9522
|
+
mode: "number"
|
|
9523
|
+
}).notNull(),
|
|
9524
|
+
bindingId: uuid20("binding_id").notNull().references(() => hostMcpBindings.id),
|
|
9525
|
+
bindingGeneration: bigint14("binding_generation", { mode: "number" }).notNull(),
|
|
9526
|
+
operationId: uuid20("operation_id").notNull(),
|
|
9527
|
+
requestDigest: text20("request_digest").notNull(),
|
|
9528
|
+
grantDefinition: jsonb16("grant_definition").notNull(),
|
|
9529
|
+
generation: bigint14("generation", { mode: "number" }).notNull().default(1),
|
|
9530
|
+
status: text20("status").notNull().default("active"),
|
|
9531
|
+
createdAt: timestamp20("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
9532
|
+
revokedAt: timestamp20("revoked_at", { withTimezone: true })
|
|
9533
|
+
},
|
|
9534
|
+
(table) => ({
|
|
9535
|
+
workspace: foreignKey({
|
|
9536
|
+
name: "host_mcp_delegations_workspace_account_fk",
|
|
9537
|
+
columns: [table.workspaceId, table.accountId],
|
|
9538
|
+
foreignColumns: [workspaces.id, workspaces.accountId]
|
|
9539
|
+
}).onDelete("cascade"),
|
|
9540
|
+
owner: foreignKey({
|
|
9541
|
+
name: "host_mcp_delegations_member_owner_fk",
|
|
9542
|
+
columns: [table.accountId, table.ownerSubjectId],
|
|
9543
|
+
foreignColumns: [organizationMemberships.accountId, organizationMemberships.subjectId]
|
|
9544
|
+
}),
|
|
9545
|
+
operation: uniqueIndex20(
|
|
9546
|
+
"host_mcp_delegations_workspace_id_owner_subject_id_operation_id_key"
|
|
9547
|
+
).on(table.workspaceId, table.ownerSubjectId, table.operationId),
|
|
9548
|
+
inventory: index19("host_mcp_delegations_owner_idx").on(
|
|
9549
|
+
table.workspaceId,
|
|
9550
|
+
table.ownerSubjectId,
|
|
9551
|
+
table.bindingId,
|
|
9552
|
+
table.id
|
|
9553
|
+
)
|
|
9554
|
+
})
|
|
9555
|
+
);
|
|
9556
|
+
var connectAttempts = pgTable20(
|
|
9557
|
+
"connect_attempts",
|
|
9558
|
+
{
|
|
9559
|
+
id: uuid20("id").primaryKey(),
|
|
9560
|
+
accountId: uuid20("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
|
|
9561
|
+
workspaceId: uuid20("workspace_id").notNull(),
|
|
9562
|
+
subjectId: text20("subject_id").notNull(),
|
|
9563
|
+
idempotencyKeyHash: text20("idempotency_key_hash").notNull(),
|
|
9564
|
+
requestDigest: text20("request_digest").notNull(),
|
|
9565
|
+
returnUrl: text20("return_url").notNull(),
|
|
9566
|
+
externalContinuation: jsonb16("external_continuation"),
|
|
9567
|
+
projection: jsonb16("projection").notNull(),
|
|
9568
|
+
operationId: text20("operation_id"),
|
|
9569
|
+
operationDigest: text20("operation_digest"),
|
|
9570
|
+
receipts: jsonb16("receipts").notNull().default({}),
|
|
9571
|
+
expiresAt: timestamp20("expires_at", { withTimezone: true }).notNull(),
|
|
9572
|
+
createdAt: timestamp20("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
9573
|
+
updatedAt: timestamp20("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
9574
|
+
},
|
|
9575
|
+
(table) => ({
|
|
9576
|
+
workspaceAccount: foreignKey({
|
|
9577
|
+
name: "connect_attempts_workspace_account_fk",
|
|
9578
|
+
columns: [table.workspaceId, table.accountId],
|
|
9579
|
+
foreignColumns: [workspaces.id, workspaces.accountId]
|
|
9580
|
+
}).onDelete("cascade"),
|
|
9581
|
+
idempotency: uniqueIndex20("connect_attempts_actor_idempotency_idx").on(
|
|
9582
|
+
table.workspaceId,
|
|
9583
|
+
table.subjectId,
|
|
9584
|
+
table.idempotencyKeyHash
|
|
9585
|
+
),
|
|
9586
|
+
pending: index19("connect_attempts_actor_pending_idx").on(table.workspaceId, table.subjectId, table.createdAt.desc(), table.id.desc()).where(sql16`${table.projection}->>'state' not in ('complete','cancelled','expired')`),
|
|
9587
|
+
expiry: index19("connect_attempts_expiry_idx").on(table.expiresAt, table.id)
|
|
9588
|
+
})
|
|
9589
|
+
);
|
|
9395
9590
|
var mcpOauthClients = pgTable20(
|
|
9396
9591
|
"mcp_oauth_clients",
|
|
9397
9592
|
{
|
|
@@ -9897,6 +10092,9 @@ var sessions = pgTable20(
|
|
|
9897
10092
|
// sessions carrying the same end-user label; 'session' limits it to the
|
|
9898
10093
|
// own root tree. Enforced only in the core session-authorization seam.
|
|
9899
10094
|
agentAccess: text20("agent_access").notNull().default("workspace"),
|
|
10095
|
+
// Canonical authenticated user for the frozen cross-session agent scope.
|
|
10096
|
+
// Independent of per-turn initiating users and historical external labels.
|
|
10097
|
+
scopeSubjectId: text20("scope_subject_id"),
|
|
9900
10098
|
// Opaque end-user label (both set or both null). This is a product label
|
|
9901
10099
|
// used for scoping and filtering, never a subject and never authority.
|
|
9902
10100
|
endUserSource: text20("end_user_source"),
|
|
@@ -11901,10 +12099,11 @@ var sessionTurns = pgTable20(
|
|
|
11901
12099
|
initiatorKind: text20("initiator_kind").notNull().default("service"),
|
|
11902
12100
|
initiatorSubjectId: text20("initiator_subject_id").notNull().default("unattributed-legacy"),
|
|
11903
12101
|
initiatorContext: jsonb16("initiator_context").$type().notNull().default({ backfill: true }),
|
|
11904
|
-
//
|
|
11905
|
-
// their own subject; trusted continuations
|
|
11906
|
-
// causal turn's value while retaining a
|
|
11907
|
-
//
|
|
12102
|
+
// Bounded, immutable causal-human selector for named attempt-bound
|
|
12103
|
+
// capabilities. Human turns bind their own subject; trusted continuations
|
|
12104
|
+
// and compactions may inherit the causal turn's value while retaining a
|
|
12105
|
+
// service initiator. It never authorizes by itself. Null means pure service
|
|
12106
|
+
// work has no human-bound authority.
|
|
11908
12107
|
initiatingHumanSubjectId: text20("initiating_human_subject_id"),
|
|
11909
12108
|
// Exact goal authority frozen when the logical turn is accepted. The
|
|
11910
12109
|
// migration trigger fills this for old and rolling writers; claim only
|
|
@@ -17556,6 +17755,7 @@ var socialConnections = pgTable20(
|
|
|
17556
17755
|
"social_connections",
|
|
17557
17756
|
{
|
|
17558
17757
|
id: uuid20("id").primaryKey().defaultRandom(),
|
|
17758
|
+
version: integer18("version").notNull().default(1),
|
|
17559
17759
|
accountId: uuid20("account_id").notNull().references(() => managedAccounts.id, { onDelete: "cascade" }),
|
|
17560
17760
|
workspaceId: uuid20("workspace_id").notNull().references(() => workspaces.id, { onDelete: "cascade" }),
|
|
17561
17761
|
subjectId: text20("subject_id"),
|
|
@@ -18182,6 +18382,7 @@ export {
|
|
|
18182
18382
|
workspaceInferenceControls,
|
|
18183
18383
|
workspaceSessionActivityRevisions,
|
|
18184
18384
|
workspaceMemberships,
|
|
18385
|
+
externalIdentities,
|
|
18185
18386
|
organizationMemberships,
|
|
18186
18387
|
organizationProfileEvents,
|
|
18187
18388
|
sessionTenancyActivations,
|
|
@@ -18232,7 +18433,11 @@ export {
|
|
|
18232
18433
|
memorySlackPublicationReceipts,
|
|
18233
18434
|
slackBotDeleteOperations,
|
|
18234
18435
|
integrationOauthClients,
|
|
18436
|
+
hostMcpTurnAuthorities,
|
|
18235
18437
|
integrationOauthStateNonces,
|
|
18438
|
+
hostMcpBindings,
|
|
18439
|
+
hostMcpDelegations,
|
|
18440
|
+
connectAttempts,
|
|
18236
18441
|
mcpOauthClients,
|
|
18237
18442
|
mcpOauthAuthorizationRequests,
|
|
18238
18443
|
mcpOauthAuthorizationCodes,
|
|
@@ -18399,4 +18604,4 @@ export {
|
|
|
18399
18604
|
feedbackSubmissions,
|
|
18400
18605
|
schema_exports
|
|
18401
18606
|
};
|
|
18402
|
-
//# sourceMappingURL=chunk-
|
|
18607
|
+
//# sourceMappingURL=chunk-AI4NC6XW.js.map
|