mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-29 20:58:45 +00:00
Summary: - This PR replaces pair-only heartbeat filtering with span-based filtering before embedded-runner prompt assem ... ession coverage and a changelog entry, and updates the LINE command type to use the SDK command definition. - Reproducibility: yes. from source and report evidence: current main only removes immediate heartbeat prompt/ ... body supplies same-session terminal proof and a commenter supplied a matching Discord gateway observation. Automerge notes: - PR branch already contained follow-up commit before automerge: fix: filter heartbeat transcript artifacts - PR branch already contained follow-up commit before automerge: fix: clean up heartbeat filter lint - PR branch already contained follow-up commit before automerge: fix: keep line entry on channel SDK - PR branch already contained follow-up commit before automerge: fix: filter heartbeat response text transcript shapes - PR branch already contained follow-up commit before automerge: Filter heartbeat response-tool transcript artifacts Validation: - ClawSweeper review passed for heade019c74bb5. - Required merge gates passed before the squash merge. Prepared head SHA:e019c74bb5Review: https://github.com/openclaw/openclaw/pull/83477#issuecomment-4475062400 Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
import {
|
|
defineBundledChannelEntry,
|
|
type OpenClawPluginCommandDefinition,
|
|
type OpenClawPluginApi,
|
|
} from "openclaw/plugin-sdk/channel-entry-contract";
|
|
|
|
type RegisteredLineCardCommand = OpenClawPluginCommandDefinition;
|
|
|
|
let lineCardCommandPromise: Promise<RegisteredLineCardCommand> | null = null;
|
|
|
|
async function loadLineCardCommand(api: OpenClawPluginApi): Promise<RegisteredLineCardCommand> {
|
|
lineCardCommandPromise ??= (async () => {
|
|
let registered: RegisteredLineCardCommand | null = null;
|
|
const { registerLineCardCommand } = await import("./src/card-command.js");
|
|
registerLineCardCommand({
|
|
...api,
|
|
registerCommand(command: RegisteredLineCardCommand) {
|
|
registered = command;
|
|
},
|
|
});
|
|
if (!registered) {
|
|
throw new Error("LINE card command registration unavailable");
|
|
}
|
|
return registered;
|
|
})();
|
|
return await lineCardCommandPromise;
|
|
}
|
|
|
|
export default defineBundledChannelEntry({
|
|
id: "line",
|
|
name: "LINE",
|
|
description: "LINE Messaging API channel plugin",
|
|
importMetaUrl: import.meta.url,
|
|
plugin: {
|
|
specifier: "./channel-plugin-api.js",
|
|
exportName: "linePlugin",
|
|
},
|
|
runtime: {
|
|
specifier: "./runtime-api.js",
|
|
exportName: "setLineRuntime",
|
|
},
|
|
registerFull(api) {
|
|
api.registerCommand({
|
|
name: "card",
|
|
description: "Send a rich card message (LINE).",
|
|
acceptsArgs: true,
|
|
requireAuth: false,
|
|
async handler(ctx) {
|
|
const command = await loadLineCardCommand(api);
|
|
return await command.handler(ctx);
|
|
},
|
|
});
|
|
},
|
|
});
|