Repository navigation
feat(line): migrate Sprint 3.5–3.7 LINE customizations to extensions/line/src/ plugin structure - #86
Merged
Piboonsak merged 2 commits intoApr 6, 2026
Conversation
4 tasks
Copilot
AI
changed the title
[WIP] Migrate LINE customizations to upstream plugin structure
feat(line): migrate Sprint 3.5–3.7 LINE customizations to extensions/line/src/ plugin structure
Apr 6, 2026
Piboonsak
marked this pull request as ready for review
April 6, 2026 07:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/line/→extensions/line/src/(full plugin extraction). Our Sprint 3.5–3.7 customizations (reply context, exec approvals, heartbeat/thinking commands) still target the old paths.src/line/files insideextensions/line/src/usingopenclaw/plugin-sdkimports; added all required supporting files; extendedsrc/plugin-sdk/index.tswith new exports needed by extension code (gateway client, exec approval types, pairing helpers, allow-from utilities, subsystem logger).src/line/files are not yet deleted (they still have callers insrc/; deletion is a follow-up).extensions/line/index.tsheartbeat registration was already present.Key customizations re-applied
bot-message-context.tsquotedMessageId→ReplyToId+ body annotation (reply context awareness)send.tsrunWithLineRetry+runLineOutboundSerial(retry + serialization)exec-approvals.tsLineExecApprovalHandler— sends confirm templates, resolves via gateway RPCbot-handlers.tsexecApprovalHandleroption; postback interception before new agent turnbot.tsexecApprovalHandlerthrough to handler contextmonitor.tsLineExecApprovalHandleraround webhook lifecycleNew SDK exports (
src/plugin-sdk/index.ts)Added exports for: gateway client/modes, exec approval types, subsystem logger, pairing helpers (
resolvePairingIdLabel,readChannelAllowFromStore,upsertChannelPairingRequest), allow-from utilities, inbound envelope formatting, session helpers.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
ReplyToId) now lives in the extension plugin, matching upstream structure.Security Impact (required)
NoNoNo(gateway WebSocket already used; no new endpoints)NoNoRepro + Verification
Environment
channels.line.channelAccessToken,channels.line.channelSecretSteps
pnpm test -- extensions/line/src/bot-message-context.test.tsExpected
bot-message-contexttests pass.extensions/line/src/tests (send, channel) continue to pass.Actual
bot-message-contexttests pass ✅channel.startup.test.tstimeout andexec-approvals.test.tsfailures are unrelated to this PR (confirmed present on base branch).src/plugin-sdk/index.test.tsfails due to forbidden SDK exports added in this PR — needs fix before merge.Evidence
bot-message-context.test.ts: 0 → 7 tests passing)Human Verification (required)
bot-message-context.test.tsall 7 tests pass; reply context path exercised by tests.quotedMessageId, group message reply context.Compatibility / Migration
Yes— oldsrc/line/files still present; no callers broken.NoNo(follow-up PR to deletesrc/line/files and update callers)Failure Recovery (if this breaks)
extensions/line/index.tswill fall back to previous channel plugin state.extensions/line/src/new files,src/plugin-sdk/index.tsadditions.src/plugin-sdk/index.test.tsfailure (forbidden exports) — must be resolved before merge.Risks and Mitigations
src/plugin-sdk/index.tsbreak the SDK surface-area guard test.chunkMarkdownText,buildPairingReply,hasControlCommand,buildMentionRegexes,matchesMentionPatterns,dispatchReplyWithBufferedBlockDispatcher,loadConfigfrom SDK; update extension imports to use an internal sub-path or inline the logic.resolveAgentRoute/logVerboseexports cause esbuild errors in other consumers.