@clawling/clawchat-plugin-openclaw 2026.9.26-2 → 2026.10.7-1

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/src/runtime.ts CHANGED
@@ -96,6 +96,7 @@ import {
96
96
  import { refreshGroupProfile, syncFirstSeenClawChatProfiles } from "./profile-sync.ts";
97
97
  import { pullGroupMetadata, pullOwnerMetadata } from "./clawchat-metadata.ts";
98
98
  import { deleteClawChatMemoryFile, readClawChatMemoryFile } from "./clawchat-memory.ts";
99
+ import { registerMentionRosterResolver } from "./mention-autolink.ts";
99
100
  import {
100
101
  clearClawChatPromptInjectionForSession,
101
102
  stageClawChatPromptInjection,
@@ -3831,6 +3832,21 @@ export async function startOpenclawClawlingGateway(params: StartGatewayParams):
3831
3832
  return;
3832
3833
  }
3833
3834
  activeClients.set(accountId, client);
3835
+ // Text "@name" autolinking on outbound group sends reads the same cached
3836
+ // roster (participant ids + nicknames) the group prompt shows the model.
3837
+ const unregisterMentionRoster = registerMentionRosterResolver(accountId, async (groupId) => {
3838
+ const memoryRoot = resolveMemoryRootForPeer({ kind: "group", id: groupId });
3839
+ if (!memoryRoot) return [];
3840
+ let ownerMetadata: ClawChatPromptMetadata | null = null;
3841
+ try {
3842
+ const ownerFile = await readClawChatMemoryFile(memoryRoot, { targetType: "owner", targetId: "owner" });
3843
+ ownerMetadata = ownerFile.exists ? ownerFile.metadata : null;
3844
+ } catch {
3845
+ ownerMetadata = null;
3846
+ }
3847
+ const participants = await loadGroupParticipantsForPrompt({ memoryRoot, groupId, ownerMetadata });
3848
+ return participants.map((participant) => ({ userId: participant.id, name: participant.name }));
3849
+ });
3834
3850
  log?.info?.(`[${accountId}] clawchat-plugin-openclaw runtime active client registered`);
3835
3851
  setStatus({
3836
3852
  ...getStatus(),
@@ -3843,6 +3859,7 @@ export async function startOpenclawClawlingGateway(params: StartGatewayParams):
3843
3859
  await waitUntilAbort(abortSignal, async () => {
3844
3860
  log?.info?.(`[${accountId}] clawchat-plugin-openclaw runtime abort received; closing client`);
3845
3861
  activeClients.delete(accountId);
3862
+ unregisterMentionRoster();
3846
3863
  closingForAbort = true;
3847
3864
  clearBootstrapRetry();
3848
3865
  // §A.1 — stop the proactive refresh timer on shutdown.
@@ -71,7 +71,7 @@ export const OFFICIAL_SKILLS_BASE =
71
71
  * in the install-cli repo, bump this constant, ship it. `liveware-sample.ts`
72
72
  * imports the same ref, so the `livewares` tree at that tag is pinned too.
73
73
  */
74
- export const DEFAULT_SKILLS_REF = "skills-v1.15.2";
74
+ export const DEFAULT_SKILLS_REF = "skills-v1.16.0";
75
75
 
76
76
  /** Refuse to treat an absurdly large response as a skill file (defence in depth). */
77
77
  export const MAX_SKILL_BYTES = 256 * 1024;
package/src/tools.ts CHANGED
@@ -1867,11 +1867,18 @@ export function registerOpenclawClawlingTools(
1867
1867
  name: "clawchat_orchestrate_set_agent_behavior",
1868
1868
  label: "Rewrite A Sibling's System Prompt",
1869
1869
  description: toolDescription(
1870
+ "Stage/room speaking rules go in the group description, not here; for a stage, append the stage sentence below to off-desktop members (clawchat-orchestration skill). " +
1870
1871
  "Replace the WHOLE system prompt (behavior) of one of the owner's other agents. " +
1871
1872
  "TRIGGER — invoke when the owner asks to change how another agent behaves, talks, or what it is for. " +
1872
1873
  "This REPLACES the entire field — call clawchat_orchestrate_get_agent first, edit the text you got back, and send the full new value. " +
1873
1874
  "Sending a fragment deletes everything else and the owner cannot recover it. Max 3000 runes. " +
1874
- "Nickname and bio cannot be changed here.",
1875
+ "Nickname and bio cannot be changed here. " +
1876
+ "Behavior follows an agent into every room, so one room's rules never go here — they go in that group's description (clawchat_orchestrate_set_group_prompt). " +
1877
+ "A stage (a group whose description has its agents chime in freely) adds only one line here, the same for every room: " +
1878
+ "give each member that the ClawChat desktop app does not run on the owner's computer — Hermes and OpenClaw plugin agents among them — this sentence, verbatim, " +
1879
+ "appended without deleting anything and without naming the room: " +
1880
+ "\"In a group whose description makes it a stage, you are one of the players: pick up the other characters' lines without waiting to be called.\" " +
1881
+ "Older plugin versions rank the group description below their own reply rules; this line is what lets them speak on a stage.",
1875
1882
  ),
1876
1883
  parameters: ClawchatOrchSetAgentBehaviorSchema,
1877
1884
  async execute(_callId, params) {
@@ -1940,11 +1947,15 @@ export function registerOpenclawClawlingTools(
1940
1947
  name: "clawchat_orchestrate_set_group_prompt",
1941
1948
  label: "Rewrite A Group's System Prompt",
1942
1949
  description: toolDescription(
1950
+ "Stage/room speaking rules go here, in the group description; for a stage, also append the stage sentence to off-desktop members' behavior (clawchat-orchestration skill). " +
1943
1951
  "Replace the WHOLE system prompt (description) of a group the owner administers. " +
1944
1952
  "TRIGGER — invoke when the owner asks to change how a group behaves as a whole. " +
1945
1953
  "This REPLACES the entire field — call clawchat_orchestrate_get_group first and send the full new value. " +
1946
1954
  "Sending a fragment deletes everything else and the owner cannot recover it. Max 3000 runes. " +
1947
- "The group title cannot be changed here.",
1955
+ "The group title cannot be changed here. " +
1956
+ "A room where agents should chime in freely, a stage, says so in its description, and its own rules go nowhere else: behavior follows an agent into every room. " +
1957
+ "A stage also needs one room-independent line in the behavior of each member the ClawChat desktop app does not run on the owner's computer, appended verbatim with clawchat_orchestrate_set_agent_behavior: " +
1958
+ "\"In a group whose description makes it a stage, you are one of the players: pick up the other characters' lines without waiting to be called.\"",
1948
1959
  ),
1949
1960
  parameters: ClawchatOrchSetGroupPromptSchema,
1950
1961
  async execute(_callId, params) {