Add per-feature Cursor channel toggles for admin and runtime.
Memind CI / Test, build, and release guards (push) Has been cancelled

Expose page/data/scheduled-task/chat-bridge switches in the智趣体验通道 config so Tang can roll out Cursor paths independently with DeepSeek fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-31 09:40:52 +08:00
parent ac2c87be43
commit 617ff0d1dd
21 changed files with 915 additions and 127 deletions
+10 -2
View File
@@ -15,6 +15,7 @@ import {
cursorPageTasksDefaultEnabled,
resolvePreferredCodeExecutor,
} from './cursor-agent-launch.mjs';
import { isCursorTaskKindEnabled } from './cursor-channel-features.mjs';
const PUBLISH_SKILL_NAME = 'static-page-publish';
@@ -63,6 +64,7 @@ export function isPageCursorDefaultCandidate(userMessage, {
rawToolMode = 'chat',
env = process.env,
channelEligible = false,
policy = null,
} = {}) {
if (!cursorExecutorEnabled(env)) return false;
if (!channelEligible) return false;
@@ -77,7 +79,12 @@ export function isPageCursorDefaultCandidate(userMessage, {
const taskText = extractAiderDevelopmentTask(userMessage);
if (!taskText) return false;
return resolveCursorTaskKind(taskText, skill) !== null;
const taskKind = resolveCursorTaskKind(taskText, skill);
if (taskKind === null) return false;
if (policy?.enabled) {
return isCursorTaskKindEnabled(policy, taskKind);
}
return true;
}
function buildCursorPageInstruction(taskText) {
@@ -182,8 +189,9 @@ export function enforcePageGenerationCursorRuntime(userMessage, {
forceDeepReasoning = false,
env = process.env,
channelEligible = false,
policy = null,
} = {}) {
if (!isPageCursorDefaultCandidate(userMessage, { rawToolMode, env, channelEligible })) {
if (!isPageCursorDefaultCandidate(userMessage, { rawToolMode, env, channelEligible, policy })) {
return {
userMessage,
rawToolMode,