@dealmachine/cli 0.1.5 → 0.5.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 +137 -10
- package/dist/agents/dealmachine-playbook.md +88 -34
- package/dist/commands/account.d.ts +3 -1
- package/dist/commands/account.d.ts.map +1 -1
- package/dist/commands/account.js +8 -2
- package/dist/commands/account.js.map +1 -1
- package/dist/commands/activity.js.map +1 -1
- package/dist/commands/addresses.js.map +1 -1
- package/dist/commands/agents.d.ts +7 -0
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +124 -8
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/comps.js.map +1 -1
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/driving.d.ts +13 -0
- package/dist/commands/driving.d.ts.map +1 -0
- package/dist/commands/driving.js +68 -0
- package/dist/commands/driving.js.map +1 -0
- package/dist/commands/enrich.d.ts +1 -0
- package/dist/commands/enrich.d.ts.map +1 -1
- package/dist/commands/enrich.js +9 -1
- package/dist/commands/enrich.js.map +1 -1
- package/dist/commands/exports.js.map +1 -1
- package/dist/commands/fields.js.map +1 -1
- package/dist/commands/filters.d.ts.map +1 -1
- package/dist/commands/filters.js +9 -2
- package/dist/commands/filters.js.map +1 -1
- package/dist/commands/lists.d.ts +5 -0
- package/dist/commands/lists.d.ts.map +1 -1
- package/dist/commands/lists.js +30 -7
- package/dist/commands/lists.js.map +1 -1
- package/dist/commands/locations.d.ts.map +1 -1
- package/dist/commands/locations.js +11 -6
- package/dist/commands/locations.js.map +1 -1
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.js.map +1 -1
- package/dist/commands/mail.d.ts +17 -0
- package/dist/commands/mail.d.ts.map +1 -1
- package/dist/commands/mail.js +180 -0
- package/dist/commands/mail.js.map +1 -1
- package/dist/commands/onboarding.js.map +1 -1
- package/dist/commands/people.d.ts +3 -1
- package/dist/commands/people.d.ts.map +1 -1
- package/dist/commands/people.js +27 -1
- package/dist/commands/people.js.map +1 -1
- package/dist/commands/phones.d.ts.map +1 -1
- package/dist/commands/phones.js.map +1 -1
- package/dist/commands/properties.d.ts +3 -1
- package/dist/commands/properties.d.ts.map +1 -1
- package/dist/commands/properties.js +27 -1
- package/dist/commands/properties.js.map +1 -1
- package/dist/commands/prospects.d.ts +133 -0
- package/dist/commands/prospects.d.ts.map +1 -0
- package/dist/commands/prospects.js +662 -0
- package/dist/commands/prospects.js.map +1 -0
- package/dist/commands/subscription.js.map +1 -1
- package/dist/commands/tags.d.ts +36 -0
- package/dist/commands/tags.d.ts.map +1 -0
- package/dist/commands/tags.js +132 -0
- package/dist/commands/tags.js.map +1 -0
- package/dist/commands/tasks.js.map +1 -1
- package/dist/commands/usage.js.map +1 -1
- package/dist/commands/webhooks.d.ts +59 -0
- package/dist/commands/webhooks.d.ts.map +1 -0
- package/dist/commands/webhooks.js +272 -0
- package/dist/commands/webhooks.js.map +1 -0
- package/dist/commands/whoami.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +530 -507
- package/dist/index.js.map +1 -1
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/api.js +2 -0
- package/dist/lib/api.js.map +1 -1
- package/dist/lib/client.d.ts +1 -0
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +23 -0
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/confirm.d.ts +11 -0
- package/dist/lib/confirm.d.ts.map +1 -0
- package/dist/lib/confirm.js +27 -0
- package/dist/lib/confirm.js.map +1 -0
- package/dist/lib/creditSafety.d.ts +17 -0
- package/dist/lib/creditSafety.d.ts.map +1 -0
- package/dist/lib/creditSafety.js +29 -0
- package/dist/lib/creditSafety.js.map +1 -0
- package/dist/lib/output.js.map +1 -1
- package/dist/lib/searchProtocol.js.map +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +29 -6
- package/dist/commands/crm.d.ts +0 -122
- package/dist/commands/crm.d.ts.map +0 -1
- package/dist/commands/crm.js +0 -519
- package/dist/commands/crm.js.map +0 -1
- package/dist/commands/dialer.d.ts +0 -79
- package/dist/commands/dialer.d.ts.map +0 -1
- package/dist/commands/dialer.js +0 -389
- package/dist/commands/dialer.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,20 +1,76 @@
|
|
|
1
1
|
# DealMachine CLI
|
|
2
2
|
|
|
3
|
+
Maintainers: [agent instructions](AGENTS.md), [development](docs/development.md), [current Command reference](docs/commands.md), and [npm releases](docs/releases.md).
|
|
4
|
+
|
|
3
5
|
DealMachine CLI (`dm`) -- property intelligence from the command line.
|
|
4
6
|
|
|
5
|
-
A standalone Commander.js CLI that talks to the DealMachine REST API. Provides
|
|
7
|
+
A standalone Commander.js CLI that talks to the DealMachine REST API. Provides Commands for authentication, property and people research, enrichment, lists, prospects, tags, webhooks, mail and developer utilities. Compiles to ESM JavaScript via `tsc`.
|
|
6
8
|
|
|
7
9
|
This package has **zero** `@dealmachine/*` dependencies -- it is a self-contained binary that communicates exclusively through the public API.
|
|
8
10
|
|
|
9
11
|
---
|
|
10
12
|
|
|
13
|
+
## AI agent integrations
|
|
14
|
+
|
|
15
|
+
This repository is also the public distribution package for the DealMachine MCP server and DealMachine skill.
|
|
16
|
+
|
|
17
|
+
- Hosted MCP server: `https://mcp.dealmachine.com`
|
|
18
|
+
- API documentation: `https://api.docs.dealmachine.com`
|
|
19
|
+
- Account and API keys: `https://dealmachine.com/settings/developer`
|
|
20
|
+
- Privacy policy: `https://dealmachine.com/privacy-policy`
|
|
21
|
+
- Terms of service: `https://dealmachine.com/terms-of-service`
|
|
22
|
+
- Support: `support@dealmachine.com`
|
|
23
|
+
|
|
24
|
+
The MCP server supports OAuth 2.1 for ChatGPT, Claude, Cursor, Codex, and other compatible clients. It can also use a DealMachine API key in developer clients that support bearer-token configuration.
|
|
25
|
+
|
|
26
|
+
The plugin package includes:
|
|
27
|
+
|
|
28
|
+
- A hosted MCP connection for property, people, enrichment, comparable-sales, and account tools
|
|
29
|
+
- A credit-aware skill that discovers filters and fields, counts first, and confirms large paid operations
|
|
30
|
+
- A portable [Agent Plugins](https://agent-plugins.org/) package for compatible clients
|
|
31
|
+
- Manifests for OpenAI, Claude, Cursor, GitHub Copilot, and Gemini
|
|
32
|
+
- Official MCP Registry metadata in `server.json`
|
|
33
|
+
|
|
34
|
+
The portable package follows Agent Plugins 1.0.0:
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
dealmachine-cli/
|
|
38
|
+
├── plugin.json
|
|
39
|
+
├── mcp.json
|
|
40
|
+
└── skills/
|
|
41
|
+
└── dealmachine/
|
|
42
|
+
├── SKILL.md
|
|
43
|
+
├── REFERENCE.md
|
|
44
|
+
└── SETUP.md
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Compatible clients discover the DealMachine skill from `skills/dealmachine/` and connect to the
|
|
48
|
+
hosted Streamable HTTP MCP server declared in `mcp.json`. Client-specific manifests remain in the
|
|
49
|
+
repository for compatibility, marketplace metadata, and richer presentation.
|
|
50
|
+
|
|
51
|
+
Example requests:
|
|
52
|
+
|
|
53
|
+
- "Find high-equity absentee-owned properties in Austin and estimate the credit cost first."
|
|
54
|
+
- "Look up the owner of this property and find available contact data."
|
|
55
|
+
- "Find comparable sales for this property."
|
|
56
|
+
- "Research people who match these criteria for a targeted prospecting list."
|
|
57
|
+
|
|
58
|
+
Direct skill installation:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npx skills add DealMachine/dealmachine-cli
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
11
66
|
## Table of Contents
|
|
12
67
|
|
|
68
|
+
- [AI agent integrations](#ai-agent-integrations)
|
|
13
69
|
- [Installation](#installation)
|
|
14
70
|
- [Authentication](#authentication)
|
|
15
71
|
- [Configuration](#configuration)
|
|
16
72
|
- [Commands](#commands)
|
|
17
|
-
- [Agents](#agents-commands) -- `agents`, `agents guide`, `agents playbook`
|
|
73
|
+
- [Agents](#agents-commands) -- `agents`, `agents guide`, `agents playbook`, `agents install`, `agents permissions`
|
|
18
74
|
- [Auth](#auth-commands) -- `login`, `logout`, `whoami`
|
|
19
75
|
- [Config](#config-commands) -- `config get`, `config set`, `config path`
|
|
20
76
|
- [Account](#account-commands) -- `account`
|
|
@@ -52,7 +108,7 @@ The canonical implementation package is `@dealmachine/cli`. The `dealmachine` pa
|
|
|
52
108
|
### From source
|
|
53
109
|
|
|
54
110
|
```bash
|
|
55
|
-
cd
|
|
111
|
+
cd dealmachine-cli
|
|
56
112
|
npm run build
|
|
57
113
|
node dist/index.js whoami
|
|
58
114
|
```
|
|
@@ -60,7 +116,7 @@ node dist/index.js whoami
|
|
|
60
116
|
### Link for local development
|
|
61
117
|
|
|
62
118
|
```bash
|
|
63
|
-
cd
|
|
119
|
+
cd dealmachine-cli
|
|
64
120
|
npm link
|
|
65
121
|
dm --version
|
|
66
122
|
```
|
|
@@ -202,7 +258,27 @@ dm agents playbook --json
|
|
|
202
258
|
dm agents skill # alias
|
|
203
259
|
```
|
|
204
260
|
|
|
205
|
-
The
|
|
261
|
+
The public CLI source keeps its bundled Playbook at `playbook/PLAYBOOK.md`. The build writes the selected source to `dist/agents/dealmachine-playbook.md`, so the command works from a published CLI package as well as a local source checkout.
|
|
262
|
+
|
|
263
|
+
#### `dm agents install claude-code`
|
|
264
|
+
|
|
265
|
+
Install the Playbook as a native Claude Code skill. Personal scope is the default. Project scope
|
|
266
|
+
installs under the current repository.
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
dm agents install claude-code
|
|
270
|
+
dm agents install claude-code --project
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
#### `dm agents permissions`
|
|
274
|
+
|
|
275
|
+
Print the narrow Claude Code allowlist for free discovery and count commands. Paid and mutating
|
|
276
|
+
commands are not pre-approved.
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
dm agents permissions
|
|
280
|
+
dm agents permissions --json
|
|
281
|
+
```
|
|
206
282
|
|
|
207
283
|
---
|
|
208
284
|
|
|
@@ -349,7 +425,7 @@ Output:
|
|
|
349
425
|
Credit Usage
|
|
350
426
|
──────────────────────────────────────────────────
|
|
351
427
|
Plan: Pro
|
|
352
|
-
Cycle: Mar 1, 2026
|
|
428
|
+
Cycle: Mar 1, 2026 : Mar 31, 2026
|
|
353
429
|
|
|
354
430
|
Credits: 4,200 / 10,000 (42%)
|
|
355
431
|
Remaining: 5,800
|
|
@@ -381,7 +457,11 @@ dm properties search -f search.json
|
|
|
381
457
|
cat search.json | dm properties search
|
|
382
458
|
|
|
383
459
|
# Machine-readable output
|
|
384
|
-
dm properties search -f search.json --json
|
|
460
|
+
dm properties search -f search.json --json # Free estimate for scripts and agents
|
|
461
|
+
dm properties search -f search.json --json --yes # Run after approval
|
|
462
|
+
|
|
463
|
+
# Explicit free estimate
|
|
464
|
+
dm properties search -f search.json --estimate-cost
|
|
385
465
|
|
|
386
466
|
# Query Builder protocol filters
|
|
387
467
|
dm properties search --include-lists 123,456 --exclude-previously-exported --body '{"locations":[]}'
|
|
@@ -395,6 +475,8 @@ dm properties search --include-lists 123,456 --exclude-previously-exported --bod
|
|
|
395
475
|
| `--exclude-lists <ids>` | Comma-separated list IDs to exclude |
|
|
396
476
|
| `--exclude-previously-exported` | Exclude records already exported by your organization |
|
|
397
477
|
| `--bigquery-data-environment <n>` | Query Builder data environment (`1` production, `2` staging, `3` development) |
|
|
478
|
+
| `--estimate-cost` | Preview counts and credit cost without consuming credits |
|
|
479
|
+
| `--yes` | Confirm approved credit spend for non-interactive execution |
|
|
398
480
|
| `--json` | Output as JSON |
|
|
399
481
|
|
|
400
482
|
#### `dm properties count`
|
|
@@ -484,9 +566,14 @@ dm people search --body '{
|
|
|
484
566
|
"filters": [{"filter_id": "age", "operator": "between", "value": [30, 50]}]
|
|
485
567
|
}'
|
|
486
568
|
dm people search -f people-search.json --json
|
|
569
|
+
dm people search -f people-search.json --estimate-cost
|
|
570
|
+
dm people search -f people-search.json --json --yes
|
|
487
571
|
dm people search --include-lists 123 --exclude-lists 456 --exclude-previously-exported --body '{"locations":[]}'
|
|
488
572
|
```
|
|
489
573
|
|
|
574
|
+
Non-interactive People Search returns a free estimate unless `--yes` is supplied. A specific person
|
|
575
|
+
by name uses `dm enrich name`, not People Search.
|
|
576
|
+
|
|
490
577
|
#### `dm people count`
|
|
491
578
|
|
|
492
579
|
Count people matching filters without consuming credits.
|
|
@@ -638,8 +725,8 @@ dm enrich phone -f phones.csv --include-properties --fields estimated_value
|
|
|
638
725
|
Look up people by name. Supports "First Last" or just "Last" format.
|
|
639
726
|
|
|
640
727
|
```bash
|
|
641
|
-
dm enrich name "Jane Doe"
|
|
642
728
|
dm enrich name "Jane Doe" --state TX --estimate-cost
|
|
729
|
+
dm enrich name "Jane Doe" --state TX --json --yes
|
|
643
730
|
dm enrich name "Doe" --state TX --page 2
|
|
644
731
|
dm enrich name "Jane Doe" --zip 78704 --include-properties
|
|
645
732
|
dm enrich name "Jane Doe" --fields estimated_household_income,estimated_value
|
|
@@ -652,6 +739,7 @@ dm enrich name "Jane Doe" --fields estimated_household_income,estimated_value
|
|
|
652
739
|
| `--include-properties` | Include associated properties |
|
|
653
740
|
| `--fields <csv>` | Field IDs from `dm fields` |
|
|
654
741
|
| `--estimate-cost` | Preview count and credits |
|
|
742
|
+
| `--yes` | Confirm approved credit spend |
|
|
655
743
|
| `--page <n>` | Page number |
|
|
656
744
|
| `--per-page <n>` | Results per page |
|
|
657
745
|
|
|
@@ -1049,7 +1137,7 @@ Batches larger than 250 items are automatically chunked with progress spinners.
|
|
|
1049
1137
|
## Project Structure
|
|
1050
1138
|
|
|
1051
1139
|
```
|
|
1052
|
-
|
|
1140
|
+
dealmachine-cli/
|
|
1053
1141
|
scripts/
|
|
1054
1142
|
copy-agent-assets.mjs # Bundles the Playbook Markdown into dist/agents
|
|
1055
1143
|
src/
|
|
@@ -1098,8 +1186,41 @@ packages/cli/
|
|
|
1098
1186
|
```bash
|
|
1099
1187
|
npm run build # Compile TypeScript and bundle agent Playbook assets to dist/
|
|
1100
1188
|
npm run dev # Watch mode (tsc --watch)
|
|
1189
|
+
npm run eval:cold-start:local # Verify a clean local install and routing contract
|
|
1190
|
+
npm run eval:cold-start:published # Verify the latest public npm artifact
|
|
1191
|
+
npm run eval:cold-start:deployed # Verify deployed documentation and skill assets
|
|
1101
1192
|
```
|
|
1102
1193
|
|
|
1194
|
+
The published and deployed checks are release gates. They are expected to fail before a release is
|
|
1195
|
+
published or the documentation deployment reaches production. The scenario catalog is stored in
|
|
1196
|
+
`evals/claude-code-name-lookup.json` so the same prompt variants remain visible and reviewable.
|
|
1197
|
+
|
|
1198
|
+
### Testing
|
|
1199
|
+
|
|
1200
|
+
```bash
|
|
1201
|
+
npm test # Unit and behavioral tests with a mocked API (no credentials)
|
|
1202
|
+
npm run check # Typecheck, build, tests and the public artifact guard
|
|
1203
|
+
DM_API_URL=https://api-staging.v2.dealmachine.com/v1 DM_API_KEY=<key> npm run smoke:live:coverage
|
|
1204
|
+
```
|
|
1205
|
+
|
|
1206
|
+
`npm test` never calls an API. `smoke:live:coverage` builds the CLI and runs the real `dm` binary against
|
|
1207
|
+
the API named by `DM_API_URL`, authenticated with `DM_API_KEY`. Both are required; the key is never
|
|
1208
|
+
printed. Each Command runs with a temporary home directory, so the smoke never reads or changes
|
|
1209
|
+
your own `dm login` credentials. It runs only read-only, credit-free Commands:
|
|
1210
|
+
|
|
1211
|
+
| Command | Checks |
|
|
1212
|
+
| ----------------------------------------------------------- | ---------------------------------------------------------- |
|
|
1213
|
+
| `dm --version` | Prints the package version without a network request |
|
|
1214
|
+
| `dm account --json` | Organization, user auth type and plan are present |
|
|
1215
|
+
| `dm filters --source-type properties --per-page 5 --json` | Filters have IDs, names, operators and pagination |
|
|
1216
|
+
| `dm fields --source-type properties --per-page 5 --json` | Fields have IDs, names and pagination |
|
|
1217
|
+
| `dm properties search --body <ZIP 78704> --estimate-cost --json` | Returns an estimate with no records and no charged credits |
|
|
1218
|
+
|
|
1219
|
+
Requests pass through a local relay that refuses anything outside those read-only Endpoints
|
|
1220
|
+
(property search must carry `estimate_cost: true`) and confirms each request sends
|
|
1221
|
+
`X-DealMachine-Source: cli` and the CLI `User-Agent`. The smoke prints one `PASS` or `FAIL` line per
|
|
1222
|
+
Command and exits 0 only when every Command passes.
|
|
1223
|
+
|
|
1103
1224
|
### Standalone Binary
|
|
1104
1225
|
|
|
1105
1226
|
The compiled `dist/index.js` includes a `#!/usr/bin/env node` shebang and is declared in `package.json` under `bin.dm`. When installed globally via npm, it becomes available as `dm` on the PATH.
|
|
@@ -1108,7 +1229,7 @@ For distribution as a standalone binary without npm:
|
|
|
1108
1229
|
|
|
1109
1230
|
```bash
|
|
1110
1231
|
# Build
|
|
1111
|
-
cd
|
|
1232
|
+
cd dealmachine-cli
|
|
1112
1233
|
npm run build
|
|
1113
1234
|
|
|
1114
1235
|
# The entire dist/ directory is the distributable artifact
|
|
@@ -1238,3 +1359,9 @@ node dist/index.js mycommand --json
|
|
|
1238
1359
|
### Used By
|
|
1239
1360
|
|
|
1240
1361
|
The **Playbook** at `packages/playbooks/playbook/` uses `dm` commands to execute property intelligence workflows. The CLI is the primary interface through which the Playbook interacts with DealMachine data. Agents can load the bundled Playbook directly with `dm agents playbook`.
|
|
1362
|
+
|
|
1363
|
+
## Factory staging work tracking
|
|
1364
|
+
|
|
1365
|
+
The `factory-release-intake.yml` workflow is maintained on master and reads merged PRs from staging. It reports source and, where registered, the exact staging deployment to Factory Releases, reusing Linear links or creating one configurable pilot tracking issue. Scheduled reconciliation retries missed events without duplicate issues. It does not deploy this repository, run QA or approve production.
|
|
1366
|
+
|
|
1367
|
+
The collector is generated from Factory. See [automatic staging intake](https://github.com/DealMachine/dealmachine-factory/blob/master/guides/staging-intake.md) for configuration, source ownership, regeneration and recovery. Staging remains the branch being checked even though the reporting workflow lives on master.
|
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dealmachine
|
|
3
|
-
description: Natural language interface to DealMachine property
|
|
3
|
+
description: Natural language interface to the DealMachine CLI. Use when the user wants property or owner lookups, property or people searches, comps and valuations, skip tracing or contact enrichment, address validation, list building, or exports, including "who owns...", "find absentee owners in...", "comps for...", or any mention of DealMachine or the dm CLI.
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
6
|
author: DealMachine
|
|
7
7
|
version: '1.0'
|
|
8
8
|
type: application
|
|
9
|
+
allowed-tools:
|
|
10
|
+
- Bash(dm agents)
|
|
11
|
+
- Bash(dm agents guide *)
|
|
12
|
+
- Bash(dm agents playbook *)
|
|
13
|
+
- Bash(dm agents skill *)
|
|
14
|
+
- Bash(dm agents permissions *)
|
|
15
|
+
- Bash(dm whoami *)
|
|
16
|
+
- Bash(dm account *)
|
|
17
|
+
- Bash(dm usage *)
|
|
18
|
+
- Bash(dm filters *)
|
|
19
|
+
- Bash(dm fields *)
|
|
20
|
+
- Bash(dm locations *)
|
|
21
|
+
- Bash(dm properties count *)
|
|
22
|
+
- Bash(dm people count *)
|
|
23
|
+
- WebFetch(domain:api.docs.dealmachine.com)
|
|
9
24
|
---
|
|
10
25
|
|
|
11
26
|
# DealMachine Playbook: Natural Language Property Intelligence
|
|
@@ -113,14 +128,19 @@ If a command fails due to auth, tell the user to run `dm login` in their termina
|
|
|
113
128
|
|
|
114
129
|
1. **Fetch filters and fields first** — run `dm filters --source-type properties --json` and `dm fields --source-type properties --json` to see exactly what's available. Match the user's natural language to real filter IDs. Never guess a filter ID.
|
|
115
130
|
2. **Always count first** — use `dm properties count` (FREE) to show how many match
|
|
116
|
-
3.
|
|
117
|
-
4.
|
|
118
|
-
5.
|
|
119
|
-
6.
|
|
131
|
+
3. Run `dm properties search ... --estimate-cost` to get the exact free estimate for the requested page and output shape
|
|
132
|
+
4. Confirm the count, requested data, and credit estimate with the user
|
|
133
|
+
5. Execute the approved search with `--yes`
|
|
134
|
+
6. If the user's request implies multiple searches (e.g., "find high-equity properties and also any recently sold ones"), run each as a separate search and combine/compare results
|
|
135
|
+
7. Format and present results
|
|
120
136
|
|
|
121
137
|
### State DM3: People Search
|
|
122
138
|
|
|
123
|
-
**Symptoms:** User wants to find people (owners, renters, residents) matching criteria.
|
|
139
|
+
**Symptoms:** User wants to find an audience of people (owners, renters, residents) matching demographic, property, contact, or location criteria.
|
|
140
|
+
|
|
141
|
+
**Routing boundary:** Do not use this state when the user provides a specific person's name. People
|
|
142
|
+
Search has no name filter. Route a known name to State DM5 and use `dm enrich name`.
|
|
143
|
+
|
|
124
144
|
**Key Questions:**
|
|
125
145
|
|
|
126
146
|
- Are you looking for property owners, renters, or residents?
|
|
@@ -130,10 +150,11 @@ If a command fails due to auth, tell the user to run `dm login` in their termina
|
|
|
130
150
|
|
|
131
151
|
1. **Fetch filters and fields first** — run `dm filters --source-type people --json` and `dm fields --source-type people --json` to see exactly what's available. Match the user's natural language to real filter IDs. Never guess a filter ID.
|
|
132
152
|
2. **Always count first** — use `dm people count` (FREE)
|
|
133
|
-
3.
|
|
134
|
-
4.
|
|
135
|
-
5.
|
|
136
|
-
6.
|
|
153
|
+
3. Run `dm people search ... --estimate-cost` to get the exact free estimate
|
|
154
|
+
4. Confirm count, requested data, and credit estimate
|
|
155
|
+
5. Execute the approved search with `--yes`. People searches accept people filters only — if the user's criteria include property attributes, run them from the property side instead: `dm properties count -f query.json` with `"contact_audience": "owners"` in the body for a free owner count, then `dm properties export -f query.json --contact-audience owners` for owner rows
|
|
156
|
+
6. If the user's request implies multiple searches, run each separately and combine results
|
|
157
|
+
7. Format and present results
|
|
137
158
|
|
|
138
159
|
### State DM4: Property Enrichment
|
|
139
160
|
|
|
@@ -151,6 +172,13 @@ If a command fails due to auth, tell the user to run `dm login` in their termina
|
|
|
151
172
|
### State DM5: Person Enrichment
|
|
152
173
|
|
|
153
174
|
**Symptoms:** User has a name, phone, or email and wants to find the person.
|
|
175
|
+
|
|
176
|
+
**Routing boundary:** A specific name always uses person enrichment, not People Search. Use
|
|
177
|
+
`dm enrich name`, `dealmachine_enrich_name`, or `POST /v1/enrichment/name`. Narrow with a state,
|
|
178
|
+
ZIP code, county, or city place ID when available. For a city name, run
|
|
179
|
+
`dm locations search -q "<city>" --type city --state <state> --json`, then pass the result's `code`
|
|
180
|
+
to `dm enrich name --city <place-id>`.
|
|
181
|
+
|
|
154
182
|
**Key Questions:**
|
|
155
183
|
|
|
156
184
|
- What identifier do you have? (name, phone, email)
|
|
@@ -159,7 +187,7 @@ If a command fails due to auth, tell the user to run `dm login` in their termina
|
|
|
159
187
|
**Interventions:**
|
|
160
188
|
- `dm enrich phone "5551234567"`
|
|
161
189
|
- `dm enrich email "john@example.com"`
|
|
162
|
-
- `dm enrich name "John Smith" --state TX`
|
|
190
|
+
- `dm enrich name "John Smith" --state TX --estimate-cost`, then rerun with `--yes` after approval
|
|
163
191
|
- Add `--include-properties` if property data needed
|
|
164
192
|
|
|
165
193
|
### State DM6: Address Validation
|
|
@@ -258,9 +286,9 @@ Parse the natural language request to determine:
|
|
|
258
286
|
- **What format** they want (table, JSON, specific fields)
|
|
259
287
|
- **How many searches** this requires — a single request may need multiple searches (e.g., "find high-equity properties and also recently sold ones" = two separate searches)
|
|
260
288
|
|
|
261
|
-
### Step 2: Fetch Available Filters and Fields
|
|
289
|
+
### Step 2: Fetch Available Filters and Fields
|
|
262
290
|
|
|
263
|
-
|
|
291
|
+
Run this before any search. Filter ids and value shapes come only from the live API; a guessed id fails or silently filters the wrong field.
|
|
264
292
|
|
|
265
293
|
```bash
|
|
266
294
|
# Run these in parallel — both are FREE
|
|
@@ -280,7 +308,7 @@ After fetching:
|
|
|
280
308
|
4. If a filter the user wants doesn't exist, tell them — don't fabricate one
|
|
281
309
|
5. If the user's request is ambiguous, use `dm filters --search "<keyword>"` to find the best match
|
|
282
310
|
|
|
283
|
-
|
|
311
|
+
The filter and field lists are the source of truth. Your knowledge of common filters is a starting point; verify each against these lists before executing.
|
|
284
312
|
|
|
285
313
|
### Step 3: Plan Searches
|
|
286
314
|
|
|
@@ -316,6 +344,10 @@ Tell the user in natural language:
|
|
|
316
344
|
- How many credits it will cost total across all searches
|
|
317
345
|
- What data they'll get back
|
|
318
346
|
|
|
347
|
+
For property search, people search, and name enrichment, request a free estimate first with
|
|
348
|
+
`--estimate-cost`. Non-interactive calls also estimate automatically unless `--yes` is supplied.
|
|
349
|
+
Never add `--yes` until the user has approved the displayed `estimated_credits`.
|
|
350
|
+
|
|
319
351
|
**Example confirmation:**
|
|
320
352
|
|
|
321
353
|
> "Here's my plan:
|
|
@@ -329,7 +361,7 @@ Tell the user in natural language:
|
|
|
329
361
|
Run the search(es):
|
|
330
362
|
|
|
331
363
|
```bash
|
|
332
|
-
dm properties search --body '{"locations": [...], "filters": [...], "per_page": 25}' --json
|
|
364
|
+
dm properties search --body '{"locations": [...], "filters": [...], "per_page": 25}' --json --yes
|
|
333
365
|
```
|
|
334
366
|
|
|
335
367
|
For multiple searches, run them and then combine, compare, or present results as appropriate to the user's original intent.
|
|
@@ -370,10 +402,11 @@ Ask if they want to:
|
|
|
370
402
|
| "worth between 200K and 500K" | `{"filter_id": "estimated_value", "operator": "range", "value": {"min": 200000, "max": 500000}}` |
|
|
371
403
|
| "3+ bedrooms" / "at least 3 beds" | `{"filter_id": "num_bedrooms", "operator": "greater_than_or_equal", "value": 3}` |
|
|
372
404
|
| "built before 1990" | `{"filter_id": "year_built", "operator": "less_than", "value": 1990}` |
|
|
373
|
-
| "owner-occupied" | `{"filter_id": "
|
|
374
|
-
| "absentee owners" / "not owner-occupied" | `{"filter_id": "
|
|
375
|
-
| "high equity" / "lots of equity" | `{"filter_id": "estimated_equity_percentage", "operator": "greater_than", "value": 50}`
|
|
376
|
-
| "free and clear" / "no mortgage" | `{"filter_id": "
|
|
405
|
+
| "owner-occupied" | `{"filter_id": "is_owner_occupied", "operator": "equals", "value": true}` |
|
|
406
|
+
| "absentee owners" / "not owner-occupied" | `{"filter_id": "has_absentee_owners", "operator": "equals", "value": true}` |
|
|
407
|
+
| "high equity" / "lots of equity" | `{"filter_id": "estimated_equity_percentage", "operator": "greater_than", "value": 50}` (50 is a common starting point; honor any number the user gives) |
|
|
408
|
+
| "free and clear" / "no mortgage" | `{"filter_id": "is_free_and_clear", "operator": "equals", "value": true}` (use `num_mortgages` equals 0 only when the user literally means no recorded mortgages) |
|
|
409
|
+
| "off market" / "not listed" | `{"filter_id": "is_off_market", "operator": "equals", "value": true}` (never the Market status "Off Market" option) |
|
|
377
410
|
| "sold in the last year" | `{"filter_id": "last_sale_date", "operator": "relative_time", "value": "last_12_months"}` |
|
|
378
411
|
|
|
379
412
|
**When unsure about a filter:** Run `dm filters --source-type properties --search "<keyword>" --json` to find matching filters. Always verify the filter exists before using it.
|
|
@@ -472,13 +505,14 @@ Always run the free count first and confirm before large exports.
|
|
|
472
505
|
### Credit-Saving Strategies
|
|
473
506
|
|
|
474
507
|
1. **Count before search** — Always use count endpoints first (free)
|
|
475
|
-
2. **Use
|
|
476
|
-
3. **
|
|
477
|
-
4. **
|
|
478
|
-
5. **
|
|
479
|
-
6. **
|
|
480
|
-
7. **
|
|
481
|
-
8. **
|
|
508
|
+
2. **Use `--estimate-cost`:** Preview supported CLI search and name-enrichment costs without executing
|
|
509
|
+
3. **Use `--yes` only after approval:** It is the explicit non-interactive credit-spend confirmation
|
|
510
|
+
4. **Choose the right output shape:** Property results charge per property and returned contact; flattened contact lists charge per contact
|
|
511
|
+
5. **Page small:** Start with `per_page: 10` to sample results before pulling more
|
|
512
|
+
6. **Leverage deduplication:** Same entity in same billing month costs nothing extra
|
|
513
|
+
7. **Use filters aggressively:** Narrow results before executing to avoid wasted credits
|
|
514
|
+
8. **Validate addresses first:** Invalid addresses don't cost credits; validate before enriching
|
|
515
|
+
9. **Batch operations:** Enrichment endpoints accept up to 1,000 items per request
|
|
482
516
|
|
|
483
517
|
---
|
|
484
518
|
|
|
@@ -512,9 +546,9 @@ dm properties count --body '{"locations": [...], "filters": [...]}'
|
|
|
512
546
|
dm properties count -f search.json
|
|
513
547
|
|
|
514
548
|
# Search (costs credits)
|
|
515
|
-
dm properties search
|
|
516
|
-
dm properties search -f search.json
|
|
517
|
-
dm properties search -f search.json --json
|
|
549
|
+
dm properties search -f search.json --estimate-cost
|
|
550
|
+
dm properties search -f search.json --json # Estimates automatically for agents
|
|
551
|
+
dm properties search -f search.json --json --yes # Executes after user approval
|
|
518
552
|
|
|
519
553
|
# Get by ID
|
|
520
554
|
dm properties get prop_12345
|
|
@@ -560,8 +594,9 @@ dm people count --body '{"locations": [...], "filters": [...]}'
|
|
|
560
594
|
dm people count -f search.json
|
|
561
595
|
|
|
562
596
|
# Search (costs credits)
|
|
563
|
-
dm people search
|
|
564
|
-
dm people search -f search.json
|
|
597
|
+
dm people search -f search.json --estimate-cost
|
|
598
|
+
dm people search -f search.json --json # Estimates automatically for agents
|
|
599
|
+
dm people search -f search.json --json --yes # Executes after user approval
|
|
565
600
|
|
|
566
601
|
# Get by ID
|
|
567
602
|
dm people get per_12345
|
|
@@ -660,6 +695,22 @@ dm lists export <list_id> --anchor person
|
|
|
660
695
|
dm lists export <list_id> --fields estimated_value,owner_full_name --anchor property
|
|
661
696
|
```
|
|
662
697
|
|
|
698
|
+
### Mail Campaigns (adding properties costs mail credits)
|
|
699
|
+
|
|
700
|
+
```bash
|
|
701
|
+
dm mail campaigns list --accepting-properties --json # Campaigns that can take properties now
|
|
702
|
+
dm mail campaigns estimate-add <id> --count 25 --json # Charge due today and later (FREE)
|
|
703
|
+
dm mail campaigns add-properties <id> --property-ids 101 102 --recipient owner --yes --json
|
|
704
|
+
dm mail campaigns end <id> --yes # Permanent
|
|
705
|
+
```
|
|
706
|
+
|
|
707
|
+
- Statuses: `draft`, `ready`, `active`, `paused`, `ended`. Completed and Cancelled show as `ended`.
|
|
708
|
+
- Ask the user owner or resident before adding. Each added property starts at step 1.
|
|
709
|
+
- Always run `estimate-add` first and tell the user the charge due today (`pay_today_cents`) and later. Pass `--yes` only after they approve. Without `--yes`, `add-properties` returns the estimate, adds nothing and exits with code 1. For a paused campaign nothing is charged today; pieces are charged as they go out after it resumes.
|
|
710
|
+
- Report `added_count` and every skipped property with its reason.
|
|
711
|
+
- Ending is permanent: unsent mail stops and the campaign can never be resumed or added to. Confirm with the user before `end --yes`.
|
|
712
|
+
- Create a campaign with no audience to save it as Ready with no charge, then add properties later. To add properties later to a campaign created with an audience, include `"accepts_properties": true` when you create it.
|
|
713
|
+
|
|
663
714
|
### Activity (FREE)
|
|
664
715
|
|
|
665
716
|
```bash
|
|
@@ -722,8 +773,10 @@ Every command supports:
|
|
|
722
773
|
```json
|
|
723
774
|
{
|
|
724
775
|
"locations": [{ "type": "state", "code": "TX" }],
|
|
725
|
-
"filters": [
|
|
726
|
-
|
|
776
|
+
"filters": [
|
|
777
|
+
{ "filter_id": "estimated_household_income", "operator": "greater_than", "value": 100000 },
|
|
778
|
+
{ "filter_id": "has_active_phone_number", "value": true }
|
|
779
|
+
],
|
|
727
780
|
"page": 1,
|
|
728
781
|
"per_page": 25
|
|
729
782
|
}
|
|
@@ -733,6 +786,7 @@ Every command supports:
|
|
|
733
786
|
|
|
734
787
|
- **Locations:** OR logic (match if in ANY location)
|
|
735
788
|
- **Filters:** AND logic (ALL filters must match)
|
|
789
|
+
- **Filter source:** filters cannot be mixed across catalogs. Property endpoints take `source_type=properties` filters; people endpoints take `source_type=people` filters. Crossing them returns `filter_source_mismatch`. To gate people on property criteria, put the property filters in a property request: `dm properties count -f query.json` (add `"contact_audience": "owners"` to the body for the owner count) or `dm properties export -f query.json --contact-audience owners`
|
|
736
790
|
- For OR-like behavior within a filter, use `contains_any` or `any_of` operators
|
|
737
791
|
|
|
738
792
|
### Filter Types & Operators
|
|
@@ -833,7 +887,7 @@ These fields are always returned, even without requesting `fields`:
|
|
|
833
887
|
### Always-Included Person Fields
|
|
834
888
|
|
|
835
889
|
- `dm_person_id`, `full_name`, `first_name`, `last_name`
|
|
836
|
-
- `phones` (array: number, type, do_not_call)
|
|
890
|
+
- `phones` (array: number, type, do_not_call, carrier)
|
|
837
891
|
- `emails` (array: address)
|
|
838
892
|
- `residence` (address, city, state, zip, full_address)
|
|
839
893
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/commands/account.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/commands/account.ts"],"names":[],"mappings":"AAAA;;GAEG;AAoBH,wBAAsB,OAAO,CAAC,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB7E"}
|
package/dist/commands/account.js
CHANGED
|
@@ -3,8 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import chalk from 'chalk';
|
|
5
5
|
import { apiRequest, formatDate } from '../lib/client.js';
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import { printJson } from '../lib/output.js';
|
|
7
|
+
export async function account(options = {}) {
|
|
8
|
+
const response = await apiRequest('/account');
|
|
9
|
+
if (options.json) {
|
|
10
|
+
printJson(response);
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const { data } = response;
|
|
8
14
|
console.log();
|
|
9
15
|
console.log(chalk.bold('Account'));
|
|
10
16
|
console.log(chalk.dim('─'.repeat(40)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../src/commands/account.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../src/commands/account.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,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*/\n\nimport chalk from 'chalk';\nimport { apiRequest, formatDate } from '../lib/client.js';\nimport { printJson } from '../lib/output.js';\n\ninterface AccountResponse {\n data: {\n organization: {\n id: number;\n name: string;\n createdAt: string;\n };\n user: {\n id: number | null;\n authType: 'api_key' | 'oauth';\n };\n };\n}\n\nexport async function account(options: { json?: boolean } = {}): Promise<void> {\n const response = await apiRequest<AccountResponse>('/account');\n if (options.json) {\n printJson(response);\n return;\n }\n const { data } = response;\n\n console.log();\n console.log(chalk.bold('Account'));\n console.log(chalk.dim('─'.repeat(40)));\n console.log(`${chalk.cyan('Organization:')} ${data.organization.name}`);\n console.log(`${chalk.cyan('Org ID:')} ${data.organization.id}`);\n console.log(`${chalk.cyan('Created:')} ${formatDate(data.organization.createdAt)}`);\n console.log(`${chalk.cyan('Auth Type:')} ${data.user.authType}`);\n console.log();\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity.js","sourceRoot":"","sources":["../../src/commands/activity.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,UAAU,EACV,eAAe,EACf,QAAQ,EACR,aAAa,GACd,MAAM,kBAAkB,CAAC;AAgD1B,+EAA+E;AAC/E,SAAS;AACT,+EAA+E;AAE/E,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,OAQpC;IACC,IAAI,WAAoC,CAAC;IAEzC,sDAAsD;IACtD,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QACnC,WAAW,GAAG,EAAE,CAAC;QACjB,IAAI,OAAO,CAAC,KAAK;YAAE,WAAW,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QACrD,IAAI,OAAO,CAAC,KAAK;YAAE,WAAW,CAAC,KAAK,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G,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;YAC7C,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QAC3B,CAAC;QACD,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,EAAE;YAAE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,eAAe,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IAC3G,CAAC;IAED,OAAO,CAAC,GAAG,EAAE,CAAC;AAChB,CAAC","sourcesContent":["/**\n * Activity commands — search and get\n */\n\nimport chalk from 'chalk';\n\nimport { apiRequest, formatDate } from '../lib/client.js';\nimport {\n parseRequestBody,\n printJson,\n printHeader,\n printTable,\n printPagination,\n truncate,\n createSpinner,\n} from '../lib/output.js';\n\n// ============================================================================\n// Types\n// ============================================================================\n\ninterface ActivityItem {\n activity_id: string;\n type: string;\n created_at: string;\n matched_on?: string[];\n request_summary: Record<string, unknown>;\n result_summary: Record<string, unknown>;\n}\n\ninterface SearchResponse {\n data: ActivityItem[];\n pagination: {\n page: number;\n per_page: number;\n total_results: number;\n total_pages: number;\n has_next_page: boolean;\n has_previous_page: boolean;\n };\n}\n\ninterface GetResponse {\n data: {\n activity_id: string;\n type: string;\n created_at: string;\n request: Record<string, unknown>;\n result_summary: Record<string, unknown>;\n entity_ids: {\n people: string[];\n properties: string[];\n pagination: {\n page: number;\n per_page: number;\n total_people: number;\n total_properties: number;\n has_next_page: boolean;\n };\n };\n };\n}\n\n// ============================================================================\n// Search\n// ============================================================================\n\nexport async function activitySearch(options: {\n body?: string;\n file?: string;\n types?: string[];\n query?: string;\n page?: string;\n perPage?: string;\n json?: boolean;\n}): Promise<void> {\n let requestBody: Record<string, unknown>;\n\n // Build body from flags or parse from --body/-f/stdin\n if (options.types || options.query) {\n requestBody = {};\n if (options.types) requestBody.types = options.types;\n if (options.query) requestBody.query = options.query;\n if (options.page) requestBody.page = parseInt(options.page, 10);\n if (options.perPage) requestBody.per_page = parseInt(options.perPage, 10);\n } else {\n requestBody = await parseRequestBody(options);\n }\n\n const spinner = createSpinner('Searching activity...').start();\n const data = await apiRequest<SearchResponse>('/activity/search', {\n method: 'POST',\n body: requestBody,\n });\n spinner.stop();\n\n if (options.json) {\n printJson(data);\n return;\n }\n\n printHeader('Activity History');\n console.log();\n\n if (data.data.length > 0) {\n const rows = data.data.map((a) => ({\n id: truncate(a.activity_id, 16),\n type: a.type,\n date: formatDate(a.created_at),\n results: (a.result_summary as any).total_results ?? '—',\n credits: (a.result_summary as any).credits_used ?? '—',\n }));\n printTable(rows, ['id', 'type', 'date', 'results', 'credits']);\n } else {\n console.log(chalk.dim(' No activity found.'));\n }\n\n printPagination(data.pagination);\n console.log();\n}\n\n// ============================================================================\n// Get by ID\n// ============================================================================\n\nexport async function activityGet(\n activityId: string,\n options: { json?: boolean }\n): Promise<void> {\n const spinner = createSpinner('Fetching activity...').start();\n const data = await apiRequest<GetResponse>(`/activity/${activityId}`);\n spinner.stop();\n\n if (options.json) {\n printJson(data);\n return;\n }\n\n const a = data.data;\n printHeader(`Activity ${a.activity_id}`);\n\n console.log(` ${chalk.cyan('Type:')} ${a.type}`);\n console.log(` ${chalk.cyan('Created:')} ${formatDate(a.created_at)}`);\n console.log();\n\n // Request summary\n console.log(chalk.bold(' Request'));\n console.log(chalk.dim(' ' + '─'.repeat(48)));\n const reqStr = JSON.stringify(a.request, null, 2)\n .split('\\n')\n .map((line) => ' ' + line)\n .join('\\n');\n console.log(chalk.dim(reqStr));\n console.log();\n\n // Result summary\n console.log(chalk.bold(' Result Summary'));\n console.log(chalk.dim(' ' + '─'.repeat(48)));\n for (const [key, val] of Object.entries(a.result_summary)) {\n if (key === 'entity_ids' || key === 'entity_count') continue;\n console.log(` ${chalk.cyan(key.padEnd(20))} ${String(val)}`);\n }\n\n // Entity IDs\n const ent = a.entity_ids;\n console.log();\n console.log(\n chalk.bold(` Entity IDs (${ent.pagination.total_people} people, ${ent.pagination.total_properties} properties)`)\n );\n if (ent.people.length > 0) {\n console.log(chalk.dim(' People:'));\n for (const id of ent.people.slice(0, 20)) {\n console.log(` ${id}`);\n }\n if (ent.people.length > 20) console.log(chalk.dim(` ... and ${ent.people.length - 20} more`));\n }\n if (ent.properties.length > 0) {\n console.log(chalk.dim(' Properties:'));\n for (const id of ent.properties.slice(0, 20)) {\n console.log(` ${id}`);\n }\n if (ent.properties.length > 20) console.log(chalk.dim(` ... and ${ent.properties.length - 20} more`));\n }\n\n console.log();\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addresses.js","sourceRoot":"","sources":["../../src/commands/addresses.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,GACd,MAAM,kBAAkB,CAAC;AAc1B,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAA2B,EAC3B,OAIC;IAED,IAAI,WAAoC,CAAC;IAEzC,IAAI,OAAO,EAAE,CAAC;QACZ,iDAAiD;QACjD,WAAW,GAAG;YACZ,IAAI,EAAE,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC;SAClC,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,WAAW,GAAG,MAAM,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,OAAO,GAAG,aAAa,CAAC,yBAAyB,CAAC,CAAC,KAAK,EAAE,CAAC;IACjE,MAAM,IAAI,GAAG,MAAM,UAAU,CAAmB,qBAAqB,EAAE;QACrE,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,WAAW;KAClB,CAAC,CAAC;IACH,OAAO,CAAC,IAAI,EAAE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C,CAAC;QAErH,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;YACvB,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;QAC9E,CAAC;aAAM,IAAI,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;YAC7E,MAAM,WAAW,GAAG,IAAI,CAAC,WAAuB,CAAC;YACjD,IAAI,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC1C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,+BAA+B,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;YAClF,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,wBAAwB,QAAQ,EAAE,CAAC,CAAC,CAAC;QAC7D,CAAC;aAAM,CAAC;YACN,MAAM,KAAK,GAAG,IAAI,CAAC,KAAyC,CAAC;YAC7D,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,QAAQ,EAAE,CAAC,CAAC;YACzD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,kBAAkB,KAAK,EAAE,MAAM,IAAI,eAAe,EAAE,CAAC,CAAC,CAAC;QAC/E,CAAC;IACH,CAAC;IAED,OAAO,CAAC,GAAG,EAAE,CAAC;IACd,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3B,OAAO,CAAC,GAAG,EAAE,CAAC;AAChB,CAAC","sourcesContent":["/**\n * Addresses command — Validate addresses\n */\n\nimport chalk from 'chalk';\n\nimport { apiRequest } from '../lib/client.js';\nimport {\n parseRequestBody,\n printJson,\n printHeader,\n printTotals,\n printCredits,\n printWarning,\n createSpinner,\n} from '../lib/output.js';\n\ninterface ValidateResponse {\n data: Record<string, unknown>[];\n totals: {\n submitted: number;\n valid: number;\n corrected: number;\n invalid: number;\n };\n credits: { used: number; properties: number; people: number; deduplicated: number };\n warning?: string;\n}\n\nexport async function addressesValidate(\n address: string | undefined,\n options: {\n body?: string;\n file?: string;\n json?: boolean;\n }\n): Promise<void> {\n let requestBody: Record<string, unknown>;\n\n if (address) {\n // Quick mode: single address from positional arg\n requestBody = {\n data: [{ full_address: address }],\n };\n } else {\n requestBody = await parseRequestBody(options);\n }\n\n const spinner = createSpinner('Validating addresses...').start();\n const data = await apiRequest<ValidateResponse>('/addresses/validate', {\n method: 'POST',\n body: requestBody,\n });\n spinner.stop();\n\n if (options.json) {\n printJson(data);\n return;\n }\n\n printHeader('Address Validation');\n printTotals({\n submitted: data.totals.submitted,\n valid: data.totals.valid,\n corrected: data.totals.corrected,\n invalid: data.totals.invalid,\n });\n if (data.warning) printWarning(data.warning);\n console.log();\n\n for (const item of data.data) {\n const status = item.status as string;\n const input = item.input as Record<string, unknown>;\n const inputStr = input.full_address || [input.street, input.city, input.state, input.zip].filter(Boolean).join(', ');\n\n if (status === 'valid') {\n console.log(` ${chalk.green('✓ valid')} ${item.standardized_address}`);\n } else if (status === 'corrected') {\n console.log(` ${chalk.yellow('~ corrected')} ${item.standardized_address}`);\n const corrections = item.corrections as string[];\n if (corrections && corrections.length > 0) {\n console.log(chalk.dim(` corrections: ${corrections.join(', ')}`));\n }\n console.log(chalk.dim(` from: ${inputStr}`));\n } else {\n const error = item.error as { code: string; reason: string };\n console.log(` ${chalk.red('✗ invalid')} ${inputStr}`);\n console.log(chalk.dim(` ${error?.reason || 'Unknown error'}`));\n }\n }\n\n console.log();\n printCredits(data.credits);\n console.log();\n}\n"]}
|
|
@@ -4,7 +4,14 @@
|
|
|
4
4
|
interface AgentOptions {
|
|
5
5
|
json?: boolean;
|
|
6
6
|
}
|
|
7
|
+
interface AgentInstallOptions extends AgentOptions {
|
|
8
|
+
project?: boolean;
|
|
9
|
+
force?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const CLAUDE_CODE_PERMISSION_ALLOWLIST: readonly ["Bash(dm agents)", "Bash(dm agents guide *)", "Bash(dm agents playbook *)", "Bash(dm agents skill *)", "Bash(dm agents permissions *)", "Bash(dm whoami *)", "Bash(dm account *)", "Bash(dm usage *)", "Bash(dm filters *)", "Bash(dm fields *)", "Bash(dm locations *)", "Bash(dm properties count *)", "Bash(dm people count *)", "WebFetch(domain:api.docs.dealmachine.com)"];
|
|
7
12
|
export declare function agentsGuide(options: AgentOptions): Promise<void>;
|
|
8
13
|
export declare function agentsPlaybook(options: AgentOptions): Promise<void>;
|
|
14
|
+
export declare function agentsInstallClaudeCode(options: AgentInstallOptions): Promise<void>;
|
|
15
|
+
export declare function agentsPermissions(options: AgentOptions): Promise<void>;
|
|
9
16
|
export {};
|
|
10
17
|
//# sourceMappingURL=agents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/commands/agents.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/commands/agents.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,UAAU,mBAAoB,SAAQ,YAAY;IAChD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAID,eAAO,MAAM,gCAAgC,4XAenC,CAAC;AAkHX,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAYtE;AAED,wBAAsB,cAAc,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BzE;AAED,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoDzF;AAED,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAkB5E"}
|