@burdenoff/be-sdk 2026.1027.2 → 2026.1028.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-credits/index.d.ts +3 -3
- package/dist/ai-credits/index.js +1 -1
- package/dist/assistant-session-CJZhF4D6.d.ts +15 -0
- package/dist/auth/index.d.ts +6 -5
- package/dist/auth/index.js +1 -1
- package/dist/cache/index.d.ts +2 -2
- package/dist/cache/index.js +2 -2
- package/dist/{chunk-YFOHAHZE.js → chunk-5CAFHK2Z.js} +2 -2
- package/dist/{chunk-YFOHAHZE.js.map → chunk-5CAFHK2Z.js.map} +1 -1
- package/dist/{chunk-QUF27D73.js → chunk-5RBIDJBZ.js} +3 -3
- package/dist/{chunk-QUF27D73.js.map → chunk-5RBIDJBZ.js.map} +1 -1
- package/dist/{chunk-JTG6GZTF.js → chunk-E36LPO3K.js} +4 -4
- package/dist/{chunk-JTG6GZTF.js.map → chunk-E36LPO3K.js.map} +1 -1
- package/dist/{chunk-3Z2VRCT6.js → chunk-E4QNLVY4.js} +7 -3
- package/dist/chunk-E4QNLVY4.js.map +1 -0
- package/dist/{chunk-6HO5AJ3U.js → chunk-FYFA7WAS.js} +3 -3
- package/dist/{chunk-6HO5AJ3U.js.map → chunk-FYFA7WAS.js.map} +1 -1
- package/dist/{chunk-HZTDMERF.js → chunk-GKOAAC6D.js} +3 -3
- package/dist/{chunk-HZTDMERF.js.map → chunk-GKOAAC6D.js.map} +1 -1
- package/dist/{chunk-GP766LND.js → chunk-NBN52AEM.js} +2 -2
- package/dist/{chunk-GP766LND.js.map → chunk-NBN52AEM.js.map} +1 -1
- package/dist/{chunk-OXGIVASV.js → chunk-PAQK3YF2.js} +3 -3
- package/dist/{chunk-OXGIVASV.js.map → chunk-PAQK3YF2.js.map} +1 -1
- package/dist/{chunk-X3MNBBOL.js → chunk-PNWFTWBQ.js} +3 -3
- package/dist/{chunk-X3MNBBOL.js.map → chunk-PNWFTWBQ.js.map} +1 -1
- package/dist/{chunk-5JNHVKHG.js → chunk-PQGMZH6K.js} +3 -3
- package/dist/{chunk-5JNHVKHG.js.map → chunk-PQGMZH6K.js.map} +1 -1
- package/dist/{chunk-VSP2QCEW.js → chunk-QCOC2SF3.js} +4 -3
- package/dist/chunk-QCOC2SF3.js.map +1 -0
- package/dist/{chunk-UCNTCCV6.js → chunk-QGADOWSG.js} +4 -4
- package/dist/{chunk-UCNTCCV6.js.map → chunk-QGADOWSG.js.map} +1 -1
- package/dist/chunk-RM6AIMZT.js +51 -0
- package/dist/chunk-RM6AIMZT.js.map +1 -0
- package/dist/{chunk-5NT2OEDQ.js → chunk-STWFX5E2.js} +3 -3
- package/dist/{chunk-5NT2OEDQ.js.map → chunk-STWFX5E2.js.map} +1 -1
- package/dist/{chunk-YNDJQRI3.js → chunk-VXVLKRU6.js} +3 -3
- package/dist/{chunk-YNDJQRI3.js.map → chunk-VXVLKRU6.js.map} +1 -1
- package/dist/{chunk-Q3SWU4VF.js → chunk-W5Q6JJWA.js} +57 -7
- package/dist/chunk-W5Q6JJWA.js.map +1 -0
- package/dist/{chunk-OPUC6PYJ.js → chunk-ZJVFK33K.js} +4 -4
- package/dist/{chunk-OPUC6PYJ.js.map → chunk-ZJVFK33K.js.map} +1 -1
- package/dist/{client-WSFUJHLI.js → client-7DW6EYSA.js} +5 -5
- package/dist/{client-WSFUJHLI.js.map → client-7DW6EYSA.js.map} +1 -1
- package/dist/database/index.js +1 -1
- package/dist/event-queue/index.d.ts +4 -4
- package/dist/export/index.d.ts +2 -2
- package/dist/export/index.js +6 -6
- package/dist/feature-flags/index.d.ts +4 -3
- package/dist/files/index.d.ts +3 -3
- package/dist/files/index.js +1 -1
- package/dist/gateway/index.d.ts +3 -3
- package/dist/gateway/index.js +5 -5
- package/dist/gateway/security/index.js +1 -1
- package/dist/graph/index.d.ts +4 -4
- package/dist/graph/index.js +1 -1
- package/dist/{graphql-AaLJfGzz.d.ts → graphql-BUbw43Zx.d.ts} +1 -1
- package/dist/{index-DG5lCWNk.d.ts → index-3ZE1m-ZJ.d.ts} +2 -2
- package/dist/{index-B0ebYV9W.d.ts → index-5x0XMKXN.d.ts} +1 -1
- package/dist/{index-Rc5EphmY.d.ts → index-B2YkcG0J.d.ts} +1 -1
- package/dist/{index-DMlr5R6K.d.ts → index-BKOBmdq7.d.ts} +2 -2
- package/dist/{index-CL7koBpQ.d.ts → index-BTMt4OjA.d.ts} +3 -2
- package/dist/{index-Cx5I3ydM.d.ts → index-BvkVcW8I.d.ts} +1 -1
- package/dist/{index-CfRZtB99.d.ts → index-CV3r9Taj.d.ts} +1 -1
- package/dist/{index-B4ciT3OZ.d.ts → index-CWmH_-RZ.d.ts} +1 -1
- package/dist/{index-CN4RA1PN.d.ts → index-CbgWNcus.d.ts} +1 -1
- package/dist/{index-Dvv6irk0.d.ts → index-Coua7_P7.d.ts} +1 -1
- package/dist/{index-CVX5nRuw.d.ts → index-DJCb-l2J.d.ts} +7 -4
- package/dist/{index-BWhuZl8f.d.ts → index-Dcq8OduH.d.ts} +14 -4
- package/dist/{index-HxigeZFh.d.ts → index-DieBtd0X.d.ts} +1 -1
- package/dist/{index-BKafOO7G.d.ts → index-Dtj9Eer3.d.ts} +1 -1
- package/dist/{index-CqNXOs72.d.ts → index-JTx7ZQHe.d.ts} +3 -3
- package/dist/{index-C_t30VyQ.d.ts → index-aHtYvc3i.d.ts} +1 -1
- package/dist/{index-BCUkR8sC.d.ts → index-ffmipXSA.d.ts} +1 -1
- package/dist/index.d.ts +28 -27
- package/dist/index.js +20 -20
- package/dist/init/index.d.ts +2 -2
- package/dist/init/index.js +6 -6
- package/dist/instrumentation/index.d.ts +4 -4
- package/dist/layer/index.d.ts +2 -2
- package/dist/layer/index.js +2 -2
- package/dist/{layer-GNAVXBMf.d.ts → layer-Cv9vSwBx.d.ts} +1 -0
- package/dist/logger/index.d.ts +3 -3
- package/dist/notifications/index.d.ts +4 -4
- package/dist/notifications/index.js +1 -1
- package/dist/prisma/index.d.ts +3 -2
- package/dist/prisma/index.js +2 -2
- package/dist/rbac/index.d.ts +3 -3
- package/dist/rbac/index.js +2 -2
- package/dist/resource-caps/index.d.ts +3 -3
- package/dist/server/index.d.ts +21 -4
- package/dist/server/index.js +45 -25
- package/dist/server/index.js.map +1 -1
- package/dist/tags/index.d.ts +3 -3
- package/dist/tags/index.js +1 -1
- package/dist/telemetry/index.d.ts +5 -5
- package/dist/temporal/index.d.ts +1 -1
- package/dist/temporal/index.js +2 -2
- package/dist/tracker/index.d.ts +6 -5
- package/dist/tracker/index.js +5 -5
- package/dist/{types-C-6m9NoG.d.ts → types-DLFCJD3D.d.ts} +3 -1
- package/dist/{types-B376RbyK.d.ts → types-DgJ4lDYA.d.ts} +1 -1
- package/dist/{workspace-extension-DiNiTLa3.d.ts → workspace-extension-BGwTOV_r.d.ts} +5 -1
- package/package.json +1 -1
- package/dist/chunk-3Z2VRCT6.js.map +0 -1
- package/dist/chunk-KGJ7LPE7.js +0 -22
- package/dist/chunk-KGJ7LPE7.js.map +0 -1
- package/dist/chunk-Q3SWU4VF.js.map +0 -1
- package/dist/chunk-VSP2QCEW.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { NotificationChannel, NotificationPriority, NotificationType, NotificationsModule, TenantNotificationsModule } from '../chunk-INAZ3PKF.js';
|
|
2
2
|
import '../chunk-QGBXVNRM.js';
|
|
3
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-5CAFHK2Z.js';
|
|
4
4
|
import '../chunk-RU266375.js';
|
|
5
5
|
import '../chunk-XE4OXN2W.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/dist/prisma/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { C as ContextFilterInput, a as ContextWhereCondition, D as DatabaseClient, b as DatabaseClientConfig, F as FieldExtractionOptions, c as FieldExtractionResult, I as InputJsonValue, J as JsonValue, M as ModelFieldsMap, O as OperationContext, P as PoolTuningEnv, d as PrismaJsonFilter, e as buildContextWhereClause, f as buildContextWhereConditions, g as checkDatabaseHealth, h as contextMatches, j as createContextFromSDK, k as createDatabaseClient, l as createDatabaseClientFromEnv, m as extractFieldsFromModel, n as getAllModelNames, o as getDatabaseManager, p as getDatabaseProductName, q as getDatabaseStats, r as getDatabaseVersion, s as getDb, t as getModelFields, u as hasModel, v as initializeDatabase, w as initializeDatabaseWithConfig, x as isDatabaseInitialized, y as loadGeneratedFields, z as mergeContext, A as parseContext, B as resetDatabaseManager, E as resolvePoolTuningFromEnv, G as testConnection, H as toContextJson } from '../index-
|
|
1
|
+
export { C as ContextFilterInput, a as ContextWhereCondition, D as DatabaseClient, b as DatabaseClientConfig, F as FieldExtractionOptions, c as FieldExtractionResult, I as InputJsonValue, J as JsonValue, M as ModelFieldsMap, O as OperationContext, P as PoolTuningEnv, d as PrismaJsonFilter, e as buildContextWhereClause, f as buildContextWhereConditions, g as checkDatabaseHealth, h as contextMatches, j as createContextFromSDK, k as createDatabaseClient, l as createDatabaseClientFromEnv, m as extractFieldsFromModel, n as getAllModelNames, o as getDatabaseManager, p as getDatabaseProductName, q as getDatabaseStats, r as getDatabaseVersion, s as getDb, t as getModelFields, u as hasModel, v as initializeDatabase, w as initializeDatabaseWithConfig, x as isDatabaseInitialized, y as loadGeneratedFields, z as mergeContext, A as parseContext, B as resetDatabaseManager, E as resolvePoolTuningFromEnv, G as testConnection, H as toContextJson } from '../index-BTMt4OjA.js';
|
|
2
2
|
export { C as ConnectionState, d as DatabaseHealth, D as DatabaseReturnType, P as PrismaClientBase, c as PrismaClientConfig, a as PrismaClientConstructorOptions, b as PrismaClientWrapper, e as PrismaEvent, f as PrismaLogDefinition, g as PrismaLogEvent, h as PrismaLogLevel, i as PrismaQueryEvent, j as PrismaTransactionOptions, k as configurePrismaLogging, l as createConnectionPool, m as createPrismaAdapter, n as createPrismaClient, o as ensureServiceApplicationName, p as installAcquireRetry, q as isTransientAcquireError } from '../client-CCXpAZ2r.js';
|
|
3
|
-
export { C as CallerTransaction, P as PrismaQueryInternalParams, R as RawPrismaForCallerTransaction, T as TransactionContextStatement, a as WorkspaceContext, W as WorkspaceExtensionConfig, b as addWorkspaceExtension, c as buildTransactionContextStatement, d as defaultWorkspaceExtensionConfig, g as getCallerTransaction, e as getWorkspaceContext, i as injectCreateFields,
|
|
3
|
+
export { C as CallerTransaction, P as PrismaQueryInternalParams, R as RawPrismaForCallerTransaction, T as TransactionContextStatement, a as WorkspaceContext, W as WorkspaceExtensionConfig, b as addWorkspaceExtension, c as buildTransactionContextStatement, d as defaultWorkspaceExtensionConfig, g as getCallerTransaction, e as getScopedWorkspaceContext, f as getWorkspaceContext, i as injectCreateFields, h as injectWhereWorkspaceId, m as maybeSetRlsGuc, j as maybeTagConnection, r as resetCallerTransactionStateForTests, k as runOperationInCallerTransaction, l as runOperationWithRlsGuc, s as setWorkspaceContext, w as withWorkspaceContext, n as withWorkspaceContextSync } from '../workspace-extension-BGwTOV_r.js';
|
|
4
4
|
import '../prisma-extension-gYhYriA0.js';
|
|
5
5
|
import '@prisma/adapter-pg';
|
|
6
6
|
import 'pg';
|
|
7
|
+
import '../assistant-session-CJZhF4D6.js';
|
package/dist/prisma/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { buildContextWhereClause, buildContextWhereConditions, checkDatabaseHealth, contextMatches, createContextFromSDK, createDatabaseClient, createDatabaseClientFromEnv, extractFieldsFromModel, getAllModelNames, getDatabaseManager, getDatabaseProductName, getDatabaseStats, getDatabaseVersion, getDb, getModelFields, hasModel, initializeDatabase, initializeDatabaseWithConfig, isDatabaseInitialized, loadGeneratedFields, mergeContext, parseContext, resetDatabaseManager, resolvePoolTuningFromEnv, testConnection, toContextJson } from '../chunk-
|
|
2
|
-
export { addWorkspaceExtension, buildTransactionContextStatement, defaultWorkspaceExtensionConfig, getCallerTransaction, getWorkspaceContext, injectCreateFields, injectWhereWorkspaceId, maybeSetRlsGuc, maybeTagConnection, resetCallerTransactionStateForTests, runOperationInCallerTransaction, runOperationWithRlsGuc, setWorkspaceContext, withWorkspaceContext, withWorkspaceContextSync } from '../chunk-
|
|
1
|
+
export { buildContextWhereClause, buildContextWhereConditions, checkDatabaseHealth, contextMatches, createContextFromSDK, createDatabaseClient, createDatabaseClientFromEnv, extractFieldsFromModel, getAllModelNames, getDatabaseManager, getDatabaseProductName, getDatabaseStats, getDatabaseVersion, getDb, getModelFields, hasModel, initializeDatabase, initializeDatabaseWithConfig, isDatabaseInitialized, loadGeneratedFields, mergeContext, parseContext, resetDatabaseManager, resolvePoolTuningFromEnv, testConnection, toContextJson } from '../chunk-QCOC2SF3.js';
|
|
2
|
+
export { addWorkspaceExtension, buildTransactionContextStatement, defaultWorkspaceExtensionConfig, getCallerTransaction, getScopedWorkspaceContext, getWorkspaceContext, injectCreateFields, injectWhereWorkspaceId, maybeSetRlsGuc, maybeTagConnection, resetCallerTransactionStateForTests, runOperationInCallerTransaction, runOperationWithRlsGuc, setWorkspaceContext, withWorkspaceContext, withWorkspaceContextSync } from '../chunk-E4QNLVY4.js';
|
|
3
3
|
import '../chunk-OBBCR6WY.js';
|
|
4
4
|
export { PrismaClientWrapper, configurePrismaLogging, createConnectionPool, createPrismaAdapter, createPrismaClient, ensureServiceApplicationName, installAcquireRetry, isTransientAcquireError } from '../chunk-K52ICDCP.js';
|
|
5
5
|
import '../chunk-TX2GDIWP.js';
|
package/dist/rbac/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as BurdenoffGraphQLClient } from '../graphql-
|
|
2
|
-
import { a as SDKContext } from '../index-
|
|
1
|
+
import { B as BurdenoffGraphQLClient } from '../graphql-BUbw43Zx.js';
|
|
2
|
+
import { a as SDKContext } from '../index-CV3r9Taj.js';
|
|
3
3
|
import { Plugin } from '@envelop/core';
|
|
4
|
-
import { S as ServiceLayer } from '../layer-
|
|
4
|
+
import { S as ServiceLayer } from '../layer-Cv9vSwBx.js';
|
|
5
5
|
import 'graphql-request';
|
|
6
6
|
|
|
7
7
|
type ActorType = 'USER' | 'BOT' | 'INTEGRATION' | 'DELEGATED_AGENT';
|
package/dist/rbac/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { RBACClient, RBACModule, createRBACClientFromEnv, createRBACDirective, createRBACDirectiveForLayer, createRBACDirectiveFromEnv } from '../chunk-
|
|
1
|
+
export { RBACClient, RBACModule, createRBACClientFromEnv, createRBACDirective, createRBACDirectiveForLayer, createRBACDirectiveFromEnv } from '../chunk-PQGMZH6K.js';
|
|
2
2
|
import '../chunk-QGBXVNRM.js';
|
|
3
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-5CAFHK2Z.js';
|
|
4
4
|
import '../chunk-RU266375.js';
|
|
5
5
|
import '../chunk-XE4OXN2W.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { GraphQLError } from 'graphql';
|
|
2
|
-
import { B as BurdenoffGraphQLClient } from '../graphql-
|
|
2
|
+
import { B as BurdenoffGraphQLClient } from '../graphql-BUbw43Zx.js';
|
|
3
3
|
import 'graphql-request';
|
|
4
|
-
import '../index-
|
|
5
|
-
import '../layer-
|
|
4
|
+
import '../index-CV3r9Taj.js';
|
|
5
|
+
import '../layer-Cv9vSwBx.js';
|
|
6
6
|
|
|
7
7
|
type ResourceName = 'workspace' | 'workspaceMember' | 'sandbox' | 'vibe' | 'agent' | 'conversation' | 'message' | 'tag' | 'file' | 'group' | 'calendar' | 'scheduledTask' | 'form' | 'apiKey' | 'webhook';
|
|
8
8
|
type PlanTier = 'free' | 'paid';
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { W as WorkspaceSecret, I as IActor, J as JWTPayload, S as ServerDefinition, a as ServerInstance, R as RESTEndpoint, b as ITenant, G as GraphQLContext, Y as YogaPlugin } from '../types-
|
|
2
|
-
export { A as ActorProvenance, C as ConsentContext, E as ElysiaApp, c as IContextFilterInput, d as IOperationContext, e as IOrganization, f as IProduct, g as IProject, h as ITracking, i as IWorkspace, M as ModuleGraphConfig, P as PrismaClientConstructor, j as ServerConfig, k as ServerI18nConfig, l as ServerInfo,
|
|
1
|
+
import { W as WorkspaceSecret, I as IActor, J as JWTPayload, S as ServerDefinition, a as ServerInstance, R as RESTEndpoint, b as ITenant, G as GraphQLContext, V as VerifiedDelegationContext, Y as YogaPlugin } from '../types-DLFCJD3D.js';
|
|
2
|
+
export { A as ActorProvenance, C as ConsentContext, E as ElysiaApp, c as IContextFilterInput, d as IOperationContext, e as IOrganization, f as IProduct, g as IProject, h as ITracking, i as IWorkspace, M as ModuleGraphConfig, P as PrismaClientConstructor, j as ServerConfig, k as ServerI18nConfig, l as ServerInfo, m as WspaceGraphQLContext } from '../types-DLFCJD3D.js';
|
|
3
3
|
import * as jose from 'jose';
|
|
4
4
|
import { VerifyOptions } from 'jsonwebtoken';
|
|
5
5
|
import { I as I18n } from '../i18n-DrdPTann.js';
|
|
6
|
+
export { c as ACTOR_ORIGIN_HEADER, a as AI_ASSISTANT_ACTOR_ORIGIN, d as ASSISTANT_CORRELATION_ID_HEADER, e as ASSISTANT_SESSION_ID_HEADER, b as ActorOrigin, A as AssistantSessionAttribution, p as parseAssistantSessionHeaders, r as readAssistantSessionAttribution, t as toAssistantSessionAttribution } from '../assistant-session-CJZhF4D6.js';
|
|
6
7
|
import { DocumentNode, GraphQLError } from 'graphql';
|
|
7
8
|
import { Plugin } from 'graphql-yoga';
|
|
8
9
|
export { s as suppressMutationAudit } from '../explicit-activity-scope-CCoxVwAr.js';
|
|
9
10
|
export { I as I18nContext, L as LocaleCode } from '../types-C8TbSdEj.js';
|
|
10
11
|
export { P as PrismaClientBase } from '../client-CCXpAZ2r.js';
|
|
11
|
-
import '../workspace-extension-
|
|
12
|
+
import '../workspace-extension-BGwTOV_r.js';
|
|
12
13
|
import '@prisma/adapter-pg';
|
|
13
14
|
import 'pg';
|
|
14
15
|
|
|
@@ -90,6 +91,22 @@ declare function configureContext(options: ContextBuilderOptions): void;
|
|
|
90
91
|
declare function buildContext(request: Request): Promise<GraphQLContext>;
|
|
91
92
|
declare function getContextOptions(): ContextBuilderOptions | null;
|
|
92
93
|
|
|
94
|
+
declare function resolveOnBehalfOf(actor: IActor | null, verifiedDelegation: VerifiedDelegationContext | undefined): string | undefined;
|
|
95
|
+
interface DelegatedPrincipal {
|
|
96
|
+
agentAppId: string;
|
|
97
|
+
onBehalfOfUserId: string;
|
|
98
|
+
delegationId: string;
|
|
99
|
+
scopes: readonly string[];
|
|
100
|
+
allowedWorkspaceIds: readonly string[];
|
|
101
|
+
grantedBy: string | null;
|
|
102
|
+
grantExpiresAt: Date | null;
|
|
103
|
+
tokenExpiresAt: Date;
|
|
104
|
+
}
|
|
105
|
+
declare function getDelegatedPrincipal(context: {
|
|
106
|
+
actor: IActor | null;
|
|
107
|
+
verifiedDelegation?: VerifiedDelegationContext;
|
|
108
|
+
}): DelegatedPrincipal | null;
|
|
109
|
+
|
|
93
110
|
interface WorkspaceGuardConfig {
|
|
94
111
|
enabled?: boolean;
|
|
95
112
|
whitelistedOperations?: string[];
|
|
@@ -214,4 +231,4 @@ declare function createHumanReadableErrorPlugin(options?: ErrorNormalizationOpti
|
|
|
214
231
|
declare function formatHttpError(error: unknown, options?: ErrorNormalizationOptions): HttpErrorResult;
|
|
215
232
|
declare function createHttpErrorResponse(error: unknown, options?: ErrorNormalizationOptions): Response;
|
|
216
233
|
|
|
217
|
-
export { type AuthConfig, type ContextBuilderOptions, type ErrorNormalizationOptions, type FetchWorkspaceSecretFn, GraphQLContext, type HttpErrorPayload, type HttpErrorResult, IActor, ITenant, JWTPayload, MAX_IDLE_TIMEOUT_SECONDS, MUTATION_AUDIT_ACTIVITY_TYPE, MUTATION_AUDIT_RESOURCE_TYPE, type MutationAuditPluginOptions, type NormalizedErrorState, type OrdinaryRoute, RESTEndpoint, type RawBodyResolution, type RawBodyRouter, ServerDefinition, ServerInstance, type UserFacingErrorOptions, UserFacingGraphQLError, type WorkspaceGuardConfig, WorkspaceSecret, YogaPlugin, authCheck, buildContext, configureAuth, configureContext, configureDefaultAuth, configureServerAuth, createHttpErrorResponse, createHumanReadableErrorPlugin, createMutationAuditPlugin, createRawBodyRouter, createServer, createWorkspaceGuardPlugin, decodeJWT, extendRequestIdleTimeout, fetchWorkspaceSecret, formatHttpError, generateSymmetricSecret, getContextOptions, getMutationFieldNames, normalizeError, normalizeExecutionResultErrors, normalizeGraphQLResponse, normalizeGraphQLResponsePayload, orgCheck, requireWorkspace, sanitizeAuditValue, tenantCheck, toUserFacingGraphQLError, verifyJWT, workspaceCheck };
|
|
234
|
+
export { type AuthConfig, type ContextBuilderOptions, type DelegatedPrincipal, type ErrorNormalizationOptions, type FetchWorkspaceSecretFn, GraphQLContext, type HttpErrorPayload, type HttpErrorResult, IActor, ITenant, JWTPayload, MAX_IDLE_TIMEOUT_SECONDS, MUTATION_AUDIT_ACTIVITY_TYPE, MUTATION_AUDIT_RESOURCE_TYPE, type MutationAuditPluginOptions, type NormalizedErrorState, type OrdinaryRoute, RESTEndpoint, type RawBodyResolution, type RawBodyRouter, ServerDefinition, ServerInstance, type UserFacingErrorOptions, UserFacingGraphQLError, VerifiedDelegationContext, type WorkspaceGuardConfig, WorkspaceSecret, YogaPlugin, authCheck, buildContext, configureAuth, configureContext, configureDefaultAuth, configureServerAuth, createHttpErrorResponse, createHumanReadableErrorPlugin, createMutationAuditPlugin, createRawBodyRouter, createServer, createWorkspaceGuardPlugin, decodeJWT, extendRequestIdleTimeout, fetchWorkspaceSecret, formatHttpError, generateSymmetricSecret, getContextOptions, getDelegatedPrincipal, getMutationFieldNames, normalizeError, normalizeExecutionResultErrors, normalizeGraphQLResponse, normalizeGraphQLResponsePayload, orgCheck, requireWorkspace, resolveOnBehalfOf, sanitizeAuditValue, tenantCheck, toUserFacingGraphQLError, verifyJWT, workspaceCheck };
|
package/dist/server/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createHumanReadableErrorPlugin, formatHttpError, normalizeGraphQLResponse, createHttpErrorResponse } from '../chunk-6GL4SLU7.js';
|
|
2
2
|
export { UserFacingGraphQLError, createHttpErrorResponse, createHumanReadableErrorPlugin, createWorkspaceGuardPlugin, formatHttpError, normalizeError, normalizeExecutionResultErrors, normalizeGraphQLResponse, normalizeGraphQLResponsePayload, toUserFacingGraphQLError } from '../chunk-6GL4SLU7.js';
|
|
3
3
|
import { getWorkspaceQuotaRegistry } from '../chunk-WTEHAVBX.js';
|
|
4
|
-
import { trackOperation, createExplicitActivityScope, runInExplicitActivityScope } from '../chunk-
|
|
5
|
-
export { suppressMutationAudit } from '../chunk-
|
|
6
|
-
import { setWorkspaceContext, withWorkspaceContext } from '../chunk-
|
|
4
|
+
import { parseAssistantSessionHeaders, readAssistantSessionAttribution, trackOperation, createExplicitActivityScope, runInExplicitActivityScope } from '../chunk-W5Q6JJWA.js';
|
|
5
|
+
export { ACTOR_ORIGIN_HEADER, AI_ASSISTANT_ACTOR_ORIGIN, ASSISTANT_CORRELATION_ID_HEADER, ASSISTANT_SESSION_ID_HEADER, parseAssistantSessionHeaders, readAssistantSessionAttribution, suppressMutationAudit, toAssistantSessionAttribution } from '../chunk-W5Q6JJWA.js';
|
|
6
|
+
import { setWorkspaceContext, withWorkspaceContext } from '../chunk-E4QNLVY4.js';
|
|
7
7
|
import { I18n } from '../chunk-EBDHIL7V.js';
|
|
8
8
|
import { getMetricsRegistry } from '../chunk-AWPNRV3L.js';
|
|
9
9
|
import { ContextManager } from '../chunk-RZOFS2BQ.js';
|
|
@@ -12,6 +12,32 @@ import { __name } from '../chunk-XE4OXN2W.js';
|
|
|
12
12
|
import crypto from 'crypto';
|
|
13
13
|
import { Kind, OperationTypeNode } from 'graphql';
|
|
14
14
|
|
|
15
|
+
// src/server/delegated-identity.ts
|
|
16
|
+
function resolveOnBehalfOf(actor, verifiedDelegation) {
|
|
17
|
+
if (verifiedDelegation && actor && verifiedDelegation.representedUserId === actor.id) {
|
|
18
|
+
return verifiedDelegation.representedUserId;
|
|
19
|
+
}
|
|
20
|
+
return actor?.id;
|
|
21
|
+
}
|
|
22
|
+
__name(resolveOnBehalfOf, "resolveOnBehalfOf");
|
|
23
|
+
function getDelegatedPrincipal(context) {
|
|
24
|
+
const delegation = context.verifiedDelegation;
|
|
25
|
+
if (!delegation || !context.actor || delegation.representedUserId !== context.actor.id) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
agentAppId: delegation.originatingAppId,
|
|
30
|
+
onBehalfOfUserId: delegation.representedUserId,
|
|
31
|
+
delegationId: delegation.delegationId,
|
|
32
|
+
scopes: delegation.scopes,
|
|
33
|
+
allowedWorkspaceIds: delegation.allowedWorkspaceIds,
|
|
34
|
+
grantedBy: delegation.consent?.grantedBy ?? null,
|
|
35
|
+
grantExpiresAt: delegation.consent?.expiresAt ?? null,
|
|
36
|
+
tokenExpiresAt: delegation.tokenExpiresAt
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
__name(getDelegatedPrincipal, "getDelegatedPrincipal");
|
|
40
|
+
|
|
15
41
|
// src/server/auth.ts
|
|
16
42
|
var getDbFn = null;
|
|
17
43
|
async function getDb() {
|
|
@@ -409,22 +435,6 @@ function extractGeography(request) {
|
|
|
409
435
|
};
|
|
410
436
|
}
|
|
411
437
|
__name(extractGeography, "extractGeography");
|
|
412
|
-
function extractConsentContext(request) {
|
|
413
|
-
const grantedBy = getHeader(request, "x-consent-granted-by");
|
|
414
|
-
if (!grantedBy) {
|
|
415
|
-
return null;
|
|
416
|
-
}
|
|
417
|
-
const scopesHeader = getHeader(request, "x-consent-scope");
|
|
418
|
-
const grantedAtHeader = getHeader(request, "x-consent-granted-at");
|
|
419
|
-
const expiresAtHeader = getHeader(request, "x-consent-expires-at");
|
|
420
|
-
return {
|
|
421
|
-
grantedBy,
|
|
422
|
-
scopes: scopesHeader ? scopesHeader.split(",").map((s) => s.trim()) : void 0,
|
|
423
|
-
grantedAt: grantedAtHeader ? new Date(grantedAtHeader) : void 0,
|
|
424
|
-
expiresAt: expiresAtHeader ? new Date(expiresAtHeader) : void 0
|
|
425
|
-
};
|
|
426
|
-
}
|
|
427
|
-
__name(extractConsentContext, "extractConsentContext");
|
|
428
438
|
async function buildContext(request) {
|
|
429
439
|
if (!contextOptions) {
|
|
430
440
|
throw new Error("[ServerContext] Context not configured - call configureContext() first");
|
|
@@ -436,8 +446,9 @@ async function buildContext(request) {
|
|
|
436
446
|
const project = extractProject(request);
|
|
437
447
|
const product = extractProduct(request);
|
|
438
448
|
const tracking = extractTracking(request);
|
|
439
|
-
const
|
|
440
|
-
const verifiedDelegation = decodeVerifiedDelegation(getHeader(request, "x-verified-delegation"), actor, workspace?.id,
|
|
449
|
+
const trustedGatewayHeaders = shouldTrustActorHeaders(request);
|
|
450
|
+
const verifiedDelegation = decodeVerifiedDelegation(getHeader(request, "x-verified-delegation"), actor, workspace?.id, trustedGatewayHeaders);
|
|
451
|
+
const assistantSession = actor && trustedGatewayHeaders ? parseAssistantSessionHeaders((name) => getHeader(request, name)) : void 0;
|
|
441
452
|
let i18n;
|
|
442
453
|
if (contextOptions.i18n) {
|
|
443
454
|
i18n = contextOptions.i18n.createContextFromRequest(request);
|
|
@@ -464,7 +475,7 @@ async function buildContext(request) {
|
|
|
464
475
|
};
|
|
465
476
|
}
|
|
466
477
|
}
|
|
467
|
-
const onBehalfOf = (actor
|
|
478
|
+
const onBehalfOf = resolveOnBehalfOf(actor, verifiedDelegation);
|
|
468
479
|
const wsCtxPayload = {
|
|
469
480
|
workspaceId: workspace?.id,
|
|
470
481
|
tenantId: tenant?.id,
|
|
@@ -472,7 +483,10 @@ async function buildContext(request) {
|
|
|
472
483
|
actorType: actor?.type,
|
|
473
484
|
organizationId: organization?.id,
|
|
474
485
|
projectId: project?.id,
|
|
475
|
-
onBehalfOf
|
|
486
|
+
onBehalfOf,
|
|
487
|
+
...assistantSession ? {
|
|
488
|
+
assistantSession
|
|
489
|
+
} : {}
|
|
476
490
|
};
|
|
477
491
|
logger.debug("[ServerContext] Setting workspace context", {
|
|
478
492
|
workspaceId: wsCtxPayload.workspaceId ?? "NONE",
|
|
@@ -490,8 +504,10 @@ async function buildContext(request) {
|
|
|
490
504
|
project,
|
|
491
505
|
product,
|
|
492
506
|
tracking,
|
|
493
|
-
consentContext: consentContext || void 0,
|
|
494
507
|
verifiedDelegation,
|
|
508
|
+
...assistantSession ? {
|
|
509
|
+
assistantSession
|
|
510
|
+
} : {},
|
|
495
511
|
onBehalfOf: onBehalfOf || actor?.id || "",
|
|
496
512
|
db: contextOptions.getDb(),
|
|
497
513
|
i18n,
|
|
@@ -519,7 +535,11 @@ function id(value) {
|
|
|
519
535
|
__name(id, "id");
|
|
520
536
|
function executionContext(value) {
|
|
521
537
|
if (!record(value)) return {};
|
|
538
|
+
const assistantSession = readAssistantSessionAttribution(value["assistantSession"]);
|
|
522
539
|
return {
|
|
540
|
+
...assistantSession ? {
|
|
541
|
+
assistantSession
|
|
542
|
+
} : {},
|
|
523
543
|
workspaceId: id(value["workspace"]),
|
|
524
544
|
tenantId: id(value["tenant"]),
|
|
525
545
|
organizationId: id(value["organization"]),
|
|
@@ -1608,6 +1628,6 @@ function createMutationAuditPlugin(options) {
|
|
|
1608
1628
|
}
|
|
1609
1629
|
__name(createMutationAuditPlugin, "createMutationAuditPlugin");
|
|
1610
1630
|
|
|
1611
|
-
export { MAX_IDLE_TIMEOUT_SECONDS, MUTATION_AUDIT_ACTIVITY_TYPE, MUTATION_AUDIT_RESOURCE_TYPE, authCheck, buildContext, configureAuth, configureContext, configureDefaultAuth, configureServerAuth, createMutationAuditPlugin, createRawBodyRouter, createServer, decodeJWT, extendRequestIdleTimeout, fetchWorkspaceSecret, generateSymmetricSecret, getContextOptions, getMutationFieldNames, orgCheck, requireWorkspace, sanitizeAuditValue, tenantCheck, verifyJWT, workspaceCheck };
|
|
1631
|
+
export { MAX_IDLE_TIMEOUT_SECONDS, MUTATION_AUDIT_ACTIVITY_TYPE, MUTATION_AUDIT_RESOURCE_TYPE, authCheck, buildContext, configureAuth, configureContext, configureDefaultAuth, configureServerAuth, createMutationAuditPlugin, createRawBodyRouter, createServer, decodeJWT, extendRequestIdleTimeout, fetchWorkspaceSecret, generateSymmetricSecret, getContextOptions, getDelegatedPrincipal, getMutationFieldNames, orgCheck, requireWorkspace, resolveOnBehalfOf, sanitizeAuditValue, tenantCheck, verifyJWT, workspaceCheck };
|
|
1612
1632
|
//# sourceMappingURL=index.js.map
|
|
1613
1633
|
//# sourceMappingURL=index.js.map
|