pi-kot 0.1.28 → 0.1.30
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 +51 -0
- package/dist/client/assets/index-BaOXsuRp.js +158 -0
- package/dist/client/assets/index-BaOXsuRp.js.map +1 -0
- package/dist/client/assets/index-t8g65CYx.css +1 -0
- package/dist/client/assets/vendor-markdown-DEQqhGsz.js +35 -0
- package/dist/client/assets/vendor-markdown-DEQqhGsz.js.map +1 -0
- package/dist/client/index.html +4 -4
- package/dist/server/contexts/web-ui.md +25 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/routes/artifacts.d.ts +9 -0
- package/dist/server/routes/artifacts.d.ts.map +1 -0
- package/dist/server/routes/artifacts.js +178 -0
- package/dist/server/routes/artifacts.js.map +1 -0
- package/dist/server/routes/control.d.ts.map +1 -1
- package/dist/server/routes/control.js +102 -13
- package/dist/server/routes/control.js.map +1 -1
- package/dist/server/routes/exec.d.ts.map +1 -1
- package/dist/server/routes/exec.js +44 -30
- package/dist/server/routes/exec.js.map +1 -1
- package/dist/server/routes/session-extensions.d.ts.map +1 -1
- package/dist/server/routes/session-extensions.js +8 -1
- package/dist/server/routes/session-extensions.js.map +1 -1
- package/dist/server/routes/sessions.d.ts.map +1 -1
- package/dist/server/routes/sessions.js +20 -2
- package/dist/server/routes/sessions.js.map +1 -1
- package/dist/server/session-store.d.ts +4 -12
- package/dist/server/session-store.d.ts.map +1 -1
- package/dist/server/session-store.js +27 -9
- package/dist/server/session-store.js.map +1 -1
- package/dist/server/ui-settings-store.d.ts +2 -0
- package/dist/server/ui-settings-store.d.ts.map +1 -1
- package/dist/server/ui-settings-store.js +6 -0
- package/dist/server/ui-settings-store.js.map +1 -1
- package/package.json +1 -1
- package/dist/client/assets/index-B4KQi2-0.js +0 -158
- package/dist/client/assets/index-B4KQi2-0.js.map +0 -1
- package/dist/client/assets/index-awAtSW5y.css +0 -1
- package/dist/client/assets/vendor-markdown-H08B1Mko.js +0 -35
- package/dist/client/assets/vendor-markdown-H08B1Mko.js.map +0 -1
package/README.md
CHANGED
|
@@ -35,6 +35,7 @@ This project was built out of **love and curiosity**.
|
|
|
35
35
|
| **🎨 Unified Theme System** | Consistent light/dark theme tokens across panels, modals, inputs, and terminal chrome |
|
|
36
36
|
| **🔌 Tunnel** | Built-in tunnel helper UI for exposing local pi-kot traffic via supported providers, with install checks, diagnostics, and one-click start/stop |
|
|
37
37
|
| **📦 Extensions** | Discover and install pi extensions from the UI — some features only appear after installing the right extension |
|
|
38
|
+
| **🎨 Artifacts** | Agent-created HTML, SVG, Mermaid diagrams, and other files render inline in chat via sandboxed previews |
|
|
38
39
|
|
|
39
40
|
---
|
|
40
41
|
|
|
@@ -205,6 +206,56 @@ The Git panel shows the current repository's status — modified files, staged c
|
|
|
205
206
|
|
|
206
207
|
---
|
|
207
208
|
|
|
209
|
+
## Artifacts
|
|
210
|
+
|
|
211
|
+
pi-kot can render agent-created content inline in chat — HTML pages, SVG images, Mermaid diagrams, and more.
|
|
212
|
+
|
|
213
|
+
### How it works
|
|
214
|
+
|
|
215
|
+
1. The agent writes files to `.pi/artifacts/` in your project directory
|
|
216
|
+
2. Files are served via `/api/v1/artifacts/<filename>`
|
|
217
|
+
3. The chat renderer detects HTML/SVG/JSON/Markdown content and shows a live preview
|
|
218
|
+
|
|
219
|
+
### Supported formats
|
|
220
|
+
|
|
221
|
+
| Format | Detection | Preview |
|
|
222
|
+
|---|---|---|
|
|
223
|
+
| **HTML** | `<!DOCTYPE html>`, `<html>`, or ` ```html` | Sandboxed iframe |
|
|
224
|
+
| **SVG** | `<svg>` or ` ```svg` | Sandboxed iframe |
|
|
225
|
+
| **Mermaid** | ` ```mermaid` | Rendered diagram |
|
|
226
|
+
| **Markdown** | ` ```markdown` | Rendered markdown |
|
|
227
|
+
| **JSON** | ` ```json` or valid JSON tool output | Syntax highlighted |
|
|
228
|
+
| **Image** | `data:image/...` or ` ```image` | `<img>` tag |
|
|
229
|
+
|
|
230
|
+
### Agent context injection
|
|
231
|
+
|
|
232
|
+
pi-kot automatically injects a **web UI context** into every session, telling the agent:
|
|
233
|
+
|
|
234
|
+
- It's running in a browser (not a terminal)
|
|
235
|
+
- To write user-visible files to `.pi/artifacts/` in the current directory
|
|
236
|
+
- To use `/api/v1/artifacts/<filename>` links for previews
|
|
237
|
+
- To use Mermaid instead of ASCII art for diagrams
|
|
238
|
+
|
|
239
|
+
This means the agent will automatically produce web-compatible output when creating diagrams, reports, or interactive content.
|
|
240
|
+
|
|
241
|
+
### Example
|
|
242
|
+
|
|
243
|
+
Ask the agent:
|
|
244
|
+
> "Create a futuristic button with hover effects"
|
|
245
|
+
|
|
246
|
+
The agent will:
|
|
247
|
+
1. Write the HTML to `.pi/web/artifacts/button.html`
|
|
248
|
+
2. Output: `[Live Preview](/api/v1/artifacts/button.html)`
|
|
249
|
+
3. You see the rendered button inline in chat
|
|
250
|
+
|
|
251
|
+
### API route
|
|
252
|
+
|
|
253
|
+
| Method | Path | Purpose |
|
|
254
|
+
|---|---|---|
|
|
255
|
+
| `GET` | `/api/v1/artifacts/:filename` | Serve an artifact file (no auth required) |
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
208
259
|
## Settings
|
|
209
260
|
|
|
210
261
|
Access settings via the **⚙** icon in the header.
|