phonton-cli 0.4.0 → 0.4.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 +4 -4
- package/npm/test-wrapper.js +41 -15
- package/package.json +1 -1
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.4.
|
|
5
|
+
<h1 align="center">Phonton CLI · v0.4.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.4.
|
|
15
|
+
<img alt="release" src="https://img.shields.io/badge/release-v0.4.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>
|
|
@@ -102,7 +102,7 @@ Windows PowerShell:
|
|
|
102
102
|
Direct Cargo install:
|
|
103
103
|
|
|
104
104
|
```bash
|
|
105
|
-
cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.4.
|
|
105
|
+
cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.4.1 phonton-cli --locked --force
|
|
106
106
|
```
|
|
107
107
|
|
|
108
108
|
Check the install:
|
|
@@ -118,7 +118,7 @@ Phonton uses GitHub branches and releases as install channels:
|
|
|
118
118
|
|
|
119
119
|
| Channel | Install | Use when |
|
|
120
120
|
|---|---|---|
|
|
121
|
-
| Stable | `cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.4.
|
|
121
|
+
| Stable | `cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.4.1 phonton-cli --locked --force` | You want the best validated public alpha |
|
|
122
122
|
| Dev | `cargo install --git https://github.com/phonton-dev/phonton-cli --branch dev phonton-cli --locked --force` | You want next-release integration changes |
|
|
123
123
|
| 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 |
|
|
124
124
|
| Main | `cargo install --git https://github.com/phonton-dev/phonton-cli --branch main phonton-cli --locked --force` | You want the current release branch tip |
|
package/npm/test-wrapper.js
CHANGED
|
@@ -18,24 +18,50 @@ if (!binary) {
|
|
|
18
18
|
process.exit(1);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
process.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
21
|
+
function runWrapper(args) {
|
|
22
|
+
const result = spawnSync(process.execPath, [path.join(root, "npm", "bin", "phonton.js"), ...args], {
|
|
23
|
+
cwd: root,
|
|
24
|
+
encoding: "utf8",
|
|
25
|
+
env: {
|
|
26
|
+
...process.env,
|
|
27
|
+
PHONTON_BINARY: binary,
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
process.stdout.write(result.stdout || "");
|
|
32
|
+
process.stderr.write(result.stderr || "");
|
|
33
|
+
|
|
34
|
+
if (result.status !== 0) {
|
|
35
|
+
process.exit(result.status || 1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return result.stdout;
|
|
35
39
|
}
|
|
36
40
|
|
|
41
|
+
const versionOutput = runWrapper(["version"]);
|
|
42
|
+
|
|
37
43
|
const expected = `phonton ${packageJson.version}`;
|
|
38
|
-
if (!
|
|
44
|
+
if (!versionOutput.includes(expected)) {
|
|
39
45
|
console.error(`Expected npm wrapper to report ${expected}.`);
|
|
40
46
|
process.exit(1);
|
|
41
47
|
}
|
|
48
|
+
|
|
49
|
+
const goal = "add input validation to config loading";
|
|
50
|
+
const planOutput = runWrapper(["plan", "--json", "--no-memory", goal]);
|
|
51
|
+
let planJson;
|
|
52
|
+
try {
|
|
53
|
+
planJson = JSON.parse(planOutput);
|
|
54
|
+
} catch (error) {
|
|
55
|
+
console.error(`Expected plan --json to emit parseable JSON: ${error.message}`);
|
|
56
|
+
process.exit(1);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (!planJson.goal_contract) {
|
|
60
|
+
console.error("Expected plan --json to expose goal_contract at the top level.");
|
|
61
|
+
process.exit(1);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (planJson.goal_contract.goal !== goal) {
|
|
65
|
+
console.error("Expected plan --json goal_contract.goal to match the requested goal.");
|
|
66
|
+
process.exit(1);
|
|
67
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phonton-cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.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",
|