@opengeni/db 4.2.2 → 4.3.0-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-6GAPAYZR.js → chunk-7JPLGBSA.js} +562 -86
- package/dist/chunk-7JPLGBSA.js.map +1 -0
- package/dist/{chunk-SNLIKELL.js → chunk-IHADTE7C.js} +2 -2
- package/dist/{chunk-7WX3R3YL.js → chunk-ILKJKDII.js} +7 -2
- package/dist/chunk-ILKJKDII.js.map +1 -0
- package/dist/{chunk-MGVOYVPS.js → chunk-NCSPNCQK.js} +3 -3
- package/dist/{chunk-B2KR3TEM.js → chunk-SGJDIF2D.js} +2 -2
- package/dist/{chunk-S4Y42VSX.js → chunk-Y5XFVJJM.js} +207 -3
- package/dist/chunk-Y5XFVJJM.js.map +1 -0
- package/dist/{chunk-FPTI4NP4.js → chunk-YGBOVXC7.js} +2 -2
- package/dist/{chunk-6Y7ZDVJ5.js → chunk-YGRT6VZO.js} +2 -2
- 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 +51 -35
- package/dist/index.js +15171 -13775
- 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 +398 -147
- 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 +228 -3
- 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-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-IHADTE7C.js.map} +0 -0
- /package/dist/{chunk-MGVOYVPS.js.map → chunk-NCSPNCQK.js.map} +0 -0
- /package/dist/{chunk-B2KR3TEM.js.map → chunk-SGJDIF2D.js.map} +0 -0
- /package/dist/{chunk-FPTI4NP4.js.map → chunk-YGBOVXC7.js.map} +0 -0
- /package/dist/{chunk-6Y7ZDVJ5.js.map → chunk-YGRT6VZO.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -4,8 +4,16 @@ export * from "./model-connection-access.js";
|
|
|
4
4
|
import { type BundledSkillId } from "@opengeni/contracts";
|
|
5
5
|
import { type SkillSourceReleaseReceipt } from "./skill-source-release.js";
|
|
6
6
|
import type { SkillActor, SkillWriteReceipt } from "@opengeni/contracts";
|
|
7
|
+
import { type HostMcpCreateSelection } from "./host-selection-identity.js";
|
|
8
|
+
export * from "./connect-attempts.js";
|
|
9
|
+
export * from "./external-identities.js";
|
|
10
|
+
export * from "./external-identity-links.js";
|
|
11
|
+
export * from "./connection-setup-authority.js";
|
|
12
|
+
export * from "./external-link-work.js";
|
|
13
|
+
export * from "./host-mcp-bindings.js";
|
|
14
|
+
export * from "./host-mcp-task-authority.js";
|
|
7
15
|
import { type ChildLifecycleSystemUpdateKind, type ChildRequiresActionRespondedByKind, SessionGoalSnapshot } from "@opengeni/contracts";
|
|
8
|
-
import type { AccessContext, AccessGrant, AccessPrincipalKind, ApiKey, AttemptToolResult, BillingBalance, CapabilityCatalogItem, CapabilityInstallation, CapabilityPack, CapabilitySource, ConnectionKind, ConnectionMetadata, ConnectionStatus, DocumentAuthorityKind, McpServerConnectionRef, FileAsset, FileUploadStatus, FirstPartyMcpToolName, HumanInputQuestion, HumanInputResponse, KnowledgeMemory, KnowledgeMemoryKind, KnowledgeMemoryStatus, KnowledgeSourceRef, GitHubInstallationAuthorityKind, GitHubRepositoryScope, HostEventExportBatch, HostUsageExportBatch, ManagedAccount, ManagedOrganizationMembershipProjection, WorkspaceMemberCandidate, McpPersonalConnectionDelegation, ModelContextContributionSummary, Permission, PersonalResourceAttachmentIntent, PackInstallation, PackInstallationStatus, ResourceRef, SandboxBackend, SandboxOs, ScheduledTask, ScheduledTaskAction, ScheduledTaskActionKind, KnowledgeSourceSyncAction, ScheduledTaskAgentConfig, ScheduledTaskOverlapPolicy, ScheduledTaskRun, ScheduledTaskRunAcceptedExecution as ScheduledTaskRunAcceptedExecutionType, ScheduledTaskRunMode, ScheduledTaskRunStatus, ScheduledTaskScheduleSpec, ScheduledTaskStatus, ScheduledTaskTriggerType, SlackInstallationBinding, Session, SessionAgentAccess, SessionAgentAccessViewer, SessionAuthorizationListScope,
|
|
16
|
+
import type { AccessContext, AccessGrant, AccessPrincipalKind, ApiKey, AttemptToolResult, BillingBalance, CapabilityCatalogItem, CapabilityInstallation, CapabilityPack, CapabilitySource, ConnectionKind, ConnectionMetadata, ConnectionStatus, DocumentAuthorityKind, McpServerConnectionRef, FileAsset, FileUploadStatus, FirstPartyMcpToolName, HumanInputQuestion, HumanInputResponse, KnowledgeMemory, KnowledgeMemoryKind, KnowledgeMemoryStatus, KnowledgeSourceRef, GitHubInstallationAuthorityKind, GitHubRepositoryScope, HostEventExportBatch, HostUsageExportBatch, ManagedAccount, ManagedOrganizationMembershipProjection, WorkspaceMemberCandidate, McpPersonalConnectionDelegation, ModelContextContributionSummary, Permission, PersonalResourceAttachmentIntent, PackInstallation, PackInstallationStatus, ResourceRef, SandboxBackend, SandboxOs, ScheduledTask, ScheduledTaskAction, ScheduledTaskActionKind, KnowledgeSourceSyncAction, ScheduledTaskAgentConfig, ScheduledTaskOverlapPolicy, ScheduledTaskRun, ScheduledTaskRunAcceptedExecution as ScheduledTaskRunAcceptedExecutionType, ScheduledTaskRunMode, ScheduledTaskRunStatus, ScheduledTaskScheduleSpec, ScheduledTaskStatus, ScheduledTaskTriggerType, SlackInstallationBinding, Session, SessionAgentAccess, SessionAgentAccessViewer, SessionAuthorizationListScope, SessionScopeSubjectId, SessionMemoryScope, SessionListResponse, SessionEvent, SessionEventPayloadMode, SessionEventReadDirection, SessionEventSemanticClass, SessionEventType, SessionGoal, SessionGoalChangeKind, SessionGoalCreatedBy, SessionGoalMutationPolicy, SessionGoalRevision, SessionGoalStatus, SessionHumanInputRequest, LineageNode, SessionMcpApprovalPolicy, SessionBackgroundCommand, SessionSkill, SessionMcpServerMetadata, SessionStatus, SessionToolPolicy, SessionTurn, SessionQueueSnapshot, SessionSystemUpdate, SessionSystemUpdateKind, SystemUpdateClassification, SessionTurnSource, SessionTurnStatus, TurnInitiator, TurnInitiatorContext, SocialConnection, SocialConnectionStatus, SocialPost, SocialProvider, ToolRef, ReasoningEffort, UsageEvent, Workspace, WorkspaceControlEvent, VariableSet, VariableSetSecret, VariableSetVariableMetadata, WorkspaceMember, WorkspaceMemoryPromptMode, WorkspaceRegisteredPack, Channel, Rig, RigProviderImage, RigProviderImages, RigVersion, RigVerificationHealth, RigChange, RigChangeKind, RigChangeStatus, RigCheck, NativeSnapshotDescriptor, TarWorkspaceArchiveDescriptor, WorkspaceArchiveDescriptor, ModalCheckpointProviderBinding, SandboxProviderContinuityRecovery, WorkClaimSubjectFilter, WorkDiscoveryProjection } from "@opengeni/contracts";
|
|
9
17
|
import { type WorkspaceArchiveObjectRef, RequestHumanInteractionToolInput, XaiProviderAccountAuthoritySnapshotV1, type TimelineAnnotation } from "@opengeni/contracts";
|
|
10
18
|
import { type LatencyMode, SessionSystemUpdatePayload, TurnExecutionPolicyV1, CodexCredentialPolicySnapshotV1 } from "@opengeni/contracts";
|
|
11
19
|
import { type Settings } from "@opengeni/config";
|
|
@@ -84,6 +92,7 @@ export * from "./model-catalog.js";
|
|
|
84
92
|
import { type Database, type SessionActivityDatabase } from "./database.js";
|
|
85
93
|
export { createDb, registerDbBinding, retrySessionActivityRls, rlsContextForWorkspace, rlsStrategyFor, setRlsContext, setSubjectRlsContext, withAccountRls, withDatabaseStatementTimeout, withRlsContext, withSessionActivityRlsContext, withSessionActivitySavepoint, withWorkspaceRls, withWorkspaceSessionActivityRls, withWorkspaceSubjectRls, withWorkspaceSubjectSessionActivityRls, withWorkspaceUsageLock, withSandboxProviderReadLock, SandboxProviderReadLockUnavailableError, type CreateDbOptions, type Database, type DbClient, type SessionActivityDatabase, type RlsContext, type SessionRlsActorContext, type RlsStrategy, type SandboxProviderReadLockIdentity, type ManagedUserProfile, type UserLookup, type UserProfileLookup, } from "./database.js";
|
|
86
94
|
export { withSessionRlsActorContext } from "./database.js";
|
|
95
|
+
export { normalizedHostCredentialHeaders } from "./connection-token-resolver.js";
|
|
87
96
|
import { buildCodexTokenResolver as buildCodexTokenResolverCore, fetchCodexRateLimitResetCreditsForAccount as fetchCodexRateLimitResetCreditsForAccountCore, fetchCodexUsageForAccount as fetchCodexUsageForAccountCore, type CodexAccountUsageSnapshot, type CodexAuthDeps, type CodexCredentialCooldownKind, type CodexCredentialForRun } from "./codex-token-resolver.js";
|
|
88
97
|
import { buildConnectionTokenResolver as buildConnectionTokenResolverCore, type ConnectionBrokerDeps, type ConnectionCredentialForBroker, type ConnectionTokenResolverOptions } from "./connection-token-resolver.js";
|
|
89
98
|
/** Raised when a durable session tool-policy write lost its version fence. */
|
|
@@ -348,6 +357,7 @@ export declare class WorkspaceExternalIdentityConflictError extends Error {
|
|
|
348
357
|
constructor();
|
|
349
358
|
}
|
|
350
359
|
export declare function findWorkspaceByExternalIdentity(db: Database, input: {
|
|
360
|
+
accountId: string;
|
|
351
361
|
externalSource: string;
|
|
352
362
|
externalId: string;
|
|
353
363
|
}): Promise<Workspace | null>;
|
|
@@ -357,7 +367,7 @@ export declare class WorkspaceLimitExceededError extends Error {
|
|
|
357
367
|
}
|
|
358
368
|
/**
|
|
359
369
|
* Create an organization workspace exactly once for a stable external tenant
|
|
360
|
-
* identity. The
|
|
370
|
+
* identity. The organization-scoped unique index is the concurrency arbiter. A replay never
|
|
361
371
|
* mutates presentation fields supplied by the original create.
|
|
362
372
|
*/
|
|
363
373
|
export declare function ensureWorkspaceByExternalIdentity(db: Database, input: {
|
|
@@ -858,10 +868,7 @@ export type AppendEventInput = {
|
|
|
858
868
|
*/
|
|
859
869
|
export type ScheduledTaskCreatorSessionPolicy = {
|
|
860
870
|
agentAccess: string | null;
|
|
861
|
-
|
|
862
|
-
source: string;
|
|
863
|
-
id: string;
|
|
864
|
-
} | null;
|
|
871
|
+
scopeSubjectId: string | null;
|
|
865
872
|
memoryScope: string | null;
|
|
866
873
|
};
|
|
867
874
|
/**
|
|
@@ -901,6 +908,8 @@ export type CreateScheduledTaskInput = {
|
|
|
901
908
|
metadata: Record<string, unknown>;
|
|
902
909
|
/** Trusted database-only admission seam. Throwing rolls the task creation back. */
|
|
903
910
|
beforeCreateCommit?: (tx: Database) => Promise<void>;
|
|
911
|
+
captureHostAuthority?: (tx: Database, task: ScheduledTask) => Promise<void>;
|
|
912
|
+
captureLinkAuthority?: (tx: Database, task: ScheduledTask) => Promise<void>;
|
|
904
913
|
};
|
|
905
914
|
export type UpdateScheduledTaskInput = Partial<{
|
|
906
915
|
name: string;
|
|
@@ -924,6 +933,8 @@ export type UpdateScheduledTaskInput = Partial<{
|
|
|
924
933
|
authorityUpdatedByActor: AgentSessionCreationActor | null;
|
|
925
934
|
/** Trusted database-only admission seam. Throwing rolls the task update back. */
|
|
926
935
|
beforeUpdateCommit: (tx: Database) => Promise<void>;
|
|
936
|
+
captureHostAuthority: (tx: Database, task: ScheduledTask) => Promise<void>;
|
|
937
|
+
captureLinkAuthority: (tx: Database, task: ScheduledTask) => Promise<void>;
|
|
927
938
|
}>;
|
|
928
939
|
export type CreatePackInstallationInput = {
|
|
929
940
|
accountId: string;
|
|
@@ -1000,6 +1011,10 @@ export type CreateSocialConnectionInput = {
|
|
|
1000
1011
|
metadata?: Record<string, unknown>;
|
|
1001
1012
|
};
|
|
1002
1013
|
export type UpsertSocialOAuthConnectionInput = {
|
|
1014
|
+
expectedConnection?: {
|
|
1015
|
+
id: string;
|
|
1016
|
+
version: number;
|
|
1017
|
+
};
|
|
1003
1018
|
accountId: string;
|
|
1004
1019
|
workspaceId: string;
|
|
1005
1020
|
subjectId?: string | null;
|
|
@@ -1103,6 +1118,8 @@ export type UpdateConnectionInput = {
|
|
|
1103
1118
|
updatedBySubjectId?: string | null;
|
|
1104
1119
|
};
|
|
1105
1120
|
export type PersistProviderOAuthConnectionInput = CreateConnectionInput & {
|
|
1121
|
+
/** Server continuation reauthorization; runs inside the credential transaction. */
|
|
1122
|
+
authorize?: (tx: Database) => Promise<void>;
|
|
1106
1123
|
visibleToSubjectId: string;
|
|
1107
1124
|
credentialRole: string;
|
|
1108
1125
|
providerFamily: string;
|
|
@@ -2977,16 +2994,7 @@ export declare function getScheduledTaskRevisionAuthoritySubject(db: Database, i
|
|
|
2977
2994
|
taskId: string;
|
|
2978
2995
|
taskAuthorityRevision: number;
|
|
2979
2996
|
}): Promise<string | null>;
|
|
2980
|
-
export
|
|
2981
|
-
accountId: string;
|
|
2982
|
-
workspaceId: string;
|
|
2983
|
-
taskId: string;
|
|
2984
|
-
taskAuthorityRevision: number;
|
|
2985
|
-
}): Promise<{
|
|
2986
|
-
subjectId: string;
|
|
2987
|
-
organizationMembershipId: string;
|
|
2988
|
-
membershipAuthorizationRevision: number;
|
|
2989
|
-
} | null>;
|
|
2997
|
+
export { getScheduledTaskRevisionAuthority } from "./scheduled-task-revision-authority.js";
|
|
2990
2998
|
/** Failure settlement must not rewrite a source already committed as dispatched. */
|
|
2991
2999
|
export declare function markScheduledTaskRunFailedIfQueued(db: Database, workspaceId: string, runId: string, error: string): Promise<void>;
|
|
2992
3000
|
export type FailScheduledGeneratedSessionRouteResult = {
|
|
@@ -5097,13 +5105,15 @@ export type SessionCreateInput = {
|
|
|
5097
5105
|
/** Agent-to-agent reach (migration 0427); omitted means the workspace default. */
|
|
5098
5106
|
agentAccess?: SessionAgentAccess;
|
|
5099
5107
|
/** Opaque end-user label; omitted or null means none. */
|
|
5100
|
-
|
|
5108
|
+
scopeSubjectId?: SessionScopeSubjectId | null;
|
|
5101
5109
|
/** Typed Memory selector (migration 0427); omitted means the workspace layer. */
|
|
5102
5110
|
memoryScope?: SessionMemoryScope;
|
|
5103
5111
|
parentSessionId?: string | null;
|
|
5104
5112
|
createIdempotencyKey?: string | null;
|
|
5105
5113
|
/** Exact explicit installed-Skill selection used for keyed-create replay. */
|
|
5106
5114
|
selectedInstalledSkillIds?: string[];
|
|
5115
|
+
/** Backend-only replay identity; does not admit host credential authority. */
|
|
5116
|
+
selectedHostMcpDelegations?: HostMcpCreateSelection[];
|
|
5107
5117
|
sandboxGroupId?: string | null;
|
|
5108
5118
|
sandboxOs?: SandboxOs;
|
|
5109
5119
|
/** Exact accepted generated-session compaction policy; internal lifecycle callers only. */
|
|
@@ -5185,6 +5195,7 @@ export declare function getInitializedSessionCreateReplay(db: Database, input: {
|
|
|
5185
5195
|
visibility?: "user_private" | "workspace_shared";
|
|
5186
5196
|
variableSetIds: string[];
|
|
5187
5197
|
selectedInstalledSkillIds: string[];
|
|
5198
|
+
selectedHostMcpDelegations?: HostMcpCreateSelection[];
|
|
5188
5199
|
initialPersonalResourceAttachmentIntent?: PersonalResourceAttachmentIntent | null;
|
|
5189
5200
|
deferInitialTurn?: boolean;
|
|
5190
5201
|
}): Promise<InitializedSessionCreateReplay | null>;
|
|
@@ -5225,7 +5236,7 @@ export type SessionAccessProjection = {
|
|
|
5225
5236
|
sessionId: string;
|
|
5226
5237
|
rootSessionId: string;
|
|
5227
5238
|
agentAccess: SessionAgentAccess;
|
|
5228
|
-
|
|
5239
|
+
scopeSubjectId: SessionScopeSubjectId | null;
|
|
5229
5240
|
memoryScope: SessionMemoryScope;
|
|
5230
5241
|
};
|
|
5231
5242
|
export type SessionAuthorityProjection = SessionAccessProjection & {
|
|
@@ -5237,12 +5248,16 @@ export declare function getSessionAuthorityProjection(db: Database, workspaceId:
|
|
|
5237
5248
|
export declare function getSessionAccessProjection(db: Database, workspaceId: string, sessionId: string): Promise<SessionAccessProjection | null>;
|
|
5238
5249
|
/**
|
|
5239
5250
|
* The typed Memory selector an agent on this session reads and writes. The
|
|
5240
|
-
*
|
|
5241
|
-
*
|
|
5251
|
+
* user subject comes from the verified active execution, not a conversation
|
|
5252
|
+
* label or its original creator. Task notes own temporary tree-local data.
|
|
5242
5253
|
* Null when the session does not exist in the workspace.
|
|
5243
5254
|
*/
|
|
5244
|
-
export declare function resolveSessionMemoryAgentScope(db: Database, workspaceId: string, sessionId: string
|
|
5245
|
-
|
|
5255
|
+
export declare function resolveSessionMemoryAgentScope(db: Database, workspaceId: string, sessionId: string, caller?: {
|
|
5256
|
+
turnId?: unknown;
|
|
5257
|
+
attemptId?: unknown;
|
|
5258
|
+
executionGeneration?: unknown;
|
|
5259
|
+
}): Promise<MemoryAgentScope | null>;
|
|
5260
|
+
export declare function memoryAgentScopeForSessionAccess(access: Pick<SessionAccessProjection, "rootSessionId" | "scopeSubjectId" | "memoryScope">): MemoryAgentScope;
|
|
5246
5261
|
export declare function getSessionTurnXaiProviderAccountAuthoritySnapshot(db: Database, workspaceId: string, sessionId: string, turnId: string): Promise<XaiProviderAccountAuthoritySnapshotV1>;
|
|
5247
5262
|
export declare function getSessionTurnPersonalConnectionDelegations(db: Database, workspaceId: string, sessionId: string, turnId: string): Promise<McpPersonalConnectionDelegation[]>;
|
|
5248
5263
|
export declare function getSessionParentPersonalConnectionDelegations(db: Database, workspaceId: string, childSessionId: string): Promise<McpPersonalConnectionDelegation[]>;
|
|
@@ -5327,7 +5342,7 @@ export type SessionListFilterOptions = {
|
|
|
5327
5342
|
/** Exclusive creation upper bound. */
|
|
5328
5343
|
createdBefore?: Date;
|
|
5329
5344
|
/** Exact opaque end-user label pair (both parts). */
|
|
5330
|
-
|
|
5345
|
+
scopeSubjectId?: SessionScopeSubjectId;
|
|
5331
5346
|
};
|
|
5332
5347
|
export type ListSessionsForSubjectOptions = ListSessionsOptions & SessionListFilterOptions & {
|
|
5333
5348
|
subjectId: string;
|
|
@@ -5355,13 +5370,13 @@ export type ListSessionsForSubjectOptions = ListSessionsOptions & SessionListFil
|
|
|
5355
5370
|
*
|
|
5356
5371
|
* **This flag is the authorization.** The resolver it gates is not: it answers
|
|
5357
5372
|
* "does subject X hold authority here" and establishes nothing about who the
|
|
5358
|
-
* caller is. The exception
|
|
5359
|
-
*
|
|
5360
|
-
* organization administrators receive no
|
|
5361
|
-
*
|
|
5373
|
+
* caller is. The exception requires verified native-cookie or dedicated
|
|
5374
|
+
* external owning-user provenance. Unscoped service keys and account or
|
|
5375
|
+
* organization administrators receive no Personal access through it.
|
|
5376
|
+
* A host-signed delegated bearer chooses its own `subjectId`,
|
|
5362
5377
|
* `principalKind`, `metadata.delegated`, and `serviceInitiator` claims, so no
|
|
5363
5378
|
* inspection of the grant can carry that distinction. Set this ONLY from
|
|
5364
|
-
* `
|
|
5379
|
+
* `hasVerifiedOwningUserAuthorization` (`@opengeni/core`),
|
|
5365
5380
|
* which reflects HOW the request authenticated. Omitted/false keeps the
|
|
5366
5381
|
* historical bare-membership fence exactly.
|
|
5367
5382
|
*/
|
|
@@ -5419,12 +5434,9 @@ export declare function sessionTreeStatsForSessions(db: Database, workspaceId: s
|
|
|
5419
5434
|
export declare function sessionRequiresActionSinceForSessions(db: Database, workspaceId: string, sessionIds: readonly string[]): Promise<Map<string, string>>;
|
|
5420
5435
|
/**
|
|
5421
5436
|
* The agent-access predicate for one calling attempt (migration 0427). It
|
|
5422
|
-
* mirrors
|
|
5423
|
-
*
|
|
5424
|
-
*
|
|
5425
|
-
* `workspace` caller additionally sees every `workspace` session and the
|
|
5426
|
-
* `user` sessions carrying its own label. A caller without a label can never
|
|
5427
|
-
* match a labelled `user` session.
|
|
5437
|
+
* mirrors outgoing reach in the core seam: own tree, same canonical user, or
|
|
5438
|
+
* workspace. Target task scope never hides the conversation. This predicate
|
|
5439
|
+
* remains intersected with host scope and ordinary private-session visibility.
|
|
5428
5440
|
*/
|
|
5429
5441
|
export declare function sessionAgentAccessViewerFilter(viewer: SessionAgentAccessViewer): SQL;
|
|
5430
5442
|
/**
|
|
@@ -9429,6 +9441,10 @@ export type InitializeSessionStartInput = {
|
|
|
9429
9441
|
/** Trusted create-session policy. Omitted only by legacy low-level callers. */
|
|
9430
9442
|
turnExecutionPolicy?: TurnExecutionPolicyV1;
|
|
9431
9443
|
createdEventPayload: Record<string, unknown>;
|
|
9444
|
+
/** Trusted backend-only capture for a newly inserted initial turn. Runs under
|
|
9445
|
+
* the canonical activity transaction; failure rolls back events and turn.
|
|
9446
|
+
* Never invoked on replay or deferred starts; not caller JSON authority. */
|
|
9447
|
+
captureInitialTurnAuthority?: (tx: Database, turnId: string) => Promise<void>;
|
|
9432
9448
|
/** Sensitive-safe semantic title supplied by the trusted agent-child create
|
|
9433
9449
|
* path. It is committed with the initial timeline, never as a bare row edit. */
|
|
9434
9450
|
initialAutomaticTitle?: string | null;
|
|
@@ -10461,7 +10477,7 @@ export declare function fetchCodexUsageForAccount(db: Database, settings: Settin
|
|
|
10461
10477
|
export declare function fetchCodexRateLimitResetCreditsForAccount(db: Database, settings: Settings, workspaceId: string, credentialId: string, fetchImpl?: CodexFetch): ReturnType<typeof fetchCodexRateLimitResetCreditsForAccountCore>;
|
|
10462
10478
|
export declare function buildConnectionTokenResolver(db: Database, settings: Settings, deps?: ConnectionBrokerDeps, options?: ConnectionTokenResolverOptions): ReturnType<typeof buildConnectionTokenResolverCore>;
|
|
10463
10479
|
export { withCodexTokenDeadline, type CodexAccountUsageSnapshot, type CodexAuthDeps, type CodexCredentialCooldownKind, type CodexCredentialForRun, type CodexCredentialTokens, type CodexRateLimitResetCreditsAccountResult, type CodexTokenDeadlineClock, type CodexTokenDeadlineOptions, } from "./codex-token-resolver.js";
|
|
10464
|
-
export { buildHostConnectionTokenResolver, ConnectionRefreshHttpError, HostMcpCredentialBindingError, HostMcpCredentialScopeError, isPrivateAddress, normalizeBearerScheme, refreshOAuthConnectionCredential, type ConnectionBrokerDeps, type ConnectionCredentialForBroker, type ConnectionCredentialLookupInput, type ConnectionStatusGuard, type ConnectionTokenRefreshInput, type ConnectionTokenResolverOptions, type HostMcpCredentialResolverContext, type PermanentConnectionRefreshFailure, type RefreshTransportOptions, type ResolveConnectionCredentialInput, type ResolveConnectionCredentialResult, } from "./connection-token-resolver.js";
|
|
10480
|
+
export { buildHostConnectionTokenResolver, buildHostGatewayConnectionTokenResolver, ConnectionRefreshHttpError, HostMcpCredentialBindingError, HostMcpCredentialScopeError, isPrivateAddress, normalizeBearerScheme, refreshOAuthConnectionCredential, type ConnectionBrokerDeps, type ConnectionCredentialForBroker, type ConnectionCredentialLookupInput, type ConnectionStatusGuard, type ConnectionTokenRefreshInput, type ConnectionTokenResolverOptions, type HostMcpCredentialResolverContext, type PermanentConnectionRefreshFailure, type RefreshTransportOptions, type ResolveConnectionCredentialInput, type ResolveConnectionCredentialResult, } from "./connection-token-resolver.js";
|
|
10465
10481
|
export { CapabilityComponentVersionConflictError, cleanupOrphanedCapabilityComponents, effectiveCapabilityOwnerSql, type CapabilityComponentOwnerIdentity, } from "./capability-components.js";
|
|
10466
10482
|
export { adoptPackComponentReferences, finalizePackComponentOwnership, listPackInstallationComponents, PackComponentResolutionError, previewPackComponentRelease, recordPackInlineSkillComponent, releasePackComponents, resolvePackComponentReferences, resolvePackInlineSkillReferences, type PackInlineSkillRequirement, type StoredPackInstallationComponent, } from "./pack-components.js";
|
|
10467
10483
|
export { deferPackInstallationOperation, finalizePackInstallationOperation, finalizePackUninstallOperation, PackManifestChangedError, PackOperationClaimLostError, PackOperationInProgressError, PackInstallationVersionConflictError, PackInstallationVersionRequiredError, PackOperationIdempotencyError, preparePackInstallationOperation, preparePackUninstallOperation, touchPackInstallationOperation, type PreparedPackInstallation, } from "./pack-installations.js";
|