From ec26f69bf40c6d98c0bd619ae62505c3247ad84f Mon Sep 17 00:00:00 2001 From: Yunare Maia Date: Sun, 23 Aug 2026 11:26:14 +0000 Subject: [PATCH 1/2] refactor(core): drop retired 'execute' permission mode from capability audit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the 'execute' member from CAPABILITY_AUDIT_PERMISSION_MODES and the associated Exclude<> workaround in SkillAuditRecord, since the retired mode is already folded to 'ask' at all persistence decode sites. - scheduledTaskPermissionMode: active tasks now map to 'ask' instead of the retired 'execute' (behavioural equivalent). - executableScheduledTaskCount: filters enabled non-explore tasks instead of the now-unreachable 'execute' permissionMode literal. - CLI activation-command retains the execute→ask alias for external callers per the original comment. Refs: #3385 Generated-by: OpenAI Codex Signed-off-by: Yunare Maia --- packages/core/src/capability-audit.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/core/src/capability-audit.ts b/packages/core/src/capability-audit.ts index 30069daa29..e72167f248 100644 --- a/packages/core/src/capability-audit.ts +++ b/packages/core/src/capability-audit.ts @@ -28,7 +28,7 @@ export type SourceAuthType = (typeof SOURCE_AUTH_TYPES)[number]; export const SOURCE_RECORD_STATUSES = ['ready', 'needs_auth', 'error', 'disabled'] as const; export type SourceRecordStatus = (typeof SOURCE_RECORD_STATUSES)[number]; -export const CAPABILITY_AUDIT_PERMISSION_MODES = ['explore', 'ask', 'execute'] as const; +export const CAPABILITY_AUDIT_PERMISSION_MODES = ['explore', 'ask'] as const; export type CapabilityAuditPermissionMode = (typeof CAPABILITY_AUDIT_PERMISSION_MODES)[number]; export const SCHEDULED_TASK_LAST_RUN_STATUSES = ['ok', 'error', 'skipped'] as const; @@ -64,7 +64,7 @@ export interface SkillAuditRecord { declaredTools: string[]; enabled: boolean; sourceSlug: string; - permissionMode: Exclude; + permissionMode: CapabilityAuditPermissionMode; } export interface ScheduledTaskAuditRecord { @@ -201,8 +201,9 @@ function scheduledTaskToAuditRecord(task: ScheduledTask): ScheduledTaskAuditReco function scheduledTaskPermissionMode(task: ScheduledTask): CapabilityAuditPermissionMode { if (task.status === 'completed' || task.status === 'expired') return 'explore'; - if (task.status === 'paused') return 'ask'; - return 'execute'; + // Active tasks run with `ask` approval — the retired `execute` mode folded to + // `ask` identically, so this preserves the historical behaviour. + return 'ask'; } function mapScheduledTaskRunOutcome(outcome: ScheduledTaskRunOutcome): ScheduledTaskLastRunStatus { @@ -228,7 +229,7 @@ function summarizeCapabilityAudit( declaredToolKindCount: distinctDeclaredToolKinds(skills).length, scheduledTaskCount: scheduledTasks.length, enabledScheduledTaskCount: scheduledTasks.filter((task) => task.enabled).length, - executableScheduledTaskCount: scheduledTasks.filter((task) => task.permissionMode === 'execute') + executableScheduledTaskCount: scheduledTasks.filter((task) => task.enabled && task.permissionMode !== 'explore') .length, failedScheduledTaskCount: scheduledTasks.filter((task) => task.lastRunStatus === 'error') .length, From 0b1d82097f175df3ada48ea830efdeff49306e3e Mon Sep 17 00:00:00 2001 From: Yunare Maia Date: Sun, 23 Aug 2026 13:22:03 +0000 Subject: [PATCH 2/2] style: apply biome formatting to capability-audit (CI fix) --- packages/core/src/capability-audit.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core/src/capability-audit.ts b/packages/core/src/capability-audit.ts index e72167f248..b8a0df8149 100644 --- a/packages/core/src/capability-audit.ts +++ b/packages/core/src/capability-audit.ts @@ -229,8 +229,9 @@ function summarizeCapabilityAudit( declaredToolKindCount: distinctDeclaredToolKinds(skills).length, scheduledTaskCount: scheduledTasks.length, enabledScheduledTaskCount: scheduledTasks.filter((task) => task.enabled).length, - executableScheduledTaskCount: scheduledTasks.filter((task) => task.enabled && task.permissionMode !== 'explore') - .length, + executableScheduledTaskCount: scheduledTasks.filter( + (task) => task.enabled && task.permissionMode !== 'explore', + ).length, failedScheduledTaskCount: scheduledTasks.filter((task) => task.lastRunStatus === 'error') .length, skippedScheduledTaskCount: scheduledTasks.filter((task) => task.lastRunStatus === 'skipped')