@hiai-gg/docsmint 0.4.2 → 0.4.4
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/backend/index.js +146 -22
- package/dist/backend-pipeline-cancellation.d.ts +11 -0
- package/dist/backend-pipeline-cancellation.js +2669 -0
- package/dist/lifecycle-runtime.d.ts +35 -0
- package/dist/lifecycle-runtime.js +811 -0
- package/dist/pipeline-cancellation.d.ts +21 -0
- package/dist/pipeline-cancellation.js +34 -0
- package/package.json +21 -2
- package/packages/cli/src/index.ts +1 -1
- package/packages/mcp-server/src/index.ts +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { AssertPurgeAllowed, LifecycleHostStep, UserDataLifecycle } from "./lifecycle";
|
|
2
|
+
/**
|
|
3
|
+
* Server-only external effects required by the durable OSS lifecycle saga.
|
|
4
|
+
* Implementations must perform real deletion work; the runtime deliberately
|
|
5
|
+
* has no permissive defaults for queues, object storage, Redis, collaboration,
|
|
6
|
+
* or graph state.
|
|
7
|
+
*/
|
|
8
|
+
export type LifecycleRuntimeAdapters = Readonly<{
|
|
9
|
+
verifyPurgeFence: (context: Parameters<AssertPurgeAllowed>[0], fenceToken: string) => Promise<void>;
|
|
10
|
+
deleteObjects: (keys: readonly string[], signal?: AbortSignal) => Promise<number>;
|
|
11
|
+
cancelAccountJobs: (actorUserId: string, signal?: AbortSignal) => Promise<number>;
|
|
12
|
+
clearAccountRedisState: (actorUserId: string, signal?: AbortSignal) => Promise<number>;
|
|
13
|
+
removeCollaborationState: (actorUserId: string, signal?: AbortSignal) => Promise<number>;
|
|
14
|
+
removeGraphState: (documentIds: readonly string[], signal?: AbortSignal) => Promise<number>;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Host-owned request/RLS transaction executor. TTransaction is intentionally
|
|
18
|
+
* generic so a consumer can retain the exact Drizzle transaction type without
|
|
19
|
+
* this public contract importing its database singleton.
|
|
20
|
+
*/
|
|
21
|
+
export type LifecycleScopedDatabaseExecutor<TTransaction = unknown> = Readonly<{
|
|
22
|
+
withActorTransaction<T>(actorUserId: string, operation: (transaction: TTransaction) => Promise<T>): Promise<T>;
|
|
23
|
+
}>;
|
|
24
|
+
export type PersistentLifecycleRuntimeOptions<TTransaction = unknown> = Readonly<{
|
|
25
|
+
runtime: LifecycleRuntimeAdapters;
|
|
26
|
+
database: LifecycleScopedDatabaseExecutor<TTransaction>;
|
|
27
|
+
assertPurgeAllowed: AssertPurgeAllowed;
|
|
28
|
+
hostSteps?: readonly LifecycleHostStep[];
|
|
29
|
+
}>;
|
|
30
|
+
/**
|
|
31
|
+
* Creates the concrete durable PostgreSQL lifecycle saga shipped by DocsMint.
|
|
32
|
+
* The JavaScript implementation is bundled from the OSS backend at build time;
|
|
33
|
+
* this source file is the stable public declaration surface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function createPersistentLifecycleRuntime<TTransaction = unknown>(options: PersistentLifecycleRuntimeOptions<TTransaction>): UserDataLifecycle;
|