diff --git a/changes/cli-core-0751.md b/changes/cli-core-0751.md new file mode 100644 index 0000000..8cbd209 --- /dev/null +++ b/changes/cli-core-0751.md @@ -0,0 +1,16 @@ +### Added + +- **`search all` finds deals and leads by the meaning of their notes, calls and tasks**, in other words or another + language, with the note's excerpt in the hit. `amo work sync --embed` builds the index with a model already + downloaded (`amo models download embeddinggemma`); until then `search all` says it searched by words only + (`@wirecat/cli-core` 0.751.0). +- **`people show` and `organizations show` take the `person:` and `organization:` a deal gives.** + +### Changed — may break callers + +- **`synced[].saved` in the `sync` answer counts only rows that changed** (new, different, deleted or back again), so + a sync with nothing new answers 0. + +### Fixed + +- **A deal moved in the same second its stage-task rules were set opens its task.** diff --git a/contracts/help.snap b/contracts/help.snap index 65d610b..6d1639e 100644 --- a/contracts/help.snap +++ b/contracts/help.snap @@ -21,6 +21,7 @@ Works with: memo context one person across messengers, mail, notes and meetings mail IMAP mail in the same local store: search your mailbox offline, next to your other WireCat data b24 Bitrix24 CRM: deals, leads and pipelines, searchable with your other WireCat data + attio Attio CRM: deals, people and companies, searchable with your other WireCat data pbx Asterisk PBX calls and recordings, searchable with your other WireCat data notion Notion pages and databases as local text, searchable with your other WireCat data ydisk Yandex Disk folders as local text, searchable with your other WireCat data diff --git a/docs/commands.md b/docs/commands.md index c6a3d73..4278c01 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -138,10 +138,11 @@ amo sync [options] |---|---| | `--rescan` | list everything again, every id too, dropping a round in progress. | | `--max-pages ` | at most this many requests to the CRM in this run. | +| `--embed` | also index new activities and tasks for search all by meaning, with a model already downloaded. | -**Returns:** crm sync — provider, account, scope, pipelines, skipped_owner_rejected, stage_tasks, synced, issues, and 9 more; every field: amo commands info sync +**Returns:** crm sync — provider, account, scope, pipelines, skipped_owner_rejected, stage_tasks, synced, issues, and 10 more; every field: amo commands info sync -**Example:** `amo work sync`, `amo work sync --rescan`, `amo work sync --max-pages 20` +**Example:** `amo work sync`, `amo work sync --rescan`, `amo work sync --embed` ## `amo store` @@ -621,7 +622,7 @@ amo people show | Argument | | What it is | |---|---|---| -| `person` | required | the CRM's id of the person, as list prints it, or its exact name. | +| `person` | required | the CRM's id of the person, as list prints it, the person: a deal gives, or its exact name. | **Returns:** crm person — id, name, first_name, last_name, position, organization_ids, assigned_to, created_at, and 6 more; every field: amo commands info people show @@ -717,7 +718,7 @@ amo organizations show | Argument | | What it is | |---|---|---| -| `organization` | required | the CRM's id of the organization, as list prints it, or its exact name. | +| `organization` | required | the CRM's id of the organization, as list prints it, the organization: a deal gives, or its exact name. | **Returns:** crm organization — id, name, type, own, person_ids, assigned_to, created_at, updated_at, and 5 more; every field: amo commands info organizations show @@ -915,7 +916,7 @@ amo search all [options] | `--exact` | bare words and quotes match their exact form only, as exact:word does. | | `--timezone ` | the IANA timezone for calendar date boundaries. | -**Returns:** hit — kind, ref, provider, account, title, timestamp, excerpt, url, and 18 more; every field: amo commands info search all +**Returns:** hit — kind, ref, provider, account, title, timestamp, excerpt, url, and 19 more; every field: amo commands info search all **Example:** `amo work search all Example LLC`, `amo work search all website --only crm --json` diff --git a/docs/dev/test-matrix.md b/docs/dev/test-matrix.md index e18d840..7c0e6b7 100644 --- a/docs/dev/test-matrix.md +++ b/docs/dev/test-matrix.md @@ -7,7 +7,7 @@ ran it · ⛔ not tested offline, with the reason and where it is checked instea Measured from the test run (`coverage/argv.jsonl`), not searched for — see [TESTING.md](TESTING.md) for how, and for the states and failures that cut across commands. -**184 ✅ · 64 ⛔ · 0 ❌** — 87 commands, 161 options. +**184 ✅ · 65 ⛔ · 0 ❌** — 87 commands, 162 options. | Command | Option | | Note | |---|---|---|---| @@ -25,6 +25,7 @@ Measured from the test run (`coverage/argv.jsonl`), not searched for — see | `sync` | | ✅ | | | `sync` | `--rescan` | ✅ | | | `sync` | `--max-pages` | ✅ | | +| `sync` | `--embed` | ⛔ | cli-core's CRM sync embeds activities; its src/crm/cli/activity-meaning.test.ts drives sync --embed and search all by meaning on a CRM program with the small test model, and a test here would need a model on disk | | `store status` | | ⛔ | cli-core's addStoreMaintenanceCommands, mounted by addCrmCommands; its store and src/crm/cli/store-file tests drive them on a CRM program | | `store apply` | | ⛔ | cli-core's addStoreMaintenanceCommands, mounted by addCrmCommands; its store and src/crm/cli/store-file tests drive them on a CRM program | | `store apply` | `--yes` | ⛔ | cli-core's addStoreMaintenanceCommands, mounted by addCrmCommands; its store and src/crm/cli/store-file tests drive them on a CRM program | diff --git a/package.json b/package.json index 29efac5..e1261ac 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ }, "dependencies": { "@wirecat/cli-base": "0.127.0", - "@wirecat/cli-core": "0.722.0", + "@wirecat/cli-core": "0.751.0", "commander": "15.0.0", "valibot": "1.5.0" }, @@ -73,7 +73,7 @@ "@cspell/dict-ru_ru": "2.3.4", "@types/node": "22.20.5", "@vitest/coverage-v8": "5.0.5", - "@wirecat/cli-testing": "0.7.0", + "@wirecat/cli-testing": "0.7.4", "cspell": "10.4.0", "esbuild": "0.28.2", "lefthook": "2.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6e80fe4..a53ba72 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,8 +16,8 @@ importers: specifier: 0.127.0 version: 0.127.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) '@wirecat/cli-core': - specifier: 0.722.0 - version: 0.722.0(@wirecat/cli-base@0.127.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5))(commander@15.0.0)(typescript@7.0.2)(zod@4.6.7) + specifier: 0.751.0 + version: 0.751.0(@wirecat/cli-base@0.127.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5))(commander@15.0.0)(typescript@7.0.2)(zod@4.6.7) commander: specifier: 15.0.0 version: 15.0.0 @@ -44,8 +44,8 @@ importers: specifier: 5.0.5 version: 5.0.5(vitest@5.0.5) '@wirecat/cli-testing': - specifier: 0.7.0 - version: 0.7.0 + specifier: 0.7.4 + version: 0.7.4 cspell: specifier: 10.4.0 version: 10.4.0 @@ -1213,8 +1213,8 @@ packages: '@wirecat/cli-core-sqlite@1.1.0': resolution: {integrity: sha512-GpGlh/dAIX/nblBYCdT6DfWSLFxav9mxxeELQAfEuw+QZdT9unKxbi5xa02s/s4JS1P7n0PQx2sCABj4FlMRNw==} - '@wirecat/cli-core@0.722.0': - resolution: {integrity: sha512-nJM/EA3qpHRi+g7OWLhogNH1ZKVhbu6LdAQP+rNW7Fha6tcdmBCYCoSI9T0V+yb9FkxnOPPj7qNWOsEkAsJGfQ==} + '@wirecat/cli-core@0.751.0': + resolution: {integrity: sha512-jZ6F9wthLPyB3KC480ZFoAa51DWeaadcvK80Bmqn5scYthDHujvd1LAxvs7nJcenP1mnucnrMbnwvkiogRu4bA==} engines: {node: ^22.16.0 || >=24} hasBin: true peerDependencies: @@ -1234,8 +1234,8 @@ packages: ssh2: optional: true - '@wirecat/cli-testing@0.7.0': - resolution: {integrity: sha512-1FTDRQOM6g6Z9lTA5dOBk+s8XNcfJUt33yKjZV8g4trCZbKrqWh2jvdhVLvgM8xAzh/61HqSWyCvbbVpegbO+Q==} + '@wirecat/cli-testing@0.7.4': + resolution: {integrity: sha512-C3sWZsGDvaahJ2yBkvWw3Sax2Q7dElMJqdLZcuEYw0WDp4C1q9fwyX9UqVobG74XeVUvTMnOQDUHGiiIltpt/A==} engines: {node: ^22.16.0 || >=24} hasBin: true @@ -3364,7 +3364,7 @@ snapshots: '@wirecat/cli-core-sqlite@1.1.0': {} - '@wirecat/cli-core@0.722.0(@wirecat/cli-base@0.127.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5))(commander@15.0.0)(typescript@7.0.2)(zod@4.6.7)': + '@wirecat/cli-core@0.751.0(@wirecat/cli-base@0.127.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5))(commander@15.0.0)(typescript@7.0.2)(zod@4.6.7)': dependencies: '@anthropic-ai/sdk': 1.3.0(zod@4.6.7) '@bomb.sh/tab': 0.0.22(commander@15.0.0) @@ -3422,7 +3422,7 @@ snapshots: - typescript - zod - '@wirecat/cli-testing@0.7.0': + '@wirecat/cli-testing@0.7.4': dependencies: '@modelcontextprotocol/client': 2.4.0 diff --git a/scripts/test-matrix-untested.ts b/scripts/test-matrix-untested.ts index bec3b15..ff21028 100644 --- a/scripts/test-matrix-untested.ts +++ b/scripts/test-matrix-untested.ts @@ -11,6 +11,13 @@ const SHARED_SCHEDULE = const LONG_RUNNING = `starts an HTTP server or a background process that runs until stopped; ${SHARED_MCP}` export const UNTESTED: { command: string; option?: string; reason: string }[] = [ + { + command: "sync", + option: "--embed", + reason: + "cli-core's CRM sync embeds activities; its src/crm/cli/activity-meaning.test.ts drives sync --embed and search " + + "all by meaning on a CRM program with the small test model, and a test here would need a model on disk", + }, ...[ ...["--at-time", "--notify-on", "--deliver-to"].map((option) => ({ command: "schedule command", option })), { command: "schedule agent" },