@clawling/clawchat-plugin-openclaw 2026.9.22-2 → 2026.9.23-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/dist/src/api-client.js +100 -3
- package/dist/src/skill-update.js +1 -1
- package/dist/src/tools-schema.js +51 -0
- package/dist/src/tools.js +209 -2
- package/openclaw.plugin.json +13 -1
- package/package.json +3 -1
- package/skills/clawchat-core/SKILL.md +5 -10
- package/skills/clawchat-orchestration/SKILL.md +60 -78
- package/skills/manifest.json +12 -12
- package/src/api-client.ts +140 -4
- package/src/skill-update.ts +1 -1
- package/src/tools-schema.ts +88 -0
- package/src/tools.ts +341 -1
package/src/tools.ts
CHANGED
|
@@ -77,6 +77,17 @@ import {
|
|
|
77
77
|
ClawchatListAppsSchema,
|
|
78
78
|
ClawchatUnregisterAppSchema,
|
|
79
79
|
ClawchatLivewareLoginSchema,
|
|
80
|
+
ClawchatOrchListAgentsSchema,
|
|
81
|
+
ClawchatOrchGetAgentSchema,
|
|
82
|
+
ClawchatOrchSetAgentBehaviorSchema,
|
|
83
|
+
ClawchatOrchListGroupsSchema,
|
|
84
|
+
ClawchatOrchGetGroupSchema,
|
|
85
|
+
ClawchatOrchSetGroupPromptSchema,
|
|
86
|
+
ClawchatOrchCreateGroupSchema,
|
|
87
|
+
ClawchatOrchGroupMemberSchema,
|
|
88
|
+
ClawchatOrchSetGroupAgentSettingsSchema,
|
|
89
|
+
ClawchatOrchCreateConnectCodeSchema,
|
|
90
|
+
ClawchatOrchGetConnectCodeSchema,
|
|
80
91
|
type ClawchatMemoryEditParams,
|
|
81
92
|
type ClawchatMemoryReadParams,
|
|
82
93
|
type ClawchatMemorySearchParams,
|
|
@@ -109,6 +120,14 @@ import {
|
|
|
109
120
|
type ClawchatRegisterAppParams,
|
|
110
121
|
type ClawchatUnregisterAppParams,
|
|
111
122
|
type ClawchatLivewareLoginParams,
|
|
123
|
+
type ClawchatOrchGetAgentParams,
|
|
124
|
+
type ClawchatOrchSetAgentBehaviorParams,
|
|
125
|
+
type ClawchatOrchGetGroupParams,
|
|
126
|
+
type ClawchatOrchSetGroupPromptParams,
|
|
127
|
+
type ClawchatOrchCreateGroupParams,
|
|
128
|
+
type ClawchatOrchGroupMemberParams,
|
|
129
|
+
type ClawchatOrchSetGroupAgentSettingsParams,
|
|
130
|
+
type ClawchatOrchGetConnectCodeParams,
|
|
112
131
|
} from "./tools-schema.ts";
|
|
113
132
|
|
|
114
133
|
const MAX_UPLOAD_BYTES = 20 * 1024 * 1024;
|
|
@@ -1762,7 +1781,328 @@ export function registerOpenclawClawlingTools(
|
|
|
1762
1781
|
{ name: "clawchat_liveware_login" },
|
|
1763
1782
|
);
|
|
1764
1783
|
|
|
1784
|
+
// --- cloud orchestration (`agent.orchestrate`) ---------------------------
|
|
1785
|
+
// Twelve tools, 1:1 with docs/features/agentorch.md. Every response is HTTP
|
|
1786
|
+
// 200 with the business code in the envelope (a 21003 owner-approval
|
|
1787
|
+
// denial is the single most common outcome), so these use plain
|
|
1788
|
+
// `withClient` — never `withGatedClient` — and hand the caller the raw
|
|
1789
|
+
// envelope untouched. The shared orchestration skill text tells the model
|
|
1790
|
+
// to read `code` itself; rewriting the shape here would make the same
|
|
1791
|
+
// sentence behave differently than on the Hermes side.
|
|
1792
|
+
|
|
1793
|
+
api.registerTool(
|
|
1794
|
+
(ctx) => {
|
|
1795
|
+
const accountId = resolveOpenclawClawlingToolAccountId(ctx);
|
|
1796
|
+
return {
|
|
1797
|
+
name: "clawchat_orchestrate_list_agents",
|
|
1798
|
+
label: "List The Owner's Agents",
|
|
1799
|
+
description: toolDescription(
|
|
1800
|
+
"List every agent the owner owns, including this one (flagged is_self). " +
|
|
1801
|
+
"TRIGGER — invoke first whenever the owner asks about, or asks to change, one of their OTHER agents. " +
|
|
1802
|
+
"This is the only way to learn a sibling's agentId; never guess one from a nickname.",
|
|
1803
|
+
),
|
|
1804
|
+
parameters: ClawchatOrchListAgentsSchema,
|
|
1805
|
+
async execute(_callId, params) {
|
|
1806
|
+
return await recordClawchatToolCall(accountId, "clawchat_orchestrate_list_agents", params, async () =>
|
|
1807
|
+
withClient(accountId, (c) => c.orchListAgents()),
|
|
1808
|
+
);
|
|
1809
|
+
},
|
|
1810
|
+
};
|
|
1811
|
+
},
|
|
1812
|
+
{ name: "clawchat_orchestrate_list_agents" },
|
|
1813
|
+
);
|
|
1814
|
+
|
|
1815
|
+
api.registerTool(
|
|
1816
|
+
(ctx) => {
|
|
1817
|
+
const accountId = resolveOpenclawClawlingToolAccountId(ctx);
|
|
1818
|
+
return {
|
|
1819
|
+
name: "clawchat_orchestrate_get_agent",
|
|
1820
|
+
label: "Get A Sibling Agent",
|
|
1821
|
+
description: toolDescription(
|
|
1822
|
+
"Read one of the owner's agents by explicit agentId, including its read-only permission map. " +
|
|
1823
|
+
"TRIGGER — invoke before rewriting a sibling's system prompt (the PATCH replaces the whole field, so read it first), " +
|
|
1824
|
+
"or to explain why a sibling cannot do something instead of retrying on its behalf.",
|
|
1825
|
+
),
|
|
1826
|
+
parameters: ClawchatOrchGetAgentSchema,
|
|
1827
|
+
async execute(_callId, params) {
|
|
1828
|
+
return await recordClawchatToolCall(accountId, "clawchat_orchestrate_get_agent", params, async () => {
|
|
1829
|
+
const p = params as ClawchatOrchGetAgentParams;
|
|
1830
|
+
return await withClient(accountId, (c) => c.orchGetAgent(p.agentId));
|
|
1831
|
+
});
|
|
1832
|
+
},
|
|
1833
|
+
};
|
|
1834
|
+
},
|
|
1835
|
+
{ name: "clawchat_orchestrate_get_agent" },
|
|
1836
|
+
);
|
|
1837
|
+
|
|
1838
|
+
api.registerTool(
|
|
1839
|
+
(ctx) => {
|
|
1840
|
+
const accountId = resolveOpenclawClawlingToolAccountId(ctx);
|
|
1841
|
+
return {
|
|
1842
|
+
name: "clawchat_orchestrate_set_agent_behavior",
|
|
1843
|
+
label: "Rewrite A Sibling's System Prompt",
|
|
1844
|
+
description: toolDescription(
|
|
1845
|
+
"Replace the WHOLE system prompt (behavior) of one of the owner's other agents. " +
|
|
1846
|
+
"TRIGGER — invoke when the owner asks to change how another agent behaves, talks, or what it is for. " +
|
|
1847
|
+
"This REPLACES the entire field — call clawchat_orchestrate_get_agent first, edit the text you got back, and send the full new value. " +
|
|
1848
|
+
"Sending a fragment deletes everything else and the owner cannot recover it. Max 3000 runes. " +
|
|
1849
|
+
"Nickname and bio cannot be changed here.",
|
|
1850
|
+
),
|
|
1851
|
+
parameters: ClawchatOrchSetAgentBehaviorSchema,
|
|
1852
|
+
async execute(_callId, params) {
|
|
1853
|
+
return await recordClawchatToolCall(
|
|
1854
|
+
accountId,
|
|
1855
|
+
"clawchat_orchestrate_set_agent_behavior",
|
|
1856
|
+
params,
|
|
1857
|
+
async () => {
|
|
1858
|
+
const p = params as ClawchatOrchSetAgentBehaviorParams;
|
|
1859
|
+
return await withClient(accountId, (c) => c.orchSetAgentBehavior(p.agentId, p.behavior));
|
|
1860
|
+
},
|
|
1861
|
+
);
|
|
1862
|
+
},
|
|
1863
|
+
};
|
|
1864
|
+
},
|
|
1865
|
+
{ name: "clawchat_orchestrate_set_agent_behavior" },
|
|
1866
|
+
);
|
|
1867
|
+
|
|
1868
|
+
api.registerTool(
|
|
1869
|
+
(ctx) => {
|
|
1870
|
+
const accountId = resolveOpenclawClawlingToolAccountId(ctx);
|
|
1871
|
+
return {
|
|
1872
|
+
name: "clawchat_orchestrate_list_groups",
|
|
1873
|
+
label: "List Manageable Groups",
|
|
1874
|
+
description: toolDescription(
|
|
1875
|
+
"List the groups the owner can administer. " +
|
|
1876
|
+
"TRIGGER — invoke when the owner talks about a group of their agents without naming a conversation id.",
|
|
1877
|
+
),
|
|
1878
|
+
parameters: ClawchatOrchListGroupsSchema,
|
|
1879
|
+
async execute(_callId, params) {
|
|
1880
|
+
return await recordClawchatToolCall(accountId, "clawchat_orchestrate_list_groups", params, async () =>
|
|
1881
|
+
withClient(accountId, (c) => c.orchListGroups()),
|
|
1882
|
+
);
|
|
1883
|
+
},
|
|
1884
|
+
};
|
|
1885
|
+
},
|
|
1886
|
+
{ name: "clawchat_orchestrate_list_groups" },
|
|
1887
|
+
);
|
|
1888
|
+
|
|
1889
|
+
api.registerTool(
|
|
1890
|
+
(ctx) => {
|
|
1891
|
+
const accountId = resolveOpenclawClawlingToolAccountId(ctx);
|
|
1892
|
+
return {
|
|
1893
|
+
name: "clawchat_orchestrate_get_group",
|
|
1894
|
+
label: "Get A Managed Group",
|
|
1895
|
+
description: toolDescription(
|
|
1896
|
+
"Read one group by explicit conversationId, including its system prompt and member agent ids. " +
|
|
1897
|
+
"TRIGGER — invoke before rewriting a group prompt, and after any write, to report what the server now says.",
|
|
1898
|
+
),
|
|
1899
|
+
parameters: ClawchatOrchGetGroupSchema,
|
|
1900
|
+
async execute(_callId, params) {
|
|
1901
|
+
return await recordClawchatToolCall(accountId, "clawchat_orchestrate_get_group", params, async () => {
|
|
1902
|
+
const p = params as ClawchatOrchGetGroupParams;
|
|
1903
|
+
return await withClient(accountId, (c) => c.orchGetGroup(p.conversationId));
|
|
1904
|
+
});
|
|
1905
|
+
},
|
|
1906
|
+
};
|
|
1907
|
+
},
|
|
1908
|
+
{ name: "clawchat_orchestrate_get_group" },
|
|
1909
|
+
);
|
|
1910
|
+
|
|
1911
|
+
api.registerTool(
|
|
1912
|
+
(ctx) => {
|
|
1913
|
+
const accountId = resolveOpenclawClawlingToolAccountId(ctx);
|
|
1914
|
+
return {
|
|
1915
|
+
name: "clawchat_orchestrate_set_group_prompt",
|
|
1916
|
+
label: "Rewrite A Group's System Prompt",
|
|
1917
|
+
description: toolDescription(
|
|
1918
|
+
"Replace the WHOLE system prompt (description) of a group the owner administers. " +
|
|
1919
|
+
"TRIGGER — invoke when the owner asks to change how a group behaves as a whole. " +
|
|
1920
|
+
"This REPLACES the entire field — call clawchat_orchestrate_get_group first and send the full new value. " +
|
|
1921
|
+
"Sending a fragment deletes everything else and the owner cannot recover it. Max 3000 runes. " +
|
|
1922
|
+
"The group title cannot be changed here.",
|
|
1923
|
+
),
|
|
1924
|
+
parameters: ClawchatOrchSetGroupPromptSchema,
|
|
1925
|
+
async execute(_callId, params) {
|
|
1926
|
+
return await recordClawchatToolCall(
|
|
1927
|
+
accountId,
|
|
1928
|
+
"clawchat_orchestrate_set_group_prompt",
|
|
1929
|
+
params,
|
|
1930
|
+
async () => {
|
|
1931
|
+
const p = params as ClawchatOrchSetGroupPromptParams;
|
|
1932
|
+
return await withClient(accountId, (c) => c.orchSetGroupPrompt(p.conversationId, p.description));
|
|
1933
|
+
},
|
|
1934
|
+
);
|
|
1935
|
+
},
|
|
1936
|
+
};
|
|
1937
|
+
},
|
|
1938
|
+
{ name: "clawchat_orchestrate_set_group_prompt" },
|
|
1939
|
+
);
|
|
1940
|
+
|
|
1941
|
+
api.registerTool(
|
|
1942
|
+
(ctx) => {
|
|
1943
|
+
const accountId = resolveOpenclawClawlingToolAccountId(ctx);
|
|
1944
|
+
return {
|
|
1945
|
+
name: "clawchat_orchestrate_create_group",
|
|
1946
|
+
label: "Create A Group Of The Owner's Agents",
|
|
1947
|
+
description: toolDescription(
|
|
1948
|
+
"Create a new group containing the owner's own agents. " +
|
|
1949
|
+
"TRIGGER — invoke when the owner asks to put several of their agents in a group together.",
|
|
1950
|
+
),
|
|
1951
|
+
parameters: ClawchatOrchCreateGroupSchema,
|
|
1952
|
+
async execute(_callId, params) {
|
|
1953
|
+
return await recordClawchatToolCall(accountId, "clawchat_orchestrate_create_group", params, async () => {
|
|
1954
|
+
const p = params as ClawchatOrchCreateGroupParams;
|
|
1955
|
+
return await withClient(accountId, (c) => c.orchCreateGroup(p.title, p.agentIds));
|
|
1956
|
+
});
|
|
1957
|
+
},
|
|
1958
|
+
};
|
|
1959
|
+
},
|
|
1960
|
+
{ name: "clawchat_orchestrate_create_group" },
|
|
1961
|
+
);
|
|
1962
|
+
|
|
1963
|
+
api.registerTool(
|
|
1964
|
+
(ctx) => {
|
|
1965
|
+
const accountId = resolveOpenclawClawlingToolAccountId(ctx);
|
|
1966
|
+
return {
|
|
1967
|
+
name: "clawchat_orchestrate_add_group_member",
|
|
1968
|
+
label: "Add An Agent To A Group",
|
|
1969
|
+
description: toolDescription(
|
|
1970
|
+
"Add one of the owner's agents to a group the owner administers. " +
|
|
1971
|
+
"TRIGGER — invoke when the owner asks to bring another of their agents into an existing group. " +
|
|
1972
|
+
"You cannot add yourself; that is rejected outright.",
|
|
1973
|
+
),
|
|
1974
|
+
parameters: ClawchatOrchGroupMemberSchema,
|
|
1975
|
+
async execute(_callId, params) {
|
|
1976
|
+
return await recordClawchatToolCall(
|
|
1977
|
+
accountId,
|
|
1978
|
+
"clawchat_orchestrate_add_group_member",
|
|
1979
|
+
params,
|
|
1980
|
+
async () => {
|
|
1981
|
+
const p = params as ClawchatOrchGroupMemberParams;
|
|
1982
|
+
return await withClient(accountId, (c) => c.orchAddGroupMember(p.conversationId, p.agentId));
|
|
1983
|
+
},
|
|
1984
|
+
);
|
|
1985
|
+
},
|
|
1986
|
+
};
|
|
1987
|
+
},
|
|
1988
|
+
{ name: "clawchat_orchestrate_add_group_member" },
|
|
1989
|
+
);
|
|
1990
|
+
|
|
1991
|
+
api.registerTool(
|
|
1992
|
+
(ctx) => {
|
|
1993
|
+
const accountId = resolveOpenclawClawlingToolAccountId(ctx);
|
|
1994
|
+
return {
|
|
1995
|
+
name: "clawchat_orchestrate_remove_group_member",
|
|
1996
|
+
label: "Remove An Agent From A Group",
|
|
1997
|
+
description: toolDescription(
|
|
1998
|
+
"Remove one of the owner's agents from a group the owner administers. " +
|
|
1999
|
+
"TRIGGER — invoke when the owner asks to take an agent out of a group.",
|
|
2000
|
+
),
|
|
2001
|
+
parameters: ClawchatOrchGroupMemberSchema,
|
|
2002
|
+
async execute(_callId, params) {
|
|
2003
|
+
return await recordClawchatToolCall(
|
|
2004
|
+
accountId,
|
|
2005
|
+
"clawchat_orchestrate_remove_group_member",
|
|
2006
|
+
params,
|
|
2007
|
+
async () => {
|
|
2008
|
+
const p = params as ClawchatOrchGroupMemberParams;
|
|
2009
|
+
return await withClient(accountId, (c) => c.orchRemoveGroupMember(p.conversationId, p.agentId));
|
|
2010
|
+
},
|
|
2011
|
+
);
|
|
2012
|
+
},
|
|
2013
|
+
};
|
|
2014
|
+
},
|
|
2015
|
+
{ name: "clawchat_orchestrate_remove_group_member" },
|
|
2016
|
+
);
|
|
2017
|
+
|
|
2018
|
+
api.registerTool(
|
|
2019
|
+
(ctx) => {
|
|
2020
|
+
const accountId = resolveOpenclawClawlingToolAccountId(ctx);
|
|
2021
|
+
return {
|
|
2022
|
+
name: "clawchat_orchestrate_set_group_agent_settings",
|
|
2023
|
+
label: "Set An Agent's Speaking Settings In A Group",
|
|
2024
|
+
description: toolDescription(
|
|
2025
|
+
"Set how one agent speaks inside one group: muted, reply mode, and batching delay. " +
|
|
2026
|
+
"TRIGGER — invoke FIRST when a group is flooding, echoing, or an agent will not stop. " +
|
|
2027
|
+
"These are the hard controls; a rule written into a prompt stops working after compaction or a restart, so pair every soft rule with one of these. " +
|
|
2028
|
+
"Omitted fields are left unchanged.",
|
|
2029
|
+
),
|
|
2030
|
+
parameters: ClawchatOrchSetGroupAgentSettingsSchema,
|
|
2031
|
+
async execute(_callId, params) {
|
|
2032
|
+
return await recordClawchatToolCall(
|
|
2033
|
+
accountId,
|
|
2034
|
+
"clawchat_orchestrate_set_group_agent_settings",
|
|
2035
|
+
params,
|
|
2036
|
+
async () => {
|
|
2037
|
+
const p = params as ClawchatOrchSetGroupAgentSettingsParams;
|
|
2038
|
+
return await withClient(accountId, (c) =>
|
|
2039
|
+
c.orchSetGroupAgentSettings(p.conversationId, p.agentId, {
|
|
2040
|
+
muted: p.muted,
|
|
2041
|
+
replyMode: p.replyMode,
|
|
2042
|
+
batchDelaySeconds: p.batchDelaySeconds,
|
|
2043
|
+
}),
|
|
2044
|
+
);
|
|
2045
|
+
},
|
|
2046
|
+
);
|
|
2047
|
+
},
|
|
2048
|
+
};
|
|
2049
|
+
},
|
|
2050
|
+
{ name: "clawchat_orchestrate_set_group_agent_settings" },
|
|
2051
|
+
);
|
|
2052
|
+
|
|
2053
|
+
api.registerTool(
|
|
2054
|
+
(ctx) => {
|
|
2055
|
+
const accountId = resolveOpenclawClawlingToolAccountId(ctx);
|
|
2056
|
+
return {
|
|
2057
|
+
name: "clawchat_orchestrate_create_connect_code",
|
|
2058
|
+
label: "Issue A Connect Code",
|
|
2059
|
+
description: toolDescription(
|
|
2060
|
+
"Mint a connect code on the owner's behalf, valid 30 minutes. " +
|
|
2061
|
+
"TRIGGER — invoke when the owner asks for a code to connect a new agent. " +
|
|
2062
|
+
"The rate limit bucket belongs to the owner and is shared with their own manual issuance, so do not retry on a limit.",
|
|
2063
|
+
),
|
|
2064
|
+
parameters: ClawchatOrchCreateConnectCodeSchema,
|
|
2065
|
+
async execute(_callId, params) {
|
|
2066
|
+
return await recordClawchatToolCall(
|
|
2067
|
+
accountId,
|
|
2068
|
+
"clawchat_orchestrate_create_connect_code",
|
|
2069
|
+
params,
|
|
2070
|
+
async () => withClient(accountId, (c) => c.orchCreateConnectCode()),
|
|
2071
|
+
);
|
|
2072
|
+
},
|
|
2073
|
+
};
|
|
2074
|
+
},
|
|
2075
|
+
{ name: "clawchat_orchestrate_create_connect_code" },
|
|
2076
|
+
);
|
|
2077
|
+
|
|
2078
|
+
api.registerTool(
|
|
2079
|
+
(ctx) => {
|
|
2080
|
+
const accountId = resolveOpenclawClawlingToolAccountId(ctx);
|
|
2081
|
+
return {
|
|
2082
|
+
name: "clawchat_orchestrate_get_connect_code",
|
|
2083
|
+
label: "Read A Connect Code's Status",
|
|
2084
|
+
description: toolDescription(
|
|
2085
|
+
"Read the status of a connect code the owner minted. " +
|
|
2086
|
+
"TRIGGER — invoke when the owner asks whether a code was used or has expired.",
|
|
2087
|
+
),
|
|
2088
|
+
parameters: ClawchatOrchGetConnectCodeSchema,
|
|
2089
|
+
async execute(_callId, params) {
|
|
2090
|
+
return await recordClawchatToolCall(
|
|
2091
|
+
accountId,
|
|
2092
|
+
"clawchat_orchestrate_get_connect_code",
|
|
2093
|
+
params,
|
|
2094
|
+
async () => {
|
|
2095
|
+
const p = params as ClawchatOrchGetConnectCodeParams;
|
|
2096
|
+
return await withClient(accountId, (c) => c.orchGetConnectCode(p.code));
|
|
2097
|
+
},
|
|
2098
|
+
);
|
|
2099
|
+
},
|
|
2100
|
+
};
|
|
2101
|
+
},
|
|
2102
|
+
{ name: "clawchat_orchestrate_get_connect_code" },
|
|
2103
|
+
);
|
|
2104
|
+
|
|
1765
2105
|
api.logger.debug?.(
|
|
1766
|
-
"clawchat-plugin-openclaw: registered
|
|
2106
|
+
"clawchat-plugin-openclaw: registered 43 clawchat_* tools (get_account_profile, get_user_profile, list_account_friends, send_friend_request, list_friend_requests, accept_friend_request, reject_friend_request, remove_friend, search_users, get_conversation, mention_message, list_moments, get_moment, create_moment, delete_moment, toggle_moment_reaction, create_moment_comment, reply_moment_comment, delete_moment_comment, update_account_profile, upload_avatar_image, memory_search, memory_read, memory_write, memory_edit, metadata_sync, metadata_update, register_app, list_apps, unregister_app, liveware_login, orchestrate_list_agents, orchestrate_get_agent, orchestrate_set_agent_behavior, orchestrate_list_groups, orchestrate_get_group, orchestrate_set_group_prompt, orchestrate_create_group, orchestrate_add_group_member, orchestrate_remove_group_member, orchestrate_set_group_agent_settings, orchestrate_create_connect_code, orchestrate_get_connect_code)",
|
|
1767
2107
|
);
|
|
1768
2108
|
}
|