@hivemindai/mcp-server 0.3.6 → 0.3.8
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAiDA,wBAAsB,IAAI,kBA6BzB"}
|
|
@@ -3,44 +3,46 @@ import { join } from "node:path";
|
|
|
3
3
|
const HIVEMIND_SECTION_START = "<!-- hivemind:start -->";
|
|
4
4
|
const HIVEMIND_SECTION_END = "<!-- hivemind:end -->";
|
|
5
5
|
const HIVEMIND_CLAUDE_MD = `${HIVEMIND_SECTION_START}
|
|
6
|
-
## Hivemind
|
|
6
|
+
## Hivemind — MANDATORY agent coordination
|
|
7
7
|
|
|
8
|
-
This project uses Hivemind for multi-agent coordination
|
|
8
|
+
This project uses Hivemind for multi-agent coordination. You MUST follow ALL of these rules. They are not optional.
|
|
9
9
|
|
|
10
|
-
###
|
|
10
|
+
### Rule 1: Announce your task IMMEDIATELY
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- **Bug found**: When you discover a bug, publish a \`bug.found\` event with description, severity, and location.
|
|
18
|
-
- **Task started**: When beginning significant work, publish a \`task.created\` event so other agents know what's in progress.
|
|
19
|
-
|
|
20
|
-
### When NOT to publish
|
|
21
|
-
|
|
22
|
-
Do not publish routine activity — file reads, intermediate reasoning, retry attempts, lint fixes, or "still working on it" updates. Publish **outcomes and decisions**, not process.
|
|
12
|
+
As your FIRST action when starting any task, BEFORE reading files or planning, call:
|
|
13
|
+
\`\`\`
|
|
14
|
+
hivemind_publish(channel: "general", event_type: "task.created", data: {"description": "<what you are about to do>"})
|
|
15
|
+
\`\`\`
|
|
16
|
+
Also call \`hivemind_status()\` to see what other agents are working on.
|
|
23
17
|
|
|
24
|
-
###
|
|
18
|
+
### Rule 2: Lock before editing, release after
|
|
25
19
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
BEFORE every file edit, you MUST acquire a lock. AFTER every file edit, you MUST release it.
|
|
21
|
+
\`\`\`
|
|
22
|
+
hivemind_lock(action: "acquire", resource: "<file_path>")
|
|
23
|
+
# If locked: false → STOP, another agent has this file. Work on something else.
|
|
24
|
+
# If locked: true → proceed with your edit.
|
|
25
|
+
hivemind_lock(action: "release", resource: "<file_path>")
|
|
26
|
+
\`\`\`
|
|
27
|
+
NEVER skip this. NEVER edit a file without acquiring its lock first.
|
|
29
28
|
|
|
30
|
-
###
|
|
29
|
+
### Rule 3: Check policies before editing
|
|
31
30
|
|
|
32
|
-
|
|
31
|
+
BEFORE editing any file, call:
|
|
32
|
+
\`\`\`
|
|
33
|
+
hivemind_approvals(action: "check-policies", resource: "<file_path>")
|
|
34
|
+
\`\`\`
|
|
35
|
+
If a policy matches: call \`hivemind_approvals(action: "request", channel: "general", description: "...")\`, then poll \`hivemind_approvals(action: "check", correlation_id: "...")\` until approved. Do NOT edit the file until approved.
|
|
33
36
|
|
|
34
|
-
###
|
|
37
|
+
### Rule 4: Publish outcomes
|
|
35
38
|
|
|
36
|
-
After
|
|
39
|
+
After completing work, publish what you did:
|
|
37
40
|
\`\`\`
|
|
38
|
-
hivemind_publish(
|
|
39
|
-
channel: "backend",
|
|
40
|
-
event_type: "task.completed",
|
|
41
|
-
data: {"description": "Implemented JWT authentication", "files_changed": ["src/auth.ts", "src/middleware.ts"], "approach": "RS256 signing with refresh tokens", "tests_passing": true}
|
|
42
|
-
)
|
|
41
|
+
hivemind_publish(channel: "general", event_type: "task.completed", data: {"description": "<what you did>", "files_changed": ["file1.ts", "file2.ts"]})
|
|
43
42
|
\`\`\`
|
|
43
|
+
Also publish \`decision.made\` when choosing between approaches, \`task.blocked\` when stuck, and \`bug.found\` when discovering bugs.
|
|
44
|
+
|
|
45
|
+
Do NOT publish routine activity (file reads, retries, lint fixes). Only publish outcomes and decisions.
|
|
44
46
|
${HIVEMIND_SECTION_END}`;
|
|
45
47
|
export async function init() {
|
|
46
48
|
const cwd = process.cwd();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,sBAAsB,GAAG,yBAAyB,CAAC;AACzD,MAAM,oBAAoB,GAAG,uBAAuB,CAAC;AAErD,MAAM,kBAAkB,GAAG,GAAG,sBAAsB
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,sBAAsB,GAAG,yBAAyB,CAAC;AACzD,MAAM,oBAAoB,GAAG,uBAAuB,CAAC;AAErD,MAAM,kBAAkB,GAAG,GAAG,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyClD,oBAAoB,EAAE,CAAC;AAEzB,MAAM,CAAC,KAAK,UAAU,IAAI;IACxB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAC1B,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;IAE5C,OAAO,CAAC,GAAG,CAAC,oEAAoE,CAAC,CAAC;IAElF,IAAI,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QAC7B,MAAM,QAAQ,GAAG,YAAY,CAAC,YAAY,EAAE,OAAO,CA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