@daemux/plugin-sdk 0.5.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/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/types/channel.d.ts +95 -0
- package/dist/types/channel.d.ts.map +1 -0
- package/dist/types/channel.js +6 -0
- package/dist/types/channel.js.map +1 -0
- package/dist/types/llm.d.ts +101 -0
- package/dist/types/llm.d.ts.map +1 -0
- package/dist/types/llm.js +6 -0
- package/dist/types/llm.js.map +1 -0
- package/dist/types/transcription.d.ts +18 -0
- package/dist/types/transcription.d.ts.map +1 -0
- package/dist/types/transcription.js +5 -0
- package/dist/types/transcription.js.map +1 -0
- package/package.json +29 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @daemux/plugin-sdk
|
|
3
|
+
* Shared type definitions for all daemux plugins.
|
|
4
|
+
* This package is dependency-free (pure TypeScript interfaces).
|
|
5
|
+
*/
|
|
6
|
+
export type { ToolInputSchema, ToolDefinition, LLMProviderCapabilities, LLMModel, LLMCredentials, LLMChatOptions, LLMChatChunk, LLMChatResponse, LLMProvider, } from './types/llm';
|
|
7
|
+
export type { ChannelMessageType, ChannelAttachment, RichChannelMessage, ChannelSendOptions, ChannelEventHandler, ChannelEventType, ChannelFormatter, } from './types/channel';
|
|
8
|
+
export type { TranscriptionOptions, TranscriptionResult, TranscriptionProvider, } from './types/transcription';
|
|
9
|
+
/** Log severity levels used by plugin loggers. */
|
|
10
|
+
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EACV,eAAe,EACf,cAAc,EACd,uBAAuB,EACvB,QAAQ,EACR,cAAc,EACd,cAAc,EACd,YAAY,EACZ,eAAe,EACf,WAAW,GACZ,MAAM,aAAa,CAAC;AAGrB,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAG/B,kDAAkD;AAClD,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Channel Type Definitions
|
|
3
|
+
* Rich message types, attachments, send options, and event handlers.
|
|
4
|
+
*/
|
|
5
|
+
export type ChannelMessageType = 'text' | 'photo' | 'audio' | 'video' | 'voice' | 'video_note' | 'document' | 'sticker' | 'location' | 'contact' | 'animation';
|
|
6
|
+
export interface ChannelAttachment {
|
|
7
|
+
type: ChannelMessageType;
|
|
8
|
+
/** Remote URL or file ID if available */
|
|
9
|
+
url?: string;
|
|
10
|
+
/** Local file path if downloaded */
|
|
11
|
+
filePath?: string;
|
|
12
|
+
/** Raw buffer data */
|
|
13
|
+
data?: Buffer;
|
|
14
|
+
/** MIME type */
|
|
15
|
+
mimeType?: string;
|
|
16
|
+
/** Original filename */
|
|
17
|
+
fileName?: string;
|
|
18
|
+
/** File size in bytes */
|
|
19
|
+
fileSize?: number;
|
|
20
|
+
/** Duration in seconds (audio/video/voice/video_note) */
|
|
21
|
+
duration?: number;
|
|
22
|
+
/** Width in pixels (photo/video/video_note/sticker) */
|
|
23
|
+
width?: number;
|
|
24
|
+
/** Height in pixels (photo/video/video_note/sticker) */
|
|
25
|
+
height?: number;
|
|
26
|
+
}
|
|
27
|
+
export interface RichChannelMessage {
|
|
28
|
+
[key: string]: unknown;
|
|
29
|
+
id: string;
|
|
30
|
+
channelId: string;
|
|
31
|
+
channelType: string;
|
|
32
|
+
messageType: ChannelMessageType;
|
|
33
|
+
senderId: string;
|
|
34
|
+
senderName?: string;
|
|
35
|
+
senderUsername?: string;
|
|
36
|
+
/** Text content or caption */
|
|
37
|
+
content: string;
|
|
38
|
+
/** Attached media */
|
|
39
|
+
attachments: ChannelAttachment[];
|
|
40
|
+
/** ID of the message being replied to */
|
|
41
|
+
replyToId?: string;
|
|
42
|
+
/** Thread/topic ID */
|
|
43
|
+
threadId?: string;
|
|
44
|
+
/** Unix timestamp in milliseconds */
|
|
45
|
+
timestamp: number;
|
|
46
|
+
/** Is this from a group chat? */
|
|
47
|
+
isGroup: boolean;
|
|
48
|
+
/** Group/chat title */
|
|
49
|
+
chatTitle?: string;
|
|
50
|
+
/** Raw provider-specific metadata */
|
|
51
|
+
metadata: Record<string, unknown>;
|
|
52
|
+
}
|
|
53
|
+
export interface ChannelSendOptions {
|
|
54
|
+
/** Attachments to send */
|
|
55
|
+
attachments?: Array<{
|
|
56
|
+
type: ChannelMessageType;
|
|
57
|
+
data: Buffer;
|
|
58
|
+
fileName: string;
|
|
59
|
+
mimeType?: string;
|
|
60
|
+
}>;
|
|
61
|
+
/** Message ID to reply to */
|
|
62
|
+
replyToId?: string;
|
|
63
|
+
/** Thread/topic ID */
|
|
64
|
+
threadId?: string;
|
|
65
|
+
/** Text formatting mode */
|
|
66
|
+
parseMode?: 'text' | 'markdown' | 'html';
|
|
67
|
+
}
|
|
68
|
+
export type ChannelEventHandler = {
|
|
69
|
+
connected: () => void | Promise<void>;
|
|
70
|
+
disconnected: (reason?: string) => void | Promise<void>;
|
|
71
|
+
error: (error: Error) => void | Promise<void>;
|
|
72
|
+
message: (message: RichChannelMessage) => void | Promise<void>;
|
|
73
|
+
};
|
|
74
|
+
export type ChannelEventType = keyof ChannelEventHandler;
|
|
75
|
+
export interface ChannelFormatter {
|
|
76
|
+
/** Format bold text */
|
|
77
|
+
bold(text: string): string;
|
|
78
|
+
/** Format italic text */
|
|
79
|
+
italic(text: string): string;
|
|
80
|
+
/** Format strikethrough text */
|
|
81
|
+
strikethrough(text: string): string;
|
|
82
|
+
/** Format inline code */
|
|
83
|
+
code(text: string): string;
|
|
84
|
+
/** Format code block with optional language */
|
|
85
|
+
codeBlock(text: string, language?: string): string;
|
|
86
|
+
/** Format a hyperlink */
|
|
87
|
+
link(text: string, url: string): string;
|
|
88
|
+
/** Escape special characters for this format */
|
|
89
|
+
escape(text: string): string;
|
|
90
|
+
/** Convert markdown to this channel's native format */
|
|
91
|
+
fromMarkdown(markdown: string): string;
|
|
92
|
+
/** Split text into chunks respecting format boundaries */
|
|
93
|
+
chunk(text: string, maxLength: number): string[];
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../src/types/channel.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,MAAM,kBAAkB,GAC1B,MAAM,GACN,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,YAAY,GACZ,UAAU,GACV,SAAS,GACT,UAAU,GACV,SAAS,GACT,WAAW,CAAC;AAMhB,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,kBAAkB,CAAC;IACzB,yCAAyC;IACzC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sBAAsB;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wBAAwB;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,y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,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAClD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../../src/types/channel.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLM Provider Type Definitions
|
|
3
|
+
* Interfaces for LLM providers, models, credentials, and chat operations.
|
|
4
|
+
*/
|
|
5
|
+
export interface ToolInputSchema {
|
|
6
|
+
type: 'object';
|
|
7
|
+
properties?: Record<string, unknown>;
|
|
8
|
+
required?: string[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Tool definition supporting both snake_case (input_schema) for the Anthropic API
|
|
12
|
+
* and camelCase (inputSchema) from daemux core. Providers should accept either.
|
|
13
|
+
*/
|
|
14
|
+
export interface ToolDefinition {
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
/** Snake_case variant used by the Anthropic API */
|
|
18
|
+
input_schema?: ToolInputSchema;
|
|
19
|
+
/** CamelCase variant used by daemux core */
|
|
20
|
+
inputSchema?: ToolInputSchema;
|
|
21
|
+
}
|
|
22
|
+
export interface LLMProviderCapabilities {
|
|
23
|
+
streaming: boolean;
|
|
24
|
+
toolUse: boolean;
|
|
25
|
+
vision: boolean;
|
|
26
|
+
maxContextWindow: number;
|
|
27
|
+
}
|
|
28
|
+
export interface LLMModel {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
contextWindow: number;
|
|
32
|
+
maxOutputTokens: number;
|
|
33
|
+
}
|
|
34
|
+
export interface LLMCredentials {
|
|
35
|
+
type: 'token' | 'api_key';
|
|
36
|
+
value: string;
|
|
37
|
+
}
|
|
38
|
+
export interface LLMChatOptions {
|
|
39
|
+
model: string;
|
|
40
|
+
messages: Array<{
|
|
41
|
+
role: string;
|
|
42
|
+
content: string | unknown[];
|
|
43
|
+
}>;
|
|
44
|
+
tools?: ToolDefinition[];
|
|
45
|
+
maxTokens?: number;
|
|
46
|
+
systemPrompt?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface LLMChatChunk {
|
|
49
|
+
type: 'text' | 'tool_use' | 'done';
|
|
50
|
+
content?: string;
|
|
51
|
+
toolUseId?: string;
|
|
52
|
+
toolName?: string;
|
|
53
|
+
toolInput?: Record<string, unknown>;
|
|
54
|
+
stopReason?: 'end_turn' | 'tool_use' | 'max_tokens';
|
|
55
|
+
usage?: {
|
|
56
|
+
inputTokens: number;
|
|
57
|
+
outputTokens: number;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export interface LLMChatResponse {
|
|
61
|
+
content: Array<{
|
|
62
|
+
type: 'text' | 'tool_use';
|
|
63
|
+
text?: string;
|
|
64
|
+
id?: string;
|
|
65
|
+
name?: string;
|
|
66
|
+
input?: Record<string, unknown>;
|
|
67
|
+
}>;
|
|
68
|
+
stopReason: 'end_turn' | 'tool_use' | 'max_tokens' | null;
|
|
69
|
+
usage: {
|
|
70
|
+
inputTokens: number;
|
|
71
|
+
outputTokens: number;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export interface LLMProvider {
|
|
75
|
+
/** Unique identifier for the provider (e.g., 'anthropic', 'openai') */
|
|
76
|
+
id: string;
|
|
77
|
+
/** Human-readable name for the provider */
|
|
78
|
+
name: string;
|
|
79
|
+
/** Provider capabilities */
|
|
80
|
+
capabilities: LLMProviderCapabilities;
|
|
81
|
+
/** Initialize the provider with credentials. Must be called before using other methods. */
|
|
82
|
+
initialize(credentials: LLMCredentials): Promise<void>;
|
|
83
|
+
/** Check if the provider is ready for use */
|
|
84
|
+
isReady(): boolean;
|
|
85
|
+
/** Verify credentials are valid without full initialization */
|
|
86
|
+
verifyCredentials(credentials: LLMCredentials): Promise<{
|
|
87
|
+
valid: boolean;
|
|
88
|
+
error?: string;
|
|
89
|
+
}>;
|
|
90
|
+
/** List available models */
|
|
91
|
+
listModels(): LLMModel[];
|
|
92
|
+
/** Get the default model ID */
|
|
93
|
+
getDefaultModel(): string;
|
|
94
|
+
/** Streaming chat completion */
|
|
95
|
+
chat(options: LLMChatOptions): AsyncGenerator<LLMChatChunk>;
|
|
96
|
+
/** Non-streaming chat completion for compaction/summarization */
|
|
97
|
+
compactionChat(options: LLMChatOptions): Promise<LLMChatResponse>;
|
|
98
|
+
/** Shutdown and cleanup resources */
|
|
99
|
+
shutdown(): Promise<void>;
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=llm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm.d.ts","sourceRoot":"","sources":["../../src/types/llm.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,mDAAmD;IACnD,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,4CAA4C;IAC5C,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAMD,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;CACzB;AAMD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,MA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E,EAAE,MAAM,CAAC;IACX,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,YAAY,EAAE,uBAAuB,CAAC;IAEtC,2FAA2F;IAC3F,UAAU,CAAC,WAAW,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,6CAA6C;IAC7C,OAAO,IAAI,OAAO,CAAC;IACnB,+DAA+D;IAC/D,iBAAiB,CAAC,WAAW,EAAE,cAAc,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5F,4BAA4B;IAC5B,UAAU,IAAI,QAAQ,EAAE,CAAC;IACzB,+BAA+B;IAC/B,eAAe,IAAI,MAAM,CAAC;IAC1B,gCAAgC;IAChC,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC5D,iEAAiE;IACjE,cAAc,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAClE,qCAAqC;IACrC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm.js","sourceRoot":"","sources":["../../src/types/llm.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transcription Provider Type Definitions
|
|
3
|
+
*/
|
|
4
|
+
export interface TranscriptionOptions {
|
|
5
|
+
model?: string;
|
|
6
|
+
language?: string;
|
|
7
|
+
responseFormat?: 'text' | 'json' | 'verbose_json';
|
|
8
|
+
}
|
|
9
|
+
export interface TranscriptionResult {
|
|
10
|
+
text: string;
|
|
11
|
+
language?: string;
|
|
12
|
+
duration?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface TranscriptionProvider {
|
|
15
|
+
readonly id: string;
|
|
16
|
+
transcribe(audio: Buffer, fileName: string, options?: TranscriptionOptions): Promise<TranscriptionResult>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=transcription.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcription.d.ts","sourceRoot":"","sources":["../../src/types/transcription.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,cAAc,CAAC;CACnD;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAMD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,UAAU,CACR,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcription.js","sourceRoot":"","sources":["../../src/types/transcription.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@daemux/plugin-sdk",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "Plugin SDK for building daemux plugins",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": ["dist"],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"clean": "rm -rf dist",
|
|
12
|
+
"typecheck": "tsc --noEmit"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@types/node": "^22.0.0",
|
|
17
|
+
"typescript": "^5.0.0"
|
|
18
|
+
},
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/daemux/daemux-plugins.git",
|
|
25
|
+
"directory": "packages/plugin-sdk"
|
|
26
|
+
},
|
|
27
|
+
"keywords": ["daemux", "plugin", "sdk"],
|
|
28
|
+
"license": "MIT"
|
|
29
|
+
}
|