@pellux/goodvibes-sdk 0.18.41 → 0.18.43

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 (44) hide show
  1. package/dist/_internal/daemon/runtime-route-types.d.ts +7 -0
  2. package/dist/_internal/daemon/runtime-route-types.d.ts.map +1 -1
  3. package/dist/_internal/daemon/runtime-session-routes.d.ts.map +1 -1
  4. package/dist/_internal/daemon/runtime-session-routes.js +43 -0
  5. package/dist/_internal/platform/companion/companion-chat-manager.d.ts +94 -0
  6. package/dist/_internal/platform/companion/companion-chat-manager.d.ts.map +1 -0
  7. package/dist/_internal/platform/companion/companion-chat-manager.js +291 -0
  8. package/dist/_internal/platform/companion/companion-chat-route-types.d.ts +31 -0
  9. package/dist/_internal/platform/companion/companion-chat-route-types.d.ts.map +1 -0
  10. package/dist/_internal/platform/companion/companion-chat-route-types.js +6 -0
  11. package/dist/_internal/platform/companion/companion-chat-routes.d.ts +23 -0
  12. package/dist/_internal/platform/companion/companion-chat-routes.d.ts.map +1 -0
  13. package/dist/_internal/platform/companion/companion-chat-routes.js +133 -0
  14. package/dist/_internal/platform/companion/companion-chat-types.d.ts +108 -0
  15. package/dist/_internal/platform/companion/companion-chat-types.d.ts.map +1 -0
  16. package/dist/_internal/platform/companion/companion-chat-types.js +11 -0
  17. package/dist/_internal/platform/companion/index.d.ts +6 -0
  18. package/dist/_internal/platform/companion/index.d.ts.map +1 -0
  19. package/dist/_internal/platform/companion/index.js +2 -0
  20. package/dist/_internal/platform/control-plane/conversation-message.d.ts +29 -0
  21. package/dist/_internal/platform/control-plane/conversation-message.d.ts.map +1 -0
  22. package/dist/_internal/platform/control-plane/conversation-message.js +9 -0
  23. package/dist/_internal/platform/control-plane/index.d.ts +1 -0
  24. package/dist/_internal/platform/control-plane/index.d.ts.map +1 -1
  25. package/dist/_internal/platform/control-plane/session-broker.d.ts +45 -0
  26. package/dist/_internal/platform/control-plane/session-broker.d.ts.map +1 -1
  27. package/dist/_internal/platform/control-plane/session-broker.js +197 -5
  28. package/dist/_internal/platform/control-plane/session-types.d.ts +16 -0
  29. package/dist/_internal/platform/control-plane/session-types.d.ts.map +1 -1
  30. package/dist/_internal/platform/daemon/facade-composition.d.ts.map +1 -1
  31. package/dist/_internal/platform/daemon/facade-composition.js +7 -0
  32. package/dist/_internal/platform/daemon/facade.d.ts +2 -0
  33. package/dist/_internal/platform/daemon/facade.d.ts.map +1 -1
  34. package/dist/_internal/platform/daemon/facade.js +17 -0
  35. package/dist/_internal/platform/daemon/http/router.d.ts +7 -0
  36. package/dist/_internal/platform/daemon/http/router.d.ts.map +1 -1
  37. package/dist/_internal/platform/daemon/http/router.js +34 -0
  38. package/dist/_internal/platform/daemon/http/runtime-route-types.d.ts +7 -0
  39. package/dist/_internal/platform/daemon/http/runtime-route-types.d.ts.map +1 -1
  40. package/dist/_internal/platform/runtime/tasks/adapters/agent-adapter.d.ts +25 -0
  41. package/dist/_internal/platform/runtime/tasks/adapters/agent-adapter.d.ts.map +1 -1
  42. package/dist/_internal/platform/runtime/tasks/adapters/agent-adapter.js +85 -0
  43. package/dist/_internal/platform/version.js +1 -1
  44. package/package.json +1 -1
@@ -0,0 +1,133 @@
1
+ /**
2
+ * companion-chat-routes.ts
3
+ *
4
+ * HTTP route handlers for the companion-app chat-mode API.
5
+ *
6
+ * Routes:
7
+ * POST /api/companion/chat/sessions
8
+ * GET /api/companion/chat/sessions/:sessionId
9
+ * DELETE /api/companion/chat/sessions/:sessionId
10
+ * POST /api/companion/chat/sessions/:sessionId/messages
11
+ * GET /api/companion/chat/sessions/:sessionId/events (SSE)
12
+ *
13
+ * All routes require the existing daemon bearer-token auth (enforced by the
14
+ * caller — DaemonHttpRouter.handleRequest already validates auth before
15
+ * dispatching to API routes).
16
+ */
17
+ // ---------------------------------------------------------------------------
18
+ // Route dispatch — called from DaemonHttpRouter.dispatchApiRoutes
19
+ // ---------------------------------------------------------------------------
20
+ /**
21
+ * Try to handle a companion chat route. Returns null if the path/method
22
+ * does not match, so the caller can fall through to other route groups.
23
+ */
24
+ export async function dispatchCompanionChatRoutes(req, context) {
25
+ const url = new URL(req.url);
26
+ const { pathname } = url;
27
+ // POST /api/companion/chat/sessions
28
+ if (pathname === '/api/companion/chat/sessions' && req.method === 'POST') {
29
+ return handleCreateSession(req, context);
30
+ }
31
+ const sessionMatch = pathname.match(/^\/api\/companion\/chat\/sessions\/([^/]+)(\/(.+))?$/);
32
+ if (!sessionMatch)
33
+ return null;
34
+ const sessionId = sessionMatch[1];
35
+ const sub = sessionMatch[3] ?? '';
36
+ // GET /api/companion/chat/sessions/:sessionId
37
+ if (!sub && req.method === 'GET') {
38
+ return handleGetSession(sessionId, context);
39
+ }
40
+ // DELETE /api/companion/chat/sessions/:sessionId
41
+ if (!sub && req.method === 'DELETE') {
42
+ return handleDeleteSession(sessionId, context);
43
+ }
44
+ // POST /api/companion/chat/sessions/:sessionId/messages
45
+ if (sub === 'messages' && req.method === 'POST') {
46
+ return handlePostMessage(req, sessionId, context);
47
+ }
48
+ // GET /api/companion/chat/sessions/:sessionId/events
49
+ if (sub === 'events' && req.method === 'GET') {
50
+ return handleGetEvents(req, sessionId, context);
51
+ }
52
+ return null;
53
+ }
54
+ // ---------------------------------------------------------------------------
55
+ // POST /api/companion/chat/sessions
56
+ // ---------------------------------------------------------------------------
57
+ async function handleCreateSession(req, context) {
58
+ const bodyOrResponse = await context.parseOptionalJsonBody(req);
59
+ if (bodyOrResponse instanceof Response)
60
+ return bodyOrResponse;
61
+ const body = (bodyOrResponse ?? {});
62
+ const input = {
63
+ title: typeof body['title'] === 'string' ? body['title'] : undefined,
64
+ model: typeof body['model'] === 'string' ? body['model'] : undefined,
65
+ provider: typeof body['provider'] === 'string' ? body['provider'] : undefined,
66
+ systemPrompt: typeof body['systemPrompt'] === 'string' ? body['systemPrompt'] : undefined,
67
+ };
68
+ const session = context.chatManager.createSession(input);
69
+ return Response.json({ sessionId: session.id, createdAt: session.createdAt }, { status: 201 });
70
+ }
71
+ // ---------------------------------------------------------------------------
72
+ // GET /api/companion/chat/sessions/:sessionId
73
+ // ---------------------------------------------------------------------------
74
+ async function handleGetSession(sessionId, context) {
75
+ const session = context.chatManager.getSession(sessionId);
76
+ if (!session) {
77
+ return Response.json({ error: 'Session not found', code: 'SESSION_NOT_FOUND' }, { status: 404 });
78
+ }
79
+ const messages = context.chatManager.getMessages(sessionId);
80
+ return Response.json({ session, messages });
81
+ }
82
+ // ---------------------------------------------------------------------------
83
+ // DELETE /api/companion/chat/sessions/:sessionId
84
+ // ---------------------------------------------------------------------------
85
+ async function handleDeleteSession(sessionId, context) {
86
+ const session = context.chatManager.closeSession(sessionId);
87
+ if (!session) {
88
+ return Response.json({ error: 'Session not found', code: 'SESSION_NOT_FOUND' }, { status: 404 });
89
+ }
90
+ return Response.json({ sessionId: session.id, status: session.status });
91
+ }
92
+ // ---------------------------------------------------------------------------
93
+ // POST /api/companion/chat/sessions/:sessionId/messages
94
+ // ---------------------------------------------------------------------------
95
+ async function handlePostMessage(req, sessionId, context) {
96
+ const bodyOrResponse = await context.parseJsonBody(req);
97
+ if (bodyOrResponse instanceof Response)
98
+ return bodyOrResponse;
99
+ const body = bodyOrResponse;
100
+ const input = {
101
+ content: typeof body['content'] === 'string' ? body['content'] : '',
102
+ metadata: typeof body['metadata'] === 'object' && body['metadata'] !== null
103
+ ? body['metadata']
104
+ : undefined,
105
+ };
106
+ if (!input.content.trim()) {
107
+ return Response.json({ error: 'content is required and must be a non-empty string', code: 'INVALID_INPUT' }, { status: 400 });
108
+ }
109
+ try {
110
+ const messageId = await context.chatManager.postMessage(sessionId, input.content);
111
+ return Response.json({ messageId }, { status: 202 });
112
+ }
113
+ catch (err) {
114
+ const e = err;
115
+ const status = e.status ?? 500;
116
+ return Response.json({ error: e.message ?? 'Internal error', code: e.code ?? 'INTERNAL_ERROR' }, { status });
117
+ }
118
+ }
119
+ // ---------------------------------------------------------------------------
120
+ // GET /api/companion/chat/sessions/:sessionId/events (SSE)
121
+ // ---------------------------------------------------------------------------
122
+ async function handleGetEvents(req, sessionId, context) {
123
+ const session = context.chatManager.getSession(sessionId);
124
+ if (!session) {
125
+ return Response.json({ error: 'Session not found', code: 'SESSION_NOT_FOUND' }, { status: 404 });
126
+ }
127
+ if (session.status === 'closed') {
128
+ return Response.json({ error: 'Session is closed', code: 'SESSION_CLOSED' }, { status: 410 });
129
+ }
130
+ // Delegate to the caller-provided SSE stream opener which wires up the
131
+ // gateway live-client registration and returns an SSE Response.
132
+ return context.openSessionEventStream(req, sessionId);
133
+ }
@@ -0,0 +1,108 @@
1
+ /**
2
+ * companion-chat-types.ts
3
+ *
4
+ * Types for companion-app chat-mode sessions. These are distinct from the
5
+ * TUI operator session and from task-submit (SharedSessionBroker) sessions.
6
+ * Chat sessions are managed by the CompanionChatManager and live entirely
7
+ * in memory (no persistence across daemon restart — v1 scope).
8
+ *
9
+ * TODO (follow-up): persist chat sessions to disk / database on daemon restart.
10
+ */
11
+ import type { ConversationMessageEnvelope } from '../control-plane/conversation-message.js';
12
+ /**
13
+ * Re-export the shared envelope so chat-mode code can import from one place.
14
+ * The envelope shape is the canonical message unit flowing through
15
+ * the control-plane gateway across both chat-mode and Problem-2 routing.
16
+ */
17
+ export type { ConversationMessageEnvelope } from '../control-plane/conversation-message.js';
18
+ export type CompanionChatSessionKind = 'companion-chat';
19
+ export type CompanionChatSessionStatus = 'active' | 'closed';
20
+ export type CompanionChatMessageRole = 'user' | 'assistant';
21
+ export interface CompanionChatMessage {
22
+ readonly id: string;
23
+ readonly sessionId: string;
24
+ readonly role: CompanionChatMessageRole;
25
+ readonly content: string;
26
+ readonly createdAt: number;
27
+ }
28
+ export interface CompanionChatSession {
29
+ readonly id: string;
30
+ readonly kind: CompanionChatSessionKind;
31
+ readonly title: string;
32
+ readonly model: string | null;
33
+ readonly provider: string | null;
34
+ readonly systemPrompt: string | null;
35
+ readonly status: CompanionChatSessionStatus;
36
+ readonly createdAt: number;
37
+ readonly updatedAt: number;
38
+ readonly closedAt: number | null;
39
+ readonly messageCount: number;
40
+ }
41
+ export interface CreateCompanionChatSessionInput {
42
+ readonly title?: string;
43
+ readonly model?: string;
44
+ readonly provider?: string;
45
+ readonly systemPrompt?: string;
46
+ }
47
+ export interface CreateCompanionChatSessionOutput {
48
+ readonly sessionId: string;
49
+ readonly createdAt: number;
50
+ }
51
+ export interface PostCompanionChatMessageInput {
52
+ readonly content: string;
53
+ readonly metadata?: Record<string, unknown>;
54
+ }
55
+ export interface PostCompanionChatMessageOutput {
56
+ readonly messageId: string;
57
+ }
58
+ export interface GetCompanionChatSessionOutput {
59
+ readonly session: CompanionChatSession;
60
+ readonly messages: CompanionChatMessage[];
61
+ }
62
+ export interface CompanionChatTurnStartedEvent {
63
+ readonly type: 'turn.started';
64
+ readonly sessionId: string;
65
+ readonly messageId: string;
66
+ readonly turnId: string;
67
+ /** Shared envelope for the user message that started this turn. */
68
+ readonly envelope: ConversationMessageEnvelope;
69
+ }
70
+ export interface CompanionChatTurnDeltaEvent {
71
+ readonly type: 'turn.delta';
72
+ readonly sessionId: string;
73
+ readonly turnId: string;
74
+ readonly delta: string;
75
+ }
76
+ export interface CompanionChatTurnToolCallEvent {
77
+ readonly type: 'turn.tool_call';
78
+ readonly sessionId: string;
79
+ readonly turnId: string;
80
+ readonly toolCallId: string;
81
+ readonly toolName: string;
82
+ readonly toolInput: unknown;
83
+ }
84
+ export interface CompanionChatTurnToolResultEvent {
85
+ readonly type: 'turn.tool_result';
86
+ readonly sessionId: string;
87
+ readonly turnId: string;
88
+ readonly toolCallId: string;
89
+ readonly toolName: string;
90
+ readonly result: unknown;
91
+ readonly isError: boolean;
92
+ }
93
+ export interface CompanionChatTurnCompletedEvent {
94
+ readonly type: 'turn.completed';
95
+ readonly sessionId: string;
96
+ readonly turnId: string;
97
+ readonly assistantMessageId: string;
98
+ /** Shared envelope for the assistant message produced by this turn. */
99
+ readonly envelope: ConversationMessageEnvelope;
100
+ }
101
+ export interface CompanionChatTurnErrorEvent {
102
+ readonly type: 'turn.error';
103
+ readonly sessionId: string;
104
+ readonly turnId: string;
105
+ readonly error: string;
106
+ }
107
+ export type CompanionChatTurnEvent = CompanionChatTurnStartedEvent | CompanionChatTurnDeltaEvent | CompanionChatTurnToolCallEvent | CompanionChatTurnToolResultEvent | CompanionChatTurnCompletedEvent | CompanionChatTurnErrorEvent;
108
+ //# sourceMappingURL=companion-chat-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"companion-chat-types.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/companion/companion-chat-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AAE5F;;;;GAIG;AACH,YAAY,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AAE5F,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AAExD,MAAM,MAAM,0BAA0B,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE7D,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,WAAW,CAAC;AAE5D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC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CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,sBAAsB,GAC9B,6BAA6B,GAC7B,2BAA2B,GAC3B,8BAA8B,GAC9B,gCAAgC,GAChC,+BAA+B,GAC/B,2BAA2B,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * companion-chat-types.ts
3
+ *
4
+ * Types for companion-app chat-mode sessions. These are distinct from the
5
+ * TUI operator session and from task-submit (SharedSessionBroker) sessions.
6
+ * Chat sessions are managed by the CompanionChatManager and live entirely
7
+ * in memory (no persistence across daemon restart — v1 scope).
8
+ *
9
+ * TODO (follow-up): persist chat sessions to disk / database on daemon restart.
10
+ */
11
+ export {};
@@ -0,0 +1,6 @@
1
+ export type { CompanionChatMessage, CompanionChatSession, CompanionChatSessionKind, CompanionChatSessionStatus, CompanionChatMessageRole, CompanionChatTurnEvent, CompanionChatTurnStartedEvent, CompanionChatTurnDeltaEvent, CompanionChatTurnToolCallEvent, CompanionChatTurnToolResultEvent, CompanionChatTurnCompletedEvent, CompanionChatTurnErrorEvent, CreateCompanionChatSessionInput, CreateCompanionChatSessionOutput, PostCompanionChatMessageInput, PostCompanionChatMessageOutput, GetCompanionChatSessionOutput, ConversationMessageEnvelope, } from './companion-chat-types.js';
2
+ export type { CompanionLLMProvider, CompanionChatEventPublisher, CompanionChatManagerConfig, CompanionProviderMessage, CompanionProviderChunk, } from './companion-chat-manager.js';
3
+ export { CompanionChatManager } from './companion-chat-manager.js';
4
+ export { dispatchCompanionChatRoutes } from './companion-chat-routes.js';
5
+ export type { CompanionChatRouteContext } from './companion-chat-route-types.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/companion/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,sBAAsB,EACtB,6BAA6B,EAC7B,2BAA2B,EAC3B,8BAA8B,EAC9B,gCAAgC,EAChC,+BAA+B,EAC/B,2BAA2B,EAC3B,+BAA+B,EAC/B,gCAAgC,EAChC,6BAA6B,EAC7B,8BAA8B,EAC9B,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EACV,oBAAoB,EACpB,2BAA2B,EAC3B,0BAA0B,EAC1B,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,YAAY,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { CompanionChatManager } from './companion-chat-manager.js';
2
+ export { dispatchCompanionChatRoutes } from './companion-chat-routes.js';
@@ -0,0 +1,29 @@
1
+ /**
2
+ * conversation-message.ts
3
+ *
4
+ * Shared envelope types for conversation messages flowing through the
5
+ * control-plane gateway. All consumers — SSE companion-chat streams,
6
+ * TUI-surface follow-up listeners, and web-UI clients — depend on this
7
+ * stable shape.
8
+ */
9
+ /**
10
+ * Provenance of a message/event flowing through a conversation.
11
+ * Used both for chat-mode (where the SDK owns the ConversationManager)
12
+ * and for companion follow-ups (where the TUI client owns it cross-process).
13
+ */
14
+ export type MessageSource = 'operator' | 'companion-chat-user' | 'companion-chat-assistant' | 'companion-followup' | 'system' | 'tool';
15
+ /**
16
+ * Stable envelope shape for any conversation-message-related event published
17
+ * through the control-plane gateway. All consumers (SSE companion chat stream,
18
+ * TUI surface follow-up listener, web-UI clients) can depend on this shape.
19
+ */
20
+ export interface ConversationMessageEnvelope {
21
+ readonly sessionId: string;
22
+ readonly messageId: string;
23
+ readonly body: string;
24
+ readonly source: MessageSource;
25
+ readonly timestamp: number;
26
+ /** Optional metadata for tool info, model id, etc. */
27
+ readonly metadata?: Readonly<Record<string, unknown>>;
28
+ }
29
+ //# sourceMappingURL=conversation-message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-message.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/control-plane/conversation-message.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACrB,UAAU,GACV,qBAAqB,GACrB,0BAA0B,GAC1B,oBAAoB,GACpB,QAAQ,GACR,MAAM,CAAC;AAEX;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACvD"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * conversation-message.ts
3
+ *
4
+ * Shared envelope types for conversation messages flowing through the
5
+ * control-plane gateway. All consumers — SSE companion-chat streams,
6
+ * TUI-surface follow-up listeners, and web-UI clients — depend on this
7
+ * stable shape.
8
+ */
9
+ export {};
@@ -9,4 +9,5 @@ export { SharedSessionBroker } from './session-broker.js';
9
9
  export type { SharedApprovalRecord, SharedApprovalAuditRecord, SharedApprovalStatus, RequestSharedApprovalInput, } from './approval-broker.js';
10
10
  export { ApprovalBroker } from './approval-broker.js';
11
11
  export type { ControlPlaneAuthMode, ControlPlaneAuthSnapshot } from '@pellux/goodvibes-sdk/platform/control-plane/auth-snapshot';
12
+ export type { MessageSource, ConversationMessageEnvelope } from './conversation-message.js';
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/control-plane/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,oDAAoD,CAAC;AAC5D,YAAY,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvH,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EACL,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,8BAA8B,EAC9B,wBAAwB,EACxB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,uBAAuB,EACvB,8BAA8B,EAC9B,+BAA+B,GAChC,MAAM,4DAA4D,CAAC;AACpE,YAAY,EACV,uBAAuB,EACvB,gCAAgC,EAChC,+BAA+B,EAC/B,gCAAgC,EAChC,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,8DAA8D,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,YAAY,EACV,oBAAoB,EACpB,yBAAyB,EACzB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,4DAA4D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/control-plane/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,oDAAoD,CAAC;AAC5D,YAAY,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvH,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EACL,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,8BAA8B,EAC9B,wBAAwB,EACxB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,uBAAuB,EACvB,8BAA8B,EAC9B,+BAA+B,GAChC,MAAM,4DAA4D,CAAC;AACpE,YAAY,EACV,uBAAuB,EACvB,gCAAgC,EAChC,+BAA+B,EAC/B,gCAAgC,EAChC,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,8DAA8D,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,YAAY,EACV,oBAAoB,EACpB,yBAAyB,EACzB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AACjI,YAAY,EAAE,aAAa,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { PersistentStore } from '@pellux/goodvibes-sdk/platform/state/persistent-store';
2
+ import type { RuntimeEventBus } from '../runtime/events/index.js';
2
3
  import { RouteBindingManager } from '../channels/index.js';
3
4
  import type { AutomationRouteBinding } from '@pellux/goodvibes-sdk/platform/automation/routes';
4
5
  import type { SharedSessionCompletion, SharedSessionContinuationRunner, SharedSessionInputRecord } from '@pellux/goodvibes-sdk/platform/control-plane/session-intents';
@@ -15,14 +16,44 @@ export declare class SharedSessionBroker {
15
16
  private eventPublisher;
16
17
  private continuationRunner;
17
18
  private loaded;
19
+ private _gcInterval;
20
+ private _busUnsubs;
21
+ private _busAttached;
22
+ /** Default idle threshold for zero-message sessions (ms). */
23
+ private readonly _idleEmptyMs;
24
+ /** Default idle threshold for sessions with content (ms). */
25
+ private readonly _idleLongMs;
26
+ /**
27
+ * @param config.idleEmptyMs - Idle timeout for empty (0-message) sessions (default: 10 minutes).
28
+ * @param config.idleLongMs - Idle timeout for sessions with content (default: 24 hours).
29
+ */
18
30
  constructor(config: {
19
31
  readonly store?: PersistentStore<SharedSessionStoreSnapshot>;
20
32
  readonly storePath?: string;
21
33
  readonly routeBindings: RouteBindingManager;
22
34
  readonly agentStatusProvider: SharedSessionAgentStatusProvider;
23
35
  readonly messageSender: SharedSessionMessageSender;
36
+ readonly idleEmptyMs?: number;
37
+ readonly idleLongMs?: number;
24
38
  });
25
39
  setEventPublisher(publisher: SharedSessionEventPublisher | null): void;
40
+ /**
41
+ * M3: Gracefully stop the broker — clears GC interval, tears down bus subscriptions,
42
+ * and persists state. Call from DaemonServer.stop().
43
+ */
44
+ stop(): Promise<void>;
45
+ /**
46
+ * Wire the broker to a RuntimeEventBus so agent terminal events automatically
47
+ * reconcile session inputs and task state.
48
+ *
49
+ * Call once after both the broker and the bus are constructed. Returns an
50
+ * unsubscribe function that tears down the subscriptions.
51
+ *
52
+ * @param bus - The active RuntimeEventBus.
53
+ * @param sessionResolver - Maps agentId → sessionId for the active session.
54
+ * Return `null` when the agent is not associated with a shared session.
55
+ */
56
+ attachRuntimeBus(bus: RuntimeEventBus, sessionResolver: (agentId: string) => string | null): () => void;
26
57
  setContinuationRunner(runner: SharedSessionContinuationRunner | null): void;
27
58
  start(): Promise<void>;
28
59
  listSessions(limit?: number): SharedSessionRecord[];
@@ -68,6 +99,20 @@ export declare class SharedSessionBroker {
68
99
  private claimNextQueuedInput;
69
100
  private finalizeAgentInputs;
70
101
  private runQueuedFollowUp;
102
+ private _touch;
71
103
  private refreshPendingInputCount;
104
+ /**
105
+ * Periodic idle-session GC sweep.
106
+ *
107
+ * Policy:
108
+ * - Sessions with messageCount === 0 AND no active agent AND idle longer than
109
+ * `_idleEmptyMs` (default 10min) are closed with reason `idle-empty`.
110
+ * - Sessions with messageCount > 0 AND no active agent AND idle longer than
111
+ * `_idleLongMs` (default 24h) are closed with reason `idle-long`.
112
+ *
113
+ * "Idle" is measured from `lastActivityAt` (updated on createInput/bindAgent/
114
+ * appendMessage). Sessions with an active agent are never GC'd.
115
+ */
116
+ private _gcSweep;
72
117
  }
73
118
  //# sourceMappingURL=session-broker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"session-broker.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/control-plane/session-broker.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AAE/F,OAAO,KAAK,EACV,uBAAuB,EACvB,+BAA+B,EAE/B,wBAAwB,EACzB,MAAM,8DAA8D,CAAC;AACtE,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EAEpB,wBAAwB,EACxB,mBAAmB,EACnB,uBAAuB,EACvB,8BAA8B,EAC9B,+BAA+B,EAChC,MAAM,4DAA4D,CAAC;AACpE,OAAO,EAEL,KAAK,gCA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