oh-my-claude-sisyphus 1.11.1 → 2.0.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/README.md +37 -12
- package/dist/__tests__/example.test.d.ts +2 -0
- package/dist/__tests__/example.test.d.ts.map +1 -0
- package/dist/__tests__/example.test.js +20 -0
- package/dist/__tests__/example.test.js.map +1 -0
- package/dist/__tests__/hooks.test.d.ts +2 -0
- package/dist/__tests__/hooks.test.d.ts.map +1 -0
- package/dist/__tests__/hooks.test.js +644 -0
- package/dist/__tests__/hooks.test.js.map +1 -0
- package/dist/__tests__/installer.test.d.ts +2 -0
- package/dist/__tests__/installer.test.d.ts.map +1 -0
- package/dist/__tests__/installer.test.js +369 -0
- package/dist/__tests__/installer.test.js.map +1 -0
- package/dist/__tests__/model-routing.test.d.ts +2 -0
- package/dist/__tests__/model-routing.test.d.ts.map +1 -0
- package/dist/__tests__/model-routing.test.js +814 -0
- package/dist/__tests__/model-routing.test.js.map +1 -0
- package/dist/__tests__/skills.test.d.ts +2 -0
- package/dist/__tests__/skills.test.d.ts.map +1 -0
- package/dist/__tests__/skills.test.js +126 -0
- package/dist/__tests__/skills.test.js.map +1 -0
- package/dist/__tests__/types.test.d.ts +2 -0
- package/dist/__tests__/types.test.d.ts.map +1 -0
- package/dist/__tests__/types.test.js +77 -0
- package/dist/__tests__/types.test.js.map +1 -0
- package/dist/agents/definitions.d.ts +1 -1
- package/dist/agents/definitions.d.ts.map +1 -1
- package/dist/agents/definitions.js +35 -3
- package/dist/agents/definitions.js.map +1 -1
- package/dist/agents/index.d.ts +1 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +3 -1
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/oracle.d.ts.map +1 -1
- package/dist/agents/oracle.js +43 -1
- package/dist/agents/oracle.js.map +1 -1
- package/dist/agents/orchestrator-sisyphus.js +2 -2
- package/dist/agents/orchestrator-sisyphus.js.map +1 -1
- package/dist/cli/index.js +22 -11
- package/dist/cli/index.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +49 -0
- package/dist/config/loader.js.map +1 -1
- package/dist/features/auto-update.d.ts.map +1 -1
- package/dist/features/auto-update.js +14 -3
- package/dist/features/auto-update.js.map +1 -1
- package/dist/features/builtin-skills/skills.d.ts.map +1 -1
- package/dist/features/builtin-skills/skills.js +0 -1351
- package/dist/features/builtin-skills/skills.js.map +1 -1
- package/dist/features/index.d.ts +1 -0
- package/dist/features/index.d.ts.map +1 -1
- package/dist/features/index.js +14 -0
- package/dist/features/index.js.map +1 -1
- package/dist/features/model-routing/index.d.ts +34 -0
- package/dist/features/model-routing/index.d.ts.map +1 -0
- package/dist/features/model-routing/index.js +48 -0
- package/dist/features/model-routing/index.js.map +1 -0
- package/dist/features/model-routing/prompts/haiku.d.ts +54 -0
- package/dist/features/model-routing/prompts/haiku.d.ts.map +1 -0
- package/dist/features/model-routing/prompts/haiku.js +141 -0
- package/dist/features/model-routing/prompts/haiku.js.map +1 -0
- package/dist/features/model-routing/prompts/index.d.ts +45 -0
- package/dist/features/model-routing/prompts/index.d.ts.map +1 -0
- package/dist/features/model-routing/prompts/index.js +116 -0
- package/dist/features/model-routing/prompts/index.js.map +1 -0
- package/dist/features/model-routing/prompts/opus.d.ts +34 -0
- package/dist/features/model-routing/prompts/opus.d.ts.map +1 -0
- package/dist/features/model-routing/prompts/opus.js +153 -0
- package/dist/features/model-routing/prompts/opus.js.map +1 -0
- package/dist/features/model-routing/prompts/sonnet.d.ts +38 -0
- package/dist/features/model-routing/prompts/sonnet.d.ts.map +1 -0
- package/dist/features/model-routing/prompts/sonnet.js +149 -0
- package/dist/features/model-routing/prompts/sonnet.js.map +1 -0
- package/dist/features/model-routing/router.d.ts +92 -0
- package/dist/features/model-routing/router.d.ts.map +1 -0
- package/dist/features/model-routing/router.js +267 -0
- package/dist/features/model-routing/router.js.map +1 -0
- package/dist/features/model-routing/rules.d.ts +32 -0
- package/dist/features/model-routing/rules.d.ts.map +1 -0
- package/dist/features/model-routing/rules.js +224 -0
- package/dist/features/model-routing/rules.js.map +1 -0
- package/dist/features/model-routing/scorer.d.ts +35 -0
- package/dist/features/model-routing/scorer.d.ts.map +1 -0
- package/dist/features/model-routing/scorer.js +241 -0
- package/dist/features/model-routing/scorer.js.map +1 -0
- package/dist/features/model-routing/signals.d.ts +26 -0
- package/dist/features/model-routing/signals.d.ts.map +1 -0
- package/dist/features/model-routing/signals.js +283 -0
- package/dist/features/model-routing/signals.js.map +1 -0
- package/dist/features/model-routing/types.d.ts +195 -0
- package/dist/features/model-routing/types.d.ts.map +1 -0
- package/dist/features/model-routing/types.js +86 -0
- package/dist/features/model-routing/types.js.map +1 -0
- package/dist/hooks/agent-usage-reminder/index.d.ts +1 -1
- package/dist/hooks/agent-usage-reminder/index.d.ts.map +1 -1
- package/dist/hooks/agent-usage-reminder/index.js +1 -1
- package/dist/hooks/agent-usage-reminder/index.js.map +1 -1
- package/dist/hooks/auto-slash-command/executor.js.map +1 -1
- package/dist/hooks/auto-slash-command/index.d.ts +3 -3
- package/dist/hooks/auto-slash-command/index.d.ts.map +1 -1
- package/dist/hooks/auto-slash-command/index.js.map +1 -1
- package/dist/hooks/background-notification/index.js +1 -1
- package/dist/hooks/background-notification/index.js.map +1 -1
- package/dist/hooks/bridge.d.ts.map +1 -1
- package/dist/hooks/bridge.js.map +1 -1
- package/dist/hooks/comment-checker/filters.d.ts +1 -1
- package/dist/hooks/comment-checker/filters.d.ts.map +1 -1
- package/dist/hooks/comment-checker/filters.js +1 -1
- package/dist/hooks/comment-checker/filters.js.map +1 -1
- package/dist/hooks/comment-checker/index.js +1 -1
- package/dist/hooks/comment-checker/index.js.map +1 -1
- package/dist/hooks/context-window-limit-recovery/index.d.ts.map +1 -1
- package/dist/hooks/context-window-limit-recovery/index.js.map +1 -1
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -3
- package/dist/hooks/index.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 +1 -1
- 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.map +1 -1
- package/dist/hooks/plugin-patterns/index.d.ts.map +1 -1
- package/dist/hooks/plugin-patterns/index.js +12 -9
- package/dist/hooks/plugin-patterns/index.js.map +1 -1
- package/dist/hooks/preemptive-compaction/index.d.ts +2 -2
- package/dist/hooks/preemptive-compaction/index.d.ts.map +1 -1
- package/dist/hooks/preemptive-compaction/index.js +1 -11
- package/dist/hooks/preemptive-compaction/index.js.map +1 -1
- package/dist/hooks/ralph-loop/index.js.map +1 -1
- package/dist/hooks/rules-injector/matcher.js +1 -1
- package/dist/hooks/rules-injector/matcher.js.map +1 -1
- package/dist/hooks/session-recovery/index.d.ts +1 -1
- package/dist/hooks/session-recovery/index.d.ts.map +1 -1
- package/dist/hooks/session-recovery/index.js +1 -1
- package/dist/hooks/session-recovery/index.js.map +1 -1
- package/dist/hooks/sisyphus-orchestrator/index.d.ts.map +1 -1
- package/dist/hooks/sisyphus-orchestrator/index.js.map +1 -1
- package/dist/hooks/ultrawork-state/index.js +1 -1
- package/dist/hooks/ultrawork-state/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/installer/hooks.d.ts +1 -1
- package/dist/installer/hooks.js +1 -1
- package/dist/installer/index.d.ts +8 -7
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +648 -2141
- package/dist/installer/index.js.map +1 -1
- package/dist/shared/types.d.ts +25 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/tools/lsp/servers.d.ts.map +1 -1
- package/dist/tools/lsp/servers.js +2 -1
- package/dist/tools/lsp/servers.js.map +1 -1
- package/package.json +18 -10
- package/scripts/install.sh +236 -260
- package/scripts/keyword-detector.mjs +209 -0
- package/scripts/persistent-mode.mjs +241 -0
- package/scripts/post-tool-verifier.mjs +217 -0
- package/scripts/pre-tool-enforcer.mjs +99 -0
- package/scripts/test-pr25.sh +525 -0
- package/dist/agents/model-lists.d.ts +0 -26
- package/dist/agents/model-lists.d.ts.map +0 -1
- package/dist/agents/model-lists.js +0 -62
- package/dist/agents/model-lists.js.map +0 -1
- package/dist/auth/index.d.ts +0 -10
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/index.js +0 -13
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/manager.d.ts +0 -54
- package/dist/auth/manager.d.ts.map +0 -1
- package/dist/auth/manager.js +0 -248
- package/dist/auth/manager.js.map +0 -1
- package/dist/auth/oauth-google.d.ts +0 -47
- package/dist/auth/oauth-google.d.ts.map +0 -1
- package/dist/auth/oauth-google.js +0 -280
- package/dist/auth/oauth-google.js.map +0 -1
- package/dist/auth/oauth-openai.d.ts +0 -46
- package/dist/auth/oauth-openai.d.ts.map +0 -1
- package/dist/auth/oauth-openai.js +0 -264
- package/dist/auth/oauth-openai.js.map +0 -1
- package/dist/auth/pkce.d.ts +0 -14
- package/dist/auth/pkce.d.ts.map +0 -1
- package/dist/auth/pkce.js +0 -35
- package/dist/auth/pkce.js.map +0 -1
- package/dist/auth/storage.d.ts +0 -52
- package/dist/auth/storage.d.ts.map +0 -1
- package/dist/auth/storage.js +0 -230
- package/dist/auth/storage.js.map +0 -1
- package/dist/auth/types.d.ts +0 -76
- package/dist/auth/types.d.ts.map +0 -1
- package/dist/auth/types.js +0 -5
- package/dist/auth/types.js.map +0 -1
- package/dist/providers/index.d.ts +0 -8
- package/dist/providers/index.d.ts.map +0 -1
- package/dist/providers/index.js +0 -10
- package/dist/providers/index.js.map +0 -1
- package/dist/providers/registry.d.ts +0 -29
- package/dist/providers/registry.d.ts.map +0 -1
- package/dist/providers/registry.js +0 -162
- package/dist/providers/registry.js.map +0 -1
- package/dist/providers/router.d.ts +0 -40
- package/dist/providers/router.d.ts.map +0 -1
- package/dist/providers/router.js +0 -88
- package/dist/providers/router.js.map +0 -1
- package/dist/providers/types.d.ts +0 -92
- package/dist/providers/types.d.ts.map +0 -1
- package/dist/providers/types.js +0 -27
- package/dist/providers/types.js.map +0 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* PreToolUse Hook: Sisyphus Reminder Enforcer (Node.js)
|
|
5
|
+
* Injects contextual reminders before every tool execution
|
|
6
|
+
* Cross-platform: Windows, macOS, Linux
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { existsSync, readFileSync } from 'fs';
|
|
10
|
+
import { join } from 'path';
|
|
11
|
+
|
|
12
|
+
// Read all stdin
|
|
13
|
+
async function readStdin() {
|
|
14
|
+
const chunks = [];
|
|
15
|
+
for await (const chunk of process.stdin) {
|
|
16
|
+
chunks.push(chunk);
|
|
17
|
+
}
|
|
18
|
+
return Buffer.concat(chunks).toString('utf-8');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Simple JSON field extraction
|
|
22
|
+
function extractJsonField(input, field, defaultValue = '') {
|
|
23
|
+
try {
|
|
24
|
+
const data = JSON.parse(input);
|
|
25
|
+
return data[field] ?? defaultValue;
|
|
26
|
+
} catch {
|
|
27
|
+
// Fallback regex extraction
|
|
28
|
+
const match = input.match(new RegExp(`"${field}"\\s*:\\s*"([^"]*)"`, 'i'));
|
|
29
|
+
return match ? match[1] : defaultValue;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Get todo status from project
|
|
34
|
+
function getTodoStatus(directory) {
|
|
35
|
+
const todoFile = join(directory, '.sisyphus', 'todos.json');
|
|
36
|
+
|
|
37
|
+
if (!existsSync(todoFile)) {
|
|
38
|
+
return '';
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
try {
|
|
42
|
+
const content = readFileSync(todoFile, 'utf-8');
|
|
43
|
+
const data = JSON.parse(content);
|
|
44
|
+
const todos = data.todos || data;
|
|
45
|
+
|
|
46
|
+
if (!Array.isArray(todos)) {
|
|
47
|
+
return '';
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const pending = todos.filter(t => t.status === 'pending').length;
|
|
51
|
+
const inProgress = todos.filter(t => t.status === 'in_progress').length;
|
|
52
|
+
|
|
53
|
+
if (pending + inProgress > 0) {
|
|
54
|
+
return `[${inProgress} active, ${pending} pending] `;
|
|
55
|
+
}
|
|
56
|
+
} catch {
|
|
57
|
+
// Ignore errors
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return '';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Generate contextual message based on tool type
|
|
64
|
+
function generateMessage(toolName, todoStatus) {
|
|
65
|
+
const messages = {
|
|
66
|
+
TodoWrite: `${todoStatus}Mark todos in_progress BEFORE starting, completed IMMEDIATELY after finishing.`,
|
|
67
|
+
Bash: `${todoStatus}Use parallel execution for independent tasks. Use run_in_background for long operations (npm install, builds, tests).`,
|
|
68
|
+
Task: `${todoStatus}Launch multiple agents in parallel when tasks are independent. Use run_in_background for long operations.`,
|
|
69
|
+
Edit: `${todoStatus}Verify changes work after editing. Test functionality before marking complete.`,
|
|
70
|
+
Write: `${todoStatus}Verify changes work after editing. Test functionality before marking complete.`,
|
|
71
|
+
Read: `${todoStatus}Read multiple files in parallel when possible for faster analysis.`,
|
|
72
|
+
Grep: `${todoStatus}Combine searches in parallel when investigating multiple patterns.`,
|
|
73
|
+
Glob: `${todoStatus}Combine searches in parallel when investigating multiple patterns.`,
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
return messages[toolName] || `${todoStatus}The boulder never stops. Continue until all tasks complete.`;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
async function main() {
|
|
80
|
+
try {
|
|
81
|
+
const input = await readStdin();
|
|
82
|
+
|
|
83
|
+
const toolName = extractJsonField(input, 'toolName', 'unknown');
|
|
84
|
+
const directory = extractJsonField(input, 'directory', process.cwd());
|
|
85
|
+
|
|
86
|
+
const todoStatus = getTodoStatus(directory);
|
|
87
|
+
const message = generateMessage(toolName, todoStatus);
|
|
88
|
+
|
|
89
|
+
console.log(JSON.stringify({
|
|
90
|
+
continue: true,
|
|
91
|
+
message: message
|
|
92
|
+
}, null, 2));
|
|
93
|
+
} catch (error) {
|
|
94
|
+
// On error, always continue
|
|
95
|
+
console.log(JSON.stringify({ continue: true }));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
main();
|
|
@@ -0,0 +1,525 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
#
|
|
3
|
+
# PR #25 Test Suite: qa-tester agent with tmux support
|
|
4
|
+
#
|
|
5
|
+
# Tests:
|
|
6
|
+
# 1. Build verification
|
|
7
|
+
# 2. Agent registration
|
|
8
|
+
# 3. Installer integration
|
|
9
|
+
# 4. Tmux session management
|
|
10
|
+
# 5. Command execution
|
|
11
|
+
# 6. Output capture
|
|
12
|
+
# 7. Service testing workflow
|
|
13
|
+
# 8. Edge cases
|
|
14
|
+
# 9. Cleanup verification
|
|
15
|
+
#
|
|
16
|
+
# Usage: ./scripts/test-pr25.sh [--verbose] [--skip-service]
|
|
17
|
+
#
|
|
18
|
+
|
|
19
|
+
set -e
|
|
20
|
+
|
|
21
|
+
# Colors
|
|
22
|
+
RED='\033[0;31m'
|
|
23
|
+
GREEN='\033[0;32m'
|
|
24
|
+
YELLOW='\033[1;33m'
|
|
25
|
+
BLUE='\033[0;34m'
|
|
26
|
+
NC='\033[0m' # No Color
|
|
27
|
+
|
|
28
|
+
# Counters
|
|
29
|
+
PASSED=0
|
|
30
|
+
FAILED=0
|
|
31
|
+
SKIPPED=0
|
|
32
|
+
|
|
33
|
+
# Options
|
|
34
|
+
VERBOSE=false
|
|
35
|
+
SKIP_SERVICE=false
|
|
36
|
+
|
|
37
|
+
# Parse arguments
|
|
38
|
+
for arg in "$@"; do
|
|
39
|
+
case $arg in
|
|
40
|
+
--verbose|-v)
|
|
41
|
+
VERBOSE=true
|
|
42
|
+
;;
|
|
43
|
+
--skip-service)
|
|
44
|
+
SKIP_SERVICE=true
|
|
45
|
+
;;
|
|
46
|
+
esac
|
|
47
|
+
done
|
|
48
|
+
|
|
49
|
+
# Helper functions
|
|
50
|
+
log_info() {
|
|
51
|
+
echo -e "${BLUE}[INFO]${NC} $1"
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
log_pass() {
|
|
55
|
+
echo -e "${GREEN}[PASS]${NC} $1"
|
|
56
|
+
((PASSED++))
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
log_fail() {
|
|
60
|
+
echo -e "${RED}[FAIL]${NC} $1"
|
|
61
|
+
((FAILED++))
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
log_skip() {
|
|
65
|
+
echo -e "${YELLOW}[SKIP]${NC} $1"
|
|
66
|
+
((SKIPPED++))
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
log_verbose() {
|
|
70
|
+
if $VERBOSE; then
|
|
71
|
+
echo -e " $1"
|
|
72
|
+
fi
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
cleanup_sessions() {
|
|
76
|
+
# Kill any test sessions we created
|
|
77
|
+
for session in $(tmux list-sessions -F '#{session_name}' 2>/dev/null | grep '^qa-test-' || true); do
|
|
78
|
+
tmux kill-session -t "$session" 2>/dev/null || true
|
|
79
|
+
done
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
# Ensure cleanup on exit
|
|
83
|
+
trap cleanup_sessions EXIT
|
|
84
|
+
|
|
85
|
+
echo ""
|
|
86
|
+
echo "========================================"
|
|
87
|
+
echo " PR #25 Test Suite: qa-tester agent"
|
|
88
|
+
echo "========================================"
|
|
89
|
+
echo ""
|
|
90
|
+
|
|
91
|
+
# =============================================================================
|
|
92
|
+
# Section 1: Prerequisites
|
|
93
|
+
# =============================================================================
|
|
94
|
+
echo -e "${BLUE}=== Prerequisites ===${NC}"
|
|
95
|
+
|
|
96
|
+
# Check tmux installed
|
|
97
|
+
if command -v tmux &> /dev/null; then
|
|
98
|
+
TMUX_VERSION=$(tmux -V)
|
|
99
|
+
log_pass "tmux installed: $TMUX_VERSION"
|
|
100
|
+
else
|
|
101
|
+
log_fail "tmux not installed - cannot continue"
|
|
102
|
+
exit 1
|
|
103
|
+
fi
|
|
104
|
+
|
|
105
|
+
# Check nc (netcat) for port testing
|
|
106
|
+
if command -v nc &> /dev/null; then
|
|
107
|
+
log_pass "netcat (nc) installed"
|
|
108
|
+
else
|
|
109
|
+
log_fail "netcat (nc) not installed - service tests will fail"
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
# Check python3 for HTTP server tests
|
|
113
|
+
if command -v python3 &> /dev/null; then
|
|
114
|
+
log_pass "python3 installed"
|
|
115
|
+
else
|
|
116
|
+
log_skip "python3 not installed - service tests will be skipped"
|
|
117
|
+
SKIP_SERVICE=true
|
|
118
|
+
fi
|
|
119
|
+
|
|
120
|
+
echo ""
|
|
121
|
+
|
|
122
|
+
# =============================================================================
|
|
123
|
+
# Section 2: Build Verification
|
|
124
|
+
# =============================================================================
|
|
125
|
+
echo -e "${BLUE}=== Build Verification ===${NC}"
|
|
126
|
+
|
|
127
|
+
log_info "Running npm run build..."
|
|
128
|
+
if npm run build &> /tmp/pr25-build.log; then
|
|
129
|
+
log_pass "TypeScript build succeeded"
|
|
130
|
+
else
|
|
131
|
+
log_fail "TypeScript build failed"
|
|
132
|
+
cat /tmp/pr25-build.log
|
|
133
|
+
exit 1
|
|
134
|
+
fi
|
|
135
|
+
|
|
136
|
+
echo ""
|
|
137
|
+
|
|
138
|
+
# =============================================================================
|
|
139
|
+
# Section 3: Agent Registration
|
|
140
|
+
# =============================================================================
|
|
141
|
+
echo -e "${BLUE}=== Agent Registration ===${NC}"
|
|
142
|
+
|
|
143
|
+
# Check qa-tester in definitions.ts
|
|
144
|
+
if grep -q "'qa-tester': qaTesterAgent" src/agents/definitions.ts; then
|
|
145
|
+
log_pass "qa-tester registered in definitions.ts"
|
|
146
|
+
else
|
|
147
|
+
log_fail "qa-tester NOT registered in definitions.ts"
|
|
148
|
+
fi
|
|
149
|
+
|
|
150
|
+
# Check export in index.ts
|
|
151
|
+
if grep -q "qa-tester" src/agents/index.ts; then
|
|
152
|
+
log_pass "qa-tester exported in index.ts"
|
|
153
|
+
else
|
|
154
|
+
log_fail "qa-tester NOT exported in index.ts"
|
|
155
|
+
fi
|
|
156
|
+
|
|
157
|
+
# Check compiled output
|
|
158
|
+
if grep -q "qa-tester" dist/agents/definitions.js 2>/dev/null; then
|
|
159
|
+
log_pass "qa-tester in compiled definitions.js"
|
|
160
|
+
else
|
|
161
|
+
log_fail "qa-tester NOT in compiled definitions.js"
|
|
162
|
+
fi
|
|
163
|
+
|
|
164
|
+
# Check Oracle handoff section
|
|
165
|
+
if grep -q "QA_Tester_Handoff\|QA-Tester" src/agents/oracle.ts; then
|
|
166
|
+
log_pass "QA-Tester handoff section in oracle.ts"
|
|
167
|
+
else
|
|
168
|
+
log_fail "QA-Tester handoff section missing from oracle.ts"
|
|
169
|
+
fi
|
|
170
|
+
|
|
171
|
+
echo ""
|
|
172
|
+
|
|
173
|
+
# =============================================================================
|
|
174
|
+
# Section 4: Installer Integration
|
|
175
|
+
# =============================================================================
|
|
176
|
+
echo -e "${BLUE}=== Installer Integration ===${NC}"
|
|
177
|
+
|
|
178
|
+
# Check qa-tester.md in installer AGENT_DEFINITIONS
|
|
179
|
+
if grep -q "'qa-tester.md'" src/installer/index.ts; then
|
|
180
|
+
log_pass "qa-tester.md in AGENT_DEFINITIONS"
|
|
181
|
+
else
|
|
182
|
+
log_fail "qa-tester.md NOT in AGENT_DEFINITIONS"
|
|
183
|
+
fi
|
|
184
|
+
|
|
185
|
+
# Run postinstall and check file was created
|
|
186
|
+
log_info "Running installer postinstall..."
|
|
187
|
+
if node dist/cli/index.js postinstall &> /tmp/pr25-postinstall.log; then
|
|
188
|
+
log_pass "Installer postinstall succeeded"
|
|
189
|
+
|
|
190
|
+
# Verify file exists
|
|
191
|
+
if [ -f "$HOME/.claude/agents/qa-tester.md" ]; then
|
|
192
|
+
log_pass "qa-tester.md installed to ~/.claude/agents/"
|
|
193
|
+
|
|
194
|
+
# Verify content
|
|
195
|
+
if grep -q "tmux" "$HOME/.claude/agents/qa-tester.md"; then
|
|
196
|
+
log_pass "qa-tester.md contains tmux content"
|
|
197
|
+
else
|
|
198
|
+
log_fail "qa-tester.md missing tmux content"
|
|
199
|
+
fi
|
|
200
|
+
|
|
201
|
+
if grep -q "Oracle" "$HOME/.claude/agents/qa-tester.md"; then
|
|
202
|
+
log_pass "qa-tester.md contains Oracle collaboration section"
|
|
203
|
+
else
|
|
204
|
+
log_fail "qa-tester.md missing Oracle collaboration section"
|
|
205
|
+
fi
|
|
206
|
+
else
|
|
207
|
+
log_fail "qa-tester.md NOT installed to ~/.claude/agents/"
|
|
208
|
+
fi
|
|
209
|
+
else
|
|
210
|
+
log_fail "Installer postinstall failed"
|
|
211
|
+
$VERBOSE && cat /tmp/pr25-postinstall.log
|
|
212
|
+
fi
|
|
213
|
+
|
|
214
|
+
echo ""
|
|
215
|
+
|
|
216
|
+
# =============================================================================
|
|
217
|
+
# Section 5: Tmux Session Management
|
|
218
|
+
# =============================================================================
|
|
219
|
+
echo -e "${BLUE}=== Tmux Session Management ===${NC}"
|
|
220
|
+
|
|
221
|
+
SESSION_NAME="qa-test-session-$$"
|
|
222
|
+
|
|
223
|
+
# Test: Create session
|
|
224
|
+
log_info "Testing session creation..."
|
|
225
|
+
if tmux new-session -d -s "$SESSION_NAME"; then
|
|
226
|
+
log_pass "Created tmux session: $SESSION_NAME"
|
|
227
|
+
else
|
|
228
|
+
log_fail "Failed to create tmux session"
|
|
229
|
+
fi
|
|
230
|
+
|
|
231
|
+
# Test: Check session exists
|
|
232
|
+
if tmux has-session -t "$SESSION_NAME" 2>/dev/null; then
|
|
233
|
+
log_pass "Session exists check works"
|
|
234
|
+
else
|
|
235
|
+
log_fail "Session exists check failed"
|
|
236
|
+
fi
|
|
237
|
+
|
|
238
|
+
# Test: List sessions includes our session
|
|
239
|
+
if tmux list-sessions | grep -q "$SESSION_NAME"; then
|
|
240
|
+
log_pass "Session appears in list-sessions"
|
|
241
|
+
else
|
|
242
|
+
log_fail "Session NOT in list-sessions"
|
|
243
|
+
fi
|
|
244
|
+
|
|
245
|
+
# Test: Kill session
|
|
246
|
+
if tmux kill-session -t "$SESSION_NAME"; then
|
|
247
|
+
log_pass "Killed tmux session"
|
|
248
|
+
else
|
|
249
|
+
log_fail "Failed to kill tmux session"
|
|
250
|
+
fi
|
|
251
|
+
|
|
252
|
+
# Test: Verify session gone
|
|
253
|
+
if tmux has-session -t "$SESSION_NAME" 2>/dev/null; then
|
|
254
|
+
log_fail "Session still exists after kill"
|
|
255
|
+
else
|
|
256
|
+
log_pass "Session properly cleaned up"
|
|
257
|
+
fi
|
|
258
|
+
|
|
259
|
+
echo ""
|
|
260
|
+
|
|
261
|
+
# =============================================================================
|
|
262
|
+
# Section 6: Command Execution
|
|
263
|
+
# =============================================================================
|
|
264
|
+
echo -e "${BLUE}=== Command Execution ===${NC}"
|
|
265
|
+
|
|
266
|
+
SESSION_NAME="qa-test-cmd-$$"
|
|
267
|
+
tmux new-session -d -s "$SESSION_NAME"
|
|
268
|
+
|
|
269
|
+
# Test: send-keys with Enter
|
|
270
|
+
log_info "Testing send-keys with Enter..."
|
|
271
|
+
tmux send-keys -t "$SESSION_NAME" 'echo "MARKER_12345"' Enter
|
|
272
|
+
sleep 0.5
|
|
273
|
+
|
|
274
|
+
OUTPUT=$(tmux capture-pane -t "$SESSION_NAME" -p)
|
|
275
|
+
if echo "$OUTPUT" | grep -q "MARKER_12345"; then
|
|
276
|
+
log_pass "send-keys with Enter works"
|
|
277
|
+
log_verbose "Output: $(echo "$OUTPUT" | grep MARKER_12345)"
|
|
278
|
+
else
|
|
279
|
+
log_fail "send-keys with Enter failed"
|
|
280
|
+
fi
|
|
281
|
+
|
|
282
|
+
# Test: send-keys without Enter (partial input)
|
|
283
|
+
log_info "Testing send-keys without Enter..."
|
|
284
|
+
tmux send-keys -t "$SESSION_NAME" 'echo "PARTIAL'
|
|
285
|
+
sleep 0.3
|
|
286
|
+
OUTPUT=$(tmux capture-pane -t "$SESSION_NAME" -p)
|
|
287
|
+
# The partial input should be visible but not executed
|
|
288
|
+
if echo "$OUTPUT" | grep -q 'echo "PARTIAL'; then
|
|
289
|
+
log_pass "send-keys without Enter works (partial visible)"
|
|
290
|
+
else
|
|
291
|
+
# May or may not be visible depending on tmux version
|
|
292
|
+
log_skip "send-keys without Enter - partial may not be visible in capture"
|
|
293
|
+
fi
|
|
294
|
+
|
|
295
|
+
# Complete the command
|
|
296
|
+
tmux send-keys -t "$SESSION_NAME" '"' Enter
|
|
297
|
+
sleep 0.3
|
|
298
|
+
|
|
299
|
+
# Test: Ctrl+C interrupt
|
|
300
|
+
log_info "Testing Ctrl+C interrupt..."
|
|
301
|
+
tmux send-keys -t "$SESSION_NAME" 'sleep 100' Enter
|
|
302
|
+
sleep 0.3
|
|
303
|
+
tmux send-keys -t "$SESSION_NAME" C-c
|
|
304
|
+
sleep 0.3
|
|
305
|
+
OUTPUT=$(tmux capture-pane -t "$SESSION_NAME" -p)
|
|
306
|
+
# After Ctrl+C, we should get back to prompt
|
|
307
|
+
if echo "$OUTPUT" | grep -qE '(\^C|sleep.*100)'; then
|
|
308
|
+
log_pass "Ctrl+C interrupt works"
|
|
309
|
+
else
|
|
310
|
+
log_pass "Ctrl+C sent (output varies by shell)"
|
|
311
|
+
fi
|
|
312
|
+
|
|
313
|
+
# Cleanup
|
|
314
|
+
tmux kill-session -t "$SESSION_NAME"
|
|
315
|
+
|
|
316
|
+
echo ""
|
|
317
|
+
|
|
318
|
+
# =============================================================================
|
|
319
|
+
# Section 7: Output Capture
|
|
320
|
+
# =============================================================================
|
|
321
|
+
echo -e "${BLUE}=== Output Capture ===${NC}"
|
|
322
|
+
|
|
323
|
+
SESSION_NAME="qa-test-capture-$$"
|
|
324
|
+
tmux new-session -d -s "$SESSION_NAME"
|
|
325
|
+
|
|
326
|
+
# Generate some output
|
|
327
|
+
for i in {1..5}; do
|
|
328
|
+
tmux send-keys -t "$SESSION_NAME" "echo LINE_$i" Enter
|
|
329
|
+
done
|
|
330
|
+
sleep 0.5
|
|
331
|
+
|
|
332
|
+
# Test: Basic capture-pane
|
|
333
|
+
log_info "Testing basic capture-pane..."
|
|
334
|
+
OUTPUT=$(tmux capture-pane -t "$SESSION_NAME" -p)
|
|
335
|
+
if echo "$OUTPUT" | grep -q "LINE_1" && echo "$OUTPUT" | grep -q "LINE_5"; then
|
|
336
|
+
log_pass "Basic capture-pane works"
|
|
337
|
+
else
|
|
338
|
+
log_fail "Basic capture-pane failed"
|
|
339
|
+
fi
|
|
340
|
+
|
|
341
|
+
# Test: Capture with history (-S)
|
|
342
|
+
log_info "Testing capture with history..."
|
|
343
|
+
OUTPUT=$(tmux capture-pane -t "$SESSION_NAME" -p -S -50)
|
|
344
|
+
LINE_COUNT=$(echo "$OUTPUT" | grep -c "LINE_" || true)
|
|
345
|
+
if [ "$LINE_COUNT" -ge 5 ]; then
|
|
346
|
+
log_pass "Capture with history works (found $LINE_COUNT lines)"
|
|
347
|
+
else
|
|
348
|
+
log_fail "Capture with history failed (found $LINE_COUNT lines, expected 5+)"
|
|
349
|
+
fi
|
|
350
|
+
|
|
351
|
+
# Cleanup
|
|
352
|
+
tmux kill-session -t "$SESSION_NAME"
|
|
353
|
+
|
|
354
|
+
echo ""
|
|
355
|
+
|
|
356
|
+
# =============================================================================
|
|
357
|
+
# Section 8: Service Testing Workflow
|
|
358
|
+
# =============================================================================
|
|
359
|
+
echo -e "${BLUE}=== Service Testing Workflow ===${NC}"
|
|
360
|
+
|
|
361
|
+
if $SKIP_SERVICE; then
|
|
362
|
+
log_skip "Service tests skipped (--skip-service or missing python3)"
|
|
363
|
+
else
|
|
364
|
+
SESSION_NAME="qa-test-http-$$"
|
|
365
|
+
PORT=18765 # Use high port to avoid conflicts
|
|
366
|
+
|
|
367
|
+
log_info "Starting Python HTTP server on port $PORT..."
|
|
368
|
+
tmux new-session -d -s "$SESSION_NAME" -c /tmp
|
|
369
|
+
tmux send-keys -t "$SESSION_NAME" "python3 -m http.server $PORT" Enter
|
|
370
|
+
|
|
371
|
+
# Wait for port to be ready
|
|
372
|
+
READY=false
|
|
373
|
+
for i in {1..15}; do
|
|
374
|
+
if nc -z localhost $PORT 2>/dev/null; then
|
|
375
|
+
READY=true
|
|
376
|
+
log_pass "Server started on port $PORT (waited ${i}s)"
|
|
377
|
+
break
|
|
378
|
+
fi
|
|
379
|
+
sleep 1
|
|
380
|
+
done
|
|
381
|
+
|
|
382
|
+
if ! $READY; then
|
|
383
|
+
log_fail "Server did not start within 15 seconds"
|
|
384
|
+
# Show what's in the pane
|
|
385
|
+
log_verbose "Pane output: $(tmux capture-pane -t "$SESSION_NAME" -p)"
|
|
386
|
+
else
|
|
387
|
+
# Test: curl the server
|
|
388
|
+
log_info "Testing HTTP request..."
|
|
389
|
+
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:$PORT/ 2>/dev/null || echo "000")
|
|
390
|
+
if [ "$RESPONSE" = "200" ]; then
|
|
391
|
+
log_pass "HTTP server responds with 200"
|
|
392
|
+
else
|
|
393
|
+
log_fail "HTTP server responded with $RESPONSE (expected 200)"
|
|
394
|
+
fi
|
|
395
|
+
|
|
396
|
+
# Test: Verify request logged in tmux
|
|
397
|
+
sleep 0.5
|
|
398
|
+
OUTPUT=$(tmux capture-pane -t "$SESSION_NAME" -p -S -20)
|
|
399
|
+
if echo "$OUTPUT" | grep -qE '(GET|200|HTTP)'; then
|
|
400
|
+
log_pass "HTTP request logged in tmux session"
|
|
401
|
+
else
|
|
402
|
+
log_fail "HTTP request NOT logged in tmux session"
|
|
403
|
+
fi
|
|
404
|
+
fi
|
|
405
|
+
|
|
406
|
+
# Cleanup
|
|
407
|
+
log_info "Cleaning up server..."
|
|
408
|
+
tmux send-keys -t "$SESSION_NAME" C-c
|
|
409
|
+
sleep 0.5
|
|
410
|
+
tmux kill-session -t "$SESSION_NAME"
|
|
411
|
+
|
|
412
|
+
# Verify port released
|
|
413
|
+
sleep 0.5
|
|
414
|
+
if nc -z localhost $PORT 2>/dev/null; then
|
|
415
|
+
log_fail "Port $PORT still in use after cleanup"
|
|
416
|
+
else
|
|
417
|
+
log_pass "Server cleaned up, port released"
|
|
418
|
+
fi
|
|
419
|
+
fi
|
|
420
|
+
|
|
421
|
+
echo ""
|
|
422
|
+
|
|
423
|
+
# =============================================================================
|
|
424
|
+
# Section 9: Edge Cases
|
|
425
|
+
# =============================================================================
|
|
426
|
+
echo -e "${BLUE}=== Edge Cases ===${NC}"
|
|
427
|
+
|
|
428
|
+
# Test: Non-existent session
|
|
429
|
+
log_info "Testing non-existent session handling..."
|
|
430
|
+
if tmux send-keys -t "nonexistent-session-xyz-$$" 'test' Enter 2>/dev/null; then
|
|
431
|
+
log_fail "Should have failed for non-existent session"
|
|
432
|
+
else
|
|
433
|
+
log_pass "Correctly errors on non-existent session"
|
|
434
|
+
fi
|
|
435
|
+
|
|
436
|
+
# Test: Duplicate session name
|
|
437
|
+
log_info "Testing duplicate session name handling..."
|
|
438
|
+
tmux new-session -d -s "dup-test-$$"
|
|
439
|
+
if tmux new-session -d -s "dup-test-$$" 2>/dev/null; then
|
|
440
|
+
log_fail "Should have failed for duplicate session name"
|
|
441
|
+
else
|
|
442
|
+
log_pass "Correctly errors on duplicate session name"
|
|
443
|
+
fi
|
|
444
|
+
tmux kill-session -t "dup-test-$$" 2>/dev/null || true
|
|
445
|
+
|
|
446
|
+
# Test: Session with special characters in name
|
|
447
|
+
log_info "Testing session name with timestamp..."
|
|
448
|
+
TIMESTAMP=$(date +%s)
|
|
449
|
+
SESSION_WITH_TS="qa-test-$TIMESTAMP"
|
|
450
|
+
if tmux new-session -d -s "$SESSION_WITH_TS" && tmux kill-session -t "$SESSION_WITH_TS"; then
|
|
451
|
+
log_pass "Session with timestamp in name works"
|
|
452
|
+
else
|
|
453
|
+
log_fail "Session with timestamp in name failed"
|
|
454
|
+
fi
|
|
455
|
+
|
|
456
|
+
# Test: Empty capture from fresh session
|
|
457
|
+
log_info "Testing capture from fresh session..."
|
|
458
|
+
tmux new-session -d -s "empty-$$"
|
|
459
|
+
sleep 0.1
|
|
460
|
+
OUTPUT=$(tmux capture-pane -t "empty-$$" -p)
|
|
461
|
+
# Fresh session should have minimal/empty output
|
|
462
|
+
if [ ${#OUTPUT} -lt 500 ]; then
|
|
463
|
+
log_pass "Fresh session capture works (${#OUTPUT} chars)"
|
|
464
|
+
else
|
|
465
|
+
log_pass "Fresh session capture returned ${#OUTPUT} chars"
|
|
466
|
+
fi
|
|
467
|
+
tmux kill-session -t "empty-$$"
|
|
468
|
+
|
|
469
|
+
echo ""
|
|
470
|
+
|
|
471
|
+
# =============================================================================
|
|
472
|
+
# Section 10: Documentation Verification
|
|
473
|
+
# =============================================================================
|
|
474
|
+
echo -e "${BLUE}=== Documentation Verification ===${NC}"
|
|
475
|
+
|
|
476
|
+
# Check AGENTS.md updated
|
|
477
|
+
if grep -q "qa-tester" AGENTS.md 2>/dev/null; then
|
|
478
|
+
log_pass "qa-tester in AGENTS.md"
|
|
479
|
+
else
|
|
480
|
+
log_fail "qa-tester NOT in AGENTS.md"
|
|
481
|
+
fi
|
|
482
|
+
|
|
483
|
+
# Check commands/sisyphus.md updated
|
|
484
|
+
if grep -q "qa-tester" commands/sisyphus.md 2>/dev/null; then
|
|
485
|
+
log_pass "qa-tester in commands/sisyphus.md"
|
|
486
|
+
else
|
|
487
|
+
log_fail "qa-tester NOT in commands/sisyphus.md"
|
|
488
|
+
fi
|
|
489
|
+
|
|
490
|
+
# Check commands/ultrawork.md updated
|
|
491
|
+
if grep -q "qa-tester" commands/ultrawork.md 2>/dev/null; then
|
|
492
|
+
log_pass "qa-tester in commands/ultrawork.md"
|
|
493
|
+
else
|
|
494
|
+
log_fail "qa-tester NOT in commands/ultrawork.md"
|
|
495
|
+
fi
|
|
496
|
+
|
|
497
|
+
# Check agents/qa-tester.md exists
|
|
498
|
+
if [ -f "agents/qa-tester.md" ]; then
|
|
499
|
+
log_pass "agents/qa-tester.md reference doc exists"
|
|
500
|
+
else
|
|
501
|
+
log_fail "agents/qa-tester.md reference doc missing"
|
|
502
|
+
fi
|
|
503
|
+
|
|
504
|
+
echo ""
|
|
505
|
+
|
|
506
|
+
# =============================================================================
|
|
507
|
+
# Summary
|
|
508
|
+
# =============================================================================
|
|
509
|
+
echo "========================================"
|
|
510
|
+
echo " Test Summary"
|
|
511
|
+
echo "========================================"
|
|
512
|
+
echo ""
|
|
513
|
+
echo -e " ${GREEN}Passed:${NC} $PASSED"
|
|
514
|
+
echo -e " ${RED}Failed:${NC} $FAILED"
|
|
515
|
+
echo -e " ${YELLOW}Skipped:${NC} $SKIPPED"
|
|
516
|
+
echo ""
|
|
517
|
+
|
|
518
|
+
TOTAL=$((PASSED + FAILED))
|
|
519
|
+
if [ $FAILED -eq 0 ]; then
|
|
520
|
+
echo -e "${GREEN}All $TOTAL tests passed!${NC}"
|
|
521
|
+
exit 0
|
|
522
|
+
else
|
|
523
|
+
echo -e "${RED}$FAILED of $TOTAL tests failed${NC}"
|
|
524
|
+
exit 1
|
|
525
|
+
fi
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Default model lists for each agent
|
|
3
|
-
*
|
|
4
|
-
* Each agent has an ordered list of preferred models.
|
|
5
|
-
* The first authenticated model is used; falls back through the list.
|
|
6
|
-
*/
|
|
7
|
-
import type { ModelId } from '../providers/types.js';
|
|
8
|
-
/**
|
|
9
|
-
* Model lists categorized by capability tier
|
|
10
|
-
*/
|
|
11
|
-
/** High-capability models (for complex analysis, planning, debugging) */
|
|
12
|
-
export declare const OPUS_TIER_MODELS: ModelId[];
|
|
13
|
-
/** Balanced models (for implementation, coordination) */
|
|
14
|
-
export declare const SONNET_TIER_MODELS: ModelId[];
|
|
15
|
-
/** Fast/cheap models (for search, simple tasks) */
|
|
16
|
-
export declare const HAIKU_TIER_MODELS: ModelId[];
|
|
17
|
-
/**
|
|
18
|
-
* Default model lists for each agent
|
|
19
|
-
* These can be overridden in user config
|
|
20
|
-
*/
|
|
21
|
-
export declare const DEFAULT_AGENT_MODELS: Record<string, ModelId[]>;
|
|
22
|
-
/**
|
|
23
|
-
* Get default models for an agent
|
|
24
|
-
*/
|
|
25
|
-
export declare function getDefaultModelsForAgent(agentName: string): ModelId[];
|
|
26
|
-
//# sourceMappingURL=model-lists.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model-lists.d.ts","sourceRoot":"","sources":["../../src/agents/model-lists.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErD;;GAEG;AAEH,yEAAyE;AACzE,eAAO,MAAM,gBAAgB,EAAE,OAAO,EAIrC,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,kBAAkB,EAAE,OAAO,EAIvC,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,iBAAiB,EAAE,OAAO,EAItC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAyB1D,CAAC;AAEF;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,EAAE,CAErE"}
|