openclaw-quiubo 2.6.46 → 2.6.48

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/README.md CHANGED
@@ -95,6 +95,19 @@ channels:
95
95
  | `apiUrl` | No | `https://api.quiubo.io` | API base URL |
96
96
  | `pollIntervalMs` | No | `5000` | Polling fallback interval in ms |
97
97
 
98
+ ### Group context injection
99
+
100
+ The plugin injects group metadata (name, members, E2EE status, scopes) into agent prompts via the `before_prompt_build` hook. This lets agents know who's in the conversation without being told.
101
+
102
+ **Required config** — OpenClaw classifies `before_prompt_build` as a prompt injection hook and blocks it by default. You must explicitly allow it:
103
+
104
+ ```bash
105
+ openclaw config set plugins.entries.openclaw-quiubo.hooks.allowPromptInjection true
106
+ openclaw gateway restart
107
+ ```
108
+
109
+ Without this, the hook silently doesn't register — no error, no warning.
110
+
98
111
  ### Multiple accounts
99
112
 
100
113
  Run the setup wizard again and enter a different Account ID when prompted (e.g., `support-bot`, `sales-bot`). Each account gets its own gateway instance, cursor file, and bot config cache. For full multi-agent isolation (separate workspaces, models, cron jobs), see the **[Multi-Agent Setup guide](./MULTI_AGENT.md)**.
package/dist/index.js CHANGED
@@ -13728,7 +13728,7 @@ var quiuboPlugin = {
13728
13728
  return { cfg, accountId };
13729
13729
  }
13730
13730
  const channel = getChannelConfig(cfg) || {};
13731
- const nextConfig = setChannelConfig(cfg, {
13731
+ let nextConfig = setChannelConfig(cfg, {
13732
13732
  ...channel,
13733
13733
  accounts: {
13734
13734
  ...channel.accounts,
@@ -13741,6 +13741,23 @@ var quiuboPlugin = {
13741
13741
  }
13742
13742
  }
13743
13743
  });
13744
+ const pluginEntry = nextConfig.plugins?.entries?.[CHANNEL_ID] ?? nextConfig.plugins?.entries?.["openclaw-quiubo"] ?? {};
13745
+ nextConfig = {
13746
+ ...nextConfig,
13747
+ plugins: {
13748
+ ...nextConfig.plugins,
13749
+ entries: {
13750
+ ...nextConfig.plugins?.entries,
13751
+ ["openclaw-quiubo"]: {
13752
+ ...pluginEntry,
13753
+ hooks: {
13754
+ ...pluginEntry.hooks,
13755
+ allowPromptInjection: true
13756
+ }
13757
+ }
13758
+ }
13759
+ }
13760
+ };
13744
13761
  await prompter.note([
13745
13762
  "Quiubo configured!",
13746
13763
  "",
@@ -14853,7 +14870,6 @@ function resolveAccountId2(config, agentId) {
14853
14870
  );
14854
14871
  return matched?.match?.accountId ?? "default";
14855
14872
  }
14856
- var DEFAULT_API_URL3 = "https://api.quiubo.chat/v1";
14857
14873
  async function fetchGroupContext(config, sessionKey) {
14858
14874
  const groupId = extractGroupIdFromSessionKey2(sessionKey);
14859
14875
  if (!groupId) return void 0;
@@ -14861,19 +14877,20 @@ async function fetchGroupContext(config, sessionKey) {
14861
14877
  if (cached) return cached;
14862
14878
  const agentId = extractAgentIdFromSessionKey2(sessionKey);
14863
14879
  const accountId = resolveAccountId2(config, agentId);
14864
- const quiuboConfig = config?.channels?.quiubo;
14865
- const accountCfg = quiuboConfig?.accounts?.[accountId];
14866
- if (!accountCfg?.apiKey) return void 0;
14867
- const client = new QuiuboApiClient(
14868
- accountCfg.apiUrl ?? DEFAULT_API_URL3,
14869
- accountCfg.apiKey
14870
- );
14880
+ const client = clients.get(accountId);
14881
+ const accountCfg = accounts.get(accountId);
14882
+ if (!client || !accountCfg) return void 0;
14871
14883
  const [group, { members }, { agents }] = await Promise.all([
14872
14884
  client.getGroup(groupId),
14873
14885
  client.listGroupMembers(groupId),
14874
14886
  client.listAgents()
14875
14887
  ]);
14876
14888
  const botIdentityIds = new Set(agents.map((a) => a.identityId));
14889
+ for (const acct of accounts.values()) {
14890
+ if (acct.botIdentityId) {
14891
+ botIdentityIds.add(acct.botIdentityId);
14892
+ }
14893
+ }
14877
14894
  const currentAgent = agents.find((a) => a.identityId === accountCfg.botIdentityId);
14878
14895
  const e2eeEnabled = currentAgent?.e2eeConfigured ?? false;
14879
14896
  let scopes = [];