dsh-open-artifact 0.14.2 → 0.14.3

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 (88) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/lib/client.js +1 -1
  3. package/lib/index.js +3 -3
  4. package/package.json +1 -1
  5. package/skills/open-artifact/SKILL.md +1 -1
  6. package/vendor/open-artifact.mjs +27 -16
  7. package/vendor/runtime.json +1 -1
  8. package/vendor/shell/assets/{index-BX3e8IQV.js → index-yS15KRJ8.js} +4 -4
  9. package/vendor/shell/index.html +1 -1
  10. package/vendor/type-server/cli.mjs +40 -20
  11. package/vendor/type-server/editors/data/assets/{index-Dy-b-2Fk.js → index-CelumSdk.js} +47 -47
  12. package/vendor/type-server/editors/data/index.html +1 -1
  13. package/vendor/type-server/editors/design/assets/{index-CE4i9MNf.js → index-BrdhJyzS.js} +19 -19
  14. package/vendor/type-server/editors/design/index.html +1 -1
  15. package/vendor/type-server/editors/design-system/assets/{index-CF8_SYR3.js → index-CzmxC323.js} +15 -15
  16. package/vendor/type-server/editors/design-system/index.html +1 -1
  17. package/vendor/type-server/editors/docs/assets/{abnfDiagram-WEYOIA3C-BG-j2AXL.js → abnfDiagram-WEYOIA3C-Dv154SrF.js} +1 -1
  18. package/vendor/type-server/editors/docs/assets/{architectureDiagram-ZHVYKT53-Vqu2pae_.js → architectureDiagram-ZHVYKT53-DyZHuLhJ.js} +1 -1
  19. package/vendor/type-server/editors/docs/assets/{blockDiagram-RJAE7QA3-CwGvMIxW.js → blockDiagram-RJAE7QA3-BVzElt5r.js} +1 -1
  20. package/vendor/type-server/editors/docs/assets/{c4Diagram-XDPPPE54-n0jdpDKq.js → c4Diagram-XDPPPE54-CZt_JzyM.js} +1 -1
  21. package/vendor/type-server/editors/docs/assets/channel-wcQnbnDl.js +1 -0
  22. package/vendor/type-server/editors/docs/assets/{chunk-2E7WHVMD-Bmc6NazT.js → chunk-2E7WHVMD-B9sK7gtB.js} +1 -1
  23. package/vendor/type-server/editors/docs/assets/{chunk-2Q5K7J3B-mCbtiqgW.js → chunk-2Q5K7J3B-0sEzcfME.js} +1 -1
  24. package/vendor/type-server/editors/docs/assets/{chunk-4EMNKR2T-x2QF33QY.js → chunk-4EMNKR2T-C_Z99jKO.js} +1 -1
  25. package/vendor/type-server/editors/docs/assets/{chunk-55XCU76K-DOnHp0lb.js → chunk-55XCU76K-CTJ_yvnE.js} +1 -1
  26. package/vendor/type-server/editors/docs/assets/{chunk-5VM5RSS4-3rEfMH5a.js → chunk-5VM5RSS4-BVUngG1n.js} +1 -1
  27. package/vendor/type-server/editors/docs/assets/{chunk-JWPE2WC7-VCWr0yc3.js → chunk-JWPE2WC7-BG8q643y.js} +1 -1
  28. package/vendor/type-server/editors/docs/assets/{chunk-VQ5W62QI-CYUpRyMu.js → chunk-VQ5W62QI-DM3WoZ2q.js} +1 -1
  29. package/vendor/type-server/editors/docs/assets/{chunk-XXDRQBXY-CLxbhwTC.js → chunk-XXDRQBXY-C00q7Mab.js} +1 -1
  30. package/vendor/type-server/editors/docs/assets/{chunk-ZCHMQSOR-BbW_fsc9.js → chunk-ZCHMQSOR-D4maMLQe.js} +2 -2
  31. package/vendor/type-server/editors/docs/assets/{classDiagram-v2-4MYWR3UA-8DExXnrI.js → classDiagram-v2-4MYWR3UA-Bp5cp9Vf.js} +1 -1
  32. package/vendor/type-server/editors/docs/assets/{core-IXjFYrPN.js → core-B_ycqU5t.js} +1 -1
  33. package/vendor/type-server/editors/docs/assets/{cose-bilkent-JH36ORCC-DeUP3SFO.js → cose-bilkent-JH36ORCC-DkfTi_Mh.js} +1 -1
  34. package/vendor/type-server/editors/docs/assets/{cynefin-EF2NZ3EQ-DwGvjuCu.js → cynefin-EF2NZ3EQ-BAO9xuAp.js} +1 -1
  35. package/vendor/type-server/editors/docs/assets/{cynefinDiagram-WF24UDRP-CAjvh3Rh.js → cynefinDiagram-WF24UDRP-Dg1Wkac0.js} +1 -1
  36. package/vendor/type-server/editors/docs/assets/{dagre-NK4GIZVX-DQvyrw7W.js → dagre-NK4GIZVX-CfNALyX0.js} +1 -1
  37. package/vendor/type-server/editors/docs/assets/{diagram-CBK3MWTC-BqauVVqW.js → diagram-CBK3MWTC-DgJwZ6YO.js} +1 -1
  38. package/vendor/type-server/editors/docs/assets/{diagram-I5XIIV2D-C2EbWIaZ.js → diagram-I5XIIV2D-DfXCPCo3.js} +1 -1
  39. package/vendor/type-server/editors/docs/assets/{diagram-ODIL2UCW-CI444MZH.js → diagram-ODIL2UCW-CS08zfFl.js} +1 -1
  40. package/vendor/type-server/editors/docs/assets/{diagram-PFBEJUXE-6gN57Cw1.js → diagram-PFBEJUXE-AiRj8OJ_.js} +1 -1
  41. package/vendor/type-server/editors/docs/assets/{diagram-RJA3I4VV-DquglZAe.js → diagram-RJA3I4VV-sPxKazJU.js} +1 -1
  42. package/vendor/type-server/editors/docs/assets/{diagram-TYUNFSNR-D0gMZqLC.js → diagram-TYUNFSNR-BTGn9TFm.js} +1 -1
  43. package/vendor/type-server/editors/docs/assets/{ebnfDiagram-V4P3TTPT-LdMjJc-D.js → ebnfDiagram-V4P3TTPT-BPbh_BoA.js} +1 -1
  44. package/vendor/type-server/editors/docs/assets/{elk-QONTBCTQ-Rx_sWhs5.js → elk-QONTBCTQ-D7zmcVsR.js} +1 -1
  45. package/vendor/type-server/editors/docs/assets/{erDiagram-KYQIGQAA-Dtc7WR2K.js → erDiagram-KYQIGQAA-q-bPsv5E.js} +1 -1
  46. package/vendor/type-server/editors/docs/assets/{flowDiagram-IUGLLWBU-B56V7sO7.js → flowDiagram-IUGLLWBU-C_zjPe4l.js} +1 -1
  47. package/vendor/type-server/editors/docs/assets/{ganttDiagram-R7GPNTJY-DukbWqGl.js → ganttDiagram-R7GPNTJY-DDpOC6aJ.js} +1 -1
  48. package/vendor/type-server/editors/docs/assets/{gitGraphDiagram-PDYL7XHY-CgUGMuv3.js → gitGraphDiagram-PDYL7XHY-BU1msmkW.js} +1 -1
  49. package/vendor/type-server/editors/docs/assets/{index-BvuYV_FZ.js → index-qJ3X4MC1.js} +5 -5
  50. package/vendor/type-server/editors/docs/assets/{infoDiagram-MVDRKAX5-D7OWIS2p.js → infoDiagram-MVDRKAX5-B0LtNVGB.js} +1 -1
  51. package/vendor/type-server/editors/docs/assets/{ishikawaDiagram-HPEHV2GE-9IJkT-L2.js → ishikawaDiagram-HPEHV2GE-BhviCdhI.js} +1 -1
  52. package/vendor/type-server/editors/docs/assets/{journeyDiagram-BOSHW7O7-CUXsvfta.js → journeyDiagram-BOSHW7O7-BTSz6EUz.js} +1 -1
  53. package/vendor/type-server/editors/docs/assets/{kanban-definition-FNSA4HC5-DzhZ-jCE.js → kanban-definition-FNSA4HC5-CswepIc1.js} +1 -1
  54. package/vendor/type-server/editors/docs/assets/{mermaid.core-BBRc2-gW.js → mermaid.core-CP2KJVd4.js} +4 -4
  55. package/vendor/type-server/editors/docs/assets/{mindmap-definition-6OY57UG3-HEmWWn1M.js → mindmap-definition-6OY57UG3-B8dzRim4.js} +1 -1
  56. package/vendor/type-server/editors/docs/assets/{pegDiagram-ECIUJNBX-WW65pDqs.js → pegDiagram-ECIUJNBX-B7V2uqYh.js} +1 -1
  57. package/vendor/type-server/editors/docs/assets/{pieDiagram-GNMPY74T-E8YMsPwZ.js → pieDiagram-GNMPY74T-h2YV0--u.js} +1 -1
  58. package/vendor/type-server/editors/docs/assets/{quadrantDiagram-D57K4MC3-DVhjEGHu.js → quadrantDiagram-D57K4MC3-BDrvmUiS.js} +1 -1
  59. package/vendor/type-server/editors/docs/assets/{railroadDiagram-Y72NRBL7-CjY1VtnU.js → railroadDiagram-Y72NRBL7-CBc2jbav.js} +1 -1
  60. package/vendor/type-server/editors/docs/assets/{requirementDiagram-EQYSW5RA-0dZZgDEa.js → requirementDiagram-EQYSW5RA-2vzlnjD8.js} +1 -1
  61. package/vendor/type-server/editors/docs/assets/{sankeyDiagram-SY24JHO5-DBPOsesB.js → sankeyDiagram-SY24JHO5-ChkHrWqS.js} +1 -1
  62. package/vendor/type-server/editors/docs/assets/{sequenceDiagram-BLEHNHQU-LSs7qw_D.js → sequenceDiagram-BLEHNHQU-x-fxt2Mo.js} +1 -1
  63. package/vendor/type-server/editors/docs/assets/{sizeCapture-INFHLROL-Bofo-6QF.js → sizeCapture-INFHLROL-CGjaw82k.js} +1 -1
  64. package/vendor/type-server/editors/docs/assets/{stateDiagram-v2-A6IESKWZ-DjZbSUVa.js → stateDiagram-v2-A6IESKWZ-DOK0Upui.js} +1 -1
  65. package/vendor/type-server/editors/docs/assets/{swimlanes-B3ENRKFQ-DifxCy8G.js → swimlanes-B3ENRKFQ-D5eScFWA.js} +1 -1
  66. package/vendor/type-server/editors/docs/assets/swimlanesDiagram-AYQRV4AK-C21UYBd-.js +8 -0
  67. package/vendor/type-server/editors/docs/assets/{timeline-definition-JXYKGLGB-Drw89BHm.js → timeline-definition-JXYKGLGB-W55YrrVw.js} +1 -1
  68. package/vendor/type-server/editors/docs/assets/{usecaseDiagram-WPOLBNNX-C7AKvNqa.js → usecaseDiagram-WPOLBNNX-tABT6ize.js} +1 -1
  69. package/vendor/type-server/editors/docs/assets/{vennDiagram-Q3Y3IDCW-D__xbJ1Z.js → vennDiagram-Q3Y3IDCW-BWt2GhcT.js} +1 -1
  70. package/vendor/type-server/editors/docs/assets/{wardleyDiagram-IVAIDKWA-EaWls8np.js → wardleyDiagram-IVAIDKWA-fvuZtRA5.js} +1 -1
  71. package/vendor/type-server/editors/docs/assets/{xychartDiagram-4URNHDU4-BooBX84y.js → xychartDiagram-4URNHDU4-DcwGParI.js} +1 -1
  72. package/vendor/type-server/editors/docs/index.html +1 -1
  73. package/vendor/type-server/editors/motion/assets/{gif-jobs-BzGj5rGu.js → gif-jobs-D3frbcNq.js} +1 -1
  74. package/vendor/type-server/editors/motion/assets/index-SWgAM2I3.js +213 -0
  75. package/vendor/type-server/editors/motion/assets/{src-0s-j4Jwn.js → src-D5Za67Y-.js} +1 -1
  76. package/vendor/type-server/editors/motion/index.html +1 -1
  77. package/vendor/type-server/editors/sheets/assets/{index-Dc9wNP6r.js → index-rCtPaKgo.js} +37 -37
  78. package/vendor/type-server/editors/sheets/index.html +1 -1
  79. package/vendor/type-server/editors/slides/assets/{index-Ces62f2e.js → index-DjcMrs2F.js} +9 -9
  80. package/vendor/type-server/editors/slides/assets/{src-DE4bzDk6.js → src-Bd7LdOFl.js} +1 -1
  81. package/vendor/type-server/editors/slides/index.html +1 -1
  82. package/vendor/type-server/editors/whiteboard/assets/{index-DAkcWFLi.js → index-nmJr9plT.js} +84 -84
  83. package/vendor/type-server/editors/whiteboard/index.html +1 -1
  84. package/vendor/type-server/shell/assets/{index-BX3e8IQV.js → index-yS15KRJ8.js} +4 -4
  85. package/vendor/type-server/shell/index.html +1 -1
  86. package/vendor/type-server/editors/docs/assets/channel-Da8uoER0.js +0 -1
  87. package/vendor/type-server/editors/docs/assets/swimlanesDiagram-AYQRV4AK-CPSGKqTh.js +0 -8
  88. package/vendor/type-server/editors/motion/assets/index-Bn5z9Iwg.js +0 -213
package/CHANGELOG.md CHANGED
@@ -6,6 +6,30 @@ agent plugins. Since 0.9.0 they all share one version; before that `dsh-open-art
6
6
  Each entry is written from the commits since the previous tag (`node scripts/changelog.mjs` lists them); see
7
7
  [Releasing](README.md#releasing).
8
8
 
9
+ ## [0.14.3] - 2026-11-23
10
+
11
+ A whiteboard fits and zooms out fully in a narrow pane, live boards, dashboards and films stay in step when answers and changes cross or a connection drops, the daemon says when it stops, and an Electron app is shown how to stop its daemon on quit.
12
+
13
+ ### Changed
14
+
15
+ - A whiteboard zooms from 5% to 800% in a view of any width. Views up to 900 px wide, and touch devices, had a minimum of 60%: there "Fit the board" stopped at 60% with part of the board out of view, "Zoom out" was disabled, and ctrl/⌘ + wheel did not zoom out.
16
+ - `daemon.log` gets `daemon <version> stopped (<why>)` when the daemon stops by itself: `SIGTERM` (`open-artifact daemon stop`), `SIGINT`, `SIGHUP`, `idle` (in place of `idle: exiting`), or `leaving for runtime <version>`. A log without it ends with a daemon that was killed.
17
+ - `@open-artifact/motion-export/build` exports `RASTER_FRAME_ENTRY` and `STANDALONE_AUDIO_ENTRY` without a file extension (`./raster/frame-entry`, `./standalone/audio-entry`); the helper adds its own (`.js` from npm, `.ts` in the repository). The declarations used to name `.ts` files the npm package does not ship. The builds themselves already worked from the installed package and are unchanged.
18
+
19
+ ### Fixed
20
+
21
+ - A `SIGTERM`, `SIGINT` or `SIGHUP` that reaches `open-artifact daemon run` while it starts no longer ends the process with `daemon.json` and `daemon.lock` left behind. The handlers are in place before the daemon takes its lock, and a signal that comes early is acted on once the daemon has started.
22
+ - Whiteboards, Data dashboards and Motion films no longer lose or undo changes when the answer to a page's save and someone else's change arrive out of order. A deleted element could come back, an older change could replace a newer one, and an agent's edit to a file merged into a page's save showed only after the next change. The type server now numbers its changes (`epoch` and `seq` on each `db` event, write answer and listing), and a page keeps, per document, only what is newer than what it has. (Replaces the approach of PR #15, which kept a deletion history per document; thanks to dunature for finding the races.)
23
+ - A page whose event stream dropped (sleep, a network change, a restarted type server) shows what changed while it was away, without a reload. Every stream starts with a `db` event saying where the store stands; a page that heard less reads the documents again in the background, and editing stays open.
24
+ - A whiteboard ink added on a computer whose clock is behind lands after the inks already saved, instead of sorting before them and being the first to go when the palette is full.
25
+ - The end-to-end harness no longer stops Chrome's renderer on a page that starts a module worker. It asked its questions in workers too, and Chrome 157 fails a check of its own when `location` is read in a module worker whose script has not all arrived; that was the intermittent `renderer crashed: iframe …/whiteboard/…` of the Cloudflare suites (`cloudflare-link` on a first run). Workers are now watched for errors and never asked.
26
+
27
+ ### Integrators
28
+
29
+ - An Electron app that forks the daemon in a utility process should ask it to stop before it quits: `child.kill()` (`SIGTERM` on macOS and Linux), then a bounded wait for `exit` (the daemon waits up to 6 s for its type servers; the example waits 8 s). Electron otherwise ends the process without a signal, and `daemon.json` and `daemon.lock` stay behind with the type servers cut off. `docs/integrating/runtime.md` says how, and `examples/harness-electron` does it (`stopDaemonUtilityProcess` in `src/daemon-spawn.mjs`, called from `before-quit`).
30
+ - `@open-artifact/runtime`'s `db` capability gains an optional `listing(collection)` (`{documents, epoch?, seq?}`), and `write` may resolve with a receipt (`{epoch, seq, documents}`). `DbChangeEvent` gains optional `epoch`, `seq` and `resync`; an event stream now opens with `{changes: {}, resync: true, epoch, seq}`. A host or test double that sends none of these still works: pages fall back to the previous behavior. A `listing` refused as `invalid` or `not_granted` (a Shell from 0.14.2 left open while the daemon was upgraded brokers no `listing`) is asked again as `list`, and the page keeps to `list`.
31
+ - The Harness API, the Shell and wake messages, `@open-artifact/harness-kit`, the stdio bridge and the shipped profiles are unchanged.
32
+
9
33
  ## [0.14.2] - 2026-11-23
10
34
 
11
35
  Whiteboards restore their view before appearing, keep it across hosted-page reloads, and show pending saves without false failure warnings.
@@ -495,6 +519,7 @@ One version for every package, with Docs and Sheets in every plugin.
495
519
  - Plugins for Claude Code, Codex, Cursor, Copilot, ChatGPT and DeepSeek Harness.
496
520
  - English and Chinese READMEs, under Apache-2.0.
497
521
 
522
+ [0.14.3]: https://github.com/JimLiu/open-artifact/compare/v0.14.2...v0.14.3
498
523
  [0.14.2]: https://github.com/JimLiu/open-artifact/compare/v0.14.1...v0.14.2
499
524
  [0.14.1]: https://github.com/JimLiu/open-artifact/compare/v0.14.0...v0.14.1
500
525
  [0.14.0]: https://github.com/JimLiu/open-artifact/compare/v0.13.0...v0.14.0
package/lib/client.js CHANGED
@@ -1,4 +1,4 @@
1
- // dsh-open-artifact 0.14.2: the DSH plugin (browser half). Built by scripts/build.mjs; do not edit.
1
+ // dsh-open-artifact 0.14.3: the DSH plugin (browser half). Built by scripts/build.mjs; do not edit.
2
2
  window.__ModuleLoader__.load({
3
3
  id: "dsh-open-artifact",
4
4
  factory: (require) => {
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // dsh-open-artifact 0.14.2: the DSH plugin (server half). Built by scripts/build.mjs; do not edit.
1
+ // dsh-open-artifact 0.14.3: the DSH plugin (server half). Built by scripts/build.mjs; do not edit.
2
2
 
3
3
  // packages/harness-kit/src/daemon.ts
4
4
  import { spawn } from "node:child_process";
@@ -1411,7 +1411,7 @@ import { join as join3, resolve as resolve3 } from "node:path";
1411
1411
  // packages/harness-kit/package.json
1412
1412
  var package_default = {
1413
1413
  name: "@open-artifact/harness-kit",
1414
- version: "0.14.2",
1414
+ version: "0.14.3",
1415
1415
  private: true,
1416
1416
  type: "module",
1417
1417
  description: "The SDK an agent app uses to integrate Open Artifact: find or start the local daemon, hold a Harness API connection that reconnects, register the tools, take comment wakes and page opens, and follow the artifacts its sessions make.",
@@ -1421,7 +1421,7 @@ var package_default = {
1421
1421
  "./embed": "./src/embed/index.ts"
1422
1422
  },
1423
1423
  dependencies: {
1424
- "@open-artifact/protocol": "0.14.2"
1424
+ "@open-artifact/protocol": "0.14.3"
1425
1425
  },
1426
1426
  sideEffects: false,
1427
1427
  engines: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-open-artifact",
3
- "version": "0.14.2",
3
+ "version": "0.14.3",
4
4
  "description": "Open Artifact in DeepSeek Harness: the Artifact, ArtifactData and ArtifactComments tools, comments on artifact pages waking the session that owns them, the Open Artifact page in the sidebar listing the open-artifact library, artifacts the agent opens shown in the session's Browser, and /open-artifact <type> to make a new one.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -2,7 +2,7 @@
2
2
  name: open-artifact
3
3
  description: Make an Open Artifact (a slide deck, a design canvas, a whiteboard, a data dashboard, a doc, a short animated motion piece, …) as a folder of files that opens as a live local page where the person views, edits, comments and exports, with their comments coming back to you. Use when the person types `/open-artifact <type> <what to make>`, or asks for something they will look at closely, keep, change, comment on or present - a presentation, pitch or talk deck; app screens, a mockup, a landing page, a poster, flyer or graphic, or "a few options" to look at; a brainstorm or retro board, a flowchart or an architecture sketch; a dashboard, metrics page, KPI tracker or recurring report from their data; a document, report, proposal, plan, spec, memo, notes or other writing to keep, share or comment on; a short animated video, an explainer, a promo, motion graphics or a GIF - or asks to keep or share a diagram you drew. Not for answers read once, code, or a file in a format they named.
4
4
  argument-hint: <type> <what to make>
5
- generated-by: open-artifact 0.14.2
5
+ generated-by: open-artifact 0.14.3
6
6
  etag: 04b07477a4f91b38
7
7
  ---
8
8
 
@@ -2118,7 +2118,7 @@ var init_package = __esm({
2118
2118
  "packages/daemon/package.json"() {
2119
2119
  package_default = {
2120
2120
  name: "@open-artifact/daemon",
2121
- version: "0.14.2",
2121
+ version: "0.14.3",
2122
2122
  private: true,
2123
2123
  type: "module",
2124
2124
  description: "The Open Artifact daemon (`open-artifact`): type registry, artifact library, type servers, agent tools, wake routing, the Harness API, MCP and the Shell.",
@@ -2130,8 +2130,8 @@ var init_package = __esm({
2130
2130
  "./client": "./src/client.ts"
2131
2131
  },
2132
2132
  dependencies: {
2133
- "@open-artifact/harness-kit": "0.14.2",
2134
- "@open-artifact/protocol": "0.14.2"
2133
+ "@open-artifact/harness-kit": "0.14.3",
2134
+ "@open-artifact/protocol": "0.14.3"
2135
2135
  },
2136
2136
  license: "Apache-2.0"
2137
2137
  };
@@ -10244,7 +10244,7 @@ var init_daemon2 = __esm({
10244
10244
  idle: () => this.idleForSwitch(),
10245
10245
  connected: () => [...new Set([...this.harnesses.connections].filter((c) => c.authed && c.harness).map((c) => c.harness))],
10246
10246
  switchTo: (candidate, env) => {
10247
- this.close();
10247
+ this.close(`leaving for runtime ${candidate.version}`);
10248
10248
  const choice = nodeChildren();
10249
10249
  if (choice.mode === "threads" && process.versions.electron) this.log(`runtime: leaving for ${candidate.version}; the app that started this daemon starts it (${choice.detail})`);
10250
10250
  else startDaemonProcess(candidate.bin, { env });
@@ -10589,8 +10589,7 @@ data: ${JSON.stringify({ view, key: claimed.key, session: claimed.session })}
10589
10589
  const busy = this.harnesses.connections.size > 0 || this.pages.size > 0 || this.eventClients.size > 0 || this.typeEventClients.size > 0 || this.link.busy();
10590
10590
  if (busy) this.lastActivity = Date.now();
10591
10591
  else if (Date.now() - this.lastActivity > this.idleMs) {
10592
- this.log("idle: exiting");
10593
- this.close();
10592
+ this.close("idle");
10594
10593
  this.emit("exit");
10595
10594
  }
10596
10595
  }
@@ -10601,8 +10600,11 @@ data: ${JSON.stringify({ view, key: claimed.key, session: claimed.session })}
10601
10600
  drained() {
10602
10601
  return this.servers.drained();
10603
10602
  }
10604
- /** Stops everything and removes `daemon.json` and the lock. */
10605
- close() {
10603
+ /**
10604
+ * Stops everything, removes `daemon.json` and the lock, and says so in the log with `reason` (a signal's name,
10605
+ * `idle`, …): the log's last word of this daemon, but for the lines of type servers still ending.
10606
+ */
10607
+ close(reason = "closed") {
10606
10608
  if (this.closed) return;
10607
10609
  this.closed = true;
10608
10610
  clearInterval(this.timer);
@@ -10624,6 +10626,7 @@ data: ${JSON.stringify({ view, key: claimed.key, session: claimed.session })}
10624
10626
  if (Number(readFileSync15(files.lock(), "utf8")) === process.pid) rmSync7(files.lock(), { force: true });
10625
10627
  } catch {
10626
10628
  }
10629
+ this.log(`daemon ${VERSION3} stopped (${reason})`);
10627
10630
  }
10628
10631
  /** Sends an event to the Library event streams, subscribed adapters and type servers. */
10629
10632
  broadcast(event) {
@@ -13360,17 +13363,25 @@ async function daemon2(sub) {
13360
13363
  case "run": {
13361
13364
  const { startDaemon: startDaemon2 } = await Promise.resolve().then(() => (init_daemon2(), daemon_exports));
13362
13365
  const port = flag("port");
13363
- const running = await startDaemon2(port !== void 0 ? { port: Number(port) } : {});
13364
- const exit = () => void running.drained().finally(() => process.exit(0));
13365
- running.on("exit", exit);
13366
- const stop = () => {
13367
- running.close();
13366
+ let running;
13367
+ let asked;
13368
+ const exit = () => void running?.drained().finally(() => process.exit(0));
13369
+ const stop = (signal) => {
13370
+ if (!running) {
13371
+ asked ??= signal;
13372
+ return;
13373
+ }
13374
+ running.close(signal);
13368
13375
  exit();
13369
13376
  };
13370
13377
  for (const signal of ["SIGINT", "SIGTERM", "SIGHUP"]) process.on(signal, stop);
13371
- process.on("uncaughtException", (error) => running.log(`uncaught: ${error?.stack ?? error}`));
13372
- process.on("unhandledRejection", (error) => running.log(`unhandled: ${error?.stack ?? error}`));
13373
- process.stderr.write(`open-artifact daemon at ${running.origin}
13378
+ const started = await startDaemon2(port !== void 0 ? { port: Number(port) } : {});
13379
+ running = started;
13380
+ started.on("exit", exit);
13381
+ if (asked) return stop(asked);
13382
+ process.on("uncaughtException", (error) => started.log(`uncaught: ${error?.stack ?? error}`));
13383
+ process.on("unhandledRejection", (error) => started.log(`unhandled: ${error?.stack ?? error}`));
13384
+ process.stderr.write(`open-artifact daemon at ${started.origin}
13374
13385
  `);
13375
13386
  return;
13376
13387
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.14.2",
2
+ "version": "0.14.3",
3
3
  "protocols": {
4
4
  "min": 1,
5
5
  "max": 1