@rnbsolucoes/axion-code 0.1.3 → 0.1.5

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
@@ -19,7 +19,9 @@ This MVP follows the PREVC-P documentation package in `.context/`:
19
19
  - Axion Desktop fallback provider presets, including OpenAI-compatible and Anthropic-compatible endpoints;
20
20
  - shared Axion Desktop/CLI provider, model and permission stores under `%USERPROFILE%\.axion`;
21
21
  - Pi Agent assets in inspect/import-only mode;
22
- - MCP probe/list/read-only posture.
22
+ - native dotcontext and MCP management posture;
23
+ - plan-scoped PREVC + A learning consolidation through `/learn`;
24
+ - shared plugin and native isolated subagent catalogs.
23
25
 
24
26
  ## MVP Commands
25
27
 
@@ -45,6 +47,15 @@ axion-code graphics doctor
45
47
  axion-code graphics logo
46
48
  axion-code graphics logo --mode sixel --width 180
47
49
  axion-code mcp list --json
50
+ axion-code mcp add sample --command node --arg server.js
51
+ axion-code mcp enable sample
52
+ axion-code mcp disable sample
53
+ axion-code mcp remove sample
54
+ axion-code mcp import .\mcp-servers.json
55
+ axion-code plugins list --json
56
+ axion-code agents list --json
57
+ axion-code agents run bug-hunter "review this login flow"
58
+ axion-code learn --json
48
59
  axion-code package inspect <path>
49
60
  ```
50
61
 
@@ -142,18 +153,26 @@ Without npm:
142
153
  go build -o "$env:LOCALAPPDATA\AxionCode\bin\axion-code.exe" ./cmd/axion-code
143
154
  ```
144
155
 
145
- Provider and model configuration is shared with Axion Desktop:
156
+ Provider catalog/configuration is shared with Axion Desktop, while the active
157
+ Axion Code selection is isolated:
146
158
 
147
159
  ```text
148
160
  %USERPROFILE%\.axion\harness\providers.json
149
- %USERPROFILE%\.axion\harness\active_profile
161
+ %USERPROFILE%\.axion\harness\active_profile # Axion Desktop active profile
162
+ %USERPROFILE%\.axion\harness\active_profile_cli # Axion Code active profile
163
+ %USERPROFILE%\.axion\harness\selection_cli.json # Axion Code active model/params
150
164
  %USERPROFILE%\.axion\axion-mode.json
151
165
  %USERPROFILE%\.axion\sessions\axion.db
166
+ %USERPROFILE%\.axion\mcp-servers.json
167
+ %USERPROFILE%\.axion\plugins.json
168
+ %USERPROFILE%\.axion\sub-agents.json
152
169
  ```
153
170
 
154
171
  OpenRouter uses `OPENROUTER_API_KEY` from the environment or a `secret:<NAME>` reference stored in `C:\Israel\Pesoal\secrets.env` (override for tests: `AXION_SECRETS_ENV`). Provider profile config stores only references, never the key value.
155
172
 
156
- For test/dev isolation, set `AXION_HOME` to a temporary folder. In normal use, leave it unset so Desktop and CLI remain two surfaces of the same Axion harness.
173
+ For test/dev isolation, set `AXION_HOME` to a temporary folder. In normal use,
174
+ leave it unset so Desktop and CLI share the same provider catalog while keeping
175
+ their active provider/model selections independent.
157
176
 
158
177
  The interactive TUI supports:
159
178
 
@@ -163,12 +182,52 @@ The interactive TUI supports:
163
182
  /provider set <profile-id>
164
183
  /model
165
184
  /permission
185
+ /mcp
186
+ /learn
187
+ /plugins
188
+ /agents
189
+ /agents run <id> <prompt>
166
190
  ```
167
191
 
168
192
  Slash palette behavior: `↑/↓` selects, `Tab` completes the selected command, `Enter` executes the selected command, `Esc` closes active menus/wizards.
169
193
 
170
194
  `/model` pulls the active provider's `/models` endpoint when credentials are configured. Reasoning and fast-mode steps appear only when the selected model metadata exposes those parameters.
171
195
 
196
+ `/learn` consolidates plan-scoped learning from `.brv/plans/<plan-id>` and `.context/learning-candidates*.md`, filters low-signal material, deduplicates by content hash/summary and promotes relevant notes into native dotcontext at `<workspace>/.axion/context`.
197
+
198
+ `/mcp` opens an inline MCP list. Enabled servers can be disabled, disabled servers can be enabled, and non-native servers can be uninstalled while preserving valid `mcp-servers.json` formatting.
199
+
200
+ `/agents` lists the native isolated subagents. `/agents run <id> <prompt>` calls one with an isolated prompt while inheriting the active provider/model from the main agent. The subagent returns findings/action feedback instead of joining the main context by default.
201
+
202
+ ## MCP, Plugins And Subagents
203
+
204
+ MCP import files use the same JSON array shape as `%USERPROFILE%\.axion\mcp-servers.json`:
205
+
206
+ ```json
207
+ [
208
+ {
209
+ "id": "context7",
210
+ "name": "Context7",
211
+ "transport": "stdio",
212
+ "command": "npx",
213
+ "args": ["-y", "@upstash/context7-mcp"],
214
+ "enabled": false,
215
+ "read_only": true
216
+ }
217
+ ]
218
+ ```
219
+
220
+ `axion mcp import <file.json>` merges by `id`, preserves `native` protection for built-ins, writes formatted JSON, and rejects entries without `id` or without the required `command`/`url` for the selected transport. Native MCPs such as `dotcontext` cannot be removed, only disabled.
221
+
222
+ Plugins are read from the same shared Axion Desktop file, `%USERPROFILE%\.axion\plugins.json`. The CLI can list, enable, disable and remove plugin records, but executable plugin installation remains intentionally gated for the next trust-policy cycle.
223
+
224
+ Subagents are stored in `%USERPROFILE%\.axion\sub-agents.json`. The initial catalog has 15 native entries:
225
+
226
+ - Programming: `code-reviewer`, `bug-hunter`, `security-reviewer`, `performance-reviewer`, `frontend-ux-reviewer`.
227
+ - Professional: `product-strategist`, `business-analyst`, `financial-analyst`, `legal-policy-reviewer`, `marketing-strategist`, `sales-ops-analyst`, `customer-success-advisor`, `data-analyst`, `operations-advisor`, `hr-talent-advisor`.
228
+
229
+ Execution contract: subagents inherit the active provider/model, receive an isolated prompt containing only their role and the requested task, do not access the main hidden context unless explicitly included in the prompt, and return findings/evidence/actions back to the main timeline.
230
+
172
231
  Provider menu actions:
173
232
 
174
233
  ```text
@@ -204,4 +263,5 @@ This is a functional direction MVP, not the full harness:
204
263
  - initial chat splash shows the Axion logo and system name until the first interaction;
205
264
  - no tool execution yet;
206
265
  - no executable Pi RPC bridge yet;
207
- - no MCP transport execution yet.
266
+ - no MCP transport execution yet;
267
+ - native subagent execution is prompt-isolated and provider/model-inherited; richer multi-subagent orchestration, streaming and budget telemetry remain next-cycle items.
package/npm/bin/axion.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawnSync } from "node:child_process";
3
- import { chmodSync, copyFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
3
+ import { chmodSync, copyFileSync, existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
4
4
  import https from "node:https";
5
5
  import { dirname, join, resolve } from "node:path";
6
6
  import { fileURLToPath } from "node:url";
@@ -50,7 +50,7 @@ function installPackagedBinary() {
50
50
  if (!isWindows) {
51
51
  chmodSync(exePath, 0o755);
52
52
  }
53
- writeFileSync(markerPath, `${packageJSON.version}\n`, "utf8");
53
+ writeFileSync(markerPath, `${packagedBinaryMarker()}\n`, "utf8");
54
54
  return true;
55
55
  }
56
56
 
@@ -64,13 +64,14 @@ function buildFromSource() {
64
64
  if (result.status !== 0) {
65
65
  return false;
66
66
  }
67
- writeFileSync(markerPath, `${packageJSON.version}\n`, "utf8");
67
+ writeFileSync(markerPath, `${sourceBinaryMarker()}\n`, "utf8");
68
68
  return true;
69
69
  }
70
70
 
71
71
  function ensureBinary() {
72
72
  const marker = existsSync(markerPath) ? readFileSync(markerPath, "utf8").trim() : "";
73
- if (existsSync(exePath) && marker === packageJSON.version) {
73
+ const desiredMarker = existsSync(packagedExePath) ? packagedBinaryMarker() : sourceBinaryMarker();
74
+ if (existsSync(exePath) && marker === desiredMarker) {
74
75
  return;
75
76
  }
76
77
  mkdirSync(binDir, { recursive: true });
@@ -88,6 +89,19 @@ function ensureBinary() {
88
89
  process.exit(1);
89
90
  }
90
91
 
92
+ function packagedBinaryMarker() {
93
+ try {
94
+ const stat = statSync(packagedExePath);
95
+ return `${packageJSON.version}|${platformKey}|pkg|${stat.size}|${Math.trunc(stat.mtimeMs)}`;
96
+ } catch {
97
+ return `${packageJSON.version}|${platformKey}|pkg`;
98
+ }
99
+ }
100
+
101
+ function sourceBinaryMarker() {
102
+ return `${packageJSON.version}|${platformKey}|source`;
103
+ }
104
+
91
105
  function semverParts(value) {
92
106
  return String(value || "")
93
107
  .trim()
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rnbsolucoes/axion-code",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Axion Code CLI harness for the Axion ecosystem.",
5
5
  "type": "module",
6
6
  "repository": {