Skip to content

Commit 1649ea9

Browse files
Ace AutonomousAce Autonomous
authored andcommitted
fix(critical): _skillAction scoping — move to module scope
_skillAction was defined inside the /forge handler closure but called from validateAndDeploy at module scope. Every skill approval (both /forge approve and forge_approve_skill agent tool) would crash with ReferenceError. Moved to module scope where bold/mono are available.
1 parent 43913e1 commit 1649ea9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ import { analyzePatterns } from "./src/pattern/analyze.js";
1717
import { buildHierarchicalSkillIndex } from "./src/skill/index.js";
1818
import { notify } from "./src/notify.js";
1919
import { bold, mono, metric, compose, actions as fmtActions } from "./src/notify-format.js";
20+
21+
// Formatting helper for action notifications — module scope so validateAndDeploy can use it
22+
const _skillAction = (icon: string, verb: string, name: string): string =>
23+
`${icon} ${bold(verb)} ${mono(name)}`;
2024
import { resetLlmRateLimit } from "./src/skill/llm-generator.js";
2125
import {
2226
recordActivation,
@@ -578,10 +582,6 @@ function buildPlugin() {
578582
const sub = spaceIdx === -1 ? raw.toLowerCase() : raw.slice(0, spaceIdx).toLowerCase();
579583
const subArgs = spaceIdx === -1 ? "" : raw.slice(spaceIdx + 1).trim();
580584

581-
// Formatting helper for action notifications (uses notify-format.ts)
582-
const _skillAction = (icon: string, verb: string, name: string) =>
583-
`${icon} ${bold(verb)} ${mono(name)}`;
584-
585585
switch (sub) {
586586
// ── No subcommand: dashboard ──
587587
case "":

0 commit comments

Comments
 (0)