@alisio/alisio-code 0.1.0-alpha.5 → 0.1.0-alpha.6
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/main.js +23 -2
- package/dist/tui/state.d.ts +1 -0
- package/dist/tui/state.js +9 -3
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -389,11 +389,12 @@ for (const name of ["list", "validate"]) {
|
|
|
389
389
|
}
|
|
390
390
|
const plugins = program.command("plugins");
|
|
391
391
|
plugins.command("list").action(async (_opts, cmd) => {
|
|
392
|
-
const { discoverPlugins } = await import("@alisio/core");
|
|
392
|
+
const { discoverPlugins, installedNpmPlugins } = await import("@alisio/core");
|
|
393
393
|
const { configHome } = await import("@alisio/core");
|
|
394
394
|
const { join, resolve } = await import("node:path");
|
|
395
|
+
const global = join(configHome(), "plugins");
|
|
395
396
|
console.log(JSON.stringify({
|
|
396
|
-
global: await discoverPlugins(
|
|
397
|
+
global: [...(await discoverPlugins(global)), ...(await installedNpmPlugins(global))],
|
|
397
398
|
project: await discoverPlugins(join(resolve(options(cmd).cwd ?? process.cwd()), ".alisio", "plugins")),
|
|
398
399
|
explicit: options(cmd).plugin ?? [],
|
|
399
400
|
}, null, 2));
|
|
@@ -468,6 +469,26 @@ mcp
|
|
|
468
469
|
await app.close();
|
|
469
470
|
}
|
|
470
471
|
});
|
|
472
|
+
program
|
|
473
|
+
.command("install")
|
|
474
|
+
.description("Install an npm plugin package into the global plugins directory (~/.config/alisio/plugins)")
|
|
475
|
+
.argument("<spec>", 'npm package spec, e.g. "npm:plugin-openrouter" or "plugin-openrouter@1.2.3"')
|
|
476
|
+
.option("-y, --yes", "Skip the pre-install confirmation (npm may run lifecycle scripts)")
|
|
477
|
+
.option("--trust-plugin", "Explicit trust for this global install (same as --yes)")
|
|
478
|
+
.option("--update", "Refresh an already-installed plugin to the latest version, keeping its name")
|
|
479
|
+
.action(async (spec, _options, cmd) => {
|
|
480
|
+
const { cliInstall, configHome } = await import("@alisio/core");
|
|
481
|
+
const o = options(cmd);
|
|
482
|
+
await cliInstall({
|
|
483
|
+
spec,
|
|
484
|
+
configHome: configHome(),
|
|
485
|
+
yes: !!o.yes || !!o.trustPlugin,
|
|
486
|
+
update: !!o.update,
|
|
487
|
+
readOnly: !!o.readOnly,
|
|
488
|
+
json: !!o.json,
|
|
489
|
+
interactive: !!process.stdin.isTTY && !!process.stdout.isTTY && !o.json,
|
|
490
|
+
});
|
|
491
|
+
});
|
|
471
492
|
try {
|
|
472
493
|
await program.parseAsync();
|
|
473
494
|
}
|
package/dist/tui/state.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export interface PluginCatalogView {
|
|
|
38
38
|
diagnostic?: string;
|
|
39
39
|
}
|
|
40
40
|
/** Text markers remain meaningful without color: [x] active, [ ] inactive, [!] failed, [*] pending. */
|
|
41
|
+
/** Group headings are derived from the primary category (or "General") of each plugin. */
|
|
41
42
|
export declare function pluginCatalogItems(entries: PluginCatalogView[]): {
|
|
42
43
|
value: string;
|
|
43
44
|
label: string;
|
package/dist/tui/state.js
CHANGED
|
@@ -23,6 +23,7 @@ export function providerModelItems(provider, models, current) {
|
|
|
23
23
|
}));
|
|
24
24
|
}
|
|
25
25
|
/** Text markers remain meaningful without color: [x] active, [ ] inactive, [!] failed, [*] pending. */
|
|
26
|
+
/** Group headings are derived from the primary category (or "General") of each plugin. */
|
|
26
27
|
export function pluginCatalogItems(entries) {
|
|
27
28
|
const marker = (entry) => entry.status === "active"
|
|
28
29
|
? "[x]"
|
|
@@ -31,11 +32,16 @@ export function pluginCatalogItems(entries) {
|
|
|
31
32
|
: entry.status === "failed"
|
|
32
33
|
? "[!]"
|
|
33
34
|
: "[*]";
|
|
34
|
-
|
|
35
|
+
const grouped = new Map();
|
|
36
|
+
for (const entry of entries) {
|
|
37
|
+
const primary = entry.categories[0] ?? "General";
|
|
38
|
+
grouped.set(primary, [...(grouped.get(primary) ?? []), entry]);
|
|
39
|
+
}
|
|
40
|
+
return [...grouped].flatMap(([title, group]) => group.map((entry, index) => ({
|
|
35
41
|
value: entry.id,
|
|
36
|
-
label: `${marker(entry)} ${entry.name} · ${entry.builtin ? "built-in" : entry.source}`,
|
|
42
|
+
label: `${index === 0 ? `${title} · ` : ""}${marker(entry)} ${entry.name} · ${entry.builtin ? "built-in" : entry.source}`,
|
|
37
43
|
description: `${entry.status}${entry.categories.length ? ` · ${entry.categories.join(", ")}` : ""} · ${entry.description}`,
|
|
38
|
-
}));
|
|
44
|
+
})));
|
|
39
45
|
}
|
|
40
46
|
export const pluginToggleNeedsConfirmation = (entry) => !entry.builtin;
|
|
41
47
|
const mcpSourceTitle = (kind) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alisio/alisio-code",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.6",
|
|
4
4
|
"description": "Alisio: an extensible, provider-agnostic coding-agent harness for your terminal. TUI, OpenAI-compatible providers, permissioned local tools, context compaction, persistent memory and a typed plugin SDK.",
|
|
5
5
|
"author": "Gustavo Gutiérrez",
|
|
6
6
|
"license": "MIT",
|