Repository navigation
🔧 同步 sctl 协议:ScriptCat 多实例握手上下文与 SCRIPTCAT_* 错误码 - #1820
Merged
Merged
Conversation
2 of 3 tasks
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.
Checklist / 检查清单
N/A — 修复已提及的问题:本 PR 只同步协议生成文件,不修复问题。
背景
scriptscat/sctl#16 让 sctl daemon 同时接入多个 ScriptCat 实例,在
protocol.json中新增了四个 ScriptCat 实例握手上下文和三个错误码,均标注给 ScriptCat 使用,因此生成给 ScriptCat 的 TypeScript 发生变化。sctl CI 要求生成结果与固定 ScriptCat 版本中的副本逐字节一致(SCRIPTCAT_REF指向本 PR 的提交bc6f6bb4),本仓库的一致性测试要求BRIDGE_ERROR_CODES与生成的错误码列表完全一致。本次改动
generated/protocol.generated.ts:make protocol-sync-scriptcat的输出,新增scriptcatSessionExt/scriptcatSessionDaemon/scriptcatPairExt/scriptcatPairDaemon上下文与SCRIPTCAT_OFFLINE/SCRIPTCAT_NOT_FOUND/SCRIPTCAT_AMBIGUOUS。validators.generated.ts无变化。types.ts:BRIDGE_ERROR_CODES增加这三个码。不改变任何运行时行为:新常量当前没有被使用,后续 PR 让 ScriptCat 声明实例身份时才会用到。
已知限制
若本 PR 以 squash 方式合并,生成文件内容不变,sctl 侧需把
SCRIPTCAT_REF改指向合并后的提交。关联
验证
基于
79f2a99f(main)…bc6f6bb4,git diff origin/main...origin/chore/sctl-protocol-scriptcat-instances只改上述两个文件。pnpm vitest run --no-coverage src/app/service/service_worker/external_access/:8 个文件 139 个测试通过(含protocol.conformance.test.ts)。tsc --noEmit通过;eslint、prettier 通过。.prettierrc格式化后,与本 PR 的两个文件cmp一致。