oh-my-claude-sisyphus 3.7.15 → 3.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +9 -4
- package/agents/AGENTS.md +8 -8
- package/agents/architect.md +32 -0
- package/agents/build-fixer.md +35 -0
- package/agents/code-reviewer.md +51 -0
- package/agents/executor-high.md +49 -0
- package/agents/explore-high.md +39 -0
- package/agents/explore-medium.md +33 -0
- package/bridge/mcp-server.cjs +57 -1
- package/dist/__tests__/hooks/learner/bridge.test.js +13 -7
- package/dist/__tests__/hooks/learner/bridge.test.js.map +1 -1
- package/dist/__tests__/hooks.test.js +338 -83
- package/dist/__tests__/hooks.test.js.map +1 -1
- package/dist/__tests__/installer.test.js +32 -16
- package/dist/__tests__/installer.test.js.map +1 -1
- package/dist/__tests__/lsp-servers.test.d.ts +2 -0
- package/dist/__tests__/lsp-servers.test.d.ts.map +1 -0
- package/dist/__tests__/lsp-servers.test.js +118 -0
- package/dist/__tests__/lsp-servers.test.js.map +1 -0
- package/dist/__tests__/task-continuation.test.d.ts +2 -0
- package/dist/__tests__/task-continuation.test.d.ts.map +1 -0
- package/dist/__tests__/task-continuation.test.js +740 -0
- package/dist/__tests__/task-continuation.test.js.map +1 -0
- package/dist/hooks/bridge.js +3 -3
- package/dist/hooks/bridge.js.map +1 -1
- package/dist/hooks/clear-suggestions/constants.d.ts +54 -0
- package/dist/hooks/clear-suggestions/constants.d.ts.map +1 -0
- package/dist/hooks/clear-suggestions/constants.js +102 -0
- package/dist/hooks/clear-suggestions/constants.js.map +1 -0
- package/dist/hooks/clear-suggestions/index.d.ts +61 -0
- package/dist/hooks/clear-suggestions/index.d.ts.map +1 -0
- package/dist/hooks/clear-suggestions/index.js +276 -0
- package/dist/hooks/clear-suggestions/index.js.map +1 -0
- package/dist/hooks/clear-suggestions/triggers.d.ts +65 -0
- package/dist/hooks/clear-suggestions/triggers.d.ts.map +1 -0
- package/dist/hooks/clear-suggestions/triggers.js +222 -0
- package/dist/hooks/clear-suggestions/triggers.js.map +1 -0
- package/dist/hooks/clear-suggestions/types.d.ts +92 -0
- package/dist/hooks/clear-suggestions/types.d.ts.map +1 -0
- package/dist/hooks/clear-suggestions/types.js +9 -0
- package/dist/hooks/clear-suggestions/types.js.map +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/keyword-detector/__tests__/index.test.js +51 -51
- package/dist/hooks/keyword-detector/__tests__/index.test.js.map +1 -1
- package/dist/hooks/keyword-detector/index.d.ts +1 -1
- package/dist/hooks/keyword-detector/index.d.ts.map +1 -1
- package/dist/hooks/keyword-detector/index.js +18 -5
- package/dist/hooks/keyword-detector/index.js.map +1 -1
- package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/index.js +6 -3
- package/dist/hooks/persistent-mode/index.js.map +1 -1
- package/dist/hooks/todo-continuation/index.d.ts +111 -3
- package/dist/hooks/todo-continuation/index.d.ts.map +1 -1
- package/dist/hooks/todo-continuation/index.js +204 -23
- package/dist/hooks/todo-continuation/index.js.map +1 -1
- package/dist/installer/index.d.ts +1 -1
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +1 -1
- package/dist/installer/index.js.map +1 -1
- package/dist/tools/lsp/client.d.ts.map +1 -1
- package/dist/tools/lsp/client.js +15 -1
- package/dist/tools/lsp/client.js.map +1 -1
- package/dist/tools/lsp/servers.d.ts.map +1 -1
- package/dist/tools/lsp/servers.js +62 -1
- package/dist/tools/lsp/servers.js.map +1 -1
- package/docs/CLAUDE.md +83 -0
- package/package.json +1 -1
- package/scripts/keyword-detector.mjs +203 -83
- package/scripts/post-tool-verifier.mjs +39 -1
- package/templates/hooks/keyword-detector.sh +197 -31
- package/templates/hooks/persistent-mode.mjs +57 -7
- package/templates/hooks/persistent-mode.sh +62 -5
- package/templates/hooks/stop-continuation.mjs +65 -8
- package/templates/hooks/stop-continuation.sh +57 -4
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
# Checks for incomplete todos and injects continuation prompt
|
|
4
4
|
# Ported from oh-my-opencode's todo-continuation-enforcer
|
|
5
5
|
|
|
6
|
+
# Validate session ID to prevent path traversal attacks
|
|
7
|
+
is_valid_session_id() {
|
|
8
|
+
local id="$1"
|
|
9
|
+
if [ -z "$id" ]; then
|
|
10
|
+
return 1
|
|
11
|
+
fi
|
|
12
|
+
if echo "$id" | grep -qE '^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$'; then
|
|
13
|
+
return 0
|
|
14
|
+
fi
|
|
15
|
+
return 1
|
|
16
|
+
}
|
|
17
|
+
|
|
6
18
|
# Read stdin
|
|
7
19
|
INPUT=$(cat)
|
|
8
20
|
|
|
@@ -12,6 +24,38 @@ if command -v jq &> /dev/null; then
|
|
|
12
24
|
SESSION_ID=$(echo "$INPUT" | jq -r '.sessionId // .session_id // ""' 2>/dev/null)
|
|
13
25
|
fi
|
|
14
26
|
|
|
27
|
+
# Check for incomplete tasks in new Task system
|
|
28
|
+
TASKS_DIR="$HOME/.claude/tasks"
|
|
29
|
+
TASK_COUNT=0
|
|
30
|
+
JQ_AVAILABLE=false
|
|
31
|
+
if command -v jq &> /dev/null; then
|
|
32
|
+
JQ_AVAILABLE=true
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
if [ -n "$SESSION_ID" ] && is_valid_session_id "$SESSION_ID" && [ -d "$TASKS_DIR/$SESSION_ID" ]; then
|
|
36
|
+
for task_file in "$TASKS_DIR/$SESSION_ID"/*.json; do
|
|
37
|
+
if [ -f "$task_file" ] && [ "$(basename "$task_file")" != ".lock" ]; then
|
|
38
|
+
if [ "$JQ_AVAILABLE" = "true" ]; then
|
|
39
|
+
STATUS=$(jq -r '.status // "pending"' "$task_file" 2>/dev/null)
|
|
40
|
+
# Match TypeScript isTaskIncomplete(): only pending/in_progress are incomplete
|
|
41
|
+
# 'deleted' and 'completed' are both treated as done
|
|
42
|
+
if [ "$STATUS" = "pending" ] || [ "$STATUS" = "in_progress" ]; then
|
|
43
|
+
TASK_COUNT=$((TASK_COUNT + 1))
|
|
44
|
+
fi
|
|
45
|
+
else
|
|
46
|
+
# Fallback: grep for incomplete status values (pending or in_progress)
|
|
47
|
+
if grep -qE '"status"[[:space:]]*:[[:space:]]*"(pending|in_progress)"' "$task_file" 2>/dev/null; then
|
|
48
|
+
TASK_COUNT=$((TASK_COUNT + 1))
|
|
49
|
+
fi
|
|
50
|
+
fi
|
|
51
|
+
fi
|
|
52
|
+
done
|
|
53
|
+
|
|
54
|
+
if [ "$JQ_AVAILABLE" = "false" ] && [ "$TASK_COUNT" -gt 0 ]; then
|
|
55
|
+
echo "[OMC WARNING] jq not installed - Task counting may be less accurate." >&2
|
|
56
|
+
fi
|
|
57
|
+
fi
|
|
58
|
+
|
|
15
59
|
# Check for incomplete todos in the Claude todos directory
|
|
16
60
|
TODOS_DIR="$HOME/.claude/todos"
|
|
17
61
|
if [ -d "$TODOS_DIR" ]; then
|
|
@@ -26,11 +70,20 @@ if [ -d "$TODOS_DIR" ]; then
|
|
|
26
70
|
fi
|
|
27
71
|
done
|
|
28
72
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
73
|
+
# Combine task and todo counts
|
|
74
|
+
TOTAL_INCOMPLETE=$((TASK_COUNT + INCOMPLETE_COUNT))
|
|
75
|
+
|
|
76
|
+
if [ "$TOTAL_INCOMPLETE" -gt 0 ]; then
|
|
77
|
+
# Use Task terminology if we have tasks, otherwise todos
|
|
78
|
+
if [ "$TASK_COUNT" -gt 0 ]; then
|
|
79
|
+
cat << EOF
|
|
80
|
+
{"continue": false, "reason": "[SYSTEM REMINDER - TASK CONTINUATION]\\n\\nIncomplete Tasks remain ($TOTAL_INCOMPLETE remaining). Continue working on the next pending Task.\\n\\n- Proceed without asking for permission\\n- Mark each Task complete when finished\\n- Do not stop until all Tasks are done"}
|
|
33
81
|
EOF
|
|
82
|
+
else
|
|
83
|
+
cat << EOF
|
|
84
|
+
{"continue": false, "reason": "[SYSTEM REMINDER - TODO CONTINUATION]\\n\\nIncomplete tasks remain in your todo list ($TOTAL_INCOMPLETE remaining). Continue working on the next pending task.\\n\\n- Proceed without asking for permission\\n- Mark each task complete when finished\\n- Do not stop until all tasks are done"}
|
|
85
|
+
EOF
|
|
86
|
+
fi
|
|
34
87
|
exit 0
|
|
35
88
|
fi
|
|
36
89
|
fi
|