dsh-caduceus 0.10.5 → 0.12.1
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/dist/index.js +16 -0
- package/dist/transport/lark.js +8 -0
- package/lib/client.js +175 -0
- package/lib/client.js.map +1 -0
- package/package.json +12 -4
package/dist/index.js
CHANGED
|
@@ -141,6 +141,22 @@ export function apply(ctx, config = {}) {
|
|
|
141
141
|
cardThrottleMs: resolved.bridge.cardThrottleMs,
|
|
142
142
|
busyMode: resolved.bridge.busyMode,
|
|
143
143
|
}));
|
|
144
|
+
const clientConfig = {
|
|
145
|
+
lang: resolved.lang,
|
|
146
|
+
metrics: resolved.bridge.metrics ?? 'compact',
|
|
147
|
+
busyMode: resolved.bridge.busyMode,
|
|
148
|
+
};
|
|
149
|
+
try {
|
|
150
|
+
// dsh's web server emits this before page scripts; the client reads the
|
|
151
|
+
// global synchronously. Other surfaces simply never emit the event.
|
|
152
|
+
const events = ctx;
|
|
153
|
+
events.on('webserver/index-inject', (table) => {
|
|
154
|
+
table.push({ kind: 'global', name: '__CADUCEUS_CLIENT_CONFIG__', value: clientConfig });
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
logger.warn(`client config injection unavailable: ${errorText(error)}`);
|
|
159
|
+
}
|
|
144
160
|
logger.info(`agent preset=${resolved.agentPreset}`);
|
|
145
161
|
if (resolved.approvalPolicy !== undefined) {
|
|
146
162
|
logger.info(`approval policy override=${resolved.approvalPolicy}`);
|
package/dist/transport/lark.js
CHANGED
|
@@ -61,6 +61,14 @@ export class LarkFeishuApi {
|
|
|
61
61
|
}
|
|
62
62
|
this.handler?.(message);
|
|
63
63
|
},
|
|
64
|
+
// Feishu pushes the app's own reaction writes back as events, and this
|
|
65
|
+
// plugin has no reaction-based interaction. Without a registered handle
|
|
66
|
+
// the SDK warns "no <key> handle" on every OnIt/DONE we add ourselves,
|
|
67
|
+
// which drowned the log (59.9% of dsh journal lines on 2026-11-07).
|
|
68
|
+
// An explicit no-op keeps the drop intentional and leaves the keys in
|
|
69
|
+
// place for a future reaction-driven interaction.
|
|
70
|
+
'im.message.reaction.created_v1': () => undefined,
|
|
71
|
+
'im.message.reaction.deleted_v1': () => undefined,
|
|
64
72
|
});
|
|
65
73
|
this.ws = new WSClient({ appId: options.appId, appSecret: options.appSecret });
|
|
66
74
|
}
|
package/lib/client.js
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({
|
|
2
|
+
id: "dsh-caduceus",
|
|
3
|
+
factory: (require) => {
|
|
4
|
+
var module = { exports: {} };
|
|
5
|
+
var exports = module.exports;
|
|
6
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
+
let react = require("react");
|
|
8
|
+
//#region client/labels.ts
|
|
9
|
+
/** Client-side copy for the header button, drawer, and settings row. */
|
|
10
|
+
const NS = "caduceus";
|
|
11
|
+
const ZH = {
|
|
12
|
+
"switch.panel": "双蛇杖",
|
|
13
|
+
"panel.title": "双蛇杖工作台",
|
|
14
|
+
"panel.loaded": "面板已加载",
|
|
15
|
+
"panel.version": "版本",
|
|
16
|
+
"drawer.session": "会话",
|
|
17
|
+
"drawer.none": "无会话",
|
|
18
|
+
"drawer.close": "关闭",
|
|
19
|
+
"settings.title": "双蛇杖",
|
|
20
|
+
"settings.lang": "语言",
|
|
21
|
+
"settings.metrics": "指标",
|
|
22
|
+
"settings.busyMode": "忙碌策略",
|
|
23
|
+
"settings.unavailable": "客户端配置尚未注入"
|
|
24
|
+
};
|
|
25
|
+
const EN = {
|
|
26
|
+
"switch.panel": "Caduceus",
|
|
27
|
+
"panel.title": "Caduceus Workbench",
|
|
28
|
+
"panel.loaded": "Panel loaded",
|
|
29
|
+
"panel.version": "Version",
|
|
30
|
+
"drawer.session": "Session",
|
|
31
|
+
"drawer.none": "no session",
|
|
32
|
+
"drawer.close": "Close",
|
|
33
|
+
"settings.title": "Caduceus",
|
|
34
|
+
"settings.lang": "Language",
|
|
35
|
+
"settings.metrics": "Metrics",
|
|
36
|
+
"settings.busyMode": "Busy mode",
|
|
37
|
+
"settings.unavailable": "Client config not injected yet"
|
|
38
|
+
};
|
|
39
|
+
const FALLBACK = ZH;
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region client/index.ts
|
|
42
|
+
/**
|
|
43
|
+
* Browser half of dsh-caduceus. It contributes only to additive list slots:
|
|
44
|
+
* a Session-header action button and a General-settings row. The drawer it
|
|
45
|
+
* opens is rendered by this module (fixed-position DOM), not by a host panel.
|
|
46
|
+
*/
|
|
47
|
+
const inject = ["slots", "locale"];
|
|
48
|
+
function tr(props) {
|
|
49
|
+
return props.t ?? ((key) => FALLBACK[key]);
|
|
50
|
+
}
|
|
51
|
+
function globalConfig() {
|
|
52
|
+
return globalThis.__CADUCEUS_CLIENT_CONFIG__;
|
|
53
|
+
}
|
|
54
|
+
/** Self-rendered drawer: no main panel, no shell.overlay, no host-owned slots. */
|
|
55
|
+
function openDrawer(props) {
|
|
56
|
+
if (typeof document === "undefined") return;
|
|
57
|
+
document.getElementById("caduceus-drawer")?.remove();
|
|
58
|
+
const t = tr(props);
|
|
59
|
+
const root = document.createElement("div");
|
|
60
|
+
root.id = "caduceus-drawer";
|
|
61
|
+
Object.assign(root.style, {
|
|
62
|
+
position: "fixed",
|
|
63
|
+
inset: "0",
|
|
64
|
+
zIndex: "10000",
|
|
65
|
+
background: "rgba(0,0,0,0.45)",
|
|
66
|
+
display: "flex",
|
|
67
|
+
alignItems: "flex-end",
|
|
68
|
+
justifyContent: "center"
|
|
69
|
+
});
|
|
70
|
+
const panel = document.createElement("div");
|
|
71
|
+
Object.assign(panel.style, {
|
|
72
|
+
width: "min(560px, calc(100vw - 32px))",
|
|
73
|
+
margin: "16px",
|
|
74
|
+
padding: "20px",
|
|
75
|
+
borderRadius: "12px",
|
|
76
|
+
background: "#17171d",
|
|
77
|
+
color: "#fff",
|
|
78
|
+
boxShadow: "0 12px 40px rgba(0,0,0,0.45)",
|
|
79
|
+
font: "14px/1.6 system-ui, sans-serif"
|
|
80
|
+
});
|
|
81
|
+
const title = document.createElement("h2");
|
|
82
|
+
title.textContent = t("panel.title");
|
|
83
|
+
Object.assign(title.style, {
|
|
84
|
+
margin: "0 0 12px",
|
|
85
|
+
fontSize: "18px"
|
|
86
|
+
});
|
|
87
|
+
const version = document.createElement("p");
|
|
88
|
+
version.textContent = `${t("panel.version")} 0.12.1`;
|
|
89
|
+
const session = document.createElement("p");
|
|
90
|
+
session.textContent = `${t("drawer.session")}: ${props.sessionId ?? t("drawer.none")}`;
|
|
91
|
+
const loaded = document.createElement("p");
|
|
92
|
+
loaded.textContent = t("panel.loaded");
|
|
93
|
+
const close = document.createElement("button");
|
|
94
|
+
close.type = "button";
|
|
95
|
+
close.textContent = t("drawer.close");
|
|
96
|
+
Object.assign(close.style, {
|
|
97
|
+
marginTop: "12px",
|
|
98
|
+
padding: "4px 12px",
|
|
99
|
+
border: "1px solid rgba(255,255,255,0.25)",
|
|
100
|
+
borderRadius: "6px",
|
|
101
|
+
background: "transparent",
|
|
102
|
+
color: "#fff",
|
|
103
|
+
cursor: "pointer"
|
|
104
|
+
});
|
|
105
|
+
const dismiss = () => root.remove();
|
|
106
|
+
close.addEventListener("click", dismiss);
|
|
107
|
+
root.addEventListener("click", (event) => {
|
|
108
|
+
if (event.target === root) dismiss();
|
|
109
|
+
});
|
|
110
|
+
panel.append(title, version, session, loaded, close);
|
|
111
|
+
root.append(panel);
|
|
112
|
+
document.body.append(root);
|
|
113
|
+
}
|
|
114
|
+
function HeaderAction(props) {
|
|
115
|
+
return (0, react.createElement)("button", {
|
|
116
|
+
type: "button",
|
|
117
|
+
style: {
|
|
118
|
+
padding: "4px 10px",
|
|
119
|
+
border: "1px solid rgba(255,255,255,0.25)",
|
|
120
|
+
borderRadius: "6px",
|
|
121
|
+
background: "transparent",
|
|
122
|
+
color: "inherit",
|
|
123
|
+
font: "12px/1.4 system-ui, sans-serif",
|
|
124
|
+
cursor: "pointer"
|
|
125
|
+
},
|
|
126
|
+
onClick: () => openDrawer(props)
|
|
127
|
+
}, tr(props)("switch.panel"));
|
|
128
|
+
}
|
|
129
|
+
function SettingsItem(props) {
|
|
130
|
+
const t = tr(props);
|
|
131
|
+
const config = globalConfig();
|
|
132
|
+
const value = config === void 0 ? t("settings.unavailable") : `${t("settings.lang")}: ${config.lang ?? "-"} · ${t("settings.metrics")}: ${config.metrics ?? "-"} · ${t("settings.busyMode")}: ${config.busyMode ?? "-"}`;
|
|
133
|
+
return (0, react.createElement)("div", { style: {
|
|
134
|
+
padding: "8px 0",
|
|
135
|
+
font: "13px/1.5 system-ui, sans-serif"
|
|
136
|
+
} }, (0, react.createElement)("div", { style: { fontWeight: 600 } }, t("settings.title")), (0, react.createElement)("div", { style: { opacity: .75 } }, value));
|
|
137
|
+
}
|
|
138
|
+
function apply(ctx) {
|
|
139
|
+
ctx.effect(() => ctx.locale.register(NS, {
|
|
140
|
+
zh: ZH,
|
|
141
|
+
en: EN
|
|
142
|
+
}), "caduceus: client dictionaries");
|
|
143
|
+
try {
|
|
144
|
+
console.info("[caduceus] apply start");
|
|
145
|
+
registerWhenDeclared(ctx, "conversation.session.header.actions", HeaderAction, "headerAction");
|
|
146
|
+
registerWhenDeclared(ctx, "settings.general.item", SettingsItem, "settingsRow");
|
|
147
|
+
console.info("[caduceus] apply ok");
|
|
148
|
+
} catch (error) {
|
|
149
|
+
console.error("[caduceus] apply failed:", error?.message ?? error);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Contribute into a slot another entry declares.
|
|
154
|
+
*
|
|
155
|
+
* Boot order is not ours: the UI packages declare these slots after this entry
|
|
156
|
+
* applies, so a bare `register` throws `slot "<name>" is not declared`.
|
|
157
|
+
* `subscribeDeclaration` is the sanctioned wait-for-declaration primitive.
|
|
158
|
+
*/
|
|
159
|
+
function registerWhenDeclared(ctx, name, component, id) {
|
|
160
|
+
ctx.effect(() => ctx.slots.inject(name, () => ctx.slots.register({
|
|
161
|
+
name,
|
|
162
|
+
id: `caduceus-${id}`,
|
|
163
|
+
order: 40,
|
|
164
|
+
locale: NS
|
|
165
|
+
}, component)), `caduceus: ${id}`);
|
|
166
|
+
}
|
|
167
|
+
//#endregion
|
|
168
|
+
exports.apply = apply;
|
|
169
|
+
exports.inject = inject;
|
|
170
|
+
|
|
171
|
+
return module.exports;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","names":[],"sources":["../client/labels.ts","../client/index.ts"],"sourcesContent":["/** Client-side copy for the header button, drawer, and settings row. */\nexport const NS = 'caduceus';\n\nexport const ZH = {\n 'switch.panel': '双蛇杖',\n 'panel.title': '双蛇杖工作台',\n 'panel.loaded': '面板已加载',\n 'panel.version': '版本',\n 'drawer.session': '会话',\n 'drawer.none': '无会话',\n 'drawer.close': '关闭',\n 'settings.title': '双蛇杖',\n 'settings.lang': '语言',\n 'settings.metrics': '指标',\n 'settings.busyMode': '忙碌策略',\n 'settings.unavailable': '客户端配置尚未注入',\n} as const;\n\nexport const EN = {\n 'switch.panel': 'Caduceus',\n 'panel.title': 'Caduceus Workbench',\n 'panel.loaded': 'Panel loaded',\n 'panel.version': 'Version',\n 'drawer.session': 'Session',\n 'drawer.none': 'no session',\n 'drawer.close': 'Close',\n 'settings.title': 'Caduceus',\n 'settings.lang': 'Language',\n 'settings.metrics': 'Metrics',\n 'settings.busyMode': 'Busy mode',\n 'settings.unavailable': 'Client config not injected yet',\n} as const;\n\nexport type LabelKey = keyof typeof ZH;\nexport const FALLBACK: Record<LabelKey, string> = ZH;\n","/**\n * Browser half of dsh-caduceus. It contributes only to additive list slots:\n * a Session-header action button and a General-settings row. The drawer it\n * opens is rendered by this module (fixed-position DOM), not by a host panel.\n */\nimport { createElement } from 'react';\nimport { EN, FALLBACK, NS, ZH, type LabelKey } from './labels.ts';\n\ndeclare const __CADUCEUS_VERSION__: string;\n\nexport const inject = ['slots', 'locale'];\n\ninterface StandardProps {\n readonly t?: (key: LabelKey) => string;\n readonly sessionId?: string;\n}\n\ninterface ClientConfig {\n readonly lang?: string;\n readonly metrics?: string;\n readonly busyMode?: string;\n}\n\ntype SlotName = 'conversation.session.header.actions' | 'settings.general.item';\n\ninterface ClientCtx {\n readonly locale: {\n register(\n namespace: string,\n dictionaries: { zh: Record<string, string>; en: Record<string, string> },\n ): () => void;\n };\n readonly slots: {\n register(\n spec: {\n name: SlotName;\n id: string;\n order: number;\n locale?: string;\n },\n component: (props: StandardProps) => unknown,\n ): () => void;\n /** Wait for another entry's declaration, then contribute (facade: {inject, register}). */\n inject(name: SlotName, contribute: () => () => void): () => void;\n };\n effect(callback: () => () => void, label?: string): void;\n}\n\nfunction tr(props: StandardProps): (key: LabelKey) => string {\n return props.t ?? ((key) => FALLBACK[key]);\n}\n\nfunction globalConfig(): ClientConfig | undefined {\n return (globalThis as { __CADUCEUS_CLIENT_CONFIG__?: ClientConfig })\n .__CADUCEUS_CLIENT_CONFIG__;\n}\n\n/** Self-rendered drawer: no main panel, no shell.overlay, no host-owned slots. */\nfunction openDrawer(props: StandardProps): void {\n if (typeof document === 'undefined') return;\n document.getElementById('caduceus-drawer')?.remove();\n const t = tr(props);\n const root = document.createElement('div');\n root.id = 'caduceus-drawer';\n Object.assign(root.style, {\n position: 'fixed',\n inset: '0',\n zIndex: '10000',\n background: 'rgba(0,0,0,0.45)',\n display: 'flex',\n alignItems: 'flex-end',\n justifyContent: 'center',\n });\n const panel = document.createElement('div');\n Object.assign(panel.style, {\n width: 'min(560px, calc(100vw - 32px))',\n margin: '16px',\n padding: '20px',\n borderRadius: '12px',\n background: '#17171d',\n color: '#fff',\n boxShadow: '0 12px 40px rgba(0,0,0,0.45)',\n font: '14px/1.6 system-ui, sans-serif',\n });\n const title = document.createElement('h2');\n title.textContent = t('panel.title');\n Object.assign(title.style, { margin: '0 0 12px', fontSize: '18px' });\n const version = document.createElement('p');\n version.textContent = `${t('panel.version')} ${__CADUCEUS_VERSION__}`;\n const session = document.createElement('p');\n session.textContent = `${t('drawer.session')}: ${props.sessionId ?? t('drawer.none')}`;\n const loaded = document.createElement('p');\n loaded.textContent = t('panel.loaded');\n const close = document.createElement('button');\n close.type = 'button';\n close.textContent = t('drawer.close');\n Object.assign(close.style, {\n marginTop: '12px',\n padding: '4px 12px',\n border: '1px solid rgba(255,255,255,0.25)',\n borderRadius: '6px',\n background: 'transparent',\n color: '#fff',\n cursor: 'pointer',\n });\n const dismiss = (): void => root.remove();\n close.addEventListener('click', dismiss);\n root.addEventListener('click', (event) => {\n if (event.target === root) dismiss();\n });\n panel.append(title, version, session, loaded, close);\n root.append(panel);\n document.body.append(root);\n}\n\nfunction HeaderAction(props: StandardProps): unknown {\n const t = tr(props);\n return createElement(\n 'button',\n {\n type: 'button',\n style: {\n padding: '4px 10px',\n border: '1px solid rgba(255,255,255,0.25)',\n borderRadius: '6px',\n background: 'transparent',\n color: 'inherit',\n font: '12px/1.4 system-ui, sans-serif',\n cursor: 'pointer',\n },\n onClick: () => openDrawer(props),\n },\n t('switch.panel'),\n );\n}\n\nfunction SettingsItem(props: StandardProps): unknown {\n const t = tr(props);\n const config = globalConfig();\n const value = config === undefined\n ? t('settings.unavailable')\n : `${t('settings.lang')}: ${config.lang ?? '-'} · ` +\n `${t('settings.metrics')}: ${config.metrics ?? '-'} · ` +\n `${t('settings.busyMode')}: ${config.busyMode ?? '-'}`;\n return createElement(\n 'div',\n { style: { padding: '8px 0', font: '13px/1.5 system-ui, sans-serif' } },\n createElement('div', { style: { fontWeight: 600 } }, t('settings.title')),\n createElement('div', { style: { opacity: 0.75 } }, value),\n );\n}\n\nexport function apply(ctx: ClientCtx): void {\n ctx.effect(\n () => ctx.locale.register(NS, { zh: ZH, en: EN }),\n 'caduceus: client dictionaries',\n );\n try {\n console.info('[caduceus] apply start');\n registerWhenDeclared(ctx, 'conversation.session.header.actions', HeaderAction, 'headerAction');\n registerWhenDeclared(ctx, 'settings.general.item', SettingsItem, 'settingsRow');\n console.info('[caduceus] apply ok');\n } catch (error) {\n console.error('[caduceus] apply failed:', (error as Error)?.message ?? error);\n }\n}\n\n/**\n * Contribute into a slot another entry declares.\n *\n * Boot order is not ours: the UI packages declare these slots after this entry\n * applies, so a bare `register` throws `slot \"<name>\" is not declared`.\n * `subscribeDeclaration` is the sanctioned wait-for-declaration primitive.\n */\nfunction registerWhenDeclared(\n ctx: ClientCtx,\n name: SlotName,\n component: (props: StandardProps) => unknown,\n id: string,\n): void {\n ctx.effect(\n () =>\n ctx.slots.inject(name, () =>\n ctx.slots.register({ name, id: `caduceus-${id}`, order: 40, locale: NS }, component),\n ),\n `caduceus: ${id}`,\n );\n}\n"],"mappings":";;;;;;;;;AACA,MAAa,KAAK;AAElB,MAAa,KAAK;CAChB,gBAAgB;CAChB,eAAe;CACf,gBAAgB;CAChB,iBAAiB;CACjB,kBAAkB;CAClB,eAAe;CACf,gBAAgB;CAChB,kBAAkB;CAClB,iBAAiB;CACjB,oBAAoB;CACpB,qBAAqB;CACrB,wBAAwB;AAC1B;AAEA,MAAa,KAAK;CAChB,gBAAgB;CAChB,eAAe;CACf,gBAAgB;CAChB,iBAAiB;CACjB,kBAAkB;CAClB,eAAe;CACf,gBAAgB;CAChB,kBAAkB;CAClB,iBAAiB;CACjB,oBAAoB;CACpB,qBAAqB;CACrB,wBAAwB;AAC1B;AAGA,MAAa,WAAqC;;;;;;;;ACxBlD,MAAa,SAAS,CAAC,SAAS,QAAQ;AAsCxC,SAAS,GAAG,OAAiD;CAC3D,OAAO,MAAM,OAAO,QAAQ,SAAS;AACvC;AAEA,SAAS,eAAyC;CAChD,OAAQ,WACL;AACL;;AAGA,SAAS,WAAW,OAA4B;CAC9C,IAAI,OAAO,aAAa,aAAa;CACrC,SAAS,eAAe,iBAAiB,CAAC,EAAE,OAAO;CACnD,MAAM,IAAI,GAAG,KAAK;C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S;EAAE;EAAM,IAAI,YAAY;EAAM,OAAO;EAAI,QAAQ;CAAG,GAAG,SAAS,CACrF,GACF,aAAa,IACf;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-caduceus",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "Feishu/Lark surface plugin for DeepSeek Harness (dsh): one topic per session, SOUL persona sync, streaming process cards, /status and /doctor.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,10 +31,14 @@
|
|
|
31
31
|
"default": "./dist/render/truncate.js"
|
|
32
32
|
},
|
|
33
33
|
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
34
|
-
"./package.json": "./package.json"
|
|
34
|
+
"./package.json": "./package.json",
|
|
35
|
+
"./client": {
|
|
36
|
+
"default": "./lib/client.js"
|
|
37
|
+
}
|
|
35
38
|
},
|
|
36
39
|
"files": [
|
|
37
40
|
"dist/",
|
|
41
|
+
"lib/",
|
|
38
42
|
"cordis.patch.yml",
|
|
39
43
|
"README.md",
|
|
40
44
|
"LICENSE",
|
|
@@ -55,6 +59,9 @@
|
|
|
55
59
|
"dshReleases": {
|
|
56
60
|
"0.2.1-rc.2": "compatible"
|
|
57
61
|
}
|
|
62
|
+
},
|
|
63
|
+
"client": {
|
|
64
|
+
"platform": "web"
|
|
58
65
|
}
|
|
59
66
|
},
|
|
60
67
|
"peerDependencies": {
|
|
@@ -79,12 +86,13 @@
|
|
|
79
86
|
"typescript": "6.0.3"
|
|
80
87
|
},
|
|
81
88
|
"scripts": {
|
|
82
|
-
"build": "tsc -p tsconfig.json",
|
|
89
|
+
"build": "tsc -p tsconfig.json && node scripts/build-client.mjs",
|
|
83
90
|
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit",
|
|
84
91
|
"test": "tsc -p tsconfig.test.json && node --test .test-dist/test/*.test.js",
|
|
85
92
|
"smoke": "node scripts/smoke.mjs",
|
|
86
93
|
"clean": "rm -rf dist .test-dist",
|
|
87
|
-
"prepare": "tsc -p tsconfig.json"
|
|
94
|
+
"prepare": "tsc -p tsconfig.json",
|
|
95
|
+
"check": "node scripts/check-workbench.mjs"
|
|
88
96
|
},
|
|
89
97
|
"packageManager": "pnpm@11.7.0",
|
|
90
98
|
"license": "MIT",
|