@kl-c/matrixos 0.3.7 → 0.3.9

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 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.7",
2166
+ version: "0.3.9",
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",
@@ -84953,11 +84953,14 @@ class MatrixGateway {
84953
84953
  return adapter.send(env2);
84954
84954
  }
84955
84955
  async handleInbound(env2) {
84956
+ console.error("[gateway] handleInbound", env2.id, env2.sender.id, env2.content.text?.slice(0, 30));
84956
84957
  if (this.seenIds.has(env2.id)) {
84958
+ console.error("[gateway] dedupe rejected", env2.id);
84957
84959
  return;
84958
84960
  }
84959
84961
  this.seenIds.add(env2.id);
84960
84962
  if (this.isLoop(env2)) {
84963
+ console.error("[gateway] loop detected");
84961
84964
  this.audit({
84962
84965
  timestamp: new Date().toISOString(),
84963
84966
  type: "loop_detected",
@@ -84969,6 +84972,7 @@ class MatrixGateway {
84969
84972
  return;
84970
84973
  }
84971
84974
  if (this.isRateLimited(env2)) {
84975
+ console.error("[gateway] rate limited");
84972
84976
  this.audit({
84973
84977
  timestamp: new Date().toISOString(),
84974
84978
  type: "rate_limited",
@@ -84980,6 +84984,7 @@ class MatrixGateway {
84980
84984
  }
84981
84985
  const allowResult = this.isAllowed(env2);
84982
84986
  if (!allowResult.ok) {
84987
+ console.error("[gateway] security denied:", allowResult.reason);
84983
84988
  this.audit({
84984
84989
  timestamp: new Date().toISOString(),
84985
84990
  type: "message_denied",
@@ -84991,7 +84996,10 @@ class MatrixGateway {
84991
84996
  return;
84992
84997
  }
84993
84998
  if (this.handler) {
84999
+ console.error("[gateway] invoking handler for", env2.id);
84994
85000
  await this.handler(env2);
85001
+ } else {
85002
+ console.error("[gateway] no handler registered");
84995
85003
  }
84996
85004
  this.audit({
84997
85005
  timestamp: new Date().toISOString(),
@@ -166113,10 +166121,13 @@ async function runCliCommand(args, replyMsg) {
166113
166121
  }
166114
166122
  async function handleGatewayMessage(env5, opts = {}) {
166115
166123
  const text = env5.content.text ?? "";
166124
+ console.error("[gateway-handler] received text:", text.slice(0, 50));
166116
166125
  if (isReadoptCommand(env5)) {
166126
+ console.error("[gateway-handler] readopt command");
166117
166127
  return runCliCommand(["adopt"], "Re-adoption MaTrixOS lancee. Suis le wizard localement.");
166118
166128
  }
166119
166129
  if (isTelegramAdoptCommand(env5)) {
166130
+ console.error("[gateway-handler] telegram-adopt command");
166120
166131
  return runCliCommand(["gateway", "adopt", "telegram"], "Configuration Telegram lancee. Colle ton bot token quand demande (jamais par chat).");
166121
166132
  }
166122
166133
  const command = opts.command ?? "matrixos";
@@ -166237,9 +166248,9 @@ function buildGatewayConfig(channel) {
166237
166248
  return {
166238
166249
  channels: [channel],
166239
166250
  security: {
166240
- dmPolicy: "allowlist",
166251
+ dmPolicy: "open",
166241
166252
  groupPolicy: "disabled",
166242
- allowFrom: channel.allowedChatId ? [channel.allowedChatId] : [],
166253
+ allowFrom: [],
166243
166254
  groupAllowFrom: [],
166244
166255
  channelAllowFrom: {}
166245
166256
  },
@@ -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.7",
2166
+ version: "0.3.9",
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",
@@ -85008,11 +85008,14 @@ class MatrixGateway {
85008
85008
  return adapter.send(env2);
85009
85009
  }
85010
85010
  async handleInbound(env2) {
85011
+ console.error("[gateway] handleInbound", env2.id, env2.sender.id, env2.content.text?.slice(0, 30));
85011
85012
  if (this.seenIds.has(env2.id)) {
85013
+ console.error("[gateway] dedupe rejected", env2.id);
85012
85014
  return;
85013
85015
  }
85014
85016
  this.seenIds.add(env2.id);
85015
85017
  if (this.isLoop(env2)) {
85018
+ console.error("[gateway] loop detected");
85016
85019
  this.audit({
85017
85020
  timestamp: new Date().toISOString(),
85018
85021
  type: "loop_detected",
@@ -85024,6 +85027,7 @@ class MatrixGateway {
85024
85027
  return;
85025
85028
  }
85026
85029
  if (this.isRateLimited(env2)) {
85030
+ console.error("[gateway] rate limited");
85027
85031
  this.audit({
85028
85032
  timestamp: new Date().toISOString(),
85029
85033
  type: "rate_limited",
@@ -85035,6 +85039,7 @@ class MatrixGateway {
85035
85039
  }
85036
85040
  const allowResult = this.isAllowed(env2);
85037
85041
  if (!allowResult.ok) {
85042
+ console.error("[gateway] security denied:", allowResult.reason);
85038
85043
  this.audit({
85039
85044
  timestamp: new Date().toISOString(),
85040
85045
  type: "message_denied",
@@ -85046,7 +85051,10 @@ class MatrixGateway {
85046
85051
  return;
85047
85052
  }
85048
85053
  if (this.handler) {
85054
+ console.error("[gateway] invoking handler for", env2.id);
85049
85055
  await this.handler(env2);
85056
+ } else {
85057
+ console.error("[gateway] no handler registered");
85050
85058
  }
85051
85059
  this.audit({
85052
85060
  timestamp: new Date().toISOString(),
@@ -166168,10 +166176,13 @@ async function runCliCommand(args, replyMsg) {
166168
166176
  }
166169
166177
  async function handleGatewayMessage(env5, opts = {}) {
166170
166178
  const text = env5.content.text ?? "";
166179
+ console.error("[gateway-handler] received text:", text.slice(0, 50));
166171
166180
  if (isReadoptCommand(env5)) {
166181
+ console.error("[gateway-handler] readopt command");
166172
166182
  return runCliCommand(["adopt"], "Re-adoption MaTrixOS lancee. Suis le wizard localement.");
166173
166183
  }
166174
166184
  if (isTelegramAdoptCommand(env5)) {
166185
+ console.error("[gateway-handler] telegram-adopt command");
166175
166186
  return runCliCommand(["gateway", "adopt", "telegram"], "Configuration Telegram lancee. Colle ton bot token quand demande (jamais par chat).");
166176
166187
  }
166177
166188
  const command = opts.command ?? "matrixos";
@@ -166292,9 +166303,9 @@ function buildGatewayConfig(channel) {
166292
166303
  return {
166293
166304
  channels: [channel],
166294
166305
  security: {
166295
- dmPolicy: "allowlist",
166306
+ dmPolicy: "open",
166296
166307
  groupPolicy: "disabled",
166297
- allowFrom: channel.allowedChatId ? [channel.allowedChatId] : [],
166308
+ allowFrom: [],
166298
166309
  groupAllowFrom: [],
166299
166310
  channelAllowFrom: {}
166300
166311
  },
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.7",
368022
+ version: "0.3.9",
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",
@@ -443312,11 +443312,14 @@ class MatrixGateway {
443312
443312
  return adapter.send(env2);
443313
443313
  }
443314
443314
  async handleInbound(env2) {
443315
+ console.error("[gateway] handleInbound", env2.id, env2.sender.id, env2.content.text?.slice(0, 30));
443315
443316
  if (this.seenIds.has(env2.id)) {
443317
+ console.error("[gateway] dedupe rejected", env2.id);
443316
443318
  return;
443317
443319
  }
443318
443320
  this.seenIds.add(env2.id);
443319
443321
  if (this.isLoop(env2)) {
443322
+ console.error("[gateway] loop detected");
443320
443323
  this.audit({
443321
443324
  timestamp: new Date().toISOString(),
443322
443325
  type: "loop_detected",
@@ -443328,6 +443331,7 @@ class MatrixGateway {
443328
443331
  return;
443329
443332
  }
443330
443333
  if (this.isRateLimited(env2)) {
443334
+ console.error("[gateway] rate limited");
443331
443335
  this.audit({
443332
443336
  timestamp: new Date().toISOString(),
443333
443337
  type: "rate_limited",
@@ -443339,6 +443343,7 @@ class MatrixGateway {
443339
443343
  }
443340
443344
  const allowResult = this.isAllowed(env2);
443341
443345
  if (!allowResult.ok) {
443346
+ console.error("[gateway] security denied:", allowResult.reason);
443342
443347
  this.audit({
443343
443348
  timestamp: new Date().toISOString(),
443344
443349
  type: "message_denied",
@@ -443350,7 +443355,10 @@ class MatrixGateway {
443350
443355
  return;
443351
443356
  }
443352
443357
  if (this.handler) {
443358
+ console.error("[gateway] invoking handler for", env2.id);
443353
443359
  await this.handler(env2);
443360
+ } else {
443361
+ console.error("[gateway] no handler registered");
443354
443362
  }
443355
443363
  this.audit({
443356
443364
  timestamp: new Date().toISOString(),
package/dist/tui.js CHANGED
@@ -20763,11 +20763,14 @@ class MatrixGateway {
20763
20763
  return adapter.send(env2);
20764
20764
  }
20765
20765
  async handleInbound(env2) {
20766
+ console.error("[gateway] handleInbound", env2.id, env2.sender.id, env2.content.text?.slice(0, 30));
20766
20767
  if (this.seenIds.has(env2.id)) {
20768
+ console.error("[gateway] dedupe rejected", env2.id);
20767
20769
  return;
20768
20770
  }
20769
20771
  this.seenIds.add(env2.id);
20770
20772
  if (this.isLoop(env2)) {
20773
+ console.error("[gateway] loop detected");
20771
20774
  this.audit({
20772
20775
  timestamp: new Date().toISOString(),
20773
20776
  type: "loop_detected",
@@ -20779,6 +20782,7 @@ class MatrixGateway {
20779
20782
  return;
20780
20783
  }
20781
20784
  if (this.isRateLimited(env2)) {
20785
+ console.error("[gateway] rate limited");
20782
20786
  this.audit({
20783
20787
  timestamp: new Date().toISOString(),
20784
20788
  type: "rate_limited",
@@ -20790,6 +20794,7 @@ class MatrixGateway {
20790
20794
  }
20791
20795
  const allowResult = this.isAllowed(env2);
20792
20796
  if (!allowResult.ok) {
20797
+ console.error("[gateway] security denied:", allowResult.reason);
20793
20798
  this.audit({
20794
20799
  timestamp: new Date().toISOString(),
20795
20800
  type: "message_denied",
@@ -20801,7 +20806,10 @@ class MatrixGateway {
20801
20806
  return;
20802
20807
  }
20803
20808
  if (this.handler) {
20809
+ console.error("[gateway] invoking handler for", env2.id);
20804
20810
  await this.handler(env2);
20811
+ } else {
20812
+ console.error("[gateway] no handler registered");
20805
20813
  }
20806
20814
  this.audit({
20807
20815
  timestamp: new Date().toISOString(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kl-c/matrixos",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
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",