agent-orchestrator-mcp-server 0.8.8 → 0.8.9
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/README.md +11 -10
- package/package.json +1 -1
- package/shared/orchestrator-client/orchestrator-client.d.ts +3 -1
- package/shared/orchestrator-client/orchestrator-client.integration-mock.d.ts +7 -0
- package/shared/orchestrator-client/orchestrator-client.integration-mock.js +18 -0
- package/shared/orchestrator-client/orchestrator-client.js +10 -0
- package/shared/tools/respond-to-elicitation.d.ts +53 -0
- package/shared/tools/respond-to-elicitation.js +95 -0
- package/shared/tools.js +9 -2
- package/shared/types.d.ts +15 -0
package/README.md
CHANGED
|
@@ -31,6 +31,7 @@ MCP server for PulseMCP's agent-orchestrator: a Claude Code + MCP-powered agent-
|
|
|
31
31
|
| `action_session` | sessions | write | Perform actions: follow_up, pause, restart, archive, unarchive, change_mcp_servers, change_model, fork, refresh, refresh_all, update_notes, update_title, toggle_favorite, bulk_archive |
|
|
32
32
|
| `manage_enqueued_messages` | sessions | write | Manage session message queue: list, get, create, update, delete, reorder, interrupt |
|
|
33
33
|
| `manage_categories` | sessions | write | Manage dashboard categories that organize sessions: list, create, update, delete, reorder, set_session_category |
|
|
34
|
+
| `respond_to_elicitation` | sessions | write | Accept or decline a pending elicitation by its request_id, with optional structured content on accept |
|
|
34
35
|
| `get_notifications` | notifications | read | Get/list notifications and badge count |
|
|
35
36
|
| `send_push_notification` | notifications | write | Send a push notification about a session needing human attention |
|
|
36
37
|
| `action_notification` | notifications | write | Mark read, mark all read, dismiss, dismiss all read notifications |
|
|
@@ -57,16 +58,16 @@ This server organizes tools into groups that can be selectively enabled or disab
|
|
|
57
58
|
|
|
58
59
|
Control which tools are available via the `TOOL_GROUPS` environment variable:
|
|
59
60
|
|
|
60
|
-
| Group | Description
|
|
61
|
-
| ------------------------ |
|
|
62
|
-
| `sessions` | All session tools (read + write): search, get, configs, transcript_archive, start, action, enqueued msgs, categories |
|
|
63
|
-
| `sessions_readonly` | Session tools (read only): quick_search_sessions, get_session, get_configs, get_transcript_archive
|
|
64
|
-
| `notifications` | All notification tools (read + write): get, send, mark read, dismiss
|
|
65
|
-
| `notifications_readonly` | Notification tools (read only): get_notifications
|
|
66
|
-
| `triggers` | All trigger tools (read + write): search, create, update, delete, toggle
|
|
67
|
-
| `triggers_readonly` | Trigger tools (read only): search_triggers
|
|
68
|
-
| `health` | All health tools (read + write): health report, CLI status, maintenance
|
|
69
|
-
| `health_readonly` | Health tools (read only): get_system_health
|
|
61
|
+
| Group | Description |
|
|
62
|
+
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
63
|
+
| `sessions` | All session tools (read + write): search, get, configs, transcript_archive, start, action, enqueued msgs, categories, elicitations |
|
|
64
|
+
| `sessions_readonly` | Session tools (read only): quick_search_sessions, get_session, get_configs, get_transcript_archive |
|
|
65
|
+
| `notifications` | All notification tools (read + write): get, send, mark read, dismiss |
|
|
66
|
+
| `notifications_readonly` | Notification tools (read only): get_notifications |
|
|
67
|
+
| `triggers` | All trigger tools (read + write): search, create, update, delete, toggle |
|
|
68
|
+
| `triggers_readonly` | Trigger tools (read only): search_triggers |
|
|
69
|
+
| `health` | All health tools (read + write): health report, CLI status, maintenance |
|
|
70
|
+
| `health_readonly` | Health tools (read only): get_system_health |
|
|
70
71
|
|
|
71
72
|
**Examples:**
|
|
72
73
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* A client for interacting with the Agent Orchestrator REST API.
|
|
5
5
|
*/
|
|
6
|
-
import type { Session, Log, SubagentTranscript, SessionsResponse, SearchSessionsResponse, SessionActionResponse, LogsResponse, SubagentTranscriptsResponse, CreateSessionRequest, UpdateSessionRequest, CreateLogRequest, UpdateLogRequest, CreateSubagentTranscriptRequest, UpdateSubagentTranscriptRequest, SessionStatus, LogLevel, SubagentStatus, MCPServerInfo, AgentRootInfo, ConfigsResponse, SendPushNotificationResponse, EnqueuedMessage, EnqueuedMessagesResponse, EnqueuedMessageInterruptResponse, EnqueuedMessageStatus, Category, CategoriesResponse, CreateCategoryRequest, UpdateCategoryRequest, SetSessionCategoryResponse, Trigger, TriggerType, TriggerStatus, TriggersResponse, TriggerResponse, TriggerChannelsResponse, CreateTriggerRequest, UpdateTriggerRequest, Notification, NotificationsResponse, NotificationBadgeResponse, NotificationMarkAllReadResponse, NotificationDismissAllReadResponse, HealthReport, HealthActionResponse, CliStatusResponse, CliActionResponse, ForkSessionResponse, RefreshSessionResponse, RefreshAllSessionsResponse, BulkArchiveResponse, TranscriptResponse, TranscriptArchiveStatusResponse } from '../types.js';
|
|
6
|
+
import type { Session, Log, SubagentTranscript, SessionsResponse, SearchSessionsResponse, SessionActionResponse, LogsResponse, SubagentTranscriptsResponse, CreateSessionRequest, UpdateSessionRequest, CreateLogRequest, UpdateLogRequest, CreateSubagentTranscriptRequest, UpdateSubagentTranscriptRequest, SessionStatus, LogLevel, SubagentStatus, MCPServerInfo, AgentRootInfo, ConfigsResponse, SendPushNotificationResponse, EnqueuedMessage, EnqueuedMessagesResponse, EnqueuedMessageInterruptResponse, EnqueuedMessageStatus, Category, CategoriesResponse, CreateCategoryRequest, UpdateCategoryRequest, SetSessionCategoryResponse, Trigger, TriggerType, TriggerStatus, TriggersResponse, TriggerResponse, TriggerChannelsResponse, CreateTriggerRequest, UpdateTriggerRequest, Notification, NotificationsResponse, NotificationBadgeResponse, NotificationMarkAllReadResponse, NotificationDismissAllReadResponse, HealthReport, HealthActionResponse, CliStatusResponse, CliActionResponse, ForkSessionResponse, RefreshSessionResponse, RefreshAllSessionsResponse, BulkArchiveResponse, TranscriptResponse, TranscriptArchiveStatusResponse, ElicitationActionType, ElicitationResponse } from '../types.js';
|
|
7
7
|
/** Raw agent root shape as returned by the Rails API */
|
|
8
8
|
export interface RawAgentRoot {
|
|
9
9
|
name: string;
|
|
@@ -148,6 +148,7 @@ export interface IAgentOrchestratorClient {
|
|
|
148
148
|
url: string;
|
|
149
149
|
apiKey: string;
|
|
150
150
|
};
|
|
151
|
+
respondToElicitation(requestId: string, actionType: ElicitationActionType, content?: Record<string, unknown>): Promise<ElicitationResponse>;
|
|
151
152
|
}
|
|
152
153
|
/**
|
|
153
154
|
* Implementation of the Agent Orchestrator API client.
|
|
@@ -281,5 +282,6 @@ export declare class AgentOrchestratorClient implements IAgentOrchestratorClient
|
|
|
281
282
|
url: string;
|
|
282
283
|
apiKey: string;
|
|
283
284
|
};
|
|
285
|
+
respondToElicitation(requestId: string, actionType: ElicitationActionType, content?: Record<string, unknown>): Promise<ElicitationResponse>;
|
|
284
286
|
}
|
|
285
287
|
//# sourceMappingURL=orchestrator-client.d.ts.map
|
|
@@ -5,11 +5,18 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { IAgentOrchestratorClient } from './orchestrator-client.js';
|
|
7
7
|
import type { Session, Log, SubagentTranscript, Category } from '../types.js';
|
|
8
|
+
/** Minimal elicitation record used to simulate the respond endpoint. */
|
|
9
|
+
export interface MockElicitation {
|
|
10
|
+
request_id: string;
|
|
11
|
+
status: 'pending' | 'accept' | 'decline';
|
|
12
|
+
content?: Record<string, unknown> | null;
|
|
13
|
+
}
|
|
8
14
|
interface MockData {
|
|
9
15
|
sessions?: Session[];
|
|
10
16
|
logs?: Log[];
|
|
11
17
|
subagentTranscripts?: SubagentTranscript[];
|
|
12
18
|
categories?: Category[];
|
|
19
|
+
elicitations?: MockElicitation[];
|
|
13
20
|
}
|
|
14
21
|
/**
|
|
15
22
|
* Creates a mock Agent Orchestrator client for integration testing.
|
|
@@ -76,6 +76,7 @@ export function createIntegrationMockOrchestratorClient(initialMockData) {
|
|
|
76
76
|
updated_at: '2025-01-15T14:00:00Z',
|
|
77
77
|
},
|
|
78
78
|
],
|
|
79
|
+
elicitations: initialMockData?.elicitations || [],
|
|
79
80
|
};
|
|
80
81
|
let sessionIdCounter = mockData.sessions?.length || 1;
|
|
81
82
|
let logIdCounter = mockData.logs?.length || 1;
|
|
@@ -912,5 +913,22 @@ export function createIntegrationMockOrchestratorClient(initialMockData) {
|
|
|
912
913
|
apiKey: 'test-api-key',
|
|
913
914
|
};
|
|
914
915
|
},
|
|
916
|
+
// Elicitations
|
|
917
|
+
async respondToElicitation(requestId, actionType, content) {
|
|
918
|
+
const elicitation = mockData.elicitations?.find((e) => e.request_id === requestId);
|
|
919
|
+
if (!elicitation) {
|
|
920
|
+
throw new Error(`API Error (404): Elicitation not found for request_id: ${requestId}`);
|
|
921
|
+
}
|
|
922
|
+
if (elicitation.status !== 'pending') {
|
|
923
|
+
throw new Error(`API Error (422): Elicitation ${requestId} is not pending (status: ${elicitation.status})`);
|
|
924
|
+
}
|
|
925
|
+
elicitation.status = actionType;
|
|
926
|
+
elicitation.content = actionType === 'accept' ? (content ?? null) : null;
|
|
927
|
+
return {
|
|
928
|
+
action: actionType,
|
|
929
|
+
content: elicitation.content,
|
|
930
|
+
_meta: { 'com.pulsemcp/request-id': requestId },
|
|
931
|
+
};
|
|
932
|
+
},
|
|
915
933
|
};
|
|
916
934
|
}
|
|
@@ -461,4 +461,14 @@ export class AgentOrchestratorClient {
|
|
|
461
461
|
apiKey: this.apiKey,
|
|
462
462
|
};
|
|
463
463
|
}
|
|
464
|
+
// Elicitations
|
|
465
|
+
async respondToElicitation(requestId, actionType, content) {
|
|
466
|
+
const body = {
|
|
467
|
+
action_type: actionType,
|
|
468
|
+
};
|
|
469
|
+
if (content !== undefined) {
|
|
470
|
+
body.content = content;
|
|
471
|
+
}
|
|
472
|
+
return this.request('PATCH', `/elicitations/${encodeURIComponent(requestId)}/respond`, body);
|
|
473
|
+
}
|
|
464
474
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import type { IAgentOrchestratorClient } from '../orchestrator-client/orchestrator-client.js';
|
|
4
|
+
export declare const RespondToElicitationSchema: z.ZodObject<{
|
|
5
|
+
request_id: z.ZodString;
|
|
6
|
+
action_type: z.ZodEnum<["accept", "decline"]>;
|
|
7
|
+
content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
request_id: string;
|
|
10
|
+
action_type: "accept" | "decline";
|
|
11
|
+
content?: Record<string, unknown> | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
request_id: string;
|
|
14
|
+
action_type: "accept" | "decline";
|
|
15
|
+
content?: Record<string, unknown> | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
export declare function respondToElicitationTool(_server: Server, clientFactory: () => IAgentOrchestratorClient): {
|
|
18
|
+
name: string;
|
|
19
|
+
description: string;
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: "object";
|
|
22
|
+
properties: {
|
|
23
|
+
request_id: {
|
|
24
|
+
type: string;
|
|
25
|
+
description: "The elicitation `request_id` — the public identifier the MCP server assigned when it created the elicitation (the `com.pulsemcp/request-id` value, surfaced in the poll URL). This is NOT the database primary key.";
|
|
26
|
+
};
|
|
27
|
+
action_type: {
|
|
28
|
+
type: string;
|
|
29
|
+
enum: string[];
|
|
30
|
+
description: "How to resolve the elicitation. \"accept\" approves the request and lets the paused MCP flow continue (optionally with structured `content`); \"decline\" rejects it and unblocks the flow with a declined outcome.";
|
|
31
|
+
};
|
|
32
|
+
content: {
|
|
33
|
+
type: string;
|
|
34
|
+
description: "Optional structured JSON object supplied with an \"accept\" response (e.g. the form fields the elicitation requested). Ignored for \"decline\". Must be a JSON object, not a scalar or array.";
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
required: string[];
|
|
38
|
+
};
|
|
39
|
+
handler: (args: unknown) => Promise<{
|
|
40
|
+
content: {
|
|
41
|
+
type: string;
|
|
42
|
+
text: string;
|
|
43
|
+
}[];
|
|
44
|
+
isError?: undefined;
|
|
45
|
+
} | {
|
|
46
|
+
content: {
|
|
47
|
+
type: string;
|
|
48
|
+
text: string;
|
|
49
|
+
}[];
|
|
50
|
+
isError: boolean;
|
|
51
|
+
}>;
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=respond-to-elicitation.d.ts.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const PARAM_DESCRIPTIONS = {
|
|
3
|
+
request_id: 'The elicitation `request_id` — the public identifier the MCP server assigned when it created the elicitation (the `com.pulsemcp/request-id` value, surfaced in the poll URL). This is NOT the database primary key.',
|
|
4
|
+
action_type: 'How to resolve the elicitation. "accept" approves the request and lets the paused MCP flow continue (optionally with structured `content`); "decline" rejects it and unblocks the flow with a declined outcome.',
|
|
5
|
+
content: 'Optional structured JSON object supplied with an "accept" response (e.g. the form fields the elicitation requested). Ignored for "decline". Must be a JSON object, not a scalar or array.',
|
|
6
|
+
};
|
|
7
|
+
export const RespondToElicitationSchema = z.object({
|
|
8
|
+
request_id: z.string().min(1).describe(PARAM_DESCRIPTIONS.request_id),
|
|
9
|
+
action_type: z.enum(['accept', 'decline']).describe(PARAM_DESCRIPTIONS.action_type),
|
|
10
|
+
content: z.record(z.unknown()).optional().describe(PARAM_DESCRIPTIONS.content),
|
|
11
|
+
});
|
|
12
|
+
const TOOL_DESCRIPTION = `Respond to a pending Agent Orchestrator elicitation request — programmatically accept or decline it so the paused MCP flow that is waiting on it can continue.
|
|
13
|
+
|
|
14
|
+
**Context:** When an MCP server needs human approval (e.g. a write-class action), it creates an *elicitation* and blocks, polling Agent Orchestrator until someone responds. Normally a human clicks "accept" / "decline" in the AO web UI. This tool exposes that same resolution over the API, so an agent or automated test can unblock the flow without a human in the loop.
|
|
15
|
+
|
|
16
|
+
**What it does:**
|
|
17
|
+
- Looks up the elicitation by its public \`request_id\` (the \`com.pulsemcp/request-id\` identifier, not the DB primary key).
|
|
18
|
+
- Records an \`accept\` (optionally with a structured \`content\` payload) or \`decline\`.
|
|
19
|
+
- Returns the elicitation's resulting poll-response so you can confirm the outcome.
|
|
20
|
+
|
|
21
|
+
**Example response:**
|
|
22
|
+
\`\`\`
|
|
23
|
+
## Elicitation Accepted
|
|
24
|
+
|
|
25
|
+
- **Request ID:** req-abc123
|
|
26
|
+
- **Action:** accept
|
|
27
|
+
- **Content:** { "approved": true }
|
|
28
|
+
\`\`\`
|
|
29
|
+
|
|
30
|
+
**Enum — action_type:**
|
|
31
|
+
- **accept** — Approve the request; the waiting MCP flow proceeds. Pass optional \`content\` to supply the structured data the elicitation asked for.
|
|
32
|
+
- **decline** — Reject the request; the waiting MCP flow unblocks with a declined outcome. \`content\` is ignored.
|
|
33
|
+
|
|
34
|
+
**Use cases:**
|
|
35
|
+
- Closed-loop testing of an MCP server's elicitation-gated behavior without a human clicking in the UI.
|
|
36
|
+
- Automating approval of a known, expected elicitation as part of a larger orchestrated task.
|
|
37
|
+
|
|
38
|
+
**Errors:**
|
|
39
|
+
- Unknown \`request_id\` → 404 (elicitation not found).
|
|
40
|
+
- Elicitation already resolved / not pending, or an invalid \`action_type\` → 422.`;
|
|
41
|
+
export function respondToElicitationTool(_server, clientFactory) {
|
|
42
|
+
return {
|
|
43
|
+
name: 'respond_to_elicitation',
|
|
44
|
+
description: TOOL_DESCRIPTION,
|
|
45
|
+
inputSchema: {
|
|
46
|
+
type: 'object',
|
|
47
|
+
properties: {
|
|
48
|
+
request_id: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
description: PARAM_DESCRIPTIONS.request_id,
|
|
51
|
+
},
|
|
52
|
+
action_type: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
enum: ['accept', 'decline'],
|
|
55
|
+
description: PARAM_DESCRIPTIONS.action_type,
|
|
56
|
+
},
|
|
57
|
+
content: {
|
|
58
|
+
type: 'object',
|
|
59
|
+
description: PARAM_DESCRIPTIONS.content,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
required: ['request_id', 'action_type'],
|
|
63
|
+
},
|
|
64
|
+
handler: async (args) => {
|
|
65
|
+
try {
|
|
66
|
+
const { request_id, action_type, content } = RespondToElicitationSchema.parse(args);
|
|
67
|
+
const client = clientFactory();
|
|
68
|
+
const response = await client.respondToElicitation(request_id, action_type, content);
|
|
69
|
+
const lines = [
|
|
70
|
+
`## Elicitation ${action_type === 'accept' ? 'Accepted' : 'Declined'}`,
|
|
71
|
+
'',
|
|
72
|
+
`- **Request ID:** ${request_id}`,
|
|
73
|
+
`- **Action:** ${response.action}`,
|
|
74
|
+
];
|
|
75
|
+
if (response.content != null) {
|
|
76
|
+
lines.push(`- **Content:** ${JSON.stringify(response.content)}`);
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
content: [{ type: 'text', text: lines.join('\n') }],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
return {
|
|
84
|
+
content: [
|
|
85
|
+
{
|
|
86
|
+
type: 'text',
|
|
87
|
+
text: `Error responding to elicitation: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
isError: true,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
}
|
package/shared/tools.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ListToolsRequestSchema, CallToolRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
-
//
|
|
2
|
+
// 18 tools across 4 domains + 1 composite group
|
|
3
3
|
import { quickSearchSessionsTool } from './tools/search-sessions.js';
|
|
4
4
|
import { startSessionTool } from './tools/start-session.js';
|
|
5
5
|
import { getSessionTool } from './tools/get-session.js';
|
|
@@ -17,6 +17,7 @@ import { wakeMeUpWhenSessionChangesStateTool } from './tools/wake-me-up-when-ses
|
|
|
17
17
|
import { getSystemHealthTool } from './tools/get-system-health.js';
|
|
18
18
|
import { actionHealthTool } from './tools/action-health.js';
|
|
19
19
|
import { getTranscriptArchiveTool } from './tools/get-transcript-archive.js';
|
|
20
|
+
import { respondToElicitationTool } from './tools/respond-to-elicitation.js';
|
|
20
21
|
/**
|
|
21
22
|
* All valid tool groups (domain groups, their _readonly variants, and composite groups)
|
|
22
23
|
*/
|
|
@@ -62,7 +63,7 @@ export function parseEnabledToolGroups(enabledGroupsParam) {
|
|
|
62
63
|
/**
|
|
63
64
|
* All available tools with their group assignments.
|
|
64
65
|
*
|
|
65
|
-
*
|
|
66
|
+
* 18 tools across 4 domains + 1 composite group:
|
|
66
67
|
* - quick_search_sessions: Quick title-based search/list/get sessions by ID (sessions, read)
|
|
67
68
|
* - get_session: Get detailed session info with optional logs/transcripts (sessions, read; self_session)
|
|
68
69
|
* - get_configs: Fetch all static configuration (sessions, read; self_session)
|
|
@@ -71,6 +72,7 @@ export function parseEnabledToolGroups(enabledGroupsParam) {
|
|
|
71
72
|
* - action_session: Perform session actions (sessions, write; self_session: filtered to update_notes, update_title, archive)
|
|
72
73
|
* - manage_enqueued_messages: Manage session message queue (sessions, write)
|
|
73
74
|
* - manage_categories: Manage dashboard categories and session assignment (sessions, write)
|
|
75
|
+
* - respond_to_elicitation: Accept or decline a pending elicitation by request_id (sessions, write)
|
|
74
76
|
* - get_notifications: Get/list notifications and badge count (notifications, read)
|
|
75
77
|
* - send_push_notification: Send a push notification (notifications, write; self_session)
|
|
76
78
|
* - action_notification: Mark read, dismiss notifications (notifications, write)
|
|
@@ -126,6 +128,11 @@ const ALL_TOOLS = [
|
|
|
126
128
|
group: 'sessions',
|
|
127
129
|
isWriteOperation: true,
|
|
128
130
|
},
|
|
131
|
+
{
|
|
132
|
+
factory: respondToElicitationTool,
|
|
133
|
+
group: 'sessions',
|
|
134
|
+
isWriteOperation: true,
|
|
135
|
+
},
|
|
129
136
|
// Notification tools - read operations
|
|
130
137
|
{
|
|
131
138
|
factory: getNotificationsTool,
|
package/shared/types.d.ts
CHANGED
|
@@ -402,6 +402,21 @@ export interface BulkArchiveResponse {
|
|
|
402
402
|
export interface TranscriptResponse {
|
|
403
403
|
transcript_text: string;
|
|
404
404
|
}
|
|
405
|
+
/** Action taken when responding to a pending elicitation. */
|
|
406
|
+
export type ElicitationActionType = 'accept' | 'decline';
|
|
407
|
+
/**
|
|
408
|
+
* Poll-response shape returned by the elicitation endpoints.
|
|
409
|
+
*
|
|
410
|
+
* `action` is `"pending"` while the elicitation is still open, or the resolved
|
|
411
|
+
* status (e.g. `"accept"` / `"decline"`) once a response has been recorded.
|
|
412
|
+
* `content` carries the structured payload supplied with an accepted response
|
|
413
|
+
* (null when pending or when no content was provided).
|
|
414
|
+
*/
|
|
415
|
+
export interface ElicitationResponse {
|
|
416
|
+
action: string;
|
|
417
|
+
content: Record<string, unknown> | null;
|
|
418
|
+
_meta?: Record<string, unknown>;
|
|
419
|
+
}
|
|
405
420
|
export interface TranscriptArchiveStatusResponse {
|
|
406
421
|
generated_at: string;
|
|
407
422
|
session_count: number;
|