opencode-cc10x 6.0.21
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 +283 -0
- package/bun.lock +20 -0
- package/dist/agents.d.ts +3 -0
- package/dist/agents.d.ts.map +1 -0
- package/dist/agents.js +483 -0
- package/dist/agents.js.map +1 -0
- package/dist/compatibility-layer.d.ts +18 -0
- package/dist/compatibility-layer.d.ts.map +1 -0
- package/dist/compatibility-layer.js +150 -0
- package/dist/compatibility-layer.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1459 -0
- package/dist/index.js.map +1 -0
- package/dist/intent-detection.d.ts +14 -0
- package/dist/intent-detection.d.ts.map +1 -0
- package/dist/intent-detection.js +121 -0
- package/dist/intent-detection.js.map +1 -0
- package/dist/memory.d.ts +41 -0
- package/dist/memory.d.ts.map +1 -0
- package/dist/memory.js +330 -0
- package/dist/memory.js.map +1 -0
- package/dist/router.d.ts +15 -0
- package/dist/router.d.ts.map +1 -0
- package/dist/router.js +208 -0
- package/dist/router.js.map +1 -0
- package/dist/skills.d.ts +3 -0
- package/dist/skills.d.ts.map +1 -0
- package/dist/skills.js +2790 -0
- package/dist/skills.js.map +1 -0
- package/dist/task-orchestrator.d.ts +46 -0
- package/dist/task-orchestrator.d.ts.map +1 -0
- package/dist/task-orchestrator.js +262 -0
- package/dist/task-orchestrator.js.map +1 -0
- package/dist/workflow-executor.d.ts +29 -0
- package/dist/workflow-executor.d.ts.map +1 -0
- package/dist/workflow-executor.js +414 -0
- package/dist/workflow-executor.js.map +1 -0
- package/install-from-github.mjs +152 -0
- package/install-from-github.sh +106 -0
- package/install.sh +295 -0
- package/opencode.json +118 -0
- package/package.json +41 -0
- package/tsconfig.json +23 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAA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,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;oBAC/D,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;wBACpB,OAAO,iFAAiF,CAAC;oBAC3F,CAAC;oBAED,OAAO,CAAC,GAAG,CAAC,yCAAyC,OAAO,EAAE,CAAC,CAAC;oBAEhE,kDAAkD;oBAClD,MAAM,cAAc,GAAG,gBAAgB,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC;oBAEpD,wDAAwD;oBACxD,MAAM,UAAU,CAAC,YAAY,CAAC;wBAC5B,OAAO;wBACP,MAAM,EAAE,cAAc;wBACtB,aAAa,EAAE,IAAI;qBACpB,EAAE,OAAO,CAAC,CAAC;oBAEZ,OAAO,2CAA2C,OAAO,EAAE,CAAC;gBAC9D,CAAC;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type WorkflowType = 'BUILD' | 'DEBUG' | 'REVIEW' | 'PLAN';
|
|
2
|
+
export interface DetectionResult {
|
|
3
|
+
intent: WorkflowType;
|
|
4
|
+
confidence: number;
|
|
5
|
+
reasoning: string;
|
|
6
|
+
keywords: string[];
|
|
7
|
+
}
|
|
8
|
+
export declare function detectIntent(message: string, memory?: any): DetectionResult;
|
|
9
|
+
export declare const INTENT_DETECTION: {
|
|
10
|
+
detectIntent: typeof detectIntent;
|
|
11
|
+
INTENT_PRIORITY: WorkflowType[];
|
|
12
|
+
INTENT_KEYWORDS: Record<WorkflowType, string[]>;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=intent-detection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent-detection.d.ts","sourceRoot":"","sources":["../src/intent-detection.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEjE,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AA4BD,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,eAAe,CA4D3E;AA8CD,eAAO,MAAM,gBAAgB;;;;CAI5B,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// Priority order: ERROR signals always win
|
|
2
|
+
const INTENT_PRIORITY = ['DEBUG', 'PLAN', 'REVIEW', 'BUILD'];
|
|
3
|
+
const INTENT_KEYWORDS = {
|
|
4
|
+
'DEBUG': [
|
|
5
|
+
'error', 'bug', 'fix', 'broken', 'crash', 'fail', 'debug', 'troubleshoot',
|
|
6
|
+
'issue', 'problem', 'doesn\'t work', 'not working', 'exception', 'traceback',
|
|
7
|
+
'stack trace', 'panic', 'segfault', 'syntax error', 'runtime error'
|
|
8
|
+
],
|
|
9
|
+
'PLAN': [
|
|
10
|
+
'plan', 'design', 'architect', 'roadmap', 'strategy', 'spec', 'before we build',
|
|
11
|
+
'how should we', 'what\'s the approach', 'proposal', 'recommendation',
|
|
12
|
+
'should we use', 'options', 'alternatives', 'research', 'investigate'
|
|
13
|
+
],
|
|
14
|
+
'REVIEW': [
|
|
15
|
+
'review', 'audit', 'check', 'analyze', 'assess', 'what do you think',
|
|
16
|
+
'is this good', 'evaluate', 'inspect', 'examine', 'critique',
|
|
17
|
+
'feedback', 'suggestions', 'improve', 'optimize'
|
|
18
|
+
],
|
|
19
|
+
'BUILD': [
|
|
20
|
+
'build', 'implement', 'create', 'make', 'write', 'add', 'develop', 'code',
|
|
21
|
+
'feature', 'component', 'app', 'application', 'module', 'class', 'function',
|
|
22
|
+
'endpoint', 'api', 'interface', 'service', 'generate', 'scaffold'
|
|
23
|
+
]
|
|
24
|
+
};
|
|
25
|
+
export function detectIntent(message, memory) {
|
|
26
|
+
const lowerMessage = message.toLowerCase();
|
|
27
|
+
const detectedKeywords = [];
|
|
28
|
+
const intentScores = {
|
|
29
|
+
'BUILD': 0,
|
|
30
|
+
'DEBUG': 0,
|
|
31
|
+
'REVIEW': 0,
|
|
32
|
+
'PLAN': 0
|
|
33
|
+
};
|
|
34
|
+
// Score each intent based on keyword matches
|
|
35
|
+
for (const [intent, keywords] of Object.entries(INTENT_KEYWORDS)) {
|
|
36
|
+
for (const keyword of keywords) {
|
|
37
|
+
if (lowerMessage.includes(keyword)) {
|
|
38
|
+
intentScores[intent]++;
|
|
39
|
+
detectedKeywords.push(keyword);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// Apply priority rules
|
|
44
|
+
let selectedIntent = 'BUILD'; // default
|
|
45
|
+
let maxScore = intentScores['BUILD'];
|
|
46
|
+
// Check for DEBUG priority (error signals always win)
|
|
47
|
+
if (intentScores['DEBUG'] > 0) {
|
|
48
|
+
selectedIntent = 'DEBUG';
|
|
49
|
+
maxScore = intentScores['DEBUG'];
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
// For other intents, pick highest scoring with priority tie-breaking
|
|
53
|
+
for (const intent of INTENT_PRIORITY) {
|
|
54
|
+
if (intent === 'DEBUG')
|
|
55
|
+
continue; // already handled
|
|
56
|
+
const score = intentScores[intent];
|
|
57
|
+
if (score > maxScore || (score === maxScore && INTENT_PRIORITY.indexOf(intent) < INTENT_PRIORITY.indexOf(selectedIntent))) {
|
|
58
|
+
selectedIntent = intent;
|
|
59
|
+
maxScore = score;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
// Calculate confidence based on score and message length
|
|
64
|
+
const totalPossibleKeywords = INTENT_KEYWORDS[selectedIntent].length;
|
|
65
|
+
const confidence = Math.min(100, Math.round((intentScores[selectedIntent] / Math.max(1, totalPossibleKeywords)) * 100));
|
|
66
|
+
// Check memory for context clues
|
|
67
|
+
const memoryContext = analyzeMemoryContext(memory, selectedIntent);
|
|
68
|
+
if (memoryContext.suggestedIntent && memoryContext.suggestedIntent !== selectedIntent) {
|
|
69
|
+
// If memory strongly suggests different intent, adjust
|
|
70
|
+
if (memoryContext.confidence > confidence) {
|
|
71
|
+
selectedIntent = memoryContext.suggestedIntent;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
intent: selectedIntent,
|
|
76
|
+
confidence: confidence,
|
|
77
|
+
reasoning: generateReasoning(selectedIntent, detectedKeywords, memoryContext),
|
|
78
|
+
keywords: detectedKeywords
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function analyzeMemoryContext(memory, currentIntent) {
|
|
82
|
+
if (!memory)
|
|
83
|
+
return { confidence: 0 };
|
|
84
|
+
// Check active context for workflow hints
|
|
85
|
+
const activeContext = memory.activeContext || '';
|
|
86
|
+
const patterns = memory.patterns || '';
|
|
87
|
+
const progress = memory.progress || '';
|
|
88
|
+
const combinedContext = `${activeContext} ${patterns} ${progress}`.toLowerCase();
|
|
89
|
+
// Look for workflow-specific patterns in memory
|
|
90
|
+
if (combinedContext.includes('debugging') || combinedContext.includes('investigating')) {
|
|
91
|
+
return { suggestedIntent: 'DEBUG', confidence: 70 };
|
|
92
|
+
}
|
|
93
|
+
if (combinedContext.includes('planning') || combinedContext.includes('design')) {
|
|
94
|
+
return { suggestedIntent: 'PLAN', confidence: 70 };
|
|
95
|
+
}
|
|
96
|
+
if (combinedContext.includes('reviewing') || combinedContext.includes('audit')) {
|
|
97
|
+
return { suggestedIntent: 'REVIEW', confidence: 70 };
|
|
98
|
+
}
|
|
99
|
+
if (combinedContext.includes('building') || combinedContext.includes('implementing')) {
|
|
100
|
+
return { suggestedIntent: 'BUILD', confidence: 70 };
|
|
101
|
+
}
|
|
102
|
+
return { confidence: 0 };
|
|
103
|
+
}
|
|
104
|
+
function generateReasoning(intent, keywords, memoryContext) {
|
|
105
|
+
const reasoningParts = [];
|
|
106
|
+
if (keywords.length > 0) {
|
|
107
|
+
reasoningParts.push(`Detected keywords: ${keywords.slice(0, 3).join(', ')}`);
|
|
108
|
+
}
|
|
109
|
+
if (memoryContext.suggestedIntent) {
|
|
110
|
+
reasoningParts.push(`Memory context suggests ${memoryContext.suggestedIntent} workflow`);
|
|
111
|
+
}
|
|
112
|
+
reasoningParts.push(`Selected ${intent} workflow based on priority rules`);
|
|
113
|
+
return reasoningParts.join('. ');
|
|
114
|
+
}
|
|
115
|
+
// Export for use in other modules
|
|
116
|
+
export const INTENT_DETECTION = {
|
|
117
|
+
detectIntent,
|
|
118
|
+
INTENT_PRIORITY,
|
|
119
|
+
INTENT_KEYWORDS
|
|
120
|
+
};
|
|
121
|
+
//# sourceMappingURL=intent-detection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent-detection.js","sourceRoot":"","sources":["../src/intent-detection.ts"],"names":[],"mappings":"AASA,2CAA2C;AAC3C,MAAM,eAAe,GAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAE7E,MAAM,eAAe,GAAmC;IACtD,OAAO,EAAE;QACP,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc;QACzE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW;QAC5E,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe;KACpE;IACD,MAAM,EAAE;QACN,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,iBAAiB;QAC/E,eAAe,EAAE,sBAAsB,EAAE,UAAU,EAAE,gBAAgB;QACrE,eAAe,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa;KACtE;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,OAAO,EAAE,OAAO,E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,eAAe,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;IACtD,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;AAC3B,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAoB,EAAE,QAAkB,EAAE,aAAkB;IACrF,MAAM,cAAc,GAAa,EAAE,CAAC;IAEpC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,cAAc,CAAC,IAAI,CAAC,sBAAsB,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED,IAAI,aAAa,CAAC,eAAe,EAAE,CAAC;QAClC,cAAc,CAAC,IAAI,CAAC,2BAA2B,aAAa,CAAC,eAAe,WAAW,CAAC,CAAC;IAC3F,CAAC;IAED,cAAc,CAAC,IAAI,CAAC,YAAY,MAAM,mCAAmC,CAAC,CAAC;IAE3E,OAAO,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAED,kCAAkC;AAClC,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,YAAY;IACZ,eAAe;IACf,eAAe;CAChB,CAAC"}
|
package/dist/memory.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface CC10XMemory {
|
|
2
|
+
activeContext: string;
|
|
3
|
+
patterns: string;
|
|
4
|
+
progress: string;
|
|
5
|
+
lastUpdated: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class MemoryManager {
|
|
8
|
+
private ctx;
|
|
9
|
+
private memoryCache;
|
|
10
|
+
private pendingNotes;
|
|
11
|
+
initialize(input: any): Promise<void>;
|
|
12
|
+
ensureDirectory(input: any): Promise<void>;
|
|
13
|
+
load(input: any): Promise<CC10XMemory>;
|
|
14
|
+
private autoHealMemory;
|
|
15
|
+
updateActiveContext(input: any, updates: {
|
|
16
|
+
recentChanges?: string[];
|
|
17
|
+
decisions?: string[];
|
|
18
|
+
learnings?: string[];
|
|
19
|
+
nextSteps?: string[];
|
|
20
|
+
}): Promise<void>;
|
|
21
|
+
updateProgress(input: any, updates: {
|
|
22
|
+
currentWorkflow?: string;
|
|
23
|
+
tasks?: string[];
|
|
24
|
+
completed?: string[];
|
|
25
|
+
verification?: string[];
|
|
26
|
+
}): Promise<void>;
|
|
27
|
+
updatePatterns(input: any, updates: {
|
|
28
|
+
commonGotchas?: string[];
|
|
29
|
+
codeConventions?: string[];
|
|
30
|
+
architectureDecisions?: string[];
|
|
31
|
+
}): Promise<void>;
|
|
32
|
+
accumulateNotes(ctx: PluginContext, notes: string[]): Promise<void>;
|
|
33
|
+
persistAccumulatedNotes(input: any): Promise<void>;
|
|
34
|
+
saveCompactionCheckpoint(input: any): Promise<void>;
|
|
35
|
+
private writeMemoryFile;
|
|
36
|
+
private appendToSection;
|
|
37
|
+
private replaceOrAppendToSection;
|
|
38
|
+
clearCache(): void;
|
|
39
|
+
}
|
|
40
|
+
export declare const memoryManager: MemoryManager;
|
|
41
|
+
//# sourceMappingURL=memory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../src/memory.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AA6ED,qBAAa,aAAa;IACxB,OAAO,CAAC,GAAG,CAA8B;IACzC,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,YAAY,CAAgB;IAE9B,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAKrC,eAAe,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAiB1C,IAAI,CAAC,KAAK,E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1
|
+
import { readFile, writeFile, editFile } from './compatibility-layer';
|
|
2
|
+
const MEMORY_DIR = '.claude/cc10x';
|
|
3
|
+
const MEMORY_FILES = {
|
|
4
|
+
activeContext: `${MEMORY_DIR}/activeContext.md`,
|
|
5
|
+
patterns: `${MEMORY_DIR}/patterns.md`,
|
|
6
|
+
progress: `${MEMORY_DIR}/progress.md`
|
|
7
|
+
};
|
|
8
|
+
const DEFAULT_ACTIVE_CONTEXT = `# Active Context
|
|
9
|
+
|
|
10
|
+
<!-- CC10X: Do not rename headings. Used as Edit anchors. -->
|
|
11
|
+
|
|
12
|
+
## Current Focus
|
|
13
|
+
- [None yet - first workflow]
|
|
14
|
+
|
|
15
|
+
## Recent Changes
|
|
16
|
+
- [Initial cc10x setup]
|
|
17
|
+
|
|
18
|
+
## Next Steps
|
|
19
|
+
- [Awaiting first task]
|
|
20
|
+
|
|
21
|
+
## Decisions
|
|
22
|
+
- [No decisions recorded yet]
|
|
23
|
+
|
|
24
|
+
## Learnings
|
|
25
|
+
- [No learnings yet]
|
|
26
|
+
|
|
27
|
+
## References
|
|
28
|
+
- Plan: N/A
|
|
29
|
+
- Design: N/A
|
|
30
|
+
- Research: N/A
|
|
31
|
+
|
|
32
|
+
## Blockers
|
|
33
|
+
- [None]
|
|
34
|
+
|
|
35
|
+
## Last Updated
|
|
36
|
+
${new Date().toISOString()}
|
|
37
|
+
`;
|
|
38
|
+
const DEFAULT_PATTERNS = `# Project Patterns
|
|
39
|
+
|
|
40
|
+
<!-- CC10X: Do not rename headings. Used as Edit anchors. -->
|
|
41
|
+
|
|
42
|
+
## Common Gotchas
|
|
43
|
+
- [List project-specific issues and solutions here]
|
|
44
|
+
|
|
45
|
+
## Code Conventions
|
|
46
|
+
- [Document coding patterns and standards]
|
|
47
|
+
|
|
48
|
+
## Architecture Decisions
|
|
49
|
+
- [Record important architectural choices]
|
|
50
|
+
|
|
51
|
+
## Last Updated
|
|
52
|
+
${new Date().toISOString()}
|
|
53
|
+
`;
|
|
54
|
+
const DEFAULT_PROGRESS = `# Progress Tracking
|
|
55
|
+
|
|
56
|
+
<!-- CC10X: Do not rename headings. Used as Edit anchors. -->
|
|
57
|
+
|
|
58
|
+
## Current Workflow
|
|
59
|
+
- [None active]
|
|
60
|
+
|
|
61
|
+
## Tasks
|
|
62
|
+
- [ ] [No tasks yet]
|
|
63
|
+
|
|
64
|
+
## Completed
|
|
65
|
+
- [ ] [No completions yet]
|
|
66
|
+
|
|
67
|
+
## Verification
|
|
68
|
+
- [None yet]
|
|
69
|
+
|
|
70
|
+
## Last Updated
|
|
71
|
+
${new Date().toISOString()}
|
|
72
|
+
`;
|
|
73
|
+
export class MemoryManager {
|
|
74
|
+
ctx = null;
|
|
75
|
+
memoryCache = null;
|
|
76
|
+
pendingNotes = [];
|
|
77
|
+
async initialize(input) {
|
|
78
|
+
this.ctx = input;
|
|
79
|
+
await this.ensureDirectory(input);
|
|
80
|
+
}
|
|
81
|
+
async ensureDirectory(input) {
|
|
82
|
+
try {
|
|
83
|
+
// Use OpenCode's shell to create directory (permission-free)
|
|
84
|
+
const $ = input.$;
|
|
85
|
+
if (typeof $ !== 'function') {
|
|
86
|
+
throw new Error('Shell not available');
|
|
87
|
+
}
|
|
88
|
+
const result = await $ `mkdir -p ${MEMORY_DIR}`;
|
|
89
|
+
if (result.exitCode !== 0) {
|
|
90
|
+
throw new Error(`mkdir failed: ${result.stderr.toString()}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
console.warn('Could not create memory directory:', error);
|
|
95
|
+
// Don't throw - directory might already exist
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
async load(input) {
|
|
99
|
+
if (this.memoryCache) {
|
|
100
|
+
return this.memoryCache;
|
|
101
|
+
}
|
|
102
|
+
let memory = {
|
|
103
|
+
activeContext: '',
|
|
104
|
+
patterns: '',
|
|
105
|
+
progress: '',
|
|
106
|
+
lastUpdated: new Date().toISOString()
|
|
107
|
+
};
|
|
108
|
+
try {
|
|
109
|
+
// Try to read each memory file
|
|
110
|
+
for (const [key, path] of Object.entries(MEMORY_FILES)) {
|
|
111
|
+
try {
|
|
112
|
+
const content = await readFile(input, path);
|
|
113
|
+
memory[key] = content;
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
// File doesn't exist - will create with defaults
|
|
117
|
+
console.log(`Memory file ${path} not found, will create template`);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
console.warn('Error loading memory:', error);
|
|
123
|
+
}
|
|
124
|
+
// Ensure required sections exist (auto-heal)
|
|
125
|
+
memory = this.autoHealMemory(memory);
|
|
126
|
+
this.memoryCache = memory;
|
|
127
|
+
return memory; // Return cached reference
|
|
128
|
+
}
|
|
129
|
+
autoHealMemory(memory) {
|
|
130
|
+
// Ensure required sections exist in each file
|
|
131
|
+
const ensureSection = (content, sections) => {
|
|
132
|
+
for (const section of sections) {
|
|
133
|
+
if (!content.includes(section)) {
|
|
134
|
+
// Insert section before Last Updated
|
|
135
|
+
const lastUpdatedIndex = content.lastIndexOf('## Last Updated');
|
|
136
|
+
if (lastUpdatedIndex !== -1) {
|
|
137
|
+
content = content.slice(0, lastUpdatedIndex) +
|
|
138
|
+
`## ${section}\n- [N/A]\n\n` +
|
|
139
|
+
content.slice(lastUpdatedIndex);
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
// Append at end
|
|
143
|
+
content += `\n## ${section}\n- [N/A]\n`;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return content;
|
|
148
|
+
};
|
|
149
|
+
// Handle empty activeContext - create full template
|
|
150
|
+
if (!memory.activeContext || memory.activeContext.trim() === '') {
|
|
151
|
+
memory.activeContext = DEFAULT_ACTIVE_CONTEXT;
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
memory.activeContext = ensureSection(memory.activeContext, [
|
|
155
|
+
'References', 'Decisions', 'Learnings'
|
|
156
|
+
]);
|
|
157
|
+
}
|
|
158
|
+
// Handle empty patterns - create full template
|
|
159
|
+
if (!memory.patterns || memory.patterns.trim() === '') {
|
|
160
|
+
memory.patterns = DEFAULT_PATTERNS;
|
|
161
|
+
}
|
|
162
|
+
// Handle empty progress - create full template
|
|
163
|
+
if (!memory.progress || memory.progress.trim() === '') {
|
|
164
|
+
memory.progress = DEFAULT_PROGRESS;
|
|
165
|
+
}
|
|
166
|
+
return memory;
|
|
167
|
+
}
|
|
168
|
+
async updateActiveContext(input, updates) {
|
|
169
|
+
const memory = await this.load(input);
|
|
170
|
+
let content = memory.activeContext;
|
|
171
|
+
// Update Recent Changes
|
|
172
|
+
if (updates.recentChanges && updates.recentChanges.length > 0) {
|
|
173
|
+
content = this.appendToSection(content, '## Recent Changes', updates.recentChanges);
|
|
174
|
+
}
|
|
175
|
+
// Update Decisions
|
|
176
|
+
if (updates.decisions && updates.decisions.length > 0) {
|
|
177
|
+
content = this.appendToSection(content, '## Decisions', updates.decisions);
|
|
178
|
+
}
|
|
179
|
+
// Update Learnings
|
|
180
|
+
if (updates.learnings && updates.learnings.length > 0) {
|
|
181
|
+
content = this.appendToSection(content, '## Learnings', updates.learnings);
|
|
182
|
+
}
|
|
183
|
+
// Update Next Steps
|
|
184
|
+
if (updates.nextSteps && updates.nextSteps.length > 0) {
|
|
185
|
+
content = this.appendToSection(content, '## Next Steps', updates.nextSteps);
|
|
186
|
+
}
|
|
187
|
+
// Update Last Updated timestamp
|
|
188
|
+
content = content.replace(/## Last Updated\s*\n/, `## Last Updated\n${new Date().toISOString()}\n`);
|
|
189
|
+
await this.writeMemoryFile(input, MEMORY_FILES.activeContext, content);
|
|
190
|
+
}
|
|
191
|
+
async updateProgress(input, updates) {
|
|
192
|
+
const memory = await this.load(input);
|
|
193
|
+
let content = memory.progress;
|
|
194
|
+
if (updates.currentWorkflow) {
|
|
195
|
+
content = this.replaceOrAppendToSection(content, '## Current Workflow', [updates.currentWorkflow]);
|
|
196
|
+
}
|
|
197
|
+
if (updates.tasks && updates.tasks.length > 0) {
|
|
198
|
+
content = this.appendToSection(content, '## Tasks', updates.tasks);
|
|
199
|
+
}
|
|
200
|
+
if (updates.completed && updates.completed.length > 0) {
|
|
201
|
+
content = this.appendToSection(content, '## Completed', updates.completed);
|
|
202
|
+
}
|
|
203
|
+
if (updates.verification && updates.verification.length > 0) {
|
|
204
|
+
content = this.appendToSection(content, '## Verification', updates.verification);
|
|
205
|
+
}
|
|
206
|
+
// Update Last Updated timestamp
|
|
207
|
+
content = content.replace(/## Last Updated\s*\n/, `## Last Updated\n${new Date().toISOString()}\n`);
|
|
208
|
+
await this.writeMemoryFile(input, MEMORY_FILES.progress, content);
|
|
209
|
+
}
|
|
210
|
+
async updatePatterns(input, updates) {
|
|
211
|
+
const memory = await this.load(input);
|
|
212
|
+
let content = memory.patterns;
|
|
213
|
+
if (updates.commonGotchas && updates.commonGotchas.length > 0) {
|
|
214
|
+
content = this.appendToSection(content, '## Common Gotchas', updates.commonGotchas);
|
|
215
|
+
}
|
|
216
|
+
if (updates.codeConventions && updates.codeConventions.length > 0) {
|
|
217
|
+
content = this.appendToSection(content, '## Code Conventions', updates.codeConventions);
|
|
218
|
+
}
|
|
219
|
+
if (updates.architectureDecisions && updates.architectureDecisions.length > 0) {
|
|
220
|
+
content = this.appendToSection(content, '## Architecture Decisions', updates.architectureDecisions);
|
|
221
|
+
}
|
|
222
|
+
// Update Last Updated timestamp
|
|
223
|
+
content = content.replace(/## Last Updated\s*\n/, `## Last Updated\n${new Date().toISOString()}\n`);
|
|
224
|
+
await this.writeMemoryFile(ctx, MEMORY_FILES.patterns, content);
|
|
225
|
+
}
|
|
226
|
+
async accumulateNotes(ctx, notes) {
|
|
227
|
+
this.pendingNotes.push(...notes);
|
|
228
|
+
}
|
|
229
|
+
async persistAccumulatedNotes(input) {
|
|
230
|
+
if (this.pendingNotes.length === 0)
|
|
231
|
+
return;
|
|
232
|
+
// Categorize notes and distribute to appropriate files
|
|
233
|
+
const learnings = [];
|
|
234
|
+
const patterns = [];
|
|
235
|
+
const verification = [];
|
|
236
|
+
for (const note of this.pendingNotes) {
|
|
237
|
+
if (note.toLowerCase().includes('verification') || note.includes('exit code')) {
|
|
238
|
+
verification.push(note);
|
|
239
|
+
}
|
|
240
|
+
else if (note.toLowerCase().includes('pattern') || note.toLowerCase().includes('gotcha')) {
|
|
241
|
+
patterns.push(note);
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
learnings.push(note);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
if (learnings.length > 0) {
|
|
248
|
+
await this.updateActiveContext(input, { learnings });
|
|
249
|
+
}
|
|
250
|
+
if (patterns.length > 0) {
|
|
251
|
+
await this.updatePatterns(input, { commonGotchas: patterns });
|
|
252
|
+
}
|
|
253
|
+
if (verification.length > 0) {
|
|
254
|
+
await this.updateProgress(input, { verification });
|
|
255
|
+
}
|
|
256
|
+
this.pendingNotes = [];
|
|
257
|
+
}
|
|
258
|
+
async saveCompactionCheckpoint(input) {
|
|
259
|
+
// Save critical state before compaction
|
|
260
|
+
await this.persistAccumulatedNotes(input);
|
|
261
|
+
}
|
|
262
|
+
async writeMemoryFile(input, path, content) {
|
|
263
|
+
try {
|
|
264
|
+
// Use Edit for existing files, Write for new ones
|
|
265
|
+
try {
|
|
266
|
+
await readFile(input, path);
|
|
267
|
+
// File exists, use Edit
|
|
268
|
+
const currentContent = await readFile(input, path);
|
|
269
|
+
await editFile(input, {
|
|
270
|
+
oldString: currentContent,
|
|
271
|
+
newString: content
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
catch {
|
|
275
|
+
// File doesn't exist, use Write
|
|
276
|
+
await writeFile(input, path, content);
|
|
277
|
+
}
|
|
278
|
+
// Update cache
|
|
279
|
+
if (path.includes('activeContext')) {
|
|
280
|
+
this.memoryCache.activeContext = content;
|
|
281
|
+
}
|
|
282
|
+
else if (path.includes('patterns')) {
|
|
283
|
+
this.memoryCache.patterns = content;
|
|
284
|
+
}
|
|
285
|
+
else if (path.includes('progress')) {
|
|
286
|
+
this.memoryCache.progress = content;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
catch (error) {
|
|
290
|
+
console.error('Failed to write memory file:', path, error);
|
|
291
|
+
throw error;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
appendToSection(content, sectionHeader, newItems) {
|
|
295
|
+
const sectionIndex = content.indexOf(sectionHeader);
|
|
296
|
+
if (sectionIndex === -1) {
|
|
297
|
+
// Section doesn't exist, add it before Last Updated
|
|
298
|
+
const lastUpdatedIndex = content.lastIndexOf('## Last Updated');
|
|
299
|
+
if (lastUpdatedIndex !== -1) {
|
|
300
|
+
const items = newItems.map(item => `- [${new Date().toISOString().split('T')[0]}] ${item}`).join('\n');
|
|
301
|
+
return content.slice(0, lastUpdatedIndex) +
|
|
302
|
+
`${sectionHeader}\n${items}\n\n` +
|
|
303
|
+
content.slice(lastUpdatedIndex);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
// Find the section and append items
|
|
307
|
+
const lines = content.split('\n');
|
|
308
|
+
const sectionLineIndex = lines.findIndex(line => line.includes(sectionHeader));
|
|
309
|
+
if (sectionLineIndex !== -1) {
|
|
310
|
+
// Find next section or end of file
|
|
311
|
+
let insertIndex = sectionLineIndex + 1;
|
|
312
|
+
while (insertIndex < lines.length && !lines[insertIndex].startsWith('##')) {
|
|
313
|
+
insertIndex++;
|
|
314
|
+
}
|
|
315
|
+
const items = newItems.map(item => `- [${new Date().toISOString().split('T')[0]}] ${item}`);
|
|
316
|
+
lines.splice(insertIndex, 0, ...items);
|
|
317
|
+
return lines.join('\n');
|
|
318
|
+
}
|
|
319
|
+
return content;
|
|
320
|
+
}
|
|
321
|
+
replaceOrAppendToSection(content, sectionHeader, newItems) {
|
|
322
|
+
// Similar to appendToSection but replaces existing content
|
|
323
|
+
return this.appendToSection(content, sectionHeader, newItems);
|
|
324
|
+
}
|
|
325
|
+
clearCache() {
|
|
326
|
+
this.memoryCache = null;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
export const memoryManager = new MemoryManager();
|
|
330
|
+
//# sourceMappingURL=memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../src/memory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAS,MAAM,uBAAuB,CAAC;AAS7E,MAAM,UAAU,GAAG,eAAe,CAAC;AACnC,MAAM,YAAY,GAAG;IACnB,aAAa,EAAE,GAAG,UAAU,mBAAmB;IAC/C,QAAQ,EAAE,GAAG,UAAU,cAAc;IACrC,QAAQ,EAAE,GAAG,UAAU,cAAc;CACtC,CAAC;AAEF,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4B7B,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;CACzB,CAAC;AAEF,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;EAcvB,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;CACzB,CAAC;AAEF,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;EAiBvB,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;CACzB,CAAC;AAEF,MAAM,OAAO,aAAa;IAChB,GAAG,GAAyB,IAAI,CAAC;IACjC,WAAW,GAAuB,IAAI,CAAC;IACvC,YAAY,GAAa,EAAE,CAAC;IAEpC,KAAK,CAAC,UAAU,CAAC,KAAU;QACzB,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC;QACjB,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,KAAU;QAC9B,IAAI,CAAC;YACH,6DAA6D;YAC7D,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;YAClB,IAAI,OAAO,CAAC,KAAK,UAAU,EAAE,CAAC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,CAAC;YACvC,OAAO,WAAW,GAAG,KAAK,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC1E,WAAW,EAAE,CAAC;YAChB,CAAC;YAED,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;YAC5F,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC;YAEvC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAEO,wBAAwB,CAAC,OAAe,EAAE,aAAqB,EAAE,QAAkB;QACzF,2DAA2D;QAC3D,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAC;IAChE,CAAC;IAED,UAAU;QACR,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC1B,CAAC;CACF;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC"}
|
package/dist/router.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ToolInput, ToolOutput } from '@opencode-ai/plugin';
|
|
2
|
+
export interface RouterHooks {
|
|
3
|
+
messageReceived: (input: ToolInput, output: ToolOutput) => Promise<void>;
|
|
4
|
+
sessionCreated: (input: any, output: any) => Promise<void>;
|
|
5
|
+
sessionCompacted: (input: any, output: any) => Promise<void>;
|
|
6
|
+
toolExecuteBefore: (input: ToolInput, output: ToolOutput) => Promise<void>;
|
|
7
|
+
toolExecuteAfter: (input: ToolInput, output: ToolOutput) => Promise<void>;
|
|
8
|
+
agentStarted: (input: any, output: any) => Promise<void>;
|
|
9
|
+
agentCompleted: (input: any, output: any) => Promise<void>;
|
|
10
|
+
manualInvoke: (args: any, context: any) => Promise<string>;
|
|
11
|
+
}
|
|
12
|
+
export declare function cc10xRouter(input: any): Promise<{
|
|
13
|
+
routerHooks: RouterHooks;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAMhF,MAAM,WAAW,WAAW;IAC1B,eAAe,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzE,cAAc,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,gBAAgB,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,iBAAiB,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3E,gBAAgB,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,YAAY,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,cAAc,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,YAAY,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,KAAK,OAAO,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