dsh-zen-remote 1.0.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.
Files changed (136) hide show
  1. package/AGENTS.md +51 -0
  2. package/LICENSE +38 -0
  3. package/README.md +237 -0
  4. package/assets/home.png +0 -0
  5. package/assets/info.png +0 -0
  6. package/assets/pairing.png +0 -0
  7. package/assets/session.png +0 -0
  8. package/assets/sheet.png +0 -0
  9. package/cordis.patch.yml +17 -0
  10. package/cordis.patch.yml.example +16 -0
  11. package/docs/interface.md +200 -0
  12. package/docs/remote-access.en.md +335 -0
  13. package/docs/remote-access.md +422 -0
  14. package/dsh-push.mjs +213 -0
  15. package/lan-gate.mjs +78 -0
  16. package/lib/client.js +6615 -0
  17. package/lib/index.js +310 -0
  18. package/lib/index.js.map +1 -0
  19. package/lib/lan-gate-server.cjs +626 -0
  20. package/lib/types/client/MobileAttachButton.d.ts +25 -0
  21. package/lib/types/client/MobileAttachButton.d.ts.map +1 -0
  22. package/lib/types/client/MobileAttachChips.d.ts +32 -0
  23. package/lib/types/client/MobileAttachChips.d.ts.map +1 -0
  24. package/lib/types/client/MobileDrawerFooter.d.ts +21 -0
  25. package/lib/types/client/MobileDrawerFooter.d.ts.map +1 -0
  26. package/lib/types/client/MobileHome.d.ts +24 -0
  27. package/lib/types/client/MobileHome.d.ts.map +1 -0
  28. package/lib/types/client/MobileHomeChips.d.ts +76 -0
  29. package/lib/types/client/MobileHomeChips.d.ts.map +1 -0
  30. package/lib/types/client/MobileNavOverlay.d.ts +15 -0
  31. package/lib/types/client/MobileNavOverlay.d.ts.map +1 -0
  32. package/lib/types/client/MobileNavToggle.d.ts +18 -0
  33. package/lib/types/client/MobileNavToggle.d.ts.map +1 -0
  34. package/lib/types/client/MobileSessionHeader.d.ts +58 -0
  35. package/lib/types/client/MobileSessionHeader.d.ts.map +1 -0
  36. package/lib/types/client/MobileSessionInfo.d.ts +41 -0
  37. package/lib/types/client/MobileSessionInfo.d.ts.map +1 -0
  38. package/lib/types/client/attach-upload.d.ts +78 -0
  39. package/lib/types/client/attach-upload.d.ts.map +1 -0
  40. package/lib/types/client/chips-store.d.ts +13 -0
  41. package/lib/types/client/chips-store.d.ts.map +1 -0
  42. package/lib/types/client/debug.d.ts +9 -0
  43. package/lib/types/client/debug.d.ts.map +1 -0
  44. package/lib/types/client/effects/aionui-compat.d.ts +4 -0
  45. package/lib/types/client/effects/aionui-compat.d.ts.map +1 -0
  46. package/lib/types/client/effects/gestures.d.ts +7 -0
  47. package/lib/types/client/effects/gestures.d.ts.map +1 -0
  48. package/lib/types/client/effects/header-status.d.ts +15 -0
  49. package/lib/types/client/effects/header-status.d.ts.map +1 -0
  50. package/lib/types/client/effects/phone-chrome.d.ts +106 -0
  51. package/lib/types/client/effects/phone-chrome.d.ts.map +1 -0
  52. package/lib/types/client/effects/turn-fold.d.ts +25 -0
  53. package/lib/types/client/effects/turn-fold.d.ts.map +1 -0
  54. package/lib/types/client/index.d.ts +18 -0
  55. package/lib/types/client/index.d.ts.map +1 -0
  56. package/lib/types/client/locales.d.ts +58 -0
  57. package/lib/types/client/locales.d.ts.map +1 -0
  58. package/lib/types/client/nav-store.d.ts +73 -0
  59. package/lib/types/client/nav-store.d.ts.map +1 -0
  60. package/lib/types/client/session-dot.d.ts +12 -0
  61. package/lib/types/client/session-dot.d.ts.map +1 -0
  62. package/lib/types/client/styles/base.css.d.ts +2 -0
  63. package/lib/types/client/styles/base.css.d.ts.map +1 -0
  64. package/lib/types/client/styles/chips.css.d.ts +2 -0
  65. package/lib/types/client/styles/chips.css.d.ts.map +1 -0
  66. package/lib/types/client/styles/compat.css.d.ts +2 -0
  67. package/lib/types/client/styles/compat.css.d.ts.map +1 -0
  68. package/lib/types/client/styles/composer.css.d.ts +2 -0
  69. package/lib/types/client/styles/composer.css.d.ts.map +1 -0
  70. package/lib/types/client/styles/header.css.d.ts +2 -0
  71. package/lib/types/client/styles/header.css.d.ts.map +1 -0
  72. package/lib/types/client/styles/home.css.d.ts +2 -0
  73. package/lib/types/client/styles/home.css.d.ts.map +1 -0
  74. package/lib/types/client/styles/index.d.ts +15 -0
  75. package/lib/types/client/styles/index.d.ts.map +1 -0
  76. package/lib/types/client/styles/info.css.d.ts +2 -0
  77. package/lib/types/client/styles/info.css.d.ts.map +1 -0
  78. package/lib/types/client/styles/layout.css.d.ts +2 -0
  79. package/lib/types/client/styles/layout.css.d.ts.map +1 -0
  80. package/lib/types/client/styles/misc.css.d.ts +2 -0
  81. package/lib/types/client/styles/misc.css.d.ts.map +1 -0
  82. package/lib/types/client/styles/turn-fold.css.d.ts +2 -0
  83. package/lib/types/client/styles/turn-fold.css.d.ts.map +1 -0
  84. package/lib/types/index.d.ts +83 -0
  85. package/lib/types/index.d.ts.map +1 -0
  86. package/llms.txt +20 -0
  87. package/package.json +128 -0
  88. package/pwa/app.css +95 -0
  89. package/pwa/icons/icon-192.png +0 -0
  90. package/pwa/icons/icon-512.png +0 -0
  91. package/pwa/icons/icon-maskable-512.png +0 -0
  92. package/pwa/icons/icon-maskable.svg +1 -0
  93. package/pwa/icons/icon.svg +1 -0
  94. package/pwa/inject.js +190 -0
  95. package/pwa/manifest.json +29 -0
  96. package/pwa/offline.html +38 -0
  97. package/pwa/sw.js +176 -0
  98. package/pwa/touch-gestures.js +94 -0
  99. package/scripts/build-client.mjs +101 -0
  100. package/scripts/cdp-probe.mjs +64 -0
  101. package/scripts/check-attach-upload.mjs +99 -0
  102. package/scripts/check-sunk-viewport.mjs +33 -0
  103. package/scripts/check-upload-endpoint.mjs +168 -0
  104. package/src/client/MobileAttachButton.tsx +125 -0
  105. package/src/client/MobileAttachChips.tsx +85 -0
  106. package/src/client/MobileDrawerFooter.tsx +56 -0
  107. package/src/client/MobileHome.tsx +348 -0
  108. package/src/client/MobileHomeChips.tsx +426 -0
  109. package/src/client/MobileNavOverlay.tsx +279 -0
  110. package/src/client/MobileNavToggle.tsx +52 -0
  111. package/src/client/MobileSessionHeader.tsx +242 -0
  112. package/src/client/MobileSessionInfo.tsx +303 -0
  113. package/src/client/attach-upload.ts +140 -0
  114. package/src/client/chips-store.ts +41 -0
  115. package/src/client/debug.ts +253 -0
  116. package/src/client/effects/aionui-compat.ts +183 -0
  117. package/src/client/effects/gestures.ts +265 -0
  118. package/src/client/effects/header-status.ts +30 -0
  119. package/src/client/effects/phone-chrome.ts +265 -0
  120. package/src/client/effects/turn-fold.ts +258 -0
  121. package/src/client/index.tsx +227 -0
  122. package/src/client/locales.ts +109 -0
  123. package/src/client/nav-store.ts +78 -0
  124. package/src/client/session-dot.ts +17 -0
  125. package/src/client/styles/base.css.ts +167 -0
  126. package/src/client/styles/chips.css.ts +224 -0
  127. package/src/client/styles/compat.css.ts +681 -0
  128. package/src/client/styles/composer.css.ts +504 -0
  129. package/src/client/styles/header.css.ts +368 -0
  130. package/src/client/styles/home.css.ts +477 -0
  131. package/src/client/styles/index.ts +25 -0
  132. package/src/client/styles/info.css.ts +238 -0
  133. package/src/client/styles/layout.css.ts +501 -0
  134. package/src/client/styles/misc.css.ts +128 -0
  135. package/src/client/styles/turn-fold.css.ts +106 -0
  136. package/src/index.ts +343 -0
@@ -0,0 +1,238 @@
1
+ // info — session-info bottom sheet (S4, 2026-08-17). Scoped entirely to
2
+ // (max-width: 767px) and appended LAST (after composer.css.ts) so its rules
3
+ // win the header.css.ts blanket-hide tie (same specificity, later source
4
+ // wins — see the comment on the re-show block below) and the shared
5
+ // <=1023px block never sees it. 768-1023px / >=1024px: strict no-op, same
6
+ // discipline as every other phone-only file in this stylesheet.
7
+ //
8
+ // Visual language borrowed from styles/home.css.ts's workspace sheet
9
+ // (fixed/absolute bottom sheet, 16px top radius, dsh-mobile-nav-fade /
10
+ // -sheet-up keyframes from base.css.ts) and styles/composer.css.ts's own
11
+ // bottom-sheet technique for the permission/model menus (position: fixed,
12
+ // safe-area bottom padding, 48px+ touch rows) — this file reuses both
13
+ // rather than inventing a third sheet shape.
14
+
15
+ export const INFO_CSS = `/* ---------- session-info sheet (< 768px) ---------- */
16
+
17
+ /* Unconditional render (React, not CSS, decides open/closed) — default
18
+ hidden outside the phone breakpoint so a stray SESSION_INFO_EVENT at
19
+ >=768px (the ⓘ trigger itself is already CSS-hidden there) can never
20
+ paint anything, mirroring header.css.ts's own belt-and-braces list. */
21
+ [data-mobile-nav="info-layer"] {
22
+ display: none;
23
+ }
24
+
25
+ @media (max-width: 767px) {
26
+ /* header.css.ts hides every [data-slot="conversation.session.header.utilities"]
27
+ direct child by default (its own ⓘ/workbench buttons are the two named
28
+ exceptions) — this is a second, sibling entry on that same slot, so it
29
+ needs the identical re-show override. Equal specificity
30
+ ([data-slot="…"] > * vs this attribute selector, both one attribute
31
+ selector + !important) means source order decides the tie; this file
32
+ is concatenated after header.css.ts in styles/index.ts, so it wins. */
33
+ [data-phase] header [data-slot="conversation.session.header.utilities"] > [data-mobile-nav="info-layer"] {
34
+ display: block !important;
35
+ }
36
+
37
+ [data-mobile-nav="info-layer"] {
38
+ position: fixed;
39
+ inset: 0;
40
+ /* Above the composer's own bottom sheets (permission/model menus sit at
41
+ z:60, styles/composer.css.ts) and the shell.overlay layer's z:20
42
+ ceiling (AGENTS.md stacking-context pitfall) — this sheet must cover
43
+ both, which is only possible because it renders inside the header's
44
+ own DOM instead of that capped layer. */
45
+ z-index: 70;
46
+ }
47
+ [data-mobile-nav="info-mask"] {
48
+ position: absolute;
49
+ inset: 0;
50
+ border: none;
51
+ background: var(--dsw-alias-bg-mask-3, rgba(0, 0, 0, .45));
52
+ animation: dsh-mobile-nav-fade .18s var(--ds-ease-out, ease-in-out);
53
+ }
54
+ [data-mobile-nav="info-sheet"] {
55
+ position: absolute;
56
+ left: 8px;
57
+ right: 8px;
58
+ bottom: calc(var(--mnav-sab) + 8px);
59
+ max-height: 82dvh;
60
+ overflow-y: auto;
61
+ overscroll-behavior: contain;
62
+ box-sizing: border-box;
63
+ padding: 12px;
64
+ border-radius: 16px;
65
+ background: var(--dsw-alias-bg-layer-2, #ffffff);
66
+ box-shadow: 0 8px 32px rgba(0, 0, 0, .28);
67
+ animation: dsh-mobile-nav-sheet-up .22s var(--ds-ease-out, ease-in-out);
68
+ }
69
+ @media (prefers-reduced-motion: reduce) {
70
+ [data-mobile-nav="info-mask"],
71
+ [data-mobile-nav="info-sheet"] {
72
+ animation: none !important;
73
+ }
74
+ }
75
+
76
+ /* --- head: Chat/Trajectory segmented control + close --- */
77
+ [data-mobile-nav="info-head"] {
78
+ display: flex;
79
+ align-items: center;
80
+ justify-content: space-between;
81
+ gap: 8px;
82
+ margin-bottom: 10px;
83
+ }
84
+ [data-mobile-nav="info-tabs"] {
85
+ display: flex;
86
+ gap: 2px;
87
+ padding: 2px;
88
+ background: var(--dsw-alias-interactive-bg-hover, rgba(0, 0, 0, .06));
89
+ border-radius: 12px;
90
+ }
91
+ [data-mobile-nav="info-tab"] {
92
+ min-height: 36px;
93
+ padding: 0 14px;
94
+ border: none;
95
+ border-radius: 10px;
96
+ background: transparent;
97
+ color: var(--dsw-alias-label-secondary, rgba(0, 0, 0, .5));
98
+ font-family: inherit;
99
+ font-size: 14px;
100
+ cursor: pointer;
101
+ touch-action: manipulation;
102
+ -webkit-tap-highlight-color: transparent;
103
+ }
104
+ [data-mobile-nav="info-tab"][data-selected] {
105
+ background: var(--dsw-alias-bg-layer-2, #ffffff);
106
+ color: var(--dsw-alias-label-primary, inherit);
107
+ font-weight: 600;
108
+ box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
109
+ }
110
+ [data-mobile-nav="info-close"] {
111
+ display: inline-flex;
112
+ align-items: center;
113
+ justify-content: center;
114
+ width: 34px;
115
+ height: 34px;
116
+ flex: none;
117
+ padding: 0;
118
+ border: none;
119
+ border-radius: 50%;
120
+ background: transparent;
121
+ color: var(--dsw-alias-label-secondary, inherit);
122
+ cursor: pointer;
123
+ touch-action: manipulation;
124
+ -webkit-tap-highlight-color: transparent;
125
+ }
126
+ [data-mobile-nav="info-close"]:active {
127
+ background: var(--dsw-alias-interactive-bg-hover, rgba(0, 0, 0, .06));
128
+ }
129
+
130
+ /* --- badges: agent preset, subagent count, cwd --- */
131
+ [data-mobile-nav="info-badges"] {
132
+ display: flex;
133
+ flex-wrap: wrap;
134
+ align-items: center;
135
+ gap: 6px;
136
+ margin-bottom: 12px;
137
+ }
138
+ [data-mobile-nav="info-badge"],
139
+ [data-mobile-nav="info-badge-cwd"] {
140
+ display: inline-flex;
141
+ align-items: center;
142
+ max-width: 100%;
143
+ padding: 4px 10px;
144
+ border-radius: 999px;
145
+ background: var(--dsw-alias-interactive-bg-hover, rgba(0, 0, 0, .06));
146
+ color: var(--dsw-alias-label-secondary, rgba(0, 0, 0, .6));
147
+ font-size: 12px;
148
+ line-height: 18px;
149
+ overflow: hidden;
150
+ text-overflow: ellipsis;
151
+ white-space: nowrap;
152
+ }
153
+ [data-mobile-nav="info-badge-cwd"] {
154
+ font-family: var(--dsw-font-mono, ui-monospace, monospace);
155
+ }
156
+
157
+ /* --- six-cell stats grid --- */
158
+ [data-mobile-nav="info-stats"] {
159
+ display: grid;
160
+ grid-template-columns: repeat(3, 1fr);
161
+ gap: 8px;
162
+ margin-bottom: 12px;
163
+ }
164
+ [data-mobile-nav="info-stat"] {
165
+ display: flex;
166
+ flex-direction: column;
167
+ align-items: center;
168
+ gap: 2px;
169
+ min-height: 48px;
170
+ padding: 8px 4px;
171
+ border-radius: 12px;
172
+ background: var(--dsw-alias-bg-layer-1, rgba(0, 0, 0, .03));
173
+ text-align: center;
174
+ }
175
+ [data-mobile-nav="info-stat-value"] {
176
+ color: var(--dsw-alias-label-primary, inherit);
177
+ font-size: 17px;
178
+ font-weight: 600;
179
+ font-variant-numeric: tabular-nums;
180
+ line-height: 1.2;
181
+ }
182
+ [data-mobile-nav="info-stat-label"] {
183
+ color: var(--dsw-alias-label-tertiary, rgba(0, 0, 0, .4));
184
+ font-size: 11px;
185
+ line-height: 1.3;
186
+ }
187
+ [data-mobile-nav="info-stat-sub"] {
188
+ color: var(--dsw-alias-label-tertiary, rgba(0, 0, 0, .4));
189
+ font-size: 10px;
190
+ line-height: 1.2;
191
+ }
192
+
193
+ [data-mobile-nav="info-error"] {
194
+ margin-bottom: 8px;
195
+ padding: 8px 10px;
196
+ border-radius: 10px;
197
+ background: var(--dsw-alias-state-warn-bg, rgba(217, 119, 6, .12));
198
+ color: var(--dsw-alias-state-warn-primary, #d97706);
199
+ font-size: 12px;
200
+ line-height: 1.4;
201
+ }
202
+
203
+ /* --- action row: export / rename / fork / archive --- */
204
+ [data-mobile-nav="info-actions"] {
205
+ display: grid;
206
+ grid-template-columns: repeat(2, 1fr);
207
+ gap: 8px;
208
+ }
209
+ [data-mobile-nav="info-action"] {
210
+ display: flex;
211
+ align-items: center;
212
+ justify-content: center;
213
+ gap: 6px;
214
+ min-height: 48px;
215
+ padding: 0 10px;
216
+ border: 1px solid var(--dsw-alias-border-l1, rgba(0, 0, 0, .12));
217
+ border-radius: 12px;
218
+ background: transparent;
219
+ color: var(--dsw-alias-label-primary, inherit);
220
+ font-family: inherit;
221
+ font-size: 13px;
222
+ cursor: pointer;
223
+ touch-action: manipulation;
224
+ -webkit-tap-highlight-color: transparent;
225
+ }
226
+ [data-mobile-nav="info-action"]:active:not(:disabled) {
227
+ background: var(--dsw-alias-interactive-bg-hover, rgba(0, 0, 0, .06));
228
+ }
229
+ [data-mobile-nav="info-action"]:disabled {
230
+ opacity: .5;
231
+ cursor: default;
232
+ }
233
+ [data-mobile-nav="info-action"][data-mobile-nav-danger] {
234
+ border-color: var(--dsw-alias-state-warn-primary, #d97706);
235
+ color: var(--dsw-alias-state-warn-primary, #d97706);
236
+ }
237
+ }
238
+ `