@vtxmacro/cli 2026.6.22 → 2026.8.11

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 (4) hide show
  1. package/README.md +85 -8
  2. package/bin/vtx-mcp.js +1 -28
  3. package/bin/vtx.js +46631 -14200
  4. package/package.json +9 -6
package/README.md CHANGED
@@ -2,16 +2,21 @@
2
2
 
3
3
  Command-line and MCP access for VTX Macro automation.
4
4
 
5
- ## Install
5
+ ## Install or update
6
6
 
7
7
  ```bash
8
8
  npm install -g @vtxmacro/cli
9
+ vtx --version
9
10
  ```
10
11
 
12
+ The host supports Windows x64 and Linux x64, including WSL. The package installs
13
+ the exact supported OpenAI Codex runtime for those platforms.
14
+ The VTX host verifies that native runtime's version and digest before use; it
15
+ does not borrow a Codex binary from PATH or an editor extension.
16
+
11
17
  ## Configure
12
18
 
13
19
  ```bash
14
- export VTX_API_URL="https://api.vtxmacro.com"
15
20
  export VTX_PROFILE_ID="<profile-id>"
16
21
  vtx auth login --scopes read,bot:control
17
22
  ```
@@ -22,14 +27,8 @@ vtx auth login --scopes read,bot:control
22
27
  vtx --json auth whoami
23
28
  vtx --json bots status
24
29
  vtx --profile <profile-id> runtime run --follow
25
- vtx auth login --scopes read,insights:connect
26
- vtx --profile <profile-id> insights connect
27
30
  ```
28
31
 
29
- The Insights connector talks only to a loopback OpenAI-compatible model server.
30
- It defaults to LM Studio at `http://127.0.0.1:1234/v1` and reads its optional
31
- API key from `LM_STUDIO_API_KEY`. The key and local URL never leave the device.
32
-
33
32
  ## MCP
34
33
 
35
34
  Configure your MCP-compatible agent app to start:
@@ -39,3 +38,81 @@ vtx-mcp
39
38
  ```
40
39
 
41
40
  The CLI and MCP server use the same saved token and environment variables.
41
+
42
+ ## Agent inference hosts
43
+
44
+ Both paths use a separate least-privilege `insights:inference` OAuth grant.
45
+ VTX never receives an agent vendor password, OAuth token, or subscription
46
+ credential.
47
+
48
+ ### Automated Codex host
49
+
50
+ ```bash
51
+ vtx inference-host login
52
+ vtx inference-host codex-login
53
+ vtx inference-host doctor --json
54
+ vtx inference-host run
55
+ vtx inference-host status --json
56
+ vtx inference-host logout
57
+ vtx inference-host codex-logout
58
+ vtx inference-host revoke
59
+ ```
60
+
61
+ This foreground host uses a separate least-privilege `insights:inference`
62
+ OAuth grant. It also keeps its ChatGPT subscription login in a dedicated private
63
+ Codex home. Neither credential is copied from or widens the ordinary CLI or Codex
64
+ session. VTX logout/revoke and Codex logout are intentionally separate operations.
65
+
66
+ ### Any compatible agent harness
67
+
68
+ Codex, Claude Code, Cursor, GitHub Copilot, Antigravity, and other agents that can
69
+ run shell commands can use their existing first-party session without a
70
+ VTX-owned vendor adapter:
71
+
72
+ ```bash
73
+ vtx inference-host login
74
+ vtx inference-host agent-connect \
75
+ --adapter <lowercase-harness-id> \
76
+ --model <exact-model-id> \
77
+ --model-label "<display label>" \
78
+ --effort <reasoning-effort> \
79
+ --json
80
+ vtx inference-host agent-next --wait-seconds 50 --json
81
+ ```
82
+
83
+ `agent-next` returns separate exact `system_prompt`, `user_prompt`,
84
+ `context_json`, and `output_schema_json` fields. The agent reasons in its own
85
+ session, then writes one JSON object to `agent-complete` stdin. At minimum that
86
+ object contains a `result` string. If the harness exposes exact token usage,
87
+ include the published usage object; otherwise VTX records usage as explicitly
88
+ unavailable. For `agent-fail`, choose the truthful dispatch state and set
89
+ `retryable` true only when a fresh attempt is safe:
90
+
91
+ ```json
92
+ {"dispatch_outcome":"not_dispatched","failure_category":"adapter","failure_code":"harness_unavailable","retryable":true}
93
+ {"dispatch_outcome":"confirmed_dispatched","failure_category":"adapter","failure_code":"no_reliable_result","retryable":false}
94
+ {"dispatch_outcome":"outcome_unknown","failure_category":"transport","failure_code":"dispatch_confirmation_lost","retryable":false}
95
+ ```
96
+
97
+ Use `not_dispatched` only when no harness inference began,
98
+ `confirmed_dispatched` when it began but returned no trustworthy result, and
99
+ `outcome_unknown` when dispatch itself cannot be confirmed. Pipe exactly one
100
+ object to `vtx inference-host agent-fail --json`.
101
+
102
+ Keep calling `agent-next` while the host should remain available. This same loop
103
+ supports Main, Review, and Screener; Provider response and Decision candidate;
104
+ and normally running VTX Client Mode or Server Mode bots. Server Mode keeps the
105
+ normal VTX call fee. Client Mode has no VTX platform fee. Neither mode falls back
106
+ to another model when the agent host is unavailable.
107
+
108
+ ## Remove
109
+
110
+ First revoke the VTX inference grant, then uninstall the package. Automated
111
+ Codex users should also remove the dedicated Codex login:
112
+
113
+ ```bash
114
+ vtx inference-host revoke
115
+ # Automated Codex host only:
116
+ vtx inference-host codex-logout
117
+ npm uninstall -g @vtxmacro/cli
118
+ ```
package/bin/vtx-mcp.js CHANGED
@@ -256,33 +256,6 @@ var VtxAgentClient = class _VtxAgentClient {
256
256
  getLlmConfig(profileId) {
257
257
  return this.request("/llm/config", { profileId });
258
258
  }
259
- registerInsightConnector(profileId, payload) {
260
- return this.request("/insights/connectors/register", {
261
- method: "POST",
262
- profileId,
263
- body: payload
264
- });
265
- }
266
- claimInsightConnectorJob(profileId, connectorId, deviceId) {
267
- return this.request(
268
- `/insights/connectors/${encodeURIComponent(connectorId)}/jobs:claim`,
269
- { method: "POST", profileId, body: { device_id: deviceId } }
270
- );
271
- }
272
- completeInsightConnectorJob(profileId, connectorId, jobId, deviceId, payload) {
273
- const params = new URLSearchParams({ device_id: deviceId });
274
- return this.request(
275
- `/insights/connectors/${encodeURIComponent(connectorId)}/jobs/${encodeURIComponent(jobId)}:complete?${params}`,
276
- { method: "POST", profileId, body: payload }
277
- );
278
- }
279
- heartbeatInsightConnectorJob(profileId, connectorId, jobId, deviceId, claimToken) {
280
- const params = new URLSearchParams({ device_id: deviceId });
281
- return this.request(
282
- `/insights/connectors/${encodeURIComponent(connectorId)}/jobs/${encodeURIComponent(jobId)}:heartbeat?${params}`,
283
- { method: "POST", profileId, body: { claim_token: claimToken } }
284
- );
285
- }
286
259
  heartbeatRuntime(profileId, payload, leaseToken) {
287
260
  return this.request("/trading/ai/runtime/heartbeat", {
288
261
  method: "POST",
@@ -995,7 +968,7 @@ async function handleMcpJsonRpcRequest(request, clientFactory = createDefaultMcp
995
968
  },
996
969
  serverInfo: {
997
970
  name: "vtx-macro",
998
- version: "2026.6.22"
971
+ version: "2026.6.23"
999
972
  }
1000
973
  });
1001
974
  }