@opengeni/db 3.4.0-canary.2 → 3.5.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.
Files changed (59) hide show
  1. package/dist/canonical-human-identities.d.ts +20 -0
  2. package/dist/canonical-human-identities.js +7 -3
  3. package/dist/{chunk-C2AFP7SB.js → chunk-6NYKC5DD.js} +6507 -6040
  4. package/dist/chunk-6NYKC5DD.js.map +1 -0
  5. package/dist/{chunk-O6FTELKH.js → chunk-FJHEWYV5.js} +3 -3
  6. package/dist/{chunk-ZWRIPCTR.js → chunk-NRGUX3M5.js} +2 -2
  7. package/dist/{chunk-TRBOWUG3.js → chunk-ORKVXHL2.js} +2 -2
  8. package/dist/{chunk-PYMY3AJW.js → chunk-PERPE2UY.js} +172 -7
  9. package/dist/chunk-PERPE2UY.js.map +1 -0
  10. package/dist/chunk-TRCYF26N.js +299 -0
  11. package/dist/chunk-TRCYF26N.js.map +1 -0
  12. package/dist/{chunk-V3TRUXFJ.js → chunk-U7NKCX5E.js} +72 -19
  13. package/dist/chunk-U7NKCX5E.js.map +1 -0
  14. package/dist/{chunk-H7MXYG7R.js → chunk-X6T2P3L3.js} +2 -2
  15. package/dist/{chunk-HY3F5Q4E.js → chunk-Y44FKTYU.js} +3 -3
  16. package/dist/editable-artifact-durable-export.js +2 -2
  17. package/dist/editable-artifacts.js +3 -3
  18. package/dist/index.d.ts +21 -3
  19. package/dist/index.js +1698 -995
  20. package/dist/index.js.map +1 -1
  21. package/dist/managed-auth-session-set-schema.d.ts +1399 -0
  22. package/dist/managed-auth-session-sets.d.ts +145 -0
  23. package/dist/managed-auth-session-sets.js +50 -0
  24. package/dist/managed-auth-session-sets.js.map +1 -0
  25. package/dist/organization-recovery-schema.d.ts +2144 -0
  26. package/dist/organization-recovery.d.ts +186 -0
  27. package/dist/provision-roles.js +1 -1
  28. package/dist/runtime-posture.d.ts +5 -3
  29. package/dist/schema.d.ts +2 -0
  30. package/dist/schema.js +37 -1
  31. package/dist/session-background-commands.js +3 -3
  32. package/dist/session-control.d.ts +5 -3
  33. package/dist/session-queue-commands.d.ts +2 -0
  34. package/dist/session-tenancy.js +3 -3
  35. package/dist/video-generation.js +3 -3
  36. package/drizzle/0362_managed_auth_session_sets.sql +2347 -0
  37. package/drizzle/0363_organization_recovery_custody.sql +2418 -0
  38. package/drizzle/0364_workspace_learning_policy_snapshot_lock_order.sql +221 -0
  39. package/package.json +10 -6
  40. package/src/canonical-human-identities.ts +105 -27
  41. package/src/index.ts +420 -103
  42. package/src/managed-auth-session-set-schema.ts +176 -0
  43. package/src/managed-auth-session-sets.ts +430 -0
  44. package/src/organization-recovery-schema.ts +277 -0
  45. package/src/organization-recovery.ts +424 -0
  46. package/src/provision-roles.ts +49 -0
  47. package/src/runtime-posture.ts +132 -6
  48. package/src/schema.ts +2 -0
  49. package/src/session-control.ts +255 -16
  50. package/src/session-queue-commands.ts +10 -1
  51. package/src/session-tool-call-settlement.ts +6 -1
  52. package/dist/chunk-C2AFP7SB.js.map +0 -1
  53. package/dist/chunk-PYMY3AJW.js.map +0 -1
  54. package/dist/chunk-V3TRUXFJ.js.map +0 -1
  55. /package/dist/{chunk-O6FTELKH.js.map → chunk-FJHEWYV5.js.map} +0 -0
  56. /package/dist/{chunk-ZWRIPCTR.js.map → chunk-NRGUX3M5.js.map} +0 -0
  57. /package/dist/{chunk-TRBOWUG3.js.map → chunk-ORKVXHL2.js.map} +0 -0
  58. /package/dist/{chunk-H7MXYG7R.js.map → chunk-X6T2P3L3.js.map} +0 -0
  59. /package/dist/{chunk-HY3F5Q4E.js.map → chunk-Y44FKTYU.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -281,6 +281,7 @@ export declare function ensureManagedAccessForUser(db: Database, input: {
281
281
  name: string;
282
282
  emailVerified?: boolean;
283
283
  provisionFallbackOrganization?: boolean;
284
+ bindPendingInvitations?: boolean;
284
285
  }): Promise<AccessContext>;
285
286
  export type ManagedAccessProvisioningResult = {
286
287
  accessContext: AccessContext;
@@ -292,6 +293,7 @@ export declare function ensureManagedAccessForUserWithOrganizationMemberships(db
292
293
  name: string;
293
294
  emailVerified?: boolean;
294
295
  provisionFallbackOrganization?: boolean;
296
+ bindPendingInvitations?: boolean;
295
297
  }): Promise<ManagedAccessProvisioningResult>;
296
298
  export declare function getWorkspace(db: Database, workspaceId: string): Promise<Workspace | null>;
297
299
  export declare function getManagedAccount(db: Database, accountId: string): Promise<ManagedAccount | null>;
@@ -2750,6 +2752,7 @@ export type VariableSetAccessContext = {
2750
2752
  subjectId: string;
2751
2753
  };
2752
2754
  export declare function listVariableSets(db: Database, context: VariableSetAccessContext): Promise<VariableSet[]>;
2755
+ export declare function resolveVariableSetAttachments(db: Database, context: VariableSetAccessContext, variableSetIds: readonly string[]): Promise<Array<Pick<VariableSet, "id" | "scope">>>;
2753
2756
  export declare function getVariableSet(db: Database, context: VariableSetAccessContext, variableSetId: string): Promise<VariableSet | null>;
2754
2757
  export declare function getVariableSetByName(db: Database, context: VariableSetAccessContext, name: string, scope?: VariableSet["scope"]): Promise<VariableSet | null>;
2755
2758
  export type VariableSetSecretAuditActor = {
@@ -4875,6 +4878,8 @@ export declare function setSessionAttention(db: Database, input: {
4875
4878
  acknowledgedThroughSequence?: number | undefined;
4876
4879
  activelyWorking?: boolean | undefined;
4877
4880
  expectedVersion?: number | undefined;
4881
+ /** See {@link PersonalWorkspaceOwnerException}. Absent means "no exception". */
4882
+ personalWorkspaceOwnerException?: PersonalWorkspaceOwnerException | undefined;
4878
4883
  }): Promise<Session | null>;
4879
4884
  /**
4880
4885
  * Archive or restore one root chat for a single member. Archiving also removes
@@ -4887,6 +4892,8 @@ export declare function setSessionArchive(db: Database, input: {
4887
4892
  sessionId: string;
4888
4893
  archived: boolean;
4889
4894
  expectedVersion?: number | undefined;
4895
+ /** See {@link PersonalWorkspaceOwnerException}. Absent means "no exception". */
4896
+ personalWorkspaceOwnerException?: PersonalWorkspaceOwnerException | undefined;
4890
4897
  }): Promise<Session | null>;
4891
4898
  export declare function listSessions(db: Database, workspaceId: string, limit?: number): Promise<Session[]>;
4892
4899
  export declare function listSessions(db: Database, workspaceId: string, options?: ListSessionsOptions): Promise<Session[]>;
@@ -5129,6 +5136,12 @@ export type AcceptSessionHumanInputResponseResult = {
5129
5136
  event: SessionEvent;
5130
5137
  events: SessionEvent[];
5131
5138
  workflowWakeRevision: number;
5139
+ } | {
5140
+ action: "completed";
5141
+ request: SessionHumanInputRequest;
5142
+ event: SessionEvent;
5143
+ events: SessionEvent[];
5144
+ workflowWakeRevision: number | null;
5132
5145
  } | {
5133
5146
  action: "conflict";
5134
5147
  request: SessionHumanInputRequest;
@@ -5138,9 +5151,12 @@ export type AcceptSessionHumanInputResponseResult = {
5138
5151
  action: "not_found";
5139
5152
  };
5140
5153
  /**
5141
- * First-writer-wins settlement for one pending structured input boundary.
5142
- * Session + logical turn + current freeze generation are locked with the row;
5143
- * the creation attempt is provenance and is intentionally not the resume owner.
5154
+ * First-writer-wins settlement for one structured input boundary. Session +
5155
+ * logical turn + current freeze generation are locked with the row; the
5156
+ * creation attempt is provenance and is intentionally not the resume owner.
5157
+ * A committed response replays its original event without another event or
5158
+ * workflow wake. Historical cancelled rows missing that canonical event are
5159
+ * repaired exactly once under the same locks, but never wake terminal work.
5144
5160
  */
5145
5161
  export declare function acceptSessionHumanInputResponse(db: Database, input: {
5146
5162
  accountId: string;
@@ -9494,6 +9510,8 @@ export * from "./attached-browser-devices.js";
9494
9510
  export * from "./interaction-revisions.js";
9495
9511
  export * from "./interaction-placement-loss.js";
9496
9512
  export * from "./canonical-human-identities.js";
9513
+ export * from "./managed-auth-session-sets.js";
9514
+ export * from "./organization-recovery.js";
9497
9515
  export * from "./session-tenancy.js";
9498
9516
  export * from "./governed-learning-activation.js";
9499
9517
  export * from "./automations.js";