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.
Files changed (45) hide show
  1. package/README.ko.md +217 -217
  2. package/README.md +235 -235
  3. package/assets/agents/squad-operator.md +56 -56
  4. package/assets/commands/weave-approve-plan.md +57 -57
  5. package/assets/commands/weave-craft.md +43 -43
  6. package/assets/commands/weave-design.md +64 -64
  7. package/assets/commands/weave-flow.md +48 -48
  8. package/assets/commands/weave-help.md +101 -101
  9. package/assets/commands/weave-init.md +23 -23
  10. package/assets/commands/weave-plan.md +15 -15
  11. package/assets/commands/weave-prepare.md +69 -69
  12. package/assets/commands/weave-refine-plan.md +59 -59
  13. package/assets/commands/weave-repair.md +70 -70
  14. package/assets/commands/weave-research.md +51 -51
  15. package/assets/commands/weave-spec.md +227 -227
  16. package/assets/commands/weave-status.md +2 -2
  17. package/assets/commands/weave-verify.md +44 -44
  18. package/assets/commands/weave-worktree.md +69 -69
  19. package/dist/cli/doctor.d.ts +16 -0
  20. package/dist/cli/doctor.d.ts.map +1 -0
  21. package/dist/cli/doctor.js +355 -0
  22. package/dist/cli/doctor.js.map +1 -0
  23. package/dist/cli/install.js +9 -0
  24. package/dist/cli/install.js.map +1 -1
  25. package/dist/plugin/config/index.d.ts +3 -10
  26. package/dist/plugin/config/index.d.ts.map +1 -1
  27. package/dist/plugin/config/index.js +12 -15
  28. package/dist/plugin/config/index.js.map +1 -1
  29. package/dist/plugin/index.d.ts +1 -27
  30. package/dist/plugin/index.d.ts.map +1 -1
  31. package/dist/plugin/index.js +40 -240
  32. package/dist/plugin/index.js.map +1 -1
  33. package/dist/plugin/tools/slashcommand.js +59 -59
  34. package/dist/plugin/tools/squad.js +3 -3
  35. package/dist/plugin/tools/weave.js +111 -111
  36. package/dist/plugin/types.d.ts +10 -8
  37. package/dist/plugin/types.d.ts.map +1 -1
  38. package/dist/plugin/types.js +2 -0
  39. package/dist/plugin/types.js.map +1 -1
  40. package/dist/version.d.ts +1 -1
  41. package/dist/version.d.ts.map +1 -1
  42. package/dist/version.js +1 -1
  43. package/dist/version.js.map +1 -1
  44. package/package.json +4 -2
  45. package/postinstall.mjs +97 -0
@@ -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 JSON string result */
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;;;;GAIG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B;;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,uDAAuD;IACvD,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAC/D;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;CAClB;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"}
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"}
@@ -2,6 +2,8 @@
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
  export {};
7
9
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/plugin/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
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.36";
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"
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,OAAO,WAAW,CAAC;AAEhC;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC"}
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
@@ -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.7.36';
12
+ export const VERSION = '0.8.7';
13
13
  /**
14
14
  * Returns a formatted version string for display.
15
15
  * @example "Maskweaver v0.7.29"
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,eAAe,OAAO,EAAE,CAAC;AAClC,CAAC"}
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.6",
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": [
@@ -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();