maskweaver 0.11.1 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.ko.md +640 -640
- package/README.md +672 -672
- package/assets/agents/dummy-human.md +31 -31
- package/assets/agents/dummy-template.md +57 -57
- package/assets/agents/mask-weaver.md +412 -412
- package/assets/agents/squad-operator.md +242 -242
- package/assets/masks/ai-ml/andrew-ng.yaml +207 -207
- package/assets/masks/architecture/jeff-dean.yaml +208 -208
- package/assets/masks/index.json +65 -65
- package/assets/masks/software-engineering/dan-abramov.yaml +188 -188
- package/assets/masks/software-engineering/kent-beck.yaml +191 -191
- package/assets/masks/software-engineering/linus-torvalds.yaml +152 -152
- package/assets/masks/software-engineering/martin-fowler.yaml +173 -173
- package/dist/memory/store/sqlite.js +102 -102
- package/dist/plugin/tools/context.js +15 -15
- package/dist/plugin/tools/maskSave.js +8 -8
- package/dist/plugin/tools/memoryIndexer.js +5 -5
- package/dist/plugin/tools/memorySearch.js +8 -8
- package/dist/plugin/tools/memoryWrite.js +3 -3
- package/dist/plugin/tools/retrospect.js +3 -3
- package/dist/plugin/tools/squad.js +39 -39
- package/dist/retrospect/mask-save.js +21 -21
- package/dist/retrospect/retrospect.js +9 -9
- package/dist/shared/generate-agents.d.ts +3 -15
- package/dist/shared/generate-agents.js +6 -180
- package/dist/shared/subscription-detection.d.ts +20 -0
- package/dist/shared/subscription-detection.js +162 -0
- package/dist/verify/prompts.js +114 -114
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/weave/knowledge/global.js +86 -86
- package/dist/weave/verification/playwright.js +127 -127
- package/masks/ai-ml/andrew-ng.yaml +207 -207
- package/masks/architecture/jeff-dean.yaml +208 -208
- package/masks/index.json +65 -65
- package/masks/orchestration/squad-operator.yaml +205 -205
- package/masks/software-engineering/dan-abramov.yaml +188 -188
- package/masks/software-engineering/kent-beck.yaml +191 -191
- package/masks/software-engineering/linus-torvalds.yaml +152 -152
- package/masks/software-engineering/martin-fowler.yaml +173 -173
- package/package.json +1 -1
- package/postinstall.mjs +3 -76
package/postinstall.mjs
CHANGED
|
@@ -1,66 +1,11 @@
|
|
|
1
1
|
// postinstall.mjs
|
|
2
|
-
// Runs after npm install to
|
|
2
|
+
// Runs after npm install to create/migrate Maskweaver config.
|
|
3
3
|
|
|
4
|
-
import { spawnSync } from "node:child_process";
|
|
5
4
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
6
5
|
import { homedir } from "node:os";
|
|
7
6
|
import { join } from "node:path";
|
|
8
7
|
import { fileURLToPath } from "node:url";
|
|
9
8
|
|
|
10
|
-
const MIN_OPENCODE_VERSION = "1.0.0";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Parse version string into numeric parts
|
|
14
|
-
*/
|
|
15
|
-
function parseVersion(version) {
|
|
16
|
-
return version
|
|
17
|
-
.replace(/^v/, "")
|
|
18
|
-
.split("-")[0]
|
|
19
|
-
.split(".")
|
|
20
|
-
.map((part) => Number.parseInt(part, 10) || 0);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Compare two version strings
|
|
25
|
-
*/
|
|
26
|
-
function compareVersions(current, minimum) {
|
|
27
|
-
const currentParts = parseVersion(current);
|
|
28
|
-
const minimumParts = parseVersion(minimum);
|
|
29
|
-
const length = Math.max(currentParts.length, minimumParts.length);
|
|
30
|
-
|
|
31
|
-
for (let index = 0; index < length; index++) {
|
|
32
|
-
const currentPart = currentParts[index] ?? 0;
|
|
33
|
-
const minimumPart = minimumParts[index] ?? 0;
|
|
34
|
-
if (currentPart > minimumPart) return true;
|
|
35
|
-
if (currentPart < minimumPart) return false;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return true;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Check if opencode version meets minimum requirement
|
|
43
|
-
*/
|
|
44
|
-
function checkOpenCodeVersion() {
|
|
45
|
-
try {
|
|
46
|
-
const result = spawnSync("opencode", ["--version"], {
|
|
47
|
-
encoding: "utf-8",
|
|
48
|
-
stdio: ["pipe", "pipe", "ignore"],
|
|
49
|
-
timeout: 5000,
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
if (result.error) {
|
|
53
|
-
return { ok: null, version: null };
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const version = result.stdout.trim();
|
|
57
|
-
const ok = compareVersions(version, MIN_OPENCODE_VERSION);
|
|
58
|
-
return { ok, version };
|
|
59
|
-
} catch {
|
|
60
|
-
return { ok: null, version: null };
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
9
|
function getPackageVersion() {
|
|
65
10
|
try {
|
|
66
11
|
const dir = fileURLToPath(new URL(".", import.meta.url));
|
|
@@ -299,26 +244,8 @@ function main() {
|
|
|
299
244
|
console.log('');
|
|
300
245
|
}
|
|
301
246
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
if (versionCheck.ok === null) {
|
|
305
|
-
console.log(`⚠ maskweaver v${pkgVersion}: OpenCode를 감지할 수 없습니다.`);
|
|
306
|
-
console.log(` OpenCode가 설치되어 있지 않다면 https://opencode.ai/docs 를 참조하세요.`);
|
|
307
|
-
console.log(` maskweaver는 OpenCode 플러그인으로 동작합니다.`);
|
|
308
|
-
return;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
if (!versionCheck.ok) {
|
|
312
|
-
console.warn(`⚠ maskweaver v${pkgVersion}: OpenCode >= ${MIN_OPENCODE_VERSION} 이 필요합니다.`);
|
|
313
|
-
console.warn(` 감지된 버전: ${versionCheck.version}`);
|
|
314
|
-
console.warn(` 최신 버전으로 업데이트하세요: opencode --upgrade`);
|
|
315
|
-
return;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
if (versionCheck.version) {
|
|
319
|
-
console.log(`✓ maskweaver v${pkgVersion}: OpenCode ${versionCheck.version} 호환됨`);
|
|
320
|
-
}
|
|
321
|
-
|
|
247
|
+
console.log(`✓ maskweaver v${pkgVersion}: 설치 후 설정 점검 완료`);
|
|
248
|
+
console.log(` OpenCode 호환성은 플러그인 로드 시 확인됩니다.`);
|
|
322
249
|
console.log(` maskweaver install 로 플러그인을 등록하세요.`);
|
|
323
250
|
}
|
|
324
251
|
|