@horizon-ai-dev/shokunin 0.1.0-alpha.1 → 0.1.0-alpha.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/dist/plugin.d.ts CHANGED
@@ -17,14 +17,21 @@
17
17
  * - sn-silent-failure-hunter (subagent) - Error handling analysis
18
18
  * - sn-type-design-analyzer (subagent) - TypeScript type design
19
19
  * - sn-skill-reviewer (subagent) - OpenCode skill review
20
+ *
21
+ * IMPORTANT: This plugin handles context injection differently from raw beads:
22
+ * - Combines SHOKUNIN_RULES + beads-context into a SINGLE session.prompt() call
23
+ * - This prevents the freeze bug caused by multiple session.prompt() calls
24
+ * within the chat.message hook (see issue investigation 2026-01-18)
20
25
  */
21
26
  import type { Plugin } from "@opencode-ai/plugin";
22
27
  /**
23
28
  * The main Shokunin plugin export.
24
29
  *
25
- * Wraps BeadsPlugin and merges any additional Shokunin-specific hooks.
26
- * This allows extending the plugin functionality while maintaining
27
- * full compatibility with opencode-beads.
30
+ * Unlike a simple BeadsPlugin wrapper, this plugin:
31
+ * 1. Loads beads commands and agents directly (not via BeadsPlugin)
32
+ * 2. Handles context injection with a SINGLE session.prompt() call
33
+ * that combines both SHOKUNIN_RULES and beads-context
34
+ * 3. This prevents the freeze bug caused by nested session.prompt() calls
28
35
  */
29
36
  export declare const ShokuninPlugin: Plugin;
30
37
  //# sourceMappingURL=plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAS,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAkDzD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,MA4E5B,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAS,MAAM,EAAe,MAAM,qBAAqB,CAAC;AA6ItE;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,EAAE,MAoF5B,CAAC"}
package/dist/plugin.js CHANGED
@@ -17,8 +17,15 @@
17
17
  * - sn-silent-failure-hunter (subagent) - Error handling analysis
18
18
  * - sn-type-design-analyzer (subagent) - TypeScript type design
19
19
  * - sn-skill-reviewer (subagent) - OpenCode skill review
20
+ *
21
+ * IMPORTANT: This plugin handles context injection differently from raw beads:
22
+ * - Combines SHOKUNIN_RULES + beads-context into a SINGLE session.prompt() call
23
+ * - This prevents the freeze bug caused by multiple session.prompt() calls
24
+ * within the chat.message hook (see issue investigation 2026-01-18)
20
25
  */
21
- import { BeadsPlugin } from "opencode-beads";
26
+ // Import beads utilities directly - we handle context injection ourselves
27
+ // to avoid the freeze bug caused by multiple session.prompt() calls
28
+ import { BEADS_GUIDANCE, loadAgent, loadCommands, } from "opencode-beads/src/vendor";
22
29
  // Shokunin agents
23
30
  import { snCodeReviewerAgent } from "./agents/sn-code-reviewer.js";
24
31
  import { snCodeSimplifierAgent } from "./agents/sn-code-simplifier.js";
@@ -33,7 +40,8 @@ import { snConfigureCommand } from "./commands/sn-configure.js";
33
40
  import { snReviewPrCommand } from "./commands/sn-review-pr.js";
34
41
  import { snUpdateCommand } from "./commands/sn-update.js";
35
42
  // Shokunin context
36
- import { looksLikeCompaction, SHOKUNIN_RULES, } from "./context/shokunin-rules.js";
43
+ import { SHOKUNIN_RULES } from "./context/shokunin-rules.js";
44
+ // Note: looksLikeCompaction is no longer needed - we use session.compacted event instead
37
45
  // Shokunin tools
38
46
  import { shokuninTools } from "./tools/emergency-stop.js";
39
47
  /**
@@ -57,77 +65,155 @@ const shokuninAgents = {
57
65
  ...snTypeDesignAnalyzerAgent,
58
66
  ...snSkillReviewerAgent,
59
67
  };
68
+ /**
69
+ * Get the current model/agent context for a session by querying messages.
70
+ *
71
+ * Mirrors OpenCode's internal lastModel() logic to find the most recent
72
+ * user message. Used during event handling when we don't have direct access
73
+ * to the current user message's context.
74
+ */
75
+ async function getSessionContext(client, sessionID) {
76
+ try {
77
+ const response = await client.session.messages({
78
+ path: { id: sessionID },
79
+ query: { limit: 50 },
80
+ });
81
+ if (response.data) {
82
+ for (const msg of response.data) {
83
+ if (msg.info.role === "user" && "model" in msg.info && msg.info.model) {
84
+ return { model: msg.info.model, agent: msg.info.agent };
85
+ }
86
+ }
87
+ }
88
+ }
89
+ catch {
90
+ // On error, return undefined (let opencode use its default)
91
+ }
92
+ return;
93
+ }
94
+ /**
95
+ * Inject combined Shokunin + Beads context into a session.
96
+ *
97
+ * IMPORTANT: This combines both contexts into a SINGLE session.prompt() call
98
+ * to avoid the freeze bug caused by multiple session.prompt() calls within
99
+ * the chat.message hook.
100
+ *
101
+ * Runs `bd prime` and combines the output with SHOKUNIN_RULES.
102
+ * Silently skips beads context if bd is not installed or not initialized.
103
+ */
104
+ async function injectCombinedContext(client, $, sessionID, context) {
105
+ // Start with shokunin rules
106
+ let combinedContext = SHOKUNIN_RULES;
107
+ // Try to add beads context
108
+ try {
109
+ const primeOutput = await $ `bd prime`.text();
110
+ if (primeOutput && primeOutput.trim() !== "") {
111
+ combinedContext += `\n\n<beads-context>
112
+ ${primeOutput.trim()}
113
+ </beads-context>
114
+
115
+ ${BEADS_GUIDANCE}`;
116
+ }
117
+ }
118
+ catch {
119
+ // Silent skip if bd prime fails (not installed or not initialized)
120
+ // Shokunin rules will still be injected
121
+ }
122
+ // Single injection call with combined context
123
+ try {
124
+ await client.session.prompt({
125
+ path: { id: sessionID },
126
+ body: {
127
+ noReply: true,
128
+ model: context?.model,
129
+ agent: context?.agent,
130
+ parts: [{ type: "text", text: combinedContext, synthetic: true }],
131
+ },
132
+ });
133
+ }
134
+ catch {
135
+ // Silent skip if injection fails
136
+ }
137
+ }
60
138
  /**
61
139
  * The main Shokunin plugin export.
62
140
  *
63
- * Wraps BeadsPlugin and merges any additional Shokunin-specific hooks.
64
- * This allows extending the plugin functionality while maintaining
65
- * full compatibility with opencode-beads.
141
+ * Unlike a simple BeadsPlugin wrapper, this plugin:
142
+ * 1. Loads beads commands and agents directly (not via BeadsPlugin)
143
+ * 2. Handles context injection with a SINGLE session.prompt() call
144
+ * that combines both SHOKUNIN_RULES and beads-context
145
+ * 3. This prevents the freeze bug caused by nested session.prompt() calls
66
146
  */
67
- export const ShokuninPlugin = async (input) => {
68
- const { client } = input;
69
- // Get hooks from BeadsPlugin
70
- const beadsHooks = await BeadsPlugin(input);
71
- // Track sessions that have received shokunin-rules context
147
+ export const ShokuninPlugin = async ({ client, $ }) => {
148
+ // Load beads commands and agents directly
149
+ const [beadsCommands, beadsAgents] = await Promise.all([
150
+ loadCommands(),
151
+ loadAgent(),
152
+ ]);
153
+ // Track sessions that have received combined context
72
154
  const injectedSessions = new Set();
73
- // Shokunin-specific hooks
74
155
  const shokuninHooks = {
75
156
  config: async (config) => {
76
157
  // Inject Shokunin agents
77
158
  config.agent = {
78
159
  ...config.agent,
79
160
  ...shokuninAgents,
161
+ ...beadsAgents,
80
162
  };
81
163
  // Inject Shokunin commands
82
164
  config.command = {
83
165
  ...config.command,
84
166
  ...shokuninCommands,
167
+ ...beadsCommands,
85
168
  };
86
- // Call beads config hook if it exists
87
- if (beadsHooks.config) {
88
- await beadsHooks.config(config);
89
- }
90
169
  },
91
170
  // Register Shokunin tools
92
171
  tool: shokuninTools,
93
- // Inject shokunin-rules context on first message and after compaction
94
- "chat.message": async (hookInput, output) => {
172
+ // Inject combined shokunin-rules + beads context on first message
173
+ "chat.message": async (hookInput, _output) => {
95
174
  const sessionID = hookInput.sessionID;
96
- // Get the first text part from the message
97
- const textPart = output.parts.find((p) => p.type === "text");
98
- const messageText = textPart?.type === "text" ? textPart.text : "";
99
- // Check if this is a new session or post-compaction
100
- const isNewSession = !injectedSessions.has(sessionID);
101
- const isPostCompaction = looksLikeCompaction(messageText);
102
- // Inject context if needed
103
- if (isNewSession || isPostCompaction) {
104
- try {
105
- await client.session.prompt({
106
- path: { id: sessionID },
107
- body: {
108
- noReply: true,
109
- model: hookInput.model,
110
- agent: hookInput.agent,
111
- parts: [{ type: "text", text: SHOKUNIN_RULES, synthetic: true }],
112
- },
175
+ // Skip if already injected this session
176
+ if (injectedSessions.has(sessionID))
177
+ return;
178
+ // Check if combined context was already injected (handles plugin reload/reconnection)
179
+ try {
180
+ const existing = await client.session.messages({
181
+ path: { id: sessionID },
182
+ });
183
+ if (existing.data) {
184
+ const hasContext = existing.data.some((msg) => {
185
+ const parts = msg.parts || msg.info.parts;
186
+ if (!parts)
187
+ return false;
188
+ return parts.some((part) => part.type === "text" &&
189
+ (part.text?.includes("<shokunin-rules>") ||
190
+ part.text?.includes("<beads-context>")));
113
191
  });
114
- injectedSessions.add(sessionID);
115
- }
116
- catch {
117
- // Silent skip if injection fails
192
+ if (hasContext) {
193
+ injectedSessions.add(sessionID);
194
+ return;
195
+ }
118
196
  }
119
197
  }
120
- // Call beads chat.message hook if it exists
121
- if (beadsHooks["chat.message"]) {
122
- await beadsHooks["chat.message"](hookInput, output);
198
+ catch {
199
+ // On error, proceed with injection
200
+ }
201
+ injectedSessions.add(sessionID);
202
+ // Inject combined context with a SINGLE session.prompt() call
203
+ await injectCombinedContext(client, $, sessionID, {
204
+ model: hookInput.model,
205
+ agent: hookInput.agent,
206
+ });
207
+ },
208
+ // Re-inject context after session compaction
209
+ event: async ({ event }) => {
210
+ if (event.type === "session.compacted") {
211
+ const sessionID = event.properties.sessionID;
212
+ const context = await getSessionContext(client, sessionID);
213
+ await injectCombinedContext(client, $, sessionID, context);
123
214
  }
124
215
  },
125
216
  };
126
- // Merge hooks - shokunin hooks override beads hooks when both exist
127
- // This ensures our config hook runs and then calls beads' config hook
128
- return {
129
- ...beadsHooks,
130
- ...shokuninHooks,
131
- };
217
+ return shokuninHooks;
132
218
  };
133
219
  //# sourceMappingURL=plugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sourceRoot":"","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AAE,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;YAC7D,CAAC;QACH,CAAC;KACF,CAAC;IAEF,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@horizon-ai-dev/shokunin",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "0.1.0-alpha.5",
4
4
  "type": "module",
5
5
  "description": "Complete AI-assisted development workflow plugin for OpenCode. Re-exports opencode-beads with specialized agents, commands, and bundled skills.",
6
6
  "author": "Horizon AI Dev",
@@ -24,11 +24,6 @@
24
24
  "vendor",
25
25
  "README.md"
26
26
  ],
27
- "scripts": {
28
- "build": "tsc",
29
- "typecheck": "tsc --noEmit",
30
- "prepublishOnly": "pnpm build"
31
- },
32
27
  "dependencies": {
33
28
  "@opencode-ai/plugin": "^1.0.143",
34
29
  "@opencode-ai/sdk": "^1.0.143",
@@ -42,5 +37,14 @@
42
37
  },
43
38
  "engines": {
44
39
  "bun": ">=1.0.0"
40
+ },
41
+ "scripts": {
42
+ "build": "tsc",
43
+ "typecheck": "tsc --noEmit",
44
+ "publish:alpha": "pnpm version prerelease --preid=alpha --no-git-tag-version && git add package.json && git commit -m \"chore: bump to $(node -p \"require('./package.json').version\")\" && pnpm publish --access public --tag alpha --no-git-checks",
45
+ "publish:beta": "pnpm version prerelease --preid=beta --no-git-tag-version && git add package.json && git commit -m \"chore: bump to $(node -p \"require('./package.json').version\")\" && pnpm publish --access public --tag beta --no-git-checks",
46
+ "publish:release": "pnpm version patch && pnpm publish --access public",
47
+ "publish:minor": "pnpm version minor && pnpm publish --access public",
48
+ "publish:major": "pnpm version major && pnpm publish --access public"
45
49
  }
46
- }
50
+ }