adoor 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/LICENSE +21 -0
- package/README.md +51 -2
- package/dist/adoor.mjs +6907 -0
- package/package.json +23 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
First npm command release as `adoor`, runnable with `npx adoor`. Hosted sign-in is the default. Includes scoped profiles, file push/pull, database and access commands, and shared session support for the matching Mac app. Checkout-only and unfinished bridge/copy commands are listed in the README.
|
|
6
|
+
|
|
7
|
+
## 0.0.0
|
|
8
|
+
|
|
9
|
+
Command-line client. Login, databases, tokens, SQL, import and export, and a local bridge interface. Scope shorthand compiles to permission JSON, and the server checks the grant again.
|
|
10
|
+
|
|
11
|
+
`db rm` archives. `db restore` brings back only the spaces `db rm` archived, while that same archive is in place, with their rows and history. There is no purge command.
|
|
12
|
+
|
|
13
|
+
Config saves hold an exclusive lock file, identified by the random id inside it. `logout` revokes the connection in its home workspace and reports `revoked: true` only once the old token gets 401, then removes the profile and its records.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Halmos Labs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
-
#
|
|
1
|
+
# adoor
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The ADoor command line. Requires Node.js 22.11 or newer.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npx adoor --help
|
|
7
|
+
npx adoor login
|
|
8
|
+
npx adoor whoami
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Sign-in opens `https://app.adoor.run` by default. Use `--url` for your own ADoor server. For a local development server, set `STORE_URL` or `PORT` explicitly.
|
|
12
|
+
|
|
13
|
+
To install the command:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm install --global adoor
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The CLI runs without the Mac app. It supports login, scoped profiles, database commands, and file push/pull. Finder mounts require ADoor for Mac and its enabled File Provider extension; Linux mounts require FUSE. The matching shared-session Mac build uses one local service for the app and CLI, with profiles in Keychain. Explicit `STORE_CONFIG` files remain independent unless `ADOOR_DESKTOP_SESSION=1` is set. `ADOOR_DESKTOP_SESSION=0` selects file-backed CLI profiles.
|
|
20
|
+
|
|
21
|
+
For example, with file access approved for the target folder:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
adoor fs pull acme/general/notes ./notes
|
|
25
|
+
adoor fs push ./notes acme/general/notes
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
This is an early release. Commands such as `schema`, `history`, `access`, and `mcp` still require an ADoor source checkout (`ADOOR_REPO`). `psql` and `proxy` require a separately supplied `WireBridge`; no Postgres listener is bundled. Database copying (`db branch`, `db create --from`) is not implemented, and `adoor dev` does not start a server. These commands fail explicitly rather than claiming to have completed work.
|
|
29
|
+
|
|
30
|
+
To build from source, run `npm run build` and `npm run bundle` in `cli/`. The npm executable is `dist/adoor.mjs`.
|
|
31
|
+
|
|
32
|
+
`db rm` archives spaces that can be archived. Rows and history stay. `db restore` brings back only the spaces `db rm` archived from this machine, and only while that same archive is in place. A space archived some other way, or unarchived and archived again since, stays archived. If `db rm` stops partway, its error names the spaces it already archived. There is no purge command.
|
|
33
|
+
|
|
34
|
+
A repeat of `db create NAME` returns the same database. `--ttl` on create is recorded on this machine and does not delete anything.
|
|
35
|
+
|
|
36
|
+
`adoor grant DB` creates short-lived access for one database. The default is read-only for 1 hour, role sandbox, capped by this connection. Pass `--tables a,b`, or `--all-tables` to copy every table this connection can grant. One named table is used when that is all this connection can grant. A `*` grant is copied only with `--all-tables`. `--write` and `--ttl` stay inside the caller's cap; anything wider is refused. The command prints the expiry, `adoor token revoke ID`, and a one-time code (`ADR-XXXX-XXXX`). The code expires in 10 minutes. Whoever presents it first receives the connection. That same client can present it again within 2 minutes, while the connection and its parents are still live, and receives a new token for that connection. The previous token stops working. The database keeps hashes only. The connection remains in Access until that expiry or until it is revoked. `adoor grant DB --to NAME SCOPE` still replaces that connection's permissions.
|
|
37
|
+
|
|
38
|
+
`adoor grant DB --format wrangler` requires `--ttl` and pipes that scoped token to `wrangler secret put ADOOR_TOKEN` on standard input. It writes no file and does not print the token. `adoor token ls --expiring` lists connections that expire within 7 days, skips revoked and already expired ones, and reads every page.
|
|
39
|
+
|
|
40
|
+
`adoor connect CODE --url URL` redeems that code with one POST and writes a new profile in `config.json` (mode 0600). An existing profile stays in the file. If saving fails, the same client can present the code again within 2 minutes and receives a new token. The previous token stops working. The command prints no credential. `adoor run [DB] -- COMMAND` puts `ADOOR_URL` and `ADOOR_TOKEN` in the child process only, and streams the child's bytes through unchanged except for masking that token. The masker hides only an exact copy of the token, not a token that ends mid-prefix or wraps across lines. It does not set `DATABASE_URL`. `pgwire-adoor` is an empty scaffold, so nothing is listening for Postgres.
|
|
41
|
+
|
|
42
|
+
`adoor trust github` and `adoor trust cursor` file a preset and print an approval link. A signed-in person approves it in the browser, and the command waits. The preset includes the claims, id pinning, and expiry. A connection cannot create the trust. If `federations.create` is refused, the error includes the Access link. The trust expires in 24 hours unless `--expires` says otherwise, and never longer than the person or 30 days. The child is short-lived access, role sandbox, capped by this connection. `--max-ttl` defaults to 15 minutes. GitHub needs `--repository-id` and `--owner-id`, and exactly one of `--ref`, `--environment`, or `--pull-request`. Those ids are stored as strings, which is how GitHub puts them in the token. A `team_id` subject admits any agent launched by any team member on that repo. `--service-account` pins `service_account:<id>`. `adoor connect --github` reads the Actions id token. `adoor connect --cursor` mints on `CURSOR_AGENT_SOCKET`. `adoor connect --oidc` reads `ADOOR_OIDC_TOKEN` and does not take the JWT as an argument. None of these print the credential.
|
|
43
|
+
|
|
44
|
+
`env` and `token create` mint a sandbox connection. Tokens stay out of output unless `--show-secret`. Wrangler output never includes the token. The config file is `~/.config/adoor/config.json`, mode 0600, and is refused when it is group- or world-readable. `STORE_CONFIG` overrides the path. Each `adoor` save holds `config.json.lock`, mode 0600, while it reads, changes and replaces the file, so concurrent `adoor` runs keep each other's changes. The lock holds its owner's process id, host and a random id, and a save checks that random id before it replaces the file. A lock is broken only when its process on this machine has exited, or when it comes from another machine and is older than 30 seconds. One process at a time breaks a lock, while holding `config.json.lock.break`. On a filesystem without hard links, the lock is created exclusively instead, so it can briefly be empty. A lock without owner text is broken once it is older than 30 seconds. A save also removes lock temp and `.stale` files left by processes on this machine that have exited. Otherwise a save waits up to 15 seconds and then fails with `CONFIG_LOCKED`, naming the file to delete if no `adoor` command is running. `./store` writes the same file without this lock.
|
|
45
|
+
|
|
46
|
+
`login` records the connection's home workspace. `logout` revokes the connection there, not a copy in the current workspace, so tokens it minted stop working too. It reports `revoked: true` only after the old token gets 401. Then it removes the profile, its pending sign-in and its `db rm` records from this machine. Otherwise, for example when the server cannot be reached, the local copy is still removed and the output says `revoked: false`.
|
|
47
|
+
|
|
48
|
+
Checkout commands such as `schema`, `history`, and `access` run the existing CLI with that same config.
|
|
49
|
+
|
|
50
|
+
On Linux, `adoor mount acme/design ./assets` creates the directory and returns to an interactive shell when FUSE is ready. Scripts can use `--background` for the same behavior or `--foreground` to supervise the process. Use `adoor mounts` for pending delete confirmations and `adoor unmount ./assets` to disconnect. Background worker logs are in `$XDG_STATE_HOME/adoor/mounts/workers`.
|
|
51
|
+
|
|
52
|
+
MIT licensed.
|