@businesskit/agent 1.0.5 → 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.
Files changed (62) hide show
  1. package/.superconsole-plugin/plugin.json +61 -31
  2. package/AGENTS.md +20 -9
  3. package/README.md +101 -113
  4. package/bin/businesskit.js +41 -8
  5. package/commands/brief.md +12 -0
  6. package/commands/chase.md +12 -0
  7. package/commands/create-page.md +43 -15
  8. package/commands/crm.md +13 -0
  9. package/commands/followups.md +13 -0
  10. package/commands/pipeline.md +13 -0
  11. package/commands/update-agent.md +33 -0
  12. package/commands/update-content.md +1 -0
  13. package/commands/update-page.md +3 -2
  14. package/commands/write-blog.md +4 -0
  15. package/commands/write-docs.md +6 -0
  16. package/commands/write-guide.md +5 -0
  17. package/commands/write-newsletter.md +4 -0
  18. package/dist/server.js +4099 -0
  19. package/mcp_config.json +6 -2
  20. package/package.json +23 -5
  21. package/scripts/setup.sh +70 -35
  22. package/scripts/setup.ts +58 -21
  23. package/scripts/update.sh +56 -0
  24. package/server.json +3 -3
  25. package/skills/README.md +3 -2
  26. package/skills/cms/SKILL.md +111 -0
  27. package/skills/cms/references/cms-hubs.md +84 -0
  28. package/skills/cms/references/html-blocks.md +177 -0
  29. package/skills/crm/SKILL.md +15 -29
  30. package/skills/docs/SKILL.md +65 -0
  31. package/skills/docs/references/how-to.md +155 -0
  32. package/skills/pages/SKILL.md +62 -17
  33. package/skills/pages/references/sections-catalog.json +377 -144
  34. package/skills/social/SKILL.md +83 -210
  35. package/skills/social/evals/evals.json +66 -0
  36. package/skills/social/evals/rubric.md +26 -0
  37. package/skills/social/examples/repurposing-blog-to-social.md +93 -0
  38. package/skills/social/examples/weekly-content-calendar.md +30 -0
  39. package/skills/social/linkedin/SKILL.md +107 -0
  40. package/skills/social/linkedin/evals/evals.json +106 -0
  41. package/skills/social/linkedin/evals/rubric.md +28 -0
  42. package/skills/social/linkedin/examples/gasp-weekly-sprint.md +24 -0
  43. package/skills/social/linkedin/examples/growth-posts-by-format.md +140 -0
  44. package/skills/social/linkedin/references/gasp-funnel-and-calibration.md +90 -0
  45. package/skills/social/linkedin/references/six-growth-formats.md +114 -0
  46. package/skills/social/references/platforms.md +76 -0
  47. package/skills/social/references/post-templates.md +105 -0
  48. package/skills/social/references/reverse-engineering.md +62 -0
  49. package/src/data/sections-catalog.json +950 -0
  50. package/src/db.ts +170 -0
  51. package/src/server.ts +75 -0
  52. package/src/tools/content.ts +326 -0
  53. package/src/tools/crm.ts +1416 -0
  54. package/src/tools/domains.ts +89 -0
  55. package/src/tools/inbox.ts +270 -0
  56. package/src/tools/index.ts +116 -0
  57. package/src/tools/pages.ts +1217 -0
  58. package/src/tools/shop.ts +771 -0
  59. package/src/tools/system.ts +94 -0
  60. package/src/tools/types.ts +17 -0
  61. package/skills/docs-cms/SKILL.md +0 -53
  62. package/skills/docs-cms/references/how-to.md +0 -383
@@ -1,32 +1,62 @@
1
1
  {
2
- "id": "businesskit",
3
- "name": "BusinessKit Agent",
4
- "description": "Autonomous business copilot: POS sales billing, B2B invoicing, purchase restock, visual landing pages, CMS publishing, and CRM via native MCP tools.",
5
- "version": "1.0.5",
6
- "author": {
7
- "name": "BusinessKit",
8
- "email": "hello@businesskit.io",
9
- "url": "https://businesskit.io"
10
- },
11
- "repository": "https://github.com/businesskitai/businesskit-agent",
12
- "homepage": "https://businesskit.io",
13
- "license": "MIT",
14
- "type": "mcp",
15
- "runtime": "stdio",
16
- "command": "businesskit",
17
- "args": [
18
- "--mcp"
19
- ],
20
- "tags": [
21
- "business",
22
- "billing",
23
- "invoicing",
24
- "pos",
25
- "inventory",
26
- "crm",
27
- "cms",
28
- "pages",
29
- "mcp"
30
- ],
31
- "icon": "https://businesskit.io/favicon.ico"
32
- }
2
+ "id": "businesskit",
3
+ "name": "BusinessKit Agent",
4
+ "version": "1.0.5",
5
+ "description": "Autonomous business copilot: POS sales billing, B2B invoicing, purchase restock, visual landing pages, CMS publishing, and CRM via native MCP tools.",
6
+ "author": "BusinessKit",
7
+ "icon": "💼",
8
+ "category": "business",
9
+ "scope": "project",
10
+ "docs": "https://github.com/businesskitai/businesskit-agent",
11
+ "github_url": "https://github.com/businesskitai/businesskit-agent",
12
+ "mcp": [
13
+ {
14
+ "id": "businesskit",
15
+ "name": "BusinessKit MCP",
16
+ "type": "stdio",
17
+ "command": "businesskit",
18
+ "args": ["--mcp"]
19
+ }
20
+ ],
21
+ "commands": [
22
+ "https://github.com/businesskitai/businesskit-agent/blob/main/commands/create-new-bill.md",
23
+ "https://github.com/businesskitai/businesskit-agent/blob/main/commands/create-invoice.md",
24
+ "https://github.com/businesskitai/businesskit-agent/blob/main/commands/send-invoice.md",
25
+ "https://github.com/businesskitai/businesskit-agent/blob/main/commands/add-inventory-from-invoice.md",
26
+ "https://github.com/businesskitai/businesskit-agent/blob/main/commands/check-stock.md",
27
+ "https://github.com/businesskitai/businesskit-agent/blob/main/commands/adjust-stock.md",
28
+ "https://github.com/businesskitai/businesskit-agent/blob/main/commands/add-contact.md",
29
+ "https://github.com/businesskitai/businesskit-agent/blob/main/commands/update-contact.md",
30
+ "https://github.com/businesskitai/businesskit-agent/blob/main/commands/create-page.md",
31
+ "https://github.com/businesskitai/businesskit-agent/blob/main/commands/update-page.md",
32
+ "https://github.com/businesskitai/businesskit-agent/blob/main/commands/publish-page.md",
33
+ "https://github.com/businesskitai/businesskit-agent/blob/main/commands/list-pages.md",
34
+ "https://github.com/businesskitai/businesskit-agent/blob/main/commands/write-docs.md",
35
+ "https://github.com/businesskitai/businesskit-agent/blob/main/commands/write-blog.md",
36
+ "https://github.com/businesskitai/businesskit-agent/blob/main/commands/capabilities.md"
37
+ ],
38
+ "skills": [
39
+ "https://github.com/businesskitai/businesskit-agent/tree/main/skills/billing",
40
+ "https://github.com/businesskitai/businesskit-agent/tree/main/skills/inventory",
41
+ "https://github.com/businesskitai/businesskit-agent/tree/main/skills/crm",
42
+ "https://github.com/businesskitai/businesskit-agent/tree/main/skills/inbox",
43
+ "https://github.com/businesskitai/businesskit-agent/tree/main/skills/pages",
44
+ "https://github.com/businesskitai/businesskit-agent/tree/main/skills/cms",
45
+ "https://github.com/businesskitai/businesskit-agent/tree/main/skills/docs"
46
+ ],
47
+ "type": "mcp",
48
+ "runtime": "stdio",
49
+ "command": "businesskit",
50
+ "args": ["--mcp"],
51
+ "tags": [
52
+ "business",
53
+ "billing",
54
+ "invoicing",
55
+ "pos",
56
+ "inventory",
57
+ "crm",
58
+ "cms",
59
+ "pages",
60
+ "mcp"
61
+ ]
62
+ }
package/AGENTS.md CHANGED
@@ -23,11 +23,21 @@ You are operating a business through **BusinessKit**. You interact with the busi
23
23
  - Amounts are handled in integer smallest currency units (e.g. cents, paise) where required.
24
24
  - Posted journal entries cannot be edited. Errors must be corrected with reversing entries via tools.
25
25
 
26
- 5. **Profile Awareness**:
27
- - Start sessions by confirming the active profile via `profile_list` or `system_get_capabilities`.
28
- - If work targets a different organization, switch profile using `profile_switch` before modifying state.
29
-
30
- 6. **Deliverables in `output/`**:
26
+ 5. **Profile Awareness & Multi-Profile Operations**:
27
+ - **Discover & Verify**: Check the active profile via `profile_list` or `system_get_capabilities`.
28
+ - **In-Memory Locking**: `profile_switch(profile_id="...")` switches the active Turso database connection and locks it in memory (`profile_locked = true`). You only need to switch once per session or when moving between organizations; subsequent tool calls remain locked to that profile.
29
+ - **Per-Call `profile_id` Parameter**: All tools accept an optional `profile_id: "<id>"` argument. When supplied, the MCP server connects to and executes against that profile's database directly (using its internal connection pool) without mutating the active session profile!
30
+ - **Multi-Profile Execution Modes**:
31
+ - *Per-Call Override (Single MCP Connection)*: Pass `"profile_id": "<target>"` in tool arguments to target different businesses in the same turn without switching.
32
+ - *Sequential Batching (Single MCP Connection)*: Complete operations for Profile A, call `profile_switch(profile_id="<profile_b>")`, then complete operations for Profile B.
33
+ - *True Parallel Execution (Multi-Server Setup)*: When working across multiple desktop windows simultaneously, configure separate MCP servers in client config (e.g. `businesskit-org1` and `businesskit-org2`), each passing `--profile <id>`. This allows concurrent calls to multiple databases in the exact same turn with zero collisions.
34
+ - **Database Isolation**: Each profile connects to a separate, dedicated Turso database. Data, ledger rows, and content never cross-contaminate.
35
+
36
+ 6. **Cross-Hub Collections & Navigation**:
37
+ - When creating a collection row in `collections`, **always** set `category_id` (`cat_32` for Docs sidebar, `cat_36` for Guides hub).
38
+ - Use identical `collection_id` across different CMS hubs (`docs`, `guides`, `blog`, `videos`) so the UI can connect and display related cross-hub content together.
39
+
40
+ 7. **Deliverables in `output/`**:
31
41
  - All generated drafts, CSV exports, reports, and scratch artifacts must be written to `./output/`.
32
42
 
33
43
  ---
@@ -36,9 +46,9 @@ You are operating a business through **BusinessKit**. You interact with the busi
36
46
 
37
47
  | Domain | Key Tools | Notes |
38
48
  | :--- | :--- | :--- |
39
- | **System** | `system_get_capabilities`, `profile_list`, `profile_switch` | Check active features and target organization. |
40
- | **Docs & CMS** | `blog_post_create`, `content_list`, `content_get`, `content_update` | Articles, documentation (`cat_32`), guides, blog posts. |
41
- | **Pages & Web** | `page_create`, `page_get`, `page_update`, `page_publish`, `component_create`, `page_get_section_schema` | Visual storefront, landing pages, custom HTML/CSS components. |
49
+ | **System** | `system_get_capabilities`, `profile_list`, `profile_switch` | Check active features, list profiles, switch organizations. |
50
+ | **Docs & CMS** | `blog_post_create`, `content_list`, `content_get`, `content_update` | Articles, documentation (`cat_32`), guides (`cat_36`), blogs. |
51
+ | **Pages & Web** | `page_create`, `page_get`, `page_update`, `page_publish`, `page_list`, `component_create`, `component_list`, `component_get`, `page_get_section_schema` | Visual storefront, landing pages, custom HTML/CSS components. |
42
52
  | **Shop & POS** | `shop_create_new_bill`, `invoice_create`, `invoice_send` | POS walk-in billing, B2B invoices, sales orders. |
43
53
  | **Inventory** | `inventory_add_stock`, `inventory_get_levels`, `inventory_receive_purchase_invoice`, `product_update_pricing` | Physical stock levels, purchase bills, price lists. |
44
54
  | **CRM** | `contact_create`, `contact_update` | Customer contacts, leads, companies, phone/email. |
@@ -50,7 +60,8 @@ You are operating a business through **BusinessKit**. You interact with the busi
50
60
  ## 3. Workflow Skills
51
61
 
52
62
  When handling specific domain tasks, reference the relevant declarative skill in `skills/`:
53
- - **Docs & Knowledge Base**: `skills/docs-cms/SKILL.md` (with `references/how-to.md`)
63
+ - **Universal CMS & Cross-Hub Publishing**: `skills/cms/SKILL.md` (with `references/cms-hubs.md`, `references/html-blocks.md`)
64
+ - **Technical Documentation & Knowledge Base**: `skills/docs/SKILL.md` (with `references/how-to.md`)
54
65
  - **Visual Website & Pages**: `skills/pages/SKILL.md` (with `references/sections-catalog.json`)
55
66
  - **Shop Billing & Invoicing**: `skills/billing/SKILL.md`
56
67
  - **Inventory & Purchasing**: `skills/inventory/SKILL.md`
package/README.md CHANGED
@@ -1,148 +1,136 @@
1
- # BusinessKit Agent
1
+ # BusinessKit MCP Server & Agent Kit
2
2
 
3
- The universal autonomous agent workspace for **BusinessKit**. Operate, manage, and automate your entire business from any AI assistant or coding agent—including **Claude Code**, **Cursor**, **Antigravity**, **VS Code Copilot**, and **Gemini CLI**.
3
+ The official **Model Context Protocol (MCP)** server and autonomous agent toolbelt for **BusinessKit**. Operate, manage, and automate your business from any MCP-compatible AI client—including **Claude Desktop**, **Claude Code**, **Cursor**, **Antigravity**, **OpenAI Codex**, **VS Code**, and **Glama**.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@businesskit/agent.svg)](https://www.npmjs.com/package/@businesskit/agent)
6
+ [![MCP Compatible](https://img.shields.io/badge/MCP-2024--11--05-blue.svg)](https://modelcontextprotocol.io)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
4
8
 
5
9
  ---
6
10
 
7
- ## What is BusinessKit Agent?
11
+ ## Two Connection Modes
12
+
13
+ ### Mode 1: With BusinessKit App (macOS, Windows, Linux) — Zero Config
14
+ If the BusinessKit desktop app is installed on your machine, **you do not need a `.env` file**. Run the universal setup:
8
15
 
9
- BusinessKit Agent connects your favorite AI agent directly to your local BusinessKit desktop app through the **Model Context Protocol (MCP)**.
16
+ ```bash
17
+ npx @businesskit/agent setup
18
+ # or: npm run setup
19
+ ```
10
20
 
11
- Instead of switching back and forth between apps and forms, your AI assistant can execute real business operations on your behalf:
12
- - **Billing & POS**: Create walk-in POS receipts, parse handwritten bills, and draft formal customer invoices.
13
- - **Inventory & Purchasing**: Scan supplier purchase invoices, automatically restock items, update moving average cost, and adjust inventory.
14
- - **Website & Landing Pages**: Assemble responsive landing pages with native modular sections or create bespoke custom components.
15
- - **Docs & Publishing**: Write and publish technical documentation, guides, newsletters, and SEO-optimized blog posts.
16
- - **CRM & Contacts**: Register and organize clients, suppliers, and leads with tags and contact info.
17
- - **Support Inbox**: Triage customer threads, extract 2FA verification codes, and draft email replies.
21
+ The setup wizard automatically locates the installed app binary, connects to your active organization profile, and pairs with your agent environment with zero manual configuration.
18
22
 
19
23
  ---
20
24
 
21
- ## How It Works
25
+ ### Mode 2: Standalone / Cloud / Headless (No App Required)
26
+ Run anywhere Node.js is available (remote server, VPS, Glama, Docker, or machine without the desktop app):
22
27
 
23
- ```
24
- AI Assistant / IDE
25
- (Claude Code / Cursor / Antigravity / VS Code)
26
- │
27
- ├─ Reads Universal Commands & Skills (`commands/` & `skills/`)
28
- │ └─ Editorial rules, page layouts, accounting workflows
29
- │
30
- └─ Calls BusinessKit MCP Server (`businesskit --mcp --profile <id>`)
31
- │
32
- └─ Native BusinessKit Engine
33
- ├─ Automatic double-entry ledger balancing (`fin_journal_entries`)
34
- ├─ Append-only stock & customer credit ledgers
35
- ├─ Isolated local profile database
36
- └─ Zero credential exposure (keys stay in OS Keychain)
37
- ```
28
+ 1. **Configure `.env`** (see [`.env.example`](./.env.example)):
29
+ ```env
30
+ TURSO_DATABASE_URL=libsql://your-database.turso.io
31
+ TURSO_AUTH_TOKEN=your-turso-auth-token
32
+ ```
33
+
34
+ 2. **Read-Only Mode Option**:
35
+ To grant your AI agent safe read-only access (query inventory, check stock, inspect pages, and read CMS content without permitting writes), supply a read-only token instead:
36
+ ```env
37
+ TURSO_DATABASE_URL=libsql://your-database.turso.io
38
+ TURSO_READ_ONLY_TOKEN=your-read-only-token
39
+ ```
38
40
 
39
- All business logic, financial ledger balancing, inventory calculations, and database operations are executed safely inside the native BusinessKit engine. Your database credentials never leak into LLM prompts.
41
+ > **Note**: Tool discovery (`initialize` and `tools/list`) succeeds out-of-the-box even before `.env` is configured, allowing MCP registries (Glama, Smithery) and IDE clients to inspect schemas immediately.
40
42
 
41
43
  ---
42
44
 
43
- ## Quick Start
45
+ ## MCP Client Configuration
46
+
47
+ #### Claude Desktop (`claude_desktop_config.json`)
48
+ ```json
49
+ {
50
+ "mcpServers": {
51
+ "businesskit": {
52
+ "command": "npx",
53
+ "args": ["-y", "@businesskit/agent"],
54
+ "env": {
55
+ "TURSO_DATABASE_URL": "libsql://your-database.turso.io",
56
+ "TURSO_AUTH_TOKEN": "your-turso-auth-token"
57
+ }
58
+ }
59
+ }
60
+ }
61
+ ```
44
62
 
45
- ### Option A: Install as Claude Code Plugin
46
- ```bash
47
- claude plugin add https://github.com/businesskitai/businesskit-agent
63
+ #### Cursor (`.cursor/mcp.json`)
64
+ ```json
65
+ {
66
+ "mcpServers": {
67
+ "businesskit": {
68
+ "command": "npx",
69
+ "args": ["-y", "@businesskit/agent"],
70
+ "env": {
71
+ "TURSO_DATABASE_URL": "libsql://your-database.turso.io",
72
+ "TURSO_AUTH_TOKEN": "your-turso-auth-token"
73
+ }
74
+ }
75
+ }
76
+ }
48
77
  ```
49
78
 
50
- ### Option B: Run Universal Setup (All IDEs & Agents)
51
- From inside this directory:
79
+ #### Claude Code
52
80
  ```bash
53
- ./bin/businesskit.js
54
- # or: npx @businesskit/agent
55
- # or: npm run setup
81
+ claude mcp add businesskit npx -y @businesskit/agent
56
82
  ```
57
83
 
58
- The setup script automatically:
59
- 1. Detects your installed BusinessKit app (`/Applications/BusinessKit.app` on macOS, or build binary).
60
- 2. Connects to your active organization profile.
61
- 3. Configures your agent environment:
62
- - **Claude Code**: generates `.mcp.json` and `.claude/commands`
63
- - **Cursor**: generates `.cursor/mcp.json` and `.cursorrules`
64
- - **Antigravity / Gemini CLI**: registers via `agy mcp add` / `.gemini/mcp_config.json`
65
- - **VS Code**: generates `.vscode/mcp.json`
84
+ #### Antigravity / Gemini CLI (`.gemini/mcp_config.json`)
85
+ ```json
86
+ {
87
+ "mcpServers": {
88
+ "businesskit": {
89
+ "command": "npx",
90
+ "args": ["-y", "@businesskit/agent"],
91
+ "env": {
92
+ "TURSO_DATABASE_URL": "libsql://your-database.turso.io",
93
+ "TURSO_AUTH_TOKEN": "your-turso-auth-token"
94
+ }
95
+ }
96
+ }
97
+ }
98
+ ```
66
99
 
67
100
  ---
68
101
 
69
- ## Using With Your Agent
102
+ ## Documentation & References
70
103
 
71
- ### Claude Code
72
- Open your terminal in this repository and start Claude:
73
- ```bash
74
- claude
75
- ```
76
- Type any slash command directly:
77
- ```bash
78
- /write-docs "Getting Started"
79
- /create-page "About Us"
80
- /create-new-bill 5 Box Tellzy 40 Tab @ ₹1258.83 -15%
81
- ```
104
+ Capabilities and workflows are organized in modular reference files:
82
105
 
83
- ### Antigravity & Gemini CLI
84
- Antigravity connects via the registered `businesskit` MCP server and reads `AGENTS.md`, `commands/`, and `skills/`.
85
- You can use natural language or slash triggers:
86
- - *"Draft a customer invoice for Acme Corp with 10 units of consulting"*
87
- - `/write-docs "Pages Architecture"`
88
- - *"Restock items from this supplier bill"*
106
+ - **Agent Operating Rules & Directives**: [`AGENTS.md`](./AGENTS.md) — Multi-profile operations, ledger invariants, and draft-first safeguards.
107
+ - **Workflow Skills**: [`skills/`](./skills/)
108
+ - [`skills/billing/SKILL.md`](./skills/billing/SKILL.md) — POS bills, B2B invoices, and payment tracking.
109
+ - [`skills/inventory/SKILL.md`](./skills/inventory/SKILL.md) — Stock levels, purchase invoices, and price lists.
110
+ - [`skills/cms/SKILL.md`](./skills/cms/SKILL.md) — Multi-hub CMS publishing (Blog, Newsletter, Guides, Notes).
111
+ - [`skills/pages/SKILL.md`](./skills/pages/SKILL.md) — Visual site builder, section schemas, and custom components.
112
+ - [`skills/crm/SKILL.md`](./skills/crm/SKILL.md) — Contact cards, lead tracking, and tags.
113
+ - [`skills/inbox/SKILL.md`](./skills/inbox/SKILL.md) — Thread triage, 2FA OTP code extraction, and reply drafting.
114
+ - [`skills/domains/SKILL.md`](./skills/domains/SKILL.md) — Expiry horizons and renewal reminders.
115
+ - **Universal Slash Commands**: [`commands/`](./commands/) — 23 ready-to-run agent commands (`/create-new-bill`, `/write-docs`, `/create-page`, `/add-inventory-from-invoice`, etc.).
116
+ - **MCP Server Source**: [`src/server.ts`](./src/server.ts) and [`src/tools/`](./src/tools/) — Typed tool implementations and schemas.
89
117
 
90
- ### Cursor
91
- Open this folder in Cursor (`cursor .`). Cursor detects `.cursorrules` and `.cursor/mcp.json`. Use natural language or slash commands with the agent:
92
- - *"Create a landing page for our Black Friday Sale with hero, features, and pricing"*
93
- - *"Check stock levels for Tellzy 40"*
118
+ - If you have a big idea you'd like us to consider, feel free to [open a discussion](https://github.com/businesskitai/businesskit-agent/discussions) about it.
94
119
 
95
120
  ---
96
121
 
97
- ## Universal Commands (`commands/`)
98
-
99
- All 23 universal commands match the BusinessKit in-app commands 1:1:
100
-
101
- | Domain | Command | Description |
102
- | :--- | :--- | :--- |
103
- | **Docs & CMS** | `/write-docs` | Write structured documentation or knowledge base articles (`cat_32`) |
104
- | | `/write-blog` | Draft or publish a blog post with clean TipTap HTML (`cat_35`) |
105
- | | `/write-guide` | Step-by-step how-to guide with prerequisites and FAQs (`cat_36`) |
106
- | | `/write-newsletter` | Conversational email newsletter issue with sections and CTA (`cat_20`) |
107
- | | `/list-content` | List published and draft articles across hubs |
108
- | | `/update-content` | Edit body HTML, metadata, collection, or publish status |
109
- | | `/seo-audit` | Audit SEO titles, meta descriptions, and keywords |
110
- | **Pages & Web** | `/create-page` | Assemble a complete landing page using native visual sections |
111
- | | `/update-page` | Update sections, copy, or settings on an existing page |
112
- | | `/publish-page` | Toggle page live/published status |
113
- | | `/list-pages` | List all website pages and publication statuses |
114
- | | `/create-component` | Generate a bespoke custom component in `user_components` |
115
- | | `/list-components` | List custom components stored in `user_components` |
116
- | **Shop & POS** | `/create-new-bill` | Immediate POS billing receipt, natural language or handwritten bill |
117
- | | `/create-invoice` | Draft a formal itemized B2B customer invoice |
118
- | | `/send-invoice` | Send customer invoice via email and generate payment link |
119
- | | `/update-price` | Update retail selling price, cost, or discount floor |
120
- | **Inventory** | `/add-inventory-from-invoice` | Scan purchase invoice to restock items and post accounting |
121
- | | `/check-stock` | Query on-hand inventory levels and low-stock alerts |
122
- | | `/adjust-stock` | Record damage, shrinkage, or audit count variances |
123
- | **CRM** | `/add-contact` | Register a new client, lead, or supplier in CRM |
124
- | | `/update-contact` | Update contact information, company, or tags |
125
- | **System** | `/capabilities` | Discover active modules, profile settings, and tools |
126
-
127
- ---
122
+ ## Updating
128
123
 
129
- ## Workflow Skills (`skills/`)
124
+ Update the local agent workspace to the latest release while keeping your custom `context/`, `memory/`, and custom skills intact:
130
125
 
131
- - [`skills/docs-cms/SKILL.md`](./skills/docs-cms/SKILL.md) — Technical documentation (`cat_32`), guides, and blog articles (with `references/how-to.md`).
132
- - [`skills/pages/SKILL.md`](./skills/pages/SKILL.md) — Visual site builder, section schemas, and custom HTML/CSS components (with `references/sections-catalog.json`).
133
- - [`skills/billing/SKILL.md`](./skills/billing/SKILL.md) — POS bills, B2B invoices, and payment tracking.
134
- - [`skills/inventory/SKILL.md`](./skills/inventory/SKILL.md) — Stock levels, purchase invoices, and price lists.
135
- - [`skills/crm/SKILL.md`](./skills/crm/SKILL.md) — Contacts, leads, and customer tags.
136
- - [`skills/inbox/SKILL.md`](./skills/inbox/SKILL.md) — Triage, 2FA code extraction, and reply drafting.
137
- - [`skills/brand/SKILL.md`](./skills/brand/SKILL.md) — Brand identity, voice guidelines, and store context.
138
- - [`skills/humanizer/SKILL.md`](./skills/humanizer/SKILL.md) — De-AI writing patterns and voice polishing.
139
- - [`skills/copywriting/SKILL.md`](./skills/copywriting/SKILL.md) — High-converting sales page copywriting.
140
- - [`skills/social/SKILL.md`](./skills/social/SKILL.md) — Multi-platform social copy and threads.
126
+ ```bash
127
+ npx @businesskit/agent update
128
+ # or inside agent chat:
129
+ /update-agent
130
+ ```
141
131
 
142
132
  ---
143
133
 
144
- ## Operating Principles
134
+ ## License
145
135
 
146
- 1. **Native Engine Execution**: All operations run through verified BusinessKit tools with atomic database transactions.
147
- 2. **Drafts First**: External communications, customer invoices, and emails are prepared as drafts for human review before transmission.
148
- 3. **Structured Outputs**: All deliverables, exports, and generated files are organized in `./output/`.
136
+ [MIT](LICENSE) © BusinessKit AI
@@ -1,17 +1,50 @@
1
1
  #!/usr/bin/env node
2
- // bin/businesskit.js — CLI entrypoint to configure BusinessKit Agent
2
+ // bin/businesskit.js — BusinessKit MCP Server & CLI entrypoint
3
+
3
4
  import { fileURLToPath } from 'url';
4
5
  import { dirname, join } from 'path';
5
6
  import { spawn } from 'child_process';
7
+ import { existsSync } from 'fs';
6
8
 
7
9
  const __dirname = dirname(fileURLToPath(import.meta.url));
8
10
  const root = join(__dirname, '..');
9
- const setupScript = join(root, 'scripts', 'setup.sh');
10
11
 
11
- const proc = spawn('bash', [setupScript, ...process.argv.slice(2)], {
12
- stdio: 'inherit',
13
- cwd: root,
14
- env: { ...process.env },
15
- });
12
+ const arg1 = process.argv[2];
16
13
 
17
- proc.on('exit', (code) => process.exit(code ?? 0));
14
+ if (arg1 === 'update' || arg1 === 'upgrade' || arg1 === '--update') {
15
+ const proc = spawn('bash', [join(root, 'scripts', 'update.sh'), ...process.argv.slice(3)], {
16
+ stdio: 'inherit',
17
+ cwd: root,
18
+ env: { ...process.env },
19
+ });
20
+ proc.on('exit', (code) => process.exit(code ?? 0));
21
+ } else if (arg1 === 'setup' || arg1 === '--setup') {
22
+ const proc = spawn('bash', [join(root, 'scripts', 'setup.sh'), ...process.argv.slice(3)], {
23
+ stdio: 'inherit',
24
+ cwd: root,
25
+ env: { ...process.env },
26
+ });
27
+ proc.on('exit', (code) => process.exit(code ?? 0));
28
+ } else {
29
+ // Start the Model Context Protocol (MCP) server
30
+ const distServer = join(root, 'dist', 'server.js');
31
+ if (existsSync(distServer)) {
32
+ import(distServer).then((mod) => {
33
+ if (typeof mod.startServer === 'function') {
34
+ mod.startServer().catch((err) => {
35
+ console.error('[BusinessKit MCP] Server startup error:', err);
36
+ process.exit(1);
37
+ });
38
+ }
39
+ });
40
+ } else {
41
+ // Development fallback using tsx
42
+ const tsServer = join(root, 'src', 'server.ts');
43
+ const proc = spawn('npx', ['tsx', tsServer], {
44
+ stdio: 'inherit',
45
+ cwd: root,
46
+ env: { ...process.env },
47
+ });
48
+ proc.on('exit', (code) => process.exit(code ?? 0));
49
+ }
50
+ }
@@ -0,0 +1,12 @@
1
+ ---
2
+ id: "cmd_crm_brief"
3
+ name: "Client & Contact Brief"
4
+ slash: "/brief"
5
+ description: "Compile a concise contact brief with deals, billing, and thread history"
6
+ domain_tags: ["crm"]
7
+ required_tools: ["crm_search_contacts", "crm_get_contact", "crm_get_client_billing", "crm_add_note"]
8
+ ---
9
+
10
+ # Contact Brief (`/brief <contact>`)
11
+
12
+ Fetch full context (`crm_get_contact`) and billing (`crm_get_client_billing`), then save a concise brief note via `crm_add_note` using only internal mail, notes, and billing records.
@@ -0,0 +1,12 @@
1
+ ---
2
+ id: "cmd_crm_chase"
3
+ name: "Chase Unpaid Invoices"
4
+ slash: "/chase"
5
+ description: "Find unpaid/overdue client invoices and save payment reminder drafts"
6
+ domain_tags: ["crm"]
7
+ required_tools: ["crm_search_contacts", "crm_get_client_billing", "crm_draft_payment_chase"]
8
+ ---
9
+
10
+ # Payment Chase (`/chase <contact>`)
11
+
12
+ Inspect unpaid/overdue invoices via `crm_get_client_billing` and save a draft reminder using `crm_draft_payment_chase` (draft only, never sent).
@@ -23,13 +23,13 @@ The user may provide:
23
23
 
24
24
  ## Section Assembly Rules
25
25
  Assemble the page using native modular section types that fit the page purpose:
26
- - **Header**: `sc_navbar` — Sticky responsive navigation with brand logo and CTA button.
26
+ - **Header**: `sc_navbar` — Sticky responsive navigation with brand logo, links, and CTA button.
27
27
  - **Hero**: `sc_hero` or `hero_section` — High-impact hero banner with headline, subtitle, and primary/secondary action buttons.
28
- - **Features / Benefits**: `sc_use_cases` or `sc_features` — Grid or card layout highlighting capabilities.
29
- - **Showcase / Proof**: `sc_workspace` or `sc_under_the_hood` — Interactive demo preview or split screenshot.
30
- - **Pricing / Conversion**: `pricing` or `cta_section` — Tiered price cards with feature checks and conversion buttons.
31
- - **Content / FAQ**: `faq` or `text` — Accordion FAQ block for objection handling.
32
- - **Footer**: `sc_footer` — Multi-column site footer with navigation links and copyright.
28
+ - **Features / Benefits**: `sc_use_cases` — Interactive tabbed showcase highlighting capabilities.
29
+ - **Showcase / Proof**: `sc_workspace` or `sc_under_the_hood` — Split interactive terminal/preview with stats and overview.
30
+ - **Pricing / Conversion**: `pricing` or `cta_section` — Tiered price cards with feature pairs and conversion buttons.
31
+ - **Content / FAQ**: `faq`, `about_section`, or `text` — Accordion FAQ block, about story, or rich HTML text block.
32
+ - **Footer**: `sc_footer` — Multi-column site footer with navigation links, status badge, and copyright.
33
33
 
34
34
  ## Design System & Theme Alignment
35
35
  All native sections automatically adopt the business design tokens:
@@ -50,28 +50,56 @@ Construct a structured array of sections:
50
50
  [
51
51
  {
52
52
  "type": "sc_navbar",
53
- "data": { "brandName": "My Store", "ctaText": "Get Started", "ctaLink": "/signup" }
53
+ "data": {
54
+ "brandName": "My Store",
55
+ "links": [{ "label": "Features", "url": "#features" }, { "label": "FAQ", "url": "#faq" }],
56
+ "ctaText": "Get Started",
57
+ "ctaUrl": "/signup"
58
+ }
54
59
  },
55
60
  {
56
61
  "type": "sc_hero",
57
62
  "data": {
58
- "headline": "Empower Your Business Workflow",
59
- "subheadline": "All-in-one platform for sales, billing, and content management.",
60
- "primaryBtnText": "Start Free Trial",
61
- "primaryBtnUrl": "/pricing"
63
+ "title": "Empower Your Business Workflow",
64
+ "subtitle": "All-in-one platform for sales, billing, and content management.",
65
+ "primaryButtonText": "Start Free Trial",
66
+ "primaryButtonUrl": "/pricing",
67
+ "secondaryButtonText": "Book a demo →",
68
+ "secondaryButtonUrl": "/contact"
62
69
  }
63
70
  },
64
71
  {
65
72
  "type": "sc_use_cases",
66
- "data": { "title": "Why Choose Us", "items": [...] }
73
+ "data": {
74
+ "badgeText": "USE CASES",
75
+ "title": "Why Choose Us",
76
+ "subtitle": "Built to streamline your daily operations.",
77
+ "tabs": [
78
+ {
79
+ "id": "workflow",
80
+ "icon": "zap",
81
+ "title": "Fast Checkout",
82
+ "eyebrow": "Fast Checkout",
83
+ "subtitle": "Ring up bills in seconds",
84
+ "headline": "Zero waiting at the counter.",
85
+ "body": "Handle POS billing, inventory updates, and customer receipts in one flow."
86
+ }
87
+ ]
88
+ }
67
89
  },
68
90
  {
69
91
  "type": "faq",
70
- "data": { "items": [{ "question": "How does it work?", "answer": "..." }] }
92
+ "data": {
93
+ "title": "Frequently Asked Questions",
94
+ "items": [{ "question": "How does it work?", "answer": "..." }]
95
+ }
71
96
  },
72
97
  {
73
98
  "type": "sc_footer",
74
- "data": { "copyright": "© 2026 My Business. All rights reserved." }
99
+ "data": {
100
+ "brandName": "My Business",
101
+ "copyright": "© 2026 My Business. All rights reserved."
102
+ }
75
103
  }
76
104
  ]
77
105
  ```
@@ -90,7 +118,7 @@ Call `page_create` with:
90
118
 
91
119
  ### Step 4: Report Results
92
120
  1. Output page summary: Title, slug, total sections configured.
93
- 2. Provide preview link: `/pages/<slug>`
121
+ 2. Provide builder/preview link: `/dashboard/pages/<id>` (public route: `/pages/<slug>`).
94
122
  3. Explain next actions:
95
123
  - Preview or test live: `/publish-page <slug>`
96
124
  - Customize specific sections: `/update-page <slug>`
@@ -0,0 +1,13 @@
1
+ ---
2
+ id: "cmd_crm_overview"
3
+ name: "CRM Today & Overview"
4
+ slash: "/crm"
5
+ description: "Review contacts, open deals, due follow-ups, and stale items"
6
+ domain_tags: ["crm"]
7
+ required_tools: ["crm_search_contacts", "crm_list_deals", "crm_list_tasks", "crm_list_stale"]
8
+ ---
9
+
10
+ # CRM Overview (`/crm`)
11
+
12
+ Inspect active contacts, open deals, due/overdue tasks, and silent contacts/deals.
13
+ Call `crm_list_tasks`, `crm_list_stale`, `crm_list_deals`, and `crm_search_contacts`, then summarize concisely.
@@ -0,0 +1,13 @@
1
+ ---
2
+ id: "cmd_crm_followups"
3
+ name: "Due Follow-ups & Nudges"
4
+ slash: "/followups"
5
+ description: "Review due/overdue tasks and silent leads, and save follow-up drafts"
6
+ domain_tags: ["crm"]
7
+ required_tools: ["crm_list_tasks", "crm_list_stale", "crm_draft_followup"]
8
+ ---
9
+
10
+ # CRM Follow-ups (`/followups`)
11
+
12
+ Check due/overdue CRM tasks (`crm_list_tasks`) and quiet contacts (`crm_list_stale`).
13
+ Save follow-up email drafts via `crm_draft_followup` (always saved as drafts, never sent).
@@ -0,0 +1,13 @@
1
+ ---
2
+ id: "cmd_crm_pipeline"
3
+ name: "CRM Pipeline Review"
4
+ slash: "/pipeline"
5
+ description: "Inspect deals, pipeline stages, and propose stage updates"
6
+ domain_tags: ["crm"]
7
+ required_tools: ["crm_list_deals", "crm_get_deal", "crm_list_stages", "crm_update_deal_stage"]
8
+ ---
9
+
10
+ # CRM Pipeline (`/pipeline`)
11
+
12
+ List configured stages (`crm_list_stages`) and open deals (`crm_list_deals`).
13
+ Stage changes use `crm_update_deal_stage` to queue human approval.