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
11 changes: 11 additions & 0 deletions changes/release-1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Изменено — может сломать скрипты

- **`max` собран на cli-core 1.0.0 и cli-base 1.0.0.** Хранилище при первом открытии переходит на версию 73: номер
записи больше никогда не выдаётся дважды, а открыть хранилище после этого могут только инструменты на cli-core 1.0.
Обновите все установленные CLI WireCat до запуска этой версии. Перед переходом пишется копия для отката. Без неё
переход не начинается.
- **Вызов через MCP, который называет запрещённое место, отвечает `permission_error`**, а не `validation_error`.
Перед каждым вызовом через MCP каждая опция и аргумент с локальным файлом или папкой проверяются по настоящему пути:
вызов не может назвать папку с ключами, папку инструмента WireCat или хранилище. Запуск в терминале не меняется.
- **`schedule exec` больше не доступен через MCP.** Он запускает только файл расписания из своей папки расписаний.
Агент запускает сохранённое расписание через `schedule run <name>`.
1 change: 1 addition & 0 deletions contracts/help.snap
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Works with:
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
amo amoCRM and Kommo: deals, contacts and companies, 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
Expand Down
2 changes: 1 addition & 1 deletion contracts/upgrade.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"exit": 0,
"stream": "stdout",
"kind": "json",
"diagnostic": "4 terms\n"
"diagnosticPattern": "(?:the store moved to schema \\d+; every other WireCat CLI that uses it needs a version that speaks it — run `<cli> upgrade` for each\n)?4 terms\n"
},
{
"id": "candidate-store-settle",
Expand Down
13 changes: 9 additions & 4 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -2442,9 +2442,13 @@ bring the store up to this build's schema, then normalize, index and stem the me
**Меняет что-то только на этом компьютере.**

```sh
max store migrate
max store migrate [options]
```

| Опция | Что делает |
|---|---|
| `--no-backup` | migrate even when no rollback copy can be written; older tools then cannot open the store again. |

**Returns:** store migration — path, exists, from, to, normalized, indexed, terms, stemmed, and 1 more; every field: max commands info store migrate

**Example:** `max personal store migrate`
Expand Down Expand Up @@ -3660,7 +3664,7 @@ max conversations related <chat> <message> [options]
| `--base-url <url>` | a server with OpenAI's /v1/embeddings: Gemini, Jina, or Ollama and LM Studio on this machine. |
| `--dims <n>` | remote: the vector size — needed with --base-url; shortens an OpenAI model's. |

**Returns:** conversation hit — summary, chunk, score, by, stale, source, locator, matched_in; every field: max commands info conversations related
**Returns:** conversation hit — summary, chunk, score, by, stale, source, locator, matched_in, and 3 more; every field: max commands info conversations related

**Example:** `max personal conversations related "Book club" 101`

Expand Down Expand Up @@ -4577,7 +4581,7 @@ max search all <query> [options]
| `--backend <archive\|server\|both>` | where to search: the local archive, the messenger's server (default: both; message discovery uses archive only), or both. |
| `--server-time <duration>` | stop waiting for the server after this long (default: 5s). |

**Returns:** hit — kind, ref, provider, account, title, timestamp, excerpt, url, and 18 more; every field: max commands info search all
**Returns:** hit — kind, ref, provider, account, title, timestamp, excerpt, url, and 19 more; every field: max commands info search all

**Example:** `max personal search all draft`

Expand Down Expand Up @@ -4672,6 +4676,7 @@ max search conversations <query> [options]
| `--sync-first` | first fetch new messages within the chat, time and message bounds. |
| `--sync-time <duration>` | stop fetching after this long (default: 30s). |
| `--max-messages <n>` | fetch at most this many messages total (default: 500). |
| `--like <text>` | a made-up reply that would answer the query, one sentence: searched by meaning too, which finds an answer worded unlike the question. |
| `--chat <chat>` | only this chat: a chat: its id, or part of its title. |
| `--since-time <time>` | only those still going at this ISO 8601 time, or 30m / 2h / 1d ago, or later. |
| `--filter <query>` | strict Lucene filter: any message in a conversation must match; does not change the meaning query. |
Expand All @@ -4680,7 +4685,7 @@ max search conversations <query> [options]
| `--limit <n>` | how many. |
| `--catch-up` | first build and embed, on this machine, the chats in scope that changed or were never built — within --max-chats and --max-chunks. |

**Returns:** conversation hit — summary, chunk, score, by, stale, source, locator, matched_in; every field: max commands info search conversations
**Returns:** conversation hit — summary, chunk, score, by, stale, source, locator, matched_in, and 3 more; every field: max commands info search conversations

**Example:** `max personal search conversations "Reviewing the project draft"`

Expand Down
4 changes: 3 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.

**930 ✅ · 249 ⛔ · 0 ❌** — 386 commands, 793 options.
**930 ✅ · 251 ⛔ · 0 ❌** — 386 commands, 795 options.

| Command | Option | | Note |
|---|---|---|---|
Expand Down Expand Up @@ -295,6 +295,7 @@ Measured from the test run (`coverage/argv.jsonl`), not searched for — see
| `store info` | | ✅ | |
| `store check` | | ✅ | |
| `store migrate` | | ✅ | |
| `store migrate` | `--no-backup` | ⛔ | cli-core src/cli/messenger/store-maintenance.test.ts covers store migrate; consumer mounts the shared command |
| `store rebuild` | | ✅ | |
| `store backup` | | ✅ | |
| `store backup` | `--encrypt` | ✅ | |
Expand Down Expand Up @@ -720,6 +721,7 @@ Measured from the test run (`coverage/argv.jsonl`), not searched for — see
| `search conversations` | `--sync-first` | ✅ | |
| `search conversations` | `--sync-time` | ✅ | |
| `search conversations` | `--max-messages` | ✅ | |
| `search conversations` | `--like` | ⛔ | phase 5's shared command; it runs a text model — downloaded over the network, or an external one with its own key — so max's offline tests cannot; cli-core's src/services/embeddings.test.ts drives it with a stand-in model |
| `search conversations` | `--chat` | ⛔ | phase 5's shared command; it runs a text model — downloaded over the network, or an external one with its own key — so max's offline tests cannot; cli-core's src/services/embeddings.test.ts drives it with a stand-in model |
| `search conversations` | `--since-time` | ⛔ | phase 5's shared command; it runs a text model — downloaded over the network, or an external one with its own key — so max's offline tests cannot; cli-core's src/services/embeddings.test.ts drives it with a stand-in model |
| `search conversations` | `--filter` | ✅ | |
Expand Down
1 change: 1 addition & 0 deletions docs/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ MCP и ограничиваются собственными ключами, н
| `models chats set` | ослабить правило отправки текста чатов внешней модели может только владелец |
| `store reset` | нужен общий `--yes`, а вызов через MCP его не передаёт |
| `bot uploads put` | читает файл с вашего компьютера |
| `schedule exec` | запускает файл расписания по таймеру; агент запускает сохранённое расписание через `schedule run <name>` |
| `images read` | отдает картинку вашему агенту в терминале (Claude Code или Codex): агент в MCP читает файл по `local_path` сам |

## Инструменты
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@
},
"dependencies": {
"@msgpack/msgpack": "3.1.3",
"@wirecat/cli-base": "0.126.1",
"@wirecat/cli-core": "0.714.0",
"@wirecat/cli-base": "1.0.0",
"@wirecat/cli-core": "1.0.0",
"commander": "15.0.0",
"lossless-json": "4.3.3",
"ogg-opus-decoder": "1.7.5",
Expand Down
32 changes: 16 additions & 16 deletions pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions scripts/bot/overrides.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Override } from "@wirecat/cli-base/codegen"
import type { ModelOverride } from "@wirecat/cli-base/codegen"

/**
* Corrections to the effect the adapter derives from the HTTP method (GET read, DELETE
* destructive, the rest write). "Destructive" is kept for what cannot be undone.
*/
export const overrides: Record<string, Override> = {
export const overrides: Record<string, ModelOverride> = {
getUpdates: {
effect: "write",
reason: "passing a marker commits every earlier update; another consumer of the bot never sees them",
Expand Down
22 changes: 22 additions & 0 deletions scripts/test-matrix-shared-1000.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { SHARED_0664_0706_UNTESTED } from "./test-matrix-shared-0706.ts"
import type { Untested } from "./test-matrix-untested.ts"

/**
* The options cli-core 1.0 added to shared commands max mounts unchanged, after cli-core 0.706.0's:
* test-matrix-untested.ts is at biome's line limit, so they share its one import.
*/
export const SHARED_0664_0706_1000_UNTESTED: Untested[] = [
...SHARED_0664_0706_UNTESTED,
{
command: "store migrate",
option: "--no-backup",
reason:
"cli-core src/cli/messenger/store-maintenance.test.ts covers store migrate; consumer mounts the shared command",
},
{
command: "search conversations",
option: "--like",
reason:
"phase 5's shared command; it runs a text model — downloaded over the network, or an external one with its own key — so max's offline tests cannot; cli-core's src/services/embeddings.test.ts drives it with a stand-in model",
},
]
4 changes: 2 additions & 2 deletions scripts/test-matrix-untested.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { SHARED_0599_UNTESTED } from "./test-matrix-shared-0599.ts"
import { SHARED_0609_UNTESTED } from "./test-matrix-shared-0609.ts"
import { SHARED_0624_UNTESTED } from "./test-matrix-shared-0624.ts"
import { SHARED_0647_UNTESTED } from "./test-matrix-shared-0647.ts"
import { SHARED_0664_0706_UNTESTED } from "./test-matrix-shared-0706.ts"
import { SHARED_0664_0706_1000_UNTESTED } from "./test-matrix-shared-1000.ts"

/**
* What `max` cannot test offline, each with the reason and where it is checked instead. An entry
Expand All @@ -23,7 +23,7 @@ export const UNTESTED: Untested[] = [
...SHARED_0563_UNTESTED,
...SHARED_0599_UNTESTED,
...SHARED_0647_UNTESTED,
...SHARED_0664_0706_UNTESTED,
...SHARED_0664_0706_1000_UNTESTED,
...SHARED_0609_UNTESTED,
...[
[
Expand Down
2 changes: 1 addition & 1 deletion src/bot/client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CliError } from "@wirecat/cli-base"
import type { ManifestOperation } from "@wirecat/cli-base/codegen"
import type { ManifestOperation } from "@wirecat/cli-base/codegen/runtime"
import type { Chat, Message } from "@wirecat/cli-core"
import type { PersonFacts } from "@wirecat/cli-core/store"
import * as v from "valibot"
Expand Down
7 changes: 6 additions & 1 deletion src/bot/generated/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
// Source: spec/bot/schema.yaml
// Run: pnpm bot:generate

import type { ApiServer, ManifestOperation, SecurityRequirement, SecurityScheme } from "@wirecat/cli-base/codegen"
import type {
ApiServer,
ManifestOperation,
SecurityRequirement,
SecurityScheme,
} from "@wirecat/cli-base/codegen/runtime"

export const operations: readonly ManifestOperation[] = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/bot/input.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ManifestOperation, SchemaNode } from "@wirecat/cli-base/codegen"
import type { ManifestOperation, SchemaNode } from "@wirecat/cli-base/codegen/runtime"
import { apiFlagOf, apiOptionKey, checkApiBody, checkApiParameter, readApiBody } from "@wirecat/cli-core/cli"
import { schemas } from "./generated/schemas.js"

Expand Down
2 changes: 1 addition & 1 deletion src/bot/transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
type SleepLike,
singleLine,
} from "@wirecat/cli-base"
import type { ManifestOperation } from "@wirecat/cli-base/codegen"
import type { ManifestOperation } from "@wirecat/cli-base/codegen/runtime"
import { type FetchLike, hostFetch, providerWaitMs, statusToCode } from "@wirecat/cli-base/http"
import { type DiagnosticEvent, providerErrorKey, type RequestEvent } from "@wirecat/cli-core/cli"
import { guardedWrite, newOperationId } from "@wirecat/cli-core/sends"
Expand Down
2 changes: 1 addition & 1 deletion src/commands/bot-api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { AddressInfo } from "node:net"
import { tmpdir } from "node:os"
import { join } from "node:path"
import { captureStreams, type KeyringStore, memoryKeyring } from "@wirecat/cli-base"
import type { ManifestOperation, SchemaNode } from "@wirecat/cli-base/codegen"
import type { ManifestOperation, SchemaNode } from "@wirecat/cli-base/codegen/runtime"
import { afterAll, beforeAll, beforeEach, describe, expect, it } from "vitest"
import { parse } from "yaml"
import { BotTokenStore } from "../bot/auth.js"
Expand Down
2 changes: 1 addition & 1 deletion src/commands/bot-context.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CliError } from "@wirecat/cli-base"
import type { ManifestOperation } from "@wirecat/cli-base/codegen"
import type { ManifestOperation } from "@wirecat/cli-base/codegen/runtime"
import { type EventSink, type Recording, startRecording, useAsProcessRun } from "@wirecat/cli-core/cli"
import { levelFor } from "@wirecat/cli-core/sends"
import type { Command } from "commander"
Expand Down
2 changes: 1 addition & 1 deletion src/commands/bot-sends.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { readFileSync } from "node:fs"
import { join } from "node:path"
import { CliError } from "@wirecat/cli-base"
import type { ManifestOperation } from "@wirecat/cli-base/codegen"
import type { ManifestOperation } from "@wirecat/cli-base/codegen/runtime"
import { readOnlyRefusal } from "@wirecat/cli-core/cli"
import {
guardedWrite,
Expand Down
Loading