Commit Graph

27 Commits

Author SHA1 Message Date
Eden 14b59a06f5 fix(line): deliver a location LINE cannot render instead of dropping it (#126298)
* fix(line): deliver a location LINE cannot render instead of dropping it

A location whose title or address is blank makes LINE reject the whole
request, so every delivery path filtered it out before sending. The reply
then arrived without the pin, and nothing told the user or the operator that
a part of the message had been removed: the coordinates the sender supplied
were discarded silently.

The location builder now answers with the values the sender wrote — the
non-blank label plus the coordinates — as a text message, so an unrenderable
pin degrades into something the chat can show instead of disappearing. Both
delivery paths inherit that from the single builder, and the three call sites
that used to skip a null result no longer have a branch to take.

Live validation against the Messaging API confirms the shape: the authored
location is rejected with "May not be empty" on messages[0].address, the same
rejection kills an entire batch that also carries valid text, and both
degraded forms validate cleanly.

* fix(line): bound the location fallback to LINE's text limit

Nothing caps the location labels at the schema, so a long title with a blank
address produced one raw text message past LINE's 5,000-character limit — the
provider rejected it and the location was lost exactly as silently as before.

The pin path already caps each label at 100 characters. Name that limit and
apply it in the fallback too, so both forms carry the same bound instead of
one of them re-deriving the provider's rules.

* test(line): merge the duplicate send.js imports
2026-08-20 00:29:51 +08:00
Peter Steinberger d8ebe85c24 refactor(line): replace nine-marker prompt DSL with typed rich messages (#124755)
* refactor(line): replace nine-marker prompt DSL with typed rich messages

Delete the LINE plugin's double-bracket marker language (quick_replies,
location, confirm, buttons, media_player, event, agenda, device,
appletv_remote) and its parser. Portable interactions now flow through the
existing presentation-block seam (renderPresentation, matching Discord and
Feishu); LINE-specific cards ride closed channelData.line schemas mapped to
the existing Flex renderers. Prompt section shrinks to four capability
lines and explicitly de-fangs marker text. Removes the stale
assertion-safety baseline entry for the deleted parser.

Production LOC net -69, tests net -433. Suite: 510/510 green.

* fix(line): declare rich message schema dependency

* fix(line): satisfy rich message type checks

* docs(line): mark card fragments as partial
2026-08-16 12:45:39 -07:00
clawsweeper[bot] 492b8841c8 fix(line): skip invalid location messages before delivery (#118064)
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-08-02 12:17:24 -05:00
Peter Steinberger a88f3ffc96 fix(line): preserve ordered oversized table delivery (#117335)
* fix(line): preserve ordered delivery of oversized markdown tables

* fix(line): type ordered delivery at provider and test boundaries

* fix(line): narrow ordered provider messages to flex or text

---------

Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-08-01 03:44:30 -07:00
Peter Steinberger 0a146d5a18 fix(line): centralize Flex alternative-text bounds (#117217)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 23:23:52 -07:00
Peter Steinberger a39f0b7ea3 fix(channels): preserve accepted LINE and Mattermost delivery (#117024)
* fix(channels): preserve accepted delivery identities

* fix(channels): satisfy accepted-delivery owner boundaries

---------

Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 14:28:55 -07:00
Peter Steinberger 50771abc6a fix(line): preserve provider delivery receipts and completed sends (#116879)
* fix(line): preserve provider message ids in receipts

* fix(line): unify legacy text delivery receipts

---------

Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 07:52:16 -07:00
Peter Steinberger 282ddaf96b refactor(line): preserve formatting in flex messages (#112921) 2026-07-23 02:17:35 -04:00
Peter Steinberger 3550d3140e fix(line): validate generic batch media URLs (#108917) 2026-07-16 03:59:26 -07:00
Eden bc93fe9f25 fix(line): honor channelData.line.mediaKind on the reply-token path (#106515)
* fix(line): honor channelData.line.mediaKind on the reply-token path

The reply-token delivery built every media message with createImageMessage,
ignoring channelData.line.mediaKind (and previewImageUrl/durationMs/trackingId),
so a video/audio reply was silently downgraded to a broken image. The push path
already honored mediaKind via resolveLineOutboundMedia + buildLineMediaMessageObject.

Route reply-token media through those same helpers (relocated to outbound-media.ts
and reused by both paths) via an injected buildMediaMessage dep wired in monitor.ts,
preserving the delivery file's dependency-injection boundary. Generic media without
LINE-specific options keeps the image route; a media that cannot be built surfaces
as a visible partial delivery so the text still reaches the user.

* refactor(line): unify reply media delivery

* fix(line): normalize media delivery failures

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-15 18:06:26 -07:00
pick-cat 30a241c498 fix(line): strip internal tool-trace banners from outbound text (#101708)
* fix(line): strip internal tool-trace banners from outbound text

* fix(line): sanitize inbound assistant replies

* chore: retrigger PR CI

---------

Co-authored-by: Pick-cat <266665499+Pick-cat@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-14 15:38:19 -07:00
Peter Steinberger 218dcd815a feat(tooling): enforce noUncheckedIndexedAccess in the extensions lane (NUIA phase 4) (#105132)
* fix(extensions): make indexed access explicit across channel plugins

Transport-payload-safe burn-down: malformed Telegram/Discord/QQ/LINE
and sibling channel input keeps existing skip paths; no synthesized
fields, no new throws in delivery loops. Zalo escape sentinels preserve
literal matches instead of undefined replacements.

* fix(extensions): make indexed access explicit across provider and memory plugins

Stream and model iteration, tool-block guards, capture guards, and
sparse accumulators; singleton model reads carry named invariants.

* fix(extensions): make indexed access explicit across tooling plugins, flip the extensions lane

Remaining plugins (oc-path, qa-lab, browser, logbook, and siblings) plus
the tsconfig.extensions.json flag flip. Cleanup: logbook sampleFrames
NaN index at max=1, QA retry clamp at non-positive attempts, dead Canvas
probe and OpenShell no-op slice removed, twitch test setup leak excluded
from the prod lane.

* refactor(plugin-sdk): expose expectDefined via a focused SDK subpath

Extensions imported @openclaw/normalization-core directly, crossing the
external-plugin packaging boundary (it only worked because the runtime
builder bundles undeclared workspace helpers). expect-runtime joins the
canonical entrypoints JSON, generated exports, API baseline, docs, and
subpath contract test; all 78 extension imports now use the SDK seam.
Two scanner-shaped locals renamed for review-bundle hygiene.

* chore(plugin-sdk): raise surface budgets for the expect-runtime subpath

One new entrypoint with one callable export, added intentionally as the
packaging-honest seam for extension invariant helpers.
2026-07-12 09:17:31 +01:00
xingzhou 741d9524be fix: outbound recovery can replay already sent replies (#99600)
* fix(outbound): avoid replaying sent recovery deliveries

* fix(outbound): persist recovery send state before ack

Co-authored-by: zhang-guiping <zhang.guiping@xydigit.com>

* fix(outbound): preserve partial send evidence across adapters

* test(line): cover multi-send delivery progress

* fix(outbound): preserve repeated receipt result multiplicity

* test(heartbeat): expect delivery progress callback

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-04 01:09:12 -07:00
Sachintha Bhashitha 02b529a8cc fix(line): truncate outbound altText, location, menu, and code fields on code point boundaries (#98994)
* fix(line): truncate outbound altText, location, menu, and code fields on code-point boundaries

* fix(line): use safe truncation for receipt card altText

* fix(line): count rich menu limits by grapheme

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-03 23:46:13 -07:00
Peter Steinberger 6868cde4d4 docs: document large extension sources 2026-06-04 21:40:44 -04:00
Peter Steinberger deb7bc6539 chore(lint): enable readability lint rules 2026-05-31 07:17:57 +01:00
Peter Steinberger 1507a9701b refactor: centralize inbound supplemental context
* refactor: centralize inbound supplemental context

* refactor: trim supplemental finalizer typing

* docs: clarify supplemental context projection

* refactor: move inbound finalization into core

* refactor: simplify channel inbound facts

* refactor: fold supplemental media into inbound finalizer

* refactor: migrate channel inbound callers to builder

* docs: mark inbound finalizer compat types deprecated

* refactor: wire runtime turn context builder

* refactor: replace channel turn runtime API

* fix: respect discord quote visibility

* fix: avoid deprecated line dispatch helper

* refactor: deprecate channel message SDK seams

* docs: trim channel outbound SDK page

* test: migrate irc inbound assertion

* refactor: deprecate outbound SDK facades

* refactor: deprecate channel helper SDK facades

* refactor: deprecate channel streaming SDK facade

* refactor: move direct dm helpers into inbound SDK

* chore: mark legacy test-utils SDK alias deprecated

* refactor: remove unused allow-from read helper

* refactor: route remaining channel dispatch through core

* refactor: enforce modern extension SDK imports

* test: give slow image root tests more time

* ci: support node fallback on windows

* fix: add transcripts tool display metadata

* refactor: trim legacy channel test seams

* fix: preserve channel compat after rebase

* fix: keep deprecated channel inbound aliases

* fix: preserve discord thread context visibility

* fix: clean final rebase conflicts

* fix: preserve channel message dispatch aliases

* fix: sync channel refactor after rebase

* fix: sync channel refactor after latest main

* fix: dedupe memory-core subagent mock

* test: align clickclack inbound dispatch assertions

* fix: sync plugin sdk api hash after rebase

* fix: sync channel refactor after latest main

* fix: sync plugin sdk api hash after rebase

* fix: sync plugin sdk api hash after latest main

* test: remove stale inbound context awaits
2026-05-27 09:26:06 +01:00
Peter Steinberger 4780e69352 fix(line): acknowledge webhooks before agent processing 2026-05-15 15:49:36 +01:00
Peter Steinberger 05eda57b3c refactor: migrate bundled plugins to message lifecycle 2026-05-06 01:46:42 +01:00
Vincent Koc 5230b09ca9 fix(line): send quick-reply-only payloads 2026-05-01 05:06:11 -07:00
Vincent Koc 029290c8d0 fix(plugins): clean fifth channel lint batch 2026-04-06 14:45:22 +01:00
Vincent Koc 2687a49575 refactor(line): lazy-load channel runtime seams 2026-04-04 12:26:20 +09:00
Vincent Koc 0ecf84524d fix(ci): restore line runtime seams 2026-04-03 23:19:39 +09:00
Peter Steinberger f59d0eac68 refactor(plugin-runtime): remove plugin-specific core seams 2026-04-03 13:08:39 +01:00
Peter Steinberger c48e0f8e6a style: normalize import order and formatting 2026-03-29 16:33:22 +09:00
Masato Hoshino 9449e54f4f feat(line): add outbound media support for image, video, and audio
pnpm install --frozen-lockfile
pnpm build
pnpm check
pnpm vitest run extensions/line/src/channel.sendPayload.test.ts extensions/line/src/send.test.ts extensions/line/src/outbound-media.test.ts

Co-authored-by: masatohoshino <246810661+masatohoshino@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-03-28 20:51:16 -05:00
Peter Steinberger 148a65fe90 refactor: share webhook channel status helpers 2026-03-29 02:11:22 +01:00