@glows777/vela-lark 0.7.1 → 0.8.1
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/CHANGELOG.md +92 -0
- package/dist/channel.d.ts +10 -4
- package/dist/channel.d.ts.map +1 -1
- package/dist/channel.js +91 -111
- package/dist/channel.js.map +1 -1
- package/dist/chats.d.ts +13 -0
- package/dist/chats.d.ts.map +1 -1
- package/dist/chats.js +32 -0
- package/dist/chats.js.map +1 -1
- package/dist/connection.d.ts +2 -2
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +1 -1
- package/dist/connection.js.map +1 -1
- package/dist/file-download.d.ts +6 -0
- package/dist/file-download.d.ts.map +1 -0
- package/dist/file-download.js +53 -0
- package/dist/file-download.js.map +1 -0
- package/dist/history.d.ts +3 -6
- package/dist/history.d.ts.map +1 -1
- package/dist/history.js +21 -3
- package/dist/history.js.map +1 -1
- package/dist/host.d.ts +104 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +277 -0
- package/dist/host.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/send-file.d.ts +4 -0
- package/dist/send-file.d.ts.map +1 -0
- package/dist/send-file.js +55 -0
- package/dist/send-file.js.map +1 -0
- package/dist/setup.d.ts +4 -2
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +22 -7
- package/dist/setup.js.map +1 -1
- package/dist/topics.js +1 -1
- package/dist/topics.js.map +1 -1
- package/dist/transport.d.ts +28 -4
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +96 -8
- package/dist/transport.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,98 @@ All notable changes to `@glows777/vela` are listed here. While Vela is on 0.x, a
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.8.1] - 2026-11-23
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **Desktop conversations and settings are easier to use.** Vela replies render Markdown with copyable code; `⌘N` / `Ctrl+N` starts a new session, the composer grows as you type, and view-specific errors can be dismissed. Project, routine and model pickers support keyboard selection. Deleting a routine or removing a Lark chat requires confirmation, and Settings › Models can set the Thinking level for new sessions ([#531](https://github.com/glows777/Vela/issues/531)).
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- Long sessions no longer get stuck at the pre-request context cap when the provider reports that the history fits. Opaque encrypted reasoning is not counted as text, and recoverable oversized requests get one compaction attempt ([#536](https://github.com/glows777/Vela/issues/536)).
|
|
16
|
+
|
|
17
|
+
## [0.8.0] - 2026-11-23
|
|
18
|
+
|
|
19
|
+
### Breaking Changes
|
|
20
|
+
|
|
21
|
+
- **`background_start` is gone; `bash` starts a background command.** `bash` takes `run_in_background: true`, runs the command through the session's execution environment and returns at once with the job id, so one shell tool covers foreground and background work. Replace `background_start({ command })` with `bash({ command, run_in_background: true })`, and remove `+background_start` from a `tools` list: an unknown name now fails at startup. `background_output`, `background_stop` and `background({ shellPath })` stay ([#429](https://github.com/glows777/Vela/issues/429)).
|
|
22
|
+
|
|
23
|
+
- **Esc no longer stops a background command.** A job belongs to its session, not to the run that started it: an interrupted run leaves it running and its exit still arrives; `background_stop`, `session.close()` and process shutdown stop it. A command still in the foreground when the run is interrupted is cancelled with it, as before ([#430](https://github.com/glows777/Vela/issues/430)).
|
|
24
|
+
|
|
25
|
+
- **Extension handler `ctx.cwd` now always means the session directory**, including handlers installed by user or SDK host extensions. Use factory-time `api.cwd` for the directory the extension instance was loaded from, and `ctx.cwd`/`ctx.session.cwd` for the active project. Project extensions and session-scoped CLI built-ins/MCP now use location-and-configuration snapshot instances; same-snapshot sessions share an instance, released after the last attached session closes. Storage-owning `memory` and `rag`, user custom extensions and explicit `-e`/SDK factories remain host-owned. Project provider/channel registration is diagnosed and refused; providers, credentials, listeners and durable `dataDir` remain host-owned. Handler ordering is host → project → core, so user-listed host handlers now precede project-discovered handlers. This is registration isolation, not a JavaScript sandbox ([#452](https://github.com/glows777/Vela/issues/452)).
|
|
26
|
+
|
|
27
|
+
- **Project-declared resources and runtime defaults follow the session location.** `skills`, `prompts`, default model/thinking, limits, automatic compaction and shell configuration are loaded from the session's trusted project instead of inheriting the startup project's merged settings. User configuration and explicit overrides remain shared; saved/manual model and thinking choices retain priority. Existing sessions keep their prepared snapshot, while new sessions see edited settings. Host `dataDir` remains a startup bootstrap value, and `serve` keeps its existing `defaultTools` exclusion. CLI `defaultTools` and TUI/RPC model cycling use the active session’s settings, and JSON mode reports the resumed session’s directory ([#452](https://github.com/glows777/Vela/issues/452)).
|
|
28
|
+
|
|
29
|
+
- **The `@glows777/vela-core` root entry no longer re-exports the extension contracts.** The 21 hook event types and five helpers stay public, but only from `@glows777/vela-core/extension-api`: `AfterProviderResponseEvent`, `BeforeAgentStartEvent`, `BeforeAgentStartEventResult`, `BeforeProviderRequestEvent`, `ContextEvent`, `ContextEventResult`, `InputEvent`, `InputEventResult`, `ProviderStreamEvent`, `SessionBeforeForkEvent`, `SessionBeforeForkEventResult`, `SessionBeforeTreeEvent`, `SessionBeforeTreeEventResult`, `SessionShutdownEvent`, `SessionStartEvent`, `SessionTreeEvent`, `ToolCallEvent`, `ToolCallEventResult`, `ToolResultEvent`, `ToolResultEventResult`, `TreePreparation`, `configString`, `configStrings`, `customMessageIfChanged`, `customMessageMissing`, `lastCustomMessage`. Every extension package already imports them from that subpath, and `@glows777/vela` still exports all 26 from its root, so umbrella users change nothing. `FetchFunction`, `TokenStatus` and `SessionEntryBase` also leave the core root and are internal to the package now: no import in the repo, docs or examples used them, and the public types whose shapes were flattened from them (`SessionUsage`, `SessionEntry`) still declare the same members ([#403](https://github.com/glows777/Vela/issues/403)).
|
|
30
|
+
|
|
31
|
+
- **`@glows777/vela` drops four exports nothing imported.** `FetchFunction`, `TokenStatus` and `SessionEntryBase` leave the umbrella with their core root copies, and `LoadedExtension` was an unused alias of the channel package's `LoadedChannelExtension`. Import `LoadedChannelExtension` from `@glows777/vela-channels` instead. `createVela().extensions()` returns `LoadedChannelExtension[]`. Each loaded extension includes `channels` ([#403](https://github.com/glows777/Vela/issues/403), [#458](https://github.com/glows777/Vela/issues/458)).
|
|
32
|
+
|
|
33
|
+
- **Newly saved sessions resume in their saved execution location.** Previously reopening a session without `cwd` used the host default, even when the session started elsewhere. New records restore their saved local cwd instead, including when a different cwd was passed on reopen. Existing records without a location keep the prior fallback; fork and clone inherit the active location. This is not a sandbox ([#410](https://github.com/glows777/Vela/issues/410)).
|
|
34
|
+
|
|
35
|
+
- Opening or resuming a session in another trusted project uses that project’s `.vela/SYSTEM.md` and `.vela/APPEND_SYSTEM.md`. Each file falls back independently to the user configuration. Explicit SDK and CLI prompt overrides retain priority, and ordinary wakes reuse the session snapshot ([#410](https://github.com/glows777/Vela/issues/410)).
|
|
36
|
+
|
|
37
|
+
- A first prompt (including a tool-free turn), fork or compaction that needs workspace instructions now fails if its session environment is unavailable. Retrying after recovery loads the instructions before contacting the model ([#410](https://github.com/glows777/Vela/issues/410)).
|
|
38
|
+
|
|
39
|
+
- Workspace instructions, skills and prompt templates follow each session's working directory. The CLI lists and completes the active session's resources. Local file, search, shell and background calls use the selected execution adapter. Background start returns a job ID, and stop aborts the job. Short shell output stays inline. Local sessions reuse Lark's private download on redelivery and topic forwarding ([#410](https://github.com/glows777/Vela/issues/410)).
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
|
|
43
|
+
- **Execution environments, Docker isolation, and credential proxy.** An SDK host can provide an `env` resolver for each session and inspect `ExecutionEnv` types; missing or unavailable locations fail loudly without falling back to the host. SDK hosts can read `session.location` and move an idle session with `await session.setLocation(location)`, preparing resources through the existing `env` resolver and persisting the target across reopen. Docker environments with `network: on` can use owner-configured GitHub credentials without putting the original token in the guest (this mode does not restrict network egress). On Linux Docker, owners can set `network: restricted` and an exact HTTPS host allowlist so unlisted destinations and direct connections are denied and a proxy outage never reopens networking. Lark files reach isolated sessions through a session-owned guest cache, forks and clones retain referenced uploads in their selected environment, a stopped workspace move leaves the current session in place, and operator installation diagnostics stay out of group replies ([#410](https://github.com/glows777/Vela/issues/410)).
|
|
44
|
+
|
|
45
|
+
- **Interrupted-turn recovery keeps finished steps.** `session.continueInterrupted()` reconciles and resumes the saved branch without a new user message; channel restart recovery no longer rewinds completed tool work. `ToolDefinition.replay` defaults to unsafe. Replaying requires both recorded and current safe policy, unchanged input/location, and fewer than five consecutive interruptions. Uncertain effects are reported, not silently repeated; this is not exactly-once external delivery ([#411](https://github.com/glows777/Vela/issues/411), [#454](https://github.com/glows777/Vela/pull/454)).
|
|
46
|
+
|
|
47
|
+
- **Graceful serve shutdown.** The first shutdown signal stops new admission and drains in-flight tools without starting another model/tool iteration. Results persist for restart recovery; a 30-second total cap logs and exits for uncooperative work. SDK hosts can opt into channel `dispose({ graceful: true })` and use `session.drain()` with their own deadline. Explicit Stop and default SDK disposal still cancel immediately ([#411](https://github.com/glows777/Vela/issues/411)).
|
|
48
|
+
|
|
49
|
+
- **Desktop app: Home, Local projects, and session side panel.** The window shows the projects list with each project's `Local` tag, creates a project from a folder (native picker or typed path), and keeps that folder's conversation: people's messages are bubbles, Vela answers in plain text, and a session started from the chat shows a card where its recorded title message sits. Asking a Local project for bigger work opens the session in a 480px side panel beside the chat with one state word (`Running`, `Queued`, `Waiting for an answer`, `Done`, `Stopped`), the active tool, Stop, and a reply composer. A session that asks a question joins Home's needs-you list and clears when answered. A failed run shows one error card and hides the reply that repeats it; the reply is the record that survives a restart. Below 1180px the panel floats over the chat, and each conversation keeps its place when switching projects or sessions ([#417](https://github.com/glows777/Vela/issues/417)).
|
|
50
|
+
|
|
51
|
+
- **Desktop app: Lark projects and Lark sessions.** Enabled groups appear under Projects with the `Lark` tag and open in the same project page and session panel as Local: the project chat is the group's history with people's names, a session is a topic with its state and the last line it recorded, and a message sent from the app posts in the group as the bot signed `Vela app`. Starting a session from Home opens a topic. A submission that did not plainly post says where it may have landed and re-reads history instead of resending; only a send that never reached Lark restores the draft. A group the app cannot connect to says Lark is off while Local projects keep working. New project → Lark lists enabled groups and can add a group after you mention the bot and confirm access for its members; the Lark setup helpers accept an optional set of group IDs to ignore during discovery ([#418](https://github.com/glows777/Vela/issues/418)).
|
|
52
|
+
|
|
53
|
+
- **Desktop app: first-run setup, Settings, and Routines.** With no usable model, the window opens on one setup screen: choose a provider, enter the key (checked with one small request before anything is saved), then a model. Settings › Models shows the same choice afterwards and names the file each row writes; Settings › General holds the Vela folder; Settings › Lark verifies app credentials, shows the connection and enabled chats, and can remove a chat or release the desktop connection for `vela serve`. `saveModelSetup`, `saveLarkSection` and `usableModel` are exported so a host writes `auth.json`, `models.json` and `settings.json` exactly as `vela setup` does. The Routines page groups scheduled routines by project with message, destination, creator, schedule and next run, supports in-place Edit and Cancel, and reports host validation errors ([#419](https://github.com/glows777/Vela/issues/419), [#420](https://github.com/glows777/Vela/issues/420)).
|
|
54
|
+
|
|
55
|
+
- **Desktop hosts can display and reply in Lark through the SDK.** The typed Lark host reads paged group and owned-topic history, posts as the bot with the person's signature, and can start or continue a topic. `LarkHost.chats()` answers from saved configuration, connected or not: every enabled group with its name when the built-in transport can read it, and its chat ID otherwise (a custom `LarkTransport` has no name lookup). A failed `submit` throws `LarkSubmitError` whose `outcome` is `not-sent`, `uncertain` or `posted` (with `messageId` when known), so a host re-reads history instead of resending. The host emits best-effort history updates and stores no second copy of Lark messages ([#416](https://github.com/glows777/Vela/issues/416), [#418](https://github.com/glows777/Vela/issues/418)).
|
|
56
|
+
|
|
57
|
+
- **Channel sessions can deliver a workspace file to their current conversation.** Lark posts native images or file attachments and reports Feishu’s error code and message if the post is rejected. Local hosts can retrieve a snapshot by message ID ([#402](https://github.com/glows777/Vela/issues/402)).
|
|
58
|
+
|
|
59
|
+
- **A running `bash` call can be moved to the background, and foreground timeouts hand off instead of killing.** `session.backgroundTasks(toolCallId?)` (and the RPC request `background_tasks` with an optional `tool_use_id`) takes over the named call, or every call the session runs in the foreground including your own `!` command; moving is recorded before it is promised. In the TUI, `Ctrl+B` moves the running command to the background (replacing the editor's cursor-left alias; use Left), the footer names running jobs, and `/tasks` (alias `/bashes`) lists or stops jobs (`/tasks stop <id>`). A foreground `bash` call that outlives `bashForegroundTimeoutSeconds` (default `120`, `0` for no budget; clamped by `bashForegroundTimeoutMaxSeconds`, default `600`) moves to the background instead of being killed; commands starting with `sleep` or sessions without `background_stop` keep the kill ([#430](https://github.com/glows777/Vela/issues/430), [#431](https://github.com/glows777/Vela/issues/431), [#432](https://github.com/glows777/Vela/issues/432)).
|
|
60
|
+
|
|
61
|
+
- **Print mode waits for background work and its result turns before exiting.** Text mode keeps the printed answer, and JSON mode includes the result events. Unattended background jobs have a 30-minute default deadline and a two-hour maximum ([#433](https://github.com/glows777/Vela/issues/433)).
|
|
62
|
+
|
|
63
|
+
- **GitHub Issue feeds support `issueLabels.all` and `issueLabels.any`.** Issue feeds can require every label in `issueLabels.all` and optionally match one in `issueLabels.any`; existing label arrays still match any listed label ([#423](https://github.com/glows777/Vela/issues/423)).
|
|
64
|
+
|
|
65
|
+
- **A GitHub review delivery names its inline comments.** A `pull_request_review` wake now carries the review id and the `GET /repos/<owner>/<repo>/pulls/<n>/reviews/<id>/comments` endpoint, so a subscribed topic can read the inline findings with its own tools; an event type outside the mapped webhook list is dropped with one bounded `debug` line instead of silently. A review payload without an id still wakes with the plain notice and no endpoint ([#487](https://github.com/glows777/Vela/issues/487)).
|
|
66
|
+
|
|
67
|
+
- **Active-project extension inspection.** `commands(sessionId?)` and `extensions(sessionId?)` inspect an existing prepared session. TUI command completion, `/extensions` and RPC command discovery use the active session, while no-argument calls keep the default-session view. Existing session snapshots and A's system/tool prefix stay unchanged when B opens; non-local project code and MCP remain unsupported rather than executing on the host ([#452](https://github.com/glows777/Vela/issues/452)).
|
|
68
|
+
|
|
69
|
+
- **Lark setup shows the discovered group name and chat ID before granting access**, with an ID-only fallback ([#517](https://github.com/glows777/Vela/issues/517)).
|
|
70
|
+
|
|
71
|
+
- **`@glows777/vela` exports `background`.** The umbrella re-exported every built-in factory except this one, so `import { background } from '@glows777/vela'` failed while `@glows777/vela-core` worked. It now re-exports `background` and `BackgroundOptions`, and the Background docs name the import path next to their `background()` example ([#408](https://github.com/glows777/Vela/issues/408)).
|
|
72
|
+
|
|
73
|
+
### Changed
|
|
74
|
+
|
|
75
|
+
- **A background command spills its output in the session's execution environment, and its two tools come with the extension.** The model keeps the last 2,000 lines or 50KB as the tail, and the start result also carries the output the command already wrote. Once the output passes those limits the environment spills the complete log to its own file, which the exit delivery names (`Full output: <path>`) and a stop returns, so `read_file` pages it — also in a session whose environment is not the host. `background_output` and `background_stop` are on whenever the `background` extension is loaded — the CLI loads it by default — instead of only where a channel turned them on, while a chat's narrowed `tools` list and a DM still drop them. A job also needs `background_stop`, so those sessions refuse `run_in_background` instead of starting a command nobody could stop. A started job's tool record carries `backgroundTaskId`, the start result carries the tail the command already wrote, and the background guidance now lives in the `run_in_background` parameter's own description instead of a prompt rule, so a session whose tools cannot use it is never told to ([#429](https://github.com/glows777/Vela/issues/429)).
|
|
76
|
+
|
|
77
|
+
- **A group session runs execution and background commands again.** The top-level session of a Lark group or a Local project chat keeps `bash`, `write_file` and `edit_file` and also gets `background_output` and `background_stop` (with `bash({ run_in_background: true })`), so a quick command such as `gh pr view` is answered where it was asked instead of being dispatched to a topic first. The conversation still stays available: a command that may keep running starts in the background, and its exit joins the group's own queue as a reply to the person's last message; a longer task still becomes a topic. A chat's narrowed `tools` list can drop any of these, and a DM is unchanged: it keeps its execution tools and still gets no background tools. This supersedes the 0.7 rule that hid the three execution tools from group sessions ([#421](https://github.com/glows777/Vela/issues/421)).
|
|
78
|
+
|
|
79
|
+
- The built-in Lark transport suppresses vendor SDK logs to keep credential payloads out of process output. This also suppresses SDK WebSocket warnings in `vela serve`.
|
|
80
|
+
|
|
81
|
+
### Fixed
|
|
82
|
+
|
|
83
|
+
- **Lark startup recovery no longer repeats feedback errors for expired or conflicting saved delivery intents**; terminal refusals settle locally without another chat message.
|
|
84
|
+
|
|
85
|
+
- **Hosted background jobs no longer disappear silently after a service restart.** The existing channel directory records jobs before execution, and startup queues one unknown-result input for each lost job without a new human message. A saved normal-result input or explicit Stop/close clears the record; SIGTERM shutdown preserves it. Durable input markers reconcile interrupted notification persistence without claiming exactly-once remote replies ([#411](https://github.com/glows777/Vela/issues/411)).
|
|
86
|
+
|
|
87
|
+
- **Lark final replies and topic-title sends carry a durable delivery identity.** A saved send intent reuses its UUID only within Lark's one-hour deduplication window; an acknowledged send is not repeated after restart. Expired uncertain sends fail as unknown instead of sending with a new identity. Topic tools remain unsafe to replay, and forwarding, progress cards and status notices are not covered by this bounded guarantee ([#411](https://github.com/glows777/Vela/issues/411)).
|
|
88
|
+
|
|
89
|
+
- **Normal follow-up after a mid-tool restart repairs missing results before the new message.** SDK `resume()` then `prompt()`, and CLI interactive/print/JSON/RPC follow-ups, now use the existing result reconciliation instead of failing with `AI_MissingToolResultsError`. Finished results remain intact and unsafe effects are not replayed. Histories already damaged by an older failed follow-up stop with an explicit diagnostic before another repair or execution, rather than silently dropping that message ([#455](https://github.com/glows777/Vela/issues/455)).
|
|
90
|
+
|
|
91
|
+
- **The prompt's intro paragraph no longer claims tools a session may not have.** It said the agent works by "reading, searching and editing files, running commands" even when the session was narrowed to `read_file` (the SDK's `tools`, or a chat's tool list), while `<tools>` and `<rules>` were already accurate. The intro now says only that the agent works through the tools of this session, so a session without `bash`, `write_file` or `edit_file` is not told it can edit files or run commands, and a normal CLI/SDK session still describes those tools in `<tools>` ([#406](https://github.com/glows777/Vela/issues/406)).
|
|
92
|
+
|
|
93
|
+
- **A chat session that something else opened first now gets the chat's tool split.** When a host opened the chat's session before the gateway did — the SDK's `vela.session(id)` before the first message, or a read after idle cleanup closed it — core kept the tools that session was constructed with, because it reads `tools` only when it constructs a session. The group session then missed the background tools a hub gains and kept `channel_wait_for_input`, which only a topic can use. The gateway now applies the split when it opens an existing session too: a tool its chat turns off is removed, a hub's background commands are added, and a tool allowlist that session already had stays as narrow as it was, so a chat's `tools` list cannot add a tool back and a `session_start` handler still has the last word. Every channel shares it ([#405](https://github.com/glows777/Vela/issues/405)).
|
|
94
|
+
|
|
95
|
+
- **A message the Local project chat refuses says why it was refused.** Local's message schema gives the two `text` rules a sender can fix their own words — `Message is too long (max 100000 characters)` past Local's limit and `Message must not be empty` — while any other shape failure keeps `Invalid JSON request body`. The desktop shows that reason as it is, without Electron's `Error invoking remote method '…': LocalError:` wrapper ([#469](https://github.com/glows777/Vela/issues/469)).
|
|
96
|
+
|
|
97
|
+
- **The desktop project header keeps its name on one line, and the first-run custom provider form stays within the default window.** A long folder path ellipsizes beside the name with the full path on hover, the custom provider form keeps **Verify and save** in view and shows provider rejection reasons alongside retry, and project headers keep their source tag and folder path visible even with a long title ([#470](https://github.com/glows777/Vela/issues/470), [#513](https://github.com/glows777/Vela/pull/513)).
|
|
98
|
+
|
|
7
99
|
## [0.7.1] - 2026-11-18
|
|
8
100
|
|
|
9
101
|
### Fixed
|
package/dist/channel.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { ChannelConnection, ChannelDefinition, ChannelRunFeedback, IncomingMessage, OutgoingMessage } from '@glows777/vela-channels';
|
|
1
|
+
import type { ChannelConnection, ChannelDefinition, ChannelHost, ChannelRunFeedback, IncomingMessage, OutgoingMessage } from '@glows777/vela-channels';
|
|
2
2
|
import type { VelaLogger } from '@glows777/vela-core/extension-api';
|
|
3
|
+
import { type LarkHost } from './host.ts';
|
|
3
4
|
import { LarkTopics } from './topics.ts';
|
|
4
5
|
import type { LarkTransport } from './transport.ts';
|
|
5
6
|
export interface LarkChannelConfig {
|
|
@@ -26,8 +27,10 @@ export declare class LarkChannel implements ChannelDefinition {
|
|
|
26
27
|
}): Promise<IncomingMessage | undefined>;
|
|
27
28
|
readonly topics: LarkTopics;
|
|
28
29
|
get topicCapabilities(): import("@glows777/vela-channels").ChannelTopicCapabilities;
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
get sendFile(): ((route: Omit<OutgoingMessage, "text">, file: {
|
|
31
|
+
path: string;
|
|
32
|
+
bytes: Uint8Array;
|
|
33
|
+
}) => Promise<void>) | undefined;
|
|
31
34
|
connect: NonNullable<ChannelDefinition['connect']>;
|
|
32
35
|
sessionOptions: NonNullable<ChannelDefinition['sessionOptions']>;
|
|
33
36
|
validateTools(names: readonly string[]): void;
|
|
@@ -41,6 +44,10 @@ export declare class LarkChannel implements ChannelDefinition {
|
|
|
41
44
|
private stopped;
|
|
42
45
|
private readonly connection;
|
|
43
46
|
private readonly pending;
|
|
47
|
+
private view?;
|
|
48
|
+
private readonly hostEvents;
|
|
49
|
+
host(base: ChannelHost): LarkHost;
|
|
50
|
+
private historyChanged;
|
|
44
51
|
private readonly controls;
|
|
45
52
|
private botId?;
|
|
46
53
|
private readonly names;
|
|
@@ -66,7 +73,6 @@ export declare class LarkChannel implements ChannelDefinition {
|
|
|
66
73
|
prepareMessage(msg: IncomingMessage, activeMessage?: IncomingMessage): Promise<IncomingMessage | undefined>;
|
|
67
74
|
private downloadImages;
|
|
68
75
|
private downloadImage;
|
|
69
|
-
private downloadFile;
|
|
70
76
|
private senderName;
|
|
71
77
|
private receive;
|
|
72
78
|
}
|
package/dist/channel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAEjB,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,eAAe,EAChB,MAAM,yBAAyB,CAAA;AAGhC,OAAO,KAAK,EAEV,UAAU,EACX,MAAM,mCAAmC,CAAA;AAwB1C,OAAO,EAAE,KAAK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AAW,EAAE,OAAO,CAAA;KAAE,GACxC,OAAO,CAAC,kBAAkB,CAAC;IAyB9B,OAAO,CAAC,aAAa;IA2CrB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,aAAa;IAUf,IAAI,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IA4BnD,qGAAqG;IAC/F,cAAc,CAClB,GAAG,EAAE,eAAe,EACpB,aAAa,CAAC,EAAE,eAAe,GAC9B,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;YA8KzB,cAAc;YAuBd,aAAa;IAsB3B,OAAO,CAAC,UAAU;IAclB,OAAO,CAAC,OAAO;CAmFhB"}
|
package/dist/channel.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import { mkdirSync } from 'node:fs';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { channelSessionId, chatDirectory, handoffToolNames, topicToolNames, } from '@glows777/vela-channels';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { channelSessionId, chatDirectory } from '@glows777/vela-channels';
|
|
6
5
|
import { latestTodoList } from '@glows777/vela-core/diagnostics';
|
|
7
6
|
import { imageMimeType } from '@glows777/vela-core/images';
|
|
8
7
|
import { FileTooLarge, MAX_ATTACHMENT_BYTES } from "./attachments.js";
|
|
9
8
|
import { runControlsCard, topicRunCard, } from "./cards.js";
|
|
10
|
-
import { parseChats } from "./chats.js";
|
|
9
|
+
import { groupSessionOptions, parseChats, validateChatTools, } from "./chats.js";
|
|
11
10
|
import { LarkConnection } from "./connection.js";
|
|
12
|
-
import {
|
|
11
|
+
import { downloadFile } from "./file-download.js";
|
|
12
|
+
import { formatGroupContext, messageTime, readGroupContext, readTopicContext, readTopicLines, } from "./history.js";
|
|
13
|
+
import { LarkHostEvents, larkHost } from "./host.js";
|
|
13
14
|
import { errorMessage } from "./log.js";
|
|
14
|
-
import { imageKeys, messageText
|
|
15
|
+
import { imageKeys, messageText } from "./messages.js";
|
|
15
16
|
import { finishProgress, LarkProgress } from "./progress.js";
|
|
17
|
+
import { channelFileSender } from "./send-file.js";
|
|
16
18
|
import { LarkTopics } from "./topics.js";
|
|
17
19
|
/** Lark may deliver an event more than once; this many recent message ids are remembered to drop repeats */
|
|
18
20
|
const SEEN_MESSAGES = 1000;
|
|
@@ -35,69 +37,46 @@ export class LarkChannel {
|
|
|
35
37
|
this.config.logger.warn('[lark] Routine skipped: top-level delivery requires a transport send receipt');
|
|
36
38
|
return;
|
|
37
39
|
}
|
|
40
|
+
this.historyChanged(msg.channelId);
|
|
38
41
|
return { ...msg, replyToId: receipt.messageId };
|
|
39
42
|
}
|
|
40
43
|
topics = new LarkTopics(() => {
|
|
41
44
|
if (!this.transport)
|
|
42
45
|
throw new Error('Lark is not connected');
|
|
43
46
|
return this.transport;
|
|
44
|
-
}, (chatId, messageId, createTime) => this.noteHandled(chatId, messageId, createTime), (chatId, threadId) =>
|
|
47
|
+
}, (chatId, messageId, createTime) => this.noteHandled(chatId, messageId, createTime), (chatId, threadId) => {
|
|
48
|
+
if (!this.transport)
|
|
49
|
+
throw new Error('Lark is not connected');
|
|
50
|
+
return readTopicLines(this.transport, chatId, threadId, this.config.appId, (id) => this.senderName(id));
|
|
51
|
+
});
|
|
45
52
|
get topicCapabilities() {
|
|
46
53
|
return this.topics.capabilities;
|
|
47
54
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
let pageToken;
|
|
54
|
-
do {
|
|
55
|
-
const page = await this.transport.listTopicMessages(threadId, pageToken);
|
|
56
|
-
history.push(...page.items);
|
|
57
|
-
pageToken = page.pageToken;
|
|
58
|
-
} while (pageToken);
|
|
59
|
-
const { lines } = await topicLines(history, {
|
|
60
|
-
chatId,
|
|
61
|
-
appId: this.config.appId,
|
|
62
|
-
senderName: (id) => this.senderName(id),
|
|
63
|
-
downloadImages: async () => [],
|
|
64
|
-
});
|
|
65
|
-
return lines.join('\n');
|
|
55
|
+
get sendFile() {
|
|
56
|
+
const transport = this.transport;
|
|
57
|
+
return transport?.sendFile
|
|
58
|
+
? channelFileSender(transport, (route) => this.historyChanged(route.channelId, route.topic))
|
|
59
|
+
: undefined;
|
|
66
60
|
}
|
|
67
61
|
connect = (runtime) => {
|
|
68
62
|
this.topics.runtime = runtime;
|
|
69
63
|
};
|
|
70
64
|
sessionOptions = (msg) => {
|
|
71
65
|
const options = this.topics.sessionOptions(msg);
|
|
72
|
-
if (
|
|
66
|
+
if (msg.chatKind !== 'group' &&
|
|
67
|
+
!msg.topic &&
|
|
68
|
+
!msg.replyToId &&
|
|
69
|
+
!msg.handoff)
|
|
73
70
|
return options;
|
|
74
71
|
const chat = this.chats.get(msg.channelId);
|
|
75
72
|
if (!chat)
|
|
76
73
|
throw new Error('Lark group is not enabled');
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
cwd,
|
|
81
|
-
model: (msg.topic ? chat.topicModel : undefined) ?? chat.model,
|
|
82
|
-
thinkingLevel: (msg.topic ? chat.topicThinkingLevel : undefined) ?? chat.thinkingLevel,
|
|
83
|
-
tools: chat.tools === undefined
|
|
84
|
-
? undefined
|
|
85
|
-
: [
|
|
86
|
-
...new Set([
|
|
87
|
-
...chat.tools,
|
|
88
|
-
...topicToolNames,
|
|
89
|
-
...handoffToolNames,
|
|
90
|
-
...(msg.topic ? ['channel_wait_for_input'] : []),
|
|
91
|
-
]),
|
|
92
|
-
],
|
|
93
|
-
};
|
|
74
|
+
const environment = chat.environment ?? 'local';
|
|
75
|
+
const cwd = this.workspace(chat.id, environment === 'local' && !msg.requireExistingSession);
|
|
76
|
+
return { ...options, ...groupSessionOptions(chat, cwd, !!msg.topic) };
|
|
94
77
|
};
|
|
95
78
|
validateTools(names) {
|
|
96
|
-
|
|
97
|
-
for (const chat of this.chats.values())
|
|
98
|
-
for (const name of chat.tools ?? [])
|
|
99
|
-
if (!known.has(name))
|
|
100
|
-
throw new Error(`Unknown Lark tool "${name}" for chat ${chat.id}`);
|
|
79
|
+
validateChatTools(this.chats.values(), names);
|
|
101
80
|
}
|
|
102
81
|
storage(chatId) {
|
|
103
82
|
return (this.topics.runtime?.scope(channelSessionId(this.name, chatId))
|
|
@@ -117,6 +96,31 @@ export class LarkChannel {
|
|
|
117
96
|
stopped = false;
|
|
118
97
|
connection = new LarkConnection();
|
|
119
98
|
pending = new Set();
|
|
99
|
+
view;
|
|
100
|
+
hostEvents = new LarkHostEvents((error) => this.config.logger.warn(`[lark] History listener failed: ${errorMessage(error)}`));
|
|
101
|
+
host(base) {
|
|
102
|
+
this.view ??= larkHost(base, {
|
|
103
|
+
enabled: (chatId) => this.chats.has(chatId),
|
|
104
|
+
chatIds: () => [...this.chats.keys()],
|
|
105
|
+
transport: () => !this.stopped && base.connection().connected
|
|
106
|
+
? this.transport
|
|
107
|
+
: undefined,
|
|
108
|
+
senderName: (id) => this.senderName(id),
|
|
109
|
+
ownAppId: this.config.appId,
|
|
110
|
+
submitNewTopic: (msg) => {
|
|
111
|
+
if (!this.topics.runtime)
|
|
112
|
+
throw new Error('Lark is not running');
|
|
113
|
+
return this.topics.runtime.submit(msg);
|
|
114
|
+
},
|
|
115
|
+
onEvent: (listener) => this.hostEvents.subscribe(listener, base.connection().connected),
|
|
116
|
+
changed: (chatId, topic) => this.historyChanged(chatId, topic),
|
|
117
|
+
});
|
|
118
|
+
return this.view;
|
|
119
|
+
}
|
|
120
|
+
historyChanged(chatId, topic) {
|
|
121
|
+
if (this.chats.has(chatId))
|
|
122
|
+
this.hostEvents.changed(chatId, topic);
|
|
123
|
+
}
|
|
120
124
|
controls = new Map();
|
|
121
125
|
botId;
|
|
122
126
|
names = new Map();
|
|
@@ -138,7 +142,14 @@ export class LarkChannel {
|
|
|
138
142
|
this.messageHandler = handler;
|
|
139
143
|
}
|
|
140
144
|
onConnection(listener) {
|
|
141
|
-
|
|
145
|
+
let connected = false;
|
|
146
|
+
return this.connection.subscribe((state) => {
|
|
147
|
+
listener(state);
|
|
148
|
+
const reset = state.connected && !connected;
|
|
149
|
+
connected = state.connected;
|
|
150
|
+
if (reset)
|
|
151
|
+
this.hostEvents.emit({ type: 'reset' });
|
|
152
|
+
});
|
|
142
153
|
}
|
|
143
154
|
async start() {
|
|
144
155
|
const { active, report, transport } = this.connection.begin(this.config);
|
|
@@ -293,18 +304,20 @@ export class LarkChannel {
|
|
|
293
304
|
return;
|
|
294
305
|
}
|
|
295
306
|
const text = message.recipientId &&
|
|
307
|
+
!message.recipientId.startsWith('sdk:') &&
|
|
296
308
|
(message.topic || message.routine || message.handoff)
|
|
297
309
|
? `<at user_id="${message.recipientId}"></at> ${message.text}`
|
|
298
310
|
: message.text;
|
|
299
311
|
// A failed send throws: the gateway reports it as channel_error instead of a channel_reply that never arrived
|
|
300
312
|
if (message.replyToId) {
|
|
301
|
-
const receipt = await this.transport.reply(message.replyToId, text);
|
|
313
|
+
const receipt = await this.transport.reply(message.replyToId, text, message.deliveryId);
|
|
302
314
|
if (!this.config.appId && !message.topic)
|
|
303
315
|
this.lastReplies.set(message.channelId, receipt);
|
|
304
316
|
}
|
|
305
317
|
else {
|
|
306
|
-
await this.transport.send(message.channelId, text);
|
|
318
|
+
await this.transport.send(message.channelId, text, message.deliveryId);
|
|
307
319
|
}
|
|
320
|
+
this.historyChanged(message.channelId, message.topic);
|
|
308
321
|
}
|
|
309
322
|
/** The gateway prepares queued input after the preceding reply; Steer prepares it during the run. */
|
|
310
323
|
async prepareMessage(msg, activeMessage) {
|
|
@@ -317,6 +330,7 @@ export class LarkChannel {
|
|
|
317
330
|
this.config.logger.warn('[lark] External event skipped: top-level delivery requires a transport send receipt');
|
|
318
331
|
return;
|
|
319
332
|
}
|
|
333
|
+
this.historyChanged(msg.channelId);
|
|
320
334
|
return { ...msg, replyToId: receipt.messageId };
|
|
321
335
|
}
|
|
322
336
|
catch (error) {
|
|
@@ -340,6 +354,7 @@ export class LarkChannel {
|
|
|
340
354
|
return;
|
|
341
355
|
}
|
|
342
356
|
let images;
|
|
357
|
+
let files;
|
|
343
358
|
let imageCache = this.images.get(msg);
|
|
344
359
|
if (!imageCache) {
|
|
345
360
|
imageCache = new Map();
|
|
@@ -348,7 +363,8 @@ export class LarkChannel {
|
|
|
348
363
|
let input = messageText(event.message) ?? msg.text;
|
|
349
364
|
if (!input)
|
|
350
365
|
return;
|
|
351
|
-
if (msg.topic || msg.replyToId)
|
|
366
|
+
if ((msg.topic || msg.replyToId) &&
|
|
367
|
+
(this.chats.get(msg.channelId)?.environment ?? 'local') === 'local')
|
|
352
368
|
this.workspace(msg.channelId);
|
|
353
369
|
const attachmentType = event.message.message_type === 'file' ? 'file' : 'image';
|
|
354
370
|
try {
|
|
@@ -356,10 +372,12 @@ export class LarkChannel {
|
|
|
356
372
|
if (event.message.message_type === 'file') {
|
|
357
373
|
let file = this.files.get(msg);
|
|
358
374
|
if (!file) {
|
|
359
|
-
file = this.
|
|
375
|
+
file = downloadFile(event.message, this.transport, this.config.dataDir, this.storage(event.message.chat_id));
|
|
360
376
|
this.files.set(msg, file);
|
|
361
377
|
}
|
|
362
|
-
|
|
378
|
+
const attachment = await file;
|
|
379
|
+
input = `[file: ${attachment.name}]`;
|
|
380
|
+
files = [attachment];
|
|
363
381
|
}
|
|
364
382
|
}
|
|
365
383
|
catch (error) {
|
|
@@ -379,11 +397,13 @@ export class LarkChannel {
|
|
|
379
397
|
return;
|
|
380
398
|
}
|
|
381
399
|
this.topics.triggerImages.set(event, [...images]);
|
|
382
|
-
msg = { ...msg, text: input, images };
|
|
400
|
+
msg = { ...msg, text: input, images, ...(files ? { files } : {}) };
|
|
383
401
|
// Preserve extension commands, skills and templates; attribution must not hide their leading slash.
|
|
384
402
|
if (!msg.passive && msg.text.startsWith('/'))
|
|
385
403
|
return msg;
|
|
386
|
-
const name =
|
|
404
|
+
const name = event.sender.sender_type === 'app'
|
|
405
|
+
? msg.senderName
|
|
406
|
+
: await this.senderName(msg.senderId);
|
|
387
407
|
// A top-level group message keeps its send time even when no history is read (passive intake, a failed
|
|
388
408
|
// fetch); topic history has no times yet, so topic input and DMs stay as they are.
|
|
389
409
|
const question = {
|
|
@@ -496,53 +516,6 @@ export class LarkChannel {
|
|
|
496
516
|
mimeType: imageMimeType(bytes) ?? 'application/octet-stream',
|
|
497
517
|
};
|
|
498
518
|
}
|
|
499
|
-
async downloadFile(message) {
|
|
500
|
-
const content = JSON.parse(message.content);
|
|
501
|
-
if (!message.message_id || !content.file_key || !this.transport)
|
|
502
|
-
throw new Error('File has no resource key or message id');
|
|
503
|
-
const messageId = safeName(message.message_id, 64);
|
|
504
|
-
const name = safeName(content.file_name ?? 'file', 254 - Buffer.byteLength(messageId));
|
|
505
|
-
await mkdir(this.config.dataDir, { recursive: true });
|
|
506
|
-
const root = await realpath(this.config.dataDir);
|
|
507
|
-
const directory = resolve(root, relative(resolve(this.config.dataDir), resolve(this.storage(message.chat_id))), 'files');
|
|
508
|
-
await mkdir(directory, { recursive: true });
|
|
509
|
-
if ((await realpath(directory)) !== directory)
|
|
510
|
-
throw new Error('File directory must not contain symlinks');
|
|
511
|
-
const path = join(directory, `${messageId}-${name}`);
|
|
512
|
-
const reference = `[file: ${name}, saved at ${path}]`;
|
|
513
|
-
try {
|
|
514
|
-
const existing = await lstat(path);
|
|
515
|
-
if (!existing.isFile())
|
|
516
|
-
throw new Error('Attachment destination is not a regular file');
|
|
517
|
-
return reference;
|
|
518
|
-
}
|
|
519
|
-
catch (error) {
|
|
520
|
-
if (error.code !== 'ENOENT')
|
|
521
|
-
throw error;
|
|
522
|
-
}
|
|
523
|
-
// Only completed downloads get the replayable name. A crash may leave a .part file,
|
|
524
|
-
// but redelivery cannot mistake those bytes for a completed attachment.
|
|
525
|
-
const temporary = join(directory, `${randomUUID()}.part`);
|
|
526
|
-
const file = await open(temporary, 'wx');
|
|
527
|
-
try {
|
|
528
|
-
const stream = await this.transport.getResource(message.message_id, content.file_key, 'file');
|
|
529
|
-
let size = 0;
|
|
530
|
-
for await (const chunk of stream) {
|
|
531
|
-
const bytes = Buffer.from(chunk);
|
|
532
|
-
size += bytes.length;
|
|
533
|
-
if (size > MAX_ATTACHMENT_BYTES)
|
|
534
|
-
throw new FileTooLarge();
|
|
535
|
-
await file.writeFile(bytes);
|
|
536
|
-
}
|
|
537
|
-
await file.close();
|
|
538
|
-
await rename(temporary, path);
|
|
539
|
-
}
|
|
540
|
-
finally {
|
|
541
|
-
await file.close();
|
|
542
|
-
await rm(temporary, { force: true });
|
|
543
|
-
}
|
|
544
|
-
return reference;
|
|
545
|
-
}
|
|
546
519
|
senderName(id) {
|
|
547
520
|
let name = this.names.get(id);
|
|
548
521
|
if (!name) {
|
|
@@ -593,6 +566,20 @@ export class LarkChannel {
|
|
|
593
566
|
const requireExistingSession = group && !!message.thread_id && !mentioned;
|
|
594
567
|
if (text === '' || (passive && text === undefined) || !this.messageHandler)
|
|
595
568
|
return;
|
|
569
|
+
const topic = group && message.thread_id && message.message_id
|
|
570
|
+
? {
|
|
571
|
+
rootId: message.root_id || message.message_id,
|
|
572
|
+
threadId: message.thread_id,
|
|
573
|
+
}
|
|
574
|
+
: undefined;
|
|
575
|
+
if (group &&
|
|
576
|
+
this.hostEvents.observed &&
|
|
577
|
+
(!topic ||
|
|
578
|
+
this.topics.runtime
|
|
579
|
+
?.topics(message.chat_id)
|
|
580
|
+
.some((known) => known.rootId === topic.rootId &&
|
|
581
|
+
known.threadId === topic.threadId)))
|
|
582
|
+
this.historyChanged(message.chat_id, topic);
|
|
596
583
|
this.config.logger.debug(`[lark] input ${message.message_id ?? '-'} received at=${new Date().toISOString()} created=${message.create_time ?? '-'}`);
|
|
597
584
|
// Deliver immediately so the gateway can show run controls, then serialize preparation and replies there.
|
|
598
585
|
const next = Promise.resolve(this.messageHandler({
|
|
@@ -601,14 +588,7 @@ export class LarkChannel {
|
|
|
601
588
|
senderName: senderId,
|
|
602
589
|
text: text ?? '',
|
|
603
590
|
replyToId,
|
|
604
|
-
...(
|
|
605
|
-
? {
|
|
606
|
-
topic: {
|
|
607
|
-
rootId: message.root_id || message.message_id,
|
|
608
|
-
threadId: message.thread_id,
|
|
609
|
-
},
|
|
610
|
-
}
|
|
611
|
-
: {}),
|
|
591
|
+
...(topic && { topic }),
|
|
612
592
|
requireExistingSession,
|
|
613
593
|
passive,
|
|
614
594
|
raw: event,
|
package/dist/channel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAA;AAC3E,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AASnD,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,cAAc,GACf,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAKhE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EAGL,eAAe,EACf,YAAY,GACb,MAAM,YAAY,CAAA;AACnB,OAAO,EAAiB,UAAU,EAAE,MAAM,YAAY,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,GACX,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ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