@opute/host-agent 0.3.0 → 0.5.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.
Files changed (3) hide show
  1. package/README.md +5 -4
  2. package/index.js +6 -6
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @opute/host-agent
2
2
 
3
- Downloads and launches the checksum-verified Opute Go host agent as a local
3
+ Downloads and launches the checksum-verified Opute host agent as a local
4
4
  **Streamable HTTP** MCP server. Cursor, VS Code, and Claude Desktop snippets
5
5
  below are copy/paste examples, not named-client certifications.
6
6
 
@@ -38,8 +38,9 @@ Point your MCP client at the printed URL (default port **3014**). When
38
38
  stdio MCP transport is not supported.
39
39
 
40
40
  Safe first-run sequence once the client is connected: `tools/list` → read-only
41
- host/VM inspection tools (for example `get_host_info`, `list_vms`). Mutating
42
- tools stay denied until `OPUTE_STANDALONE_ALLOW_MUTATIONS=true`.
41
+ host/VM inspection tools (for example `get_host_info`, `list_vms`). The
42
+ `MCP_AUTH_TOKEN` bearer stays read-only unless the agent starts with
43
+ `--allow-mutations`; an OAuth client mutates only with the `mutate` scope.
43
44
 
44
45
  ## Commands
45
46
 
@@ -47,6 +48,7 @@ tools stay denied until `OPUTE_STANDALONE_ALLOW_MUTATIONS=true`.
47
48
  |---------|-------------|
48
49
  | `start` | Start standalone Streamable HTTP (foreground by default) |
49
50
  | `start --background` / `-d` | Daemonize, write pid state, print MCP URL |
51
+ | `start --allow-mutations` | Let the `MCP_AUTH_TOKEN` bearer run tools that change the host |
50
52
  | `stop` | Stop a background daemon started by this launcher |
51
53
  | `status` | JSON status (`running`, `healthy`, `url`) |
52
54
  | `url` | Print the MCP URL |
@@ -60,7 +62,6 @@ tools stay denied until `OPUTE_STANDALONE_ALLOW_MUTATIONS=true`.
60
62
  | `OPUTE_REMOTE_AGENT_ID` | Required explicit opaque canonical agent identity |
61
63
  | `MCP_AUTH_TOKEN` | Bearer bootstrap token for `/mcp` |
62
64
  | `OPUTE_HOST_AGENT_BINARY` | Use a local binary instead of downloading a release |
63
- | `OPUTE_STANDALONE_ALLOW_MUTATIONS=true` | Enable mutating infrastructure tools |
64
65
  | `OPUTE_STANDALONE_STATE_DIR` | Local SQLite / operation journal directory |
65
66
 
66
67
  The launcher deliberately strips most other `OPUTE_*` variables so a
package/index.js CHANGED
@@ -305,7 +305,6 @@ function buildAgentEnv(instanceId = '') {
305
305
  || key === 'OPUTE_HOST_AGENT_SHA256'
306
306
  || key === 'OPUTE_LOCAL_HOST_AGENT_RUNTIME_DIR'
307
307
  || key === 'OPUTE_STANDALONE_STATE_DIR'
308
- || key === 'OPUTE_STANDALONE_ALLOW_MUTATIONS'
309
308
  || key === 'OPUTE_STANDALONE_ALLOW_INSECURE_DOWNLOADS'
310
309
  || key === 'OPUTE_INFRA_PROVIDER_ID'
311
310
  ) {
@@ -314,7 +313,6 @@ function buildAgentEnv(instanceId = '') {
314
313
  delete env[key]
315
314
  }
316
315
  }
317
- env.OPUTE_AGENT_MODE = 'standalone'
318
316
  if (instanceId) env.OPUTE_LOCAL_HOST_AGENT_INSTANCE_ID = instanceId
319
317
  env.HOST_MCP_BIND_HOST = bindHost()
320
318
  env.HOST_MCP_PORT = String(mcpPort())
@@ -333,7 +331,10 @@ function printUsage() {
333
331
  console.log(`Usage: opute-host-agent <command>
334
332
 
335
333
  Commands:
336
- start [--background|-d] Start standalone Streamable HTTP MCP (default: foreground)
334
+ start [--background|-d] [--allow-mutations]
335
+ Start standalone Streamable HTTP MCP (default: foreground).
336
+ --allow-mutations lets MCP_AUTH_TOKEN run tools that change
337
+ the host; without it the agent is read-only.
337
338
  stop Stop a background daemon started by this launcher
338
339
  status Show daemon/listener status and MCP URL
339
340
  url Print the MCP URL (http://127.0.0.1:3014/mcp by default)
@@ -344,7 +345,6 @@ Environment:
344
345
  OPUTE_REMOTE_AGENT_ID Required explicit opaque canonical agent id
345
346
  MCP_AUTH_TOKEN Bearer token required by /mcp when set
346
347
  OPUTE_HOST_AGENT_BINARY Use a local binary instead of downloading a release
347
- OPUTE_STANDALONE_ALLOW_MUTATIONS=true Enable mutating tools
348
348
 
349
349
  MCP client config (include Authorization when MCP_AUTH_TOKEN is set):
350
350
  {
@@ -360,7 +360,7 @@ async function startForeground(binary, passthroughArgs) {
360
360
  const port = mcpPort()
361
361
  const url = mcpUrl(host, port)
362
362
  console.error(`starting standalone Streamable HTTP MCP at ${url}`)
363
- const child = spawn(binary, ['--mode=standalone', '--transport=http', ...passthroughArgs], {
363
+ const child = spawn(binary, ['--transport=http', ...passthroughArgs], {
364
364
  stdio: 'inherit',
365
365
  env: buildAgentEnv(),
366
366
  })
@@ -402,7 +402,7 @@ async function startBackground(binary, passthroughArgs) {
402
402
  fs.mkdirSync(runtimeDir(), { recursive: true, mode: 0o700 })
403
403
  const logPath = path.join(runtimeDir(), 'daemon.log')
404
404
  const logFd = fs.openSync(logPath, 'a')
405
- const child = spawn(binary, ['--mode=standalone', '--transport=http', ...passthroughArgs], {
405
+ const child = spawn(binary, ['--transport=http', ...passthroughArgs], {
406
406
  detached: true,
407
407
  stdio: ['ignore', logFd, logFd],
408
408
  env: buildAgentEnv(instanceId),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opute/host-agent",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Local Streamable HTTP launcher for the Opute host agent",
5
5
  "license": "MIT",
6
6
  "repository": {