unbound-cli 1.16.13 → 1.16.16

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 CHANGED
@@ -131,23 +131,22 @@ Scan a device for installed AI coding tools and report findings to Unbound. Uses
131
131
 
132
132
  ### Policies (Admin only)
133
133
 
134
- Unbound has **four** policy types. Each has its own subcommand with guided flag-based create/update. Tool policies live on a separate backend endpoint but are reachable under the same `policy` command tree.
134
+ Unbound has **three** policy types. Each has its own subcommand with guided flag-based create/update. Tool policies live on a separate backend endpoint but are reachable under the same `policy` command tree.
135
135
 
136
136
  Docs: https://docs.getunbound.ai/policies
137
137
 
138
138
  | Type | Subcommand | Purpose | Docs |
139
139
  |---|---|---|---|
140
140
  | **Cost** | `unbound policy cost` | Monthly budget limits per user group | https://docs.getunbound.ai/policies/cost-policies |
141
- | **Model** | `unbound policy model` | Control which AI models are available | https://docs.getunbound.ai/policies/model-policies |
142
141
  | **Security** | `unbound policy security` | Guardrails (PII, secrets), routing rules | https://docs.getunbound.ai/policies/security-policies |
143
142
  | **Tool** | `unbound policy tool` | Shell command and MCP tool controls | https://docs.getunbound.ai/policies/tool-policies |
144
143
 
145
- Generic commands (Cost/Model/Security only):
144
+ Generic commands (Cost/Security only):
146
145
 
147
146
  | Command | Description |
148
147
  |---------|-------------|
149
148
  | `unbound policy` | Overview of types and subcommands |
150
- | `unbound policy list [--type COST\|MODEL\|SECURITY]` | List policies |
149
+ | `unbound policy list [--type COST\|SECURITY]` | List policies |
151
150
  | `unbound policy get <id>` | Get a policy's details |
152
151
  | `unbound policy delete <id>` | Delete a policy |
153
152
  | `unbound policy form-data` | Reference data: user groups, models, guardrails, tool types, command policies |
@@ -166,19 +165,6 @@ unbound policy cost update 5 --monthly-budget 1500
166
165
  unbound policy cost list
167
166
  ```
168
167
 
169
- Model policy examples:
170
-
171
- ```bash
172
- # Allow only specific models
173
- unbound policy model create --name "Sonnet Only" --allowed claude-3-5-sonnet
174
-
175
- # Allow everything except specific models
176
- unbound policy model create --name "No Opus" --all-models --excluded claude-3-opus
177
-
178
- # List all model policies
179
- unbound policy model list
180
- ```
181
-
182
168
  Security policy examples:
183
169
 
184
170
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unbound-cli",
3
- "version": "1.16.13",
3
+ "version": "1.16.16",
4
4
  "description": "CLI tool for Unbound - AI Gateway management",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -346,6 +346,9 @@ Examples:
346
346
  output.error(
347
347
  'The status command only supports macOS (reads launchctl state).\n' +
348
348
  ' Linux: systemctl --user status unbound-scheduled.timer\n' +
349
+ // WSL2, containers, and headless boxes have no systemd user session,
350
+ // so the installer falls back to a crontab entry instead.
351
+ " (crontab fallback: crontab -l | grep 'ai.getunbound.scheduled')\n" +
349
352
  ' Windows: Get-ScheduledTask -TaskName "ai.getunbound.scheduled"'
350
353
  );
351
354
  process.exitCode = 1;
@@ -0,0 +1,37 @@
1
+ const { test } = require('node:test');
2
+ const assert = require('node:assert/strict');
3
+ const { Command } = require('commander');
4
+ const { register } = require('../src/commands/discover');
5
+ const output = require('../src/output');
6
+
7
+ // `discover status` only reads macOS launchctl state; on other platforms it
8
+ // prints guidance pointing at the native scheduler. The installer uses a systemd
9
+ // user timer where one exists but falls back to a crontab entry on WSL2,
10
+ // containers, and headless boxes — so the guidance must mention both.
11
+ function guidanceOnPlatform(plat) {
12
+ const origPlatform = Object.getOwnPropertyDescriptor(process, 'platform');
13
+ const origError = output.error;
14
+ let captured = '';
15
+ output.error = (msg) => { captured += String(msg); };
16
+ Object.defineProperty(process, 'platform', { value: plat, configurable: true });
17
+ try {
18
+ const program = new Command();
19
+ register(program);
20
+ program.parse(['node', 'unbound', 'discover', 'status']);
21
+ return captured;
22
+ } finally {
23
+ Object.defineProperty(process, 'platform', origPlatform);
24
+ output.error = origError;
25
+ process.exitCode = 0;
26
+ }
27
+ }
28
+
29
+ test('discover status guidance on Linux offers the systemd timer check', () => {
30
+ const msg = guidanceOnPlatform('linux');
31
+ assert.match(msg, /systemctl --user status unbound-scheduled\.timer/);
32
+ });
33
+
34
+ test('discover status guidance on Linux also offers the crontab fallback', () => {
35
+ const msg = guidanceOnPlatform('linux');
36
+ assert.match(msg, /crontab -l \| grep 'ai\.getunbound\.scheduled'/);
37
+ });