feat(hooks): add sisyphus-junior-notepad hook for conditional notepad rules injection (#1092)
* refactor(shared): extract isCallerOrchestrator to session-utils * refactor(atlas): use shared isCallerOrchestrator, change to prepend * refactor(prometheus-md-only): change to prepend pattern * refactor(sisyphus-junior): remove Work_Context (moved to hook) * feat(hooks): add sisyphus-junior-notepad hook * fix(shared): replace dynamic require with static import in session-utils - Change from dynamic require to static import for better bundler compatibility - Fix import path: ../../features -> ../features - Add barrel export to src/shared/index.ts * feat(hooks): register sisyphus-junior-notepad hook - Add to HookNameSchema in schema.ts - Export from hooks/index.ts - Register with isHookEnabled in index.ts - Auto-generated schema.json update --------- Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
This commit is contained in:
@@ -89,10 +89,10 @@ export function createPrometheusMdOnlyHook(ctx: PluginInput) {
|
||||
const toolName = input.tool
|
||||
|
||||
// Inject read-only warning for task tools called by Prometheus
|
||||
if (TASK_TOOLS.includes(toolName)) {
|
||||
const prompt = output.args.prompt as string | undefined
|
||||
if (prompt && !prompt.includes(SYSTEM_DIRECTIVE_PREFIX)) {
|
||||
output.args.prompt = prompt + PLANNING_CONSULT_WARNING
|
||||
if (TASK_TOOLS.includes(toolName)) {
|
||||
const prompt = output.args.prompt as string | undefined
|
||||
if (prompt && !prompt.includes(SYSTEM_DIRECTIVE_PREFIX)) {
|
||||
output.args.prompt = PLANNING_CONSULT_WARNING + prompt
|
||||
log(`[${HOOK_NAME}] Injected read-only planning warning to ${toolName}`, {
|
||||
sessionID: input.sessionID,
|
||||
tool: toolName,
|
||||
|
||||
Reference in New Issue
Block a user