You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Upstream candidates from an rc.7 plugin-heavy deployment: five generic gaps
#3159
I maintain a plugin-heavy rc.7 deployment and recently replayed its local changes on top of current master (99f6f02fec) by intent, not by blindly reapplying old commits:
delete a local implementation when upstream already satisfies the goal;
keep deployment-specific UI and provider behavior in external plugins;
retain a core change only when a public plugin/API contract cannot express the generic behavior reliably.
This left a small set of upstream candidates. I searched the current Discussions before posting and separated existing reports from gaps for which I could not find a matching topic.
1. Provider-controlled system prompt placement for OpenAI Responses
Gap
dsh-llm-pi-ai always lets pi-ai convert the assembled Harness system prompt into ordinary input messages. OpenAI Responses also has a top-level instructions field, and compatible gateways can give these two placements different replacement/precedence semantics. A deployment currently has to patch the adapter to choose the wire location.
Proposed contract
Add a provider-profile option such as:
systemPromptPlacement?: 'input'|'instructions'
Default input preserves current request bytes.
instructions is accepted only when every model in that provider profile uses openai-responses.
In instructions mode, remove the prompt from the pi-ai context and set the top-level payload field once; do not duplicate it.
An empty system prompt removes the context field without sending an empty top-level override.
This is narrower and safer than exposing an arbitrary payload callback in deployment configuration.
2. Extension-owned default conversation views and a replaceable live input deck
Gap
A Client plugin can register a conversation.view, but core still owns the fresh-session default and the blank new-conversation stage. A plugin-owned primary view therefore requires core to know its private id. The active view also is not consistently available as plain currency to resident composer/queue surfaces.
Separately, the official Queue Dock mixes presentation with mutation authority. A plugin that owns a conversation view cannot replace only the queue presentation while preserving the official input state machine, Todo, Goal, attachments, and Host-side authorization.
used only when the session has no stored user choice;
stored user selection wins;
stale selection falls back to Chat, then the first live view;
disposal removes the declaration;
the resolved active view id is exposed as a scalar, not by leaking a strict session store across scopes.
A replaceable conversation.queue presentation chain backed by an authoritative Host projection:
explicit placements such as current, queued, steering, and non-human context;
only direct-human queued items are mutable;
text editing is a narrow edit-text operation so image/future non-text blocks remain Host-owned and preserved;
pending attachments are readable only when the addressed live session currently references them;
the official Queue Dock remains a fallback entry, while plugins can replace presentation without replacing the InputBar or unrelated dock entries.
This would address the visibility problem in #477 without changing the Agent Loop's queue/steer semantics or introducing priority preemption.
3. Persisted extension theme ids with pre-plugin bootstrap
Gap
Theme definitions are extensible, but a selected extension theme needs two lifecycle properties to behave like a first-class preference:
the selected id should follow the DSH user home across reloads, ports, and loopback origins rather than being partitioned in localStorage;
the initial loading shell should not flash the light palette before Client plugins activate.
Proposed contract
Persist the selected theme id through the existing Host settings namespace, while allowing an id whose definition is temporarily absent during startup/HMR.
Before the plugin tree starts, bootstrap only the built-in light/dark/system base semantics into color-scheme and the existing body attribute.
When the extension definition registers, it resolves the durable id and becomes authoritative for full tokens and subsequent updates.
Do not embed third-party theme tokens in the Host-generated bootstrap script.
This keeps Host persistence, shell first-frame behavior, and Client extension ownership separate.
4. A bounded history window around a durable message anchor
Gap
Backward-only session.history(beforeSeq) is appropriate for loading older tail pages, but not for navigating to a search result, bookmark, or durable message sequence. Repeated backward reads either grow resident history without a bound or duplicate grouping/pagination rules in the client.
Anchor only a direct append-origin user/message or assistant/message sequence.
Return one contiguous raw-event window on the same append-origin/source-event group boundaries as session.history.
Bound both sides independently, with a small fixed maximum.
Return hasOlder, hasNewer, tailSeq, anchorStartSeq, and anchorEndSeq.
Keep session.history unchanged.
On the Client, loadWindow() should replace the active assembler window and suppress live event insertion while anchored; loadLatest() returns to the live tail and safely stitches only newer buffered events. This keeps memory proportional to the visible window and prevents a late history/gap-repair request from overwriting a newer navigation intent.
This is complementary to #1706/#1651: those bound the size of an ordinary history page; this bounds the distance and resident state required to view an arbitrary historical location.
5. Direct HTTPS on one explicit non-loopback listener while retaining loopback HTTP
Gap
Remote/private-network Web deployments currently need an external TLS terminator to obtain a secure browser context. Plain HTTP on a LAN/VPN address breaks secure-context-only browser APIs, as reported in #980 and related threads. A reverse proxy remains a valid deployment, but it should not be the only way to give one explicitly bound private interface HTTPS.
Proposed transport behavior
Keep 127.0.0.1:<port> available over HTTP.
For one explicit non-loopback IPv4 bind, optionally serve the same routes over HTTPS using configured certificate/key files and a declared DNS server name.
Validate at startup that the certificate covers the declared name and that the key pair is usable.
Reload valid certificate changes without dropping the listener; retain the last valid material if reload fails.
Add the TLS server name to the ordinary trusted-authority list.
Do not allow this option on 0.0.0.0; do not imply authentication; do not expand privileged API access.
This preserves the current browser Host/Origin fence and loopback-only privileged defaults. TLS protects the carrier and supplies a secure context; it is not an application-user authentication layer.
Deliberately not proposed for upstream core
A checkout-local convenience launcher: useful for one source-owned deployment, but pnpm dsh is already the repository contract.
Product-specific question-card colors, geometry, and assistant HUD styling.
Provider-header settings pages, plugin inventory projections, or a particular image-generation/provider composition. Those belong in external plugins while official Host inventory and settings remain authoritative.
Request for maintainer direction
I have local rc.7 implementations and focused coverage for the five candidates above, but have not published a fork because external PRs are currently disabled. Which of these contracts fit the intended upstream direction, and which should remain downstream extensions? I can split any accepted item into a dedicated Discussion with a minimal patch, tests, and Agent Note rather than treating this umbrella post as one change set.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Context
I maintain a plugin-heavy rc.7 deployment and recently replayed its local changes on top of current
master(99f6f02fec) by intent, not by blindly reapplying old commits:This left a small set of upstream candidates. I searched the current Discussions before posting and separated existing reports from gaps for which I could not find a matching topic.
Existing discussions I am not duplicating
I also reported the concrete
stream_read_errorretry-classification bug separately so it does not get buried in this design discussion.1. Provider-controlled system prompt placement for OpenAI Responses
Gap
dsh-llm-pi-aialways lets pi-ai convert the assembled Harness system prompt into ordinary input messages. OpenAI Responses also has a top-levelinstructionsfield, and compatible gateways can give these two placements different replacement/precedence semantics. A deployment currently has to patch the adapter to choose the wire location.Proposed contract
Add a provider-profile option such as:
inputpreserves current request bytes.instructionsis accepted only when every model in that provider profile usesopenai-responses.instructionsmode, remove the prompt from the pi-ai context and set the top-level payload field once; do not duplicate it.This is narrower and safer than exposing an arbitrary payload callback in deployment configuration.
2. Extension-owned default conversation views and a replaceable live input deck
Gap
A Client plugin can register a
conversation.view, but core still owns the fresh-session default and the blank new-conversation stage. A plugin-owned primary view therefore requires core to know its private id. The active view also is not consistently available as plain currency to resident composer/queue surfaces.Separately, the official Queue Dock mixes presentation with mutation authority. A plugin that owns a conversation view cannot replace only the queue presentation while preserving the official input state machine, Todo, Goal, attachments, and Host-side authorization.
Proposed contracts
conversation.queuepresentation chain backed by an authoritative Host projection:current,queued,steering, and non-humancontext;edit-textoperation so image/future non-text blocks remain Host-owned and preserved;This would address the visibility problem in #477 without changing the Agent Loop's queue/steer semantics or introducing priority preemption.
3. Persisted extension theme ids with pre-plugin bootstrap
Gap
Theme definitions are extensible, but a selected extension theme needs two lifecycle properties to behave like a first-class preference:
localStorage;Proposed contract
light/dark/systembase semantics intocolor-schemeand the existing body attribute.This keeps Host persistence, shell first-frame behavior, and Client extension ownership separate.
4. A bounded history window around a durable message anchor
Gap
Backward-only
session.history(beforeSeq)is appropriate for loading older tail pages, but not for navigating to a search result, bookmark, or durable message sequence. Repeated backward reads either grow resident history without a bound or duplicate grouping/pagination rules in the client.Proposed API
user/messageorassistant/messagesequence.session.history.hasOlder,hasNewer,tailSeq,anchorStartSeq, andanchorEndSeq.session.historyunchanged.On the Client,
loadWindow()should replace the active assembler window and suppress live event insertion while anchored;loadLatest()returns to the live tail and safely stitches only newer buffered events. This keeps memory proportional to the visible window and prevents a late history/gap-repair request from overwriting a newer navigation intent.This is complementary to #1706/#1651: those bound the size of an ordinary history page; this bounds the distance and resident state required to view an arbitrary historical location.
5. Direct HTTPS on one explicit non-loopback listener while retaining loopback HTTP
Gap
Remote/private-network Web deployments currently need an external TLS terminator to obtain a secure browser context. Plain HTTP on a LAN/VPN address breaks secure-context-only browser APIs, as reported in #980 and related threads. A reverse proxy remains a valid deployment, but it should not be the only way to give one explicitly bound private interface HTTPS.
Proposed transport behavior
127.0.0.1:<port>available over HTTP.0.0.0.0; do not imply authentication; do not expand privileged API access.This preserves the current browser Host/Origin fence and loopback-only privileged defaults. TLS protects the carrier and supplies a secure context; it is not an application-user authentication layer.
Deliberately not proposed for upstream core
pnpm dshis already the repository contract.Request for maintainer direction
I have local rc.7 implementations and focused coverage for the five candidates above, but have not published a fork because external PRs are currently disabled. Which of these contracts fit the intended upstream direction, and which should remain downstream extensions? I can split any accepted item into a dedicated Discussion with a minimal patch, tests, and Agent Note rather than treating this umbrella post as one change set.
All reactions