@intflow/sentinelctl 0.7.0 → 0.7.1

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
@@ -36,7 +36,7 @@ Credentials live in `~/.config/sentinelctl/credentials.json` (Linux/macOS) or `%
36
36
  An access key is a long-lived credential for MCP clients and scripts. It carries your account and your current role, and it keeps working without any browser or CLI login: logging out, an expired web session or a revoked CLI token do not affect it.
37
37
 
38
38
  ```bash
39
- sentinelctl access create "Claude Code on laptop" # prints the key once
39
+ sentinelctl access create "work laptop" # prints the key once
40
40
  sentinelctl access list
41
41
  sentinelctl access revoke <key-id>
42
42
  ```
@@ -45,13 +45,16 @@ sentinelctl access revoke <key-id>
45
45
  - Up to 10 keys per person. Keys are created and revoked only from a web or CLI login, never with another key.
46
46
  - The key stops working when you revoke it or an admin disables your account. A role change applies on the next request.
47
47
 
48
- The console serves every command of this CLI as a remote MCP tool at `/api/mcp/` (Streamable HTTP). Nothing is installed on the client, and new server releases update the tools.
48
+ The console serves every command of this CLI as a remote MCP tool at `/api/mcp/` (Streamable HTTP). Nothing is installed on the client, and new server releases update the tools. Any MCP client that supports Streamable HTTP with custom headers can connect:
49
49
 
50
- ```bash
51
- claude mcp add --transport http sentinel https://monitor.intflow.dev/api/mcp/ --header "Authorization: Bearer sentinel_..."
50
+ - URL: `https://monitor.intflow.dev/api/mcp/`
51
+ - Header: `Authorization: Bearer <access key>`
52
+
53
+ ```json
54
+ { "mcpServers": { "sentinel": { "type": "http", "url": "https://monitor.intflow.dev/api/mcp/", "headers": { "Authorization": "Bearer sentinel_..." } } } }
52
55
  ```
53
56
 
54
- Other clients: URL `https://monitor.intflow.dev/api/mcp/`, header `Authorization: Bearer <access key>`. Tools are named `sentinel_<group>_<command>` (for example `sentinel_logs_stats`) and take the same options; the tool list contains only what your role may run. The same key also works as `SENTINEL_TOKEN` for this CLI.
57
+ Clients that register servers by command take the same two values, for example `claude mcp add --transport http sentinel https://monitor.intflow.dev/api/mcp/ --header "Authorization: Bearer sentinel_..."`. Tools are named `sentinel_<group>_<command>` (for example `sentinel_logs_stats`) and take the same options; the tool list contains only what your role may run. The same key also works as `SENTINEL_TOKEN` for this CLI.
55
58
 
56
59
  ## Getting help
57
60
 
@@ -161,7 +164,7 @@ The server tells the CLI the latest version; when a newer one exists the CLI pri
161
164
  GitHub Actions publishes both packages (`.github/workflows/publish-cli.yml`) with npm trusted publishing, so no npm token is stored.
162
165
 
163
166
  1. Bump `cli/package.json`, `cli/unscoped/package.json` (version and its `@intflow/sentinelctl` dependency) and `cliLatestVersion` in `config/dashboard.json` to the same version; `node scripts/check-cli-release.mjs` checks this.
164
- 2. Commit, then push a tag: `git tag cli-v0.7.0 && git push origin cli-v0.7.0`.
167
+ 2. Commit, then push a tag: `git tag cli-v0.7.1 && git push origin cli-v0.7.1`.
165
168
  3. The workflow runs the CLI checks and tests, publishes `@intflow/sentinelctl`, waits for the registry, then publishes the `sentinelctl` alias. Versions already on npm are skipped. Run it manually (Actions → publish-cli) to verify and pack without publishing.
166
169
 
167
170
  One-time setup on npmjs.com, for each of the two packages: Settings → Trusted Publisher → GitHub Actions, organization or user `yeon3724`, repository `sentinel-fleet-console`, workflow `publish-cli.yml`, environment `npm`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intflow/sentinelctl",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Sentinel Fleet Console CLI: search device logs, inspect status and metrics, edit metadata, manage roles and create access keys for MCP",
5
5
  "type": "module",
6
6
  "bin": {
package/src/commands.mjs CHANGED
@@ -740,7 +740,7 @@ async function metadataExport(context, { options }) {
740
740
  context.note(`Saved metadata for ${body.devices?.length ?? 0} devices to ${options.file}.`);
741
741
  return;
742
742
  }
743
- context.out(JSON.stringify(body, null, 2));
743
+ emit(context, body, () => JSON.stringify(body, null, 2));
744
744
  }
745
745
 
746
746
  async function metadataImport(context, { options, positionals }) {
@@ -799,7 +799,7 @@ async function accessList(context) {
799
799
 
800
800
  async function accessCreate(context, { positionals }) {
801
801
  const name = positionals.join(' ').trim();
802
- if (!name) throw new UsageError('A key name is required.', { hint: 'Example: sentinelctl access create "Claude Code on laptop"' });
802
+ if (!name) throw new UsageError('A key name is required.', { hint: 'Example: sentinelctl access create "work laptop"' });
803
803
  const key = await context.client.post('/api/access', { name });
804
804
  const mcpUrl = new URL('/api/mcp/', context.client.server).href;
805
805
  emit(context, { ...key, mcpUrl }, () => [
@@ -807,7 +807,7 @@ async function accessCreate(context, { positionals }) {
807
807
  '',
808
808
  key.token,
809
809
  ].join('\n'));
810
- context.hint(`Shown once; store it now. Connect an MCP client: claude mcp add --transport http sentinel ${mcpUrl} --header "Authorization: Bearer <key>"`);
810
+ context.hint(`Shown once; store it now. Any MCP client that speaks Streamable HTTP connects with URL ${mcpUrl} and header "Authorization: Bearer <key>".`);
811
811
  }
812
812
 
813
813
  async function accessRevoke(context, { positionals }) {
@@ -1211,7 +1211,7 @@ const commands = [
1211
1211
  summary: 'Create an access key for MCP clients and scripts (shown once)',
1212
1212
  description: 'The key carries your account and role, works without a browser or CLI login, lasts 30 days and gains 7 more days whenever it is used a week or more after the last extension. Up to 10 keys per person.',
1213
1213
  args: [{ name: 'name', description: 'A label to recognise the key by, 1-80 characters.' }], options: {},
1214
- examples: ['sentinelctl access create "Claude Code on laptop"', 'sentinelctl access create ci -o json --select token'],
1214
+ examples: ['sentinelctl access create "work laptop"', 'sentinelctl access create ci -o json --select token'],
1215
1215
  output: '{id, name, createdAt, lastUsedAt, expiresAt, token, mcpUrl}. The token is never shown again.',
1216
1216
  },
1217
1217
  {
package/src/main.mjs CHANGED
@@ -134,8 +134,8 @@ const agentGuide = `sentinelctl for AI agents
134
134
 
135
135
  Setup A human runs \`sentinelctl login\` once (30 days), or set SENTINEL_URL and SENTINEL_TOKEN
136
136
  (an access key from \`sentinelctl access create <name>\` works and renews itself while used).
137
- MCP The same commands are remote MCP tools at <server>/api/mcp/ with the header
138
- Authorization: Bearer <access key>. Nothing to install; the server updates the tools.
137
+ MCP The same commands are remote MCP tools for any Streamable HTTP client: URL <server>/api/mcp/,
138
+ header Authorization: Bearer <access key>. Nothing to install; the server updates the tools.
139
139
  Output Use -o json. stdout is data; notes, hints and errors go to stderr (--quiet drops notes).
140
140
  Errors One stderr line {"error":{status,code,message,hint,exitCode}}; messages are Korean, hints English.
141
141
  Exit 0 ok · 1 server/network (retry later) · 2 usage (fix arguments) · 3 login/role/too old (stop).