Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions changes/feat-meaning-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### Added

- **`sync --embed` and `search all` by meaning** (cli-core 0.751.0). With the `activities` setting on, `sync --embed`
indexes the copied timeline comments, e-mails, calls, meetings and tasks with a model already downloaded, and
`search all` then finds deals and leads by what their activities mean, in Russian or any language, not only by
their words. The skill tells an agent to ask by meaning before it reads every activity; the detail is in
`b24 skill show reading`.

### Fixed

- `search all` lists a name one letter off the one that matched after it, and finds a Latin name typed in Cyrillic
letters and a Russian name typed in Latin letters, each marked `match: corrected`.
5 changes: 3 additions & 2 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,11 @@ b24 sync [options]
|---|---|
| `--rescan` | list everything again, every id too, dropping a round in progress. |
| `--max-pages <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: b24 commands info sync
**Returns:** crm sync — provider, account, scope, pipelines, skipped_owner_rejected, stage_tasks, synced, issues, and 10 more; every field: b24 commands info sync

**Example:** `b24 work sync`, `b24 work sync --rescan`, `b24 work sync --max-pages 20`
**Example:** `b24 work sync`, `b24 work sync --rescan`, `b24 work sync --embed`

## `b24 store`

Expand Down
3 changes: 2 additions & 1 deletion docs/dev/test-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

**234 ✅ · 90 ⛔ · 0 ❌** — 112 commands, 212 options.
**234 ✅ · 91 ⛔ · 0 ❌** — 112 commands, 213 options.

| Command | Option | | Note |
|---|---|---|---|
Expand All @@ -24,6 +24,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` | | ✅ | |
| `store apply` | | ✅ | |
| `store apply` | `--yes` | ⛔ | cli-core 0.670.0 src/crm/cli/commands.test.ts removes the counted contacts only with --yes |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"docs:spell": "cspell lint --config cspell.json --no-progress --no-summary README.md SECURITY.md CHANGELOG.md AGENTS.md CLAUDE.md 'docs/*.md' 'skills/**/*.md'"
},
"dependencies": {
"@wirecat/cli-core": "0.739.0",
"@wirecat/cli-core": "0.751.0",
"commander": "15.0.0",
"valibot": "1.5.0"
},
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions scripts/test-matrix-untested.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ const SHARED_FILES =
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",
},
{
command: "setup",
reason:
Expand Down
3 changes: 2 additions & 1 deletion skills/bitrix24-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ and lists the profiles in `details.profiles`. **Never pick one for the owner**;
b24 work deals list status:open --json=ref,title,stage,amount,currency
b24 work deals show deal:12 --json # the deal, its contacts, owner and stage history
b24 work people show "Anna Ivanova" --json # a contact live from the portal, by id or exact name
b24 work search all kitchen --json # stored deals and leads beside messages and notes
b24 work search all "who complained of delays" --json # by meaning too, after sync --embed
```

- **Ids are strings.** Pass `deal:12` and `"57164"` back unchanged; never turn one into a number.
Expand All @@ -52,6 +52,7 @@ and lists the profiles in `details.profiles`. **Never pick one for the owner**;
and still exit `0`: read `complete`, `scope` and `issues`; answer "unknown", not "none", for what they name.
`search all` names in `missing` a kind it did not search. Before you say something is not there, search in other
words, and `sync` if the store is old.
- **Ask `search all` by meaning first:** [reading](references/reading.md#by-meaning).
- **Won or lost is `status`, never the stage's name** (leads stand in one pipeline, `Leads`). `fields list` is as old
as the last `sync`.
- **Never infer what Bitrix24 does not hold:** contact roles on a deal, reporting lines between contacts, a parent
Expand Down
10 changes: 10 additions & 0 deletions skills/bitrix24-cli/references/reading.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ the detail behind them.
`organizations` and `users` page with `--limit` (1 to 250, 50 when left out) and `--page`; they take no `--all`.
`users list name:` matches part of the whole name.

## By meaning

- **Ask by meaning before reading every comment.** «Кто жаловался, что монтаж перенесли» or "who got a cheaper offer"
is one `search all "<the question in plain words>" --json`: with the `activities` setting on, it finds deals and
leads by what their timeline comments, e-mails, calls and tasks mean, in Russian or any language, once
`sync --embed` has built their vectors (it says so when they are missing; run it again while it offers to).
- It also corrects a misspelt name or a Russian name typed in Latin letters (and the reverse) and lists
near-duplicate names after the exact ones (`match: corrected`): check those before you answer from the first hit.
- List and read every activity only when that search finds nothing.

## Client files

- `files list --deal 12` (or `--lead`, `--person`, `--organization`) lists one record's files live from the portal:
Expand Down
Loading