@monotykamary/dsh-client-web 0.1.0-rc.10

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DeepSeek
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.
@@ -0,0 +1,6 @@
1
+ # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
2
+ # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
+ # after editing either side, bring the other along and re-record with:
4
+ # pnpm run verify-translation-pairing --write packages/client/web/README.md
5
+ README.md: 5eab78dc506873652dbb2559df922e9a24f5518e
6
+ README.zh.md: d143c6e7ed22c9bedf89ac5724b4e6eb0ffd43dc
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # @monotykamary/dsh-client-web
2
+
3
+ English | [中文](README.zh.md)
4
+
5
+ Web boot kernel: `new AppWebEntry(el, seams?).run()` mounts the client through two stages. The module stage calls the Host-installed `window.__ModuleLoader__.create()` with `window.__DSH_BOOT__`, the shell's static modules, and any test transport override; the facade returns the constructed module system and parsed manifest after adopting parser-preloaded registrations. This package then prefetches the `immediately` tier. The plugin stage mounts the vendored Cordis Loader, injects that module system through the Loader's `internal` interface, creates every graph entry uniformly, and waits for every fiber to become ACTIVE. It then hands the marked boot DOM to the dynamic UI renderer's `ctx.uiRenderer.mount(el)` operation; the renderer hydrates that DOM before switching to the complete UI. The Host owns the graph, parser preloads, and facade; AppWebEntry does not know the bootstrap package id or parse the wire format.
6
+
7
+ The boot page uses plain DOM and local CSS, so client-bundle and plugin-activation failures remain visible. Its fallback fonts and colors match the theme tokens that arrive during loading. Fiber updates retain one spinner node and grow its CSS arc as entries first become active; hydration preserves that node and its animation phase until the application commit. React mounting, slot rendering, application assembly, and browser-title projection live in [`ui-renderer`](../ui-renderer/README.md). The modules bundle caches its own materialized exports and provides the closed-over system when its ordinary graph entry activates; Cordis service waiting makes graph-row creation order independent from that activation.
8
+
9
+ `PLATFORM_MODULES` (src/platform.ts) is the single source of truth for shell-seeded shared modules. Together with `PRELOADED_CLIENT_EXTERNALS`, it defines the implicit external baseline for every dynamic bundle; `dsh.client.external` adds only exact non-baseline requests.
10
+
11
+ The optional override parameter `seams` forwards the module system's `loadBundle` transport override (`BootSeams`) for environments where external `<script>` execution cannot reach the page context; ordinary browser callers omit it.
12
+
13
+ The shell owns browser-title projection. With a selected session carrying a durable title, it renders `<session title> — <existing HTML title>` and reacts to later title revisions; no selection or a selected untitled session preserves the existing title, and shell unmount restores it. The existing HTML title remains the configurable product suffix. The non-reloadable kernel observes its shell-owned `#root` child list and document visibility: when a visible root loses its required AppRoot child, it reloads the complete document immediately; a root emptied while hidden reloads when the document becomes visible, while a mounted child never triggers recovery.
14
+
15
+ ## Model Experience
16
+
17
+ None, as the entry shell boots the browser plugin tree; nothing here reaches a model request.
18
+
19
+ #### KV Cache effect
20
+
21
+ None; this package neither assembles nor sends a provider request.
22
+
23
+ ## Known Limitations and Deferred Work
24
+
25
+ - **The application waits for the full roster** — one failed entry keeps the framework-free boot page visible with a per-entry report; partial UI availability is not supported.
package/README.zh.md ADDED
@@ -0,0 +1,25 @@
1
+ # @monotykamary/dsh-client-web
2
+
3
+ [English](README.md) | 中文
4
+
5
+ Web 启动内核:`new AppWebEntry(el, seams?).run()` 分两个阶段挂载客户端。模块阶段调用 Host 安装的 `window.__ModuleLoader__.create()`,传入 `window.__DSH_BOOT__`、外壳静态模块以及可选测试传输覆盖;facade 接纳 parser 预载的 registration 后返回构造好的模块系统与已解析 manifest。本包随后预取 `immediately` 层级。插件阶段挂载仓库内置的 Cordis Loader,通过 Loader 的 `internal` 接口注入该模块系统,统一创建全部图 entry,并等待每个 fiber 进入 ACTIVE。随后它把带标记的启动 DOM 交给动态 UI 渲染器的 `ctx.uiRenderer.mount(el)` 操作;渲染器先 hydrate 该 DOM,再切换到完整 UI。Graph、parser preload 与 facade 归 Host 所有;AppWebEntry 不感知 bootstrap package id,也不解析 wire 格式。
6
+
7
+ 启动页只使用原生 DOM 与本地 CSS,因此客户端 bundle 或插件激活失败时仍能显示。其回退字体和颜色与加载期间到达的主题 token 一致。fiber 更新会保留同一个 spinner 节点,并在 entry 首次进入 active 时增长其 CSS 圆弧;hydrate 会继续保留该节点及其动画相位,直到应用提交。React 挂载、slot 渲染、应用组装和浏览器标题投影位于 [`ui-renderer`](../ui-renderer/README.md)。Modules bundle 会缓存自身已物化导出,并在其普通图 entry 激活时提供闭包中的系统;Cordis service 等待使图 row 创建顺序不依赖该激活时点。
8
+
9
+ `PLATFORM_MODULES`(src/platform.ts)是外壳播种共享模块的唯一事实来源。它与 `PRELOADED_CLIENT_EXTERNALS` 一起定义全部动态 bundle 的隐式 external 基座;`dsh.client.external` 只添加基座之外的精确请求。
10
+
11
+ 可选的覆盖参数 `seams` 会为外部 `<script>` 执行无法到达页面上下文的环境转发模块系统的 `loadBundle` 传输覆盖(`BootSeams`);普通浏览器调用方省略此参数。
12
+
13
+ 外壳拥有浏览器标题投影。选中带有持久标题的会话时,它会渲染 `<session title> — <existing HTML title>` 并响应后续标题修订;未选择会话或选中无标题会话时,会保留现有标题;外壳卸载时恢复标题。现有 HTML 标题仍是可配置的产品后缀。不可 reload 的 kernel 会观察外壳自有 `#root` 的子项列表与 document visibility:当可见 root 丢失其必需 AppRoot 子项时,它会立即 reload 完整 document;隐藏时变空的 root 会在 document 变为可见时 reload,仍挂载的子项不会触发恢复。
14
+
15
+ ## 模型体验
16
+
17
+ 无。入口外壳负责启动浏览器插件树;这里没有任何内容进入模型请求。
18
+
19
+ #### KV Cache 影响
20
+
21
+ 无;该包既不组装也不发送提供方请求。
22
+
23
+ ## 已知限制与暂缓事项
24
+
25
+ - **应用会等待完整名册**:只要一个 entry 失败,不依赖框架的启动页就会保留并逐项报告;不支持部分 UI 可用。
@@ -0,0 +1,66 @@
1
+ /* Boot page styles are self-contained: the theme base stylesheets are linked
2
+ by the shell, but the loading page must render acceptably even before/without
3
+ them, so this file uses tokens with neutral fallbacks (the one sanctioned
4
+ fallback site — plugin packages must not do this). */
5
+
6
+ .boot {
7
+ height: 100%;
8
+ display: grid;
9
+ place-items: center;
10
+ background: var(--dsw-alias-bg-base, #f9fafb);
11
+ }
12
+
13
+ .card {
14
+ display: flex;
15
+ flex-direction: column;
16
+ align-items: center;
17
+ gap: 16px;
18
+ }
19
+
20
+ .wordmark {
21
+ font-size: 16px;
22
+ line-height: 24px;
23
+ font-weight: 600;
24
+ letter-spacing: 0.08em;
25
+ color: var(--dsw-alias-label-primary, #0f1115);
26
+ }
27
+
28
+ .hint {
29
+ font-size: 12px;
30
+ line-height: 18px;
31
+ color: var(--dsw-alias-label-tertiary, #81858c);
32
+ }
33
+
34
+ .spinner {
35
+ width: 20px;
36
+ height: 20px;
37
+ border-radius: 50%;
38
+ border: 2px solid var(--dsw-alias-border-l2, rgb(0 0 0 / 10%));
39
+ border-top-color: var(--dsw-alias-brand-primary, #3964fe);
40
+ animation: spin 0.8s linear infinite;
41
+ }
42
+
43
+ @keyframes spin {
44
+ to { transform: rotate(360deg); }
45
+ }
46
+
47
+ .failed {
48
+ max-width: 480px;
49
+ display: flex;
50
+ flex-direction: column;
51
+ gap: 8px;
52
+ }
53
+
54
+ .failedTitle {
55
+ font-size: 14px;
56
+ line-height: 22px;
57
+ font-weight: 600;
58
+ color: var(--dsw-alias-label-primary, #0f1115);
59
+ }
60
+
61
+ .failedItem {
62
+ font-family: var(--ds-font-family-code, ui-monospace, 'SF Mono', Menlo, Consolas, 'Courier New');
63
+ font-size: 12px;
64
+ line-height: 18px;
65
+ color: var(--dsw-alias-label-secondary, #61666b);
66
+ }
package/lib/base.css ADDED
@@ -0,0 +1,41 @@
1
+ /* Shell-owned mount defaults. Theme tokens arrive with the ui-theme client
2
+ * plugin before the loader roster activates. */
3
+
4
+ html,
5
+ body,
6
+ #root {
7
+ height: 100%;
8
+ margin: 0;
9
+ }
10
+
11
+ body {
12
+ font-family: var(
13
+ --dsw-font-family,
14
+ -apple-system,
15
+ BlinkMacSystemFont,
16
+ 'Segoe UI',
17
+ 'PingFang SC',
18
+ 'Hiragino Sans GB',
19
+ 'Microsoft YaHei',
20
+ 'Helvetica Neue',
21
+ Helvetica,
22
+ Arial,
23
+ sans-serif
24
+ );
25
+ /* Grayscale antialiasing over subpixel rendering: WebKit/Blink and the
26
+ Firefox macOS equivalent; other engines ignore both lines. */
27
+ -webkit-font-smoothing: antialiased;
28
+ -moz-osx-font-smoothing: grayscale;
29
+ color: var(--dsw-alias-label-primary, #0f1115);
30
+ background: var(--dsw-alias-bg-base, #fff);
31
+ }
32
+
33
+ /* Form controls don't inherit the body font (UA sheets pin their families —
34
+ Chrome buttons fall back to Arial, textareas to monospace), so the app
35
+ stack is re-applied to them explicitly, as upstream's global reset does. */
36
+ button,
37
+ input,
38
+ select,
39
+ textarea {
40
+ font-family: inherit;
41
+ }
package/lib/index.js ADDED
@@ -0,0 +1,454 @@
1
+ import * as ReactJsxRuntime from "react/jsx-runtime";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import * as Cordis from "@monotykamary/cordis";
4
+ import { Context } from "@monotykamary/cordis";
5
+ import Loader from "@monotykamary/cordis-plugin-loader";
6
+ import * as ReactDomClient from "react-dom/client";
7
+ import { createRoot } from "react-dom/client";
8
+ import * as ModulesClient from "@monotykamary/dsh-client-modules/client";
9
+ import { ClientModuleSystem, parseBootManifest } from "@monotykamary/dsh-client-modules/client";
10
+ import { bindSnapshotSelector, createSlotRenderer } from "@monotykamary/dsh-client-web-react";
11
+ import * as React from "react";
12
+ import { useEffect, useRef, useSyncExternalStore } from "react";
13
+ import css from "./AppRoot.module.css";
14
+ import * as ReactDom from "react-dom";
15
+ import * as UiSlots from "@monotykamary/dsh-client-ui-slots";
16
+ import * as UiPrimitives from "@monotykamary/dsh-client-ui-primitives";
17
+ import "./base.css";
18
+ //#region \0rolldown/runtime.js
19
+ var __defProp = Object.defineProperty;
20
+ var __exportAll = (all, no_symbols) => {
21
+ let target = {};
22
+ for (var name in all) __defProp(target, name, {
23
+ get: all[name],
24
+ enumerable: true
25
+ });
26
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
27
+ return target;
28
+ };
29
+ //#endregion
30
+ //#region lib/types/DocumentTitle.js
31
+ /**
32
+ * Project the selected durable session title into the browser title and
33
+ * restore the shell's original product title when unmounted.
34
+ * @param props - selected session title projection.
35
+ * @returns no rendered content.
36
+ */
37
+ function DocumentTitle({ title }) {
38
+ const original = useRef(document.title);
39
+ useEffect(() => {
40
+ document.title = title === void 0 ? original.current : `${title} — ${original.current}`;
41
+ return () => {
42
+ document.title = original.current;
43
+ };
44
+ }, [title]);
45
+ return null;
46
+ }
47
+ //#endregion
48
+ //#region lib/types/app.js
49
+ /**
50
+ * Build the renderApp factory the app-shell plugin provides to AppRoot.
51
+ * @param deps - assembly inputs.
52
+ * @returns factory producing the real UI tree (called once per AppRoot render after settled).
53
+ */
54
+ function buildRenderApp(deps) {
55
+ const { ctx } = deps;
56
+ const sessions = ctx.get("sessions");
57
+ if (sessions === void 0) throw new Error("shell assembly: sessions service unavailable");
58
+ const useSessions = bindSnapshotSelector(sessions.list);
59
+ const SessionDocumentTitle = () => {
60
+ const title = useSessions((state) => {
61
+ const id = state.current;
62
+ return id === void 0 ? void 0 : state.byId[id]?.title;
63
+ });
64
+ return jsx(DocumentTitle, { ...title === void 0 ? {} : { title } });
65
+ };
66
+ return () => jsxs(Fragment, { children: [jsx(SessionDocumentTitle, {}), ctx.slots.renderSlot("root", {})] });
67
+ }
68
+ //#endregion
69
+ //#region lib/types/app-shell.js
70
+ var app_shell_exports = /* @__PURE__ */ __exportAll({
71
+ APP_SHELL_ID: () => APP_SHELL_ID,
72
+ apply: () => apply,
73
+ inject: () => inject,
74
+ name: () => name
75
+ });
76
+ /** Shell-owned pseudo entry id under which the host graph mounts this plugin. */
77
+ const APP_SHELL_ID = "@monotykamary/dsh-client-app-shell";
78
+ /** Cordis plugin name. */
79
+ const name = "app-shell";
80
+ /** Services required before shell assembly. */
81
+ const inject = [
82
+ "slots",
83
+ "sessions",
84
+ "layout"
85
+ ];
86
+ /** Installs the React renderer and exposes the assembled application.
87
+ * @param ctx - Plugin context.
88
+ */
89
+ function apply(ctx) {
90
+ ctx.slots.install(createSlotRenderer());
91
+ let renderApp;
92
+ ctx.reflect.provide("appShell", { renderApp: () => {
93
+ renderApp ??= buildRenderApp({ ctx });
94
+ return renderApp();
95
+ } });
96
+ }
97
+ //#endregion
98
+ //#region lib/types/AppRoot.js
99
+ /**
100
+ * Shell root: boot loading page → (boot settled) → real UI in one switch.
101
+ * Pure kernel component with zero plugin dependencies — before settled it may
102
+ * only rely on itself (the fail-loud presentation must not depend on the
103
+ * system whose failure it reports; the status/signal stores are kernel-own,
104
+ * shell self-sufficiency rule); the real UI is produced by the
105
+ * app-shell entry once every entry is active. A failed boot keeps the
106
+ * loading page, lists the per-entry fiber states and the sweep report (fail
107
+ * loud, no partial UI).
108
+ */
109
+ /** Boot gate: loading page until the boot settles; failures stay here. */
110
+ function AppRoot(props) {
111
+ const settled = useSyncExternalStore(props.settled.subscribe, props.settled.getSnapshot);
112
+ const status = useSyncExternalStore(props.status.subscribe, props.status.getSnapshot);
113
+ const error = useSyncExternalStore(props.error.subscribe, props.error.getSnapshot);
114
+ const failed = Object.entries(status).filter(([, s]) => s === "failed");
115
+ if (settled) return jsx(Fragment, { children: props.renderApp() });
116
+ const loud = error !== void 0 || failed.length > 0;
117
+ return jsx("div", {
118
+ className: css.boot,
119
+ children: jsxs("div", {
120
+ className: css.card,
121
+ children: [jsx("div", {
122
+ className: css.wordmark,
123
+ children: "HARNESS"
124
+ }), !loud ? jsxs(Fragment, { children: [jsx("div", { className: css.spinner }), jsx("div", {
125
+ className: css.hint,
126
+ children: "Loading plugins…"
127
+ })] }) : jsxs("div", {
128
+ className: css.failed,
129
+ children: [
130
+ jsx("div", {
131
+ className: css.failedTitle,
132
+ children: "Failed to load plugins"
133
+ }),
134
+ failed.map(([id]) => jsx("div", {
135
+ className: css.failedItem,
136
+ children: id
137
+ }, id)),
138
+ error !== void 0 && jsx("div", {
139
+ className: css.failedItem,
140
+ children: error
141
+ })
142
+ ]
143
+ })]
144
+ })
145
+ });
146
+ }
147
+ //#endregion
148
+ //#region lib/types/seed.js
149
+ /**
150
+ * Platform-singleton module-table. These are the ONLY entities the shell
151
+ * shares into the frozen module table — fetch bundles resolve their externals
152
+ * against exactly this set through the loader's require. Keys come from the
153
+ * platform constant module ({@link ./platform.ts}, the single source
154
+ * of truth with the tsdown client externals); values stay shell-static
155
+ * imports so every bundle sees the same instance.
156
+ */
157
+ /**
158
+ * Build the static table handed to the module loader at boot.
159
+ * @returns module specifier → exported entity (one entry per platform word).
160
+ */
161
+ function getStaticModules() {
162
+ return {
163
+ "react": React,
164
+ "react/jsx-runtime": ReactJsxRuntime,
165
+ "react-dom": ReactDom,
166
+ "react-dom/client": ReactDomClient,
167
+ "@monotykamary/cordis": Cordis,
168
+ "@monotykamary/dsh-client-ui-slots": UiSlots,
169
+ "@monotykamary/dsh-client-ui-primitives": UiPrimitives
170
+ };
171
+ }
172
+ //#endregion
173
+ //#region lib/types/loader-status.js
174
+ /**
175
+ * Value mirror of cordis's `FiberState` const enum: a const enum has no
176
+ * runtime object to import (and esbuild-based pipelines cannot inline it
177
+ * across modules), so these values mirror the pinned vendored definition
178
+ * while retaining its type (same rationale as dsh-tool-cordis's mirror).
179
+ */
180
+ const FIBER_STATE = {
181
+ PENDING: 0,
182
+ LOADING: 1,
183
+ ACTIVE: 2,
184
+ FAILED: 3,
185
+ DISPOSED: 4,
186
+ UNLOADING: 5
187
+ };
188
+ /** Label for each fiber state, keyed by member (inlining-safe — no reverse mapping). */
189
+ const STATE_LABELS = {
190
+ [FIBER_STATE.PENDING]: "pending",
191
+ [FIBER_STATE.LOADING]: "loading",
192
+ [FIBER_STATE.ACTIVE]: "active",
193
+ [FIBER_STATE.FAILED]: "failed",
194
+ [FIBER_STATE.DISPOSED]: "disposed",
195
+ [FIBER_STATE.UNLOADING]: "unloading"
196
+ };
197
+ /**
198
+ * Create a writable kernel signal.
199
+ * @param init - initial value.
200
+ * @returns the signal.
201
+ */
202
+ function createSignal(init) {
203
+ let value = init;
204
+ const listeners = /* @__PURE__ */ new Set();
205
+ return {
206
+ getSnapshot: () => value,
207
+ subscribe: (fn) => {
208
+ listeners.add(fn);
209
+ return () => {
210
+ listeners.delete(fn);
211
+ };
212
+ },
213
+ set: (next) => {
214
+ value = next;
215
+ for (const fn of [...listeners]) fn();
216
+ }
217
+ };
218
+ }
219
+ /**
220
+ * Create the boot status store.
221
+ * @returns the store (empty until the boot chain projects rows).
222
+ */
223
+ function createLoaderStatusStore() {
224
+ let value = {};
225
+ const listeners = /* @__PURE__ */ new Set();
226
+ return {
227
+ getSnapshot: () => value,
228
+ subscribe: (fn) => {
229
+ listeners.add(fn);
230
+ return () => {
231
+ listeners.delete(fn);
232
+ };
233
+ },
234
+ set: (id, state) => {
235
+ value = {
236
+ ...value,
237
+ [id]: state
238
+ };
239
+ for (const fn of [...listeners]) fn();
240
+ }
241
+ };
242
+ }
243
+ //#endregion
244
+ //#region lib/types/boot.js
245
+ /**
246
+ * Web shell boot kernel — the face consumed by the apps/web entry. Everything
247
+ * here is machinery that cannot itself be a loader entry, and none of it
248
+ * value-imports a plugin package (shell self-sufficiency rule: the
249
+ * loading page must work while — especially when — plugins fail). The one
250
+ * sanctioned exception is the modules package (bootstrap
251
+ * identity): the module system cannot arrive through itself, so its class
252
+ * and its client-half wrapper are shell-bundled and the kernel adopts its
253
+ * plugin entry once cordis is up.
254
+ *
255
+ * AppWebEntry.run(), module face first, then plugin face: parse
256
+ * `window.__DSH_BOOT__` into the two-view BootManifest (wire boundary)
257
+ * → build the module system over the module-view rows → render the loading
258
+ * page → prefetch every `immediately` row in parallel with mounting the
259
+ * vendored cordis Loader (`internal` contract injection BEFORE any entry exists —
260
+ * the bare-import fallback in tree.import must never run in a browser) →
261
+ * await the prefetch tier, THEN adopt the modules entry and create one
262
+ * loader entry per plugin-view row plus the shell-own app-shell assembly
263
+ * entry → loader.await() + a full fiber sweep (all ACTIVE, else fail
264
+ * listing who/what/which service) → flip the settled signal so AppRoot
265
+ * switches to the real UI in one pass.
266
+ *
267
+ * Entry creation waits for the whole immediately tier: materialization runs
268
+ * synchronous cross-package require edges (e.g. locale → runtime/client) that
269
+ * fiber inject waiting cannot protect — a bundle's factory must be
270
+ * registered before any dependent entry materializes. Per-row prefetch
271
+ * failures still resolve silently (the create-side import reloads and
272
+ * owns the loud failure), so the barrier never turns one bad bundle into a
273
+ * boot-wide fail-fast.
274
+ *
275
+ * Composition lives in the host graph; the shell makes zero composition
276
+ * decisions (the app-shell assembly is itself a graph entry, the only
277
+ * shell-own module registered with the module system).
278
+ */
279
+ /**
280
+ * Reload a visible document whose shell-owned React mount point has become empty.
281
+ * @param element - shell mount point that must retain one AppRoot child after render.
282
+ * @param reload - document reload action, replaceable by browser tests.
283
+ * @returns disposer for the visibility listener.
284
+ */
285
+ function installBlankRootRecovery(element, reload = () => {
286
+ globalThis.location.reload();
287
+ }) {
288
+ const recover = () => {
289
+ if (document.visibilityState === "visible" && element.childElementCount === 0) reload();
290
+ };
291
+ const observer = new MutationObserver(recover);
292
+ observer.observe(element, { childList: true });
293
+ document.addEventListener("visibilitychange", recover);
294
+ return () => {
295
+ observer.disconnect();
296
+ document.removeEventListener("visibilitychange", recover);
297
+ };
298
+ }
299
+ /**
300
+ * The modules package's own graph row id. The kernel adopts that entry
301
+ * itself (its wrapper is statically registered — shell-bundled code, never
302
+ * fetched), so the plugin-row loop must skip it: the vendored Group.create
303
+ * does not deduplicate by name, and a second fiber would provide 'modules'
304
+ * twice.
305
+ */
306
+ const MODULES_ID = "@monotykamary/dsh-client-modules";
307
+ /**
308
+ * The web shell kernel: mounts the loading page into a DOM element and runs
309
+ * the two-stage boot over the host graph. Fields hold only what must exist
310
+ * before cordis does — the parsed manifest, the module system, and the
311
+ * loading-page UI handles; everything else lives in plugins.
312
+ */
313
+ var AppWebEntry = class {
314
+ el;
315
+ seams;
316
+ status = createLoaderStatusStore();
317
+ settled = createSignal(false);
318
+ error = createSignal(void 0);
319
+ ctx;
320
+ modules;
321
+ manifest;
322
+ root;
323
+ disposeBlankRootRecovery;
324
+ /**
325
+ * Hold the mount point; all work happens in {@link run}.
326
+ * @param el - mount point (the app's #root).
327
+ * @param seams - Optional module transport overrides for test environments.
328
+ */
329
+ constructor(el, seams) {
330
+ this.el = el;
331
+ this.seams = seams;
332
+ }
333
+ /**
334
+ * Run the boot chain to settlement. Boot-chain failures resolve (not
335
+ * reject): the loading page stays up and renders the failure report (the
336
+ * fail-loud surface the kernel owns). Rejects only when the boot manifest
337
+ * is missing or malformed — there is nothing to boot against.
338
+ * @returns resolves once the UI settled or the failure report rendered.
339
+ */
340
+ async run() {
341
+ this.manifest = parseBootManifest(globalThis.__DSH_BOOT__);
342
+ this.modules = new ClientModuleSystem({
343
+ modules: this.manifest.modules,
344
+ staticModules: getStaticModules(),
345
+ ...this.seams
346
+ });
347
+ this.modules.registerStatic(APP_SHELL_ID, app_shell_exports);
348
+ this.modules.registerStatic(MODULES_ID, ModulesClient);
349
+ globalThis.__DSH_MODULES__ = this.modules;
350
+ this.root = createRoot(this.el);
351
+ this.root.render(jsx(AppRoot, {
352
+ settled: this.settled,
353
+ status: this.status,
354
+ error: this.error,
355
+ renderApp: () => {
356
+ const shell = this.ctx.get("appShell");
357
+ if (shell === void 0) throw new Error("web boot: appShell service missing after settled");
358
+ return shell.renderApp();
359
+ }
360
+ }));
361
+ this.disposeBlankRootRecovery = installBlankRootRecovery(this.el);
362
+ const prefetching = this.prefetchImmediateTier();
363
+ this.ctx = new Context();
364
+ try {
365
+ await this.runPluginBoot(prefetching);
366
+ this.settled.set(true);
367
+ } catch (reason) {
368
+ console.error(reason);
369
+ this.error.set(reason instanceof Error ? reason.message : String(reason));
370
+ }
371
+ }
372
+ /** Unmount the shell (loading page or settled UI). */
373
+ dispose() {
374
+ this.disposeBlankRootRecovery?.();
375
+ this.disposeBlankRootRecovery = void 0;
376
+ this.root?.unmount();
377
+ }
378
+ /** Prefetch the immediately tier (factory registration only; failures defer to the import path). */
379
+ async prefetchImmediateTier() {
380
+ await Promise.all(this.manifest.plugins.filter((row) => row.immediately).map((row) => this.modules.prefetch(row.id).catch(() => {})));
381
+ }
382
+ /** Plugin face: mount the Loader, inject the `internal` contract, adopt modules, create the graph entries, settle, sweep. */
383
+ async runPluginBoot(prefetching) {
384
+ const ctx = this.ctx;
385
+ await ctx.plugin(Loader);
386
+ const loader = ctx.loader;
387
+ loader.internal = this.modules;
388
+ ctx.on("internal/status", (fiber) => {
389
+ const entry = fiber.entry;
390
+ if (entry === void 0 || entry.fiber === void 0) return;
391
+ this.status.set(entry.options.name, STATE_LABELS[entry.fiber.state]);
392
+ });
393
+ await prefetching;
394
+ const rows = [
395
+ MODULES_ID,
396
+ ...this.manifest.plugins.map((row) => row.id).filter((id) => id !== MODULES_ID),
397
+ APP_SHELL_ID
398
+ ];
399
+ await Promise.all(rows.map(async (name) => {
400
+ this.status.set(name, "loading");
401
+ const id = await loader.create({ name });
402
+ if (loader.resolve(id).fiber === void 0) this.status.set(name, "failed");
403
+ }));
404
+ await loader.await();
405
+ this.assertEntriesActive();
406
+ }
407
+ /**
408
+ * Sweep every loader entry after the tree quiesced: an entry without a
409
+ * fiber failed its import; a fiber not ACTIVE is FAILED (apply threw) or
410
+ * PENDING (a required service never arrived — cordis inject waiting has no
411
+ * timeout, so this sweep is the fail-loud compensation).
412
+ */
413
+ assertEntriesActive() {
414
+ const ctx = this.ctx;
415
+ const failures = [];
416
+ for (const entry of ctx.loader.entries()) {
417
+ const name = entry.options.name;
418
+ if (entry.fiber === void 0) {
419
+ failures.push(`${name}: import failed (see console for the import error)`);
420
+ continue;
421
+ }
422
+ const state = STATE_LABELS[entry.fiber.state];
423
+ if (state === "active") continue;
424
+ if (state === "pending") {
425
+ const missing = Object.keys(entry.fiber.inject).filter((service) => ctx.get(service) === void 0);
426
+ failures.push(`${name}: pending (waiting for service${missing.length === 1 ? "" : "s"}: ${missing.join(", ") || "unknown"})`);
427
+ } else failures.push(`${name}: ${state}`);
428
+ }
429
+ if (failures.length > 0) throw new Error(`web boot: ${String(failures.length)} entr${failures.length === 1 ? "y" : "ies"} did not activate\n${failures.join("\n")}`);
430
+ }
431
+ };
432
+ //#endregion
433
+ //#region lib/types/platform.js
434
+ /**
435
+ * Shared browser platform modules. Seeding, bundling externals, and Vite
436
+ * aliases consume this list so their module identities cannot drift.
437
+ * @module @monotykamary/dsh-client-web/src/platform
438
+ */
439
+ /** The module specifiers the shell shares into the frozen module table. */
440
+ const PLATFORM_MODULES = [
441
+ "react",
442
+ "react/jsx-runtime",
443
+ "react-dom",
444
+ "react-dom/client",
445
+ "@monotykamary/cordis",
446
+ "@monotykamary/dsh-client-ui-slots",
447
+ "@monotykamary/dsh-client-ui-primitives"
448
+ ];
449
+ /** Client-bundle specifiers whose factories the parser preloads before the shell starts. */
450
+ const PRELOADED_CLIENT_EXTERNALS = ["@monotykamary/dsh-client-runtime/client"];
451
+ //#endregion
452
+ export { AppWebEntry, PLATFORM_MODULES, PRELOADED_CLIENT_EXTERNALS, getStaticModules };
453
+
454
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,27 @@
1
+ //#region lib/types/invariant.js
2
+ /**
3
+ * Package-owned invariant companion for `@monotykamary/dsh-client-web`.
4
+ * @module @monotykamary/dsh-client-web/invariant
5
+ */
6
+ const PACKAGE_NAME = "@monotykamary/dsh-client-web";
7
+ /** Cordis companion plugin name. */
8
+ const name = "client-web-invariant";
9
+ /** Service required before the companion can reserve package ownership. */
10
+ const inject = ["invariants"];
11
+ /**
12
+ * No runtime invariant: the vite entry shell — boot glue and module-table
13
+ * seeding with no cordis events and no cross-plugin mutable state; the boot
14
+ * chain (loading page → settled → one-flip UI) is asserted by the web smoke
15
+ * e2e against the real carrier.
16
+ */
17
+ const install = () => {};
18
+ /**
19
+ * Register this package's invariant companion.
20
+ * @param ctx - Cordis context carrying the invariant service.
21
+ * @returns the installed registration's disposer after setup succeeds.
22
+ */
23
+ const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
24
+ //#endregion
25
+ export { apply, inject, name };
26
+
27
+ //# sourceMappingURL=invariant.js.map
@@ -0,0 +1,16 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { KernelSignal, LoaderStatus } from './loader-status.ts';
3
+ /** AppRoot props: settled signal, fiber-state projection feed, boot failure report, deferred real-UI factory. */
4
+ export interface AppRootProps {
5
+ /** True once the boot chain settled (loader quiesced + all entries ACTIVE); the boot closure flips it. */
6
+ settled: KernelSignal<boolean>;
7
+ /** Per-entry fiber-state projection store (drives loading/failed rendering). */
8
+ status: KernelSignal<LoaderStatus>;
9
+ /** Boot failure report (the settle rejection message); undefined while loading or after success. */
10
+ error: KernelSignal<string | undefined>;
11
+ /** Builds the real UI; called only after settled. */
12
+ renderApp: () => ReactNode;
13
+ }
14
+ /** Boot gate: loading page until the boot settles; failures stay here. */
15
+ export declare function AppRoot(props: AppRootProps): import("react").JSX.Element;
16
+ //# sourceMappingURL=AppRoot.d.ts.map
@@ -0,0 +1,13 @@
1
+ /** Props for the shell-owned browser title projection. */
2
+ export interface DocumentTitleProps {
3
+ /** Durable title of the selected session, or undefined for the product title. */
4
+ title?: string;
5
+ }
6
+ /**
7
+ * Project the selected durable session title into the browser title and
8
+ * restore the shell's original product title when unmounted.
9
+ * @param props - selected session title projection.
10
+ * @returns no rendered content.
11
+ */
12
+ export declare function DocumentTitle({ title }: DocumentTitleProps): null;
13
+ //# sourceMappingURL=DocumentTitle.d.ts.map
@@ -0,0 +1,28 @@
1
+ /**
2
+ * App-shell assembly plugin. Its pseudo package id exists only in the host
3
+ * graph and shell registry; there is no npm package behind it.
4
+ */
5
+ import type { ReactNode } from 'react';
6
+ import type { Context } from '@monotykamary/cordis';
7
+ /** Shell-owned pseudo entry id under which the host graph mounts this plugin. */
8
+ export declare const APP_SHELL_ID = "@monotykamary/dsh-client-app-shell";
9
+ /** The assembled-UI face AppRoot renders once the boot settles. */
10
+ export interface AppShellService {
11
+ /** Build (once) and render the real UI tree. */
12
+ renderApp: () => ReactNode;
13
+ }
14
+ declare module '@monotykamary/cordis' {
15
+ interface Context {
16
+ /** The shell assembly face, provided by the app-shell entry once its inject set is active. */
17
+ appShell: AppShellService;
18
+ }
19
+ }
20
+ /** Cordis plugin name. */
21
+ export declare const name = "app-shell";
22
+ /** Services required before shell assembly. */
23
+ export declare const inject: string[];
24
+ /** Installs the React renderer and exposes the assembled application.
25
+ * @param ctx - Plugin context.
26
+ */
27
+ export declare function apply(ctx: Context): void;
28
+ //# sourceMappingURL=app-shell.d.ts.map
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Real-UI assembly closure, invoked by the app-shell plugin once its inject
3
+ * set is active: the whole layout tree hangs off the built-in 'root' slot
4
+ * (ui-layout registers AppFrame there and renders the child slots
5
+ * internally) — the shell's render is the one ctx-level renderSlot call in
6
+ * the program.
7
+ */
8
+ import type { ReactNode } from 'react';
9
+ import type { Context } from '@monotykamary/cordis';
10
+ /** Assembly inputs: the active app-shell plugin ctx (slots/sessions/layout services provided). */
11
+ export interface AssemblyDeps {
12
+ /** Client context with the assembly's inject set active. */
13
+ ctx: Context;
14
+ }
15
+ /**
16
+ * Build the renderApp factory the app-shell plugin provides to AppRoot.
17
+ * @param deps - assembly inputs.
18
+ * @returns factory producing the real UI tree (called once per AppRoot render after settled).
19
+ */
20
+ export declare function buildRenderApp(deps: AssemblyDeps): () => ReactNode;
21
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Framework-free boot page and failure report. It remains available when a
3
+ * client plugin fails because React arrives only with the UI renderer.
4
+ * @module @monotykamary/dsh-client-web/src/boot-page
5
+ */
6
+ import type { LoaderEntryState } from './loader-status.ts';
7
+ /** Kernel-owned page mounted below the application's root element. */
8
+ export declare class BootPage {
9
+ private readonly root;
10
+ private readonly card;
11
+ private readonly wordmark;
12
+ private readonly spinner;
13
+ private readonly hint;
14
+ private readonly states;
15
+ private readonly active;
16
+ private total;
17
+ private failure;
18
+ /**
19
+ * Build and attach the boot page.
20
+ * @param container - Application mount point.
21
+ */
22
+ constructor(container: HTMLElement);
23
+ /**
24
+ * Set the number of loader entries represented by the progress arc.
25
+ * @param total - Complete boot roster size.
26
+ */
27
+ setTotal(total: number): void;
28
+ /**
29
+ * Project one loader entry's fiber state.
30
+ * @param id - Loader entry name.
31
+ * @param state - Projected fiber state.
32
+ */
33
+ setState(id: string, state: LoaderEntryState): void;
34
+ /**
35
+ * Display the boot failure report.
36
+ * @param message - Failure report text.
37
+ */
38
+ fail(message: string): void;
39
+ /** Detach the page before or after the UI renderer takes the mount point. */
40
+ dispose(): void;
41
+ /** Redraw the state-dependent content below the wordmark. */
42
+ private render;
43
+ /** Grow the rotating arc monotonically as loader entries activate. */
44
+ private updateProgress;
45
+ }
46
+ //# sourceMappingURL=boot-page.d.ts.map
@@ -0,0 +1,57 @@
1
+ import { type ClientModuleSystemOptions } from '@monotykamary/dsh-client-modules/client';
2
+ import './base.css';
3
+ /** Module transport hook the shell passes through (jsdom tests replace the <script> path). */
4
+ export type BootSeams = Pick<ClientModuleSystemOptions, 'loadBundle'>;
5
+ /**
6
+ * Reload a visible document whose shell-owned React mount point has become empty.
7
+ * @param element - shell mount point that must retain one AppRoot child after render.
8
+ * @param reload - document reload action, replaceable by browser tests.
9
+ * @returns disposer for the visibility listener.
10
+ */
11
+ export declare function installBlankRootRecovery(element: HTMLElement, reload?: () => void): () => void;
12
+ /**
13
+ * The web shell kernel: mounts the loading page into a DOM element and runs
14
+ * the two-stage boot over the host graph. Fields hold only what must exist
15
+ * before cordis does — the parsed manifest, the module system, and the
16
+ * loading-page UI handles; everything else lives in plugins.
17
+ */
18
+ export declare class AppWebEntry {
19
+ private readonly el;
20
+ private readonly seams;
21
+ private readonly status;
22
+ private readonly settled;
23
+ private readonly error;
24
+ private ctx;
25
+ private modules;
26
+ private manifest;
27
+ private root;
28
+ private disposeBlankRootRecovery;
29
+ /**
30
+ * Hold the mount point; all work happens in {@link run}.
31
+ * @param el - mount point (the app's #root).
32
+ * @param seams - Optional module transport overrides for test environments.
33
+ */
34
+ constructor(el: HTMLElement, seams?: BootSeams);
35
+ /**
36
+ * Run the boot chain to settlement. Boot-chain failures resolve (not
37
+ * reject): the loading page stays up and renders the failure report (the
38
+ * fail-loud surface the kernel owns). Rejects only when the boot manifest
39
+ * is missing or malformed — there is nothing to boot against.
40
+ * @returns resolves once the UI settled or the failure report rendered.
41
+ */
42
+ run(): Promise<void>;
43
+ /** Unmount the shell (loading page or settled UI). */
44
+ dispose(): void;
45
+ /** Prefetch the immediately tier (factory registration only; failures defer to the import path). */
46
+ private prefetchImmediateTier;
47
+ /** Plugin face: mount the Loader, inject the `internal` contract, adopt modules, create the graph entries, settle, sweep. */
48
+ private runPluginBoot;
49
+ /**
50
+ * Sweep every loader entry after the tree quiesced: an entry without a
51
+ * fiber failed its import; a fiber not ACTIVE is FAILED (apply threw) or
52
+ * PENDING (a required service never arrived — cordis inject waiting has no
53
+ * timeout, so this sweep is the fail-loud compensation).
54
+ */
55
+ private assertEntriesActive;
56
+ }
57
+ //# sourceMappingURL=boot.d.ts.map
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Web shell library entry. The shell's product is {@link AppWebEntry} —
3
+ * apps/web's Vite entry runs it against #root. The boot page and fiber-state
4
+ * projection remain internal; the static module table and its platform words
5
+ * form the package's build-time contract.
6
+ * @module @monotykamary/dsh-client-web
7
+ */
8
+ export { AppWebEntry, type BootSeams } from './boot.ts';
9
+ export { getStaticModules } from './seed.ts';
10
+ export { PLATFORM_MODULES, PRELOADED_CLIENT_EXTERNALS, type PlatformModule } from './platform.ts';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Package-owned invariant companion for `@monotykamary/dsh-client-web`.
3
+ * @module @monotykamary/dsh-client-web/invariant
4
+ */
5
+ import type { Context } from '@monotykamary/cordis';
6
+ /** Cordis companion plugin name. */
7
+ export declare const name = "client-web-invariant";
8
+ /** Service required before the companion can reserve package ownership. */
9
+ export declare const inject: string[];
10
+ /**
11
+ * Register this package's invariant companion.
12
+ * @param ctx - Cordis context carrying the invariant service.
13
+ * @returns the installed registration's disposer after setup succeeds.
14
+ */
15
+ export declare const apply: (ctx: Context) => Promise<() => void>;
16
+ //# sourceMappingURL=invariant.d.ts.map
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Fiber-state projection vocabulary and the kernel-owned status store for the
3
+ * boot loading page. The status AppRoot renders is a projection of the real
4
+ * cordis fiber states (display the truth, not a retelling) — the boot chain
5
+ * subscribes `internal/status` and recomputes one row per loader entry.
6
+ *
7
+ * The store is hand-rolled here because of the shell self-sufficiency rule:
8
+ * the snapshot-store machinery lives in the runtime PLUGIN
9
+ * package, and the shell kernel must not value-import any plugin package —
10
+ * the loading page has to work while (and especially when) plugins fail.
11
+ * @module @monotykamary/dsh-client-web/src/loader-status
12
+ */
13
+ import type { FiberState } from '@monotykamary/cordis';
14
+ /**
15
+ * Value mirror of cordis's `FiberState` const enum: a const enum has no
16
+ * runtime object to import (and esbuild-based pipelines cannot inline it
17
+ * across modules), so these values mirror the pinned vendored definition
18
+ * while retaining its type (same rationale as dsh-tool-cordis's mirror).
19
+ */
20
+ export declare const FIBER_STATE: {
21
+ readonly PENDING: FiberState.PENDING;
22
+ readonly LOADING: FiberState.LOADING;
23
+ readonly ACTIVE: FiberState.ACTIVE;
24
+ readonly FAILED: FiberState.FAILED;
25
+ readonly DISPOSED: FiberState.DISPOSED;
26
+ readonly UNLOADING: FiberState.UNLOADING;
27
+ };
28
+ /** One entry's projected state label (lower-case face of {@link FiberState}). */
29
+ export type LoaderEntryState = 'pending' | 'loading' | 'active' | 'failed' | 'disposed' | 'unloading';
30
+ /** Label for each fiber state, keyed by member (inlining-safe — no reverse mapping). */
31
+ export declare const STATE_LABELS: Record<FiberState, LoaderEntryState>;
32
+ /** Per-entry state projection (AppRoot's status feed), keyed by entry name. */
33
+ export type LoaderStatus = Record<string, LoaderEntryState>;
34
+ /** Minimal observable snapshot the kernel components consume (useSyncExternalStore shape). */
35
+ export interface KernelSignal<T> {
36
+ /** Current value (stable reference between changes). */
37
+ getSnapshot: () => T;
38
+ /**
39
+ * Subscribe to changes.
40
+ * @param fn - change listener.
41
+ * @returns the unsubscribe disposer.
42
+ */
43
+ subscribe: (fn: () => void) => () => void;
44
+ }
45
+ /** Writable one-value signal (settled flag, boot failure report). */
46
+ export interface KernelValueSignal<T> extends KernelSignal<T> {
47
+ /**
48
+ * Publish a new value and notify subscribers.
49
+ * @param next - the new value.
50
+ */
51
+ set: (next: T) => void;
52
+ }
53
+ /**
54
+ * Create a writable kernel signal.
55
+ * @param init - initial value.
56
+ * @returns the signal.
57
+ */
58
+ export declare function createSignal<T>(init: T): KernelValueSignal<T>;
59
+ /** The boot status store: per-entry rows over a {@link KernelSignal} face. */
60
+ export interface LoaderStatusStore extends KernelSignal<LoaderStatus> {
61
+ /**
62
+ * Project one entry's state (copy-on-write so getSnapshot references only
63
+ * change on writes — useSyncExternalStore contract).
64
+ * @param id - entry name.
65
+ * @param state - projected fiber state.
66
+ */
67
+ set: (id: string, state: LoaderEntryState) => void;
68
+ }
69
+ /**
70
+ * Create the boot status store.
71
+ * @returns the store (empty until the boot chain projects rows).
72
+ */
73
+ export declare function createLoaderStatusStore(): LoaderStatusStore;
74
+ //# sourceMappingURL=loader-status.d.ts.map
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Shared browser platform modules. Seeding, bundling externals, and Vite
3
+ * aliases consume this list so their module identities cannot drift.
4
+ * @module @monotykamary/dsh-client-web/src/platform
5
+ */
6
+ /** The module specifiers the shell shares into the frozen module table. */
7
+ export declare const PLATFORM_MODULES: readonly ["react", "react/jsx-runtime", "react-dom", "react-dom/client", "@monotykamary/cordis", "@monotykamary/dsh-client-ui-slots", "@monotykamary/dsh-client-ui-primitives"];
8
+ /** Client-bundle specifiers whose factories the parser preloads before the shell starts. */
9
+ export declare const PRELOADED_CLIENT_EXTERNALS: readonly ["@monotykamary/dsh-client-runtime/client"];
10
+ /** One platform module specifier (a seed-table key). */
11
+ export type PlatformModule = (typeof PLATFORM_MODULES)[number];
12
+ //# sourceMappingURL=platform.d.ts.map
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Build the static table handed to the module loader at boot.
3
+ * @returns module specifier → exported entity (one entry per platform word).
4
+ */
5
+ export declare function getStaticModules(): Record<string, unknown>;
6
+ //# sourceMappingURL=seed.d.ts.map
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@monotykamary/dsh-client-web",
3
+ "description": "Web shell kernel: bootWebShell (module system holding + seed table + two-stage boot + AppRoot gate + app-shell assembly entry), consumed by the apps/web vite entry",
4
+ "version": "0.1.0-rc.10",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
11
+ "directory": "packages/client/web"
12
+ },
13
+ "type": "module",
14
+ "main": "lib/index.js",
15
+ "types": "lib/types/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./lib/types/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ },
21
+ "./invariant": {
22
+ "types": "./lib/types/invariant.d.ts",
23
+ "default": "./lib/invariant.js"
24
+ },
25
+ "./src/*": "./src/*",
26
+ "./package.json": "./package.json"
27
+ },
28
+ "license": "MIT",
29
+ "devDependencies": {
30
+ "@types/react": "~18.3.1",
31
+ "@types/react-dom": "~18.3.0",
32
+ "react": "^18.2.0",
33
+ "react-dom": "^18.2.0",
34
+ "typescript": "^6.0.3",
35
+ "@monotykamary/cordis-plugin-loader": "^1.0.2",
36
+ "@monotykamary/dsh-client-ui-primitives": "^0.1.0-rc.10",
37
+ "@monotykamary/dsh-client-ui-slots": "^0.1.0-rc.10",
38
+ "@monotykamary/dsh-invariants": "^0.1.0-rc.10",
39
+ "@monotykamary/cordis": "^4.0.1",
40
+ "@monotykamary/dsh-client-test-runtime": "^0.1.0-rc.10",
41
+ "@monotykamary/dsh-client-runtime": "^0.1.0-rc.10",
42
+ "@monotykamary/dsh-client-modules": "^0.1.0-rc.10",
43
+ "@monotykamary/dsh-client-ui-renderer": "^0.1.0-rc.10"
44
+ },
45
+ "peerDependencies": {
46
+ "@monotykamary/dsh-invariants": "^0.1.0-rc.10",
47
+ "@monotykamary/cordis": "^4.0.1",
48
+ "@monotykamary/cordis-plugin-loader": "^1.0.2"
49
+ },
50
+ "files": [
51
+ "lib/index.js",
52
+ "lib/invariant.js",
53
+ "lib/**/*.css",
54
+ "lib/types/**/*.d.ts"
55
+ ],
56
+ "dependencies": {
57
+ "react": "^18.2.0",
58
+ "react-dom": "^18.2.0",
59
+ "@monotykamary/dsh-client-ui-primitives": "^0.1.0-rc.10",
60
+ "@monotykamary/dsh-client-ui-attachment": "^0.1.0-rc.10",
61
+ "@monotykamary/dsh-client-ui-slots": "^0.1.0-rc.10",
62
+ "@monotykamary/dsh-client-ui-theme": "^0.1.0-rc.10",
63
+ "@monotykamary/dsh-client-modules": "^0.1.0-rc.10",
64
+ "@monotykamary/dsh-client-schema-form": "^0.1.0-rc.10",
65
+ "@monotykamary/dsh-client-web-react": "^0.1.0-rc.10"
66
+ }
67
+ }