@palladin/cli 0.0.0-bootstrap → 0.0.10
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 +499 -0
- package/SBOM.cdx.json +8990 -0
- package/SECURITY.md +32 -0
- package/dist/bin/palladin.d.ts +3 -0
- package/dist/bin/palladin.d.ts.map +1 -0
- package/dist/bin/palladin.js +6 -0
- package/dist/bin/palladin.js.map +1 -0
- package/dist/form-map.d.ts +35 -0
- package/dist/form-map.js +66 -0
- package/dist/inject-contract.d.ts +112 -0
- package/dist/inject-contract.js +133 -0
- package/dist/runtime/native-dispatch.d.ts +29 -0
- package/dist/runtime/native-dispatch.d.ts.map +1 -0
- package/dist/runtime/native-dispatch.js +425 -0
- package/dist/runtime/native-dispatch.js.map +1 -0
- package/dist/runtime/version-policy-build.d.ts +4 -0
- package/dist/runtime/version-policy-build.d.ts.map +1 -0
- package/dist/runtime/version-policy-build.js +5 -0
- package/dist/runtime/version-policy-build.js.map +1 -0
- package/dist/runtime/version-policy.d.ts +41 -0
- package/dist/runtime/version-policy.d.ts.map +1 -0
- package/dist/runtime/version-policy.js +230 -0
- package/dist/runtime/version-policy.js.map +1 -0
- package/dist/runtime/windows-runtime-cache.d.ts +32 -0
- package/dist/runtime/windows-runtime-cache.d.ts.map +1 -0
- package/dist/runtime/windows-runtime-cache.js +687 -0
- package/dist/runtime/windows-runtime-cache.js.map +1 -0
- package/package.json +41 -3
package/README.md
ADDED
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
# Palladin Agent — CLI and MCP server
|
|
2
|
+
|
|
3
|
+
Connect AI agents to Palladin-managed credentials with explicit access grants and local credential handling. Palladin is a password manager for people and their AI agents.
|
|
4
|
+
|
|
5
|
+
The `@palladin/cli` package provides the `palladin` command and the local MCP server through `palladin mcp serve`. Both use the same native runtime and npm installation.
|
|
6
|
+
|
|
7
|
+
[Website and waitlist](https://palladin.io) · [MCP configuration](#mcp-configuration) · [Credential delivery methods](#credential-delivery-methods) · [Security reporting](SECURITY.md)
|
|
8
|
+
|
|
9
|
+
> [!WARNING]
|
|
10
|
+
> Palladin Agent is pre-production software. The first installable release is `@palladin/cli@0.0.9` for macOS Apple Silicon and Linux; first-release adversarial and physical lifecycle QA remains pending. Do not use development builds with production credentials.
|
|
11
|
+
|
|
12
|
+
The signed and notarized macOS ARM runtime and four Linux runtime packages are
|
|
13
|
+
published alongside the CLI. Windows and macOS Intel remain outside this release.
|
|
14
|
+
|
|
15
|
+
## How agents use credentials
|
|
16
|
+
|
|
17
|
+
The approving user chooses which delivery methods a grant allows. Each method has a different output boundary:
|
|
18
|
+
|
|
19
|
+
| Method | What it does | Credential exposure |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `get` | Returns an approved credential value. | The caller receives plaintext; an MCP result may enter the model context or transcript. |
|
|
22
|
+
| `exec` | Uses approved fields in a child process. | The child receives the values; MCP withholds child stdout and stderr from the model. |
|
|
23
|
+
| `inject` | Sends approved fields to the authenticated browser integration. | The target page receives the values; the tool returns a value-free outcome to the model. |
|
|
24
|
+
|
|
25
|
+
Prefer `exec` or `inject` when an agent needs to use a credential without receiving its value. Browser injection is currently implemented for macOS Google Chrome; installed-browser acceptance remains pending. See [credential delivery methods](#credential-delivery-methods) and [browser providers](#browser-providers) for the complete boundaries and limitations.
|
|
26
|
+
|
|
27
|
+
## Security boundary
|
|
28
|
+
|
|
29
|
+
The npm package is a small Node.js dispatcher. It never reads, receives, or stores an API key or an Agent private key. On macOS it directly starts the signed executable from the exact platform npm package. The first complete `0.0.9` release builds and publishes only the Apple Silicon (ARM64) package; Intel support remains deferred. On Windows it verifies the exact Authenticode-signed `palladin-client.exe` against signed release policy, copies only that public executable into a version-and-hash-specific per-user cache, opens and re-verifies the cached file under a non-write/non-delete handle, and keeps that handle until the child exits. The child is started without a shell. This avoids locking `node_modules` while an MCP session remains active. The client activates the fixed `palladin-runtime-companion.exe` AppContainer alias and the companion talks to the packaged LocalService broker. On Linux the dispatcher reads only the `PT_INTERP` header of its own Node executable and selects the exact x64 or arm64 glibc or musl package; unknown libc loaders fail before package resolution. There is no TypeScript credential implementation, `PATH`, runtime download, cross-libc, or plaintext fallback.
|
|
30
|
+
|
|
31
|
+
The native runtime keeps these concepts separate:
|
|
32
|
+
|
|
33
|
+
- an API key belongs to the organization and may be shared by multiple Agents;
|
|
34
|
+
- every Agent has its own `agentId`, X25519 private key, and Ed25519 private key;
|
|
35
|
+
- public profile files contain only the API host, opaque secret references, Agent ID, public keys, and integrity commitments/signatures.
|
|
36
|
+
|
|
37
|
+
A small trust state in OS secure storage commits the complete public registry. Each profile config is committed by the registry and signed by that Agent's Ed25519 identity. The runtime verifies this chain before reading any Agent private key or organization API key. Public recovery metadata cannot authorize a secret deletion unless its digest is pinned by an in-progress secure-store transition.
|
|
38
|
+
|
|
39
|
+
The macOS Hardened build uses a provisioned Data Protection Keychain access group. Items are non-synchronizable and `WhenUnlockedThisDeviceOnly`; access to the shared organization credential requires user presence. Homebrew Node, an unsigned clone, and a differently signed fork do not have the entitlement. An unsigned development binary fails closed and does not fall back to Login Keychain, a file, or an environment variable.
|
|
40
|
+
|
|
41
|
+
The Windows Hardened tier is under development and is not part of the first public release. It requires a separately signed system bootstrapper; the npm package never performs privileged installation. A source build using Windows Credential Manager outside the broker boundary reports `Convenience`, never `Hardened`.
|
|
42
|
+
|
|
43
|
+
The [Code signing policy](CODE_SIGNING_POLICY.md) describes the proposed SignPath Foundation route for a later Windows release. No Windows package is currently released or signed by the Foundation.
|
|
44
|
+
|
|
45
|
+
Linux Secret Service is always Convenience because it cannot distinguish two processes under the same UID. The first release installs through npm alone and requires a compatible Secret Service for secret operations. The separate Linux Hardened DEB/RPM broker is under development and is not distributed in `0.0.9`. See [the Linux runbook](packaging/linux/README.md).
|
|
46
|
+
|
|
47
|
+
For `0.0.9`, the product owner directed publication before the [first-release adversarial matrix](security/adversarial/first-release-manifest.json) and [physical lifecycle workflow](.github/workflows/first-release-lifecycle.yml). These checks are pending and are not claimed as passed. Publication still requires signed and notarized macOS, exact native and npm artifact checks, KMS-signed policy, provenance, CI, and clean registry smoke tests. Physical lifecycle QA after publication covers installation, Agent enrollment, MCP use, concurrent use, repair, reinstall, purge, and uninstall; any fixes require a new version. Upgrade, downgrade, and forward rollback require a prior functional release and remain in the [later-version lifecycle gate](.github/workflows/platform-lifecycle.yml).
|
|
48
|
+
|
|
49
|
+
| Linux target | npm Convenience | Hardened |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| glibc x64/arm64 | Supported when a compatible Secret Service is available | Not published in `0.0.9` |
|
|
52
|
+
| musl x64/arm64, including Alpine 3.22 | Supported when a compatible Secret Service is available | Not published in `0.0.9` |
|
|
53
|
+
|
|
54
|
+
## Installation
|
|
55
|
+
|
|
56
|
+
`@palladin/cli@0.0.9` is the first public, installable CLI release. Its five platform packages and the CLI passed registry and public-install smoke tests. Earlier platform-only candidate versions remain unchanged, but should not be installed as a complete CLI.
|
|
57
|
+
|
|
58
|
+
Install the current release:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npm install --global @palladin/cli
|
|
62
|
+
palladin doctor
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Windows runtime packages are not part of `0.0.9`; the CLI cannot run there yet.
|
|
66
|
+
|
|
67
|
+
On Linux, npm alone installs the Convenience tier. It does not need administrator access or install a system service. The runtime fails closed if a compatible Secret Service is unavailable; another process running under the same user ID remains inside the trust boundary. The separate Hardened broker requires administrator installation and is deferred beyond `0.0.9`.
|
|
68
|
+
|
|
69
|
+
No package uses `preinstall`, `install`, `postinstall`, `preprepare`, `prepare`, or `postprepare`. npm installs the matching prebuilt platform package; it does not download or compile a binary during installation.
|
|
70
|
+
|
|
71
|
+
### npm installation policy
|
|
72
|
+
|
|
73
|
+
- A global install is the recommended stable CLI setup: `npm install --global @palladin/cli@<exact-version>`.
|
|
74
|
+
- A project-local exact dependency is supported; invoke it with `npm exec -- palladin doctor` or the project script runner.
|
|
75
|
+
- `npx` is supported only with an explicit immutable version, for example `npx --yes @palladin/cli@<exact-version> -- doctor`. Do not use an unpinned tag for a credential-handling tool.
|
|
76
|
+
- `--omit=optional` is unsupported because the native runtime is an optional platform dependency. Offline installs require the launcher and its matching platform tarball to exist in the configured npm cache or proxy.
|
|
77
|
+
|
|
78
|
+
All three modes run the same script-free launcher and exact platform package. They do not change where native public state or OS-protected secrets live.
|
|
79
|
+
|
|
80
|
+
An active MCP process keeps the native version it started with. Updating npm changes subsequent launches. Every npm launch verifies the immutable Ed25519-signed release manifest bundled with the CLI, including the exact package, version, source commit, client hash and worker hash. The native process independently verifies the actual worker image before opening identity. Linux measures `/proc/self/exe`; macOS also requires the exact Developer ID, identifier and Data Protection Keychain entitlements. Direct macOS launches rely on that independently enforced Apple signature and provisioning boundary. Windows additionally verifies Authenticode and uses its verified runtime cache.
|
|
81
|
+
|
|
82
|
+
The manifest has no expiry, remote allowlist, minimum-version floor or renewal requirement. CLI startup never fetches a release policy. A correctly signed installed release continues to work when the release infrastructure is unavailable. We cannot remotely disable an already installed vulnerable release; security advisories and an explicit npm update are the recovery path. Linux Convenience does not protect against a same-user attacker replacing the launcher or removing its own checks. Native Hardened storage boundaries remain independently enforced. Linux Hardened packages, when released, must include the signed manifest at the root-owned `/usr/lib/palladin/runtime/release-signature.json`; the broker verifies its worker through an open descriptor and forwards the verified envelope to that same worker.
|
|
83
|
+
|
|
84
|
+
Node.js 20.5 or newer and npm 9.7.1 or newer are required. Older npm versions do not reliably enforce the Linux `libc` package filter and are unsupported because they may install both glibc and musl optional packages. npm 9.7.0 is excluded because that release shipped an invalid executable manifest.
|
|
85
|
+
|
|
86
|
+
For source development, run the Rust CLI directly:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
cd runtime
|
|
90
|
+
cargo run -p palladin-cli -- doctor
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
On macOS, use the repository development launcher for commands that open local
|
|
94
|
+
Agent state. Its one-time offline bootstrap creates a local-only code-signing
|
|
95
|
+
identity; macOS may request approval for that trust setting once. The first build
|
|
96
|
+
also installs an owner-only helper with a stable binary hash. Changing debug
|
|
97
|
+
runtimes use that unchanged helper for Login Keychain access because current
|
|
98
|
+
macOS versions do not track a non-Apple signer by its stable Designated
|
|
99
|
+
Requirement. Every later run verifies both signatures before it starts:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
./packaging/macos/scripts/development-runtime.sh run -- doctor
|
|
103
|
+
./packaging/macos/scripts/development-runtime.sh install-launcher ~/.local/bin/palladin
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
An existing source installation needs one explicit authorization migration after
|
|
107
|
+
the first helper build. macOS can show one dialog per existing Palladin item;
|
|
108
|
+
approve each one-time read. The stable helper copies each value only in memory
|
|
109
|
+
to its versioned Keychain service, and a separate noninteractive process verifies
|
|
110
|
+
the migrated copy:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
./packaging/macos/scripts/development-runtime.sh migrate-keychain-access
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Pass `--force` to `install-launcher` only after reviewing an existing launcher.
|
|
117
|
+
The identity remains Convenience-tier and is deliberately rejected by the
|
|
118
|
+
Developer ID release/notarization path. See [the macOS packaging runbook](packaging/macos/README.md).
|
|
119
|
+
|
|
120
|
+
The npm dispatcher is not a fallback development runtime. It intentionally fails if its signed platform package is absent.
|
|
121
|
+
|
|
122
|
+
### macOS Keychain prompt
|
|
123
|
+
|
|
124
|
+
If macOS says that `node` wants to access confidential information in Keychain, stop the process. A legacy development build is running. A supported package invokes the signed `PalladinRuntime.app`; Node itself must never request Keychain access. Run `palladin doctor` from an exact-version installation and verify the reported runtime before connecting an Agent.
|
|
125
|
+
|
|
126
|
+
## Connect an Agent
|
|
127
|
+
|
|
128
|
+
Create a local Agent identity:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
palladin init
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Release builds are pinned to the exact Palladin production and staging API origins. Connect using the organization API key from a masked prompt:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
palladin connect --host https://api.palladin.io
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Literal HTTP loopback origins are available only in an explicitly compiled source-development build:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
./packaging/macos/scripts/development-runtime.sh run --local-development -- connect --host http://127.0.0.1:5000
|
|
144
|
+
# Or, after install-launcher on macOS:
|
|
145
|
+
palladin --local-development connect --host http://127.0.0.1:5000
|
|
146
|
+
|
|
147
|
+
# On other development platforms:
|
|
148
|
+
cd runtime
|
|
149
|
+
cargo run -p palladin-cli --features local-development -- connect --host http://127.0.0.1:5000
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Automation must pass the key through protected standard input:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
secret-provider | palladin --id build connect --api-key-stdin --host https://api.palladin.io
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
API keys in argv or environment variables are rejected. Connecting a second profile with the same organization API key reuses one organization credential while preserving distinct Agent keypairs.
|
|
159
|
+
|
|
160
|
+
## Commands
|
|
161
|
+
|
|
162
|
+
| Command | Description |
|
|
163
|
+
|---|---|
|
|
164
|
+
| `palladin init` | Create the default local Agent identity. |
|
|
165
|
+
| `palladin connect` | Connect using a masked organization API-key prompt. |
|
|
166
|
+
| `palladin status` | Show the selected Agent registration state. |
|
|
167
|
+
| `palladin doctor` | Report platform, storage boundary, and unsafe environment state without opening identity. |
|
|
168
|
+
| `palladin agents list` | List local Agent profile aliases. |
|
|
169
|
+
| `palladin agents create <name>` | Create another local Agent identity. |
|
|
170
|
+
| `palladin agents rename <old> <new>` | Rename an alias without moving secret slots. |
|
|
171
|
+
| `palladin agents delete <name>` | Delete an identity; retain a shared organization credential while another Agent references it. |
|
|
172
|
+
| `palladin --id <name> disconnect --purge --confirm` | Explicitly remove one Agent identity and retain its shared organization credential while another Agent references it. |
|
|
173
|
+
| `palladin search <query>` | Search metadata visible to the Agent. |
|
|
174
|
+
| `palladin get <vaultId> <entryId>` | Intentionally return a granted credential to the operator. |
|
|
175
|
+
| `palladin exec <vaultId> <entryId> -- <program>` | Run an allowlisted program with delivered values in a sanitized child environment. |
|
|
176
|
+
| `palladin inject <vaultId> <entryId> --provider extension --target-tab-id <id> --page-url <URL> --form-json <JSON>` | Use the code-enabled authenticated Chrome extension route on macOS and bind a framework-prepared operation to one exact WebExtensions tab. Other providers and platforms fail closed before profile, grant, or credential access. Release acceptance remains gated on the signed/notarized package and real Chrome E2E. |
|
|
177
|
+
| `palladin mcp serve` | Serve Palladin tools over MCP stdio. |
|
|
178
|
+
| `palladin security upgrade` | Explicitly migrate pre-production schema v2 state and secret slots to integrity-bound schema v3. |
|
|
179
|
+
| `palladin security legacy-status` | Inspect legacy TypeScript state without opening config or private-key contents. |
|
|
180
|
+
| `palladin security legacy-cutover --confirm-pre-production-reset` | In a dev build, archive legacy TypeScript profiles and generate fresh native X25519/Ed25519 identities. |
|
|
181
|
+
| `palladin security legacy-cleanup <cutoverId> --confirm` | In a dev build, delete the archived TypeScript files and exact legacy OS credential entries after every fresh Agent is enrolled. |
|
|
182
|
+
| `palladin purge --confirm` | Explicitly remove native profiles and their known secret slots in standalone tiers; Linux Hardened requires the root-owned administrative purge. |
|
|
183
|
+
|
|
184
|
+
## Pre-production TypeScript cutover
|
|
185
|
+
|
|
186
|
+
Legacy TypeScript builds stored an organization API key in plaintext `config.json` and could store exportable Agent keys in Login Keychain, Credential Manager, Secret Service, environment variables, or `0600` files. Treat every identity and organization key used by those builds as potentially exposed.
|
|
187
|
+
|
|
188
|
+
The native cutover does not import any old private key, API key, `agentId`, host, grant, or config value. It reads only bounded registry metadata and filesystem metadata, atomically archives `.palladin` or the earlier `.claw-vault` root, and creates a fresh X25519/Ed25519 identity for every validated profile alias. Unknown files, links, unsafe permissions, ambiguous roots, malformed registries, and alias collisions fail before cleanup.
|
|
189
|
+
|
|
190
|
+
This workflow is intentionally available only in pre-production/dev builds:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
palladin doctor
|
|
194
|
+
palladin security legacy-status
|
|
195
|
+
palladin security legacy-cutover --confirm-pre-production-reset
|
|
196
|
+
|
|
197
|
+
# Create one new organization API key in the existing Palladin panel, then repeat for every profile.
|
|
198
|
+
new-key-provider | palladin --id <profile> connect --api-key-stdin --host https://api.palladin.io
|
|
199
|
+
|
|
200
|
+
# After every fresh Agent is approved, use the exact ID printed by legacy-cutover.
|
|
201
|
+
palladin security legacy-cleanup <cutoverId> --confirm
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Cleanup uses a deletion-only OS credential adapter for the historical `palladin` and `claw-vault` services. It has no API that can read secret bytes. If deletion is interrupted, the archive remains and the same command resumes idempotently. Cleanup is refused until every planned fresh profile has a new backend `agentId`.
|
|
205
|
+
|
|
206
|
+
Finally, revoke the old shared organization API key and deactivate the old Agents in the existing panel. Local deletion cannot revoke backend Agents or guarantee erasure from SSD snapshots, backups, or a parent shell. Legacy environment-variable names are reported by `doctor`; their values are never read or printed, and the operator must unset them manually. No migration or cleanup runs from npm installation, update, uninstall, or any lifecycle hook.
|
|
207
|
+
|
|
208
|
+
## MCP configuration
|
|
209
|
+
|
|
210
|
+
```json
|
|
211
|
+
{
|
|
212
|
+
"mcpServers": {
|
|
213
|
+
"palladin": {
|
|
214
|
+
"command": "palladin",
|
|
215
|
+
"args": ["mcp", "serve"]
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Every tool call requires `profile`, the local Agent alias selected by the user:
|
|
222
|
+
|
|
223
|
+
```json
|
|
224
|
+
{"profile":"example-agent","query":"example.com"}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
One MCP server supports multiple profiles. The caller remembers its selected alias
|
|
228
|
+
and API host in trusted Agent/workspace memory and passes the same `profile` across
|
|
229
|
+
discovery, credential use and approval retries. The server never switches a shared
|
|
230
|
+
active profile or falls back to the machine default. Existing profiles use their
|
|
231
|
+
own saved API host and identity; the Agent must be active before credential use.
|
|
232
|
+
|
|
233
|
+
MCP contract v2.0 makes `profile` required. Remove `--id` from older server launch
|
|
234
|
+
commands and restart the MCP connection to reload its schemas after updating the
|
|
235
|
+
runtime/plugin. `--id` remains the CLI selector. New `pair_agent` calls use the
|
|
236
|
+
server's `--host` option (production by default); confirm that environment before
|
|
237
|
+
pairing and remember the resulting assignment. Never auto-pair to repair a failed
|
|
238
|
+
request or store credentials in Agent memory.
|
|
239
|
+
|
|
240
|
+
On Linux Hardened, the administrator's UID-to-profile mapping additionally limits
|
|
241
|
+
which `profile` the caller may request. The authenticated broker passes that
|
|
242
|
+
assignment internally; each tool still requires an explicit matching profile.
|
|
243
|
+
It is an authorization constraint, never a missing-argument default.
|
|
244
|
+
Windows Hardened binds each operation's Windows Hello consent to that call's
|
|
245
|
+
validated profile, including separate profiles within an MCP batch.
|
|
246
|
+
|
|
247
|
+
| Tool | Behavior |
|
|
248
|
+
|---|---|
|
|
249
|
+
| `pair_agent` | Pair the explicitly selected profile through owner approval in the browser. |
|
|
250
|
+
| `search_entries` | Search metadata without returning secret values. |
|
|
251
|
+
| `get_credential` | Intentionally return a granted value; TOTP fields return only the current code. |
|
|
252
|
+
| `exec_with_credential` | Execute without returning child stdout/stderr to the model. |
|
|
253
|
+
| `inject_credential` | Invoke the same native Inject service as the CLI, through the authenticated extension provider, without returning the credential to the model. MCP contract v1.1 adds the paired `targetTabId`/`targetUrl` routing hints. |
|
|
254
|
+
| `report_credential_stale` | Report a stale credential without sending its value. |
|
|
255
|
+
|
|
256
|
+
## Credential delivery methods
|
|
257
|
+
|
|
258
|
+
`get`, `exec`, and `inject` are three grant-controlled ways to deliver one approved Entry. They use
|
|
259
|
+
the same request, approval, expiry, usage-limit, and audit lifecycle, but have different output
|
|
260
|
+
contracts. The approving user chooses which methods a grant allows; the runtime cannot silently
|
|
261
|
+
substitute a method that was not granted.
|
|
262
|
+
|
|
263
|
+
GRANULAR delivery opens one exact per-Entry grant envelope. FULL delivery instead receives one
|
|
264
|
+
`AgentWrappedVaultKey` for the grant together with the requested Entry's current encrypted key and
|
|
265
|
+
MemberSecret. The complete 32-byte Vault key is sealed to this Agent's X25519 identity and bound to
|
|
266
|
+
the Organization, Vault, Grant, Agent access epoch, recipient key version/fingerprint and Vault-key
|
|
267
|
+
version. It is opened only inside the native Rust crypto boundary, zeroized after deriving the Entry
|
|
268
|
+
key, and never crosses into the Node launcher, MCP result, child process or browser extension.
|
|
269
|
+
Credential responses carry the authoritative `grantType`; the runtime rejects a missing,
|
|
270
|
+
unknown, or material-mismatched discriminator and never reconstructs it from response shape.
|
|
271
|
+
|
|
272
|
+
### `get`: return an approved value
|
|
273
|
+
|
|
274
|
+
Use `get` when the caller genuinely needs the selected value rather than only the result of an
|
|
275
|
+
operation performed with it:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
palladin get <vaultId> <entryId>
|
|
279
|
+
palladin get <vaultId> <entryId> --field password
|
|
280
|
+
palladin get <vaultId> <entryId> --field-id <publicFieldId>
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
The CLI writes a secret-bearing JSON result to stdout. Without a selector it returns the granted
|
|
284
|
+
credential payload; `--field` selects a field by label and `--field-id` selects a custom field by
|
|
285
|
+
its public identifier. A selected TOTP field returns only the current short-lived code and expiry,
|
|
286
|
+
never the TOTP seed. The equivalent MCP tool is `get_credential`.
|
|
287
|
+
|
|
288
|
+
This is an intentional plaintext output boundary. CLI prints a warning to stderr unless `--quiet`
|
|
289
|
+
is set; `--quiet` suppresses only the warning and does not change the secret-bearing stdout result.
|
|
290
|
+
An MCP result becomes available to the calling Agent and may enter its model context, provider
|
|
291
|
+
retention, session transcript, or observability tooling. Do not send `get` output to logs, shell
|
|
292
|
+
history, command-line arguments, temporary files, analytics, or an untrusted caller. Prefer `exec`
|
|
293
|
+
or `inject` when the workflow needs to use a credential but does not need to receive its value.
|
|
294
|
+
|
|
295
|
+
`get` still requires an active grant that includes the `Get` method, observes the grant's expiry and
|
|
296
|
+
remaining-use limit, and records successful delivery in the audit trail. Script Entries remain
|
|
297
|
+
`exec`-only and payment-card Entries remain `inject`-only regardless of the requested grant flags.
|
|
298
|
+
|
|
299
|
+
### `exec` and `inject`: use without returning the value
|
|
300
|
+
|
|
301
|
+
- `exec` maps approved fields into a sanitized child process. Over MCP, child stdout and stderr are
|
|
302
|
+
withheld and the tool returns only the exit status.
|
|
303
|
+
- `inject` sends approved fields to an authenticated provider and returns a value-free outcome.
|
|
304
|
+
Unsupported or unauthenticated provider paths fail before credential delivery.
|
|
305
|
+
|
|
306
|
+
## Security notes
|
|
307
|
+
|
|
308
|
+
- Release origins are pinned to exactly `https://api.palladin.io` and `https://api.stage.palladin.io`; development HTTP accepts only literal `127.0.0.1` or `[::1]` with an explicit port.
|
|
309
|
+
- Native secret storage has no file or environment fallback.
|
|
310
|
+
- The organization API key and private keys are never child-process environment variables.
|
|
311
|
+
- `exec` uses no implicit shell, rebuilds the child environment from an allowlist, and supplies null stdin.
|
|
312
|
+
- Browser injection never accepts a caller-controlled CDP endpoint, executable script, arbitrary browser command, or secret-bearing argument. The Rust runtime resolves a verified global Form Discovery Map for MCP; only an explicit CLI `--form-json` caller may supply a bounded, value-free fallback definition. A browser framework passes a WebExtensions `targetTabId` together with its exact HTTPS URL snapshot; these are untrusted routing hints, not authorization. The macOS Chrome extension route authenticates both encrypted transport hops, resolves and pins that exact tab/document before the runtime requests a grant or decrypts a credential, then re-checks the same tab/document, HTTPS and the encrypted Entry domain before delivery.
|
|
313
|
+
- The npm launcher has no third-party JavaScript runtime dependencies. Its only production dependency is the exact-version platform package.
|
|
314
|
+
- Removing the npm package never deletes identity. Purge is always an explicit native command.
|
|
315
|
+
|
|
316
|
+
## Browser providers
|
|
317
|
+
|
|
318
|
+
`Inject` has an Open/Closed provider boundary. The native runtime owns grant delivery and
|
|
319
|
+
credential decryption; provider adapters own only browser navigation/fill and return a value-free
|
|
320
|
+
outcome. Adding another agent browser does not change the grant, crypto, CLI, or MCP core.
|
|
321
|
+
|
|
322
|
+
| Provider | Receiver | Extension required | Secret transport |
|
|
323
|
+
|---|---|---:|---|
|
|
324
|
+
| `extension` | The existing Palladin Chrome extension | Yes — the same user-autofill extension | Two authenticated encrypted hops: CLI↔Rust host and Native Messaging host↔extension |
|
|
325
|
+
| `playwright` | Disabled historical development wrapper | No | None — its old private-pipe flag is rejected before profile, grant, or credential access |
|
|
326
|
+
| `agent-browser` | `@palladin/agent-browser-mcp` public navigation proxy | No | None — `inject_credential` fails closed before grant/runtime/secret-bearing daemon commands |
|
|
327
|
+
|
|
328
|
+
The extension provider uses the same Palladin extension rather than a provider-specific extension.
|
|
329
|
+
On macOS, `palladin browser install` provisions the host identity in OS secure storage and installs
|
|
330
|
+
the shared Google Chrome host `io.palladin` for both source-development and release builds.
|
|
331
|
+
Both the store and development extensions can intentionally use either runtime. Running
|
|
332
|
+
`browser install` selects that executable for subsequent Chrome connections; installing another build replaces this selection.
|
|
333
|
+
The host name does not attest the runtime build or upgrade its secure-storage guarantees.
|
|
334
|
+
Both build modes compile the same exact extension-origin allowlist;
|
|
335
|
+
there is no runtime flag, backend value, or extension payload that can switch the host identity
|
|
336
|
+
or add an allowed origin.
|
|
337
|
+
Installation and uninstallation also remove the retired `io.palladin.browser_bridge` and
|
|
338
|
+
`io.palladin.debug` manifests. Older debug extension artifacts must be rebuilt to use
|
|
339
|
+
`io.palladin`; there is no automatic fallback to a second host.
|
|
340
|
+
The extension connects automatically and stores no host key, fingerprint, or pairing state.
|
|
341
|
+
`palladin browser status` reports the manifest and OS-secured host authorization.
|
|
342
|
+
The authenticated channel is verified when Inject begins; no Palladin account or profile in the
|
|
343
|
+
extension participates in that decision.
|
|
344
|
+
|
|
345
|
+
`palladin browser uninstall --confirm` revokes the OS-secured lifecycle token before deleting the host
|
|
346
|
+
key and manifest. Browser forwards hold a shared cross-process lease from the final token check
|
|
347
|
+
through the value-free response, while uninstall holds the exclusive lease through cleanup, so no
|
|
348
|
+
loaded session can finish after uninstall reports success. The post-prepare wait is derived from the
|
|
349
|
+
canonical five-minute grant window plus a 30-second margin; secret-bearing browser round trips stay
|
|
350
|
+
bounded to 60 seconds. The local AEAD payload also binds the minimum operation-lease/grant expiry as
|
|
351
|
+
a canonical `CLOCK_MONOTONIC` not-after; the host rechecks it under the shared lifecycle lease
|
|
352
|
+
immediately before writing to the extension, so queued socket ciphertext cannot outlive its grant.
|
|
353
|
+
The host allowlist includes the assigned Chrome Web Store origin
|
|
354
|
+
`chrome-extension://ecejlpkceehnckgenjafoppffmbmmagf/` and the development origin
|
|
355
|
+
`chrome-extension://hmljnknogdeonphikmeofcbkikmpokba/` in both debug and release builds
|
|
356
|
+
(product-owner decision 2026-09-25). These public extension identifiers are compiled platform trust configuration: the host must independently
|
|
357
|
+
constrain the caller rather than accept an ID from an extension payload. No beta origin is
|
|
358
|
+
allowed until a separate store item exists and its assigned ID is reviewed. Existing host
|
|
359
|
+
manifests need `palladin browser install` from the updated CLI again to install the list. The user explicitly trusts both Palladin identities; the development identity does not
|
|
360
|
+
attest store review or a signed extension artifact. All other origins remain rejected. This list
|
|
361
|
+
does not change extension host-name routing or the selected runtime secure-storage mode.
|
|
362
|
+
|
|
363
|
+
The local socket is only a rendezvous point. The CLI signs a fresh ephemeral handshake with the
|
|
364
|
+
OS-secured host identity, the host signs its response, and both derive independent directional
|
|
365
|
+
XChaCha20-Poly1305 keys. The host also dynamically validates that Google-signed Chrome launched it
|
|
366
|
+
and that Chrome supplied exactly one allowlisted origin before loading the identity. That
|
|
367
|
+
specific browser-supplied origin binds the session handshake; another allowed extension's origin
|
|
368
|
+
cannot verify the same session. The existing single-host rendezvous remains unchanged. A
|
|
369
|
+
strict value-free `session.offer` announces the public host key only for the current port; the
|
|
370
|
+
extension keeps it in memory to verify the signed transcript. Windows, Linux, other Chromium browsers, Firefox, and Safari fail
|
|
371
|
+
closed until their platform-specific launch attestation and installation paths are implemented.
|
|
372
|
+
The reviewed Chrome/macOS trust boundary, accepted by the product owner on 2026-09-24,
|
|
373
|
+
is Google-signed Chrome plus its exact compiled extension origin, in both debug and release.
|
|
374
|
+
Chrome does not attest Web Store installation versus an unpacked extension that reuses the public
|
|
375
|
+
manifest key. Local installation/replacement of an extension with that same ID is outside this
|
|
376
|
+
boundary: such an extension can receive values from an approved Inject grant and can remove its
|
|
377
|
+
own page checks. Users must trust their local Chrome profile and installed extensions. Independent
|
|
378
|
+
store-artifact attestation remains future hardening, not a guarantee of this release. Runtime grant,
|
|
379
|
+
approval, secure-storage, release-signature and encrypted-transport checks remain mandatory. This
|
|
380
|
+
decision enables the macOS adapter; it is not evidence that a particular packaged build passed
|
|
381
|
+
installed-browser acceptance.
|
|
382
|
+
|
|
383
|
+
Codex, Claude, and other MCP clients are callers, not browser providers. They never receive a
|
|
384
|
+
dedicated extension or the credential value. The unshipped Node/Playwright adapters are disabled
|
|
385
|
+
fixtures: their hidden `--provider-transport-stdio` invocation is rejected by the Rust CLI in every
|
|
386
|
+
build. Provider identifiers are an open namespace rather than a catalog allowlist; execution fails
|
|
387
|
+
closed until the matching separately reviewed authenticated transport is registered. The CLI/MCP input never accepts a CDP URL,
|
|
388
|
+
remote-debugging port, Playwright WebSocket endpoint, unmanaged browser target, or plaintext pipe.
|
|
389
|
+
|
|
390
|
+
### Verified and Agent-defined form execution
|
|
391
|
+
|
|
392
|
+
The native Rust runtime first looks up a verified Form Discovery Map for the authenticated Entry
|
|
393
|
+
domain and selected provider. The catalog is global; candidate and observed maps are never executed.
|
|
394
|
+
A returned map is accepted only when its fingerprint, bounded action contract, provider identifier,
|
|
395
|
+
domain, and exact HTTPS origin validate locally. Login paths are data and may represent any locale or
|
|
396
|
+
site route; the contract contains no list of known URLs. Persisted login URLs omit query and fragment
|
|
397
|
+
data so one-time flow state or tokens cannot enter the catalog. When no verified map
|
|
398
|
+
applies, a CLI caller may prepare the public login surface with ordinary browser tools, inspect it,
|
|
399
|
+
and pass a complete, versioned, value-free form definition to `palladin inject --form-json` as a
|
|
400
|
+
fallback. MCP 1.1 `inject_credential` adds only exact-tab routing hints; it has no form argument and never accepts this
|
|
401
|
+
fallback.
|
|
402
|
+
The definition is an ordered list of one or more steps mapping schema-valid Entry field IDs to public
|
|
403
|
+
control locators, with a bounded click or press-Enter action and an optional next-step transition
|
|
404
|
+
expectation.
|
|
405
|
+
|
|
406
|
+
After a fallback form completes every declared Inject step, the native Runtime submits that
|
|
407
|
+
value-free definition to the global API as a `candidate`. The request uses the authenticated Agent
|
|
408
|
+
identity as provenance, strips query and fragment state from the current HTTPS URL, and never
|
|
409
|
+
contains field values. Candidate recording is best-effort after the completed Inject, is idempotent
|
|
410
|
+
for the same fingerprint, and cannot make the map executable; only the trusted catalog process may
|
|
411
|
+
promote it to `verified`.
|
|
412
|
+
|
|
413
|
+
The version 1 shape is `{"version":1,"steps":[...]}`. A verified map may use any schema-valid Entry
|
|
414
|
+
field identifier needed by the login flow. The runtime resolves only fields from the already
|
|
415
|
+
authorized credential and checks their value kind against the declared control before delivery.
|
|
416
|
+
Every step declares one `click` or `press-enter` submit action; every intermediate
|
|
417
|
+
step also declares `waitFor`. `--form-json` is a value-free CLI fallback; MCP 1.1 preserves the
|
|
418
|
+
backend-provided verified form map boundary and adds only the optional paired `targetTabId` and
|
|
419
|
+
`targetUrl` routing hints. Credential values are
|
|
420
|
+
retrieved, decrypted and forwarded only inside the native runtime.
|
|
421
|
+
|
|
422
|
+
The native runtime retrieves and decrypts only the approved values after the grant is active. The
|
|
423
|
+
selected provider validates each declared control, re-checks HTTPS and the authenticated Entry domain
|
|
424
|
+
before every fill/submit and after every transition, injects the values, and performs the declared
|
|
425
|
+
actions. It returns only a bounded result and leaves the authenticated browser session available to
|
|
426
|
+
the Agent. Missing, stale, ambiguous, hidden, or semantically invalid definitions fail closed; the
|
|
427
|
+
provider never guesses another form. A failed declared selector, control attestation, submit selector,
|
|
428
|
+
or transition invalidates that cached map and asks the API for a fresh revision for the next request.
|
|
429
|
+
If the API still returns the rejected version and fingerprint, a public rejection tombstone keeps
|
|
430
|
+
that exact revision unavailable while later requests continue checking for a replacement; a
|
|
431
|
+
concurrently stored higher version is neither removed nor overwritten by a delayed
|
|
432
|
+
response. Cache invalidation/refresh persistence failures are reported to the operator. A separately
|
|
433
|
+
validated CLI fallback form remains
|
|
434
|
+
available during transient map lookup transport/5xx failures, while invalid payloads, authentication,
|
|
435
|
+
and unsafe local cache/configuration errors still fail closed.
|
|
436
|
+
Origin mismatch and provider transport/browser failures keep their specific outcome and do not evict
|
|
437
|
+
a valid map. Palladin never retries a partially filled or submitted login automatically.
|
|
438
|
+
|
|
439
|
+
### Form Discovery Map cache
|
|
440
|
+
|
|
441
|
+
Verified maps are public and value-free. The native runtime stores them in
|
|
442
|
+
`~/.palladin/form-map-cache.json` with owner-only permissions and an LRU key scoped by API origin,
|
|
443
|
+
domain, and provider. Global maps are shared by local Agent profiles connected to the same
|
|
444
|
+
API origin. The default maximum is 100 entries. Configure it with the
|
|
445
|
+
owner-only `~/.palladin/runtime-config.json` file:
|
|
446
|
+
|
|
447
|
+
```json
|
|
448
|
+
{
|
|
449
|
+
"formMapCache": {
|
|
450
|
+
"maxEntries": 100
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
`maxEntries` must be an integer from 1 through 500. Unknown properties, unsafe permissions, symbolic
|
|
456
|
+
links, malformed maps, or an out-of-range limit fail closed. Every cache read/update/invalidation is
|
|
457
|
+
serialized with the cross-process profile transaction lock. Active maps and rejection tombstones
|
|
458
|
+
share the same LRU capacity. Neither file contains credential values,
|
|
459
|
+
cookies, API keys, private keys, or decrypted vault data. Explicit full-runtime purge recognizes and
|
|
460
|
+
removes both files.
|
|
461
|
+
|
|
462
|
+
See [ADR 0005](runtime/docs/adr/0005-authenticated-inject-form-contract.md) for the contract and test
|
|
463
|
+
requirements. Caller-controlled CDP remains disabled under [ADR 0003](runtime/docs/adr/0003-browser-injection-boundary.md).
|
|
464
|
+
|
|
465
|
+
## Public local state
|
|
466
|
+
|
|
467
|
+
Convenience public state lives under `~/.palladin`. Linux Hardened public state lives in a broker-owned random principal namespace that is never derived from a reusable numeric UID. Both contain only profile aliases, opaque identity/organization references, host, Agent ID, public keys, signatures, SHA-256 commitments, public runtime configuration, and verified value-free Form Discovery Maps. Secret values and the small registry trust root remain in the selected secure store. `PALLADIN_HOME` is rejected by identity-opening commands.
|
|
468
|
+
|
|
469
|
+
## Development
|
|
470
|
+
|
|
471
|
+
```bash
|
|
472
|
+
npm ci --ignore-scripts --workspaces=false
|
|
473
|
+
npm run lint
|
|
474
|
+
npm run build
|
|
475
|
+
npm test
|
|
476
|
+
|
|
477
|
+
cd runtime
|
|
478
|
+
cargo fmt --all -- --check
|
|
479
|
+
cargo clippy --workspace --all-targets --locked -- -D warnings
|
|
480
|
+
cargo test --workspace --locked
|
|
481
|
+
|
|
482
|
+
cd ..
|
|
483
|
+
dotnet restore --locked-mode runtime/contracts/dotnet/Palladin.ContractGate/Palladin.ContractGate.csproj
|
|
484
|
+
dotnet run --no-restore --project runtime/contracts/dotnet/Palladin.ContractGate/Palladin.ContractGate.csproj -- runtime/contracts/v1
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
Every pull request runs two stable required contexts:
|
|
488
|
+
|
|
489
|
+
- `CI Gate` aggregates the Node.js matrix, minimum supported npm selection tests, Rust formatting and linting, the full Rust workspace, and the frozen TypeScript/Rust/.NET contract consumers.
|
|
490
|
+
- `Native Platform Gate` aggregates native Apple Silicon, Windows x64, Windows ARM64, Linux glibc x64/arm64, and Linux musl x64/arm64 builds and smoke tests. Intel macOS is deferred until a native first-install lifecycle gate and physical acceptance tests pass. A supported target cannot be skipped by a path filter.
|
|
491
|
+
|
|
492
|
+
The repository is public under [Apache-2.0](LICENSE). See [NOTICE](NOTICE),
|
|
493
|
+
[third-party notices](THIRD_PARTY_NOTICES.md), and the
|
|
494
|
+
[trademark policy](TRADEMARKS.md). Signed release artifacts are not produced by
|
|
495
|
+
public pull requests. `macOS Signed Release Gate` and `Windows Signed Release
|
|
496
|
+
Gate` are separate owner-dispatched workflows that sign only an exact commit
|
|
497
|
+
already reachable from `main`, then install and execute the resulting artifacts
|
|
498
|
+
on native CPU runners. They must be green for a signed release, but are not
|
|
499
|
+
pull-request branch-protection contexts.
|