@maskweaver/plugin 0.1.0 → 0.1.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/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ // src/index.ts
2
+ var MaskweaverPlugin = async (ctx) => {
3
+ const { client } = ctx;
4
+ await client.app.log({
5
+ service: "maskweaver",
6
+ level: "info",
7
+ message: "Maskweaver plugin loaded (minimal version)"
8
+ });
9
+ return {};
10
+ };
11
+ var src_default = MaskweaverPlugin;
12
+ export {
13
+ src_default as default,
14
+ MaskweaverPlugin
15
+ };
package/package.json CHANGED
@@ -1,10 +1,14 @@
1
1
  {
2
2
  "name": "@maskweaver/plugin",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Maskweaver plugin for opencode - Expert AI personas",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
+ "files": [
9
+ "dist",
10
+ "src"
11
+ ],
8
12
  "exports": {
9
13
  ".": {
10
14
  "import": "./dist/index.js",
@@ -39,9 +43,6 @@
39
43
  "publishConfig": {
40
44
  "access": "public"
41
45
  },
42
- "dependencies": {
43
- "@maskweaver/core": "^0.1.0"
44
- },
45
46
  "peerDependencies": {
46
47
  "@opencode-ai/plugin": ">=0.1.0"
47
48
  },
package/src/index.ts CHANGED
@@ -1,93 +1,25 @@
1
1
  /**
2
2
  * Maskweaver Plugin for opencode
3
3
  *
4
- * Applies expert personas (masks) to AI assistants.
5
- * 가면술사 - opencode 플러그인
4
+ * Minimal version for debugging
6
5
  */
7
6
 
8
7
  import type { Plugin } from '@opencode-ai/plugin';
9
- import { MaskLoader } from '@maskweaver/core';
10
- import { handleSessionCreated } from './hooks/sessionCreated';
11
- import { createSelectMaskTool } from './tools/selectMask';
12
- import { createListMasksTool } from './tools/listMasks';
13
-
14
- export interface MaskweaverState {
15
- maskLoader: MaskLoader;
16
- activeMask: any | null;
17
- }
18
8
 
19
9
  /**
20
- * Maskweaver Plugin
21
- *
22
- * Give your AI coding assistant expert personalities.
10
+ * Maskweaver Plugin - Minimal
23
11
  */
24
12
  export const MaskweaverPlugin: Plugin = async (ctx) => {
25
- const { directory, client } = ctx;
26
-
27
- // Initialize mask loader
28
- const masksDir = `${directory}/.opencode/masks`;
29
- const maskLoader = new MaskLoader({ masksDir });
13
+ const { client } = ctx;
30
14
 
31
- try {
32
- await maskLoader.loadCatalog();
33
- await client.app.log({
34
- service: 'maskweaver',
35
- level: 'info',
36
- message: 'Maskweaver initialized',
37
- extra: { masksDir },
38
- });
39
- } catch (error) {
40
- // Fallback to default masks directory
41
- await client.app.log({
42
- service: 'maskweaver',
43
- level: 'warn',
44
- message: 'Custom masks not found, using defaults',
45
- });
46
- }
47
-
48
- // Store in context for tools
49
- const state: MaskweaverState = {
50
- maskLoader,
51
- activeMask: null,
52
- };
15
+ await client.app.log({
16
+ service: 'maskweaver',
17
+ level: 'info',
18
+ message: 'Maskweaver plugin loaded (minimal version)',
19
+ });
53
20
 
54
21
  return {
55
- /**
56
- * Session Created Hook
57
- *
58
- * Called when a new session is created.
59
- * Can inject initial system prompt or provide mask selection.
60
- */
61
- 'session.created': async (session) => {
62
- await handleSessionCreated(session, state, client);
63
- },
64
-
65
- /**
66
- * Tool Execute Hooks
67
- *
68
- * Track tool usage with masks for analytics.
69
- */
70
- 'tool.execute.after': async (input, output) => {
71
- if (state.activeMask) {
72
- await client.app.log({
73
- service: 'maskweaver',
74
- level: 'debug',
75
- message: `Tool executed with mask`,
76
- extra: {
77
- tool: input.tool,
78
- mask: state.activeMask.metadata.id,
79
- },
80
- });
81
- }
82
- },
83
-
84
- /**
85
- * Custom Tools
86
- */
87
- tool: {
88
- select_mask: createSelectMaskTool(state),
89
- list_masks: createListMasksTool(state),
90
- },
22
+ // Empty for now - just testing if plugin loads
91
23
  };
92
24
  };
93
25
 
package/tsconfig.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "rootDir": "./src",
6
- "skipLibCheck": true
7
- },
8
- "include": ["src/**/*"],
9
- "exclude": ["node_modules", "dist"]
10
- }