@startanaicompany/crm 2.21.1 → 2.22.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.
- package/README.md +15 -222
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -1,236 +1,29 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ⚠️ DEPRECATED
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**This package has been renamed.** No new versions will be published under `@startanaicompany/crm`.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Migrate to the new package
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm
|
|
8
|
+
npm uninstall -g @startanaicompany/crm
|
|
9
|
+
npm install -g @goryanio2025/saac-crm
|
|
9
10
|
```
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## 🏢 Multi-Tenant Architecture
|
|
14
|
-
|
|
15
|
-
This CRM is **multi-tenant**: each company gets its own isolated workspace. All data (leads, contacts, calls, contracts, etc.) is completely separated between workspaces.
|
|
16
|
-
|
|
17
|
-
- One workspace slug per company (e.g. `mygardeningcompany`, `johnscarshop`)
|
|
18
|
-
- All agents of a company share the same workspace — one key per "fleet" or one key per agent, your choice
|
|
19
|
-
- Cross-workspace data access is impossible: a key from workspace `mygardeningcompany` can never see data from `johnscarshop`
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## 🤖 AI Agent Quick Start (zero-auth)
|
|
24
|
-
|
|
25
|
-
Agents bootstrap themselves in two steps:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
# Step 1: Point at the CRM deployment
|
|
29
|
-
saac_crm config set --url https://crm.startanaicompany.com
|
|
30
|
-
|
|
31
|
-
# Step 2: Bootstrap your workspace + get an API key (no auth needed, no human required)
|
|
32
|
-
saac_crm workspace init --workspace mygardeningcompany --name my-agent
|
|
33
|
-
# → Returns crm_xxxx API key + saves key + workspace to ~/.saac_crm/config.json
|
|
34
|
-
|
|
35
|
-
# Step 3: Start working (workspace is automatically used from config)
|
|
36
|
-
saac_crm leads create --name "Jane Smith" --email "jane@example.com"
|
|
37
|
-
saac_crm leads list
|
|
38
|
-
|
|
39
|
-
# Optional: attribute actions to a named agent for audit trail
|
|
40
|
-
saac_crm leads create --name "Bob Jones" --email "bob@example.com" --from-agent-name "discovery-agent-v2"
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
> **Auth priority**: `--api-key` flag > `SAAC_CRM_API_KEY` env var > config file (`~/.saac_crm/config.json`)
|
|
44
|
-
> **Workspace priority**: `--workspace` flag > `SAAC_CRM_WORKSPACE` env var > config file `workspace` field
|
|
45
|
-
|
|
46
|
-
> ⚠️ **Agents: `workspace init` is idempotent** — if the workspace already exists, it just creates a new key for it. Safe to call from any agent on first run.
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
## 👤 Operator Setup (one-time, human)
|
|
51
|
-
|
|
52
|
-
For the initial admin setup or to create admin-scope keys:
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
# 1. Point at your deployment
|
|
56
|
-
saac_crm config set --url https://crm.startanaicompany.com
|
|
57
|
-
|
|
58
|
-
# 2. Create admin-scope key for your workspace (requires deployment admin password)
|
|
59
|
-
saac_crm keys create --name "admin-key" --workspace mycompany --scope admin
|
|
60
|
-
# → Prompts for admin password
|
|
12
|
+
The new package has the same `saac_crm` command, same API, same config (`~/.saac_crm/config.json`). Nothing else changes for you.
|
|
61
13
|
|
|
62
|
-
|
|
63
|
-
saac_crm config set --api-key crm_xxx_admin_key
|
|
64
|
-
saac_crm users create --email admin@example.com --name "Admin" --role admin
|
|
65
|
-
```
|
|
14
|
+
➡️ **New package:** https://www.npmjs.com/package/@goryanio2025/saac-crm
|
|
66
15
|
|
|
67
16
|
---
|
|
68
17
|
|
|
69
|
-
##
|
|
70
|
-
|
|
71
|
-
### Workspace
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
# Bootstrap workspace + create API key in one step (recommended for agent auto-init)
|
|
75
|
-
saac_crm workspace init --workspace mycompany --name "my-agent"
|
|
76
|
-
saac_crm workspace init --workspace mycompany --name "admin-key" --scope admin
|
|
77
|
-
|
|
78
|
-
# Via REST: POST /api/v1/workspaces/register
|
|
79
|
-
# Body: { workspace, key_name, scope?, admin_password? }
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### API Keys
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
# Create agent key — workspace required (auto-creates workspace if it doesn't exist yet)
|
|
86
|
-
saac_crm keys create --name "my-agent" --workspace mycompany
|
|
87
|
-
|
|
88
|
-
# Create admin scope key (requires deployment password)
|
|
89
|
-
saac_crm keys create --name "admin-key" --workspace mycompany --scope admin
|
|
90
|
-
|
|
91
|
-
# List all keys in current workspace
|
|
92
|
-
saac_crm keys list
|
|
93
|
-
|
|
94
|
-
# Show current key info
|
|
95
|
-
saac_crm keys self
|
|
18
|
+
## Why?
|
|
96
19
|
|
|
97
|
-
|
|
98
|
-
saac_crm keys revoke <id>
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### Leads
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
# Create a lead (optional: --from-agent-name for audit trail)
|
|
105
|
-
saac_crm leads create --name "Jane Smith" --email "jane@example.com" --company "Acme" --from-agent-name "lead-gen-agent"
|
|
106
|
-
|
|
107
|
-
# List leads (with filters)
|
|
108
|
-
saac_crm leads list --status new --tag vip
|
|
109
|
-
|
|
110
|
-
# Get single lead
|
|
111
|
-
saac_crm leads get <id>
|
|
112
|
-
|
|
113
|
-
# Update lead
|
|
114
|
-
saac_crm leads update <id> --status contacted --notes "Called, interested"
|
|
115
|
-
|
|
116
|
-
# Soft-delete lead
|
|
117
|
-
saac_crm leads delete <id>
|
|
118
|
-
|
|
119
|
-
# Status change history
|
|
120
|
-
saac_crm leads history <id>
|
|
121
|
-
|
|
122
|
-
# Move lead to pipeline stage
|
|
123
|
-
saac_crm leads stage <id> --stage discovery
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### Contacts
|
|
127
|
-
|
|
128
|
-
```bash
|
|
129
|
-
saac_crm contacts create --email contact@example.com --first-name "Jane" --from-agent-name "enrichment-agent"
|
|
130
|
-
saac_crm contacts list
|
|
131
|
-
saac_crm contacts get <id>
|
|
132
|
-
saac_crm contacts update <id> --company "Acme"
|
|
133
|
-
saac_crm contacts delete <id>
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### Calls
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
saac_crm calls create --lead-id <id> --direction outbound --outcome connected --from-agent-name "call-agent"
|
|
140
|
-
saac_crm calls list [--lead-id <id>]
|
|
141
|
-
saac_crm calls get <id>
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### Meetings
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
saac_crm meetings create --lead-id <id> --title "Demo call" --from-agent-name "scheduler-agent"
|
|
148
|
-
saac_crm meetings list
|
|
149
|
-
saac_crm meetings get <id>
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
### Emails
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
saac_crm emails create --lead-id <id> --subject "Follow-up" --direction sent --from-agent-name "outreach-agent"
|
|
156
|
-
saac_crm emails list [--lead-id <id>]
|
|
157
|
-
saac_crm emails get <id>
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### Quotes
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
saac_crm quotes create --lead-id <id> --title "Q-2026-001" --value 5000 --from-agent-name "quote-agent"
|
|
164
|
-
saac_crm quotes list
|
|
165
|
-
saac_crm quotes get <id>
|
|
166
|
-
saac_crm quotes status <id> --status accepted
|
|
167
|
-
saac_crm quotes add-line <id> --description "License" --quantity 1 --unit-price 5000
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
### Contracts
|
|
171
|
-
|
|
172
|
-
```bash
|
|
173
|
-
saac_crm contracts create --lead-id <id> --title "Service Agreement" --from-agent-name "contract-agent"
|
|
174
|
-
saac_crm contracts list
|
|
175
|
-
saac_crm contracts get <id>
|
|
176
|
-
saac_crm contracts status <id> --status sent
|
|
177
|
-
saac_crm contracts signatories <id>
|
|
178
|
-
saac_crm contracts add-signatory <id> --contact-id <cid> --party customer --role signer
|
|
179
|
-
saac_crm contracts sign <id> --contact-id <cid>
|
|
180
|
-
saac_crm contracts decline-signature <id> --contact-id <cid>
|
|
181
|
-
saac_crm contracts remind-signatory <id> --contact-id <cid>
|
|
182
|
-
saac_crm contracts remind-all-pending <id>
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### Users (requires admin scope key)
|
|
186
|
-
|
|
187
|
-
```bash
|
|
188
|
-
saac_crm users create --email admin@example.com --name "Admin User" --role admin
|
|
189
|
-
saac_crm users list
|
|
190
|
-
saac_crm users update <id> --role viewer
|
|
191
|
-
saac_crm users deactivate <id>
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
### Human Login
|
|
195
|
-
|
|
196
|
-
```bash
|
|
197
|
-
# Log in as admin/viewer — saves JWT to config for dashboard access
|
|
198
|
-
saac_crm login --workspace mycompany --email admin@example.com
|
|
199
|
-
# → Prompts for password, saves JWT to ~/.saac_crm/config.json
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### Configuration
|
|
203
|
-
|
|
204
|
-
```bash
|
|
205
|
-
saac_crm config set --url https://crm.startanaicompany.com
|
|
206
|
-
saac_crm config set --api-key crm_xxxxxxxxxxxx
|
|
207
|
-
saac_crm config set --workspace mycompany
|
|
208
|
-
saac_crm config set --agent-name "my-agent-v2" # default --from-agent-name for all commands
|
|
209
|
-
saac_crm config get
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
## Global Options
|
|
213
|
-
|
|
214
|
-
```
|
|
215
|
-
--api-key <key> Override API key for this command
|
|
216
|
-
--url <url> Override API base URL for this command
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
## `--from-agent-name` Attribution
|
|
220
|
-
|
|
221
|
-
Pass `--from-agent-name <name>` (or set `SAAC_CRM_AGENT_NAME` env / `config.defaultAgentName`) on any create command to attribute the action to a named agent. This is for **audit trail only** — it does NOT affect authentication or authorization. The same workspace key is shared across all agents of that workspace.
|
|
222
|
-
|
|
223
|
-
```bash
|
|
224
|
-
export SAAC_CRM_AGENT_NAME=discovery-agent-v2
|
|
225
|
-
saac_crm leads create --name "Alice" --email "alice@example.com"
|
|
226
|
-
# → lead.from_agent_name = "discovery-agent-v2"
|
|
227
|
-
```
|
|
20
|
+
Package ownership moved. The original `@startanaicompany/crm` name is no longer maintained. All future updates, bug fixes, and documentation live under the new name.
|
|
228
21
|
|
|
229
|
-
##
|
|
22
|
+
## If you stay on this package
|
|
230
23
|
|
|
231
|
-
|
|
24
|
+
You'll keep working — published versions remain installable — but you will:
|
|
25
|
+
- Stop receiving updates.
|
|
26
|
+
- See a deprecation warning on every install.
|
|
27
|
+
- This final version (`2.22.0`) renames the binary from `saac_crm` to `old-dontuse` specifically so you notice you're on the wrong package.
|
|
232
28
|
|
|
233
|
-
|
|
234
|
-
- **Operators** → `keys create --scope admin` → `users create` → human accounts
|
|
235
|
-
- **Humans** → `login` → web dashboard (only shows their workspace's data)
|
|
236
|
-
- **Audit** → `--from-agent-name` for per-agent attribution within a workspace
|
|
29
|
+
Please migrate.
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startanaicompany/crm",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.22.0",
|
|
4
|
+
"description": "DEPRECATED — renamed to @goryanio2025/saac-crm. Run: npm install -g @goryanio2025/saac-crm",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"
|
|
7
|
+
"old-dontuse": "./index.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "echo \"No tests yet\""
|
|
@@ -18,6 +18,11 @@
|
|
|
18
18
|
"agent"
|
|
19
19
|
],
|
|
20
20
|
"license": "MIT",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://git.startanaicompany.com/goryanio2025/saac_crm.git",
|
|
24
|
+
"directory": "packages/crm-cli"
|
|
25
|
+
},
|
|
21
26
|
"files": [
|
|
22
27
|
"index.js",
|
|
23
28
|
"README.md",
|