@businesskit/agent 1.0.5 → 1.0.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.
Files changed (83) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.cursor-plugin/plugin.json +1 -1
  4. package/.superconsole-plugin/plugin.json +61 -31
  5. package/AGENTS.md +33 -15
  6. package/README.md +101 -113
  7. package/bin/businesskit.js +47 -8
  8. package/commands/brief.md +12 -0
  9. package/commands/chase.md +12 -0
  10. package/commands/competitors.md +12 -0
  11. package/commands/create-page.md +43 -15
  12. package/commands/crm.md +13 -0
  13. package/commands/drafts.md +12 -0
  14. package/commands/followups.md +13 -0
  15. package/commands/inbox-rules.md +12 -0
  16. package/commands/inbox.md +13 -0
  17. package/commands/otp.md +12 -0
  18. package/commands/pipeline.md +13 -0
  19. package/commands/post.md +12 -0
  20. package/commands/reply.md +12 -0
  21. package/commands/repurpose.md +12 -0
  22. package/commands/social-analytics.md +12 -0
  23. package/commands/social-inbox.md +12 -0
  24. package/commands/social-reply.md +12 -0
  25. package/commands/social.md +12 -0
  26. package/commands/triage.md +12 -0
  27. package/commands/update-agent.md +33 -0
  28. package/commands/update-content.md +1 -0
  29. package/commands/update-page.md +3 -2
  30. package/commands/write-blog.md +4 -0
  31. package/commands/write-docs.md +6 -0
  32. package/commands/write-guide.md +5 -0
  33. package/commands/write-newsletter.md +4 -0
  34. package/dist/server.js +7513 -0
  35. package/mcp_config.json +6 -2
  36. package/package.json +25 -5
  37. package/plugin.json +1 -1
  38. package/scripts/release.js +200 -0
  39. package/scripts/setup.sh +70 -35
  40. package/scripts/setup.ts +58 -21
  41. package/scripts/update.sh +56 -0
  42. package/server.json +3 -3
  43. package/skills/README.md +3 -2
  44. package/skills/cms/SKILL.md +111 -0
  45. package/skills/cms/references/cms-hubs.md +84 -0
  46. package/skills/cms/references/html-blocks.md +177 -0
  47. package/skills/crm/SKILL.md +15 -29
  48. package/skills/docs/SKILL.md +65 -0
  49. package/skills/docs/references/how-to.md +155 -0
  50. package/skills/inbox/SKILL.md +32 -40
  51. package/skills/pages/SKILL.md +62 -17
  52. package/skills/pages/references/sections-catalog.json +377 -144
  53. package/skills/social/SKILL.md +83 -210
  54. package/skills/social/evals/evals.json +66 -0
  55. package/skills/social/evals/rubric.md +26 -0
  56. package/skills/social/examples/repurposing-blog-to-social.md +93 -0
  57. package/skills/social/examples/weekly-content-calendar.md +30 -0
  58. package/skills/social/linkedin/SKILL.md +107 -0
  59. package/skills/social/linkedin/evals/evals.json +106 -0
  60. package/skills/social/linkedin/evals/rubric.md +28 -0
  61. package/skills/social/linkedin/examples/gasp-weekly-sprint.md +24 -0
  62. package/skills/social/linkedin/examples/growth-posts-by-format.md +140 -0
  63. package/skills/social/linkedin/references/gasp-funnel-and-calibration.md +90 -0
  64. package/skills/social/linkedin/references/six-growth-formats.md +114 -0
  65. package/skills/social/references/platforms.md +76 -0
  66. package/skills/social/references/post-templates.md +105 -0
  67. package/skills/social/references/reverse-engineering.md +62 -0
  68. package/src/data/sections-catalog.json +950 -0
  69. package/src/db.ts +181 -0
  70. package/src/server.ts +119 -0
  71. package/src/tools/content.ts +326 -0
  72. package/src/tools/crm.ts +1416 -0
  73. package/src/tools/domains.ts +89 -0
  74. package/src/tools/inbox.ts +1400 -0
  75. package/src/tools/index.ts +138 -0
  76. package/src/tools/pages.ts +1217 -0
  77. package/src/tools/shop.ts +771 -0
  78. package/src/tools/social.ts +2131 -0
  79. package/src/tools/system.ts +96 -0
  80. package/src/tools/types.ts +17 -0
  81. package/src/worker-tick.ts +394 -0
  82. package/skills/docs-cms/SKILL.md +0 -53
  83. package/skills/docs-cms/references/how-to.md +0 -383
package/mcp_config.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "mcpServers": {
3
3
  "businesskit": {
4
- "command": "businesskit",
5
- "args": ["--mcp"]
4
+ "command": "node",
5
+ "args": ["bin/businesskit.js"],
6
+ "env": {
7
+ "TURSO_DATABASE_URL": "${TURSO_DATABASE_URL}",
8
+ "TURSO_AUTH_TOKEN": "${TURSO_AUTH_TOKEN}"
9
+ }
6
10
  }
7
11
  }
8
12
  }
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@businesskit/agent",
3
- "version": "1.0.5",
4
- "description": "Universal BusinessKit Agent Kit — Antigravity, Cursor, Claude Code, VS Code, and Gemini CLI via BusinessKit native MCP tools.",
3
+ "version": "1.0.8",
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",
6
9
  "mcpName": "io.github.businesskitai/agent",
7
10
  "bin": {
8
11
  "bk": "bin/businesskit.js",
@@ -10,6 +13,8 @@
10
13
  },
11
14
  "files": [
12
15
  "bin",
16
+ "dist",
17
+ "src",
13
18
  "commands",
14
19
  "skills",
15
20
  "templates",
@@ -30,8 +35,15 @@
30
35
  ".superconsole-plugin"
31
36
  ],
32
37
  "scripts": {
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
+ "test": "tsx --test test/inbox-contract.test.ts test/social-contract.test.ts",
33
42
  "setup": "bash ./scripts/setup.sh",
34
- "setup:ts": "npx tsx scripts/setup.ts"
43
+ "setup:ts": "npx tsx scripts/setup.ts",
44
+ "update": "bash ./scripts/update.sh",
45
+ "release": "node scripts/release.js",
46
+ "prepack": "npm run build"
35
47
  },
36
48
  "keywords": [
37
49
  "claude-code",
@@ -40,12 +52,15 @@
40
52
  "cursor",
41
53
  "mcp",
42
54
  "model-context-protocol",
55
+ "mcp-server",
43
56
  "ai-agent",
44
57
  "business-agent",
45
- "businesskit"
58
+ "businesskit",
59
+ "turso"
46
60
  ],
47
61
  "devDependencies": {
48
62
  "@types/node": "^22.0.0",
63
+ "esbuild": "^0.27.4",
49
64
  "tsx": "^4.19.0",
50
65
  "typescript": "^5.4.5"
51
66
  },
@@ -57,5 +72,10 @@
57
72
  "url": "git+https://github.com/businesskitai/businesskit-agent.git"
58
73
  },
59
74
  "homepage": "https://github.com/businesskitai/businesskit-agent#readme",
60
- "license": "MIT"
75
+ "license": "MIT",
76
+ "dependencies": {
77
+ "@libsql/client": "^0.18.0",
78
+ "@modelcontextprotocol/sdk": "^1.32.2",
79
+ "dotenv": "^18.0.10"
80
+ }
61
81
  }
package/plugin.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://antigravity.google/schemas/v1/plugin.json",
3
3
  "name": "businesskit",
4
4
  "displayName": "BusinessKit",
5
- "version": "1.0.5",
5
+ "version": "1.0.8",
6
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
7
  "logo": "assets/logo.svg",
8
8
  "author": {
@@ -0,0 +1,200 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * BusinessKit Agent — Release & Version Bump Automation
4
+ *
5
+ * Usage:
6
+ * node scripts/release.js <new-version|patch|minor|major> [--push] [--skip-build]
7
+ *
8
+ * Examples:
9
+ * node scripts/release.js 1.0.8
10
+ * node scripts/release.js 1.0.8 --push
11
+ * node scripts/release.js patch --push
12
+ */
13
+
14
+ import fs from 'node:fs';
15
+ import path from 'node:path';
16
+ import { execSync } from 'node:child_process';
17
+ import { fileURLToPath } from 'node:url';
18
+
19
+ const __filename = fileURLToPath(import.meta.url);
20
+ const __dirname = path.dirname(__filename);
21
+ const ROOT_DIR = path.resolve(__dirname, '..');
22
+
23
+ const args = process.argv.slice(2).filter((arg) => !arg.startsWith('--'));
24
+ const flags = new Set(process.argv.slice(2).filter((arg) => arg.startsWith('--')));
25
+
26
+ const shouldPush = flags.has('--push') || process.env.npm_config_push === 'true';
27
+ const skipBuild = flags.has('--skip-build') || process.env.npm_config_skip_build === 'true';
28
+
29
+ if (args.length === 0) {
30
+ console.error(`\x1b[31mError: Missing new version argument.\x1b[0m`);
31
+ console.log(`\nUsage:`);
32
+ console.log(` node scripts/release.js <new-version|patch|minor|major> [--push] [--skip-build]`);
33
+ console.log(`\nExample:`);
34
+ console.log(` node scripts/release.js 1.0.8 --push\n`);
35
+ process.exit(1);
36
+ }
37
+
38
+ const pkgPath = path.join(ROOT_DIR, 'package.json');
39
+ const currentPkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
40
+ const currentVersion = currentPkg.version;
41
+
42
+ function resolveVersion(input, current) {
43
+ const trimmed = input.trim();
44
+ if (trimmed === 'patch' || trimmed === 'minor' || trimmed === 'major') {
45
+ const parts = current.split('.').map((n) => parseInt(n, 10));
46
+ if (parts.length !== 3 || parts.some(Number.isNaN)) {
47
+ throw new Error(`Current version "${current}" is not valid semver`);
48
+ }
49
+ if (trimmed === 'major') return `${parts[0] + 1}.0.0`;
50
+ if (trimmed === 'minor') return `${parts[0]}.${parts[1] + 1}.0`;
51
+ return `${parts[0]}.${parts[1]}.${parts[2] + 1}`;
52
+ }
53
+ const clean = trimmed.startsWith('v') ? trimmed.slice(1) : trimmed;
54
+ if (!/^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/.test(clean)) {
55
+ throw new Error(`Invalid semver version "${input}"`);
56
+ }
57
+ return clean;
58
+ }
59
+
60
+ const newVersion = resolveVersion(args[0], currentVersion);
61
+ const newTag = `v${newVersion}`;
62
+
63
+ console.log(`\x1b[34m==============================================\x1b[0m`);
64
+ console.log(`\x1b[1;36m @businesskit/agent Version Bump: ${currentVersion} -> ${newTag}\x1b[0m`);
65
+ console.log(`\x1b[34m==============================================\x1b[0m\n`);
66
+
67
+ // 1. package.json
68
+ let pkgContent = fs.readFileSync(pkgPath, 'utf8');
69
+ pkgContent = pkgContent.replace(/"version":\s*"[^"]+"/, `"version": "${newVersion}"`);
70
+ fs.writeFileSync(pkgPath, pkgContent, 'utf8');
71
+ console.log(`\x1b[32m✓\x1b[0m package.json (${newVersion})`);
72
+
73
+ // 2. package-lock.json
74
+ const pkgLockPath = path.join(ROOT_DIR, 'package-lock.json');
75
+ if (fs.existsSync(pkgLockPath)) {
76
+ let pkgLockContent = fs.readFileSync(pkgLockPath, 'utf8');
77
+ let replacedCount = 0;
78
+ pkgLockContent = pkgLockContent.replace(/"version":\s*"[^"]+"/g, (match) => {
79
+ if (replacedCount < 2) {
80
+ replacedCount++;
81
+ return `"version": "${newVersion}"`;
82
+ }
83
+ return match;
84
+ });
85
+ fs.writeFileSync(pkgLockPath, pkgLockContent, 'utf8');
86
+ console.log(`\x1b[32m✓\x1b[0m package-lock.json (${newVersion})`);
87
+ }
88
+
89
+ // 3. server.json (MCP Registry manifest — top-level version & packages[].version)
90
+ const serverJsonPath = path.join(ROOT_DIR, 'server.json');
91
+ if (fs.existsSync(serverJsonPath)) {
92
+ const serverJson = JSON.parse(fs.readFileSync(serverJsonPath, 'utf8'));
93
+ serverJson.version = newVersion;
94
+ if (Array.isArray(serverJson.packages)) {
95
+ for (const pkg of serverJson.packages) {
96
+ if (pkg && typeof pkg === 'object' && 'version' in pkg) {
97
+ pkg.version = newVersion;
98
+ }
99
+ }
100
+ }
101
+ fs.writeFileSync(serverJsonPath, `${JSON.stringify(serverJson, null, 2)}\n`, 'utf8');
102
+ console.log(`\x1b[32m✓\x1b[0m server.json (${newVersion})`);
103
+ }
104
+
105
+ // 4. src/server.ts (MCP server handshake ServerInfo version)
106
+ const serverTsPath = path.join(ROOT_DIR, 'src', 'server.ts');
107
+ if (fs.existsSync(serverTsPath)) {
108
+ let serverTs = fs.readFileSync(serverTsPath, 'utf8');
109
+ serverTs = serverTs.replace(
110
+ /(name:\s*'io\.github\.businesskitai\/agent',\s*\n\s*version:\s*')[^']+(')/,
111
+ `$1${newVersion}$2`
112
+ );
113
+ fs.writeFileSync(serverTsPath, serverTs, 'utf8');
114
+ console.log(`\x1b[32m✓\x1b[0m src/server.ts (${newVersion})`);
115
+ }
116
+
117
+ // 5. plugin.json (Antigravity plugin manifest)
118
+ const pluginJsonPath = path.join(ROOT_DIR, 'plugin.json');
119
+ if (fs.existsSync(pluginJsonPath)) {
120
+ let content = fs.readFileSync(pluginJsonPath, 'utf8');
121
+ content = content.replace(/"version":\s*"[^"]+"/, `"version": "${newVersion}"`);
122
+ fs.writeFileSync(pluginJsonPath, content, 'utf8');
123
+ console.log(`\x1b[32m✓\x1b[0m plugin.json (${newVersion})`);
124
+ }
125
+
126
+ // 6. .cursor-plugin/plugin.json
127
+ const cursorPluginPath = path.join(ROOT_DIR, '.cursor-plugin', 'plugin.json');
128
+ if (fs.existsSync(cursorPluginPath)) {
129
+ let content = fs.readFileSync(cursorPluginPath, 'utf8');
130
+ content = content.replace(/"version":\s*"[^"]+"/, `"version": "${newVersion}"`);
131
+ fs.writeFileSync(cursorPluginPath, content, 'utf8');
132
+ console.log(`\x1b[32m✓\x1b[0m .cursor-plugin/plugin.json (${newVersion})`);
133
+ }
134
+
135
+ // 7. .claude-plugin/plugin.json
136
+ const claudePluginPath = path.join(ROOT_DIR, '.claude-plugin', 'plugin.json');
137
+ if (fs.existsSync(claudePluginPath)) {
138
+ let content = fs.readFileSync(claudePluginPath, 'utf8');
139
+ content = content.replace(/"version":\s*"[^"]+"/, `"version": "${newVersion}"`);
140
+ fs.writeFileSync(claudePluginPath, content, 'utf8');
141
+ console.log(`\x1b[32m✓\x1b[0m .claude-plugin/plugin.json (${newVersion})`);
142
+ }
143
+
144
+ // 8. .claude-plugin/marketplace.json
145
+ const claudeMarketplacePath = path.join(ROOT_DIR, '.claude-plugin', 'marketplace.json');
146
+ if (fs.existsSync(claudeMarketplacePath)) {
147
+ let content = fs.readFileSync(claudeMarketplacePath, 'utf8');
148
+ content = content.replace(/"version":\s*"[^"]+"/, `"version": "${newVersion}"`);
149
+ fs.writeFileSync(claudeMarketplacePath, content, 'utf8');
150
+ console.log(`\x1b[32m✓\x1b[0m .claude-plugin/marketplace.json (${newVersion})`);
151
+ }
152
+
153
+ // 9. .superconsole-plugin/plugin.json
154
+ const superconsolePluginPath = path.join(ROOT_DIR, '.superconsole-plugin', 'plugin.json');
155
+ if (fs.existsSync(superconsolePluginPath)) {
156
+ let content = fs.readFileSync(superconsolePluginPath, 'utf8');
157
+ content = content.replace(/"version":\s*"[^"]+"/, `"version": "${newVersion}"`);
158
+ fs.writeFileSync(superconsolePluginPath, content, 'utf8');
159
+ console.log(`\x1b[32m✓\x1b[0m .superconsole-plugin/plugin.json (${newVersion})`);
160
+ }
161
+
162
+ if (!skipBuild) {
163
+ console.log(`\n\x1b[33mRunning verification (tsc --noEmit, npm run build, npm test)...\x1b[0m`);
164
+ try {
165
+ console.log(` > npx tsc --noEmit`);
166
+ execSync('npx tsc --noEmit', { cwd: ROOT_DIR, stdio: 'inherit' });
167
+ console.log(` > npm run build (updates dist/server.js)`);
168
+ execSync('npm run build', { cwd: ROOT_DIR, stdio: 'inherit' });
169
+ console.log(` > npm test`);
170
+ execSync('npm test', { cwd: ROOT_DIR, stdio: 'inherit' });
171
+ console.log(`\x1b[32m✓\x1b[0m Verification passed successfully.\n`);
172
+ } catch (err) {
173
+ console.error(`\x1b[31mVerification failed! Please fix the errors before committing.\x1b[0m`);
174
+ process.exit(1);
175
+ }
176
+ } else {
177
+ console.log(`\x1b[33mSkipping verification builds (--skip-build specified).\x1b[0m\n`);
178
+ }
179
+
180
+ if (shouldPush) {
181
+ console.log(`\x1b[33mExecuting Git commit, tag, and push...\x1b[0m`);
182
+ execSync('git add .', { cwd: ROOT_DIR, stdio: 'inherit' });
183
+ const commitMsg = `chore(release): ${newTag}`;
184
+ execSync(`git commit -m "${commitMsg}"`, { cwd: ROOT_DIR, stdio: 'inherit' });
185
+ execSync(`git tag ${newTag}`, { cwd: ROOT_DIR, stdio: 'inherit' });
186
+ execSync('git push origin main', { cwd: ROOT_DIR, stdio: 'inherit' });
187
+ execSync(`git push origin ${newTag}`, { cwd: ROOT_DIR, stdio: 'inherit' });
188
+ console.log(`\n\x1b[1;32m🎉 Successfully released and pushed ${newTag} to origin!\x1b[0m\n`);
189
+ } else {
190
+ console.log(`\x1b[1;32m✓ All files updated successfully to ${newTag}.\x1b[0m`);
191
+ console.log(`\nNext steps to commit and push:\n`);
192
+ console.log(` git add .`);
193
+ console.log(` git commit -m "chore(release): ${newTag}"`);
194
+ console.log(` git tag ${newTag}`);
195
+ console.log(` git push origin main`);
196
+ console.log(` git push origin ${newTag}`);
197
+ console.log(`\nNext step to publish to npm (when authenticated):`);
198
+ console.log(` npm publish --access public`);
199
+ console.log(`\n(Or run with --push next time to automate git commit, tag, and push)\n`);
200
+ }
package/scripts/setup.sh CHANGED
@@ -32,7 +32,6 @@ echo "✓ Found binary: $BK_BIN"
32
32
  # 2. Discover available profiles
33
33
  CREDS_DIR="${HOME}/.businesskit/creds"
34
34
  PROFILES=()
35
- DEFAULT_PROFILE="4628a5b1-ac05-4156-9d76-04bbd71119a1" # BusinessKit profile
36
35
 
37
36
  if [ -d "$CREDS_DIR" ]; then
38
37
  for f in "${CREDS_DIR}"/userdb_*.dat; do
@@ -43,35 +42,79 @@ if [ -d "$CREDS_DIR" ]; then
43
42
  done
44
43
  fi
45
44
 
45
+ CONFIGURE_ALL=false
46
46
  SELECTED_PROFILE=""
47
- if [ -n "$1" ]; then
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
48
54
  SELECTED_PROFILE="$1"
49
- elif [ "${#PROFILES[@]}" -eq 1 ]; then
50
- SELECTED_PROFILE="${PROFILES[0]}"
51
- elif [ -f "${CREDS_DIR}/userdb_${DEFAULT_PROFILE}.dat" ]; then
52
- SELECTED_PROFILE="$DEFAULT_PROFILE"
55
+ elif [ -n "$BUSINESSKIT_PROFILE" ]; then
56
+ SELECTED_PROFILE="$BUSINESSKIT_PROFILE"
53
57
  elif [ "${#PROFILES[@]}" -gt 0 ]; then
54
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}"'"]'
55
75
  else
56
- echo "Warning: No cached profiles found in ~/.businesskit/creds/."
57
- echo "Defaulting to: $DEFAULT_PROFILE"
58
- SELECTED_PROFILE="$DEFAULT_PROFILE"
76
+ echo "✓ Using active BusinessKit profile"
77
+ MCP_ARGS='["--mcp"]'
59
78
  fi
60
79
 
61
- echo "✓ Selected profile: $SELECTED_PROFILE"
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
+ }
62
109
 
63
110
  # 3. Create output directory
64
111
  mkdir -p "${ROOT_DIR}/output"
65
112
 
66
113
  # 4. Generate Claude Code configuration (.mcp.json)
114
+ SERVERS_JSON=$(build_mcp_servers_json false)
67
115
  cat <<EOF > "${ROOT_DIR}/.mcp.json"
68
116
  {
69
- "mcpServers": {
70
- "businesskit": {
71
- "command": "${BK_BIN}",
72
- "args": ["--mcp", "--profile", "${SELECTED_PROFILE}"]
73
- }
74
- }
117
+ "mcpServers": ${SERVERS_JSON}
75
118
  }
76
119
  EOF
77
120
  echo "✓ Generated Claude Code config: ${ROOT_DIR}/.mcp.json"
@@ -80,27 +123,17 @@ echo "✓ Generated Claude Code config: ${ROOT_DIR}/.mcp.json"
80
123
  mkdir -p "${ROOT_DIR}/.cursor"
81
124
  cat <<EOF > "${ROOT_DIR}/.cursor/mcp.json"
82
125
  {
83
- "mcpServers": {
84
- "businesskit": {
85
- "command": "${BK_BIN}",
86
- "args": ["--mcp", "--profile", "${SELECTED_PROFILE}"]
87
- }
88
- }
126
+ "mcpServers": ${SERVERS_JSON}
89
127
  }
90
128
  EOF
91
129
  echo "✓ Generated Cursor config: ${ROOT_DIR}/.cursor/mcp.json"
92
130
 
93
131
  # 6. Generate VS Code configuration (.vscode/mcp.json)
132
+ VSCODE_SERVERS_JSON=$(build_mcp_servers_json true)
94
133
  mkdir -p "${ROOT_DIR}/.vscode"
95
134
  cat <<EOF > "${ROOT_DIR}/.vscode/mcp.json"
96
135
  {
97
- "servers": {
98
- "businesskit": {
99
- "type": "stdio",
100
- "command": "${BK_BIN}",
101
- "args": ["--mcp", "--profile", "${SELECTED_PROFILE}"]
102
- }
103
- }
136
+ "servers": ${VSCODE_SERVERS_JSON}
104
137
  }
105
138
  EOF
106
139
  echo "✓ Generated VS Code config: ${ROOT_DIR}/.vscode/mcp.json"
@@ -109,12 +142,7 @@ echo "✓ Generated VS Code config: ${ROOT_DIR}/.vscode/mcp.json"
109
142
  mkdir -p "${ROOT_DIR}/.gemini"
110
143
  cat <<EOF > "${ROOT_DIR}/.gemini/mcp_config.json"
111
144
  {
112
- "mcpServers": {
113
- "businesskit": {
114
- "command": "${BK_BIN}",
115
- "args": ["--mcp", "--profile", "${SELECTED_PROFILE}"]
116
- }
117
- }
145
+ "mcpServers": ${SERVERS_JSON}
118
146
  }
119
147
  EOF
120
148
  echo "✓ Generated Antigravity / Gemini config: ${ROOT_DIR}/.gemini/mcp_config.json"
@@ -132,3 +160,10 @@ echo " - Antigravity / Gemini CLI"
132
160
  echo " - Cursor (open this directory in Cursor)"
133
161
  echo " - Claude Code (run 'claude' in this directory)"
134
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 CHANGED
@@ -39,26 +39,66 @@ if (!bkBin || !fs.existsSync(bkBin)) {
39
39
  }
40
40
  console.log(`✓ Found binary: ${bkBin}`);
41
41
 
42
- // 2. Locate Profile
42
+ // 2. Locate Profiles
43
43
  const credsDir = path.join(process.env.HOME || '', '.businesskit/creds');
44
- const defaultProfile = '4628a5b1-ac05-4156-9d76-04bbd71119a1';
45
- let selectedProfile = process.argv[2] || defaultProfile;
44
+ const arg = process.argv[2] || '';
45
+ const configureAll = arg === '--all';
46
+ let discoveredProfiles: string[] = [];
46
47
 
47
- console.log(`✓ Target profile: ${selectedProfile}`);
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
+ }
48
95
 
49
96
  // 3. Output directory
50
97
  const outputDir = path.join(ROOT_DIR, 'output');
51
98
  if (!fs.existsSync(outputDir)) fs.mkdirSync(outputDir, { recursive: true });
52
99
 
53
100
  // 4. Claude Code (.mcp.json)
54
- const claudeConfig = {
55
- mcpServers: {
56
- businesskit: {
57
- command: bkBin,
58
- args: ['--mcp', '--profile', selectedProfile],
59
- },
60
- },
61
- };
101
+ const claudeConfig = { mcpServers };
62
102
  fs.writeFileSync(path.join(ROOT_DIR, '.mcp.json'), JSON.stringify(claudeConfig, null, 2));
63
103
  console.log('✓ Wrote .mcp.json (Claude Code)');
64
104
 
@@ -71,15 +111,7 @@ console.log('✓ Wrote .cursor/mcp.json (Cursor)');
71
111
  // 6. VS Code (.vscode/mcp.json)
72
112
  const vscodeDir = path.join(ROOT_DIR, '.vscode');
73
113
  if (!fs.existsSync(vscodeDir)) fs.mkdirSync(vscodeDir, { recursive: true });
74
- const vscodeConfig = {
75
- servers: {
76
- businesskit: {
77
- type: 'stdio',
78
- command: bkBin,
79
- args: ['--mcp', '--profile', selectedProfile],
80
- },
81
- },
82
- };
114
+ const vscodeConfig = { servers: vscodeServers };
83
115
  fs.writeFileSync(path.join(vscodeDir, 'mcp.json'), JSON.stringify(vscodeConfig, null, 2));
84
116
  console.log('✓ Wrote .vscode/mcp.json (VS Code)');
85
117
 
@@ -90,3 +122,8 @@ fs.writeFileSync(path.join(geminiDir, 'mcp_config.json'), JSON.stringify(claudeC
90
122
  console.log('✓ Wrote .gemini/mcp_config.json (Antigravity / Gemini)');
91
123
 
92
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 CHANGED
@@ -2,17 +2,17 @@
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.businesskitai/agent",
4
4
  "title": "BusinessKit Agent",
5
- "description": "Universal BusinessKit Agent Kit — operate billing & POS, inventory restocking, CRM contacts, customer support triage, and landing page publishing via local native BusinessKit MCP server.",
5
+ "description": "Official BusinessKit MCP server: POS, invoicing, inventory restock, CRM, and website publishing via Model Context Protocol.",
6
6
  "repository": {
7
7
  "url": "https://github.com/businesskitai/businesskit-agent",
8
8
  "source": "github"
9
9
  },
10
- "version": "1.0.5",
10
+ "version": "1.0.8",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "identifier": "@businesskit/agent",
15
- "version": "1.0.5",
15
+ "version": "1.0.8",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  }
package/skills/README.md CHANGED
@@ -8,8 +8,9 @@ Skills load on demand based on task context—never load all skills simultaneous
8
8
 
9
9
  | Skill | Directory | Core MCP Tools | Purpose |
10
10
  | :--- | :--- | :--- | :--- |
11
- | **Docs & CMS** | `docs-cms/` | `blog_post_create`, `content_list`, `content_get`, `content_update` | Technical docs, knowledge base articles, guides, and blog posts with TipTap semantic HTML. |
12
- | **Visual Pages** | `pages/` | `page_create`, `page_update`, `page_publish`, `component_create`, `page_get_section_schema` | Storefront and landing pages using native modular sections and custom components. |
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. |
13
14
  | **Billing & POS** | `billing/` | `shop_create_new_bill`, `invoice_create`, `invoice_send` | Rapid POS sales receipts, handwritten bill parsing, and B2B invoices. |
14
15
  | **Inventory** | `inventory/` | `inventory_receive_purchase_invoice`, `inventory_add_stock`, `inventory_get_levels` | Supplier purchase bills, automated restocking, stock adjustments, and moving average cost. |
15
16
  | **CRM** | `crm/` | `contact_create`, `contact_update` | Customer, client, and vendor directory management and tagging. |