maskweaver 0.8.6 → 0.8.7
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 +217 -217
- package/README.md +235 -235
- package/assets/agents/squad-operator.md +56 -56
- package/assets/commands/weave-approve-plan.md +57 -57
- package/assets/commands/weave-craft.md +43 -43
- package/assets/commands/weave-design.md +64 -64
- package/assets/commands/weave-flow.md +48 -48
- package/assets/commands/weave-help.md +101 -101
- package/assets/commands/weave-init.md +23 -23
- package/assets/commands/weave-plan.md +15 -15
- package/assets/commands/weave-prepare.md +69 -69
- package/assets/commands/weave-refine-plan.md +59 -59
- package/assets/commands/weave-repair.md +70 -70
- package/assets/commands/weave-research.md +51 -51
- package/assets/commands/weave-spec.md +227 -227
- package/assets/commands/weave-status.md +2 -2
- package/assets/commands/weave-verify.md +44 -44
- package/assets/commands/weave-worktree.md +69 -69
- package/dist/cli/doctor.d.ts +16 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +355 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/install.js +9 -0
- package/dist/cli/install.js.map +1 -1
- package/dist/plugin/config/index.d.ts +3 -10
- package/dist/plugin/config/index.d.ts.map +1 -1
- package/dist/plugin/config/index.js +12 -15
- package/dist/plugin/config/index.js.map +1 -1
- package/dist/plugin/index.d.ts +1 -27
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +40 -240
- package/dist/plugin/index.js.map +1 -1
- package/dist/plugin/tools/slashcommand.js +59 -59
- package/dist/plugin/tools/squad.js +3 -3
- package/dist/plugin/tools/weave.js +111 -111
- package/dist/plugin/types.d.ts +10 -8
- package/dist/plugin/types.d.ts.map +1 -1
- package/dist/plugin/types.js +2 -0
- package/dist/plugin/types.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +4 -2
- package/postinstall.mjs +97 -0
package/dist/plugin/types.d.ts
CHANGED
|
@@ -2,8 +2,17 @@
|
|
|
2
2
|
* Plugin Types
|
|
3
3
|
*
|
|
4
4
|
* Shared types for Maskweaver plugin tools
|
|
5
|
+
*
|
|
6
|
+
* Based on @opencode-ai/plugin tool definitions.
|
|
5
7
|
*/
|
|
6
8
|
import type { z } from 'zod';
|
|
9
|
+
/**
|
|
10
|
+
* Minimal context required by Maskweaver tool factories.
|
|
11
|
+
* SDK provides richer context, but factories only need worktree.
|
|
12
|
+
*/
|
|
13
|
+
export interface ToolContext {
|
|
14
|
+
worktree: string;
|
|
15
|
+
}
|
|
7
16
|
/**
|
|
8
17
|
* Tool factory interface for creating OpenCode tools
|
|
9
18
|
*/
|
|
@@ -12,16 +21,9 @@ export interface ToolFactory {
|
|
|
12
21
|
description: string;
|
|
13
22
|
/** Zod schema for argument validation */
|
|
14
23
|
args: z.ZodType<any>;
|
|
15
|
-
/** Execute function that returns
|
|
24
|
+
/** Execute function that returns string result */
|
|
16
25
|
execute: (args: any, context: ToolContext) => Promise<string>;
|
|
17
26
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Context passed to tool execute functions
|
|
20
|
-
*/
|
|
21
|
-
export interface ToolContext {
|
|
22
|
-
/** Working directory (project root) */
|
|
23
|
-
worktree: string;
|
|
24
|
-
}
|
|
25
27
|
/**
|
|
26
28
|
* Standard tool response format
|
|
27
29
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugin/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugin/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,oCAAoC;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACrB,kDAAkD;IAClD,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAC/D;AAED;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,OAAO;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
package/dist/plugin/types.js
CHANGED
package/dist/plugin/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/plugin/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/plugin/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
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.7
|
|
12
|
+
export declare const VERSION = "0.8.7";
|
|
13
13
|
/**
|
|
14
14
|
* Returns a formatted version string for display.
|
|
15
15
|
* @example "Maskweaver v0.7.29"
|
package/dist/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,OAAO,UAAU,CAAC;AAE/B;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC"}
|
package/dist/version.js
CHANGED
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAE/B;;;GAGG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,eAAe,OAAO,EAAE,CAAC;AAClC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "maskweaver",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.7",
|
|
4
4
|
"description": "AI Expert Persona System - Give your AI coding assistant expert personalities (가면술사)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
13
|
"masks",
|
|
14
|
-
"assets"
|
|
14
|
+
"assets",
|
|
15
|
+
"postinstall.mjs"
|
|
15
16
|
],
|
|
16
17
|
"exports": {
|
|
17
18
|
".": {
|
|
@@ -75,6 +76,7 @@
|
|
|
75
76
|
"dev": "tsc --watch",
|
|
76
77
|
"test": "vitest run",
|
|
77
78
|
"lint": "tsc --noEmit",
|
|
79
|
+
"postinstall": "node postinstall.mjs",
|
|
78
80
|
"prepublishOnly": "npm run build"
|
|
79
81
|
},
|
|
80
82
|
"keywords": [
|
package/postinstall.mjs
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// postinstall.mjs
|
|
2
|
+
// Runs after npm install to verify OpenCode compatibility
|
|
3
|
+
|
|
4
|
+
import { spawnSync } from "node:child_process";
|
|
5
|
+
import { readFileSync } from "node:fs";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
|
|
8
|
+
const MIN_OPENCODE_VERSION = "1.0.0";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Parse version string into numeric parts
|
|
12
|
+
*/
|
|
13
|
+
function parseVersion(version) {
|
|
14
|
+
return version
|
|
15
|
+
.replace(/^v/, "")
|
|
16
|
+
.split("-")[0]
|
|
17
|
+
.split(".")
|
|
18
|
+
.map((part) => Number.parseInt(part, 10) || 0);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Compare two version strings
|
|
23
|
+
*/
|
|
24
|
+
function compareVersions(current, minimum) {
|
|
25
|
+
const currentParts = parseVersion(current);
|
|
26
|
+
const minimumParts = parseVersion(minimum);
|
|
27
|
+
const length = Math.max(currentParts.length, minimumParts.length);
|
|
28
|
+
|
|
29
|
+
for (let index = 0; index < length; index++) {
|
|
30
|
+
const currentPart = currentParts[index] ?? 0;
|
|
31
|
+
const minimumPart = minimumParts[index] ?? 0;
|
|
32
|
+
if (currentPart > minimumPart) return true;
|
|
33
|
+
if (currentPart < minimumPart) return false;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Check if opencode version meets minimum requirement
|
|
41
|
+
*/
|
|
42
|
+
function checkOpenCodeVersion() {
|
|
43
|
+
try {
|
|
44
|
+
const result = spawnSync("opencode", ["--version"], {
|
|
45
|
+
encoding: "utf-8",
|
|
46
|
+
stdio: ["pipe", "pipe", "ignore"],
|
|
47
|
+
timeout: 5000,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
if (result.error) {
|
|
51
|
+
return { ok: null, version: null };
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const version = result.stdout.trim();
|
|
55
|
+
const ok = compareVersions(version, MIN_OPENCODE_VERSION);
|
|
56
|
+
return { ok, version };
|
|
57
|
+
} catch {
|
|
58
|
+
return { ok: null, version: null };
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function getPackageVersion() {
|
|
63
|
+
try {
|
|
64
|
+
const dir = fileURLToPath(new URL(".", import.meta.url));
|
|
65
|
+
const pkg = JSON.parse(readFileSync(new URL("package.json", import.meta.url), "utf8"));
|
|
66
|
+
return pkg.version || "unknown";
|
|
67
|
+
} catch {
|
|
68
|
+
return "unknown";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function main() {
|
|
73
|
+
const pkgVersion = getPackageVersion();
|
|
74
|
+
const versionCheck = checkOpenCodeVersion();
|
|
75
|
+
|
|
76
|
+
if (versionCheck.ok === null) {
|
|
77
|
+
console.log(`⚠ maskweaver v${pkgVersion}: OpenCode를 감지할 수 없습니다.`);
|
|
78
|
+
console.log(` OpenCode가 설치되어 있지 않다면 https://opencode.ai/docs 를 참조하세요.`);
|
|
79
|
+
console.log(` maskweaver는 OpenCode 플러그인으로 동작합니다.`);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (!versionCheck.ok) {
|
|
84
|
+
console.warn(`⚠ maskweaver v${pkgVersion}: OpenCode >= ${MIN_OPENCODE_VERSION} 이 필요합니다.`);
|
|
85
|
+
console.warn(` 감지된 버전: ${versionCheck.version}`);
|
|
86
|
+
console.warn(` 최신 버전으로 업데이트하세요: opencode --upgrade`);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (versionCheck.version) {
|
|
91
|
+
console.log(`✓ maskweaver v${pkgVersion}: OpenCode ${versionCheck.version} 호환됨`);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
console.log(` maskweaver install 로 플러그인을 등록하세요.`);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
main();
|