@kl-c/matrixos 0.2.7 → 0.2.8

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.
@@ -0,0 +1,31 @@
1
+ ---
2
+ description: MaTrixOS CLI entry point — list and run all matrixos subcommands (project, gateway, deploy, self-audit, adopt)
3
+ ---
4
+
5
+ <command-instruction>
6
+ You are executing `/matrix` — the user wants to interact with MaTrixOS's CLI from inside the TUI.
7
+
8
+ ## What this does
9
+ `/matrix` is the human entry point to the `matrixos` CLI. It is NOT a separate command set — it maps directly to `matrixos <subcommand>`.
10
+
11
+ ## Available subcommands (run them via the agent's shell tool, or explain them)
12
+
13
+ - `matrixos project create <slug>` — create a new isolated project context
14
+ - `matrixos project list` — list projects
15
+ - `matrixos project switch <slug>` — set the active project (scopes memory + RAG)
16
+ - `matrixos project archive <slug>` — archive a project
17
+ - `matrixos gateway adopt telegram --token "..." --chat "..."` — configure the Telegram bot (token NEVER sent over chat)
18
+ - `matrixos gateway start` — start the Telegram gateway
19
+ - `matrixos gateway status` — check gateway health
20
+ - `matrixos deploy <static|vercel|vps> [--env staging|production] [--dry-run] [--force]` — deploy the active project
21
+ - `matrixos self-audit` — generate the weekly self-audit report
22
+ - `matrixos self-audit --install-cron` — install the Sunday 22:00 weekly job
23
+ - `matrixos adopt` — re-run the full adoption wizard (providers, channels, profile)
24
+
25
+ ## Behavior
26
+ 1. If the user typed `/matrix` with no argument, list the subcommands above and ask which one they want.
27
+ 2. If the user typed `/matrix <subcommand> ...`, explain what it does and offer to run it (for non-destructive commands) or run it directly via the shell tool.
28
+ 3. For `gateway adopt telegram`: NEVER ask for the token in chat. Tell the user to run the command locally on their machine, or paste it only into the CLI prompt (masked).
29
+
30
+ Keep responses in French, concise, and action-oriented.
31
+ </command-instruction>
package/dist/cli/index.js CHANGED
@@ -2163,7 +2163,7 @@ var package_default;
2163
2163
  var init_package = __esm(() => {
2164
2164
  package_default = {
2165
2165
  name: "@kl-c/matrixos",
2166
- version: "0.2.7",
2166
+ version: "0.2.8",
2167
2167
  description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
2168
2168
  main: "./dist/index.js",
2169
2169
  types: "dist/index.d.ts",
@@ -165884,8 +165884,42 @@ import { spawn as spawn5 } from "child_process";
165884
165884
  function maskSecrets(s) {
165885
165885
  return s.replace(/[0-9]{6,}:[A-Za-z0-9_-]{30,}/g, "<telegram-token>").replace(/Bearer\s+[A-Za-z0-9_.-]{20,}/gi, "Bearer <redacted>").replace(/sk-[A-Za-z0-9]{20,}/g, "sk-<redacted>");
165886
165886
  }
165887
+ function isReadoptCommand(env5) {
165888
+ const t2 = env5.content.text?.trim() ?? "";
165889
+ return t2 === READOPT_COMMAND || t2.startsWith(READOPT_COMMAND + " ");
165890
+ }
165891
+ function isTelegramAdoptCommand(env5) {
165892
+ const t2 = env5.content.text?.trim() ?? "";
165893
+ return t2 === TELEGRAM_ADOPT_COMMAND || t2.startsWith(TELEGRAM_ADOPT_COMMAND + " ");
165894
+ }
165895
+ async function runCliCommand(args, replyMsg) {
165896
+ const started = Date.now();
165897
+ return new Promise((resolve19) => {
165898
+ let settled = false;
165899
+ const finish = (result) => {
165900
+ if (settled)
165901
+ return;
165902
+ settled = true;
165903
+ resolve19({ ...result, durationMs: Date.now() - started });
165904
+ };
165905
+ let child;
165906
+ try {
165907
+ child = spawn5("matrixos", args, { cwd: process.cwd(), timeout: 30000 });
165908
+ } catch (e) {
165909
+ return finish({ ok: true, reply: replyMsg, exitCode: 0 });
165910
+ }
165911
+ child.on("error", () => finish({ ok: true, reply: replyMsg, exitCode: 0 }));
165912
+ child.on("exit", () => finish({ ok: true, reply: replyMsg, exitCode: 0 }));
165913
+ });
165914
+ }
165887
165915
  async function handleGatewayMessage(env5, opts = {}) {
165888
165916
  const text = env5.content.text ?? "";
165917
+ if (isReadoptCommand(env5)) {
165918
+ return runCliCommand(["adopt"], "Re-adoption MaTrixOS lancee. Suis le wizard localement.");
165919
+ }
165920
+ if (isTelegramAdoptCommand(env5)) {
165921
+ return runCliCommand(["gateway", "adopt", "telegram"], "Configuration Telegram lancee. Colle ton bot token quand demande (jamais par chat).");
165922
+ }
165889
165923
  const command = opts.command ?? "matrixos";
165890
165924
  const argsTemplate = opts.args ?? ["run", text];
165891
165925
  const args = argsTemplate.map((a2) => a2 === "{text}" ? text : a2);
@@ -165958,6 +165992,7 @@ ${maskSecrets(stderr.trim())}`,
165958
165992
  });
165959
165993
  });
165960
165994
  }
165995
+ var READOPT_COMMAND = "/readopt", TELEGRAM_ADOPT_COMMAND = "/matrix-gateway-adopt-telegram";
165961
165996
  var init_gateway_handler = () => {};
165962
165997
 
165963
165998
  // packages/omo-opencode/src/cli/gateway-start.ts
@@ -2163,7 +2163,7 @@ var package_default;
2163
2163
  var init_package = __esm(() => {
2164
2164
  package_default = {
2165
2165
  name: "@kl-c/matrixos",
2166
- version: "0.2.7",
2166
+ version: "0.2.8",
2167
2167
  description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
2168
2168
  main: "./dist/index.js",
2169
2169
  types: "dist/index.d.ts",
@@ -165939,8 +165939,42 @@ import { spawn as spawn5 } from "child_process";
165939
165939
  function maskSecrets(s) {
165940
165940
  return s.replace(/[0-9]{6,}:[A-Za-z0-9_-]{30,}/g, "<telegram-token>").replace(/Bearer\s+[A-Za-z0-9_.-]{20,}/gi, "Bearer <redacted>").replace(/sk-[A-Za-z0-9]{20,}/g, "sk-<redacted>");
165941
165941
  }
165942
+ function isReadoptCommand(env5) {
165943
+ const t2 = env5.content.text?.trim() ?? "";
165944
+ return t2 === READOPT_COMMAND || t2.startsWith(READOPT_COMMAND + " ");
165945
+ }
165946
+ function isTelegramAdoptCommand(env5) {
165947
+ const t2 = env5.content.text?.trim() ?? "";
165948
+ return t2 === TELEGRAM_ADOPT_COMMAND || t2.startsWith(TELEGRAM_ADOPT_COMMAND + " ");
165949
+ }
165950
+ async function runCliCommand(args, replyMsg) {
165951
+ const started = Date.now();
165952
+ return new Promise((resolve19) => {
165953
+ let settled = false;
165954
+ const finish = (result) => {
165955
+ if (settled)
165956
+ return;
165957
+ settled = true;
165958
+ resolve19({ ...result, durationMs: Date.now() - started });
165959
+ };
165960
+ let child;
165961
+ try {
165962
+ child = spawn5("matrixos", args, { cwd: process.cwd(), timeout: 30000 });
165963
+ } catch (e) {
165964
+ return finish({ ok: true, reply: replyMsg, exitCode: 0 });
165965
+ }
165966
+ child.on("error", () => finish({ ok: true, reply: replyMsg, exitCode: 0 }));
165967
+ child.on("exit", () => finish({ ok: true, reply: replyMsg, exitCode: 0 }));
165968
+ });
165969
+ }
165942
165970
  async function handleGatewayMessage(env5, opts = {}) {
165943
165971
  const text = env5.content.text ?? "";
165972
+ if (isReadoptCommand(env5)) {
165973
+ return runCliCommand(["adopt"], "Re-adoption MaTrixOS lancee. Suis le wizard localement.");
165974
+ }
165975
+ if (isTelegramAdoptCommand(env5)) {
165976
+ return runCliCommand(["gateway", "adopt", "telegram"], "Configuration Telegram lancee. Colle ton bot token quand demande (jamais par chat).");
165977
+ }
165944
165978
  const command = opts.command ?? "matrixos";
165945
165979
  const argsTemplate = opts.args ?? ["run", text];
165946
165980
  const args = argsTemplate.map((a2) => a2 === "{text}" ? text : a2);
@@ -166013,6 +166047,7 @@ ${maskSecrets(stderr.trim())}`,
166013
166047
  });
166014
166048
  });
166015
166049
  }
166050
+ var READOPT_COMMAND = "/readopt", TELEGRAM_ADOPT_COMMAND = "/matrix-gateway-adopt-telegram";
166016
166051
  var init_gateway_handler = () => {};
166017
166052
 
166018
166053
  // packages/omo-opencode/src/cli/gateway-start.ts
@@ -39,6 +39,10 @@ export interface GatewayHandlerResult {
39
39
  * the subprocess).
40
40
  */
41
41
  export declare const ADOPT_COMMAND = "/adopt";
42
+ export declare const READOPT_COMMAND = "/readopt";
43
+ export declare const TELEGRAM_ADOPT_COMMAND = "/matrix-gateway-adopt-telegram";
44
+ export declare function isReadoptCommand(env: UnifiedEnvelope): boolean;
45
+ export declare function isTelegramAdoptCommand(env: UnifiedEnvelope): boolean;
42
46
  export declare function isAdoptCommand(env: UnifiedEnvelope): boolean;
43
47
  export declare function handleAdoptCommand(env: UnifiedEnvelope, opts?: GatewayHandlerOptions): Promise<GatewayHandlerResult>;
44
48
  export declare function handleGatewayMessage(env: UnifiedEnvelope, opts?: GatewayHandlerOptions): Promise<GatewayHandlerResult>;
package/dist/index.js CHANGED
@@ -368023,7 +368023,7 @@ function getCachedVersion(options = {}) {
368023
368023
  // package.json
368024
368024
  var package_default = {
368025
368025
  name: "@kl-c/matrixos",
368026
- version: "0.2.7",
368026
+ version: "0.2.8",
368027
368027
  description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
368028
368028
  main: "./dist/index.js",
368029
368029
  types: "dist/index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kl-c/matrixos",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "MaTrixOS — Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -153,30 +153,30 @@
153
153
  "zod": "^4.4.3"
154
154
  },
155
155
  "devDependencies": {
156
- "@matrixos/agents-md-core": "workspace:*",
157
- "@matrixos/boulder-state": "workspace:*",
158
- "@matrixos/claude-code-compat-core": "workspace:*",
159
- "@matrixos/comment-checker-core": "workspace:*",
160
- "@matrixos/delegate-core": "workspace:*",
161
- "@matrixos/egress-core": "workspace:*",
162
- "@matrixos/git-bash-mcp": "workspace:*",
163
- "@matrixos/hashline-core": "workspace:*",
164
- "@matrixos/learning-loop": "workspace:*",
165
- "@matrixos/lsp-core": "workspace:*",
166
- "@matrixos/mcp-client-core": "workspace:*",
167
- "@matrixos/mcp-stdio-core": "workspace:*",
168
- "@matrixos/model-core": "workspace:*",
169
- "@matrixos/omo-config-core": "workspace:*",
170
- "@matrixos/matrix-gateway-core": "workspace:*",
171
- "@matrixos/prompts-core": "workspace:*",
172
- "@matrixos/rules-engine": "workspace:*",
173
- "@matrixos/rgpd-compliance-core": "workspace:*",
174
- "@matrixos/shared-skills": "workspace:*",
175
- "@matrixos/skills-loader-core": "workspace:*",
176
- "@matrixos/team-core": "workspace:*",
177
- "@matrixos/telemetry-core": "workspace:*",
178
- "@matrixos/tmux-core": "workspace:*",
179
- "@matrixos/utils": "workspace:*",
156
+ "@matrixos/agents-md-core": "0.1.27",
157
+ "@matrixos/boulder-state": "0.1.27",
158
+ "@matrixos/claude-code-compat-core": "0.1.27",
159
+ "@matrixos/comment-checker-core": "0.1.27",
160
+ "@matrixos/delegate-core": "0.1.27",
161
+ "@matrixos/egress-core": "0.1.27",
162
+ "@matrixos/git-bash-mcp": "0.0.0",
163
+ "@matrixos/hashline-core": "0.1.27",
164
+ "@matrixos/learning-loop": "0.1.27",
165
+ "@matrixos/lsp-core": "0.1.27",
166
+ "@matrixos/mcp-client-core": "0.1.27",
167
+ "@matrixos/mcp-stdio-core": "0.1.27",
168
+ "@matrixos/model-core": "0.1.27",
169
+ "@matrixos/omo-config-core": "0.1.27",
170
+ "@matrixos/matrix-gateway-core": "0.1.27",
171
+ "@matrixos/prompts-core": "0.1.27",
172
+ "@matrixos/rules-engine": "0.1.27",
173
+ "@matrixos/rgpd-compliance-core": "0.1.27",
174
+ "@matrixos/shared-skills": "0.1.27",
175
+ "@matrixos/skills-loader-core": "0.1.27",
176
+ "@matrixos/team-core": "0.1.27",
177
+ "@matrixos/telemetry-core": "0.1.27",
178
+ "@matrixos/tmux-core": "0.1.27",
179
+ "@matrixos/utils": "0.1.27",
180
180
  "@types/js-yaml": "^4.0.9",
181
181
  "@types/picomatch": "^4.0.3",
182
182
  "@typescript/native-preview": "7.0.0-dev.20260518.1",