@poncho-ai/cli 0.38.0 → 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.
- package/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +167 -0
- package/dist/{chunk-U643TWFX.js → chunk-XCDN62XL.js} +1983 -135
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +1 -1
- package/dist/{run-interactive-ink-CE7U47S5.js → run-interactive-ink-W5YJS7UH.js} +1 -1
- package/package.json +4 -4
- package/src/cron-helpers.ts +13 -4
- package/src/index.ts +441 -21
- package/src/vfs-zip.ts +94 -0
- package/src/web-ui-client.ts +1028 -26
- package/src/web-ui-styles.ts +413 -15
- package/src/web-ui.ts +6 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/cli@0.
|
|
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
|
[34mCLI[39m Building entry: src/cli.ts, src/index.ts
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
[34mCLI[39m tsup v8.5.1
|
|
8
8
|
[34mCLI[39m Target: es2022
|
|
9
9
|
[34mESM[39m Build start
|
|
10
|
-
[32mESM[39m [1mdist/index.js [22m[32m3.10 KB[39m
|
|
11
10
|
[32mESM[39m [1mdist/cli.js [22m[32m94.00 B[39m
|
|
12
|
-
[32mESM[39m [1mdist/
|
|
13
|
-
[32mESM[39m [1mdist/
|
|
14
|
-
[32mESM[39m
|
|
11
|
+
[32mESM[39m [1mdist/run-interactive-ink-W5YJS7UH.js [22m[32m23.38 KB[39m
|
|
12
|
+
[32mESM[39m [1mdist/index.js [22m[32m3.10 KB[39m
|
|
13
|
+
[32mESM[39m [1mdist/chunk-XCDN62XL.js [22m[32m673.51 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 88ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 4452ms
|
|
17
17
|
[32mDTS[39m [1mdist/cli.d.ts [22m[32m20.00 B[39m
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m13.24 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,172 @@
|
|
|
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
|
+
|
|
131
|
+
## 0.38.1
|
|
132
|
+
|
|
133
|
+
### Patch Changes
|
|
134
|
+
|
|
135
|
+
- [`d6248c8`](https://github.com/cesr/poncho-ai/commit/d6248c8b6d22e0fd0becde9e31dff7c12c724d84) Thanks [@cesr](https://github.com/cesr)! - fix(cli, harness): unify turn-parameter assembly so `conversation_recall` works everywhere
|
|
136
|
+
|
|
137
|
+
The recall tool relies on three context parameters (`__conversationRecallCorpus`,
|
|
138
|
+
`__conversationListFn`, `__conversationFetchFn`) that were only injected for
|
|
139
|
+
user-initiated HTTP turns. Cron, reminder, messaging-adapter, chat-continuation,
|
|
140
|
+
subagent-callback, and tool-approval-resume runs all built their own
|
|
141
|
+
`runInput.parameters` object and silently omitted these — causing
|
|
142
|
+
`conversation_recall` to throw "not available in this environment" or return
|
|
143
|
+
empty results depending on the call mode.
|
|
144
|
+
|
|
145
|
+
Introduces a single `buildTurnParameters(conversation, opts)` helper in the CLI
|
|
146
|
+
that owns context-parameter assembly (recall functions, `__activeConversationId`,
|
|
147
|
+
`__ownerId`, messaging metadata, tool-result archive). HTTP, messaging, and
|
|
148
|
+
cron/reminder paths now go through it. The harness orchestrator's three
|
|
149
|
+
internal turn sites (chat continuation, subagent-callback resume, tool-approval
|
|
150
|
+
resume) now call the existing `hooks.buildRecallParams` so they pick up the
|
|
151
|
+
recall functions too.
|
|
152
|
+
|
|
153
|
+
- [#101](https://github.com/cesr/poncho-ai/pull/101) [`7cc2fb5`](https://github.com/cesr/poncho-ai/commit/7cc2fb592bf11b79916df5831598a991f1ac9c0c) Thanks [@cesr](https://github.com/cesr)! - fix(web-ui): thread panel displays anchor message + replies, not full snapshot
|
|
154
|
+
|
|
155
|
+
Shows the anchor message you forked on, plus any replies — and that's it.
|
|
156
|
+
The earlier snapshot is still part of the thread's context server-side
|
|
157
|
+
(the agent sees the full prior conversation), but the panel only
|
|
158
|
+
displays what's relevant: the message you replied to, and what came
|
|
159
|
+
after.
|
|
160
|
+
|
|
161
|
+
Also fixes the underlying scroll bug: `.thread-panel-messages` had
|
|
162
|
+
`flex: 1; overflow-y: auto` but no `min-height: 0`. In flex children
|
|
163
|
+
the default `min-height: auto` lets the item grow to fit content, so
|
|
164
|
+
the messages area never shrank below its content size and the scrollbar
|
|
165
|
+
never engaged.
|
|
166
|
+
|
|
167
|
+
- Updated dependencies [[`244a3a3`](https://github.com/cesr/poncho-ai/commit/244a3a310c6c52f9e8535b28fb25d77829583d3f), [`d6248c8`](https://github.com/cesr/poncho-ai/commit/d6248c8b6d22e0fd0becde9e31dff7c12c724d84)]:
|
|
168
|
+
- @poncho-ai/harness@0.39.1
|
|
169
|
+
|
|
3
170
|
## 0.38.0
|
|
4
171
|
|
|
5
172
|
### Minor Changes
|