oh-my-claude-sisyphus 1.0.0
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/LICENSE +21 -0
- package/README.md +416 -0
- package/dist/agents/definitions.d.ts +48 -0
- package/dist/agents/definitions.d.ts.map +1 -0
- package/dist/agents/definitions.js +271 -0
- package/dist/agents/definitions.js.map +1 -0
- package/dist/agents/index.d.ts +5 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +5 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/cli/index.d.ts +13 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +280 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +5 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/loader.d.ts +49 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +329 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/features/continuation-enforcement.d.ts +34 -0
- package/dist/features/continuation-enforcement.d.ts.map +1 -0
- package/dist/features/continuation-enforcement.js +142 -0
- package/dist/features/continuation-enforcement.js.map +1 -0
- package/dist/features/index.d.ts +6 -0
- package/dist/features/index.d.ts.map +1 -0
- package/dist/features/index.js +6 -0
- package/dist/features/index.js.map +1 -0
- package/dist/features/magic-keywords.d.ts +22 -0
- package/dist/features/magic-keywords.d.ts.map +1 -0
- package/dist/features/magic-keywords.js +189 -0
- package/dist/features/magic-keywords.js.map +1 -0
- package/dist/index.d.ts +105 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +146 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/index.d.ts +6 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +5 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/servers.d.ts +77 -0
- package/dist/mcp/servers.d.ts.map +1 -0
- package/dist/mcp/servers.js +122 -0
- package/dist/mcp/servers.js.map +1 -0
- package/dist/shared/index.d.ts +5 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +5 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/shared/types.d.ts +133 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +5 -0
- package/dist/shared/types.js.map +1 -0
- package/dist/tools/ast-tools.d.ts +63 -0
- package/dist/tools/ast-tools.d.ts.map +1 -0
- package/dist/tools/ast-tools.js +349 -0
- package/dist/tools/ast-tools.js.map +1 -0
- package/dist/tools/index.d.ts +52 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +120 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/lsp/client.d.ts +201 -0
- package/dist/tools/lsp/client.d.ts.map +1 -0
- package/dist/tools/lsp/client.js +454 -0
- package/dist/tools/lsp/client.js.map +1 -0
- package/dist/tools/lsp/index.d.ts +9 -0
- package/dist/tools/lsp/index.d.ts.map +1 -0
- package/dist/tools/lsp/index.js +7 -0
- package/dist/tools/lsp/index.js.map +1 -0
- package/dist/tools/lsp/servers.d.ts +37 -0
- package/dist/tools/lsp/servers.d.ts.map +1 -0
- package/dist/tools/lsp/servers.js +148 -0
- package/dist/tools/lsp/servers.js.map +1 -0
- package/dist/tools/lsp/utils.d.ts +58 -0
- package/dist/tools/lsp/utils.d.ts.map +1 -0
- package/dist/tools/lsp/utils.js +236 -0
- package/dist/tools/lsp/utils.js.map +1 -0
- package/dist/tools/lsp-tools.d.ts +151 -0
- package/dist/tools/lsp-tools.d.ts.map +1 -0
- package/dist/tools/lsp-tools.js +358 -0
- package/dist/tools/lsp-tools.js.map +1 -0
- package/package.json +75 -0
- package/scripts/install.sh +765 -0
- package/scripts/uninstall.sh +47 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Magic Keywords Feature
|
|
3
|
+
*
|
|
4
|
+
* Detects special keywords in prompts and activates enhanced behaviors:
|
|
5
|
+
* - ultrawork/ulw: Maximum performance mode with parallel orchestration
|
|
6
|
+
* - search/find: Maximized search effort
|
|
7
|
+
* - analyze/investigate: Deep analysis mode
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Ultrawork mode enhancement
|
|
11
|
+
* Activates maximum performance with parallel agent orchestration
|
|
12
|
+
*/
|
|
13
|
+
const ultraworkEnhancement = {
|
|
14
|
+
triggers: ['ultrawork', 'ulw', 'uw'],
|
|
15
|
+
description: 'Activates maximum performance mode with parallel agent orchestration',
|
|
16
|
+
action: (prompt) => {
|
|
17
|
+
// Remove the trigger word and add enhancement instructions
|
|
18
|
+
const cleanPrompt = removeTriggerWords(prompt, ['ultrawork', 'ulw', 'uw']);
|
|
19
|
+
return `[ULTRAWORK MODE ACTIVATED]
|
|
20
|
+
|
|
21
|
+
${cleanPrompt}
|
|
22
|
+
|
|
23
|
+
## Enhanced Execution Instructions
|
|
24
|
+
- Use PARALLEL agent execution for all independent subtasks
|
|
25
|
+
- Delegate aggressively to specialized subagents
|
|
26
|
+
- Maximize throughput by running multiple operations concurrently
|
|
27
|
+
- Continue until ALL tasks are 100% complete - verify before stopping
|
|
28
|
+
- Use background agents for long-running operations
|
|
29
|
+
- Report progress frequently
|
|
30
|
+
|
|
31
|
+
## Subagent Strategy
|
|
32
|
+
- Use 'oracle' for complex debugging and architecture decisions
|
|
33
|
+
- Use 'librarian' for documentation and codebase research
|
|
34
|
+
- Use 'explore' for quick pattern matching and file searches
|
|
35
|
+
- Use 'frontend-engineer' for UI/UX work
|
|
36
|
+
- Use 'document-writer' for documentation tasks
|
|
37
|
+
- Use 'multimodal-looker' for analyzing images/screenshots
|
|
38
|
+
|
|
39
|
+
CRITICAL: Do NOT stop until every task is verified complete.`;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Search mode enhancement
|
|
44
|
+
* Maximizes search effort and thoroughness
|
|
45
|
+
*/
|
|
46
|
+
const searchEnhancement = {
|
|
47
|
+
triggers: ['search', 'find', 'locate'],
|
|
48
|
+
description: 'Maximizes search effort and thoroughness',
|
|
49
|
+
action: (prompt) => {
|
|
50
|
+
// Check if search-related triggers are present as commands
|
|
51
|
+
const hasSearchCommand = /\b(search|find|locate)\b/i.test(prompt);
|
|
52
|
+
if (!hasSearchCommand) {
|
|
53
|
+
return prompt;
|
|
54
|
+
}
|
|
55
|
+
return `${prompt}
|
|
56
|
+
|
|
57
|
+
## Search Enhancement Instructions
|
|
58
|
+
- Use multiple search strategies (glob patterns, grep, AST search)
|
|
59
|
+
- Search across ALL relevant file types
|
|
60
|
+
- Include hidden files and directories when appropriate
|
|
61
|
+
- Try alternative naming conventions (camelCase, snake_case, kebab-case)
|
|
62
|
+
- Look in common locations: src/, lib/, utils/, helpers/, services/
|
|
63
|
+
- Check for related files (tests, types, interfaces)
|
|
64
|
+
- Report ALL findings, not just the first match
|
|
65
|
+
- If initial search fails, try broader patterns`;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Analyze mode enhancement
|
|
70
|
+
* Activates deep analysis and investigation mode
|
|
71
|
+
*/
|
|
72
|
+
const analyzeEnhancement = {
|
|
73
|
+
triggers: ['analyze', 'investigate', 'examine', 'debug'],
|
|
74
|
+
description: 'Activates deep analysis and investigation mode',
|
|
75
|
+
action: (prompt) => {
|
|
76
|
+
// Check if analysis-related triggers are present
|
|
77
|
+
const hasAnalyzeCommand = /\b(analyze|investigate|examine|debug)\b/i.test(prompt);
|
|
78
|
+
if (!hasAnalyzeCommand) {
|
|
79
|
+
return prompt;
|
|
80
|
+
}
|
|
81
|
+
return `${prompt}
|
|
82
|
+
|
|
83
|
+
## Deep Analysis Instructions
|
|
84
|
+
- Thoroughly examine all relevant code paths
|
|
85
|
+
- Trace data flow from source to destination
|
|
86
|
+
- Identify edge cases and potential failure modes
|
|
87
|
+
- Check for related issues in similar code patterns
|
|
88
|
+
- Use LSP tools for type information and references
|
|
89
|
+
- Use AST tools for structural code analysis
|
|
90
|
+
- Document findings with specific file:line references
|
|
91
|
+
- Propose concrete solutions with code examples
|
|
92
|
+
- Consider performance, security, and maintainability implications`;
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Remove trigger words from a prompt
|
|
97
|
+
*/
|
|
98
|
+
function removeTriggerWords(prompt, triggers) {
|
|
99
|
+
let result = prompt;
|
|
100
|
+
for (const trigger of triggers) {
|
|
101
|
+
const regex = new RegExp(`\\b${trigger}\\b`, 'gi');
|
|
102
|
+
result = result.replace(regex, '');
|
|
103
|
+
}
|
|
104
|
+
return result.trim();
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* All built-in magic keyword definitions
|
|
108
|
+
*/
|
|
109
|
+
export const builtInMagicKeywords = [
|
|
110
|
+
ultraworkEnhancement,
|
|
111
|
+
searchEnhancement,
|
|
112
|
+
analyzeEnhancement
|
|
113
|
+
];
|
|
114
|
+
/**
|
|
115
|
+
* Create a magic keyword processor with custom triggers
|
|
116
|
+
*/
|
|
117
|
+
export function createMagicKeywordProcessor(config) {
|
|
118
|
+
const keywords = [...builtInMagicKeywords];
|
|
119
|
+
// Override triggers from config
|
|
120
|
+
if (config) {
|
|
121
|
+
if (config.ultrawork) {
|
|
122
|
+
const ultrawork = keywords.find(k => k.triggers.includes('ultrawork'));
|
|
123
|
+
if (ultrawork) {
|
|
124
|
+
ultrawork.triggers = config.ultrawork;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
if (config.search) {
|
|
128
|
+
const search = keywords.find(k => k.triggers.includes('search'));
|
|
129
|
+
if (search) {
|
|
130
|
+
search.triggers = config.search;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (config.analyze) {
|
|
134
|
+
const analyze = keywords.find(k => k.triggers.includes('analyze'));
|
|
135
|
+
if (analyze) {
|
|
136
|
+
analyze.triggers = config.analyze;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return (prompt) => {
|
|
141
|
+
let result = prompt;
|
|
142
|
+
for (const keyword of keywords) {
|
|
143
|
+
const hasKeyword = keyword.triggers.some(trigger => {
|
|
144
|
+
const regex = new RegExp(`\\b${trigger}\\b`, 'i');
|
|
145
|
+
return regex.test(result);
|
|
146
|
+
});
|
|
147
|
+
if (hasKeyword) {
|
|
148
|
+
result = keyword.action(result);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return result;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Check if a prompt contains any magic keywords
|
|
156
|
+
*/
|
|
157
|
+
export function detectMagicKeywords(prompt, config) {
|
|
158
|
+
const detected = [];
|
|
159
|
+
const keywords = [...builtInMagicKeywords];
|
|
160
|
+
// Apply config overrides
|
|
161
|
+
if (config) {
|
|
162
|
+
if (config.ultrawork) {
|
|
163
|
+
const ultrawork = keywords.find(k => k.triggers.includes('ultrawork'));
|
|
164
|
+
if (ultrawork)
|
|
165
|
+
ultrawork.triggers = config.ultrawork;
|
|
166
|
+
}
|
|
167
|
+
if (config.search) {
|
|
168
|
+
const search = keywords.find(k => k.triggers.includes('search'));
|
|
169
|
+
if (search)
|
|
170
|
+
search.triggers = config.search;
|
|
171
|
+
}
|
|
172
|
+
if (config.analyze) {
|
|
173
|
+
const analyze = keywords.find(k => k.triggers.includes('analyze'));
|
|
174
|
+
if (analyze)
|
|
175
|
+
analyze.triggers = config.analyze;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
for (const keyword of keywords) {
|
|
179
|
+
for (const trigger of keyword.triggers) {
|
|
180
|
+
const regex = new RegExp(`\\b${trigger}\\b`, 'i');
|
|
181
|
+
if (regex.test(prompt)) {
|
|
182
|
+
detected.push(trigger);
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return detected;
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=magic-keywords.js.map
|
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-opencode for Claude.
|
|
6
|
+
*
|
|
7
|
+
* Main features:
|
|
8
|
+
* - Sisyphus: Primary orchestrator that delegates to specialized subagents
|
|
9
|
+
* - Parallel execution: Background agents run concurrently
|
|
10
|
+
* - LSP/AST tools: IDE-like capabilities for agents
|
|
11
|
+
* - Context management: Auto-injection from AGENTS.md/CLAUDE.md
|
|
12
|
+
* - Continuation enforcement: Ensures tasks complete before stopping
|
|
13
|
+
* - Magic keywords: Special triggers for enhanced behaviors
|
|
14
|
+
*/
|
|
15
|
+
import { loadConfig } from './config/loader.js';
|
|
16
|
+
import { getAgentDefinitions, sisyphusSystemPrompt } from './agents/definitions.js';
|
|
17
|
+
import type { PluginConfig, SessionState } from './shared/types.js';
|
|
18
|
+
export { loadConfig, getAgentDefinitions, sisyphusSystemPrompt };
|
|
19
|
+
export { getDefaultMcpServers, toSdkMcpFormat } from './mcp/servers.js';
|
|
20
|
+
export { lspTools, astTools, allCustomTools } from './tools/index.js';
|
|
21
|
+
export { createMagicKeywordProcessor, detectMagicKeywords } from './features/magic-keywords.js';
|
|
22
|
+
export * from './shared/types.js';
|
|
23
|
+
/**
|
|
24
|
+
* Options for creating a Sisyphus session
|
|
25
|
+
*/
|
|
26
|
+
export interface SisyphusOptions {
|
|
27
|
+
/** Custom configuration (merged with loaded config) */
|
|
28
|
+
config?: Partial<PluginConfig>;
|
|
29
|
+
/** Working directory (default: process.cwd()) */
|
|
30
|
+
workingDirectory?: string;
|
|
31
|
+
/** Skip loading config files */
|
|
32
|
+
skipConfigLoad?: boolean;
|
|
33
|
+
/** Skip context file injection */
|
|
34
|
+
skipContextInjection?: boolean;
|
|
35
|
+
/** Custom system prompt addition */
|
|
36
|
+
customSystemPrompt?: string;
|
|
37
|
+
/** API key (default: from ANTHROPIC_API_KEY env) */
|
|
38
|
+
apiKey?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Result of creating a Sisyphus session
|
|
42
|
+
*/
|
|
43
|
+
export interface SisyphusSession {
|
|
44
|
+
/** The query options to pass to Claude Agent SDK */
|
|
45
|
+
queryOptions: {
|
|
46
|
+
options: {
|
|
47
|
+
systemPrompt: string;
|
|
48
|
+
agents: Record<string, {
|
|
49
|
+
description: string;
|
|
50
|
+
prompt: string;
|
|
51
|
+
tools: string[];
|
|
52
|
+
model?: string;
|
|
53
|
+
}>;
|
|
54
|
+
mcpServers: Record<string, {
|
|
55
|
+
command: string;
|
|
56
|
+
args: string[];
|
|
57
|
+
}>;
|
|
58
|
+
allowedTools: string[];
|
|
59
|
+
permissionMode: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
/** Session state */
|
|
63
|
+
state: SessionState;
|
|
64
|
+
/** Loaded configuration */
|
|
65
|
+
config: PluginConfig;
|
|
66
|
+
/** Process a prompt (applies magic keywords) */
|
|
67
|
+
processPrompt: (prompt: string) => string;
|
|
68
|
+
/** Get detected magic keywords in a prompt */
|
|
69
|
+
detectKeywords: (prompt: string) => string[];
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Create a Sisyphus orchestration session
|
|
73
|
+
*
|
|
74
|
+
* This prepares all the configuration and options needed
|
|
75
|
+
* to run a query with the Claude Agent SDK.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```typescript
|
|
79
|
+
* import { createSisyphusSession } from 'oh-my-claude-sisyphus';
|
|
80
|
+
* import { query } from '@anthropic-ai/claude-agent-sdk';
|
|
81
|
+
*
|
|
82
|
+
* const session = createSisyphusSession();
|
|
83
|
+
*
|
|
84
|
+
* // Use with Claude Agent SDK
|
|
85
|
+
* for await (const message of query({
|
|
86
|
+
* prompt: session.processPrompt("ultrawork refactor the authentication module"),
|
|
87
|
+
* ...session.queryOptions
|
|
88
|
+
* })) {
|
|
89
|
+
* console.log(message);
|
|
90
|
+
* }
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
export declare function createSisyphusSession(options?: SisyphusOptions): SisyphusSession;
|
|
94
|
+
/**
|
|
95
|
+
* Quick helper to process a prompt with Sisyphus enhancements
|
|
96
|
+
*/
|
|
97
|
+
export declare function enhancePrompt(prompt: string, config?: PluginConfig): string;
|
|
98
|
+
/**
|
|
99
|
+
* Get the system prompt for Sisyphus (for direct use)
|
|
100
|
+
*/
|
|
101
|
+
export declare function getSisyphusSystemPrompt(options?: {
|
|
102
|
+
includeContinuation?: boolean;
|
|
103
|
+
customAddition?: string;
|
|
104
|
+
}): string;
|
|
105
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,UAAU,EAA0C,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAIpF,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAChG,cAAc,mBAAmB,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,uDAAuD;IACvD,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/B,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gCAAgC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kCAAkC;IAClC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oCAAoC;IACpC,kBAAkB,CAAC,EA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
package/dist/index.js
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Oh-My-Claude-Sisyphus
|
|
3
|
+
*
|
|
4
|
+
* A multi-agent orchestration system for the Claude Agent SDK.
|
|
5
|
+
* Port of oh-my-opencode for Claude.
|
|
6
|
+
*
|
|
7
|
+
* Main features:
|
|
8
|
+
* - Sisyphus: Primary orchestrator that delegates to specialized subagents
|
|
9
|
+
* - Parallel execution: Background agents run concurrently
|
|
10
|
+
* - LSP/AST tools: IDE-like capabilities for agents
|
|
11
|
+
* - Context management: Auto-injection from AGENTS.md/CLAUDE.md
|
|
12
|
+
* - Continuation enforcement: Ensures tasks complete before stopping
|
|
13
|
+
* - Magic keywords: Special triggers for enhanced behaviors
|
|
14
|
+
*/
|
|
15
|
+
import { loadConfig, findContextFiles, loadContextFromFiles } from './config/loader.js';
|
|
16
|
+
import { getAgentDefinitions, sisyphusSystemPrompt } from './agents/definitions.js';
|
|
17
|
+
import { getDefaultMcpServers, toSdkMcpFormat } from './mcp/servers.js';
|
|
18
|
+
import { createMagicKeywordProcessor, detectMagicKeywords } from './features/magic-keywords.js';
|
|
19
|
+
import { continuationSystemPromptAddition } from './features/continuation-enforcement.js';
|
|
20
|
+
export { loadConfig, getAgentDefinitions, sisyphusSystemPrompt };
|
|
21
|
+
export { getDefaultMcpServers, toSdkMcpFormat } from './mcp/servers.js';
|
|
22
|
+
export { lspTools, astTools, allCustomTools } from './tools/index.js';
|
|
23
|
+
export { createMagicKeywordProcessor, detectMagicKeywords } from './features/magic-keywords.js';
|
|
24
|
+
export * from './shared/types.js';
|
|
25
|
+
/**
|
|
26
|
+
* Create a Sisyphus orchestration session
|
|
27
|
+
*
|
|
28
|
+
* This prepares all the configuration and options needed
|
|
29
|
+
* to run a query with the Claude Agent SDK.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```typescript
|
|
33
|
+
* import { createSisyphusSession } from 'oh-my-claude-sisyphus';
|
|
34
|
+
* import { query } from '@anthropic-ai/claude-agent-sdk';
|
|
35
|
+
*
|
|
36
|
+
* const session = createSisyphusSession();
|
|
37
|
+
*
|
|
38
|
+
* // Use with Claude Agent SDK
|
|
39
|
+
* for await (const message of query({
|
|
40
|
+
* prompt: session.processPrompt("ultrawork refactor the authentication module"),
|
|
41
|
+
* ...session.queryOptions
|
|
42
|
+
* })) {
|
|
43
|
+
* console.log(message);
|
|
44
|
+
* }
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export function createSisyphusSession(options) {
|
|
48
|
+
// Load configuration
|
|
49
|
+
const loadedConfig = options?.skipConfigLoad ? {} : loadConfig();
|
|
50
|
+
const config = {
|
|
51
|
+
...loadedConfig,
|
|
52
|
+
...options?.config
|
|
53
|
+
};
|
|
54
|
+
// Find and load context files
|
|
55
|
+
let contextAddition = '';
|
|
56
|
+
if (!options?.skipContextInjection && config.features?.autoContextInjection !== false) {
|
|
57
|
+
const contextFiles = findContextFiles(options?.workingDirectory);
|
|
58
|
+
if (contextFiles.length > 0) {
|
|
59
|
+
contextAddition = `\n\n## Project Context\n\n${loadContextFromFiles(contextFiles)}`;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
// Build system prompt
|
|
63
|
+
let systemPrompt = sisyphusSystemPrompt;
|
|
64
|
+
// Add continuation enforcement
|
|
65
|
+
if (config.features?.continuationEnforcement !== false) {
|
|
66
|
+
systemPrompt += continuationSystemPromptAddition;
|
|
67
|
+
}
|
|
68
|
+
// Add custom system prompt
|
|
69
|
+
if (options?.customSystemPrompt) {
|
|
70
|
+
systemPrompt += `\n\n## Custom Instructions\n\n${options.customSystemPrompt}`;
|
|
71
|
+
}
|
|
72
|
+
// Add context from files
|
|
73
|
+
if (contextAddition) {
|
|
74
|
+
systemPrompt += contextAddition;
|
|
75
|
+
}
|
|
76
|
+
// Get agent definitions
|
|
77
|
+
const agents = getAgentDefinitions();
|
|
78
|
+
// Build MCP servers configuration
|
|
79
|
+
const mcpServers = getDefaultMcpServers({
|
|
80
|
+
exaApiKey: config.mcpServers?.exa?.apiKey,
|
|
81
|
+
enableExa: config.mcpServers?.exa?.enabled,
|
|
82
|
+
enableContext7: config.mcpServers?.context7?.enabled,
|
|
83
|
+
enableGrepApp: config.mcpServers?.grepApp?.enabled
|
|
84
|
+
});
|
|
85
|
+
// Build allowed tools list
|
|
86
|
+
const allowedTools = [
|
|
87
|
+
'Read', 'Glob', 'Grep', 'WebSearch', 'WebFetch', 'Task', 'TodoWrite'
|
|
88
|
+
];
|
|
89
|
+
if (config.permissions?.allowBash !== false) {
|
|
90
|
+
allowedTools.push('Bash');
|
|
91
|
+
}
|
|
92
|
+
if (config.permissions?.allowEdit !== false) {
|
|
93
|
+
allowedTools.push('Edit');
|
|
94
|
+
}
|
|
95
|
+
if (config.permissions?.allowWrite !== false) {
|
|
96
|
+
allowedTools.push('Write');
|
|
97
|
+
}
|
|
98
|
+
// Add MCP tool names
|
|
99
|
+
for (const serverName of Object.keys(mcpServers)) {
|
|
100
|
+
allowedTools.push(`mcp__${serverName}__*`);
|
|
101
|
+
}
|
|
102
|
+
// Create magic keyword processor
|
|
103
|
+
const processPrompt = createMagicKeywordProcessor(config.magicKeywords);
|
|
104
|
+
// Initialize session state
|
|
105
|
+
const state = {
|
|
106
|
+
activeAgents: new Map(),
|
|
107
|
+
backgroundTasks: [],
|
|
108
|
+
contextFiles: findContextFiles(options?.workingDirectory)
|
|
109
|
+
};
|
|
110
|
+
return {
|
|
111
|
+
queryOptions: {
|
|
112
|
+
options: {
|
|
113
|
+
systemPrompt,
|
|
114
|
+
agents,
|
|
115
|
+
mcpServers: toSdkMcpFormat(mcpServers),
|
|
116
|
+
allowedTools,
|
|
117
|
+
permissionMode: 'acceptEdits'
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
state,
|
|
121
|
+
config,
|
|
122
|
+
processPrompt,
|
|
123
|
+
detectKeywords: (prompt) => detectMagicKeywords(prompt, config.magicKeywords)
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Quick helper to process a prompt with Sisyphus enhancements
|
|
128
|
+
*/
|
|
129
|
+
export function enhancePrompt(prompt, config) {
|
|
130
|
+
const processor = createMagicKeywordProcessor(config?.magicKeywords);
|
|
131
|
+
return processor(prompt);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Get the system prompt for Sisyphus (for direct use)
|
|
135
|
+
*/
|
|
136
|
+
export function getSisyphusSystemPrompt(options) {
|
|
137
|
+
let prompt = sisyphusSystemPrompt;
|
|
138
|
+
if (options?.includeContinuation !== false) {
|
|
139
|
+
prompt += continuationSystemPromptAddition;
|
|
140
|
+
}
|
|
141
|
+
if (options?.customAddition) {
|
|
142
|
+
prompt += `\n\n${options.customAddition}`;
|
|
143
|
+
}
|
|
144
|
+
return prompt;
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAChG,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAG1F,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACtE,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L,YAAY,EAAE;YACZ,OAAO,EAAE;gBACP,YAAY;gBACZ,MAAM;gBACN,UAAU,EAAE,cAAc,CAAC,UAAU,CAAC;gBACtC,YAAY;gBACZ,cAAc,EAAE,aAAa;aAC9B;SACF;QACD,KAAK;QACL,MAAM;QACN,aAAa;QACb,cAAc,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;KACtF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,MAAc,EAAE,MAAqB;IACjE,MAAM,SAAS,GAAG,2BAA2B,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACrE,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAGvC;IACC,IAAI,MAAM,GAAG,oBAAoB,CAAC;IAElC,IAAI,OAAO,EAAE,mBAAmB,KAAK,KAAK,EAAE,CAAC;QAC3C,MAAM,IAAI,gCAAgC,CAAC;IAC7C,CAAC;IAED,IAAI,OAAO,EAAE,cAAc,EAAE,CAAC;QAC5B,MAAM,IAAI,OAAO,OAAO,CAAC,cAAc,EAAE,CAAC;IAC5C,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Server Module Exports
|
|
3
|
+
*/
|
|
4
|
+
export { createExaServer, createContext7Server, createGrepAppServer, createPlaywrightServer, createFilesystemServer, createGitServer, createMemoryServer, createFetchServer, getDefaultMcpServers, toSdkMcpFormat } from './servers.js';
|
|
5
|
+
export type { McpServerConfig, McpServersConfig } from './servers.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACf,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Server Module Exports
|
|
3
|
+
*/
|
|
4
|
+
export { createExaServer, createContext7Server, createGrepAppServer, createPlaywrightServer, createFilesystemServer, createGitServer, createMemoryServer, createFetchServer, getDefaultMcpServers, toSdkMcpFormat } from './servers.js';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACf,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Server Configurations
|
|
3
|
+
*
|
|
4
|
+
* Predefined MCP server configurations for common integrations:
|
|
5
|
+
* - Exa: AI-powered web search
|
|
6
|
+
* - Context7: Official documentation lookup
|
|
7
|
+
* - grep.app: GitHub code search
|
|
8
|
+
* - Playwright: Browser automation
|
|
9
|
+
*/
|
|
10
|
+
export interface McpServerConfig {
|
|
11
|
+
command: string;
|
|
12
|
+
args: string[];
|
|
13
|
+
env?: Record<string, string>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Exa MCP Server - AI-powered web search
|
|
17
|
+
* Requires: EXA_API_KEY environment variable
|
|
18
|
+
*/
|
|
19
|
+
export declare function createExaServer(apiKey?: string): McpServerConfig;
|
|
20
|
+
/**
|
|
21
|
+
* Context7 MCP Server - Official documentation lookup
|
|
22
|
+
* Provides access to official docs for popular libraries
|
|
23
|
+
*/
|
|
24
|
+
export declare function createContext7Server(): McpServerConfig;
|
|
25
|
+
/**
|
|
26
|
+
* grep.app MCP Server - GitHub code search
|
|
27
|
+
* Search across public GitHub repositories
|
|
28
|
+
*/
|
|
29
|
+
export declare function createGrepAppServer(): McpServerConfig;
|
|
30
|
+
/**
|
|
31
|
+
* Playwright MCP Server - Browser automation
|
|
32
|
+
* Enables agents to interact with web pages
|
|
33
|
+
*/
|
|
34
|
+
export declare function createPlaywrightServer(): McpServerConfig;
|
|
35
|
+
/**
|
|
36
|
+
* Filesystem MCP Server - Extended file operations
|
|
37
|
+
* Provides additional file system capabilities
|
|
38
|
+
*/
|
|
39
|
+
export declare function createFilesystemServer(allowedPaths: string[]): McpServerConfig;
|
|
40
|
+
/**
|
|
41
|
+
* Git MCP Server - Git operations
|
|
42
|
+
* Provides git-specific operations beyond basic bash
|
|
43
|
+
*/
|
|
44
|
+
export declare function createGitServer(repoPath?: string): McpServerConfig;
|
|
45
|
+
/**
|
|
46
|
+
* Memory MCP Server - Persistent memory
|
|
47
|
+
* Allows agents to store and retrieve information across sessions
|
|
48
|
+
*/
|
|
49
|
+
export declare function createMemoryServer(): McpServerConfig;
|
|
50
|
+
/**
|
|
51
|
+
* Fetch MCP Server - HTTP requests
|
|
52
|
+
* Make HTTP requests to APIs
|
|
53
|
+
*/
|
|
54
|
+
export declare function createFetchServer(): McpServerConfig;
|
|
55
|
+
/**
|
|
56
|
+
* Get all default MCP servers for the Sisyphus system
|
|
57
|
+
*/
|
|
58
|
+
export interface McpServersConfig {
|
|
59
|
+
exa?: McpServerConfig;
|
|
60
|
+
context7?: McpServerConfig;
|
|
61
|
+
grepApp?: McpServerConfig;
|
|
62
|
+
playwright?: McpServerConfig;
|
|
63
|
+
memory?: McpServerConfig;
|
|
64
|
+
}
|
|
65
|
+
export declare function getDefaultMcpServers(options?: {
|
|
66
|
+
exaApiKey?: string;
|
|
67
|
+
enableExa?: boolean;
|
|
68
|
+
enableContext7?: boolean;
|
|
69
|
+
enableGrepApp?: boolean;
|
|
70
|
+
enablePlaywright?: boolean;
|
|
71
|
+
enableMemory?: boolean;
|
|
72
|
+
}): McpServersConfig;
|
|
73
|
+
/**
|
|
74
|
+
* Convert MCP servers config to SDK format
|
|
75
|
+
*/
|
|
76
|
+
export declare function toSdkMcpFormat(servers: McpServersConfig): Record<string, McpServerConfig>;
|
|
77
|
+
//# sourceMappingURL=servers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"servers.d.ts","sourceRoot":"","sources":["../../src/mcp/servers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,eAAe,CAMhE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,eAAe,CAKtD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,eAAe,CAKrD;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,eAAe,CAKxD;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,eAAe,CAK9E;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,eAAe,CAKlE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,eAAe,CAKpD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,eAAe,CAKnD;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B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