@kl-c/matrixos 0.3.15 → 0.3.17
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/dist/cli/index.js +3 -16
- package/dist/cli-node/index.js +3 -16
- package/dist/index.js +1 -6
- package/package.json +1 -1
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.3.
|
|
2166
|
+
version: "0.3.17",
|
|
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",
|
|
@@ -90578,7 +90578,6 @@ class TelegramAdapter {
|
|
|
90578
90578
|
}
|
|
90579
90579
|
async handleUpdate(ctx) {
|
|
90580
90580
|
const msg = ctx.message;
|
|
90581
|
-
console.error("[telegram-adapter] handleUpdate", msg?.from?.username, msg?.chat?.id, msg?.text?.slice(0, 30));
|
|
90582
90581
|
const sttEnabled = this.config.voice?.stt?.enabled === true && this.voice.stt;
|
|
90583
90582
|
const voice = msg?.voice ?? msg?.audio;
|
|
90584
90583
|
if (voice && sttEnabled) {
|
|
@@ -90588,16 +90587,12 @@ class TelegramAdapter {
|
|
|
90588
90587
|
const envelope = this.normalize(ctx);
|
|
90589
90588
|
if (this.config.allowedChatId) {
|
|
90590
90589
|
const chatId = envelope.recipient?.id;
|
|
90591
|
-
console.error("[telegram-adapter] allowedChatId", this.config.allowedChatId, "actual", chatId);
|
|
90592
90590
|
if (chatId !== this.config.allowedChatId) {
|
|
90593
90591
|
return;
|
|
90594
90592
|
}
|
|
90595
90593
|
}
|
|
90596
90594
|
if (this.messageHandler) {
|
|
90597
|
-
console.error("[telegram-adapter] calling messageHandler");
|
|
90598
90595
|
await this.messageHandler(envelope);
|
|
90599
|
-
} else {
|
|
90600
|
-
console.error("[telegram-adapter] no messageHandler registered");
|
|
90601
90596
|
}
|
|
90602
90597
|
}
|
|
90603
90598
|
async handleVoiceMessage(ctx, voice) {
|
|
@@ -166118,7 +166113,6 @@ async function runCliCommand(args, replyMsg) {
|
|
|
166118
166113
|
}
|
|
166119
166114
|
async function handleGatewayMessage(env5, opts = {}) {
|
|
166120
166115
|
const text = env5.content.text ?? "";
|
|
166121
|
-
console.error("[gateway-handler] received", text.slice(0, 30));
|
|
166122
166116
|
if (isReadoptCommand(env5)) {
|
|
166123
166117
|
return runCliCommand(["adopt"], "Re-adoption MaTrixOS lancee. Suis le wizard localement.");
|
|
166124
166118
|
}
|
|
@@ -166148,7 +166142,6 @@ async function handleGatewayMessage(env5, opts = {}) {
|
|
|
166148
166142
|
env: { ...process.env, ...opts.env ?? {} },
|
|
166149
166143
|
stdio: ["ignore", "pipe", "pipe"]
|
|
166150
166144
|
});
|
|
166151
|
-
console.error("[gateway-handler] spawned", command, args);
|
|
166152
166145
|
} catch (e) {
|
|
166153
166146
|
finish({
|
|
166154
166147
|
ok: false,
|
|
@@ -166185,7 +166178,6 @@ async function handleGatewayMessage(env5, opts = {}) {
|
|
|
166185
166178
|
});
|
|
166186
166179
|
child.on("close", (code) => {
|
|
166187
166180
|
clearTimeout(timer);
|
|
166188
|
-
console.error("[gateway-handler] child closed code", code, "stdout len", stdout2.length);
|
|
166189
166181
|
let reply = stdout2.trim();
|
|
166190
166182
|
const lastBrace = reply.lastIndexOf("{");
|
|
166191
166183
|
if (lastBrace >= 0) {
|
|
@@ -166323,12 +166315,12 @@ async function runGatewayStart(opts = {}) {
|
|
|
166323
166315
|
fixedArgs = commandParts.slice(1);
|
|
166324
166316
|
}
|
|
166325
166317
|
const args = opts.args ? [...fixedArgs, ...opts.args] : undefined;
|
|
166318
|
+
console.error(`[gateway] inbound from ${env6.sender.displayName}: ${env6.content.text?.slice(0, 40)}`);
|
|
166326
166319
|
const r2 = await handleGatewayMessage(env6, {
|
|
166327
166320
|
command,
|
|
166328
166321
|
args,
|
|
166329
166322
|
timeoutMs: opts.timeoutMs
|
|
166330
166323
|
});
|
|
166331
|
-
console.error("[gateway-start] handler done", r2.ok, r2.reply?.slice(0, 50));
|
|
166332
166324
|
if (env6.content.text && r2.ok) {
|
|
166333
166325
|
const reply = {
|
|
166334
166326
|
id: "reply-" + env6.id,
|
|
@@ -166344,12 +166336,7 @@ async function runGatewayStart(opts = {}) {
|
|
|
166344
166336
|
};
|
|
166345
166337
|
try {
|
|
166346
166338
|
await gateway2.send(reply);
|
|
166347
|
-
|
|
166348
|
-
} catch (e) {
|
|
166349
|
-
console.error("[gateway-start] reply failed:", e instanceof Error ? e.message : String(e));
|
|
166350
|
-
}
|
|
166351
|
-
} else {
|
|
166352
|
-
console.error("[gateway-start] no reply: r.ok", r2.ok, "text", env6.content.text?.slice(0, 30));
|
|
166339
|
+
} catch {}
|
|
166353
166340
|
}
|
|
166354
166341
|
});
|
|
166355
166342
|
await gateway2.start();
|
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.3.
|
|
2166
|
+
version: "0.3.17",
|
|
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",
|
|
@@ -90633,7 +90633,6 @@ class TelegramAdapter {
|
|
|
90633
90633
|
}
|
|
90634
90634
|
async handleUpdate(ctx) {
|
|
90635
90635
|
const msg = ctx.message;
|
|
90636
|
-
console.error("[telegram-adapter] handleUpdate", msg?.from?.username, msg?.chat?.id, msg?.text?.slice(0, 30));
|
|
90637
90636
|
const sttEnabled = this.config.voice?.stt?.enabled === true && this.voice.stt;
|
|
90638
90637
|
const voice = msg?.voice ?? msg?.audio;
|
|
90639
90638
|
if (voice && sttEnabled) {
|
|
@@ -90643,16 +90642,12 @@ class TelegramAdapter {
|
|
|
90643
90642
|
const envelope = this.normalize(ctx);
|
|
90644
90643
|
if (this.config.allowedChatId) {
|
|
90645
90644
|
const chatId = envelope.recipient?.id;
|
|
90646
|
-
console.error("[telegram-adapter] allowedChatId", this.config.allowedChatId, "actual", chatId);
|
|
90647
90645
|
if (chatId !== this.config.allowedChatId) {
|
|
90648
90646
|
return;
|
|
90649
90647
|
}
|
|
90650
90648
|
}
|
|
90651
90649
|
if (this.messageHandler) {
|
|
90652
|
-
console.error("[telegram-adapter] calling messageHandler");
|
|
90653
90650
|
await this.messageHandler(envelope);
|
|
90654
|
-
} else {
|
|
90655
|
-
console.error("[telegram-adapter] no messageHandler registered");
|
|
90656
90651
|
}
|
|
90657
90652
|
}
|
|
90658
90653
|
async handleVoiceMessage(ctx, voice) {
|
|
@@ -166173,7 +166168,6 @@ async function runCliCommand(args, replyMsg) {
|
|
|
166173
166168
|
}
|
|
166174
166169
|
async function handleGatewayMessage(env5, opts = {}) {
|
|
166175
166170
|
const text = env5.content.text ?? "";
|
|
166176
|
-
console.error("[gateway-handler] received", text.slice(0, 30));
|
|
166177
166171
|
if (isReadoptCommand(env5)) {
|
|
166178
166172
|
return runCliCommand(["adopt"], "Re-adoption MaTrixOS lancee. Suis le wizard localement.");
|
|
166179
166173
|
}
|
|
@@ -166203,7 +166197,6 @@ async function handleGatewayMessage(env5, opts = {}) {
|
|
|
166203
166197
|
env: { ...process.env, ...opts.env ?? {} },
|
|
166204
166198
|
stdio: ["ignore", "pipe", "pipe"]
|
|
166205
166199
|
});
|
|
166206
|
-
console.error("[gateway-handler] spawned", command, args);
|
|
166207
166200
|
} catch (e) {
|
|
166208
166201
|
finish({
|
|
166209
166202
|
ok: false,
|
|
@@ -166240,7 +166233,6 @@ async function handleGatewayMessage(env5, opts = {}) {
|
|
|
166240
166233
|
});
|
|
166241
166234
|
child.on("close", (code) => {
|
|
166242
166235
|
clearTimeout(timer);
|
|
166243
|
-
console.error("[gateway-handler] child closed code", code, "stdout len", stdout2.length);
|
|
166244
166236
|
let reply = stdout2.trim();
|
|
166245
166237
|
const lastBrace = reply.lastIndexOf("{");
|
|
166246
166238
|
if (lastBrace >= 0) {
|
|
@@ -166378,12 +166370,12 @@ async function runGatewayStart(opts = {}) {
|
|
|
166378
166370
|
fixedArgs = commandParts.slice(1);
|
|
166379
166371
|
}
|
|
166380
166372
|
const args = opts.args ? [...fixedArgs, ...opts.args] : undefined;
|
|
166373
|
+
console.error(`[gateway] inbound from ${env6.sender.displayName}: ${env6.content.text?.slice(0, 40)}`);
|
|
166381
166374
|
const r2 = await handleGatewayMessage(env6, {
|
|
166382
166375
|
command,
|
|
166383
166376
|
args,
|
|
166384
166377
|
timeoutMs: opts.timeoutMs
|
|
166385
166378
|
});
|
|
166386
|
-
console.error("[gateway-start] handler done", r2.ok, r2.reply?.slice(0, 50));
|
|
166387
166379
|
if (env6.content.text && r2.ok) {
|
|
166388
166380
|
const reply = {
|
|
166389
166381
|
id: "reply-" + env6.id,
|
|
@@ -166399,12 +166391,7 @@ async function runGatewayStart(opts = {}) {
|
|
|
166399
166391
|
};
|
|
166400
166392
|
try {
|
|
166401
166393
|
await gateway2.send(reply);
|
|
166402
|
-
|
|
166403
|
-
} catch (e) {
|
|
166404
|
-
console.error("[gateway-start] reply failed:", e instanceof Error ? e.message : String(e));
|
|
166405
|
-
}
|
|
166406
|
-
} else {
|
|
166407
|
-
console.error("[gateway-start] no reply: r.ok", r2.ok, "text", env6.content.text?.slice(0, 30));
|
|
166394
|
+
} catch {}
|
|
166408
166395
|
}
|
|
166409
166396
|
});
|
|
166410
166397
|
await gateway2.start();
|
package/dist/index.js
CHANGED
|
@@ -368019,7 +368019,7 @@ function getCachedVersion(options = {}) {
|
|
|
368019
368019
|
// package.json
|
|
368020
368020
|
var package_default = {
|
|
368021
368021
|
name: "@kl-c/matrixos",
|
|
368022
|
-
version: "0.3.
|
|
368022
|
+
version: "0.3.17",
|
|
368023
368023
|
description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
|
|
368024
368024
|
main: "./dist/index.js",
|
|
368025
368025
|
types: "dist/index.d.ts",
|
|
@@ -443586,7 +443586,6 @@ class TelegramAdapter {
|
|
|
443586
443586
|
}
|
|
443587
443587
|
async handleUpdate(ctx) {
|
|
443588
443588
|
const msg = ctx.message;
|
|
443589
|
-
console.error("[telegram-adapter] handleUpdate", msg?.from?.username, msg?.chat?.id, msg?.text?.slice(0, 30));
|
|
443590
443589
|
const sttEnabled = this.config.voice?.stt?.enabled === true && this.voice.stt;
|
|
443591
443590
|
const voice = msg?.voice ?? msg?.audio;
|
|
443592
443591
|
if (voice && sttEnabled) {
|
|
@@ -443596,16 +443595,12 @@ class TelegramAdapter {
|
|
|
443596
443595
|
const envelope = this.normalize(ctx);
|
|
443597
443596
|
if (this.config.allowedChatId) {
|
|
443598
443597
|
const chatId = envelope.recipient?.id;
|
|
443599
|
-
console.error("[telegram-adapter] allowedChatId", this.config.allowedChatId, "actual", chatId);
|
|
443600
443598
|
if (chatId !== this.config.allowedChatId) {
|
|
443601
443599
|
return;
|
|
443602
443600
|
}
|
|
443603
443601
|
}
|
|
443604
443602
|
if (this.messageHandler) {
|
|
443605
|
-
console.error("[telegram-adapter] calling messageHandler");
|
|
443606
443603
|
await this.messageHandler(envelope);
|
|
443607
|
-
} else {
|
|
443608
|
-
console.error("[telegram-adapter] no messageHandler registered");
|
|
443609
443604
|
}
|
|
443610
443605
|
}
|
|
443611
443606
|
async handleVoiceMessage(ctx, voice) {
|
package/package.json
CHANGED