feat: Add Line plugin (#1630)

* feat: add LINE plugin (#1630) (thanks @plum-dawg)

* feat: complete LINE plugin (#1630) (thanks @plum-dawg)

* chore: drop line plugin node_modules (#1630) (thanks @plum-dawg)

* test: mock /context report in commands test (#1630) (thanks @plum-dawg)

* test: limit macOS CI workers to avoid OOM (#1630) (thanks @plum-dawg)

* test: reduce macOS CI vitest workers (#1630) (thanks @plum-dawg)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
plum-dawg
2026-01-25 07:22:36 -05:00
committed by GitHub
parent 101d0f451f
commit c96ffa7186
85 changed files with 11365 additions and 60 deletions

View File

@@ -12,6 +12,7 @@ import type { InternalHookHandler } from "../hooks/internal-hooks.js";
import type { HookEntry } from "../hooks/types.js";
import type { ModelProviderConfig } from "../config/types.js";
import type { RuntimeEnv } from "../runtime.js";
import type { ReplyPayload } from "../auto-reply/types.js";
import type { WizardPrompter } from "../wizard/prompts.js";
import type { createVpsAwareOAuthHandlers } from "../commands/oauth-flow.js";
import type { GatewayRequestHandler } from "../gateway/server-methods/types.js";
@@ -154,10 +155,7 @@ export type PluginCommandContext = {
/**
* Result returned by a plugin command handler.
*/
export type PluginCommandResult = {
/** Text response to send back to the user */
text: string;
};
export type PluginCommandResult = ReplyPayload;
/**
* Handler function for plugin commands.
@@ -187,6 +185,11 @@ export type ClawdbotPluginHttpHandler = (
res: ServerResponse,
) => Promise<boolean> | boolean;
export type ClawdbotPluginHttpRouteHandler = (
req: IncomingMessage,
res: ServerResponse,
) => Promise<void> | void;
export type ClawdbotPluginCliContext = {
program: Command;
config: ClawdbotConfig;
@@ -249,6 +252,7 @@ export type ClawdbotPluginApi = {
opts?: ClawdbotPluginHookOptions,
) => void;
registerHttpHandler: (handler: ClawdbotPluginHttpHandler) => void;
registerHttpRoute: (params: { path: string; handler: ClawdbotPluginHttpRouteHandler }) => void;
registerChannel: (registration: ClawdbotPluginChannelRegistration | ChannelPlugin) => void;
registerGatewayMethod: (method: string, handler: GatewayRequestHandler) => void;
registerCli: (registrar: ClawdbotPluginCliRegistrar, opts?: { commands?: string[] }) => void;