@yadsh/dsh-qa-surface 0.1.0
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/CHANGELOG.md +10 -0
- package/LICENSE +21 -0
- package/README.md +135 -0
- package/SPEC-dsh-qa-surface.md +1921 -0
- package/compatibility.json +15 -0
- package/cordis.patch.yml +9 -0
- package/docs/ARCHITECTURE.md +24 -0
- package/docs/COMPATIBILITY.md +13 -0
- package/docs/CONFIGURATION.md +18 -0
- package/docs/EMBEDDING.md +13 -0
- package/lib/client/QaConfigController.js +65 -0
- package/lib/client/QaConfigController.js.map +1 -0
- package/lib/client/QaRouteController.js +109 -0
- package/lib/client/QaRouteController.js.map +1 -0
- package/lib/client/QaSessionController.js +366 -0
- package/lib/client/QaSessionController.js.map +1 -0
- package/lib/client/QaSurface.js +109 -0
- package/lib/client/QaSurface.js.map +1 -0
- package/lib/client/QaTranscriptAdapter.js +92 -0
- package/lib/client/QaTranscriptAdapter.js.map +1 -0
- package/lib/client/components/Markdown.js +102 -0
- package/lib/client/components/Markdown.js.map +1 -0
- package/lib/client/components/QaComposer.js +33 -0
- package/lib/client/components/QaComposer.js.map +1 -0
- package/lib/client/components/QaMessage.js +14 -0
- package/lib/client/components/QaMessage.js.map +1 -0
- package/lib/client/index.js +46 -0
- package/lib/client/index.js.map +1 -0
- package/lib/client/styles.js +58 -0
- package/lib/client/styles.js.map +1 -0
- package/lib/client.js +1131 -0
- package/lib/client.js.map +1 -0
- package/lib/config.js +83 -0
- package/lib/config.js.map +1 -0
- package/lib/host-route.js +27 -0
- package/lib/host-route.js.map +1 -0
- package/lib/index.js +83 -0
- package/lib/index.js.map +1 -0
- package/lib/navigation-marker.js +3 -0
- package/lib/navigation-marker.js.map +1 -0
- package/lib/resolve-config.js +143 -0
- package/lib/resolve-config.js.map +1 -0
- package/lib/types/client/QaConfigController.d.ts +21 -0
- package/lib/types/client/QaRouteController.d.ts +43 -0
- package/lib/types/client/QaSessionController.d.ts +59 -0
- package/lib/types/client/QaSurface.d.ts +16 -0
- package/lib/types/client/QaTranscriptAdapter.d.ts +7 -0
- package/lib/types/client/components/Markdown.d.ts +5 -0
- package/lib/types/client/components/QaComposer.d.ts +11 -0
- package/lib/types/client/components/QaMessage.d.ts +8 -0
- package/lib/types/client/index.d.ts +19 -0
- package/lib/types/client/styles.d.ts +2 -0
- package/lib/types/config.d.ts +5 -0
- package/lib/types/host-route.d.ts +9 -0
- package/lib/types/index.d.ts +29 -0
- package/lib/types/navigation-marker.d.ts +3 -0
- package/lib/types/resolve-config.d.ts +6 -0
- package/lib/types/types.d.ts +114 -0
- package/lib/types.js +2 -0
- package/lib/types.js.map +1 -0
- package/package.json +137 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 - 2026-09-05
|
|
4
|
+
|
|
5
|
+
- Added the `/qa` full-screen overlay backed by native DSH sessions.
|
|
6
|
+
- Added persistent, new-on-load and fixed session policies.
|
|
7
|
+
- Added streaming transcript, Stop, New chat, safe Markdown and responsive UI.
|
|
8
|
+
- Added Host settings registration and safety filtering for internal events.
|
|
9
|
+
- Added a narrow Host navigation redirect for DSH releases whose static
|
|
10
|
+
frontend returns 404 for direct `/qa` requests.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dsh-plugins contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# @yadsh/dsh-qa-surface
|
|
2
|
+
|
|
3
|
+
A focused, responsive QA/chat page for DeepSeek Harness at `/qa`. It replaces
|
|
4
|
+
the presentation, not the harness: prompts, streaming, tools, skills, MCP,
|
|
5
|
+
memory, persistence, permissions and telemetry continue through the native DSH
|
|
6
|
+
Session and Agent Loop.
|
|
7
|
+
|
|
8
|
+
## What it does
|
|
9
|
+
|
|
10
|
+
- contributes one root-scoped entry to the additive `shell.overlay` slot;
|
|
11
|
+
- stays invisible outside the configured route;
|
|
12
|
+
- creates or restores one real DSH Session;
|
|
13
|
+
- renders only user text, assistant-visible text and safe status messages;
|
|
14
|
+
- supports streaming, Stop, New chat, safe Markdown and mobile layouts;
|
|
15
|
+
- blocks unsupported approvals/questions instead of auto-approving them;
|
|
16
|
+
- uses the existing same-origin DSH connection and trust boundary.
|
|
17
|
+
|
|
18
|
+
It does not add another HTTP server, provider proxy, permissive CORS rule, or
|
|
19
|
+
custom session persistence.
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
Install the package where the DSH Host can resolve it, then compose its Loader
|
|
24
|
+
row. The included `cordis.patch.yml` is a minimal example:
|
|
25
|
+
|
|
26
|
+
```yaml
|
|
27
|
+
- insert:
|
|
28
|
+
- id: dsh-qa-surface
|
|
29
|
+
name: "@yadsh/dsh-qa-surface"
|
|
30
|
+
config:
|
|
31
|
+
enabled: true
|
|
32
|
+
route:
|
|
33
|
+
path: /qa
|
|
34
|
+
matchChildren: true
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Some DSH patch operations replace a row's complete `config` instead of deeply
|
|
38
|
+
merging it. When editing an existing row, provide every value that deployment
|
|
39
|
+
needs.
|
|
40
|
+
|
|
41
|
+
DSH `0.1.1-rc.2` serves unknown frontend paths as 404 rather than falling back
|
|
42
|
+
to `index.html`. The Host half therefore claims only the configured QA
|
|
43
|
+
navigation path and redirects it through the canonical `/` document with a
|
|
44
|
+
short-lived query marker. The browser restores the requested `/qa` URL with
|
|
45
|
+
`history.replaceState` before mounting the overlay. No second server, duplicate
|
|
46
|
+
HTML document, permissive route, or unauthenticated config endpoint is added.
|
|
47
|
+
|
|
48
|
+
## Configure
|
|
49
|
+
|
|
50
|
+
Configuration is registered under the Host settings namespace `qa-surface`.
|
|
51
|
+
Composition values form the base layer; normal DSH user settings can override
|
|
52
|
+
them when the deployment provides writable settings.
|
|
53
|
+
|
|
54
|
+
```yaml
|
|
55
|
+
config:
|
|
56
|
+
enabled: true
|
|
57
|
+
route:
|
|
58
|
+
path: /qa
|
|
59
|
+
matchChildren: true
|
|
60
|
+
branding:
|
|
61
|
+
title: Internal Assistant
|
|
62
|
+
subtitle: Answers about the internal platform
|
|
63
|
+
welcomeMessage: How can I help?
|
|
64
|
+
placeholder: Ask a question...
|
|
65
|
+
logoUrl: null
|
|
66
|
+
session:
|
|
67
|
+
policy: browser-persistent
|
|
68
|
+
storageKey: dsh-qa-surface
|
|
69
|
+
workspaceId: company-knowledge
|
|
70
|
+
fixedSessionId: null
|
|
71
|
+
agentPreset: qa-assistant
|
|
72
|
+
provider: null
|
|
73
|
+
model: null
|
|
74
|
+
reasoningEffort: null
|
|
75
|
+
ui:
|
|
76
|
+
showHeader: true
|
|
77
|
+
showReset: true
|
|
78
|
+
showStop: true
|
|
79
|
+
showTimestamps: false
|
|
80
|
+
showToolActivity: false
|
|
81
|
+
showReasoning: false
|
|
82
|
+
renderMarkdown: true
|
|
83
|
+
maxContentWidth: 900
|
|
84
|
+
suggestedQuestions:
|
|
85
|
+
- How do I request access?
|
|
86
|
+
- Where is the runbook?
|
|
87
|
+
interaction:
|
|
88
|
+
approvals: blocked
|
|
89
|
+
questions: unsupported
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
`workspaceId` is recommended for a deterministic assistant. Without it, DSH
|
|
93
|
+
uses the Host's normal default working directory. Put the system prompt, tools,
|
|
94
|
+
skills, knowledge connections and permission policy in `agentPreset`, not in
|
|
95
|
+
this UI plugin.
|
|
96
|
+
|
|
97
|
+
Model override is opt-in: `provider` and `model` must be set together. Slash
|
|
98
|
+
commands are rejected as plain QA input in this MVP. `showReasoning: true` is
|
|
99
|
+
also rejected; raw reasoning is intentionally outside the safe MVP surface.
|
|
100
|
+
|
|
101
|
+
Session policies:
|
|
102
|
+
|
|
103
|
+
- `browser-persistent` restores the id stored in this browser, replacing stale
|
|
104
|
+
ids with a new session;
|
|
105
|
+
- `new-on-load` creates a session each time the QA surface mounts;
|
|
106
|
+
- `fixed` requires `fixedSessionId`, never creates a replacement, and is meant
|
|
107
|
+
only for controlled single-user deployments.
|
|
108
|
+
|
|
109
|
+
New chat creates another DSH Session and leaves the old one intact for operator
|
|
110
|
+
inspection.
|
|
111
|
+
|
|
112
|
+
## Security and deployment
|
|
113
|
+
|
|
114
|
+
`/qa` is a presentation boundary, not an authentication boundary. Protect it
|
|
115
|
+
with the same deployment authentication and DSH browser trust policy as the
|
|
116
|
+
operator UI. The plugin never auto-approves a permission request or answers an
|
|
117
|
+
interactive agent question. Configure a least-privilege, non-interactive agent
|
|
118
|
+
preset for end-user deployments.
|
|
119
|
+
|
|
120
|
+
The `embedding.frameAncestors` field is reserved deployment metadata in 0.1.x;
|
|
121
|
+
the plugin does not mutate CSP headers. Configure `frame-ancestors` at the
|
|
122
|
+
trusted reverse proxy if iframe embedding is required.
|
|
123
|
+
|
|
124
|
+
See [Architecture](docs/ARCHITECTURE.md),
|
|
125
|
+
[Configuration](docs/CONFIGURATION.md), and
|
|
126
|
+
[Compatibility](docs/COMPATIBILITY.md).
|
|
127
|
+
|
|
128
|
+
## Develop
|
|
129
|
+
|
|
130
|
+
```text
|
|
131
|
+
pnpm --filter @yadsh/dsh-qa-surface check
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
The package publishes a classic DSH browser module whose loader id is the full
|
|
135
|
+
package name, `@yadsh/dsh-qa-surface`.
|