@pmndre/pine 0.35.2 → 0.37.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/README.md +10 -0
- package/changes.json +19 -13
- package/docs/SKILL.md +1 -0
- package/docs/references/coding.md +2 -1
- package/docs/references/desktop.md +298 -0
- package/docs/references/operations.md +66 -2
- package/docs/references/security.md +8 -0
- package/docs/references/source-types.md +55 -6
- package/docs/references/tui.md +2 -0
- package/package.json +1 -1
- package/src/cli.js +49 -2
- package/src/http.d.ts +8 -0
- package/src/http.js +20 -4
- package/src/login.d.ts +11 -2
- package/src/login.js +11 -3
- package/src/owner.d.ts +87 -0
- package/src/owner.js +531 -0
- package/src/pine.js +1 -1
- package/src/service.d.ts +18 -0
- package/src/service.js +69 -0
- package/src/sources/slack.d.ts +9 -1
- package/src/sources/slack.js +297 -13
- package/src/tui/run.js +4 -41
- package/src/workspace-view.d.ts +28 -1
- package/src/workspace-view.js +87 -2
package/README.md
CHANGED
|
@@ -156,6 +156,15 @@ the output of its tool calls. `/undo` takes your last message back, with the fil
|
|
|
156
156
|
pine .
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
+
There is also a desktop app for macOS, with the same conversations in a window, an editor for
|
|
160
|
+
a conversation's folder and a settings panel for agents, models, MCP servers, skills and
|
|
161
|
+
events. It starts pine itself, or uses the one that runs ([desktop.md](docs/references/desktop.md)).
|
|
162
|
+
From a checkout:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
npm run desktop
|
|
166
|
+
```
|
|
167
|
+
|
|
159
168
|
To get a newer version later, with whatever it needs:
|
|
160
169
|
|
|
161
170
|
```bash
|
|
@@ -214,6 +223,7 @@ Start at [docs/SKILL.md](docs/SKILL.md); it indexes everything.
|
|
|
214
223
|
| --------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
|
|
215
224
|
| Understand how the pieces fit | [overview.md](docs/references/overview.md) |
|
|
216
225
|
| Use the terminal UI | [tui.md](docs/references/tui.md) |
|
|
226
|
+
| Use the desktop app (macOS): conversations, an editor, and a settings panel in one window | [desktop.md](docs/references/desktop.md) |
|
|
217
227
|
| Work on a project: `pine .`, the code pane with git changes, files and tool output, `/undo` | [coding.md](docs/references/coding.md) |
|
|
218
228
|
| Install, run, use the CLI, run it as a service | [operations.md](docs/references/operations.md) |
|
|
219
229
|
| Write `pine.json` and `agent.json` | [configuration.md](docs/references/configuration.md) |
|
package/changes.json
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.37.0",
|
|
4
|
+
"changes": [
|
|
5
|
+
"feat: the desktop app's dark look is the poimandres theme, for the window and for code",
|
|
6
|
+
"fix: packing the desktop app no longer deletes an app that is open, and can write to another folder (--out)",
|
|
7
|
+
"feat: the desktop app finds a conversation by what was said in it, and its side bar can be dragged wider",
|
|
8
|
+
"feat: the desktop app's side panel begins with the agent: what it runs on, what it is doing, what it has",
|
|
9
|
+
"feat: the desktop app's side bar is your agents, and the settings open in a tab",
|
|
10
|
+
"fix: the desktop app's icon and its mark inside the app are the P of pine's wordmark",
|
|
11
|
+
"feat: the desktop app's panels lie as cards on the window, with a line at the top of each conversation",
|
|
12
|
+
"feat: a desktop app for macOS, with your conversations, an editor and a settings panel in one window"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"version": "0.36.0",
|
|
17
|
+
"changes": [
|
|
18
|
+
"feat: after a time without a connection, a Slack source asks for what was written meanwhile and says whether that is everything"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
2
21
|
{
|
|
3
22
|
"version": "0.35.2",
|
|
4
23
|
"changes": [
|
|
@@ -245,18 +264,5 @@
|
|
|
245
264
|
"changes": [
|
|
246
265
|
"feat: sound is played in the conversation, with play and pause"
|
|
247
266
|
]
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
"version": "0.11.1",
|
|
251
|
-
"changes": [
|
|
252
|
-
"fix: a picture a server made is shown once, and its file is fetched by link with the server's key"
|
|
253
|
-
]
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
"version": "0.11.0",
|
|
257
|
-
"changes": [
|
|
258
|
-
"feat: an agent lists its MCP servers and skills by tool, and a conversation's server can become the agent's",
|
|
259
|
-
"fix: the browser answers again after its owner opened a tab"
|
|
260
|
-
]
|
|
261
267
|
}
|
|
262
268
|
]
|
package/docs/SKILL.md
CHANGED
|
@@ -166,6 +166,7 @@ hand work to the agents listed in your prompt, and write shared state under your
|
|
|
166
166
|
|---|---|
|
|
167
167
|
| See what an agent is given (events, schedules, MCP servers, skills) and how events, tasks and sessions fit together | [references/overview.md](references/overview.md) |
|
|
168
168
|
| Chat with agents in the terminal: tabs, slash commands (`/goal`, `/compact`, `/copy`, `/export`, `/undo`), keys, the five modes (auto, safe, manual, bypass, plan), approvals, an agent's questions and its list of steps, what a model thinks, pictures, parts of an answer that are folded away, switching models | [references/tui.md](references/tui.md) |
|
|
169
|
+
| Use the desktop app (macOS): the window with its side bar and tabs, the code panel with an editor for a conversation's folder, the settings panel (agents, models, MCP servers, skills, events, instructions), how it starts or reuses the daemon, how to build and pack it | [references/desktop.md](references/desktop.md) |
|
|
169
170
|
| Work on a project: `pine .`, a folder for a conversation, the code pane with git changes, files and tool output, what an agent left running, what it runs in the background, and taking a message back with `/undo` and `/redo` | [references/coding.md](references/coding.md) |
|
|
170
171
|
| Install it, start it, update it, use the CLI (every `pine` command), the control API for scripts, run it at login or in a container, find out why something did not happen | [references/operations.md](references/operations.md) |
|
|
171
172
|
| Look up a key in `pine.json`, `agent.json`, `models.json` or `.env` | [references/configuration.md](references/configuration.md) |
|
|
@@ -301,7 +301,8 @@ The control API ([operations.md](operations.md)) has the same things:
|
|
|
301
301
|
| `GET /agents/<id>/view/changes?session=` | What git says changed in the conversation's folder |
|
|
302
302
|
| `GET /agents/<id>/view/diff?session=&path=` | The diff of one file (path from the top of the repository) |
|
|
303
303
|
| `GET /agents/<id>/view/tree?session=&path=` | What is in one folder (path from the conversation's folder) |
|
|
304
|
-
| `GET /agents/<id>/view/file?session=&path=` | A file's text |
|
|
304
|
+
| `GET /agents/<id>/view/file?session=&path=` | A file's text: its first 256 KB, or with `&max=<bytes>` up to 2 MB, which is what an editor asks for. `truncated` says whether there is more |
|
|
305
|
+
| `POST /agents/<id>/view/write` `{ session?, path, text }` | Write a file of the conversation's folder: what you changed in an editor of a UI. The path is from the conversation's folder. At most 2 MB of text; a missing file is made, a missing folder is not. The new text is put into a new file that takes the place of the old one, with the rights the old one had. A path that leads out of the folder is refused, and the write happens inside a sandbox that can write in that folder only: a link an agent left there does not get anything outside it changed. On a system without a sandbox it is refused |
|
|
305
306
|
| `GET /agents/<id>/view/find?session=&q=` | The files of the conversation's folder whose name fits a few letters: what `@` offers |
|
|
306
307
|
| `GET /tasks/<id>/transcript?full=1` | A task's steps with the whole output of each tool call |
|
|
307
308
|
| `GET /agents/<id>/programs?session=`, `POST /agents/<id>/programs/stop` `{ session, id }` | What the conversation's commands left running, background commands among them, and stopping one |
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
# The desktop app
|
|
2
|
+
|
|
3
|
+
pine has an app with a window of its own, for macOS: **Pine**. It does what the terminal UI
|
|
4
|
+
does (conversations in tabs, the work of a turn, approvals, the code panel) and adds an editor
|
|
5
|
+
for the files of a conversation's folder, a settings panel for everything that is otherwise a
|
|
6
|
+
`pine` command or a sentence to the main agent, pictures, video and sound shown and played as
|
|
7
|
+
they are, menus and system notifications.
|
|
8
|
+
|
|
9
|
+
It lies in `desktop/` of pine's repository and is built on Electron, so that the same app can
|
|
10
|
+
be made for Linux and Windows later. It is a client of the daemon and nothing more: everything
|
|
11
|
+
it shows and changes goes through the control API ([operations.md](operations.md)), as with
|
|
12
|
+
the terminal UI and the `pine` commands. A conversation you have in the app is the same one
|
|
13
|
+
the terminal UI or Telegram shows.
|
|
14
|
+
|
|
15
|
+
## Starting it
|
|
16
|
+
|
|
17
|
+
From a checkout of pine:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
cd desktop
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm start
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`npm run dev` is the same with the page reloading as you edit it. To make an app that can be
|
|
32
|
+
put into Applications:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm run pack
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
That writes `desktop/release/mac-<arch>/Pine.app` (`npm run dist` also makes a disk image).
|
|
39
|
+
The app carries a pine of its own and is signed for the Mac it was built on; to hand it to
|
|
40
|
+
others it has to be signed with a Developer ID (`CSC_NAME`) and notarised.
|
|
41
|
+
|
|
42
|
+
| Command (in `desktop/`) | What it does |
|
|
43
|
+
|---|---|
|
|
44
|
+
| `npm start` | Builds the app and opens it |
|
|
45
|
+
| `npm run dev` | Opens it with the page served by Vite, reloading on every change |
|
|
46
|
+
| `npm run check` | Type check |
|
|
47
|
+
| `npm test` | The app from end to end: the real app on a pine home of its own with a scripted model. Needs a screen. With `PINE_LIVE=1` on a Mac it also dictates with the real voice helper, from a recording |
|
|
48
|
+
| `npm run pack` | `release/mac-<arch>/Pine.app`, with pine inside. `--no-pine` leaves pine out |
|
|
49
|
+
| `npm run dist` | The same, and a disk image |
|
|
50
|
+
| `node scripts/smoke.mjs` | Starts a packed app on a home of its own and checks that it comes up with the pine it carries |
|
|
51
|
+
|
|
52
|
+
pine itself runs on Node 24 or newer, also when the app starts it: the app looks for `node` the
|
|
53
|
+
way your shell finds it (it asks your login shell for its environment, since an app started
|
|
54
|
+
from the Finder has none of it).
|
|
55
|
+
|
|
56
|
+
## The daemon: started or reused
|
|
57
|
+
|
|
58
|
+
When the app opens it asks `pine service` ([operations.md](operations.md), "A UI of its own")
|
|
59
|
+
for the daemon of your home:
|
|
60
|
+
|
|
61
|
+
| What it finds | What happens |
|
|
62
|
+
|---|---|
|
|
63
|
+
| A pine is running for this home (started in a terminal, at login, by the terminal UI) | The app attaches to it. The side bar says `attached`. Quitting the app leaves it running |
|
|
64
|
+
| Nothing runs | The app starts one, as the terminal UI does, logging to `data/pine.log`. The side bar says `started here`. Quitting the app stops it, cleanly |
|
|
65
|
+
| There is no pine home yet | A first screen offers to set pine up (`pine init`): the example home and the browser its web tools drive |
|
|
66
|
+
| No Node, or no pine | A screen that says what to install |
|
|
67
|
+
|
|
68
|
+
Which pine it runs, in this order: what `PINE_CLI` names; the checkout the app lies in; the
|
|
69
|
+
pine packed into the app; the `pine` of your shell.
|
|
70
|
+
|
|
71
|
+
| Setting (Settings > App) | What it does |
|
|
72
|
+
|---|---|
|
|
73
|
+
| Keep pine running after the app quits | A pine the app starts goes on in the background when the app is closed: schedules fire, sources report and Telegram answers. It then runs until it is stopped (`pine status` finds it; the next start of the app attaches to it) |
|
|
74
|
+
| Home folder | Another pine home than `~/.pine`. Another home is another pine |
|
|
75
|
+
| Appearance | Light, dark, or what the system is set to |
|
|
76
|
+
| Notifications | A system notification when an agent is done, stops with an error, needs your approval or asks you something while the window is not in front. The words are pine's own ("main is done"), never the agent's |
|
|
77
|
+
|
|
78
|
+
Closing the window does not quit the app on a Mac: it, and a daemon it started, stay until
|
|
79
|
+
you quit (`⌘Q`). A daemon the app started that stops answering is started again.
|
|
80
|
+
|
|
81
|
+
## The window
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
● ● ● ◧ M main M main · notes × ⚙ Settings + ← tabs
|
|
85
|
+
⌕ Search and commands ╭──────────────────────────────╮ ╭───────────────────────╮
|
|
86
|
+
Agents + │ M main / notes ▢ ~/dev/x 7% ◨ │ Changes Last turn Files … │
|
|
87
|
+
▾ M main + │ │ │ │
|
|
88
|
+
the main agent │ what do the notes say?│ │ M index.ts src +1 −1│
|
|
89
|
+
★ main conversation ▸ 1 tool call · read · 148 ms│ │ │
|
|
90
|
+
○ notes │ The notes say first line. │ │ │
|
|
91
|
+
▸ B books ⠹ + │ ╭──────────────────────────╮ │ │ │
|
|
92
|
+
▾ S scout + │ │ Message main · / · @ │ │ │ │
|
|
93
|
+
★ main conversation │ + ▣ m ✳ off ⛨ safe ▢ x ↑│ │ │ │
|
|
94
|
+
⌇ Events ⚙ Settings │ ╰──────────────────────────╯ │ │ │
|
|
95
|
+
● pine 0.22 · started here ──────────────────────────╯ ╰───────────────────────╯
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The panels lie as cards on the window: the conversation, and beside it the code panel.
|
|
99
|
+
|
|
100
|
+
**The side bar is your agents.** Each agent is a group: its name and what it is for, and under
|
|
101
|
+
it its conversations. Everything that starts something new stands on the agent's own line, so
|
|
102
|
+
it is never a question whom it is for.
|
|
103
|
+
|
|
104
|
+
| On an agent's line | What it does |
|
|
105
|
+
|---|---|
|
|
106
|
+
| A click on the agent | Folds its conversations away, or shows them again. The app remembers which groups are folded. A folded agent still shows that it is at work (a spinner), waits for you (`!`) or has something new (a dot) |
|
|
107
|
+
| `+` | A new conversation with that agent |
|
|
108
|
+
| The folder (when the pointer is on the line) | Opens a folder of yours for a new conversation with that agent |
|
|
109
|
+
| The gear (when the pointer is on the line) | That agent's page in the settings |
|
|
110
|
+
| A right click | The same as a menu |
|
|
111
|
+
| `+` beside "Agents" | A new agent |
|
|
112
|
+
|
|
113
|
+
An agent that somebody else makes while the app is open (the main agent when you ask it to,
|
|
114
|
+
`pine agent add`, the terminal UI) appears in the side bar within a few seconds, and one that
|
|
115
|
+
is removed goes, with its tabs. A conversation in which an agent is at work has a spinner
|
|
116
|
+
whether or not a tab shows it.
|
|
117
|
+
|
|
118
|
+
Where no agent is named, the app goes by the tab in front, and asks when that is not an
|
|
119
|
+
agent's:
|
|
120
|
+
|
|
121
|
+
| You do | With whom |
|
|
122
|
+
|---|---|
|
|
123
|
+
| `⌘T`, or `+` at the end of the tabs | The agent of the tab in front (the button says which). From the settings or the event log you are asked with whom |
|
|
124
|
+
| `⌘O`, or a folder put on the app's icon | With one agent, that one. With several you are asked which agent works in the folder; the one in front is offered first |
|
|
125
|
+
| `⇧⌘T` | Always asks with whom |
|
|
126
|
+
|
|
127
|
+
| Part | What it is |
|
|
128
|
+
|---|---|
|
|
129
|
+
| Side bar | Search at the top, then your agents (see above). Drag its right edge to make it wider or narrower (a double click on the edge sets it back); where nothing is to click, it moves the window. An agent's own conversation (`main conversation`) comes first, then pinned ones, then by when they were last used. A click on a conversation opens it in a tab; a right click offers Pin, Rename, Remove (or Start over for an agent's own). At the bottom: the event log, the settings, and whether pine answers |
|
|
130
|
+
| Tabs | One conversation each, with its agent's initial, as in the terminal UI: a spinner while the agent works, a dot when something arrived while you were elsewhere, `!` when it waits for your approval, `★` for a conversation that is kept for good. Drag a tab to move it. They are the same tabs the terminal UI opens: the daemon keeps the list |
|
|
131
|
+
| Conversation | A conversation in which nothing was said yet shows who its agent is: what it is for, its model and mode, whom it hands work to, and how many skills, event sources, schedules and MCP servers it has. Then your messages, the agent's answers drawn as markdown, and the work of each turn (tool calls, thoughts, sub-tasks, what it said on the way) folded into one line that a click opens. A `↳ … open` line opens a sub-agent's or delegated task's work in a tab of its own |
|
|
132
|
+
| Input | `↩` sends; while the agent works the message is given to that work, and `⌥↩` makes it wait its turn. `⇧↩` is a new line, `↑` brings back earlier inputs, `esc` stops the agent. `/` offers the commands of the terminal UI, `@` the files of the conversation's folder |
|
|
133
|
+
| The line at the top of a conversation | Whose it is and which (`main / notes`), the folder it works in, how full its context is (tokens read and the share of the window; hover for the cache share and speed), and the code panel's button |
|
|
134
|
+
| The bar under the input | `+` attaches files; then the agent's model, how much it reasons and its mode, and where the conversation works (the agent's own workspace, or a folder of yours): each opens a list on a click. `outside content` appears when the conversation has read something from outside |
|
|
135
|
+
| Side panel | Beside a conversation (`⌥⌘B`): the agent, then its files, changes and output. See "The code panel and the editor" |
|
|
136
|
+
| Search | `⌘K`, or Search in the side bar: see "Finding a conversation" |
|
|
137
|
+
|
|
138
|
+
### Finding a conversation
|
|
139
|
+
|
|
140
|
+
`⌘K` (or Search at the top of the side bar) is one box for everything. Type a few words:
|
|
141
|
+
|
|
142
|
+
| It finds | By |
|
|
143
|
+
|---|---|
|
|
144
|
+
| A conversation | Its name, and what was said in it: your messages and the agent's answers. A conversation found by what was said opens with the words marked in it (`↩` goes to the one before, `⇧↩` to the next) |
|
|
145
|
+
| An open tab, an agent, a settings page | Its name |
|
|
146
|
+
| A command | Its name, or what it does |
|
|
147
|
+
|
|
148
|
+
What fits by its name comes first, then the conversations in which the words were said (each
|
|
149
|
+
with who said it and the place), then the rest. The search over what was said covers the last
|
|
150
|
+
thousand tasks of all agents, which is what the daemon hands out at once; an older message is
|
|
151
|
+
found by opening its conversation and using `⌘F` there.
|
|
152
|
+
|
|
153
|
+
A conversation you only started (`+`) has no name of its own. The app calls it by how it
|
|
154
|
+
began: the first thing you said in it, in the side bar, on its tab and in the search. Give it a
|
|
155
|
+
name with Rename (a right click, or `/rename`) and that name is used.
|
|
156
|
+
|
|
157
|
+
Everything in [tui.md](tui.md) about modes, goals, approvals, an agent's questions, its list
|
|
158
|
+
of steps, sub-agents, `/undo` and what a conversation is holds here unchanged: it is the
|
|
159
|
+
daemon's doing. What differs is how it is drawn and reached.
|
|
160
|
+
|
|
161
|
+
| In the terminal UI | In the app |
|
|
162
|
+
|---|---|
|
|
163
|
+
| `/model`, `/reasoning`, `/mode`, `/folder` | Also the bar under the input, and the Conversation menu |
|
|
164
|
+
| `/sessions`, the conversation list | The side bar |
|
|
165
|
+
| `/code` | The side panel (`⌥⌘B`), which begins with the agent and also edits |
|
|
166
|
+
| `/mcp`, `/sources`, `/subscribe` | Also Settings > MCP servers and Settings > Events |
|
|
167
|
+
| `/attach <path>`, `/paste` | Files from the Finder put on the input, a picture pasted into it, or the `+` in the bar under the input |
|
|
168
|
+
| `/export` | Asks where to save the file |
|
|
169
|
+
| `/voice`, `ctrl+r` | The microphone in the bar under the input, or `⌃R` |
|
|
170
|
+
| `/quit` | `⌘Q` |
|
|
171
|
+
| `shift+tab` (next mode) | The same, while the input is empty |
|
|
172
|
+
| `alt+1` … `alt+9` | `⌘1` … `⌘9`; `⌃⇥` is the next tab |
|
|
173
|
+
|
|
174
|
+
### What the app adds
|
|
175
|
+
|
|
176
|
+
| | |
|
|
177
|
+
|---|---|
|
|
178
|
+
| Pictures, video, sound | A picture an answer points at is shown as it is; a click enlarges it. A video and a sound file get the system's own player controls, with sound |
|
|
179
|
+
| Files from the Finder | Files put on the input with the mouse are attached to the next message (up to 10 files of 20 MB each); a folder put there is opened for the conversation, as with `/folder`. A folder put on the app's icon in the Dock opens a conversation that works in it, as `pine <folder>` does |
|
|
180
|
+
| Menus and keys | Everything is in the menu bar, with its key |
|
|
181
|
+
| Notifications | See the settings above. The app's icon carries the number of conversations that wait for you |
|
|
182
|
+
| Find | `⌘F` marks what you look for in the conversation |
|
|
183
|
+
| The poimandres theme | The dark look is poimandres: its colours for the window, and for code in an answer, in a diff and in the editor. The light look has colours of its own |
|
|
184
|
+
| Several views at once | A conversation, its changes and a file in the editor side by side |
|
|
185
|
+
|
|
186
|
+
## The code panel and the editor
|
|
187
|
+
|
|
188
|
+
The panel beside a conversation (`⌥⌘B`) begins with the agent and goes on to its work. The
|
|
189
|
+
work is that of the folder the conversation works in (the folder you opened for it, else the
|
|
190
|
+
agent's workspace):
|
|
191
|
+
|
|
192
|
+
| View | Shows |
|
|
193
|
+
|---|---|
|
|
194
|
+
| Agent | The agent of this conversation: what it is for, its model, reasoning and mode (a click changes each), whom it hands work to; what is at work right now (this conversation, the sub-agents and delegated tasks it started, the agent's other conversations), each to open; what it listens to (event sources, and whether this conversation, the agent or all agents are subscribed); its schedules, skills and MCP servers; and what it remembers (its `MEMORY.md`). Buttons lead to the settings pages where each is changed |
|
|
195
|
+
| Files | The folder as a tree, a search by name, and the editor |
|
|
196
|
+
| Changes | What differs from the last commit (git): each file with its counts, and its diff on a click |
|
|
197
|
+
| Last turn | What your last message changed, whatever git says, with "Take back" (`/undo`) |
|
|
198
|
+
| Output | The tool calls of the last messages, each with all it printed |
|
|
199
|
+
| Running | What the conversation's commands left running (a dev server, a watcher): its ports as links, its last output, and Stop |
|
|
200
|
+
|
|
201
|
+
While an agent keeps a list of steps, the open steps stand at the top of the panel.
|
|
202
|
+
|
|
203
|
+
**The editor.** A click on a file in Files (or "Edit" on a diff) opens it in an editor with
|
|
204
|
+
line numbers, colours for the common languages, search (`⌘F` in the editor) and undo.
|
|
205
|
+
`⌘S` saves. A file the agent changes while you look at it is shown anew; if you have typed
|
|
206
|
+
meanwhile, the app says that the file changed on disk and lets you take the new one. Files
|
|
207
|
+
over 2 MB and binary files are shown and not edited.
|
|
208
|
+
|
|
209
|
+
Saving goes through the daemon like everything else (`POST /agents/<id>/view/write`). The
|
|
210
|
+
daemon writes the file inside a sandbox that reaches only that folder, so that a link an agent
|
|
211
|
+
planted in its folder cannot make your save land somewhere else ([security.md](security.md)).
|
|
212
|
+
On a system without a sandbox the daemon does not write, and the app says so.
|
|
213
|
+
|
|
214
|
+
## Settings
|
|
215
|
+
|
|
216
|
+
`⌘,` opens the settings panel in a tab of its own, beside the conversations (the same key puts
|
|
217
|
+
it away again; the event log is a tab in the same way). It is pine's configuration, changed by
|
|
218
|
+
clicking instead of by a command or by asking an agent. Each page asks the daemon what there is and tells it what to change.
|
|
219
|
+
The daemon checks a change as it checks the main agent's (the same code), writes it, reads the
|
|
220
|
+
configuration back, and undoes what does not load. You are not asked to confirm in a dialog
|
|
221
|
+
of pine's: the app is your own hand, like a `pine` command.
|
|
222
|
+
|
|
223
|
+
| Page | What you do there | The same by command or by asking the main agent |
|
|
224
|
+
|---|---|---|
|
|
225
|
+
| General | pine's settings (`defaults.model`, `defaults.mode`, `limits.*`, `security.*`), and the notes `pine check` would print about this setup | `set_setting`; `pine check` |
|
|
226
|
+
| Agents | Every agent. On an agent's page: what it is for, its model, reasoning, mode, built-in tools, whom it may hand work to, network from its shell, folders outside its workspace, and the files it is told (`AGENTS.md`, `SOUL.md`, `TOOLS.md`; its `MEMORY.md` and your rules for it are shown). New agent; Remove, with or without its folder | `create_agent`, `update_agent`, `remove_agent`; `pine agent …` |
|
|
227
|
+
| Models | Model servers of your own (add by name and address, with its key when it wants one; remove). Providers: sign in through the browser or with an API key, sign out. The models you can use now | `add_model_server`; `pine model …`, `pine login`, `pine logout` |
|
|
228
|
+
| MCP servers | Every server with whom it is for and whether it connects. Add a remote one (its https address) or a program on this computer, for all agents or one. Sign in to a remote one through the browser. Remove | `add_mcp_server`; `pine mcp …` |
|
|
229
|
+
| Skills | Every skill with whom it is for. Read one, change it, add one for all agents or one agent, remove one. A skill that lies in a folder of yours that the configuration names is shown and not changed | `add_skill`, `remove_skill`; `pine skills` |
|
|
230
|
+
| Events | **Sources**: what runs, who is subscribed, the last event; add one by type (the type's options as a form, what it will do said before it is added, a password or token typed into a field of its own), subscribe an agent or all agents, end a subscription, remove. **Schedules**: add (at set times, every so often, once), remove. **Routes**: add, remove | `add_source`, `subscribe`, `add_schedule`, `add_route`; `pine sources`, `pine subscribe`, `pine schedules` |
|
|
231
|
+
| Instructions | The three files for all agents in pine's home: `AGENTS.md`, `TOOLS.md`, `USER.md` | Telling the main agent something that is for all agents |
|
|
232
|
+
| App | The app's own settings, and the pine it talks to: started here or attached, restart, home folder | |
|
|
233
|
+
|
|
234
|
+
A secret you type on these pages (a model server's key, a source's token, a provider's API
|
|
235
|
+
key) goes from the field to the daemon and from there into pine's `.env` or `auth.json`. It is
|
|
236
|
+
not shown again, not kept by the app, and never reaches an agent or a model.
|
|
237
|
+
|
|
238
|
+
An app that is newer than the pine it attached to says so where a page needs something that
|
|
239
|
+
pine does not know yet ("this pine does not know that yet: it is older than the app"): update
|
|
240
|
+
pine and restart it.
|
|
241
|
+
|
|
242
|
+
## Dictating a message
|
|
243
|
+
|
|
244
|
+
On a Mac the microphone in the bar under the input (or `⌃R`, or `/voice [language]`) dictates
|
|
245
|
+
the message, with the helper the terminal UI uses: the words are recognised on the Mac itself,
|
|
246
|
+
and what is heard is text in the input until you send it. `↩` ends the listening, `esc` throws
|
|
247
|
+
away what was heard, and a key that types ends it too. Everything under "Dictating a message"
|
|
248
|
+
in [tui.md](tui.md) holds here, also what the first use asks for and what to do when it does
|
|
249
|
+
not work. On another system there is no microphone in the bar.
|
|
250
|
+
|
|
251
|
+
## What the app is careful about
|
|
252
|
+
|
|
253
|
+
The page in the window draws what agents write, and an answer can repeat what a web page told
|
|
254
|
+
the agent to write. So:
|
|
255
|
+
|
|
256
|
+
| | |
|
|
257
|
+
|---|---|
|
|
258
|
+
| The page has no token and no Node | The daemon's token stays in the app's main process, which makes each call for the page. The page runs in the browser's sandbox, without access to files or programs |
|
|
259
|
+
| An answer is content, not a page | It is drawn from markdown and cleaned of everything that could act: scripts, styles, forms, frames. The window's own policy lets it load nothing from the web |
|
|
260
|
+
| A link says where it leads | The address stands next to a link whose words are not the address, and only `http` and `https` addresses open, in your browser |
|
|
261
|
+
| Nothing is fetched because an answer contains it | A picture at a web address is a line to click (`Load picture · https://…`); the daemon then fetches it, with its guard against addresses in your network. A picture at a path in the agent's workspace is shown from there |
|
|
262
|
+
| What is drawn straight from the daemon | Only pictures, video and sound, by fixed addresses of the control API |
|
|
263
|
+
| Notifications and the window's title | pine's own words only |
|
|
264
|
+
| What is heard | Text for the input: never sent by itself |
|
|
265
|
+
| The window stays the app | It cannot be taken to another address, and opens no further windows |
|
|
266
|
+
|
|
267
|
+
The app does not reach into pine's home: it reads no configuration file and no token file
|
|
268
|
+
itself. What it knows, the daemon told it.
|
|
269
|
+
|
|
270
|
+
## For changing the app
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
desktop/
|
|
274
|
+
electron/
|
|
275
|
+
main.ts the main process: the window, menus, dialogs, notifications; the daemon's token
|
|
276
|
+
and every call of the control API; the two addresses the page may load from
|
|
277
|
+
preload.ts the bridge: the short list of things the page may ask the main process for
|
|
278
|
+
service.ts finds node and pine, runs `pine service`, keeps the daemon it started
|
|
279
|
+
src/ the page (React)
|
|
280
|
+
model.ts what the page knows: tabs, what each conversation shows, the daemon's live events
|
|
281
|
+
api.ts the control API, typed
|
|
282
|
+
App.tsx the window: side bar, tabs, palette, the dialogs for approvals and questions
|
|
283
|
+
Conversation.tsx, Composer.tsx, markdown.tsx a conversation, the input, an answer drawn
|
|
284
|
+
CodePanel.tsx changes, files and the editor, output, what is running
|
|
285
|
+
Settings.tsx the settings pages
|
|
286
|
+
commands.ts the commands: one list for the palette, the menus and what is typed after a slash
|
|
287
|
+
scripts/ build, dev, pack, the icon, the smoke test of a packed app
|
|
288
|
+
test/ the app from end to end, driven through its real window
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
- The page asks for something new through `preload.ts` and a handler in `main.ts`, never by
|
|
292
|
+
getting more of the system. A handler checks that the call comes from the app's own page.
|
|
293
|
+
- What the daemon can do is added to the control API (`src/http.ts`, `src/owner.ts`) with a
|
|
294
|
+
test there, then to `api.ts`. The app never does a daemon's work itself.
|
|
295
|
+
- Text an answer or a tool produced is drawn through `markdown.tsx` or as plain text, never
|
|
296
|
+
set as HTML anywhere else.
|
|
297
|
+
- A new thing the owner can see or do gets a test in `desktop/test/`, which starts the real
|
|
298
|
+
app on a home of its own.
|
|
@@ -230,6 +230,7 @@ What you type in a shell. Every command is the `pine` program with a word after
|
|
|
230
230
|
| `pine browser-install` | Fetch the browser again. `pine init` and `pine update` do this already |
|
|
231
231
|
| `pine check` | Validate the configuration; show each agent's workspace, model, tools, MCP servers; list security notes |
|
|
232
232
|
| `pine start` | Run the daemon in the foreground. Ctrl-C or SIGTERM stops it cleanly |
|
|
233
|
+
| `pine service [--keep]` | For a UI that is a program of its own (a desktop app): finds the daemon of this home or starts one, and prints one line of JSON saying where it answers and with which token. See "A UI of its own" |
|
|
233
234
|
| `pine dev-model [--port 7464] [--model haiku]` | The `claude -p` model server |
|
|
234
235
|
| `pine status` | Running tasks, live sessions (and whether they are tainted), model slots |
|
|
235
236
|
| `pine agents` | Configured agents, as the daemon has them (JSON) |
|
|
@@ -265,6 +266,36 @@ also tell a running daemon, so the change applies at once. `pine schedules`, `pi
|
|
|
265
266
|
`pine check` and `pine manual` only read the files and need no daemon. `pine help` prints the
|
|
266
267
|
list.
|
|
267
268
|
|
|
269
|
+
### A UI of its own
|
|
270
|
+
|
|
271
|
+
The terminal UI starts a daemon inside itself when none runs. A UI that is another program (a
|
|
272
|
+
desktop app, an editor plug-in) gets the same with `pine service`, and is then a client of the
|
|
273
|
+
control API like every other:
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
pine service
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
```json
|
|
280
|
+
{"base":"http://127.0.0.1:7463","token":"...","mode":"embedded daemon","started":true,"home":"/Users/you/.pine","version":"0.22.2"}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
That one line is all it ever writes to its output.
|
|
284
|
+
|
|
285
|
+
| What it finds | What it does |
|
|
286
|
+
|---|---|
|
|
287
|
+
| A daemon of this home is running | Says where it is (`"mode": "attached"`, `"started": false`) and ends at once. The daemon goes on |
|
|
288
|
+
| Nothing runs | Starts the daemon in itself (and the `claude -p` stand-in, when the configuration uses a `dev/` model and nothing serves it), logs to `data/pine.log`, says `"started": true`, and stays for as long as the daemon is to run |
|
|
289
|
+
| Something else answers on the port (another pine home) | `{"error": "..."}` and exit code 1. It does not drive a daemon that does not take this home's token |
|
|
290
|
+
| No home, or a configuration that does not load | `{"error": "..."}` with what to do, and exit code 1 |
|
|
291
|
+
|
|
292
|
+
A daemon it started stops cleanly when the command gets SIGTERM or SIGINT, and when its input
|
|
293
|
+
closes: start it with a pipe as its input and keep that open, and a daemon never outlives the
|
|
294
|
+
program that started it, however that program ends. `--keep` leaves the input out of it, for a
|
|
295
|
+
daemon that is to go on after the program is closed; it then runs until it is signalled.
|
|
296
|
+
|
|
297
|
+
pine's own desktop app starts and finds its daemon this way ([desktop.md](desktop.md)).
|
|
298
|
+
|
|
268
299
|
## Running at login
|
|
269
300
|
|
|
270
301
|
On macOS, [examples/launchd/com.pine.daemon.plist](../../examples/launchd/com.pine.daemon.plist)
|
|
@@ -302,7 +333,7 @@ are JSON with `Content-Type: application/json`.
|
|
|
302
333
|
| `GET /agents/<id>/folder?session=`, `GET /agents/<id>/folders`, `POST /agents/<id>/folder` `{ session, folder }` | The folder a conversation works in; every conversation of the agent that has one; open a folder for a conversation (`folder: null` closes it). Refused for pine's home, pine's program and other agents' workspaces, and while the conversation is working |
|
|
303
334
|
| `GET /agents/<id>/goal?session=`, `POST /agents/<id>/goal` `{ session, objective }` or `{ session, action }` | Goal mode. `GET` returns `{ goal }` with the objective, `status` (`active`, `paused`, `met`, `blocked`, `limit`), the round, pine's note on what happened last and the judge's reason; no goal: `{}`. `objective` sets the conversation's goal and starts on it; `action` is `pause`, `resume` or `clear`. Every change is also an event on `agent/<id>/goal`. See "Goal mode" in [agents.md](agents.md) |
|
|
304
335
|
| `GET /agents/<id>/programs?session=`, `POST /agents/<id>/programs/stop` `{ session, id }` | What a conversation's commands left running (command, ports, how long), and stopping one of them. A command the agent started in the background is among them while it runs, with `background: true` and `output` (the file its output goes to). Only a program of that conversation can be stopped. |
|
|
305
|
-
| `GET /agents/<id>/view/changes?session=`, `/view/diff?session=&path=`, `/view/tree?session=&path=`, `/view/file?session=&path=`, `/view/find?session=&q=` | What the code pane shows of a conversation's folder (or of the agent's workspace): what git says changed, one file's diff, what is in a folder, a file's text, the files whose name fits a few letters. Read-only, and nothing outside that folder |
|
|
336
|
+
| `GET /agents/<id>/view/changes?session=`, `/view/diff?session=&path=`, `/view/tree?session=&path=`, `/view/file?session=&path=`, `/view/find?session=&q=` | What the code pane shows of a conversation's folder (or of the agent's workspace): what git says changed, one file's diff, what is in a folder, a file's text (the first 256 KB; with `&max=<bytes>` up to 2 MB, for an editor), the files whose name fits a few letters. Read-only, and nothing outside that folder |
|
|
306
337
|
| `GET /agents/<id>/view/turn?session=`, `/view/turndiff?session=&path=` | What your last message in a conversation changed in its folder, which is what `/undo` would take back: `{ task, prompt, root, files, more, note? }` (at most 300 files; `note` says why there is nothing to show), and one file's diff over that message. While the message is still being worked on: what it has changed so far. See [coding.md](coding.md) |
|
|
307
338
|
| `POST /agents/<id>/model` `{ model }` | Switch an agent's model and save it in its `agent.json` |
|
|
308
339
|
| `GET /agents/<id>/todos?session=` | The list of steps the agent keeps in that conversation |
|
|
@@ -322,7 +353,7 @@ are JSON with `Content-Type: application/json`.
|
|
|
322
353
|
| `GET /tasks/<id>/images/<n>` | The n-th picture that came with a task (an attachment, a Telegram photo) |
|
|
323
354
|
| `GET /agents/<id>/image?path=&session=` | A picture, video or sound file in that agent's workspace or, with `session`, in the folder opened for that conversation. Anything that is not an image, video or sound file in there is "not found" |
|
|
324
355
|
| `POST /images/fetch` `{ url }` | Fetch a picture, video or sound from the web for display: https and public addresses only; pictures up to 20 MB, videos and sound up to 100 MB |
|
|
325
|
-
| `GET /sources`, `GET /agents/<id>/sources` | Event sources and their state; the ones that agent can subscribe to |
|
|
356
|
+
| `GET /sources`, `GET /agents/<id>/sources[?session=]` | Event sources and their state; the ones that agent can subscribe to, each with how it listens (`agent`: as the agent, `global`: with all agents, and with `session` also `local`: that conversation on its own) |
|
|
326
357
|
| `POST /agents/<id>/subscribe` `{ source, session?, note?, when?, throttle?, debounce?, separate? }`, `POST /agents/<id>/unsubscribe` `{ source, session? }` | Change an agent's subscriptions (written to its `agent.json`); `session` makes it one conversation's |
|
|
327
358
|
| `POST /subscribe` `{ source, note?, ... }`, `POST /unsubscribe` `{ source }` | The subscription of all agents (written to `pine.json`) |
|
|
328
359
|
| `POST /agents/<id>/close` `{ session }` | A conversation's tab was closed in a UI: ends what it was subscribed to on its own. The conversation itself is kept |
|
|
@@ -331,6 +362,39 @@ are JSON with `Content-Type: application/json`.
|
|
|
331
362
|
| `POST /state` `{ key, value }` | Write state; `null` deletes |
|
|
332
363
|
| `POST /hook/<name>` | Webhook: a hook from `http.hooks` ([events.md](events.md)) or a running `webhook` source ([source-types.md](source-types.md)). No token; each has its own secret, unless a hook is declared `"open": true` |
|
|
333
364
|
|
|
365
|
+
### Setting pine up through the control API
|
|
366
|
+
|
|
367
|
+
What the main agent sets up by tool call when you ask it, and the `pine` command in the files,
|
|
368
|
+
a program of yours does with these: a settings panel of a UI, a script. They are checked and
|
|
369
|
+
carried out by the same functions the tools use, without the question to you, since whoever
|
|
370
|
+
has the token is you. An error is answered with `{ "error": "..." }` and what to do.
|
|
371
|
+
|
|
372
|
+
| Request | Purpose |
|
|
373
|
+
|---|---|
|
|
374
|
+
| `GET /overview` | Where this pine stands: `{ version, home, main, platform, sandbox, warnings, modelNotes, log }`. `warnings` are the security notes of `pine check`, `modelNotes` what is wrong with model keys, `log` the path of the log file |
|
|
375
|
+
| `GET /settings` | The settings of `pine.json` that can be changed while pine runs, each as `{ key, about, kind, now, live }`: what is in force (`now`), what a value has to be (`kind`: `"model"`, `"boolean"`, `"duration"`, `{ one: [...] }` or `{ from, to }`), and whether a change holds at once (`live`). `saved` is there when the file holds another value that takes effect at the next start. The same list as the main agent's `settings` tool |
|
|
376
|
+
| `POST /settings` `{ key, value }` | Change one of them, as `set_setting` does. `"default"` as the value takes the entry out. Answers `{ key, now, live }` |
|
|
377
|
+
| `GET /agents/<id>/detail` | One agent in full: `{ id, main, description, workspace, dir, model?, defaultModel, thinking, mode, tools, allTools, delegates, network, read, write, holdings, files }`. `model` is missing when it runs on the default. `holdings` is what it has (conversations, sources, servers, schedules, skills, routes, files in its workspace). `files` holds the text of its `instructions` (AGENTS.md), `soul`, `tooling`, `memory` and your `rules` for it, each only when the file exists. Changes go through `POST /agents/<id>/update` |
|
|
378
|
+
| `GET /shared`, `POST /shared` `{ name, text }` | The three files for all agents in pine's home (`AGENTS.md`, `TOOLS.md`, `USER.md`) as `{ name, about, text }`, and replacing one of them. `name` is one of the three and never a path |
|
|
379
|
+
| `GET /skills` | Every skill, as `pine skills` lists them, each with its `instructions` (the body of its SKILL.md) |
|
|
380
|
+
| `POST /skills` `{ name, description, instructions, agent? }`, `POST /skills/remove` `{ name, agent?, session? }` | Write a skill for all agents, or with `agent` for that agent, as `add_skill` does (the same name again replaces it); remove one. A skill in a folder you named under `skills` in a configuration file stays yours and is refused |
|
|
381
|
+
| `GET /schedules` | What is scheduled: `{ name, scope, session?, when, task?, next?, topic }` each, `scope` being `global` or an agent |
|
|
382
|
+
| `POST /schedules` `{ name, task, cron? \| every? \| at? \| in?, agent?, session? }`, `POST /schedules/remove` `{ name, agent? }` | Add a schedule as `add_schedule` does: for all agents, for an agent, or with `session` for one of its conversations. Exactly one of `cron`, `every`, `at` (`"2026-12-24 17:00"`) and `in` (`"20m"`). Remove one |
|
|
383
|
+
| `GET /routes` | The routes of `pine.json` |
|
|
384
|
+
| `POST /routes` `{ name, on, when?, agent?, prompt?, session?, set?, publish_topic?, publish_payload?, call_prompt?, call_system?, call_model?, throttle?, debounce?, trust? }`, `POST /routes/remove` `{ name }` | Add a route with the values `add_route` takes (`when`, `set` and `publish_payload` as JSON text); it acts at once. Answers `{ name, lines, wider? }`: what it does in words, and what it gives up if it widens trust. Remove one |
|
|
385
|
+
| `GET /sources/types` | The source types there are: `{ name, summary, options, own }` each, `options` being the schema of what a source of that type takes (a secret option has `secret: true`), `own` whether it was registered in this installation |
|
|
386
|
+
| `POST /sources/propose` `{ name, type, options, agent?, ask? }` | What setting that source up would mean, without writing anything: `{ does, opens, needs, owner?, tell? }`. `needs` lists the secrets only you have (`{ name, label }`), to be sent as `values` |
|
|
387
|
+
| `POST /sources` `{ name, type, description, options, agent?, own?, values?, ask? }`, `POST /sources/remove` `{ name, agent? }` | Set an event source up as `add_source` does after your yes: for all agents, or with `agent` for that one. `values` are the secrets from `needs`; they go into pine's `.env` and the configuration names them. `own: true` treats what it reports as your own words. Nobody is subscribed yet (`POST /agents/<id>/subscribe`). Remove one, with its subscriptions and secrets |
|
|
388
|
+
| `GET /models/servers` | The model servers of your own, as `pine model list` |
|
|
389
|
+
| `POST /models/servers` `{ name, url, key?, context?, reasoning? }`, `POST /models/servers/remove` `{ name }` | Add a model server by its address, as `pine model add` does: pine asks it for its models. A server that wants a key answers status 409 with `locked: true` until the right `key` is sent; the key goes into `.env`. Remove one: status 409 with `users` while an agent or a default uses one of its models |
|
|
390
|
+
| `GET /models/providers` | The model providers pi knows: `{ id, name, signedIn, models, oauth }` each. `signedIn`: there is a credential or a key for it; `oauth`: it can be signed in to through a browser |
|
|
391
|
+
| `POST /models/login` `{ provider, type? }` | Start a sign-in to a provider, as `pine login` does (`type`: `api_key` or `oauth`). Answers `{ id }`. The sign-in then waits for you, step by step |
|
|
392
|
+
| `GET /models/login/<id>`, `POST /models/login/<id>` `{ answer }` or `{ cancel: true }` | Where a sign-in stands: `{ lines, url?, code?, question?, done, error?, models? }`. `url` is a page to open in a browser (pine does not open it), `code` what to enter there, `question` what it waits for (`{ message, secret, options? }`): answer it with `answer` (a key, a pasted address, the `id` of an option). `done` with `models` when it worked, with `error` when not. An answer is handed on and kept nowhere |
|
|
393
|
+
| `POST /models/logout` `{ provider }` | Forget the stored credential of a provider |
|
|
394
|
+
| `GET /mcp/states` | Whether each MCP server connects, as `pine mcp list` shows it. Takes as long as connecting to them does |
|
|
395
|
+
| `POST /mcp/login` `{ name, agent? }` | Sign in to a remote MCP server through the browser, as `pine mcp login`. The request lasts until the sign-in is over and answers `{ code, out }` |
|
|
396
|
+
| `POST /agents/<id>/view/write` `{ session?, path, text }` | Write one text file in the folder a conversation works in (or the agent's workspace): what an editor in a UI saves. At most 2 MB, into a folder that exists, and nowhere outside that folder. See "From a script" in [coding.md](coding.md) |
|
|
397
|
+
|
|
334
398
|
## Day to day
|
|
335
399
|
|
|
336
400
|
- **See what is happening:** `pine events -f` in a terminal. Add `--topic "agent/#"` for agent
|
|
@@ -206,6 +206,14 @@ changes inside a sandbox that cannot write and has no network, with the programs
|
|
|
206
206
|
can name for git to start (diff drivers, text converters, hooks, a file system monitor)
|
|
207
207
|
switched off. Looking at a folder runs nothing from it.
|
|
208
208
|
|
|
209
|
+
A UI can also save a file you changed in its editor (`POST /agents/<id>/view/write` of the
|
|
210
|
+
control API; no agent has a tool for it). The folder it writes in is one an agent writes in
|
|
211
|
+
too, so what lies there is not trusted: a file's name can be a link to something of yours
|
|
212
|
+
elsewhere, or a second name of such a file. The daemon therefore never writes on such a path
|
|
213
|
+
itself. The text is put into place by a helper inside a sandbox that may write in that folder
|
|
214
|
+
and nowhere else, as a new file that then takes the place of the old one; what the old name
|
|
215
|
+
pointed at is left as it was. Where there is no sandbox, nothing is written.
|
|
216
|
+
|
|
209
217
|
Consequences worth knowing:
|
|
210
218
|
|
|
211
219
|
- An agent cannot change its own `agent.json`, its extensions or `pine.json`.
|