feat(kiro): add Kiro CLI harness for session capture and MCP install

Open
#364 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
backend, cli, tooling

Research direction

Start by reading src/mcp/cowork-ingest.ts and its cowork-ingest.test.ts, then review the planned install-kiro.ts work alongside install-cowork.test.ts. Implement the Kiro transcript mapping, MCP configuration merge, CLI command, and startup loop described here. Done means Kiro sessions produce the listed Hivemind row types, existing MCP servers are preserved, and the mirrored tests pass.

Written by the indexing model from the issue text.

Description

Summary

Add a Kiro harness so sessions from Kiro CLI (kiro-cli) are captured into Hivemind shared memory, exactly like the existing Claude Code, Cursor, Codex, and Cowork harnesses.

Why Kiro

Kiro is an AI coding agent from AWS (free tier available). Its JSONL session format is already compatible with Hivemind's capture pipeline — no hooks or plugin API needed, just transcript tailing, the same approach the Cowork harness uses. It also installs MCP servers via a standard ~/.kiro/settings/mcp.json config file, so the Hivemind MCP server can be wired in with a single hivemind install kiro command.

I run Java/Spring workshops where attendees use kiro-cli. Hivemind would be a natural fit for shared team memory across those sessions, but there's no integration path today.

Technical approach

I've read the Cowork harness (src/mcp/cowork-ingest.ts) and the Kiro session format. They map cleanly:

Kiro JSONL format (~/.kiro/sessions/cli/<uuid>.jsonl):

{"version":"v1","kind":"Prompt","data":{"content":[{"kind":"text","data":"..."}]}}
{"version":"v1","kind":"AssistantMessage","data":{"content":[{"kind":"text","data":"..."},{"kind":"toolUse","data":{"toolUseId":"...","name":"...","input":{...}}}]}}
{"version":"v1","kind":"ToolResults","data":{"content":[{"kind":"toolResult","data":{"toolUseId":"...","content":[...]}}]}}

Mapping to Hivemind session rows:

Kiro kind Hivemind type
Prompt user_message (content from data.content[].data where kind=text)
AssistantMessage text blocks assistant_message
AssistantMessage toolUse blocks tool_call (tool_name, tool_use_id, tool_input)
ToolResults toolResult blocks tool_result (tool_use_id, tool_response)

MCP installation path — Kiro reads ~/.kiro/settings/mcp.json:

{
  "mcpServers": {
    "hivemind": {
      "command": "npx",
      "args": ["-y", "hivemind", "mcp"]
    }
  }
}

Planned implementation

  • src/kiro/kiro-ingest.ts — tails ~/.kiro/sessions/cli/*.jsonl, maps kinds to Hivemind rows, watermarks per-transcript, drains to the session queue. Mirrors cowork-ingest.ts.
  • src/cli/install-kiro.ts — merges the Hivemind MCP server entry into ~/.kiro/settings/mcp.json, preserving existing servers.
  • hivemind install kiro CLI command.
  • startKiroIngestLoop() called from the MCP server on startup.
  • Tests mirroring cowork-ingest.test.ts and install-cowork.test.ts.

Scope

Transcript tailing only (same as Cowork) — no kiro plugin API or hooks required. Sessions captured as agent = "kiro" rows. Summaries and skillify triggered on idle sessions via the existing summarizeIdleSessions pattern.

Happy to implement this if the approach looks good to you.

Dominant language
TypeScript
Stars
1.6k
Forks
107
Avg merge
19h 25m
Merged PRs (30d)
12

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from activeloopai/hivemind

All issues in activeloopai/hivemind

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.