pi-open-artifact 0.16.1 → 0.16.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.
package/README.md CHANGED
@@ -41,6 +41,13 @@ To try it for one run without installing it, use `pi -e ./plugins/pi`. Upgrade w
41
41
  Pi has no page view of its own: `Artifact {action: "open"}` opens the page in the computer's browser, and the agent
42
42
  gives you its `view_url` too.
43
43
 
44
+ ## Where artifacts go
45
+
46
+ New artifacts go under your own Open Artifact folder, one folder per project: `~/OpenArtifact/<project>/<slug>`. Pi
47
+ lets its agent write there, and the repository stays clean. To keep them in the project instead
48
+ (`<session's folder>/artifacts/<slug>`), run `open-artifact config set artifactsLocation workspace` in your terminal,
49
+ with `--local` for one project only. See [Settings](../../docs/settings.md).
50
+
44
51
  ## How it starts the daemon
45
52
 
46
53
  A Pi session that never makes an artifact starts nothing. When a daemon already runs at session start, the session
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.3",
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.3",
29
+ "@open-artifact/harness-kit": "0.16.3",
30
+ "@open-artifact/protocol": "0.16.3"
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;