paseo-plugin-secure-input 0.2.0 → 0.2.2
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/OVERVIEW.md +8 -10
- package/README.md +44 -191
- package/SECURITY.md +47 -42
- package/client/attach.ts +53 -0
- package/client/settings.tsx +3 -3
- package/index.client.tsx +10 -6
- package/npm-shrinkwrap.json +2 -2
- package/package.json +8 -6
- package/server/paseo/tools.ts +2 -4
- package/shared/limits.ts +1 -1
- package/shared/seal.ts +1 -1
- package/skills/secure-input/SKILL.md +15 -13
package/OVERVIEW.md
CHANGED
|
@@ -1,30 +1,28 @@
|
|
|
1
|
-
secure-input lets an agent ask you for a password, an API key, a token or a whole credentials file through a form in the Paseo app instead of in the chat.
|
|
1
|
+
secure-input lets an agent ask you for a password, an API key, a token or a whole credentials file through a form in the Paseo app instead of in the chat. The app seals what you enter, the daemon writes each value to a short-lived file that only your OS user can read, and the agent gets only the paths; the skill has it move each file's content without reading it, which holds as far as the agent follows the skill.
|
|
2
2
|
|
|
3
3
|
## What you see
|
|
4
4
|
|
|
5
|
-
- **A pill in the agent's chat** for each request, with the key names and never a value.
|
|
6
|
-
- **The form**: a hidden row for each key
|
|
7
|
-
- **The Secure input settings screen**: a check that seals the largest submission one request can carry on this device and has the plugin open it, the plugin's state
|
|
5
|
+
- **A pill in the agent's chat** for each request, with the key names and never a value. Pressing it opens the form; the agent says why it asks in its own message.
|
|
6
|
+
- **The form**: a hidden row for each key, with an eye to show the value, and rows of your own for keys the agent did not name. A file row takes a whole file of up to 128 KiB, binary included: picked or dropped on the desktop, pasted on the desktop and on the phone. ✕ declines the request.
|
|
7
|
+
- **The Secure input settings screen**: a check that seals the largest submission one request can carry on this device and has the plugin open it, the plugin's state, and a button that deletes every set of files at once.
|
|
8
8
|
|
|
9
9
|
The texts of the pill, the form and the settings screen are in Ukrainian only.
|
|
10
10
|
|
|
11
11
|
## What the agent sees
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
- A request answers at once that it is pending. Once you have submitted, the agent gets a message with the path of each file. No tool result, message, status or log holds a value: the agent's model provider gets key names, paths and states, never a value.
|
|
15
|
-
- The skill that comes with the plugin tells the agent to move each value only by redirection or by copy, into an `.env` file that git ignores, a file of its own, a tool's stdin or a server, and never to read it.
|
|
13
|
+
The agent has four tools, which Paseo serves beside its own: `request_secret` to ask, then `request_status`, `cancel_request` and `release_secret`. A request answers at once that it is pending; once you have submitted, the agent gets a message with the path of each file. No tool result, message, status or log holds a value. The skill that comes with the plugin tells the agent to move each value only by redirection or by copy, and never to read it.
|
|
16
14
|
|
|
17
15
|
## Setup
|
|
18
16
|
|
|
19
|
-
- Paseo 0.14.0-beta.1 or later on the daemon and in the app: an older app does not load the pill, the form or the settings screen. A macOS
|
|
17
|
+
- Paseo 0.14.0-beta.1 or later on the daemon and in the app: an older app does not load the pill, the form or the settings screen. A macOS or Linux daemon with Node.js 22.12 or later; live validation has been on macOS.
|
|
20
18
|
- Paseo must give its tools to agents (`daemon.mcp.injectIntoAgents`): while that is off, no agent has the plugin's tools.
|
|
21
19
|
- Link the skill where your agents read skills, as the [README](https://github.com/dutchakdev/paseo-plugin-secure-input#install) shows.
|
|
22
20
|
- Answer from the app over the relay or Tailscale: a direct LAN connection with a password is not encrypted.
|
|
23
21
|
|
|
24
22
|
## When the files go
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
The plugin writes directories of mode 0700 with files of mode 0600, one per key you filled in. It tries to delete them when the agent releases the set, at the end of the agent's turn that its message starts, 15 minutes after the write, and at every start and stop of the plugin. A crash or a failed removal can leave files behind until a later attempt succeeds. Deletion does not overwrite their content.
|
|
27
25
|
|
|
28
26
|
## What it does not protect against
|
|
29
27
|
|
|
30
|
-
While a file exists, any process of your OS user can read it, the agent included, and on Paseo 0.14.0-beta.1 a process
|
|
28
|
+
While a file exists, any process of your OS user can read it, the agent included, and on Paseo 0.14.0-beta.1 a local process with access to the daemon can impersonate an agent. What keeps a value out of the model is the skill's rule and the plugin leaving values out of its outputs. [SECURITY.md](https://github.com/dutchakdev/paseo-plugin-secure-input/blob/main/SECURITY.md) describes the threat model and known limitations.
|
package/README.md
CHANGED
|
@@ -1,36 +1,30 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
|
-
secure-input is a [Paseo](https://paseo.sh) plugin
|
|
3
|
+
secure-input is a [Paseo](https://paseo.sh) plugin: an agent asks you for a password, an API key, a token or a whole credentials file in a form in the Paseo app instead of in the chat. The app seals what you enter, the daemon writes each value to a short-lived file that only your OS user can read, and the agent gets only the paths, with a skill that has it move each file's content without reading it (which holds as far as the agent follows the skill). The texts of the pill, the form and the settings screen are in Ukrainian only.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Paseo **0.14.0-beta.1 or later** on the daemon and in every app you answer from: an older app shows no pill, and `paseo plugin ls` cannot tell you. Paseo 0.14.0-beta.1 is a pre-release. The daemon needs Node.js 22.12 or later; macOS and Linux are declared supported, and live validation has been on macOS. Check both versions:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
paseo daemon status # daemonVersion
|
|
11
11
|
/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' /Applications/Paseo.app/Contents/Info.plist # the macOS app
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Plugins must be enabled daemon-wide first, under **Settings → Plugins → Enable plugins** (the root `pluginsEnabled` field in the daemon's `config.json`). Agents must also get Paseo's own tools, which bring this plugin's with them:
|
|
14
|
+
Enable plugins under **Settings → Plugins → Enable plugins** (`pluginsEnabled` in the daemon's `config.json`), and give agents Paseo's own tools, which bring this plugin's with them. A fresh home of Paseo 0.14.0-beta.1 has that off; the setting applies to sessions that open afterwards:
|
|
17
15
|
|
|
18
16
|
```bash
|
|
19
17
|
paseo daemon config set daemon.mcp.injectIntoAgents true
|
|
20
18
|
```
|
|
21
19
|
|
|
22
|
-
While `daemon.mcp.injectIntoAgents` is off, no agent has any of Paseo's tools, so none has this plugin's. A fresh home of Paseo 0.14.0-beta.1 has it off (whether an upgraded one has it on was not checked); setting it takes effect without a restart. An agent gets the tools when its session opens.
|
|
23
|
-
|
|
24
|
-
Then install the plugin from one of these sources:
|
|
25
|
-
|
|
26
20
|
| Source | Command |
|
|
27
21
|
|---|---|
|
|
28
22
|
| [Plugin directory](https://paseo.sh/plugins), the reviewed version, once the plugin is listed there | `paseo plugin add dutchakdev/secure-input` |
|
|
29
23
|
| npm, the newest release, also before the directory has reviewed it | `paseo plugin install npm:paseo-plugin-secure-input` |
|
|
30
24
|
|
|
31
|
-
`paseo plugin ls`
|
|
25
|
+
`paseo plugin ls` then shows `secure-input` as `running`; `paseo plugin update secure-input` pulls later releases, and `paseo plugin remove secure-input` leaves the data directory behind.
|
|
32
26
|
|
|
33
|
-
|
|
27
|
+
Link the skill from a clone: Paseo hands no plugin's skill to agents, and the installed copy moves at every update. Agents that read `~/.agents/skills` take it from there; Claude Code reads `~/.claude/skills`:
|
|
34
28
|
|
|
35
29
|
```bash
|
|
36
30
|
git clone https://github.com/dutchakdev/paseo-plugin-secure-input.git
|
|
@@ -40,213 +34,72 @@ ln -sn "$PWD/skills/secure-input" ~/.agents/skills/secure-input
|
|
|
40
34
|
ln -sn ../../.agents/skills/secure-input ~/.claude/skills/secure-input
|
|
41
35
|
```
|
|
42
36
|
|
|
43
|
-
`ln -sn` replaces nothing:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
rm ~/.agents/skills/secure-input-setup ~/.claude/skills/secure-input-setup
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Last, on every device you will answer from, open the plugin's settings screen, **Secure input**, and press «Перевірити». It seals the largest submission one request can carry in the app and has the plugin open it, the way a real value goes.
|
|
37
|
+
`ln -sn` replaces nothing: a name that is taken fails with `File exists` or, if it is a real directory, gets the link inside it; look with `ls -ld` first.
|
|
50
38
|
|
|
51
|
-
|
|
39
|
+
Then, on each device you answer from, open **Secure input** in the plugin's settings and press «Перевірити», which seals a submission of the largest size and has the plugin open it. Answer over the relay or Tailscale: a direct LAN connection with a password is not encrypted.
|
|
52
40
|
|
|
53
41
|
## How it works
|
|
54
42
|
|
|
55
43
|
```mermaid
|
|
56
44
|
sequenceDiagram
|
|
57
45
|
participant A as Agent
|
|
58
|
-
participant
|
|
59
|
-
participant
|
|
60
|
-
|
|
61
|
-
A
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
P
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
P
|
|
69
|
-
|
|
70
|
-
A->>D: release_secret, or rm -r the directory
|
|
71
|
-
P->>P: delete the set (also at the end of the turn, 15 minutes after the write, at start and at stop)
|
|
46
|
+
participant P as Plugin on the daemon
|
|
47
|
+
participant U as You in the Paseo app
|
|
48
|
+
A->>P: request_secret
|
|
49
|
+
P-->>A: pending, end the turn
|
|
50
|
+
P-->>U: Pill in the agent's chat
|
|
51
|
+
U->>U: Open the form, enter values or files
|
|
52
|
+
U->>P: Sealed submission, ciphertext only
|
|
53
|
+
P->>P: Open it, write drop/si-secret-…/KEY
|
|
54
|
+
P-->>A: The paths, once the agent is idle
|
|
55
|
+
A->>A: Copy or redirect, never display
|
|
56
|
+
A->>P: release_secret, or rm -r
|
|
57
|
+
P->>P: Delete the files
|
|
72
58
|
```
|
|
73
59
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
## The tools
|
|
77
|
-
|
|
78
|
-
Paseo serves four tools to every agent that has Paseo's tools. Each call carries the agent that made it, as the daemon names it from the agent's connection to its MCP server, and nothing the call itself says of who is asking. On Paseo 0.14.0-beta.1 that name is not bound to a credential: it keeps agents apart that use the connection Paseo gave them, and not a process that can reach the daemon's MCP endpoint for agents and calls it as another agent. On a daemon with no password that takes no credential at all; on one with a password, the token Paseo puts in the configuration of every agent it starts, or the password itself, lets such a call in ([SECURITY.md](SECURITY.md#a-hostile-process-that-runs-as-you)).
|
|
79
|
-
|
|
80
|
-
| Tool | Input | What it does |
|
|
81
|
-
|---|---|---|
|
|
82
|
-
| `request_secret` | `reason`, `fields` | Puts a pill in the agent's chat and answers at once with `"status": "pending"`. A message with the paths follows when you have submitted |
|
|
83
|
-
| `request_status` | `requestId` | The state, the keys and the `tamper` flag; while the files exist, each file's path (`files`) and when they go (`deleteBy`). Never a value |
|
|
84
|
-
| `cancel_request` | `requestId` | Withdraws the agent's own pending request |
|
|
85
|
-
| `release_secret` | `requestId` | Deletes the files of the agent's delivered request now |
|
|
86
|
-
|
|
87
|
-
The input of `request_secret` is `{ reason, fields }`, and each field is `{ key, label?, optional?, kind?, format? }`:
|
|
88
|
-
|
|
89
|
-
| Member | Rule |
|
|
90
|
-
|---|---|
|
|
91
|
-
| `reason` | At most 300 characters. Kept with the request and shown nowhere: the agent says why in its own message |
|
|
92
|
-
| `label` | At most 80 characters. A screen reader reads it as the hint of the field: of a text field's input, and of a file field's buttons and paste area; it is not shown |
|
|
93
|
-
| `fields` | At most 32 fields, or none. You can always add keys and files of your own |
|
|
94
|
-
| `key` | `[A-Za-z_][A-Za-z0-9_]*`, at most 128 characters, not `__proto__`, `constructor` or `prototype`. Each key names a file, so keys that differ only in letter case are refused |
|
|
95
|
-
| `kind` | `"text"` (the default): one line, at most 64 KiB of UTF-8. `"file"`: a whole file, at most 128 KiB, binary included |
|
|
96
|
-
| `format` | For a file: `"json"` or `"pem"` is checked in the app, `"any"` (the default) is not |
|
|
97
|
-
| `optional` | You may leave it empty; it then gets no file |
|
|
98
|
-
|
|
99
|
-
An agent has one pending request at a time. A request nobody answers expires after 8 hours.
|
|
100
|
-
|
|
101
|
-
### What agents see
|
|
102
|
-
|
|
103
|
-
Checked on Paseo 0.14.0-beta.1 with real agents:
|
|
104
|
-
|
|
105
|
-
| Agent | The tools are named | Permission |
|
|
106
|
-
|---|---|---|
|
|
107
|
-
| Claude Code 2.1.311 | `mcp__paseo__request_secret`, `mcp__paseo__request_status`, `mcp__paseo__cancel_request`, `mcp__paseo__release_secret`. They are deferred: the agent loads one with `ToolSearch` (`select:mcp__paseo__request_secret`) before its first call | In the `default` mode ("Always Ask"), every call of these tools waits for your permission, and so does each `cp` of a delivered file |
|
|
108
|
-
| Codex 0.164.0 | The same names, as nested tools of its `exec` tool: listed in `ALL_TOOLS`, called as `tools.mcp__paseo__request_secret(…)`. Paseo's timeline shows the calls as `paseo.request_secret` | In the `auto` mode ("Default Permissions"), every call asks through an MCP elicitation: `Allow the paseo MCP server to run tool "request_secret"?` |
|
|
109
|
-
| Kimi | Not checked | Not checked |
|
|
110
|
-
|
|
111
|
-
Other modes were not tried. One Codex model, `gpt-6-luna`, did not find the tools until it was told to look in `ALL_TOOLS`; the skill tells agents where to look.
|
|
112
|
-
|
|
113
|
-
An agent without Paseo's tools cannot use the plugin: every agent, while `daemon.mcp.injectIntoAgents` is off. A provider whose configuration switches Paseo's tools off (`paseoTools.enabled: false`, or a tool named in `disabledTools`) has the plugin's tools left out without an error; this is read in Paseo's source and was not tried. Without the tools the skill has the agent say so, and never take the secret in chat.
|
|
114
|
-
|
|
115
|
-
## The pill and the form
|
|
116
|
-
|
|
117
|
-
### The pill
|
|
118
|
-
|
|
119
|
-
| State | The pill |
|
|
120
|
-
|---|---|
|
|
121
|
-
| Waiting for you | «Секрет для агента» and the key, or «Секрети для агента» and how many keys. The only state you can press: it opens the form |
|
|
122
|
-
| Delivered | Green «Передано» and how many keys got a file |
|
|
123
|
-
| Files deleted | Grey «Передано» |
|
|
124
|
-
| Declined, cancelled, expired, not accepted | Dim, the count struck through: «Відхилено», «Скасовано», «Час минув», «Не прийнято» |
|
|
125
|
-
| A second, different submission came | Red «Підозріле подання» |
|
|
126
|
-
|
|
127
|
-
The pill has the same height in every state, and holds key names, never a value.
|
|
128
|
-
|
|
129
|
-
### The form
|
|
130
|
-
|
|
131
|
-
The form opens over the chat in the app's own dialog. At the top: «Секрет для агента» or «Секрети для агента», the badge «X25519 · ChaCha20-Poly1305», and ✕, which declines the request. Closing the form any other way declines nothing: the pill opens it again. Then a row for each key: the key's name inside the field on the left, the value hidden, and the eye that shows it. An optional key has a dimmer name. + adds a row of your own, a name and a value; in such a row the paperclip makes it a file row, and ✕ removes it. → sends. There is no other text: no reason, no captions. Every icon has a Ukrainian label for screen readers, and so do the name of a key you add and the paste area. On the desktop and on Android a screen reader is told each line under a row, and the line at the top, as it appears; VoiceOver on iOS reads them where they stand.
|
|
132
|
-
|
|
133
|
-
| Where | Line | When |
|
|
134
|
-
|---|---|---|
|
|
135
|
-
| Under a row | «Лише A–Z, 0–9, _» | A name of yours is not a key |
|
|
136
|
-
| Under a row | «Вже є STRIPE_KEY» | The name is used above, also in another letter case |
|
|
137
|
-
| Under a row | «Ім'я зарезервоване» | `__proto__`, `constructor` or `prototype` |
|
|
138
|
-
| Under a row | «Не довше 64 КіБ» | A text is too long |
|
|
139
|
-
| Under a row | «Некоректний символ» | A text holds a broken character |
|
|
140
|
-
| Under a file row | «Не довше 128 КіБ», «Це не JSON», «Це не PEM» | The file fails its check |
|
|
141
|
-
| Under the rows | «Разом не довше … КіБ» | Everything together would not fit one submission |
|
|
142
|
-
| At the top | «Плагін зараз недоступний. Натисни «→» ще раз.» | The plugin did not take what was sent, and the request may still be open |
|
|
143
|
-
| At the top | «Запит уже закрито.» | The request is closed: what you typed stays, and → is disabled |
|
|
60
|
+
The form shows no reason: the agent says why it asks in its own message. Deletion also runs without the agent ([When files go](#when-files-go)).
|
|
144
61
|
|
|
145
|
-
|
|
62
|
+
## What the agent gets
|
|
146
63
|
|
|
147
|
-
|
|
64
|
+
The agent has four tools beside Paseo's own: `request_secret` (named keys, or none; it answers `"status": "pending"`, and the paths follow in a message), `request_status`, `cancel_request` and `release_secret`, which agents see as `mcp__paseo__request_secret`, `mcp__paseo__request_status`, `mcp__paseo__cancel_request` and `mcp__paseo__release_secret`. A text value is one line of at most 64 KiB; a file is at most 128 KiB, binary included, checked as JSON or PEM when the agent asks for that. One pending request per agent; a request nobody answers expires after 8 hours. The skill holds the input and the rules the agent follows.
|
|
148
65
|
|
|
149
|
-
|
|
66
|
+
## What you see
|
|
150
67
|
|
|
151
|
-
|
|
152
|
-
|---|---|---|
|
|
153
|
-
| Pick a file (the paperclip) | Yes | No: Paseo gives plugins no file picker there |
|
|
154
|
-
| Drop a file on the row | Yes | No |
|
|
155
|
-
| Paste (the clipboard) | Yes | Yes |
|
|
68
|
+
A pill in the agent's chat holds the key names, never a value: «Секрет для агента» or «Секрети для агента» while it waits for you, green «Передано» once delivered and grey once the files are gone, struck through when declined, cancelled, expired or refused, and red «Підозріле подання» when a second, different submission came after delivery. Pressing the waiting pill opens the form over the chat: a hidden row per key with an eye to show it, dim names on optional keys, **+** for a row of your own (the paperclip makes it a file row), ✕ at the top to decline. A form holds at most 32 rows, including yours; → stays disabled while a required field or a row you added is incomplete, or while there is nothing to send. Closing the form any other way declines nothing and throws away what you typed. A file row takes a file picked or dropped on the desktop, or pasted on the desktop and the phone (Paseo gives plugins no file picker there); the plugin reads no clipboard. The form shows neither the agent's reason nor its labels.
|
|
156
69
|
|
|
157
|
-
|
|
70
|
+
**Secure input**, in the plugin's settings, runs «Перевірити», shows the sets on the daemon and the requests that wait («Секрети на сервері», «Запити, що чекають», «Помилки»), and has «Видалити всі файли секретів зараз», which tries to delete every set; some may already be gone when «Не вдалося видалити» appears, so check «Секрети на сервері» for what remains.
|
|
158
71
|
|
|
159
|
-
|
|
72
|
+
## When files go
|
|
160
73
|
|
|
161
|
-
|
|
74
|
+
Each delivery is `<data>/drop/si-secret-<requestId>/` with a file per key you filled in. The plugin tries to delete it at the first of these; a crash or a failed removal can leave files behind ([SECURITY.md](SECURITY.md#crashes-stops-and-restarts)):
|
|
162
75
|
|
|
163
|
-
|
|
76
|
+
- The agent calls `release_secret`, or deletes the directory itself.
|
|
77
|
+
- The end, with any outcome, of the agent's turn that its delivery message starts.
|
|
78
|
+
- 15 minutes after the write; on a machine that slept through that, within a minute of waking.
|
|
79
|
+
- The plugin starts, and sweeps `drop/`.
|
|
80
|
+
- The plugin stops, and tries to sweep `drop/`.
|
|
81
|
+
- You press «Видалити всі файли секретів зараз» in the settings.
|
|
164
82
|
|
|
165
|
-
|
|
83
|
+
An agent busy for more than 15 minutes after you submit loses the files at their deadline and, once idle, is told to ask again.
|
|
166
84
|
|
|
167
|
-
|
|
168
|
-
|---|---|---|
|
|
169
|
-
| The agent calls `release_secret`, or deletes the directory itself | `agent` | Nothing |
|
|
170
|
-
| The end, with any outcome, of the agent's turn that its delivery message starts | `turn` | Nothing more |
|
|
171
|
-
| 15 minutes after the write, and on a machine that slept through that, within a minute of waking | `time` | If its delivery message is still waiting: that the files were deleted, instead of their paths |
|
|
172
|
-
| The plugin starts: everything in `drop/` goes | `restart` | The same, with this reason |
|
|
173
|
-
| The plugin stops: everything in `drop/` goes | `stop` | The same, with this reason |
|
|
174
|
-
| You press «Видалити всі файли секретів зараз» | `human` | The same, with this reason |
|
|
175
|
-
|
|
176
|
-
The deletion at the end of a turn is armed by the first turn of the agent that begins after its message was handed over, so a late end of the turn before it does not take the files early. If the agent is busy for more than 15 minutes after you submit, the files go at their deadline, and the agent, once idle, is told to ask again. The request then reads `released`; a set that cannot be deleted keeps it `delivered`, and the plugin tries again.
|
|
177
|
-
|
|
178
|
-
Deletion is `unlink` and `rmdir` only, follows no link, and overwrites nothing first. [SECURITY.md](SECURITY.md) says why, and names the windows in which a process of your user can still race it.
|
|
179
|
-
|
|
180
|
-
## The settings screen
|
|
181
|
-
|
|
182
|
-
**Secure input**, in the plugin's settings, shows the version and three parts.
|
|
183
|
-
|
|
184
|
-
**«Шифрування».** The badge «X25519 · HKDF-SHA256 · ChaCha20-Poly1305», and «Перевірити» on «Цей пристрій». It seals in the app a dummy payload of the largest size one submission can have, and the plugin opens it: «✓ … мс», or «✗ дані не збіглися», «✗ не вдалося зашифрувати», «✗ плагін не відповів».
|
|
185
|
-
|
|
186
|
-
**«Стан».** «Стан» has four rows, read again while the screen is open. Only a red row has a line under it.
|
|
187
|
-
|
|
188
|
-
| Row | Says |
|
|
189
|
-
|---|---|
|
|
190
|
-
| «Плагін» | «Працює»; «Запускається» until the plugin has met the daemon and read its requests; «Не запустився», with the reason |
|
|
191
|
-
| «Секрети на сервері» | «Немає», or how many sets are on the daemon and when the nearest goes («… · найближчий зникне о …»); red, «… · не все видалено», when something in `drop/` could not be deleted |
|
|
192
|
-
| «Запити, що чекають» | «Немає», or how many requests wait for you |
|
|
193
|
-
| «Помилки» | «Немає», or «Є» with the first problem: requests or messages that cannot be saved, a request file that cannot be read, a pill that has not reached its chat, a hook that failed |
|
|
85
|
+
## Security
|
|
194
86
|
|
|
195
|
-
|
|
87
|
+
What you enter leaves the app only sealed to a one-time key of the request. The plugin stores submitted values only under `drop/` and leaves them out of its tool results, messages and logs; plaintext also exists for a while in app and daemon memory, and a failed write can leave staging files under `drop/`. Any process of your OS user can read a file while it exists, the agent included: what keeps the value out of the model is the skill's rule and the plugin leaving values out of its outputs. A harness rule that refuses file-reading tools on `si-secret-` paths blocks accidental reads through those tools only, not reads through the shell or from the destination. On Paseo 0.14.0-beta.1, a local process with access to the daemon can impersonate an agent: create a request in its chat, and look at, cancel or release its requests. The plugin cannot verify that the named agent made the call; only Paseo can close that. Provide a secret only for a task and destination you recognise. [SECURITY.md](SECURITY.md) describes the threat model and known limitations.
|
|
196
88
|
|
|
197
89
|
## When something is wrong
|
|
198
90
|
|
|
199
|
-
| Symptom | Cause |
|
|
91
|
+
| Symptom | Cause and fix |
|
|
200
92
|
|---|---|
|
|
201
|
-
| The agent says it has no `request_secret` tool | `daemon.mcp.injectIntoAgents` is off (Install); the provider switches Paseo's tools off; or the
|
|
202
|
-
| The agent reports `the plugin
|
|
203
|
-
|
|
|
204
|
-
|
|
|
205
|
-
| The agent
|
|
206
|
-
|
|
|
207
|
-
| «Секрети на сервері» is red | Something in `drop/` could not be deleted. A set delivered since the plugin started is tried again at its deadline, and after that once a minute; anything else that could not be deleted, such as what an earlier run or a failed write left, is tried again once a minute. After a press of «Видалити всі файли секретів зараз» that could not sweep `drop/` at all, the row stays red until a sweep runs: the next press, or the next start. Press «Видалити всі файли секретів зараз», or delete `drop/` in the data directory by hand |
|
|
208
|
-
| The daemon log has `Agent MCP transport error: … Unsupported protocol version …` when a Claude agent starts | Seen on Paseo 0.14.0-beta.1; those agents got the tools all the same |
|
|
209
|
-
|
|
210
|
-
## Where things are
|
|
211
|
-
|
|
212
|
-
The data directory is `${PASEO_HOME:-~/.paseo}/secure-input`:
|
|
213
|
-
|
|
214
|
-
| Path | Holds |
|
|
215
|
-
|---|---|
|
|
216
|
-
| `requests.json` | The open requests and the history of the last 200 closed ones: states, key names, who asked, how each ended. No value |
|
|
217
|
-
| `outbox.json` | Messages waiting for an idle agent, as references: the words are built from the plugin's own record of the request when a message is sent |
|
|
218
|
-
| `drop/` | The sets, `si-secret-<requestId>/<KEY>`. Empty while nothing is delivered |
|
|
219
|
-
| `bin/` | Only where v1 was installed: a stub in place of v1's bridge, written at every start, for agents created under v1. Their stored configuration still starts `bin/secure-input` as an MCP server; the stub lists no tools, and a call, or the old command line, gets `secure-input now gives its tools through Paseo itself. This old server has none. Do not ask for the secret in chat instead.` Keep `bin/` while such agents are in use |
|
|
220
|
-
|
|
221
|
-
v1 left more, which v2 neither reads nor touches and you can delete: `tmp/`, `staging.log`, `commands.json`, `bindings.json` and `run/`.
|
|
222
|
-
|
|
223
|
-
The plugin never deletes its data directory. Its log, `paseo plugin logs secure-input`, holds codes and fixed phrases only.
|
|
224
|
-
|
|
225
|
-
## Security
|
|
226
|
-
|
|
227
|
-
What you enter leaves the app only sealed to a one-time key of the request, and on the daemon's disk it exists in the clear only in those short-lived files, which the plugin shows to nobody. Any process of your OS user, the agent included, can read such a file while it exists, so what keeps the value out of the model is the skill's rule and the plugin's own silence, not a lock. Which agent asks is the daemon's to say, and on Paseo 0.14.0-beta.1 any process that can reach the daemon's MCP endpoint for agents can make the daemon say another agent's name, and so put a request in that agent's chat: on a daemon with no password it needs no credential, and on one with a password, an agent's token or the password itself. [SECURITY.md](SECURITY.md) says what is promised and every case where it does not hold.
|
|
228
|
-
|
|
229
|
-
A rule in your agent's harness that refuses its file-reading tools on paths containing `si-secret-` adds a lock where that harness can enforce one. Write it in that harness's own syntax, and leave `cp` and `<` redirection working, or the agent cannot move the value.
|
|
93
|
+
| The agent says it has no `request_secret` tool | `daemon.mcp.injectIntoAgents` is off ([Install](#install)); the provider's configuration switches Paseo's tools off; or the session opened before the plugin ran. A Codex agent may have to look in `ALL_TOOLS` |
|
|
94
|
+
| The agent reports `the plugin did not start (…)` | The start-up failed and the tools refuse until it succeeds. «Плагін» reads «Не запустився» with the reason, and so does `paseo plugin logs secure-input`: for example the data directory, `${PASEO_HOME:-~/.paseo}/secure-input`, or `drop/` in it, is not a private directory of your user. Remove the cause and reload the plugin. `the plugin is busy; retry in a few seconds` is a disk that stalls: nothing was done, and the agent can ask again |
|
|
95
|
+
| No pill in the chat, or no **Secure input** screen | The app is older than the plugin requires ([Install](#install)), or the plugin does not run: `paseo plugin ls`, `paseo plugin logs secure-input`. The plugin retries a pill that did not land; «Помилки» shows it meanwhile |
|
|
96
|
+
| The agent stops to ask for permission | Your harness may ask before plugin calls and file transfers. Approve only when the task and destination match what you authorised |
|
|
97
|
+
| The agent never continued after you submitted | Its message waits until the daemon says the agent is idle; [SECURITY.md](SECURITY.md#crashes-stops-and-restarts) says how long and how it can be lost. Tell the agent to continue: it can call `request_status` |
|
|
98
|
+
| «Секрети на сервері» is red | Something in `drop/` could not be deleted, and the plugin retries ([SECURITY.md](SECURITY.md#crashes-stops-and-restarts)). Press «Видалити всі файли секретів зараз», or delete `drop/` by hand |
|
|
230
99
|
|
|
231
100
|
## Development
|
|
232
101
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
```bash
|
|
236
|
-
git clone https://github.com/dutchakdev/paseo-plugin-secure-input.git
|
|
237
|
-
cd paseo-plugin-secure-input
|
|
238
|
-
npm ci
|
|
239
|
-
npm run check # typecheck the daemon half, the app half and the tests, then test
|
|
240
|
-
paseo plugin install "$PWD"
|
|
241
|
-
paseo plugin ls # secure-input running
|
|
242
|
-
paseo plugin reload secure-input # after each edit: source edits are not picked up by themselves
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
`tests/canary.test.ts` sends recognisable values (a text, a JSON file and a binary file) through the tools and the whole plugin, and searches everything that left the trusted path for them: only the files in `drop/` may hold them. `tests/docs.test.ts` holds these documents to the code: the skill's examples, the messages it quotes, every word of the app they quote, and every number with a unit. The suite uses real files and real child processes, refuses to run as root, and passes on macOS and on Linux (Node 22, as a user that is not root); the plugin itself has been run on macOS only.
|
|
246
|
-
|
|
247
|
-
`docs/preview.png` is rendered from `docs/preview.svg` by `scripts/preview-png.sh` (Chrome and the Swift toolchain, macOS). `assets/icon.png` is the icon the manifest names.
|
|
248
|
-
|
|
249
|
-
[CONTRIBUTING.md](CONTRIBUTING.md) has what a change needs, and how a release is cut; [CHANGELOG.md](CHANGELOG.md) lists what each release changed.
|
|
102
|
+
Running from a checkout, the tests, the documents they hold to the code, and releases: [CONTRIBUTING.md](CONTRIBUTING.md). [CHANGELOG.md](CHANGELOG.md) lists what each release changed.
|
|
250
103
|
|
|
251
104
|
## License
|
|
252
105
|
|
package/SECURITY.md
CHANGED
|
@@ -2,31 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
## What this plugin promises
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Over the relay or Tailscale, with an honest but careless agent:
|
|
6
6
|
|
|
7
|
-
- **On its way, a value is sealed.** What you type,
|
|
8
|
-
- **On the daemon, a value is a short-lived file.** On disk it exists in the clear only as a file of mode `0600` in a directory of mode `0700`,
|
|
9
|
-
- **
|
|
10
|
-
- **The daemon names who asks.** A request belongs to the agent
|
|
7
|
+
- **On its way, a value is sealed.** What you type, pick, drop or paste leaves the app only as ciphertext, sealed to a one-time key of the request (X25519, HKDF-SHA256, ChaCha20-Poly1305) and bound to the request's id and to a digest of the keys it declared and whether each is optional. A file travels as base64url inside the same sealed payload. If sealing fails, nothing is sent.
|
|
8
|
+
- **On the daemon, a value is a short-lived file.** On disk it exists in the clear only under `drop/`: as `<data>/drop/si-secret-<requestId>/<KEY>`, a file of mode `0600` in a directory of mode `0700`, or, after a failed write, under a temporary name there. The plugin deletes a set 15 minutes after the write at the latest while the machine is awake, and within a minute of waking when it slept through that; earlier when the agent releases it, at the end of the turn its delivery message starts, and at every start and stop of the plugin. A crash, a stalled disk or a failed removal can keep it longer ([below](#crashes-stops-and-restarts)).
|
|
9
|
+
- **Outputs and metadata.** No tool result, message to the agent, pill, status, RPC answer, log line, error, `requests.json` or `outbox.json` holds a value; the agent is given paths. Plaintext also exists for a while in app and daemon memory (below).
|
|
10
|
+
- **The daemon names who asks.** A request belongs to the agent identity Paseo supplies with the tool call; nothing the call itself says is read. Of the four tools, status, cancel and release answer any other agent, its parent included, as if the request did not exist. On Paseo 0.14.0-beta.1 a local process with access to the daemon can impersonate an agent ([below](#a-hostile-process-that-runs-as-you)); the plugin cannot verify that the named agent made the call.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
While a file of a set exists, any process of your OS user can read it, the agent included. What keeps the value out of the model is the agent's discipline (the skill: never read a `si-secret-` path) and the plugin leaving values out of its outputs.
|
|
13
13
|
|
|
14
14
|
## When it does not hold
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
The plugin flags one thing: a second, different submission to a request whose values were delivered is refused, marked on the pill and reported to the agent. Beyond that it neither prevents nor detects what a process that runs as you does.
|
|
17
17
|
|
|
18
18
|
### What the plugin cannot control
|
|
19
19
|
|
|
20
20
|
| Condition | What happens |
|
|
21
21
|
|---|---|
|
|
22
|
-
| The agent reads a file of the set | The value enters its context. The skill forbids it and the delivery message repeats it
|
|
23
|
-
| The agent feeds the value to a command that prints it | The value reaches the model through that
|
|
24
|
-
| Another process of your user reads the file while it exists | Nothing stops it. The modes
|
|
25
|
-
| The file system copies on write, or a snapshot or a backup runs while the file exists | Deletion is `unlink` and `rmdir
|
|
26
|
-
| A value is held in memory | Byte buffers are wiped
|
|
27
|
-
| You paste into a file row, or pick or drop a file | The plugin reads no clipboard and moves no file
|
|
28
|
-
| The value reaches its destination | Where the agent puts it
|
|
29
|
-
| You answer a
|
|
22
|
+
| The agent reads a file of the set | The value enters its context. The skill forbids it and the delivery message repeats it. A rule in the agent's harness that refuses its file-reading tools on `si-secret-` paths blocks accidental reads through those tools only, not reads through the shell or from the destination |
|
|
23
|
+
| The agent feeds the value to a command that prints it | The value reaches the model through that output: a tool that echoes what it stored, a verbose flag, `set -x`, an argument repeated in an error. The skill lists moves that print nothing |
|
|
24
|
+
| Another process of your user reads the file while it exists | Nothing stops it. The modes keep out other users only, and every agent of yours runs as you |
|
|
25
|
+
| The file system copies on write, or a snapshot or a backup runs while the file exists | Deletion is `unlink` and `rmdir`; the content is not overwritten first, since on APFS, Btrfs or ZFS overwriting guarantees nothing. The blocks stay on the disk until they are reused, and a snapshot or a backup taken meanwhile keeps the file |
|
|
26
|
+
| A value is held in memory | Byte buffers are wiped in the app and on the daemon; the strings made from them cannot be. What you type is a string in the form while it is open, and the opened values are strings on the daemon until the garbage collector reuses their memory |
|
|
27
|
+
| You paste into a file row, or pick or drop a file | The plugin reads no clipboard and moves no file: what you copied stays in your clipboard and its history, and the file stays where it was. While the paste area is open, what you pasted is on the screen |
|
|
28
|
+
| The value reaches its destination | Where the agent puts it is outside the plugin. Whether that place is ignored by git, backed up or readable by others is for the agent and you to check |
|
|
29
|
+
| You answer a harmful request | The form does not assess whether a request is safe. Check the intended task and destination before submitting |
|
|
30
30
|
|
|
31
31
|
### A hostile process that runs as you
|
|
32
32
|
|
|
@@ -34,45 +34,50 @@ An agent with a shell runs as your OS user, controls its workspace, and can read
|
|
|
34
34
|
|
|
35
35
|
| Condition | What happens |
|
|
36
36
|
|---|---|
|
|
37
|
-
| A process
|
|
38
|
-
| Any owner session of the daemon calls the plugin's RPCs
|
|
39
|
-
| A caller of `secure-input.drop.clear` |
|
|
40
|
-
| A process plants `requests.json` or `outbox.json` | Both are read as hostile input: capped, never through a link, and entry by entry against a strict schema
|
|
41
|
-
| A process plants entries or links in `drop/` | The start's sweep removes everything in `drop/`. A link is unlinked as a link and never followed, and removal goes at most 8 levels deep; what is deeper
|
|
42
|
-
| A process swaps a directory for a link in the instant before a removal | Node has no `unlinkat` or `openat`, so every removal goes by path. Before each entry the plugin looks at the entry's directory again
|
|
43
|
-
| The data directory is inside a workspace (`PASEO_HOME` there) | The sets are files in that workspace while they exist, and
|
|
44
|
-
| `bin/`, where
|
|
37
|
+
| A process impersonates an agent | On Paseo 0.14.0-beta.1 a local process with access to the daemon can call the tools as another agent: create a request, and its pill, in that agent's chat, a card that asks you for a secret on behalf of an agent that never asked; and look at, cancel or release that agent's requests. The plugin cannot verify that the named agent made the call; only Paseo can close this. Provide a secret only for a task and destination you recognise |
|
|
38
|
+
| Any owner session of the daemon calls the plugin's RPCs; automated callers can use them too | A handler is not told who is calling, so an RPC call does not prove that you approved the request. Such a caller can read a request's view (its keys, labels and public key; never a value), submit its own values before you do, decline a request, or send three submissions that cannot be opened and so close it (`retry_limit`). If it submits first, the files hold its values; your own submission is then refused, the pill turns red, «Підозріле подання», and the agent is told to have you check what it did with the values and to rotate the secret |
|
|
39
|
+
| A caller of `secure-input.drop.clear` | Deletes every set at once, as «Видалити всі файли секретів зараз» does. Agents lose the files they had not moved yet, and one whose delivery message still waits is told that the user deleted them. The RPC returns counts of released requests and remaining entries |
|
|
40
|
+
| A process plants `requests.json` or `outbox.json` | Both are read as hostile input: capped, never through a link, and entry by entry against a strict schema with no field a value could go into. A planted outbox entry can at most make the plugin send one of its fixed messages again, to the agent whose request it names, once per restart. A planted record that passes the schema is loaded; one that claims to wait or to be delivered is ended by the next start (`expired`, or `released` by `restart`), with a pill of its key names in the chat of the agent it names. Nothing can be opened or written for it: the key never existed in this run |
|
|
41
|
+
| A process plants entries or links in `drop/` | The start's sweep removes everything in `drop/`. A link is unlinked as a link and never followed, and removal goes at most 8 levels deep; what is deeper is left and reported. A `drop/` that is itself a link, or not a directory of your user, fails the start-up; put in its place while the plugin runs, it is refused by every write and every removal, and what was to go stays reported until it can go. Anything at a set's path but an empty directory fails that write (`write_failed`) |
|
|
42
|
+
| A process swaps a directory for a link in the instant before a removal | Node has no `unlinkat` or `openat`, so every removal goes by path. Before each entry the plugin looks at the entry's directory again and goes on only if it is still the directory it read (the same device and inode); `drop/` itself is held to this too. A swap that lands between that look and the call it guards is not caught: an `unlink` then removes a file of that name wherever the link leads, and a directory's removal goes on where the link leads, at most 8 levels deep. A write holds `drop/` when it begins and looks at it again right before the rename that puts the set in place. A process that can win these races can read or delete what they reach by itself |
|
|
43
|
+
| The data directory is inside a workspace (`PASEO_HOME` there) | The sets are files in that workspace while they exist, and `git add -A` there can stage one. The plugin does not check where its data directory lies |
|
|
44
|
+
| `bin/`, where 0.1.0 was installed | It holds what agents created with 0.1.0 run: a stub with no tools, and the shim that starts it. A process of your user can replace them between two starts, as it can the plugin's own code. Each start writes the stub again, and under Node the shim too; under Electron the shim stays as 0.1.0 wrote it |
|
|
45
45
|
|
|
46
46
|
### Crashes, stops and restarts
|
|
47
47
|
|
|
48
48
|
| Condition | What happens |
|
|
49
49
|
|---|---|
|
|
50
|
-
| The plugin or the daemon is killed, or the machine loses power, while a set exists | The set stays in `drop/` until the plugin next starts: while it does not run, nothing deletes the set, not even 15 minutes after the write.
|
|
51
|
-
| The plugin is stopped | Paseo 0.14 gives a stopping plugin 2 seconds before it sends SIGTERM. Within them the plugin wipes the keys of the requests that wait, releases every set as `stop`, saves, and sweeps `drop/`: the releases and the save get at most 1 second, and the sweep after them at most 500 milliseconds, whatever the work queue is still doing
|
|
52
|
-
| The stop comes while the start-up hangs (a disk that stalls) | The stop waits up to 5 seconds for the start-up, longer than the 2 seconds Paseo gives the stop, and then goes on without it. Such a start-up has delivered no set, since every tool call waits for the start-up, so what can be cut short is only the sweep of what an earlier run left, which the next start makes
|
|
53
|
-
| A write fails, and its clean-up cannot remove what it staged | The request is rejected (`write_failed`), and the half-written set stays in `drop/` under its temporary name, `si-secret-<requestId>.<random>.tmp`.
|
|
54
|
-
| A
|
|
55
|
-
| A disk that stalls holds up the plugin's work queue | Every deletion but the stop's sweep waits in that queue, the deadline's included, so for as long as the disk stalls a set can outlive its deadline.
|
|
56
|
-
| The plugin restarts while a request waits for you | The request becomes `expired`, because the key to open it lived in memory only. The agent is told that the restart ended it,
|
|
57
|
-
| The plugin restarts while a set exists | The start's sweep removes it, and the request reads `released` (`restart`). A delivery message that still waits becomes the message that the files went when the plugin restarted; one already sent is not sent again. A set the sweep cannot remove keeps its request `delivered`, and «Секрети на сервері» red
|
|
58
|
-
| A message to the agent is late or lost | A message for a busy agent waits
|
|
59
|
-
| The plugin is stopped while messages or pills wait | No further pill is put on a timeline, and no agent is asked whether it is idle.
|
|
60
|
-
| A pill cannot be put on the agent's timeline | The pill is the only way to the form, so it is tried again once a minute and whenever the daemon next calls the plugin, until it lands, and only once in five minutes while the daemon has left three appends of it unanswered. Until then nobody can answer the request
|
|
50
|
+
| The plugin or the daemon is killed, or the machine loses power, while a set exists | The set stays in `drop/` until the plugin next starts: while it does not run, nothing deletes the set, not even 15 minutes after the write. A start sweeps `drop/` first, once it has made sure the data directory is its own and before anything else that can fail. What the sweep cannot remove is reported, and each such entry is tried again once a minute until it goes; the sweep itself is not repeated, since it would take the sets delivered since. A plugin that never starts again leaves the set where it is |
|
|
51
|
+
| The plugin is stopped | Paseo 0.14 gives a stopping plugin 2 seconds before it sends SIGTERM. Within them the plugin wipes the keys of the requests that wait, releases every set as `stop`, saves, and sweeps `drop/`: the releases and the save get at most 1 second, and the sweep after them at most 500 milliseconds, whatever the work queue is still doing. What the sweep cannot remove in that time stays for the next start. A record whose release the stop could not save reads `restart` at the next start |
|
|
52
|
+
| The stop comes while the start-up hangs (a disk that stalls) | The stop waits up to 5 seconds for the start-up, longer than the 2 seconds Paseo gives the stop, and then goes on without it. Such a start-up has delivered no set, since every tool call waits for the start-up, so what can be cut short is only the sweep of what an earlier run left, which the next start makes |
|
|
53
|
+
| A write fails, and its clean-up cannot remove what it staged | The request is rejected (`write_failed`), and the half-written set stays in `drop/` under its temporary name, `si-secret-<requestId>.<random>.tmp`. «Секрети на сервері» turns red, and the entry is tried again once a minute until it goes; the stop, the next start and «Видалити всі файли секретів зараз» take it too. Nobody is given its path |
|
|
54
|
+
| A removal fails | The request stays `delivered` and «Секрети на сервері» turns red. A delivered set is tried again at its deadline, and after that once a minute; the end of a later delivery turn of its agent tries sooner. What a start or a failed write left is tried again once a minute. «Видалити всі файли секретів зараз» tries again now; so does deleting `drop/` by hand |
|
|
55
|
+
| A disk that stalls holds up the plugin's work queue | Every deletion but the stop's sweep waits in that queue, the deadline's included, so for as long as the disk stalls a set can outlive its deadline. A tool call waits there for its turn for at most 10 seconds and is then refused, `the plugin is busy; retry in a few seconds`; what it asked for is not done later. An operation that has begun is waited for to the end |
|
|
56
|
+
| The plugin restarts while a request waits for you | The request becomes `expired`, because the key to open it lived in memory only. The agent is told that the restart ended it, as soon as a hook runs or the app reconnects |
|
|
57
|
+
| The plugin restarts while a set exists | The start's sweep removes it, and the request reads `released` (`restart`). A delivery message that still waits becomes the message that the files went when the plugin restarted; one already sent is not sent again. A set the sweep cannot remove keeps its request `delivered`, and «Секрети на сервері» red, until it goes; a delivery message that goes out meanwhile gives the paths of the files that are still there |
|
|
58
|
+
| A message to the agent is late or lost | A message for a busy agent waits for the agent to become idle, within the bounds below; a failed or unanswered idle check leaves it waiting. The plugin checks that the agent is idle and then sends, so a turn that starts between the two can be interrupted. Each send is attempted at most once; a message can be lost when the plugin dies before it was saved, or dies or is stopped between taking it out of `outbox.json` and the end of the send; when the send fails or is not answered in time; when it waited past the queue's age or count limit, or the clock was set back while it waited; when the agent is archived; when the plugin no longer has the request it is about (`requests.json` unreadable at a start, or the request evicted from the history); when a stop ran out of its time before the change of state was saved; or when `outbox.json` was replaced by something the plugin did not write. A message about delivered files is not sent at all when the agent released those files first. The agent may then need a nudge from you |
|
|
59
|
+
| The plugin is stopped while messages or pills wait | No further pill is put on a timeline, and no agent is asked whether it is idle. A message that was not sent stays in `outbox.json` for the next start. A change of state whose save was still under way when the stop ran out of its time is saved and announced by nobody: no message for it, and the pill goes on showing the state before it. The form behind the pill shows the true state |
|
|
60
|
+
| A pill cannot be put on the agent's timeline | The pill is the only way to the form, so it is tried again once a minute and whenever the daemon next calls the plugin, until it lands, and only once in five minutes while the daemon has left three appends of it unanswered. Until then nobody can answer the request |
|
|
61
61
|
| The plugin is removed, or never starts again | What the next start would have swept stays in `drop/`: the sets of a run that was killed, and what a failed write left. Nothing else of the plugin's holds a value |
|
|
62
62
|
|
|
63
|
+
The bounds of the message queue:
|
|
64
|
+
|
|
65
|
+
| Bound | Value |
|
|
66
|
+
|---|---|
|
|
67
|
+
| How long a message waits for an idle agent | up to a day; the outbox holds 256 messages, and the oldest go first |
|
|
68
|
+
| A clock set back while a message waits | by more than a minute: the message goes |
|
|
69
|
+
| How long a request is remembered | the last 200 closed requests, or fewer when `requests.json` would exceed 2 MiB; open requests are never evicted |
|
|
70
|
+
| The idle check and the send | the plugin asks once a minute; one call may take 30 seconds, one round 45 seconds, and 1 second once the round's time is used up |
|
|
71
|
+
|
|
63
72
|
### The channel and the versions
|
|
64
73
|
|
|
65
74
|
| Condition | What happens |
|
|
66
75
|
|---|---|
|
|
67
76
|
| A direct LAN connection with a password | The WebSocket is not encrypted. An active attacker can swap the request's key and read what you type. Enter secrets over the relay or Tailscale only |
|
|
68
|
-
| Someone sees the size of what you send | The sealed
|
|
69
|
-
| The app is older than the plugin requires (0.14.0-beta.1) | The plugin runs on the daemon, but the pill, the form and the settings screen do not load, so that device cannot answer requests. `paseo plugin ls` does not show it
|
|
70
|
-
| The reply to your submission is lost, and you press → again with other values | The form first reads the request again, and sends nothing if the request has been answered. That narrows the window
|
|
71
|
-
| Linux | Developed and run on macOS. Linux is declared supported, and the test suite passes on it
|
|
72
|
-
|
|
73
|
-
## Why approval is not a button
|
|
74
|
-
|
|
75
|
-
A Paseo plugin's RPC handlers are not told who is calling, and any process that can open an owner session of the daemon can call them. A plain "approve" RPC would prove nothing: an agent could press it. In this design the act of typing a value nobody else has is the approval, and no RPC returns a typed value.
|
|
77
|
+
| Someone sees the size of what you send | The sealed submission is padded to a multiple of 1 KiB. An observer can still infer a size range, and for a request with one value the approximate length of that value |
|
|
78
|
+
| The app is older than the plugin requires (0.14.0-beta.1) | The plugin runs on the daemon, but the pill, the form and the settings screen do not load, so that device cannot answer requests. `paseo plugin ls` does not show it |
|
|
79
|
+
| The reply to your submission is lost, and you press → again with other values | The form first reads the request again, and sends nothing if the request has been answered. That narrows the window: a first submission still waiting in the plugin can win after that reading, and your second one is then refused and flagged as a second, different submission, though both were yours. With unchanged values the form sends the same sealed data again, which is never flagged |
|
|
80
|
+
| Linux | Developed and run on macOS. Linux is declared supported, and the test suite passes on it; the plugin has not been run on a Linux daemon |
|
|
76
81
|
|
|
77
82
|
## Reporting
|
|
78
83
|
|
package/client/attach.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { PluginClientContext } from "@getpaseo/plugin/client";
|
|
2
|
+
|
|
3
|
+
/** How long after a failure the observation is asked for again; each failure in a row doubles it, up to the cap. */
|
|
4
|
+
export const RETRY_MS = 5_000;
|
|
5
|
+
export const RETRY_CAP_MS = 60_000;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Calls `ping` now and after every reconnect.
|
|
9
|
+
*
|
|
10
|
+
* The daemon half gets its API handle only inside a hook or an RPC, so after a daemon restart it can send nothing until
|
|
11
|
+
* something calls it. Paseo before 0.15 set the plugin up again on a reconnect, and setting up made that call. From 0.15
|
|
12
|
+
* an unchanged plugin stays installed and is not set up again, and the fresh snapshot of an owned observation is what
|
|
13
|
+
* marks the reconnect. One entry is enough for that: the agents themselves are of no interest here. Paseo gives up an
|
|
14
|
+
* observation whose request fails after a reconnect, so a failure asks for a new one. Returns the cleanup.
|
|
15
|
+
*/
|
|
16
|
+
export function keepDaemonHalfAttached(paseo: PluginClientContext["paseo"], ping: () => void): () => void {
|
|
17
|
+
const lifetime = new AbortController();
|
|
18
|
+
let retry: ReturnType<typeof setTimeout> | undefined;
|
|
19
|
+
let failures = 0;
|
|
20
|
+
|
|
21
|
+
function observeAgain(): void {
|
|
22
|
+
if (lifetime.signal.aborted) return;
|
|
23
|
+
if (retry !== undefined) clearTimeout(retry);
|
|
24
|
+
retry = setTimeout(observe, Math.min(RETRY_CAP_MS, RETRY_MS * 2 ** failures));
|
|
25
|
+
failures += 1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function observe(): void {
|
|
29
|
+
if (lifetime.signal.aborted) return;
|
|
30
|
+
void paseo.agents
|
|
31
|
+
.list({ subscribe: {}, page: { limit: 1 }, signal: lifetime.signal })
|
|
32
|
+
.then(({ subscription }) => {
|
|
33
|
+
subscription.subscribe({
|
|
34
|
+
snapshot() {
|
|
35
|
+
if (lifetime.signal.aborted) return;
|
|
36
|
+
failures = 0;
|
|
37
|
+
ping();
|
|
38
|
+
},
|
|
39
|
+
update() {},
|
|
40
|
+
error: observeAgain,
|
|
41
|
+
});
|
|
42
|
+
return undefined;
|
|
43
|
+
})
|
|
44
|
+
.catch(observeAgain);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
ping();
|
|
48
|
+
observe();
|
|
49
|
+
return () => {
|
|
50
|
+
lifetime.abort();
|
|
51
|
+
if (retry !== undefined) clearTimeout(retry);
|
|
52
|
+
};
|
|
53
|
+
}
|
package/client/settings.tsx
CHANGED
|
@@ -107,9 +107,9 @@ function Status({ data, failed, colors }: { data: Diagnostics | undefined; faile
|
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
109
|
* Deletes every set of files at once, and reads the state again. What the plugin could not remove shows in the rows that
|
|
110
|
-
* are read.
|
|
111
|
-
* fixed line under the button, `DELETE_FAILED`, until a press
|
|
112
|
-
* screen's to show.
|
|
110
|
+
* are read. When the clear call fails (the plugin is stopping, `drop/` could not be swept), earlier removals may have
|
|
111
|
+
* succeeded; one fixed line under the button, `DELETE_FAILED`, says that it failed, until a press succeeds: the words of
|
|
112
|
+
* the failure are not the screen's to show.
|
|
113
113
|
*/
|
|
114
114
|
function DeleteAll({ refresh }: { refresh(): Promise<unknown> }) {
|
|
115
115
|
const clear = useRpc(clearDrop);
|
package/index.client.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PluginClientContext } from "@getpaseo/plugin/client";
|
|
2
|
+
import { keepDaemonHalfAttached } from "./client/attach";
|
|
2
3
|
import { RequestCard } from "./client/card";
|
|
3
4
|
import { SettingsScreen } from "./client/settings";
|
|
4
5
|
import { CARD_KIND, CARD_VERSION, CardDataSchema } from "./shared/card";
|
|
@@ -14,15 +15,18 @@ export default function contribute(client: PluginClientContext) {
|
|
|
14
15
|
const removeSettings = client.addSettingsScreen({ id: "main", title: "Secure input", icon: "ShieldCheck", Component: SettingsScreen });
|
|
15
16
|
|
|
16
17
|
// The daemon half only receives its API handle inside a hook or an RPC. One
|
|
17
|
-
// harmless call
|
|
18
|
+
// harmless call lets it publish cards that were waiting.
|
|
18
19
|
// A call that throws on the spot must not fail the whole contribution.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
const stopAttaching = keepDaemonHalfAttached(client.paseo, () => {
|
|
21
|
+
try {
|
|
22
|
+
void client.rpc(readDiagnostics, {}).catch(() => undefined);
|
|
23
|
+
} catch {
|
|
24
|
+
// nothing to do: the cards are published the next time the plugin is asked for anything
|
|
25
|
+
}
|
|
26
|
+
});
|
|
24
27
|
|
|
25
28
|
return () => {
|
|
29
|
+
stopAttaching();
|
|
26
30
|
removeRenderer();
|
|
27
31
|
removeSettings();
|
|
28
32
|
};
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paseo-plugin-secure-input",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "paseo-plugin-secure-input",
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.2",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@noble/ciphers": "2.4.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paseo-plugin-secure-input",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Secure secret input for Paseo agents: a typed value or a whole file travels sealed to the daemon and lands in a short-lived file; the agent gets its path, never the value",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"typecheck": "tsc -p tsconfig.server.json && tsc -p tsconfig.client.json && tsc -p tsconfig.client-tests.json",
|
|
31
31
|
"test": "vitest run",
|
|
32
32
|
"check": "npm run typecheck && npm test",
|
|
33
|
+
"test:paseo": "node scripts/paseo-compat.mjs",
|
|
33
34
|
"prepack": "node scripts/shrinkwrap.mjs write",
|
|
34
35
|
"postpack": "node scripts/shrinkwrap.mjs remove"
|
|
35
36
|
},
|
|
@@ -43,16 +44,17 @@
|
|
|
43
44
|
"@getpaseo/plugin": "0.14.0-beta.1",
|
|
44
45
|
"@getpaseo/protocol": "0.14.0-beta.1",
|
|
45
46
|
"@getpaseo/relay": "0.14.0-beta.1",
|
|
46
|
-
"@modelcontextprotocol/sdk": "1.32.
|
|
47
|
-
"@tanstack/react-query": "^5.
|
|
47
|
+
"@modelcontextprotocol/sdk": "1.32.2",
|
|
48
|
+
"@tanstack/react-query": "^5.105.0",
|
|
48
49
|
"@types/node": "^22.0.0",
|
|
49
50
|
"@types/react": "~19.2.0",
|
|
50
51
|
"react": "19.1.0",
|
|
51
52
|
"react-native": "0.81.5",
|
|
52
53
|
"semver": "7.8.5",
|
|
53
|
-
"typescript": "^
|
|
54
|
-
"
|
|
55
|
-
"
|
|
54
|
+
"typescript": "^7.0.2",
|
|
55
|
+
"typescript-5": "npm:typescript@5.9.3",
|
|
56
|
+
"vitest": "^5.0.5",
|
|
57
|
+
"zod": "^4.6.7"
|
|
56
58
|
},
|
|
57
59
|
"files": [
|
|
58
60
|
"paseo-plugin.json",
|
package/server/paseo/tools.ts
CHANGED
|
@@ -71,10 +71,8 @@ function filesOf(record: RequestRecord, drop: string): { files: Record<string, s
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
* Who is asking: the agent
|
|
75
|
-
* environment, a marker).
|
|
76
|
-
* which on Paseo 0.14.0-beta.1 no credential binds (SECURITY.md): it keeps apart the agents that use the connection
|
|
77
|
-
* Paseo gave them, and not a process that reaches the daemon's MCP endpoint for agents and calls it as another agent.
|
|
74
|
+
* Who is asking: the agent identity Paseo supplies with the call, and nothing the call itself says (an argument, the
|
|
75
|
+
* agent's environment, a marker). Cross-agent impersonation is a host limitation; see SECURITY.md.
|
|
78
76
|
*/
|
|
79
77
|
export function identityOf(agent: ToolAgent): AgentIdentity {
|
|
80
78
|
return { agentId: agent.id, cwd: agent.cwd, title: agent.title };
|
package/shared/limits.ts
CHANGED
|
@@ -26,7 +26,7 @@ export const LIMITS = {
|
|
|
26
26
|
export const DROP_TTL_MS = 900_000;
|
|
27
27
|
|
|
28
28
|
/** The version of the plugin, as the settings screen says it. `tests/mirrored-constants.test.ts` holds it equal to the version in `package.json`. */
|
|
29
|
-
export const PLUGIN_VERSION = "0.2.
|
|
29
|
+
export const PLUGIN_VERSION = "0.2.2";
|
|
30
30
|
|
|
31
31
|
/** The release of Paseo the plugin needs, as the settings screen says it. The same test holds it to the requirement in `paseo-plugin.json`. */
|
|
32
32
|
export const PASEO_SINCE = "Paseo 0.14+";
|
package/shared/seal.ts
CHANGED
|
@@ -208,7 +208,7 @@ export function payloadSize(values: readonly PayloadEntry[]): number {
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
/**
|
|
211
|
-
* Canonical JSON padded to a block multiple,
|
|
211
|
+
* Canonical JSON padded to a block multiple, to reduce the precision of length information in message traces.
|
|
212
212
|
*
|
|
213
213
|
* A payload larger than `MAX_PAYLOAD_BYTES` is refused before anything is built: it would not fit the RPC that carries
|
|
214
214
|
* it. Otherwise the payload is built once to be measured and, unless it fills its blocks already, once more with the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: secure-input
|
|
3
|
-
description: Use when a task needs a secret from the human
|
|
3
|
+
description: Use when a task needs a secret from the human (a password, API key, token, private key, credentials file or connection string with credentials), or when you are about to tell the user to paste, export or type such a value themselves. Opens a secure form in the Paseo app; each value or file arrives as a short-lived file whose path you get, and you move it where it belongs without ever reading it.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Secure input
|
|
@@ -19,23 +19,23 @@ When you need a secret, make a request instead of asking in chat. The user fills
|
|
|
19
19
|
|
|
20
20
|
## Asking
|
|
21
21
|
|
|
22
|
-
The tool is `request_secret
|
|
22
|
+
The tool is `request_secret`; its full name depends on your harness:
|
|
23
23
|
|
|
24
24
|
- Claude Code: `mcp__paseo__request_secret`, deferred. Load it with `ToolSearch` (`select:mcp__paseo__request_secret`) before the first call; the other three load the same way.
|
|
25
25
|
- Codex: a nested tool of `exec`. Find it in `ALL_TOOLS` and call `tools.mcp__paseo__request_secret(…)`.
|
|
26
26
|
- Elsewhere, look for a tool whose name ends in `request_secret`.
|
|
27
27
|
|
|
28
|
-
If there is none,
|
|
28
|
+
If there is none, tell the user and stop. Your harness may ask the user to allow each call of these tools; that is expected.
|
|
29
29
|
|
|
30
30
|
The input is `{ reason, fields }`, each field `{ key, label?, optional?, kind?, format? }`:
|
|
31
31
|
|
|
32
|
-
- `reason`: one sentence, at most 300 characters.
|
|
33
|
-
- `label`: at most 80 characters. A screen reader reads it with its field
|
|
32
|
+
- `reason`: one sentence, at most 300 characters. Kept with the request and shown nowhere.
|
|
33
|
+
- `label`: at most 80 characters. A screen reader reads it with its field; it is not shown.
|
|
34
34
|
- `key`: `[A-Za-z_][A-Za-z0-9_]*`, at most 128 characters, not `__proto__`, `constructor` or `prototype`. It becomes the file's name, so keys that differ only in letter case are refused.
|
|
35
35
|
- `kind`: `"text"` (the default) for one line, such as a token or a password, at most 64 KiB; `"file"` for a whole file, such as a JSON key, a PEM, a kubeconfig or a `.p12`, at most 128 KiB, binary included.
|
|
36
36
|
- `format`: for a file only. `"json"` or `"pem"` is checked in the app; `"any"` (the default) is not.
|
|
37
37
|
- `optional`: the user may leave it empty, and it then gets no file.
|
|
38
|
-
- At most 32 fields, or none. The user can
|
|
38
|
+
- At most 32 fields, or none. The user can add keys and files of their own; declared and added rows together are capped at the same 32.
|
|
39
39
|
|
|
40
40
|
One key:
|
|
41
41
|
|
|
@@ -69,7 +69,7 @@ No keys, when you do not know their names. The user adds each key and its value:
|
|
|
69
69
|
|
|
70
70
|
## Moving a value blind
|
|
71
71
|
|
|
72
|
-
Each path in the delivery message is already quoted for a shell: use it as it stands (`PATH` below). A path from `request_status` (`files`) is not:
|
|
72
|
+
Each path in the delivery message is already quoted for a shell: use it as it stands (`PATH` below). A path from `request_status` (`files`) is not: quote it yourself, in single quotes, each `'` in it written as `'\''`. Run every move before your turn ends.
|
|
73
73
|
|
|
74
74
|
**Into `.env`**, as one line `KEY=value`, into a file that git does not track and only your user can read, with nothing printed:
|
|
75
75
|
|
|
@@ -79,15 +79,17 @@ Each path in the delivery message is already quoted for a shell: use it as it st
|
|
|
79
79
|
{ printf '\nSTRIPE_KEY='; cat; printf '\n'; } < PATH >> .env.local
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
The first line goes on only outside a git repository, or when git ignores the file
|
|
82
|
+
The first line goes on only outside a git repository, or when git ignores the file; when it stops there, nothing is written: ask the user where the value may go, and never add the file to git. The second line makes the file private, whether it is new or was there already. The leading newline starts a line of its own even when the file does not end with one. The value goes in as typed, so a reader that treats `#`, quotes or spaces specially may read it differently. To learn whether the key is already there, count it by name (`grep -c '^STRIPE_KEY=' .env.local`), never by any part of a value; to replace it, ask the user. A value of several lines (a PEM, a JSON key) has no safe form on one `.env` line: ask for it as a file field and give it a file of its own.
|
|
83
83
|
|
|
84
|
-
**A whole file
|
|
84
|
+
**A whole file**, into a destination you may replace:
|
|
85
85
|
|
|
86
86
|
```sh
|
|
87
|
-
|
|
87
|
+
{ ! git rev-parse --is-inside-work-tree >/dev/null 2>&1 || git check-ignore -q config/gcp-sa.json; } &&
|
|
88
|
+
( umask 077; touch config/gcp-sa.json ) && chmod 600 config/gcp-sa.json &&
|
|
89
|
+
cp PATH config/gcp-sa.json
|
|
88
90
|
```
|
|
89
91
|
|
|
90
|
-
|
|
92
|
+
As for `.env`: the first line goes on only outside a git repository or when git ignores the destination, and the second makes the destination private before any byte is copied, whether it is new or was there already. `cp` then replaces its content. Never stage it.
|
|
91
93
|
|
|
92
94
|
**On stdin**, to a tool that reads its secret there:
|
|
93
95
|
|
|
@@ -125,13 +127,13 @@ ssh HOST 'umask 077; mkdir -p ~/.config/app && touch ~/.config/app/token && chmo
|
|
|
125
127
|
| `… deleted when the plugin restarted, …` | As above: the plugin restarted | The same |
|
|
126
128
|
| `… deleted when the plugin stopped, …` | As above: the plugin stopped | The same |
|
|
127
129
|
| `… deleted by the user, …` | As above: the user deleted every file in the plugin's settings | Ask the user before you ask again |
|
|
128
|
-
| `… was rejected
|
|
130
|
+
| `… was rejected` | No paths were delivered. A failed write can leave temporary files in the plugin's data directory, which the plugin keeps trying to remove and the settings screen reports | If it ends `Fix the cause and make a new request.`, do that. If it ends `Tell the user what happened. Do not make a new request yourself; …`, tell the user and stop |
|
|
129
131
|
| `…: the user declined to provide the values.` | The user said no | Ask how they want to proceed; do not rephrase and retry |
|
|
130
132
|
| `… expired before the user answered.` | Nobody answered in 8 hours | Ask again if the values are still needed |
|
|
131
133
|
| `… expired when the plugin restarted. Nothing was delivered.` | The plugin restarted before the user submitted | Ask again if the values are still needed |
|
|
132
134
|
| `Warning for request …: a second, different submission arrived after the values were delivered.` | Someone may have submitted before the user: the files may not have held what the user typed | Tell the user what you did with the values, and that the secret should be rotated |
|
|
133
135
|
|
|
134
|
-
`request_status` gives `state`, `keys`, `written`, `tamper` and `errorCode`, and while the files exist, `files` (key → path) and `deleteBy`. Never a value. If it says `delivered`, move the files at those paths as you would from the message, each quoted for the shell first
|
|
136
|
+
`request_status` gives `state`, `keys`, `written`, `tamper` and `errorCode`, and while the files exist, `files` (key → path) and `deleteBy`. Never a value. If it says `delivered`, move the files at those paths as you would from the message, each quoted for the shell first. If it says `pending`, the form is still waiting: the user has not submitted, or the form refused what they sent and shows why. Either way the pill in this chat opens it; do not cancel and ask again, or the user types everything twice.
|
|
135
137
|
|
|
136
138
|
Nothing comes when the files go the ordinary way: when you delete them or call `release_secret`, or at the end of your turn. A request you cancel ends without a message.
|
|
137
139
|
|