refactor: cleanup shared constants and add async SDK support for isCallerOrchestrator

- Use shared OPENCODE_STORAGE, MESSAGE_STORAGE, PART_STORAGE constants
- Make isCallerOrchestrator async with SDK fallback for beta
- Fix cache implementation using Symbol sentinel
- Update atlas hooks and sisyphus-junior-notepad to use async isCallerOrchestrator
This commit is contained in:
YeonGyu-Kim
2026-02-14 19:24:30 +09:00
parent 1bb5a3a037
commit 068831f79e
8 changed files with 31 additions and 27 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ import { SYSTEM_DIRECTIVE_PREFIX } from "../../shared/system-directive"
import { log } from "../../shared/logger"
import { HOOK_NAME, NOTEPAD_DIRECTIVE } from "./constants"
export function createSisyphusJuniorNotepadHook(_ctx: PluginInput) {
export function createSisyphusJuniorNotepadHook(ctx: PluginInput) {
return {
"tool.execute.before": async (
input: { tool: string; sessionID: string; callID: string },
@@ -17,7 +17,7 @@ export function createSisyphusJuniorNotepadHook(_ctx: PluginInput) {
}
// 2. Check if caller is Atlas (orchestrator)
if (!isCallerOrchestrator(input.sessionID)) {
if (!(await isCallerOrchestrator(input.sessionID, ctx.client))) {
return
}