@deep-podder/dsh-remote-mobile 0.0.5 → 0.0.7
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/PROTOCOL.md +97 -9
- package/README.md +49 -12
- package/SECURITY.md +8 -0
- package/auth.js +16 -0
- package/bridge.js +336 -9
- package/client.js +6 -1
- package/docs/api-notes.md +12 -4
- package/docs/engineering-audit.md +252 -0
- package/docs/reference-chat-demo.md +41 -0
- package/docs/screenshots/chat-light.png +0 -0
- package/docs/screenshots/commands-dark.png +0 -0
- package/docs/screenshots/pairing-light.png +0 -0
- package/docs/screenshots/sessions-light.png +0 -0
- package/docs/verification.md +40 -4
- package/index.js +1 -1
- package/mobile/README.md +81 -35
- package/mobile/app.js +4268 -906
- package/mobile/index.html +28 -17
- package/mobile/lib/away.js +45 -0
- package/mobile/lib/constants.js +5 -0
- package/mobile/lib/errors.js +42 -0
- package/mobile/lib/format.js +94 -0
- package/mobile/lib/lock.js +21 -0
- package/mobile/manifest.webmanifest +24 -0
- package/mobile/mock-server.js +442 -17
- package/mobile/model/history.js +119 -0
- package/mobile/model/question.js +318 -0
- package/mobile/model/turns.js +57 -0
- package/mobile/styles/base.css +143 -0
- package/mobile/{styles.css → styles/components.css} +1170 -826
- package/mobile/styles/overrides.css +269 -0
- package/mobile/styles/tokens.css +169 -0
- package/mobile/sw.js +28 -4
- package/package.json +34 -20
- package/protocol.js +87 -0
- package/push-policy.js +58 -0
- package/server/frames/activity.js +110 -0
- package/server/frames/connection.js +21 -0
- package/server/frames/history.js +23 -0
- package/server/frames/interactions.js +77 -0
- package/server/frames/prompts.js +29 -0
- package/server/frames/queue.js +58 -0
- package/server/frames/sessions.js +201 -0
- package/server/frames/settings.js +38 -0
- package/server/frames/subagents.js +50 -0
- package/server.js +341 -423
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/* Hover, responsive, reduced-motion and overflow hardening: last in cascade. */
|
|
2
|
+
|
|
3
|
+
/* ---------- Hover polish (fine pointers only) ---------------------------- */
|
|
4
|
+
@media (hover: hover) and (pointer: fine) {
|
|
5
|
+
.iconbtn:hover {
|
|
6
|
+
background: var(--surface-2);
|
|
7
|
+
color: var(--text);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.tab:hover {
|
|
11
|
+
color: var(--text-2);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.tab.is-active:hover {
|
|
15
|
+
color: var(--text);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.prompt-mode-btn:not(.is-active):hover {
|
|
19
|
+
background: var(--surface-3);
|
|
20
|
+
color: var(--text-3);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.row:hover {
|
|
24
|
+
background: var(--surface-2);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.chip:hover {
|
|
28
|
+
background: var(--surface-2);
|
|
29
|
+
border-color: var(--border-strong);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.tool-head:hover {
|
|
33
|
+
background: var(--surface-2);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.q-option:hover {
|
|
37
|
+
border-color: var(--border-strong);
|
|
38
|
+
background: var(--surface-2);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.msg-action:hover,
|
|
42
|
+
.md-copy:hover {
|
|
43
|
+
color: var(--text);
|
|
44
|
+
background: var(--pill-soft);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.send-btn:not([disabled]):hover {
|
|
48
|
+
opacity: 0.9;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.attach-btn:not([disabled]):hover,
|
|
52
|
+
.attachment-remove:hover {
|
|
53
|
+
background: var(--surface-2);
|
|
54
|
+
color: var(--text);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* ---------- Responsive details ------------------------------------------ */
|
|
59
|
+
@media (max-width: 380px) {
|
|
60
|
+
:root {
|
|
61
|
+
--prose-size: 17px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.messages {
|
|
65
|
+
padding-left: calc(16px + var(--safe-l));
|
|
66
|
+
padding-right: calc(16px + var(--safe-r));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.activity-list {
|
|
70
|
+
padding-left: calc(14px + var(--safe-l));
|
|
71
|
+
padding-right: calc(14px + var(--safe-r));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.activity-bar {
|
|
75
|
+
padding-left: calc(14px + var(--safe-l));
|
|
76
|
+
padding-right: calc(14px + var(--safe-r));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.pair-title {
|
|
80
|
+
font-size: 31px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.pin-slot {
|
|
84
|
+
height: 60px;
|
|
85
|
+
font-size: 23px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.pin-slots {
|
|
89
|
+
gap: 8px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.tab {
|
|
93
|
+
min-width: 96px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Keep the meta row on one line on the narrowest phones: a shorter track
|
|
97
|
+
leaves room for the note and the model chip while the meter stays centred. */
|
|
98
|
+
.composer-meta {
|
|
99
|
+
gap: 4px 8px;
|
|
100
|
+
padding-left: 8px;
|
|
101
|
+
padding-right: 8px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.context-track {
|
|
105
|
+
width: 40px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* While a run is live the right cluster shows Queue/Steer next to the same
|
|
109
|
+
centred meter; drop the decorative track (the numbers stay) so the cluster
|
|
110
|
+
still fits inside its side track and the meter stays on centre. */
|
|
111
|
+
.composer-meta.has-mode .context-track {
|
|
112
|
+
display: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.prompt-mode-btn {
|
|
116
|
+
padding: 0 7px;
|
|
117
|
+
font-size: 10px;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@media (min-height: 900px) {
|
|
122
|
+
.messages {
|
|
123
|
+
gap: 24px;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@media (max-height: 560px) {
|
|
128
|
+
.pairing {
|
|
129
|
+
justify-content: flex-start;
|
|
130
|
+
padding-top: calc(20px + var(--safe-t));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.pairing-card {
|
|
134
|
+
margin: 0 auto;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.pairing-foot {
|
|
138
|
+
margin-top: 24px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.brand .logo-mark {
|
|
142
|
+
margin-bottom: 14px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.pair-form {
|
|
146
|
+
margin-top: 20px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.pin-slot {
|
|
150
|
+
height: 54px;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* The context ring is decorative; never animate it for reduced-motion users. */
|
|
155
|
+
@media (prefers-reduced-motion: reduce) {
|
|
156
|
+
.menu-ring,
|
|
157
|
+
.menu-ring-fill {
|
|
158
|
+
transition: none;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/* ---------- Reduced motion ----------------------------------------------- */
|
|
163
|
+
@media (prefers-reduced-motion: reduce) {
|
|
164
|
+
*,
|
|
165
|
+
*::before,
|
|
166
|
+
*::after {
|
|
167
|
+
animation-duration: 0.01ms !important;
|
|
168
|
+
animation-iteration-count: 1 !important;
|
|
169
|
+
transition-duration: 0.01ms !important;
|
|
170
|
+
scroll-behavior: auto !important;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.cursor {
|
|
174
|
+
opacity: 0.6;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.msg {
|
|
178
|
+
animation: none;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.tool-body,
|
|
182
|
+
.act-body {
|
|
183
|
+
transition: none;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.reasoning-title.is-shimmer,
|
|
187
|
+
.tool-status.is-running.is-shimmer {
|
|
188
|
+
animation: none;
|
|
189
|
+
color: var(--text-3);
|
|
190
|
+
background: none;
|
|
191
|
+
-webkit-text-fill-color: currentColor;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.reasoning.is-active .reasoning-dot {
|
|
195
|
+
animation: none;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.question-session {
|
|
200
|
+
display: flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
gap: 10px;
|
|
203
|
+
margin: 0 0 10px;
|
|
204
|
+
font-size: 12px;
|
|
205
|
+
color: var(--text);
|
|
206
|
+
opacity: 0.6;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.question-session .btn {
|
|
210
|
+
padding: 5px 10px;
|
|
211
|
+
font-size: 12px;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.session-notice {
|
|
215
|
+
grid-row: 3;
|
|
216
|
+
display: flex;
|
|
217
|
+
align-items: center;
|
|
218
|
+
gap: 10px;
|
|
219
|
+
margin: 0 calc(14px + var(--safe-r)) 6px calc(14px + var(--safe-l));
|
|
220
|
+
padding: 7px 8px 7px 12px;
|
|
221
|
+
border-radius: var(--radius-m);
|
|
222
|
+
border: 1px solid var(--warn-line, rgba(138, 90, 31, 0.28));
|
|
223
|
+
background: var(--warn-soft, rgba(138, 90, 31, 0.08));
|
|
224
|
+
color: var(--text);
|
|
225
|
+
font-size: 12.5px;
|
|
226
|
+
line-height: 1.4;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.session-notice-text {
|
|
230
|
+
flex: 1 1 auto;
|
|
231
|
+
min-width: 0;
|
|
232
|
+
overflow-wrap: anywhere;
|
|
233
|
+
word-break: break-word;
|
|
234
|
+
}
|
|
235
|
+
.session-notice .btn { flex: 0 0 auto; padding: 5px 10px; font-size: 12px; }
|
|
236
|
+
|
|
237
|
+
/* ---------- Horizontal overflow hardening -------------------------------- */
|
|
238
|
+
/* The single app column must never be sized by a child's min-content (a
|
|
239
|
+
textarea's intrinsic width, a nowrap tool title, a wide change card), or a
|
|
240
|
+
narrow phone clips the right edge of the chat and the composer. */
|
|
241
|
+
.app {
|
|
242
|
+
grid-template-columns: minmax(0, 1fr);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.app > * {
|
|
246
|
+
min-width: 0;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.composer,
|
|
250
|
+
.composer-shell,
|
|
251
|
+
.composer-box,
|
|
252
|
+
.composer-meta,
|
|
253
|
+
.composer-input,
|
|
254
|
+
.messages,
|
|
255
|
+
.msg,
|
|
256
|
+
.msg-assistant,
|
|
257
|
+
.md,
|
|
258
|
+
.tool,
|
|
259
|
+
.changes-panel,
|
|
260
|
+
.activity-list,
|
|
261
|
+
.queue-strip,
|
|
262
|
+
.archived-banner {
|
|
263
|
+
min-width: 0;
|
|
264
|
+
max-width: 100%;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.composer-input {
|
|
268
|
+
flex: 1 1 0;
|
|
269
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/* Tokens: light + dark palette and type scale. */
|
|
2
|
+
|
|
3
|
+
/* ==========================================================================
|
|
4
|
+
DSH Remote — mobile client styles
|
|
5
|
+
|
|
6
|
+
Calm, premium chat surface: warm off-white in light, near-black in dark,
|
|
7
|
+
system serif prose for assistant replies, sans UI, pill composer.
|
|
8
|
+
No frameworks, no webfonts, no build step, no external resources.
|
|
9
|
+
|
|
10
|
+
Theme model
|
|
11
|
+
-----------
|
|
12
|
+
app.js resolves the persisted preference ("auto" | "light" | "dark") on init
|
|
13
|
+
and writes the *effective* theme to <html data-theme="light|dark"> (the Host
|
|
14
|
+
CSP forbids an inline head bootstrap). This stylesheet only has to map those
|
|
15
|
+
two states to tokens, which keeps the palette in one place.
|
|
16
|
+
========================================================================== */
|
|
17
|
+
|
|
18
|
+
/* ---------- Tokens: light (default) ------------------------------------- */
|
|
19
|
+
:root {
|
|
20
|
+
color-scheme: light;
|
|
21
|
+
|
|
22
|
+
--bg: #f7f5f2;
|
|
23
|
+
--surface: #ffffff;
|
|
24
|
+
--surface-2: #f1eee9;
|
|
25
|
+
--surface-3: #eae6df;
|
|
26
|
+
|
|
27
|
+
--text: #1a1815;
|
|
28
|
+
--text-2: #6e675f;
|
|
29
|
+
--text-3: #8b8278;
|
|
30
|
+
--text-4: #a79e93;
|
|
31
|
+
|
|
32
|
+
--border: #e6e1d8;
|
|
33
|
+
--border-strong: #d6cfc3;
|
|
34
|
+
|
|
35
|
+
--bubble: #ede8e1;
|
|
36
|
+
--bubble-border: #e3dcd1;
|
|
37
|
+
|
|
38
|
+
--pill: #141210;
|
|
39
|
+
--pill-ink: #ffffff;
|
|
40
|
+
--pill-soft: rgba(20, 18, 16, 0.06);
|
|
41
|
+
|
|
42
|
+
--code-bg: #f1ede7;
|
|
43
|
+
--code-border: #e2dcd1;
|
|
44
|
+
--inline-code-bg: #f1eee9;
|
|
45
|
+
|
|
46
|
+
--link: #1a1815;
|
|
47
|
+
--link-underline: #b9aea0;
|
|
48
|
+
|
|
49
|
+
--ok: #2f6b4f;
|
|
50
|
+
--ok-soft: rgba(47, 107, 79, 0.09);
|
|
51
|
+
--warn: #8a5a1f;
|
|
52
|
+
--warn-soft: rgba(138, 90, 31, 0.09);
|
|
53
|
+
--warn-line: rgba(138, 90, 31, 0.28);
|
|
54
|
+
--danger: #a63a33;
|
|
55
|
+
--danger-ink: #8f2f29;
|
|
56
|
+
--danger-soft: rgba(166, 58, 51, 0.08);
|
|
57
|
+
--danger-line: rgba(166, 58, 51, 0.26);
|
|
58
|
+
|
|
59
|
+
--scrim: rgba(26, 24, 21, 0.32);
|
|
60
|
+
--shadow-soft: 0 1px 2px rgba(26, 24, 21, 0.05),
|
|
61
|
+
0 8px 24px rgba(26, 24, 21, 0.07);
|
|
62
|
+
--shadow-lift: 0 2px 6px rgba(26, 24, 21, 0.06),
|
|
63
|
+
0 16px 40px rgba(26, 24, 21, 0.12);
|
|
64
|
+
--shadow-sheet: 0 -20px 60px rgba(26, 24, 21, 0.18);
|
|
65
|
+
|
|
66
|
+
--focus: #141210;
|
|
67
|
+
--selection: rgba(20, 18, 16, 0.14);
|
|
68
|
+
|
|
69
|
+
--radius-s: 12px;
|
|
70
|
+
--radius-m: 16px;
|
|
71
|
+
--radius-xl: 24px;
|
|
72
|
+
--radius-pill: 999px;
|
|
73
|
+
|
|
74
|
+
--font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
75
|
+
"Helvetica Neue", Arial, "Noto Sans", sans-serif;
|
|
76
|
+
--font-serif: "Iowan Old Style", "Palatino Linotype", Palatino,
|
|
77
|
+
"Book Antiqua", Georgia, "Times New Roman", serif;
|
|
78
|
+
--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
|
|
79
|
+
"Liberation Mono", monospace;
|
|
80
|
+
|
|
81
|
+
--prose-size: 16px;
|
|
82
|
+
--prose-line: 1.45;
|
|
83
|
+
|
|
84
|
+
--ease: cubic-bezier(0.22, 1, 0.36, 1);
|
|
85
|
+
--ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
86
|
+
--dur-1: 130ms;
|
|
87
|
+
--dur-2: 220ms;
|
|
88
|
+
--dur-3: 320ms;
|
|
89
|
+
|
|
90
|
+
--safe-t: env(safe-area-inset-top, 0px);
|
|
91
|
+
--safe-r: env(safe-area-inset-right, 0px);
|
|
92
|
+
--safe-b: env(safe-area-inset-bottom, 0px);
|
|
93
|
+
--safe-l: env(safe-area-inset-left, 0px);
|
|
94
|
+
|
|
95
|
+
--app-h: 100dvh;
|
|
96
|
+
|
|
97
|
+
/* Syntax tokens (light) */
|
|
98
|
+
--tok-com: #9a9084;
|
|
99
|
+
--tok-kw: #8a4b2f;
|
|
100
|
+
--tok-str: #3f6b4f;
|
|
101
|
+
--tok-num: #8a5a1f;
|
|
102
|
+
--tok-fn: #3b5c7a;
|
|
103
|
+
--tok-var: #6b4a7a;
|
|
104
|
+
--tok-tag: #a63a33;
|
|
105
|
+
--tok-attr: #5a6b3f;
|
|
106
|
+
--tok-prop: #6e4a2f;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* ---------- Tokens: dark ------------------------------------------------ */
|
|
110
|
+
:root[data-theme="dark"] {
|
|
111
|
+
color-scheme: dark;
|
|
112
|
+
|
|
113
|
+
--bg: #161616;
|
|
114
|
+
--surface: #1f1f1f;
|
|
115
|
+
--surface-2: #262626;
|
|
116
|
+
--surface-3: #2c2c2c;
|
|
117
|
+
|
|
118
|
+
--text: #f4f1ec;
|
|
119
|
+
--text-2: #a39c93;
|
|
120
|
+
--text-3: #8b847a;
|
|
121
|
+
--text-4: #6c665e;
|
|
122
|
+
|
|
123
|
+
--border: #2e2c29;
|
|
124
|
+
--border-strong: #3b3833;
|
|
125
|
+
|
|
126
|
+
--bubble: #2a2a2a;
|
|
127
|
+
--bubble-border: #343330;
|
|
128
|
+
|
|
129
|
+
--pill: #f4f1ec;
|
|
130
|
+
--pill-ink: #161616;
|
|
131
|
+
--pill-soft: rgba(244, 241, 236, 0.08);
|
|
132
|
+
|
|
133
|
+
--code-bg: #1b1b1b;
|
|
134
|
+
--code-border: #2c2a27;
|
|
135
|
+
--inline-code-bg: #262626;
|
|
136
|
+
|
|
137
|
+
--link: #f4f1ec;
|
|
138
|
+
--link-underline: #6e675f;
|
|
139
|
+
|
|
140
|
+
--ok: #8fc7a8;
|
|
141
|
+
--ok-soft: rgba(143, 199, 168, 0.1);
|
|
142
|
+
--warn: #e0b57c;
|
|
143
|
+
--warn-soft: rgba(224, 181, 124, 0.1);
|
|
144
|
+
--warn-line: rgba(224, 181, 124, 0.28);
|
|
145
|
+
--danger: #e6928a;
|
|
146
|
+
--danger-ink: #e6928a;
|
|
147
|
+
--danger-soft: rgba(230, 146, 138, 0.1);
|
|
148
|
+
--danger-line: rgba(230, 146, 138, 0.26);
|
|
149
|
+
|
|
150
|
+
--scrim: rgba(0, 0, 0, 0.56);
|
|
151
|
+
--shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.3),
|
|
152
|
+
0 10px 30px rgba(0, 0, 0, 0.35);
|
|
153
|
+
--shadow-lift: 0 2px 8px rgba(0, 0, 0, 0.35),
|
|
154
|
+
0 22px 50px rgba(0, 0, 0, 0.45);
|
|
155
|
+
--shadow-sheet: 0 -20px 60px rgba(0, 0, 0, 0.55);
|
|
156
|
+
|
|
157
|
+
--focus: #f4f1ec;
|
|
158
|
+
--selection: rgba(244, 241, 236, 0.18);
|
|
159
|
+
|
|
160
|
+
--tok-com: #7b756c;
|
|
161
|
+
--tok-kw: #e2b592;
|
|
162
|
+
--tok-str: #a8c7a8;
|
|
163
|
+
--tok-num: #d9b283;
|
|
164
|
+
--tok-fn: #a8c0d8;
|
|
165
|
+
--tok-var: #c9b3d8;
|
|
166
|
+
--tok-tag: #e29a93;
|
|
167
|
+
--tok-attr: #bcc9a0;
|
|
168
|
+
--tok-prop: #d9bfa3;
|
|
169
|
+
}
|
package/mobile/sw.js
CHANGED
|
@@ -11,11 +11,23 @@
|
|
|
11
11
|
*/
|
|
12
12
|
'use strict';
|
|
13
13
|
|
|
14
|
-
var CACHE = 'dsh-remote-
|
|
14
|
+
var CACHE = 'dsh-remote-v1';
|
|
15
15
|
var PRECACHE = [
|
|
16
16
|
'/',
|
|
17
|
-
'/app.js?v=
|
|
18
|
-
'/
|
|
17
|
+
'/app.js?v=1',
|
|
18
|
+
'/protocol.js?v=1',
|
|
19
|
+
'/lib/constants.js?v=1',
|
|
20
|
+
'/lib/errors.js?v=1',
|
|
21
|
+
'/lib/away.js?v=1',
|
|
22
|
+
'/lib/lock.js?v=1',
|
|
23
|
+
'/lib/format.js?v=1',
|
|
24
|
+
'/model/question.js?v=1',
|
|
25
|
+
'/model/history.js?v=1',
|
|
26
|
+
'/model/turns.js?v=1',
|
|
27
|
+
'/styles/tokens.css?v=1',
|
|
28
|
+
'/styles/base.css?v=1',
|
|
29
|
+
'/styles/components.css?v=1',
|
|
30
|
+
'/styles/overrides.css?v=1',
|
|
19
31
|
'/manifest.webmanifest',
|
|
20
32
|
'/favicon.svg',
|
|
21
33
|
'/icons/icon-192.png',
|
|
@@ -48,7 +60,19 @@ function reportPush(kind, detail) {
|
|
|
48
60
|
var SHELL_PATHS = { '/': true,
|
|
49
61
|
'/index.html': true,
|
|
50
62
|
'/app.js': true,
|
|
51
|
-
'/
|
|
63
|
+
'/protocol.js': true,
|
|
64
|
+
'/lib/constants.js': true,
|
|
65
|
+
'/lib/errors.js': true,
|
|
66
|
+
'/lib/away.js': true,
|
|
67
|
+
'/lib/lock.js': true,
|
|
68
|
+
'/lib/format.js': true,
|
|
69
|
+
'/model/question.js': true,
|
|
70
|
+
'/model/history.js': true,
|
|
71
|
+
'/model/turns.js': true,
|
|
72
|
+
'/styles/tokens.css': true,
|
|
73
|
+
'/styles/base.css': true,
|
|
74
|
+
'/styles/components.css': true,
|
|
75
|
+
'/styles/overrides.css': true,
|
|
52
76
|
'/manifest.webmanifest': true,
|
|
53
77
|
'/favicon.svg': true,
|
|
54
78
|
'/icons/icon-192.png': true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deep-podder/dsh-remote-mobile",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Secure local mobile companion for DeepSeek Harness: pair a phone with a QR code and control live sessions.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
"engines": {
|
|
20
20
|
"node": ">=22"
|
|
21
21
|
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"test:unit": "node --test dev/unit/auth.test.mjs dev/unit/server-upload.test.mjs dev/unit/lock.test.mjs dev/unit/away.test.mjs dev/unit/push-policy.test.mjs dev/unit/turns.test.mjs",
|
|
24
|
+
"check": "node dev/release-check.mjs && node dev/protocol-check.mjs && node dev/server-smoke.mjs && node dev/changes-bridge-check.mjs && node dev/spa-check.mjs && node dev/static-check.mjs && node dev/client-check.mjs && node dev/push-check.mjs && node dev/desk-auth-check.mjs && node dev/toggle-check.mjs && node dev/subagents-bridge-check.mjs",
|
|
25
|
+
"check:ui": "node dev/question-ui-check.mjs && node dev/composer-ui-check.mjs"
|
|
26
|
+
},
|
|
22
27
|
"keywords": [
|
|
23
28
|
"deepseek-harness",
|
|
24
29
|
"dsh",
|
|
@@ -32,36 +37,43 @@
|
|
|
32
37
|
"./client": "./client.js",
|
|
33
38
|
"./locale/*.json": "./locale/*.json",
|
|
34
39
|
"./icon": "./icon.svg",
|
|
35
|
-
"./package.json": "./package.json"
|
|
40
|
+
"./package.json": "./package.json",
|
|
41
|
+
"./protocol": "./protocol.js"
|
|
36
42
|
},
|
|
37
43
|
"files": [
|
|
38
|
-
"index.js",
|
|
39
|
-
"client.js",
|
|
40
|
-
"bridge.js",
|
|
41
|
-
"server.js",
|
|
42
44
|
"auth.js",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
+
"bridge.js",
|
|
46
|
+
"client.js",
|
|
45
47
|
"cordis.patch.yml",
|
|
46
|
-
"
|
|
48
|
+
"docs/*.md",
|
|
49
|
+
"docs/screenshots/*.png",
|
|
47
50
|
"icon.svg",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
+
"index.js",
|
|
52
|
+
"LICENSE",
|
|
53
|
+
"locale/*.json",
|
|
51
54
|
"mobile/app.js",
|
|
52
|
-
"mobile/styles.css",
|
|
53
|
-
"mobile/manifest.webmanifest",
|
|
54
|
-
"mobile/sw.js",
|
|
55
55
|
"mobile/favicon.svg",
|
|
56
56
|
"mobile/icons/*.png",
|
|
57
|
+
"mobile/index.html",
|
|
58
|
+
"mobile/lib/*.js",
|
|
59
|
+
"mobile/manifest.webmanifest",
|
|
57
60
|
"mobile/mock-server.js",
|
|
61
|
+
"mobile/model/*.js",
|
|
58
62
|
"mobile/README.md",
|
|
59
|
-
"
|
|
63
|
+
"mobile/styles/*.css",
|
|
64
|
+
"mobile/sw.js",
|
|
65
|
+
"protocol.js",
|
|
60
66
|
"PROTOCOL.md",
|
|
67
|
+
"push-policy.js",
|
|
68
|
+
"push.js",
|
|
69
|
+
"qr.js",
|
|
70
|
+
"README.md",
|
|
61
71
|
"SECURITY.md",
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
72
|
+
"server.js",
|
|
73
|
+
"server/frames/*.js",
|
|
74
|
+
"server/frames/subagents.js",
|
|
75
|
+
"vendor/LICENSE",
|
|
76
|
+
"vendor/qrcode.js"
|
|
65
77
|
],
|
|
66
78
|
"dsh": {
|
|
67
79
|
"bundle": {
|
|
@@ -70,7 +82,9 @@
|
|
|
70
82
|
"client": {
|
|
71
83
|
"platform": "web",
|
|
72
84
|
"immediately": true,
|
|
73
|
-
"inject": [
|
|
85
|
+
"inject": [
|
|
86
|
+
"@deepseek-ai/dsh-client-ui-conversation"
|
|
87
|
+
]
|
|
74
88
|
}
|
|
75
89
|
}
|
|
76
90
|
}
|
package/protocol.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// Shared wire constants and frame catalog.
|
|
2
|
+
//
|
|
3
|
+
// Imported by the Host server and by the dev mock so limits and the client
|
|
4
|
+
// frame surface cannot drift between them. This module has no side effects and
|
|
5
|
+
// no Host dependency; it is safe for both.
|
|
6
|
+
export const HISTORY_DEFAULT_LIMIT = 50
|
|
7
|
+
export const HISTORY_MAX_LIMIT = 500
|
|
8
|
+
export const MAX_UPLOAD_BYTES = 32 * 1024 * 1024
|
|
9
|
+
export const MAX_ATTACHMENTS = 10
|
|
10
|
+
|
|
11
|
+
/** Client → server frame types. Keep in sync with `server.js` and `PROTOCOL.md`. */
|
|
12
|
+
export const CLIENT_FRAME_TYPES = Object.freeze([
|
|
13
|
+
'approval.answer',
|
|
14
|
+
'changes.diff',
|
|
15
|
+
'changes.list',
|
|
16
|
+
'client.visibility',
|
|
17
|
+
'commands.execute',
|
|
18
|
+
'commands.list',
|
|
19
|
+
'context.get',
|
|
20
|
+
'history.load',
|
|
21
|
+
'limits',
|
|
22
|
+
'model.list',
|
|
23
|
+
'model.select',
|
|
24
|
+
'pending.list',
|
|
25
|
+
'ping',
|
|
26
|
+
'preset.list',
|
|
27
|
+
'preset.select',
|
|
28
|
+
'prompt',
|
|
29
|
+
'question.answer',
|
|
30
|
+
'question.cancel',
|
|
31
|
+
'queue.list',
|
|
32
|
+
'queue.update',
|
|
33
|
+
'session.archive',
|
|
34
|
+
'session.attach',
|
|
35
|
+
'session.fork',
|
|
36
|
+
'session.pin',
|
|
37
|
+
'session.rename',
|
|
38
|
+
'session.unarchive',
|
|
39
|
+
'session.unpin',
|
|
40
|
+
'sessions.create',
|
|
41
|
+
'sessions.list',
|
|
42
|
+
'sessions.open',
|
|
43
|
+
'sessions.search',
|
|
44
|
+
'stop',
|
|
45
|
+
'subagents.history',
|
|
46
|
+
'subagents.list',
|
|
47
|
+
])
|
|
48
|
+
|
|
49
|
+
/** Server → client frame types (documentation; `error`/`pong` are always sent). */
|
|
50
|
+
export const SERVER_FRAME_TYPES = Object.freeze([
|
|
51
|
+
'approval.request',
|
|
52
|
+
'approval.resolved',
|
|
53
|
+
'assistant.delta',
|
|
54
|
+
'assistant.end',
|
|
55
|
+
'assistant.start',
|
|
56
|
+
'changes',
|
|
57
|
+
'changes.diff',
|
|
58
|
+
'command.result',
|
|
59
|
+
'commands',
|
|
60
|
+
'context',
|
|
61
|
+
'error',
|
|
62
|
+
'history',
|
|
63
|
+
'limits',
|
|
64
|
+
'models',
|
|
65
|
+
'pending',
|
|
66
|
+
'pong',
|
|
67
|
+
'presets',
|
|
68
|
+
'question.request',
|
|
69
|
+
'question.resolved',
|
|
70
|
+
'queue',
|
|
71
|
+
'queue.changed',
|
|
72
|
+
'ready',
|
|
73
|
+
'session.archived',
|
|
74
|
+
'session.attached',
|
|
75
|
+
'session.opened',
|
|
76
|
+
'session.pinned',
|
|
77
|
+
'session.status',
|
|
78
|
+
'session.updated',
|
|
79
|
+
'subagents',
|
|
80
|
+
'subagents.changed',
|
|
81
|
+
'subagent.history',
|
|
82
|
+
'sessions',
|
|
83
|
+
'sessions.found',
|
|
84
|
+
'tool.end',
|
|
85
|
+
'tool.start',
|
|
86
|
+
'visibility',
|
|
87
|
+
])
|