@lmzhen/dsh-evolution-commands 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/lib/index.js +466 -384
- package/lib/types/command-fallback.d.ts +2 -2
- package/lib/types/doctor-view.d.ts +11 -3
- package/lib/types/doctor.d.ts +2 -8
- package/lib/types/generated/host-commands.d.ts +8 -8
- package/lib/types/host-command-defs.d.ts +7 -0
- package/lib/types/params.d.ts +0 -25
- package/lib/types/parse.d.ts +0 -19
- package/lib/types/registry.d.ts +8 -13
- package/package.json +6 -6
- package/lib/types/settings-route.d.ts +0 -27
|
@@ -15,8 +15,8 @@ export interface CommandFallbackHint {
|
|
|
15
15
|
readonly command: string;
|
|
16
16
|
readonly platformCli?: string;
|
|
17
17
|
}
|
|
18
|
-
/** The
|
|
19
|
-
export type CommandFallbackSurface = 'approval' | 'skill-history' | 'skill-health' | 'merge' | 'diagnostics'
|
|
18
|
+
/** The five Host surfaces (keyed exactly like the frozen `COMMAND_FALLBACK_SURFACES`). */
|
|
19
|
+
export type CommandFallbackSurface = 'approval' | 'skill-history' | 'skill-health' | 'merge' | 'diagnostics';
|
|
20
20
|
/**
|
|
21
21
|
* One entry per Host surface. The command column names the same service methods the routes call,
|
|
22
22
|
* so the answers (and refusal sentences) match the panel.
|
|
@@ -10,8 +10,17 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { Context } from '@deepseek-ai/cordis';
|
|
12
12
|
import { type ChannelState, type DiagnosticsView } from '@lmzhen/dsh-evolution-core';
|
|
13
|
-
/** The install form the running profile was classified as (
|
|
14
|
-
export type InstallFormId = '
|
|
13
|
+
/** The install form the running profile was classified as (the seven values DoctorReport uses). */
|
|
14
|
+
export type InstallFormId = 'full' | 'human-gated' | 'preset' | 'host' | 'layered' | 'preset-only' | 'none';
|
|
15
|
+
/** The ONE install-form decision; callers only supply the facts their detection read. */
|
|
16
|
+
export declare function classifyInstallForm(input: {
|
|
17
|
+
readonly full: boolean;
|
|
18
|
+
readonly preset: boolean;
|
|
19
|
+
readonly host: boolean;
|
|
20
|
+
readonly humanGated: boolean;
|
|
21
|
+
readonly layeredPreset: boolean;
|
|
22
|
+
readonly presetDirInstalled: boolean;
|
|
23
|
+
}): InstallFormId;
|
|
15
24
|
/** One preset's probe result (reviewer/maintainer). */
|
|
16
25
|
export interface PresetFacts {
|
|
17
26
|
readonly registered: boolean;
|
|
@@ -59,7 +68,6 @@ export interface DoctorInputs {
|
|
|
59
68
|
readonly orphaned: number;
|
|
60
69
|
};
|
|
61
70
|
readonly missingServices?: readonly string[] | undefined;
|
|
62
|
-
readonly sessionFoldClassifierPresent?: boolean | undefined;
|
|
63
71
|
readonly platformPairing?: PlatformPairing | undefined;
|
|
64
72
|
/** Human-facing total of registered host routes, when the carrier reports one (12 today). */
|
|
65
73
|
readonly hostRouteCount?: {
|
package/lib/types/doctor.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { HostLocale } from '@lmzhen/dsh-evolution-core';
|
|
2
2
|
import { type PlatformServiceProbe, type ScopedProbeReport } from '@lmzhen/dsh-evolution-core';
|
|
3
3
|
import type { DiagnosticsView } from '@lmzhen/dsh-evolution-core';
|
|
4
|
+
import { type InstallFormId } from './doctor-view.ts';
|
|
4
5
|
import type { MountedProfile } from './profiles.ts';
|
|
5
6
|
/** P2-20 (audit): the TS-side copy of the install-target tails. The script
|
|
6
7
|
* side (install-layered.mjs, verify-profile-bundles.mjs) imports the list
|
|
@@ -74,14 +75,7 @@ export interface DoctorReport {
|
|
|
74
75
|
* per-session install reported `none` and the action ladder advised
|
|
75
76
|
* installing `all` — which double-mounts the preset's model rows (the
|
|
76
77
|
* exact conflict this report flags). */
|
|
77
|
-
installForm:
|
|
78
|
-
/** The PRODUCT form the install form implies (0.3.77, C axis). `variant` =
|
|
79
|
-
* session-level opt-in: the model tools live in the Evolution preset, so a
|
|
80
|
-
* session on any platform original preset carries none of the family and the
|
|
81
|
-
* cross-session consumers skip it (config `sessionScoped`). `attach` =
|
|
82
|
-
* profile-level: the model rows sit at profile root and every session carries
|
|
83
|
-
* them. The two are mutually exclusive install targets (E-33). */
|
|
84
|
-
deploymentForm: 'variant' | 'attach' | 'host-only' | 'preset-only' | 'none';
|
|
78
|
+
installForm: InstallFormId;
|
|
85
79
|
/** Aggregated across ALL profiles under `home` (N13, v12): doctor answers
|
|
86
80
|
* "is any profile carrying an evolution bundle / which install forms exist"
|
|
87
81
|
* — not "what this runtime mounted". `services.review` is the runtime-side
|
|
@@ -463,14 +463,14 @@ export declare const HOST_COMMANDS: {
|
|
|
463
463
|
readonly pt: "atualizado — uma nova geração corresponde byte a byte a este arquivo";
|
|
464
464
|
};
|
|
465
465
|
readonly "doctor.presetDiffers": {
|
|
466
|
-
readonly zh: "与最新生成不同 —
|
|
467
|
-
readonly en: "DIFFERS from a fresh generation — it is an install-time snapshot; re-run the installer (/
|
|
468
|
-
readonly ja: "最新の生成結果と異なります —
|
|
469
|
-
readonly es: "DIFIERE de una generación nueva — es una instantánea del momento de instalar; vuelve a ejecutar el instalador (/
|
|
470
|
-
readonly fr: "DIFFÈRE d’une nouvelle génération — c’est un instantané de l’installation ; relancez l’installateur (/
|
|
471
|
-
readonly de: "WEICHT von einer neuen Erzeugung ab — es ist ein Installations-Snapshot; Installer erneut ausführen (/
|
|
472
|
-
readonly ru: "ОТЛИЧАЕТСЯ от новой генерации — это снимок на момент установки; запустите установщик повторно (/
|
|
473
|
-
readonly pt: "DIFERE de uma nova geração — é um instantâneo do momento da instalação; execute o instalador novamente (/
|
|
466
|
+
readonly zh: "与最新生成不同 — 这是安装时快照;重新运行安装器(all/host)以重新生成";
|
|
467
|
+
readonly en: "DIFFERS from a fresh generation — it is an install-time snapshot; re-run the installer (all/host) to regenerate";
|
|
468
|
+
readonly ja: "最新の生成結果と異なります — インストール時のスナップショットです。インストーラー(all/host)を再実行して再生成してください";
|
|
469
|
+
readonly es: "DIFIERE de una generación nueva — es una instantánea del momento de instalar; vuelve a ejecutar el instalador (all/host) para regenerarla";
|
|
470
|
+
readonly fr: "DIFFÈRE d’une nouvelle génération — c’est un instantané de l’installation ; relancez l’installateur (all/host) pour la régénérer";
|
|
471
|
+
readonly de: "WEICHT von einer neuen Erzeugung ab — es ist ein Installations-Snapshot; Installer erneut ausführen (all/host), um ihn neu zu erzeugen";
|
|
472
|
+
readonly ru: "ОТЛИЧАЕТСЯ от новой генерации — это снимок на момент установки; запустите установщик повторно (all/host)";
|
|
473
|
+
readonly pt: "DIFERE de uma nova geração — é um instantâneo do momento da instalação; execute o instalador novamente (all/host)";
|
|
474
474
|
};
|
|
475
475
|
readonly "doctor.presetUnknown": {
|
|
476
476
|
readonly zh: "未知 — 无法重新生成({detail})";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Typed host-command definitions: one source for help, surface and dispatch. */
|
|
2
|
+
import type { CommandDef } from './command-catalog.ts';
|
|
3
|
+
export interface HostCommandDef extends CommandDef {
|
|
4
|
+
readonly usageLine: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const HOST_COMMAND_DEFS: readonly HostCommandDef[];
|
|
7
|
+
//# sourceMappingURL=host-command-defs.d.ts.map
|
package/lib/types/params.d.ts
CHANGED
|
@@ -55,31 +55,6 @@ export declare function paramGroups(entries?: readonly ParamExposure[]): string[
|
|
|
55
55
|
export declare function renderParamRows(rows: readonly ParamSurfaceRow[], options: {
|
|
56
56
|
providerMounted: boolean;
|
|
57
57
|
}): string;
|
|
58
|
-
/**
|
|
59
|
-
* Parse one command-line value into what the settings document stores: JSON
|
|
60
|
-
* when it parses (numbers, booleans, quoted strings, arrays, objects), the raw
|
|
61
|
-
* text otherwise, so a bare word like `enforce` stays a word.
|
|
62
|
-
* @param raw - the text typed after the parameter id.
|
|
63
|
-
* @returns the value to write.
|
|
64
|
-
*/
|
|
65
|
-
export declare function parseParamValue(raw: string): unknown;
|
|
66
|
-
/** One accepted write, as the command echoes it back. */
|
|
67
|
-
export interface ParamWriteEcho {
|
|
68
|
-
id: string;
|
|
69
|
-
namespace: string;
|
|
70
|
-
applies: ParamExposure['applies'];
|
|
71
|
-
before: unknown;
|
|
72
|
-
after: unknown;
|
|
73
|
-
/** Whether the user section already carried this key. */
|
|
74
|
-
wasOverridden: boolean;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Render the write result: the value move, then where it landed and when it
|
|
78
|
-
* takes effect (the two things a caller cannot infer from the command line).
|
|
79
|
-
* @param write - the accepted write.
|
|
80
|
-
* @returns the command text.
|
|
81
|
-
*/
|
|
82
|
-
export declare function renderPolicySet(write: ParamWriteEcho): string;
|
|
83
58
|
/**
|
|
84
59
|
* Render the rows as JSON for scripts (same fields, no formatting).
|
|
85
60
|
* @param rows - rows from {@link paramSurfaceRows}.
|
package/lib/types/parse.d.ts
CHANGED
|
@@ -13,12 +13,6 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @module @lmzhen/dsh-evolution-commands/parse
|
|
15
15
|
*/
|
|
16
|
-
/** The flags whose declared form takes a value (`--group <name>`, `--expect <revision>`, …). */
|
|
17
|
-
/**
|
|
18
|
-
* Exported so the command-table gate can tie it to the table's usage lines (P2: two declarations of
|
|
19
|
-
* "which flags take a value" would otherwise be free to drift apart).
|
|
20
|
-
*/
|
|
21
|
-
export declare const VALUE_FLAGS: readonly string[];
|
|
22
16
|
/** One parsed command line. */
|
|
23
17
|
export interface ParsedCommand {
|
|
24
18
|
/** The subcommand name, lower-cased (the table stores it lower-case too). */
|
|
@@ -43,19 +37,6 @@ export interface ParseFailure {
|
|
|
43
37
|
* @returns whether the line was refused.
|
|
44
38
|
*/
|
|
45
39
|
export declare function isParseFailure(result: ParsedCommand | ParseFailure): result is ParseFailure;
|
|
46
|
-
/**
|
|
47
|
-
* Read one SUB-FORM line: `maintain status`, `maintain report`, … — the shape the regexes used to own.
|
|
48
|
-
*
|
|
49
|
-
* A sub-form matches only when: the line parses, the name matches, the first positional is the sub-form,
|
|
50
|
-
* and every flag the line carries is DECLARED by the table (an undeclared flag keeps the old
|
|
51
|
-
* "unknown arguments" answer instead of silently becoming a bare flag).
|
|
52
|
-
* @param input - the text after `/evolution`.
|
|
53
|
-
* @param name - the subcommand name the table declares (e.g. `maintain`).
|
|
54
|
-
* @param sub - the sub-form word (e.g. `status`).
|
|
55
|
-
* @param declaredFlags - the flags the table declares for `name` (`flagsOf(name)`).
|
|
56
|
-
* @returns the parsed command, or null when this line is not that sub-form.
|
|
57
|
-
*/
|
|
58
|
-
export declare function subcommandOf(input: string, name: string, sub: string, declaredFlags: readonly string[]): ParsedCommand | null;
|
|
59
40
|
/**
|
|
60
41
|
* Parse one command line into its name, flags and positionals.
|
|
61
42
|
* @param input - the text after `/evolution`.
|
package/lib/types/registry.d.ts
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import type { HostLocale } from '@lmzhen/dsh-evolution-core';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/** C7: true when the subcommand only READS (no skill/param write). Stored: not derivable. */
|
|
6
|
-
readonly: boolean;
|
|
7
|
-
/** One-line purpose rendered in the help output. */
|
|
8
|
-
summary: string;
|
|
9
|
-
}
|
|
10
|
-
/** The flags the TABLE declares for one subcommand (name → `--flag`), DERIVED from its usage. */
|
|
2
|
+
import { type HostCommandDef } from './host-command-defs.ts';
|
|
3
|
+
export { HOST_COMMAND_DEFS } from './host-command-defs.ts';
|
|
4
|
+
/** The flags the TABLE declares for one subcommand (name → `--flag`). */
|
|
11
5
|
export declare function flagsOf(name: string): string[];
|
|
12
6
|
/**
|
|
13
7
|
* C7 shape, DERIVED: the entry IDENTITY key, and it is HIERARCHICAL (E-08).
|
|
@@ -19,10 +13,9 @@ export declare function flagsOf(name: string): string[];
|
|
|
19
13
|
* still resolve: the one call site that named an entry by a name the key no longer produced was the preset
|
|
20
14
|
* dispatch branch, and it now asks for the entry own key (`preset install`).
|
|
21
15
|
*/
|
|
22
|
-
export declare function entryName(entry:
|
|
23
|
-
/**
|
|
24
|
-
export declare function
|
|
25
|
-
export declare const COMMAND_ENTRIES: CommandEntry[];
|
|
16
|
+
export declare function entryName(entry: HostCommandDef): string;
|
|
17
|
+
/** The one summary source: the generated command i18n catalog. */
|
|
18
|
+
export declare function summaryOf(entry: HostCommandDef, locale?: HostLocale): string;
|
|
26
19
|
/** The input-declaration hint (single line, ` | `-separated). */
|
|
27
20
|
export declare function renderHint(): string;
|
|
28
21
|
/** The bare `/evolution` help body (one line per subcommand). */
|
|
@@ -30,4 +23,6 @@ export declare function renderHelpText(locale?: HostLocale): string;
|
|
|
30
23
|
/** Markdown command table fragment for README surfaces (T-WD2 pins it).
|
|
31
24
|
* `|` inside a usage (curator run|pause|…) is escaped for the table cell. */
|
|
32
25
|
export declare function renderCommandTable(): string;
|
|
26
|
+
/** Union of every entry's authored value flags. */
|
|
27
|
+
export declare const VALUE_FLAGS: readonly string[];
|
|
33
28
|
//# sourceMappingURL=registry.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-commands",
|
|
3
3
|
"description": "Human commands for the evolution family (/evolution pending|curator|maintain|doctor) (community build)",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.48.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@deepseek-ai/schemastery": "^3.18.5",
|
|
32
|
-
"@lmzhen/dsh-evolution-approval": "^0.
|
|
33
|
-
"@lmzhen/dsh-evolution-core": "^0.
|
|
34
|
-
"@lmzhen/dsh-evolution-maintenance": "^0.
|
|
35
|
-
"@lmzhen/dsh-evolution-state": "^0.
|
|
32
|
+
"@lmzhen/dsh-evolution-approval": "^0.48.0",
|
|
33
|
+
"@lmzhen/dsh-evolution-core": "^0.48.0",
|
|
34
|
+
"@lmzhen/dsh-evolution-maintenance": "^0.48.0",
|
|
35
|
+
"@lmzhen/dsh-evolution-state": "^0.48.0"
|
|
36
36
|
},
|
|
37
37
|
"optionalDependencies": {
|
|
38
|
-
"@lmzhen/dsh-evolution-agent-preset": "^0.
|
|
38
|
+
"@lmzhen/dsh-evolution-agent-preset": "^0.48.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@deepseek-ai/cordis": "^4.0.5",
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { ConnectionFetchRouteLike } from '@lmzhen/dsh-evolution-core/http-routes';
|
|
2
|
-
interface SettingsDescriptorLike {
|
|
3
|
-
ns: string;
|
|
4
|
-
value?: unknown;
|
|
5
|
-
user?: Record<string, unknown>;
|
|
6
|
-
base?: unknown;
|
|
7
|
-
revision?: number;
|
|
8
|
-
applies?: 'live' | 'restart';
|
|
9
|
-
}
|
|
10
|
-
interface SettingsProviderLike {
|
|
11
|
-
readonly writable: boolean;
|
|
12
|
-
describe(options?: {
|
|
13
|
-
redactSecrets?: boolean;
|
|
14
|
-
}): SettingsDescriptorLike[];
|
|
15
|
-
mutate(ns: string, ops: readonly {
|
|
16
|
-
op: 'set' | 'unset';
|
|
17
|
-
path: readonly string[];
|
|
18
|
-
value?: unknown;
|
|
19
|
-
}[], expectedRevision?: number): Promise<void>;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* @param getProvider - resolves the live platform settings provider per request.
|
|
23
|
-
* @returns exact routes for family settings describe/mutate.
|
|
24
|
-
*/
|
|
25
|
-
export declare function makeSettingsRoutes(getProvider: () => SettingsProviderLike | undefined): ConnectionFetchRouteLike[];
|
|
26
|
-
export {};
|
|
27
|
-
//# sourceMappingURL=settings-route.d.ts.map
|