diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 000000000..3876f8e04 --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,12 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": [ + "unicorn", + "typescript", + "oxc" + ], + "categories": { + "correctness": "error" + }, + "ignorePatterns": ["src/canvas-host/a2ui/a2ui.bundle.js"] +} diff --git a/.oxlintrc.jsonc b/.oxlintrc.jsonc deleted file mode 100644 index 115aa1a81..000000000 --- a/.oxlintrc.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/oxlintrc", - "extends": ["recommended"] -} diff --git a/CHANGELOG.md b/CHANGELOG.md index 527c637f4..b0c9ca8f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ ### Fixes - Sub-agents: route announce delivery through the correct channel account IDs. (#1061, #1058) — thanks @adam91holt. +- Repo: fix oxlint config filename and move ignore pattern into config. (#1064) — thanks @connorshea. - Messages: `/stop` now hard-aborts queued followups and sub-agent runs; suppress zero-count stop notes. - Sessions: reset `compactionCount` on `/new` and `/reset`, and preserve `sessions.json` file mode (0600). - Sessions: repair orphaned user turns before embedded prompts. diff --git a/package.json b/package.json index c3f7cf7bc..7df4f34b8 100644 --- a/package.json +++ b/package.json @@ -90,10 +90,10 @@ "mac:restart": "bash scripts/restart-mac.sh", "mac:package": "bash scripts/package-mac-app.sh", "mac:open": "open dist/Clawdbot.app", - "lint": "oxlint --type-aware src test --ignore-pattern src/canvas-host/a2ui/a2ui.bundle.js", + "lint": "oxlint --type-aware src test", "lint:swift": "swiftlint lint --config .swiftlint.yml && (cd apps/ios && swiftlint lint --config .swiftlint.yml)", "lint:all": "pnpm lint && pnpm lint:swift", - "lint:fix": "pnpm format:fix && oxlint --type-aware --fix src test --ignore-pattern src/canvas-host/a2ui/a2ui.bundle.js", + "lint:fix": "pnpm format:fix && oxlint --type-aware --fix src test", "format": "oxfmt --check src test", "format:swift": "swiftformat --lint --config .swiftformat apps/macos/Sources apps/ios/Sources apps/shared/ClawdbotKit/Sources", "format:all": "pnpm format && pnpm format:swift", diff --git a/src/agents/tools/message-tool.ts b/src/agents/tools/message-tool.ts index bf7e937aa..94a48d466 100644 --- a/src/agents/tools/message-tool.ts +++ b/src/agents/tools/message-tool.ts @@ -227,7 +227,7 @@ export function createMessageTool(options?: MessageToolOptions): AnyAgentTool { } } - if (result.toolResult) return result.toolResult; + if ("toolResult" in result && result.toolResult) return result.toolResult; return jsonResult(result.payload); }, }; diff --git a/src/auto-reply/reply/get-reply.ts b/src/auto-reply/reply/get-reply.ts index 614c34504..11b0c7e5b 100644 --- a/src/auto-reply/reply/get-reply.ts +++ b/src/auto-reply/reply/get-reply.ts @@ -100,6 +100,7 @@ export async function getReplyFromConfig( let { sessionCtx, sessionEntry, + previousSessionEntry, sessionStore, sessionKey, sessionId, diff --git a/src/infra/outbound/message-action-runner.ts b/src/infra/outbound/message-action-runner.ts index 93f375db1..ba4e52113 100644 --- a/src/infra/outbound/message-action-runner.ts +++ b/src/infra/outbound/message-action-runner.ts @@ -445,9 +445,9 @@ export async function runMessageAction( : null; const useTextMarker = !(channel === "discord" && marker?.discordEmbeds?.length); if (useTextMarker && (marker?.prefix || marker?.suffix)) { - const base = params.message ?? ""; - params.message = `${marker?.prefix ?? ""}${base}${marker?.suffix ?? ""}`; - message = params.message; + const merged = `${marker?.prefix ?? ""}${message}${marker?.suffix ?? ""}`; + params.message = merged; + message = merged; } const mediaUrl = readStringParam(params, "media", { trim: false });