Replies: 4 comments
|
Your reading of the wire matches mine, and I can offer independent corroboration from a different DSH wire plus two contrasts that I think make this a much easier ask than it currently looks. 1. Someone else hand-rolled the same long-poll, for the same reason, on the browser wire. I maintain an out-of-tree plugin with a browser half. It needs to push state to its own client-side UI, and DSH's typed Remote system is a first-party generated contract that an out-of-tree plugin should not impersonate — so we register our own route on
with 2. The capability is not missing from DSH — it is missing from the wire. That is a smaller ask. MCP elicitation already works end to end: an MCP server asks the human a structured question mid-run, and it lands on DSH's own question surface. We have that verified on a real DSH loop with an example, and the reason it works is exactly the constraint you hit — it never crosses a process boundary; the provider is in-process and So the request is not "give DSH human-interaction seams". It is "the SDK JSON-RPC wire is missing a request type that the in-process path already has." I would lead with that framing, because it turns an open-ended feature into a wire-shape addition with an existing in-process semantic to mirror. 3. DSH already ships one transport with the server→client request direction — and its bug report tells you what to design for. The ACP bridge has Related from a third angle: #4697 asks for subagents to be able to ask the user questions. Same missing capability, different surface. One thing I would ask explicitly in the proposal. You note that Interest disclosure: I maintain a third-party compatibility plugin, which is where the polling evidence and the elicitation verification come from. The SDK JSON-RPC server is DSH's own component — we do not touch it and could not add this; the workaround shape you described is the same one we were left with, not a solution I am offering. |
|
The rc.2 protocol docs confirm this is above the framing layer: A few contract points I would make normative:
For current stdio ownership, transport loss should cancel pending asks during runtime disposal. Web mux replay is a useful design reference, but copying reconnect replay requires a separate process-survival and generation-transfer contract. I wrote the full wire shapes, ownership model, cancellation state machine, loopback-workaround hardening, and 20 conformance gates here: https://sandbaseai.github.io/deepseek-harness-handbook/sdk-human-interaction-wire.html Disclosure: I maintain the independent community handbook linked above. |
|
We hit the approval half of this gap in a real downstream integration from Baton. Environment
The current master documentation still says that client-to-server notifications and server-to-client requests are unimplemented and reserved for future approval flows: Reproduction
DSH core is behaving consistently here: Downstream integration boundaryBaton already has one host-owned permission interaction lifecycle for other harness adapters: open a durable permission interaction, wait for the user's decision, then return the harness-native decision. We do not need DSH to adopt Baton types. We need the SDK wire and TypeScript client to expose DSH's existing For the approval path, a useful acceptance contract would be:
This would let Baton map DSH approval into its existing permission UI while preserving DSH's ownership, audit events, and fail-closed behavior. |
|
Status check against 1. A proposed simplification would remove the Python client's reverse direction.
2. Auto review makes the approval half more pressing. The experimental Auto review lets the model allow low-risk calls, but a denied call still asks the user. Even the automated path therefore ends at a human approval. In an SDK-embedded runtime that human sits across the wire, so the fallback fails closed, as in @qiankunli's 3. The timed-question design suggests a smaller first step for questions.
That route does not work for approvals. As @denial123789 noted, an approval outcome carries one-shot effect authority and cannot arrive as a late user message. Suggested phasing:
We embed the SDK runtime (one runtime per session) and can test a branch against our host. |
Uh oh!
There was an error while loading. Please reload this page.
Context
We embed the SDK runtime (
dsh-sdk-jsonrpc-server, launched viapackaged-bin) as a subprocess of a non-Node host application, one runtime per session. Withdsh-plan-mode+dsh-user-questions+dsh-tool-ask-usercomposed, the plan loop is excellent in-process — but the human-interaction seam cannot reach an embedding host across the wire:ctx.userQuestionsexpects its single active provider to be registered in-process ("UI packages provide the single active provider").0.1.1-rc.2): client→serverinitialize/session/prompt/shutdown, server→client only thesession/created/session/event/agent/status/subagent/endnotifications.So
exit_plan_mode's plan review andask_user_questionhave no path to the human sitting on the other side of the wire, andexit_plan_modecan only fail withNO_PROVIDER.What an embedder has to do today
We compose a small plugin whose only job is to be the provider and forward
ask()to the embedding host over a loopback HTTP long-poll:This works end to end — the review parks host-side, the answer releases the tool call, an approved
exit_plan_modecontinues the same turn — but it re-implements a seam the harness already owns, and every embedder will re-invent the same plumbing (per-spawn credentials, long-poll ceilings, abort propagation, disposal semantics).Proposal
Define a server→client JSON-RPC request on the SDK wire that makes the connected client the provider:
Semantics that seem to fall out naturally:
initialize— a client that does not declare it keeps today'sNO_PROVIDERbehavior, so nothing changes for existing clients.request.signalfiring server-side cancels the in-flight id with a notification, mirroringASK_ABORTED.AskUserQuestionAnswer, sointent/ label semantics (includingplan-review's approve-by-label) carry over without translation.Adjacent
The same request shape would carry
ctx.approvalasks.dsh-host-apiproxyalready models questions and approvals as answerable server→client requests (stable rpcId, replay on reconnect) on the Web mux — adding the same pair to the SDK wire would give embedders parity with what the Web host already enjoys.Happy to adapt to whatever shape fits the protocol's direction — the ask is only: some way for the wire client to answer user questions.
All reactions