pi-open-artifact 0.16.1 → 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.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/src/extension.ts +7 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-open-artifact",
3
- "version": "0.16.1",
3
+ "version": "0.16.2",
4
4
  "description": "Open Artifact in Pi: the Artifact, ArtifactData and ArtifactComments tools, comments on artifact pages waking the Pi session that made them, the open-artifact skill, and /open-artifact <type> to make a new one.",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -25,9 +25,9 @@
25
25
  ]
26
26
  },
27
27
  "dependencies": {
28
- "@open-artifact/cli": "0.16.1",
29
- "@open-artifact/harness-kit": "0.16.1",
30
- "@open-artifact/protocol": "0.16.1"
28
+ "@open-artifact/cli": "0.16.2",
29
+ "@open-artifact/harness-kit": "0.16.2",
30
+ "@open-artifact/protocol": "0.16.2"
31
31
  },
32
32
  "engines": {
33
33
  "node": ">=22.19"
package/src/extension.ts CHANGED
@@ -223,7 +223,13 @@ function setup(pi: PiExtensionAPI, options: OpenArtifactPiOptions): void {
223
223
  // `createHarness` keeps trying in the background when its first try failed; this says why it could not.
224
224
  await h.ready();
225
225
  if (closed) throw new Error('The Pi session ended.');
226
- await h.attach({ ...session, status: running ? 'running' : 'idle', pid: process.pid });
226
+ const { inbox } = await h.attach({ ...session, status: running ? 'running' : 'idle', pid: process.pid });
227
+ // The attach took them out of the daemon; what `wake` did not take (a note, say) waits for the next tool call.
228
+ if (inbox.length && h.features.includes('inbox.return')) {
229
+ await h.client
230
+ .request('inbox.return', { session: session.session ?? null, workspace: session.workspace ?? null, messages: inbox })
231
+ .catch((error: unknown) => log(`open-artifact inbox.return: ${messageOf(error)}`));
232
+ }
227
233
  } catch (error) {
228
234
  h.close();
229
235
  throw error;