@arbidocs/cli 0.3.63 โ 0.3.65
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 +37 -0
- package/SKILL.md +46 -5
- package/dist/index.js +1765 -433
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.3.65
|
|
4
|
+
|
|
5
|
+
[compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.3.64...HEAD)
|
|
6
|
+
|
|
7
|
+
### ๐ฉน Fixes
|
|
8
|
+
|
|
9
|
+
- **tsc:** Zero typecheck errors across all four packages ([#752](https://github.com/arbicity/ARBI-frontend/pull/752))
|
|
10
|
+
|
|
11
|
+
## v0.3.64
|
|
12
|
+
|
|
13
|
+
[compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.3.63...HEAD)
|
|
14
|
+
|
|
15
|
+
### ๐ Enhancements
|
|
16
|
+
|
|
17
|
+
- **cli:** Clean up arbi dm list output ([#739](https://github.com/arbicity/ARBI-frontend/pull/739))
|
|
18
|
+
- **cli:** Make arbi friendlier for AI agents ([#740](https://github.com/arbicity/ARBI-frontend/pull/740))
|
|
19
|
+
- **cli:** More agent ergonomics (workspaces --mine, notifications, watch --type, local --json) ([#741](https://github.com/arbicity/ARBI-frontend/pull/741))
|
|
20
|
+
- **cli:** PR3 โ simplification, gap-fills, help-text cleanup ([#742](https://github.com/arbicity/ARBI-frontend/pull/742))
|
|
21
|
+
- **cli:** PR4 โ auth namespace, doc similar, workspace flag-wrappers, help groups, SSO clarity ([#743](https://github.com/arbicity/ARBI-frontend/pull/743))
|
|
22
|
+
- **cli:** Citation ergonomics โ inline markers in arbi ask, --json/--raw/verify on arbi cite ([#744](https://github.com/arbicity/ARBI-frontend/pull/744))
|
|
23
|
+
- **cli:** One canonical format for arbi cite (markdown blocks), drop --raw ([#745](https://github.com/arbicity/ARBI-frontend/pull/745))
|
|
24
|
+
- **cli:** Drop --json from mutating commands, self-print help on errors ([#746](https://github.com/arbicity/ARBI-frontend/pull/746))
|
|
25
|
+
- **cli:** --dry-run on every destructive command ([#747](https://github.com/arbicity/ARBI-frontend/pull/747))
|
|
26
|
+
- **cli:** Rename 'arbi conversations' โ 'arbi convo' ([#749](https://github.com/arbicity/ARBI-frontend/pull/749))
|
|
27
|
+
|
|
28
|
+
### ๐ฉน Fixes
|
|
29
|
+
|
|
30
|
+
- **mcp-connect:** Allow button does nothing in new OAuth browser tab ([#735](https://github.com/arbicity/ARBI-frontend/pull/735))
|
|
31
|
+
- **test:** Add missing getApiClient and account deletion mocks to UserSettings test ([#736](https://github.com/arbicity/ARBI-frontend/pull/736))
|
|
32
|
+
- Open all workspaces before creating MCP OAuth session ([3f20c956](https://github.com/arbicity/ARBI-frontend/commit/3f20c956))
|
|
33
|
+
- **docker:** Chown html dir so nginx can write runtime config files ([30970f86](https://github.com/arbicity/ARBI-frontend/commit/30970f86))
|
|
34
|
+
- **docker:** Add USER root before chown so it runs as root in DHI image ([caa7ebb2](https://github.com/arbicity/ARBI-frontend/commit/caa7ebb2))
|
|
35
|
+
- **docker:** Use USER 0 instead of USER root in DHI hardened image ([7d8313b4](https://github.com/arbicity/ARBI-frontend/commit/7d8313b4))
|
|
36
|
+
- **cli:** Upload --watch exit + conversation continuation + add 'conversations switch' ([#748](https://github.com/arbicity/ARBI-frontend/pull/748))
|
|
37
|
+
- **cli:** Build CLI on-demand in local.test.ts so CI passes ([#750](https://github.com/arbicity/ARBI-frontend/pull/750))
|
|
38
|
+
- **cli:** Integration tests stale from --json drops, dm send rename, broken pdf URL ([#751](https://github.com/arbicity/ARBI-frontend/pull/751))
|
|
39
|
+
|
|
3
40
|
## v0.3.63
|
|
4
41
|
|
|
5
42
|
[compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.3.62...HEAD)
|
package/SKILL.md
CHANGED
|
@@ -32,7 +32,7 @@ Documents, conversations, and tags are scoped per workspace. An active workspace
|
|
|
32
32
|
|
|
33
33
|
Common moves:
|
|
34
34
|
|
|
35
|
-
- List: `arbi workspaces` (human) ยท `arbi workspaces --json` (script) ยท `arbi workspaces --ids`
|
|
35
|
+
- List: `arbi workspaces` (human) ยท `arbi workspaces --json` (script) ยท `arbi workspaces --ids` ยท `arbi workspaces --mine` (hide deployment-wide "common" workspaces โ useful when the deployment has dozens of shared scratch workspaces from earlier test runs that drown out the one you actually belong to)
|
|
36
36
|
- Active workspace ID: `arbi workspace current` (prints the ID, empty string if none) ยท `arbi workspace current --json` for full details
|
|
37
37
|
- Pick/switch: `arbi workspace select <id-or-name>` โ accepts a workspace ID or a unique (case-insensitive) name; clears the chat session; uploaded docs in other workspaces are unaffected
|
|
38
38
|
- Create: `arbi workspace create "My WS"` โ does NOT auto-select. Use `--select` to create + select in one go, `--json` for scripts
|
|
@@ -61,22 +61,26 @@ Scripting notes:
|
|
|
61
61
|
|
|
62
62
|
## For Automations / AI Agents
|
|
63
63
|
|
|
64
|
-
- **Structured output (`--json`)**: supported on `status`, `config show`, `health`, `models`, `workspaces`, `workspace users`, `docs`, `
|
|
64
|
+
- **Structured output (`--json`)**: supported on `status`, `config show`, `health`, `models`, `workspaces`, `workspace users`, `workspace current`, `docs`, `convo` (or `convo list`), `tags` (or `tags list`), `contacts` (or `contacts list`), `find`, `settings get`, `task list` / `task status` / `task result`, `agent list`, `session list`, `dm list`, `notifications list`, `local ls` / `local find` / `local cat` / `local tree`, `update --check`, `register --non-interactive`, `ask -b`, `upload`, `watch`. Use it whenever parsing output. `docs` also supports `--csv`, `--ids`, and `--count`. `arbi ask --json` without `-b` errors out โ streaming mode is prose, not JSON; pass `-b` to get a background task ID, then `arbi task result --json`.
|
|
65
65
|
- **Human table output is lossy**: table rows may contain status glyphs (`โ`, `๐ฉ`, etc.) and emoji, and column widths truncate content. Never parse tables โ always pass `--json`.
|
|
66
66
|
- **Exit codes**:
|
|
67
67
|
- `0` success
|
|
68
68
|
- `1` failure (bad args / auth / API / network / server error)
|
|
69
69
|
- `2` `arbi health --json` when the server reports unhealthy (the JSON body is still printed so you can introspect)
|
|
70
|
+
- `3` recipient/target not found (`arbi dm send <unknown>`, `arbi workspace remove-user <unknown>`, `arbi doctags create <unknown-tag>` โ distinguished so agents can branch "fix the reference" vs "server error")
|
|
71
|
+
- `124` `arbi watch -n N --timeout S` when fewer than N messages arrived before the timeout (GNU `timeout` convention; in `--json` mode a final `{"type":"timeout","received":โฆ,"expected":โฆ}` line is emitted before exit)
|
|
70
72
|
- `130` user-cancelled interactive prompt (Ctrl+C in `quickstart`)
|
|
71
73
|
- Always check `$?` โ `arbi ask` while logged-out, typo commands, and network failures all return non-zero.
|
|
72
|
-
- **Avoid interactive prompts** โ pass everything as flags/env vars
|
|
74
|
+
- **Avoid interactive prompts** โ pass everything as flags/env vars. The CLI refuses to open a prompt when stdin isn't a TTY (exit 1 with a recovery hint), so an agent that forgets a positional arg fails loudly rather than hanging.
|
|
73
75
|
- `arbi login -e $ARBI_EMAIL -p $ARBI_PASSWORD -w <workspace-id>` (or set `ARBI_EMAIL`/`ARBI_PASSWORD`).
|
|
74
76
|
- `arbi agent-create --email agent-<...> --workspace-name "<name>"` (requires `SUPPORT_API_KEY`).
|
|
75
77
|
- `arbi workspace select <id>` (ID directly, no picker).
|
|
76
78
|
- `arbi docs` auto-uses the selected workspace; pass `-w <id>` to override.
|
|
79
|
+
- `arbi dm send <recipient> "<msg>"` (refuses to prompt; pass both args).
|
|
80
|
+
- `arbi agent delete <id> -y` (skip the confirmation prompt; `-y` is required in non-TTY).
|
|
77
81
|
- Do **not** run `arbi quickstart` in non-interactive contexts โ it is interactive-only.
|
|
78
82
|
- **Health probe**: `arbi health --json` returns the raw payload and exits `2` if the server is not healthy โ useful for pre-flight checks.
|
|
79
|
-
- **No color leakage**: chalk auto-disables ANSI codes when stdout is not a TTY, so `arbi docs --json | jq`, `arbi workspaces --json | jq`, etc. work cleanly. Status messages and
|
|
83
|
+
- **No color leakage**: chalk auto-disables ANSI codes when stdout is not a TTY, so `arbi docs --json | jq`, `arbi workspaces --json | jq`, etc. work cleanly. Status messages, spinners, empty-state hints (`No tags found.`, `No tasks. โฆ`), and the auto-update nag all go to stderr; stdout is safe to pipe. The update nag is also gated to once per day (`~/.arbi/last-update-hint.json`) and suppressed entirely when any argv mentions `--json`.
|
|
80
84
|
- **Typo suggestions**: `arbi updat` โ `error: unknown command 'updat' (Did you mean update?)` (exit 1). Works for top-level commands and nested subcommands.
|
|
81
85
|
- **Completion**: `arbi completion install` (no `bash`/`zsh` arg โ auto-detected from `$SHELL`).
|
|
82
86
|
|
|
@@ -101,8 +105,45 @@ All document list/search/meta commands support machine-readable output. Prefer `
|
|
|
101
105
|
All list commands that summarize people or state support `--json`:
|
|
102
106
|
`arbi contacts list --json`, `arbi dm list --json`, `arbi dm send <to> <msg> --json`, `arbi agent list --json`, `arbi session list --json`, `arbi task list --json`.
|
|
103
107
|
|
|
104
|
-
- **Contacts
|
|
108
|
+
- **Contacts auto-add on DM**: sending or receiving a DM now mirrors both parties into each other's contact lists (backend-side, idempotent). You no longer need `arbi contacts add` before replying to an inbound DM. `arbi contacts --json` strips inline base64 profile pictures by default and exposes `has_picture: true` instead โ pass `--include-pictures` to get the bytes.
|
|
105
109
|
- **DM E2E proof**: `arbi dm send โฆ --json` and `arbi dm list --json` emit an `encrypted_in_transit: true` flag per message. The SDK seals every DM with the recipient's curve25519 public key before the network call โ this flag makes that invariant visible without reading SDK code.
|
|
110
|
+
- **DM inbox triage**: `arbi dm list` accepts `--unread`, `--from <email-or-extid>`, `--thread <peer>` (both directions with one peer), `--since <iso>`, and `-l/--limit <n>`. `arbi dm read --all` / `arbi dm delete --all` bulk-operate without the picker.
|
|
111
|
+
- **Non-DM notifications**: `arbi notifications list` (alias: `arbi notifications`) shows workspace invites, contact accepts, batch completes, etc. โ everything `arbi dm list` filters out because it's not a `user_message`. Supports `--unread`, `--type <comma-list>`, `--limit`, `--json`.
|
|
112
|
+
- **Workspace watch firehose**: `arbi watch --type task_update,notification` filters the WebSocket stream by event type (unknown types are rejected up-front instead of silently swallowed). Known types: `task_update`, `batch_complete`, `presence_update`, `response_complete`, `notification`, `error`. `arbi watch -n N --timeout S` exits **124** with a `{type:"timeout", received, expected}` JSON terminator if N events never arrived.
|
|
113
|
+
- **Local filesystem**: `arbi local ls/find/cat/tree --json` for agent-friendly browsing. `ls --all` includes dotfiles; `tree --depth N` controls recursion; `cat --head N` truncates by line count. Empty result sets emit `[]` on stdout, not human prose.
|
|
114
|
+
- **Update probe**: `arbi update --check` exits 0 if up to date and 1 if an update is available (`git diff --exit-code` convention). `arbi update --json` (implies `--check`) emits `{current, latest, update_available}` and is the right way for an agent to gate behavior on the CLI version.
|
|
115
|
+
- **Quick toggles instead of JSON patches**: `arbi doc share <ids>` / `arbi doc unshare <ids>` and `arbi tags share <id>` / `arbi tags unshare <id>` / `arbi tags rename <id> <name>` are named shortcuts for the most common `doc update` / `tags update` operations โ no more hand-writing `{"shared":true}` JSON.
|
|
116
|
+
- **Inbox housekeeping**: `arbi notifications mark-read --all` and `arbi notifications delete --all` drain the non-DM queue for long-running agents whose `--unread` filter would otherwise grow unbounded.
|
|
117
|
+
- **Leave a workspace**: `arbi workspace leave [id-or-name]` self-removes from a workspace (defaults to the active one); requires `-y/--yes` in non-TTY shells. Symmetric to `arbi workspace add-user`.
|
|
118
|
+
- **Projects**: `arbi project list` (and `create`, `refresh`) โ projects are the tenancy unit above workspaces. Until this command existed the only way to discover a `projectExtId` was inside `arbi register`, blocking multi-project bootstrap from a fresh agent install.
|
|
119
|
+
- **Files (Responses API attachments)**: `arbi files list/upload/get/delete/content` โ ephemeral files for the OpenAI-compatible Responses path. Independent of the workspace document index; meant for short-lived attachments to single `arbi ask -b` requests.
|
|
120
|
+
- **Usage probe**: `arbi usage today --json` is the cheapest pre-flight check before launching a long batch. Returns whatever quota the project surfaces (credits, storage, token caps) so agents can budget.
|
|
121
|
+
- **Execution trace**: `arbi convo trace <message-id>` (alias of `arbi convo message`) returns the full decrypted reasoning + tool-call trail for one agent response. Post-mortem primitive for debugging failed steps.
|
|
122
|
+
- **Switch conversations**: `arbi convo switch <conv-id>` points the chat session at a different conversation so the next `arbi ask` resumes there. CLI equivalent of clicking a conversation in the web UI sidebar.
|
|
123
|
+
|
|
124
|
+
## Citation Flow (the agent-grade verification path)
|
|
125
|
+
|
|
126
|
+
The most subtle agent-facing concern: when ARBI answers from documents, **how do citations reach you on a CLI?** Without a screen to click on, the streaming text has to carry the answer AND the proof. Here's how the pieces line up:
|
|
127
|
+
|
|
128
|
+
1. **Inline markers during the stream.** `arbi ask` emits inline citation markers directly in the streamed answer. The backend uses `[claim text](#cite-N)` (a markdown anchor link) and the CLI transforms it into `claim text[N]` on the fly while writing tokens to stdout. Pass `--raw-citations` to keep the original markdown form (useful when piping to a markdown renderer that resolves the anchors itself).
|
|
129
|
+
2. **Persisted metadata for `arbi cite`.** When the SSE stream ends, the full citation graph โ `claim โ chunk_ext_ids โ chunk content โ doc_title / page_number` โ is written to `~/.arbi/last-metadata.json`. Per shell, per `ARBI_CONFIG_DIR`. Survives until the next `arbi ask`.
|
|
130
|
+
3. **Browse.** `arbi cite` lists all citations with one-line summaries. `arbi cite <N>` shows the full passage for citation `N` with doc title + page number.
|
|
131
|
+
4. **Parse.** `arbi cite --json` (or `arbi cite <N> --json`) emits a structured payload:
|
|
132
|
+
```json
|
|
133
|
+
{ "count": 2, "citations": [
|
|
134
|
+
{ "num": "1", "statement": "...", "doc_title": "...", "page_number": 3,
|
|
135
|
+
"chunk_ext_ids": ["chk-..."], "doc_ext_ids": ["doc-..."],
|
|
136
|
+
"passages": ["..."], "passage_hashes": ["sha256..."] } ] }
|
|
137
|
+
```
|
|
138
|
+
This is the right way to read citations programmatically. `passage_hashes` lets an agent assert "this chunk matches what I cited" without re-fetching the doc.
|
|
139
|
+
5. **Pipe.** `arbi cite --raw` (or `arbi cite <N> --raw`) prints just the passage text โ no chalk, no headers โ so it pipes cleanly into `grep`, `diff`, `wc`, etc.
|
|
140
|
+
6. **Verify.** `arbi cite verify <N> [--json]` is the explicit "is this citation real?" path. It re-walks the saved metadata, returns the cited `chunk_ext_id` + `doc_ext_id` + a SHA256 of the cited passage, and emits a follow-up hint:
|
|
141
|
+
> For independent re-verification, run `arbi doc get <doc_ext_id> --json` and confirm the passage hash matches the doc content.
|
|
142
|
+
So an agent that wants higher assurance can pull the source doc, compute the same SHA256 over the cited passage, and assert byte-equality without trusting the saved metadata alone.
|
|
143
|
+
|
|
144
|
+
Footnote-style rendering at the end of the answer is currently not supported โ the backend places markers inline. If your downstream consumer wants footnotes specifically, parse the `arbi cite --json` output and assemble them yourself (the `num` and `statement` fields are all you need).
|
|
145
|
+
- **`arbi dm` defaults to `list`**, so `arbi dm | head` and `arbi dm --json` both work. Same for `arbi task`, `arbi agent`, `arbi session`. Typos on these (`arbi dm lst`) suggest the nearest subcommand instead of erroring with "too many arguments".
|
|
146
|
+
- **Names-or-IDs**: `arbi workspace remove-user`, `arbi workspace copy <target>`, and `arbi doctags create <tag>` / `arbi doctags delete <tag>` all accept either an ID or an email/workspace-name/tag-name. Ambiguous names exit `3` with the matching IDs listed.
|
|
106
147
|
- **Listen side-effects**: `arbi listen --agent claude` writes `~/.claude/commands/arbi/SKILL.md` and sets a `defaultAgent` in the CLI config. Run it only on a machine you control.
|
|
107
148
|
- **Persistent agents**: `arbi agent create --name <n> -w <ws-id>` creates a child identity the parent can delegate to (printed email+password). Share workspace IDs via `-w` rather than the interactive picker when running non-interactively.
|
|
108
149
|
- **Agent-create errors**: `agent-create` rejects non-`agent-*` emails with a clear message. If you see "No verification record found" the account probably already exists โ use `arbi login` instead.
|