@divergeai/cli 0.1.10 → 0.1.13
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 +41 -15
- package/dist/diverge.mjs +552 -167
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ the gateway, keeping everything else in the file:
|
|
|
57
57
|
| `claude` | `~/.claude/settings.json` (or `./.claude/settings.local.json` with `--scope project`): the gateway base URL and `diverge token` as the key helper; `--project-id` adds the project header, `--model-discovery` lets Claude Code list the gateway's models |
|
|
58
58
|
| `opencode` | `~/.config/opencode/opencode.json`: a `divergent-<surface>` provider reading `DIVERGENT_TOKEN` |
|
|
59
59
|
| `codex` | `~/.codex/config.toml`: a `divergent` provider block with `diverge token` as its auth command; `--print` shows it instead |
|
|
60
|
-
| `dsh` | `$DSH_HOME/divergent-<surface>.yml`: a patch overlay with the models the gateway serves
|
|
60
|
+
| `dsh` | `$DSH_HOME/divergent-<surface>.yml`: a patch overlay with the models the gateway serves and dsh's DeepSeek adapter, telemetry upload and vendor search turned off; the Divergent agent preset; and your skills in `$DSH_HOME/skills`, through which the agent reaches every platform tool, web search included, from dsh's shell with `diverge tools` |
|
|
61
61
|
|
|
62
62
|
`diverge agents run dsh` launches DeepSeek Harness on the overlay and keeps
|
|
63
63
|
its token fresh in dsh's own credentials file until it exits. With nothing
|
|
@@ -77,27 +77,39 @@ Claude Code and Codex search through their model vendor's own server tool,
|
|
|
77
77
|
which the gateway forwards unchanged when the organization's upstream is
|
|
78
78
|
Anthropic or OpenAI. Every other model, dsh included, searches through the
|
|
79
79
|
platform's `search_online` tool: one key on the platform, metered and audited
|
|
80
|
-
per organization.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
make it the default for new web sessions once in `settings.yaml` (a preset you
|
|
87
|
-
pick yourself there stays picked). To give Claude Code or Codex the same tool
|
|
88
|
-
for a non-native upstream, register the bridge once:
|
|
80
|
+
per organization. In dsh the agent reaches it the way it reaches every
|
|
81
|
+
platform tool, from the shell: `diverge tools call search_online`, which the
|
|
82
|
+
installed `diverge` skill names. dsh's DeepSeek-backed `web_search` needs a
|
|
83
|
+
vendor key and is off; `web_fetch` stays. To give Claude Code or Codex the
|
|
84
|
+
same tool for a non-native upstream, the stdio bridge is the opt-in for a
|
|
85
|
+
client that wants it as a native tool:
|
|
89
86
|
|
|
90
87
|
```bash
|
|
91
88
|
claude mcp add --scope user divergent -- diverge tools bridge --tools search_online
|
|
92
89
|
```
|
|
93
90
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
91
|
+
## Skills
|
|
92
|
+
|
|
93
|
+
A skill is a procedure over the tools it names, in the Agent Skills format
|
|
94
|
+
every harness reads (`<name>/SKILL.md`). The organization authors its skills
|
|
95
|
+
on the platform; you get the ones whose every named tool you can run, plus
|
|
96
|
+
the CLI's own `diverge` skill, which tells an agent how to reach the platform's
|
|
97
|
+
tools from a shell.
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
diverge skills list # what the platform serves you
|
|
101
|
+
diverge skills install # into ~/.claude/skills, ~/.codex/skills and $DSH_HOME/skills
|
|
102
|
+
diverge skills status # what each folder holds against the platform
|
|
99
103
|
```
|
|
100
104
|
|
|
105
|
+
`agents setup claude|codex|dsh` and `agents run dsh` install them as well, so
|
|
106
|
+
a harness the CLI set up has the skills from its first session. A refresh
|
|
107
|
+
replaces the CLI's own folders, retires the ones the organization retired, and
|
|
108
|
+
never touches a skill you authored beside them. The skills are the tool
|
|
109
|
+
surface: an agent reaches every platform tool from its shell with `diverge
|
|
110
|
+
tools`, which costs nothing until a tool is called, and the `diverge` skill
|
|
111
|
+
shows it how, file-based arguments and batches included.
|
|
112
|
+
|
|
101
113
|
## Platform tools
|
|
102
114
|
|
|
103
115
|
Every command takes the scope it acts in: `--organization-id` (or
|
|
@@ -108,8 +120,16 @@ resource inside a project, `--project-id` (or `DIVERGENT_PROJECT_ID`).
|
|
|
108
120
|
diverge tools list --filter rbac # find candidates
|
|
109
121
|
diverge tools describe rbac_assign_role # one schema, on demand
|
|
110
122
|
diverge tools call rbac_list_roles --args-json '{}'
|
|
123
|
+
diverge tools call inventory_lookup_stock --args-file args.json # or --args-json - to read stdin
|
|
124
|
+
diverge tools run calls.json --wait # several calls from one file, one JSON line of outcome each
|
|
111
125
|
```
|
|
112
126
|
|
|
127
|
+
Put arguments in a file or on stdin when a shell may touch them: Windows
|
|
128
|
+
PowerShell strips the double quotes inside an inline argument. `run` takes a
|
|
129
|
+
JSON array of `{"tool": "...", "args": {...}}` (or one per line), runs them in
|
|
130
|
+
order, and exits with the worst outcome: 1 failed, 4 rejected, 5 expired,
|
|
131
|
+
3 pending, else 0.
|
|
132
|
+
|
|
113
133
|
A write that needs a human is not refused: it is persisted as a pending
|
|
114
134
|
invocation, decided in the platform's approval inbox, and read back here by
|
|
115
135
|
id. Branch on the exit code, never on text:
|
|
@@ -152,6 +172,11 @@ on the binding when the endpoint is a tailnet or LAN address.
|
|
|
152
172
|
## Updating
|
|
153
173
|
|
|
154
174
|
`diverge update` installs the latest release with the npm that installed it.
|
|
175
|
+
Once a day, after a command finishes, the CLI asks the registry for the latest
|
|
176
|
+
version in the background and caches the answer under `$DIVERGE_HOME`; the
|
|
177
|
+
next command prints one line on stderr when a newer release exists. Nothing
|
|
178
|
+
waits on the network for it, and it stays quiet in the bridge, in
|
|
179
|
+
non-interactive shells, under `CI`, and with `DIVERGE_NO_UPDATE_CHECK=1`.
|
|
155
180
|
|
|
156
181
|
## Environment
|
|
157
182
|
|
|
@@ -162,6 +187,7 @@ on the binding when the endpoint is a tailnet or LAN address.
|
|
|
162
187
|
| `DIVERGENT_ORG_ID`, `DIVERGENT_PROJECT_ID` | tool scope when the flags are omitted; without either, the login's organization |
|
|
163
188
|
| `DIVERGENT_CLIENT_ID`, `DIVERGENT_CLIENT_SECRET`, `DIVERGENT_USER_ID` | unattended tool execution with service credentials, delegated to that person |
|
|
164
189
|
| `DSH_HOME` | where dsh keeps its files, default `~/.dsh` |
|
|
190
|
+
| `DIVERGE_NO_UPDATE_CHECK` | set to skip the once-a-day check for a newer release |
|
|
165
191
|
|
|
166
192
|
## Security
|
|
167
193
|
|