Skip to content

Commit 82f57c6

Browse files
authored
Merge branch 'main' into feat/task-health-status-maintenance
2 parents 79f7e6b + 51e053d commit 82f57c6

File tree

7 files changed

+24
-15
lines changed

7 files changed

+24
-15
lines changed

docs/gateway/security/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ OpenClaw is **not** a hostile multi-tenant security boundary for multiple advers
1313
If you need mixed-trust or adversarial-user operation, split trust boundaries (separate gateway + credentials, ideally separate OS users/hosts).
1414
</Warning>
1515

16-
**On this page:** [Trust model](#scope-first-personal-assistant-security-model) | [Quick audit](#quick-check-openclaw-security-audit) | [Hardened baseline](#hardened-baseline-excerpt) | [DM access model](#dm-access-model) | [Configuration hardening](#configuration-hardening-examples) | [Incident response](#incident-response)
16+
**On this page:** [Trust model](#scope-first-personal-assistant-security-model) | [Quick audit](#quick-check-openclaw-security-audit) | [Hardened baseline](#hardened-baseline-in-60-seconds) | [DM access model](#dm-access-model-pairing--allowlist--open--disabled) | [Configuration hardening](#configuration-hardening-examples) | [Incident response](#incident-response)
1717

1818
## Scope first: personal assistant security model
1919

extensions/feishu/src/bot.test.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -259,13 +259,6 @@ vi.mock("openclaw/plugin-sdk/conversation-runtime", async (importOriginal) => {
259259
};
260260
});
261261

262-
vi.mock("openclaw/plugin-sdk/conversation-runtime", () => ({
263-
getSessionBindingService: () => ({
264-
resolveByConversation: mockResolveBoundConversation,
265-
touch: mockTouchBinding,
266-
}),
267-
}));
268-
269262
async function dispatchMessage(params: { cfg: ClawdbotConfig; event: FeishuMessageEvent }) {
270263
const runtime = createRuntimeEnv();
271264
await handleFeishuMessage({

extensions/matrix/src/plugin-entry.runtime.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { fileURLToPath } from "node:url";
99
const require = createRequire(import.meta.url);
1010
const { createJiti } = require("jiti");
1111

12+
const OPENCLAW_PLUGIN_SDK_PREFIX = ["openclaw", "plugin-sdk"].join("/");
1213
const PLUGIN_SDK_EXPORT_PREFIX = "./plugin-sdk/";
1314
const PLUGIN_SDK_SOURCE_EXTENSIONS = [".ts", ".mts", ".js", ".mjs", ".cts", ".cjs"];
1415
const JITI_EXTENSIONS = [
@@ -72,7 +73,7 @@ function buildPluginSdkAliasMap(moduleUrl) {
7273
resolveExistingFile(path.join(sourcePluginSdkDir, "root-alias"), [".cjs"]) ??
7374
resolveExistingFile(path.join(distPluginSdkDir, "root-alias"), [".cjs"]);
7475
if (rootAlias) {
75-
aliasMap["openclaw/plugin-sdk"] = rootAlias;
76+
aliasMap[OPENCLAW_PLUGIN_SDK_PREFIX] = rootAlias;
7677
}
7778

7879
for (const exportKey of Object.keys(packageJson.exports ?? {})) {
@@ -87,7 +88,7 @@ function buildPluginSdkAliasMap(moduleUrl) {
8788
resolveExistingFile(path.join(sourcePluginSdkDir, subpath), PLUGIN_SDK_SOURCE_EXTENSIONS) ??
8889
resolveExistingFile(path.join(distPluginSdkDir, subpath), [".js"]);
8990
if (resolvedPath) {
90-
aliasMap[`openclaw/plugin-sdk/${subpath}`] = resolvedPath;
91+
aliasMap[`${OPENCLAW_PLUGIN_SDK_PREFIX}/${subpath}`] = resolvedPath;
9192
}
9293
}
9394

extensions/openai/index.test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,13 @@ vi.mock("openclaw/plugin-sdk/runtime-env", () => ({
2626
ensureGlobalUndiciEnvProxyDispatcher: runtimeMocks.ensureGlobalUndiciEnvProxyDispatcher,
2727
}));
2828

29-
vi.mock("@mariozechner/pi-ai/oauth", () => ({
30-
refreshOpenAICodexToken: runtimeMocks.refreshOpenAICodexToken,
31-
}));
29+
vi.mock("@mariozechner/pi-ai/oauth", async (importOriginal) => {
30+
const actual = await importOriginal<typeof import("@mariozechner/pi-ai/oauth")>();
31+
return {
32+
...actual,
33+
refreshOpenAICodexToken: runtimeMocks.refreshOpenAICodexToken,
34+
};
35+
});
3236

3337
import { refreshOpenAICodexToken } from "./openai-codex-provider.runtime.js";
3438

extensions/telegram/src/thread-bindings.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import path from "node:path";
44
import { getSessionBindingService } from "openclaw/plugin-sdk/conversation-runtime";
55
import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
66
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
7-
import { loadBundledPluginTestApiSync } from "../../../src/test-utils/bundled-plugin-public-surface.js";
87
import { importFreshModule } from "../../../test/helpers/import-fresh.js";
8+
import { loadBundledPluginTestApiSync } from "../../../test/helpers/plugins/bundled-plugin-public-surface.js";
99
import {
1010
__testing,
1111
createTelegramThreadBindingManager,

src/agents/skills.test-helpers.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import fs from "node:fs/promises";
22
import path from "node:path";
3-
import type { Skill } from "@mariozechner/pi-coding-agent";
3+
import { createSyntheticSourceInfo, type Skill } from "@mariozechner/pi-coding-agent";
44

55
export async function writeSkill(params: {
66
dir: string;
@@ -37,6 +37,12 @@ export function createCanonicalFixtureSkill(params: {
3737
filePath: params.filePath,
3838
baseDir: params.baseDir,
3939
source: params.source,
40+
sourceInfo: createSyntheticSourceInfo(params.filePath, {
41+
source: params.source,
42+
baseDir: params.baseDir,
43+
scope: "project",
44+
origin: "top-level",
45+
}),
4046
disableModelInvocation: params.disableModelInvocation ?? false,
4147
};
4248
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export {
2+
loadBundledPluginPublicSurfaceSync,
3+
loadBundledPluginTestApiSync,
4+
resolveRelativeBundledPluginPublicModuleId,
5+
} from "../../../src/test-utils/bundled-plugin-public-surface.js";

0 commit comments

Comments
 (0)