Reproduction
toNetScriptChatResponse() delegates to toDurableChatSessionResponse() through a private default adapter, but NetScriptChatResponseOptions exposes neither mode nor waitUntil. The upstream transport defaults to mode: immediate.
Consumers that require mode: await cannot adopt the helper without injecting a custom toResponse adapter and retaining a direct transport dependency.
For a long-lived Deno/Fresh server this is observable: immediate mode returns 202 before the assistant stream is durably written, moves write errors to background logging, and closes the enclosing request/telemetry span before settle metrics are available. Await mode returns only after the write and propagates failures.
Expected
Expose an owned completion option, e.g. mode?: immediate | await and optionally waitUntil, forwarding it to the transport. Add tests for response status and failure propagation in both modes.
Consumer evidence
rickylabs/eis-chat PR #169 uses NetScript addressing/auth/message conversion but retains a narrow mode: await adapter. Remove it when the published option exists.
Related to #238 and production lifecycle hardening #950.
Reproduction
toNetScriptChatResponse()delegates totoDurableChatSessionResponse()through a private default adapter, butNetScriptChatResponseOptionsexposes neithermodenorwaitUntil. The upstream transport defaults tomode: immediate.Consumers that require
mode: awaitcannot adopt the helper without injecting a customtoResponseadapter and retaining a direct transport dependency.For a long-lived Deno/Fresh server this is observable: immediate mode returns 202 before the assistant stream is durably written, moves write errors to background logging, and closes the enclosing request/telemetry span before settle metrics are available. Await mode returns only after the write and propagates failures.
Expected
Expose an owned completion option, e.g.
mode?: immediate | awaitand optionallywaitUntil, forwarding it to the transport. Add tests for response status and failure propagation in both modes.Consumer evidence
rickylabs/eis-chat PR #169 uses NetScript addressing/auth/message conversion but retains a narrow
mode: awaitadapter. Remove it when the published option exists.Related to #238 and production lifecycle hardening #950.