@wrongstack/cli 0.308.6 → 0.308.7
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/dist/{chunk-KV6DNQT6.js → chunk-BZJ4MP32.js} +24 -30
- package/dist/{chunk-RK7E3IXT.js → chunk-H6C7SO5H.js} +499 -13
- package/dist/{cli-main-HCCYX3D5.js → cli-main-L3T4KJKU.js} +127 -55
- package/dist/fleet/host-explore-companion.d.ts +43 -0
- package/dist/fleet/host.d.ts +5 -0
- package/dist/index.js +4 -4
- package/dist/plugin-management.d.ts +9 -0
- package/dist/{plugin-usage-PTEETL3J.js → plugin-usage-26LIIW3P.js} +2 -2
- package/dist/{plugins-XRGWC3NJ.js → plugins-EEKHCMBE.js} +3 -3
- package/dist/wiring/external-plugins.d.ts +58 -0
- package/dist/wiring/plugins.d.ts +8 -0
- package/package.json +25 -25
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External (third-party) plugin loading for the CLI host.
|
|
3
|
+
*
|
|
4
|
+
* Three source kinds, in precedence order:
|
|
5
|
+
* 1. `config.plugins` entries with a bare/npm specifier — dynamically
|
|
6
|
+
* imported exactly as before (module resolution via the host).
|
|
7
|
+
* 2. `config.plugins` entries with an explicit `path` — resolved against
|
|
8
|
+
* the project root and imported via `file:` URL.
|
|
9
|
+
* 3. Directory discovery — `<globalRoot>/plugins/*` (user-global, active
|
|
10
|
+
* by default) and `<projectRoot>/.wrongstack/plugins/*` (project-local,
|
|
11
|
+
* INACTIVE by default: a cloned repo must not auto-execute plugin code
|
|
12
|
+
* the user never opted into).
|
|
13
|
+
*
|
|
14
|
+
* Every external plugin passes through, in order:
|
|
15
|
+
* - enablement resolution (same `resolvePluginEnablement` as built-ins),
|
|
16
|
+
* - deprecation + builtin-spec guards (passed in by the wiring so this
|
|
17
|
+
* module stays acyclic with wiring/plugins.ts),
|
|
18
|
+
* - a PRE-IMPORT TOFU trust gate keyed by the resolved entry file:
|
|
19
|
+
* the module is hashed before any of its code executes, first load
|
|
20
|
+
* pins the hash, a changed hash refuses the load until the user
|
|
21
|
+
* re-pins with `wstack plugin trust <name>`,
|
|
22
|
+
* - a shape check (default-exported object with name/apiVersion/setup),
|
|
23
|
+
* - a spoof guard (external plugins may not claim built-in names).
|
|
24
|
+
*
|
|
25
|
+
* First-party/built-in plugins never enter this module.
|
|
26
|
+
*/
|
|
27
|
+
import type { Config, Logger, Plugin } from '@wrongstack/core/types';
|
|
28
|
+
/** Resolve a `file:` URL / absolute / relative path to an absolute fs path. */
|
|
29
|
+
export declare function normalizeConfigPath(raw: string, projectRoot: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* Resolve a bare/npm specifier to its entry file WITHOUT importing it.
|
|
32
|
+
* Returns undefined when resolution is unavailable (bundled hosts, exotic
|
|
33
|
+
* specs) — callers then proceed without the pre-import trust gate.
|
|
34
|
+
*/
|
|
35
|
+
export declare function resolveSpecifierEntry(spec: string): string | undefined;
|
|
36
|
+
export interface ExternalPluginHooks {
|
|
37
|
+
/** Normalize a config spec to its bare plugin name (null for paths/URLs). */
|
|
38
|
+
nameFromSpec(spec: string): string | null;
|
|
39
|
+
/** True when the spec refers to a built-in plugin (loaded elsewhere). */
|
|
40
|
+
isBuiltinSpec(spec: string): boolean;
|
|
41
|
+
/** Warn-once deprecation check; returns true when the spec is deprecated. */
|
|
42
|
+
warnIfDeprecated(name: string): boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface LoadExternalPluginsContext {
|
|
45
|
+
config: Config;
|
|
46
|
+
log: Logger;
|
|
47
|
+
/** `~/.wrongstack` — anchors global discovery + the default trust store. */
|
|
48
|
+
globalRoot?: string | undefined;
|
|
49
|
+
projectRoot: string;
|
|
50
|
+
/** Plugin names claimed by built-ins — external plugins may not spoof them. */
|
|
51
|
+
reservedNames: ReadonlySet<string>;
|
|
52
|
+
/** Override for tests. Defaults to `~/.wrongstack/plugin-trust.json`. */
|
|
53
|
+
trustStorePath?: string | undefined;
|
|
54
|
+
/** Override for tests. Defaults to native dynamic import. */
|
|
55
|
+
importModule?: ((url: string) => Promise<unknown>) | undefined;
|
|
56
|
+
}
|
|
57
|
+
export declare function loadExternalPlugins(ctx: LoadExternalPluginsContext, hooks: ExternalPluginHooks): Promise<Plugin[]>;
|
|
58
|
+
//# sourceMappingURL=external-plugins.d.ts.map
|
package/dist/wiring/plugins.d.ts
CHANGED
|
@@ -103,6 +103,14 @@ export interface PluginsWiringDeps {
|
|
|
103
103
|
projectDir?: string;
|
|
104
104
|
/** Per-project goal.json path. Useful as a sibling anchor. */
|
|
105
105
|
projectGoal?: string;
|
|
106
|
+
/**
|
|
107
|
+
* The actual code project root (the directory containing
|
|
108
|
+
* `<projectRoot>/.wrongstack/`). Anchors relative `path` entries in
|
|
109
|
+
* `config.plugins` and the project-local plugin discovery root.
|
|
110
|
+
* Optional — minimal hosts may omit it, in which case only
|
|
111
|
+
* config-specifier user plugins load.
|
|
112
|
+
*/
|
|
113
|
+
projectRoot?: string;
|
|
106
114
|
};
|
|
107
115
|
}
|
|
108
116
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/cli",
|
|
3
|
-
"version": "0.308.
|
|
3
|
+
"version": "0.308.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "WrongStack CLI — terminal AI coding agent with provider catalog from models.dev. Provides `wrongstack` and `wstack` binaries.",
|
|
6
6
|
"keywords": [
|
|
@@ -42,32 +42,32 @@
|
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"ws": "^8.21.3",
|
|
45
|
-
"@wrongstack/
|
|
46
|
-
"@wrongstack/
|
|
47
|
-
"@wrongstack/
|
|
48
|
-
"@wrongstack/
|
|
49
|
-
"@wrongstack/
|
|
50
|
-
"@wrongstack/
|
|
51
|
-
"@wrongstack/
|
|
52
|
-
"@wrongstack/
|
|
53
|
-
"@wrongstack/
|
|
54
|
-
"@wrongstack/
|
|
55
|
-
"@wrongstack/
|
|
56
|
-
"@wrongstack/
|
|
57
|
-
"@wrongstack/
|
|
58
|
-
"@wrongstack/sdd": "0.308.
|
|
59
|
-
"@wrongstack/
|
|
60
|
-
"@wrongstack/
|
|
61
|
-
"@wrongstack/
|
|
62
|
-
"@wrongstack/
|
|
63
|
-
"@wrongstack/
|
|
64
|
-
"@wrongstack/
|
|
65
|
-
"@wrongstack/webui": "0.308.
|
|
66
|
-
"@wrongstack/webui
|
|
67
|
-
"@wrongstack/webui-server": "0.308.
|
|
45
|
+
"@wrongstack/kanban": "0.308.7",
|
|
46
|
+
"@wrongstack/mcp": "0.308.7",
|
|
47
|
+
"@wrongstack/acp": "0.308.7",
|
|
48
|
+
"@wrongstack/bench": "0.308.7",
|
|
49
|
+
"@wrongstack/core": "0.308.7",
|
|
50
|
+
"@wrongstack/plug-lsp": "0.308.7",
|
|
51
|
+
"@wrongstack/sage": "0.308.7",
|
|
52
|
+
"@wrongstack/providers": "0.308.7",
|
|
53
|
+
"@wrongstack/persistence": "0.308.7",
|
|
54
|
+
"@wrongstack/runtime": "0.308.7",
|
|
55
|
+
"@wrongstack/plugins": "0.308.7",
|
|
56
|
+
"@wrongstack/requirement-intake": "0.308.7",
|
|
57
|
+
"@wrongstack/security-scanner": "0.308.7",
|
|
58
|
+
"@wrongstack/sdd": "0.308.7",
|
|
59
|
+
"@wrongstack/tools": "0.308.7",
|
|
60
|
+
"@wrongstack/techstack": "0.308.7",
|
|
61
|
+
"@wrongstack/simpleui": "0.308.7",
|
|
62
|
+
"@wrongstack/vector-memory": "0.308.7",
|
|
63
|
+
"@wrongstack/telegram": "0.308.7",
|
|
64
|
+
"@wrongstack/tui": "0.308.7",
|
|
65
|
+
"@wrongstack/webui-hq": "0.308.7",
|
|
66
|
+
"@wrongstack/webui": "0.308.7",
|
|
67
|
+
"@wrongstack/webui-server": "0.308.7"
|
|
68
68
|
},
|
|
69
69
|
"optionalDependencies": {
|
|
70
|
-
"@wrongstack/desktop": "0.308.
|
|
70
|
+
"@wrongstack/desktop": "0.308.7"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@types/node": "^26.2.0",
|