@archipelagolab/lobi 1.0.10 → 1.0.12

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/index.ts CHANGED
@@ -1,17 +1,15 @@
1
1
  import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
2
2
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
3
3
  import type { ChannelPlugin, OpenClawPluginApi } from "openclaw/plugin-sdk/channel-entry-contract";
4
+ import { matrixPlugin } from "./src/channel.js";
5
+ import { setMatrixRuntime } from "./src/runtime.js";
4
6
  import { registerLobiCliMetadata } from "./cli-metadata.js";
5
7
 
6
- async function registerLobiChannel(api: OpenClawPluginApi) {
7
- // Load the channel plugin
8
- const { matrixPlugin } = await import("./src/channel.js");
9
-
8
+ function registerLobiChannel(api: OpenClawPluginApi) {
10
9
  // Register the channel
11
10
  api.registerChannel({ plugin: matrixPlugin as ChannelPlugin });
12
11
 
13
12
  // Load runtime
14
- const { setMatrixRuntime } = await import("./src/runtime.js");
15
13
  setMatrixRuntime(api.runtime);
16
14
 
17
15
  // Register CLI metadata
@@ -50,7 +48,7 @@ export default definePluginEntry({
50
48
  id: "lobi",
51
49
  name: "Lobi",
52
50
  description: "Lobi - The official A2A (Agent-to-Agent) messaging platform by Lobisland.",
53
- async register(api) {
54
- await registerLobiChannel(api);
51
+ register(api) {
52
+ registerLobiChannel(api);
55
53
  },
56
54
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archipelagolab/lobi",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "Lobi - The official A2A (Agent-to-Agent) messaging platform by Lobisland. Built for AI, enabling seamless communication between intelligent agents.",
5
5
  "type": "module",
6
6
  "dependencies": {
@@ -137,7 +137,7 @@ function hasConfiguredDefaultMatrixAccountSource(params: {
137
137
  }
138
138
 
139
139
  export function resolveMatrixChannelConfig(cfg: OpenClawConfig): Record<string, unknown> | null {
140
- return isRecord(cfg.channels?.matrix) ? cfg.channels.lobi : null;
140
+ return isRecord(cfg.channels?.lobi) ? cfg.channels.lobi : null;
141
141
  }
142
142
 
143
143
  export function findMatrixAccountEntry(
package/src/channel.ts CHANGED
@@ -160,7 +160,7 @@ const resolveMatrixDmPolicy = createScopedDmSecurityResolver<ResolvedMatrixAccou
160
160
 
161
161
  const collectMatrixSecurityWarnings =
162
162
  createAllowlistProviderOpenWarningCollector<ResolvedMatrixAccount>({
163
- providerConfigPresent: (cfg) => (cfg as CoreConfig).channels?.matrix !== undefined,
163
+ providerConfigPresent: (cfg) => (cfg as CoreConfig).channels?.lobi !== undefined,
164
164
  resolveGroupPolicy: (account) => account.config.groupPolicy,
165
165
  buildOpenWarning: {
166
166
  surface: "Matrix rooms",
@@ -169,7 +169,7 @@ export function normalizeCompatibilityConfig({
169
169
  cfg: OpenClawConfig;
170
170
  }): ChannelDoctorConfigMutation {
171
171
  const channels = isRecord(cfg.channels) ? cfg.channels : null;
172
- const matrix = isRecord(channels?.matrix) ? channels.lobi : null;
172
+ const matrix = isRecord(channels?.lobi) ? channels.lobi : null;
173
173
  if (!matrix) {
174
174
  return { config: cfg, changes: [] };
175
175
  }
package/src/doctor.ts CHANGED
@@ -21,21 +21,21 @@ import { isRecord } from "./record-shared.js";
21
21
 
22
22
  function hasConfiguredMatrixChannel(cfg: OpenClawConfig): boolean {
23
23
  const channels = cfg.channels as Record<string, unknown> | undefined;
24
- return isRecord(channels?.matrix);
24
+ return isRecord(channels?.lobi);
25
25
  }
26
26
 
27
27
  function hasConfiguredMatrixPluginSurface(cfg: OpenClawConfig): boolean {
28
28
  return Boolean(
29
- cfg.plugins?.installs?.matrix ||
30
- cfg.plugins?.entries?.matrix ||
31
- cfg.plugins?.allow?.includes("matrix") ||
32
- cfg.plugins?.deny?.includes("matrix"),
29
+ cfg.plugins?.installs?.lobi ||
30
+ cfg.plugins?.entries?.lobi ||
31
+ cfg.plugins?.allow?.includes("lobi") ||
32
+ cfg.plugins?.deny?.includes("lobi"),
33
33
  );
34
34
  }
35
35
 
36
36
  function hasConfiguredMatrixEnv(env: NodeJS.ProcessEnv): boolean {
37
37
  return Object.entries(env).some(
38
- ([key, value]) => key.startsWith("MATRIX_") && typeof value === "string" && value.trim(),
38
+ ([key, value]) => key.startsWith("LOBI_") && typeof value === "string" && value.trim(),
39
39
  );
40
40
  }
41
41
 
@@ -82,28 +82,28 @@ export function formatMatrixLegacyCryptoPreview(
82
82
 
83
83
  export async function collectMatrixInstallPathWarnings(cfg: OpenClawConfig): Promise<string[]> {
84
84
  const issue = await detectPluginInstallPathIssue({
85
- pluginId: "matrix",
86
- install: cfg.plugins?.installs?.matrix,
85
+ pluginId: "lobi",
86
+ install: cfg.plugins?.installs?.lobi,
87
87
  });
88
88
  if (!issue) {
89
89
  return [];
90
90
  }
91
91
  return formatPluginInstallPathIssue({
92
92
  issue,
93
- pluginLabel: "Matrix",
94
- defaultInstallCommand: "openclaw plugins install @openclaw/matrix",
93
+ pluginLabel: "Lobi",
94
+ defaultInstallCommand: "openclaw plugins install @archipelagolab/lobi",
95
95
  }).map((entry) => `- ${entry}`);
96
96
  }
97
97
 
98
98
  export async function cleanStaleMatrixPluginConfig(cfg: OpenClawConfig) {
99
99
  const issue = await detectPluginInstallPathIssue({
100
- pluginId: "matrix",
101
- install: cfg.plugins?.installs?.matrix,
100
+ pluginId: "lobi",
101
+ install: cfg.plugins?.installs?.lobi,
102
102
  });
103
103
  if (!issue || issue.kind !== "missing-path") {
104
104
  return { config: cfg, changes: [] };
105
105
  }
106
- const { config, actions } = removePluginFromConfig(cfg, "matrix");
106
+ const { config, actions } = removePluginFromConfig(cfg, "lobi");
107
107
  const removed: string[] = [];
108
108
  if (actions.install) {
109
109
  removed.push("install record");
@@ -123,7 +123,7 @@ export async function cleanStaleMatrixPluginConfig(cfg: OpenClawConfig) {
123
123
  return {
124
124
  config,
125
125
  changes: [
126
- `Removed stale Matrix plugin references (${removed.join(", ")}). The previous install path no longer exists: ${issue.path}`,
126
+ `Removed stale Lobi plugin references (${removed.join(", ")}). The previous install path no longer exists: ${issue.path}`,
127
127
  ],
128
128
  };
129
129
  }
@@ -11,7 +11,7 @@ import type { CoreConfig, MatrixAccountConfig, MatrixConfig } from "../types.js"
11
11
  type MatrixRoomEntries = Record<string, NonNullable<MatrixConfig["groups"]>[string]>;
12
12
 
13
13
  export function resolveMatrixBaseConfig(cfg: CoreConfig): MatrixConfig {
14
- return cfg.channels?.matrix ?? {};
14
+ return cfg.channels?.lobi ?? {};
15
15
  }
16
16
 
17
17
  function resolveMatrixAccountsMap(cfg: CoreConfig): Readonly<Record<string, MatrixAccountConfig>> {
@@ -116,7 +116,7 @@ export function resolveMatrixAccountConfig(params: {
116
116
  const base = resolveMatrixBaseConfig(params.cfg);
117
117
  const merged = resolveMergedAccountConfig<MatrixConfig>({
118
118
  channelConfig: base,
119
- accounts: params.cfg.channels?.matrix?.accounts as
119
+ accounts: params.cfg.channels?.lobi?.accounts as
120
120
  | Record<string, Partial<MatrixConfig>>
121
121
  | undefined,
122
122
  accountId,
@@ -49,7 +49,7 @@ function resolveLegacyStoragePaths(env: NodeJS.ProcessEnv = process.env): {
49
49
 
50
50
  function assertLegacyMigrationAccountSelection(params: { accountKey: string }): void {
51
51
  const cfg = getMatrixRuntime().config.loadConfig();
52
- if (!cfg.channels?.matrix || typeof cfg.channels.lobi !== "object") {
52
+ if (!cfg.channels?.lobi || typeof cfg.channels.lobi !== "object") {
53
53
  return;
54
54
  }
55
55
  if (requiresExplicitMatrixDefaultAccount(cfg)) {
@@ -6,7 +6,7 @@ export function shouldStoreMatrixAccountAtTopLevel(cfg: CoreConfig, accountId: s
6
6
  if (normalizedAccountId !== DEFAULT_ACCOUNT_ID) {
7
7
  return false;
8
8
  }
9
- const accounts = cfg.channels?.matrix?.accounts;
9
+ const accounts = cfg.channels?.lobi?.accounts;
10
10
  return !accounts || Object.keys(accounts).length === 0;
11
11
  }
12
12
 
@@ -128,7 +128,7 @@ export function updateMatrixAccountConfig(
128
128
  accountId: string,
129
129
  patch: MatrixAccountPatch,
130
130
  ): CoreConfig {
131
- const matrix = cfg.channels?.matrix ?? {};
131
+ const matrix = cfg.channels?.lobi ?? {};
132
132
  const normalizedAccountId = normalizeAccountId(accountId);
133
133
  const existingAccount = (findMatrixAccountConfig(cfg, normalizedAccountId) ??
134
134
  (normalizedAccountId === DEFAULT_ACCOUNT_ID ? matrix : {})) as MatrixConfig;
@@ -55,7 +55,7 @@ function resolveLegacyMatrixCredentialsPath(env: NodeJS.ProcessEnv): string {
55
55
  function shouldReadLegacyCredentialsForAccount(accountId?: string | null): boolean {
56
56
  const normalizedAccountId = normalizeAccountId(accountId);
57
57
  const cfg = getMatrixRuntime().config.loadConfig();
58
- if (!cfg.channels?.matrix || typeof cfg.channels.lobi !== "object") {
58
+ if (!cfg.channels?.lobi || typeof cfg.channels.lobi !== "object") {
59
59
  return normalizedAccountId === DEFAULT_ACCOUNT_ID;
60
60
  }
61
61
  if (requiresExplicitMatrixDefaultAccount(cfg)) {
@@ -9,7 +9,7 @@ export function resolveMatrixAckReactionConfig(params: {
9
9
  agentId: string;
10
10
  accountId?: string | null;
11
11
  }): { ackReaction: string; ackReactionScope: MatrixAckReactionScope } {
12
- const matrixConfig = params.cfg.channels?.matrix;
12
+ const matrixConfig = params.cfg.channels?.lobi;
13
13
  const accountConfig = resolveMatrixAccountConfig({
14
14
  cfg: params.cfg as CoreConfig,
15
15
  accountId: params.accountId,
@@ -20,7 +20,7 @@ export function resolveMatrixReactionNotificationMode(params: {
20
20
  cfg: CoreConfig;
21
21
  accountId: string;
22
22
  }): MatrixReactionNotificationMode {
23
- const matrixConfig = params.cfg.channels?.matrix;
23
+ const matrixConfig = params.cfg.channels?.lobi;
24
24
  const accountConfig = resolveMatrixAccountConfig({
25
25
  cfg: params.cfg,
26
26
  accountId: params.accountId,