Files
deepseek-harness/vendor
Shigma 675efe39eb Merge remote-tracking branch 'origin/master' into feat/im-automation
# Conflicts:
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	docs/subsystems/filesystem.i18n.yaml
#	docs/subsystems/filesystem.md
#	docs/subsystems/filesystem.zh.md
#	docs/tool-catalog.i18n.yaml
#	packages/experimental/README.i18n.yaml
#	packages/extensions/cordis-host-runner/src/api-catalog.ts
#	packages/fs/fs-local/src/index.ts
#	packages/fs/fs-local/tests/filesystem.spec.ts
#	packages/fs/fs-sandbox/tests/fs-sandbox.spec.ts
#	packages/fs/fs/README.i18n.yaml
#	packages/fs/fs/README.md
#	packages/fs/fs/README.zh.md
#	packages/fs/fs/src/index.ts
#	packages/fs/fs/src/types.ts
#	packages/preset/agent-preset/skills/dsh-doc/references/packages.md
#	packages/ssh/fs-ssh/README.i18n.yaml
#	packages/ssh/fs-ssh/README.md
#	packages/ssh/fs-ssh/README.zh.md
#	packages/ssh/fs-ssh/src/index.ts
#	packages/ssh/fs-ssh/tests/provider.spec.ts
#	packages/ssh/ssh/src/helper.ts
#	packages/ssh/ssh/src/schemas.ts
#	packages/ssh/ssh/tests/helper-runtime.spec.ts
#	scripts/experimental-package-policy.ts
2026-11-23 23:33:33 +08:00
..

Vendored Packages

This directory contains source-vendored copies of the Cordis framework and its foundation libraries. They are copied into this monorepo instead of being depended on via npm, so that the harness fully owns its framework layer (auditable, patchable, pinned).

All vendored packages use the @deepseek-ai scope (cordis → @deepseek-ai/cordis, @cordisjs/plugin-<x> → @deepseek-ai/cordis-plugin-<x>). The manifest table records upstream versions and source commits; each package manifest carries its Harness release version and publication metadata. References to vendored packages use workspace:~, so local builds resolve the workspace packages and published ranges permit patch updates within the same minor version. Upstream MIT LICENSE files are preserved in each package directory.

This file covers the manifest, the local-modification log, and the procedure for updating an existing vendored package. To add a new one, see the cookbook guide: docs/cookbook/adding-a-vendored-package.md.

Manifest

Directory npm name Upstream name Version Upstream repo Commit
cosmokit/ @deepseek-ai/cosmokit cosmokit 1.8.1 https://github.com/shigma/cosmokit 02e691c5aa7f37f6e0b1cee7ee8f4a21c2e34507
schemastery/ @deepseek-ai/schemastery schemastery 3.18.0 https://github.com/shigma/schemastery (packages/core) cf0b7e5481d0e31d10cdc30bc45c09366c332f27
cordis/ @deepseek-ai/cordis cordis 4.0.0-rc.12 https://github.com/cordiverse/cordis (packages/core) 01b396240ce47cf2779c40af9bc445bb748fe112
loader/ @deepseek-ai/cordis-plugin-loader @cordisjs/plugin-loader 1.0.0-rc.9 https://github.com/cordiverse/cordis (packages/loader) 01b396240ce47cf2779c40af9bc445bb748fe112
include/ @deepseek-ai/cordis-plugin-include @cordisjs/plugin-include 1.2.0 https://github.com/cordiverse/cordis (packages/include) 01b396240ce47cf2779c40af9bc445bb748fe112
group/ @deepseek-ai/cordis-plugin-group @cordisjs/plugin-group 1.0.0 https://github.com/cordiverse/cordis (packages/group) 01b396240ce47cf2779c40af9bc445bb748fe112
timer/ @deepseek-ai/cordis-plugin-timer @cordisjs/plugin-timer 1.1.4 https://github.com/cordiverse/cordis (packages/timer) 01b396240ce47cf2779c40af9bc445bb748fe112
hmr/ @deepseek-ai/cordis-plugin-hmr @cordisjs/plugin-hmr 1.0.15 https://github.com/cordiverse/cordis (packages/hmr) ed8a7755c26a27a72064a21dea036ad1d1d6833c
logger-console/ @deepseek-ai/cordis-plugin-logger-console @cordisjs/plugin-logger-console 1.0.0 https://github.com/cordiverse/cordis (packages/logger-console) 01b396240ce47cf2779c40af9bc445bb748fe112
element/ @deepseek-ai/cordis-element @cordisjs/element 0.3.0 https://github.com/cordiverse/element 14acf617dc60b644ff27d3ae518df86b0fe1377b
fetch-file/ @deepseek-ai/cordis-fetch-file @cordisjs/fetch-file 1.0.3 https://github.com/cordiverse/fetch-file d8c5985df2b3b32a842bc7e04d7f6da5a5d8c0ed
http/ @deepseek-ai/cordis-plugin-http @cordisjs/plugin-http 1.5.1 https://github.com/cordiverse/http (packages/core) c70ee9c2b7b9085e904979e1a90b39f4c89a9804
satori-element/ @deepseek-ai/satori-element @satorijs/element 4.0.0-alpha.0 https://github.com/satorijs/satori (packages/element) 662c3daff128b4b610ebbc393bac388679e60010
plugin-im-core/ @deepseek-ai/cordis-plugin-im-core @satorijs/core 5.0.0-alpha.0 https://github.com/satorijs/satori (packages/core) 662c3daff128b4b610ebbc393bac388679e60010
plugin-im-adapter-lark/ @deepseek-ai/cordis-plugin-im-adapter-lark @satorijs/adapter-lark 4.0.0-alpha.0 https://github.com/satorijs/satori (adapters/lark, source rewritten; see local modifications) 662c3daff128b4b610ebbc393bac388679e60010
plugin-im-adapter-qq/ @deepseek-ai/cordis-plugin-im-adapter-qq @satorijs/adapter-qq 5.0.0-alpha.0 https://github.com/satorijs/satori (adapters/qq, re-ported: its src/ at the pin is bot/, internal/, http.ts, message.ts, types.ts, utils.ts, ws.ts; see V35 and the sync caveat there) 662c3daff128b4b610ebbc393bac388679e60010
plugin-im-markdown/ @deepseek-ai/cordis-plugin-im-markdown @satorijs/markdown 4.0.0-alpha.0 https://github.com/satorijs/satori (packages/element, split from src/markdown.ts; see V68) 662c3daff128b4b610ebbc393bac388679e60010

Third-party dependencies of the vendored packages stay on npm: @standard-schema/spec, yaml, chokidar, picomatch, @babel/code-frame, supports-color, node-addon-require-builtin, undici, file-type, mime-types, path-to-regexp, path-to-regexp-typed, protobufjs, and the markdown parser closure of plugin-im-markdown (mdast-util-from-markdown, mdast-util-gfm, micromark-extension-gfm).

Intentionally not vendored (verified unused by this set): reggol, @cordisjs/utils, @cordisjs/unyaml (dev-time YAML import hook only).

Local modifications

Keep this log exhaustive — every divergence from upstream must be listed. Each entry has a stable ID: remove an entry when its divergence no longer exists, and never renumber or reuse IDs. The next new entry is V119.

  • V1 · hmr/src/index.ts: removed the ./locales/en-US.yml / ./locales/zh-CN.yml imports, the .i18n({...}) call on the Config schema, and the src/locales/ directory. Rationale: those imports require a runtime YAML loader hook (@cordisjs/unyaml) that we do not vendor; the i18n texts only localize config descriptions.

  • V2 · All package.json files: regenerated for Harness releases with scoped names, release versions, publication metadata, precise bundled-runtime and lib/types/**/*.d.ts / .d.ts.map file entries, source exports where applicable, and declaration metadata pointing at lib/types. References within the vendored set use workspace:~. HMR declares esbuild as a direct dev dependency for its imported BuildFailure type, Loader requires node-addon-require-builtin@^0.1.4 to match published app runtimes, and Include declares yaml@^2.9.0 instead of upstream's ^2.9.1 so the workspace installs one copy of yaml.

  • V3 · All tsconfig.json files: regenerated to extend the repo-root tsconfig.base.json, emit TypeScript intermediates to lib/types, and declare project references.

  • V4 · Vendored TypeScript source internal specifiers: changed local relative imports/exports from upstream's specifier shape to explicit .ts specifiers so TypeScript rewrites emitted JS to .js while declarations keep explicit, NodeNext-safe .ts specifiers. This includes loader/src/config/isolate.ts using declare module './entry.ts'. Core's upstream source already uses explicit .ts specifiers. Type-only dependencies use import type or inline type modifiers so ESM output does not retain erased interfaces.

  • V5 · schemastery/tsdown.config.ts, logger-console/tsdown.config.ts, fetch-file/tsdown.config.ts, loader/tsdown.config.ts and plugin-im-core/tsdown.config.ts: ours, not upstream files — per-package build-shape overrides (dual ESM+CJS output; separate node/browser entries; Loader's single self-contained entry; and plugin-im-core's two entries, the runtime lib/index.js and the lib/testing.js testkit behind its ./testing subpath) for the repo-root tsdown build. They read the JS emitted under lib/types and then write the publish runtime entries under lib/. Like the regenerated tsconfigs, they are not part of the upstream sync surface.

  • V6 · cordis/src/fiber.ts lifecycle hardening: locally closes three reentrant disposal gaps. An effect's owner-list wrapper is registered before its setup body runs, so an unload begun from inside setup awaits setup and every collected cleanup; synchronous setup failure removes the wrapper and rolls back collected cleanup. Async cleanup stays owner-visible until quiescence, and Cordis's internal effect composition joins an already-running cleanup while repeated public disposer calls retain their upstream single-shot result. Effect creation is rejected while the owner is UNLOADING (while PENDING and LOADING remain legal), preventing cleanup-time registrations from escaping the unload snapshot. Child fibers register and receive their parent-owned disposer before internal/plugin publication, resolve dependency declarations added by that notification before activation, drain effects attached while pending, and contain teardown-notification failures per observer so one callback cannot starve peers or interrupt ownership cleanup.

  • V7 · JSDoc enrichment: added @param/@returns tags and contract documentation (disposal semantics, waterfall veto, bail conditions, error cases) across the public plugin-author surface — Context (class, statics, the isolate() rule that isolated scopes never fall back to an injected view, and the Context interface properties incl. [Context.root]), module re-exports, shared utility helpers, EventsService, Fiber, ValidationError and its path helpers, RegistryService, ReflectService, Service and its intercept-metadata members, LoggerService and their declare module './context.ts' overloads. The upstream line comment on reflect.ts's exported locate() is rewritten as JSDoc. Loader documentation covers loader/src/{index,internal,config/entry,config/group,config/isolate,config/tree,config/utils}.ts, including entry ownership, tree mutation methods, the !!js discriminator, entry option validation, source positions and ModuleNotFoundError. The upstream EventsService.dispatch() deprecation annotation is omitted: DSH enumerates callbacks to contain each observer failure independently, which the typed dispatch methods do not provide. Timer retains its local class and helper summaries; its README is local documentation because the upstream package has none. Cosmokit and Schemastery add summaries to their exported helpers, types and namespaces, logger-console to its exporters and config namespace, and HMR to its build-failure logger in hmr/src/error.ts. Comment-only; no code changes. Motivation: the website API-reference generator renders these docs and hard-errors on undocumented members. Retire this entry when the enrichment is upstreamed.

  • V9 · hmr/src/index.ts module-watcher readiness and native paths: realpath the existing watch base, classify framework modules and attach listeners before reporting readiness, and compare config paths using both canonical and configured spellings. This preserves Node module-cache identity across Windows short-name paths and filesystem aliases. The main watcher uses ignoreInitial: true so startup reads do not trigger another refresh; exact profile patch watching is owned by packages/boot/hmr/src/watch-config.ts. The Include change listener logs a rejected Include.refresh() instead of leaving the rejection unhandled; the rejection reports unsaved runtime changes while Include keeps its running tree. Covered by packages/boot/hmr/tests/watch-config.spec.ts and scripts/cordis-vendor-hmr-include.spec.ts.

  • V10 · Vendored Node-compatible TypeScript: marked erased imports explicitly across cordis, loader, include, hmr, and schemastery so Node's native TypeScript transform does not request types as runtime exports. Schemastery's source uses an ESM default export and its package declares type: module. Conditional exports select .mjs for import and .cjs for require; without them, concurrent imports under module-hook hosts reach the CJS entry and can race its require of ESM Cosmokit (ERR_REQUIRE_ESM_RACE_CONDITION).

  • V11 · Include patch and YAML exports: include/src/index.ts exports upstream applyPatches as applyEntryPatches with its PatchResult type, so dsh --dump-config composes entries with the same algorithm that mounting uses. It also exports parseEntryYaml, stringifyEntryYaml and entryYamlErrorPosition over the !!js YAML dialect, using the yaml options with which _read() parses Include's own file, so every DSH reader and writer of Include-dialect YAML uses Include's parser. parseEntryYaml throws the first parse error or warning, such as an unknown tag or an alias without a preceding anchor (V30), adds line positions to alias errors so entryYamlErrorPosition reads them, and returns undefined for an empty document; stringifyEntryYaml always writes with aliasDuplicateObjects: false, matching the previous noRefs output, and offers no option to emit aliases, while Include's own writer keeps upstream's options. Covered by packages/boot/app-boot/tests/config-reload.spec.ts, scripts/cordis-entry-commit.spec.ts and scripts/cordis-entry-yaml.spec.ts.

  • V14 · Include persistence results: include/src/index.ts keeps an error for unsaved journal changes. flush() retries pending writes and rejects while changes remain unsaved; stop() returns the same result and always stops the child tree; a later successful flush clears previous errors. A failed refresh() can also reject while runtime changes remain unsaved. Patch-owned changes route to the parent Include, so callers that need them persisted must flush that parent too. The constructor omits upstream's ctx.hmr.watch(this.filename, () => this.refresh()) registration because neither HMR provider exposes watch(); both find each Include by scanning loader entries for its filename and call refresh(). Ordinary Fiber teardown keeps its error containment. Covered by scripts/cordis-include-journal.spec.ts and packages/host/directory-picker-auto/tests/loader-composition.spec.ts.

  • V15 · Configuration access across Core, Loader, Include and HMR: rc.11 Core owns raw Fiber.config, internal/config(fiber, next), internal/commit and awaited internal/update(config, next). Root-fiber candidate resolution remains available without a plugin schema. Local rawConfig, resolveConfig(candidate) and effectiveConfig accessors retain the DSH consumer API. Fiber caches the object passed to activation or a successful update that keeps the instance; candidate resolution is pure, failed or superseded updates cannot replace the cache, and volatile updates retain references. Loader resolves only entry roots and excludes Group/Include tree carriers, so nested !!js expressions wait for their own injections. Include retains its tree-carrier marker and public patch exports, and HMR transfers raw config through the accessors. Covered by scripts/cordis-config-access.spec.ts, scripts/cordis-core-lifecycle.spec.ts and the boot/HMR suites.

  • V16 · cordis/package.json publishes src: added src to the files list, joining the other eight vendored packages. Cordis declares "./src/*": "./src/*" in its exports, so a tarball without src publishes an export map pointing at absent files; the release change judgement also reads files to decide whether a diff reaches the payload, and a package whose only published paths are build output has no tracked path to match.

  • V17 · @deepseek-ai rescope: every vendored manifest name, every internal dependency entry among the vendored set, and every module specifier that reaches them use the scoped names in the manifest table's npm name column. Directory names, version numbers, and dependency ranges are unchanged, and no upstream runtime identifier is renamed — Symbol.for('schemastery') and Schemastery's vendor: metadata field keep their upstream values. Re-apply with pnpm run rescope-vendor --apply after a sync; the table's two name columns are the mapping, restated for consumers in docs/rescope.md.

  • V22 · Volatile config across cosmokit, schemastery, cordis, and loader: Cosmokit supplies immutable references and framework-owned commits; deepEqual treats two references as equal, propagates strict comparison into arrays, compares every array slot with holes treated as undefined, handles cycles conservatively, compares URLs by normalized href, and compares other opaque objects by identity in strict mode. Schemastery adds .volatile(), optional/default inference, placement validation without eager lazy-schema expansion (a lazy inner is validated once when built), metadata-free serialized node compatibility, serialized metadata, reference-aware simplification, unsupported volatile values reported as ValidationError with their path, and .default() accepting the raw input type Partial<S> because a volatile field makes the output type carry references. Loader's save path calls simplify with its schema receiver (unparse.call), an independent fix for the unbound-this call. Cordis exports consumer types without changing Fiber lifecycle. Loader compares raw options strictly in Entry.update; for a config-only change on an active fiber it calls the pure equalExceptVolatile function in config/diff.ts, which narrows the Standard Schema to Schemastery's Schema type (a new type-only @deepseek-ai/schemastery dependency of loader) and recursively skips fixed volatile paths using schema metadata without executing config hooks or validation. Missing or null object nodes compare using their declared defaults, including nodes without volatile descendants; schema backedges retain raw comparison. Entry passes its actual schema and preserves ordinary context and custom-update lifecycles. For a volatile-only change, Entry._commitVolatile takes the canonical fiber entry.fiber.ctx.fiber (Entry.fiber holds the registry wrapper), re-parses the raw config through Fiber.resolveConfig(), compares ordinary effective values, commits references and emits the instance-local loader/volatile-update declared in loader/src/index.ts; a changed ordinary effective value falls back to the ordinary remount, and an invalid candidate is logged while the raw config stays retained for the next activation. Cosmokit provides reference enumeration and commits, and simplify is called with its schema receiver. The package READMEs document these additions; schema tests live in scripts/volatile-config.spec.ts, Loader runtime and real-file tests in scripts/loader-volatile-update.spec.ts, and code replacement tests in the HMR module suite.

  • V23 · loader/src/config/entry.ts module identity: retains each entry's raw import result as moduleNamespace, before plugin export normalization. HMR matches that object to Node's cached module namespace and updates it after a successful reload. EntryTree.import() keeps its existing arguments and return value; loader/README.md documents the additive field.

  • V24 · timer/locale/{en,zh}.json display metadata: local English and Chinese titles and descriptions for the Settings plugin inventory. timer/package.json exports and publishes these locale resources.

  • V25 · Loader lifecycle adaptations: before a combined context/config update, Loader refreshes dependencies locally, which prevents activation against stale isolation bindings; disabled-entry updates await disposal. Failed fibers require an explicit update after correcting their input or dependencies. Core retains the effect hardening in V6; rc.11 owns dependency teardown ordering and superseded-activation handling.

  • V26 · loader/src/config/tree.ts cross-tree moves: backports cordiverse/cordis#271, merged after v4.0.0-rc.12. When EntryTree.update() moves an entry into a group of another tree, the entry and the same-tree members of its group move their store registrations to the target tree, and the move is rejected before either tree changes when the target tree already holds one of their ids. The source tree receives a removal and the target tree a creation, without legacy or from. Upstream at v4.0.0-rc.12 keeps the entry registered in the source tree and the target receives an update with legacy, so the Include journal writes a partial row and reconciling the target file creates a second Entry. Retire this entry when the vendored Loader includes the upstream fix. Covered by scripts/cordis-include-journal.spec.ts.

  • V27 · loader/src/config/utils.ts explicit ids with :: validateOptions() accepts ids containing EntryTree.sep, so EntryTree.create(), EntryTree.update() and group reconciliation admit them; upstream rejects them with an id must not contain issue. validateOptions() keeps its upstream sep parameter. Generated bundles from @deepseek-ai/dsh-creation-recommendations prefix their row ids with <package name>:, and installed profiles already contain such rows. resolve() still splits ids on :, so these entries cannot be addressed by nested path. Covered by scripts/cordis-entry-commit.spec.ts, scripts/cordis-loader-rc9.spec.ts and packages/extensions/creation-recommendations/tests/loader-composition.spec.ts.

  • V30 · include/src/index.ts unresolved aliases: backports cordiverse/cordis#354 (c9fe179ce5ac484620a387a1697409cb007d4178), merged after v4.0.0-rc.12. _read() reports each alias without a preceding anchor as a BAD_ALIAS YAMLParseError with its position, distinguishing an unknown anchor from one written after the alias; at the tag, document.toJS() throws an unlocated ReferenceError outside ConfigFileError. unresolvedAliases() matches the upstream commit verbatim. Retire this entry when the vendored Include includes #354. Covered by scripts/cordis-loader-rc9.spec.ts and scripts/cordis-entry-yaml.spec.ts.

  • V31 · IM package set in vendor/: five packages come from the Satori pin recorded in the manifest — satori-element/, plugin-im-core/, plugin-im-adapter-lark/, plugin-im-adapter-qq/ and plugin-im-markdown/ — with independently pinned element, http and fetch-file dependencies. Their upstream sources are replaced wholesale (V32–V35, V68), so no upstream IM source is copied verbatim: the platform routes, wire envelopes, protobuf/JSON gateway formats and the token endpoints carry over, the rendering pipeline does not. Service names, events and satori: URLs keep their upstream names.

  • V32 · satori-element/ is the element vocabulary: upstream factories and aliases, the global JSX declaration and the blanket re-export of cordis-element are replaced by a typed ElementMap / VariantMap / Element<K> overlay over the unchanged runtime (vocabulary.ts), the block/inline category and tier table (elements.ts), the typed h factory with an automatic JSX runtime (factory.ts), normalize() (root <message>, flow-container wrapping, envelope and content-model validation; normalize.ts), variantsOf() / variantKey() (variants.ts), and the plain projection toText() (text.ts). The markdown parser is plugin-im-markdown's (V68), not this package's. Plain strings are literal text — markup is parsed only by an explicit fromMarkdown() call.

  • V33 · plugin-im-core/ is the IM engine: upstream message.ts (MessageEncoder), the Methods/features/supports(name) surface, the component service and the protocol dependency are gone. protocol.ts holds the public types (Login, User, Status, Meta, WebSocket, ChatRef, Target, UserRef, MessageRef, InboundMessage, the ButtonEvent augmentation). A mode renders what its registry registers — the tag plus the variants its handler declares — and adapters say nothing about a chat. mode.ts holds defineMode and the LimitKey table, registry.ts, fallback.ts and transform.ts the transform engine and the core fallback table, degradation.ts the priced mode score, directives.ts the prefer-streamable-mode / prefer-expressive-mode content directives, resource.ts the ResourceRef walk and the LRU resource cache (bounded concurrency, single upload per cache key), stream.ts the stream scheduler with its patch / edit / append drivers, errors.ts the platform taxonomy (PlatformError kinds, retry hints, published) and testing.ts with testing/ the offline testkit (FakeAdapter, the shared corpus, conformance, goldens). bot.ts splits the public Bot from the implementer Adapter: one pipeline (normalize → transform → prepare → serialize → sendPayload) for every adapter, mode resolution per publication, retries, PartialSendError, edit/delete/stream over the same handle, and the awaited satori/receive intake gate. session.ts keeps the slim Session envelope with its onClick callback registry, and internal.ts serves the satori: routes plus the /_api/:name and /_tmp/:id passthroughs.

  • V34 · plugin-im-adapter-lark/ is rewritten for the protocols above: config.ts is the Schemastery schema (platform selects the OpenAPI host and the reported platform; cardStreaming, callbacks, allowAtAll and the long-connection limits), api/client.ts the typed REST client (message create/reply/update/patch/delete/get/list, chat get, image and file upload, resource download, reactions) over an injected transport, api/token.ts the tenant token with a 30-minute refresh window and a single-flight refresh, api/events.ts the schema-2.0 event envelopes and the LarkReferrer contract. errors.ts maps the platform code table onto PlatformError with the published verdict, and 230075 stays a limit so the stream scheduler resolves a refused edit by recall-and-resend. ws.ts is the protobuf long connection (gateway handshake, fragment reassembly, heartbeats, ACK only after intake, immediate answer for card.action.trigger), bot.ts the adapter shell, modes/post.ts and modes/card.ts the two modes with their escapers, prepare.ts the upload stage, send.ts the create/reply/edit/recall routes and decode.ts the inbound decoder and the chat-kind mapping.

  • V35 · plugin-im-adapter-qq/ is ported for the protocols above: config.ts is the Schemastery schema with two explicit decisions — transport: 'ws' | 'none' (a REST-only client never opens a gateway session) and passive.seqBase starting at 2, because msg_seq is deduplicated per (msg_id, msg_seq) and koishi's adapter starts at 1 — plus configurable baseUrl and tokenUrl. token.ts caches the app access token, refreshes at expires_in − 60 s, refreshes single-flight and keeps serving a still-valid token when a refresh fails. api.ts is the typed v2 REST client (gateway, group/C2C messages, files, recall, interaction acknowledgement, C2C stream_messages) with self-describing group:<openid> / user:<openid> addressing. errors.ts maps the platform code table, the 304… quota family and the HTTP-status fallbacks onto PlatformError. passive.ts owns the passive-reply windows and the per-event msg_seq budget, and reports the replies a stream may still spend. modes/text.ts, modes/markdown.ts and keyboard.ts render the two msg_type bodies and the custom keyboard, prepare.ts uploads media, send.ts publishes with the passive bookkeeping and the dedupe retry, stream.ts the C2C append driver, ws.ts the JSON gateway state machine and decode.ts the inbound decoder plus the chat-lifecycle events. Upstream's src/ at the pin is a different file set (bot/, internal/, http.ts, message.ts, types.ts, utils.ts, ws.ts), so a sync must port the upstream changes into these modules instead of copying the directory over them.

  • V36 · Retained Feishu API subset: plugin-im-adapter-lark/src/types/ retains the auth.ts, im.ts and contact.ts API families from adapters/lark/src/types/ at the Satori pin, plus the transitive closure of shared declarations in index.ts that those families and the handwritten adapter sources reference, with explicit .ts and type import specifiers (V4). Package src publication includes these files, so the subset ships in the tarball.

  • V37 · IM dependencies and build integration: HTTP uses the repository's undici@8.12.4; fetch-file uses mime-types@^3.0.2 / @types/mime-types@^3.0.1 and keeps separate node/browser runtime builds; plugin-im-markdown declares the markdown parser closure. The vendored manifests reference each other with workspace:~, and every vendored tsconfig extends the repo-root tsconfig.base.json and compiles under its strict settings — the upstream nullability, catch and function-variance relaxations are not carried over. HTTP serializes WebSocket headers as an entry object, and adapters send multipart bodies through the undici FormData class (V42).

  • V38 · Awaited intake in plugin-im-core/src/{index,bot}.ts: the awaited satori/receive event and Bot.receive(). dispatch() stays synchronous; the Feishu WebSocket receiver awaits intake consumers before sending a success ACK, then publishes ordinary observer events. An intake rejection withholds the ACK without discarding the caller's durable state.

  • V39 · Connection ownership in plugin-im-core and the adapters: each run owns its cancellation, retry timers, sockets, initialization, heartbeat, token refresh and event-processing promises. Stop aborts setup and connections, cancels timers, closes late sockets, clears fragments and awaits tracked work; concurrent starts retain only the latest controller. Initial retry exhaustion marks the bot offline, an established connection keeps supervised reconnects, and an initialization failure can never mark the bot online. Token refresh logs no credentials and closes the connection on failure so supervision can reauthenticate.

  • V40 · Platform wire validation and limits: the Lark long connection validates the selected envelope and application identity, ignores unselected event families, and bounds frame bytes, fragment counts, partial messages and outstanding intake operations through configuration; fragments expire, identical duplicate segments do not advance completion, and conflicting segments are rejected. The QQ gateway validates every frame, serializes dispatches in arrival order while heartbeats stay independent, and treats a missing HEARTBEAT_ACK as a half-open socket. Both clients answer a platform-declared failure with a typed error carrying the platform code.

  • V41 · Lark media and reactions: Uploads go through the image and file routes and require a platform key; a media message is sent once with a caller-owned uuid and an authorized reply target. createReaction() adds one catalogue emoji (a repeated create is harmless) and deleteReaction() reads the message's reactions first and deletes only the one this application owns, because the platform deletes by reaction identity rather than by emoji.

  • V42 · Multipart bodies in http/src/index.ts: a FormData built by Node's global class is rebuilt in the undici package's own class before dispatch, and encodeRequest recognizes either class. undici@8.12.4 is a different implementation from the fetch built into Node, so its fetch coerced a foreign FormData to a string: every multipart request went out as [object FormData] with content-type: text/plain, and Feishu answered 234001 Invalid request param for each image or file upload. Covered by scripts/vendor-http.spec.ts, which drives one multipart request against a loopback server.

  • V43 · Mode selection, content directives and the mode score in plugin-im-core: no configuration knob and no caller picks a mode; an adapter declares its modes and their order (Adapter.modeOrder) and Bot.send/Bot.render resolve one per publication — every candidate mode is transformed once and the one losing the least wins, the declared order breaking a tie. Two content directives narrow the candidates: a root-level <meta name="prefer-streamable-mode" value="true" /> keeps only modes with a stream driver (implied by Bot.stream, which also keeps the mode fixed for the whole stream), and prefer-expressive-mode keeps the broadest mode by counting the element.* keys it renders natively. Losing content is priced rather than counted (media, mentions and mid-message structure cost more than inline formatting, a dropped element always costs most, a folded panel costs nothing), so losing bold never weighs as much as losing a picture, and a mode can override one price or forbid a loss. RenderResult reports the resolved mode.

  • V44 · <fallback> replaced the capability layer as the way content adapts to a platform: @deepseek-ai/satori-element gained the fallback element (each direct child is one ranked candidate, a JSX fragment counting as one) and its internal case node, normalize turns candidates into case children normalized as content of the element the <fallback> stands in, and renderers now write alternatives instead of asking what a platform supports. RenderEngine.render picks the first candidate whose whole subtree is native, else the last candidate with the usual lowering, records the choice in RenderReport.fallbacks (and charges a later candidate in degradationScore), so <fallback><title>…</title><h3>…</h3></fallback> names both the expressive and the plain spelling of one message. Nothing in the engine consults per-chat state: a mode renders what its registry registers, a declared variant included.

  • V45 · The IM capability layer is gone, not deprecated: plugin-im-core/src/capabilities.ts (ChatFacts, FactCache, LearnedFact, Support, Level, Capabilities, the element.*/message.*/limit.* key vocabulary, evaluateCapabilities, mergeCapabilities), Bot.supports/support/capabilities, Adapter.facts, Mode.operations, HandlerOptions.available, PlatformError.facts and RenderContext.caps/supports were removed together with the Lark chat probe (facts.ts) and the QQ passive-window facts. What a platform allows is now the platform's answer at the moment of the call: a refusal rejects with the classified PlatformError, and content that must degrade says so with <fallback>. LimitKey moved to mode.ts, a mode owns its element budget in assemble/check, and MessageStream.abort() reports whether a recall removed the published message. The IM consumers (@deepseek-ai/dsh-im and its plugins) stopped querying capabilities: a renderer reads the stream strategy it was handed and writes alternatives.

  • V46 · button[type=input] and the Lark card mode: the "a click sends this text as the user" button variant is input throughout the vocabulary (ElementMap.button, VariantMap, the core fallback, the QQ keyboard's action.type 2 encoding). The Lark card mode does not render it: a card button can only answer with a callback, so the variant stays undeclared and the core fallback renders the label plus the text.

  • V47 · Stream diagnostics in plugin-im-core/src/stream.ts: an intermediate state that cannot be rendered, a refused open and a refused tick are dropped as before — close renders again and reports — but each now logs once through the host logger inside its own try/catch, so a turn that publishes nothing says why instead of looking like a stream with nothing to say, and diagnostics never break a stream. The card mode declares the action variant of <button> under the same callbacks switch, which is what keeps a summary turn's stop button live.

  • V48 · plugin-im-core/src/bot.ts status setter reads the bots registry without an inject: set status announced login-updated through this.ctx.bots, but bots is a mixin of the satori service, so a fiber that no longer injects that service — the teardown of a failed boot — threw cannot get property "bots" without inject from Bot.offline() and buried the real startup error. It now reads this.ctx.get('satori')?.bots, which answers undefined without the inject.

  • V49 · plugin-im-adapter-qq/src/bot.ts gateway host rewrite: gatewayUrl() replaced the api.sgroup.qq.com substring of the GET /gateway answer with the configured REST host. In sandbox that answer is already wss://sandbox.api.sgroup.qq.com/websocket, and the substring occurs inside sandbox.api.…, so the result was wss://sandbox.sandbox.api.sgroup.qq.com/websocket — no DNS name answers it and every socket closed with 1006, leaving sandbox: true unusable. The rewrite now parses both URLs and assigns host only when it differs, so a host the endpoint chose for itself stays as served. Covered by tests/bot.spec.ts.

  • V50 · plugin-im-adapter-qq full-mode group messages: a bot with 接收所有消息 switched on receives every group message as GROUP_MESSAGE_CREATE instead of GROUP_AT_MESSAGE_CREATE, so decodeDispatch published nothing for @-mentions in that group. The event now decodes through the same path, with two differences the platform dictates: the body keeps the <@…> mention in place, and mentions never carries the bot itself, so the bot's own union_openid — which READY does not report — is read once from GET /users/@me (QQBot.ensureIdentity, QqApi.getSelf). Only a body that mentions the bot is mentions.self, so background chatter stays unaddressed; a failed identity read is reported and leaves the message unaddressed rather than guessing. Covered by tests/decode.spec.ts.

  • V51 · plugin-im-adapter-qq renders code as code: the markdown mode registered neither code nor pre, so an inline span lost its backticks and a code block arrived as an escaped paragraph — indentation and blank lines collapsed, and every #, * and | carried a backslash. Both tags are native now: code becomes a backtick span and pre a fenced block whose body is a new QqNode kind, verbatim, which assemble copies into the content without escaping, collapsing or the \u200B padding that keeps blank lines alive. A table the core fallback can lay out as a monospace grid follows the same path, so a narrow table reaches the chat as an aligned fenced grid — QQ markdown renders no tables of its own. Covered by tests/markdown.spec.ts and the mode goldens.

  • V52 · plugin-im-adapter-qq streaming chunk body, mode and stream identity: stream_messages names a chunk's text content_raw, not the content of an ordinary send; it takes the whole state with input_mode: 'replace', as its own examples do; and its first answer returns the streamed message's identity in id — there is no stream_msg_id field. The adapter sent content, a hand-computed suffix with input_mode: 'append', and read answer.stream_msg_id, and none of the three mistakes shows in the status: a chunk with no text is still accepted, and a live 单聊 stream answered remain_msg_len: 0 for a message that had just taken five characters, which turned every later append into a shape violation. sendChunk now sends the full state with replace and takes the stream id from the first answer's id, and assertRoom reads a zero remain_msg_len as "not measured" rather than as "no room", so the platform's own refusal decides. Verified against the live 单聊 stream that previously broke. Covered by tests/stream.spec.ts.

  • V53 · plugin-im-core opens a stream in the broadest streamable mode: Bot.stream() resolved its mode with preferredModeId() — the first declared mode that has a driver. An adapter whose cheapest mode also streams therefore spent the whole turn in it (text before markdown on QQ), and because a streamed message fixes its content_type at the first chunk and can never switch, a streamed answer lost every emphasis, code block and link while the same answer sent once kept them. streamMode() resolves the same question the content directives ask — prefer-streamable-mode narrows the pool to the modes with a driver, prefer-expressive-mode takes the broadest of those — which needs no content, because breadth is a property of the mode registry. preferredModeId() remains only as the stand-in mode for a MessageRef this bot did not send. Covered by vendor/plugin-im-core/tests/bot.spec.ts.

  • V54 · plugin-im-adapter-qq markdown mode composes a fence inside a list item or a quote: mapRuns keeps a verbatim node out of the text run so nothing collapses the blank lines of a code block, which also kept it out of the prefix a list item or a block quote puts on every line it owns. A <pre> inside either was emitted mid-line (- 第二项```), so the fence never opened, and the container's own marker ended up glued to the closing fence ( ```>), swallowing every following block into that code block. flattenRunsflattens rendered children into lines first — text runs formatted, code lines untouched — and the two handlers prefix every line;mapRunskeeps its other callers. Covered bytests/markdown.spec.ts`.

  • V55 · plugin-im-adapter-lark keeps code spans verbatim and leaves = … text alone: card markdown escaped every < of user text as &#60;, inline code spans included, and neutralised any line that started with =. The platform decodes no entity inside code — a card showed Result&#60;DsResponse, DsResponse> — and does not consume a backslash before = — = 104 B, align 8 arrived as \= 104 B, align 8. cardCodeSpan now leaves its body verbatim like cardFence (a span cannot open a tag, and the entity would only reach the reader), and escapeCardBlockStart neutralises = only on a line that is nothing but = (a setext underline), so ordinary text keeps both characters. Covered by tests/card.spec.ts.

  • V56 · plugin-im-adapter-qq markdown escaper defuses block markers instead of escaping them: the escaper wrote \#, \- and 1\. ahead of a line-start marker, which only works if the platform honours CommonMark backslash escapes. QQ does for \* but not for these: a stress answer reached the chat with 1\. and \#general showing the backslash, every numbered heading of it included. Inline metacharacters keep their backslash (* _ ~, backtick, brackets, angle brackets); a block marker (a list item, a heading, a quote, a rule) now takes a leading U+200B instead, which is invisible and keeps the marker from being read at line start at all. Covered by tests/markdown.spec.ts and the refreshed corpus goldens.

  • V57 · plugin-im-adapter-lark names the failures behind a rejected intake frame: the long connection logs one line per frame it could not acknowledge, and the rejection it catches is an AggregateError over that frame's listeners whose own message is empty — every line therefore read … retry: AggregateError and named no listener, leaving one intake failure indistinguishable from the next. describeIntakeFailure unwraps it: each aggregated failure arrives with its name and its code (ImError carries persistence, access, capacity, …), which is what says whether admission failed in intake, in a session flush or in a renderer. The ACK behaviour is unchanged and stays covered by tests/ws.spec.ts.

  • V58 · plugin-im-core settles a stream it cannot recall instead of failing the turn: Scheduler.resend recalled the streamed message and, when the platform refused the delete, threw StreamLimitError — so the last chunk was never sent with input_state: 10 and the chat showed that message as generating forever. QQ refuses every DELETE of a streamed message (40061001), which made this the normal outcome as soon as an answer re-parsed mid-stream: a **bold** that completes changes the escaped prefix of a state, so the next state cannot be appended. A stream that cannot be recalled is now closed on the state it already shows, and the final state follows as a fresh message; limitFail settles the same way before it throws. Covered by vendor/plugin-im-core/tests/stream.spec.ts and the QQ adapter's tests/stream.spec.ts.

  • V59 · plugin-im-core prices a moved element: degradationScore charged degraded, fallbacks and dropped, but an element a mode lifted out of the message body (RenderReport.moved) was free. A platform whose plain-text body has no image syntax therefore tied with the mode that keeps the picture inline, and the declared order decided it — so every answer mixing text with a picture was split into text, picture, text. A moved element now costs COST_PLAIN each, which resolves such content to the mode that can keep it: content that interleaves nothing (a picture on its own, or text alone) still ties and keeps the cheaper declared order.

  • V60 · plugin-im-adapter-qq embeds a picture in the markdown body: the img handler published every picture as its own msg_type: 7 message, so a mixed answer reached the chat as three messages and spent three passive replies. QQ's markdown renders ![alt #Wpx #Hpx](…) inline — both pixel dimensions are required, 0px meaning the source size — and fetches the source itself, so the markdown mode now keeps the picture in its own body: assemble leaves a placeholder and serialize fills it with the uploaded qqbot-media:// reference (prepare uploads it for the chat, so a public URL and a local file take one path). The text mode keeps the media message, and the picture stays inside its sentence rather than taking a paragraph of its own. Covered by tests/markdown.spec.ts and the refreshed markdown goldens.

  • V61 · plugin-im-adapter-lark hands a card's pictures back as images: a card shows its pictures by image_key, and the decoder turned each one into the [image] text reference only, so a card's picture was never a media element — im_read_image on such a message answered "no media element" while the card text showed nothing but a placeholder. walkCard now collects the keys (with a picture's alternative text as its alt), interactiveNodes emits a real img whose src is satori:<platform>/<selfId>/images/<image_key>, and LarkBot serves that route through the new LarkApi.getImage (GET /im/v1/images/{image_key}). The platform hands such a key only to the application that sent the picture: another application's card answers 234008 The app is not the resource sender, so the card's text stays the part every reader gets. Covered by tests/card.spec.ts.

  • V62 · plugin-im-core closes a spent streaming window in place: Scheduler.finish treated an elapsed budget.until as a reason to resend — recall the streamed message and publish the final state as a fresh one. What expires on the platform is streaming mode, not the message: the Lark driver's own tick already publishes a full update with streaming_mode: false once the 10-minute window has passed, and close publishes exactly that, so the card stays editable. A turn that outlived the window therefore replaced a card the reader was watching with a new message: a stopped turn's answer and its "stopped" footer arrived as a fresh bubble while the card was recalled. The window now only decides the fallback — close is attempted first, and a refusal from the platform still resends with the same budget violation. Covered by vendor/plugin-im-core/tests/stream.spec.ts.

  • V63 · plugin-im-adapter-lark edits a card message instead of streaming a CardKit entity: LarkBot.streamDriver('card') answers the core edit driver, so a card is one interactive message whose card JSON is replaced with PATCH /im/v1/messages/{message_id}; createCardStreamDriver, streamingCard, cardKitOps and the entity branch of editMessagePayload were no longer reached from this adapter (V64 deletes them). CardKit streaming bought nothing here — a card republished whole on every state never uses incremental rendering — and cost: streaming mode closes ten minutes after it is switched on and reopens only by re-enabling it, it refuses card callbacks that update the card, and it makes the card unforwardable. Measured against the live platform: one message accepted 420 edits (120 + 300, none refused), and the only cap is 5 QPS for that message, which CARD_STREAM_INTERVAL (200 ms) stays under. The post mode keeps the same driver with its own 20-edit limit. Covered by vendor/plugin-im-adapter-lark/tests/{bot,card,stream}.spec.ts.

  • V64 · plugin-im-adapter-lark reads the entries of a merged forward: LarkApi.getMessage returned items[0] and dropped the rest of the answer, but GET /im/v1/messages/{message_id} on a merge_forward returns the entries after the container, each naming it in upper_message_id — so a forwarded conversation reached the model as the bare [forward] reference the event carries and nothing could ever read past it. getMessage now returns every item, LarkBot.getMessage hands them to decodeMessage, and decode.ts fills <forward id> with one line per entry (sender: content, a br between entries, blocks a forward cannot hold inline — a quote, a table — reduced to their text). An event still decodes the reference alone because the platform pushes no entry with it; how a nested forward and an entry's pictures are handled is V66. Covered by vendor/plugin-im-adapter-lark/tests/{decode,bot}.spec.ts.

  • V65 · plugin-im-adapter-lark deletes the CardKit entity path: api/cardkit.ts and stream.ts are gone, together with the card mode's diff (CardPatch, CardKitOp, diffCards, diffList, diffComponent, fingerprint), streamingCard, CARD_STREAMING_CONFIG, maxPatchOps, the card-entity part kind, the entity branch of editMessagePayload, and the cards handle on the bot. A card is one interactive message whose content is replaced by PATCH /im/v1/messages/{id}, so the mode declares patch: never, partKindOf answers card-inline for every card, and CARD_STREAM_INTERVAL survives as the edit cadence (200 ms against the platform's 5 QPS per message); cardStreaming: false now only selects the buffered final strategy. Covered by vendor/plugin-im-adapter-lark/tests/{bot,card,send,stream}.spec.ts. The api/client.ts module doc no longer points at that route map. The config.ts descriptions follow that behaviour: cardStreaming says "edit the card message in place while states stream" (with false buffering the states into one final PATCH, and a stream falling back to post), and allowAtAll says the all variant is declared unless it is explicitly false, which renders @所有人 as text. Both also dropped the capability-probe wording of the deleted fact layer.

  • V66 · plugin-im-adapter-lark serves a forward's pictures through its container and expands a forward of a forward: two facts measured against live messages, both of which V64 got wrong. First, /messages/{id}/resources/{key} answers 234003 File not in msg for an entry's own id and 200 for the same key through the container the read was made for — so V64's per-entry satori: URL pointed at a resource nothing serves; forwardNode now addresses every entry by the container, which is also what makes im_read_image of a picture inside a forward work. Second, a forward of a forward comes back in the same answer as the whole tree — the inner container, then its entries — with every message naming its parent in upper_message_id and an entry appearing once per place it sits; V64 emitted only the direct children and turned the inner container into a bare [forward] with no identity. forwardNode now walks the answer in the platform's own order, tracks each entry's depth from the instance of its parent that precedes it, renders a nested container as a [合并转发 #id] line and indents its entries under it (capped by FORWARD_INDENT_LIMIT). Measured on a three-level forward of 18 items. Covered by vendor/plugin-im-adapter-lark/tests/decode.spec.ts.

  • V67 · plugin-im-adapter-lark serializes card text with the mdast writer: card-markdown.ts escaped literal text with a hand-written character loop and rebuilt code spans and fences itself. escapeCardText, cardCodeSpan and cardFence now go through mdast-util-to-markdown (with mdast-util-gfm), so metacharacters, line-start block markers, code-span delimiter length and fence length follow CommonMark instead of an owned table, and a < that cannot open a tag stays literal. The < and entity-looking & of text keep the entity forms the platform documents (&#60;, &#38;), and normalizeCardMarkdown no longer escapes < at all: the platform decodes no entity inside a code span, so the old final pass reached the reader as &#60; for text such as `cat <name>`. Both packages were already transitive dependencies of the tree. Covered by vendor/plugin-im-adapter-lark/tests/card.spec.ts.

  • V68 · <markdown> is a plugin element, and an append stream publishes only settled blocks: normalize() expanded <markdown> before mode resolution, so the conversion never knew what it was rendering for. An append stream (QQ C2C stream_messages) keeps every character it was sent, while a growing document re-parses as it grows — **ab is literal text the QQ mode escapes to \*\*ab, **abc** is bold, an open fence is closed by the renderer, a paragraph becomes a table or a setext heading — so the next state no longer extended the published prefix, intermediate publication stopped, and QQ's refused recall left a half message with the answer resent below it (V58). satori-element no longer parses markdown: normalize keeps <markdown content> as one element (text children joined into content), toText projects its source, and the parser closure (mdast-util-from-markdown, mdast-util-gfm, micromark-extension-gfm) moved to the new plugin-im-markdown, whose convert.ts holds the unchanged mapping. That plugin is an ordinary Cordis plugin, not a service: apply registers a handler for the markdown tag on Satori.elements (ElementContributions, installed through ctx.effect, so unloading withdraws it), and exports markdown(content) for building the element. plugin-im-core names no markdown: the render engine takes handlers from the mode registry first and from the contributions second (RenderBase.contributions, HandlerLookup), so a contributed tag renders like a registered one in every mode — a mode that registers the tag itself keeps its own handler — and without the plugin the core fallback publishes the source as literal text. RenderContext gained transform(content), which renders content in place of the current element without a degradation entry, and stream ({ strategy, final } of the state being rendered, StreamPhase); StreamHost.render takes final and Bot.stream passes the phase down, skipping an intermediate state whose body renders no node instead of opening the stream empty. The plugin renders only settledMarkdown (the source before the last top-level block) for the <markdown> that ends the message in an intermediate append state; final states and patch / edit streams render the whole source. The Lark adapter imports fromMarkdown from the new package for inbound md nodes; a markdown block's stable id now includes the <markdown> element's path (message/markdown[0]>/…), which changes card element_ids. dsh-im-bundle mounts the plugin as im-markdown. Covered by vendor/plugin-im-markdown/tests/{convert,element}.spec.ts, the QQ adapter's tests/stream.spec.ts and the corpus goldens.

  • V69 · A card callback answers with the listener's toast: ButtonEvent (satori-element/src/vocabulary.ts) gained the optional respond(answer: ButtonAnswer), where ButtonAnswer is { toast?: { type: 'info' | 'success' | 'warning' | 'error'; content } }. plugin-im-adapter-lark/src/ws.ts no longer answers card.action.trigger with {} before intake: answerCardAction decodes the click, attaches respond to session.button and runs intake, and answers the frame exactly once — with { toast } when a listener calls respond, else {} when intake settles or callbackAnswerMs (new config field, default 1500 ms, at most 2500 ms; the platform drops an answer after 3 s) elapses from arrival, whichever comes first. respond resolves after the answer frame was written, because the platform may revert a card update made before the callback was answered; a second call, or a call after the deadline, sends nothing. A failed intake still answers {} and is logged as before. The QQ adapter sets no respond. Covered by vendor/plugin-im-adapter-lark/tests/ws.spec.ts. A listener that answers only after asynchronous work calls ButtonEvent.defer() during intake, so the frame is not answered {} as soon as intake settles; the deadline still bounds it.

  • V70 · Button presentation attributes in satori-element and the Lark card mode: every button type takes the optional ButtonStyle attributes — size (tiny | small | medium | large), width (default | fill | <px number>), icon (a platform icon token), confirm ({ title, text }), tip, disabledTip and variant (the exact Lark button type: default | primary | danger | text | primary_text | danger_text | primary_filled | danger_filled | laser) — and button-group takes width (auto | fill) and align (left | center | right). normalize rejects a value outside those sets, a non-positive width, an empty icon or tip and an incomplete confirm, as it does for the required attributes. The card mode serializes them as the Lark button fields size, width (<n>px for a number), icon: { tag: 'standard_icon', token }, hover_tips, disabled_tips and confirm (plain-text title and text); variant takes precedence over the unchanged theme → type map. A button-group with width="fill" gives every column width: 'weighted', weight: 1 and its buttons a default width: 'fill', and align becomes the column_set horizontal_align; without attributes both serialize as before. The core fallback keeps the new attributes when it lowers button.theme, and other modes ignore them. Covered by vendor/plugin-im-adapter-lark/tests/card.spec.ts, vendor/satori-element/tests/normalize.spec.ts and vendor/plugin-im-core/tests/fallback.spec.ts. A button whose label is blank (whitespace only, or no children) renders an ideographic space instead of its action id, which is an internal routing key.

  • V71 · Bot.handleOf in plugin-im-core: a public method rebuilds a one-part MessageHandle from a MessageRef and the mode the message was published in, so a message this bot published in an earlier process can be edited (or deleted) after a restart. It validates the mode id and claims no content. Consumer: the toC deployment's interactive cards, which edit a card message on a click that arrives after a restart.

  • V72 · Hard limits checked on every send; unknown Lark codes keep the platform text: Bot runs mode.check() on each draft of a plain send / edit (streams already did) and refuses a violating draft before any request with PlatformError('limit', …, { published: 'no' }), so a card over 200 elements or 30 KB is never sent. The Lark classify keeps the platform's own message (and the code) for a code its table does not know, instead of the generic "the platform rejected the request" (230099 carries "element exceeds the limit" only in its text).

  • V73 · Form controls in satori-element and plugin-im-core: <form>, <input>, <select> and <option> are T1 tags (category control; content models flow, empty, options, phrasing; required form.name, input.name, option.value, while a select names a channel — an id that reports its pick, a name that feeds its form, or both), with the variants input.checkbox (a platform's own checkbox component), select.multiple (a multi-value picker) and button.submit (<button type="submit">, which submits the <form> it stands in — the QQ keyboard's label fallback covers every button type, so a submit one renders like an action). normalize validates each control's mode, bounds and value type and keeps select children to option; toText projects a form as the labels and options a reader would have used ([Title], ☑ I agree, [选择: A / B]); the core fallback table lowers form to its children, input/select to that text while reporting interaction-dropped, and strips button.submit to button[type=action], so the click survives and only the submitted values are lost. A <select> with an id reports its pick through onSelect: the new SelectEvent (id, values, data, referrer, time, respond/defer) and the new interaction/select event, routed by CallbackRegistry.registerSelect / dispatchSelect (buttons and selects are separate keyspaces, so one id may carry both); a select without one is a form field only, and the engine collects no callback for it. A submit click stays a ButtonEvent, whose new optional values carries the form's controls keyed by name. TransformResult.actions became a kind-tagged InteractionAction union so the send stage registers an onSelect like an onClick, and select joined the engine's structural-container rule (option children). Covered by vendor/satori-element/tests/{normalize,text,variants}.spec.ts and vendor/plugin-im-core/tests/{registry,fallback,session,bot,stream,testing}.spec.ts.

  • V74 · plugin-im-adapter-lark renders form controls and routes their interactions: the card mode encodes <form> as the platform form container, <input> as input (multiline/password through input_type) or checker for type="checkbox", <select> as select_static / multi_select_static with options and initial_option / selected_values (from value, or from an <option selected> when the select declares none), and <button type="submit"> as a button with form_action_type: 'submit'. A select carries the { v4: { id, data } } callback behavior unless callbacks: false — it still renders and still feeds its form, it just sends no event of its own; a multiple select carries it too (the platform treats every interactive component as reporting its own click), and inside a form the settled value also rides in the submit's action.form_value[<name>]. An <input> gets a behavior only for type="checkbox", where checker is the one form control that reports every toggle (action.tag: 'checker', action.checked); a text field has none and reaches the code only through the submit's form_value. A control with neither an enclosing <form> nor a callback of its own is reported dropped, because nothing about it can come back. cardActionSession decodes action.tag: select_static (and a multi_select_static tag, which another card builder may still emit) becomes an interaction/select session with option / options as values, checker becomes an interaction/check session with checked, any other action keeps producing interaction/button, and action.form_value is decoded into ButtonEvent.values (strings, booleans and string arrays; numbers as strings). @deepseek-ai/dsh-im re-emits the new interaction as im/select under the same admission rule as a click. Covered by vendor/plugin-im-adapter-lark/tests/{card,ws}.spec.ts, the refreshed card/post goldens, and packages/experimental/im/tests/outputs.spec.ts.

  • V75 · interaction/check routes a checkbox toggle (satori-element, plugin-im-core, plugin-im-adapter-lark, dsh-im): input gained id and onChange (CheckEvent: id, checked, data, referrer, time, respond/defer) and lost its required name — a control names its channel with name (form key), id (toggle callback) or both, and normalize rejects onChange on anything but type="checkbox" (the element table no longer lists name as a required input attribute — the alternative channel is checked there instead). CallbackRegistry gained a third keyspace (registerCheck / getCheck / dispatchCheck, so one id may carry a click, a pick and a toggle), InteractionAction a 'check' kind, and SessionEvent.check / Session.check the event the bot routes. The card mode gives a checkbox with an id the { v4: { id } } behavior: the platform's 勾选器回调示例 reports action.tag: 'checker' and action.checked on every toggle, unlike a text input. cardActionSession decodes checker into interaction/check, dsh-im re-emits it as im/check (ImCheckEvent), and plugin/im-card mints a token for <input type="checkbox" onChange> and answers im/check. Covered by vendor/plugin-im-core/tests/session.spec.ts, vendor/plugin-im-adapter-lark/tests/{card,ws}.spec.ts, packages/experimental/im/tests/outputs.spec.ts and plugin/im-card/test/{service,runtime}.test.ts.

  • V76 · plugin-im-core bounds a resource fetch by bytes: createResourceFetcher(ctx, policy) takes an optional ResourceFetchPolicy with maxBytes and refuses an over-limit resource with the new ResourceTooLargeError — from the declared content-length first, then chunk by chunk while the body is read, so the bytes past the limit are never buffered. Without a policy the fetcher reads the body in one call, exactly as upstream. Rationale: the inbound media of a message is downloaded on behalf of whoever wrote that message, and dsh-im's media.admitAs compared the size only after arrayBuffer() had the whole body in memory, so one chat member decided how much this process allocates. dsh-im passes media.maxBytes into the fetch and reports the refusal as the same too-large outcome it already had. Covered by vendor/plugin-im-core/tests/resource.spec.ts and packages/experimental/im/tests/media.spec.ts.

  • V77 · plugin-im-adapter-lark and plugin-im-adapter-qq leave a cancelled publication unknown: classify keeps the cancellation fatal — a cancel is never retried — but reports published: 'unknown' instead of 'no', honouring a published the thrown error itself carries. Rationale: a fetch rejected with AbortError covers both "the request never left" and "the platform answered and the response body was cancelled", and the file-destined verdict 'no' made dsh-im report failed, whose guidance lets the model send the same content again — a duplicate when the first one was published. The pre-request cancellation in each adapter's api/token.ts still reports 'no', because no request exists there. Covered by vendor/plugin-im-adapter-lark/tests/errors.spec.ts and vendor/plugin-im-adapter-qq/tests/errors.spec.ts.

  • V78 · plugin-im-core reports a prepare-stage failure as unpublished: Bot.send runs the pipeline (normalize → transform → prepare → serialize) inside unpublished(), which classifies a pipeline failure and marks it published: 'no', passing an already classified refusal through and keeping StrictRenderError (and PartialSendError, which cannot arise there) unchanged. Rationale: only publish called classifyError, so a failed resource fetch or upload — where no platform message can exist — reached dsh-im as an unknown outcome. Covered by vendor/plugin-im-core/tests/bot.spec.ts.

  • V79 · plugin-im-core does not cache a file: resource across publications: prepare keeps a platform key only for a source that is not a file: URL (isMutableSource), while still deduplicating one upload per source within a single prepare() call. Rationale: the cache key is sha256(src), file: names local bytes that change without their URL changing, and a platform key usually has no expiry, so a second publication of an edited path re-sent the earlier bytes. Covered by vendor/plugin-im-core/tests/bot.spec.ts.

  • V80 · plugin-im-markdown carries the whole element vocabulary from markdown: convert.ts runs mdast → hast (mdast-util-to-hast, raw HTML kept) → hast-util-raw (parse5: it pairs tags, decodes entities and tolerates sloppy HTML) → Satori elements, and the last step is driven by the vocabulary — resolveTag asks tagAliases/isTag, elementInfo decides the content model and the required attributes, so **x**, <strong>x</strong>, <u>x</u>, <spoiler>x</spoiler>, <at user_id="ou_x">张三</at>, <span color="red">x</span>, <details> and every other registered element take one path. Only the content categories (inline, block, media) are authorable: an interactive control (button, input, select, form), a renderer directive (fallback, case) or an inbound wrapper (raw, forward) keeps its children as text, so markdown cannot hand a reader a control the sender never sent. Two mdast rewrites run before the HTML stage: a self-closing tag whose element holds no children (<at id=ou_x />) is closed explicitly, because HTML reads the slash as nothing and nests the rest of the line inside that element, and footnote markers/definitions become the literal [^label] plus their blocks instead of GFM's <sup> reference and end-of-document list. Placement follows the vocabulary too: a block element on a line of its own becomes that block (<small>…</small>, via soleBlock), while the same element inside a sentence keeps its text, because normalize refuses a whole message for one block standing in phrasing content, and a list item outside its list degrades the same way. package.json adds mdast-util-to-hast, hast-util-raw pinned ~9.1.1 (9.2.0 declares parse5@^8 and calls the tokenizer's removed flushCharacters, so it throws) and @types/hast. Covered by vendor/plugin-im-markdown/tests/convert.spec.ts.

  • V81 · plugin-im-core and plugin-im-adapter-lark read a chat's members: protocol.ts gains MembersPage, Bot gains the optional members?(chat, cursor?, limit?) read hook beside getMessage/getMessageList (an adapter without it leaves the operation unavailable), and the Lark adapter answers it from GET /im/v1/chats/{chat_id}/members (api/client.ts#getChatMembers, open_id addressing, page size capped at the platform's 100, a member reported without an id skipped because nothing can address it). Rationale: a mention addresses a platform user id, and a model that saw only names had no way to obtain one. Covered by vendor/plugin-im-adapter-lark/tests/bot.spec.ts.

  • V82 · plugin-im-adapter-lark writes link labels with entities instead of backslashes: card-markdown.ts#linkLabel escapes the characters that end a label or open a tag (& < > [ ] \ ` * _ ~) as the numeric entities the platform decodes in markdown text, and textMarkdown uses it for a bare URL and for text inside a link label. Rationale: the GFM text serializer escapes the : of URL-shaped text so plain text cannot become an autolink, but a card shows that backslash to the reader (autolink https\://example.com/b, 2026-11-11, a real card), and a label is never autolinked. Covered by vendor/plugin-im-adapter-lark/tests/card.spec.ts.

  • V83 · plugin-im-core lets the caller pin a fetch to the admitted URL and bound it: ResourceFetchPolicy gains redirect (RequestInit.redirect, forwarded to ctx.http.get) and timeout, a deadline of the whole fetch, body included: the fetcher joins AbortSignal.timeout(timeout) with the caller's signal, hands it to ctx.http.get and races every body read against it, and rejects with the new ResourceTimeoutError when it passes. The transport's own timeout is not used for it, because ctx.http clears that timer as soon as the response headers arrive. dsh-im passes redirect: 'error' and media.timeoutMs for inbound media. Rationale: dsh-im admitted a source by classifying the address its host resolves to, then the fetch followed a 302 to 127.0.0.1 or 169.254.169.254, so a chat member's picture reached an address the policy had refused; and nothing bounded the download at all, so a slowly trickled body held the chat's arrival order open. The satori: hook answers its own 3xx and ignores redirect, so internal platform resources are unaffected. Covered by vendor/plugin-im-core/tests/resource.spec.ts and packages/experimental/im/tests/media.spec.ts.

  • V84 · plugin-im-core reports the result of one publication on send: the event is declared 'send'(bot: Bot, result: SendResult) and emitted as ctx.emit('send', this, result); upstream (pin 662c3daf, packages/core/src/index.ts:64) declares 'send'(session: Session) and emits the adapter session. Rationale: dsh-im stores the bot's own publication — the platform message ids, the content tree and the chat it went to — and a Session carries no MessageHandle. Consumers depend on the vendored signature: @deepseek-ai/dsh-im listens ctx.on('send', (bot, result) => …), reads result.handle.parts[0] and result.handle.target, and derives the own message's message/seq from them, so a sync that restores the upstream signature silently breaks own-message storage and every receipt that names a message. Covered by vendor/plugin-im-core/tests/bot.spec.ts and packages/experimental/im/tests/intake.spec.ts.

  • V85 · plugin-im-markdown keeps the breaks beside inline formatting, resolves only own aliases and reads the everyone id: convert.ts#pushText keeps a newline at either end of a text run as a <br> unless trimLineEdges finds a neighbour that already ends the line (a <br>, a block element, the container edge); resolveTag accepts an alias only when Object.hasOwn(tagAliases, name); attrsOf turns an at of type user whose id is all or here into that mention type. Rationale: first\n**second**\nthird became firstsecondthird because the split's empty pieces were filtered with the breaks they stood for; <constructor> resolved to the inherited Object and threw in isContent, so an inbound post holding it could not be decoded or acknowledged; and <at user_id="all"> reached the modes as a user mention, past the all variant allowAtAll: false withholds. Covered by vendor/plugin-im-markdown/tests/convert.spec.ts.

  • V86 · plugin-im-adapter-lark never mentions everyone for a user mention and sanitizes mention.id in post mode: shared.ts#mentionMarkdown (post) and card-markdown.ts#cardMention (card) strip characters outside [\w-] from mention.id before checking isEveryoneId, and render a user mention whose id is all or here as its literal @name label. Rationale: Feishu reads user_id="all" / <at id=all> as @everyone, and a mode decides whether a mention is allowed from its type, so allowAtAll: false, which withholds only the all variant, let a user mention carrying that id reach the platform as @everyone; post mode also interpolated raw mention.id into <at user_id="…">, so a non-identifier character such as " broke the tag attribute or bypassed isEveryoneId (all"). plugin-im-markdown now also reads <at user_id="all"> as the all mention. Covered by vendor/plugin-im-adapter-lark/tests/post.spec.ts, card.spec.ts and vendor/plugin-im-markdown/tests/convert.spec.ts.

  • V87 · plugin-im-adapter-lark streams internal satori: resource routes instead of buffering arrayBuffer(): api/client.ts adds downloadStream, getResourceStream and getImageStream (returning the upstream Response after status validation without reading its body), and bot.ts's /messages/:messageId/resources/:fileKey and /images/:imageKey internal routes return those responses directly. Rationale: getResource and getImage called response.arrayBuffer() and rebuilt a fresh Response with only content-type, so createResourceFetcher's maxBytes check (V76) neither saw content-length nor cancelled the stream before the whole upstream file had already been buffered in process memory. Covered by vendor/plugin-im-adapter-lark/tests/bot.spec.ts.

  • V88 · plugin-im-core forwards init.signal across satori: internal routes and 3xx redirects: Satori's http/fetch hook passes init.signal into the Request handed to handleInternalRoute, races handleInternalRoute against init.signal (cancelling any late response body), and preserves signal when following an internal 3xx location. Rationale: without signal on the internal Request, a resource route such as Lark's /messages/:messageId/resources/:fileKey saw an inert request.signal, so createResourceFetcher's timeout (V83) or caller cancellation never aborted a stalled upstream fetch before headers arrived. Covered by vendor/plugin-im-core/tests/resource.spec.ts and vendor/plugin-im-adapter-lark/tests/bot.spec.ts.

  • V89 · plugin-im-adapter-lark and plugin-im-adapter-qq observe mid-flight caller cancellation in AccessToken.get: AccessToken.get(signal) races the shared refresh() promise against signal (cleaning up the abort listener on settle) and rejects the cancelled caller with PlatformError('fatal', …, { published: 'no' }) without aborting the shared token refresh for concurrent callers. Rationale: get(signal) previously checked signal?.aborted only on entry, so send.operationTimeoutMs or caller cancellation waited out a hung token endpoint, and throwing a raw AbortError from signal.reason would lose the pre-request published: 'no' guarantee (V77). Covered by vendor/plugin-im-adapter-lark/tests/bot.spec.ts and vendor/plugin-im-adapter-qq/tests/token.spec.ts.

  • V90 · plugin-im-adapter-lark resolves explicit Target.thread ids to a reply anchor instead of falling back to chat-level createMessage: replyPlan and sendMessagePayload validate non-empty chat-scoped Target.thread strings, reuse a matching LarkReferrer (threadId, rootId, or messageId in the same chat) or ctx.previous[0]'s thread root when available, and otherwise resolve om_… roots via GET /im/v1/messages/{id} or omt_… threads via GET /im/v1/messages?container_id_type=thread&sort_type=ByCreateTimeAsc&page_size=1 (verifying chat_id and classifying pre-send read failures with published: 'no') before posting to POST /im/v1/messages/{anchor}/reply with reply_in_thread: true. Rationale: Feishu's createMessage has no thread_id parameter, so Target.thread: 'omt_…' without a matching referrer previously created an unthreaded chat message or replied to an unrelated referrer's thread. Covered by vendor/plugin-im-adapter-lark/tests/send.spec.ts and packages/experimental/im/tests/send.spec.ts.

  • V91 · Satori PR #416 protocol placement and ecosystem metadata: the protocol module is part of plugin-im-core (src/protocol.ts), not a package of its own, with independently pinned element, http, and fetch-file dependencies; the package set itself is V31's. Local source imports and type-only specifiers follow V4 and V17. The core ecosystem metadata uses im and @deepseek-ai/cordis-plugin-im-*; runtime service names, events, and satori: URLs retain their upstream names. README code examples use the scoped imports. Package READMEs are copied only where upstream supplies a package README; root Satori documentation is not duplicated into packages. Element comes from its independent repository: npm 0.3.0 metadata still points to an older WebUI commit with an incompatible export API.

  • V92 · Core rc.12 compatibility in http and plugin-im-core: http/src/index.ts merges caller intercepts through [Service.mergeIntercept] and resolves them via [Service.resolveIntercept]() instead of rc.11's [Service.resolveConfig]; plugin-im-core/src/session.ts reads bot.ctx[Context.root] instead of bot.ctx.root. Retire this entry when both packages synchronize against Core rc.12.

  • V93 · plugin-im-core retries unknown-outcome sends only when the adapter guarantees idempotency: Adapter.idempotentSend?(target, ctx) lets an adapter report whether sendPayload carries platform deduplication (LarkBot checks options.idempotencyKey, QQBot checks options.idempotencyKey plus an active passive ticket via PassiveManager.canClaim); Bot.withRetry retries retryable / rate-limit errors only when classified.published === 'no' or idempotent is true, so an un-deduplicated QQ active send never duplicates on a lost response. Also in plugin-im-adapter-lark/src/send.ts, replyPlan falls through to resolveReplyMessageId when a quoted message's stored referrer lacks thread metadata instead of rejecting before platform verification. Covered by vendor/plugin-im-core/tests/bot.spec.ts, vendor/plugin-im-adapter-qq/tests/send.spec.ts, and vendor/plugin-im-adapter-lark/tests/send.spec.ts.

  • V94 · plugin-im-core observes pending body reads when abortable sees an already-aborted signal: resource.ts#abortable attaches void pending.catch(() => {}) before returning Promise.reject(signal.reason) when signal.aborted is already true, so an in-flight reader.read() or response.arrayBuffer() rejected by the abort cannot escape as an unhandledRejection (which triggers app-boot fail-loud exit). Covered by vendor/plugin-im-core/tests/resource.spec.ts.

  • V95 · plugin-im-core forwards the scheduler lifecycle signal in StreamTickContext.options: Scheduler.context merges { ...this.options, signal } into options so createEditDriver.open (which passes ctx.options to adapter.sendPayload) receives the scheduler's AbortSignal and stream.abort() / dispose() cancels an in-flight initial publish. Covered by vendor/plugin-im-core/tests/stream.spec.ts.

  • V96 · plugin-im-core guards Scheduler.retry on initial open with published === 'no' || idempotentSend: StreamHost.idempotentSend?(ctx) delegates to Adapter.idempotentSend, and Scheduler.retry skips retrying published !== 'no' on driver.open unless idempotentSend returns true (re-checking after backoff sleep, preserving any earlier published: 'unknown' across retries including StreamLimitError, documenting both in Scheduler.retry's JSDoc, and preventing tick() from falling back to host.send() when an earlier open attempt was published: 'unknown'). Covered by vendor/plugin-im-core/tests/stream.spec.ts.

  • V97 · plugin-im-core accumulates published: 'unknown' across Bot.withRetry attempts: if any retry attempt throws published: 'unknown', Bot.withRetry preserves published: 'unknown' on the final thrown PlatformError even if a subsequent attempt fails with published: 'no', so callers never treat an uncertain send as definitely unpublished. Covered by vendor/plugin-im-core/tests/bot.spec.ts.

  • V98 · plugin-im-core includes ResourceMeta in resourceCacheKey: resourceCacheKey and prepare() include meta.name, meta.mime, meta.duration, meta.width, and meta.height in the cache and in-flight deduplication key, so identical-byte data: URLs with different filenames or metadata do not reuse another file's platform file_key. Covered by vendor/plugin-im-core/tests/resource.spec.ts.

  • V99 · plugin-im-core clears Scheduler._handle after a confirmed recall and records StreamAbortError.recalled: Scheduler.recall clears this._handle to undefined when host.recall returns true (and MessageStream.handle documents this lifecycle, while StreamLimitError.handle keeps the recalled handle for diagnostics), and StreamAbortError carries recalled: boolean so ImSender distinguishes a recalled stream (failed) from one whose message remains in the chat (partial). Covered by vendor/plugin-im-core/tests/stream.spec.ts and packages/experimental/im/tests/send.spec.ts.

  • V100 · plugin-im-core and plugin-im-adapter-lark report platform thread and referrer on SentPart: SentPart gains optional thread and referrer fields, and Lark's sendMessagePayload populates them from answer.thread_id, answer.root_id, target.chat.type, and the sent message_id so dsh-im persists newly created threads and their reply context on own messages. Covered by vendor/plugin-im-adapter-lark/tests/send.spec.ts and packages/experimental/im/tests/intake.spec.ts.

  • V101 · plugin-im-adapter-qq keeps its gateway close listener across WsClientBase abort: QQWsClient.accept detaches close inside the close handler itself rather than inside cleanup, so non-resumable close codes (4006/4007) still run dropSession() after WsClientBase's earlier close handler aborts connection.signal. Covered by vendor/plugin-im-adapter-qq/tests/ws.spec.ts.

  • V102 · plugin-im-adapter-qq advances the resume seq cursor only after bot.receive persists: QQWsClient advances this.seq only after dispatch() completes without error; if bot.receive() rejects it aborts the per-connection AbortController synchronously (preventing already-queued frames from advancing this.seq before the async close event) and closes the socket (3000) so WsClientBase reconnects and RESUMEs from the last persisted sequence number (while decode failures still log and keep the socket up). Covered by vendor/plugin-im-adapter-qq/tests/ws.spec.ts.

  • V103 · plugin-im-core invalidates createEditDriver's published cache when editPayload fails: createEditDriver's edit() helper deletes handle from published in its catch block so a subsequent close() with the earlier payload still writes back to the platform instead of skipping on a stale cache hit. Covered by vendor/plugin-im-core/tests/stream.spec.ts.

  • V104 · plugin-im-core, plugin-im-adapter-lark, and plugin-im-adapter-qq use valid WHATWG client WebSocket.close() codes: client-initiated abnormal closes (WsClientBase, LarkWsClient, QQWsClient) pass 3000 instead of 1011 or 1008, because undici.WebSocket throws InvalidAccessError for client close codes outside 1000 and 3000–4999. Covered by vendor/plugin-im-adapter-qq/tests/ws.spec.ts and vendor/plugin-im-adapter-lark/tests/ws.spec.ts.

  • V105 · plugin-im-adapter-qq and plugin-im-adapter-lark mark all token-acquisition failures as published: 'no': AccessToken.refresh() and cancelledTokenError() in both adapters (plus QQ's bot.ts token poster status check) ensure transport errors, HTTP 4xx/429/5xx responses (preserving kind, retryAfterMs, cause, and body), empty token responses, and rethrown PlatformError / LarkApiError failures carry published: 'no' so callers can safely retry with platform backoff or record failed rather than uncertain. Covered by vendor/plugin-im-adapter-qq/tests/token.spec.ts and vendor/plugin-im-adapter-lark/tests/bot.spec.ts.

  • V106 · plugin-im-core re-evaluates idempotentSend across Bot.withRetry attempts: Bot.send passes () => this.adapterHooks.idempotentSend?.(target, ctx) ?? false into Bot.withRetry (whose unused target parameter is removed), and withRetry checks it both before and after backoff sleep (requiring isIdempotent() once any prior attempt returned published: 'unknown', even if a later attempt returned published: 'no') so an expiring time-bounded deduplication window aborts the retry as published: 'unknown'. Covered by vendor/plugin-im-core/tests/bot.spec.ts.

  • V107 · plugin-im-adapter-qq exempts live ticketed windows from passive LRU eviction: PassiveManager.shrink() only evicts entries with tickets.size === 0 when enforcing max (and PassiveManagerOptions.max / DEFAULT_MAX_WINDOWS document this soft bound) so an in-flight retry's (msg_id, msg_seq) dedupe ticket is retained until its window expires. Covered by vendor/plugin-im-adapter-qq/tests/passive.spec.ts.

  • V108 · plugin-im-adapter-qq and plugin-im-adapter-lark match structural ResponseLike in responseOf: responseOf() in both adapters' errors.ts checks typeof status === 'number' && typeof headers?.get === 'function' instead of instanceof Response, because ctx.http uses undici.fetch whose Response is not an instance of global Response. Covered by vendor/plugin-im-adapter-qq/tests/token.spec.ts and vendor/plugin-im-adapter-lark/tests/errors.spec.ts.

  • V109 · plugin-im-core and plugin-im-adapter-lark forward AbortSignal through editPayload and bound abort-close: Adapter.editPayload, EditDriverAdapter.editPayload, createEditDriver (tick/close), Bot.applyEdit, and Lark's editMessagePayload forward signal to updateMessage/patchMessage, and Scheduler.abort() bounds its best-effort driver.close with AbortSignal.timeout(STREAM_ABORT_CLOSE_TIMEOUT_MS). Covered by vendor/plugin-im-core/tests/stream.spec.ts.

  • V110 · plugin-im-core detaches the caller AbortSignal listener when a stream settles: Scheduler keeps a reference to its abort listener and removes it in close(), fail(), and abort(), preventing settled streams from accumulating on a long-lived AbortSignal. Covered by vendor/plugin-im-core/tests/stream.spec.ts.

  • V111 · plugin-im-adapter-qq sends heartbeat sequence numbers in d per the QQ gateway protocol: QQWsClient.heartbeat() sends { op: Opcode.HEARTBEAT, d: this.seq ?? null } instead of { op: Opcode.HEARTBEAT, s: this.seq } (upstream adapters/qq/src/ws.ts sends s, contradicting its own HEARTBEAT payload type d: number and causing strict gateways to omit HEARTBEAT_ACK). Covered by vendor/plugin-im-adapter-qq/tests/ws.spec.ts.

  • V112 · http combines caller config.signal via AbortSignal.any instead of an unbounded listener: Http[Service.invoke] fuses config.signal with the per-request timeout controller.signal using AbortSignal.any([config.signal, controller.signal]) so repeated requests sharing a long-lived AbortSignal do not accumulate strong closure listeners while still supporting response-body cancellation.

  • V113 · plugin-im-core and plugin-im-adapter-qq preserve message_scene.ext.msg_idx as InboundMessage.aliases: InboundMessage gains optional aliases?: string[], and QQ's messageSession() records message_scene.ext.msg_idx there while keeping payload.id as message.id (for event dedupe and passive reply msg_id), allowing dsh-im to resolve ref_msg_idx quotes back to the stored original message. Covered by vendor/plugin-im-adapter-qq/tests/decode.spec.ts and packages/experimental/im/tests/intake.spec.ts.

  • V114 · plugin-im-adapter-lark wraps card callback answers in { code: 200, data }: LarkWsClient.answerCardAction() wraps the JSON business body ({} or { toast }) as base64 in { code: 200, data: Buffer.from(JSON.stringify(body)).toString('base64') } to match the Lark WebSocket card.action.trigger response envelope (upstream satori's ws does not return card callback answers). Covered by vendor/plugin-im-adapter-lark/tests/ws.spec.ts.

  • V115 · plugin-im-adapter-lark marks HTTP 200 responses missing data as published: 'unknown': LarkApi.answer() passes published: 'unknown' on LarkApiError when an HTTP 200 envelope omits data, matching requiredKey() so dsh-im records uncertain instead of failed. Covered by vendor/plugin-im-adapter-lark/tests/send.spec.ts.

  • V116 · plugin-im-core and plugin-im-adapter-qq preserve ext_info.ref_idx on SentPart.aliases: SentPart gains optional aliases?: string[], and QQ's sendMessagePayload() records answer.ext_info?.ref_idx there while keeping answer.id as part.id, so dsh-im can resolve quotes against the bot's own published QQ messages. Covered by vendor/plugin-im-adapter-qq/tests/send.spec.ts and packages/experimental/im/tests/intake.spec.ts.

  • V117 · plugin-im-adapter-lark uses null-prototype lookup tables in prepare.ts: DOCUMENT_MIME, DOCUMENT_EXTENSION, and IMAGE_NAME use Object.create(null) so filenames or MIME strings matching Object.prototype keys (constructor, __proto__) fall back to 'stream' instead of inheriting prototype values. Covered by vendor/plugin-im-adapter-lark/tests/prepare.spec.ts.

  • V118 · fetch-file aborts fileTypeFromStream sniffing on init.signal: fetchFile() checks init.signal?.aborted before and after sniffing, races fileTypeFromStream against init.signal, destroys the underlying read stream on abort, and rethrows abort errors instead of mapping them to 500, so Bot.send() timeouts are not hung by blocked local files. Covered by vendor/fetch-file/tests/node.spec.ts.

  • V119 · plugin-im-adapter-lark sets a non-empty name on form submit buttons (and guards empty form names): Feishu Card JSON 2.0 rejects clicking a form_action_type: 'submit' button without a non-empty name with client error 200530 (Empty form name). serializeButton now emits name: button.id alongside form_action_type: 'submit' (using the card-unique element_id finalized by finalize), and serializeComponent falls back to component.id if a form's name is empty. Covered by vendor/plugin-im-adapter-lark/tests/card.spec.ts and the refreshed form / everything card goldens.

  • V120 · plugin-im-core and plugin-im-adapter-lark decode inbound reaction events without chat_id and normalize app operators: SessionEvent.reaction.message.chat is optional and Session exposes a reaction getter, because Feishu's im.message.reaction.created_v1 / deleted_v1 payloads carry message_id without chat_id. LarkBot's reactionSessions() emits reaction-added / reaction-removed even when chat_id is absent (letting dsh-im resolve the stored message by id) and normalizes operator_type === 'app' matching bot.config.appId to bot.selfId so downstream filters can skip self-reactions. Covered by vendor/plugin-im-adapter-lark/tests/decode.spec.ts and packages/experimental/im/tests/outputs.spec.ts.

Resolver adaptations

Relative to the resolver source in Cordis v4.0.0-rc.12:

  • Web build imports: loader/src/resolve.ts and loader/src/config/tree.ts use default imports for Node builtin modules to support the Web shell's browser externalization. The shell supplies its own module loader.
  • Package-scope cache keys: loader/src/resolve.ts normalizes directory paths with path.resolve() before finding the package scope. A root config and a nested config in the same package therefore share the same cached resolver promise and helper-file write. Covered by scripts/cordis-loader-resolve.spec.ts.

Sync procedure

To update a vendored package from upstream:

  1. In the upstream repository listed in the manifest, check out the release tag or commit to sync and note its full commit SHA.
  2. Copy the package's src/ (and bin.js, README.md, LICENSE if changed) over the vendored directory.
  3. Re-apply the local modifications listed above (or drop them if upstream made them unnecessary — update the log either way).
  4. Update the version and commit hash in the manifest table.
  5. Run pnpm install && pnpm run test && pnpm run build at the repo root.