@ycodium-ai/plugin-im 0.2.3238 → 0.2.3244
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/README.md +20 -18
- package/dist/index.js +1805 -982
- package/locales/en.json +32 -0
- package/locales/zh-CN.json +32 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -46,11 +46,13 @@ they pick their own project:
|
|
|
46
46
|
when the platform reports no sender id.
|
|
47
47
|
- A chat with no project starts nothing. The first message from an allowed
|
|
48
48
|
person gets a project picker (a card on Lark, an inline keyboard on Telegram,
|
|
49
|
-
a numbered text list on WeCom
|
|
49
|
+
a numbered text list on WeCom: reply with the number or
|
|
50
50
|
`/repo <number>`). The pick is written as a plugin fact and survives restarts.
|
|
51
51
|
`/repo` switches the project: the old thread is kept (still under that
|
|
52
52
|
project's `/sessions`), the chat forgets it, and a running turn blocks the
|
|
53
|
-
switch. The panel has a Pick project button.
|
|
53
|
+
switch. The panel has a Pick project button. On the WeCom smart bot, `/repo`
|
|
54
|
+
and this prompt stay the numbered list (`projectPicker` is false on
|
|
55
|
+
`src/wecomPanel.ts`); the button on the command card is separate.
|
|
54
56
|
- On Telegram a forum topic is a chat of its own: its chat id is `chat:topic`
|
|
55
57
|
(`chatIdOf`, only when Telegram marks the message `is_topic_message`; a reply
|
|
56
58
|
chain in an ordinary supergroup also carries `message_thread_id` and stays the
|
|
@@ -133,7 +135,15 @@ text and images (fetched through `media/get`), outbound text, images and files
|
|
|
133
135
|
It listens on `127.0.0.1:30987` by default (path `/wecom-app-callback/<rowId>/<secret>`);
|
|
134
136
|
put a reverse proxy or tunnel in front and paste the public URL into WeCom “Receive
|
|
135
137
|
messages → API receive”. Each column is validated, and a row with problems does not
|
|
136
|
-
connect. Streaming replies are
|
|
138
|
+
connect. Streaming replies are off by default (the app's passive stream reply has not
|
|
139
|
+
been verified on a real WeCom client). With it on, WeCom refreshes the reply as the agent
|
|
140
|
+
writes; if the client never refreshes the stream, the final reply is sent as text.
|
|
141
|
+
|
|
142
|
+
Known limits with Streaming replies on: the "Got it, working on it" placeholder is
|
|
143
|
+
not closed when a turn cannot start because the project has no default model, or
|
|
144
|
+
when handling the message throws; and a message queued for a team goal has its
|
|
145
|
+
placeholder closed right away, so it gets no 5-second fallback confirmation. The
|
|
146
|
+
reply itself still arrives as text in all three cases.
|
|
137
147
|
|
|
138
148
|
The default is one message per finished turn. A single turn can produce dozens
|
|
139
149
|
of assistant messages, mostly commentary between tool calls.
|
|
@@ -177,15 +187,15 @@ card, Telegram edits a message and its inline keyboard. A request is posted on
|
|
|
177
187
|
question, and answered through `ctx.threads.userInput.respond` once every question
|
|
178
188
|
has an answer; a free-form answer is the next ordinary message in the chat, and
|
|
179
189
|
`thread.request-resolved` freezes the cards of a question answered elsewhere or
|
|
180
|
-
closed unanswered. WeCom
|
|
190
|
+
closed unanswered. WeCom writes the options as numbers and the
|
|
181
191
|
reply is parsed in `src/questionCards.ts`. A message that lands behind a running
|
|
182
192
|
turn gets a queued card (Steer, Withdraw, Resume sending) drawn from
|
|
183
193
|
`getThreadExecution` and refreshed when the turn intents or the queue change
|
|
184
194
|
(`src/queueCards.ts`, `src/queueFlow.ts`); the buttons call
|
|
185
195
|
`threads.turnIntents.run` (steer, with the active turn id), `threads.turnIntents.cancel`
|
|
186
196
|
and `threads.turnQueue.resume`, and the card is the user's own action, so no
|
|
187
|
-
`intentAction` is sent. WeCom only gets a one-line notice
|
|
188
|
-
|
|
197
|
+
`intentAction` is sent. WeCom only gets a one-line notice: that notice has no
|
|
198
|
+
steer or withdraw buttons (resuming is the `/continue` command). Editing a queued message is not offered:
|
|
189
199
|
the host does not let a plugin dispatch `thread.turn-intent.edit`.
|
|
190
200
|
|
|
191
201
|
A chat keeps its place across restarts. Which project a chat picked, which thread
|
|
@@ -255,18 +265,10 @@ Chat commands: `/stop`, `/continue`, `/status`, `/new`, `/sessions`, `/resume`,
|
|
|
255
265
|
`/sessions`, `/resume` and the team commands answer with the project picker. `/sessions` and `/resume` only list and
|
|
256
266
|
switch threads this plugin opened, since the host lets a plugin send only into
|
|
257
267
|
its own threads. `/continue` calls `threads.turnQueue.resume` for the chat's thread
|
|
258
|
-
when its queue is paused (a `/stop` or a failure pauses it), which is how WeCom
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
On Lark and
|
|
262
|
-
is a button (a card on Lark, an inline keyboard on Telegram), and the ones that take an argument (a thread, a project, a model) open
|
|
263
|
-
a second view on the same message with a Back button. Telegram buttons carry only
|
|
264
|
-
a short `pn:<version>:<index>` token (`callback_data` is capped at 64 bytes);
|
|
265
|
-
the action stays in memory and a tap on an older keyboard version counts as expired. Each card keeps its own view
|
|
266
|
-
stack in memory (`src/panelController.ts`), so after a restart an old card only
|
|
267
|
-
answers that it has expired. A tap runs the same handler as the typed command and
|
|
268
|
-
waits in the same per-chat queue as typed messages. Another platform opts in by
|
|
269
|
-
implementing the optional `panel` surface on its adapter (`src/adapter.ts`).
|
|
268
|
+
when its queue is paused (a `/stop` or a failure pauses it), which is how WeCom
|
|
269
|
+
resumes a paused queue from the chat; it is not `/resume`, which already switches threads.
|
|
270
|
+
|
|
271
|
+
On Lark, Telegram, and the WeCom smart bot, `/panel` sends a command panel, and `/help` stays text and ends with a pointer to it. WeCom App does not implement the panel surface, so `/panel` answers with the text list and `/help` does not mention `/panel`. Lark cards and Telegram inline keyboards show all command buttons. The WeCom smart bot uses a template card from `src/wecomPanel.ts`; its main menu is limited to six buttons. Commands that do not fit are listed in `/help` and can be typed into the chat. Commands that take an argument (a thread, a project, a model) open a second view on the same message with a Back button. These lists let you reach every option by paging: Lark and Telegram show eight items per page, and WeCom shows three, leaving room for Back, Previous, and Next. A tap on the WeCom card updates that same card; when the update cannot be applied, `src/panelController.ts` posts a new card and the old one stops accepting taps. A busy placeholder is not drawn on that card: it stays as it is until the next interactive view. Telegram buttons carry only a short `pn:<version>:<index>` token (`callback_data` is capped at 64 bytes); the action stays in memory and a tap on an older keyboard version counts as expired. Each card keeps its own view stack in memory (`src/panelController.ts`), so after a restart an old card only answers that it has expired. A tap runs the same handler as the typed command and waits in the same per-chat queue as typed messages. Another platform opts in by implementing the optional `panel` surface on its adapter (`src/adapter.ts`).
|
|
270
272
|
|
|
271
273
|
`/team` uses the chat's selected project. It reads the roster from the `team` plugin and
|
|
272
274
|
each text message invokes `startGoal` with a stable request ID derived from the bot,
|