@inline-openclaw/inline 0.0.35 → 0.0.37

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.
Files changed (90) hide show
  1. package/README.md +73 -19
  2. package/dist/account-inspect-api.d.ts +3 -0
  3. package/dist/account-inspect-api.d.ts.map +1 -0
  4. package/dist/account-inspect-api.js +14998 -0
  5. package/dist/account-inspect-api.js.map +87 -0
  6. package/dist/approval-handler.runtime.js +38942 -0
  7. package/dist/approval-handler.runtime.js.map +154 -0
  8. package/dist/channel-plugin-api.d.ts +2 -0
  9. package/dist/channel-plugin-api.d.ts.map +1 -0
  10. package/dist/channel-plugin-api.js +44825 -0
  11. package/dist/channel-plugin-api.js.map +169 -0
  12. package/dist/configured-state.d.ts +4 -0
  13. package/dist/configured-state.d.ts.map +1 -0
  14. package/dist/configured-state.js +43 -0
  15. package/dist/configured-state.js.map +10 -0
  16. package/dist/index.d.ts +2 -9
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +28 -42082
  19. package/dist/index.js.map +4 -156
  20. package/dist/inline/accounts.d.ts +35 -1
  21. package/dist/inline/accounts.d.ts.map +1 -1
  22. package/dist/inline/actions.d.ts +10 -5
  23. package/dist/inline/actions.d.ts.map +1 -1
  24. package/dist/inline/approval-handler.runtime.d.ts +28 -0
  25. package/dist/inline/approval-handler.runtime.d.ts.map +1 -0
  26. package/dist/inline/approval-native.d.ts +22 -0
  27. package/dist/inline/approval-native.d.ts.map +1 -0
  28. package/dist/inline/bot-commands-sync.d.ts +5 -0
  29. package/dist/inline/bot-commands-sync.d.ts.map +1 -1
  30. package/dist/inline/channel.d.ts +1 -1
  31. package/dist/inline/channel.d.ts.map +1 -1
  32. package/dist/inline/command-ui.d.ts +43 -0
  33. package/dist/inline/command-ui.d.ts.map +1 -0
  34. package/dist/inline/config-schema.d.ts +231 -35
  35. package/dist/inline/config-schema.d.ts.map +1 -1
  36. package/dist/inline/doctor.d.ts +5 -0
  37. package/dist/inline/doctor.d.ts.map +1 -0
  38. package/dist/inline/exec-approvals.d.ts +54 -0
  39. package/dist/inline/exec-approvals.d.ts.map +1 -0
  40. package/dist/inline/interactive-fallback.d.ts +6 -0
  41. package/dist/inline/interactive-fallback.d.ts.map +1 -0
  42. package/dist/inline/media.d.ts +10 -0
  43. package/dist/inline/media.d.ts.map +1 -1
  44. package/dist/inline/message-formatting.d.ts +5 -1
  45. package/dist/inline/message-formatting.d.ts.map +1 -1
  46. package/dist/inline/message-tools.d.ts.map +1 -1
  47. package/dist/inline/monitor.d.ts +7 -1
  48. package/dist/inline/monitor.d.ts.map +1 -1
  49. package/dist/inline/outbound-sanitize.d.ts +4 -0
  50. package/dist/inline/outbound-sanitize.d.ts.map +1 -1
  51. package/dist/inline/policy.d.ts +30 -0
  52. package/dist/inline/policy.d.ts.map +1 -1
  53. package/dist/inline/profile-tool.d.ts.map +1 -1
  54. package/dist/inline/secret-contract.d.ts +18 -0
  55. package/dist/inline/secret-contract.d.ts.map +1 -0
  56. package/dist/inline/security.d.ts +6 -0
  57. package/dist/inline/security.d.ts.map +1 -0
  58. package/dist/inline/setup-core.d.ts +1 -0
  59. package/dist/inline/setup-core.d.ts.map +1 -1
  60. package/dist/inline/setup-plugin.d.ts +3 -0
  61. package/dist/inline/setup-plugin.d.ts.map +1 -0
  62. package/dist/inline/setup-surface.d.ts.map +1 -1
  63. package/dist/inline/shared.d.ts +61 -0
  64. package/dist/inline/shared.d.ts.map +1 -0
  65. package/dist/inline/status-issues.d.ts.map +1 -1
  66. package/dist/runtime-register-api.d.ts +3 -0
  67. package/dist/runtime-register-api.d.ts.map +1 -0
  68. package/dist/runtime-register-api.js +37086 -0
  69. package/dist/runtime-register-api.js.map +153 -0
  70. package/dist/runtime-setter-api.d.ts +2 -0
  71. package/dist/runtime-setter-api.d.ts.map +1 -0
  72. package/dist/runtime-setter-api.js +50 -0
  73. package/dist/runtime-setter-api.js.map +10 -0
  74. package/dist/runtime.d.ts.map +1 -1
  75. package/dist/sdk-runtime-compat.d.ts +1 -1
  76. package/dist/sdk-runtime-compat.d.ts.map +1 -1
  77. package/dist/secret-contract-api.d.ts +2 -0
  78. package/dist/secret-contract-api.d.ts.map +1 -0
  79. package/dist/secret-contract-api.js +87 -0
  80. package/dist/secret-contract-api.js.map +10 -0
  81. package/dist/setup-entry.d.ts +3 -0
  82. package/dist/setup-entry.d.ts.map +1 -0
  83. package/dist/setup-entry.js +48 -0
  84. package/dist/setup-entry.js.map +10 -0
  85. package/dist/setup-plugin-api.d.ts +2 -0
  86. package/dist/setup-plugin-api.d.ts.map +1 -0
  87. package/dist/setup-plugin-api.js +15732 -0
  88. package/dist/setup-plugin-api.js.map +94 -0
  89. package/openclaw.plugin.json +135 -18
  90. package/package.json +53 -18
package/README.md CHANGED
@@ -12,12 +12,12 @@ Supports:
12
12
  - Inline DMs (`ChatType=direct`)
13
13
  - Inline chats as conversations (`ChatType=group`)
14
14
  - Message replies: OpenClaw `replyToId` is mapped to Inline `replyToMsgId` (message id).
15
- - Optional native reply threads: enable `channels.inline.capabilities.replyThreads: true` to expose Inline reply-thread chats as OpenClaw threads.
16
- - Native media upload/send for images, videos, and documents from `mediaUrl` payloads.
15
+ - Optional Inline reply threads: enable `channels.inline.capabilities.replyThreads: true` to expose Inline reply-thread chats as OpenClaw threads.
16
+ - Inline media upload/send for images, videos, and documents from `mediaUrl` payloads.
17
17
  - Emoji reactions via message tool actions (`react`, `reactions`).
18
18
  - Reaction events on bot-authored messages are surfaced back to the agent as inbound context.
19
19
 
20
- By default, native reply threads stay off to preserve the old compatibility behavior. When disabled:
20
+ By default, Inline reply threads stay off to preserve the old compatibility behavior. When disabled:
21
21
 
22
22
  - `replyToId` remains an Inline message reply only.
23
23
  - `thread-reply` keeps the legacy compatibility path.
@@ -31,7 +31,7 @@ When enabled:
31
31
 
32
32
  ## Install
33
33
 
34
- Requires OpenClaw `2026.4.26` or newer.
34
+ Requires OpenClaw `2026.5.18` or newer.
35
35
 
36
36
  From npm (once published):
37
37
 
@@ -44,14 +44,21 @@ If the plugin is already installed, update in place:
44
44
  ```sh
45
45
  openclaw config set plugins.installs.inline.spec '"@inline-openclaw/inline@latest"'
46
46
  openclaw plugins update inline
47
+ openclaw gateway restart
48
+ openclaw plugins list
49
+ openclaw channels status
50
+ openclaw message send --channel inline --target chat:123 --message "Inline smoke test" --dry-run
47
51
  ```
48
52
 
53
+ After updating, verify that `openclaw plugins list` shows `inline`, `openclaw channels status` reports Inline configured/running, and `openclaw plugins inspect inline --json` reports the expected package version.
54
+
49
55
  From a local checkout (dev):
50
56
 
51
57
  ```sh
52
58
  cd /path/to/inline/packages/openclaw
53
59
  bun run build
54
- openclaw plugins install --link /path/to/inline/packages/openclaw
60
+ npm pack --ignore-scripts --pack-destination /tmp
61
+ openclaw plugins install --force npm-pack:/tmp/inline-openclaw-inline-<version>.tgz
55
62
  ```
56
63
 
57
64
  ## Configure
@@ -77,10 +84,32 @@ channels:
77
84
  token: "<INLINE_BOT_TOKEN>"
78
85
  ```
79
86
 
87
+ You can also leave `token` unset and provide `INLINE_TOKEN` in the gateway environment.
88
+ `INLINE_BOT_TOKEN` is accepted as a compatibility alias.
89
+
80
90
  `baseUrl` defaults to `https://api.inline.chat`.
81
91
  `dmPolicy` defaults to `pairing` (recommended starting point).
92
+ `defaultTo` is optional and gives outbound sends a fallback target when no explicit target is supplied.
82
93
  `requireMention` defaults to `false` for groups (set `true` to require explicit mentions).
83
94
 
95
+ ### Who can talk to the bot?
96
+
97
+ Use these settings together:
98
+
99
+ | Area | Setting | Meaning |
100
+ | --- | --- | --- |
101
+ | DMs | `dmPolicy: "pairing"` | Users can request access; allowlisted users are accepted. This is the default. |
102
+ | DMs | `dmPolicy: "allowlist"` + `allowFrom` | Only listed Inline user ids can DM the bot. |
103
+ | DMs | `dmPolicy: "open"` + `allowFrom: ["*"]` | Any Inline user can DM the bot. Use only for public/demo bots. |
104
+ | DMs | `dmPolicy: "disabled"` | DM messages are ignored. |
105
+ | Groups | `groupPolicy: "allowlist"` + `groups` | Only listed group chat ids can reach the bot. Setup defaults `groups["*"].requireMention` to `true` for broad mention-only access. |
106
+ | Groups | `groupPolicy: "open"` | Any group chat can reach the bot. Pair with `requireMention: true` unless the bot should answer ambient messages. |
107
+ | Groups | `groupPolicy: "disabled"` | Group messages are ignored. |
108
+ | Group senders | `groupAllowFrom` or `groups.<chat>.allowFrom` | Optional sender allowlist inside allowed groups. Per-group entries override the account-wide list for that group. Leave empty to allow any sender in an allowed group. |
109
+
110
+ Accepted Inline user ids: `123`, `user:123`, `inline:123`, or `inline:user:123`.
111
+ Accepted group ids: `123`, `chat:123`, `inline:123`, or `*`.
112
+
84
113
  Example:
85
114
 
86
115
  ```yaml
@@ -89,18 +118,26 @@ channels:
89
118
  enabled: true
90
119
  baseUrl: "https://api.inline.chat"
91
120
  token: "<INLINE_BOT_TOKEN>"
121
+ defaultTo: "chat:123" # optional fallback for outbound sends without --target
92
122
 
93
123
  # DMs:
94
- dmPolicy: "pairing" # pairing|open|disabled
124
+ dmPolicy: "pairing" # pairing|allowlist|open|disabled
95
125
  allowFrom:
96
126
  - "inline:123" # or "user:123" or just "123"
97
127
 
128
+ # Native exec/plugin approvals:
129
+ execApprovals:
130
+ enabled: "auto" # auto|true|false
131
+ approvers:
132
+ - "user:123" # Inline user ids only; chat ids are not approvers
133
+ target: "dm" # dm|channel|both
134
+
98
135
  # Group threads/chats:
99
136
  groupPolicy: "allowlist" # allowlist|open|disabled
100
137
  groupAllowFrom:
101
138
  - "inline:123" # or "user:123" or just "123"
102
139
  capabilities:
103
- replyThreads: false # optional, default false; enable native Inline reply-thread support
140
+ replyThreads: false # optional, default false; enable Inline reply-thread support
104
141
  requireMention: true # optional: default is false
105
142
  replyToBotWithoutMention: true # if true, replies to bot messages can bypass mention requirement
106
143
 
@@ -122,6 +159,8 @@ channels:
122
159
  groups:
123
160
  "88":
124
161
  requireMention: false
162
+ allowFrom:
163
+ - "42"
125
164
  tools:
126
165
  allow: ["message", "web.search"]
127
166
  toolsBySender:
@@ -139,6 +178,7 @@ channels:
139
178
  accounts:
140
179
  work:
141
180
  token: "<INLINE_BOT_TOKEN>"
181
+ defaultTo: "user:123"
142
182
  capabilities:
143
183
  replyThreads: true
144
184
  ```
@@ -146,15 +186,24 @@ channels:
146
186
  Reply behavior summary:
147
187
 
148
188
  - `replyToId` is always an Inline message id.
149
- - Native reply threads are separate and use OpenClaw `threadId`.
189
+ - Inline reply threads are separate and use OpenClaw `threadId`.
150
190
  - Keep `replyThreads` off if you only want classic message replies.
151
191
 
152
192
  If you set `dmPolicy: "open"`, set `allowFrom: ["*"]`.
153
193
 
194
+ ## Native Exec Approvals
195
+
196
+ Inline supports the same native approval flow as bundled chat providers. Configure `channels.inline.execApprovals.approvers` with Inline user ids, or leave it unset and use numeric IDs in `commands.ownerAllowFrom`. Accepted approver ids are `123`, `user:123`, `inline:123`, or `inline:user:123`; `chat:<id>` entries are ignored because group chats are not approvers.
197
+
198
+ `execApprovals.target` defaults to `dm`. Use `channel` or `both` only for trusted chats because approval messages include command details. Inline approval buttons send `/approve ...` callbacks, and OpenClaw clears the buttons after resolution or expiry.
199
+
154
200
  ## Outbound Target Semantics
155
201
 
156
202
  For `message send`/plugin outbound sends:
157
203
 
204
+ - Use `openclaw message send --channel inline --target chat:<id> --message "..."`.
205
+ - If `channels.inline.defaultTo` is set, OpenClaw uses it when no explicit target is supplied. Named accounts can override it with `channels.inline.accounts.<account>.defaultTo`.
206
+ - Some OpenClaw 2026.5.18 CLI help text lists only built-in channel ids, but installed plugin channel ids such as `inline` are accepted.
158
207
  - `chat:<id>` targets a chat id.
159
208
  - `user:<id>` targets a user id (DM peer).
160
209
  - `inline:user:<id>` and `inline:chat:<id>` are accepted and normalized.
@@ -182,7 +231,7 @@ Direct DM sends can also target `user:<id>`.
182
231
  - Pins: `pin`, `unpin`, `list-pins`
183
232
  - Space permissions: `permissions`
184
233
 
185
- Native thread semantics are behind `channels.inline.capabilities.replyThreads`:
234
+ Inline reply-thread semantics are behind `channels.inline.capabilities.replyThreads`:
186
235
 
187
236
  - disabled: `thread-reply` behaves like the old compatibility reply path
188
237
  - enabled: `thread-reply` expects `threadId` to be the child reply-thread chat id, while `to` stays the parent chat id
@@ -193,6 +242,9 @@ You can gate action groups from config:
193
242
  ```yaml
194
243
  channels:
195
244
  inline:
245
+ reactionNotifications: own # off | own | all | allowlist
246
+ reactionAllowlist:
247
+ - "inline:123"
196
248
  actions:
197
249
  send: true
198
250
  reply: true
@@ -207,6 +259,8 @@ channels:
207
259
  permissions: true
208
260
  ```
209
261
 
262
+ Named accounts can override the same `reactionNotifications` mode and `reactionAllowlist`.
263
+
210
264
  ## Extra Agent Tools
211
265
 
212
266
  The plugin also registers a dedicated `inline_members` tool for space-member discovery outside the `message` action surface.
@@ -215,20 +269,20 @@ The plugin also registers a dedicated `inline_members` tool for space-member dis
215
269
  - Optional filters: `query`, `userId`, `limit`, `accountId`
216
270
  - Returned members include explicit DM targets like `user:123`
217
271
 
218
- The plugin also registers `inline_bot_commands` for bot slash command management (v1):
272
+ The plugin also registers `inline_bot_commands` for Inline bot command management (v1):
219
273
 
220
274
  - `action: "get"` -> calls `getMyCommands`
221
- - `action: "set"` -> calls `setMyCommands` with Telegram-style `commands[]`
275
+ - `action: "set"` -> calls `setMyCommands` with Inline Bot API `commands[]`
222
276
  - `action: "delete"` -> calls `deleteMyCommands`
223
277
  - Limits follow Inline Bot API: max `100` commands, `command` max `32`, `description` max `256`, charset `^[a-z0-9_]+$`
224
278
 
225
- Native command sync (Telegram-style startup behavior):
279
+ Bot command sync:
226
280
 
227
- - On `gateway_start`, the plugin clears + re-registers default native commands for each enabled/configured Inline account.
228
- - Default commands now mirror OpenClaw native defaults (for example: `/status`, `/model`, `/exec`, `/usage`, etc.).
229
- - When available in `openclaw/plugin-sdk`, the plugin uses the same command + skill sources as native providers (Telegram/Slack/Discord), including plugin command specs.
230
- - Disable startup sync globally with `commands.native: false`, or per-channel with `channels.inline.commands.native: false`.
231
- - Disable native skill command inclusion with `commands.nativeSkills: false`, or per-channel with `channels.inline.commands.nativeSkills: false`.
281
+ - On `gateway_start`, the plugin registers default bot commands for each enabled/configured Inline account.
282
+ - Default commands include the same user-facing command set as bundled chat providers (for example: `/status`, `/model`, `/exec`, `/usage`, etc.).
283
+ - The plugin uses OpenClaw's command, skill command, and plugin command registries when available.
284
+ - Disable startup sync globally with `commands.native: false`, or per-channel with `channels.inline.commands.native: false`. Disabled startup sync clears existing Inline bot commands for the affected account.
285
+ - Disable skill command inclusion with `commands.nativeSkills: false`, or per-channel with `channels.inline.commands.nativeSkills: false`.
232
286
 
233
287
  Multi-account:
234
288
 
@@ -249,7 +303,7 @@ channels:
249
303
  - `plugin not found: inline` / `plugins.entries.inline: plugin not found: inline`
250
304
  - Ensure the plugin is installed and discovered (`openclaw plugins list`).
251
305
  - `doctor --fix` suggests Inline changes even though channel is healthy
252
- - Plugin entry id should be `inline`.
306
+ - Keep the plugin entry id as `inline`, then re-run `openclaw plugins list` and `openclaw channels status`.
253
307
  - `Inline: SETUP / no token`
254
- - Ensure `channels.inline.token` is set and plugin is updated (`openclaw plugins update inline`).
308
+ - Ensure `channels.inline.token`, `INLINE_TOKEN`, or `INLINE_BOT_TOKEN` is set and plugin is updated (`openclaw plugins update inline`).
255
309
  - If using `dmPolicy: "open"`, ensure `allowFrom: ["*"]`.
@@ -0,0 +1,3 @@
1
+ import type { OpenClawConfig } from "openclaw/plugin-sdk/core";
2
+ export declare function inspectInlineReadOnlyAccount(cfg: OpenClawConfig, accountId?: string | null): import("./inline/accounts.js").InspectedInlineAccount;
3
+ //# sourceMappingURL=account-inspect-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-inspect-api.d.ts","sourceRoot":"","sources":["../src/account-inspect-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAG9D,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,cAAc,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,yDAE1F"}