@wirecat/cli-core 0.736.0 → 0.737.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/CHANGELOG.md +18 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +1 -0
- package/dist/cli/setup-command.js +3 -2
- package/dist/cli/token-session.d.ts +5 -0
- package/dist/cli/token-session.js +8 -2
- package/dist/setup/plain.d.ts +6 -0
- package/dist/setup/plain.js +9 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@ Notable changes to `@wirecat/cli-core` (`@wirecat/cli-messaging` up to 0.261.0,
|
|
|
5
5
|
minor version may break callers, and says how under "Changed — may break callers". `pnpm docs:check` checks the
|
|
6
6
|
shape of this file.
|
|
7
7
|
|
|
8
|
+
## 0.737.0 — 23.11.2026
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **`tokenSessionCommand` takes a `guide`**: how a person who never made one gets the token, step by step with its
|
|
13
|
+
links. `session start` prints it before the question at a terminal and at the end of `session start --help`, never
|
|
14
|
+
before piped input.
|
|
15
|
+
- **`plainSetupText`**: a setup text for a terminal, with `**`, code marks and `[words](link)` turned into plain words
|
|
16
|
+
and the address. The terminal walk-through `<profile> setup` shows its texts that way, so a person no longer sees
|
|
17
|
+
raw Markdown.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- **A release passes parity again while four CLIs adopt `schedule exec` leaving MCP.** #3258 stopped offering
|
|
22
|
+
`schedule exec` to agents; cli-memo, mail-cli and bitrix24-cli test that it is offered, and max-cli's docs/mcp.md
|
|
23
|
+
does not list it among the commands kept off MCP. They are on the parity known-broken list until 2026-11-30 and
|
|
24
|
+
update those tests and docs when they bump cli-core.
|
|
25
|
+
|
|
8
26
|
## 0.736.0 — 23.11.2026
|
|
9
27
|
|
|
10
28
|
### Added
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export { openRequestTask } from "../services/task-rules.js";
|
|
|
48
48
|
export { TASK_PAIR_QUERY, TASK_QUERY } from "../services/tasks.js";
|
|
49
49
|
export { defineSetup, type Setup, type SetupCheck, type SetupCheckInput, type SetupDefinition, type SetupKeep, setupProblems, } from "../setup/define.js";
|
|
50
50
|
export { type Asset as SetupAsset, BLOCK_ROLES, BLOCK_TYPES, type Block as SetupBlock, BUILT_IN_ACTIONS, type Condition as SetupCondition, DISPLAY_CLASSES, INPUT_KINDS, SETUP_FORMAT, SETUP_LIMITS, SETUP_PATTERNS, SETUP_VERSION, type SetupDocument, type Step as SetupStep, setupDocumentSchema, setupJsonSchema, } from "../setup/document.js";
|
|
51
|
+
export { plainSetupText } from "../setup/plain.js";
|
|
51
52
|
export { answerStdinOption, type Need, type SignInSteps, type SignInStepsOptions, signInSteps, } from "../terminal/sign-in-steps.js";
|
|
52
53
|
export { type AccountRemoval, type AccountRemovalContext, type AccountRemoveOptions, type AccountSecrets, accountRemoveCommand, mayRevoke, type SignedOut, } from "./account-remove.js";
|
|
53
54
|
export { type AccountRenameOptions, type AccountRenaming, accountRenameCommand } from "./account-rename.js";
|
package/dist/cli/index.js
CHANGED
|
@@ -43,6 +43,7 @@ export { openRequestTask } from "../services/task-rules.js";
|
|
|
43
43
|
export { TASK_PAIR_QUERY, TASK_QUERY } from "../services/tasks.js";
|
|
44
44
|
export { defineSetup, setupProblems, } from "../setup/define.js";
|
|
45
45
|
export { BLOCK_ROLES, BLOCK_TYPES, BUILT_IN_ACTIONS, DISPLAY_CLASSES, INPUT_KINDS, SETUP_FORMAT, SETUP_LIMITS, SETUP_PATTERNS, SETUP_VERSION, setupDocumentSchema, setupJsonSchema, } from "../setup/document.js";
|
|
46
|
+
export { plainSetupText } from "../setup/plain.js";
|
|
46
47
|
export { answerStdinOption, signInSteps, } from "../terminal/sign-in-steps.js";
|
|
47
48
|
export { accountRemoveCommand, mayRevoke, } from "./account-remove.js";
|
|
48
49
|
export { accountRenameCommand } from "./account-rename.js";
|
|
@@ -5,6 +5,7 @@ import { Command } from "commander";
|
|
|
5
5
|
import { agentOf } from "../runs/run-context.js";
|
|
6
6
|
import { checkField, holds, nextOf, walk, } from "../setup/answers.js";
|
|
7
7
|
import { SETUP_LIMITS } from "../setup/document.js";
|
|
8
|
+
import { plainSetupText } from "../setup/plain.js";
|
|
8
9
|
import { answerStdinOption, lineReader, signInSteps } from "../terminal/sign-in-steps.js";
|
|
9
10
|
import { refuseGuardedKey } from "./config-command.js";
|
|
10
11
|
import { baseContext, environmentOf, secretInputOf } from "./context.js";
|
|
@@ -264,7 +265,7 @@ export const setupCommand = (setup) => {
|
|
|
264
265
|
const text = (id, params = {}) => id === undefined
|
|
265
266
|
? ""
|
|
266
267
|
: (document.texts[language]?.[id] ?? document.texts.en[id] ?? id).replace(/\{([a-z][a-z0-9_]*)\}/g, (all, name) => params[name] ?? all);
|
|
267
|
-
const say = (line) => renderer.note(line);
|
|
268
|
+
const say = (line) => renderer.note(plainSetupText(line));
|
|
268
269
|
const environment = environmentOf(command);
|
|
269
270
|
const input = secretInputOf(command);
|
|
270
271
|
const ask = async (prompt, hidden) => {
|
|
@@ -361,7 +362,7 @@ export const setupCommand = (setup) => {
|
|
|
361
362
|
say(`\n${text(block.text, block.params)}`);
|
|
362
363
|
break;
|
|
363
364
|
case "code":
|
|
364
|
-
|
|
365
|
+
renderer.note(` ${block.code}`);
|
|
365
366
|
break;
|
|
366
367
|
case "image":
|
|
367
368
|
if (block.caption)
|
|
@@ -47,6 +47,11 @@ export interface TokenSessionOptions {
|
|
|
47
47
|
token?: string;
|
|
48
48
|
/** One sentence more for `session start --help`: which token, and what it can see. */
|
|
49
49
|
about?: string;
|
|
50
|
+
/**
|
|
51
|
+
* How a person who never made one gets the token: the steps and their links, in plain words. `session start` prints
|
|
52
|
+
* it before the question at a terminal, and `session start --help` ends with it.
|
|
53
|
+
*/
|
|
54
|
+
guide?: string;
|
|
50
55
|
/** One sentence more for `session end --help`, such as what of the service's own tools it leaves alone. */
|
|
51
56
|
endNote?: string;
|
|
52
57
|
}
|
|
@@ -74,6 +74,8 @@ export const tokenSessionCommand = (options) => {
|
|
|
74
74
|
`checked with ${service}, and only then kept in the keyring, or in a private file` +
|
|
75
75
|
(options.about ? `. ${options.about}` : ""))
|
|
76
76
|
.option("--credential-storage <storage>", "where the token is kept: keyring, which falls back to a private file by itself, or file", storageOf, "keyring");
|
|
77
|
+
if (options.guide)
|
|
78
|
+
start.addHelpText("after", `\n${options.guide}`);
|
|
77
79
|
if (options.login)
|
|
78
80
|
start.option("--login <name>", `the ${service} user name the password belongs to`);
|
|
79
81
|
if (options.site)
|
|
@@ -94,8 +96,12 @@ export const tokenSessionCommand = (options) => {
|
|
|
94
96
|
const page = options.login?.page?.(site);
|
|
95
97
|
const input = secretInputOf(this).input ?? process.stdin;
|
|
96
98
|
// Only a person at a terminal pastes it; piped in, the note would stand before the answer on stderr.
|
|
97
|
-
if (
|
|
98
|
-
|
|
99
|
+
if (input.isTTY) {
|
|
100
|
+
if (options.guide)
|
|
101
|
+
renderer.note(options.guide);
|
|
102
|
+
if (page)
|
|
103
|
+
renderer.note(`the ${word} of ${login}: make one at ${page}, then paste it here`);
|
|
104
|
+
}
|
|
99
105
|
// A secret is never an argument: it would land in shell history and in the run record (WC-SECR-5).
|
|
100
106
|
const secret = (await readSecret(`${service} ${word}: `, secretInputOf(this))).trim();
|
|
101
107
|
if (!secret)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A setup text for a terminal: Desktop draws its restricted Markdown, a terminal shows `**`, backticks and `[…](…)`
|
|
3
|
+
* as typed. Bold and code lose their marks, and a link keeps its address beside its words, since the address is what
|
|
4
|
+
* a person copies. Single `*` and `_` stay: in plain text they are as often a product or a name as italics.
|
|
5
|
+
*/
|
|
6
|
+
export declare const plainSetupText: (text: string) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A setup text for a terminal: Desktop draws its restricted Markdown, a terminal shows `**`, backticks and `[…](…)`
|
|
3
|
+
* as typed. Bold and code lose their marks, and a link keeps its address beside its words, since the address is what
|
|
4
|
+
* a person copies. Single `*` and `_` stay: in plain text they are as often a product or a name as italics.
|
|
5
|
+
*/
|
|
6
|
+
export const plainSetupText = (text) => text
|
|
7
|
+
.replace(/\[([^\]\n]*)\]\(([^)\s]*)\)/g, (_all, label, href) => !label || [href, href.replace(/^https:\/\//, "")].includes(label) ? href : `${label} (${href})`)
|
|
8
|
+
.replace(/\*\*([^*\n]+)\*\*/g, "$1")
|
|
9
|
+
.replace(/`([^`\n]+)`/g, "$1");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.737.0",
|
|
4
4
|
"description": "The messenger-neutral half of a messaging CLI: domain model, message locators, rendering, name resolution, the SQLite seam, the command skeleton and shared read commands, the send guard, run records and the message store",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Viacheslav Ptsarev",
|