From 71a4502451acb4bb7b97df9ee7f6b78cbea425ee Mon Sep 17 00:00:00 2001 From: leemour Date: Mon, 16 Nov 2026 14:29:19 +0100 Subject: [PATCH 1/4] feat(meetings): Desktop opens beeline's calls; meetings download saves a recording Builds on cli-base 0.104.0. `src/wcat.ts` names the provider (`meetingsProvider: "beeline"`), so `cli-dev manifest` writes `desktop.meetings` into contracts/wirecat.json: WireCat Desktop (0.6.9 or later) then links, opens and shows the transcript of a client's beeline call from the Clients page and Meetings. Desktop 0.6.8 refuses a manifest with this key, so release this after Desktop 0.6.9. `syncs` is now "calls", a word Desktop counts with, instead of "recorded calls", which it counted as "records". `meetings download --output ` saves one call's recording from Beeline to a new private file (mode 0600, never over an existing file), so the recording Desktop cannot play yet can be listened to from the CLI. It is off MCP (an agent cannot name a file to write) and `--output` is owner-only; permission key `meetings.download`. README and docs/security.md say a recording now reaches disk only through it, and how to list a client's calls by number (`meetings list 'title:*'`). WC-CMD-29, WC-PERM-22. Co-Authored-By: Claude Opus 5.5 --- README.md | 10 ++-- changes/feat-desktop-meetings.md | 9 ++++ contracts/wirecat.json | 36 +++++++++++++- docs/commands.md | 24 ++++++++- docs/dev/test-matrix.md | 4 +- docs/security.md | 9 ++-- package.json | 2 +- pnpm-lock.yaml | 16 +++--- src/commands/download.ts | 68 +++++++++++++++++++++++++ src/commands/meetings.ts | 10 ++++ src/download.test.ts | 85 ++++++++++++++++++++++++++++++++ src/identity.ts | 2 +- src/wcat.test.ts | 7 +++ src/wcat.ts | 3 +- 14 files changed, 263 insertions(+), 22 deletions(-) create mode 100644 changes/feat-desktop-meetings.md create mode 100644 src/commands/download.ts create mode 100644 src/download.test.ts diff --git a/README.md b/README.md index 554b112..487727f 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,9 @@ beeline work search meetings "доставка" More: - Export a call as Markdown or WebVTT: `beeline work meetings export 42 --format vtt --output call.vtt`. +- Save a call's recording to listen to it: `beeline work meetings download 42 --output call-42.mp3`. +- Find a client's calls by their number: `beeline work meetings list 'title:*79000000001' --json`. The title of a call + holds the client's number in international form. - Find a manager across the calls: `beeline work meetings people "Test Manager"`. - Search every WireCat store on this computer, chats and calls together, from any WireCat CLI with `search all`. @@ -176,8 +179,8 @@ beeline work meetings sync --dry-run # what it would do an meetings: `session start` and `end`, `config set`, `unset`, `migrate` and `repair`, `skill install`, `mcp add` and `revoke`, `meetings repair`, and `upgrade`. It lets through what only adds: `meetings sync` still fetches new calls into the store, `meetings transcribe` adds transcripts (with `--replace`, the old one stays in the -transcript's history), `models download` fetches a model, `meetings export --output` writes a new file inside a -scheduled run's work folder and nowhere else, and `mcp serve`, `mcp server start` and `stop` run. A `--dry-run` +transcript's history), `models download` fetches a model, `meetings export --output` and `meetings download` write +a new file inside a scheduled run's work folder and nowhere else, and `mcp serve`, `mcp server start` and `stop` run. A `--dry-run` always runs, as it changes nothing. More: [settings](docs/configuration.md). @@ -191,7 +194,8 @@ More: [settings](docs/configuration.md). ## Security - The token is sent only to Beeline, in a request header. No command, error, log or run record shows it. -- Recordings are held in memory while they are transcribed, and never written to disk. +- Recordings are held in memory while they are transcribed, and written to disk only by `meetings download`, to the + new file you name. - The store keeps client phone numbers and the managers' names, emails and extensions. Treat it like the calls themselves. diff --git a/changes/feat-desktop-meetings.md b/changes/feat-desktop-meetings.md new file mode 100644 index 0000000..642d573 --- /dev/null +++ b/changes/feat-desktop-meetings.md @@ -0,0 +1,9 @@ +### Added + +- **WireCat Desktop opens beeline's calls.** The manifest now names how a call opens (cli-base 0.104.0, + `meetingsProvider`): a client's call on Desktop's Clients page and in Meetings opens in beeline, with its + people and transcript. It needs the Desktop that reads it (0.6.9 or later); Desktop 0.6.8 refuses this manifest. + A sync is now counted as calls (`syncs: "calls"`), not as records. +- **`meetings download --output `** saves one call's recording from Beeline to a new file, to listen to + it. It never writes over a file that exists, and the file is readable only by you. Its permission key is + `meetings.download`. diff --git a/contracts/wirecat.json b/contracts/wirecat.json index 782b713..d4ffa18 100644 --- a/contracts/wirecat.json +++ b/contracts/wirecat.json @@ -188,6 +188,19 @@ "permission": "meetings.transcribe", "entity": "call_transcription_report" }, + { + "path": [ + "meetings", + "download" + ], + "summary": "save one call's recording from Beeline to a new file", + "effects": { + "remote": "read", + "local": "write" + }, + "permission": "meetings.download", + "entity": "call_recording" + }, { "path": [ "events", @@ -719,7 +732,7 @@ ], "last": null, "lastShape": "runs", - "what": "recorded calls", + "what": "calls", "note": null }, "storeInfo": null, @@ -734,6 +747,25 @@ "app": "beeline-cli", "env": "BEELINE" }, - "settings": null + "settings": null, + "meetings": { + "provider": "beeline", + "show": [ + "{profile}", + "meetings", + "show", + "{id}", + "--no-record", + "--json" + ], + "transcript": [ + "{profile}", + "meetings", + "transcript", + "{id}", + "--no-record", + "--json" + ] + } } } diff --git a/docs/commands.md b/docs/commands.md index 1bcba85..0370628 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -177,7 +177,7 @@ beeline meetings show [options] **Returns:** meeting details — ref, id, provider_id, provider, account, title, url, started_at, and 21 more; every field: beeline commands info meetings show -**Next usually:** `beeline meetings transcript `, `beeline meetings export ` +**Next usually:** `beeline meetings transcript `, `beeline meetings export `, `beeline meetings download ` **Example:** `beeline work meetings show 1 --json` @@ -310,6 +310,28 @@ beeline meetings transcribe [query] [options] **Example:** `beeline work meetings transcribe --max-meetings 20 --json`, `beeline work meetings transcribe "duration_ms>=60000" --json`, `beeline work meetings transcribe id:4494 --replace --json` +### `beeline meetings download` + +download the recording of a stored call from Beeline and write it to a new file; Beeline keeps the recording, this computer keeps only the transcript + +**Changes something on this computer only.** + +```sh +beeline meetings download [options] +``` + +| Argument | | What it is | +|---|---|---| +| `meeting` | required | stored call id, or the ref meetings list prints (meeting:1/375). | + +| Option | What it does | +|---|---| +| `--output ` | the new file to write; one that exists is refused. | + +**Returns:** call recording — meeting, provider_id, output, bytes; every field: beeline commands info meetings download + +**Example:** `beeline work meetings download 375 --output call-375.mp3 --json` + ## `beeline events` the owner's stored events diff --git a/docs/dev/test-matrix.md b/docs/dev/test-matrix.md index e6190fa..7c06832 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. -**75 ✅ · 63 ⛔ · 0 ❌** — 45 commands, 93 options. +**77 ✅ · 63 ⛔ · 0 ❌** — 46 commands, 94 options. | Command | Option | | Note | |---|---|---|---| @@ -50,6 +50,8 @@ Measured from the test run (`coverage/argv.jsonl`), not searched for — see | `meetings transcribe` | `--replace` | ✅ | | | `meetings transcribe` | `--max-meetings` | ✅ | | | `meetings transcribe` | `--model` | ✅ | | +| `meetings download` | | ✅ | | +| `meetings download` | `--output` | ✅ | | | `events list` | | ✅ | | | `search meetings` | | ✅ | | | `search meetings` | `--meeting-id` | ⛔ | cli-core's shared meetings command, tested in cli-core's src/meetings/cli; beeline supplies only the store and the call source (src/calls.test.ts) | diff --git a/docs/security.md b/docs/security.md index 4df2b0c..7d660f8 100644 --- a/docs/security.md +++ b/docs/security.md @@ -8,8 +8,8 @@ What WireCat CLIs share — the keyring, permissions, MCP, run records and what - `beeline` talks to one service: the Beeline Cloud PBX API at `cloudpbx.beeline.ru`, over HTTPS. - It only reads: the list of recorded calls and each call's recording. The API can also delete recordings and place calls. `beeline` has no command that does either. -- `meetings sync`, `meetings transcribe`, `session start` and `session status --check` are the only commands that - ask Beeline. `--offline` refuses them before any request. `models download` fetches a speech model from its own +- `meetings sync`, `meetings transcribe`, `meetings download`, `session start` and `session status --check` are the + only commands that ask Beeline. `--offline` refuses them before any request. `models download` fetches a speech model from its own host, and sends nothing of yours. ## The API token @@ -26,8 +26,9 @@ What WireCat CLIs share — the keyring, permissions, MCP, run records and what ## Recordings and speech -- A recording is downloaded into memory, transcribed and dropped. It is never written to disk. The store keeps only - its size, its length and a hash, so a second run can tell the same recording. +- A recording is downloaded into memory, transcribed and dropped. The store keeps only its size, its length and a + hash, so a second run can tell the same recording. Only `meetings download --output ` writes one to disk: to + a new file only you can read, never over a file that exists. - Speech is recognized on this computer, by a model that `beeline models download` fetches once into the folder every WireCat CLI shares. The recording and its transcript are sent to no speech service. A cloud option, such as OpenAI, is planned and not offered yet. diff --git a/package.json b/package.json index 7a70edd..e1132d7 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "docs:spell": "cspell lint --config cspell.json --no-progress --no-summary README.md README.ru.md SECURITY.md CHANGELOG.md AGENTS.md CLAUDE.md 'docs/*.md' 'skills/**/*.md'" }, "dependencies": { - "@wirecat/cli-base": "0.103.0", + "@wirecat/cli-base": "0.104.0", "@wirecat/cli-core": "0.674.0", "commander": "15.0.0", "valibot": "1.5.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 70003b4..0497771 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,11 +13,11 @@ importers: .: dependencies: '@wirecat/cli-base': - specifier: 0.103.0 - version: 0.103.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) + specifier: 0.104.0 + version: 0.104.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) '@wirecat/cli-core': specifier: 0.674.0 - version: 0.674.0(@wirecat/cli-base@0.103.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) + version: 0.674.0(@wirecat/cli-base@0.104.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 @@ -1155,8 +1155,8 @@ packages: '@wasm-audio-decoders/opus-ml@0.0.3': resolution: {integrity: sha512-SEeTmk0eb3q5etJA/NHCRWW6BivTx9tqvNTmG0kg2ynuATEQRUZnwQE6Ibvl1BBvqIGHqI57+qyJMWmJBwb5XQ==} - '@wirecat/cli-base@0.103.0': - resolution: {integrity: sha512-yWzm5JDkr++sMi4vWc7rB1NXqx9YsV1Vo5wgKSSV1Omc0grM84w5J9j0ArDbRVZU0wLpckU09Gakf7+H40UyhQ==} + '@wirecat/cli-base@0.104.0': + resolution: {integrity: sha512-560dJern2N83/TTiosi9g8jlotzF3U3bvTv8rGp0/DOm+wBfT/5Dt33W+vDj2K2odXvhZzX7+CQWM9woi5bwNw==} engines: {node: '>=22'} hasBin: true peerDependencies: @@ -3164,7 +3164,7 @@ snapshots: dependencies: '@wasm-audio-decoders/common': 9.0.7 - '@wirecat/cli-base@0.103.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5)': + '@wirecat/cli-base@0.104.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5)': dependencies: '@valibot/to-json-schema': 1.8.0(valibot@1.5.0(typescript@7.0.2)) cli-table3: 0.6.5 @@ -3184,7 +3184,7 @@ snapshots: '@wirecat/cli-core-sqlite@1.1.0': {} - '@wirecat/cli-core@0.674.0(@wirecat/cli-base@0.103.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.674.0(@wirecat/cli-base@0.104.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) @@ -3194,7 +3194,7 @@ snapshots: '@valibot/to-json-schema': 1.8.0(valibot@1.5.0(typescript@7.0.2)) '@wasm-audio-decoders/flac': 0.2.11 '@wasm-audio-decoders/ogg-vorbis': 0.1.20 - '@wirecat/cli-base': 0.103.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) + '@wirecat/cli-base': 0.104.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) '@wirecat/cli-core-onnx': 1.2.0 '@wirecat/cli-core-sqlite': 1.1.0 '@xmldom/xmldom': 0.9.12 diff --git a/src/commands/download.ts b/src/commands/download.ts new file mode 100644 index 0000000..5abbc5f --- /dev/null +++ b/src/commands/download.ts @@ -0,0 +1,68 @@ +import { writeFile } from "node:fs/promises" +import { CliError } from "@wirecat/cli-base" +import { annotate } from "@wirecat/cli-base/commands" +import { answerEntity, baseContext, ownerOnlyOption, refuseOffline, writesNewFileOnlyWith } from "@wirecat/cli-core/cli" +import type { MeetingStore } from "@wirecat/cli-core/meetings" +import { Command } from "commander" +import * as v from "valibot" +import type { BeelineApi } from "../beeline.js" +import { configuration } from "../config.js" +import { IDENTITY } from "../identity.js" + +export interface DownloadDeps { + store: () => MeetingStore + accountId: () => number + api: () => Pick + meetingId: (text: string) => number + write: (saved: SavedRecording, command: Command) => void +} + +const SAVED = v.strictObject({ + meeting: v.number(), + provider_id: v.string(), + output: v.string(), + bytes: v.number(), +}) + +export type SavedRecording = v.InferOutput + +/** cli-core's `writeNewFile` takes text only; a recording is bytes, kept with the same rule: never over a file. */ +const writeNew = async (path: string, bytes: Uint8Array) => { + try { + await writeFile(path, bytes, { flag: "wx", mode: 0o600 }) + } catch (error) { + if ((error as NodeJS.ErrnoException).code === "EEXIST") + throw new CliError("validation_error", "output file already exists; choose another path", { param: "--output" }) + throw error + } +} + +export const downloadCommand = (deps: DownloadDeps): Command => { + const output = ownerOnlyOption("--output ", "the new file to write; one that exists is refused") + const base = annotate(new Command("download"), { + effects: { remote: "read", local: "write" }, + // An agent over MCP cannot name a file to write; it reads the transcript instead. + mcp: false, + examples: [`${IDENTITY.command} work meetings download 375 --output call-375.mp3 --json`], + }).addOption(output.makeOptionMandatory()) + const command = writesNewFileOnlyWith(answerEntity(base, "call_recording", SAVED), "output") + .summary("save one call's recording from Beeline to a new file") + .description( + "download the recording of a stored call from Beeline and write it to a new file; Beeline keeps the " + + "recording, this computer keeps only the transcript", + ) + .argument("", "stored call id, or the ref meetings list prints (meeting:1/375)", deps.meetingId) + return command.action(async function (this: Command, id: number, opts: { output: string }) { + const context = baseContext(this, configuration.resolveSettings) + const details = await deps.store().meeting(id) + if (!details || details.meeting.accountId !== deps.accountId()) + throw new CliError("not_found", `no call ${id} in this profile; see ${IDENTITY.command} meetings list`, { + meeting: id, + }) + refuseOffline(this, "Beeline") + const providerId = details.meeting.externalId + const bytes = await context.run(() => deps.api().recording(providerId)) + await writeNew(opts.output, bytes) + deps.write({ meeting: id, provider_id: providerId, output: opts.output, bytes: bytes.byteLength }, this) + }) +} diff --git a/src/commands/meetings.ts b/src/commands/meetings.ts index a858ae1..bc7d7b6 100644 --- a/src/commands/meetings.ts +++ b/src/commands/meetings.ts @@ -30,6 +30,7 @@ import { Command, type Command as CommandType, InvalidArgumentError } from "comm import type { BeelineApi } from "../beeline.js" import { configuration } from "../config.js" import { IDENTITY } from "../identity.js" +import { downloadCommand } from "./download.js" import { transcribeCommand } from "./transcribe.js" interface Opened { @@ -226,6 +227,15 @@ export const meetingsMount = () => { }, }), ) + meetings?.addCommand( + downloadCommand({ + store: () => need().store.meetings, + accountId: () => need().accountId, + api: () => need().api(), + meetingId, + write: (saved, command) => answers.push(() => renderAnswer(command, outputFor(command), itemOf(saved))), + }), + ) for (const group of holder.commands) { if (group.commands.length && !hasSharedContract(group)) annotate(group, { effects: NO_EFFECTS }) for (const leaf of leaves(group)) { diff --git a/src/download.test.ts b/src/download.test.ts new file mode 100644 index 0000000..3e08f4a --- /dev/null +++ b/src/download.test.ts @@ -0,0 +1,85 @@ +import { mkdtempSync, readFileSync, statSync, writeFileSync } from "node:fs" +import { tmpdir } from "node:os" +import { join } from "node:path" +import { afterEach, beforeEach, expect, it } from "vitest" +import { run } from "./program.js" +import { record } from "./testing/records.js" + +const asked: string[] = [] +const beeline = async (url: string | URL | Request) => { + const path = new URL(String(url)).pathname + asked.push(path) + return path.endsWith("/download") + ? new Response(new Uint8Array([1, 2, 3])) + : Response.json([record(1), record(2, { phone: "9000000001" })]) +} + +const ran = async (argv: string[]) => { + const out: string[] = [] + const err: string[] = [] + const code = await run(argv, { + streams: { data: (text) => out.push(text), diagnostic: (text) => err.push(text) }, + tty: false, + fetch: beeline, + }) + return { code, out: out.join("\n"), err: err.join("\n") } +} + +let folder: string + +beforeEach(async () => { + process.env.BEELINE_TOKEN = "test-token" + folder = mkdtempSync(join(tmpdir(), "beeline-download-")) + expect((await ran(["work", "meetings", "sync", "--since-time", "2026-10-01T00:00:00Z"])).code).toBe(0) + asked.length = 0 +}) + +afterEach(() => { + delete process.env.BEELINE_TOKEN +}) + +const firstCall = async () => { + const listed = JSON.parse((await ran(["work", "meetings", "list", "--offline", "--json"])).out).items + return listed[0] as { id: string; ref: string; provider_id: string } +} + +it("saves one call's recording to a new private file, by id or by the ref meetings list prints", async () => { + const call = await firstCall() + const output = join(folder, "call.mp3") + const saved = await ran(["work", "meetings", "download", call.ref, "--output", output, "--json"]) + expect(saved.code, saved.err).toBe(0) + expect(JSON.parse(saved.out).item).toEqual({ + meeting: Number(call.id), + provider_id: call.provider_id, + output, + bytes: 3, + }) + expect([...readFileSync(output)]).toEqual([1, 2, 3]) + if (process.platform !== "win32") expect(statSync(output).mode & 0o777).toBe(0o600) + expect(asked).toHaveLength(1) + expect(asked[0]).toMatch(new RegExp(`/v2/records/${call.provider_id}/download$`)) +}) + +it("never writes over a file, and asks Beeline nothing for a call the profile does not have", async () => { + const call = await firstCall() + const output = join(folder, "kept.mp3") + writeFileSync(output, "kept") + const refused = await ran(["work", "meetings", "download", call.id, "--output", output, "--json"]) + expect(refused.code).not.toBe(0) + expect(refused.out + refused.err).toMatch(/already exists/) + expect(readFileSync(output, "utf8")).toBe("kept") + + asked.length = 0 + const missing = await ran(["work", "meetings", "download", "99999", "--output", join(folder, "x.mp3"), "--json"]) + expect(missing.code).not.toBe(0) + expect(missing.out + missing.err).toMatch(/no call 99999/) + expect(asked).toEqual([]) +}) + +it("finds a client's calls by the number their title holds, as the README shows", async () => { + const found = await ran(["work", "meetings", "list", "title:*79000000001", "--offline", "--json"]) + expect(found.code, found.err).toBe(0) + expect(JSON.parse(found.out).items.map((call: { title: string }) => call.title)).toEqual([ + "Исходящий звонок · Test Manager ↔ +79000000001", + ]) +}) diff --git a/src/identity.ts b/src/identity.ts index f2315b9..795d874 100644 --- a/src/identity.ts +++ b/src/identity.ts @@ -23,7 +23,7 @@ export const DESKTOP: ManifestIdentity & { hosts: readonly string[] } = { ...IDENTITY, docs: "https://github.com/WireCatLabs/beeline-cli#readme", tagline: "Beeline Cloud PBX calls, transcribed on your computer", - syncs: "recorded calls", + syncs: "calls", signIn: { gives: "Lets your agent read the recorded calls of your Beeline Cloud PBX, transcribed on this computer.", asks: "A Beeline Cloud PBX API token, from the Beeline cabinet: Услуги → Интеграция по API.", diff --git a/src/wcat.test.ts b/src/wcat.test.ts index 8fd613a..a8f1193 100644 --- a/src/wcat.test.ts +++ b/src/wcat.test.ts @@ -25,6 +25,13 @@ describe("contracts/wirecat.json", () => { const permissionOf = (path: string) => manifest.commands.find((command) => command.path.join(" ") === path)?.permission expect(permissionOf("meetings sync")).toBe("meetings.sync") + expect(permissionOf("meetings download")).toBe("meetings.download") + expect(manifest.desktop.meetings).toEqual({ + provider: "beeline", + show: ["{profile}", "meetings", "show", "{id}", "--no-record", "--json"], + transcript: ["{profile}", "meetings", "transcript", "{id}", "--no-record", "--json"], + }) + expect(manifest.desktop.sync?.what).toBe("calls") }) }) diff --git a/src/wcat.ts b/src/wcat.ts index 22e81f6..844a722 100644 --- a/src/wcat.ts +++ b/src/wcat.ts @@ -1,5 +1,6 @@ import type { ManifestIdentity } from "@wirecat/cli-base/wcat/manifest" +import { PROVIDER_NAME } from "./call-source.js" import { permissions } from "./config.js" import { DESKTOP } from "./identity.js" -export const WCAT: ManifestIdentity = { ...DESKTOP, permissionOf: permissions.keyOf } +export const WCAT: ManifestIdentity = { ...DESKTOP, meetingsProvider: PROVIDER_NAME, permissionOf: permissions.keyOf } From f5bfb9938b5acfaa7c1388d13ba7d62b10d1dafd Mon Sep 17 00:00:00 2001 From: leemour Date: Mon, 16 Nov 2026 14:36:58 +0100 Subject: [PATCH 2/4] wip: number ids, follow-ups, upgrade contract, owner release script --- .github/workflows/ci.yml | 4 - bin/owner-release | 300 ++++ contracts/previous/package.json | 9 + contracts/previous/pnpm-lock.yaml | 1881 ++++++++++++++++++++++++ contracts/previous/pnpm-workspace.yaml | 4 + contracts/seed.mjs | 57 + contracts/upgrade.json | 80 + docs/dev/DESIGN.md | 3 +- docs/dev/TESTING.md | 10 +- package.json | 5 +- scenarios/first-calls.md | 12 +- scripts/docs-rules.ts | 2 +- src/call-source.ts | 3 +- src/client-rekey.test.ts | 54 +- src/commands/meetings.ts | 2 +- src/program.ts | 2 +- src/reasons.ts | 5 + src/store.ts | 20 +- src/transcribe-calls.ts | 3 +- 19 files changed, 2419 insertions(+), 37 deletions(-) create mode 100755 bin/owner-release create mode 100644 contracts/previous/package.json create mode 100644 contracts/previous/pnpm-lock.yaml create mode 100644 contracts/previous/pnpm-workspace.yaml create mode 100644 contracts/seed.mjs create mode 100644 contracts/upgrade.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8bed2f..3d21dda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,10 +29,6 @@ jobs: platform-run: | node dist/bin/beeline.js commands --json >/dev/null node dist/bin/beeline.js doctor --json >/dev/null - # contracts:upgrade needs local state of the CLI's own and a published version to upgrade from (WC-TEST-14). - # Once a CLI has both, it adds the script and removes this skip; see docs/dev/TESTING.md. - skip: | - contracts:upgrade # Reads the lockfile, so a frozen install cannot hide a cli-core/cli-base peer mismatch: the packed CLI would # get two cli-base copies and crash at start while every local test passes. checks: | diff --git a/bin/owner-release b/bin/owner-release new file mode 100755 index 0000000..3325c5c --- /dev/null +++ b/bin/owner-release @@ -0,0 +1,300 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# The owner's release of beeline, start to end, from the main checkout: +# +# bin/owner-release +# +# 1. Checks that main is clean, fetches it and fast-forwards it to origin/main. +# 2. Installs the locked dependencies. +# 3. When npm already has the version in package.json, raises it: collects changes/ and `## Unreleased` into a dated +# section, and picks the level its headings need (scripts/version-level.ts). A version raised and dated by hand is +# released as it is. +# 4. Builds, and runs the read-only live check of Beeline on with that build: a throwaway HOME, XDG folders +# and store, no D-Bus, so the owner's real store and keyring stay untouched. It prints counts and field names only. +# 5. Records the check in docs/dev/live-checks.txt, which bin/release reads. +# 6. Opens the release pull request with the version and the record in it, waits for its checks and squash merges it. +# The record rides in the release commit, so no second pull request is needed. +# 7. Runs bin/release --local, which checks again and publishes from this computer. +# +# The Beeline token is BEELINE_TOKEN when it is set, else the keyring entry `session start` keeps (service +# beeline-cli, username token:). It reaches only the beeline runs, through their environment; it is never +# printed. For the npm token, bin/release reads NPM_TOKEN, or the keyring when NPM_KEYRING_ACCOUNT names its account, +# or your npm login. + +require "fileutils" +require "json" +require "open3" +require "tmpdir" + +ROOT = File.expand_path("..", __dir__) +CLI = File.join(ROOT, "dist/bin/beeline.js") +PACKAGE_JSON = File.join(ROOT, "package.json") +CHANGELOG = File.join(ROOT, "CHANGELOG.md") +CHANGES = File.join(ROOT, "changes") +LIVE_CHECKS = File.join(ROOT, "docs/dev/live-checks.txt") +VERSION_LEVEL = File.join(ROOT, "scripts/version-level.ts") +FRAGMENTS = File.join(ROOT, "scripts/changelog-fragments.ts") +DOCS_RULES = File.join(ROOT, "scripts/docs-rules.ts") +RELEASE = File.join(ROOT, "bin/release") +MODELS = File.join(ENV.fetch("XDG_DATA_HOME", File.join(Dir.home, ".local/share")), "WireCat/models/audio") + +PACKAGE = "@wirecat/beeline-cli" +MODEL = "gigaam-v3" +# The name the record carries: bin/release checks the record, not who wrote it. +RECORDED_SCRIPT = "bin/owner-release" +KEYRING_SERVICE = "beeline-cli" + +def step(title) + puts "\n== #{title}" +end + +def run!(*argv) + puts "$ #{argv.join(' ')}" + system(*argv, chdir: ROOT) or abort "failed: #{argv.join(' ')}" +end + +def output!(*argv) + out, status = Open3.capture2(*argv, chdir: ROOT) + abort "failed: #{argv.join(' ')}" unless status.success? + out.strip +end + +def published?(version) + _, status = Open3.capture2("npm", "view", "#{PACKAGE}@#{version}", "version", "--prefer-online", err: File::NULL) + status.success? +end + +def package_version + JSON.parse(File.read(PACKAGE_JSON)).fetch("version") +end + +def sync_main + step "main is clean and at origin/main" + abort "run from the main branch" unless output!("git", "branch", "--show-current") == "main" + abort "main has uncommitted changes" unless output!("git", "status", "--porcelain", "--untracked-files=no").empty? + run! "git", "fetch", "--tags", "origin" + run! "git", "merge", "--ff-only", "origin/main" + output!("git", "rev-parse", "HEAD") +end + +def unreleased_text(changelog) + changelog[/^## Unreleased\n(.*?)(?=^## )/m, 1].to_s.strip +end + +def fragment_files + Dir[File.join(CHANGES, "*.md")].reject { |path| File.basename(path) == "README.md" } +end + +# The next free patch above npm's latest; scripts/version-level.ts then raises it to the level the headings need. +def next_patch + taken = JSON.parse(output!("npm", "view", PACKAGE, "versions", "--json", "--prefer-online")) + major, minor, patch = output!("npm", "view", PACKAGE, "version", "--prefer-online").split(".").map(&:to_i) + patch += 1 while taken.include?("#{major}.#{minor}.#{patch + 1}") + ["#{major}.#{minor}.#{patch + 1}", taken] +end + +def replace_once!(path, from, to) + text = File.read(path) + abort "#{path} has no #{from.inspect}" unless text.scan(from).length == 1 + File.write(path, text.sub(from, to)) +end + +def raise_version(current) + changelog = File.read(CHANGELOG) + if fragment_files.empty? && unreleased_text(changelog).empty? + abort "#{current} is on npm and nothing was merged for a new version: no changes/ fragment, no ## Unreleased entry" + end + + first, taken = next_patch + date = Time.now.strftime("%d.%m.%Y") + step "dating the changelog section as #{first}" + if changelog.match?(/^## Unreleased$/) + replace_once!(CHANGELOG, "\n## Unreleased\n", "\n## #{first} — #{date}\n") + else + File.write(CHANGELOG, changelog.sub(/^## /, "## #{first} — #{date}\n\n## ")) + end + run! "node", "--experimental-strip-types", FRAGMENTS, "--rules", DOCS_RULES, first + + version = output!("node", "--experimental-strip-types", VERSION_LEVEL, "--next", first) + abort "#{version} is already on npm" if taken.include?(version) + replace_once!(CHANGELOG, "\n## #{first} — ", "\n## #{version} — ") unless version == first + step "raising package.json from #{current} to #{version}" + replace_once!(PACKAGE_JSON, %("version": "#{current}"), %("version": "#{version}")) + run! "pnpm", "version:sync" + version +end + +def dated?(version) + File.read(CHANGELOG)[/^## .*$/] =~ /\A## #{Regexp.escape(version)} — \d\d\.\d\d\.\d{4}\z/ +end + +def beeline(env, profile, *args) + out, err, status = Open3.capture3(env, "node", CLI, profile, *args, "--json", chdir: env.fetch("HOME")) + return JSON.parse(out) if status.success? + + # The error's code and reason only: its message may quote a call record. + error = (JSON.parse(err)["error"] rescue nil) || {} + puts "!! #{args.join(' ')} failed (exit #{status.exitstatus}): #{error['code']} #{error['reason']}".rstrip + nil +end + +def beeline_token(profile) + token = ENV["BEELINE_TOKEN"].to_s + if token.empty? + token, = Open3.capture2("secret-tool", "lookup", "service", KEYRING_SERVICE, "username", "token:#{profile}", + err: File::NULL) + end + token = token.chomp + abort "no token for profile #{profile} in the keyring; a token kept in a file is not read here: export BEELINE_TOKEN" if token.empty? + token +end + +def live_check(profile) + token = beeline_token(profile) + failed = false + Dir.mktmpdir("beeline-live-") do |sandbox| + env = { + "HOME" => sandbox, + "XDG_CONFIG_HOME" => File.join(sandbox, "config"), + "XDG_DATA_HOME" => File.join(sandbox, "data"), + "XDG_STATE_HOME" => File.join(sandbox, "state"), + "XDG_CACHE_HOME" => File.join(sandbox, "cache"), + "MESSAGING_STORE" => File.join(sandbox, "wirecat.db"), + "DBUS_SESSION_BUS_ADDRESS" => "disabled:", + "BEELINE_NO_UPDATE_CHECK" => "1", + "BEELINE_TOKEN" => token, + } + + step "beeline #{profile} session status --check" + answer = beeline(env, profile, "session", "status", "--check") + answer ? puts("signed in") : failed = true + + since = (Time.now.utc - 7 * 86_400).strftime("%Y-%m-%dT00:00:00Z") + step "beeline #{profile} meetings sync --since-time #{since}" + answer = beeline(env, profile, "meetings", "sync", "--since-time", since) + if answer + item = answer.fetch("item", {}) + puts "#{item['meetings']} meeting(s), #{item['participants']} participant(s), " \ + "#{(item['warnings'] || []).length} warning(s)" + else + failed = true + end + + step "beeline #{profile} meetings list --limit 3" + answer = beeline(env, profile, "meetings", "list", "--limit", "3") + if answer + items = answer.fetch("items", []) + puts "#{items.length} item(s); fields: #{(items.first || {}).keys.join(', ')}" + else + failed = true + end + + step "beeline #{profile} meetings transcribe --max-meetings 1" + if Dir.exist?(File.join(MODELS, MODEL)) + # The owner's downloaded model, linked for reading: a fresh download per check would take minutes. + FileUtils.mkdir_p(File.join(sandbox, "data/WireCat/models")) + File.symlink(MODELS, File.join(sandbox, "data/WireCat/models/audio")) + answer = beeline(env, profile, "meetings", "transcribe", "--max-meetings", "1") + item = answer ? answer.fetch("item", {}) : {} + errors = (item["failed"] || []).map { |one| one["reason"] } + puts "#{item['transcribed'].to_i} transcribed, #{item['audio_seconds'].to_i} s of audio, " \ + "#{item['remaining'].to_i} remaining, failed: #{errors.empty? ? 'none' : errors.join(', ')}" + failed = true unless answer && item["transcribed"].to_i >= 1 && errors.empty? + else + puts "!! no #{MODEL} in #{MODELS}: run `beeline models download #{MODEL}` once" + failed = true + end + end + !failed +end + +def release_body(version, record) + <<~BODY + Prepared by `bin/owner-release`: the version, its changelog section, and the live check of this commit's code. + + ## Conformance + + - **Live check** (read-only, `bin/owner-release`, throwaway store): `#{record}` + - **`pnpm release:check`** runs in `bin/release --local` on main before #{version} is published; this pull + request's own checks run the CI validation. + - **Fresh audit and slice reviews:** in the pull requests merged since the last release. + BODY +end + +def merge(pr, base) + step "waiting for the checks of #{pr}" + 30.times do + break if output!("gh", "pr", "checks", pr, "--required", "--json", "name", "--jq", "length").to_i.positive? + + sleep 2 + end + run! "gh", "pr", "checks", pr, "--watch", "--required", "--fail-fast" + run! "git", "fetch", "origin" + if output!("git", "rev-parse", "origin/main") != base + abort "main advanced while #{pr} was checked; review the version against it, then merge #{pr} and run bin/release --local" + end + state = nil + 180.times do + state = output!("gh", "pr", "view", pr, "--json", "mergeStateStatus", "--jq", ".mergeStateStatus") + break if %w[CLEAN HAS_HOOKS UNSTABLE].include?(state) + + sleep 10 + end + abort "#{pr} is #{state} after 30 minutes" unless %w[CLEAN HAS_HOOKS UNSTABLE].include?(state) + run! "gh", "pr", "merge", pr, "--squash", "--delete-branch", "--subject", "chore(release): #{version_of(pr)} (##{pr[/\d+\z/]})" + run! "git", "merge", "--ff-only", "origin/main" +end + +def version_of(pr) + output!("gh", "pr", "view", pr, "--json", "title", "--jq", ".title")[/\d+\.\d+\.\d+/] +end + +def main(argv) + abort "usage: #{RECORDED_SCRIPT} " unless argv.length == 1 && !argv.first.start_with?("-") + profile = argv.first + + base = sync_main + step "installing the locked dependencies" + run! "pnpm", "install", "--frozen-lockfile" + + current = package_version + raising = published?(current) + abort "date the top changelog section as \"## #{current} — DD.MM.YYYY\" first" unless raising || dated?(current) + branch = raising ? "release/#{next_patch.first}" : "release/#{current}-live-check" + run! "git", "switch", "-C", branch + begin + version = raising ? raise_version(current) : current + if raising + branch = "release/#{version}" + run! "git", "branch", "-M", branch + run! "git", "commit", "--all", "--message", "chore(release): #{version}" + end + + step "building #{version}" + run! "pnpm", "build" + abort "the live check failed; nothing was recorded or pushed" unless live_check(profile) + + step "recording the live check" + record = output!("pnpm", "exec", "cli-dev", "live", "record", "--script", RECORDED_SCRIPT).lines.last.strip + puts record + run! "git", "commit", "--message", "chore(release): record the live check of #{version}", "--", LIVE_CHECKS + rescue SystemExit + system("git", "switch", "--discard-changes", "main", chdir: ROOT) + puts "back on main; the local branch #{branch} keeps what was done, nothing was pushed" + raise + end + + step "opening the release pull request" + run! "git", "push", "--set-upstream", "origin", branch + run! "git", "switch", "main" + pr = output!("gh", "pr", "create", "--base", "main", "--head", branch, "--title", "chore(release): #{version}", + "--body", release_body(version, record)) + puts pr + merge(pr, base) + + step "publishing #{version}" + run! RELEASE, "--local" +end + +main(ARGV) if $PROGRAM_NAME == __FILE__ diff --git a/contracts/previous/package.json b/contracts/previous/package.json new file mode 100644 index 0000000..3bca5eb --- /dev/null +++ b/contracts/previous/package.json @@ -0,0 +1,9 @@ +{ + "name": "wirecat-contract-baselines", + "private": true, + "type": "module", + "packageManager": "pnpm@11.28.8", + "dependencies": { + "@wirecat/previous-cli": "npm:@wirecat/beeline-cli@0.2.0" + } +} diff --git a/contracts/previous/pnpm-lock.yaml b/contracts/previous/pnpm-lock.yaml new file mode 100644 index 0000000..ec9195f --- /dev/null +++ b/contracts/previous/pnpm-lock.yaml @@ -0,0 +1,1881 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + '@wirecat/previous-cli': + specifier: npm:@wirecat/beeline-cli@0.2.0 + version: '@wirecat/beeline-cli@0.2.0(zod@4.6.7)' + +packages: + + '@acemir/cssom@0.9.33': + resolution: {integrity: sha512-52IMmrBsIsDZLp/KFM+KmaMLJ8GTj113K+iFGFCoOjstZSZbsAxMJE8KYtwao7bz1LsEG810ts1m5wvkVEqPlg==} + + '@anthropic-ai/sdk@1.3.0': + resolution: {integrity: sha512-k7z9BlLLPxfZH+ov7dS6EnaN/wiZeV8YNT1LZfrpAHIy7oY7pHr4UzirF9f2OlHtFEnRBOX+AZQ91Y5fK+TPTw==} + hasBin: true + peerDependencies: + zod: ^3.25.0 || ^4.0.0 + peerDependenciesMeta: + zod: + optional: true + + '@babel/runtime@7.29.14': + resolution: {integrity: sha512-Y5tqevQaUAZhhj82BpYMNC1ssvLQTVAfwKdm8iy8qwmhvC2/CpcAu8OC+QEtjM7pMk7knx83u1Qj8gzkicyelw==} + engines: {node: '>=6.9.0'} + + '@bomb.sh/tab@0.0.22': + resolution: {integrity: sha512-l5IuWpV7szqG4MM6A7I+qPMmP2qPMq2TD4veIXaOH0sD53dV0Tv8WZPARp5O5Kp4+y4fnVCl3VL1HZKNghO1yg==} + hasBin: true + peerDependencies: + cac: ^6.7.14 || ^7.0.0 + citty: ^0.1.6 || ^0.2.0 + commander: ^13.1.0 || ^14.0.0 || ^15.0.0 + peerDependenciesMeta: + cac: + optional: true + citty: + optional: true + commander: + optional: true + + '@colors/colors@1.5.0': + resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} + engines: {node: '>=0.1.90'} + + '@eshaz/web-worker@1.2.2': + resolution: {integrity: sha512-WxXiHFmD9u/owrzempiDlBB1ZYqiLnm9s6aPc8AlFQalq2tKmqdmMr9GXOupDgzXtqnBipj8Un0gkIm7Sjf8mw==} + + '@huggingface/tokenizers@0.2.0': + resolution: {integrity: sha512-LidMHe1FpcSYH4vcSjXooda34pC0M8m1gmDOv7SQi6Iv+ib1zX7J3sHBCC9/3FPCkn2k1b55FneVqMRxrr99pg==} + + '@mixmark-io/domino@2.2.0': + resolution: {integrity: sha512-Y28PR25bHXUg88kCV7nivXrP2Nj2RueZ3/l/jdx6J9f8J4nsEGcgX0Qe6lt7Pa+J79+kPiJU3LguR6O/6zrLOw==} + + '@modelcontextprotocol/core@2.4.0': + resolution: {integrity: sha512-z8QBKqdfXLPzkLQuG4xp8hrVEMm1PZ1IgxMN2sMbJiFiAKOWXnAzogXn2W4aqIBlP1ea6U5yiqVquvUNM1Cj6Q==} + engines: {node: '>=20'} + + '@modelcontextprotocol/server@2.4.0': + resolution: {integrity: sha512-rgR9yxSaAJ+bcsi/XroT/S2AfPiIWloXAnrdfYSCms9ivVju0ishu/wW0J21Ho6+ZOR1r7RyeRbjiRuF87ix5Q==} + engines: {node: '>=20'} + + '@napi-rs/keyring-darwin-arm64@2.1.2': + resolution: {integrity: sha512-vsInUWUzWS6/WzR/TFNwmdtmwKWjnnR8TOpvZ/pjjxDAkJB/waz37PWzp2b8AFcw1aCcq2aQ7k2vvbLQy8pTrw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@napi-rs/keyring-darwin-x64@2.1.2': + resolution: {integrity: sha512-wQihYroaQ3r++R6u5c9Gj0TCw1l1F53LCb5aLOXfVvT4DsnDnpe7p7VGYo4/33bLe0iqVevtAj+ET3yKCtOlJQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@napi-rs/keyring-freebsd-x64@2.1.2': + resolution: {integrity: sha512-Ve5ha7MbJsq+4TYyXYiTy4IeZOnYxkBB05uH2+nIrEKBkHmyfHttF814EfWAfoJa63KqBhYRXdYJo0o1WVL2sg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [freebsd] + + '@napi-rs/keyring-linux-arm-gnueabihf@2.1.2': + resolution: {integrity: sha512-zxijTnVnTApEyJMjgnLdVQL1g1DAudku/5brrWNDRWj4J0q0nFhUZEtzUA+nY2FvgDjl4s+2YCZYXSTH4TFMUg==} + engines: {node: '>= 10'} + cpu: [arm] + os: [linux] + + '@napi-rs/keyring-linux-arm64-gnu@2.1.2': + resolution: {integrity: sha512-PM+SAcl/yGzgGbeeCsKrnlG4T5DBIDjmDqtKm5an1bJz0o0gwSzR3BMiXf04JenkcqascZpdcIReoEvLj0cvCw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@napi-rs/keyring-linux-arm64-musl@2.1.2': + resolution: {integrity: sha512-+ERS9oyInPCALN957cViBDbYJc724/Q+rZ8ZAz4rOHj4B4v0VR4OAWThdYZgZqD54sZVV0MdyX24qva97hYoAQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@napi-rs/keyring-linux-riscv64-gnu@2.1.2': + resolution: {integrity: sha512-pGADtqeT3U1SaFZGjkVsmZVjeNOQx0fr77S+NWszXjZboyaUOLlGKgqG6ssAWzcwxv8uPhKc9Ij17ujNZhSqLw==} + engines: {node: '>= 10'} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@napi-rs/keyring-linux-x64-gnu@2.1.2': + resolution: {integrity: sha512-Fj5TmTnl2oriuCT5DDEYlhgxYes20uGfgOg10LK9PyPVsI8/PQ1m8I4rq/4A5hkrMtY7wvFb70YmX/yPHDYWvQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@napi-rs/keyring-linux-x64-musl@2.1.2': + resolution: {integrity: sha512-C+KhAeU6x2A43FV3dOmMvUraJb8zsC9VZfsunjZ1cgtuAb208TALaUuAY0jThOphXqhyhBJOs2xTCQhOrRkJIw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + libc: [musl] + + '@napi-rs/keyring-win32-arm64-msvc@2.1.2': + resolution: {integrity: sha512-kBq80ZZfjXoa5wHG9kgAVhYYjaPOLgHh5ngt7r1ftwFXPXDPXKH7oM2r2j2Q64cs0pVtmodVtn5Q9e6xCwzQUQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + '@napi-rs/keyring-win32-ia32-msvc@2.1.2': + resolution: {integrity: sha512-bhgKvVbWlZ6iR/tmvb2ht6/o0OzarUX9W7hjg+G+eVdGjR1prwtQ9lYo5ZESdn/+zyF1MIFvHkOCGja9YqDcww==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + + '@napi-rs/keyring-win32-x64-msvc@2.1.2': + resolution: {integrity: sha512-yQtFdfuwqM0ezKlYO6r2n44in2LGzd4MC679Ddhvojip3t1hn+q/4I+gJU+cIJQVd5FAZSKNrK4tGfew3UTpAQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@napi-rs/keyring@2.1.2': + resolution: {integrity: sha512-9i1SR6tYeQ3o1beLeVMxhN6Fq513m9TZlTs+46+4JgvSNkaFoW9S4WrpV5MjzE+0CzVoC+dZ4RfZDIgW6+afnQ==} + engines: {node: '>= 10'} + + '@opentelemetry/api@1.10.0': + resolution: {integrity: sha512-lMkyes8iHrG+mk6WH7X70MdCLI2RS0FwNBY1PyQ8UemaijE2m5mv5A0Niy3HtbYTFrgkUEQjFMXmSAk2hQDuPQ==} + engines: {node: '>=8.0.0'} + + '@resvg/resvg-js-android-arm-eabi@2.6.2': + resolution: {integrity: sha512-FrJibrAk6v29eabIPgcTUMPXiEz8ssrAk7TXxsiZzww9UTQ1Z5KAbFJs+Z0Ez+VZTYgnE5IQJqBcoSiMebtPHA==} + engines: {node: '>= 10'} + cpu: [arm] + os: [android] + + '@resvg/resvg-js-android-arm64@2.6.2': + resolution: {integrity: sha512-VcOKezEhm2VqzXpcIJoITuvUS/fcjIw5NA/w3tjzWyzmvoCdd+QXIqy3FBGulWdClvp4g+IfUemigrkLThSjAQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [android] + + '@resvg/resvg-js-darwin-arm64@2.6.2': + resolution: {integrity: sha512-nmok2LnAd6nLUKI16aEB9ydMC6Lidiiq2m1nEBDR1LaaP7FGs4AJ90qDraxX+CWlVuRlvNjyYJTNv8qFjtL9+A==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@resvg/resvg-js-darwin-x64@2.6.2': + resolution: {integrity: sha512-GInyZLjgWDfsVT6+SHxQVRwNzV0AuA1uqGsOAW+0th56J7Nh6bHHKXHBWzUrihxMetcFDmQMAX1tZ1fZDYSRsw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@resvg/resvg-js-linux-arm-gnueabihf@2.6.2': + resolution: {integrity: sha512-YIV3u/R9zJbpqTTNwTZM5/ocWetDKGsro0SWp70eGEM9eV2MerWyBRZnQIgzU3YBnSBQ1RcxRZvY/UxwESfZIw==} + engines: {node: '>= 10'} + cpu: [arm] + os: [linux] + + '@resvg/resvg-js-linux-arm64-gnu@2.6.2': + resolution: {integrity: sha512-zc2BlJSim7YR4FZDQ8OUoJg5holYzdiYMeobb9pJuGDidGL9KZUv7SbiD4E8oZogtYY42UZEap7dqkkYuA91pg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@resvg/resvg-js-linux-arm64-musl@2.6.2': + resolution: {integrity: sha512-3h3dLPWNgSsD4lQBJPb4f+kvdOSJHa5PjTYVsWHxLUzH4IFTJUAnmuWpw4KqyQ3NA5QCyhw4TWgxk3jRkQxEKg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@resvg/resvg-js-linux-x64-gnu@2.6.2': + resolution: {integrity: sha512-IVUe+ckIerA7xMZ50duAZzwf1U7khQe2E0QpUxu5MBJNao5RqC0zwV/Zm965vw6D3gGFUl7j4m+oJjubBVoftw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@resvg/resvg-js-linux-x64-musl@2.6.2': + resolution: {integrity: sha512-UOf83vqTzoYQO9SZ0fPl2ZIFtNIz/Rr/y+7X8XRX1ZnBYsQ/tTb+cj9TE+KHOdmlTFBxhYzVkP2lRByCzqi4jQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + libc: [musl] + + '@resvg/resvg-js-win32-arm64-msvc@2.6.2': + resolution: {integrity: sha512-7C/RSgCa+7vqZ7qAbItfiaAWhyRSoD4l4BQAbVDqRRsRgY+S+hgS3in0Rxr7IorKUpGE69X48q6/nOAuTJQxeQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + '@resvg/resvg-js-win32-ia32-msvc@2.6.2': + resolution: {integrity: sha512-har4aPAlvjnLcil40AC77YDIk6loMawuJwFINEM7n0pZviwMkMvjb2W5ZirsNOZY4aDbo5tLx0wNMREp5Brk+w==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + + '@resvg/resvg-js-win32-x64-msvc@2.6.2': + resolution: {integrity: sha512-ZXtYhtUr5SSaBrUDq7DiyjOFJqBVL/dOBN7N/qmi/pO0IgiWW/f/ue3nbvu9joWE5aAKDoIzy/CxsY0suwGosQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@resvg/resvg-js@2.6.2': + resolution: {integrity: sha512-xBaJish5OeGmniDj9cW5PRa/PtmuVU3ziqrbr5xJj901ZDN4TosrVaNZpEiLZAxdfnhAe7uQ7QFWfjPe9d9K2Q==} + engines: {node: '>= 10'} + + '@stablelib/base64@1.0.1': + resolution: {integrity: sha512-1bnPQqSxSuc3Ii6MhBysoWCg58j97aUjuCSZrGSmDxNqtytIi0k8utUenAwTZN4V5mXXYGsVUI9zeBqy+jBOSQ==} + + '@types/debug@4.1.13': + resolution: {integrity: sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==} + + '@types/mdast@4.0.4': + resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} + + '@types/ms@2.1.0': + resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} + + '@types/unist@3.0.3': + resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + + '@valibot/to-json-schema@1.8.0': + resolution: {integrity: sha512-a0M+uwCuQZEPAo65NYkFSJ14O5c213KoSZmPdoCfuFvUhfULi4T2Z6Tpjv6lTVMW9RoLm74RpRAjNEa43KcN+g==} + peerDependencies: + valibot: ^1.5.0 + + '@wasm-audio-decoders/common@9.0.7': + resolution: {integrity: sha512-WRaUuWSKV7pkttBygml/a6dIEpatq2nnZGFIoPTc5yPLkxL6Wk4YaslPM98OPQvWacvNZ+Py9xROGDtrFBDzag==} + + '@wasm-audio-decoders/flac@0.2.11': + resolution: {integrity: sha512-bbSGuDDxY89CrS7FYc2cBBfvtgk3EY9As8dVe8PFIgX7ECd/wefdi8UbGlvcdQZczRwE500KBt4cqf/+mMVsfw==} + + '@wasm-audio-decoders/ogg-vorbis@0.1.20': + resolution: {integrity: sha512-zaQPasU5usRjUDXtXOHYED5tfkR4QMXd+EH3Nrz1+4+M5pCsdD+s9YxJqb0oqnTyRu/KUujOmu5Z/m/NT47vwg==} + + '@wasm-audio-decoders/opus-ml@0.0.3': + resolution: {integrity: sha512-SEeTmk0eb3q5etJA/NHCRWW6BivTx9tqvNTmG0kg2ynuATEQRUZnwQE6Ibvl1BBvqIGHqI57+qyJMWmJBwb5XQ==} + + '@wirecat/beeline-cli@0.2.0': + resolution: {integrity: sha512-ucMbtUvmS8ji/K3yZBgLnzkSaTrVfnnoXXFveB3X+cr+J35geLyTzgrQEyrpJfiMLnYIeL/lJmpT+lpObU3vXg==} + engines: {node: ^22.16.0 || >=24} + hasBin: true + + '@wirecat/cli-base@0.103.0': + resolution: {integrity: sha512-yWzm5JDkr++sMi4vWc7rB1NXqx9YsV1Vo5wgKSSV1Omc0grM84w5J9j0ArDbRVZU0wLpckU09Gakf7+H40UyhQ==} + engines: {node: '>=22'} + hasBin: true + peerDependencies: + commander: '>=15' + esbuild: ^0.28.0 + vitest: '>=5' + peerDependenciesMeta: + commander: + optional: true + esbuild: + optional: true + vitest: + optional: true + + '@wirecat/cli-core-onnx@1.2.0': + resolution: {integrity: sha512-GxiJdiu3sT2R9vw5AYXsDpQdAgjLpsnXElDFMlK2x1SNbYsrx2kPc/z/+EUuLDHL2MevngjaLnUq/TJlGVPRGg==} + + '@wirecat/cli-core-sqlite@1.1.0': + resolution: {integrity: sha512-GpGlh/dAIX/nblBYCdT6DfWSLFxav9mxxeELQAfEuw+QZdT9unKxbi5xa02s/s4JS1P7n0PQx2sCABj4FlMRNw==} + + '@wirecat/cli-core@0.674.0': + resolution: {integrity: sha512-j7adV/a5l17D96Busy71d2i2Gg0SEVhAxivLMHsYEoqOHR6s5qyBXnDCcrKTy6Gb1ohyxIei2krpF11NW22znQ==} + engines: {node: ^22.16.0 || >=24} + hasBin: true + peerDependencies: + '@napi-rs/canvas': '>=0.1.69 <2' + '@wirecat/cli-base': '>=0.102.1 <1.0.0' + commander: '>=15' + mysql2: ^3.24.6 + pg: ^8.23.1 + ssh2: ^1.17.0 + peerDependenciesMeta: + '@napi-rs/canvas': + optional: true + mysql2: + optional: true + pg: + optional: true + ssh2: + optional: true + + '@xmldom/xmldom@0.8.15': + resolution: {integrity: sha512-/5NV/vDALVFDXgLmfsy9TRCBlKwO2LNBFzpzvb9iIj+jR+eSc6DLYYvVOdivT/jm7MtU6TebYuRmzEOI7w40UA==} + engines: {node: '>=10.0.0'} + + '@xmldom/xmldom@0.9.12': + resolution: {integrity: sha512-5AXjrcMClTryPe9LgZrygpB1lj7s0S9E0+W+AHaVKAVyHanafK86iPSvG5xHVSp/jC+VH1UXu0TAEmY279xH7A==} + engines: {node: '>=14.6'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.6.0: + resolution: {integrity: sha512-XZ5apbzreCbXSKwPjJstu8R0zOi247w3XYwWxtwBXgpZrCyc1Ka7p9/xY0A9/diMewmHbEKz+FIraWaEWjlN5g==} + engines: {node: '>=12'} + + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + engines: {node: '>=12'} + + argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + + boolbase@2.0.0: + resolution: {integrity: sha512-DkVaaQHymRhpYEYo9x1oo7Q7B0Y6KJUsjm3c9eTyFDby4MHLBTwZ6ZDWBel5zrYxj1WsZgC5oLpiz+93MluXeA==} + engines: {node: '>=20.19.0'} + + buffer-crc32@0.2.13: + resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} + + ccount@2.0.1: + resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} + + character-entities@2.0.2: + resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} + + chardet@2.2.0: + resolution: {integrity: sha512-rddelWYNPRrXq6PtNEN2S3f6t9ILzvqaN5pVgi4kqt9jHQaXIial9PznB5iSPVlQSLNaaH22ItWz3EJtQ10+OA==} + + cli-table3@0.6.5: + resolution: {integrity: sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==} + engines: {node: 10.* || >= 12.*} + + codec-parser@2.5.0: + resolution: {integrity: sha512-Ru9t80fV8B0ZiixQl8xhMTLru+dzuis/KQld32/x5T/+3LwZb0/YvQdSKytX9JqCnRdiupvAvyYJINKrXieziQ==} + + commander@10.0.1: + resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} + engines: {node: '>=14'} + + commander@12.1.0: + resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} + engines: {node: '>=18'} + + commander@15.0.0: + resolution: {integrity: sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==} + engines: {node: '>=22.12.0'} + + core-util-is@1.0.3: + resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + css-select@7.0.0: + resolution: {integrity: sha512-snmjEVXy+1LnwXdxhYvTMj1d9tOh4HxkA1YmoayVBeeyR2C14Pum7fcxJIm4SswYspVy866eYNwlH6xC3/VH5g==} + engines: {node: '>=20.19.0'} + + css-what@8.0.0: + resolution: {integrity: sha512-DH0Bqq3DNp5tdOReuNyAA+Ev4Y2GS5FMbZpeTLP6C4CDi0h5nL0BmUPChXw3o/qbHLDWHl49sbNqQVY7bMSDdw==} + engines: {node: '>=20.19.0'} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decode-named-character-reference@1.3.0: + resolution: {integrity: sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==} + + defuddle@0.19.6: + resolution: {integrity: sha512-VzIOHD5iKABZVQg2xcPYD/181rgfCO4Mtqay9rfYyXXewMSX+fI+XU3COMpi4YEW34EJuf0WC6f/52NlW9akIw==} + hasBin: true + + dequal@2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + + devlop@1.1.0: + resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + + dictionary-en@4.0.0: + resolution: {integrity: sha512-3NHnE1uq33ZE/CIwaZ6gqxa4BnglHnxeAcTM0GJ7cmtRGcvX9InMK/IqLtYcUMFCUpUNgybH+DzkqdgAo3F1zg==} + + dictionary-es@4.0.0: + resolution: {integrity: sha512-8J3IYdaHYmkojxqhB+DneQpek6N/s3MwbVk3bPNGQSTBT5kxJtmbuiT0LSDP0Al6K9Vevo1sjspG8AGP9Yvxiw==} + + dictionary-ru@3.0.0: + resolution: {integrity: sha512-tigem0CDnNpxEciW6ktwVH3wWB4FYpuvpwA6IR6UlF7bVu2kez6vOejVNyZgBX1TJIjuYTCTuLxzg/YOls2mRQ==} + + dingbat-to-unicode@1.0.2: + resolution: {integrity: sha512-R0bRerYzy/EZP6QzD3Hkl6JjUDA1Mnn+pd928w0nWjPzihnbAR6dcjGJGiRyznj5E4S1duEKzWrTqw02DPcdzg==} + + disposable-email-domains-js@1.26.0: + resolution: {integrity: sha512-pSqALZAiuw6HDC1HqhhtvShRnniUNObQ6kzwa5N280XbyxxCPBZnQQ7fO6Uk/CNTi4cAaKE1UZl3Mc30Zfj4UA==} + + dom-serializer@2.0.0: + resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} + + dom-serializer@3.1.1: + resolution: {integrity: sha512-4MEa38/QexBob6gFNwu+EGdWvhJ1OKuNwdYY3Y3NyeWDQfnGeDYQUDfIRzWu5B5gsv03so2Uxd28YC6zrsx3Lw==} + engines: {node: '>=20.19.0'} + + domelementtype@2.3.0: + resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} + + domelementtype@3.0.0: + resolution: {integrity: sha512-umCQid3jKbDmVjx8jGaW7uUykm4DEUeyV21hPxNMo2nV955DhUThwqyOIDtreepP31hl84X7G5U9ZfsWvIB3Pg==} + engines: {node: '>=20.19.0'} + + domhandler@5.0.3: + resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} + engines: {node: '>= 4'} + + domhandler@6.0.1: + resolution: {integrity: sha512-gYzvtM72ZtxQO0T048kd6HWSbbGCNOUwcnfQ01cqIJ4X2IYKFFHZ5mKvrQETcFXxsRObZulDaKmy//R7TPtsBg==} + engines: {node: '>=20.19.0'} + + domutils@3.2.2: + resolution: {integrity: sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==} + + domutils@4.0.2: + resolution: {integrity: sha512-qI4JLRKnSzqFqr7hAlS5xQDusBCjKSEG4t4+7aNrIQMHBcsC2TGEhuyABJdYkgSewL57PNLYEiibY2iPKhKpaA==} + engines: {node: '>=20.19.0'} + + duck@0.1.12: + resolution: {integrity: sha512-wkctla1O6VfP89gQ+J/yDesM0S7B7XLXjKGzXxMDVFg7uEn706niAtyYovKbyq1oT9YwDcly721/iUWoc8MVRg==} + + echarts@6.1.0: + resolution: {integrity: sha512-q0yaFPggC9FUdsWH4blavRWFmxdrIodbkoKNAjJudAI6CA9gNPxHtV2RcZNEepZVlk4yvBYkOkbk6HIVpIyHZA==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + + entities@7.0.1: + resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==} + engines: {node: '>=0.12'} + + entities@8.1.0: + resolution: {integrity: sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA==} + engines: {node: '>=20.19.0'} + + escape-string-regexp@5.0.0: + resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} + engines: {node: '>=12'} + + fast-sha256@1.3.0: + resolution: {integrity: sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ==} + + fd-slicer@1.1.0: + resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} + + fflate@0.8.3: + resolution: {integrity: sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==} + + get-east-asian-width@1.7.0: + resolution: {integrity: sha512-XjH1AECxf0giL2V1aU8vKyRR2ppRUb5c0EvT7zuJTokQ74bNo52zOtghqdWIqrhUD79fo3x0WfKZdOqxF6LG1Q==} + engines: {node: '>=18'} + + html-escaper@3.0.3: + resolution: {integrity: sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==} + + htmlparser2@10.1.0: + resolution: {integrity: sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==} + + iconv-lite@0.7.3: + resolution: {integrity: sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==} + engines: {node: '>=0.10.0'} + + image-size@2.0.4: + resolution: {integrity: sha512-QRUkFFsRV/6fuESxb9Vkq+a0LkSrgKXuc2NEqfikiXxxN/G3tjWt5EVUlMaImRBZRZK/jRBEbYvpPYZL8t08Zw==} + engines: {node: '>=18'} + hasBin: true + + immediate@3.0.6: + resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==} + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + isarray@1.0.0: + resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + json-schema-to-ts@3.1.1: + resolution: {integrity: sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g==} + engines: {node: '>=16'} + + jszip@3.10.2: + resolution: {integrity: sha512-3l+rb15IOWtUhU0H5MFqES/T6Kh7abYwjosBey/vD6hDt8zoEffkSC5Ws5SGtgVw3gBx2NEbhTeSW1+kWkpyTQ==} + + lie@3.3.0: + resolution: {integrity: sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==} + + linkedom@0.18.14: + resolution: {integrity: sha512-BRUnkOm4YR5vo+qI3j0EbungB0vZPSCue5AdnTQRaxAGSbsOZiBFRO0rh4zlo8qXUhli8pxvnpEXDklMnlq2Rg==} + engines: {node: '>=16'} + peerDependencies: + canvas: '>= 2' + peerDependenciesMeta: + canvas: + optional: true + + liquidjs@10.30.0: + resolution: {integrity: sha512-Fw4wA+8CZsJkaeLEIlPE3AoponfjEZhj7FQvYNcAEcg7jNRik7mEMoaco382FBdrYlykVf6w4vClPNctz2OYjg==} + engines: {node: '>=16'} + hasBin: true + + longest-streak@3.1.0: + resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} + + lop@0.4.2: + resolution: {integrity: sha512-RefILVDQ4DKoRZsJ4Pj22TxE3omDO47yFpkIBoDKzkqPRISs5U1cnAdg/5583YPkWPaLIYHOKRMQSvjFsO26cw==} + + lossless-json@4.3.3: + resolution: {integrity: sha512-FGFrGArHsv7BRiYOf37ZRieT9HlKw+Kpu9HvtpYjcoOEo8lqNkjny8A2YAfWNWWQC+9pcLIrLZ+IviKJhaHwGQ==} + + mammoth@1.13.0: + resolution: {integrity: sha512-2cawcYFcP7ISfXbBcL9lmVgTNWo88v/52ND1gnywHtVT/pX0//puPnf0iMPV9ZgmuvNOE+zkIhDgZ9M2c2dDDg==} + engines: {node: '>=12.0.0'} + hasBin: true + + markdown-table@3.1.0: + resolution: {integrity: sha512-xpeSCdM+B+6P3ncfgaB7FoDbtJ30xAe6Z18TGT7AgXJsHqCElCICZovQqdRMm7kHgpTyYv36EupqewoFFSB8vw==} + + mathml-to-latex@1.8.0: + resolution: {integrity: sha512-gQ0uK3zqB8HwlfaXJkEL5rgaZNbKUiBMmBP/B/W+b+t6KcseLSuYb1b0BjLgS9ZiQa24ePkqTX8/6FaQuDL7wQ==} + + mdast-util-find-and-replace@3.0.4: + resolution: {integrity: sha512-z4B5c6jrnJ1ltOQemhWYPBSAo6y42Z8Gt2yEgfgNTMcLSU59B8bfj8Z8AnAlJrBGLnqkdAUZ7jdDEqQw3KuipQ==} + + mdast-util-from-markdown@2.1.0: + resolution: {integrity: sha512-KRLgmPaP2H1ul2bpoJkOS+9pAcDAAj9Nu1mqLnh8NLeJG5tlvj42TH80PIGBpROWlRXLk0lDrWNuZCFy/tsB4A==} + + mdast-util-gfm-autolink-literal@2.1.0: + resolution: {integrity: sha512-Jx6QSK8wDo558Bcf7q+1pe0v81g2PVs09Hlvu9xJHmCFRF3sAPW7vXFVIAwBncs3sde92WbsVqNxwdqViA2XnQ==} + + mdast-util-gfm-footnote@2.1.0: + resolution: {integrity: sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==} + + mdast-util-gfm-strikethrough@2.0.1: + resolution: {integrity: sha512-OuJHqvr455pwu2OaOrir7dbzqs4jlWKOtlu9L6GjcIjjQwNyw02VntQsr/Ek6/A13vgnXfUhBekWRUP1OkNivw==} + + mdast-util-gfm-table@2.0.1: + resolution: {integrity: sha512-fiIjPrAy4kz68/eFbPHhsiWDGHhqUSVoU1XsfLM5DsEPXw7MxgiVVyulUggFRckVWeT1KXQXkg5vm3kv4oMSOA==} + + mdast-util-gfm-task-list-item@2.0.1: + resolution: {integrity: sha512-jXVO1hvB2hs82g1esi7I9nIJDqiijbQLIyH2jDUb5s7jIAZMr/79h0VHSq7XHKTqpLARRm+DDNjduB7S9+6XZA==} + + mdast-util-gfm@3.1.0: + resolution: {integrity: sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==} + + mdast-util-phrasing@4.1.0: + resolution: {integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==} + + mdast-util-to-markdown@2.2.3: + resolution: {integrity: sha512-dImdB6VZRMRac1SwAW6o1c0ESk/7pFFAMCMuKM+9v7LpTSthMM5nzXpqKw4Mjo66aXVKhNkyrP4bMB9MurPyWg==} + + mdast-util-to-string@4.0.0: + resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} + + micromark-core-commonmark@2.0.4: + resolution: {integrity: sha512-wxEeE8v8XVvOrxn1TZj74qYhAtTQsSqufHVS3uNVyT1MupXxhyaHk8/9xDNPh9BmL77QNDgWTkZ3RsYHB2ry7w==} + + micromark-extension-gfm-autolink-literal@2.1.0: + resolution: {integrity: sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==} + + micromark-extension-gfm-footnote@2.1.0: + resolution: {integrity: sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==} + + micromark-extension-gfm-strikethrough@2.1.0: + resolution: {integrity: sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==} + + micromark-extension-gfm-table@2.1.2: + resolution: {integrity: sha512-pRzm4kDTu0MjlmBkxmS9yYhw60nncfcEwu9NNdPFSQEFXS95ZKyIIyTSHu/o3ReBUrLKYEq+7YaXCRn/bPB4MA==} + + micromark-extension-gfm-tagfilter@2.0.0: + resolution: {integrity: sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==} + + micromark-extension-gfm-task-list-item@2.1.0: + resolution: {integrity: sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==} + + micromark-extension-gfm@3.0.0: + resolution: {integrity: sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==} + + micromark-factory-destination@2.0.1: + resolution: {integrity: sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==} + + micromark-factory-label@2.0.1: + resolution: {integrity: sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==} + + micromark-factory-space@2.1.0: + resolution: {integrity: sha512-fS8hnLIjnjvdQIj39Geug8wWsR0HrYZ43KShKxNfwT7t2LOHo/LbWZEzEaSOjwtjdCsjoE6syHhonEzW0zv0+Q==} + + micromark-factory-title@2.0.1: + resolution: {integrity: sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==} + + micromark-factory-whitespace@2.0.1: + resolution: {integrity: sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==} + + micromark-util-character@2.1.1: + resolution: {integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==} + + micromark-util-chunked@2.0.1: + resolution: {integrity: sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==} + + micromark-util-classify-character@2.0.1: + resolution: {integrity: sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==} + + micromark-util-combine-extensions@2.0.1: + resolution: {integrity: sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==} + + micromark-util-decode-numeric-character-reference@2.0.2: + resolution: {integrity: sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==} + + micromark-util-decode-string@2.0.1: + resolution: {integrity: sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==} + + micromark-util-edit-map@1.0.0: + resolution: {integrity: sha512-Pa2ljlsEL6sVwFaYeyrOLSYbQt73JvGbPOYFq+9AElXiSnfI5Q4465RRZ1sHv7lDjDOnGRDDaqPXqClqWK/q1Q==} + + micromark-util-encode@2.0.1: + resolution: {integrity: sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==} + + micromark-util-html-tag-name@2.0.1: + resolution: {integrity: sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==} + + micromark-util-normalize-identifier@2.0.1: + resolution: {integrity: sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==} + + micromark-util-resolve-all@2.0.1: + resolution: {integrity: sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==} + + micromark-util-sanitize-uri@2.0.1: + resolution: {integrity: sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==} + + micromark-util-subtokenize@2.1.0: + resolution: {integrity: sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==} + + micromark-util-symbol@2.0.1: + resolution: {integrity: sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==} + + micromark-util-types@2.0.3: + resolution: {integrity: sha512-oxB2Ik03hI0gv+VNn9tnh1t1YEe9MDPptViAEgfdf3YQHsn0pzGTgCdlSCJXcwhqm8phaEuM7zeEu3QQzVBrPg==} + + micromark@4.0.3: + resolution: {integrity: sha512-oGYfQzHSG5dOMovQcJ3fyTmZlWAWpi0XA0sJwJs+i6OT88o1+Jtw/8z0CmdowSLxGhhFK89rQ/oXph/wN02PNw==} + + mpg123-decoder@1.0.3: + resolution: {integrity: sha512-+fjxnWigodWJm3+4pndi+KUg9TBojgn31DPk85zEsim7C6s0X5Ztc/hQYdytXkwuGXH+aB0/aEkG40Emukv6oQ==} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + nth-check@3.0.1: + resolution: {integrity: sha512-GX0gsdbGVCgnRgbeGaubfjpBXyYRWOOCVeYh08bSQvDZqxz5ndXs1OTfAt/h36G1xvI94YIspsI0sVFqAV9+RQ==} + engines: {node: '>=20.19.0'} + + ogg-opus-decoder@1.7.5: + resolution: {integrity: sha512-08WfRbuBBew1H63PqQ3zj2B/J0Eh9ISfNOTi+Dk6vuXmkBGSx8BiPJGOJ470EYeKezTa7/GhOAwHe3XlXwOZMw==} + + onnxruntime-common@1.30.0: + resolution: {integrity: sha512-7fdVWjAID1dVhH/G8qK3APARunV4VkBFoCQAP7qp4Wkab0mrorvmc+sqiT+mKXOzDqdjN5j+/Z9nb4gzNPWcyA==} + + option@0.2.4: + resolution: {integrity: sha512-pkEqbDyl8ou5cpq+VsnQbe/WlEy5qS7xPzMS1U55OCG9KPvwFD46zDbxQIj3egJSFc3D+XhYOPUzz49zQAVy7A==} + + opus-decoder@0.7.12: + resolution: {integrity: sha512-6zpHFDi/MhYvMwyYiuJPqJ2lcRkfm7wHblSvT3lUtx/kLvHkunoe/rhTn1dLKxqVGLeQj3gQi7CnR0N2p3RuOg==} + + pako@1.0.11: + resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + pend@1.2.0: + resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} + + postal-mime@4.1.4: + resolution: {integrity: sha512-+6Qsn7Q2TSLMScfN4X2VQIclPRKgDAtKhytQex3fVSV/+HgVaawtsQGzKYDQLQIBR7b4Vfg+88WRGvuF/kwLSw==} + engines: {node: '>=20'} + + process-nextick-args@2.0.1: + resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + + psl@1.15.0: + resolution: {integrity: sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + qrcode-generator@2.0.4: + resolution: {integrity: sha512-mZSiP6RnbHl4xL2Ap5HfkjLnmxfKcPWpWe/c+5XxCuetEenqmNFf1FH/ftXPCtFG5/TDobjsjz6sSNL0Sr8Z9g==} + + readable-stream@2.3.8: + resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} + + safe-buffer@5.1.2: + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + saxes@5.0.1: + resolution: {integrity: sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==} + engines: {node: '>=10'} + + setimmediate@1.0.5: + resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + sherpa-onnx@2.0.0: + resolution: {integrity: sha512-eczLsIIHc7RRJ/e8o7DMvKKhN2+riSKGxznzTCRIUZ+uLgsbSnG9Y3u757rG2Mr4Azu6qR3NAYluwY1/Y7a6FA==} + + simple-yenc@1.0.4: + resolution: {integrity: sha512-5gvxpSd79e9a3V4QDYUqnqxeD4HGlhCakVpb6gMnDD7lexJggSBJRBO5h52y/iJrdXRilX9UCuDaIJhSWm5OWw==} + + sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + + standardwebhooks@1.1.1: + resolution: {integrity: sha512-bCbX9ZEyFkWPsRz7Bl3NuQUJohmwGSev/yhr7vhaGPlc4AfIrspIRa6cPTBuI1ItmrTDJ4d/S2hCsfe4+vQGnQ==} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@8.3.0: + resolution: {integrity: sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ==} + engines: {node: '>=20'} + + string_decoder@1.1.1: + resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.2.0: + resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} + engines: {node: '>=12'} + + temml@0.13.5: + resolution: {integrity: sha512-aPkDDgunanpLNL0ql32HbolqLep+w8DRcVXRql7rWrMt/PhczdLgL4UBYYVU3BYjCNjkGq4EqwIicu/zWr1iOg==} + engines: {node: '>=18.13.0'} + + tldts-core@7.5.4: + resolution: {integrity: sha512-9+4zWtKEDZ3V3FoZ1B97rv+5z5oqp7yeXGVze3CxgQ+CJro9do9DCPD00wxstYZDXDMXsurkBerFfiB6GYtPbA==} + + tldts@7.4.19: + resolution: {integrity: sha512-48dH6aSpQnpbzDUc4vIQZ1VjB8tkK+e8c1yx05/SZK+rkssgjEOlxDd/yU8/a4vGYQ9vRgJr9dwMq9TJ0b3X2Q==} + hasBin: true + + ts-algebra@2.0.0: + resolution: {integrity: sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw==} + + tslib@2.3.0: + resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==} + + turndown@7.2.5: + resolution: {integrity: sha512-EKZvCCFHh8sWttpAMs10U6niZFJ2cpz8LkCPlylxoG4JcHF50J7EHnnBW3AY1qXtUMu7kDjCp7dnggB1sIbqEQ==} + engines: {node: '>=18', npm: '>=9'} + + uhyphen@0.2.0: + resolution: {integrity: sha512-qz3o9CHXmJJPGBdqzab7qAYuW8kQGKNEuoHFYrBwV6hWIMcpAmxDLXojcHfFr9US1Pe6zUswEIJIbLI610fuqA==} + + underscore@1.13.8: + resolution: {integrity: sha512-DXtD3ZtEQzc7M8m4cXotyHR+FAS18C64asBYY5vqZexfYryNNnDc02W4hKg3rdQuqOYas1jkseX0+nZXjTXnvQ==} + + unist-util-is@6.0.1: + resolution: {integrity: sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==} + + unist-util-stringify-position@4.0.0: + resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} + + unist-util-visit-parents@6.1.0: + resolution: {integrity: sha512-vKXxz6O38sKDj1mtx/k2cWvkkFBuYGx6uGrlzBkVeWCRF/F8sdI0j3Wbkz/5rVNRRuVc8UrgRdbCxNhmYXgP3w==} + + unist-util-visit@5.2.0: + resolution: {integrity: sha512-fpsYs/VVoZxfGY9/j3FQpZmN8wdLJaV1Pt38AaJNZu9uKIHcFU3halCdBveEq1HGKO1OEfJY65w1zvoFV1b3qQ==} + + unpdf@1.9.1: + resolution: {integrity: sha512-nO1npM2kNyd4hj1fKzUVU6bvnWjDSxI97eycM/DgzI83dYyW+pNRI9NeMQVEfef8fI3Q06i9lkMeE1HxrQqKoA==} + engines: {node: '>=22'} + peerDependencies: + '@napi-rs/canvas': ^0.1.69 || ^1.0.0 + peerDependenciesMeta: + '@napi-rs/canvas': + optional: true + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + valibot@1.5.0: + resolution: {integrity: sha512-nil6AkP2TChWL43Z5uJ6GTxX01CUA+g8LWUM+N/rB9NBbkUMaUsi9PUNzlUPgoKASgmx9f7eGOYpJ04/fSa6FQ==} + peerDependencies: + typescript: '>=5' + peerDependenciesMeta: + typescript: + optional: true + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + word-extractor@1.0.4: + resolution: {integrity: sha512-PyAGZQ2gjnVA5kcZAOAxoYciCMaAvu0dbVlw/zxHphhy+3be8cDeYKHJPO8iedIM3Sx0arA/ugKTJyXhZNgo6g==} + + wrap-ansi@10.0.2: + resolution: {integrity: sha512-6OLRNZqRntVGBm26ghZ5eZhCuWWyOkRCSn8XsOIuq5stpCE/tjLbdozd93naILZig0lmD8ANfRwnhn0DLeXGlg==} + engines: {node: '>=20'} + + xmlbuilder@10.1.1: + resolution: {integrity: sha512-OyzrcFLL/nb6fMGHbiRDuPup9ljBycsdCypwuyg5AAHvyWzGfChJpCXMG88AGTIMFhGZ9RccFN1e6lhg3hkwKg==} + engines: {node: '>=4.0'} + + xmlchars@2.2.0: + resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} + + yaml@2.9.1: + resolution: {integrity: sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==} + engines: {node: '>= 14.6'} + hasBin: true + + yauzl@2.10.0: + resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} + + zod@4.6.7: + resolution: {integrity: sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==} + + zrender@6.1.0: + resolution: {integrity: sha512-oEGMDB6pOP2S6OwRR4PdVv610zrjnA3Bh+JnSG12fYJlBKjtNAoEb5fSUoCOOINlH96I2fU38/A2UpRKs67xYQ==} + + zwitch@2.0.4: + resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} + +snapshots: + + '@acemir/cssom@0.9.33': {} + + '@anthropic-ai/sdk@1.3.0(zod@4.6.7)': + dependencies: + '@opentelemetry/api': 1.10.0 + json-schema-to-ts: 3.1.1 + standardwebhooks: 1.1.1 + optionalDependencies: + zod: 4.6.7 + + '@babel/runtime@7.29.14': {} + + '@bomb.sh/tab@0.0.22(commander@15.0.0)': + optionalDependencies: + commander: 15.0.0 + + '@colors/colors@1.5.0': + optional: true + + '@eshaz/web-worker@1.2.2': {} + + '@huggingface/tokenizers@0.2.0': {} + + '@mixmark-io/domino@2.2.0': + optional: true + + '@modelcontextprotocol/core@2.4.0': + dependencies: + zod: 4.6.7 + + '@modelcontextprotocol/server@2.4.0': + dependencies: + '@modelcontextprotocol/core': 2.4.0 + zod: 4.6.7 + + '@napi-rs/keyring-darwin-arm64@2.1.2': + optional: true + + '@napi-rs/keyring-darwin-x64@2.1.2': + optional: true + + '@napi-rs/keyring-freebsd-x64@2.1.2': + optional: true + + '@napi-rs/keyring-linux-arm-gnueabihf@2.1.2': + optional: true + + '@napi-rs/keyring-linux-arm64-gnu@2.1.2': + optional: true + + '@napi-rs/keyring-linux-arm64-musl@2.1.2': + optional: true + + '@napi-rs/keyring-linux-riscv64-gnu@2.1.2': + optional: true + + '@napi-rs/keyring-linux-x64-gnu@2.1.2': + optional: true + + '@napi-rs/keyring-linux-x64-musl@2.1.2': + optional: true + + '@napi-rs/keyring-win32-arm64-msvc@2.1.2': + optional: true + + '@napi-rs/keyring-win32-ia32-msvc@2.1.2': + optional: true + + '@napi-rs/keyring-win32-x64-msvc@2.1.2': + optional: true + + '@napi-rs/keyring@2.1.2': + optionalDependencies: + '@napi-rs/keyring-darwin-arm64': 2.1.2 + '@napi-rs/keyring-darwin-x64': 2.1.2 + '@napi-rs/keyring-freebsd-x64': 2.1.2 + '@napi-rs/keyring-linux-arm-gnueabihf': 2.1.2 + '@napi-rs/keyring-linux-arm64-gnu': 2.1.2 + '@napi-rs/keyring-linux-arm64-musl': 2.1.2 + '@napi-rs/keyring-linux-riscv64-gnu': 2.1.2 + '@napi-rs/keyring-linux-x64-gnu': 2.1.2 + '@napi-rs/keyring-linux-x64-musl': 2.1.2 + '@napi-rs/keyring-win32-arm64-msvc': 2.1.2 + '@napi-rs/keyring-win32-ia32-msvc': 2.1.2 + '@napi-rs/keyring-win32-x64-msvc': 2.1.2 + optional: true + + '@opentelemetry/api@1.10.0': {} + + '@resvg/resvg-js-android-arm-eabi@2.6.2': + optional: true + + '@resvg/resvg-js-android-arm64@2.6.2': + optional: true + + '@resvg/resvg-js-darwin-arm64@2.6.2': + optional: true + + '@resvg/resvg-js-darwin-x64@2.6.2': + optional: true + + '@resvg/resvg-js-linux-arm-gnueabihf@2.6.2': + optional: true + + '@resvg/resvg-js-linux-arm64-gnu@2.6.2': + optional: true + + '@resvg/resvg-js-linux-arm64-musl@2.6.2': + optional: true + + '@resvg/resvg-js-linux-x64-gnu@2.6.2': + optional: true + + '@resvg/resvg-js-linux-x64-musl@2.6.2': + optional: true + + '@resvg/resvg-js-win32-arm64-msvc@2.6.2': + optional: true + + '@resvg/resvg-js-win32-ia32-msvc@2.6.2': + optional: true + + '@resvg/resvg-js-win32-x64-msvc@2.6.2': + optional: true + + '@resvg/resvg-js@2.6.2': + optionalDependencies: + '@resvg/resvg-js-android-arm-eabi': 2.6.2 + '@resvg/resvg-js-android-arm64': 2.6.2 + '@resvg/resvg-js-darwin-arm64': 2.6.2 + '@resvg/resvg-js-darwin-x64': 2.6.2 + '@resvg/resvg-js-linux-arm-gnueabihf': 2.6.2 + '@resvg/resvg-js-linux-arm64-gnu': 2.6.2 + '@resvg/resvg-js-linux-arm64-musl': 2.6.2 + '@resvg/resvg-js-linux-x64-gnu': 2.6.2 + '@resvg/resvg-js-linux-x64-musl': 2.6.2 + '@resvg/resvg-js-win32-arm64-msvc': 2.6.2 + '@resvg/resvg-js-win32-ia32-msvc': 2.6.2 + '@resvg/resvg-js-win32-x64-msvc': 2.6.2 + + '@stablelib/base64@1.0.1': {} + + '@types/debug@4.1.13': + dependencies: + '@types/ms': 2.1.0 + + '@types/mdast@4.0.4': + dependencies: + '@types/unist': 3.0.3 + + '@types/ms@2.1.0': {} + + '@types/unist@3.0.3': {} + + '@valibot/to-json-schema@1.8.0(valibot@1.5.0)': + dependencies: + valibot: 1.5.0 + + '@wasm-audio-decoders/common@9.0.7': + dependencies: + '@eshaz/web-worker': 1.2.2 + simple-yenc: 1.0.4 + + '@wasm-audio-decoders/flac@0.2.11': + dependencies: + '@wasm-audio-decoders/common': 9.0.7 + codec-parser: 2.5.0 + + '@wasm-audio-decoders/ogg-vorbis@0.1.20': + dependencies: + '@wasm-audio-decoders/common': 9.0.7 + codec-parser: 2.5.0 + + '@wasm-audio-decoders/opus-ml@0.0.3': + dependencies: + '@wasm-audio-decoders/common': 9.0.7 + + '@wirecat/beeline-cli@0.2.0(zod@4.6.7)': + dependencies: + '@wirecat/cli-base': 0.103.0(commander@15.0.0) + '@wirecat/cli-core': 0.674.0(@wirecat/cli-base@0.103.0(commander@15.0.0))(commander@15.0.0)(zod@4.6.7) + commander: 15.0.0 + valibot: 1.5.0 + transitivePeerDependencies: + - '@napi-rs/canvas' + - cac + - canvas + - citty + - esbuild + - mysql2 + - pg + - ssh2 + - supports-color + - typescript + - vitest + - zod + + '@wirecat/cli-base@0.103.0(commander@15.0.0)': + dependencies: + '@valibot/to-json-schema': 1.8.0(valibot@1.5.0) + cli-table3: 0.6.5 + cross-spawn: 7.0.6 + valibot: 1.5.0 + optionalDependencies: + '@napi-rs/keyring': 2.1.2 + commander: 15.0.0 + transitivePeerDependencies: + - typescript + + '@wirecat/cli-core-onnx@1.2.0': + dependencies: + onnxruntime-common: 1.30.0 + + '@wirecat/cli-core-sqlite@1.1.0': {} + + '@wirecat/cli-core@0.674.0(@wirecat/cli-base@0.103.0(commander@15.0.0))(commander@15.0.0)(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) + '@huggingface/tokenizers': 0.2.0 + '@modelcontextprotocol/server': 2.4.0 + '@resvg/resvg-js': 2.6.2 + '@valibot/to-json-schema': 1.8.0(valibot@1.5.0) + '@wasm-audio-decoders/flac': 0.2.11 + '@wasm-audio-decoders/ogg-vorbis': 0.1.20 + '@wirecat/cli-base': 0.103.0(commander@15.0.0) + '@wirecat/cli-core-onnx': 1.2.0 + '@wirecat/cli-core-sqlite': 1.1.0 + '@xmldom/xmldom': 0.9.12 + chardet: 2.2.0 + commander: 15.0.0 + defuddle: 0.19.6 + dictionary-en: 4.0.0 + dictionary-es: 4.0.0 + dictionary-ru: 3.0.0 + disposable-email-domains-js: 1.26.0 + echarts: 6.1.0 + fflate: 0.8.3 + iconv-lite: 0.7.3 + image-size: 2.0.4 + linkedom: 0.18.14 + liquidjs: 10.30.0 + lossless-json: 4.3.3 + mammoth: 1.13.0 + mdast-util-from-markdown: 2.1.0 + mdast-util-gfm: 3.1.0 + micromark-extension-gfm: 3.0.0 + mpg123-decoder: 1.0.3 + ogg-opus-decoder: 1.7.5 + postal-mime: 4.1.4 + psl: 1.15.0 + qrcode-generator: 2.0.4 + sherpa-onnx: 2.0.0 + string-width: 8.3.0 + tldts: 7.4.19 + unpdf: 1.9.1 + valibot: 1.5.0 + word-extractor: 1.0.4 + wrap-ansi: 10.0.2 + yaml: 2.9.1 + transitivePeerDependencies: + - cac + - canvas + - citty + - supports-color + - typescript + - zod + + '@xmldom/xmldom@0.8.15': {} + + '@xmldom/xmldom@0.9.12': {} + + ansi-regex@5.0.1: {} + + ansi-regex@6.6.0: {} + + ansi-styles@6.2.3: {} + + argparse@1.0.10: + dependencies: + sprintf-js: 1.0.3 + + base64-js@1.5.1: {} + + boolbase@2.0.0: {} + + buffer-crc32@0.2.13: {} + + ccount@2.0.1: {} + + character-entities@2.0.2: {} + + chardet@2.2.0: {} + + cli-table3@0.6.5: + dependencies: + string-width: 4.2.3 + optionalDependencies: + '@colors/colors': 1.5.0 + + codec-parser@2.5.0: {} + + commander@10.0.1: {} + + commander@12.1.0: {} + + commander@15.0.0: {} + + core-util-is@1.0.3: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + css-select@7.0.0: + dependencies: + boolbase: 2.0.0 + css-what: 8.0.0 + domhandler: 6.0.1 + domutils: 4.0.2 + nth-check: 3.0.1 + + css-what@8.0.0: {} + + debug@4.4.3: + dependencies: + ms: 2.1.3 + + decode-named-character-reference@1.3.0: + dependencies: + character-entities: 2.0.2 + + defuddle@0.19.6: + dependencies: + commander: 12.1.0 + mathml-to-latex: 1.8.0 + optionalDependencies: + linkedom: 0.18.14 + temml: 0.13.5 + turndown: 7.2.5 + transitivePeerDependencies: + - canvas + + dequal@2.0.3: {} + + devlop@1.1.0: + dependencies: + dequal: 2.0.3 + + dictionary-en@4.0.0: {} + + dictionary-es@4.0.0: {} + + dictionary-ru@3.0.0: {} + + dingbat-to-unicode@1.0.2: {} + + disposable-email-domains-js@1.26.0: {} + + dom-serializer@2.0.0: + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + entities: 4.5.0 + + dom-serializer@3.1.1: + dependencies: + domelementtype: 3.0.0 + domhandler: 6.0.1 + entities: 8.1.0 + + domelementtype@2.3.0: {} + + domelementtype@3.0.0: {} + + domhandler@5.0.3: + dependencies: + domelementtype: 2.3.0 + + domhandler@6.0.1: + dependencies: + domelementtype: 3.0.0 + + domutils@3.2.2: + dependencies: + dom-serializer: 2.0.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 + + domutils@4.0.2: + dependencies: + dom-serializer: 3.1.1 + domelementtype: 3.0.0 + domhandler: 6.0.1 + + duck@0.1.12: + dependencies: + underscore: 1.13.8 + + echarts@6.1.0: + dependencies: + tslib: 2.3.0 + zrender: 6.1.0 + + emoji-regex@8.0.0: {} + + entities@4.5.0: {} + + entities@7.0.1: {} + + entities@8.1.0: {} + + escape-string-regexp@5.0.0: {} + + fast-sha256@1.3.0: {} + + fd-slicer@1.1.0: + dependencies: + pend: 1.2.0 + + fflate@0.8.3: {} + + get-east-asian-width@1.7.0: {} + + html-escaper@3.0.3: {} + + htmlparser2@10.1.0: + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.2.2 + entities: 7.0.1 + + iconv-lite@0.7.3: + dependencies: + safer-buffer: 2.1.2 + + image-size@2.0.4: {} + + immediate@3.0.6: {} + + inherits@2.0.4: {} + + is-fullwidth-code-point@3.0.0: {} + + isarray@1.0.0: {} + + isexe@2.0.0: {} + + json-schema-to-ts@3.1.1: + dependencies: + '@babel/runtime': 7.29.14 + ts-algebra: 2.0.0 + + jszip@3.10.2: + dependencies: + lie: 3.3.0 + pako: 1.0.11 + readable-stream: 2.3.8 + setimmediate: 1.0.5 + + lie@3.3.0: + dependencies: + immediate: 3.0.6 + + linkedom@0.18.14: + dependencies: + '@acemir/cssom': 0.9.33 + css-select: 7.0.0 + html-escaper: 3.0.3 + htmlparser2: 10.1.0 + uhyphen: 0.2.0 + + liquidjs@10.30.0: + dependencies: + commander: 10.0.1 + + longest-streak@3.1.0: {} + + lop@0.4.2: + dependencies: + duck: 0.1.12 + option: 0.2.4 + underscore: 1.13.8 + + lossless-json@4.3.3: {} + + mammoth@1.13.0: + dependencies: + '@xmldom/xmldom': 0.8.15 + argparse: 1.0.10 + base64-js: 1.5.1 + dingbat-to-unicode: 1.0.2 + jszip: 3.10.2 + lop: 0.4.2 + underscore: 1.13.8 + xmlbuilder: 10.1.1 + + markdown-table@3.1.0: {} + + mathml-to-latex@1.8.0: + dependencies: + '@xmldom/xmldom': 0.9.12 + + mdast-util-find-and-replace@3.0.4: + dependencies: + '@types/mdast': 4.0.4 + escape-string-regexp: 5.0.0 + unist-util-is: 6.0.1 + unist-util-visit-parents: 6.1.0 + + mdast-util-from-markdown@2.1.0: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + decode-named-character-reference: 1.3.0 + devlop: 1.1.0 + mdast-util-to-string: 4.0.0 + micromark: 4.0.3 + micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-decode-string: 2.0.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.3 + unist-util-stringify-position: 4.0.0 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm-autolink-literal@2.1.0: + dependencies: + '@types/mdast': 4.0.4 + ccount: 2.0.1 + devlop: 1.1.0 + mdast-util-find-and-replace: 3.0.4 + micromark-util-character: 2.1.1 + + mdast-util-gfm-footnote@2.1.0: + dependencies: + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.1.0 + mdast-util-to-markdown: 2.2.3 + micromark-util-normalize-identifier: 2.0.1 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm-strikethrough@2.0.1: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-from-markdown: 2.1.0 + mdast-util-to-markdown: 2.2.3 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm-table@2.0.1: + dependencies: + '@types/mdast': 4.0.4 + devlop: 1.1.0 + markdown-table: 3.1.0 + mdast-util-from-markdown: 2.1.0 + mdast-util-to-markdown: 2.2.3 + mdast-util-to-string: 4.0.0 + unist-util-visit: 5.2.0 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm-task-list-item@2.0.1: + dependencies: + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.1.0 + mdast-util-to-markdown: 2.2.3 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm@3.1.0: + dependencies: + mdast-util-from-markdown: 2.1.0 + mdast-util-gfm-autolink-literal: 2.1.0 + mdast-util-gfm-footnote: 2.1.0 + mdast-util-gfm-strikethrough: 2.0.1 + mdast-util-gfm-table: 2.0.1 + mdast-util-gfm-task-list-item: 2.0.1 + mdast-util-to-markdown: 2.2.3 + transitivePeerDependencies: + - supports-color + + mdast-util-phrasing@4.1.0: + dependencies: + '@types/mdast': 4.0.4 + unist-util-is: 6.0.1 + + mdast-util-to-markdown@2.2.3: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + longest-streak: 3.1.0 + mdast-util-phrasing: 4.1.0 + mdast-util-to-string: 4.0.0 + micromark-util-character: 2.1.1 + micromark-util-classify-character: 2.0.1 + micromark-util-decode-string: 2.0.1 + micromark-util-html-tag-name: 2.0.1 + unist-util-visit: 5.2.0 + zwitch: 2.0.4 + + mdast-util-to-string@4.0.0: + dependencies: + '@types/mdast': 4.0.4 + + micromark-core-commonmark@2.0.4: + dependencies: + decode-named-character-reference: 1.3.0 + devlop: 1.1.0 + micromark-factory-destination: 2.0.1 + micromark-factory-label: 2.0.1 + micromark-factory-space: 2.1.0 + micromark-factory-title: 2.0.1 + micromark-factory-whitespace: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-chunked: 2.0.1 + micromark-util-classify-character: 2.0.1 + micromark-util-edit-map: 1.0.0 + micromark-util-html-tag-name: 2.0.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-resolve-all: 2.0.1 + micromark-util-subtokenize: 2.1.0 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.3 + + micromark-extension-gfm-autolink-literal@2.1.0: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-sanitize-uri: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.3 + + micromark-extension-gfm-footnote@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-core-commonmark: 2.0.4 + micromark-factory-space: 2.1.0 + micromark-util-character: 2.1.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-sanitize-uri: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.3 + + micromark-extension-gfm-strikethrough@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-util-chunked: 2.0.1 + micromark-util-classify-character: 2.0.1 + micromark-util-resolve-all: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.3 + + micromark-extension-gfm-table@2.1.2: + dependencies: + devlop: 1.1.0 + micromark-factory-space: 2.1.0 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.3 + + micromark-extension-gfm-tagfilter@2.0.0: + dependencies: + micromark-util-types: 2.0.3 + + micromark-extension-gfm-task-list-item@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-factory-space: 2.1.0 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.3 + + micromark-extension-gfm@3.0.0: + dependencies: + micromark-extension-gfm-autolink-literal: 2.1.0 + micromark-extension-gfm-footnote: 2.1.0 + micromark-extension-gfm-strikethrough: 2.1.0 + micromark-extension-gfm-table: 2.1.2 + micromark-extension-gfm-tagfilter: 2.0.0 + micromark-extension-gfm-task-list-item: 2.1.0 + micromark-util-combine-extensions: 2.0.1 + micromark-util-types: 2.0.3 + + micromark-factory-destination@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.3 + + micromark-factory-label@2.0.1: + dependencies: + devlop: 1.1.0 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.3 + + micromark-factory-space@2.1.0: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-types: 2.0.3 + + micromark-factory-title@2.0.1: + dependencies: + micromark-factory-space: 2.1.0 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.3 + + micromark-factory-whitespace@2.0.1: + dependencies: + micromark-factory-space: 2.1.0 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.3 + + micromark-util-character@2.1.1: + dependencies: + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.3 + + micromark-util-chunked@2.0.1: + dependencies: + micromark-util-symbol: 2.0.1 + + micromark-util-classify-character@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.3 + + micromark-util-combine-extensions@2.0.1: + dependencies: + micromark-util-chunked: 2.0.1 + micromark-util-types: 2.0.3 + + micromark-util-decode-numeric-character-reference@2.0.2: + dependencies: + micromark-util-symbol: 2.0.1 + + micromark-util-decode-string@2.0.1: + dependencies: + decode-named-character-reference: 1.3.0 + micromark-util-character: 2.1.1 + micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-symbol: 2.0.1 + + micromark-util-edit-map@1.0.0: + dependencies: + micromark-util-types: 2.0.3 + + micromark-util-encode@2.0.1: {} + + micromark-util-html-tag-name@2.0.1: {} + + micromark-util-normalize-identifier@2.0.1: + dependencies: + micromark-util-symbol: 2.0.1 + + micromark-util-resolve-all@2.0.1: + dependencies: + micromark-util-types: 2.0.3 + + micromark-util-sanitize-uri@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-encode: 2.0.1 + micromark-util-symbol: 2.0.1 + + micromark-util-subtokenize@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-util-chunked: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.3 + + micromark-util-symbol@2.0.1: {} + + micromark-util-types@2.0.3: {} + + micromark@4.0.3: + dependencies: + '@types/debug': 4.1.13 + debug: 4.4.3 + decode-named-character-reference: 1.3.0 + devlop: 1.1.0 + micromark-core-commonmark: 2.0.4 + micromark-factory-space: 2.1.0 + micromark-util-character: 2.1.1 + micromark-util-chunked: 2.0.1 + micromark-util-combine-extensions: 2.0.1 + micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-edit-map: 1.0.0 + micromark-util-encode: 2.0.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-resolve-all: 2.0.1 + micromark-util-sanitize-uri: 2.0.1 + micromark-util-subtokenize: 2.1.0 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.3 + transitivePeerDependencies: + - supports-color + + mpg123-decoder@1.0.3: + dependencies: + '@wasm-audio-decoders/common': 9.0.7 + + ms@2.1.3: {} + + nth-check@3.0.1: + dependencies: + boolbase: 2.0.0 + + ogg-opus-decoder@1.7.5: + dependencies: + '@wasm-audio-decoders/common': 9.0.7 + '@wasm-audio-decoders/opus-ml': 0.0.3 + codec-parser: 2.5.0 + opus-decoder: 0.7.12 + + onnxruntime-common@1.30.0: {} + + option@0.2.4: {} + + opus-decoder@0.7.12: + dependencies: + '@wasm-audio-decoders/common': 9.0.7 + + pako@1.0.11: {} + + path-key@3.1.1: {} + + pend@1.2.0: {} + + postal-mime@4.1.4: {} + + process-nextick-args@2.0.1: {} + + psl@1.15.0: + dependencies: + punycode: 2.3.1 + + punycode@2.3.1: {} + + qrcode-generator@2.0.4: {} + + readable-stream@2.3.8: + dependencies: + core-util-is: 1.0.3 + inherits: 2.0.4 + isarray: 1.0.0 + process-nextick-args: 2.0.1 + safe-buffer: 5.1.2 + string_decoder: 1.1.1 + util-deprecate: 1.0.2 + + safe-buffer@5.1.2: {} + + safer-buffer@2.1.2: {} + + saxes@5.0.1: + dependencies: + xmlchars: 2.2.0 + + setimmediate@1.0.5: {} + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + sherpa-onnx@2.0.0: {} + + simple-yenc@1.0.4: {} + + sprintf-js@1.0.3: {} + + standardwebhooks@1.1.1: + dependencies: + '@stablelib/base64': 1.0.1 + fast-sha256: 1.3.0 + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@8.3.0: + dependencies: + get-east-asian-width: 1.7.0 + strip-ansi: 7.2.0 + + string_decoder@1.1.1: + dependencies: + safe-buffer: 5.1.2 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.2.0: + dependencies: + ansi-regex: 6.6.0 + + temml@0.13.5: + optional: true + + tldts-core@7.5.4: {} + + tldts@7.4.19: + dependencies: + tldts-core: 7.5.4 + + ts-algebra@2.0.0: {} + + tslib@2.3.0: {} + + turndown@7.2.5: + dependencies: + '@mixmark-io/domino': 2.2.0 + optional: true + + uhyphen@0.2.0: {} + + underscore@1.13.8: {} + + unist-util-is@6.0.1: + dependencies: + '@types/unist': 3.0.3 + + unist-util-stringify-position@4.0.0: + dependencies: + '@types/unist': 3.0.3 + + unist-util-visit-parents@6.1.0: + dependencies: + '@types/unist': 3.0.3 + unist-util-is: 6.0.1 + + unist-util-visit@5.2.0: + dependencies: + '@types/unist': 3.0.3 + unist-util-is: 6.0.1 + unist-util-visit-parents: 6.1.0 + + unpdf@1.9.1: {} + + util-deprecate@1.0.2: {} + + valibot@1.5.0: {} + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + word-extractor@1.0.4: + dependencies: + saxes: 5.0.1 + yauzl: 2.10.0 + + wrap-ansi@10.0.2: + dependencies: + ansi-styles: 6.2.3 + string-width: 8.3.0 + + xmlbuilder@10.1.1: {} + + xmlchars@2.2.0: {} + + yaml@2.9.1: {} + + yauzl@2.10.0: + dependencies: + buffer-crc32: 0.2.13 + fd-slicer: 1.1.0 + + zod@4.6.7: {} + + zrender@6.1.0: + dependencies: + tslib: 2.3.0 + + zwitch@2.0.4: {} diff --git a/contracts/previous/pnpm-workspace.yaml b/contracts/previous/pnpm-workspace.yaml new file mode 100644 index 0000000..113cbce --- /dev/null +++ b/contracts/previous/pnpm-workspace.yaml @@ -0,0 +1,4 @@ +packages: + - . +minimumReleaseAgeExclude: + - "@wirecat/*" diff --git a/contracts/seed.mjs b/contracts/seed.mjs new file mode 100644 index 0000000..3beef52 --- /dev/null +++ b/contracts/seed.mjs @@ -0,0 +1,57 @@ +import { realpathSync } from "node:fs" +import { createRequire } from "node:module" +import { dirname, join } from "node:path" +import { pathToFileURL } from "node:url" + +// The previous release writes the state with its own modules and its own cli-core: a sync of fake call records, as +// `beeline meetings sync` makes one, so the candidate reopens the schema, rows and cursor that release left. No token: +// the runner denies the keyring and the network. The clients are extensions: an E.164 number trips its phone scan. +const entry = realpathSync(process.argv[2]) +const fromPrevious = createRequire(entry) +const previous = (path) => import(pathToFileURL(join(dirname(entry), "..", path)).href) +const core = (name) => import(pathToFileURL(fromPrevious.resolve(`@wirecat/cli-core/${name}`)).href) + +if (!process.env.WIRECAT_CONTRACT_DENIED) throw new Error("requires the isolated contract runner") + +const [{ openProfileStore }, { callSource }, { pull }] = await Promise.all([ + previous("store.js"), + previous("call-source.js"), + core("meetings"), +]) + +const now = Date.parse("2026-10-21T10:00:00Z") +const call = (id, phone) => ({ + id: String(id), + externalId: `ext-${id}`, + phone, + direction: "INBOUND", + date: Date.parse("2026-10-20T10:00:00Z") + id * 60_000, + duration: 50_140, + fileSize: 201_024, + abonent: { + userId: "70000000001@example.test", + phone: "70000000001", + firstName: "wirecat-synthetic-manager-canary", + lastName: "Example", + }, +}) +const api = { + allRecords: async function* () { + yield call(1, "5678") + yield call(2, "1234") + }, +} + +const { store, accountId } = await openProfileStore(process.env, "contract", false) +try { + const report = await pull( + callSource(() => api), + store.meetings, + { accountId, now }, + ) + if (report.meetings !== 2 || report.warnings.length > 0) + throw new Error(`the previous release's sync did not complete: ${JSON.stringify(report)}`) +} finally { + await store.close() +} +process.stdout.write(`${JSON.stringify({ seeded: true })}\n`) diff --git a/contracts/upgrade.json b/contracts/upgrade.json new file mode 100644 index 0000000..25fdc90 --- /dev/null +++ b/contracts/upgrade.json @@ -0,0 +1,80 @@ +{ + "command": "node", + "args": ["../dist/bin/beeline.js"], + "previous": { + "entry": "./previous/node_modules/@wirecat/previous-cli/dist/bin/beeline.js", + "version": "0.2.0" + }, + "canaries": ["wirecat-synthetic-manager-canary"], + "cases": [ + { + "id": "seed-previous-sync", + "args": ["{{previousEntry}}"], + "entry": "./seed.mjs", + "exit": 0, + "stream": "stdout", + "kind": "json", + "json": { + "seeded": true + } + }, + { + "id": "previous-list", + "args": ["contract", "meetings", "list", "--json"], + "exit": 0, + "stream": "stdout", + "kind": "json", + "previous": true, + "allowSensitiveOutput": true, + "capture": { + "meeting": "/items/0/id" + } + }, + { + "id": "candidate-list", + "args": ["contract", "meetings", "list", "--json"], + "exit": 0, + "stream": "stdout", + "kind": "json", + "allowSensitiveOutput": true, + "json": { + "items": [ + { + "id": "{{meeting}}", + "title": "Входящий звонок · wirecat-synthetic-manager-canary Example ↔ 1234" + }, + { + "title": "Входящий звонок · wirecat-synthetic-manager-canary Example ↔ 5678" + } + ] + } + }, + { + "id": "candidate-show", + "args": ["contract", "meetings", "show", "{{meeting}}", "--json"], + "exit": 0, + "stream": "stdout", + "kind": "json", + "allowSensitiveOutput": true, + "json": { + "item": { + "call": { + "direction": "in", + "client_phone": null, + "manager": { + "name": "wirecat-synthetic-manager-canary Example" + } + } + } + } + }, + { + "id": "missing-meeting", + "args": ["contract", "meetings", "show", "999999", "--json"], + "exit": 6, + "stream": "stderr", + "kind": "json", + "errorCode": "not_found" + } + ] +} diff --git a/docs/dev/DESIGN.md b/docs/dev/DESIGN.md index 55f0d85..864dec0 100644 --- a/docs/dev/DESIGN.md +++ b/docs/dev/DESIGN.md @@ -67,7 +67,8 @@ Owner, 2026-11-13 (NEED-2600 A). The client participant carries its number as `p `phone:`. Beeline gives the client's 10-digit national number (`9XXXXXXXXX`, counted in the owner's store on 2026-11-13), so `clientPhone` in `src/call-source.ts` reads it in Russia's plan: `e164Of` leaves a national number's country to the source, and Beeline is a Russian PBX. A number that plan does not read (an extension, a foreign number) -keeps its raw digits in the id and gets no phone. +gets no phone, and its identity is `number:`, the key cli-core's call reader expects for a number that is no phone +number (owner, 2026-11-16, NEED-2620 A). Up to 0.2.0 it was `phone:`; `meetings sync` moves those ids too. A store written by an unpublished build before this fix has `phone:` ids, and a build of one day `phone:+` ones (the owner's: 1626 old ids on 2026-11-13). Each `meetings sync` first moves them to the id diff --git a/docs/dev/TESTING.md b/docs/dev/TESTING.md index 731e9f5..8036078 100644 --- a/docs/dev/TESTING.md +++ b/docs/dev/TESTING.md @@ -14,12 +14,10 @@ How the tests run, and what they never touch. The rules are the handbook's `scripts/test-matrix-untested.ts`. - `pnpm contracts:check` runs the built CLI against `contracts/plan.json`: help, discovery, errors and the MCP tool list. `pnpm exec cli-contract contracts/plan.json --update` rewrites the snapshots; review the diff. -- `pnpm contracts:upgrade` does not exist yet, and `.github/workflows/ci.yml` skips the step. It needs both local - state of the CLI's own (a store, a sync cursor, any other file its code writes and reads back) and a published - version to upgrade from; the skeleton has neither, and the config file and run records are cli-core's - ([WC-TEST-14](../../node_modules/@wirecat/cli-base/docs/standards/testing.md)). Once the CLI keeps such state and its - first version is on npm, add the script, as - [drive-cli does](https://github.com/WireCatLabs/drive-cli/blob/150b105569a98fbd0d4b66349305ad84128adfda/package.json#L37), and remove the skip. +- `pnpm contracts:upgrade` installs the last release into `contracts/previous/`, lets it sync fake call records into a + throwaway store (`contracts/seed.mjs`), then runs this build on that store: list, show and a missing call + ([WC-TEST-14](../../node_modules/@wirecat/cli-base/docs/standards/testing.md)). Raise the version in + `contracts/previous/package.json` and `contracts/upgrade.json` after each release. - `pnpm smoke` installs the packed package into a temporary folder and runs it offline. - `pnpm audit:commands` audits the command tree beside the latest published WireCat CLIs. diff --git a/package.json b/package.json index 7a70edd..799cf5e 100644 --- a/package.json +++ b/package.json @@ -46,14 +46,15 @@ "docs:check": "cli-dev docs-check --rules scripts/docs-rules.ts --pages && node --experimental-strip-types scripts/changelog-fragments.ts --rules scripts/docs-rules.ts && pnpm docs:spell && rumdl check --config config/wirecat/rumdl.toml README.md README.ru.md SECURITY.md CHANGELOG.md CLAUDE.md AGENTS.md docs/*.md docs/dev/*.md && pnpm docs:lint", "docs:lint": "markdownlint-cli2", "contracts:check": "cli-contract contracts/plan.json", + "contracts:upgrade": "pnpm --dir contracts/previous install --frozen-lockfile --ignore-scripts && cli-contract contracts/upgrade.json", "security:no-leak": "cli-testing security no-leak . contracts/no-leak.json", "version:check": "cli-dev version && node --experimental-strip-types scripts/version-level.ts", "version:sync": "cli-dev version --sync", "standards:check": "node config/wirecat/check.mjs", "lint:commands": "pnpm build && cli-dev lint --cli dist/bin/beeline.js", "audit:commands": "pnpm build && DBUS_SESSION_BUS_ADDRESS=disabled: cli-dev audit --family --cli dist/bin/beeline.js --differences lint/audit-differences.json", - "ci:quick": "pnpm typecheck && pnpm build && pnpm lint:commands", - "release:check": "pnpm standards:check && pnpm lint && pnpm typecheck && pnpm test:coverage && pnpm lint:commands && pnpm audit:commands && pnpm contracts:check && pnpm test:matrix:check && pnpm docs:check && pnpm generate:check && pnpm version:check && pnpm security:no-leak && pnpm package:check", + "ci:quick": "pnpm typecheck && pnpm lint:commands", + "release:check": "pnpm standards:check && pnpm lint && pnpm typecheck && pnpm test:coverage && pnpm lint:commands && pnpm audit:commands && pnpm contracts:check && pnpm contracts:upgrade && pnpm test:matrix:check && pnpm docs:check && pnpm generate:check && pnpm version:check && pnpm security:no-leak && pnpm package:check", "prepare": "lefthook install || true", "prepack": "pnpm build", "docs:spell": "cspell lint --config cspell.json --no-progress --no-summary README.md README.ru.md SECURITY.md CHANGELOG.md AGENTS.md CLAUDE.md 'docs/*.md' 'skills/**/*.md'" diff --git a/scenarios/first-calls.md b/scenarios/first-calls.md index 423b861..4863794 100644 --- a/scenarios/first-calls.md +++ b/scenarios/first-calls.md @@ -2,17 +2,17 @@ title: First calls as dialogues goal: Copy the recorded calls from the PBX, transcribe them on this computer and read one as a dialogue. steps: - - run: beeline session start - why: paste the API token from the Beeline cabinet; it is checked against the PBX and kept in the keyring - - run: beeline meetings sync + - run: beeline work session start + why: work names this profile; paste the API token from the Beeline cabinet, checked against the PBX and kept in the keyring + - run: beeline work meetings sync why: copies the recorded calls of the last 30 days into the local store; the next sync asks only for what is new - run: beeline models download gigaam-v3 why: the local speech model, once; calls never leave this computer to be transcribed - - run: beeline meetings transcribe + - run: beeline work meetings transcribe why: turns up to 20 new calls of five seconds or more into manager and client dialogues - - run: beeline meetings list 'duration_ms>=60000' + - run: beeline work meetings list 'duration_ms>=60000' why: the calls of a minute or more, newest first, from the store, offline too - - run: beeline meetings transcript 1 + - run: beeline work meetings transcript 1 why: one call as a dialogue; 1 stands for a meeting id from the list look: - remaining in the sync answer, the calls a sync stopped before; run it again to go on diff --git a/scripts/docs-rules.ts b/scripts/docs-rules.ts index 0945de1..e8c00c5 100644 --- a/scripts/docs-rules.ts +++ b/scripts/docs-rules.ts @@ -6,7 +6,7 @@ export const CHANGELOG = { ids: JOURNAL_IDS, } -const USER_PAGES = /^(README|SECURITY|CHANGELOG)\.md$|^kit\/README\.md$|^docs\/[^/]+\.md$/ +const USER_PAGES = /^(README|README\.ru|SECURITY|CHANGELOG)\.md$|^kit\/README\.md$|^docs\/[^/]+\.md$/ export const docsRules = (root: string): DocsRules => ({ files: markdownFiles(root, new Set(["node_modules", "dist", "coverage", ".git"])), diff --git a/src/call-source.ts b/src/call-source.ts index 6b7e25b..c7ae710 100644 --- a/src/call-source.ts +++ b/src/call-source.ts @@ -64,7 +64,8 @@ const participantsOf = (record: CallRecord): SourceParticipant[] => { }, { ...none, - identityExternalId: `phone:${phone ?? record.phone}`, + // A number that is no phone number (an extension) is `number:`, the key cli-core's call reader expects. + identityExternalId: phone ? `phone:${phone}` : `number:${record.phone}`, email: null, phone, displayName: null, diff --git a/src/client-rekey.test.ts b/src/client-rekey.test.ts index bb8f763..5804989 100644 --- a/src/client-rekey.test.ts +++ b/src/client-rekey.test.ts @@ -35,7 +35,8 @@ const clientIds = () => sql((db) => db .prepare( - "SELECT external_id AS id, phone FROM identities WHERE provider = 'beeline' AND external_id LIKE 'phone:%'", + `SELECT external_id AS id, phone FROM identities + WHERE provider = 'beeline' AND (external_id LIKE 'phone:%' OR external_id LIKE 'number:%')`, ) .all() .map((row) => ({ id: String(row.id), phone: row.phone })), @@ -56,20 +57,25 @@ afterEach(() => { delete process.env.BEELINE_TOKEN }) -it("names the old caller ids' E.164 ids and leaves the current ones and extensions", () => { +it("names the current id of each old caller id and leaves the E.164 ones", () => { expect( oldClientRekeys([ "phone:9000000009", "phone:+9000000009", "phone:+4950000001", "phone:+79000000009", + "phone:+70000000005", "phone:1234", + "phone:+0000000001", + "number:1234", "abonent:70000000001@example.test", ]), ).toEqual([ { from: "phone:9000000009", to: "phone:+79000000009", phone: "+79000000009" }, { from: "phone:+9000000009", to: "phone:+79000000009", phone: "+79000000009" }, { from: "phone:+4950000001", to: "phone:+74950000001", phone: "+74950000001" }, + { from: "phone:1234", to: "number:1234" }, + { from: "phone:+0000000001", to: "number:0000000001" }, ]) }) @@ -93,12 +99,12 @@ it("a sync moves the callers an older build stored to their E.164 ids, merging i const second = await sync([]) expect(second.code, second.err).toBe(0) - expect(second.err).toContain("moved old caller ids to their E.164 numbers: 2 renamed, 1 merged") + expect(second.err).toContain("moved old caller ids to their current ids: 2 renamed, 1 merged") expect(clientIds()).toEqual( expect.arrayContaining([ { id: "phone:+79000000001", phone: "+79000000001" }, { id: "phone:+79000000002", phone: "+79000000002" }, - { id: "phone:1234", phone: null }, + { id: "number:1234", phone: null }, ]), ) expect(clientIds()).toHaveLength(3) @@ -131,6 +137,46 @@ it("merges an old caller id into the E.164 id a newer sync already stored", asyn expect(clientOfMeeting("802")).toBe("phone:+79000000004") }) +it("a sync moves an extension from its old phone: id to number:, merging into one already there", async () => { + process.env.BEELINE_TOKEN = "test-token" + const first = await sync([ + record(1001, { phone: "1001" }), + record(1002, { phone: "1002" }), + record(1003, { phone: "1003" }), + record(1004, { phone: "9000000007" }), + ]) + expect(first.code, first.err).toBe(0) + expect(clientOfMeeting("1001")).toBe("number:1001") + // As 0.2.0 wrote them; 1003's client is 1002's number, which a newer sync already stored as number:1002. + sql((db) => { + const rename = db.prepare("UPDATE identities SET external_id = ? WHERE external_id = ?") + rename.run("phone:1001", "number:1001") + rename.run("phone:1002", "number:1003") + }) + expect(clientOfMeeting("1003")).toBe("phone:1002") + + const second = await sync([]) + expect(second.code, second.err).toBe(0) + expect(second.err).toContain("moved old caller ids to their current ids: 1 renamed, 1 merged") + expect(clientIds()).toEqual( + expect.arrayContaining([ + { id: "number:1001", phone: null }, + { id: "number:1002", phone: null }, + { id: "phone:+79000000007", phone: "+79000000007" }, + ]), + ) + expect(clientIds().map(({ id }) => id)).not.toEqual(expect.arrayContaining(["phone:1001"])) + expect(clientIds().map(({ id }) => id)).not.toEqual(expect.arrayContaining(["phone:1002"])) + expect(clientOfMeeting("1001")).toBe("number:1001") + expect(clientOfMeeting("1002")).toBe("number:1002") + expect(clientOfMeeting("1003")).toBe("number:1002") + expect(clientOfMeeting("1004")).toBe("phone:+79000000007") + + const third = await sync([]) + expect(third.code, third.err).toBe(0) + expect(third.err).not.toContain("moved old caller ids") +}) + it("a call synced again gets its direction, the client's number and a corrected title", async () => { process.env.BEELINE_TOKEN = "test-token" const call = record(901, { phone: "9000000006", direction: "INBOUND" }) diff --git a/src/commands/meetings.ts b/src/commands/meetings.ts index a858ae1..4f2a64a 100644 --- a/src/commands/meetings.ts +++ b/src/commands/meetings.ts @@ -276,7 +276,7 @@ export const meetingsMount = () => { const moved = await rekeyOldClients(store) if (moved.renamed + moved.merged + moved.refused > 0) run.streams?.diagnostic( - `moved old caller ids to their E.164 numbers: ${moved.renamed} renamed, ${moved.merged} merged` + + `moved old caller ids to their current ids: ${moved.renamed} renamed, ${moved.merged} merged` + (moved.refused ? `, ${moved.refused} left as they were (they could not merge)` : ""), ) } diff --git a/src/program.ts b/src/program.ts index 2ee849b..c7665ae 100644 --- a/src/program.ts +++ b/src/program.ts @@ -44,7 +44,7 @@ const update = appUpdate({ const mcpCommand = () => appMcpCommand(IDENTITY, configuration, { name: "Beeline Cloud PBX", - untrusted: ["call comments", "employee names and departments", "client phone numbers", "call transcripts"], + untrusted: ["employee names", "client phone numbers", "call transcripts"], permissionExample: "meetings.sync=deny", skill: SKILL, signedIn: (profile, env, keyring) => diff --git a/src/reasons.ts b/src/reasons.ts index 4a73884..30609cc 100644 --- a/src/reasons.ts +++ b/src/reasons.ts @@ -9,6 +9,11 @@ const OWN: [reason: string, code: string, message: string][] = [ ["token.refused", "authentication_error", "Beeline refused the API token"], ["recording.empty", "provider_error", "Beeline sent an empty recording"], ["recording.too-large", "validation_error", "the recording is larger than 256 MB"], + [ + "recording.too-long", + "validation_error", + "the call is longer than 60 minutes, the longest meetings transcribe takes", + ], ["recording.not-stereo", "invalid_response", "the recording is not two separate channels"], ["model.not-downloaded", "not_found", "the speech model is not on this computer; download it first"], ["transcript.missing", "not_found", "the call has no transcript yet; meetings transcribe makes one"], diff --git a/src/store.ts b/src/store.ts index 82f12d5..feaf02d 100644 --- a/src/store.ts +++ b/src/store.ts @@ -90,16 +90,18 @@ const openEmptyStore = async (env: NodeJS.ProcessEnv, profile: string) => { } /** - * A caller's id as an older build wrote it, moved to the `phone:+7…` id it gets now. Development builds of 0.1.0 first wrote the 10-digit - * national number Beeline sends (`phone:9000000009`); then, for a day, that number behind a `+` (`phone:+9000000009`). - * An id `clientPhone` cannot read, such as an extension, stays. + * A caller's id as an older build wrote it, moved to the id it gets now. Development builds of 0.1.0 first wrote the + * 10-digit national number Beeline sends (`phone:9000000009`); then, for a day, that number behind a `+` + * (`phone:+9000000009`). Those move to `phone:+7…`. A number `clientPhone` cannot read, such as an extension, was + * `phone:` up to 0.2.0 and moves to `number:`. An E.164 id stays. */ export const oldClientRekeys = (ids: readonly string[]): IdentityRekey[] => - ids.flatMap((from) => { - const raw = /^phone:(?:\+(?=\d{10}$))?(\d+)$/.exec(from)?.[1] - const phone = raw === undefined ? undefined : clientPhone(raw) - const to = phone && `phone:${phone}` - return phone && to && to !== from ? [{ from, to, phone }] : [] + ids.flatMap((from): IdentityRekey[] => { + const digits = /^phone:(?:\+(?=\d{10}$))?(\d+)$/.exec(from)?.[1] + const phone = digits === undefined ? undefined : clientPhone(digits) + if (phone) return `phone:${phone}` === from ? [] : [{ from, to: `phone:${phone}`, phone }] + if (!from.startsWith("phone:") || /^phone:\+[1-9]\d{6,14}$/.test(from)) return [] + return [{ from, to: `number:${digits ?? from.slice("phone:".length)}` }] }) export interface ClientRekeys { @@ -108,7 +110,7 @@ export interface ClientRekeys { refused: number } -/** Moves every profile's old caller ids to E.164 in passes short enough for other commands to get the write lock. */ +/** Moves every profile's old caller ids to their current ids in passes short enough for other commands to get the write lock. */ export const rekeyOldClients = async (store: MessageStore): Promise => { const ids = (await store.people.people(PROVIDER_NAME)).all().map((one) => String(one.id)) let rest = oldClientRekeys(ids) diff --git a/src/transcribe-calls.ts b/src/transcribe-calls.ts index 183931a..59ad8d1 100644 --- a/src/transcribe-calls.ts +++ b/src/transcribe-calls.ts @@ -93,7 +93,8 @@ export const transcribeCalls = async ( report.failed.push({ meeting: call.id, reason: String(reason), - message: error instanceof Error ? error.message : "the call could not be transcribed", + // Only beeline's and cli-core's own errors are worded for the answer; any other may carry a path or a value. + message: isCliError(error) ? error.message : "the call could not be transcribed", }) options.progress?.(`${index + 1}/${Math.min(pending.length, options.limit)} meeting ${call.id} failed: ${reason}`) } From b68c670d461baad669239da1e7938a54129e8d45 Mon Sep 17 00:00:00 2001 From: leemour Date: Mon, 16 Nov 2026 14:42:38 +0100 Subject: [PATCH 3/4] wip: keep recordings, docs, owner release --- README.md | 5 ++- README.ru.md | 3 ++ bin/owner-release | 25 ++++++++++- biome.json | 1 + changes/feat-next-2026-11-16.md | 14 ++++++ docs/commands.md | 4 +- docs/configuration.md | 7 +++ docs/dev/DESIGN.md | 8 ++++ docs/dev/skills/release/SKILL.md | 55 +++++++++++++----------- docs/security.md | 8 ++-- src/commands/transcribe.ts | 4 ++ src/config.ts | 18 +++++++- src/recordings.ts | 73 ++++++++++++++++++++++++++++++++ src/transcribe-calls.ts | 13 +++--- src/transcribe-command.test.ts | 22 ++++++++++ vitest.config.ts | 2 +- 16 files changed, 219 insertions(+), 43 deletions(-) create mode 100644 changes/feat-next-2026-11-16.md create mode 100644 src/recordings.ts diff --git a/README.md b/README.md index 487727f..3e28259 100644 --- a/README.md +++ b/README.md @@ -194,8 +194,9 @@ More: [settings](docs/configuration.md). ## Security - The token is sent only to Beeline, in a request header. No command, error, log or run record shows it. -- Recordings are held in memory while they are transcribed, and written to disk only by `meetings download`, to the - new file you name. +- `meetings transcribe` keeps each call's recording in beeline's own folder (`~/.local/state/beeline-cli/recordings/`), + readable only by you, so WireCat Desktop plays it. `beeline config set keep_recordings false` turns that + off: the recording is then dropped once transcribed. `meetings download` writes one to a new file you name. - The store keeps client phone numbers and the managers' names, emails and extensions. Treat it like the calls themselves. diff --git a/README.ru.md b/README.ru.md index d87a00f..2872628 100644 --- a/README.ru.md +++ b/README.ru.md @@ -144,5 +144,8 @@ beeline work mcp check - Ключ API уходит только в Билайн, в заголовке запроса. Ни одна команда, ошибка или журнал его не показывает. - `beeline` только читает данные Билайн: он не может удалить запись или позвонить. - В локальной базе лежат номера клиентов и имена менеджеров. Берегите её так же, как сами звонки. +- `meetings transcribe` оставляет запись звонка на этом компьютере, в папке `beeline` (`~/.local/state/beeline-cli/recordings/`), + доступной только вам, чтобы WireCat Desktop её проигрывал. `beeline <профиль> config set keep_recordings false` + выключает это: запись удаляется сразу после расшифровки. О найденной уязвимости пишите на [hello@wirecat.dev](mailto:hello@wirecat.dev), не в открытые задачи. diff --git a/bin/owner-release b/bin/owner-release index 3325c5c..56076c3 100755 --- a/bin/owner-release +++ b/bin/owner-release @@ -5,13 +5,15 @@ # # bin/owner-release # -# 1. Checks that main is clean, fetches it and fast-forwards it to origin/main. +# 1. Checks that main is clean, fetches it and fast-forwards it to origin/main, and that the released WireCat Desktop +# reads this manifest. # 2. Installs the locked dependencies. # 3. When npm already has the version in package.json, raises it: collects changes/ and `## Unreleased` into a dated # section, and picks the level its headings need (scripts/version-level.ts). A version raised and dated by hand is # released as it is. # 4. Builds, and runs the read-only live check of Beeline on with that build: a throwaway HOME, XDG folders -# and store, no D-Bus, so the owner's real store and keyring stay untouched. It prints counts and field names only. +# and store, no D-Bus, so the owner's real store and keyring stay untouched. It syncs a week of calls, lists three, +# transcribes one and checks its recording is kept (mode 0600). It prints counts and field names only. # 5. Records the check in docs/dev/live-checks.txt, which bin/release reads. # 6. Opens the release pull request with the version and the record in it, waits for its checks and squash merges it. # The record rides in the release commit, so no second pull request is needed. @@ -44,6 +46,9 @@ MODEL = "gigaam-v3" # The name the record carries: bin/release checks the record, not who wrote it. RECORDED_SCRIPT = "bin/owner-release" KEYRING_SERVICE = "beeline-cli" +# The manifest declares `meetings` since 0.3.0, which Desktop 0.6.8 refuses: publish only once Desktop reads it. +DESKTOP_REPO = "WireCatLabs/wirecat-desktop" +DESKTOP_NEEDED = "0.6.9" def step(title) puts "\n== #{title}" @@ -78,6 +83,15 @@ def sync_main output!("git", "rev-parse", "HEAD") end +def desktop_reads_the_manifest + step "WireCat Desktop #{DESKTOP_NEEDED} or newer is released" + latest = output!("gh", "api", "repos/#{DESKTOP_REPO}/releases/latest", "--jq", ".tag_name").delete_prefix("v") + puts "latest Desktop: #{latest}" + return if Gem::Version.new(latest) >= Gem::Version.new(DESKTOP_NEEDED) + + abort "Desktop #{latest} refuses this manifest; release Desktop #{DESKTOP_NEEDED} first" +end + def unreleased_text(changelog) changelog[/^## Unreleased\n(.*?)(?=^## )/m, 1].to_s.strip end @@ -201,6 +215,12 @@ def live_check(profile) puts "#{item['transcribed'].to_i} transcribed, #{item['audio_seconds'].to_i} s of audio, " \ "#{item['remaining'].to_i} remaining, failed: #{errors.empty? ? 'none' : errors.join(', ')}" failed = true unless answer && item["transcribed"].to_i >= 1 && errors.empty? + + step "the transcribed call's recording is kept on this computer, for the owner only" + kept = Dir.glob(File.join(sandbox, "**/recordings", profile, "*.mp3")) + private = kept.count { |path| (File.stat(path).mode & 0o777) == 0o600 } + puts "#{kept.length} recording(s) kept, #{private} of them readable by the owner only" + failed = true unless kept.length >= 1 && private == kept.length else puts "!! no #{MODEL} in #{MODELS}: run `beeline models download #{MODEL}` once" failed = true @@ -255,6 +275,7 @@ def main(argv) profile = argv.first base = sync_main + desktop_reads_the_manifest step "installing the locked dependencies" run! "pnpm", "install", "--frozen-lockfile" diff --git a/biome.json b/biome.json index 7e7a09c..b483a07 100644 --- a/biome.json +++ b/biome.json @@ -7,6 +7,7 @@ "!.worktrees", "!.claude", "!pnpm-lock.yaml", + "!contracts/previous", "!config/wirecat", "!contracts/wirecat.json" ] diff --git a/changes/feat-next-2026-11-16.md b/changes/feat-next-2026-11-16.md new file mode 100644 index 0000000..b2b7742 --- /dev/null +++ b/changes/feat-next-2026-11-16.md @@ -0,0 +1,14 @@ +### Added + +- **`meetings transcribe` keeps each call's recording on this computer**, readable only by you, and `meetings show` + names its file, so WireCat Desktop plays the call. `config set keep_recordings false` on a profile turns it off: the + recording is then dropped once transcribed, as before. + +### Fixed + +- **A client number that is no phone number, such as an extension, is stored as `number:`**, the key the + other WireCat tools read calls by, instead of `phone:`. `meetings sync` moves the ones an older version + stored, merging each into the client already stored under its new key, and says how many it moved. +- **A failed call in `meetings transcribe` no longer repeats an unexpected error's own text**, which could carry a + path; it says the call could not be transcribed. +- **The MCP server no longer warns about call comments and departments**, which beeline never stores. diff --git a/docs/commands.md b/docs/commands.md index 0370628..5298b57 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -723,7 +723,7 @@ beeline config set [options] | Argument | | What it is | |---|---|---| -| `setting` | required | one of: limit, timeout_ms, color, record, record_input, keep_runs_for_days, keep_successful_runs_for_days, keep_store_runs_for_days, runs_size_limit_mb, permissions, requests_per_minute, search_reranker, embedding_provider, embedding_model, embedding_base_url, embedding_dims, models, update_check, skill_hint, search_stemmers.cyrillic, search_stemmers.latin, owner_languages, crm.:.links, crm.:.company-types, crm.:.scope, crm.:.unassigned, crm.:.self, crm.:.stage-tasks, crm.:.activities. | +| `setting` | required | one of: limit, timeout_ms, color, record, record_input, keep_runs_for_days, keep_successful_runs_for_days, keep_store_runs_for_days, runs_size_limit_mb, permissions, requests_per_minute, search_reranker, embedding_provider, embedding_model, embedding_base_url, embedding_dims, models, keep_recordings, update_check, skill_hint, search_stemmers.cyrillic, search_stemmers.latin, owner_languages, crm.:.links, crm.:.company-types, crm.:.scope, crm.:.unassigned, crm.:.self, crm.:.stage-tasks, crm.:.activities. | | `value` | required | a number, true or false; for a group tg:work,max:Alice,email:me@x. | | Option | What it does | @@ -744,7 +744,7 @@ beeline config unset [options] | Argument | | What it is | |---|---|---| -| `setting` | required | one of: limit, timeout_ms, color, record, record_input, keep_runs_for_days, keep_successful_runs_for_days, keep_store_runs_for_days, runs_size_limit_mb, permissions, requests_per_minute, search_reranker, embedding_provider, embedding_model, embedding_base_url, embedding_dims, models, update_check, skill_hint, search_stemmers.cyrillic, search_stemmers.latin, owner_languages, crm.:.links, crm.:.company-types, crm.:.scope, crm.:.unassigned, crm.:.self, crm.:.stage-tasks, crm.:.activities. | +| `setting` | required | one of: limit, timeout_ms, color, record, record_input, keep_runs_for_days, keep_successful_runs_for_days, keep_store_runs_for_days, runs_size_limit_mb, permissions, requests_per_minute, search_reranker, embedding_provider, embedding_model, embedding_base_url, embedding_dims, models, keep_recordings, update_check, skill_hint, search_stemmers.cyrillic, search_stemmers.latin, owner_languages, crm.:.links, crm.:.company-types, crm.:.scope, crm.:.unassigned, crm.:.self, crm.:.stage-tasks, crm.:.activities. | | Option | What it does | |---|---| diff --git a/docs/configuration.md b/docs/configuration.md index 0919e20..be7306b 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -18,6 +18,13 @@ key. Over MCP there is no one to ask, so `ask` lets the command run. `BEELINE_RE sign-in, the settings, the agent setup or the stored meetings, whatever the permissions say. A sync still fetches new calls into the store; the [README](../README.md#settings-and-permissions) lists what it refuses and lets through. +## Recordings + +`keep_recordings` decides whether `meetings transcribe` keeps each call's recording on this computer after it is +transcribed, readable only by you, so WireCat Desktop plays it and `meetings show` names its file. It is `true` +unless you set it to `false` on the profile (`beeline work config set keep_recordings false`); then each recording is +dropped once transcribed. A file kept before stays until you delete it. + ## Run records A command that fails is kept as a run, for `beeline runs list` and `runs show`. `record_input` decides whether a run diff --git a/docs/dev/DESIGN.md b/docs/dev/DESIGN.md index 864dec0..d960697 100644 --- a/docs/dev/DESIGN.md +++ b/docs/dev/DESIGN.md @@ -79,4 +79,12 @@ landline, which everyone in an office shares. It joins only when the identity is must be there. The manager is keyed by Beeline's `abonent` and gets no phone: an extension is the company's, not a person's. `src/calls.test.ts` checks both cases against a Bitrix24 contact. +## A transcribed call's recording stays on this computer + +Owner, 2026-11-16 ("1 A, но можно отменить в настройках"). `meetings transcribe` keeps each recording it +transcribed in beeline's state folder (cli-base's `resolvePaths`, `recordings//.mp3`, the folder +`0700`, the file `0600`) and saves it as the call's `recording` attachment with its `local_path`, which `meetings +show` prints (cli-core 0.668.0). WireCat Desktop plays a call only from that path, as it does pbx's. The profile +setting `keep_recordings` (default `true`) turns it off; then a recording is dropped once transcribed, as before. + ## Open questions for the owner diff --git a/docs/dev/skills/release/SKILL.md b/docs/dev/skills/release/SKILL.md index cc50c59..de87863 100644 --- a/docs/dev/skills/release/SKILL.md +++ b/docs/dev/skills/release/SKILL.md @@ -1,14 +1,15 @@ --- name: release -description: Release this CLI — run release:check, write the changelog under the handbook's headings, check the docs against what changed, raise the version in a pull request, merge it and publish with bin/release from GitHub Actions. Release a batch of changes, not every merge. Use when asked to release, prepare a release, cut a version, «выпуск», «выпустить версию». +description: Release this CLI — run release:check, check the changelog fragments and the docs against what changed, run the fresh audit, then hand over to the owner, who raises the version, runs the live check and publishes with bin/owner-release. Release a batch of changes, not every merge. Use when asked to release, prepare a release, cut a version, «выпуск», «выпустить версию». --- # Release The rules are the handbook's [Releases page](../../../../node_modules/@wirecat/cli-base/docs/standards/releases.md) -(`WC-REL-`), which wins over this skill. An agent prepares the release, merges the release pull request and runs -`bin/release`, which publishes from GitHub Actions. Only the first release is the owner's, from this computer. -Release a batch of changes, not every merge. +(`WC-REL-`), which wins over this skill. An agent prepares the release: steps 1 to 6, in the pull requests it +merges. The owner publishes beeline by hand: `bin/owner-release ` raises the version, runs the live check, +merges the release pull request and runs `bin/release --local` (steps 7 to 10). An agent never raises the version or +runs `bin/release`. Release a batch of changes, not every merge. 1. **What changed.** In a worktree off `origin/main`: `git log --oneline "$(git describe --tags --abbrev=0 origin/main)..origin/main"`. The `docs/commands.md` diff shows what a cli-core or cli-base release changed in the commands. @@ -26,24 +27,28 @@ Release a batch of changes, not every merge. 6. **The fresh audit.** Start a new subagent that has none of your context, and give it the prompt in [fresh-audit.md](fresh-audit.md) as written. Put its report in the release pull request. Fix each gap in this repository there, or list it as a follow-up; take a gap in the handbook to cli-base. -7. **The version.** `npm view @wirecat/beeline-cli version` is what is published. The changelog picks the level, and - before `1.0.0` this narrows `WC-REL-7`: a section with `Changed — may break callers` or `Removed` raises the minor - (`0.1.8` to `0.2.0`), and so does one with `Added`; only a section of `Fixed`, `Security` or docs raises the patch. - From `1.0.0`, a breaking change raises the major. `pnpm version:check` refuses a dated section whose number is - raised less than its headings need, and when `bin/release` moves to the next free number on npm it raises that - number to the level the headings need. Set the next version in `package.json`, run `pnpm version:sync`, date the - section as `## — DD.MM.YYYY`, run `pnpm release:check` again, and commit. -8. **The live check.** Run this CLI's live check of the real service on that commit, by the owner or with the - owner's yes (`WC-TEST-18`). When it passes, `pnpm exec cli-dev live record --script ` appends - the version, the commit, the date and a hash of the checked files to `docs/dev/live-checks.txt`; commit that line. - `bin/release` refuses a version with no line, or whose `src/`, `package.json` or lockfile differ from the hashed - ones (`WC-REL-17`). It needs no branch commit, so a fresh clone releases after the squash merge. -9. **The pull request.** Open `chore(release): ` with a `## Conformance` section: the `release:check` - result, the live check's line, the fresh audit's report and the slice reviews' results. `release-pr.yml` fails a - pull request that changes the version without one. -10. **The publish.** Merge it when its checks pass, then run `bin/release` on a clean `main`: it starts - `release.yml` and follows it (`WC-REL-11`). A messenger CLI also needs the owner's yes for that version in the - conversation (`WC-REL-10`): ask before you run `bin/release`. Never `bin/release --local`: that is the owner's, for the first release before npm trusts - `release.yml`, with `NPM_TOKEN`, the npm token in the keyring, or the owner's own npm login. - The keyring is read only when `NPM_KEYRING_ACCOUNT` names the account the token is stored under (service `npm`); - there is no default account. When that lookup fails, `bin/release` stops; it does not fall back to the npm login. +7. **The hand-over.** Tell the owner the release is ready, with the fresh audit's report and what it found, and the + command: `bin/owner-release ` in the main checkout. Leave the version in `package.json` as npm has it. +8. **The owner's release.** `bin/owner-release `, one Ruby file that prints each step before it runs it: + - checks that main is clean, fast-forwards it to origin/main, and that the released WireCat Desktop reads this + manifest; + - `pnpm install --frozen-lockfile`; + - raises the version: dates the changelog section, collects `changes/` into it, picks the level its headings need + (before `1.0.0` an `Added`, `Changed — may break callers` or `Removed` raises the minor, else the patch; + `scripts/version-level.ts`), and runs `pnpm version:sync`. A version raised and dated by hand is kept; + - `pnpm build`, then the read-only live check of Beeline on that build, in a throwaway home, store and XDG folders, + with `DBUS_SESSION_BUS_ADDRESS=disabled:` on the beeline runs only (`WC-TEST-18`): session, a week's sync, a + list, one transcription, and its recording kept with mode `0600`. It prints counts and field names only; + - `cli-dev live record --script bin/owner-release` appends the check to `docs/dev/live-checks.txt`; + - opens `chore(release): ` with the version and the record and a `## Conformance` section, waits for its + checks, and squash merges it. The record rides in the release commit, so no second pull request is needed; + `bin/release` refuses a version with no line, or whose `src/`, `package.json` or lockfile differ from the hashed + ones (`WC-REL-17`); + - runs `bin/release --local`, which runs `pnpm release:check` and the local validation, publishes, tags and makes + the GitHub release (`WC-REL-11`, `WC-REL-13`). + + On success the last line is `published @wirecat/beeline-cli@`. A failed live check leaves main as it was + and pushes nothing. The npm token is `NPM_TOKEN`, or the keyring entry `NPM_KEYRING_ACCOUNT` names (service `npm`), + or the owner's npm login; there is no default account. +9. **After the release.** Raise `contracts/previous/` and `contracts/upgrade.json` to the version just published, in + the next pull request. diff --git a/docs/security.md b/docs/security.md index 7d660f8..5458c76 100644 --- a/docs/security.md +++ b/docs/security.md @@ -26,9 +26,11 @@ What WireCat CLIs share — the keyring, permissions, MCP, run records and what ## Recordings and speech -- A recording is downloaded into memory, transcribed and dropped. The store keeps only its size, its length and a - hash, so a second run can tell the same recording. Only `meetings download --output ` writes one to disk: to - a new file only you can read, never over a file that exists. +- A recording is downloaded into memory and transcribed. Then `meetings transcribe` keeps it in beeline's state folder + (`recordings//.mp3`, the folder `0700`, the file `0600`), and `meetings show` names the file, so + WireCat Desktop plays it. `config set keep_recordings false` on a profile drops each recording once transcribed + instead; a file kept before stays until you delete it. `meetings download --output ` writes one to a new file + only you can read, never over a file that exists. - Speech is recognized on this computer, by a model that `beeline models download` fetches once into the folder every WireCat CLI shares. The recording and its transcript are sent to no speech service. A cloud option, such as OpenAI, is planned and not offered yet. diff --git a/src/commands/transcribe.ts b/src/commands/transcribe.ts index 951f82f..a49e0ea 100644 --- a/src/commands/transcribe.ts +++ b/src/commands/transcribe.ts @@ -7,6 +7,7 @@ import { baseContext, environmentOf, FETCH, + fromFile, refuseOffline, } from "@wirecat/cli-core/cli" import { MEETING_QUERY, type MeetingStore, type MeetingTranscriptReceiptStore } from "@wirecat/cli-core/meetings" @@ -17,6 +18,7 @@ import * as v from "valibot" import type { BeelineApi } from "../beeline.js" import { configuration } from "../config.js" import { IDENTITY } from "../identity.js" +import { KEEP_RECORDINGS, recordingsFolder } from "../recordings.js" import type { TranscribeReport } from "../transcribe-calls.js" import { DEFAULT_SPEECH_MODEL } from "./models.js" @@ -117,6 +119,7 @@ export const transcribeCommand = (deps: TranscribeDeps): Command => { { reason: "model.not-downloaded" }, ) const { transcribeCalls } = await import("../transcribe-calls.js") + const keep = fromFile(context.settings, KEEP_RECORDINGS, true).value !== false const recognition = speech.localSpeechRecognitionModel(model) const signal = deps.signal() // Unbounded: run() already stops this cooperative command at its deadline by its signal, and it answers with what @@ -138,6 +141,7 @@ export const transcribeCommand = (deps: TranscribeDeps): Command => { }, recognize: (pcm) => speech.recognizeLocalPieces(model, pcm, { env, ...(signal ? { signal } : {}) }), recognition: { engine: recognition.engine, model: recognition.model, version: recognition.version }, + ...(keep ? { keepIn: recordingsFolder(env, context.settings.profile) } : {}), }, { query, diff --git a/src/config.ts b/src/config.ts index 7f32c16..822b869 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,7 +1,21 @@ -import { type Configuration, commandPermissions, settingsFor } from "@wirecat/cli-core/cli" +import { type Configuration, commandPermissions, plain, settingsFor } from "@wirecat/cli-core/cli" +import * as v from "valibot" import { IDENTITY } from "./identity.js" +import { KEEP_RECORDINGS } from "./recordings.js" /** Each command is checked against its own path (`notes.list`); add the keys a command checks inside itself. */ export const permissions = commandPermissions() -export const configuration: Configuration = settingsFor(IDENTITY, { permissions }) +export const configuration: Configuration = settingsFor(IDENTITY, { + permissions, + profile: { [KEEP_RECORDINGS]: v.optional(v.boolean(plain("has to be true or false"))) }, + settings: [ + { + key: KEEP_RECORDINGS, + default: true, + description: + "keep each call's recording on this computer after meetings transcribe, so WireCat Desktop plays it; " + + "false drops it once transcribed", + }, + ], +}) diff --git a/src/recordings.ts b/src/recordings.ts new file mode 100644 index 0000000..ee20a78 --- /dev/null +++ b/src/recordings.ts @@ -0,0 +1,73 @@ +import { chmod, mkdir, rename, writeFile } from "node:fs/promises" +import { join } from "node:path" +import { resolvePaths } from "@wirecat/cli-base" +import type { MeetingDetails, MeetingStore } from "@wirecat/cli-core/meetings" +import { IDENTITY } from "./identity.js" + +/** The setting that keeps a transcribed call's recording on this computer; true unless the owner turns it off. */ +export const KEEP_RECORDINGS = "keep_recordings" + +/** beeline's own state folder, one folder per profile, so Desktop plays a call from the file `meetings show` names. */ +export const recordingsFolder = (env: NodeJS.ProcessEnv, profile: string): string => + join(resolvePaths({ appName: IDENTITY.appName, prefix: IDENTITY.envPrefix, env }).state, "recordings", profile) + +const fileName = (externalId: string) => `${externalId.replace(/[^A-Za-z0-9._-]/g, "_")}.mp3` + +/** + * Writes the recording for the owner only and names it as the call's attachment, so `meetings show` gives its + * `local_path`. A sync leaves the attachment as it is: Beeline's source lists no files of its own. + */ +export const keepRecording = async ( + store: Pick, + details: MeetingDetails, + bytes: Uint8Array, + folder: string, + now: number, +): Promise => { + await mkdir(folder, { recursive: true, mode: 0o700 }) + const path = join(folder, fileName(details.meeting.externalId)) + const partial = `${path}.partial` + await writeFile(partial, bytes, { mode: 0o600 }) + await chmod(partial, 0o600) + await rename(partial, path) + const { + id, + createdAt, + updatedAt, + meetingSeriesId, + eventId, + participantsCount, + manager, + direction, + clientPhone, + ...meeting + } = details.meeting + await store.saveMeeting({ + meeting, + attachments: [ + { + position: 0, + kind: "recording", + mime: "audio/mpeg", + name: fileName(details.meeting.externalId), + title: null, + url: null, + size: bytes.byteLength, + width: null, + height: null, + duration: details.meeting.durationMs, + providerRef: { kept: "transcribe" }, + localPath: path, + text: null, + normalizedText: null, + extraction: null, + extractor: null, + extractionError: null, + contentSha256: null, + extractedAt: null, + }, + ], + now, + }) + return path +} diff --git a/src/transcribe-calls.ts b/src/transcribe-calls.ts index 59ad8d1..e05cd0e 100644 --- a/src/transcribe-calls.ts +++ b/src/transcribe-calls.ts @@ -4,6 +4,7 @@ import { type MeetingStore, type MeetingTranscriptReceiptStore, transcribeMeetin import type { Pcm } from "@wirecat/cli-core/speech" import type { BeelineApi } from "./beeline-api.js" import { callTranscriptionSource, type Recognition, type Recognize } from "./call-transcription.js" +import { keepRecording } from "./recordings.js" export interface TranscribeOptions { /** Which stored calls, in `meetings list`'s query language. */ @@ -33,6 +34,8 @@ export interface TranscribePorts { decode: (bytes: Uint8Array) => Promise recognize: Recognize recognition: Recognition + /** The folder a transcribed call's recording is kept in; without it the recording is dropped. */ + keepIn?: string } /** cli-core's decoder reads at most an hour of audio (`LONGEST_AUDIO_SECONDS`). */ @@ -71,12 +74,10 @@ export const transcribeCalls = async ( const bytes = await ports.api.recording(call.externalId) const channels = await ports.decode(bytes) const source = callTranscriptionSource(bytes, channels, ports.recognize, ports.recognition) - await transcribeMeeting( - source, - store, - { accountId, externalId: call.externalId, now: (options.now ?? Date.now)() }, - { apply: true }, - ) + const now = (options.now ?? Date.now)() + await transcribeMeeting(source, store, { accountId, externalId: call.externalId, now }, { apply: true }) + const details = ports.keepIn ? await store.meeting(call.id) : null + if (ports.keepIn && details) await keepRecording(store, details, bytes, ports.keepIn, now) report.transcribed++ report.audio_seconds += Math.round((call.durationMs ?? 0) / 1000) options.progress?.(`${index + 1}/${Math.min(pending.length, options.limit)} meeting ${call.id} transcribed`) diff --git a/src/transcribe-command.test.ts b/src/transcribe-command.test.ts index 38b4b5f..43668b2 100644 --- a/src/transcribe-command.test.ts +++ b/src/transcribe-command.test.ts @@ -199,3 +199,25 @@ it("lists a call over an hour as failed without downloading it", async () => { expect(JSON.parse(done.out).item.failed).toEqual([expect.objectContaining({ reason: "recording.too-long" })]) expect(downloads).toEqual([]) }) + +it("keeps a transcribed call's recording for the owner only and names it in meetings show; the setting drops it", async () => { + const { existsSync, rmSync, statSync } = await import("node:fs") + const listed = JSON.parse((await ran(["work", "meetings", "list", "--json"])).out).items as { id: string }[] + const id = listed[0]?.id + const transcribe = () => + ran(["work", "meetings", "transcribe", `id:${id}`, "--replace", "--json"], { speech: speech() }) + expect((await transcribe()).code).toBe(0) + + const shown = JSON.parse((await ran(["work", "meetings", "show", String(id), "--json"])).out).item + const [recording] = shown.attachments as { kind: string; mime: string; local_path: string }[] + expect(recording).toMatchObject({ kind: "recording", mime: "audio/mpeg" }) + const path = recording?.local_path ?? "" + expect(path).toMatch(/recordings\/work\/\d+\.mp3$/) + expect(statSync(path).mode & 0o777).toBe(0o600) + + rmSync(path) + expect((await ran(["work", "config", "set", "keep_recordings", "false", "--json"])).code).toBe(0) + expect((await transcribe()).code).toBe(0) + expect(existsSync(path)).toBe(false) + expect((await ran(["work", "config", "unset", "keep_recordings", "--json"])).code).toBe(0) +}) diff --git a/vitest.config.ts b/vitest.config.ts index 880bdab..83a4a53 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -20,7 +20,7 @@ export default defineConfig({ ], reporter: ["text-summary", "json-summary"], thresholds: { - "src/**": { lines: 95, statements: 92, functions: 85, branches: 75, perFile: { lines: 50 } }, + "src/**": { lines: 96, statements: 94, functions: 93, branches: 82, perFile: { lines: 50 } }, }, }, }, From feb8dde49946749acea79abfe4df9fe712bc0827 Mon Sep 17 00:00:00 2001 From: leemour Date: Mon, 16 Nov 2026 14:46:53 +0100 Subject: [PATCH 4/4] feat: keep transcribed recordings, number: ids, owner release script, upgrade contract MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Client numbers that are no phone numbers (extensions) are written as `number:`, the key cli-core's call reader expects; `meetings sync` moves the old `phone:` ids through rekeyIdentities (owner, NEED-2620 A). - `meetings transcribe` keeps each recording in beeline's state folder (0700/0600) as the call's `recording` attachment with `local_path`, so Desktop plays it; profile setting `keep_recordings` (default true) turns it off. - bin/owner-release: one Ruby file the owner runs — sync main, raise the version, build, sandboxed read-only live check, record it in the release commit, merge the release PR, bin/release --local. Refuses while the released Desktop is below 0.6.9. - contracts:upgrade from 0.2.0 (seed through the previous release's own modules); CI skip removed (WC-TEST-14). - Follow-ups: recording.too-long registered (WC-OUT-15), failed[].message only for own errors (WC-OUT-16, WC-SECR-6), MCP untrusted text (WC-MCP-11), first-calls names a profile (WC-ACCT-1, WC-DOC-12), README.ru.md a user page (WC-DOC-2), ci:quick builds once (WC-CI-4), coverage floors raised (WC-TEST-11), workflow pins to cli-base v0.104.0 (WC-CI-14). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/changelog-guard.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/monthly.yml | 2 +- .github/workflows/release-start.yml | 2 +- .github/workflows/release.yml | 2 +- bin/owner-release | 6 +++++- docs/commands.md | 2 +- src/commands/download.ts | 4 ++-- 8 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/changelog-guard.yml b/.github/workflows/changelog-guard.yml index b0ae279..282e4c8 100644 --- a/.github/workflows/changelog-guard.yml +++ b/.github/workflows/changelog-guard.yml @@ -9,4 +9,4 @@ permissions: jobs: changelog: - uses: WireCatLabs/cli-base/.github/workflows/changelog-guard.yml@183e25196cb9c9b777946b8783d0f7f222bd66f9 # v0.103.0 + uses: WireCatLabs/cli-base/.github/workflows/changelog-guard.yml@2913eb7d08bd7aab34bd4deef93d0a9b620699a9 # v0.104.0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d21dda..8bace67 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ permissions: jobs: ci: - uses: WireCatLabs/cli-base/.github/workflows/node-ci.yml@183e25196cb9c9b777946b8783d0f7f222bd66f9 # v0.103.0 + uses: WireCatLabs/cli-base/.github/workflows/node-ci.yml@2913eb7d08bd7aab34bd4deef93d0a9b620699a9 # v0.104.0 with: pack: ${{ inputs.pack || false }} bun-run: pnpm build && pnpm smoke:bun diff --git a/.github/workflows/monthly.yml b/.github/workflows/monthly.yml index 80a2a00..cf7292c 100644 --- a/.github/workflows/monthly.yml +++ b/.github/workflows/monthly.yml @@ -22,7 +22,7 @@ jobs: contents: read actions: read security-events: write - uses: WireCatLabs/cli-base/.github/workflows/release-checks.yml@183e25196cb9c9b777946b8783d0f7f222bd66f9 # v0.103.0 + uses: WireCatLabs/cli-base/.github/workflows/release-checks.yml@2913eb7d08bd7aab34bd4deef93d0a9b620699a9 # v0.104.0 with: dependencies: true languages: '["actions","javascript-typescript"]' diff --git a/.github/workflows/release-start.yml b/.github/workflows/release-start.yml index 9582b94..a41f45f 100644 --- a/.github/workflows/release-start.yml +++ b/.github/workflows/release-start.yml @@ -12,7 +12,7 @@ jobs: permissions: contents: read actions: write - uses: WireCatLabs/cli-base/.github/workflows/release-start.yml@183e25196cb9c9b777946b8783d0f7f222bd66f9 # v0.103.0 + uses: WireCatLabs/cli-base/.github/workflows/release-start.yml@2913eb7d08bd7aab34bd4deef93d0a9b620699a9 # v0.104.0 with: app-client-id: ${{ vars.RELEASE_APP_CLIENT_ID }} check: '[ -d kit ] || pnpm exec cli-dev live check --version "$VERSION"' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0abe74..bf78325 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,7 +56,7 @@ jobs: contents: read actions: read security-events: write - uses: WireCatLabs/cli-base/.github/workflows/release-checks.yml@183e25196cb9c9b777946b8783d0f7f222bd66f9 # v0.103.0 + uses: WireCatLabs/cli-base/.github/workflows/release-checks.yml@2913eb7d08bd7aab34bd4deef93d0a9b620699a9 # v0.104.0 build: needs: [checks, validation] diff --git a/bin/owner-release b/bin/owner-release index 56076c3..175c240 100755 --- a/bin/owner-release +++ b/bin/owner-release @@ -245,7 +245,10 @@ end def merge(pr, base) step "waiting for the checks of #{pr}" 30.times do - break if output!("gh", "pr", "checks", pr, "--required", "--json", "name", "--jq", "length").to_i.positive? + # gh exits non-zero until the checks register. + count, status = Open3.capture2("gh", "pr", "checks", pr, "--required", "--json", "name", "--jq", "length", + chdir: ROOT, err: File::NULL) + break if status.success? && count.to_i.positive? sleep 2 end @@ -263,6 +266,7 @@ def merge(pr, base) end abort "#{pr} is #{state} after 30 minutes" unless %w[CLEAN HAS_HOOKS UNSTABLE].include?(state) run! "gh", "pr", "merge", pr, "--squash", "--delete-branch", "--subject", "chore(release): #{version_of(pr)} (##{pr[/\d+\z/]})" + run! "git", "fetch", "origin" run! "git", "merge", "--ff-only", "origin/main" end diff --git a/docs/commands.md b/docs/commands.md index 5298b57..93207de 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -312,7 +312,7 @@ beeline meetings transcribe [query] [options] ### `beeline meetings download` -download the recording of a stored call from Beeline and write it to a new file; Beeline keeps the recording, this computer keeps only the transcript +download the recording of a stored call from Beeline and write it to a new file of your choice; meetings transcribe already keeps a copy for WireCat Desktop unless keep_recordings is false **Changes something on this computer only.** diff --git a/src/commands/download.ts b/src/commands/download.ts index 5abbc5f..85949eb 100644 --- a/src/commands/download.ts +++ b/src/commands/download.ts @@ -48,8 +48,8 @@ export const downloadCommand = (deps: DownloadDeps): Command => { const command = writesNewFileOnlyWith(answerEntity(base, "call_recording", SAVED), "output") .summary("save one call's recording from Beeline to a new file") .description( - "download the recording of a stored call from Beeline and write it to a new file; Beeline keeps the " + - "recording, this computer keeps only the transcript", + "download the recording of a stored call from Beeline and write it to a new file of your choice; " + + "meetings transcribe already keeps a copy for WireCat Desktop unless keep_recordings is false", ) .argument("", "stored call id, or the ref meetings list prints (meeting:1/375)", deps.meetingId) return command.action(async function (this: Command, id: number, opts: { output: string }) {