@elizaos/plugin-line 2.0.0-alpha.7 → 2.0.11-beta.7
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 +21 -0
- package/README.md +185 -0
- package/package.json +28 -12
- package/dist/accounts.d.ts +0 -152
- package/dist/accounts.d.ts.map +0 -1
- package/dist/accounts.js +0 -258
- package/dist/accounts.js.map +0 -1
- package/dist/actions/index.d.ts +0 -7
- package/dist/actions/index.d.ts.map +0 -1
- package/dist/actions/index.js +0 -7
- package/dist/actions/index.js.map +0 -1
- package/dist/actions/sendFlexMessage.d.ts +0 -6
- package/dist/actions/sendFlexMessage.d.ts.map +0 -1
- package/dist/actions/sendFlexMessage.js +0 -204
- package/dist/actions/sendFlexMessage.js.map +0 -1
- package/dist/actions/sendLocation.d.ts +0 -6
- package/dist/actions/sendLocation.d.ts.map +0 -1
- package/dist/actions/sendLocation.js +0 -181
- package/dist/actions/sendLocation.js.map +0 -1
- package/dist/actions/sendMessage.d.ts +0 -6
- package/dist/actions/sendMessage.d.ts.map +0 -1
- package/dist/actions/sendMessage.js +0 -172
- package/dist/actions/sendMessage.js.map +0 -1
- package/dist/index.d.ts +0 -22
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -49
- package/dist/index.js.map +0 -1
- package/dist/messaging.d.ts +0 -142
- package/dist/messaging.d.ts.map +0 -1
- package/dist/messaging.js +0 -357
- package/dist/messaging.js.map +0 -1
- package/dist/providers/chatContext.d.ts +0 -6
- package/dist/providers/chatContext.d.ts.map +0 -1
- package/dist/providers/chatContext.js +0 -86
- package/dist/providers/chatContext.js.map +0 -1
- package/dist/providers/index.d.ts +0 -6
- package/dist/providers/index.d.ts.map +0 -1
- package/dist/providers/index.js +0 -6
- package/dist/providers/index.js.map +0 -1
- package/dist/providers/userContext.d.ts +0 -6
- package/dist/providers/userContext.d.ts.map +0 -1
- package/dist/providers/userContext.js +0 -71
- package/dist/providers/userContext.js.map +0 -1
- package/dist/service.d.ts +0 -102
- package/dist/service.d.ts.map +0 -1
- package/dist/service.js +0 -433
- package/dist/service.js.map +0 -1
- package/dist/types.d.ts +0 -279
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -106
- package/dist/types.js.map +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shaw Walters and elizaOS Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# @elizaos/plugin-line
|
|
2
|
+
|
|
3
|
+
LINE Messaging API plugin for elizaOS agents. Enables chatbot integration with LINE, a popular messaging platform in Japan, Taiwan, and Thailand.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Text Messages**: Send and receive text messages
|
|
8
|
+
- **Rich Messages (Flex)**: Create visually rich card messages
|
|
9
|
+
- **Location Messages**: Share locations with map pins
|
|
10
|
+
- **Quick Replies**: Provide suggested reply options
|
|
11
|
+
- **Group/Room Support**: Operate in groups and multi-user rooms
|
|
12
|
+
- **User Profiles**: Access user display names, pictures, and language
|
|
13
|
+
- **Webhook Integration**: Receive messages via LINE webhooks
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# npm
|
|
19
|
+
npm install @elizaos/plugin-line
|
|
20
|
+
|
|
21
|
+
# bun
|
|
22
|
+
bun add @elizaos/plugin-line
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Configuration
|
|
26
|
+
|
|
27
|
+
### Environment Variables
|
|
28
|
+
|
|
29
|
+
| Variable | Description | Required |
|
|
30
|
+
|----------|-------------|----------|
|
|
31
|
+
| `LINE_CHANNEL_ACCESS_TOKEN` | Channel access token from LINE Developers Console | Yes |
|
|
32
|
+
| `LINE_CHANNEL_SECRET` | Channel secret for webhook verification | Yes |
|
|
33
|
+
| `LINE_WEBHOOK_PATH` | Webhook endpoint path | No |
|
|
34
|
+
| `LINE_DM_POLICY` | DM policy: open, pairing, allowlist, disabled | No |
|
|
35
|
+
| `LINE_GROUP_POLICY` | Group policy: open, allowlist, disabled | No |
|
|
36
|
+
| `LINE_ALLOW_FROM` | Comma-separated user IDs for allowlist | No |
|
|
37
|
+
| `LINE_ENABLED` | Enable/disable the plugin | No |
|
|
38
|
+
|
|
39
|
+
### Agent Configuration
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"plugins": ["@elizaos/plugin-line"],
|
|
44
|
+
"pluginParameters": {
|
|
45
|
+
"LINE_CHANNEL_ACCESS_TOKEN": "your-channel-access-token",
|
|
46
|
+
"LINE_CHANNEL_SECRET": "your-channel-secret",
|
|
47
|
+
"LINE_DM_POLICY": "pairing",
|
|
48
|
+
"LINE_GROUP_POLICY": "allowlist"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Setup
|
|
54
|
+
|
|
55
|
+
1. Create a LINE Developers account at https://developers.line.biz/
|
|
56
|
+
2. Create a new Messaging API channel
|
|
57
|
+
3. Get your Channel Access Token (issue a long-lived token)
|
|
58
|
+
4. Get your Channel Secret
|
|
59
|
+
5. Set up webhook URL pointing to your server
|
|
60
|
+
|
|
61
|
+
## Usage
|
|
62
|
+
|
|
63
|
+
### Actions
|
|
64
|
+
|
|
65
|
+
LINE messaging routes through the canonical `MESSAGE` action using
|
|
66
|
+
`source: "line"`.
|
|
67
|
+
|
|
68
|
+
| Primary action | Operation | Description |
|
|
69
|
+
|----------------|-----------|-------------|
|
|
70
|
+
| `MESSAGE` | `send` | Send text, flex, or location content to a user, group, or room |
|
|
71
|
+
| `MESSAGE` | `read_channel` | Read recent LINE conversation history when available |
|
|
72
|
+
| `MESSAGE` | `list_channels` | List recent LINE targets when available |
|
|
73
|
+
|
|
74
|
+
### Providers
|
|
75
|
+
|
|
76
|
+
LINE does not register standalone planner providers. Chat and user context is
|
|
77
|
+
exposed through the LINE message connector hooks.
|
|
78
|
+
|
|
79
|
+
## LINE ID Formats
|
|
80
|
+
|
|
81
|
+
- **User IDs**: Start with `U` followed by 32 hex characters (e.g., `U1234567890abcdef1234567890abcdef`)
|
|
82
|
+
- **Group IDs**: Start with `C` followed by 32 hex characters
|
|
83
|
+
- **Room IDs**: Start with `R` followed by 32 hex characters
|
|
84
|
+
|
|
85
|
+
## Message Limits
|
|
86
|
+
|
|
87
|
+
- Text messages: 5000 characters max
|
|
88
|
+
- Alt text (for flex/template): 400 characters max
|
|
89
|
+
- Location title/address: 100 characters max
|
|
90
|
+
- Messages per push: 5 max (batched automatically)
|
|
91
|
+
|
|
92
|
+
## Webhook Setup
|
|
93
|
+
|
|
94
|
+
1. Configure your webhook URL in the LINE Developers Console
|
|
95
|
+
2. Ensure your server verifies webhook signatures using the channel secret
|
|
96
|
+
3. The plugin provides middleware for Express-style webhook handling
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
import { LineService } from "@elizaos/plugin-line";
|
|
100
|
+
|
|
101
|
+
// Get the middleware
|
|
102
|
+
const middleware = lineService.createMiddleware();
|
|
103
|
+
|
|
104
|
+
// Use with Express
|
|
105
|
+
app.post("/webhooks/line", middleware, async (req, res) => {
|
|
106
|
+
const events = req.body.events;
|
|
107
|
+
await lineService.handleWebhookEvents(events);
|
|
108
|
+
res.status(200).end();
|
|
109
|
+
});
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Flex Messages
|
|
113
|
+
|
|
114
|
+
LINE Flex Messages allow rich visual content. The plugin supports creating info card bubbles:
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
const flexMessage = {
|
|
118
|
+
altText: "Update Notification",
|
|
119
|
+
contents: {
|
|
120
|
+
type: "bubble",
|
|
121
|
+
body: {
|
|
122
|
+
type: "box",
|
|
123
|
+
layout: "vertical",
|
|
124
|
+
contents: [
|
|
125
|
+
{ type: "text", text: "Title", weight: "bold", size: "xl" },
|
|
126
|
+
{ type: "text", text: "Body content", margin: "md", wrap: true }
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Security Policies
|
|
134
|
+
|
|
135
|
+
### DM Policies
|
|
136
|
+
|
|
137
|
+
| Policy | Description |
|
|
138
|
+
|--------|-------------|
|
|
139
|
+
| `open` | Accept DMs from anyone |
|
|
140
|
+
| `pairing` | Accept DMs and remember senders |
|
|
141
|
+
| `allowlist` | Only accept from LINE_ALLOW_FROM list |
|
|
142
|
+
| `disabled` | Don't accept any DMs |
|
|
143
|
+
|
|
144
|
+
### Group Policies
|
|
145
|
+
|
|
146
|
+
| Policy | Description |
|
|
147
|
+
|--------|-------------|
|
|
148
|
+
| `open` | Respond to anyone in groups |
|
|
149
|
+
| `allowlist` | Only respond to allowed users |
|
|
150
|
+
| `disabled` | Don't respond in groups |
|
|
151
|
+
|
|
152
|
+
## Development
|
|
153
|
+
|
|
154
|
+
### Building
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
bun run --cwd plugins/plugin-line build
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Testing
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
bun run --cwd plugins/plugin-line test
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## API Reference
|
|
167
|
+
|
|
168
|
+
### LineService
|
|
169
|
+
|
|
170
|
+
#### Methods
|
|
171
|
+
|
|
172
|
+
- `isConnected()`: Check connection status
|
|
173
|
+
- `getBotInfo()`: Get bot profile
|
|
174
|
+
- `sendMessage(to, text, options?)`: Send text message
|
|
175
|
+
- `sendFlexMessage(to, flex)`: Send flex message
|
|
176
|
+
- `sendTemplateMessage(to, template)`: Send template message
|
|
177
|
+
- `sendLocationMessage(to, location)`: Send location
|
|
178
|
+
- `replyMessage(replyToken, messages)`: Reply using token
|
|
179
|
+
- `getUserProfile(userId)`: Get user profile
|
|
180
|
+
- `getGroupInfo(groupId)`: Get group info
|
|
181
|
+
- `leaveChat(chatId, chatType)`: Leave group/room
|
|
182
|
+
|
|
183
|
+
## License
|
|
184
|
+
|
|
185
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,14 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/plugin-line",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.11-beta.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
|
+
"eliza-source": {
|
|
11
|
+
"types": "./src/index.ts",
|
|
12
|
+
"import": "./src/index.ts",
|
|
13
|
+
"default": "./src/index.ts"
|
|
14
|
+
},
|
|
10
15
|
"import": "./dist/index.js",
|
|
11
16
|
"default": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./*.css": "./dist/*.css",
|
|
19
|
+
"./*": {
|
|
20
|
+
"types": "./dist/*.d.ts",
|
|
21
|
+
"eliza-source": {
|
|
22
|
+
"types": "./src/*.ts",
|
|
23
|
+
"import": "./src/*.ts",
|
|
24
|
+
"default": "./src/*.ts"
|
|
25
|
+
},
|
|
26
|
+
"import": "./dist/*.js",
|
|
27
|
+
"default": "./dist/*.js"
|
|
12
28
|
}
|
|
13
29
|
},
|
|
14
30
|
"files": [
|
|
@@ -16,29 +32,28 @@
|
|
|
16
32
|
],
|
|
17
33
|
"scripts": {
|
|
18
34
|
"build": "bun run build.ts",
|
|
19
|
-
"test": "vitest run --config vitest.config.ts
|
|
35
|
+
"test": "vitest run --config vitest.config.ts",
|
|
20
36
|
"test:watch": "vitest --config vitest.config.ts",
|
|
21
37
|
"lint": "bunx @biomejs/biome check --write --unsafe .",
|
|
22
38
|
"lint:check": "bunx @biomejs/biome check .",
|
|
23
39
|
"format": "bunx @biomejs/biome format --write .",
|
|
24
40
|
"format:check": "bunx @biomejs/biome format .",
|
|
25
|
-
"typecheck": "
|
|
41
|
+
"typecheck": "tsgo --noEmit"
|
|
26
42
|
},
|
|
27
43
|
"dependencies": {
|
|
28
|
-
"@elizaos/core": "2.0.
|
|
29
|
-
"@line/bot-sdk": "^
|
|
30
|
-
"zod": "^4.3.6"
|
|
44
|
+
"@elizaos/core": "2.0.11-beta.7",
|
|
45
|
+
"@line/bot-sdk": "^11.0.0"
|
|
31
46
|
},
|
|
32
47
|
"devDependencies": {
|
|
33
|
-
"@
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
48
|
+
"@biomejs/biome": "^2.4.14",
|
|
49
|
+
"@types/node": "^22.19.17",
|
|
50
|
+
"typescript": "^6.0.3",
|
|
51
|
+
"vitest": "^4.0.0"
|
|
37
52
|
},
|
|
38
53
|
"publishConfig": {
|
|
39
54
|
"access": "public"
|
|
40
55
|
},
|
|
41
|
-
"
|
|
56
|
+
"eliza": {
|
|
42
57
|
"platforms": [
|
|
43
58
|
"node"
|
|
44
59
|
],
|
|
@@ -92,5 +107,6 @@
|
|
|
92
107
|
"sensitive": false
|
|
93
108
|
}
|
|
94
109
|
}
|
|
95
|
-
}
|
|
110
|
+
},
|
|
111
|
+
"gitHead": "cdbc876f793d96073d7eb0d09715a031ce0cd32e"
|
|
96
112
|
}
|
package/dist/accounts.d.ts
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import type { IAgentRuntime } from "@elizaos/core";
|
|
2
|
-
/**
|
|
3
|
-
* Default account identifier used when no specific account is configured
|
|
4
|
-
*/
|
|
5
|
-
export declare const DEFAULT_ACCOUNT_ID = "default";
|
|
6
|
-
/**
|
|
7
|
-
* Token source indicator
|
|
8
|
-
*/
|
|
9
|
-
export type LineTokenSource = "config" | "env" | "character" | "none";
|
|
10
|
-
/**
|
|
11
|
-
* Group-specific configuration
|
|
12
|
-
*/
|
|
13
|
-
export interface LineGroupConfig {
|
|
14
|
-
/** If false, ignore messages from this group */
|
|
15
|
-
enabled?: boolean;
|
|
16
|
-
/** Allowlist for users in this group */
|
|
17
|
-
allowFrom?: Array<string | number>;
|
|
18
|
-
/** Require bot mention to respond */
|
|
19
|
-
requireMention?: boolean;
|
|
20
|
-
/** Custom system prompt for this group */
|
|
21
|
-
systemPrompt?: string;
|
|
22
|
-
/** Skills enabled for this group */
|
|
23
|
-
skills?: string[];
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Configuration for a single LINE account
|
|
27
|
-
*/
|
|
28
|
-
export interface LineAccountConfig {
|
|
29
|
-
/** Optional display name for this account */
|
|
30
|
-
name?: string;
|
|
31
|
-
/** If false, do not start this LINE account */
|
|
32
|
-
enabled?: boolean;
|
|
33
|
-
/** Channel access token */
|
|
34
|
-
channelAccessToken?: string;
|
|
35
|
-
/** Channel secret */
|
|
36
|
-
channelSecret?: string;
|
|
37
|
-
/** Path to file containing channel access token */
|
|
38
|
-
tokenFile?: string;
|
|
39
|
-
/** Path to file containing channel secret */
|
|
40
|
-
secretFile?: string;
|
|
41
|
-
/** Allowlist for DM senders */
|
|
42
|
-
allowFrom?: Array<string | number>;
|
|
43
|
-
/** Allowlist for groups */
|
|
44
|
-
groupAllowFrom?: Array<string | number>;
|
|
45
|
-
/** DM access policy */
|
|
46
|
-
dmPolicy?: "open" | "allowlist" | "pairing" | "disabled";
|
|
47
|
-
/** Group message access policy */
|
|
48
|
-
groupPolicy?: "open" | "allowlist" | "disabled";
|
|
49
|
-
/** Max media size in MB */
|
|
50
|
-
mediaMaxMb?: number;
|
|
51
|
-
/** Custom webhook path */
|
|
52
|
-
webhookPath?: string;
|
|
53
|
-
/** Group-specific configurations */
|
|
54
|
-
groups?: Record<string, LineGroupConfig>;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Multi-account LINE configuration structure
|
|
58
|
-
*/
|
|
59
|
-
export interface LineMultiAccountConfig {
|
|
60
|
-
/** Default/base configuration applied to all accounts */
|
|
61
|
-
enabled?: boolean;
|
|
62
|
-
channelAccessToken?: string;
|
|
63
|
-
channelSecret?: string;
|
|
64
|
-
tokenFile?: string;
|
|
65
|
-
secretFile?: string;
|
|
66
|
-
dmPolicy?: "open" | "allowlist" | "pairing" | "disabled";
|
|
67
|
-
groupPolicy?: "open" | "allowlist" | "disabled";
|
|
68
|
-
mediaMaxMb?: number;
|
|
69
|
-
webhookPath?: string;
|
|
70
|
-
/** Per-account configuration overrides */
|
|
71
|
-
accounts?: Record<string, LineAccountConfig>;
|
|
72
|
-
/** Group configurations at base level */
|
|
73
|
-
groups?: Record<string, LineGroupConfig>;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Token resolution result
|
|
77
|
-
*/
|
|
78
|
-
export interface LineTokenResolution {
|
|
79
|
-
token: string;
|
|
80
|
-
source: LineTokenSource;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Resolved LINE account with all configuration merged
|
|
84
|
-
*/
|
|
85
|
-
export interface ResolvedLineAccount {
|
|
86
|
-
accountId: string;
|
|
87
|
-
enabled: boolean;
|
|
88
|
-
name?: string;
|
|
89
|
-
channelAccessToken: string;
|
|
90
|
-
channelSecret: string;
|
|
91
|
-
tokenSource: LineTokenSource;
|
|
92
|
-
configured: boolean;
|
|
93
|
-
config: LineAccountConfig;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Normalizes an account ID, returning the default if not provided
|
|
97
|
-
*/
|
|
98
|
-
export declare function normalizeAccountId(accountId?: string | null): string;
|
|
99
|
-
/**
|
|
100
|
-
* Gets the multi-account configuration from runtime settings
|
|
101
|
-
*/
|
|
102
|
-
export declare function getMultiAccountConfig(runtime: IAgentRuntime): LineMultiAccountConfig;
|
|
103
|
-
/**
|
|
104
|
-
* Lists all configured account IDs
|
|
105
|
-
*/
|
|
106
|
-
export declare function listLineAccountIds(runtime: IAgentRuntime): string[];
|
|
107
|
-
/**
|
|
108
|
-
* Resolves the default account ID to use
|
|
109
|
-
*/
|
|
110
|
-
export declare function resolveDefaultLineAccountId(runtime: IAgentRuntime): string;
|
|
111
|
-
/**
|
|
112
|
-
* Resolves the channel access token for a LINE account
|
|
113
|
-
*/
|
|
114
|
-
export declare function resolveLineToken(runtime: IAgentRuntime, accountId: string): LineTokenResolution;
|
|
115
|
-
/**
|
|
116
|
-
* Resolves the channel secret for a LINE account
|
|
117
|
-
*/
|
|
118
|
-
export declare function resolveLineSecret(runtime: IAgentRuntime, accountId: string): string;
|
|
119
|
-
/**
|
|
120
|
-
* Resolves a complete LINE account configuration
|
|
121
|
-
*/
|
|
122
|
-
export declare function resolveLineAccount(runtime: IAgentRuntime, accountId?: string | null): ResolvedLineAccount;
|
|
123
|
-
/**
|
|
124
|
-
* Lists all enabled LINE accounts
|
|
125
|
-
*/
|
|
126
|
-
export declare function listEnabledLineAccounts(runtime: IAgentRuntime): ResolvedLineAccount[];
|
|
127
|
-
/**
|
|
128
|
-
* Checks if multi-account mode is enabled
|
|
129
|
-
*/
|
|
130
|
-
export declare function isMultiAccountEnabled(runtime: IAgentRuntime): boolean;
|
|
131
|
-
/**
|
|
132
|
-
* Resolves group configuration for a specific group
|
|
133
|
-
*/
|
|
134
|
-
export declare function resolveLineGroupConfig(runtime: IAgentRuntime, accountId: string, groupId: string): LineGroupConfig | undefined;
|
|
135
|
-
/**
|
|
136
|
-
* Checks if a user is allowed based on policy and allowlist
|
|
137
|
-
*/
|
|
138
|
-
export declare function isLineUserAllowed(params: {
|
|
139
|
-
userId: string;
|
|
140
|
-
accountConfig: LineAccountConfig;
|
|
141
|
-
isGroup: boolean;
|
|
142
|
-
groupId?: string;
|
|
143
|
-
groupConfig?: LineGroupConfig;
|
|
144
|
-
}): boolean;
|
|
145
|
-
/**
|
|
146
|
-
* Checks if mention is required in a group
|
|
147
|
-
*/
|
|
148
|
-
export declare function isLineMentionRequired(params: {
|
|
149
|
-
accountConfig: LineAccountConfig;
|
|
150
|
-
groupConfig?: LineGroupConfig;
|
|
151
|
-
}): boolean;
|
|
152
|
-
//# sourceMappingURL=accounts.d.ts.map
|
package/dist/accounts.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../src/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,KAAK,GAAG,WAAW,GAAG,MAAM,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,OAAO,CAAC,EAAE,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