@poncho-ai/cli 0.38.1 → 0.39.0

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @poncho-ai/cli@0.38.1 build /home/runner/work/poncho-ai/poncho-ai/packages/cli
2
+ > @poncho-ai/cli@0.39.0 build /home/runner/work/poncho-ai/poncho-ai/packages/cli
3
3
  > tsup src/index.ts src/cli.ts --format esm --dts
4
4
 
5
5
  CLI Building entry: src/cli.ts, src/index.ts
@@ -8,11 +8,11 @@
8
8
  CLI Target: es2022
9
9
  ESM Build start
10
10
  ESM dist/cli.js 94.00 B
11
+ ESM dist/run-interactive-ink-W5YJS7UH.js 23.38 KB
11
12
  ESM dist/index.js 3.10 KB
12
- ESM dist/run-interactive-ink-UKPUGCDW.js 23.38 KB
13
- ESM dist/chunk-W7SQVUB4.js 601.92 KB
14
- ESM ⚡️ Build success in 79ms
13
+ ESM dist/chunk-XCDN62XL.js 673.51 KB
14
+ ESM ⚡️ Build success in 88ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 4135ms
16
+ DTS ⚡️ Build success in 4452ms
17
17
  DTS dist/cli.d.ts 20.00 B
18
18
  DTS dist/index.d.ts 13.24 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,133 @@
1
1
  # @poncho-ai/cli
2
2
 
3
+ ## 0.39.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`48a52a2`](https://github.com/cesr/poncho-ai/commit/48a52a24831d5a4001d5c04939d37292c91b200f) Thanks [@cesr](https://github.com/cesr)! - feat(web-ui): expose persistent agent memory as `/memory.md` in the Files tree
8
+
9
+ The agent's per-tenant persistent memory document — previously only reachable
10
+ through the `memory_main_get` / `memory_main_write` / `memory_main_edit` tools
11
+ — now appears as a virtual file `memory.md` at the root of the Files mode.
12
+ Clicking it uses the existing markdown preview/edit UX: read inline, click
13
+ Edit to open the textarea, Save to persist. Reading and writing both go
14
+ through `engine.memory` (not the VFS), so changes the agent makes via tools
15
+ and changes a user makes through the UI see the same document.
16
+
17
+ The five VFS routes short-circuit on the path `/memory.md`:
18
+ `GET` reads from `engine.memory`, `PUT` writes (trimmed, mirroring
19
+ `memory_main_write` semantics), `DELETE` returns 400 RESERVED, `vfs-list`
20
+ splices the synthetic entry into the root listing, and `vfs-archive`
21
+ includes it in root-archive downloads. `vfs-mkdir` rejects the path.
22
+
23
+ - [#104](https://github.com/cesr/poncho-ai/pull/104) [`9616060`](https://github.com/cesr/poncho-ai/commit/96160607502c2c0b05bc60b67b8fc012f4052ef1) Thanks [@cesr](https://github.com/cesr)! - dev: add a Files mode to the sidebar with VFS browsing, preview, and uploads
24
+
25
+ The web UI sidebar now has a Chats / Files segmented control. Switching to
26
+ Files reveals a folder-tree view of the agent's VFS — the same storage the
27
+ agent reads and writes via `read_file`, `write_file`, and the virtualized
28
+ `bash` tool. Folders expand inline with the same caret/dropdown pattern as
29
+ the Cron jobs section. Clicking a file previews it in the main panel:
30
+ - Text / JSON / source code render as a wrapped `<pre>` (5 MB cap), with an Edit button for inline editing (last-write-wins via PUT).
31
+ - Images render inline.
32
+ - PDFs render in an embedded iframe.
33
+ - Audio and video render with native controls.
34
+ - Anything else shows a placeholder card with a Download button.
35
+
36
+ Files can be added directly from the UI: an Upload button (multi-file
37
+ picker), drag-and-drop onto the explorer or onto a specific folder row, and
38
+ a New folder button. Files and folders are deletable via a hover-X with a
39
+ two-step confirm. Conflicts prompt to overwrite. Four new HTTP routes back
40
+ this UI: `GET /api/vfs-list`, `PUT /api/vfs/{path}`, `DELETE /api/vfs/{path}`,
41
+ and `POST /api/vfs-mkdir`. URLs of the form `/f/{path}` deep-link to a file
42
+ preview; the chat composer is hidden while previewing a file.
43
+
44
+ The same routes are exposed on `AgentClient` for programmatic use:
45
+ `listDir`, `writeFile`, `deleteFile`, and `mkdir` (alongside the existing
46
+ `readFile`). New shared types `ApiVfsEntry`, `ApiVfsListResponse`, and
47
+ `ApiVfsWriteResponse` are exported from `@poncho-ai/sdk`.
48
+
49
+ - [#105](https://github.com/cesr/poncho-ai/pull/105) [`e127174`](https://github.com/cesr/poncho-ai/commit/e12717415b1114c5e9a58e7c51fcf9e038218f9f) Thanks [@cesr](https://github.com/cesr)! - feat: tenant-authored skills in the VFS
50
+
51
+ Tenants can now author skills in their VFS at `/skills/<name>/SKILL.md`
52
+ (plus sibling files such as `scripts/*.ts` and `references/*.md`). VFS
53
+ skills are merged with the agent's repo skills per-tenant when building
54
+ the `<available_skills>` block in the system prompt; repo skills win on
55
+ name collision (a warning is logged for the dropped VFS skill).
56
+
57
+ VFS skills can ship runnable scripts in their tree (`scripts/foo.ts`
58
+ etc.); the agent runs them via the existing `run_code` tool with
59
+ `file: "/skills/<name>/scripts/foo.ts"`, which executes in the sandboxed
60
+ isolated-vm runtime. `run_skill_script` remains for repo-shipped skills
61
+ only (jiti, full Node access), and returns a clear redirect when
62
+ called against a VFS skill. The agent's tool-policy lookups still
63
+ resolve against repo skills only, so tenants cannot grant themselves
64
+ new MCP tools by uploading a SKILL.md (security boundary).
65
+
66
+ `run_code` is enhanced so skill-authored scripts feel natural:
67
+ - Accepts top-level `export const run = ...`, `export default function ...`,
68
+ and `export default <expr>;` (the keyword is stripped at strip-TypeScript
69
+ time; `export default <expr>` becomes a `__default` binding).
70
+ - New optional `input` parameter, exposed inside the script as the global
71
+ `__input`.
72
+ - If the script defines a top-level `run` / `default` / `main` / `handler`
73
+ function and doesn't `return` on its own, the dispatcher invokes that
74
+ function with `__input` and returns its result. Existing
75
+ return-style scripts are unaffected.
76
+
77
+ The CLI Files sidebar already exposes the VFS, so creating a tenant
78
+ skill is just writing to `/skills/...` from the UI or via the agent's
79
+ own VFS write tools — the harness invalidates its per-tenant skill
80
+ cache on writes under `/skills/`.
81
+
82
+ ### Patch Changes
83
+
84
+ - [`fe55b69`](https://github.com/cesr/poncho-ai/commit/fe55b69a348f530e30d9f6998ddb00666b65a983) Thanks [@cesr](https://github.com/cesr)! - dev: add a `user ↔ harness` message toggle to the web UI in verbose mode
85
+
86
+ When `poncho dev` is run with `-v`, the web UI now shows a small `user`
87
+ toggle button in the topbar. Clicking it switches the message area
88
+ between the user-facing rendering and a raw view of `_harnessMessages` —
89
+ the actual message stream sent to the model API, with role,
90
+ runId/step/id metadata, and pretty-printed JSON content. Useful for
91
+ debugging context construction, tool-call shape, and what the model
92
+ actually sees turn-by-turn. Hidden entirely outside `-v` mode.
93
+
94
+ - [`524df41`](https://github.com/cesr/poncho-ai/commit/524df411904bd00c07901695eda6d4dd07dde972) Thanks [@cesr](https://github.com/cesr)! - fix: persist harness messages on cancelled runs so the agent doesn't lose context
95
+
96
+ When a run was cancelled (Stop button, abort signal), `conversation.messages`
97
+ was updated with the partial assistant turn but `conversation._harnessMessages`
98
+ — the canonical history `loadCanonicalHistory` hands to the model on the next
99
+ turn — was left holding a snapshot from the _previous_ successful run. The
100
+ agent had no memory of the cancelled work, even though the user-facing UI
101
+ still showed it. The new verbose-mode harness toggle made this divergence
102
+ directly visible.
103
+
104
+ The fix plumbs an in-flight `messages` snapshot through the `run:cancelled`
105
+ event, trims it to a model-valid prefix (no orphan `tool_use`), and persists
106
+ it as `_harnessMessages` on every cancel path in the CLI.
107
+
108
+ - [`45c71dc`](https://github.com/cesr/poncho-ai/commit/45c71dcc7ef6af24039c1302769a519671da59c2) Thanks [@cesr](https://github.com/cesr)! - fix(cli): strip large payloads and cap size on the SSE replay buffer
109
+
110
+ The per-conversation event buffer in `broadcastEvent` only excluded
111
+ `browser:frame` events from being retained for replay. But `tool:completed`
112
+ events for `browser_screenshot` carry the full ~134KB base64 JPEG in
113
+ `output.screenshot.data`, and `step:completed` / large tool outputs can be
114
+ similarly heavy. Across a long browser-heavy session these accumulated in
115
+ `stream.buffer` until the dev server OOM'd at ~3.7-3.8 GB heap.
116
+
117
+ Two changes:
118
+ 1. Before pushing into the replay buffer, deep-strip any string > 4 KB
119
+ (replaced with `[stripped-for-replay len=N]`). Live SSE subscribers still
120
+ get the full event in real-time; only the replay buffer (used when a
121
+ client reconnects mid-conversation) holds the stripped copy. A
122
+ reconnecting client that wants the full screenshot can refetch the
123
+ conversation from disk.
124
+ 2. Cap the buffer at the most recent 1000 events per conversation.
125
+
126
+ - Updated dependencies [[`d24c152`](https://github.com/cesr/poncho-ai/commit/d24c152c1ecb9bfe59b086cb1f18a5ab43688223), [`8de45a7`](https://github.com/cesr/poncho-ai/commit/8de45a7ac434fa928ae3b83deec52727073d4658), [`524df41`](https://github.com/cesr/poncho-ai/commit/524df411904bd00c07901695eda6d4dd07dde972), [`8e410a1`](https://github.com/cesr/poncho-ai/commit/8e410a15b246a2b129fded8d1c06b98878e5fd07), [`e127174`](https://github.com/cesr/poncho-ai/commit/e12717415b1114c5e9a58e7c51fcf9e038218f9f), [`9616060`](https://github.com/cesr/poncho-ai/commit/96160607502c2c0b05bc60b67b8fc012f4052ef1), [`2792d84`](https://github.com/cesr/poncho-ai/commit/2792d8448b304bf748f926ce42a91c76f37edf79), [`e127174`](https://github.com/cesr/poncho-ai/commit/e12717415b1114c5e9a58e7c51fcf9e038218f9f)]:
127
+ - @poncho-ai/harness@0.40.0
128
+ - @poncho-ai/sdk@1.10.0
129
+ - @poncho-ai/messaging@0.8.5
130
+
3
131
  ## 0.38.1
4
132
 
5
133
  ### Patch Changes