openclaw-clawtown-plugin 1.1.13 → 1.1.14
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/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/reporter.ts +23 -2
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "openclaw-clawtown-plugin",
|
|
3
3
|
"name": "OpenClaw Clawtown Plugin",
|
|
4
4
|
"description": "Connects an OpenClaw agent to OpenClaw Forum and reports forum actions",
|
|
5
|
-
"version": "1.1.
|
|
5
|
+
"version": "1.1.14",
|
|
6
6
|
"main": "./index.ts",
|
|
7
7
|
"configSchema": {
|
|
8
8
|
"type": "object",
|
package/package.json
CHANGED
package/reporter.ts
CHANGED
|
@@ -1902,6 +1902,27 @@ function resolveConfiguredProviders(config: Record<string, any> | null) {
|
|
|
1902
1902
|
const provider = raw.includes("/") ? raw.slice(0, raw.indexOf("/")).trim().toLowerCase() : raw.toLowerCase();
|
|
1903
1903
|
if (provider) out.add(provider);
|
|
1904
1904
|
};
|
|
1905
|
+
const visitModelNode = (value: unknown) => {
|
|
1906
|
+
if (typeof value === "string") {
|
|
1907
|
+
if (value.includes("/")) pushModelRef(value);
|
|
1908
|
+
return;
|
|
1909
|
+
}
|
|
1910
|
+
if (Array.isArray(value)) {
|
|
1911
|
+
for (const item of value) visitModelNode(item);
|
|
1912
|
+
return;
|
|
1913
|
+
}
|
|
1914
|
+
if (!value || typeof value !== "object") return;
|
|
1915
|
+
for (const [key, nested] of Object.entries(value)) {
|
|
1916
|
+
if (key === "providers" || key === "mode") continue;
|
|
1917
|
+
if (typeof nested === "string") {
|
|
1918
|
+
if (key === "primary" || key === "fallback" || key === "model" || nested.includes("/")) {
|
|
1919
|
+
pushModelRef(nested);
|
|
1920
|
+
}
|
|
1921
|
+
continue;
|
|
1922
|
+
}
|
|
1923
|
+
visitModelNode(nested);
|
|
1924
|
+
}
|
|
1925
|
+
};
|
|
1905
1926
|
pushModelRef(config?.agent?.model?.primary);
|
|
1906
1927
|
pushModelRef(config?.agents?.defaults?.model?.primary);
|
|
1907
1928
|
pushModelRef(config?.model?.primary);
|
|
@@ -1911,8 +1932,7 @@ function resolveConfiguredProviders(config: Record<string, any> | null) {
|
|
|
1911
1932
|
config?.models,
|
|
1912
1933
|
];
|
|
1913
1934
|
for (const map of modelMaps) {
|
|
1914
|
-
|
|
1915
|
-
for (const key of Object.keys(map)) pushModelRef(key);
|
|
1935
|
+
visitModelNode(map);
|
|
1916
1936
|
}
|
|
1917
1937
|
const providerMaps = [
|
|
1918
1938
|
config?.agent?.models?.providers,
|
|
@@ -2089,6 +2109,7 @@ function normalizeForumHomeConfig(
|
|
|
2089
2109
|
forumConfig: Record<string, any> | null,
|
|
2090
2110
|
) {
|
|
2091
2111
|
const config = cloneJson(inputConfig);
|
|
2112
|
+
delete config.channels;
|
|
2092
2113
|
const gateway = (config.gateway ??= {});
|
|
2093
2114
|
const auth = (gateway.auth ??= {});
|
|
2094
2115
|
const authToken = typeof auth.token === "string" ? auth.token.trim() : "";
|