@opengeni/db 5.0.1 → 6.0.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/automations.d.ts +0 -2
- package/dist/canonical-human-identities.d.ts +4 -0
- package/dist/canonical-human-identities.js +3 -3
- package/dist/capability-components.d.ts +5 -13
- package/dist/capability-integrations.d.ts +23 -8
- package/dist/capability-reconciliation.d.ts +5 -0
- package/dist/capability-reconciliation.js +21 -0
- package/dist/capability-reconciliation.js.map +1 -0
- package/dist/{chunk-6T2GGYWE.js → chunk-4UJCXBR2.js} +4 -5800
- package/dist/chunk-4UJCXBR2.js.map +1 -0
- package/dist/{chunk-MWMXWHJD.js → chunk-7JCDSMX2.js} +2 -2
- package/dist/chunk-AJA2ZIUW.js +219 -0
- package/dist/chunk-AJA2ZIUW.js.map +1 -0
- package/dist/chunk-CDAT6EKW.js +247 -0
- package/dist/chunk-CDAT6EKW.js.map +1 -0
- package/dist/{chunk-DPONPYJD.js → chunk-CJI6G254.js} +70 -18
- package/dist/chunk-CJI6G254.js.map +1 -0
- package/dist/chunk-G32NVMRJ.js +276 -0
- package/dist/chunk-G32NVMRJ.js.map +1 -0
- package/dist/chunk-GABXCG3N.js +5811 -0
- package/dist/chunk-GABXCG3N.js.map +1 -0
- package/dist/{chunk-ERKVSPDX.js → chunk-LVY33EWL.js} +3 -3
- package/dist/{chunk-45CP2YKY.js → chunk-MAMBI2HR.js} +9 -3
- package/dist/{chunk-45CP2YKY.js.map → chunk-MAMBI2HR.js.map} +1 -1
- package/dist/{chunk-F73UKJY6.js → chunk-MN5PZMEK.js} +91 -108
- package/dist/chunk-MN5PZMEK.js.map +1 -0
- package/dist/chunk-PJI4MUZ7.js +131 -0
- package/dist/chunk-PJI4MUZ7.js.map +1 -0
- package/dist/{chunk-T6BWIGWJ.js → chunk-RIYHP2WU.js} +2 -2
- package/dist/{chunk-7HMK3B45.js → chunk-RL2MUXM3.js} +16 -7
- package/dist/chunk-RL2MUXM3.js.map +1 -0
- package/dist/{chunk-HQDVI2DB.js → chunk-SYKHLPTK.js} +4 -3
- package/dist/{chunk-HQDVI2DB.js.map → chunk-SYKHLPTK.js.map} +1 -1
- package/dist/{chunk-T6YLHJLS.js → chunk-XIXVVBW2.js} +198 -51
- package/dist/chunk-XIXVVBW2.js.map +1 -0
- package/dist/chunk-ZPJ6V2VG.js +156 -0
- package/dist/chunk-ZPJ6V2VG.js.map +1 -0
- package/dist/codex-capacity-recovery.d.ts +12 -0
- package/dist/codex-failure-eligibility.d.ts +9 -0
- package/dist/company-profile-schema.d.ts +4 -2
- package/dist/connect-attempts.d.ts +15 -0
- package/dist/connect-attempts.js +25 -0
- package/dist/connect-attempts.js.map +1 -0
- package/dist/connection-authority.d.ts +7 -63
- package/dist/connection-refresh-lock.d.ts +4 -0
- package/dist/connection-token-resolver.d.ts +8 -43
- package/dist/database-timing.d.ts +10 -0
- package/dist/database.d.ts +4 -0
- package/dist/editable-artifact-durable-export.js +2 -2
- package/dist/editable-artifacts.d.ts +9 -0
- package/dist/editable-artifacts.js +7 -5
- package/dist/index.d.ts +447 -78
- package/dist/index.js +12705 -12872
- package/dist/index.js.map +1 -1
- package/dist/insights-usage-bundle.d.ts +3 -0
- package/dist/integration-bindings.d.ts +1 -1
- package/dist/integration-facets.d.ts +18 -1
- package/dist/knowledge-entries-schema.d.ts +2 -0
- package/dist/knowledge-entries.d.ts +1 -0
- package/dist/knowledge-indexing.d.ts +1 -0
- package/dist/live-session-attempt.d.ts +35 -137
- package/dist/managed-auth-session-sets.js +3 -3
- package/dist/mcp-account-bindings.d.ts +4 -0
- package/dist/mcp-oauth.d.ts +11 -0
- package/dist/mcp-operations.js +2 -2
- package/dist/migrate.js +1 -1
- package/dist/organization-integration-policy.d.ts +51 -0
- package/dist/organization-integration-policy.js +18 -0
- package/dist/organization-integration-policy.js.map +1 -0
- package/dist/organization-usage.d.ts +20 -0
- package/dist/plugin-packages.d.ts +9 -12
- package/dist/pr-review.d.ts +0 -11
- package/dist/preference-registry-schema.d.ts +17 -0
- package/dist/provision-roles.js +1 -1
- package/dist/retained-provider-commands.d.ts +124 -6
- package/dist/retained-provider-commands.js +29 -97
- package/dist/retained-provider-commands.js.map +1 -1
- package/dist/retired-session-create-metadata.d.ts +4 -0
- package/dist/runtime-posture.d.ts +7 -5
- package/dist/schema.d.ts +876 -656
- package/dist/schema.js +5 -7
- package/dist/session-admission-block.d.ts +32 -0
- package/dist/session-attempt-writers.d.ts +4 -0
- package/dist/session-background-commands.js +5 -4
- package/dist/session-command-output.js +8 -126
- package/dist/session-command-output.js.map +1 -1
- package/dist/session-control.d.ts +5 -1
- package/dist/session-event-slices.d.ts +10 -0
- package/dist/session-event-slices.js +8 -222
- package/dist/session-event-slices.js.map +1 -1
- package/dist/session-file-attachments.d.ts +28 -0
- package/dist/session-goal-reports.d.ts +43 -0
- package/dist/session-mcp-approval.d.ts +4 -0
- package/dist/session-mcp-credential-rotation.js +5 -4
- package/dist/session-mcp-credential-rotation.js.map +1 -1
- package/dist/session-message-search.d.ts +22 -0
- package/dist/session-queue-commands.d.ts +2 -6
- package/dist/session-retry.d.ts +36 -0
- package/dist/session-tenancy.js +3 -3
- package/dist/skill-source-release-impact.d.ts +18 -0
- package/dist/skill-source-release.d.ts +9 -0
- package/dist/skills.d.ts +7 -1
- package/dist/user-resource-authority.d.ts +0 -8
- package/dist/video-generation.js +3 -3
- package/dist/workspace-tool-defaults.js +5 -4
- package/dist/workspace-tool-defaults.js.map +1 -1
- package/drizzle/0468_knowledge_relationship_projection.sql +30 -0
- package/drizzle/0469_knowledge_source_discovery.sql +85 -0
- package/drizzle/0470_organization_integration_policy.sql +151 -0
- package/drizzle/0471_usage_events_account_recent_index.sql +4 -0
- package/drizzle/0472_usage_events_workspace_recent_index.sql +4 -0
- package/drizzle/0473_organization_usage_analytical_capability.sql +237 -0
- package/drizzle/0474_goal_report_requirements.sql +156 -0
- package/drizzle/0475_session_event_history_statistics.sql +15 -0
- package/drizzle/0476_session_event_history_policy_planning.sql +29 -0
- package/drizzle/0477_managed_sign_in_methods.sql +303 -0
- package/drizzle/0478_sender_owned_connections.sql +2772 -0
- package/drizzle/0479_connection_create_idempotency.sql +16 -0
- package/drizzle/0480_private_session_organization_key_administration.sql +154 -0
- package/drizzle/0481_personal_connection_visibility_cleanup.sql +45 -0
- package/drizzle/0482_remove_packs.sql +417 -0
- package/drizzle/0483_preclaim_admission_block.sql +85 -0
- package/drizzle/0484_insights_usage_projection.sql +211 -0
- package/drizzle/0485_inherited_mcp_approval_policies.sql +6 -0
- package/drizzle/0486_reasoning_configuration_message_forks.sql +35 -0
- package/drizzle/0487_skill_catalog_message_forks.sql +26 -0
- package/drizzle/0488_permanent_skill_removal.sql +207 -0
- package/drizzle/0489_modal_command_byte_offsets.sql +17 -0
- package/drizzle/0490_periodic_capture_attempt_cadence.sql +6 -0
- package/drizzle/0491_warm_capture_holder_reclamation.sql +57 -0
- package/drizzle/0492_codex_accepted_source_authority.sql +249 -0
- package/drizzle/0493_stopping_command_error_containment.sql +58 -0
- package/drizzle/0494_mcp_account_bindings.sql +334 -0
- package/drizzle/0495_consented_sandbox_recovery.sql +220 -0
- package/drizzle/0496_supervised_command_settlement.sql +386 -0
- package/drizzle/0497_modal_inventory_owner_read_capability.sql +112 -0
- package/drizzle/0498_enrollment_membership_fence.sql +87 -0
- package/drizzle/0499_session_attachment_access.sql +224 -0
- package/drizzle/0500_session_execution_epoch.sql +37 -0
- package/drizzle/0501_session_sharing_execution.sql +591 -0
- package/drizzle/0502_active_message_boundary_forks.sql +30 -0
- package/package.json +17 -5
- package/src/automations.ts +17 -73
- package/src/canonical-human-identities.ts +17 -5
- package/src/capability-components.ts +7 -24
- package/src/capability-integrations.ts +301 -21
- package/src/capability-reconciliation.ts +19 -0
- package/src/codex-capacity-recovery.ts +47 -0
- package/src/codex-failure-eligibility.ts +93 -0
- package/src/connect-attempts.ts +49 -18
- package/src/connection-authority.ts +12 -158
- package/src/connection-refresh-lock.ts +22 -0
- package/src/connection-token-resolver.ts +58 -530
- package/src/database-timing.ts +43 -0
- package/src/database.ts +61 -26
- package/src/editable-artifacts.ts +1 -1
- package/src/index.ts +3578 -1273
- package/src/insights-model-bundle.ts +19 -7
- package/src/insights-usage-bundle.ts +16 -19
- package/src/integration-bindings.ts +2 -7
- package/src/integration-facets.ts +73 -6
- package/src/knowledge-entries.ts +8 -1
- package/src/live-session-attempt.ts +0 -22
- package/src/mcp-account-bindings.ts +12 -0
- package/src/mcp-oauth.ts +26 -0
- package/src/organization-integration-policy.ts +235 -0
- package/src/organization-usage.ts +83 -0
- package/src/plugin-packages.ts +226 -42
- package/src/pr-review.ts +7 -69
- package/src/preference-registry-schema.ts +1 -0
- package/src/provision-roles.ts +50 -37
- package/src/retained-provider-commands.ts +286 -9
- package/src/retired-session-create-metadata.ts +16 -0
- package/src/runtime-posture.ts +217 -13
- package/src/schema.ts +104 -120
- package/src/session-admission-block.ts +29 -0
- package/src/session-attempt-writers.ts +48 -0
- package/src/session-control.ts +21 -5
- package/src/session-event-slices.ts +76 -26
- package/src/session-file-attachments.ts +66 -0
- package/src/session-goal-reports.ts +255 -0
- package/src/session-mcp-approval.ts +30 -0
- package/src/session-message-search.ts +348 -0
- package/src/session-queue-commands.ts +60 -36
- package/src/session-retry.ts +319 -0
- package/src/skill-config-migration.ts +11 -2
- package/src/skill-source-release-impact.ts +33 -0
- package/src/skill-source-release.ts +67 -26
- package/src/skills.ts +44 -6
- package/src/user-resource-authority.ts +0 -56
- package/dist/chunk-6T2GGYWE.js.map +0 -1
- package/dist/chunk-7HMK3B45.js.map +0 -1
- package/dist/chunk-DPONPYJD.js.map +0 -1
- package/dist/chunk-F73UKJY6.js.map +0 -1
- package/dist/chunk-T6YLHJLS.js.map +0 -1
- package/dist/host-mcp-binding-match.d.ts +0 -5
- package/dist/host-mcp-bindings.d.ts +0 -79
- package/dist/host-mcp-resolvers.d.ts +0 -47
- package/dist/host-mcp-task-authority.d.ts +0 -43
- package/dist/host-selection-identity.d.ts +0 -6
- package/dist/pack-components.d.ts +0 -83
- package/dist/pack-installations.d.ts +0 -86
- package/src/host-mcp-binding-match.ts +0 -34
- package/src/host-mcp-bindings.ts +0 -777
- package/src/host-mcp-resolvers.ts +0 -266
- package/src/host-mcp-task-authority.ts +0 -384
- package/src/host-selection-identity.ts +0 -29
- package/src/pack-components.ts +0 -980
- package/src/pack-installations.ts +0 -950
- /package/dist/{chunk-MWMXWHJD.js.map → chunk-7JCDSMX2.js.map} +0 -0
- /package/dist/{chunk-ERKVSPDX.js.map → chunk-LVY33EWL.js.map} +0 -0
- /package/dist/{chunk-T6BWIGWJ.js.map → chunk-RIYHP2WU.js.map} +0 -0
|
@@ -1,26 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
ConnectionAuthorityGrant,
|
|
3
|
-
ConnectionAuthoritySummary,
|
|
4
2
|
ConnectionUseDenialReason,
|
|
5
3
|
ConnectionUseAttribution,
|
|
6
|
-
ConnectionUseAuthorizationResult,
|
|
7
|
-
ConnectionUseAuthoritySnapshot,
|
|
8
|
-
type IssueConnectionUseGrantRequest,
|
|
9
4
|
type ConnectionUseDenialReason as ConnectionUseDenialReasonValue,
|
|
10
5
|
} from "@opengeni/contracts/connection-authority";
|
|
11
|
-
import {
|
|
12
|
-
ConnectionKind,
|
|
13
|
-
type ConnectionKind as ConnectionKindValue,
|
|
14
|
-
type UserResourceDelegation,
|
|
15
|
-
} from "@opengeni/contracts";
|
|
6
|
+
import { ConnectionKind, type ConnectionKind as ConnectionKindValue } from "@opengeni/contracts";
|
|
16
7
|
import { sql } from "drizzle-orm";
|
|
17
8
|
import { getExternalLinkTurnAuthorization } from "./external-link-work";
|
|
18
9
|
import { rawRows, setSubjectRlsContext, withRlsContext, type Database } from "./database";
|
|
19
|
-
import {
|
|
20
|
-
issueSelfUserResourceGrant,
|
|
21
|
-
listSelfUserResourceAuthorities,
|
|
22
|
-
revokeSelfUserResourceGrant,
|
|
23
|
-
} from "./user-resource-authority";
|
|
24
10
|
|
|
25
11
|
async function withOwnerContext<T>(
|
|
26
12
|
db: Database,
|
|
@@ -33,151 +19,19 @@ async function withOwnerContext<T>(
|
|
|
33
19
|
});
|
|
34
20
|
}
|
|
35
21
|
|
|
36
|
-
|
|
22
|
+
/** Called only after the core layer has established the authenticated sender. */
|
|
23
|
+
export async function listOwnedConnectionAccounts(
|
|
37
24
|
db: Database,
|
|
38
25
|
input: { accountId: string; workspaceId: string; subjectId: string },
|
|
39
|
-
): Promise<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export async function issueSelfConnectionUseGrant(
|
|
51
|
-
db: Database,
|
|
52
|
-
input: {
|
|
53
|
-
accountId: string;
|
|
54
|
-
workspaceId: string;
|
|
55
|
-
subjectId: string;
|
|
56
|
-
authorityId: string;
|
|
57
|
-
request: IssueConnectionUseGrantRequest;
|
|
58
|
-
},
|
|
59
|
-
) {
|
|
60
|
-
return ConnectionAuthorityGrant.parse(
|
|
61
|
-
await issueSelfUserResourceGrant(db, {
|
|
62
|
-
accountId: input.accountId,
|
|
63
|
-
workspaceId: input.workspaceId,
|
|
64
|
-
subjectId: input.subjectId,
|
|
65
|
-
authorityId: input.authorityId,
|
|
66
|
-
resourceKind: "connection",
|
|
67
|
-
mode: input.request.mode,
|
|
68
|
-
context: input.request.context,
|
|
69
|
-
sessionId: input.request.sessionId ?? null,
|
|
70
|
-
expectedAuthorityEpoch: input.request.expectedAuthorityEpoch ?? null,
|
|
71
|
-
workspaceSharedAcknowledged: input.request.workspaceSharedAcknowledged,
|
|
72
|
-
}),
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export async function revokeSelfConnectionUseGrant(
|
|
77
|
-
db: Database,
|
|
78
|
-
input: { accountId: string; workspaceId: string; subjectId: string; grantId: string },
|
|
79
|
-
): Promise<{ grantId: string; generation: number; status: "revoked"; revokedAt: string }> {
|
|
80
|
-
return await revokeSelfUserResourceGrant(db, input);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Resolves the immutable physical origin for one explicit common-user
|
|
85
|
-
* connection selection. The SECURITY DEFINER database boundary proves the
|
|
86
|
-
* owning human, active organization membership, target-workspace access, and
|
|
87
|
-
* exact authority/grant generations without exposing credentials or allowing
|
|
88
|
-
* an ambient cross-workspace inventory.
|
|
89
|
-
*/
|
|
90
|
-
export async function resolvePersonalConnectionAuthoritySelectionOrigin(
|
|
91
|
-
db: Database,
|
|
92
|
-
input: {
|
|
93
|
-
accountId: string;
|
|
94
|
-
targetWorkspaceId: string;
|
|
95
|
-
subjectId: string;
|
|
96
|
-
connectionId: string;
|
|
97
|
-
delegation: UserResourceDelegation;
|
|
98
|
-
},
|
|
99
|
-
): Promise<string | null> {
|
|
100
|
-
return await withOwnerContext(
|
|
101
|
-
db,
|
|
102
|
-
{
|
|
103
|
-
accountId: input.accountId,
|
|
104
|
-
workspaceId: input.targetWorkspaceId,
|
|
105
|
-
subjectId: input.subjectId,
|
|
106
|
-
},
|
|
107
|
-
async (scopedDb) => {
|
|
108
|
-
const [row] = await rawRows<{ originWorkspaceId: string }>(
|
|
109
|
-
scopedDb,
|
|
110
|
-
sql`
|
|
111
|
-
select origin_workspace_id as "originWorkspaceId"
|
|
112
|
-
from resolve_personal_connection_authority_selection(
|
|
113
|
-
${input.accountId}::uuid, ${input.targetWorkspaceId}::uuid,
|
|
114
|
-
${input.subjectId}, ${input.connectionId}::uuid,
|
|
115
|
-
${JSON.stringify(input.delegation)}::text::jsonb
|
|
116
|
-
)
|
|
117
|
-
`,
|
|
118
|
-
);
|
|
119
|
-
return row?.originWorkspaceId ?? null;
|
|
120
|
-
},
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export async function resolveConnectionUseAuthority(
|
|
125
|
-
db: Database,
|
|
126
|
-
input: { snapshot: unknown },
|
|
127
|
-
): Promise<ConnectionUseAuthorizationResult> {
|
|
128
|
-
const snapshot = ConnectionUseAuthoritySnapshot.parse(input.snapshot);
|
|
129
|
-
return await withRlsContext(
|
|
130
|
-
db,
|
|
131
|
-
{ accountId: snapshot.organizationId, workspaceId: snapshot.targetWorkspaceId },
|
|
132
|
-
async (scopedDb) => {
|
|
133
|
-
if (snapshot.ownerSubjectId) {
|
|
134
|
-
await setSubjectRlsContext(scopedDb, snapshot.ownerSubjectId);
|
|
135
|
-
}
|
|
136
|
-
const [row] = await rawRows<{
|
|
137
|
-
authorizationStatus: "authorized" | "denied";
|
|
138
|
-
denialReason: string | null;
|
|
139
|
-
connectionId: string | null;
|
|
140
|
-
connectionGeneration: number | null;
|
|
141
|
-
authorityScope: "workspace" | "user" | null;
|
|
142
|
-
ownerSubjectId: string | null;
|
|
143
|
-
authorityId: string | null;
|
|
144
|
-
grantId: string | null;
|
|
145
|
-
}>(
|
|
146
|
-
scopedDb,
|
|
147
|
-
sql`
|
|
148
|
-
select authorization_status as "authorizationStatus",
|
|
149
|
-
denial_reason as "denialReason", connection_id as "connectionId",
|
|
150
|
-
connection_generation::int as "connectionGeneration",
|
|
151
|
-
authority_scope as "authorityScope", owner_subject_id as "ownerSubjectId",
|
|
152
|
-
authority_id as "authorityId", grant_id as "grantId"
|
|
153
|
-
from resolve_connection_use_authority(
|
|
154
|
-
${snapshot.organizationId}::uuid, ${snapshot.targetWorkspaceId}::uuid,
|
|
155
|
-
${snapshot.targetSessionId}::uuid, ${JSON.stringify(snapshot)}::text::jsonb
|
|
156
|
-
)
|
|
157
|
-
`,
|
|
158
|
-
);
|
|
159
|
-
if (!row) throw new Error("connection use authorization was not returned");
|
|
160
|
-
if (row.authorizationStatus === "denied") {
|
|
161
|
-
return ConnectionUseAuthorizationResult.parse({
|
|
162
|
-
status: "denied",
|
|
163
|
-
reason: row.denialReason,
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
return ConnectionUseAuthorizationResult.parse({
|
|
167
|
-
status: "authorized",
|
|
168
|
-
attribution: ConnectionUseAttribution.parse({
|
|
169
|
-
organizationId: snapshot.organizationId,
|
|
170
|
-
workspaceId: snapshot.targetWorkspaceId,
|
|
171
|
-
sessionId: snapshot.targetSessionId,
|
|
172
|
-
connectionId: row.connectionId,
|
|
173
|
-
connectionGeneration: row.connectionGeneration,
|
|
174
|
-
scope: row.authorityScope,
|
|
175
|
-
ownerSubjectId: row.ownerSubjectId,
|
|
176
|
-
authorityId: row.authorityId,
|
|
177
|
-
grantId: row.grantId,
|
|
178
|
-
}),
|
|
179
|
-
});
|
|
180
|
-
},
|
|
26
|
+
): Promise<Array<{ connectionId: string; originWorkspaceId: string }>> {
|
|
27
|
+
return withOwnerContext(db, input, async (tx) =>
|
|
28
|
+
rawRows<{ connectionId: string; originWorkspaceId: string }>(
|
|
29
|
+
tx,
|
|
30
|
+
sql`
|
|
31
|
+
select connection_id as "connectionId", origin_workspace_id as "originWorkspaceId"
|
|
32
|
+
from list_owned_connection_accounts(${input.accountId}::uuid, ${input.workspaceId}::uuid)
|
|
33
|
+
`,
|
|
34
|
+
),
|
|
181
35
|
);
|
|
182
36
|
}
|
|
183
37
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { sql } from "drizzle-orm";
|
|
2
|
+
import { setSubjectRlsContext, withRlsContext, type Database } from "./database";
|
|
3
|
+
import type { ConnectionCredentialForBroker } from "./connection-token-resolver";
|
|
4
|
+
|
|
5
|
+
/** Serialize rotating-token exchange across workers, not only within one process. */
|
|
6
|
+
export async function withConnectionRefreshLock<T>(
|
|
7
|
+
db: Database,
|
|
8
|
+
credential: ConnectionCredentialForBroker,
|
|
9
|
+
work: (lockedDb: Database) => Promise<T>,
|
|
10
|
+
): Promise<T> {
|
|
11
|
+
return withRlsContext(
|
|
12
|
+
db,
|
|
13
|
+
{ accountId: credential.accountId, workspaceId: credential.workspaceId },
|
|
14
|
+
async (tx) => {
|
|
15
|
+
if (credential.subjectId) await setSubjectRlsContext(tx, credential.subjectId);
|
|
16
|
+
await tx.execute(
|
|
17
|
+
sql`select pg_advisory_xact_lock(hashtextextended(${`connection-refresh:${credential.id}`}, 0))`,
|
|
18
|
+
);
|
|
19
|
+
return work(tx);
|
|
20
|
+
},
|
|
21
|
+
);
|
|
22
|
+
}
|