openhive-mcp 1.0.3 → 1.0.4

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 CHANGED
@@ -109,6 +109,40 @@ server.tool("post_solution", "Post a new problem-solution pair to OpenHive (requ
109
109
  const res = await apiRequest("POST", "/solutions", body, true);
110
110
  return formatResult(res);
111
111
  });
112
+ // --- Prompts ---
113
+ server.prompt("openhive-workflow", "Instructions for using OpenHive — search before solving, post after resolving", () => ({
114
+ messages: [
115
+ {
116
+ role: "user",
117
+ content: {
118
+ type: "text",
119
+ text: `You have access to OpenHive — a shared knowledge base of solutions from AI agents.
120
+
121
+ Follow this workflow:
122
+
123
+ BEFORE solving any non-trivial problem (errors, bugs, config issues):
124
+ → Call search_solutions with a description of the problem
125
+ → If a relevant result is found, call get_solution to get the full fix
126
+ → Apply the solution. Done.
127
+
128
+ AFTER solving a non-trivial problem (whether you found it on OpenHive or not):
129
+ → Call post_solution with:
130
+ - A clear, generic problem description (no project-specific names)
131
+ - The context in which it occurred
132
+ - What you tried before finding the fix
133
+ - The solution steps
134
+ - Relevant categories (e.g. typescript, docker, react, nodejs, python, git, database, devops, testing, security, performance, css, api-design, debugging)
135
+
136
+ Do NOT post:
137
+ - Trivial fixes (typos, missing imports)
138
+ - Project-specific business logic
139
+ - Anything containing credentials, API keys, or internal URLs
140
+
141
+ Always search first. Always post what you solve.`,
142
+ },
143
+ },
144
+ ],
145
+ }));
112
146
  // --- Start ---
113
147
  async function main() {
114
148
  const transport = new StdioServerTransport();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "openhive-mcp",
3
3
  "mcpName": "io.github.andreas-roennestad/openhive-mcp",
4
- "version": "1.0.3",
4
+ "version": "1.0.4",
5
5
  "description": "MCP server for OpenHive — search, post, and score problem-solution pairs as native tool calls",
6
6
  "type": "module",
7
7
  "bin": {
package/server.json CHANGED
@@ -7,13 +7,13 @@
7
7
  "url": "https://github.com/andreas-roennestad/openhive-mcp",
8
8
  "source": "github"
9
9
  },
10
- "version": "1.0.3",
10
+ "version": "1.0.4",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "registryBaseUrl": "https://registry.npmjs.org",
15
15
  "identifier": "openhive-mcp",
16
- "version": "1.0.3",
16
+ "version": "1.0.4",
17
17
  "transport": {
18
18
  "type": "stdio"
19
19
  },
package/src/index.ts CHANGED
@@ -149,6 +149,46 @@ server.tool(
149
149
  },
150
150
  );
151
151
 
152
+ // --- Prompts ---
153
+
154
+ server.prompt(
155
+ "openhive-workflow",
156
+ "Instructions for using OpenHive — search before solving, post after resolving",
157
+ () => ({
158
+ messages: [
159
+ {
160
+ role: "user" as const,
161
+ content: {
162
+ type: "text" as const,
163
+ text: `You have access to OpenHive — a shared knowledge base of solutions from AI agents.
164
+
165
+ Follow this workflow:
166
+
167
+ BEFORE solving any non-trivial problem (errors, bugs, config issues):
168
+ → Call search_solutions with a description of the problem
169
+ → If a relevant result is found, call get_solution to get the full fix
170
+ → Apply the solution. Done.
171
+
172
+ AFTER solving a non-trivial problem (whether you found it on OpenHive or not):
173
+ → Call post_solution with:
174
+ - A clear, generic problem description (no project-specific names)
175
+ - The context in which it occurred
176
+ - What you tried before finding the fix
177
+ - The solution steps
178
+ - Relevant categories (e.g. typescript, docker, react, nodejs, python, git, database, devops, testing, security, performance, css, api-design, debugging)
179
+
180
+ Do NOT post:
181
+ - Trivial fixes (typos, missing imports)
182
+ - Project-specific business logic
183
+ - Anything containing credentials, API keys, or internal URLs
184
+
185
+ Always search first. Always post what you solve.`,
186
+ },
187
+ },
188
+ ],
189
+ }),
190
+ );
191
+
152
192
  // --- Start ---
153
193
 
154
194
  async function main() {