@kl-c/matrixos 0.2.6 → 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.
- package/.agents/command/adopt.md +19 -31
- package/.agents/command/matrix.md +31 -0
- package/dist/cli/index.js +36 -1
- package/dist/cli-node/index.js +36 -1
- package/dist/gateway/gateway-handler.d.ts +4 -0
- package/dist/index.js +1 -1
- package/package.json +25 -25
package/.agents/command/adopt.md
CHANGED
|
@@ -6,13 +6,13 @@ description: Launch or re-run the Morpheus adoption ritual — establish user co
|
|
|
6
6
|
You are executing the **Morpheus adoption ritual** (`/adopt`). This is the first-contact (or re-adoption) ceremony that establishes the user's context and offers optional MaTrixOS features.
|
|
7
7
|
|
|
8
8
|
## When this runs
|
|
9
|
-
- First launch, if
|
|
9
|
+
- First launch, if `.matrixos/user-context.md` is missing or still a template.
|
|
10
10
|
- Any time the user explicitly types `/adopt` to (re)do the ritual.
|
|
11
11
|
|
|
12
12
|
## Behavior
|
|
13
13
|
|
|
14
14
|
### 1. Detect current state
|
|
15
|
-
Check whether
|
|
15
|
+
Check whether `.matrixos/user-context.md` exists and is filled.
|
|
16
16
|
- If filled: tell the user "Tu as déjà un contexte d'adoption. Je relance le rituel pour le mettre à jour." and proceed to step 2 (re-adoption mode — EDIT sections, do NOT rewrite from scratch).
|
|
17
17
|
- If missing/template: adoption mode — you will CREATE the file.
|
|
18
18
|
|
|
@@ -28,32 +28,20 @@ Keep it to one short paragraph — this is awareness, not the opt-in checklist (
|
|
|
28
28
|
Pose ~5 targeted questions:
|
|
29
29
|
1. **Qui es-tu ?** (nom/alias, rôle, ce que tu fais)
|
|
30
30
|
2. **Pour quel projet / besoin m'as-tu déployé ?** (objectif, stack, périmètre)
|
|
31
|
-
3. **
|
|
32
|
-
4. **
|
|
33
|
-
5.
|
|
34
|
-
|
|
35
|
-
###
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
Never rewrite the whole file from scratch — preserve existing context.
|
|
49
|
-
|
|
50
|
-
Also update `/root/MOS_Vault/MEMORY.md` routing if the user-context file was just created.
|
|
51
|
-
|
|
52
|
-
### 5. Confirm
|
|
53
|
-
End with: « C'est noté, je suis désormais configuré pour toi. Tu peux à tout moment utiliser `/features` pour voir ce que je peux faire, ou `/adopt` pour refaire ce rituel. »
|
|
54
|
-
|
|
55
|
-
## Rules
|
|
56
|
-
- User context is NEVER fixed: user can say "mets à jour mon contexte" → edit, not rewrite.
|
|
57
|
-
- Do not invent a hierarchy/manager — Morpheus reports only to the user who installed it.
|
|
58
|
-
- Do not store code-derivable facts in user-context.md (that belongs to Magic Context / MOS_Vault project files).
|
|
59
|
-
- If the user wants a feature activated that requires provisioning (e.g. Dashboard), relay the exact provisioning steps from the inventory — and if you are instructed to actually enable it, follow the `provisioning.activation` recipe (e.g. launch `matrixos dashboard --daemon`).
|
|
31
|
+
3. **Quel niveau d'automatisation veux-tu ?** (assistant, agent, team mode)
|
|
32
|
+
4. **Veux-tu activer le dashboard ?** (Mission Control)
|
|
33
|
+
5. **Veux-tu le gateway Telegram ?** (répondre depuis ton téléphone)
|
|
34
|
+
|
|
35
|
+
### 4. Write user-context.md
|
|
36
|
+
Write the answers to `.matrixos/user-context.md` in French, structured as YAML frontmatter + markdown sections.
|
|
37
|
+
|
|
38
|
+
### 5. Offer feature toggles
|
|
39
|
+
After writing context, offer to enable:
|
|
40
|
+
- Dashboard (`matrixos dashboard --daemon`)
|
|
41
|
+
- Gateway Telegram (`matrixos gateway adopt telegram`)
|
|
42
|
+
- Kanban (`matrixos project switch`)
|
|
43
|
+
- Cron / auto-audit (`matrixos self-audit --install-cron`)
|
|
44
|
+
|
|
45
|
+
### 6. Confirm
|
|
46
|
+
"Rituel terminé. Tu peux me demander n'importe quoi maintenant — je connais ton contexte."
|
|
47
|
+
</command-instruction>
|
|
@@ -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.
|
|
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
|
package/dist/cli-node/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.
|
|
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.
|
|
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.
|
|
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": "
|
|
157
|
-
"@matrixos/boulder-state": "
|
|
158
|
-
"@matrixos/claude-code-compat-core": "
|
|
159
|
-
"@matrixos/comment-checker-core": "
|
|
160
|
-
"@matrixos/delegate-core": "
|
|
161
|
-
"@matrixos/egress-core": "
|
|
162
|
-
"@matrixos/git-bash-mcp": "
|
|
163
|
-
"@matrixos/hashline-core": "
|
|
164
|
-
"@matrixos/learning-loop": "
|
|
165
|
-
"@matrixos/lsp-core": "
|
|
166
|
-
"@matrixos/mcp-client-core": "
|
|
167
|
-
"@matrixos/mcp-stdio-core": "
|
|
168
|
-
"@matrixos/model-core": "
|
|
169
|
-
"@matrixos/omo-config-core": "
|
|
170
|
-
"@matrixos/matrix-gateway-core": "
|
|
171
|
-
"@matrixos/prompts-core": "
|
|
172
|
-
"@matrixos/rules-engine": "
|
|
173
|
-
"@matrixos/rgpd-compliance-core": "
|
|
174
|
-
"@matrixos/shared-skills": "
|
|
175
|
-
"@matrixos/skills-loader-core": "
|
|
176
|
-
"@matrixos/team-core": "
|
|
177
|
-
"@matrixos/telemetry-core": "
|
|
178
|
-
"@matrixos/tmux-core": "
|
|
179
|
-
"@matrixos/utils": "
|
|
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",
|