@businesskit/agent 1.0.4 → 1.0.7
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/.claude-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +25 -0
- package/.cursorrules +10 -0
- package/.superconsole-plugin/plugin.json +62 -0
- package/AGENTS.md +105 -63
- package/CLAUDE.md +11 -84
- package/GEMINI.md +11 -34
- package/README.md +95 -154
- package/assets/logo.svg +3 -0
- package/bin/businesskit.js +45 -18
- package/commands/add-contact.md +47 -0
- package/commands/add-inventory-from-invoice.md +80 -0
- package/commands/adjust-stock.md +46 -0
- package/commands/brief.md +12 -0
- package/commands/capabilities.md +33 -0
- package/commands/chase.md +12 -0
- package/commands/check-stock.md +43 -0
- package/commands/create-component.md +109 -0
- package/commands/create-invoice.md +69 -0
- package/commands/create-new-bill.md +65 -0
- package/commands/create-page.md +124 -0
- package/commands/crm.md +13 -0
- package/commands/followups.md +13 -0
- package/commands/list-components.md +41 -0
- package/commands/list-content.md +46 -0
- package/commands/list-pages.md +45 -0
- package/commands/pipeline.md +13 -0
- package/commands/publish-page.md +64 -0
- package/commands/send-invoice.md +42 -0
- package/commands/seo-audit.md +36 -0
- package/commands/update-agent.md +33 -0
- package/commands/update-contact.md +46 -0
- package/commands/update-content.md +48 -0
- package/commands/update-page.md +56 -0
- package/commands/update-price.md +47 -0
- package/commands/write-blog.md +56 -0
- package/commands/write-docs.md +90 -0
- package/commands/write-guide.md +51 -0
- package/commands/write-newsletter.md +50 -0
- package/dist/server.js +4099 -0
- package/mcp_config.json +12 -0
- package/package.json +54 -25
- package/plugin.json +32 -0
- package/scripts/setup.sh +169 -0
- package/scripts/setup.ts +129 -0
- package/scripts/update.sh +56 -0
- package/server.json +21 -0
- package/skills/README.md +20 -27
- package/skills/billing/SKILL.md +64 -0
- package/skills/brand/SKILL.md +30 -86
- package/skills/cms/SKILL.md +111 -0
- package/skills/cms/references/cms-hubs.md +84 -0
- package/skills/cms/references/html-blocks.md +177 -0
- package/skills/copywriting/SKILL.md +1 -1
- package/skills/crm/SKILL.md +24 -0
- package/skills/docs/SKILL.md +65 -0
- package/skills/docs/references/how-to.md +155 -0
- package/skills/inbox/SKILL.md +49 -0
- package/skills/inventory/SKILL.md +69 -0
- package/skills/pages/SKILL.md +214 -0
- package/skills/pages/references/sections-catalog.json +1183 -0
- package/skills/social/SKILL.md +84 -211
- package/skills/social/evals/evals.json +66 -0
- package/skills/social/evals/rubric.md +26 -0
- package/skills/social/examples/repurposing-blog-to-social.md +93 -0
- package/skills/social/examples/weekly-content-calendar.md +30 -0
- package/skills/social/linkedin/SKILL.md +107 -0
- package/skills/social/linkedin/evals/evals.json +106 -0
- package/skills/social/linkedin/evals/rubric.md +28 -0
- package/skills/social/linkedin/examples/gasp-weekly-sprint.md +24 -0
- package/skills/social/linkedin/examples/growth-posts-by-format.md +140 -0
- package/skills/social/linkedin/references/gasp-funnel-and-calibration.md +90 -0
- package/skills/social/linkedin/references/six-growth-formats.md +114 -0
- package/skills/social/references/platforms.md +76 -0
- package/skills/social/references/post-templates.md +105 -0
- package/skills/social/references/reverse-engineering.md +62 -0
- package/src/data/sections-catalog.json +950 -0
- package/src/db.ts +170 -0
- package/src/server.ts +75 -0
- package/src/tools/content.ts +326 -0
- package/src/tools/crm.ts +1416 -0
- package/src/tools/domains.ts +89 -0
- package/src/tools/inbox.ts +270 -0
- package/src/tools/index.ts +116 -0
- package/src/tools/pages.ts +1217 -0
- package/src/tools/shop.ts +771 -0
- package/src/tools/system.ts +94 -0
- package/src/tools/types.ts +17 -0
- package/templates/antigravity.json +8 -0
- package/templates/claude-code.mcp.json +8 -0
- package/templates/cursor.mcp.json +8 -0
- package/templates/vscode.mcp.json +9 -0
- package/.claude/commands/analytics.md +0 -7
- package/.claude/commands/blog-writer.md +0 -9
- package/.claude/commands/cbo.md +0 -7
- package/.claude/commands/ceo.md +0 -10
- package/.claude/commands/cmo.md +0 -7
- package/.claude/commands/compress.md +0 -73
- package/.claude/commands/coo.md +0 -11
- package/.claude/commands/copywriter.md +0 -15
- package/.claude/commands/course-creator.md +0 -9
- package/.claude/commands/crm.md +0 -591
- package/.claude/commands/deep.md +0 -50
- package/.claude/commands/docs-writer.md +0 -8
- package/.claude/commands/forms-builder.md +0 -10
- package/.claude/commands/ingest.md +0 -110
- package/.claude/commands/jobs-manager.md +0 -8
- package/.claude/commands/kb.md +0 -107
- package/.claude/commands/newsletter-writer.md +0 -9
- package/.claude/commands/preserve.md +0 -64
- package/.claude/commands/resume.md +0 -67
- package/.claude/commands/scheduler.md +0 -8
- package/.claude/commands/seo.md +0 -60
- package/.claude/commands/social.md +0 -51
- package/.claude/commands/store-manager.md +0 -11
- package/.claude/settings.json +0 -16
- package/.claude/settings.local.json +0 -11
- package/.env.example +0 -12
- package/.mcp.json +0 -3
- package/HEARTBEAT.md +0 -105
- package/PLAN.md +0 -345
- package/PRD-Agent-Composition.md +0 -149
- package/PRD-Agent-Harness.md +0 -316
- package/REFERENCE.md +0 -160
- package/SOUL.md +0 -148
- package/SYSTEM.md +0 -71
- package/agents/_base.ts +0 -371
- package/agents/analytics/SOUL.md +0 -11
- package/agents/analytics/analytics.ts +0 -405
- package/agents/business/SOUL.md +0 -11
- package/agents/business/business.ts +0 -109
- package/agents/ceo/SOUL.md +0 -15
- package/agents/ceo/ceo.ts +0 -146
- package/agents/content/SOUL.md +0 -11
- package/agents/content/content.ts +0 -379
- package/agents/copywriting/SOUL.md +0 -11
- package/agents/copywriting/copywriting.ts +0 -89
- package/agents/courses/SOUL.md +0 -11
- package/agents/courses/courses.ts +0 -451
- package/agents/docs/SOUL.md +0 -11
- package/agents/docs/docs.ts +0 -77
- package/agents/forms/SOUL.md +0 -11
- package/agents/forms/forms.ts +0 -364
- package/agents/hiring/SOUL.md +0 -11
- package/agents/hiring/hiring.ts +0 -314
- package/agents/marketing/SOUL.md +0 -15
- package/agents/marketing/marketing.ts +0 -109
- package/agents/newsletter/SOUL.md +0 -11
- package/agents/newsletter/newsletter.ts +0 -91
- package/agents/operations/SOUL.md +0 -11
- package/agents/operations/operations.ts +0 -157
- package/agents/sales/SOUL.md +0 -44
- package/agents/sales/sales.ts +0 -883
- package/agents/scheduler/SOUL.md +0 -11
- package/agents/scheduler/scheduler.ts +0 -68
- package/agents/seo/SOUL.md +0 -11
- package/agents/seo/seo.ts +0 -288
- package/agents/social/SOUL.md +0 -11
- package/agents/social/social.ts +0 -744
- package/agents/store/SOUL.md +0 -11
- package/agents/store/store.ts +0 -514
- package/cli.ts +0 -144
- package/context/about-me.md +0 -96
- package/context/brand-voice.md +0 -127
- package/context/brand.md +0 -80
- package/context/business.md +0 -66
- package/context/working-style.md +0 -87
- package/lib/analytics.ts +0 -81
- package/lib/cms.ts +0 -88
- package/lib/db.adapter.ts +0 -30
- package/lib/db.ts +0 -63
- package/lib/enums.ts +0 -25
- package/lib/groups.ts +0 -122
- package/lib/id.ts +0 -43
- package/lib/kb.ts +0 -337
- package/lib/memory.ts +0 -219
- package/lib/pattern-detector.ts +0 -169
- package/lib/profile.ts +0 -155
- package/lib/schema.ts +0 -2015
- package/lib/slug.ts +0 -30
- package/lib/validate.ts +0 -33
- package/setup.ts +0 -141
- package/skills/agents/SKILL.md +0 -56
- package/skills/analytics/SKILL.md +0 -52
- package/skills/blog-writer/SKILL.md +0 -452
- package/skills/ceo/SKILL.md +0 -25
- package/skills/cmo/SKILL.md +0 -8
- package/skills/schema/SKILL.md +0 -86
- package/skills/store/SKILL.md +0 -62
- package/tsconfig.json +0 -14
package/mcp_config.json
ADDED
package/package.json
CHANGED
|
@@ -1,40 +1,64 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@businesskit/agent",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.7",
|
|
4
|
+
"description": "Official Model Context Protocol (MCP) server & agent toolbelt for BusinessKit — POS, invoicing, inventory restock, CRM, and website publishing.",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"main": "dist/server.js",
|
|
7
|
+
"module": "dist/server.js",
|
|
8
|
+
"types": "dist/server.d.ts",
|
|
9
|
+
"mcpName": "io.github.businesskitai/agent",
|
|
6
10
|
"bin": {
|
|
7
|
-
"bk": "
|
|
8
|
-
"businesskit": "
|
|
11
|
+
"bk": "bin/businesskit.js",
|
|
12
|
+
"businesskit": "bin/businesskit.js"
|
|
9
13
|
},
|
|
14
|
+
"files": [
|
|
15
|
+
"bin",
|
|
16
|
+
"dist",
|
|
17
|
+
"src",
|
|
18
|
+
"commands",
|
|
19
|
+
"skills",
|
|
20
|
+
"templates",
|
|
21
|
+
"scripts",
|
|
22
|
+
"rules",
|
|
23
|
+
"assets",
|
|
24
|
+
"plugin.json",
|
|
25
|
+
"mcp_config.json",
|
|
26
|
+
"server.json",
|
|
27
|
+
"AGENTS.md",
|
|
28
|
+
"CLAUDE.md",
|
|
29
|
+
"GEMINI.md",
|
|
30
|
+
"LICENSE",
|
|
31
|
+
"README.md",
|
|
32
|
+
".cursorrules",
|
|
33
|
+
".claude-plugin",
|
|
34
|
+
".cursor-plugin",
|
|
35
|
+
".superconsole-plugin"
|
|
36
|
+
],
|
|
10
37
|
"scripts": {
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"seo": "npx tsx cli.ts seo",
|
|
19
|
-
"scheduler:hourly": "npx tsx cli.ts scheduler hourly",
|
|
20
|
-
"scheduler:daily": "npx tsx cli.ts scheduler daily",
|
|
21
|
-
"scheduler:weekly": "npx tsx cli.ts scheduler weekly"
|
|
38
|
+
"build": "esbuild src/server.ts --bundle --platform=node --format=esm --packages=external --outfile=dist/server.js",
|
|
39
|
+
"start": "node dist/server.js",
|
|
40
|
+
"dev": "tsx src/server.ts",
|
|
41
|
+
"setup": "bash ./scripts/setup.sh",
|
|
42
|
+
"setup:ts": "npx tsx scripts/setup.ts",
|
|
43
|
+
"update": "bash ./scripts/update.sh",
|
|
44
|
+
"prepack": "npm run build"
|
|
22
45
|
},
|
|
23
46
|
"keywords": [
|
|
24
47
|
"claude-code",
|
|
25
48
|
"claude-cowork",
|
|
49
|
+
"antigravity",
|
|
50
|
+
"cursor",
|
|
51
|
+
"mcp",
|
|
52
|
+
"model-context-protocol",
|
|
53
|
+
"mcp-server",
|
|
26
54
|
"ai-agent",
|
|
27
55
|
"business-agent",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"social-media",
|
|
31
|
-
"businesskit"
|
|
56
|
+
"businesskit",
|
|
57
|
+
"turso"
|
|
32
58
|
],
|
|
33
|
-
"dependencies": {
|
|
34
|
-
"@libsql/client": "^0.15.15"
|
|
35
|
-
},
|
|
36
59
|
"devDependencies": {
|
|
37
60
|
"@types/node": "^22.0.0",
|
|
61
|
+
"esbuild": "^0.27.4",
|
|
38
62
|
"tsx": "^4.19.0",
|
|
39
63
|
"typescript": "^5.4.5"
|
|
40
64
|
},
|
|
@@ -43,8 +67,13 @@
|
|
|
43
67
|
},
|
|
44
68
|
"repository": {
|
|
45
69
|
"type": "git",
|
|
46
|
-
"url": "https://github.com/
|
|
70
|
+
"url": "git+https://github.com/businesskitai/businesskit-agent.git"
|
|
47
71
|
},
|
|
48
|
-
"homepage": "https://github.com/
|
|
49
|
-
"license": "MIT"
|
|
72
|
+
"homepage": "https://github.com/businesskitai/businesskit-agent#readme",
|
|
73
|
+
"license": "MIT",
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"@libsql/client": "^0.18.0",
|
|
76
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
77
|
+
"dotenv": "^18.0.10"
|
|
78
|
+
}
|
|
50
79
|
}
|
package/plugin.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://antigravity.google/schemas/v1/plugin.json",
|
|
3
|
+
"name": "businesskit",
|
|
4
|
+
"displayName": "BusinessKit",
|
|
5
|
+
"version": "1.0.5",
|
|
6
|
+
"description": "Universal BusinessKit autonomous agent kit — POS billing, B2B invoices, inventory restocking, CRM contacts, customer support triage, and website publishing via native MCP tools.",
|
|
7
|
+
"logo": "assets/logo.svg",
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "BusinessKit Team",
|
|
10
|
+
"url": "https://businesskit.ai"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://businesskit.ai",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/businesskitai/businesskit-agent"
|
|
16
|
+
},
|
|
17
|
+
"suggestedPrompts": [
|
|
18
|
+
"Draft a customer invoice for Acme Corp with 10 units of consulting",
|
|
19
|
+
"Restock inventory items from this supplier purchase invoice",
|
|
20
|
+
"Create a new landing page with hero, features, and pricing sections"
|
|
21
|
+
],
|
|
22
|
+
"keywords": [
|
|
23
|
+
"businesskit",
|
|
24
|
+
"mcp",
|
|
25
|
+
"billing",
|
|
26
|
+
"pos",
|
|
27
|
+
"invoicing",
|
|
28
|
+
"inventory",
|
|
29
|
+
"crm",
|
|
30
|
+
"website-builder"
|
|
31
|
+
]
|
|
32
|
+
}
|
package/scripts/setup.sh
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# scripts/setup.sh — Auto-configure BusinessKit MCP for any agentic CLI/IDE
|
|
3
|
+
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
ROOT_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
|
8
|
+
|
|
9
|
+
echo "=== BusinessKit Universal Agent Setup ==="
|
|
10
|
+
|
|
11
|
+
# 1. Locate BusinessKit binary
|
|
12
|
+
BK_BIN=""
|
|
13
|
+
if [ -n "$BUSINESSKIT_BIN" ] && [ -x "$BUSINESSKIT_BIN" ]; then
|
|
14
|
+
BK_BIN="$BUSINESSKIT_BIN"
|
|
15
|
+
elif [ -x "/Applications/BusinessKit.app/Contents/MacOS/businesskit" ]; then
|
|
16
|
+
BK_BIN="/Applications/BusinessKit.app/Contents/MacOS/businesskit"
|
|
17
|
+
elif [ -x "${ROOT_DIR}/../src-tauri/target/release/businesskit" ]; then
|
|
18
|
+
BK_BIN="$(cd "${ROOT_DIR}/../src-tauri/target/release" && pwd)/businesskit"
|
|
19
|
+
elif [ -x "${ROOT_DIR}/../src-tauri/target/debug/businesskit" ]; then
|
|
20
|
+
BK_BIN="$(cd "${ROOT_DIR}/../src-tauri/target/debug" && pwd)/businesskit"
|
|
21
|
+
elif command -v businesskit >/dev/null 2>&1; then
|
|
22
|
+
BK_BIN="$(command -v businesskit)"
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
if [ -z "$BK_BIN" ]; then
|
|
26
|
+
echo "Error: Could not locate BusinessKit binary."
|
|
27
|
+
echo "Please install BusinessKit or set BUSINESSKIT_BIN=/path/to/binary"
|
|
28
|
+
exit 1
|
|
29
|
+
fi
|
|
30
|
+
echo "✓ Found binary: $BK_BIN"
|
|
31
|
+
|
|
32
|
+
# 2. Discover available profiles
|
|
33
|
+
CREDS_DIR="${HOME}/.businesskit/creds"
|
|
34
|
+
PROFILES=()
|
|
35
|
+
|
|
36
|
+
if [ -d "$CREDS_DIR" ]; then
|
|
37
|
+
for f in "${CREDS_DIR}"/userdb_*.dat; do
|
|
38
|
+
if [ -f "$f" ]; then
|
|
39
|
+
pid=$(basename "$f" | sed -e 's/^userdb_//' -e 's/\.dat$//')
|
|
40
|
+
PROFILES+=("$pid")
|
|
41
|
+
fi
|
|
42
|
+
done
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
CONFIGURE_ALL=false
|
|
46
|
+
SELECTED_PROFILE=""
|
|
47
|
+
|
|
48
|
+
if [ "$1" = "--all" ]; then
|
|
49
|
+
CONFIGURE_ALL=true
|
|
50
|
+
if [ "${#PROFILES[@]}" -gt 0 ]; then
|
|
51
|
+
SELECTED_PROFILE="${PROFILES[0]}"
|
|
52
|
+
fi
|
|
53
|
+
elif [ -n "$1" ]; then
|
|
54
|
+
SELECTED_PROFILE="$1"
|
|
55
|
+
elif [ -n "$BUSINESSKIT_PROFILE" ]; then
|
|
56
|
+
SELECTED_PROFILE="$BUSINESSKIT_PROFILE"
|
|
57
|
+
elif [ "${#PROFILES[@]}" -gt 0 ]; then
|
|
58
|
+
SELECTED_PROFILE="${PROFILES[0]}"
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
if [ "${#PROFILES[@]}" -gt 0 ]; then
|
|
62
|
+
echo "✓ Discovered ${#PROFILES[@]} organization profile(s):"
|
|
63
|
+
for p in "${PROFILES[@]}"; do
|
|
64
|
+
if [ "$p" = "$SELECTED_PROFILE" ]; then
|
|
65
|
+
echo " * $p (primary selection)"
|
|
66
|
+
else
|
|
67
|
+
echo " $p"
|
|
68
|
+
fi
|
|
69
|
+
done
|
|
70
|
+
fi
|
|
71
|
+
|
|
72
|
+
if [ -n "$SELECTED_PROFILE" ]; then
|
|
73
|
+
echo "✓ Selected primary profile: $SELECTED_PROFILE"
|
|
74
|
+
MCP_ARGS='["--mcp", "--profile", "'"${SELECTED_PROFILE}"'"]'
|
|
75
|
+
else
|
|
76
|
+
echo "✓ Using active BusinessKit profile"
|
|
77
|
+
MCP_ARGS='["--mcp"]'
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
# Build JSON server map
|
|
81
|
+
build_mcp_servers_json() {
|
|
82
|
+
local is_vscode="${1:-false}"
|
|
83
|
+
local json="{"
|
|
84
|
+
|
|
85
|
+
# Default primary server
|
|
86
|
+
if [ "$is_vscode" = "true" ]; then
|
|
87
|
+
json="${json}\n \"businesskit\": {\n \"type\": \"stdio\",\n \"command\": \"${BK_BIN}\",\n \"args\": ${MCP_ARGS}\n }"
|
|
88
|
+
else
|
|
89
|
+
json="${json}\n \"businesskit\": {\n \"command\": \"${BK_BIN}\",\n \"args\": ${MCP_ARGS}\n }"
|
|
90
|
+
fi
|
|
91
|
+
|
|
92
|
+
# If CONFIGURE_ALL is true, add an entry for each profile
|
|
93
|
+
if [ "$CONFIGURE_ALL" = "true" ] && [ "${#PROFILES[@]}" -gt 1 ]; then
|
|
94
|
+
for p in "${PROFILES[@]}"; do
|
|
95
|
+
short_id="${p:0:8}"
|
|
96
|
+
server_name="businesskit-${short_id}"
|
|
97
|
+
p_args='["--mcp", "--profile", "'"${p}"'"]'
|
|
98
|
+
if [ "$is_vscode" = "true" ]; then
|
|
99
|
+
json="${json},\n \"${server_name}\": {\n \"type\": \"stdio\",\n \"command\": \"${BK_BIN}\",\n \"args\": ${p_args}\n }"
|
|
100
|
+
else
|
|
101
|
+
json="${json},\n \"${server_name}\": {\n \"command\": \"${BK_BIN}\",\n \"args\": ${p_args}\n }"
|
|
102
|
+
fi
|
|
103
|
+
done
|
|
104
|
+
fi
|
|
105
|
+
|
|
106
|
+
json="${json}\n }"
|
|
107
|
+
echo -e "$json"
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
# 3. Create output directory
|
|
111
|
+
mkdir -p "${ROOT_DIR}/output"
|
|
112
|
+
|
|
113
|
+
# 4. Generate Claude Code configuration (.mcp.json)
|
|
114
|
+
SERVERS_JSON=$(build_mcp_servers_json false)
|
|
115
|
+
cat <<EOF > "${ROOT_DIR}/.mcp.json"
|
|
116
|
+
{
|
|
117
|
+
"mcpServers": ${SERVERS_JSON}
|
|
118
|
+
}
|
|
119
|
+
EOF
|
|
120
|
+
echo "✓ Generated Claude Code config: ${ROOT_DIR}/.mcp.json"
|
|
121
|
+
|
|
122
|
+
# 5. Generate Cursor configuration (.cursor/mcp.json)
|
|
123
|
+
mkdir -p "${ROOT_DIR}/.cursor"
|
|
124
|
+
cat <<EOF > "${ROOT_DIR}/.cursor/mcp.json"
|
|
125
|
+
{
|
|
126
|
+
"mcpServers": ${SERVERS_JSON}
|
|
127
|
+
}
|
|
128
|
+
EOF
|
|
129
|
+
echo "✓ Generated Cursor config: ${ROOT_DIR}/.cursor/mcp.json"
|
|
130
|
+
|
|
131
|
+
# 6. Generate VS Code configuration (.vscode/mcp.json)
|
|
132
|
+
VSCODE_SERVERS_JSON=$(build_mcp_servers_json true)
|
|
133
|
+
mkdir -p "${ROOT_DIR}/.vscode"
|
|
134
|
+
cat <<EOF > "${ROOT_DIR}/.vscode/mcp.json"
|
|
135
|
+
{
|
|
136
|
+
"servers": ${VSCODE_SERVERS_JSON}
|
|
137
|
+
}
|
|
138
|
+
EOF
|
|
139
|
+
echo "✓ Generated VS Code config: ${ROOT_DIR}/.vscode/mcp.json"
|
|
140
|
+
|
|
141
|
+
# 7. Generate Gemini / Antigravity settings
|
|
142
|
+
mkdir -p "${ROOT_DIR}/.gemini"
|
|
143
|
+
cat <<EOF > "${ROOT_DIR}/.gemini/mcp_config.json"
|
|
144
|
+
{
|
|
145
|
+
"mcpServers": ${SERVERS_JSON}
|
|
146
|
+
}
|
|
147
|
+
EOF
|
|
148
|
+
echo "✓ Generated Antigravity / Gemini config: ${ROOT_DIR}/.gemini/mcp_config.json"
|
|
149
|
+
|
|
150
|
+
# 8. Register with Antigravity CLI if agy is in PATH
|
|
151
|
+
if command -v agy >/dev/null 2>&1; then
|
|
152
|
+
echo "Registering with Antigravity CLI (agy)..."
|
|
153
|
+
agy mcp add businesskit "${BK_BIN}" --mcp --profile "${SELECTED_PROFILE}" 2>/dev/null || true
|
|
154
|
+
fi
|
|
155
|
+
|
|
156
|
+
echo ""
|
|
157
|
+
echo "=== Setup Complete! ==="
|
|
158
|
+
echo "You can now run BusinessKit from any agentic CLI in this workspace:"
|
|
159
|
+
echo " - Antigravity / Gemini CLI"
|
|
160
|
+
echo " - Cursor (open this directory in Cursor)"
|
|
161
|
+
echo " - Claude Code (run 'claude' in this directory)"
|
|
162
|
+
echo " - VS Code Copilot"
|
|
163
|
+
|
|
164
|
+
if [ "$CONFIGURE_ALL" = "false" ] && [ "${#PROFILES[@]}" -gt 1 ]; then
|
|
165
|
+
echo ""
|
|
166
|
+
echo "Multi-Profile Parallel Operations:"
|
|
167
|
+
echo " - To switch profile inside a running session: call 'profile_switch(profile_id=\"...\")'"
|
|
168
|
+
echo " - To configure all discovered profiles as dedicated parallel servers: run './scripts/setup.sh --all'"
|
|
169
|
+
fi
|
package/scripts/setup.ts
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// scripts/setup.ts — Node/TypeScript BusinessKit MCP Setup Wizard
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { execSync } from 'node:child_process';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = path.dirname(__filename);
|
|
9
|
+
const ROOT_DIR = path.resolve(__dirname, '..');
|
|
10
|
+
|
|
11
|
+
console.log('=== BusinessKit Universal Agent Setup (TypeScript) ===');
|
|
12
|
+
|
|
13
|
+
// 1. Locate binary
|
|
14
|
+
let bkBin = process.env.BUSINESSKIT_BIN || '';
|
|
15
|
+
const candidates = [
|
|
16
|
+
'/Applications/BusinessKit.app/Contents/MacOS/businesskit',
|
|
17
|
+
path.resolve(ROOT_DIR, '../src-tauri/target/release/businesskit'),
|
|
18
|
+
path.resolve(ROOT_DIR, '../src-tauri/target/debug/businesskit'),
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
if (!bkBin) {
|
|
22
|
+
for (const c of candidates) {
|
|
23
|
+
if (fs.existsSync(c)) {
|
|
24
|
+
bkBin = c;
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (!bkBin) {
|
|
31
|
+
try {
|
|
32
|
+
bkBin = execSync('which businesskit', { encoding: 'utf8' }).trim();
|
|
33
|
+
} catch {}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (!bkBin || !fs.existsSync(bkBin)) {
|
|
37
|
+
console.error('Error: BusinessKit binary not found. Set BUSINESSKIT_BIN=/path/to/binary');
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
console.log(`✓ Found binary: ${bkBin}`);
|
|
41
|
+
|
|
42
|
+
// 2. Locate Profiles
|
|
43
|
+
const credsDir = path.join(process.env.HOME || '', '.businesskit/creds');
|
|
44
|
+
const arg = process.argv[2] || '';
|
|
45
|
+
const configureAll = arg === '--all';
|
|
46
|
+
let discoveredProfiles: string[] = [];
|
|
47
|
+
|
|
48
|
+
if (fs.existsSync(credsDir)) {
|
|
49
|
+
discoveredProfiles = fs
|
|
50
|
+
.readdirSync(credsDir)
|
|
51
|
+
.filter((f) => f.startsWith('userdb_') && f.endsWith('.dat'))
|
|
52
|
+
.map((f) => f.replace(/^userdb_/, '').replace(/\.dat$/, ''));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
let selectedProfile = !configureAll && arg ? arg : process.env.BUSINESSKIT_PROFILE || '';
|
|
56
|
+
if (!selectedProfile && discoveredProfiles.length > 0) {
|
|
57
|
+
selectedProfile = discoveredProfiles[0];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (discoveredProfiles.length > 0) {
|
|
61
|
+
console.log(`✓ Discovered ${discoveredProfiles.length} organization profile(s):`);
|
|
62
|
+
for (const p of discoveredProfiles) {
|
|
63
|
+
console.log(p === selectedProfile ? ` * ${p} (primary selection)` : ` ${p}`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const primaryArgs = selectedProfile ? ['--mcp', '--profile', selectedProfile] : ['--mcp'];
|
|
68
|
+
console.log(selectedProfile ? `✓ Target profile: ${selectedProfile}` : '✓ Using active BusinessKit profile');
|
|
69
|
+
|
|
70
|
+
// Build MCP servers dictionary
|
|
71
|
+
const mcpServers: Record<string, { command: string; args: string[] }> = {
|
|
72
|
+
businesskit: {
|
|
73
|
+
command: bkBin,
|
|
74
|
+
args: primaryArgs,
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const vscodeServers: Record<string, { type: string; command: string; args: string[] }> = {
|
|
79
|
+
businesskit: {
|
|
80
|
+
type: 'stdio',
|
|
81
|
+
command: bkBin,
|
|
82
|
+
args: primaryArgs,
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
if (configureAll && discoveredProfiles.length > 1) {
|
|
87
|
+
for (const p of discoveredProfiles) {
|
|
88
|
+
const shortId = p.slice(0, 8);
|
|
89
|
+
const sName = `businesskit-${shortId}`;
|
|
90
|
+
const pArgs = ['--mcp', '--profile', p];
|
|
91
|
+
mcpServers[sName] = { command: bkBin, args: pArgs };
|
|
92
|
+
vscodeServers[sName] = { type: 'stdio', command: bkBin, args: pArgs };
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// 3. Output directory
|
|
97
|
+
const outputDir = path.join(ROOT_DIR, 'output');
|
|
98
|
+
if (!fs.existsSync(outputDir)) fs.mkdirSync(outputDir, { recursive: true });
|
|
99
|
+
|
|
100
|
+
// 4. Claude Code (.mcp.json)
|
|
101
|
+
const claudeConfig = { mcpServers };
|
|
102
|
+
fs.writeFileSync(path.join(ROOT_DIR, '.mcp.json'), JSON.stringify(claudeConfig, null, 2));
|
|
103
|
+
console.log('✓ Wrote .mcp.json (Claude Code)');
|
|
104
|
+
|
|
105
|
+
// 5. Cursor (.cursor/mcp.json)
|
|
106
|
+
const cursorDir = path.join(ROOT_DIR, '.cursor');
|
|
107
|
+
if (!fs.existsSync(cursorDir)) fs.mkdirSync(cursorDir, { recursive: true });
|
|
108
|
+
fs.writeFileSync(path.join(cursorDir, 'mcp.json'), JSON.stringify(claudeConfig, null, 2));
|
|
109
|
+
console.log('✓ Wrote .cursor/mcp.json (Cursor)');
|
|
110
|
+
|
|
111
|
+
// 6. VS Code (.vscode/mcp.json)
|
|
112
|
+
const vscodeDir = path.join(ROOT_DIR, '.vscode');
|
|
113
|
+
if (!fs.existsSync(vscodeDir)) fs.mkdirSync(vscodeDir, { recursive: true });
|
|
114
|
+
const vscodeConfig = { servers: vscodeServers };
|
|
115
|
+
fs.writeFileSync(path.join(vscodeDir, 'mcp.json'), JSON.stringify(vscodeConfig, null, 2));
|
|
116
|
+
console.log('✓ Wrote .vscode/mcp.json (VS Code)');
|
|
117
|
+
|
|
118
|
+
// 7. Antigravity (.gemini/mcp_config.json)
|
|
119
|
+
const geminiDir = path.join(ROOT_DIR, '.gemini');
|
|
120
|
+
if (!fs.existsSync(geminiDir)) fs.mkdirSync(geminiDir, { recursive: true });
|
|
121
|
+
fs.writeFileSync(path.join(geminiDir, 'mcp_config.json'), JSON.stringify(claudeConfig, null, 2));
|
|
122
|
+
console.log('✓ Wrote .gemini/mcp_config.json (Antigravity / Gemini)');
|
|
123
|
+
|
|
124
|
+
console.log('\n=== Ready! Launch any agentic CLI to interact with BusinessKit ===');
|
|
125
|
+
if (!configureAll && discoveredProfiles.length > 1) {
|
|
126
|
+
console.log('\nMulti-Profile Parallel Operations:');
|
|
127
|
+
console.log(' - To switch profile inside a running session: call profile_switch(profile_id="...")');
|
|
128
|
+
console.log(' - To configure all discovered profiles as dedicated parallel servers: run ts-node scripts/setup.ts --all');
|
|
129
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# scripts/update.sh — Safely update BusinessKit Agent to latest release without touching user context, memory, or custom skills
|
|
3
|
+
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
ROOT_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
|
8
|
+
|
|
9
|
+
echo "=== Updating BusinessKit Agent ==="
|
|
10
|
+
|
|
11
|
+
# 1. Snapshot user custom context in memory/temp folder
|
|
12
|
+
TEMP_BACKUP="$(mktemp -d)"
|
|
13
|
+
if [ -d "${ROOT_DIR}/context" ]; then
|
|
14
|
+
mkdir -p "${TEMP_BACKUP}/context"
|
|
15
|
+
cp -r "${ROOT_DIR}/context/"* "${TEMP_BACKUP}/context/" 2>/dev/null || true
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
# 2. Update repository files
|
|
19
|
+
if [ -d "${ROOT_DIR}/.git" ]; then
|
|
20
|
+
echo "✓ Found git repository. Fetching latest release from GitHub..."
|
|
21
|
+
git -C "${ROOT_DIR}" fetch --depth 1 origin main
|
|
22
|
+
git -C "${ROOT_DIR}" reset --hard FETCH_HEAD
|
|
23
|
+
else
|
|
24
|
+
echo "✓ Downloading latest release from GitHub..."
|
|
25
|
+
curl -sL "https://github.com/businesskitai/businesskit-agent/archive/refs/heads/main.tar.gz" | tar -xz -C "${TEMP_BACKUP}"
|
|
26
|
+
EXTRACTED_DIR=$(find "${TEMP_BACKUP}" -maxdepth 1 -name "businesskit-agent-*" | head -n 1)
|
|
27
|
+
if [ -n "$EXTRACTED_DIR" ]; then
|
|
28
|
+
cp -r "${EXTRACTED_DIR}/commands" "${ROOT_DIR}/"
|
|
29
|
+
cp -r "${EXTRACTED_DIR}/skills" "${ROOT_DIR}/"
|
|
30
|
+
cp -r "${EXTRACTED_DIR}/rules" "${ROOT_DIR}/" 2>/dev/null || true
|
|
31
|
+
cp "${EXTRACTED_DIR}/AGENTS.md" "${ROOT_DIR}/"
|
|
32
|
+
cp "${EXTRACTED_DIR}/CLAUDE.md" "${ROOT_DIR}/"
|
|
33
|
+
cp "${EXTRACTED_DIR}/GEMINI.md" "${ROOT_DIR}/"
|
|
34
|
+
cp "${EXTRACTED_DIR}/package.json" "${ROOT_DIR}/"
|
|
35
|
+
cp -r "${EXTRACTED_DIR}/bin" "${ROOT_DIR}/"
|
|
36
|
+
cp -r "${EXTRACTED_DIR}/scripts" "${ROOT_DIR}/"
|
|
37
|
+
fi
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
# 3. Restore user personalized context files (business, brand, voice)
|
|
41
|
+
if [ -d "${TEMP_BACKUP}/context" ]; then
|
|
42
|
+
echo "✓ Restoring your personalized context files (business.md, brand.md, brand-voice.md)..."
|
|
43
|
+
cp -r "${TEMP_BACKUP}/context/"* "${ROOT_DIR}/context/" 2>/dev/null || true
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
rm -rf "${TEMP_BACKUP}"
|
|
47
|
+
|
|
48
|
+
# 4. Refresh MCP configurations & links
|
|
49
|
+
if [ -f "${ROOT_DIR}/scripts/setup.sh" ]; then
|
|
50
|
+
bash "${ROOT_DIR}/scripts/setup.sh" "$@"
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
echo ""
|
|
54
|
+
echo "=== Update Complete! ==="
|
|
55
|
+
echo "✓ All commands, modular skills, and rules updated to the latest upstream release."
|
|
56
|
+
echo "✓ Your personalized context, memory logs, and custom skills were 100% preserved."
|
package/server.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.businesskitai/agent",
|
|
4
|
+
"title": "BusinessKit Agent",
|
|
5
|
+
"description": "Official BusinessKit MCP server: POS, invoicing, inventory restock, CRM, and website publishing via Model Context Protocol.",
|
|
6
|
+
"repository": {
|
|
7
|
+
"url": "https://github.com/businesskitai/businesskit-agent",
|
|
8
|
+
"source": "github"
|
|
9
|
+
},
|
|
10
|
+
"version": "1.0.7",
|
|
11
|
+
"packages": [
|
|
12
|
+
{
|
|
13
|
+
"registryType": "npm",
|
|
14
|
+
"identifier": "@businesskit/agent",
|
|
15
|
+
"version": "1.0.7",
|
|
16
|
+
"transport": {
|
|
17
|
+
"type": "stdio"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
package/skills/README.md
CHANGED
|
@@ -1,33 +1,26 @@
|
|
|
1
|
-
#
|
|
1
|
+
# BusinessKit Agent Skills
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Declarative workflow skills that guide agents in using BusinessKit's native Model Context Protocol (MCP) server.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
Each skill costs tokens. Unused skills waste money and bust the prompt cache.
|
|
5
|
+
Skills load on demand based on task context—never load all skills simultaneously.
|
|
7
6
|
|
|
8
|
-
##
|
|
7
|
+
## Domain Workflow Skills (MCP Tools)
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
| Skill | Directory | Core MCP Tools | Purpose |
|
|
10
|
+
| :--- | :--- | :--- | :--- |
|
|
11
|
+
| **Universal CMS** | `cms/` | `blog_post_create`, `content_list`, `content_get`, `content_update` | Blog posts, newsletters, guides, notes, and custom hubs with universal TipTap HTML blocks. |
|
|
12
|
+
| **Docs & Knowledge Base** | `docs/` | `blog_post_create`, `content_list`, `content_get`, `content_update` | Technical documentation, nested collection hierarchy, and knowledge base articles (`cat_32`). |
|
|
13
|
+
| **Visual Pages** | `pages/` | `page_create`, `page_get`, `page_update`, `page_publish`, `page_list`, `component_create`, `component_list`, `component_get`, `page_get_section_schema` | Storefront and landing pages using native modular sections and custom components. |
|
|
14
|
+
| **Billing & POS** | `billing/` | `shop_create_new_bill`, `invoice_create`, `invoice_send` | Rapid POS sales receipts, handwritten bill parsing, and B2B invoices. |
|
|
15
|
+
| **Inventory** | `inventory/` | `inventory_receive_purchase_invoice`, `inventory_add_stock`, `inventory_get_levels` | Supplier purchase bills, automated restocking, stock adjustments, and moving average cost. |
|
|
16
|
+
| **CRM** | `crm/` | `contact_create`, `contact_update` | Customer, client, and vendor directory management and tagging. |
|
|
17
|
+
| **Inbox** | `inbox/` | `inbox_tool_set_category`, `inbox_tool_draft_reply`, `inbox_tool_schedule_send` | Email/DM triage, prompt-injection screening, draft replies, and approval gates. |
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Content Craft & Brand Skills
|
|
20
20
|
|
|
21
|
-
|
|
|
22
|
-
|
|
23
|
-
| `brand
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `schema.md` | DB queries, table structure questions |
|
|
28
|
-
|
|
29
|
-
## Never load
|
|
30
|
-
|
|
31
|
-
- All skills at once
|
|
32
|
-
- A skill "just in case"
|
|
33
|
-
- Skills for tasks the user didn't ask for
|
|
21
|
+
| Skill | Directory | Purpose |
|
|
22
|
+
| :--- | :--- | :--- |
|
|
23
|
+
| **Brand Identity** | `brand/` | Calibrate brand voice, tone compass, and store context via `system_get_capabilities`. |
|
|
24
|
+
| **Humanizer** | `humanizer/` | De-AI patterns, remove repetitive AI writing signatures, and restore genuine human voice. |
|
|
25
|
+
| **Copywriting** | `copywriting/` | High-converting sales page copywriting with internal hostile validation. |
|
|
26
|
+
| **Social Content** | `social/` | Multi-platform social copy, thread creation, and engagement optimization. |
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: billing
|
|
3
|
+
description: Issue invoices, create walk-in POS bills, record payments, and reconcile accounts using double-entry verified tools.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Billing, POS & Invoicing Skill
|
|
7
|
+
|
|
8
|
+
Use this skill when billing customers, generating B2B invoices, or reviewing sales documents.
|
|
9
|
+
|
|
10
|
+
## 1. Operating Rules & Constraints
|
|
11
|
+
|
|
12
|
+
- **Double-Entry Guarantees**:
|
|
13
|
+
- Never write directly to financial ledger tables (`fin_journal_entries`, `fin_accounts`).
|
|
14
|
+
- Tools automatically compute debits, credits, and tax rates.
|
|
15
|
+
- **Drafts First**:
|
|
16
|
+
- Invoices must be drafted first for human review before transmission. Call `invoice_create`, then prompt the user to review and send with `invoice_send`.
|
|
17
|
+
- **Line Items**:
|
|
18
|
+
- Always provide item name or SKU, quantity, unit price, and optional tax or discount.
|
|
19
|
+
|
|
20
|
+
## 2. Tool Workflows
|
|
21
|
+
|
|
22
|
+
### A. Walk-in POS Sale
|
|
23
|
+
Call `shop_create_new_bill` to instantly record a retail sale, decrement inventory, and post ledger records:
|
|
24
|
+
```json
|
|
25
|
+
call_tool("shop_create_new_bill", {
|
|
26
|
+
"customer_name": "Walk-in Customer",
|
|
27
|
+
"payment_method": "cash",
|
|
28
|
+
"payment_status": "confirmed",
|
|
29
|
+
"line_items": [
|
|
30
|
+
{
|
|
31
|
+
"item_name": "Tellzy 40 Tab",
|
|
32
|
+
"quantity": 2,
|
|
33
|
+
"unit_price": 500.00,
|
|
34
|
+
"discount_pct": 10.0
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
})
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### B. Create Formal B2B Invoice
|
|
41
|
+
Call `invoice_create` to generate an itemized invoice draft:
|
|
42
|
+
```json
|
|
43
|
+
call_tool("invoice_create", {
|
|
44
|
+
"customer_id": "Acme Corp",
|
|
45
|
+
"due_date": "2026-12-15",
|
|
46
|
+
"line_items": [
|
|
47
|
+
{
|
|
48
|
+
"name": "Consulting Services",
|
|
49
|
+
"quantity": 10,
|
|
50
|
+
"unit_price": 150.00,
|
|
51
|
+
"tax_rate": 18.0
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
})
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### C. Send Finalized Invoice
|
|
58
|
+
Dispatch invoice to client via email or generate a shareable payment link:
|
|
59
|
+
```json
|
|
60
|
+
call_tool("invoice_send", {
|
|
61
|
+
"invoice_id": "inv_8941",
|
|
62
|
+
"recipient_email": "billing@acme.com"
|
|
63
|
+
})
|
|
64
|
+
```
|