maskweaver 0.8.7 → 0.8.9

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.
@@ -0,0 +1,145 @@
1
+ /**
2
+ * Generate Agent Files from Pool Configuration
3
+ *
4
+ * Shared utility to create/update dummy-human agent .md files from
5
+ * maskweaver.config.json pool entries. Used by both:
6
+ * - Plugin startup (auto-generate if not exists)
7
+ * - `weave sync-agents` command (force overwrite from user config)
8
+ */
9
+ import type { ModelPoolEntry } from './config.js';
10
+ export interface GenerateAgentsResult {
11
+ /** Files that were created (did not exist before) */
12
+ created: string[];
13
+ /** Files that were updated (existed and were overwritten) */
14
+ updated: string[];
15
+ /** Files that were skipped (existed and force was false) */
16
+ skipped: string[];
17
+ /** Error messages */
18
+ errors: string[];
19
+ }
20
+ export interface GenerateAgentsOptions {
21
+ /** Force overwrite existing files (default: false) */
22
+ force?: boolean;
23
+ /** Base project directory */
24
+ projectDir?: string;
25
+ /** Custom agents output directory (default: {projectDir}/.opencode/agents) */
26
+ agentsDir?: string;
27
+ /** Custom pool entries (if not provided, reads from config) */
28
+ pool?: ModelPoolEntry[];
29
+ }
30
+ /**
31
+ * Generate agent files from a ModelPoolEntry array.
32
+ *
33
+ * @param pool - Array of model pool entries
34
+ * @param agentsDir - Output directory for agent .md files
35
+ * @param options - Force overwrite option
36
+ * @returns Result summary
37
+ */
38
+ export declare function generatePoolAgentFiles(pool: ModelPoolEntry[], agentsDir: string, options?: {
39
+ force?: boolean;
40
+ }): GenerateAgentsResult;
41
+ /**
42
+ * Read maskweaver.config.json (project or global) and generate agent files.
43
+ *
44
+ * Search order:
45
+ * 1. {projectDir}/maskweaver.config.json
46
+ * 2. {projectDir}/.opencode/maskweaver.config.json
47
+ * 3. ~/.config/opencode/maskweaver.config.json (user global)
48
+ *
49
+ * @param projectDir - Project base directory
50
+ * @param agentsDir - Output directory for agent .md files
51
+ * @param options - Force overwrite and other options
52
+ * @returns Result summary
53
+ */
54
+ export declare function generatePoolAgentFilesFromConfig(projectDir: string, agentsDir: string, options?: {
55
+ force?: boolean;
56
+ }): GenerateAgentsResult;
57
+ /**
58
+ * Default runtime config template (maskweaver.config.json).
59
+ *
60
+ * This is a minimal template with the standard tier entries but WITHOUT
61
+ * model names — users must fill in their actual model IDs.
62
+ */
63
+ export declare const DEFAULT_RUNTIME_CONFIG_TEMPLATE: {
64
+ readonly dummyHumans: {
65
+ readonly pool: readonly [{
66
+ readonly id: "flash";
67
+ readonly model: "";
68
+ readonly tier: "flash";
69
+ readonly maxConcurrent: 5;
70
+ readonly capabilities: readonly ["search", "formatting", "simple-coding", "file-ops"];
71
+ readonly costTier: "low";
72
+ readonly description: "Fast and cheap model for simple tasks (e.g., google/gemini-2.5-flash)";
73
+ }, {
74
+ readonly id: "human";
75
+ readonly model: "";
76
+ readonly tier: "human";
77
+ readonly maxConcurrent: 3;
78
+ readonly capabilities: readonly ["coding", "testing", "refactoring"];
79
+ readonly costTier: "medium";
80
+ readonly description: "Balanced model for general coding (e.g., anthropic/claude-sonnet-4)";
81
+ }, {
82
+ readonly id: "premium";
83
+ readonly model: "";
84
+ readonly tier: "premium";
85
+ readonly maxConcurrent: 2;
86
+ readonly capabilities: readonly ["architecture", "debugging", "reasoning", "complex-coding"];
87
+ readonly costTier: "high";
88
+ readonly description: "Powerful model for complex reasoning (e.g., anthropic/claude-opus-4)";
89
+ }];
90
+ };
91
+ readonly memory: {
92
+ readonly provider: "text-only";
93
+ readonly enabled: false;
94
+ };
95
+ readonly gdc: {
96
+ readonly enabled: "auto";
97
+ readonly strictVerify: false;
98
+ readonly autoSyncOnPrepare: true;
99
+ };
100
+ readonly language: "en";
101
+ };
102
+ /**
103
+ * Default plugin config template (.opencode/maskweaver.json).
104
+ */
105
+ export declare const DEFAULT_PLUGIN_CONFIG_TEMPLATE: {
106
+ $schema: string;
107
+ masks: {
108
+ autoActivate: boolean;
109
+ };
110
+ logging: {
111
+ verbose: boolean;
112
+ };
113
+ notifications: {
114
+ completionSound: {
115
+ enabled: boolean;
116
+ };
117
+ };
118
+ };
119
+ /**
120
+ * Write a default maskweaver.config.json to the project directory.
121
+ * Does NOT overwrite if the file already exists.
122
+ *
123
+ * @param projectDir - Project base directory
124
+ * @returns The path to the created file, or null if it already existed
125
+ */
126
+ export declare function writeDefaultRuntimeConfig(projectDir: string): string | null;
127
+ /**
128
+ * Write a default .opencode/maskweaver.json (plugin config) to the project.
129
+ * Does NOT overwrite if the file already exists.
130
+ *
131
+ * @param projectDir - Project base directory
132
+ * @returns The path to the created file, or null if it already existed
133
+ */
134
+ export declare function writeDefaultPluginConfig(projectDir: string): string | null;
135
+ /**
136
+ * Check if a user-level config exists at ~/.config/opencode/ and return it.
137
+ *
138
+ * Search order:
139
+ * 1. ~/.config/opencode/maskweaver.config.json
140
+ * 2. ~/.config/opencode/maskweaver.json (plugin config with agents)
141
+ *
142
+ * @returns The config path if found, or null
143
+ */
144
+ export declare function findUserGlobalConfig(): string | null;
145
+ //# sourceMappingURL=generate-agents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-agents.d.ts","sourceRoot":"","sources":["../../src/shared/generate-agents.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAOlD,MAAM,WAAW,oBAAoB;IACnC,qDAAqD;IACrD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6DAA6D;IAC7D,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,4DAA4D;IAC5D,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,qBAAqB;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,sDAAsD;IACtD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6BAA6B;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,cAAc,EAAE,CAAC;CACzB;AAgCD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,cAAc,EAAE,EACtB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAChC,oBAAoB,CAsDtB;AAMD;;;;;;;;;;;;GAYG;AACH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAChC,oBAAoB,CAmCtB;AAMD;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0ClC,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;CAa1C,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAiB3E;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA2B1E;AAMD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,GAAG,IAAI,CAcpD"}
@@ -0,0 +1,292 @@
1
+ /**
2
+ * Generate Agent Files from Pool Configuration
3
+ *
4
+ * Shared utility to create/update dummy-human agent .md files from
5
+ * maskweaver.config.json pool entries. Used by both:
6
+ * - Plugin startup (auto-generate if not exists)
7
+ * - `weave sync-agents` command (force overwrite from user config)
8
+ */
9
+ import * as fs from 'node:fs';
10
+ import * as path from 'node:path';
11
+ import * as os from 'node:os';
12
+ import { loadRuntimeConfig, normalizeDummyHumansConfig } from './config.js';
13
+ // ============================================================================
14
+ // Agent File Template
15
+ // ============================================================================
16
+ /**
17
+ * Generate the content for a dummy-human agent .md file
18
+ */
19
+ function buildAgentFileContent(entry) {
20
+ const lines = [
21
+ '---',
22
+ `description: "Dummy-Human (${entry.id}) - ${entry.description || 'Auto-generated from maskweaver.config.json pool'}"`,
23
+ `model: ${entry.model}`,
24
+ 'mode: subagent',
25
+ 'temperature: 0.2',
26
+ 'permission:',
27
+ ' edit: allow',
28
+ ' bash: allow',
29
+ ' webfetch: allow',
30
+ '---',
31
+ '',
32
+ 'Faithfully executes instructions from Mask Weaver.',
33
+ '',
34
+ ];
35
+ return lines.join('\n');
36
+ }
37
+ // ============================================================================
38
+ // Agent File Generation
39
+ // ============================================================================
40
+ /**
41
+ * Generate agent files from a ModelPoolEntry array.
42
+ *
43
+ * @param pool - Array of model pool entries
44
+ * @param agentsDir - Output directory for agent .md files
45
+ * @param options - Force overwrite option
46
+ * @returns Result summary
47
+ */
48
+ export function generatePoolAgentFiles(pool, agentsDir, options = {}) {
49
+ const result = {
50
+ created: [],
51
+ updated: [],
52
+ skipped: [],
53
+ errors: [],
54
+ };
55
+ if (!pool || pool.length === 0) {
56
+ result.errors.push('Pool is empty or undefined. No agents to generate.');
57
+ return result;
58
+ }
59
+ // Ensure agents directory exists
60
+ if (!fs.existsSync(agentsDir)) {
61
+ try {
62
+ fs.mkdirSync(agentsDir, { recursive: true });
63
+ }
64
+ catch (e) {
65
+ result.errors.push(`Failed to create agents directory "${agentsDir}": ${e}`);
66
+ return result;
67
+ }
68
+ }
69
+ for (const entry of pool) {
70
+ const agentName = `dummy-${entry.id}`;
71
+ const agentPath = path.join(agentsDir, `${agentName}.md`);
72
+ const exists = fs.existsSync(agentPath);
73
+ if (exists && !options.force) {
74
+ result.skipped.push(agentPath);
75
+ continue;
76
+ }
77
+ // Validate: model must not be empty
78
+ if (!entry.model || entry.model.trim() === '') {
79
+ result.errors.push(`Entry "${entry.id}" has no model configured. Skipping.`);
80
+ continue;
81
+ }
82
+ const content = buildAgentFileContent(entry);
83
+ try {
84
+ fs.writeFileSync(agentPath, content, 'utf-8');
85
+ if (exists) {
86
+ result.updated.push(agentPath);
87
+ }
88
+ else {
89
+ result.created.push(agentPath);
90
+ }
91
+ }
92
+ catch (e) {
93
+ result.errors.push(`Failed to write ${agentName}.md: ${e}`);
94
+ }
95
+ }
96
+ return result;
97
+ }
98
+ // ============================================================================
99
+ // Config-Based Agent Generation
100
+ // ============================================================================
101
+ /**
102
+ * Read maskweaver.config.json (project or global) and generate agent files.
103
+ *
104
+ * Search order:
105
+ * 1. {projectDir}/maskweaver.config.json
106
+ * 2. {projectDir}/.opencode/maskweaver.config.json
107
+ * 3. ~/.config/opencode/maskweaver.config.json (user global)
108
+ *
109
+ * @param projectDir - Project base directory
110
+ * @param agentsDir - Output directory for agent .md files
111
+ * @param options - Force overwrite and other options
112
+ * @returns Result summary
113
+ */
114
+ export function generatePoolAgentFilesFromConfig(projectDir, agentsDir, options = {}) {
115
+ // Try project config first
116
+ const projectConfig = loadRuntimeConfig(projectDir);
117
+ if (projectConfig.dummyHumans) {
118
+ const pool = normalizeDummyHumansConfig(projectConfig.dummyHumans);
119
+ if (pool.length > 0) {
120
+ return generatePoolAgentFiles(pool, agentsDir, options);
121
+ }
122
+ }
123
+ // Try user global config (~/.config/opencode/maskweaver.config.json)
124
+ const homeDir = os.homedir();
125
+ const globalConfigPath = path.join(homeDir, '.config', 'opencode', 'maskweaver.config.json');
126
+ if (fs.existsSync(globalConfigPath)) {
127
+ try {
128
+ const content = fs.readFileSync(globalConfigPath, 'utf-8');
129
+ const parsed = JSON.parse(content);
130
+ if (parsed.dummyHumans) {
131
+ const pool = normalizeDummyHumansConfig(parsed.dummyHumans);
132
+ if (pool.length > 0) {
133
+ return generatePoolAgentFiles(pool, agentsDir, options);
134
+ }
135
+ }
136
+ }
137
+ catch (e) {
138
+ return { created: [], updated: [], skipped: [], errors: [`Failed to parse global config: ${e}`] };
139
+ }
140
+ }
141
+ return {
142
+ created: [],
143
+ updated: [],
144
+ skipped: [],
145
+ errors: ['No maskweaver.config.json found with dummyHumans configuration. Create one or run `weave init-config` to generate a default.'],
146
+ };
147
+ }
148
+ // ============================================================================
149
+ // Default Config File Creator
150
+ // ============================================================================
151
+ /**
152
+ * Default runtime config template (maskweaver.config.json).
153
+ *
154
+ * This is a minimal template with the standard tier entries but WITHOUT
155
+ * model names — users must fill in their actual model IDs.
156
+ */
157
+ export const DEFAULT_RUNTIME_CONFIG_TEMPLATE = {
158
+ dummyHumans: {
159
+ pool: [
160
+ {
161
+ id: 'flash',
162
+ model: '',
163
+ tier: 'flash',
164
+ maxConcurrent: 5,
165
+ capabilities: ['search', 'formatting', 'simple-coding', 'file-ops'],
166
+ costTier: 'low',
167
+ description: 'Fast and cheap model for simple tasks (e.g., google/gemini-2.5-flash)',
168
+ },
169
+ {
170
+ id: 'human',
171
+ model: '',
172
+ tier: 'human',
173
+ maxConcurrent: 3,
174
+ capabilities: ['coding', 'testing', 'refactoring'],
175
+ costTier: 'medium',
176
+ description: 'Balanced model for general coding (e.g., anthropic/claude-sonnet-4)',
177
+ },
178
+ {
179
+ id: 'premium',
180
+ model: '',
181
+ tier: 'premium',
182
+ maxConcurrent: 2,
183
+ capabilities: ['architecture', 'debugging', 'reasoning', 'complex-coding'],
184
+ costTier: 'high',
185
+ description: 'Powerful model for complex reasoning (e.g., anthropic/claude-opus-4)',
186
+ },
187
+ ],
188
+ },
189
+ memory: {
190
+ provider: 'text-only',
191
+ enabled: false,
192
+ },
193
+ gdc: {
194
+ enabled: 'auto',
195
+ strictVerify: false,
196
+ autoSyncOnPrepare: true,
197
+ },
198
+ language: 'en',
199
+ };
200
+ /**
201
+ * Default plugin config template (.opencode/maskweaver.json).
202
+ */
203
+ export const DEFAULT_PLUGIN_CONFIG_TEMPLATE = {
204
+ $schema: 'https://raw.githubusercontent.com/ulgerang/maskweaver/master/schemas/plugin-config.json',
205
+ masks: {
206
+ autoActivate: false,
207
+ },
208
+ logging: {
209
+ verbose: false,
210
+ },
211
+ notifications: {
212
+ completionSound: {
213
+ enabled: false,
214
+ },
215
+ },
216
+ };
217
+ /**
218
+ * Write a default maskweaver.config.json to the project directory.
219
+ * Does NOT overwrite if the file already exists.
220
+ *
221
+ * @param projectDir - Project base directory
222
+ * @returns The path to the created file, or null if it already existed
223
+ */
224
+ export function writeDefaultRuntimeConfig(projectDir) {
225
+ const targetPath = path.join(projectDir, 'maskweaver.config.json');
226
+ if (fs.existsSync(targetPath)) {
227
+ return null; // Already exists, don't overwrite
228
+ }
229
+ try {
230
+ fs.writeFileSync(targetPath, JSON.stringify(DEFAULT_RUNTIME_CONFIG_TEMPLATE, null, 2) + '\n', 'utf-8');
231
+ return targetPath;
232
+ }
233
+ catch {
234
+ return null;
235
+ }
236
+ }
237
+ /**
238
+ * Write a default .opencode/maskweaver.json (plugin config) to the project.
239
+ * Does NOT overwrite if the file already exists.
240
+ *
241
+ * @param projectDir - Project base directory
242
+ * @returns The path to the created file, or null if it already existed
243
+ */
244
+ export function writeDefaultPluginConfig(projectDir) {
245
+ const opencodeDir = path.join(projectDir, '.opencode');
246
+ const targetPath = path.join(opencodeDir, 'maskweaver.json');
247
+ if (fs.existsSync(targetPath)) {
248
+ return null; // Already exists, don't overwrite
249
+ }
250
+ // Ensure .opencode directory exists
251
+ if (!fs.existsSync(opencodeDir)) {
252
+ try {
253
+ fs.mkdirSync(opencodeDir, { recursive: true });
254
+ }
255
+ catch {
256
+ return null;
257
+ }
258
+ }
259
+ try {
260
+ fs.writeFileSync(targetPath, JSON.stringify(DEFAULT_PLUGIN_CONFIG_TEMPLATE, null, 2) + '\n', 'utf-8');
261
+ return targetPath;
262
+ }
263
+ catch {
264
+ return null;
265
+ }
266
+ }
267
+ // ============================================================================
268
+ // User Config Detection
269
+ // ============================================================================
270
+ /**
271
+ * Check if a user-level config exists at ~/.config/opencode/ and return it.
272
+ *
273
+ * Search order:
274
+ * 1. ~/.config/opencode/maskweaver.config.json
275
+ * 2. ~/.config/opencode/maskweaver.json (plugin config with agents)
276
+ *
277
+ * @returns The config path if found, or null
278
+ */
279
+ export function findUserGlobalConfig() {
280
+ const homeDir = os.homedir();
281
+ const candidates = [
282
+ path.join(homeDir, '.config', 'opencode', 'maskweaver.config.json'),
283
+ path.join(homeDir, '.config', 'opencode', 'maskweaver.json'),
284
+ ];
285
+ for (const candidate of candidates) {
286
+ if (fs.existsSync(candidate)) {
287
+ return candidate;
288
+ }
289
+ }
290
+ return null;
291
+ }
292
+ //# sourceMappingURL=generate-agents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-agents.js","sourceRoot":"","sources":["../../src/shared/generate-agents.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AA4B5E,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E;;GAEG;AACH,SAAS,qBAAqB,CAAC,KAAqB;IAClD,MAAM,KAAK,GAAa;QACtB,KAAK;QACL,8BAA8B,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC,WAAW,IAAI,iDAAiD,GAAG;QACtH,UAAU,KAAK,CAAC,KAAK,EAAE;QACvB,gBAAgB;QAChB,kBAAkB;QAClB,aAAa;QACb,eAAe;QACf,eAAe;QACf,mBAAmB;QACnB,KAAK;QACL,EAAE;QACF,oDAAoD;QACpD,EAAE;KACH,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,+EAA+E;AAC/E,wBAAwB;AACxB,+EAA+E;AAE/E;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CACpC,IAAsB,EACtB,SAAiB,EACjB,UAA+B,EAAE;IAEjC,MAAM,MAAM,GAAyB;QACnC,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;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BAAiB,CAAC;KAC7D,CAAC;IAEF,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC7B,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -9,4 +9,6 @@ export type { MemoryProviderType, VerifyMode, ReviewerType, RetrospectDepth, Con
9
9
  export { DEFAULT_CONFIG } from "./config.js";
10
10
  export type { ImageNormalizeOptions, NormalizedImage, ImageInfo, } from "./image.js";
11
11
  export { normalizeImage, normalizeImageToFile, getImageInfo, isSupported, needsConversion, isLLMCompatible, createImageDataUrl, } from "./image.js";
12
+ export { generatePoolAgentFiles, generatePoolAgentFilesFromConfig, writeDefaultRuntimeConfig, writeDefaultPluginConfig, findUserGlobalConfig, DEFAULT_RUNTIME_CONFIG_TEMPLATE, DEFAULT_PLUGIN_CONFIG_TEMPLATE, } from "./generate-agents.js";
13
+ export type { GenerateAgentsResult, GenerateAgentsOptions, } from "./generate-agents.js";
12
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EACV,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACR,aAAa,GACd,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,eAAe,EACf,WAAW,EACX,aAAa,EACb,YAAY,EACZ,eAAe,GAChB,MAAM,aAAa,CAAC;AAGrB,YAAY,EACV,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,eAAe,EACf,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,SAAS,GACV,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,eAAe,EACf,eAAe,EACf,kBAAkB,GACnB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EACV,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACR,aAAa,GACd,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,eAAe,EACf,WAAW,EACX,aAAa,EACb,YAAY,EACZ,eAAe,GAChB,MAAM,aAAa,CAAC;AAGrB,YAAY,EACV,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,eAAe,EACf,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,SAAS,GACV,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,eAAe,EACf,eAAe,EACf,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,EACpB,+BAA+B,EAC/B,8BAA8B,GAC/B,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC"}
@@ -7,4 +7,6 @@
7
7
  export { MaskweaverError, ConfigError, ProviderError, StorageError, ValidationError, } from "./errors.js";
8
8
  export { DEFAULT_CONFIG } from "./config.js";
9
9
  export { normalizeImage, normalizeImageToFile, getImageInfo, isSupported, needsConversion, isLLMCompatible, createImageDataUrl, } from "./image.js";
10
+ // Agent generation from pool config
11
+ export { generatePoolAgentFiles, generatePoolAgentFilesFromConfig, writeDefaultRuntimeConfig, writeDefaultPluginConfig, findUserGlobalConfig, DEFAULT_RUNTIME_CONFIG_TEMPLATE, DEFAULT_PLUGIN_CONFIG_TEMPLATE, } from "./generate-agents.js";
10
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,SAAS;AACT,OAAO,EACL,eAAe,EACf,WAAW,EACX,aAAa,EACb,YAAY,EACZ,eAAe,GAChB,MAAM,aAAa,CAAC;AAmBrB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAS7C,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,eAAe,EACf,eAAe,EACf,kBAAkB,GACnB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,SAAS;AACT,OAAO,EACL,eAAe,EACf,WAAW,EACX,aAAa,EACb,YAAY,EACZ,eAAe,GAChB,MAAM,aAAa,CAAC;AAmBrB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAS7C,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,eAAe,EACf,eAAe,EACf,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAEpB,oCAAoC;AACpC,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,EACpB,+BAA+B,EAC/B,8BAA8B,GAC/B,MAAM,sBAAsB,CAAC"}
package/dist/version.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  * 2. Update this constant
10
10
  * 3. That's it — all other files import from here
11
11
  */
12
- export declare const VERSION = "0.8.7";
12
+ export declare const VERSION = "0.8.8";
13
13
  /**
14
14
  * Returns a formatted version string for display.
15
15
  * @example "Maskweaver v0.7.29"
package/dist/version.js CHANGED
@@ -9,7 +9,7 @@
9
9
  * 2. Update this constant
10
10
  * 3. That's it — all other files import from here
11
11
  */
12
- export const VERSION = '0.8.7';
12
+ export const VERSION = '0.8.8';
13
13
  /**
14
14
  * Returns a formatted version string for display.
15
15
  * @example "Maskweaver v0.7.29"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maskweaver",
3
- "version": "0.8.7",
3
+ "version": "0.8.9",
4
4
  "description": "AI Expert Persona System - Give your AI coding assistant expert personalities (가면술사)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",