@paleo/openclaw-discord-mock 0.2.0

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/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Paleo
4
+
5
+ Portions adapted from OpenClaw (https://github.com/steipete/openclaw),
6
+ Copyright (c) 2025 Peter Steinberger. Licensed under the MIT License.
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in all
16
+ copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ SOFTWARE.
package/NOTICE.md ADDED
@@ -0,0 +1,16 @@
1
+ # NOTICE — upstream attribution
2
+
3
+ Thin Discord-shaped wrapper around `@paleo/openclaw-channel-mock-core`. The plugin shape (manifest + entry points) follows upstream [OpenClaw](https://github.com/steipete/openclaw) `extensions/discord/` (MIT, Copyright 2025 Peter Steinberger).
4
+
5
+ ## Shape borrowed from `openclaw/extensions/discord/`
6
+
7
+ - `channel-plugin-api.ts` → `src/channel-plugin-api.ts`
8
+ - `setup-plugin-api.ts` → `src/channel-setup-plugin.ts`
9
+ - `setup-entry.ts` → `src/setup-entry.ts`
10
+ - `index.ts` → `src/index.ts`
11
+ - `runtime-api.ts` → `src/runtime.ts`
12
+ - `openclaw.plugin.json` → `openclaw.plugin.json`
13
+
14
+ The Discord-specific transport implementation is **not** copied; this package delegates to the channel-mock core with `surface: "discord"` and `autoThread: false`.
15
+
16
+ See [`LICENSE`](LICENSE) for the combined MIT license text (Paleo + upstream OpenClaw attribution).
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # @paleo/openclaw-discord-mock
2
+
3
+ Synthetic Discord-shaped OpenClaw channel plugin. Registers as channel `discord-mock` with the full Discord action surface (`send`, `thread-create`, `thread-reply`, `react`, `read`, `edit`, `delete`, `search`). `thread-create` posts an optional body atomically with the new thread; free-form agent text without a tool call lands in the parent channel.
4
+
5
+ Backed by [`@paleo/openclaw-channel-mock-core`](../openclaw-channel-mock-core/) with `surface: "discord"` and `autoThread: false`. Pair with [`@paleo/openclaw-qa-runner`](../openclaw-qa-runner/) for the QA harness.
6
+
7
+ `Provider` / `Surface` / `OriginatingChannel` on inbound metadata are claimed as `discord-mock` so the SDK routes tool-schema discovery to this plugin.
8
+
9
+ ## Attribution
10
+
11
+ Adapted from upstream OpenClaw's `extensions/discord/` plugin shape (manifest + entry points only). See [`NOTICE.md`](NOTICE.md).
@@ -0,0 +1 @@
1
+ export { discordMockPlugin } from "./plugin.js";
@@ -0,0 +1,5 @@
1
+ import { createChannelMockSetupPlugin } from "@paleo/openclaw-channel-mock-core";
2
+ export const discordMockSetupPlugin = createChannelMockSetupPlugin({
3
+ channelId: "discord-mock",
4
+ label: "Discord Mock",
5
+ });
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
2
+ export default defineBundledChannelEntry({
3
+ id: "discord-mock",
4
+ name: "Discord Mock",
5
+ description: "Synthetic Discord-shaped QA channel plugin",
6
+ importMetaUrl: import.meta.url,
7
+ plugin: {
8
+ specifier: "./channel-plugin-api.js",
9
+ exportName: "discordMockPlugin",
10
+ },
11
+ runtime: {
12
+ specifier: "./runtime.js",
13
+ exportName: "setDiscordMockRuntime",
14
+ },
15
+ });
package/dist/plugin.js ADDED
@@ -0,0 +1,9 @@
1
+ import { createChannelMockPlugin } from "@paleo/openclaw-channel-mock-core";
2
+ import { getDiscordMockRuntime } from "./runtime.js";
3
+ export const discordMockPlugin = createChannelMockPlugin({
4
+ channelId: "discord-mock",
5
+ label: "Discord Mock",
6
+ surface: "discord",
7
+ autoThread: false,
8
+ getRuntime: getDiscordMockRuntime,
9
+ });
@@ -0,0 +1,4 @@
1
+ import { createChannelMockRuntimeStore } from "@paleo/openclaw-channel-mock-core";
2
+ const store = createChannelMockRuntimeStore("discord-mock");
3
+ export const setDiscordMockRuntime = store.setRuntime;
4
+ export const getDiscordMockRuntime = store.getRuntime;
@@ -0,0 +1,12 @@
1
+ import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
2
+ export default defineBundledChannelSetupEntry({
3
+ importMetaUrl: import.meta.url,
4
+ plugin: {
5
+ specifier: "./channel-setup-plugin.js",
6
+ exportName: "discordMockSetupPlugin",
7
+ },
8
+ runtime: {
9
+ specifier: "./runtime.js",
10
+ exportName: "setDiscordMockRuntime",
11
+ },
12
+ });
@@ -0,0 +1,6 @@
1
+ {
2
+ "id": "discord-mock",
3
+ "activation": { "onStartup": false },
4
+ "channels": ["discord-mock"],
5
+ "configSchema": { "type": "object", "additionalProperties": false, "properties": {} }
6
+ }
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "@paleo/openclaw-discord-mock",
3
+ "version": "0.2.0",
4
+ "description": "Synthetic Discord-shaped OpenClaw channel plugin for automated QA scenarios.",
5
+ "keywords": [
6
+ "openclaw",
7
+ "qa",
8
+ "testing",
9
+ "discord",
10
+ "channel",
11
+ "mock"
12
+ ],
13
+ "license": "MIT",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/paleo/alignfirst.git",
17
+ "directory": "packages/openclaw-discord-mock"
18
+ },
19
+ "engines": {
20
+ "node": ">=22.11.0"
21
+ },
22
+ "packageManager": "npm@11.11.0",
23
+ "type": "module",
24
+ "main": "./dist/index.js",
25
+ "files": [
26
+ "dist/",
27
+ "openclaw.plugin.json",
28
+ "LICENSE",
29
+ "NOTICE.md"
30
+ ],
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "openclaw": {
35
+ "extensions": [
36
+ "./dist/index.js"
37
+ ],
38
+ "setupEntry": "./dist/setup-entry.js",
39
+ "channel": {
40
+ "id": "discord-mock",
41
+ "label": "Discord Mock",
42
+ "selectionLabel": "Discord Mock (Synthetic)",
43
+ "detailLabel": "Discord Mock",
44
+ "docsPath": "/channels/discord-mock",
45
+ "docsLabel": "discord-mock",
46
+ "blurb": "Synthetic Discord-shaped transport for automated OpenClaw QA scenarios.",
47
+ "systemImage": "checklist",
48
+ "order": 998,
49
+ "exposure": {
50
+ "configured": false,
51
+ "setup": false,
52
+ "docs": false
53
+ }
54
+ }
55
+ },
56
+ "scripts": {
57
+ "build": "tsc -p tsconfig.build.json",
58
+ "clear": "rimraf dist/*",
59
+ "lint": "biome check",
60
+ "test": "vitest run",
61
+ "prepublishOnly": "npm i && npm run clear && npm run build && npm run lint && npm run test"
62
+ },
63
+ "peerDependencies": {
64
+ "openclaw": "*"
65
+ },
66
+ "dependencies": {
67
+ "@paleo/openclaw-channel-mock-core": "0.2.0"
68
+ },
69
+ "devDependencies": {
70
+ "@types/node": "~24.12.4",
71
+ "openclaw": "2026.5.18",
72
+ "rimraf": "~6.1.3",
73
+ "typescript": "~6.0.3",
74
+ "vitest": "~4.1.6"
75
+ }
76
+ }