maskweaver 0.9.3 → 0.9.5
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.ko.md +279 -325
- package/README.md +109 -113
- package/assets/commands/meta/commands.json +34 -34
- package/assets/commands/weave-agents.md +12 -52
- package/assets/commands/weave-approve.md +12 -51
- package/assets/commands/weave-archive.md +21 -0
- package/assets/commands/weave-build.md +20 -89
- package/assets/commands/weave-craft.md +22 -43
- package/assets/commands/weave-help.md +37 -106
- package/assets/commands/weave-init.md +26 -108
- package/assets/commands/weave-interview.md +13 -111
- package/assets/commands/weave-map.md +13 -99
- package/assets/commands/weave-prepare.md +23 -69
- package/assets/commands/weave-refine-plan.md +26 -59
- package/assets/commands/weave-repair.md +22 -70
- package/assets/commands/weave-status.md +22 -155
- package/assets/commands/weave-troubleshoot.md +11 -47
- package/assets/commands/weave-verify.md +23 -44
- package/assets/commands/weave-worktree.md +27 -69
- package/dist/cli/doctor.js +5 -21
- package/dist/cli/install.d.ts +0 -8
- package/dist/cli/install.js +0 -39
- package/dist/context/config.d.ts +0 -22
- package/dist/context/config.js +0 -28
- package/dist/context/feature.d.ts +0 -39
- package/dist/context/feature.js +0 -77
- package/dist/context/files.d.ts +0 -13
- package/dist/context/files.js +1 -24
- package/dist/context/index.d.ts +0 -7
- package/dist/context/index.js +0 -12
- package/dist/context/project.d.ts +0 -21
- package/dist/context/project.js +0 -30
- package/dist/context/types.d.ts +0 -48
- package/dist/context/types.js +0 -12
- package/dist/context/utils.d.ts +0 -18
- package/dist/context/utils.js +0 -27
- package/dist/core/engine/promptBuilder.d.ts +0 -17
- package/dist/core/engine/promptBuilder.js +0 -28
- package/dist/core/index.d.ts +0 -6
- package/dist/core/index.js +0 -9
- package/dist/core/loader/MaskLoader.d.ts +0 -23
- package/dist/core/loader/MaskLoader.js +0 -29
- package/dist/core/schema/types.d.ts +0 -47
- package/dist/core/schema/types.js +0 -6
- package/dist/core/schema/validator.d.ts +0 -14
- package/dist/core/schema/validator.js +0 -18
- package/dist/i18n/index.d.ts +0 -18
- package/dist/i18n/index.js +4 -23
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -8
- package/dist/lib.d.ts +0 -5
- package/dist/lib.js +0 -12
- package/dist/memory/chunking.d.ts +0 -22
- package/dist/memory/chunking.js +2 -37
- package/dist/memory/core.d.ts +0 -29
- package/dist/memory/core.js +1 -52
- package/dist/memory/index.d.ts +0 -5
- package/dist/memory/index.js +0 -10
- package/dist/memory/indexer.d.ts +0 -21
- package/dist/memory/indexer.js +0 -44
- package/dist/memory/providers/examples.d.ts +0 -5
- package/dist/memory/providers/examples.js +4 -64
- package/dist/memory/providers/factory.d.ts +0 -44
- package/dist/memory/providers/factory.js +0 -46
- package/dist/memory/providers/index.d.ts +0 -26
- package/dist/memory/providers/index.js +0 -28
- package/dist/memory/providers/ollama.d.ts +0 -6
- package/dist/memory/providers/ollama.js +1 -8
- package/dist/memory/providers/openai.d.ts +0 -6
- package/dist/memory/providers/openai.js +1 -8
- package/dist/memory/providers/openrouter.d.ts +0 -6
- package/dist/memory/providers/openrouter.js +0 -8
- package/dist/memory/providers/text-only.d.ts +0 -13
- package/dist/memory/providers/text-only.js +0 -17
- package/dist/memory/providers/types.d.ts +0 -39
- package/dist/memory/providers/types.js +0 -7
- package/dist/memory/providers/voyage.d.ts +0 -22
- package/dist/memory/providers/voyage.js +1 -24
- package/dist/memory/search/hybrid.d.ts +0 -12
- package/dist/memory/search/hybrid.js +1 -22
- package/dist/memory/store/sqlite.d.ts +0 -72
- package/dist/memory/store/sqlite.js +4 -127
- package/dist/plugin/config/index.d.ts +0 -112
- package/dist/plugin/config/index.js +0 -115
- package/dist/plugin/index.d.ts +0 -13
- package/dist/plugin/index.js +1 -124
- package/dist/plugin/tools/command-registry.d.ts +0 -6
- package/dist/plugin/tools/command-registry.js +0 -14
- package/dist/plugin/tools/context.d.ts +0 -12
- package/dist/plugin/tools/context.js +0 -58
- package/dist/plugin/tools/maskSave.d.ts +0 -3
- package/dist/plugin/tools/maskSave.js +0 -3
- package/dist/plugin/tools/memoryGet.d.ts +0 -3
- package/dist/plugin/tools/memoryGet.js +0 -3
- package/dist/plugin/tools/memoryIndexer.d.ts +0 -3
- package/dist/plugin/tools/memoryIndexer.js +0 -10
- package/dist/plugin/tools/memorySearch.d.ts +0 -31
- package/dist/plugin/tools/memorySearch.js +0 -79
- package/dist/plugin/tools/memoryWrite.d.ts +0 -8
- package/dist/plugin/tools/memoryWrite.js +0 -32
- package/dist/plugin/tools/retrospect.d.ts +0 -3
- package/dist/plugin/tools/retrospect.js +0 -3
- package/dist/plugin/tools/slashcommand.d.ts +0 -11
- package/dist/plugin/tools/slashcommand.js +0 -38
- package/dist/plugin/tools/squad.d.ts +0 -12
- package/dist/plugin/tools/squad.js +11 -83
- package/dist/plugin/tools/weave.d.ts +0 -6
- package/dist/plugin/tools/weave.js +0 -78
- package/dist/plugin/types.d.ts +0 -20
- package/dist/plugin/types.js +0 -7
- package/dist/retrospect/index.d.ts +0 -7
- package/dist/retrospect/index.js +0 -9
- package/dist/retrospect/mask-save.d.ts +0 -12
- package/dist/retrospect/mask-save.js +1 -80
- package/dist/retrospect/retrospect.d.ts +0 -18
- package/dist/retrospect/retrospect.js +0 -63
- package/dist/retrospect/strategies/base.d.ts +0 -15
- package/dist/retrospect/strategies/base.js +0 -7
- package/dist/retrospect/strategies/deep.d.ts +0 -12
- package/dist/retrospect/strategies/deep.js +0 -24
- package/dist/retrospect/strategies/index.d.ts +0 -12
- package/dist/retrospect/strategies/index.js +0 -12
- package/dist/retrospect/strategies/quick.d.ts +0 -12
- package/dist/retrospect/strategies/quick.js +0 -19
- package/dist/retrospect/strategies/standard.d.ts +0 -12
- package/dist/retrospect/strategies/standard.js +0 -15
- package/dist/retrospect/types.d.ts +0 -7
- package/dist/retrospect/types.js +0 -7
- package/dist/shared/config.d.ts +0 -105
- package/dist/shared/config.js +0 -33
- package/dist/shared/errors.d.ts +0 -18
- package/dist/shared/errors.js +0 -19
- package/dist/shared/generate-agents.d.ts +0 -69
- package/dist/shared/generate-agents.js +2 -86
- package/dist/shared/image.d.ts +0 -67
- package/dist/shared/image.js +6 -104
- package/dist/shared/index.d.ts +0 -5
- package/dist/shared/index.js +0 -7
- package/dist/shared/model-registry.d.ts +0 -72
- package/dist/shared/model-registry.js +5 -95
- package/dist/shared/types.d.ts +0 -15
- package/dist/shared/types.js +0 -3
- package/dist/shared-context/dag.d.ts +0 -105
- package/dist/shared-context/dag.js +3 -114
- package/dist/shared-context/index.d.ts +0 -5
- package/dist/shared-context/index.js +0 -15
- package/dist/shared-context/logger.d.ts +0 -37
- package/dist/shared-context/logger.js +0 -41
- package/dist/shared-context/parallel-executor.d.ts +0 -54
- package/dist/shared-context/parallel-executor.js +4 -56
- package/dist/shared-context/session.d.ts +0 -56
- package/dist/shared-context/session.js +0 -47
- package/dist/shared-context/squad.d.ts +0 -68
- package/dist/shared-context/squad.js +0 -63
- package/dist/shared-context/storage.d.ts +0 -132
- package/dist/shared-context/storage.js +0 -116
- package/dist/shared-context/task.d.ts +0 -120
- package/dist/shared-context/task.js +0 -152
- package/dist/shared-context/test/dag.test.js +9 -14
- package/dist/shared-context/test/logger.test.d.ts +0 -8
- package/dist/shared-context/test/logger.test.js +0 -52
- package/dist/shared-context/test/session.test.d.ts +0 -7
- package/dist/shared-context/test/session.test.js +0 -63
- package/dist/shared-context/test/squad.test.d.ts +0 -10
- package/dist/shared-context/test/squad.test.js +2 -68
- package/dist/shared-context/test/storage.test.d.ts +0 -8
- package/dist/shared-context/test/storage.test.js +0 -68
- package/dist/shared-context/test/task.test.d.ts +0 -7
- package/dist/shared-context/test/task.test.js +0 -54
- package/dist/shared-context/test/watchdog.test.d.ts +0 -7
- package/dist/shared-context/test/watchdog.test.js +3 -58
- package/dist/shared-context/types.d.ts +0 -215
- package/dist/shared-context/types.js +0 -125
- package/dist/shared-context/watchdog.d.ts +0 -127
- package/dist/shared-context/watchdog.js +0 -148
- package/dist/shared-context/worktree.d.ts +0 -68
- package/dist/shared-context/worktree.js +2 -34
- package/dist/verify/budget.d.ts +0 -29
- package/dist/verify/budget.js +0 -34
- package/dist/verify/critical-files.d.ts +0 -17
- package/dist/verify/critical-files.js +0 -37
- package/dist/verify/escalation.d.ts +0 -20
- package/dist/verify/escalation.js +0 -22
- package/dist/verify/index.d.ts +0 -5
- package/dist/verify/index.js +0 -11
- package/dist/verify/prompts.d.ts +0 -20
- package/dist/verify/prompts.js +0 -20
- package/dist/verify/types.d.ts +0 -26
- package/dist/verify/types.js +1 -12
- package/dist/verify/verifier.d.ts +0 -29
- package/dist/verify/verifier.js +0 -54
- package/dist/version.d.ts +1 -16
- package/dist/version.js +1 -16
- package/dist/weave/bridge.d.ts +0 -35
- package/dist/weave/bridge.js +0 -51
- package/dist/weave/environment/detector.d.ts +0 -6
- package/dist/weave/environment/detector.js +4 -45
- package/dist/weave/environment/index.d.ts +0 -19
- package/dist/weave/environment/index.js +1 -39
- package/dist/weave/environment/issues.d.ts +0 -35
- package/dist/weave/environment/issues.js +0 -59
- package/dist/weave/git.d.ts +0 -8
- package/dist/weave/git.js +0 -8
- package/dist/weave/index.d.ts +0 -13
- package/dist/weave/index.js +2 -28
- package/dist/weave/knowledge/global.d.ts +0 -39
- package/dist/weave/knowledge/global.js +2 -78
- package/dist/weave/loop.js +0 -3
- package/dist/weave/orchestrator.d.ts +0 -69
- package/dist/weave/orchestrator.js +1 -101
- package/dist/weave/phase-manager.d.ts +0 -64
- package/dist/weave/phase-manager.js +0 -89
- package/dist/weave/security/secret-scan.d.ts +0 -14
- package/dist/weave/security/secret-scan.js +0 -19
- package/dist/weave/stages/build.js +0 -15
- package/dist/weave/stages/execute.d.ts +0 -42
- package/dist/weave/stages/execute.js +4 -86
- package/dist/weave/stages/handoff.d.ts +0 -7
- package/dist/weave/stages/handoff.js +0 -43
- package/dist/weave/stages/index.d.ts +0 -3
- package/dist/weave/stages/index.js +0 -3
- package/dist/weave/stages/intake.d.ts +0 -8
- package/dist/weave/stages/intake.js +5 -65
- package/dist/weave/stages/map.d.ts +0 -1
- package/dist/weave/stages/openspec.d.ts +0 -1
- package/dist/weave/stages/plan.d.ts +0 -11
- package/dist/weave/stages/plan.js +1 -53
- package/dist/weave/stages/refine.d.ts +0 -7
- package/dist/weave/stages/refine.js +0 -7
- package/dist/weave/stages/research.d.ts +0 -6
- package/dist/weave/stages/research.js +0 -6
- package/dist/weave/stages/spec.d.ts +0 -12
- package/dist/weave/stages/spec.js +0 -17
- package/dist/weave/types.d.ts +0 -20
- package/dist/weave/types.js +0 -5
- package/dist/weave/verification/commands.d.ts +0 -12
- package/dist/weave/verification/commands.js +0 -19
- package/dist/weave/verification/index.d.ts +0 -6
- package/dist/weave/verification/index.js +1 -19
- package/dist/weave/verification/playwright.d.ts +0 -47
- package/dist/weave/verification/playwright.js +1 -90
- package/dist/weave/worktree.d.ts +0 -16
- package/dist/weave/worktree.js +0 -23
- package/dist/weave/yaml-repair.d.ts +0 -39
- package/dist/weave/yaml-repair.js +13 -116
- package/package.json +1 -1
package/dist/retrospect/types.js
CHANGED
package/dist/shared/config.d.ts
CHANGED
|
@@ -1,61 +1,27 @@
|
|
|
1
1
|
import type { LogLevel } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Memory provider types
|
|
4
|
-
*/
|
|
5
2
|
export type MemoryProviderType = "ollama" | "openai" | "voyage" | "openrouter" | "text-only";
|
|
6
|
-
/**
|
|
7
|
-
* Verify mode
|
|
8
|
-
*/
|
|
9
3
|
export type VerifyMode = "auto" | "manual" | "off";
|
|
10
|
-
/**
|
|
11
|
-
* Reviewer types for verification
|
|
12
|
-
*/
|
|
13
4
|
export type ReviewerType = "dummy-flash" | "dummy-human" | "dummy-premium";
|
|
14
|
-
/**
|
|
15
|
-
* Retrospect depth levels
|
|
16
|
-
*/
|
|
17
5
|
export type RetrospectDepth = "quick" | "standard" | "deep";
|
|
18
|
-
/**
|
|
19
|
-
* Configuration for the Context feature (always enabled)
|
|
20
|
-
*/
|
|
21
6
|
export interface ContextConfig {
|
|
22
7
|
enabled: true;
|
|
23
8
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Configuration for the Memory feature
|
|
26
|
-
*/
|
|
27
9
|
export interface MemoryConfig {
|
|
28
10
|
enabled: boolean;
|
|
29
11
|
provider: MemoryProviderType;
|
|
30
12
|
}
|
|
31
|
-
/**
|
|
32
|
-
* Configuration for the Retrospect feature
|
|
33
|
-
*/
|
|
34
13
|
export interface RetrospectConfig {
|
|
35
14
|
enabled: boolean;
|
|
36
15
|
}
|
|
37
|
-
/**
|
|
38
|
-
* Configuration for the Verify feature
|
|
39
|
-
*/
|
|
40
16
|
export interface VerifyConfig {
|
|
41
17
|
enabled: boolean;
|
|
42
18
|
}
|
|
43
|
-
/**
|
|
44
|
-
* Feature configuration map
|
|
45
|
-
*/
|
|
46
19
|
export interface FeaturesConfig {
|
|
47
|
-
/** Context is always enabled */
|
|
48
20
|
context: ContextConfig;
|
|
49
|
-
/** Memory is optional */
|
|
50
21
|
memory?: MemoryConfig;
|
|
51
|
-
/** Retrospect is optional */
|
|
52
22
|
retrospect?: RetrospectConfig;
|
|
53
|
-
/** Verify is optional */
|
|
54
23
|
verify?: VerifyConfig;
|
|
55
24
|
}
|
|
56
|
-
/**
|
|
57
|
-
* Memory provider-specific configurations
|
|
58
|
-
*/
|
|
59
25
|
export interface MemoryProviderConfigs {
|
|
60
26
|
provider: MemoryProviderType;
|
|
61
27
|
vectorStore?: {
|
|
@@ -86,9 +52,6 @@ export interface MemoryProviderConfigs {
|
|
|
86
52
|
keywordWeight: number;
|
|
87
53
|
};
|
|
88
54
|
}
|
|
89
|
-
/**
|
|
90
|
-
* Verification configuration
|
|
91
|
-
*/
|
|
92
55
|
export interface VerifyConfigOptions {
|
|
93
56
|
mode: VerifyMode;
|
|
94
57
|
reviewer: ReviewerType;
|
|
@@ -104,32 +67,16 @@ export interface VerifyConfigOptions {
|
|
|
104
67
|
onTestFail?: boolean;
|
|
105
68
|
};
|
|
106
69
|
}
|
|
107
|
-
/**
|
|
108
|
-
* Logging configuration
|
|
109
|
-
*/
|
|
110
70
|
export interface LoggingConfig {
|
|
111
71
|
level: LogLevel;
|
|
112
72
|
}
|
|
113
|
-
/**
|
|
114
|
-
* Main Maskweaver configuration
|
|
115
|
-
*/
|
|
116
73
|
export interface MaskweaverConfig {
|
|
117
|
-
/** Feature toggles */
|
|
118
74
|
features: FeaturesConfig;
|
|
119
|
-
/** Memory system configuration */
|
|
120
75
|
memory?: MemoryProviderConfigs;
|
|
121
|
-
/** Verification system configuration */
|
|
122
76
|
verify?: VerifyConfigOptions;
|
|
123
|
-
/** Logging configuration */
|
|
124
77
|
logging?: LoggingConfig;
|
|
125
78
|
}
|
|
126
|
-
/**
|
|
127
|
-
* Default configuration
|
|
128
|
-
*/
|
|
129
79
|
export declare const DEFAULT_CONFIG: MaskweaverConfig;
|
|
130
|
-
/**
|
|
131
|
-
* Runtime memory configuration from maskweaver.config.json
|
|
132
|
-
*/
|
|
133
80
|
export interface RuntimeMemoryConfig {
|
|
134
81
|
provider: MemoryProviderType;
|
|
135
82
|
model?: string;
|
|
@@ -137,9 +84,6 @@ export interface RuntimeMemoryConfig {
|
|
|
137
84
|
enabled?: boolean;
|
|
138
85
|
baseUrl?: string;
|
|
139
86
|
}
|
|
140
|
-
/**
|
|
141
|
-
* Runtime GDC integration configuration from maskweaver.config.json
|
|
142
|
-
*/
|
|
143
87
|
export interface RuntimeGdcConfig {
|
|
144
88
|
enabled?: boolean | 'auto';
|
|
145
89
|
strictVerify?: boolean;
|
|
@@ -163,82 +107,33 @@ export interface RuntimeConfig {
|
|
|
163
107
|
gdc?: RuntimeGdcConfig;
|
|
164
108
|
language?: string;
|
|
165
109
|
}
|
|
166
|
-
/** Cost tier for budget-aware scheduling */
|
|
167
110
|
export type ModelCostTier = 'low' | 'medium' | 'high';
|
|
168
|
-
/** Agent tier mapping */
|
|
169
111
|
export type ModelTier = 'flash' | 'human' | 'premium';
|
|
170
|
-
/** Known capability tags for task-model matching */
|
|
171
112
|
export type ModelCapability = 'search' | 'formatting' | 'simple-coding' | 'file-ops' | 'coding' | 'testing' | 'refactoring' | 'architecture' | 'debugging' | 'reasoning' | 'complex-coding' | 'frontend' | 'backend' | 'database' | 'devops' | 'ml' | string;
|
|
172
|
-
/**
|
|
173
|
-
* A single model entry in the pool.
|
|
174
|
-
* Each entry represents one AI model subscription the user has access to.
|
|
175
|
-
*/
|
|
176
113
|
export interface ModelPoolEntry {
|
|
177
|
-
/** Unique identifier for this model slot (e.g., "gemini-flash", "claude-opus") */
|
|
178
114
|
id: string;
|
|
179
|
-
/** Full model name as used by the provider (e.g., "google/antigravity-gemini-3-flash") */
|
|
180
115
|
model: string;
|
|
181
|
-
/** Which agent tier this model maps to */
|
|
182
116
|
tier: ModelTier;
|
|
183
|
-
/** Maximum concurrent uses allowed (API/subscription limit) */
|
|
184
117
|
maxConcurrent: number;
|
|
185
|
-
/** Task capabilities this model excels at */
|
|
186
118
|
capabilities: ModelCapability[];
|
|
187
|
-
/** Cost tier for budget-aware scheduling */
|
|
188
119
|
costTier: ModelCostTier;
|
|
189
|
-
/** Human-readable description */
|
|
190
120
|
description?: string;
|
|
191
121
|
}
|
|
192
|
-
/**
|
|
193
|
-
* DummyHumans configuration.
|
|
194
|
-
* Supports two formats:
|
|
195
|
-
* - Legacy: Record<string, string> mapping tier names to model IDs
|
|
196
|
-
* - Pool: { pool: ModelPoolEntry[] } with detailed model definitions
|
|
197
|
-
*/
|
|
198
122
|
export type DummyHumansConfig = Record<string, string> | {
|
|
199
123
|
pool: ModelPoolEntry[];
|
|
200
124
|
};
|
|
201
|
-
/** Type guard for pool format */
|
|
202
125
|
export declare function isPoolConfig(config: DummyHumansConfig): config is {
|
|
203
126
|
pool: ModelPoolEntry[];
|
|
204
127
|
};
|
|
205
|
-
/**
|
|
206
|
-
* Normalize legacy config to pool entries.
|
|
207
|
-
* Converts { flash: "model-a", human: "model-b", premium: "model-c" }
|
|
208
|
-
* into ModelPoolEntry[] with sensible defaults.
|
|
209
|
-
*/
|
|
210
128
|
export declare function normalizeDummyHumansConfig(config: DummyHumansConfig): ModelPoolEntry[];
|
|
211
|
-
/**
|
|
212
|
-
* Runtime configuration from maskweaver.config.json
|
|
213
|
-
*/
|
|
214
129
|
export interface RuntimeConfig {
|
|
215
130
|
dummyHumans?: DummyHumansConfig;
|
|
216
131
|
memory?: RuntimeMemoryConfig;
|
|
217
132
|
gdc?: RuntimeGdcConfig;
|
|
218
133
|
language?: string;
|
|
219
134
|
}
|
|
220
|
-
/**
|
|
221
|
-
* Load maskweaver.config.json from project root or global config
|
|
222
|
-
*
|
|
223
|
-
* Searches in order:
|
|
224
|
-
* 1. {basePath}/maskweaver.config.json
|
|
225
|
-
* 2. {basePath}/.opencode/maskweaver.config.json
|
|
226
|
-
* 3. ~/.config/opencode/maskweaver.config.json (global fallback)
|
|
227
|
-
*/
|
|
228
135
|
export declare function loadRuntimeConfig(basePath?: string): RuntimeConfig;
|
|
229
|
-
/**
|
|
230
|
-
* Get memory provider configuration from runtime config
|
|
231
|
-
*/
|
|
232
136
|
export declare function getMemoryProviderConfig(basePath?: string): RuntimeMemoryConfig | undefined;
|
|
233
|
-
/**
|
|
234
|
-
* Get GDC integration configuration from runtime config
|
|
235
|
-
*/
|
|
236
137
|
export declare function getGdcConfig(basePath?: string): RuntimeGdcConfig | undefined;
|
|
237
|
-
/**
|
|
238
|
-
* Get operator model configuration from runtime config
|
|
239
|
-
*/
|
|
240
138
|
export declare function getOperatorConfig(basePath?: string): RuntimeOperatorConfig | undefined;
|
|
241
|
-
/**
|
|
242
|
-
* Clear cached runtime config (for testing)
|
|
243
|
-
*/
|
|
244
139
|
export declare function clearRuntimeConfigCache(): void;
|
package/dist/shared/config.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import * as fs from "node:fs";
|
|
2
2
|
import * as os from "node:os";
|
|
3
3
|
import * as path from "node:path";
|
|
4
|
-
/**
|
|
5
|
-
* Default configuration
|
|
6
|
-
*/
|
|
7
4
|
export const DEFAULT_CONFIG = {
|
|
8
5
|
features: {
|
|
9
6
|
context: { enabled: true },
|
|
@@ -12,24 +9,16 @@ export const DEFAULT_CONFIG = {
|
|
|
12
9
|
level: "info",
|
|
13
10
|
},
|
|
14
11
|
};
|
|
15
|
-
/** Type guard for pool format */
|
|
16
12
|
export function isPoolConfig(config) {
|
|
17
13
|
return 'pool' in config && Array.isArray(config.pool);
|
|
18
14
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Normalize legacy config to pool entries.
|
|
21
|
-
* Converts { flash: "model-a", human: "model-b", premium: "model-c" }
|
|
22
|
-
* into ModelPoolEntry[] with sensible defaults.
|
|
23
|
-
*/
|
|
24
15
|
export function normalizeDummyHumansConfig(config) {
|
|
25
|
-
// Defensive guard: if called with null/undefined at runtime, return empty
|
|
26
16
|
if (!config || typeof config !== 'object') {
|
|
27
17
|
return [];
|
|
28
18
|
}
|
|
29
19
|
if (isPoolConfig(config)) {
|
|
30
20
|
return config.pool;
|
|
31
21
|
}
|
|
32
|
-
// Legacy format → convert to pool entries
|
|
33
22
|
const tierDefaults = {
|
|
34
23
|
flash: { tier: 'flash', costTier: 'low', maxConcurrent: 5, capabilities: ['search', 'formatting', 'simple-coding', 'file-ops'] },
|
|
35
24
|
human: { tier: 'human', costTier: 'medium', maxConcurrent: 2, capabilities: ['coding', 'testing', 'refactoring'] },
|
|
@@ -48,16 +37,7 @@ export function normalizeDummyHumansConfig(config) {
|
|
|
48
37
|
}
|
|
49
38
|
let cachedRuntimeConfig = null;
|
|
50
39
|
let cachedConfigPath = null;
|
|
51
|
-
/**
|
|
52
|
-
* Load maskweaver.config.json from project root or global config
|
|
53
|
-
*
|
|
54
|
-
* Searches in order:
|
|
55
|
-
* 1. {basePath}/maskweaver.config.json
|
|
56
|
-
* 2. {basePath}/.opencode/maskweaver.config.json
|
|
57
|
-
* 3. ~/.config/opencode/maskweaver.config.json (global fallback)
|
|
58
|
-
*/
|
|
59
40
|
export function loadRuntimeConfig(basePath = process.cwd()) {
|
|
60
|
-
// Return cached config if same path
|
|
61
41
|
if (cachedRuntimeConfig && cachedConfigPath === basePath) {
|
|
62
42
|
return cachedRuntimeConfig;
|
|
63
43
|
}
|
|
@@ -80,35 +60,22 @@ export function loadRuntimeConfig(basePath = process.cwd()) {
|
|
|
80
60
|
}
|
|
81
61
|
}
|
|
82
62
|
}
|
|
83
|
-
// Return empty config if not found
|
|
84
63
|
cachedRuntimeConfig = {};
|
|
85
64
|
cachedConfigPath = basePath;
|
|
86
65
|
return {};
|
|
87
66
|
}
|
|
88
|
-
/**
|
|
89
|
-
* Get memory provider configuration from runtime config
|
|
90
|
-
*/
|
|
91
67
|
export function getMemoryProviderConfig(basePath = process.cwd()) {
|
|
92
68
|
const config = loadRuntimeConfig(basePath);
|
|
93
69
|
return config.memory;
|
|
94
70
|
}
|
|
95
|
-
/**
|
|
96
|
-
* Get GDC integration configuration from runtime config
|
|
97
|
-
*/
|
|
98
71
|
export function getGdcConfig(basePath = process.cwd()) {
|
|
99
72
|
const config = loadRuntimeConfig(basePath);
|
|
100
73
|
return config.gdc;
|
|
101
74
|
}
|
|
102
|
-
/**
|
|
103
|
-
* Get operator model configuration from runtime config
|
|
104
|
-
*/
|
|
105
75
|
export function getOperatorConfig(basePath = process.cwd()) {
|
|
106
76
|
const config = loadRuntimeConfig(basePath);
|
|
107
77
|
return config.operator;
|
|
108
78
|
}
|
|
109
|
-
/**
|
|
110
|
-
* Clear cached runtime config (for testing)
|
|
111
|
-
*/
|
|
112
79
|
export function clearRuntimeConfigCache() {
|
|
113
80
|
cachedRuntimeConfig = null;
|
|
114
81
|
cachedConfigPath = null;
|
package/dist/shared/errors.d.ts
CHANGED
|
@@ -1,35 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Error handling for Maskweaver
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Base error class for all Maskweaver errors
|
|
6
|
-
*/
|
|
7
1
|
export declare class MaskweaverError extends Error {
|
|
8
2
|
readonly code?: string | undefined;
|
|
9
3
|
readonly context?: Record<string, unknown> | undefined;
|
|
10
4
|
constructor(message: string, code?: string | undefined, context?: Record<string, unknown> | undefined);
|
|
11
5
|
}
|
|
12
|
-
/**
|
|
13
|
-
* Configuration error
|
|
14
|
-
*/
|
|
15
6
|
export declare class ConfigError extends MaskweaverError {
|
|
16
7
|
constructor(message: string, context?: Record<string, unknown>);
|
|
17
8
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Provider error (for memory providers, etc.)
|
|
20
|
-
*/
|
|
21
9
|
export declare class ProviderError extends MaskweaverError {
|
|
22
10
|
constructor(message: string, context?: Record<string, unknown>);
|
|
23
11
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Storage error
|
|
26
|
-
*/
|
|
27
12
|
export declare class StorageError extends MaskweaverError {
|
|
28
13
|
constructor(message: string, context?: Record<string, unknown>);
|
|
29
14
|
}
|
|
30
|
-
/**
|
|
31
|
-
* Validation error
|
|
32
|
-
*/
|
|
33
15
|
export declare class ValidationError extends MaskweaverError {
|
|
34
16
|
constructor(message: string, context?: Record<string, unknown>);
|
|
35
17
|
}
|
package/dist/shared/errors.js
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Error handling for Maskweaver
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Base error class for all Maskweaver errors
|
|
6
|
-
*/
|
|
7
1
|
export class MaskweaverError extends Error {
|
|
8
2
|
code;
|
|
9
3
|
context;
|
|
@@ -12,42 +6,29 @@ export class MaskweaverError extends Error {
|
|
|
12
6
|
this.code = code;
|
|
13
7
|
this.context = context;
|
|
14
8
|
this.name = "MaskweaverError";
|
|
15
|
-
// Maintains proper stack trace for where our error was thrown (only available on V8)
|
|
16
9
|
if (Error.captureStackTrace) {
|
|
17
10
|
Error.captureStackTrace(this, MaskweaverError);
|
|
18
11
|
}
|
|
19
12
|
}
|
|
20
13
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Configuration error
|
|
23
|
-
*/
|
|
24
14
|
export class ConfigError extends MaskweaverError {
|
|
25
15
|
constructor(message, context) {
|
|
26
16
|
super(message, "CONFIG_ERROR", context);
|
|
27
17
|
this.name = "ConfigError";
|
|
28
18
|
}
|
|
29
19
|
}
|
|
30
|
-
/**
|
|
31
|
-
* Provider error (for memory providers, etc.)
|
|
32
|
-
*/
|
|
33
20
|
export class ProviderError extends MaskweaverError {
|
|
34
21
|
constructor(message, context) {
|
|
35
22
|
super(message, "PROVIDER_ERROR", context);
|
|
36
23
|
this.name = "ProviderError";
|
|
37
24
|
}
|
|
38
25
|
}
|
|
39
|
-
/**
|
|
40
|
-
* Storage error
|
|
41
|
-
*/
|
|
42
26
|
export class StorageError extends MaskweaverError {
|
|
43
27
|
constructor(message, context) {
|
|
44
28
|
super(message, "STORAGE_ERROR", context);
|
|
45
29
|
this.name = "StorageError";
|
|
46
30
|
}
|
|
47
31
|
}
|
|
48
|
-
/**
|
|
49
|
-
* Validation error
|
|
50
|
-
*/
|
|
51
32
|
export class ValidationError extends MaskweaverError {
|
|
52
33
|
constructor(message, context) {
|
|
53
34
|
super(message, "VALIDATION_ERROR", context);
|
|
@@ -1,65 +1,22 @@
|
|
|
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
1
|
import type { ModelPoolEntry } from './config.js';
|
|
10
2
|
export interface GenerateAgentsResult {
|
|
11
|
-
/** Files that were created (did not exist before) */
|
|
12
3
|
created: string[];
|
|
13
|
-
/** Files that were updated (existed and were overwritten) */
|
|
14
4
|
updated: string[];
|
|
15
|
-
/** Files that were skipped (existed and force was false) */
|
|
16
5
|
skipped: string[];
|
|
17
|
-
/** Error messages */
|
|
18
6
|
errors: string[];
|
|
19
7
|
}
|
|
20
8
|
export interface GenerateAgentsOptions {
|
|
21
|
-
/** Force overwrite existing files (default: false) */
|
|
22
9
|
force?: boolean;
|
|
23
|
-
/** Base project directory */
|
|
24
10
|
projectDir?: string;
|
|
25
|
-
/** Custom agents output directory (default: {projectDir}/.opencode/agents) */
|
|
26
11
|
agentsDir?: string;
|
|
27
|
-
/** Custom pool entries (if not provided, reads from config) */
|
|
28
12
|
pool?: ModelPoolEntry[];
|
|
29
13
|
}
|
|
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
14
|
export declare function generatePoolAgentFiles(pool: ModelPoolEntry[], agentsDir: string, options?: {
|
|
39
15
|
force?: boolean;
|
|
40
16
|
}): 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
17
|
export declare function generatePoolAgentFilesFromConfig(projectDir: string, agentsDir: string, options?: {
|
|
55
18
|
force?: boolean;
|
|
56
19
|
}): 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
20
|
export declare const DEFAULT_RUNTIME_CONFIG_TEMPLATE: {
|
|
64
21
|
readonly dummyHumans: {
|
|
65
22
|
readonly pool: readonly [{
|
|
@@ -120,9 +77,6 @@ export declare const DEFAULT_RUNTIME_CONFIG_TEMPLATE: {
|
|
|
120
77
|
};
|
|
121
78
|
readonly language: "ko";
|
|
122
79
|
};
|
|
123
|
-
/**
|
|
124
|
-
* Default plugin config template (.opencode/maskweaver.json).
|
|
125
|
-
*/
|
|
126
80
|
export declare const DEFAULT_PLUGIN_CONFIG_TEMPLATE: {
|
|
127
81
|
$schema: string;
|
|
128
82
|
masks: {
|
|
@@ -137,29 +91,6 @@ export declare const DEFAULT_PLUGIN_CONFIG_TEMPLATE: {
|
|
|
137
91
|
};
|
|
138
92
|
};
|
|
139
93
|
};
|
|
140
|
-
/**
|
|
141
|
-
* Write a default maskweaver.config.json to the project directory.
|
|
142
|
-
* Does NOT overwrite if the file already exists.
|
|
143
|
-
*
|
|
144
|
-
* @param projectDir - Project base directory
|
|
145
|
-
* @returns The path to the created file, or null if it already existed
|
|
146
|
-
*/
|
|
147
94
|
export declare function writeDefaultRuntimeConfig(projectDir: string): string | null;
|
|
148
|
-
/**
|
|
149
|
-
* Write a default .opencode/maskweaver.json (plugin config) to the project.
|
|
150
|
-
* Does NOT overwrite if the file already exists.
|
|
151
|
-
*
|
|
152
|
-
* @param projectDir - Project base directory
|
|
153
|
-
* @returns The path to the created file, or null if it already existed
|
|
154
|
-
*/
|
|
155
95
|
export declare function writeDefaultPluginConfig(projectDir: string): string | null;
|
|
156
|
-
/**
|
|
157
|
-
* Check if a user-level config exists at ~/.config/opencode/ and return it.
|
|
158
|
-
*
|
|
159
|
-
* Search order:
|
|
160
|
-
* 1. ~/.config/opencode/maskweaver.config.json
|
|
161
|
-
* 2. ~/.config/opencode/maskweaver.json (plugin config with agents)
|
|
162
|
-
*
|
|
163
|
-
* @returns The config path if found, or null
|
|
164
|
-
*/
|
|
165
96
|
export declare function findUserGlobalConfig(): string | null;
|
|
@@ -1,21 +1,7 @@
|
|
|
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
1
|
import * as fs from 'node:fs';
|
|
10
2
|
import * as path from 'node:path';
|
|
11
3
|
import * as os from 'node:os';
|
|
12
4
|
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
5
|
function buildAgentFileContent(entry) {
|
|
20
6
|
const lines = [
|
|
21
7
|
'---',
|
|
@@ -34,17 +20,6 @@ function buildAgentFileContent(entry) {
|
|
|
34
20
|
];
|
|
35
21
|
return lines.join('\n');
|
|
36
22
|
}
|
|
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
23
|
export function generatePoolAgentFiles(pool, agentsDir, options = {}) {
|
|
49
24
|
const result = {
|
|
50
25
|
created: [],
|
|
@@ -56,7 +31,6 @@ export function generatePoolAgentFiles(pool, agentsDir, options = {}) {
|
|
|
56
31
|
result.errors.push('Pool is empty or undefined. No agents to generate.');
|
|
57
32
|
return result;
|
|
58
33
|
}
|
|
59
|
-
// Ensure agents directory exists
|
|
60
34
|
if (!fs.existsSync(agentsDir)) {
|
|
61
35
|
try {
|
|
62
36
|
fs.mkdirSync(agentsDir, { recursive: true });
|
|
@@ -74,7 +48,6 @@ export function generatePoolAgentFiles(pool, agentsDir, options = {}) {
|
|
|
74
48
|
result.skipped.push(agentPath);
|
|
75
49
|
continue;
|
|
76
50
|
}
|
|
77
|
-
// Validate: model must not be empty
|
|
78
51
|
if (!entry.model || entry.model.trim() === '') {
|
|
79
52
|
result.errors.push(`Entry "${entry.id}" has no model configured. Skipping.`);
|
|
80
53
|
continue;
|
|
@@ -95,24 +68,7 @@ export function generatePoolAgentFiles(pool, agentsDir, options = {}) {
|
|
|
95
68
|
}
|
|
96
69
|
return result;
|
|
97
70
|
}
|
|
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
71
|
export function generatePoolAgentFilesFromConfig(projectDir, agentsDir, options = {}) {
|
|
115
|
-
// Try project config first
|
|
116
72
|
const projectConfig = loadRuntimeConfig(projectDir);
|
|
117
73
|
if (projectConfig.dummyHumans) {
|
|
118
74
|
const pool = normalizeDummyHumansConfig(projectConfig.dummyHumans);
|
|
@@ -120,7 +76,6 @@ export function generatePoolAgentFilesFromConfig(projectDir, agentsDir, options
|
|
|
120
76
|
return generatePoolAgentFiles(pool, agentsDir, options);
|
|
121
77
|
}
|
|
122
78
|
}
|
|
123
|
-
// Try user global config (~/.config/opencode/maskweaver.config.json)
|
|
124
79
|
const homeDir = os.homedir();
|
|
125
80
|
const globalConfigPath = path.join(homeDir, '.config', 'opencode', 'maskweaver.config.json');
|
|
126
81
|
if (fs.existsSync(globalConfigPath)) {
|
|
@@ -145,15 +100,6 @@ export function generatePoolAgentFilesFromConfig(projectDir, agentsDir, options
|
|
|
145
100
|
errors: ['No maskweaver.config.json found with dummyHumans configuration. Create one or run `weave init-config` to generate a default.'],
|
|
146
101
|
};
|
|
147
102
|
}
|
|
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
103
|
export const DEFAULT_RUNTIME_CONFIG_TEMPLATE = {
|
|
158
104
|
dummyHumans: {
|
|
159
105
|
pool: [
|
|
@@ -220,9 +166,6 @@ export const DEFAULT_RUNTIME_CONFIG_TEMPLATE = {
|
|
|
220
166
|
},
|
|
221
167
|
language: 'ko',
|
|
222
168
|
};
|
|
223
|
-
/**
|
|
224
|
-
* Default plugin config template (.opencode/maskweaver.json).
|
|
225
|
-
*/
|
|
226
169
|
export const DEFAULT_PLUGIN_CONFIG_TEMPLATE = {
|
|
227
170
|
$schema: 'https://raw.githubusercontent.com/ulgerang/maskweaver/master/schemas/plugin-config.json',
|
|
228
171
|
masks: {
|
|
@@ -237,17 +180,10 @@ export const DEFAULT_PLUGIN_CONFIG_TEMPLATE = {
|
|
|
237
180
|
},
|
|
238
181
|
},
|
|
239
182
|
};
|
|
240
|
-
/**
|
|
241
|
-
* Write a default maskweaver.config.json to the project directory.
|
|
242
|
-
* Does NOT overwrite if the file already exists.
|
|
243
|
-
*
|
|
244
|
-
* @param projectDir - Project base directory
|
|
245
|
-
* @returns The path to the created file, or null if it already existed
|
|
246
|
-
*/
|
|
247
183
|
export function writeDefaultRuntimeConfig(projectDir) {
|
|
248
184
|
const targetPath = path.join(projectDir, 'maskweaver.config.json');
|
|
249
185
|
if (fs.existsSync(targetPath)) {
|
|
250
|
-
return null;
|
|
186
|
+
return null;
|
|
251
187
|
}
|
|
252
188
|
try {
|
|
253
189
|
fs.writeFileSync(targetPath, JSON.stringify(DEFAULT_RUNTIME_CONFIG_TEMPLATE, null, 2) + '\n', 'utf-8');
|
|
@@ -257,20 +193,12 @@ export function writeDefaultRuntimeConfig(projectDir) {
|
|
|
257
193
|
return null;
|
|
258
194
|
}
|
|
259
195
|
}
|
|
260
|
-
/**
|
|
261
|
-
* Write a default .opencode/maskweaver.json (plugin config) to the project.
|
|
262
|
-
* Does NOT overwrite if the file already exists.
|
|
263
|
-
*
|
|
264
|
-
* @param projectDir - Project base directory
|
|
265
|
-
* @returns The path to the created file, or null if it already existed
|
|
266
|
-
*/
|
|
267
196
|
export function writeDefaultPluginConfig(projectDir) {
|
|
268
197
|
const opencodeDir = path.join(projectDir, '.opencode');
|
|
269
198
|
const targetPath = path.join(opencodeDir, 'maskweaver.json');
|
|
270
199
|
if (fs.existsSync(targetPath)) {
|
|
271
|
-
return null;
|
|
200
|
+
return null;
|
|
272
201
|
}
|
|
273
|
-
// Ensure .opencode directory exists
|
|
274
202
|
if (!fs.existsSync(opencodeDir)) {
|
|
275
203
|
try {
|
|
276
204
|
fs.mkdirSync(opencodeDir, { recursive: true });
|
|
@@ -287,18 +215,6 @@ export function writeDefaultPluginConfig(projectDir) {
|
|
|
287
215
|
return null;
|
|
288
216
|
}
|
|
289
217
|
}
|
|
290
|
-
// ============================================================================
|
|
291
|
-
// User Config Detection
|
|
292
|
-
// ============================================================================
|
|
293
|
-
/**
|
|
294
|
-
* Check if a user-level config exists at ~/.config/opencode/ and return it.
|
|
295
|
-
*
|
|
296
|
-
* Search order:
|
|
297
|
-
* 1. ~/.config/opencode/maskweaver.config.json
|
|
298
|
-
* 2. ~/.config/opencode/maskweaver.json (plugin config with agents)
|
|
299
|
-
*
|
|
300
|
-
* @returns The config path if found, or null
|
|
301
|
-
*/
|
|
302
218
|
export function findUserGlobalConfig() {
|
|
303
219
|
const homeDir = os.homedir();
|
|
304
220
|
const candidates = [
|