dsh-working-activity 0.2.5 → 0.2.6

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/lib/client.js CHANGED
@@ -5,7 +5,7 @@ window.__ModuleLoader__.load({
5
5
  var exports = module.exports;
6
6
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
7
7
  let react_jsx_runtime = require("react/jsx-runtime");
8
- //#region \0dsh-css:/home/sisct/Code/projects/working-activity/packages/activity/working-activity/src/client/WorkingLine.module.css.mjs
8
+ //#region \0dsh-css:src/client/WorkingLine.module.css.mjs
9
9
  const css = ".KySvIG_line{box-sizing:border-box;width:100%;max-width:var(--dsh-composer-card-max-width);font-family:var(--dsw-font-family);color:var(--dsw-alias-label-secondary);align-items:center;gap:8px;margin:0 auto;padding:4px 16px 0;font-size:13px;line-height:18px;display:flex}.KySvIG_marker{background:var(--dsw-alias-label-tertiary);border-radius:50%;flex:none;width:7px;height:7px;animation:1.6s ease-in-out infinite KySvIG_working-pulse}.KySvIG_line[data-activity-phase=done] .KySvIG_marker{background:var(--dsw-alias-state-business-primary);animation:none}.KySvIG_line[data-activity-phase=tool] .KySvIG_marker{background:var(--dsw-alias-state-business-primary)}.KySvIG_line[data-activity-phase=waiting] .KySvIG_marker{background:var(--dsw-alias-label-tertiary);opacity:.6}.KySvIG_text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.KySvIG_tools{background:var(--dsw-alias-surface-tertiary);min-width:18px;color:var(--dsw-alias-label-secondary);text-align:center;border-radius:9px;flex:none;padding:0 5px;font-size:11px;line-height:18px}@keyframes KySvIG_working-pulse{0%,to{opacity:1}50%{opacity:.35}}";
10
10
  const tagId = "dsh-working-activity/WorkingLine.module.css";
11
11
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
@@ -16,10 +16,10 @@ window.__ModuleLoader__.load({
16
16
  document.head.appendChild(tag);
17
17
  }
18
18
  var WorkingLine_module_css_default = {
19
+ "working-pulse": "KySvIG_working-pulse",
20
+ "text": "KySvIG_text",
19
21
  "marker": "KySvIG_marker",
20
22
  "tools": "KySvIG_tools",
21
- "text": "KySvIG_text",
22
- "working-pulse": "KySvIG_working-pulse",
23
23
  "line": "KySvIG_line"
24
24
  };
25
25
  //#endregion
@@ -31,7 +31,7 @@ window.__ModuleLoader__.load({
31
31
  * conversation snapshot and renders the row, or nothing when idle/absent.
32
32
  */
33
33
  function WorkingLine({ useSession }) {
34
- const activity = useSession((s) => s.activity);
34
+ const activity = useSession((s) => s.activity ?? null);
35
35
  if (activity === null || activity.phase === "idle" || activity.line === "") return null;
36
36
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
37
37
  className: WorkingLine_module_css_default.line,
package/lib/client.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","names":["css"],"sources":["../src/client/WorkingLine.tsx","../src/client/index.ts"],"sourcesContent":["// Working-line dock entry: one dim full-width row above the composer card\n// showing the live working-activity snapshot — phase-colored breathing\n// marker, the host-composed status line, and the turn's tool count badge.\n// Renders for every live phase (waiting/thinking/tool) and the done summary;\n// hides while idle or before the first publish.\n//\n// The 'conversation.input.dock' SlotMap declaration lives in\n// @deepseek-ai/dsh-client-ui-conversation/client (contract/slots.ts); this\n// entry contributes into it without owning it.\nimport type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\nimport css from './WorkingLine.module.css'\n\n/** Full props of the dock entry: the input-zone runtime share (session standard kit). */\nexport type WorkingLineProps = PropsRuntime<'conversation.input.dock'>\n\n/** Tool-count badge copy (no locale seat: the line text itself is host-composed). */\nconst TOOLS_LABEL = 'tools this turn'\n\n/**\n * Working-line dock entry: reads the latest activity snapshot off the\n * conversation snapshot and renders the row, or nothing when idle/absent.\n */\nexport function WorkingLine({ useSession }: WorkingLineProps) {\n const activity = useSession(s => s.activity)\n if (activity === null || activity.phase === 'idle' || activity.line === '') return null\n return (\n <div className={css.line} data-activity-phase={activity.phase}>\n <span className={css.marker} aria-hidden=\"true\" />\n <span className={css.text}>{activity.line}</span>\n {activity.toolCount > 0 && (\n <span className={css.tools} title={`${activity.toolCount} ${TOOLS_LABEL}`}>\n {activity.toolCount}\n </span>\n )}\n </div>\n )\n}\n","/**\n * Working-activity surface plugin, browser half: the working-line entry in\n * the conversation.input.dock strip. This package's node half emits\n * `activity/status` session events; the web runtime patch narrows them into\n * the conversation snapshot's `activity` member, so this dock entry reads\n * the live frame through the standard session kit and owns no store, no\n * refresh chain, and no event listener.\n *\n * Mount contract (see the root README's \"Web UI 集成\" section): the web\n * client's client-modules host scans loader entries for `dsh.client`\n * declarations and serves this package's `./client` bundle at\n * /plugins/dsh-working-activity/client.js. The entry contributes into the\n * input dock — no official-source patch is involved.\n */\nimport type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client'\n// Type-only: pulls the ui-conversation SlotMap merge (the input.dock entry)\n// through the Client assembly boundary.\nimport type {} from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport { WorkingLine } from './WorkingLine.tsx'\nimport type { ActivityPhase, ActivitySnapshot } from './activity.ts'\n\nexport { WorkingLine, type WorkingLineProps } from './WorkingLine.tsx'\nexport type { ActivityPhase, ActivitySnapshot } from './activity.ts'\n\n/** Required services for the dock registration. */\nexport const inject = ['slots']\n\n/**\n * Client plugin body: the working-line dock entry.\n * @param ctx - client root context.\n */\nexport function apply(ctx: ClientContext): void {\n ctx.slots.inject('conversation.input.dock', () => ctx.slots.register({\n name: 'conversation.input.dock',\n // The pre-slots patch used the same id in ui-conversation; entries with\n // equal order render in registration order, and goal (10) / queue (20)\n // keep their seats — this row sits between them.\n id: 'activity',\n order: 15,\n registrant: 'dsh-working-activity',\n }, WorkingLine))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,cAAc;;;;;EAMpB,SAAgB,YAAY,EAAE,cAAgC;GAC5D,MAAM,WAAW,YAAW,MAAK,EAAE,QAAQ;GAC3C,IAAI,aAAa,QAAQ,SAAS,UAAU,UAAU,SAAS,SAAS,IAAI,OAAO;GACnF,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;IAAK,WAAWA,+BAAI;IAAM,uBAAqB,SAAS;IAAxD,UAAA;KACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;MAAM,WAAWA,+BAAI;MAAQ,eAAY;KAAQ,CAAA;KACjD,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;MAAM,WAAWA,+BAAI;MAAO,UAAA,SAAS;KAAW,CAAA;KAC/C,SAAS,YAAY,KACpB,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;MAAM,WAAWA,+BAAI;MAAO,OAAO,GAAG,SAAS,UAAU,GAAG;MACzD,UAAA,SAAS;KACN,CAAA;IAEL;;EAET;;;;ECXA,MAAa,SAAS,CAAC,OAAO;;;;;EAM9B,SAAgB,MAAM,KAA0B;GAC9C,IAAI,MAAM,OAAO,iCAAiC,IAAI,MAAM,SAAS;IACnE,MAAM;IAIN,IAAI;IACJ,OAAO;IACP,YAAY;GACd,GAAG,WAAW,CAAC;EACjB"}
1
+ {"version":3,"file":"client.js","names":["css"],"sources":["../src/client/WorkingLine.tsx","../src/client/index.ts"],"sourcesContent":["// Working-line dock entry: one dim full-width row above the composer card\n// showing the live working-activity snapshot — phase-colored breathing\n// marker, the host-composed status line, and the turn's tool count badge.\n// Renders for every live phase (waiting/thinking/tool) and the done summary;\n// hides while idle or before the first publish.\n//\n// The 'conversation.input.dock' SlotMap declaration lives in\n// @deepseek-ai/dsh-client-ui-conversation/client (contract/slots.ts); this\n// entry contributes into it without owning it.\nimport type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\nimport css from './WorkingLine.module.css'\n\n/** Full props of the dock entry: the input-zone runtime share (session standard kit). */\nexport type WorkingLineProps = PropsRuntime<'conversation.input.dock'>\n\n/** Tool-count badge copy (no locale seat: the line text itself is host-composed). */\nconst TOOLS_LABEL = 'tools this turn'\n\n/**\n * Working-line dock entry: reads the latest activity snapshot off the\n * conversation snapshot and renders the row, or nothing when idle/absent.\n */\nexport function WorkingLine({ useSession }: WorkingLineProps) {\n // Defensive read: the runtime patch that puts `activity` onto the\n // conversation snapshot ships separately — on an unpatched host the field\n // is absent (undefined), not null, and this component must render nothing\n // instead of crashing into the slot error boundary. Same never-throw\n // discipline as the node side's registration.js.\n const activity = useSession(s => s.activity ?? null)\n if (activity === null || activity.phase === 'idle' || activity.line === '') return null\n return (\n <div className={css.line} data-activity-phase={activity.phase}>\n <span className={css.marker} aria-hidden=\"true\" />\n <span className={css.text}>{activity.line}</span>\n {activity.toolCount > 0 && (\n <span className={css.tools} title={`${activity.toolCount} ${TOOLS_LABEL}`}>\n {activity.toolCount}\n </span>\n )}\n </div>\n )\n}\n","/**\n * Working-activity surface plugin, browser half: the working-line entry in\n * the conversation.input.dock strip. This package's node half emits\n * `activity/status` session events; the web runtime patch narrows them into\n * the conversation snapshot's `activity` member, so this dock entry reads\n * the live frame through the standard session kit and owns no store, no\n * refresh chain, and no event listener.\n *\n * Mount contract (see the root README's \"Web UI 集成\" section): the web\n * client's client-modules host scans loader entries for `dsh.client`\n * declarations and serves this package's `./client` bundle at\n * /plugins/dsh-working-activity/client.js. The entry contributes into the\n * input dock — no official-source patch is involved.\n */\nimport type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client'\n// Type-only: pulls the ui-conversation SlotMap merge (the input.dock entry)\n// through the Client assembly boundary.\nimport type {} from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport { WorkingLine } from './WorkingLine.tsx'\nimport type { ActivityPhase, ActivitySnapshot } from './activity.ts'\n\nexport { WorkingLine, type WorkingLineProps } from './WorkingLine.tsx'\nexport type { ActivityPhase, ActivitySnapshot } from './activity.ts'\n\n/** Required services for the dock registration. */\nexport const inject = ['slots']\n\n/**\n * Client plugin body: the working-line dock entry.\n * @param ctx - client root context.\n */\nexport function apply(ctx: ClientContext): void {\n ctx.slots.inject('conversation.input.dock', () => ctx.slots.register({\n name: 'conversation.input.dock',\n // The pre-slots patch used the same id in ui-conversation; entries with\n // equal order render in registration order, and goal (10) / queue (20)\n // keep their seats — this row sits between them.\n id: 'activity',\n order: 15,\n registrant: 'dsh-working-activity',\n }, WorkingLine))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,cAAc;;;;;EAMpB,SAAgB,YAAY,EAAE,cAAgC;GAM5D,MAAM,WAAW,YAAW,MAAK,EAAE,YAAY,IAAI;GACnD,IAAI,aAAa,QAAQ,SAAS,UAAU,UAAU,SAAS,SAAS,IAAI,OAAO;GACnF,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;IAAK,WAAWA,+BAAI;IAAM,uBAAqB,SAAS;IAAxD,UAAA;KACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;MAAM,WAAWA,+BAAI;MAAQ,eAAY;KAAQ,CAAA;KACjD,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;MAAM,WAAWA,+BAAI;MAAO,UAAA,SAAS;KAAW,CAAA;KAC/C,SAAS,YAAY,KACpB,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;MAAM,WAAWA,+BAAI;MAAO,OAAO,GAAG,SAAS,UAAU,GAAG;MACzD,UAAA,SAAS;KACN,CAAA;IAEL;;EAET;;;;EChBA,MAAa,SAAS,CAAC,OAAO;;;;;EAM9B,SAAgB,MAAM,KAA0B;GAC9C,IAAI,MAAM,OAAO,iCAAiC,IAAI,MAAM,SAAS;IACnE,MAAM;IAIN,IAAI;IACJ,OAAO;IACP,YAAY;GACd,GAAG,WAAW,CAAC;EACjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"WorkingLine.d.ts","sourceRoot":"","sources":["../../../src/client/WorkingLine.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAGpE,yFAAyF;AACzF,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,yBAAyB,CAAC,CAAA;AAKtE;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,UAAU,EAAE,EAAE,gBAAgB,sCAc3D"}
1
+ {"version":3,"file":"WorkingLine.d.ts","sourceRoot":"","sources":["../../../src/client/WorkingLine.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAGpE,yFAAyF;AACzF,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,yBAAyB,CAAC,CAAA;AAKtE;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,UAAU,EAAE,EAAE,gBAAgB,sCAmB3D"}
@@ -7,7 +7,12 @@ const TOOLS_LABEL = 'tools this turn';
7
7
  * conversation snapshot and renders the row, or nothing when idle/absent.
8
8
  */
9
9
  export function WorkingLine({ useSession }) {
10
- const activity = useSession(s => s.activity);
10
+ // Defensive read: the runtime patch that puts `activity` onto the
11
+ // conversation snapshot ships separately — on an unpatched host the field
12
+ // is absent (undefined), not null, and this component must render nothing
13
+ // instead of crashing into the slot error boundary. Same never-throw
14
+ // discipline as the node side's registration.js.
15
+ const activity = useSession(s => s.activity ?? null);
11
16
  if (activity === null || activity.phase === 'idle' || activity.line === '')
12
17
  return null;
13
18
  return (_jsxs("div", { className: css.line, "data-activity-phase": activity.phase, children: [_jsx("span", { className: css.marker, "aria-hidden": "true" }), _jsx("span", { className: css.text, children: activity.line }), activity.toolCount > 0 && (_jsx("span", { className: css.tools, title: `${activity.toolCount} ${TOOLS_LABEL}`, children: activity.toolCount }))] }));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-working-activity",
3
3
  "description": "Live model working-status line: playful copy, running tool, turn elapsed — for TUI prompt and Web UI",
4
- "version": "0.2.5",
4
+ "version": "0.2.6",
5
5
  "type": "module",
6
6
  "main": "lib/types/index.js",
7
7
  "types": "lib/types/index.d.ts",
@@ -42,7 +42,8 @@
42
42
  "build": "tsc -p tsconfig.json && tsc -p tsconfig.client.json",
43
43
  "build:client": "tsdown -c tsdown.config.ts",
44
44
  "verify:deps": "node scripts/verify-manifest-deps.mjs",
45
- "prepublishOnly": "npm run verify:deps && npm run build && npm run build:client"
45
+ "verify:lockfiles": "node scripts/verify-lockfiles.mjs",
46
+ "prepublishOnly": "npm run verify:deps && npm run verify:lockfiles && npm run build && npm run build:client"
46
47
  },
47
48
  "license": "BSD-3-Clause",
48
49
  "repository": {
@@ -21,7 +21,12 @@ const TOOLS_LABEL = 'tools this turn'
21
21
  * conversation snapshot and renders the row, or nothing when idle/absent.
22
22
  */
23
23
  export function WorkingLine({ useSession }: WorkingLineProps) {
24
- const activity = useSession(s => s.activity)
24
+ // Defensive read: the runtime patch that puts `activity` onto the
25
+ // conversation snapshot ships separately — on an unpatched host the field
26
+ // is absent (undefined), not null, and this component must render nothing
27
+ // instead of crashing into the slot error boundary. Same never-throw
28
+ // discipline as the node side's registration.js.
29
+ const activity = useSession(s => s.activity ?? null)
25
30
  if (activity === null || activity.phase === 'idle' || activity.line === '') return null
26
31
  return (
27
32
  <div className={css.line} data-activity-phase={activity.phase}>