@deepseek-ai/dsh-user-questions 0.2.2-rc.4 → 0.2.3-alpha.1
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/lib/index.js +31 -8
- package/lib/typert.host.js +35 -15
- package/lib/typert.remote-client.d.ts +1 -1
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +8 -8
- package/lib/types/index.d.ts +25 -4
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +32 -5
- package/lib/types/index.js.map +1 -1
- package/lib/types/projection.d.ts.map +1 -1
- package/lib/types/projection.js +3 -3
- package/lib/types/projection.js.map +1 -1
- package/lib/types/types.d.ts +1 -1
- package/package.json +17 -15
- package/src/index.ts +31 -5
- package/src/projection.ts +4 -3
- package/src/types.ts +1 -1
package/lib/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Service } from "@deepseek-ai/cordis";
|
|
2
|
-
import { HarnessError,
|
|
2
|
+
import { HarnessError, createUserMessage } from "@deepseek-ai/dsh-llm";
|
|
3
3
|
import { scopeTarget } from "@deepseek-ai/dsh-scope";
|
|
4
4
|
import { Remote, TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
|
|
5
5
|
import z from "@deepseek-ai/schemastery";
|
|
6
6
|
import { z as z$1 } from "zod";
|
|
7
7
|
import { SessionLogOffset, TOOL_OUTCOME_UNKNOWN } from "@deepseek-ai/dsh-session";
|
|
8
|
+
import { brandString } from "@deepseek-ai/dsh-brand";
|
|
8
9
|
/**
|
|
9
10
|
* Model-facing parameter only the timed `ask_user_question` schema declares.
|
|
10
11
|
* Its presence in the logged request header is what tells the fold that the
|
|
@@ -47,7 +48,7 @@ const questionSchema = z$1.object({
|
|
|
47
48
|
...question.multiSelect === void 0 ? {} : { multiSelect: question.multiSelect }
|
|
48
49
|
}));
|
|
49
50
|
const pendingQuestionsSchema = z$1.array(z$1.object({
|
|
50
|
-
callId: z$1.string().min(1).transform(
|
|
51
|
+
callId: z$1.string().min(1).transform(brandString),
|
|
51
52
|
questions: z$1.array(questionSchema).min(1),
|
|
52
53
|
state: z$1.enum(["open", "continued"])
|
|
53
54
|
}).strict()).superRefine((active, context) => {
|
|
@@ -66,7 +67,7 @@ const answerSchema = z$1.object({
|
|
|
66
67
|
...answer.custom === void 0 ? {} : { custom: answer.custom }
|
|
67
68
|
}));
|
|
68
69
|
const settledQuestionsSchema = z$1.array(z$1.object({
|
|
69
|
-
callId: z$1.string().min(1).transform(
|
|
70
|
+
callId: z$1.string().min(1).transform(brandString),
|
|
70
71
|
answers: z$1.array(answerSchema)
|
|
71
72
|
}).strict());
|
|
72
73
|
const projectionViewSchema = z$1.object({
|
|
@@ -548,11 +549,29 @@ let UserQuestionService = (() => {
|
|
|
548
549
|
* Answer a continued question. The reply is steered into the agent as a
|
|
549
550
|
* user message whose source names the call; that message is also the
|
|
550
551
|
* record that closes the question in the projection.
|
|
552
|
+
*
|
|
553
|
+
* The only call this method can answer is one the projection lists as
|
|
554
|
+
* `continued` on this Session, and it steers a user message into the running
|
|
555
|
+
* turn, so it speaks for the person the Session runs for. A LiveShare reader
|
|
556
|
+
* reaches it through the Session read role, which is safe only while an
|
|
557
|
+
* approval question cannot become `continued`: the projection tracks only
|
|
558
|
+
* calls made under the timed `ask_user_question` schema, and a call becomes
|
|
559
|
+
* `continued` only by returning the pending result a timed wait produces (or,
|
|
560
|
+
* for PTC, a pending dispatch) or by resume repair recording
|
|
561
|
+
* `TOOL_OUTCOME_UNKNOWN` for a call the process never finished. Plan review
|
|
562
|
+
* (`plan-review`) and the CUA approvals (`approval`) reach `ctx.userQuestions.ask`
|
|
563
|
+
* without a `wait` and without a `timeout`, so their result is a settled
|
|
564
|
+
* answer, an abort, or a failure, never a pending result, and they stay out
|
|
565
|
+
* of the projection. A future approval surface must keep asking without
|
|
566
|
+
* `wait`/`timeout`, or it must gain its own owner-only gate; giving it a timed
|
|
567
|
+
* form makes an approval answerable by a share viewer.
|
|
551
568
|
* @param agent - Live root agent for the owning Session.
|
|
552
569
|
* @param callId - Continued question identity.
|
|
553
570
|
* @param answer - Complete structured answer batch, one item per question of the call.
|
|
554
|
-
* @returns Whether the question is still continued
|
|
555
|
-
*
|
|
571
|
+
* @returns Whether the question is still continued (`false` when this Session
|
|
572
|
+
* lists no such continued call, or its composition carries no Session
|
|
573
|
+
* projections); an accepted reply stays queued until the agent admits its
|
|
574
|
+
* user message.
|
|
556
575
|
* @throws {UserQuestionError} `BAD_ANSWER` when the batch does not name each
|
|
557
576
|
* question of the call exactly once, or `REPLY_QUEUED` when a reply is
|
|
558
577
|
* already waiting for admission.
|
|
@@ -669,8 +688,11 @@ let UserQuestionService = (() => {
|
|
|
669
688
|
* @returns The answer chosen or typed by the human.
|
|
670
689
|
* @throws {UserQuestionError} code `ASK_ABORTED` when the supplied signal
|
|
671
690
|
* is already or becomes aborted, `CALLER_NOT_LIVE` when a supplied agent
|
|
672
|
-
* is not the registry's exact live instance,
|
|
673
|
-
* that live agent has subagent origin
|
|
691
|
+
* is not the registry's exact live instance, `DELEGATED_CALLER` when
|
|
692
|
+
* that live agent has subagent origin, or `PROVIDER_ERROR`, keeping the
|
|
693
|
+
* original message, when an answerer fails with a value that is not a
|
|
694
|
+
* `HarnessError`; a coded `HarnessError` from an answerer keeps its `name`
|
|
695
|
+
* and `code`.
|
|
674
696
|
*/
|
|
675
697
|
async ask(request) {
|
|
676
698
|
if (request.signal?.aborted) throw abortedQuestion();
|
|
@@ -713,7 +735,8 @@ let UserQuestionService = (() => {
|
|
|
713
735
|
const restored = restoreUserQuestionError(error);
|
|
714
736
|
if (restored instanceof UserQuestionError) throw restored;
|
|
715
737
|
if (request.signal?.aborted) throw abortedQuestion(error);
|
|
716
|
-
throw restored;
|
|
738
|
+
if (restored instanceof HarnessError) throw restored;
|
|
739
|
+
throw new UserQuestionError(error instanceof Error ? error.message : "the user-questions answerer failed before the user answered", "PROVIDER_ERROR", { cause: error });
|
|
717
740
|
}
|
|
718
741
|
}
|
|
719
742
|
};
|
package/lib/typert.host.js
CHANGED
|
@@ -47,7 +47,7 @@ const $remote = createTypertRemoteInfo({
|
|
|
47
47
|
methods: {
|
|
48
48
|
'userQuestions/answer': {
|
|
49
49
|
service: 'userQuestions',
|
|
50
|
-
description: 'Answer a continued question. The reply is steered into the agent as a user message whose source names the call; that message is also the record that closes the question in the projection.',
|
|
50
|
+
description: 'Answer a continued question. The reply is steered into the agent as a user message whose source names the call; that message is also the record that closes the question in the projection. The only call this method can answer is one the projection lists as `continued` on this Session, and it steers a user message into the running turn, so it speaks for the person the Session runs for. A LiveShare reader reaches it through the Session read role, which is safe only while an approval question cannot become `continued`: the projection tracks only calls made under the timed `ask_user_question` schema, and a call becomes `continued` only by returning the pending result a timed wait produces (or, for PTC, a pending dispatch) or by resume repair recording `TOOL_OUTCOME_UNKNOWN` for a call the process never finished. Plan review (`plan-review`) and the CUA approvals (`approval`) reach `ctx.userQuestions.ask` without a `wait` and without a `timeout`, so their result is a settled answer, an abort, or a failure, never a pending result, and they stay out of the projection. A future approval surface must keep asking without `wait`/`timeout`, or it must gain its own owner-only gate; giving it a timed form makes an approval answerable by a share viewer.',
|
|
51
51
|
invocation: { kind: 'direct' },
|
|
52
52
|
scope: {
|
|
53
53
|
context: 'agent',
|
|
@@ -79,13 +79,13 @@ const $remote = createTypertRemoteInfo({
|
|
|
79
79
|
source: 'json',
|
|
80
80
|
codec: {
|
|
81
81
|
mode: 'strict',
|
|
82
|
-
typeSymbol: '@deepseek-ai/dsh-llm/
|
|
82
|
+
typeSymbol: '@deepseek-ai/dsh-llm/types#ToolCallId',
|
|
83
83
|
create: _deepseek_ai_dsh_user_questions_userQuestions_answer_parameter_1$schema,
|
|
84
84
|
jsonSchema: {"type":"string"},
|
|
85
85
|
},
|
|
86
86
|
strictCodec: {
|
|
87
87
|
mode: 'strict',
|
|
88
|
-
typeSymbol: '@deepseek-ai/dsh-llm/
|
|
88
|
+
typeSymbol: '@deepseek-ai/dsh-llm/types#ToolCallId',
|
|
89
89
|
create: _deepseek_ai_dsh_user_questions_userQuestions_answer_parameter_1_strict$schema,
|
|
90
90
|
jsonSchema: {"type":"string"},
|
|
91
91
|
},
|
|
@@ -112,10 +112,10 @@ const $remote = createTypertRemoteInfo({
|
|
|
112
112
|
mode: 'strict',
|
|
113
113
|
typeSymbol: '@deepseek-ai/dsh-user-questions#userQuestions/answer:result',
|
|
114
114
|
create: _deepseek_ai_dsh_user_questions_userQuestions_answer_result$schema,
|
|
115
|
-
description: 'Whether the question is still continued; an accepted reply stays queued until the agent admits its user message.',
|
|
115
|
+
description: 'Whether the question is still continued (`false` when this Session lists no such continued call, or its composition carries no Session projections); an accepted reply stays queued until the agent admits its user message.',
|
|
116
116
|
jsonSchema: {"type":"boolean"},
|
|
117
117
|
},
|
|
118
|
-
sourceLocation: {"file":"packages/interaction/user-questions/src/index.ts","line":
|
|
118
|
+
sourceLocation: {"file":"packages/interaction/user-questions/src/index.ts","line":188,"column":3},
|
|
119
119
|
},
|
|
120
120
|
'userQuestions/attachWait': {
|
|
121
121
|
service: 'userQuestions',
|
|
@@ -152,13 +152,13 @@ const $remote = createTypertRemoteInfo({
|
|
|
152
152
|
source: 'json',
|
|
153
153
|
codec: {
|
|
154
154
|
mode: 'strict',
|
|
155
|
-
typeSymbol: '@deepseek-ai/dsh-llm/
|
|
155
|
+
typeSymbol: '@deepseek-ai/dsh-llm/types#ToolCallId',
|
|
156
156
|
create: _deepseek_ai_dsh_user_questions_userQuestions_attachWait_parameter_1$schema,
|
|
157
157
|
jsonSchema: {"type":"string"},
|
|
158
158
|
},
|
|
159
159
|
strictCodec: {
|
|
160
160
|
mode: 'strict',
|
|
161
|
-
typeSymbol: '@deepseek-ai/dsh-llm/
|
|
161
|
+
typeSymbol: '@deepseek-ai/dsh-llm/types#ToolCallId',
|
|
162
162
|
create: _deepseek_ai_dsh_user_questions_userQuestions_attachWait_parameter_1_strict$schema,
|
|
163
163
|
jsonSchema: {"type":"string"},
|
|
164
164
|
},
|
|
@@ -172,7 +172,7 @@ const $remote = createTypertRemoteInfo({
|
|
|
172
172
|
description: 'One Host-computed remaining duration, or no frames once the wait ended.',
|
|
173
173
|
jsonSchema: {"type":"object","properties":{"remainingMs":{"type":"number"}},"required":["remainingMs"],"additionalProperties":true},
|
|
174
174
|
},
|
|
175
|
-
sourceLocation: {"file":"packages/interaction/user-questions/src/index.ts","line":
|
|
175
|
+
sourceLocation: {"file":"packages/interaction/user-questions/src/index.ts","line":242,"column":10},
|
|
176
176
|
},
|
|
177
177
|
},
|
|
178
178
|
}, z)
|
|
@@ -198,7 +198,7 @@ export const TYPERT = {
|
|
|
198
198
|
"name": "answer",
|
|
199
199
|
"signature": "@Remote answer(agent: Agent, callId: ToolCallId, answer: AskUserQuestionAnswer): boolean",
|
|
200
200
|
"summary": "Answer a continued question.",
|
|
201
|
-
"jsDoc": "/**\n * Answer a continued question. The reply is steered into the agent as a\n * user message whose source names the call; that message is also the\n * record that closes the question in the projection.\n * @param agent - Live root agent for the owning Session.\n * @param callId - Continued question identity.\n * @param answer - Complete structured answer batch, one item per question of the call.\n * @returns Whether the question is still continued; an accepted reply stays
|
|
201
|
+
"jsDoc": "/**\n * Answer a continued question. The reply is steered into the agent as a\n * user message whose source names the call; that message is also the\n * record that closes the question in the projection.\n *\n * The only call this method can answer is one the projection lists as\n * `continued` on this Session, and it steers a user message into the running\n * turn, so it speaks for the person the Session runs for. A LiveShare reader\n * reaches it through the Session read role, which is safe only while an\n * approval question cannot become `continued`: the projection tracks only\n * calls made under the timed `ask_user_question` schema, and a call becomes\n * `continued` only by returning the pending result a timed wait produces (or,\n * for PTC, a pending dispatch) or by resume repair recording\n * `TOOL_OUTCOME_UNKNOWN` for a call the process never finished. Plan review\n * (`plan-review`) and the CUA approvals (`approval`) reach `ctx.userQuestions.ask`\n * without a `wait` and without a `timeout`, so their result is a settled\n * answer, an abort, or a failure, never a pending result, and they stay out\n * of the projection. A future approval surface must keep asking without\n * `wait`/`timeout`, or it must gain its own owner-only gate; giving it a timed\n * form makes an approval answerable by a share viewer.\n * @param agent - Live root agent for the owning Session.\n * @param callId - Continued question identity.\n * @param answer - Complete structured answer batch, one item per question of the call.\n * @returns Whether the question is still continued (`false` when this Session\n * lists no such continued call, or its composition carries no Session\n * projections); an accepted reply stays queued until the agent admits its\n * user message.\n * @throws {UserQuestionError} `BAD_ANSWER` when the batch does not name each\n * question of the call exactly once, or `REPLY_QUEUED` when a reply is\n * already waiting for admission.\n */"
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
204
|
"kind": "method",
|
|
@@ -219,10 +219,22 @@ export const TYPERT = {
|
|
|
219
219
|
"name": "ask",
|
|
220
220
|
"signature": "async ask(request: AskUserQuestionRequest): Promise<AskUserQuestionAnswer>",
|
|
221
221
|
"summary": "Ask the scoped answerer waterfall and wait for the user's answer.",
|
|
222
|
-
"jsDoc": "/**\n * Ask the scoped answerer waterfall and wait for the user's answer.\n *\n * When a caller supplies an agent, human interaction is valid only for the\n * exact live instance of an ordinary Session. Explicit subagent origin\n * rejects delegated callers; historical ordinary forks may retain parent\n * metadata and still ask normally.\n *\n * @param request Questions, owner agent, and abort signal.\n * @returns The answer chosen or typed by the human.\n * @throws {UserQuestionError} code `ASK_ABORTED` when the supplied signal\n * is already or becomes aborted, `CALLER_NOT_LIVE` when a supplied agent\n * is not the registry's exact live instance,
|
|
222
|
+
"jsDoc": "/**\n * Ask the scoped answerer waterfall and wait for the user's answer.\n *\n * When a caller supplies an agent, human interaction is valid only for the\n * exact live instance of an ordinary Session. Explicit subagent origin\n * rejects delegated callers; historical ordinary forks may retain parent\n * metadata and still ask normally.\n *\n * @param request Questions, owner agent, and abort signal.\n * @returns The answer chosen or typed by the human.\n * @throws {UserQuestionError} code `ASK_ABORTED` when the supplied signal\n * is already or becomes aborted, `CALLER_NOT_LIVE` when a supplied agent\n * is not the registry's exact live instance, `DELEGATED_CALLER` when\n * that live agent has subagent origin, or `PROVIDER_ERROR`, keeping the\n * original message, when an answerer fails with a value that is not a\n * `HarnessError`; a coded `HarnessError` from an answerer keeps its `name`\n * and `code`.\n */"
|
|
223
223
|
}
|
|
224
224
|
],
|
|
225
225
|
"types": [
|
|
226
|
+
{
|
|
227
|
+
"name": "ActionCardDecision",
|
|
228
|
+
"declaration": "export interface ActionCardDecision {\n readonly cardId: ActionCardId;\n readonly action: string;\n readonly phase: string;\n readonly data?: ActionCardFields | undefined;\n}"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"name": "ActionCardFields",
|
|
232
|
+
"declaration": "export type ActionCardFields = Readonly<Record<string, JsonValue>>;"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"name": "ActionCardId",
|
|
236
|
+
"declaration": "export type ActionCardId = Branded<'ActionCardId'>;"
|
|
237
|
+
},
|
|
226
238
|
{
|
|
227
239
|
"name": "AfterScheduleRecord",
|
|
228
240
|
"declaration": "export interface AfterScheduleRecord {\n readonly id: ScheduleId;\n readonly kind: 'after';\n readonly title: string;\n readonly prompt: string;\n readonly afterSeconds: number;\n readonly scheduledAt: string;\n}"
|
|
@@ -477,7 +489,7 @@ export const TYPERT = {
|
|
|
477
489
|
},
|
|
478
490
|
{
|
|
479
491
|
"name": "JobOutcome",
|
|
480
|
-
"declaration": "export interface JobOutcome {\n status: 'completed' | 'killed' | 'failed';\n detail?: string;\n result?: string;\n}"
|
|
492
|
+
"declaration": "export interface JobOutcome {\n status: 'completed' | 'killed' | 'failed';\n detail?: string;\n exitCode?: number;\n result?: string;\n}"
|
|
481
493
|
},
|
|
482
494
|
{
|
|
483
495
|
"name": "JobRegisteredData",
|
|
@@ -585,7 +597,7 @@ export const TYPERT = {
|
|
|
585
597
|
},
|
|
586
598
|
{
|
|
587
599
|
"name": "MessageSourceMap",
|
|
588
|
-
"declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'system-prompt': SystemPromptMessageSource;\n 'model-selection': { kind: 'model-selection'; } & ContextFormed;\n '
|
|
600
|
+
"declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'system-prompt': SystemPromptMessageSource;\n 'model-selection': { kind: 'model-selection'; } & ContextFormed;\n 'skill-invocation': SkillInvocationSource;\n 'working-directory': { kind: 'working-directory'; };\n 'action-cards': { kind: 'action-cards'; through: SessionSeq; } & ContextFormed;\n 'tool-registry': { kind: 'tool-registry'; };\n 'runtime-context': { kind: 'runtime-context'; } & ContextFormed;\n 'team-message': TeamMessageSource;\n 'user-approval': { kind: 'user-approval'; } & ContextFormed;\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n 'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; principal?: Principal; };\n 'retry-rpc': { kind: 'retry'; rpcId: SessionRequestId; clientTimeZone?: string; principal?: Principal; };\n 'ptc-mode': { kind: 'ptc-mode'; };\n 'compact-checkpoint': CompactionCheckpointSource;\n 'cordis-host-runner': { kind: 'cordis-host-runner'; };\n 'user-question-reply': { kind: 'user-question-reply'; callId: ToolCallId; outcome: 'answered'; };\n 'cua-held-inputs': { kind: 'cua-held-inputs'; } & Extract<ContextFormed, { form: 'notice'; }>;\n 'cua-inputs-released': { kind: 'cua-inputs-released'; } & Extract<ContextFormed, { form: 'notice'; }>;\n goal: GoalMessageSource;\n 'plan-mode': { kind: 'plan-mode'; } & ContextFormed;\n schedule: { kind: 'schedule'; } & ContextFormed;\n 'session-reference': SessionReferenceSource;\n 'timeline-priority': { kind: 'timeline-priority'; form: 'notice'; summary: string; };\n webhook: { readonly kind: 'webhook'; readonly provider: string; readonly source: WebhookSourceId; readonly deliveryId: WebhookDeliveryId; readonly ruleId: WebhookRuleId; readonly form: 'notice'; readonly summary: string; };\n}"
|
|
589
601
|
},
|
|
590
602
|
{
|
|
591
603
|
"name": "Model",
|
|
@@ -693,7 +705,7 @@ export const TYPERT = {
|
|
|
693
705
|
},
|
|
694
706
|
{
|
|
695
707
|
"name": "SessionEventMap",
|
|
696
|
-
"declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'developer/message': { turn: number; step: number; message: DeveloperMessage; headerSeq?: SessionSeq; };\n 'system/message': { turn: number; step: number; message: SystemMessage; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; reason?: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'model/selection': ModelSelection;\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'agent-preset/selected': { agentPreset: string; };\n 'team/mode': { enabled: boolean; };\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n '
|
|
708
|
+
"declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'developer/message': { turn: number; step: number; message: DeveloperMessage; headerSeq?: SessionSeq; };\n 'system/message': { turn: number; step: number; message: SystemMessage; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; reason?: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'model/selection': ModelSelection;\n 'working-directory/change': { cwd: string; };\n 'workspace-root/change': { cwd: string; };\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'action-cards/decision': ActionCardDecision;\n 'agent-preset/selected': { agentPreset: string; };\n 'team/mode': { enabled: boolean; };\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n 'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n 'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'permission/preset': { preset: string; };\n 'subagent/descriptor': SubagentDescriptorData;\n 'subagent/catalog': SubagentCatalogEvent;\n 'job/registered': JobRegisteredData;\n 'job/settled': JobSettledData;\n 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n 'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n 'compaction/prune': { shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; };\n 'tool/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'feedback/record': FeedbackRecord;\n 'llm/retry': LlmRetryEventData;\n 'llm/retry-started': LlmRetryStartedEventData;\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'plan/mode': { active: boolean; };\n 'schedule/change': ScheduleChange;\n 'session-log-deepseek/delivery-accepted': { sessionId: import('@deepseek-ai/dsh-session/types').SessionId; sessionFormatVersion?: number; throughSeq: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'subagent/model-selection-policy': { allowedModels: AllowedModelRoute[]; };\n 'workspace/changes': { turn: number; };\n}"
|
|
697
709
|
},
|
|
698
710
|
{
|
|
699
711
|
"name": "SessionEventType",
|
|
@@ -725,7 +737,7 @@ export const TYPERT = {
|
|
|
725
737
|
},
|
|
726
738
|
{
|
|
727
739
|
"name": "SessionSurface",
|
|
728
|
-
"declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n readonly contentGeneration: number;\n}"
|
|
740
|
+
"declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly systemNodes: readonly SystemSurfaceNode[];\n readonly replaceGeneration: number;\n readonly contentGeneration: number;\n}"
|
|
729
741
|
},
|
|
730
742
|
{
|
|
731
743
|
"name": "SessionTitleEventData",
|
|
@@ -801,12 +813,20 @@ export const TYPERT = {
|
|
|
801
813
|
},
|
|
802
814
|
{
|
|
803
815
|
"name": "SystemPromptMessageSource",
|
|
804
|
-
"declaration": "export interface SystemPromptMessageSource {\n kind: 'system-prompt';\n}"
|
|
816
|
+
"declaration": "export interface SystemPromptMessageSource {\n kind: 'system-prompt';\n readonly complete?: true;\n readonly reset?: true;\n readonly sections?: readonly SystemPromptSectionState[];\n}"
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"name": "SystemPromptSectionState",
|
|
820
|
+
"declaration": "export type SystemPromptSectionState = { readonly name: string; readonly noticeIndex?: readonly number[]; } & ({ readonly state: 'active'; readonly order: number; readonly contentIndex: number; } | { readonly state: 'retired'; readonly contentIndex?: never; });"
|
|
805
821
|
},
|
|
806
822
|
{
|
|
807
823
|
"name": "SystemPromptUpdate",
|
|
808
824
|
"declaration": "export type SystemPromptUpdate = 'in-history';"
|
|
809
825
|
},
|
|
826
|
+
{
|
|
827
|
+
"name": "SystemSurfaceNode",
|
|
828
|
+
"declaration": "export interface SystemSurfaceNode {\n readonly seq: SessionSeq;\n readonly isEmpty: boolean;\n}"
|
|
829
|
+
},
|
|
810
830
|
{
|
|
811
831
|
"name": "TeamId",
|
|
812
832
|
"declaration": "export type TeamId = Branded<'TeamId'>;"
|
|
@@ -5,7 +5,7 @@ import type {
|
|
|
5
5
|
TypertRemoteInfo,
|
|
6
6
|
TypertRemoteMethod,
|
|
7
7
|
} from '@deepseek-ai/dsh-typert-protocol'
|
|
8
|
-
import type { ToolCallId } from '@deepseek-ai/dsh-llm/
|
|
8
|
+
import type { ToolCallId } from '@deepseek-ai/dsh-llm/types'
|
|
9
9
|
import type { SessionId } from '@deepseek-ai/dsh-session/types'
|
|
10
10
|
import type { AskUserQuestionAnswer } from '@deepseek-ai/dsh-user-questions/types'
|
|
11
11
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typert.remote-client.d.ts","names":["answer","attachWait"],"sources":["../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"typert.remote-client.d.ts","names":["answer","attachWait"],"sources":["../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;IA2LEA,M;IAsDOC,U;;;IAtDPD,sB;IAsDOC,0B;;;;;;IAtDPD,4B;IAsDOC,gC","ignoreList":[]}
|
|
@@ -47,7 +47,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
47
47
|
methods: {
|
|
48
48
|
'userQuestions/answer': {
|
|
49
49
|
service: 'userQuestions',
|
|
50
|
-
description: 'Answer a continued question. The reply is steered into the agent as a user message whose source names the call; that message is also the record that closes the question in the projection.',
|
|
50
|
+
description: 'Answer a continued question. The reply is steered into the agent as a user message whose source names the call; that message is also the record that closes the question in the projection. The only call this method can answer is one the projection lists as `continued` on this Session, and it steers a user message into the running turn, so it speaks for the person the Session runs for. A LiveShare reader reaches it through the Session read role, which is safe only while an approval question cannot become `continued`: the projection tracks only calls made under the timed `ask_user_question` schema, and a call becomes `continued` only by returning the pending result a timed wait produces (or, for PTC, a pending dispatch) or by resume repair recording `TOOL_OUTCOME_UNKNOWN` for a call the process never finished. Plan review (`plan-review`) and the CUA approvals (`approval`) reach `ctx.userQuestions.ask` without a `wait` and without a `timeout`, so their result is a settled answer, an abort, or a failure, never a pending result, and they stay out of the projection. A future approval surface must keep asking without `wait`/`timeout`, or it must gain its own owner-only gate; giving it a timed form makes an approval answerable by a share viewer.',
|
|
51
51
|
invocation: { kind: 'direct' },
|
|
52
52
|
scope: {
|
|
53
53
|
context: 'agent',
|
|
@@ -79,13 +79,13 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
79
79
|
source: 'json',
|
|
80
80
|
codec: {
|
|
81
81
|
mode: 'strict',
|
|
82
|
-
typeSymbol: '@deepseek-ai/dsh-llm/
|
|
82
|
+
typeSymbol: '@deepseek-ai/dsh-llm/types#ToolCallId',
|
|
83
83
|
create: _deepseek_ai_dsh_user_questions_userQuestions_answer_parameter_1$schema,
|
|
84
84
|
jsonSchema: {"type":"string"},
|
|
85
85
|
},
|
|
86
86
|
strictCodec: {
|
|
87
87
|
mode: 'strict',
|
|
88
|
-
typeSymbol: '@deepseek-ai/dsh-llm/
|
|
88
|
+
typeSymbol: '@deepseek-ai/dsh-llm/types#ToolCallId',
|
|
89
89
|
create: _deepseek_ai_dsh_user_questions_userQuestions_answer_parameter_1_strict$schema,
|
|
90
90
|
jsonSchema: {"type":"string"},
|
|
91
91
|
},
|
|
@@ -112,10 +112,10 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
112
112
|
mode: 'strict',
|
|
113
113
|
typeSymbol: '@deepseek-ai/dsh-user-questions#userQuestions/answer:result',
|
|
114
114
|
create: _deepseek_ai_dsh_user_questions_userQuestions_answer_result$schema,
|
|
115
|
-
description: 'Whether the question is still continued; an accepted reply stays queued until the agent admits its user message.',
|
|
115
|
+
description: 'Whether the question is still continued (`false` when this Session lists no such continued call, or its composition carries no Session projections); an accepted reply stays queued until the agent admits its user message.',
|
|
116
116
|
jsonSchema: {"type":"boolean"},
|
|
117
117
|
},
|
|
118
|
-
sourceLocation: {"file":"packages/interaction/user-questions/src/index.ts","line":
|
|
118
|
+
sourceLocation: {"file":"packages/interaction/user-questions/src/index.ts","line":188,"column":3},
|
|
119
119
|
},
|
|
120
120
|
'userQuestions/attachWait': {
|
|
121
121
|
service: 'userQuestions',
|
|
@@ -152,13 +152,13 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
152
152
|
source: 'json',
|
|
153
153
|
codec: {
|
|
154
154
|
mode: 'strict',
|
|
155
|
-
typeSymbol: '@deepseek-ai/dsh-llm/
|
|
155
|
+
typeSymbol: '@deepseek-ai/dsh-llm/types#ToolCallId',
|
|
156
156
|
create: _deepseek_ai_dsh_user_questions_userQuestions_attachWait_parameter_1$schema,
|
|
157
157
|
jsonSchema: {"type":"string"},
|
|
158
158
|
},
|
|
159
159
|
strictCodec: {
|
|
160
160
|
mode: 'strict',
|
|
161
|
-
typeSymbol: '@deepseek-ai/dsh-llm/
|
|
161
|
+
typeSymbol: '@deepseek-ai/dsh-llm/types#ToolCallId',
|
|
162
162
|
create: _deepseek_ai_dsh_user_questions_userQuestions_attachWait_parameter_1_strict$schema,
|
|
163
163
|
jsonSchema: {"type":"string"},
|
|
164
164
|
},
|
|
@@ -172,7 +172,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
172
172
|
description: 'One Host-computed remaining duration, or no frames once the wait ended.',
|
|
173
173
|
jsonSchema: {"type":"object","properties":{"remainingMs":{"type":"number"}},"required":["remainingMs"],"additionalProperties":true},
|
|
174
174
|
},
|
|
175
|
-
sourceLocation: {"file":"packages/interaction/user-questions/src/index.ts","line":
|
|
175
|
+
sourceLocation: {"file":"packages/interaction/user-questions/src/index.ts","line":242,"column":10},
|
|
176
176
|
},
|
|
177
177
|
},
|
|
178
178
|
}, z)
|
package/lib/types/index.d.ts
CHANGED
|
@@ -46,11 +46,29 @@ export declare class UserQuestionService extends TypertRemoteService {
|
|
|
46
46
|
* Answer a continued question. The reply is steered into the agent as a
|
|
47
47
|
* user message whose source names the call; that message is also the
|
|
48
48
|
* record that closes the question in the projection.
|
|
49
|
+
*
|
|
50
|
+
* The only call this method can answer is one the projection lists as
|
|
51
|
+
* `continued` on this Session, and it steers a user message into the running
|
|
52
|
+
* turn, so it speaks for the person the Session runs for. A LiveShare reader
|
|
53
|
+
* reaches it through the Session read role, which is safe only while an
|
|
54
|
+
* approval question cannot become `continued`: the projection tracks only
|
|
55
|
+
* calls made under the timed `ask_user_question` schema, and a call becomes
|
|
56
|
+
* `continued` only by returning the pending result a timed wait produces (or,
|
|
57
|
+
* for PTC, a pending dispatch) or by resume repair recording
|
|
58
|
+
* `TOOL_OUTCOME_UNKNOWN` for a call the process never finished. Plan review
|
|
59
|
+
* (`plan-review`) and the CUA approvals (`approval`) reach `ctx.userQuestions.ask`
|
|
60
|
+
* without a `wait` and without a `timeout`, so their result is a settled
|
|
61
|
+
* answer, an abort, or a failure, never a pending result, and they stay out
|
|
62
|
+
* of the projection. A future approval surface must keep asking without
|
|
63
|
+
* `wait`/`timeout`, or it must gain its own owner-only gate; giving it a timed
|
|
64
|
+
* form makes an approval answerable by a share viewer.
|
|
49
65
|
* @param agent - Live root agent for the owning Session.
|
|
50
66
|
* @param callId - Continued question identity.
|
|
51
67
|
* @param answer - Complete structured answer batch, one item per question of the call.
|
|
52
|
-
* @returns Whether the question is still continued
|
|
53
|
-
*
|
|
68
|
+
* @returns Whether the question is still continued (`false` when this Session
|
|
69
|
+
* lists no such continued call, or its composition carries no Session
|
|
70
|
+
* projections); an accepted reply stays queued until the agent admits its
|
|
71
|
+
* user message.
|
|
54
72
|
* @throws {UserQuestionError} `BAD_ANSWER` when the batch does not name each
|
|
55
73
|
* question of the call exactly once, or `REPLY_QUEUED` when a reply is
|
|
56
74
|
* already waiting for admission.
|
|
@@ -93,8 +111,11 @@ export declare class UserQuestionService extends TypertRemoteService {
|
|
|
93
111
|
* @returns The answer chosen or typed by the human.
|
|
94
112
|
* @throws {UserQuestionError} code `ASK_ABORTED` when the supplied signal
|
|
95
113
|
* is already or becomes aborted, `CALLER_NOT_LIVE` when a supplied agent
|
|
96
|
-
* is not the registry's exact live instance,
|
|
97
|
-
* that live agent has subagent origin
|
|
114
|
+
* is not the registry's exact live instance, `DELEGATED_CALLER` when
|
|
115
|
+
* that live agent has subagent origin, or `PROVIDER_ERROR`, keeping the
|
|
116
|
+
* original message, when an answerer fails with a value that is not a
|
|
117
|
+
* `HarnessError`; a coded `HarnessError` from an answerer keeps its `name`
|
|
118
|
+
* and `code`.
|
|
98
119
|
*/
|
|
99
120
|
ask(request: AskUserQuestionRequest): Promise<AskUserQuestionAnswer>;
|
|
100
121
|
}
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAEtD,OAAO,EAAqB,YAAY,EAAkB,KAAK,UAAU,EAAoB,MAAM,sBAAsB,CAAA;AAGzH,OAAO,EAAU,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AAC9E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAEnD,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAIxC,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,OAAO;QACf,aAAa,EAAE,mBAAmB,CAAA;KACnC;CACF;AAED,OAAO,KAAK,EACV,qBAAqB,EAAE,2BAA2B,EACnD,MAAM,YAAY,CAAA;AAEnB,YAAY,EACV,qBAAqB,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,mBAAmB,EAC5F,qBAAqB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,0BAA0B,EAC3F,iBAAiB,GAClB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,4BAA4B,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAEpF,kCAAkC;AAClC,MAAM,WAAW,sBAAuB,SAAQ,2BAA2B;CAAG;AAE9E,0EAA0E;AAC1E,MAAM,MAAM,uBAAuB,GAAG,qBAAqB,GAAG;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,CAAA;AAEnG,yDAAyD;AACzD,qBAAa,iBAAkB,SAAQ,YAAY;gBACrC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;CAIlE;AA2BD,0EAA0E;AAC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AAqB,CAAC;CAyE3E;AAED,eAAe,mBAAmB,CAAA"}
|
package/lib/types/index.js
CHANGED
|
@@ -167,17 +167,38 @@ let UserQuestionService = (() => {
|
|
|
167
167
|
* Answer a continued question. The reply is steered into the agent as a
|
|
168
168
|
* user message whose source names the call; that message is also the
|
|
169
169
|
* record that closes the question in the projection.
|
|
170
|
+
*
|
|
171
|
+
* The only call this method can answer is one the projection lists as
|
|
172
|
+
* `continued` on this Session, and it steers a user message into the running
|
|
173
|
+
* turn, so it speaks for the person the Session runs for. A LiveShare reader
|
|
174
|
+
* reaches it through the Session read role, which is safe only while an
|
|
175
|
+
* approval question cannot become `continued`: the projection tracks only
|
|
176
|
+
* calls made under the timed `ask_user_question` schema, and a call becomes
|
|
177
|
+
* `continued` only by returning the pending result a timed wait produces (or,
|
|
178
|
+
* for PTC, a pending dispatch) or by resume repair recording
|
|
179
|
+
* `TOOL_OUTCOME_UNKNOWN` for a call the process never finished. Plan review
|
|
180
|
+
* (`plan-review`) and the CUA approvals (`approval`) reach `ctx.userQuestions.ask`
|
|
181
|
+
* without a `wait` and without a `timeout`, so their result is a settled
|
|
182
|
+
* answer, an abort, or a failure, never a pending result, and they stay out
|
|
183
|
+
* of the projection. A future approval surface must keep asking without
|
|
184
|
+
* `wait`/`timeout`, or it must gain its own owner-only gate; giving it a timed
|
|
185
|
+
* form makes an approval answerable by a share viewer.
|
|
170
186
|
* @param agent - Live root agent for the owning Session.
|
|
171
187
|
* @param callId - Continued question identity.
|
|
172
188
|
* @param answer - Complete structured answer batch, one item per question of the call.
|
|
173
|
-
* @returns Whether the question is still continued
|
|
174
|
-
*
|
|
189
|
+
* @returns Whether the question is still continued (`false` when this Session
|
|
190
|
+
* lists no such continued call, or its composition carries no Session
|
|
191
|
+
* projections); an accepted reply stays queued until the agent admits its
|
|
192
|
+
* user message.
|
|
175
193
|
* @throws {UserQuestionError} `BAD_ANSWER` when the batch does not name each
|
|
176
194
|
* question of the call exactly once, or `REPLY_QUEUED` when a reply is
|
|
177
195
|
* already waiting for admission.
|
|
178
196
|
*/
|
|
179
197
|
answer(agent, callId, answer) {
|
|
180
198
|
this.assertLiveRoot(agent);
|
|
199
|
+
// The projection is the authorization: its `continued` entries are exactly the
|
|
200
|
+
// timed asks still answerable, and an approval ask never enters it. Reading the
|
|
201
|
+
// fold directly also keeps this method off any answerer a viewer could install.
|
|
181
202
|
const question = this.continued(agent).find(item => item.callId === callId);
|
|
182
203
|
if (question === undefined)
|
|
183
204
|
return false;
|
|
@@ -293,8 +314,11 @@ let UserQuestionService = (() => {
|
|
|
293
314
|
* @returns The answer chosen or typed by the human.
|
|
294
315
|
* @throws {UserQuestionError} code `ASK_ABORTED` when the supplied signal
|
|
295
316
|
* is already or becomes aborted, `CALLER_NOT_LIVE` when a supplied agent
|
|
296
|
-
* is not the registry's exact live instance,
|
|
297
|
-
* that live agent has subagent origin
|
|
317
|
+
* is not the registry's exact live instance, `DELEGATED_CALLER` when
|
|
318
|
+
* that live agent has subagent origin, or `PROVIDER_ERROR`, keeping the
|
|
319
|
+
* original message, when an answerer fails with a value that is not a
|
|
320
|
+
* `HarnessError`; a coded `HarnessError` from an answerer keeps its `name`
|
|
321
|
+
* and `code`.
|
|
298
322
|
*/
|
|
299
323
|
async ask(request) {
|
|
300
324
|
if (request.signal?.aborted) {
|
|
@@ -358,7 +382,10 @@ let UserQuestionService = (() => {
|
|
|
358
382
|
if (request.signal?.aborted) {
|
|
359
383
|
throw abortedQuestion(error);
|
|
360
384
|
}
|
|
361
|
-
|
|
385
|
+
if (restored instanceof HarnessError)
|
|
386
|
+
throw restored;
|
|
387
|
+
const message = error instanceof Error ? error.message : 'the user-questions answerer failed before the user answered';
|
|
388
|
+
throw new UserQuestionError(message, 'PROVIDER_ERROR', { cause: error });
|
|
362
389
|
}
|
|
363
390
|
}
|
|
364
391
|
};
|
package/lib/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index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EAAE,GAAG,0BAA0B,CAE7F;AAED,gGAAgG;AAChG,eAAO,MAAM,gCAAgC;;;;;;;;eA1S3B,OAAO;mBACH,0BAA0B;;;;;;;;;CAwT8B,CAAA"}
|
package/lib/types/projection.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Fold of `ask_user_question` tool events into the answerable question set, and its Session projection. */
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { SessionLogOffset, TOOL_OUTCOME_UNKNOWN } from '@deepseek-ai/dsh-session';
|
|
4
|
-
import {
|
|
4
|
+
import { brandString } from '@deepseek-ai/dsh-brand';
|
|
5
5
|
/** Tool whose calls this projection tracks. */
|
|
6
6
|
export const ASK_USER_QUESTION_TOOL = 'ask_user_question';
|
|
7
7
|
/**
|
|
@@ -48,7 +48,7 @@ const questionSchema = z.object({
|
|
|
48
48
|
...(question.multiSelect === undefined ? {} : { multiSelect: question.multiSelect }),
|
|
49
49
|
}));
|
|
50
50
|
const pendingQuestionsSchema = z.array(z.object({
|
|
51
|
-
callId: z.string().min(1).transform(
|
|
51
|
+
callId: z.string().min(1).transform((brandString)),
|
|
52
52
|
questions: z.array(questionSchema).min(1),
|
|
53
53
|
state: z.enum(['open', 'continued']),
|
|
54
54
|
}).strict()).superRefine((active, context) => {
|
|
@@ -66,7 +66,7 @@ const answerSchema = z.object({
|
|
|
66
66
|
...(answer.custom === undefined ? {} : { custom: answer.custom }),
|
|
67
67
|
}));
|
|
68
68
|
const settledQuestionsSchema = z.array(z.object({
|
|
69
|
-
callId: z.string().min(1).transform(
|
|
69
|
+
callId: z.string().min(1).transform((brandString)),
|
|
70
70
|
answers: z.array(answerSchema),
|
|
71
71
|
}).strict());
|
|
72
72
|
const projectionViewSchema = z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection.js","sourceRoot":"","sources":["../../src/projection.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,OAAO,EAAE,CAAC,EAAE,MAAM,KAA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,MAAM,IAAI,GAAG,sBAAsB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;QACjD,OAAO,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,EAAE,CAAA;IACvD,CAAC;IACD,IAAI,EAAE,EAAE,UAAU,EAAE,oBAAoB,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE;IAC1E,YAAY,EAAE,CAAC;CAC6D,CAAA"}
|
package/lib/types/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Client-safe question, answer, and event types. @module @deepseek-ai/dsh-user-questions/types */
|
|
2
2
|
import type { Scoped } from '@deepseek-ai/dsh-scope';
|
|
3
3
|
import type { Agent } from '@deepseek-ai/dsh-agent/types';
|
|
4
|
-
import type { ToolCallId } from '@deepseek-ai/dsh-llm/
|
|
4
|
+
import type { ToolCallId } from '@deepseek-ai/dsh-llm/types';
|
|
5
5
|
/** One selectable answer offered to the user. */
|
|
6
6
|
export interface AskUserQuestionOption {
|
|
7
7
|
/** User-facing label. */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-user-questions",
|
|
3
3
|
"description": "Abstract user-questions seam (ctx.userQuestions) for asking the human during agent runs",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.3-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -50,26 +50,28 @@
|
|
|
50
50
|
],
|
|
51
51
|
"license": "MIT",
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@deepseek-ai/dsh-agent": "0.2.
|
|
54
|
-
"@deepseek-ai/dsh-llm": "0.2.
|
|
55
|
-
"@deepseek-ai/dsh-scope": "0.2.
|
|
53
|
+
"@deepseek-ai/dsh-agent": "0.2.3-alpha.1",
|
|
54
|
+
"@deepseek-ai/dsh-llm": "0.2.3-alpha.1",
|
|
55
|
+
"@deepseek-ai/dsh-scope": "0.2.3-alpha.1",
|
|
56
56
|
"@deepseek-ai/cordis": "~4.1.0",
|
|
57
|
-
"@deepseek-ai/dsh-typert-protocol": "0.2.
|
|
58
|
-
"@deepseek-ai/dsh-session": "0.2.
|
|
59
|
-
"@deepseek-ai/dsh-session-projection": "0.2.
|
|
57
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.3-alpha.1",
|
|
58
|
+
"@deepseek-ai/dsh-session": "0.2.3-alpha.1",
|
|
59
|
+
"@deepseek-ai/dsh-session-projection": "0.2.3-alpha.1"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@deepseek-ai/dsh-agent": "0.2.
|
|
63
|
-
"@deepseek-ai/dsh-
|
|
64
|
-
"@deepseek-ai/dsh-
|
|
62
|
+
"@deepseek-ai/dsh-agent": "0.2.3-alpha.1",
|
|
63
|
+
"@deepseek-ai/dsh-error": "0.2.3-alpha.1",
|
|
64
|
+
"@deepseek-ai/dsh-llm": "0.2.3-alpha.1",
|
|
65
|
+
"@deepseek-ai/dsh-scope": "0.2.3-alpha.1",
|
|
65
66
|
"@deepseek-ai/cordis": "~4.1.0",
|
|
66
|
-
"@deepseek-ai/dsh-tool-executor-ptc": "0.2.
|
|
67
|
-
"@deepseek-ai/dsh-typert-protocol": "0.2.
|
|
68
|
-
"@deepseek-ai/dsh-session": "0.2.
|
|
69
|
-
"@deepseek-ai/dsh-session-projection": "0.2.
|
|
70
|
-
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.
|
|
67
|
+
"@deepseek-ai/dsh-tool-executor-ptc": "0.2.3-alpha.1",
|
|
68
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.3-alpha.1",
|
|
69
|
+
"@deepseek-ai/dsh-session": "0.2.3-alpha.1",
|
|
70
|
+
"@deepseek-ai/dsh-session-projection": "0.2.3-alpha.1",
|
|
71
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.3-alpha.1"
|
|
71
72
|
},
|
|
72
73
|
"dependencies": {
|
|
74
|
+
"@deepseek-ai/dsh-brand": "0.2.3-alpha.1",
|
|
73
75
|
"zod": "4.6.6",
|
|
74
76
|
"@deepseek-ai/schemastery": "~3.19.0"
|
|
75
77
|
}
|
package/src/index.ts
CHANGED
|
@@ -157,11 +157,29 @@ export class UserQuestionService extends TypertRemoteService {
|
|
|
157
157
|
* Answer a continued question. The reply is steered into the agent as a
|
|
158
158
|
* user message whose source names the call; that message is also the
|
|
159
159
|
* record that closes the question in the projection.
|
|
160
|
+
*
|
|
161
|
+
* The only call this method can answer is one the projection lists as
|
|
162
|
+
* `continued` on this Session, and it steers a user message into the running
|
|
163
|
+
* turn, so it speaks for the person the Session runs for. A LiveShare reader
|
|
164
|
+
* reaches it through the Session read role, which is safe only while an
|
|
165
|
+
* approval question cannot become `continued`: the projection tracks only
|
|
166
|
+
* calls made under the timed `ask_user_question` schema, and a call becomes
|
|
167
|
+
* `continued` only by returning the pending result a timed wait produces (or,
|
|
168
|
+
* for PTC, a pending dispatch) or by resume repair recording
|
|
169
|
+
* `TOOL_OUTCOME_UNKNOWN` for a call the process never finished. Plan review
|
|
170
|
+
* (`plan-review`) and the CUA approvals (`approval`) reach `ctx.userQuestions.ask`
|
|
171
|
+
* without a `wait` and without a `timeout`, so their result is a settled
|
|
172
|
+
* answer, an abort, or a failure, never a pending result, and they stay out
|
|
173
|
+
* of the projection. A future approval surface must keep asking without
|
|
174
|
+
* `wait`/`timeout`, or it must gain its own owner-only gate; giving it a timed
|
|
175
|
+
* form makes an approval answerable by a share viewer.
|
|
160
176
|
* @param agent - Live root agent for the owning Session.
|
|
161
177
|
* @param callId - Continued question identity.
|
|
162
178
|
* @param answer - Complete structured answer batch, one item per question of the call.
|
|
163
|
-
* @returns Whether the question is still continued
|
|
164
|
-
*
|
|
179
|
+
* @returns Whether the question is still continued (`false` when this Session
|
|
180
|
+
* lists no such continued call, or its composition carries no Session
|
|
181
|
+
* projections); an accepted reply stays queued until the agent admits its
|
|
182
|
+
* user message.
|
|
165
183
|
* @throws {UserQuestionError} `BAD_ANSWER` when the batch does not name each
|
|
166
184
|
* question of the call exactly once, or `REPLY_QUEUED` when a reply is
|
|
167
185
|
* already waiting for admission.
|
|
@@ -169,6 +187,9 @@ export class UserQuestionService extends TypertRemoteService {
|
|
|
169
187
|
@Remote
|
|
170
188
|
answer(agent: Agent, callId: ToolCallId, answer: AskUserQuestionAnswer): boolean {
|
|
171
189
|
this.assertLiveRoot(agent)
|
|
190
|
+
// The projection is the authorization: its `continued` entries are exactly the
|
|
191
|
+
// timed asks still answerable, and an approval ask never enters it. Reading the
|
|
192
|
+
// fold directly also keeps this method off any answerer a viewer could install.
|
|
172
193
|
const question = this.continued(agent).find(item => item.callId === callId)
|
|
173
194
|
if (question === undefined) return false
|
|
174
195
|
const queued = this.queuedReplies.get(agent.session)
|
|
@@ -285,8 +306,11 @@ export class UserQuestionService extends TypertRemoteService {
|
|
|
285
306
|
* @returns The answer chosen or typed by the human.
|
|
286
307
|
* @throws {UserQuestionError} code `ASK_ABORTED` when the supplied signal
|
|
287
308
|
* is already or becomes aborted, `CALLER_NOT_LIVE` when a supplied agent
|
|
288
|
-
* is not the registry's exact live instance,
|
|
289
|
-
* that live agent has subagent origin
|
|
309
|
+
* is not the registry's exact live instance, `DELEGATED_CALLER` when
|
|
310
|
+
* that live agent has subagent origin, or `PROVIDER_ERROR`, keeping the
|
|
311
|
+
* original message, when an answerer fails with a value that is not a
|
|
312
|
+
* `HarnessError`; a coded `HarnessError` from an answerer keeps its `name`
|
|
313
|
+
* and `code`.
|
|
290
314
|
*/
|
|
291
315
|
async ask(request: AskUserQuestionRequest): Promise<AskUserQuestionAnswer> {
|
|
292
316
|
if (request.signal?.aborted) {
|
|
@@ -356,7 +380,9 @@ export class UserQuestionService extends TypertRemoteService {
|
|
|
356
380
|
if (request.signal?.aborted) {
|
|
357
381
|
throw abortedQuestion(error)
|
|
358
382
|
}
|
|
359
|
-
throw restored
|
|
383
|
+
if (restored instanceof HarnessError) throw restored
|
|
384
|
+
const message = error instanceof Error ? error.message : 'the user-questions answerer failed before the user answered'
|
|
385
|
+
throw new UserQuestionError(message, 'PROVIDER_ERROR', { cause: error })
|
|
360
386
|
}
|
|
361
387
|
}
|
|
362
388
|
}
|
package/src/projection.ts
CHANGED
|
@@ -5,7 +5,8 @@ import type { SessionEvent, SessionLogOffset as SessionLogOffsetType } from '@de
|
|
|
5
5
|
import type { ProjectionDefinition } from '@deepseek-ai/dsh-session-projection'
|
|
6
6
|
import type {} from '@deepseek-ai/dsh-agent/types'
|
|
7
7
|
import type {} from '@deepseek-ai/dsh-tool-executor-ptc/types'
|
|
8
|
-
import {
|
|
8
|
+
import { brandString } from '@deepseek-ai/dsh-brand'
|
|
9
|
+
import type { ToolCallId } from '@deepseek-ai/dsh-llm'
|
|
9
10
|
import type { ContentBlock, ToolSchema } from '@deepseek-ai/dsh-llm'
|
|
10
11
|
import type { AskUserQuestionAnswerItem, AskUserQuestionItem, AskUserQuestionOption, PendingUserQuestion, SettledUserQuestion, UserQuestionProjectionView } from './types.ts'
|
|
11
12
|
|
|
@@ -77,7 +78,7 @@ const questionSchema = z.object({
|
|
|
77
78
|
}))
|
|
78
79
|
|
|
79
80
|
const pendingQuestionsSchema: z.ZodType<readonly PendingUserQuestion[]> = z.array(z.object({
|
|
80
|
-
callId: z.string().min(1).transform(ToolCallId),
|
|
81
|
+
callId: z.string().min(1).transform(brandString<ToolCallId>),
|
|
81
82
|
questions: z.array(questionSchema).min(1),
|
|
82
83
|
state: z.enum(['open', 'continued']),
|
|
83
84
|
}).strict()).superRefine((active, context) => {
|
|
@@ -97,7 +98,7 @@ const answerSchema = z.object({
|
|
|
97
98
|
}))
|
|
98
99
|
|
|
99
100
|
const settledQuestionsSchema: z.ZodType<readonly SettledUserQuestion[]> = z.array(z.object({
|
|
100
|
-
callId: z.string().min(1).transform(ToolCallId),
|
|
101
|
+
callId: z.string().min(1).transform(brandString<ToolCallId>),
|
|
101
102
|
answers: z.array(answerSchema),
|
|
102
103
|
}).strict())
|
|
103
104
|
|
package/src/types.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import type { Scoped } from '@deepseek-ai/dsh-scope'
|
|
4
4
|
import type { Agent } from '@deepseek-ai/dsh-agent/types'
|
|
5
|
-
import type { ToolCallId } from '@deepseek-ai/dsh-llm/
|
|
5
|
+
import type { ToolCallId } from '@deepseek-ai/dsh-llm/types'
|
|
6
6
|
import type {} from '@deepseek-ai/dsh-session/types'
|
|
7
7
|
import type {} from '@deepseek-ai/dsh-session-projection/types'
|
|
8
8
|
|