@keepur/hive 0.1.0 → 0.1.1
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/README.md +37 -321
- package/package.json +9 -10
- package/pkg/cli.min.js +195 -164
- package/pkg/mcp/admin.min.js +16 -16
- package/pkg/mcp/code-search.min.js +1 -1
- package/pkg/mcp/code-task.min.js +1 -1
- package/pkg/mcp/contacts.min.js +1 -1
- package/pkg/mcp/keychain.min.js +16 -16
- package/pkg/mcp/linear.min.js +1 -1
- package/pkg/mcp/memory.min.js +24 -17
- package/pkg/mcp/resend.min.js +14 -14
- package/pkg/mcp/workflow.min.js +23 -23
- package/pkg/server.min.js +246 -242
- package/scripts/honeypot +186 -0
- package/seeds/chief-of-staff/agent.yaml +2 -2
- package/seeds/chief-of-staff/skills/agent-builder/skills/agent-builder/SKILL.md +26 -0
- package/seeds/chief-of-staff/skills/capability-inventory/skills/capability-inventory/SKILL.md +21 -0
- package/seeds/chief-of-staff/skills/credential-setup/skills/credential-setup/SKILL.md +23 -0
- package/seeds/chief-of-staff/skills/onboarding/skills/onboarding/SKILL.md +26 -0
- package/pkg/setup/install-prereqs.sh +0 -80
package/scripts/honeypot
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# honeypot — macOS Keychain credential wrapper for Hive
|
|
5
|
+
#
|
|
6
|
+
# Stores secrets scoped to the Hive instance under service prefix "hive/<id>/".
|
|
7
|
+
# The keychain MCP server (keychain-mcp-server.ts) reads these at runtime.
|
|
8
|
+
# Coexists with .env — either source works, Keychain is preferred for new installs.
|
|
9
|
+
#
|
|
10
|
+
# Usage:
|
|
11
|
+
# honeypot set ANTHROPIC_API_KEY # prompt for value (hidden input)
|
|
12
|
+
# honeypot set SLACK_BOT_TOKEN "xoxb-..." # inline value
|
|
13
|
+
# honeypot get ANTHROPIC_API_KEY # print value
|
|
14
|
+
# honeypot list # show stored keys (no values)
|
|
15
|
+
# honeypot rm ANTHROPIC_API_KEY # delete
|
|
16
|
+
# honeypot doctor # check required keys are present
|
|
17
|
+
|
|
18
|
+
GREEN='\033[0;32m'
|
|
19
|
+
RED='\033[0;31m'
|
|
20
|
+
YELLOW='\033[1;33m'
|
|
21
|
+
DIM='\033[2m'
|
|
22
|
+
NC='\033[0m'
|
|
23
|
+
|
|
24
|
+
# Resolve instance ID from hive.yaml
|
|
25
|
+
resolve_instance_id() {
|
|
26
|
+
local yaml=""
|
|
27
|
+
if [ -n "${HIVE_HOME:-}" ] && [ -f "${HIVE_HOME}/hive.yaml" ]; then
|
|
28
|
+
yaml="${HIVE_HOME}/hive.yaml"
|
|
29
|
+
elif [ -f "./hive.yaml" ]; then
|
|
30
|
+
yaml="./hive.yaml"
|
|
31
|
+
elif [ -f "${HOME}/.hive/hive.yaml" ]; then
|
|
32
|
+
yaml="${HOME}/.hive/hive.yaml"
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
if [ -n "$yaml" ]; then
|
|
36
|
+
# Extract instance.id from YAML (simple grep — no yq dependency)
|
|
37
|
+
local id
|
|
38
|
+
id=$(grep -A5 '^instance:' "$yaml" 2>/dev/null | grep 'id:' | head -1 | sed 's/.*id: *//' | tr -d '[:space:]"'"'")
|
|
39
|
+
if [ -n "$id" ]; then
|
|
40
|
+
echo "$id"
|
|
41
|
+
return
|
|
42
|
+
fi
|
|
43
|
+
fi
|
|
44
|
+
echo "hive"
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
INSTANCE_ID=$(resolve_instance_id)
|
|
48
|
+
PREFIX="hive/${INSTANCE_ID}"
|
|
49
|
+
|
|
50
|
+
cmd="${1:-help}"
|
|
51
|
+
shift || true
|
|
52
|
+
|
|
53
|
+
case "$cmd" in
|
|
54
|
+
set)
|
|
55
|
+
key="${1:-}"
|
|
56
|
+
value="${2:-}"
|
|
57
|
+
if [ -z "$key" ]; then
|
|
58
|
+
echo "Usage: honeypot set <KEY> [value]"
|
|
59
|
+
exit 1
|
|
60
|
+
fi
|
|
61
|
+
if [ -z "$value" ]; then
|
|
62
|
+
printf "Enter value for %s: " "$key"
|
|
63
|
+
read -rs value
|
|
64
|
+
echo ""
|
|
65
|
+
if [ -z "$value" ]; then
|
|
66
|
+
echo -e "${RED}Error:${NC} empty value"
|
|
67
|
+
exit 1
|
|
68
|
+
fi
|
|
69
|
+
fi
|
|
70
|
+
security add-generic-password \
|
|
71
|
+
-s "${PREFIX}/${key}" \
|
|
72
|
+
-a "$key" \
|
|
73
|
+
-w "$value" \
|
|
74
|
+
-U 2>/dev/null || \
|
|
75
|
+
security add-generic-password \
|
|
76
|
+
-s "${PREFIX}/${key}" \
|
|
77
|
+
-a "$key" \
|
|
78
|
+
-w "$value"
|
|
79
|
+
echo -e "${GREEN}+${NC} ${PREFIX}/${key}"
|
|
80
|
+
;;
|
|
81
|
+
|
|
82
|
+
get)
|
|
83
|
+
key="${1:-}"
|
|
84
|
+
if [ -z "$key" ]; then
|
|
85
|
+
echo "Usage: honeypot get <KEY>"
|
|
86
|
+
exit 1
|
|
87
|
+
fi
|
|
88
|
+
security find-generic-password \
|
|
89
|
+
-s "${PREFIX}/${key}" \
|
|
90
|
+
-a "$key" \
|
|
91
|
+
-w 2>/dev/null || {
|
|
92
|
+
echo -e "${RED}Not found:${NC} ${PREFIX}/${key}"
|
|
93
|
+
exit 1
|
|
94
|
+
}
|
|
95
|
+
;;
|
|
96
|
+
|
|
97
|
+
rm|remove|delete)
|
|
98
|
+
key="${1:-}"
|
|
99
|
+
if [ -z "$key" ]; then
|
|
100
|
+
echo "Usage: honeypot rm <KEY>"
|
|
101
|
+
exit 1
|
|
102
|
+
fi
|
|
103
|
+
security delete-generic-password \
|
|
104
|
+
-s "${PREFIX}/${key}" \
|
|
105
|
+
-a "$key" &>/dev/null && \
|
|
106
|
+
echo -e "${GREEN}-${NC} ${PREFIX}/${key}" || {
|
|
107
|
+
echo -e "${RED}Not found:${NC} ${PREFIX}/${key}"
|
|
108
|
+
exit 1
|
|
109
|
+
}
|
|
110
|
+
;;
|
|
111
|
+
|
|
112
|
+
list|ls)
|
|
113
|
+
echo -e "${DIM}Secrets under ${PREFIX}/:${NC}"
|
|
114
|
+
echo ""
|
|
115
|
+
# Extract service names matching our prefix from keychain dump
|
|
116
|
+
entries=$(security dump-keychain 2>/dev/null | \
|
|
117
|
+
grep "0x00000007" | \
|
|
118
|
+
sed 's/.*<blob>="\([^"]*\)".*/\1/' | \
|
|
119
|
+
grep "^${PREFIX}/" | \
|
|
120
|
+
sort -u || true)
|
|
121
|
+
if [ -n "$entries" ]; then
|
|
122
|
+
echo "$entries" | while IFS= read -r svc; do
|
|
123
|
+
echo " ${svc#${PREFIX}/}"
|
|
124
|
+
done
|
|
125
|
+
else
|
|
126
|
+
echo " (none)"
|
|
127
|
+
fi
|
|
128
|
+
;;
|
|
129
|
+
|
|
130
|
+
doctor)
|
|
131
|
+
echo -e "Checking required credentials for ${YELLOW}${INSTANCE_ID}${NC}..."
|
|
132
|
+
echo ""
|
|
133
|
+
required=("ANTHROPIC_API_KEY" "SLACK_APP_TOKEN" "SLACK_BOT_TOKEN")
|
|
134
|
+
recommended=("MONGODB_URI")
|
|
135
|
+
all_good=true
|
|
136
|
+
|
|
137
|
+
for key in "${required[@]}"; do
|
|
138
|
+
if security find-generic-password -s "${PREFIX}/${key}" -a "$key" -w &>/dev/null; then
|
|
139
|
+
echo -e " ${GREEN}ok${NC} $key"
|
|
140
|
+
else
|
|
141
|
+
echo -e " ${RED}--${NC} $key ${DIM}(required)${NC}"
|
|
142
|
+
all_good=false
|
|
143
|
+
fi
|
|
144
|
+
done
|
|
145
|
+
|
|
146
|
+
for key in "${recommended[@]}"; do
|
|
147
|
+
if security find-generic-password -s "${PREFIX}/${key}" -a "$key" -w &>/dev/null; then
|
|
148
|
+
echo -e " ${GREEN}ok${NC} $key"
|
|
149
|
+
else
|
|
150
|
+
echo -e " ${YELLOW}--${NC} $key ${DIM}(recommended)${NC}"
|
|
151
|
+
fi
|
|
152
|
+
done
|
|
153
|
+
|
|
154
|
+
echo ""
|
|
155
|
+
if $all_good; then
|
|
156
|
+
echo -e "${GREEN}All required credentials present.${NC}"
|
|
157
|
+
else
|
|
158
|
+
echo -e "Run ${YELLOW}honeypot set <KEY>${NC} to add missing credentials."
|
|
159
|
+
exit 1
|
|
160
|
+
fi
|
|
161
|
+
;;
|
|
162
|
+
|
|
163
|
+
help|--help|-h)
|
|
164
|
+
cat <<'HELP'
|
|
165
|
+
honeypot — macOS Keychain credential store for Hive
|
|
166
|
+
|
|
167
|
+
Usage:
|
|
168
|
+
honeypot set <KEY> [value] Store a credential (prompts if value omitted)
|
|
169
|
+
honeypot get <KEY> Retrieve a credential
|
|
170
|
+
honeypot list Show stored keys (no values)
|
|
171
|
+
honeypot rm <KEY> Delete a credential
|
|
172
|
+
honeypot doctor Check required credentials are present
|
|
173
|
+
honeypot help This message
|
|
174
|
+
|
|
175
|
+
Credentials are stored in macOS Keychain under "hive/<instance-id>/<KEY>"
|
|
176
|
+
and are readable by the Hive keychain MCP server at runtime.
|
|
177
|
+
|
|
178
|
+
HELP
|
|
179
|
+
;;
|
|
180
|
+
|
|
181
|
+
*)
|
|
182
|
+
echo "Unknown command: $cmd"
|
|
183
|
+
echo "Run 'honeypot help' for usage."
|
|
184
|
+
exit 1
|
|
185
|
+
;;
|
|
186
|
+
esac
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-builder
|
|
3
|
+
description: Conversational agent creation — propose roles, configure agents, introduce them to the team
|
|
4
|
+
agents:
|
|
5
|
+
- chief-of-staff
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Agent Builder
|
|
9
|
+
|
|
10
|
+
Create new agents conversationally. The owner describes what they need, you propose a role, configure the agent, and introduce it to the team.
|
|
11
|
+
|
|
12
|
+
## When to use
|
|
13
|
+
|
|
14
|
+
When the owner asks to create a new agent, add a team member, or needs help with a task that would be better handled by a dedicated agent.
|
|
15
|
+
|
|
16
|
+
## What to do
|
|
17
|
+
|
|
18
|
+
1. Understand what the owner needs — what problem, what domain, what tools
|
|
19
|
+
2. Propose a role with a name, personality, and capabilities
|
|
20
|
+
3. Confirm the proposal with the owner
|
|
21
|
+
4. Create the agent definition using admin MCP tools:
|
|
22
|
+
- Set appropriate model ceiling (haiku for simple routing, sonnet for complex work)
|
|
23
|
+
- Assign relevant MCP servers from core servers
|
|
24
|
+
- Write a soul (personality) and system prompt (role/guardrails)
|
|
25
|
+
- Create a Slack channel for the agent
|
|
26
|
+
5. Introduce the new agent to the owner in Slack
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: capability-inventory
|
|
3
|
+
description: Know what's installed and available — agents, servers, plugins, skills, registry offerings
|
|
4
|
+
agents:
|
|
5
|
+
- chief-of-staff
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Capability Inventory
|
|
9
|
+
|
|
10
|
+
Know what's installed on this hive and what's available to install. Answer questions about capabilities, suggest additions, and help the owner understand their team.
|
|
11
|
+
|
|
12
|
+
## When to use
|
|
13
|
+
|
|
14
|
+
When the owner asks "what can you do?", "what agents do I have?", "what's available?", or similar discovery questions.
|
|
15
|
+
|
|
16
|
+
## What to do
|
|
17
|
+
|
|
18
|
+
1. Use admin MCP tools to list current agents and their configurations
|
|
19
|
+
2. Describe each agent's role, capabilities, and assigned MCP servers
|
|
20
|
+
3. If asked about available additions, describe what can be installed from the registry
|
|
21
|
+
4. Suggest agents or capabilities that might help based on the owner's business context
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: credential-setup
|
|
3
|
+
description: Guide the user through setting up credentials for services via honeypot (macOS Keychain)
|
|
4
|
+
agents:
|
|
5
|
+
- chief-of-staff
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Credential Setup
|
|
9
|
+
|
|
10
|
+
Guide the hive owner through setting up credentials for services that require API keys or OAuth tokens.
|
|
11
|
+
|
|
12
|
+
## When to use
|
|
13
|
+
|
|
14
|
+
When the owner wants to connect a new service (Google, HubSpot, etc.) or when a tool fails because a required credential is missing.
|
|
15
|
+
|
|
16
|
+
## What to do
|
|
17
|
+
|
|
18
|
+
1. Identify which credential is needed
|
|
19
|
+
2. Explain what the service does and why the credential is needed
|
|
20
|
+
3. Walk the owner through obtaining the credential (API key page, OAuth flow, etc.)
|
|
21
|
+
4. Instruct them to run `honeypot set <KEY_NAME>` from their terminal
|
|
22
|
+
5. Verify the credential works by testing the relevant tool
|
|
23
|
+
6. Confirm success and explain what's now available
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: onboarding
|
|
3
|
+
description: First-contact onboarding interview — learns about the business and writes findings to shared/business-context.md
|
|
4
|
+
agents:
|
|
5
|
+
- chief-of-staff
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Onboarding
|
|
9
|
+
|
|
10
|
+
Structured first-contact interview for new hive owners. Learn about their business, team, products, and services. Write findings to `shared/business-context.md` in MongoDB memory so all future agents inherit the full business context.
|
|
11
|
+
|
|
12
|
+
## When to use
|
|
13
|
+
|
|
14
|
+
Run this skill on first contact with a new user — when `shared/business-context.md` contains only the skeleton seeded by `hive init`.
|
|
15
|
+
|
|
16
|
+
## What to do
|
|
17
|
+
|
|
18
|
+
1. Introduce yourself and explain your role as Chief of Staff
|
|
19
|
+
2. Interview the owner about their business:
|
|
20
|
+
- Company name, industry, location
|
|
21
|
+
- Products and services offered
|
|
22
|
+
- Team members and their roles
|
|
23
|
+
- Key customers and markets
|
|
24
|
+
- Business goals and priorities
|
|
25
|
+
3. Write a comprehensive `shared/business-context.md` using the memory tools
|
|
26
|
+
4. Summarize what you learned and confirm with the owner
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
echo ""
|
|
5
|
-
echo "╔══════════════════════════════════════════════╗"
|
|
6
|
-
echo "║ Hive — Prerequisites Installer ║"
|
|
7
|
-
echo "╚══════════════════════════════════════════════╝"
|
|
8
|
-
echo ""
|
|
9
|
-
|
|
10
|
-
# Colors
|
|
11
|
-
GREEN='\033[0;32m'
|
|
12
|
-
YELLOW='\033[1;33m'
|
|
13
|
-
NC='\033[0m' # No Color
|
|
14
|
-
|
|
15
|
-
check() { command -v "$1" &>/dev/null; }
|
|
16
|
-
|
|
17
|
-
ok() { echo -e "${GREEN}✓${NC} $1"; }
|
|
18
|
-
need() { echo -e "${YELLOW}→${NC} $1"; }
|
|
19
|
-
|
|
20
|
-
# 1. Homebrew
|
|
21
|
-
if check brew; then
|
|
22
|
-
ok "Homebrew already installed"
|
|
23
|
-
else
|
|
24
|
-
need "Installing Homebrew..."
|
|
25
|
-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
26
|
-
# Add to path for this session
|
|
27
|
-
if [ -f /opt/homebrew/bin/brew ]; then
|
|
28
|
-
eval "$(/opt/homebrew/bin/brew shellenv)"
|
|
29
|
-
fi
|
|
30
|
-
ok "Homebrew installed"
|
|
31
|
-
fi
|
|
32
|
-
|
|
33
|
-
# 2. Node.js
|
|
34
|
-
if check node; then
|
|
35
|
-
NODE_VERSION=$(node -v | cut -d. -f1 | tr -d v)
|
|
36
|
-
if [ "$NODE_VERSION" -ge 22 ]; then
|
|
37
|
-
ok "Node.js $(node -v) already installed"
|
|
38
|
-
else
|
|
39
|
-
need "Node.js $(node -v) is too old — installing Node.js 22..."
|
|
40
|
-
brew install node@22
|
|
41
|
-
ok "Node.js updated"
|
|
42
|
-
fi
|
|
43
|
-
else
|
|
44
|
-
need "Installing Node.js..."
|
|
45
|
-
brew install node
|
|
46
|
-
ok "Node.js installed"
|
|
47
|
-
fi
|
|
48
|
-
|
|
49
|
-
# 3. MongoDB
|
|
50
|
-
if check mongod; then
|
|
51
|
-
ok "MongoDB already installed"
|
|
52
|
-
else
|
|
53
|
-
need "Installing MongoDB..."
|
|
54
|
-
brew tap mongodb/brew 2>/dev/null || true
|
|
55
|
-
brew install mongodb-community
|
|
56
|
-
ok "MongoDB installed"
|
|
57
|
-
fi
|
|
58
|
-
|
|
59
|
-
# Start MongoDB if not running
|
|
60
|
-
if ! pgrep -x mongod &>/dev/null; then
|
|
61
|
-
need "Starting MongoDB..."
|
|
62
|
-
brew services start mongodb-community
|
|
63
|
-
ok "MongoDB started"
|
|
64
|
-
else
|
|
65
|
-
ok "MongoDB already running"
|
|
66
|
-
fi
|
|
67
|
-
|
|
68
|
-
# 4. Git
|
|
69
|
-
if check git; then
|
|
70
|
-
ok "Git already installed"
|
|
71
|
-
else
|
|
72
|
-
need "Installing Git..."
|
|
73
|
-
brew install git
|
|
74
|
-
ok "Git installed"
|
|
75
|
-
fi
|
|
76
|
-
|
|
77
|
-
echo ""
|
|
78
|
-
echo "All prerequisites installed."
|
|
79
|
-
echo "Next: run 'npm install && npm run setup' to configure Hive."
|
|
80
|
-
echo ""
|