@codemieai/code 0.0.18 → 0.0.20
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/dist/agents/core/AgentCLI.d.ts +4 -0
- package/dist/agents/core/AgentCLI.d.ts.map +1 -1
- package/dist/agents/core/AgentCLI.js +97 -24
- package/dist/agents/core/AgentCLI.js.map +1 -1
- package/dist/agents/core/BaseAgentAdapter.d.ts +24 -0
- package/dist/agents/core/BaseAgentAdapter.d.ts.map +1 -1
- package/dist/agents/core/BaseAgentAdapter.js +191 -81
- package/dist/agents/core/BaseAgentAdapter.js.map +1 -1
- package/dist/agents/core/flag-transform.d.ts +37 -0
- package/dist/agents/core/flag-transform.d.ts.map +1 -0
- package/dist/agents/core/flag-transform.js +107 -0
- package/dist/agents/core/flag-transform.js.map +1 -0
- package/dist/agents/core/types.d.ts +53 -6
- package/dist/agents/core/types.d.ts.map +1 -1
- package/dist/agents/plugins/claude.plugin.d.ts.map +1 -1
- package/dist/agents/plugins/claude.plugin.js +11 -4
- package/dist/agents/plugins/claude.plugin.js.map +1 -1
- package/dist/agents/plugins/codemie-code.plugin.d.ts +1 -0
- package/dist/agents/plugins/codemie-code.plugin.d.ts.map +1 -1
- package/dist/agents/plugins/codemie-code.plugin.js +14 -26
- package/dist/agents/plugins/codemie-code.plugin.js.map +1 -1
- package/dist/agents/plugins/codex.plugin.d.ts +4 -0
- package/dist/agents/plugins/codex.plugin.d.ts.map +1 -1
- package/dist/agents/plugins/codex.plugin.js +231 -22
- package/dist/agents/plugins/codex.plugin.js.map +1 -1
- package/dist/agents/plugins/deepagents.plugin.d.ts.map +1 -1
- package/dist/agents/plugins/deepagents.plugin.js +7 -4
- package/dist/agents/plugins/deepagents.plugin.js.map +1 -1
- package/dist/agents/plugins/gemini.plugin.d.ts.map +1 -1
- package/dist/agents/plugins/gemini.plugin.js +15 -12
- package/dist/agents/plugins/gemini.plugin.js.map +1 -1
- package/dist/cli/commands/doctor/checks/FrameworksCheck.d.ts +12 -0
- package/dist/cli/commands/doctor/checks/FrameworksCheck.d.ts.map +1 -0
- package/dist/cli/commands/doctor/checks/FrameworksCheck.js +103 -0
- package/dist/cli/commands/doctor/checks/FrameworksCheck.js.map +1 -0
- package/dist/cli/commands/doctor/checks/index.d.ts +1 -0
- package/dist/cli/commands/doctor/checks/index.d.ts.map +1 -1
- package/dist/cli/commands/doctor/checks/index.js +1 -0
- package/dist/cli/commands/doctor/checks/index.js.map +1 -1
- package/dist/cli/commands/doctor/index.d.ts.map +1 -1
- package/dist/cli/commands/doctor/index.js +3 -2
- package/dist/cli/commands/doctor/index.js.map +1 -1
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +79 -30
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/list.d.ts.map +1 -1
- package/dist/cli/commands/list.js +55 -15
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/uninstall.d.ts.map +1 -1
- package/dist/cli/commands/uninstall.js +85 -34
- package/dist/cli/commands/uninstall.js.map +1 -1
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +5 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/frameworks/core/BaseFrameworkAdapter.d.ts +88 -0
- package/dist/frameworks/core/BaseFrameworkAdapter.d.ts.map +1 -0
- package/dist/frameworks/core/BaseFrameworkAdapter.js +156 -0
- package/dist/frameworks/core/BaseFrameworkAdapter.js.map +1 -0
- package/dist/frameworks/core/index.d.ts +9 -0
- package/dist/frameworks/core/index.d.ts.map +1 -0
- package/dist/frameworks/core/index.js +9 -0
- package/dist/frameworks/core/index.js.map +1 -0
- package/dist/frameworks/core/registry.d.ts +53 -0
- package/dist/frameworks/core/registry.d.ts.map +1 -0
- package/dist/frameworks/core/registry.js +82 -0
- package/dist/frameworks/core/registry.js.map +1 -0
- package/dist/frameworks/core/types.d.ts +130 -0
- package/dist/frameworks/core/types.d.ts.map +1 -0
- package/dist/frameworks/core/types.js +8 -0
- package/dist/frameworks/core/types.js.map +1 -0
- package/dist/frameworks/index.d.ts +9 -0
- package/dist/frameworks/index.d.ts.map +1 -0
- package/dist/frameworks/index.js +12 -0
- package/dist/frameworks/index.js.map +1 -0
- package/dist/frameworks/plugins/bmad.plugin.d.ts +46 -0
- package/dist/frameworks/plugins/bmad.plugin.d.ts.map +1 -0
- package/dist/frameworks/plugins/bmad.plugin.js +111 -0
- package/dist/frameworks/plugins/bmad.plugin.js.map +1 -0
- package/dist/frameworks/plugins/index.d.ts +8 -0
- package/dist/frameworks/plugins/index.d.ts.map +1 -0
- package/dist/frameworks/plugins/index.js +15 -0
- package/dist/frameworks/plugins/index.js.map +1 -0
- package/dist/frameworks/plugins/speckit.plugin.d.ts +59 -0
- package/dist/frameworks/plugins/speckit.plugin.d.ts.map +1 -0
- package/dist/frameworks/plugins/speckit.plugin.js +213 -0
- package/dist/frameworks/plugins/speckit.plugin.js.map +1 -0
- package/dist/metrics/config.d.ts.map +1 -1
- package/dist/metrics/config.js +7 -1
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/sync/aggregator.d.ts +7 -1
- package/dist/metrics/sync/aggregator.d.ts.map +1 -1
- package/dist/metrics/sync/aggregator.js +14 -5
- package/dist/metrics/sync/aggregator.js.map +1 -1
- package/dist/metrics/sync/post-processor.d.ts +48 -0
- package/dist/metrics/sync/post-processor.d.ts.map +1 -0
- package/dist/metrics/sync/post-processor.js +147 -0
- package/dist/metrics/sync/post-processor.js.map +1 -0
- package/dist/metrics/sync/types.d.ts +2 -2
- package/dist/metrics/sync/types.d.ts.map +1 -1
- package/dist/metrics/types.d.ts +6 -0
- package/dist/metrics/types.d.ts.map +1 -1
- package/dist/providers/core/types.d.ts +0 -5
- package/dist/providers/core/types.d.ts.map +1 -1
- package/dist/providers/plugins/bedrock/bedrock.template.d.ts.map +1 -1
- package/dist/providers/plugins/bedrock/bedrock.template.js +0 -5
- package/dist/providers/plugins/bedrock/bedrock.template.js.map +1 -1
- package/dist/providers/plugins/litellm/litellm.template.d.ts.map +1 -1
- package/dist/providers/plugins/litellm/litellm.template.js +0 -6
- package/dist/providers/plugins/litellm/litellm.template.js.map +1 -1
- package/dist/providers/plugins/ollama/ollama.template.d.ts.map +1 -1
- package/dist/providers/plugins/ollama/ollama.template.js +22 -17
- package/dist/providers/plugins/ollama/ollama.template.js.map +1 -1
- package/dist/providers/plugins/sso/sso.template.d.ts.map +1 -1
- package/dist/providers/plugins/sso/sso.template.js +0 -5
- package/dist/providers/plugins/sso/sso.template.js.map +1 -1
- package/dist/proxy/plugins/metrics-sync.plugin.js +20 -9
- package/dist/proxy/plugins/metrics-sync.plugin.js.map +1 -1
- package/dist/proxy/plugins/sso-auth.plugin.js +7 -2
- package/dist/proxy/plugins/sso-auth.plugin.js.map +1 -1
- package/dist/utils/codemie-proxy.d.ts +1 -0
- package/dist/utils/codemie-proxy.d.ts.map +1 -1
- package/dist/utils/codemie-proxy.js +9 -3
- package/dist/utils/codemie-proxy.js.map +1 -1
- package/dist/utils/config-loader.d.ts +4 -2
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-loader.js +43 -33
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/exec.d.ts +1 -0
- package/dist/utils/exec.d.ts.map +1 -1
- package/dist/utils/exec.js +23 -9
- package/dist/utils/exec.js.map +1 -1
- package/dist/utils/first-time.d.ts +3 -3
- package/dist/utils/first-time.d.ts.map +1 -1
- package/dist/utils/first-time.js +21 -4
- package/dist/utils/first-time.js.map +1 -1
- package/dist/utils/logger.js +2 -2
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/profile.d.ts +12 -0
- package/dist/utils/profile.d.ts.map +1 -0
- package/dist/utils/profile.js +32 -0
- package/dist/utils/profile.js.map +1 -0
- package/package.json +22 -6
- package/scripts/README.md +80 -0
- package/scripts/release.sh +267 -0
- package/scripts/validate-secrets.js +54 -0
- package/dist/utils/ascii-logo.d.ts +0 -21
- package/dist/utils/ascii-logo.d.ts.map +0 -1
- package/dist/utils/ascii-logo.js +0 -85
- package/dist/utils/ascii-logo.js.map +0 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base Framework Adapter
|
|
3
|
+
*
|
|
4
|
+
* Abstract base class providing common functionality for framework adapters.
|
|
5
|
+
* Similar to BaseAgentAdapter pattern in src/agents/core/BaseAgentAdapter.ts
|
|
6
|
+
*/
|
|
7
|
+
import type { FrameworkAdapter, FrameworkMetadata, FrameworkInitOptions } from './types.js';
|
|
8
|
+
export declare abstract class BaseFrameworkAdapter implements FrameworkAdapter {
|
|
9
|
+
readonly metadata: FrameworkMetadata;
|
|
10
|
+
constructor(metadata: FrameworkMetadata);
|
|
11
|
+
/**
|
|
12
|
+
* Default implementation: Check if CLI command exists
|
|
13
|
+
* Override for custom installation logic
|
|
14
|
+
*/
|
|
15
|
+
isInstalled(): Promise<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* Default implementation: Check for init directory
|
|
18
|
+
* Override for custom detection logic
|
|
19
|
+
*/
|
|
20
|
+
isInitialized(cwd?: string): Promise<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* Default implementation: Get version from CLI
|
|
23
|
+
* Override for custom version retrieval
|
|
24
|
+
*/
|
|
25
|
+
getVersion(): Promise<string | null>;
|
|
26
|
+
/**
|
|
27
|
+
* Default implementation: No agent mapping (framework-agnostic)
|
|
28
|
+
* Override for agent-specific frameworks
|
|
29
|
+
*/
|
|
30
|
+
getAgentMapping(codemieAgentName: string): string | null;
|
|
31
|
+
/**
|
|
32
|
+
* Install framework CLI - must be implemented by subclasses
|
|
33
|
+
*/
|
|
34
|
+
abstract install(): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Uninstall framework CLI - must be implemented by subclasses
|
|
37
|
+
*/
|
|
38
|
+
abstract uninstall(): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Initialize framework - must be implemented by subclasses
|
|
41
|
+
*/
|
|
42
|
+
abstract init(agentName: string, options?: FrameworkInitOptions): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Helper: Log installation start
|
|
45
|
+
*/
|
|
46
|
+
protected logInstallStart(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Helper: Log installation success
|
|
49
|
+
*/
|
|
50
|
+
protected logInstallSuccess(version?: string): void;
|
|
51
|
+
/**
|
|
52
|
+
* Helper: Log installation error
|
|
53
|
+
*/
|
|
54
|
+
protected logInstallError(error: unknown): void;
|
|
55
|
+
/**
|
|
56
|
+
* Helper: Log uninstallation start
|
|
57
|
+
*/
|
|
58
|
+
protected logUninstallStart(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Helper: Log uninstallation success
|
|
61
|
+
*/
|
|
62
|
+
protected logUninstallSuccess(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Helper: Log uninstallation error
|
|
65
|
+
*/
|
|
66
|
+
protected logUninstallError(error: unknown): void;
|
|
67
|
+
/**
|
|
68
|
+
* Helper: Log initialization start
|
|
69
|
+
*/
|
|
70
|
+
protected logInitStart(agentName?: string): void;
|
|
71
|
+
/**
|
|
72
|
+
* Helper: Log initialization success
|
|
73
|
+
*/
|
|
74
|
+
protected logInitSuccess(directory: string): void;
|
|
75
|
+
/**
|
|
76
|
+
* Helper: Log initialization error
|
|
77
|
+
*/
|
|
78
|
+
protected logInitError(error: unknown): void;
|
|
79
|
+
/**
|
|
80
|
+
* Helper: Check if agent is supported
|
|
81
|
+
*/
|
|
82
|
+
protected isAgentSupported(agentName: string): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Helper: Throw error if agent not supported
|
|
85
|
+
*/
|
|
86
|
+
protected assertAgentSupported(agentName: string): void;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=BaseFrameworkAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseFrameworkAdapter.d.ts","sourceRoot":"","sources":["../../../src/frameworks/core/BaseFrame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IAKhD;;OAEG;IACH,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAIjD;;OAEG;IACH,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAK5C;;OAEG;IACH,SAAS,CAAC,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAOtD;;OAEG;IACH,SAAS,CAAC,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;CAQxD"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base Framework Adapter
|
|
3
|
+
*
|
|
4
|
+
* Abstract base class providing common functionality for framework adapters.
|
|
5
|
+
* Similar to BaseAgentAdapter pattern in src/agents/core/BaseAgentAdapter.ts
|
|
6
|
+
*/
|
|
7
|
+
import { existsSync } from 'fs';
|
|
8
|
+
import { join } from 'path';
|
|
9
|
+
import { exec } from '../../utils/exec.js';
|
|
10
|
+
import { logger } from '../../utils/logger.js';
|
|
11
|
+
export class BaseFrameworkAdapter {
|
|
12
|
+
metadata;
|
|
13
|
+
constructor(metadata) {
|
|
14
|
+
this.metadata = metadata;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Default implementation: Check if CLI command exists
|
|
18
|
+
* Override for custom installation logic
|
|
19
|
+
*/
|
|
20
|
+
async isInstalled() {
|
|
21
|
+
if (!this.metadata.cliCommand) {
|
|
22
|
+
// Frameworks without CLI (npx-on-demand) are always "installed"
|
|
23
|
+
return this.metadata.installMethod === 'npx-on-demand';
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
// Try running version command
|
|
27
|
+
const result = await exec(this.metadata.cliCommand, ['--version'], { timeout: 5000 });
|
|
28
|
+
return result.code === 0;
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
// Try 'which' command
|
|
32
|
+
try {
|
|
33
|
+
const result = await exec('which', [this.metadata.cliCommand], { timeout: 2000 });
|
|
34
|
+
return result.code === 0;
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Default implementation: Check for init directory
|
|
43
|
+
* Override for custom detection logic
|
|
44
|
+
*/
|
|
45
|
+
async isInitialized(cwd = process.cwd()) {
|
|
46
|
+
if (!this.metadata.initDirectory) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
const initPath = join(cwd, this.metadata.initDirectory);
|
|
50
|
+
return existsSync(initPath);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Default implementation: Get version from CLI
|
|
54
|
+
* Override for custom version retrieval
|
|
55
|
+
*/
|
|
56
|
+
async getVersion() {
|
|
57
|
+
if (!this.metadata.cliCommand) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
const result = await exec(this.metadata.cliCommand, ['--version'], { timeout: 5000 });
|
|
62
|
+
// Extract version number from output
|
|
63
|
+
const match = result.stdout.match(/\d+\.\d+\.\d+/);
|
|
64
|
+
return match ? match[0] : result.stdout.trim();
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Default implementation: No agent mapping (framework-agnostic)
|
|
72
|
+
* Override for agent-specific frameworks
|
|
73
|
+
*/
|
|
74
|
+
getAgentMapping(codemieAgentName) {
|
|
75
|
+
// Default: no mapping, use agent name as-is
|
|
76
|
+
return codemieAgentName;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Helper: Log installation start
|
|
80
|
+
*/
|
|
81
|
+
logInstallStart() {
|
|
82
|
+
logger.info(`Installing ${this.metadata.displayName}...`);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Helper: Log installation success
|
|
86
|
+
*/
|
|
87
|
+
logInstallSuccess(version) {
|
|
88
|
+
const versionStr = version ? ` (v${version})` : '';
|
|
89
|
+
logger.success(`${this.metadata.displayName} installed successfully${versionStr}`);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Helper: Log installation error
|
|
93
|
+
*/
|
|
94
|
+
logInstallError(error) {
|
|
95
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
96
|
+
logger.error(`Failed to install ${this.metadata.displayName}: ${message}`);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Helper: Log uninstallation start
|
|
100
|
+
*/
|
|
101
|
+
logUninstallStart() {
|
|
102
|
+
logger.info(`Uninstalling ${this.metadata.displayName}...`);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Helper: Log uninstallation success
|
|
106
|
+
*/
|
|
107
|
+
logUninstallSuccess() {
|
|
108
|
+
logger.success(`${this.metadata.displayName} uninstalled successfully`);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Helper: Log uninstallation error
|
|
112
|
+
*/
|
|
113
|
+
logUninstallError(error) {
|
|
114
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
115
|
+
logger.error(`Failed to uninstall ${this.metadata.displayName}: ${message}`);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Helper: Log initialization start
|
|
119
|
+
*/
|
|
120
|
+
logInitStart(agentName) {
|
|
121
|
+
const agentStr = agentName ? ` for ${agentName}` : '';
|
|
122
|
+
logger.info(`Initializing ${this.metadata.displayName}${agentStr}...`);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Helper: Log initialization success
|
|
126
|
+
*/
|
|
127
|
+
logInitSuccess(directory) {
|
|
128
|
+
logger.success(`${this.metadata.displayName} initialized in ${directory}`);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Helper: Log initialization error
|
|
132
|
+
*/
|
|
133
|
+
logInitError(error) {
|
|
134
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
135
|
+
logger.error(`Failed to initialize ${this.metadata.displayName}: ${message}`);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Helper: Check if agent is supported
|
|
139
|
+
*/
|
|
140
|
+
isAgentSupported(agentName) {
|
|
141
|
+
if (!this.metadata.supportedAgents || this.metadata.supportedAgents.length === 0) {
|
|
142
|
+
return true; // Framework supports all agents
|
|
143
|
+
}
|
|
144
|
+
return this.metadata.supportedAgents.includes(agentName);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Helper: Throw error if agent not supported
|
|
148
|
+
*/
|
|
149
|
+
assertAgentSupported(agentName) {
|
|
150
|
+
if (!this.isAgentSupported(agentName)) {
|
|
151
|
+
throw new Error(`Agent '${agentName}' is not supported by ${this.metadata.displayName}. ` +
|
|
152
|
+
`Supported agents: ${this.metadata.supportedAgents?.join(', ') || 'none'}`);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=BaseFrameworkAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseFrameworkAdapter.js","sourceRoot":"","sources":["../../../src/frameworks/core/BaseFrameworkAdapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAO/C,MAAM,OAAgB,oBAAoB;IACZ;IAA5B,YAA4B,QAA2B;QAA3B,aAAQ,GAAR,QAAQ,CAAmB;IAAG,CAAC;IAE3D;;;OAGG;IACH,KAAK,CAAC,WAAW;QACf,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;YAC9B,gEAAgE;YAChE,OAAO,IAAI,CAAC,QAAQ,CAAC,aAAa,KAAK,eAAe,CAAC;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,SAAS,CAAC,CAAC;IAC3D,CAAC;IAED;;OAEG;IACO,oBAAoB,CAAC,SAAiB;QAC9C,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CACb,UAAU,SAAS,yBAAyB,IAAI,CAAC,QAAQ,CAAC,WAAW,IAAI;gBACzE,qBAAqB,IAAI,CAAC,QAAQ,CAAC,eAAe,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,EAAE,CAC3E,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/frameworks/core/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/frameworks/core/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework Registry
|
|
3
|
+
*
|
|
4
|
+
* Central registry for all framework adapters.
|
|
5
|
+
* Similar to AgentRegistry pattern in src/agents/registry.ts
|
|
6
|
+
*/
|
|
7
|
+
import type { FrameworkAdapter } from './types.js';
|
|
8
|
+
export declare class FrameworkRegistry {
|
|
9
|
+
private static frameworks;
|
|
10
|
+
/**
|
|
11
|
+
* Register a framework adapter
|
|
12
|
+
* @param adapter - Framework adapter instance
|
|
13
|
+
*/
|
|
14
|
+
static registerFramework(adapter: FrameworkAdapter): void;
|
|
15
|
+
/**
|
|
16
|
+
* Get framework adapter by name
|
|
17
|
+
* @param name - Framework name (e.g., 'speckit', 'bmad')
|
|
18
|
+
* @returns Framework adapter or undefined
|
|
19
|
+
*/
|
|
20
|
+
static getFramework(name: string): FrameworkAdapter | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Get all registered frameworks
|
|
23
|
+
* @returns Array of all framework adapters
|
|
24
|
+
*/
|
|
25
|
+
static getAllFrameworks(): FrameworkAdapter[];
|
|
26
|
+
/**
|
|
27
|
+
* Get frameworks supported by specific agent
|
|
28
|
+
* @param agentName - CodeMie agent name
|
|
29
|
+
* @returns Array of framework adapters that support this agent
|
|
30
|
+
*/
|
|
31
|
+
static getFrameworksForAgent(agentName: string): FrameworkAdapter[];
|
|
32
|
+
/**
|
|
33
|
+
* Check if framework is registered
|
|
34
|
+
* @param name - Framework name
|
|
35
|
+
* @returns True if framework is registered and available
|
|
36
|
+
*/
|
|
37
|
+
static hasFramework(name: string): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Get framework names
|
|
40
|
+
* @returns Array of registered framework names
|
|
41
|
+
*/
|
|
42
|
+
static getFrameworkNames(): string[];
|
|
43
|
+
/**
|
|
44
|
+
* Unregister a framework (for testing)
|
|
45
|
+
* @param name - Framework name
|
|
46
|
+
*/
|
|
47
|
+
static unregisterFramework(name: string): void;
|
|
48
|
+
/**
|
|
49
|
+
* Clear all frameworks (for testing)
|
|
50
|
+
*/
|
|
51
|
+
static clear(): void;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/frameworks/core/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAA0B,MAAM,YAAY,CAAC;AAE3E,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAC,UAAU,CAA6C;IAEtE;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAOzD;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAK/D;;;OAGG;IACH,MAAM,CAAC,gBAAgB,IAAI,gBAAgB,EAAE;IAM7C;;;;OAIG;IACH,MAAM,CAAC,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,EAAE;IAWnE;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAK1C;;;OAGG;IACH,MAAM,CAAC,iBAAiB,IAAI,MAAM,EAAE;IAIpC;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI9C;;OAEG;IACH,MAAM,CAAC,KAAK,IAAI,IAAI;CAGrB"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework Registry
|
|
3
|
+
*
|
|
4
|
+
* Central registry for all framework adapters.
|
|
5
|
+
* Similar to AgentRegistry pattern in src/agents/registry.ts
|
|
6
|
+
*/
|
|
7
|
+
export class FrameworkRegistry {
|
|
8
|
+
static frameworks = new Map();
|
|
9
|
+
/**
|
|
10
|
+
* Register a framework adapter
|
|
11
|
+
* @param adapter - Framework adapter instance
|
|
12
|
+
*/
|
|
13
|
+
static registerFramework(adapter) {
|
|
14
|
+
this.frameworks.set(adapter.metadata.name, {
|
|
15
|
+
adapter,
|
|
16
|
+
available: true
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Get framework adapter by name
|
|
21
|
+
* @param name - Framework name (e.g., 'speckit', 'bmad')
|
|
22
|
+
* @returns Framework adapter or undefined
|
|
23
|
+
*/
|
|
24
|
+
static getFramework(name) {
|
|
25
|
+
const entry = this.frameworks.get(name);
|
|
26
|
+
return entry?.available ? entry.adapter : undefined;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Get all registered frameworks
|
|
30
|
+
* @returns Array of all framework adapters
|
|
31
|
+
*/
|
|
32
|
+
static getAllFrameworks() {
|
|
33
|
+
return Array.from(this.frameworks.values())
|
|
34
|
+
.filter((entry) => entry.available)
|
|
35
|
+
.map((entry) => entry.adapter);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Get frameworks supported by specific agent
|
|
39
|
+
* @param agentName - CodeMie agent name
|
|
40
|
+
* @returns Array of framework adapters that support this agent
|
|
41
|
+
*/
|
|
42
|
+
static getFrameworksForAgent(agentName) {
|
|
43
|
+
return this.getAllFrameworks().filter((adapter) => {
|
|
44
|
+
// If no supported agents specified, framework supports all agents
|
|
45
|
+
if (!adapter.metadata.supportedAgents || adapter.metadata.supportedAgents.length === 0) {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
// Check if agent is in supported list
|
|
49
|
+
return adapter.metadata.supportedAgents.includes(agentName);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Check if framework is registered
|
|
54
|
+
* @param name - Framework name
|
|
55
|
+
* @returns True if framework is registered and available
|
|
56
|
+
*/
|
|
57
|
+
static hasFramework(name) {
|
|
58
|
+
const entry = this.frameworks.get(name);
|
|
59
|
+
return entry?.available ?? false;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Get framework names
|
|
63
|
+
* @returns Array of registered framework names
|
|
64
|
+
*/
|
|
65
|
+
static getFrameworkNames() {
|
|
66
|
+
return Array.from(this.frameworks.keys());
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Unregister a framework (for testing)
|
|
70
|
+
* @param name - Framework name
|
|
71
|
+
*/
|
|
72
|
+
static unregisterFramework(name) {
|
|
73
|
+
this.frameworks.delete(name);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Clear all frameworks (for testing)
|
|
77
|
+
*/
|
|
78
|
+
static clear() {
|
|
79
|
+
this.frameworks.clear();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/frameworks/core/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,OAAO,iBAAiB;IACpB,MAAM,CAAC,UAAU,GAAG,IAAI,GAAG,EAAkC,CAAC;IAEtE;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CAAC,OAAyB;QAChD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE;YACzC,OAAO;YACP,SAAS,EAAE,IAAI;SAChB,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,IAAY;QAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACxC,OAAO,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IACtD,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,gBAAgB;QACrB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;aACxC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC;aAClC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,qBAAqB,CAAC,SAAiB;QAC5C,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE;YAChD,kEAAkE;YAClE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,IAAI,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACvF,OAAO,IAAI,CAAC;YACd,CAAC;YACD,sCAAsC;YACtC,OAAO,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,IAAY;QAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACxC,OAAO,KAAK,EAAE,SAAS,IAAI,KAAK,CAAC;IACnC,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,iBAAiB;QACtB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CAAC,IAAY;QACrC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAK;QACV,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework System Types
|
|
3
|
+
*
|
|
4
|
+
* Defines the core interfaces for framework integration in CodeMie CLI.
|
|
5
|
+
* Frameworks (like SpecKit, BMAD) can be initialized from agent shortcuts.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Framework Metadata - Configuration and capabilities
|
|
9
|
+
*/
|
|
10
|
+
export interface FrameworkMetadata {
|
|
11
|
+
/** Internal framework identifier (e.g., 'speckit', 'bmad') */
|
|
12
|
+
name: string;
|
|
13
|
+
/** User-facing display name (e.g., 'SpecKit', 'BMAD Method') */
|
|
14
|
+
displayName: string;
|
|
15
|
+
/** Brief description of the framework */
|
|
16
|
+
description: string;
|
|
17
|
+
/** Official documentation URL */
|
|
18
|
+
docsUrl?: string;
|
|
19
|
+
/** GitHub repository URL */
|
|
20
|
+
repoUrl?: string;
|
|
21
|
+
/** Whether framework requires installation before init */
|
|
22
|
+
requiresInstallation: boolean;
|
|
23
|
+
/** Installation method: 'npm', 'uv', 'pip', 'manual', 'npx-on-demand' */
|
|
24
|
+
installMethod?: 'npm' | 'uv' | 'pip' | 'manual' | 'npx-on-demand';
|
|
25
|
+
/** Package identifier for installation (npm package name, PyPI name, etc.) */
|
|
26
|
+
packageName?: string;
|
|
27
|
+
/** CLI command name (executable) */
|
|
28
|
+
cliCommand?: string;
|
|
29
|
+
/** Whether framework initialization is agent-specific */
|
|
30
|
+
isAgentSpecific: boolean;
|
|
31
|
+
/** Supported CodeMie agent names (empty means all agents) */
|
|
32
|
+
supportedAgents?: string[];
|
|
33
|
+
/** Directory created by framework initialization (for detection) */
|
|
34
|
+
initDirectory?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Framework Adapter - Interface for framework integration
|
|
38
|
+
*/
|
|
39
|
+
export interface FrameworkAdapter {
|
|
40
|
+
/** Framework metadata */
|
|
41
|
+
readonly metadata: FrameworkMetadata;
|
|
42
|
+
/**
|
|
43
|
+
* Install framework CLI (if required)
|
|
44
|
+
* @returns Promise resolving when installation completes
|
|
45
|
+
*/
|
|
46
|
+
install(): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Uninstall framework CLI
|
|
49
|
+
* @returns Promise resolving when uninstallation completes
|
|
50
|
+
*/
|
|
51
|
+
uninstall(): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Initialize framework in current directory
|
|
54
|
+
* @param agentName - CodeMie agent name (e.g., 'claude', 'codex')
|
|
55
|
+
* @param options - Additional initialization options
|
|
56
|
+
* @returns Promise resolving when initialization completes
|
|
57
|
+
*/
|
|
58
|
+
init(agentName: string, options?: FrameworkInitOptions): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Check if framework is initialized in current directory
|
|
61
|
+
* @param cwd - Working directory to check (default: process.cwd())
|
|
62
|
+
* @returns Promise resolving to true if initialized
|
|
63
|
+
*/
|
|
64
|
+
isInitialized(cwd?: string): Promise<boolean>;
|
|
65
|
+
/**
|
|
66
|
+
* Check if framework CLI is installed
|
|
67
|
+
* @returns Promise resolving to true if installed
|
|
68
|
+
*/
|
|
69
|
+
isInstalled(): Promise<boolean>;
|
|
70
|
+
/**
|
|
71
|
+
* Get framework-specific agent name mapping
|
|
72
|
+
* @param codemieAgentName - CodeMie agent name
|
|
73
|
+
* @returns Framework's agent identifier, or null if not supported
|
|
74
|
+
*/
|
|
75
|
+
getAgentMapping(codemieAgentName: string): string | null;
|
|
76
|
+
/**
|
|
77
|
+
* Get framework version
|
|
78
|
+
* @returns Promise resolving to version string or null if unavailable
|
|
79
|
+
*/
|
|
80
|
+
getVersion(): Promise<string | null>;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Framework Initialization Options
|
|
84
|
+
*/
|
|
85
|
+
export interface FrameworkInitOptions {
|
|
86
|
+
/** Force re-initialization even if already initialized */
|
|
87
|
+
force?: boolean;
|
|
88
|
+
/** Project name (if framework requires it) */
|
|
89
|
+
projectName?: string;
|
|
90
|
+
/** Working directory (default: process.cwd()) */
|
|
91
|
+
cwd?: string;
|
|
92
|
+
/** Additional framework-specific options */
|
|
93
|
+
[key: string]: unknown;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Framework Installation Result
|
|
97
|
+
*/
|
|
98
|
+
export interface FrameworkInstallResult {
|
|
99
|
+
/** Whether installation succeeded */
|
|
100
|
+
success: boolean;
|
|
101
|
+
/** Installation method used */
|
|
102
|
+
method: string;
|
|
103
|
+
/** Version installed (if available) */
|
|
104
|
+
version?: string;
|
|
105
|
+
/** Error message if failed */
|
|
106
|
+
error?: string;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Framework Initialization Result
|
|
110
|
+
*/
|
|
111
|
+
export interface FrameworkInitResult {
|
|
112
|
+
/** Whether initialization succeeded */
|
|
113
|
+
success: boolean;
|
|
114
|
+
/** Directory initialized in */
|
|
115
|
+
directory: string;
|
|
116
|
+
/** Agent name used for initialization */
|
|
117
|
+
agentName?: string;
|
|
118
|
+
/** Error message if failed */
|
|
119
|
+
error?: string;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Framework Registry Entry
|
|
123
|
+
*/
|
|
124
|
+
export interface FrameworkRegistryEntry {
|
|
125
|
+
/** Framework adapter instance */
|
|
126
|
+
adapter: FrameworkAdapter;
|
|
127
|
+
/** Whether framework is available for use */
|
|
128
|
+
available: boolean;
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/frameworks/core/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IAEb,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC;IAEpB,yCAAyC;IACzC,WAAW,EAAE,MAAM,CAAC;IAEpB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,0DAA0D;IAC1D,oBAAoB,EAAE,OAAO,CAAC;IAE9B,yEAAyE;IACzE,aAAa,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,QAAQ,GAAG,eAAe,CAAC;IAElE,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,oCAAoC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,yDAAyD;IACzD,eAAe,EAAE,OAAO,CAAC;IAEzB,6DAA6D;IAC7D,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAE3B,oEAAoE;IACpE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MA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EjB,+BAA+B;IAC/B,SAAS,EAAE,MAAM,CAAC;IAElB,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,iCAAiC;IACjC,OAAO,EAAE,gBAAgB,CAAC;IAE1B,6CAA6C;IAC7C,SAAS,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/frameworks/core/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/frameworks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,oBAAoB,CAAC;AAG5B,cAAc,iBAAiB,CAAC;AAGhC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework System
|
|
3
|
+
*
|
|
4
|
+
* Main entry point for framework integration system
|
|
5
|
+
*/
|
|
6
|
+
// Import plugins to trigger auto-registration
|
|
7
|
+
import './plugins/index.js';
|
|
8
|
+
// Export core components
|
|
9
|
+
export * from './core/index.js';
|
|
10
|
+
// Export plugins
|
|
11
|
+
export * from './plugins/index.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/frameworks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,8CAA8C;AAC9C,OAAO,oBAAoB,CAAC;AAE5B,yBAAyB;AACzB,cAAc,iBAAiB,CAAC;AAEhC,iBAAiB;AACjB,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BMAD Framework Plugin
|
|
3
|
+
*
|
|
4
|
+
* Integration for BMAD (Business Methodology for Agile Development)
|
|
5
|
+
* Enterprise development methodology with AI agent support
|
|
6
|
+
*
|
|
7
|
+
* Installation: npx-on-demand (no global install needed)
|
|
8
|
+
* Initialization: npx bmad-method@alpha install
|
|
9
|
+
*/
|
|
10
|
+
import { BaseFrameworkAdapter } from '../core/BaseFrameworkAdapter.js';
|
|
11
|
+
import type { FrameworkMetadata, FrameworkInitOptions } from '../core/types.js';
|
|
12
|
+
/**
|
|
13
|
+
* BMAD Framework Metadata
|
|
14
|
+
*/
|
|
15
|
+
export declare const BmadMetadata: FrameworkMetadata;
|
|
16
|
+
/**
|
|
17
|
+
* BMAD Framework Plugin
|
|
18
|
+
*/
|
|
19
|
+
export declare class BmadPlugin extends BaseFrameworkAdapter {
|
|
20
|
+
constructor();
|
|
21
|
+
/**
|
|
22
|
+
* Install BMAD - Not needed (npx-on-demand)
|
|
23
|
+
*/
|
|
24
|
+
install(): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Uninstall BMAD - Not needed (npx-on-demand)
|
|
27
|
+
*/
|
|
28
|
+
uninstall(): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Initialize BMAD in current directory
|
|
31
|
+
*/
|
|
32
|
+
init(agentName: string, options?: FrameworkInitOptions): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Check if BMAD is installed - always true (npx-on-demand)
|
|
35
|
+
*/
|
|
36
|
+
isInstalled(): Promise<boolean>;
|
|
37
|
+
/**
|
|
38
|
+
* Get BMAD version
|
|
39
|
+
*/
|
|
40
|
+
getVersion(): Promise<string | null>;
|
|
41
|
+
/**
|
|
42
|
+
* Get agent mapping - framework-agnostic, all agents supported
|
|
43
|
+
*/
|
|
44
|
+
getAgentMapping(codemieAgentName: string): string | null;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=bmad.plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bmad.plugin.d.ts","sourceRoot":"","sources":["../../../src/frameworks/plugins/bmad.plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAEhF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,iBAa1B,CAAC;AAEF;;GAEG;AACH,qBAAa,UAAW,SAAQ,oBAAoB;;IAKlD;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAK9B;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAKhC;;OAEG;IACG,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IAsC5E;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAKrC;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAU1C;;OAEG;IACH,eAAe,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAIzD"}
|