phonton-cli 0.2.1 → 0.3.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
@@ -2,7 +2,7 @@
2
2
  <img src="assets/readme/phonton-cli-logo.png" width="112" alt="Phonton CLI logo">
3
3
  </p>
4
4
 
5
- <h1 align="center">Phonton CLI · v0.2.1</h1>
5
+ <h1 align="center">Phonton CLI · v0.3.1</h1>
6
6
 
7
7
  <p align="center">
8
8
  <strong>Verified code changes with repo memory.</strong><br>
@@ -12,7 +12,7 @@
12
12
  <p align="center">
13
13
  <a href="https://github.com/phonton-dev/phonton-cli/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/phonton-dev/phonton-cli/actions/workflows/ci.yml/badge.svg"></a>
14
14
  <a href="https://github.com/phonton-dev/phonton-cli/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/phonton-dev/phonton-cli?style=flat&label=stars"></a>
15
- <img alt="release" src="https://img.shields.io/badge/release-v0.2.1-6c63ff">
15
+ <img alt="release" src="https://img.shields.io/badge/release-v0.3.1-6c63ff">
16
16
  <img alt="license" src="https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue">
17
17
  <img alt="status" src="https://img.shields.io/badge/status-public_alpha-f97316">
18
18
  </p>
@@ -56,7 +56,9 @@ That gives Phonton a different shape from an IDE assistant or a terminal chatbot
56
56
  - `phonton plan` preview for task DAGs before edits happen.
57
57
  - `phonton review` surfaces for verified diff review payloads, approvals, rejections, and rollback.
58
58
  - `phonton memory` commands for inspecting, editing, deleting, pinning, and unpinning local decision memory.
59
- - BYOK provider adapters for Anthropic, OpenAI, OpenRouter, Gemini, AgentRouter, DeepSeek, xAI/Grok, Groq, Together, Ollama, and custom OpenAI-compatible endpoints. `phonton doctor --provider` verifies your configured provider by checking model discovery and a tiny completion call through the same adapter used for runs.
59
+ - `phonton extensions` commands for inspecting resolved skills, steering, MCP servers, profiles, conflicts, and diagnostics.
60
+ - `phonton mcp` commands for listing configured servers and lazily approving tool discovery or tool calls.
61
+ - BYOK provider adapters for Anthropic, OpenAI, OpenRouter, Gemini, Cloudflare Workers AI, AgentRouter, DeepSeek, xAI/Grok, Groq, Together, Ollama, and custom OpenAI-compatible endpoints. `phonton doctor --provider` verifies your configured provider by checking model discovery and a tiny completion call through the same adapter used for runs.
60
62
  - Local store, memory, planner, worker, diff, sandbox, verification, and orchestration crates.
61
63
  - Semantic indexing behind the CLI stack for repo-aware workflows.
62
64
 
@@ -98,7 +100,7 @@ Windows PowerShell:
98
100
  Direct Cargo install:
99
101
 
100
102
  ```bash
101
- cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.2.1 phonton-cli --locked --force
103
+ cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.3.1 phonton-cli --locked --force
102
104
  ```
103
105
 
104
106
  Check the install:
@@ -114,7 +116,7 @@ Phonton uses GitHub branches and releases as install channels:
114
116
 
115
117
  | Channel | Install | Use when |
116
118
  |---|---|---|
117
- | Stable | `cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.2.1 phonton-cli --locked --force` | You want the best validated public alpha |
119
+ | Stable | `cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.3.1 phonton-cli --locked --force` | You want the best validated public alpha |
118
120
  | Dev | `cargo install --git https://github.com/phonton-dev/phonton-cli --branch dev phonton-cli --locked --force` | You want next-release integration changes |
119
121
  | Nightly | `cargo install --git https://github.com/phonton-dev/phonton-cli --branch nightly phonton-cli --locked --force` | You want daily snapshots and can tolerate breakage |
120
122
  | Main | `cargo install --git https://github.com/phonton-dev/phonton-cli --branch main phonton-cli --locked --force` | You want the current release branch tip |
@@ -164,14 +166,24 @@ export ANTHROPIC_API_KEY="..."
164
166
  export OPENAI_API_KEY="..."
165
167
  export GEMINI_API_KEY="..."
166
168
  export OPENROUTER_API_KEY="..."
169
+ export CLOUDFLARE_API_TOKEN="..."
170
+ export CLOUDFLARE_ACCOUNT_ID="..."
167
171
  ```
168
172
 
169
173
  Windows PowerShell:
170
174
 
171
175
  ```powershell
172
176
  $env:GEMINI_API_KEY = "..."
177
+ $env:CLOUDFLARE_API_TOKEN = "..."
178
+ $env:CLOUDFLARE_ACCOUNT_ID = "..."
173
179
  ```
174
180
 
181
+ Cloudflare Workers AI uses the OpenAI-compatible endpoint. Set
182
+ `name = "cloudflare"` and the default model is `@cf/moonshotai/kimi-k2.6`.
183
+ Set `provider.account_id` or `CLOUDFLARE_ACCOUNT_ID` for the Workers AI account.
184
+ `provider.base_url` remains available for a full
185
+ `https://api.cloudflare.com/client/v4/accounts/<id>/ai/v1` base URL override.
186
+
175
187
  Check the install:
176
188
 
177
189
  ```bash
@@ -190,6 +202,8 @@ phonton doctor Check config, store, trust, git, cargo, and Nexus
190
202
  phonton plan <goal> Preview the task DAG without changing files
191
203
  phonton review Show verified diff review payloads
192
204
  phonton memory list Inspect local decision memory
205
+ phonton extensions list Inspect skills, steering, MCP servers, and profiles
206
+ phonton mcp list Show configured MCP servers without starting them
193
207
  phonton config path Print the resolved config file path
194
208
  phonton config show Dump resolved config as TOML
195
209
  phonton version Print version
@@ -218,6 +232,17 @@ phonton memory pin <id>
218
232
  phonton memory delete <id>
219
233
  ```
220
234
 
235
+ Extension visibility:
236
+
237
+ ```bash
238
+ phonton extensions list --json
239
+ phonton extensions doctor --json
240
+ phonton extensions skills --json
241
+ phonton extensions steering --json
242
+ phonton extensions mcp --json
243
+ phonton mcp list --json
244
+ ```
245
+
221
246
  ## How Phonton Handles Context
222
247
 
223
248
  <p align="center">
@@ -5,13 +5,21 @@ const path = require("path");
5
5
  const { spawn, spawnSync } = require("child_process");
6
6
 
7
7
  const binaryName = process.platform === "win32" ? "phonton.exe" : "phonton";
8
- const binaryPath = path.join(__dirname, "..", "vendor", binaryName);
8
+ const configuredBinary = process.env.PHONTON_BINARY || process.env.PHONTON_CLI_BINARY;
9
+ const binaryPath = configuredBinary
10
+ ? path.resolve(configuredBinary)
11
+ : path.join(__dirname, "..", "vendor", binaryName);
9
12
 
10
13
  function ensureBinary() {
11
14
  if (fs.existsSync(binaryPath)) {
12
15
  return;
13
16
  }
14
17
 
18
+ if (configuredBinary) {
19
+ console.error(`Configured Phonton binary does not exist: ${binaryPath}`);
20
+ process.exit(1);
21
+ }
22
+
15
23
  const installScript = path.join(__dirname, "..", "install.js");
16
24
  const result = spawnSync(process.execPath, [installScript], { stdio: "inherit" });
17
25
  if (result.status !== 0 || !fs.existsSync(binaryPath)) {
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require("fs");
4
+ const path = require("path");
5
+ const { spawnSync } = require("child_process");
6
+
7
+ const root = path.resolve(__dirname, "..");
8
+ const packageJson = require(path.join(root, "package.json"));
9
+ const binaryName = process.platform === "win32" ? "phonton.exe" : "phonton";
10
+ const candidates = [
11
+ path.join(root, "target", "release", binaryName),
12
+ path.join(root, "target", "debug", binaryName),
13
+ ];
14
+ const binary = candidates.find((candidate) => fs.existsSync(candidate));
15
+
16
+ if (!binary) {
17
+ console.error("No built Phonton binary found under target/release or target/debug.");
18
+ process.exit(1);
19
+ }
20
+
21
+ const result = spawnSync(process.execPath, [path.join(root, "npm", "bin", "phonton.js"), "version"], {
22
+ cwd: root,
23
+ encoding: "utf8",
24
+ env: {
25
+ ...process.env,
26
+ PHONTON_BINARY: binary,
27
+ },
28
+ });
29
+
30
+ process.stdout.write(result.stdout || "");
31
+ process.stderr.write(result.stderr || "");
32
+
33
+ if (result.status !== 0) {
34
+ process.exit(result.status || 1);
35
+ }
36
+
37
+ const expected = `phonton ${packageJson.version}`;
38
+ if (!result.stdout.includes(expected)) {
39
+ console.error(`Expected npm wrapper to report ${expected}.`);
40
+ process.exit(1);
41
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonton-cli",
3
- "version": "0.2.1",
3
+ "version": "0.3.1",
4
4
  "description": "Local-first agentic development terminal with context packs, source handles, and verification gates.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "homepage": "https://github.com/phonton-dev/phonton-cli#readme",
@@ -17,11 +17,12 @@
17
17
  },
18
18
  "scripts": {
19
19
  "postinstall": "node npm/install.js",
20
- "test:npm-wrapper": "node npm/bin/phonton.js version"
20
+ "test:npm-wrapper": "node npm/test-wrapper.js"
21
21
  },
22
22
  "files": [
23
23
  "npm/bin/phonton.js",
24
24
  "npm/install.js",
25
+ "npm/test-wrapper.js",
25
26
  "README.md",
26
27
  "LICENSE-MIT",
27
28
  "LICENSE-APACHE"