vibe-coding-mcp 2.3.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/README.md +179 -0
- package/dist/__tests__/collectCodeContext.test.d.ts +2 -0
- package/dist/__tests__/collectCodeContext.test.d.ts.map +1 -0
- package/dist/__tests__/collectCodeContext.test.js +139 -0
- package/dist/__tests__/collectCodeContext.test.js.map +1 -0
- package/dist/__tests__/createSessionLog.test.d.ts +2 -0
- package/dist/__tests__/createSessionLog.test.d.ts.map +1 -0
- package/dist/__tests__/createSessionLog.test.js +130 -0
- package/dist/__tests__/createSessionLog.test.js.map +1 -0
- package/dist/__tests__/generateDevDocument.test.d.ts +2 -0
- package/dist/__tests__/generateDevDocument.test.d.ts.map +1 -0
- package/dist/__tests__/generateDevDocument.test.js +174 -0
- package/dist/__tests__/generateDevDocument.test.js.map +1 -0
- package/dist/__tests__/normalizeForPlatform.test.d.ts +2 -0
- package/dist/__tests__/normalizeForPlatform.test.d.ts.map +1 -0
- package/dist/__tests__/normalizeForPlatform.test.js +171 -0
- package/dist/__tests__/normalizeForPlatform.test.js.map +1 -0
- package/dist/__tests__/publishDocument.test.d.ts +2 -0
- package/dist/__tests__/publishDocument.test.d.ts.map +1 -0
- package/dist/__tests__/publishDocument.test.js +93 -0
- package/dist/__tests__/publishDocument.test.js.map +1 -0
- package/dist/__tests__/summarizeDesignDecisions.test.d.ts +2 -0
- package/dist/__tests__/summarizeDesignDecisions.test.d.ts.map +1 -0
- package/dist/__tests__/summarizeDesignDecisions.test.js +158 -0
- package/dist/__tests__/summarizeDesignDecisions.test.js.map +1 -0
- package/dist/core/cache.d.ts +39 -0
- package/dist/core/cache.d.ts.map +1 -0
- package/dist/core/cache.js +112 -0
- package/dist/core/cache.js.map +1 -0
- package/dist/core/config.d.ts +30 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +90 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/errors.d.ts +52 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +99 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/logger.d.ts +57 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +114 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/schemas.d.ts +690 -0
- package/dist/core/schemas.d.ts.map +1 -0
- package/dist/core/schemas.js +136 -0
- package/dist/core/schemas.js.map +1 -0
- package/dist/core/security.d.ts +28 -0
- package/dist/core/security.d.ts.map +1 -0
- package/dist/core/security.js +103 -0
- package/dist/core/security.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +168 -0
- package/dist/index.js.map +1 -0
- package/dist/platforms/confluence.d.ts +13 -0
- package/dist/platforms/confluence.d.ts.map +1 -0
- package/dist/platforms/confluence.js +178 -0
- package/dist/platforms/confluence.js.map +1 -0
- package/dist/platforms/discord.d.ts +54 -0
- package/dist/platforms/discord.d.ts.map +1 -0
- package/dist/platforms/discord.js +176 -0
- package/dist/platforms/discord.js.map +1 -0
- package/dist/platforms/github-wiki.d.ts +3 -0
- package/dist/platforms/github-wiki.d.ts.map +1 -0
- package/dist/platforms/github-wiki.js +120 -0
- package/dist/platforms/github-wiki.js.map +1 -0
- package/dist/platforms/notion.d.ts +3 -0
- package/dist/platforms/notion.d.ts.map +1 -0
- package/dist/platforms/notion.js +205 -0
- package/dist/platforms/notion.js.map +1 -0
- package/dist/platforms/obsidian.d.ts +3 -0
- package/dist/platforms/obsidian.d.ts.map +1 -0
- package/dist/platforms/obsidian.js +43 -0
- package/dist/platforms/obsidian.js.map +1 -0
- package/dist/platforms/slack.d.ts +21 -0
- package/dist/platforms/slack.d.ts.map +1 -0
- package/dist/platforms/slack.js +217 -0
- package/dist/platforms/slack.js.map +1 -0
- package/dist/stdio.d.ts +6 -0
- package/dist/stdio.d.ts.map +1 -0
- package/dist/stdio.js +98 -0
- package/dist/stdio.js.map +1 -0
- package/dist/tools/analyzeCode.d.ts +65 -0
- package/dist/tools/analyzeCode.d.ts.map +1 -0
- package/dist/tools/analyzeCode.js +113 -0
- package/dist/tools/analyzeCode.js.map +1 -0
- package/dist/tools/collectCodeContext.d.ts +86 -0
- package/dist/tools/collectCodeContext.d.ts.map +1 -0
- package/dist/tools/collectCodeContext.js +275 -0
- package/dist/tools/collectCodeContext.js.map +1 -0
- package/dist/tools/createSessionLog.d.ts +79 -0
- package/dist/tools/createSessionLog.d.ts.map +1 -0
- package/dist/tools/createSessionLog.js +160 -0
- package/dist/tools/createSessionLog.js.map +1 -0
- package/dist/tools/generateDevDocument.d.ts +216 -0
- package/dist/tools/generateDevDocument.d.ts.map +1 -0
- package/dist/tools/generateDevDocument.js +659 -0
- package/dist/tools/generateDevDocument.js.map +1 -0
- package/dist/tools/normalizeForPlatform.d.ts +95 -0
- package/dist/tools/normalizeForPlatform.d.ts.map +1 -0
- package/dist/tools/normalizeForPlatform.js +340 -0
- package/dist/tools/normalizeForPlatform.js.map +1 -0
- package/dist/tools/publishDocument.d.ts +60 -0
- package/dist/tools/publishDocument.d.ts.map +1 -0
- package/dist/tools/publishDocument.js +117 -0
- package/dist/tools/publishDocument.js.map +1 -0
- package/dist/tools/summarizeDesignDecisions.d.ts +82 -0
- package/dist/tools/summarizeDesignDecisions.d.ts.map +1 -0
- package/dist/tools/summarizeDesignDecisions.js +361 -0
- package/dist/tools/summarizeDesignDecisions.js.map +1 -0
- package/dist/types/index.d.ts +63 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/astParser.d.ts +55 -0
- package/dist/utils/astParser.d.ts.map +1 -0
- package/dist/utils/astParser.js +333 -0
- package/dist/utils/astParser.js.map +1 -0
- package/dist/utils/i18n.d.ts +67 -0
- package/dist/utils/i18n.d.ts.map +1 -0
- package/dist/utils/i18n.js +193 -0
- package/dist/utils/i18n.js.map +1 -0
- package/dist/utils/markdown.d.ts +9 -0
- package/dist/utils/markdown.d.ts.map +1 -0
- package/dist/utils/markdown.js +99 -0
- package/dist/utils/markdown.js.map +1 -0
- package/dist/utils/mermaidGenerator.d.ts +69 -0
- package/dist/utils/mermaidGenerator.d.ts.map +1 -0
- package/dist/utils/mermaidGenerator.js +315 -0
- package/dist/utils/mermaidGenerator.js.map +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { publishToNotion } from '../platforms/notion.js';
|
|
2
|
+
import { publishToGitHubWiki } from '../platforms/github-wiki.js';
|
|
3
|
+
import { publishToObsidian } from '../platforms/obsidian.js';
|
|
4
|
+
import { publishToConfluence } from '../platforms/confluence.js';
|
|
5
|
+
import { sendSlackNotification } from '../platforms/slack.js';
|
|
6
|
+
import { sendDiscordNotification } from '../platforms/discord.js';
|
|
7
|
+
import { createToolLogger } from '../core/logger.js';
|
|
8
|
+
const logger = createToolLogger('publishDocument');
|
|
9
|
+
export async function publishDocument(input) {
|
|
10
|
+
const { document, title, platform, options } = input;
|
|
11
|
+
let result;
|
|
12
|
+
logger.info('Publishing document', { platform, title });
|
|
13
|
+
try {
|
|
14
|
+
switch (platform) {
|
|
15
|
+
case 'notion':
|
|
16
|
+
result = await publishToNotion(document, title, options);
|
|
17
|
+
break;
|
|
18
|
+
case 'github-wiki':
|
|
19
|
+
result = await publishToGitHubWiki(document, title, options);
|
|
20
|
+
break;
|
|
21
|
+
case 'obsidian':
|
|
22
|
+
result = await publishToObsidian(document, title, options);
|
|
23
|
+
break;
|
|
24
|
+
case 'confluence':
|
|
25
|
+
result = await publishToConfluence(document, title, options);
|
|
26
|
+
break;
|
|
27
|
+
case 'slack': {
|
|
28
|
+
const slackResult = await sendSlackNotification(`📄 **${title}**\n\n${document.slice(0, 2000)}${document.length > 2000 ? '...' : ''}`, { webhookUrl: options?.webhookUrl });
|
|
29
|
+
result = {
|
|
30
|
+
success: slackResult.success,
|
|
31
|
+
platform: 'slack',
|
|
32
|
+
error: slackResult.error
|
|
33
|
+
};
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
case 'discord': {
|
|
37
|
+
const discordResult = await sendDiscordNotification(`📄 **${title}**\n\n${document.slice(0, 2000)}${document.length > 2000 ? '...' : ''}`, { webhookUrl: options?.webhookUrl });
|
|
38
|
+
result = {
|
|
39
|
+
success: discordResult.success,
|
|
40
|
+
platform: 'discord',
|
|
41
|
+
error: discordResult.error
|
|
42
|
+
};
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
default:
|
|
46
|
+
result = {
|
|
47
|
+
success: false,
|
|
48
|
+
platform,
|
|
49
|
+
error: `Unsupported platform: ${platform}`
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
if (result.success) {
|
|
53
|
+
logger.info('Document published successfully', { platform, url: result.url });
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
logger.warn('Document publish failed', { platform, error: result.error });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
logger.error('Document publish error', error, { platform });
|
|
61
|
+
result = {
|
|
62
|
+
success: false,
|
|
63
|
+
platform,
|
|
64
|
+
error: error instanceof Error ? error.message : 'Unknown error occurred'
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
return { result };
|
|
68
|
+
}
|
|
69
|
+
export const publishDocumentSchema = {
|
|
70
|
+
name: 'muse_publish_document',
|
|
71
|
+
description: 'Publishes generated documents to external platforms (Notion, GitHub Wiki, Obsidian, Confluence, Slack, or Discord).',
|
|
72
|
+
inputSchema: {
|
|
73
|
+
type: 'object',
|
|
74
|
+
properties: {
|
|
75
|
+
document: {
|
|
76
|
+
type: 'string',
|
|
77
|
+
description: 'The document content to publish'
|
|
78
|
+
},
|
|
79
|
+
title: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
description: 'Title of the document'
|
|
82
|
+
},
|
|
83
|
+
platform: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
enum: ['notion', 'github-wiki', 'obsidian', 'confluence', 'slack', 'discord'],
|
|
86
|
+
description: 'Target platform for publishing'
|
|
87
|
+
},
|
|
88
|
+
options: {
|
|
89
|
+
type: 'object',
|
|
90
|
+
properties: {
|
|
91
|
+
parentPageId: {
|
|
92
|
+
type: 'string',
|
|
93
|
+
description: 'Parent page ID for Notion or Confluence'
|
|
94
|
+
},
|
|
95
|
+
wikiPath: {
|
|
96
|
+
type: 'string',
|
|
97
|
+
description: 'Path in the wiki for GitHub Wiki'
|
|
98
|
+
},
|
|
99
|
+
vaultPath: {
|
|
100
|
+
type: 'string',
|
|
101
|
+
description: 'Vault path for Obsidian'
|
|
102
|
+
},
|
|
103
|
+
filename: {
|
|
104
|
+
type: 'string',
|
|
105
|
+
description: 'Custom filename for the document'
|
|
106
|
+
},
|
|
107
|
+
webhookUrl: {
|
|
108
|
+
type: 'string',
|
|
109
|
+
description: 'Webhook URL for Slack or Discord'
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
required: ['document', 'title', 'platform']
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
//# sourceMappingURL=publishDocument.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publishDocument.js","sourceRoot":"","sources":["../../src/tools/publishDocument.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,MAAM,GAAG,gBAAgB,CAAC,iBAA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M,CAAC,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,qHAAqH;IAClI,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iCAAiC;aAC/C;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uBAAuB;aACrC;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,CAAC;gBAC7E,WAAW,EAAE,gCAAgC;aAC9C;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,YAAY,EAAE;wBACZ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,yCAAyC;qBACvD;oBACD,QAAQ,EAAE;wBACR,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,kCAAkC;qBAChD;oBACD,SAAS,EAAE;wBACT,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,yBAAyB;qBACvC;oBACD,QAAQ,EAAE;wBACR,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,kCAAkC;qBAChD;oBACD,UAAU,EAAE;wBACV,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,kCAAkC;qBAChD;iBACF;aACF;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC;KAC5C;CACF,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { DesignDecision } from '../types/index.js';
|
|
2
|
+
export interface SummarizeDesignDecisionsInput {
|
|
3
|
+
conversationLog: string;
|
|
4
|
+
projectContext?: string;
|
|
5
|
+
language?: 'en' | 'ko' | 'auto';
|
|
6
|
+
includeImportanceScore?: boolean;
|
|
7
|
+
extractRelatedCode?: boolean;
|
|
8
|
+
maxDecisions?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface EnhancedDesignDecision extends DesignDecision {
|
|
11
|
+
importance: 'high' | 'medium' | 'low';
|
|
12
|
+
importanceScore: number;
|
|
13
|
+
relatedCode?: string[];
|
|
14
|
+
dependencies?: string[];
|
|
15
|
+
tradeoffs?: string[];
|
|
16
|
+
keywords: string[];
|
|
17
|
+
}
|
|
18
|
+
export interface SummarizeDesignDecisionsOutput {
|
|
19
|
+
decisions: EnhancedDesignDecision[];
|
|
20
|
+
summary: string;
|
|
21
|
+
stats: {
|
|
22
|
+
totalDecisions: number;
|
|
23
|
+
byCategory: Record<string, number>;
|
|
24
|
+
byImportance: Record<string, number>;
|
|
25
|
+
topKeywords: string[];
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Analyzes conversation logs to extract and summarize design decisions
|
|
30
|
+
*
|
|
31
|
+
* @param input - The input parameters
|
|
32
|
+
* @param input.conversationLog - The conversation text to analyze
|
|
33
|
+
* @param input.projectContext - Optional project context for better categorization
|
|
34
|
+
* @param input.language - Language setting ('en', 'ko', or 'auto' for detection)
|
|
35
|
+
* @param input.includeImportanceScore - Whether to include importance scoring
|
|
36
|
+
* @param input.extractRelatedCode - Whether to extract related code blocks
|
|
37
|
+
* @param input.maxDecisions - Maximum number of decisions to extract
|
|
38
|
+
* @returns Object containing decisions array, summary text, and statistics
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* const result = summarizeDesignDecisions({
|
|
42
|
+
* conversationLog: "We decided to use React instead of Vue because...",
|
|
43
|
+
* language: 'auto'
|
|
44
|
+
* });
|
|
45
|
+
*/
|
|
46
|
+
export declare function summarizeDesignDecisions(input: SummarizeDesignDecisionsInput): SummarizeDesignDecisionsOutput;
|
|
47
|
+
export declare const summarizeDesignDecisionsSchema: {
|
|
48
|
+
name: string;
|
|
49
|
+
description: string;
|
|
50
|
+
inputSchema: {
|
|
51
|
+
type: string;
|
|
52
|
+
properties: {
|
|
53
|
+
conversationLog: {
|
|
54
|
+
type: string;
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
projectContext: {
|
|
58
|
+
type: string;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
language: {
|
|
62
|
+
type: string;
|
|
63
|
+
enum: string[];
|
|
64
|
+
description: string;
|
|
65
|
+
};
|
|
66
|
+
includeImportanceScore: {
|
|
67
|
+
type: string;
|
|
68
|
+
description: string;
|
|
69
|
+
};
|
|
70
|
+
extractRelatedCode: {
|
|
71
|
+
type: string;
|
|
72
|
+
description: string;
|
|
73
|
+
};
|
|
74
|
+
maxDecisions: {
|
|
75
|
+
type: string;
|
|
76
|
+
description: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
required: string[];
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=summarizeDesignDecisions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summarizeDesignDecisions.d.ts","sourceRoot":"","sources":["../../src/tools/summarizeDesignDecisions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,MAAM,WAAW,6BAA6B;IAC5C,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAChC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IACtC,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,8BAA8B;IAC7C,SAAS,EAAE,sBAAsB,EAAE,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE;QACL,cAAc,EAAE,MAAM,CAAC;QACvB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACrC,WAAW,EAAE,MAAM,EAAE,CAAC;KACvB,CAAC;CACH;AAqOD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,GAAG,8BAA8B,CAyH7G;AAED,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC1C,CAAC"}
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import { generateId, getCurrentTimestamp } from '../utils/markdown.js';
|
|
2
|
+
// 디자인 결정 카테고리 키워드 (영어 + 한국어)
|
|
3
|
+
const categoryKeywords = {
|
|
4
|
+
architecture: {
|
|
5
|
+
en: ['architecture', 'structure', 'layer', 'module', 'component', 'system', 'design', 'microservice', 'monolith', 'serverless'],
|
|
6
|
+
ko: ['아키텍처', '구조', '레이어', '모듈', '컴포넌트', '시스템', '설계', '마이크로서비스']
|
|
7
|
+
},
|
|
8
|
+
implementation: {
|
|
9
|
+
en: ['implement', 'code', 'function', 'method', 'algorithm', 'logic', 'class', 'interface', 'type'],
|
|
10
|
+
ko: ['구현', '코드', '함수', '메서드', '알고리즘', '로직', '클래스', '인터페이스', '타입']
|
|
11
|
+
},
|
|
12
|
+
library: {
|
|
13
|
+
en: ['library', 'package', 'dependency', 'framework', 'sdk', 'api', 'npm', 'pip', 'cargo', 'gem'],
|
|
14
|
+
ko: ['라이브러리', '패키지', '의존성', '프레임워크', '라이브러리 선택']
|
|
15
|
+
},
|
|
16
|
+
pattern: {
|
|
17
|
+
en: ['pattern', 'strategy', 'factory', 'singleton', 'observer', 'mvc', 'mvvm', 'repository', 'decorator', 'adapter'],
|
|
18
|
+
ko: ['패턴', '전략', '팩토리', '싱글톤', '옵저버', '디자인패턴']
|
|
19
|
+
},
|
|
20
|
+
other: { en: [], ko: [] }
|
|
21
|
+
};
|
|
22
|
+
// 결정 패턴 (영어 + 한국어)
|
|
23
|
+
const decisionPatterns = {
|
|
24
|
+
en: [
|
|
25
|
+
/(?:decided|chose|selected|picked|went with|using|implemented|opted for|settled on)\s+(.+?)(?:\.|$)/gi,
|
|
26
|
+
/(?:we(?:'ll| will)?|I(?:'ll| will)?)\s+(?:use|go with|implement|choose)\s+(.+?)(?:\.|$)/gi,
|
|
27
|
+
/(?:the (?:best|right|better) (?:choice|option|approach) is)\s+(.+?)(?:\.|$)/gi,
|
|
28
|
+
/(?:let's|we should|I recommend)\s+(?:use|go with|implement)\s+(.+?)(?:\.|$)/gi
|
|
29
|
+
],
|
|
30
|
+
ko: [
|
|
31
|
+
/(.+?)(?:을|를|으로|로)\s*(?:선택|결정|사용|채택|적용)(?:했|하기로|할)/gi,
|
|
32
|
+
/(.+?)(?:이|가)\s*(?:더 낫|적합|좋|맞)/gi,
|
|
33
|
+
/(?:결정|선택):\s*(.+?)(?:\.|$)/gi,
|
|
34
|
+
/(.+?)(?:을|를)\s*(?:쓰기로|쓰겠)/gi
|
|
35
|
+
]
|
|
36
|
+
};
|
|
37
|
+
// 이유 패턴
|
|
38
|
+
const rationalePatterns = {
|
|
39
|
+
en: [
|
|
40
|
+
/because\s+(.+?)(?:\.|$)/i,
|
|
41
|
+
/since\s+(.+?)(?:\.|$)/i,
|
|
42
|
+
/(?:the reason|rationale)(?:\s+is)?:?\s*(.+?)(?:\.|$)/i,
|
|
43
|
+
/due to\s+(.+?)(?:\.|$)/i,
|
|
44
|
+
/as\s+(.+?)(?:\.|$)/i,
|
|
45
|
+
/(?:this|it) (?:allows?|enables?|provides?|offers?)\s+(.+?)(?:\.|$)/i
|
|
46
|
+
],
|
|
47
|
+
ko: [
|
|
48
|
+
/(?:왜냐하면|이유는?|때문에)\s*(.+?)(?:\.|$)/i,
|
|
49
|
+
/(.+?)(?:이기 때문|라서|니까)/i,
|
|
50
|
+
/(?:장점|이점)(?:은|이)?\s*(.+?)(?:\.|$)/i
|
|
51
|
+
]
|
|
52
|
+
};
|
|
53
|
+
// 대안 패턴
|
|
54
|
+
const alternativePatterns = {
|
|
55
|
+
en: [
|
|
56
|
+
/instead of\s+(.+?)(?:\.|,|$)/gi,
|
|
57
|
+
/rather than\s+(.+?)(?:\.|,|$)/gi,
|
|
58
|
+
/over\s+(.+?)(?:\.|,|but|$)/gi,
|
|
59
|
+
/(?:not|didn't choose|avoided)\s+(.+?)(?:\.|,|$)/gi,
|
|
60
|
+
/compared to\s+(.+?)(?:\.|,|$)/gi
|
|
61
|
+
],
|
|
62
|
+
ko: [
|
|
63
|
+
/(.+?)(?:대신|말고)/gi,
|
|
64
|
+
/(.+?)(?:보다|보단)\s*(?:낫|좋|적합)/gi,
|
|
65
|
+
/(.+?)(?:은|는)\s*(?:안|않)/gi
|
|
66
|
+
]
|
|
67
|
+
};
|
|
68
|
+
// 트레이드오프 패턴
|
|
69
|
+
const tradeoffPatterns = {
|
|
70
|
+
en: [
|
|
71
|
+
/(?:trade-?off|downside|drawback|con)(?:\s+is)?:?\s*(.+?)(?:\.|$)/gi,
|
|
72
|
+
/(?:but|however|although)\s+(.+?)(?:\.|$)/gi,
|
|
73
|
+
/(?:at the cost of|sacrifice)\s+(.+?)(?:\.|$)/gi
|
|
74
|
+
],
|
|
75
|
+
ko: [
|
|
76
|
+
/(?:단점|트레이드오프|대가)(?:은|는|이)?\s*(.+?)(?:\.|$)/gi,
|
|
77
|
+
/(?:하지만|그러나|다만)\s*(.+?)(?:\.|$)/gi
|
|
78
|
+
]
|
|
79
|
+
};
|
|
80
|
+
// 코드 블록 추출 (함수 내에서 새 regex 생성)
|
|
81
|
+
/**
|
|
82
|
+
* Detects the primary language of the given text
|
|
83
|
+
* @param text - The text to analyze
|
|
84
|
+
* @returns 'ko' if Korean characters make up more than 10% of the text, 'en' otherwise
|
|
85
|
+
*/
|
|
86
|
+
function detectLanguage(text) {
|
|
87
|
+
const koreanCount = (text.match(/[\uAC00-\uD7AF]/g) || []).length;
|
|
88
|
+
const totalChars = text.replace(/\s/g, '').length;
|
|
89
|
+
return koreanCount / totalChars > 0.1 ? 'ko' : 'en';
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Infers the design decision category based on keywords in the text
|
|
93
|
+
* @param text - The decision text to analyze
|
|
94
|
+
* @param lang - The language of the text ('en' or 'ko')
|
|
95
|
+
* @returns The inferred category (architecture, implementation, library, pattern, or other)
|
|
96
|
+
*/
|
|
97
|
+
function inferCategory(text, lang) {
|
|
98
|
+
const lowerText = text.toLowerCase();
|
|
99
|
+
for (const [category, keywords] of Object.entries(categoryKeywords)) {
|
|
100
|
+
if (category === 'other')
|
|
101
|
+
continue;
|
|
102
|
+
const langKeywords = keywords[lang] || keywords.en;
|
|
103
|
+
if (langKeywords.some(keyword => lowerText.includes(keyword.toLowerCase()))) {
|
|
104
|
+
return category;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return 'other';
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Calculates the importance score of a design decision
|
|
111
|
+
* @param decision - The decision text
|
|
112
|
+
* @param fullText - The full conversation text for context
|
|
113
|
+
* @returns An object containing the importance level and numeric score (0-100)
|
|
114
|
+
*/
|
|
115
|
+
function calculateImportance(decision, fullText) {
|
|
116
|
+
let score = 50; // 기본 점수
|
|
117
|
+
// 강조 표현
|
|
118
|
+
const highImportancePatterns = [
|
|
119
|
+
/critical|crucial|essential|must|required|key|important|major|significant/i,
|
|
120
|
+
/핵심|중요|필수|반드시|꼭/
|
|
121
|
+
];
|
|
122
|
+
const mediumImportancePatterns = [
|
|
123
|
+
/should|recommend|prefer|better|good|nice/i,
|
|
124
|
+
/좋|권장|추천/
|
|
125
|
+
];
|
|
126
|
+
for (const pattern of highImportancePatterns) {
|
|
127
|
+
if (pattern.test(decision))
|
|
128
|
+
score += 30;
|
|
129
|
+
}
|
|
130
|
+
for (const pattern of mediumImportancePatterns) {
|
|
131
|
+
if (pattern.test(decision))
|
|
132
|
+
score += 15;
|
|
133
|
+
}
|
|
134
|
+
// 본문에서 언급 횟수
|
|
135
|
+
const mentionCount = (fullText.match(new RegExp(decision.slice(0, 30).replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'gi')) || []).length;
|
|
136
|
+
score += Math.min(mentionCount * 5, 20);
|
|
137
|
+
// 정규화
|
|
138
|
+
score = Math.min(Math.max(score, 0), 100);
|
|
139
|
+
let level;
|
|
140
|
+
if (score >= 70)
|
|
141
|
+
level = 'high';
|
|
142
|
+
else if (score >= 40)
|
|
143
|
+
level = 'medium';
|
|
144
|
+
else
|
|
145
|
+
level = 'low';
|
|
146
|
+
return { level, score };
|
|
147
|
+
}
|
|
148
|
+
// 제목 생성
|
|
149
|
+
function generateTitle(decision, category) {
|
|
150
|
+
// 주요 키워드 추출
|
|
151
|
+
const keywords = decision
|
|
152
|
+
.replace(/[^\w\s가-힣]/g, ' ')
|
|
153
|
+
.split(/\s+/)
|
|
154
|
+
.filter(word => word.length > 2)
|
|
155
|
+
.slice(0, 3);
|
|
156
|
+
if (keywords.length === 0) {
|
|
157
|
+
return `${category.charAt(0).toUpperCase() + category.slice(1)} Decision`;
|
|
158
|
+
}
|
|
159
|
+
return keywords.join(' ').substring(0, 50);
|
|
160
|
+
}
|
|
161
|
+
// 키워드 추출
|
|
162
|
+
function extractKeywords(text) {
|
|
163
|
+
const stopWords = new Set(['the', 'a', 'an', 'is', 'are', 'was', 'were', 'be', 'been', 'being', 'have', 'has', 'had', 'do', 'does', 'did', 'will', 'would', 'could', 'should', 'may', 'might', 'must', 'shall', 'can', 'need', 'dare', 'ought', 'used', 'to', 'of', 'in', 'for', 'on', 'with', 'at', 'by', 'from', 'as', 'into', 'through', 'during', 'before', 'after', 'above', 'below', 'between', 'under', 'again', 'further', 'then', 'once', 'here', 'there', 'when', 'where', 'why', 'how', 'all', 'each', 'few', 'more', 'most', 'other', 'some', 'such', 'no', 'nor', 'not', 'only', 'own', 'same', 'so', 'than', 'too', 'very', 'just', 'and', 'but', 'or', 'if', 'because', 'until', 'while', 'this', 'that', 'these', 'those', 'it', 'its', 'we', 'our', 'i', 'my', 'you', 'your', 'he', 'his', 'she', 'her', 'they', 'their']);
|
|
164
|
+
const wordCounts = text
|
|
165
|
+
.toLowerCase()
|
|
166
|
+
.replace(/[^\w\s가-힣]/g, ' ')
|
|
167
|
+
.split(/\s+/)
|
|
168
|
+
.filter(word => word.length > 2 && !stopWords.has(word))
|
|
169
|
+
.reduce((acc, word) => {
|
|
170
|
+
acc[word] = (acc[word] || 0) + 1;
|
|
171
|
+
return acc;
|
|
172
|
+
}, {});
|
|
173
|
+
return Object.entries(wordCounts)
|
|
174
|
+
.sort((a, b) => b[1] - a[1])
|
|
175
|
+
.slice(0, 10)
|
|
176
|
+
.map(([word]) => word);
|
|
177
|
+
}
|
|
178
|
+
// 관련 코드 추출
|
|
179
|
+
function extractRelatedCode(text) {
|
|
180
|
+
const codes = [];
|
|
181
|
+
const codeBlockPattern = /```[\w]*\n([\s\S]*?)```/g;
|
|
182
|
+
let match;
|
|
183
|
+
while ((match = codeBlockPattern.exec(text)) !== null) {
|
|
184
|
+
if (match[1]?.trim()) {
|
|
185
|
+
codes.push(match[1].trim());
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return codes;
|
|
189
|
+
}
|
|
190
|
+
// 패턴 매칭 헬퍼
|
|
191
|
+
function matchPatterns(text, patterns) {
|
|
192
|
+
const results = [];
|
|
193
|
+
for (const pattern of patterns) {
|
|
194
|
+
// 글로벌 플래그 제거하여 무한루프 방지
|
|
195
|
+
const regex = new RegExp(pattern.source, pattern.flags.replace('g', ''));
|
|
196
|
+
const match = regex.exec(text);
|
|
197
|
+
if (match && match[1]?.trim()) {
|
|
198
|
+
results.push(match[1].trim());
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return [...new Set(results)];
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Analyzes conversation logs to extract and summarize design decisions
|
|
205
|
+
*
|
|
206
|
+
* @param input - The input parameters
|
|
207
|
+
* @param input.conversationLog - The conversation text to analyze
|
|
208
|
+
* @param input.projectContext - Optional project context for better categorization
|
|
209
|
+
* @param input.language - Language setting ('en', 'ko', or 'auto' for detection)
|
|
210
|
+
* @param input.includeImportanceScore - Whether to include importance scoring
|
|
211
|
+
* @param input.extractRelatedCode - Whether to extract related code blocks
|
|
212
|
+
* @param input.maxDecisions - Maximum number of decisions to extract
|
|
213
|
+
* @returns Object containing decisions array, summary text, and statistics
|
|
214
|
+
*
|
|
215
|
+
* @example
|
|
216
|
+
* const result = summarizeDesignDecisions({
|
|
217
|
+
* conversationLog: "We decided to use React instead of Vue because...",
|
|
218
|
+
* language: 'auto'
|
|
219
|
+
* });
|
|
220
|
+
*/
|
|
221
|
+
export function summarizeDesignDecisions(input) {
|
|
222
|
+
const lang = input.language === 'auto' || !input.language
|
|
223
|
+
? detectLanguage(input.conversationLog)
|
|
224
|
+
: input.language;
|
|
225
|
+
const patterns = decisionPatterns[lang] || decisionPatterns.en;
|
|
226
|
+
const rationale = rationalePatterns[lang] || rationalePatterns.en;
|
|
227
|
+
const alternatives = alternativePatterns[lang] || alternativePatterns.en;
|
|
228
|
+
const tradeoffs = tradeoffPatterns[lang] || tradeoffPatterns.en;
|
|
229
|
+
const decisions = [];
|
|
230
|
+
const lines = input.conversationLog.split('\n').filter(line => line.trim());
|
|
231
|
+
const relatedCodes = input.extractRelatedCode !== false
|
|
232
|
+
? extractRelatedCode(input.conversationLog)
|
|
233
|
+
: [];
|
|
234
|
+
// 결정 문장 찾기
|
|
235
|
+
const decisionSentences = new Set();
|
|
236
|
+
for (const line of lines) {
|
|
237
|
+
for (const pattern of patterns) {
|
|
238
|
+
const regex = new RegExp(pattern.source, pattern.flags);
|
|
239
|
+
if (regex.test(line)) {
|
|
240
|
+
decisionSentences.add(line.trim());
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
// 결정을 EnhancedDesignDecision으로 변환
|
|
246
|
+
const maxDecisions = input.maxDecisions || 20;
|
|
247
|
+
let count = 0;
|
|
248
|
+
for (const sentence of decisionSentences) {
|
|
249
|
+
if (count >= maxDecisions)
|
|
250
|
+
break;
|
|
251
|
+
const category = inferCategory(sentence, lang);
|
|
252
|
+
const importance = calculateImportance(sentence, input.conversationLog);
|
|
253
|
+
const extractedRationale = matchPatterns(sentence, rationale);
|
|
254
|
+
const extractedAlternatives = matchPatterns(sentence, alternatives);
|
|
255
|
+
const extractedTradeoffs = matchPatterns(sentence, tradeoffs);
|
|
256
|
+
// 키워드 추출
|
|
257
|
+
const keywords = sentence
|
|
258
|
+
.toLowerCase()
|
|
259
|
+
.replace(/[^\w\s가-힣]/g, ' ')
|
|
260
|
+
.split(/\s+/)
|
|
261
|
+
.filter(word => word.length > 2)
|
|
262
|
+
.slice(0, 5);
|
|
263
|
+
decisions.push({
|
|
264
|
+
id: generateId(),
|
|
265
|
+
title: generateTitle(sentence, category),
|
|
266
|
+
description: sentence,
|
|
267
|
+
rationale: extractedRationale[0] || 'Rationale not explicitly stated',
|
|
268
|
+
alternatives: extractedAlternatives,
|
|
269
|
+
timestamp: getCurrentTimestamp(),
|
|
270
|
+
category,
|
|
271
|
+
importance: importance.level,
|
|
272
|
+
importanceScore: importance.score,
|
|
273
|
+
relatedCode: relatedCodes.filter(code => keywords.some(kw => code.toLowerCase().includes(kw))).slice(0, 2),
|
|
274
|
+
tradeoffs: extractedTradeoffs,
|
|
275
|
+
keywords
|
|
276
|
+
});
|
|
277
|
+
count++;
|
|
278
|
+
}
|
|
279
|
+
// 중요도 순으로 정렬
|
|
280
|
+
decisions.sort((a, b) => b.importanceScore - a.importanceScore);
|
|
281
|
+
// 통계 생성
|
|
282
|
+
const byCategory = {};
|
|
283
|
+
const byImportance = {};
|
|
284
|
+
const allKeywords = [];
|
|
285
|
+
for (const d of decisions) {
|
|
286
|
+
byCategory[d.category] = (byCategory[d.category] || 0) + 1;
|
|
287
|
+
byImportance[d.importance] = (byImportance[d.importance] || 0) + 1;
|
|
288
|
+
allKeywords.push(...d.keywords);
|
|
289
|
+
}
|
|
290
|
+
// 상위 키워드 추출
|
|
291
|
+
const keywordCounts = {};
|
|
292
|
+
for (const kw of allKeywords) {
|
|
293
|
+
keywordCounts[kw] = (keywordCounts[kw] || 0) + 1;
|
|
294
|
+
}
|
|
295
|
+
const topKeywords = Object.entries(keywordCounts)
|
|
296
|
+
.sort((a, b) => b[1] - a[1])
|
|
297
|
+
.slice(0, 10)
|
|
298
|
+
.map(([kw]) => kw);
|
|
299
|
+
// 요약 생성
|
|
300
|
+
let summary = '';
|
|
301
|
+
if (decisions.length === 0) {
|
|
302
|
+
summary = lang === 'ko'
|
|
303
|
+
? '대화에서 명시적인 디자인 결정을 찾지 못했습니다.'
|
|
304
|
+
: 'No explicit design decisions were identified in the conversation.';
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
const highCount = byImportance['high'] || 0;
|
|
308
|
+
summary = lang === 'ko'
|
|
309
|
+
? `총 ${decisions.length}개의 디자인 결정을 발견했습니다. 중요도 높음: ${highCount}개.\n주요 카테고리: ${Object.entries(byCategory).map(([k, v]) => `${k}(${v})`).join(', ')}`
|
|
310
|
+
: `Found ${decisions.length} design decision(s). High importance: ${highCount}.\nCategories: ${Object.entries(byCategory).map(([k, v]) => `${k}(${v})`).join(', ')}`;
|
|
311
|
+
if (input.projectContext) {
|
|
312
|
+
summary += `\n\nProject Context: ${input.projectContext}`;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
return {
|
|
316
|
+
decisions,
|
|
317
|
+
summary,
|
|
318
|
+
stats: {
|
|
319
|
+
totalDecisions: decisions.length,
|
|
320
|
+
byCategory,
|
|
321
|
+
byImportance,
|
|
322
|
+
topKeywords
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
export const summarizeDesignDecisionsSchema = {
|
|
327
|
+
name: 'muse_summarize_design_decisions',
|
|
328
|
+
description: 'Extracts and analyzes key architectural and design decisions from conversation logs. Supports both English and Korean, with importance scoring and keyword extraction.',
|
|
329
|
+
inputSchema: {
|
|
330
|
+
type: 'object',
|
|
331
|
+
properties: {
|
|
332
|
+
conversationLog: {
|
|
333
|
+
type: 'string',
|
|
334
|
+
description: 'The full conversation log text to analyze'
|
|
335
|
+
},
|
|
336
|
+
projectContext: {
|
|
337
|
+
type: 'string',
|
|
338
|
+
description: 'Optional context about the project for better categorization'
|
|
339
|
+
},
|
|
340
|
+
language: {
|
|
341
|
+
type: 'string',
|
|
342
|
+
enum: ['en', 'ko', 'auto'],
|
|
343
|
+
description: 'Language of the conversation (default: auto-detect)'
|
|
344
|
+
},
|
|
345
|
+
includeImportanceScore: {
|
|
346
|
+
type: 'boolean',
|
|
347
|
+
description: 'Include importance scoring for each decision (default: true)'
|
|
348
|
+
},
|
|
349
|
+
extractRelatedCode: {
|
|
350
|
+
type: 'boolean',
|
|
351
|
+
description: 'Extract related code blocks (default: true)'
|
|
352
|
+
},
|
|
353
|
+
maxDecisions: {
|
|
354
|
+
type: 'number',
|
|
355
|
+
description: 'Maximum number of decisions to extract (default: 20)'
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
required: ['conversationLog']
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
//# sourceMappingURL=summarizeDesignDecisions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summarizeDesignDecisions.js","sourceRoot":"","sources":["../../src/tools/summarizeDesignDecisions.ts"],"names":[],"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EAAE,IAAI,EAAE,MAAM,CAAC;gBAC1B,WAAW,EAAE,qDAAqD;aACnE;YACD,sBAAsB,EAAE;gBACtB,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,8DAA8D;aAC5E;YACD,kBAAkB,EAAE;gBAClB,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,6CAA6C;aAC3D;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sDAAsD;aACpE;SACF;QACD,QAAQ,EAAE,CAAC,iBAAiB,CAAC;KAC9B;CACF,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export interface CodeBlock {
|
|
2
|
+
language: string;
|
|
3
|
+
code: string;
|
|
4
|
+
filename?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface CodeContext {
|
|
8
|
+
sessionId: string;
|
|
9
|
+
timestamp: string;
|
|
10
|
+
codeBlocks: CodeBlock[];
|
|
11
|
+
conversationSummary: string;
|
|
12
|
+
tags?: string[];
|
|
13
|
+
}
|
|
14
|
+
export interface DesignDecision {
|
|
15
|
+
id: string;
|
|
16
|
+
title: string;
|
|
17
|
+
description: string;
|
|
18
|
+
rationale: string;
|
|
19
|
+
alternatives?: string[];
|
|
20
|
+
timestamp: string;
|
|
21
|
+
category: 'architecture' | 'implementation' | 'library' | 'pattern' | 'other';
|
|
22
|
+
}
|
|
23
|
+
export type DocumentType = 'README' | 'DESIGN' | 'TUTORIAL' | 'CHANGELOG' | 'API' | 'ARCHITECTURE';
|
|
24
|
+
export type Platform = 'notion' | 'github-wiki' | 'obsidian' | 'confluence' | 'slack' | 'discord';
|
|
25
|
+
export type Language = 'ko' | 'en';
|
|
26
|
+
export interface SessionLog {
|
|
27
|
+
sessionId: string;
|
|
28
|
+
date: string;
|
|
29
|
+
title: string;
|
|
30
|
+
summary: string;
|
|
31
|
+
codeContexts: CodeContext[];
|
|
32
|
+
designDecisions: DesignDecision[];
|
|
33
|
+
duration?: number;
|
|
34
|
+
tags?: string[];
|
|
35
|
+
}
|
|
36
|
+
export interface DocumentOptions {
|
|
37
|
+
type: DocumentType;
|
|
38
|
+
title?: string;
|
|
39
|
+
includeCodeBlocks?: boolean;
|
|
40
|
+
includeDesignDecisions?: boolean;
|
|
41
|
+
customSections?: Record<string, string>;
|
|
42
|
+
}
|
|
43
|
+
export interface PublishOptions {
|
|
44
|
+
platform: Platform;
|
|
45
|
+
parentPageId?: string;
|
|
46
|
+
wikiPath?: string;
|
|
47
|
+
vaultPath?: string;
|
|
48
|
+
filename?: string;
|
|
49
|
+
webhookUrl?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface PublishResult {
|
|
52
|
+
success: boolean;
|
|
53
|
+
platform: Platform;
|
|
54
|
+
url?: string;
|
|
55
|
+
filePath?: string;
|
|
56
|
+
error?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface SessionLogOptions {
|
|
59
|
+
logType: 'daily' | 'session';
|
|
60
|
+
outputPath?: string;
|
|
61
|
+
format?: 'markdown' | 'json';
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAGD,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAGD,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,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