@fleox-agent-crm/agentcrm 0.0.0-stage → 0.3.0

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 (129) hide show
  1. package/LICENSE +143 -0
  2. package/README.md +223 -2
  3. package/changelog.json +57 -0
  4. package/dist/admin/admin-files.json +26 -0
  5. package/dist/admin/assets/chartsImpl-CE2akJat.js +91 -0
  6. package/dist/admin/assets/firebase-BHSUggRo.js +2 -0
  7. package/dist/admin/assets/gitJson-BulGh2KV.js +3 -0
  8. package/dist/admin/assets/index-DidVVK7L.js +1181 -0
  9. package/dist/admin/assets/index-hMXwHSvN.css +1 -0
  10. package/dist/admin/assets/index.esm-BFc7vwnl.js +400 -0
  11. package/dist/admin/assets/index.esm-CtEQZRb1.js +1651 -0
  12. package/dist/admin/assets/index.esm-Dum0J07z.js +16 -0
  13. package/dist/admin/assets/index.esm2017-EOzKbpUS.js +390 -0
  14. package/dist/admin/assets/lucide-react.min-DEDlHCPj.js +6 -0
  15. package/dist/admin/assets/sdk-CnrLnlRo.js +1717 -0
  16. package/dist/admin/config.js +3 -0
  17. package/dist/admin/favicon.svg +1 -0
  18. package/dist/admin/index.html +139 -0
  19. package/dist/admin/runtime/agentcrm-runtime.js +104 -0
  20. package/dist/admin/runtime/lucide-react.js +791 -0
  21. package/dist/admin/runtime/react-dom-client.js +17 -0
  22. package/dist/admin/runtime/react-dom.js +20 -0
  23. package/dist/admin/runtime/react-i18next.js +19 -0
  24. package/dist/admin/runtime/react-jsx-runtime.js +17 -0
  25. package/dist/admin/runtime/react.js +22 -0
  26. package/dist/agent/agentcrm.mjs +3932 -0
  27. package/dist/agent/chunks/_commonjsHelpers-ClciMIcB.mjs +14 -0
  28. package/dist/agent/chunks/activities-Cj_SIOay.mjs +227 -0
  29. package/dist/agent/chunks/api-B6OqNVWp.mjs +97 -0
  30. package/dist/agent/chunks/appearance-BaShelzt.mjs +174 -0
  31. package/dist/agent/chunks/automations-BWrvLqP6.mjs +698 -0
  32. package/dist/agent/chunks/backup-ClSmxmFZ.mjs +103 -0
  33. package/dist/agent/chunks/batch-CVETiJj5.mjs +142 -0
  34. package/dist/agent/chunks/compact-CsFPaAAq.mjs +69 -0
  35. package/dist/agent/chunks/context-CxFfqS4D.mjs +65 -0
  36. package/dist/agent/chunks/core-Dy7vY9H6.mjs +255 -0
  37. package/dist/agent/chunks/dedupe-BepmsaHv.mjs +123 -0
  38. package/dist/agent/chunks/encoding-C9MzdP95.mjs +36 -0
  39. package/dist/agent/chunks/exportCsv-B5hRvkNm.mjs +95 -0
  40. package/dist/agent/chunks/extCheck--7lmVvl7.mjs +193 -0
  41. package/dist/agent/chunks/extPackage-BGl5Oqs8.mjs +115 -0
  42. package/dist/agent/chunks/extScaffold-DqxI7R1e.mjs +320 -0
  43. package/dist/agent/chunks/extensionActions-D2HtpQz4.mjs +48 -0
  44. package/dist/agent/chunks/extensions-BP1k60md.mjs +151 -0
  45. package/dist/agent/chunks/featureRegistry-C9nbVShp.mjs +149 -0
  46. package/dist/agent/chunks/fields-B0bitgmr.mjs +476 -0
  47. package/dist/agent/chunks/files-CjsPJSR6.mjs +158 -0
  48. package/dist/agent/chunks/files-q8Xu5bft.mjs +367 -0
  49. package/dist/agent/chunks/firebase-DxGVQV9E.mjs +454 -0
  50. package/dist/agent/chunks/firebaseRules-iori-s7U.mjs +221 -0
  51. package/dist/agent/chunks/forms-BKU5F9WF.mjs +847 -0
  52. package/dist/agent/chunks/gitJson-fjr8mcHe.mjs +528 -0
  53. package/dist/agent/chunks/hosting-Bme7LxPc.mjs +144 -0
  54. package/dist/agent/chunks/http-Bk9ICb7I.mjs +127 -0
  55. package/dist/agent/chunks/ids-CvnmrMJX.mjs +59 -0
  56. package/dist/agent/chunks/ids-u-noYcy5.mjs +14 -0
  57. package/dist/agent/chunks/importCsv-DmE_sBch.mjs +334 -0
  58. package/dist/agent/chunks/index-B-4W0-P4.mjs +535 -0
  59. package/dist/agent/chunks/index-BM8qeGOb.mjs +2489 -0
  60. package/dist/agent/chunks/index-Bnmav-Oh.mjs +311 -0
  61. package/dist/agent/chunks/index-CRkw3_iF.mjs +147 -0
  62. package/dist/agent/chunks/index-CWrrF1wl.mjs +111 -0
  63. package/dist/agent/chunks/index-DUSdTBkz.mjs +2988 -0
  64. package/dist/agent/chunks/index-RCmo-uld.mjs +26 -0
  65. package/dist/agent/chunks/index-w03ReRs4.mjs +9780 -0
  66. package/dist/agent/chunks/install-CpHoUFtL.mjs +188 -0
  67. package/dist/agent/chunks/jsx-runtime-Ca2uwGDr.mjs +76 -0
  68. package/dist/agent/chunks/loader-C9nm3iwx.mjs +184 -0
  69. package/dist/agent/chunks/lucide-react.min-Bt3gtepY.mjs +64 -0
  70. package/dist/agent/chunks/memory-WNR3VHUJ.mjs +56 -0
  71. package/dist/agent/chunks/migrate-CsClnnN8.mjs +182 -0
  72. package/dist/agent/chunks/modules-CqdVQVJb.mjs +177 -0
  73. package/dist/agent/chunks/nodeImport-BPCt5uMu.mjs +38 -0
  74. package/dist/agent/chunks/package-DWbn3t2R.mjs +194 -0
  75. package/dist/agent/chunks/papaparse-DjBYnQM2.mjs +1285 -0
  76. package/dist/agent/chunks/pipelines-DCdRBNBV.mjs +234 -0
  77. package/dist/agent/chunks/plan-C0TBrU92.mjs +254 -0
  78. package/dist/agent/chunks/pluginRegistry-DyHtlkcr.mjs +83 -0
  79. package/dist/agent/chunks/query-C5nJB_3C.mjs +192 -0
  80. package/dist/agent/chunks/records-DoqiT9xR.mjs +2191 -0
  81. package/dist/agent/chunks/registry-Ceexawxl.mjs +182 -0
  82. package/dist/agent/chunks/registry-DijAKZ24.mjs +431 -0
  83. package/dist/agent/chunks/relations-B9TynBmA.mjs +191 -0
  84. package/dist/agent/chunks/reports-BB59N6ke.mjs +189 -0
  85. package/dist/agent/chunks/runtime-DHo7ZEEO.mjs +14852 -0
  86. package/dist/agent/chunks/runtimeConfig-CCOFg1RM.mjs +250 -0
  87. package/dist/agent/chunks/s3-Dz50-NuA.mjs +903 -0
  88. package/dist/agent/chunks/schema-7-4-qtSS.mjs +203 -0
  89. package/dist/agent/chunks/schema-DlHt2PxI.mjs +367 -0
  90. package/dist/agent/chunks/sdk-whvfg786.mjs +43644 -0
  91. package/dist/agent/chunks/seed-CugPGYZL.mjs +523 -0
  92. package/dist/agent/chunks/server-ISwlDRCN.mjs +242 -0
  93. package/dist/agent/chunks/settings-BtvR_jdm.mjs +76 -0
  94. package/dist/agent/chunks/standardObjects-CheqfDqa.mjs +243 -0
  95. package/dist/agent/chunks/stats-CfeJssSS.mjs +51 -0
  96. package/dist/agent/chunks/store-5gqRSKXg.mjs +122 -0
  97. package/dist/agent/chunks/themes-DPZFv3yc.mjs +43 -0
  98. package/dist/agent/chunks/tools-Bew8lxKx.mjs +844 -0
  99. package/dist/agent/chunks/types-BOy9PUl7.mjs +44 -0
  100. package/dist/agent/chunks/users-DI1BvS0f.mjs +107 -0
  101. package/dist/agent/chunks/utils-DmI8FtXP.mjs +83 -0
  102. package/dist/agent/chunks/views-fO_BM5U_.mjs +109 -0
  103. package/dist/version.json +7 -0
  104. package/package.json +97 -4
  105. package/plugin/.claude-plugin/plugin.json +17 -0
  106. package/plugin/skills/agentcrm-admin/SKILL.md +191 -0
  107. package/plugin/skills/agentcrm-admin/references/appearance.md +26 -0
  108. package/plugin/skills/agentcrm-admin/references/import.md +16 -0
  109. package/plugin/skills/agentcrm-admin/references/records.md +30 -0
  110. package/plugin/skills/agentcrm-admin/references/schema.md +59 -0
  111. package/plugin/skills/agentcrm-extensions/SKILL.md +93 -0
  112. package/plugin/skills/agentcrm-extensions/references/module-recipes.md +213 -0
  113. package/plugin/skills/agentcrm-extensions/references/runtime-api.md +41 -0
  114. package/plugin/skills/agentcrm-extensions/references/testing.md +76 -0
  115. package/plugin/skills/agentcrm-extensions/references/theme-recipes.md +65 -0
  116. package/plugin/skills/agentcrm-install/SKILL.md +116 -0
  117. package/plugin/skills/agentcrm-install/references/firebase.md +18 -0
  118. package/plugin/skills/agentcrm-install/references/github.md +20 -0
  119. package/plugin/skills/agentcrm-install/references/mcp.md +17 -0
  120. package/plugin/skills/agentcrm-install/references/plans.md +45 -0
  121. package/plugin/skills/agentcrm-install/references/s3.md +24 -0
  122. package/plugin/skills/agentcrm-manage/SKILL.md +108 -0
  123. package/plugin/skills/agentcrm-manage/references/cron.md +11 -0
  124. package/plugin/skills/agentcrm-manage/references/doctor.md +18 -0
  125. package/plugin/skills/agentcrm-sales/SKILL.md +92 -0
  126. package/plugin/skills/agentcrm-sales/references/enrichment.md +13 -0
  127. package/plugin/skills/agentcrm-sales/references/playbooks.md +29 -0
  128. package/plugin/skills/agentcrm-sales/references/weekly-report.md +27 -0
  129. package/types/agentcrm-runtime.d.ts +894 -0
package/LICENSE ADDED
@@ -0,0 +1,143 @@
1
+ Copyright (c) 2026 AgentCRM
2
+
3
+ This software is source-available under the PolyForm Noncommercial License 1.0.0
4
+ (reproduced in full below). Personal, hobbyist, educational, research, and other
5
+ noncommercial use is permitted free of charge.
6
+
7
+ Selling the software, hosting it as a paid service, or any other commercial use
8
+ requires explicit written authorization from the copyright holder. For commercial
9
+ licensing inquiries, open an issue at https://github.com/fleox/agentcrm
10
+
11
+ ================================================================================
12
+
13
+ PolyForm Noncommercial License 1.0.0
14
+
15
+ <https://polyformproject.org/licenses/noncommercial/1.0.0>
16
+
17
+ ## Acceptance
18
+
19
+ In order to get any license under these terms, you must agree
20
+ to them as both strict obligations and conditions to all
21
+ your licenses.
22
+
23
+ ## Copyright License
24
+
25
+ The licensor grants you a copyright license for the
26
+ software to do everything you might do with the software
27
+ that would otherwise infringe the licensor's copyright
28
+ in it for any permitted purpose. However, you may
29
+ only distribute the software according to [Distribution
30
+ License](#distribution-license) and make changes or new works
31
+ based on the software according to [Changes and New Works
32
+ License](#changes-and-new-works-license).
33
+
34
+ ## Distribution License
35
+
36
+ The licensor grants you an additional copyright license
37
+ to distribute copies of the software. Your license
38
+ to distribute covers distributing the software with
39
+ changes and new works permitted by [Changes and New Works
40
+ License](#changes-and-new-works-license).
41
+
42
+ ## Notices
43
+
44
+ You must ensure that anyone who gets a copy of any part of
45
+ the software from you also gets a copy of these terms or the
46
+ URL for them above, as well as copies of any plain-text lines
47
+ beginning with `Required Notice:` that the licensor provided
48
+ with the software. For example:
49
+
50
+ > Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
51
+
52
+ ## Changes and New Works License
53
+
54
+ The licensor grants you an additional copyright license to
55
+ make changes and new works based on the software for any
56
+ permitted purpose.
57
+
58
+ ## Patent License
59
+
60
+ The licensor grants you a patent license for the software that
61
+ covers patent claims the licensor can license, or becomes able
62
+ to license, that you would infringe by using the software.
63
+
64
+ ## Noncommercial Purposes
65
+
66
+ Any noncommercial purpose is a permitted purpose.
67
+
68
+ ## Personal Uses
69
+
70
+ Personal use for research, experiment, and testing for
71
+ the benefit of public knowledge, personal study, private
72
+ entertainment, hobby projects, amateur pursuits, or religious
73
+ observance, without any anticipated commercial application,
74
+ is use for a permitted purpose.
75
+
76
+ ## Noncommercial Organizations
77
+
78
+ Use by any charitable organization, educational institution,
79
+ public research organization, public safety or health
80
+ organization, environmental protection organization,
81
+ or government institution is use for a permitted purpose
82
+ regardless of the source of funding or obligations resulting
83
+ from the funding.
84
+
85
+ ## Fair Use
86
+
87
+ You may have "fair use" rights for the software under the
88
+ law. These terms do not limit them.
89
+
90
+ ## No Other Rights
91
+
92
+ These terms do not allow you to sublicense or transfer any of
93
+ your licenses to anyone else, or prevent the licensor from
94
+ granting licenses to anyone else. These terms do not imply
95
+ any other licenses.
96
+
97
+ ## Patent Defense
98
+
99
+ If you make any written claim that the software infringes or
100
+ contributes to infringement of any patent, your patent license
101
+ for the software granted under these terms ends immediately. If
102
+ your company makes such a claim, your patent license ends
103
+ immediately for work on behalf of your company.
104
+
105
+ ## Violations
106
+
107
+ The first time you are notified in writing that you have
108
+ violated any of these terms, or done anything with the software
109
+ not covered by your licenses, your licenses can nonetheless
110
+ continue if you come into full compliance with these terms,
111
+ and take practical steps to correct past violations, within
112
+ 32 days of receiving notice. Otherwise, all your licenses
113
+ end immediately.
114
+
115
+ ## No Liability
116
+
117
+ ***As far as the law allows, the software comes as is, without
118
+ any warranty or condition, and the licensor will not be liable
119
+ to you for any damages arising out of these terms or the use
120
+ or nature of the software, under any kind of legal claim.***
121
+
122
+ ## Definitions
123
+
124
+ The **licensor** is the individual or entity offering these
125
+ terms, and the **software** is the software the licensor makes
126
+ available under these terms.
127
+
128
+ **You** refers to the individual or entity agreeing to these
129
+ terms.
130
+
131
+ **Your company** is any legal entity, sole proprietorship,
132
+ or other kind of organization that you work for, plus all
133
+ organizations that have control over, are under the control of,
134
+ or are under common control with that organization. **Control**
135
+ means ownership of substantially all the assets of an entity,
136
+ or the power to direct its management and policies by vote,
137
+ contract, or otherwise. Control can be direct or indirect.
138
+
139
+ **Your licenses** are all the licenses granted to you for the
140
+ software under these terms.
141
+
142
+ **Use** means anything you do with the software requiring one
143
+ of your licenses.
package/README.md CHANGED
@@ -1,3 +1,224 @@
1
- # Temporary Holding Version
1
+ <p align="center">
2
+ <strong>AgentCRM — the static CRM your AI agent can run.</strong><br>
3
+ A HubSpot / Twenty-style CRM that runs entirely in the browser, keeps your contacts encrypted on storage <i>you</i> own,<br>
4
+ and exposes every action to AI agents through a CLI, skills and an MCP server. No server of ours, ever.
5
+ </p>
2
6
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/@fleox-agent-crm/agentcrm"><img src="https://img.shields.io/npm/v/@fleox-agent-crm/agentcrm?color=4f46e5&label=npm" alt="npm version"></a>
9
+ <a href="https://github.com/fleox/agentcrm/actions/workflows/ci.yml"><img src="https://github.com/fleox/agentcrm/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
10
+ <a href="#claude-code"><img src="https://img.shields.io/badge/Claude%20Code-plugin-d97757" alt="Claude Code plugin"></a>
11
+ <a href="#mcp-server"><img src="https://img.shields.io/badge/MCP-server-0ea5e9" alt="MCP server"></a>
12
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-PolyForm%20Noncommercial-6b7280" alt="License"></a>
13
+ </p>
14
+
15
+ <p align="center">
16
+ <a href="#quick-start">Quick start</a> ·
17
+ <a href="#features">Features</a> ·
18
+ <a href="#how-it-works">How it works</a> ·
19
+ <a href="#cli">CLI</a> ·
20
+ <a href="#mcp-server">MCP</a> ·
21
+ <a href="docs/README.md">Docs</a> ·
22
+ <a href="changelog.json">Changelog</a>
23
+ </p>
24
+
25
+ ---
26
+
27
+ ## Why AgentCRM
28
+
29
+ | | |
30
+ |---|---|
31
+ | **Nothing to run** | The admin is a static web app (HTML + JS) you host anywhere — an S3 bucket, GitHub / GitLab / Cloudflare Pages, a folder. There is no AgentCRM server, account or subscription. |
32
+ | **Your data, encrypted, where you choose** | Contacts live in an **encrypted journal** (AES-256-GCM) on *your* S3-compatible bucket, private GitHub / GitLab repo or local folder — or in your own Firebase project. Nobody else can read them, not even us. |
33
+ | **Agent-native** | Everything the admin does is a CLI command with JSON output, a tool of the MCP server and of the in-admin assistant. Ask *"review my pipeline and draft follow-ups for the stale deals"* — your agent runs the same engine, with the same roles and validation. |
34
+
35
+ ## Quick start
36
+
37
+ ### With an AI agent
38
+
39
+ <a id="claude-code"></a>**Claude Code** — install the plugin, then just ask:
40
+
41
+ ```text
42
+ /plugin marketplace add fleox/agentcrm
43
+ /plugin install agentcrm@agentcrm
44
+ ```
45
+
46
+ > *"Install AgentCRM for my company, data in my OVH bucket, admin on GitHub Pages."*
47
+
48
+ The `agentcrm-install` skill asks where the data lives, then where the admin is hosted, guides you through creating least-privilege keys (you type secrets in your own terminal — never in the chat), writes the install plan, installs and verifies with `doctor`. Other skills: `agentcrm-manage` (health, updates), `agentcrm-admin` (run the CRM), `agentcrm-sales` (pipeline reviews, follow-ups, lead qualification, weekly report), `agentcrm-extensions` (build, test and install modules and themes).
49
+
50
+ **Other agents** (Codex, Cursor, Hermes…): the skills in [`plugin/skills/`](plugin/skills) are plain Markdown; Hermes gets generated skills with a Python wrapper in [`hermes/`](hermes).
51
+
52
+ ### By hand
53
+
54
+ ```bash
55
+ npx -y @fleox-agent-crm/agentcrm@0.3.0 options # backends, locations, hostings, plan format
56
+ npx -y @fleox-agent-crm/agentcrm@0.3.0 credentials set s3:main # hidden prompt
57
+ npx -y @fleox-agent-crm/agentcrm@0.3.0 install --plan plan.json --dry-run
58
+ npx -y @fleox-agent-crm/agentcrm@0.3.0 install --plan plan.json
59
+ npx -y @fleox-agent-crm/agentcrm@0.3.0 doctor --site acme
60
+ ```
61
+
62
+ Or try it without any account: `npx -y @fleox-agent-crm/agentcrm@0.3.0 serve` opens the setup wizard; pick **This browser** (optionally with demo data).
63
+
64
+ ## Features
65
+
66
+ - **Records** — companies, people, deals and **custom objects** with 20 field types (select, multi-select, currency, relation one / many, user, rating, address, tags, image, files…); table views with inline edit, filters, sorts, saved views; **kanban** by stage; record pages with relations both ways, timeline, tasks and notes.
67
+ - **Images & attachments** — contact photos and company logos (crop, drag & drop) shown everywhere; attach images, PDFs and documents to notes, tasks, calls, emails, meetings and records (button, drag & drop, paste), inline images in Markdown, lightbox, a Files tab per record. Files live next to your data — **encrypted with the same passphrase** on your bucket / repo / folder, in IndexedDB, or in your Firebase Storage — and are erased physically by `compact`. See [docs/files.md](docs/files.md).
68
+ - **Pipelines** — multiple pipelines, stages with probability and open / won / lost kinds, weighted forecast.
69
+ - **Activities & tasks** — notes (Markdown), calls, emails, meetings, tasks with due dates and assignees; Gmail / Google Calendar / Outlook logging from the browser (OAuth, no server).
70
+ - **Automations** — triggers on create / update / field change / stage change / schedule / inactivity; actions create task, update field, add note, assign owner (round robin), webhook. Scheduled ones run from the open admin or a [GitHub Actions cron](docs/automations.md).
71
+ - **Lead forms** — a static form page posting to an inbox you own (S3 prefix, Firestore, or your webhook); submissions become deduped records.
72
+ - **Import / export** — CSV import with automatic mapping, coercion, dedupe (email / domain) and a dry-run report; CSV / JSON export; ZIP backup with every file.
73
+ - **Reports** — pipeline by stage, forecast, won / lost, activity per user, lead sources, stale deals, conversion funnel.
74
+ - **Roles** — admin / member / viewer, enforced in the engine (and by Firestore rules in Firebase mode).
75
+ - **AI assistant** — in the admin, with your own Claude API key, driving the same tool catalog as the MCP server.
76
+ - **GDPR** — soft delete + `compact` for physical erasure; encrypted by default; export everything.
77
+ - **Customisation** — switch modules off, install extension modules and themes at runtime, brand the look (accent, grays, font, density, logo, custom CSS) — by hand or by asking your AI agent. See below.
78
+
79
+ ## Customisation
80
+
81
+ Everything you can customise in the admin, an AI agent can do too (CLI, MCP tools, skills) — same engine, same permissions (admins only for workspace-wide changes), and every change shows a plan before it is applied.
82
+
83
+ ### Modules — keep only what you use
84
+
85
+ Settings → **Modules** switches built-in features off for the whole workspace: dashboard, deals & pipelines, reports, lead forms, tasks, automations, email & calendar, AI assistant. Disabling hides pages, navigation, widgets and owned objects; it never deletes data. Dependencies are checked (cascade on request). [docs/modules.md](docs/modules.md)
86
+
87
+ ```bash
88
+ npx -y @fleox-agent-crm/agentcrm@0.3.0 modules list --site acme
89
+ npx -y @fleox-agent-crm/agentcrm@0.3.0 modules disable forms --site acme --yes
90
+ ```
91
+
92
+ ### Appearance — make it yours
93
+
94
+ Settings → **Appearance**: one accent color generates the whole palette; neutral grays, radius, density, font (system or Google fonts), sidebar style, accent or neutral buttons, high contrast, default light / dark mode, logo, favicon, custom CSS, seven presets (default, ocean, forest, sunset, graphite, rose, high-contrast) and theme extensions. [docs/appearance.md](docs/appearance.md)
95
+
96
+ ```bash
97
+ npx -y @fleox-agent-crm/agentcrm@0.3.0 appearance set --accent "#0f766e" --neutral stone --buttons accent --site acme --yes
98
+ npx -y @fleox-agent-crm/agentcrm@0.3.0 appearance logo ./logo.svg --site acme --yes
99
+ npx -y @fleox-agent-crm/agentcrm@0.3.0 appearance preset ocean --site acme --yes
100
+ ```
101
+
102
+ ### Extensions — add features without rebuilding
103
+
104
+ Modules (pages, record tabs, dashboard widgets, settings pages, AI tools, automation actions, hooks) and themes are ZIPs installed from Settings → Modules → **Installed extensions** or the CLI, stored in the CRM's own data and loaded at runtime by every admin — and by the CLI / MCP server, so their AI tools and automation actions work there too. Installing runs code with admin rights: the admin and the CLI always show who made it and what it adds first; safe mode (`?safe=1`, or `--safe`) starts without extensions. [docs/extensions.md](docs/extensions.md)
105
+
106
+ ```bash
107
+ npx -y @fleox-agent-crm/agentcrm@0.3.0 ext new module acme-projects # scaffold (Vite + typings + en/fr)
108
+ cd acme-projects && npm install && npm run build
109
+ npx -y @fleox-agent-crm/agentcrm@0.3.0 ext check . # validate + load it like the admin
110
+ npx -y @fleox-agent-crm/agentcrm@0.3.0 ext install . --site acme --yes # install (plan without --yes)
111
+ ```
112
+
113
+ Guides: [creating a module](docs/creating-a-module.md), [creating a theme](docs/creating-a-theme.md), [runtime API reference](docs/runtime-api-reference.md). Examples: [`external/`](external).
114
+
115
+ ### Ask your agent
116
+
117
+ With the AgentCRM skills installed (Claude Code plugin or Hermes), just say:
118
+
119
+ - *"We don't use deals or lead forms — hide what we don't need."*
120
+ - *"Make the CRM look like our brand: here's our logo."* / *"Use #e4002b as the main color with a dark sidebar."*
121
+ - *"Install the sales-goals extension from my Downloads folder."* (the agent shows the plan and asks first)
122
+ - *"Build a module that adds a Renewals page and a tool to list deals renewing in the next 60 days, then install it."*
123
+ - *"Turn off the extension that broke the dashboard."*
124
+
125
+ ## How it works
126
+
127
+ ```mermaid
128
+ flowchart LR
129
+ subgraph Front doors
130
+ A[Admin SPA<br/>browser]
131
+ B[agentcrm CLI]
132
+ C[MCP server<br/>agentcrm mcp]
133
+ D[In-admin AI assistant]
134
+ end
135
+ A & B & C & D --> O[src/ops — one engine<br/>roles · validation · automations]
136
+ O --> S[DataStore API]
137
+ S --> J[(Encrypted journal<br/>S3 · git repo · folder)]
138
+ S --> G[(git-json<br/>private repo)]
139
+ S --> F[(Firebase)]
140
+ S --> L[(This browser<br/>IndexedDB)]
141
+ ```
142
+
143
+ All business logic lives in `src/ops/`. The admin, the CLI, the MCP server and the assistant are four front doors to it, so an agent can do exactly what a user can do — no more (roles apply), no less. The journal backend appends one encrypted segment per write (no lock, no conflict between users) and merges them per field with hybrid logical clocks; `compact` folds them into a snapshot. See [docs/architecture.md](docs/architecture.md).
144
+
145
+ ## Data backends
146
+
147
+ | Backend | Where | Good for | Encrypted | Multi-user |
148
+ |---|---|---|---|---|
149
+ | `journal` (default) | S3-compatible bucket, private GitHub / GitLab repo, local folder | Most teams; personal data under your control | Yes (AES-256-GCM, PBKDF2 600k) | Yes, conflict-free |
150
+ | `git-json` | Private GitHub / GitLab repo, one JSON file per record | Readable history, per-user tokens | No (history keeps old values) | Yes |
151
+ | `firebase` | Your Firebase project (Firestore + Auth) | Real-time teams with logins | At rest by Google | Yes, roles in rules |
152
+ | `local` | This browser (IndexedDB) | Trying it | — | No |
153
+
154
+ ## Hosting the admin
155
+
156
+ S3 / R2 / OVH / Scaleway buckets (HTTPS), GitHub Pages, GitLab Pages, Cloudflare Pages, a local folder, or a ZIP to upload anywhere. The admin holds no data and its `config.js` never contains a secret. See [docs/hosting.md](docs/hosting.md).
157
+
158
+ ## CLI
159
+
160
+ `agentcrm` runs on Node.js 20+ (`npx -y @fleox-agent-crm/agentcrm@0.3.0 <command>`). Every command accepts `--json` and prints exactly one `{ ok, data }` / `{ ok: false, error: { code, message, hint } }` object; destructive commands print a plan unless `--yes`.
161
+
162
+ | Area | Commands |
163
+ |---|---|
164
+ | Setup | `status`, `options`, `credentials set\|list\|remove\|copy\|verify`, `install --plan`, `site list\|add\|use\|rename\|forget\|credentials`, `doctor`, `serve`, `deploy-admin` |
165
+ | Records | `records list\|get\|create\|update\|delete\|restore\|search\|duplicates\|merge` |
166
+ | Schema | `objects list\|get\|create\|update\|delete`, `fields add\|update\|delete` |
167
+ | Work | `activities add\|list\|done`, `notes add`, `tasks list\|add\|done\|reassign`, `pipelines list\|move` |
168
+ | Admin | `views list\|create\|delete`, `users list\|add\|role\|disable`, `settings get\|set` |
169
+ | Data | `import csv`, `export csv\|json`, `report <name>`, `stats`, `compact` |
170
+ | Automation | `automations list\|enable\|disable\|run`, `forms list\|publish\|ingest` |
171
+ | Customisation | `modules list\|get\|enable\|disable\|config`, `appearance get\|presets\|set\|preset\|logo\|favicon\|css\|reset`, `ext new\|check\|pack\|install\|list\|enable\|disable\|uninstall\|export` |
172
+ | AI | `tools list\|call`, `mcp` |
173
+
174
+ Full reference: [docs/cli.md](docs/cli.md).
175
+
176
+ ## MCP server
177
+
178
+ ```bash
179
+ claude mcp add agentcrm -- npx -y @fleox-agent-crm/agentcrm@0.3.0 mcp --site acme
180
+ ```
181
+
182
+ Tools = the shared AI catalog (search, list, get, create, update, delete, merge records, notes, activities, tasks, deal stages, reports, CSV import, automations…), resources = schema, pipelines, modules and appearance, plus the tools of the site's enabled extension modules; prompts = pipeline review, follow-up email, lead qualification. `--read-only` hides every tool that writes. Claude Desktop / Cursor config: [docs/mcp.md](docs/mcp.md).
183
+
184
+ ## AI assistant
185
+
186
+ The admin has a chat panel that calls the Claude API **from your browser** with your own key, using the same tools as the MCP server. Mutating tools ask for confirmation.
187
+
188
+ ## Automations without a server
189
+
190
+ Event automations run wherever a write happens (browser, CLI, MCP). Time-based ones (schedule, inactivity) and lead form ingestion run while the admin is open, or from a scheduled GitHub Actions workflow in a private repo of yours: [docs/automations.md](docs/automations.md) and [the template](docs/templates/agentcrm-cron.yml).
191
+
192
+ ## Security & GDPR
193
+
194
+ - **Secrets never leave the browser / the CLI credentials file** (`~/.agentcrm/credentials.json`, mode 0600): never in `config.js`, the data, git, or a chat.
195
+ - **Encrypted by default**: passphrase → PBKDF2-SHA256 (600 000 iterations) → AES-256-GCM; gzip before encryption.
196
+ - **Right to erasure**: deleted records are purged physically by `compact` (journal: a new snapshot, old segments deleted). git-json keeps history — documented and warned.
197
+ - **Least privilege**: keys scoped to the CRM buckets / repos; roles enforced in the engine.
198
+ - See [SECURITY.md](SECURITY.md).
199
+
200
+ ## Compared with…
201
+
202
+ | | AgentCRM | Twenty | HubSpot | A spreadsheet |
203
+ |---|---|---|---|---|
204
+ | Server to run | None | Postgres + Node server (self-host) or their cloud | Their cloud | None |
205
+ | Where the data lives | Your bucket / repo / Firebase, encrypted | Your DB or their cloud | Their cloud | A file |
206
+ | Cost | Your storage (often cents) | Hosting / seats | Seats, tiers | Free |
207
+ | AI agents | CLI + skills + MCP + assistant, same engine | API | API, paid AI | Ad hoc |
208
+ | Pipelines, automations, forms | Yes | Yes | Yes | Manual |
209
+ | Scale | Small & medium teams (whole dataset in memory) | Large | Large | Small |
210
+
211
+ ## Development
212
+
213
+ ```bash
214
+ npm install --legacy-peer-deps
215
+ npm run dev # admin at http://localhost:5180
216
+ npm run typecheck && npm test && npm run build
217
+ node dist/agent/agentcrm.mjs help
218
+ ```
219
+
220
+ Contributing: [CONTRIBUTING.md](CONTRIBUTING.md); maintenance rules for agents: [AGENTS.md](AGENTS.md).
221
+
222
+ ## License
223
+
224
+ [PolyForm Noncommercial 1.0.0](LICENSE). Personal, educational, research and other noncommercial use is free; commercial use requires written authorization — open an issue.
package/changelog.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "versions": [
3
+ {
4
+ "version": "0.3.0",
5
+ "date": "2026-11-03",
6
+ "breaking": false,
7
+ "changes": [
8
+ "Images: people get a photo and companies a logo (new image fields, added automatically to existing workspaces), shown next to the name everywhere — record header (click or drop an image, square crop with zoom), tables, kanban cards, relation chips, search. Any custom object can get one with an Image field.",
9
+ "Attachments: attach images, PDFs and documents to notes, tasks, calls, emails, meetings and records — button, drag & drop or paste; pasted images go inline in the Markdown (![name](file:<id>)); thumbnails with a lightbox, document chips with open / download / delete.",
10
+ "New record tab Files: every file of the record and, optionally, of its activities and related records; grid / list, sort, search, preview, upload drop zone.",
11
+ "New field types image and files for custom fields; Settings → Data model chooses an object's image field.",
12
+ "Files live next to your data: encrypted with the dataset passphrase on the journal backend (bucket, repo, folder), IndexedDB in local mode, the data repo for git-json, Firebase Storage for Firebase (generated storage.rules). Photos are resized in the browser (2560 px, WebP) with 320 px thumbnails; upload limit per file in Settings → General (25 MB by default) with a storage usage summary.",
13
+ "GDPR: deleting a file removes it everywhere at once; compact physically erases the bytes of deleted files and of files whose records / activities are gone. Merging records moves their files.",
14
+ "Backups: Settings → Export → ZIP with data + files, restorable from the same page; CLI export zip / import zip.",
15
+ "CLI: files list|upload|get|delete|usage, records image <id> <path>|--remove, --attach <path> on activities add, notes add and tasks add.",
16
+ "AI tools (MCP + assistant): list_files and describe_attachments (metadata only).",
17
+ "Demo data comes with generated portraits, company logos, a chart and a PDF on a note."
18
+ ],
19
+ "actions": [
20
+ "Redeploy the admin (agentcrm deploy-admin) to get photos, logos, attachments and the Files tab; the image fields are added to your workspace on the next admin sign-in.",
21
+ "Update the agent skills (Claude Code: /plugin marketplace update agentcrm) to get the files commands.",
22
+ "Firebase: enable Storage, add storageBucket to the web config, deploy the new storage.rules (and the updated firestore.rules, which cover the files collection) and set the bucket CORS — see docs/firebase.md."
23
+ ]
24
+ },
25
+ {
26
+ "version": "0.2.0",
27
+ "date": "2026-11-03",
28
+ "breaking": false,
29
+ "changes": [
30
+ "Modules: switch built-in features (dashboard, deals & pipelines, reports, lead forms, tasks, automations, email & calendar, AI assistant) on and off for the whole workspace, with dependency checks and per-module configuration. Disabling never deletes data.",
31
+ "Appearance: accent color with a generated palette, neutral grays, radius, density, font, sidebar style, buttons, contrast, default light / dark mode, logo, favicon, custom CSS and seven presets, applied live for every user.",
32
+ "Extensions: install modules (pages, record tabs, dashboard widgets, settings pages, AI tools, automation actions, hooks) and themes at runtime from a ZIP, stored in the CRM's own data; enable, disable, upgrade, export, uninstall; safe mode (?safe=1 or Shift).",
33
+ "CLI: modules list|get|enable|disable|config, appearance get|presets|set|preset|logo|favicon|css|reset, ext new|check|pack|install|list|enable|disable|uninstall|export; every workspace-wide change prints a plan unless --yes.",
34
+ "CLI and MCP sessions load the site's enabled extensions: their AI tools are in tools list / MCP tools/list, their hooks and automation actions run (automations run). --safe skips them.",
35
+ "MCP: new resources agentcrm://modules and agentcrm://appearance; customisation tools list_modules, set_module_enabled, get_appearance, set_appearance, apply_appearance_preset, list_extensions, set_extension_enabled.",
36
+ "New skill agentcrm-extensions (scaffold, recipes, check, pack, install); agentcrm-admin covers modules, appearance and extensions. Docs: extensions, creating a module / theme, runtime API reference, appearance, modules."
37
+ ],
38
+ "actions": [
39
+ "Update the agent skills (Claude Code: /plugin marketplace update agentcrm) to get the customisation and extension commands.",
40
+ "Redeploy the admin (agentcrm deploy-admin) to get Settings → Modules and Settings → Appearance."
41
+ ]
42
+ },
43
+ {
44
+ "version": "0.1.0",
45
+ "date": "2026-11-03",
46
+ "breaking": false,
47
+ "changes": [
48
+ "First release: static CRM (companies, people, deals, pipelines, activities, tasks, custom objects and fields, views, automations, lead forms, reports) with an admin that runs entirely in the browser.",
49
+ "Data on storage you own: encrypted journal on S3-compatible buckets, private GitHub / GitLab repos or a local folder; git-json and Firebase backends.",
50
+ "agentcrm CLI: install from a plan, doctor, deploy-admin, records / schema / pipelines / views / users / settings, CSV import and export, reports, automations, forms, compaction (GDPR erasure).",
51
+ "MCP server (agentcrm mcp) exposing the AI tool catalog, schema / pipeline resources and sales prompts.",
52
+ "Claude Code plugin with four skills (install, manage, admin, sales) and generated Hermes Agent skills."
53
+ ],
54
+ "actions": []
55
+ }
56
+ ]
57
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "version": "0.3.0",
3
+ "dataSchema": 1,
4
+ "files": [
5
+ "assets/chartsImpl-CE2akJat.js",
6
+ "assets/firebase-BHSUggRo.js",
7
+ "assets/gitJson-BulGh2KV.js",
8
+ "assets/index-DidVVK7L.js",
9
+ "assets/index-hMXwHSvN.css",
10
+ "assets/index.esm-BFc7vwnl.js",
11
+ "assets/index.esm-CtEQZRb1.js",
12
+ "assets/index.esm-Dum0J07z.js",
13
+ "assets/index.esm2017-EOzKbpUS.js",
14
+ "assets/lucide-react.min-DEDlHCPj.js",
15
+ "assets/sdk-CnrLnlRo.js",
16
+ "favicon.svg",
17
+ "index.html",
18
+ "runtime/agentcrm-runtime.js",
19
+ "runtime/lucide-react.js",
20
+ "runtime/react-dom-client.js",
21
+ "runtime/react-dom.js",
22
+ "runtime/react-i18next.js",
23
+ "runtime/react-jsx-runtime.js",
24
+ "runtime/react.js"
25
+ ]
26
+ }