@wirecat/max-cli 0.46.0 → 0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/adapter/max-adapter.js +1 -1
- package/dist/bot/adapter.d.ts +2 -2
- package/dist/bot/adapter.js +1 -1
- package/dist/bot/auth.d.ts +1 -1
- package/dist/bot/client.d.ts +1 -1
- package/dist/bot/client.js +1 -1
- package/dist/bot/generated/manifest.d.ts +1 -1
- package/dist/bot/generated/schemas.js +1 -1
- package/dist/bot/input.d.ts +1 -1
- package/dist/bot/joins.js +1 -1
- package/dist/bot/keep.js +1 -1
- package/dist/bot/transport.d.ts +3 -3
- package/dist/bot/transport.js +2 -2
- package/dist/bot/uploads.d.ts +2 -2
- package/dist/bot/uploads.js +2 -2
- package/dist/client.d.ts +1 -1
- package/dist/client.js +2 -2
- package/dist/commands/bot-comments.js +2 -2
- package/dist/commands/bot-context.d.ts +5 -5
- package/dist/commands/bot-context.js +1 -1
- package/dist/commands/bot-members.js +2 -2
- package/dist/commands/bot-reads.js +1 -1
- package/dist/commands/bot-sends.d.ts +1 -1
- package/dist/commands/bot-sends.js +1 -1
- package/dist/commands/bot-setup.js +1 -1
- package/dist/commands/complete.js +1 -1
- package/dist/commands/config.js +2 -2
- package/dist/commands/contacts.js +1 -1
- package/dist/commands/context.d.ts +2 -2
- package/dist/commands/doctor.js +1 -1
- package/dist/commands/mcp.js +5 -5
- package/dist/commands/messages.js +1 -1
- package/dist/commands/paging.d.ts +1 -1
- package/dist/commands/paging.js +1 -1
- package/dist/commands/recipients.js +2 -2
- package/dist/commands/serve-members.js +1 -1
- package/dist/commands/serve.js +1 -1
- package/dist/commands/server.js +1 -1
- package/dist/commands/session.js +2 -2
- package/dist/commands/setup.js +3 -3
- package/dist/commands/watch.js +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +2 -2
- package/dist/diagnose.js +3 -3
- package/dist/domain/map.js +1 -1
- package/dist/download.js +1 -1
- package/dist/format-markdown.js +1 -1
- package/dist/inbox-point.js +1 -1
- package/dist/install/postinstall.js +1 -1
- package/dist/install.d.ts +1 -1
- package/dist/install.js +1 -1
- package/dist/mcp/photo.js +1 -1
- package/dist/mcp/resources.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/session.js +1 -1
- package/dist/mcp/shared.js +1 -1
- package/dist/mcp/tools.js +1 -1
- package/dist/moderation/check.js +1 -1
- package/dist/moderation/points.js +1 -1
- package/dist/permissions.js +2 -2
- package/dist/profile.js +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +4 -3
- package/dist/program.js.map +1 -1
- package/dist/rendering/messages.js +1 -1
- package/dist/report.js +1 -1
- package/dist/sends.js +1 -1
- package/dist/server/replies.js +1 -1
- package/dist/server/server-connection.js +1 -1
- package/dist/server/server.js +1 -1
- package/dist/server/subscribe.js +1 -1
- package/dist/session/adopt.d.ts +1 -1
- package/dist/session/adopt.js +1 -1
- package/dist/session/browser.js +1 -1
- package/dist/session/login.js +1 -1
- package/dist/session/store.d.ts +1 -1
- package/dist/session/store.js +1 -1
- package/dist/skill.d.ts +2 -2
- package/dist/skill.js +1 -1
- package/dist/spec/define.js +1 -1
- package/dist/spec/guards.js +1 -1
- package/dist/transcribe/index.d.ts +1 -1
- package/dist/transcribe/index.js +1 -1
- package/dist/update.d.ts +2 -2
- package/dist/update.js +4 -4
- package/dist/upload.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/voice.js +1 -1
- package/package.json +9 -9
- package/skills/max-cli/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -366,7 +366,7 @@ pnpm generate # переписать сгенериро
|
|
|
366
366
|
Протокол MAX неофициальный и разобран обратной инженерией. Каждый опкод объявлен один раз в
|
|
367
367
|
`src/spec/`, а реестр, типизированный клиент и `docs/dev/protocol.md` из него генерируются; CI
|
|
368
368
|
падает, если дерево устарело. Общая часть — потоки вывода, коды ошибок, хранилище паролей — в
|
|
369
|
-
[`@wirecat/cli-
|
|
369
|
+
[`@wirecat/cli-base`](https://github.com/WireCatLabs/cli-base).
|
|
370
370
|
|
|
371
371
|
## Часть WireCat
|
|
372
372
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliError, singleLine } from "@wirecat/cli-
|
|
1
|
+
import { CliError, singleLine } from "@wirecat/cli-base";
|
|
2
2
|
import { observedCounters } from "@wirecat/cli-messaging";
|
|
3
3
|
import { httpOnly, LARGEST_VOICE, streamBytes } from "../download.js";
|
|
4
4
|
import { formatMarkdown, toNativeMarkup } from "../format-markdown.js";
|
package/dist/bot/adapter.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type SleepLike } from "@wirecat/cli-
|
|
2
|
-
import type { FetchLike } from "@wirecat/cli-
|
|
1
|
+
import { type SleepLike } from "@wirecat/cli-base";
|
|
2
|
+
import type { FetchLike } from "@wirecat/cli-base/http";
|
|
3
3
|
import type { AdminRight, Markup } from "@wirecat/cli-messaging";
|
|
4
4
|
import type { BotAdapter, EventSink } from "@wirecat/cli-messaging/cli";
|
|
5
5
|
import { type BotApiClient } from "./client.js";
|
package/dist/bot/adapter.js
CHANGED
package/dist/bot/auth.d.ts
CHANGED
package/dist/bot/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ManifestOperation } from "@wirecat/cli-
|
|
1
|
+
import type { ManifestOperation } from "@wirecat/cli-base/codegen";
|
|
2
2
|
import type { Chat, Message } from "@wirecat/cli-messaging";
|
|
3
3
|
import type { PersonFacts } from "@wirecat/cli-messaging/store";
|
|
4
4
|
import type { BotInfo as BotInfoType } from "./generated/types.js";
|
package/dist/bot/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
2
|
import * as v from "valibot";
|
|
3
3
|
import { operations } from "./generated/manifest.js";
|
|
4
4
|
import { BotInfo, Chat as ChatSchema, Message as MessageSchema } from "./generated/schemas.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// GENERATED. DO NOT EDIT.
|
|
2
2
|
// Source: spec/bot/schema.yaml
|
|
3
3
|
// Run: pnpm bot:generate
|
|
4
|
-
import { int64, integer, number, unique } from "@wirecat/cli-
|
|
4
|
+
import { int64, integer, number, unique } from "@wirecat/cli-base/codegen/runtime";
|
|
5
5
|
import * as v from "valibot";
|
|
6
6
|
export const Bigint = int64();
|
|
7
7
|
export const UserId = int64();
|
package/dist/bot/input.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ManifestOperation, SchemaNode } from "@wirecat/cli-
|
|
1
|
+
import type { ManifestOperation, SchemaNode } from "@wirecat/cli-base/codegen";
|
|
2
2
|
import { apiFlagOf, apiOptionKey, readApiBody } from "@wirecat/cli-messaging/cli";
|
|
3
3
|
export { apiFlagOf as flagOf, apiOptionKey as optionKey, readApiBody as readBody };
|
|
4
4
|
export declare const checkParameter: (name: string, node: SchemaNode, raw: string) => string | undefined;
|
package/dist/bot/joins.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import { writeSecurely } from "@wirecat/cli-
|
|
3
|
+
import { writeSecurely } from "@wirecat/cli-base";
|
|
4
4
|
import { botsDirectory } from "./registry.js";
|
|
5
5
|
/** Past this, a join is too old for any check; the log does not grow for ever. */
|
|
6
6
|
const KEEP_MS = 30 * 86_400_000;
|
package/dist/bot/keep.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
2
|
import { openStore, } from "@wirecat/cli-messaging/store";
|
|
3
3
|
/** How a bot's messages are told apart from a personal account's in the shared store and its locators. */
|
|
4
4
|
export const PROVIDER = "max-bot";
|
package/dist/bot/transport.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type RetryConfig, type SleepLike } from "@wirecat/cli-
|
|
2
|
-
import type { ManifestOperation } from "@wirecat/cli-
|
|
3
|
-
import { type FetchLike } from "@wirecat/cli-
|
|
1
|
+
import { type RetryConfig, type SleepLike } from "@wirecat/cli-base";
|
|
2
|
+
import type { ManifestOperation } from "@wirecat/cli-base/codegen";
|
|
3
|
+
import { type FetchLike } from "@wirecat/cli-base/http";
|
|
4
4
|
import { type DiagnosticEvent } from "@wirecat/cli-messaging/cli";
|
|
5
5
|
export declare const BOT_API_URL = "https://platform-api2.max.ru";
|
|
6
6
|
/**
|
package/dist/bot/transport.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import tls from "node:tls";
|
|
2
|
-
import { backoffMs, CliError, DEFAULT_RETRY, realSleep, singleLine, } from "@wirecat/cli-
|
|
3
|
-
import { providerWaitMs, statusToCode } from "@wirecat/cli-
|
|
2
|
+
import { backoffMs, CliError, DEFAULT_RETRY, realSleep, singleLine, } from "@wirecat/cli-base";
|
|
3
|
+
import { providerWaitMs, statusToCode } from "@wirecat/cli-base/http";
|
|
4
4
|
import { providerErrorKey } from "@wirecat/cli-messaging/cli";
|
|
5
5
|
import { guardedWrite, newOperationId } from "@wirecat/cli-messaging/sends";
|
|
6
6
|
import { isLosslessNumber, isSafeNumber, parse, stringify } from "lossless-json";
|
package/dist/bot/uploads.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type SleepLike } from "@wirecat/cli-
|
|
2
|
-
import { type FetchLike } from "@wirecat/cli-
|
|
1
|
+
import { type SleepLike } from "@wirecat/cli-base";
|
|
2
|
+
import { type FetchLike } from "@wirecat/cli-base/http";
|
|
3
3
|
import type { DiagnosticEvent } from "@wirecat/cli-messaging/cli";
|
|
4
4
|
export declare const UPLOAD_TYPES: readonly ["image", "video", "audio", "file"];
|
|
5
5
|
export type UploadType = (typeof UPLOAD_TYPES)[number];
|
package/dist/bot/uploads.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { openAsBlob, statSync } from "node:fs";
|
|
2
2
|
import { basename, extname } from "node:path";
|
|
3
|
-
import { CliError, realSleep } from "@wirecat/cli-
|
|
4
|
-
import { statusToCode } from "@wirecat/cli-
|
|
3
|
+
import { CliError, realSleep } from "@wirecat/cli-base";
|
|
4
|
+
import { statusToCode } from "@wirecat/cli-base/http";
|
|
5
5
|
import { parse } from "lossless-json";
|
|
6
6
|
import { plainJson } from "./transport.js";
|
|
7
7
|
export const UPLOAD_TYPES = ["image", "video", "audio", "file"];
|
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SleepLike } from "@wirecat/cli-
|
|
1
|
+
import { type SleepLike } from "@wirecat/cli-base";
|
|
2
2
|
import { type DiagnosticEvent } from "@wirecat/cli-messaging/cli";
|
|
3
3
|
import { type ChatAction, type SendGuard, type Upload as SharedUpload } from "@wirecat/cli-messaging/sends";
|
|
4
4
|
import type { AccountSession, AttachmentLink, Button, CallRecord, Chat, ChatCard, ChatEvents, ChatKind, Contact, ContactImport, Deletion, Folder, GroupCard, GroupMember, GroupMembers, GroupSettings, Id, JoinRequest, MediaKind, Message, MessageChange, MessageHit, Page, PersonCard, Pin, PollMessage, PrivacySettings, Profile, ProfileFacts, Reactions, ReadMark, Sticker, StickerSet, WindowedMessage } from "./domain/models.js";
|
package/dist/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliError, realSleep } from "@wirecat/cli-
|
|
1
|
+
import { CliError, realSleep } from "@wirecat/cli-base";
|
|
2
2
|
import { pickPerson as pickStoredPerson } from "@wirecat/cli-messaging";
|
|
3
3
|
import { providerErrorKey } from "@wirecat/cli-messaging/cli";
|
|
4
4
|
import { currentOperation, } from "@wirecat/cli-messaging/sends";
|
|
@@ -1826,7 +1826,7 @@ export class MaxClient {
|
|
|
1826
1826
|
const token = candidate ?? this.#store.readToken();
|
|
1827
1827
|
if (!token) {
|
|
1828
1828
|
const profile = this.#store.profile;
|
|
1829
|
-
// cli-
|
|
1829
|
+
// cli-base swallows a keyring that will not open, so the state file is the only witness: a
|
|
1830
1830
|
// profile that has logged in lost its keyring, not its session, and another login would
|
|
1831
1831
|
// register one more device for nothing (MAX-50, measured from cron 2026-09-25).
|
|
1832
1832
|
if (this.#store.hasLoggedIn()) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-
|
|
2
|
-
import { annotate } from "@wirecat/cli-
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
|
+
import { annotate } from "@wirecat/cli-base/commands";
|
|
3
3
|
import { Command, Option } from "commander";
|
|
4
4
|
import { plainJson } from "../bot/transport.js";
|
|
5
5
|
import { botContext } from "./bot-context.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ManifestOperation } from "@wirecat/cli-
|
|
1
|
+
import type { ManifestOperation } from "@wirecat/cli-base/codegen";
|
|
2
2
|
import { type EventSink, type Recording } from "@wirecat/cli-messaging/cli";
|
|
3
3
|
import type { Command } from "commander";
|
|
4
4
|
import { BotTokenStore } from "../bot/auth.js";
|
|
@@ -16,12 +16,12 @@ export declare const botContext: (command: Command, { offline: answersOffline }?
|
|
|
16
16
|
offline?: boolean;
|
|
17
17
|
}) => {
|
|
18
18
|
askPermission: import("@wirecat/cli-messaging/sends").Asker;
|
|
19
|
-
sleep: import("@wirecat/cli-
|
|
19
|
+
sleep: import("@wirecat/cli-base").SleepLike | undefined;
|
|
20
20
|
/** The run's sink, for the requests that do not go through the transport — the upload. */
|
|
21
21
|
events: EventSink | undefined;
|
|
22
22
|
settings: Settings;
|
|
23
|
-
renderer: import("@wirecat/cli-
|
|
24
|
-
streams: import("@wirecat/cli-
|
|
23
|
+
renderer: import("@wirecat/cli-base").Renderer;
|
|
24
|
+
streams: import("@wirecat/cli-base").Streams;
|
|
25
25
|
format: "json" | "jsonl" | "pretty";
|
|
26
26
|
color: boolean;
|
|
27
27
|
store: BotTokenStore;
|
|
@@ -30,7 +30,7 @@ export declare const botContext: (command: Command, { offline: answersOffline }?
|
|
|
30
30
|
ask: import("./context.js").Ask;
|
|
31
31
|
authenticated: (stop?: AbortSignal) => BotApiClient;
|
|
32
32
|
signal: AbortSignal | undefined;
|
|
33
|
-
uploadFetch: () => import("@wirecat/cli-
|
|
33
|
+
uploadFetch: () => import("@wirecat/cli-base/http").FetchLike;
|
|
34
34
|
offline: boolean;
|
|
35
35
|
};
|
|
36
36
|
/** The personal account's `readOnly` and `allow` hold for the bot too; a prompt was waived (`NEED-304`), a refusal was not. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-
|
|
2
|
-
import { annotate } from "@wirecat/cli-
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
|
+
import { annotate } from "@wirecat/cli-base/commands";
|
|
3
3
|
import { checkBody } from "../bot/input.js";
|
|
4
4
|
import { plainJson } from "../bot/transport.js";
|
|
5
5
|
import { botContext } from "./bot-context.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
2
|
import { pickChat } from "@wirecat/cli-messaging";
|
|
3
3
|
const CHAT_ID = /^-?\d+$/;
|
|
4
4
|
/** An id as it is, or a title this bot has already seen — never a guess (ARCHITECTURE §9). */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ManifestOperation } from "@wirecat/cli-
|
|
1
|
+
import type { ManifestOperation } from "@wirecat/cli-base/codegen";
|
|
2
2
|
import type { CallInput } from "../bot/transport.js";
|
|
3
3
|
import { type UploadType } from "../bot/uploads.js";
|
|
4
4
|
import { type botContext } from "./bot-context.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import { CliError } from "@wirecat/cli-
|
|
3
|
+
import { CliError } from "@wirecat/cli-base";
|
|
4
4
|
import { guardedWrite, newOperationId, newSendId, RecipientList, SendJournal, sendGuard, } from "@wirecat/cli-messaging/sends";
|
|
5
5
|
import { botOperations } from "../bot/client.js";
|
|
6
6
|
import { BOT_JOURNAL_KINDS, BOT_KEYS } from "../bot/permissions.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import { resolvePaths, singleLine } from "@wirecat/cli-
|
|
3
|
+
import { resolvePaths, singleLine } from "@wirecat/cli-base";
|
|
4
4
|
import { completeCommand as sharedCompleteCommand } from "@wirecat/cli-messaging/cli";
|
|
5
5
|
import { ChatRegistry } from "../bot/registry.js";
|
|
6
6
|
import { configuredProfiles } from "../config.js";
|
package/dist/commands/config.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import { CliError, loadConfigFile, pathsAreOverridden, resolvePaths, saveConfigFile, writeSecurely, } from "@wirecat/cli-
|
|
4
|
-
import { annotate } from "@wirecat/cli-
|
|
3
|
+
import { CliError, loadConfigFile, pathsAreOverridden, resolvePaths, saveConfigFile, writeSecurely, } from "@wirecat/cli-base";
|
|
4
|
+
import { annotate } from "@wirecat/cli-base/commands";
|
|
5
5
|
import { AI_SETTING_KEYS, changeStoreSetting, isStoreSetting, migratePermissionConfig, refuseUnknownKey, STORE_SETTINGS, storeSettings, } from "@wirecat/cli-messaging/cli";
|
|
6
6
|
import { Command } from "commander";
|
|
7
7
|
import * as v from "valibot";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
2
|
import { contactsCommand as sharedContactsCommand } from "@wirecat/cli-messaging/cli";
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
import { maxMessenger, sharedSubcommand } from "../messenger.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Renderer, RenderFormat, RetryConfig, SleepLike, Streams } from "@wirecat/cli-
|
|
2
|
-
import type { FetchLike } from "@wirecat/cli-
|
|
1
|
+
import type { Renderer, RenderFormat, RetryConfig, SleepLike, Streams } from "@wirecat/cli-base";
|
|
2
|
+
import type { FetchLike } from "@wirecat/cli-base/http";
|
|
3
3
|
import type { ServerSystem } from "@wirecat/cli-messaging/background";
|
|
4
4
|
import { type BaseEnvironment } from "@wirecat/cli-messaging/cli";
|
|
5
5
|
import type { Command } from "commander";
|
package/dist/commands/doctor.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolve } from "node:path";
|
|
2
|
-
import { CliError, writeSecurely } from "@wirecat/cli-
|
|
2
|
+
import { CliError, writeSecurely } from "@wirecat/cli-base";
|
|
3
3
|
import { runsDirFor } from "@wirecat/cli-messaging/cli";
|
|
4
4
|
import { SendJournal } from "@wirecat/cli-messaging/sends";
|
|
5
5
|
import { Command } from "commander";
|
package/dist/commands/mcp.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-
|
|
2
|
-
import { annotate } from "@wirecat/cli-
|
|
3
|
-
import { installerOf } from "@wirecat/cli-
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
|
+
import { annotate } from "@wirecat/cli-base/commands";
|
|
3
|
+
import { installerOf } from "@wirecat/cli-base/update";
|
|
4
4
|
import { httpTokenFile, revokeAll } from "@wirecat/cli-messaging/cli";
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
import { MAX_APP } from "../app.js";
|
|
@@ -125,7 +125,7 @@ export const mcpCommand = () => {
|
|
|
125
125
|
const [name, server] = Object.entries(entry.config.mcpServers)[0] ?? [];
|
|
126
126
|
if (!name || !server)
|
|
127
127
|
throw new CliError("validation_error", "the MCP entry is empty");
|
|
128
|
-
const { installStdioEntry, probeStdio } = await import("@wirecat/cli-
|
|
128
|
+
const { installStdioEntry, probeStdio } = await import("@wirecat/cli-base/mcp");
|
|
129
129
|
try {
|
|
130
130
|
const configuration = server;
|
|
131
131
|
const { potentialWrites } = await probeStdio(configuration);
|
|
@@ -149,7 +149,7 @@ export const mcpCommand = () => {
|
|
|
149
149
|
const server = Object.values(entry.config.mcpServers)[0];
|
|
150
150
|
if (!server)
|
|
151
151
|
throw new CliError("validation_error", "the MCP entry is empty");
|
|
152
|
-
const { probeStdio } = await import("@wirecat/cli-
|
|
152
|
+
const { probeStdio } = await import("@wirecat/cli-base/mcp");
|
|
153
153
|
try {
|
|
154
154
|
const { tools, potentialWrites } = await probeStdio(server);
|
|
155
155
|
renderer.result({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
2
|
import { deleteCommand, editCommand, forwardCommand, pinCommand, sendCommand, messagesCommand as sharedMessagesCommand, unpinCommand, } from "@wirecat/cli-messaging/cli";
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
import { maxMessenger, sharedSubcommand } from "../messenger.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Renderer, type RenderFormat, type Streams } from "@wirecat/cli-
|
|
1
|
+
import { type Renderer, type RenderFormat, type Streams } from "@wirecat/cli-base";
|
|
2
2
|
import type { Command } from "commander";
|
|
3
3
|
import type { Settings } from "../config.js";
|
|
4
4
|
import type { Page } from "../domain/models.js";
|
package/dist/commands/paging.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
2
|
/** Checked while parsing, so the error can quote what was typed rather than the `NaN` it became. */
|
|
3
3
|
export const wholeNumber = (flag) => (value) => {
|
|
4
4
|
if (!/^\d+$/.test(value.trim()) || Number(value) < 1) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-
|
|
2
|
-
import { annotate } from "@wirecat/cli-
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
|
+
import { annotate } from "@wirecat/cli-base/commands";
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
import { recipientListFor } from "../sends.js";
|
|
5
5
|
import { forCommand } from "./context.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
2
|
import { memberFetches } from "@wirecat/cli-messaging/cli";
|
|
3
3
|
import { chatsService, onlineDeps } from "@wirecat/cli-messaging/services";
|
|
4
4
|
import { openStore } from "@wirecat/cli-messaging/store";
|
package/dist/commands/serve.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { writeFileSync } from "node:fs";
|
|
2
|
-
import { CliError } from "@wirecat/cli-
|
|
2
|
+
import { CliError } from "@wirecat/cli-base";
|
|
3
3
|
import { holdLock, lockPath, releaseLock } from "@wirecat/cli-messaging/background";
|
|
4
4
|
import { Command, Option } from "commander";
|
|
5
5
|
import { MAX_APP } from "../app.js";
|
package/dist/commands/server.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliError, exitCodeFor } from "@wirecat/cli-
|
|
1
|
+
import { CliError, exitCodeFor } from "@wirecat/cli-base";
|
|
2
2
|
import { serverCommand as sharedServerCommand } from "@wirecat/cli-messaging/cli";
|
|
3
3
|
import { maxMessenger } from "../messenger.js";
|
|
4
4
|
import { serverStatus, stopServer } from "../server/server-connection.js";
|
package/dist/commands/session.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CliError, indent } from "@wirecat/cli-
|
|
2
|
-
import { annotate } from "@wirecat/cli-
|
|
1
|
+
import { CliError, indent } from "@wirecat/cli-base";
|
|
2
|
+
import { annotate } from "@wirecat/cli-base/commands";
|
|
3
3
|
import { Argument, Command } from "commander";
|
|
4
4
|
import { refuseWhilePaused } from "../client.js";
|
|
5
5
|
import { maskedProfile } from "../domain/map.js";
|
package/dist/commands/setup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { accessSync, constants, mkdirSync } from "node:fs";
|
|
2
|
-
import { CliError, indent, renderPretty, resolvePaths } from "@wirecat/cli-
|
|
3
|
-
import { annotate } from "@wirecat/cli-
|
|
4
|
-
import { installSkill } from "@wirecat/cli-
|
|
2
|
+
import { CliError, indent, renderPretty, resolvePaths } from "@wirecat/cli-base";
|
|
3
|
+
import { annotate } from "@wirecat/cli-base/commands";
|
|
4
|
+
import { installSkill } from "@wirecat/cli-base/skill";
|
|
5
5
|
import { runtime } from "@wirecat/cli-messaging/cli";
|
|
6
6
|
import { Command, Option } from "commander";
|
|
7
7
|
import { maskedProfile } from "../domain/map.js";
|
package/dist/commands/watch.js
CHANGED
package/dist/config.d.ts
CHANGED
|
@@ -344,7 +344,7 @@ export interface ResolveOptions {
|
|
|
344
344
|
* output of a command that never asked for it.
|
|
345
345
|
*
|
|
346
346
|
* Two things already jump this queue and are documented rather than re-litigated here:
|
|
347
|
-
* `MAX_TOKEN` outranks the keyring (`cli-
|
|
347
|
+
* `MAX_TOKEN` outranks the keyring (`cli-base`'s `Credentials.read`), and `MAX_CONFIG_DIR`,
|
|
348
348
|
* `MAX_STATE_DIR` or `MAX_CACHE_DIR` move the whole installation — including which keyring entry
|
|
349
349
|
* a profile means (`ARCHITECTURE.md` §14).
|
|
350
350
|
*/
|
package/dist/config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliError, loadConfigFile, saveConfigFile } from "@wirecat/cli-
|
|
1
|
+
import { CliError, loadConfigFile, saveConfigFile } from "@wirecat/cli-base";
|
|
2
2
|
import { AI_ENTRIES, first, settingsFor } from "@wirecat/cli-messaging/cli";
|
|
3
3
|
import { PERMISSIONS } from "@wirecat/cli-messaging/sends";
|
|
4
4
|
import * as v from "valibot";
|
|
@@ -112,7 +112,7 @@ export const ALL_SETTINGS = [
|
|
|
112
112
|
* output of a command that never asked for it.
|
|
113
113
|
*
|
|
114
114
|
* Two things already jump this queue and are documented rather than re-litigated here:
|
|
115
|
-
* `MAX_TOKEN` outranks the keyring (`cli-
|
|
115
|
+
* `MAX_TOKEN` outranks the keyring (`cli-base`'s `Credentials.read`), and `MAX_CONFIG_DIR`,
|
|
116
116
|
* `MAX_STATE_DIR` or `MAX_CACHE_DIR` move the whole installation — including which keyring entry
|
|
117
117
|
* a profile means (`ARCHITECTURE.md` §14).
|
|
118
118
|
*/
|
package/dist/diagnose.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { join } from "node:path";
|
|
4
|
-
import { pathsAreOverridden, resolvePaths } from "@wirecat/cli-
|
|
4
|
+
import { pathsAreOverridden, resolvePaths } from "@wirecat/cli-base";
|
|
5
5
|
import { runtime, storeSummary } from "@wirecat/cli-messaging/cli";
|
|
6
6
|
import { openCache, storePath } from "@wirecat/cli-messaging/store";
|
|
7
7
|
import { checkInstall, ownScript } from "./install.js";
|
|
@@ -119,8 +119,8 @@ const loadNative = async () => {
|
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
121
|
return {
|
|
122
|
-
// The keyring module belongs to cli-
|
|
123
|
-
keyring: await attempt(() => createRequire(import.meta.resolve("@wirecat/cli-
|
|
122
|
+
// The keyring module belongs to cli-base, so it is resolved from there, as cli-base does.
|
|
123
|
+
keyring: await attempt(() => createRequire(import.meta.resolve("@wirecat/cli-base"))("@napi-rs/keyring")),
|
|
124
124
|
sqlite: await attempt(async () => (await openCache(":memory:")).close()),
|
|
125
125
|
};
|
|
126
126
|
};
|
package/dist/domain/map.js
CHANGED
package/dist/download.js
CHANGED
|
@@ -3,7 +3,7 @@ import { link, rm } from "node:fs/promises";
|
|
|
3
3
|
import { basename, join } from "node:path";
|
|
4
4
|
import { PassThrough, Readable, Transform, Writable } from "node:stream";
|
|
5
5
|
import { pipeline } from "node:stream/promises";
|
|
6
|
-
import { CliError } from "@wirecat/cli-
|
|
6
|
+
import { CliError } from "@wirecat/cli-base";
|
|
7
7
|
import { WEB_USER_AGENT } from "./spec/identity.js";
|
|
8
8
|
const retryAfterMs = (value) => {
|
|
9
9
|
if (!value?.trim())
|
package/dist/format-markdown.js
CHANGED
package/dist/inbox-point.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import { resolvePaths, writeSecurely } from "@wirecat/cli-
|
|
3
|
+
import { resolvePaths, writeSecurely } from "@wirecat/cli-base";
|
|
4
4
|
import { forCommand } from "./commands/context.js";
|
|
5
5
|
export const migrateInboxPoint = (command) => {
|
|
6
6
|
if (command.optsWithGlobals().offline)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { spawnSync } from "node:child_process";
|
|
2
2
|
import { dirname, join, resolve } from "node:path";
|
|
3
3
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
4
|
-
import { installSkill } from "@wirecat/cli-
|
|
4
|
+
import { installSkill } from "@wirecat/cli-base/skill";
|
|
5
5
|
import { SKILL, SKILL_APP } from "../skill.js";
|
|
6
6
|
const root = resolve(dirname(fileURLToPath(import.meta.url)), "../..");
|
|
7
7
|
export const completeGlobalInstall = ({ env = process.env, platform = process.platform, packageRoot = root, repair = (prefix) => {
|
package/dist/install.d.ts
CHANGED
package/dist/install.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { closeSync, existsSync, openSync, readSync, realpathSync } from "node:fs";
|
|
2
2
|
import { posix, win32 } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
-
import { installerOf } from "@wirecat/cli-
|
|
4
|
+
import { installerOf } from "@wirecat/cli-base/update";
|
|
5
5
|
const PACKAGE_DIR = ["node_modules", "@wirecat", "max-cli"];
|
|
6
6
|
const SCRIPT_TAIL = "max-cli/dist/bin/max.js";
|
|
7
7
|
/** This installation's `dist/bin/max.js`, through any link — what `node <script>` must be given. */
|
package/dist/mcp/photo.js
CHANGED
package/dist/mcp/resources.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ResourceTemplate } from "@modelcontextprotocol/server";
|
|
2
|
-
import { visibleControls } from "@wirecat/cli-
|
|
2
|
+
import { visibleControls } from "@wirecat/cli-base";
|
|
3
3
|
import { answerMcpTool } from "@wirecat/cli-messaging/cli";
|
|
4
4
|
import { openStore } from "@wirecat/cli-messaging/store";
|
|
5
5
|
import { SKILL_RESOURCE } from "../skill.js";
|
package/dist/mcp/server.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/server";
|
|
2
2
|
import { serveStdio } from "@modelcontextprotocol/server/stdio";
|
|
3
|
-
import { CliError } from "@wirecat/cli-
|
|
3
|
+
import { CliError } from "@wirecat/cli-base";
|
|
4
4
|
import { MCP_PATH, serveOverHttp, warmEmbedders } from "@wirecat/cli-messaging/cli";
|
|
5
5
|
import { levelFor } from "@wirecat/cli-messaging/sends";
|
|
6
6
|
import { VERSION } from "../version.js";
|
package/dist/mcp/session.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isCliError } from "@wirecat/cli-
|
|
1
|
+
import { isCliError } from "@wirecat/cli-base";
|
|
2
2
|
import { maxRecord } from "../record.js";
|
|
3
3
|
/** The caller's mistake, not the connection's — nothing about the socket is in doubt after these. */
|
|
4
4
|
const HARMLESS = new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
|
package/dist/mcp/shared.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
2
|
import { stored } from "@wirecat/cli-messaging/cli";
|
|
3
3
|
import { onlineDeps, servicesFor } from "@wirecat/cli-messaging/services";
|
|
4
4
|
import { openStore } from "@wirecat/cli-messaging/store";
|
package/dist/mcp/tools.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
2
|
import { AI_SETTING_KEYS, personalMcpCommand, personalMcpToolKey, personalMcpTools, registerPersonalMcpSurface, rememberAccount, stored, } from "@wirecat/cli-messaging/cli";
|
|
3
3
|
import { levelFor } from "@wirecat/cli-messaging/sends";
|
|
4
4
|
import { openStore } from "@wirecat/cli-messaging/store";
|
package/dist/moderation/check.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
2
|
import { ModerationRules, moderationPathFor } from "@wirecat/cli-messaging";
|
|
3
3
|
import { MAX_APP } from "../app.js";
|
|
4
4
|
export const migrateModerationPoints = (store, env = process.env) => {
|
package/dist/permissions.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
-
import { CliError } from "@wirecat/cli-
|
|
3
|
-
import { metaOf } from "@wirecat/cli-
|
|
2
|
+
import { CliError } from "@wirecat/cli-base";
|
|
3
|
+
import { metaOf } from "@wirecat/cli-base/commands";
|
|
4
4
|
import { assertStatsPermissionsCurrent, keyForCommand, levelFor, readKeysForCommand, skipFlagFor, } from "@wirecat/cli-messaging/sends";
|
|
5
5
|
import { BOT_KEYS } from "./bot/permissions.js";
|
|
6
6
|
import { readSecret } from "./session/prompt.js";
|
package/dist/profile.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
2
|
export const DEFAULT_PROFILE = "default";
|
|
3
3
|
/** How the command line names this profile: the first word, or nothing at all for the default. */
|
|
4
4
|
export const asFirstWord = (profile) => (profile === DEFAULT_PROFILE ? "" : `${profile} `);
|
package/dist/program.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAGA,OAAO,EAQL,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAGA,OAAO,EAQL,KAAK,cAAc,EAcpB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAWxC,OAAO,EAAE,KAAK,WAAW,EAAW,MAAM,uBAAuB,CAAA;AAyBjE,YAAY,EAAE,cAAc,EAAE,CAAA;AAE9B,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;CACtE;AAsGD,eAAO,MAAM,aAAa,aAAa,cAAc,KAAQ,OAAqD,CAAA;AAElH,eAAO,MAAM,GAAG,SAAgB,MAAM,EAAE,YAAW,UAAU,KAAQ,OAAO,CAAC,MAAM,CAgBlF,CAAA"}
|
package/dist/program.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { appendFileSync } from "node:fs";
|
|
2
|
-
import { CliError, processStreams } from "@wirecat/cli-
|
|
3
|
-
import { metaOf } from "@wirecat/cli-
|
|
4
|
-
import { attachmentsCommand, conversationsCommand, createProgram as createSharedProgram, floodCommand, inboxCommand, metadataCommand, pollsCommand, provide as provideShared, reactionsCommand, repliesCommand, reviewCommand, run as runShared, searchCommand, searchesCommand, storeCommand as sharedStoreCommand, statsCommand, tagsCommand, tasksCommand, } from "@wirecat/cli-messaging/cli";
|
|
2
|
+
import { CliError, processStreams } from "@wirecat/cli-base";
|
|
3
|
+
import { metaOf } from "@wirecat/cli-base/commands";
|
|
4
|
+
import { attachmentsCommand, conversationsCommand, createProgram as createSharedProgram, floodCommand, inboxCommand, metadataCommand, pollsCommand, provide as provideShared, reactionsCommand, repliesCommand, reviewCommand, run as runShared, scheduleCommand, searchCommand, searchesCommand, storeCommand as sharedStoreCommand, statsCommand, tagsCommand, tasksCommand, } from "@wirecat/cli-messaging/cli";
|
|
5
5
|
import { levelFor } from "@wirecat/cli-messaging/sends";
|
|
6
6
|
import { MAX_APP } from "./app.js";
|
|
7
7
|
import { accountCommand } from "./commands/account.js";
|
|
@@ -71,6 +71,7 @@ const definition = (options = {}) => ({
|
|
|
71
71
|
repliesCommand(maxMessenger),
|
|
72
72
|
serveCommand(),
|
|
73
73
|
serverCommand(),
|
|
74
|
+
scheduleCommand(maxMessenger),
|
|
74
75
|
watchCommand(),
|
|
75
76
|
configCommand(),
|
|
76
77
|
doctorCommand(),
|
package/dist/program.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.js","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACnD,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,IAAI,mBAAmB,EACpC,YAAY,EACZ,YAAY,EACZ,eAAe,EAGf,YAAY,EACZ,OAAO,IAAI,aAAa,EACxB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,GAAG,IAAI,SAAS,EAChB,aAAa,EACb,eAAe,EACf,YAAY,IAAI,kBAAkB,EAClC,YAAY,EACZ,WAAW,EACX,YAAY,GACb,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,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MAAM,GAAG,GAAG,MAAM,CAAC,aAAa,EAAE,CAAA;YAClC,IAAI,EAAE,CAAC,oBAAoB,CAAC,GAAG,CAAC,KAAK,KAAK,IAAI,CAAC,MAAM,CAAC,IAAI;gBAAE,SAAQ;YACpE,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC;gBAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QACrF,CAAC;IACH,CAAC;IACD,cAAc,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,CAAA;AACpF,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { styleText } from "node:util";
|
|
2
|
-
import { singleLine, visibleControls } from "@wirecat/cli-
|
|
2
|
+
import { singleLine, visibleControls } from "@wirecat/cli-base";
|
|
3
3
|
import stringWidth from "string-width";
|
|
4
4
|
import wrapAnsi from "wrap-ansi";
|
|
5
5
|
const TIME_WIDTH = 8;
|
package/dist/report.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createHash, randomBytes } from "node:crypto";
|
|
2
2
|
import { homedir } from "node:os";
|
|
3
3
|
import { basename, join } from "node:path";
|
|
4
|
-
import { CliError } from "@wirecat/cli-
|
|
4
|
+
import { CliError } from "@wirecat/cli-base";
|
|
5
5
|
import { findRun, listRuns, readEvents, runtime } from "@wirecat/cli-messaging/cli";
|
|
6
6
|
import { VERSION } from "./version.js";
|
|
7
7
|
/** Where problem reports go (`NEED-267`, changed by the owner to issues). Anybody can read them there. */
|
package/dist/sends.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
2
|
import { currentOperation, keyForWrite, levelFor, newOperationId, RecipientList, SendJournal, sendGuard, recipientsPathFor as sharedRecipientsPath, sendsPathFor as sharedSendsPath, } from "@wirecat/cli-messaging/sends";
|
|
3
3
|
import { MAX_APP } from "./app.js";
|
|
4
4
|
import { setCommandFor } from "./config.js";
|
package/dist/server/replies.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
2
|
import { NO_RULES, openRequestTask, repliesPathFor, repliesStatePathFor, replyRenderer, replyTo, senderFacts, } from "@wirecat/cli-messaging/cli";
|
|
3
3
|
import { guardedWrite, levelFor } from "@wirecat/cli-messaging/sends";
|
|
4
4
|
import { openStore } from "@wirecat/cli-messaging/store";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { connect } from "node:net";
|
|
3
|
-
import { CliError, errorCodes } from "@wirecat/cli-
|
|
3
|
+
import { CliError, errorCodes } from "@wirecat/cli-base";
|
|
4
4
|
import { currentOperation } from "@wirecat/cli-messaging/sends";
|
|
5
5
|
import { Opcode } from "../generated/opcodes.generated.js";
|
|
6
6
|
import { OPERATIONS } from "../generated/operations.generated.js";
|
package/dist/server/server.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { chmodSync, mkdirSync, rmSync } from "node:fs";
|
|
2
2
|
import { connect, createServer } from "node:net";
|
|
3
3
|
import { dirname } from "node:path";
|
|
4
|
-
import { CliError } from "@wirecat/cli-
|
|
4
|
+
import { CliError } from "@wirecat/cli-base";
|
|
5
5
|
import * as v from "valibot";
|
|
6
6
|
import { FIRST_TAB_SYNC, isJoinRequest, MaxClient, } from "../client.js";
|
|
7
7
|
import { resolveSettings } from "../config.js";
|
package/dist/server/subscribe.js
CHANGED
package/dist/session/adopt.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { SessionStore } from "./store.js";
|
|
|
8
8
|
* is that a typo, an expired token or a browser tab that has been closed replaces a *working*
|
|
9
9
|
* credential with a dead one. There is no way back: `Credentials.write` overwrites unconditionally
|
|
10
10
|
* and a keyring entry cannot be read out again afterwards. The same shape destroyed two working
|
|
11
|
-
* keys in `brazecli` on 2026-09-14 — `cli-
|
|
11
|
+
* keys in `brazecli` on 2026-09-14 — `cli-base`'s own `credentials.ts` says so.
|
|
12
12
|
*
|
|
13
13
|
* Restoring the old token after a failed login was the obvious alternative and is worse: a process
|
|
14
14
|
* killed between the write and the restore leaves the profile broken. Here nothing is written until
|
package/dist/session/adopt.js
CHANGED
|
@@ -8,7 +8,7 @@ import { refusedPath } from "../server/start.js";
|
|
|
8
8
|
* is that a typo, an expired token or a browser tab that has been closed replaces a *working*
|
|
9
9
|
* credential with a dead one. There is no way back: `Credentials.write` overwrites unconditionally
|
|
10
10
|
* and a keyring entry cannot be read out again afterwards. The same shape destroyed two working
|
|
11
|
-
* keys in `brazecli` on 2026-09-14 — `cli-
|
|
11
|
+
* keys in `brazecli` on 2026-09-14 — `cli-base`'s own `credentials.ts` says so.
|
|
12
12
|
*
|
|
13
13
|
* Restoring the old token after a failed login was the obvious alternative and is worse: a process
|
|
14
14
|
* killed between the write and the restore leaves the profile broken. Here nothing is written until
|
package/dist/session/browser.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createServer } from "node:http";
|
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
6
6
|
import { delimiter, join } from "node:path";
|
|
7
7
|
import { setTimeout as delay } from "node:timers/promises";
|
|
8
|
-
import { CliError } from "@wirecat/cli-
|
|
8
|
+
import { CliError } from "@wirecat/cli-base";
|
|
9
9
|
import qrcode from "qrcode-generator";
|
|
10
10
|
export const realBrowser = {
|
|
11
11
|
open: (url) => openUrl(url),
|
package/dist/session/login.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setTimeout as delay } from "node:timers/promises";
|
|
2
|
-
import { CliError } from "@wirecat/cli-
|
|
2
|
+
import { CliError } from "@wirecat/cli-base";
|
|
3
3
|
/**
|
|
4
4
|
* The login MAX's web client does itself when it shows a QR code: ask for a code, wait until a phone
|
|
5
5
|
* approves it, then exchange it for a token. Shapes from PyMax 2.4.1 (`auth/qr.py`), not measured.
|
package/dist/session/store.d.ts
CHANGED
package/dist/session/store.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createHash, randomUUID } from "node:crypto";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
|
-
import { Credentials, pathsAreOverridden, resolvePaths, writeSecurely, } from "@wirecat/cli-
|
|
4
|
+
import { Credentials, pathsAreOverridden, resolvePaths, writeSecurely, } from "@wirecat/cli-base";
|
|
5
5
|
/**
|
|
6
6
|
* **How long a profile stays out after each refusal in a row** (owner, `NEED-265`). In PyMax a
|
|
7
7
|
* login retried after the limit error kept the account locked (PyMax #106), so the wait grows.
|
package/dist/skill.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type SkillApp } from "@wirecat/cli-
|
|
1
|
+
import { type SkillApp } from "@wirecat/cli-base/skill";
|
|
2
2
|
/** Beside `dist/` in the package and in a checkout alike, so the skill is always this version's. */
|
|
3
3
|
export declare const SKILL: import("url").URL;
|
|
4
4
|
export declare const SKILL_APP: SkillApp;
|
|
5
5
|
/** `max://skill` for both MCP servers, and the line their instructions end with. */
|
|
6
|
-
export declare const SKILL_RESOURCE: import("@wirecat/cli-
|
|
6
|
+
export declare const SKILL_RESOURCE: import("@wirecat/cli-base/skill").SkillResource;
|
|
7
7
|
//# sourceMappingURL=skill.d.ts.map
|
package/dist/skill.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { skillResource } from "@wirecat/cli-
|
|
1
|
+
import { skillResource } from "@wirecat/cli-base/skill";
|
|
2
2
|
import { VERSION } from "./version.js";
|
|
3
3
|
/** Beside `dist/` in the package and in a checkout alike, so the skill is always this version's. */
|
|
4
4
|
export const SKILL = new URL("../skills/max-cli/SKILL.md", import.meta.url);
|
package/dist/spec/define.js
CHANGED
package/dist/spec/guards.js
CHANGED
package/dist/transcribe/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
2
|
import { fetchBytes, LARGEST_VOICE } from "../download.js";
|
|
3
3
|
import { installedBytes, isInstalled, megabytes, modelPath, vadPath } from "./install.js";
|
|
4
4
|
import { MODELS, VAD } from "./models.js";
|
package/dist/update.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FetchLike } from "@wirecat/cli-
|
|
2
|
-
import { type Installer } from "@wirecat/cli-
|
|
1
|
+
import type { FetchLike } from "@wirecat/cli-base/http";
|
|
2
|
+
import { type Installer } from "@wirecat/cli-base/update";
|
|
3
3
|
export declare const PACKAGE = "@wirecat/max-cli";
|
|
4
4
|
/** npm, the clock, the terminal and the package manager as `max upgrade` sees them — faked in a test. */
|
|
5
5
|
export interface UpdateEnvironment {
|
package/dist/update.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { realpathSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
-
import { resolvePaths } from "@wirecat/cli-
|
|
5
|
-
import { skillHint as sharedSkillHint } from "@wirecat/cli-
|
|
6
|
-
import { installerOf, latestVersion, runUpdate as runPackageManager, updateNotice as sharedNotice, } from "@wirecat/cli-
|
|
4
|
+
import { resolvePaths } from "@wirecat/cli-base";
|
|
5
|
+
import { skillHint as sharedSkillHint } from "@wirecat/cli-base/skill";
|
|
6
|
+
import { installerOf, latestVersion, runUpdate as runPackageManager, updateNotice as sharedNotice, } from "@wirecat/cli-base/update";
|
|
7
7
|
import { resolveSettings } from "./config.js";
|
|
8
8
|
import { SKILL_APP } from "./skill.js";
|
|
9
9
|
import { VERSION } from "./version.js";
|
|
@@ -26,7 +26,7 @@ export const updateNotice = (argv, { tty, environment = {}, env = process.env, }
|
|
|
26
26
|
if (argv.includes("upgrade"))
|
|
27
27
|
return Promise.resolve(undefined);
|
|
28
28
|
const pretty = !argv.includes("--json") && !argv.includes("--jsonl") && (tty ?? process.stdout.isTTY === true);
|
|
29
|
-
// cli-
|
|
29
|
+
// cli-base names the command `update`; it is `upgrade` here (CONVENTIONS, "Command names").
|
|
30
30
|
return sharedNotice({
|
|
31
31
|
argv,
|
|
32
32
|
packageName: PACKAGE,
|
package/dist/upload.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { realpathSync } from "node:fs";
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import { basename, extname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
4
|
-
import { CliError, resolvePaths } from "@wirecat/cli-
|
|
4
|
+
import { CliError, resolvePaths } from "@wirecat/cli-base";
|
|
5
5
|
import { WEB_USER_AGENT } from "./spec/identity.js";
|
|
6
6
|
const HEADERS = {
|
|
7
7
|
"User-Agent": WEB_USER_AGENT.headerUserAgent,
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.48.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "0.
|
|
1
|
+
export const VERSION = "0.48.0";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/dist/voice.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/max-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.0",
|
|
4
4
|
"description": "MAX Messenger bots through the official Bot API, and a personal MAX account, from the terminal — built for agents and scripts",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Viacheslav Ptsarev",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"LICENSE"
|
|
25
25
|
],
|
|
26
26
|
"scripts": {
|
|
27
|
-
"build": "tsc --build",
|
|
27
|
+
"build": "tsc --build --force",
|
|
28
28
|
"generate": "node --experimental-strip-types scripts/bot/generate.ts && pnpm build && node --experimental-strip-types scripts/generate.ts && node --experimental-strip-types scripts/commands.ts",
|
|
29
29
|
"bot:spec:sync": "node --experimental-strip-types scripts/bot/sync-spec.ts",
|
|
30
30
|
"bot:generate": "node --experimental-strip-types scripts/bot/generate.ts",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"@modelcontextprotocol/server": "2.1.0",
|
|
100
100
|
"@msgpack/msgpack": "3.1.3",
|
|
101
101
|
"@valibot/to-json-schema": "1.8.0",
|
|
102
|
-
"@wirecat/cli-
|
|
103
|
-
"@wirecat/cli-messaging": "0.
|
|
102
|
+
"@wirecat/cli-base": "0.21.0",
|
|
103
|
+
"@wirecat/cli-messaging": "0.253.0",
|
|
104
104
|
"commander": "15.0.0",
|
|
105
105
|
"lossless-json": "4.3.1",
|
|
106
106
|
"ogg-opus-decoder": "1.7.5",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"string-width": "8.3.0",
|
|
110
110
|
"valibot": "1.5.0",
|
|
111
111
|
"wrap-ansi": "10.0.2",
|
|
112
|
-
"ws": "8.
|
|
112
|
+
"ws": "8.22.0"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
115
|
"@biomejs/biome": "2.5.15",
|
|
@@ -117,15 +117,15 @@
|
|
|
117
117
|
"@cspell/dict-es-es": "3.0.9",
|
|
118
118
|
"@cspell/dict-ru_ru": "2.3.3",
|
|
119
119
|
"@modelcontextprotocol/client": "~2.2.0",
|
|
120
|
-
"@napi-rs/canvas": "1.0.
|
|
120
|
+
"@napi-rs/canvas": "1.0.11",
|
|
121
121
|
"@types/node": "^22.20.4",
|
|
122
|
-
"@types/ws": "^8.18.
|
|
122
|
+
"@types/ws": "^8.18.2",
|
|
123
123
|
"@vitest/coverage-v8": "^5.0.3",
|
|
124
|
-
"@wirecat/cli-testing": "0.
|
|
124
|
+
"@wirecat/cli-testing": "0.4.0",
|
|
125
125
|
"cspell": "10.3.6",
|
|
126
126
|
"lefthook": "2.1.16",
|
|
127
127
|
"markdownlint-cli2": "0.23.3",
|
|
128
|
-
"rumdl": "^0.2.
|
|
128
|
+
"rumdl": "^0.2.79",
|
|
129
129
|
"typescript": "^7.0.2",
|
|
130
130
|
"unpdf": "1.8.1",
|
|
131
131
|
"vitest": "^5.0.3",
|
package/skills/max-cli/SKILL.md
CHANGED
|
@@ -304,7 +304,7 @@ max messages transcribe -1000 100000000000000001 --json # текст голо
|
|
|
304
304
|
stdout — только данные, в той же форме, что у личного аккаунта; id больше 2^53 приходит строкой.
|
|
305
305
|
Все методы официальной схемы Bot API доступны, включая операции вне удобных команд:
|
|
306
306
|
`max <имя> bot api <операция>`; её флаги —
|
|
307
|
-
`max commands --json`. Генераторы cli-
|
|
307
|
+
`max commands --json`. Генераторы cli-base и конструктор native API общие с Telegram:
|
|
308
308
|
`--body`, `--body-file` и stdin для JSON, `--poll-timeout` для нативного ожидания,
|
|
309
309
|
`--timeout` для дедлайна команды. `--store-token <profile>` недоступен для текущих методов
|
|
310
310
|
MAX: все они отклоняют его до выполнения операции.
|