@wrongstack/webui-server 0.306.2 → 0.306.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/index.js +203 -67
- package/dist/server/collaboration-ws-handler.d.ts +2 -0
- package/dist/server/entry.js +195 -65
- package/dist/server/index.d.ts +2 -0
- package/dist/server/pref-helpers.d.ts +1 -1
- package/dist/server/server-runtime.d.ts +1 -1
- package/dist/server/session-cleanup-scheduler.d.ts +26 -0
- package/dist/server/session-deletion.d.ts +13 -0
- package/package.json +11 -11
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Logger } from '@wrongstack/core/types';
|
|
2
|
+
import { type SessionDeletionContext } from './session-deletion.js';
|
|
3
|
+
export declare const DEFAULT_EMPTY_SESSION_CLEANUP_INTERVAL_MS: number;
|
|
4
|
+
export declare const EMPTY_SESSION_CLEANUP_INTERVAL_ENV = "WRONGSTACK_EMPTY_SESSION_CLEANUP_INTERVAL_MS";
|
|
5
|
+
export interface EmptySessionCleanupContext extends SessionDeletionContext {
|
|
6
|
+
hasParticipants: (sessionId: string) => boolean;
|
|
7
|
+
logger: Pick<Logger, 'info' | 'error'>;
|
|
8
|
+
}
|
|
9
|
+
export interface EmptySessionCleanupResult {
|
|
10
|
+
deleted: number;
|
|
11
|
+
errors: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function resolveEmptySessionCleanupInterval(value?: string | undefined): number;
|
|
14
|
+
/**
|
|
15
|
+
* Delete persisted sessions that have no active owner/participant and whose
|
|
16
|
+
* journals pass the store's strict, fail-closed empty check. Deletion itself is routed
|
|
17
|
+
* through the same canonical operation used by the session.delete WebSocket
|
|
18
|
+
* handler, preserving its active-session guard and SessionStore ownership,
|
|
19
|
+
* catalog, and artifact cleanup.
|
|
20
|
+
*/
|
|
21
|
+
export declare function cleanupOwnerlessEmptySessions(ctx: EmptySessionCleanupContext): Promise<EmptySessionCleanupResult>;
|
|
22
|
+
export declare function scheduleOwnerlessEmptySessionCleanup(ctx: EmptySessionCleanupContext, intervalMs?: number): {
|
|
23
|
+
dispose: () => Promise<void>;
|
|
24
|
+
runNow: () => Promise<EmptySessionCleanupResult>;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=session-cleanup-scheduler.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SessionStore } from '@wrongstack/core/types';
|
|
2
|
+
export interface SessionDeletionContext {
|
|
3
|
+
getActiveSessionId: () => string;
|
|
4
|
+
getSessionStore: () => SessionStore;
|
|
5
|
+
refreshSessions: () => Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Canonical WebUI session deletion flow. Both the session.delete route and
|
|
9
|
+
* background hygiene call this operation so active-session protection,
|
|
10
|
+
* SessionStore ownership checks, and artifact/catalog cleanup cannot drift.
|
|
11
|
+
*/
|
|
12
|
+
export declare function deleteWebUISession(ctx: SessionDeletionContext, sessionId: string): Promise<void>;
|
|
13
|
+
//# sourceMappingURL=session-deletion.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/webui-server",
|
|
3
|
-
"version": "0.306.
|
|
3
|
+
"version": "0.306.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "WrongStack WebUI HTTP/WebSocket server module — extracted from @wrongstack/webui in PR #243/244 to remove the CLI -> @wrongstack/webui/server cross-package edge (audit §3.1.1). Pure backend: HTTP routes, WebSocket handlers, MCP tool wrappers, HTML serving. The web frontend lives in @wrongstack/webui; this package is the standalone server it can run on.",
|
|
6
6
|
"keywords": [
|
|
@@ -40,16 +40,16 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"ws": "^8.21.1",
|
|
43
|
-
"@wrongstack/
|
|
44
|
-
"@wrongstack/
|
|
45
|
-
"@wrongstack/
|
|
46
|
-
"@wrongstack/
|
|
47
|
-
"@wrongstack/providers": "0.306.
|
|
48
|
-
"@wrongstack/sage": "0.306.
|
|
49
|
-
"@wrongstack/
|
|
50
|
-
"@wrongstack/
|
|
51
|
-
"@wrongstack/tools": "0.306.
|
|
52
|
-
"@wrongstack/
|
|
43
|
+
"@wrongstack/kanban": "0.306.4",
|
|
44
|
+
"@wrongstack/core": "0.306.4",
|
|
45
|
+
"@wrongstack/runtime": "0.306.4",
|
|
46
|
+
"@wrongstack/mcp": "0.306.4",
|
|
47
|
+
"@wrongstack/providers": "0.306.4",
|
|
48
|
+
"@wrongstack/sage": "0.306.4",
|
|
49
|
+
"@wrongstack/requirement-intake": "0.306.4",
|
|
50
|
+
"@wrongstack/techstack": "0.306.4",
|
|
51
|
+
"@wrongstack/tools": "0.306.4",
|
|
52
|
+
"@wrongstack/sdd": "0.306.4"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/node": "^26.1.2",
|