fix: resolve qa-lab type-aware linting (#63928)

Regeneration-Prompt: |
  Fix the unrelated qa-lab failures that started surfacing once bundled extension linting covered the QA channel types. Keep the change minimal and additive. Preserve the existing plugin-sdk import surface for qa-lab, but make sure the generated qa-channel plugin-sdk declarations can be resolved from bundled extension package-boundary tsconfig paths. Also replace the over-broad QaBusEventSeed union in qa-lab bus state with an explicit discriminated union so oxlint no longer treats the event variants as duplicate constituents. Verify with the qa-lab package typecheck, a targeted type-aware oxlint run for the affected files, full pnpm check, and the focused qa-lab bus-state test.
This commit is contained in:
Josh Lehman
2026-04-09 14:33:33 -07:00
committed by GitHub
parent bed53c77aa
commit bd639bbde8
2 changed files with 40 additions and 6 deletions

View File

@@ -31,12 +31,38 @@ const DEFAULT_BOT_ID = "openclaw";
const DEFAULT_BOT_NAME = "OpenClaw QA";
type QaBusEventSeed =
| Omit<Extract<QaBusEvent, { kind: "inbound-message" }>, "cursor">
| Omit<Extract<QaBusEvent, { kind: "outbound-message" }>, "cursor">
| Omit<Extract<QaBusEvent, { kind: "thread-created" }>, "cursor">
| Omit<Extract<QaBusEvent, { kind: "message-edited" }>, "cursor">
| Omit<Extract<QaBusEvent, { kind: "message-deleted" }>, "cursor">
| Omit<Extract<QaBusEvent, { kind: "reaction-added" }>, "cursor">;
| {
kind: "inbound-message";
accountId: string;
message: QaBusMessage;
}
| {
kind: "outbound-message";
accountId: string;
message: QaBusMessage;
}
| {
kind: "thread-created";
accountId: string;
thread: QaBusThread;
}
| {
kind: "message-edited";
accountId: string;
message: QaBusMessage;
}
| {
kind: "message-deleted";
accountId: string;
message: QaBusMessage;
}
| {
kind: "reaction-added";
accountId: string;
message: QaBusMessage;
emoji: string;
senderId: string;
};
export function createQaBusState() {
const conversations = new Map<string, QaBusConversation>();

View File

@@ -47,6 +47,14 @@
"../dist/plugin-sdk/src/plugin-sdk/secret-ref-runtime.d.ts"
],
"openclaw/plugin-sdk/ssrf-runtime": ["../dist/plugin-sdk/src/plugin-sdk/ssrf-runtime.d.ts"],
"@openclaw/qa-channel/*.js": [
"../dist/plugin-sdk/extensions/qa-channel/*.d.ts",
"../extensions/qa-channel/*"
],
"@openclaw/qa-channel/*": [
"../dist/plugin-sdk/extensions/qa-channel/*.d.ts",
"../extensions/qa-channel/*"
],
"@openclaw/*.js": ["../packages/plugin-sdk/dist/extensions/*.d.ts", "../extensions/*"],
"@openclaw/*": ["../packages/plugin-sdk/dist/extensions/*", "../extensions/*"],
"@openclaw/plugin-sdk/*": ["../dist/plugin-sdk/src/plugin-sdk/*.d.ts"]