dsh-open-artifact 0.16.0 → 0.16.2

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/CHANGELOG.md CHANGED
@@ -6,6 +6,44 @@ Every release of Open Artifact: the `@open-artifact/*` libraries, `@open-artifac
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.16.2] - 2026-11-25
10
+
11
+ Update signed Open Artifact Desktop releases from GitHub, and keep undelivered messages when agents reconnect.
12
+
13
+ ### Added
14
+
15
+ - macOS Apple Silicon desktop releases check stable desktop versions on GitHub after launch and every six hours. A button beside Settings in the sidebar appears only when an update is available; clicking it opens the update window and starts a download with actual byte progress, cancellation and retry. Automatic downloads are optional and separate from runtime update policy.
16
+ - Desktop downloads verify ZIP size and SHA-256, then pass the verified archive to the native macOS updater for code-signature verification and installation. Restart and Update waits for pending saves and asks about unsaved work; a staged update also installs on normal quit.
17
+ - Desktop releases include a static update feed generated from the final signed and notarized ZIP. Publication validates its version, download URL, byte count and digest, preserves immutable assets and verifies public downloads.
18
+
19
+ ### Fixed
20
+
21
+ - Comments, requests and notes that an agent could not take after reconnecting, a daemon restart, or the first DSH/Pi attach wait in its inbox again, so a later tool call, wait or attach can receive them instead of losing them with the host process.
22
+
23
+ ### Integrators
24
+
25
+ - The optional `inbox.return` feature and method put undelivered messages back in the adapter's own session inbox, ahead of newer messages; an open wait receives them immediately. Each call accepts up to 500 messages, each up to 256 KB. The kit returns declined messages after automatic re-attachment; with an older daemon it adds retained messages to the next `call()` or wait. DSH and Pi also return messages their first attach could not hand on. The Harness protocol version remains 1.
26
+
27
+ ## [0.16.1] - 2026-11-25
28
+
29
+ Keep an agent that runs in a sandbox to its session's workspace, even though the daemon runs with your full rights.
30
+
31
+ The first signed macOS desktop release uses the separate `desktop-v0.16.1` tag.
32
+
33
+ ### Added
34
+
35
+ - A daemon started with `OPEN_ARTIFACT_WORKSPACE_FOLDERS_ONLY=1` works only inside the calling session's workspace: making, reading and listing artifacts, ArtifactData's `file_path` and `out_file`, file paths in type actions (an upload's `file`, docs import and export), and artifact pages and archives. Anything outside answers `not_granted`. A symbolic link out of the workspace, or a workspace folder replaced by another, is refused too. Without the variable nothing changes.
36
+ - A write refused because `if_match` no longer matches says `executionStatus: "not_executed"`, so an agent knows nothing was written.
37
+ - macOS Apple Silicon desktop releases ship as Developer ID signed, hardened, Apple notarized and stapled ZIP and DMG downloads, with SHA-256 checksums. GitHub Actions validates signing credentials, tests the signed app and publishes immutable assets from `desktop-v<version>` tags. Local ad hoc packaging remains available.
38
+
39
+ ### Fixed
40
+
41
+ - On macOS, a workspace under `/var` or `/tmp` is recognised when its path is spelled through the system's link to `/private`.
42
+
43
+ ### Integrators
44
+
45
+ - `startDaemon({ workspaceFoldersOnly: true })` turns on the same confinement as the environment variable, for apps that run their agents in a sandbox. Each call is checked against the workspace the session gave (`caller.workspace`); a session without one cannot make or open artifacts there. A listing shows only artifacts inside that workspace, `scope: "all"` included. See "A sandboxed agent: workspace folders only" in the integrator guide's security page. Nothing in the Harness API messages, `harness-kit` or the Shell changed.
46
+
9
47
  ## [0.16.0] - 2026-11-25
10
48
 
11
49
  Make artifacts from Pi, and install an artifact as an app of its own from Open Artifact Desktop.
@@ -642,6 +680,8 @@ One version for every package, with Docs and Sheets in every plugin.
642
680
  - Plugins for Claude Code, Codex, Cursor, Copilot, ChatGPT and DeepSeek Harness.
643
681
  - English and Chinese READMEs, under Apache-2.0.
644
682
 
683
+ [0.16.2]: https://github.com/JimLiu/open-artifact/compare/v0.16.1...v0.16.2
684
+ [0.16.1]: https://github.com/JimLiu/open-artifact/compare/v0.16.0...v0.16.1
645
685
  [0.16.0]: https://github.com/JimLiu/open-artifact/compare/v0.15.0...v0.16.0
646
686
  [0.15.0]: https://github.com/JimLiu/open-artifact/compare/v0.14.7...v0.15.0
647
687
  [0.14.7]: https://github.com/JimLiu/open-artifact/compare/v0.14.6...v0.14.7
package/lib/client.js CHANGED
@@ -1,4 +1,4 @@
1
- // dsh-open-artifact 0.16.0: the DSH plugin (browser half). Built by scripts/build.mjs; do not edit.
1
+ // dsh-open-artifact 0.16.2: 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) => {
@@ -2199,7 +2199,7 @@ window.__ModuleLoader__.load({
2199
2199
  var SITE_TYPE_STANDINGS = Object.freeze(["new", "installed", "update", "published-here", "clash"]);
2200
2200
 
2201
2201
  // packages/protocol/src/harness.ts
2202
- var HARNESS_FEATURES = Object.freeze(["hello.profile", "embed.origins", "shell.command", "shell.event", "view.context", "wake.from", "wake.drafted", "wake.session", "skill.get", "commands.list", "session.may", "tools.actions", "quickstart.steps", "types.remote", "hello.runtime", "runtime.update", "types.source", "view.open"]);
2202
+ var HARNESS_FEATURES = Object.freeze(["hello.profile", "embed.origins", "shell.command", "shell.event", "view.context", "wake.from", "wake.drafted", "wake.session", "skill.get", "commands.list", "session.may", "tools.actions", "quickstart.steps", "types.remote", "hello.runtime", "runtime.update", "types.source", "view.open", "inbox.return"]);
2203
2203
 
2204
2204
  // packages/protocol/src/wake.ts
2205
2205
  var COMMENT_HEADER = "[Artifact comment sent to agent]";
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // dsh-open-artifact 0.16.0: the DSH plugin (server half). Built by scripts/build.mjs; do not edit.
1
+ // dsh-open-artifact 0.16.2: 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";
@@ -152,7 +152,7 @@ var HARNESS_PATH = "/__harness";
152
152
  var HARNESS_SUBPROTOCOL = "open-artifact-harness";
153
153
  var PROTOCOL_MIN = 1;
154
154
  var PROTOCOL_MAX = 1;
155
- var HARNESS_FEATURES = Object.freeze(["hello.profile", "embed.origins", "shell.command", "shell.event", "view.context", "wake.from", "wake.drafted", "wake.session", "skill.get", "commands.list", "session.may", "tools.actions", "quickstart.steps", "types.remote", "hello.runtime", "runtime.update", "types.source", "view.open"]);
155
+ var HARNESS_FEATURES = Object.freeze(["hello.profile", "embed.origins", "shell.command", "shell.event", "view.context", "wake.from", "wake.drafted", "wake.session", "skill.get", "commands.list", "session.may", "tools.actions", "quickstart.steps", "types.remote", "hello.runtime", "runtime.update", "types.source", "view.open", "inbox.return"]);
156
156
  var RPC_ERRORS = {
157
157
  parse: -32700,
158
158
  methodNotFound: -32601,
@@ -723,7 +723,10 @@ var LATER_ITEMS = [
723
723
  \`changed\`, \`read\` lists the files they touched in \`changed_files\`, and \`notes\` say so: read those files again
724
724
  before writing. When you write through the tools, pass the \`sha256\` you read as \`if_match\`
725
725
  (\`Artifact {action: "publish", url, files, if_match}\`; \`ArtifactData\` \`set\` and \`delete\` of an existing document
726
- need it). On a \`conflict\`, merge your change into \`current\` and write again.`,
726
+ need it). On a \`conflict\`, merge your change into \`current\` and write again; \`executionStatus: "not_executed"\` on
727
+ it means nothing was written.`,
728
+ `Some apps keep you to your workspace: there a folder or a file path outside it (an action's \`file\` or \`out\`,
729
+ ArtifactData's \`file_path\` or \`out_file\`) answers \`not_granted\`. Use a path inside the workspace instead.`,
727
730
  `To share it, \`Artifact {action: "open", url, panel: "share"}\` opens its Share panel for the person; to export
728
731
  (PDF, PPTX, PNG, …), \`panel: "export"\`. Only the person changes how an artifact is shared; never make share links
729
732
  yourself.`,
@@ -1663,7 +1666,7 @@ import { join as join3, resolve as resolve3 } from "node:path";
1663
1666
  // packages/harness-kit/package.json
1664
1667
  var package_default = {
1665
1668
  name: "@open-artifact/harness-kit",
1666
- version: "0.16.0",
1669
+ version: "0.16.2",
1667
1670
  private: true,
1668
1671
  type: "module",
1669
1672
  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.",
@@ -1673,7 +1676,7 @@ var package_default = {
1673
1676
  "./embed": "./src/embed/index.ts"
1674
1677
  },
1675
1678
  dependencies: {
1676
- "@open-artifact/protocol": "0.16.0"
1679
+ "@open-artifact/protocol": "0.16.2"
1677
1680
  },
1678
1681
  sideEffects: false,
1679
1682
  engines: {
@@ -2009,11 +2012,20 @@ async function createHarness(options) {
2009
2012
  onState: (state) => emit("state", state),
2010
2013
  onReattach: async (params, result) => {
2011
2014
  const left = await handOver(params, result.inbox);
2012
- if (left.length) {
2013
- const key = sessionKey(params);
2014
- leftovers.set(key, [...leftovers.get(key) ?? [], ...left]);
2015
- log(`open-artifact: ${left.length} message(s) for ${params.session ?? params.workspace} were not taken; the next attach returns them`);
2015
+ if (!left.length) return;
2016
+ const who = params.session ?? params.workspace;
2017
+ if (client.features.includes("inbox.return")) {
2018
+ try {
2019
+ await client.request("inbox.return", { session: params.session ?? null, workspace: params.workspace ?? null, messages: left });
2020
+ log(`open-artifact: ${left.length} message(s) for ${who} were not taken; they wait in its inbox again`);
2021
+ return;
2022
+ } catch (error) {
2023
+ log(`open-artifact inbox.return for ${who}: ${error?.message ?? error}`);
2024
+ }
2016
2025
  }
2026
+ const key = sessionKey(params);
2027
+ leftovers.set(key, [...leftovers.get(key) ?? [], ...left]);
2028
+ log(`open-artifact: ${left.length} message(s) for ${who} were not taken; the session's next call or attach returns them`);
2017
2029
  },
2018
2030
  handlers: {
2019
2031
  ...options.wake ? { "wake.deliver": (params) => wake(params) } : {},
@@ -2116,7 +2128,23 @@ async function createHarness(options) {
2116
2128
  }
2117
2129
  return TOOL_DEFINITIONS.map((tool) => ({ ...tool }));
2118
2130
  },
2119
- call: (name2, args, caller) => client.callTool(name2, args, caller),
2131
+ async call(name2, args, caller) {
2132
+ const key = caller && (caller.session || caller.workspace) ? sessionKey(caller) : null;
2133
+ const held = key ? leftovers.get(key) : void 0;
2134
+ if (!key || !held?.length) return client.callTool(name2, args, caller);
2135
+ leftovers.delete(key);
2136
+ const texts = held.map((message) => message.text);
2137
+ if (name2 === "ArtifactComments" && args.action === "wait") return { messages: texts };
2138
+ let result;
2139
+ try {
2140
+ result = await client.callTool(name2, args, caller);
2141
+ } catch (error) {
2142
+ leftovers.set(key, [...held, ...leftovers.get(key) ?? []]);
2143
+ throw error;
2144
+ }
2145
+ const more = Array.isArray(result.messages) ? result.messages : [];
2146
+ return { ...result, messages: [...texts, ...more] };
2147
+ },
2120
2148
  wrote: (paths, caller) => client.request("agent.wrote", { paths, ...caller ? { caller } : {} }),
2121
2149
  open: (url, opts) => client.request("artifact.open", { url, ...opts ? { caller: opts } : {} }),
2122
2150
  owns: ownsCall,
@@ -3045,8 +3073,15 @@ function setup(ctx, config = {}, deps = {}) {
3045
3073
  workspaces.add(workspace);
3046
3074
  attached.set(session, workspaces);
3047
3075
  try {
3048
- const { inbox } = await (await harness()).attach({ session, workspace, status: status === "idle" ? "idle" : "running" });
3049
- if (inbox.length) log("warn", `${inbox.length} inbox message(s) for ${session} could not be handed to its agent; the next attach returns them`);
3076
+ const h = await harness();
3077
+ const { inbox } = await h.attach({ session, workspace, status: status === "idle" ? "idle" : "running" });
3078
+ if (inbox.length) {
3079
+ if (h.features.includes("inbox.return")) {
3080
+ await h.client.request("inbox.return", { session, workspace, messages: inbox }).then(() => log("warn", `${inbox.length} inbox message(s) for ${session} could not be handed to its agent; they wait for its next tool call`)).catch((error) => log("warn", `${inbox.length} inbox message(s) for ${session} could not be put back: ${error.message}`));
3081
+ } else {
3082
+ log("warn", `${inbox.length} inbox message(s) for ${session} could not be handed to its agent; an older daemon cannot take them back`);
3083
+ }
3084
+ }
3050
3085
  } catch (error) {
3051
3086
  attachedKeys.delete(key);
3052
3087
  throw error;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-open-artifact",
3
- "version": "0.16.0",
3
+ "version": "0.16.2",
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,8 +2,8 @@
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; a widget or mini game - 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.16.0
6
- etag: 30fac07afafeef8b
5
+ generated-by: open-artifact 0.16.2
6
+ etag: 4cfb8f99d733de16
7
7
  ---
8
8
 
9
9
  # Make an artifact: `/open-artifact <type> <what to make>`
@@ -162,7 +162,10 @@ beyond it (running commands, sending things, opening links).
162
162
  `changed`, `read` lists the files they touched in `changed_files`, and `notes` say so: read those files again
163
163
  before writing. When you write through the tools, pass the `sha256` you read as `if_match`
164
164
  (`Artifact {action: "publish", url, files, if_match}`; `ArtifactData` `set` and `delete` of an existing document
165
- need it). On a `conflict`, merge your change into `current` and write again.
165
+ need it). On a `conflict`, merge your change into `current` and write again; `executionStatus: "not_executed"` on
166
+ it means nothing was written.
167
+ - Some apps keep you to your workspace: there a folder or a file path outside it (an action's `file` or `out`,
168
+ ArtifactData's `file_path` or `out_file`) answers `not_granted`. Use a path inside the workspace instead.
166
169
  - To share it, `Artifact {action: "open", url, panel: "share"}` opens its Share panel for the person; to export
167
170
  (PDF, PPTX, PNG, …), `panel: "export"`. Only the person changes how an artifact is shared; never make share links
168
171
  yourself.