@fleox-agent-crm/agentcrm 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -16
- package/changelog.json +30 -0
- package/dist/admin/admin-files.json +8 -8
- package/dist/admin/assets/{chartsImpl-CE2akJat.js → chartsImpl-qlHW3VOv.js} +30 -30
- package/dist/admin/assets/firebase-U38f5kc9.js +2 -0
- package/dist/admin/assets/{gitJson-BulGh2KV.js → gitJson-wy2Tytfd.js} +1 -1
- package/dist/admin/assets/{index-DidVVK7L.js → index-BpaxrJx9.js} +265 -265
- package/dist/admin/assets/{index-hMXwHSvN.css → index-TcjySLVg.css} +1 -1
- package/dist/admin/assets/{lucide-react.min-DEDlHCPj.js → lucide-react.min-Djrg16BH.js} +1 -1
- package/dist/admin/assets/{sdk-CnrLnlRo.js → sdk-mu08RFtk.js} +1 -1
- package/dist/admin/index.html +2 -2
- package/dist/agent/agentcrm.mjs +334 -151
- package/dist/agent/chunks/{api-B6OqNVWp.mjs → api-Cz0Ubj-B.mjs} +4 -3
- package/dist/agent/chunks/api-Dwb4xz1k.mjs +27 -0
- package/dist/agent/chunks/{appearance-BaShelzt.mjs → appearance-BloHbiLA.mjs} +1 -1
- package/dist/agent/chunks/{automations-BWrvLqP6.mjs → automations-DwWruxmu.mjs} +3 -3
- package/dist/agent/chunks/{backup-ClSmxmFZ.mjs → backup-W3CjgkAJ.mjs} +16 -3
- package/dist/agent/chunks/{compact-CsFPaAAq.mjs → compact-BGHI92tm.mjs} +2 -2
- package/dist/agent/chunks/{exportCsv-B5hRvkNm.mjs → exportCsv-C6e6XEmB.mjs} +38 -3
- package/dist/agent/chunks/{extCheck--7lmVvl7.mjs → extCheck-GgHG1dYB.mjs} +16 -9
- package/dist/agent/chunks/{extPackage-BGl5Oqs8.mjs → extPackage-DuZ6GZhp.mjs} +2 -2
- package/dist/agent/chunks/{extScaffold-DqxI7R1e.mjs → extScaffold-Aqyjf1nr.mjs} +3 -3
- package/dist/agent/chunks/{extensions-BP1k60md.mjs → extensions-Bp72uZ9a.mjs} +19 -6
- package/dist/agent/chunks/{featureRegistry-C9nbVShp.mjs → featureRegistry-DSsZbhrh.mjs} +3 -3
- package/dist/agent/chunks/{files-q8Xu5bft.mjs → files-D1daDgY0.mjs} +1 -1
- package/dist/agent/chunks/{firebase-DxGVQV9E.mjs → firebase-BciZWdc6.mjs} +41 -17
- package/dist/agent/chunks/{forms-BKU5F9WF.mjs → forms-BfuWaQjA.mjs} +1 -1
- package/dist/agent/chunks/{hosting-Bme7LxPc.mjs → hosting-Dnn1k3cV.mjs} +1 -1
- package/dist/agent/chunks/{importCsv-DmE_sBch.mjs → importCsv-LVmMTaWU.mjs} +2 -2
- package/dist/agent/chunks/{index-DUSdTBkz.mjs → index-CNXq2Yk_.mjs} +1 -24
- package/dist/agent/chunks/index-Dio0aBWA.mjs +6920 -0
- package/dist/agent/chunks/{index-CRkw3_iF.mjs → index-rut-KC39.mjs} +1 -1
- package/dist/agent/chunks/{install-CpHoUFtL.mjs → install-BBTA4nMm.mjs} +16 -7
- package/dist/agent/chunks/{loader-C9nm3iwx.mjs → loader-MPD9iAvh.mjs} +20 -20
- package/dist/agent/chunks/{modules-CqdVQVJb.mjs → modules-clWdE-K2.mjs} +27 -2
- package/dist/agent/chunks/{nodeImport-BPCt5uMu.mjs → nodeImport-ylfRDvqt.mjs} +2 -2
- package/dist/agent/chunks/{package-DWbn3t2R.mjs → package-B7mI6HGi.mjs} +1 -1
- package/dist/agent/chunks/{papaparse-DjBYnQM2.mjs → papaparse-Df7i1dHr.mjs} +31 -7
- package/dist/agent/chunks/{pipelines-DCdRBNBV.mjs → pipelines-BAKpPk1w.mjs} +1 -1
- package/dist/agent/chunks/{plan-C0TBrU92.mjs → plan-BmTat6-T.mjs} +1 -1
- package/dist/agent/chunks/{records-DoqiT9xR.mjs → records-DcHFelq5.mjs} +5 -1
- package/dist/agent/chunks/{registry-Ceexawxl.mjs → registry-COfJrSmg.mjs} +18 -18
- package/dist/agent/chunks/{reports-BB59N6ke.mjs → reports-BACHGccj.mjs} +3 -3
- package/dist/agent/chunks/{runtime-DHo7ZEEO.mjs → runtime-C0Xf0Axi.mjs} +53 -32
- package/dist/agent/chunks/{schema-DlHt2PxI.mjs → schema-C4lSslXv.mjs} +10 -4
- package/dist/agent/chunks/{schema-7-4-qtSS.mjs → schema-DnLj8dUO.mjs} +10 -0
- package/dist/agent/chunks/{sdk-whvfg786.mjs → sdk-CYgNyuoK.mjs} +132 -7005
- package/dist/agent/chunks/{seed-CugPGYZL.mjs → seed-6MRmQQBR.mjs} +26 -8
- package/dist/agent/chunks/{server-ISwlDRCN.mjs → server-DC3t8r30.mjs} +5 -5
- package/dist/agent/chunks/{settings-BtvR_jdm.mjs → settings-Di8nzNEL.mjs} +35 -0
- package/dist/agent/chunks/{stats-CfeJssSS.mjs → stats-BfuLWhVV.mjs} +2 -2
- package/dist/agent/chunks/{tools-Bew8lxKx.mjs → tools-iSH-yMpl.mjs} +59 -19
- package/dist/agent/chunks/{views-fO_BM5U_.mjs → views-DH1n9Lrt.mjs} +1 -1
- package/dist/version.json +1 -1
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/skills/agentcrm-admin/SKILL.md +67 -67
- package/plugin/skills/agentcrm-admin/references/appearance.md +1 -1
- package/plugin/skills/agentcrm-admin/references/records.md +5 -5
- package/plugin/skills/agentcrm-admin/references/schema.md +20 -20
- package/plugin/skills/agentcrm-extensions/SKILL.md +9 -9
- package/plugin/skills/agentcrm-extensions/references/module-recipes.md +2 -2
- package/plugin/skills/agentcrm-extensions/references/testing.md +16 -14
- package/plugin/skills/agentcrm-extensions/references/theme-recipes.md +3 -3
- package/plugin/skills/agentcrm-install/SKILL.md +13 -13
- package/plugin/skills/agentcrm-install/references/firebase.md +1 -1
- package/plugin/skills/agentcrm-install/references/github.md +1 -1
- package/plugin/skills/agentcrm-install/references/mcp.md +3 -3
- package/plugin/skills/agentcrm-install/references/plans.md +1 -1
- package/plugin/skills/agentcrm-install/references/s3.md +1 -1
- package/plugin/skills/agentcrm-manage/SKILL.md +15 -15
- package/plugin/skills/agentcrm-sales/SKILL.md +18 -18
- package/dist/admin/assets/firebase-BHSUggRo.js +0 -2
|
@@ -5,24 +5,24 @@ All schema commands need the admin role.
|
|
|
5
5
|
## Objects
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
9
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
10
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
11
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
12
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
8
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 objects list --site acme --json
|
|
9
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 objects get deals --site acme --json
|
|
10
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 objects create --site acme --singular Project --plural Projects --icon folder --json
|
|
11
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 objects update projects --site acme --plural "Client projects" --json
|
|
12
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 objects delete projects --site acme --json
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Deleting an object deletes all its records (plan first).
|
|
16
16
|
|
|
17
17
|
## Fields
|
|
18
18
|
|
|
19
|
-
Types: text, longText, number, currency, percent, date, datetime, boolean, select, multiSelect, email, phone, url, relation, user, rating, address, tags.
|
|
19
|
+
Types: text, longText, number, currency, percent, date, datetime, boolean, select, multiSelect, email, phone, url, relation, user, rating, address, tags, image (one picture; the first one becomes the record avatar), files (attachments).
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
23
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
24
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
25
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
22
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 fields add --site acme --object deals --label "Contract type" --type select --options "New,Renewal,Upsell" --json
|
|
23
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 fields add --site acme --object projects --label Client --type relation --relation-object companies --json
|
|
24
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 fields update contractType --site acme --object deals --options "New,Renewal,Upsell,Cross-sell" --json
|
|
25
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 fields delete contractType --site acme --object deals --json
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
`fields update --type <t>` converts existing values (the result reports what could not be converted). Standard fields can't be deleted.
|
|
@@ -30,10 +30,10 @@ npx -y @fleox-agent-crm/agentcrm@0.3.0 fields delete contractType --site acme --
|
|
|
30
30
|
## Views
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
34
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
35
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
36
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
33
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 views list --site acme --object deals --json
|
|
34
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 views create --site acme --object deals --name "Closing this month" --filter closeDate:withinDays:30 --sort closeDate --columns name,amount,stage,closeDate --shared --json
|
|
35
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 views create --site acme --object deals --name Board --type kanban --group-by stage --json
|
|
36
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 views delete <viewId> --site acme --json
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
## Users and roles
|
|
@@ -41,10 +41,10 @@ npx -y @fleox-agent-crm/agentcrm@0.3.0 views delete <viewId> --site acme --json
|
|
|
41
41
|
Roles: `admin` (everything), `member` (records, activities, own views, import / export), `viewer` (read only).
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
45
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
46
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
47
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
44
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 users list --site acme --all --json
|
|
45
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 users add --site acme --email sam@acme.com --name "Sam Rivera" --role member --json
|
|
46
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 users role sam@acme.com admin --site acme --json
|
|
47
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 users disable sam@acme.com --site acme --json
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
Firebase / git-json sites: the login itself is created on that service (Firebase Authentication, a repository collaborator).
|
|
@@ -52,8 +52,8 @@ Firebase / git-json sites: the login itself is created on that service (Firebase
|
|
|
52
52
|
## Settings
|
|
53
53
|
|
|
54
54
|
```bash
|
|
55
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
56
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
55
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 settings get --site acme --json
|
|
56
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 settings set --site acme --set name="Acme CRM" --set defaultCurrency=EUR --set locale=fr-FR --set staleDealDays=21 --json
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
Secrets are refused in settings.
|
|
@@ -4,7 +4,7 @@ description: Create, test and ship AgentCRM extensions - scaffold a module or th
|
|
|
4
4
|
license: PolyForm-Noncommercial-1.0.0
|
|
5
5
|
compatibility: Requires Node.js 20+ (npm for the extension project's own build).
|
|
6
6
|
metadata:
|
|
7
|
-
version: "0.3.
|
|
7
|
+
version: "0.3.2"
|
|
8
8
|
repository: "https://github.com/fleox/agentcrm"
|
|
9
9
|
allowed-tools: Bash Read Write Edit
|
|
10
10
|
---
|
|
@@ -33,14 +33,14 @@ AgentCRM is a static CRM: the admin is a single-page app that runs in the browse
|
|
|
33
33
|
|
|
34
34
|
## The toolchain: `agentcrm ext`
|
|
35
35
|
|
|
36
|
-
Every command is `npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
36
|
+
Every command is `npx -y @fleox-agent-crm/agentcrm@0.3.2 <command> … --json`. Read `error.hint` when `ok` is false.
|
|
37
37
|
|
|
38
38
|
| Action | What it does |
|
|
39
39
|
|---|---|
|
|
40
40
|
| `ext new module\|theme <id> [--dir <path>] [--name "…"] [--description "…"] [--author "…"] [--force]` | Scaffolds a standalone project: `package.json` (scripts build / typecheck / check / pack), `vite.config.ts` (runtime specifiers external, one `bundle.js`), `tsconfig.json` mapped to `types/agentcrm-runtime.d.ts` (copied from the CLI), `manifest.json`, `src/index.tsx` (module: a page with a nav entry, a record tab, an AI tool, en + fr strings) or `src/index.ts` + `src/style.css` (theme), README. |
|
|
41
41
|
| `ext check [<dir\|zip>] [--kind module\|theme] [--no-call]` | Validates manifest (id, kind, semver, apiVersion range, unknown keys), sizes, bundle imports (runtime specifiers only), default export, production JSX; then installs it in a throw-away demo CRM, loads it through the real loader and reports what it registers: routes, navigation, slots, settings page, i18n, AI tools (each one without required inputs is called once with `{}` on demo data), automation actions, hooks, theme values. Exit code 1 when `data.valid` is false. |
|
|
42
42
|
| `ext pack [<dir>] [--out <zip>]` | Writes `<id>-<version>.zip` (manifest.json + bundle.js + style.css) for Settings, Modules, Install, or `ext install`. |
|
|
43
|
-
| `ext install <zip\|dir> --site <alias> [--disabled] [--yes]` | Plan (install or upgrade, author, size, dependencies, warnings), then installs and loads it in the session (`load.status` must be `loaded`). Upgrades keep the enabled state and the module config. |
|
|
43
|
+
| `ext install <zip\|dir> --site <alias> [--disabled] [--force] [--yes]` | First loads the bundle in a throw-away CRM like `ext check` (a package that fails is refused with `invalid-package` and nothing changes; `--force` skips this). Plan (install or upgrade, author, size, dependencies, warnings: downgrade, same version), then installs and loads it in the session (`load.status` must be `loaded`). Upgrades keep the enabled state and the module config. |
|
|
44
44
|
| `ext list --site <alias>` | Installed extensions with version, enabled state and load status. |
|
|
45
45
|
| `ext enable\|disable <id> --site <alias> [--cascade] [--yes]` | Switch it on or off without uninstalling. |
|
|
46
46
|
| `ext uninstall <id> --site <alias> [--force] [--yes]` | Remove it (its module config is kept for a later re-install). |
|
|
@@ -51,7 +51,7 @@ Every command is `npx -y @fleox-agent-crm/agentcrm@0.3.0 <command> … --json`.
|
|
|
51
51
|
1. **Understand the request.** A new look = a **theme**. New pages, widgets, record tabs, AI tools, automation steps or reactions to CRM events = a **module**. Pick an id: lowercase letters, digits and dashes, 3 to 50 characters, not a built-in module id (records, deals, dashboard, reports, forms, tasks, automations, integrations, assistant, search, settings, setup, customize) nor agentcrm, core, runtime, admin, app, custom, default. Prefix it with the company or product (`acme-quotes`).
|
|
52
52
|
2. **Scaffold and install the toolchain:**
|
|
53
53
|
```bash
|
|
54
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
54
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 ext new module acme-quotes --author "Acme" --json
|
|
55
55
|
cd acme-quotes && npm install
|
|
56
56
|
```
|
|
57
57
|
3. **Read the scaffold**, then the reference for what you are building:
|
|
@@ -64,15 +64,15 @@ Every command is `npx -y @fleox-agent-crm/agentcrm@0.3.0 <command> … --json`.
|
|
|
64
64
|
```bash
|
|
65
65
|
npm run typecheck
|
|
66
66
|
npm run build
|
|
67
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
67
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 ext check . --json
|
|
68
68
|
```
|
|
69
69
|
Fix every error; read the warnings (missing French strings, tool names without the module prefix, nav entries without a route).
|
|
70
70
|
6. **Pack and install** (plan first, then `--yes` once the user agreed):
|
|
71
71
|
```bash
|
|
72
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
73
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
74
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
75
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
72
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 ext pack . --json
|
|
73
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 ext install . --site acme --json
|
|
74
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 ext install . --site acme --yes --json
|
|
75
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 tools list --site acme --json
|
|
76
76
|
```
|
|
77
77
|
For a new release, bump `version` in `manifest.json` (semver) and install again: it upgrades in place.
|
|
78
78
|
|
|
@@ -182,8 +182,8 @@ function SettingsPage() {
|
|
|
182
182
|
In AI tools / actions read it with `readConfig(ops.getModuleConfig(ctx, ID))`. From the CLI:
|
|
183
183
|
|
|
184
184
|
```bash
|
|
185
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
186
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
185
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 modules config get acme-projects --site acme --json
|
|
186
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 modules config set acme-projects --value '{"budgetAlert":50000}' --site acme --json
|
|
187
187
|
```
|
|
188
188
|
|
|
189
189
|
(the second prints a plan; add `--yes`).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
```bash
|
|
6
6
|
npm run typecheck # tsc against types/agentcrm-runtime.d.ts
|
|
7
7
|
npm run build # vite build → dist/bundle.js
|
|
8
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
8
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 ext check . --json # what the admin will see
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
`ext check` reads `manifest.json` + `dist/bundle.js` (+ `src/style.css` for themes declaring it) from a project, `manifest.json` + `bundle.js` from an unpacked folder, or a ZIP. Then:
|
|
@@ -24,13 +24,15 @@ The check runs the bundle in Node with the real loader and runtime, in a throw-a
|
|
|
24
24
|
## Pack and install
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
28
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
29
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
30
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
27
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 ext pack . --json # → <id>-<version>.zip
|
|
28
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 ext install acme-quotes-0.1.0.zip --site acme --json
|
|
29
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 ext install acme-quotes-0.1.0.zip --site acme --yes --json
|
|
30
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 ext list --site acme --json
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
- The plan (`needsConfirmation: true`) shows `id`, `kind`, `name`, `version`, `author`, `mode` (`install` / `upgrade` with `from`), `dependsOn`, `size`, `warnings` and the trust warning. **Show it to the user and ask before `--yes`.**
|
|
34
|
+
- Before anything else, `ext install` loads the bundle in a throw-away CRM like `ext check`: when it fails the command answers `invalid-package` and nothing is installed (the current version keeps running). Fix it and run `ext check`; `--force` skips the trial load (only for bundles that can't load in Node on purpose).
|
|
35
|
+
- `warnings` also flag a downgrade or a re-install of the same version: bump `version` instead.
|
|
34
36
|
- After `--yes`, `data.load.status` is `loaded` when the bundle ran in the CLI session. `error` comes with `data.load.error`.
|
|
35
37
|
- A module whose dependencies are off is installed disabled (see `warnings`); enable them first or `ext enable <id> --cascade`.
|
|
36
38
|
- `ext install <dir>` works on a built project too (no ZIP needed).
|
|
@@ -43,21 +45,21 @@ Bump `version` in `manifest.json`, build, check, install again: `mode: "upgrade"
|
|
|
43
45
|
## Use it
|
|
44
46
|
|
|
45
47
|
```bash
|
|
46
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
47
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
48
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
49
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
48
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 tools list --site acme --json # its AI tools (source: "extension")
|
|
49
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 tools call acme_quotes_list --site acme --input '{}' --json
|
|
50
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 modules list --site acme --json # appears as a module (source: "extension")
|
|
51
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 automations run --site acme --json # its automation actions run here too
|
|
50
52
|
```
|
|
51
53
|
|
|
52
|
-
To see the UI, open the CRM's admin (its hosted URL, see `site show`, or `npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
54
|
+
To see the UI, open the CRM's admin (its hosted URL, see `site show`, or `npx -y @fleox-agent-crm/agentcrm@0.3.2 serve` for a local copy), and check the page, the tabs and widgets in light and dark mode and in French (language switcher in the user menu or the Cmd+K palette).
|
|
53
55
|
|
|
54
56
|
## Disable, uninstall, export
|
|
55
57
|
|
|
56
58
|
```bash
|
|
57
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
58
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
59
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
60
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
59
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 ext disable acme-quotes --site acme --yes --json
|
|
60
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 ext enable acme-quotes --site acme --yes --json
|
|
61
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 ext uninstall acme-quotes --site acme --yes --json
|
|
62
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 ext export acme-quotes --site acme --out backup.zip --json
|
|
61
63
|
```
|
|
62
64
|
|
|
63
65
|
Disabling keeps the package and its config; uninstalling keeps the config (a re-install restores it). Data the module created (records, objects, notes) is never deleted by either.
|
|
@@ -57,9 +57,9 @@ Variables: `--acc-50` … `--acc-950` (accent scale), `--srf-50` … `--srf-950`
|
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
59
|
npm run build
|
|
60
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
61
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
62
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
60
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 ext check . --json
|
|
61
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 ext install . --site acme --yes --json
|
|
62
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 appearance preset acme-brand --site acme --json
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
`ext check` prints the resolved values (`data.theme.appearance`) and the CSS size. `appearance preset` prints the before / after plan; add `--yes` to apply. Open the admin to look at it (light and dark, a table and a record page).
|
|
@@ -4,7 +4,7 @@ description: Install a new AgentCRM (static, AI-drivable CRM) for the user - ask
|
|
|
4
4
|
license: PolyForm-Noncommercial-1.0.0
|
|
5
5
|
compatibility: Requires Node.js 20+ and network access to the chosen storage. Works in Claude Code and any agent that can run shell commands.
|
|
6
6
|
metadata:
|
|
7
|
-
version: "0.3.
|
|
7
|
+
version: "0.3.2"
|
|
8
8
|
repository: "https://github.com/fleox/agentcrm"
|
|
9
9
|
allowed-tools: Bash Read Write
|
|
10
10
|
---
|
|
@@ -15,13 +15,13 @@ AgentCRM is a HubSpot / Twenty-style CRM (companies, people, deals, pipelines, a
|
|
|
15
15
|
|
|
16
16
|
**Language:** talk to the user in their language; keep commands, files and plans in English.
|
|
17
17
|
|
|
18
|
-
Every command is `npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
18
|
+
Every command is `npx -y @fleox-agent-crm/agentcrm@0.3.2 <command> --json` (Node.js 20+). Each prints ONE JSON object: `{"ok": true, "data": ...}` or `{"ok": false, "error": {"code", "message", "hint"}}`. When `ok` is false, read `error.hint` and act on it. Exit code 2 = a usage error in your command.
|
|
19
19
|
|
|
20
20
|
## 1. Start with status and options
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
24
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
23
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 status --json
|
|
24
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 options --json
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
`status` shows CRMs this computer already manages (maybe the user wants `agentcrm-manage` instead). `options` lists backends, data locations, hostings, credential types and the plan format.
|
|
@@ -36,7 +36,7 @@ The CRM holds personal data (contacts, emails, phone numbers). Ask, in this orde
|
|
|
36
36
|
- a **folder on this computer** - single computer, no account. Advise backing it up.
|
|
37
37
|
2. **Firebase** (backend `firebase`) - real-time teams with logins and per-user roles. See references/firebase.md.
|
|
38
38
|
3. **A private git repo as readable JSON** (backend `git-json`) - readable history, but deleted records stay in the git history: warn the user.
|
|
39
|
-
4. **This browser only** - for trying it: `npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
39
|
+
4. **This browser only** - for trying it: `npx -y @fleox-agent-crm/agentcrm@0.3.2 serve --json`, then "This browser" in the wizard. The CLI can't reach it.
|
|
40
40
|
|
|
41
41
|
Encryption: the journal is encrypted with AES-256-GCM by default. A passphrase is generated at install and stored only on this computer. Never offer to turn it off unless the user insists and the location is strictly private.
|
|
42
42
|
|
|
@@ -54,15 +54,15 @@ HTTPS is required: browsers only allow the admin's request signing and encryptio
|
|
|
54
54
|
|
|
55
55
|
## 4. Credentials - never in the chat
|
|
56
56
|
|
|
57
|
-
Secrets (keys, tokens, passwords, passphrases) are NEVER typed into the conversation and never written in a plan. The user stores each one in their own terminal; in Claude Code they type `! npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
57
|
+
Secrets (keys, tokens, passwords, passphrases) are NEVER typed into the conversation and never written in a plan. The user stores each one in their own terminal; in Claude Code they type `! npx -y @fleox-agent-crm/agentcrm@0.3.2 credentials set s3:main` (hidden prompt). Alternatives that keep secrets out of the chat:
|
|
58
58
|
|
|
59
59
|
- `--from-env KEY_ID,SECRET` - variables the user already exported (CI, `.env`).
|
|
60
60
|
- `--from-aws-profile <profile>` - an existing aws CLI profile (s3).
|
|
61
61
|
- `--from-gh` - the token of the signed-in GitHub CLI (github).
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
65
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
64
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 credentials list --json
|
|
65
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 credentials types --json
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
How to create each key with least privilege: references/s3.md, references/github.md, references/firebase.md. One account can serve several CRMs (`s3:main` for both the data bucket and the hosting bucket is fine).
|
|
@@ -89,8 +89,8 @@ Write `plan.json` (no secrets, only account ids):
|
|
|
89
89
|
More examples (GitHub repo data + GitHub Pages, local folder, Firebase): references/plans.md. `owner` becomes the first CRM admin, and the CLI acts as that user. `demo: true` adds a realistic sample dataset - offer it for a first look, not for a production CRM.
|
|
90
90
|
|
|
91
91
|
```bash
|
|
92
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
93
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
92
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 install --plan plan.json --dry-run --json
|
|
93
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 install --plan plan.json --json
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
The dry run checks every access and writes nothing. Fix `check-failed` errors with their hint (permissions, names, CORS) before installing. An existing dataset in the same place is kept; only what's missing is seeded.
|
|
@@ -99,16 +99,16 @@ The dry run checks every access and writes nothing. Fix `check-failed` errors wi
|
|
|
99
99
|
|
|
100
100
|
When the result has `savePassphrase`, stop and do it with the user before anything else:
|
|
101
101
|
|
|
102
|
-
1. `npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
102
|
+
1. `npx -y @fleox-agent-crm/agentcrm@0.3.2 credentials copy passphrase:<alias> --json` puts it on the clipboard (never print it).
|
|
103
103
|
2. The user pastes it into their password manager now.
|
|
104
|
-
3. The user proves it: in their own terminal, `! npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
104
|
+
3. The user proves it: in their own terminal, `! npx -y @fleox-agent-crm/agentcrm@0.3.2 credentials verify passphrase:<alias>`, pasting FROM the password manager. It must say "verified".
|
|
105
105
|
|
|
106
106
|
Without the passphrase nobody can read the data, ever.
|
|
107
107
|
|
|
108
108
|
## 7. Verify
|
|
109
109
|
|
|
110
110
|
```bash
|
|
111
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
111
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 doctor --site <alias> --json
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
Every failing check has a `fix`. The most common one on buckets is CORS: the result prints the exact JSON rule for the data bucket - help the user apply it (references/s3.md). Then give the user the admin URL (`data.adminUrl` of the install) and explain: each new browser asks once for the storage keys and the passphrase, which stay in that browser.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
1. Create a Firebase project (console.firebase.google.com), add a Web app and copy its config (apiKey, authDomain, projectId, appId...). The web apiKey is public by design.
|
|
4
4
|
2. Enable Authentication → Sign-in method → Email/Password (and Google if wanted).
|
|
5
5
|
3. Create Firestore (production mode) and publish the AgentCRM security rules (see docs/firebase.md in the repository).
|
|
6
|
-
4. Create the first admin account (Authentication → Users → Add user). The user stores its login: `! npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
6
|
+
4. Create the first admin account (Authentication → Users → Add user). The user stores its login: `! npx -y @fleox-agent-crm/agentcrm@0.3.2 credentials set firebase:<name>` (email + password at hidden prompts).
|
|
7
7
|
5. Plan:
|
|
8
8
|
|
|
9
9
|
```json
|
|
@@ -7,7 +7,7 @@ Fine-grained personal access token: https://github.com/settings/personal-access-
|
|
|
7
7
|
- Repository access: only the data repository (PRIVATE) and, if used, the admin hosting repository.
|
|
8
8
|
- Permissions: Contents read and write; Metadata read-only; Pages read and write (optional, lets the CLI enable Pages).
|
|
9
9
|
|
|
10
|
-
The user stores it: `! npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
10
|
+
The user stores it: `! npx -y @fleox-agent-crm/agentcrm@0.3.2 credentials set github:<login>`, or reuses the GitHub CLI login: `npx -y @fleox-agent-crm/agentcrm@0.3.2 credentials set github:<login> --from-gh --json`.
|
|
11
11
|
|
|
12
12
|
GitLab: project → Settings → Access tokens, scope `api`, role Developer; store as `gitlab:<name>`.
|
|
13
13
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# Use the CRM from an MCP client
|
|
2
2
|
|
|
3
|
-
`agentcrm mcp` is a stdio MCP server: tools = the AI tool catalog (search, list, get, create, update, delete, merge records, notes, activities, tasks, pipeline moves, reports, CSV import), resources = schema and
|
|
3
|
+
`agentcrm mcp` is a stdio MCP server: tools = the AI tool catalog (search, list, get, create, update, delete, merge records, notes, activities, tasks, pipeline moves, reports, CSV import, automations and forms, files metadata, modules, appearance, extensions — plus the tools of the site's enabled extension modules), resources = schema, pipelines, modules and appearance, prompts = pipeline review, follow-up email, lead qualification. `--read-only` hides every tool that writes.
|
|
4
4
|
|
|
5
5
|
Claude Code:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
claude mcp add agentcrm -- npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
8
|
+
claude mcp add agentcrm -- npx -y @fleox-agent-crm/agentcrm@0.3.2 mcp --site <alias>
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
Claude Desktop (`claude_desktop_config.json`) and Cursor (`.cursor/mcp.json`):
|
|
12
12
|
|
|
13
13
|
```json
|
|
14
|
-
{ "mcpServers": { "agentcrm": { "command": "npx", "args": ["-y", "@fleox-agent-crm/agentcrm@0.3.
|
|
14
|
+
{ "mcpServers": { "agentcrm": { "command": "npx", "args": ["-y", "@fleox-agent-crm/agentcrm@0.3.2", "mcp", "--site", "<alias>"] } } }
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
The server uses the credentials of this computer (`~/.agentcrm`) and acts as the site's CLI user.
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
Use it from the browser with `npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
26
|
+
Use it from the browser with `npx -y @fleox-agent-crm/agentcrm@0.3.2 serve --json` and the folder picker.
|
|
27
27
|
|
|
28
28
|
## git-json in a private repo
|
|
29
29
|
|
|
@@ -4,7 +4,7 @@ Use TWO buckets: a PRIVATE one for the data (journal backend) and a public one f
|
|
|
4
4
|
|
|
5
5
|
## Access key (least privilege)
|
|
6
6
|
|
|
7
|
-
- **AWS**: IAM user with a policy on both buckets: `s3:GetObject`, `s3:PutObject`, `s3:DeleteObject` on `arn:aws:s3:::<bucket>/*` and `s3:ListBucket` on `arn:aws:s3:::<bucket>`. Store it: `! npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
7
|
+
- **AWS**: IAM user with a policy on both buckets: `s3:GetObject`, `s3:PutObject`, `s3:DeleteObject` on `arn:aws:s3:::<bucket>/*` and `s3:ListBucket` on `arn:aws:s3:::<bucket>`. Store it: `! npx -y @fleox-agent-crm/agentcrm@0.3.2 credentials set s3:main`, or import a profile with `--from-aws-profile <name>`.
|
|
8
8
|
- **Cloudflare R2**: R2 → Manage API tokens → Object Read & Write, scoped to the buckets. Endpoint `https://<account-id>.r2.cloudflarestorage.com`, region `auto`.
|
|
9
9
|
- **OVHcloud**: Public Cloud → Object Storage → S3 users; endpoint `https://s3.<region>.io.cloud.ovh.net`. Set `publicRead: true` on the hosting bucket.
|
|
10
10
|
- **Scaleway**: endpoint `https://s3.<region>.scw.cloud`.
|
|
@@ -4,7 +4,7 @@ description: Check, repair and update existing AgentCRM CRMs - list the CRMs thi
|
|
|
4
4
|
license: PolyForm-Noncommercial-1.0.0
|
|
5
5
|
compatibility: Requires Node.js 20+.
|
|
6
6
|
metadata:
|
|
7
|
-
version: "0.3.
|
|
7
|
+
version: "0.3.2"
|
|
8
8
|
repository: "https://github.com/fleox/agentcrm"
|
|
9
9
|
allowed-tools: Bash Read Write
|
|
10
10
|
---
|
|
@@ -15,12 +15,12 @@ This skill covers the CRMs themselves (registry, health, updates, maintenance).
|
|
|
15
15
|
|
|
16
16
|
**Language:** talk to the user in their language; keep commands and files in English.
|
|
17
17
|
|
|
18
|
-
Every command is `npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
18
|
+
Every command is `npx -y @fleox-agent-crm/agentcrm@0.3.2 <command> --json` (Node.js 20+); read `error.hint` whenever `ok` is false.
|
|
19
19
|
|
|
20
20
|
## Always start with status
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
23
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 status --json
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
- `data.tool.updateAvailable: true` -> tell the user AgentCRM `data.tool.latest` exists and offer to update the skills first (Claude Code: `/plugin marketplace update agentcrm`, then `/reload-plugins`).
|
|
@@ -32,8 +32,8 @@ npx -y @fleox-agent-crm/agentcrm@0.3.0 status --json
|
|
|
32
32
|
## Which CRM?
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
36
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
35
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 site list --json
|
|
36
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 site show <alias> --json
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
Commands take `--site <alias>`; always pass it. Without it the tool uses `AGENTCRM_SITE`, the folder's `agentcrm.json` (`{ "site": "<alias>" }`), the only site, or the default chosen with `site use <alias>` - otherwise it fails with `site-required`: ask the user which CRM. Say which CRM you are working on before changing anything.
|
|
@@ -43,12 +43,12 @@ Registry commands: `site use <alias>`, `site rename <from> <to>`, `site forget <
|
|
|
43
43
|
## Register a CRM installed elsewhere
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
46
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 site add <alias> --admin-url https://crm.acme.com/admin/ --data-credential s3:main --passphrase-credential passphrase:acme --hosting-credential s3:main --json
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
- It reads the admin's public `config.js`, opens the data (proving the credentials) and reads the hosting from the dataset.
|
|
50
50
|
- `--data-credential`: the data location key (journal), the git token (git-json) or the Firebase login.
|
|
51
|
-
- `--passphrase-credential`: encrypted journals. The user stores the passphrase from their password manager: `! npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
51
|
+
- `--passphrase-credential`: encrypted journals. The user stores the passphrase from their password manager: `! npx -y @fleox-agent-crm/agentcrm@0.3.2 credentials set passphrase:<alias>`.
|
|
52
52
|
- `--user <email>`: the CRM user the CLI acts as (default: the first admin).
|
|
53
53
|
- A CRM in a local folder without a hosted admin: `site add <alias> --runtime @config.json --data-path /path/to/folder`.
|
|
54
54
|
- `warnings` lists what is still missing; fix later with `site credentials <alias> --hosting-credential <account>` (`""` removes one).
|
|
@@ -57,7 +57,7 @@ npx -y @fleox-agent-crm/agentcrm@0.3.0 site add <alias> --admin-url https://crm.
|
|
|
57
57
|
## Health check
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
60
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 doctor --site <alias> --json
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
`data.checks[]` has `id`, `status` (ok / warn / fail / skip), `message` and, for problems, `fix`. Exit code 1 when a check fails. Walk the user through each fix, most important first:
|
|
@@ -75,8 +75,8 @@ Details of every check: references/doctor.md.
|
|
|
75
75
|
## Update a hosted admin
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
79
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
78
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 deploy-admin --site <alias> --json
|
|
79
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 deploy-admin --site <alias> --yes --json
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
Without `--yes` it prints the plan (`needsConfirmation: true`, versions, file count): show it, ask, then re-run with `--yes`. `--all` covers every CRM with a hosting. It refuses downgrades and admins that store a newer data format. GitHub / GitLab Pages need a minute before `doctor` sees the new version.
|
|
@@ -86,8 +86,8 @@ Without `--yes` it prints the plan (`needsConfirmation: true`, versions, file co
|
|
|
86
86
|
Deleted records stay restorable until compaction. To erase them physically and shrink the journal:
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
90
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
89
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 compact --site <alias> --json
|
|
90
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 compact --site <alias> --yes --json
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
Show the plan (records purged) and confirm first: it can't be undone. Run it from one place at a time.
|
|
@@ -97,12 +97,12 @@ Show the plan (records purged) and confirm first: it can't be undone. Run it fro
|
|
|
97
97
|
Scheduled / inactivity automations and lead form ingestion run when the admin is open, or from a cron. The recommended cron is a GitHub Actions workflow in a private repo: references/cron.md. Locally:
|
|
98
98
|
|
|
99
99
|
```bash
|
|
100
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
101
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
100
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 automations run --site <alias> --yes --json
|
|
101
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 forms ingest --site <alias> --yes --json
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
## Overview of one CRM
|
|
105
105
|
|
|
106
106
|
```bash
|
|
107
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
107
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 stats --site <alias> --json
|
|
108
108
|
```
|
|
@@ -4,7 +4,7 @@ description: Sales workflows on an AgentCRM - pipeline review and forecast, stal
|
|
|
4
4
|
license: PolyForm-Noncommercial-1.0.0
|
|
5
5
|
compatibility: Requires Node.js 20+. Web search / fetch tools help for enrichment.
|
|
6
6
|
metadata:
|
|
7
|
-
version: "0.3.
|
|
7
|
+
version: "0.3.2"
|
|
8
8
|
repository: "https://github.com/fleox/agentcrm"
|
|
9
9
|
allowed-tools: Bash Read Write WebSearch WebFetch
|
|
10
10
|
---
|
|
@@ -15,7 +15,7 @@ You are the user's sales assistant on top of their CRM. Read with the CLI, reaso
|
|
|
15
15
|
|
|
16
16
|
**Language:** talk to the user in their language; keep commands and files in English.
|
|
17
17
|
|
|
18
|
-
Every command is `npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
18
|
+
Every command is `npx -y @fleox-agent-crm/agentcrm@0.3.2 <command> --json` with `--site <alias>` (pick it with the `agentcrm-manage` skill). Command details are in the `agentcrm-admin` skill.
|
|
19
19
|
|
|
20
20
|
## Ground rules
|
|
21
21
|
|
|
@@ -27,10 +27,10 @@ Every command is `npx -y @fleox-agent-crm/agentcrm@0.3.0 <command> --json` with
|
|
|
27
27
|
## Pipeline review
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
31
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
32
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
33
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
30
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 report pipeline --site acme --json
|
|
31
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 report forecast --site acme --json
|
|
32
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 report stale --site acme --json
|
|
33
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 records list --site acme --object deals --filter closeDate:before:today --filter stage:notIn:won,lost --json
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
Answer with: open amount and weighted forecast (vs last review if known), deals per stage, the at-risk list (stale, close date passed, no open task, no contact), and ONE next best action per at-risk deal. Then offer to create the follow-up tasks (`tasks add … --record <dealId>`) and fix stale close dates (`records update <id> --set closeDate=…`). Playbook and next-best-action rules: references/playbooks.md.
|
|
@@ -40,9 +40,9 @@ Answer with: open amount and weighted forecast (vs last review if known), deals
|
|
|
40
40
|
For a person, company or deal:
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
44
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
45
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
43
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 records get <id> --site acme --json
|
|
44
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 activities list --site acme --record <id> --related --limit 30 --json
|
|
45
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 tasks list --site acme --record <id> --status all --json
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
Brief (one page): who they are (role, company, size, industry), relationship history (last 5 interactions, open questions, promises made), open deals (stage, amount, close date), recent public news about the company (cite links), 3 goals for the meeting, questions to ask, risks. Offer to save it as a note on the record.
|
|
@@ -54,7 +54,7 @@ Read the record and its timeline (as above), then draft the email: subject + bod
|
|
|
54
54
|
## Lead qualification and enrichment
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
57
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 records list --site acme --object people --filter lifecycleStage:eq:lead --sort createdAt:desc --limit 25 --json
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
For each lead: read the record and its company; enrich from public sources (company website: size, industry, location; the person's public role); score fit (1-5) and intent from the timeline; recommend a lifecycle stage and an owner. Present a table, then apply approved changes with `records update` and log the sources with `notes add`. Details: references/enrichment.md.
|
|
@@ -62,8 +62,8 @@ For each lead: read the record and its company; enrich from public sources (comp
|
|
|
62
62
|
## Clean duplicates
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
66
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
65
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 records duplicates --site acme --object people --json
|
|
66
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 records duplicates --site acme --object companies --json
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
For each group, pick the primary (most complete, most activities), show what the merge keeps, then `records merge <primaryId> <dupId>...` (plan, then `--yes`) group by group.
|
|
@@ -71,18 +71,18 @@ For each group, pick the primary (most complete, most activities), show what the
|
|
|
71
71
|
## Trade show / event lead lists
|
|
72
72
|
|
|
73
73
|
1. Look at the file (headers, a few rows) and map columns to people fields; put the event name in `leadSource` (add the option if missing) and `tags`.
|
|
74
|
-
2. Dry run: `npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
74
|
+
2. Dry run: `npx -y @fleox-agent-crm/agentcrm@0.3.2 import csv leads.csv --site acme --object people --map "…" --json`. Report new vs existing contacts and errors.
|
|
75
75
|
3. After approval: the same with `--yes`.
|
|
76
76
|
4. Offer the follow-up: a task per hot lead for its owner, or a note on each record with the booth conversation if the file has comments.
|
|
77
77
|
|
|
78
78
|
## Weekly sales report
|
|
79
79
|
|
|
80
80
|
```bash
|
|
81
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
82
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
83
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
84
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
85
|
-
npx -y @fleox-agent-crm/agentcrm@0.3.
|
|
81
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 report won-lost --site acme --months 3 --json
|
|
82
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 report activity --site acme --days 7 --json
|
|
83
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 report pipeline --site acme --json
|
|
84
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 report conversion --site acme --json
|
|
85
|
+
npx -y @fleox-agent-crm/agentcrm@0.3.2 tasks list --site acme --overdue --json
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
Template and what to compute: references/weekly-report.md.
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./sdk-CnrLnlRo.js","./index-DidVVK7L.js","./index-hMXwHSvN.css","./index.esm-Dum0J07z.js","./index.esm2017-EOzKbpUS.js","./index.esm-CtEQZRb1.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as Y,w as Z,_ as ee,C as L,e as te,p as z,n as ie,r as ne,F as K,a as se}from"./index-DidVVK7L.js";const oe=Symbol("deleteField");function G(e){return(e==null?void 0:e.code)??""}function _(e){const n=G(e);return n==="permission-denied"||n==="firestore/permission-denied"}const re=500;function ce(e,n){const s=[];for(let t=0;t<e.length;t+=n)s.push(e.slice(t,t+n));return s}const j="invites",F="extensionChunks",x=3e5,ae=["admin","member","viewer"];class N extends Error{constructor(n,s,t){super(s),this.reason=n,this.email=t,this.name="FirebaseAccessError"}}function be(e){return e.kind==="firebase"&&typeof e.accessError=="function"}function W(e){const{id:n,...s}=z(e);return s}function le(e){return ie({...e.data,id:e.id})}function T(e){return typeof e=="string"&&ae.includes(e)}function E(e){return typeof e=="string"?e.trim().toLowerCase():""}function H(e){return!!e&&!e.authUid&&!!E(e.email)}function ue(e,n,s){const t=new Map;for(const i of e){if(i.collection!=="users")continue;const c=i.op==="set"?i.doc.id:i.id,a=n(c),p=s.users.get(c),h=H(a)?E(a.email):"",m=H(p)?E(p.email):"";h&&h!==m&&t.set(h,{type:"delete",collection:j,id:h}),m&&p&&(p.disabled?t.set(m,{type:"delete",collection:j,id:m}):t.set(m,{type:"set",collection:j,id:m,data:{role:T(p.role)?p.role:"member",userId:c,email:m}}))}return[...t.values()]}const B=(e,n,s)=>`${e}__${n}__${s}`;function X(e){const n=(e==null?void 0:e.files)??{},s={};for(const[t,i]of Object.entries(n))typeof i=="string"&&(s[t]=Math.ceil(i.length/x));return s}function fe(e,n){const s=e.files??{},t=Object.values(s).reduce((p,h)=>p+(typeof h=="string"?h.length:0),0),i=[],c={},a=W(e);if(t>x){for(const[p,h]of Object.entries(s)){if(typeof h!="string")continue;const m=Math.ceil(h.length/x);c[p]=m;for(let y=0;y<m;y++)i.push({type:"set",collection:F,id:B(e.id,p,y),data:{ext:e.id,file:p,index:y,data:h.slice(y*x,(y+1)*x)}})}a.files={},a.chunks=c}for(const[p,h]of Object.entries(X(n)))for(let m=c[p]??0;m<h;m++)i.push({type:"delete",collection:F,id:B(e.id,p,m)});return i.unshift({type:"set",collection:"extensions",id:e.id,data:a}),i}function de(e,n){const s=new Map;for(const t of n){const i=String(t.data.ext??"");s.set(i,[...s.get(i)??[],t])}return e.map(t=>{const i=t.data.chunks;if(!i||typeof i!="object")return t;const c={},a=s.get(t.id)??[];for(const[m,y]of Object.entries(i)){const C=a.filter(O=>O.data.file===m).sort((O,D)=>Number(O.data.index)-Number(D.data.index));C.length===y&&(c[m]=C.map(O=>String(O.data.data??"")).join(""))}const{chunks:p,...h}=t.data;return{id:t.id,data:{...h,files:c}}})}function pe(e,n){const s=[];for(const t of e)if(t.op==="set"&&t.collection==="extensions")s.push(...fe(t.doc,n.extensions.get(t.doc.id)));else if(t.op==="set")s.push({type:"set",collection:t.collection,id:t.doc.id,data:W(t.doc)});else if(t.op==="delete"){if(s.push({type:"delete",collection:t.collection,id:t.id}),t.collection==="extensions")for(const[i,c]of Object.entries(X(n.extensions.get(t.id))))for(let a=0;a<c;a++)s.push({type:"delete",collection:F,id:B(t.id,i,a)})}else{if(!n[t.collection].has(t.id))continue;const i={};for(const[c,a]of Object.entries(t.fields))c==="id"||c.startsWith("id.")||(i[c]=a===void 0?oe:z(a));Object.keys(i).length&&s.push({type:"update",collection:t.collection,id:t.id,data:i})}return s}const he="files",q="Firebase Storage isn't enabled for this project: enable it in the Firebase console (Build → Storage), add `storageBucket` to the web config and deploy the storage rules (docs/files.md).";function me(e){const n=()=>{if(!e.storage)throw new K(q);return e.storage},s=i=>(se(i),`${he}/${i}`),t=async i=>{try{return await i()}catch(c){const a=G(c);throw a==="storage/unknown"||a==="storage/bucket-not-found"||a==="storage/no-default-bucket"?new K(q):c}};return{kind:"firebase",put:(i,c,a)=>t(()=>n().put(s(i),c,a==null?void 0:a.mime)),async putMany(i){for(const c of i)await t(()=>{var a;return n().put(s(c.id),c.bytes,(a=c.meta)==null?void 0:a.mime)})},get:i=>t(()=>n().get(s(i))),delete:i=>t(()=>n().delete(s(i)))}}function ge(e){const n=e.api,s=e.requireVerifiedEmail!==!1,t=e.now??Date.now;let i=null,c=null,a=null,p=new Map,h=!1;const m=n.auth.onChange(o=>{(!o||o.uid!==(c==null?void 0:c.uid))&&(i=null,c=null)});function y(o,r){const f=te();for(const d of L){const g=d==="extensions"?de(o.get(d)??[],r):o.get(d)??[];for(const l of g)f[d].set(l.id,le(l))}p=new Map(f.users);for(const d of[...f.users.values()])typeof d.replaces=="string"&&d.replaces!==d.id&&f.users.delete(d.replaces);return f}async function C(o){try{return await n.listCollection(o)}catch(r){if(_(r))return[];throw r}}async function O(o){const r=E(o.email);let f=null;try{f=await n.getDoc("users",o.uid)}catch(u){if(!_(u))throw u}if(f)return T(f.role)?f.role:"viewer";if(s&&!o.emailVerified)throw new N("unverified","Verify your email address to continue.",r);const d={email:r,name:o.displayName||r.split("@")[0]||"User",authUid:o.uid,createdAt:t(),updatedAt:t(),...o.photoURL?{avatarUrl:o.photoURL}:{}},g=(u,b={})=>n.commit([{type:"set",collection:"users",id:o.uid,data:{...d,...b,role:u}}]);try{return await g("admin"),"admin"}catch(u){if(!_(u))throw u}let l=null;try{l=r?await n.getDoc(j,r):null}catch(u){if(!_(u))throw u}const w=l&&T(l.role)?l.role:"member";try{return await g(w,l&&typeof l.userId=="string"?{replaces:l.userId}:{}),w}catch(u){if(!_(u))throw u}throw new N("notInvited","This account has not been invited to this CRM. Ask an admin to add your email in Settings → Users.",r)}async function D(){const o=await n.auth.currentUser();if(!o)return a=null,null;try{const r=await O(o);return a=null,{uid:o.uid,email:E(o.email),displayName:o.displayName||E(o.email),role:r}}catch(r){return a=r instanceof N?r:new N("error",r.message,E(o.email)),null}}async function J(o,r,f){const d=pe(o,r);(c==null?void 0:c.role)==="admin"&&d.push(...ue(o,g=>r.users.get(g)??p.get(g),f));for(const g of ce(d,re))await n.commit(g);for(const g of o){if(g.collection!=="users")continue;const l=g.op==="set"?g.doc.id:g.id,w=f.users.get(l);w?p.set(l,w):p.delete(l)}}const S=Y({kind:"firebase",async load(){const o=new Map;let r=[];await Promise.all([...L.map(async d=>o.set(d,await C(d))),C(F).then(d=>r=d)]);const f=y(o,r);return P(),f},persist:(o,r,f)=>J(o,r,f),watch(o){const r=new Map;let f=null;const d=()=>{r.size<L.length||f===null||(o(y(r,f)),P())},g=L.map(l=>n.watchCollection(l,w=>{r.set(l,w),d()},w=>{_(w)?r.set(l,[]):console.warn(`[firebase] live updates of ${l} stopped:`,w)}));return g.push(n.watchCollection(F,l=>{f=l,d()},l=>{_(l)?f=[]:console.warn("[firebase] live updates of extension chunks stopped:",l)})),()=>g.forEach(l=>l())},identity(){return i||(i=D().then(o=>(c=o,o||(i=null),o))),i},close(){m()}});function P(){if((c==null?void 0:c.role)!=="admin"||h)return;const o=[...p.values()].filter(r=>typeof r.replaces=="string");o.length&&(h=!0,setTimeout(()=>{Q(o).finally(()=>h=!1)},0))}async function Q(o){var l;const r=[],f=[],d=S.list("objects"),g=new Map(d.map(w=>[w.id,(w.fields??[]).filter(u=>u.type==="user").map(u=>u.id)]));for(const w of o){const u=w.replaces,b=w.id,k=p.get(u);for(const v of S.list("records")){const I={};v.ownerId===u&&(I.ownerId=b),v.createdBy===u&&(I.createdBy=b);for(const M of g.get(v.object)??[]){const A=(l=v.fields)==null?void 0:l[M];A===u?I[`fields.${M}`]=b:Array.isArray(A)&&A.includes(u)&&(I[`fields.${M}`]=A.map(V=>V===u?b:V))}Object.keys(I).length&&r.push({op:"patch",collection:"records",id:v.id,fields:I})}for(const v of S.list("activities"))v.assigneeId===u&&r.push({op:"patch",collection:"activities",id:v.id,fields:{assigneeId:b}});const R=S.get("settings","general");(R==null?void 0:R.ownerUserId)===u&&r.push({op:"patch",collection:"settings",id:"general",fields:{ownerUserId:b}}),k&&(r.push({op:"delete",collection:"users",id:u}),E(k.email)&&f.push({type:"delete",collection:j,id:E(k.email)})),r.push({op:"patch",collection:"users",id:b,fields:{replaces:void 0,...k&&k.role!==w.role&&T(k.role)?{role:k.role}:{}}})}try{await S.write(r,{message:"Link invited users"}),f.length&&await n.commit(f)}catch(w){console.warn("[firebase] could not link invited users:",w)}}return Z(S,me(n)),Object.assign(S,{api:n,accessError:()=>a,resetSession(){i=null,c=null,a=null}})}const $=new Map;function we(e){const n=e.firebase.projectId??"default";let s=$.get(n);return s||(s=ee(()=>import("./sdk-CnrLnlRo.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url).then(t=>t.createSdkFirebaseApi(e.firebase)),$.set(n,s),s.catch(()=>$.delete(n))),s}let U=null;ne("firebase",{async signOut(){await(U==null?void 0:U.auth.signOut())}});async function Ee(e,n={}){var i;const s=e;if(!((i=s.firebase)!=null&&i.apiKey)||!s.firebase.projectId)throw new Error("The Firebase web config (apiKey, projectId) is missing.");const t=await we(s);return U=t,ge({api:t})}export{oe as DELETE_FIELD,F as EXTENSION_CHUNKS_COLLECTION,x as EXTENSION_CHUNK_CHARS,re as FIRESTORE_BATCH_LIMIT,N as FirebaseAccessError,j as INVITES_COLLECTION,he as STORAGE_FILES_DIR,q as STORAGE_NOT_ENABLED,de as assembleExtensionDocs,ce as chunk,Ee as createFirebaseStore,ge as createFirebaseStoreWith,E as emailKey,G as errorCode,we as firebaseApiFor,me as firebaseFileStore,ue as inviteOps,be as isFirebaseStore,_ as isPermissionDenied,pe as mutationOps};
|